main files

git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@67 d9f2db14-54d0-4bde-b00c-16405c910529
This commit is contained in:
sebastiankb 2012-04-02 11:03:22 +00:00
parent ddb210805a
commit 99a33ccd91
5 changed files with 92 additions and 4 deletions

View file

@ -123,6 +123,8 @@ struct EXIDocumentType_appHand
void init_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type); void init_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type);
void init_AnonType_supportedAppProtocolReq(struct AnonType_supportedAppProtocolReq* type);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus

44
src/test/main.c Normal file
View file

@ -0,0 +1,44 @@
/*
* 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 Daniel.Peintner.EXT@siemens.com
* @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.6
* @contact Joerg.Heuer@siemens.com
*
* <p>Switch for sample programs: EXI codec only or for entire V2G service</p>
*
********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "main.h"
int main(int argc, char *argv[]) {
#if CODE_VERSION == CODE_VERSION_EXI
/* EXI codec only */
return main_codec(argc, argv);
#elif CODE_VERSION == CODE_VERSION_SERVICE
/* V2G client / service example scenario */
return main_service(argc, argv);
#endif
}

42
src/test/main.h Normal file
View file

@ -0,0 +1,42 @@
/*
* 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 Daniel.Peintner.EXT@siemens.com
* @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.6
* @contact Joerg.Heuer@siemens.com
*
*
********************************************************************/
#define CODE_VERSION_EXI 1
#define CODE_VERSION_SERVICE 2
#define CODE_VERSION CODE_VERSION_SERVICE
#ifndef MAIN_H_
#define MAIN_H_
#if CODE_VERSION == CODE_VERSION_EXI
int main_codec(int argc, char *argv[]);
#elif CODE_VERSION == CODE_VERSION_SERVICE
int main_service(int argc, char *argv[]);
#endif
#endif

View file

@ -66,7 +66,7 @@ static void debugValue(exi_value_t* val);
#endif /*EXI_DEBUG*/ #endif /*EXI_DEBUG*/
int xmain(int argc, char *argv[]) { int main_codec(int argc, char *argv[]) {
int errn = 0; int errn = 0;

View file

@ -1411,7 +1411,7 @@ static int dc_charging()
int main() int main_service()
{ {
printf("+++ Start application handshake protocol example +++\n\n"); printf("+++ Start application handshake protocol example +++\n\n");