diff --git a/src/din/dinEXIDatatypes.c b/src/din/dinEXIDatatypes.c index ab15939..9f6d315 100644 --- a/src/din/dinEXIDatatypes.c +++ b/src/din/dinEXIDatatypes.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2015 Siemens AG + * Copyright (C) 2007-2017 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,8 +18,8 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.9.3 - * @contact Joerg.Heuer@siemens.com + * @version 2017-09-05 + * @contact Richard.Kuntschke@siemens.com * *
Code generated by EXIdizer
*Schema: V2G_CI_MsgDef.xsd
@@ -125,474 +125,317 @@ void init_dinEXIDocument(struct dinEXIDocument* exiDoc) { exiDoc->ServiceDetailRes_isUsed = 0u; } + #if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES void init_dinEXIFragment(struct dinEXIFragment* exiFrag) { - exiFrag->RSAKeyValue_isUsed = 0u; - exiFrag->ParameterSet_isUsed = 0u; - exiFrag->EVEnergyRequest_isUsed = 0u; - exiFrag->amount_isUsed = 0u; - exiFrag->start_isUsed = 0u; - exiFrag->Notification_isUsed = 0u; - exiFrag->ServiceScope_isUsed = 0u; - exiFrag->EVMaximumVoltageLimit_isUsed = 0u; - exiFrag->Certificate_isUsed = 0u; - exiFrag->Certificate_isUsed = 0u; - exiFrag->EVCabinConditioning_isUsed = 0u; - exiFrag->EVSECurrentLimitAchieved_isUsed = 0u; - exiFrag->EVMaxCurrent_isUsed = 0u; - exiFrag->CertificateInstallationRes_isUsed = 0u; - exiFrag->EVMaxVoltage_isUsed = 0u; - exiFrag->Exponent_isUsed = 0u; - exiFrag->SubCertificates_isUsed = 0u; - exiFrag->FaultCode_isUsed = 0u; - exiFrag->EVRequestedEnergyTransferType_isUsed = 0u; - exiFrag->EVMinCurrent_isUsed = 0u; - exiFrag->boolValue_isUsed = 0u; - exiFrag->J_isUsed = 0u; - exiFrag->EVSEStatus_isUsed = 0u; - exiFrag->ServicePaymentSelectionReq_isUsed = 0u; - exiFrag->Transforms_isUsed = 0u; - exiFrag->X509CRL_isUsed = 0u; - exiFrag->Manifest_isUsed = 0u; - exiFrag->EVSEMinimumVoltageLimit_isUsed = 0u; - exiFrag->EVSECurrentRegulationTolerance_isUsed = 0u; - exiFrag->EVMaximumPowerLimit_isUsed = 0u; - exiFrag->ServiceID_isUsed = 0u; - exiFrag->ServiceID_isUsed = 0u; - exiFrag->V2G_Message_isUsed = 0u; - exiFrag->Parameter_isUsed = 0u; - exiFrag->EVTargetCurrent_isUsed = 0u; - exiFrag->EVTargetCurrent_isUsed = 0u; - exiFrag->DigestMethod_isUsed = 0u; - exiFrag->byteValue_isUsed = 0u; - exiFrag->PaymentOptions_isUsed = 0u; - exiFrag->EVMaximumVoltageLimit_isUsed = 0u; - exiFrag->ChargingComplete_isUsed = 0u; - exiFrag->Multiplier_isUsed = 0u; - exiFrag->EVSEIsolationStatus_isUsed = 0u; - exiFrag->EVSEPeakCurrentRipple_isUsed = 0u; - exiFrag->ReadyToChargeState_isUsed = 0u; - exiFrag->X509IssuerSerial_isUsed = 0u; - exiFrag->duration_isUsed = 0u; - exiFrag->NotificationMaxDelay_isUsed = 0u; - exiFrag->NotificationMaxDelay_isUsed = 0u; - exiFrag->ServiceDetailRes_isUsed = 0u; - exiFrag->EVSEProcessing_isUsed = 0u; - exiFrag->EVSEProcessing_isUsed = 0u; - exiFrag->EVSEProcessing_isUsed = 0u; - exiFrag->PGPKeyPacket_isUsed = 0u; - exiFrag->PGPKeyPacket_isUsed = 0u; - exiFrag->ServiceDetailReq_isUsed = 0u; - exiFrag->DC_EVPowerDeliveryParameter_isUsed = 0u; - exiFrag->PgenCounter_isUsed = 0u; - exiFrag->EVChargeParameter_isUsed = 0u; - exiFrag->RelativeTimeInterval_isUsed = 0u; - exiFrag->SelectedServiceList_isUsed = 0u; - exiFrag->X509SerialNumber_isUsed = 0u; - exiFrag->SalesTariffEntry_isUsed = 0u; - exiFrag->SAScheduleTuple_isUsed = 0u; - exiFrag->Reference_isUsed = 0u; - exiFrag->SignedInfo_isUsed = 0u; - exiFrag->CableCheckReq_isUsed = 0u; - exiFrag->PowerDeliveryReq_isUsed = 0u; - exiFrag->EVPowerDeliveryParameter_isUsed = 0u; - exiFrag->MeteringReceiptReq_isUsed = 0u; - exiFrag->DC_EVChargeParameter_isUsed = 0u; - exiFrag->KeyValue_isUsed = 0u; - exiFrag->Y_isUsed = 0u; - exiFrag->ChargingProfileEntryMaxPower_isUsed = 0u; - exiFrag->EVRESSConditioning_isUsed = 0u; - exiFrag->EVSEMaximumVoltageLimit_isUsed = 0u; - exiFrag->EPriceLevel_isUsed = 0u; - exiFrag->ServiceList_isUsed = 0u; - exiFrag->SAScheduleTupleID_isUsed = 0u; - exiFrag->SAScheduleTupleID_isUsed = 0u; - exiFrag->PMaxSchedule_isUsed = 0u; - exiFrag->EVSEPowerLimitAchieved_isUsed = 0u; - exiFrag->CertificateUpdateRes_isUsed = 0u; - exiFrag->EVSEEnergyToBeDelivered_isUsed = 0u; - exiFrag->AC_EVSEStatus_isUsed = 0u; - exiFrag->AC_EVSEStatus_isUsed = 0u; - exiFrag->ServiceTag_isUsed = 0u; - exiFrag->SignatureMethod_isUsed = 0u; - exiFrag->TimeInterval_isUsed = 0u; - exiFrag->amountMultiplier_isUsed = 0u; - exiFrag->X509Data_isUsed = 0u; - exiFrag->ContractSignatureCertChain_isUsed = 0u; - exiFrag->ContractSignatureCertChain_isUsed = 0u; - exiFrag->ContractSignatureCertChain_isUsed = 0u; - exiFrag->ContractSignatureCertChain_isUsed = 0u; - exiFrag->Seed_isUsed = 0u; - exiFrag->Modulus_isUsed = 0u; - exiFrag->ServiceCategory_isUsed = 0u; - exiFrag->MeterStatus_isUsed = 0u; - exiFrag->EVMaximumCurrentLimit_isUsed = 0u; - exiFrag->KeyInfo_isUsed = 0u; - exiFrag->CertificateInstallationReq_isUsed = 0u; - exiFrag->ChargingProfile_isUsed = 0u; - exiFrag->BulkSOC_isUsed = 0u; - exiFrag->X509IssuerName_isUsed = 0u; - exiFrag->EVRESSSOC_isUsed = 0u; - exiFrag->X509SubjectName_isUsed = 0u; - exiFrag->AC_EVSEChargeParameter_isUsed = 0u; - exiFrag->MgmtData_isUsed = 0u; - exiFrag->Value_isUsed = 0u; - exiFrag->ChargingStatusRes_isUsed = 0u; - exiFrag->ServiceName_isUsed = 0u; - exiFrag->FreeService_isUsed = 0u; - exiFrag->physicalValue_isUsed = 0u; - exiFrag->EVSEMaxVoltage_isUsed = 0u; - exiFrag->intValue_isUsed = 0u; - exiFrag->PGPKeyID_isUsed = 0u; - exiFrag->ChargeParameterDiscoveryRes_isUsed = 0u; - exiFrag->ServiceCategory_isUsed = 0u; - exiFrag->MeteringReceiptRes_isUsed = 0u; - exiFrag->EVSEID_isUsed = 0u; - exiFrag->EVSEID_isUsed = 0u; - exiFrag->EVMaximumCurrentLimit_isUsed = 0u; - exiFrag->costKind_isUsed = 0u; - exiFrag->X509SKI_isUsed = 0u; - exiFrag->MeterID_isUsed = 0u; - exiFrag->OEMProvisioningCert_isUsed = 0u; - exiFrag->Entry_isUsed = 0u; - exiFrag->SignatureProperties_isUsed = 0u; - exiFrag->P_isUsed = 0u; - exiFrag->PreChargeReq_isUsed = 0u; - exiFrag->SignatureValue_isUsed = 0u; - exiFrag->EVSENotification_isUsed = 0u; - exiFrag->EVSENotification_isUsed = 0u; - exiFrag->BulkChargingComplete_isUsed = 0u; - exiFrag->EVMaximumPowerLimit_isUsed = 0u; - exiFrag->RCD_isUsed = 0u; - exiFrag->ServiceParameterList_isUsed = 0u; - exiFrag->SelectedService_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->ResponseCode_isUsed = 0u; - exiFrag->SessionStopRes_isUsed = 0u; - exiFrag->PGPData_isUsed = 0u; - exiFrag->EVEnergyCapacity_isUsed = 0u; - exiFrag->startValue_isUsed = 0u; - exiFrag->ServicePaymentSelectionRes_isUsed = 0u; - exiFrag->EnergyTransferType_isUsed = 0u; - exiFrag->ChargingComplete_isUsed = 0u; - exiFrag->ListOfRootCertificateIDs_isUsed = 0u; - exiFrag->ListOfRootCertificateIDs_isUsed = 0u; - exiFrag->NumEPriceLevels_isUsed = 0u; - exiFrag->EVSEStatusCode_isUsed = 0u; - exiFrag->SASchedules_isUsed = 0u; - exiFrag->DC_EVStatus_isUsed = 0u; - exiFrag->DC_EVStatus_isUsed = 0u; - exiFrag->DC_EVStatus_isUsed = 0u; - exiFrag->DC_EVStatus_isUsed = 0u; - exiFrag->DC_EVSEChargeParameter_isUsed = 0u; - exiFrag->MeterInfo_isUsed = 0u; - exiFrag->MeterInfo_isUsed = 0u; - exiFrag->X509Certificate_isUsed = 0u; - exiFrag->shortValue_isUsed = 0u; - exiFrag->SPKISexp_isUsed = 0u; - exiFrag->SalesTariffID_isUsed = 0u; - exiFrag->CanonicalizationMethod_isUsed = 0u; - exiFrag->TMeter_isUsed = 0u; - exiFrag->PaymentDetailsRes_isUsed = 0u; - exiFrag->EVCCID_isUsed = 0u; - exiFrag->EVSEMaximumPowerLimit_isUsed = 0u; - exiFrag->EVSEChargeParameter_isUsed = 0u; - exiFrag->Body_isUsed = 0u; - exiFrag->DateTimeNow_isUsed = 0u; - exiFrag->DateTimeNow_isUsed = 0u; - exiFrag->EVSEMaximumPowerLimit_isUsed = 0u; - exiFrag->SPKIData_isUsed = 0u; - exiFrag->Object_isUsed = 0u; - exiFrag->ServiceCharge_isUsed = 0u; - exiFrag->SessionID_isUsed = 0u; - exiFrag->FullSOC_isUsed = 0u; - exiFrag->SAScheduleList_isUsed = 0u; - exiFrag->EVSEMaximumCurrentLimit_isUsed = 0u; - exiFrag->DSAKeyValue_isUsed = 0u; - exiFrag->ChargeParameterDiscoveryReq_isUsed = 0u; - exiFrag->EVStatus_isUsed = 0u; - exiFrag->stringValue_isUsed = 0u; - exiFrag->PowerDeliveryRes_isUsed = 0u; - exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u; - exiFrag->CertificateUpdateReq_isUsed = 0u; - exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u; - exiFrag->Signature_isUsed = 0u; - exiFrag->ContractAuthenticationRes_isUsed = 0u; - exiFrag->Transform_isUsed = 0u; - exiFrag->PaymentOption_isUsed = 0u; - exiFrag->G_isUsed = 0u; - exiFrag->ReceiptRequired_isUsed = 0u; - exiFrag->EVSEMaximumCurrentLimit_isUsed = 0u; exiFrag->Unit_isUsed = 0u; - exiFrag->ConsumptionCost_isUsed = 0u; - exiFrag->EVSEMaxCurrent_isUsed = 0u; - exiFrag->SalesTariffDescription_isUsed = 0u; - exiFrag->ContractID_isUsed = 0u; + exiFrag->EVSEMaximumCurrentLimit_isUsed = 0u; + exiFrag->EVPowerDeliveryParameter_isUsed = 0u; + exiFrag->ChargingProfileEntryMaxPower_isUsed = 0u; + exiFrag->TMeter_isUsed = 0u; + exiFrag->EVSEPowerLimitAchieved_isUsed = 0u; + exiFrag->duration_isUsed = 0u; + exiFrag->EVMaximumCurrentLimit_isUsed = 0u; + exiFrag->Parameter_isUsed = 0u; + exiFrag->EVSEProcessing_isUsed = 0u; exiFrag->AC_EVChargeParameter_isUsed = 0u; - exiFrag->ContractID_isUsed = 0u; - exiFrag->ContractID_isUsed = 0u; - exiFrag->ContractID_isUsed = 0u; - exiFrag->RemainingTimeToBulkSoC_isUsed = 0u; - exiFrag->DC_EVSEStatus_isUsed = 0u; - exiFrag->DC_EVSEStatus_isUsed = 0u; - exiFrag->CableCheckRes_isUsed = 0u; - exiFrag->SessionID_isUsed = 0u; - exiFrag->RemainingTimeToFullSoC_isUsed = 0u; - exiFrag->EVSEPresentVoltage_isUsed = 0u; - exiFrag->EVSEPresentVoltage_isUsed = 0u; - exiFrag->EVSEPresentVoltage_isUsed = 0u; - exiFrag->SessionSetupReq_isUsed = 0u; - exiFrag->PreChargeRes_isUsed = 0u; - exiFrag->KeyName_isUsed = 0u; - exiFrag->EVReady_isUsed = 0u; - exiFrag->CurrentDemandRes_isUsed = 0u; + exiFrag->EVSEProcessing_isUsed = 0u; exiFrag->PMaxScheduleEntry_isUsed = 0u; - exiFrag->ServiceDiscoveryRes_isUsed = 0u; - exiFrag->PaymentDetailsReq_isUsed = 0u; - exiFrag->SelectedPaymentOption_isUsed = 0u; - exiFrag->SAScheduleTupleID_isUsed = 0u; - exiFrag->DigestValue_isUsed = 0u; - exiFrag->SAScheduleTupleID_isUsed = 0u; - exiFrag->ServiceID_isUsed = 0u; - exiFrag->ServiceID_isUsed = 0u; - exiFrag->RetryCounter_isUsed = 0u; - exiFrag->SalesTariff_isUsed = 0u; - exiFrag->DC_EVStatus_isUsed = 0u; - exiFrag->DC_EVStatus_isUsed = 0u; - exiFrag->DC_EVStatus_isUsed = 0u; - exiFrag->WeldingDetectionReq_isUsed = 0u; - exiFrag->SigMeterReading_isUsed = 0u; - exiFrag->FaultMsg_isUsed = 0u; - exiFrag->PMax_isUsed = 0u; - exiFrag->PowerSwitchClosed_isUsed = 0u; - exiFrag->AC_EVSEStatus_isUsed = 0u; - exiFrag->AC_EVSEStatus_isUsed = 0u; - exiFrag->ParameterSetID_isUsed = 0u; - exiFrag->ParameterSetID_isUsed = 0u; - exiFrag->EAmount_isUsed = 0u; + exiFrag->EVSEProcessing_isUsed = 0u; + exiFrag->EVSEMaximumVoltageLimit_isUsed = 0u; + exiFrag->SelectedService_isUsed = 0u; + exiFrag->Certificate_isUsed = 0u; + exiFrag->Certificate_isUsed = 0u; + exiFrag->EVSEMaximumPowerLimit_isUsed = 0u; + exiFrag->EVReady_isUsed = 0u; + exiFrag->X509SerialNumber_isUsed = 0u; exiFrag->RetrievalMethod_isUsed = 0u; - exiFrag->ChargingProfileEntryStart_isUsed = 0u; + exiFrag->RetryCounter_isUsed = 0u; + exiFrag->DC_EVSEStatus_isUsed = 0u; + exiFrag->DC_EVSEStatus_isUsed = 0u; + exiFrag->DC_EVSEStatus_isUsed = 0u; + exiFrag->DC_EVSEStatus_isUsed = 0u; + exiFrag->MeteringReceiptReq_isUsed = 0u; + exiFrag->ReadyToChargeState_isUsed = 0u; + exiFrag->Multiplier_isUsed = 0u; + exiFrag->EPriceLevel_isUsed = 0u; + exiFrag->stringValue_isUsed = 0u; exiFrag->ServiceDiscoveryReq_isUsed = 0u; - exiFrag->DepartureTime_isUsed = 0u; - exiFrag->EVSEMinimumCurrentLimit_isUsed = 0u; - exiFrag->CurrentDemandReq_isUsed = 0u; - exiFrag->ChargeService_isUsed = 0u; - exiFrag->BodyElement_isUsed = 0u; - exiFrag->Cost_isUsed = 0u; - exiFrag->ServiceScope_isUsed = 0u; + exiFrag->Transforms_isUsed = 0u; + exiFrag->MeteringReceiptRes_isUsed = 0u; + exiFrag->PreChargeReq_isUsed = 0u; + exiFrag->OEMProvisioningCert_isUsed = 0u; + exiFrag->ServiceDiscoveryRes_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ResponseCode_isUsed = 0u; + exiFrag->ContractAuthenticationReq_isUsed = 0u; + exiFrag->ContractSignatureCertChain_isUsed = 0u; + exiFrag->ContractSignatureCertChain_isUsed = 0u; + exiFrag->ContractSignatureCertChain_isUsed = 0u; + exiFrag->ContractSignatureCertChain_isUsed = 0u; + exiFrag->ContractAuthenticationRes_isUsed = 0u; exiFrag->HMACOutputLength_isUsed = 0u; - exiFrag->MeterReading_isUsed = 0u; - exiFrag->DHParams_isUsed = 0u; - exiFrag->DHParams_isUsed = 0u; - exiFrag->DHParams_isUsed = 0u; - exiFrag->DHParams_isUsed = 0u; exiFrag->BulkChargingComplete_isUsed = 0u; - exiFrag->SignatureProperty_isUsed = 0u; - exiFrag->EVSEMaxCurrent_isUsed = 0u; - exiFrag->DC_EVSEStatus_isUsed = 0u; - exiFrag->DC_EVSEStatus_isUsed = 0u; - exiFrag->DC_EVSEStatus_isUsed = 0u; - exiFrag->DC_EVSEStatus_isUsed = 0u; - exiFrag->Service_isUsed = 0u; - exiFrag->PMaxScheduleID_isUsed = 0u; - exiFrag->EVSEPresentCurrent_isUsed = 0u; + exiFrag->Exponent_isUsed = 0u; + exiFrag->DC_EVStatus_isUsed = 0u; + exiFrag->SAScheduleTuple_isUsed = 0u; + exiFrag->DC_EVStatus_isUsed = 0u; + exiFrag->DC_EVStatus_isUsed = 0u; + exiFrag->DepartureTime_isUsed = 0u; + exiFrag->X509IssuerSerial_isUsed = 0u; + exiFrag->SAScheduleTupleID_isUsed = 0u; + exiFrag->SAScheduleTupleID_isUsed = 0u; + exiFrag->SPKIData_isUsed = 0u; + exiFrag->RelativeTimeInterval_isUsed = 0u; + exiFrag->EVEnergyRequest_isUsed = 0u; + exiFrag->PreChargeRes_isUsed = 0u; + exiFrag->SessionID_isUsed = 0u; + exiFrag->PMaxSchedule_isUsed = 0u; + exiFrag->ServiceCharge_isUsed = 0u; + exiFrag->PgenCounter_isUsed = 0u; + exiFrag->ChargingStatusReq_isUsed = 0u; + exiFrag->X509Data_isUsed = 0u; + exiFrag->SalesTariffEntry_isUsed = 0u; + exiFrag->KeyValue_isUsed = 0u; + exiFrag->ChargingStatusRes_isUsed = 0u; + exiFrag->V2G_Message_isUsed = 0u; + exiFrag->DC_EVStatus_isUsed = 0u; + exiFrag->DC_EVStatus_isUsed = 0u; + exiFrag->DC_EVStatus_isUsed = 0u; + exiFrag->ServicePaymentSelectionReq_isUsed = 0u; + exiFrag->DC_EVStatus_isUsed = 0u; + exiFrag->EVSEIsolationStatus_isUsed = 0u; + exiFrag->ServicePaymentSelectionRes_isUsed = 0u; + exiFrag->EVSEPresentVoltage_isUsed = 0u; + exiFrag->EVSEPresentVoltage_isUsed = 0u; + exiFrag->EVSEPresentVoltage_isUsed = 0u; + exiFrag->BodyElement_isUsed = 0u; + exiFrag->EVCCID_isUsed = 0u; + exiFrag->PGPData_isUsed = 0u; + exiFrag->RootCertificateID_isUsed = 0u; + exiFrag->FaultCode_isUsed = 0u; + exiFrag->CableCheckReq_isUsed = 0u; exiFrag->EVSEVoltageLimitAchieved_isUsed = 0u; + exiFrag->EVRESSConditioning_isUsed = 0u; + exiFrag->MeterInfo_isUsed = 0u; + exiFrag->MeterInfo_isUsed = 0u; + exiFrag->CableCheckRes_isUsed = 0u; + exiFrag->ChargingProfileEntryStart_isUsed = 0u; + exiFrag->SignatureProperty_isUsed = 0u; + exiFrag->EVMaxCurrent_isUsed = 0u; + exiFrag->PGPKeyPacket_isUsed = 0u; + exiFrag->PGPKeyPacket_isUsed = 0u; + exiFrag->Seed_isUsed = 0u; + exiFrag->RSAKeyValue_isUsed = 0u; + exiFrag->costKind_isUsed = 0u; + exiFrag->EAmount_isUsed = 0u; + exiFrag->EVSEPresentCurrent_isUsed = 0u; + exiFrag->PowerDeliveryRes_isUsed = 0u; + exiFrag->NumEPriceLevels_isUsed = 0u; + exiFrag->SessionStopRes_isUsed = 0u; + exiFrag->PowerDeliveryReq_isUsed = 0u; + exiFrag->SessionStopReq_isUsed = 0u; + exiFrag->XPath_isUsed = 0u; + exiFrag->BulkSOC_isUsed = 0u; + exiFrag->PMax_isUsed = 0u; + exiFrag->ParameterSetID_isUsed = 0u; + exiFrag->ParameterSetID_isUsed = 0u; + exiFrag->ContractID_isUsed = 0u; + exiFrag->ContractID_isUsed = 0u; + exiFrag->ContractID_isUsed = 0u; + exiFrag->ContractID_isUsed = 0u; + exiFrag->Signature_isUsed = 0u; + exiFrag->EVMaxVoltage_isUsed = 0u; + exiFrag->ReceiptRequired_isUsed = 0u; + exiFrag->ChargingComplete_isUsed = 0u; + exiFrag->ChargingProfile_isUsed = 0u; + exiFrag->PaymentOptions_isUsed = 0u; exiFrag->SessionSetupRes_isUsed = 0u; exiFrag->EVSEMaximumVoltageLimit_isUsed = 0u; - exiFrag->SessionStopReq_isUsed = 0u; - exiFrag->ContractAuthenticationReq_isUsed = 0u; - exiFrag->ProfileEntry_isUsed = 0u; - exiFrag->EVErrorCode_isUsed = 0u; - exiFrag->RootCertificateID_isUsed = 0u; - exiFrag->EVSEMinCurrent_isUsed = 0u; - exiFrag->EVTargetVoltage_isUsed = 0u; - exiFrag->ChargingStatusReq_isUsed = 0u; - exiFrag->EVTargetVoltage_isUsed = 0u; - exiFrag->Header_isUsed = 0u; - exiFrag->GenChallenge_isUsed = 0u; - exiFrag->XPath_isUsed = 0u; + exiFrag->ServiceDetailRes_isUsed = 0u; + exiFrag->DC_EVPowerDeliveryParameter_isUsed = 0u; + exiFrag->PaymentDetailsRes_isUsed = 0u; + exiFrag->PaymentDetailsReq_isUsed = 0u; + exiFrag->MgmtData_isUsed = 0u; + exiFrag->Value_isUsed = 0u; + exiFrag->EVSENotification_isUsed = 0u; + exiFrag->EVSENotification_isUsed = 0u; + exiFrag->EVSEMaximumPowerLimit_isUsed = 0u; + exiFrag->EVTargetCurrent_isUsed = 0u; + exiFrag->RemainingTimeToBulkSoC_isUsed = 0u; + exiFrag->EVTargetCurrent_isUsed = 0u; + exiFrag->SessionSetupReq_isUsed = 0u; + exiFrag->EVSECurrentLimitAchieved_isUsed = 0u; + exiFrag->ServiceDetailReq_isUsed = 0u; + exiFrag->byteValue_isUsed = 0u; + exiFrag->EVMaximumPowerLimit_isUsed = 0u; + exiFrag->PowerSwitchClosed_isUsed = 0u; + exiFrag->Manifest_isUsed = 0u; + exiFrag->P_isUsed = 0u; + exiFrag->SAScheduleList_isUsed = 0u; exiFrag->Q_isUsed = 0u; - exiFrag->GenChallenge_isUsed = 0u; + exiFrag->X509SubjectName_isUsed = 0u; + exiFrag->G_isUsed = 0u; + exiFrag->SessionID_isUsed = 0u; + exiFrag->J_isUsed = 0u; + exiFrag->CertificateInstallationRes_isUsed = 0u; + exiFrag->CertificateInstallationReq_isUsed = 0u; + exiFrag->SalesTariff_isUsed = 0u; + exiFrag->Header_isUsed = 0u; + exiFrag->EVSEMinimumCurrentLimit_isUsed = 0u; + exiFrag->X509CRL_isUsed = 0u; + exiFrag->EVMaximumCurrentLimit_isUsed = 0u; + exiFrag->Y_isUsed = 0u; + exiFrag->DigestValue_isUsed = 0u; + exiFrag->DC_EVChargeParameter_isUsed = 0u; + exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u; + exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u; + exiFrag->DigestMethod_isUsed = 0u; + exiFrag->SPKISexp_isUsed = 0u; + exiFrag->ChargeService_isUsed = 0u; + exiFrag->EVSEEnergyToBeDelivered_isUsed = 0u; + exiFrag->SignatureProperties_isUsed = 0u; + exiFrag->EVSEMaxCurrent_isUsed = 0u; + exiFrag->EVMaximumPowerLimit_isUsed = 0u; + exiFrag->EVSEStatus_isUsed = 0u; + exiFrag->Service_isUsed = 0u; + exiFrag->DHParams_isUsed = 0u; + exiFrag->DHParams_isUsed = 0u; + exiFrag->DHParams_isUsed = 0u; + exiFrag->DHParams_isUsed = 0u; + exiFrag->PGPKeyID_isUsed = 0u; + exiFrag->DSAKeyValue_isUsed = 0u; + exiFrag->EnergyTransferType_isUsed = 0u; exiFrag->WeldingDetectionRes_isUsed = 0u; + exiFrag->FreeService_isUsed = 0u; + exiFrag->SelectedServiceList_isUsed = 0u; + exiFrag->WeldingDetectionReq_isUsed = 0u; + exiFrag->EVTargetVoltage_isUsed = 0u; + exiFrag->EVTargetVoltage_isUsed = 0u; + exiFrag->CanonicalizationMethod_isUsed = 0u; + exiFrag->X509Certificate_isUsed = 0u; + exiFrag->CertificateUpdateRes_isUsed = 0u; + exiFrag->CertificateUpdateReq_isUsed = 0u; + exiFrag->EVSEMaxVoltage_isUsed = 0u; + exiFrag->SignedInfo_isUsed = 0u; + exiFrag->AC_EVSEChargeParameter_isUsed = 0u; + exiFrag->EVEnergyCapacity_isUsed = 0u; + exiFrag->ServiceID_isUsed = 0u; + exiFrag->ServiceID_isUsed = 0u; + exiFrag->EVSECurrentRegulationTolerance_isUsed = 0u; + exiFrag->ServiceParameterList_isUsed = 0u; + exiFrag->ListOfRootCertificateIDs_isUsed = 0u; + exiFrag->ListOfRootCertificateIDs_isUsed = 0u; + exiFrag->ProfileEntry_isUsed = 0u; + exiFrag->EVSEMinimumVoltageLimit_isUsed = 0u; + exiFrag->CurrentDemandRes_isUsed = 0u; + exiFrag->EVRESSSOC_isUsed = 0u; + exiFrag->MeterReading_isUsed = 0u; + exiFrag->CurrentDemandReq_isUsed = 0u; + exiFrag->physicalValue_isUsed = 0u; + exiFrag->ChargingComplete_isUsed = 0u; + exiFrag->TimeInterval_isUsed = 0u; + exiFrag->AC_EVSEStatus_isUsed = 0u; + exiFrag->AC_EVSEStatus_isUsed = 0u; + exiFrag->EVMaximumVoltageLimit_isUsed = 0u; + exiFrag->SignatureValue_isUsed = 0u; + exiFrag->DateTimeNow_isUsed = 0u; + exiFrag->DateTimeNow_isUsed = 0u; + exiFrag->ServiceTag_isUsed = 0u; + exiFrag->intValue_isUsed = 0u; + exiFrag->SelectedPaymentOption_isUsed = 0u; + exiFrag->ServiceName_isUsed = 0u; + exiFrag->EVCabinConditioning_isUsed = 0u; + exiFrag->EVSEID_isUsed = 0u; + exiFrag->ServiceScope_isUsed = 0u; + exiFrag->EVSEID_isUsed = 0u; + exiFrag->MeterStatus_isUsed = 0u; + exiFrag->EVRequestedEnergyTransferType_isUsed = 0u; + exiFrag->ServiceCategory_isUsed = 0u; + exiFrag->GenChallenge_isUsed = 0u; + exiFrag->GenChallenge_isUsed = 0u; + exiFrag->SalesTariffDescription_isUsed = 0u; + exiFrag->NotificationMaxDelay_isUsed = 0u; + exiFrag->NotificationMaxDelay_isUsed = 0u; + exiFrag->boolValue_isUsed = 0u; + exiFrag->EVSEStatusCode_isUsed = 0u; + exiFrag->ServiceScope_isUsed = 0u; + exiFrag->FaultMsg_isUsed = 0u; + exiFrag->SAScheduleTupleID_isUsed = 0u; + exiFrag->SAScheduleTupleID_isUsed = 0u; + exiFrag->BulkChargingComplete_isUsed = 0u; + exiFrag->KeyName_isUsed = 0u; + exiFrag->ParameterSet_isUsed = 0u; + exiFrag->SigMeterReading_isUsed = 0u; + exiFrag->EVSEChargeParameter_isUsed = 0u; + exiFrag->Body_isUsed = 0u; + exiFrag->SASchedules_isUsed = 0u; + exiFrag->ServiceCategory_isUsed = 0u; + exiFrag->KeyInfo_isUsed = 0u; + exiFrag->PMaxScheduleID_isUsed = 0u; + exiFrag->RemainingTimeToFullSoC_isUsed = 0u; + exiFrag->EVStatus_isUsed = 0u; + exiFrag->SubCertificates_isUsed = 0u; + exiFrag->PaymentOption_isUsed = 0u; + exiFrag->X509SKI_isUsed = 0u; + exiFrag->EVMaximumVoltageLimit_isUsed = 0u; + exiFrag->ServiceList_isUsed = 0u; + exiFrag->Cost_isUsed = 0u; + exiFrag->AC_EVSEStatus_isUsed = 0u; + exiFrag->AC_EVSEStatus_isUsed = 0u; + exiFrag->SignatureMethod_isUsed = 0u; + exiFrag->EVSEMinCurrent_isUsed = 0u; + exiFrag->ConsumptionCost_isUsed = 0u; + exiFrag->EVSEPeakCurrentRipple_isUsed = 0u; + exiFrag->EVErrorCode_isUsed = 0u; + exiFrag->EVChargeParameter_isUsed = 0u; + exiFrag->start_isUsed = 0u; + exiFrag->X509IssuerName_isUsed = 0u; + exiFrag->Reference_isUsed = 0u; + exiFrag->EVMinCurrent_isUsed = 0u; + exiFrag->FullSOC_isUsed = 0u; + exiFrag->amount_isUsed = 0u; + exiFrag->DC_EVSEStatus_isUsed = 0u; + exiFrag->DC_EVSEStatus_isUsed = 0u; + exiFrag->shortValue_isUsed = 0u; + exiFrag->DC_EVSEChargeParameter_isUsed = 0u; + exiFrag->Entry_isUsed = 0u; + exiFrag->ServiceID_isUsed = 0u; + exiFrag->ServiceID_isUsed = 0u; + exiFrag->SalesTariffID_isUsed = 0u; + exiFrag->MeterID_isUsed = 0u; + exiFrag->EVSEMaximumCurrentLimit_isUsed = 0u; + exiFrag->ChargeParameterDiscoveryReq_isUsed = 0u; + exiFrag->amountMultiplier_isUsed = 0u; + exiFrag->ChargeParameterDiscoveryRes_isUsed = 0u; + exiFrag->Transform_isUsed = 0u; + exiFrag->Object_isUsed = 0u; + exiFrag->RCD_isUsed = 0u; + exiFrag->Notification_isUsed = 0u; + exiFrag->startValue_isUsed = 0u; + exiFrag->Modulus_isUsed = 0u; + exiFrag->EVSEMaxCurrent_isUsed = 0u; } #endif /* DEPLOY_DIN_CODEC_FRAGMENT */ -void init_dinCurrentDemandResType(struct dinCurrentDemandResType* dinCurrentDemandResType) { - dinCurrentDemandResType->EVSEMaximumVoltageLimit_isUsed = 0u; - dinCurrentDemandResType->EVSEMaximumCurrentLimit_isUsed = 0u; - dinCurrentDemandResType->EVSEMaximumPowerLimit_isUsed = 0u; -} - -void init_dinCanonicalizationMethodType(struct dinCanonicalizationMethodType* dinCanonicalizationMethodType) { -} - -void init_dinServiceDetailReqType(struct dinServiceDetailReqType* dinServiceDetailReqType) { -} - -void init_dinAC_EVSEStatusType(struct dinAC_EVSEStatusType* dinAC_EVSEStatusType) { -} - -void init_dinSPKIDataType(struct dinSPKIDataType* dinSPKIDataType) { - dinSPKIDataType->SPKISexp.arrayLen = 0u; -} - -void init_dinSessionSetupResType(struct dinSessionSetupResType* dinSessionSetupResType) { - dinSessionSetupResType->DateTimeNow_isUsed = 0u; -} - -void init_dinPGPDataType(struct dinPGPDataType* dinPGPDataType) { - dinPGPDataType->PGPKeyID_isUsed = 0u; - dinPGPDataType->PGPKeyPacket_isUsed = 0u; -} - -void init_dinCableCheckResType(struct dinCableCheckResType* dinCableCheckResType) { -} - -void init_dinChargeParameterDiscoveryResType(struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType) { - dinChargeParameterDiscoveryResType->SASchedules_isUsed = 0u; - dinChargeParameterDiscoveryResType->SAScheduleList_isUsed = 0u; - dinChargeParameterDiscoveryResType->EVSEChargeParameter_isUsed = 0u; - dinChargeParameterDiscoveryResType->AC_EVSEChargeParameter_isUsed = 0u; - dinChargeParameterDiscoveryResType->DC_EVSEChargeParameter_isUsed = 0u; -} - -void init_dinManifestType(struct dinManifestType* dinManifestType) { - dinManifestType->Id_isUsed = 0u; - dinManifestType->Reference.arrayLen = 0u; -} - -void init_dinAC_EVChargeParameterType(struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType) { -} - -void init_dinBodyBaseType(struct dinBodyBaseType* dinBodyBaseType) { -} - -void init_dinDC_EVPowerDeliveryParameterType(struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType) { - dinDC_EVPowerDeliveryParameterType->BulkChargingComplete_isUsed = 0u; -} - -void init_dinCableCheckReqType(struct dinCableCheckReqType* dinCableCheckReqType) { -} - -void init_dinDigestMethodType(struct dinDigestMethodType* dinDigestMethodType) { -} - -void init_dinSalesTariffType(struct dinSalesTariffType* dinSalesTariffType) { - dinSalesTariffType->SalesTariffDescription_isUsed = 0u; - dinSalesTariffType->SalesTariffEntry.arrayLen = 0u; -} - -void init_dinServicePaymentSelectionResType(struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType) { -} - -void init_dinPreChargeReqType(struct dinPreChargeReqType* dinPreChargeReqType) { -} - -void init_dinSAScheduleListType(struct dinSAScheduleListType* dinSAScheduleListType) { - dinSAScheduleListType->SAScheduleTuple.arrayLen = 0u; -} - -void init_dinCertificateChainType(struct dinCertificateChainType* dinCertificateChainType) { - dinCertificateChainType->SubCertificates_isUsed = 0u; -} - -void init_dinSignaturePropertiesType(struct dinSignaturePropertiesType* dinSignaturePropertiesType) { - dinSignaturePropertiesType->Id_isUsed = 0u; - dinSignaturePropertiesType->SignatureProperty.arrayLen = 0u; -} - -void init_dinMessageHeaderType(struct dinMessageHeaderType* dinMessageHeaderType) { - dinMessageHeaderType->Notification_isUsed = 0u; - dinMessageHeaderType->Signature_isUsed = 0u; -} - -void init_dinPreChargeResType(struct dinPreChargeResType* dinPreChargeResType) { -} - -void init_dinMeteringReceiptResType(struct dinMeteringReceiptResType* dinMeteringReceiptResType) { -} - -void init_dinNotificationType(struct dinNotificationType* dinNotificationType) { - dinNotificationType->FaultMsg_isUsed = 0u; -} - -void init_dinContractAuthenticationReqType(struct dinContractAuthenticationReqType* dinContractAuthenticationReqType) { - dinContractAuthenticationReqType->Id_isUsed = 0u; - dinContractAuthenticationReqType->GenChallenge_isUsed = 0u; -} - -void init_dinPhysicalValueType(struct dinPhysicalValueType* dinPhysicalValueType) { - dinPhysicalValueType->Unit_isUsed = 0u; -} - -void init_dinChargingStatusResType(struct dinChargingStatusResType* dinChargingStatusResType) { - dinChargingStatusResType->EVSEMaxCurrent_isUsed = 0u; - dinChargingStatusResType->MeterInfo_isUsed = 0u; -} - -void init_dinDC_EVSEStatusType(struct dinDC_EVSEStatusType* dinDC_EVSEStatusType) { - dinDC_EVSEStatusType->EVSEIsolationStatus_isUsed = 0u; -} - -void init_dinProfileEntryType(struct dinProfileEntryType* dinProfileEntryType) { -} - -void init_dinAC_EVSEChargeParameterType(struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType) { -} - -void init_dinServiceDiscoveryResType(struct dinServiceDiscoveryResType* dinServiceDiscoveryResType) { - dinServiceDiscoveryResType->ServiceList_isUsed = 0u; -} - -void init_dinSignatureType(struct dinSignatureType* dinSignatureType) { - dinSignatureType->Id_isUsed = 0u; - dinSignatureType->KeyInfo_isUsed = 0u; - dinSignatureType->Object.arrayLen = 0u; -} - -void init_dinPaymentOptionsType(struct dinPaymentOptionsType* dinPaymentOptionsType) { - dinPaymentOptionsType->PaymentOption.arrayLen = 0u; -} - -void init_dinParameterType(struct dinParameterType* dinParameterType) { - dinParameterType->boolValue_isUsed = 0u; - dinParameterType->byteValue_isUsed = 0u; - dinParameterType->shortValue_isUsed = 0u; - dinParameterType->intValue_isUsed = 0u; - dinParameterType->physicalValue_isUsed = 0u; - dinParameterType->stringValue_isUsed = 0u; -} - -void init_dinSignaturePropertyType(struct dinSignaturePropertyType* dinSignaturePropertyType) { - dinSignaturePropertyType->Id_isUsed = 0u; -} - -void init_dinEVPowerDeliveryParameterType(struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType) { -} - -void init_dinWeldingDetectionReqType(struct dinWeldingDetectionReqType* dinWeldingDetectionReqType) { -} - -void init_dinTransformsType(struct dinTransformsType* dinTransformsType) { - dinTransformsType->Transform.arrayLen = 0u; -} - -void init_dinServiceType(struct dinServiceType* dinServiceType) { +void init_dinMeteringReceiptReqType(struct dinMeteringReceiptReqType* dinMeteringReceiptReqType) { + dinMeteringReceiptReqType->Id_isUsed = 0u; + dinMeteringReceiptReqType->SAScheduleTupleID_isUsed = 0u; } void init_dinBodyType(struct dinBodyType* dinBodyType) { @@ -633,195 +476,98 @@ void init_dinBodyType(struct dinBodyType* dinBodyType) { dinBodyType->WeldingDetectionRes_isUsed = 0u; } -void init_dinDC_EVStatusType(struct dinDC_EVStatusType* dinDC_EVStatusType) { - dinDC_EVStatusType->EVCabinConditioning_isUsed = 0u; - dinDC_EVStatusType->EVRESSConditioning_isUsed = 0u; +void init_dinSessionSetupReqType(struct dinSessionSetupReqType* dinSessionSetupReqType) { + (void)dinSessionSetupReqType; /* avoid unused warning */ } -void init_dinPMaxScheduleEntryType(struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType) { - dinPMaxScheduleEntryType->TimeInterval_isUsed = 0u; - dinPMaxScheduleEntryType->RelativeTimeInterval_isUsed = 0u; +void init_dinPowerDeliveryResType(struct dinPowerDeliveryResType* dinPowerDeliveryResType) { + dinPowerDeliveryResType->EVSEStatus_isUsed = 0u; + dinPowerDeliveryResType->AC_EVSEStatus_isUsed = 0u; + dinPowerDeliveryResType->DC_EVSEStatus_isUsed = 0u; } -void init_dinPMaxScheduleType(struct dinPMaxScheduleType* dinPMaxScheduleType) { - dinPMaxScheduleType->PMaxScheduleEntry.arrayLen = 0u; +void init_dinServiceDetailResType(struct dinServiceDetailResType* dinServiceDetailResType) { + dinServiceDetailResType->ServiceParameterList_isUsed = 0u; } -void init_dinSelectedServiceType(struct dinSelectedServiceType* dinSelectedServiceType) { - dinSelectedServiceType->ParameterSetID_isUsed = 0u; +void init_dinWeldingDetectionResType(struct dinWeldingDetectionResType* dinWeldingDetectionResType) { + (void)dinWeldingDetectionResType; /* avoid unused warning */ } -void init_dinIntervalType(struct dinIntervalType* dinIntervalType) { +void init_dinContractAuthenticationResType(struct dinContractAuthenticationResType* dinContractAuthenticationResType) { + (void)dinContractAuthenticationResType; /* avoid unused warning */ } -void init_dinCertificateInstallationReqType(struct dinCertificateInstallationReqType* dinCertificateInstallationReqType) { - dinCertificateInstallationReqType->Id_isUsed = 0u; +void init_dinCanonicalizationMethodType(struct dinCanonicalizationMethodType* dinCanonicalizationMethodType) { + dinCanonicalizationMethodType->ANY_isUsed = 0u; } -void init_dinTransformType(struct dinTransformType* dinTransformType) { - dinTransformType->XPath.arrayLen = 0u; +void init_dinSPKIDataType(struct dinSPKIDataType* dinSPKIDataType) { + dinSPKIDataType->SPKISexp.arrayLen = 0u; + dinSPKIDataType->ANY_isUsed = 0u; } -void init_dinKeyValueType(struct dinKeyValueType* dinKeyValueType) { - dinKeyValueType->DSAKeyValue_isUsed = 0u; - dinKeyValueType->RSAKeyValue_isUsed = 0u; -} - -void init_dinRetrievalMethodType(struct dinRetrievalMethodType* dinRetrievalMethodType) { - dinRetrievalMethodType->URI_isUsed = 0u; - dinRetrievalMethodType->Type_isUsed = 0u; - dinRetrievalMethodType->Transforms_isUsed = 0u; -} - -void init_dinEVChargeParameterType(struct dinEVChargeParameterType* dinEVChargeParameterType) { -} - -void init_dinServiceChargeType(struct dinServiceChargeType* dinServiceChargeType) { -} - -void init_dinParameterSetType(struct dinParameterSetType* dinParameterSetType) { - dinParameterSetType->Parameter.arrayLen = 0u; -} - -void init_dinReferenceType(struct dinReferenceType* dinReferenceType) { - dinReferenceType->Id_isUsed = 0u; - dinReferenceType->URI_isUsed = 0u; - dinReferenceType->Type_isUsed = 0u; - dinReferenceType->Transforms_isUsed = 0u; -} - -void init_dinSessionStopResType(struct dinSessionStopResType* dinSessionStopResType) { -} - -void init_dinObjectType(struct dinObjectType* dinObjectType) { - dinObjectType->Id_isUsed = 0u; - dinObjectType->MimeType_isUsed = 0u; - dinObjectType->Encoding_isUsed = 0u; -} - -void init_dinSignatureValueType(struct dinSignatureValueType* dinSignatureValueType) { - dinSignatureValueType->Id_isUsed = 0u; +void init_dinListOfRootCertificateIDsType(struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType) { + dinListOfRootCertificateIDsType->RootCertificateID.arrayLen = 0u; } void init_dinSelectedServiceListType(struct dinSelectedServiceListType* dinSelectedServiceListType) { dinSelectedServiceListType->SelectedService.arrayLen = 0u; } -void init_dinSalesTariffEntryType(struct dinSalesTariffEntryType* dinSalesTariffEntryType) { - dinSalesTariffEntryType->TimeInterval_isUsed = 0u; - dinSalesTariffEntryType->RelativeTimeInterval_isUsed = 0u; - dinSalesTariffEntryType->ConsumptionCost.arrayLen = 0u; +void init_dinCurrentDemandResType(struct dinCurrentDemandResType* dinCurrentDemandResType) { + dinCurrentDemandResType->EVSEMaximumVoltageLimit_isUsed = 0u; + dinCurrentDemandResType->EVSEMaximumCurrentLimit_isUsed = 0u; + dinCurrentDemandResType->EVSEMaximumPowerLimit_isUsed = 0u; } -void init_dinConsumptionCostType(struct dinConsumptionCostType* dinConsumptionCostType) { - dinConsumptionCostType->Cost.arrayLen = 0u; +void init_dinTransformType(struct dinTransformType* dinTransformType) { + dinTransformType->ANY_isUsed = 0u; + dinTransformType->XPath.arrayLen = 0u; } -void init_dinRSAKeyValueType(struct dinRSAKeyValueType* dinRSAKeyValueType) { +void init_dinAC_EVChargeParameterType(struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType) { + (void)dinAC_EVChargeParameterType; /* avoid unused warning */ } -void init_dinMeteringReceiptReqType(struct dinMeteringReceiptReqType* dinMeteringReceiptReqType) { - dinMeteringReceiptReqType->Id_isUsed = 0u; - dinMeteringReceiptReqType->SAScheduleTupleID_isUsed = 0u; +void init_dinX509DataType(struct dinX509DataType* dinX509DataType) { + dinX509DataType->X509IssuerSerial.arrayLen = 0u; + dinX509DataType->X509SKI.arrayLen = 0u; + dinX509DataType->X509SubjectName.arrayLen = 0u; + dinX509DataType->X509Certificate.arrayLen = 0u; + dinX509DataType->X509CRL.arrayLen = 0u; + dinX509DataType->ANY_isUsed = 0u; } -void init_dinSAScheduleTupleType(struct dinSAScheduleTupleType* dinSAScheduleTupleType) { - dinSAScheduleTupleType->SalesTariff_isUsed = 0u; +void init_dinChargingStatusResType(struct dinChargingStatusResType* dinChargingStatusResType) { + dinChargingStatusResType->EVSEMaxCurrent_isUsed = 0u; + dinChargingStatusResType->MeterInfo_isUsed = 0u; } -void init_dinRelativeTimeIntervalType(struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType) { - dinRelativeTimeIntervalType->duration_isUsed = 0u; +void init_dinWeldingDetectionReqType(struct dinWeldingDetectionReqType* dinWeldingDetectionReqType) { + (void)dinWeldingDetectionReqType; /* avoid unused warning */ } -void init_dinChargingProfileType(struct dinChargingProfileType* dinChargingProfileType) { - dinChargingProfileType->ProfileEntry.arrayLen = 0u; +void init_dinSignaturePropertiesType(struct dinSignaturePropertiesType* dinSignaturePropertiesType) { + dinSignaturePropertiesType->Id_isUsed = 0u; + dinSignaturePropertiesType->SignatureProperty.arrayLen = 0u; } -void init_dinCurrentDemandReqType(struct dinCurrentDemandReqType* dinCurrentDemandReqType) { - dinCurrentDemandReqType->EVMaximumVoltageLimit_isUsed = 0u; - dinCurrentDemandReqType->EVMaximumCurrentLimit_isUsed = 0u; - dinCurrentDemandReqType->EVMaximumPowerLimit_isUsed = 0u; - dinCurrentDemandReqType->BulkChargingComplete_isUsed = 0u; - dinCurrentDemandReqType->RemainingTimeToFullSoC_isUsed = 0u; - dinCurrentDemandReqType->RemainingTimeToBulkSoC_isUsed = 0u; +void init_dinContractAuthenticationReqType(struct dinContractAuthenticationReqType* dinContractAuthenticationReqType) { + dinContractAuthenticationReqType->Id_isUsed = 0u; + dinContractAuthenticationReqType->GenChallenge_isUsed = 0u; } -void init_dinKeyInfoType(struct dinKeyInfoType* dinKeyInfoType) { - dinKeyInfoType->Id_isUsed = 0u; - dinKeyInfoType->KeyName.arrayLen = 0u; - dinKeyInfoType->KeyValue.arrayLen = 0u; - dinKeyInfoType->RetrievalMethod.arrayLen = 0u; - dinKeyInfoType->X509Data.arrayLen = 0u; - dinKeyInfoType->PGPData.arrayLen = 0u; - dinKeyInfoType->SPKIData.arrayLen = 0u; - dinKeyInfoType->MgmtData.arrayLen = 0u; +void init_dinDC_EVPowerDeliveryParameterType(struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType) { + dinDC_EVPowerDeliveryParameterType->BulkChargingComplete_isUsed = 0u; } -void init_dinServicePaymentSelectionReqType(struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType) { +void init_dinEVSEChargeParameterType(struct dinEVSEChargeParameterType* dinEVSEChargeParameterType) { + (void)dinEVSEChargeParameterType; /* avoid unused warning */ } -void init_dinContractAuthenticationResType(struct dinContractAuthenticationResType* dinContractAuthenticationResType) { -} - -void init_dinChargingStatusReqType(struct dinChargingStatusReqType* dinChargingStatusReqType) { -} - -void init_dinPaymentDetailsResType(struct dinPaymentDetailsResType* dinPaymentDetailsResType) { -} - -void init_dinSASchedulesType(struct dinSASchedulesType* dinSASchedulesType) { -} - -void init_dinPaymentDetailsReqType(struct dinPaymentDetailsReqType* dinPaymentDetailsReqType) { -} - -void init_dinServiceTagType(struct dinServiceTagType* dinServiceTagType) { - dinServiceTagType->ServiceName_isUsed = 0u; - dinServiceTagType->ServiceScope_isUsed = 0u; -} - -void init_dinChargeParameterDiscoveryReqType(struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType) { - dinChargeParameterDiscoveryReqType->EVChargeParameter_isUsed = 0u; - dinChargeParameterDiscoveryReqType->AC_EVChargeParameter_isUsed = 0u; - dinChargeParameterDiscoveryReqType->DC_EVChargeParameter_isUsed = 0u; -} - -void init_dinServiceParameterListType(struct dinServiceParameterListType* dinServiceParameterListType) { - dinServiceParameterListType->ParameterSet.arrayLen = 0u; -} - -void init_dinEVSEStatusType(struct dinEVSEStatusType* dinEVSEStatusType) { -} - -void init_dinServiceDiscoveryReqType(struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType) { - dinServiceDiscoveryReqType->ServiceScope_isUsed = 0u; - dinServiceDiscoveryReqType->ServiceCategory_isUsed = 0u; -} - -void init_dinWeldingDetectionResType(struct dinWeldingDetectionResType* dinWeldingDetectionResType) { -} - -void init_dinCertificateUpdateReqType(struct dinCertificateUpdateReqType* dinCertificateUpdateReqType) { - dinCertificateUpdateReqType->Id_isUsed = 0u; -} - -void init_dinServiceTagListType(struct dinServiceTagListType* dinServiceTagListType) { - dinServiceTagListType->Service.arrayLen = 0u; -} - -void init_dinSignedInfoType(struct dinSignedInfoType* dinSignedInfoType) { - dinSignedInfoType->Id_isUsed = 0u; - dinSignedInfoType->Reference.arrayLen = 0u; -} - -void init_dinPowerDeliveryReqType(struct dinPowerDeliveryReqType* dinPowerDeliveryReqType) { - dinPowerDeliveryReqType->ChargingProfile_isUsed = 0u; - dinPowerDeliveryReqType->EVPowerDeliveryParameter_isUsed = 0u; - dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter_isUsed = 0u; -} - -void init_dinCostType(struct dinCostType* dinCostType) { - dinCostType->amountMultiplier_isUsed = 0u; +void init_dinCableCheckReqType(struct dinCableCheckReqType* dinCableCheckReqType) { + (void)dinCableCheckReqType; /* avoid unused warning */ } void init_dinDC_EVChargeParameterType(struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType) { @@ -832,31 +578,28 @@ void init_dinDC_EVChargeParameterType(struct dinDC_EVChargeParameterType* dinDC_ dinDC_EVChargeParameterType->BulkSOC_isUsed = 0u; } -void init_dinSubCertificatesType(struct dinSubCertificatesType* dinSubCertificatesType) { - dinSubCertificatesType->Certificate.arrayLen = 0u; +void init_dinSAScheduleListType(struct dinSAScheduleListType* dinSAScheduleListType) { + dinSAScheduleListType->SAScheduleTuple.arrayLen = 0u; } -void init_dinSessionSetupReqType(struct dinSessionSetupReqType* dinSessionSetupReqType) { +void init_dinPMaxScheduleType(struct dinPMaxScheduleType* dinPMaxScheduleType) { + dinPMaxScheduleType->PMaxScheduleEntry.arrayLen = 0u; } -void init_dinAnonType_V2G_Message(struct dinAnonType_V2G_Message* dinAnonType_V2G_Message) { +void init_dinServicePaymentSelectionReqType(struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType) { + (void)dinServicePaymentSelectionReqType; /* avoid unused warning */ } -void init_dinMeterInfoType(struct dinMeterInfoType* dinMeterInfoType) { - dinMeterInfoType->MeterReading_isUsed = 0u; - dinMeterInfoType->SigMeterReading_isUsed = 0u; - dinMeterInfoType->MeterStatus_isUsed = 0u; - dinMeterInfoType->TMeter_isUsed = 0u; +void init_dinRelativeTimeIntervalType(struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType) { + dinRelativeTimeIntervalType->duration_isUsed = 0u; } -void init_dinCertificateInstallationResType(struct dinCertificateInstallationResType* dinCertificateInstallationResType) { +void init_dinEVStatusType(struct dinEVStatusType* dinEVStatusType) { + (void)dinEVStatusType; /* avoid unused warning */ } -void init_dinServiceDetailResType(struct dinServiceDetailResType* dinServiceDetailResType) { - dinServiceDetailResType->ServiceParameterList_isUsed = 0u; -} - -void init_dinX509IssuerSerialType(struct dinX509IssuerSerialType* dinX509IssuerSerialType) { +void init_dinPreChargeResType(struct dinPreChargeResType* dinPreChargeResType) { + (void)dinPreChargeResType; /* avoid unused warning */ } void init_dinDC_EVSEChargeParameterType(struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType) { @@ -865,21 +608,8 @@ void init_dinDC_EVSEChargeParameterType(struct dinDC_EVSEChargeParameterType* di dinDC_EVSEChargeParameterType->EVSEEnergyToBeDelivered_isUsed = 0u; } -void init_dinEVStatusType(struct dinEVStatusType* dinEVStatusType) { -} - -void init_dinX509DataType(struct dinX509DataType* dinX509DataType) { - dinX509DataType->X509IssuerSerial.arrayLen = 0u; - dinX509DataType->X509SKI.arrayLen = 0u; - dinX509DataType->X509SubjectName.arrayLen = 0u; - dinX509DataType->X509Certificate.arrayLen = 0u; - dinX509DataType->X509CRL.arrayLen = 0u; -} - -void init_dinPowerDeliveryResType(struct dinPowerDeliveryResType* dinPowerDeliveryResType) { - dinPowerDeliveryResType->EVSEStatus_isUsed = 0u; - dinPowerDeliveryResType->AC_EVSEStatus_isUsed = 0u; - dinPowerDeliveryResType->DC_EVSEStatus_isUsed = 0u; +void init_dinPaymentDetailsResType(struct dinPaymentDetailsResType* dinPaymentDetailsResType) { + (void)dinPaymentDetailsResType; /* avoid unused warning */ } void init_dinDSAKeyValueType(struct dinDSAKeyValueType* dinDSAKeyValueType) { @@ -891,13 +621,57 @@ void init_dinDSAKeyValueType(struct dinDSAKeyValueType* dinDSAKeyValueType) { dinDSAKeyValueType->PgenCounter_isUsed = 0u; } +void init_dinSASchedulesType(struct dinSASchedulesType* dinSASchedulesType) { + (void)dinSASchedulesType; /* avoid unused warning */ +} + void init_dinCertificateUpdateResType(struct dinCertificateUpdateResType* dinCertificateUpdateResType) { + (void)dinCertificateUpdateResType; /* avoid unused warning */ } -void init_dinSessionStopType(struct dinSessionStopType* dinSessionStopType) { +void init_dinEVChargeParameterType(struct dinEVChargeParameterType* dinEVChargeParameterType) { + (void)dinEVChargeParameterType; /* avoid unused warning */ } -void init_dinEVSEChargeParameterType(struct dinEVSEChargeParameterType* dinEVSEChargeParameterType) { +void init_dinMessageHeaderType(struct dinMessageHeaderType* dinMessageHeaderType) { + dinMessageHeaderType->Notification_isUsed = 0u; + dinMessageHeaderType->Signature_isUsed = 0u; +} + +void init_dinBodyBaseType(struct dinBodyBaseType* dinBodyBaseType) { + (void)dinBodyBaseType; /* avoid unused warning */ +} + +void init_dinKeyValueType(struct dinKeyValueType* dinKeyValueType) { + dinKeyValueType->DSAKeyValue_isUsed = 0u; + dinKeyValueType->RSAKeyValue_isUsed = 0u; + dinKeyValueType->ANY_isUsed = 0u; +} + +void init_dinIntervalType(struct dinIntervalType* dinIntervalType) { + (void)dinIntervalType; /* avoid unused warning */ +} + +void init_dinChargeParameterDiscoveryResType(struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType) { + dinChargeParameterDiscoveryResType->SASchedules_isUsed = 0u; + dinChargeParameterDiscoveryResType->SAScheduleList_isUsed = 0u; + dinChargeParameterDiscoveryResType->EVSEChargeParameter_isUsed = 0u; + dinChargeParameterDiscoveryResType->AC_EVSEChargeParameter_isUsed = 0u; + dinChargeParameterDiscoveryResType->DC_EVSEChargeParameter_isUsed = 0u; +} + +void init_dinPowerDeliveryReqType(struct dinPowerDeliveryReqType* dinPowerDeliveryReqType) { + dinPowerDeliveryReqType->ChargingProfile_isUsed = 0u; + dinPowerDeliveryReqType->EVPowerDeliveryParameter_isUsed = 0u; + dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter_isUsed = 0u; +} + +void init_dinCertificateChainType(struct dinCertificateChainType* dinCertificateChainType) { + dinCertificateChainType->SubCertificates_isUsed = 0u; +} + +void init_dinTransformsType(struct dinTransformsType* dinTransformsType) { + dinTransformsType->Transform.arrayLen = 0u; } void init_dinEntryType(struct dinEntryType* dinEntryType) { @@ -905,12 +679,286 @@ void init_dinEntryType(struct dinEntryType* dinEntryType) { dinEntryType->RelativeTimeInterval_isUsed = 0u; } -void init_dinListOfRootCertificateIDsType(struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType) { - dinListOfRootCertificateIDsType->RootCertificateID.arrayLen = 0u; +void init_dinSessionStopType(struct dinSessionStopType* dinSessionStopType) { + (void)dinSessionStopType; /* avoid unused warning */ +} + +void init_dinServiceDetailReqType(struct dinServiceDetailReqType* dinServiceDetailReqType) { + (void)dinServiceDetailReqType; /* avoid unused warning */ +} + +void init_dinDigestMethodType(struct dinDigestMethodType* dinDigestMethodType) { + dinDigestMethodType->ANY_isUsed = 0u; +} + +void init_dinParameterType(struct dinParameterType* dinParameterType) { + dinParameterType->boolValue_isUsed = 0u; + dinParameterType->byteValue_isUsed = 0u; + dinParameterType->shortValue_isUsed = 0u; + dinParameterType->intValue_isUsed = 0u; + dinParameterType->physicalValue_isUsed = 0u; + dinParameterType->stringValue_isUsed = 0u; +} + +void init_dinChargingStatusReqType(struct dinChargingStatusReqType* dinChargingStatusReqType) { + (void)dinChargingStatusReqType; /* avoid unused warning */ } void init_dinSignatureMethodType(struct dinSignatureMethodType* dinSignatureMethodType) { dinSignatureMethodType->HMACOutputLength_isUsed = 0u; + dinSignatureMethodType->ANY_isUsed = 0u; +} + +void init_dinCertificateInstallationReqType(struct dinCertificateInstallationReqType* dinCertificateInstallationReqType) { + dinCertificateInstallationReqType->Id_isUsed = 0u; +} + +void init_dinSalesTariffEntryType(struct dinSalesTariffEntryType* dinSalesTariffEntryType) { + dinSalesTariffEntryType->TimeInterval_isUsed = 0u; + dinSalesTariffEntryType->RelativeTimeInterval_isUsed = 0u; + dinSalesTariffEntryType->ConsumptionCost.arrayLen = 0u; +} + +void init_dinServiceDiscoveryResType(struct dinServiceDiscoveryResType* dinServiceDiscoveryResType) { + dinServiceDiscoveryResType->ServiceList_isUsed = 0u; +} + +void init_dinParameterSetType(struct dinParameterSetType* dinParameterSetType) { + dinParameterSetType->Parameter.arrayLen = 0u; +} + +void init_dinCurrentDemandReqType(struct dinCurrentDemandReqType* dinCurrentDemandReqType) { + dinCurrentDemandReqType->EVMaximumVoltageLimit_isUsed = 0u; + dinCurrentDemandReqType->EVMaximumCurrentLimit_isUsed = 0u; + dinCurrentDemandReqType->EVMaximumPowerLimit_isUsed = 0u; + dinCurrentDemandReqType->BulkChargingComplete_isUsed = 0u; + dinCurrentDemandReqType->RemainingTimeToFullSoC_isUsed = 0u; + dinCurrentDemandReqType->RemainingTimeToBulkSoC_isUsed = 0u; +} + +void init_dinPreChargeReqType(struct dinPreChargeReqType* dinPreChargeReqType) { + (void)dinPreChargeReqType; /* avoid unused warning */ +} + +void init_dinSignatureType(struct dinSignatureType* dinSignatureType) { + dinSignatureType->Id_isUsed = 0u; + dinSignatureType->KeyInfo_isUsed = 0u; + dinSignatureType->Object.arrayLen = 0u; +} + +void init_dinReferenceType(struct dinReferenceType* dinReferenceType) { + dinReferenceType->Id_isUsed = 0u; + dinReferenceType->URI_isUsed = 0u; + dinReferenceType->Type_isUsed = 0u; + dinReferenceType->Transforms_isUsed = 0u; +} + +void init_dinProfileEntryType(struct dinProfileEntryType* dinProfileEntryType) { + (void)dinProfileEntryType; /* avoid unused warning */ +} + +void init_dinAnonType_V2G_Message(struct dinAnonType_V2G_Message* dinAnonType_V2G_Message) { + (void)dinAnonType_V2G_Message; /* avoid unused warning */ +} + +void init_dinChargeParameterDiscoveryReqType(struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType) { + dinChargeParameterDiscoveryReqType->EVChargeParameter_isUsed = 0u; + dinChargeParameterDiscoveryReqType->AC_EVChargeParameter_isUsed = 0u; + dinChargeParameterDiscoveryReqType->DC_EVChargeParameter_isUsed = 0u; +} + +void init_dinConsumptionCostType(struct dinConsumptionCostType* dinConsumptionCostType) { + dinConsumptionCostType->Cost.arrayLen = 0u; +} + +void init_dinRSAKeyValueType(struct dinRSAKeyValueType* dinRSAKeyValueType) { + (void)dinRSAKeyValueType; /* avoid unused warning */ +} + +void init_dinServiceType(struct dinServiceType* dinServiceType) { + (void)dinServiceType; /* avoid unused warning */ +} + +void init_dinServiceTagListType(struct dinServiceTagListType* dinServiceTagListType) { + dinServiceTagListType->Service.arrayLen = 0u; +} + +void init_dinEVSEStatusType(struct dinEVSEStatusType* dinEVSEStatusType) { + (void)dinEVSEStatusType; /* avoid unused warning */ +} + +void init_dinSessionSetupResType(struct dinSessionSetupResType* dinSessionSetupResType) { + dinSessionSetupResType->DateTimeNow_isUsed = 0u; +} + +void init_dinEVPowerDeliveryParameterType(struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType) { + (void)dinEVPowerDeliveryParameterType; /* avoid unused warning */ +} + +void init_dinX509IssuerSerialType(struct dinX509IssuerSerialType* dinX509IssuerSerialType) { + (void)dinX509IssuerSerialType; /* avoid unused warning */ +} + +void init_dinSelectedServiceType(struct dinSelectedServiceType* dinSelectedServiceType) { + dinSelectedServiceType->ParameterSetID_isUsed = 0u; +} + +void init_dinMeteringReceiptResType(struct dinMeteringReceiptResType* dinMeteringReceiptResType) { + (void)dinMeteringReceiptResType; /* avoid unused warning */ +} + +void init_dinDC_EVStatusType(struct dinDC_EVStatusType* dinDC_EVStatusType) { + dinDC_EVStatusType->EVCabinConditioning_isUsed = 0u; + dinDC_EVStatusType->EVRESSConditioning_isUsed = 0u; +} + +void init_dinPhysicalValueType(struct dinPhysicalValueType* dinPhysicalValueType) { + dinPhysicalValueType->Unit_isUsed = 0u; +} + +void init_dinManifestType(struct dinManifestType* dinManifestType) { + dinManifestType->Id_isUsed = 0u; + dinManifestType->Reference.arrayLen = 0u; +} + +void init_dinPMaxScheduleEntryType(struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType) { + dinPMaxScheduleEntryType->TimeInterval_isUsed = 0u; + dinPMaxScheduleEntryType->RelativeTimeInterval_isUsed = 0u; +} + +void init_dinServiceParameterListType(struct dinServiceParameterListType* dinServiceParameterListType) { + dinServiceParameterListType->ParameterSet.arrayLen = 0u; +} + +void init_dinSignatureValueType(struct dinSignatureValueType* dinSignatureValueType) { + dinSignatureValueType->Id_isUsed = 0u; +} + +void init_dinPaymentOptionsType(struct dinPaymentOptionsType* dinPaymentOptionsType) { + dinPaymentOptionsType->PaymentOption.arrayLen = 0u; +} + +void init_dinServiceTagType(struct dinServiceTagType* dinServiceTagType) { + dinServiceTagType->ServiceName_isUsed = 0u; + dinServiceTagType->ServiceScope_isUsed = 0u; +} + +void init_dinAC_EVSEStatusType(struct dinAC_EVSEStatusType* dinAC_EVSEStatusType) { + (void)dinAC_EVSEStatusType; /* avoid unused warning */ +} + +void init_dinCertificateUpdateReqType(struct dinCertificateUpdateReqType* dinCertificateUpdateReqType) { + dinCertificateUpdateReqType->Id_isUsed = 0u; +} + +void init_dinServicePaymentSelectionResType(struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType) { + (void)dinServicePaymentSelectionResType; /* avoid unused warning */ +} + +void init_dinSAScheduleTupleType(struct dinSAScheduleTupleType* dinSAScheduleTupleType) { + dinSAScheduleTupleType->SalesTariff_isUsed = 0u; +} + +void init_dinChargingProfileType(struct dinChargingProfileType* dinChargingProfileType) { + dinChargingProfileType->ProfileEntry.arrayLen = 0u; +} + +void init_dinServiceDiscoveryReqType(struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType) { + dinServiceDiscoveryReqType->ServiceScope_isUsed = 0u; + dinServiceDiscoveryReqType->ServiceCategory_isUsed = 0u; +} + +void init_dinAC_EVSEChargeParameterType(struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType) { + (void)dinAC_EVSEChargeParameterType; /* avoid unused warning */ +} + +void init_dinKeyInfoType(struct dinKeyInfoType* dinKeyInfoType) { + dinKeyInfoType->Id_isUsed = 0u; + dinKeyInfoType->KeyName.arrayLen = 0u; + dinKeyInfoType->KeyValue.arrayLen = 0u; + dinKeyInfoType->RetrievalMethod.arrayLen = 0u; + dinKeyInfoType->X509Data.arrayLen = 0u; + dinKeyInfoType->PGPData.arrayLen = 0u; + dinKeyInfoType->SPKIData.arrayLen = 0u; + dinKeyInfoType->MgmtData.arrayLen = 0u; + dinKeyInfoType->ANY_isUsed = 0u; +} + +void init_dinPaymentDetailsReqType(struct dinPaymentDetailsReqType* dinPaymentDetailsReqType) { + (void)dinPaymentDetailsReqType; /* avoid unused warning */ +} + +void init_dinCableCheckResType(struct dinCableCheckResType* dinCableCheckResType) { + (void)dinCableCheckResType; /* avoid unused warning */ +} + +void init_dinObjectType(struct dinObjectType* dinObjectType) { + dinObjectType->Id_isUsed = 0u; + dinObjectType->MimeType_isUsed = 0u; + dinObjectType->Encoding_isUsed = 0u; + dinObjectType->ANY_isUsed = 0u; +} + +void init_dinSessionStopResType(struct dinSessionStopResType* dinSessionStopResType) { + (void)dinSessionStopResType; /* avoid unused warning */ +} + +void init_dinSignedInfoType(struct dinSignedInfoType* dinSignedInfoType) { + dinSignedInfoType->Id_isUsed = 0u; + dinSignedInfoType->Reference.arrayLen = 0u; +} + +void init_dinSalesTariffType(struct dinSalesTariffType* dinSalesTariffType) { + dinSalesTariffType->SalesTariffDescription_isUsed = 0u; + dinSalesTariffType->SalesTariffEntry.arrayLen = 0u; +} + +void init_dinCostType(struct dinCostType* dinCostType) { + dinCostType->amountMultiplier_isUsed = 0u; +} + +void init_dinServiceChargeType(struct dinServiceChargeType* dinServiceChargeType) { + (void)dinServiceChargeType; /* avoid unused warning */ +} + +void init_dinDC_EVSEStatusType(struct dinDC_EVSEStatusType* dinDC_EVSEStatusType) { + dinDC_EVSEStatusType->EVSEIsolationStatus_isUsed = 0u; +} + +void init_dinRetrievalMethodType(struct dinRetrievalMethodType* dinRetrievalMethodType) { + dinRetrievalMethodType->URI_isUsed = 0u; + dinRetrievalMethodType->Type_isUsed = 0u; + dinRetrievalMethodType->Transforms_isUsed = 0u; +} + +void init_dinNotificationType(struct dinNotificationType* dinNotificationType) { + dinNotificationType->FaultMsg_isUsed = 0u; +} + +void init_dinPGPDataType(struct dinPGPDataType* dinPGPDataType) { + dinPGPDataType->PGPKeyID_isUsed = 0u; + dinPGPDataType->PGPKeyPacket_isUsed = 0u; + dinPGPDataType->ANY_isUsed = 0u; +} + +void init_dinCertificateInstallationResType(struct dinCertificateInstallationResType* dinCertificateInstallationResType) { + (void)dinCertificateInstallationResType; /* avoid unused warning */ +} + +void init_dinSignaturePropertyType(struct dinSignaturePropertyType* dinSignaturePropertyType) { + dinSignaturePropertyType->Id_isUsed = 0u; + dinSignaturePropertyType->ANY_isUsed = 0u; +} + +void init_dinMeterInfoType(struct dinMeterInfoType* dinMeterInfoType) { + dinMeterInfoType->MeterReading_isUsed = 0u; + dinMeterInfoType->SigMeterReading_isUsed = 0u; + dinMeterInfoType->MeterStatus_isUsed = 0u; + dinMeterInfoType->TMeter_isUsed = 0u; +} + +void init_dinSubCertificatesType(struct dinSubCertificatesType* dinSubCertificatesType) { + dinSubCertificatesType->Certificate.arrayLen = 0u; } diff --git a/src/din/dinEXIDatatypes.h b/src/din/dinEXIDatatypes.h index b24f7ea..d91f715 100644 --- a/src/din/dinEXIDatatypes.h +++ b/src/din/dinEXIDatatypes.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2015 Siemens AG + * Copyright (C) 2007-2017 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,8 +18,8 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.9.3 - * @contact Joerg.Heuer@siemens.com + * @version 2017-09-05 + * @contact Richard.Kuntschke@siemens.com * *Code generated by EXIdizer
*Schema: V2G_CI_MsgDef.xsd
@@ -60,25 +60,57 @@ extern "C" { #define UNION_NO 2 #define SAVE_MEMORY_WITH_UNNAMED_UNION UNION_YES +typedef enum { + dinDC_EVSEStatusCodeType_EVSE_NotReady = 0, + dinDC_EVSEStatusCodeType_EVSE_Ready = 1, + dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2, + dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3, + dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4, + dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5, + dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6, + dinDC_EVSEStatusCodeType_Reserved_8 = 7, + dinDC_EVSEStatusCodeType_Reserved_9 = 8, + dinDC_EVSEStatusCodeType_Reserved_A = 9, + dinDC_EVSEStatusCodeType_Reserved_B = 10, + dinDC_EVSEStatusCodeType_Reserved_C = 11 +} dinDC_EVSEStatusCodeType; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":EVCCID)', derivedBy='EXTENSION'. */ +#define dinSessionSetupReqType_EVCCID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evccIDType is 8 */ +struct dinSessionSetupReqType { + /* element: "urn:iso:15118:2:2010:MsgBody":EVCCID, urn:iso:15118:2:2010:MsgDataTypes,evccIDType */ + struct { + uint8_t bytes[dinSessionSetupReqType_EVCCID_BYTES_SIZE]; + uint16_t bytesLen; + } EVCCID ; +}; + +typedef enum { + dinEVSEProcessingType_Finished = 0, + dinEVSEProcessingType_Ongoing = 1 +} dinEVSEProcessingType; + /* Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##any]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinCanonicalizationMethodType_Algorithm_CHARACTERS_SIZE 65 +#define dinCanonicalizationMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR +#define dinCanonicalizationMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR struct dinCanonicalizationMethodType { /* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */ struct { exi_string_character_t characters[dinCanonicalizationMethodType_Algorithm_CHARACTERS_SIZE]; uint16_t charactersLen; } Algorithm ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ServiceID)', derivedBy='EXTENSION'. */ -struct dinServiceDetailReqType { - /* element: "urn:iso:15118:2:2010:MsgBody":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */ - uint16_t ServiceID ; + /* element: WC[##any] */ + struct { + exi_string_character_t characters[dinCanonicalizationMethodType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; }; /* Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ #define dinSPKIDataType_SPKISexp_BYTES_SIZE 350 #define dinSPKIDataType_SPKISexp_ARRAY_SIZE 1 +#define dinSPKIDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR struct dinSPKIDataType { /* element: "http://www.w3.org/2000/09/xmldsig#":SPKISexp, http://www.w3.org/2001/XMLSchema,base64Binary */ struct { @@ -88,65 +120,53 @@ struct dinSPKIDataType { } array[dinSPKIDataType_SPKISexp_ARRAY_SIZE]; uint16_t arrayLen; } SPKISexp; -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))', derivedBy='RESTRICTION'. */ -#define dinPGPDataType_PGPKeyID_BYTES_SIZE 350 -#define dinPGPDataType_PGPKeyPacket_BYTES_SIZE 350 -struct dinPGPDataType { - /* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyID, http://www.w3.org/2001/XMLSchema,base64Binary */ + /* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */ struct { - uint8_t bytes[dinPGPDataType_PGPKeyID_BYTES_SIZE]; - uint16_t bytesLen; - } PGPKeyID ; - unsigned int PGPKeyID_isUsed:1; - /* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket, http://www.w3.org/2001/XMLSchema,base64Binary */ + exi_string_character_t characters[dinSPKIDataType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ListOfRootCertificateIDsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinListOfRootCertificateIDsType_RootCertificateID_CHARACTERS_SIZE 40 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,rootCertificateIDType is 40 */ +#define dinListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE 5 +struct dinListOfRootCertificateIDsType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID, urn:iso:15118:2:2010:MsgDataTypes,rootCertificateIDType */ struct { - uint8_t bytes[dinPGPDataType_PGPKeyPacket_BYTES_SIZE]; - uint16_t bytesLen; - } PGPKeyPacket ; - unsigned int PGPKeyPacket_isUsed:1; + struct { + exi_string_character_t characters[dinListOfRootCertificateIDsType_RootCertificateID_CHARACTERS_SIZE]; + uint16_t charactersLen; + } array[dinListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE]; + uint16_t arrayLen; + } RootCertificateID; }; -typedef enum { - dinresponseCodeType_OK = 0, - dinresponseCodeType_OK_NewSessionEstablished = 1, - dinresponseCodeType_OK_OldSessionJoined = 2, - dinresponseCodeType_OK_CertificateExpiresSoon = 3, - dinresponseCodeType_FAILED = 4, - dinresponseCodeType_FAILED_SequenceError = 5, - dinresponseCodeType_FAILED_ServiceIDInvalid = 6, - dinresponseCodeType_FAILED_UnknownSession = 7, - dinresponseCodeType_FAILED_ServiceSelectionInvalid = 8, - dinresponseCodeType_FAILED_PaymentSelectionInvalid = 9, - dinresponseCodeType_FAILED_CertificateExpired = 10, - dinresponseCodeType_FAILED_SignatureError = 11, - dinresponseCodeType_FAILED_NoCertificateAvailable = 12, - dinresponseCodeType_FAILED_CertChainError = 13, - dinresponseCodeType_FAILED_ChallengeInvalid = 14, - dinresponseCodeType_FAILED_ContractCanceled = 15, - dinresponseCodeType_FAILED_WrongChargeParameter = 16, - dinresponseCodeType_FAILED_PowerDeliveryNotApplied = 17, - dinresponseCodeType_FAILED_TariffSelectionInvalid = 18, - dinresponseCodeType_FAILED_ChargingProfileInvalid = 19, - dinresponseCodeType_FAILED_EVSEPresentVoltageToLow = 20, - dinresponseCodeType_FAILED_MeteringSignatureNotValid = 21, - dinresponseCodeType_FAILED_WrongEnergyTransferType = 22 -} dinresponseCodeType; - -/* Complex type name='urn:iso:15118:2:2010:MsgDef,BodyBaseType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -struct dinBodyBaseType { - int noContent; /* avoid warning */ -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinDigestMethodType_Algorithm_CHARACTERS_SIZE 65 -struct dinDigestMethodType { +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ +#define dinTransformType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR +#define dinTransformType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinTransformType_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinTransformType_XPath_ARRAY_SIZE 1 +struct dinTransformType { /* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */ struct { - exi_string_character_t characters[dinDigestMethodType_Algorithm_CHARACTERS_SIZE]; + exi_string_character_t characters[dinTransformType_Algorithm_CHARACTERS_SIZE]; uint16_t charactersLen; } Algorithm ; + /* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */ + struct { + exi_string_character_t characters[dinTransformType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; + /* element: "http://www.w3.org/2000/09/xmldsig#":XPath, http://www.w3.org/2001/XMLSchema,string */ + struct { + struct { + exi_string_character_t characters[dinTransformType_XPath_CHARACTERS_SIZE]; + uint16_t charactersLen; + } array[dinTransformType_XPath_ARRAY_SIZE]; + uint16_t arrayLen; + } XPath; }; typedef enum { @@ -164,34 +184,9 @@ typedef enum { dinDC_EVErrorCodeType_NoData = 11 } dinDC_EVErrorCodeType; -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)', derivedBy='EXTENSION'. */ -struct dinServicePaymentSelectionResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; -}; - -typedef enum { - dinEVSENotificationType_None = 0, - dinEVSENotificationType_StopCharging = 1, - dinEVSENotificationType_ReNegotiation = 2 -} dinEVSENotificationType; - -typedef enum { - dincostKindType_relativePricePercentage = 0, - dincostKindType_RenewableGenerationPercentage = 1, - dincostKindType_CarbonDioxideEmission = 2 -} dincostKindType; - -typedef enum { - dinisolationLevelType_Invalid = 0, - dinisolationLevelType_Valid = 1, - dinisolationLevelType_Warning = 2, - dinisolationLevelType_Fault = 3 -} dinisolationLevelType; - /* Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":GenChallenge{0-1})', derivedBy='EXTENSION'. */ -#define dinContractAuthenticationReqType_Id_CHARACTERS_SIZE 50 -#define dinContractAuthenticationReqType_GenChallenge_CHARACTERS_SIZE 50 +#define dinContractAuthenticationReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinContractAuthenticationReqType_GenChallenge_CHARACTERS_SIZE 50 + EXTRA_CHAR struct dinContractAuthenticationReqType { /* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */ struct { @@ -207,217 +202,11 @@ struct dinContractAuthenticationReqType { unsigned int GenChallenge_isUsed:1; }; -typedef enum { - dinvalueType_bool = 0, - dinvalueType_byte = 1, - dinvalueType_short = 2, - dinvalueType_int = 3, - dinvalueType_physicalValue = 4, - dinvalueType_string = 5 -} dinvalueType; - -typedef enum { - dinpaymentOptionType_Contract = 0, - dinpaymentOptionType_ExternalPayment = 1 -} dinpaymentOptionType; - -typedef enum { - dinunitSymbolType_h = 0, - dinunitSymbolType_m = 1, - dinunitSymbolType_s = 2, - dinunitSymbolType_A = 3, - dinunitSymbolType_Ah = 4, - dinunitSymbolType_V = 5, - dinunitSymbolType_VA = 6, - dinunitSymbolType_W = 7, - dinunitSymbolType_W_s = 8, - dinunitSymbolType_Wh = 9 -} dinunitSymbolType; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ProfileEntryType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower)', derivedBy='RESTRICTION'. */ -struct dinProfileEntryType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart, http://www.w3.org/2001/XMLSchema,unsignedInt */ - uint32_t ChargingProfileEntryStart ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower, urn:iso:15118:2:2010:MsgDataTypes,PMaxType */ - int16_t ChargingProfileEntryMaxPower ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PaymentOptionsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PaymentOption{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinPaymentOptionsType_PaymentOption_ARRAY_SIZE 5 -struct dinPaymentOptionsType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":PaymentOption, urn:iso:15118:2:2010:MsgDataTypes,paymentOptionType */ - struct { - dinpaymentOptionType array[dinPaymentOptionsType_PaymentOption_ARRAY_SIZE]; - uint16_t arrayLen; - } PaymentOption; -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ -#define dinSignaturePropertyType_Target_CHARACTERS_SIZE 50 -#define dinSignaturePropertyType_Id_CHARACTERS_SIZE 50 -struct dinSignaturePropertyType { - /* attribute: Target {http://www.w3.org/2001/XMLSchema,anyURI} */ - struct { - exi_string_character_t characters[dinSignaturePropertyType_Target_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Target ; - /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ - struct { - exi_string_character_t characters[dinSignaturePropertyType_Id_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Id ; - unsigned int Id_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVPowerDeliveryParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -struct dinEVPowerDeliveryParameterType { +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +struct dinEVSEChargeParameterType { int noContent; /* avoid warning */ }; -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ -struct dinDC_EVStatusType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVReady, http://www.w3.org/2001/XMLSchema,boolean */ - int EVReady ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning, http://www.w3.org/2001/XMLSchema,boolean */ - int EVCabinConditioning ; - unsigned int EVCabinConditioning_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning, http://www.w3.org/2001/XMLSchema,boolean */ - int EVRESSConditioning ; - unsigned int EVRESSConditioning_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode, urn:iso:15118:2:2010:MsgDataTypes,DC_EVErrorCodeType */ - dinDC_EVErrorCodeType EVErrorCode ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC, urn:iso:15118:2:2010:MsgDataTypes,percentValueType */ - int8_t EVRESSSOC ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID{0-1})', derivedBy='RESTRICTION'. */ -struct dinSelectedServiceType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */ - uint16_t ServiceID ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID, http://www.w3.org/2001/XMLSchema,short */ - int16_t ParameterSetID ; - unsigned int ParameterSetID_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -struct dinIntervalType { - int noContent; /* avoid warning */ -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ -#define dinTransformType_Algorithm_CHARACTERS_SIZE 65 -#define dinTransformType_XPath_CHARACTERS_SIZE 50 -#define dinTransformType_XPath_ARRAY_SIZE 1 -struct dinTransformType { - /* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */ - struct { - exi_string_character_t characters[dinTransformType_Algorithm_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Algorithm ; - /* element: "http://www.w3.org/2000/09/xmldsig#":XPath, http://www.w3.org/2001/XMLSchema,string */ - struct { - struct { - exi_string_character_t characters[dinTransformType_XPath_CHARACTERS_SIZE]; - uint16_t charactersLen; - } array[dinTransformType_XPath_ARRAY_SIZE]; - uint16_t arrayLen; - } XPath; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -struct dinEVChargeParameterType { - int noContent; /* avoid warning */ -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)', derivedBy='EXTENSION'. */ -struct dinSessionStopResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##any])){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ -#define dinObjectType_Id_CHARACTERS_SIZE 50 -#define dinObjectType_MimeType_CHARACTERS_SIZE 50 -#define dinObjectType_Encoding_CHARACTERS_SIZE 50 -struct dinObjectType { - /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ - struct { - exi_string_character_t characters[dinObjectType_Id_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Id ; - unsigned int Id_isUsed:1; - /* attribute: MimeType {http://www.w3.org/2001/XMLSchema,string} */ - struct { - exi_string_character_t characters[dinObjectType_MimeType_CHARACTERS_SIZE]; - uint16_t charactersLen; - } MimeType ; - unsigned int MimeType_isUsed:1; - /* attribute: Encoding {http://www.w3.org/2001/XMLSchema,anyURI} */ - struct { - exi_string_character_t characters[dinObjectType_Encoding_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Encoding ; - unsigned int Encoding_isUsed:1; -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType', base type name='base64Binary', content type='SIMPLE', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ -#define dinSignatureValueType_Id_CHARACTERS_SIZE 50 -#define dinSignatureValueType_CONTENT_BYTES_SIZE 350 -struct dinSignatureValueType { - /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ - struct { - exi_string_character_t characters[dinSignatureValueType_Id_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Id ; - unsigned int Id_isUsed:1; - /* simple content: http://www.w3.org/2001/XMLSchema,base64Binary */ - struct { - uint8_t bytes[dinSignatureValueType_CONTENT_BYTES_SIZE]; - uint16_t bytesLen; - } CONTENT ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SelectedService{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinSelectedServiceListType_SelectedService_ARRAY_SIZE 5 -struct dinSelectedServiceListType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":SelectedService, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID{0-1})', derivedBy='RESTRICTION'. */ - struct { - struct dinSelectedServiceType array[dinSelectedServiceListType_SelectedService_ARRAY_SIZE]; - uint16_t arrayLen; - } SelectedService; -}; - -typedef enum { - dinDC_EVSEStatusCodeType_EVSE_NotReady = 0, - dinDC_EVSEStatusCodeType_EVSE_Ready = 1, - dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2, - dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3, - dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4, - dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5, - dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6, - dinDC_EVSEStatusCodeType_Reserved_8 = 7, - dinDC_EVSEStatusCodeType_Reserved_9 = 8, - dinDC_EVSEStatusCodeType_Reserved_A = 9, - dinDC_EVSEStatusCodeType_Reserved_B = 10, - dinDC_EVSEStatusCodeType_Reserved_C = 11 -} dinDC_EVSEStatusCodeType; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)', derivedBy='RESTRICTION'. */ -#define dinRSAKeyValueType_Modulus_BYTES_SIZE 350 -#define dinRSAKeyValueType_Exponent_BYTES_SIZE 350 -struct dinRSAKeyValueType { - /* element: "http://www.w3.org/2000/09/xmldsig#":Modulus, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */ - struct { - uint8_t bytes[dinRSAKeyValueType_Modulus_BYTES_SIZE]; - uint16_t bytesLen; - } Modulus ; - /* element: "http://www.w3.org/2000/09/xmldsig#":Exponent, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */ - struct { - uint8_t bytes[dinRSAKeyValueType_Exponent_BYTES_SIZE]; - uint16_t bytesLen; - } Exponent ; -}; - /* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType', base type name='IntervalType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})', derivedBy='EXTENSION'. */ struct dinRelativeTimeIntervalType { /* element: "urn:iso:15118:2:2010:MsgDataTypes":start, http://www.w3.org/2001/XMLSchema,unsignedInt */ @@ -427,213 +216,11 @@ struct dinRelativeTimeIntervalType { unsigned int duration_isUsed:1; }; -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ChargingProfileType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinChargingProfileType_ProfileEntry_ARRAY_SIZE 5 -struct dinChargingProfileType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */ - int16_t SAScheduleTupleID ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ProfileEntryType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower)', derivedBy='RESTRICTION'. */ - struct { - struct dinProfileEntryType array[dinChargingProfileType_ProfileEntry_ARRAY_SIZE]; - uint16_t arrayLen; - } ProfileEntry; -}; - -typedef enum { - dinserviceCategoryType_EVCharging = 0, - dinserviceCategoryType_Internet = 1, - dinserviceCategoryType_ContractCertificate = 2, - dinserviceCategoryType_OtherCustom = 3 -} dinserviceCategoryType; - -typedef enum { - dinEVSEProcessingType_Finished = 0, - dinEVSEProcessingType_Ongoing = 1 -} dinEVSEProcessingType; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2010:MsgBody":SelectedServiceList)', derivedBy='EXTENSION'. */ -struct dinServicePaymentSelectionReqType { - /* element: "urn:iso:15118:2:2010:MsgBody":SelectedPaymentOption, urn:iso:15118:2:2010:MsgDataTypes,paymentOptionType */ - dinpaymentOptionType SelectedPaymentOption ; - /* element: "urn:iso:15118:2:2010:MsgBody":SelectedServiceList, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SelectedService{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct dinSelectedServiceListType SelectedServiceList ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)', derivedBy='EXTENSION'. */ -struct dinContractAuthenticationResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEProcessing, urn:iso:15118:2:2010:MsgDataTypes,EVSEProcessingType */ - dinEVSEProcessingType EVSEProcessing ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusReqType', base type name='BodyBaseType', content type='EMPTY', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ -struct dinChargingStatusReqType { - int noContent; /* avoid warning */ -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":GenChallenge,"urn:iso:15118:2:2010:MsgBody":DateTimeNow)', derivedBy='EXTENSION'. */ -#define dinPaymentDetailsResType_GenChallenge_CHARACTERS_SIZE 50 -struct dinPaymentDetailsResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgBody":GenChallenge, urn:iso:15118:2:2010:MsgDataTypes,genChallengeType */ - struct { - exi_string_character_t characters[dinPaymentDetailsResType_GenChallenge_CHARACTERS_SIZE]; - uint16_t charactersLen; - } GenChallenge ; - /* element: "urn:iso:15118:2:2010:MsgBody":DateTimeNow, http://www.w3.org/2001/XMLSchema,long */ - int64_t DateTimeNow ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SASchedulesType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -struct dinSASchedulesType { - int noContent; /* avoid warning */ -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})', derivedBy='RESTRICTION'. */ -#define dinServiceTagType_ServiceName_CHARACTERS_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceNameType is 32 */ -#define dinServiceTagType_ServiceScope_CHARACTERS_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType is 32 */ -struct dinServiceTagType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */ - uint16_t ServiceID ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceName, urn:iso:15118:2:2010:MsgDataTypes,serviceNameType */ - struct { - exi_string_character_t characters[dinServiceTagType_ServiceName_CHARACTERS_SIZE]; - uint16_t charactersLen; - } ServiceName ; - unsigned int ServiceName_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory, urn:iso:15118:2:2010:MsgDataTypes,serviceCategoryType */ - dinserviceCategoryType ServiceCategory ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceScope, urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType */ - struct { - exi_string_character_t characters[dinServiceTagType_ServiceScope_CHARACTERS_SIZE]; - uint16_t charactersLen; - } ServiceScope ; - unsigned int ServiceScope_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEStatusType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -struct dinEVSEStatusType { - int noContent; /* avoid warning */ -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ServiceScope{0-1},"urn:iso:15118:2:2010:MsgBody":ServiceCategory{0-1})', derivedBy='EXTENSION'. */ -#define dinServiceDiscoveryReqType_ServiceScope_CHARACTERS_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType is 32 */ -struct dinServiceDiscoveryReqType { - /* element: "urn:iso:15118:2:2010:MsgBody":ServiceScope, urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType */ - struct { - exi_string_character_t characters[dinServiceDiscoveryReqType_ServiceScope_CHARACTERS_SIZE]; - uint16_t charactersLen; - } ServiceScope ; - unsigned int ServiceScope_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgBody":ServiceCategory, urn:iso:15118:2:2010:MsgDataTypes,serviceCategoryType */ - dinserviceCategoryType ServiceCategory ; - unsigned int ServiceCategory_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":costKind,"urn:iso:15118:2:2010:MsgDataTypes":amount,"urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier{0-1})', derivedBy='RESTRICTION'. */ -struct dinCostType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":costKind, urn:iso:15118:2:2010:MsgDataTypes,costKindType */ - dincostKindType costKind ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":amount, http://www.w3.org/2001/XMLSchema,unsignedInt */ - uint32_t amount ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier, urn:iso:15118:2:2010:MsgDataTypes,unitMultiplierType */ - int8_t amountMultiplier ; - unsigned int amountMultiplier_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SubCertificatesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinSubCertificatesType_Certificate_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */ -#define dinSubCertificatesType_Certificate_ARRAY_SIZE 5 -struct dinSubCertificatesType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":Certificate, urn:iso:15118:2:2010:MsgDataTypes,certificateType */ - struct { - struct { - uint8_t bytes[dinSubCertificatesType_Certificate_BYTES_SIZE]; - uint16_t bytesLen; - } array[dinSubCertificatesType_Certificate_ARRAY_SIZE]; - uint16_t arrayLen; - } Certificate; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":EVCCID)', derivedBy='EXTENSION'. */ -#define dinSessionSetupReqType_EVCCID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evccIDType is 8 */ -struct dinSessionSetupReqType { - /* element: "urn:iso:15118:2:2010:MsgBody":EVCCID, urn:iso:15118:2:2010:MsgDataTypes,evccIDType */ - struct { - uint8_t bytes[dinSessionSetupReqType_EVCCID_BYTES_SIZE]; - uint16_t bytesLen; - } EVCCID ; -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)', derivedBy='RESTRICTION'. */ -#define dinX509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE 50 -struct dinX509IssuerSerialType { - /* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerName, http://www.w3.org/2001/XMLSchema,string */ - struct { - exi_string_character_t characters[dinX509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE]; - uint16_t charactersLen; - } X509IssuerName ; - /* element: "http://www.w3.org/2000/09/xmldsig#":X509SerialNumber, http://www.w3.org/2001/XMLSchema,integer */ - int64_t X509SerialNumber ; -}; - /* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVStatusType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ struct dinEVStatusType { int noContent; /* avoid warning */ }; -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ -#define dinX509DataType_X509IssuerSerial_ARRAY_SIZE 1 -#define dinX509DataType_X509SKI_BYTES_SIZE 350 -#define dinX509DataType_X509SKI_ARRAY_SIZE 1 -#define dinX509DataType_X509SubjectName_CHARACTERS_SIZE 50 -#define dinX509DataType_X509SubjectName_ARRAY_SIZE 1 -#define dinX509DataType_X509Certificate_BYTES_SIZE 350 -#define dinX509DataType_X509Certificate_ARRAY_SIZE 1 -#define dinX509DataType_X509CRL_BYTES_SIZE 350 -#define dinX509DataType_X509CRL_ARRAY_SIZE 1 -struct dinX509DataType { - /* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)', derivedBy='RESTRICTION'. */ - struct { - struct dinX509IssuerSerialType array[dinX509DataType_X509IssuerSerial_ARRAY_SIZE]; - uint16_t arrayLen; - } X509IssuerSerial; - /* element: "http://www.w3.org/2000/09/xmldsig#":X509SKI, http://www.w3.org/2001/XMLSchema,base64Binary */ - struct { - struct { - uint8_t bytes[dinX509DataType_X509SKI_BYTES_SIZE]; - uint16_t bytesLen; - } array[dinX509DataType_X509SKI_ARRAY_SIZE]; - uint16_t arrayLen; - } X509SKI; - /* element: "http://www.w3.org/2000/09/xmldsig#":X509SubjectName, http://www.w3.org/2001/XMLSchema,string */ - struct { - struct { - exi_string_character_t characters[dinX509DataType_X509SubjectName_CHARACTERS_SIZE]; - uint16_t charactersLen; - } array[dinX509DataType_X509SubjectName_ARRAY_SIZE]; - uint16_t arrayLen; - } X509SubjectName; - /* element: "http://www.w3.org/2000/09/xmldsig#":X509Certificate, http://www.w3.org/2001/XMLSchema,base64Binary */ - struct { - struct { - uint8_t bytes[dinX509DataType_X509Certificate_BYTES_SIZE]; - uint16_t bytesLen; - } array[dinX509DataType_X509Certificate_ARRAY_SIZE]; - uint16_t arrayLen; - } X509Certificate; - /* element: "http://www.w3.org/2000/09/xmldsig#":X509CRL, http://www.w3.org/2001/XMLSchema,base64Binary */ - struct { - struct { - uint8_t bytes[dinX509DataType_X509CRL_BYTES_SIZE]; - uint16_t bytesLen; - } array[dinX509DataType_X509CRL_ARRAY_SIZE]; - uint16_t arrayLen; - } X509CRL; -}; - /* Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})', derivedBy='RESTRICTION'. */ #define dinDSAKeyValueType_P_BYTES_SIZE 350 #define dinDSAKeyValueType_Q_BYTES_SIZE 350 @@ -686,43 +273,48 @@ struct dinDSAKeyValueType { unsigned int PgenCounter_isUsed:1; }; -typedef enum { - dinEVRequestedEnergyTransferType_AC_single_phase_core = 0, - dinEVRequestedEnergyTransferType_AC_three_phase_core = 1, - dinEVRequestedEnergyTransferType_DC_core = 2, - dinEVRequestedEnergyTransferType_DC_extended = 3, - dinEVRequestedEnergyTransferType_DC_combo_core = 4, - dinEVRequestedEnergyTransferType_DC_unique = 5 -} dinEVRequestedEnergyTransferType; +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SASchedulesType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +struct dinSASchedulesType { + int noContent; /* avoid warning */ +}; -/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopType', base type name='BodyBaseType', content type='EMPTY', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ -struct dinSessionStopType { +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +struct dinEVChargeParameterType { + int noContent; /* avoid warning */ +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDef,BodyBaseType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +struct dinBodyBaseType { int noContent; /* avoid warning */ }; typedef enum { - dinfaultCodeType_ParsingError = 0, - dinfaultCodeType_NoTLSRootCertificatAvailable = 1, - dinfaultCodeType_UnknownError = 2 -} dinfaultCodeType; + dinunitSymbolType_h = 0, + dinunitSymbolType_m = 1, + dinunitSymbolType_s = 2, + dinunitSymbolType_A = 3, + dinunitSymbolType_Ah = 4, + dinunitSymbolType_V = 5, + dinunitSymbolType_VA = 6, + dinunitSymbolType_W = 7, + dinunitSymbolType_W_s = 8, + dinunitSymbolType_Wh = 9 +} dinunitSymbolType; -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -struct dinEVSEChargeParameterType { +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +struct dinIntervalType { int noContent; /* avoid warning */ }; -typedef enum { - dinEVSESupportedEnergyTransferType_AC_single_phase_core = 0, - dinEVSESupportedEnergyTransferType_AC_three_phase_core = 1, - dinEVSESupportedEnergyTransferType_DC_core = 2, - dinEVSESupportedEnergyTransferType_DC_extended = 3, - dinEVSESupportedEnergyTransferType_DC_combo_core = 4, - dinEVSESupportedEnergyTransferType_DC_dual = 5, - dinEVSESupportedEnergyTransferType_AC_core1p_DC_extended = 6, - dinEVSESupportedEnergyTransferType_AC_single_DC_core = 7, - dinEVSESupportedEnergyTransferType_AC_single_phase_three_phase_core_DC_extended = 8, - dinEVSESupportedEnergyTransferType_AC_core3p_DC_extended = 9 -} dinEVSESupportedEnergyTransferType; +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinTransformsType_Transform_ARRAY_SIZE 1 +struct dinTransformsType { + /* element: "http://www.w3.org/2000/09/xmldsig#":Transform, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ + struct { + struct dinTransformType array[dinTransformsType_Transform_ARRAY_SIZE]; + uint16_t arrayLen; + } Transform; +}; /* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EntryType', base type name='anyType', content type='ELEMENT', isAbstract='true', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval)', derivedBy='RESTRICTION'. */ struct dinEntryType { @@ -741,22 +333,51 @@ struct dinEntryType { unsigned int RelativeTimeInterval_isUsed:1; }; -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ListOfRootCertificateIDsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinListOfRootCertificateIDsType_RootCertificateID_CHARACTERS_SIZE 40 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,rootCertificateIDType is 40 */ -#define dinListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE 5 -struct dinListOfRootCertificateIDsType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID, urn:iso:15118:2:2010:MsgDataTypes,rootCertificateIDType */ +/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopType', base type name='BodyBaseType', content type='EMPTY', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ +struct dinSessionStopType { + int noContent; /* avoid warning */ +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ServiceID)', derivedBy='EXTENSION'. */ +struct dinServiceDetailReqType { + /* element: "urn:iso:15118:2:2010:MsgBody":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */ + uint16_t ServiceID ; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinDigestMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR +#define dinDigestMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinDigestMethodType { + /* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */ struct { - struct { - exi_string_character_t characters[dinListOfRootCertificateIDsType_RootCertificateID_CHARACTERS_SIZE]; - uint16_t charactersLen; - } array[dinListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE]; - uint16_t arrayLen; - } RootCertificateID; + exi_string_character_t characters[dinDigestMethodType_Algorithm_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Algorithm ; + /* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */ + struct { + exi_string_character_t characters[dinDigestMethodType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; +}; + +typedef enum { + dinvalueType_bool = 0, + dinvalueType_byte = 1, + dinvalueType_short = 2, + dinvalueType_int = 3, + dinvalueType_physicalValue = 4, + dinvalueType_string = 5 +} dinvalueType; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusReqType', base type name='BodyBaseType', content type='EMPTY', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ +struct dinChargingStatusReqType { + int noContent; /* avoid warning */ }; /* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinSignatureMethodType_Algorithm_CHARACTERS_SIZE 65 +#define dinSignatureMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR +#define dinSignatureMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR struct dinSignatureMethodType { /* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */ struct { @@ -766,223 +387,16 @@ struct dinSignatureMethodType { /* element: "http://www.w3.org/2000/09/xmldsig#":HMACOutputLength, http://www.w3.org/2000/09/xmldsig#,HMACOutputLengthType */ int64_t HMACOutputLength ; unsigned int HMACOutputLength_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ -struct dinAC_EVSEStatusType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed, http://www.w3.org/2001/XMLSchema,boolean */ - int PowerSwitchClosed ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":RCD, http://www.w3.org/2001/XMLSchema,boolean */ - int RCD ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedInt */ - uint32_t NotificationMaxDelay ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSENotification, urn:iso:15118:2:2010:MsgDataTypes,EVSENotificationType */ - dinEVSENotificationType EVSENotification ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":DateTimeNow{0-1})', derivedBy='EXTENSION'. */ -#define dinSessionSetupResType_EVSEID_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evseIDType is 32 */ -struct dinSessionSetupResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEID, urn:iso:15118:2:2010:MsgDataTypes,evseIDType */ + /* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */ struct { - uint8_t bytes[dinSessionSetupResType_EVSEID_BYTES_SIZE]; - uint16_t bytesLen; - } EVSEID ; - /* element: "urn:iso:15118:2:2010:MsgBody":DateTimeNow, http://www.w3.org/2001/XMLSchema,long */ - int64_t DateTimeNow ; - unsigned int DateTimeNow_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVPowerDeliveryParameterType', base type name='EVPowerDeliveryParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete)', derivedBy='EXTENSION'. */ -struct dinDC_EVPowerDeliveryParameterType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ - struct dinDC_EVStatusType DC_EVStatus ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */ - int BulkChargingComplete ; - unsigned int BulkChargingComplete_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */ - int ChargingComplete ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)', derivedBy='EXTENSION'. */ -struct dinCableCheckReqType { - /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ - struct dinDC_EVStatusType DC_EVStatus ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})', derivedBy='RESTRICTION'. */ -#define dinCertificateChainType_Certificate_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */ -struct dinCertificateChainType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":Certificate, urn:iso:15118:2:2010:MsgDataTypes,certificateType */ - struct { - uint8_t bytes[dinCertificateChainType_Certificate_BYTES_SIZE]; - uint16_t bytesLen; - } Certificate ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":SubCertificates, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SubCertificatesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct dinSubCertificatesType SubCertificates ; - unsigned int SubCertificates_isUsed:1; -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertiesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SignatureProperty{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinSignaturePropertiesType_Id_CHARACTERS_SIZE 50 -#define dinSignaturePropertiesType_SignatureProperty_ARRAY_SIZE 1 -struct dinSignaturePropertiesType { - /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ - struct { - exi_string_character_t characters[dinSignaturePropertiesType_Id_CHARACTERS_SIZE]; + exi_string_character_t characters[dinSignatureMethodType_ANY_CHARACTERS_SIZE]; uint16_t charactersLen; - } Id ; - unsigned int Id_isUsed:1; - /* element: "http://www.w3.org/2000/09/xmldsig#":SignatureProperty, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ - struct { - struct dinSignaturePropertyType array[dinSignaturePropertiesType_SignatureProperty_ARRAY_SIZE]; - uint16_t arrayLen; - } SignatureProperty; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)', derivedBy='EXTENSION'. */ -struct dinMeteringReceiptResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ - struct dinAC_EVSEStatusType AC_EVSEStatus ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,NotificationType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":FaultCode,"urn:iso:15118:2:2010:MsgDataTypes":FaultMsg{0-1})', derivedBy='RESTRICTION'. */ -#define dinNotificationType_FaultMsg_CHARACTERS_SIZE 64 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,faultMsgType is 64 */ -struct dinNotificationType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":FaultCode, urn:iso:15118:2:2010:MsgDataTypes,faultCodeType */ - dinfaultCodeType FaultCode ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":FaultMsg, urn:iso:15118:2:2010:MsgDataTypes,faultMsgType */ - struct { - exi_string_character_t characters[dinNotificationType_FaultMsg_CHARACTERS_SIZE]; - uint16_t charactersLen; - } FaultMsg ; - unsigned int FaultMsg_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ -struct dinPhysicalValueType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":Multiplier, urn:iso:15118:2:2010:MsgDataTypes,unitMultiplierType */ - int8_t Multiplier ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":Unit, urn:iso:15118:2:2010:MsgDataTypes,unitSymbolType */ - dinunitSymbolType Unit ; - unsigned int Unit_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":Value, http://www.w3.org/2001/XMLSchema,short */ - int16_t Value ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ -struct dinDC_EVSEStatusType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus, urn:iso:15118:2:2010:MsgDataTypes,isolationLevelType */ - dinisolationLevelType EVSEIsolationStatus ; - unsigned int EVSEIsolationStatus_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode, urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusCodeType */ - dinDC_EVSEStatusCodeType EVSEStatusCode ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedInt */ - uint32_t NotificationMaxDelay ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSENotification, urn:iso:15118:2:2010:MsgDataTypes,EVSENotificationType */ - dinEVSENotificationType EVSENotification ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEChargeParameterType', base type name='EVSEChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinCurrent)', derivedBy='EXTENSION'. */ -struct dinAC_EVSEChargeParameterType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ - struct dinAC_EVSEStatusType AC_EVSEStatus ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMaxVoltage ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMaxCurrent ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMinCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMinCurrent ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":boolValue|"urn:iso:15118:2:2010:MsgDataTypes":byteValue|"urn:iso:15118:2:2010:MsgDataTypes":shortValue|"urn:iso:15118:2:2010:MsgDataTypes":intValue|"urn:iso:15118:2:2010:MsgDataTypes":physicalValue|"urn:iso:15118:2:2010:MsgDataTypes":stringValue)', derivedBy='RESTRICTION'. */ -#define dinParameterType_Name_CHARACTERS_SIZE 50 -#define dinParameterType_stringValue_CHARACTERS_SIZE 50 -struct dinParameterType { - /* attribute: Name {http://www.w3.org/2001/XMLSchema,string} */ - struct { - exi_string_character_t characters[dinParameterType_Name_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Name ; - /* attribute: ValueType {urn:iso:15118:2:2010:MsgDataTypes,valueType} */ - dinvalueType ValueType ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":boolValue, http://www.w3.org/2001/XMLSchema,boolean */ - int boolValue ; - unsigned int boolValue_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":byteValue, http://www.w3.org/2001/XMLSchema,byte */ - int8_t byteValue ; - unsigned int byteValue_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":shortValue, http://www.w3.org/2001/XMLSchema,short */ - int16_t shortValue ; - unsigned int shortValue_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":intValue, http://www.w3.org/2001/XMLSchema,int */ - int32_t intValue ; - unsigned int intValue_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":physicalValue, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType physicalValue ; - unsigned int physicalValue_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":stringValue, http://www.w3.org/2001/XMLSchema,string */ - struct { - exi_string_character_t characters[dinParameterType_stringValue_CHARACTERS_SIZE]; - uint16_t charactersLen; - } stringValue ; - unsigned int stringValue_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)', derivedBy='EXTENSION'. */ -struct dinWeldingDetectionReqType { - /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ - struct dinDC_EVStatusType DC_EVStatus ; -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinTransformsType_Transform_ARRAY_SIZE 1 -struct dinTransformsType { - /* element: "http://www.w3.org/2000/09/xmldsig#":Transform, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ - struct { - struct dinTransformType array[dinTransformsType_Transform_ARRAY_SIZE]; - uint16_t arrayLen; - } Transform; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService)', derivedBy='RESTRICTION'. */ -struct dinServiceType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceTag, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})', derivedBy='RESTRICTION'. */ - struct dinServiceTagType ServiceTag ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":FreeService, http://www.w3.org/2001/XMLSchema,boolean */ - int FreeService ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":PMax))', derivedBy='EXTENSION'. */ -struct dinPMaxScheduleEntryType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ - struct dinIntervalType TimeInterval ; - unsigned int TimeInterval_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType', base type name='IntervalType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})', derivedBy='EXTENSION'. */ - struct dinRelativeTimeIntervalType RelativeTimeInterval ; - unsigned int RelativeTimeInterval_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":PMax, urn:iso:15118:2:2010:MsgDataTypes,PMaxType */ - int16_t PMax ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinPMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE 5 -struct dinPMaxScheduleType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */ - int16_t PMaxScheduleID ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":PMax))', derivedBy='EXTENSION'. */ - struct { - struct dinPMaxScheduleEntryType array[dinPMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE]; - uint16_t arrayLen; - } PMaxScheduleEntry; + } ANY ; + unsigned int ANY_isUsed:1; }; /* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":OEMProvisioningCert,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)', derivedBy='EXTENSION'. */ -#define dinCertificateInstallationReqType_Id_CHARACTERS_SIZE 50 +#define dinCertificateInstallationReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR #define dinCertificateInstallationReqType_OEMProvisioningCert_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */ #define dinCertificateInstallationReqType_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */ struct dinCertificateInstallationReqType { @@ -1006,51 +420,37 @@ struct dinCertificateInstallationReqType { } DHParams ; }; -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))', derivedBy='RESTRICTION'. */ -struct dinKeyValueType { - /* element: "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})', derivedBy='RESTRICTION'. */ - struct dinDSAKeyValueType DSAKeyValue ; - unsigned int DSAKeyValue_isUsed:1; - /* element: "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)', derivedBy='RESTRICTION'. */ - struct dinRSAKeyValueType RSAKeyValue ; - unsigned int RSAKeyValue_isUsed:1; -}; +typedef enum { + dinEVRequestedEnergyTransferType_AC_single_phase_core = 0, + dinEVRequestedEnergyTransferType_AC_three_phase_core = 1, + dinEVRequestedEnergyTransferType_DC_core = 2, + dinEVRequestedEnergyTransferType_DC_extended = 3, + dinEVRequestedEnergyTransferType_DC_combo_core = 4, + dinEVRequestedEnergyTransferType_DC_unique = 5 +} dinEVRequestedEnergyTransferType; -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})', derivedBy='RESTRICTION'. */ -#define dinRetrievalMethodType_URI_CHARACTERS_SIZE 50 -#define dinRetrievalMethodType_Type_CHARACTERS_SIZE 50 -struct dinRetrievalMethodType { - /* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */ - struct { - exi_string_character_t characters[dinRetrievalMethodType_URI_CHARACTERS_SIZE]; - uint16_t charactersLen; - } URI ; - unsigned int URI_isUsed:1; - /* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */ - struct { - exi_string_character_t characters[dinRetrievalMethodType_Type_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Type ; - unsigned int Type_isUsed:1; - /* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct dinTransformsType Transforms ; - unsigned int Transforms_isUsed:1; -}; +typedef enum { + dinpaymentOptionType_Contract = 0, + dinpaymentOptionType_ExternalPayment = 1 +} dinpaymentOptionType; -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceChargeType', base type name='ServiceType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService),("urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType))', derivedBy='EXTENSION'. */ -struct dinServiceChargeType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceTag, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})', derivedBy='RESTRICTION'. */ - struct dinServiceTagType ServiceTag ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":FreeService, http://www.w3.org/2001/XMLSchema,boolean */ - int FreeService ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType, urn:iso:15118:2:2010:MsgDataTypes,EVSESupportedEnergyTransferType */ - dinEVSESupportedEnergyTransferType EnergyTransferType ; -}; +typedef enum { + dinEVSESupportedEnergyTransferType_AC_single_phase_core = 0, + dinEVSESupportedEnergyTransferType_AC_three_phase_core = 1, + dinEVSESupportedEnergyTransferType_DC_core = 2, + dinEVSESupportedEnergyTransferType_DC_extended = 3, + dinEVSESupportedEnergyTransferType_DC_combo_core = 4, + dinEVSESupportedEnergyTransferType_DC_dual = 5, + dinEVSESupportedEnergyTransferType_AC_core1p_DC_extended = 6, + dinEVSESupportedEnergyTransferType_AC_single_DC_core = 7, + dinEVSESupportedEnergyTransferType_AC_single_phase_three_phase_core_DC_extended = 8, + dinEVSESupportedEnergyTransferType_AC_core3p_DC_extended = 9 +} dinEVSESupportedEnergyTransferType; /* Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)', derivedBy='RESTRICTION'. */ -#define dinReferenceType_Id_CHARACTERS_SIZE 50 -#define dinReferenceType_URI_CHARACTERS_SIZE 50 -#define dinReferenceType_Type_CHARACTERS_SIZE 50 +#define dinReferenceType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinReferenceType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinReferenceType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR #define dinReferenceType_DigestValue_BYTES_SIZE 350 struct dinReferenceType { /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ @@ -1083,6 +483,890 @@ struct dinReferenceType { } DigestValue ; }; +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ProfileEntryType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower)', derivedBy='RESTRICTION'. */ +struct dinProfileEntryType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart, http://www.w3.org/2001/XMLSchema,unsignedInt */ + uint32_t ChargingProfileEntryStart ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower, urn:iso:15118:2:2010:MsgDataTypes,PMaxType */ + int16_t ChargingProfileEntryMaxPower ; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)', derivedBy='RESTRICTION'. */ +#define dinRSAKeyValueType_Modulus_BYTES_SIZE 350 +#define dinRSAKeyValueType_Exponent_BYTES_SIZE 350 +struct dinRSAKeyValueType { + /* element: "http://www.w3.org/2000/09/xmldsig#":Modulus, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */ + struct { + uint8_t bytes[dinRSAKeyValueType_Modulus_BYTES_SIZE]; + uint16_t bytesLen; + } Modulus ; + /* element: "http://www.w3.org/2000/09/xmldsig#":Exponent, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */ + struct { + uint8_t bytes[dinRSAKeyValueType_Exponent_BYTES_SIZE]; + uint16_t bytesLen; + } Exponent ; +}; + +typedef enum { + dinfaultCodeType_ParsingError = 0, + dinfaultCodeType_NoTLSRootCertificatAvailable = 1, + dinfaultCodeType_UnknownError = 2 +} dinfaultCodeType; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEStatusType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +struct dinEVSEStatusType { + int noContent; /* avoid warning */ +}; + +typedef enum { + dinserviceCategoryType_EVCharging = 0, + dinserviceCategoryType_Internet = 1, + dinserviceCategoryType_ContractCertificate = 2, + dinserviceCategoryType_OtherCustom = 3 +} dinserviceCategoryType; + +typedef enum { + dinEVSENotificationType_None = 0, + dinEVSENotificationType_StopCharging = 1, + dinEVSENotificationType_ReNegotiation = 2 +} dinEVSENotificationType; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVPowerDeliveryParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +struct dinEVPowerDeliveryParameterType { + int noContent; /* avoid warning */ +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)', derivedBy='RESTRICTION'. */ +#define dinX509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinX509IssuerSerialType { + /* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerName, http://www.w3.org/2001/XMLSchema,string */ + struct { + exi_string_character_t characters[dinX509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE]; + uint16_t charactersLen; + } X509IssuerName ; + /* element: "http://www.w3.org/2000/09/xmldsig#":X509SerialNumber, http://www.w3.org/2001/XMLSchema,integer */ + int64_t X509SerialNumber ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID{0-1})', derivedBy='RESTRICTION'. */ +struct dinSelectedServiceType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */ + uint16_t ServiceID ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID, http://www.w3.org/2001/XMLSchema,short */ + int16_t ParameterSetID ; + unsigned int ParameterSetID_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ +struct dinDC_EVStatusType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVReady, http://www.w3.org/2001/XMLSchema,boolean */ + int EVReady ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning, http://www.w3.org/2001/XMLSchema,boolean */ + int EVCabinConditioning ; + unsigned int EVCabinConditioning_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning, http://www.w3.org/2001/XMLSchema,boolean */ + int EVRESSConditioning ; + unsigned int EVRESSConditioning_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode, urn:iso:15118:2:2010:MsgDataTypes,DC_EVErrorCodeType */ + dinDC_EVErrorCodeType EVErrorCode ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC, urn:iso:15118:2:2010:MsgDataTypes,percentValueType */ + int8_t EVRESSSOC ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ +struct dinPhysicalValueType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":Multiplier, urn:iso:15118:2:2010:MsgDataTypes,unitMultiplierType */ + int8_t Multiplier ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":Unit, urn:iso:15118:2:2010:MsgDataTypes,unitSymbolType */ + dinunitSymbolType Unit ; + unsigned int Unit_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":Value, http://www.w3.org/2001/XMLSchema,short */ + int16_t Value ; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ManifestType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinManifestType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinManifestType_Reference_ARRAY_SIZE 1 +struct dinManifestType { + /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ + struct { + exi_string_character_t characters[dinManifestType_Id_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Id ; + unsigned int Id_isUsed:1; + /* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)', derivedBy='RESTRICTION'. */ + struct { + struct dinReferenceType array[dinManifestType_Reference_ARRAY_SIZE]; + uint16_t arrayLen; + } Reference; +}; + +typedef enum { + dincostKindType_relativePricePercentage = 0, + dincostKindType_RenewableGenerationPercentage = 1, + dincostKindType_CarbonDioxideEmission = 2 +} dincostKindType; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":PMax))', derivedBy='EXTENSION'. */ +struct dinPMaxScheduleEntryType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ + struct dinIntervalType TimeInterval ; + unsigned int TimeInterval_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType', base type name='IntervalType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})', derivedBy='EXTENSION'. */ + struct dinRelativeTimeIntervalType RelativeTimeInterval ; + unsigned int RelativeTimeInterval_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":PMax, urn:iso:15118:2:2010:MsgDataTypes,PMaxType */ + int16_t PMax ; +}; + +typedef enum { + dinisolationLevelType_Invalid = 0, + dinisolationLevelType_Valid = 1, + dinisolationLevelType_Warning = 2, + dinisolationLevelType_Fault = 3 +} dinisolationLevelType; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType', base type name='base64Binary', content type='SIMPLE', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ +#define dinSignatureValueType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinSignatureValueType_CONTENT_BYTES_SIZE 350 +struct dinSignatureValueType { + /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ + struct { + exi_string_character_t characters[dinSignatureValueType_Id_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Id ; + unsigned int Id_isUsed:1; + /* simple content: http://www.w3.org/2001/XMLSchema,base64Binary */ + struct { + uint8_t bytes[dinSignatureValueType_CONTENT_BYTES_SIZE]; + uint16_t bytesLen; + } CONTENT ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PaymentOptionsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PaymentOption{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinPaymentOptionsType_PaymentOption_ARRAY_SIZE 5 +struct dinPaymentOptionsType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":PaymentOption, urn:iso:15118:2:2010:MsgDataTypes,paymentOptionType */ + struct { + dinpaymentOptionType array[dinPaymentOptionsType_PaymentOption_ARRAY_SIZE]; + uint16_t arrayLen; + } PaymentOption; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})', derivedBy='RESTRICTION'. */ +#define dinServiceTagType_ServiceName_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceNameType is 32 */ +#define dinServiceTagType_ServiceScope_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType is 32 */ +struct dinServiceTagType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */ + uint16_t ServiceID ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceName, urn:iso:15118:2:2010:MsgDataTypes,serviceNameType */ + struct { + exi_string_character_t characters[dinServiceTagType_ServiceName_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ServiceName ; + unsigned int ServiceName_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory, urn:iso:15118:2:2010:MsgDataTypes,serviceCategoryType */ + dinserviceCategoryType ServiceCategory ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceScope, urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType */ + struct { + exi_string_character_t characters[dinServiceTagType_ServiceScope_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ServiceScope ; + unsigned int ServiceScope_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ +struct dinAC_EVSEStatusType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed, http://www.w3.org/2001/XMLSchema,boolean */ + int PowerSwitchClosed ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":RCD, http://www.w3.org/2001/XMLSchema,boolean */ + int RCD ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedInt */ + uint32_t NotificationMaxDelay ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSENotification, urn:iso:15118:2:2010:MsgDataTypes,EVSENotificationType */ + dinEVSENotificationType EVSENotification ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ChargingProfileType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinChargingProfileType_ProfileEntry_ARRAY_SIZE 5 +struct dinChargingProfileType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */ + int16_t SAScheduleTupleID ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ProfileEntryType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower)', derivedBy='RESTRICTION'. */ + struct { + struct dinProfileEntryType array[dinChargingProfileType_ProfileEntry_ARRAY_SIZE]; + uint16_t arrayLen; + } ProfileEntry; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ServiceScope{0-1},"urn:iso:15118:2:2010:MsgBody":ServiceCategory{0-1})', derivedBy='EXTENSION'. */ +#define dinServiceDiscoveryReqType_ServiceScope_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType is 32 */ +struct dinServiceDiscoveryReqType { + /* element: "urn:iso:15118:2:2010:MsgBody":ServiceScope, urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType */ + struct { + exi_string_character_t characters[dinServiceDiscoveryReqType_ServiceScope_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ServiceScope ; + unsigned int ServiceScope_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgBody":ServiceCategory, urn:iso:15118:2:2010:MsgDataTypes,serviceCategoryType */ + dinserviceCategoryType ServiceCategory ; + unsigned int ServiceCategory_isUsed:1; +}; + +typedef enum { + dinresponseCodeType_OK = 0, + dinresponseCodeType_OK_NewSessionEstablished = 1, + dinresponseCodeType_OK_OldSessionJoined = 2, + dinresponseCodeType_OK_CertificateExpiresSoon = 3, + dinresponseCodeType_FAILED = 4, + dinresponseCodeType_FAILED_SequenceError = 5, + dinresponseCodeType_FAILED_ServiceIDInvalid = 6, + dinresponseCodeType_FAILED_UnknownSession = 7, + dinresponseCodeType_FAILED_ServiceSelectionInvalid = 8, + dinresponseCodeType_FAILED_PaymentSelectionInvalid = 9, + dinresponseCodeType_FAILED_CertificateExpired = 10, + dinresponseCodeType_FAILED_SignatureError = 11, + dinresponseCodeType_FAILED_NoCertificateAvailable = 12, + dinresponseCodeType_FAILED_CertChainError = 13, + dinresponseCodeType_FAILED_ChallengeInvalid = 14, + dinresponseCodeType_FAILED_ContractCanceled = 15, + dinresponseCodeType_FAILED_WrongChargeParameter = 16, + dinresponseCodeType_FAILED_PowerDeliveryNotApplied = 17, + dinresponseCodeType_FAILED_TariffSelectionInvalid = 18, + dinresponseCodeType_FAILED_ChargingProfileInvalid = 19, + dinresponseCodeType_FAILED_EVSEPresentVoltageToLow = 20, + dinresponseCodeType_FAILED_MeteringSignatureNotValid = 21, + dinresponseCodeType_FAILED_WrongEnergyTransferType = 22 +} dinresponseCodeType; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEChargeParameterType', base type name='EVSEChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinCurrent)', derivedBy='EXTENSION'. */ +struct dinAC_EVSEChargeParameterType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ + struct dinAC_EVSEStatusType AC_EVSEStatus ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMaxVoltage ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMaxCurrent ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMinCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMinCurrent ; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##any])){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ +#define dinObjectType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinObjectType_MimeType_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinObjectType_Encoding_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinObjectType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinObjectType { + /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ + struct { + exi_string_character_t characters[dinObjectType_Id_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Id ; + unsigned int Id_isUsed:1; + /* attribute: MimeType {http://www.w3.org/2001/XMLSchema,string} */ + struct { + exi_string_character_t characters[dinObjectType_MimeType_CHARACTERS_SIZE]; + uint16_t charactersLen; + } MimeType ; + unsigned int MimeType_isUsed:1; + /* attribute: Encoding {http://www.w3.org/2001/XMLSchema,anyURI} */ + struct { + exi_string_character_t characters[dinObjectType_Encoding_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Encoding ; + unsigned int Encoding_isUsed:1; + /* element: WC[##any] */ + struct { + exi_string_character_t characters[dinObjectType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)', derivedBy='EXTENSION'. */ +struct dinSessionStopResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinSignedInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinSignedInfoType_Reference_ARRAY_SIZE 1 +struct dinSignedInfoType { + /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ + struct { + exi_string_character_t characters[dinSignedInfoType_Id_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Id ; + unsigned int Id_isUsed:1; + /* element: "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##any]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct dinCanonicalizationMethodType CanonicalizationMethod ; + /* element: "http://www.w3.org/2000/09/xmldsig#":SignatureMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct dinSignatureMethodType SignatureMethod ; + /* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)', derivedBy='RESTRICTION'. */ + struct { + struct dinReferenceType array[dinSignedInfoType_Reference_ARRAY_SIZE]; + uint16_t arrayLen; + } Reference; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":costKind,"urn:iso:15118:2:2010:MsgDataTypes":amount,"urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier{0-1})', derivedBy='RESTRICTION'. */ +struct dinCostType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":costKind, urn:iso:15118:2:2010:MsgDataTypes,costKindType */ + dincostKindType costKind ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":amount, http://www.w3.org/2001/XMLSchema,unsignedInt */ + uint32_t amount ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier, urn:iso:15118:2:2010:MsgDataTypes,unitMultiplierType */ + int8_t amountMultiplier ; + unsigned int amountMultiplier_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceChargeType', base type name='ServiceType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService),("urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType))', derivedBy='EXTENSION'. */ +struct dinServiceChargeType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceTag, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})', derivedBy='RESTRICTION'. */ + struct dinServiceTagType ServiceTag ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":FreeService, http://www.w3.org/2001/XMLSchema,boolean */ + int FreeService ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType, urn:iso:15118:2:2010:MsgDataTypes,EVSESupportedEnergyTransferType */ + dinEVSESupportedEnergyTransferType EnergyTransferType ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ +struct dinDC_EVSEStatusType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus, urn:iso:15118:2:2010:MsgDataTypes,isolationLevelType */ + dinisolationLevelType EVSEIsolationStatus ; + unsigned int EVSEIsolationStatus_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode, urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusCodeType */ + dinDC_EVSEStatusCodeType EVSEStatusCode ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedInt */ + uint32_t NotificationMaxDelay ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSENotification, urn:iso:15118:2:2010:MsgDataTypes,EVSENotificationType */ + dinEVSENotificationType EVSENotification ; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})', derivedBy='RESTRICTION'. */ +#define dinRetrievalMethodType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinRetrievalMethodType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinRetrievalMethodType { + /* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */ + struct { + exi_string_character_t characters[dinRetrievalMethodType_URI_CHARACTERS_SIZE]; + uint16_t charactersLen; + } URI ; + unsigned int URI_isUsed:1; + /* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */ + struct { + exi_string_character_t characters[dinRetrievalMethodType_Type_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Type ; + unsigned int Type_isUsed:1; + /* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct dinTransformsType Transforms ; + unsigned int Transforms_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,NotificationType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":FaultCode,"urn:iso:15118:2:2010:MsgDataTypes":FaultMsg{0-1})', derivedBy='RESTRICTION'. */ +#define dinNotificationType_FaultMsg_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,faultMsgType is 64 */ +struct dinNotificationType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":FaultCode, urn:iso:15118:2:2010:MsgDataTypes,faultCodeType */ + dinfaultCodeType FaultCode ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":FaultMsg, urn:iso:15118:2:2010:MsgDataTypes,faultMsgType */ + struct { + exi_string_character_t characters[dinNotificationType_FaultMsg_CHARACTERS_SIZE]; + uint16_t charactersLen; + } FaultMsg ; + unsigned int FaultMsg_isUsed:1; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))', derivedBy='RESTRICTION'. */ +#define dinPGPDataType_PGPKeyID_BYTES_SIZE 350 +#define dinPGPDataType_PGPKeyPacket_BYTES_SIZE 350 +#define dinPGPDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinPGPDataType { + /* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyID, http://www.w3.org/2001/XMLSchema,base64Binary */ + struct { + uint8_t bytes[dinPGPDataType_PGPKeyID_BYTES_SIZE]; + uint16_t bytesLen; + } PGPKeyID ; + unsigned int PGPKeyID_isUsed:1; + /* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket, http://www.w3.org/2001/XMLSchema,base64Binary */ + struct { + uint8_t bytes[dinPGPDataType_PGPKeyPacket_BYTES_SIZE]; + uint16_t bytesLen; + } PGPKeyPacket ; + unsigned int PGPKeyPacket_isUsed:1; + /* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */ + struct { + exi_string_character_t characters[dinPGPDataType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ +#define dinSignaturePropertyType_Target_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinSignaturePropertyType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinSignaturePropertyType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinSignaturePropertyType { + /* attribute: Target {http://www.w3.org/2001/XMLSchema,anyURI} */ + struct { + exi_string_character_t characters[dinSignaturePropertyType_Target_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Target ; + /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ + struct { + exi_string_character_t characters[dinSignaturePropertyType_Id_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Id ; + unsigned int Id_isUsed:1; + /* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */ + struct { + exi_string_character_t characters[dinSignaturePropertyType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})', derivedBy='RESTRICTION'. */ +#define dinMeterInfoType_MeterID_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,meterIDType is 32 */ +#define dinMeterInfoType_SigMeterReading_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,sigMeterReadingType is 32 */ +struct dinMeterInfoType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":MeterID, urn:iso:15118:2:2010:MsgDataTypes,meterIDType */ + struct { + exi_string_character_t characters[dinMeterInfoType_MeterID_CHARACTERS_SIZE]; + uint16_t charactersLen; + } MeterID ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":MeterReading, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType MeterReading ; + unsigned int MeterReading_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading, urn:iso:15118:2:2010:MsgDataTypes,sigMeterReadingType */ + struct { + uint8_t bytes[dinMeterInfoType_SigMeterReading_BYTES_SIZE]; + uint16_t bytesLen; + } SigMeterReading ; + unsigned int SigMeterReading_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":MeterStatus, urn:iso:15118:2:2010:MsgDataTypes,meterStatusType */ + int16_t MeterStatus ; + unsigned int MeterStatus_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":TMeter, http://www.w3.org/2001/XMLSchema,long */ + int64_t TMeter ; + unsigned int TMeter_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SubCertificatesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinSubCertificatesType_Certificate_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */ +#define dinSubCertificatesType_Certificate_ARRAY_SIZE 5 +struct dinSubCertificatesType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":Certificate, urn:iso:15118:2:2010:MsgDataTypes,certificateType */ + struct { + struct { + uint8_t bytes[dinSubCertificatesType_Certificate_BYTES_SIZE]; + uint16_t bytesLen; + } array[dinSubCertificatesType_Certificate_ARRAY_SIZE]; + uint16_t arrayLen; + } Certificate; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":SessionID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo)', derivedBy='EXTENSION'. */ +#define dinMeteringReceiptReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinMeteringReceiptReqType_SessionID_BYTES_SIZE 8 /* XML schema facet length for urn:iso:15118:2:2010:MsgDataTypes,sessionIDType is 8 */ +struct dinMeteringReceiptReqType { + /* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */ + struct { + exi_string_character_t characters[dinMeteringReceiptReqType_Id_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Id ; + unsigned int Id_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgBody":SessionID, urn:iso:15118:2:2010:MsgDataTypes,sessionIDType */ + struct { + uint8_t bytes[dinMeteringReceiptReqType_SessionID_BYTES_SIZE]; + uint16_t bytesLen; + } SessionID ; + /* element: "urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */ + int16_t SAScheduleTupleID ; + unsigned int SAScheduleTupleID_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})', derivedBy='RESTRICTION'. */ + struct dinMeterInfoType MeterInfo ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatus)', derivedBy='EXTENSION'. */ +struct dinPowerDeliveryResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEStatusType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ + struct dinEVSEStatusType EVSEStatus ; + unsigned int EVSEStatus_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ + struct dinAC_EVSEStatusType AC_EVSEStatus ; + unsigned int AC_EVSEStatus_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ + struct dinDC_EVSEStatusType DC_EVSEStatus ; + unsigned int DC_EVSEStatus_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)', derivedBy='EXTENSION'. */ +struct dinWeldingDetectionResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; + /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ + struct dinDC_EVSEStatusType DC_EVSEStatus ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEPresentVoltage ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)', derivedBy='EXTENSION'. */ +struct dinContractAuthenticationResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEProcessing, urn:iso:15118:2:2010:MsgDataTypes,EVSEProcessingType */ + dinEVSEProcessingType EVSEProcessing ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SelectedService{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinSelectedServiceListType_SelectedService_ARRAY_SIZE 5 +struct dinSelectedServiceListType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":SelectedService, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID{0-1})', derivedBy='RESTRICTION'. */ + struct { + struct dinSelectedServiceType array[dinSelectedServiceListType_SelectedService_ARRAY_SIZE]; + uint16_t arrayLen; + } SelectedService; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2010:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2010:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumPowerLimit{0-1})', derivedBy='EXTENSION'. */ +struct dinCurrentDemandResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; + /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ + struct dinDC_EVSEStatusType DC_EVSEStatus ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEPresentVoltage ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEPresentCurrent ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSECurrentLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */ + int EVSECurrentLimitAchieved ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEVoltageLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */ + int EVSEVoltageLimitAchieved ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPowerLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */ + int EVSEPowerLimitAchieved ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMaximumVoltageLimit ; + unsigned int EVSEMaximumVoltageLimit_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMaximumCurrentLimit ; + unsigned int EVSEMaximumCurrentLimit_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMaximumPowerLimit ; + unsigned int EVSEMaximumPowerLimit_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DepartureTime,"urn:iso:15118:2:2010:MsgDataTypes":EAmount,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent)', derivedBy='EXTENSION'. */ +struct dinAC_EVChargeParameterType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */ + uint32_t DepartureTime ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EAmount, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EAmount ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVMaxVoltage ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVMaxCurrent ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVMinCurrent ; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ +#define dinX509DataType_X509IssuerSerial_ARRAY_SIZE 1 +#define dinX509DataType_X509SKI_BYTES_SIZE 350 +#define dinX509DataType_X509SKI_ARRAY_SIZE 1 +#define dinX509DataType_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinX509DataType_X509SubjectName_ARRAY_SIZE 1 +#define dinX509DataType_X509Certificate_BYTES_SIZE 350 +#define dinX509DataType_X509Certificate_ARRAY_SIZE 1 +#define dinX509DataType_X509CRL_BYTES_SIZE 350 +#define dinX509DataType_X509CRL_ARRAY_SIZE 1 +#define dinX509DataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinX509DataType { + /* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)', derivedBy='RESTRICTION'. */ + struct { + struct dinX509IssuerSerialType array[dinX509DataType_X509IssuerSerial_ARRAY_SIZE]; + uint16_t arrayLen; + } X509IssuerSerial; + /* element: "http://www.w3.org/2000/09/xmldsig#":X509SKI, http://www.w3.org/2001/XMLSchema,base64Binary */ + struct { + struct { + uint8_t bytes[dinX509DataType_X509SKI_BYTES_SIZE]; + uint16_t bytesLen; + } array[dinX509DataType_X509SKI_ARRAY_SIZE]; + uint16_t arrayLen; + } X509SKI; + /* element: "http://www.w3.org/2000/09/xmldsig#":X509SubjectName, http://www.w3.org/2001/XMLSchema,string */ + struct { + struct { + exi_string_character_t characters[dinX509DataType_X509SubjectName_CHARACTERS_SIZE]; + uint16_t charactersLen; + } array[dinX509DataType_X509SubjectName_ARRAY_SIZE]; + uint16_t arrayLen; + } X509SubjectName; + /* element: "http://www.w3.org/2000/09/xmldsig#":X509Certificate, http://www.w3.org/2001/XMLSchema,base64Binary */ + struct { + struct { + uint8_t bytes[dinX509DataType_X509Certificate_BYTES_SIZE]; + uint16_t bytesLen; + } array[dinX509DataType_X509Certificate_ARRAY_SIZE]; + uint16_t arrayLen; + } X509Certificate; + /* element: "http://www.w3.org/2000/09/xmldsig#":X509CRL, http://www.w3.org/2001/XMLSchema,base64Binary */ + struct { + struct { + uint8_t bytes[dinX509DataType_X509CRL_BYTES_SIZE]; + uint16_t bytesLen; + } array[dinX509DataType_X509CRL_ARRAY_SIZE]; + uint16_t arrayLen; + } X509CRL; + /* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */ + struct { + exi_string_character_t characters[dinX509DataType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgBody":EVSEMaxCurrent{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2010:MsgBody":ReceiptRequired,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)', derivedBy='EXTENSION'. */ +#define dinChargingStatusResType_EVSEID_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evseIDType is 32 */ +struct dinChargingStatusResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEID, urn:iso:15118:2:2010:MsgDataTypes,evseIDType */ + struct { + uint8_t bytes[dinChargingStatusResType_EVSEID_BYTES_SIZE]; + uint16_t bytesLen; + } EVSEID ; + /* element: "urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */ + int16_t SAScheduleTupleID ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaxCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMaxCurrent ; + unsigned int EVSEMaxCurrent_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})', derivedBy='RESTRICTION'. */ + struct dinMeterInfoType MeterInfo ; + unsigned int MeterInfo_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */ + int ReceiptRequired ; + /* element: "urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ + struct dinAC_EVSEStatusType AC_EVSEStatus ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)', derivedBy='EXTENSION'. */ +struct dinWeldingDetectionReqType { + /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ + struct dinDC_EVStatusType DC_EVStatus ; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertiesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SignatureProperty{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinSignaturePropertiesType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinSignaturePropertiesType_SignatureProperty_ARRAY_SIZE 1 +struct dinSignaturePropertiesType { + /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ + struct { + exi_string_character_t characters[dinSignaturePropertiesType_Id_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Id ; + unsigned int Id_isUsed:1; + /* element: "http://www.w3.org/2000/09/xmldsig#":SignatureProperty, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ + struct { + struct dinSignaturePropertyType array[dinSignaturePropertiesType_SignatureProperty_ARRAY_SIZE]; + uint16_t arrayLen; + } SignatureProperty; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVPowerDeliveryParameterType', base type name='EVPowerDeliveryParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete)', derivedBy='EXTENSION'. */ +struct dinDC_EVPowerDeliveryParameterType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ + struct dinDC_EVStatusType DC_EVStatus ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */ + int BulkChargingComplete ; + unsigned int BulkChargingComplete_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */ + int ChargingComplete ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)', derivedBy='EXTENSION'. */ +struct dinCableCheckReqType { + /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ + struct dinDC_EVStatusType DC_EVStatus ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2010:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2010:MsgDataTypes":BulkSOC{0-1})', derivedBy='EXTENSION'. */ +struct dinDC_EVChargeParameterType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ + struct dinDC_EVStatusType DC_EVStatus ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVMaximumCurrentLimit ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVMaximumPowerLimit ; + unsigned int EVMaximumPowerLimit_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVMaximumVoltageLimit ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVEnergyCapacity ; + unsigned int EVEnergyCapacity_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVEnergyRequest ; + unsigned int EVEnergyRequest_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":FullSOC, urn:iso:15118:2:2010:MsgDataTypes,percentValueType */ + int8_t FullSOC ; + unsigned int FullSOC_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":BulkSOC, urn:iso:15118:2:2010:MsgDataTypes,percentValueType */ + int8_t BulkSOC ; + unsigned int BulkSOC_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinPMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE 5 +struct dinPMaxScheduleType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */ + int16_t PMaxScheduleID ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":PMax))', derivedBy='EXTENSION'. */ + struct { + struct dinPMaxScheduleEntryType array[dinPMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE]; + uint16_t arrayLen; + } PMaxScheduleEntry; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2010:MsgBody":SelectedServiceList)', derivedBy='EXTENSION'. */ +struct dinServicePaymentSelectionReqType { + /* element: "urn:iso:15118:2:2010:MsgBody":SelectedPaymentOption, urn:iso:15118:2:2010:MsgDataTypes,paymentOptionType */ + dinpaymentOptionType SelectedPaymentOption ; + /* element: "urn:iso:15118:2:2010:MsgBody":SelectedServiceList, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SelectedService{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct dinSelectedServiceListType SelectedServiceList ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)', derivedBy='EXTENSION'. */ +struct dinPreChargeResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; + /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ + struct dinDC_EVSEStatusType DC_EVSEStatus ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEPresentVoltage ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEChargeParameterType', base type name='EVSEChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2010:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})', derivedBy='EXTENSION'. */ +struct dinDC_EVSEChargeParameterType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ + struct dinDC_EVSEStatusType DC_EVSEStatus ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMaximumCurrentLimit ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMaximumPowerLimit ; + unsigned int EVSEMaximumPowerLimit_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMaximumVoltageLimit ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMinimumCurrentLimit ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEMinimumVoltageLimit ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSECurrentRegulationTolerance, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSECurrentRegulationTolerance ; + unsigned int EVSECurrentRegulationTolerance_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEPeakCurrentRipple, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEPeakCurrentRipple ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEEnergyToBeDelivered, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVSEEnergyToBeDelivered ; + unsigned int EVSEEnergyToBeDelivered_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":GenChallenge,"urn:iso:15118:2:2010:MsgBody":DateTimeNow)', derivedBy='EXTENSION'. */ +#define dinPaymentDetailsResType_GenChallenge_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinPaymentDetailsResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; + /* element: "urn:iso:15118:2:2010:MsgBody":GenChallenge, urn:iso:15118:2:2010:MsgDataTypes,genChallengeType */ + struct { + exi_string_character_t characters[dinPaymentDetailsResType_GenChallenge_CHARACTERS_SIZE]; + uint16_t charactersLen; + } GenChallenge ; + /* element: "urn:iso:15118:2:2010:MsgBody":DateTimeNow, http://www.w3.org/2001/XMLSchema,long */ + int64_t DateTimeNow ; +}; + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))', derivedBy='RESTRICTION'. */ +#define dinKeyValueType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinKeyValueType { + /* element: "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})', derivedBy='RESTRICTION'. */ + struct dinDSAKeyValueType DSAKeyValue ; + unsigned int DSAKeyValue_isUsed:1; + /* element: "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)', derivedBy='RESTRICTION'. */ + struct dinRSAKeyValueType RSAKeyValue ; + unsigned int RSAKeyValue_isUsed:1; + /* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */ + struct { + exi_string_character_t characters[dinKeyValueType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ReadyToChargeState,"urn:iso:15118:2:2010:MsgBody":ChargingProfile{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVPowerDeliveryParameter{0-1})', derivedBy='EXTENSION'. */ +struct dinPowerDeliveryReqType { + /* element: "urn:iso:15118:2:2010:MsgBody":ReadyToChargeState, http://www.w3.org/2001/XMLSchema,boolean */ + int ReadyToChargeState ; + /* element: "urn:iso:15118:2:2010:MsgBody":ChargingProfile, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ChargingProfileType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct dinChargingProfileType ChargingProfile ; + unsigned int ChargingProfile_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVPowerDeliveryParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVPowerDeliveryParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ + struct dinEVPowerDeliveryParameterType EVPowerDeliveryParameter ; + unsigned int EVPowerDeliveryParameter_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVPowerDeliveryParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVPowerDeliveryParameterType', base type name='EVPowerDeliveryParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete)', derivedBy='EXTENSION'. */ + struct dinDC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ; + unsigned int DC_EVPowerDeliveryParameter_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})', derivedBy='RESTRICTION'. */ +#define dinCertificateChainType_Certificate_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */ +struct dinCertificateChainType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":Certificate, urn:iso:15118:2:2010:MsgDataTypes,certificateType */ + struct { + uint8_t bytes[dinCertificateChainType_Certificate_BYTES_SIZE]; + uint16_t bytesLen; + } Certificate ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":SubCertificates, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SubCertificatesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct dinSubCertificatesType SubCertificates ; + unsigned int SubCertificates_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":boolValue|"urn:iso:15118:2:2010:MsgDataTypes":byteValue|"urn:iso:15118:2:2010:MsgDataTypes":shortValue|"urn:iso:15118:2:2010:MsgDataTypes":intValue|"urn:iso:15118:2:2010:MsgDataTypes":physicalValue|"urn:iso:15118:2:2010:MsgDataTypes":stringValue)', derivedBy='RESTRICTION'. */ +#define dinParameterType_Name_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinParameterType_stringValue_CHARACTERS_SIZE 50 + EXTRA_CHAR +struct dinParameterType { + /* attribute: Name {http://www.w3.org/2001/XMLSchema,string} */ + struct { + exi_string_character_t characters[dinParameterType_Name_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Name ; + /* attribute: ValueType {urn:iso:15118:2:2010:MsgDataTypes,valueType} */ + dinvalueType ValueType ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":boolValue, http://www.w3.org/2001/XMLSchema,boolean */ + int boolValue ; + unsigned int boolValue_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":byteValue, http://www.w3.org/2001/XMLSchema,byte */ + int8_t byteValue ; + unsigned int byteValue_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":shortValue, http://www.w3.org/2001/XMLSchema,short */ + int16_t shortValue ; + unsigned int shortValue_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":intValue, http://www.w3.org/2001/XMLSchema,int */ + int32_t intValue ; + unsigned int intValue_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":physicalValue, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType physicalValue ; + unsigned int physicalValue_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":stringValue, http://www.w3.org/2001/XMLSchema,string */ + struct { + exi_string_character_t characters[dinParameterType_stringValue_CHARACTERS_SIZE]; + uint16_t charactersLen; + } stringValue ; + unsigned int stringValue_isUsed:1; +}; + /* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterSetType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2010:MsgDataTypes":Parameter{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ #define dinParameterSetType_Parameter_ARRAY_SIZE 5 struct dinParameterSetType { @@ -1095,18 +1379,6 @@ struct dinParameterSetType { } Parameter; }; -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ConsumptionCostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":startValue,"urn:iso:15118:2:2010:MsgDataTypes":Cost{0-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinConsumptionCostType_Cost_ARRAY_SIZE 5 -struct dinConsumptionCostType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":startValue, http://www.w3.org/2001/XMLSchema,unsignedInt */ - uint32_t startValue ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":Cost, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":costKind,"urn:iso:15118:2:2010:MsgDataTypes":amount,"urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier{0-1})', derivedBy='RESTRICTION'. */ - struct { - struct dinCostType array[dinConsumptionCostType_Cost_ARRAY_SIZE]; - uint16_t arrayLen; - } Cost; -}; - /* Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2010:MsgBody":EVMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgBody":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgBody":ChargingComplete,"urn:iso:15118:2:2010:MsgBody":RemainingTimeToFullSoC{0-1},"urn:iso:15118:2:2010:MsgBody":RemainingTimeToBulkSoC{0-1},"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage)', derivedBy='EXTENSION'. */ struct dinCurrentDemandReqType { /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ @@ -1137,17 +1409,139 @@ struct dinCurrentDemandReqType { struct dinPhysicalValueType EVTargetVoltage ; }; +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent)', derivedBy='EXTENSION'. */ +struct dinPreChargeReqType { + /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ + struct dinDC_EVStatusType DC_EVStatus ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVTargetVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVTargetVoltage ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVTargetCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ + struct dinPhysicalValueType EVTargetCurrent ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":EVRequestedEnergyTransferType,"urn:iso:15118:2:2010:MsgDataTypes":EVChargeParameter)', derivedBy='EXTENSION'. */ +struct dinChargeParameterDiscoveryReqType { + /* element: "urn:iso:15118:2:2010:MsgBody":EVRequestedEnergyTransferType, urn:iso:15118:2:2010:MsgDataTypes,EVRequestedEnergyTransferType */ + dinEVRequestedEnergyTransferType EVRequestedEnergyTransferType ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ + struct dinEVChargeParameterType EVChargeParameter ; + unsigned int EVChargeParameter_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DepartureTime,"urn:iso:15118:2:2010:MsgDataTypes":EAmount,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent)', derivedBy='EXTENSION'. */ + struct dinAC_EVChargeParameterType AC_EVChargeParameter ; + unsigned int AC_EVChargeParameter_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2010:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2010:MsgDataTypes":BulkSOC{0-1})', derivedBy='EXTENSION'. */ + struct dinDC_EVChargeParameterType DC_EVChargeParameter ; + unsigned int DC_EVChargeParameter_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ConsumptionCostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":startValue,"urn:iso:15118:2:2010:MsgDataTypes":Cost{0-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinConsumptionCostType_Cost_ARRAY_SIZE 5 +struct dinConsumptionCostType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":startValue, http://www.w3.org/2001/XMLSchema,unsignedInt */ + uint32_t startValue ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":Cost, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":costKind,"urn:iso:15118:2:2010:MsgDataTypes":amount,"urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier{0-1})', derivedBy='RESTRICTION'. */ + struct { + struct dinCostType array[dinConsumptionCostType_Cost_ARRAY_SIZE]; + uint16_t arrayLen; + } Cost; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService)', derivedBy='RESTRICTION'. */ +struct dinServiceType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceTag, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})', derivedBy='RESTRICTION'. */ + struct dinServiceTagType ServiceTag ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":FreeService, http://www.w3.org/2001/XMLSchema,boolean */ + int FreeService ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Service{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinServiceTagListType_Service_ARRAY_SIZE 5 +struct dinServiceTagListType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":Service, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService)', derivedBy='RESTRICTION'. */ + struct { + struct dinServiceType array[dinServiceTagListType_Service_ARRAY_SIZE]; + uint16_t arrayLen; + } Service; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":DateTimeNow{0-1})', derivedBy='EXTENSION'. */ +#define dinSessionSetupResType_EVSEID_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evseIDType is 32 */ +struct dinSessionSetupResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEID, urn:iso:15118:2:2010:MsgDataTypes,evseIDType */ + struct { + uint8_t bytes[dinSessionSetupResType_EVSEID_BYTES_SIZE]; + uint16_t bytesLen; + } EVSEID ; + /* element: "urn:iso:15118:2:2010:MsgBody":DateTimeNow, http://www.w3.org/2001/XMLSchema,long */ + int64_t DateTimeNow ; + unsigned int DateTimeNow_isUsed:1; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)', derivedBy='EXTENSION'. */ +struct dinMeteringReceiptResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; + /* element: "urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ + struct dinAC_EVSEStatusType AC_EVSEStatus ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceParameterListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSet{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +#define dinServiceParameterListType_ParameterSet_ARRAY_SIZE 5 +struct dinServiceParameterListType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ParameterSet, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterSetType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2010:MsgDataTypes":Parameter{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct { + struct dinParameterSetType array[dinServiceParameterListType_ParameterSet_ARRAY_SIZE]; + uint16_t arrayLen; + } ParameterSet; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)', derivedBy='EXTENSION'. */ +#define dinCertificateUpdateReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinCertificateUpdateReqType_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ +#define dinCertificateUpdateReqType_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */ +struct dinCertificateUpdateReqType { + /* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */ + struct { + exi_string_character_t characters[dinCertificateUpdateReqType_Id_CHARACTERS_SIZE]; + uint16_t charactersLen; + } Id ; + unsigned int Id_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})', derivedBy='RESTRICTION'. */ + struct dinCertificateChainType ContractSignatureCertChain ; + /* element: "urn:iso:15118:2:2010:MsgBody":ContractID, urn:iso:15118:2:2010:MsgDataTypes,contractIDType */ + struct { + exi_string_character_t characters[dinCertificateUpdateReqType_ContractID_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ContractID ; + /* element: "urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ListOfRootCertificateIDsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct dinListOfRootCertificateIDsType ListOfRootCertificateIDs ; + /* element: "urn:iso:15118:2:2010:MsgBody":DHParams, urn:iso:15118:2:2010:MsgDataTypes,dHParamsType */ + struct { + uint8_t bytes[dinCertificateUpdateReqType_DHParams_BYTES_SIZE]; + uint16_t bytesLen; + } DHParams ; +}; + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)', derivedBy='EXTENSION'. */ +struct dinServicePaymentSelectionResType { + /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ + dinresponseCodeType ResponseCode ; +}; + /* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ -#define dinKeyInfoType_Id_CHARACTERS_SIZE 50 -#define dinKeyInfoType_KeyName_CHARACTERS_SIZE 50 +#define dinKeyInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinKeyInfoType_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR #define dinKeyInfoType_KeyName_ARRAY_SIZE 1 #define dinKeyInfoType_KeyValue_ARRAY_SIZE 1 #define dinKeyInfoType_RetrievalMethod_ARRAY_SIZE 1 #define dinKeyInfoType_X509Data_ARRAY_SIZE 1 #define dinKeyInfoType_PGPData_ARRAY_SIZE 1 #define dinKeyInfoType_SPKIData_ARRAY_SIZE 1 -#define dinKeyInfoType_MgmtData_CHARACTERS_SIZE 50 +#define dinKeyInfoType_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR #define dinKeyInfoType_MgmtData_ARRAY_SIZE 1 +#define dinKeyInfoType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR struct dinKeyInfoType { /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ struct { @@ -1196,10 +1590,16 @@ struct dinKeyInfoType { } array[dinKeyInfoType_MgmtData_ARRAY_SIZE]; uint16_t arrayLen; } MgmtData; + /* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */ + struct { + exi_string_character_t characters[dinKeyInfoType_ANY_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ANY ; + unsigned int ANY_isUsed:1; }; /* Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain)', derivedBy='EXTENSION'. */ -#define dinPaymentDetailsReqType_ContractID_CHARACTERS_SIZE 24 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ +#define dinPaymentDetailsReqType_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ struct dinPaymentDetailsReqType { /* element: "urn:iso:15118:2:2010:MsgBody":ContractID, urn:iso:15118:2:2010:MsgDataTypes,contractIDType */ struct { @@ -1210,155 +1610,21 @@ struct dinPaymentDetailsReqType { struct dinCertificateChainType ContractSignatureCertChain ; }; -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceParameterListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSet{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinServiceParameterListType_ParameterSet_ARRAY_SIZE 5 -struct dinServiceParameterListType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ParameterSet, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterSetType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2010:MsgDataTypes":Parameter{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct { - struct dinParameterSetType array[dinServiceParameterListType_ParameterSet_ARRAY_SIZE]; - uint16_t arrayLen; - } ParameterSet; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)', derivedBy='EXTENSION'. */ -struct dinWeldingDetectionResType { +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)', derivedBy='EXTENSION'. */ +struct dinCableCheckResType { /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ dinresponseCodeType ResponseCode ; /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ struct dinDC_EVSEStatusType DC_EVSEStatus ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEPresentVoltage ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)', derivedBy='EXTENSION'. */ -#define dinCertificateUpdateReqType_Id_CHARACTERS_SIZE 50 -#define dinCertificateUpdateReqType_ContractID_CHARACTERS_SIZE 24 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ -#define dinCertificateUpdateReqType_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */ -struct dinCertificateUpdateReqType { - /* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */ - struct { - exi_string_character_t characters[dinCertificateUpdateReqType_Id_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Id ; - unsigned int Id_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})', derivedBy='RESTRICTION'. */ - struct dinCertificateChainType ContractSignatureCertChain ; - /* element: "urn:iso:15118:2:2010:MsgBody":ContractID, urn:iso:15118:2:2010:MsgDataTypes,contractIDType */ - struct { - exi_string_character_t characters[dinCertificateUpdateReqType_ContractID_CHARACTERS_SIZE]; - uint16_t charactersLen; - } ContractID ; - /* element: "urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ListOfRootCertificateIDsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct dinListOfRootCertificateIDsType ListOfRootCertificateIDs ; - /* element: "urn:iso:15118:2:2010:MsgBody":DHParams, urn:iso:15118:2:2010:MsgDataTypes,dHParamsType */ - struct { - uint8_t bytes[dinCertificateUpdateReqType_DHParams_BYTES_SIZE]; - uint16_t bytesLen; - } DHParams ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Service{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinServiceTagListType_Service_ARRAY_SIZE 5 -struct dinServiceTagListType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":Service, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService)', derivedBy='RESTRICTION'. */ - struct { - struct dinServiceType array[dinServiceTagListType_Service_ARRAY_SIZE]; - uint16_t arrayLen; - } Service; -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinSignedInfoType_Id_CHARACTERS_SIZE 50 -#define dinSignedInfoType_Reference_ARRAY_SIZE 1 -struct dinSignedInfoType { - /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ - struct { - exi_string_character_t characters[dinSignedInfoType_Id_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Id ; - unsigned int Id_isUsed:1; - /* element: "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##any]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct dinCanonicalizationMethodType CanonicalizationMethod ; - /* element: "http://www.w3.org/2000/09/xmldsig#":SignatureMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct dinSignatureMethodType SignatureMethod ; - /* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)', derivedBy='RESTRICTION'. */ - struct { - struct dinReferenceType array[dinSignedInfoType_Reference_ARRAY_SIZE]; - uint16_t arrayLen; - } Reference; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ReadyToChargeState,"urn:iso:15118:2:2010:MsgBody":ChargingProfile{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVPowerDeliveryParameter{0-1})', derivedBy='EXTENSION'. */ -struct dinPowerDeliveryReqType { - /* element: "urn:iso:15118:2:2010:MsgBody":ReadyToChargeState, http://www.w3.org/2001/XMLSchema,boolean */ - int ReadyToChargeState ; - /* element: "urn:iso:15118:2:2010:MsgBody":ChargingProfile, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ChargingProfileType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct dinChargingProfileType ChargingProfile ; - unsigned int ChargingProfile_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVPowerDeliveryParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVPowerDeliveryParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ - struct dinEVPowerDeliveryParameterType EVPowerDeliveryParameter ; - unsigned int EVPowerDeliveryParameter_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVPowerDeliveryParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVPowerDeliveryParameterType', base type name='EVPowerDeliveryParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete)', derivedBy='EXTENSION'. */ - struct dinDC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ; - unsigned int DC_EVPowerDeliveryParameter_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2010:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2010:MsgDataTypes":BulkSOC{0-1})', derivedBy='EXTENSION'. */ -struct dinDC_EVChargeParameterType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ - struct dinDC_EVStatusType DC_EVStatus ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVMaximumCurrentLimit ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVMaximumPowerLimit ; - unsigned int EVMaximumPowerLimit_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVMaximumVoltageLimit ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVEnergyCapacity ; - unsigned int EVEnergyCapacity_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVEnergyRequest ; - unsigned int EVEnergyRequest_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":FullSOC, urn:iso:15118:2:2010:MsgDataTypes,percentValueType */ - int8_t FullSOC ; - unsigned int FullSOC_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":BulkSOC, urn:iso:15118:2:2010:MsgDataTypes,percentValueType */ - int8_t BulkSOC ; - unsigned int BulkSOC_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})', derivedBy='RESTRICTION'. */ -#define dinMeterInfoType_MeterID_CHARACTERS_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,meterIDType is 32 */ -#define dinMeterInfoType_SigMeterReading_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,sigMeterReadingType is 32 */ -struct dinMeterInfoType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":MeterID, urn:iso:15118:2:2010:MsgDataTypes,meterIDType */ - struct { - exi_string_character_t characters[dinMeterInfoType_MeterID_CHARACTERS_SIZE]; - uint16_t charactersLen; - } MeterID ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":MeterReading, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType MeterReading ; - unsigned int MeterReading_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading, urn:iso:15118:2:2010:MsgDataTypes,sigMeterReadingType */ - struct { - uint8_t bytes[dinMeterInfoType_SigMeterReading_BYTES_SIZE]; - uint16_t bytesLen; - } SigMeterReading ; - unsigned int SigMeterReading_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":MeterStatus, urn:iso:15118:2:2010:MsgDataTypes,meterStatusType */ - int16_t MeterStatus ; - unsigned int MeterStatus_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":TMeter, http://www.w3.org/2001/XMLSchema,long */ - int64_t TMeter ; - unsigned int TMeter_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgBody":EVSEProcessing, urn:iso:15118:2:2010:MsgDataTypes,EVSEProcessingType */ + dinEVSEProcessingType EVSEProcessing ; }; /* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID)', derivedBy='EXTENSION'. */ -#define dinCertificateInstallationResType_Id_CHARACTERS_SIZE 50 +#define dinCertificateInstallationResType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR #define dinCertificateInstallationResType_ContractSignatureEncryptedPrivateKey_BYTES_SIZE 128 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,privateKeyType is 128 */ #define dinCertificateInstallationResType_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */ -#define dinCertificateInstallationResType_ContractID_CHARACTERS_SIZE 24 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ +#define dinCertificateInstallationResType_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ struct dinCertificateInstallationResType { /* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */ struct { @@ -1397,51 +1663,11 @@ struct dinServiceDetailResType { unsigned int ServiceParameterList_isUsed:1; }; -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEChargeParameterType', base type name='EVSEChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2010:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})', derivedBy='EXTENSION'. */ -struct dinDC_EVSEChargeParameterType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ - struct dinDC_EVSEStatusType DC_EVSEStatus ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMaximumCurrentLimit ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMaximumPowerLimit ; - unsigned int EVSEMaximumPowerLimit_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMaximumVoltageLimit ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMinimumCurrentLimit ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMinimumVoltageLimit ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSECurrentRegulationTolerance, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSECurrentRegulationTolerance ; - unsigned int EVSECurrentRegulationTolerance_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEPeakCurrentRipple, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEPeakCurrentRipple ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEEnergyToBeDelivered, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEEnergyToBeDelivered ; - unsigned int EVSEEnergyToBeDelivered_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatus)', derivedBy='EXTENSION'. */ -struct dinPowerDeliveryResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEStatusType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ - struct dinEVSEStatusType EVSEStatus ; - unsigned int EVSEStatus_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ - struct dinAC_EVSEStatusType AC_EVSEStatus ; - unsigned int AC_EVSEStatus_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ - struct dinDC_EVSEStatusType DC_EVSEStatus ; - unsigned int DC_EVSEStatus_isUsed:1; -}; - /* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":RetryCounter)', derivedBy='EXTENSION'. */ -#define dinCertificateUpdateResType_Id_CHARACTERS_SIZE 50 +#define dinCertificateUpdateResType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR #define dinCertificateUpdateResType_ContractSignatureEncryptedPrivateKey_BYTES_SIZE 128 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,privateKeyType is 128 */ #define dinCertificateUpdateResType_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */ -#define dinCertificateUpdateResType_ContractID_CHARACTERS_SIZE 24 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ +#define dinCertificateUpdateResType_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ struct dinCertificateUpdateResType { /* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */ struct { @@ -1471,120 +1697,39 @@ struct dinCertificateUpdateResType { int16_t RetryCounter ; }; -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2010:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2010:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumPowerLimit{0-1})', derivedBy='EXTENSION'. */ -struct dinCurrentDemandResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ - struct dinDC_EVSEStatusType DC_EVSEStatus ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEPresentVoltage ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEPresentCurrent ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSECurrentLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */ - int EVSECurrentLimitAchieved ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEVoltageLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */ - int EVSEVoltageLimitAchieved ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPowerLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */ - int EVSEPowerLimitAchieved ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMaximumVoltageLimit ; - unsigned int EVSEMaximumVoltageLimit_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMaximumCurrentLimit ; - unsigned int EVSEMaximumCurrentLimit_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMaximumPowerLimit ; - unsigned int EVSEMaximumPowerLimit_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)', derivedBy='EXTENSION'. */ -struct dinCableCheckResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ - struct dinDC_EVSEStatusType DC_EVSEStatus ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEProcessing, urn:iso:15118:2:2010:MsgDataTypes,EVSEProcessingType */ - dinEVSEProcessingType EVSEProcessing ; -}; - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ManifestType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinManifestType_Id_CHARACTERS_SIZE 50 -#define dinManifestType_Reference_ARRAY_SIZE 1 -struct dinManifestType { - /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":EPriceLevel,"urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost{0-UNBOUNDED}))', derivedBy='EXTENSION'. */ +#define dinSalesTariffEntryType_ConsumptionCost_ARRAY_SIZE 5 +struct dinSalesTariffEntryType { + /* element: "urn:iso:15118:2:2010:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ + struct dinIntervalType TimeInterval ; + unsigned int TimeInterval_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType', base type name='IntervalType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})', derivedBy='EXTENSION'. */ + struct dinRelativeTimeIntervalType RelativeTimeInterval ; + unsigned int RelativeTimeInterval_isUsed:1; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":EPriceLevel, http://www.w3.org/2001/XMLSchema,unsignedByte */ + uint8_t EPriceLevel ; + /* element: "urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ConsumptionCostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":startValue,"urn:iso:15118:2:2010:MsgDataTypes":Cost{0-UNBOUNDED})', derivedBy='RESTRICTION'. */ struct { - exi_string_character_t characters[dinManifestType_Id_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Id ; - unsigned int Id_isUsed:1; - /* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)', derivedBy='RESTRICTION'. */ - struct { - struct dinReferenceType array[dinManifestType_Reference_ARRAY_SIZE]; + struct dinConsumptionCostType array[dinSalesTariffEntryType_ConsumptionCost_ARRAY_SIZE]; uint16_t arrayLen; - } Reference; + } ConsumptionCost; }; -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DepartureTime,"urn:iso:15118:2:2010:MsgDataTypes":EAmount,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent)', derivedBy='EXTENSION'. */ -struct dinAC_EVChargeParameterType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */ - uint32_t DepartureTime ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EAmount, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EAmount ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVMaxVoltage ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVMaxCurrent ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVMinCurrent ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent)', derivedBy='EXTENSION'. */ -struct dinPreChargeReqType { - /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ - struct dinDC_EVStatusType DC_EVStatus ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVTargetVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVTargetVoltage ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVTargetCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVTargetCurrent ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)', derivedBy='EXTENSION'. */ -struct dinPreChargeResType { +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":PaymentOptions,"urn:iso:15118:2:2010:MsgBody":ChargeService,"urn:iso:15118:2:2010:MsgBody":ServiceList{0-1})', derivedBy='EXTENSION'. */ +struct dinServiceDiscoveryResType { /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ - struct dinDC_EVSEStatusType DC_EVSEStatus ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEPresentVoltage ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgBody":EVSEMaxCurrent{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2010:MsgBody":ReceiptRequired,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)', derivedBy='EXTENSION'. */ -#define dinChargingStatusResType_EVSEID_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evseIDType is 32 */ -struct dinChargingStatusResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEID, urn:iso:15118:2:2010:MsgDataTypes,evseIDType */ - struct { - uint8_t bytes[dinChargingStatusResType_EVSEID_BYTES_SIZE]; - uint16_t bytesLen; - } EVSEID ; - /* element: "urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */ - int16_t SAScheduleTupleID ; - /* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaxCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ - struct dinPhysicalValueType EVSEMaxCurrent ; - unsigned int EVSEMaxCurrent_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})', derivedBy='RESTRICTION'. */ - struct dinMeterInfoType MeterInfo ; - unsigned int MeterInfo_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */ - int ReceiptRequired ; - /* element: "urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ - struct dinAC_EVSEStatusType AC_EVSEStatus ; + /* element: "urn:iso:15118:2:2010:MsgBody":PaymentOptions, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PaymentOptionsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PaymentOption{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct dinPaymentOptionsType PaymentOptions ; + /* element: "urn:iso:15118:2:2010:MsgBody":ChargeService, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceChargeType', base type name='ServiceType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService),("urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType))', derivedBy='EXTENSION'. */ + struct dinServiceChargeType ChargeService ; + /* element: "urn:iso:15118:2:2010:MsgBody":ServiceList, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Service{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ + struct dinServiceTagListType ServiceList ; + unsigned int ServiceList_isUsed:1; }; /* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinSignatureType_Id_CHARACTERS_SIZE 50 +#define dinSignatureType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR #define dinSignatureType_Object_ARRAY_SIZE 1 struct dinSignatureType { /* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */ @@ -1607,77 +1752,9 @@ struct dinSignatureType { } Object; }; -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":PaymentOptions,"urn:iso:15118:2:2010:MsgBody":ChargeService,"urn:iso:15118:2:2010:MsgBody":ServiceList{0-1})', derivedBy='EXTENSION'. */ -struct dinServiceDiscoveryResType { - /* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */ - dinresponseCodeType ResponseCode ; - /* element: "urn:iso:15118:2:2010:MsgBody":PaymentOptions, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PaymentOptionsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PaymentOption{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct dinPaymentOptionsType PaymentOptions ; - /* element: "urn:iso:15118:2:2010:MsgBody":ChargeService, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceChargeType', base type name='ServiceType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService),("urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType))', derivedBy='EXTENSION'. */ - struct dinServiceChargeType ChargeService ; - /* element: "urn:iso:15118:2:2010:MsgBody":ServiceList, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Service{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct dinServiceTagListType ServiceList ; - unsigned int ServiceList_isUsed:1; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":EPriceLevel,"urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost{0-UNBOUNDED}))', derivedBy='EXTENSION'. */ -#define dinSalesTariffEntryType_ConsumptionCost_ARRAY_SIZE 5 -struct dinSalesTariffEntryType { - /* element: "urn:iso:15118:2:2010:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ - struct dinIntervalType TimeInterval ; - unsigned int TimeInterval_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType', base type name='IntervalType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})', derivedBy='EXTENSION'. */ - struct dinRelativeTimeIntervalType RelativeTimeInterval ; - unsigned int RelativeTimeInterval_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EPriceLevel, http://www.w3.org/2001/XMLSchema,unsignedByte */ - uint8_t EPriceLevel ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ConsumptionCostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":startValue,"urn:iso:15118:2:2010:MsgDataTypes":Cost{0-UNBOUNDED})', derivedBy='RESTRICTION'. */ - struct { - struct dinConsumptionCostType array[dinSalesTariffEntryType_ConsumptionCost_ARRAY_SIZE]; - uint16_t arrayLen; - } ConsumptionCost; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":SessionID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo)', derivedBy='EXTENSION'. */ -#define dinMeteringReceiptReqType_Id_CHARACTERS_SIZE 50 -#define dinMeteringReceiptReqType_SessionID_BYTES_SIZE 8 /* XML schema facet length for urn:iso:15118:2:2010:MsgDataTypes,sessionIDType is 8 */ -struct dinMeteringReceiptReqType { - /* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */ - struct { - exi_string_character_t characters[dinMeteringReceiptReqType_Id_CHARACTERS_SIZE]; - uint16_t charactersLen; - } Id ; - unsigned int Id_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgBody":SessionID, urn:iso:15118:2:2010:MsgDataTypes,sessionIDType */ - struct { - uint8_t bytes[dinMeteringReceiptReqType_SessionID_BYTES_SIZE]; - uint16_t bytesLen; - } SessionID ; - /* element: "urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */ - int16_t SAScheduleTupleID ; - unsigned int SAScheduleTupleID_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})', derivedBy='RESTRICTION'. */ - struct dinMeterInfoType MeterInfo ; -}; - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":EVRequestedEnergyTransferType,"urn:iso:15118:2:2010:MsgDataTypes":EVChargeParameter)', derivedBy='EXTENSION'. */ -struct dinChargeParameterDiscoveryReqType { - /* element: "urn:iso:15118:2:2010:MsgBody":EVRequestedEnergyTransferType, urn:iso:15118:2:2010:MsgDataTypes,EVRequestedEnergyTransferType */ - dinEVRequestedEnergyTransferType EVRequestedEnergyTransferType ; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":EVChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ - struct dinEVChargeParameterType EVChargeParameter ; - unsigned int EVChargeParameter_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DepartureTime,"urn:iso:15118:2:2010:MsgDataTypes":EAmount,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent)', derivedBy='EXTENSION'. */ - struct dinAC_EVChargeParameterType AC_EVChargeParameter ; - unsigned int AC_EVChargeParameter_isUsed:1; - /* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2010:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2010:MsgDataTypes":BulkSOC{0-1})', derivedBy='EXTENSION'. */ - struct dinDC_EVChargeParameterType DC_EVChargeParameter ; - unsigned int DC_EVChargeParameter_isUsed:1; -}; - /* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2010:MsgDataTypes":NumEPriceLevels,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -#define dinSalesTariffType_Id_CHARACTERS_SIZE 50 -#define dinSalesTariffType_SalesTariffDescription_CHARACTERS_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,tariffDescriptionType is 32 */ +#define dinSalesTariffType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define dinSalesTariffType_SalesTariffDescription_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,tariffDescriptionType is 32 */ #define dinSalesTariffType_SalesTariffEntry_ARRAY_SIZE 5 struct dinSalesTariffType { /* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */ @@ -1888,47 +1965,47 @@ struct dinAnonType_V2G_Message { -#define EXIDocument_MgmtData_CHARACTERS_SIZE 50 -#define EXIDocument_KeyName_CHARACTERS_SIZE 50 +#define EXIDocument_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define EXIDocument_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR #define EXIDocument_DigestValue_BYTES_SIZE 350 -#define EXIFragment_ServiceScope_CHARACTERS_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType is 32 */ #define EXIFragment_Certificate_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */ +#define EXIFragment_stringValue_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define EXIFragment_OEMProvisioningCert_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */ #define EXIFragment_Exponent_BYTES_SIZE 350 +#define EXIFragment_SessionID_BYTES_SIZE 8 /* XML schema facet length for urn:iso:15118:2:2010:MsgDataTypes,sessionIDType is 8 */ +#define EXIFragment_PgenCounter_BYTES_SIZE 350 +#define EXIFragment_EVCCID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evccIDType is 8 */ +#define EXIFragment_RootCertificateID_CHARACTERS_SIZE 40 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,rootCertificateIDType is 40 */ +#define EXIFragment_PGPKeyPacket_BYTES_SIZE 350 +#define EXIFragment_Seed_BYTES_SIZE 350 +#define EXIFragment_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define EXIFragment_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ +#define EXIFragment_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define EXIFragment_P_BYTES_SIZE 350 +#define EXIFragment_Q_BYTES_SIZE 350 +#define EXIFragment_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define EXIFragment_G_BYTES_SIZE 350 #define EXIFragment_J_BYTES_SIZE 350 #define EXIFragment_X509CRL_BYTES_SIZE 350 -#define EXIFragment_PGPKeyPacket_BYTES_SIZE 350 -#define EXIFragment_PgenCounter_BYTES_SIZE 350 #define EXIFragment_Y_BYTES_SIZE 350 -#define EXIFragment_Seed_BYTES_SIZE 350 -#define EXIFragment_Modulus_BYTES_SIZE 350 -#define EXIFragment_X509IssuerName_CHARACTERS_SIZE 50 -#define EXIFragment_X509SubjectName_CHARACTERS_SIZE 50 -#define EXIFragment_MgmtData_CHARACTERS_SIZE 50 -#define EXIFragment_ServiceName_CHARACTERS_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceNameType is 32 */ -#define EXIFragment_PGPKeyID_BYTES_SIZE 350 -#define EXIFragment_EVSEID_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evseIDType is 32 */ -#define EXIFragment_X509SKI_BYTES_SIZE 350 -#define EXIFragment_MeterID_CHARACTERS_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,meterIDType is 32 */ -#define EXIFragment_OEMProvisioningCert_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */ -#define EXIFragment_P_BYTES_SIZE 350 -#define EXIFragment_X509Certificate_BYTES_SIZE 350 -#define EXIFragment_SPKISexp_BYTES_SIZE 350 -#define EXIFragment_EVCCID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evccIDType is 8 */ -#define EXIFragment_SessionID_BYTES_SIZE 8 /* XML schema facet length for urn:iso:15118:2:2010:MsgDataTypes,sessionIDType is 8 */ -#define EXIFragment_stringValue_CHARACTERS_SIZE 50 -#define EXIFragment_ContractSignatureEncryptedPrivateKey_BYTES_SIZE 128 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,privateKeyType is 128 */ -#define EXIFragment_G_BYTES_SIZE 350 -#define EXIFragment_SalesTariffDescription_CHARACTERS_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,tariffDescriptionType is 32 */ -#define EXIFragment_ContractID_CHARACTERS_SIZE 24 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */ -#define EXIFragment_KeyName_CHARACTERS_SIZE 50 #define EXIFragment_DigestValue_BYTES_SIZE 350 -#define EXIFragment_SigMeterReading_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,sigMeterReadingType is 32 */ -#define EXIFragment_FaultMsg_CHARACTERS_SIZE 64 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,faultMsgType is 64 */ +#define EXIFragment_ContractSignatureEncryptedPrivateKey_BYTES_SIZE 128 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,privateKeyType is 128 */ +#define EXIFragment_SPKISexp_BYTES_SIZE 350 #define EXIFragment_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */ -#define EXIFragment_RootCertificateID_CHARACTERS_SIZE 40 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,rootCertificateIDType is 40 */ -#define EXIFragment_GenChallenge_CHARACTERS_SIZE 50 -#define EXIFragment_XPath_CHARACTERS_SIZE 50 -#define EXIFragment_Q_BYTES_SIZE 350 +#define EXIFragment_PGPKeyID_BYTES_SIZE 350 +#define EXIFragment_X509Certificate_BYTES_SIZE 350 +#define EXIFragment_ServiceName_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceNameType is 32 */ +#define EXIFragment_EVSEID_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evseIDType is 32 */ +#define EXIFragment_ServiceScope_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType is 32 */ +#define EXIFragment_GenChallenge_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define EXIFragment_SalesTariffDescription_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,tariffDescriptionType is 32 */ +#define EXIFragment_FaultMsg_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,faultMsgType is 64 */ +#define EXIFragment_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define EXIFragment_SigMeterReading_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,sigMeterReadingType is 32 */ +#define EXIFragment_X509SKI_BYTES_SIZE 350 +#define EXIFragment_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR +#define EXIFragment_MeterID_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,meterIDType is 32 */ +#define EXIFragment_Modulus_BYTES_SIZE 350 /* Global elements of EXI Document */ @@ -2114,702 +2191,703 @@ struct dinEXIDocument { int _warning_; }; - - + + #if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES /* Possible elements of EXI Fragment */ struct dinEXIFragment { #if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES union { #endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */ - struct dinRSAKeyValueType RSAKeyValue ; - struct dinParameterSetType ParameterSet ; - struct dinPhysicalValueType EVEnergyRequest ; - uint32_t amount ; - uint32_t start ; - struct dinNotificationType Notification ; - struct { - exi_string_character_t characters[EXIFragment_ServiceScope_CHARACTERS_SIZE]; - uint16_t charactersLen; - } ServiceScope ; - struct dinPhysicalValueType EVMaximumVoltageLimit ; + dinunitSymbolType Unit ; + struct dinPhysicalValueType EVSEMaximumCurrentLimit ; + struct dinEVPowerDeliveryParameterType EVPowerDeliveryParameter ; + int16_t ChargingProfileEntryMaxPower ; + int64_t TMeter ; + int EVSEPowerLimitAchieved ; + uint32_t duration ; + struct dinPhysicalValueType EVMaximumCurrentLimit ; + struct dinParameterType Parameter ; + dinEVSEProcessingType EVSEProcessing ; + struct dinAC_EVChargeParameterType AC_EVChargeParameter ; + struct dinPMaxScheduleEntryType PMaxScheduleEntry ; + struct dinPhysicalValueType EVSEMaximumVoltageLimit ; + struct dinSelectedServiceType SelectedService ; struct { uint8_t bytes[EXIFragment_Certificate_BYTES_SIZE]; uint16_t bytesLen; } Certificate ; - int EVCabinConditioning ; - int EVSECurrentLimitAchieved ; - struct dinPhysicalValueType EVMaxCurrent ; - struct dinCertificateInstallationResType CertificateInstallationRes ; - struct dinPhysicalValueType EVMaxVoltage ; + struct dinPhysicalValueType EVSEMaximumPowerLimit ; + int EVReady ; + int64_t X509SerialNumber ; + struct dinRetrievalMethodType RetrievalMethod ; + int16_t RetryCounter ; + struct dinDC_EVSEStatusType DC_EVSEStatus ; + struct dinMeteringReceiptReqType MeteringReceiptReq ; + int ReadyToChargeState ; + int8_t Multiplier ; + uint8_t EPriceLevel ; + struct { + exi_string_character_t characters[EXIFragment_stringValue_CHARACTERS_SIZE]; + uint16_t charactersLen; + } stringValue ; + struct dinServiceDiscoveryReqType ServiceDiscoveryReq ; + struct dinTransformsType Transforms ; + struct dinMeteringReceiptResType MeteringReceiptRes ; + struct dinPreChargeReqType PreChargeReq ; + struct { + uint8_t bytes[EXIFragment_OEMProvisioningCert_BYTES_SIZE]; + uint16_t bytesLen; + } OEMProvisioningCert ; + struct dinServiceDiscoveryResType ServiceDiscoveryRes ; + dinresponseCodeType ResponseCode ; + struct dinContractAuthenticationReqType ContractAuthenticationReq ; + struct dinCertificateChainType ContractSignatureCertChain ; + struct dinContractAuthenticationResType ContractAuthenticationRes ; + int64_t HMACOutputLength ; + int BulkChargingComplete ; struct { uint8_t bytes[EXIFragment_Exponent_BYTES_SIZE]; uint16_t bytesLen; } Exponent ; - struct dinSubCertificatesType SubCertificates ; - dinfaultCodeType FaultCode ; - dinEVRequestedEnergyTransferType EVRequestedEnergyTransferType ; - struct dinPhysicalValueType EVMinCurrent ; - int boolValue ; - struct { - uint8_t bytes[EXIFragment_J_BYTES_SIZE]; - uint16_t bytesLen; - } J ; - struct dinEVSEStatusType EVSEStatus ; - struct dinServicePaymentSelectionReqType ServicePaymentSelectionReq ; - struct dinTransformsType Transforms ; - struct { - uint8_t bytes[EXIFragment_X509CRL_BYTES_SIZE]; - uint16_t bytesLen; - } X509CRL ; - struct dinManifestType Manifest ; - struct dinPhysicalValueType EVSEMinimumVoltageLimit ; - struct dinPhysicalValueType EVSECurrentRegulationTolerance ; - struct dinPhysicalValueType EVMaximumPowerLimit ; - uint16_t ServiceID ; - struct dinAnonType_V2G_Message V2G_Message ; - struct dinParameterType Parameter ; - struct dinPhysicalValueType EVTargetCurrent ; - struct dinDigestMethodType DigestMethod ; - int8_t byteValue ; - struct dinPaymentOptionsType PaymentOptions ; - int ChargingComplete ; - int8_t Multiplier ; - dinisolationLevelType EVSEIsolationStatus ; - struct dinPhysicalValueType EVSEPeakCurrentRipple ; - int ReadyToChargeState ; + struct dinDC_EVStatusType DC_EVStatus ; + struct dinSAScheduleTupleType SAScheduleTuple ; + uint32_t DepartureTime ; struct dinX509IssuerSerialType X509IssuerSerial ; - uint32_t duration ; - uint32_t NotificationMaxDelay ; - struct dinServiceDetailResType ServiceDetailRes ; - dinEVSEProcessingType EVSEProcessing ; + int16_t SAScheduleTupleID ; + struct dinSPKIDataType SPKIData ; + struct dinRelativeTimeIntervalType RelativeTimeInterval ; + struct dinPhysicalValueType EVEnergyRequest ; + struct dinPreChargeResType PreChargeRes ; struct { - uint8_t bytes[EXIFragment_PGPKeyPacket_BYTES_SIZE]; + uint8_t bytes[EXIFragment_SessionID_BYTES_SIZE]; uint16_t bytesLen; - } PGPKeyPacket ; - struct dinServiceDetailReqType ServiceDetailReq ; - struct dinDC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ; + } SessionID ; + struct dinPMaxScheduleType PMaxSchedule ; + struct dinServiceChargeType ServiceCharge ; struct { uint8_t bytes[EXIFragment_PgenCounter_BYTES_SIZE]; uint16_t bytesLen; } PgenCounter ; - struct dinEVChargeParameterType EVChargeParameter ; - struct dinRelativeTimeIntervalType RelativeTimeInterval ; - struct dinSelectedServiceListType SelectedServiceList ; - int64_t X509SerialNumber ; - struct dinSalesTariffEntryType SalesTariffEntry ; - struct dinSAScheduleTupleType SAScheduleTuple ; - struct dinReferenceType Reference ; - struct dinSignedInfoType SignedInfo ; - struct dinCableCheckReqType CableCheckReq ; - struct dinPowerDeliveryReqType PowerDeliveryReq ; - struct dinEVPowerDeliveryParameterType EVPowerDeliveryParameter ; - struct dinMeteringReceiptReqType MeteringReceiptReq ; - struct dinDC_EVChargeParameterType DC_EVChargeParameter ; - struct dinKeyValueType KeyValue ; - struct { - uint8_t bytes[EXIFragment_Y_BYTES_SIZE]; - uint16_t bytesLen; - } Y ; - int16_t ChargingProfileEntryMaxPower ; - int EVRESSConditioning ; - struct dinPhysicalValueType EVSEMaximumVoltageLimit ; - uint8_t EPriceLevel ; - struct dinServiceTagListType ServiceList ; - int16_t SAScheduleTupleID ; - struct dinPMaxScheduleType PMaxSchedule ; - int EVSEPowerLimitAchieved ; - struct dinCertificateUpdateResType CertificateUpdateRes ; - struct dinPhysicalValueType EVSEEnergyToBeDelivered ; - struct dinAC_EVSEStatusType AC_EVSEStatus ; - struct dinServiceTagType ServiceTag ; - struct dinSignatureMethodType SignatureMethod ; - struct dinIntervalType TimeInterval ; - int8_t amountMultiplier ; + struct dinChargingStatusReqType ChargingStatusReq ; struct dinX509DataType X509Data ; - struct dinCertificateChainType ContractSignatureCertChain ; + struct dinSalesTariffEntryType SalesTariffEntry ; + struct dinKeyValueType KeyValue ; + struct dinChargingStatusResType ChargingStatusRes ; + struct dinAnonType_V2G_Message V2G_Message ; + struct dinServicePaymentSelectionReqType ServicePaymentSelectionReq ; + dinisolationLevelType EVSEIsolationStatus ; + struct dinServicePaymentSelectionResType ServicePaymentSelectionRes ; + struct dinPhysicalValueType EVSEPresentVoltage ; + struct dinBodyBaseType BodyElement ; + struct { + uint8_t bytes[EXIFragment_EVCCID_BYTES_SIZE]; + uint16_t bytesLen; + } EVCCID ; + struct dinPGPDataType PGPData ; + struct { + exi_string_character_t characters[EXIFragment_RootCertificateID_CHARACTERS_SIZE]; + uint16_t charactersLen; + } RootCertificateID ; + dinfaultCodeType FaultCode ; + struct dinCableCheckReqType CableCheckReq ; + int EVSEVoltageLimitAchieved ; + int EVRESSConditioning ; + struct dinMeterInfoType MeterInfo ; + struct dinCableCheckResType CableCheckRes ; + uint32_t ChargingProfileEntryStart ; + struct dinSignaturePropertyType SignatureProperty ; + struct dinPhysicalValueType EVMaxCurrent ; + struct { + uint8_t bytes[EXIFragment_PGPKeyPacket_BYTES_SIZE]; + uint16_t bytesLen; + } PGPKeyPacket ; struct { uint8_t bytes[EXIFragment_Seed_BYTES_SIZE]; uint16_t bytesLen; } Seed ; + struct dinRSAKeyValueType RSAKeyValue ; + dincostKindType costKind ; + struct dinPhysicalValueType EAmount ; + struct dinPhysicalValueType EVSEPresentCurrent ; + struct dinPowerDeliveryResType PowerDeliveryRes ; + uint8_t NumEPriceLevels ; + struct dinSessionStopResType SessionStopRes ; + struct dinPowerDeliveryReqType PowerDeliveryReq ; + struct dinSessionStopType SessionStopReq ; struct { - uint8_t bytes[EXIFragment_Modulus_BYTES_SIZE]; - uint16_t bytesLen; - } Modulus ; - dinserviceCategoryType ServiceCategory ; - int16_t MeterStatus ; - struct dinPhysicalValueType EVMaximumCurrentLimit ; - struct dinKeyInfoType KeyInfo ; - struct dinCertificateInstallationReqType CertificateInstallationReq ; - struct dinChargingProfileType ChargingProfile ; + exi_string_character_t characters[EXIFragment_XPath_CHARACTERS_SIZE]; + uint16_t charactersLen; + } XPath ; int8_t BulkSOC ; + int16_t PMax ; + int16_t ParameterSetID ; struct { - exi_string_character_t characters[EXIFragment_X509IssuerName_CHARACTERS_SIZE]; + exi_string_character_t characters[EXIFragment_ContractID_CHARACTERS_SIZE]; uint16_t charactersLen; - } X509IssuerName ; - int8_t EVRESSSOC ; - struct { - exi_string_character_t characters[EXIFragment_X509SubjectName_CHARACTERS_SIZE]; - uint16_t charactersLen; - } X509SubjectName ; - struct dinAC_EVSEChargeParameterType AC_EVSEChargeParameter ; + } ContractID ; + struct dinSignatureType Signature ; + struct dinPhysicalValueType EVMaxVoltage ; + int ReceiptRequired ; + int ChargingComplete ; + struct dinChargingProfileType ChargingProfile ; + struct dinPaymentOptionsType PaymentOptions ; + struct dinSessionSetupResType SessionSetupRes ; + struct dinServiceDetailResType ServiceDetailRes ; + struct dinDC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ; + struct dinPaymentDetailsResType PaymentDetailsRes ; + struct dinPaymentDetailsReqType PaymentDetailsReq ; struct { exi_string_character_t characters[EXIFragment_MgmtData_CHARACTERS_SIZE]; uint16_t charactersLen; } MgmtData ; int16_t Value ; - struct dinChargingStatusResType ChargingStatusRes ; - struct { - exi_string_character_t characters[EXIFragment_ServiceName_CHARACTERS_SIZE]; - uint16_t charactersLen; - } ServiceName ; - int FreeService ; - struct dinPhysicalValueType physicalValue ; - struct dinPhysicalValueType EVSEMaxVoltage ; - int32_t intValue ; - struct { - uint8_t bytes[EXIFragment_PGPKeyID_BYTES_SIZE]; - uint16_t bytesLen; - } PGPKeyID ; - struct dinChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ; - struct dinMeteringReceiptResType MeteringReceiptRes ; - struct { - uint8_t bytes[EXIFragment_EVSEID_BYTES_SIZE]; - uint16_t bytesLen; - } EVSEID ; - dincostKindType costKind ; - struct { - uint8_t bytes[EXIFragment_X509SKI_BYTES_SIZE]; - uint16_t bytesLen; - } X509SKI ; - struct { - exi_string_character_t characters[EXIFragment_MeterID_CHARACTERS_SIZE]; - uint16_t charactersLen; - } MeterID ; - struct { - uint8_t bytes[EXIFragment_OEMProvisioningCert_BYTES_SIZE]; - uint16_t bytesLen; - } OEMProvisioningCert ; - struct dinEntryType Entry ; - struct dinSignaturePropertiesType SignatureProperties ; + dinEVSENotificationType EVSENotification ; + struct dinPhysicalValueType EVTargetCurrent ; + struct dinPhysicalValueType RemainingTimeToBulkSoC ; + struct dinSessionSetupReqType SessionSetupReq ; + int EVSECurrentLimitAchieved ; + struct dinServiceDetailReqType ServiceDetailReq ; + int8_t byteValue ; + struct dinPhysicalValueType EVMaximumPowerLimit ; + int PowerSwitchClosed ; + struct dinManifestType Manifest ; struct { uint8_t bytes[EXIFragment_P_BYTES_SIZE]; uint16_t bytesLen; } P ; - struct dinPreChargeReqType PreChargeReq ; - struct dinSignatureValueType SignatureValue ; - dinEVSENotificationType EVSENotification ; - int BulkChargingComplete ; - int RCD ; - struct dinServiceParameterListType ServiceParameterList ; - struct dinSelectedServiceType SelectedService ; - dinresponseCodeType ResponseCode ; - struct dinSessionStopResType SessionStopRes ; - struct dinPGPDataType PGPData ; - struct dinPhysicalValueType EVEnergyCapacity ; - uint32_t startValue ; - struct dinServicePaymentSelectionResType ServicePaymentSelectionRes ; - dinEVSESupportedEnergyTransferType EnergyTransferType ; - struct dinListOfRootCertificateIDsType ListOfRootCertificateIDs ; - uint8_t NumEPriceLevels ; - dinDC_EVSEStatusCodeType EVSEStatusCode ; - struct dinSASchedulesType SASchedules ; - struct dinDC_EVStatusType DC_EVStatus ; - struct dinDC_EVSEChargeParameterType DC_EVSEChargeParameter ; - struct dinMeterInfoType MeterInfo ; - struct { - uint8_t bytes[EXIFragment_X509Certificate_BYTES_SIZE]; - uint16_t bytesLen; - } X509Certificate ; - int16_t shortValue ; - struct { - uint8_t bytes[EXIFragment_SPKISexp_BYTES_SIZE]; - uint16_t bytesLen; - } SPKISexp ; - int16_t SalesTariffID ; - struct dinCanonicalizationMethodType CanonicalizationMethod ; - int64_t TMeter ; - struct dinPaymentDetailsResType PaymentDetailsRes ; - struct { - uint8_t bytes[EXIFragment_EVCCID_BYTES_SIZE]; - uint16_t bytesLen; - } EVCCID ; - struct dinPhysicalValueType EVSEMaximumPowerLimit ; - struct dinEVSEChargeParameterType EVSEChargeParameter ; - struct dinBodyType Body ; - int64_t DateTimeNow ; - struct dinSPKIDataType SPKIData ; - struct dinObjectType Object ; - struct dinServiceChargeType ServiceCharge ; - struct { - uint8_t bytes[EXIFragment_SessionID_BYTES_SIZE]; - uint16_t bytesLen; - } SessionID ; - int8_t FullSOC ; struct dinSAScheduleListType SAScheduleList ; - struct dinPhysicalValueType EVSEMaximumCurrentLimit ; - struct dinDSAKeyValueType DSAKeyValue ; - struct dinChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ; - struct dinEVStatusType EVStatus ; struct { - exi_string_character_t characters[EXIFragment_stringValue_CHARACTERS_SIZE]; - uint16_t charactersLen; - } stringValue ; - struct dinPowerDeliveryResType PowerDeliveryRes ; - struct { - uint8_t bytes[EXIFragment_ContractSignatureEncryptedPrivateKey_BYTES_SIZE]; + uint8_t bytes[EXIFragment_Q_BYTES_SIZE]; uint16_t bytesLen; - } ContractSignatureEncryptedPrivateKey ; - struct dinCertificateUpdateReqType CertificateUpdateReq ; - struct dinSignatureType Signature ; - struct dinContractAuthenticationResType ContractAuthenticationRes ; - struct dinTransformType Transform ; - dinpaymentOptionType PaymentOption ; + } Q ; + struct { + exi_string_character_t characters[EXIFragment_X509SubjectName_CHARACTERS_SIZE]; + uint16_t charactersLen; + } X509SubjectName ; struct { uint8_t bytes[EXIFragment_G_BYTES_SIZE]; uint16_t bytesLen; } G ; - int ReceiptRequired ; - dinunitSymbolType Unit ; - struct dinConsumptionCostType ConsumptionCost ; - struct dinPhysicalValueType EVSEMaxCurrent ; struct { - exi_string_character_t characters[EXIFragment_SalesTariffDescription_CHARACTERS_SIZE]; - uint16_t charactersLen; - } SalesTariffDescription ; + uint8_t bytes[EXIFragment_J_BYTES_SIZE]; + uint16_t bytesLen; + } J ; + struct dinCertificateInstallationResType CertificateInstallationRes ; + struct dinCertificateInstallationReqType CertificateInstallationReq ; + struct dinSalesTariffType SalesTariff ; + struct dinMessageHeaderType Header ; + struct dinPhysicalValueType EVSEMinimumCurrentLimit ; struct { - exi_string_character_t characters[EXIFragment_ContractID_CHARACTERS_SIZE]; - uint16_t charactersLen; - } ContractID ; - struct dinAC_EVChargeParameterType AC_EVChargeParameter ; - struct dinPhysicalValueType RemainingTimeToBulkSoC ; - struct dinDC_EVSEStatusType DC_EVSEStatus ; - struct dinCableCheckResType CableCheckRes ; - struct dinPhysicalValueType RemainingTimeToFullSoC ; - struct dinPhysicalValueType EVSEPresentVoltage ; - struct dinSessionSetupReqType SessionSetupReq ; - struct dinPreChargeResType PreChargeRes ; + uint8_t bytes[EXIFragment_X509CRL_BYTES_SIZE]; + uint16_t bytesLen; + } X509CRL ; struct { - exi_string_character_t characters[EXIFragment_KeyName_CHARACTERS_SIZE]; - uint16_t charactersLen; - } KeyName ; - int EVReady ; - struct dinCurrentDemandResType CurrentDemandRes ; - struct dinPMaxScheduleEntryType PMaxScheduleEntry ; - struct dinServiceDiscoveryResType ServiceDiscoveryRes ; - struct dinPaymentDetailsReqType PaymentDetailsReq ; - dinpaymentOptionType SelectedPaymentOption ; + uint8_t bytes[EXIFragment_Y_BYTES_SIZE]; + uint16_t bytesLen; + } Y ; struct { uint8_t bytes[EXIFragment_DigestValue_BYTES_SIZE]; uint16_t bytesLen; } DigestValue ; - int16_t RetryCounter ; - struct dinSalesTariffType SalesTariff ; - struct dinWeldingDetectionReqType WeldingDetectionReq ; + struct dinDC_EVChargeParameterType DC_EVChargeParameter ; struct { - uint8_t bytes[EXIFragment_SigMeterReading_BYTES_SIZE]; + uint8_t bytes[EXIFragment_ContractSignatureEncryptedPrivateKey_BYTES_SIZE]; uint16_t bytesLen; - } SigMeterReading ; + } ContractSignatureEncryptedPrivateKey ; + struct dinDigestMethodType DigestMethod ; struct { - exi_string_character_t characters[EXIFragment_FaultMsg_CHARACTERS_SIZE]; - uint16_t charactersLen; - } FaultMsg ; - int16_t PMax ; - int PowerSwitchClosed ; - int16_t ParameterSetID ; - struct dinPhysicalValueType EAmount ; - struct dinRetrievalMethodType RetrievalMethod ; - uint32_t ChargingProfileEntryStart ; - struct dinServiceDiscoveryReqType ServiceDiscoveryReq ; - uint32_t DepartureTime ; - struct dinPhysicalValueType EVSEMinimumCurrentLimit ; - struct dinCurrentDemandReqType CurrentDemandReq ; + uint8_t bytes[EXIFragment_SPKISexp_BYTES_SIZE]; + uint16_t bytesLen; + } SPKISexp ; struct dinServiceChargeType ChargeService ; - struct dinBodyBaseType BodyElement ; - struct dinCostType Cost ; - int64_t HMACOutputLength ; - struct dinPhysicalValueType MeterReading ; + struct dinPhysicalValueType EVSEEnergyToBeDelivered ; + struct dinSignaturePropertiesType SignatureProperties ; + struct dinPhysicalValueType EVSEMaxCurrent ; + struct dinEVSEStatusType EVSEStatus ; + struct dinServiceType Service ; struct { uint8_t bytes[EXIFragment_DHParams_BYTES_SIZE]; uint16_t bytesLen; } DHParams ; - struct dinSignaturePropertyType SignatureProperty ; - struct dinServiceType Service ; - int16_t PMaxScheduleID ; - struct dinPhysicalValueType EVSEPresentCurrent ; - int EVSEVoltageLimitAchieved ; - struct dinSessionSetupResType SessionSetupRes ; - struct dinSessionStopType SessionStopReq ; - struct dinContractAuthenticationReqType ContractAuthenticationReq ; - struct dinProfileEntryType ProfileEntry ; - dinDC_EVErrorCodeType EVErrorCode ; struct { - exi_string_character_t characters[EXIFragment_RootCertificateID_CHARACTERS_SIZE]; - uint16_t charactersLen; - } RootCertificateID ; - struct dinPhysicalValueType EVSEMinCurrent ; + uint8_t bytes[EXIFragment_PGPKeyID_BYTES_SIZE]; + uint16_t bytesLen; + } PGPKeyID ; + struct dinDSAKeyValueType DSAKeyValue ; + dinEVSESupportedEnergyTransferType EnergyTransferType ; + struct dinWeldingDetectionResType WeldingDetectionRes ; + int FreeService ; + struct dinSelectedServiceListType SelectedServiceList ; + struct dinWeldingDetectionReqType WeldingDetectionReq ; struct dinPhysicalValueType EVTargetVoltage ; - struct dinChargingStatusReqType ChargingStatusReq ; - struct dinMessageHeaderType Header ; + struct dinCanonicalizationMethodType CanonicalizationMethod ; + struct { + uint8_t bytes[EXIFragment_X509Certificate_BYTES_SIZE]; + uint16_t bytesLen; + } X509Certificate ; + struct dinCertificateUpdateResType CertificateUpdateRes ; + struct dinCertificateUpdateReqType CertificateUpdateReq ; + struct dinPhysicalValueType EVSEMaxVoltage ; + struct dinSignedInfoType SignedInfo ; + struct dinAC_EVSEChargeParameterType AC_EVSEChargeParameter ; + struct dinPhysicalValueType EVEnergyCapacity ; + uint16_t ServiceID ; + struct dinPhysicalValueType EVSECurrentRegulationTolerance ; + struct dinServiceParameterListType ServiceParameterList ; + struct dinListOfRootCertificateIDsType ListOfRootCertificateIDs ; + struct dinProfileEntryType ProfileEntry ; + struct dinPhysicalValueType EVSEMinimumVoltageLimit ; + struct dinCurrentDemandResType CurrentDemandRes ; + int8_t EVRESSSOC ; + struct dinPhysicalValueType MeterReading ; + struct dinCurrentDemandReqType CurrentDemandReq ; + struct dinPhysicalValueType physicalValue ; + struct dinIntervalType TimeInterval ; + struct dinAC_EVSEStatusType AC_EVSEStatus ; + struct dinPhysicalValueType EVMaximumVoltageLimit ; + struct dinSignatureValueType SignatureValue ; + int64_t DateTimeNow ; + struct dinServiceTagType ServiceTag ; + int32_t intValue ; + dinpaymentOptionType SelectedPaymentOption ; + struct { + exi_string_character_t characters[EXIFragment_ServiceName_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ServiceName ; + int EVCabinConditioning ; + struct { + uint8_t bytes[EXIFragment_EVSEID_BYTES_SIZE]; + uint16_t bytesLen; + } EVSEID ; + struct { + exi_string_character_t characters[EXIFragment_ServiceScope_CHARACTERS_SIZE]; + uint16_t charactersLen; + } ServiceScope ; + int16_t MeterStatus ; + dinEVRequestedEnergyTransferType EVRequestedEnergyTransferType ; + dinserviceCategoryType ServiceCategory ; struct { exi_string_character_t characters[EXIFragment_GenChallenge_CHARACTERS_SIZE]; uint16_t charactersLen; } GenChallenge ; struct { - exi_string_character_t characters[EXIFragment_XPath_CHARACTERS_SIZE]; + exi_string_character_t characters[EXIFragment_SalesTariffDescription_CHARACTERS_SIZE]; uint16_t charactersLen; - } XPath ; + } SalesTariffDescription ; + uint32_t NotificationMaxDelay ; + int boolValue ; + dinDC_EVSEStatusCodeType EVSEStatusCode ; struct { - uint8_t bytes[EXIFragment_Q_BYTES_SIZE]; + exi_string_character_t characters[EXIFragment_FaultMsg_CHARACTERS_SIZE]; + uint16_t charactersLen; + } FaultMsg ; + struct { + exi_string_character_t characters[EXIFragment_KeyName_CHARACTERS_SIZE]; + uint16_t charactersLen; + } KeyName ; + struct dinParameterSetType ParameterSet ; + struct { + uint8_t bytes[EXIFragment_SigMeterReading_BYTES_SIZE]; uint16_t bytesLen; - } Q ; - struct dinWeldingDetectionResType WeldingDetectionRes ; + } SigMeterReading ; + struct dinEVSEChargeParameterType EVSEChargeParameter ; + struct dinBodyType Body ; + struct dinSASchedulesType SASchedules ; + struct dinKeyInfoType KeyInfo ; + int16_t PMaxScheduleID ; + struct dinPhysicalValueType RemainingTimeToFullSoC ; + struct dinEVStatusType EVStatus ; + struct dinSubCertificatesType SubCertificates ; + dinpaymentOptionType PaymentOption ; + struct { + uint8_t bytes[EXIFragment_X509SKI_BYTES_SIZE]; + uint16_t bytesLen; + } X509SKI ; + struct dinServiceTagListType ServiceList ; + struct dinCostType Cost ; + struct dinSignatureMethodType SignatureMethod ; + struct dinPhysicalValueType EVSEMinCurrent ; + struct dinConsumptionCostType ConsumptionCost ; + struct dinPhysicalValueType EVSEPeakCurrentRipple ; + dinDC_EVErrorCodeType EVErrorCode ; + struct dinEVChargeParameterType EVChargeParameter ; + uint32_t start ; + struct { + exi_string_character_t characters[EXIFragment_X509IssuerName_CHARACTERS_SIZE]; + uint16_t charactersLen; + } X509IssuerName ; + struct dinReferenceType Reference ; + struct dinPhysicalValueType EVMinCurrent ; + int8_t FullSOC ; + uint32_t amount ; + int16_t shortValue ; + struct dinDC_EVSEChargeParameterType DC_EVSEChargeParameter ; + struct dinEntryType Entry ; + int16_t SalesTariffID ; + struct { + exi_string_character_t characters[EXIFragment_MeterID_CHARACTERS_SIZE]; + uint16_t charactersLen; + } MeterID ; + struct dinChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ; + int8_t amountMultiplier ; + struct dinChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ; + struct dinTransformType Transform ; + struct dinObjectType Object ; + int RCD ; + struct dinNotificationType Notification ; + uint32_t startValue ; + struct { + uint8_t bytes[EXIFragment_Modulus_BYTES_SIZE]; + uint16_t bytesLen; + } Modulus ; #if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES }; #endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */ - unsigned int RSAKeyValue_isUsed:1; - unsigned int ParameterSet_isUsed:1; - unsigned int EVEnergyRequest_isUsed:1; - unsigned int amount_isUsed:1; - unsigned int start_isUsed:1; - unsigned int Notification_isUsed:1; - unsigned int ServiceScope_isUsed:1; - unsigned int EVMaximumVoltageLimit_isUsed:1; - unsigned int Certificate_isUsed:1; - unsigned int EVCabinConditioning_isUsed:1; - unsigned int EVSECurrentLimitAchieved_isUsed:1; - unsigned int EVMaxCurrent_isUsed:1; - unsigned int CertificateInstallationRes_isUsed:1; - unsigned int EVMaxVoltage_isUsed:1; - unsigned int Exponent_isUsed:1; - unsigned int SubCertificates_isUsed:1; - unsigned int FaultCode_isUsed:1; - unsigned int EVRequestedEnergyTransferType_isUsed:1; - unsigned int EVMinCurrent_isUsed:1; - unsigned int boolValue_isUsed:1; - unsigned int J_isUsed:1; - unsigned int EVSEStatus_isUsed:1; - unsigned int ServicePaymentSelectionReq_isUsed:1; - unsigned int Transforms_isUsed:1; - unsigned int X509CRL_isUsed:1; - unsigned int Manifest_isUsed:1; - unsigned int EVSEMinimumVoltageLimit_isUsed:1; - unsigned int EVSECurrentRegulationTolerance_isUsed:1; - unsigned int EVMaximumPowerLimit_isUsed:1; - unsigned int ServiceID_isUsed:1; - unsigned int V2G_Message_isUsed:1; - unsigned int Parameter_isUsed:1; - unsigned int EVTargetCurrent_isUsed:1; - unsigned int DigestMethod_isUsed:1; - unsigned int byteValue_isUsed:1; - unsigned int PaymentOptions_isUsed:1; - unsigned int ChargingComplete_isUsed:1; - unsigned int Multiplier_isUsed:1; - unsigned int EVSEIsolationStatus_isUsed:1; - unsigned int EVSEPeakCurrentRipple_isUsed:1; - unsigned int ReadyToChargeState_isUsed:1; - unsigned int X509IssuerSerial_isUsed:1; - unsigned int duration_isUsed:1; - unsigned int NotificationMaxDelay_isUsed:1; - unsigned int ServiceDetailRes_isUsed:1; - unsigned int EVSEProcessing_isUsed:1; - unsigned int PGPKeyPacket_isUsed:1; - unsigned int ServiceDetailReq_isUsed:1; - unsigned int DC_EVPowerDeliveryParameter_isUsed:1; - unsigned int PgenCounter_isUsed:1; - unsigned int EVChargeParameter_isUsed:1; - unsigned int RelativeTimeInterval_isUsed:1; - unsigned int SelectedServiceList_isUsed:1; - unsigned int X509SerialNumber_isUsed:1; - unsigned int SalesTariffEntry_isUsed:1; - unsigned int SAScheduleTuple_isUsed:1; - unsigned int Reference_isUsed:1; - unsigned int SignedInfo_isUsed:1; - unsigned int CableCheckReq_isUsed:1; - unsigned int PowerDeliveryReq_isUsed:1; + unsigned int Unit_isUsed:1; + unsigned int EVSEMaximumCurrentLimit_isUsed:1; unsigned int EVPowerDeliveryParameter_isUsed:1; - unsigned int MeteringReceiptReq_isUsed:1; - unsigned int DC_EVChargeParameter_isUsed:1; - unsigned int KeyValue_isUsed:1; - unsigned int Y_isUsed:1; unsigned int ChargingProfileEntryMaxPower_isUsed:1; - unsigned int EVRESSConditioning_isUsed:1; - unsigned int EVSEMaximumVoltageLimit_isUsed:1; - unsigned int EPriceLevel_isUsed:1; - unsigned int ServiceList_isUsed:1; - unsigned int SAScheduleTupleID_isUsed:1; - unsigned int PMaxSchedule_isUsed:1; + unsigned int TMeter_isUsed:1; unsigned int EVSEPowerLimitAchieved_isUsed:1; - unsigned int CertificateUpdateRes_isUsed:1; - unsigned int EVSEEnergyToBeDelivered_isUsed:1; - unsigned int AC_EVSEStatus_isUsed:1; - unsigned int ServiceTag_isUsed:1; - unsigned int SignatureMethod_isUsed:1; - unsigned int TimeInterval_isUsed:1; - unsigned int amountMultiplier_isUsed:1; - unsigned int X509Data_isUsed:1; - unsigned int ContractSignatureCertChain_isUsed:1; - unsigned int Seed_isUsed:1; - unsigned int Modulus_isUsed:1; - unsigned int ServiceCategory_isUsed:1; - unsigned int MeterStatus_isUsed:1; + unsigned int duration_isUsed:1; unsigned int EVMaximumCurrentLimit_isUsed:1; - unsigned int KeyInfo_isUsed:1; - unsigned int CertificateInstallationReq_isUsed:1; - unsigned int ChargingProfile_isUsed:1; + unsigned int Parameter_isUsed:1; + unsigned int EVSEProcessing_isUsed:1; + unsigned int AC_EVChargeParameter_isUsed:1; + unsigned int PMaxScheduleEntry_isUsed:1; + unsigned int EVSEMaximumVoltageLimit_isUsed:1; + unsigned int SelectedService_isUsed:1; + unsigned int Certificate_isUsed:1; + unsigned int EVSEMaximumPowerLimit_isUsed:1; + unsigned int EVReady_isUsed:1; + unsigned int X509SerialNumber_isUsed:1; + unsigned int RetrievalMethod_isUsed:1; + unsigned int RetryCounter_isUsed:1; + unsigned int DC_EVSEStatus_isUsed:1; + unsigned int MeteringReceiptReq_isUsed:1; + unsigned int ReadyToChargeState_isUsed:1; + unsigned int Multiplier_isUsed:1; + unsigned int EPriceLevel_isUsed:1; + unsigned int stringValue_isUsed:1; + unsigned int ServiceDiscoveryReq_isUsed:1; + unsigned int Transforms_isUsed:1; + unsigned int MeteringReceiptRes_isUsed:1; + unsigned int PreChargeReq_isUsed:1; + unsigned int OEMProvisioningCert_isUsed:1; + unsigned int ServiceDiscoveryRes_isUsed:1; + unsigned int ResponseCode_isUsed:1; + unsigned int ContractAuthenticationReq_isUsed:1; + unsigned int ContractSignatureCertChain_isUsed:1; + unsigned int ContractAuthenticationRes_isUsed:1; + unsigned int HMACOutputLength_isUsed:1; + unsigned int BulkChargingComplete_isUsed:1; + unsigned int Exponent_isUsed:1; + unsigned int DC_EVStatus_isUsed:1; + unsigned int SAScheduleTuple_isUsed:1; + unsigned int DepartureTime_isUsed:1; + unsigned int X509IssuerSerial_isUsed:1; + unsigned int SAScheduleTupleID_isUsed:1; + unsigned int SPKIData_isUsed:1; + unsigned int RelativeTimeInterval_isUsed:1; + unsigned int EVEnergyRequest_isUsed:1; + unsigned int PreChargeRes_isUsed:1; + unsigned int SessionID_isUsed:1; + unsigned int PMaxSchedule_isUsed:1; + unsigned int ServiceCharge_isUsed:1; + unsigned int PgenCounter_isUsed:1; + unsigned int ChargingStatusReq_isUsed:1; + unsigned int X509Data_isUsed:1; + unsigned int SalesTariffEntry_isUsed:1; + unsigned int KeyValue_isUsed:1; + unsigned int ChargingStatusRes_isUsed:1; + unsigned int V2G_Message_isUsed:1; + unsigned int ServicePaymentSelectionReq_isUsed:1; + unsigned int EVSEIsolationStatus_isUsed:1; + unsigned int ServicePaymentSelectionRes_isUsed:1; + unsigned int EVSEPresentVoltage_isUsed:1; + unsigned int BodyElement_isUsed:1; + unsigned int EVCCID_isUsed:1; + unsigned int PGPData_isUsed:1; + unsigned int RootCertificateID_isUsed:1; + unsigned int FaultCode_isUsed:1; + unsigned int CableCheckReq_isUsed:1; + unsigned int EVSEVoltageLimitAchieved_isUsed:1; + unsigned int EVRESSConditioning_isUsed:1; + unsigned int MeterInfo_isUsed:1; + unsigned int CableCheckRes_isUsed:1; + unsigned int ChargingProfileEntryStart_isUsed:1; + unsigned int SignatureProperty_isUsed:1; + unsigned int EVMaxCurrent_isUsed:1; + unsigned int PGPKeyPacket_isUsed:1; + unsigned int Seed_isUsed:1; + unsigned int RSAKeyValue_isUsed:1; + unsigned int costKind_isUsed:1; + unsigned int EAmount_isUsed:1; + unsigned int EVSEPresentCurrent_isUsed:1; + unsigned int PowerDeliveryRes_isUsed:1; + unsigned int NumEPriceLevels_isUsed:1; + unsigned int SessionStopRes_isUsed:1; + unsigned int PowerDeliveryReq_isUsed:1; + unsigned int SessionStopReq_isUsed:1; + unsigned int XPath_isUsed:1; unsigned int BulkSOC_isUsed:1; - unsigned int X509IssuerName_isUsed:1; - unsigned int EVRESSSOC_isUsed:1; - unsigned int X509SubjectName_isUsed:1; - unsigned int AC_EVSEChargeParameter_isUsed:1; + unsigned int PMax_isUsed:1; + unsigned int ParameterSetID_isUsed:1; + unsigned int ContractID_isUsed:1; + unsigned int Signature_isUsed:1; + unsigned int EVMaxVoltage_isUsed:1; + unsigned int ReceiptRequired_isUsed:1; + unsigned int ChargingComplete_isUsed:1; + unsigned int ChargingProfile_isUsed:1; + unsigned int PaymentOptions_isUsed:1; + unsigned int SessionSetupRes_isUsed:1; + unsigned int ServiceDetailRes_isUsed:1; + unsigned int DC_EVPowerDeliveryParameter_isUsed:1; + unsigned int PaymentDetailsRes_isUsed:1; + unsigned int PaymentDetailsReq_isUsed:1; unsigned int MgmtData_isUsed:1; unsigned int Value_isUsed:1; - unsigned int ChargingStatusRes_isUsed:1; - unsigned int ServiceName_isUsed:1; - unsigned int FreeService_isUsed:1; - unsigned int physicalValue_isUsed:1; - unsigned int EVSEMaxVoltage_isUsed:1; - unsigned int intValue_isUsed:1; - unsigned int PGPKeyID_isUsed:1; - unsigned int ChargeParameterDiscoveryRes_isUsed:1; - unsigned int MeteringReceiptRes_isUsed:1; - unsigned int EVSEID_isUsed:1; - unsigned int costKind_isUsed:1; - unsigned int X509SKI_isUsed:1; - unsigned int MeterID_isUsed:1; - unsigned int OEMProvisioningCert_isUsed:1; - unsigned int Entry_isUsed:1; - unsigned int SignatureProperties_isUsed:1; - unsigned int P_isUsed:1; - unsigned int PreChargeReq_isUsed:1; - unsigned int SignatureValue_isUsed:1; unsigned int EVSENotification_isUsed:1; - unsigned int BulkChargingComplete_isUsed:1; - unsigned int RCD_isUsed:1; - unsigned int ServiceParameterList_isUsed:1; - unsigned int SelectedService_isUsed:1; - unsigned int ResponseCode_isUsed:1; - unsigned int SessionStopRes_isUsed:1; - unsigned int PGPData_isUsed:1; - unsigned int EVEnergyCapacity_isUsed:1; - unsigned int startValue_isUsed:1; - unsigned int ServicePaymentSelectionRes_isUsed:1; - unsigned int EnergyTransferType_isUsed:1; - unsigned int ListOfRootCertificateIDs_isUsed:1; - unsigned int NumEPriceLevels_isUsed:1; - unsigned int EVSEStatusCode_isUsed:1; - unsigned int SASchedules_isUsed:1; - unsigned int DC_EVStatus_isUsed:1; - unsigned int DC_EVSEChargeParameter_isUsed:1; - unsigned int MeterInfo_isUsed:1; - unsigned int X509Certificate_isUsed:1; - unsigned int shortValue_isUsed:1; + unsigned int EVTargetCurrent_isUsed:1; + unsigned int RemainingTimeToBulkSoC_isUsed:1; + unsigned int SessionSetupReq_isUsed:1; + unsigned int EVSECurrentLimitAchieved_isUsed:1; + unsigned int ServiceDetailReq_isUsed:1; + unsigned int byteValue_isUsed:1; + unsigned int EVMaximumPowerLimit_isUsed:1; + unsigned int PowerSwitchClosed_isUsed:1; + unsigned int Manifest_isUsed:1; + unsigned int P_isUsed:1; + unsigned int SAScheduleList_isUsed:1; + unsigned int Q_isUsed:1; + unsigned int X509SubjectName_isUsed:1; + unsigned int G_isUsed:1; + unsigned int J_isUsed:1; + unsigned int CertificateInstallationRes_isUsed:1; + unsigned int CertificateInstallationReq_isUsed:1; + unsigned int SalesTariff_isUsed:1; + unsigned int Header_isUsed:1; + unsigned int EVSEMinimumCurrentLimit_isUsed:1; + unsigned int X509CRL_isUsed:1; + unsigned int Y_isUsed:1; + unsigned int DigestValue_isUsed:1; + unsigned int DC_EVChargeParameter_isUsed:1; + unsigned int ContractSignatureEncryptedPrivateKey_isUsed:1; + unsigned int DigestMethod_isUsed:1; unsigned int SPKISexp_isUsed:1; - unsigned int SalesTariffID_isUsed:1; + unsigned int ChargeService_isUsed:1; + unsigned int EVSEEnergyToBeDelivered_isUsed:1; + unsigned int SignatureProperties_isUsed:1; + unsigned int EVSEMaxCurrent_isUsed:1; + unsigned int EVSEStatus_isUsed:1; + unsigned int Service_isUsed:1; + unsigned int DHParams_isUsed:1; + unsigned int PGPKeyID_isUsed:1; + unsigned int DSAKeyValue_isUsed:1; + unsigned int EnergyTransferType_isUsed:1; + unsigned int WeldingDetectionRes_isUsed:1; + unsigned int FreeService_isUsed:1; + unsigned int SelectedServiceList_isUsed:1; + unsigned int WeldingDetectionReq_isUsed:1; + unsigned int EVTargetVoltage_isUsed:1; unsigned int CanonicalizationMethod_isUsed:1; - unsigned int TMeter_isUsed:1; - unsigned int PaymentDetailsRes_isUsed:1; - unsigned int EVCCID_isUsed:1; - unsigned int EVSEMaximumPowerLimit_isUsed:1; + unsigned int X509Certificate_isUsed:1; + unsigned int CertificateUpdateRes_isUsed:1; + unsigned int CertificateUpdateReq_isUsed:1; + unsigned int EVSEMaxVoltage_isUsed:1; + unsigned int SignedInfo_isUsed:1; + unsigned int AC_EVSEChargeParameter_isUsed:1; + unsigned int EVEnergyCapacity_isUsed:1; + unsigned int ServiceID_isUsed:1; + unsigned int EVSECurrentRegulationTolerance_isUsed:1; + unsigned int ServiceParameterList_isUsed:1; + unsigned int ListOfRootCertificateIDs_isUsed:1; + unsigned int ProfileEntry_isUsed:1; + unsigned int EVSEMinimumVoltageLimit_isUsed:1; + unsigned int CurrentDemandRes_isUsed:1; + unsigned int EVRESSSOC_isUsed:1; + unsigned int MeterReading_isUsed:1; + unsigned int CurrentDemandReq_isUsed:1; + unsigned int physicalValue_isUsed:1; + unsigned int TimeInterval_isUsed:1; + unsigned int AC_EVSEStatus_isUsed:1; + unsigned int EVMaximumVoltageLimit_isUsed:1; + unsigned int SignatureValue_isUsed:1; + unsigned int DateTimeNow_isUsed:1; + unsigned int ServiceTag_isUsed:1; + unsigned int intValue_isUsed:1; + unsigned int SelectedPaymentOption_isUsed:1; + unsigned int ServiceName_isUsed:1; + unsigned int EVCabinConditioning_isUsed:1; + unsigned int EVSEID_isUsed:1; + unsigned int ServiceScope_isUsed:1; + unsigned int MeterStatus_isUsed:1; + unsigned int EVRequestedEnergyTransferType_isUsed:1; + unsigned int ServiceCategory_isUsed:1; + unsigned int GenChallenge_isUsed:1; + unsigned int SalesTariffDescription_isUsed:1; + unsigned int NotificationMaxDelay_isUsed:1; + unsigned int boolValue_isUsed:1; + unsigned int EVSEStatusCode_isUsed:1; + unsigned int FaultMsg_isUsed:1; + unsigned int KeyName_isUsed:1; + unsigned int ParameterSet_isUsed:1; + unsigned int SigMeterReading_isUsed:1; unsigned int EVSEChargeParameter_isUsed:1; unsigned int Body_isUsed:1; - unsigned int DateTimeNow_isUsed:1; - unsigned int SPKIData_isUsed:1; - unsigned int Object_isUsed:1; - unsigned int ServiceCharge_isUsed:1; - unsigned int SessionID_isUsed:1; - unsigned int FullSOC_isUsed:1; - unsigned int SAScheduleList_isUsed:1; - unsigned int EVSEMaximumCurrentLimit_isUsed:1; - unsigned int DSAKeyValue_isUsed:1; - unsigned int ChargeParameterDiscoveryReq_isUsed:1; - unsigned int EVStatus_isUsed:1; - unsigned int stringValue_isUsed:1; - unsigned int PowerDeliveryRes_isUsed:1; - unsigned int ContractSignatureEncryptedPrivateKey_isUsed:1; - unsigned int CertificateUpdateReq_isUsed:1; - unsigned int Signature_isUsed:1; - unsigned int ContractAuthenticationRes_isUsed:1; - unsigned int Transform_isUsed:1; - unsigned int PaymentOption_isUsed:1; - unsigned int G_isUsed:1; - unsigned int ReceiptRequired_isUsed:1; - unsigned int Unit_isUsed:1; - unsigned int ConsumptionCost_isUsed:1; - unsigned int EVSEMaxCurrent_isUsed:1; - unsigned int SalesTariffDescription_isUsed:1; - unsigned int ContractID_isUsed:1; - unsigned int AC_EVChargeParameter_isUsed:1; - unsigned int RemainingTimeToBulkSoC_isUsed:1; - unsigned int DC_EVSEStatus_isUsed:1; - unsigned int CableCheckRes_isUsed:1; - unsigned int RemainingTimeToFullSoC_isUsed:1; - unsigned int EVSEPresentVoltage_isUsed:1; - unsigned int SessionSetupReq_isUsed:1; - unsigned int PreChargeRes_isUsed:1; - unsigned int KeyName_isUsed:1; - unsigned int EVReady_isUsed:1; - unsigned int CurrentDemandRes_isUsed:1; - unsigned int PMaxScheduleEntry_isUsed:1; - unsigned int ServiceDiscoveryRes_isUsed:1; - unsigned int PaymentDetailsReq_isUsed:1; - unsigned int SelectedPaymentOption_isUsed:1; - unsigned int DigestValue_isUsed:1; - unsigned int RetryCounter_isUsed:1; - unsigned int SalesTariff_isUsed:1; - unsigned int WeldingDetectionReq_isUsed:1; - unsigned int SigMeterReading_isUsed:1; - unsigned int FaultMsg_isUsed:1; - unsigned int PMax_isUsed:1; - unsigned int PowerSwitchClosed_isUsed:1; - unsigned int ParameterSetID_isUsed:1; - unsigned int EAmount_isUsed:1; - unsigned int RetrievalMethod_isUsed:1; - unsigned int ChargingProfileEntryStart_isUsed:1; - unsigned int ServiceDiscoveryReq_isUsed:1; - unsigned int DepartureTime_isUsed:1; - unsigned int EVSEMinimumCurrentLimit_isUsed:1; - unsigned int CurrentDemandReq_isUsed:1; - unsigned int ChargeService_isUsed:1; - unsigned int BodyElement_isUsed:1; - unsigned int Cost_isUsed:1; - unsigned int HMACOutputLength_isUsed:1; - unsigned int MeterReading_isUsed:1; - unsigned int DHParams_isUsed:1; - unsigned int SignatureProperty_isUsed:1; - unsigned int Service_isUsed:1; + unsigned int SASchedules_isUsed:1; + unsigned int KeyInfo_isUsed:1; unsigned int PMaxScheduleID_isUsed:1; - unsigned int EVSEPresentCurrent_isUsed:1; - unsigned int EVSEVoltageLimitAchieved_isUsed:1; - unsigned int SessionSetupRes_isUsed:1; - unsigned int SessionStopReq_isUsed:1; - unsigned int ContractAuthenticationReq_isUsed:1; - unsigned int ProfileEntry_isUsed:1; - unsigned int EVErrorCode_isUsed:1; - unsigned int RootCertificateID_isUsed:1; + unsigned int RemainingTimeToFullSoC_isUsed:1; + unsigned int EVStatus_isUsed:1; + unsigned int SubCertificates_isUsed:1; + unsigned int PaymentOption_isUsed:1; + unsigned int X509SKI_isUsed:1; + unsigned int ServiceList_isUsed:1; + unsigned int Cost_isUsed:1; + unsigned int SignatureMethod_isUsed:1; unsigned int EVSEMinCurrent_isUsed:1; - unsigned int EVTargetVoltage_isUsed:1; - unsigned int ChargingStatusReq_isUsed:1; - unsigned int Header_isUsed:1; - unsigned int GenChallenge_isUsed:1; - unsigned int XPath_isUsed:1; - unsigned int Q_isUsed:1; - unsigned int WeldingDetectionRes_isUsed:1; + unsigned int ConsumptionCost_isUsed:1; + unsigned int EVSEPeakCurrentRipple_isUsed:1; + unsigned int EVErrorCode_isUsed:1; + unsigned int EVChargeParameter_isUsed:1; + unsigned int start_isUsed:1; + unsigned int X509IssuerName_isUsed:1; + unsigned int Reference_isUsed:1; + unsigned int EVMinCurrent_isUsed:1; + unsigned int FullSOC_isUsed:1; + unsigned int amount_isUsed:1; + unsigned int shortValue_isUsed:1; + unsigned int DC_EVSEChargeParameter_isUsed:1; + unsigned int Entry_isUsed:1; + unsigned int SalesTariffID_isUsed:1; + unsigned int MeterID_isUsed:1; + unsigned int ChargeParameterDiscoveryReq_isUsed:1; + unsigned int amountMultiplier_isUsed:1; + unsigned int ChargeParameterDiscoveryRes_isUsed:1; + unsigned int Transform_isUsed:1; + unsigned int Object_isUsed:1; + unsigned int RCD_isUsed:1; + unsigned int Notification_isUsed:1; + unsigned int startValue_isUsed:1; + unsigned int Modulus_isUsed:1; int _warning_; }; #endif /* DEPLOY_DIN_CODEC_FRAGMENT */ + /* Initialization methods for structs */ void init_dinEXIDocument(struct dinEXIDocument* exiDoc); #if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES void init_dinEXIFragment(struct dinEXIFragment* exiFrag); #endif /* DEPLOY_DIN_CODEC_FRAGMENT */ -void init_dinCurrentDemandResType(struct dinCurrentDemandResType* dinCurrentDemandResType); -void init_dinCanonicalizationMethodType(struct dinCanonicalizationMethodType* dinCanonicalizationMethodType); -void init_dinServiceDetailReqType(struct dinServiceDetailReqType* dinServiceDetailReqType); -void init_dinAC_EVSEStatusType(struct dinAC_EVSEStatusType* dinAC_EVSEStatusType); -void init_dinSPKIDataType(struct dinSPKIDataType* dinSPKIDataType); -void init_dinSessionSetupResType(struct dinSessionSetupResType* dinSessionSetupResType); -void init_dinPGPDataType(struct dinPGPDataType* dinPGPDataType); -void init_dinCableCheckResType(struct dinCableCheckResType* dinCableCheckResType); -void init_dinChargeParameterDiscoveryResType(struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType); -void init_dinManifestType(struct dinManifestType* dinManifestType); -void init_dinAC_EVChargeParameterType(struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType); -void init_dinBodyBaseType(struct dinBodyBaseType* dinBodyBaseType); -void init_dinDC_EVPowerDeliveryParameterType(struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType); -void init_dinCableCheckReqType(struct dinCableCheckReqType* dinCableCheckReqType); -void init_dinDigestMethodType(struct dinDigestMethodType* dinDigestMethodType); -void init_dinSalesTariffType(struct dinSalesTariffType* dinSalesTariffType); -void init_dinServicePaymentSelectionResType(struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType); -void init_dinPreChargeReqType(struct dinPreChargeReqType* dinPreChargeReqType); -void init_dinSAScheduleListType(struct dinSAScheduleListType* dinSAScheduleListType); -void init_dinCertificateChainType(struct dinCertificateChainType* dinCertificateChainType); -void init_dinSignaturePropertiesType(struct dinSignaturePropertiesType* dinSignaturePropertiesType); -void init_dinMessageHeaderType(struct dinMessageHeaderType* dinMessageHeaderType); -void init_dinPreChargeResType(struct dinPreChargeResType* dinPreChargeResType); -void init_dinMeteringReceiptResType(struct dinMeteringReceiptResType* dinMeteringReceiptResType); -void init_dinNotificationType(struct dinNotificationType* dinNotificationType); -void init_dinContractAuthenticationReqType(struct dinContractAuthenticationReqType* dinContractAuthenticationReqType); -void init_dinPhysicalValueType(struct dinPhysicalValueType* dinPhysicalValueType); -void init_dinChargingStatusResType(struct dinChargingStatusResType* dinChargingStatusResType); -void init_dinDC_EVSEStatusType(struct dinDC_EVSEStatusType* dinDC_EVSEStatusType); -void init_dinProfileEntryType(struct dinProfileEntryType* dinProfileEntryType); -void init_dinAC_EVSEChargeParameterType(struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType); -void init_dinServiceDiscoveryResType(struct dinServiceDiscoveryResType* dinServiceDiscoveryResType); -void init_dinSignatureType(struct dinSignatureType* dinSignatureType); -void init_dinPaymentOptionsType(struct dinPaymentOptionsType* dinPaymentOptionsType); -void init_dinParameterType(struct dinParameterType* dinParameterType); -void init_dinSignaturePropertyType(struct dinSignaturePropertyType* dinSignaturePropertyType); -void init_dinEVPowerDeliveryParameterType(struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType); -void init_dinWeldingDetectionReqType(struct dinWeldingDetectionReqType* dinWeldingDetectionReqType); -void init_dinTransformsType(struct dinTransformsType* dinTransformsType); -void init_dinServiceType(struct dinServiceType* dinServiceType); +void init_dinMeteringReceiptReqType(struct dinMeteringReceiptReqType* dinMeteringReceiptReqType); void init_dinBodyType(struct dinBodyType* dinBodyType); -void init_dinDC_EVStatusType(struct dinDC_EVStatusType* dinDC_EVStatusType); -void init_dinPMaxScheduleEntryType(struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType); -void init_dinPMaxScheduleType(struct dinPMaxScheduleType* dinPMaxScheduleType); -void init_dinSelectedServiceType(struct dinSelectedServiceType* dinSelectedServiceType); -void init_dinIntervalType(struct dinIntervalType* dinIntervalType); -void init_dinCertificateInstallationReqType(struct dinCertificateInstallationReqType* dinCertificateInstallationReqType); -void init_dinTransformType(struct dinTransformType* dinTransformType); -void init_dinKeyValueType(struct dinKeyValueType* dinKeyValueType); -void init_dinRetrievalMethodType(struct dinRetrievalMethodType* dinRetrievalMethodType); -void init_dinEVChargeParameterType(struct dinEVChargeParameterType* dinEVChargeParameterType); -void init_dinServiceChargeType(struct dinServiceChargeType* dinServiceChargeType); -void init_dinParameterSetType(struct dinParameterSetType* dinParameterSetType); -void init_dinReferenceType(struct dinReferenceType* dinReferenceType); -void init_dinSessionStopResType(struct dinSessionStopResType* dinSessionStopResType); -void init_dinObjectType(struct dinObjectType* dinObjectType); -void init_dinSignatureValueType(struct dinSignatureValueType* dinSignatureValueType); +void init_dinSessionSetupReqType(struct dinSessionSetupReqType* dinSessionSetupReqType); +void init_dinPowerDeliveryResType(struct dinPowerDeliveryResType* dinPowerDeliveryResType); +void init_dinServiceDetailResType(struct dinServiceDetailResType* dinServiceDetailResType); +void init_dinWeldingDetectionResType(struct dinWeldingDetectionResType* dinWeldingDetectionResType); +void init_dinContractAuthenticationResType(struct dinContractAuthenticationResType* dinContractAuthenticationResType); +void init_dinCanonicalizationMethodType(struct dinCanonicalizationMethodType* dinCanonicalizationMethodType); +void init_dinSPKIDataType(struct dinSPKIDataType* dinSPKIDataType); +void init_dinListOfRootCertificateIDsType(struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType); void init_dinSelectedServiceListType(struct dinSelectedServiceListType* dinSelectedServiceListType); +void init_dinCurrentDemandResType(struct dinCurrentDemandResType* dinCurrentDemandResType); +void init_dinTransformType(struct dinTransformType* dinTransformType); +void init_dinAC_EVChargeParameterType(struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType); +void init_dinX509DataType(struct dinX509DataType* dinX509DataType); +void init_dinChargingStatusResType(struct dinChargingStatusResType* dinChargingStatusResType); +void init_dinWeldingDetectionReqType(struct dinWeldingDetectionReqType* dinWeldingDetectionReqType); +void init_dinSignaturePropertiesType(struct dinSignaturePropertiesType* dinSignaturePropertiesType); +void init_dinContractAuthenticationReqType(struct dinContractAuthenticationReqType* dinContractAuthenticationReqType); +void init_dinDC_EVPowerDeliveryParameterType(struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType); +void init_dinEVSEChargeParameterType(struct dinEVSEChargeParameterType* dinEVSEChargeParameterType); +void init_dinCableCheckReqType(struct dinCableCheckReqType* dinCableCheckReqType); +void init_dinDC_EVChargeParameterType(struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType); +void init_dinSAScheduleListType(struct dinSAScheduleListType* dinSAScheduleListType); +void init_dinPMaxScheduleType(struct dinPMaxScheduleType* dinPMaxScheduleType); +void init_dinServicePaymentSelectionReqType(struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType); +void init_dinRelativeTimeIntervalType(struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType); +void init_dinEVStatusType(struct dinEVStatusType* dinEVStatusType); +void init_dinPreChargeResType(struct dinPreChargeResType* dinPreChargeResType); +void init_dinDC_EVSEChargeParameterType(struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType); +void init_dinPaymentDetailsResType(struct dinPaymentDetailsResType* dinPaymentDetailsResType); +void init_dinDSAKeyValueType(struct dinDSAKeyValueType* dinDSAKeyValueType); +void init_dinSASchedulesType(struct dinSASchedulesType* dinSASchedulesType); +void init_dinCertificateUpdateResType(struct dinCertificateUpdateResType* dinCertificateUpdateResType); +void init_dinEVChargeParameterType(struct dinEVChargeParameterType* dinEVChargeParameterType); +void init_dinMessageHeaderType(struct dinMessageHeaderType* dinMessageHeaderType); +void init_dinBodyBaseType(struct dinBodyBaseType* dinBodyBaseType); +void init_dinKeyValueType(struct dinKeyValueType* dinKeyValueType); +void init_dinIntervalType(struct dinIntervalType* dinIntervalType); +void init_dinChargeParameterDiscoveryResType(struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType); +void init_dinPowerDeliveryReqType(struct dinPowerDeliveryReqType* dinPowerDeliveryReqType); +void init_dinCertificateChainType(struct dinCertificateChainType* dinCertificateChainType); +void init_dinTransformsType(struct dinTransformsType* dinTransformsType); +void init_dinEntryType(struct dinEntryType* dinEntryType); +void init_dinSessionStopType(struct dinSessionStopType* dinSessionStopType); +void init_dinServiceDetailReqType(struct dinServiceDetailReqType* dinServiceDetailReqType); +void init_dinDigestMethodType(struct dinDigestMethodType* dinDigestMethodType); +void init_dinParameterType(struct dinParameterType* dinParameterType); +void init_dinChargingStatusReqType(struct dinChargingStatusReqType* dinChargingStatusReqType); +void init_dinSignatureMethodType(struct dinSignatureMethodType* dinSignatureMethodType); +void init_dinCertificateInstallationReqType(struct dinCertificateInstallationReqType* dinCertificateInstallationReqType); void init_dinSalesTariffEntryType(struct dinSalesTariffEntryType* dinSalesTariffEntryType); +void init_dinServiceDiscoveryResType(struct dinServiceDiscoveryResType* dinServiceDiscoveryResType); +void init_dinParameterSetType(struct dinParameterSetType* dinParameterSetType); +void init_dinCurrentDemandReqType(struct dinCurrentDemandReqType* dinCurrentDemandReqType); +void init_dinPreChargeReqType(struct dinPreChargeReqType* dinPreChargeReqType); +void init_dinSignatureType(struct dinSignatureType* dinSignatureType); +void init_dinReferenceType(struct dinReferenceType* dinReferenceType); +void init_dinProfileEntryType(struct dinProfileEntryType* dinProfileEntryType); +void init_dinAnonType_V2G_Message(struct dinAnonType_V2G_Message* dinAnonType_V2G_Message); +void init_dinChargeParameterDiscoveryReqType(struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType); void init_dinConsumptionCostType(struct dinConsumptionCostType* dinConsumptionCostType); void init_dinRSAKeyValueType(struct dinRSAKeyValueType* dinRSAKeyValueType); -void init_dinMeteringReceiptReqType(struct dinMeteringReceiptReqType* dinMeteringReceiptReqType); -void init_dinSAScheduleTupleType(struct dinSAScheduleTupleType* dinSAScheduleTupleType); -void init_dinRelativeTimeIntervalType(struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType); -void init_dinChargingProfileType(struct dinChargingProfileType* dinChargingProfileType); -void init_dinCurrentDemandReqType(struct dinCurrentDemandReqType* dinCurrentDemandReqType); -void init_dinKeyInfoType(struct dinKeyInfoType* dinKeyInfoType); -void init_dinServicePaymentSelectionReqType(struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType); -void init_dinContractAuthenticationResType(struct dinContractAuthenticationResType* dinContractAuthenticationResType); -void init_dinChargingStatusReqType(struct dinChargingStatusReqType* dinChargingStatusReqType); -void init_dinPaymentDetailsResType(struct dinPaymentDetailsResType* dinPaymentDetailsResType); -void init_dinSASchedulesType(struct dinSASchedulesType* dinSASchedulesType); -void init_dinPaymentDetailsReqType(struct dinPaymentDetailsReqType* dinPaymentDetailsReqType); -void init_dinServiceTagType(struct dinServiceTagType* dinServiceTagType); -void init_dinChargeParameterDiscoveryReqType(struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType); -void init_dinServiceParameterListType(struct dinServiceParameterListType* dinServiceParameterListType); -void init_dinEVSEStatusType(struct dinEVSEStatusType* dinEVSEStatusType); -void init_dinServiceDiscoveryReqType(struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType); -void init_dinWeldingDetectionResType(struct dinWeldingDetectionResType* dinWeldingDetectionResType); -void init_dinCertificateUpdateReqType(struct dinCertificateUpdateReqType* dinCertificateUpdateReqType); +void init_dinServiceType(struct dinServiceType* dinServiceType); void init_dinServiceTagListType(struct dinServiceTagListType* dinServiceTagListType); -void init_dinSignedInfoType(struct dinSignedInfoType* dinSignedInfoType); -void init_dinPowerDeliveryReqType(struct dinPowerDeliveryReqType* dinPowerDeliveryReqType); -void init_dinCostType(struct dinCostType* dinCostType); -void init_dinDC_EVChargeParameterType(struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType); -void init_dinSubCertificatesType(struct dinSubCertificatesType* dinSubCertificatesType); -void init_dinSessionSetupReqType(struct dinSessionSetupReqType* dinSessionSetupReqType); -void init_dinAnonType_V2G_Message(struct dinAnonType_V2G_Message* dinAnonType_V2G_Message); -void init_dinMeterInfoType(struct dinMeterInfoType* dinMeterInfoType); -void init_dinCertificateInstallationResType(struct dinCertificateInstallationResType* dinCertificateInstallationResType); -void init_dinServiceDetailResType(struct dinServiceDetailResType* dinServiceDetailResType); +void init_dinEVSEStatusType(struct dinEVSEStatusType* dinEVSEStatusType); +void init_dinSessionSetupResType(struct dinSessionSetupResType* dinSessionSetupResType); +void init_dinEVPowerDeliveryParameterType(struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType); void init_dinX509IssuerSerialType(struct dinX509IssuerSerialType* dinX509IssuerSerialType); -void init_dinDC_EVSEChargeParameterType(struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType); -void init_dinEVStatusType(struct dinEVStatusType* dinEVStatusType); -void init_dinX509DataType(struct dinX509DataType* dinX509DataType); -void init_dinPowerDeliveryResType(struct dinPowerDeliveryResType* dinPowerDeliveryResType); -void init_dinDSAKeyValueType(struct dinDSAKeyValueType* dinDSAKeyValueType); -void init_dinCertificateUpdateResType(struct dinCertificateUpdateResType* dinCertificateUpdateResType); -void init_dinSessionStopType(struct dinSessionStopType* dinSessionStopType); -void init_dinEVSEChargeParameterType(struct dinEVSEChargeParameterType* dinEVSEChargeParameterType); -void init_dinEntryType(struct dinEntryType* dinEntryType); -void init_dinListOfRootCertificateIDsType(struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType); -void init_dinSignatureMethodType(struct dinSignatureMethodType* dinSignatureMethodType); +void init_dinSelectedServiceType(struct dinSelectedServiceType* dinSelectedServiceType); +void init_dinMeteringReceiptResType(struct dinMeteringReceiptResType* dinMeteringReceiptResType); +void init_dinDC_EVStatusType(struct dinDC_EVStatusType* dinDC_EVStatusType); +void init_dinPhysicalValueType(struct dinPhysicalValueType* dinPhysicalValueType); +void init_dinManifestType(struct dinManifestType* dinManifestType); +void init_dinPMaxScheduleEntryType(struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType); +void init_dinServiceParameterListType(struct dinServiceParameterListType* dinServiceParameterListType); +void init_dinSignatureValueType(struct dinSignatureValueType* dinSignatureValueType); +void init_dinPaymentOptionsType(struct dinPaymentOptionsType* dinPaymentOptionsType); +void init_dinServiceTagType(struct dinServiceTagType* dinServiceTagType); +void init_dinAC_EVSEStatusType(struct dinAC_EVSEStatusType* dinAC_EVSEStatusType); +void init_dinCertificateUpdateReqType(struct dinCertificateUpdateReqType* dinCertificateUpdateReqType); +void init_dinServicePaymentSelectionResType(struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType); +void init_dinSAScheduleTupleType(struct dinSAScheduleTupleType* dinSAScheduleTupleType); +void init_dinChargingProfileType(struct dinChargingProfileType* dinChargingProfileType); +void init_dinServiceDiscoveryReqType(struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType); +void init_dinAC_EVSEChargeParameterType(struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType); +void init_dinKeyInfoType(struct dinKeyInfoType* dinKeyInfoType); +void init_dinPaymentDetailsReqType(struct dinPaymentDetailsReqType* dinPaymentDetailsReqType); +void init_dinCableCheckResType(struct dinCableCheckResType* dinCableCheckResType); +void init_dinObjectType(struct dinObjectType* dinObjectType); +void init_dinSessionStopResType(struct dinSessionStopResType* dinSessionStopResType); +void init_dinSignedInfoType(struct dinSignedInfoType* dinSignedInfoType); +void init_dinSalesTariffType(struct dinSalesTariffType* dinSalesTariffType); +void init_dinCostType(struct dinCostType* dinCostType); +void init_dinServiceChargeType(struct dinServiceChargeType* dinServiceChargeType); +void init_dinDC_EVSEStatusType(struct dinDC_EVSEStatusType* dinDC_EVSEStatusType); +void init_dinRetrievalMethodType(struct dinRetrievalMethodType* dinRetrievalMethodType); +void init_dinNotificationType(struct dinNotificationType* dinNotificationType); +void init_dinPGPDataType(struct dinPGPDataType* dinPGPDataType); +void init_dinCertificateInstallationResType(struct dinCertificateInstallationResType* dinCertificateInstallationResType); +void init_dinSignaturePropertyType(struct dinSignaturePropertyType* dinSignaturePropertyType); +void init_dinMeterInfoType(struct dinMeterInfoType* dinMeterInfoType); +void init_dinSubCertificatesType(struct dinSubCertificatesType* dinSubCertificatesType); #endif /* DEPLOY_DIN_CODEC */ diff --git a/src/din/dinEXIDatatypesDecoder.c b/src/din/dinEXIDatatypesDecoder.c index cb1d9ae..0f306c2 100644 --- a/src/din/dinEXIDatatypesDecoder.c +++ b/src/din/dinEXIDatatypesDecoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2015 Siemens AG + * Copyright (C) 2007-2017 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,8 +18,8 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.9.3 - * @contact Joerg.Heuer@siemens.com + * @version 2017-09-05 + * @contact Richard.Kuntschke@siemens.com * *Code generated by EXIdizer
*Schema: V2G_CI_MsgDef.xsd
@@ -48,159 +48,164 @@ static uint32_t eventCode; static int errn; static uint32_t uint32; - /* Forward Declarations */ -static int decode_dinCurrentDemandResType(bitstream_t* stream, struct dinCurrentDemandResType* dinCurrentDemandResType); -static int decode_dinCanonicalizationMethodType(bitstream_t* stream, struct dinCanonicalizationMethodType* dinCanonicalizationMethodType); -static int decode_dinServiceDetailReqType(bitstream_t* stream, struct dinServiceDetailReqType* dinServiceDetailReqType); -static int decode_dinAC_EVSEStatusType(bitstream_t* stream, struct dinAC_EVSEStatusType* dinAC_EVSEStatusType); -static int decode_dinSPKIDataType(bitstream_t* stream, struct dinSPKIDataType* dinSPKIDataType); -static int decode_dinSessionSetupResType(bitstream_t* stream, struct dinSessionSetupResType* dinSessionSetupResType); -static int decode_dinPGPDataType(bitstream_t* stream, struct dinPGPDataType* dinPGPDataType); -static int decode_dinCableCheckResType(bitstream_t* stream, struct dinCableCheckResType* dinCableCheckResType); -static int decode_dinChargeParameterDiscoveryResType(bitstream_t* stream, struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType); -static int decode_dinManifestType(bitstream_t* stream, struct dinManifestType* dinManifestType); -static int decode_dinAC_EVChargeParameterType(bitstream_t* stream, struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType); -static int decode_dinBodyBaseType(bitstream_t* stream, struct dinBodyBaseType* dinBodyBaseType); -static int decode_dinDC_EVPowerDeliveryParameterType(bitstream_t* stream, struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType); -static int decode_dinCableCheckReqType(bitstream_t* stream, struct dinCableCheckReqType* dinCableCheckReqType); -static int decode_dinDigestMethodType(bitstream_t* stream, struct dinDigestMethodType* dinDigestMethodType); -static int decode_dinSalesTariffType(bitstream_t* stream, struct dinSalesTariffType* dinSalesTariffType); -static int decode_dinServicePaymentSelectionResType(bitstream_t* stream, struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType); -static int decode_dinPreChargeReqType(bitstream_t* stream, struct dinPreChargeReqType* dinPreChargeReqType); -static int decode_dinSAScheduleListType(bitstream_t* stream, struct dinSAScheduleListType* dinSAScheduleListType); -static int decode_dinCertificateChainType(bitstream_t* stream, struct dinCertificateChainType* dinCertificateChainType); -static int decode_dinSignaturePropertiesType(bitstream_t* stream, struct dinSignaturePropertiesType* dinSignaturePropertiesType); -static int decode_dinMessageHeaderType(bitstream_t* stream, struct dinMessageHeaderType* dinMessageHeaderType); -static int decode_dinPreChargeResType(bitstream_t* stream, struct dinPreChargeResType* dinPreChargeResType); -static int decode_dinMeteringReceiptResType(bitstream_t* stream, struct dinMeteringReceiptResType* dinMeteringReceiptResType); -static int decode_dinNotificationType(bitstream_t* stream, struct dinNotificationType* dinNotificationType); -static int decode_dinContractAuthenticationReqType(bitstream_t* stream, struct dinContractAuthenticationReqType* dinContractAuthenticationReqType); -static int decode_dinPhysicalValueType(bitstream_t* stream, struct dinPhysicalValueType* dinPhysicalValueType); -static int decode_dinChargingStatusResType(bitstream_t* stream, struct dinChargingStatusResType* dinChargingStatusResType); -static int decode_dinDC_EVSEStatusType(bitstream_t* stream, struct dinDC_EVSEStatusType* dinDC_EVSEStatusType); -static int decode_dinProfileEntryType(bitstream_t* stream, struct dinProfileEntryType* dinProfileEntryType); -static int decode_dinAC_EVSEChargeParameterType(bitstream_t* stream, struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType); -static int decode_dinServiceDiscoveryResType(bitstream_t* stream, struct dinServiceDiscoveryResType* dinServiceDiscoveryResType); -static int decode_dinSignatureType(bitstream_t* stream, struct dinSignatureType* dinSignatureType); -static int decode_dinPaymentOptionsType(bitstream_t* stream, struct dinPaymentOptionsType* dinPaymentOptionsType); -static int decode_dinParameterType(bitstream_t* stream, struct dinParameterType* dinParameterType); -static int decode_dinSignaturePropertyType(bitstream_t* stream, struct dinSignaturePropertyType* dinSignaturePropertyType); -static int decode_dinEVPowerDeliveryParameterType(bitstream_t* stream, struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType); -static int decode_dinWeldingDetectionReqType(bitstream_t* stream, struct dinWeldingDetectionReqType* dinWeldingDetectionReqType); -static int decode_dinTransformsType(bitstream_t* stream, struct dinTransformsType* dinTransformsType); -static int decode_dinServiceType(bitstream_t* stream, struct dinServiceType* dinServiceType); +static int decode_dinMeteringReceiptReqType(bitstream_t* stream, struct dinMeteringReceiptReqType* dinMeteringReceiptReqType); static int decode_dinBodyType(bitstream_t* stream, struct dinBodyType* dinBodyType); -static int decode_dinDC_EVStatusType(bitstream_t* stream, struct dinDC_EVStatusType* dinDC_EVStatusType); -static int decode_dinPMaxScheduleEntryType(bitstream_t* stream, struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType); -static int decode_dinPMaxScheduleType(bitstream_t* stream, struct dinPMaxScheduleType* dinPMaxScheduleType); -static int decode_dinSelectedServiceType(bitstream_t* stream, struct dinSelectedServiceType* dinSelectedServiceType); -static int decode_dinIntervalType(bitstream_t* stream, struct dinIntervalType* dinIntervalType); -static int decode_dinCertificateInstallationReqType(bitstream_t* stream, struct dinCertificateInstallationReqType* dinCertificateInstallationReqType); -static int decode_dinTransformType(bitstream_t* stream, struct dinTransformType* dinTransformType); -static int decode_dinKeyValueType(bitstream_t* stream, struct dinKeyValueType* dinKeyValueType); -static int decode_dinRetrievalMethodType(bitstream_t* stream, struct dinRetrievalMethodType* dinRetrievalMethodType); -static int decode_dinEVChargeParameterType(bitstream_t* stream, struct dinEVChargeParameterType* dinEVChargeParameterType); -static int decode_dinServiceChargeType(bitstream_t* stream, struct dinServiceChargeType* dinServiceChargeType); -static int decode_dinParameterSetType(bitstream_t* stream, struct dinParameterSetType* dinParameterSetType); -static int decode_dinReferenceType(bitstream_t* stream, struct dinReferenceType* dinReferenceType); -static int decode_dinSessionStopResType(bitstream_t* stream, struct dinSessionStopResType* dinSessionStopResType); -static int decode_dinObjectType(bitstream_t* stream, struct dinObjectType* dinObjectType); -static int decode_dinSignatureValueType(bitstream_t* stream, struct dinSignatureValueType* dinSignatureValueType); +static int decode_dinSessionSetupReqType(bitstream_t* stream, struct dinSessionSetupReqType* dinSessionSetupReqType); +static int decode_dinPowerDeliveryResType(bitstream_t* stream, struct dinPowerDeliveryResType* dinPowerDeliveryResType); +static int decode_dinServiceDetailResType(bitstream_t* stream, struct dinServiceDetailResType* dinServiceDetailResType); +static int decode_dinWeldingDetectionResType(bitstream_t* stream, struct dinWeldingDetectionResType* dinWeldingDetectionResType); +static int decode_dinContractAuthenticationResType(bitstream_t* stream, struct dinContractAuthenticationResType* dinContractAuthenticationResType); +static int decode_dinCanonicalizationMethodType(bitstream_t* stream, struct dinCanonicalizationMethodType* dinCanonicalizationMethodType); +static int decode_dinSPKIDataType(bitstream_t* stream, struct dinSPKIDataType* dinSPKIDataType); +static int decode_dinListOfRootCertificateIDsType(bitstream_t* stream, struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType); static int decode_dinSelectedServiceListType(bitstream_t* stream, struct dinSelectedServiceListType* dinSelectedServiceListType); +static int decode_dinCurrentDemandResType(bitstream_t* stream, struct dinCurrentDemandResType* dinCurrentDemandResType); +static int decode_dinTransformType(bitstream_t* stream, struct dinTransformType* dinTransformType); +static int decode_dinAC_EVChargeParameterType(bitstream_t* stream, struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType); +static int decode_dinX509DataType(bitstream_t* stream, struct dinX509DataType* dinX509DataType); +static int decode_dinChargingStatusResType(bitstream_t* stream, struct dinChargingStatusResType* dinChargingStatusResType); +static int decode_dinWeldingDetectionReqType(bitstream_t* stream, struct dinWeldingDetectionReqType* dinWeldingDetectionReqType); +static int decode_dinSignaturePropertiesType(bitstream_t* stream, struct dinSignaturePropertiesType* dinSignaturePropertiesType); +static int decode_dinContractAuthenticationReqType(bitstream_t* stream, struct dinContractAuthenticationReqType* dinContractAuthenticationReqType); +static int decode_dinDC_EVPowerDeliveryParameterType(bitstream_t* stream, struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType); +static int decode_dinEVSEChargeParameterType(bitstream_t* stream, struct dinEVSEChargeParameterType* dinEVSEChargeParameterType); +static int decode_dinCableCheckReqType(bitstream_t* stream, struct dinCableCheckReqType* dinCableCheckReqType); +static int decode_dinDC_EVChargeParameterType(bitstream_t* stream, struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType); +static int decode_dinSAScheduleListType(bitstream_t* stream, struct dinSAScheduleListType* dinSAScheduleListType); +static int decode_dinPMaxScheduleType(bitstream_t* stream, struct dinPMaxScheduleType* dinPMaxScheduleType); +static int decode_dinServicePaymentSelectionReqType(bitstream_t* stream, struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType); +static int decode_dinRelativeTimeIntervalType(bitstream_t* stream, struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType); +static int decode_dinEVStatusType(bitstream_t* stream, struct dinEVStatusType* dinEVStatusType); +static int decode_dinPreChargeResType(bitstream_t* stream, struct dinPreChargeResType* dinPreChargeResType); +static int decode_dinDC_EVSEChargeParameterType(bitstream_t* stream, struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType); +static int decode_dinPaymentDetailsResType(bitstream_t* stream, struct dinPaymentDetailsResType* dinPaymentDetailsResType); +static int decode_dinDSAKeyValueType(bitstream_t* stream, struct dinDSAKeyValueType* dinDSAKeyValueType); +static int decode_dinSASchedulesType(bitstream_t* stream, struct dinSASchedulesType* dinSASchedulesType); +static int decode_dinCertificateUpdateResType(bitstream_t* stream, struct dinCertificateUpdateResType* dinCertificateUpdateResType); +static int decode_dinEVChargeParameterType(bitstream_t* stream, struct dinEVChargeParameterType* dinEVChargeParameterType); +static int decode_dinMessageHeaderType(bitstream_t* stream, struct dinMessageHeaderType* dinMessageHeaderType); +static int decode_dinBodyBaseType(bitstream_t* stream, struct dinBodyBaseType* dinBodyBaseType); +static int decode_dinKeyValueType(bitstream_t* stream, struct dinKeyValueType* dinKeyValueType); +static int decode_dinIntervalType(bitstream_t* stream, struct dinIntervalType* dinIntervalType); +static int decode_dinChargeParameterDiscoveryResType(bitstream_t* stream, struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType); +static int decode_dinPowerDeliveryReqType(bitstream_t* stream, struct dinPowerDeliveryReqType* dinPowerDeliveryReqType); +static int decode_dinCertificateChainType(bitstream_t* stream, struct dinCertificateChainType* dinCertificateChainType); +static int decode_dinTransformsType(bitstream_t* stream, struct dinTransformsType* dinTransformsType); +static int decode_dinEntryType(bitstream_t* stream, struct dinEntryType* dinEntryType); +static int decode_dinSessionStopType(bitstream_t* stream, struct dinSessionStopType* dinSessionStopType); +static int decode_dinServiceDetailReqType(bitstream_t* stream, struct dinServiceDetailReqType* dinServiceDetailReqType); +static int decode_dinDigestMethodType(bitstream_t* stream, struct dinDigestMethodType* dinDigestMethodType); +static int decode_dinParameterType(bitstream_t* stream, struct dinParameterType* dinParameterType); +static int decode_dinChargingStatusReqType(bitstream_t* stream, struct dinChargingStatusReqType* dinChargingStatusReqType); +static int decode_dinSignatureMethodType(bitstream_t* stream, struct dinSignatureMethodType* dinSignatureMethodType); +static int decode_dinCertificateInstallationReqType(bitstream_t* stream, struct dinCertificateInstallationReqType* dinCertificateInstallationReqType); static int decode_dinSalesTariffEntryType(bitstream_t* stream, struct dinSalesTariffEntryType* dinSalesTariffEntryType); +static int decode_dinServiceDiscoveryResType(bitstream_t* stream, struct dinServiceDiscoveryResType* dinServiceDiscoveryResType); +static int decode_dinParameterSetType(bitstream_t* stream, struct dinParameterSetType* dinParameterSetType); +static int decode_dinCurrentDemandReqType(bitstream_t* stream, struct dinCurrentDemandReqType* dinCurrentDemandReqType); +static int decode_dinPreChargeReqType(bitstream_t* stream, struct dinPreChargeReqType* dinPreChargeReqType); +static int decode_dinSignatureType(bitstream_t* stream, struct dinSignatureType* dinSignatureType); +static int decode_dinReferenceType(bitstream_t* stream, struct dinReferenceType* dinReferenceType); +static int decode_dinProfileEntryType(bitstream_t* stream, struct dinProfileEntryType* dinProfileEntryType); +static int decode_dinAnonType_V2G_Message(bitstream_t* stream, struct dinAnonType_V2G_Message* dinAnonType_V2G_Message); +static int decode_dinChargeParameterDiscoveryReqType(bitstream_t* stream, struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType); static int decode_dinConsumptionCostType(bitstream_t* stream, struct dinConsumptionCostType* dinConsumptionCostType); static int decode_dinRSAKeyValueType(bitstream_t* stream, struct dinRSAKeyValueType* dinRSAKeyValueType); -static int decode_dinMeteringReceiptReqType(bitstream_t* stream, struct dinMeteringReceiptReqType* dinMeteringReceiptReqType); -static int decode_dinSAScheduleTupleType(bitstream_t* stream, struct dinSAScheduleTupleType* dinSAScheduleTupleType); -static int decode_dinRelativeTimeIntervalType(bitstream_t* stream, struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType); -static int decode_dinChargingProfileType(bitstream_t* stream, struct dinChargingProfileType* dinChargingProfileType); -static int decode_dinCurrentDemandReqType(bitstream_t* stream, struct dinCurrentDemandReqType* dinCurrentDemandReqType); -static int decode_dinKeyInfoType(bitstream_t* stream, struct dinKeyInfoType* dinKeyInfoType); -static int decode_dinServicePaymentSelectionReqType(bitstream_t* stream, struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType); -static int decode_dinContractAuthenticationResType(bitstream_t* stream, struct dinContractAuthenticationResType* dinContractAuthenticationResType); -static int decode_dinChargingStatusReqType(bitstream_t* stream, struct dinChargingStatusReqType* dinChargingStatusReqType); -static int decode_dinPaymentDetailsResType(bitstream_t* stream, struct dinPaymentDetailsResType* dinPaymentDetailsResType); -static int decode_dinSASchedulesType(bitstream_t* stream, struct dinSASchedulesType* dinSASchedulesType); -static int decode_dinPaymentDetailsReqType(bitstream_t* stream, struct dinPaymentDetailsReqType* dinPaymentDetailsReqType); -static int decode_dinServiceTagType(bitstream_t* stream, struct dinServiceTagType* dinServiceTagType); -static int decode_dinChargeParameterDiscoveryReqType(bitstream_t* stream, struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType); -static int decode_dinServiceParameterListType(bitstream_t* stream, struct dinServiceParameterListType* dinServiceParameterListType); -static int decode_dinEVSEStatusType(bitstream_t* stream, struct dinEVSEStatusType* dinEVSEStatusType); -static int decode_dinServiceDiscoveryReqType(bitstream_t* stream, struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType); -static int decode_dinWeldingDetectionResType(bitstream_t* stream, struct dinWeldingDetectionResType* dinWeldingDetectionResType); -static int decode_dinCertificateUpdateReqType(bitstream_t* stream, struct dinCertificateUpdateReqType* dinCertificateUpdateReqType); +static int decode_dinServiceType(bitstream_t* stream, struct dinServiceType* dinServiceType); static int decode_dinServiceTagListType(bitstream_t* stream, struct dinServiceTagListType* dinServiceTagListType); -static int decode_dinSignedInfoType(bitstream_t* stream, struct dinSignedInfoType* dinSignedInfoType); -static int decode_dinPowerDeliveryReqType(bitstream_t* stream, struct dinPowerDeliveryReqType* dinPowerDeliveryReqType); -static int decode_dinCostType(bitstream_t* stream, struct dinCostType* dinCostType); -static int decode_dinDC_EVChargeParameterType(bitstream_t* stream, struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType); -static int decode_dinSubCertificatesType(bitstream_t* stream, struct dinSubCertificatesType* dinSubCertificatesType); -static int decode_dinSessionSetupReqType(bitstream_t* stream, struct dinSessionSetupReqType* dinSessionSetupReqType); -static int decode_dinAnonType_V2G_Message(bitstream_t* stream, struct dinAnonType_V2G_Message* dinAnonType_V2G_Message); -static int decode_dinMeterInfoType(bitstream_t* stream, struct dinMeterInfoType* dinMeterInfoType); -static int decode_dinCertificateInstallationResType(bitstream_t* stream, struct dinCertificateInstallationResType* dinCertificateInstallationResType); -static int decode_dinServiceDetailResType(bitstream_t* stream, struct dinServiceDetailResType* dinServiceDetailResType); +static int decode_dinEVSEStatusType(bitstream_t* stream, struct dinEVSEStatusType* dinEVSEStatusType); +static int decode_dinSessionSetupResType(bitstream_t* stream, struct dinSessionSetupResType* dinSessionSetupResType); +static int decode_dinEVPowerDeliveryParameterType(bitstream_t* stream, struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType); static int decode_dinX509IssuerSerialType(bitstream_t* stream, struct dinX509IssuerSerialType* dinX509IssuerSerialType); -static int decode_dinDC_EVSEChargeParameterType(bitstream_t* stream, struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType); -static int decode_dinEVStatusType(bitstream_t* stream, struct dinEVStatusType* dinEVStatusType); -static int decode_dinX509DataType(bitstream_t* stream, struct dinX509DataType* dinX509DataType); -static int decode_dinPowerDeliveryResType(bitstream_t* stream, struct dinPowerDeliveryResType* dinPowerDeliveryResType); -static int decode_dinDSAKeyValueType(bitstream_t* stream, struct dinDSAKeyValueType* dinDSAKeyValueType); -static int decode_dinCertificateUpdateResType(bitstream_t* stream, struct dinCertificateUpdateResType* dinCertificateUpdateResType); -static int decode_dinSessionStopType(bitstream_t* stream, struct dinSessionStopType* dinSessionStopType); -static int decode_dinEVSEChargeParameterType(bitstream_t* stream, struct dinEVSEChargeParameterType* dinEVSEChargeParameterType); -static int decode_dinEntryType(bitstream_t* stream, struct dinEntryType* dinEntryType); -static int decode_dinListOfRootCertificateIDsType(bitstream_t* stream, struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType); -static int decode_dinSignatureMethodType(bitstream_t* stream, struct dinSignatureMethodType* dinSignatureMethodType); +static int decode_dinSelectedServiceType(bitstream_t* stream, struct dinSelectedServiceType* dinSelectedServiceType); +static int decode_dinMeteringReceiptResType(bitstream_t* stream, struct dinMeteringReceiptResType* dinMeteringReceiptResType); +static int decode_dinDC_EVStatusType(bitstream_t* stream, struct dinDC_EVStatusType* dinDC_EVStatusType); +static int decode_dinPhysicalValueType(bitstream_t* stream, struct dinPhysicalValueType* dinPhysicalValueType); +static int decode_dinManifestType(bitstream_t* stream, struct dinManifestType* dinManifestType); +static int decode_dinPMaxScheduleEntryType(bitstream_t* stream, struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType); +static int decode_dinServiceParameterListType(bitstream_t* stream, struct dinServiceParameterListType* dinServiceParameterListType); +static int decode_dinSignatureValueType(bitstream_t* stream, struct dinSignatureValueType* dinSignatureValueType); +static int decode_dinPaymentOptionsType(bitstream_t* stream, struct dinPaymentOptionsType* dinPaymentOptionsType); +static int decode_dinServiceTagType(bitstream_t* stream, struct dinServiceTagType* dinServiceTagType); +static int decode_dinAC_EVSEStatusType(bitstream_t* stream, struct dinAC_EVSEStatusType* dinAC_EVSEStatusType); +static int decode_dinCertificateUpdateReqType(bitstream_t* stream, struct dinCertificateUpdateReqType* dinCertificateUpdateReqType); +static int decode_dinServicePaymentSelectionResType(bitstream_t* stream, struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType); +static int decode_dinSAScheduleTupleType(bitstream_t* stream, struct dinSAScheduleTupleType* dinSAScheduleTupleType); +static int decode_dinChargingProfileType(bitstream_t* stream, struct dinChargingProfileType* dinChargingProfileType); +static int decode_dinServiceDiscoveryReqType(bitstream_t* stream, struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType); +static int decode_dinAC_EVSEChargeParameterType(bitstream_t* stream, struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType); +static int decode_dinKeyInfoType(bitstream_t* stream, struct dinKeyInfoType* dinKeyInfoType); +static int decode_dinPaymentDetailsReqType(bitstream_t* stream, struct dinPaymentDetailsReqType* dinPaymentDetailsReqType); +static int decode_dinCableCheckResType(bitstream_t* stream, struct dinCableCheckResType* dinCableCheckResType); +static int decode_dinObjectType(bitstream_t* stream, struct dinObjectType* dinObjectType); +static int decode_dinSessionStopResType(bitstream_t* stream, struct dinSessionStopResType* dinSessionStopResType); +static int decode_dinSignedInfoType(bitstream_t* stream, struct dinSignedInfoType* dinSignedInfoType); +static int decode_dinSalesTariffType(bitstream_t* stream, struct dinSalesTariffType* dinSalesTariffType); +static int decode_dinCostType(bitstream_t* stream, struct dinCostType* dinCostType); +static int decode_dinServiceChargeType(bitstream_t* stream, struct dinServiceChargeType* dinServiceChargeType); +static int decode_dinDC_EVSEStatusType(bitstream_t* stream, struct dinDC_EVSEStatusType* dinDC_EVSEStatusType); +static int decode_dinRetrievalMethodType(bitstream_t* stream, struct dinRetrievalMethodType* dinRetrievalMethodType); +static int decode_dinNotificationType(bitstream_t* stream, struct dinNotificationType* dinNotificationType); +static int decode_dinPGPDataType(bitstream_t* stream, struct dinPGPDataType* dinPGPDataType); +static int decode_dinCertificateInstallationResType(bitstream_t* stream, struct dinCertificateInstallationResType* dinCertificateInstallationResType); +static int decode_dinSignaturePropertyType(bitstream_t* stream, struct dinSignaturePropertyType* dinSignaturePropertyType); +static int decode_dinMeterInfoType(bitstream_t* stream, struct dinMeterInfoType* dinMeterInfoType); +static int decode_dinSubCertificatesType(bitstream_t* stream, struct dinSubCertificatesType* dinSubCertificatesType); /* Deviant data decoding (skip functions) */ -static int decodeDeviationsCH(bitstream_t* stream) { - int i=0; - uint16_t uint16; - errn = 0; - - errn = decodeUnsignedInteger16(stream, &uint16); - if (errn == 0) { - for(i=0; iCode generated by EXIdizer
*Schema: V2G_CI_MsgDef.xsd
@@ -41,9 +41,8 @@ #ifdef __cplusplus extern "C" { #endif - - -#include "dinEXIDatatypes.h" + +#include "dinEXIDatatypes.h" #if DEPLOY_DIN_CODEC == SUPPORT_YES @@ -52,10 +51,10 @@ extern "C" { #include "EXITypes.h" int decode_dinExiDocument(bitstream_t* stream, struct dinEXIDocument* exiDoc); - + #if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag); -#endif /* DEPLOY_DIN_CODEC_FRAGMENT */ +#endif /* DEPLOY_DIN_CODEC_FRAGMENT */ #endif /* DEPLOY_DIN_CODEC */ diff --git a/src/din/dinEXIDatatypesEncoder.c b/src/din/dinEXIDatatypesEncoder.c index 2ec4aaa..0eaf2a5 100644 --- a/src/din/dinEXIDatatypesEncoder.c +++ b/src/din/dinEXIDatatypesEncoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2015 Siemens AG + * Copyright (C) 2007-2017 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,8 +18,8 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.9.3 - * @contact Joerg.Heuer@siemens.com + * @version 2017-09-05 + * @contact Richard.Kuntschke@siemens.com * *Code generated by EXIdizer
*Schema: V2G_CI_MsgDef.xsd
@@ -46,113 +46,113 @@ static int errn; /* Forward Declarations */ -static int encode_dinCurrentDemandResType(bitstream_t* stream, struct dinCurrentDemandResType* dinCurrentDemandResType); -static int encode_dinCanonicalizationMethodType(bitstream_t* stream, struct dinCanonicalizationMethodType* dinCanonicalizationMethodType); -static int encode_dinServiceDetailReqType(bitstream_t* stream, struct dinServiceDetailReqType* dinServiceDetailReqType); -static int encode_dinAC_EVSEStatusType(bitstream_t* stream, struct dinAC_EVSEStatusType* dinAC_EVSEStatusType); -static int encode_dinSPKIDataType(bitstream_t* stream, struct dinSPKIDataType* dinSPKIDataType); -static int encode_dinSessionSetupResType(bitstream_t* stream, struct dinSessionSetupResType* dinSessionSetupResType); -static int encode_dinPGPDataType(bitstream_t* stream, struct dinPGPDataType* dinPGPDataType); -static int encode_dinCableCheckResType(bitstream_t* stream, struct dinCableCheckResType* dinCableCheckResType); -static int encode_dinChargeParameterDiscoveryResType(bitstream_t* stream, struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType); -static int encode_dinManifestType(bitstream_t* stream, struct dinManifestType* dinManifestType); -static int encode_dinAC_EVChargeParameterType(bitstream_t* stream, struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType); -static int encode_dinBodyBaseType(bitstream_t* stream, struct dinBodyBaseType* dinBodyBaseType); -static int encode_dinDC_EVPowerDeliveryParameterType(bitstream_t* stream, struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType); -static int encode_dinCableCheckReqType(bitstream_t* stream, struct dinCableCheckReqType* dinCableCheckReqType); -static int encode_dinDigestMethodType(bitstream_t* stream, struct dinDigestMethodType* dinDigestMethodType); -static int encode_dinSalesTariffType(bitstream_t* stream, struct dinSalesTariffType* dinSalesTariffType); -static int encode_dinServicePaymentSelectionResType(bitstream_t* stream, struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType); -static int encode_dinPreChargeReqType(bitstream_t* stream, struct dinPreChargeReqType* dinPreChargeReqType); -static int encode_dinSAScheduleListType(bitstream_t* stream, struct dinSAScheduleListType* dinSAScheduleListType); -static int encode_dinCertificateChainType(bitstream_t* stream, struct dinCertificateChainType* dinCertificateChainType); -static int encode_dinSignaturePropertiesType(bitstream_t* stream, struct dinSignaturePropertiesType* dinSignaturePropertiesType); -static int encode_dinMessageHeaderType(bitstream_t* stream, struct dinMessageHeaderType* dinMessageHeaderType); -static int encode_dinPreChargeResType(bitstream_t* stream, struct dinPreChargeResType* dinPreChargeResType); -static int encode_dinMeteringReceiptResType(bitstream_t* stream, struct dinMeteringReceiptResType* dinMeteringReceiptResType); -static int encode_dinNotificationType(bitstream_t* stream, struct dinNotificationType* dinNotificationType); -static int encode_dinContractAuthenticationReqType(bitstream_t* stream, struct dinContractAuthenticationReqType* dinContractAuthenticationReqType); -static int encode_dinPhysicalValueType(bitstream_t* stream, struct dinPhysicalValueType* dinPhysicalValueType); -static int encode_dinChargingStatusResType(bitstream_t* stream, struct dinChargingStatusResType* dinChargingStatusResType); -static int encode_dinDC_EVSEStatusType(bitstream_t* stream, struct dinDC_EVSEStatusType* dinDC_EVSEStatusType); -static int encode_dinProfileEntryType(bitstream_t* stream, struct dinProfileEntryType* dinProfileEntryType); -static int encode_dinAC_EVSEChargeParameterType(bitstream_t* stream, struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType); -static int encode_dinServiceDiscoveryResType(bitstream_t* stream, struct dinServiceDiscoveryResType* dinServiceDiscoveryResType); -static int encode_dinSignatureType(bitstream_t* stream, struct dinSignatureType* dinSignatureType); -static int encode_dinPaymentOptionsType(bitstream_t* stream, struct dinPaymentOptionsType* dinPaymentOptionsType); -static int encode_dinParameterType(bitstream_t* stream, struct dinParameterType* dinParameterType); -static int encode_dinSignaturePropertyType(bitstream_t* stream, struct dinSignaturePropertyType* dinSignaturePropertyType); -static int encode_dinEVPowerDeliveryParameterType(bitstream_t* stream, struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType); -static int encode_dinWeldingDetectionReqType(bitstream_t* stream, struct dinWeldingDetectionReqType* dinWeldingDetectionReqType); -static int encode_dinTransformsType(bitstream_t* stream, struct dinTransformsType* dinTransformsType); -static int encode_dinServiceType(bitstream_t* stream, struct dinServiceType* dinServiceType); +static int encode_dinMeteringReceiptReqType(bitstream_t* stream, struct dinMeteringReceiptReqType* dinMeteringReceiptReqType); static int encode_dinBodyType(bitstream_t* stream, struct dinBodyType* dinBodyType); -static int encode_dinDC_EVStatusType(bitstream_t* stream, struct dinDC_EVStatusType* dinDC_EVStatusType); -static int encode_dinPMaxScheduleEntryType(bitstream_t* stream, struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType); -static int encode_dinPMaxScheduleType(bitstream_t* stream, struct dinPMaxScheduleType* dinPMaxScheduleType); -static int encode_dinSelectedServiceType(bitstream_t* stream, struct dinSelectedServiceType* dinSelectedServiceType); -static int encode_dinIntervalType(bitstream_t* stream, struct dinIntervalType* dinIntervalType); -static int encode_dinCertificateInstallationReqType(bitstream_t* stream, struct dinCertificateInstallationReqType* dinCertificateInstallationReqType); -static int encode_dinTransformType(bitstream_t* stream, struct dinTransformType* dinTransformType); -static int encode_dinKeyValueType(bitstream_t* stream, struct dinKeyValueType* dinKeyValueType); -static int encode_dinRetrievalMethodType(bitstream_t* stream, struct dinRetrievalMethodType* dinRetrievalMethodType); -static int encode_dinEVChargeParameterType(bitstream_t* stream, struct dinEVChargeParameterType* dinEVChargeParameterType); -static int encode_dinServiceChargeType(bitstream_t* stream, struct dinServiceChargeType* dinServiceChargeType); -static int encode_dinParameterSetType(bitstream_t* stream, struct dinParameterSetType* dinParameterSetType); -static int encode_dinReferenceType(bitstream_t* stream, struct dinReferenceType* dinReferenceType); -static int encode_dinSessionStopResType(bitstream_t* stream, struct dinSessionStopResType* dinSessionStopResType); -static int encode_dinObjectType(bitstream_t* stream, struct dinObjectType* dinObjectType); -static int encode_dinSignatureValueType(bitstream_t* stream, struct dinSignatureValueType* dinSignatureValueType); +static int encode_dinSessionSetupReqType(bitstream_t* stream, struct dinSessionSetupReqType* dinSessionSetupReqType); +static int encode_dinPowerDeliveryResType(bitstream_t* stream, struct dinPowerDeliveryResType* dinPowerDeliveryResType); +static int encode_dinServiceDetailResType(bitstream_t* stream, struct dinServiceDetailResType* dinServiceDetailResType); +static int encode_dinWeldingDetectionResType(bitstream_t* stream, struct dinWeldingDetectionResType* dinWeldingDetectionResType); +static int encode_dinContractAuthenticationResType(bitstream_t* stream, struct dinContractAuthenticationResType* dinContractAuthenticationResType); +static int encode_dinCanonicalizationMethodType(bitstream_t* stream, struct dinCanonicalizationMethodType* dinCanonicalizationMethodType); +static int encode_dinSPKIDataType(bitstream_t* stream, struct dinSPKIDataType* dinSPKIDataType); +static int encode_dinListOfRootCertificateIDsType(bitstream_t* stream, struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType); static int encode_dinSelectedServiceListType(bitstream_t* stream, struct dinSelectedServiceListType* dinSelectedServiceListType); +static int encode_dinCurrentDemandResType(bitstream_t* stream, struct dinCurrentDemandResType* dinCurrentDemandResType); +static int encode_dinTransformType(bitstream_t* stream, struct dinTransformType* dinTransformType); +static int encode_dinAC_EVChargeParameterType(bitstream_t* stream, struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType); +static int encode_dinX509DataType(bitstream_t* stream, struct dinX509DataType* dinX509DataType); +static int encode_dinChargingStatusResType(bitstream_t* stream, struct dinChargingStatusResType* dinChargingStatusResType); +static int encode_dinWeldingDetectionReqType(bitstream_t* stream, struct dinWeldingDetectionReqType* dinWeldingDetectionReqType); +static int encode_dinSignaturePropertiesType(bitstream_t* stream, struct dinSignaturePropertiesType* dinSignaturePropertiesType); +static int encode_dinContractAuthenticationReqType(bitstream_t* stream, struct dinContractAuthenticationReqType* dinContractAuthenticationReqType); +static int encode_dinDC_EVPowerDeliveryParameterType(bitstream_t* stream, struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType); +static int encode_dinEVSEChargeParameterType(bitstream_t* stream, struct dinEVSEChargeParameterType* dinEVSEChargeParameterType); +static int encode_dinCableCheckReqType(bitstream_t* stream, struct dinCableCheckReqType* dinCableCheckReqType); +static int encode_dinDC_EVChargeParameterType(bitstream_t* stream, struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType); +static int encode_dinSAScheduleListType(bitstream_t* stream, struct dinSAScheduleListType* dinSAScheduleListType); +static int encode_dinPMaxScheduleType(bitstream_t* stream, struct dinPMaxScheduleType* dinPMaxScheduleType); +static int encode_dinServicePaymentSelectionReqType(bitstream_t* stream, struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType); +static int encode_dinRelativeTimeIntervalType(bitstream_t* stream, struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType); +static int encode_dinEVStatusType(bitstream_t* stream, struct dinEVStatusType* dinEVStatusType); +static int encode_dinPreChargeResType(bitstream_t* stream, struct dinPreChargeResType* dinPreChargeResType); +static int encode_dinDC_EVSEChargeParameterType(bitstream_t* stream, struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType); +static int encode_dinPaymentDetailsResType(bitstream_t* stream, struct dinPaymentDetailsResType* dinPaymentDetailsResType); +static int encode_dinDSAKeyValueType(bitstream_t* stream, struct dinDSAKeyValueType* dinDSAKeyValueType); +static int encode_dinSASchedulesType(bitstream_t* stream, struct dinSASchedulesType* dinSASchedulesType); +static int encode_dinCertificateUpdateResType(bitstream_t* stream, struct dinCertificateUpdateResType* dinCertificateUpdateResType); +static int encode_dinEVChargeParameterType(bitstream_t* stream, struct dinEVChargeParameterType* dinEVChargeParameterType); +static int encode_dinMessageHeaderType(bitstream_t* stream, struct dinMessageHeaderType* dinMessageHeaderType); +static int encode_dinBodyBaseType(bitstream_t* stream, struct dinBodyBaseType* dinBodyBaseType); +static int encode_dinKeyValueType(bitstream_t* stream, struct dinKeyValueType* dinKeyValueType); +static int encode_dinIntervalType(bitstream_t* stream, struct dinIntervalType* dinIntervalType); +static int encode_dinChargeParameterDiscoveryResType(bitstream_t* stream, struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType); +static int encode_dinPowerDeliveryReqType(bitstream_t* stream, struct dinPowerDeliveryReqType* dinPowerDeliveryReqType); +static int encode_dinCertificateChainType(bitstream_t* stream, struct dinCertificateChainType* dinCertificateChainType); +static int encode_dinTransformsType(bitstream_t* stream, struct dinTransformsType* dinTransformsType); +static int encode_dinEntryType(bitstream_t* stream, struct dinEntryType* dinEntryType); +static int encode_dinSessionStopType(bitstream_t* stream, struct dinSessionStopType* dinSessionStopType); +static int encode_dinServiceDetailReqType(bitstream_t* stream, struct dinServiceDetailReqType* dinServiceDetailReqType); +static int encode_dinDigestMethodType(bitstream_t* stream, struct dinDigestMethodType* dinDigestMethodType); +static int encode_dinParameterType(bitstream_t* stream, struct dinParameterType* dinParameterType); +static int encode_dinChargingStatusReqType(bitstream_t* stream, struct dinChargingStatusReqType* dinChargingStatusReqType); +static int encode_dinSignatureMethodType(bitstream_t* stream, struct dinSignatureMethodType* dinSignatureMethodType); +static int encode_dinCertificateInstallationReqType(bitstream_t* stream, struct dinCertificateInstallationReqType* dinCertificateInstallationReqType); static int encode_dinSalesTariffEntryType(bitstream_t* stream, struct dinSalesTariffEntryType* dinSalesTariffEntryType); +static int encode_dinServiceDiscoveryResType(bitstream_t* stream, struct dinServiceDiscoveryResType* dinServiceDiscoveryResType); +static int encode_dinParameterSetType(bitstream_t* stream, struct dinParameterSetType* dinParameterSetType); +static int encode_dinCurrentDemandReqType(bitstream_t* stream, struct dinCurrentDemandReqType* dinCurrentDemandReqType); +static int encode_dinPreChargeReqType(bitstream_t* stream, struct dinPreChargeReqType* dinPreChargeReqType); +static int encode_dinSignatureType(bitstream_t* stream, struct dinSignatureType* dinSignatureType); +static int encode_dinReferenceType(bitstream_t* stream, struct dinReferenceType* dinReferenceType); +static int encode_dinProfileEntryType(bitstream_t* stream, struct dinProfileEntryType* dinProfileEntryType); +static int encode_dinAnonType_V2G_Message(bitstream_t* stream, struct dinAnonType_V2G_Message* dinAnonType_V2G_Message); +static int encode_dinChargeParameterDiscoveryReqType(bitstream_t* stream, struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType); static int encode_dinConsumptionCostType(bitstream_t* stream, struct dinConsumptionCostType* dinConsumptionCostType); static int encode_dinRSAKeyValueType(bitstream_t* stream, struct dinRSAKeyValueType* dinRSAKeyValueType); -static int encode_dinMeteringReceiptReqType(bitstream_t* stream, struct dinMeteringReceiptReqType* dinMeteringReceiptReqType); -static int encode_dinSAScheduleTupleType(bitstream_t* stream, struct dinSAScheduleTupleType* dinSAScheduleTupleType); -static int encode_dinRelativeTimeIntervalType(bitstream_t* stream, struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType); -static int encode_dinChargingProfileType(bitstream_t* stream, struct dinChargingProfileType* dinChargingProfileType); -static int encode_dinCurrentDemandReqType(bitstream_t* stream, struct dinCurrentDemandReqType* dinCurrentDemandReqType); -static int encode_dinKeyInfoType(bitstream_t* stream, struct dinKeyInfoType* dinKeyInfoType); -static int encode_dinServicePaymentSelectionReqType(bitstream_t* stream, struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType); -static int encode_dinContractAuthenticationResType(bitstream_t* stream, struct dinContractAuthenticationResType* dinContractAuthenticationResType); -static int encode_dinChargingStatusReqType(bitstream_t* stream, struct dinChargingStatusReqType* dinChargingStatusReqType); -static int encode_dinPaymentDetailsResType(bitstream_t* stream, struct dinPaymentDetailsResType* dinPaymentDetailsResType); -static int encode_dinSASchedulesType(bitstream_t* stream, struct dinSASchedulesType* dinSASchedulesType); -static int encode_dinPaymentDetailsReqType(bitstream_t* stream, struct dinPaymentDetailsReqType* dinPaymentDetailsReqType); -static int encode_dinServiceTagType(bitstream_t* stream, struct dinServiceTagType* dinServiceTagType); -static int encode_dinChargeParameterDiscoveryReqType(bitstream_t* stream, struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType); -static int encode_dinServiceParameterListType(bitstream_t* stream, struct dinServiceParameterListType* dinServiceParameterListType); -static int encode_dinEVSEStatusType(bitstream_t* stream, struct dinEVSEStatusType* dinEVSEStatusType); -static int encode_dinServiceDiscoveryReqType(bitstream_t* stream, struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType); -static int encode_dinWeldingDetectionResType(bitstream_t* stream, struct dinWeldingDetectionResType* dinWeldingDetectionResType); -static int encode_dinCertificateUpdateReqType(bitstream_t* stream, struct dinCertificateUpdateReqType* dinCertificateUpdateReqType); +static int encode_dinServiceType(bitstream_t* stream, struct dinServiceType* dinServiceType); static int encode_dinServiceTagListType(bitstream_t* stream, struct dinServiceTagListType* dinServiceTagListType); -static int encode_dinSignedInfoType(bitstream_t* stream, struct dinSignedInfoType* dinSignedInfoType); -static int encode_dinPowerDeliveryReqType(bitstream_t* stream, struct dinPowerDeliveryReqType* dinPowerDeliveryReqType); -static int encode_dinCostType(bitstream_t* stream, struct dinCostType* dinCostType); -static int encode_dinDC_EVChargeParameterType(bitstream_t* stream, struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType); -static int encode_dinSubCertificatesType(bitstream_t* stream, struct dinSubCertificatesType* dinSubCertificatesType); -static int encode_dinSessionSetupReqType(bitstream_t* stream, struct dinSessionSetupReqType* dinSessionSetupReqType); -static int encode_dinAnonType_V2G_Message(bitstream_t* stream, struct dinAnonType_V2G_Message* dinAnonType_V2G_Message); -static int encode_dinMeterInfoType(bitstream_t* stream, struct dinMeterInfoType* dinMeterInfoType); -static int encode_dinCertificateInstallationResType(bitstream_t* stream, struct dinCertificateInstallationResType* dinCertificateInstallationResType); -static int encode_dinServiceDetailResType(bitstream_t* stream, struct dinServiceDetailResType* dinServiceDetailResType); +static int encode_dinEVSEStatusType(bitstream_t* stream, struct dinEVSEStatusType* dinEVSEStatusType); +static int encode_dinSessionSetupResType(bitstream_t* stream, struct dinSessionSetupResType* dinSessionSetupResType); +static int encode_dinEVPowerDeliveryParameterType(bitstream_t* stream, struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType); static int encode_dinX509IssuerSerialType(bitstream_t* stream, struct dinX509IssuerSerialType* dinX509IssuerSerialType); -static int encode_dinDC_EVSEChargeParameterType(bitstream_t* stream, struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType); -static int encode_dinEVStatusType(bitstream_t* stream, struct dinEVStatusType* dinEVStatusType); -static int encode_dinX509DataType(bitstream_t* stream, struct dinX509DataType* dinX509DataType); -static int encode_dinPowerDeliveryResType(bitstream_t* stream, struct dinPowerDeliveryResType* dinPowerDeliveryResType); -static int encode_dinDSAKeyValueType(bitstream_t* stream, struct dinDSAKeyValueType* dinDSAKeyValueType); -static int encode_dinCertificateUpdateResType(bitstream_t* stream, struct dinCertificateUpdateResType* dinCertificateUpdateResType); -static int encode_dinSessionStopType(bitstream_t* stream, struct dinSessionStopType* dinSessionStopType); -static int encode_dinEVSEChargeParameterType(bitstream_t* stream, struct dinEVSEChargeParameterType* dinEVSEChargeParameterType); -static int encode_dinEntryType(bitstream_t* stream, struct dinEntryType* dinEntryType); -static int encode_dinListOfRootCertificateIDsType(bitstream_t* stream, struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType); -static int encode_dinSignatureMethodType(bitstream_t* stream, struct dinSignatureMethodType* dinSignatureMethodType); +static int encode_dinSelectedServiceType(bitstream_t* stream, struct dinSelectedServiceType* dinSelectedServiceType); +static int encode_dinMeteringReceiptResType(bitstream_t* stream, struct dinMeteringReceiptResType* dinMeteringReceiptResType); +static int encode_dinDC_EVStatusType(bitstream_t* stream, struct dinDC_EVStatusType* dinDC_EVStatusType); +static int encode_dinPhysicalValueType(bitstream_t* stream, struct dinPhysicalValueType* dinPhysicalValueType); +static int encode_dinManifestType(bitstream_t* stream, struct dinManifestType* dinManifestType); +static int encode_dinPMaxScheduleEntryType(bitstream_t* stream, struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType); +static int encode_dinServiceParameterListType(bitstream_t* stream, struct dinServiceParameterListType* dinServiceParameterListType); +static int encode_dinSignatureValueType(bitstream_t* stream, struct dinSignatureValueType* dinSignatureValueType); +static int encode_dinPaymentOptionsType(bitstream_t* stream, struct dinPaymentOptionsType* dinPaymentOptionsType); +static int encode_dinServiceTagType(bitstream_t* stream, struct dinServiceTagType* dinServiceTagType); +static int encode_dinAC_EVSEStatusType(bitstream_t* stream, struct dinAC_EVSEStatusType* dinAC_EVSEStatusType); +static int encode_dinCertificateUpdateReqType(bitstream_t* stream, struct dinCertificateUpdateReqType* dinCertificateUpdateReqType); +static int encode_dinServicePaymentSelectionResType(bitstream_t* stream, struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType); +static int encode_dinSAScheduleTupleType(bitstream_t* stream, struct dinSAScheduleTupleType* dinSAScheduleTupleType); +static int encode_dinChargingProfileType(bitstream_t* stream, struct dinChargingProfileType* dinChargingProfileType); +static int encode_dinServiceDiscoveryReqType(bitstream_t* stream, struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType); +static int encode_dinAC_EVSEChargeParameterType(bitstream_t* stream, struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType); +static int encode_dinKeyInfoType(bitstream_t* stream, struct dinKeyInfoType* dinKeyInfoType); +static int encode_dinPaymentDetailsReqType(bitstream_t* stream, struct dinPaymentDetailsReqType* dinPaymentDetailsReqType); +static int encode_dinCableCheckResType(bitstream_t* stream, struct dinCableCheckResType* dinCableCheckResType); +static int encode_dinObjectType(bitstream_t* stream, struct dinObjectType* dinObjectType); +static int encode_dinSessionStopResType(bitstream_t* stream, struct dinSessionStopResType* dinSessionStopResType); +static int encode_dinSignedInfoType(bitstream_t* stream, struct dinSignedInfoType* dinSignedInfoType); +static int encode_dinSalesTariffType(bitstream_t* stream, struct dinSalesTariffType* dinSalesTariffType); +static int encode_dinCostType(bitstream_t* stream, struct dinCostType* dinCostType); +static int encode_dinServiceChargeType(bitstream_t* stream, struct dinServiceChargeType* dinServiceChargeType); +static int encode_dinDC_EVSEStatusType(bitstream_t* stream, struct dinDC_EVSEStatusType* dinDC_EVSEStatusType); +static int encode_dinRetrievalMethodType(bitstream_t* stream, struct dinRetrievalMethodType* dinRetrievalMethodType); +static int encode_dinNotificationType(bitstream_t* stream, struct dinNotificationType* dinNotificationType); +static int encode_dinPGPDataType(bitstream_t* stream, struct dinPGPDataType* dinPGPDataType); +static int encode_dinCertificateInstallationResType(bitstream_t* stream, struct dinCertificateInstallationResType* dinCertificateInstallationResType); +static int encode_dinSignaturePropertyType(bitstream_t* stream, struct dinSignaturePropertyType* dinSignaturePropertyType); +static int encode_dinMeterInfoType(bitstream_t* stream, struct dinMeterInfoType* dinMeterInfoType); +static int encode_dinSubCertificatesType(bitstream_t* stream, struct dinSubCertificatesType* dinSubCertificatesType); - /* Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2010:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2010:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumPowerLimit{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinCurrentDemandResType(bitstream_t* stream, struct dinCurrentDemandResType* dinCurrentDemandResType) { + /* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":SessionID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo)', derivedBy='EXTENSION'. */ +static int encode_dinMeteringReceiptReqType(bitstream_t* stream, struct dinMeteringReceiptReqType* dinMeteringReceiptReqType) { int grammarID = 0; int done = 0; @@ -160,29 +160,51 @@ static int encode_dinCurrentDemandResType(bitstream_t* stream, struct dinCurrent while(!done) { switch(grammarID) { case 0: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ + if ( dinMeteringReceiptReqType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeteringReceiptReqType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinMeteringReceiptReqType->Id.characters, dinMeteringReceiptReqType->Id.charactersLen); + } + } + grammarID = 1; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinCurrentDemandResType->ResponseCode); + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeteringReceiptReqType->SessionID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinMeteringReceiptReqType->SessionID.bytes, dinMeteringReceiptReqType->SessionID.bytesLen); + } /* valid EE */ errn = encodeNBitUnsignedInteger(stream, 1, 0); } } - grammarID = 1; + grammarID = 2; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; case 1: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ if ( 1 == 1 ) { errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { - errn = encode_dinDC_EVSEStatusType(stream, &dinCurrentDemandResType->DC_EVSEStatus ); + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeteringReceiptReqType->SessionID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinMeteringReceiptReqType->SessionID.bytes, dinMeteringReceiptReqType->SessionID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } } grammarID = 2; } else { @@ -190,23 +212,35 @@ static int encode_dinCurrentDemandResType(bitstream_t* stream, struct dinCurrent } break; case 2: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ + if ( dinMeteringReceiptReqType->SAScheduleTupleID_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEPresentVoltage ); + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinMeteringReceiptReqType->SAScheduleTupleID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } } grammarID = 3; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinMeterInfoType(stream, &dinMeteringReceiptReqType->MeterInfo ); + } + grammarID = 4; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; case 3: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ if ( 1 == 1 ) { errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEPresentCurrent ); + errn = encode_dinMeterInfoType(stream, &dinMeteringReceiptReqType->MeterInfo ); } grammarID = 4; } else { @@ -214,3314 +248,17 @@ static int encode_dinCurrentDemandResType(bitstream_t* stream, struct dinCurrent } break; case 4: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ - if ( 1 == 1 ) { + /* Element[END_ELEMENT] */ + if (1==1) { errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandResType->EVSECurrentLimitAchieved); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } + done = 1; } grammarID = 5; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 5: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandResType->EVSEVoltageLimitAchieved); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 6; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 6: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandResType->EVSEPowerLimitAchieved); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 7; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 7: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ - if ( dinCurrentDemandResType->EVSEMaximumVoltageLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumVoltageLimit ); - } - grammarID = 8; - } else if ( dinCurrentDemandResType->EVSEMaximumCurrentLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumCurrentLimit ); - } - grammarID = 9; - } else if ( dinCurrentDemandResType->EVSEMaximumPowerLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumPowerLimit ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 8: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ - if ( dinCurrentDemandResType->EVSEMaximumCurrentLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumCurrentLimit ); - } - grammarID = 9; - } else if ( dinCurrentDemandResType->EVSEMaximumPowerLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumPowerLimit ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 9: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ - if ( dinCurrentDemandResType->EVSEMaximumPowerLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumPowerLimit ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##any]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinCanonicalizationMethodType(bitstream_t* stream, struct dinCanonicalizationMethodType* dinCanonicalizationMethodType) { - int grammarID = 12; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 12: - /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCanonicalizationMethodType->Algorithm.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinCanonicalizationMethodType->Algorithm.characters, dinCanonicalizationMethodType->Algorithm.charactersLen); - } - } - grammarID = 13; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 13: - /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 14: - /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ServiceID)', derivedBy='EXTENSION'. */ -static int encode_dinServiceDetailReqType(bitstream_t* stream, struct dinServiceDetailReqType* dinServiceDetailReqType) { - int grammarID = 15; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 15: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, dinServiceDetailReqType->ServiceID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ -static int encode_dinAC_EVSEStatusType(bitstream_t* stream, struct dinAC_EVSEStatusType* dinAC_EVSEStatusType) { - int grammarID = 16; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 16: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinAC_EVSEStatusType->PowerSwitchClosed); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 17; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 17: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinAC_EVSEStatusType->RCD); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 18; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 18: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NotificationMaxDelay)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger32(stream, dinAC_EVSEStatusType->NotificationMaxDelay); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 19; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 19: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSENotification)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 2, dinAC_EVSEStatusType->EVSENotification); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ -static int encode_dinSPKIDataType(bitstream_t* stream, struct dinSPKIDataType* dinSPKIDataType) { - int grammarID = 20; - int done = 0; - - unsigned int dinSPKIDataType_SPKISexp_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 20: - /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ - if (dinSPKIDataType_SPKISexp_currArrayIndex < dinSPKIDataType->SPKISexp.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytes, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen); - dinSPKIDataType_SPKISexp_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 21; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 21: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ - if (dinSPKIDataType_SPKISexp_currArrayIndex < dinSPKIDataType->SPKISexp.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytes, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen); - dinSPKIDataType_SPKISexp_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 21; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 22; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 22: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ - if (dinSPKIDataType_SPKISexp_currArrayIndex < dinSPKIDataType->SPKISexp.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytes, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen); - dinSPKIDataType_SPKISexp_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 21; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":DateTimeNow{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinSessionSetupResType(bitstream_t* stream, struct dinSessionSetupResType* dinSessionSetupResType) { - int grammarID = 23; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 23: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinSessionSetupResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 24; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 24: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSessionSetupResType->EVSEID.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinSessionSetupResType->EVSEID.bytes, dinSessionSetupResType->EVSEID.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 25; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 25: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow), END_ELEMENT] */ - if ( dinSessionSetupResType->DateTimeNow_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger64(stream, dinSessionSetupResType->DateTimeNow); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))', derivedBy='RESTRICTION'. */ -static int encode_dinPGPDataType(bitstream_t* stream, struct dinPGPDataType* dinPGPDataType) { - int grammarID = 26; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 26: - /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ - if ( dinPGPDataType->PGPKeyID_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinPGPDataType->PGPKeyID.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinPGPDataType->PGPKeyID.bytes, dinPGPDataType->PGPKeyID.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 27; - } else if ( dinPGPDataType->PGPKeyPacket_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinPGPDataType->PGPKeyPacket.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinPGPDataType->PGPKeyPacket.bytes, dinPGPDataType->PGPKeyPacket.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 28; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 27: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ - if ( dinPGPDataType->PGPKeyPacket_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinPGPDataType->PGPKeyPacket.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinPGPDataType->PGPKeyPacket.bytes, dinPGPDataType->PGPKeyPacket.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 28; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 28; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 28: - /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 28; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)', derivedBy='EXTENSION'. */ -static int encode_dinCableCheckResType(bitstream_t* stream, struct dinCableCheckResType* dinCableCheckResType) { - int grammarID = 29; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 29: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinCableCheckResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 30; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 30: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVSEStatusType(stream, &dinCableCheckResType->DC_EVSEStatus ); - } - grammarID = 31; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 31: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEProcessing)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 1, dinCableCheckResType->EVSEProcessing); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing,"urn:iso:15118:2:2010:MsgDataTypes":SASchedules,"urn:iso:15118:2:2010:MsgDataTypes":EVSEChargeParameter)', derivedBy='EXTENSION'. */ -static int encode_dinChargeParameterDiscoveryResType(bitstream_t* stream, struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType) { - int grammarID = 32; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 32: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinChargeParameterDiscoveryResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 33; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 33: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEProcessing)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 1, dinChargeParameterDiscoveryResType->EVSEProcessing); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 34; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 34: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules)] */ - if ( dinChargeParameterDiscoveryResType->SAScheduleList_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinSAScheduleListType(stream, &dinChargeParameterDiscoveryResType->SAScheduleList ); - } - grammarID = 35; - } else if ( dinChargeParameterDiscoveryResType->SASchedules_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinSASchedulesType(stream, &dinChargeParameterDiscoveryResType->SASchedules ); - } - grammarID = 35; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 35: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ - if ( dinChargeParameterDiscoveryResType->AC_EVSEChargeParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinAC_EVSEChargeParameterType(stream, &dinChargeParameterDiscoveryResType->AC_EVSEChargeParameter ); - } - grammarID = 10; - } else if ( dinChargeParameterDiscoveryResType->DC_EVSEChargeParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinDC_EVSEChargeParameterType(stream, &dinChargeParameterDiscoveryResType->DC_EVSEChargeParameter ); - } - grammarID = 10; - } else if ( dinChargeParameterDiscoveryResType->EVSEChargeParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - errn = encode_dinEVSEChargeParameterType(stream, &dinChargeParameterDiscoveryResType->EVSEChargeParameter ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ManifestType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinManifestType(bitstream_t* stream, struct dinManifestType* dinManifestType) { - int grammarID = 36; - int done = 0; - - unsigned int dinManifestType_Reference_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 36: - /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ - if ( dinManifestType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinManifestType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinManifestType->Id.characters, dinManifestType->Id.charactersLen); - } - } - grammarID = 37; - } else if (dinManifestType_Reference_currArrayIndex < dinManifestType->Reference.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinReferenceType(stream, &dinManifestType->Reference.array [dinManifestType_Reference_currArrayIndex++]); - } - grammarID = 38; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 37: - /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ - if (dinManifestType_Reference_currArrayIndex < dinManifestType->Reference.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinReferenceType(stream, &dinManifestType->Reference.array [dinManifestType_Reference_currArrayIndex++]); - } - grammarID = 38; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 38: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ - if (dinManifestType_Reference_currArrayIndex < dinManifestType->Reference.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinReferenceType(stream, &dinManifestType->Reference.array [dinManifestType_Reference_currArrayIndex++]); - } - grammarID = 38; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DepartureTime,"urn:iso:15118:2:2010:MsgDataTypes":EAmount,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent)', derivedBy='EXTENSION'. */ -static int encode_dinAC_EVChargeParameterType(bitstream_t* stream, struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType) { - int grammarID = 39; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 39: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger32(stream, dinAC_EVChargeParameterType->DepartureTime); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 40; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 40: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinAC_EVChargeParameterType->EAmount ); - } - grammarID = 41; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 41: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinAC_EVChargeParameterType->EVMaxVoltage ); - } - grammarID = 42; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 42: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinAC_EVChargeParameterType->EVMaxCurrent ); - } - grammarID = 43; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 43: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinAC_EVChargeParameterType->EVMinCurrent ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDef,BodyBaseType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -static int encode_dinBodyBaseType(bitstream_t* stream, struct dinBodyBaseType* dinBodyBaseType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVPowerDeliveryParameterType', base type name='EVPowerDeliveryParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete)', derivedBy='EXTENSION'. */ -static int encode_dinDC_EVPowerDeliveryParameterType(bitstream_t* stream, struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType) { - int grammarID = 45; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 45: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVStatusType(stream, &dinDC_EVPowerDeliveryParameterType->DC_EVStatus ); - } - grammarID = 46; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 46: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ - if ( dinDC_EVPowerDeliveryParameterType->BulkChargingComplete_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinDC_EVPowerDeliveryParameterType->BulkChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 47; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinDC_EVPowerDeliveryParameterType->ChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 47: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinDC_EVPowerDeliveryParameterType->ChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)', derivedBy='EXTENSION'. */ -static int encode_dinCableCheckReqType(bitstream_t* stream, struct dinCableCheckReqType* dinCableCheckReqType) { - int grammarID = 48; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 48: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVStatusType(stream, &dinCableCheckReqType->DC_EVStatus ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinDigestMethodType(bitstream_t* stream, struct dinDigestMethodType* dinDigestMethodType) { - int grammarID = 12; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 12: - /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDigestMethodType->Algorithm.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinDigestMethodType->Algorithm.characters, dinDigestMethodType->Algorithm.charactersLen); - } - } - grammarID = 13; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 13: - /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 14: - /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2010:MsgDataTypes":NumEPriceLevels,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinSalesTariffType(bitstream_t* stream, struct dinSalesTariffType* dinSalesTariffType) { - int grammarID = 49; - int done = 0; - - unsigned int dinSalesTariffType_SalesTariffEntry_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 49: - /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSalesTariffType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinSalesTariffType->Id.characters, dinSalesTariffType->Id.charactersLen); - } - } - grammarID = 50; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 50: - /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinSalesTariffType->SalesTariffID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 51; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 51: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ - if ( dinSalesTariffType->SalesTariffDescription_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - 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)(dinSalesTariffType->SalesTariffDescription.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinSalesTariffType->SalesTariffDescription.characters, dinSalesTariffType->SalesTariffDescription.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 52; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(dinSalesTariffType->NumEPriceLevels - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 53; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 52: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(dinSalesTariffType->NumEPriceLevels - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 53; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 53: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry)] */ - if (dinSalesTariffType_SalesTariffEntry_currArrayIndex < dinSalesTariffType->SalesTariffEntry.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinSalesTariffEntryType(stream, &dinSalesTariffType->SalesTariffEntry.array [dinSalesTariffType_SalesTariffEntry_currArrayIndex++]); - } - grammarID = 54; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 54: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), END_ELEMENT] */ - if (dinSalesTariffType_SalesTariffEntry_currArrayIndex < dinSalesTariffType->SalesTariffEntry.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinSalesTariffEntryType(stream, &dinSalesTariffType->SalesTariffEntry.array [dinSalesTariffType_SalesTariffEntry_currArrayIndex++]); - } - grammarID = 54; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)', derivedBy='EXTENSION'. */ -static int encode_dinServicePaymentSelectionResType(bitstream_t* stream, struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType) { - int grammarID = 55; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 55: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinServicePaymentSelectionResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent)', derivedBy='EXTENSION'. */ -static int encode_dinPreChargeReqType(bitstream_t* stream, struct dinPreChargeReqType* dinPreChargeReqType) { - int grammarID = 56; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 56: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVStatusType(stream, &dinPreChargeReqType->DC_EVStatus ); - } - grammarID = 57; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 57: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinPreChargeReqType->EVTargetVoltage ); - } - grammarID = 58; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 58: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinPreChargeReqType->EVTargetCurrent ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SAScheduleListType', base type name='SASchedulesType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTuple{1-UNBOUNDED})', derivedBy='EXTENSION'. */ -static int encode_dinSAScheduleListType(bitstream_t* stream, struct dinSAScheduleListType* dinSAScheduleListType) { - int grammarID = 59; - int done = 0; - - unsigned int dinSAScheduleListType_SAScheduleTuple_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 59: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ - if (dinSAScheduleListType_SAScheduleTuple_currArrayIndex < dinSAScheduleListType->SAScheduleTuple.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinSAScheduleTupleType(stream, &dinSAScheduleListType->SAScheduleTuple.array [dinSAScheduleListType_SAScheduleTuple_currArrayIndex++]); - } - grammarID = 60; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 60: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple), END_ELEMENT] */ - if (dinSAScheduleListType_SAScheduleTuple_currArrayIndex < dinSAScheduleListType->SAScheduleTuple.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinSAScheduleTupleType(stream, &dinSAScheduleListType->SAScheduleTuple.array [dinSAScheduleListType_SAScheduleTuple_currArrayIndex++]); - } - grammarID = 60; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinCertificateChainType(bitstream_t* stream, struct dinCertificateChainType* dinCertificateChainType) { - int grammarID = 61; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 61: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateChainType->Certificate.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinCertificateChainType->Certificate.bytes, dinCertificateChainType->Certificate.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 62; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 62: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ - if ( dinCertificateChainType->SubCertificates_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinSubCertificatesType(stream, &dinCertificateChainType->SubCertificates ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertiesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SignatureProperty{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinSignaturePropertiesType(bitstream_t* stream, struct dinSignaturePropertiesType* dinSignaturePropertiesType) { - int grammarID = 63; - int done = 0; - - unsigned int dinSignaturePropertiesType_SignatureProperty_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 63: - /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ - if ( dinSignaturePropertiesType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertiesType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinSignaturePropertiesType->Id.characters, dinSignaturePropertiesType->Id.charactersLen); - } - } - grammarID = 64; - } else if (dinSignaturePropertiesType_SignatureProperty_currArrayIndex < dinSignaturePropertiesType->SignatureProperty.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinSignaturePropertyType(stream, &dinSignaturePropertiesType->SignatureProperty.array [dinSignaturePropertiesType_SignatureProperty_currArrayIndex++]); - } - grammarID = 65; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 64: - /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ - if (dinSignaturePropertiesType_SignatureProperty_currArrayIndex < dinSignaturePropertiesType->SignatureProperty.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinSignaturePropertyType(stream, &dinSignaturePropertiesType->SignatureProperty.array [dinSignaturePropertiesType_SignatureProperty_currArrayIndex++]); - } - grammarID = 65; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 65: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ - if (dinSignaturePropertiesType_SignatureProperty_currArrayIndex < dinSignaturePropertiesType->SignatureProperty.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinSignaturePropertyType(stream, &dinSignaturePropertiesType->SignatureProperty.array [dinSignaturePropertiesType_SignatureProperty_currArrayIndex++]); - } - grammarID = 65; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgHeader,MessageHeaderType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgHeader":SessionID,"urn:iso:15118:2:2010:MsgHeader":Notification{0-1},"http://www.w3.org/2000/09/xmldsig#":Signature{0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinMessageHeaderType(bitstream_t* stream, struct dinMessageHeaderType* dinMessageHeaderType) { - int grammarID = 66; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 66: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMessageHeaderType->SessionID.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinMessageHeaderType->SessionID.bytes, dinMessageHeaderType->SessionID.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 67; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 67: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ - if ( dinMessageHeaderType->Notification_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinNotificationType(stream, &dinMessageHeaderType->Notification ); - } - grammarID = 68; - } else if ( dinMessageHeaderType->Signature_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinSignatureType(stream, &dinMessageHeaderType->Signature ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 68: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ - if ( dinMessageHeaderType->Signature_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinSignatureType(stream, &dinMessageHeaderType->Signature ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)', derivedBy='EXTENSION'. */ -static int encode_dinPreChargeResType(bitstream_t* stream, struct dinPreChargeResType* dinPreChargeResType) { - int grammarID = 69; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 69: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinPreChargeResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 70; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 70: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVSEStatusType(stream, &dinPreChargeResType->DC_EVSEStatus ); - } - grammarID = 71; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 71: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinPreChargeResType->EVSEPresentVoltage ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)', derivedBy='EXTENSION'. */ -static int encode_dinMeteringReceiptResType(bitstream_t* stream, struct dinMeteringReceiptResType* dinMeteringReceiptResType) { - int grammarID = 72; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 72: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinMeteringReceiptResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 73; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 73: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinAC_EVSEStatusType(stream, &dinMeteringReceiptResType->AC_EVSEStatus ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,NotificationType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":FaultCode,"urn:iso:15118:2:2010:MsgDataTypes":FaultMsg{0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinNotificationType(bitstream_t* stream, struct dinNotificationType* dinNotificationType) { - int grammarID = 74; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 74: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 2, dinNotificationType->FaultCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 75; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 75: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ - if ( dinNotificationType->FaultMsg_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - 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)(dinNotificationType->FaultMsg.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinNotificationType->FaultMsg.characters, dinNotificationType->FaultMsg.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":GenChallenge{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinContractAuthenticationReqType(bitstream_t* stream, struct dinContractAuthenticationReqType* dinContractAuthenticationReqType) { - int grammarID = 76; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 76: - /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge), END_ELEMENT] */ - if ( dinContractAuthenticationReqType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinContractAuthenticationReqType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinContractAuthenticationReqType->Id.characters, dinContractAuthenticationReqType->Id.charactersLen); - } - } - grammarID = 77; - } else if ( dinContractAuthenticationReqType->GenChallenge_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - 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)(dinContractAuthenticationReqType->GenChallenge.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinContractAuthenticationReqType->GenChallenge.characters, dinContractAuthenticationReqType->GenChallenge.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 77: - /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge), END_ELEMENT] */ - if ( dinContractAuthenticationReqType->GenChallenge_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - 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)(dinContractAuthenticationReqType->GenChallenge.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinContractAuthenticationReqType->GenChallenge.characters, dinContractAuthenticationReqType->GenChallenge.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ -static int encode_dinPhysicalValueType(bitstream_t* stream, struct dinPhysicalValueType* dinPhysicalValueType) { - int grammarID = 78; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 78: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 3, (uint32_t)(dinPhysicalValueType->Multiplier + 3)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 79; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 79: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ - if ( dinPhysicalValueType->Unit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 4, dinPhysicalValueType->Unit); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 80; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinPhysicalValueType->Value); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 80: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinPhysicalValueType->Value); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgBody":EVSEMaxCurrent{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2010:MsgBody":ReceiptRequired,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)', derivedBy='EXTENSION'. */ -static int encode_dinChargingStatusResType(bitstream_t* stream, struct dinChargingStatusResType* dinChargingStatusResType) { - int grammarID = 81; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 81: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinChargingStatusResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 82; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 82: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinChargingStatusResType->EVSEID.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinChargingStatusResType->EVSEID.bytes, dinChargingStatusResType->EVSEID.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 83; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 83: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinChargingStatusResType->SAScheduleTupleID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 84; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 84: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ - if ( dinChargingStatusResType->EVSEMaxCurrent_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinChargingStatusResType->EVSEMaxCurrent ); - } - grammarID = 85; - } else if ( dinChargingStatusResType->MeterInfo_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinMeterInfoType(stream, &dinChargingStatusResType->MeterInfo ); - } - grammarID = 86; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinChargingStatusResType->ReceiptRequired); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 73; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 85: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ - if ( dinChargingStatusResType->MeterInfo_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinMeterInfoType(stream, &dinChargingStatusResType->MeterInfo ); - } - grammarID = 86; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinChargingStatusResType->ReceiptRequired); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 73; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 86: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinChargingStatusResType->ReceiptRequired); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 73; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 73: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinAC_EVSEStatusType(stream, &dinChargingStatusResType->AC_EVSEStatus ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ -static int encode_dinDC_EVSEStatusType(bitstream_t* stream, struct dinDC_EVSEStatusType* dinDC_EVSEStatusType) { - int grammarID = 87; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 87: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ - if ( dinDC_EVSEStatusType->EVSEIsolationStatus_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 2, dinDC_EVSEStatusType->EVSEIsolationStatus); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 88; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVSEStatusType->EVSEStatusCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 18; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 88: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVSEStatusType->EVSEStatusCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 18; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 18: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NotificationMaxDelay)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger32(stream, dinDC_EVSEStatusType->NotificationMaxDelay); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 19; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 19: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSENotification)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 2, dinDC_EVSEStatusType->EVSENotification); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ProfileEntryType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower)', derivedBy='RESTRICTION'. */ -static int encode_dinProfileEntryType(bitstream_t* stream, struct dinProfileEntryType* dinProfileEntryType) { - int grammarID = 89; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 89: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger32(stream, dinProfileEntryType->ChargingProfileEntryStart); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 90; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 90: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinProfileEntryType->ChargingProfileEntryMaxPower); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEChargeParameterType', base type name='EVSEChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinCurrent)', derivedBy='EXTENSION'. */ -static int encode_dinAC_EVSEChargeParameterType(bitstream_t* stream, struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType) { - int grammarID = 91; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 91: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinAC_EVSEStatusType(stream, &dinAC_EVSEChargeParameterType->AC_EVSEStatus ); - } - grammarID = 92; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 92: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinAC_EVSEChargeParameterType->EVSEMaxVoltage ); - } - grammarID = 93; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 93: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinAC_EVSEChargeParameterType->EVSEMaxCurrent ); - } - grammarID = 94; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 94: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinAC_EVSEChargeParameterType->EVSEMinCurrent ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":PaymentOptions,"urn:iso:15118:2:2010:MsgBody":ChargeService,"urn:iso:15118:2:2010:MsgBody":ServiceList{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinServiceDiscoveryResType(bitstream_t* stream, struct dinServiceDiscoveryResType* dinServiceDiscoveryResType) { - int grammarID = 95; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 95: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinServiceDiscoveryResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 96; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 96: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPaymentOptionsType(stream, &dinServiceDiscoveryResType->PaymentOptions ); - } - grammarID = 97; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 97: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinServiceChargeType(stream, &dinServiceDiscoveryResType->ChargeService ); - } - grammarID = 98; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 98: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ - if ( dinServiceDiscoveryResType->ServiceList_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinServiceTagListType(stream, &dinServiceDiscoveryResType->ServiceList ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinSignatureType(bitstream_t* stream, struct dinSignatureType* dinSignatureType) { - int grammarID = 99; - int done = 0; - - unsigned int dinSignatureType_Object_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 99: - /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ - if ( dinSignatureType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinSignatureType->Id.characters, dinSignatureType->Id.charactersLen); - } - } - grammarID = 100; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinSignedInfoType(stream, &dinSignatureType->SignedInfo ); - } - grammarID = 101; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 100: - /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinSignedInfoType(stream, &dinSignatureType->SignedInfo ); - } - grammarID = 101; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 101: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinSignatureValueType(stream, &dinSignatureType->SignatureValue ); - } - grammarID = 102; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 102: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ - if ( dinSignatureType->KeyInfo_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinKeyInfoType(stream, &dinSignatureType->KeyInfo ); - } - grammarID = 103; - } else if (dinSignatureType_Object_currArrayIndex < dinSignatureType->Object.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinObjectType(stream, &dinSignatureType->Object.array [dinSignatureType_Object_currArrayIndex++]); - } - grammarID = 103; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 103: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ - if (dinSignatureType_Object_currArrayIndex < dinSignatureType->Object.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinObjectType(stream, &dinSignatureType->Object.array [dinSignatureType_Object_currArrayIndex++]); - } - grammarID = 103; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PaymentOptionsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PaymentOption{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinPaymentOptionsType(bitstream_t* stream, struct dinPaymentOptionsType* dinPaymentOptionsType) { - int grammarID = 104; - int done = 0; - - unsigned int dinPaymentOptionsType_PaymentOption_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 104: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ - if (dinPaymentOptionsType_PaymentOption_currArrayIndex < dinPaymentOptionsType->PaymentOption.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 1, dinPaymentOptionsType->PaymentOption.array[dinPaymentOptionsType_PaymentOption_currArrayIndex++]); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 105; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 105: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ - if (dinPaymentOptionsType_PaymentOption_currArrayIndex < dinPaymentOptionsType->PaymentOption.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 1, dinPaymentOptionsType->PaymentOption.array[dinPaymentOptionsType_PaymentOption_currArrayIndex++]); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 105; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":boolValue|"urn:iso:15118:2:2010:MsgDataTypes":byteValue|"urn:iso:15118:2:2010:MsgDataTypes":shortValue|"urn:iso:15118:2:2010:MsgDataTypes":intValue|"urn:iso:15118:2:2010:MsgDataTypes":physicalValue|"urn:iso:15118:2:2010:MsgDataTypes":stringValue)', derivedBy='RESTRICTION'. */ -static int encode_dinParameterType(bitstream_t* stream, struct dinParameterType* dinParameterType) { - int grammarID = 106; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 106: - /* FirstStartTag[ATTRIBUTE[STRING](Name)] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinParameterType->Name.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinParameterType->Name.characters, dinParameterType->Name.charactersLen); - } - } - grammarID = 107; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 107: - /* StartTag[ATTRIBUTE[ENUMERATION](ValueType)] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 3, dinParameterType->ValueType); - } - grammarID = 108; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 108: - /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ - if ( dinParameterType->boolValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinParameterType->boolValue); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if ( dinParameterType->byteValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - 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)(dinParameterType->byteValue + 128)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if ( dinParameterType->shortValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinParameterType->shortValue); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if ( dinParameterType->intValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger32(stream, dinParameterType->intValue); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if ( dinParameterType->physicalValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 4); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinParameterType->physicalValue ); - } - grammarID = 10; - } else if ( dinParameterType->stringValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 5); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinParameterType->stringValue.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinParameterType->stringValue.characters, dinParameterType->stringValue.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ -static int encode_dinSignaturePropertyType(bitstream_t* stream, struct dinSignaturePropertyType* dinSignaturePropertyType) { - int grammarID = 109; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 109: - /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ - if ( dinSignaturePropertyType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertyType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinSignaturePropertyType->Id.characters, dinSignaturePropertyType->Id.charactersLen); - } - } - grammarID = 110; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertyType->Target.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinSignaturePropertyType->Target.characters, dinSignaturePropertyType->Target.charactersLen); - } - } - grammarID = 111; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 110: - /* StartTag[ATTRIBUTE[STRING](Target)] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertyType->Target.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinSignaturePropertyType->Target.characters, dinSignaturePropertyType->Target.charactersLen); - } - } - grammarID = 111; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 111: - /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 112; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 14: - /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 112: - /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 112; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVPowerDeliveryParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -static int encode_dinEVPowerDeliveryParameterType(bitstream_t* stream, struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)', derivedBy='EXTENSION'. */ -static int encode_dinWeldingDetectionReqType(bitstream_t* stream, struct dinWeldingDetectionReqType* dinWeldingDetectionReqType) { - int grammarID = 48; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 48: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVStatusType(stream, &dinWeldingDetectionReqType->DC_EVStatus ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinTransformsType(bitstream_t* stream, struct dinTransformsType* dinTransformsType) { - int grammarID = 113; - int done = 0; - - unsigned int dinTransformsType_Transform_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 113: - /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ - if (dinTransformsType_Transform_currArrayIndex < dinTransformsType->Transform.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinTransformType(stream, &dinTransformsType->Transform.array [dinTransformsType_Transform_currArrayIndex++]); - } - grammarID = 114; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 114: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ - if (dinTransformsType_Transform_currArrayIndex < dinTransformsType->Transform.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinTransformType(stream, &dinTransformsType->Transform.array [dinTransformsType_Transform_currArrayIndex++]); - } - grammarID = 114; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService)', derivedBy='RESTRICTION'. */ -static int encode_dinServiceType(bitstream_t* stream, struct dinServiceType* dinServiceType) { - int grammarID = 115; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 115: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinServiceTagType(stream, &dinServiceType->ServiceTag ); - } - grammarID = 116; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 116: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinServiceType->FreeService); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; default: errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; break; @@ -3535,4501 +272,242 @@ static int encode_dinServiceType(bitstream_t* stream, struct dinServiceType* din /* Complex type name='urn:iso:15118:2:2010:MsgDef,BodyType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDef":BodyElement{0-1})', derivedBy='RESTRICTION'. */ static int encode_dinBodyType(bitstream_t* stream, struct dinBodyType* dinBodyType) { - int grammarID = 117; + int grammarID = 6; int done = 0; while(!done) { switch(grammarID) { - case 117: + case 6: /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}BodyElement), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CableCheckRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateInstallationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CertificateUpdateRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeParameterDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingStatusRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractAuthenticationRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}CurrentDemandRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeteringReceiptRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentDetailsRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PowerDeliveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PreChargeRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDetailRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceDiscoveryRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServicePaymentSelectionRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionSetupRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionStopRes), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionReq), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}WeldingDetectionRes), END_ELEMENT] */ if ( dinBodyType->BodyElement_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 0); if(errn == 0) { errn = encode_dinBodyBaseType(stream, &dinBodyType->BodyElement ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->CableCheckReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 1); if(errn == 0) { errn = encode_dinCableCheckReqType(stream, &dinBodyType->CableCheckReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->CableCheckRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 2); if(errn == 0) { errn = encode_dinCableCheckResType(stream, &dinBodyType->CableCheckRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->CertificateInstallationReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 3); if(errn == 0) { errn = encode_dinCertificateInstallationReqType(stream, &dinBodyType->CertificateInstallationReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->CertificateInstallationRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 4); if(errn == 0) { errn = encode_dinCertificateInstallationResType(stream, &dinBodyType->CertificateInstallationRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->CertificateUpdateReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 5); if(errn == 0) { errn = encode_dinCertificateUpdateReqType(stream, &dinBodyType->CertificateUpdateReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->CertificateUpdateRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 6); if(errn == 0) { errn = encode_dinCertificateUpdateResType(stream, &dinBodyType->CertificateUpdateRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ChargeParameterDiscoveryReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 7); if(errn == 0) { errn = encode_dinChargeParameterDiscoveryReqType(stream, &dinBodyType->ChargeParameterDiscoveryReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ChargeParameterDiscoveryRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 8); if(errn == 0) { errn = encode_dinChargeParameterDiscoveryResType(stream, &dinBodyType->ChargeParameterDiscoveryRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ChargingStatusReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 9); if(errn == 0) { errn = encode_dinChargingStatusReqType(stream, &dinBodyType->ChargingStatusReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ChargingStatusRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 10); if(errn == 0) { errn = encode_dinChargingStatusResType(stream, &dinBodyType->ChargingStatusRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ContractAuthenticationReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 11); if(errn == 0) { errn = encode_dinContractAuthenticationReqType(stream, &dinBodyType->ContractAuthenticationReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ContractAuthenticationRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 12); if(errn == 0) { errn = encode_dinContractAuthenticationResType(stream, &dinBodyType->ContractAuthenticationRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->CurrentDemandReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 13); if(errn == 0) { errn = encode_dinCurrentDemandReqType(stream, &dinBodyType->CurrentDemandReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->CurrentDemandRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 14); if(errn == 0) { errn = encode_dinCurrentDemandResType(stream, &dinBodyType->CurrentDemandRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->MeteringReceiptReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 15); if(errn == 0) { errn = encode_dinMeteringReceiptReqType(stream, &dinBodyType->MeteringReceiptReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->MeteringReceiptRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 16); if(errn == 0) { errn = encode_dinMeteringReceiptResType(stream, &dinBodyType->MeteringReceiptRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->PaymentDetailsReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 17); if(errn == 0) { errn = encode_dinPaymentDetailsReqType(stream, &dinBodyType->PaymentDetailsReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->PaymentDetailsRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 18); if(errn == 0) { errn = encode_dinPaymentDetailsResType(stream, &dinBodyType->PaymentDetailsRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->PowerDeliveryReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 19); if(errn == 0) { errn = encode_dinPowerDeliveryReqType(stream, &dinBodyType->PowerDeliveryReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->PowerDeliveryRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 20); if(errn == 0) { errn = encode_dinPowerDeliveryResType(stream, &dinBodyType->PowerDeliveryRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->PreChargeReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 21); if(errn == 0) { errn = encode_dinPreChargeReqType(stream, &dinBodyType->PreChargeReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->PreChargeRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 22); if(errn == 0) { errn = encode_dinPreChargeResType(stream, &dinBodyType->PreChargeRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ServiceDetailReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 23); if(errn == 0) { errn = encode_dinServiceDetailReqType(stream, &dinBodyType->ServiceDetailReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ServiceDetailRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 24); if(errn == 0) { errn = encode_dinServiceDetailResType(stream, &dinBodyType->ServiceDetailRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ServiceDiscoveryReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 25); if(errn == 0) { errn = encode_dinServiceDiscoveryReqType(stream, &dinBodyType->ServiceDiscoveryReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ServiceDiscoveryRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 26); if(errn == 0) { errn = encode_dinServiceDiscoveryResType(stream, &dinBodyType->ServiceDiscoveryRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ServicePaymentSelectionReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 27); if(errn == 0) { errn = encode_dinServicePaymentSelectionReqType(stream, &dinBodyType->ServicePaymentSelectionReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->ServicePaymentSelectionRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 28); if(errn == 0) { errn = encode_dinServicePaymentSelectionResType(stream, &dinBodyType->ServicePaymentSelectionRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->SessionSetupReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 29); if(errn == 0) { errn = encode_dinSessionSetupReqType(stream, &dinBodyType->SessionSetupReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->SessionSetupRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 30); if(errn == 0) { errn = encode_dinSessionSetupResType(stream, &dinBodyType->SessionSetupRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->SessionStopReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 31); if(errn == 0) { errn = encode_dinSessionStopType(stream, &dinBodyType->SessionStopReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->SessionStopRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 32); if(errn == 0) { errn = encode_dinSessionStopResType(stream, &dinBodyType->SessionStopRes ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->WeldingDetectionReq_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 33); if(errn == 0) { errn = encode_dinWeldingDetectionReqType(stream, &dinBodyType->WeldingDetectionReq ); } - grammarID = 10; + grammarID = 4; } else if ( dinBodyType->WeldingDetectionRes_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 6, 34); if(errn == 0) { errn = encode_dinWeldingDetectionResType(stream, &dinBodyType->WeldingDetectionRes ); } - grammarID = 10; + grammarID = 4; } else if (1==1) { errn = encodeNBitUnsignedInteger(stream, 6, 35); if(errn == 0) { done = 1; } - grammarID = 11; + grammarID = 5; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 10: + case 4: /* Element[END_ELEMENT] */ if (1==1) { errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { done = 1; } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ -static int encode_dinDC_EVStatusType(bitstream_t* stream, struct dinDC_EVStatusType* dinDC_EVStatusType) { - int grammarID = 118; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 118: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinDC_EVStatusType->EVReady); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 119; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 119: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ - if ( dinDC_EVStatusType->EVCabinConditioning_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinDC_EVStatusType->EVCabinConditioning); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 120; - } else if ( dinDC_EVStatusType->EVRESSConditioning_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinDC_EVStatusType->EVRESSConditioning); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 121; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVStatusType->EVErrorCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 122; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 120: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ - if ( dinDC_EVStatusType->EVRESSConditioning_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinDC_EVStatusType->EVRESSConditioning); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 121; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVStatusType->EVErrorCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 122; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 121: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVStatusType->EVErrorCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 122; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 122: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVStatusType->EVRESSSOC - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":PMax))', derivedBy='EXTENSION'. */ -static int encode_dinPMaxScheduleEntryType(bitstream_t* stream, struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType) { - int grammarID = 123; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 123: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ - if ( dinPMaxScheduleEntryType->RelativeTimeInterval_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinRelativeTimeIntervalType(stream, &dinPMaxScheduleEntryType->RelativeTimeInterval ); - } - grammarID = 124; - } else if ( dinPMaxScheduleEntryType->TimeInterval_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinIntervalType(stream, &dinPMaxScheduleEntryType->TimeInterval ); - } - grammarID = 124; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 124: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinPMaxScheduleEntryType->PMax); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinPMaxScheduleType(bitstream_t* stream, struct dinPMaxScheduleType* dinPMaxScheduleType) { - int grammarID = 125; - int done = 0; - - unsigned int dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 125: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinPMaxScheduleType->PMaxScheduleID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 126; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 126: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry)] */ - if (dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex < dinPMaxScheduleType->PMaxScheduleEntry.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPMaxScheduleEntryType(stream, &dinPMaxScheduleType->PMaxScheduleEntry.array [dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex++]); - } - grammarID = 127; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 127: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), END_ELEMENT] */ - if (dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex < dinPMaxScheduleType->PMaxScheduleEntry.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPMaxScheduleEntryType(stream, &dinPMaxScheduleType->PMaxScheduleEntry.array [dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex++]); - } - grammarID = 127; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID{0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinSelectedServiceType(bitstream_t* stream, struct dinSelectedServiceType* dinSelectedServiceType) { - int grammarID = 128; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 128: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, dinSelectedServiceType->ServiceID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 129; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 129: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID), END_ELEMENT] */ - if ( dinSelectedServiceType->ParameterSetID_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinSelectedServiceType->ParameterSetID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -static int encode_dinIntervalType(bitstream_t* stream, struct dinIntervalType* dinIntervalType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":OEMProvisioningCert,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)', derivedBy='EXTENSION'. */ -static int encode_dinCertificateInstallationReqType(bitstream_t* stream, struct dinCertificateInstallationReqType* dinCertificateInstallationReqType) { - int grammarID = 130; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 130: - /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ - if ( dinCertificateInstallationReqType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationReqType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinCertificateInstallationReqType->Id.characters, dinCertificateInstallationReqType->Id.charactersLen); - } - } - grammarID = 131; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationReqType->OEMProvisioningCert.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinCertificateInstallationReqType->OEMProvisioningCert.bytes, dinCertificateInstallationReqType->OEMProvisioningCert.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 132; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 131: - /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationReqType->OEMProvisioningCert.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinCertificateInstallationReqType->OEMProvisioningCert.bytes, dinCertificateInstallationReqType->OEMProvisioningCert.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 132; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 132: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinListOfRootCertificateIDsType(stream, &dinCertificateInstallationReqType->ListOfRootCertificateIDs ); - } - grammarID = 133; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 133: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationReqType->DHParams.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinCertificateInstallationReqType->DHParams.bytes, dinCertificateInstallationReqType->DHParams.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ -static int encode_dinTransformType(bitstream_t* stream, struct dinTransformType* dinTransformType) { - int grammarID = 134; - int done = 0; - - unsigned int dinTransformType_XPath_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 134: - /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinTransformType->Algorithm.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinTransformType->Algorithm.characters, dinTransformType->Algorithm.charactersLen); - } - } - grammarID = 135; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 135: - /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (dinTransformType_XPath_currArrayIndex < dinTransformType->XPath.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].characters, dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].charactersLen); - dinTransformType_XPath_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 136; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 136; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 136; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 136: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (dinTransformType_XPath_currArrayIndex < dinTransformType->XPath.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].characters, dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].charactersLen); - dinTransformType_XPath_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 136; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 136; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 136; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))', derivedBy='RESTRICTION'. */ -static int encode_dinKeyValueType(bitstream_t* stream, struct dinKeyValueType* dinKeyValueType) { - int grammarID = 137; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 137: - /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ - if ( dinKeyValueType->DSAKeyValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinDSAKeyValueType(stream, &dinKeyValueType->DSAKeyValue ); - } - grammarID = 138; - } else if ( dinKeyValueType->RSAKeyValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - errn = encode_dinRSAKeyValueType(stream, &dinKeyValueType->RSAKeyValue ); - } - grammarID = 138; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 138; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 139; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 138: - /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 138; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 139: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ - if ( dinKeyValueType->DSAKeyValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinDSAKeyValueType(stream, &dinKeyValueType->DSAKeyValue ); - } - grammarID = 138; - } else if ( dinKeyValueType->RSAKeyValue_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - errn = encode_dinRSAKeyValueType(stream, &dinKeyValueType->RSAKeyValue ); - } - grammarID = 138; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 138; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 139; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinRetrievalMethodType(bitstream_t* stream, struct dinRetrievalMethodType* dinRetrievalMethodType) { - int grammarID = 140; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 140: - /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ - if ( dinRetrievalMethodType->Type_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRetrievalMethodType->Type.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinRetrievalMethodType->Type.characters, dinRetrievalMethodType->Type.charactersLen); - } - } - grammarID = 141; - } else if ( dinRetrievalMethodType->URI_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRetrievalMethodType->URI.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinRetrievalMethodType->URI.characters, dinRetrievalMethodType->URI.charactersLen); - } - } - grammarID = 142; - } else if ( dinRetrievalMethodType->Transforms_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - errn = encode_dinTransformsType(stream, &dinRetrievalMethodType->Transforms ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 141: - /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ - if ( dinRetrievalMethodType->URI_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRetrievalMethodType->URI.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinRetrievalMethodType->URI.characters, dinRetrievalMethodType->URI.charactersLen); - } - } - grammarID = 142; - } else if ( dinRetrievalMethodType->Transforms_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinTransformsType(stream, &dinRetrievalMethodType->Transforms ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 142: - /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ - if ( dinRetrievalMethodType->Transforms_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinTransformsType(stream, &dinRetrievalMethodType->Transforms ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -static int encode_dinEVChargeParameterType(bitstream_t* stream, struct dinEVChargeParameterType* dinEVChargeParameterType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceChargeType', base type name='ServiceType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService),("urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType))', derivedBy='EXTENSION'. */ -static int encode_dinServiceChargeType(bitstream_t* stream, struct dinServiceChargeType* dinServiceChargeType) { - int grammarID = 143; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 143: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinServiceTagType(stream, &dinServiceChargeType->ServiceTag ); - } - grammarID = 144; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 144: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinServiceChargeType->FreeService); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 145; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 145: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 4, dinServiceChargeType->EnergyTransferType); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterSetType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2010:MsgDataTypes":Parameter{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinParameterSetType(bitstream_t* stream, struct dinParameterSetType* dinParameterSetType) { - int grammarID = 146; - int done = 0; - - unsigned int dinParameterSetType_Parameter_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 146: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinParameterSetType->ParameterSetID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 147; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 147: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter)] */ - if (dinParameterSetType_Parameter_currArrayIndex < dinParameterSetType->Parameter.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinParameterType(stream, &dinParameterSetType->Parameter.array [dinParameterSetType_Parameter_currArrayIndex++]); - } - grammarID = 148; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 148: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter), END_ELEMENT] */ - if (dinParameterSetType_Parameter_currArrayIndex < dinParameterSetType->Parameter.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinParameterType(stream, &dinParameterSetType->Parameter.array [dinParameterSetType_Parameter_currArrayIndex++]); - } - grammarID = 148; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)', derivedBy='RESTRICTION'. */ -static int encode_dinReferenceType(bitstream_t* stream, struct dinReferenceType* dinReferenceType) { - int grammarID = 149; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 149: - /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ - if ( dinReferenceType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinReferenceType->Id.characters, dinReferenceType->Id.charactersLen); - } - } - grammarID = 150; - } else if ( dinReferenceType->Type_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->Type.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinReferenceType->Type.characters, dinReferenceType->Type.charactersLen); - } - } - grammarID = 151; - } else if ( dinReferenceType->URI_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->URI.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinReferenceType->URI.characters, dinReferenceType->URI.charactersLen); - } - } - grammarID = 152; - } else if ( dinReferenceType->Transforms_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - errn = encode_dinTransformsType(stream, &dinReferenceType->Transforms ); - } - grammarID = 153; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 3, 4); - if(errn == 0) { - errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); - } - grammarID = 154; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 150: - /* StartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ - if ( dinReferenceType->Type_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->Type.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinReferenceType->Type.characters, dinReferenceType->Type.charactersLen); - } - } - grammarID = 151; - } else if ( dinReferenceType->URI_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->URI.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinReferenceType->URI.characters, dinReferenceType->URI.charactersLen); - } - } - grammarID = 152; - } else if ( dinReferenceType->Transforms_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - errn = encode_dinTransformsType(stream, &dinReferenceType->Transforms ); - } - grammarID = 153; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); - } - grammarID = 154; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 151: - /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ - if ( dinReferenceType->URI_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->URI.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinReferenceType->URI.characters, dinReferenceType->URI.charactersLen); - } - } - grammarID = 152; - } else if ( dinReferenceType->Transforms_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinTransformsType(stream, &dinReferenceType->Transforms ); - } - grammarID = 153; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); - } - grammarID = 154; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 152: - /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ - if ( dinReferenceType->Transforms_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinTransformsType(stream, &dinReferenceType->Transforms ); - } - grammarID = 153; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); - } - grammarID = 154; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 153: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); - } - grammarID = 154; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 154: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->DigestValue.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinReferenceType->DigestValue.bytes, dinReferenceType->DigestValue.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)', derivedBy='EXTENSION'. */ -static int encode_dinSessionStopResType(bitstream_t* stream, struct dinSessionStopResType* dinSessionStopResType) { - int grammarID = 55; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 55: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinSessionStopResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##any])){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ -static int encode_dinObjectType(bitstream_t* stream, struct dinObjectType* dinObjectType) { - int grammarID = 155; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 155: - /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if ( dinObjectType->Encoding_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->Encoding.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinObjectType->Encoding.characters, dinObjectType->Encoding.charactersLen); - } - } - grammarID = 156; - } else if ( dinObjectType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinObjectType->Id.characters, dinObjectType->Id.charactersLen); - } - } - grammarID = 157; - } else if ( dinObjectType->MimeType_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->MimeType.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinObjectType->MimeType.characters, dinObjectType->MimeType.charactersLen); - } - } - grammarID = 13; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 4); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 156: - /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if ( dinObjectType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinObjectType->Id.characters, dinObjectType->Id.charactersLen); - } - } - grammarID = 157; - } else if ( dinObjectType->MimeType_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->MimeType.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinObjectType->MimeType.characters, dinObjectType->MimeType.charactersLen); - } - } - grammarID = 13; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 157: - /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if ( dinObjectType->MimeType_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->MimeType.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinObjectType->MimeType.characters, dinObjectType->MimeType.charactersLen); - } - } - grammarID = 13; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 13: - /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 14: - /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType', base type name='base64Binary', content type='SIMPLE', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ -static int encode_dinSignatureValueType(bitstream_t* stream, struct dinSignatureValueType* dinSignatureValueType) { - int grammarID = 158; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 158: - /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ - if ( dinSignatureValueType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureValueType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinSignatureValueType->Id.characters, dinSignatureValueType->Id.charactersLen); - } - } - grammarID = 159; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureValueType->CONTENT.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinSignatureValueType->CONTENT.bytes, dinSignatureValueType->CONTENT.bytesLen); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 159: - /* StartTag[CHARACTERS[BINARY_BASE64]] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureValueType->CONTENT.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinSignatureValueType->CONTENT.bytes, dinSignatureValueType->CONTENT.bytesLen); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SelectedService{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinSelectedServiceListType(bitstream_t* stream, struct dinSelectedServiceListType* dinSelectedServiceListType) { - int grammarID = 160; - int done = 0; - - unsigned int dinSelectedServiceListType_SelectedService_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 160: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ - if (dinSelectedServiceListType_SelectedService_currArrayIndex < dinSelectedServiceListType->SelectedService.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinSelectedServiceType(stream, &dinSelectedServiceListType->SelectedService.array [dinSelectedServiceListType_SelectedService_currArrayIndex++]); - } - grammarID = 161; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 161: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService), END_ELEMENT] */ - if (dinSelectedServiceListType_SelectedService_currArrayIndex < dinSelectedServiceListType->SelectedService.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinSelectedServiceType(stream, &dinSelectedServiceListType->SelectedService.array [dinSelectedServiceListType_SelectedService_currArrayIndex++]); - } - grammarID = 161; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":EPriceLevel,"urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost{0-UNBOUNDED}))', derivedBy='EXTENSION'. */ -static int encode_dinSalesTariffEntryType(bitstream_t* stream, struct dinSalesTariffEntryType* dinSalesTariffEntryType) { - int grammarID = 162; - int done = 0; - - unsigned int dinSalesTariffEntryType_ConsumptionCost_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 162: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ - if ( dinSalesTariffEntryType->RelativeTimeInterval_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinRelativeTimeIntervalType(stream, &dinSalesTariffEntryType->RelativeTimeInterval ); - } - grammarID = 163; - } else if ( dinSalesTariffEntryType->TimeInterval_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinIntervalType(stream, &dinSalesTariffEntryType->TimeInterval ); - } - grammarID = 163; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 163: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(dinSalesTariffEntryType->EPriceLevel - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 164; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 164: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost), END_ELEMENT] */ - if (dinSalesTariffEntryType_ConsumptionCost_currArrayIndex < dinSalesTariffEntryType->ConsumptionCost.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinConsumptionCostType(stream, &dinSalesTariffEntryType->ConsumptionCost.array [dinSalesTariffEntryType_ConsumptionCost_currArrayIndex++]); - } - grammarID = 164; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ConsumptionCostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":startValue,"urn:iso:15118:2:2010:MsgDataTypes":Cost{0-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinConsumptionCostType(bitstream_t* stream, struct dinConsumptionCostType* dinConsumptionCostType) { - int grammarID = 165; - int done = 0; - - unsigned int dinConsumptionCostType_Cost_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 165: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger32(stream, dinConsumptionCostType->startValue); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 166; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 166: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost), END_ELEMENT] */ - if (dinConsumptionCostType_Cost_currArrayIndex < dinConsumptionCostType->Cost.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinCostType(stream, &dinConsumptionCostType->Cost.array [dinConsumptionCostType_Cost_currArrayIndex++]); - } - grammarID = 166; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)', derivedBy='RESTRICTION'. */ -static int encode_dinRSAKeyValueType(bitstream_t* stream, struct dinRSAKeyValueType* dinRSAKeyValueType) { - int grammarID = 167; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 167: - /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRSAKeyValueType->Modulus.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinRSAKeyValueType->Modulus.bytes, dinRSAKeyValueType->Modulus.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 168; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 168: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRSAKeyValueType->Exponent.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinRSAKeyValueType->Exponent.bytes, dinRSAKeyValueType->Exponent.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":SessionID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo)', derivedBy='EXTENSION'. */ -static int encode_dinMeteringReceiptReqType(bitstream_t* stream, struct dinMeteringReceiptReqType* dinMeteringReceiptReqType) { - int grammarID = 169; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 169: - /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ - if ( dinMeteringReceiptReqType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeteringReceiptReqType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinMeteringReceiptReqType->Id.characters, dinMeteringReceiptReqType->Id.charactersLen); - } - } - grammarID = 170; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeteringReceiptReqType->SessionID.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinMeteringReceiptReqType->SessionID.bytes, dinMeteringReceiptReqType->SessionID.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 171; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 170: - /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SessionID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeteringReceiptReqType->SessionID.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinMeteringReceiptReqType->SessionID.bytes, dinMeteringReceiptReqType->SessionID.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 171; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 171: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ - if ( dinMeteringReceiptReqType->SAScheduleTupleID_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinMeteringReceiptReqType->SAScheduleTupleID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 172; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinMeterInfoType(stream, &dinMeteringReceiptReqType->MeterInfo ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 172: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinMeterInfoType(stream, &dinMeteringReceiptReqType->MeterInfo ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SAScheduleTupleType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxSchedule,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariff{0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinSAScheduleTupleType(bitstream_t* stream, struct dinSAScheduleTupleType* dinSAScheduleTupleType) { - int grammarID = 173; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 173: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinSAScheduleTupleType->SAScheduleTupleID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 174; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 174: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPMaxScheduleType(stream, &dinSAScheduleTupleType->PMaxSchedule ); - } - grammarID = 175; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 175: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariff), END_ELEMENT] */ - if ( dinSAScheduleTupleType->SalesTariff_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinSalesTariffType(stream, &dinSAScheduleTupleType->SalesTariff ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType', base type name='IntervalType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinRelativeTimeIntervalType(bitstream_t* stream, struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType) { - int grammarID = 176; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 176: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger32(stream, dinRelativeTimeIntervalType->start); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 177; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 177: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}duration), END_ELEMENT] */ - if ( dinRelativeTimeIntervalType->duration_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger32(stream, dinRelativeTimeIntervalType->duration); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ChargingProfileType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinChargingProfileType(bitstream_t* stream, struct dinChargingProfileType* dinChargingProfileType) { - int grammarID = 178; - int done = 0; - - unsigned int dinChargingProfileType_ProfileEntry_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 178: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinChargingProfileType->SAScheduleTupleID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 179; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 179: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ - if (dinChargingProfileType_ProfileEntry_currArrayIndex < dinChargingProfileType->ProfileEntry.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinProfileEntryType(stream, &dinChargingProfileType->ProfileEntry.array [dinChargingProfileType_ProfileEntry_currArrayIndex++]); - } - grammarID = 180; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 180: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ - if (dinChargingProfileType_ProfileEntry_currArrayIndex < dinChargingProfileType->ProfileEntry.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinProfileEntryType(stream, &dinChargingProfileType->ProfileEntry.array [dinChargingProfileType_ProfileEntry_currArrayIndex++]); - } - grammarID = 180; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2010:MsgBody":EVMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgBody":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgBody":ChargingComplete,"urn:iso:15118:2:2010:MsgBody":RemainingTimeToFullSoC{0-1},"urn:iso:15118:2:2010:MsgBody":RemainingTimeToBulkSoC{0-1},"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage)', derivedBy='EXTENSION'. */ -static int encode_dinCurrentDemandReqType(bitstream_t* stream, struct dinCurrentDemandReqType* dinCurrentDemandReqType) { - int grammarID = 181; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 181: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVStatusType(stream, &dinCurrentDemandReqType->DC_EVStatus ); - } - grammarID = 182; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 182: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVTargetCurrent ); - } - grammarID = 183; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 183: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ - if ( dinCurrentDemandReqType->EVMaximumVoltageLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumVoltageLimit ); - } - grammarID = 184; - } else if ( dinCurrentDemandReqType->EVMaximumCurrentLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumCurrentLimit ); - } - grammarID = 185; - } else if ( dinCurrentDemandReqType->EVMaximumPowerLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumPowerLimit ); - } - grammarID = 186; - } else if ( dinCurrentDemandReqType->BulkChargingComplete_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandReqType->BulkChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 187; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 3, 4); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 188; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 184: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ - if ( dinCurrentDemandReqType->EVMaximumCurrentLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumCurrentLimit ); - } - grammarID = 185; - } else if ( dinCurrentDemandReqType->EVMaximumPowerLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumPowerLimit ); - } - grammarID = 186; - } else if ( dinCurrentDemandReqType->BulkChargingComplete_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandReqType->BulkChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 187; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 188; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 185: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ - if ( dinCurrentDemandReqType->EVMaximumPowerLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumPowerLimit ); - } - grammarID = 186; - } else if ( dinCurrentDemandReqType->BulkChargingComplete_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandReqType->BulkChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 187; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 188; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 186: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ - if ( dinCurrentDemandReqType->BulkChargingComplete_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandReqType->BulkChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 187; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 188; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 187: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 188; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 188: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToFullSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ - if ( dinCurrentDemandReqType->RemainingTimeToFullSoC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->RemainingTimeToFullSoC ); - } - grammarID = 189; - } else if ( dinCurrentDemandReqType->RemainingTimeToBulkSoC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->RemainingTimeToBulkSoC ); - } - grammarID = 190; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVTargetVoltage ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 189: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ - if ( dinCurrentDemandReqType->RemainingTimeToBulkSoC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->RemainingTimeToBulkSoC ); - } - grammarID = 190; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVTargetVoltage ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 190: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVTargetVoltage ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ -static int encode_dinKeyInfoType(bitstream_t* stream, struct dinKeyInfoType* dinKeyInfoType) { - int grammarID = 191; - int done = 0; - - unsigned int dinKeyInfoType_KeyName_currArrayIndex = 0; - unsigned int dinKeyInfoType_KeyValue_currArrayIndex = 0; - unsigned int dinKeyInfoType_RetrievalMethod_currArrayIndex = 0; - unsigned int dinKeyInfoType_X509Data_currArrayIndex = 0; - unsigned int dinKeyInfoType_PGPData_currArrayIndex = 0; - unsigned int dinKeyInfoType_SPKIData_currArrayIndex = 0; - unsigned int dinKeyInfoType_MgmtData_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 191: - /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ - if ( dinKeyInfoType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 4, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinKeyInfoType->Id.characters, dinKeyInfoType->Id.charactersLen); - } - } - grammarID = 192; - } else if (dinKeyInfoType_KeyName_currArrayIndex < dinKeyInfoType->KeyName.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 1); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].characters, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen); - dinKeyInfoType_KeyName_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 193; - } else if (dinKeyInfoType_KeyValue_currArrayIndex < dinKeyInfoType->KeyValue.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 2); - if(errn == 0) { - errn = encode_dinKeyValueType(stream, &dinKeyInfoType->KeyValue.array [dinKeyInfoType_KeyValue_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_RetrievalMethod_currArrayIndex < dinKeyInfoType->RetrievalMethod.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 3); - if(errn == 0) { - errn = encode_dinRetrievalMethodType(stream, &dinKeyInfoType->RetrievalMethod.array [dinKeyInfoType_RetrievalMethod_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_X509Data_currArrayIndex < dinKeyInfoType->X509Data.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 4); - if(errn == 0) { - errn = encode_dinX509DataType(stream, &dinKeyInfoType->X509Data.array [dinKeyInfoType_X509Data_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_PGPData_currArrayIndex < dinKeyInfoType->PGPData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 5); - if(errn == 0) { - errn = encode_dinPGPDataType(stream, &dinKeyInfoType->PGPData.array [dinKeyInfoType_PGPData_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_SPKIData_currArrayIndex < dinKeyInfoType->SPKIData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 6); - if(errn == 0) { - errn = encode_dinSPKIDataType(stream, &dinKeyInfoType->SPKIData.array [dinKeyInfoType_SPKIData_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_MgmtData_currArrayIndex < dinKeyInfoType->MgmtData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 7); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].characters, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen); - dinKeyInfoType_MgmtData_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 193; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 193; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 194; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 192: - /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ - if (dinKeyInfoType_KeyName_currArrayIndex < dinKeyInfoType->KeyName.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].characters, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen); - dinKeyInfoType_KeyName_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 193; - } else if (dinKeyInfoType_KeyValue_currArrayIndex < dinKeyInfoType->KeyValue.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 1); - if(errn == 0) { - errn = encode_dinKeyValueType(stream, &dinKeyInfoType->KeyValue.array [dinKeyInfoType_KeyValue_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_RetrievalMethod_currArrayIndex < dinKeyInfoType->RetrievalMethod.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 2); - if(errn == 0) { - errn = encode_dinRetrievalMethodType(stream, &dinKeyInfoType->RetrievalMethod.array [dinKeyInfoType_RetrievalMethod_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_X509Data_currArrayIndex < dinKeyInfoType->X509Data.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 3); - if(errn == 0) { - errn = encode_dinX509DataType(stream, &dinKeyInfoType->X509Data.array [dinKeyInfoType_X509Data_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_PGPData_currArrayIndex < dinKeyInfoType->PGPData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 4); - if(errn == 0) { - errn = encode_dinPGPDataType(stream, &dinKeyInfoType->PGPData.array [dinKeyInfoType_PGPData_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_SPKIData_currArrayIndex < dinKeyInfoType->SPKIData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 5); - if(errn == 0) { - errn = encode_dinSPKIDataType(stream, &dinKeyInfoType->SPKIData.array [dinKeyInfoType_SPKIData_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_MgmtData_currArrayIndex < dinKeyInfoType->MgmtData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 6); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].characters, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen); - dinKeyInfoType_MgmtData_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 193; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 193; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 194; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 193: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ - if (dinKeyInfoType_KeyName_currArrayIndex < dinKeyInfoType->KeyName.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].characters, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen); - dinKeyInfoType_KeyName_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 193; - } else if (dinKeyInfoType_KeyValue_currArrayIndex < dinKeyInfoType->KeyValue.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 1); - if(errn == 0) { - errn = encode_dinKeyValueType(stream, &dinKeyInfoType->KeyValue.array [dinKeyInfoType_KeyValue_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_RetrievalMethod_currArrayIndex < dinKeyInfoType->RetrievalMethod.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 2); - if(errn == 0) { - errn = encode_dinRetrievalMethodType(stream, &dinKeyInfoType->RetrievalMethod.array [dinKeyInfoType_RetrievalMethod_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_X509Data_currArrayIndex < dinKeyInfoType->X509Data.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 3); - if(errn == 0) { - errn = encode_dinX509DataType(stream, &dinKeyInfoType->X509Data.array [dinKeyInfoType_X509Data_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_PGPData_currArrayIndex < dinKeyInfoType->PGPData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 4); - if(errn == 0) { - errn = encode_dinPGPDataType(stream, &dinKeyInfoType->PGPData.array [dinKeyInfoType_PGPData_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_SPKIData_currArrayIndex < dinKeyInfoType->SPKIData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 5); - if(errn == 0) { - errn = encode_dinSPKIDataType(stream, &dinKeyInfoType->SPKIData.array [dinKeyInfoType_SPKIData_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_MgmtData_currArrayIndex < dinKeyInfoType->MgmtData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 6); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].characters, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen); - dinKeyInfoType_MgmtData_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 193; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 193; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 4, 8); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 193; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 194: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ - if (dinKeyInfoType_KeyName_currArrayIndex < dinKeyInfoType->KeyName.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].characters, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen); - dinKeyInfoType_KeyName_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 193; - } else if (dinKeyInfoType_KeyValue_currArrayIndex < dinKeyInfoType->KeyValue.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 1); - if(errn == 0) { - errn = encode_dinKeyValueType(stream, &dinKeyInfoType->KeyValue.array [dinKeyInfoType_KeyValue_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_RetrievalMethod_currArrayIndex < dinKeyInfoType->RetrievalMethod.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 2); - if(errn == 0) { - errn = encode_dinRetrievalMethodType(stream, &dinKeyInfoType->RetrievalMethod.array [dinKeyInfoType_RetrievalMethod_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_X509Data_currArrayIndex < dinKeyInfoType->X509Data.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 3); - if(errn == 0) { - errn = encode_dinX509DataType(stream, &dinKeyInfoType->X509Data.array [dinKeyInfoType_X509Data_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_PGPData_currArrayIndex < dinKeyInfoType->PGPData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 4); - if(errn == 0) { - errn = encode_dinPGPDataType(stream, &dinKeyInfoType->PGPData.array [dinKeyInfoType_PGPData_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_SPKIData_currArrayIndex < dinKeyInfoType->SPKIData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 5); - if(errn == 0) { - errn = encode_dinSPKIDataType(stream, &dinKeyInfoType->SPKIData.array [dinKeyInfoType_SPKIData_currArrayIndex++]); - } - grammarID = 193; - } else if (dinKeyInfoType_MgmtData_currArrayIndex < dinKeyInfoType->MgmtData.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 4, 6); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].characters, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen); - dinKeyInfoType_MgmtData_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 193; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 193; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 194; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2010:MsgBody":SelectedServiceList)', derivedBy='EXTENSION'. */ -static int encode_dinServicePaymentSelectionReqType(bitstream_t* stream, struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType) { - int grammarID = 195; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 195: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 1, dinServicePaymentSelectionReqType->SelectedPaymentOption); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 196; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 196: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedServiceList)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinSelectedServiceListType(stream, &dinServicePaymentSelectionReqType->SelectedServiceList ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)', derivedBy='EXTENSION'. */ -static int encode_dinContractAuthenticationResType(bitstream_t* stream, struct dinContractAuthenticationResType* dinContractAuthenticationResType) { - int grammarID = 197; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 197: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinContractAuthenticationResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 31; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 31: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEProcessing)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 1, dinContractAuthenticationResType->EVSEProcessing); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusReqType', base type name='BodyBaseType', content type='EMPTY', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ -static int encode_dinChargingStatusReqType(bitstream_t* stream, struct dinChargingStatusReqType* dinChargingStatusReqType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":GenChallenge,"urn:iso:15118:2:2010:MsgBody":DateTimeNow)', derivedBy='EXTENSION'. */ -static int encode_dinPaymentDetailsResType(bitstream_t* stream, struct dinPaymentDetailsResType* dinPaymentDetailsResType) { - int grammarID = 198; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 198: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinPaymentDetailsResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 199; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 199: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - 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)(dinPaymentDetailsResType->GenChallenge.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinPaymentDetailsResType->GenChallenge.characters, dinPaymentDetailsResType->GenChallenge.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 200; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 200: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger64(stream, dinPaymentDetailsResType->DateTimeNow); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SASchedulesType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -static int encode_dinSASchedulesType(bitstream_t* stream, struct dinSASchedulesType* dinSASchedulesType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain)', derivedBy='EXTENSION'. */ -static int encode_dinPaymentDetailsReqType(bitstream_t* stream, struct dinPaymentDetailsReqType* dinPaymentDetailsReqType) { - int grammarID = 201; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 201: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - 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)(dinPaymentDetailsReqType->ContractID.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinPaymentDetailsReqType->ContractID.characters, dinPaymentDetailsReqType->ContractID.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 202; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 202: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinCertificateChainType(stream, &dinPaymentDetailsReqType->ContractSignatureCertChain ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinServiceTagType(bitstream_t* stream, struct dinServiceTagType* dinServiceTagType) { - int grammarID = 203; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 203: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, dinServiceTagType->ServiceID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 204; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 204: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory)] */ - if ( dinServiceTagType->ServiceName_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - 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)(dinServiceTagType->ServiceName.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinServiceTagType->ServiceName.characters, dinServiceTagType->ServiceName.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 205; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 2, dinServiceTagType->ServiceCategory); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 206; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 205: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 2, dinServiceTagType->ServiceCategory); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 206; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 206: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ - if ( dinServiceTagType->ServiceScope_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - 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)(dinServiceTagType->ServiceScope.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinServiceTagType->ServiceScope.characters, dinServiceTagType->ServiceScope.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":EVRequestedEnergyTransferType,"urn:iso:15118:2:2010:MsgDataTypes":EVChargeParameter)', derivedBy='EXTENSION'. */ -static int encode_dinChargeParameterDiscoveryReqType(bitstream_t* stream, struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType) { - int grammarID = 207; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 207: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 3, dinChargeParameterDiscoveryReqType->EVRequestedEnergyTransferType); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 208; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 208: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter)] */ - if ( dinChargeParameterDiscoveryReqType->AC_EVChargeParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinAC_EVChargeParameterType(stream, &dinChargeParameterDiscoveryReqType->AC_EVChargeParameter ); - } - grammarID = 10; - } else if ( dinChargeParameterDiscoveryReqType->DC_EVChargeParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinDC_EVChargeParameterType(stream, &dinChargeParameterDiscoveryReqType->DC_EVChargeParameter ); - } - grammarID = 10; - } else if ( dinChargeParameterDiscoveryReqType->EVChargeParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - errn = encode_dinEVChargeParameterType(stream, &dinChargeParameterDiscoveryReqType->EVChargeParameter ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceParameterListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSet{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinServiceParameterListType(bitstream_t* stream, struct dinServiceParameterListType* dinServiceParameterListType) { - int grammarID = 209; - int done = 0; - - unsigned int dinServiceParameterListType_ParameterSet_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 209: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ - if (dinServiceParameterListType_ParameterSet_currArrayIndex < dinServiceParameterListType->ParameterSet.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinParameterSetType(stream, &dinServiceParameterListType->ParameterSet.array [dinServiceParameterListType_ParameterSet_currArrayIndex++]); - } - grammarID = 210; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 210: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet), END_ELEMENT] */ - if (dinServiceParameterListType_ParameterSet_currArrayIndex < dinServiceParameterListType->ParameterSet.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinParameterSetType(stream, &dinServiceParameterListType->ParameterSet.array [dinServiceParameterListType_ParameterSet_currArrayIndex++]); - } - grammarID = 210; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEStatusType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -static int encode_dinEVSEStatusType(bitstream_t* stream, struct dinEVSEStatusType* dinEVSEStatusType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ServiceScope{0-1},"urn:iso:15118:2:2010:MsgBody":ServiceCategory{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinServiceDiscoveryReqType(bitstream_t* stream, struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType) { - int grammarID = 211; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 211: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ - if ( dinServiceDiscoveryReqType->ServiceScope_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - 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)(dinServiceDiscoveryReqType->ServiceScope.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinServiceDiscoveryReqType->ServiceScope.characters, dinServiceDiscoveryReqType->ServiceScope.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 212; - } else if ( dinServiceDiscoveryReqType->ServiceCategory_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 2, dinServiceDiscoveryReqType->ServiceCategory); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 212: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ - if ( dinServiceDiscoveryReqType->ServiceCategory_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 2, dinServiceDiscoveryReqType->ServiceCategory); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)', derivedBy='EXTENSION'. */ -static int encode_dinWeldingDetectionResType(bitstream_t* stream, struct dinWeldingDetectionResType* dinWeldingDetectionResType) { - int grammarID = 69; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 69: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinWeldingDetectionResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 70; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 70: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVSEStatusType(stream, &dinWeldingDetectionResType->DC_EVSEStatus ); - } - grammarID = 71; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 71: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinWeldingDetectionResType->EVSEPresentVoltage ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)', derivedBy='EXTENSION'. */ -static int encode_dinCertificateUpdateReqType(bitstream_t* stream, struct dinCertificateUpdateReqType* dinCertificateUpdateReqType) { - int grammarID = 213; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 213: - /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ - if ( dinCertificateUpdateReqType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateReqType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinCertificateUpdateReqType->Id.characters, dinCertificateUpdateReqType->Id.charactersLen); - } - } - grammarID = 214; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinCertificateChainType(stream, &dinCertificateUpdateReqType->ContractSignatureCertChain ); - } - grammarID = 215; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 214: - /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinCertificateChainType(stream, &dinCertificateUpdateReqType->ContractSignatureCertChain ); - } - grammarID = 215; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 215: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - 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)(dinCertificateUpdateReqType->ContractID.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinCertificateUpdateReqType->ContractID.characters, dinCertificateUpdateReqType->ContractID.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 132; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 132: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinListOfRootCertificateIDsType(stream, &dinCertificateUpdateReqType->ListOfRootCertificateIDs ); - } - grammarID = 133; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 133: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateReqType->DHParams.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinCertificateUpdateReqType->DHParams.bytes, dinCertificateUpdateReqType->DHParams.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Service{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinServiceTagListType(bitstream_t* stream, struct dinServiceTagListType* dinServiceTagListType) { - int grammarID = 216; - int done = 0; - - unsigned int dinServiceTagListType_Service_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 216: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ - if (dinServiceTagListType_Service_currArrayIndex < dinServiceTagListType->Service.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinServiceType(stream, &dinServiceTagListType->Service.array [dinServiceTagListType_Service_currArrayIndex++]); - } - grammarID = 217; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 217: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ - if (dinServiceTagListType_Service_currArrayIndex < dinServiceTagListType->Service.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinServiceType(stream, &dinServiceTagListType->Service.array [dinServiceTagListType_Service_currArrayIndex++]); - } - grammarID = 217; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinSignedInfoType(bitstream_t* stream, struct dinSignedInfoType* dinSignedInfoType) { - int grammarID = 218; - int done = 0; - - unsigned int dinSignedInfoType_Reference_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 218: - /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ - if ( dinSignedInfoType->Id_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignedInfoType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinSignedInfoType->Id.characters, dinSignedInfoType->Id.charactersLen); - } - } - grammarID = 219; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinCanonicalizationMethodType(stream, &dinSignedInfoType->CanonicalizationMethod ); - } - grammarID = 220; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 219: - /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinCanonicalizationMethodType(stream, &dinSignedInfoType->CanonicalizationMethod ); - } - grammarID = 220; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 220: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinSignatureMethodType(stream, &dinSignedInfoType->SignatureMethod ); - } - grammarID = 221; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 221: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ - if (dinSignedInfoType_Reference_currArrayIndex < dinSignedInfoType->Reference.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinReferenceType(stream, &dinSignedInfoType->Reference.array [dinSignedInfoType_Reference_currArrayIndex++]); - } - grammarID = 38; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 38: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ - if (dinSignedInfoType_Reference_currArrayIndex < dinSignedInfoType->Reference.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinReferenceType(stream, &dinSignedInfoType->Reference.array [dinSignedInfoType_Reference_currArrayIndex++]); - } - grammarID = 38; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ReadyToChargeState,"urn:iso:15118:2:2010:MsgBody":ChargingProfile{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVPowerDeliveryParameter{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinPowerDeliveryReqType(bitstream_t* stream, struct dinPowerDeliveryReqType* dinPowerDeliveryReqType) { - int grammarID = 222; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 222: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BOOLEAN]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeBoolean(stream, dinPowerDeliveryReqType->ReadyToChargeState); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 223; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 223: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ - if ( dinPowerDeliveryReqType->ChargingProfile_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinChargingProfileType(stream, &dinPowerDeliveryReqType->ChargingProfile ); - } - grammarID = 224; - } else if ( dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - errn = encode_dinDC_EVPowerDeliveryParameterType(stream, &dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter ); - } - grammarID = 10; - } else if ( dinPowerDeliveryReqType->EVPowerDeliveryParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - errn = encode_dinEVPowerDeliveryParameterType(stream, &dinPowerDeliveryReqType->EVPowerDeliveryParameter ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 224: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ - if ( dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinDC_EVPowerDeliveryParameterType(stream, &dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter ); - } - grammarID = 10; - } else if ( dinPowerDeliveryReqType->EVPowerDeliveryParameter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinEVPowerDeliveryParameterType(stream, &dinPowerDeliveryReqType->EVPowerDeliveryParameter ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":costKind,"urn:iso:15118:2:2010:MsgDataTypes":amount,"urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier{0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinCostType(bitstream_t* stream, struct dinCostType* dinCostType) { - int grammarID = 225; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 225: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 2, dinCostType->costKind); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 226; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 226: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amount)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger32(stream, dinCostType->amount); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 227; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 227: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier), END_ELEMENT] */ - if ( dinCostType->amountMultiplier_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 3, (uint32_t)(dinCostType->amountMultiplier + 3)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2010:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2010:MsgDataTypes":BulkSOC{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinDC_EVChargeParameterType(bitstream_t* stream, struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType) { - int grammarID = 228; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 228: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVStatusType(stream, &dinDC_EVChargeParameterType->DC_EVStatus ); - } - grammarID = 229; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 229: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVMaximumCurrentLimit ); - } - grammarID = 230; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 230: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ - if ( dinDC_EVChargeParameterType->EVMaximumPowerLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVMaximumPowerLimit ); - } - grammarID = 231; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVMaximumVoltageLimit ); - } - grammarID = 232; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 231: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVMaximumVoltageLimit ); - } - grammarID = 232; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 232: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ - if ( dinDC_EVChargeParameterType->EVEnergyCapacity_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVEnergyCapacity ); - } - grammarID = 233; - } else if ( dinDC_EVChargeParameterType->EVEnergyRequest_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVEnergyRequest ); - } - grammarID = 234; - } else if ( dinDC_EVChargeParameterType->FullSOC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->FullSOC - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 235; - } else if ( dinDC_EVChargeParameterType->BulkSOC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->BulkSOC - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 4); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 233: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ - if ( dinDC_EVChargeParameterType->EVEnergyRequest_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVEnergyRequest ); - } - grammarID = 234; - } else if ( dinDC_EVChargeParameterType->FullSOC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->FullSOC - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 235; - } else if ( dinDC_EVChargeParameterType->BulkSOC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->BulkSOC - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 234: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ - if ( dinDC_EVChargeParameterType->FullSOC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->FullSOC - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 235; - } else if ( dinDC_EVChargeParameterType->BulkSOC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->BulkSOC - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 235: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ - if ( dinDC_EVChargeParameterType->BulkSOC_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->BulkSOC - 0)); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SubCertificatesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ -static int encode_dinSubCertificatesType(bitstream_t* stream, struct dinSubCertificatesType* dinSubCertificatesType) { - int grammarID = 236; - int done = 0; - - unsigned int dinSubCertificatesType_Certificate_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 236: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ - if (dinSubCertificatesType_Certificate_currArrayIndex < dinSubCertificatesType->Certificate.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytes, dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytesLen); - dinSubCertificatesType_Certificate_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 237; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 237: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ - if (dinSubCertificatesType_Certificate_currArrayIndex < dinSubCertificatesType->Certificate.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytes, dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytesLen); - dinSubCertificatesType_Certificate_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 237; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; + grammarID = 5; } else { errn = EXI_ERROR_UNKOWN_EVENT; } @@ -8047,13 +525,13 @@ static int encode_dinSubCertificatesType(bitstream_t* stream, struct dinSubCerti /* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":EVCCID)', derivedBy='EXTENSION'. */ static int encode_dinSessionSetupReqType(bitstream_t* stream, struct dinSessionSetupReqType* dinSessionSetupReqType) { - int grammarID = 238; + int grammarID = 7; int done = 0; while(!done) { switch(grammarID) { - case 238: + case 7: /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVCCID)] */ if ( 1 == 1 ) { errn = encodeNBitUnsignedInteger(stream, 1, 0); @@ -8069,970 +547,19 @@ static int encode_dinSessionSetupReqType(bitstream_t* stream, struct dinSessionS errn = encodeNBitUnsignedInteger(stream, 1, 0); } } - grammarID = 10; + grammarID = 4; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 10: + case 4: /* Element[END_ELEMENT] */ if (1==1) { errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { done = 1; } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDef,#AnonType_V2G_Message', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDef":Header,"urn:iso:15118:2:2010:MsgDef":Body)', derivedBy='RESTRICTION'. */ -static int encode_dinAnonType_V2G_Message(bitstream_t* stream, struct dinAnonType_V2G_Message* dinAnonType_V2G_Message) { - int grammarID = 239; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 239: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinMessageHeaderType(stream, &dinAnonType_V2G_Message->Header ); - } - grammarID = 240; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 240: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinBodyType(stream, &dinAnonType_V2G_Message->Body ); - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinMeterInfoType(bitstream_t* stream, struct dinMeterInfoType* dinMeterInfoType) { - int grammarID = 241; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 241: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - 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)(dinMeterInfoType->MeterID.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinMeterInfoType->MeterID.characters, dinMeterInfoType->MeterID.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 242; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 242: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( dinMeterInfoType->MeterReading_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinMeterInfoType->MeterReading ); - } - grammarID = 243; - } else if ( dinMeterInfoType->SigMeterReading_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeterInfoType->SigMeterReading.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinMeterInfoType->SigMeterReading.bytes, dinMeterInfoType->SigMeterReading.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 244; - } else if ( dinMeterInfoType->MeterStatus_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinMeterInfoType->MeterStatus); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 245; - } else if ( dinMeterInfoType->TMeter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger64(stream, dinMeterInfoType->TMeter); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 4); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 243: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( dinMeterInfoType->SigMeterReading_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeterInfoType->SigMeterReading.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinMeterInfoType->SigMeterReading.bytes, dinMeterInfoType->SigMeterReading.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 244; - } else if ( dinMeterInfoType->MeterStatus_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinMeterInfoType->MeterStatus); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 245; - } else if ( dinMeterInfoType->TMeter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger64(stream, dinMeterInfoType->TMeter); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 244: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( dinMeterInfoType->MeterStatus_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinMeterInfoType->MeterStatus); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 245; - } else if ( dinMeterInfoType->TMeter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger64(stream, dinMeterInfoType->TMeter); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 245: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ - if ( dinMeterInfoType->TMeter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger64(stream, dinMeterInfoType->TMeter); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID)', derivedBy='EXTENSION'. */ -static int encode_dinCertificateInstallationResType(bitstream_t* stream, struct dinCertificateInstallationResType* dinCertificateInstallationResType) { - int grammarID = 246; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 246: - /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationResType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinCertificateInstallationResType->Id.characters, dinCertificateInstallationResType->Id.charactersLen); - } - } - grammarID = 247; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 247: - /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinCertificateInstallationResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 248; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 248: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinCertificateChainType(stream, &dinCertificateInstallationResType->ContractSignatureCertChain ); - } - grammarID = 249; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 249: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationResType->ContractSignatureEncryptedPrivateKey.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinCertificateInstallationResType->ContractSignatureEncryptedPrivateKey.bytes, dinCertificateInstallationResType->ContractSignatureEncryptedPrivateKey.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 250; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 250: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationResType->DHParams.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinCertificateInstallationResType->DHParams.bytes, dinCertificateInstallationResType->DHParams.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 251; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 251: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - 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)(dinCertificateInstallationResType->ContractID.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinCertificateInstallationResType->ContractID.characters, dinCertificateInstallationResType->ContractID.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ServiceID,"urn:iso:15118:2:2010:MsgBody":ServiceParameterList{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinServiceDetailResType(bitstream_t* stream, struct dinServiceDetailResType* dinServiceDetailResType) { - int grammarID = 252; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 252: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[ENUMERATION]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinServiceDetailResType->ResponseCode); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 253; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 253: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, dinServiceDetailResType->ServiceID); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 254; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 254: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceParameterList), END_ELEMENT] */ - if ( dinServiceDetailResType->ServiceParameterList_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinServiceParameterListType(stream, &dinServiceDetailResType->ServiceParameterList ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)', derivedBy='RESTRICTION'. */ -static int encode_dinX509IssuerSerialType(bitstream_t* stream, struct dinX509IssuerSerialType* dinX509IssuerSerialType) { - int grammarID = 255; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 255: - /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509IssuerSerialType->X509IssuerName.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinX509IssuerSerialType->X509IssuerName.characters, dinX509IssuerSerialType->X509IssuerName.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 256; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 256: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger64(stream, dinX509IssuerSerialType->X509SerialNumber); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEChargeParameterType', base type name='EVSEChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2010:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})', derivedBy='EXTENSION'. */ -static int encode_dinDC_EVSEChargeParameterType(bitstream_t* stream, struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType) { - int grammarID = 257; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 257: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinDC_EVSEStatusType(stream, &dinDC_EVSEChargeParameterType->DC_EVSEStatus ); - } - grammarID = 258; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 258: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMaximumCurrentLimit ); - } - grammarID = 259; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 259: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ - if ( dinDC_EVSEChargeParameterType->EVSEMaximumPowerLimit_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMaximumPowerLimit ); - } - grammarID = 260; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMaximumVoltageLimit ); - } - grammarID = 261; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 260: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMaximumVoltageLimit ); - } - grammarID = 261; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 261: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMinimumCurrentLimit ); - } - grammarID = 262; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 262: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMinimumVoltageLimit ); - } - grammarID = 263; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 263: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ - if ( dinDC_EVSEChargeParameterType->EVSECurrentRegulationTolerance_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSECurrentRegulationTolerance ); - } - grammarID = 264; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEPeakCurrentRipple ); - } - grammarID = 265; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 264: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEPeakCurrentRipple ); - } - grammarID = 265; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 265: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), END_ELEMENT] */ - if ( dinDC_EVSEChargeParameterType->EVSEEnergyToBeDelivered_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEEnergyToBeDelivered ); - } - grammarID = 10; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVStatusType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -static int encode_dinEVStatusType(bitstream_t* stream, struct dinEVStatusType* dinEVStatusType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ -static int encode_dinX509DataType(bitstream_t* stream, struct dinX509DataType* dinX509DataType) { - int grammarID = 266; - int done = 0; - - unsigned int dinX509DataType_X509IssuerSerial_currArrayIndex = 0; - unsigned int dinX509DataType_X509SKI_currArrayIndex = 0; - unsigned int dinX509DataType_X509SubjectName_currArrayIndex = 0; - unsigned int dinX509DataType_X509Certificate_currArrayIndex = 0; - unsigned int dinX509DataType_X509CRL_currArrayIndex = 0; - - while(!done) { - switch(grammarID) { - case 266: - /* FirstStartTag[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#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC] */ - if (dinX509DataType_X509IssuerSerial_currArrayIndex < dinX509DataType->X509IssuerSerial.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinX509IssuerSerialType(stream, &dinX509DataType->X509IssuerSerial.array [dinX509DataType_X509IssuerSerial_currArrayIndex++]); - } - grammarID = 267; - } else if (dinX509DataType_X509SKI_currArrayIndex < dinX509DataType->X509SKI.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytes, dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytesLen); - dinX509DataType_X509SKI_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 267; - } else if (dinX509DataType_X509SubjectName_currArrayIndex < dinX509DataType->X509SubjectName.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].characters, dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].charactersLen); - dinX509DataType_X509SubjectName_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 267; - } else if (dinX509DataType_X509Certificate_currArrayIndex < dinX509DataType->X509Certificate.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytes, dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytesLen); - dinX509DataType_X509Certificate_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 267; - } else if (dinX509DataType_X509CRL_currArrayIndex < dinX509DataType->X509CRL.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 4); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytes, dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytesLen); - dinX509DataType_X509CRL_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 267; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 267; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 267: - /* Element[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#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC, END_ELEMENT] */ - if (dinX509DataType_X509IssuerSerial_currArrayIndex < dinX509DataType->X509IssuerSerial.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 0); - if(errn == 0) { - errn = encode_dinX509IssuerSerialType(stream, &dinX509DataType->X509IssuerSerial.array [dinX509DataType_X509IssuerSerial_currArrayIndex++]); - } - grammarID = 267; - } else if (dinX509DataType_X509SKI_currArrayIndex < dinX509DataType->X509SKI.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 1); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytes, dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytesLen); - dinX509DataType_X509SKI_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 267; - } else if (dinX509DataType_X509SubjectName_currArrayIndex < dinX509DataType->X509SubjectName.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 2); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].characters, dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].charactersLen); - dinX509DataType_X509SubjectName_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 267; - } else if (dinX509DataType_X509Certificate_currArrayIndex < dinX509DataType->X509Certificate.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 3); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytes, dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytesLen); - dinX509DataType_X509Certificate_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 267; - } else if (dinX509DataType_X509CRL_currArrayIndex < dinX509DataType->X509CRL.arrayLen ) { - errn = encodeNBitUnsignedInteger(stream, 3, 4); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytes, dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytesLen); - dinX509DataType_X509CRL_currArrayIndex++; - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 267; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 267; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 3, 6); - if(errn == 0) { - done = 1; - } - grammarID = 11; + grammarID = 5; } else { errn = EXI_ERROR_UNKOWN_EVENT; } @@ -9050,13 +577,13 @@ static int encode_dinX509DataType(bitstream_t* stream, struct dinX509DataType* d /* Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatus)', derivedBy='EXTENSION'. */ static int encode_dinPowerDeliveryResType(bitstream_t* stream, struct dinPowerDeliveryResType* dinPowerDeliveryResType) { - int grammarID = 268; + int grammarID = 8; int done = 0; while(!done) { switch(grammarID) { - case 268: + case 8: /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ if ( 1 == 1 ) { errn = encodeNBitUnsignedInteger(stream, 1, 0); @@ -9069,43 +596,43 @@ static int encode_dinPowerDeliveryResType(bitstream_t* stream, struct dinPowerDe errn = encodeNBitUnsignedInteger(stream, 1, 0); } } - grammarID = 269; + grammarID = 9; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 269: + case 9: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatus)] */ if ( dinPowerDeliveryResType->AC_EVSEStatus_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 2, 0); if(errn == 0) { errn = encode_dinAC_EVSEStatusType(stream, &dinPowerDeliveryResType->AC_EVSEStatus ); } - grammarID = 10; + grammarID = 4; } else if ( dinPowerDeliveryResType->DC_EVSEStatus_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 2, 1); if(errn == 0) { errn = encode_dinDC_EVSEStatusType(stream, &dinPowerDeliveryResType->DC_EVSEStatus ); } - grammarID = 10; + grammarID = 4; } else if ( dinPowerDeliveryResType->EVSEStatus_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 2, 2); if(errn == 0) { errn = encode_dinEVSEStatusType(stream, &dinPowerDeliveryResType->EVSEStatus ); } - grammarID = 10; + grammarID = 4; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 10: + case 4: /* Element[END_ELEMENT] */ if (1==1) { errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { done = 1; } - grammarID = 11; + grammarID = 5; } else { errn = EXI_ERROR_UNKOWN_EVENT; } @@ -9121,511 +648,406 @@ static int encode_dinPowerDeliveryResType(bitstream_t* stream, struct dinPowerDe return errn; } -/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})', derivedBy='RESTRICTION'. */ -static int encode_dinDSAKeyValueType(bitstream_t* stream, struct dinDSAKeyValueType* dinDSAKeyValueType) { - int grammarID = 270; +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ServiceID,"urn:iso:15118:2:2010:MsgBody":ServiceParameterList{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinServiceDetailResType(bitstream_t* stream, struct dinServiceDetailResType* dinServiceDetailResType) { + int grammarID = 10; int done = 0; while(!done) { switch(grammarID) { - case 270: - /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ - if ( dinDSAKeyValueType->P_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->P.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->P.bytes, dinDSAKeyValueType->P.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 271; - } else if ( dinDSAKeyValueType->G_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->G.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->G.bytes, dinDSAKeyValueType->G.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 272; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Y.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->Y.bytes, dinDSAKeyValueType->Y.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 273; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 271: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ - if ( dinDSAKeyValueType->Q_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Q.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->Q.bytes, dinDSAKeyValueType->Q.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 274; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 274: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ - if ( dinDSAKeyValueType->G_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->G.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->G.bytes, dinDSAKeyValueType->G.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 272; - } else if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Y.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->Y.bytes, dinDSAKeyValueType->Y.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 273; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 272: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Y.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->Y.bytes, dinDSAKeyValueType->Y.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 273; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 273: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ - if ( dinDSAKeyValueType->J_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->J.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->J.bytes, dinDSAKeyValueType->J.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 275; - } else if ( dinDSAKeyValueType->Seed_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Seed.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->Seed.bytes, dinDSAKeyValueType->Seed.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 276; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 2); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 275: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ - if ( dinDSAKeyValueType->Seed_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 2, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Seed.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->Seed.bytes, dinDSAKeyValueType->Seed.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 276; - } else if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 2, 1); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 276: - /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ - if ( dinDSAKeyValueType->PgenCounter_isUsed == 1u ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->PgenCounter.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinDSAKeyValueType->PgenCounter.bytes, dinDSAKeyValueType->PgenCounter.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":RetryCounter)', derivedBy='EXTENSION'. */ -static int encode_dinCertificateUpdateResType(bitstream_t* stream, struct dinCertificateUpdateResType* dinCertificateUpdateResType) { - int grammarID = 277; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 277: - /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* encode string as string table miss (+2 len)*/ - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateResType->Id.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinCertificateUpdateResType->Id.characters, dinCertificateUpdateResType->Id.charactersLen); - } - } - grammarID = 278; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 278: - /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ if ( 1 == 1 ) { errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { /* FirstStartTag[CHARACTERS[ENUMERATION]] */ errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { - errn = encodeNBitUnsignedInteger(stream, 5, dinCertificateUpdateResType->ResponseCode); + errn = encodeNBitUnsignedInteger(stream, 5, dinServiceDetailResType->ResponseCode); /* valid EE */ errn = encodeNBitUnsignedInteger(stream, 1, 0); } } - grammarID = 279; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 279: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encode_dinCertificateChainType(stream, &dinCertificateUpdateResType->ContractSignatureCertChain ); - } - grammarID = 280; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 280: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateResType->ContractSignatureEncryptedPrivateKey.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinCertificateUpdateResType->ContractSignatureEncryptedPrivateKey.bytes, dinCertificateUpdateResType->ContractSignatureEncryptedPrivateKey.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 281; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 281: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateResType->DHParams.bytesLen)); - if (errn == 0) { - errn = encodeBytes(stream, dinCertificateUpdateResType->DHParams.bytes, dinCertificateUpdateResType->DHParams.bytesLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 282; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 282: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - 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)(dinCertificateUpdateResType->ContractID.charactersLen + 2)); - if (errn == 0) { - errn = encodeCharacters(stream, dinCertificateUpdateResType->ContractID.characters, dinCertificateUpdateResType->ContractID.charactersLen); - } - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 283; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 283: - /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ - if ( 1 == 1 ) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - errn = encodeInteger16(stream, dinCertificateUpdateResType->RetryCounter); - /* valid EE */ - errn = encodeNBitUnsignedInteger(stream, 1, 0); - } - } - grammarID = 10; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - case 10: - /* Element[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } grammarID = 11; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopType', base type name='BodyBaseType', content type='EMPTY', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ -static int encode_dinSessionStopType(bitstream_t* stream, struct dinSessionStopType* dinSessionStopType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { + case 11: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + if ( 1 == 1 ) { errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { - done = 1; + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, dinServiceDetailResType->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } } - grammarID = 11; + grammarID = 12; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ -static int encode_dinEVSEChargeParameterType(bitstream_t* stream, struct dinEVSEChargeParameterType* dinEVSEChargeParameterType) { - int grammarID = 44; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 44: - /* FirstStartTag[END_ELEMENT] */ - if (1==1) { - errn = encodeNBitUnsignedInteger(stream, 1, 0); - if(errn == 0) { - done = 1; - } - grammarID = 11; - } else { - errn = EXI_ERROR_UNKOWN_EVENT; - } - break; - default: - errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; - break; - } - if(errn) { - done = 1; - } - } - return errn; -} - -/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EntryType', base type name='anyType', content type='ELEMENT', isAbstract='true', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval)', derivedBy='RESTRICTION'. */ -static int encode_dinEntryType(bitstream_t* stream, struct dinEntryType* dinEntryType) { - int grammarID = 284; - int done = 0; - - - while(!done) { - switch(grammarID) { - case 284: - /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ - if ( dinEntryType->RelativeTimeInterval_isUsed == 1u ) { + case 12: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceParameterList), END_ELEMENT] */ + if ( dinServiceDetailResType->ServiceParameterList_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 2, 0); if(errn == 0) { - errn = encode_dinRelativeTimeIntervalType(stream, &dinEntryType->RelativeTimeInterval ); + errn = encode_dinServiceParameterListType(stream, &dinServiceDetailResType->ServiceParameterList ); } - grammarID = 10; - } else if ( dinEntryType->TimeInterval_isUsed == 1u ) { + grammarID = 4; + } else if (1==1) { errn = encodeNBitUnsignedInteger(stream, 2, 1); if(errn == 0) { - errn = encode_dinIntervalType(stream, &dinEntryType->TimeInterval ); + done = 1; } - grammarID = 10; + grammarID = 5; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 10: + case 4: /* Element[END_ELEMENT] */ if (1==1) { errn = encodeNBitUnsignedInteger(stream, 1, 0); if(errn == 0) { done = 1; } - grammarID = 11; + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)', derivedBy='EXTENSION'. */ +static int encode_dinWeldingDetectionResType(bitstream_t* stream, struct dinWeldingDetectionResType* dinWeldingDetectionResType) { + int grammarID = 13; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 13: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinWeldingDetectionResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 14; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 14: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVSEStatusType(stream, &dinWeldingDetectionResType->DC_EVSEStatus ); + } + grammarID = 15; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 15: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinWeldingDetectionResType->EVSEPresentVoltage ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)', derivedBy='EXTENSION'. */ +static int encode_dinContractAuthenticationResType(bitstream_t* stream, struct dinContractAuthenticationResType* dinContractAuthenticationResType) { + int grammarID = 16; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 16: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinContractAuthenticationResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 17; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 17: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEProcessing)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, dinContractAuthenticationResType->EVSEProcessing); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##any]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinCanonicalizationMethodType(bitstream_t* stream, struct dinCanonicalizationMethodType* dinCanonicalizationMethodType) { + int grammarID = 18; + int done = 0; + int wcDone = 0; + + + while(!done) { + switch(grammarID) { + case 18: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCanonicalizationMethodType->Algorithm.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCanonicalizationMethodType->Algorithm.characters, dinCanonicalizationMethodType->Algorithm.charactersLen); + } + } + grammarID = 19; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 19: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinCanonicalizationMethodType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinCanonicalizationMethodType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCanonicalizationMethodType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCanonicalizationMethodType->ANY.characters, dinCanonicalizationMethodType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 20: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinCanonicalizationMethodType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinCanonicalizationMethodType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCanonicalizationMethodType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCanonicalizationMethodType->ANY.characters, dinCanonicalizationMethodType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ +static int encode_dinSPKIDataType(bitstream_t* stream, struct dinSPKIDataType* dinSPKIDataType) { + int grammarID = 21; + int done = 0; + int wcDone = 0; + + unsigned int dinSPKIDataType_SPKISexp_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 21: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp)] */ + if (dinSPKIDataType_SPKISexp_currArrayIndex < dinSPKIDataType->SPKISexp.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytes, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen); + dinSPKIDataType_SPKISexp_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 22; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 22: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), START_ELEMENT_GENERIC, END_ELEMENT] */ + if (dinSPKIDataType_SPKISexp_currArrayIndex < dinSPKIDataType->SPKISexp.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytes, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen); + dinSPKIDataType_SPKISexp_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 22; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 23; + } else if ( dinSPKIDataType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 23: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKISexp), END_ELEMENT] */ + if (dinSPKIDataType_SPKISexp_currArrayIndex < dinSPKIDataType->SPKISexp.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytes, dinSPKIDataType->SPKISexp.array[dinSPKIDataType_SPKISexp_currArrayIndex].bytesLen); + dinSPKIDataType_SPKISexp_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 22; + } else if ( dinSPKIDataType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; } else { errn = EXI_ERROR_UNKOWN_EVENT; } @@ -9643,14 +1065,14 @@ static int encode_dinEntryType(bitstream_t* stream, struct dinEntryType* dinEntr /* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ListOfRootCertificateIDsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ static int encode_dinListOfRootCertificateIDsType(bitstream_t* stream, struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType) { - int grammarID = 285; + int grammarID = 24; int done = 0; unsigned int dinListOfRootCertificateIDsType_RootCertificateID_currArrayIndex = 0; while(!done) { switch(grammarID) { - case 285: + case 24: /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID)] */ if (dinListOfRootCertificateIDsType_RootCertificateID_currArrayIndex < dinListOfRootCertificateIDsType->RootCertificateID.arrayLen ) { errn = encodeNBitUnsignedInteger(stream, 1, 0); @@ -9668,12 +1090,12 @@ static int encode_dinListOfRootCertificateIDsType(bitstream_t* stream, struct di errn = encodeNBitUnsignedInteger(stream, 1, 0); } } - grammarID = 286; + grammarID = 25; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 286: + case 25: /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RootCertificateID), END_ELEMENT] */ if (dinListOfRootCertificateIDsType_RootCertificateID_currArrayIndex < dinListOfRootCertificateIDsType->RootCertificateID.arrayLen ) { errn = encodeNBitUnsignedInteger(stream, 2, 0); @@ -9691,13 +1113,3520 @@ static int encode_dinListOfRootCertificateIDsType(bitstream_t* stream, struct di errn = encodeNBitUnsignedInteger(stream, 1, 0); } } - grammarID = 286; + grammarID = 25; } else if (1==1) { errn = encodeNBitUnsignedInteger(stream, 2, 1); if(errn == 0) { done = 1; } - grammarID = 11; + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SelectedService{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinSelectedServiceListType(bitstream_t* stream, struct dinSelectedServiceListType* dinSelectedServiceListType) { + int grammarID = 26; + int done = 0; + + unsigned int dinSelectedServiceListType_SelectedService_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 26: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService)] */ + if (dinSelectedServiceListType_SelectedService_currArrayIndex < dinSelectedServiceListType->SelectedService.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinSelectedServiceType(stream, &dinSelectedServiceListType->SelectedService.array [dinSelectedServiceListType_SelectedService_currArrayIndex++]); + } + grammarID = 27; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 27: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SelectedService), END_ELEMENT] */ + if (dinSelectedServiceListType_SelectedService_currArrayIndex < dinSelectedServiceListType->SelectedService.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinSelectedServiceType(stream, &dinSelectedServiceListType->SelectedService.array [dinSelectedServiceListType_SelectedService_currArrayIndex++]); + } + grammarID = 27; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2010:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2010:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumPowerLimit{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinCurrentDemandResType(bitstream_t* stream, struct dinCurrentDemandResType* dinCurrentDemandResType) { + int grammarID = 28; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 28: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinCurrentDemandResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 29; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 29: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVSEStatusType(stream, &dinCurrentDemandResType->DC_EVSEStatus ); + } + grammarID = 30; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 30: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEPresentVoltage ); + } + grammarID = 31; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 31: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentCurrent)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEPresentCurrent ); + } + grammarID = 32; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 32: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSECurrentLimitAchieved)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandResType->EVSECurrentLimitAchieved); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 33; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 33: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEVoltageLimitAchieved)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandResType->EVSEVoltageLimitAchieved); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 34; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 34: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPowerLimitAchieved)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandResType->EVSEPowerLimitAchieved); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 35; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 35: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + if ( dinCurrentDemandResType->EVSEMaximumVoltageLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumVoltageLimit ); + } + grammarID = 36; + } else if ( dinCurrentDemandResType->EVSEMaximumCurrentLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumCurrentLimit ); + } + grammarID = 37; + } else if ( dinCurrentDemandResType->EVSEMaximumPowerLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumPowerLimit ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 36: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + if ( dinCurrentDemandResType->EVSEMaximumCurrentLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumCurrentLimit ); + } + grammarID = 37; + } else if ( dinCurrentDemandResType->EVSEMaximumPowerLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumPowerLimit ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 37: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaximumPowerLimit), END_ELEMENT] */ + if ( dinCurrentDemandResType->EVSEMaximumPowerLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandResType->EVSEMaximumPowerLimit ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ +static int encode_dinTransformType(bitstream_t* stream, struct dinTransformType* dinTransformType) { + int grammarID = 38; + int done = 0; + int wcDone = 0; + + unsigned int dinTransformType_XPath_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 38: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinTransformType->Algorithm.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinTransformType->Algorithm.characters, dinTransformType->Algorithm.charactersLen); + } + } + grammarID = 39; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 39: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (dinTransformType_XPath_currArrayIndex < dinTransformType->XPath.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].characters, dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].charactersLen); + dinTransformType_XPath_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 40; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 40; + } else if ( dinTransformType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinTransformType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinTransformType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinTransformType->ANY.characters, dinTransformType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 40; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 40: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}XPath), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (dinTransformType_XPath_currArrayIndex < dinTransformType->XPath.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].characters, dinTransformType->XPath.array[dinTransformType_XPath_currArrayIndex].charactersLen); + dinTransformType_XPath_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 40; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 40; + } else if ( dinTransformType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinTransformType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinTransformType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinTransformType->ANY.characters, dinTransformType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 40; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DepartureTime,"urn:iso:15118:2:2010:MsgDataTypes":EAmount,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent)', derivedBy='EXTENSION'. */ +static int encode_dinAC_EVChargeParameterType(bitstream_t* stream, struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType) { + int grammarID = 41; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 41: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DepartureTime)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, dinAC_EVChargeParameterType->DepartureTime); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 42; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 42: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EAmount)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinAC_EVChargeParameterType->EAmount ); + } + grammarID = 43; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 43: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxVoltage)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinAC_EVChargeParameterType->EVMaxVoltage ); + } + grammarID = 44; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 44: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaxCurrent)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinAC_EVChargeParameterType->EVMaxCurrent ); + } + grammarID = 45; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 45: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMinCurrent)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinAC_EVChargeParameterType->EVMinCurrent ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ +static int encode_dinX509DataType(bitstream_t* stream, struct dinX509DataType* dinX509DataType) { + int grammarID = 46; + int done = 0; + int wcDone = 0; + + unsigned int dinX509DataType_X509IssuerSerial_currArrayIndex = 0; + unsigned int dinX509DataType_X509SKI_currArrayIndex = 0; + unsigned int dinX509DataType_X509SubjectName_currArrayIndex = 0; + unsigned int dinX509DataType_X509Certificate_currArrayIndex = 0; + unsigned int dinX509DataType_X509CRL_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 46: + /* FirstStartTag[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#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC] */ + if (dinX509DataType_X509IssuerSerial_currArrayIndex < dinX509DataType->X509IssuerSerial.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinX509IssuerSerialType(stream, &dinX509DataType->X509IssuerSerial.array [dinX509DataType_X509IssuerSerial_currArrayIndex++]); + } + grammarID = 47; + } else if (dinX509DataType_X509SKI_currArrayIndex < dinX509DataType->X509SKI.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytes, dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytesLen); + dinX509DataType_X509SKI_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 47; + } else if (dinX509DataType_X509SubjectName_currArrayIndex < dinX509DataType->X509SubjectName.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].characters, dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].charactersLen); + dinX509DataType_X509SubjectName_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 47; + } else if (dinX509DataType_X509Certificate_currArrayIndex < dinX509DataType->X509Certificate.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytes, dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytesLen); + dinX509DataType_X509Certificate_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 47; + } else if (dinX509DataType_X509CRL_currArrayIndex < dinX509DataType->X509CRL.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 4); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytes, dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytesLen); + dinX509DataType_X509CRL_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 47; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 47; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 47: + /* Element[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#}X509SubjectName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Certificate), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509CRL), START_ELEMENT_GENERIC, END_ELEMENT] */ + if (dinX509DataType_X509IssuerSerial_currArrayIndex < dinX509DataType->X509IssuerSerial.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinX509IssuerSerialType(stream, &dinX509DataType->X509IssuerSerial.array [dinX509DataType_X509IssuerSerial_currArrayIndex++]); + } + grammarID = 47; + } else if (dinX509DataType_X509SKI_currArrayIndex < dinX509DataType->X509SKI.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytes, dinX509DataType->X509SKI.array[dinX509DataType_X509SKI_currArrayIndex].bytesLen); + dinX509DataType_X509SKI_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 47; + } else if (dinX509DataType_X509SubjectName_currArrayIndex < dinX509DataType->X509SubjectName.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].characters, dinX509DataType->X509SubjectName.array[dinX509DataType_X509SubjectName_currArrayIndex].charactersLen); + dinX509DataType_X509SubjectName_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 47; + } else if (dinX509DataType_X509Certificate_currArrayIndex < dinX509DataType->X509Certificate.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytes, dinX509DataType->X509Certificate.array[dinX509DataType_X509Certificate_currArrayIndex].bytesLen); + dinX509DataType_X509Certificate_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 47; + } else if (dinX509DataType_X509CRL_currArrayIndex < dinX509DataType->X509CRL.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 3, 4); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytes, dinX509DataType->X509CRL.array[dinX509DataType_X509CRL_currArrayIndex].bytesLen); + dinX509DataType_X509CRL_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 47; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 47; + } else if ( dinX509DataType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 3, 6); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgBody":EVSEMaxCurrent{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2010:MsgBody":ReceiptRequired,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)', derivedBy='EXTENSION'. */ +static int encode_dinChargingStatusResType(bitstream_t* stream, struct dinChargingStatusResType* dinChargingStatusResType) { + int grammarID = 48; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 48: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinChargingStatusResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 49; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 49: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinChargingStatusResType->EVSEID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinChargingStatusResType->EVSEID.bytes, dinChargingStatusResType->EVSEID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 50; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 50: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SAScheduleTupleID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinChargingStatusResType->SAScheduleTupleID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 51; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 51: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEMaxCurrent), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + if ( dinChargingStatusResType->EVSEMaxCurrent_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinChargingStatusResType->EVSEMaxCurrent ); + } + grammarID = 52; + } else if ( dinChargingStatusResType->MeterInfo_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinMeterInfoType(stream, &dinChargingStatusResType->MeterInfo ); + } + grammarID = 53; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinChargingStatusResType->ReceiptRequired); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 54; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 52: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}MeterInfo), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + if ( dinChargingStatusResType->MeterInfo_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinMeterInfoType(stream, &dinChargingStatusResType->MeterInfo ); + } + grammarID = 53; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinChargingStatusResType->ReceiptRequired); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 54; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 53: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReceiptRequired)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinChargingStatusResType->ReceiptRequired); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 54; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinAC_EVSEStatusType(stream, &dinChargingStatusResType->AC_EVSEStatus ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)', derivedBy='EXTENSION'. */ +static int encode_dinWeldingDetectionReqType(bitstream_t* stream, struct dinWeldingDetectionReqType* dinWeldingDetectionReqType) { + int grammarID = 55; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 55: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVStatusType(stream, &dinWeldingDetectionReqType->DC_EVStatus ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertiesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SignatureProperty{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinSignaturePropertiesType(bitstream_t* stream, struct dinSignaturePropertiesType* dinSignaturePropertiesType) { + int grammarID = 56; + int done = 0; + + unsigned int dinSignaturePropertiesType_SignatureProperty_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 56: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + if ( dinSignaturePropertiesType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertiesType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignaturePropertiesType->Id.characters, dinSignaturePropertiesType->Id.charactersLen); + } + } + grammarID = 57; + } else if (dinSignaturePropertiesType_SignatureProperty_currArrayIndex < dinSignaturePropertiesType->SignatureProperty.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinSignaturePropertyType(stream, &dinSignaturePropertiesType->SignatureProperty.array [dinSignaturePropertiesType_SignatureProperty_currArrayIndex++]); + } + grammarID = 58; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 57: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty)] */ + if (dinSignaturePropertiesType_SignatureProperty_currArrayIndex < dinSignaturePropertiesType->SignatureProperty.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinSignaturePropertyType(stream, &dinSignaturePropertiesType->SignatureProperty.array [dinSignaturePropertiesType_SignatureProperty_currArrayIndex++]); + } + grammarID = 58; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 58: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureProperty), END_ELEMENT] */ + if (dinSignaturePropertiesType_SignatureProperty_currArrayIndex < dinSignaturePropertiesType->SignatureProperty.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinSignaturePropertyType(stream, &dinSignaturePropertiesType->SignatureProperty.array [dinSignaturePropertiesType_SignatureProperty_currArrayIndex++]); + } + grammarID = 58; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":GenChallenge{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinContractAuthenticationReqType(bitstream_t* stream, struct dinContractAuthenticationReqType* dinContractAuthenticationReqType) { + int grammarID = 59; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 59: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge), END_ELEMENT] */ + if ( dinContractAuthenticationReqType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinContractAuthenticationReqType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinContractAuthenticationReqType->Id.characters, dinContractAuthenticationReqType->Id.charactersLen); + } + } + grammarID = 60; + } else if ( dinContractAuthenticationReqType->GenChallenge_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + 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)(dinContractAuthenticationReqType->GenChallenge.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinContractAuthenticationReqType->GenChallenge.characters, dinContractAuthenticationReqType->GenChallenge.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 60: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge), END_ELEMENT] */ + if ( dinContractAuthenticationReqType->GenChallenge_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + 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)(dinContractAuthenticationReqType->GenChallenge.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinContractAuthenticationReqType->GenChallenge.characters, dinContractAuthenticationReqType->GenChallenge.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVPowerDeliveryParameterType', base type name='EVPowerDeliveryParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete)', derivedBy='EXTENSION'. */ +static int encode_dinDC_EVPowerDeliveryParameterType(bitstream_t* stream, struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType) { + int grammarID = 61; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 61: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVStatusType(stream, &dinDC_EVPowerDeliveryParameterType->DC_EVStatus ); + } + grammarID = 62; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 62: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + if ( dinDC_EVPowerDeliveryParameterType->BulkChargingComplete_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinDC_EVPowerDeliveryParameterType->BulkChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 63; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinDC_EVPowerDeliveryParameterType->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 63: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingComplete)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinDC_EVPowerDeliveryParameterType->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +static int encode_dinEVSEChargeParameterType(bitstream_t* stream, struct dinEVSEChargeParameterType* dinEVSEChargeParameterType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)', derivedBy='EXTENSION'. */ +static int encode_dinCableCheckReqType(bitstream_t* stream, struct dinCableCheckReqType* dinCableCheckReqType) { + int grammarID = 55; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 55: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVStatusType(stream, &dinCableCheckReqType->DC_EVStatus ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVChargeParameterType', base type name='EVChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2010:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2010:MsgDataTypes":BulkSOC{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinDC_EVChargeParameterType(bitstream_t* stream, struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType) { + int grammarID = 65; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 65: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVStatusType(stream, &dinDC_EVChargeParameterType->DC_EVStatus ); + } + grammarID = 66; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 66: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumCurrentLimit)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVMaximumCurrentLimit ); + } + grammarID = 67; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 67: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + if ( dinDC_EVChargeParameterType->EVMaximumPowerLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVMaximumPowerLimit ); + } + grammarID = 68; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVMaximumVoltageLimit ); + } + grammarID = 69; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 68: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVMaximumVoltageLimit)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVMaximumVoltageLimit ); + } + grammarID = 69; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 69: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyCapacity), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + if ( dinDC_EVChargeParameterType->EVEnergyCapacity_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVEnergyCapacity ); + } + grammarID = 70; + } else if ( dinDC_EVChargeParameterType->EVEnergyRequest_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVEnergyRequest ); + } + grammarID = 71; + } else if ( dinDC_EVChargeParameterType->FullSOC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->FullSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 72; + } else if ( dinDC_EVChargeParameterType->BulkSOC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->BulkSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 3, 4); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 70: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVEnergyRequest), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + if ( dinDC_EVChargeParameterType->EVEnergyRequest_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVChargeParameterType->EVEnergyRequest ); + } + grammarID = 71; + } else if ( dinDC_EVChargeParameterType->FullSOC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->FullSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 72; + } else if ( dinDC_EVChargeParameterType->BulkSOC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->BulkSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 71: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FullSOC), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + if ( dinDC_EVChargeParameterType->FullSOC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->FullSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 72; + } else if ( dinDC_EVChargeParameterType->BulkSOC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->BulkSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 72: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}BulkSOC), END_ELEMENT] */ + if ( dinDC_EVChargeParameterType->BulkSOC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVChargeParameterType->BulkSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SAScheduleListType', base type name='SASchedulesType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTuple{1-UNBOUNDED})', derivedBy='EXTENSION'. */ +static int encode_dinSAScheduleListType(bitstream_t* stream, struct dinSAScheduleListType* dinSAScheduleListType) { + int grammarID = 73; + int done = 0; + + unsigned int dinSAScheduleListType_SAScheduleTuple_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 73: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple)] */ + if (dinSAScheduleListType_SAScheduleTuple_currArrayIndex < dinSAScheduleListType->SAScheduleTuple.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinSAScheduleTupleType(stream, &dinSAScheduleListType->SAScheduleTuple.array [dinSAScheduleListType_SAScheduleTuple_currArrayIndex++]); + } + grammarID = 74; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 74: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTuple), END_ELEMENT] */ + if (dinSAScheduleListType_SAScheduleTuple_currArrayIndex < dinSAScheduleListType->SAScheduleTuple.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinSAScheduleTupleType(stream, &dinSAScheduleListType->SAScheduleTuple.array [dinSAScheduleListType_SAScheduleTuple_currArrayIndex++]); + } + grammarID = 74; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinPMaxScheduleType(bitstream_t* stream, struct dinPMaxScheduleType* dinPMaxScheduleType) { + int grammarID = 75; + int done = 0; + + unsigned int dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 75: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinPMaxScheduleType->PMaxScheduleID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 76; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 76: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry)] */ + if (dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex < dinPMaxScheduleType->PMaxScheduleEntry.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPMaxScheduleEntryType(stream, &dinPMaxScheduleType->PMaxScheduleEntry.array [dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex++]); + } + grammarID = 77; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 77: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxScheduleEntry), END_ELEMENT] */ + if (dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex < dinPMaxScheduleType->PMaxScheduleEntry.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPMaxScheduleEntryType(stream, &dinPMaxScheduleType->PMaxScheduleEntry.array [dinPMaxScheduleType_PMaxScheduleEntry_currArrayIndex++]); + } + grammarID = 77; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2010:MsgBody":SelectedServiceList)', derivedBy='EXTENSION'. */ +static int encode_dinServicePaymentSelectionReqType(bitstream_t* stream, struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType) { + int grammarID = 78; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 78: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedPaymentOption)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, dinServicePaymentSelectionReqType->SelectedPaymentOption); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 79; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 79: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}SelectedServiceList)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinSelectedServiceListType(stream, &dinServicePaymentSelectionReqType->SelectedServiceList ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType', base type name='IntervalType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinRelativeTimeIntervalType(bitstream_t* stream, struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType) { + int grammarID = 80; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 80: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}start)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, dinRelativeTimeIntervalType->start); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 81; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 81: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}duration), END_ELEMENT] */ + if ( dinRelativeTimeIntervalType->duration_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, dinRelativeTimeIntervalType->duration); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVStatusType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +static int encode_dinEVStatusType(bitstream_t* stream, struct dinEVStatusType* dinEVStatusType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)', derivedBy='EXTENSION'. */ +static int encode_dinPreChargeResType(bitstream_t* stream, struct dinPreChargeResType* dinPreChargeResType) { + int grammarID = 13; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 13: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinPreChargeResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 14; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 14: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVSEStatusType(stream, &dinPreChargeResType->DC_EVSEStatus ); + } + grammarID = 15; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 15: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEPresentVoltage)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinPreChargeResType->EVSEPresentVoltage ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEChargeParameterType', base type name='EVSEChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2010:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinDC_EVSEChargeParameterType(bitstream_t* stream, struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType) { + int grammarID = 82; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 82: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVSEStatusType(stream, &dinDC_EVSEChargeParameterType->DC_EVSEStatus ); + } + grammarID = 83; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 83: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumCurrentLimit)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMaximumCurrentLimit ); + } + grammarID = 84; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 84: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + if ( dinDC_EVSEChargeParameterType->EVSEMaximumPowerLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMaximumPowerLimit ); + } + grammarID = 85; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMaximumVoltageLimit ); + } + grammarID = 86; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 85: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaximumVoltageLimit)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMaximumVoltageLimit ); + } + grammarID = 86; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 86: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumCurrentLimit)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMinimumCurrentLimit ); + } + grammarID = 87; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 87: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinimumVoltageLimit)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEMinimumVoltageLimit ); + } + grammarID = 88; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 88: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSECurrentRegulationTolerance), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + if ( dinDC_EVSEChargeParameterType->EVSECurrentRegulationTolerance_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSECurrentRegulationTolerance ); + } + grammarID = 89; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEPeakCurrentRipple ); + } + grammarID = 90; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 89: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEPeakCurrentRipple)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEPeakCurrentRipple ); + } + grammarID = 90; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 90: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEEnergyToBeDelivered), END_ELEMENT] */ + if ( dinDC_EVSEChargeParameterType->EVSEEnergyToBeDelivered_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinDC_EVSEChargeParameterType->EVSEEnergyToBeDelivered ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":GenChallenge,"urn:iso:15118:2:2010:MsgBody":DateTimeNow)', derivedBy='EXTENSION'. */ +static int encode_dinPaymentDetailsResType(bitstream_t* stream, struct dinPaymentDetailsResType* dinPaymentDetailsResType) { + int grammarID = 91; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 91: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinPaymentDetailsResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 92; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 92: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}GenChallenge)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + 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)(dinPaymentDetailsResType->GenChallenge.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinPaymentDetailsResType->GenChallenge.characters, dinPaymentDetailsResType->GenChallenge.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 93; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 93: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, dinPaymentDetailsResType->DateTimeNow); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinDSAKeyValueType(bitstream_t* stream, struct dinDSAKeyValueType* dinDSAKeyValueType) { + int grammarID = 94; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 94: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}P), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + if ( dinDSAKeyValueType->P_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->P.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->P.bytes, dinDSAKeyValueType->P.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 95; + } else if ( dinDSAKeyValueType->G_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->G.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->G.bytes, dinDSAKeyValueType->G.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 96; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Y.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->Y.bytes, dinDSAKeyValueType->Y.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 97; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 95: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Q)] */ + if ( dinDSAKeyValueType->Q_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Q.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->Q.bytes, dinDSAKeyValueType->Q.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 98; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 98: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}G), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + if ( dinDSAKeyValueType->G_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->G.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->G.bytes, dinDSAKeyValueType->G.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 96; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Y.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->Y.bytes, dinDSAKeyValueType->Y.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 97; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 96: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Y)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Y.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->Y.bytes, dinDSAKeyValueType->Y.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 97; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 97: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}J), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + if ( dinDSAKeyValueType->J_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->J.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->J.bytes, dinDSAKeyValueType->J.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 99; + } else if ( dinDSAKeyValueType->Seed_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Seed.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->Seed.bytes, dinDSAKeyValueType->Seed.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 100; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 99: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Seed), END_ELEMENT] */ + if ( dinDSAKeyValueType->Seed_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->Seed.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->Seed.bytes, dinDSAKeyValueType->Seed.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 100; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 100: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PgenCounter)] */ + if ( dinDSAKeyValueType->PgenCounter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDSAKeyValueType->PgenCounter.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinDSAKeyValueType->PgenCounter.bytes, dinDSAKeyValueType->PgenCounter.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SASchedulesType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +static int encode_dinSASchedulesType(bitstream_t* stream, struct dinSASchedulesType* dinSASchedulesType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":RetryCounter)', derivedBy='EXTENSION'. */ +static int encode_dinCertificateUpdateResType(bitstream_t* stream, struct dinCertificateUpdateResType* dinCertificateUpdateResType) { + int grammarID = 101; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 101: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateResType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCertificateUpdateResType->Id.characters, dinCertificateUpdateResType->Id.charactersLen); + } + } + grammarID = 102; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 102: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinCertificateUpdateResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 103; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 103: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinCertificateChainType(stream, &dinCertificateUpdateResType->ContractSignatureCertChain ); + } + grammarID = 104; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 104: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateResType->ContractSignatureEncryptedPrivateKey.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinCertificateUpdateResType->ContractSignatureEncryptedPrivateKey.bytes, dinCertificateUpdateResType->ContractSignatureEncryptedPrivateKey.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 105; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 105: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateResType->DHParams.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinCertificateUpdateResType->DHParams.bytes, dinCertificateUpdateResType->DHParams.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 106; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 106: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + 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)(dinCertificateUpdateResType->ContractID.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCertificateUpdateResType->ContractID.characters, dinCertificateUpdateResType->ContractID.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 107; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 107: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RetryCounter)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinCertificateUpdateResType->RetryCounter); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVChargeParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +static int encode_dinEVChargeParameterType(bitstream_t* stream, struct dinEVChargeParameterType* dinEVChargeParameterType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgHeader,MessageHeaderType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgHeader":SessionID,"urn:iso:15118:2:2010:MsgHeader":Notification{0-1},"http://www.w3.org/2000/09/xmldsig#":Signature{0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinMessageHeaderType(bitstream_t* stream, struct dinMessageHeaderType* dinMessageHeaderType) { + int grammarID = 108; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 108: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}SessionID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMessageHeaderType->SessionID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinMessageHeaderType->SessionID.bytes, dinMessageHeaderType->SessionID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 109; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 109: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgHeader}Notification), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + if ( dinMessageHeaderType->Notification_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinNotificationType(stream, &dinMessageHeaderType->Notification ); + } + grammarID = 110; + } else if ( dinMessageHeaderType->Signature_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinSignatureType(stream, &dinMessageHeaderType->Signature ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 110: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Signature), END_ELEMENT] */ + if ( dinMessageHeaderType->Signature_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinSignatureType(stream, &dinMessageHeaderType->Signature ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDef,BodyBaseType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +static int encode_dinBodyBaseType(bitstream_t* stream, struct dinBodyBaseType* dinBodyBaseType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))', derivedBy='RESTRICTION'. */ +static int encode_dinKeyValueType(bitstream_t* stream, struct dinKeyValueType* dinKeyValueType) { + int grammarID = 111; + int done = 0; + int wcDone = 0; + + + while(!done) { + switch(grammarID) { + case 111: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if ( dinKeyValueType->DSAKeyValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinDSAKeyValueType(stream, &dinKeyValueType->DSAKeyValue ); + } + grammarID = 112; + } else if ( dinKeyValueType->RSAKeyValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + errn = encode_dinRSAKeyValueType(stream, &dinKeyValueType->RSAKeyValue ); + } + grammarID = 112; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 112; + } else if ( dinKeyValueType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyValueType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyValueType->ANY.characters, dinKeyValueType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 113; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 112: + /* Element[END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( dinKeyValueType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinKeyValueType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyValueType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyValueType->ANY.characters, dinKeyValueType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 112; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 113: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DSAKeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RSAKeyValue), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if ( dinKeyValueType->DSAKeyValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinDSAKeyValueType(stream, &dinKeyValueType->DSAKeyValue ); + } + grammarID = 112; + } else if ( dinKeyValueType->RSAKeyValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + errn = encode_dinRSAKeyValueType(stream, &dinKeyValueType->RSAKeyValue ); + } + grammarID = 112; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 112; + } else if ( dinKeyValueType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyValueType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyValueType->ANY.characters, dinKeyValueType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 113; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +static int encode_dinIntervalType(bitstream_t* stream, struct dinIntervalType* dinIntervalType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing,"urn:iso:15118:2:2010:MsgDataTypes":SASchedules,"urn:iso:15118:2:2010:MsgDataTypes":EVSEChargeParameter)', derivedBy='EXTENSION'. */ +static int encode_dinChargeParameterDiscoveryResType(bitstream_t* stream, struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType) { + int grammarID = 114; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 114: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinChargeParameterDiscoveryResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 115; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 115: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEProcessing)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, dinChargeParameterDiscoveryResType->EVSEProcessing); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 116; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 116: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleList), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SASchedules)] */ + if ( dinChargeParameterDiscoveryResType->SAScheduleList_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinSAScheduleListType(stream, &dinChargeParameterDiscoveryResType->SAScheduleList ); + } + grammarID = 117; + } else if ( dinChargeParameterDiscoveryResType->SASchedules_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinSASchedulesType(stream, &dinChargeParameterDiscoveryResType->SASchedules ); + } + grammarID = 117; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 117: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVSEChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEChargeParameter)] */ + if ( dinChargeParameterDiscoveryResType->AC_EVSEChargeParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinAC_EVSEChargeParameterType(stream, &dinChargeParameterDiscoveryResType->AC_EVSEChargeParameter ); + } + grammarID = 4; + } else if ( dinChargeParameterDiscoveryResType->DC_EVSEChargeParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinDC_EVSEChargeParameterType(stream, &dinChargeParameterDiscoveryResType->DC_EVSEChargeParameter ); + } + grammarID = 4; + } else if ( dinChargeParameterDiscoveryResType->EVSEChargeParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + errn = encode_dinEVSEChargeParameterType(stream, &dinChargeParameterDiscoveryResType->EVSEChargeParameter ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ReadyToChargeState,"urn:iso:15118:2:2010:MsgBody":ChargingProfile{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVPowerDeliveryParameter{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinPowerDeliveryReqType(bitstream_t* stream, struct dinPowerDeliveryReqType* dinPowerDeliveryReqType) { + int grammarID = 118; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 118: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ReadyToChargeState)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinPowerDeliveryReqType->ReadyToChargeState); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 119; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 119: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingProfile), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + if ( dinPowerDeliveryReqType->ChargingProfile_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinChargingProfileType(stream, &dinPowerDeliveryReqType->ChargingProfile ); + } + grammarID = 120; + } else if ( dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + errn = encode_dinDC_EVPowerDeliveryParameterType(stream, &dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter ); + } + grammarID = 4; + } else if ( dinPowerDeliveryReqType->EVPowerDeliveryParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + errn = encode_dinEVPowerDeliveryParameterType(stream, &dinPowerDeliveryReqType->EVPowerDeliveryParameter ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 120: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVPowerDeliveryParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVPowerDeliveryParameter), END_ELEMENT] */ + if ( dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinDC_EVPowerDeliveryParameterType(stream, &dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter ); + } + grammarID = 4; + } else if ( dinPowerDeliveryReqType->EVPowerDeliveryParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinEVPowerDeliveryParameterType(stream, &dinPowerDeliveryReqType->EVPowerDeliveryParameter ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinCertificateChainType(bitstream_t* stream, struct dinCertificateChainType* dinCertificateChainType) { + int grammarID = 121; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 121: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateChainType->Certificate.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinCertificateChainType->Certificate.bytes, dinCertificateChainType->Certificate.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 122; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 122: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SubCertificates), END_ELEMENT] */ + if ( dinCertificateChainType->SubCertificates_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinSubCertificatesType(stream, &dinCertificateChainType->SubCertificates ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinTransformsType(bitstream_t* stream, struct dinTransformsType* dinTransformsType) { + int grammarID = 123; + int done = 0; + + unsigned int dinTransformsType_Transform_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 123: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform)] */ + if (dinTransformsType_Transform_currArrayIndex < dinTransformsType->Transform.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinTransformType(stream, &dinTransformsType->Transform.array [dinTransformsType_Transform_currArrayIndex++]); + } + grammarID = 124; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 124: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transform), END_ELEMENT] */ + if (dinTransformsType_Transform_currArrayIndex < dinTransformsType->Transform.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinTransformType(stream, &dinTransformsType->Transform.array [dinTransformsType_Transform_currArrayIndex++]); + } + grammarID = 124; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EntryType', base type name='anyType', content type='ELEMENT', isAbstract='true', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval)', derivedBy='RESTRICTION'. */ +static int encode_dinEntryType(bitstream_t* stream, struct dinEntryType* dinEntryType) { + int grammarID = 125; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 125: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( dinEntryType->RelativeTimeInterval_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinRelativeTimeIntervalType(stream, &dinEntryType->RelativeTimeInterval ); + } + grammarID = 4; + } else if ( dinEntryType->TimeInterval_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinIntervalType(stream, &dinEntryType->TimeInterval ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopType', base type name='BodyBaseType', content type='EMPTY', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ +static int encode_dinSessionStopType(bitstream_t* stream, struct dinSessionStopType* dinSessionStopType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ServiceID)', derivedBy='EXTENSION'. */ +static int encode_dinServiceDetailReqType(bitstream_t* stream, struct dinServiceDetailReqType* dinServiceDetailReqType) { + int grammarID = 126; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 126: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, dinServiceDetailReqType->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinDigestMethodType(bitstream_t* stream, struct dinDigestMethodType* dinDigestMethodType) { + int grammarID = 18; + int done = 0; + int wcDone = 0; + + + while(!done) { + switch(grammarID) { + case 18: + /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDigestMethodType->Algorithm.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinDigestMethodType->Algorithm.characters, dinDigestMethodType->Algorithm.charactersLen); + } + } + grammarID = 19; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 19: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinDigestMethodType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinDigestMethodType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDigestMethodType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinDigestMethodType->ANY.characters, dinDigestMethodType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 20: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinDigestMethodType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinDigestMethodType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinDigestMethodType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinDigestMethodType->ANY.characters, dinDigestMethodType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":boolValue|"urn:iso:15118:2:2010:MsgDataTypes":byteValue|"urn:iso:15118:2:2010:MsgDataTypes":shortValue|"urn:iso:15118:2:2010:MsgDataTypes":intValue|"urn:iso:15118:2:2010:MsgDataTypes":physicalValue|"urn:iso:15118:2:2010:MsgDataTypes":stringValue)', derivedBy='RESTRICTION'. */ +static int encode_dinParameterType(bitstream_t* stream, struct dinParameterType* dinParameterType) { + int grammarID = 127; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 127: + /* FirstStartTag[ATTRIBUTE[STRING](Name)] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinParameterType->Name.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinParameterType->Name.characters, dinParameterType->Name.charactersLen); + } + } + grammarID = 128; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 128: + /* StartTag[ATTRIBUTE[ENUMERATION](ValueType)] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 3, dinParameterType->ValueType); + } + grammarID = 129; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 129: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}boolValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}byteValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}shortValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}intValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}physicalValue), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}stringValue)] */ + if ( dinParameterType->boolValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinParameterType->boolValue); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if ( dinParameterType->byteValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + 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)(dinParameterType->byteValue + 128)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if ( dinParameterType->shortValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinParameterType->shortValue); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if ( dinParameterType->intValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger32(stream, dinParameterType->intValue); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if ( dinParameterType->physicalValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 4); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinParameterType->physicalValue ); + } + grammarID = 4; + } else if ( dinParameterType->stringValue_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 5); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinParameterType->stringValue.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinParameterType->stringValue.characters, dinParameterType->stringValue.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusReqType', base type name='BodyBaseType', content type='EMPTY', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ +static int encode_dinChargingStatusReqType(bitstream_t* stream, struct dinChargingStatusReqType* dinChargingStatusReqType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; } else { errn = EXI_ERROR_UNKOWN_EVENT; } @@ -9715,13 +4644,14 @@ static int encode_dinListOfRootCertificateIDsType(bitstream_t* stream, struct di /* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})', derivedBy='RESTRICTION'. */ static int encode_dinSignatureMethodType(bitstream_t* stream, struct dinSignatureMethodType* dinSignatureMethodType) { - int grammarID = 287; + int grammarID = 130; int done = 0; + int wcDone = 0; while(!done) { switch(grammarID) { - case 287: + case 130: /* FirstStartTag[ATTRIBUTE[STRING](Algorithm)] */ if (1==1) { errn = encodeNBitUnsignedInteger(stream, 1, 0); @@ -9732,12 +4662,12 @@ static int encode_dinSignatureMethodType(bitstream_t* stream, struct dinSignatur errn = encodeCharacters(stream, dinSignatureMethodType->Algorithm.characters, dinSignatureMethodType->Algorithm.charactersLen); } } - grammarID = 288; + grammarID = 131; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 288: + case 131: /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ if ( dinSignatureMethodType->HMACOutputLength_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 3, 0); @@ -9750,42 +4680,58 @@ static int encode_dinSignatureMethodType(bitstream_t* stream, struct dinSignatur errn = encodeNBitUnsignedInteger(stream, 1, 0); } } - grammarID = 14; + grammarID = 20; } else if (1==0) { errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { + grammarID = 20; + } else if ( dinSignatureMethodType->ANY_isUsed == 0u || wcDone ) { errn = encodeNBitUnsignedInteger(stream, 3, 2); if(errn == 0) { done = 1; } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 289; + grammarID = 5; + } else if ( dinSignatureMethodType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureMethodType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignatureMethodType->ANY.characters, dinSignatureMethodType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 132; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 14: + case 20: /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ if (1==0) { errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { + grammarID = 20; + } else if ( dinSignatureMethodType->ANY_isUsed == 0u || wcDone ) { errn = encodeNBitUnsignedInteger(stream, 2, 1); if(errn == 0) { done = 1; } - grammarID = 11; - } else if (1==0) { - errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; + grammarID = 5; + } else if ( dinSignatureMethodType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureMethodType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignatureMethodType->ANY.characters, dinSignatureMethodType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; - case 289: + case 132: /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}HMACOutputLength), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ if ( dinSignatureMethodType->HMACOutputLength_isUsed == 1u ) { errn = encodeNBitUnsignedInteger(stream, 3, 0); @@ -9798,23 +4744,5280 @@ static int encode_dinSignatureMethodType(bitstream_t* stream, struct dinSignatur errn = encodeNBitUnsignedInteger(stream, 1, 0); } } - grammarID = 14; + grammarID = 20; } else if (1==0) { errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; - grammarID = 14; - } else if (1==1) { + grammarID = 20; + } else if ( dinSignatureMethodType->ANY_isUsed == 0u || wcDone ) { errn = encodeNBitUnsignedInteger(stream, 3, 2); if(errn == 0) { done = 1; } - grammarID = 11; + grammarID = 5; + } else if ( dinSignatureMethodType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureMethodType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignatureMethodType->ANY.characters, dinSignatureMethodType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 132; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":OEMProvisioningCert,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)', derivedBy='EXTENSION'. */ +static int encode_dinCertificateInstallationReqType(bitstream_t* stream, struct dinCertificateInstallationReqType* dinCertificateInstallationReqType) { + int grammarID = 133; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 133: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + if ( dinCertificateInstallationReqType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationReqType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCertificateInstallationReqType->Id.characters, dinCertificateInstallationReqType->Id.charactersLen); + } + } + grammarID = 134; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationReqType->OEMProvisioningCert.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinCertificateInstallationReqType->OEMProvisioningCert.bytes, dinCertificateInstallationReqType->OEMProvisioningCert.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 135; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 134: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}OEMProvisioningCert)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationReqType->OEMProvisioningCert.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinCertificateInstallationReqType->OEMProvisioningCert.bytes, dinCertificateInstallationReqType->OEMProvisioningCert.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 135; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 135: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinListOfRootCertificateIDsType(stream, &dinCertificateInstallationReqType->ListOfRootCertificateIDs ); + } + grammarID = 136; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationReqType->DHParams.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinCertificateInstallationReqType->DHParams.bytes, dinCertificateInstallationReqType->DHParams.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":EPriceLevel,"urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost{0-UNBOUNDED}))', derivedBy='EXTENSION'. */ +static int encode_dinSalesTariffEntryType(bitstream_t* stream, struct dinSalesTariffEntryType* dinSalesTariffEntryType) { + int grammarID = 137; + int done = 0; + + unsigned int dinSalesTariffEntryType_ConsumptionCost_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 137: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( dinSalesTariffEntryType->RelativeTimeInterval_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinRelativeTimeIntervalType(stream, &dinSalesTariffEntryType->RelativeTimeInterval ); + } + grammarID = 138; + } else if ( dinSalesTariffEntryType->TimeInterval_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinIntervalType(stream, &dinSalesTariffEntryType->TimeInterval ); + } + grammarID = 138; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 138: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EPriceLevel)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(dinSalesTariffEntryType->EPriceLevel - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 139; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 139: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ConsumptionCost), END_ELEMENT] */ + if (dinSalesTariffEntryType_ConsumptionCost_currArrayIndex < dinSalesTariffEntryType->ConsumptionCost.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinConsumptionCostType(stream, &dinSalesTariffEntryType->ConsumptionCost.array [dinSalesTariffEntryType_ConsumptionCost_currArrayIndex++]); + } + grammarID = 139; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":PaymentOptions,"urn:iso:15118:2:2010:MsgBody":ChargeService,"urn:iso:15118:2:2010:MsgBody":ServiceList{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinServiceDiscoveryResType(bitstream_t* stream, struct dinServiceDiscoveryResType* dinServiceDiscoveryResType) { + int grammarID = 140; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 140: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinServiceDiscoveryResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 141; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 141: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}PaymentOptions)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPaymentOptionsType(stream, &dinServiceDiscoveryResType->PaymentOptions ); + } + grammarID = 142; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 142: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargeService)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinServiceChargeType(stream, &dinServiceDiscoveryResType->ChargeService ); + } + grammarID = 143; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 143: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceList), END_ELEMENT] */ + if ( dinServiceDiscoveryResType->ServiceList_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinServiceTagListType(stream, &dinServiceDiscoveryResType->ServiceList ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterSetType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2010:MsgDataTypes":Parameter{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinParameterSetType(bitstream_t* stream, struct dinParameterSetType* dinParameterSetType) { + int grammarID = 144; + int done = 0; + + unsigned int dinParameterSetType_Parameter_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 144: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinParameterSetType->ParameterSetID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 145; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 145: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter)] */ + if (dinParameterSetType_Parameter_currArrayIndex < dinParameterSetType->Parameter.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinParameterType(stream, &dinParameterSetType->Parameter.array [dinParameterSetType_Parameter_currArrayIndex++]); + } + grammarID = 146; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 146: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Parameter), END_ELEMENT] */ + if (dinParameterSetType_Parameter_currArrayIndex < dinParameterSetType->Parameter.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinParameterType(stream, &dinParameterSetType->Parameter.array [dinParameterSetType_Parameter_currArrayIndex++]); + } + grammarID = 146; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2010:MsgBody":EVMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgBody":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgBody":ChargingComplete,"urn:iso:15118:2:2010:MsgBody":RemainingTimeToFullSoC{0-1},"urn:iso:15118:2:2010:MsgBody":RemainingTimeToBulkSoC{0-1},"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage)', derivedBy='EXTENSION'. */ +static int encode_dinCurrentDemandReqType(bitstream_t* stream, struct dinCurrentDemandReqType* dinCurrentDemandReqType) { + int grammarID = 147; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 147: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVStatusType(stream, &dinCurrentDemandReqType->DC_EVStatus ); + } + grammarID = 148; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 148: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVTargetCurrent ); + } + grammarID = 149; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 149: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumVoltageLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( dinCurrentDemandReqType->EVMaximumVoltageLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumVoltageLimit ); + } + grammarID = 150; + } else if ( dinCurrentDemandReqType->EVMaximumCurrentLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumCurrentLimit ); + } + grammarID = 151; + } else if ( dinCurrentDemandReqType->EVMaximumPowerLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumPowerLimit ); + } + grammarID = 152; + } else if ( dinCurrentDemandReqType->BulkChargingComplete_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandReqType->BulkChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 153; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 3, 4); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 154; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 150: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumCurrentLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( dinCurrentDemandReqType->EVMaximumCurrentLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumCurrentLimit ); + } + grammarID = 151; + } else if ( dinCurrentDemandReqType->EVMaximumPowerLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumPowerLimit ); + } + grammarID = 152; + } else if ( dinCurrentDemandReqType->BulkChargingComplete_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandReqType->BulkChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 153; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 154; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 151: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVMaximumPowerLimit), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( dinCurrentDemandReqType->EVMaximumPowerLimit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVMaximumPowerLimit ); + } + grammarID = 152; + } else if ( dinCurrentDemandReqType->BulkChargingComplete_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandReqType->BulkChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 153; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 154; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 152: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}BulkChargingComplete), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( dinCurrentDemandReqType->BulkChargingComplete_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandReqType->BulkChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 153; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 154; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 153: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ChargingComplete)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinCurrentDemandReqType->ChargingComplete); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 154; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 154: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToFullSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + if ( dinCurrentDemandReqType->RemainingTimeToFullSoC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->RemainingTimeToFullSoC ); + } + grammarID = 155; + } else if ( dinCurrentDemandReqType->RemainingTimeToBulkSoC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->RemainingTimeToBulkSoC ); + } + grammarID = 156; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVTargetVoltage ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 155: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}RemainingTimeToBulkSoC), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + if ( dinCurrentDemandReqType->RemainingTimeToBulkSoC_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->RemainingTimeToBulkSoC ); + } + grammarID = 156; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVTargetVoltage ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 156: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinCurrentDemandReqType->EVTargetVoltage ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent)', derivedBy='EXTENSION'. */ +static int encode_dinPreChargeReqType(bitstream_t* stream, struct dinPreChargeReqType* dinPreChargeReqType) { + int grammarID = 157; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 157: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVStatusType(stream, &dinPreChargeReqType->DC_EVStatus ); + } + grammarID = 158; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 158: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetVoltage)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinPreChargeReqType->EVTargetVoltage ); + } + grammarID = 159; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 159: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVTargetCurrent)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinPreChargeReqType->EVTargetCurrent ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinSignatureType(bitstream_t* stream, struct dinSignatureType* dinSignatureType) { + int grammarID = 160; + int done = 0; + + unsigned int dinSignatureType_Object_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 160: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + if ( dinSignatureType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignatureType->Id.characters, dinSignatureType->Id.charactersLen); + } + } + grammarID = 161; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinSignedInfoType(stream, &dinSignatureType->SignedInfo ); + } + grammarID = 162; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 161: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignedInfo)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinSignedInfoType(stream, &dinSignatureType->SignedInfo ); + } + grammarID = 162; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 162: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureValue)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinSignatureValueType(stream, &dinSignatureType->SignatureValue ); + } + grammarID = 163; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 163: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyInfo), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + if ( dinSignatureType->KeyInfo_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinKeyInfoType(stream, &dinSignatureType->KeyInfo ); + } + grammarID = 164; + } else if (dinSignatureType_Object_currArrayIndex < dinSignatureType->Object.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinObjectType(stream, &dinSignatureType->Object.array [dinSignatureType_Object_currArrayIndex++]); + } + grammarID = 164; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 164: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Object), END_ELEMENT] */ + if (dinSignatureType_Object_currArrayIndex < dinSignatureType->Object.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinObjectType(stream, &dinSignatureType->Object.array [dinSignatureType_Object_currArrayIndex++]); + } + grammarID = 164; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)', derivedBy='RESTRICTION'. */ +static int encode_dinReferenceType(bitstream_t* stream, struct dinReferenceType* dinReferenceType) { + int grammarID = 165; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 165: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( dinReferenceType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinReferenceType->Id.characters, dinReferenceType->Id.charactersLen); + } + } + grammarID = 166; + } else if ( dinReferenceType->Type_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->Type.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinReferenceType->Type.characters, dinReferenceType->Type.charactersLen); + } + } + grammarID = 167; + } else if ( dinReferenceType->URI_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->URI.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinReferenceType->URI.characters, dinReferenceType->URI.charactersLen); + } + } + grammarID = 168; + } else if ( dinReferenceType->Transforms_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + errn = encode_dinTransformsType(stream, &dinReferenceType->Transforms ); + } + grammarID = 169; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 3, 4); + if(errn == 0) { + errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); + } + grammarID = 170; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 166: + /* StartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( dinReferenceType->Type_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->Type.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinReferenceType->Type.characters, dinReferenceType->Type.charactersLen); + } + } + grammarID = 167; + } else if ( dinReferenceType->URI_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->URI.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinReferenceType->URI.characters, dinReferenceType->URI.charactersLen); + } + } + grammarID = 168; + } else if ( dinReferenceType->Transforms_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + errn = encode_dinTransformsType(stream, &dinReferenceType->Transforms ); + } + grammarID = 169; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); + } + grammarID = 170; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 167: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( dinReferenceType->URI_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->URI.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinReferenceType->URI.characters, dinReferenceType->URI.charactersLen); + } + } + grammarID = 168; + } else if ( dinReferenceType->Transforms_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinTransformsType(stream, &dinReferenceType->Transforms ); + } + grammarID = 169; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); + } + grammarID = 170; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 168: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( dinReferenceType->Transforms_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinTransformsType(stream, &dinReferenceType->Transforms ); + } + grammarID = 169; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); + } + grammarID = 170; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 169: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestMethod)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDigestMethodType(stream, &dinReferenceType->DigestMethod ); + } + grammarID = 170; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 170: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}DigestValue)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinReferenceType->DigestValue.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinReferenceType->DigestValue.bytes, dinReferenceType->DigestValue.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ProfileEntryType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower)', derivedBy='RESTRICTION'. */ +static int encode_dinProfileEntryType(bitstream_t* stream, struct dinProfileEntryType* dinProfileEntryType) { + int grammarID = 171; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 171: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryStart)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, dinProfileEntryType->ChargingProfileEntryStart); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 172; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 172: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ChargingProfileEntryMaxPower)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinProfileEntryType->ChargingProfileEntryMaxPower); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDef,#AnonType_V2G_Message', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDef":Header,"urn:iso:15118:2:2010:MsgDef":Body)', derivedBy='RESTRICTION'. */ +static int encode_dinAnonType_V2G_Message(bitstream_t* stream, struct dinAnonType_V2G_Message* dinAnonType_V2G_Message) { + int grammarID = 173; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 173: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Header)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinMessageHeaderType(stream, &dinAnonType_V2G_Message->Header ); + } + grammarID = 174; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 174: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDef}Body)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinBodyType(stream, &dinAnonType_V2G_Message->Body ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":EVRequestedEnergyTransferType,"urn:iso:15118:2:2010:MsgDataTypes":EVChargeParameter)', derivedBy='EXTENSION'. */ +static int encode_dinChargeParameterDiscoveryReqType(bitstream_t* stream, struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType) { + int grammarID = 175; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 175: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVRequestedEnergyTransferType)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 3, dinChargeParameterDiscoveryReqType->EVRequestedEnergyTransferType); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 176; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 176: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}DC_EVChargeParameter), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVChargeParameter)] */ + if ( dinChargeParameterDiscoveryReqType->AC_EVChargeParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinAC_EVChargeParameterType(stream, &dinChargeParameterDiscoveryReqType->AC_EVChargeParameter ); + } + grammarID = 4; + } else if ( dinChargeParameterDiscoveryReqType->DC_EVChargeParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinDC_EVChargeParameterType(stream, &dinChargeParameterDiscoveryReqType->DC_EVChargeParameter ); + } + grammarID = 4; + } else if ( dinChargeParameterDiscoveryReqType->EVChargeParameter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + errn = encode_dinEVChargeParameterType(stream, &dinChargeParameterDiscoveryReqType->EVChargeParameter ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ConsumptionCostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":startValue,"urn:iso:15118:2:2010:MsgDataTypes":Cost{0-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinConsumptionCostType(bitstream_t* stream, struct dinConsumptionCostType* dinConsumptionCostType) { + int grammarID = 177; + int done = 0; + + unsigned int dinConsumptionCostType_Cost_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 177: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}startValue)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, dinConsumptionCostType->startValue); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 178; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 178: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Cost), END_ELEMENT] */ + if (dinConsumptionCostType_Cost_currArrayIndex < dinConsumptionCostType->Cost.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinCostType(stream, &dinConsumptionCostType->Cost.array [dinConsumptionCostType_Cost_currArrayIndex++]); + } + grammarID = 178; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)', derivedBy='RESTRICTION'. */ +static int encode_dinRSAKeyValueType(bitstream_t* stream, struct dinRSAKeyValueType* dinRSAKeyValueType) { + int grammarID = 179; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 179: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Modulus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRSAKeyValueType->Modulus.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinRSAKeyValueType->Modulus.bytes, dinRSAKeyValueType->Modulus.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 180; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 180: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Exponent)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRSAKeyValueType->Exponent.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinRSAKeyValueType->Exponent.bytes, dinRSAKeyValueType->Exponent.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService)', derivedBy='RESTRICTION'. */ +static int encode_dinServiceType(bitstream_t* stream, struct dinServiceType* dinServiceType) { + int grammarID = 181; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 181: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinServiceTagType(stream, &dinServiceType->ServiceTag ); + } + grammarID = 182; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 182: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinServiceType->FreeService); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Service{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinServiceTagListType(bitstream_t* stream, struct dinServiceTagListType* dinServiceTagListType) { + int grammarID = 183; + int done = 0; + + unsigned int dinServiceTagListType_Service_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 183: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service)] */ + if (dinServiceTagListType_Service_currArrayIndex < dinServiceTagListType->Service.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinServiceType(stream, &dinServiceTagListType->Service.array [dinServiceTagListType_Service_currArrayIndex++]); + } + grammarID = 184; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 184: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Service), END_ELEMENT] */ + if (dinServiceTagListType_Service_currArrayIndex < dinServiceTagListType->Service.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinServiceType(stream, &dinServiceTagListType->Service.array [dinServiceTagListType_Service_currArrayIndex++]); + } + grammarID = 184; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEStatusType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +static int encode_dinEVSEStatusType(bitstream_t* stream, struct dinEVSEStatusType* dinEVSEStatusType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":DateTimeNow{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinSessionSetupResType(bitstream_t* stream, struct dinSessionSetupResType* dinSessionSetupResType) { + int grammarID = 185; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 185: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinSessionSetupResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 186; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 186: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_HEX]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSessionSetupResType->EVSEID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinSessionSetupResType->EVSEID.bytes, dinSessionSetupResType->EVSEID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 187; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 187: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DateTimeNow), END_ELEMENT] */ + if ( dinSessionSetupResType->DateTimeNow_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, dinSessionSetupResType->DateTimeNow); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVPowerDeliveryParameterType', base type name='anyType', content type='EMPTY', isAbstract='true', hasTypeId='false', final='0', block='0', derivedBy='RESTRICTION'. */ +static int encode_dinEVPowerDeliveryParameterType(bitstream_t* stream, struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType) { + int grammarID = 64; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 64: + /* FirstStartTag[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)', derivedBy='RESTRICTION'. */ +static int encode_dinX509IssuerSerialType(bitstream_t* stream, struct dinX509IssuerSerialType* dinX509IssuerSerialType) { + int grammarID = 188; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 188: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509IssuerName)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinX509IssuerSerialType->X509IssuerName.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinX509IssuerSerialType->X509IssuerName.characters, dinX509IssuerSerialType->X509IssuerName.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 189; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 189: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509SerialNumber)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, dinX509IssuerSerialType->X509SerialNumber); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID{0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinSelectedServiceType(bitstream_t* stream, struct dinSelectedServiceType* dinSelectedServiceType) { + int grammarID = 190; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 190: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, dinSelectedServiceType->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 191; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 191: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSetID), END_ELEMENT] */ + if ( dinSelectedServiceType->ParameterSetID_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinSelectedServiceType->ParameterSetID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)', derivedBy='EXTENSION'. */ +static int encode_dinMeteringReceiptResType(bitstream_t* stream, struct dinMeteringReceiptResType* dinMeteringReceiptResType) { + int grammarID = 192; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 192: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinMeteringReceiptResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 54; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 54: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}AC_EVSEStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinAC_EVSEStatusType(stream, &dinMeteringReceiptResType->AC_EVSEStatus ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType', base type name='EVStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)', derivedBy='EXTENSION'. */ +static int encode_dinDC_EVStatusType(bitstream_t* stream, struct dinDC_EVStatusType* dinDC_EVStatusType) { + int grammarID = 193; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 193: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVReady)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinDC_EVStatusType->EVReady); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 194; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 194: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVCabinConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + if ( dinDC_EVStatusType->EVCabinConditioning_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinDC_EVStatusType->EVCabinConditioning); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 195; + } else if ( dinDC_EVStatusType->EVRESSConditioning_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinDC_EVStatusType->EVRESSConditioning); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 196; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVStatusType->EVErrorCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 197; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 195: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSConditioning), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + if ( dinDC_EVStatusType->EVRESSConditioning_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinDC_EVStatusType->EVRESSConditioning); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 196; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVStatusType->EVErrorCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 197; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 196: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVErrorCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVStatusType->EVErrorCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 197; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 197: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVRESSSOC)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 7, (uint32_t)(dinDC_EVStatusType->EVRESSSOC - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)', derivedBy='RESTRICTION'. */ +static int encode_dinPhysicalValueType(bitstream_t* stream, struct dinPhysicalValueType* dinPhysicalValueType) { + int grammarID = 198; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 198: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Multiplier)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 3, (uint32_t)(dinPhysicalValueType->Multiplier + 3)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 199; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 199: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Unit), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + if ( dinPhysicalValueType->Unit_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 4, dinPhysicalValueType->Unit); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 200; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinPhysicalValueType->Value); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 200: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Value)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinPhysicalValueType->Value); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ManifestType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinManifestType(bitstream_t* stream, struct dinManifestType* dinManifestType) { + int grammarID = 201; + int done = 0; + + unsigned int dinManifestType_Reference_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 201: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + if ( dinManifestType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinManifestType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinManifestType->Id.characters, dinManifestType->Id.charactersLen); + } + } + grammarID = 202; + } else if (dinManifestType_Reference_currArrayIndex < dinManifestType->Reference.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinReferenceType(stream, &dinManifestType->Reference.array [dinManifestType_Reference_currArrayIndex++]); + } + grammarID = 203; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 202: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + if (dinManifestType_Reference_currArrayIndex < dinManifestType->Reference.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinReferenceType(stream, &dinManifestType->Reference.array [dinManifestType_Reference_currArrayIndex++]); + } + grammarID = 203; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 203: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + if (dinManifestType_Reference_currArrayIndex < dinManifestType->Reference.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinReferenceType(stream, &dinManifestType->Reference.array [dinManifestType_Reference_currArrayIndex++]); + } + grammarID = 203; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleEntryType', base type name='EntryType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":PMax))', derivedBy='EXTENSION'. */ +static int encode_dinPMaxScheduleEntryType(bitstream_t* stream, struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType) { + int grammarID = 204; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 204: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RelativeTimeInterval), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TimeInterval)] */ + if ( dinPMaxScheduleEntryType->RelativeTimeInterval_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinRelativeTimeIntervalType(stream, &dinPMaxScheduleEntryType->RelativeTimeInterval ); + } + grammarID = 205; + } else if ( dinPMaxScheduleEntryType->TimeInterval_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinIntervalType(stream, &dinPMaxScheduleEntryType->TimeInterval ); + } + grammarID = 205; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 205: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMax)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinPMaxScheduleEntryType->PMax); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceParameterListType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSet{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinServiceParameterListType(bitstream_t* stream, struct dinServiceParameterListType* dinServiceParameterListType) { + int grammarID = 206; + int done = 0; + + unsigned int dinServiceParameterListType_ParameterSet_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 206: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet)] */ + if (dinServiceParameterListType_ParameterSet_currArrayIndex < dinServiceParameterListType->ParameterSet.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinParameterSetType(stream, &dinServiceParameterListType->ParameterSet.array [dinServiceParameterListType_ParameterSet_currArrayIndex++]); + } + grammarID = 207; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 207: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ParameterSet), END_ELEMENT] */ + if (dinServiceParameterListType_ParameterSet_currArrayIndex < dinServiceParameterListType->ParameterSet.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinParameterSetType(stream, &dinServiceParameterListType->ParameterSet.array [dinServiceParameterListType_ParameterSet_currArrayIndex++]); + } + grammarID = 207; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType', base type name='base64Binary', content type='SIMPLE', isAbstract='false', hasTypeId='false', final='0', block='0', derivedBy='EXTENSION'. */ +static int encode_dinSignatureValueType(bitstream_t* stream, struct dinSignatureValueType* dinSignatureValueType) { + int grammarID = 208; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 208: + /* FirstStartTag[ATTRIBUTE[STRING](Id), CHARACTERS[BINARY_BASE64]] */ + if ( dinSignatureValueType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureValueType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignatureValueType->Id.characters, dinSignatureValueType->Id.charactersLen); + } + } + grammarID = 209; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureValueType->CONTENT.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinSignatureValueType->CONTENT.bytes, dinSignatureValueType->CONTENT.bytesLen); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 209: + /* StartTag[CHARACTERS[BINARY_BASE64]] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignatureValueType->CONTENT.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinSignatureValueType->CONTENT.bytes, dinSignatureValueType->CONTENT.bytesLen); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PaymentOptionsType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PaymentOption{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinPaymentOptionsType(bitstream_t* stream, struct dinPaymentOptionsType* dinPaymentOptionsType) { + int grammarID = 210; + int done = 0; + + unsigned int dinPaymentOptionsType_PaymentOption_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 210: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption)] */ + if (dinPaymentOptionsType_PaymentOption_currArrayIndex < dinPaymentOptionsType->PaymentOption.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, dinPaymentOptionsType->PaymentOption.array[dinPaymentOptionsType_PaymentOption_currArrayIndex++]); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 211; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 211: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PaymentOption), END_ELEMENT] */ + if (dinPaymentOptionsType_PaymentOption_currArrayIndex < dinPaymentOptionsType->PaymentOption.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, dinPaymentOptionsType->PaymentOption.array[dinPaymentOptionsType_PaymentOption_currArrayIndex++]); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 211; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinServiceTagType(bitstream_t* stream, struct dinServiceTagType* dinServiceTagType) { + int grammarID = 212; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 212: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, dinServiceTagType->ServiceID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 213; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 213: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceName), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory)] */ + if ( dinServiceTagType->ServiceName_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + 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)(dinServiceTagType->ServiceName.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinServiceTagType->ServiceName.characters, dinServiceTagType->ServiceName.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 214; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, dinServiceTagType->ServiceCategory); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 215; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 214: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceCategory)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, dinServiceTagType->ServiceCategory); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 215; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 215: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceScope), END_ELEMENT] */ + if ( dinServiceTagType->ServiceScope_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + 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)(dinServiceTagType->ServiceScope.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinServiceTagType->ServiceScope.characters, dinServiceTagType->ServiceScope.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ +static int encode_dinAC_EVSEStatusType(bitstream_t* stream, struct dinAC_EVSEStatusType* dinAC_EVSEStatusType) { + int grammarID = 216; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 216: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PowerSwitchClosed)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinAC_EVSEStatusType->PowerSwitchClosed); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 217; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 217: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}RCD)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinAC_EVSEStatusType->RCD); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 218; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 218: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NotificationMaxDelay)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, dinAC_EVSEStatusType->NotificationMaxDelay); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 219; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 219: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSENotification)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, dinAC_EVSEStatusType->EVSENotification); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)', derivedBy='EXTENSION'. */ +static int encode_dinCertificateUpdateReqType(bitstream_t* stream, struct dinCertificateUpdateReqType* dinCertificateUpdateReqType) { + int grammarID = 220; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 220: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( dinCertificateUpdateReqType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateReqType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCertificateUpdateReqType->Id.characters, dinCertificateUpdateReqType->Id.charactersLen); + } + } + grammarID = 221; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinCertificateChainType(stream, &dinCertificateUpdateReqType->ContractSignatureCertChain ); + } + grammarID = 222; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 221: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinCertificateChainType(stream, &dinCertificateUpdateReqType->ContractSignatureCertChain ); + } + grammarID = 222; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 222: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + 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)(dinCertificateUpdateReqType->ContractID.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCertificateUpdateReqType->ContractID.characters, dinCertificateUpdateReqType->ContractID.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 135; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 135: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ListOfRootCertificateIDs)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinListOfRootCertificateIDsType(stream, &dinCertificateUpdateReqType->ListOfRootCertificateIDs ); + } + grammarID = 136; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 136: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateUpdateReqType->DHParams.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinCertificateUpdateReqType->DHParams.bytes, dinCertificateUpdateReqType->DHParams.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)', derivedBy='EXTENSION'. */ +static int encode_dinServicePaymentSelectionResType(bitstream_t* stream, struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType) { + int grammarID = 223; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 223: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinServicePaymentSelectionResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SAScheduleTupleType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxSchedule,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariff{0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinSAScheduleTupleType(bitstream_t* stream, struct dinSAScheduleTupleType* dinSAScheduleTupleType) { + int grammarID = 224; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 224: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinSAScheduleTupleType->SAScheduleTupleID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 225; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 225: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}PMaxSchedule)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPMaxScheduleType(stream, &dinSAScheduleTupleType->PMaxSchedule ); + } + grammarID = 226; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 226: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariff), END_ELEMENT] */ + if ( dinSAScheduleTupleType->SalesTariff_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinSalesTariffType(stream, &dinSAScheduleTupleType->SalesTariff ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ChargingProfileType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinChargingProfileType(bitstream_t* stream, struct dinChargingProfileType* dinChargingProfileType) { + int grammarID = 227; + int done = 0; + + unsigned int dinChargingProfileType_ProfileEntry_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 227: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SAScheduleTupleID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinChargingProfileType->SAScheduleTupleID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 228; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 228: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry)] */ + if (dinChargingProfileType_ProfileEntry_currArrayIndex < dinChargingProfileType->ProfileEntry.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinProfileEntryType(stream, &dinChargingProfileType->ProfileEntry.array [dinChargingProfileType_ProfileEntry_currArrayIndex++]); + } + grammarID = 229; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 229: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ProfileEntry), END_ELEMENT] */ + if (dinChargingProfileType_ProfileEntry_currArrayIndex < dinChargingProfileType->ProfileEntry.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinProfileEntryType(stream, &dinChargingProfileType->ProfileEntry.array [dinChargingProfileType_ProfileEntry_currArrayIndex++]); + } + grammarID = 229; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ServiceScope{0-1},"urn:iso:15118:2:2010:MsgBody":ServiceCategory{0-1})', derivedBy='EXTENSION'. */ +static int encode_dinServiceDiscoveryReqType(bitstream_t* stream, struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType) { + int grammarID = 230; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 230: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceScope), START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + if ( dinServiceDiscoveryReqType->ServiceScope_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + 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)(dinServiceDiscoveryReqType->ServiceScope.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinServiceDiscoveryReqType->ServiceScope.characters, dinServiceDiscoveryReqType->ServiceScope.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 231; + } else if ( dinServiceDiscoveryReqType->ServiceCategory_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, dinServiceDiscoveryReqType->ServiceCategory); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 231: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ServiceCategory), END_ELEMENT] */ + if ( dinServiceDiscoveryReqType->ServiceCategory_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, dinServiceDiscoveryReqType->ServiceCategory); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEChargeParameterType', base type name='EVSEChargeParameterType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinCurrent)', derivedBy='EXTENSION'. */ +static int encode_dinAC_EVSEChargeParameterType(bitstream_t* stream, struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType) { + int grammarID = 232; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 232: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}AC_EVSEStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinAC_EVSEStatusType(stream, &dinAC_EVSEChargeParameterType->AC_EVSEStatus ); + } + grammarID = 233; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 233: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxVoltage)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinAC_EVSEChargeParameterType->EVSEMaxVoltage ); + } + grammarID = 234; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 234: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMaxCurrent)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinAC_EVSEChargeParameterType->EVSEMaxCurrent ); + } + grammarID = 235; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 235: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEMinCurrent)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinAC_EVSEChargeParameterType->EVSEMinCurrent ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ +static int encode_dinKeyInfoType(bitstream_t* stream, struct dinKeyInfoType* dinKeyInfoType) { + int grammarID = 236; + int done = 0; + int wcDone = 0; + + unsigned int dinKeyInfoType_KeyName_currArrayIndex = 0; + unsigned int dinKeyInfoType_KeyValue_currArrayIndex = 0; + unsigned int dinKeyInfoType_RetrievalMethod_currArrayIndex = 0; + unsigned int dinKeyInfoType_X509Data_currArrayIndex = 0; + unsigned int dinKeyInfoType_PGPData_currArrayIndex = 0; + unsigned int dinKeyInfoType_SPKIData_currArrayIndex = 0; + unsigned int dinKeyInfoType_MgmtData_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 236: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if ( dinKeyInfoType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 4, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->Id.characters, dinKeyInfoType->Id.charactersLen); + } + } + grammarID = 237; + } else if (dinKeyInfoType_KeyName_currArrayIndex < dinKeyInfoType->KeyName.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 1); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].characters, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen); + dinKeyInfoType_KeyName_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 238; + } else if (dinKeyInfoType_KeyValue_currArrayIndex < dinKeyInfoType->KeyValue.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 2); + if(errn == 0) { + errn = encode_dinKeyValueType(stream, &dinKeyInfoType->KeyValue.array [dinKeyInfoType_KeyValue_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_RetrievalMethod_currArrayIndex < dinKeyInfoType->RetrievalMethod.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 3); + if(errn == 0) { + errn = encode_dinRetrievalMethodType(stream, &dinKeyInfoType->RetrievalMethod.array [dinKeyInfoType_RetrievalMethod_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_X509Data_currArrayIndex < dinKeyInfoType->X509Data.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 4); + if(errn == 0) { + errn = encode_dinX509DataType(stream, &dinKeyInfoType->X509Data.array [dinKeyInfoType_X509Data_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_PGPData_currArrayIndex < dinKeyInfoType->PGPData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 5); + if(errn == 0) { + errn = encode_dinPGPDataType(stream, &dinKeyInfoType->PGPData.array [dinKeyInfoType_PGPData_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_SPKIData_currArrayIndex < dinKeyInfoType->SPKIData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 6); + if(errn == 0) { + errn = encode_dinSPKIDataType(stream, &dinKeyInfoType->SPKIData.array [dinKeyInfoType_SPKIData_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_MgmtData_currArrayIndex < dinKeyInfoType->MgmtData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 7); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].characters, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen); + dinKeyInfoType_MgmtData_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 238; } else if (1==0) { errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 238; + } else if ( dinKeyInfoType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 4, 9); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->ANY.characters, dinKeyInfoType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 239; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 237: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (dinKeyInfoType_KeyName_currArrayIndex < dinKeyInfoType->KeyName.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].characters, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen); + dinKeyInfoType_KeyName_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 238; + } else if (dinKeyInfoType_KeyValue_currArrayIndex < dinKeyInfoType->KeyValue.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 1); + if(errn == 0) { + errn = encode_dinKeyValueType(stream, &dinKeyInfoType->KeyValue.array [dinKeyInfoType_KeyValue_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_RetrievalMethod_currArrayIndex < dinKeyInfoType->RetrievalMethod.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 2); + if(errn == 0) { + errn = encode_dinRetrievalMethodType(stream, &dinKeyInfoType->RetrievalMethod.array [dinKeyInfoType_RetrievalMethod_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_X509Data_currArrayIndex < dinKeyInfoType->X509Data.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 3); + if(errn == 0) { + errn = encode_dinX509DataType(stream, &dinKeyInfoType->X509Data.array [dinKeyInfoType_X509Data_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_PGPData_currArrayIndex < dinKeyInfoType->PGPData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 4); + if(errn == 0) { + errn = encode_dinPGPDataType(stream, &dinKeyInfoType->PGPData.array [dinKeyInfoType_PGPData_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_SPKIData_currArrayIndex < dinKeyInfoType->SPKIData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 5); + if(errn == 0) { + errn = encode_dinSPKIDataType(stream, &dinKeyInfoType->SPKIData.array [dinKeyInfoType_SPKIData_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_MgmtData_currArrayIndex < dinKeyInfoType->MgmtData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 6); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].characters, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen); + dinKeyInfoType_MgmtData_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 238; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 238; + } else if ( dinKeyInfoType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 4, 8); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->ANY.characters, dinKeyInfoType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 239; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 238: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (dinKeyInfoType_KeyName_currArrayIndex < dinKeyInfoType->KeyName.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].characters, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen); + dinKeyInfoType_KeyName_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 238; + } else if (dinKeyInfoType_KeyValue_currArrayIndex < dinKeyInfoType->KeyValue.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 1); + if(errn == 0) { + errn = encode_dinKeyValueType(stream, &dinKeyInfoType->KeyValue.array [dinKeyInfoType_KeyValue_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_RetrievalMethod_currArrayIndex < dinKeyInfoType->RetrievalMethod.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 2); + if(errn == 0) { + errn = encode_dinRetrievalMethodType(stream, &dinKeyInfoType->RetrievalMethod.array [dinKeyInfoType_RetrievalMethod_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_X509Data_currArrayIndex < dinKeyInfoType->X509Data.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 3); + if(errn == 0) { + errn = encode_dinX509DataType(stream, &dinKeyInfoType->X509Data.array [dinKeyInfoType_X509Data_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_PGPData_currArrayIndex < dinKeyInfoType->PGPData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 4); + if(errn == 0) { + errn = encode_dinPGPDataType(stream, &dinKeyInfoType->PGPData.array [dinKeyInfoType_PGPData_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_SPKIData_currArrayIndex < dinKeyInfoType->SPKIData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 5); + if(errn == 0) { + errn = encode_dinSPKIDataType(stream, &dinKeyInfoType->SPKIData.array [dinKeyInfoType_SPKIData_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_MgmtData_currArrayIndex < dinKeyInfoType->MgmtData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 6); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].characters, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen); + dinKeyInfoType_MgmtData_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 238; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 238; + } else if ( dinKeyInfoType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 4, 8); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinKeyInfoType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 4, 9); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->ANY.characters, dinKeyInfoType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 238; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 239: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyName), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}KeyValue), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}RetrievalMethod), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}X509Data), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SPKIData), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}MgmtData), START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (dinKeyInfoType_KeyName_currArrayIndex < dinKeyInfoType->KeyName.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].characters, dinKeyInfoType->KeyName.array[dinKeyInfoType_KeyName_currArrayIndex].charactersLen); + dinKeyInfoType_KeyName_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 238; + } else if (dinKeyInfoType_KeyValue_currArrayIndex < dinKeyInfoType->KeyValue.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 1); + if(errn == 0) { + errn = encode_dinKeyValueType(stream, &dinKeyInfoType->KeyValue.array [dinKeyInfoType_KeyValue_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_RetrievalMethod_currArrayIndex < dinKeyInfoType->RetrievalMethod.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 2); + if(errn == 0) { + errn = encode_dinRetrievalMethodType(stream, &dinKeyInfoType->RetrievalMethod.array [dinKeyInfoType_RetrievalMethod_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_X509Data_currArrayIndex < dinKeyInfoType->X509Data.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 3); + if(errn == 0) { + errn = encode_dinX509DataType(stream, &dinKeyInfoType->X509Data.array [dinKeyInfoType_X509Data_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_PGPData_currArrayIndex < dinKeyInfoType->PGPData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 4); + if(errn == 0) { + errn = encode_dinPGPDataType(stream, &dinKeyInfoType->PGPData.array [dinKeyInfoType_PGPData_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_SPKIData_currArrayIndex < dinKeyInfoType->SPKIData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 5); + if(errn == 0) { + errn = encode_dinSPKIDataType(stream, &dinKeyInfoType->SPKIData.array [dinKeyInfoType_SPKIData_currArrayIndex++]); + } + grammarID = 238; + } else if (dinKeyInfoType_MgmtData_currArrayIndex < dinKeyInfoType->MgmtData.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 4, 6); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[STRING]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].characters, dinKeyInfoType->MgmtData.array[dinKeyInfoType_MgmtData_currArrayIndex].charactersLen); + dinKeyInfoType_MgmtData_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 238; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 238; + } else if ( dinKeyInfoType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 4, 8); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinKeyInfoType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinKeyInfoType->ANY.characters, dinKeyInfoType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 239; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsReqType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain)', derivedBy='EXTENSION'. */ +static int encode_dinPaymentDetailsReqType(bitstream_t* stream, struct dinPaymentDetailsReqType* dinPaymentDetailsReqType) { + int grammarID = 240; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 240: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + 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)(dinPaymentDetailsReqType->ContractID.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinPaymentDetailsReqType->ContractID.characters, dinPaymentDetailsReqType->ContractID.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 241; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 241: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinCertificateChainType(stream, &dinPaymentDetailsReqType->ContractSignatureCertChain ); + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)', derivedBy='EXTENSION'. */ +static int encode_dinCableCheckResType(bitstream_t* stream, struct dinCableCheckResType* dinCableCheckResType) { + int grammarID = 242; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 242: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinCableCheckResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 243; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 243: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DC_EVSEStatus)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinDC_EVSEStatusType(stream, &dinCableCheckResType->DC_EVSEStatus ); + } + grammarID = 17; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 17: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}EVSEProcessing)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 1, dinCableCheckResType->EVSEProcessing); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##any])){0-UNBOUNDED}', derivedBy='RESTRICTION'. */ +static int encode_dinObjectType(bitstream_t* stream, struct dinObjectType* dinObjectType) { + int grammarID = 244; + int done = 0; + int wcDone = 0; + + + while(!done) { + switch(grammarID) { + case 244: + /* FirstStartTag[ATTRIBUTE[STRING](Encoding), ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( dinObjectType->Encoding_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->Encoding.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->Encoding.characters, dinObjectType->Encoding.charactersLen); + } + } + grammarID = 245; + } else if ( dinObjectType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->Id.characters, dinObjectType->Id.charactersLen); + } + } + grammarID = 246; + } else if ( dinObjectType->MimeType_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->MimeType.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->MimeType.characters, dinObjectType->MimeType.charactersLen); + } + } + grammarID = 19; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinObjectType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 3, 4); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinObjectType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 5); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->ANY.characters, dinObjectType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 245: + /* StartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( dinObjectType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->Id.characters, dinObjectType->Id.charactersLen); + } + } + grammarID = 246; + } else if ( dinObjectType->MimeType_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->MimeType.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->MimeType.characters, dinObjectType->MimeType.charactersLen); + } + } + grammarID = 19; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinObjectType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinObjectType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 4); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->ANY.characters, dinObjectType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 246: + /* StartTag[ATTRIBUTE[STRING](MimeType), START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if ( dinObjectType->MimeType_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->MimeType.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->MimeType.characters, dinObjectType->MimeType.charactersLen); + } + } + grammarID = 19; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinObjectType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinObjectType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->ANY.characters, dinObjectType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 19: + /* StartTag[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinObjectType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinObjectType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->ANY.characters, dinObjectType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 20: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinObjectType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinObjectType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinObjectType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinObjectType->ANY.characters, dinObjectType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)', derivedBy='EXTENSION'. */ +static int encode_dinSessionStopResType(bitstream_t* stream, struct dinSessionStopResType* dinSessionStopResType) { + int grammarID = 223; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 223: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinSessionStopResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinSignedInfoType(bitstream_t* stream, struct dinSignedInfoType* dinSignedInfoType) { + int grammarID = 247; + int done = 0; + + unsigned int dinSignedInfoType_Reference_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 247: + /* FirstStartTag[ATTRIBUTE[STRING](Id), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + if ( dinSignedInfoType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignedInfoType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignedInfoType->Id.characters, dinSignedInfoType->Id.charactersLen); + } + } + grammarID = 248; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinCanonicalizationMethodType(stream, &dinSignedInfoType->CanonicalizationMethod ); + } + grammarID = 249; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 248: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinCanonicalizationMethodType(stream, &dinSignedInfoType->CanonicalizationMethod ); + } + grammarID = 249; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 249: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}SignatureMethod)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinSignatureMethodType(stream, &dinSignedInfoType->SignatureMethod ); + } + grammarID = 250; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 250: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference)] */ + if (dinSignedInfoType_Reference_currArrayIndex < dinSignedInfoType->Reference.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinReferenceType(stream, &dinSignedInfoType->Reference.array [dinSignedInfoType_Reference_currArrayIndex++]); + } + grammarID = 203; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 203: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Reference), END_ELEMENT] */ + if (dinSignedInfoType_Reference_currArrayIndex < dinSignedInfoType->Reference.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinReferenceType(stream, &dinSignedInfoType->Reference.array [dinSignedInfoType_Reference_currArrayIndex++]); + } + grammarID = 203; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2010:MsgDataTypes":NumEPriceLevels,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinSalesTariffType(bitstream_t* stream, struct dinSalesTariffType* dinSalesTariffType) { + int grammarID = 251; + int done = 0; + + unsigned int dinSalesTariffType_SalesTariffEntry_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 251: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSalesTariffType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSalesTariffType->Id.characters, dinSalesTariffType->Id.charactersLen); + } + } + grammarID = 252; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 252: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinSalesTariffType->SalesTariffID); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 253; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 253: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffDescription), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + if ( dinSalesTariffType->SalesTariffDescription_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + 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)(dinSalesTariffType->SalesTariffDescription.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSalesTariffType->SalesTariffDescription.characters, dinSalesTariffType->SalesTariffDescription.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 254; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(dinSalesTariffType->NumEPriceLevels - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 255; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 254: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NumEPriceLevels)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(dinSalesTariffType->NumEPriceLevels - 0)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 255; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 255: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry)] */ + if (dinSalesTariffType_SalesTariffEntry_currArrayIndex < dinSalesTariffType->SalesTariffEntry.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinSalesTariffEntryType(stream, &dinSalesTariffType->SalesTariffEntry.array [dinSalesTariffType_SalesTariffEntry_currArrayIndex++]); + } + grammarID = 256; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 256: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SalesTariffEntry), END_ELEMENT] */ + if (dinSalesTariffType_SalesTariffEntry_currArrayIndex < dinSalesTariffType->SalesTariffEntry.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinSalesTariffEntryType(stream, &dinSalesTariffType->SalesTariffEntry.array [dinSalesTariffType_SalesTariffEntry_currArrayIndex++]); + } + grammarID = 256; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CostType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":costKind,"urn:iso:15118:2:2010:MsgDataTypes":amount,"urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier{0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinCostType(bitstream_t* stream, struct dinCostType* dinCostType) { + int grammarID = 257; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 257: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}costKind)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, dinCostType->costKind); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 258; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 258: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amount)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, dinCostType->amount); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 259; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 259: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}amountMultiplier), END_ELEMENT] */ + if ( dinCostType->amountMultiplier_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 3, (uint32_t)(dinCostType->amountMultiplier + 3)); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceChargeType', base type name='ServiceType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService),("urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType))', derivedBy='EXTENSION'. */ +static int encode_dinServiceChargeType(bitstream_t* stream, struct dinServiceChargeType* dinServiceChargeType) { + int grammarID = 260; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 260: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}ServiceTag)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinServiceTagType(stream, &dinServiceChargeType->ServiceTag ); + } + grammarID = 261; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 261: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FreeService)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BOOLEAN]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeBoolean(stream, dinServiceChargeType->FreeService); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 262; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 262: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EnergyTransferType)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 4, dinServiceChargeType->EnergyTransferType); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType', base type name='EVSEStatusType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)', derivedBy='EXTENSION'. */ +static int encode_dinDC_EVSEStatusType(bitstream_t* stream, struct dinDC_EVSEStatusType* dinDC_EVSEStatusType) { + int grammarID = 263; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 263: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEIsolationStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + if ( dinDC_EVSEStatusType->EVSEIsolationStatus_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, dinDC_EVSEStatusType->EVSEIsolationStatus); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 264; + } else if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVSEStatusType->EVSEStatusCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 218; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 264: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSEStatusCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 4, dinDC_EVSEStatusType->EVSEStatusCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 218; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 218: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}NotificationMaxDelay)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger32(stream, dinDC_EVSEStatusType->NotificationMaxDelay); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 219; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 219: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}EVSENotification)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, dinDC_EVSEStatusType->EVSENotification); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinRetrievalMethodType(bitstream_t* stream, struct dinRetrievalMethodType* dinRetrievalMethodType) { + int grammarID = 265; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 265: + /* FirstStartTag[ATTRIBUTE[STRING](Type), ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( dinRetrievalMethodType->Type_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRetrievalMethodType->Type.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinRetrievalMethodType->Type.characters, dinRetrievalMethodType->Type.charactersLen); + } + } + grammarID = 266; + } else if ( dinRetrievalMethodType->URI_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRetrievalMethodType->URI.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinRetrievalMethodType->URI.characters, dinRetrievalMethodType->URI.charactersLen); + } + } + grammarID = 267; + } else if ( dinRetrievalMethodType->Transforms_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + errn = encode_dinTransformsType(stream, &dinRetrievalMethodType->Transforms ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 266: + /* StartTag[ATTRIBUTE[STRING](URI), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( dinRetrievalMethodType->URI_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinRetrievalMethodType->URI.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinRetrievalMethodType->URI.characters, dinRetrievalMethodType->URI.charactersLen); + } + } + grammarID = 267; + } else if ( dinRetrievalMethodType->Transforms_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + errn = encode_dinTransformsType(stream, &dinRetrievalMethodType->Transforms ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 267: + /* StartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}Transforms), END_ELEMENT] */ + if ( dinRetrievalMethodType->Transforms_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + errn = encode_dinTransformsType(stream, &dinRetrievalMethodType->Transforms ); + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,NotificationType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":FaultCode,"urn:iso:15118:2:2010:MsgDataTypes":FaultMsg{0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinNotificationType(bitstream_t* stream, struct dinNotificationType* dinNotificationType) { + int grammarID = 268; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 268: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 2, dinNotificationType->FaultCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 269; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 269: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}FaultMsg), END_ELEMENT] */ + if ( dinNotificationType->FaultMsg_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + 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)(dinNotificationType->FaultMsg.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinNotificationType->FaultMsg.characters, dinNotificationType->FaultMsg.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))', derivedBy='RESTRICTION'. */ +static int encode_dinPGPDataType(bitstream_t* stream, struct dinPGPDataType* dinPGPDataType) { + int grammarID = 270; + int done = 0; + int wcDone = 0; + + + while(!done) { + switch(grammarID) { + case 270: + /* FirstStartTag[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyID), START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket)] */ + if ( dinPGPDataType->PGPKeyID_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinPGPDataType->PGPKeyID.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinPGPDataType->PGPKeyID.bytes, dinPGPDataType->PGPKeyID.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 271; + } else if ( dinPGPDataType->PGPKeyPacket_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinPGPDataType->PGPKeyPacket.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinPGPDataType->PGPKeyPacket.bytes, dinPGPDataType->PGPKeyPacket.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 272; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 271: + /* Element[START_ELEMENT({http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket), START_ELEMENT_GENERIC, END_ELEMENT] */ + if ( dinPGPDataType->PGPKeyPacket_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinPGPDataType->PGPKeyPacket.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinPGPDataType->PGPKeyPacket.bytes, dinPGPDataType->PGPKeyPacket.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 272; + } else if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 272; + } else if ( dinPGPDataType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 272: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 272; + } else if ( dinPGPDataType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationResType', base type name='BodyBaseType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID)', derivedBy='EXTENSION'. */ +static int encode_dinCertificateInstallationResType(bitstream_t* stream, struct dinCertificateInstallationResType* dinCertificateInstallationResType) { + int grammarID = 273; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 273: + /* FirstStartTag[ATTRIBUTE[STRING](Id)] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationResType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCertificateInstallationResType->Id.characters, dinCertificateInstallationResType->Id.charactersLen); + } + } + grammarID = 274; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 274: + /* StartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ResponseCode)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[ENUMERATION]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeNBitUnsignedInteger(stream, 5, dinCertificateInstallationResType->ResponseCode); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 275; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 275: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureCertChain)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encode_dinCertificateChainType(stream, &dinCertificateInstallationResType->ContractSignatureCertChain ); + } + grammarID = 276; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 276: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractSignatureEncryptedPrivateKey)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationResType->ContractSignatureEncryptedPrivateKey.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinCertificateInstallationResType->ContractSignatureEncryptedPrivateKey.bytes, dinCertificateInstallationResType->ContractSignatureEncryptedPrivateKey.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 277; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 277: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}DHParams)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinCertificateInstallationResType->DHParams.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinCertificateInstallationResType->DHParams.bytes, dinCertificateInstallationResType->DHParams.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 278; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 278: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgBody}ContractID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + 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)(dinCertificateInstallationResType->ContractID.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinCertificateInstallationResType->ContractID.characters, dinCertificateInstallationResType->ContractID.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType', base type name='anyType', content type='MIXED', isAbstract='false', hasTypeId='false', final='0', block='0', particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}', derivedBy='RESTRICTION'. */ +static int encode_dinSignaturePropertyType(bitstream_t* stream, struct dinSignaturePropertyType* dinSignaturePropertyType) { + int grammarID = 279; + int done = 0; + int wcDone = 0; + + + while(!done) { + switch(grammarID) { + case 279: + /* FirstStartTag[ATTRIBUTE[STRING](Id), ATTRIBUTE[STRING](Target)] */ + if ( dinSignaturePropertyType->Id_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertyType->Id.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignaturePropertyType->Id.characters, dinSignaturePropertyType->Id.charactersLen); + } + } + grammarID = 280; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertyType->Target.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignaturePropertyType->Target.characters, dinSignaturePropertyType->Target.charactersLen); + } + } + grammarID = 281; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 280: + /* StartTag[ATTRIBUTE[STRING](Target)] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertyType->Target.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignaturePropertyType->Target.characters, dinSignaturePropertyType->Target.charactersLen); + } + } + grammarID = 281; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 281: + /* StartTag[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinSignaturePropertyType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertyType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignaturePropertyType->ANY.characters, dinSignaturePropertyType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 282; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 20: + /* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinSignaturePropertyType->ANY_isUsed == 0u || wcDone ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else if ( dinSignaturePropertyType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertyType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignaturePropertyType->ANY.characters, dinSignaturePropertyType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 20; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 282: + /* Element[START_ELEMENT_GENERIC, CHARACTERS_GENERIC[STRING]] */ + if (1==0) { + errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS; + grammarID = 20; + } else if ( dinSignaturePropertyType->ANY_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* encode string as string table miss (+2 len)*/ + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSignaturePropertyType->ANY.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinSignaturePropertyType->ANY.characters, dinSignaturePropertyType->ANY.charactersLen); + } + } + wcDone = 1; + grammarID = 282; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})', derivedBy='RESTRICTION'. */ +static int encode_dinMeterInfoType(bitstream_t* stream, struct dinMeterInfoType* dinMeterInfoType) { + int grammarID = 283; + int done = 0; + + + while(!done) { + switch(grammarID) { + case 283: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterID)] */ + if ( 1 == 1 ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + 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)(dinMeterInfoType->MeterID.charactersLen + 2)); + if (errn == 0) { + errn = encodeCharacters(stream, dinMeterInfoType->MeterID.characters, dinMeterInfoType->MeterID.charactersLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 284; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 284: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( dinMeterInfoType->MeterReading_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + errn = encode_dinPhysicalValueType(stream, &dinMeterInfoType->MeterReading ); + } + grammarID = 285; + } else if ( dinMeterInfoType->SigMeterReading_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeterInfoType->SigMeterReading.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinMeterInfoType->SigMeterReading.bytes, dinMeterInfoType->SigMeterReading.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 286; + } else if ( dinMeterInfoType->MeterStatus_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinMeterInfoType->MeterStatus); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 287; + } else if ( dinMeterInfoType->TMeter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, dinMeterInfoType->TMeter); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 3, 4); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 285: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}SigMeterReading), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( dinMeterInfoType->SigMeterReading_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinMeterInfoType->SigMeterReading.bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinMeterInfoType->SigMeterReading.bytes, dinMeterInfoType->SigMeterReading.bytesLen); + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 286; + } else if ( dinMeterInfoType->MeterStatus_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 1); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinMeterInfoType->MeterStatus); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 287; + } else if ( dinMeterInfoType->TMeter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 3, 2); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, dinMeterInfoType->TMeter); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 3, 3); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 286: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}MeterStatus), START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( dinMeterInfoType->MeterStatus_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger16(stream, dinMeterInfoType->MeterStatus); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 287; + } else if ( dinMeterInfoType->TMeter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, dinMeterInfoType->TMeter); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 2); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 287: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}TMeter), END_ELEMENT] */ + if ( dinMeterInfoType->TMeter_isUsed == 1u ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* First(xsi:type)StartTag[CHARACTERS[INTEGER]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeInteger64(stream, dinMeterInfoType->TMeter); + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 4; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + case 4: + /* Element[END_ELEMENT] */ + if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; + default: + errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; + break; + } + if(errn) { + done = 1; + } + } + return errn; +} + +/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SubCertificatesType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate{1-UNBOUNDED})', derivedBy='RESTRICTION'. */ +static int encode_dinSubCertificatesType(bitstream_t* stream, struct dinSubCertificatesType* dinSubCertificatesType) { + int grammarID = 288; + int done = 0; + + unsigned int dinSubCertificatesType_Certificate_currArrayIndex = 0; + + while(!done) { + switch(grammarID) { + case 288: + /* FirstStartTag[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate)] */ + if (dinSubCertificatesType_Certificate_currArrayIndex < dinSubCertificatesType->Certificate.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytes, dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytesLen); + dinSubCertificatesType_Certificate_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } grammarID = 289; } else { errn = EXI_ERROR_UNKOWN_EVENT; } break; + case 289: + /* Element[START_ELEMENT({urn:iso:15118:2:2010:MsgDataTypes}Certificate), END_ELEMENT] */ + if (dinSubCertificatesType_Certificate_currArrayIndex < dinSubCertificatesType->Certificate.arrayLen ) { + errn = encodeNBitUnsignedInteger(stream, 2, 0); + if(errn == 0) { + /* FirstStartTag[CHARACTERS[BINARY_BASE64]] */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + if(errn == 0) { + errn = encodeUnsignedInteger16(stream, (uint16_t)(dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytesLen)); + if (errn == 0) { + errn = encodeBytes(stream, dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytes, dinSubCertificatesType->Certificate.array[dinSubCertificatesType_Certificate_currArrayIndex].bytesLen); + dinSubCertificatesType_Certificate_currArrayIndex++; + } + /* valid EE */ + errn = encodeNBitUnsignedInteger(stream, 1, 0); + } + } + grammarID = 289; + } else if (1==1) { + errn = encodeNBitUnsignedInteger(stream, 2, 1); + if(errn == 0) { + done = 1; + } + grammarID = 5; + } else { + errn = EXI_ERROR_UNKOWN_EVENT; + } + break; default: errn = EXI_ERROR_UNKOWN_GRAMMAR_ID; break; @@ -10361,7 +10564,7 @@ int encode_dinExiDocument(bitstream_t* stream, struct dinEXIDocument* exiDoc) { return errn; } - + #if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { errn = writeEXIHeader(stream); @@ -12255,9 +12458,10 @@ int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag) { } return errn; -} +} #endif /* DEPLOY_DIN_CODEC_FRAGMENT */ + #endif /* DEPLOY_DIN_CODEC */ #endif diff --git a/src/din/dinEXIDatatypesEncoder.h b/src/din/dinEXIDatatypesEncoder.h index 12a6246..713db96 100644 --- a/src/din/dinEXIDatatypesEncoder.h +++ b/src/din/dinEXIDatatypesEncoder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2015 Siemens AG + * Copyright (C) 2007-2017 Siemens AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -18,8 +18,8 @@ /******************************************************************* * * @author Daniel.Peintner.EXT@siemens.com - * @version 0.9.3 - * @contact Joerg.Heuer@siemens.com + * @version 2017-09-05 + * @contact Richard.Kuntschke@siemens.com * *Code generated by EXIdizer
*Schema: V2G_CI_MsgDef.xsd
@@ -41,8 +41,9 @@ #ifdef __cplusplus extern "C" { #endif - -#include "dinEXIDatatypes.h" + + +#include "dinEXIDatatypes.h" #if DEPLOY_DIN_CODEC == SUPPORT_YES @@ -52,10 +53,10 @@ extern "C" { int encode_dinExiDocument(bitstream_t* stream, struct dinEXIDocument* exiDoc); - + #if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES -int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag); -#endif /* DEPLOY_DIN_CODEC_FRAGMENT */ +int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag); +#endif /* DEPLOY_DIN_CODEC_FRAGMENT */ #endif /* DEPLOY_DIN_CODEC */ diff --git a/src/iso1/iso1EXIDatatypes.c b/src/iso1/iso1EXIDatatypes.c index 87a0bf7..7c274fb 100644 --- a/src/iso1/iso1EXIDatatypes.c +++ b/src/iso1/iso1EXIDatatypes.c @@ -125,7 +125,7 @@ void init_iso1EXIDocument(struct iso1EXIDocument* exiDoc) { } -#if DEPLOY_ISO2_CODEC_FRAGMENT == SUPPORT_YES +#if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES void init_iso1EXIFragment(struct iso1EXIFragment* exiFrag) { exiFrag->ChargingComplete_isUsed = 0u; exiFrag->EVMaxVoltage_isUsed = 0u; @@ -428,7 +428,7 @@ void init_iso1EXIFragment(struct iso1EXIFragment* exiFrag) { exiFrag->RequestedEnergyTransferMode_isUsed = 0u; exiFrag->SessionID_isUsed = 0u; } -#endif /* DEPLOY_ISO2_CODEC_FRAGMENT */ +#endif /* DEPLOY_ISO1_CODEC_FRAGMENT */ void init_iso1IntervalType(struct iso1IntervalType* iso1IntervalType) { (void)iso1IntervalType; /* avoid unused warning */ diff --git a/src/iso1/iso1EXIDatatypes.h b/src/iso1/iso1EXIDatatypes.h index d0ba97b..15b34a2 100644 --- a/src/iso1/iso1EXIDatatypes.h +++ b/src/iso1/iso1EXIDatatypes.h @@ -45,7 +45,7 @@ extern "C" { #define SUPPORT_YES 1 #define SUPPORT_NO 2 #define DEPLOY_ISO1_CODEC SUPPORT_NO -#define DEPLOY_ISO1_CODEC_FRAGMENT SUPPORT_YES +#define DEPLOY_ISO1_CODEC_FRAGMENT SUPPORT_NO #if DEPLOY_ISO1_CODEC == SUPPORT_YES @@ -2238,7 +2238,7 @@ struct iso1EXIDocument { }; -#if DEPLOY_ISO2_CODEC_FRAGMENT == SUPPORT_YES +#if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES /* Possible elements of EXI Fragment */ struct iso1EXIFragment { #if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES @@ -2805,15 +2805,15 @@ struct iso1EXIFragment { int _warning_; }; -#endif /* DEPLOY_ISO2_CODEC_FRAGMENT */ +#endif /* DEPLOY_ISO1_CODEC_FRAGMENT */ /* Initialization methods for structs */ void init_iso1EXIDocument(struct iso1EXIDocument* exiDoc); -#if DEPLOY_ISO2_CODEC_FRAGMENT == SUPPORT_YES +#if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES void init_iso1EXIFragment(struct iso1EXIFragment* exiFrag); -#endif /* DEPLOY_ISO2_CODEC_FRAGMENT */ +#endif /* DEPLOY_ISO1_CODEC_FRAGMENT */ void init_iso1IntervalType(struct iso1IntervalType* iso1IntervalType); void init_iso1SASchedulesType(struct iso1SASchedulesType* iso1SASchedulesType); void init_iso1PaymentOptionListType(struct iso1PaymentOptionListType* iso1PaymentOptionListType);