Parcourir la source

git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@72 d9f2db14-54d0-4bde-b00c-16405c910529

sebastiankb il y a 13 ans
Parent
commit
c4fcca04a4

+ 0 - 185
src/test/evse_server.c

@@ -1,185 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Siemens AG
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @@version 0.6
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-
-
-/* includes for the application handshake protocol */
-#include "appHand_service.h"
-#include "appHand_dataTypes.h"
-
-#include "evse_server.h"
-#include "v2g_service.h"
-#include "v2g_serviceDispatcher.h"
-#include "v2gtp.h"
-
-#define MAX_BYTE_SIZE 64
-#define MAX_STRING_SIZE 64
-#define MAX_STREAM_SIZE 100
-
-
-static int appHandshakeHandler(struct EXIDatabinder* appHandService, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t* outStreamLength);
-static void printASCIIString(uint32_t* string, uint32_t len);
-
-int testV2GService(uint8_t* inStream, uint16_t inStreamLength, uint8_t* outStream, uint16_t* outStreamLength)
-{
-	static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
-	static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
-	uint16_t exiMsgLength;
-
-	struct EXIDatabinder appHandService;
-	struct EXIService service;
-
-	static uint8_t isHandshake = 1;
-
-	/* BINARY memory setup */
-	bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
-
-	/* STRING memory setup */
-	string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
-
-	/**********************************************
-	 * Init V2G server and initialize array types *
-	 * for the EXI decoding	as well as the offset *
-	 * for the transportation header			  *
-	 **********************************************/
-
-	init_v2gservice(&service, bytes, string, V2GTP_HEADER_LENGTH);
-
-	/* check, if the DoIP header is correct and determine payload */
-	if(read_v2gtpHeader(inStream,inStreamLength, &exiMsgLength))
-	{
-		/* v2gtp header not correct */
-		return -1;
-	}
-
-	/* Here, it is assumed the first message is always the application handshake protocol.
-	 * The successor messages are 15118 charging based messages and handled by the message
-	 * dispatcher. */
-
-	if(isHandshake)
-	{
-
-
-
-		/* init the de- / serializer */
-		init_appHandDeserializer(&appHandService,bytes,string,V2GTP_HEADER_LENGTH);
-		init_appHandSerializer(&appHandService,bytes,string,MAX_STREAM_SIZE,V2GTP_HEADER_LENGTH);
-
-		if(appHandshakeHandler(&appHandService, inStream,inStreamLength,outStream,outStreamLength))
-		{
-			return -1; /* an error occured */
-		}
-
-		isHandshake = 0; /* here: next time a charging message is expected */
-	}
-	else
-	{
-
-
-		/****************************************************************************
-		 * Pass the received EXI message stream (inStream + exiMsgLength) to the    *
-		 * v2g message dispatcher. 	The outStream contains the response message     *
-		 * stream.  																*
-		 ****************************************************************************/
-
-		if(messageDispatcher(&service, inStream, exiMsgLength, outStream, MAX_STREAM_SIZE, outStreamLength))
-		{
-			/* an error occured */
-			return -1;
-		}
-
-	}
-
-
-	/* write v2gtp header */
-	write_v2gtpHeader(outStream, outStreamLength, V2GTP_EXI_TYPE);
-
-
-
-	return 0;
-
-}
-
-/** Example implementation of the app handshake protocol for the EVSE side  */
-static int appHandshakeHandler(struct EXIDatabinder* appHandService, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t* outStreamLength)
-{
-	struct EXIDocumentType_appHand exiDoc;
-	struct AnonType_supportedAppProtocolReq handshake;
-	struct AnonType_supportedAppProtocolRes resultHandshake;
-	size_t i;
-
-	init_AnonType_supportedAppProtocolReq(&handshake);
-	init_EXIDocumentType_appHand(&exiDoc);
-
-	/* we expect a supportedAppProtocolReq */
-	exiDoc.supportedAppProtocolReq = &handshake;
-
-
-	if(deserialize_appHand(appHandService,inStream,sizeInStream,&exiDoc))
-	{
-		/* an error occured */
-		return -1;
-	}
-
-	printf("EVSE side: List of application handshake protocols of the EV \n");
-
-	for(i=0;i<handshake.arraylen.AppProtocol;i++)
-	{
-		printf("\tProtocol entry #=%d\n",(i+1));
-		printf("\t\tProtocolNamespace=");
-		printASCIIString(handshake.AppProtocol[i].ProtocolNamespace.data,handshake.AppProtocol[i].ProtocolNamespace.arraylen.data);
-		printf("\t\tVersion=%d.%d\n", handshake.AppProtocol[i].VersionNumberMajor,handshake.AppProtocol[i].VersionNumberMinor);
-		printf("\t\tSchemaID=%d\n", handshake.AppProtocol[i].SchemaID);
-		printf("\t\tPriority=%d\n", handshake.AppProtocol[i].Priority);
-	}
-
-	/* prepare response handshake response:
-	 * it is assumed, we support the 15118 1.0 version :-) */
-	resultHandshake.ResponseCode=OK_SuccessfulNegotiation_responseCodeType;
-	resultHandshake.SchemaID=handshake.AppProtocol[0].SchemaID; /* signal the protocol by the provided schema id*/
-	resultHandshake.isused.SchemaID=1;
-
-	/* assign the response message to the exiDoc */
-	init_EXIDocumentType_appHand(&exiDoc);
-	exiDoc.supportedAppProtocolRes=&resultHandshake;
-	exiDoc.isused.supportedAppProtocolRes=1;
-
-	if(serialize_appHand(appHandService, outStream,outStreamLength, &exiDoc))
-	{
-		return -1;
-	}
-
-
-	return 0;
-}
-
-static void printASCIIString(uint32_t* string, uint32_t len) {
-	unsigned int i;
-	for(i=0; i<len; i++) {
-		printf("%c",(char)string[i]);
-	}
-	printf("\n");
-}
-

+ 0 - 33
src/test/evse_server.h

@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Siemens AG
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @@version 0.6
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#ifndef V2G_SERVER_H_
-#define V2G_SERVER_H_
-
-#include "EXITypes.h"
-
-int testV2GService(uint8_t* inStream, uint16_t inStreamLength, uint8_t* outStream,uint16_t* outStreamLength);
-
-#endif /* V2G_SERVER_H_ */

+ 0 - 610
src/test/evse_serviceMethods.c

