sebastiankb 14 年之前
父节点
当前提交
16ca2e3867
共有 54 个文件被更改,包括 1113 次插入3290 次删除
  1. 1 3
      .cproject
  2. 1 13
      .project
  3. 2 11
      README.txt
  4. 10 11
      data/test/sessionSetupReq.xml
  5. 二进制
      data/test/sessionSetupReq.xml.exi
  6. 27 31
      data/test/sessionSetupRes.xml
  7. 1 1
      data/test/sessionSetupRes.xml.exi
  8. 2 2
      src/codec/BitDecoderChannel.c
  9. 2 2
      src/codec/BitDecoderChannel.h
  10. 2 2
      src/codec/BitEncoderChannel.c
  11. 2 2
      src/codec/BitEncoderChannel.h
  12. 2 2
      src/codec/BitInputStream.c
  13. 2 2
      src/codec/BitInputStream.h
  14. 2 2
      src/codec/BitOutputStream.c
  15. 2 2
      src/codec/BitOutputStream.h
  16. 2 2
      src/codec/ByteStream.c
  17. 2 2
      src/codec/ByteStream.h
  18. 2 2
      src/codec/EXICoder.c
  19. 2 2
      src/codec/EXICoder.h
  20. 10 11
      src/codec/EXIDecoder.c
  21. 2 2
      src/codec/EXIDecoder.h
  22. 2 2
      src/codec/EXIEncoder.c
  23. 2 2
      src/codec/EXIEncoder.h
  24. 2 2
      src/codec/EXIHeaderDecoder.c
  25. 2 2
      src/codec/EXIHeaderDecoder.h
  26. 2 2
      src/codec/EXIHeaderEncoder.c
  27. 2 2
      src/codec/EXIHeaderEncoder.h
  28. 2 2
      src/codec/EXITypes.h
  29. 2 2
      src/codec/StringTable.c
  30. 2 2
      src/codec/StringTable.h
  31. 35 43
      src/codec/StringTableEntries.c
  32. 2 2
      src/codec/StringTableEntries.h
  33. 2 2
      src/codec/UCSString.c
  34. 2 2
      src/codec/UCSString.h
  35. 2 2
      src/service/v2g_service.h
  36. 2 2
      src/service/v2g_serviceClientDataTransmitter.h
  37. 297 985
      src/service/v2g_serviceClientStubs.c
  38. 6 66
      src/service/v2g_serviceClientStubs.h
  39. 95 344
      src/service/v2g_serviceDataSerialization.c
  40. 60 101
      src/service/v2g_serviceDataTypes.c
  41. 143 225
      src/service/v2g_serviceDataTypes.h
  42. 320 481
      src/service/v2g_serviceDispatcher.c
  43. 2 2
      src/service/v2g_serviceDispatcher.h
  44. 3 13
      src/service/v2g_serviceMethods.h
  45. 3 4
      src/test/main.c
  46. 2 2
      src/test/main.h
  47. 2 2
      src/test/main_codec.c
  48. 19 585
      src/test/main_service.c
  49. 2 2
      src/test/v2g_server.c
  50. 2 2
      src/test/v2g_server.h
  51. 2 2
      src/test/v2g_serviceClientDataTransmitter.c
  52. 10 292
      src/test/v2g_serviceMethods.c
  53. 2 2
      src/transport/doIP.c
  54. 2 2
      src/transport/doIP.h

+ 1 - 3
.cproject

@@ -555,7 +555,6 @@
 </profile>
 </scannerConfigBuildInfo>
 </storageModule>
-<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
 </cconfiguration>
 <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.681614450">
 <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.681614450" moduleId="org.eclipse.cdt.core.settings" name="Release">
@@ -572,7 +571,7 @@
 <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.681614450." name="/" resourcePath="">
 <toolChain id="cdt.managedbuild.toolchain.gnu.base.506532925" name="Linux GCC" nonInternalBuilderId="cdt.managedbuild.target.gnu.builder.base" superClass="cdt.managedbuild.toolchain.gnu.base">
 <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.784544317" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
-<builder autoBuildTarget="all" buildPath="${workspace_loc:/OpenV2G/Release}" cleanBuildTarget="clean" id="org.eclipse.cdt.build.core.internal.builder.332458815" incrementalBuildTarget="all" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
+<builder autoBuildTarget="all" buildPath="${workspace_loc:/OpenV2G/Release}" cleanBuildTarget="clean" id="org.eclipse.cdt.build.core.internal.builder.755395484" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
 <tool id="cdt.managedbuild.tool.gnu.archiver.base.501212056" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
 <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.605628336" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
 <option id="gnu.cpp.compiler.option.optimization.level.937286096" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
@@ -1105,7 +1104,6 @@
 </profile>
 </scannerConfigBuildInfo>
 </storageModule>
-<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
 </cconfiguration>
 </storageModule>
 <storageModule moduleId="cdtBuildSystem" version="4.0.0">

+ 1 - 13
.project

@@ -17,10 +17,6 @@
 					<key>org.eclipse.cdt.make.core.append_environment</key>
 					<value>true</value>
 				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildArguments</key>
 					<value></value>
@@ -31,11 +27,7 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
-					<value>${workspace_loc:/OpenV2G/Release}</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
+					<value>${workspace_loc:/OpenV2G/Debug}</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.contents</key>
@@ -53,10 +45,6 @@
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>all</value>
-				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>true</value>

+ 2 - 11
README.txt

@@ -1,13 +1,13 @@
 -------------------------------------------------------------------------
 OpenV2G - an open source project implementing the basic functionality of the ISO IEC 15118 vehicle to grid (V2G) communication interface 
-Version 0.4, released April 14, 2011
+Version 0.3.1, released December 22, 2010
 http://openv2g.sourceforge.net/
 
 Please report bugs via the SourceForge bug tracking system at http://sourceforge.net/tracker/?group_id=350113.
 Thank you.
 
 
-Copyright (C) 2007-2011 Siemens AG
+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
@@ -22,15 +22,6 @@ 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/>.
 
--------------------------------------------------------------------------
-CHANGES from version 0.3.1:
--------------------------------------------------------------------------
-* adaption of V2G schema changes
-* supporting of DC messages
-* example program showing the message sequence of AC charging and 
-DC charging
-* bug-fixes
-
 -------------------------------------------------------------------------
 CHANGES from version 0.3:
 -------------------------------------------------------------------------

+ 10 - 11
data/test/sessionSetupReq.xml

@@ -1,22 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<ns0:V2G_Message xmlns:ns0="urn:iso:15118:2:2010:eval1.0:MsgDef" xmlns:ns1="urn:iso:15118:2:2010:eval1.0:MsgBody"
-    xmlns:ns2="urn:iso:15118:2:2010:eval1.0:MsgDataTypes"
- xmlns:ns3="urn:iso:15118:2:2010:eval1.0:MsgHeader"
+<ns3:V2G_Message xmlns:ns1="urn:iso:15118:2:2010:MsgBody"
+ xmlns:ns2="urn:iso:15118:2:2010:MsgDataTypes"
+ xmlns:ns3="urn:iso:15118:2:2010:MsgDef"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:iso:15118:2:2010:eval1.0:MsgDef V2G_CI_MsgDef.xsd">
-    <ns0:Header>
+ xsi:schemaLocation="urn:iso:15118:2:2010:MsgDef V2G_CI_MsgDef.xsd">
+    <ns3:Header>
         <ns3:SessionInformation>
             <ns2:SessionID>3031323334353637</ns2:SessionID>
             <ns2:ProtocolVersion>1</ns2:ProtocolVersion>
         </ns3:SessionInformation>
-    </ns0:Header>
-    <ns0:Body>
-        <ns1:SessionSetupReq>            
+    </ns3:Header>
+    <ns3:Body>
+        <ns1:SessionSetupReq>
             <ns1:PEVStatus>
                 <ns2:ConnectorLocked>0</ns2:ConnectorLocked>
                 <ns2:ChargerStandby>1</ns2:ChargerStandby>
-                <ns2:ReadyToCharge>false</ns2:ReadyToCharge>
             </ns1:PEVStatus>
         </ns1:SessionSetupReq>
-    </ns0:Body>
-</ns0:V2G_Message>
+    </ns3:Body>
+</ns3:V2G_Message>

二进制
data/test/sessionSetupReq.xml.exi


+ 27 - 31
data/test/sessionSetupRes.xml

@@ -1,32 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<ns0:V2G_Message xmlns:ns0="urn:iso:15118:2:2010:eval1.0:MsgDef"
-    xmlns:ns1="urn:iso:15118:2:2010:eval1.0:MsgBody"
-    xmlns:ns2="urn:iso:15118:2:2010:eval1.0:MsgDataTypes"
-    xmlns:ns3="urn:iso:15118:2:2010:eval1.0:MsgHeader"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="urn:iso:15118:2:2010:eval1.0:MsgDef V2G_CI_MsgDef.xsd">
-    <ns0:Header>
-        <ns3:SessionInformation>
-            <ns2:SessionID>0Fb80Fb80Fb80Fb8</ns2:SessionID>
-            <ns2:ProtocolVersion>1</ns2:ProtocolVersion>
-        </ns3:SessionInformation>
-    </ns0:Header>
-    <ns0:Body>
-        <ns1:SessionSetupRes>
-            <ns1:ResponseCode>OK_SessionSetup</ns1:ResponseCode>
-            <ns1:EVSEID>54</ns1:EVSEID>
-            <ns1:EVSEStatus>
-                <ns2:FatalError>0</ns2:FatalError>
-                <ns2:EVSEStandby>1</ns2:EVSEStandby>
-                <ns2:ConnectorLocked>1</ns2:ConnectorLocked>
-                <ns2:PowerSwitchClosed>0</ns2:PowerSwitchClosed>
-                <ns2:RCD>1</ns2:RCD>
-                <ns2:ShutDownTime>123456789</ns2:ShutDownTime>
-                <ns2:ChargerStandby>1</ns2:ChargerStandby>
-                <ns2:EVSEMalfunction>false</ns2:EVSEMalfunction>
-                <ns2:StopCharging>true</ns2:StopCharging>
-            </ns1:EVSEStatus>
-            <ns1:TCurrent>123456789</ns1:TCurrent>
-        </ns1:SessionSetupRes>
-    </ns0:Body>
-</ns0:V2G_Message>
+<v2gci_d:V2G_Message xmlns:v2gci_d="urn:iso:15118:2:2010:MsgDef"
+ xmlns:v2gci_t="urn:iso:15118:2:2010:MsgDataTypes"
+ xmlns:ns0="urn:iso:15118:2:2010:MsgBody"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:iso:15118:2:2010:MsgDef V2G_CI_MsgDef.xsd">
+    <v2gci_d:Header>
+        <v2gci_d:SessionInformation>
+            <v2gci_t:SessionID>0Fb80Fb80Fb80Fb8</v2gci_t:SessionID>
+            <v2gci_t:ProtocolVersion>1</v2gci_t:ProtocolVersion>
+        </v2gci_d:SessionInformation>
+    </v2gci_d:Header>
+    <v2gci_d:Body>
+        <ns0:SessionSetupRes>
+            <ns0:ResponseCode>OK_SessionSetup</ns0:ResponseCode>
+            <ns0:EVSEID>54</ns0:EVSEID>
+            <ns0:EVSEStatus>
+                <v2gci_t:FatalError>0</v2gci_t:FatalError>
+                <v2gci_t:EVSEStandby>1</v2gci_t:EVSEStandby>
+                <v2gci_t:ConnectorLocked>1</v2gci_t:ConnectorLocked>
+                <v2gci_t:PowerSwitchClosed>0</v2gci_t:PowerSwitchClosed>
+                <v2gci_t:RCD>1</v2gci_t:RCD>
+                <v2gci_t:ShutDownTime>123456789</v2gci_t:ShutDownTime>
+            </ns0:EVSEStatus>
+            <ns0:TCurrent>123456789</ns0:TCurrent>
+        </ns0:SessionSetupRes>
+    </v2gci_d:Body>
+</v2gci_d:V2G_Message>

+ 1 - 1
data/test/sessionSetupRes.xml.exi

@@ -1 +1 @@
-�Ø@}À}À}À}ÂcÀTjVk¼ê)Y®ó 
+�˜@}À}À}À}Âc�TjVk¼é+5Þt

+ 2 - 2
src/codec/BitDecoderChannel.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  * Bit decoding functionalities

