diff --git a/src/appHandshake/appHand_dataTypes.c b/src/appHandshake/appHand_dataTypes.c index c457c91..0daa6f1 100644 --- a/src/appHandshake/appHand_dataTypes.c +++ b/src/appHandshake/appHand_dataTypes.c @@ -56,7 +56,7 @@ void init_AnonType_supportedAppProtocolReq(struct AnonType_supportedAppProtocolR } - void init_AnonType_supportedAppProtocolRes(struct AnonType_supportedAppProtocolRes* type) +void init_AnonType_supportedAppProtocolRes(struct AnonType_supportedAppProtocolRes* type) { type->isused.SchemaID=0; diff --git a/src/appHandshake/appHand_dataTypes.h b/src/appHandshake/appHand_dataTypes.h index 1fb079d..e39bd01 100644 --- a/src/appHandshake/appHand_dataTypes.h +++ b/src/appHandshake/appHand_dataTypes.h @@ -122,6 +122,7 @@ struct EXIDocumentType_appHand }; void init_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type); +void init_AnonType_supportedAppProtocolReq(struct AnonType_supportedAppProtocolReq* type); #endif diff --git a/src/service/v2g_serviceClientStubs.c b/src/service/v2g_serviceClientStubs.c index 2a53cf3..aef3436 100644 --- a/src/service/v2g_serviceClientStubs.c +++ b/src/service/v2g_serviceClientStubs.c @@ -3342,6 +3342,24 @@ static int deserializeMessage(struct EXIService* service) returnCode = exiDecodeAttribute(&(service->inStream), &(service->stateDecode), &(service->eqn), &(service->val)); returnCode = deserializeElementAttributeCharacter(service); break; + case START_ELEMENT_GENERIC: + break; + case START_ELEMENT_GENERIC_UNDECLARED: + break; + case END_ELEMENT_UNDECLARED: + break; + case CHARACTERS_GENERIC: + break; + case CHARACTERS_GENERIC_UNDECLARED: + break; + case ATTRIBUTE_GENERIC: + break; + case ATTRIBUTE_INVALID_VALUE: + break; + case ATTRIBUTE_ANY_INVALID_VALUE: + break; + case ATTRIBUTE_GENERIC_UNDECLARED: + break; default: /* ERROR */ return -1; diff --git a/src/test/evse_server.c b/src/test/evse_server.c index 11a1665..1e843f2 100644 --- a/src/test/evse_server.c +++ b/src/test/evse_server.c @@ -130,6 +130,7 @@ static int appHandshakeHandler(struct EXIDatabinder* appHandService, uint8_t* in struct AnonType_supportedAppProtocolRes resultHandshake; size_t i; + init_AnonType_supportedAppProtocolReq(&handshake); init_EXIDocumentType_appHand(&exiDoc); /* we expect a supportedAppProtocolReq */ diff --git a/src/test/evse_serviceMethods.c b/src/test/evse_serviceMethods.c index 6daca31..6ed15f7 100644 --- a/src/test/evse_serviceMethods.c +++ b/src/test/evse_serviceMethods.c @@ -455,8 +455,11 @@ int currentDemand(struct MessageHeaderType* header, struct CurrentDemandReqType* printf("\t\t EVMaximumCurrentLimit=%d\n", param->EVMaximumCurrentLimit.Value); printf("\t\t BulkChargingComplete=%d\n", param->BulkChargingComplete); printf("\t\t ChargingComplete=%d\n", param->ChargingComplete); - printf("\t\t RemainingTimeToFullSoC=%d\n", param->RemainingTimeToFullSoC.Value); - printf("\t\t RemainingTimeToBulkSoC=%d\n", param->RemainingTimeToBulkSoC.Value); + + if(param->isused.RemainingTimeToFullSoC) + printf("\t\t RemainingTimeToFullSoC=%d\n", param->RemainingTimeToFullSoC.Value); + if(param->isused.RemainingTimeToBulkSoC) + printf("\t\t RemainingTimeToBulkSoC=%d\n", param->RemainingTimeToBulkSoC.Value); printf("\t\t EVTargetVoltage=%d\n", param->EVTargetVoltage.Value); diff --git a/src/test/pev_service.c b/src/test/pev_service.c index 2143380..f2cd7f3 100644 --- a/src/test/pev_service.c +++ b/src/test/pev_service.c @@ -130,7 +130,7 @@ static int appHandshake() return -1; } - printf("EV side: Response of the EVSE \n"); + printf("\nEV side: Response of the EVSE \n"); if(resultHandshake.ResponseCode==OK_SuccessfulNegotiation_responseCodeType) { printf("\t\tResponseCode=OK_SuccessfulNegotiation\n"); @@ -231,7 +231,7 @@ static int ac_charging() prepare_sessionSetup(&service,&v2gHeader, &sessionSetup,&resultSessionSetup); - printf("EV side: call EVSE sessionSetup\n"); + printf("\n\n\n\nEV side: call EVSE sessionSetup\n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -250,7 +250,7 @@ static int ac_charging() if(resMsg==SESSIONSETUPRES) { /* show result of the answer message of EVSE sessionSetup */ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); printf("\tHeader SessionID="); printBinaryArray(v2gHeader.SessionID.data,v2gHeader.SessionID.arraylen.data ); printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode); @@ -272,7 +272,7 @@ static int ac_charging() prepare_serviceDiscovery(&service,&v2gHeader, &serviceDiscovery,&resultServiceDiscovery); - printf("EV side: call EVSE serviceDiscovery \n"); + printf("\n\nEV side: call EVSE serviceDiscovery \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -292,7 +292,7 @@ static int ac_charging() if(resMsg==SERVICEDISCOVERYRES) { /* show result of the answer message of EVSE serviceDiscovery */ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); printf("\tHeader SessionID="); printBinaryArray(v2gHeader.SessionID.data,v2gHeader.SessionID.arraylen.data ); printf("\t ResponseCode=%d\n",resultServiceDiscovery.ResponseCode); @@ -324,7 +324,7 @@ static int ac_charging() return 0; } - printf("EV side: call EVSE ServicePaymentSelection \n"); + printf("\n\nEV side: call EVSE ServicePaymentSelection \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -344,7 +344,7 @@ static int ac_charging() if(resMsg==SERVICEPAYMENTSELECTIONRES) { /* show result of the answer message of EVSE servicePaymentSelection */ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); printf("\tHeader SessionID="); printBinaryArray(v2gHeader.SessionID.data,v2gHeader.SessionID.arraylen.data ); printf("\t ResponseCode=%d\n",resultServicePayment.ResponseCode); @@ -354,7 +354,6 @@ static int ac_charging() /******************************************* * Setup data for chargeParameterDiscovery * *******************************************/ - printf("\n\nEV side: prepare EVSE chargeParameterDiscovery\n"); powerDiscovery.EVRequestedEnergyTransferType = AC_three_phase_core_EVRequestedEnergyTransferType; @@ -393,7 +392,7 @@ static int ac_charging() prepare_chargeParameterDiscovery(&service,&v2gHeader,&powerDiscovery,&resultPowerDiscovery); - printf("EV side: call EVSE chargeParameterDiscovery \n"); + printf("\n\nEV side: call EVSE chargeParameterDiscovery \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -415,7 +414,7 @@ static int ac_charging() { /* show result of the answer message of EVSE sessionSetup*/ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); printf("\tHeader SessionID="); printBinaryArray(v2gHeader.SessionID.data,v2gHeader.SessionID.arraylen.data ); printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode); @@ -438,7 +437,7 @@ static int ac_charging() prepare_powerDelivery(&service,&v2gHeader,&powerDelivery,&resultPowerDelivery); - printf("EV side: call EVSE powerDelivery \n"); + printf("\n\nEV side: call EVSE powerDelivery \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -459,7 +458,7 @@ static int ac_charging() { /* show result of the answer message of EVSE sessionSetup*/ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); printf("\tResponseCode=%d\n",resultPowerDelivery.ResponseCode); printACEVSEStatus(&evseStatus); } @@ -481,7 +480,7 @@ static int ac_charging() return 0; /* stop here */ } - printf("EV side: call EVSE chargingStatus \n"); + printf("\n\nEV side: call EVSE chargingStatus \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -501,7 +500,7 @@ static int ac_charging() if(resMsg==CHARGINGSTATUSRES) { /* show result of the answer message of EVSE sessionSetup*/ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); /* show result of the answer message of EVSE powerDiscovery*/ printf("\tResponseCode=%d\n",resultChargingStatus.ResponseCode); printACEVSEStatus(&evseStatus); @@ -531,7 +530,7 @@ static int ac_charging() return 0; /* stop here */ } - printf("EV side: call EVSE stopSession \n"); + printf("\n\nEV side: call EVSE stopSession \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -551,7 +550,7 @@ static int ac_charging() if(resMsg==SESSIONSTOPRES) { /* show result of the answer message of EVSE sessionSetup*/ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); /* show result of the answer message of EVSE powerDiscovery*/ printf("\tResponseCode=%d\n",resultSessionStop.ResponseCode); } @@ -658,15 +657,13 @@ static int dc_charging() sessionSetup.EVCCID.data[0]=10; sessionSetup.EVCCID.arraylen.data=1; - printf("EV side: prepare EVSE sessionSetup\n"); - /************************ * Prepare sessionSetup * ************************/ prepare_sessionSetup(&service,&v2gHeader, &sessionSetup,&resultSessionSetup); - printf("EV side: call EVSE sessionSetup\n"); + printf("\n\nEV side: call EVSE sessionSetup\n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -703,7 +700,6 @@ static int dc_charging() serviceDiscovery.isused.ServiceScope=0; - printf("\n\nEV side: prepare EVSE serviceDiscovery\n"); /**************************** * Prepare serviceDiscovery * @@ -711,7 +707,7 @@ static int dc_charging() prepare_serviceDiscovery(&service,&v2gHeader, &serviceDiscovery,&resultServiceDiscovery); - printf("EV side: call EVSE serviceDiscovery \n"); + printf("\n\nEV side: call EVSE serviceDiscovery \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -731,7 +727,7 @@ static int dc_charging() if(resMsg==SERVICEDISCOVERYRES) { /* show result of the answer message of EVSE sessionSetup */ - printf("\nEV side: received response message from EVSE\n"); + printf("\n\nEV side: received response message from EVSE\n"); printf("\tHeader SessionID="); printBinaryArray(v2gHeader.SessionID.data,v2gHeader.SessionID.arraylen.data ); printf("\t ResponseCode=%d\n",resultServiceDiscovery.ResponseCode); @@ -752,7 +748,6 @@ static int dc_charging() servicePayment.SelectedServiceList.SelectedService[0].isused.ParameterSetID=0; /* is not used */ servicePayment.SelectedServiceList.arraylen.SelectedService=1; /* only one service was selected */ - printf("\n\nEV side: prepare EVSE servicePaymentSelection\n"); /************************************** * Prepare ServicePaymentSelection * @@ -764,7 +759,7 @@ static int dc_charging() return 0; } - printf("EV side: call EVSE ServicePaymentSelection \n"); + printf("\n\nEV side: call EVSE ServicePaymentSelection \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -856,8 +851,6 @@ static int dc_charging() resultPowerDiscovery.SAScheduleList = &pmaxScheduleList; /* the EVSE can provide some PMax information; should be always assign here! */ - printf("\n\nEV side: prepare EVSE chargeParameterDiscovery\n"); - /************************************ * Prepare chargeParameterDiscovery * ************************************/ @@ -868,7 +861,7 @@ static int dc_charging() return 0; } - printf("EV side: call EVSE chargeParameterDiscovery \n"); + printf("\n\nEV side: call EVSE chargeParameterDiscovery \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -936,8 +929,6 @@ static int dc_charging() cableCheck.DC_EVStatus =EVStatus; - printf("\n\nEV side: prepare EVSE cableCheck\n"); - /********************** * Prepare cableCheck * **********************/ @@ -948,7 +939,7 @@ static int dc_charging() return 0; /* stop here */ } - printf("EV side: call EVSE cableCheck \n"); + printf("\n\nEV side: call EVSE cableCheck \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -968,7 +959,7 @@ static int dc_charging() if(resMsg==CABLECHECKRES) { /* show result of the answer message of EVSE sessionSetup*/ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); printf("\t\t Header SessionID=%d\n",v2gHeader.SessionID.data[0]); printf("\tResponseCode=%d\n",resultCableCheck.ResponseCode); printDCEVSEStatus(&(resultCableCheck.DC_EVSEStatus)); @@ -990,7 +981,6 @@ static int dc_charging() float_type.Value = 200; preCharge.EVTargetVoltage = float_type; - printf("\n\nEV side: prepare EVSE preCharge\n"); /********************** * Prepare preCharge * @@ -1002,7 +992,7 @@ static int dc_charging() return 0; /* stop here */ } - printf("EV side: call EVSE preCharge \n"); + printf("\n\nEV side: call EVSE preCharge \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -1022,7 +1012,7 @@ static int dc_charging() if(resMsg==PRECHARGERES) { /* show result of the answer message of EVSE sessionSetup*/ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); /* show result of the answer message of EVSE powerDiscovery*/ printf("\tResponseCode=%d\n",resultPreCharge.ResponseCode); printDCEVSEStatus(&resultPreCharge.DC_EVSEStatus); @@ -1062,8 +1052,6 @@ static int dc_charging() resultPowerDelivery.DC_EVSEStatus = &evseStatus; /* we expect the DC-based EVSE status */ - printf("\n\nEV side: prepare EVSE powerDelivery\n"); - /************************** * Prepare powerDelivery * @@ -1075,7 +1063,7 @@ static int dc_charging() return 0; /* stop here */ } - printf("EV side: call EVSE powerDelivery \n"); + printf("\n\nEV side: call EVSE powerDelivery \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -1157,8 +1145,6 @@ static int dc_charging() currentDemand.EVTargetVoltage = float_type; - printf("\n\nEV side: prepare EVSE currentDemand\n"); - /************************** * Prepare currentDemand * **************************/ @@ -1169,7 +1155,7 @@ static int dc_charging() return 0; /* stop here */ } - printf("EV side: call EVSE currentDemand \n"); + printf("\n\nEV side: call EVSE currentDemand \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -1212,7 +1198,6 @@ static int dc_charging() - printf("\n\nEV side: prepare EVSE weldingDetection\n"); /************************** * Prepare weldingDetection * @@ -1224,7 +1209,7 @@ static int dc_charging() return 0; /* stop here */ } - printf("EV side: call EVSE weldingDetection \n"); + printf("\n\nEV side: call EVSE weldingDetection \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -1244,7 +1229,7 @@ static int dc_charging() if(resMsg==WELDINGDETECTIONRES) { /* show result of the answer message of EVSE sessionSetup*/ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); /* show result of the answer message of EVSE powerDiscovery*/ printf("\tResponseCode=%d\n",resultCurrentDemand.ResponseCode); printDCEVSEStatus(&resultCurrentDemand.DC_EVSEStatus); @@ -1259,7 +1244,6 @@ static int dc_charging() * Setup data for stopSession * ***********************************/ - printf("\n\nEV side: prepare EVSE stopSession\n"); /************************ * Prepare stopSession * @@ -1271,7 +1255,7 @@ static int dc_charging() return 0; /* stop here */ } - printf("EV side: call EVSE stopSession \n"); + printf("\n\nEV side: call EVSE stopSession \n"); /* Use here your sending / receiving mechanism to / from the EVSE. The following serviceDataTransmitter method * is only an exemplary implementation which also shows how to add the V2GTP header information to @@ -1291,7 +1275,7 @@ static int dc_charging() if(resMsg==SESSIONSTOPRES) { /* show result of the answer message of EVSE sessionSetup*/ - printf("EV side: received response message from EVSE\n"); + printf("\nEV side: received response message from EVSE\n"); /* show result of the answer message of EVSE powerDiscovery*/ printf("\tResponseCode=%d\n",resultCurrentDemand.ResponseCode); }