@@ -1,610 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Siemens AG
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.6
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#include "v2g_serviceMethods.h"
-#include "v2g_serviceDataTypes.h"
-#include <stdio.h>
-
-static void printBinaryArray(uint8_t* byte, uint32_t len);
-
-int	sessionSetup(struct MessageHeaderType* header, struct SessionSetupReqType* param, struct SessionSetupResType* result)
-{
-
-	printf("EVSE side: sessionSetup called\n"  );
-	printf("\tReceived data:\n");
-	printf("\tHeader SessionID=");
-	printBinaryArray(header->SessionID.data,header->SessionID.arraylen.data );
-	printf("\t\t EVCCID=%d\n",param->EVCCID.data[0]);
-
-	/* generate an unique sessionID */
-	header->SessionID.data[0] = 0;
-	header->SessionID.data[1] = 0;
-	header->SessionID.data[2] = 0;
-	header->SessionID.data[3] = 0;
-	header->SessionID.data[4] = 0;
-	header->SessionID.data[5] = 0;
-	header->SessionID.data[6] = 0;
-	header->SessionID.data[7] = 10;
-	header->SessionID.arraylen.data=8;
-
-	/* Prepare data for EV */
-	result->ResponseCode = OK_responseCodeType;
-	result->EVSEID.data[0]=1;
-	result->EVSEID.arraylen.data=1;
-	result->DateTimeNow=123456789;
-	result->isused.DateTimeNow=1;
-
-	return 0;
-
-}
-
-int	serviceDiscovery(struct MessageHeaderType* header, struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result)
-{
-	printf("EVSE side: serviceDiscovery called\n"  );
-	printf("\tReceived data:\n");
-	printf("\tHeader SessionID=");
-	printBinaryArray(header->SessionID.data,header->SessionID.arraylen.data );
-
-	printf("\t\t ServiceCategory=%d\n", param->ServiceCategory);
-
-	result->isused.ServiceList=0; /* we do not provide VAS */
-	result->ResponseCode= OK_responseCodeType;
-
-
-	result->ChargeService.EnergyTransferType = AC_single_DC_core_EVSESupportedEnergyTransferType;
-	result->ChargeService.ServiceTag.ServiceID=1; /* ID of the charge service */
-	result->ChargeService.ServiceTag.ServiceName.data[0]='A';
-	result->ChargeService.ServiceTag.ServiceName.data[1]='C';
-	result->ChargeService.ServiceTag.ServiceName.data[2]='_';
-	result->ChargeService.ServiceTag.ServiceName.data[3]='D';
-	result->ChargeService.ServiceTag.ServiceName.data[4]='C';
-	result->ChargeService.ServiceTag.ServiceName.arraylen.data=5;
-	result->ChargeService.ServiceTag.isused.ServiceName=1;
-	result->ChargeService.ServiceTag.isused.ServiceCategory=0;
-	result->ChargeService.ServiceTag.isused.ServiceScope=0;
-
-	result->ChargeService.FreeService = 1;
-	result->PaymentOptions.PaymentOption[0] = ExternalPayment_paymentOptionType; /* EVSE handles the payment */
-	result->PaymentOptions.arraylen.PaymentOption=1;
-
-
-	result->ServiceList.Service[0].FreeService=1;
-	result->ServiceList.Service[0].ServiceTag.ServiceID=22; /* ID of the charge service */
-	result->ServiceList.Service[0].ServiceTag.ServiceName.data[0]='W';
-	result->ServiceList.Service[0].ServiceTag.ServiceName.data[1]='W';
-	result->ServiceList.Service[0].ServiceTag.ServiceName.data[2]='W';
-	result->ServiceList.Service[0].ServiceTag.ServiceName.arraylen.data=3;
-	result->ServiceList.Service[0].ServiceTag.ServiceCategory=Internet_serviceCategoryType;
-	result->ServiceList.Service[0].ServiceTag.isused.ServiceName=1;
-	result->ServiceList.Service[0].ServiceTag.isused.ServiceCategory=1;
-	result->ServiceList.Service[0].ServiceTag.isused.ServiceScope=0;
-
-	result->ServiceList.arraylen.Service=1;
-	result->isused.ServiceList=1;
-
-	return 0;
-}
-
-int	servicePaymentSelection(struct MessageHeaderType* header, struct ServicePaymentSelectionReqType* param, struct ServicePaymentSelectionResType* result)
-{
-	printf("EVSE side: servicePaymentSelection called\n"  );
-	printf("\tReceived data:\n");
-	printf("\tHeader SessionID=");
-	printBinaryArray(header->SessionID.data,header->SessionID.arraylen.data );
-
-	if(param->SelectedPaymentOption == ExternalPayment_paymentOptionType)
-		printf("\t\t SelectedPaymentOption=ExternalPayment\n");
-
-	printf("\t\t ServiceID=%d\n",param->SelectedServiceList.SelectedService[0].ServiceID);
-
-	result->ResponseCode = OK_responseCodeType;
-
-	return 0;
-}
-
-int	paymentDetails(struct MessageHeaderType* header, struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result)
-{
-	return 0;
-}
-
-int	chargeParameterDiscovery(struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result)
-{
-	struct PhysicalValueType f;
-
-	printf("EVSE side: chargeParameterDiscovery called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t EVRequestedEnergyTransferType=%d\n",param->EVRequestedEnergyTransferType);
-
-	/* check,if DC or AC is requested */
-	if(param->EVRequestedEnergyTransferType==DC_core_EVRequestedEnergyTransferType || param->isused.DC_EVChargeParameter==1)
-	{
-
-		printf("\t\t EVStatus:\n");
-		printf("\t\t\t EVReady=%d\n", param->DC_EVChargeParameter->DC_EVStatus.EVReady);
-		printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVChargeParameter->DC_EVStatus.EVRESSSOC);
-		printf("\t\t\t EVErrorCode=%d\n", param->DC_EVChargeParameter->DC_EVStatus.EVErrorCode);
-		printf("\t\t\t EVRESSConditioning=%d\n", param->DC_EVChargeParameter->DC_EVStatus.EVRESSConditioning);
-		printf("\t\t\t EVCabinConditioning=%d\n", param->DC_EVChargeParameter->DC_EVStatus.EVCabinConditioning);
-
-
-		printf("\t\t EVMaximumCurrentLimit=%d\n", param->DC_EVChargeParameter->EVMaximumCurrentLimit.Value);
-		printf("\t\t EVMaximumPowerLimit=%d\n", param->DC_EVChargeParameter->EVMaximumPowerLimit.Value);
-		printf("\t\t EVMaximumVoltageLimit=%d\n", param->DC_EVChargeParameter->EVMaximumVoltageLimit.Value);
-		printf("\t\t EVEnergyCapacity=%d\n", param->DC_EVChargeParameter->EVEnergyCapacity.Value);
-		printf("\t\t EVEnergyRequest=%d\n", param->DC_EVChargeParameter->EVEnergyRequest.Value);
-		printf("\t\t FullSOC=%d\n", param->DC_EVChargeParameter->FullSOC);
-		printf("\t\t BulkSOC=%d\n", param->DC_EVChargeParameter->BulkSOC);
-
-		result->ResponseCode = OK_responseCodeType;
-		result->isused.SAScheduleList=0;
-
-
-		result->isused.DC_EVSEChargeParameter = 1;
-		result->isused.AC_EVSEChargeParameter = 0;
-		result->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
-		result->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEIsolationStatus = Safe_isolationLevelType;
-		result->DC_EVSEChargeParameter->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
-
-
-		f.Multiplier = 0;
-		f.Unit = A_unitSymbolType;
-		f.Value = 50;
-
-		result->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit=f;
-
-		f.Unit = W_unitSymbolType;
-		f.Value = 20000;
-
-		result->DC_EVSEChargeParameter->EVSEMaximumPowerLimit=f;
-		result->DC_EVSEChargeParameter->isused.EVSEMaximumPowerLimit=1;
-
-		f.Unit = V_unitSymbolType;
-		f.Value = 400;
-
-		result->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit=f;
-
-		f.Unit = A_unitSymbolType;
-		f.Value = 5;
-
-		result->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit=f;
-
-		f.Unit = V_unitSymbolType;
-		f.Value = 200;
-
-		result->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit=f;
-
-		f.Unit = A_unitSymbolType;
-		f.Value = 2;
-
-		result->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance=f;
-		result->DC_EVSEChargeParameter->isused.EVSECurrentRegulationTolerance=1;
-
-		f.Unit = A_unitSymbolType;
-		f.Value = 1;
-
-		result->DC_EVSEChargeParameter->EVSEPeakCurrentRipple=f;
-
-		f.Unit = W_unitSymbolType;
-		f.Value = 5000;
-
-		result->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered=f;
-		result->DC_EVSEChargeParameter->isused.EVSEEnergyToBeDelivered=1;
-
-		/* set up a PMax schedule */
-		result->isused.SAScheduleList=1;
-		result->SAScheduleList->SAScheduleTuple[0].SAScheduleTupleID=10;
-		result->SAScheduleList->SAScheduleTuple[0].isused.SalesTariff=0; /* no tariffs */
-
-		/* set up two PMax entries */
-		result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleID=20;
-		result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].PMax=20000;
-		result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].RelativeTimeInterval.start=0;
-
-		result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].PMax=0;
-		result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].RelativeTimeInterval.start=1200; /* 20 min */
-
-		result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.arraylen.PMaxScheduleEntry=2; /* we set up two time entries */
-
-
-		/* set up two PMax entries */
-		result->SAScheduleList->SAScheduleTuple[1].SAScheduleTupleID=15;
-		result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleID=30;
-		result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[0].PMax=10000;
-		result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[0].RelativeTimeInterval.start=0;
-
-		result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[1].PMax=0;
-		result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[1].RelativeTimeInterval.start=1800; /* 30 min */
-
-		result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.arraylen.PMaxScheduleEntry=2; /* we set up two time entries */
-
-		result->SAScheduleList->arraylen.SAScheduleTuple=2; /* we used only 1 tuple */
-
-	} else { /* AC related */
-
-		printf("\t\t DepartureTime=%d\n", param->AC_EVChargeParameter->DepartureTime);
-		printf("\t\t EAmount=%d\n", param->AC_EVChargeParameter->EAmount.Value);
-		printf("\t\t EVMaxCurrent=%d\n", param->AC_EVChargeParameter->EVMaxCurrent.Value);
-		printf("\t\t EVMaxVoltage=%d\n", param->AC_EVChargeParameter->EVMaxVoltage.Value);
-		printf("\t\t EVMinCurrent=%d\n", param->AC_EVChargeParameter->EVMinCurrent.Value);
-
-
-		result->ResponseCode = OK_responseCodeType;
-
-
-		result->isused.AC_EVSEChargeParameter = 1;
-		result->isused.DC_EVSEChargeParameter = 0;
-		result->isused.SAScheduleList = 0;
-
-
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.PowerSwitchClosed=1;
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.RCD=1;
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.ShutDownTime=12345;
-		result->AC_EVSEChargeParameter->AC_EVSEStatus.StopCharging=0;
-
-
-		f.Multiplier = 0;
-		f.Unit = A_unitSymbolType;
-		f.Value = 100;
-
-		result->AC_EVSEChargeParameter->EVSEMaxCurrent=f;
-
-		f.Unit = V_unitSymbolType;
-		f.Value = 200;
-		result->AC_EVSEChargeParameter->EVSEMaxVoltage=f;
-
-		f.Unit = A_unitSymbolType;
-		f.Value = 300;
-		result->AC_EVSEChargeParameter->EVSEMinCurrent=f;
-
-		/* no sales schedule used */
-		result->isused.SAScheduleList=0;
-	}
-
-
-
-	return 0;
-}
-
-int	powerDelivery(struct MessageHeaderType* header, struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result)
-{
-	size_t i;
-
-	printf("EVSE side: powerDelivery called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t\t ReadyToChargeState=%d\n", param->ReadyToChargeState);
-
-
-
-	if(param->isused.DC_EVPowerDeliveryParameter)
-	{
-
-		printf("\t\t EVStatus:\n");
-		printf("\t\t\t EVReady=%d\n", param->DC_EVPowerDeliveryParameter->DC_EVStatus.EVReady);
-		printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVPowerDeliveryParameter->DC_EVStatus.EVRESSSOC);
-		printf("\t\t\t EVErrorCode=%d\n", param->DC_EVPowerDeliveryParameter->DC_EVStatus.EVErrorCode);
-		printf("\t\t\t EVRESSConditioning=%d\n", param->DC_EVPowerDeliveryParameter->DC_EVStatus.EVRESSConditioning);
-		printf("\t\t\t EVCabinConditioning=%d\n", param->DC_EVPowerDeliveryParameter->DC_EVStatus.EVCabinConditioning);
-
-
-		if(param->isused.ChargingProfile)
-		{
-			printf("\t\t\tChargingProfile:\n");
-			printf("\t\t\t SAScheduleTupleID=%d\n",param->ChargingProfile.SAScheduleTupleID );
-			for(i=0;i<param->ChargingProfile.arraylen.ProfileEntry;i++)
-			{
-				printf("\t\t\t Entry#%d\n",i);
-				printf("\t\t\t\t ChargingProfileEntryMaxPower=%d\n", param->ChargingProfile.ProfileEntry[i].ChargingProfileEntryMaxPower);
-				printf("\t\t\t\t ChargingProfileEntryStart=%d\n", param->ChargingProfile.ProfileEntry[i].ChargingProfileEntryStart);
-
-			}
-
-
-		}
-
-
-		result->ResponseCode = OK_responseCodeType;
-		result->DC_EVSEStatus->EVSEIsolationStatus =1;
-		result->DC_EVSEStatus->isused.EVSEIsolationStatus = 1;
-		result->DC_EVSEStatus->EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
-		result->isused.DC_EVSEStatus=1;
-		result->isused.AC_EVSEStatus=0;
-
-
-
-
-
-	} else {
-
-
-		result->ResponseCode = OK_responseCodeType;
-		result->AC_EVSEStatus->PowerSwitchClosed=1;
-		result->AC_EVSEStatus->RCD=1;
-		result->AC_EVSEStatus->ShutDownTime=12345;
-		result->AC_EVSEStatus->StopCharging=1;
-
-
-		result->isused.AC_EVSEStatus=1;
-		result->isused.DC_EVSEStatus=0;
-
-	}
-
-	return 0;
-}
-
-int	chargingStatus(struct MessageHeaderType* header, struct ChargingStatusReqType* param, struct ChargingStatusResType* result)
-{
-	printf("EVSE side: chargingStatus called\n"  );
-
-
-
-	result->ResponseCode=OK_responseCodeType;
-	result->EVSEID.data[0]=1;
-	result->EVSEID.arraylen.data=1;
-	result->AC_EVSEStatus.PowerSwitchClosed=1;
-	result->AC_EVSEStatus.RCD=1;
-	result->AC_EVSEStatus.ShutDownTime=12345;
-	result->AC_EVSEStatus.StopCharging=1;
-	result->ReceiptRequired=0;
-	result->EVSEMaxCurrent.Multiplier = 2;
-	result->EVSEMaxCurrent.Unit = A_unitSymbolType;
-	result->EVSEMaxCurrent.isused.Unit=1;
-	result->EVSEMaxCurrent.Value = 400;
-	result->isused.EVSEMaxCurrent=1;
-	result->SAScheduleTupleID=10;
-	result->isused.SAScheduleTupleID=1;
-
-	result->isused.MeterInfo=1;
-	result->MeterInfo.MeterID.arraylen.data=1;
-	result->MeterInfo.MeterID.data[0]=2;
-	result->MeterInfo.MeterReading.Multiplier = 0;
-	result->MeterInfo.MeterReading.Unit = A_unitSymbolType;
-	result->MeterInfo.MeterReading.Value = 500;
-	result->MeterInfo.MeterStatus = 4321;
-	result->MeterInfo.TMeter =123456789;
-	result->MeterInfo.isused.MeterReading = 1;
-	result->MeterInfo.isused.MeterStatus=1;
-	result->MeterInfo.isused.TMeter=1;
-	result->MeterInfo.isused.SigMeterReading=0;
-
-	return 0;
-}
-
-int	meteringReceipt(struct MessageHeaderType* header, struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result)
-{
-
-	printf("EVSE side: meteringReceipt called\n"  );
-	printf("\tReceived data:\n");
-
-	printf("\t\t SAScheduleTupleID=%d\n", param->SAScheduleTupleID);
-	printf("\t\t MeterInfo.MeterStatus=%d\n", param->MeterInfo.MeterStatus);
-	printf("\t\t MeterInfo.MeterID=%d\n",		param->MeterInfo.MeterID.data[0]);
-	printf("\t\t MeterInfo.isused.MeterReading=%d\n", param->MeterInfo.isused.MeterReading);
-	printf("\t\t MeterReading.Value=%d\n",		param->MeterInfo.MeterReading.Value);
-	printf("\t\t MeterInfo.TMeter=%d\n",		param->MeterInfo.TMeter);
-
-	result->ResponseCode = OK_responseCodeType;
-
-	result->AC_EVSEStatus.PowerSwitchClosed=1;
-	result->AC_EVSEStatus.RCD=1;
-	result->AC_EVSEStatus.ShutDownTime=12345;
-	result->AC_EVSEStatus.StopCharging=1;
-
-	return 0;
-}
-
-int	cableCheck(struct MessageHeaderType* header, struct CableCheckReqType* param, struct CableCheckResType* result)
-{
-	printf("EVSE side: cableCheck called\n"  );
-	printf("\tReceived data:\n");
-
-
-	printf("\t\t EVStatus:\n");
-	printf("\t\t\t EVReady=%d\n", param->DC_EVStatus.EVReady);
-	printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVStatus.EVRESSSOC);
-	printf("\t\t\t EVErrorCode=%d\n", param->DC_EVStatus.EVErrorCode);
-	printf("\t\t\t EVRESSConditioning=%d\n", param->DC_EVStatus.EVRESSConditioning);
-	printf("\t\t\t EVCabinConditioning=%d\n", param->DC_EVStatus.EVCabinConditioning);
-
-
-	result->ResponseCode = OK_responseCodeType;
-	result->DC_EVSEStatus.EVSEIsolationStatus= Safe_isolationLevelType;
-	result->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
-	result->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
-
-	return 0;
-}
-
-
-int	preCharge(struct MessageHeaderType* header, struct PreChargeReqType* param, struct PreChargeResType* result)
-{
-	struct PhysicalValueType float_type;
-
-
-	printf("EVSE side: preCharge called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t EVStatus:\n");
-	printf("\t\t\t EVReady=%d\n", param->DC_EVStatus.EVReady);
-	printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVStatus.EVRESSSOC);
-	printf("\t\t\t EVErrorCode=%d\n", param->DC_EVStatus.EVErrorCode);
-	printf("\t\t\t EVRESSConditioning=%d\n", param->DC_EVStatus.EVRESSConditioning);
-	printf("\t\t\t EVCabinConditioning=%d\n", param->DC_EVStatus.EVCabinConditioning);
-
-	result->ResponseCode = OK_responseCodeType;
-	result->DC_EVSEStatus.EVSEIsolationStatus= Safe_isolationLevelType;
-	result->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
-	result->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
-
-	float_type.Multiplier = 0;
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 100;
-	result->EVSEPresentVoltage = float_type;
-
-
-
-
-	return 0;
-
-
-}
-
-int	currentDemand(struct MessageHeaderType* header, struct CurrentDemandReqType* param, struct CurrentDemandResType* result)
-{
-
-	struct PhysicalValueType f;
-
-	printf("EVSE side: currentDemand called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t EVStatus:\n");
-	printf("\t\t\t EVReady=%d\n", param->DC_EVStatus.EVReady);
-	printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVStatus.EVRESSSOC);
-	printf("\t\t\t EVErrorCode=%d\n", param->DC_EVStatus.EVErrorCode);
-	printf("\t\t\t EVRESSConditioning=%d\n", param->DC_EVStatus.EVRESSConditioning);
-	printf("\t\t\t EVCabinConditioning=%d\n", param->DC_EVStatus.EVCabinConditioning);
-
-	printf("\t\t EVTargetCurrent=%d\n", param->EVTargetCurrent.Value);
-	printf("\t\t EVMaximumVoltageLimit=%d\n", param->EVMaximumVoltageLimit.Value);
-	printf("\t\t EVMaximumPowerLimit=%d\n", param->EVMaximumPowerLimit.Value);
-	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);
-
-	printf("\t\t EVTargetVoltage=%d\n", param->EVTargetVoltage.Value);
-
-
-	result->ResponseCode = OK_responseCodeType;
-	result->DC_EVSEStatus.EVSEIsolationStatus= Safe_isolationLevelType;
-	result->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
-	result->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
-
-	f.Multiplier = 0;
-	f.Unit = V_unitSymbolType;
-	f.Value = 400;
-
-	result->EVSEPresentVoltage=f;
-
-	f.Unit = A_unitSymbolType;
-	f.Value = 45;
-
-	result->EVSEPresentCurrent=f;
-
-	result->EVSECurrentLimitAchieved=0;
-
-	result->EVSEVoltageLimitAchieved=1;
-
-	result->EVSEPowerLimitAchieved=0;
-
-	f.Unit = V_unitSymbolType;
-	f.Value = 400;
-
-	result->EVSEMaximumVoltageLimit=f;
-	result->isused.EVSEMaximumVoltageLimit=1;
-
-	f.Unit = A_unitSymbolType;
-	f.Value = 50;
-
-	result->EVSEMaximumCurrentLimit=f;
-	result->isused.EVSEMaximumCurrentLimit=1;
-
-	f.Unit = W_unitSymbolType;
-	f.Value = 20000;
-
-	result->EVSEMaximumPowerLimit=f;
-	result->isused.EVSEMaximumPowerLimit=1;
-
-	return 0;
-}
-
-int	weldingDetection(struct MessageHeaderType* header, struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result)
-{
-
-	printf("EVSE side: weldingDetection called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t EVStatus:\n");
-	printf("\t\t\t EVReady=%d\n", param->DC_EVStatus.EVReady);
-	printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVStatus.EVRESSSOC);
-	printf("\t\t\t EVErrorCode=%d\n", param->DC_EVStatus.EVErrorCode);
-	printf("\t\t\t EVRESSConditioning=%d\n", param->DC_EVStatus.EVRESSConditioning);
-	printf("\t\t\t EVCabinConditioning=%d\n", param->DC_EVStatus.EVCabinConditioning);
-
-	result->ResponseCode = OK_responseCodeType;
-	result->DC_EVSEStatus.EVSEIsolationStatus= Safe_isolationLevelType;
-	result->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
-	result->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
-	result->EVSEPresentVoltage.Value = 123;
-	result->EVSEPresentVoltage.Unit = V_unitSymbolType;
-	result->EVSEPresentVoltage.Multiplier = 0;
-
-	return 0;
-}
-
-int	sessionStop(struct MessageHeaderType* header, struct SessionStopType* param, struct SessionStopResType* result)
-{
-
-
-	printf("EVSE side: sessionStop called\n"  );
-
-
-	result->ResponseCode = OK_responseCodeType;
-
-
-
-	return 0;
-
-}
-
-int	serviceDetail(struct MessageHeaderType* header, struct ServiceDetailReqType* param, struct ServiceDetailResType* result)
-{
-	return 0;
-}
-
-int	contractAuthentication(struct MessageHeaderType* header, struct ContractAuthenticationReqType* param, struct ContractAuthenticationResType* result)
-{
-	return 0;
-}
-
-int	certificateUpdate(struct MessageHeaderType* header, struct CertificateUpdateReqType* param, struct CertificateUpdateResType* result)
-{
-	return 0;
-}
-
-int	certificateInstallation(struct MessageHeaderType* header, struct CertificateInstallationReqType* param, struct CertificateInstallationResType* result)
-{
-
-	printf("EVSE: certificateInstallation called\n"  );
-
-	return 0;
-}
-
-static void printBinaryArray(uint8_t* byte, uint32_t len) {
-	unsigned int i;
-	for(i=0; i<len; i++) {
-		printf("%d ",byte[i]);
-	}
-	printf("\n");
-}
-
-