+ 2 - 2
src/codec/BitDecoderChannel.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/BitEncoderChannel.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/BitEncoderChannel.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/BitInputStream.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/BitInputStream.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/BitOutputStream.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/BitOutputStream.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/ByteStream.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/ByteStream.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/EXICoder.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/EXICoder.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

文件差异内容过多而无法显示
+ 10 - 11
src/codec/EXIDecoder.c


+ 2 - 2
src/codec/EXIDecoder.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

文件差异内容过多而无法显示
+ 2 - 2
src/codec/EXIEncoder.c


+ 2 - 2
src/codec/EXIEncoder.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/EXIHeaderDecoder.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/EXIHeaderDecoder.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/EXIHeaderEncoder.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/EXIHeaderEncoder.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/EXITypes.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/StringTable.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/StringTable.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 35 - 43
src/codec/StringTableEntries.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/
@@ -59,49 +59,41 @@ const char * localNames3[] = {
 };
 /* localName entries for URI id = 4 */
 const char * localNames4[] = {
-  "CableCheckReq",  "CableCheckReqType",  "CableCheckRes",  "CableCheckResType",  "ChargeParameterDiscoveryReq",
-  "ChargeParameterDiscoveryReqType",  "ChargeParameterDiscoveryRes",  "ChargeParameterDiscoveryResType",  "ChargingMode",  "ContractID",
-  "CurrentDemandReq",  "CurrentDemandReqType",  "CurrentDemandRes",  "CurrentDemandResType",  "CurrentDifferential",
-  "EAmount",  "EVSEID",  "EVSEMaxCurrent",  "EVSEMaxPhases",  "EVSEMaxPower",
-  "EVSEMaxVoltage",  "EVSEMinCurrent",  "EVSEMinVoltage",  "EVSEPresentCurrent",  "EVSEPresentVoltage",
-  "EVSEStatus",  "EnergyProvider",  "EoC",  "LineLockReq",  "LineLockReqType",
-  "LineLockRes",  "LineLockResType",  "MeterInfo",  "MeteringReceiptReq",  "MeteringReceiptReqType",
-  "MeteringReceiptRes",  "MeteringReceiptResType",  "MeteringStatusReq",  "MeteringStatusReqType",  "MeteringStatusRes",
-  "MeteringStatusResType",  "PCurrent",  "PEVDemandCurrent",  "PEVID",  "PEVMaxCurrent",
-  "PEVMaxPhases",  "PEVMaxPower",  "PEVMaxVoltage",  "PEVMinCurrent",  "PEVMinVoltage",
-  "PEVStatus",  "PEVTargetVoltage",  "PaymentDetailsReq",  "PaymentDetailsReqType",  "PaymentDetailsRes",
-  "PaymentDetailsResType",  "PowerDeliveryReq",  "PowerDeliveryReqType",  "PowerDeliveryRes",  "PowerDeliveryResType",
-  "PreChargeReq",  "PreChargeReqType",  "PreChargeRes",  "PreChargeResType",  "ReqLockStatus",
-  "ReqSwitchStatus",  "ResponseCode",  "ServiceDiscoveryReq",  "ServiceDiscoveryReqType",  "ServiceDiscoveryRes",
-  "ServiceDiscoveryResType",  "ServiceList",  "ServicePaymentSelectionReq",  "ServicePaymentSelectionReqType",  "ServicePaymentSelectionRes",
-  "ServicePaymentSelectionResType",  "ServiceScope",  "ServiceType",  "SessionSetupReq",  "SessionSetupReqType",
-  "SessionSetupRes",  "SessionSetupResType",  "TCurrent",  "Tariff",  "TariffTable",
-  "TerminateChargingReq",  "TerminateChargingReqType",  "TerminateChargingRes",  "TerminateChargingResType",  "VoltageDifferential",
-  "WeldingDetectionReq",  "WeldingDetectionReqType",  "WeldingDetectionRes",  "WeldingDetectionResType"
+  "ContractID",  "EAmount",  "EVSEID",  "EVSEIMax",  "EVSEMaxPhases",
+  "EVSEMaxPower",  "EVSEStatus",  "EVSEVoltage",  "EnergyProvider",  "EoC",
+  "LineLockReq",  "LineLockReqType",  "LineLockRes",  "LineLockResType",  "MeterInfo",
+  "MeteringReceiptReq",  "MeteringReceiptReqType",  "MeteringReceiptRes",  "MeteringReceiptResType",  "MeteringStatusReq",
+  "MeteringStatusReqType",  "MeteringStatusRes",  "MeteringStatusResType",  "PCurrent",  "PEVID",
+  "PEVMaxPhases",  "PEVMaxPower",  "PEVMaxVoltage",  "PEVMinVoltage",  "PEVStatus",
+  "PaymentDetailsReq",  "PaymentDetailsReqType",  "PaymentDetailsRes",  "PaymentDetailsResType",  "PowerDeliveryReq",
+  "PowerDeliveryReqType",  "PowerDeliveryRes",  "PowerDeliveryResType",  "PowerDiscoveryReq",  "PowerDiscoveryReqType",
+  "PowerDiscoveryRes",  "PowerDiscoveryResType",  "ReqLockStatus",  "ReqSwitchStatus",  "ResponseCode",
+  "ServiceDiscoveryReq",  "ServiceDiscoveryReqType",  "ServiceDiscoveryRes",  "ServiceDiscoveryResType",  "ServiceList",
+  "ServicePaymentSelectionReq",  "ServicePaymentSelectionReqType",  "ServicePaymentSelectionRes",  "ServicePaymentSelectionResType",  "ServiceScope",
+  "ServiceType",  "SessionSetupReq",  "SessionSetupReqType",  "SessionSetupRes",  "SessionSetupResType",
+  "TCurrent",  "Tariff",  "TariffTable"
 };
 /* localName entries for URI id = 5 */
 const char * localNames5[] = {
   "ChargerStandby",  "ChargingProfileEntryMaxPower",  "ChargingProfileEntryStart",  "ChargingProfileType",  "ConnectorLocked",
-  "Currency",  "EPrice",  "EVSEMalfunction",  "EVSEStandby",  "EVSEStatusType",
-  "Event",  "EventList",  "EventListType",  "FatalError",  "FaultCode",
-  "FaultMsg",  "FloatingValueType",  "MeterID",  "MeterInfoType",  "MeterReading",
-  "MeterStatus",  "Multiplier",  "NotificationType",  "PEVStatusType",  "PowerSwitchClosed",
-  "ProtocolVersion",  "RCD",  "ReadyToCharge",  "Service",  "ServiceDescriptionType",
-  "ServiceID",  "ServiceListType",  "ServiceName",  "ServiceScope",  "ServiceSessionID",
-  "ServiceType",  "SessionID",  "SessionInformationType",  "ShutDownTime",  "StopCharging",
-  "TMeter",  "Tariff",  "TariffDescrType",  "TariffDescription",  "TariffEntries",
-  "TariffEntriesType",  "TariffEntry",  "TariffEntryType",  "TariffID",  "TariffPMax",
-  "TariffStart",  "TariffTableType",  "Unit",  "Value",  "chargingModeType",
-  "contractIDType",  "currencyType",  "energyProviderType",  "eventEntryType",  "evseIDType",
-  "fatalErrorType",  "faultCodeType",  "lockStatusType",  "maxPhasesType",  "meterIDType",
-  "meterStatusType",  "paymentOptionListType",  "paymentOptionType",  "pevIDType",  "protocolVersionType",
-  "pubKeyType",  "rcdType",  "responseCode_CableCheckType",  "responseCode_ChargeParameterDiscoveryType",  "responseCode_CurrentDemandType",
-  "responseCode_LineLockType",  "responseCode_MeteringReceiptType",  "responseCode_MeteringStatusType",  "responseCode_PaymentDetailsType",  "responseCode_PowerDeliveryType",
-  "responseCode_PreChargeType",  "responseCode_ServiceDiscoveryType",  "responseCode_ServicePaymentSelectionType",  "responseCode_SessionSetupType",  "responseCode_TerminateChargingType",
-  "responseCode_WeldingDetectionType",  "serviceDetailsType",  "serviceIDType",  "serviceNameType",  "serviceScopeType",
-  "serviceTypeType",  "sessionIDType",  "standbyType",  "switchStatusType",  "tariffDescriptionType",
-  "tariffIDType",  "tariffStartType",  "timeType",  "unitMultiplierType",  "unitSymbolType"
-
+  "Currency",  "EPrice",  "EVSEStandby",  "EVSEStatusType",  "Event",
+  "EventList",  "EventListType",  "FatalError",  "FaultCode",  "FaultMsg",
+  "FloatingValueType",  "MeterID",  "MeterInfoType",  "MeterReading",  "MeterStatus",
+  "Multiplier",  "NotificationType",  "PEVStatusType",  "PowerSwitchClosed",  "ProtocolVersion",
+  "RCD",  "Service",  "ServiceDescriptionType",  "ServiceID",  "ServiceListType",
+  "ServiceName",  "ServiceScope",  "ServiceSessionID",  "ServiceType",  "SessionID",
+  "SessionInformationType",  "ShutDownTime",  "TMeter",  "Tariff",  "TariffDescrType",
+  "TariffDescription",  "TariffEntries",  "TariffEntriesType",  "TariffEntry",  "TariffEntryType",
+  "TariffID",  "TariffPMax",  "TariffStart",  "TariffTableType",  "Unit",
+  "Value",  "contractIDType",  "currencyType",  "energyProviderType",  "eventEntryType",
+  "evseIDType",  "fatalErrorType",  "faultCodeType",  "lockStatusType",  "maxPhasesType",
+  "meterIDType",  "meterStatusType",  "paymentOptionListType",  "paymentOptionType",  "pevIDType",
+  "protocolVersionType",  "pubKeyType",  "rcdType",  "responseCode_LineLockType",  "responseCode_MeteringReceiptType",
+  "responseCode_MeteringStatusType",  "responseCode_PaymentDetailsType",  "responseCode_PowerDeliveryType",  "responseCode_PowerDiscoveryType",  "responseCode_ServiceDiscoveryType",
+  "responseCode_ServicePaymentSelectionType",  "responseCode_SessionSetupType",  "serviceDetailsType",  "serviceIDType",  "serviceNameType",
+  "serviceScopeType",  "serviceTypeType",  "sessionIDType",  "standbyType",  "switchStatusType",
+  "tariffDescriptionType",  "tariffIDType",  "tariffStartType",  "timeType",  "unitMultiplierType",
+  "unitSymbolType"
 };
 /* localName entries for URI id = 6 */
 const char * localNames6[] = {
@@ -117,8 +109,8 @@ struct exiPartition localNamePartitions[8] = {
  { 4, localNames1 },
  { 2, localNames2 },
  { 46, localNames3 },
- { 94, localNames4 },
- { 100, localNames5 },
+ { 63, localNames4 },
+ { 91, localNames5 },
  { 6, localNames6 },
  { 3, localNames7 }
 };

+ 2 - 2
src/codec/StringTableEntries.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/UCSString.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/codec/UCSString.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/service/v2g_service.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.2
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/service/v2g_serviceClientDataTransmitter.h

@@ -1,6 +1,6 @@
 
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -19,7 +19,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.2
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

文件差异内容过多而无法显示
+ 297 - 985
src/service/v2g_serviceClientStubs.c


+ 6 - 66
src/service/v2g_serviceClientStubs.h

@@ -3,7 +3,7 @@
 
 
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -22,7 +22,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.3.2
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/
@@ -89,13 +89,13 @@ extern "C" {
 
 	
 /**  
- * \brief   Calls the remote chargeParameterDiscovery method
+ * \brief   Calls the remote powerDiscovery method
  * \param	service  struct EXIService* Service data structure (has to be initialized before)
  * \param	header   struct HeaderType* Header data structure
- * \param	params   struct ChargeParameterDiscoveryReqType* Request data for the server (has to be set up before)
- * \param	result   struct ChargeParameterDiscoveryResType* Contains the response data from the server 
+ * \param	params   struct PowerDiscoveryReqType* Request data for the server (has to be set up before)
+ * \param	result   struct PowerDiscoveryResType* Contains the response data from the server 
  * \return  0 = 0K; -1 = ERROR */
-	int call_chargeParameterDiscovery(struct EXIService* service, struct HeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result);
+	int call_powerDiscovery(struct EXIService* service, struct HeaderType* header, struct PowerDiscoveryReqType* params, struct PowerDiscoveryResType* result);
 
  
 
@@ -147,66 +147,6 @@ extern "C" {
  
 
 	
-/**  
- * \brief   Calls the remote cableCheck method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CableCheckReqType* Request data for the server (has to be set up before)
- * \param	result   struct CableCheckResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_cableCheck(struct EXIService* service, struct HeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote preCharge method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct PreChargeReqType* Request data for the server (has to be set up before)
- * \param	result   struct PreChargeResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_preCharge(struct EXIService* service, struct HeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote currentDemand method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct CurrentDemandReqType* Request data for the server (has to be set up before)
- * \param	result   struct CurrentDemandResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_currentDemand(struct EXIService* service, struct HeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote weldingDetection method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct WeldingDetectionReqType* Request data for the server (has to be set up before)
- * \param	result   struct WeldingDetectionResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_weldingDetection(struct EXIService* service, struct HeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result);
-
- 
-
-	
-/**  
- * \brief   Calls the remote terminateCharging method
- * \param	service  struct EXIService* Service data structure (has to be initialized before)
- * \param	header   struct HeaderType* Header data structure
- * \param	params   struct TerminateChargingReqType* Request data for the server (has to be set up before)
- * \param	result   struct TerminateChargingResType* Contains the response data from the server 
- * \return  0 = 0K; -1 = ERROR */
-	int call_terminateCharging(struct EXIService* service, struct HeaderType* header, struct TerminateChargingReqType* params, struct TerminateChargingResType* result);
-
- 
-
-	
 
 	/* Initialize the v2g client */
 	int init_v2gServiceClient(struct EXIService* service, bytes_t bytes, string_ucs_t string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size, uint16_t transportHeaderOffset);

文件差异内容过多而无法显示
+ 95 - 344
src/service/v2g_serviceDataSerialization.c


+ 60 - 101
src/service/v2g_serviceDataTypes.c

@@ -1,6 +1,6 @@
 
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -19,7 +19,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.3.2
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/
@@ -29,13 +29,19 @@
 #include "v2g_serviceDataTypes.h"
 
 
-static  void init_sessionIDType(struct sessionIDType* type)
+static  void init_SessionInformationType_SessionID(struct SessionInformationType_SessionID* type)
 {	
 	type->arraylen.data=0;
 
 }
 
-static  void init_protocolVersionType(struct protocolVersionType* type)
+static  void init_SessionInformationType_ServiceSessionID(struct SessionInformationType_ServiceSessionID* type)
+{	
+	type->arraylen.data=0;
+
+}
+
+static  void init_SessionInformationType_ProtocolVersion(struct SessionInformationType_ProtocolVersion* type)
 {	
 	type->arraylen.data=0;
 
@@ -43,15 +49,15 @@ static  void init_protocolVersionType(struct protocolVersionType* type)
 
 static  void init_SessionInformationType(struct SessionInformationType* type)
 {	
-	init_sessionIDType(&(type->SessionID));	
-	init_sessionIDType(&(type->ServiceSessionID));	
+	init_SessionInformationType_SessionID(&(type->SessionID));	
+	init_SessionInformationType_ServiceSessionID(&(type->ServiceSessionID));	
 	type->isused.ServiceSessionID=0;	
-	init_protocolVersionType(&(type->ProtocolVersion));	
+	init_SessionInformationType_ProtocolVersion(&(type->ProtocolVersion));	
 	type->isused.ProtocolVersion=0;
 
 }
 
-static  void init_service_string(struct service_string* type)
+static  void init_NotificationType_FaultMsg(struct NotificationType_FaultMsg* type)
 {	
 	type->arraylen.data=0;
 
@@ -60,7 +66,7 @@ static  void init_service_string(struct service_string* type)
 static  void init_NotificationType(struct NotificationType* type)
 {		
 	type->isused.FaultCode=0;	
-	init_service_string(&(type->FaultMsg));	
+	init_NotificationType_FaultMsg(&(type->FaultMsg));	
 	type->isused.FaultMsg=0;		
 	type->isused.EventList=0;
 
@@ -74,7 +80,7 @@ static  void init_HeaderType(struct HeaderType* type)
 
 }
 
-static  void init_pevIDType(struct pevIDType* type)
+static  void init_SessionSetupReqType_PEVID(struct SessionSetupReqType_PEVID* type)
 {	
 	type->arraylen.data=0;
 
@@ -82,12 +88,12 @@ static  void init_pevIDType(struct pevIDType* type)
 
 static  void init_SessionSetupReqType(struct SessionSetupReqType* type)
 {	
-	init_pevIDType(&(type->PEVID));	
+	init_SessionSetupReqType_PEVID(&(type->PEVID));	
 	type->isused.PEVID=0;	
 
 }
 
-static  void init_evseIDType(struct evseIDType* type)
+static  void init_SessionSetupResType_EVSEID(struct SessionSetupResType_EVSEID* type)
 {	
 	type->arraylen.data=0;
 
@@ -95,11 +101,11 @@ static  void init_evseIDType(struct evseIDType* type)
 
 static  void init_SessionSetupResType(struct SessionSetupResType* type)
 {		
-	init_evseIDType(&(type->EVSEID));		
+	init_SessionSetupResType_EVSEID(&(type->EVSEID));		
 
 }
 
-static  void init_serviceScopeType(struct serviceScopeType* type)
+static  void init_ServiceDiscoveryReqType_ServiceScope(struct ServiceDiscoveryReqType_ServiceScope* type)
 {	
 	type->arraylen.data=0;
 
@@ -108,18 +114,24 @@ static  void init_serviceScopeType(struct serviceScopeType* type)
 static  void init_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type)
 {		
 	type->isused.ServiceType=0;	
-	init_serviceScopeType(&(type->ServiceScope));	
+	init_ServiceDiscoveryReqType_ServiceScope(&(type->ServiceScope));	
 	type->isused.ServiceScope=0;
 
 }
 
-static  void init_serviceIDType(struct serviceIDType* type)
+static  void init_ServiceDescriptionType_ServiceID(struct ServiceDescriptionType_ServiceID* type)
+{	
+	type->arraylen.data=0;
+
+}
+
+static  void init_ServiceDescriptionType_ServiceName(struct ServiceDescriptionType_ServiceName* type)
 {	
 	type->arraylen.data=0;
 
 }
 
-static  void init_serviceNameType(struct serviceNameType* type)
+static  void init_ServiceDescriptionType_ServiceScope(struct ServiceDescriptionType_ServiceScope* type)
 {	
 	type->arraylen.data=0;
 
@@ -127,11 +139,11 @@ static  void init_serviceNameType(struct serviceNameType* type)
 
 static  void init_ServiceDescriptionType(struct ServiceDescriptionType* type)
 {	
-	init_serviceIDType(&(type->ServiceID));	
-	init_serviceNameType(&(type->ServiceName));	
+	init_ServiceDescriptionType_ServiceID(&(type->ServiceID));	
+	init_ServiceDescriptionType_ServiceName(&(type->ServiceName));	
 	type->isused.ServiceName=0;		
 	type->isused.ServiceType=0;	
-	init_serviceScopeType(&(type->ServiceScope));	
+	init_ServiceDescriptionType_ServiceScope(&(type->ServiceScope));	
 	type->isused.ServiceScope=0;
 
 }
@@ -162,7 +174,7 @@ static  void init_ServicePaymentSelectionReqType(struct ServicePaymentSelectionR
 
 }
 
-static  void init_contractIDType(struct contractIDType* type)
+static  void init_PaymentDetailsReqType_ContractID(struct PaymentDetailsReqType_ContractID* type)
 {	
 	type->arraylen.data=0;
 
@@ -170,28 +182,28 @@ static  void init_contractIDType(struct contractIDType* type)
 
 static  void init_PaymentDetailsReqType(struct PaymentDetailsReqType* type)
 {	
-	init_contractIDType(&(type->ContractID));
+	init_PaymentDetailsReqType_ContractID(&(type->ContractID));
 
 }
 
-static  void init_ChargeParameterDiscoveryReqType(struct ChargeParameterDiscoveryReqType* type)
-{										
+static  void init_PowerDiscoveryReqType(struct PowerDiscoveryReqType* type)
+{							
 
 }
 
-static  void init_energyProviderType(struct energyProviderType* type)
+static  void init_PowerDiscoveryResType_EnergyProvider(struct PowerDiscoveryResType_EnergyProvider* type)
 {	
 	type->arraylen.data=0;
 
 }
 
-static  void init_currencyType(struct currencyType* type)
+static  void init_TariffTableType_Currency(struct TariffTableType_Currency* type)
 {	
 	type->arraylen.data=0;
 
 }
 
-static  void init_tariffDescriptionType(struct tariffDescriptionType* type)
+static  void init_TariffDescrType_TariffDescription(struct TariffDescrType_TariffDescription* type)
 {	
 	type->arraylen.data=0;
 
@@ -218,7 +230,7 @@ static  void init_TariffEntriesType(struct TariffEntriesType* type)
 
 static  void init_TariffDescrType(struct TariffDescrType* type)
 {		
-	init_tariffDescriptionType(&(type->TariffDescription));	
+	init_TariffDescrType_TariffDescription(&(type->TariffDescription));	
 	type->isused.TariffDescription=0;	
 	init_TariffEntriesType(&(type->TariffEntries));
 
@@ -228,7 +240,7 @@ static  void init_TariffTableType(struct TariffTableType* type)
 {
 	int i_loop;
 		
-	init_currencyType(&(type->Currency));	
+	init_TariffTableType_Currency(&(type->Currency));	
 	for(i_loop=0; i_loop<6;i_loop++)
 	{
 		init_TariffDescrType(&(type->Tariff[i_loop]));
@@ -238,9 +250,9 @@ static  void init_TariffTableType(struct TariffTableType* type)
 
 }
 
-static  void init_ChargeParameterDiscoveryResType(struct ChargeParameterDiscoveryResType* type)
-{								
-	init_energyProviderType(&(type->EnergyProvider));	
+static  void init_PowerDiscoveryResType(struct PowerDiscoveryResType* type)
+{						
+	init_PowerDiscoveryResType_EnergyProvider(&(type->EnergyProvider));	
 	type->isused.EnergyProvider=0;	
 	init_TariffTableType(&(type->TariffTable));	
 	type->isused.TariffTable=0;
@@ -263,12 +275,13 @@ static  void init_PowerDeliveryReqType(struct PowerDeliveryReqType* type)
 
 }
 
-static  void init_PowerDeliveryResType(struct PowerDeliveryResType* type)
-{		
+static  void init_MeteringStatusResType_EVSEID(struct MeteringStatusResType_EVSEID* type)
+{	
+	type->arraylen.data=0;
 
 }
 
-static  void init_meterIDType(struct meterIDType* type)
+static  void init_MeterInfoType_MeterID(struct MeterInfoType_MeterID* type)
 {	
 	type->arraylen.data=0;
 
@@ -276,7 +289,7 @@ static  void init_meterIDType(struct meterIDType* type)
 
 static  void init_MeterInfoType(struct MeterInfoType* type)
 {	
-	init_meterIDType(&(type->MeterID));	
+	init_MeterInfoType_MeterID(&(type->MeterID));	
 	type->isused.MeterID=0;		
 	type->isused.MeterReading=0;		
 	type->isused.MeterStatus=0;		
@@ -286,69 +299,25 @@ static  void init_MeterInfoType(struct MeterInfoType* type)
 
 static  void init_MeteringStatusResType(struct MeteringStatusResType* type)
 {		
-	init_evseIDType(&(type->EVSEID));					
+	init_MeteringStatusResType_EVSEID(&(type->EVSEID));					
 	type->isused.PCurrent=0;	
 	init_MeterInfoType(&(type->MeterInfo));	
 	type->isused.MeterInfo=0;
 
 }
 
-static  void init_MeteringReceiptReqType(struct MeteringReceiptReqType* type)
-{	
-	init_pevIDType(&(type->PEVID));	
-	type->isused.PEVID=0;			
-	type->isused.TCurrent=0;		
-	init_MeterInfoType(&(type->MeterInfo));
-
-}
-
-static  void init_CableCheckReqType(struct CableCheckReqType* type)
-{	
-
-}
-
-static  void init_CableCheckResType(struct CableCheckResType* type)
-{		
-
-}
-
-static  void init_PreChargeReqType(struct PreChargeReqType* type)
-{				
-
-}
-
-static  void init_PreChargeResType(struct PreChargeResType* type)
-{			
-
-}
-
-static  void init_CurrentDemandReqType(struct CurrentDemandReqType* type)
-{					
-
-}
-
-static  void init_CurrentDemandResType(struct CurrentDemandResType* type)
-{				
-
-}
-
-static  void init_WeldingDetectionReqType(struct WeldingDetectionReqType* type)
+static  void init_MeteringReceiptReqType_PEVID(struct MeteringReceiptReqType_PEVID* type)
 {	
+	type->arraylen.data=0;
 
 }
 
-static  void init_WeldingDetectionResType(struct WeldingDetectionResType* type)
-{			
-
-}
-
-static  void init_TerminateChargingReqType(struct TerminateChargingReqType* type)
+static  void init_MeteringReceiptReqType(struct MeteringReceiptReqType* type)
 {	
-
-}
-
-static  void init_TerminateChargingResType(struct TerminateChargingResType* type)
-{			
+	init_MeteringReceiptReqType_PEVID(&(type->PEVID));	
+	type->isused.PEVID=0;			
+	type->isused.TCurrent=0;		
+	init_MeterInfoType(&(type->MeterInfo));
 
 }
 
@@ -362,8 +331,8 @@ static  void init_BodyType(struct BodyType* type)
 	type->isused.ServicePaymentSelectionRes=0;		
 	type->isused.PaymentDetailsReq=0;		
 	type->isused.PaymentDetailsRes=0;		
-	type->isused.ChargeParameterDiscoveryReq=0;		
-	type->isused.ChargeParameterDiscoveryRes=0;		
+	type->isused.PowerDiscoveryReq=0;		
+	type->isused.PowerDiscoveryRes=0;		
 	type->isused.LineLockReq=0;		
 	type->isused.LineLockRes=0;		
 	type->isused.PowerDeliveryReq=0;		
@@ -371,17 +340,7 @@ static  void init_BodyType(struct BodyType* type)
 	type->isused.MeteringStatusReq=0;		
 	type->isused.MeteringStatusRes=0;		
 	type->isused.MeteringReceiptReq=0;		
-	type->isused.MeteringReceiptRes=0;		
-	type->isused.CableCheckReq=0;		
-	type->isused.CableCheckRes=0;		
-	type->isused.PreChargeReq=0;		
-	type->isused.PreChargeRes=0;		
-	type->isused.CurrentDemandReq=0;		
-	type->isused.CurrentDemandRes=0;		
-	type->isused.WeldingDetectionReq=0;		
-	type->isused.WeldingDetectionRes=0;		
-	type->isused.TerminateChargingReq=0;		
-	type->isused.TerminateChargingRes=0;
+	type->isused.MeteringReceiptRes=0;
 
 }
 

+ 143 - 225
src/service/v2g_serviceDataTypes.h

@@ -1,6 +1,6 @@
 
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -19,7 +19,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.3.2
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/
@@ -105,10 +105,19 @@ enum responseCode_PaymentDetailsType
 
 }; 
 
-enum chargingModeType
+enum unitMultiplierType
 {
-	AC_charging_chargingModeType, 
-	DC_charging_chargingModeType
+	d_unitMultiplierType, 
+	c_unitMultiplierType, 
+	m_unitMultiplierType, 
+	micro_unitMultiplierType, 
+	n_unitMultiplierType, 
+	p_unitMultiplierType, 
+	k_unitMultiplierType, 
+	M_unitMultiplierType, 
+	G_unitMultiplierType, 
+	T_unitMultiplierType, 
+	none_unitMultiplierType
 
 }; 
 
@@ -117,9 +126,16 @@ enum unitSymbolType
 	A_unitSymbolType, 
 	deg_unitSymbolType, 
 	F_unitSymbolType, 
+	g_unitSymbolType, 
 	h_unitSymbolType, 
+	J_unitSymbolType, 
+	J_s_unitSymbolType, 
+	kg_J_unitSymbolType, 
 	min_unitSymbolType, 
+	N_unitSymbolType, 
+	ohm_unitSymbolType, 
 	s_unitSymbolType, 
+	S_unitSymbolType, 
 	s_1_unitSymbolType, 
 	V_unitSymbolType, 
 	V_VAr_unitSymbolType, 
@@ -131,15 +147,14 @@ enum unitSymbolType
 	W_Hz_unitSymbolType, 
 	W_s_unitSymbolType, 
 	Wh_unitSymbolType, 
-	Ah_unitSymbolType,
-	J_unitSymbolType
+	Ah_unitSymbolType
+
 }; 
 
-enum responseCode_ChargeParameterDiscoveryType
+enum responseCode_PowerDiscoveryType
 {
-	OK_responseCode_ChargeParameterDiscoveryType, 
-	FAILED_BatteryNotCompatible_responseCode_ChargeParameterDiscoveryType, 
-	FAILED_UnknownError_responseCode_ChargeParameterDiscoveryType
+	OK_PowerDiscovery_responseCode_PowerDiscoveryType, 
+	FAILED_UnknownError_InPowerDiscovery_responseCode_PowerDiscoveryType
 
 }; 
 
@@ -186,55 +201,34 @@ enum responseCode_MeteringReceiptType
 
 }; 
 
-enum responseCode_CableCheckType
-{
-	OK_responseCode_CableCheckType, 
-	FAILED_UnknownError_responseCode_CableCheckType
-
-}; 
 
-enum responseCode_PreChargeType
-{
-	OK_responseCode_PreChargeType, 
-	FAILED_UnknownError_responseCode_PreChargeType
 
-}; 
 
-enum responseCode_CurrentDemandType
+struct arraylen_SessionInformationType_SessionID
 {
-	OK_responseCode_CurrentDemandType, 
-	FAILED_UnknownError_responseCode_CurrentDemandType
-
-}; 
+	size_t data;
 
-enum responseCode_WeldingDetectionType
-{
-	OK_responseCode_WeldingDetectionType, 
-	FAILED_UnknownError_responseCode_WeldingDetectionType
 
-}; 
+};
 
-enum responseCode_TerminateChargingType
+struct SessionInformationType_SessionID
 {
-	OK_responseCode_TerminateChargingType, 
-	FAILED_UnknownError_responseCode_TerminateChargingType
-
-}; 
-
-
+	uint8_t data[8];
+	struct arraylen_SessionInformationType_SessionID arraylen;
 
+};
 
-struct arraylen_sessionIDType
+struct arraylen_SessionInformationType_ServiceSessionID
 {
 	size_t data;
 
 
 };
 
-struct sessionIDType
+struct SessionInformationType_ServiceSessionID
 {
 	uint8_t data[8];
-	struct arraylen_sessionIDType arraylen;
+	struct arraylen_SessionInformationType_ServiceSessionID arraylen;
 
 };
 
@@ -246,25 +240,25 @@ struct selection_SessionInformationType
 
 };
 
-struct arraylen_protocolVersionType
+struct arraylen_SessionInformationType_ProtocolVersion
 {
 	size_t data;
 
 
 };
 
-struct protocolVersionType
+struct SessionInformationType_ProtocolVersion
 {
 	uint32_t data[5];
-	struct arraylen_protocolVersionType arraylen;
+	struct arraylen_SessionInformationType_ProtocolVersion arraylen;
 
 };
 
 struct SessionInformationType
 {
-	struct sessionIDType SessionID;
-	struct sessionIDType ServiceSessionID;
-	struct protocolVersionType ProtocolVersion;
+	struct SessionInformationType_SessionID SessionID;
+	struct SessionInformationType_ServiceSessionID ServiceSessionID;
+	struct SessionInformationType_ProtocolVersion ProtocolVersion;
 	struct selection_SessionInformationType isused;
 
 };
@@ -278,17 +272,17 @@ struct selection_NotificationType
 
 };
 
-struct arraylen_service_string
+struct arraylen_NotificationType_FaultMsg
 {
 	size_t data;
 
 
 };
 
-struct service_string
+struct NotificationType_FaultMsg
 {
 	uint32_t data[256];
-	struct arraylen_service_string arraylen;
+	struct arraylen_NotificationType_FaultMsg arraylen;
 
 };
 
@@ -302,7 +296,7 @@ struct EventListType
 struct NotificationType
 {
 	enum faultCodeType FaultCode;
-	struct service_string FaultMsg;
+	struct NotificationType_FaultMsg FaultMsg;
 	struct EventListType EventList;
 	struct selection_NotificationType isused;
 
@@ -323,17 +317,17 @@ struct HeaderType
 
 };
 
-struct arraylen_pevIDType
+struct arraylen_SessionSetupReqType_PEVID
 {
 	size_t data;
 
 
 };
 
-struct pevIDType
+struct SessionSetupReqType_PEVID
 {
 	uint32_t data[32];
-	struct arraylen_pevIDType arraylen;
+	struct arraylen_SessionSetupReqType_PEVID arraylen;
 
 };
 
@@ -348,14 +342,13 @@ struct PEVStatusType
 {
 	int ConnectorLocked;
 	int ChargerStandby;
-	int ReadyToCharge;
 
 
 };
 
 struct SessionSetupReqType
 {
-	struct pevIDType PEVID;
+	struct SessionSetupReqType_PEVID PEVID;
 	struct PEVStatusType PEVStatus;
 	struct selection_SessionSetupReqType isused;
 
@@ -371,8 +364,8 @@ struct selection_BodyType
 	unsigned int ServicePaymentSelectionRes:1;
 	unsigned int PaymentDetailsReq:1;
 	unsigned int PaymentDetailsRes:1;
-	unsigned int ChargeParameterDiscoveryReq:1;
-	unsigned int ChargeParameterDiscoveryRes:1;
+	unsigned int PowerDiscoveryReq:1;
+	unsigned int PowerDiscoveryRes:1;
 	unsigned int LineLockReq:1;
 	unsigned int LineLockRes:1;
 	unsigned int PowerDeliveryReq:1;
@@ -381,31 +374,21 @@ struct selection_BodyType
 	unsigned int MeteringStatusRes:1;
 	unsigned int MeteringReceiptReq:1;
 	unsigned int MeteringReceiptRes:1;
-	unsigned int CableCheckReq:1;
-	unsigned int CableCheckRes:1;
-	unsigned int PreChargeReq:1;
-	unsigned int PreChargeRes:1;
-	unsigned int CurrentDemandReq:1;
-	unsigned int CurrentDemandRes:1;
-	unsigned int WeldingDetectionReq:1;
-	unsigned int WeldingDetectionRes:1;
-	unsigned int TerminateChargingReq:1;
-	unsigned int TerminateChargingRes:1;
 
 
 };
 
-struct arraylen_evseIDType
+struct arraylen_SessionSetupResType_EVSEID
 {
 	size_t data;
 
 
 };
 
-struct evseIDType
+struct SessionSetupResType_EVSEID
 {
 	uint8_t data[32];
-	struct arraylen_evseIDType arraylen;
+	struct arraylen_SessionSetupResType_EVSEID arraylen;
 
 };
 
@@ -417,9 +400,6 @@ struct EVSEStatusType
 	int PowerSwitchClosed;
 	int RCD;
 	int32_t ShutDownTime;
-	int ChargerStandby;
-	int EVSEMalfunction;
-	int StopCharging;
 
 
 };
@@ -427,7 +407,7 @@ struct EVSEStatusType
 struct SessionSetupResType
 {
 	enum responseCode_SessionSetupType ResponseCode;
-	struct evseIDType EVSEID;
+	struct SessionSetupResType_EVSEID EVSEID;
 	struct EVSEStatusType EVSEStatus;
 	int32_t TCurrent;
 
@@ -442,53 +422,53 @@ struct selection_ServiceDiscoveryReqType
 
 };
 
-struct arraylen_serviceScopeType
+struct arraylen_ServiceDiscoveryReqType_ServiceScope
 {
 	size_t data;
 
 
 };
 
-struct serviceScopeType
+struct ServiceDiscoveryReqType_ServiceScope
 {
 	uint32_t data[20];
-	struct arraylen_serviceScopeType arraylen;
+	struct arraylen_ServiceDiscoveryReqType_ServiceScope arraylen;
 
 };
 
 struct ServiceDiscoveryReqType
 {
 	enum serviceTypeType ServiceType;
-	struct serviceScopeType ServiceScope;
+	struct ServiceDiscoveryReqType_ServiceScope ServiceScope;
 	struct selection_ServiceDiscoveryReqType isused;
 
 };
 
-struct arraylen_serviceIDType
+struct arraylen_ServiceDescriptionType_ServiceID
 {
 	size_t data;
 
 
 };
 
-struct serviceIDType
+struct ServiceDescriptionType_ServiceID
 {
 	uint8_t data[8];
-	struct arraylen_serviceIDType arraylen;
+	struct arraylen_ServiceDescriptionType_ServiceID arraylen;
 
 };
 
-struct arraylen_serviceNameType
+struct arraylen_ServiceDescriptionType_ServiceName
 {
 	size_t data;
 
 
 };
 
-struct serviceNameType
+struct ServiceDescriptionType_ServiceName
 {
 	uint32_t data[20];
-	struct arraylen_serviceNameType arraylen;
+	struct arraylen_ServiceDescriptionType_ServiceName arraylen;
 
 };
 
@@ -501,12 +481,26 @@ struct selection_ServiceDescriptionType
 
 };
 
+struct arraylen_ServiceDescriptionType_ServiceScope
+{
+	size_t data;
+
+
+};
+
+struct ServiceDescriptionType_ServiceScope
+{
+	uint32_t data[20];
+	struct arraylen_ServiceDescriptionType_ServiceScope arraylen;
+
+};
+
 struct ServiceDescriptionType
 {
-	struct serviceIDType ServiceID;
-	struct serviceNameType ServiceName;
+	struct ServiceDescriptionType_ServiceID ServiceID;
+	struct ServiceDescriptionType_ServiceName ServiceName;
 	enum serviceTypeType ServiceType;
-	struct serviceScopeType ServiceScope;
+	struct ServiceDescriptionType_ServiceScope ServiceScope;
 	struct selection_ServiceDescriptionType isused;
 
 };
@@ -554,23 +548,23 @@ struct ServicePaymentSelectionResType
 
 };
 
-struct arraylen_contractIDType
+struct arraylen_PaymentDetailsReqType_ContractID
 {
 	size_t data;
 
 
 };
 
-struct contractIDType
+struct PaymentDetailsReqType_ContractID
 {
 	uint32_t data[128];
-	struct arraylen_contractIDType arraylen;
+	struct arraylen_PaymentDetailsReqType_ContractID arraylen;
 
 };
 
 struct PaymentDetailsReqType
 {
-	struct contractIDType ContractID;
+	struct PaymentDetailsReqType_ContractID ContractID;
 
 
 };
@@ -578,51 +572,47 @@ struct PaymentDetailsReqType
 struct PaymentDetailsResType
 {
 	enum responseCode_PaymentDetailsType ResponseCode;
-	int32_t TCurrent;
 
 
 };
 
 struct FloatingValueType
 {
-	int16_t Multiplier;
+	enum unitMultiplierType Multiplier;
 	enum unitSymbolType Unit;
 	int32_t Value;
 
 
 };
 
-struct ChargeParameterDiscoveryReqType
+struct PowerDiscoveryReqType
 {
 	struct PEVStatusType PEVStatus;
-	enum chargingModeType ChargingMode;
 	int32_t EoC;
 	struct FloatingValueType EAmount;
 	struct FloatingValueType PEVMaxPower;
 	int16_t PEVMaxPhases;
 	struct FloatingValueType PEVMaxVoltage;
 	struct FloatingValueType PEVMinVoltage;
-	struct FloatingValueType PEVMaxCurrent;
-	struct FloatingValueType PEVMinCurrent;
 
 
 };
 
-struct arraylen_energyProviderType
+struct arraylen_PowerDiscoveryResType_EnergyProvider
 {
 	size_t data;
 
 
 };
 
-struct energyProviderType
+struct PowerDiscoveryResType_EnergyProvider
 {
 	uint32_t data[20];
-	struct arraylen_energyProviderType arraylen;
+	struct arraylen_PowerDiscoveryResType_EnergyProvider arraylen;
 
 };
 
-struct selection_ChargeParameterDiscoveryResType
+struct selection_PowerDiscoveryResType
 {
 	unsigned int EnergyProvider:1;
 	unsigned int TariffTable:1;
@@ -630,31 +620,31 @@ struct selection_ChargeParameterDiscoveryResType
 
 };
 
-struct arraylen_currencyType
+struct arraylen_TariffTableType_Currency
 {
 	size_t data;
 
 
 };
 
-struct currencyType
+struct TariffTableType_Currency
 {
 	uint32_t data[3];
-	struct arraylen_currencyType arraylen;
+	struct arraylen_TariffTableType_Currency arraylen;
 
 };
 
-struct arraylen_tariffDescriptionType
+struct arraylen_TariffDescrType_TariffDescription
 {
 	size_t data;
 
 
 };
 
-struct tariffDescriptionType
+struct TariffDescrType_TariffDescription
 {
 	uint32_t data[32];
-	struct arraylen_tariffDescriptionType arraylen;
+	struct arraylen_TariffDescrType_TariffDescription arraylen;
 
 };
 
@@ -698,7 +688,7 @@ struct TariffEntriesType
 struct TariffDescrType
 {
 	enum tariffIDType TariffID;
-	struct tariffDescriptionType TariffDescription;
+	struct TariffDescrType_TariffDescription TariffDescription;
 	struct TariffEntriesType TariffEntries;
 	struct selection_TariffDescrType isused;
 
@@ -713,24 +703,22 @@ struct arraylen_TariffTableType
 
 struct TariffTableType
 {
-	struct currencyType Currency;
+	struct TariffTableType_Currency Currency;
 	struct TariffDescrType Tariff[6];
 	struct arraylen_TariffTableType arraylen;
 
 };
 
-struct ChargeParameterDiscoveryResType
+struct PowerDiscoveryResType
 {
-	enum responseCode_ChargeParameterDiscoveryType ResponseCode;
+	enum responseCode_PowerDiscoveryType ResponseCode;
 	struct EVSEStatusType EVSEStatus;
-	struct FloatingValueType EVSEMaxVoltage;
-	struct FloatingValueType EVSEMinVoltage;
-	struct FloatingValueType EVSEMaxCurrent;
-	struct FloatingValueType EVSEMinCurrent;
+	struct FloatingValueType EVSEVoltage;
+	struct FloatingValueType EVSEIMax;
 	int16_t EVSEMaxPhases;
-	struct energyProviderType EnergyProvider;
+	struct PowerDiscoveryResType_EnergyProvider EnergyProvider;
 	struct TariffTableType TariffTable;
-	struct selection_ChargeParameterDiscoveryResType isused;
+	struct selection_PowerDiscoveryResType isused;
 
 };
 
@@ -769,7 +757,6 @@ struct PowerDeliveryReqType
 struct PowerDeliveryResType
 {
 	enum responseCode_PowerDeliveryType ResponseCode;
-	struct EVSEStatusType EVSEStatus;
 
 
 };
@@ -782,6 +769,20 @@ struct MeteringStatusReqType
 	
 };
 
+struct arraylen_MeteringStatusResType_EVSEID
+{
+	size_t data;
+
+
+};
+
+struct MeteringStatusResType_EVSEID
+{
+	uint8_t data[32];
+	struct arraylen_MeteringStatusResType_EVSEID arraylen;
+
+};
+
 struct selection_MeteringStatusResType
 {
 	unsigned int PCurrent:1;
@@ -790,17 +791,17 @@ struct selection_MeteringStatusResType
 
 };
 
-struct arraylen_meterIDType
+struct arraylen_MeterInfoType_MeterID
 {
 	size_t data;
 
 
 };
 
-struct meterIDType
+struct MeterInfoType_MeterID
 {
 	uint32_t data[32];
-	struct arraylen_meterIDType arraylen;
+	struct arraylen_MeterInfoType_MeterID arraylen;
 
 };
 
@@ -816,7 +817,7 @@ struct selection_MeterInfoType
 
 struct MeterInfoType
 {
-	struct meterIDType MeterID;
+	struct MeterInfoType_MeterID MeterID;
 	struct FloatingValueType MeterReading;
 	int16_t MeterStatus;
 	int32_t TMeter;
@@ -827,7 +828,7 @@ struct MeterInfoType
 struct MeteringStatusResType
 {
 	enum responseCode_MeteringStatusType ResponseCode;
-	struct evseIDType EVSEID;
+	struct MeteringStatusResType_EVSEID EVSEID;
 	struct EVSEStatusType EVSEStatus;
 	int32_t TCurrent;
 	struct FloatingValueType EVSEMaxPower;
@@ -837,6 +838,20 @@ struct MeteringStatusResType
 
 };
 
+struct arraylen_MeteringReceiptReqType_PEVID
+{
+	size_t data;
+
+
+};
+
+struct MeteringReceiptReqType_PEVID
+{
+	uint32_t data[32];
+	struct arraylen_MeteringReceiptReqType_PEVID arraylen;
+
+};
+
 struct selection_MeteringReceiptReqType
 {
 	unsigned int PEVID:1;
@@ -847,7 +862,7 @@ struct selection_MeteringReceiptReqType
 
 struct MeteringReceiptReqType
 {
-	struct pevIDType PEVID;
+	struct MeteringReceiptReqType_PEVID PEVID;
 	struct PEVStatusType PEVStatus;
 	int32_t TCurrent;
 	enum tariffIDType Tariff;
@@ -861,93 +876,6 @@ struct MeteringReceiptResType
 	enum responseCode_MeteringReceiptType ResponseCode;
 
 
-};
-
-struct CableCheckReqType
-{
-	struct PEVStatusType PEVStatus;
-
-
-};
-
-struct CableCheckResType
-{
-	enum responseCode_CableCheckType ResponseCode;
-	struct EVSEStatusType EVSEStatus;
-
-
-};
-
-struct PreChargeReqType
-{
-	struct PEVStatusType PEVStatus;
-	struct FloatingValueType PEVTargetVoltage;
-	struct FloatingValueType PEVDemandCurrent;
-	struct FloatingValueType VoltageDifferential;
-
-
-};
-
-struct PreChargeResType
-{
-	enum responseCode_PreChargeType ResponseCode;
-	struct EVSEStatusType EVSEStatus;
-	struct FloatingValueType EVSEPresentVoltage;
-
-
-};
-
-struct CurrentDemandReqType
-{
-	struct PEVStatusType PEVStatus;
-	struct FloatingValueType PEVTargetVoltage;
-	struct FloatingValueType PEVDemandCurrent;
-	struct FloatingValueType CurrentDifferential;
-	struct FloatingValueType VoltageDifferential;
-
-
-};
-
-struct CurrentDemandResType
-{
-	enum responseCode_CurrentDemandType ResponseCode;
-	struct EVSEStatusType EVSEStatus;
-	struct FloatingValueType EVSEPresentVoltage;
-	struct FloatingValueType EVSEPresentCurrent;
-
-
-};
-
-struct WeldingDetectionReqType
-{
-	struct PEVStatusType PEVStatus;
-
-
-};
-
-struct WeldingDetectionResType
-{
-	enum responseCode_WeldingDetectionType ResponseCode;
-	struct EVSEStatusType EVSEStatus;
-	struct FloatingValueType EVSEPresentVoltage;
-
-
-};
-
-struct TerminateChargingReqType
-{
-	struct PEVStatusType PEVStatus;
-
-
-};
-
-struct TerminateChargingResType
-{
-	enum responseCode_TerminateChargingType ResponseCode;
-	struct EVSEStatusType EVSEStatus;
-	struct FloatingValueType EVSEPresentVoltage;
-
-
 };
 
 struct BodyType
@@ -960,8 +888,8 @@ struct BodyType
 	struct ServicePaymentSelectionResType* ServicePaymentSelectionRes;
 	struct PaymentDetailsReqType* PaymentDetailsReq;
 	struct PaymentDetailsResType* PaymentDetailsRes;
-	struct ChargeParameterDiscoveryReqType* ChargeParameterDiscoveryReq;
-	struct ChargeParameterDiscoveryResType* ChargeParameterDiscoveryRes;
+	struct PowerDiscoveryReqType* PowerDiscoveryReq;
+	struct PowerDiscoveryResType* PowerDiscoveryRes;
 	struct LineLockReqType* LineLockReq;
 	struct LineLockResType* LineLockRes;
 	struct PowerDeliveryReqType* PowerDeliveryReq;
@@ -970,16 +898,6 @@ struct BodyType
 	struct MeteringStatusResType* MeteringStatusRes;
 	struct MeteringReceiptReqType* MeteringReceiptReq;
 	struct MeteringReceiptResType* MeteringReceiptRes;
-	struct CableCheckReqType* CableCheckReq;
-	struct CableCheckResType* CableCheckRes;
-	struct PreChargeReqType* PreChargeReq;
-	struct PreChargeResType* PreChargeRes;
-	struct CurrentDemandReqType* CurrentDemandReq;
-	struct CurrentDemandResType* CurrentDemandRes;
-	struct WeldingDetectionReqType* WeldingDetectionReq;
-	struct WeldingDetectionResType* WeldingDetectionRes;
-	struct TerminateChargingReqType* TerminateChargingReq;
-	struct TerminateChargingResType* TerminateChargingRes;
 	struct selection_BodyType isused;
 
 };

文件差异内容过多而无法显示
+ 320 - 481
src/service/v2g_serviceDispatcher.c


+ 2 - 2
src/service/v2g_serviceDispatcher.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.2
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 3 - 13
src/service/v2g_serviceMethods.h

@@ -3,7 +3,7 @@
 
 
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -22,7 +22,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.3.2
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/
@@ -47,7 +47,7 @@ int	selectedServicePayment(struct ServicePaymentSelectionReqType* param, struct
 					
 int	paymentDetails(struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result);
 					
-int	chargeParameterDiscovery(struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result);
+int	powerDiscovery(struct PowerDiscoveryReqType* param, struct PowerDiscoveryResType* result);
 					
 int	lineLock(struct LineLockReqType* param, struct LineLockResType* result);
 					
@@ -56,16 +56,6 @@ int	powerDelivery(struct PowerDeliveryReqType* param, struct PowerDeliveryResTyp
 int	meteringStatus(struct MeteringStatusReqType* param, struct MeteringStatusResType* result);
 					
 int	meteringReceipt(struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result);
-					
-int	cableCheck(struct CableCheckReqType* param, struct CableCheckResType* result);
-					
-int	preCharge(struct PreChargeReqType* param, struct PreChargeResType* result);
-					
-int	currentDemand(struct CurrentDemandReqType* param, struct CurrentDemandResType* result);
-					
-int	weldingDetection(struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result);
-					
-int	terminateCharging(struct TerminateChargingReqType* param, struct TerminateChargingResType* result);
 						
 	
 

+ 3 - 4
src/test/main.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -19,7 +19,7 @@
  *
  * @author Daniel.Peintner.EXT@siemens.com
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  * <p>Switch for sample programs: EXI codec only or for entire V2G service</p>
@@ -33,8 +33,7 @@
 
 int main(int argc, char *argv[]) {
 	/* EXI codec only */
-	/*  return main_codec(argc, argv);*/
-
+	 /* return main_codec(argc, argv); */
 
 	/* V2G client / service example scenario */
 	return main_service(argc, argv);

+ 2 - 2
src/test/main.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -19,7 +19,7 @@
  *
  * @author Daniel.Peintner.EXT@siemens.com
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  *

+ 2 - 2
src/test/main_codec.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Daniel.Peintner.EXT@siemens.com
- * @version 0.4
+ * @version 0.1
  * @contact Joerg.Heuer@siemens.com
  *
  * <p>Sample program to illustrate how to read an EXI stream and

+ 19 - 585
src/test/main_service.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/
@@ -37,309 +37,10 @@
 #define MAX_STRING_SIZE 256
 #define MAX_STREAM_SIZE 60
 
-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*/
-
-static void printEVSEStatus(struct EVSEStatusType* status);
 static void printErrorMessage(struct EXIService* service);
 
-static int ac_charging()
+int main_service(int argc, char *argv[])
 {
-	/* 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 */
-	struct EXIService service;
-	struct HeaderType v2gHeader;
-	struct SessionSetupReqType sessionSetup;
-	struct SessionSetupResType resultSessionSetup;
-	struct ChargeParameterDiscoveryReqType powerDiscovery;
-	struct ChargeParameterDiscoveryResType resultPowerDiscovery;
-	struct LineLockReqType lineLock;
-	struct LineLockResType resultLineLock;
-	struct PowerDeliveryReqType powerDelivery;
-	struct PowerDeliveryResType resultPowerDelivery;
-	struct MeteringStatusResType resultMeteringStatus;
-	struct MeteringReceiptReqType meteringReceipt;
-	struct MeteringReceiptResType resultMeteringReceipt;
-
-
-	struct FloatingValueType float_type; /* test float type*/
-
-
-	/* 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 = DOIP_HEADER_LENGTH;
-
-	/*******************
-	 * Init V2G Client *
-	 *******************/
-
-	init_v2gServiceClient(&service,bytes,string,inStream,MAX_STREAM_SIZE, outStream, MAX_STREAM_SIZE, transportHeaderOffset);
-
-	/*******************************
-	 * Setup data for sessionSetup *
-	 *******************************/
-
-	/* setup header information */
-	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.arraylen.data=1; /* array string length =1 of protocol version */
-	v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: optional elements have to be set used (=1) or not used (=0) */
-	v2gHeader.SessionInformation.isused.ServiceSessionID = 0; /* service session is not used */
-	v2gHeader.isused.Notification=0; /* no notification */
-
-	/* setup sessionSetup parameter */
-	sessionSetup.isused.PEVID=1; /*  PEVID is transported */
-	sessionSetup.PEVID.arraylen.data=1;
-	sessionSetup.PEVID.data[0]=10;
-	sessionSetup.PEVStatus.ChargerStandby=0; /* charger standby = true */
-	sessionSetup.PEVStatus.ConnectorLocked=0; /* connector locked = false */
-	sessionSetup.PEVStatus.ReadyToCharge=0; /* ReadyToCharge = false */
-
-
-
-	printf("PEV: call EVSE sessionSetup\n");
-
-	/*********************
-	 * Call sessionSetup *
-	 *********************/
-	if(call_sessionSetup(&service,&v2gHeader,&sessionSetup,&resultSessionSetup))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-		/* show result of the answer message of EVSE sessionSetup */
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d (OK)\n",resultSessionSetup.ResponseCode);
-		printf("\tEVSEID=%d\n",	resultSessionSetup.EVSEID.data[0]);
-		printEVSEStatus(&resultSessionSetup.EVSEStatus);
-		printf("\tTCurrent=%d\n",resultSessionSetup.TCurrent);
-	}
-
-
-	/*******************************************
-	 * Setup data for chargeParameterDiscovery *
-	 *******************************************/
-
-	powerDiscovery.PEVStatus.ChargerStandby = 1;
-	powerDiscovery.PEVStatus.ConnectorLocked = 0;
-	powerDiscovery.PEVStatus.ReadyToCharge=0;
-	powerDiscovery.ChargingMode = AC_charging_chargingModeType;
-	powerDiscovery.EoC = 12345678;
-
-	float_type.Multiplier = 0;
-	float_type.Unit = J_unitSymbolType;
-	float_type.Value = 100;
-
-	powerDiscovery.EAmount = float_type;
-	powerDiscovery.PEVMaxPhases = 3;
-
-	float_type.Unit = W_unitSymbolType;
-	float_type.Value = 600;
-	powerDiscovery.PEVMaxPower = float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 1000;
-	powerDiscovery.PEVMaxVoltage = float_type;
-	float_type.Value = 200;
-	powerDiscovery.PEVMinVoltage = float_type;
-
-	/* only required for DC */
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 200;
-	powerDiscovery.PEVMaxCurrent = float_type;
-	powerDiscovery.PEVMinCurrent = float_type;
-
-
-	/*********************************
-	 * Call chargeParameterDiscovery *
-	 *********************************/
-	printf("\nPEV: call EVSE chargeParameterDiscovery\n");
-
-	if(call_chargeParameterDiscovery(&service,&v2gHeader,&powerDiscovery,&resultPowerDiscovery))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode);
-		printEVSEStatus(&resultPowerDiscovery.EVSEStatus);
-		printf("\tEVSEMaxVoltage=%d\n",resultPowerDiscovery.EVSEMaxVoltage.Value);
-		/*printf("\tEVSEMaxCurrent=%d\n",resultPowerDiscovery.EVSEMaxCurrent.Value);*/
-		printf("\tEVSEMaxPhases=%d\n",resultPowerDiscovery.EVSEMaxPhases);
-
-		/*printf("\tEnergyProvider=%d\n",resultPowerDiscovery.EnergyProvider.data[0]);*/
-
-	}
-
-
-
-
-	/*********************************
-	 * Setup data for lineLock *
-	 *********************************/
-
-	lineLock.PEVStatus.ChargerStandby = 1;
-	lineLock.PEVStatus.ConnectorLocked = 1;
-	lineLock.PEVStatus.ReadyToCharge = 1;
-	lineLock.ReqLockStatus = 1;
-
-	/***********************
-	 * Call lineLock *
-	 ***********************/
-	printf("\nPEV: call EVSE lineLock\n");
-
-	if(call_lineLock(&service,&v2gHeader,&lineLock,&resultLineLock))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultLineLock.ResponseCode);
-		printEVSEStatus(&resultLineLock.EVSEStatus);
-
-	}
-
-
-
-	/*********************************
-	 * Setup data for powerDelivery *
-	 *********************************/
-
-	powerDelivery.PEVStatus = lineLock.PEVStatus; /* PEV status, taken from lineLock */
-	/*powerDelivery.isused.Tariff = 0;
-	powerDelivery.Tariff = Green_charge_tariffIDType;*/
-
-	/***********************
-	 * Call powerDelivery *
-	 ***********************/
-	printf("\nPEV: call EVSE powerDelivery\n");
-
-	if(call_powerDelivery(&service,&v2gHeader,&powerDelivery,&resultPowerDelivery))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPowerDelivery.ResponseCode);
-	}
-
-
-
-
-
-
-	/********************
-	 * Call meterStatus *
-	 ********************/
-
-	printf("\nPEV: call EVSE meterStatus\n");
-
-	if(call_meteringStatus(&service,&v2gHeader,&resultMeteringStatus))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode);
-		printEVSEStatus(&resultPowerDiscovery.EVSEStatus);
-		printf("\tEVSEID=%d\n",resultMeteringStatus.EVSEID.data[0]);
-		printf("\tEVSEMaxPower=%d\n",resultMeteringStatus.EVSEMaxPower.Value);
-		printf("\tisused.MeterInfo=%d\n",		resultMeteringStatus.isused.MeterInfo);
-		printf("\t\tMeterInfo.MeterID=%d\n",		resultMeteringStatus.MeterInfo.MeterID.data[0]);
-		printf("\t\tMeterInfo.MeterReading.Value=%d\n",		resultMeteringStatus.MeterInfo.MeterReading.Value);
-		printf("\t\tMeterInfo.MeterStatus=%d\n",		resultMeteringStatus.MeterInfo.MeterStatus);
-	/*	printf("\t\tMeterInfo.TMeter=%d\n",		resultMeteringStatus.MeterInfo.TMeter);*/
-	/*	printf("\t\tisused.PCurrent=%d\n",		resultMeteringStatus.isused.PCurrent);
-		printf("\t\tPCurrent=%d\n",		resultMeteringStatus.PCurrent.Value);*/
-
-	}
-
-
-
-
-	/*********************************
-	 * Setup data for meteringReceipt *
-	 *********************************/
-
-	meteringReceipt.PEVID.arraylen.data=1;
-	meteringReceipt.PEVID.data[0]=10;
-	meteringReceipt.isused.PEVID=1;
-
-	meteringReceipt.PEVStatus = powerDelivery.PEVStatus; /* PEV status, taken from sessionSetup */
-
-	meteringReceipt.TCurrent = 12345;
-	meteringReceipt.isused.TCurrent = 1;
-	meteringReceipt.Tariff = Green_charge_tariffIDType;
-	meteringReceipt.MeterInfo.MeterStatus = 2;
-	meteringReceipt.MeterInfo.isused.MeterStatus = 1;
-
-
-	meteringReceipt.MeterInfo.MeterID.arraylen.data=1;
-	meteringReceipt.MeterInfo.MeterID.data[0]=3;
-	meteringReceipt.MeterInfo.isused.MeterID = 1;
-
-	meteringReceipt.MeterInfo.MeterReading.Multiplier = 0;
-	meteringReceipt.MeterInfo.MeterReading.Unit = A_unitSymbolType;
-	meteringReceipt.MeterInfo.MeterReading.Value = 500;
-	meteringReceipt.MeterInfo.isused.MeterReading = 1;
-
-	meteringReceipt.MeterInfo.TMeter =123456789;
-	meteringReceipt.MeterInfo.isused.TMeter = 1;
-
-
-
-	/***********************
-	 * Call meteringReceipt *
-	 ***********************/
-	printf("\nPEV: call EVSE meteringReceipt\n");
-
-
-
-	if(call_meteringReceipt(&service,&v2gHeader,&meteringReceipt,&resultMeteringReceipt))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultMeteringReceipt.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*/
@@ -357,25 +58,9 @@ static int dc_charging()
 	struct HeaderType v2gHeader;
 	struct SessionSetupReqType sessionSetup;
 	struct SessionSetupResType resultSessionSetup;
-	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 TerminateChargingReqType terminateCharging;
-	struct TerminateChargingResType resultTerminateCharging;
-
-
-
+	/*struct PowerDiscoveryReqType powerDiscovery;
+	struct PowerDiscoveryResType resultPowerDiscovery; */
 
-	struct FloatingValueType float_type; /* test float type*/
 
 
 	/* BINARY memory setup */
@@ -389,6 +74,8 @@ static int dc_charging()
 	transportHeaderOffset = DOIP_HEADER_LENGTH;
 
 
+	printf("+++Start V2G Client / Service Example+++\n\n");
+
 	/*******************
 	 * Init V2G Client *
 	 *******************/
@@ -396,26 +83,22 @@ static int dc_charging()
 	init_v2gServiceClient(&service,bytes,string,inStream,MAX_STREAM_SIZE, outStream, MAX_STREAM_SIZE, transportHeaderOffset);
 
 	/*******************************
-	 * Setup data for sessionSetup *
+	 * Setup data for sessionSetup *
 	 *******************************/
 
 	/* setup header information */
 	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.arraylen.data=1; /* array string length =1 of protocol version */
-	v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: optional elements have to be set used (=1) or not used (=0) */
-	v2gHeader.SessionInformation.isused.ServiceSessionID = 0; /* service session is not used */
+	v2gHeader.SessionInformation.isused.ProtocolVersion = 1; /* important: signalize, protocol version is used */
 	v2gHeader.isused.Notification=0; /* no notification */
 
 	/* setup sessionSetup parameter */
-	sessionSetup.isused.PEVID=1; /* no PEVID is transported */
-	sessionSetup.PEVID.arraylen.data=1;
-	sessionSetup.PEVID.data[0]=10;
-	sessionSetup.PEVStatus.ChargerStandby=0; /* charger standby = true */
+	sessionSetup.isused.PEVID=0; /* no PEVID is transported */
+	sessionSetup.PEVStatus.ChargerStandby=1; /* charger standby = true */
 	sessionSetup.PEVStatus.ConnectorLocked=0; /* connector locked = false */
 
 
-
 	printf("PEV: call EVSE sessionSetup\n");
 
 	/*********************
@@ -427,273 +110,24 @@ static int dc_charging()
 	}
 	else
 	{
-		/* show result of the answer message of EVSE sessionSetup */
+		/* show result of the answer message of EVSE sessionSetup*/
 		printf("PEV: received response message from EVSE\n");
 		printf("\tResponseCode=%d\n",resultSessionSetup.ResponseCode);
 		printf("\tEVSEID=%d\n",	resultSessionSetup.EVSEID.data[0]);
-		printEVSEStatus(&resultSessionSetup.EVSEStatus);
+		printf("\tEVSEStatus:\n\t\tConnectorLocked=%d\n",resultSessionSetup.EVSEStatus.ConnectorLocked);
+		printf("\t\tEVSEStandby=%d\n",resultSessionSetup.EVSEStatus.EVSEStandby);
+		printf("\t\tFatalError=%d\n",resultSessionSetup.EVSEStatus.FatalError);
+		printf("\t\tPowerSwitchClosed=%d\n",resultSessionSetup.EVSEStatus.PowerSwitchClosed);
+		printf("\t\tRCD=%d\n",resultSessionSetup.EVSEStatus.RCD);
+		printf("\t\tShutDownTime=%d\n",resultSessionSetup.EVSEStatus.ShutDownTime);
 		printf("\tTCurrent=%d\n",resultSessionSetup.TCurrent);
 	}
 
-
-	/*******************************************
-	 * Setup data for chargeParameterDiscovery *
-	 *******************************************/
-
-	powerDiscovery.PEVStatus = sessionSetup.PEVStatus; /* PEV status, taken from sessionSetup */
-	powerDiscovery.EoC = 4321;
-	powerDiscovery.ChargingMode = DC_charging_chargingModeType;
-
-	float_type.Multiplier = 2;
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 700;
-
-	float_type.Multiplier = 0;
-	float_type.Unit = J_unitSymbolType;
-	float_type.Value = 100;
-
-	powerDiscovery.EAmount = float_type;
-	powerDiscovery.PEVMaxPhases = 3;
-
-	float_type.Unit = W_unitSymbolType;
-	float_type.Value = 600;
-	powerDiscovery.PEVMaxPower = float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 1000;
-	powerDiscovery.PEVMaxVoltage = float_type;
-	float_type.Value = 200;
-	powerDiscovery.PEVMinVoltage = float_type;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 800;
-	powerDiscovery.PEVMaxCurrent = float_type;
-	float_type.Value = 150;
-	powerDiscovery.PEVMinCurrent = float_type;
-
-
-	/*********************************
-	 * Call chargeParameterDiscovery *
-	 *********************************/
-	printf("\nPEV: call EVSE chargeParameterDiscovery\n");
-
-	if(call_chargeParameterDiscovery(&service,&v2gHeader,&powerDiscovery,&resultPowerDiscovery))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPowerDiscovery.ResponseCode);
-		printEVSEStatus(&resultPowerDiscovery.EVSEStatus);
-		printf("\tEVSEMaxVoltage=%d\n",resultPowerDiscovery.EVSEMaxVoltage.Value);
-		printf("\tEVSEMaxCurrent=%d\n",resultPowerDiscovery.EVSEMaxCurrent.Value);
-		printf("\tEVSEMinCurrent=%d\n",resultPowerDiscovery.EVSEMinCurrent.Value);
-		printf("\tEVSEMaxPhases=%d\n",resultPowerDiscovery.EVSEMaxPhases);
-
-		/*printf("\tEnergyProvider=%d\n",resultPowerDiscovery.EnergyProvider.data[0]);*/
-
-	}
-
-	/***********************
-	 * Call cableCheck     *
-	 ***********************/
-	printf("\nPEV: call EVSE cableCheck\n");
-
-	cableCheck.PEVStatus.ChargerStandby = 1;
-	cableCheck.PEVStatus.ConnectorLocked = 1;
-	cableCheck.PEVStatus.ReadyToCharge = 1;
-
-
-	if(call_cableCheck(&service,&v2gHeader,&cableCheck,&resultCableCheck))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultCableCheck.ResponseCode);
-		printEVSEStatus(&resultCableCheck.EVSEStatus);
-	}
-
-
-	/*********************************
-	 * Setup data for powerDelivery *
-	 *********************************/
-
-	powerDelivery.PEVStatus = cableCheck.PEVStatus; /* PEV status, taken from sessionSetup */
-	powerDelivery.isused.Tariff = 0;
-	/*powerDelivery.Tariff = Green_charge_tariffIDType;*/
-
-	/***********************
-	 * Call powerDelivery *
-	 ***********************/
-	printf("\nPEV: call EVSE powerDelivery\n");
-
-	if(call_powerDelivery(&service,&v2gHeader,&powerDelivery,&resultPowerDelivery))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE sessionSetup*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPowerDelivery.ResponseCode);
-		printEVSEStatus(&resultPowerDelivery.EVSEStatus);
-	}
-
-
-	/***********************
-	 * Call preCharge      *
-	 ***********************/
-	printf("\nPEV: call EVSE preCharge\n");
-
-	preCharge.PEVStatus = cableCheck.PEVStatus;
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 400;
-	preCharge.PEVDemandCurrent = float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 700;
-	preCharge.PEVTargetVoltage = float_type;
-	float_type.Value = 300;
-	preCharge.VoltageDifferential = float_type;
-
-	if(call_preCharge(&service,&v2gHeader,&preCharge,&resultPreCharge))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultPreCharge.ResponseCode);
-		printEVSEStatus(&resultPreCharge.EVSEStatus);
-		printf("\tEVSEPresentVoltage=%d\n",resultPreCharge.EVSEPresentVoltage.Value);
-	}
-
-	/***********************
-	 * Call currentDemand      *
-	 ***********************/
-	printf("\nPEV: call EVSE currentDemand\n");
-
-	currentDemand.PEVStatus = powerDelivery.PEVStatus;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 44;
-	currentDemand.CurrentDifferential = float_type;
-
-	float_type.Value = 40;
-	currentDemand.PEVDemandCurrent = float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 300;
-	currentDemand.VoltageDifferential = float_type;
-
-	float_type.Value = 700;
-	preCharge.PEVTargetVoltage = float_type;
-	currentDemand.PEVTargetVoltage = float_type;
-
-	if(call_currentDemand(&service,&v2gHeader,&currentDemand,&resultCurrentDemand))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultCurrentDemand.ResponseCode);
-		printEVSEStatus(&resultCurrentDemand.EVSEStatus);
-		printf("\tEVSEPresentVoltage.Value=%d\n",resultCurrentDemand.EVSEPresentVoltage.Value);
-		printf("\tEVSEPresentCurrent.Value=%d\n",resultCurrentDemand.EVSEPresentCurrent.Value);
-
-	}
-
-
-
-	/***********************
-	 * Call weldingDetection     *
-	 ***********************/
-	printf("\nPEV: call EVSE weldingDetection\n");
-	weldingDetection.PEVStatus = powerDelivery.PEVStatus;
-
-	if(call_weldingDetection(&service,&v2gHeader,&weldingDetection,&resultWeldingDetection))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultWeldingDetection.ResponseCode);
-		printEVSEStatus(&resultWeldingDetection.EVSEStatus);
-		printf("\tEVSEPresentVoltage=%d\n",resultWeldingDetection.EVSEPresentVoltage.Value);
-	}
-
-	/*************************
-	 * Call terminateCharging*
-	 *************************/
-	printf("\nPEV: call EVSE terminateCharging\n");
-	terminateCharging.PEVStatus = sessionSetup.PEVStatus;
-
-	if(call_terminateCharging(&service,&v2gHeader,&terminateCharging,&resultTerminateCharging))
-	{
-		printErrorMessage(&service);
-	}
-	else
-	{
-
-		/* show result of the answer message of EVSE powerDiscovery*/
-		printf("PEV: received response message from EVSE\n");
-		printf("\tResponseCode=%d\n",resultTerminateCharging.ResponseCode);
-		printEVSEStatus(&resultWeldingDetection.EVSEStatus);
-		printf("\tEVSEPresentVoltage.Value=%d\n",resultTerminateCharging.EVSEPresentVoltage.Value);
-	}
-
+	printf("\n+++Terminate V2G Client / Service Example+++");
 
 	return 0;
 }
 
