- service 0.2.2

git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@16 d9f2db14-54d0-4bde-b00c-16405c910529
This commit is contained in:
sebastiankb 2010-10-20 16:10:37 +00:00
parent 69e25e0172
commit 331e3ecbb1
21 changed files with 3168 additions and 3798 deletions

View file

@ -28,7 +28,7 @@
<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1326060222" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> <option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.1326060222" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.113647340" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug"> <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.113647340" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1898653479" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" value="gnu.c.optimization.level.most" valueType="enumerated"/> <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1898653479" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" value="gnu.c.optimization.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.294845555" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> <option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.294845555" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.773068816" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> <option id="gnu.c.compiler.option.include.paths.773068816" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/OpenV2G/src/codec}&quot;"/> <listOptionValue builtIn="false" value="&quot;${workspace_loc:/OpenV2G/src/codec}&quot;"/>
@ -37,7 +37,7 @@
</option> </option>
<option id="gnu.c.compiler.option.warnings.pedantic.1676854851" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/> <option id="gnu.c.compiler.option.warnings.pedantic.1676854851" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.misc.ansi.722225100" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="true" valueType="boolean"/> <option id="gnu.c.compiler.option.misc.ansi.722225100" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="true" valueType="boolean"/>
<option id="gnu.c.compiler.option.optimization.flags.1389725002" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="-Os" valueType="string"/> <option id="gnu.c.compiler.option.optimization.flags.1389725002" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.67299528" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/> <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.67299528" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool> </tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.867726048" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug"> <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.867726048" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
@ -33,6 +33,13 @@ extern "C" {
#include "v2g_serviceDataTypes.h" #include "v2g_serviceDataTypes.h"
#include "EXITypes.h" #include "EXITypes.h"
struct uniqueIDPath
{
int id[10];
size_t pos;
};
struct v2gService struct v2gService
{ {
/* in-/ out-stream */ /* in-/ out-stream */
@ -49,8 +56,12 @@ struct v2gService
/* v2g message data structure */ /* v2g message data structure */
struct AnonType_V2G_Message v2gMsg; struct AnonType_V2G_Message v2gMsg;
/* unique id for ambiguous elements */
struct uniqueIDPath idPath;
}; };
#endif /* V2G_SERVICE_H_ */ #endif /* V2G_SERVICE_H_ */
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
@ -1451,8 +1451,8 @@ static int serialize_FloatingValueType(struct FloatingValueType* type, struct v2
return -1; return -1;
} }
service->val.type = INTEGER_16; service->val.type = INTEGER_64;
service->val.int32=service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value; service->val.int64=service->v2gMsg.Body.PowerDiscoveryReq.EAmount.Value;
/* encode character Value */ /* encode character Value */
if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0) if (exiEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)) < 0)

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -19,7 +19,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
@ -121,6 +121,42 @@ enum unitMultiplierType
}; };
enum unitSymbolType
{
A,
deg,
F,
g,
h,
H,
Hz,
Hz_1,
J,
J_s,
kg_J,
min,
N,
C,
ohm,
Pa,
rad,
s,
S,
s_1,
V,
V_VAr,
VA,
VAh,
VAr,
VArh,
W,
W_Hz,
W_s,
Wh,
Ah
};
enum responseCode_PowerDiscoveryType enum responseCode_PowerDiscoveryType
{ {
OK_PowerDiscovery, OK_PowerDiscovery,
@ -586,8 +622,8 @@ struct PaymentDetailsResType
struct FloatingValueType struct FloatingValueType
{ {
enum unitMultiplierType Multiplier; enum unitMultiplierType Multiplier;
enum unitMultiplierType Unit; enum unitSymbolType Unit;
int32_t Value; int64_t Value;
}; };

File diff suppressed because it is too large Load diff

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -22,7 +22,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
@ -37,7 +37,8 @@ extern "C" {
#include "v2g_serviceDataTypes.h" #include "v2g_serviceDataTypes.h"
#include "EXITypes.h" #include "EXITypes.h"
/* service methods */ /* This service methods has to be implemented by the EVSE server */
int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result); int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result);
int serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result); int serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result);

