diff --git a/src/appHandshake/appHand_dataTypes.h b/src/appHandshake/appHand_dataTypes.h index fd6814b..144ed97 100644 --- a/src/appHandshake/appHand_dataTypes.h +++ b/src/appHandshake/appHand_dataTypes.h @@ -123,6 +123,8 @@ struct EXIDocumentType_appHand void init_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type); +void init_AnonType_supportedAppProtocolReq(struct AnonType_supportedAppProtocolReq* type); + #endif #ifdef __cplusplus diff --git a/src/test/main.c b/src/test/main.c new file mode 100644 index 0000000..b3fe303 --- /dev/null +++ b/src/test/main.c @@ -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 . + */ + +/******************************************************************* + * + * @author Daniel.Peintner.EXT@siemens.com + * @author Sebastian.Kaebisch.EXT@siemens.com + * @version 0.6 + * @contact Joerg.Heuer@siemens.com + * + *

Switch for sample programs: EXI codec only or for entire V2G service

+ * + ********************************************************************/ + +#include +#include + +#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 + +} + diff --git a/src/test/main.h b/src/test/main.h new file mode 100644 index 0000000..9dd212d --- /dev/null +++ b/src/test/main.h @@ -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 . + */ + +/******************************************************************* + * + * @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 diff --git a/src/test/main_codec.c b/src/test/main_codec.c index c9313c4..605bf50 100644 --- a/src/test/main_codec.c +++ b/src/test/main_codec.c @@ -66,7 +66,7 @@ static void debugValue(exi_value_t* val); #endif /*EXI_DEBUG*/ -int xmain(int argc, char *argv[]) { +int main_codec(int argc, char *argv[]) { int errn = 0; diff --git a/src/test/pev_service.c b/src/test/pev_service.c index 8829b4c..a213edf 100644 --- a/src/test/pev_service.c +++ b/src/test/pev_service.c @@ -1411,7 +1411,7 @@ static int dc_charging() -int main() +int main_service() { printf("+++ Start application handshake protocol example +++\n\n"); @@ -1426,7 +1426,7 @@ int main() ac_charging(); - printf("\n+++Terminate V2G Client / Service example for AC charging +++\n"); + printf("\n+++ Terminate V2G Client / Service example for AC charging +++\n"); printf("Please press enter for DC charging!\n"); fflush(stdout); getchar(); @@ -1435,7 +1435,7 @@ int main() dc_charging(); - printf("\n+++Terminate V2G client / service example for DC charging +++"); + printf("\n+++ Terminate V2G client / service example for DC charging +++"); return 0; }