-int main_service()
-{
-	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 printEVSEStatus(struct EVSEStatusType* status)
-{
-	printf("\tEVSEStatus:\n\t\tConnectorLocked=%d\n",status->ConnectorLocked);
-	printf("\t\tEVSEStandby=%d\n",status->EVSEStandby);
-	printf("\t\tFatalError=%d\n",status->FatalError);
-	printf("\t\tPowerSwitchClosed=%d\n",status->PowerSwitchClosed);
-	printf("\t\tRCD=%d\n",status->RCD);
-	printf("\t\tChargerStandby=%d\n",status->ChargerStandby);
-	printf("\t\tEVSEMalfunction=%d\n",status->EVSEMalfunction);
-	printf("\t\tShutDownTime=%d\n",status->ShutDownTime);
-}
-
 static void printErrorMessage(struct EXIService* service)
 {
 	if(service->errorCode==EXI_NON_VALID_MESSAGE)

+ 2 - 2
src/test/v2g_server.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/test/v2g_server.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/test/v2g_serviceClientDataTransmitter.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 10 - 292
src/test/v2g_serviceMethods.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -18,7 +18,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/
@@ -31,27 +31,26 @@
 
 int	sessionSetup(struct SessionSetupReqType* param, struct SessionSetupResType* result)
 {
+
 	printf("EVSE: sessionSetup called\n"  );
 	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
+	printf("\t\t PEVStatus ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
+	printf("\t\t PEVStatus ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
 
 	/* Prepare data for PEV */
 	result->ResponseCode = OK_SessionSetup_responseCode_SessionSetupType;
-	result->EVSEID.data[0]=1;
+	result->EVSEID.data[0]='E';
 	result->EVSEID.arraylen.data=1;
 	result->EVSEStatus.ConnectorLocked=0;
 	result->EVSEStatus.EVSEStandby=1;
 	result->EVSEStatus.FatalError=0;
 	result->EVSEStatus.PowerSwitchClosed=1;
 	result->EVSEStatus.RCD=1;
-	result->EVSEStatus.ShutDownTime=12345678;
-	result->EVSEStatus.ChargerStandby = 1;
-	result->EVSEStatus.EVSEMalfunction = 0;
-	result->TCurrent=12345678;
+	result->EVSEStatus.ShutDownTime=12345678L;
+	result->TCurrent=12345678L;
 
 	return 0;
+
 }
 
 int	serviceDiscovery(struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result)
@@ -69,309 +68,28 @@ int	paymentDetails(struct PaymentDetailsReqType* param, struct PaymentDetailsRes
 	return 0;
 }
 
-int	chargeParameterDiscovery(struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result)
+int	powerDiscovery(struct PowerDiscoveryReqType* param, struct PowerDiscoveryResType* result)
 {
-	printf("EVSE: chargeParameterDiscovery called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
-
-	if(param->ChargingMode==AC_charging_chargingModeType)
-		printf("\t\t ChargingMode=AC_charging\n");
-	else
-		printf("\t\t ChargingMode=DC_charging\n");
-
-	printf("\t\t Eoc=%d\n", param->EoC);
-	printf("\t\t EAmount=%d\n", param->EAmount.Value);
-	printf("\t\t PEVMaxPower=%d\n", param->PEVMaxPower.Value);
-	printf("\t\t PEVMaxPhases=%d\n", param->PEVMaxPhases);
-	printf("\t\t PEVMaxVoltage=%d\n", param->PEVMaxVoltage.Value);
-	printf("\t\t PEVMinVoltage=%d\n", param->PEVMinVoltage.Value);
-
-
-	if(param->ChargingMode==DC_charging_chargingModeType)
-	{
-		printf("\t\t PEVMaxCurrent=%d\n", param->PEVMaxCurrent.Value);
-		printf("\t\t PEVMinCurrent=%d\n", param->PEVMinCurrent.Value);
-	}
-
-	result->ResponseCode = 0;
-	result->EVSEStatus.ConnectorLocked=0;
-	result->EVSEStatus.FatalError=0;
-	result->EVSEStatus.EVSEStandby=1;
-	result->EVSEStatus.PowerSwitchClosed=0;
-	result->EVSEStatus.RCD=1;
-	result->EVSEStatus.ShutDownTime=12345;
-	result->EVSEStatus.ChargerStandby = 1;
-	result->EVSEStatus.EVSEMalfunction = 0;
-	result->EVSEMaxVoltage.Multiplier = 0;
-	result->EVSEMaxVoltage.Unit = V_unitSymbolType;
-	result->EVSEMaxVoltage.Value = 950;
-	result->EVSEMaxPhases = 3;
-
-	/* only for DC charging */
-	result->EVSEMaxCurrent.Multiplier = 0;
-	result->EVSEMaxCurrent.Unit = A_unitSymbolType;
-	result->EVSEMaxCurrent.Value = 10;
-	result->EVSEMinCurrent.Multiplier = 0;
-	result->EVSEMinCurrent.Unit = A_unitSymbolType;
-	result->EVSEMinCurrent.Value = 2;
-
-
-	result->isused.EnergyProvider=0;
-	/*result->EnergyProvider.arraylen.data=1;
-	result->EnergyProvider.data[0]=11; */
-	result->isused.TariffTable = 0;
 
 	return 0;
 }
 
 int	lineLock(struct LineLockReqType* param, struct LineLockResType* result)
 {
-	printf("EVSE: lineLock called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
-	printf("\t\t ReqLockStatus=%d\n", param->ReqLockStatus);
-
-	result->ResponseCode = 0;
-	result->EVSEStatus.ConnectorLocked=0;
-	result->EVSEStatus.FatalError=0;
-	result->EVSEStatus.EVSEStandby=1;
-	result->EVSEStatus.PowerSwitchClosed=1;
-	result->EVSEStatus.RCD=1;
-	result->EVSEStatus.ShutDownTime=12345;
-	result->EVSEStatus.ChargerStandby = 1;
-	result->EVSEStatus.EVSEMalfunction = 0;
-
 	return 0;
 }
 
 int	powerDelivery(struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result)
 {
-	printf("EVSE: powerDelivery called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
-
-	result->ResponseCode=0;
-	result->EVSEStatus.ConnectorLocked=0;
-	result->EVSEStatus.FatalError=0;
-	result->EVSEStatus.EVSEStandby=1;
-	result->EVSEStatus.PowerSwitchClosed=1;
-	result->EVSEStatus.RCD=1;
-	result->EVSEStatus.ShutDownTime=12345;
-	result->EVSEStatus.ChargerStandby = 1;
-	result->EVSEStatus.EVSEMalfunction = 0;
-
 	return 0;
 }
 
 int	meteringStatus(struct MeteringStatusReqType* param, struct MeteringStatusResType* result)
 {
-	printf("EVSE: meteringStatus called\n"  );
-
-	result->ResponseCode=1;
-	result->EVSEID.data[0]=1;
-	result->EVSEID.arraylen.data=1;
-	result->EVSEStatus.ConnectorLocked=1;
-	result->EVSEStatus.EVSEStandby=1;
-	result->EVSEStatus.FatalError=0;
-	result->EVSEStatus.PowerSwitchClosed=1;
-	result->EVSEStatus.RCD=1;
-	result->EVSEStatus.ShutDownTime=12345678;
-	result->EVSEStatus.EVSEMalfunction = 0;
-	result->EVSEStatus.ChargerStandby = 1;
-	result->TCurrent=12345678;
-	result->EVSEMaxPower.Multiplier = 2;
-	result->EVSEMaxPower.Unit = A_unitSymbolType;
-	result->EVSEMaxPower.Value = 400;
-
-	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.MeterID=1;
-	result->MeterInfo.isused.MeterReading = 1;
-	result->MeterInfo.isused.MeterStatus=1;
-	result->MeterInfo.isused.TMeter=1;
-
-	result->isused.PCurrent=1;
-	result->PCurrent.Value=4321;
-
 	return 0;
 }
 
 int	meteringReceipt(struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result)
 {
-
-	printf("EVSE: meteringReceipt called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
-	printf("\t\t TCurrent=%d\n", param->TCurrent);
-	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);
-	if(param->Tariff==Green_charge_tariffIDType)
-		printf("\t\t Tariff==Green_charge_tariffIDType\n");
-	result->ResponseCode = 0;
-
-	return 0;
-}
-
-int	cableCheck(struct CableCheckReqType* param, struct CableCheckResType* result)
-{
-	printf("EVSE: cableCheck called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
-
-	result->EVSEStatus.ConnectorLocked=1;
-	result->EVSEStatus.EVSEStandby=1;
-	result->EVSEStatus.FatalError=0;
-	result->EVSEStatus.PowerSwitchClosed=1;
-	result->EVSEStatus.RCD=1;
-	result->EVSEStatus.ShutDownTime=12345678;
-	result->EVSEStatus.EVSEMalfunction = 0;
-	result->EVSEStatus.ChargerStandby = 1;
-
-	result->ResponseCode = OK_responseCode_CableCheckType;
-
 	return 0;
 }
-
-
-int	preCharge(struct PreChargeReqType* param, struct PreChargeResType* result)
-{
-	struct FloatingValueType float_type;
-	float_type.Multiplier = 0;
-	float_type.Unit = V_unitSymbolType;
-
-	printf("EVSE: currentDemand called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
-
-	printf("\t\t PEVDemandCurrent=%d\n",param->PEVDemandCurrent.Value);
-	printf("\t\t PEVTargetVoltage=%d\n", param->PEVTargetVoltage.Value);
-
-	result->ResponseCode=OK_responseCode_CurrentDemandType;
-	result->EVSEStatus.ConnectorLocked=1;
-	result->EVSEStatus.EVSEStandby=1;
-	result->EVSEStatus.FatalError=0;
-	result->EVSEStatus.PowerSwitchClosed=1;
-	result->EVSEStatus.RCD=1;
-	result->EVSEStatus.ShutDownTime=12345678;
-	result->EVSEStatus.ChargerStandby=1;
-	result->EVSEStatus.EVSEMalfunction=0;
-	result->EVSEStatus.StopCharging=0;
-
-	float_type.Value = 800;
-
-	result->EVSEPresentVoltage = float_type;
-
-
-	return 0;
-
-
-}
-
-int	currentDemand(struct CurrentDemandReqType* param, struct CurrentDemandResType* result)
-{
-	struct FloatingValueType float_type;
-	float_type.Multiplier = 0;
-
-	printf("EVSE: currentDemand called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
-
-	printf("\t\t PEVDemandCurrent=%d\n",param->PEVDemandCurrent.Value);
-	printf("\t\t PEVTargetVoltage=%d\n", param->PEVTargetVoltage.Value);
-
-	result->EVSEStatus.ConnectorLocked=1;
-	result->EVSEStatus.EVSEStandby=1;
-	result->EVSEStatus.FatalError=0;
-	result->EVSEStatus.PowerSwitchClosed=1;
-	result->EVSEStatus.RCD=1;
-	result->EVSEStatus.ShutDownTime=12345678;
-	result->EVSEStatus.ChargerStandby=1;
-	result->EVSEStatus.EVSEMalfunction=0;
-	result->EVSEStatus.StopCharging=0;
-	result->ResponseCode=OK_responseCode_CurrentDemandType;
-
-	float_type.Unit = A_unitSymbolType;
-	float_type.Value = 40;
-	result->EVSEPresentCurrent = float_type;
-
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 700;
-	result->EVSEPresentVoltage = float_type;
-
-	return 0;
-}
-
-int	weldingDetection(struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result)
-{
-	struct FloatingValueType float_type;
-	float_type.Multiplier = 0;
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value = 0;
-
-	printf("EVSE: weldingDetection called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
-
-	result->ResponseCode = OK_responseCode_WeldingDetectionType;
-
-	result->EVSEStatus.ConnectorLocked=1;
-	result->EVSEStatus.EVSEStandby=1;
-	result->EVSEStatus.FatalError=0;
-	result->EVSEStatus.PowerSwitchClosed=1;
-	result->EVSEStatus.RCD=1;
-	result->EVSEStatus.ShutDownTime=12345678;
-	result->EVSEStatus.ChargerStandby=1;
-	result->EVSEStatus.EVSEMalfunction=0;
-	result->EVSEStatus.StopCharging=0;
-
-	result->EVSEPresentVoltage=float_type;
-
-	return 0;
-}
-
-int	terminateCharging(struct TerminateChargingReqType* param, struct TerminateChargingResType* result)
-{
-	struct FloatingValueType float_type;
-	float_type.Multiplier = 	0;
-	float_type.Unit = V_unitSymbolType;
-	float_type.Value =0;
-
-	printf("EVSE: terminateCharging called\n"  );
-	printf("\tReceived data:\n");
-	printf("\t\t PEVStatus:\n\t\t\t ChargerStandby=%d\n",param->PEVStatus.ChargerStandby);
-	printf("\t\t\t ConnectorLocked=%d\n", param->PEVStatus.ConnectorLocked);
-	printf("\t\t\t ReadyToCharge=%d\n", param->PEVStatus.ReadyToCharge);
-
-	result->EVSEPresentVoltage = float_type;
-	result->ResponseCode = OK_responseCode_TerminateChargingType;
-
-
-	return 0;
-
-}

+ 2 - 2
src/transport/doIP.c

@@ -1,6 +1,6 @@
 
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -19,7 +19,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

+ 2 - 2
src/transport/doIP.h

@@ -1,6 +1,6 @@
 
 /*
- * Copyright (C) 2007-2011 Siemens AG
+ * 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
@@ -19,7 +19,7 @@
 /*******************************************************************
  *
  * @author Sebastian.Kaebisch.EXT@siemens.com
- * @version 0.4
+ * @version 0.3.1
  * @contact Joerg.Heuer@siemens.com
  *
  ********************************************************************/

部分文件因为文件数量过多而无法显示