+ 0 - 538
src/test/main_codec.c

@@ -1,538 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Siemens AG
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.6 
- * @contact Joerg.Heuer@siemens.com
- *
- * <p>Code generated by EXIdizer</p>
- ********************************************************************/
-
-
-
-/*******************************************************************
- *
- * <p>Sample program to illustrate how to read an EXI stream and
- *  directly write it again to an output</p>
- *
- *  <p>e.g., data/test/sessionSetupReq.xml.exi out/test/sessionSetupReq.xml.exi</p>
- ********************************************************************/
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "EXIDecoder.h"
-#include "StringTable.h"
-#include "EXIEncoder.h"
-#include "EXITypes.h"
-#include "ByteStream.h"
-
-#if EXI_STREAM == BYTE_ARRAY
-/* 64 kilobytes = 65 536 bytes */
-/* 1 megabyte = 1 048 576 bytes*/
-#define BUFFER_SIZE 512
-uint8_t bufferIn[BUFFER_SIZE];
-uint8_t bufferOut[BUFFER_SIZE];
-#endif /* EXI_STREAM == BYTE_ARRAY */
-
-/* avoids warning: initializer element is not computable at load time */
-#define ARRAY_SIZE_BYTES 100
-uint8_t bytesData[ARRAY_SIZE_BYTES];
-#define ARRAY_SIZE_STRINGS 100
-uint32_t codepoints[ARRAY_SIZE_STRINGS];
-#define ARRAY_SIZE_STRINGS_ASCII 100
-char charsNamespaceURI[ARRAY_SIZE_STRINGS_ASCII];
-char charsLocalName[ARRAY_SIZE_STRINGS_ASCII];
-
-#if EXI_DEBUG == EXI_DEBUG_ON
-static void debugValue(exi_value_t* val);
-#endif /*EXI_DEBUG*/
-
-
-int main_codec(int argc, char *argv[]) {
-
-	int errn = 0;
-
-	unsigned int k;
-
-	bitstream_t iStream, oStream;
-	uint32_t posDecode;
-	uint32_t posEncode;
-
-	/* EXI set-up */
-	exi_state_t stateDecode;
-	exi_state_t stateEncode;
-	exi_event_t event;
-	eqname_t eqn; /* efficient qname */
-	qname_t qn; /* ascii qname */
-	exi_value_t val;
-
-	exi_name_table_runtime_t runtimeTableDecode;
-	exi_name_table_runtime_t runtimeTableEncode;
-
-	/* BINARY memory setup */
-	bytes_t bytes = { ARRAY_SIZE_BYTES, bytesData, 0 };
-
-#if EXI_DEBUG == EXI_DEBUG_ON
-	const char * localName;
-	const char * namespaceURI;
-#endif /*EXI_DEBUG*/
-	int noEndOfDocument = 1; /* true */
-
-	/* STRING memory setup */
-	string_ucs_t string = { ARRAY_SIZE_STRINGS, codepoints, 0 };
-	string_ascii_t stringNamespaceURI = { ARRAY_SIZE_STRINGS_ASCII,
-			charsNamespaceURI };
-	string_ascii_t stringLocalName =
-			{ ARRAY_SIZE_STRINGS_ASCII, charsLocalName };
-	qn.namespaceURI = stringNamespaceURI;
-	qn.localName = stringLocalName;
-
-	if (argc != 3) {
-		printf("Usage: %s exiInput exiOutput\n", argv[0]);
-		return -1;
-	}
-
-	/* input pos */
-	posDecode = 0;
-
-#if EXI_STREAM == BYTE_ARRAY
-	/* parse EXI stream to internal byte structures  */
-	errn = readBytesFromFile(argv[1], bufferIn, BUFFER_SIZE, posDecode);
-	if (errn < 0) {
-		printf("Problems while reading file into buffer\n");
-		return errn;
-	}
-#endif /* EXI_STREAM == BYTE_ARRAY */
-
-	/* setup input stream */
-#if EXI_STREAM == BYTE_ARRAY
-	iStream.size = BUFFER_SIZE;
-	iStream.data = bufferIn;
-	iStream.pos = &posDecode;
-#endif /* EXI_STREAM == BYTE_ARRAY */
-#if EXI_STREAM == FILE_STREAM
-	iStream.file = fopen(argv[1], "rb");
-#endif /* EXI_STREAM == FILE_STREAM */
-
-	iStream.buffer = 0;
-	iStream.capacity = 0;
-
-	/* setup output stream */
-	posEncode = 0;
-#if EXI_STREAM == BYTE_ARRAY
-	oStream.size = BUFFER_SIZE;
-	oStream.data = bufferOut;
-	oStream.pos = &posEncode;
-#endif
-#if EXI_STREAM == FILE_STREAM
-	oStream.file = fopen(argv[2], "wb");
-#endif /* EXI_STREAM == FILE_STREAM */
-	oStream.buffer = 0;
-	oStream.capacity = 8;
-
-	val.binary = bytes;
-	val.string = string;
-
-	/* init decoder (read header, set initial state) */
-	/* init runtime table */
-	errn = exiInitNameTableRuntime(&runtimeTableDecode);
-	exiInitDecoder(&iStream, &stateDecode, runtimeTableDecode);
-
-	/* init encoder (write header, set initial state) */
-	errn = exiInitNameTableRuntime(&runtimeTableEncode);
-	exiInitEncoder(&oStream, &stateEncode, runtimeTableEncode);
-
-#if EXI_DEBUG == EXI_DEBUG_ON
-	printf("[DECODE] >>> EXI  >>> [ENCODE] \n");
-#endif /*EXI_DEBUG*/
-
-	do {
-		if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-			printf("[Encode-ERROR] %d \n", errn);
-#endif /*EXI_DEBUG*/
-			return errn;
-		}
-
-		errn = exiDecodeNextEvent(&iStream, &stateDecode,
-				&event);
-		if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-			printf("[Decode-ERROR] %d \n", errn);
-#endif /*EXI_DEBUG*/
-			return errn;
-		}
-
-		switch (event) {
-		case EXI_EVENT_START_DOCUMENT:
-			/* decode */
-			errn = exiDecodeStartDocument(&iStream,
-					&stateDecode);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-SD] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			printf(">> START_DOCUMENT \n");
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeStartDocument(&oStream,
-					&stateEncode);
-			break;
-		case EXI_EVENT_END_DOCUMENT:
-			/* decode */
-			errn = exiDecodeEndDocument(&iStream,
-					&stateDecode);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-ED] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			printf(">> END_DOCUMENT \n");
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeEndDocument(&oStream,
-					&stateEncode);
-			/* signalize end of document */
-			noEndOfDocument = 0; /* false */
-			break;
-		case EXI_EVENT_START_ELEMENT:
-			/* decode */
-			errn = exiDecodeStartElement(&iStream,
-					&stateDecode, &eqn);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-SE] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			exiGetLocalName(&(stateDecode.nameTablePrepopulated),
-					&(stateDecode.nameTableRuntime), eqn.namespaceURI,
-					eqn.localPart, &localName);
-			exiGetUri(&(stateDecode.nameTablePrepopulated),
-					&(stateDecode.nameTableRuntime), eqn.namespaceURI,
-					&namespaceURI);
-			printf(">> SE_{%s}%s \n", namespaceURI,
-					localName);
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeStartElement(&oStream,
-					&stateEncode, &eqn);
-			break;
-		case EXI_EVENT_START_ELEMENT_GENERIC:
-			/* decode */
-			errn = exiDecodeStartElementGeneric(&iStream,
-					&stateDecode, &qn);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-SEgen] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			printf(">> SE_Gen {%s}%s \n", stringNamespaceURI.chars,
-					stringLocalName.chars);
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeStartElementGeneric(&oStream,
-					&stateEncode, &stringNamespaceURI, &stringLocalName);
-			break;
-		case EXI_EVENT_END_ELEMENT:
-			/* decode */
-			errn = exiDecodeEndElement(&iStream,
-					&stateDecode, &eqn);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-EE] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			printf("<< EE \n");
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn
-					= exiEncodeEndElement(&oStream,
-							&stateEncode);
-			break;
-		case EXI_EVENT_END_ELEMENT_UNDECLARED:
-			/* decode */
-			errn = exiDecodeEndElementUndeclared(&iStream,
-					&stateDecode, &eqn);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-EE-Undecl] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			printf("<< EEundecl \n");
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn
-					= exiEncodeEndElement(&oStream,
-							&stateEncode);
-			break;
-		case EXI_EVENT_CHARACTERS:
-			/* decode */
-			errn = exiDecodeCharacters(&iStream,
-					&stateDecode, &val);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-CH] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			debugValue(&val);
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeCharacters(&oStream,
-						&stateEncode, &val);
-
-			/* list value: special behavior */
-			if (val.type == EXI_DATATYPE_LIST) {
-				for(k=0; k<val.list.len; k++) {
-					errn = exiDecodeListValue(&iStream, &val, val.list);
-					if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-						printf("[Decode-ERROR-CH_LIST] %d \n", errn);
-#endif /*EXI_DEBUG*/
-						return errn;
-					}
-#if EXI_DEBUG == EXI_DEBUG_ON
-					debugValue(&val);
-#endif /*EXI_DEBUG*/
-					/* encode list value */
-					errn = exiEncodeListValue(&oStream,
-									&val, val.list);
-				}
-			}
-			break;
-		case EXI_EVENT_CHARACTERS_GENERIC:
-			/* decode */
-			errn = exiDecodeCharactersGeneric(&iStream,
-					&stateDecode, &val);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-CHgen] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			debugValue(&val);
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeCharacters(&oStream,
-					&stateEncode, &val);
-			break;
-		case EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED:
-			/* decode */
-			errn = exiDecodeCharactersGenericUndeclared(
-					&iStream, &stateDecode, &val);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-CHgenUndecl] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			debugValue(&val);
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeCharacters(&oStream,
-					&stateEncode, &val);
-			break;
-		case EXI_EVENT_ATTRIBUTE:
-			/* decode */
-			errn = exiDecodeAttribute(&iStream, &stateDecode,
-					&eqn, &val);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-AT] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			exiGetLocalName(&(stateDecode.nameTablePrepopulated),
-					&(stateDecode.nameTableRuntime), eqn.namespaceURI,
-					eqn.localPart, &localName);
-			exiGetUri(&(stateDecode.nameTablePrepopulated),
-					&(stateDecode.nameTableRuntime), eqn.namespaceURI,
-					&namespaceURI);
-			printf(" AT {%s}%s \n", namespaceURI, localName);
-			debugValue(&val);
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeAttribute(&oStream, &stateEncode,
-					&eqn, &val);
-			break;
-		case EXI_EVENT_ATTRIBUTE_XSI_NIL:
-			/* decode */
-			errn = exiDecodeAttributeXsiNil(&iStream,
-					&stateDecode, &val);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-AT-NIL] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			printf(" AT {xsi}nil == %i \n", val.boolean);
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeAttributeXsiNil(&oStream,
-					&stateEncode, &val);
-			break;
-		case EXI_EVENT_ATTRIBUTE_XSI_TYPE:
-			/* decode */
-			errn = exiDecodeAttributeXsiType(&iStream,
-					&stateDecode, &val);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-AT-TYPE] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			exiGetLocalName(&(stateDecode.nameTablePrepopulated),
-					&(stateDecode.nameTableRuntime), val.eqname.namespaceURI,
-					val.eqname.localPart, &localName);
-			exiGetUri(&(stateDecode.nameTablePrepopulated),
-					&(stateDecode.nameTableRuntime), val.eqname.namespaceURI,
-					&namespaceURI);
-			printf(" AT {type}type == {%s}%s \n", namespaceURI, localName);
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeAttributeXsiType(&oStream,
-					&stateEncode, &val);
-			break;
-		case EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED:
-			/* decode */
-			errn = exiDecodeAttributeGenericUndeclared(
-					&iStream, &stateDecode, &qn, &val);
-			if (errn < 0) {
-#if EXI_DEBUG == EXI_DEBUG_ON
-				printf("[Decode-ERROR-ATgenUnd] %d \n", errn);
-#endif /*EXI_DEBUG*/
-				return errn;
-			}
-#if EXI_DEBUG == EXI_DEBUG_ON
-			/* exiGetLocalName(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), eqn.namespaceURI, eqn.localPart, &localName);
-			 exiGetUri(&(stateDecode.nameTablePrepopulated), &(stateDecode.nameTableRuntime), eqn.namespaceURI, &namespaceURI); */
-			printf(" AT {%s}%s \n", qn.namespaceURI.chars, qn.localName.chars);
-			debugValue(&val);
-#endif /*EXI_DEBUG*/
-			/* encode */
-			errn = exiEncodeAttribute(&oStream, &stateEncode,
-					&eqn, &val);
-			break;
-		default:
-			/* ERROR */
-#if EXI_DEBUG == EXI_DEBUG_ON
-			printf("[Unknown-Event] %d \n", event);
-#endif /*EXI_DEBUG*/
-			return EXI_ERROR_UNKOWN_EVENT;
-		}
-
-	} while (noEndOfDocument);
-
-#if EXI_STREAM == BYTE_ARRAY
-	/* write to file */
-	writeBytesToFile(oStream.data, posEncode, argv[2]);
-#endif
-#if EXI_STREAM == FILE_STREAM
-	fclose(iStream.file);
-	fclose(oStream.file);
-#endif
-
-	return 0;
-}
-
-
-
-#if EXI_DEBUG == EXI_DEBUG_ON
-static void debugValue(exi_value_t* val) {
-	int i;
-	switch (val->type) {
-	case EXI_DATATYPE_INTEGER:
-		switch (val->integer.type) {
-		/* Unsigned Integer */
-		case EXI_UNSIGNED_INTEGER_8:
-			printf(" Value uint8 : %d \n", val->integer.val.uint8);
-			break;
-		case EXI_UNSIGNED_INTEGER_16:
-			printf(" Value uint16 : %d \n", val->integer.val.uint16);
-			break;
-		case EXI_UNSIGNED_INTEGER_32:
-			printf(" Value uint32 : %d \n", val->integer.val.uint32);
-			break;
-		case EXI_UNSIGNED_INTEGER_64:
-			printf(" Value uint64 : %ld \n",
-					(long unsigned int) val->integer.val.uint64);
-			break;
-			/* (Signed) Integer */
-		case EXI_INTEGER_8:
-			printf(" Value int8 : %d \n", val->integer.val.int8);
-			break;
-		case EXI_INTEGER_16:
-			printf(" Value int16 : %d \n", val->integer.val.int16);
-			break;
-		case EXI_INTEGER_32:
-			printf(" Value int32 : %d \n", val->integer.val.int32);
-			break;
-		case EXI_INTEGER_64:
-			printf(" Value int64 : %ld \n", (long int) val->integer.val.int64);
-			break;
-		}
-		break;
-	case EXI_DATATYPE_BINARY_BASE64:
-	case EXI_DATATYPE_BINARY_HEX:
-		printf(" Value Binary (len == %d) : ", val->binary.len);
-		for (i = 0; i < val->binary.len; i++) {
-			printf(" [%d]", val->binary.data[i]);
-		}
-		printf("\n");
-		break;
-	case EXI_DATATYPE_BOOLEAN:
-		printf(" Value Boolean : %d \n", val->boolean);
-		break;
-	case EXI_DATATYPE_STRING:
-		printf(" Value String (len==%d) : '", val->string.len);
-		for (i = 0; i < val->string.len; i++) {
-			printf("%c", (char) val->string.codepoints[i]);
-		}
-		printf("'\n");
-		break;
-	case EXI_DATATYPE_LIST:
-		printf(" Value List (len==%d) \n", val->list.len);
-		break;
-	default:
-		printf(" Value ?? \n");
-	}
-}
-#endif /*EXI_DEBUG*/
-