View file

@ -35,7 +35,7 @@ int main(int argc, char *argv[]) {
/* EXI codec only */ /* EXI codec only */
/* return main_codec(argc, argv);*/ /* return main_codec(argc, argv);*/
/* Entire V2G service */ /* V2G client / service example scenario */
return main_service(argc, argv); return main_service(argc, argv);
} }

View file

@ -15,6 +15,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * 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.2.2
* @contact Joerg.Heuer@siemens.com
*
*
********************************************************************/
#ifndef MAIN_H_ #ifndef MAIN_H_
#define MAIN_H_ #define MAIN_H_

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
@ -77,13 +77,13 @@ int main_service(int argc, char *argv[])
*******************************/ *******************************/
/* setup header information */ /* setup header information */
v2gHeader.SessionInformation.ServiceSessionID.arraylen.data = 0; /* no session id in the initial message -> array length = 0*/ v2gHeader.SessionInformation.SessionID.arraylen.data = 0; /* no session id in the initial message -> array length = 0*/
v2gHeader.SessionInformation.ProtocolVersion.data[0]='1'; /* assign protocol version number*/ v2gHeader.SessionInformation.ProtocolVersion.data[0]='1'; /* assign protocol version number*/
v2gHeader.SessionInformation.ProtocolVersion.arraylen.data=1; /* array string length =1 of protocol version */ v2gHeader.SessionInformation.ProtocolVersion.arraylen.data=1; /* array string length =1 of protocol version */
v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: signalize, protocol version is used */ v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: signalize, protocol version is used */
v2gHeader.isused.Notification=0; /* no notification */ v2gHeader.isused.Notification=0; /* no notification */
/* setup sessionSetup parameter */ /* setup sessionSetup parameters */
sessionSetup.isused.PEVID=1; /* no PEVID is transported */ sessionSetup.isused.PEVID=1; /* no PEVID is transported */
sessionSetup.PEVStatus.ChargerStandby=1; /* charger standby = true */ sessionSetup.PEVStatus.ChargerStandby=1; /* charger standby = true */
sessionSetup.PEVStatus.ConnectorLocked=0; /* connector locked = false */ sessionSetup.PEVStatus.ConnectorLocked=0; /* connector locked = false */
@ -95,7 +95,7 @@ int main_service(int argc, char *argv[])
*********************/ *********************/
call_sessionSetup(&service,&v2gHeader,&sessionSetup,&resultSessionSetup); call_sessionSetup(&service,&v2gHeader,&sessionSetup,&resultSessionSetup);
/* show result of the answer message of EVSE sessionSetup*/ /* show results of the answer message of EVSE sessionSetup*/
printf("PEV: received response message from EVSE\n"); printf("PEV: received response message from EVSE\n");
printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode); printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode);
printf("\tEVSEID=%d\n", resultSessionSetup.EVSEID.data[0]); printf("\tEVSEID=%d\n", resultSessionSetup.EVSEID.data[0]);

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
@ -31,6 +31,7 @@
#define MAX_STRING_SIZE 256 #define MAX_STRING_SIZE 256
#define MAX_STREAM_SIZE 60 #define MAX_STREAM_SIZE 60
/* Simple EVSE server implementation */
int testV2GService(uint8_t* inStream, size_t inStreamLength, uint8_t* outStream) int testV2GService(uint8_t* inStream, size_t inStreamLength, uint8_t* outStream)
{ {
static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/ static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/

View file

@ -18,7 +18,7 @@
/******************************************************************* /*******************************************************************
* *
* @author Sebastian.Kaebisch.EXT@siemens.com * @author Sebastian.Kaebisch.EXT@siemens.com
* @version 0.2.1 * @version 0.2.2
* @contact Joerg.Heuer@siemens.com * @contact Joerg.Heuer@siemens.com
* *
********************************************************************/ ********************************************************************/
@ -27,6 +27,8 @@
#include "v2g_serviceDataTypes.h" #include "v2g_serviceDataTypes.h"
#include <stdio.h> #include <stdio.h>
/* This service methods has to be implemented by the EVSE server */
int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result) int sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result)
{ {