+ 0 - 1504
src/test/pev_service.c

@@ -1,1504 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Siemens AG
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.6
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-/* includes of the 15118 messaging */
-#include "v2g_service.h"
-#include "v2g_serviceDataTypes.h"
-#include "v2g_serviceClientStubs.h"
-#include "EXITypes.h"
-
-/* includes for the application handshake protocol */
-#include "appHand_service.h"
-#include "appHand_dataTypes.h"
-
-
-
-/* includes V2GTP */
-#include "v2gtp.h"
-
-/* includes for example data transmitter */
-#include "v2g_serviceClientDataTransmitter.h"
-
-
-#include <stdio.h>
-
-#define MAX_BYTE_SIZE 128
-#define MAX_STRING_SIZE 256
-#define MAX_STREAM_SIZE 100
-
-
-static void printErrorMessage(struct EXIService* service);
-static void printDCEVSEStatus(struct DC_EVSEStatusType* status);
-static void printACEVSEStatus(struct AC_EVSEStatusType* status);
-static void printASCIIString(uint32_t* string, uint32_t len);
-static void printBinaryArray(uint8_t* byte, uint32_t len);
-static int writeStringToEXIString(char* string, uint32_t* exiString);
-
-/** Example implementation of the handshake protocol (EV side) */
-static int appHandshake()
-{
-	static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
-	static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
-
-	/* define in and out byte stream */
-	uint8_t inStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-	uint8_t outStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-
-	/* BINARY memory setup */
-	bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
-
-	/* STRING memory setup */
-	string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
-
-	struct EXIDatabinder appHandService;
-	struct EXIDocumentType_appHand exiDoc;
-	struct AnonType_supportedAppProtocolReq handshake;
-	struct AnonType_supportedAppProtocolRes resultHandshake;
-	uint16_t length, payloadLength;
-
-	/* init the app handshake serializer.
-	 * Important: also provide the offset of the V2GTP header length */
-	init_appHandSerializer(&appHandService,bytes,string,MAX_STREAM_SIZE, V2GTP_HEADER_LENGTH);
-
-	init_EXIDocumentType_appHand(&exiDoc);
-
-	printf("EV side: setup data for the supported application handshake request message\n");
-
-	/* set up ISO/IEC 15118 Version 1.0 information */
-	length = writeStringToEXIString("urn:iso:15118:2:2010:MsgDef", handshake.AppProtocol[0].ProtocolNamespace.data);
-	handshake.AppProtocol[0].ProtocolNamespace.arraylen.data = length; /* length of the string */
-	handshake.AppProtocol[0].SchemaID=1;
-	handshake.AppProtocol[0].VersionNumberMajor=1;
-	handshake.AppProtocol[0].VersionNumberMinor=0;
-	handshake.AppProtocol[0].Priority=1;
-
-	handshake.arraylen.AppProtocol=1; /* we have only one protocol implemented */
-
-	/* assign handshake request structure to the exiDoc and signal it */
-	exiDoc.supportedAppProtocolReq = &handshake;
-	exiDoc.isused.supportedAppProtocolReq=1;
-
-	payloadLength=0;
-	if(serialize_appHand(&appHandService, outStream,&payloadLength, &exiDoc))
-	{
-
-		/* an error occured */
-		return -1;
-	}
-
-	printf("EV side: send message to the EVSE\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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, payloadLength+V2GTP_HEADER_LENGTH, inStream);
-
-	/* Init deserializer
-	 * Provide here also the offset of the transport protocol */
-	init_appHandDeserializer(&appHandService,bytes,string,V2GTP_HEADER_LENGTH);
-
-	/* setup the */
-	init_EXIDocumentType_appHand(&exiDoc);
-	exiDoc.supportedAppProtocolRes=&resultHandshake;
-	exiDoc.isused.supportedAppProtocolRes=1;
-
-	if(deserialize_appHand(&appHandService,inStream,100,&exiDoc))
-	{
-		/* an error occurred */
-		return -1;
-	}
-
-	printf("EV side: Response of the EVSE \n");
-	if(resultHandshake.ResponseCode==OK_SuccessfulNegotiation_responseCodeType)
-	{
-		printf("\t\tResponseCode=OK_SuccessfulNegotiation\n");
-		printf("\t\tSchemaID=%d\n",resultHandshake.SchemaID );
-	}
-
-	return 0;
-
-}
-
-static int ac_charging()
-{
-
-
-	static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
-	static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
-
-	/* define in and out byte stream */
-	uint8_t inStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-	uint8_t outStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-
-
-
-	/* define offset variable for transport header data */
-	uint16_t transportHeaderOffset;
-
-
-	/* service data structure for AC*/
-	struct EXIService service;
-	struct MessageHeaderType v2gHeader;
-	struct SessionSetupReqType sessionSetup;
-	struct SessionSetupResType resultSessionSetup;
-	struct ServiceDiscoveryReqType serviceDiscovery;
-	struct ServiceDiscoveryResType resultServiceDiscovery;
-	struct ServicePaymentSelectionReqType servicePayment;
-	struct ServicePaymentSelectionResType resultServicePayment;
-	struct ChargeParameterDiscoveryReqType powerDiscovery;
-	struct ChargeParameterDiscoveryResType resultPowerDiscovery;
-	struct PowerDeliveryReqType powerDelivery;
-	struct PowerDeliveryResType resultPowerDelivery;
-	struct ChargingStatusResType resultChargingStatus;
-	struct MeteringReceiptReqType meteringReceipt;
-	struct MeteringReceiptResType resultMeteringReceipt;
-	struct SessionStopResType resultSessionStop;
-
-	struct AC_EVSEStatusType evseStatus;
-	struct AC_EVChargeParameterType EVChargeParameter;
-	struct AC_EVSEChargeParameterType evseChargeParameter;
-
-	struct SAScheduleListType scheduleInfo;
-	struct SalesTariffType sales;
-
-	struct PhysicalValueType float_type;
-
-	enum responseMessages resMsg;
-
-	uint32_t outPayloadLength;
-
-
-	/* BINARY memory setup */
-	bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
-
-	/* STRING memory setup */
-	string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
-
-	/* setup offset for DoIP header (otherwise set
-	 * transportHeaderOffset=0 if no transfer protocol is used)*/
-	transportHeaderOffset = V2GTP_HEADER_LENGTH;
-
-
-	/*******************
-	 * Init V2G Client *
-	 *******************/
-
-	init_v2gServiceClient(&service,bytes,string,inStream,MAX_STREAM_SIZE, outStream, MAX_STREAM_SIZE, &outPayloadLength, transportHeaderOffset);
-
-
-	/*******************************
-	 * Setup data for sessionSetup *
-	 *******************************/
-
-	/* setup header information */
-	v2gHeader.SessionID.data[0] = 0; /* sessionID is always '0' at the beginning (the response contains the valid sessionID)*/
-	v2gHeader.SessionID.data[1] = 0;
-	v2gHeader.SessionID.data[2] = 0;
-	v2gHeader.SessionID.data[3] = 0;
-	v2gHeader.SessionID.data[4] = 0;
-	v2gHeader.SessionID.data[5] = 0;
-	v2gHeader.SessionID.data[6] = 0;
-	v2gHeader.SessionID.data[7] = 0;
-	v2gHeader.SessionID.arraylen.data = 8; /* length of the byte session array is always 8*/
-
-	v2gHeader.isused.Notification=0; /* no notification */
-	v2gHeader.isused.Signature=0; /* no security */
-
-	/* setup sessionSetup parameter */
-	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");
-
-	/* 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream */
-	if(	determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the sessionSetup response message */
-	if(resMsg==SESSIONSETUPRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup */
-		printf("EV side: received response message from EVSE\n");
-		printf("\tHeader SessionID=");
-		printBinaryArray(v2gHeader.SessionID.data,v2gHeader.SessionID.arraylen.data );
-		printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode);
-		printf("\tEVSEID=%d\n",	resultSessionSetup.EVSEID.data[0]);
-		printf("\tDateTimeNow=%d\n",resultSessionSetup.DateTimeNow);
-	}
-
-	/*******************************************
-	 * Setup data for serviceDiscovery *
-	 *******************************************/
-
-	serviceDiscovery.isused.ServiceCategory=1;
-	serviceDiscovery.ServiceCategory = 	EVCharging_serviceCategoryType;
-	serviceDiscovery.isused.ServiceScope=0;
-
-
-	printf("\n\nEV side: prepare EVSE serviceDiscovery\n");
-
-	/****************************
-	 * Prepare serviceDiscovery *
-	 ****************************/
-
-	prepare_serviceDiscovery(&service,&v2gHeader, &serviceDiscovery,&resultServiceDiscovery);
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the serviceDiscovery response message */
-	if(resMsg==SERVICEDISCOVERYRES)
-	{
-		/* show result of the answer message of EVSE serviceDiscovery */
-		printf("EV 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);
-		printf("\t ServiceID=%d\n",	resultServiceDiscovery.ChargeService.ServiceTag.ServiceID);
-		printf("\t ServiceName=");
-		printASCIIString(resultServiceDiscovery.ChargeService.ServiceTag.ServiceName.data,(uint32_t)resultServiceDiscovery.ChargeService.ServiceTag.ServiceName.arraylen.data );
-		if(	resultServiceDiscovery.PaymentOptions.PaymentOption[0]==ExternalPayment_paymentOptionType)
-		printf("\t PaymentOption=ExternalPayment\n");
-		if(resultServiceDiscovery.ChargeService.EnergyTransferType==AC_single_DC_core_EVSESupportedEnergyTransferType)
-		printf("\t EnergyTransferType=AC_single_DC_core\n");
-		printf("\t Value added service list:\n");
-		printf("\t\t ServiceID=%d\n",	resultServiceDiscovery.ServiceList.Service[0].ServiceTag.ServiceID);
-		printf("\t\t ServiceName=");
-		printASCIIString(resultServiceDiscovery.ServiceList.Service[0].ServiceTag.ServiceName.data,(uint32_t)resultServiceDiscovery.ServiceList.Service[0].ServiceTag.ServiceName.arraylen.data );
-		if(resultServiceDiscovery.ServiceList.Service[0].ServiceTag.ServiceCategory==Internet_serviceCategoryType)
-		printf("\t\t ServiceCategory=Internet\n");
-
-	}
-
-
-	/*******************************************
-	 * Setup data for ServicePaymentSelection *
-	 *******************************************/
-
-	servicePayment.SelectedPaymentOption = ExternalPayment_paymentOptionType;
-	servicePayment.SelectedServiceList.SelectedService[0].ServiceID=1; /* charge server ID */
-	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 *
-	 ***********************************/
-
-	if(prepare_servicePaymentSelection(&service,&v2gHeader, &servicePayment,&resultServicePayment))
-	{
-		printErrorMessage(&service);
-		return 0;
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the servicePaymentSelection response message */
-	if(resMsg==SERVICEPAYMENTSELECTIONRES)
-	{
-		/* show result of the answer message of EVSE servicePaymentSelection */
-		printf("EV 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);
-	}
-
-
-
-
-
-
-
-	/*******************************************
-	 * Setup data for chargeParameterDiscovery *
-	 *******************************************/
-	printf("\n\nEV side: prepare EVSE chargeParameterDiscovery\n");
-
-	powerDiscovery.EVRequestedEnergyTransferType = AC_three_phase_core_EVRequestedEnergyTransferType;
-
-	EVChargeParameter.DepartureTime = 12345;
-
-	float_type.Multiplier = 0;
-	float_type.Unit = W_unitSymbolType;
-	float_type.isused.Unit=1;
-	float_type.Value = 100;
-
-	EVChargeParameter.EAmount = float_type;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 200;
-
-	EVChargeParameter.EVMaxCurrent= float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 400;
-
-	EVChargeParameter.EVMaxVoltage=float_type;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 500;
-
-	EVChargeParameter.EVMinCurrent=float_type;
-
-	powerDiscovery.AC_EVChargeParameter = &EVChargeParameter;
-	powerDiscovery.isused.AC_EVChargeParameter = 1; /* we use here DC based charging parameters */
-	powerDiscovery.isused.DC_EVChargeParameter = 0;
-
-	resultPowerDiscovery.AC_EVSEChargeParameter = &evseChargeParameter; /* we expect AC-based parameters from the evse*/
-	resultPowerDiscovery.SAScheduleList = &scheduleInfo; /* EVSE may send a schedule for us; should be always assigned here! */
-	resultPowerDiscovery.SAScheduleList->SAScheduleTuple[0].SalesTariff = &sales;
-
-	prepare_chargeParameterDiscovery(&service,&v2gHeader,&powerDiscovery,&resultPowerDiscovery);
-
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the chargeParameterDiscovery response message */
-	if(resMsg==CHARGEPARAMETERDISCOVERYRES)
-
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("EV side: received response message from EVSE\n");
-		printf("\tHeader SessionID=");
-		printBinaryArray(v2gHeader.SessionID.data,v2gHeader.SessionID.arraylen.data );
-		printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode);
-		printACEVSEStatus(&(resultPowerDiscovery.AC_EVSEChargeParameter->AC_EVSEStatus));
-
-		printf("\t EVSEMaxCurrent=%d\n",resultPowerDiscovery.AC_EVSEChargeParameter->EVSEMaxCurrent.Value);
-		printf("\t EVSEMaxVoltage=%d\n",resultPowerDiscovery.AC_EVSEChargeParameter->EVSEMaxVoltage.Value);
-		printf("\t EVSEMinimumCurrentLimit=%d\n",resultPowerDiscovery.AC_EVSEChargeParameter->EVSEMinCurrent.Value);
-	}
-
-
-	/*********************************
-	 * Setup data for powerDelivery *
-	 *********************************/
-
-	printf("\n\nEV side: prepare EVSE powerDelivery\n");
-
-	powerDelivery.ReadyToChargeState = 1;
-	powerDelivery.isused.ChargingProfile= 0;
-	powerDelivery.isused.DC_EVPowerDeliveryParameter=0; /* only used for DC charging */
-	resultPowerDelivery.AC_EVSEStatus = &evseStatus; /* we expect an evse status */
-
-	prepare_powerDelivery(&service,&v2gHeader,&powerDelivery,&resultPowerDelivery);
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the powerDelivery response message */
-	if(resMsg==POWERDELIVERYRES)
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("EV side: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPowerDelivery.ResponseCode);
-		printACEVSEStatus(&evseStatus);
-	}
-
-
-	/*********************************
-	 * Setup data for chargingStatus *
-	 *********************************/
-
-	printf("\n\nEV side: prepare EVSE chargingStatus\n");
-
-	/***************************
-	 * Prepare chargingStatus  *
-	 ***************************/
-
-	if(prepare_chargingStatus(&service,&v2gHeader,&resultChargingStatus))
-	{
-		printErrorMessage(&service);
-		return 0; /* stop here */
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the chargingStatus response message */
-	if(resMsg==CHARGINGSTATUSRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("EV side: received response message from EVSE\n");
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("\tResponseCode=%d\n",resultChargingStatus.ResponseCode);
-		printACEVSEStatus(&evseStatus);
-		printf("\tReceiptRequired=%d\n",resultChargingStatus.ReceiptRequired);
-		printf("\tSAScheduleTupleID=%d\n",resultChargingStatus.SAScheduleTupleID);
-		printf("\tEVSEID=%d\n",resultChargingStatus.EVSEID.data[0]);
-		printf("\tEVSEMaxCurrent=%d\n",resultChargingStatus.EVSEMaxCurrent.Value);
-		printf("\tisused.MeterInfo=%d\n",		resultChargingStatus.isused.MeterInfo);
-		printf("\t\tMeterInfo.MeterID=%d\n",		resultChargingStatus.MeterInfo.MeterID.data[0]);
-		printf("\t\tMeterInfo.MeterReading.Value=%d\n",		resultChargingStatus.MeterInfo.MeterReading.Value);
-		printf("\t\tMeterInfo.MeterStatus=%d\n",		resultChargingStatus.MeterInfo.MeterStatus);
-		printf("\t\tMeterInfo.TMeter=%d\n",		resultChargingStatus.MeterInfo.TMeter);
-	}
-
-
-
-
-
-
-	/***********************************
-	 * Setup data for meteringReceipt *
-	 ***********************************/
-
-
-	meteringReceipt.SessionID = v2gHeader.SessionID;
-	meteringReceipt.SAScheduleTupleID = 12;
-	meteringReceipt.isused.SAScheduleTupleID=1;
-	meteringReceipt.MeterInfo.MeterStatus = 2;
-	meteringReceipt.MeterInfo.isused.MeterStatus = 1;
-	meteringReceipt.MeterInfo.MeterID.arraylen.data=1;
-	meteringReceipt.MeterInfo.MeterID.data[0]=3;
-
-	meteringReceipt.MeterInfo.MeterReading.Multiplier = 0;
-	meteringReceipt.MeterInfo.MeterReading.Unit = A_unitSymbolType;
-	meteringReceipt.MeterInfo.MeterReading.Value = 100;
-	meteringReceipt.MeterInfo.isused.MeterReading = 1;
-	meteringReceipt.MeterInfo.isused.SigMeterReading = 0;
-
-	meteringReceipt.MeterInfo.TMeter =123456789;
-	meteringReceipt.MeterInfo.isused.TMeter = 1;
-
-	meteringReceipt.isused.attr_Id=0; /* message is not signed */
-
-	printf("\n\nEV side: prepare EVSE meteringReceipt\n");
-
-	/****************************
-	 * Prepare meteringReceipt  *
-	 ****************************/
-
-	if(prepare_meteringReceipt(&service,&v2gHeader,&meteringReceipt,&resultMeteringReceipt))
-	{
-		printErrorMessage(&service);
-		return 0; /* stop here */
-	}
-
-	printf("EV side: call EVSE meteringReceipt \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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the meteringReceipt response message */
-	if(resMsg==METERINGRECEIPTRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("EV side: received response message from EVSE\n");
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("\tResponseCode=%d\n",resultSessionStop.ResponseCode);
-		printACEVSEStatus(&evseStatus);
-	}
-
-
-	/***********************************
-	 * Setup data for stopSession *
-	 ***********************************/
-
-	printf("\n\nEV side: prepare EVSE stopSession\n");
-
-	/************************
-	 * Prepare stopSession  *
-	 ************************/
-
-	if(prepare_sessionStop(&service,&v2gHeader,&resultSessionStop))
-	{
-		printErrorMessage(&service);
-		return 0; /* stop here */
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the stopSession response message */
-	if(resMsg==SESSIONSTOPRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("EV side: received response message from EVSE\n");
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("\tResponseCode=%d\n",resultSessionStop.ResponseCode);
-	}
-
-
-	return 0;
-}
-
-static int dc_charging()
-{
-
-
-
-	static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
-	static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
-
-	/* define in and out byte stream */
-	uint8_t inStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-	uint8_t outStream[MAX_STREAM_SIZE]; /* define MAX_STREAM_SIZE before */
-
-
-
-	/* define offset variable for transport header data */
-	uint16_t transportHeaderOffset;
-
-
-	/* service data structure for DC*/
-	struct EXIService service;
-	struct MessageHeaderType v2gHeader;
-	struct SessionSetupReqType sessionSetup;
-	struct SessionSetupResType resultSessionSetup;
-	struct ServiceDiscoveryReqType serviceDiscovery;
-	struct ServiceDiscoveryResType resultServiceDiscovery;
-	struct ServicePaymentSelectionReqType servicePayment;
-	struct ServicePaymentSelectionResType resultServicePayment;
-	struct ChargeParameterDiscoveryReqType powerDiscovery;
-	struct ChargeParameterDiscoveryResType resultPowerDiscovery;
-	struct CableCheckReqType cableCheck;
-	struct CableCheckResType resultCableCheck;
-	struct PowerDeliveryReqType powerDelivery;
-	struct PowerDeliveryResType resultPowerDelivery;
-	struct PreChargeReqType preCharge;
-	struct PreChargeResType resultPreCharge;
-	struct CurrentDemandReqType currentDemand;
-	struct CurrentDemandResType resultCurrentDemand;
-	struct WeldingDetectionReqType weldingDetection;
-	struct WeldingDetectionResType resultWeldingDetection;
-	struct SessionStopResType resultSessionStop;
-
-	struct DC_EVStatusType EVStatus;
-	struct DC_EVSEStatusType evseStatus;
-	struct DC_EVChargeParameterType EVChargeParameter;
-	struct DC_EVSEChargeParameterType evseChargeParameter;
-	struct DC_EVPowerDeliveryParameterType EVPowerDelivery;
-
-	struct SAScheduleListType pmaxScheduleList;
-
-	enum responseMessages resMsg;
-
-	struct PhysicalValueType float_type;
-
-	uint32_t outPayloadLength;
-
-
-	size_t i, j;
-
-	/* BINARY memory setup */
-	bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
-
-	/* STRING memory setup */
-	string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
-
-	/* setup offset for DoIP header (otherwise set
-	 * transportHeaderOffset=0 if no transfer protocol is used)*/
-	transportHeaderOffset = V2GTP_HEADER_LENGTH;
-
-
-
-
-	/*******************
-	 * Init V2G Client *
-	 *******************/
-
-	init_v2gServiceClient(&service,bytes,string,inStream,MAX_STREAM_SIZE, outStream, MAX_STREAM_SIZE, &outPayloadLength, transportHeaderOffset);
-
-
-	/*******************************
-	 * Setup data for sessionSetup *
-	 *******************************/
-
-	/* setup header information */
-	v2gHeader.SessionID.data[0] = 0; /* sessionID is always '0' at the beginning (the response message contains the valid sessionID)*/
-	v2gHeader.SessionID.data[1] = 0;
-	v2gHeader.SessionID.data[2] = 0;
-	v2gHeader.SessionID.data[3] = 0;
-	v2gHeader.SessionID.data[4] = 0;
-	v2gHeader.SessionID.data[5] = 0;
-	v2gHeader.SessionID.data[6] = 0;
-	v2gHeader.SessionID.data[7] = 0;
-	v2gHeader.SessionID.arraylen.data = 8; /* length of the byte session array is always 8*/
-
-	v2gHeader.isused.Notification=0; /* no notification */
-	v2gHeader.isused.Signature=0; /* no security */
-
-	/* setup sessionSetup parameter */
-	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");
-
-	/* 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the sessionSetup response message */
-	if(resMsg==SESSIONSETUPRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup */
-		printf("EV: received response message from EVSE\n");
-		printf("\tHeader SessionID=");
-		printBinaryArray(v2gHeader.SessionID.data,v2gHeader.SessionID.arraylen.data );
-		printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode);
-		printf("\tEVSEID=%d\n",	resultSessionSetup.EVSEID.data[0]);
-		printf("\tDateTimeNow=%d\n",resultSessionSetup.DateTimeNow);
-	}
-
-	/*******************************************
-	 * Setup data for serviceDiscovery *
-	 *******************************************/
-
-	serviceDiscovery.isused.ServiceCategory=1;
-	serviceDiscovery.ServiceCategory = 	EVCharging_serviceCategoryType;
-	serviceDiscovery.isused.ServiceScope=0;
-
-
-	printf("\n\nEV side: prepare EVSE serviceDiscovery\n");
-
-	/****************************
-	 * Prepare serviceDiscovery *
-	 ****************************/
-
-	prepare_serviceDiscovery(&service,&v2gHeader, &serviceDiscovery,&resultServiceDiscovery);
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the serviceDiscovery response message */
-	if(resMsg==SERVICEDISCOVERYRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup */
-		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);
-		printf("\t ServiceID=%d\n",	resultServiceDiscovery.ChargeService.ServiceTag.ServiceID);
-		printf("\t ServiceName=");
-		printASCIIString(resultServiceDiscovery.ChargeService.ServiceTag.ServiceName.data,(uint32_t)resultServiceDiscovery.ChargeService.ServiceTag.ServiceName.arraylen.data );
-		if(	resultServiceDiscovery.PaymentOptions.PaymentOption[0]==ExternalPayment_paymentOptionType)
-		printf("\t PaymentOption=ExternalPayment\n");
-		if(resultServiceDiscovery.ChargeService.EnergyTransferType==AC_single_DC_core_EVSESupportedEnergyTransferType)
-		printf("\t EnergyTransferType=AC_single_DC_core\n");
-	}
-
-
-	/*******************************************
-	 * Setup data for ServicePaymentSelection *
-	 *******************************************/
-
-	servicePayment.SelectedPaymentOption = ExternalPayment_paymentOptionType;
-	servicePayment.SelectedServiceList.SelectedService[0].ServiceID=1; /* charge server ID */
-	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 *
-	 **************************************/
-
-	if(prepare_servicePaymentSelection(&service,&v2gHeader, &servicePayment,&resultServicePayment))
-	{
-		printErrorMessage(&service);
-		return 0;
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the servicePaymentSelection response message */
-	if(resMsg==SERVICEPAYMENTSELECTIONRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup */
-		printf("EV: received response message from EVSE\n");
-		printf("\tHeader SessionID=");
-		printBinaryArray(v2gHeader.SessionID.data,v2gHeader.SessionID.arraylen.data );
-		printf("\t ResponseCode=%d\n",resultServicePayment.ResponseCode);
-	}
-
-
-
-	/*******************************************
-	 * Setup data for chargeParameterDiscovery *
-	 *******************************************/
-
-	/* setup EVStatus */
-
-	EVStatus.EVRESSSOC = 89;
-	EVStatus.EVReady = 1;
-	EVStatus.EVCabinConditioning = 1;
-	EVStatus.EVRESSConditioning = 1;
-	EVStatus.isused.EVCabinConditioning=1;
-	EVStatus.isused.EVRESSConditioning=1;
-	EVStatus.EVErrorCode = NO_ERROR_DC_EVErrorCodeType;
-
-	EVChargeParameter.DC_EVStatus = EVStatus;
-
-
-	float_type.Multiplier = 0;
-	float_type.Unit = A_unitSymbolType;
-	float_type.isused.Unit=1;
-	float_type.Value = 60;
-
-	EVChargeParameter.EVMaximumCurrentLimit = float_type;
-
-	float_type.Unit = W_unitSymbolType;
-	float_type.Value = 20000;
-
-	EVChargeParameter.EVMaximumPowerLimit = float_type;
-	EVChargeParameter.isused.EVMaximumPowerLimit = 1;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 420;
-
-	EVChargeParameter.EVMaximumVoltageLimit= float_type;
-
-	float_type.Unit = W_s_unitSymbolType;
-	float_type.Value = 15000;
-
-	EVChargeParameter.EVEnergyCapacity= float_type;
-	EVChargeParameter.isused.EVEnergyCapacity = 1;
-
-	float_type.Unit = W_s_unitSymbolType;
-	float_type.Value = 5000;
-
-	EVChargeParameter.EVEnergyRequest= float_type;
-	EVChargeParameter.isused.EVEnergyRequest = 1;
-
-	EVChargeParameter.FullSOC=99;
-	EVChargeParameter.isused.FullSOC = 1;
-
-	EVChargeParameter.BulkSOC=80;
-	EVChargeParameter.isused.BulkSOC = 1;
-
-	powerDiscovery.EVRequestedEnergyTransferType = DC_combo_core_EVRequestedEnergyTransferType;
-
-	powerDiscovery.DC_EVChargeParameter = &EVChargeParameter;
-	powerDiscovery.isused.DC_EVChargeParameter = 1; /* we use here DC based charging parameters */
-	powerDiscovery.isused.AC_EVChargeParameter = 0;
-
-	resultPowerDiscovery.DC_EVSEChargeParameter = &evseChargeParameter; /* we expect DC-based parameters from the evse*/
-
-	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 *
-	 ************************************/
-
-	if(prepare_chargeParameterDiscovery(&service,&v2gHeader, &powerDiscovery,&resultPowerDiscovery))
-	{
-		printErrorMessage(&service);
-		return 0;
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the chargeParameterDiscovery response message */
-	if(resMsg==CHARGEPARAMETERDISCOVERYRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("\nEV side: received response message from EVSE\n");
-		printf("\t\t Header SessionID=%d\n",v2gHeader.SessionID.data[0]);
-		printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode);
-		printDCEVSEStatus(&(resultPowerDiscovery.DC_EVSEChargeParameter->DC_EVSEStatus));
-		printf("\tEVSEMaximumCurrentLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMaximumCurrentLimit.Value);
-		printf("\tEVSEMaximumPowerLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMaximumPowerLimit.Value);
-		printf("\tEVSEMaximumVoltageLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMaximumVoltageLimit.Value);
-		printf("\tEVSEMinimumCurrentLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMinimumCurrentLimit.Value);
-
-		printf("\tEVSEMinimumVoltageLimit=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEMinimumVoltageLimit.Value);
-		printf("\tEVSECurrentRegulationTolerance=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSECurrentRegulationTolerance.Value);
-		printf("\tEVSEPeakCurrentRipple=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEPeakCurrentRipple.Value);
-		printf("\tEVSEEnergyToBeDelivered=%d\n",resultPowerDiscovery.DC_EVSEChargeParameter->EVSEEnergyToBeDelivered.Value);
-
-		/* show PMax schedule, if there one provided  */
-		if(resultPowerDiscovery.isused.SAScheduleList)
-		{
-			printf("\tSAScheduleList: \n");
-
-			for(i=0; i< pmaxScheduleList.arraylen.SAScheduleTuple;i++)
-			{
-				printf("\t\t Tuple#%d: \n",(i+1));
-				printf("\t\t SAScheduleTupleID=%d: \n", pmaxScheduleList.SAScheduleTuple[i].SAScheduleTupleID);
-				printf("\t\t PMaxScheduleID=%d: \n",pmaxScheduleList.SAScheduleTuple[i].PMaxSchedule.PMaxScheduleID);
-
-				for(j=0; j< pmaxScheduleList.SAScheduleTuple[i].PMaxSchedule.arraylen.PMaxScheduleEntry;j++)
-				{
-					printf("\t\t\t Entry#%d: \n",(j+1));
-					printf("\t\t\t\t PMax=%d \n",pmaxScheduleList.SAScheduleTuple[i].PMaxSchedule.PMaxScheduleEntry[j].PMax);
-					printf("\t\t\t\t Start=%d \n",pmaxScheduleList.SAScheduleTuple[i].PMaxSchedule.PMaxScheduleEntry[j].RelativeTimeInterval.start);
-					if(pmaxScheduleList.SAScheduleTuple[i].PMaxSchedule.PMaxScheduleEntry[j].RelativeTimeInterval.isused.duration)
-						printf("\t\t\t\t Duration=%d \n",pmaxScheduleList.SAScheduleTuple[i].PMaxSchedule.PMaxScheduleEntry[j].RelativeTimeInterval.duration);
-				}
-			}
-		}
-	}
-
-
-
-
-	/*****************************
-	 * Setup data for cableCheck *
-	 *****************************/
-
-	/* setup EVStatus */
-	cableCheck.DC_EVStatus =EVStatus;
-
-
-	printf("\n\nEV side: prepare EVSE cableCheck\n");
-
-	/**********************
-	 * Prepare cableCheck *
-	 **********************/
-
-	if(prepare_cableCheck(&service,&v2gHeader,&cableCheck,&resultCableCheck))
-	{
-		printErrorMessage(&service);
-		return 0; /* stop here */
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the cableCheck response message */
-	if(resMsg==CABLECHECKRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("EV 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));
-	}
-
-
-	/*****************************
-	 * Setup data for preCharge  *
-	 *****************************/
-
-	/* setup EVStatus */
-	preCharge.DC_EVStatus =EVStatus;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 100;
-	preCharge.EVTargetCurrent = float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 200;
-	preCharge.EVTargetVoltage = float_type;
-
-	printf("\n\nEV side: prepare EVSE preCharge\n");
-
-	/**********************
-	 * Prepare preCharge  *
-	 **********************/
-
-	if(prepare_preCharge(&service,&v2gHeader,&preCharge,&resultPreCharge))
-	{
-		printErrorMessage(&service);
-		return 0; /* stop here */
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the preCharge response message */
-	if(resMsg==PRECHARGERES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("EV 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);
-		printf("\tEVSEPresentVoltage=%d\n",resultPreCharge.EVSEPresentVoltage.Value);
-	}
-
-
-
-	/*********************************
-	 * Setup data for powerDelivery *
-	 *********************************/
-
-	powerDelivery.ReadyToChargeState = 1;
-
-	EVPowerDelivery.DC_EVStatus = EVStatus;
-	EVPowerDelivery.BulkChargingComplete = 1;
-	EVPowerDelivery.isused.BulkChargingComplete = 1;
-	EVPowerDelivery.ChargingComplete = 0;
-
-	powerDelivery.DC_EVPowerDeliveryParameter = &EVPowerDelivery;
-	powerDelivery.isused.DC_EVPowerDeliveryParameter = 1; /* DC parameters are send */
-
-
-	/* we are using a charging profile */
-	powerDelivery.isused.ChargingProfile=1;
-	powerDelivery.ChargingProfile.SAScheduleTupleID = pmaxScheduleList.SAScheduleTuple[0].SAScheduleTupleID;
-
-	/* set up 3 entries */
-	powerDelivery.ChargingProfile.ProfileEntry[0].ChargingProfileEntryMaxPower=0;
-	powerDelivery.ChargingProfile.ProfileEntry[0].ChargingProfileEntryStart=0;
-	powerDelivery.ChargingProfile.ProfileEntry[1].ChargingProfileEntryMaxPower=20000;
-	powerDelivery.ChargingProfile.ProfileEntry[1].ChargingProfileEntryStart=300; /* 5min */
-	powerDelivery.ChargingProfile.ProfileEntry[2].ChargingProfileEntryMaxPower=0;
-	powerDelivery.ChargingProfile.ProfileEntry[2].ChargingProfileEntryStart=1200; /* 20min */
-	powerDelivery.ChargingProfile.arraylen.ProfileEntry=3;
-
-
-
-	resultPowerDelivery.DC_EVSEStatus = &evseStatus; /* we expect the DC-based EVSE status */
-
-	printf("\n\nEV side: prepare EVSE powerDelivery\n");
-
-
-	/**************************
-	 * Prepare powerDelivery  *
-	 **************************/
-
-	if(prepare_powerDelivery(&service,&v2gHeader,&powerDelivery,&resultPowerDelivery))
-	{
-		printErrorMessage(&service);
-		return 0; /* stop here */
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the powerDelivery response message */
-	if(resMsg==POWERDELIVERYRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		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);
-	}
-
-
-
-
-
-	/*********************************
-	 * Setup data for currentDemand *
-	 *********************************/
-
-	currentDemand.DC_EVStatus = EVStatus;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 100;
-
-	currentDemand.EVTargetCurrent = float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 420;
-
-	currentDemand.EVMaximumVoltageLimit = float_type;
-	currentDemand.isused.EVMaximumVoltageLimit = 1;
-
-	float_type.Unit = W_unitSymbolType;
-	float_type.Value = 20000;
-
-	currentDemand.EVMaximumPowerLimit = float_type;
-	currentDemand.isused.EVMaximumPowerLimit = 1;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 60;
-
-	currentDemand.EVMaximumCurrentLimit = float_type;
-	currentDemand.isused.EVMaximumCurrentLimit = 1;
-
-	currentDemand.BulkChargingComplete = 0;
-	currentDemand.isused.BulkChargingComplete = 1;
-
-	currentDemand.ChargingComplete = 0;
-
-	float_type.Unit = s_unitSymbolType;
-	float_type.Value = 300; /* 5 min*/
-
-	currentDemand.RemainingTimeToFullSoC = float_type;
-	currentDemand.isused.RemainingTimeToFullSoC = 1;
-
-	float_type.Unit = s_unitSymbolType;
-	float_type.Value = 120; /* 3 min */
-
-	currentDemand.RemainingTimeToBulkSoC = float_type;
-	currentDemand.isused.RemainingTimeToBulkSoC = 1;
-
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 400;
-
-	currentDemand.EVTargetVoltage = float_type;
-
-
-	printf("\n\nEV side: prepare EVSE currentDemand\n");
-
-	/**************************
-	 * Prepare currentDemand  *
-	 **************************/
-
-	if(prepare_currentDemand(&service,&v2gHeader,&currentDemand,&resultCurrentDemand))
-	{
-		printErrorMessage(&service);
-		return 0; /* stop here */
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the sessionSetup response message */
-	if(resMsg==CURRENTDEMANDRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		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);
-		printf("\t EVSEPresentVoltage=%d\n",resultCurrentDemand.EVSEPresentVoltage.Value);
-		printf("\t EVSEPresentCurrent=%d\n",resultCurrentDemand.EVSEPresentCurrent.Value);
-		printf("\t EVSECurrentLimitAchieved=%d\n",resultCurrentDemand.EVSECurrentLimitAchieved);
-		printf("\t EVSEVoltageLimitAchieved=%d\n",resultCurrentDemand.EVSEVoltageLimitAchieved);
-
-		printf("\t EVSEPowerLimitAchieved=%d\n",resultCurrentDemand.EVSEPowerLimitAchieved);
-		printf("\t EVSEMaximumVoltageLimit=%d\n",resultCurrentDemand.EVSEMaximumVoltageLimit.Value);
-		printf("\t EVSEMaximumCurrentLimit=%d\n",resultCurrentDemand.EVSEMaximumCurrentLimit.Value);
-		printf("\t EVSEMaximumPowerLimit=%d\n",resultCurrentDemand.EVSEMaximumPowerLimit.Value);
-	}
-
-
-
-
-
-
-	/***********************************
-	 * Setup data for weldingDetection *
-	 ***********************************/
-
-	weldingDetection.DC_EVStatus =EVStatus;
-
-
-
-	printf("\n\nEV side: prepare EVSE weldingDetection\n");
-
-	/**************************
-	 * Prepare weldingDetection  *
-	 **************************/
-
-	if(prepare_weldingDetection(&service,&v2gHeader,&weldingDetection,&resultWeldingDetection))
-	{
-		printErrorMessage(&service);
-		return 0; /* stop here */
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the sessionSetup response message */
-	if(resMsg==WELDINGDETECTIONRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("EV 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);
-		printf("\tEVSEPresentVoltage=%d\n",resultWeldingDetection.EVSEPresentVoltage.Value);
-	}
-
-
-
-
-
-	/***********************************
-	 * Setup data for stopSession *
-	 ***********************************/
-
-	printf("\n\nEV side: prepare EVSE stopSession\n");
-
-	/************************
-	 * Prepare stopSession  *
-	 ************************/
-
-	if(prepare_sessionStop(&service,&v2gHeader,&resultSessionStop))
-	{
-		printErrorMessage(&service);
-		return 0; /* stop here */
-	}
-
-	printf("EV 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
-	 * the output stream.
-	 * */
-
-	serviceDataTransmitter(outStream, outPayloadLength, inStream);
-
-	/* this methods deserialize the response EXI stream and determines the kind of
-	 * the response message */
-	if(determineResponseMesssage(&service, &resMsg))
-	{
-		printErrorMessage(&service);
-	}
-
-	/* check, if this is the sessionSetup response message */
-	if(resMsg==SESSIONSTOPRES)
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("EV side: received response message from EVSE\n");
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("\tResponseCode=%d\n",resultCurrentDemand.ResponseCode);
-	}
-
-
-	return 0;
-}
-
-
-
-int main_service()
-{
-	printf("+++ Start application handshake protocol example +++\n\n");
-
-	appHandshake();
-
-	printf("+++ Terminate application handshake protocol example +++\n\n");
-
-	printf("\n\nPlease press enter for AC charging!\n");
-	fflush(stdout);
-	 getchar();
-	printf("+++ Start V2G client / service example for AC charging +++\n\n");
-
-	 ac_charging();
-
-	printf("\n+++ Terminate V2G Client / Service example for AC charging +++\n");
-	printf("Please press enter for DC charging!\n");
-	fflush(stdout);
-	getchar();
-
-	printf("+++ Start V2G client / service example for DC charging +++\n\n");
-
-	dc_charging();
-
-	printf("\n+++ Terminate V2G client / service example for DC charging +++");
-
-	return 0;
-}
-
-static void printACEVSEStatus(struct AC_EVSEStatusType* status)
-{
-	printf("\tEVSEStatus:\n");
-	printf("\t\tPowerSwitchClosed=%d\n",status->PowerSwitchClosed);
-	printf("\t\tRCD=%d\n",status->RCD);
-	printf("\t\tShutDownTime=%d\n",status->ShutDownTime);
-	printf("\t\tStopCharging=%d\n",status->StopCharging);
-}
-
-static void printDCEVSEStatus(struct DC_EVSEStatusType* status)
-{
-	if(status->isused.EVSEIsolationStatus)
-		printf("\tEVSEStatus:\n\t\tEVSEIsolationStatus=%d\n",status->EVSEIsolationStatus);
-
-	printf("\t\tEVSEStatusCode=%d\n",status->EVSEStatusCode);
-
-}
-
-static void printErrorMessage(struct EXIService* service)
-{
-	if(service->errorCode==EXI_NON_VALID_MESSAGE)
-	{
-		printf("EV did not send a valid V2G message!\n");
-	}
-	else if(service->errorCode==EXI_SERIALIZATION_FAILED)
-	{
-		printf("EVSE error: Could not serialize the response message\n");
-	} 	else if(service->errorCode==EXI_SERIALIZATION_FAILED)
-	{
-		printf("EVSE error: Could not serialize the response message\n");
-	}
-}
-
-static void printASCIIString(uint32_t* string, uint32_t len) {
-	unsigned int i;
-	for(i=0; i<len; i++) {
-		printf("%c",(char)string[i]);
-	}
-	printf("\n");
-}
-
-static void printBinaryArray(uint8_t* byte, uint32_t len) {
-	unsigned int i;
-	for(i=0; i<len; i++) {
-		printf("%d ",byte[i]);
-	}
-	printf("\n");
-}
-
-static int writeStringToEXIString(char* string, uint32_t* exiString)
-{
-
-	int pos=0;
-	while(string[pos]!='\0')
-	{
-		exiString[pos] = string[pos];
-		pos++;
-	}
-
-	return pos;
-}
-

+ 0 - 49
src/test/serviceClientDataTransmitter.c

@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2007-2012 Siemens AG
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @@version 0.6
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#include "v2g_serviceClientDataTransmitter.h"
-#include "evse_server.h"
-#include "v2gtp.h"
-
-/*
- * Send EXI stream (outStream) to EVSE and receive a response stream (inStream)*/
-int serviceDataTransmitter(uint8_t* outStream, uint16_t outStreamLength, uint8_t* inStream)
-{
-	/* send output stream to the underlying network to the EVSE and wait for response
-	 * --> here provide data to the V2G server directly*/
-
-	uint16_t inStreamLength = 0;
-	uint16_t payloadLength = 0;
-
-	/* setup v2gtp header information; outStreamLength==payloadLength*/
-	write_v2gtpHeader(outStream,&outStreamLength,V2GTP_EXI_TYPE);
-
-	/* send data to EVSE server (add v2g offset)*/
-	testV2GService(outStream, outStreamLength, inStream, &inStreamLength);
-
-
-
-	return 	read_v2gtpHeader(inStream,inStreamLength, &payloadLength);;
-}

+ 0 - 44
src/test/v2g_serviceClientDataTransmitter.h

@@ -1,44 +0,0 @@
-
-/*
- * Copyright (C) 2007-2010 Siemens AG
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*******************************************************************
- *
- * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.6
- * @contact Joerg.Heuer@siemens.com
- *
- ********************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef V2G_SERVICECLIENTDATATRANSMITTER_H_
-#define V2G_SERVICECLIENTDATATRANSMITTER_H_
-
-#include "EXITypes.h"
-
-/* This method has to be implemented!
- * This method sends EXI stream (outStream) to the EVSE and receives response stream (inStream)*/
-int serviceDataTransmitter(uint8_t* outStream, uint16_t outStreamLength, uint8_t* inStream);
-
-#endif /* V2G_SERVICECLIENTDATATRANSMITTER_H_ */
-
-#ifdef __cplusplus
-}
-#endif