mirror of
https://github.com/Martin-P/OpenV2G.git
synced 2024-11-18 12:53:58 +00:00
* get ready for release 0.9
git-svn-id: https://svn.code.sf.net/p/openv2g/code/trunk@86 d9f2db14-54d0-4bde-b00c-16405c910529
This commit is contained in:
parent
7814569390
commit
c3dab49523
108 changed files with 38218 additions and 65644 deletions
416
.cproject
416
.cproject
|
@ -5,12 +5,12 @@
|
|||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.181718907" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
@ -18,7 +18,7 @@
|
|||
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.181718907." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.base.186426714" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.base">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.PE" id="cdt.managedbuild.target.gnu.platform.mingw.base.208578740" name="Debug Platform" osList="win32" superClass="cdt.managedbuild.target.gnu.platform.mingw.base"/>
|
||||
<builder buildPath="${workspace_loc:/OpenV2G}/Debug" id="cdt.managedbuild.builder.gnu.cross.474380604" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/OpenV2G}/Debug" id="cdt.managedbuild.builder.gnu.cross.474380604" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.base.467817276" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1213164158" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
|
@ -30,10 +30,8 @@
|
|||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.base.1511109002" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.base">
|
||||
<option id="gnu.c.compiler.option.include.paths.229245493" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""../src/codec""/>
|
||||
<listOptionValue builtIn="false" value=""../src/codec/appHandCodec""/>
|
||||
<listOptionValue builtIn="false" value=""../src/appHandshake""/>
|
||||
<listOptionValue builtIn="false" value=""../src/transport""/>
|
||||
<listOptionValue builtIn="false" value=""../src/service""/>
|
||||
<listOptionValue builtIn="false" value=""../src/test""/>
|
||||
</option>
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1880660058" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
|
@ -41,7 +39,7 @@
|
|||
<option id="gnu.c.compiler.option.warnings.pedantic.1983095151" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.misc.ansi.1916749690" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.warnings.toerrors.990186240" name="Warnings as errors (-Werror)" superClass="gnu.c.compiler.option.warnings.toerrors" value="false" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.warnings.pedantic.error.145905553" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.warnings.pedantic.error.145905553" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error" value="false" valueType="boolean"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1904654876" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.1907160138" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base">
|
||||
|
@ -66,12 +64,12 @@
|
|||
<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">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
@ -91,18 +89,16 @@
|
|||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.base.2107890734" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.base">
|
||||
<option id="gnu.c.compiler.option.include.paths.289860304" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""../src/codec""/>
|
||||
<listOptionValue builtIn="false" value=""../src/codec/appHandCodec""/>
|
||||
<listOptionValue builtIn="false" value=""../src/appHandshake""/>
|
||||
<listOptionValue builtIn="false" value=""../src/transport""/>
|
||||
<listOptionValue builtIn="false" value=""../src/service""/>
|
||||
<listOptionValue builtIn="false" value=""../src/test""/>
|
||||
</option>
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.899621054" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1251127335" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.misc.ansi.496561434" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="true" valueType="boolean"/>
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.899621054" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" value="gnu.c.optimization.level.size" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1251127335" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.misc.ansi.496561434" name="Support ANSI programs (-ansi)" superClass="gnu.c.compiler.option.misc.ansi" value="false" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.warnings.pedantic.289278524" name="Pedantic (-pedantic)" superClass="gnu.c.compiler.option.warnings.pedantic" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.warnings.pedantic.error.822372173" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.optimization.flags.1051939537" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="-Os" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.warnings.pedantic.error.822372173" name="Pedantic warnings as errors (-pedantic-errors)" superClass="gnu.c.compiler.option.warnings.pedantic.error" value="false" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.optimization.flags.1051939537" name="Other optimization flags" superClass="gnu.c.compiler.option.optimization.flags" value="" valueType="string"/>
|
||||
<option id="gnu.c.compiler.option.misc.other.1470884128" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.898314529" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
|
@ -126,6 +122,28 @@
|
|||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="OpenV2G.cdt.managedbuild.target.gnu.mingw.exe.1420366407" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/OpenV2G"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/OpenV2G"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="OpenV2G.exe" path="Debug" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>OpenV2G.exe</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
|
@ -178,38 +196,8 @@
|
|||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.681614450;cdt.managedbuild.config.gnu.mingw.exe.release.681614450.;cdt.managedbuild.tool.gnu.c.compiler.base.1358204014;cdt.managedbuild.tool.gnu.c.compiler.input.822105819">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.181718907;cdt.managedbuild.config.gnu.mingw.exe.debug.181718907.;cdt.managedbuild.tool.gnu.c.compiler.mingw.base.1511109002;cdt.managedbuild.tool.gnu.c.compiler.input.1904654876">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
|
@ -260,119 +248,6 @@
|
|||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.681614450;cdt.managedbuild.config.gnu.mingw.exe.release.681614450.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.150928873;cdt.managedbuild.tool.gnu.c.compiler.input.2117635578">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.181718907;cdt.managedbuild.config.gnu.mingw.exe.debug.181718907.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.113647340;cdt.managedbuild.tool.gnu.c.compiler.input.67299528">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
|
@ -426,33 +301,162 @@
|
|||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.681614450;cdt.managedbuild.config.gnu.mingw.exe.release.681614450.;cdt.managedbuild.tool.gnu.c.compiler.mingw.base.2107890734;cdt.managedbuild.tool.gnu.c.compiler.input.898314529">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.681614450;cdt.managedbuild.config.gnu.mingw.exe.release.681614450.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.150928873;cdt.managedbuild.tool.gnu.c.compiler.input.2117635578">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.681614450;cdt.managedbuild.config.gnu.mingw.exe.release.681614450.;cdt.managedbuild.tool.gnu.c.compiler.base.1358204014;cdt.managedbuild.tool.gnu.c.compiler.input.822105819">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
|
@ -509,36 +513,6 @@
|
|||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1091708379;cdt.managedbuild.config.gnu.mingw.exe.release.1091708379.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.1844784508;cdt.managedbuild.tool.gnu.c.compiler.input.1276057383">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
|
@ -592,58 +566,6 @@
|
|||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/${specs_file}"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/OpenV2G"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/OpenV2G"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||
<buildTargets>
|
||||
<target name="OpenV2G.exe" path="Debug" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||
<buildCommand>make</buildCommand>
|
||||
<buildArguments/>
|
||||
<buildTarget>OpenV2G.exe</buildTarget>
|
||||
<stopOnError>true</stopOnError>
|
||||
<useDefaultCommand>true</useDefaultCommand>
|
||||
<runAllBuilders>true</runAllBuilders>
|
||||
</target>
|
||||
</buildTargets>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
</cproject>
|
||||
|
|
|
@ -10,8 +10,6 @@ RM := rm -rf
|
|||
-include sources.mk
|
||||
-include src/transport/subdir.mk
|
||||
-include src/test/subdir.mk
|
||||
-include src/service/subdir.mk
|
||||
-include src/codec/appHandCodec/subdir.mk
|
||||
-include src/codec/subdir.mk
|
||||
-include src/appHandshake/subdir.mk
|
||||
-include subdir.mk
|
||||
|
|
|
@ -15,8 +15,6 @@ EXECUTABLES :=
|
|||
SUBDIRS := \
|
||||
src/transport \
|
||||
src/test \
|
||||
src/service \
|
||||
src/codec \
|
||||
src/codec/appHandCodec \
|
||||
src/appHandshake \
|
||||
|
||||
|
|
|
@ -4,26 +4,26 @@
|
|||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../src/appHandshake/appHand_dataDeserialization.c \
|
||||
../src/appHandshake/appHand_dataSerialization.c \
|
||||
../src/appHandshake/appHand_dataTypes.c
|
||||
../src/appHandshake/appHandEXIDatatypes.c \
|
||||
../src/appHandshake/appHandEXIDatatypesDecoder.c \
|
||||
../src/appHandshake/appHandEXIDatatypesEncoder.c
|
||||
|
||||
OBJS += \
|
||||
./src/appHandshake/appHand_dataDeserialization.o \
|
||||
./src/appHandshake/appHand_dataSerialization.o \
|
||||
./src/appHandshake/appHand_dataTypes.o
|
||||
./src/appHandshake/appHandEXIDatatypes.o \
|
||||
./src/appHandshake/appHandEXIDatatypesDecoder.o \
|
||||
./src/appHandshake/appHandEXIDatatypesEncoder.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/appHandshake/appHand_dataDeserialization.d \
|
||||
./src/appHandshake/appHand_dataSerialization.d \
|
||||
./src/appHandshake/appHand_dataTypes.d
|
||||
./src/appHandshake/appHandEXIDatatypes.d \
|
||||
./src/appHandshake/appHandEXIDatatypesDecoder.d \
|
||||
./src/appHandshake/appHandEXIDatatypesEncoder.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/appHandshake/%.o: ../src/appHandshake/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O0 -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
gcc -I"../src/codec" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -O0 -g3 -pedantic -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../src/codec/appHandCodec/appHandEXICoder.c \
|
||||
../src/codec/appHandCodec/appHandEXIDecoder.c \
|
||||
../src/codec/appHandCodec/appHandEXIEncoder.c \
|
||||
../src/codec/appHandCodec/appHandNameTableEntries.c \
|
||||
../src/codec/appHandCodec/appHandQNames.c
|
||||
|
||||
OBJS += \
|
||||
./src/codec/appHandCodec/appHandEXICoder.o \
|
||||
./src/codec/appHandCodec/appHandEXIDecoder.o \
|
||||
./src/codec/appHandCodec/appHandEXIEncoder.o \
|
||||
./src/codec/appHandCodec/appHandNameTableEntries.o \
|
||||
./src/codec/appHandCodec/appHandQNames.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/codec/appHandCodec/appHandEXICoder.d \
|
||||
./src/codec/appHandCodec/appHandEXIDecoder.d \
|
||||
./src/codec/appHandCodec/appHandEXIEncoder.d \
|
||||
./src/codec/appHandCodec/appHandNameTableEntries.d \
|
||||
./src/codec/appHandCodec/appHandQNames.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/codec/appHandCodec/%.o: ../src/codec/appHandCodec/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O0 -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
@ -13,19 +13,13 @@ C_SRCS += \
|
|||
../src/codec/ByteDecoderChannel.c \
|
||||
../src/codec/ByteEncoderChannel.c \
|
||||
../src/codec/ByteStream.c \
|
||||
../src/codec/DynamicMemory.c \
|
||||
../src/codec/EXIHeaderDecoder.c \
|
||||
../src/codec/EXIHeaderEncoder.c \
|
||||
../src/codec/MethodsBag.c \
|
||||
../src/codec/StringNameTable.c \
|
||||
../src/codec/StringValueTable.c \
|
||||
../src/codec/UCSString.c \
|
||||
../src/codec/main_codec.c \
|
||||
../src/codec/v2gEXICoder.c \
|
||||
../src/codec/v2gEXIDecoder.c \
|
||||
../src/codec/v2gEXIEncoder.c \
|
||||
../src/codec/v2gNameTableEntries.c \
|
||||
../src/codec/v2gQNames.c
|
||||
../src/codec/v2gEXIDatatypes.c \
|
||||
../src/codec/v2gEXIDatatypesDecoder.c \
|
||||
../src/codec/v2gEXIDatatypesEncoder.c
|
||||
|
||||
OBJS += \
|
||||
./src/codec/AbstractDecoderChannel.o \
|
||||
|
@ -37,19 +31,13 @@ OBJS += \
|
|||
./src/codec/ByteDecoderChannel.o \
|
||||
./src/codec/ByteEncoderChannel.o \
|
||||
./src/codec/ByteStream.o \
|
||||
./src/codec/DynamicMemory.o \
|
||||
./src/codec/EXIHeaderDecoder.o \
|
||||
./src/codec/EXIHeaderEncoder.o \
|
||||
./src/codec/MethodsBag.o \
|
||||
./src/codec/StringNameTable.o \
|
||||
./src/codec/StringValueTable.o \
|
||||
./src/codec/UCSString.o \
|
||||
./src/codec/main_codec.o \
|
||||
./src/codec/v2gEXICoder.o \
|
||||
./src/codec/v2gEXIDecoder.o \
|
||||
./src/codec/v2gEXIEncoder.o \
|
||||
./src/codec/v2gNameTableEntries.o \
|
||||
./src/codec/v2gQNames.o
|
||||
./src/codec/v2gEXIDatatypes.o \
|
||||
./src/codec/v2gEXIDatatypesDecoder.o \
|
||||
./src/codec/v2gEXIDatatypesEncoder.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/codec/AbstractDecoderChannel.d \
|
||||
|
@ -61,26 +49,20 @@ C_DEPS += \
|
|||
./src/codec/ByteDecoderChannel.d \
|
||||
./src/codec/ByteEncoderChannel.d \
|
||||
./src/codec/ByteStream.d \
|
||||
./src/codec/DynamicMemory.d \
|
||||
./src/codec/EXIHeaderDecoder.d \
|
||||
./src/codec/EXIHeaderEncoder.d \
|
||||
./src/codec/MethodsBag.d \
|
||||
./src/codec/StringNameTable.d \
|
||||
./src/codec/StringValueTable.d \
|
||||
./src/codec/UCSString.d \
|
||||
./src/codec/main_codec.d \
|
||||
./src/codec/v2gEXICoder.d \
|
||||
./src/codec/v2gEXIDecoder.d \
|
||||
./src/codec/v2gEXIEncoder.d \
|
||||
./src/codec/v2gNameTableEntries.d \
|
||||
./src/codec/v2gQNames.d
|
||||
./src/codec/v2gEXIDatatypes.d \
|
||||
./src/codec/v2gEXIDatatypesDecoder.d \
|
||||
./src/codec/v2gEXIDatatypesEncoder.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/codec/%.o: ../src/codec/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O0 -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
gcc -I"../src/codec" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -O0 -g3 -pedantic -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../src/service/v2g_dataTypes.c \
|
||||
../src/service/v2g_serviceClientStubs.c \
|
||||
../src/service/v2g_serviceDataSerialization.c \
|
||||
../src/service/v2g_serviceDispatcher.c
|
||||
|
||||
OBJS += \
|
||||
./src/service/v2g_dataTypes.o \
|
||||
./src/service/v2g_serviceClientStubs.o \
|
||||
./src/service/v2g_serviceDataSerialization.o \
|
||||
./src/service/v2g_serviceDispatcher.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/service/v2g_dataTypes.d \
|
||||
./src/service/v2g_serviceClientStubs.d \
|
||||
./src/service/v2g_serviceDataSerialization.d \
|
||||
./src/service/v2g_serviceDispatcher.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/service/%.o: ../src/service/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O0 -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
@ -4,32 +4,26 @@
|
|||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../src/test/evse_server.c \
|
||||
../src/test/evse_serviceMethods.c \
|
||||
../src/test/main.c \
|
||||
../src/test/pev_service.c \
|
||||
../src/test/serviceClientDataTransmitter.c
|
||||
../src/test/main_databinder.c \
|
||||
../src/test/main_example.c
|
||||
|
||||
OBJS += \
|
||||
./src/test/evse_server.o \
|
||||
./src/test/evse_serviceMethods.o \
|
||||
./src/test/main.o \
|
||||
./src/test/pev_service.o \
|
||||
./src/test/serviceClientDataTransmitter.o
|
||||
./src/test/main_databinder.o \
|
||||
./src/test/main_example.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/test/evse_server.d \
|
||||
./src/test/evse_serviceMethods.d \
|
||||
./src/test/main.d \
|
||||
./src/test/pev_service.d \
|
||||
./src/test/serviceClientDataTransmitter.d
|
||||
./src/test/main_databinder.d \
|
||||
./src/test/main_example.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/test/%.o: ../src/test/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O0 -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
gcc -I"../src/codec" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -O0 -g3 -pedantic -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ C_DEPS += \
|
|||
src/transport/%.o: ../src/transport/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O0 -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
gcc -I"../src/codec" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -O0 -g3 -pedantic -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
19
README.txt
19
README.txt
|
@ -1,12 +1,11 @@
|
|||
-------------------------------------------------------------------------
|
||||
OpenV2G - an open source project implementing the basic functionality of the ISO IEC 15118 vehicle to grid (V2G) communication interface
|
||||
Version 0.8, released January, 2014
|
||||
Version 0.9, released June 19, 2014
|
||||
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-2014 Siemens AG
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
@ -22,6 +21,22 @@ 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.8:
|
||||
-------------------------------------------------------------------------
|
||||
* large code footprint reduction which resulted in a new API
|
||||
(please take a look at the example in src/test folder)
|
||||
* datatype differences w.r.t. arrays, strings, bytes, isUsed, and enum-naming
|
||||
* bug-fixes
|
||||
* Note: OpenV2G 0.8 and 0.9 are interoperable, meaning that one can generate
|
||||
streams with one and decode with the other or vice-versa
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
CHANGES from version 0.7:
|
||||
-------------------------------------------------------------------------
|
||||
* adaption of V2G schema changes (reflects the ISO/IEC 15118-2 FDIS status)
|
||||
* bug-fixes
|
||||
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
CHANGES from version 0.7:
|
||||
|
|
|
@ -10,8 +10,6 @@ RM := rm -rf
|
|||
-include sources.mk
|
||||
-include src/transport/subdir.mk
|
||||
-include src/test/subdir.mk
|
||||
-include src/service/subdir.mk
|
||||
-include src/codec/appHandCodec/subdir.mk
|
||||
-include src/codec/subdir.mk
|
||||
-include src/appHandshake/subdir.mk
|
||||
-include subdir.mk
|
||||
|
|
|
@ -15,8 +15,6 @@ EXECUTABLES :=
|
|||
SUBDIRS := \
|
||||
src/transport \
|
||||
src/test \
|
||||
src/service \
|
||||
src/codec \
|
||||
src/codec/appHandCodec \
|
||||
src/appHandshake \
|
||||
|
||||
|
|
|
@ -4,26 +4,26 @@
|
|||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../src/appHandshake/appHand_dataDeserialization.c \
|
||||
../src/appHandshake/appHand_dataSerialization.c \
|
||||
../src/appHandshake/appHand_dataTypes.c
|
||||
../src/appHandshake/appHandEXIDatatypes.c \
|
||||
../src/appHandshake/appHandEXIDatatypesDecoder.c \
|
||||
../src/appHandshake/appHandEXIDatatypesEncoder.c
|
||||
|
||||
OBJS += \
|
||||
./src/appHandshake/appHand_dataDeserialization.o \
|
||||
./src/appHandshake/appHand_dataSerialization.o \
|
||||
./src/appHandshake/appHand_dataTypes.o
|
||||
./src/appHandshake/appHandEXIDatatypes.o \
|
||||
./src/appHandshake/appHandEXIDatatypesDecoder.o \
|
||||
./src/appHandshake/appHandEXIDatatypesEncoder.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/appHandshake/appHand_dataDeserialization.d \
|
||||
./src/appHandshake/appHand_dataSerialization.d \
|
||||
./src/appHandshake/appHand_dataTypes.d
|
||||
./src/appHandshake/appHandEXIDatatypes.d \
|
||||
./src/appHandshake/appHandEXIDatatypesDecoder.d \
|
||||
./src/appHandshake/appHandEXIDatatypesEncoder.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/appHandshake/%.o: ../src/appHandshake/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O3 -Os -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
gcc -I"../src/codec" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -pedantic -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../src/codec/appHandCodec/appHandEXICoder.c \
|
||||
../src/codec/appHandCodec/appHandEXIDecoder.c \
|
||||
../src/codec/appHandCodec/appHandEXIEncoder.c \
|
||||
../src/codec/appHandCodec/appHandNameTableEntries.c \
|
||||
../src/codec/appHandCodec/appHandQNames.c
|
||||
|
||||
OBJS += \
|
||||
./src/codec/appHandCodec/appHandEXICoder.o \
|
||||
./src/codec/appHandCodec/appHandEXIDecoder.o \
|
||||
./src/codec/appHandCodec/appHandEXIEncoder.o \
|
||||
./src/codec/appHandCodec/appHandNameTableEntries.o \
|
||||
./src/codec/appHandCodec/appHandQNames.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/codec/appHandCodec/appHandEXICoder.d \
|
||||
./src/codec/appHandCodec/appHandEXIDecoder.d \
|
||||
./src/codec/appHandCodec/appHandEXIEncoder.d \
|
||||
./src/codec/appHandCodec/appHandNameTableEntries.d \
|
||||
./src/codec/appHandCodec/appHandQNames.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/codec/appHandCodec/%.o: ../src/codec/appHandCodec/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O3 -Os -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
@ -13,19 +13,13 @@ C_SRCS += \
|
|||
../src/codec/ByteDecoderChannel.c \
|
||||
../src/codec/ByteEncoderChannel.c \
|
||||
../src/codec/ByteStream.c \
|
||||
../src/codec/DynamicMemory.c \
|
||||
../src/codec/EXIHeaderDecoder.c \
|
||||
../src/codec/EXIHeaderEncoder.c \
|
||||
../src/codec/MethodsBag.c \
|
||||
../src/codec/StringNameTable.c \
|
||||
../src/codec/StringValueTable.c \
|
||||
../src/codec/UCSString.c \
|
||||
../src/codec/main_codec.c \
|
||||
../src/codec/v2gEXICoder.c \
|
||||
../src/codec/v2gEXIDecoder.c \
|
||||
../src/codec/v2gEXIEncoder.c \
|
||||
../src/codec/v2gNameTableEntries.c \
|
||||
../src/codec/v2gQNames.c
|
||||
../src/codec/v2gEXIDatatypes.c \
|
||||
../src/codec/v2gEXIDatatypesDecoder.c \
|
||||
../src/codec/v2gEXIDatatypesEncoder.c
|
||||
|
||||
OBJS += \
|
||||
./src/codec/AbstractDecoderChannel.o \
|
||||
|
@ -37,19 +31,13 @@ OBJS += \
|
|||
./src/codec/ByteDecoderChannel.o \
|
||||
./src/codec/ByteEncoderChannel.o \
|
||||
./src/codec/ByteStream.o \
|
||||
./src/codec/DynamicMemory.o \
|
||||
./src/codec/EXIHeaderDecoder.o \
|
||||
./src/codec/EXIHeaderEncoder.o \
|
||||
./src/codec/MethodsBag.o \
|
||||
./src/codec/StringNameTable.o \
|
||||
./src/codec/StringValueTable.o \
|
||||
./src/codec/UCSString.o \
|
||||
./src/codec/main_codec.o \
|
||||
./src/codec/v2gEXICoder.o \
|
||||
./src/codec/v2gEXIDecoder.o \
|
||||
./src/codec/v2gEXIEncoder.o \
|
||||
./src/codec/v2gNameTableEntries.o \
|
||||
./src/codec/v2gQNames.o
|
||||
./src/codec/v2gEXIDatatypes.o \
|
||||
./src/codec/v2gEXIDatatypesDecoder.o \
|
||||
./src/codec/v2gEXIDatatypesEncoder.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/codec/AbstractDecoderChannel.d \
|
||||
|
@ -61,26 +49,20 @@ C_DEPS += \
|
|||
./src/codec/ByteDecoderChannel.d \
|
||||
./src/codec/ByteEncoderChannel.d \
|
||||
./src/codec/ByteStream.d \
|
||||
./src/codec/DynamicMemory.d \
|
||||
./src/codec/EXIHeaderDecoder.d \
|
||||
./src/codec/EXIHeaderEncoder.d \
|
||||
./src/codec/MethodsBag.d \
|
||||
./src/codec/StringNameTable.d \
|
||||
./src/codec/StringValueTable.d \
|
||||
./src/codec/UCSString.d \
|
||||
./src/codec/main_codec.d \
|
||||
./src/codec/v2gEXICoder.d \
|
||||
./src/codec/v2gEXIDecoder.d \
|
||||
./src/codec/v2gEXIEncoder.d \
|
||||
./src/codec/v2gNameTableEntries.d \
|
||||
./src/codec/v2gQNames.d
|
||||
./src/codec/v2gEXIDatatypes.d \
|
||||
./src/codec/v2gEXIDatatypesDecoder.d \
|
||||
./src/codec/v2gEXIDatatypesEncoder.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/codec/%.o: ../src/codec/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O3 -Os -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
gcc -I"../src/codec" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -pedantic -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../src/service/v2g_dataTypes.c \
|
||||
../src/service/v2g_serviceClientStubs.c \
|
||||
../src/service/v2g_serviceDataSerialization.c \
|
||||
../src/service/v2g_serviceDispatcher.c
|
||||
|
||||
OBJS += \
|
||||
./src/service/v2g_dataTypes.o \
|
||||
./src/service/v2g_serviceClientStubs.o \
|
||||
./src/service/v2g_serviceDataSerialization.o \
|
||||
./src/service/v2g_serviceDispatcher.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/service/v2g_dataTypes.d \
|
||||
./src/service/v2g_serviceClientStubs.d \
|
||||
./src/service/v2g_serviceDataSerialization.d \
|
||||
./src/service/v2g_serviceDispatcher.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/service/%.o: ../src/service/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O3 -Os -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
@ -4,32 +4,26 @@
|
|||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../src/test/evse_server.c \
|
||||
../src/test/evse_serviceMethods.c \
|
||||
../src/test/main.c \
|
||||
../src/test/pev_service.c \
|
||||
../src/test/serviceClientDataTransmitter.c
|
||||
../src/test/main_databinder.c \
|
||||
../src/test/main_example.c
|
||||
|
||||
OBJS += \
|
||||
./src/test/evse_server.o \
|
||||
./src/test/evse_serviceMethods.o \
|
||||
./src/test/main.o \
|
||||
./src/test/pev_service.o \
|
||||
./src/test/serviceClientDataTransmitter.o
|
||||
./src/test/main_databinder.o \
|
||||
./src/test/main_example.o
|
||||
|
||||
C_DEPS += \
|
||||
./src/test/evse_server.d \
|
||||
./src/test/evse_serviceMethods.d \
|
||||
./src/test/main.d \
|
||||
./src/test/pev_service.d \
|
||||
./src/test/serviceClientDataTransmitter.d
|
||||
./src/test/main_databinder.d \
|
||||
./src/test/main_example.d
|
||||
|
||||
|
||||
# Each subdirectory must supply rules for building sources it contributes
|
||||
src/test/%.o: ../src/test/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O3 -Os -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
gcc -I"../src/codec" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -pedantic -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ C_DEPS += \
|
|||
src/transport/%.o: ../src/transport/%.c
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: GCC C Compiler'
|
||||
gcc -I"../src/codec" -I"../src/codec/appHandCodec" -I"../src/appHandshake" -I"../src/transport" -I"../src/service" -I"../src/test" -O3 -Os -g3 -pedantic -pedantic-errors -Wall -c -fmessage-length=0 -ansi -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
gcc -I"../src/codec" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -pedantic -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
|
64
src/appHandshake/appHandEXIDatatypes.c
Normal file
64
src/appHandshake/appHandEXIDatatypes.c
Normal file
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2014 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "appHandEXIDatatypes.h"
|
||||
#include "EXITypes.h"
|
||||
|
||||
|
||||
#ifndef EXI_appHand_DATATYPES_C
|
||||
#define EXI_appHand_DATATYPES_C
|
||||
|
||||
|
||||
|
||||
void init_appHandEXIDocument(struct appHandEXIDocument* exiDoc) {
|
||||
exiDoc->supportedAppProtocolReq_isUsed = 0u;
|
||||
exiDoc->supportedAppProtocolRes_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_appHandAppProtocolType(struct appHandAppProtocolType* appHandAppProtocolType) {
|
||||
}
|
||||
|
||||
void init_appHandAnonType_supportedAppProtocolReq(struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq) {
|
||||
appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_appHandAnonType_supportedAppProtocolRes(struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes) {
|
||||
appHandAnonType_supportedAppProtocolRes->SchemaID_isUsed = 0u;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
130
src/appHandshake/appHandEXIDatatypes.h
Normal file
130
src/appHandshake/appHandEXIDatatypes.h
Normal file
|
@ -0,0 +1,130 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2014 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \file EXIDatatypes.h
|
||||
* \brief Datatype definitions and structs for given XML Schema definitions and initialization methods
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EXI_appHand_DATATYPES_H
|
||||
#define EXI_appHand_DATATYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
|
||||
/* Datatype definitions and structs for given XML Schema definitions */
|
||||
|
||||
typedef enum {
|
||||
responseCodeType_OK_SuccessfulNegotiation = 0,
|
||||
responseCodeType_OK_SuccessfulNegotiationWithMinorDeviation = 1,
|
||||
responseCodeType_Failed_NoNegotiation = 2
|
||||
} appHandresponseCodeType;
|
||||
|
||||
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,AppProtocolType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(ProtocolNamespace,VersionNumberMajor,VersionNumberMinor,SchemaID,Priority)', derivedBy='RESTRICTION'. */
|
||||
#define appHandAppProtocolType_ProtocolNamespace_CHARACTERS_SIZE 100 /* XML schema facet maxLength for urn:iso:15118:2:2010:AppProtocol,protocolNamespaceType is 100 */
|
||||
struct appHandAppProtocolType {
|
||||
/* element: ProtocolNamespace, urn:iso:15118:2:2010:AppProtocol,protocolNamespaceType */
|
||||
struct {
|
||||
exi_string_character_t characters[appHandAppProtocolType_ProtocolNamespace_CHARACTERS_SIZE];
|
||||
uint16_t charactersLen;
|
||||
} ProtocolNamespace ;
|
||||
/* element: VersionNumberMajor, http://www.w3.org/2001/XMLSchema,unsignedInt */
|
||||
uint32_t VersionNumberMajor ;
|
||||
/* element: VersionNumberMinor, http://www.w3.org/2001/XMLSchema,unsignedInt */
|
||||
uint32_t VersionNumberMinor ;
|
||||
/* element: SchemaID, urn:iso:15118:2:2010:AppProtocol,idType */
|
||||
uint8_t SchemaID ;
|
||||
/* element: Priority, urn:iso:15118:2:2010:AppProtocol,priorityType */
|
||||
uint8_t Priority ;
|
||||
};
|
||||
|
||||
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolRes', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(ResponseCode,SchemaID{0-1})', derivedBy='RESTRICTION'. */
|
||||
struct appHandAnonType_supportedAppProtocolRes {
|
||||
/* element: ResponseCode, urn:iso:15118:2:2010:AppProtocol,responseCodeType */
|
||||
appHandresponseCodeType ResponseCode ;
|
||||
/* element: SchemaID, urn:iso:15118:2:2010:AppProtocol,idType */
|
||||
uint8_t SchemaID ;
|
||||
unsigned int SchemaID_isUsed:1;
|
||||
};
|
||||
|
||||
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolReq', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(AppProtocol{1-20})', derivedBy='RESTRICTION'. */
|
||||
#define appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE 5
|
||||
struct appHandAnonType_supportedAppProtocolReq {
|
||||
/* element: AppProtocol, Complex type name='urn:iso:15118:2:2010:AppProtocol,AppProtocolType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(ProtocolNamespace,VersionNumberMajor,VersionNumberMinor,SchemaID,Priority)', derivedBy='RESTRICTION'. */
|
||||
struct {
|
||||
struct appHandAppProtocolType array[appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE];
|
||||
uint16_t arrayLen;
|
||||
} AppProtocol;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Possible root elements of EXI Document */
|
||||
struct appHandEXIDocument {
|
||||
#define USE_UNION_FOR_GLOBAL_ELEMENTS 1
|
||||
#ifdef USE_UNION_FOR_GLOBAL_ELEMENTS
|
||||
union {
|
||||
#endif
|
||||
struct appHandAnonType_supportedAppProtocolReq supportedAppProtocolReq ;
|
||||
struct appHandAnonType_supportedAppProtocolRes supportedAppProtocolRes ;
|
||||
#ifdef USE_UNION_FOR_GLOBAL_ELEMENTS
|
||||
};
|
||||
#endif
|
||||
unsigned int supportedAppProtocolReq_isUsed:1;
|
||||
unsigned int supportedAppProtocolRes_isUsed:1;
|
||||
|
||||
|
||||
int _warning_;
|
||||
};
|
||||
|
||||
/* Initialization methods for structs */
|
||||
|
||||
void init_appHandEXIDocument(struct appHandEXIDocument* exiDoc);
|
||||
void init_appHandAppProtocolType(struct appHandAppProtocolType* appHandAppProtocolType);
|
||||
void init_appHandAnonType_supportedAppProtocolReq(struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq);
|
||||
void init_appHandAnonType_supportedAppProtocolRes(struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
898
src/appHandshake/appHandEXIDatatypesDecoder.c
Normal file
898
src/appHandshake/appHandEXIDatatypesDecoder.c
Normal file
|
@ -0,0 +1,898 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2014 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "appHandEXIDatatypesDecoder.h"
|
||||
|
||||
#include "DecoderChannel.h"
|
||||
#include "EXIHeaderDecoder.h"
|
||||
|
||||
#include "appHandEXIDatatypes.h"
|
||||
#include "ErrorCodes.h"
|
||||
|
||||
#ifndef EXI_appHand_DATATYPES_DECODER_C
|
||||
#define EXI_appHand_DATATYPES_DECODER_C
|
||||
|
||||
/** event-code */
|
||||
static uint32_t eventCode;
|
||||
static int errn;
|
||||
static uint32_t uint32;
|
||||
|
||||
|
||||
/* Forward Declarations */
|
||||
static int decode_appHandAppProtocolType(bitstream_t* stream, struct appHandAppProtocolType* appHandAppProtocolType);
|
||||
static int decode_appHandAnonType_supportedAppProtocolReq(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq);
|
||||
static int decode_appHandAnonType_supportedAppProtocolRes(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes);
|
||||
|
||||
/* Deviant data decoding (skip functions) */
|
||||
|
||||
|
||||
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,AppProtocolType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(ProtocolNamespace,VersionNumberMajor,VersionNumberMinor,SchemaID,Priority)', derivedBy='RESTRICTION'. */
|
||||
static int decode_appHandAppProtocolType(bitstream_t* stream, struct appHandAppProtocolType* appHandAppProtocolType) {
|
||||
int grammarID = 0;
|
||||
int done = 0;
|
||||
|
||||
init_appHandAppProtocolType(appHandAppProtocolType);
|
||||
|
||||
while(!done) {
|
||||
switch(grammarID) {
|
||||
case 0:
|
||||
/* FirstStartTag[START_ELEMENT(ProtocolNamespace)] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
/* FirstStartTag[CHARACTERS[STRING]] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(errn == 0) {
|
||||
if(eventCode == 0) {
|
||||
errn = decodeUnsignedInteger16(stream, &appHandAppProtocolType->ProtocolNamespace.charactersLen);
|
||||
if (errn == 0) {
|
||||
errn = (appHandAppProtocolType->ProtocolNamespace.charactersLen - 2) <= appHandAppProtocolType_ProtocolNamespace_CHARACTERS_SIZE ? 0 : EXI_ERROR_STRINGVALUES_OUT_OF_BOUND;
|
||||
}
|
||||
if (errn == 0) {
|
||||
if (appHandAppProtocolType->ProtocolNamespace.charactersLen >= 2) {
|
||||
appHandAppProtocolType->ProtocolNamespace.charactersLen = (uint16_t)(appHandAppProtocolType->ProtocolNamespace.charactersLen - 2); /* string table miss */
|
||||
errn = decodeCharacters(stream, appHandAppProtocolType->ProtocolNamespace.charactersLen, appHandAppProtocolType->ProtocolNamespace.characters);
|
||||
} else {
|
||||
/* string table hit */
|
||||
errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Second level event (e.g., xsi:type, xsi:nil, ...) */
|
||||
errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
if(errn == 0) {
|
||||
/* valid EE for simple element START_ELEMENT(ProtocolNamespace) ? */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(eventCode == 0) {
|
||||
grammarID = 1;
|
||||
} else {
|
||||
errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
/* Element[START_ELEMENT(VersionNumberMajor)] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
/* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(errn == 0) {
|
||||
if(eventCode == 0) {
|
||||
errn = decodeUnsignedInteger32(stream, &appHandAppProtocolType->VersionNumberMajor);
|
||||
} else {
|
||||
/* Second level event (e.g., xsi:type, xsi:nil, ...) */
|
||||
errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
if(errn == 0) {
|
||||
/* valid EE for simple element START_ELEMENT(VersionNumberMajor) ? */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(eventCode == 0) {
|
||||
grammarID = 2;
|
||||
} else {
|
||||
errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
/* Element[START_ELEMENT(VersionNumberMinor)] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
/* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(errn == 0) {
|
||||
if(eventCode == 0) {
|
||||
errn = decodeUnsignedInteger32(stream, &appHandAppProtocolType->VersionNumberMinor);
|
||||
} else {
|
||||
/* Second level event (e.g., xsi:type, xsi:nil, ...) */
|
||||
errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
if(errn == 0) {
|
||||
/* valid EE for simple element START_ELEMENT(VersionNumberMinor) ? */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(eventCode == 0) {
|
||||
grammarID = 3;
|
||||
} else {
|
||||
errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
/* Element[START_ELEMENT(SchemaID)] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(errn == 0) {
|
||||
if(eventCode == 0) {
|
||||
errn = decodeNBitUnsignedInteger(stream, 8, &(uint32));
|
||||
appHandAppProtocolType->SchemaID = (uint8_t)(uint32 + 0);
|
||||
} else {
|
||||
/* Second level event (e.g., xsi:type, xsi:nil, ...) */
|
||||
errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
if(errn == 0) {
|
||||
/* valid EE for simple element START_ELEMENT(SchemaID) ? */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(eventCode == 0) {
|
||||
grammarID = 4;
|
||||
} else {
|
||||
errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
/* Element[START_ELEMENT(Priority)] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(errn == 0) {
|
||||
if(eventCode == 0) {
|
||||
errn = decodeNBitUnsignedInteger(stream, 5, &(uint32));
|
||||
appHandAppProtocolType->Priority = (uint8_t)(uint32 + 1);
|
||||
} else {
|
||||
/* Second level event (e.g., xsi:type, xsi:nil, ...) */
|
||||
errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
if(errn == 0) {
|
||||
/* valid EE for simple element START_ELEMENT(Priority) ? */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(eventCode == 0) {
|
||||
grammarID = 5;
|
||||
} else {
|
||||
errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
/* Element[END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
|
||||
break;
|
||||
}
|
||||
if(errn) {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolReq', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(AppProtocol{1-20})', derivedBy='RESTRICTION'. */
|
||||
static int decode_appHandAnonType_supportedAppProtocolReq(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq) {
|
||||
int grammarID = 7;
|
||||
int done = 0;
|
||||
|
||||
init_appHandAnonType_supportedAppProtocolReq(appHandAnonType_supportedAppProtocolReq);
|
||||
|
||||
while(!done) {
|
||||
switch(grammarID) {
|
||||
case 7:
|
||||
/* FirstStartTag[START_ELEMENT(AppProtocol)] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 8;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 9;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 10;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 11;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 12;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 13;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 14;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 15;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 16;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 17;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 18;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 18:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 19;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 19:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 20;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 21;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 21:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 22;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 22:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 23;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 23:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 24;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 25;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 25:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 26;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 26:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
|
||||
errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
grammarID = 5;
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
/* Element[END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
|
||||
break;
|
||||
}
|
||||
if(errn) {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolRes', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(ResponseCode,SchemaID{0-1})', derivedBy='RESTRICTION'. */
|
||||
static int decode_appHandAnonType_supportedAppProtocolRes(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes) {
|
||||
int grammarID = 27;
|
||||
int done = 0;
|
||||
|
||||
init_appHandAnonType_supportedAppProtocolRes(appHandAnonType_supportedAppProtocolRes);
|
||||
|
||||
while(!done) {
|
||||
switch(grammarID) {
|
||||
case 27:
|
||||
/* FirstStartTag[START_ELEMENT(ResponseCode)] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
/* FirstStartTag[CHARACTERS[ENUMERATION]] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(errn == 0) {
|
||||
if(eventCode == 0) {
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &appHandAnonType_supportedAppProtocolRes->ResponseCode);
|
||||
} else {
|
||||
/* Second level event (e.g., xsi:type, xsi:nil, ...) */
|
||||
errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
if(errn == 0) {
|
||||
/* valid EE for simple element START_ELEMENT(ResponseCode) ? */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(eventCode == 0) {
|
||||
grammarID = 28;
|
||||
} else {
|
||||
errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 28:
|
||||
/* Element[START_ELEMENT(SchemaID), END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(errn == 0) {
|
||||
if(eventCode == 0) {
|
||||
errn = decodeNBitUnsignedInteger(stream, 8, &(uint32));
|
||||
appHandAnonType_supportedAppProtocolRes->SchemaID = (uint8_t)(uint32 + 0);
|
||||
appHandAnonType_supportedAppProtocolRes->SchemaID_isUsed = 1u;
|
||||
} else {
|
||||
/* Second level event (e.g., xsi:type, xsi:nil, ...) */
|
||||
errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
|
||||
}
|
||||
}
|
||||
if(errn == 0) {
|
||||
/* valid EE for simple element START_ELEMENT(SchemaID) ? */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if(eventCode == 0) {
|
||||
grammarID = 5;
|
||||
} else {
|
||||
errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
/* Element[END_ELEMENT] */
|
||||
errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
|
||||
if (errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
done = 1;
|
||||
grammarID = 6;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_EVENT_CODE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
|
||||
break;
|
||||
}
|
||||
if(errn) {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int decode_appHandExiDocument(bitstream_t* stream, struct appHandEXIDocument* exiDoc) {
|
||||
errn = readEXIHeader(stream);
|
||||
|
||||
if(errn == 0) {
|
||||
/* DocContent[START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC] */
|
||||
init_appHandEXIDocument(exiDoc);
|
||||
errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
|
||||
if(errn == 0) {
|
||||
switch(eventCode) {
|
||||
case 0:
|
||||
/* START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq) */
|
||||
errn = decode_appHandAnonType_supportedAppProtocolReq(stream, &exiDoc->supportedAppProtocolReq);
|
||||
exiDoc->supportedAppProtocolReq_isUsed = 1u;
|
||||
break;
|
||||
case 1:
|
||||
/* START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes) */
|
||||
errn = decode_appHandAnonType_supportedAppProtocolRes(stream, &exiDoc->supportedAppProtocolRes);
|
||||
exiDoc->supportedAppProtocolRes_isUsed = 1u;
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNEXPECTED_EVENT_LEVEL1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,26 +18,40 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/appHandshake/V2G_CI_AppProtocol.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef EXI_appHand_NAME_TABLE_ENTRIES_H
|
||||
#define EXI_appHand_NAME_TABLE_ENTRIES_H
|
||||
/**
|
||||
* \file EXIDatatypesDecoder.h
|
||||
* \brief Decoder for datatype definitions
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/* ==================================== */
|
||||
/* String Table Population */
|
||||
|
||||
extern exi_name_table_prepopulated_t exiappHandNameTablePrepopulated;
|
||||
#ifndef EXI_appHand_DATATYPES_DECODER_H
|
||||
#define EXI_appHand_DATATYPES_DECODER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "appHandEXIDatatypes.h"
|
||||
|
||||
int decode_appHandExiDocument(bitstream_t* stream, struct appHandEXIDocument* exiDoc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
671
src/appHandshake/appHandEXIDatatypesEncoder.c
Normal file
671
src/appHandshake/appHandEXIDatatypesEncoder.c
Normal file
|
@ -0,0 +1,671 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2014 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
#include "appHandEXIDatatypesEncoder.h"
|
||||
|
||||
#include "EncoderChannel.h"
|
||||
#include "EXIHeaderEncoder.h"
|
||||
|
||||
#include "appHandEXIDatatypes.h"
|
||||
#include "ErrorCodes.h"
|
||||
|
||||
#ifndef EXI_appHand_DATATYPES_ENCODER_C
|
||||
#define EXI_appHand_DATATYPES_ENCODER_C
|
||||
|
||||
static int errn;
|
||||
|
||||
/* Forward Declarations */
|
||||
static int encode_appHandAppProtocolType(bitstream_t* stream, struct appHandAppProtocolType* appHandAppProtocolType);
|
||||
static int encode_appHandAnonType_supportedAppProtocolReq(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq);
|
||||
static int encode_appHandAnonType_supportedAppProtocolRes(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes);
|
||||
|
||||
|
||||
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,AppProtocolType', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(ProtocolNamespace,VersionNumberMajor,VersionNumberMinor,SchemaID,Priority)', derivedBy='RESTRICTION'. */
|
||||
static int encode_appHandAppProtocolType(bitstream_t* stream, struct appHandAppProtocolType* appHandAppProtocolType) {
|
||||
int grammarID = 0;
|
||||
int done = 0;
|
||||
|
||||
|
||||
while(!done) {
|
||||
switch(grammarID) {
|
||||
case 0:
|
||||
/* FirstStartTag[START_ELEMENT(ProtocolNamespace)] */
|
||||
if ( 1 == 1 ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
/* FirstStartTag[CHARACTERS[STRING]] */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
/* encode string as string table miss (+2 len)*/
|
||||
errn = encodeUnsignedInteger16(stream, (uint16_t)(appHandAppProtocolType->ProtocolNamespace.charactersLen + 2));
|
||||
if (errn == 0) {
|
||||
errn = encodeCharacters(stream, appHandAppProtocolType->ProtocolNamespace.characters, appHandAppProtocolType->ProtocolNamespace.charactersLen);
|
||||
}
|
||||
/* valid EE */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
}
|
||||
}
|
||||
grammarID = 1;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
/* Element[START_ELEMENT(VersionNumberMajor)] */
|
||||
if ( 1 == 1 ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
/* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
errn = encodeUnsignedInteger32(stream, appHandAppProtocolType->VersionNumberMajor);
|
||||
/* valid EE */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
}
|
||||
}
|
||||
grammarID = 2;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
/* Element[START_ELEMENT(VersionNumberMinor)] */
|
||||
if ( 1 == 1 ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
/* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
errn = encodeUnsignedInteger32(stream, appHandAppProtocolType->VersionNumberMinor);
|
||||
/* valid EE */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
}
|
||||
}
|
||||
grammarID = 3;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
/* Element[START_ELEMENT(SchemaID)] */
|
||||
if ( 1 == 1 ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(appHandAppProtocolType->SchemaID - 0));
|
||||
/* valid EE */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
}
|
||||
}
|
||||
grammarID = 4;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
/* Element[START_ELEMENT(Priority)] */
|
||||
if ( 1 == 1 ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 5, (uint32_t)(appHandAppProtocolType->Priority - 1));
|
||||
/* valid EE */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
}
|
||||
}
|
||||
grammarID = 5;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
/* Element[END_ELEMENT] */
|
||||
if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
|
||||
break;
|
||||
}
|
||||
if(errn) {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolReq', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(AppProtocol{1-20})', derivedBy='RESTRICTION'. */
|
||||
static int encode_appHandAnonType_supportedAppProtocolReq(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq) {
|
||||
int grammarID = 7;
|
||||
int done = 0;
|
||||
|
||||
unsigned int appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex = 0;
|
||||
|
||||
while(!done) {
|
||||
switch(grammarID) {
|
||||
case 7:
|
||||
/* FirstStartTag[START_ELEMENT(AppProtocol)] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 8;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 9;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 10;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 11;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 12;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 13;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 14;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 15;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 16;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 17;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 18;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 18:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 19;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 19:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 20;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 21;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 21:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 22;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 22:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 23;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 23:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 24;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 24:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 25;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 25:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 26;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 26:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
|
||||
}
|
||||
grammarID = 5;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
/* Element[END_ELEMENT] */
|
||||
if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
|
||||
break;
|
||||
}
|
||||
if(errn) {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolRes', base type name='anyType', content type='ELEMENT', isAbstract='false', hasTypeId='false', final='0', block='0', particle='(ResponseCode,SchemaID{0-1})', derivedBy='RESTRICTION'. */
|
||||
static int encode_appHandAnonType_supportedAppProtocolRes(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes) {
|
||||
int grammarID = 27;
|
||||
int done = 0;
|
||||
|
||||
|
||||
while(!done) {
|
||||
switch(grammarID) {
|
||||
case 27:
|
||||
/* FirstStartTag[START_ELEMENT(ResponseCode)] */
|
||||
if ( 1 == 1 ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
/* FirstStartTag[CHARACTERS[ENUMERATION]] */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, appHandAnonType_supportedAppProtocolRes->ResponseCode);
|
||||
/* valid EE */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
}
|
||||
}
|
||||
grammarID = 28;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 28:
|
||||
/* Element[START_ELEMENT(SchemaID), END_ELEMENT] */
|
||||
if ( appHandAnonType_supportedAppProtocolRes->SchemaID_isUsed == 1u ) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(appHandAnonType_supportedAppProtocolRes->SchemaID - 0));
|
||||
/* valid EE */
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
}
|
||||
}
|
||||
grammarID = 5;
|
||||
} else if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
/* Element[END_ELEMENT] */
|
||||
if (1==1) {
|
||||
errn = encodeNBitUnsignedInteger(stream, 1, 0);
|
||||
if(errn == 0) {
|
||||
done = 1;
|
||||
}
|
||||
grammarID = 6;
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
|
||||
break;
|
||||
}
|
||||
if(errn) {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int encode_appHandExiDocument(bitstream_t* stream, struct appHandEXIDocument* exiDoc) {
|
||||
errn = writeEXIHeader(stream);
|
||||
|
||||
if(errn == 0) {
|
||||
/* DocContent[START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC] */
|
||||
if ( exiDoc->supportedAppProtocolReq_isUsed == 1u ) {
|
||||
/* START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq) */
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 0);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAnonType_supportedAppProtocolReq(stream, &exiDoc->supportedAppProtocolReq );
|
||||
}
|
||||
} else if ( exiDoc->supportedAppProtocolRes_isUsed == 1u ) {
|
||||
/* START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes) */
|
||||
errn = encodeNBitUnsignedInteger(stream, 2, 1);
|
||||
if(errn == 0) {
|
||||
errn = encode_appHandAnonType_supportedAppProtocolRes(stream, &exiDoc->supportedAppProtocolRes );
|
||||
}
|
||||
} else {
|
||||
errn = EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(errn == 0) {
|
||||
/* flush any pending bits */
|
||||
errn = encodeFinish(stream);
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,26 +18,41 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef EXI_v2g_NAME_TABLE_ENTRIES_H
|
||||
#define EXI_v2g_NAME_TABLE_ENTRIES_H
|
||||
/**
|
||||
* \file EXIDatatypesEncoder.h
|
||||
* \brief Encoder for datatype definitions
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/* ==================================== */
|
||||
/* String Table Population */
|
||||
|
||||
extern exi_name_table_prepopulated_t exiv2gNameTablePrepopulated;
|
||||
#ifndef EXI_appHand_DATATYPES_ENCODER_H
|
||||
#define EXI_appHand_DATATYPES_ENCODER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "appHandEXIDatatypes.h"
|
||||
|
||||
|
||||
int encode_appHandExiDocument(bitstream_t* stream, struct appHandEXIDocument* exiDoc);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,341 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXISeGen</p>
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
#include "appHand_service.h"
|
||||
#include "appHand_dataTypes.h"
|
||||
#include "EXITypes.h"
|
||||
#include "appHandEXIDecoder.h"
|
||||
#include "appHandQNameDefines.h"
|
||||
#include "StringValueTable.h"
|
||||
#include "StringNameTable.h"
|
||||
#include <string.h>
|
||||
|
||||
uint16_t numberOfLocalStringsDecode[EXI_appHandMAX_NUMBER_OF_QNAMES];
|
||||
|
||||
|
||||
|
||||
|
||||
static int _setUnsignedInt32Value(exi_integer_t* iv, uint32_t* int32) {
|
||||
int errn = 0;
|
||||
switch(iv->type) {
|
||||
/* Unsigned Integer */
|
||||
case EXI_UNSIGNED_INTEGER_8:
|
||||
*int32 = iv->val.uint8;
|
||||
break;
|
||||
case EXI_UNSIGNED_INTEGER_16:
|
||||
*int32 = iv->val.uint16;
|
||||
break;
|
||||
case EXI_UNSIGNED_INTEGER_32:
|
||||
if (iv->val.uint32 <= 2147483647) {
|
||||
*int32 = iv->val.uint32;
|
||||
} else {
|
||||
errn = -1;
|
||||
}
|
||||
break;
|
||||
case EXI_UNSIGNED_INTEGER_64:
|
||||
errn = -1;
|
||||
break;
|
||||
/* (Signed) Integer */
|
||||
case EXI_INTEGER_8:
|
||||
*int32 = iv->val.int8;
|
||||
break;
|
||||
case EXI_INTEGER_16:
|
||||
*int32 = iv->val.int16;
|
||||
break;
|
||||
case EXI_INTEGER_32:
|
||||
*int32 = iv->val.int32;
|
||||
break;
|
||||
case EXI_INTEGER_64:
|
||||
errn = -1;
|
||||
break;
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Deserialize an element or attribute value of the EXI stream and assign it to the
|
||||
* service data structure
|
||||
*/
|
||||
static int deserializeElementAttributeCharacter(struct EXIDatabinder* service)
|
||||
{
|
||||
|
||||
switch(service->qnameID) {
|
||||
case 2: /* ProtocolNamespace */
|
||||
|
||||
if(service->val.type == EXI_DATATYPE_STRING)
|
||||
{
|
||||
memcpy(service->exiMsg.supportedAppProtocolReq->AppProtocol[service->exiMsg.supportedAppProtocolReq->arraylen.AppProtocol].ProtocolNamespace.data, service->val.str.miss.codepoints,service->val.str.miss.len*sizeof(uint32_t));
|
||||
service->exiMsg.supportedAppProtocolReq->AppProtocol[service->exiMsg.supportedAppProtocolReq->arraylen.AppProtocol].ProtocolNamespace.arraylen.data = service->val.str.miss.len;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
service->errorCode=EXI_DATATYPE_FAILED;
|
||||
return -1; /* wrong data type */
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 5: /* VersionNumberMajor */
|
||||
|
||||
if(service->val.type == EXI_DATATYPE_UNSIGNED_INTEGER)
|
||||
{
|
||||
if(_setUnsignedInt32Value(&(service->val.integer),&(service->val.integer.val.uint32)))
|
||||
{
|
||||
service->errorCode=EXI_VALUE_RANGE_FAILED;
|
||||
return -1;
|
||||
}
|
||||
service->exiMsg.supportedAppProtocolReq->AppProtocol[service->exiMsg.supportedAppProtocolReq->arraylen.AppProtocol].VersionNumberMajor=service->val.integer.val.uint32;
|
||||
}
|
||||
else
|
||||
{
|
||||
service->errorCode=EXI_DATATYPE_FAILED;
|
||||
return -1; /* wrong data type */
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 6: /* VersionNumberMinor */
|
||||
|
||||
if(service->val.type == EXI_DATATYPE_UNSIGNED_INTEGER)
|
||||
{
|
||||
if(_setUnsignedInt32Value(&(service->val.integer),&(service->val.integer.val.uint32)))
|
||||
{
|
||||
service->errorCode=EXI_VALUE_RANGE_FAILED;
|
||||
return -1;
|
||||
}
|
||||
service->exiMsg.supportedAppProtocolReq->AppProtocol[service->exiMsg.supportedAppProtocolReq->arraylen.AppProtocol].VersionNumberMinor=service->val.integer.val.uint32;
|
||||
}
|
||||
else
|
||||
{
|
||||
service->errorCode=EXI_DATATYPE_FAILED;
|
||||
return -1; /* wrong data type */
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 4: /* SchemaID */
|
||||
|
||||
if(service->val.type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER)
|
||||
{
|
||||
if( service->idPath.id[0] == 66)
|
||||
{
|
||||
service->exiMsg.supportedAppProtocolRes->SchemaID=service->val.integer.val.uint8;
|
||||
service->exiMsg.supportedAppProtocolRes->isused.SchemaID=1;
|
||||
|
||||
} else if(service->idPath.id[0] == 65)
|
||||
{
|
||||
service->exiMsg.supportedAppProtocolReq->AppProtocol[service->exiMsg.supportedAppProtocolReq->arraylen.AppProtocol].SchemaID=service->val.integer.val.uint8; }
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
service->errorCode=EXI_DATATYPE_FAILED;
|
||||
return -1; /* wrong data type */
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 1: /* Priority */
|
||||
|
||||
if(service->val.type == EXI_DATATYPE_NBIT_UNSIGNED_INTEGER)
|
||||
{
|
||||
service->exiMsg.supportedAppProtocolReq->AppProtocol[service->exiMsg.supportedAppProtocolReq->arraylen.AppProtocol].Priority=service->val.integer.val.uint8;
|
||||
}
|
||||
else
|
||||
{
|
||||
service->errorCode=EXI_DATATYPE_FAILED;
|
||||
return -1; /* wrong data type */
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 3: /* ResponseCode */
|
||||
|
||||
if(service->val.type == EXI_DATATYPE_ENUMERATION)
|
||||
{
|
||||
service->exiMsg.supportedAppProtocolRes->ResponseCode=service->val.enumeration;
|
||||
}
|
||||
else
|
||||
{
|
||||
service->errorCode=EXI_DATATYPE_FAILED;
|
||||
return -1; /* wrong data type */
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserialize an element of the EXI stream
|
||||
* @return 0 = 0K; -1 = ERROR
|
||||
*/
|
||||
static int deserializeElement(struct EXIDatabinder* service)
|
||||
{
|
||||
switch(service->qnameID) {
|
||||
case 0: /* AppProtocol */
|
||||
service->exiMsg.supportedAppProtocolReq->arraylen.AppProtocol++;
|
||||
|
||||
break;
|
||||
case 65: /* supportedAppProtocolReq */
|
||||
service->exiMsg.isused.supportedAppProtocolReq=1;
|
||||
|
||||
break;
|
||||
case 66: /* supportedAppProtocolRes */
|
||||
service->exiMsg.isused.supportedAppProtocolRes=1;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Deserialize the appHand EXI stream
|
||||
* @return 0 = 0K; -1 = ERROR
|
||||
*/
|
||||
int deserialize_appHand(struct EXIDatabinder* service, uint8_t* inStream, uint16_t sizeInStream, struct EXIDocumentType_appHand* exiDoc)
|
||||
{
|
||||
exi_name_table_runtime_t runtimeTableDecode;
|
||||
uint32_t inPos;
|
||||
exi_value_table_t stringTableDecode = { 0, EXI_appHandMAX_NUMBER_OF_QNAMES, numberOfLocalStringsDecode};
|
||||
int noEndOfDocument = 1; /* true */
|
||||
int returnCode=0;
|
||||
|
||||
|
||||
/* assign inStream data to service EXI structure */
|
||||
inPos = service->transportHeaderOffset;
|
||||
service->inStream.data = inStream;
|
||||
service->inStream.size = sizeInStream+inPos;
|
||||
service->inStream.pos = &inPos;
|
||||
service->inStream.buffer=0;
|
||||
service->inStream.capacity=0;
|
||||
|
||||
init_EXIDocumentType_appHand(exiDoc);
|
||||
|
||||
service->exiMsg=*exiDoc;
|
||||
|
||||
exiInitNameTableRuntime(&runtimeTableDecode);
|
||||
exiappHandInitDecoder(&(service->inStream), &(service->stateDecode), runtimeTableDecode,stringTableDecode);
|
||||
|
||||
do {
|
||||
exiappHandDecodeNextEvent(&(service->inStream), &(service->stateDecode), &(service->event));
|
||||
if (returnCode < 0) {
|
||||
return returnCode;
|
||||
}
|
||||
|
||||
switch (service->event) {
|
||||
case EXI_EVENT_START_DOCUMENT:
|
||||
|
||||
returnCode = exiappHandDecodeStartDocument(&(service->inStream), &(service->stateDecode));
|
||||
|
||||
break;
|
||||
case EXI_EVENT_END_DOCUMENT:
|
||||
|
||||
returnCode = exiappHandDecodeEndDocument(&(service->inStream), &(service->stateDecode));
|
||||
noEndOfDocument = 0; /* false */
|
||||
break;
|
||||
case EXI_EVENT_START_ELEMENT:
|
||||
returnCode = exiappHandDecodeStartElement(&(service->inStream), &(service->stateDecode), &(service->qnameID));
|
||||
service->idPath.id[service->idPath.pos++]=service->qnameID;
|
||||
|
||||
break;
|
||||
case EXI_EVENT_END_ELEMENT:
|
||||
|
||||
returnCode = exiappHandDecodeEndElement(&(service->inStream), &(service->stateDecode), &(service->qnameID));
|
||||
service->idPath.pos--;
|
||||
|
||||
returnCode = deserializeElement(service);
|
||||
break;
|
||||
case EXI_EVENT_CHARACTERS:
|
||||
/* decode */
|
||||
returnCode = exiappHandDecodeCharacters(&(service->inStream), &(service->stateDecode), &(service->val));
|
||||
|
||||
/* assign character data to the v2g message structure */
|
||||
returnCode = deserializeElementAttributeCharacter(service);
|
||||
break;
|
||||
case EXI_EVENT_ATTRIBUTE:
|
||||
/* decode */
|
||||
returnCode = exiappHandDecodeAttribute(&(service->inStream), &(service->stateDecode), &(service->qnameID), &(service->val));
|
||||
returnCode = deserializeElementAttributeCharacter(service);
|
||||
break;
|
||||
default:
|
||||
/* ERROR */
|
||||
return -1;
|
||||
}
|
||||
|
||||
} while (noEndOfDocument);
|
||||
|
||||
*exiDoc = service->exiMsg;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initialize the appHand deserializer
|
||||
* \param service struct EXIDatabinder* Basic databinder structure
|
||||
* \param service_bytes bytes_t Reserved byte structure buffer
|
||||
* \param service_string string_ucs_t* Reserved string structure buffer
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int init_appHandDeserializer(struct EXIDatabinder* service, exi_bytes_t service_bytes, exi_string_ucs_t service_string, uint16_t transportHeaderOffset)
|
||||
{
|
||||
|
||||
/* init byte array */
|
||||
service->val.binary = service_bytes;
|
||||
|
||||
/* init string array */
|
||||
service->val.str.miss = service_string;
|
||||
|
||||
|
||||
service->idPath.pos=0;
|
||||
|
||||
/* init offset for transport protocol */
|
||||
service->transportHeaderOffset=transportHeaderOffset;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1,424 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXISeGen</p>
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
#include "appHand_service.h"
|
||||
#include "appHand_dataTypes.h"
|
||||
#include "EXITypes.h"
|
||||
#include "StringNameTable.h"
|
||||
#include "appHandEXIEncoder.h"
|
||||
#include "appHandQNameDefines.h"
|
||||
#include <string.h>
|
||||
|
||||
uint16_t numberOfLocalStringsEncode[EXI_appHandMAX_NUMBER_OF_QNAMES];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static int serialize_AppProtocolType(struct AppProtocolType* type, struct EXIDatabinder* service)
|
||||
{
|
||||
|
||||
|
||||
|
||||
/* encode start element ProtocolNamespace */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 2))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
service->val.type = EXI_DATATYPE_STRING;
|
||||
service->val.str.type = EXI_STRING_VALUE_MISS;
|
||||
service->val.str.miss.len = type->ProtocolNamespace.arraylen.data;
|
||||
memcpy(service->val.str.miss.codepoints, type->ProtocolNamespace.data,type->ProtocolNamespace.arraylen.data*sizeof(uint32_t));
|
||||
|
||||
|
||||
|
||||
/* encode character ProtocolNamespace */
|
||||
if (exiappHandEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
|
||||
{
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* encode end element of ProtocolNamespace */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
|
||||
|
||||
|
||||
/* encode start element VersionNumberMajor */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 5))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
service->val.type = EXI_DATATYPE_UNSIGNED_INTEGER;
|
||||
service->val.integer.val.uint32=type->VersionNumberMajor;
|
||||
|
||||
service->val.integer.type = EXI_UNSIGNED_INTEGER_32;
|
||||
|
||||
/* encode character VersionNumberMajor */
|
||||
if (exiappHandEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
|
||||
{
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* encode end element of VersionNumberMajor */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
|
||||
|
||||
|
||||
/* encode start element VersionNumberMinor */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 6))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
service->val.type = EXI_DATATYPE_UNSIGNED_INTEGER;
|
||||
service->val.integer.val.uint32=type->VersionNumberMinor;
|
||||
|
||||
service->val.integer.type = EXI_UNSIGNED_INTEGER_32;
|
||||
|
||||
/* encode character VersionNumberMinor */
|
||||
if (exiappHandEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
|
||||
{
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* encode end element of VersionNumberMinor */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
|
||||
|
||||
|
||||
/* encode start element SchemaID */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 4))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
service->val.type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER;
|
||||
service->val.integer.val.uint8=type->SchemaID;
|
||||
|
||||
service->val.integer.type = EXI_UNSIGNED_INTEGER_8;
|
||||
|
||||
/* encode character SchemaID */
|
||||
if (exiappHandEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
|
||||
{
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* encode end element of SchemaID */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
|
||||
|
||||
|
||||
/* encode start element Priority */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 1))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
service->val.type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER;
|
||||
service->val.integer.val.uint8=type->Priority;
|
||||
|
||||
service->val.integer.type = EXI_UNSIGNED_INTEGER_8;
|
||||
|
||||
/* encode character Priority */
|
||||
if (exiappHandEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
|
||||
{
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* encode end element of Priority */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int serialize_SupportedAppProtocolReq(struct SupportedAppProtocolReq* type, struct EXIDatabinder* service)
|
||||
{
|
||||
|
||||
size_t i_loop;
|
||||
|
||||
for(i_loop=0;i_loop < type->arraylen.AppProtocol;i_loop++)
|
||||
{
|
||||
|
||||
|
||||
|
||||
/* encode start element AppProtocol */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 0))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* encode children of AppProtocol */
|
||||
if(serialize_AppProtocolType(&(type->AppProtocol[i_loop]),service))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* encode end element of AppProtocol */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int serialize_SupportedAppProtocolRes(struct SupportedAppProtocolRes* type, struct EXIDatabinder* service)
|
||||
{
|
||||
|
||||
|
||||
|
||||
/* encode start element ResponseCode */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 3))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
service->val.type = EXI_DATATYPE_ENUMERATION;
|
||||
service->val.enumeration=type->ResponseCode;
|
||||
|
||||
|
||||
/* encode character ResponseCode */
|
||||
if (exiappHandEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
|
||||
{
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* encode end element of ResponseCode */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
|
||||
if(type->isused.SchemaID)
|
||||
{
|
||||
|
||||
|
||||
|
||||
/* encode start element SchemaID */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 4))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
service->val.type = EXI_DATATYPE_NBIT_UNSIGNED_INTEGER;
|
||||
service->val.integer.val.uint8=type->SchemaID;
|
||||
|
||||
service->val.integer.type = EXI_UNSIGNED_INTEGER_8;
|
||||
|
||||
/* encode character SchemaID */
|
||||
if (exiappHandEncodeCharacters(&(service->outStream), &(service->stateEncode), &(service->val)))
|
||||
{
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* encode end element of SchemaID */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int serialize_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type, struct EXIDatabinder* service)
|
||||
{
|
||||
|
||||
if(type->isused.supportedAppProtocolReq)
|
||||
{
|
||||
|
||||
|
||||
|
||||
/* encode start element supportedAppProtocolReq */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 65))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* encode children of supportedAppProtocolReq */
|
||||
if(serialize_SupportedAppProtocolReq( type->supportedAppProtocolReq,service))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* encode end element of supportedAppProtocolReq */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
}
|
||||
|
||||
if(type->isused.supportedAppProtocolRes)
|
||||
{
|
||||
|
||||
|
||||
|
||||
/* encode start element supportedAppProtocolRes */
|
||||
if (exiappHandEncodeStartElement(&(service->outStream), &(service->stateEncode), 66))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* encode children of supportedAppProtocolRes */
|
||||
if(serialize_SupportedAppProtocolRes( type->supportedAppProtocolRes,service))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* encode end element of supportedAppProtocolRes */
|
||||
exiappHandEncodeEndElement(&(service->outStream), &(service->stateEncode));
|
||||
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* serialize data to EXI stream */
|
||||
static int serialize_message(struct EXIDatabinder* service)
|
||||
{
|
||||
|
||||
/* encode start document */
|
||||
if (exiappHandEncodeStartDocument(&(service->outStream), &(service->stateEncode)) )
|
||||
{
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
if (serialize_EXIDocumentType_appHand(&(service->exiMsg), service))
|
||||
|
||||
|
||||
{
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* encode end document */
|
||||
if (exiappHandEncodeEndDocument(&(service->outStream), &(service->stateEncode))) {
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int serialize_appHand(struct EXIDatabinder* service, uint8_t* outStream, uint16_t* payloadLength, struct EXIDocumentType_appHand* exiDoc)
|
||||
{
|
||||
exi_name_table_runtime_t runtimeTableEncode;
|
||||
|
||||
int16_t lerr = 0; /* local error */
|
||||
exi_value_table_t stringTableEncode = { 0, EXI_appHandMAX_NUMBER_OF_QNAMES, numberOfLocalStringsEncode};
|
||||
|
||||
uint32_t outPos =service->transportHeaderOffset;
|
||||
|
||||
/* assign outStream data to service EXI structure */
|
||||
service->outStream.data = outStream;
|
||||
service->outStream.pos = &outPos;
|
||||
service->outStream.buffer=0;
|
||||
service->outStream.capacity=8;
|
||||
|
||||
service->exiMsg = *exiDoc;
|
||||
|
||||
/* init encoder (write header, set initial state) */
|
||||
exiInitNameTableRuntime(&runtimeTableEncode);
|
||||
|
||||
if(exiappHandInitEncoder(&(service->outStream), &(service->stateEncode), runtimeTableEncode,stringTableEncode))
|
||||
{
|
||||
lerr = -1;
|
||||
}
|
||||
|
||||
/* serialze message*/
|
||||
if(serialize_message(service))
|
||||
{
|
||||
lerr = -1;
|
||||
}
|
||||
|
||||
outPos -= service->transportHeaderOffset;
|
||||
*payloadLength = outPos;
|
||||
|
||||
|
||||
return lerr;
|
||||
}
|
||||
|
||||
/* Initialize serializer */
|
||||
int init_appHandSerializer(struct EXIDatabinder* service, exi_bytes_t service_bytes, exi_string_ucs_t service_string, size_t max_outStream_size, uint16_t transportHeaderOffset)
|
||||
{
|
||||
|
||||
/* init byte array */
|
||||
service->val.binary = service_bytes;
|
||||
|
||||
/* init string array */
|
||||
service->val.str.miss = service_string;
|
||||
|
||||
/* init output stream */
|
||||
|
||||
service->outStream.size=max_outStream_size;
|
||||
|
||||
service->transportHeaderOffset=transportHeaderOffset;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXISeGen</p>
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "appHand_dataTypes.h"
|
||||
|
||||
|
||||
static void init_protocolNamespaceType(struct protocolNamespaceType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
void init_SupportedAppProtocolReq(struct SupportedAppProtocolReq* type)
|
||||
{
|
||||
|
||||
type->arraylen.AppProtocol=0;
|
||||
|
||||
}
|
||||
|
||||
void init_SupportedAppProtocolRes(struct SupportedAppProtocolRes* type)
|
||||
{
|
||||
type->isused.SchemaID=0;
|
||||
|
||||
}
|
||||
void init_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type)
|
||||
{
|
||||
type->isused.supportedAppProtocolReq=0;
|
||||
type->isused.supportedAppProtocolRes=0;
|
||||
|
||||
}
|
|
@ -1,133 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXISeGen</p>
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef APPHANDDATATYPES_H
|
||||
#define APPHANDDATATYPES_H
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "string.h"
|
||||
|
||||
|
||||
|
||||
|
||||
enum responseCodeType_appHand
|
||||
{
|
||||
OK_SuccessfulNegotiation_responseCodeType=0,
|
||||
OK_SuccessfulNegotiationWithMinorDeviation_responseCodeType=1,
|
||||
Failed_NoNegotiation_responseCodeType=2
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
struct arraylen_protocolNamespaceType
|
||||
{
|
||||
size_t data;
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct protocolNamespaceType
|
||||
{
|
||||
uint32_t data[100];
|
||||
struct arraylen_protocolNamespaceType arraylen;
|
||||
|
||||
};
|
||||
|
||||
struct AppProtocolType
|
||||
{
|
||||
struct protocolNamespaceType ProtocolNamespace;
|
||||
uint32_t VersionNumberMajor;
|
||||
uint32_t VersionNumberMinor;
|
||||
uint8_t SchemaID;
|
||||
uint8_t Priority;
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct arraylen_SupportedAppProtocolReq
|
||||
{
|
||||
size_t AppProtocol;
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct SupportedAppProtocolReq
|
||||
{
|
||||
struct AppProtocolType AppProtocol[20];
|
||||
struct arraylen_SupportedAppProtocolReq arraylen;
|
||||
|
||||
};
|
||||
|
||||
struct selection_EXIDocumentType_appHand
|
||||
{
|
||||
unsigned int supportedAppProtocolReq:1;
|
||||
unsigned int supportedAppProtocolRes:1;
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct selection_SupportedAppProtocolRes
|
||||
{
|
||||
unsigned int SchemaID:1;
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct SupportedAppProtocolRes
|
||||
{
|
||||
enum responseCodeType_appHand ResponseCode;
|
||||
uint8_t SchemaID;
|
||||
struct selection_SupportedAppProtocolRes isused;
|
||||
|
||||
};
|
||||
|
||||
struct EXIDocumentType_appHand
|
||||
{
|
||||
struct SupportedAppProtocolReq* supportedAppProtocolReq;
|
||||
struct SupportedAppProtocolRes* supportedAppProtocolRes;
|
||||
struct selection_EXIDocumentType_appHand isused;
|
||||
|
||||
};
|
||||
|
||||
void init_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type);
|
||||
void init_SupportedAppProtocolRes(struct SupportedAppProtocolRes* type);
|
||||
void init_SupportedAppProtocolReq(struct SupportedAppProtocolReq* type);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXISeGen</p>
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_DATABINDER_H_
|
||||
#define EXI_DATABINDER_H_
|
||||
|
||||
#include "appHand_dataTypes.h"
|
||||
|
||||
struct uniqueIDPath2
|
||||
{
|
||||
int id[10];
|
||||
size_t pos;
|
||||
};
|
||||
|
||||
|
||||
struct EXIDatabinder
|
||||
{
|
||||
/* in-/ out-stream */
|
||||
bitstream_t inStream;
|
||||
bitstream_t outStream;
|
||||
|
||||
/* EXI */
|
||||
exi_state_t stateDecode;
|
||||
exi_state_t stateEncode;
|
||||
exi_event_t event;
|
||||
uint16_t qnameID;
|
||||
exi_value_t val;
|
||||
|
||||
/* v2g message data structure */
|
||||
struct EXIDocumentType_appHand exiMsg;
|
||||
|
||||
/* unique id for ambiguous elements */
|
||||
struct uniqueIDPath2 idPath;
|
||||
|
||||
/* error code */
|
||||
uint8_t errorCode;
|
||||
|
||||
/* offset for transported header data */
|
||||
uint16_t transportHeaderOffset;
|
||||
};
|
||||
|
||||
int init_appHandSerializer(struct EXIDatabinder* service, exi_bytes_t service_bytes, exi_string_ucs_t service_string, size_t max_outStream_size, uint16_t transportHeaderOffset);
|
||||
int serialize_appHand(struct EXIDatabinder* service, uint8_t* outStream, uint16_t* outPos, struct EXIDocumentType_appHand* exiDoc);
|
||||
int init_appHandDeserializer(struct EXIDatabinder* service, exi_bytes_t service_bytes, exi_string_ucs_t service_string, uint16_t transportHeaderOffset);
|
||||
int deserialize_appHand(struct EXIDatabinder* service, uint8_t* inStream, uint16_t sizeInStream, struct EXIDocumentType_appHand* exiDoc);
|
||||
void init_EXIDocumentType_appHand(struct EXIDocumentType_appHand* type);
|
||||
|
||||
|
||||
/* define error codes */
|
||||
#define EXI_NON_VALID_MESSAGE 0x01
|
||||
#define EXI_SERIALIZATION_FAILED 0x02
|
||||
#define EXI_DESERIALIZATION_FAILED 0x03
|
||||
#define EXI_DATATYPE_FAILED 0x04
|
||||
#define EXI_VALUE_RANGE_FAILED 0x05
|
||||
#define EXI_SERVICE_CALL_FAILED 0x06
|
||||
|
||||
#define EXI_UNKNOWN_ERROR 0xFF
|
||||
|
||||
#endif /* EXI_DATABINDER_H_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
@ -37,12 +36,13 @@
|
|||
#include "BitInputStream.h"
|
||||
#include "EXITypes.h"
|
||||
#include "MethodsBag.h"
|
||||
#include "v2gEXICoder.h"
|
||||
/*#include "v2gEXICoder.h"*/
|
||||
#include "ErrorCodes.h"
|
||||
|
||||
#include "StringValueTable.h"
|
||||
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
#include "DynamicMemory.h"
|
||||
#include "StringValueTable.h"
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
|
||||
#ifndef ABSTRACT_DECODER_CHANNEL_C
|
||||
|
@ -362,9 +362,14 @@ int decodeDecimal(bitstream_t* stream, exi_decimal_t* d) {
|
|||
/**
|
||||
* Decode a sequence of characters for a given length.
|
||||
*/
|
||||
int decodeStringOnly(bitstream_t* stream, uint16_t len, exi_string_ucs_t* s) {
|
||||
int decodeStringOnly(bitstream_t* stream, uint16_t len, exi_string_t* s) {
|
||||
int errn = 0;
|
||||
if (len > s->size) {
|
||||
int extraChar = 0;
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
|
||||
extraChar = 1; /* null terminator */
|
||||
#endif /* STRING_REPRESENTATION_ASCII */
|
||||
|
||||
if ( (len + extraChar) > s->size) {
|
||||
#if MEMORY_ALLOCATION == STATIC_ALLOCATION
|
||||
errn = EXI_ERROR_OUT_OF_STRING_BUFFER;
|
||||
#endif /* STATIC_ALLOCATION */
|
||||
|
@ -379,7 +384,7 @@ int decodeStringOnly(bitstream_t* stream, uint16_t len, exi_string_ucs_t* s) {
|
|||
#endif /* DYNAMIC_ALLOCATION */
|
||||
}
|
||||
if(errn == 0) {
|
||||
errn = decodeCharacters(stream, len, s->codepoints);
|
||||
errn = decodeCharacters(stream, len, s->characters);
|
||||
s->len = len;
|
||||
}
|
||||
|
||||
|
@ -389,7 +394,7 @@ int decodeStringOnly(bitstream_t* stream, uint16_t len, exi_string_ucs_t* s) {
|
|||
/**
|
||||
* Decode a length prefixed sequence of characters.
|
||||
*/
|
||||
int decodeString(bitstream_t* stream, exi_string_ucs_t* s) {
|
||||
int decodeString(bitstream_t* stream, exi_string_t* s) {
|
||||
int errn = decodeUnsignedInteger16(stream, &s->len);
|
||||
if (errn == 0) {
|
||||
errn = decodeStringOnly(stream, s->len, s);
|
||||
|
@ -457,10 +462,10 @@ int decodeStringValue(bitstream_t* stream, exi_state_t* state, uint16_t qnameID,
|
|||
* associated "local" value string table partition and the global
|
||||
* value string table partition */
|
||||
#if EXI_OPTION_VALUE_MAX_LENGTH < 0
|
||||
errn = exi_v2g_AddStringValue(state, &(s->miss), qnameID);
|
||||
errn = exiAddStringValue(&state->stringTable, &(s->miss), qnameID);
|
||||
# else /* EXI_v2gVALUE_MAX_LENGTH < 0 */
|
||||
if (L <= EXI_OPTION_VALUE_MAX_LENGTH) {
|
||||
errn = exi_v2g_AddStringValue(state, &(s->miss), qnameID);
|
||||
errn = exiAddStringValue(&state->stringTable, &(s->miss), qnameID);
|
||||
}
|
||||
#endif /* EXI_OPTION_VALUE_MAX_LENGTH < 0 */
|
||||
}
|
||||
|
@ -514,7 +519,7 @@ int decodeRCSStringValue(bitstream_t* stream, exi_state_t* state, uint16_t qname
|
|||
if(errn == 0) {
|
||||
for (i = 0; i < L && errn >= 0; i++) {
|
||||
errn = decodeNBitUnsignedInteger(stream, rcs->codingLength, &cp);
|
||||
s->miss.codepoints[i] = rcs->codepoints[cp];
|
||||
s->miss.characters[i] = rcs->characters[cp];
|
||||
}
|
||||
#if EXI_OPTION_VALUE_PARTITION_CAPACITY != 0
|
||||
#if EXI_OPTION_VALUE_MAX_LENGTH != 0
|
||||
|
@ -524,10 +529,10 @@ int decodeRCSStringValue(bitstream_t* stream, exi_state_t* state, uint16_t qname
|
|||
* associated "local" value string table partition and the global
|
||||
* value string table partition */
|
||||
#if EXI_OPTION_VALUE_MAX_LENGTH < 0
|
||||
errn = exi_v2g_AddStringValue(state, &(s->miss), qnameID);
|
||||
errn = exiAddStringValue(&state->stringTable, &(s->miss), qnameID);
|
||||
# else /* EXI_OPTION_VALUE_MAX_LENGTH < 0 */
|
||||
if (L <= EXI_OPTION_VALUE_MAX_LENGTH) {
|
||||
errn = exi_v2g_AddStringValue(state, &(s->miss), qnameID);
|
||||
errn = exiAddStringValue(&state->stringTable, &(s->miss), qnameID);
|
||||
}
|
||||
#endif /* EXI_OPTION_VALUE_MAX_LENGTH < 0 */
|
||||
}
|
||||
|
@ -546,12 +551,73 @@ int decodeRCSStringValue(bitstream_t* stream, exi_state_t* state, uint16_t qname
|
|||
* Each character is represented by its UCS [ISO/IEC 10646]
|
||||
* code point encoded as an Unsigned Integer
|
||||
*/
|
||||
int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars) {
|
||||
int decodeCharacters(bitstream_t* stream, uint16_t len, exi_string_character_t* chars) {
|
||||
unsigned int i;
|
||||
int errn = 0;
|
||||
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
|
||||
uint8_t b;
|
||||
for (i = 0; i < len && errn == 0; i++) {
|
||||
errn = decode(stream, &b);
|
||||
if(b < 128) {
|
||||
chars[i] = (exi_string_character_t)b;
|
||||
} else {
|
||||
errn = EXI_ERROR_STRINGVALUES_CHARACTER;
|
||||
}
|
||||
}
|
||||
/* null terminator \0 */
|
||||
chars[i] = '\0';
|
||||
|
||||
#endif /* STRING_REPRESENTATION_ASCII */
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
|
||||
for (i = 0; i < len && errn == 0; i++) {
|
||||
errn = decodeUnsignedInteger32(stream, &chars[i]);
|
||||
}
|
||||
#endif /* STRING_REPRESENTATION_UCS */
|
||||
|
||||
|
||||
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
int decodeRCSCharacters(bitstream_t* stream, uint16_t len, exi_string_character_t* chars, uint16_t rcsCodeLength, uint16_t rcsSize, const exi_string_character_t rcsSet[]) {
|
||||
unsigned int i;
|
||||
int errn = 0;
|
||||
uint32_t uint32;
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
|
||||
uint8_t b;
|
||||
#endif /* STRING_REPRESENTATION_ASCII */
|
||||
|
||||
|
||||
for (i = 0; i < len && errn == 0; i++) {
|
||||
errn = decodeNBitUnsignedInteger(stream, rcsCodeLength, &uint32);
|
||||
if(errn == 0) {
|
||||
if ( uint32 == rcsSize ) {
|
||||
/* RCS deviation */
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
|
||||
errn = decode(stream, &b);
|
||||
if(b < 128) {
|
||||
chars[i] = (exi_string_character_t)b;
|
||||
} else {
|
||||
errn = EXI_ERROR_STRINGVALUES_CHARACTER;
|
||||
}
|
||||
#endif /* STRING_REPRESENTATION_ASCII */
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
|
||||
errn = decodeUnsignedInteger32(stream, &chars[i]);
|
||||
#endif /* STRING_REPRESENTATION_UCS */
|
||||
|
||||
} else {
|
||||
/* RCS match */
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
|
||||
chars[i] = rcsSet[uint32];
|
||||
#endif /* STRING_REPRESENTATION_ASCII */
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
|
||||
chars[i] = rcsSet[uint32];
|
||||
#endif /* STRING_REPRESENTATION_UCS */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
@ -561,8 +627,6 @@ int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars) {
|
|||
* Decode a binary value as a length-prefixed sequence of octets.
|
||||
*/
|
||||
int decodeBinary(bitstream_t* stream, exi_bytes_t* bytes) {
|
||||
unsigned int i;
|
||||
uint8_t b;
|
||||
int errn = decodeUnsignedInteger16(stream, &bytes->len);
|
||||
if (errn == 0) {
|
||||
if (bytes->len > bytes->size) {
|
||||
|
@ -577,10 +641,21 @@ int decodeBinary(bitstream_t* stream, exi_bytes_t* bytes) {
|
|||
#endif /* DYNAMIC_ALLOCATION */
|
||||
}
|
||||
|
||||
for (i = 0; i < bytes->len && errn == 0; i++) {
|
||||
errn = decode(stream, &b);
|
||||
bytes->data[i] = (uint8_t)b;
|
||||
errn = decodeBytes(stream, bytes->len, bytes->data);
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
int decodeBytes(bitstream_t* stream, uint16_t len, uint8_t* data) {
|
||||
unsigned int i;
|
||||
int errn = 0;
|
||||
uint8_t b;
|
||||
|
||||
for (i = 0; i < len && errn == 0; i++) {
|
||||
errn = decode(stream, &b);
|
||||
data[i] = (uint8_t)b;
|
||||
}
|
||||
|
||||
return errn;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
@ -36,7 +35,9 @@
|
|||
#include "EXITypes.h"
|
||||
#include "ErrorCodes.h"
|
||||
#include "MethodsBag.h"
|
||||
#include "v2gEXICoder.h"
|
||||
/*#include "v2gEXICoder.h"*/
|
||||
|
||||
#include "StringValueTable.h"
|
||||
|
||||
#ifndef ABSTRACT_ENCODER_CHANNEL_C
|
||||
#define ABSTRACT_ENCODER_CHANNEL_C
|
||||
|
@ -90,6 +91,45 @@ int encodeUnsignedInteger(bitstream_t* stream, exi_integer_t* iv) {
|
|||
return errn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode an arbitrary precision non negative integer using a sequence of
|
||||
* octets. The most significant bit of the last octet is set to zero to
|
||||
* indicate sequence termination. Only seven bits per octet are used to
|
||||
* store the integer's value.
|
||||
*/
|
||||
int encodeUnsignedInteger16(bitstream_t* stream, uint16_t n) {
|
||||
int errn = 0;
|
||||
if (n < 128) {
|
||||
/* write byte as is */
|
||||
errn = encode(stream, (uint8_t) n);
|
||||
} else {
|
||||
uint8_t n7BitBlocks = numberOf7BitBlocksToRepresent(n);
|
||||
|
||||
switch (n7BitBlocks) {
|
||||
case 3:
|
||||
errn = encode(stream, (uint8_t) (128 | n));
|
||||
n = n >> 7;
|
||||
if (errn != 0) {
|
||||
break;
|
||||
}
|
||||
/* no break */
|
||||
case 2:
|
||||
errn = encode(stream, (uint8_t) (128 | n));
|
||||
n = n >> 7;
|
||||
if (errn != 0) {
|
||||
break;
|
||||
}
|
||||
/* no break */
|
||||
case 1:
|
||||
/* 0 .. 7 (last byte) */
|
||||
errn = encode(stream, (uint8_t) (0 | n));
|
||||
/* no break */
|
||||
}
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode an arbitrary precision non negative integer using a sequence of
|
||||
* octets. The most significant bit of the last octet is set to zero to
|
||||
|
@ -204,6 +244,32 @@ int encodeInteger(bitstream_t* stream, exi_integer_t* iv) {
|
|||
return errn;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Encode an arbitrary precision integer using a sign bit followed by a
|
||||
* sequence of octets. The most significant bit of the last octet is set to
|
||||
* zero to indicate sequence termination. Only seven bits per octet are used
|
||||
* to store the integer's value.
|
||||
*/
|
||||
int encodeInteger16(bitstream_t* stream, int16_t n) {
|
||||
int errn;
|
||||
/* signalize sign */
|
||||
if (n < 0) {
|
||||
errn = encodeBoolean(stream, 1);
|
||||
/* For negative values, the Unsigned Integer holds the
|
||||
* magnitude of the value minus 1 */
|
||||
n = (int16_t)((-n) - 1);
|
||||
} else {
|
||||
errn = encodeBoolean(stream, 0);
|
||||
}
|
||||
if (errn == 0) {
|
||||
errn = encodeUnsignedInteger16(stream, (uint16_t)n);
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Encode an arbitrary precision integer using a sign bit followed by a
|
||||
* sequence of octets. The most significant bit of the last octet is set to
|
||||
|
@ -287,10 +353,10 @@ int encodeDecimal(bitstream_t* stream, exi_decimal_t* d) {
|
|||
/**
|
||||
* Encode a length prefixed sequence of characters.
|
||||
*/
|
||||
int encodeString(bitstream_t* stream, exi_string_ucs_t* string) {
|
||||
int encodeString(bitstream_t* stream, exi_string_t* string) {
|
||||
int errn = encodeUnsignedInteger32(stream, string->len);
|
||||
if (errn == 0) {
|
||||
errn = encodeUCSCharacters(stream, string->codepoints, string->len);
|
||||
errn = encodeCharacters(stream, string->characters, string->len);
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
@ -348,7 +414,7 @@ int encodeStringValue(bitstream_t* stream, exi_state_t* state, uint16_t qnameID,
|
|||
/* encode string as string table miss */
|
||||
errn = encodeUnsignedInteger32(stream, (uint32_t)(string->miss.len + 2));
|
||||
if (errn == 0) {
|
||||
errn = encodeUCSCharacters(stream, string->miss.codepoints,
|
||||
errn = encodeCharacters(stream, string->miss.characters,
|
||||
string->miss.len);
|
||||
if (errn == 0) {
|
||||
#if EXI_OPTION_VALUE_PARTITION_CAPACITY != 0
|
||||
|
@ -359,10 +425,10 @@ int encodeStringValue(bitstream_t* stream, exi_state_t* state, uint16_t qnameID,
|
|||
* associated "local" value string table partition and the global
|
||||
* value string table partition */
|
||||
#if EXI_OPTION_VALUE_MAX_LENGTH < 0
|
||||
errn = exi_v2g_AddStringValue(state, &(string->miss), qnameID);
|
||||
errn = exiAddStringValue(&state->stringTable, &(string->miss), qnameID);
|
||||
# else /* EXI_OPTION_VALUE_MAX_LENGTH < 0 */
|
||||
if (string->miss.len <= EXI_OPTION_VALUE_MAX_LENGTH) {
|
||||
errn = exi_v2g_AddStringValue(state, &(string->miss),
|
||||
errn = exiAddStringValue(&state->stringTable, &(string->miss),
|
||||
qnameID);
|
||||
}
|
||||
#endif /* EXI_OPTION_VALUE_MAX_LENGTH < 0 */
|
||||
|
@ -406,7 +472,7 @@ int encodeRCSStringValue(bitstream_t* stream, exi_state_t* state,
|
|||
if (errn == 0) {
|
||||
for (i = 0; i < string->miss.len && errn == 0; i++) {
|
||||
for (k = 0; k < rcs->size && errn == 0; k++) {
|
||||
if (rcs->codepoints[k] == string->miss.codepoints[i]) {
|
||||
if (rcs->characters[k] == string->miss.characters[i]) {
|
||||
errn = encodeNBitUnsignedInteger(stream, rcs->codingLength,
|
||||
k);
|
||||
break; /* break inner for loop */
|
||||
|
@ -421,10 +487,10 @@ int encodeRCSStringValue(bitstream_t* stream, exi_state_t* state,
|
|||
* associated "local" value string table partition and the global
|
||||
* value string table partition */
|
||||
#if EXI_OPTION_VALUE_MAX_LENGTH < 0
|
||||
errn = exi_v2g_AddStringValue(state, &(string->miss), qnameID);
|
||||
errn = exiAddStringValue(&state->stringTable, &(string->miss), qnameID);
|
||||
#else /* EXI_OPTION_VALUE_MAX_LENGTH < 0 */
|
||||
if (string->miss.len <= EXI_OPTION_VALUE_MAX_LENGTH) {
|
||||
errn = exi_v2g_AddStringValue(state, &(string->miss),
|
||||
errn = exiAddStringValue(&state->stringTable, &(string->miss),
|
||||
qnameID);
|
||||
}
|
||||
#endif /* EXI_OPTION_VALUE_MAX_LENGTH < 0 */
|
||||
|
@ -446,11 +512,50 @@ int encodeRCSStringValue(bitstream_t* stream, exi_state_t* state,
|
|||
* Each character is represented by its UCS [ISO/IEC 10646]
|
||||
* code point encoded as an Unsigned Integer
|
||||
*/
|
||||
int encodeUCSCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len) {
|
||||
int encodeCharacters(bitstream_t* stream, exi_string_character_t* chars, uint16_t len) {
|
||||
unsigned int i;
|
||||
int errn = 0;
|
||||
for (i = 0; i < len && errn == 0; i++) {
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
|
||||
errn = encode(stream, (uint8_t)chars[i]);
|
||||
#endif /* STRING_REPRESENTATION_ASCII */
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
|
||||
errn = encodeUnsignedInteger32(stream, chars[i]);
|
||||
#endif /* STRING_REPRESENTATION_UCS */
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
int encodeRCSCharacters(bitstream_t* stream, exi_string_character_t* chars, uint16_t len, uint16_t rcsCodeLength, uint16_t rcsSize, const exi_string_character_t rcsSet[]) {
|
||||
unsigned int i;
|
||||
int k;
|
||||
int errn = 0;
|
||||
int rcsCode = -1;
|
||||
|
||||
for (i = 0; i < len && errn == 0; i++) {
|
||||
/* try to find short code */
|
||||
rcsCode = -1;
|
||||
for(k=0; k<rcsSize && rcsCode < 0; k++) {
|
||||
if(rcsSet[k] == chars[i]) {
|
||||
rcsCode = k;
|
||||
}
|
||||
}
|
||||
|
||||
if( rcsCode < 0) {
|
||||
/* RCS mis-match */
|
||||
errn = encodeNBitUnsignedInteger(stream, rcsCodeLength, rcsSize);
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
|
||||
errn = encode(stream, (uint8_t)chars[i]);
|
||||
#endif /* STRING_REPRESENTATION_ASCII */
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
|
||||
errn = encodeUnsignedInteger32(stream, chars[i]);
|
||||
#endif /* STRING_REPRESENTATION_UCS */
|
||||
|
||||
} else {
|
||||
/* RCS match */
|
||||
errn = encodeNBitUnsignedInteger(stream, rcsCodeLength, (uint32_t)rcsCode);
|
||||
}
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
@ -459,11 +564,21 @@ int encodeUCSCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len) {
|
|||
* Encode a binary value as a length-prefixed sequence of octets.
|
||||
*/
|
||||
int encodeBinary(bitstream_t* stream, exi_bytes_t* bytes) {
|
||||
unsigned int i;
|
||||
int errn = encodeUnsignedInteger32(stream, bytes->len);
|
||||
|
||||
for (i = 0; i < bytes->len && errn == 0; i++) {
|
||||
errn = encode(stream, bytes->data[i]);
|
||||
if(errn == 0) {
|
||||
errn = encodeBytes(stream, bytes->data, bytes->len);
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
int encodeBytes(bitstream_t* stream, uint8_t* data, uint16_t len) {
|
||||
unsigned int i;
|
||||
int errn = 0;
|
||||
|
||||
for (i = 0; i < len && errn == 0; i++) {
|
||||
errn = encode(stream, data[i]);
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,21 +18,17 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file BitInputStream.h
|
||||
* \brief Bit Input Stream
|
||||
|
@ -42,11 +37,15 @@ extern "C" {
|
|||
*
|
||||
*/
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
#ifndef BIT_INPUT_STREAM_H
|
||||
#define BIT_INPUT_STREAM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \brief Read bits
|
||||
*
|
||||
|
@ -61,9 +60,8 @@ extern "C" {
|
|||
int readBits(bitstream_t* stream, uint16_t num_bits, uint32_t* b);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
@ -90,7 +89,7 @@ int writeBits(bitstream_t* stream, uint16_t nbits, uint32_t val) {
|
|||
if ((*stream->pos) >= stream->size) {
|
||||
errn = EXI_ERROR_OUTPUT_STREAM_EOF;
|
||||
} else {
|
||||
stream->data[(*stream->pos)++] = (val >> (nbits));
|
||||
stream->data[(*stream->pos)++] = (uint8_t)(val >> (nbits));
|
||||
}
|
||||
#endif
|
||||
#if EXI_STREAM == FILE_STREAM
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,21 +18,17 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file BitOutputStream.h
|
||||
* \brief Bit Output Stream
|
||||
|
@ -42,13 +37,17 @@ extern "C" {
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef BIT_OUTPUT_STREAM_H
|
||||
#define BIT_OUTPUT_STREAM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
#ifndef BIT_OUTPUT_STREAM_H
|
||||
#define BIT_OUTPUT_STREAM_H
|
||||
|
||||
/**
|
||||
* \brief Write bits
|
||||
*
|
||||
|
@ -77,10 +76,10 @@ int writeBits(bitstream_t* stream, uint16_t nbits, uint32_t bits);
|
|||
*/
|
||||
int flush(bitstream_t* stream);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
@ -42,7 +41,7 @@
|
|||
#ifndef BYTE_STREAM_C
|
||||
#define BYTE_STREAM_C
|
||||
|
||||
int readBytesFromFile(const char * filename, uint8_t* data, uint32_t size, uint32_t* pos) {
|
||||
int readBytesFromFile(const char * filename, uint8_t* data, uint16_t size, uint16_t* pos) {
|
||||
FILE* f;
|
||||
int character;
|
||||
int errn = 0;
|
||||
|
@ -66,7 +65,7 @@ int readBytesFromFile(const char * filename, uint8_t* data, uint32_t size, uint3
|
|||
return errn;
|
||||
}
|
||||
|
||||
int writeBytesToFile(uint8_t* data, uint32_t len, const char * filename) {
|
||||
int writeBytesToFile(uint8_t* data, uint16_t len, const char * filename) {
|
||||
size_t rlen;
|
||||
FILE* f = fopen(filename, "wb+");
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,23 +18,17 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \file ByteStream.h
|
||||
* \brief Byte Stream utilities
|
||||
|
@ -45,6 +38,12 @@ extern "C" {
|
|||
#ifndef BYTE_STREAM_H
|
||||
#define BYTE_STREAM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \brief Write bytes to file
|
||||
*
|
||||
|
@ -54,7 +53,7 @@ extern "C" {
|
|||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int writeBytesToFile(uint8_t* data, uint32_t len, const char * filename);
|
||||
int writeBytesToFile(uint8_t* data, uint16_t len, const char * filename);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -67,10 +66,10 @@ int writeBytesToFile(uint8_t* data, uint32_t len, const char * filename);
|
|||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int readBytesFromFile(const char * filename, uint8_t* data, uint32_t size, uint32_t* pos);
|
||||
|
||||
#endif /* BYTE_STREAM_H */
|
||||
int readBytesFromFile(const char * filename, uint8_t* data, uint16_t size, uint16_t* pos);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* BYTE_STREAM_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,33 +18,32 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file DecoderChannel.h
|
||||
* \brief EXI Decoder Channel
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXIOptions.h"
|
||||
#include "EXITypes.h"
|
||||
|
||||
#ifndef DECODER_CHANNEL_H
|
||||
#define DECODER_CHANNEL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXIOptions.h"
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \brief Decode byte value
|
||||
|
@ -260,7 +258,7 @@ int decodeDecimal(bitstream_t* stream, exi_decimal_t* d);
|
|||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int decodeStringOnly(bitstream_t* stream, uint16_t len, exi_string_ucs_t* s);
|
||||
int decodeStringOnly(bitstream_t* stream, uint16_t len, exi_string_t* s);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -273,7 +271,7 @@ int decodeStringOnly(bitstream_t* stream, uint16_t len, exi_string_ucs_t* s);
|
|||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int decodeString(bitstream_t* stream, exi_string_ucs_t* s);
|
||||
int decodeString(bitstream_t* stream, exi_string_t* s);
|
||||
|
||||
|
||||
|
||||
|
@ -320,7 +318,25 @@ int decodeRCSStringValue(bitstream_t* stream, exi_state_t* state, uint16_t qname
|
|||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars);
|
||||
int decodeCharacters(bitstream_t* stream, uint16_t len, exi_string_character_t* chars);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decode restricted character set characters
|
||||
*
|
||||
* Decode a sequence of characters according to a given length and rcs code-length, size and set.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param len Length
|
||||
* \param chars Characters (out)
|
||||
* \param rcsCodeLength RCS code-length
|
||||
* \param rcsCodeLength RCS size
|
||||
* \param rcsCodeLength RCS set
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int decodeRCSCharacters(bitstream_t* stream, uint16_t len, exi_string_character_t* chars, uint16_t rcsCodeLength, uint16_t rcsSize, const exi_string_character_t rcsSet[]);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -335,6 +351,18 @@ int decodeCharacters(bitstream_t* stream, uint16_t len, uint32_t* chars);
|
|||
*/
|
||||
int decodeBinary(bitstream_t* stream, exi_bytes_t* bytes);
|
||||
|
||||
/**
|
||||
* \brief Decode Binary data
|
||||
*
|
||||
* Decode a sequence of octets.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param len Length
|
||||
* \param data Bytes (out)
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int decodeBytes(bitstream_t* stream, uint16_t len, uint8_t* data);
|
||||
|
||||
/**
|
||||
* \brief Decode DateTime
|
||||
|
@ -350,10 +378,9 @@ int decodeBinary(bitstream_t* stream, exi_bytes_t* bytes);
|
|||
*/
|
||||
int decodeDateTime(bitstream_t* stream, exi_datetime_type_t type, exi_datetime_t* datetime);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#include "DynamicMemory.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "EXIConfig.h"
|
||||
#include "EXITypes.h"
|
||||
#include "ErrorCodes.h"
|
||||
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef DYNAMIC_MEMORY_C
|
||||
#define DYNAMIC_MEMORY_C
|
||||
|
||||
|
||||
int exiAllocateDynamicStringMemory(exi_string_ucs_t* s, uint16_t length) {
|
||||
int errn = 0;
|
||||
/* allocate dynamic memory */
|
||||
s->size = length; /* length << 1; */ /* length * 2 */
|
||||
s->codepoints = (uint32_t*) malloc(s->size * sizeof(uint32_t));
|
||||
|
||||
if(NULL == s->codepoints) {
|
||||
s->size = 0;
|
||||
errn = EXI_ERROR_OUT_OF_STRING_BUFFER;
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
int exiAllocateDynamicBinaryMemory(exi_bytes_t* b, uint16_t length) {
|
||||
int errn = 0;
|
||||
/* allocate dynamic memory */
|
||||
b->size = length; /* length << 1; */ /* length * 2 */
|
||||
b->data = (uint8_t*) malloc(b->size * sizeof(uint8_t));
|
||||
|
||||
if(NULL == b->data) {
|
||||
b->size = 0;
|
||||
errn = EXI_ERROR_OUT_OF_BYTE_BUFFER;
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int exiFreeDynamicStringMemory(exi_string_ucs_t* s) {
|
||||
/* free previous allocated memory, if any */
|
||||
if(s->size != 0) {
|
||||
s->size = 0;
|
||||
free(s->codepoints);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int exiFreeDynamicBinaryMemory(exi_bytes_t* b) {
|
||||
/* free previous allocated memory, if any */
|
||||
if(b->size != 0) {
|
||||
b->size = 0;
|
||||
free(b->data);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXIConfig.h"
|
||||
#include "EXITypes.h"
|
||||
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
|
||||
/**
|
||||
* \file DynamicMemory.h
|
||||
* \brief Utilities to allocate and free EXI datatypes memory
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef DYNAMIC_MEMORY_H
|
||||
#define DYNAMIC_MEMORY_H
|
||||
|
||||
/**
|
||||
* \brief Allocates memory for at least the length of the string
|
||||
*
|
||||
* \param s UCS String to allocate memory for
|
||||
* \param length Length
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiAllocateDynamicStringMemory(exi_string_ucs_t* s, uint16_t length);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Allocates memory for at least the length of the string
|
||||
*
|
||||
* \param b Binary to allocate memory for
|
||||
* \param length Length
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiAllocateDynamicBinaryMemory(exi_bytes_t* b, uint16_t length);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Free String Memory (if any)
|
||||
*
|
||||
* \param s UCS String
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiFreeDynamicStringMemory(exi_string_ucs_t* s);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Free Binary Memory (if any)
|
||||
*
|
||||
* \param s UCS String
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiFreeDynamicBinaryMemory(exi_bytes_t* b);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,23 +18,17 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \file EXIConfig.h
|
||||
* \brief EXI Configurations for the EXI Codec
|
||||
|
@ -45,10 +38,9 @@ extern "C" {
|
|||
#ifndef EXI_CONFIG_H
|
||||
#define EXI_CONFIG_H
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/** EXI stream - Option Byte Array */
|
||||
|
@ -78,26 +70,26 @@ extern "C" {
|
|||
|
||||
|
||||
|
||||
/** String representation ASCII */
|
||||
#define STRING_REPRESENTATION_ASCII 1
|
||||
/** String representation Universal Character Set (UCS) */
|
||||
#define STRING_REPRESENTATION_UCS 2
|
||||
/** */
|
||||
/** \brief String representation mode
|
||||
*
|
||||
* ASCII or UCS
|
||||
* */
|
||||
#define STRING_REPRESENTATION STRING_REPRESENTATION_UCS
|
||||
|
||||
|
||||
|
||||
/** Maximum number of cascading elements, XML tree depth */
|
||||
#define EXI_ELEMENT_STACK_SIZE 24
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* EXI_CONFIG_H */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EXI_CONFIG_H */
|
||||
|
||||
|
|
|
@ -1,34 +1,4 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
/* $EXI_SOURCE_PREAMBLE$ */
|
||||
|
||||
#include "EXIHeaderDecoder.h"
|
||||
#include "BitInputStream.h"
|
||||
|
@ -39,8 +9,14 @@
|
|||
#define EXI_HEADER_DECODER_C
|
||||
|
||||
int readEXIHeader(bitstream_t* stream) {
|
||||
int errn;
|
||||
uint32_t header = 0;
|
||||
int errn = readBits(stream, 8, &header);
|
||||
|
||||
/* init stream */
|
||||
stream->buffer = 0;
|
||||
stream->capacity = 0;
|
||||
|
||||
errn = readBits(stream, 8, &header);
|
||||
if (errn == 0) {
|
||||
if(header == '$') {
|
||||
/* we do not support "EXI Cookie" */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,23 +18,17 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \file EXIHeaderDecoder.h
|
||||
* \brief EXI Header Decoder
|
||||
|
@ -45,6 +38,12 @@ extern "C" {
|
|||
#ifndef EXI_HEADER_DECODER_H
|
||||
#define EXI_HEADER_DECODER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \brief Reads EXI header
|
||||
*
|
||||
|
@ -54,9 +53,8 @@ extern "C" {
|
|||
*/
|
||||
int readEXIHeader(bitstream_t* stream);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,34 +1,4 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
/* $EXI_SOURCE_PREAMBLE$ */
|
||||
|
||||
#include "EXIHeaderEncoder.h"
|
||||
#include "BitOutputStream.h"
|
||||
|
@ -38,6 +8,10 @@
|
|||
#define EXI_HEADER_ENCODER_C
|
||||
|
||||
int writeEXIHeader(bitstream_t* stream) {
|
||||
/* init stream */
|
||||
stream->buffer = 0;
|
||||
stream->capacity = 8;
|
||||
|
||||
return writeBits(stream, 8, 128);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,23 +18,17 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \file EXIHeaderEncoder.h
|
||||
* \brief EXI Header Encoder
|
||||
|
@ -45,6 +38,12 @@ extern "C" {
|
|||
#ifndef EXI_HEADER_ENCODER_H
|
||||
#define EXI_HEADER_ENCODER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
|
||||
/**
|
||||
* \brief Writes EXI header
|
||||
|
@ -55,9 +54,8 @@ extern "C" {
|
|||
*/
|
||||
int writeEXIHeader(bitstream_t* stream);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,23 +18,17 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \file EXIOptions.h
|
||||
* \brief EXI Options for the EXI Codec
|
||||
|
@ -45,6 +38,10 @@ extern "C" {
|
|||
#ifndef EXI_OPTIONS_H
|
||||
#define EXI_OPTIONS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/** EXI alignment - Option bit-packed */
|
||||
#define BIT_PACKED 1
|
||||
|
@ -88,9 +85,9 @@ extern "C" {
|
|||
*/
|
||||
#define EXI_OPTION_VALUE_PARTITION_CAPACITY 0
|
||||
|
||||
#endif /* EXI_OPTIONS_H */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EXI_OPTIONS_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,35 +18,36 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file EXITypes.h
|
||||
* \brief Basic type definitions and structs
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EXI_TYPES_H
|
||||
#define EXI_TYPES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "EXIConfig.h"
|
||||
#if EXI_STREAM == FILE_STREAM
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifndef EXI_TYPES_H
|
||||
#define EXI_TYPES_H
|
||||
|
||||
/** Number of bits for each byte */
|
||||
#define BITS_IN_BYTE 8
|
||||
|
@ -127,15 +127,41 @@ typedef enum {
|
|||
* \brief Bit stream container
|
||||
*
|
||||
* Structure for byteArray/file stream.
|
||||
*
|
||||
* # General
|
||||
* .size defines the maximum size of the byte array (see .data)
|
||||
*
|
||||
* .data points to the input/output array of bytes (unsigned char*).
|
||||
*
|
||||
* .pos has to be set to an pointer to an 32 bit long unsigned integer (uint32_t *)
|
||||
* as this variable is read/write.
|
||||
* Therefore it is best practice to declare the variable itself and use the &-operator
|
||||
* to assign the address. The value of that variable points to the position inside the
|
||||
* buffer where the stream begins. Which is usually the first (0th) byte but can also be
|
||||
* another value if there more information transferred in that stream.
|
||||
* After processing .pos points to the next "available" byte (if any left).
|
||||
*
|
||||
* .buffer has to be set to 0 for internal use only (single byte buffer)
|
||||
*
|
||||
* # Receiving data (input)
|
||||
* .capacity is used for addressing single bits in the actual byte (see .buffer)
|
||||
* and has to be set to 0, which means there are 0 bits read so far and a new
|
||||
* byte needs to be read from the input stream/data-array to the current byte buffer.
|
||||
*
|
||||
* # Sending data (output)
|
||||
* .capacity is used for addressing single bits in the actual byte (see .buffer)
|
||||
* and has to be set to 8, which means there are still 8 bits left to fill up
|
||||
* the current byte buffer before writing the final byte to the output stream/data-array.
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
#if EXI_STREAM == BYTE_ARRAY
|
||||
/** byte array size */
|
||||
uint32_t size;
|
||||
uint16_t size;
|
||||
/** byte array data */
|
||||
uint8_t* data;
|
||||
/** byte array next position in array */
|
||||
uint32_t* pos;
|
||||
uint16_t* pos;
|
||||
#endif
|
||||
#if EXI_STREAM == FILE_STREAM
|
||||
/** file pointer */
|
||||
|
@ -235,16 +261,26 @@ typedef enum {
|
|||
EXI_STRING_VALUE_GLOBAL_HIT
|
||||
} exi_string_value_type_t;
|
||||
|
||||
/** \brief EXI string character */
|
||||
/* Note: define whether you wan't to support ASCII only or UCS */
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
|
||||
typedef char exi_string_character_t;
|
||||
#endif /* STRING_REPRESENTATION_ASCII */
|
||||
#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
|
||||
typedef uint32_t exi_string_character_t;
|
||||
#endif /* STRING_REPRESENTATION_UCS */
|
||||
|
||||
|
||||
|
||||
/** \brief Universal Character Set (UCS) strings */
|
||||
typedef struct {
|
||||
/** UCS size */
|
||||
/** container size */
|
||||
uint16_t size;
|
||||
/** UCS character container */
|
||||
uint32_t* codepoints;
|
||||
/** UCS current length == number of code-points, (len <= size) */
|
||||
/** string character container */
|
||||
exi_string_character_t* characters;
|
||||
/** current string length == number of code-points, (len <= size) */
|
||||
uint16_t len;
|
||||
} exi_string_ucs_t;
|
||||
} exi_string_t;
|
||||
|
||||
|
||||
/** \brief String value */
|
||||
|
@ -252,7 +288,7 @@ typedef struct {
|
|||
/** value type (e.g., miss, local-hit, global-hit) */
|
||||
exi_string_value_type_t type;
|
||||
/** miss entry */
|
||||
exi_string_ucs_t miss;
|
||||
exi_string_t miss;
|
||||
/** (local) hit entry */
|
||||
uint32_t localID;
|
||||
/** (global) hit entry */
|
||||
|
@ -265,7 +301,7 @@ typedef struct {
|
|||
/** size */
|
||||
uint16_t size;
|
||||
/** rcs codepoints */
|
||||
uint32_t* codepoints;
|
||||
exi_string_character_t* characters;
|
||||
/** character coding length (less than 256 characters) */
|
||||
uint8_t codingLength;
|
||||
} exi_rcs_t;
|
||||
|
@ -388,7 +424,7 @@ typedef struct {
|
|||
/** entry ID */
|
||||
uint16_t id;
|
||||
/** entry string */
|
||||
exi_string_ucs_t str;
|
||||
exi_string_t str;
|
||||
} exi_name_entry_t;
|
||||
|
||||
|
||||
|
@ -478,7 +514,7 @@ typedef struct exiValueStringTableEntry {
|
|||
/** Local Value ID */
|
||||
uint16_t localValueID;
|
||||
/** String */
|
||||
exi_string_ucs_t str;
|
||||
exi_string_t str;
|
||||
} exi_value_string_table_entry_t;
|
||||
|
||||
typedef struct exiValueStringTable {
|
||||
|
@ -549,9 +585,8 @@ typedef struct {
|
|||
} exi_value_t;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,23 +18,17 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \file EncoderChannel.h
|
||||
* \brief EXI Encoder Channel
|
||||
|
@ -45,6 +38,13 @@ extern "C" {
|
|||
#ifndef ENCODER_CHANNEL_H
|
||||
#define ENCODER_CHANNEL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
|
||||
/**
|
||||
* \brief Encode byte value
|
||||
*
|
||||
|
@ -100,6 +100,23 @@ int encodeNBitUnsignedInteger(bitstream_t* stream, uint16_t nbits, uint32_t val)
|
|||
int encodeUnsignedInteger(bitstream_t* stream, exi_integer_t* iv);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Encode unsigned integer
|
||||
*
|
||||
* Encode an arbitrary precision non negative integer using
|
||||
* a sequence of octets. The most significant bit of the last
|
||||
* octet is set to zero to indicate sequence termination.
|
||||
* Only seven bits per octet are used to store the integer's value.
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param n Unsigned integer value 16 bits
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int encodeUnsignedInteger16(bitstream_t* stream, uint16_t n);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Encode unsigned integer
|
||||
*
|
||||
|
@ -148,6 +165,21 @@ int encodeUnsignedInteger64(bitstream_t* stream, uint64_t n);
|
|||
int encodeInteger(bitstream_t* stream, exi_integer_t* iv);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Encode integer
|
||||
*
|
||||
* Encode an arbitrary precision integer using a sign boolean
|
||||
* followed by a sequence of octets. The most significant bit
|
||||
* of the last octet is set to zero to indicate sequence termination.
|
||||
* Only seven bits per octet are used to store the integer's value.
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param n Integer value 16 bits
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int encodeInteger16(bitstream_t* stream, int16_t n);
|
||||
|
||||
/**
|
||||
* \brief Encode integer
|
||||
*
|
||||
|
@ -225,7 +257,7 @@ int encodeDecimal(bitstream_t* stream, exi_decimal_t* d);
|
|||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int encodeString(bitstream_t* stream, exi_string_ucs_t* string);
|
||||
int encodeString(bitstream_t* stream, exi_string_t* string);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -276,7 +308,27 @@ int encodeRCSStringValue(bitstream_t* stream, exi_state_t* state,
|
|||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int encodeUCSCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len);
|
||||
int encodeCharacters(bitstream_t* stream, exi_string_character_t* chars, uint16_t len);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Encode characters
|
||||
*
|
||||
* Encode a sequence of characters according to a given length.
|
||||
* Each character is represented by its UCS [ISO/IEC 10646]
|
||||
* code point encoded as an Unsigned Integer.
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param chars Characters
|
||||
* \param len Numbr of characters
|
||||
* \param rcsCodeLength RCS code-length
|
||||
* \param rcsCodeLength RCS size
|
||||
* \param rcsCodeLength RCS set
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int encodeRCSCharacters(bitstream_t* stream, exi_string_character_t* chars, uint16_t len, uint16_t rcsCodeLength, uint16_t rcsSize, const exi_string_character_t rcsSet[]);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -292,6 +344,19 @@ int encodeUCSCharacters(bitstream_t* stream, uint32_t* chars, uint16_t len);
|
|||
int encodeBinary(bitstream_t* stream, exi_bytes_t* bytes);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Encode binary data
|
||||
*
|
||||
* Encode a sequence of octets.
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param data Byte values
|
||||
* \param len Length
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int encodeBytes(bitstream_t* stream, uint8_t* data, uint16_t len);
|
||||
|
||||
/**
|
||||
* \brief Encode datetime
|
||||
*
|
||||
|
@ -315,9 +380,8 @@ int encodeDateTime(bitstream_t* stream, exi_datetime_t* datetime);
|
|||
*/
|
||||
int encodeFinish(bitstream_t* stream);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,29 +10,25 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file ErrorCodes.h
|
||||
* \brief Error Codes descriptions
|
||||
|
@ -42,6 +38,9 @@ extern "C" {
|
|||
#ifndef EXI_ERROR_CODES_H
|
||||
#define EXI_ERROR_CODES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define EXI_ERROR_INPUT_STREAM_EOF -10
|
||||
#define EXI_ERROR_OUTPUT_STREAM_EOF -11
|
||||
|
@ -56,6 +55,7 @@ extern "C" {
|
|||
#define EXI_ERROR_OUT_OF_RUNTIME_GRAMMAR_STACK -105
|
||||
#define EXI_ERROR_OUT_OF_QNAMES -106
|
||||
|
||||
#define EXI_ERROR_UNKOWN_GRAMMAR_ID -108
|
||||
#define EXI_ERROR_UNKOWN_EVENT -109
|
||||
#define EXI_ERROR_UNKOWN_EVENT_CODE -110
|
||||
#define EXI_ERROR_UNEXPECTED_EVENT_LEVEL1 -111
|
||||
|
@ -87,17 +87,19 @@ extern "C" {
|
|||
#define EXI_UNSUPPORTED_HEADER_OPTIONS -138
|
||||
|
||||
#define EXI_UNSUPPORTED_GLOBAL_ATTRIBUTE_VALUE_TYPE -139
|
||||
#define EXI_UNSUPPORTED_STRING_VALUE_TYPE -140
|
||||
#define EXI_UNSUPPORTED_INTEGER_VALUE_TYPE -141
|
||||
#define EXI_UNSUPPORTED_DATETIME_TYPE -142
|
||||
#define EXI_UNSUPPORTED_DATATYPE -140
|
||||
#define EXI_UNSUPPORTED_STRING_VALUE_TYPE -141
|
||||
#define EXI_UNSUPPORTED_INTEGER_VALUE_TYPE -142
|
||||
#define EXI_UNSUPPORTED_DATETIME_TYPE -143
|
||||
|
||||
#define EXI_UNSUPPORTED_GRAMMAR_LEARNING_CH -150
|
||||
|
||||
/* string values */
|
||||
#define EXI_ERROR_STRINGVALUES_NOT_SUPPORTED -160
|
||||
#define EXI_ERROR_STRINGVALUES_OUT_OF_ENTRIES -161
|
||||
#define EXI_ERROR_STRINGVALUES_OUT_OF_MEMORY 162
|
||||
#define EXI_ERROR_STRINGVALUES_OUT_OF_BOUND 163
|
||||
#define EXI_ERROR_STRINGVALUES_OUT_OF_MEMORY -162
|
||||
#define EXI_ERROR_STRINGVALUES_OUT_OF_BOUND -163
|
||||
#define EXI_ERROR_STRINGVALUES_CHARACTER -164
|
||||
|
||||
#define EXI_ERROR_UNEXPECTED_BYTE_VALUE -200
|
||||
|
||||
|
@ -108,9 +110,10 @@ extern "C" {
|
|||
|
||||
#define EXI_DEVIANT_SUPPORT_NOT_DEPLOYED -500
|
||||
|
||||
|
||||
#endif /* EXI_ERROR_CODES_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* EXI_ERROR_CODES_H */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,26 +18,27 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef METHODS_BAG_H
|
||||
#define METHODS_BAG_H
|
||||
|
||||
/**
|
||||
* \file MethodsBag.h
|
||||
* \brief Method bag for bit and octet functions
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef METHODS_BAG_H
|
||||
#define METHODS_BAG_H
|
||||
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
|
@ -1,118 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef STRING_NAME_TABLE_C
|
||||
#define STRING_NAME_TABLE_C
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "StringNameTable.h"
|
||||
#include "v2gNameTableEntries.h"
|
||||
#include "ErrorCodes.h"
|
||||
|
||||
|
||||
#ifndef __GNUC__
|
||||
#pragma warning( disable : 4100 ) /* warning unreferenced parameter 'runtimeTable' */
|
||||
#endif /* __GNUC__ */
|
||||
int exiGetUriSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t* uriLength) {
|
||||
*uriLength = prepopulatedTable->len;
|
||||
return 0;
|
||||
}
|
||||
#ifndef __GNUC__
|
||||
#pragma warning( default : 4100 ) /* warning unreferenced parameter 'runtimeTable' */
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
|
||||
int exiGetLocalNameSize(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable,
|
||||
uint16_t uriID, uint16_t* localNameLength) {
|
||||
int errn = 0;
|
||||
*localNameLength = 0;
|
||||
/* 1. pre-populated entries*/
|
||||
if (uriID < prepopulatedTable->len) {
|
||||
(*localNameLength) = (uint16_t)(*localNameLength + prepopulatedTable->localNames[uriID]);
|
||||
} else {
|
||||
/* range check */
|
||||
if (uriID >= ( prepopulatedTable->len + runtimeTable->addedUriEntries )) {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
}
|
||||
/* 2. runtime entries */
|
||||
if (errn == 0 && runtimeTable->addedLocalNameEntries > 0 ) {
|
||||
int i;
|
||||
for(i=0; i<(runtimeTable->addedUriEntries+runtimeTable->addedLocalNameEntries); i++) {
|
||||
if ( runtimeTable->namePartitionsEntries[i].namePartitionType == EXI_NAME_PARTITION_LOCALNAME &&
|
||||
runtimeTable->namePartitionsEntries[i].entry.localNamePartition.uriID == uriID ) {
|
||||
(*localNameLength)++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
/* inline */
|
||||
/*
|
||||
static int _max(int a, int b) {
|
||||
return (a > b) ? a : b;
|
||||
}
|
||||
*/
|
||||
|
||||
int exiInitNameTableRuntime(exi_name_table_runtime_t* runtimeTable) {
|
||||
/*runtimeTable->numberOfUsedCharacters = 0;*/
|
||||
runtimeTable->addedLocalNameEntries = 0;
|
||||
runtimeTable->addedUriEntries = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int exiAddUri(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable) {
|
||||
uint16_t index = (uint16_t)(runtimeTable->addedUriEntries + runtimeTable->addedLocalNameEntries);
|
||||
runtimeTable->namePartitionsEntries[index].namePartitionType = EXI_NAME_PARTITION_URI;
|
||||
runtimeTable->namePartitionsEntries[index].entry.uriPartition.uriID = (uint16_t)(prepopulatedTable->len + runtimeTable->addedUriEntries);
|
||||
runtimeTable->addedUriEntries++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int exiAddLocalName(exi_name_table_prepopulated_t* prepopulatedTable, exi_name_table_runtime_t* runtimeTable, uint16_t uriID, uint16_t* localNameID) {
|
||||
uint16_t index = (uint16_t)(runtimeTable->addedUriEntries + runtimeTable->addedLocalNameEntries);
|
||||
int errn = exiGetLocalNameSize(prepopulatedTable, runtimeTable, uriID, localNameID);
|
||||
if (errn == 0) {
|
||||
runtimeTable->namePartitionsEntries[index].namePartitionType = EXI_NAME_PARTITION_LOCALNAME;
|
||||
runtimeTable->namePartitionsEntries[index].entry.localNamePartition.localNameID = *localNameID;
|
||||
runtimeTable->namePartitionsEntries[index].entry.localNamePartition.uriID = uriID;
|
||||
runtimeTable->addedLocalNameEntries++;
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file StringNameTable.h
|
||||
* \brief String table count implementation
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef STRING_NAME_TABLE_H
|
||||
#define STRING_NAME_TABLE_H
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
|
||||
/**
|
||||
* \brief Init name table
|
||||
*
|
||||
* Inits counter et cetera
|
||||
*
|
||||
* \param runtimeTable Runtime Table
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiInitNameTableRuntime(exi_name_table_runtime_t* runtimeTable);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get Uri Size
|
||||
*
|
||||
* \param prepopulatedTable Pre-Populated Table
|
||||
* \param runtimeTable Runtime Table
|
||||
* \param uriLength Uri Size (out)
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiGetUriSize(exi_name_table_prepopulated_t* prepopulatedTable,
|
||||
exi_name_table_runtime_t* runtimeTable, uint16_t* uriLength);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get LocalName Size
|
||||
*
|
||||
* \param prepopulatedTable Pre-Populated Table
|
||||
* \param runtimeTable Runtime Table
|
||||
* \param uriID Uri ID for local-name
|
||||
* \param localNameLength Local-Name Size (out)
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiGetLocalNameSize(exi_name_table_prepopulated_t* prepopulatedTable,
|
||||
exi_name_table_runtime_t* runtimeTable, uint16_t uriID,
|
||||
uint16_t* localNameLength);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Add runtime URI entry
|
||||
*
|
||||
* \param prepopulatedTable Pre-Populated Table
|
||||
* \param runtimeTable Runtime Table
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiAddUri(exi_name_table_prepopulated_t* prepopulatedTable,
|
||||
exi_name_table_runtime_t* runtimeTable);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Add runtime local-name entry
|
||||
*
|
||||
* \param prepopulatedTable Pre-Populated Table
|
||||
* \param runtimeTable Runtime Table
|
||||
* \param uriID Uri ID for local-name
|
||||
* \param localNameID LocalName ID (out)
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiAddLocalName(exi_name_table_prepopulated_t* prepopulatedTable,
|
||||
exi_name_table_runtime_t* runtimeTable, uint16_t uriID, uint16_t* localNameID);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,11 +18,11 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
@ -49,7 +48,7 @@
|
|||
#define STRING_TABLE_INIT_VALUE_ENTRY_SIZE 16
|
||||
|
||||
int exiInitValueStrings(exi_value_table_t* valueTable) {
|
||||
/* int i; */
|
||||
int i;
|
||||
int errn = 0;
|
||||
|
||||
valueTable->numberOfGlobalStrings = 0;
|
||||
|
@ -67,8 +66,8 @@ int exiInitValueStrings(exi_value_table_t* valueTable) {
|
|||
}
|
||||
|
||||
|
||||
int exiAddStringValue(exi_value_table_t* valueTable,
|
||||
exi_string_ucs_t* sv, uint16_t qnameID) {
|
||||
static int __exiAddStringValue(exi_value_table_t* valueTable,
|
||||
exi_string_t* sv, uint16_t qnameID) {
|
||||
int currLen;
|
||||
int errn;
|
||||
|
||||
|
@ -105,7 +104,7 @@ int exiAddStringValue(exi_value_table_t* valueTable,
|
|||
valueTable->valueStringTable->strs[i].qnameID = oldStrs[i].qnameID;
|
||||
valueTable->valueStringTable->strs[i].str.size = oldStrs[i].str.size;
|
||||
valueTable->valueStringTable->strs[i].str.len = oldStrs[i].str.len;
|
||||
valueTable->valueStringTable->strs[i].str.codepoints = oldStrs[i].str.codepoints;
|
||||
valueTable->valueStringTable->strs[i].str.characters = oldStrs[i].str.characters;
|
||||
}
|
||||
/*free old data */
|
||||
free(oldStrs);
|
||||
|
@ -134,7 +133,7 @@ int exiAddStringValue(exi_value_table_t* valueTable,
|
|||
|
||||
if(errn == 0) {
|
||||
/* copy codepoints */
|
||||
if ( memcpy(valueTable->valueStringTable->strs[currLen].str.codepoints, sv->codepoints, sv->len*sizeof(uint32_t)) == NULL ) {
|
||||
if ( memcpy(valueTable->valueStringTable->strs[currLen].str.characters, sv->characters, sv->len*sizeof(uint32_t)) == NULL ) {
|
||||
errn = EXI_ERROR_STRINGVALUES_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
@ -147,6 +146,39 @@ int exiAddStringValue(exi_value_table_t* valueTable,
|
|||
}
|
||||
|
||||
|
||||
|
||||
int exiAddStringValue(exi_value_table_t* valueTable, exi_string_t* sv, uint16_t qnameID) {
|
||||
int errn = 0;
|
||||
#if EXI_OPTION_VALUE_PARTITION_CAPACITY != 0
|
||||
#if EXI_OPTION_VALUE_MAX_LENGTH != 0
|
||||
/* increment global string count */
|
||||
#if EXI_OPTION_VALUE_PARTITION_CAPACITY < 0
|
||||
valueTable->numberOfGlobalStrings++;
|
||||
#else /* EXI_OPTION_VALUE_PARTITION_CAPACITY < 0 */
|
||||
if (valueTable->numberOfGlobalStrings < EXI_OPTION_VALUE_PARTITION_CAPACITY) {
|
||||
valueTable->numberOfGlobalStrings++;
|
||||
}
|
||||
#endif /* EXI_OPTION_VALUE_PARTITION_CAPACITY < 0 */
|
||||
/* increment local string count */
|
||||
if (qnameID < valueTable->sizeLocalStrings) {
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
errn = __exiAddStringValue(valueTable, sv, qnameID);
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
valueTable->numberOfLocalStrings[qnameID]++;
|
||||
/* printf("\tSV %d: lv=%d and gv=%d \n", qnameID, state->numberOfLocalStrings[qnameID], state->numberOfGlobalStrings);*/
|
||||
} else {
|
||||
/* currently we do support a set of qnames only */
|
||||
errn = EXI_ERROR_OUT_OF_QNAMES;
|
||||
}
|
||||
#endif /* EXI_OPTION_VALUE_MAX_LENGTH != 0 */
|
||||
#endif /* EXI_OPTION_VALUE_PARTITION_CAPACITY != 0 */
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int exiGetNumberOfLocalStringValueEntries(exi_value_table_t* valueTable,
|
||||
uint16_t qnameID, uint16_t* numberOfEntries) {
|
||||
/* TODO number of local entries and next id must not match, e.g, if string-table is restricted in number of entries */
|
||||
|
@ -163,7 +195,7 @@ int exiGetNumberOfLocalStringValueEntries(exi_value_table_t* valueTable,
|
|||
}
|
||||
|
||||
int exiGetGlobalStringValue(exi_value_table_t* valueTable,
|
||||
uint16_t globalID, exi_string_ucs_t* sv) {
|
||||
uint16_t globalID, exi_string_t* sv) {
|
||||
int errn = 0;
|
||||
|
||||
if( valueTable->valueStringTable->len > globalID) {
|
||||
|
@ -175,7 +207,7 @@ int exiGetGlobalStringValue(exi_value_table_t* valueTable,
|
|||
}
|
||||
|
||||
int exiGetLocalStringValue(exi_value_table_t* valueTable,
|
||||
uint16_t qnameID, uint16_t localID, exi_string_ucs_t* sv) {
|
||||
uint16_t qnameID, uint16_t localID, exi_string_t* sv) {
|
||||
int i;
|
||||
int errn = EXI_ERROR_STRINGVALUES_OUT_OF_BOUND;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,21 +18,17 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file StringValueTable.h
|
||||
* \brief Value string table implementation
|
||||
|
@ -43,6 +38,11 @@ extern "C" {
|
|||
#ifndef STRING_VALUE_TABLE_H
|
||||
#define STRING_VALUE_TABLE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ int exiInitValueStrings(exi_value_table_t* valueTable);
|
|||
*
|
||||
*/
|
||||
int exiAddStringValue(exi_value_table_t* valueTable,
|
||||
exi_string_ucs_t* sv, uint16_t qnameID);
|
||||
exi_string_t* sv, uint16_t qnameID);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -94,7 +94,7 @@ int exiGetNumberOfLocalStringValueEntries(exi_value_table_t* valueTable,
|
|||
*
|
||||
*/
|
||||
int exiGetGlobalStringValue(exi_value_table_t* valueTable,
|
||||
uint16_t globalID, exi_string_ucs_t* sv);
|
||||
uint16_t globalID, exi_string_t* sv);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -108,13 +108,12 @@ int exiGetGlobalStringValue(exi_value_table_t* valueTable,
|
|||
*
|
||||
*/
|
||||
int exiGetLocalStringValue(exi_value_table_t* valueTable,
|
||||
uint16_t qnameID, uint16_t localID, exi_string_ucs_t* sv);
|
||||
uint16_t qnameID, uint16_t localID, exi_string_t* sv);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "UCSString.h"
|
||||
|
||||
#include "EXIConfig.h"
|
||||
#include "DecoderChannel.h"
|
||||
#include "BitInputStream.h"
|
||||
#include "EXITypes.h"
|
||||
#include "ErrorCodes.h"
|
||||
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
#include "DynamicMemory.h"
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
|
||||
#ifndef UCS_STRING_C
|
||||
#define UCS_STRING_C
|
||||
|
||||
|
||||
int toUCSString(char* chars, exi_string_ucs_t* s) {
|
||||
int errn = 0;
|
||||
unsigned int i;
|
||||
s->len = (uint16_t)strlen(chars);
|
||||
|
||||
if (s->len > s->size) {
|
||||
#if MEMORY_ALLOCATION == STATIC_ALLOCATION
|
||||
errn = EXI_ERROR_OUT_OF_STRING_BUFFER;
|
||||
#endif /* STATIC_ALLOCATION */
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
errn = exiFreeDynamicStringMemory(s);
|
||||
if(errn == 0) {
|
||||
errn = exiAllocateDynamicStringMemory(s, s->len);
|
||||
}
|
||||
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
}
|
||||
if(errn == 0) {
|
||||
for(i=0; i<s->len; i++) {
|
||||
s->codepoints[i] = (uint32_t)chars[i];
|
||||
}
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
/* Note A: fails if string contains non ASCII characters */
|
||||
/* Note B: causes harm if char array is not sufficiently long */
|
||||
int toASCIIString(exi_string_ucs_t* string, char* outASCII) {
|
||||
int errn = 0;
|
||||
unsigned int i;
|
||||
for(i=0; i<string->len && errn == 0; i++) {
|
||||
if( string->codepoints[i] < 128 ) {
|
||||
outASCII[i] = (char)string->codepoints[i];
|
||||
} else {
|
||||
errn = -1;
|
||||
}
|
||||
}
|
||||
outASCII[string->len] = '\0';
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \file UCSString.h
|
||||
* \brief UCS String utilities
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef UCS_STRING_H
|
||||
#define UCS_STRING_H
|
||||
|
||||
/**
|
||||
* \brief Converts characters to USC string
|
||||
*
|
||||
* \param chars Characters
|
||||
* \param s UCS String
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int toUCSString(char* chars, exi_string_ucs_t* s);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Converts String to ASCII characters
|
||||
*
|
||||
* Note: fails if string contains non ASCII characters.
|
||||
* Note: Make also sure that the char array is large enough.
|
||||
*
|
||||
* \param string UCS String
|
||||
* \param string Input String
|
||||
* \param outASCII ASCII Characters (out)
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int toASCIIString(exi_string_ucs_t* string, char* outASCII);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,722 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/appHandshake/V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef EXI_appHand_CODER_C
|
||||
#define EXI_appHand_CODER_C
|
||||
|
||||
#include "appHandEXICoder.h"
|
||||
|
||||
#include "EXIConfig.h"
|
||||
#include "EXITypes.h"
|
||||
#include "EXIOptions.h"
|
||||
#include "BitInputStream.h"
|
||||
#include "DecoderChannel.h"
|
||||
#include "ErrorCodes.h"
|
||||
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
#include "StringValueTable.h"
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
|
||||
|
||||
#ifndef __GNUC__
|
||||
#pragma warning( disable : 4100 ) /* warning unreferenced parameter 'qnameID' */
|
||||
#endif /* __GNUC__ */
|
||||
int exi_appHand_AddStringValue(exi_state_t* state, exi_string_ucs_t* sv, uint16_t qnameID) {
|
||||
int errn = 0;
|
||||
#if EXI_OPTION_VALUE_PARTITION_CAPACITY != 0
|
||||
#if EXI_OPTION_VALUE_MAX_LENGTH != 0
|
||||
/* increment global string count */
|
||||
#if EXI_OPTION_VALUE_PARTITION_CAPACITY < 0
|
||||
state->stringTable.numberOfGlobalStrings++;
|
||||
#else /* EXI_OPTION_VALUE_PARTITION_CAPACITY < 0 */
|
||||
if (state->stringTable.numberOfGlobalStrings < EXI_OPTION_VALUE_PARTITION_CAPACITY) {
|
||||
state->stringTable.numberOfGlobalStrings++;
|
||||
}
|
||||
#endif /* EXI_OPTION_VALUE_PARTITION_CAPACITY < 0 */
|
||||
/* increment local string count */
|
||||
if (qnameID < state->stringTable.sizeLocalStrings) {
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
errn = exiAddStringValue(&(state->stringTable), sv, qnameID);
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
state->stringTable.numberOfLocalStrings[qnameID]++;
|
||||
/* printf("\tSV %d: lv=%d and gv=%d \n", qnameID, state->numberOfLocalStrings[qnameID], state->numberOfGlobalStrings);*/
|
||||
} else {
|
||||
/* currently we do support a set of qnames only */
|
||||
errn = EXI_ERROR_OUT_OF_QNAMES;
|
||||
}
|
||||
#endif /* EXI_OPTION_VALUE_MAX_LENGTH != 0 */
|
||||
#endif /* EXI_OPTION_VALUE_PARTITION_CAPACITY != 0 */
|
||||
|
||||
return errn;
|
||||
}
|
||||
#ifndef __GNUC__
|
||||
#pragma warning( default : 4100 ) /* warning unreferenced parameter 'qnameID' */
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
|
||||
int exi_appHand_PushStack(exi_state_t* state, int16_t newState, uint16_t qnameID) {
|
||||
int errn = 0;
|
||||
/* eqname_t* eqn*/
|
||||
if ((state->stackIndex + 1) < EXI_ELEMENT_STACK_SIZE) {
|
||||
state->grammarStack[++state->stackIndex] = newState;
|
||||
/* qname */
|
||||
state->elementStack[state->stackIndex] = qnameID;
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_GRAMMAR_STACK;
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
int exi_appHand_PopStack(exi_state_t* state) {
|
||||
int errn = 0;
|
||||
if (state->stackIndex >= 1) {
|
||||
state->stackIndex--;
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
int exi_appHand_HandleXsiNilTrue(exi_state_t* state) {
|
||||
switch (state->grammarStack[state->stackIndex]) {
|
||||
|
||||
}
|
||||
|
||||
return EXI_ERROR_UNEXPECTED_ATTRIBUTE_XSI_NIL;
|
||||
}
|
||||
|
||||
int exi_appHand_HandleXsiType(exi_state_t* state, exi_eqname_t* xsiType) {
|
||||
switch(xsiType->namespaceURI) {
|
||||
case 0:
|
||||
switch(xsiType->localPart) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
switch(xsiType->localPart) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
switch(xsiType->localPart) {
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
switch(xsiType->localPart) {
|
||||
case 0:
|
||||
/* {3}0,ENTITIES */
|
||||
state->grammarStack[state->stackIndex] = 47;
|
||||
break;
|
||||
case 1:
|
||||
/* {3}1,ENTITY */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 2:
|
||||
/* {3}2,ID */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 3:
|
||||
/* {3}3,IDREF */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 4:
|
||||
/* {3}4,IDREFS */
|
||||
state->grammarStack[state->stackIndex] = 47;
|
||||
break;
|
||||
case 5:
|
||||
/* {3}5,NCName */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 6:
|
||||
/* {3}6,NMTOKEN */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 7:
|
||||
/* {3}7,NMTOKENS */
|
||||
state->grammarStack[state->stackIndex] = 47;
|
||||
break;
|
||||
case 8:
|
||||
/* {3}8,NOTATION */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 9:
|
||||
/* {3}9,Name */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 10:
|
||||
/* {3}10,QName */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 11:
|
||||
/* {3}11,anySimpleType */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 12:
|
||||
/* {3}12,anyType */
|
||||
state->grammarStack[state->stackIndex] = 49;
|
||||
break;
|
||||
case 13:
|
||||
/* {3}13,anyURI */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 14:
|
||||
/* {3}14,base64Binary */
|
||||
state->grammarStack[state->stackIndex] = 51;
|
||||
break;
|
||||
case 15:
|
||||
/* {3}15,boolean */
|
||||
state->grammarStack[state->stackIndex] = 53;
|
||||
break;
|
||||
case 16:
|
||||
/* {3}16,byte */
|
||||
state->grammarStack[state->stackIndex] = 55;
|
||||
break;
|
||||
case 17:
|
||||
/* {3}17,date */
|
||||
state->grammarStack[state->stackIndex] = 57;
|
||||
break;
|
||||
case 18:
|
||||
/* {3}18,dateTime */
|
||||
state->grammarStack[state->stackIndex] = 59;
|
||||
break;
|
||||
case 19:
|
||||
/* {3}19,decimal */
|
||||
state->grammarStack[state->stackIndex] = 61;
|
||||
break;
|
||||
case 20:
|
||||
/* {3}20,double */
|
||||
state->grammarStack[state->stackIndex] = 63;
|
||||
break;
|
||||
case 21:
|
||||
/* {3}21,duration */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 22:
|
||||
/* {3}22,float */
|
||||
state->grammarStack[state->stackIndex] = 63;
|
||||
break;
|
||||
case 23:
|
||||
/* {3}23,gDay */
|
||||
state->grammarStack[state->stackIndex] = 65;
|
||||
break;
|
||||
case 24:
|
||||
/* {3}24,gMonth */
|
||||
state->grammarStack[state->stackIndex] = 67;
|
||||
break;
|
||||
case 25:
|
||||
/* {3}25,gMonthDay */
|
||||
state->grammarStack[state->stackIndex] = 69;
|
||||
break;
|
||||
case 26:
|
||||
/* {3}26,gYear */
|
||||
state->grammarStack[state->stackIndex] = 71;
|
||||
break;
|
||||
case 27:
|
||||
/* {3}27,gYearMonth */
|
||||
state->grammarStack[state->stackIndex] = 73;
|
||||
break;
|
||||
case 28:
|
||||
/* {3}28,hexBinary */
|
||||
state->grammarStack[state->stackIndex] = 75;
|
||||
break;
|
||||
case 29:
|
||||
/* {3}29,int */
|
||||
state->grammarStack[state->stackIndex] = 77;
|
||||
break;
|
||||
case 30:
|
||||
/* {3}30,integer */
|
||||
state->grammarStack[state->stackIndex] = 77;
|
||||
break;
|
||||
case 31:
|
||||
/* {3}31,language */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 32:
|
||||
/* {3}32,long */
|
||||
state->grammarStack[state->stackIndex] = 77;
|
||||
break;
|
||||
case 33:
|
||||
/* {3}33,negativeInteger */
|
||||
state->grammarStack[state->stackIndex] = 77;
|
||||
break;
|
||||
case 34:
|
||||
/* {3}34,nonNegativeInteger */
|
||||
state->grammarStack[state->stackIndex] = 79;
|
||||
break;
|
||||
case 35:
|
||||
/* {3}35,nonPositiveInteger */
|
||||
state->grammarStack[state->stackIndex] = 77;
|
||||
break;
|
||||
case 36:
|
||||
/* {3}36,normalizedString */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 37:
|
||||
/* {3}37,positiveInteger */
|
||||
state->grammarStack[state->stackIndex] = 79;
|
||||
break;
|
||||
case 38:
|
||||
/* {3}38,short */
|
||||
state->grammarStack[state->stackIndex] = 77;
|
||||
break;
|
||||
case 39:
|
||||
/* {3}39,string */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 40:
|
||||
/* {3}40,time */
|
||||
state->grammarStack[state->stackIndex] = 80;
|
||||
break;
|
||||
case 41:
|
||||
/* {3}41,token */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 42:
|
||||
/* {3}42,unsignedByte */
|
||||
state->grammarStack[state->stackIndex] = 13;
|
||||
break;
|
||||
case 43:
|
||||
/* {3}43,unsignedInt */
|
||||
state->grammarStack[state->stackIndex] = 79;
|
||||
break;
|
||||
case 44:
|
||||
/* {3}44,unsignedLong */
|
||||
state->grammarStack[state->stackIndex] = 79;
|
||||
break;
|
||||
case 45:
|
||||
/* {3}45,unsignedShort */
|
||||
state->grammarStack[state->stackIndex] = 79;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
switch(xsiType->localPart) {
|
||||
case 0:
|
||||
/* {4}0,AppProtocolType */
|
||||
state->grammarStack[state->stackIndex] = 3;
|
||||
break;
|
||||
case 1:
|
||||
/* {4}1,idType */
|
||||
state->grammarStack[state->stackIndex] = 13;
|
||||
break;
|
||||
case 2:
|
||||
/* {4}2,priorityType */
|
||||
state->grammarStack[state->stackIndex] = 16;
|
||||
break;
|
||||
case 3:
|
||||
/* {4}3,protocolNameType */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 4:
|
||||
/* {4}4,protocolNamespaceType */
|
||||
state->grammarStack[state->stackIndex] = 4;
|
||||
break;
|
||||
case 5:
|
||||
/* {4}5,responseCodeType */
|
||||
state->grammarStack[state->stackIndex] = 41;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int exi_appHand_RetrieveAndPushGlobalGrammar(exi_state_t* state, uint16_t qnameID) {
|
||||
int errn = EXI_ERROR_OUT_OF_RUNTIME_GRAMMAR_STACK;
|
||||
int i;
|
||||
int found = 1;
|
||||
|
||||
/* schema-informed global element --> Stack ID */
|
||||
switch(qnameID) {
|
||||
case 65:
|
||||
errn = exi_appHand_PushStack(state, 2, 65);
|
||||
break;
|
||||
case 66:
|
||||
errn = exi_appHand_PushStack(state, 40, 66);
|
||||
break;
|
||||
|
||||
default:
|
||||
found = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
/* retrieve existing grammar for qname if any available */
|
||||
for(i=0; i<state->numberOfRuntimeGrammars && !found; i+=2) {
|
||||
if( state->runtimeGrammars[i].qnameID == qnameID ) {
|
||||
/* runtime grammar exists already */
|
||||
|
||||
/* push element stack */
|
||||
errn = exi_appHand_PushStack(state, (int16_t)((i+1) * (-1)), qnameID);
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* create new runtime grammars if possible and not found already */
|
||||
if(!found && (state->numberOfRuntimeGrammars + 2) < (MAX_NUMBER_OF_RUNTIME_ELEMENTS * 2) ) {
|
||||
/* StartTagContent StackIds: -1, -3, -5, ... */
|
||||
state->runtimeGrammars[state->numberOfRuntimeGrammars].qnameID = qnameID;
|
||||
state->runtimeGrammars[state->numberOfRuntimeGrammars].numberOfProductions = 0;
|
||||
state->runtimeGrammars[state->numberOfRuntimeGrammars].hasXsiType = 0;
|
||||
state->runtimeGrammars[state->numberOfRuntimeGrammars].hasEE = 0;
|
||||
/* ElementContent StackIds: -2, -4, -6, ... */
|
||||
state->runtimeGrammars[state->numberOfRuntimeGrammars+1].qnameID = qnameID;
|
||||
state->runtimeGrammars[state->numberOfRuntimeGrammars+1].numberOfProductions = 1;
|
||||
state->runtimeGrammars[state->numberOfRuntimeGrammars+1].hasXsiType = 0;
|
||||
state->runtimeGrammars[state->numberOfRuntimeGrammars+1].hasEE = 1;
|
||||
|
||||
/* push element stack */
|
||||
errn = exi_appHand_PushStack(state, (int16_t)((state->numberOfRuntimeGrammars+1) * (-1)), qnameID);
|
||||
|
||||
state->numberOfRuntimeGrammars = (uint16_t)(state->numberOfRuntimeGrammars + 2);
|
||||
}
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
#ifndef __GNUC__
|
||||
#pragma warning( disable : 4100 ) /* warning unreferenced parameter 'qnameID' */
|
||||
#endif /* __GNUC__ */
|
||||
int exi_appHand_LearnAttribute(exi_state_t* state, uint16_t uriID, uint16_t localID) {
|
||||
int errn = 0;
|
||||
int16_t currentID = state->grammarStack[state->stackIndex];
|
||||
int16_t runtimeID;
|
||||
|
||||
if (currentID < 0) {
|
||||
runtimeID = (int16_t)((currentID+1)*(-1));
|
||||
|
||||
if (uriID == 2 && localID == 1 ) {
|
||||
/* xsi:type: learned just once */
|
||||
if(!state->runtimeGrammars[runtimeID].hasXsiType) {
|
||||
/* hasXsiType stores production position PLUS 1 (one) */
|
||||
state->runtimeGrammars[runtimeID].hasXsiType = ++state->runtimeGrammars[runtimeID].numberOfProductions;
|
||||
}
|
||||
} else {
|
||||
/* increment production count */
|
||||
++state->runtimeGrammars[runtimeID].numberOfProductions;
|
||||
/* TODO store production information. Note: not necessary in restricted profile */
|
||||
}
|
||||
} else {
|
||||
/* schema-informed grammar do no evolve */
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
#ifndef __GNUC__
|
||||
#pragma warning( default : 4100 ) /* warning unreferenced parameter 'qnameID' */
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
int exi_appHand_LearnEndElement(exi_state_t* state) {
|
||||
int errn = 0;
|
||||
int16_t currentID = state->grammarStack[state->stackIndex];
|
||||
int16_t runtimeID;
|
||||
|
||||
if (currentID < 0) {
|
||||
if( exi_appHand_IsStartContent(currentID) ) {
|
||||
/* check whether EE with an event code of length 1 does not exist in the current element grammar already */
|
||||
runtimeID = (int16_t)((currentID+1)*(-1));
|
||||
|
||||
if(!state->runtimeGrammars[runtimeID].hasEE) {
|
||||
/* hasXsiType stores production position PLUS 1 (one) */
|
||||
state->runtimeGrammars[runtimeID].hasEE = ++state->runtimeGrammars[runtimeID].numberOfProductions;
|
||||
}
|
||||
} else {
|
||||
/* ElementContent disposes already of an EE event */
|
||||
}
|
||||
} else {
|
||||
/* schema-informed grammar do no evolve */
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* RUNTIME RULES
|
||||
* each rule has 2 ids and counts backwards from -1, -2, ...
|
||||
* 1) StartTagContent (e.g., -1, -3, -5, ...)
|
||||
* 2) ElementContent (e.g., -2, -4, -6)
|
||||
*
|
||||
*/
|
||||
|
||||
int exi_appHand_IsStartContent(int16_t ruleID) {
|
||||
/* Note: only for built-in element grammars */
|
||||
return (ruleID % 2 != 0);
|
||||
}
|
||||
|
||||
int exi_appHand_MoveToElementContentRule(exi_state_t* state) {
|
||||
int errn = 0;
|
||||
int16_t currentID = state->grammarStack[state->stackIndex];
|
||||
int found = 1;
|
||||
|
||||
|
||||
switch (currentID) {
|
||||
case 65:
|
||||
/* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
state->grammarStack[state->stackIndex] = 66;
|
||||
break;
|
||||
case 41:
|
||||
/* FirstStartTag[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */
|
||||
state->grammarStack[state->stackIndex] = 42;
|
||||
break;
|
||||
case 40:
|
||||
/* FirstStartTag[START_ELEMENT(ResponseCode)] --> Element[START_ELEMENT(ResponseCode)] */
|
||||
state->grammarStack[state->stackIndex] = 44;
|
||||
break;
|
||||
case 4:
|
||||
/* FirstStartTag[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */
|
||||
state->grammarStack[state->stackIndex] = 7;
|
||||
break;
|
||||
case 77:
|
||||
/* FirstStartTag[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */
|
||||
state->grammarStack[state->stackIndex] = 78;
|
||||
break;
|
||||
case 2:
|
||||
/* FirstStartTag[START_ELEMENT(AppProtocol)] --> Element[START_ELEMENT(AppProtocol)] */
|
||||
state->grammarStack[state->stackIndex] = 38;
|
||||
break;
|
||||
case 75:
|
||||
/* FirstStartTag[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */
|
||||
state->grammarStack[state->stackIndex] = 76;
|
||||
break;
|
||||
case 0:
|
||||
/* Document[START_DOCUMENT] --> Document[START_DOCUMENT] */
|
||||
case 1:
|
||||
/* DocContent[START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC] --> DocContent[START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC] */
|
||||
case 5:
|
||||
/* Element[END_ELEMENT] --> Element[END_ELEMENT] */
|
||||
case 6:
|
||||
/* Element[] --> Element[] */
|
||||
case 7:
|
||||
/* Element[CHARACTERS[STRING]] --> Element[CHARACTERS[STRING]] */
|
||||
case 8:
|
||||
/* Element[START_ELEMENT(VersionNumberMajor)] --> Element[START_ELEMENT(VersionNumberMajor)] */
|
||||
case 10:
|
||||
/* Element[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */
|
||||
case 11:
|
||||
/* Element[START_ELEMENT(VersionNumberMinor)] --> Element[START_ELEMENT(VersionNumberMinor)] */
|
||||
case 12:
|
||||
/* Element[START_ELEMENT(SchemaID)] --> Element[START_ELEMENT(SchemaID)] */
|
||||
case 14:
|
||||
/* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
case 15:
|
||||
/* Element[START_ELEMENT(Priority)] --> Element[START_ELEMENT(Priority)] */
|
||||
case 17:
|
||||
/* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
case 18:
|
||||
/* Element[START_ELEMENT(ProtocolNamespace)] --> Element[START_ELEMENT(ProtocolNamespace)] */
|
||||
case 19:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 20:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 21:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 22:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 23:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 24:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 25:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 26:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 27:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 28:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 29:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 30:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 31:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 32:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 33:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 34:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 35:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 36:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 37:
|
||||
/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] --> Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
|
||||
case 38:
|
||||
/* Element[START_ELEMENT(AppProtocol)] --> Element[START_ELEMENT(AppProtocol)] */
|
||||
case 39:
|
||||
/* DocEnd[END_DOCUMENT] --> DocEnd[END_DOCUMENT] */
|
||||
case 42:
|
||||
/* Element[CHARACTERS[ENUMERATION]] --> Element[CHARACTERS[ENUMERATION]] */
|
||||
case 43:
|
||||
/* Element[START_ELEMENT(SchemaID), END_ELEMENT] --> Element[START_ELEMENT(SchemaID), END_ELEMENT] */
|
||||
case 44:
|
||||
/* Element[START_ELEMENT(ResponseCode)] --> Element[START_ELEMENT(ResponseCode)] */
|
||||
case 45:
|
||||
/* Fragment[START_DOCUMENT] --> Fragment[START_DOCUMENT] */
|
||||
case 46:
|
||||
/* FragmentContent[START_ELEMENT(AppProtocol), START_ELEMENT(Priority), START_ELEMENT(ProtocolNamespace), START_ELEMENT(ResponseCode), START_ELEMENT(SchemaID), START_ELEMENT(VersionNumberMajor), START_ELEMENT(VersionNumberMinor), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC, END_DOCUMENT] --> FragmentContent[START_ELEMENT(AppProtocol), START_ELEMENT(Priority), START_ELEMENT(ProtocolNamespace), START_ELEMENT(ResponseCode), START_ELEMENT(SchemaID), START_ELEMENT(VersionNumberMajor), START_ELEMENT(VersionNumberMinor), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC, END_DOCUMENT] */
|
||||
case 48:
|
||||
/* Element[CHARACTERS[LIST]] --> Element[CHARACTERS[LIST]] */
|
||||
case 50:
|
||||
/* Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */
|
||||
case 52:
|
||||
/* Element[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */
|
||||
case 54:
|
||||
/* Element[CHARACTERS[BOOLEAN]] --> Element[CHARACTERS[BOOLEAN]] */
|
||||
case 56:
|
||||
/* Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
case 58:
|
||||
/* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
case 60:
|
||||
/* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
case 62:
|
||||
/* Element[CHARACTERS[DECIMAL]] --> Element[CHARACTERS[DECIMAL]] */
|
||||
case 64:
|
||||
/* Element[CHARACTERS[FLOAT]] --> Element[CHARACTERS[FLOAT]] */
|
||||
case 66:
|
||||
/* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
case 68:
|
||||
/* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
case 70:
|
||||
/* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
case 72:
|
||||
/* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
case 74:
|
||||
/* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
case 76:
|
||||
/* Element[CHARACTERS[BINARY_HEX]] --> Element[CHARACTERS[BINARY_HEX]] */
|
||||
case 78:
|
||||
/* Element[CHARACTERS[INTEGER]] --> Element[CHARACTERS[INTEGER]] */
|
||||
case 81:
|
||||
/* Element[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
break;
|
||||
case 51:
|
||||
/* FirstStartTag[CHARACTERS[BINARY_BASE64]] --> Element[CHARACTERS[BINARY_BASE64]] */
|
||||
state->grammarStack[state->stackIndex] = 52;
|
||||
break;
|
||||
case 73:
|
||||
/* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
state->grammarStack[state->stackIndex] = 74;
|
||||
break;
|
||||
case 80:
|
||||
/* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
state->grammarStack[state->stackIndex] = 81;
|
||||
break;
|
||||
case 9:
|
||||
/* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */
|
||||
case 79:
|
||||
/* FirstStartTag[CHARACTERS[UNSIGNED_INTEGER]] --> Element[CHARACTERS[UNSIGNED_INTEGER]] */
|
||||
state->grammarStack[state->stackIndex] = 10;
|
||||
break;
|
||||
case 67:
|
||||
/* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
state->grammarStack[state->stackIndex] = 68;
|
||||
break;
|
||||
case 47:
|
||||
/* FirstStartTag[CHARACTERS[LIST]] --> Element[CHARACTERS[LIST]] */
|
||||
state->grammarStack[state->stackIndex] = 48;
|
||||
break;
|
||||
case 13:
|
||||
/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
state->grammarStack[state->stackIndex] = 14;
|
||||
break;
|
||||
case 63:
|
||||
/* FirstStartTag[CHARACTERS[FLOAT]] --> Element[CHARACTERS[FLOAT]] */
|
||||
state->grammarStack[state->stackIndex] = 64;
|
||||
break;
|
||||
case 3:
|
||||
/* FirstStartTag[START_ELEMENT(ProtocolNamespace)] --> Element[START_ELEMENT(ProtocolNamespace)] */
|
||||
state->grammarStack[state->stackIndex] = 18;
|
||||
break;
|
||||
case 53:
|
||||
/* FirstStartTag[CHARACTERS[BOOLEAN]] --> Element[CHARACTERS[BOOLEAN]] */
|
||||
state->grammarStack[state->stackIndex] = 54;
|
||||
break;
|
||||
case 16:
|
||||
/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
state->grammarStack[state->stackIndex] = 17;
|
||||
break;
|
||||
case 59:
|
||||
/* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
state->grammarStack[state->stackIndex] = 60;
|
||||
break;
|
||||
case 55:
|
||||
/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] --> Element[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
|
||||
state->grammarStack[state->stackIndex] = 56;
|
||||
break;
|
||||
case 69:
|
||||
/* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
state->grammarStack[state->stackIndex] = 70;
|
||||
break;
|
||||
case 61:
|
||||
/* FirstStartTag[CHARACTERS[DECIMAL]] --> Element[CHARACTERS[DECIMAL]] */
|
||||
state->grammarStack[state->stackIndex] = 62;
|
||||
break;
|
||||
case 49:
|
||||
/* FirstStartTag[ATTRIBUTE_GENERIC, START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] --> Element[START_ELEMENT_GENERIC, END_ELEMENT, CHARACTERS_GENERIC[STRING]] */
|
||||
state->grammarStack[state->stackIndex] = 50;
|
||||
break;
|
||||
case 57:
|
||||
/* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
state->grammarStack[state->stackIndex] = 58;
|
||||
break;
|
||||
case 71:
|
||||
/* FirstStartTag[CHARACTERS[DATETIME]] --> Element[CHARACTERS[DATETIME]] */
|
||||
state->grammarStack[state->stackIndex] = 72;
|
||||
break;
|
||||
|
||||
default:
|
||||
found = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if(!found) {
|
||||
if (currentID < 0) {
|
||||
if(exi_appHand_IsStartContent(currentID)) {
|
||||
state->grammarStack[state->stackIndex] = (int16_t)(currentID - 1);
|
||||
}
|
||||
} else {
|
||||
errn = EXI_ERROR_UNEXPECTED_ATTRIBUTE_MOVE_TO_CONTENT_RULE;
|
||||
}
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/appHandshake/V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_appHand_CODER_H
|
||||
#define EXI_appHand_CODER_H
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
#define DOCUMENT 0
|
||||
#define DOC_CONTENT 1
|
||||
#define DOC_END 39
|
||||
|
||||
|
||||
/* increments global and local string count */
|
||||
/* in case of dynamic memory string is collected */
|
||||
int exi_appHand_AddStringValue(exi_state_t* state, exi_string_ucs_t* sv, uint16_t qnameID);
|
||||
|
||||
int exi_appHand_PushStack(exi_state_t* state, int16_t newState, uint16_t qnameID);
|
||||
|
||||
int exi_appHand_PopStack(exi_state_t* state);
|
||||
|
||||
int exi_appHand_HandleXsiNilTrue(exi_state_t* state);
|
||||
|
||||
int exi_appHand_HandleXsiType(exi_state_t* state, exi_eqname_t* xsiType);
|
||||
|
||||
int exi_appHand_RetrieveAndPushGlobalGrammar(exi_state_t* state, uint16_t qnameID);
|
||||
|
||||
int exi_appHand_LearnAttribute(exi_state_t* state, uint16_t uriID, uint16_t localID);
|
||||
|
||||
int exi_appHand_LearnEndElement(exi_state_t* state);
|
||||
|
||||
int exi_appHand_IsStartContent(int16_t ruleID);
|
||||
|
||||
int exi_appHand_MoveToElementContentRule(exi_state_t* state);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,225 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/appHandshake/V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_appHand_DECODER_H
|
||||
#define EXI_appHand_DECODER_H
|
||||
|
||||
/**
|
||||
* \file EXIDecoder.h
|
||||
* \brief EXI Decoder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \brief Initialize EXI decoder
|
||||
*
|
||||
* Resets & initializes the EXI decoder.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param runtimeTable Runtime name-tables
|
||||
* \param stringTable String table
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandInitDecoder(bitstream_t* stream, exi_state_t* state,
|
||||
exi_name_table_runtime_t runtimeTable, exi_value_table_t stringTable);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Reports last decoded qualified name
|
||||
*
|
||||
* Note: Qualified name only available for previously unknown qname. Otherwise make use of name table entries.
|
||||
*
|
||||
* \param qname Qualified name
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandGetLastQName(exi_qname_t** qname);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes next event
|
||||
*
|
||||
* Inspects EXI stream and decodes next EXI event.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param nextEvent Next event
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandDecodeNextEvent(bitstream_t* stream,
|
||||
exi_state_t* state, exi_event_t* nextEvent);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes StartDocument (SD) event
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandDecodeStartDocument(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Decodes EndDocument (ED) event
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandDecodeEndDocument(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Decodes StartElement (SE) event
|
||||
*
|
||||
* Note: The first time a qnameID is larger than schema-informed NUMBER_OF_QNAMES it is possible to retrieve the qname by calling GetLastQName(...).
|
||||
* It is up to the caller to track qnames.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified Name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int
|
||||
exiappHandDecodeStartElement(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t* qnameID);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes EndElement (EE) event
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified Name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandDecodeEndElement(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t* qnameID);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes Characters (CH) event.
|
||||
*
|
||||
* Reports characters value.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandDecodeCharacters(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes Attribute (AT) event.
|
||||
*
|
||||
* Reports attribute qname and value.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified Name ID
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandDecodeAttribute(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t* qnameID, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes attribute xsi:nil
|
||||
*
|
||||
* Reports value.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandDecodeAttributeXsiNil(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes attribute xsi:type
|
||||
*
|
||||
* Reports value.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandDecodeAttributeXsiType(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes attribute/characters list value
|
||||
*
|
||||
* List values are special and are processed one by one.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified Name ID
|
||||
* \param val List value
|
||||
* \param lt List type
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandDecodeListValue(bitstream_t* stream, exi_state_t* state, uint16_t qnameID,
|
||||
exi_value_t* val, exi_list_t lt);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,274 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/appHandshake/V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_appHand_ENCODER_H
|
||||
#define EXI_appHand_ENCODER_H
|
||||
|
||||
/**
|
||||
* \file EXIEncoder.h
|
||||
* \brief EXI Encoder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "appHandEXIEncoder.h"
|
||||
|
||||
/**
|
||||
* \brief Initialize EXI encoder
|
||||
*
|
||||
* Resets & initializes the EXI encoder.
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param runtimeTable Runtime name-tables
|
||||
* \param stringTable String table
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandInitEncoder(bitstream_t* stream, exi_state_t* state,
|
||||
exi_name_table_runtime_t runtimeTable, exi_value_table_t stringTable);
|
||||
|
||||
/**
|
||||
* \brief Reports the beginning of a set of XML events
|
||||
*
|
||||
* see EXI StartDocument (SD) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeStartDocument(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Reports the end of a set of XML events
|
||||
*
|
||||
* see EXI EndDocument (ED) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeEndDocument(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Supplies the start of a known element
|
||||
*
|
||||
* Provides access to the namespace URI and local name of the start tag by providing qnameID.
|
||||
* Note: Both, namespace URI and local name are known (schema-informed) or have been encoded before.
|
||||
* see EXI StartElement (SE) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID qualified name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int
|
||||
exiappHandEncodeStartElement(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t qnameID);
|
||||
|
||||
/**
|
||||
* \brief Supplies the start of an element where the namespace is known
|
||||
*
|
||||
* Note: Namespace URI is known (schema-informed) or has been encoded before while local name is unknown.
|
||||
* see EXI StartElement (SE) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param namespaceUriID namespace URI ID
|
||||
* \param localName local name as string
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeStartElementNS(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t namespaceUriID,
|
||||
exi_string_ucs_t* localName);
|
||||
|
||||
/**
|
||||
* \brief Supplies the start of an element where the namespace and the local name is unknown
|
||||
*
|
||||
* Note: Neither namespace URI nor local name is known.
|
||||
* see EXI StartElement (SE) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param namespaceUri namespace URI as string
|
||||
* \param localName local name as string
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeStartElementGeneric(bitstream_t* stream,
|
||||
exi_state_t* state, exi_string_ucs_t* namespaceUri,
|
||||
exi_string_ucs_t* localName);
|
||||
|
||||
/**
|
||||
* \brief Supplies the end tag of an element
|
||||
*
|
||||
* see EXI EndElement (EE) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeEndElement(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Supplies characters value
|
||||
*
|
||||
* Note: Special handling for list value.
|
||||
* see EXI Characters (CH) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeCharacters(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
/**
|
||||
* \brief Supplies an attribute qname and value
|
||||
*
|
||||
* Note: Special handling for list value.
|
||||
* see EXI Attribute (AT) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID qualified name ID
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeAttribute(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t qnameID, exi_value_t* val);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Supplies an attribute qname and value where the namespace is known
|
||||
*
|
||||
* Note: Special handling for list value.
|
||||
* see EXI Attribute (AT) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param namespaceUriID Qualified namespace URI ID
|
||||
* \param localName Qualified localname as String
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeAttributeNS(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t namespaceUriID,
|
||||
exi_string_ucs_t* localName, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Supplies an attribute qname and value where the namespace and the local name is unknown
|
||||
*
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param namespaceUri namespace URI as string
|
||||
* \param localName local name as string
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeAttributeGeneric(bitstream_t* stream,
|
||||
exi_state_t* state, exi_string_ucs_t* namespaceUri,
|
||||
exi_string_ucs_t* localName, exi_value_t* val);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Supplies an xsi:nil attribute
|
||||
*
|
||||
* see EXI Attribute (AT) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeAttributeXsiNil(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
/**
|
||||
* \brief Supplies an xsi:type attribute
|
||||
*
|
||||
* see EXI Attribute (AT) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeAttributeXsiType(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
/**
|
||||
* \brief Supplies list value for characters and attribute event
|
||||
*
|
||||
* List values are special given that first the number and type of entry needs to be passed (element/attribute event) and then one by one the actual values.
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID qualified name ID
|
||||
* \param val one list value
|
||||
* \param lt list type
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandEncodeListValue(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t qnameID, exi_value_t* val, exi_list_t lt);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/appHandshake/V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef EXI_appHand_NAME_TABLE_ENTRIES_C
|
||||
#define EXI_appHand_NAME_TABLE_ENTRIES_C
|
||||
|
||||
#include "appHandNameTableEntries.h"
|
||||
|
||||
|
||||
|
||||
/* ==================================== */
|
||||
/* String Table Population */
|
||||
|
||||
/* localName entries for URI '', id = 0 */
|
||||
/*
|
||||
"AppProtocol", "Priority", "ProtocolNamespace", "ResponseCode", "SchemaID",
|
||||
"VersionNumberMajor", "VersionNumberMinor"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'http://www.w3.org/XML/1998/namespace', id = 1 */
|
||||
/*
|
||||
"base", "id", "lang", "space"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'http://www.w3.org/2001/XMLSchema-instance', id = 2 */
|
||||
/*
|
||||
"nil", "type"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'http://www.w3.org/2001/XMLSchema', id = 3 */
|
||||
/*
|
||||
"ENTITIES", "ENTITY", "ID", "IDREF", "IDREFS",
|
||||
"NCName", "NMTOKEN", "NMTOKENS", "NOTATION", "Name",
|
||||
"QName", "anySimpleType", "anyType", "anyURI", "base64Binary",
|
||||
"boolean", "byte", "date", "dateTime", "decimal",
|
||||
"double", "duration", "float", "gDay", "gMonth",
|
||||
"gMonthDay", "gYear", "gYearMonth", "hexBinary", "int",
|
||||
"integer", "language", "long", "negativeInteger", "nonNegativeInteger",
|
||||
"nonPositiveInteger", "normalizedString", "positiveInteger", "short", "string",
|
||||
"time", "token", "unsignedByte", "unsignedInt", "unsignedLong",
|
||||
"unsignedShort"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'urn:iso:15118:2:2010:AppProtocol', id = 4 */
|
||||
/*
|
||||
"AppProtocolType", "idType", "priorityType", "protocolNameType", "protocolNamespaceType",
|
||||
"responseCodeType", "supportedAppProtocolReq", "supportedAppProtocolRes"
|
||||
*/
|
||||
|
||||
|
||||
/* number of local-name entries per URI */
|
||||
static uint16_t localNames[5] = {
|
||||
/* '' */
|
||||
7,
|
||||
/* 'http://www.w3.org/XML/1998/namespace' */
|
||||
4,
|
||||
/* 'http://www.w3.org/2001/XMLSchema-instance' */
|
||||
2,
|
||||
/* 'http://www.w3.org/2001/XMLSchema' */
|
||||
46,
|
||||
/* 'urn:iso:15118:2:2010:AppProtocol' */
|
||||
8
|
||||
};
|
||||
|
||||
|
||||
exi_name_table_prepopulated_t exiappHandNameTablePrepopulated = { 5, localNames };
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/appHandshake/V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_appHand_QNAME_DEFINES_H
|
||||
#define EXI_appHand_QNAME_DEFINES_H
|
||||
|
||||
/** Number of pre-populated qnames */
|
||||
#define EXI_appHandNUMBER_OF_PREPOPULATED_QNAMES 67
|
||||
|
||||
/** Number of runtime qnames */
|
||||
#define EXI_appHandMAX_NUMBER_OF_SUPPORTED_RUNTIMES_QNAMES 100
|
||||
|
||||
/** Number of overall qnames (pre-populated from schema and runtime qnames) */
|
||||
#define EXI_appHandMAX_NUMBER_OF_QNAMES (EXI_appHandNUMBER_OF_PREPOPULATED_QNAMES + EXI_appHandMAX_NUMBER_OF_SUPPORTED_RUNTIMES_QNAMES)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,227 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/appHandshake/V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef EXI_appHand_QNAMES_C
|
||||
#define EXI_appHand_QNAMES_C
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "ErrorCodes.h"
|
||||
#include "appHandQNameDefines.h"
|
||||
|
||||
/* qname is a composition of namespaceURI(ID) and localPart(ID) */
|
||||
static exi_eqname_t qnames[EXI_appHandMAX_NUMBER_OF_QNAMES] = {
|
||||
/* qnameID == 0: AppProtocol */
|
||||
{0, 0},
|
||||
/* qnameID == 1: Priority */
|
||||
{0, 1},
|
||||
/* qnameID == 2: ProtocolNamespace */
|
||||
{0, 2},
|
||||
/* qnameID == 3: ResponseCode */
|
||||
{0, 3},
|
||||
/* qnameID == 4: SchemaID */
|
||||
{0, 4},
|
||||
/* qnameID == 5: VersionNumberMajor */
|
||||
{0, 5},
|
||||
/* qnameID == 6: VersionNumberMinor */
|
||||
{0, 6},
|
||||
/* qnameID == 7: {http://www.w3.org/XML/1998/namespace}base */
|
||||
{1, 0},
|
||||
/* qnameID == 8: {http://www.w3.org/XML/1998/namespace}id */
|
||||
{1, 1},
|
||||
/* qnameID == 9: {http://www.w3.org/XML/1998/namespace}lang */
|
||||
{1, 2},
|
||||
/* qnameID == 10: {http://www.w3.org/XML/1998/namespace}space */
|
||||
{1, 3},
|
||||
/* qnameID == 11: {http://www.w3.org/2001/XMLSchema-instance}nil */
|
||||
{2, 0},
|
||||
/* qnameID == 12: {http://www.w3.org/2001/XMLSchema-instance}type */
|
||||
{2, 1},
|
||||
/* qnameID == 13: {http://www.w3.org/2001/XMLSchema}ENTITIES */
|
||||
{3, 0},
|
||||
/* qnameID == 14: {http://www.w3.org/2001/XMLSchema}ENTITY */
|
||||
{3, 1},
|
||||
/* qnameID == 15: {http://www.w3.org/2001/XMLSchema}ID */
|
||||
{3, 2},
|
||||
/* qnameID == 16: {http://www.w3.org/2001/XMLSchema}IDREF */
|
||||
{3, 3},
|
||||
/* qnameID == 17: {http://www.w3.org/2001/XMLSchema}IDREFS */
|
||||
{3, 4},
|
||||
/* qnameID == 18: {http://www.w3.org/2001/XMLSchema}NCName */
|
||||
{3, 5},
|
||||
/* qnameID == 19: {http://www.w3.org/2001/XMLSchema}NMTOKEN */
|
||||
{3, 6},
|
||||
/* qnameID == 20: {http://www.w3.org/2001/XMLSchema}NMTOKENS */
|
||||
{3, 7},
|
||||
/* qnameID == 21: {http://www.w3.org/2001/XMLSchema}NOTATION */
|
||||
{3, 8},
|
||||
/* qnameID == 22: {http://www.w3.org/2001/XMLSchema}Name */
|
||||
{3, 9},
|
||||
/* qnameID == 23: {http://www.w3.org/2001/XMLSchema}QName */
|
||||
{3, 10},
|
||||
/* qnameID == 24: {http://www.w3.org/2001/XMLSchema}anySimpleType */
|
||||
{3, 11},
|
||||
/* qnameID == 25: {http://www.w3.org/2001/XMLSchema}anyType */
|
||||
{3, 12},
|
||||
/* qnameID == 26: {http://www.w3.org/2001/XMLSchema}anyURI */
|
||||
{3, 13},
|
||||
/* qnameID == 27: {http://www.w3.org/2001/XMLSchema}base64Binary */
|
||||
{3, 14},
|
||||
/* qnameID == 28: {http://www.w3.org/2001/XMLSchema}boolean */
|
||||
{3, 15},
|
||||
/* qnameID == 29: {http://www.w3.org/2001/XMLSchema}byte */
|
||||
{3, 16},
|
||||
/* qnameID == 30: {http://www.w3.org/2001/XMLSchema}date */
|
||||
{3, 17},
|
||||
/* qnameID == 31: {http://www.w3.org/2001/XMLSchema}dateTime */
|
||||
{3, 18},
|
||||
/* qnameID == 32: {http://www.w3.org/2001/XMLSchema}decimal */
|
||||
{3, 19},
|
||||
/* qnameID == 33: {http://www.w3.org/2001/XMLSchema}double */
|
||||
{3, 20},
|
||||
/* qnameID == 34: {http://www.w3.org/2001/XMLSchema}duration */
|
||||
{3, 21},
|
||||
/* qnameID == 35: {http://www.w3.org/2001/XMLSchema}float */
|
||||
{3, 22},
|
||||
/* qnameID == 36: {http://www.w3.org/2001/XMLSchema}gDay */
|
||||
{3, 23},
|
||||
/* qnameID == 37: {http://www.w3.org/2001/XMLSchema}gMonth */
|
||||
{3, 24},
|
||||
/* qnameID == 38: {http://www.w3.org/2001/XMLSchema}gMonthDay */
|
||||
{3, 25},
|
||||
/* qnameID == 39: {http://www.w3.org/2001/XMLSchema}gYear */
|
||||
{3, 26},
|
||||
/* qnameID == 40: {http://www.w3.org/2001/XMLSchema}gYearMonth */
|
||||
{3, 27},
|
||||
/* qnameID == 41: {http://www.w3.org/2001/XMLSchema}hexBinary */
|
||||
{3, 28},
|
||||
/* qnameID == 42: {http://www.w3.org/2001/XMLSchema}int */
|
||||
{3, 29},
|
||||
/* qnameID == 43: {http://www.w3.org/2001/XMLSchema}integer */
|
||||
{3, 30},
|
||||
/* qnameID == 44: {http://www.w3.org/2001/XMLSchema}language */
|
||||
{3, 31},
|
||||
/* qnameID == 45: {http://www.w3.org/2001/XMLSchema}long */
|
||||
{3, 32},
|
||||
/* qnameID == 46: {http://www.w3.org/2001/XMLSchema}negativeInteger */
|
||||
{3, 33},
|
||||
/* qnameID == 47: {http://www.w3.org/2001/XMLSchema}nonNegativeInteger */
|
||||
{3, 34},
|
||||
/* qnameID == 48: {http://www.w3.org/2001/XMLSchema}nonPositiveInteger */
|
||||
{3, 35},
|
||||
/* qnameID == 49: {http://www.w3.org/2001/XMLSchema}normalizedString */
|
||||
{3, 36},
|
||||
/* qnameID == 50: {http://www.w3.org/2001/XMLSchema}positiveInteger */
|
||||
{3, 37},
|
||||
/* qnameID == 51: {http://www.w3.org/2001/XMLSchema}short */
|
||||
{3, 38},
|
||||
/* qnameID == 52: {http://www.w3.org/2001/XMLSchema}string */
|
||||
{3, 39},
|
||||
/* qnameID == 53: {http://www.w3.org/2001/XMLSchema}time */
|
||||
{3, 40},
|
||||
/* qnameID == 54: {http://www.w3.org/2001/XMLSchema}token */
|
||||
{3, 41},
|
||||
/* qnameID == 55: {http://www.w3.org/2001/XMLSchema}unsignedByte */
|
||||
{3, 42},
|
||||
/* qnameID == 56: {http://www.w3.org/2001/XMLSchema}unsignedInt */
|
||||
{3, 43},
|
||||
/* qnameID == 57: {http://www.w3.org/2001/XMLSchema}unsignedLong */
|
||||
{3, 44},
|
||||
/* qnameID == 58: {http://www.w3.org/2001/XMLSchema}unsignedShort */
|
||||
{3, 45},
|
||||
/* qnameID == 59: {urn:iso:15118:2:2010:AppProtocol}AppProtocolType */
|
||||
{4, 0},
|
||||
/* qnameID == 60: {urn:iso:15118:2:2010:AppProtocol}idType */
|
||||
{4, 1},
|
||||
/* qnameID == 61: {urn:iso:15118:2:2010:AppProtocol}priorityType */
|
||||
{4, 2},
|
||||
/* qnameID == 62: {urn:iso:15118:2:2010:AppProtocol}protocolNameType */
|
||||
{4, 3},
|
||||
/* qnameID == 63: {urn:iso:15118:2:2010:AppProtocol}protocolNamespaceType */
|
||||
{4, 4},
|
||||
/* qnameID == 64: {urn:iso:15118:2:2010:AppProtocol}responseCodeType */
|
||||
{4, 5},
|
||||
/* qnameID == 65: {urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq */
|
||||
{4, 6},
|
||||
/* qnameID == 66: {urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes */
|
||||
{4, 7}
|
||||
|
||||
};
|
||||
|
||||
|
||||
int exiappHandGetEQName(exi_state_t* state, uint16_t qnameID, uint16_t* namespaceURI, uint16_t* localPart) {
|
||||
int errn = 0;
|
||||
/* EXI_appHandNUMBER_OF_QNAMES */
|
||||
if (qnameID < state->nextQNameID) {
|
||||
*namespaceURI = qnames[qnameID].namespaceURI;
|
||||
*localPart = qnames[qnameID].localPart;
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
int exiappHandGetQNameID(exi_state_t* state, uint16_t namespaceURI, uint16_t localPart, uint16_t* qnameID) {
|
||||
uint16_t i;
|
||||
int errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
/* TODO Do something more efficient than just walk over the entire list */
|
||||
/* EXI_appHandNUMBER_OF_QNAMES */
|
||||
for(i=0; i<state->nextQNameID && errn != 0; i++) {
|
||||
if(qnames[i].localPart == localPart && qnames[i].namespaceURI == namespaceURI) {
|
||||
*qnameID = i;
|
||||
errn = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
int exiappHandAddEQName(exi_state_t* state, uint16_t* qnameID, uint16_t namespaceURI, uint16_t localPart) {
|
||||
int errn = 0;
|
||||
if(state->nextQNameID < (EXI_appHandMAX_NUMBER_OF_QNAMES -1)) {
|
||||
/* store IDs */
|
||||
qnames[state->nextQNameID].namespaceURI = namespaceURI;
|
||||
qnames[state->nextQNameID].localPart = localPart;
|
||||
/* increment counter */
|
||||
*qnameID = state->nextQNameID++;
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/appHandshake/V2G_CI_AppProtocol.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef EXI_appHand_QNAMES_H
|
||||
#define EXI_appHand_QNAMES_H
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \brief Returns efficient qname (namespaceURI & localName) IDs for qnameID
|
||||
*
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified name ID
|
||||
* \param namespaceURI QName namespace URI ID
|
||||
* \param localPart QName local name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandGetEQName(exi_state_t* state, uint16_t qnameID, uint16_t* namespaceURI, uint16_t* localPart);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Returns qnameID for qname namespaceURI & localName
|
||||
*
|
||||
* \param state Codec state
|
||||
* \param namespaceURI QName namespace URI ID
|
||||
* \param localPart QName local name ID
|
||||
* \param qnameID QName ID (out)
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandGetQNameID(exi_state_t* state, uint16_t namespaceURI, uint16_t localPart, uint16_t* qnameID);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Add efficient qname (namespaceURI & localName) IDs for qnameID
|
||||
*
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified name ID
|
||||
* \param namespaceURI QName namespace URI ID
|
||||
* \param localPart QName local name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiappHandAddEQName(exi_state_t* state, uint16_t* qnameID, uint16_t namespaceURI, uint16_t localPart);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,604 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* <p>Sample program to illustrate how to read an EXI stream and
|
||||
* directly write it again to an output</p>
|
||||
*
|
||||
* <p>e.g., <executable> in.exi out.exi</p>
|
||||
********************************************************************/
|
||||
|
||||
/* Avoid VS warning, put before your included header files */
|
||||
/* warning C4996: ‘fopen’: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. */
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "EXIConfig.h"
|
||||
#include "v2gEXIDecoder.h"
|
||||
#include "StringNameTable.h"
|
||||
#include "v2gEXIEncoder.h"
|
||||
#include "EXITypes.h"
|
||||
#include "ByteStream.h"
|
||||
#include "ErrorCodes.h"
|
||||
#include "v2gQNameDefines.h"
|
||||
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
#include "DynamicMemory.h"
|
||||
#include "StringValueTable.h"
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
|
||||
/** EXI Debug mode */
|
||||
#define EXI_DEBUG 0
|
||||
|
||||
|
||||
#if EXI_STREAM == BYTE_ARRAY
|
||||
/* 64 kilobytes = 65 536 bytes */
|
||||
/* 1 megabyte = 1 048 576 bytes*/
|
||||
/* 4 megabytes = 4 194 304 bytes */
|
||||
#define BUFFER_SIZE 4194304
|
||||
uint8_t bufferIn[BUFFER_SIZE];
|
||||
uint8_t bufferOut[BUFFER_SIZE];
|
||||
#endif /* EXI_STREAM == BYTE_ARRAY */
|
||||
|
||||
#if MEMORY_ALLOCATION == STATIC_ALLOCATION
|
||||
/* avoids warning: initializer element is not computable at load time */
|
||||
#define ARRAY_SIZE_BYTES 300
|
||||
uint8_t bytesData[ARRAY_SIZE_BYTES];
|
||||
#define ARRAY_SIZE_STRINGS 30000
|
||||
uint32_t codepoints[ARRAY_SIZE_STRINGS];
|
||||
#endif /* STATIC_ALLOCATION */
|
||||
|
||||
/* String table memory setup */
|
||||
uint16_t numberOfLocalStringsDecode[EXI_v2gMAX_NUMBER_OF_QNAMES];
|
||||
uint16_t numberOfLocalStringsEncode[EXI_v2gMAX_NUMBER_OF_QNAMES];
|
||||
|
||||
#if EXI_DEBUG == 0
|
||||
# define DEBUG_PRINTF(x) printf x
|
||||
#else
|
||||
# define DEBUG_PRINTF(x) do {} while (0)
|
||||
#endif
|
||||
|
||||
static void debugValue(exi_value_t* val, exi_value_table_t* valueTable, uint16_t qnameID);
|
||||
|
||||
|
||||
int main_codec(int argc, char *argv[]) {
|
||||
|
||||
int errn = 0;
|
||||
int noEndOfDocument;
|
||||
|
||||
unsigned int k;
|
||||
|
||||
bitstream_t iStream, oStream;
|
||||
#if EXI_STREAM == BYTE_ARRAY
|
||||
uint32_t posDecode;
|
||||
uint32_t posEncode;
|
||||
#endif /* EXI_STREAM == BYTE_ARRAY */
|
||||
|
||||
/* EXI set-up */
|
||||
exi_state_t stateDecode;
|
||||
exi_state_t stateEncode;
|
||||
exi_event_t event;
|
||||
uint16_t qnameID = 0; /* qname */
|
||||
uint16_t lastKnownQNameID = EXI_v2gNUMBER_OF_PREPOPULATED_QNAMES - 1;
|
||||
exi_qname_t* qname;
|
||||
exi_value_t val;
|
||||
|
||||
exi_name_table_runtime_t runtimeTableDecode;
|
||||
exi_name_table_runtime_t runtimeTableEncode;
|
||||
|
||||
exi_value_table_t stringTableDecode = { 0, EXI_v2gMAX_NUMBER_OF_QNAMES, numberOfLocalStringsDecode, NULL };
|
||||
exi_value_table_t stringTableEncode = { 0, EXI_v2gMAX_NUMBER_OF_QNAMES, numberOfLocalStringsEncode, NULL };
|
||||
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
exi_value_string_table_t stringTableValuesDecode;
|
||||
exi_value_string_table_t stringTableValuesEncode;
|
||||
|
||||
stringTableValuesDecode.size = 0;
|
||||
stringTableValuesDecode.len = 0;
|
||||
stringTableValuesEncode.size = 0;
|
||||
stringTableValuesEncode.len = 0;
|
||||
|
||||
/** string values */
|
||||
stringTableDecode.valueStringTable = &stringTableValuesDecode;
|
||||
stringTableEncode.valueStringTable = &stringTableValuesEncode;
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
|
||||
|
||||
/* BINARY memory setup */
|
||||
val.binary.len = 0;
|
||||
#if MEMORY_ALLOCATION == STATIC_ALLOCATION
|
||||
val.binary.size = ARRAY_SIZE_BYTES;
|
||||
val.binary.data = bytesData;
|
||||
#endif /* STATIC_ALLOCATION */
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
val.binary.size = 0;
|
||||
val.binary.data = NULL;
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
|
||||
/* STRING miss memory setup */
|
||||
val.str.type = EXI_STRING_VALUE_MISS;
|
||||
val.str.miss.len = 0;
|
||||
#if MEMORY_ALLOCATION == STATIC_ALLOCATION
|
||||
val.str.miss.size = ARRAY_SIZE_STRINGS;
|
||||
val.str.miss.codepoints = codepoints;
|
||||
#endif /* STATIC_ALLOCATION */
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
val.str.miss.size = 0;
|
||||
val.str.miss.codepoints = NULL;
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
|
||||
#if EXI_DEBUG == 1
|
||||
/* The Eclipse console has buffering problems on Windows e.g, Debug mode */
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
setvbuf(stderr, NULL, _IONBF, 0);
|
||||
#endif /*EXI_DEBUG*/
|
||||
|
||||
if (argc != 3) {
|
||||
printf("Usage: %s exiInput exiOutput\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
#if EXI_STREAM == BYTE_ARRAY
|
||||
/* input pos */
|
||||
posDecode = 0;
|
||||
/* parse EXI stream to internal byte structures */
|
||||
errn = readBytesFromFile(argv[1], bufferIn, BUFFER_SIZE, &posDecode);
|
||||
if (errn != 0) {
|
||||
printf("Problems while reading file into buffer\n");
|
||||
return errn;
|
||||
}
|
||||
posDecode = 0; /* reset position */
|
||||
#endif /* EXI_STREAM == BYTE_ARRAY */
|
||||
|
||||
/* setup input stream */
|
||||
#if EXI_STREAM == BYTE_ARRAY
|
||||
iStream.size = BUFFER_SIZE;
|
||||
iStream.data = bufferIn;
|
||||
iStream.pos = &posDecode;
|
||||
#endif /* EXI_STREAM == BYTE_ARRAY */
|
||||
#if EXI_STREAM == FILE_STREAM
|
||||
iStream.file = fopen(argv[1], "rb");
|
||||
#endif /* EXI_STREAM == FILE_STREAM */
|
||||
|
||||
iStream.buffer = 0;
|
||||
iStream.capacity = 0;
|
||||
|
||||
|
||||
#if EXI_STREAM == BYTE_ARRAY
|
||||
/* setup output stream */
|
||||
posEncode = 0;
|
||||
oStream.size = BUFFER_SIZE;
|
||||
oStream.data = bufferOut;
|
||||
oStream.pos = &posEncode;
|
||||
#endif
|
||||
#if EXI_STREAM == FILE_STREAM
|
||||
oStream.file = fopen(argv[2], "wb");
|
||||
#endif /* EXI_STREAM == FILE_STREAM */
|
||||
oStream.buffer = 0;
|
||||
oStream.capacity = 8;
|
||||
|
||||
noEndOfDocument = 1; /* true */
|
||||
|
||||
/* init decoder (read header, set initial state) */
|
||||
/* init runtime table */
|
||||
errn = exiInitNameTableRuntime(&runtimeTableDecode);
|
||||
exiv2gInitDecoder(&iStream, &stateDecode, runtimeTableDecode, stringTableDecode);
|
||||
|
||||
/* init encoder (write header, set initial state) */
|
||||
errn = exiInitNameTableRuntime(&runtimeTableEncode);
|
||||
exiv2gInitEncoder(&oStream, &stateEncode, runtimeTableEncode, stringTableEncode);
|
||||
|
||||
DEBUG_PRINTF(("[DECODE] >>> EXI >>> [ENCODE] \n"));
|
||||
|
||||
do {
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Encode-ERROR] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
|
||||
errn = exiv2gDecodeNextEvent(&iStream, &stateDecode,
|
||||
&event);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
|
||||
switch (event) {
|
||||
case EXI_EVENT_START_DOCUMENT:
|
||||
/* decode */
|
||||
errn = exiv2gDecodeStartDocument(&iStream,
|
||||
&stateDecode);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR-SD] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
DEBUG_PRINTF((">> START_DOCUMENT \n"));
|
||||
/* encode */
|
||||
errn = exiv2gEncodeStartDocument(&oStream,
|
||||
&stateEncode);
|
||||
break;
|
||||
case EXI_EVENT_END_DOCUMENT:
|
||||
/* decode */
|
||||
errn = exiv2gDecodeEndDocument(&iStream,
|
||||
&stateDecode);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR-ED] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
DEBUG_PRINTF((">> END_DOCUMENT \n"));
|
||||
/* encode */
|
||||
errn = exiv2gEncodeEndDocument(&oStream,
|
||||
&stateEncode);
|
||||
/* signalize end of document */
|
||||
noEndOfDocument = 0; /* false */
|
||||
break;
|
||||
case EXI_EVENT_START_ELEMENT:
|
||||
case EXI_EVENT_START_ELEMENT_GENERIC:
|
||||
case EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED:
|
||||
/* decode */
|
||||
errn = exiv2gDecodeStartElement(&iStream,
|
||||
&stateDecode, &qnameID);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR-SE] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
DEBUG_PRINTF((">> SE (%d) \n", qnameID));
|
||||
/* encode */
|
||||
if(qnameID > lastKnownQNameID) {
|
||||
/* new qname */
|
||||
lastKnownQNameID = qnameID;
|
||||
/* URI or LocalName known ? */
|
||||
errn = exiv2gGetLastQName(&qname);
|
||||
if(qname->uri.type == EXI_NAME_ENTRY_TYPE_ID) {
|
||||
/* local name only new */
|
||||
errn = exiv2gEncodeStartElementNS(&oStream,
|
||||
&stateEncode, qname->uri.id, &qname->localName.str);
|
||||
} else {
|
||||
/* both, uri and localname new */
|
||||
errn = exiv2gEncodeStartElementGeneric(&oStream,
|
||||
&stateEncode, &qname->uri.str, &qname->localName.str);
|
||||
}
|
||||
} else {
|
||||
errn = exiv2gEncodeStartElement(&oStream,
|
||||
&stateEncode, qnameID);
|
||||
}
|
||||
break;
|
||||
case EXI_EVENT_END_ELEMENT:
|
||||
case EXI_EVENT_END_ELEMENT_UNDECLARED:
|
||||
/* decode */
|
||||
errn = exiv2gDecodeEndElement(&iStream,
|
||||
&stateDecode, &qnameID);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR-EE] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
DEBUG_PRINTF(("<< EE \n"));
|
||||
/* encode */
|
||||
errn = exiv2gEncodeEndElement(&oStream,
|
||||
&stateEncode);
|
||||
break;
|
||||
case EXI_EVENT_CHARACTERS:
|
||||
case EXI_EVENT_CHARACTERS_GENERIC:
|
||||
case EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED:
|
||||
/* decode */
|
||||
errn = exiv2gDecodeCharacters(&iStream,
|
||||
&stateDecode, &val);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR-CH] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
DEBUG_PRINTF((" CH: "));
|
||||
debugValue(&val, &stringTableDecode, stateDecode.elementStack[stateDecode.stackIndex]);
|
||||
/* encode */
|
||||
errn = exiv2gEncodeCharacters(&oStream,
|
||||
&stateEncode, &val);
|
||||
|
||||
/* list value: special behavior */
|
||||
if (val.type == EXI_DATATYPE_LIST) {
|
||||
for(k=0; k<val.list.len; k++) {
|
||||
errn = exiv2gDecodeListValue(&iStream, &stateDecode, qnameID, &val, val.list);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR-CH_LIST] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
DEBUG_PRINTF((" CH: "));
|
||||
debugValue(&val, &stringTableDecode, stateDecode.elementStack[stateDecode.stackIndex]);
|
||||
/* encode list value */
|
||||
errn = exiv2gEncodeListValue(&oStream, &stateEncode, qnameID,
|
||||
&val, val.list);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EXI_EVENT_ATTRIBUTE:
|
||||
case EXI_EVENT_ATTRIBUTE_GENERIC:
|
||||
case EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED:
|
||||
case EXI_EVENT_ATTRIBUTE_INVALID_VALUE:
|
||||
/* decode */
|
||||
errn = exiv2gDecodeAttribute(&iStream, &stateDecode,
|
||||
&qnameID, &val);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR-AT] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
DEBUG_PRINTF((" AT (%d): ", qnameID));
|
||||
debugValue(&val, &stringTableDecode, qnameID);
|
||||
/* encode */
|
||||
if(qnameID > lastKnownQNameID) {
|
||||
/* new qname */
|
||||
lastKnownQNameID = qnameID;
|
||||
/* URI or LocalName known ? */
|
||||
errn = exiv2gGetLastQName(&qname);
|
||||
if(qname->uri.type == EXI_NAME_ENTRY_TYPE_ID) {
|
||||
/* local name only new */
|
||||
errn = exiv2gEncodeAttributeNS(&oStream,
|
||||
&stateEncode, qname->uri.id, &qname->localName.str, &val);
|
||||
} else {
|
||||
/* both, uri and localname new */
|
||||
errn = exiv2gEncodeAttributeGeneric(&oStream,
|
||||
&stateEncode, &qname->uri.str, &qname->localName.str, &val);
|
||||
}
|
||||
} else {
|
||||
errn = exiv2gEncodeAttribute(&oStream, &stateEncode,
|
||||
qnameID, &val);
|
||||
}
|
||||
break;
|
||||
case EXI_EVENT_ATTRIBUTE_XSI_NIL:
|
||||
/* decode */
|
||||
errn = exiv2gDecodeAttributeXsiNil(&iStream,
|
||||
&stateDecode, &val);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR-AT-NIL] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
DEBUG_PRINTF((" AT {xsi}nil == %i \n", val.boolean));
|
||||
/* encode */
|
||||
errn = exiv2gEncodeAttributeXsiNil(&oStream,
|
||||
&stateEncode, &val);
|
||||
break;
|
||||
case EXI_EVENT_ATTRIBUTE_XSI_TYPE:
|
||||
/* decode */
|
||||
errn = exiv2gDecodeAttributeXsiType(&iStream,
|
||||
&stateDecode, &val);
|
||||
if (errn) {
|
||||
DEBUG_PRINTF(("[Decode-ERROR-AT-TYPE] %d \n", errn));
|
||||
return errn;
|
||||
}
|
||||
DEBUG_PRINTF((" AT {type}type == {%d}%d \n", val.eqname.namespaceURI, val.eqname.localPart));
|
||||
/* encode */
|
||||
errn = exiv2gEncodeAttributeXsiType(&oStream,
|
||||
&stateEncode, &val);
|
||||
break;
|
||||
default:
|
||||
/* ERROR */
|
||||
DEBUG_PRINTF(("[Unknown-Event] %d \n", event));
|
||||
return EXI_ERROR_UNKOWN_EVENT;
|
||||
}
|
||||
|
||||
} while (noEndOfDocument);
|
||||
|
||||
#if EXI_STREAM == BYTE_ARRAY
|
||||
/* write to file */
|
||||
writeBytesToFile(oStream.data, posEncode, argv[2]);
|
||||
#endif
|
||||
#if EXI_STREAM == FILE_STREAM
|
||||
fclose(iStream.file);
|
||||
fclose(oStream.file);
|
||||
#endif
|
||||
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
/* free memory if any */
|
||||
exiFreeDynamicStringMemory(&val.str.miss);
|
||||
exiFreeDynamicBinaryMemory(&val.binary);
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void debugValueInteger(exi_integer_t* integer) {
|
||||
switch (integer->type) {
|
||||
/* Unsigned Integer */
|
||||
case EXI_UNSIGNED_INTEGER_8:
|
||||
printf("uint8 : %d \n", integer->val.uint8);
|
||||
break;
|
||||
case EXI_UNSIGNED_INTEGER_16:
|
||||
printf("uint16 : %d \n", integer->val.uint16);
|
||||
break;
|
||||
case EXI_UNSIGNED_INTEGER_32:
|
||||
printf("uint32 : %d \n", integer->val.uint32);
|
||||
break;
|
||||
case EXI_UNSIGNED_INTEGER_64:
|
||||
printf("uint64 : %ld \n",
|
||||
(long unsigned int) integer->val.uint64);
|
||||
break;
|
||||
/* (Signed) Integer */
|
||||
case EXI_INTEGER_8:
|
||||
printf("int8 : %d \n", integer->val.int8);
|
||||
break;
|
||||
case EXI_INTEGER_16:
|
||||
printf("int16 : %d \n", integer->val.int16);
|
||||
break;
|
||||
case EXI_INTEGER_32:
|
||||
printf("int32 : %d \n", integer->val.int32);
|
||||
break;
|
||||
case EXI_INTEGER_64:
|
||||
printf("int64 : %ld \n", (long int) integer->val.int64);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void debugValue(exi_value_t* val, exi_value_table_t* valueTable, uint16_t qnameID) {
|
||||
exi_string_ucs_t sv;
|
||||
|
||||
#if EXI_DEBUG == 1
|
||||
int i;
|
||||
switch (val->type) {
|
||||
case EXI_DATATYPE_NBIT_UNSIGNED_INTEGER:
|
||||
case EXI_DATATYPE_UNSIGNED_INTEGER:
|
||||
case EXI_DATATYPE_INTEGER:
|
||||
debugValueInteger(&(val->integer));
|
||||
break;
|
||||
case EXI_DATATYPE_BINARY_BASE64:
|
||||
case EXI_DATATYPE_BINARY_HEX:
|
||||
printf("Binary (len == %d) : ", val->binary.len);
|
||||
for (i = 0; i < val->binary.len; i++) {
|
||||
printf(" [%d]", val->binary.data[i]);
|
||||
}
|
||||
printf("\n");
|
||||
break;
|
||||
case EXI_DATATYPE_BOOLEAN:
|
||||
printf("Boolean : %d \n", val->boolean);
|
||||
break;
|
||||
case EXI_DATATYPE_DECIMAL:
|
||||
/* Note: reversed fractional part */
|
||||
printf("Decimal : negative: %d followed by integral and reversed fractional part \n", val->decimal.negative);
|
||||
debugValueInteger(&(val->decimal.integral));
|
||||
debugValueInteger(&(val->decimal.reverseFraction));
|
||||
break;
|
||||
case EXI_DATATYPE_FLOAT:
|
||||
if(val->float_me.exponent == FLOAT_EXPONENT_SPECIAL_VALUES) {
|
||||
if (val->float_me.mantissa == FLOAT_MANTISSA_INFINITY) {
|
||||
printf("Float Special: INF \n");
|
||||
} else if (val->float_me.mantissa == FLOAT_MANTISSA_MINUS_INFINITY) {
|
||||
printf("Float Special: -INF \n");
|
||||
} else {
|
||||
printf("Float Special: NaN \n");
|
||||
}
|
||||
} else {
|
||||
printf("Float : %ld E %d \n", (long int) val->float_me.mantissa, val->float_me.exponent);
|
||||
}
|
||||
break;
|
||||
case EXI_DATATYPE_STRING:
|
||||
case EXI_DATATYPE_RCS_STRING:
|
||||
switch(val->str.type) {
|
||||
case EXI_STRING_VALUE_MISS:
|
||||
printf("String Miss (len==%d) : '", val->str.miss.len);
|
||||
for (i = 0; i < val->str.miss.len; i++) {
|
||||
printf("%c", (char) val->str.miss.codepoints[i]);
|
||||
}
|
||||
printf("'\n");
|
||||
break;
|
||||
case EXI_STRING_VALUE_LOCAL_HIT:
|
||||
printf("String LocalHit: %d", val->str.localID);
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
if( exiGetLocalStringValue(valueTable, qnameID, (uint16_t)(val->str.localID), &sv)) {
|
||||
printf("ERROR when retrieving localvalue hit \n");
|
||||
} else {
|
||||
printf(" --> '");
|
||||
for (i = 0; i < sv.len; i++) {
|
||||
printf("%c", (char) sv.codepoints[i]);
|
||||
}
|
||||
printf("'");
|
||||
}
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
printf("\n");
|
||||
break;
|
||||
case EXI_STRING_VALUE_GLOBAL_HIT:
|
||||
printf("String GlobalHit: %d ", val->str.globalID);
|
||||
#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
|
||||
if( exiGetGlobalStringValue(valueTable, (uint16_t)(val->str.globalID), &sv)) {
|
||||
printf("ERROR when retrieving global value hit \n");
|
||||
} else {
|
||||
printf(" --> '");
|
||||
for (i = 0; i < sv.len; i++) {
|
||||
printf("%c", (char) sv.codepoints[i]);
|
||||
}
|
||||
printf("'");
|
||||
}
|
||||
#endif /* DYNAMIC_ALLOCATION */
|
||||
printf("\n");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case EXI_DATATYPE_DATETIME:
|
||||
switch(val->datetime.type) {
|
||||
case EXI_DATETIME_GYEAR:
|
||||
printf("Datetime gYear: %d", val->datetime.year);
|
||||
break;
|
||||
case EXI_DATETIME_GYEARMONTH:
|
||||
printf("Datetime gYearMonth: Year=%d, MonthDay=%d", val->datetime.year, val->datetime.monthDay);
|
||||
break;
|
||||
case EXI_DATETIME_DATE:
|
||||
printf("Datetime date: Year=%d, MonthDay=%d", val->datetime.year, val->datetime.monthDay);
|
||||
break;
|
||||
case EXI_DATETIME_DATETIME:
|
||||
printf("Datetime dateTime: Year=%d, MonthDay=%d, Time=%d", val->datetime.year, val->datetime.monthDay, val->datetime.time);
|
||||
break;
|
||||
case EXI_DATETIME_GMONTH:
|
||||
printf("Datetime gMonth: MonthDay=%d", val->datetime.monthDay);
|
||||
break;
|
||||
case EXI_DATETIME_GMONTHDAY:
|
||||
printf("Datetime gMonthDay: MonthDay=%d", val->datetime.monthDay);
|
||||
break;
|
||||
case EXI_DATETIME_GDAY:
|
||||
printf("Datetime gDay: MonthDay=%d", val->datetime.monthDay);
|
||||
break;
|
||||
case EXI_DATETIME_TIME:
|
||||
printf("Datetime time: Time=%d", val->datetime.time);
|
||||
break;
|
||||
default:
|
||||
printf("Datetime ?Type?");
|
||||
break;
|
||||
}
|
||||
if(val->datetime.presenceFractionalSecs) {
|
||||
printf(", FractionalSecs=%d", val->datetime.fractionalSecs);
|
||||
}
|
||||
if(val->datetime.presenceTimezone) {
|
||||
printf(", TimeZone=%d", val->datetime.timezone);
|
||||
}
|
||||
printf("\n");
|
||||
break;
|
||||
case EXI_DATATYPE_ENUMERATION:
|
||||
printf("Enumeration (id==%d) \n", val->enumeration);
|
||||
break;
|
||||
case EXI_DATATYPE_LIST:
|
||||
printf("List (len==%d) \n", val->list.len);
|
||||
break;
|
||||
case EXI_DATATYPE_QNAME:
|
||||
printf("QName (uri==%d, localName=%d) \n", val->eqname.namespaceURI, val->eqname.localPart);
|
||||
break;
|
||||
default:
|
||||
printf(" ?Value-Type? \n");
|
||||
break;
|
||||
}
|
||||
#endif /*EXI_DEBUG*/
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_v2g_CODER_H
|
||||
#define EXI_v2g_CODER_H
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
#define DOCUMENT 0
|
||||
#define DOC_CONTENT 1
|
||||
#define DOC_END 22
|
||||
|
||||
|
||||
/* increments global and local string count */
|
||||
/* in case of dynamic memory string is collected */
|
||||
int exi_v2g_AddStringValue(exi_state_t* state, exi_string_ucs_t* sv, uint16_t qnameID);
|
||||
|
||||
int exi_v2g_PushStack(exi_state_t* state, int16_t newState, uint16_t qnameID);
|
||||
|
||||
int exi_v2g_PopStack(exi_state_t* state);
|
||||
|
||||
int exi_v2g_HandleXsiNilTrue(exi_state_t* state);
|
||||
|
||||
int exi_v2g_HandleXsiType(exi_state_t* state, exi_eqname_t* xsiType);
|
||||
|
||||
int exi_v2g_RetrieveAndPushGlobalGrammar(exi_state_t* state, uint16_t qnameID);
|
||||
|
||||
int exi_v2g_LearnAttribute(exi_state_t* state, uint16_t uriID, uint16_t localID);
|
||||
|
||||
int exi_v2g_LearnEndElement(exi_state_t* state);
|
||||
|
||||
int exi_v2g_IsStartContent(int16_t ruleID);
|
||||
|
||||
int exi_v2g_MoveToElementContentRule(exi_state_t* state);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
634
src/codec/v2gEXIDatatypes.c
Normal file
634
src/codec/v2gEXIDatatypes.c
Normal file
|
@ -0,0 +1,634 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2014 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "v2gEXIDatatypes.h"
|
||||
#include "EXITypes.h"
|
||||
|
||||
|
||||
#ifndef EXI_v2g_DATATYPES_C
|
||||
#define EXI_v2g_DATATYPES_C
|
||||
|
||||
|
||||
|
||||
void init_v2gEXIDocument(struct v2gEXIDocument* exiDoc) {
|
||||
exiDoc->V2G_Message_isUsed = 0u;
|
||||
exiDoc->ServiceDiscoveryReq_isUsed = 0u;
|
||||
exiDoc->ServiceDiscoveryRes_isUsed = 0u;
|
||||
exiDoc->MeteringReceiptReq_isUsed = 0u;
|
||||
exiDoc->PaymentDetailsReq_isUsed = 0u;
|
||||
exiDoc->MeteringReceiptRes_isUsed = 0u;
|
||||
exiDoc->PaymentDetailsRes_isUsed = 0u;
|
||||
exiDoc->SessionSetupReq_isUsed = 0u;
|
||||
exiDoc->SessionSetupRes_isUsed = 0u;
|
||||
exiDoc->CableCheckReq_isUsed = 0u;
|
||||
exiDoc->CableCheckRes_isUsed = 0u;
|
||||
exiDoc->CertificateInstallationReq_isUsed = 0u;
|
||||
exiDoc->CertificateInstallationRes_isUsed = 0u;
|
||||
exiDoc->WeldingDetectionReq_isUsed = 0u;
|
||||
exiDoc->WeldingDetectionRes_isUsed = 0u;
|
||||
exiDoc->CertificateUpdateReq_isUsed = 0u;
|
||||
exiDoc->CertificateUpdateRes_isUsed = 0u;
|
||||
exiDoc->PaymentServiceSelectionReq_isUsed = 0u;
|
||||
exiDoc->PowerDeliveryReq_isUsed = 0u;
|
||||
exiDoc->PaymentServiceSelectionRes_isUsed = 0u;
|
||||
exiDoc->PowerDeliveryRes_isUsed = 0u;
|
||||
exiDoc->ChargingStatusReq_isUsed = 0u;
|
||||
exiDoc->ChargingStatusRes_isUsed = 0u;
|
||||
exiDoc->BodyElement_isUsed = 0u;
|
||||
exiDoc->CurrentDemandReq_isUsed = 0u;
|
||||
exiDoc->PreChargeReq_isUsed = 0u;
|
||||
exiDoc->CurrentDemandRes_isUsed = 0u;
|
||||
exiDoc->PreChargeRes_isUsed = 0u;
|
||||
exiDoc->SessionStopReq_isUsed = 0u;
|
||||
exiDoc->AuthorizationReq_isUsed = 0u;
|
||||
exiDoc->SessionStopRes_isUsed = 0u;
|
||||
exiDoc->AuthorizationRes_isUsed = 0u;
|
||||
exiDoc->ChargeParameterDiscoveryReq_isUsed = 0u;
|
||||
exiDoc->ChargeParameterDiscoveryRes_isUsed = 0u;
|
||||
exiDoc->ServiceDetailReq_isUsed = 0u;
|
||||
exiDoc->ServiceDetailRes_isUsed = 0u;
|
||||
exiDoc->DC_EVSEStatus_isUsed = 0u;
|
||||
exiDoc->RelativeTimeInterval_isUsed = 0u;
|
||||
exiDoc->SalesTariffEntry_isUsed = 0u;
|
||||
exiDoc->DC_EVPowerDeliveryParameter_isUsed = 0u;
|
||||
exiDoc->SASchedules_isUsed = 0u;
|
||||
exiDoc->AC_EVChargeParameter_isUsed = 0u;
|
||||
exiDoc->SAScheduleList_isUsed = 0u;
|
||||
exiDoc->DC_EVStatus_isUsed = 0u;
|
||||
exiDoc->EVStatus_isUsed = 0u;
|
||||
exiDoc->DC_EVChargeParameter_isUsed = 0u;
|
||||
exiDoc->DC_EVSEChargeParameter_isUsed = 0u;
|
||||
exiDoc->EVSEStatus_isUsed = 0u;
|
||||
exiDoc->TimeInterval_isUsed = 0u;
|
||||
exiDoc->EVPowerDeliveryParameter_isUsed = 0u;
|
||||
exiDoc->EVSEChargeParameter_isUsed = 0u;
|
||||
exiDoc->AC_EVSEStatus_isUsed = 0u;
|
||||
exiDoc->Entry_isUsed = 0u;
|
||||
exiDoc->AC_EVSEChargeParameter_isUsed = 0u;
|
||||
exiDoc->PMaxScheduleEntry_isUsed = 0u;
|
||||
exiDoc->EVChargeParameter_isUsed = 0u;
|
||||
exiDoc->SignatureProperty_isUsed = 0u;
|
||||
exiDoc->DSAKeyValue_isUsed = 0u;
|
||||
exiDoc->SignatureProperties_isUsed = 0u;
|
||||
exiDoc->KeyValue_isUsed = 0u;
|
||||
exiDoc->Transforms_isUsed = 0u;
|
||||
exiDoc->DigestMethod_isUsed = 0u;
|
||||
exiDoc->Signature_isUsed = 0u;
|
||||
exiDoc->RetrievalMethod_isUsed = 0u;
|
||||
exiDoc->Manifest_isUsed = 0u;
|
||||
exiDoc->Reference_isUsed = 0u;
|
||||
exiDoc->CanonicalizationMethod_isUsed = 0u;
|
||||
exiDoc->RSAKeyValue_isUsed = 0u;
|
||||
exiDoc->Transform_isUsed = 0u;
|
||||
exiDoc->PGPData_isUsed = 0u;
|
||||
exiDoc->MgmtData_isUsed = 0u;
|
||||
exiDoc->SignatureMethod_isUsed = 0u;
|
||||
exiDoc->KeyInfo_isUsed = 0u;
|
||||
exiDoc->SPKIData_isUsed = 0u;
|
||||
exiDoc->X509Data_isUsed = 0u;
|
||||
exiDoc->SignatureValue_isUsed = 0u;
|
||||
exiDoc->KeyName_isUsed = 0u;
|
||||
exiDoc->DigestValue_isUsed = 0u;
|
||||
exiDoc->SignedInfo_isUsed = 0u;
|
||||
exiDoc->Object_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gServiceDetailResType(struct v2gServiceDetailResType* v2gServiceDetailResType) {
|
||||
v2gServiceDetailResType->ServiceParameterList_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSPKIDataType(struct v2gSPKIDataType* v2gSPKIDataType) {
|
||||
v2gSPKIDataType->SPKISexp.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gAuthorizationResType(struct v2gAuthorizationResType* v2gAuthorizationResType) {
|
||||
}
|
||||
|
||||
void init_v2gBodyType(struct v2gBodyType* v2gBodyType) {
|
||||
v2gBodyType->BodyElement_isUsed = 0u;
|
||||
v2gBodyType->SessionSetupReq_isUsed = 0u;
|
||||
v2gBodyType->SessionSetupRes_isUsed = 0u;
|
||||
v2gBodyType->ServiceDiscoveryReq_isUsed = 0u;
|
||||
v2gBodyType->ServiceDiscoveryRes_isUsed = 0u;
|
||||
v2gBodyType->ServiceDetailReq_isUsed = 0u;
|
||||
v2gBodyType->ServiceDetailRes_isUsed = 0u;
|
||||
v2gBodyType->PaymentServiceSelectionReq_isUsed = 0u;
|
||||
v2gBodyType->PaymentServiceSelectionRes_isUsed = 0u;
|
||||
v2gBodyType->PaymentDetailsReq_isUsed = 0u;
|
||||
v2gBodyType->PaymentDetailsRes_isUsed = 0u;
|
||||
v2gBodyType->AuthorizationReq_isUsed = 0u;
|
||||
v2gBodyType->AuthorizationRes_isUsed = 0u;
|
||||
v2gBodyType->ChargeParameterDiscoveryReq_isUsed = 0u;
|
||||
v2gBodyType->ChargeParameterDiscoveryRes_isUsed = 0u;
|
||||
v2gBodyType->PowerDeliveryReq_isUsed = 0u;
|
||||
v2gBodyType->PowerDeliveryRes_isUsed = 0u;
|
||||
v2gBodyType->MeteringReceiptReq_isUsed = 0u;
|
||||
v2gBodyType->MeteringReceiptRes_isUsed = 0u;
|
||||
v2gBodyType->SessionStopReq_isUsed = 0u;
|
||||
v2gBodyType->SessionStopRes_isUsed = 0u;
|
||||
v2gBodyType->CertificateUpdateReq_isUsed = 0u;
|
||||
v2gBodyType->CertificateUpdateRes_isUsed = 0u;
|
||||
v2gBodyType->CertificateInstallationReq_isUsed = 0u;
|
||||
v2gBodyType->CertificateInstallationRes_isUsed = 0u;
|
||||
v2gBodyType->ChargingStatusReq_isUsed = 0u;
|
||||
v2gBodyType->ChargingStatusRes_isUsed = 0u;
|
||||
v2gBodyType->CableCheckReq_isUsed = 0u;
|
||||
v2gBodyType->CableCheckRes_isUsed = 0u;
|
||||
v2gBodyType->PreChargeReq_isUsed = 0u;
|
||||
v2gBodyType->PreChargeRes_isUsed = 0u;
|
||||
v2gBodyType->CurrentDemandReq_isUsed = 0u;
|
||||
v2gBodyType->CurrentDemandRes_isUsed = 0u;
|
||||
v2gBodyType->WeldingDetectionReq_isUsed = 0u;
|
||||
v2gBodyType->WeldingDetectionRes_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gPaymentServiceSelectionReqType(struct v2gPaymentServiceSelectionReqType* v2gPaymentServiceSelectionReqType) {
|
||||
}
|
||||
|
||||
void init_v2gEVSEStatusType(struct v2gEVSEStatusType* v2gEVSEStatusType) {
|
||||
}
|
||||
|
||||
void init_v2gSelectedServiceType(struct v2gSelectedServiceType* v2gSelectedServiceType) {
|
||||
v2gSelectedServiceType->ParameterSetID_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gEntryType(struct v2gEntryType* v2gEntryType) {
|
||||
v2gEntryType->TimeInterval_isUsed = 0u;
|
||||
v2gEntryType->RelativeTimeInterval_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gDC_EVSEChargeParameterType(struct v2gDC_EVSEChargeParameterType* v2gDC_EVSEChargeParameterType) {
|
||||
v2gDC_EVSEChargeParameterType->EVSECurrentRegulationTolerance_isUsed = 0u;
|
||||
v2gDC_EVSEChargeParameterType->EVSEEnergyToBeDelivered_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSalesTariffType(struct v2gSalesTariffType* v2gSalesTariffType) {
|
||||
v2gSalesTariffType->Id_isUsed = 0u;
|
||||
v2gSalesTariffType->SalesTariffDescription_isUsed = 0u;
|
||||
v2gSalesTariffType->NumEPriceLevels_isUsed = 0u;
|
||||
v2gSalesTariffType->SalesTariffEntry.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gPMaxScheduleType(struct v2gPMaxScheduleType* v2gPMaxScheduleType) {
|
||||
v2gPMaxScheduleType->PMaxScheduleEntry.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gCostType(struct v2gCostType* v2gCostType) {
|
||||
v2gCostType->amountMultiplier_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gChargeServiceType(struct v2gChargeServiceType* v2gChargeServiceType) {
|
||||
v2gChargeServiceType->ServiceName_isUsed = 0u;
|
||||
v2gChargeServiceType->ServiceScope_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gPMaxScheduleEntryType(struct v2gPMaxScheduleEntryType* v2gPMaxScheduleEntryType) {
|
||||
v2gPMaxScheduleEntryType->TimeInterval_isUsed = 0u;
|
||||
v2gPMaxScheduleEntryType->RelativeTimeInterval_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gServiceListType(struct v2gServiceListType* v2gServiceListType) {
|
||||
v2gServiceListType->Service.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gKeyValueType(struct v2gKeyValueType* v2gKeyValueType) {
|
||||
v2gKeyValueType->DSAKeyValue_isUsed = 0u;
|
||||
v2gKeyValueType->RSAKeyValue_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gPaymentServiceSelectionResType(struct v2gPaymentServiceSelectionResType* v2gPaymentServiceSelectionResType) {
|
||||
}
|
||||
|
||||
void init_v2gSignatureMethodType(struct v2gSignatureMethodType* v2gSignatureMethodType) {
|
||||
v2gSignatureMethodType->HMACOutputLength_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gMeteringReceiptResType(struct v2gMeteringReceiptResType* v2gMeteringReceiptResType) {
|
||||
v2gMeteringReceiptResType->EVSEStatus_isUsed = 0u;
|
||||
v2gMeteringReceiptResType->AC_EVSEStatus_isUsed = 0u;
|
||||
v2gMeteringReceiptResType->DC_EVSEStatus_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gMessageHeaderType(struct v2gMessageHeaderType* v2gMessageHeaderType) {
|
||||
v2gMessageHeaderType->Notification_isUsed = 0u;
|
||||
v2gMessageHeaderType->Signature_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gRetrievalMethodType(struct v2gRetrievalMethodType* v2gRetrievalMethodType) {
|
||||
v2gRetrievalMethodType->URI_isUsed = 0u;
|
||||
v2gRetrievalMethodType->Type_isUsed = 0u;
|
||||
v2gRetrievalMethodType->Transforms_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gEVChargeParameterType(struct v2gEVChargeParameterType* v2gEVChargeParameterType) {
|
||||
v2gEVChargeParameterType->DepartureTime_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gCertificateInstallationReqType(struct v2gCertificateInstallationReqType* v2gCertificateInstallationReqType) {
|
||||
}
|
||||
|
||||
void init_v2gChargeParameterDiscoveryResType(struct v2gChargeParameterDiscoveryResType* v2gChargeParameterDiscoveryResType) {
|
||||
v2gChargeParameterDiscoveryResType->SASchedules_isUsed = 0u;
|
||||
v2gChargeParameterDiscoveryResType->SAScheduleList_isUsed = 0u;
|
||||
v2gChargeParameterDiscoveryResType->EVSEChargeParameter_isUsed = 0u;
|
||||
v2gChargeParameterDiscoveryResType->AC_EVSEChargeParameter_isUsed = 0u;
|
||||
v2gChargeParameterDiscoveryResType->DC_EVSEChargeParameter_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gWeldingDetectionReqType(struct v2gWeldingDetectionReqType* v2gWeldingDetectionReqType) {
|
||||
}
|
||||
|
||||
void init_v2gCableCheckReqType(struct v2gCableCheckReqType* v2gCableCheckReqType) {
|
||||
}
|
||||
|
||||
void init_v2gParameterType(struct v2gParameterType* v2gParameterType) {
|
||||
v2gParameterType->boolValue_isUsed = 0u;
|
||||
v2gParameterType->byteValue_isUsed = 0u;
|
||||
v2gParameterType->shortValue_isUsed = 0u;
|
||||
v2gParameterType->intValue_isUsed = 0u;
|
||||
v2gParameterType->physicalValue_isUsed = 0u;
|
||||
v2gParameterType->stringValue_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gEVSEChargeParameterType(struct v2gEVSEChargeParameterType* v2gEVSEChargeParameterType) {
|
||||
}
|
||||
|
||||
void init_v2gManifestType(struct v2gManifestType* v2gManifestType) {
|
||||
v2gManifestType->Id_isUsed = 0u;
|
||||
v2gManifestType->Reference.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gDC_EVStatusType(struct v2gDC_EVStatusType* v2gDC_EVStatusType) {
|
||||
}
|
||||
|
||||
void init_v2gPaymentDetailsReqType(struct v2gPaymentDetailsReqType* v2gPaymentDetailsReqType) {
|
||||
}
|
||||
|
||||
void init_v2gSAScheduleListType(struct v2gSAScheduleListType* v2gSAScheduleListType) {
|
||||
v2gSAScheduleListType->SAScheduleTuple.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gRSAKeyValueType(struct v2gRSAKeyValueType* v2gRSAKeyValueType) {
|
||||
}
|
||||
|
||||
void init_v2gAC_EVSEChargeParameterType(struct v2gAC_EVSEChargeParameterType* v2gAC_EVSEChargeParameterType) {
|
||||
}
|
||||
|
||||
void init_v2gTransformsType(struct v2gTransformsType* v2gTransformsType) {
|
||||
v2gTransformsType->Transform.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gWeldingDetectionResType(struct v2gWeldingDetectionResType* v2gWeldingDetectionResType) {
|
||||
}
|
||||
|
||||
void init_v2gConsumptionCostType(struct v2gConsumptionCostType* v2gConsumptionCostType) {
|
||||
v2gConsumptionCostType->Cost.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gChargingStatusResType(struct v2gChargingStatusResType* v2gChargingStatusResType) {
|
||||
v2gChargingStatusResType->EVSEMaxCurrent_isUsed = 0u;
|
||||
v2gChargingStatusResType->MeterInfo_isUsed = 0u;
|
||||
v2gChargingStatusResType->ReceiptRequired_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gEVStatusType(struct v2gEVStatusType* v2gEVStatusType) {
|
||||
}
|
||||
|
||||
void init_v2gPGPDataType(struct v2gPGPDataType* v2gPGPDataType) {
|
||||
v2gPGPDataType->PGPKeyID_isUsed = 0u;
|
||||
v2gPGPDataType->PGPKeyPacket_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSessionStopResType(struct v2gSessionStopResType* v2gSessionStopResType) {
|
||||
}
|
||||
|
||||
void init_v2gServiceDiscoveryReqType(struct v2gServiceDiscoveryReqType* v2gServiceDiscoveryReqType) {
|
||||
v2gServiceDiscoveryReqType->ServiceScope_isUsed = 0u;
|
||||
v2gServiceDiscoveryReqType->ServiceCategory_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gAuthorizationReqType(struct v2gAuthorizationReqType* v2gAuthorizationReqType) {
|
||||
v2gAuthorizationReqType->Id_isUsed = 0u;
|
||||
v2gAuthorizationReqType->GenChallenge_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSAScheduleTupleType(struct v2gSAScheduleTupleType* v2gSAScheduleTupleType) {
|
||||
v2gSAScheduleTupleType->SalesTariff_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gPhysicalValueType(struct v2gPhysicalValueType* v2gPhysicalValueType) {
|
||||
}
|
||||
|
||||
void init_v2gDigestMethodType(struct v2gDigestMethodType* v2gDigestMethodType) {
|
||||
}
|
||||
|
||||
void init_v2gAC_EVSEStatusType(struct v2gAC_EVSEStatusType* v2gAC_EVSEStatusType) {
|
||||
}
|
||||
|
||||
void init_v2gSessionSetupResType(struct v2gSessionSetupResType* v2gSessionSetupResType) {
|
||||
v2gSessionSetupResType->EVSETimeStamp_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gX509IssuerSerialType(struct v2gX509IssuerSerialType* v2gX509IssuerSerialType) {
|
||||
}
|
||||
|
||||
void init_v2gSessionStopReqType(struct v2gSessionStopReqType* v2gSessionStopReqType) {
|
||||
}
|
||||
|
||||
void init_v2gDC_EVSEStatusType(struct v2gDC_EVSEStatusType* v2gDC_EVSEStatusType) {
|
||||
v2gDC_EVSEStatusType->EVSEIsolationStatus_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gDiffieHellmanPublickeyType(struct v2gDiffieHellmanPublickeyType* v2gDiffieHellmanPublickeyType) {
|
||||
}
|
||||
|
||||
void init_v2gCertificateUpdateReqType(struct v2gCertificateUpdateReqType* v2gCertificateUpdateReqType) {
|
||||
}
|
||||
|
||||
void init_v2gBodyBaseType(struct v2gBodyBaseType* v2gBodyBaseType) {
|
||||
}
|
||||
|
||||
void init_v2gDC_EVChargeParameterType(struct v2gDC_EVChargeParameterType* v2gDC_EVChargeParameterType) {
|
||||
v2gDC_EVChargeParameterType->DepartureTime_isUsed = 0u;
|
||||
v2gDC_EVChargeParameterType->EVMaximumPowerLimit_isUsed = 0u;
|
||||
v2gDC_EVChargeParameterType->EVEnergyCapacity_isUsed = 0u;
|
||||
v2gDC_EVChargeParameterType->EVEnergyRequest_isUsed = 0u;
|
||||
v2gDC_EVChargeParameterType->FullSOC_isUsed = 0u;
|
||||
v2gDC_EVChargeParameterType->BulkSOC_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSubCertificatesType(struct v2gSubCertificatesType* v2gSubCertificatesType) {
|
||||
v2gSubCertificatesType->Certificate.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSupportedEnergyTransferModeType(struct v2gSupportedEnergyTransferModeType* v2gSupportedEnergyTransferModeType) {
|
||||
v2gSupportedEnergyTransferModeType->EnergyTransferMode.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gChargingStatusReqType(struct v2gChargingStatusReqType* v2gChargingStatusReqType) {
|
||||
}
|
||||
|
||||
void init_v2gSignaturePropertyType(struct v2gSignaturePropertyType* v2gSignaturePropertyType) {
|
||||
v2gSignaturePropertyType->Id_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gContractSignatureEncryptedPrivateKeyType(struct v2gContractSignatureEncryptedPrivateKeyType* v2gContractSignatureEncryptedPrivateKeyType) {
|
||||
}
|
||||
|
||||
void init_v2gReferenceType(struct v2gReferenceType* v2gReferenceType) {
|
||||
v2gReferenceType->Id_isUsed = 0u;
|
||||
v2gReferenceType->URI_isUsed = 0u;
|
||||
v2gReferenceType->Type_isUsed = 0u;
|
||||
v2gReferenceType->Transforms_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gCurrentDemandResType(struct v2gCurrentDemandResType* v2gCurrentDemandResType) {
|
||||
v2gCurrentDemandResType->EVSEMaximumVoltageLimit_isUsed = 0u;
|
||||
v2gCurrentDemandResType->EVSEMaximumCurrentLimit_isUsed = 0u;
|
||||
v2gCurrentDemandResType->EVSEMaximumPowerLimit_isUsed = 0u;
|
||||
v2gCurrentDemandResType->MeterInfo_isUsed = 0u;
|
||||
v2gCurrentDemandResType->ReceiptRequired_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gCanonicalizationMethodType(struct v2gCanonicalizationMethodType* v2gCanonicalizationMethodType) {
|
||||
}
|
||||
|
||||
void init_v2gTransformType(struct v2gTransformType* v2gTransformType) {
|
||||
v2gTransformType->XPath.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gCertificateChainType(struct v2gCertificateChainType* v2gCertificateChainType) {
|
||||
v2gCertificateChainType->Id_isUsed = 0u;
|
||||
v2gCertificateChainType->SubCertificates_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSignatureValueType(struct v2gSignatureValueType* v2gSignatureValueType) {
|
||||
v2gSignatureValueType->Id_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gEVPowerDeliveryParameterType(struct v2gEVPowerDeliveryParameterType* v2gEVPowerDeliveryParameterType) {
|
||||
}
|
||||
|
||||
void init_v2gServiceDetailReqType(struct v2gServiceDetailReqType* v2gServiceDetailReqType) {
|
||||
}
|
||||
|
||||
void init_v2gPaymentDetailsResType(struct v2gPaymentDetailsResType* v2gPaymentDetailsResType) {
|
||||
}
|
||||
|
||||
void init_v2gX509DataType(struct v2gX509DataType* v2gX509DataType) {
|
||||
v2gX509DataType->X509IssuerSerial.arrayLen = 0u;
|
||||
v2gX509DataType->X509SKI.arrayLen = 0u;
|
||||
v2gX509DataType->X509SubjectName.arrayLen = 0u;
|
||||
v2gX509DataType->X509Certificate.arrayLen = 0u;
|
||||
v2gX509DataType->X509CRL.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gDSAKeyValueType(struct v2gDSAKeyValueType* v2gDSAKeyValueType) {
|
||||
v2gDSAKeyValueType->P_isUsed = 0u;
|
||||
v2gDSAKeyValueType->Q_isUsed = 0u;
|
||||
v2gDSAKeyValueType->G_isUsed = 0u;
|
||||
v2gDSAKeyValueType->J_isUsed = 0u;
|
||||
v2gDSAKeyValueType->Seed_isUsed = 0u;
|
||||
v2gDSAKeyValueType->PgenCounter_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gPowerDeliveryResType(struct v2gPowerDeliveryResType* v2gPowerDeliveryResType) {
|
||||
v2gPowerDeliveryResType->EVSEStatus_isUsed = 0u;
|
||||
v2gPowerDeliveryResType->AC_EVSEStatus_isUsed = 0u;
|
||||
v2gPowerDeliveryResType->DC_EVSEStatus_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gChargeParameterDiscoveryReqType(struct v2gChargeParameterDiscoveryReqType* v2gChargeParameterDiscoveryReqType) {
|
||||
v2gChargeParameterDiscoveryReqType->MaxEntriesSAScheduleTuple_isUsed = 0u;
|
||||
v2gChargeParameterDiscoveryReqType->EVChargeParameter_isUsed = 0u;
|
||||
v2gChargeParameterDiscoveryReqType->AC_EVChargeParameter_isUsed = 0u;
|
||||
v2gChargeParameterDiscoveryReqType->DC_EVChargeParameter_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gParameterSetType(struct v2gParameterSetType* v2gParameterSetType) {
|
||||
v2gParameterSetType->Parameter.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gServiceDiscoveryResType(struct v2gServiceDiscoveryResType* v2gServiceDiscoveryResType) {
|
||||
v2gServiceDiscoveryResType->ServiceList_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gAnonType_V2G_Message(struct v2gAnonType_V2G_Message* v2gAnonType_V2G_Message) {
|
||||
}
|
||||
|
||||
void init_v2gSignatureType(struct v2gSignatureType* v2gSignatureType) {
|
||||
v2gSignatureType->Id_isUsed = 0u;
|
||||
v2gSignatureType->KeyInfo_isUsed = 0u;
|
||||
v2gSignatureType->Object.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gEMAIDType(struct v2gEMAIDType* v2gEMAIDType) {
|
||||
}
|
||||
|
||||
void init_v2gCertificateInstallationResType(struct v2gCertificateInstallationResType* v2gCertificateInstallationResType) {
|
||||
}
|
||||
|
||||
void init_v2gCableCheckResType(struct v2gCableCheckResType* v2gCableCheckResType) {
|
||||
}
|
||||
|
||||
void init_v2gMeterInfoType(struct v2gMeterInfoType* v2gMeterInfoType) {
|
||||
v2gMeterInfoType->MeterReading_isUsed = 0u;
|
||||
v2gMeterInfoType->SigMeterReading_isUsed = 0u;
|
||||
v2gMeterInfoType->MeterStatus_isUsed = 0u;
|
||||
v2gMeterInfoType->TMeter_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gAC_EVChargeParameterType(struct v2gAC_EVChargeParameterType* v2gAC_EVChargeParameterType) {
|
||||
v2gAC_EVChargeParameterType->DepartureTime_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gServiceParameterListType(struct v2gServiceParameterListType* v2gServiceParameterListType) {
|
||||
v2gServiceParameterListType->ParameterSet.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gCurrentDemandReqType(struct v2gCurrentDemandReqType* v2gCurrentDemandReqType) {
|
||||
v2gCurrentDemandReqType->EVMaximumVoltageLimit_isUsed = 0u;
|
||||
v2gCurrentDemandReqType->EVMaximumCurrentLimit_isUsed = 0u;
|
||||
v2gCurrentDemandReqType->EVMaximumPowerLimit_isUsed = 0u;
|
||||
v2gCurrentDemandReqType->BulkChargingComplete_isUsed = 0u;
|
||||
v2gCurrentDemandReqType->RemainingTimeToFullSoC_isUsed = 0u;
|
||||
v2gCurrentDemandReqType->RemainingTimeToBulkSoC_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSASchedulesType(struct v2gSASchedulesType* v2gSASchedulesType) {
|
||||
}
|
||||
|
||||
void init_v2gIntervalType(struct v2gIntervalType* v2gIntervalType) {
|
||||
}
|
||||
|
||||
void init_v2gPreChargeResType(struct v2gPreChargeResType* v2gPreChargeResType) {
|
||||
}
|
||||
|
||||
void init_v2gSalesTariffEntryType(struct v2gSalesTariffEntryType* v2gSalesTariffEntryType) {
|
||||
v2gSalesTariffEntryType->TimeInterval_isUsed = 0u;
|
||||
v2gSalesTariffEntryType->RelativeTimeInterval_isUsed = 0u;
|
||||
v2gSalesTariffEntryType->EPriceLevel_isUsed = 0u;
|
||||
v2gSalesTariffEntryType->ConsumptionCost.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gPaymentOptionListType(struct v2gPaymentOptionListType* v2gPaymentOptionListType) {
|
||||
v2gPaymentOptionListType->PaymentOption.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSignedInfoType(struct v2gSignedInfoType* v2gSignedInfoType) {
|
||||
v2gSignedInfoType->Id_isUsed = 0u;
|
||||
v2gSignedInfoType->Reference.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSessionSetupReqType(struct v2gSessionSetupReqType* v2gSessionSetupReqType) {
|
||||
}
|
||||
|
||||
void init_v2gSignaturePropertiesType(struct v2gSignaturePropertiesType* v2gSignaturePropertiesType) {
|
||||
v2gSignaturePropertiesType->Id_isUsed = 0u;
|
||||
v2gSignaturePropertiesType->SignatureProperty.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gProfileEntryType(struct v2gProfileEntryType* v2gProfileEntryType) {
|
||||
v2gProfileEntryType->ChargingProfileEntryMaxNumberOfPhasesInUse_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gPreChargeReqType(struct v2gPreChargeReqType* v2gPreChargeReqType) {
|
||||
}
|
||||
|
||||
void init_v2gListOfRootCertificateIDsType(struct v2gListOfRootCertificateIDsType* v2gListOfRootCertificateIDsType) {
|
||||
v2gListOfRootCertificateIDsType->RootCertificateID.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gDC_EVPowerDeliveryParameterType(struct v2gDC_EVPowerDeliveryParameterType* v2gDC_EVPowerDeliveryParameterType) {
|
||||
v2gDC_EVPowerDeliveryParameterType->BulkChargingComplete_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gRelativeTimeIntervalType(struct v2gRelativeTimeIntervalType* v2gRelativeTimeIntervalType) {
|
||||
v2gRelativeTimeIntervalType->duration_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gChargingProfileType(struct v2gChargingProfileType* v2gChargingProfileType) {
|
||||
v2gChargingProfileType->ProfileEntry.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gCertificateUpdateResType(struct v2gCertificateUpdateResType* v2gCertificateUpdateResType) {
|
||||
v2gCertificateUpdateResType->RetryCounter_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gMeteringReceiptReqType(struct v2gMeteringReceiptReqType* v2gMeteringReceiptReqType) {
|
||||
v2gMeteringReceiptReqType->Id_isUsed = 0u;
|
||||
v2gMeteringReceiptReqType->SAScheduleTupleID_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gServiceType(struct v2gServiceType* v2gServiceType) {
|
||||
v2gServiceType->ServiceName_isUsed = 0u;
|
||||
v2gServiceType->ServiceScope_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gNotificationType(struct v2gNotificationType* v2gNotificationType) {
|
||||
v2gNotificationType->FaultMsg_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gKeyInfoType(struct v2gKeyInfoType* v2gKeyInfoType) {
|
||||
v2gKeyInfoType->Id_isUsed = 0u;
|
||||
v2gKeyInfoType->KeyName.arrayLen = 0u;
|
||||
v2gKeyInfoType->KeyValue.arrayLen = 0u;
|
||||
v2gKeyInfoType->RetrievalMethod.arrayLen = 0u;
|
||||
v2gKeyInfoType->X509Data.arrayLen = 0u;
|
||||
v2gKeyInfoType->PGPData.arrayLen = 0u;
|
||||
v2gKeyInfoType->SPKIData.arrayLen = 0u;
|
||||
v2gKeyInfoType->MgmtData.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gSelectedServiceListType(struct v2gSelectedServiceListType* v2gSelectedServiceListType) {
|
||||
v2gSelectedServiceListType->SelectedService.arrayLen = 0u;
|
||||
}
|
||||
|
||||
void init_v2gPowerDeliveryReqType(struct v2gPowerDeliveryReqType* v2gPowerDeliveryReqType) {
|
||||
v2gPowerDeliveryReqType->ChargingProfile_isUsed = 0u;
|
||||
v2gPowerDeliveryReqType->EVPowerDeliveryParameter_isUsed = 0u;
|
||||
v2gPowerDeliveryReqType->DC_EVPowerDeliveryParameter_isUsed = 0u;
|
||||
}
|
||||
|
||||
void init_v2gObjectType(struct v2gObjectType* v2gObjectType) {
|
||||
v2gObjectType->Id_isUsed = 0u;
|
||||
v2gObjectType->MimeType_isUsed = 0u;
|
||||
v2gObjectType->Encoding_isUsed = 0u;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
2225
src/codec/v2gEXIDatatypes.h
Normal file
2225
src/codec/v2gEXIDatatypes.h
Normal file
File diff suppressed because it is too large
Load diff
15598
src/codec/v2gEXIDatatypesDecoder.c
Normal file
15598
src/codec/v2gEXIDatatypesDecoder.c
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2012 Siemens AG
|
||||
* Copyright (C) 2007-2014 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
|
||||
|
@ -10,7 +10,6 @@
|
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -19,33 +18,40 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.7
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \file EXIDatatypesDecoder.h
|
||||
* \brief Decoder for datatype definitions
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EXI_v2g_DATATYPES_DECODER_H
|
||||
#define EXI_v2g_DATATYPES_DECODER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "v2gEXIDatatypes.h"
|
||||
|
||||
#ifndef CODER_CHANNEL_H
|
||||
#define CODER_CHANNEL_H
|
||||
|
||||
/** EXI alignment mode - Option bit-packed */
|
||||
#define BIT_PACKED 1
|
||||
/** EXI alignment mode - Option byte-packed */
|
||||
#define BYTE_ALIGNMENT 2
|
||||
/** EXI alignment mode */
|
||||
#define EXI_ALIGNMENT BIT_PACKED
|
||||
|
||||
#endif
|
||||
int decode_v2gExiDocument(bitstream_t* stream, struct v2gEXIDocument* exiDoc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
11183
src/codec/v2gEXIDatatypesEncoder.c
Normal file
11183
src/codec/v2gEXIDatatypesEncoder.c
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,5 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) 2007-2010 Siemens AG
|
||||
* Copyright (C) 2007-2014 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,27 +17,42 @@
|
|||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.9
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer</p>
|
||||
* <p>Schema: V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \file EXIDatatypesEncoder.h
|
||||
* \brief Encoder for datatype definitions
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EXI_v2g_DATATYPES_ENCODER_H
|
||||
#define EXI_v2g_DATATYPES_ENCODER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef V2G_SERVICECLIENTDATATRANSMITTER_H_
|
||||
#define V2G_SERVICECLIENTDATATRANSMITTER_H_
|
||||
#include <stdint.h>
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "v2gEXIDatatypes.h"
|
||||
|
||||
/* This method has to be implemented!
|
||||
* This method sends EXI stream (outStream) to the EVSE and receives response stream (inStream)*/
|
||||
int serviceDataTransmitter(uint8_t* outStream, uint16_t outStreamLength, uint8_t* inStream);
|
||||
|
||||
#endif /* V2G_SERVICECLIENTDATATRANSMITTER_H_ */
|
||||
int encode_v2gExiDocument(bitstream_t* stream, struct v2gEXIDocument* exiDoc);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
File diff suppressed because one or more lines are too long
|
@ -1,225 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_v2g_DECODER_H
|
||||
#define EXI_v2g_DECODER_H
|
||||
|
||||
/**
|
||||
* \file EXIDecoder.h
|
||||
* \brief EXI Decoder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \brief Initialize EXI decoder
|
||||
*
|
||||
* Resets & initializes the EXI decoder.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param runtimeTable Runtime name-tables
|
||||
* \param stringTable String table
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gInitDecoder(bitstream_t* stream, exi_state_t* state,
|
||||
exi_name_table_runtime_t runtimeTable, exi_value_table_t stringTable);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Reports last decoded qualified name
|
||||
*
|
||||
* Note: Qualified name only available for previously unknown qname. Otherwise make use of name table entries.
|
||||
*
|
||||
* \param qname Qualified name
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gGetLastQName(exi_qname_t** qname);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes next event
|
||||
*
|
||||
* Inspects EXI stream and decodes next EXI event.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param nextEvent Next event
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gDecodeNextEvent(bitstream_t* stream,
|
||||
exi_state_t* state, exi_event_t* nextEvent);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes StartDocument (SD) event
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gDecodeStartDocument(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Decodes EndDocument (ED) event
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gDecodeEndDocument(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Decodes StartElement (SE) event
|
||||
*
|
||||
* Note: The first time a qnameID is larger than schema-informed NUMBER_OF_QNAMES it is possible to retrieve the qname by calling GetLastQName(...).
|
||||
* It is up to the caller to track qnames.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified Name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int
|
||||
exiv2gDecodeStartElement(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t* qnameID);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes EndElement (EE) event
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified Name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gDecodeEndElement(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t* qnameID);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes Characters (CH) event.
|
||||
*
|
||||
* Reports characters value.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gDecodeCharacters(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes Attribute (AT) event.
|
||||
*
|
||||
* Reports attribute qname and value.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified Name ID
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gDecodeAttribute(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t* qnameID, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes attribute xsi:nil
|
||||
*
|
||||
* Reports value.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gDecodeAttributeXsiNil(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes attribute xsi:type
|
||||
*
|
||||
* Reports value.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gDecodeAttributeXsiType(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Decodes attribute/characters list value
|
||||
*
|
||||
* List values are special and are processed one by one.
|
||||
*
|
||||
* \param stream Input Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified Name ID
|
||||
* \param val List value
|
||||
* \param lt List type
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gDecodeListValue(bitstream_t* stream, exi_state_t* state, uint16_t qnameID,
|
||||
exi_value_t* val, exi_list_t lt);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -1,274 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_v2g_ENCODER_H
|
||||
#define EXI_v2g_ENCODER_H
|
||||
|
||||
/**
|
||||
* \file EXIEncoder.h
|
||||
* \brief EXI Encoder
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "v2gEXIEncoder.h"
|
||||
|
||||
/**
|
||||
* \brief Initialize EXI encoder
|
||||
*
|
||||
* Resets & initializes the EXI encoder.
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param runtimeTable Runtime name-tables
|
||||
* \param stringTable String table
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gInitEncoder(bitstream_t* stream, exi_state_t* state,
|
||||
exi_name_table_runtime_t runtimeTable, exi_value_table_t stringTable);
|
||||
|
||||
/**
|
||||
* \brief Reports the beginning of a set of XML events
|
||||
*
|
||||
* see EXI StartDocument (SD) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeStartDocument(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Reports the end of a set of XML events
|
||||
*
|
||||
* see EXI EndDocument (ED) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeEndDocument(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Supplies the start of a known element
|
||||
*
|
||||
* Provides access to the namespace URI and local name of the start tag by providing qnameID.
|
||||
* Note: Both, namespace URI and local name are known (schema-informed) or have been encoded before.
|
||||
* see EXI StartElement (SE) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID qualified name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int
|
||||
exiv2gEncodeStartElement(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t qnameID);
|
||||
|
||||
/**
|
||||
* \brief Supplies the start of an element where the namespace is known
|
||||
*
|
||||
* Note: Namespace URI is known (schema-informed) or has been encoded before while local name is unknown.
|
||||
* see EXI StartElement (SE) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param namespaceUriID namespace URI ID
|
||||
* \param localName local name as string
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeStartElementNS(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t namespaceUriID,
|
||||
exi_string_ucs_t* localName);
|
||||
|
||||
/**
|
||||
* \brief Supplies the start of an element where the namespace and the local name is unknown
|
||||
*
|
||||
* Note: Neither namespace URI nor local name is known.
|
||||
* see EXI StartElement (SE) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param namespaceUri namespace URI as string
|
||||
* \param localName local name as string
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeStartElementGeneric(bitstream_t* stream,
|
||||
exi_state_t* state, exi_string_ucs_t* namespaceUri,
|
||||
exi_string_ucs_t* localName);
|
||||
|
||||
/**
|
||||
* \brief Supplies the end tag of an element
|
||||
*
|
||||
* see EXI EndElement (EE) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeEndElement(bitstream_t* stream,
|
||||
exi_state_t* state);
|
||||
|
||||
/**
|
||||
* \brief Supplies characters value
|
||||
*
|
||||
* Note: Special handling for list value.
|
||||
* see EXI Characters (CH) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param val Characters value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeCharacters(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
/**
|
||||
* \brief Supplies an attribute qname and value
|
||||
*
|
||||
* Note: Special handling for list value.
|
||||
* see EXI Attribute (AT) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID qualified name ID
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeAttribute(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t qnameID, exi_value_t* val);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Supplies an attribute qname and value where the namespace is known
|
||||
*
|
||||
* Note: Special handling for list value.
|
||||
* see EXI Attribute (AT) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param namespaceUriID Qualified namespace URI ID
|
||||
* \param localName Qualified localname as String
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeAttributeNS(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t namespaceUriID,
|
||||
exi_string_ucs_t* localName, exi_value_t* val);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Supplies an attribute qname and value where the namespace and the local name is unknown
|
||||
*
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param namespaceUri namespace URI as string
|
||||
* \param localName local name as string
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeAttributeGeneric(bitstream_t* stream,
|
||||
exi_state_t* state, exi_string_ucs_t* namespaceUri,
|
||||
exi_string_ucs_t* localName, exi_value_t* val);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Supplies an xsi:nil attribute
|
||||
*
|
||||
* see EXI Attribute (AT) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeAttributeXsiNil(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
/**
|
||||
* \brief Supplies an xsi:type attribute
|
||||
*
|
||||
* see EXI Attribute (AT) event
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param val Attribute value
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeAttributeXsiType(bitstream_t* stream,
|
||||
exi_state_t* state, exi_value_t* val);
|
||||
|
||||
/**
|
||||
* \brief Supplies list value for characters and attribute event
|
||||
*
|
||||
* List values are special given that first the number and type of entry needs to be passed (element/attribute event) and then one by one the actual values.
|
||||
*
|
||||
* \param stream Output Stream
|
||||
* \param state Codec state
|
||||
* \param qnameID qualified name ID
|
||||
* \param val one list value
|
||||
* \param lt list type
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gEncodeListValue(bitstream_t* stream,
|
||||
exi_state_t* state, uint16_t qnameID, exi_value_t* val, exi_list_t lt);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,204 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef EXI_v2g_NAME_TABLE_ENTRIES_C
|
||||
#define EXI_v2g_NAME_TABLE_ENTRIES_C
|
||||
|
||||
#include "v2gNameTableEntries.h"
|
||||
|
||||
|
||||
|
||||
/* ==================================== */
|
||||
/* String Table Population */
|
||||
|
||||
/* localName entries for URI '', id = 0 */
|
||||
/*
|
||||
"Algorithm", "Encoding", "Id", "MimeType", "Target",
|
||||
"Type", "URI"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'http://www.w3.org/XML/1998/namespace', id = 1 */
|
||||
/*
|
||||
"base", "id", "lang", "space"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'http://www.w3.org/2001/XMLSchema-instance', id = 2 */
|
||||
/*
|
||||
"nil", "type"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'http://www.w3.org/2001/XMLSchema', id = 3 */
|
||||
/*
|
||||
"ENTITIES", "ENTITY", "ID", "IDREF", "IDREFS",
|
||||
"NCName", "NMTOKEN", "NMTOKENS", "NOTATION", "Name",
|
||||
"QName", "anySimpleType", "anyType", "anyURI", "base64Binary",
|
||||
"boolean", "byte", "date", "dateTime", "decimal",
|
||||
"double", "duration", "float", "gDay", "gMonth",
|
||||
"gMonthDay", "gYear", "gYearMonth", "hexBinary", "int",
|
||||
"integer", "language", "long", "negativeInteger", "nonNegativeInteger",
|
||||
"nonPositiveInteger", "normalizedString", "positiveInteger", "short", "string",
|
||||
"time", "token", "unsignedByte", "unsignedInt", "unsignedLong",
|
||||
"unsignedShort"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'http://www.w3.org/2000/09/xmldsig#', id = 4 */
|
||||
/*
|
||||
"CanonicalizationMethod", "CanonicalizationMethodType", "CryptoBinary", "DSAKeyValue", "DSAKeyValueType",
|
||||
"DigestMethod", "DigestMethodType", "DigestValue", "DigestValueType", "Exponent",
|
||||
"G", "HMACOutputLength", "HMACOutputLengthType", "J", "KeyInfo",
|
||||
"KeyInfoType", "KeyName", "KeyValue", "KeyValueType", "Manifest",
|
||||
"ManifestType", "MgmtData", "Modulus", "Object", "ObjectType",
|
||||
"P", "PGPData", "PGPDataType", "PGPKeyID", "PGPKeyPacket",
|
||||
"PgenCounter", "Q", "RSAKeyValue", "RSAKeyValueType", "Reference",
|
||||
"ReferenceType", "RetrievalMethod", "RetrievalMethodType", "SPKIData", "SPKIDataType",
|
||||
"SPKISexp", "Seed", "Signature", "SignatureMethod", "SignatureMethodType",
|
||||
"SignatureProperties", "SignaturePropertiesType", "SignatureProperty", "SignaturePropertyType", "SignatureType",
|
||||
"SignatureValue", "SignatureValueType", "SignedInfo", "SignedInfoType", "Transform",
|
||||
"TransformType", "Transforms", "TransformsType", "X509CRL", "X509Certificate",
|
||||
"X509Data", "X509DataType", "X509IssuerName", "X509IssuerSerial", "X509IssuerSerialType",
|
||||
"X509SKI", "X509SerialNumber", "X509SubjectName", "XPath", "Y"
|
||||
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'urn:iso:15118:2:2013:MsgBody', id = 5 */
|
||||
/*
|
||||
"AC_EVSEStatus", "AuthorizationReq", "AuthorizationReqType", "AuthorizationRes", "AuthorizationResType",
|
||||
"BodyBaseType", "BodyElement", "BodyType", "BulkChargingComplete", "CableCheckReq",
|
||||
"CableCheckReqType", "CableCheckRes", "CableCheckResType", "CertificateInstallationReq", "CertificateInstallationReqType",
|
||||
"CertificateInstallationRes", "CertificateInstallationResType", "CertificateUpdateReq", "CertificateUpdateReqType", "CertificateUpdateRes",
|
||||
"CertificateUpdateResType", "ChargeParameterDiscoveryReq", "ChargeParameterDiscoveryReqType", "ChargeParameterDiscoveryRes", "ChargeParameterDiscoveryResType",
|
||||
"ChargeProgress", "ChargeService", "ChargingComplete", "ChargingProfile", "ChargingSession",
|
||||
"ChargingStatusReq", "ChargingStatusReqType", "ChargingStatusRes", "ChargingStatusResType", "ContractSignatureCertChain",
|
||||
"ContractSignatureEncryptedPrivateKey", "CurrentDemandReq", "CurrentDemandReqType", "CurrentDemandRes", "CurrentDemandResType",
|
||||
"DC_EVSEStatus", "DC_EVStatus", "DHpublickey", "EVCCID", "EVMaximumCurrentLimit",
|
||||
"EVMaximumPowerLimit", "EVMaximumVoltageLimit", "EVSECurrentLimitAchieved", "EVSEID", "EVSEMaxCurrent",
|
||||
"EVSEMaximumCurrentLimit", "EVSEMaximumPowerLimit", "EVSEMaximumVoltageLimit", "EVSEPowerLimitAchieved", "EVSEPresentCurrent",
|
||||
"EVSEPresentVoltage", "EVSEProcessing", "EVSETimeStamp", "EVSEVoltageLimitAchieved", "EVTargetCurrent",
|
||||
"EVTargetVoltage", "GenChallenge", "Id", "ListOfRootCertificateIDs", "MaxEntriesSAScheduleTuple",
|
||||
"MeterInfo", "MeteringReceiptReq", "MeteringReceiptReqType", "MeteringReceiptRes", "MeteringReceiptResType",
|
||||
"OEMProvisioningCert", "PaymentDetailsReq", "PaymentDetailsReqType", "PaymentDetailsRes", "PaymentDetailsResType",
|
||||
"PaymentOptionList", "PaymentServiceSelectionReq", "PaymentServiceSelectionReqType", "PaymentServiceSelectionRes", "PaymentServiceSelectionResType",
|
||||
"PowerDeliveryReq", "PowerDeliveryReqType", "PowerDeliveryRes", "PowerDeliveryResType", "PreChargeReq",
|
||||
"PreChargeReqType", "PreChargeRes", "PreChargeResType", "ReceiptRequired", "RemainingTimeToBulkSoC",
|
||||
"RemainingTimeToFullSoC", "RequestedEnergyTransferMode", "ResponseCode", "RetryCounter", "SAProvisioningCertificateChain",
|
||||
"SAScheduleTupleID", "SelectedPaymentOption", "SelectedServiceList", "ServiceCategory", "ServiceDetailReq",
|
||||
"ServiceDetailReqType", "ServiceDetailRes", "ServiceDetailResType", "ServiceDiscoveryReq", "ServiceDiscoveryReqType",
|
||||
"ServiceDiscoveryRes", "ServiceDiscoveryResType", "ServiceID", "ServiceList", "ServiceParameterList",
|
||||
"ServiceScope", "SessionID", "SessionSetupReq", "SessionSetupReqType", "SessionSetupRes",
|
||||
"SessionSetupResType", "SessionStopReq", "SessionStopReqType", "SessionStopRes", "SessionStopResType",
|
||||
"WeldingDetectionReq", "WeldingDetectionReqType", "WeldingDetectionRes", "WeldingDetectionResType", "eMAID"
|
||||
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'urn:iso:15118:2:2013:MsgDataTypes', id = 6 */
|
||||
/*
|
||||
"AC_EVChargeParameter", "AC_EVChargeParameterType", "AC_EVSEChargeParameter", "AC_EVSEChargeParameterType", "AC_EVSEStatus",
|
||||
"AC_EVSEStatusType", "BulkChargingComplete", "BulkSOC", "Certificate", "CertificateChainType",
|
||||
"ChargeServiceType", "ChargingComplete", "ChargingProfileEntryMaxNumberOfPhasesInUse", "ChargingProfileEntryMaxPower", "ChargingProfileEntryStart",
|
||||
"ChargingProfileType", "ConsumptionCost", "ConsumptionCostType", "ContractSignatureEncryptedPrivateKeyType", "Cost",
|
||||
"CostType", "DC_EVChargeParameter", "DC_EVChargeParameterType", "DC_EVErrorCodeType", "DC_EVPowerDeliveryParameter",
|
||||
"DC_EVPowerDeliveryParameterType", "DC_EVSEChargeParameter", "DC_EVSEChargeParameterType", "DC_EVSEStatus", "DC_EVSEStatusCodeType",
|
||||
"DC_EVSEStatusType", "DC_EVStatus", "DC_EVStatusType", "DepartureTime", "DiffieHellmanPublickeyType",
|
||||
"EAmount", "EMAIDType", "EPriceLevel", "EVChargeParameter", "EVChargeParameterType",
|
||||
"EVEnergyCapacity", "EVEnergyRequest", "EVErrorCode", "EVMaxCurrent", "EVMaxVoltage",
|
||||
"EVMaximumCurrentLimit", "EVMaximumPowerLimit", "EVMaximumVoltageLimit", "EVMinCurrent", "EVPowerDeliveryParameter",
|
||||
"EVPowerDeliveryParameterType", "EVRESSSOC", "EVReady", "EVSEChargeParameter", "EVSEChargeParameterType",
|
||||
"EVSECurrentRegulationTolerance", "EVSEEnergyToBeDelivered", "EVSEIsolationStatus", "EVSEMaxCurrent", "EVSEMaximumCurrentLimit",
|
||||
"EVSEMaximumPowerLimit", "EVSEMaximumVoltageLimit", "EVSEMinimumCurrentLimit", "EVSEMinimumVoltageLimit", "EVSENominalVoltage",
|
||||
"EVSENotification", "EVSENotificationType", "EVSEPeakCurrentRipple", "EVSEProcessingType", "EVSEStatus",
|
||||
"EVSEStatusCode", "EVSEStatusType", "EVStatus", "EVStatusType", "EnergyTransferMode",
|
||||
"EnergyTransferModeType", "Entry", "EntryType", "FaultCode", "FaultMsg",
|
||||
"FreeService", "FullSOC", "Id", "IntervalType", "ListOfRootCertificateIDsType",
|
||||
"MeterID", "MeterInfoType", "MeterReading", "MeterStatus", "Multiplier",
|
||||
"Name", "NotificationMaxDelay", "NotificationType", "NumEPriceLevels", "PMax",
|
||||
"PMaxSchedule", "PMaxScheduleEntry", "PMaxScheduleEntryType", "PMaxScheduleType", "Parameter",
|
||||
"ParameterSet", "ParameterSetID", "ParameterSetType", "ParameterType", "PaymentOption",
|
||||
"PaymentOptionListType", "PhysicalValueType", "ProfileEntry", "ProfileEntryType", "RCD",
|
||||
"RelativeTimeInterval", "RelativeTimeIntervalType", "RootCertificateID", "SAIDType", "SAScheduleList",
|
||||
"SAScheduleListType", "SAScheduleTuple", "SAScheduleTupleID", "SAScheduleTupleType", "SASchedules",
|
||||
"SASchedulesType", "SalesTariff", "SalesTariffDescription", "SalesTariffEntry", "SalesTariffEntryType",
|
||||
"SalesTariffID", "SalesTariffType", "SelectedService", "SelectedServiceListType", "SelectedServiceType",
|
||||
"Service", "ServiceCategory", "ServiceID", "ServiceListType", "ServiceName",
|
||||
"ServiceParameterListType", "ServiceScope", "ServiceType", "SigMeterReading", "SubCertificates",
|
||||
"SubCertificatesType", "SupportedEnergyTransferMode", "SupportedEnergyTransferModeType", "TMeter", "TimeInterval",
|
||||
"Unit", "Value", "amount", "amountMultiplier", "boolValue",
|
||||
"byteValue", "certificateType", "chargeProgressType", "chargingSessionType", "costKind",
|
||||
"costKindType", "dHpublickeyType", "duration", "eMAIDType", "evccIDType",
|
||||
"evseIDType", "faultCodeType", "faultMsgType", "genChallengeType", "intValue",
|
||||
"isolationLevelType", "maxNumPhasesType", "meterIDType", "meterStatusType", "paymentOptionType",
|
||||
"percentValueType", "physicalValue", "privateKeyType", "responseCodeType", "serviceCategoryType",
|
||||
"serviceIDType", "serviceNameType", "serviceScopeType", "sessionIDType", "shortValue",
|
||||
"sigMeterReadingType", "start", "startValue", "stringValue", "tariffDescriptionType",
|
||||
"unitMultiplierType", "unitSymbolType", "valueType"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'urn:iso:15118:2:2013:MsgDef', id = 7 */
|
||||
/*
|
||||
"Body", "Header", "V2G_Message"
|
||||
*/
|
||||
|
||||
/* localName entries for URI 'urn:iso:15118:2:2013:MsgHeader', id = 8 */
|
||||
/*
|
||||
"MessageHeaderType", "Notification", "SessionID"
|
||||
*/
|
||||
|
||||
|
||||
/* number of local-name entries per URI */
|
||||
static uint16_t localNames[9] = {
|
||||
/* '' */
|
||||
7,
|
||||
/* 'http://www.w3.org/XML/1998/namespace' */
|
||||
4,
|
||||
/* 'http://www.w3.org/2001/XMLSchema-instance' */
|
||||
2,
|
||||
/* 'http://www.w3.org/2001/XMLSchema' */
|
||||
46,
|
||||
/* 'http://www.w3.org/2000/09/xmldsig#' */
|
||||
70,
|
||||
/* 'urn:iso:15118:2:2013:MsgBody' */
|
||||
125,
|
||||
/* 'urn:iso:15118:2:2013:MsgDataTypes' */
|
||||
188,
|
||||
/* 'urn:iso:15118:2:2013:MsgDef' */
|
||||
3,
|
||||
/* 'urn:iso:15118:2:2013:MsgHeader' */
|
||||
3
|
||||
};
|
||||
|
||||
|
||||
exi_name_table_prepopulated_t exiv2gNameTablePrepopulated = { 9, localNames };
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_v2g_QNAME_DEFINES_H
|
||||
#define EXI_v2g_QNAME_DEFINES_H
|
||||
|
||||
/** Number of pre-populated qnames */
|
||||
#define EXI_v2gNUMBER_OF_PREPOPULATED_QNAMES 448
|
||||
|
||||
/** Number of runtime qnames */
|
||||
#define EXI_v2gMAX_NUMBER_OF_SUPPORTED_RUNTIMES_QNAMES 100
|
||||
|
||||
/** Number of overall qnames (pre-populated from schema and runtime qnames) */
|
||||
#define EXI_v2gMAX_NUMBER_OF_QNAMES (EXI_v2gNUMBER_OF_PREPOPULATED_QNAMES + EXI_v2gMAX_NUMBER_OF_SUPPORTED_RUNTIMES_QNAMES)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,989 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef EXI_v2g_QNAMES_C
|
||||
#define EXI_v2g_QNAMES_C
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "ErrorCodes.h"
|
||||
#include "v2gQNameDefines.h"
|
||||
|
||||
/* qname is a composition of namespaceURI(ID) and localPart(ID) */
|
||||
static exi_eqname_t qnames[EXI_v2gMAX_NUMBER_OF_QNAMES] = {
|
||||
/* qnameID == 0: Algorithm */
|
||||
{0, 0},
|
||||
/* qnameID == 1: Encoding */
|
||||
{0, 1},
|
||||
/* qnameID == 2: Id */
|
||||
{0, 2},
|
||||
/* qnameID == 3: MimeType */
|
||||
{0, 3},
|
||||
/* qnameID == 4: Target */
|
||||
{0, 4},
|
||||
/* qnameID == 5: Type */
|
||||
{0, 5},
|
||||
/* qnameID == 6: URI */
|
||||
{0, 6},
|
||||
/* qnameID == 7: {http://www.w3.org/XML/1998/namespace}base */
|
||||
{1, 0},
|
||||
/* qnameID == 8: {http://www.w3.org/XML/1998/namespace}id */
|
||||
{1, 1},
|
||||
/* qnameID == 9: {http://www.w3.org/XML/1998/namespace}lang */
|
||||
{1, 2},
|
||||
/* qnameID == 10: {http://www.w3.org/XML/1998/namespace}space */
|
||||
{1, 3},
|
||||
/* qnameID == 11: {http://www.w3.org/2001/XMLSchema-instance}nil */
|
||||
{2, 0},
|
||||
/* qnameID == 12: {http://www.w3.org/2001/XMLSchema-instance}type */
|
||||
{2, 1},
|
||||
/* qnameID == 13: {http://www.w3.org/2001/XMLSchema}ENTITIES */
|
||||
{3, 0},
|
||||
/* qnameID == 14: {http://www.w3.org/2001/XMLSchema}ENTITY */
|
||||
{3, 1},
|
||||
/* qnameID == 15: {http://www.w3.org/2001/XMLSchema}ID */
|
||||
{3, 2},
|
||||
/* qnameID == 16: {http://www.w3.org/2001/XMLSchema}IDREF */
|
||||
{3, 3},
|
||||
/* qnameID == 17: {http://www.w3.org/2001/XMLSchema}IDREFS */
|
||||
{3, 4},
|
||||
/* qnameID == 18: {http://www.w3.org/2001/XMLSchema}NCName */
|
||||
{3, 5},
|
||||
/* qnameID == 19: {http://www.w3.org/2001/XMLSchema}NMTOKEN */
|
||||
{3, 6},
|
||||
/* qnameID == 20: {http://www.w3.org/2001/XMLSchema}NMTOKENS */
|
||||
{3, 7},
|
||||
/* qnameID == 21: {http://www.w3.org/2001/XMLSchema}NOTATION */
|
||||
{3, 8},
|
||||
/* qnameID == 22: {http://www.w3.org/2001/XMLSchema}Name */
|
||||
{3, 9},
|
||||
/* qnameID == 23: {http://www.w3.org/2001/XMLSchema}QName */
|
||||
{3, 10},
|
||||
/* qnameID == 24: {http://www.w3.org/2001/XMLSchema}anySimpleType */
|
||||
{3, 11},
|
||||
/* qnameID == 25: {http://www.w3.org/2001/XMLSchema}anyType */
|
||||
{3, 12},
|
||||
/* qnameID == 26: {http://www.w3.org/2001/XMLSchema}anyURI */
|
||||
{3, 13},
|
||||
/* qnameID == 27: {http://www.w3.org/2001/XMLSchema}base64Binary */
|
||||
{3, 14},
|
||||
/* qnameID == 28: {http://www.w3.org/2001/XMLSchema}boolean */
|
||||
{3, 15},
|
||||
/* qnameID == 29: {http://www.w3.org/2001/XMLSchema}byte */
|
||||
{3, 16},
|
||||
/* qnameID == 30: {http://www.w3.org/2001/XMLSchema}date */
|
||||
{3, 17},
|
||||
/* qnameID == 31: {http://www.w3.org/2001/XMLSchema}dateTime */
|
||||
{3, 18},
|
||||
/* qnameID == 32: {http://www.w3.org/2001/XMLSchema}decimal */
|
||||
{3, 19},
|
||||
/* qnameID == 33: {http://www.w3.org/2001/XMLSchema}double */
|
||||
{3, 20},
|
||||
/* qnameID == 34: {http://www.w3.org/2001/XMLSchema}duration */
|
||||
{3, 21},
|
||||
/* qnameID == 35: {http://www.w3.org/2001/XMLSchema}float */
|
||||
{3, 22},
|
||||
/* qnameID == 36: {http://www.w3.org/2001/XMLSchema}gDay */
|
||||
{3, 23},
|
||||
/* qnameID == 37: {http://www.w3.org/2001/XMLSchema}gMonth */
|
||||
{3, 24},
|
||||
/* qnameID == 38: {http://www.w3.org/2001/XMLSchema}gMonthDay */
|
||||
{3, 25},
|
||||
/* qnameID == 39: {http://www.w3.org/2001/XMLSchema}gYear */
|
||||
{3, 26},
|
||||
/* qnameID == 40: {http://www.w3.org/2001/XMLSchema}gYearMonth */
|
||||
{3, 27},
|
||||
/* qnameID == 41: {http://www.w3.org/2001/XMLSchema}hexBinary */
|
||||
{3, 28},
|
||||
/* qnameID == 42: {http://www.w3.org/2001/XMLSchema}int */
|
||||
{3, 29},
|
||||
/* qnameID == 43: {http://www.w3.org/2001/XMLSchema}integer */
|
||||
{3, 30},
|
||||
/* qnameID == 44: {http://www.w3.org/2001/XMLSchema}language */
|
||||
{3, 31},
|
||||
/* qnameID == 45: {http://www.w3.org/2001/XMLSchema}long */
|
||||
{3, 32},
|
||||
/* qnameID == 46: {http://www.w3.org/2001/XMLSchema}negativeInteger */
|
||||
{3, 33},
|
||||
/* qnameID == 47: {http://www.w3.org/2001/XMLSchema}nonNegativeInteger */
|
||||
{3, 34},
|
||||
/* qnameID == 48: {http://www.w3.org/2001/XMLSchema}nonPositiveInteger */
|
||||
{3, 35},
|
||||
/* qnameID == 49: {http://www.w3.org/2001/XMLSchema}normalizedString */
|
||||
{3, 36},
|
||||
/* qnameID == 50: {http://www.w3.org/2001/XMLSchema}positiveInteger */
|
||||
{3, 37},
|
||||
/* qnameID == 51: {http://www.w3.org/2001/XMLSchema}short */
|
||||
{3, 38},
|
||||
/* qnameID == 52: {http://www.w3.org/2001/XMLSchema}string */
|
||||
{3, 39},
|
||||
/* qnameID == 53: {http://www.w3.org/2001/XMLSchema}time */
|
||||
{3, 40},
|
||||
/* qnameID == 54: {http://www.w3.org/2001/XMLSchema}token */
|
||||
{3, 41},
|
||||
/* qnameID == 55: {http://www.w3.org/2001/XMLSchema}unsignedByte */
|
||||
{3, 42},
|
||||
/* qnameID == 56: {http://www.w3.org/2001/XMLSchema}unsignedInt */
|
||||
{3, 43},
|
||||
/* qnameID == 57: {http://www.w3.org/2001/XMLSchema}unsignedLong */
|
||||
{3, 44},
|
||||
/* qnameID == 58: {http://www.w3.org/2001/XMLSchema}unsignedShort */
|
||||
{3, 45},
|
||||
/* qnameID == 59: {http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod */
|
||||
{4, 0},
|
||||
/* qnameID == 60: {http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethodType */
|
||||
{4, 1},
|
||||
/* qnameID == 61: {http://www.w3.org/2000/09/xmldsig#}CryptoBinary */
|
||||
{4, 2},
|
||||
/* qnameID == 62: {http://www.w3.org/2000/09/xmldsig#}DSAKeyValue */
|
||||
{4, 3},
|
||||
/* qnameID == 63: {http://www.w3.org/2000/09/xmldsig#}DSAKeyValueType */
|
||||
{4, 4},
|
||||
/* qnameID == 64: {http://www.w3.org/2000/09/xmldsig#}DigestMethod */
|
||||
{4, 5},
|
||||
/* qnameID == 65: {http://www.w3.org/2000/09/xmldsig#}DigestMethodType */
|
||||
{4, 6},
|
||||
/* qnameID == 66: {http://www.w3.org/2000/09/xmldsig#}DigestValue */
|
||||
{4, 7},
|
||||
/* qnameID == 67: {http://www.w3.org/2000/09/xmldsig#}DigestValueType */
|
||||
{4, 8},
|
||||
/* qnameID == 68: {http://www.w3.org/2000/09/xmldsig#}Exponent */
|
||||
{4, 9},
|
||||
/* qnameID == 69: {http://www.w3.org/2000/09/xmldsig#}G */
|
||||
{4, 10},
|
||||
/* qnameID == 70: {http://www.w3.org/2000/09/xmldsig#}HMACOutputLength */
|
||||
{4, 11},
|
||||
/* qnameID == 71: {http://www.w3.org/2000/09/xmldsig#}HMACOutputLengthType */
|
||||
{4, 12},
|
||||
/* qnameID == 72: {http://www.w3.org/2000/09/xmldsig#}J */
|
||||
{4, 13},
|
||||
/* qnameID == 73: {http://www.w3.org/2000/09/xmldsig#}KeyInfo */
|
||||
{4, 14},
|
||||
/* qnameID == 74: {http://www.w3.org/2000/09/xmldsig#}KeyInfoType */
|
||||
{4, 15},
|
||||
/* qnameID == 75: {http://www.w3.org/2000/09/xmldsig#}KeyName */
|
||||
{4, 16},
|
||||
/* qnameID == 76: {http://www.w3.org/2000/09/xmldsig#}KeyValue */
|
||||
{4, 17},
|
||||
/* qnameID == 77: {http://www.w3.org/2000/09/xmldsig#}KeyValueType */
|
||||
{4, 18},
|
||||
/* qnameID == 78: {http://www.w3.org/2000/09/xmldsig#}Manifest */
|
||||
{4, 19},
|
||||
/* qnameID == 79: {http://www.w3.org/2000/09/xmldsig#}ManifestType */
|
||||
{4, 20},
|
||||
/* qnameID == 80: {http://www.w3.org/2000/09/xmldsig#}MgmtData */
|
||||
{4, 21},
|
||||
/* qnameID == 81: {http://www.w3.org/2000/09/xmldsig#}Modulus */
|
||||
{4, 22},
|
||||
/* qnameID == 82: {http://www.w3.org/2000/09/xmldsig#}Object */
|
||||
{4, 23},
|
||||
/* qnameID == 83: {http://www.w3.org/2000/09/xmldsig#}ObjectType */
|
||||
{4, 24},
|
||||
/* qnameID == 84: {http://www.w3.org/2000/09/xmldsig#}P */
|
||||
{4, 25},
|
||||
/* qnameID == 85: {http://www.w3.org/2000/09/xmldsig#}PGPData */
|
||||
{4, 26},
|
||||
/* qnameID == 86: {http://www.w3.org/2000/09/xmldsig#}PGPDataType */
|
||||
{4, 27},
|
||||
/* qnameID == 87: {http://www.w3.org/2000/09/xmldsig#}PGPKeyID */
|
||||
{4, 28},
|
||||
/* qnameID == 88: {http://www.w3.org/2000/09/xmldsig#}PGPKeyPacket */
|
||||
{4, 29},
|
||||
/* qnameID == 89: {http://www.w3.org/2000/09/xmldsig#}PgenCounter */
|
||||
{4, 30},
|
||||
/* qnameID == 90: {http://www.w3.org/2000/09/xmldsig#}Q */
|
||||
{4, 31},
|
||||
/* qnameID == 91: {http://www.w3.org/2000/09/xmldsig#}RSAKeyValue */
|
||||
{4, 32},
|
||||
/* qnameID == 92: {http://www.w3.org/2000/09/xmldsig#}RSAKeyValueType */
|
||||
{4, 33},
|
||||
/* qnameID == 93: {http://www.w3.org/2000/09/xmldsig#}Reference */
|
||||
{4, 34},
|
||||
/* qnameID == 94: {http://www.w3.org/2000/09/xmldsig#}ReferenceType */
|
||||
{4, 35},
|
||||
/* qnameID == 95: {http://www.w3.org/2000/09/xmldsig#}RetrievalMethod */
|
||||
{4, 36},
|
||||
/* qnameID == 96: {http://www.w3.org/2000/09/xmldsig#}RetrievalMethodType */
|
||||
{4, 37},
|
||||
/* qnameID == 97: {http://www.w3.org/2000/09/xmldsig#}SPKIData */
|
||||
{4, 38},
|
||||
/* qnameID == 98: {http://www.w3.org/2000/09/xmldsig#}SPKIDataType */
|
||||
{4, 39},
|
||||
/* qnameID == 99: {http://www.w3.org/2000/09/xmldsig#}SPKISexp */
|
||||
{4, 40},
|
||||
/* qnameID == 100: {http://www.w3.org/2000/09/xmldsig#}Seed */
|
||||
{4, 41},
|
||||
/* qnameID == 101: {http://www.w3.org/2000/09/xmldsig#}Signature */
|
||||
{4, 42},
|
||||
/* qnameID == 102: {http://www.w3.org/2000/09/xmldsig#}SignatureMethod */
|
||||
{4, 43},
|
||||
/* qnameID == 103: {http://www.w3.org/2000/09/xmldsig#}SignatureMethodType */
|
||||
{4, 44},
|
||||
/* qnameID == 104: {http://www.w3.org/2000/09/xmldsig#}SignatureProperties */
|
||||
{4, 45},
|
||||
/* qnameID == 105: {http://www.w3.org/2000/09/xmldsig#}SignaturePropertiesType */
|
||||
{4, 46},
|
||||
/* qnameID == 106: {http://www.w3.org/2000/09/xmldsig#}SignatureProperty */
|
||||
{4, 47},
|
||||
/* qnameID == 107: {http://www.w3.org/2000/09/xmldsig#}SignaturePropertyType */
|
||||
{4, 48},
|
||||
/* qnameID == 108: {http://www.w3.org/2000/09/xmldsig#}SignatureType */
|
||||
{4, 49},
|
||||
/* qnameID == 109: {http://www.w3.org/2000/09/xmldsig#}SignatureValue */
|
||||
{4, 50},
|
||||
/* qnameID == 110: {http://www.w3.org/2000/09/xmldsig#}SignatureValueType */
|
||||
{4, 51},
|
||||
/* qnameID == 111: {http://www.w3.org/2000/09/xmldsig#}SignedInfo */
|
||||
{4, 52},
|
||||
/* qnameID == 112: {http://www.w3.org/2000/09/xmldsig#}SignedInfoType */
|
||||
{4, 53},
|
||||
/* qnameID == 113: {http://www.w3.org/2000/09/xmldsig#}Transform */
|
||||
{4, 54},
|
||||
/* qnameID == 114: {http://www.w3.org/2000/09/xmldsig#}TransformType */
|
||||
{4, 55},
|
||||
/* qnameID == 115: {http://www.w3.org/2000/09/xmldsig#}Transforms */
|
||||
{4, 56},
|
||||
/* qnameID == 116: {http://www.w3.org/2000/09/xmldsig#}TransformsType */
|
||||
{4, 57},
|
||||
/* qnameID == 117: {http://www.w3.org/2000/09/xmldsig#}X509CRL */
|
||||
{4, 58},
|
||||
/* qnameID == 118: {http://www.w3.org/2000/09/xmldsig#}X509Certificate */
|
||||
{4, 59},
|
||||
/* qnameID == 119: {http://www.w3.org/2000/09/xmldsig#}X509Data */
|
||||
{4, 60},
|
||||
/* qnameID == 120: {http://www.w3.org/2000/09/xmldsig#}X509DataType */
|
||||
{4, 61},
|
||||
/* qnameID == 121: {http://www.w3.org/2000/09/xmldsig#}X509IssuerName */
|
||||
{4, 62},
|
||||
/* qnameID == 122: {http://www.w3.org/2000/09/xmldsig#}X509IssuerSerial */
|
||||
{4, 63},
|
||||
/* qnameID == 123: {http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType */
|
||||
{4, 64},
|
||||
/* qnameID == 124: {http://www.w3.org/2000/09/xmldsig#}X509SKI */
|
||||
{4, 65},
|
||||
/* qnameID == 125: {http://www.w3.org/2000/09/xmldsig#}X509SerialNumber */
|
||||
{4, 66},
|
||||
/* qnameID == 126: {http://www.w3.org/2000/09/xmldsig#}X509SubjectName */
|
||||
{4, 67},
|
||||
/* qnameID == 127: {http://www.w3.org/2000/09/xmldsig#}XPath */
|
||||
{4, 68},
|
||||
/* qnameID == 128: {http://www.w3.org/2000/09/xmldsig#}Y */
|
||||
{4, 69},
|
||||
/* qnameID == 129: {urn:iso:15118:2:2013:MsgBody}AC_EVSEStatus */
|
||||
{5, 0},
|
||||
/* qnameID == 130: {urn:iso:15118:2:2013:MsgBody}AuthorizationReq */
|
||||
{5, 1},
|
||||
/* qnameID == 131: {urn:iso:15118:2:2013:MsgBody}AuthorizationReqType */
|
||||
{5, 2},
|
||||
/* qnameID == 132: {urn:iso:15118:2:2013:MsgBody}AuthorizationRes */
|
||||
{5, 3},
|
||||
/* qnameID == 133: {urn:iso:15118:2:2013:MsgBody}AuthorizationResType */
|
||||
{5, 4},
|
||||
/* qnameID == 134: {urn:iso:15118:2:2013:MsgBody}BodyBaseType */
|
||||
{5, 5},
|
||||
/* qnameID == 135: {urn:iso:15118:2:2013:MsgBody}BodyElement */
|
||||
{5, 6},
|
||||
/* qnameID == 136: {urn:iso:15118:2:2013:MsgBody}BodyType */
|
||||
{5, 7},
|
||||
/* qnameID == 137: {urn:iso:15118:2:2013:MsgBody}BulkChargingComplete */
|
||||
{5, 8},
|
||||
/* qnameID == 138: {urn:iso:15118:2:2013:MsgBody}CableCheckReq */
|
||||
{5, 9},
|
||||
/* qnameID == 139: {urn:iso:15118:2:2013:MsgBody}CableCheckReqType */
|
||||
{5, 10},
|
||||
/* qnameID == 140: {urn:iso:15118:2:2013:MsgBody}CableCheckRes */
|
||||
{5, 11},
|
||||
/* qnameID == 141: {urn:iso:15118:2:2013:MsgBody}CableCheckResType */
|
||||
{5, 12},
|
||||
/* qnameID == 142: {urn:iso:15118:2:2013:MsgBody}CertificateInstallationReq */
|
||||
{5, 13},
|
||||
/* qnameID == 143: {urn:iso:15118:2:2013:MsgBody}CertificateInstallationReqType */
|
||||
{5, 14},
|
||||
/* qnameID == 144: {urn:iso:15118:2:2013:MsgBody}CertificateInstallationRes */
|
||||
{5, 15},
|
||||
/* qnameID == 145: {urn:iso:15118:2:2013:MsgBody}CertificateInstallationResType */
|
||||
{5, 16},
|
||||
/* qnameID == 146: {urn:iso:15118:2:2013:MsgBody}CertificateUpdateReq */
|
||||
{5, 17},
|
||||
/* qnameID == 147: {urn:iso:15118:2:2013:MsgBody}CertificateUpdateReqType */
|
||||
{5, 18},
|
||||
/* qnameID == 148: {urn:iso:15118:2:2013:MsgBody}CertificateUpdateRes */
|
||||
{5, 19},
|
||||
/* qnameID == 149: {urn:iso:15118:2:2013:MsgBody}CertificateUpdateResType */
|
||||
{5, 20},
|
||||
/* qnameID == 150: {urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryReq */
|
||||
{5, 21},
|
||||
/* qnameID == 151: {urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryReqType */
|
||||
{5, 22},
|
||||
/* qnameID == 152: {urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryRes */
|
||||
{5, 23},
|
||||
/* qnameID == 153: {urn:iso:15118:2:2013:MsgBody}ChargeParameterDiscoveryResType */
|
||||
{5, 24},
|
||||
/* qnameID == 154: {urn:iso:15118:2:2013:MsgBody}ChargeProgress */
|
||||
{5, 25},
|
||||
/* qnameID == 155: {urn:iso:15118:2:2013:MsgBody}ChargeService */
|
||||
{5, 26},
|
||||
/* qnameID == 156: {urn:iso:15118:2:2013:MsgBody}ChargingComplete */
|
||||
{5, 27},
|
||||
/* qnameID == 157: {urn:iso:15118:2:2013:MsgBody}ChargingProfile */
|
||||
{5, 28},
|
||||
/* qnameID == 158: {urn:iso:15118:2:2013:MsgBody}ChargingSession */
|
||||
{5, 29},
|
||||
/* qnameID == 159: {urn:iso:15118:2:2013:MsgBody}ChargingStatusReq */
|
||||
{5, 30},
|
||||
/* qnameID == 160: {urn:iso:15118:2:2013:MsgBody}ChargingStatusReqType */
|
||||
{5, 31},
|
||||
/* qnameID == 161: {urn:iso:15118:2:2013:MsgBody}ChargingStatusRes */
|
||||
{5, 32},
|
||||
/* qnameID == 162: {urn:iso:15118:2:2013:MsgBody}ChargingStatusResType */
|
||||
{5, 33},
|
||||
/* qnameID == 163: {urn:iso:15118:2:2013:MsgBody}ContractSignatureCertChain */
|
||||
{5, 34},
|
||||
/* qnameID == 164: {urn:iso:15118:2:2013:MsgBody}ContractSignatureEncryptedPrivateKey */
|
||||
{5, 35},
|
||||
/* qnameID == 165: {urn:iso:15118:2:2013:MsgBody}CurrentDemandReq */
|
||||
{5, 36},
|
||||
/* qnameID == 166: {urn:iso:15118:2:2013:MsgBody}CurrentDemandReqType */
|
||||
{5, 37},
|
||||
/* qnameID == 167: {urn:iso:15118:2:2013:MsgBody}CurrentDemandRes */
|
||||
{5, 38},
|
||||
/* qnameID == 168: {urn:iso:15118:2:2013:MsgBody}CurrentDemandResType */
|
||||
{5, 39},
|
||||
/* qnameID == 169: {urn:iso:15118:2:2013:MsgBody}DC_EVSEStatus */
|
||||
{5, 40},
|
||||
/* qnameID == 170: {urn:iso:15118:2:2013:MsgBody}DC_EVStatus */
|
||||
{5, 41},
|
||||
/* qnameID == 171: {urn:iso:15118:2:2013:MsgBody}DHpublickey */
|
||||
{5, 42},
|
||||
/* qnameID == 172: {urn:iso:15118:2:2013:MsgBody}EVCCID */
|
||||
{5, 43},
|
||||
/* qnameID == 173: {urn:iso:15118:2:2013:MsgBody}EVMaximumCurrentLimit */
|
||||
{5, 44},
|
||||
/* qnameID == 174: {urn:iso:15118:2:2013:MsgBody}EVMaximumPowerLimit */
|
||||
{5, 45},
|
||||
/* qnameID == 175: {urn:iso:15118:2:2013:MsgBody}EVMaximumVoltageLimit */
|
||||
{5, 46},
|
||||
/* qnameID == 176: {urn:iso:15118:2:2013:MsgBody}EVSECurrentLimitAchieved */
|
||||
{5, 47},
|
||||
/* qnameID == 177: {urn:iso:15118:2:2013:MsgBody}EVSEID */
|
||||
{5, 48},
|
||||
/* qnameID == 178: {urn:iso:15118:2:2013:MsgBody}EVSEMaxCurrent */
|
||||
{5, 49},
|
||||
/* qnameID == 179: {urn:iso:15118:2:2013:MsgBody}EVSEMaximumCurrentLimit */
|
||||
{5, 50},
|
||||
/* qnameID == 180: {urn:iso:15118:2:2013:MsgBody}EVSEMaximumPowerLimit */
|
||||
{5, 51},
|
||||
/* qnameID == 181: {urn:iso:15118:2:2013:MsgBody}EVSEMaximumVoltageLimit */
|
||||
{5, 52},
|
||||
/* qnameID == 182: {urn:iso:15118:2:2013:MsgBody}EVSEPowerLimitAchieved */
|
||||
{5, 53},
|
||||
/* qnameID == 183: {urn:iso:15118:2:2013:MsgBody}EVSEPresentCurrent */
|
||||
{5, 54},
|
||||
/* qnameID == 184: {urn:iso:15118:2:2013:MsgBody}EVSEPresentVoltage */
|
||||
{5, 55},
|
||||
/* qnameID == 185: {urn:iso:15118:2:2013:MsgBody}EVSEProcessing */
|
||||
{5, 56},
|
||||
/* qnameID == 186: {urn:iso:15118:2:2013:MsgBody}EVSETimeStamp */
|
||||
{5, 57},
|
||||
/* qnameID == 187: {urn:iso:15118:2:2013:MsgBody}EVSEVoltageLimitAchieved */
|
||||
{5, 58},
|
||||
/* qnameID == 188: {urn:iso:15118:2:2013:MsgBody}EVTargetCurrent */
|
||||
{5, 59},
|
||||
/* qnameID == 189: {urn:iso:15118:2:2013:MsgBody}EVTargetVoltage */
|
||||
{5, 60},
|
||||
/* qnameID == 190: {urn:iso:15118:2:2013:MsgBody}GenChallenge */
|
||||
{5, 61},
|
||||
/* qnameID == 191: {urn:iso:15118:2:2013:MsgBody}Id */
|
||||
{5, 62},
|
||||
/* qnameID == 192: {urn:iso:15118:2:2013:MsgBody}ListOfRootCertificateIDs */
|
||||
{5, 63},
|
||||
/* qnameID == 193: {urn:iso:15118:2:2013:MsgBody}MaxEntriesSAScheduleTuple */
|
||||
{5, 64},
|
||||
/* qnameID == 194: {urn:iso:15118:2:2013:MsgBody}MeterInfo */
|
||||
{5, 65},
|
||||
/* qnameID == 195: {urn:iso:15118:2:2013:MsgBody}MeteringReceiptReq */
|
||||
{5, 66},
|
||||
/* qnameID == 196: {urn:iso:15118:2:2013:MsgBody}MeteringReceiptReqType */
|
||||
{5, 67},
|
||||
/* qnameID == 197: {urn:iso:15118:2:2013:MsgBody}MeteringReceiptRes */
|
||||
{5, 68},
|
||||
/* qnameID == 198: {urn:iso:15118:2:2013:MsgBody}MeteringReceiptResType */
|
||||
{5, 69},
|
||||
/* qnameID == 199: {urn:iso:15118:2:2013:MsgBody}OEMProvisioningCert */
|
||||
{5, 70},
|
||||
/* qnameID == 200: {urn:iso:15118:2:2013:MsgBody}PaymentDetailsReq */
|
||||
{5, 71},
|
||||
/* qnameID == 201: {urn:iso:15118:2:2013:MsgBody}PaymentDetailsReqType */
|
||||
{5, 72},
|
||||
/* qnameID == 202: {urn:iso:15118:2:2013:MsgBody}PaymentDetailsRes */
|
||||
{5, 73},
|
||||
/* qnameID == 203: {urn:iso:15118:2:2013:MsgBody}PaymentDetailsResType */
|
||||
{5, 74},
|
||||
/* qnameID == 204: {urn:iso:15118:2:2013:MsgBody}PaymentOptionList */
|
||||
{5, 75},
|
||||
/* qnameID == 205: {urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionReq */
|
||||
{5, 76},
|
||||
/* qnameID == 206: {urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionReqType */
|
||||
{5, 77},
|
||||
/* qnameID == 207: {urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionRes */
|
||||
{5, 78},
|
||||
/* qnameID == 208: {urn:iso:15118:2:2013:MsgBody}PaymentServiceSelectionResType */
|
||||
{5, 79},
|
||||
/* qnameID == 209: {urn:iso:15118:2:2013:MsgBody}PowerDeliveryReq */
|
||||
{5, 80},
|
||||
/* qnameID == 210: {urn:iso:15118:2:2013:MsgBody}PowerDeliveryReqType */
|
||||
{5, 81},
|
||||
/* qnameID == 211: {urn:iso:15118:2:2013:MsgBody}PowerDeliveryRes */
|
||||
{5, 82},
|
||||
/* qnameID == 212: {urn:iso:15118:2:2013:MsgBody}PowerDeliveryResType */
|
||||
{5, 83},
|
||||
/* qnameID == 213: {urn:iso:15118:2:2013:MsgBody}PreChargeReq */
|
||||
{5, 84},
|
||||
/* qnameID == 214: {urn:iso:15118:2:2013:MsgBody}PreChargeReqType */
|
||||
{5, 85},
|
||||
/* qnameID == 215: {urn:iso:15118:2:2013:MsgBody}PreChargeRes */
|
||||
{5, 86},
|
||||
/* qnameID == 216: {urn:iso:15118:2:2013:MsgBody}PreChargeResType */
|
||||
{5, 87},
|
||||
/* qnameID == 217: {urn:iso:15118:2:2013:MsgBody}ReceiptRequired */
|
||||
{5, 88},
|
||||
/* qnameID == 218: {urn:iso:15118:2:2013:MsgBody}RemainingTimeToBulkSoC */
|
||||
{5, 89},
|
||||
/* qnameID == 219: {urn:iso:15118:2:2013:MsgBody}RemainingTimeToFullSoC */
|
||||
{5, 90},
|
||||
/* qnameID == 220: {urn:iso:15118:2:2013:MsgBody}RequestedEnergyTransferMode */
|
||||
{5, 91},
|
||||
/* qnameID == 221: {urn:iso:15118:2:2013:MsgBody}ResponseCode */
|
||||
{5, 92},
|
||||
/* qnameID == 222: {urn:iso:15118:2:2013:MsgBody}RetryCounter */
|
||||
{5, 93},
|
||||
/* qnameID == 223: {urn:iso:15118:2:2013:MsgBody}SAProvisioningCertificateChain */
|
||||
{5, 94},
|
||||
/* qnameID == 224: {urn:iso:15118:2:2013:MsgBody}SAScheduleTupleID */
|
||||
{5, 95},
|
||||
/* qnameID == 225: {urn:iso:15118:2:2013:MsgBody}SelectedPaymentOption */
|
||||
{5, 96},
|
||||
/* qnameID == 226: {urn:iso:15118:2:2013:MsgBody}SelectedServiceList */
|
||||
{5, 97},
|
||||
/* qnameID == 227: {urn:iso:15118:2:2013:MsgBody}ServiceCategory */
|
||||
{5, 98},
|
||||
/* qnameID == 228: {urn:iso:15118:2:2013:MsgBody}ServiceDetailReq */
|
||||
{5, 99},
|
||||
/* qnameID == 229: {urn:iso:15118:2:2013:MsgBody}ServiceDetailReqType */
|
||||
{5, 100},
|
||||
/* qnameID == 230: {urn:iso:15118:2:2013:MsgBody}ServiceDetailRes */
|
||||
{5, 101},
|
||||
/* qnameID == 231: {urn:iso:15118:2:2013:MsgBody}ServiceDetailResType */
|
||||
{5, 102},
|
||||
/* qnameID == 232: {urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryReq */
|
||||
{5, 103},
|
||||
/* qnameID == 233: {urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryReqType */
|
||||
{5, 104},
|
||||
/* qnameID == 234: {urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryRes */
|
||||
{5, 105},
|
||||
/* qnameID == 235: {urn:iso:15118:2:2013:MsgBody}ServiceDiscoveryResType */
|
||||
{5, 106},
|
||||
/* qnameID == 236: {urn:iso:15118:2:2013:MsgBody}ServiceID */
|
||||
{5, 107},
|
||||
/* qnameID == 237: {urn:iso:15118:2:2013:MsgBody}ServiceList */
|
||||
{5, 108},
|
||||
/* qnameID == 238: {urn:iso:15118:2:2013:MsgBody}ServiceParameterList */
|
||||
{5, 109},
|
||||
/* qnameID == 239: {urn:iso:15118:2:2013:MsgBody}ServiceScope */
|
||||
{5, 110},
|
||||
/* qnameID == 240: {urn:iso:15118:2:2013:MsgBody}SessionID */
|
||||
{5, 111},
|
||||
/* qnameID == 241: {urn:iso:15118:2:2013:MsgBody}SessionSetupReq */
|
||||
{5, 112},
|
||||
/* qnameID == 242: {urn:iso:15118:2:2013:MsgBody}SessionSetupReqType */
|
||||
{5, 113},
|
||||
/* qnameID == 243: {urn:iso:15118:2:2013:MsgBody}SessionSetupRes */
|
||||
{5, 114},
|
||||
/* qnameID == 244: {urn:iso:15118:2:2013:MsgBody}SessionSetupResType */
|
||||
{5, 115},
|
||||
/* qnameID == 245: {urn:iso:15118:2:2013:MsgBody}SessionStopReq */
|
||||
{5, 116},
|
||||
/* qnameID == 246: {urn:iso:15118:2:2013:MsgBody}SessionStopReqType */
|
||||
{5, 117},
|
||||
/* qnameID == 247: {urn:iso:15118:2:2013:MsgBody}SessionStopRes */
|
||||
{5, 118},
|
||||
/* qnameID == 248: {urn:iso:15118:2:2013:MsgBody}SessionStopResType */
|
||||
{5, 119},
|
||||
/* qnameID == 249: {urn:iso:15118:2:2013:MsgBody}WeldingDetectionReq */
|
||||
{5, 120},
|
||||
/* qnameID == 250: {urn:iso:15118:2:2013:MsgBody}WeldingDetectionReqType */
|
||||
{5, 121},
|
||||
/* qnameID == 251: {urn:iso:15118:2:2013:MsgBody}WeldingDetectionRes */
|
||||
{5, 122},
|
||||
/* qnameID == 252: {urn:iso:15118:2:2013:MsgBody}WeldingDetectionResType */
|
||||
{5, 123},
|
||||
/* qnameID == 253: {urn:iso:15118:2:2013:MsgBody}eMAID */
|
||||
{5, 124},
|
||||
/* qnameID == 254: {urn:iso:15118:2:2013:MsgDataTypes}AC_EVChargeParameter */
|
||||
{6, 0},
|
||||
/* qnameID == 255: {urn:iso:15118:2:2013:MsgDataTypes}AC_EVChargeParameterType */
|
||||
{6, 1},
|
||||
/* qnameID == 256: {urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEChargeParameter */
|
||||
{6, 2},
|
||||
/* qnameID == 257: {urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEChargeParameterType */
|
||||
{6, 3},
|
||||
/* qnameID == 258: {urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEStatus */
|
||||
{6, 4},
|
||||
/* qnameID == 259: {urn:iso:15118:2:2013:MsgDataTypes}AC_EVSEStatusType */
|
||||
{6, 5},
|
||||
/* qnameID == 260: {urn:iso:15118:2:2013:MsgDataTypes}BulkChargingComplete */
|
||||
{6, 6},
|
||||
/* qnameID == 261: {urn:iso:15118:2:2013:MsgDataTypes}BulkSOC */
|
||||
{6, 7},
|
||||
/* qnameID == 262: {urn:iso:15118:2:2013:MsgDataTypes}Certificate */
|
||||
{6, 8},
|
||||
/* qnameID == 263: {urn:iso:15118:2:2013:MsgDataTypes}CertificateChainType */
|
||||
{6, 9},
|
||||
/* qnameID == 264: {urn:iso:15118:2:2013:MsgDataTypes}ChargeServiceType */
|
||||
{6, 10},
|
||||
/* qnameID == 265: {urn:iso:15118:2:2013:MsgDataTypes}ChargingComplete */
|
||||
{6, 11},
|
||||
/* qnameID == 266: {urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxNumberOfPhasesInUse */
|
||||
{6, 12},
|
||||
/* qnameID == 267: {urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryMaxPower */
|
||||
{6, 13},
|
||||
/* qnameID == 268: {urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileEntryStart */
|
||||
{6, 14},
|
||||
/* qnameID == 269: {urn:iso:15118:2:2013:MsgDataTypes}ChargingProfileType */
|
||||
{6, 15},
|
||||
/* qnameID == 270: {urn:iso:15118:2:2013:MsgDataTypes}ConsumptionCost */
|
||||
{6, 16},
|
||||
/* qnameID == 271: {urn:iso:15118:2:2013:MsgDataTypes}ConsumptionCostType */
|
||||
{6, 17},
|
||||
/* qnameID == 272: {urn:iso:15118:2:2013:MsgDataTypes}ContractSignatureEncryptedPrivateKeyType */
|
||||
{6, 18},
|
||||
/* qnameID == 273: {urn:iso:15118:2:2013:MsgDataTypes}Cost */
|
||||
{6, 19},
|
||||
/* qnameID == 274: {urn:iso:15118:2:2013:MsgDataTypes}CostType */
|
||||
{6, 20},
|
||||
/* qnameID == 275: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVChargeParameter */
|
||||
{6, 21},
|
||||
/* qnameID == 276: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVChargeParameterType */
|
||||
{6, 22},
|
||||
/* qnameID == 277: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVErrorCodeType */
|
||||
{6, 23},
|
||||
/* qnameID == 278: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVPowerDeliveryParameter */
|
||||
{6, 24},
|
||||
/* qnameID == 279: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVPowerDeliveryParameterType */
|
||||
{6, 25},
|
||||
/* qnameID == 280: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEChargeParameter */
|
||||
{6, 26},
|
||||
/* qnameID == 281: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEChargeParameterType */
|
||||
{6, 27},
|
||||
/* qnameID == 282: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEStatus */
|
||||
{6, 28},
|
||||
/* qnameID == 283: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEStatusCodeType */
|
||||
{6, 29},
|
||||
/* qnameID == 284: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVSEStatusType */
|
||||
{6, 30},
|
||||
/* qnameID == 285: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVStatus */
|
||||
{6, 31},
|
||||
/* qnameID == 286: {urn:iso:15118:2:2013:MsgDataTypes}DC_EVStatusType */
|
||||
{6, 32},
|
||||
/* qnameID == 287: {urn:iso:15118:2:2013:MsgDataTypes}DepartureTime */
|
||||
{6, 33},
|
||||
/* qnameID == 288: {urn:iso:15118:2:2013:MsgDataTypes}DiffieHellmanPublickeyType */
|
||||
{6, 34},
|
||||
/* qnameID == 289: {urn:iso:15118:2:2013:MsgDataTypes}EAmount */
|
||||
{6, 35},
|
||||
/* qnameID == 290: {urn:iso:15118:2:2013:MsgDataTypes}EMAIDType */
|
||||
{6, 36},
|
||||
/* qnameID == 291: {urn:iso:15118:2:2013:MsgDataTypes}EPriceLevel */
|
||||
{6, 37},
|
||||
/* qnameID == 292: {urn:iso:15118:2:2013:MsgDataTypes}EVChargeParameter */
|
||||
{6, 38},
|
||||
/* qnameID == 293: {urn:iso:15118:2:2013:MsgDataTypes}EVChargeParameterType */
|
||||
{6, 39},
|
||||
/* qnameID == 294: {urn:iso:15118:2:2013:MsgDataTypes}EVEnergyCapacity */
|
||||
{6, 40},
|
||||
/* qnameID == 295: {urn:iso:15118:2:2013:MsgDataTypes}EVEnergyRequest */
|
||||
{6, 41},
|
||||
/* qnameID == 296: {urn:iso:15118:2:2013:MsgDataTypes}EVErrorCode */
|
||||
{6, 42},
|
||||
/* qnameID == 297: {urn:iso:15118:2:2013:MsgDataTypes}EVMaxCurrent */
|
||||
{6, 43},
|
||||
/* qnameID == 298: {urn:iso:15118:2:2013:MsgDataTypes}EVMaxVoltage */
|
||||
{6, 44},
|
||||
/* qnameID == 299: {urn:iso:15118:2:2013:MsgDataTypes}EVMaximumCurrentLimit */
|
||||
{6, 45},
|
||||
/* qnameID == 300: {urn:iso:15118:2:2013:MsgDataTypes}EVMaximumPowerLimit */
|
||||
{6, 46},
|
||||
/* qnameID == 301: {urn:iso:15118:2:2013:MsgDataTypes}EVMaximumVoltageLimit */
|
||||
{6, 47},
|
||||
/* qnameID == 302: {urn:iso:15118:2:2013:MsgDataTypes}EVMinCurrent */
|
||||
{6, 48},
|
||||
/* qnameID == 303: {urn:iso:15118:2:2013:MsgDataTypes}EVPowerDeliveryParameter */
|
||||
{6, 49},
|
||||
/* qnameID == 304: {urn:iso:15118:2:2013:MsgDataTypes}EVPowerDeliveryParameterType */
|
||||
{6, 50},
|
||||
/* qnameID == 305: {urn:iso:15118:2:2013:MsgDataTypes}EVRESSSOC */
|
||||
{6, 51},
|
||||
/* qnameID == 306: {urn:iso:15118:2:2013:MsgDataTypes}EVReady */
|
||||
{6, 52},
|
||||
/* qnameID == 307: {urn:iso:15118:2:2013:MsgDataTypes}EVSEChargeParameter */
|
||||
{6, 53},
|
||||
/* qnameID == 308: {urn:iso:15118:2:2013:MsgDataTypes}EVSEChargeParameterType */
|
||||
{6, 54},
|
||||
/* qnameID == 309: {urn:iso:15118:2:2013:MsgDataTypes}EVSECurrentRegulationTolerance */
|
||||
{6, 55},
|
||||
/* qnameID == 310: {urn:iso:15118:2:2013:MsgDataTypes}EVSEEnergyToBeDelivered */
|
||||
{6, 56},
|
||||
/* qnameID == 311: {urn:iso:15118:2:2013:MsgDataTypes}EVSEIsolationStatus */
|
||||
{6, 57},
|
||||
/* qnameID == 312: {urn:iso:15118:2:2013:MsgDataTypes}EVSEMaxCurrent */
|
||||
{6, 58},
|
||||
/* qnameID == 313: {urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumCurrentLimit */
|
||||
{6, 59},
|
||||
/* qnameID == 314: {urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumPowerLimit */
|
||||
{6, 60},
|
||||
/* qnameID == 315: {urn:iso:15118:2:2013:MsgDataTypes}EVSEMaximumVoltageLimit */
|
||||
{6, 61},
|
||||
/* qnameID == 316: {urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumCurrentLimit */
|
||||
{6, 62},
|
||||
/* qnameID == 317: {urn:iso:15118:2:2013:MsgDataTypes}EVSEMinimumVoltageLimit */
|
||||
{6, 63},
|
||||
/* qnameID == 318: {urn:iso:15118:2:2013:MsgDataTypes}EVSENominalVoltage */
|
||||
{6, 64},
|
||||
/* qnameID == 319: {urn:iso:15118:2:2013:MsgDataTypes}EVSENotification */
|
||||
{6, 65},
|
||||
/* qnameID == 320: {urn:iso:15118:2:2013:MsgDataTypes}EVSENotificationType */
|
||||
{6, 66},
|
||||
/* qnameID == 321: {urn:iso:15118:2:2013:MsgDataTypes}EVSEPeakCurrentRipple */
|
||||
{6, 67},
|
||||
/* qnameID == 322: {urn:iso:15118:2:2013:MsgDataTypes}EVSEProcessingType */
|
||||
{6, 68},
|
||||
/* qnameID == 323: {urn:iso:15118:2:2013:MsgDataTypes}EVSEStatus */
|
||||
{6, 69},
|
||||
/* qnameID == 324: {urn:iso:15118:2:2013:MsgDataTypes}EVSEStatusCode */
|
||||
{6, 70},
|
||||
/* qnameID == 325: {urn:iso:15118:2:2013:MsgDataTypes}EVSEStatusType */
|
||||
{6, 71},
|
||||
/* qnameID == 326: {urn:iso:15118:2:2013:MsgDataTypes}EVStatus */
|
||||
{6, 72},
|
||||
/* qnameID == 327: {urn:iso:15118:2:2013:MsgDataTypes}EVStatusType */
|
||||
{6, 73},
|
||||
/* qnameID == 328: {urn:iso:15118:2:2013:MsgDataTypes}EnergyTransferMode */
|
||||
{6, 74},
|
||||
/* qnameID == 329: {urn:iso:15118:2:2013:MsgDataTypes}EnergyTransferModeType */
|
||||
{6, 75},
|
||||
/* qnameID == 330: {urn:iso:15118:2:2013:MsgDataTypes}Entry */
|
||||
{6, 76},
|
||||
/* qnameID == 331: {urn:iso:15118:2:2013:MsgDataTypes}EntryType */
|
||||
{6, 77},
|
||||
/* qnameID == 332: {urn:iso:15118:2:2013:MsgDataTypes}FaultCode */
|
||||
{6, 78},
|
||||
/* qnameID == 333: {urn:iso:15118:2:2013:MsgDataTypes}FaultMsg */
|
||||
{6, 79},
|
||||
/* qnameID == 334: {urn:iso:15118:2:2013:MsgDataTypes}FreeService */
|
||||
{6, 80},
|
||||
/* qnameID == 335: {urn:iso:15118:2:2013:MsgDataTypes}FullSOC */
|
||||
{6, 81},
|
||||
/* qnameID == 336: {urn:iso:15118:2:2013:MsgDataTypes}Id */
|
||||
{6, 82},
|
||||
/* qnameID == 337: {urn:iso:15118:2:2013:MsgDataTypes}IntervalType */
|
||||
{6, 83},
|
||||
/* qnameID == 338: {urn:iso:15118:2:2013:MsgDataTypes}ListOfRootCertificateIDsType */
|
||||
{6, 84},
|
||||
/* qnameID == 339: {urn:iso:15118:2:2013:MsgDataTypes}MeterID */
|
||||
{6, 85},
|
||||
/* qnameID == 340: {urn:iso:15118:2:2013:MsgDataTypes}MeterInfoType */
|
||||
{6, 86},
|
||||
/* qnameID == 341: {urn:iso:15118:2:2013:MsgDataTypes}MeterReading */
|
||||
{6, 87},
|
||||
/* qnameID == 342: {urn:iso:15118:2:2013:MsgDataTypes}MeterStatus */
|
||||
{6, 88},
|
||||
/* qnameID == 343: {urn:iso:15118:2:2013:MsgDataTypes}Multiplier */
|
||||
{6, 89},
|
||||
/* qnameID == 344: {urn:iso:15118:2:2013:MsgDataTypes}Name */
|
||||
{6, 90},
|
||||
/* qnameID == 345: {urn:iso:15118:2:2013:MsgDataTypes}NotificationMaxDelay */
|
||||
{6, 91},
|
||||
/* qnameID == 346: {urn:iso:15118:2:2013:MsgDataTypes}NotificationType */
|
||||
{6, 92},
|
||||
/* qnameID == 347: {urn:iso:15118:2:2013:MsgDataTypes}NumEPriceLevels */
|
||||
{6, 93},
|
||||
/* qnameID == 348: {urn:iso:15118:2:2013:MsgDataTypes}PMax */
|
||||
{6, 94},
|
||||
/* qnameID == 349: {urn:iso:15118:2:2013:MsgDataTypes}PMaxSchedule */
|
||||
{6, 95},
|
||||
/* qnameID == 350: {urn:iso:15118:2:2013:MsgDataTypes}PMaxScheduleEntry */
|
||||
{6, 96},
|
||||
/* qnameID == 351: {urn:iso:15118:2:2013:MsgDataTypes}PMaxScheduleEntryType */
|
||||
{6, 97},
|
||||
/* qnameID == 352: {urn:iso:15118:2:2013:MsgDataTypes}PMaxScheduleType */
|
||||
{6, 98},
|
||||
/* qnameID == 353: {urn:iso:15118:2:2013:MsgDataTypes}Parameter */
|
||||
{6, 99},
|
||||
/* qnameID == 354: {urn:iso:15118:2:2013:MsgDataTypes}ParameterSet */
|
||||
{6, 100},
|
||||
/* qnameID == 355: {urn:iso:15118:2:2013:MsgDataTypes}ParameterSetID */
|
||||
{6, 101},
|
||||
/* qnameID == 356: {urn:iso:15118:2:2013:MsgDataTypes}ParameterSetType */
|
||||
{6, 102},
|
||||
/* qnameID == 357: {urn:iso:15118:2:2013:MsgDataTypes}ParameterType */
|
||||
{6, 103},
|
||||
/* qnameID == 358: {urn:iso:15118:2:2013:MsgDataTypes}PaymentOption */
|
||||
{6, 104},
|
||||
/* qnameID == 359: {urn:iso:15118:2:2013:MsgDataTypes}PaymentOptionListType */
|
||||
{6, 105},
|
||||
/* qnameID == 360: {urn:iso:15118:2:2013:MsgDataTypes}PhysicalValueType */
|
||||
{6, 106},
|
||||
/* qnameID == 361: {urn:iso:15118:2:2013:MsgDataTypes}ProfileEntry */
|
||||
{6, 107},
|
||||
/* qnameID == 362: {urn:iso:15118:2:2013:MsgDataTypes}ProfileEntryType */
|
||||
{6, 108},
|
||||
/* qnameID == 363: {urn:iso:15118:2:2013:MsgDataTypes}RCD */
|
||||
{6, 109},
|
||||
/* qnameID == 364: {urn:iso:15118:2:2013:MsgDataTypes}RelativeTimeInterval */
|
||||
{6, 110},
|
||||
/* qnameID == 365: {urn:iso:15118:2:2013:MsgDataTypes}RelativeTimeIntervalType */
|
||||
{6, 111},
|
||||
/* qnameID == 366: {urn:iso:15118:2:2013:MsgDataTypes}RootCertificateID */
|
||||
{6, 112},
|
||||
/* qnameID == 367: {urn:iso:15118:2:2013:MsgDataTypes}SAIDType */
|
||||
{6, 113},
|
||||
/* qnameID == 368: {urn:iso:15118:2:2013:MsgDataTypes}SAScheduleList */
|
||||
{6, 114},
|
||||
/* qnameID == 369: {urn:iso:15118:2:2013:MsgDataTypes}SAScheduleListType */
|
||||
{6, 115},
|
||||
/* qnameID == 370: {urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTuple */
|
||||
{6, 116},
|
||||
/* qnameID == 371: {urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTupleID */
|
||||
{6, 117},
|
||||
/* qnameID == 372: {urn:iso:15118:2:2013:MsgDataTypes}SAScheduleTupleType */
|
||||
{6, 118},
|
||||
/* qnameID == 373: {urn:iso:15118:2:2013:MsgDataTypes}SASchedules */
|
||||
{6, 119},
|
||||
/* qnameID == 374: {urn:iso:15118:2:2013:MsgDataTypes}SASchedulesType */
|
||||
{6, 120},
|
||||
/* qnameID == 375: {urn:iso:15118:2:2013:MsgDataTypes}SalesTariff */
|
||||
{6, 121},
|
||||
/* qnameID == 376: {urn:iso:15118:2:2013:MsgDataTypes}SalesTariffDescription */
|
||||
{6, 122},
|
||||
/* qnameID == 377: {urn:iso:15118:2:2013:MsgDataTypes}SalesTariffEntry */
|
||||
{6, 123},
|
||||
/* qnameID == 378: {urn:iso:15118:2:2013:MsgDataTypes}SalesTariffEntryType */
|
||||
{6, 124},
|
||||
/* qnameID == 379: {urn:iso:15118:2:2013:MsgDataTypes}SalesTariffID */
|
||||
{6, 125},
|
||||
/* qnameID == 380: {urn:iso:15118:2:2013:MsgDataTypes}SalesTariffType */
|
||||
{6, 126},
|
||||
/* qnameID == 381: {urn:iso:15118:2:2013:MsgDataTypes}SelectedService */
|
||||
{6, 127},
|
||||
/* qnameID == 382: {urn:iso:15118:2:2013:MsgDataTypes}SelectedServiceListType */
|
||||
{6, 128},
|
||||
/* qnameID == 383: {urn:iso:15118:2:2013:MsgDataTypes}SelectedServiceType */
|
||||
{6, 129},
|
||||
/* qnameID == 384: {urn:iso:15118:2:2013:MsgDataTypes}Service */
|
||||
{6, 130},
|
||||
/* qnameID == 385: {urn:iso:15118:2:2013:MsgDataTypes}ServiceCategory */
|
||||
{6, 131},
|
||||
/* qnameID == 386: {urn:iso:15118:2:2013:MsgDataTypes}ServiceID */
|
||||
{6, 132},
|
||||
/* qnameID == 387: {urn:iso:15118:2:2013:MsgDataTypes}ServiceListType */
|
||||
{6, 133},
|
||||
/* qnameID == 388: {urn:iso:15118:2:2013:MsgDataTypes}ServiceName */
|
||||
{6, 134},
|
||||
/* qnameID == 389: {urn:iso:15118:2:2013:MsgDataTypes}ServiceParameterListType */
|
||||
{6, 135},
|
||||
/* qnameID == 390: {urn:iso:15118:2:2013:MsgDataTypes}ServiceScope */
|
||||
{6, 136},
|
||||
/* qnameID == 391: {urn:iso:15118:2:2013:MsgDataTypes}ServiceType */
|
||||
{6, 137},
|
||||
/* qnameID == 392: {urn:iso:15118:2:2013:MsgDataTypes}SigMeterReading */
|
||||
{6, 138},
|
||||
/* qnameID == 393: {urn:iso:15118:2:2013:MsgDataTypes}SubCertificates */
|
||||
{6, 139},
|
||||
/* qnameID == 394: {urn:iso:15118:2:2013:MsgDataTypes}SubCertificatesType */
|
||||
{6, 140},
|
||||
/* qnameID == 395: {urn:iso:15118:2:2013:MsgDataTypes}SupportedEnergyTransferMode */
|
||||
{6, 141},
|
||||
/* qnameID == 396: {urn:iso:15118:2:2013:MsgDataTypes}SupportedEnergyTransferModeType */
|
||||
{6, 142},
|
||||
/* qnameID == 397: {urn:iso:15118:2:2013:MsgDataTypes}TMeter */
|
||||
{6, 143},
|
||||
/* qnameID == 398: {urn:iso:15118:2:2013:MsgDataTypes}TimeInterval */
|
||||
{6, 144},
|
||||
/* qnameID == 399: {urn:iso:15118:2:2013:MsgDataTypes}Unit */
|
||||
{6, 145},
|
||||
/* qnameID == 400: {urn:iso:15118:2:2013:MsgDataTypes}Value */
|
||||
{6, 146},
|
||||
/* qnameID == 401: {urn:iso:15118:2:2013:MsgDataTypes}amount */
|
||||
{6, 147},
|
||||
/* qnameID == 402: {urn:iso:15118:2:2013:MsgDataTypes}amountMultiplier */
|
||||
{6, 148},
|
||||
/* qnameID == 403: {urn:iso:15118:2:2013:MsgDataTypes}boolValue */
|
||||
{6, 149},
|
||||
/* qnameID == 404: {urn:iso:15118:2:2013:MsgDataTypes}byteValue */
|
||||
{6, 150},
|
||||
/* qnameID == 405: {urn:iso:15118:2:2013:MsgDataTypes}certificateType */
|
||||
{6, 151},
|
||||
/* qnameID == 406: {urn:iso:15118:2:2013:MsgDataTypes}chargeProgressType */
|
||||
{6, 152},
|
||||
/* qnameID == 407: {urn:iso:15118:2:2013:MsgDataTypes}chargingSessionType */
|
||||
{6, 153},
|
||||
/* qnameID == 408: {urn:iso:15118:2:2013:MsgDataTypes}costKind */
|
||||
{6, 154},
|
||||
/* qnameID == 409: {urn:iso:15118:2:2013:MsgDataTypes}costKindType */
|
||||
{6, 155},
|
||||
/* qnameID == 410: {urn:iso:15118:2:2013:MsgDataTypes}dHpublickeyType */
|
||||
{6, 156},
|
||||
/* qnameID == 411: {urn:iso:15118:2:2013:MsgDataTypes}duration */
|
||||
{6, 157},
|
||||
/* qnameID == 412: {urn:iso:15118:2:2013:MsgDataTypes}eMAIDType */
|
||||
{6, 158},
|
||||
/* qnameID == 413: {urn:iso:15118:2:2013:MsgDataTypes}evccIDType */
|
||||
{6, 159},
|
||||
/* qnameID == 414: {urn:iso:15118:2:2013:MsgDataTypes}evseIDType */
|
||||
{6, 160},
|
||||
/* qnameID == 415: {urn:iso:15118:2:2013:MsgDataTypes}faultCodeType */
|
||||
{6, 161},
|
||||
/* qnameID == 416: {urn:iso:15118:2:2013:MsgDataTypes}faultMsgType */
|
||||
{6, 162},
|
||||
/* qnameID == 417: {urn:iso:15118:2:2013:MsgDataTypes}genChallengeType */
|
||||
{6, 163},
|
||||
/* qnameID == 418: {urn:iso:15118:2:2013:MsgDataTypes}intValue */
|
||||
{6, 164},
|
||||
/* qnameID == 419: {urn:iso:15118:2:2013:MsgDataTypes}isolationLevelType */
|
||||
{6, 165},
|
||||
/* qnameID == 420: {urn:iso:15118:2:2013:MsgDataTypes}maxNumPhasesType */
|
||||
{6, 166},
|
||||
/* qnameID == 421: {urn:iso:15118:2:2013:MsgDataTypes}meterIDType */
|
||||
{6, 167},
|
||||
/* qnameID == 422: {urn:iso:15118:2:2013:MsgDataTypes}meterStatusType */
|
||||
{6, 168},
|
||||
/* qnameID == 423: {urn:iso:15118:2:2013:MsgDataTypes}paymentOptionType */
|
||||
{6, 169},
|
||||
/* qnameID == 424: {urn:iso:15118:2:2013:MsgDataTypes}percentValueType */
|
||||
{6, 170},
|
||||
/* qnameID == 425: {urn:iso:15118:2:2013:MsgDataTypes}physicalValue */
|
||||
{6, 171},
|
||||
/* qnameID == 426: {urn:iso:15118:2:2013:MsgDataTypes}privateKeyType */
|
||||
{6, 172},
|
||||
/* qnameID == 427: {urn:iso:15118:2:2013:MsgDataTypes}responseCodeType */
|
||||
{6, 173},
|
||||
/* qnameID == 428: {urn:iso:15118:2:2013:MsgDataTypes}serviceCategoryType */
|
||||
{6, 174},
|
||||
/* qnameID == 429: {urn:iso:15118:2:2013:MsgDataTypes}serviceIDType */
|
||||
{6, 175},
|
||||
/* qnameID == 430: {urn:iso:15118:2:2013:MsgDataTypes}serviceNameType */
|
||||
{6, 176},
|
||||
/* qnameID == 431: {urn:iso:15118:2:2013:MsgDataTypes}serviceScopeType */
|
||||
{6, 177},
|
||||
/* qnameID == 432: {urn:iso:15118:2:2013:MsgDataTypes}sessionIDType */
|
||||
{6, 178},
|
||||
/* qnameID == 433: {urn:iso:15118:2:2013:MsgDataTypes}shortValue */
|
||||
{6, 179},
|
||||
/* qnameID == 434: {urn:iso:15118:2:2013:MsgDataTypes}sigMeterReadingType */
|
||||
{6, 180},
|
||||
/* qnameID == 435: {urn:iso:15118:2:2013:MsgDataTypes}start */
|
||||
{6, 181},
|
||||
/* qnameID == 436: {urn:iso:15118:2:2013:MsgDataTypes}startValue */
|
||||
{6, 182},
|
||||
/* qnameID == 437: {urn:iso:15118:2:2013:MsgDataTypes}stringValue */
|
||||
{6, 183},
|
||||
/* qnameID == 438: {urn:iso:15118:2:2013:MsgDataTypes}tariffDescriptionType */
|
||||
{6, 184},
|
||||
/* qnameID == 439: {urn:iso:15118:2:2013:MsgDataTypes}unitMultiplierType */
|
||||
{6, 185},
|
||||
/* qnameID == 440: {urn:iso:15118:2:2013:MsgDataTypes}unitSymbolType */
|
||||
{6, 186},
|
||||
/* qnameID == 441: {urn:iso:15118:2:2013:MsgDataTypes}valueType */
|
||||
{6, 187},
|
||||
/* qnameID == 442: {urn:iso:15118:2:2013:MsgDef}Body */
|
||||
{7, 0},
|
||||
/* qnameID == 443: {urn:iso:15118:2:2013:MsgDef}Header */
|
||||
{7, 1},
|
||||
/* qnameID == 444: {urn:iso:15118:2:2013:MsgDef}V2G_Message */
|
||||
{7, 2},
|
||||
/* qnameID == 445: {urn:iso:15118:2:2013:MsgHeader}MessageHeaderType */
|
||||
{8, 0},
|
||||
/* qnameID == 446: {urn:iso:15118:2:2013:MsgHeader}Notification */
|
||||
{8, 1},
|
||||
/* qnameID == 447: {urn:iso:15118:2:2013:MsgHeader}SessionID */
|
||||
{8, 2}
|
||||
|
||||
};
|
||||
|
||||
|
||||
int exiv2gGetEQName(exi_state_t* state, uint16_t qnameID, uint16_t* namespaceURI, uint16_t* localPart) {
|
||||
int errn = 0;
|
||||
/* EXI_v2gNUMBER_OF_QNAMES */
|
||||
if (qnameID < state->nextQNameID) {
|
||||
*namespaceURI = qnames[qnameID].namespaceURI;
|
||||
*localPart = qnames[qnameID].localPart;
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
int exiv2gGetQNameID(exi_state_t* state, uint16_t namespaceURI, uint16_t localPart, uint16_t* qnameID) {
|
||||
uint16_t i;
|
||||
int errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
/* TODO Do something more efficient than just walk over the entire list */
|
||||
/* EXI_v2gNUMBER_OF_QNAMES */
|
||||
for(i=0; i<state->nextQNameID && errn != 0; i++) {
|
||||
if(qnames[i].localPart == localPart && qnames[i].namespaceURI == namespaceURI) {
|
||||
*qnameID = i;
|
||||
errn = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
int exiv2gAddEQName(exi_state_t* state, uint16_t* qnameID, uint16_t namespaceURI, uint16_t localPart) {
|
||||
int errn = 0;
|
||||
if(state->nextQNameID < (EXI_v2gMAX_NUMBER_OF_QNAMES -1)) {
|
||||
/* store IDs */
|
||||
qnames[state->nextQNameID].namespaceURI = namespaceURI;
|
||||
qnames[state->nextQNameID].localPart = localPart;
|
||||
/* increment counter */
|
||||
*qnameID = state->nextQNameID++;
|
||||
} else {
|
||||
errn = EXI_ERROR_OUT_OF_BOUNDS;
|
||||
}
|
||||
|
||||
|
||||
return errn;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Daniel.Peintner.EXT@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXIdizer.com</p>
|
||||
* <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
|
||||
*
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifndef EXI_v2g_QNAMES_H
|
||||
#define EXI_v2g_QNAMES_H
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
/**
|
||||
* \brief Returns efficient qname (namespaceURI & localName) IDs for qnameID
|
||||
*
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified name ID
|
||||
* \param namespaceURI QName namespace URI ID
|
||||
* \param localPart QName local name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gGetEQName(exi_state_t* state, uint16_t qnameID, uint16_t* namespaceURI, uint16_t* localPart);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Returns qnameID for qname namespaceURI & localName
|
||||
*
|
||||
* \param state Codec state
|
||||
* \param namespaceURI QName namespace URI ID
|
||||
* \param localPart QName local name ID
|
||||
* \param qnameID QName ID (out)
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gGetQNameID(exi_state_t* state, uint16_t namespaceURI, uint16_t localPart, uint16_t* qnameID);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Add efficient qname (namespaceURI & localName) IDs for qnameID
|
||||
*
|
||||
* \param state Codec state
|
||||
* \param qnameID Qualified name ID
|
||||
* \param namespaceURI QName namespace URI ID
|
||||
* \param localPart QName local name ID
|
||||
* \return Error-Code <> 0
|
||||
*
|
||||
*/
|
||||
int exiv2gAddEQName(exi_state_t* state, uint16_t* qnameID, uint16_t namespaceURI, uint16_t localPart);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,692 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXISeGen</p>
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
#include "EXITypes.h"
|
||||
#include "v2g_dataTypes.h"
|
||||
|
||||
|
||||
static void init_sessionIDType(struct sessionIDType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_faultMsgType(struct faultMsgType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_NotificationType(struct NotificationType* type)
|
||||
{
|
||||
type->isused.FaultMsg=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_service_string(struct service_string* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_DigestValueType(struct DigestValueType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ReferenceType(struct ReferenceType* type)
|
||||
{
|
||||
type->isused.attr_Id=0;
|
||||
type->isused.attr_Type=0;
|
||||
type->isused.attr_URI=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SignedInfoType(struct SignedInfoType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
type->isused.attr_Id=0;
|
||||
for(i_loop=0; i_loop<2;i_loop++)
|
||||
{
|
||||
init_ReferenceType(&(type->Reference[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.Reference=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SignatureValueType(struct SignatureValueType* type)
|
||||
{
|
||||
type->isused.attr_Id=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SignatureType(struct SignatureType* type)
|
||||
{
|
||||
type->isused.attr_Id=0;
|
||||
init_SignedInfoType(&(type->SignedInfo));
|
||||
init_SignatureValueType(&(type->SignatureValue));
|
||||
|
||||
}
|
||||
|
||||
static void init_MessageHeaderType(struct MessageHeaderType* type)
|
||||
{
|
||||
init_NotificationType(&(type->Notification));
|
||||
type->isused.Notification=0;
|
||||
type->isused.Signature=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_evccIDType(struct evccIDType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_evseIDType(struct evseIDType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SessionSetupResType(struct SessionSetupResType* type)
|
||||
{
|
||||
type->isused.EVSETimeStamp=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_serviceScopeType(struct serviceScopeType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ServiceDiscoveryReqType(struct ServiceDiscoveryReqType* type)
|
||||
{
|
||||
type->isused.ServiceScope=0;
|
||||
type->isused.ServiceCategory=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_PaymentOptionListType(struct PaymentOptionListType* type)
|
||||
{
|
||||
|
||||
|
||||
type->arraylen.PaymentOption=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_serviceNameType(struct serviceNameType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SupportedEnergyTransferModeType(struct SupportedEnergyTransferModeType* type)
|
||||
{
|
||||
|
||||
type->arraylen.EnergyTransferMode=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ChargeServiceType(struct ChargeServiceType* type)
|
||||
{
|
||||
type->isused.ServiceName=0;
|
||||
type->isused.ServiceScope=0;
|
||||
init_SupportedEnergyTransferModeType(&(type->SupportedEnergyTransferMode));
|
||||
|
||||
}
|
||||
|
||||
static void init_ServiceType(struct ServiceType* type)
|
||||
{
|
||||
type->isused.ServiceName=0;
|
||||
type->isused.ServiceScope=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ServiceListType(struct ServiceListType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
for(i_loop=0; i_loop<8;i_loop++)
|
||||
{
|
||||
init_ServiceType(&(type->Service[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.Service=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ServiceDiscoveryResType(struct ServiceDiscoveryResType* type)
|
||||
{
|
||||
init_PaymentOptionListType(&(type->PaymentOptionList));
|
||||
init_ChargeServiceType(&(type->ChargeService));
|
||||
init_ServiceListType(&(type->ServiceList));
|
||||
type->isused.ServiceList=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ParameterType(struct ParameterType* type)
|
||||
{
|
||||
type->isused.boolValue=0;
|
||||
type->isused.byteValue=0;
|
||||
type->isused.shortValue=0;
|
||||
type->isused.intValue=0;
|
||||
type->isused.physicalValue=0;
|
||||
type->isused.stringValue=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ParameterSetType(struct ParameterSetType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
for(i_loop=0; i_loop<8;i_loop++)
|
||||
{
|
||||
init_ParameterType(&(type->Parameter[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.Parameter=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ServiceParameterListType(struct ServiceParameterListType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
for(i_loop=0; i_loop<3;i_loop++)
|
||||
{
|
||||
init_ParameterSetType(&(type->ParameterSet[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.ParameterSet=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ServiceDetailResType(struct ServiceDetailResType* type)
|
||||
{
|
||||
init_ServiceParameterListType(&(type->ServiceParameterList));
|
||||
type->isused.ServiceParameterList=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SelectedServiceType(struct SelectedServiceType* type)
|
||||
{
|
||||
type->isused.ParameterSetID=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SelectedServiceListType(struct SelectedServiceListType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
for(i_loop=0; i_loop<16;i_loop++)
|
||||
{
|
||||
init_SelectedServiceType(&(type->SelectedService[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.SelectedService=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_PaymentServiceSelectionReqType(struct PaymentServiceSelectionReqType* type)
|
||||
{
|
||||
init_SelectedServiceListType(&(type->SelectedServiceList));
|
||||
|
||||
}
|
||||
|
||||
static void init_eMAIDType(struct eMAIDType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_certificateType(struct certificateType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SubCertificatesType(struct SubCertificatesType* type)
|
||||
{
|
||||
|
||||
|
||||
type->arraylen.Certificate=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_CertificateChainType(struct CertificateChainType* type)
|
||||
{
|
||||
type->isused.attr_Id=0;
|
||||
init_SubCertificatesType(&(type->SubCertificates));
|
||||
type->isused.SubCertificates=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_PaymentDetailsReqType(struct PaymentDetailsReqType* type)
|
||||
{
|
||||
init_CertificateChainType(&(type->ContractSignatureCertChain));
|
||||
|
||||
}
|
||||
|
||||
static void init_genChallengeType(struct genChallengeType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_AuthorizationReqType(struct AuthorizationReqType* type)
|
||||
{
|
||||
type->isused.attr_Id=0;
|
||||
type->isused.GenChallenge=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_AC_EVChargeParameterType(struct AC_EVChargeParameterType* type)
|
||||
{
|
||||
type->isused.DepartureTime=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_DC_EVChargeParameterType(struct DC_EVChargeParameterType* type)
|
||||
{
|
||||
type->isused.DepartureTime=0;
|
||||
type->isused.EVMaximumPowerLimit=0;
|
||||
type->isused.EVEnergyCapacity=0;
|
||||
type->isused.EVEnergyRequest=0;
|
||||
type->isused.FullSOC=0;
|
||||
type->isused.BulkSOC=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ChargeParameterDiscoveryReqType(struct ChargeParameterDiscoveryReqType* type)
|
||||
{
|
||||
type->isused.MaxEntriesSAScheduleTuple=0;
|
||||
type->isused.AC_EVChargeParameter=0;
|
||||
type->isused.DC_EVChargeParameter=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_RelativeTimeIntervalType(struct RelativeTimeIntervalType* type)
|
||||
{
|
||||
type->isused.duration=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_PMaxScheduleEntryType(struct PMaxScheduleEntryType* type)
|
||||
{
|
||||
init_RelativeTimeIntervalType(&(type->RelativeTimeInterval));
|
||||
|
||||
}
|
||||
|
||||
static void init_PMaxScheduleType(struct PMaxScheduleType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
for(i_loop=0; i_loop<48;i_loop++)
|
||||
{
|
||||
init_PMaxScheduleEntryType(&(type->PMaxScheduleEntry[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.PMaxScheduleEntry=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_tariffDescriptionType(struct tariffDescriptionType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_CostType(struct CostType* type)
|
||||
{
|
||||
type->isused.amountMultiplier=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ConsumptionCostType(struct ConsumptionCostType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
for(i_loop=0; i_loop<3;i_loop++)
|
||||
{
|
||||
init_CostType(&(type->Cost[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.Cost=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SalesTariffEntryType(struct SalesTariffEntryType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
init_RelativeTimeIntervalType(&(type->RelativeTimeInterval));
|
||||
type->isused.EPriceLevel=0;
|
||||
for(i_loop=0; i_loop<3;i_loop++)
|
||||
{
|
||||
init_ConsumptionCostType(&(type->ConsumptionCost[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.ConsumptionCost=0;
|
||||
type->isused.ConsumptionCost=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SalesTariffType(struct SalesTariffType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
type->isused.attr_Id=0;
|
||||
type->isused.SalesTariffDescription=0;
|
||||
type->isused.NumEPriceLevels=0;
|
||||
for(i_loop=0; i_loop<24;i_loop++)
|
||||
{
|
||||
init_SalesTariffEntryType(&(type->SalesTariffEntry[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.SalesTariffEntry=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SAScheduleTupleType(struct SAScheduleTupleType* type)
|
||||
{
|
||||
init_PMaxScheduleType(&(type->PMaxSchedule));
|
||||
type->isused.SalesTariff=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_SAScheduleListType(struct SAScheduleListType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
for(i_loop=0; i_loop<3;i_loop++)
|
||||
{
|
||||
init_SAScheduleTupleType(&(type->SAScheduleTuple[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.SAScheduleTuple=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_AC_EVSEChargeParameterType(struct AC_EVSEChargeParameterType* type)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void init_DC_EVSEStatusType(struct DC_EVSEStatusType* type)
|
||||
{
|
||||
type->isused.EVSEIsolationStatus=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_DC_EVSEChargeParameterType(struct DC_EVSEChargeParameterType* type)
|
||||
{
|
||||
init_DC_EVSEStatusType(&(type->DC_EVSEStatus));
|
||||
type->isused.EVSECurrentRegulationTolerance=0;
|
||||
type->isused.EVSEEnergyToBeDelivered=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ChargeParameterDiscoveryResType(struct ChargeParameterDiscoveryResType* type)
|
||||
{
|
||||
type->isused.SAScheduleList=0;
|
||||
type->isused.AC_EVSEChargeParameter=0;
|
||||
type->isused.DC_EVSEChargeParameter=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ProfileEntryType(struct ProfileEntryType* type)
|
||||
{
|
||||
type->isused.ChargingProfileEntryMaxNumberOfPhasesInUse=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ChargingProfileType(struct ChargingProfileType* type)
|
||||
{
|
||||
int i_loop;
|
||||
|
||||
for(i_loop=0; i_loop<24;i_loop++)
|
||||
{
|
||||
init_ProfileEntryType(&(type->ProfileEntry[i_loop]));
|
||||
}
|
||||
|
||||
type->arraylen.ProfileEntry=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_DC_EVPowerDeliveryParameterType(struct DC_EVPowerDeliveryParameterType* type)
|
||||
{
|
||||
type->isused.BulkChargingComplete=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_PowerDeliveryReqType(struct PowerDeliveryReqType* type)
|
||||
{
|
||||
init_ChargingProfileType(&(type->ChargingProfile));
|
||||
type->isused.ChargingProfile=0;
|
||||
type->isused.DC_EVPowerDeliveryParameter=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_PowerDeliveryResType(struct PowerDeliveryResType* type)
|
||||
{
|
||||
type->isused.AC_EVSEStatus=0;
|
||||
type->isused.DC_EVSEStatus=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_meterIDType(struct meterIDType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_sigMeterReadingType(struct sigMeterReadingType* type)
|
||||
{
|
||||
type->arraylen.data=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_MeterInfoType(struct MeterInfoType* type)
|
||||
{
|
||||
type->isused.MeterReading=0;
|
||||
type->isused.SigMeterReading=0;
|
||||
type->isused.MeterStatus=0;
|
||||
type->isused.TMeter=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_MeteringReceiptReqType(struct MeteringReceiptReqType* type)
|
||||
{
|
||||
type->isused.attr_Id=0;
|
||||
type->isused.SAScheduleTupleID=0;
|
||||
init_MeterInfoType(&(type->MeterInfo));
|
||||
|
||||
}
|
||||
|
||||
static void init_MeteringReceiptResType(struct MeteringReceiptResType* type)
|
||||
{
|
||||
type->isused.AC_EVSEStatus=0;
|
||||
type->isused.DC_EVSEStatus=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_ListOfRootCertificateIDsType(struct ListOfRootCertificateIDsType* type)
|
||||
{
|
||||
|
||||
|
||||
type->arraylen.RootCertificateID=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_CertificateUpdateReqType(struct CertificateUpdateReqType* type)
|
||||
{
|
||||
init_CertificateChainType(&(type->ContractSignatureCertChain));
|
||||
init_ListOfRootCertificateIDsType(&(type->ListOfRootCertificateIDs));
|
||||
|
||||
}
|
||||
|
||||
static void init_CertificateUpdateResType(struct CertificateUpdateResType* type)
|
||||
{
|
||||
init_CertificateChainType(&(type->SAProvisioningCertificateChain));
|
||||
init_CertificateChainType(&(type->ContractSignatureCertChain));
|
||||
type->isused.RetryCounter=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_CertificateInstallationReqType(struct CertificateInstallationReqType* type)
|
||||
{
|
||||
init_ListOfRootCertificateIDsType(&(type->ListOfRootCertificateIDs));
|
||||
|
||||
}
|
||||
|
||||
static void init_CertificateInstallationResType(struct CertificateInstallationResType* type)
|
||||
{
|
||||
init_CertificateChainType(&(type->SAProvisioningCertificateChain));
|
||||
init_CertificateChainType(&(type->ContractSignatureCertChain));
|
||||
|
||||
}
|
||||
|
||||
static void init_ChargingStatusResType(struct ChargingStatusResType* type)
|
||||
{
|
||||
type->isused.EVSEMaxCurrent=0;
|
||||
init_MeterInfoType(&(type->MeterInfo));
|
||||
type->isused.MeterInfo=0;
|
||||
type->isused.ReceiptRequired=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_CableCheckReqType(struct CableCheckReqType* type)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void init_CableCheckResType(struct CableCheckResType* type)
|
||||
{
|
||||
init_DC_EVSEStatusType(&(type->DC_EVSEStatus));
|
||||
|
||||
}
|
||||
|
||||
static void init_PreChargeReqType(struct PreChargeReqType* type)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void init_PreChargeResType(struct PreChargeResType* type)
|
||||
{
|
||||
init_DC_EVSEStatusType(&(type->DC_EVSEStatus));
|
||||
|
||||
}
|
||||
|
||||
static void init_CurrentDemandReqType(struct CurrentDemandReqType* type)
|
||||
{
|
||||
type->isused.EVMaximumVoltageLimit=0;
|
||||
type->isused.EVMaximumCurrentLimit=0;
|
||||
type->isused.EVMaximumPowerLimit=0;
|
||||
type->isused.BulkChargingComplete=0;
|
||||
type->isused.RemainingTimeToFullSoC=0;
|
||||
type->isused.RemainingTimeToBulkSoC=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_CurrentDemandResType(struct CurrentDemandResType* type)
|
||||
{
|
||||
init_DC_EVSEStatusType(&(type->DC_EVSEStatus));
|
||||
type->isused.EVSEMaximumVoltageLimit=0;
|
||||
type->isused.EVSEMaximumCurrentLimit=0;
|
||||
type->isused.EVSEMaximumPowerLimit=0;
|
||||
init_MeterInfoType(&(type->MeterInfo));
|
||||
type->isused.MeterInfo=0;
|
||||
type->isused.ReceiptRequired=0;
|
||||
|
||||
}
|
||||
|
||||
static void init_WeldingDetectionReqType(struct WeldingDetectionReqType* type)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void init_WeldingDetectionResType(struct WeldingDetectionResType* type)
|
||||
{
|
||||
init_DC_EVSEStatusType(&(type->DC_EVSEStatus));
|
||||
|
||||
}
|
||||
|
||||
static void init_BodyType(struct BodyType* type)
|
||||
{
|
||||
type->isused.SessionSetupReq=0;
|
||||
type->isused.SessionSetupRes=0;
|
||||
type->isused.ServiceDiscoveryReq=0;
|
||||
type->isused.ServiceDiscoveryRes=0;
|
||||
type->isused.ServiceDetailReq=0;
|
||||
type->isused.ServiceDetailRes=0;
|
||||
type->isused.PaymentServiceSelectionReq=0;
|
||||
type->isused.PaymentServiceSelectionRes=0;
|
||||
type->isused.PaymentDetailsReq=0;
|
||||
type->isused.PaymentDetailsRes=0;
|
||||
type->isused.AuthorizationReq=0;
|
||||
type->isused.AuthorizationRes=0;
|
||||
type->isused.ChargeParameterDiscoveryReq=0;
|
||||
type->isused.ChargeParameterDiscoveryRes=0;
|
||||
type->isused.PowerDeliveryReq=0;
|
||||
type->isused.PowerDeliveryRes=0;
|
||||
type->isused.MeteringReceiptReq=0;
|
||||
type->isused.MeteringReceiptRes=0;
|
||||
type->isused.SessionStopReq=0;
|
||||
type->isused.SessionStopRes=0;
|
||||
type->isused.CertificateUpdateReq=0;
|
||||
type->isused.CertificateUpdateRes=0;
|
||||
type->isused.CertificateInstallationReq=0;
|
||||
type->isused.CertificateInstallationRes=0;
|
||||
type->isused.ChargingStatusReq=0;
|
||||
type->isused.ChargingStatusRes=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;
|
||||
|
||||
}
|
||||
|
||||
static void init_AnonType_V2G_Message(struct AnonType_V2G_Message* type)
|
||||
{
|
||||
init_BodyType(&(type->Body));
|
||||
|
||||
}
|
||||
|
||||
static void init_EXIDocumentType(struct EXIDocumentType* type)
|
||||
{
|
||||
init_AnonType_V2G_Message(&(type->V2G_Message));
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2010 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXI_SERVICE_H_
|
||||
#define EXI_SERVICE_H_
|
||||
|
||||
#include "v2g_dataTypes.h"
|
||||
#include "EXITypes.h"
|
||||
|
||||
struct uniqueIDPath
|
||||
{
|
||||
int id[10];
|
||||
size_t pos;
|
||||
};
|
||||
|
||||
|
||||
struct EXIService
|
||||
{
|
||||
/* in-/ out-stream */
|
||||
bitstream_t inStream;
|
||||
bitstream_t outStream;
|
||||
|
||||
/* EXI */
|
||||
exi_state_t stateDecode;
|
||||
exi_state_t stateEncode;
|
||||
exi_event_t event;
|
||||
uint16_t qnameID;
|
||||
exi_value_t val;
|
||||
|
||||
/* v2g message data structure */
|
||||
struct EXIDocumentType exiMsg;
|
||||
|
||||
/* unique id for ambiguous elements */
|
||||
struct uniqueIDPath idPath;
|
||||
|
||||
/* error code */
|
||||
uint8_t errorCode;
|
||||
|
||||
/* offset for transported header data */
|
||||
uint16_t transportHeaderOffset;
|
||||
};
|
||||
|
||||
|
||||
/* define error codes */
|
||||
#define EXI_NON_VALID_MESSAGE 0x01
|
||||
#define EXI_SERIALIZATION_FAILED 0x02
|
||||
#define EXI_DESERIALIZATION_FAILED 0x03
|
||||
#define EXI_DATATYPE_FAILED 0x04
|
||||
#define EXI_VALUE_RANGE_FAILED 0x05
|
||||
|
||||
#define EXI_UNKNOWN_ERROR 0xFF
|
||||
|
||||
#endif /* EXI_SERVICE_H_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
|
@ -1,322 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXISeGen</p>
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef SERVICECLIENTSTUBS_H
|
||||
#define SERVICECLIENTSTUBS_H
|
||||
|
||||
#include "v2g_service.h"
|
||||
#include "v2g_dataTypes.h"
|
||||
#include "v2g_serviceClientStubs.h"
|
||||
|
||||
|
||||
enum responseMessages
|
||||
{
|
||||
SESSIONSETUPRES,
|
||||
|
||||
SERVICEDISCOVERYRES,
|
||||
|
||||
SERVICEDETAILRES,
|
||||
|
||||
PAYMENTSERVICESELECTIONRES,
|
||||
|
||||
PAYMENTDETAILSRES,
|
||||
|
||||
AUTHORIZATIONRES,
|
||||
|
||||
CHARGEPARAMETERDISCOVERYRES,
|
||||
|
||||
POWERDELIVERYRES,
|
||||
|
||||
CHARGINGSTATUSRES,
|
||||
|
||||
METERINGRECEIPTRES,
|
||||
|
||||
CERTIFICATEUPDATERES,
|
||||
|
||||
CERTIFICATEINSTALLATIONRES,
|
||||
|
||||
CABLECHECKRES,
|
||||
|
||||
PRECHARGERES,
|
||||
|
||||
CURRENTDEMANDRES,
|
||||
|
||||
WELDINGDETECTIONRES,
|
||||
|
||||
SESSIONSTOPRES
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote sessionSetup call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct SessionSetupReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct SessionSetupResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_sessionSetup(struct EXIService* service, struct MessageHeaderType* header, struct SessionSetupReqType* params, struct SessionSetupResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote serviceDiscovery call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct ServiceDiscoveryReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct ServiceDiscoveryResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_serviceDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDiscoveryReqType* params, struct ServiceDiscoveryResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote serviceDetail call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct ServiceDetailReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct ServiceDetailResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_serviceDetail(struct EXIService* service, struct MessageHeaderType* header, struct ServiceDetailReqType* params, struct ServiceDetailResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote paymentServiceSelection call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct PaymentServiceSelectionReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct PaymentServiceSelectionResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_paymentServiceSelection(struct EXIService* service, struct MessageHeaderType* header, struct PaymentServiceSelectionReqType* params, struct PaymentServiceSelectionResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote paymentDetails call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct PaymentDetailsReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct PaymentDetailsResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_paymentDetails(struct EXIService* service, struct MessageHeaderType* header, struct PaymentDetailsReqType* params, struct PaymentDetailsResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote authorization call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct AuthorizationReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct AuthorizationResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_authorization(struct EXIService* service, struct MessageHeaderType* header, struct AuthorizationReqType* params, struct AuthorizationResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote chargeParameterDiscovery call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* 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
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_chargeParameterDiscovery(struct EXIService* service, struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* params, struct ChargeParameterDiscoveryResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote powerDelivery call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct PowerDeliveryReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct PowerDeliveryResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_powerDelivery(struct EXIService* service, struct MessageHeaderType* header, struct PowerDeliveryReqType* params, struct PowerDeliveryResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote chargingStatus call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param result struct ChargingStatusResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_chargingStatus(struct EXIService* service, struct MessageHeaderType* header, struct ChargingStatusResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote meteringReceipt call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct MeteringReceiptReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct MeteringReceiptResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_meteringReceipt(struct EXIService* service, struct MessageHeaderType* header, struct MeteringReceiptReqType* params, struct MeteringReceiptResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote certificateUpdate call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct CertificateUpdateReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct CertificateUpdateResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_certificateUpdate(struct EXIService* service, struct MessageHeaderType* header, struct CertificateUpdateReqType* params, struct CertificateUpdateResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote certificateInstallation call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct CertificateInstallationReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct CertificateInstallationResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_certificateInstallation(struct EXIService* service, struct MessageHeaderType* header, struct CertificateInstallationReqType* params, struct CertificateInstallationResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote cableCheck call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* 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 prepare_cableCheck(struct EXIService* service, struct MessageHeaderType* header, struct CableCheckReqType* params, struct CableCheckResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote preCharge call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* 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 prepare_preCharge(struct EXIService* service, struct MessageHeaderType* header, struct PreChargeReqType* params, struct PreChargeResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote currentDemand call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* 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 prepare_currentDemand(struct EXIService* service, struct MessageHeaderType* header, struct CurrentDemandReqType* params, struct CurrentDemandResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote weldingDetection call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* 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 prepare_weldingDetection(struct EXIService* service, struct MessageHeaderType* header, struct WeldingDetectionReqType* params, struct WeldingDetectionResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Prepares the remote sessionStop call
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param header struct MessageHeaderType* Header data structure
|
||||
* \param params struct SessionStopReqType* Request data for the server (has to be set up before)
|
||||
* \param result struct SessionStopResType* Contains the response data from the server
|
||||
* \return 0 = 0K; -1 = ERROR */
|
||||
int prepare_sessionStop(struct EXIService* service, struct MessageHeaderType* header, struct SessionStopReqType* params, struct SessionStopResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Determines which response message was received
|
||||
* \param service struct EXIService* Service data structure (has to be initialized before)
|
||||
* \param respMsg enum responseMessages* contains the name of the response message
|
||||
* \param result struct SessionStopResType* Contains the response data from the server
|
||||
* \return 0 = 0K; 0 != ERROR */
|
||||
int determineResponseMessage(struct EXIService* service, enum responseMessages* respMsg);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Initialize the v2g client
|
||||
* \param service struct EXIService* Service data structure
|
||||
* \param service_bytes exi_bytes_t Reserved for byte handling
|
||||
* \param service_string exi_string_ucs_t Reserved for string handling
|
||||
* \param inStream uint8_t* Instream buffer
|
||||
* \param max_inStream_size size_t Max size for an instream message
|
||||
* \param outStream uint8_t* Outstream buffer
|
||||
* \param outPayloadLength uint32_t* Provides the length of the encoded request EXI message
|
||||
* \param max_outStream_size size_t Max size for an outstream message
|
||||
* \param transportHeaderOffset uint16_t Transport protocol offset
|
||||
* \return 0 = 0K; -1 = ERROR
|
||||
*/
|
||||
int init_v2gServiceClient(struct EXIService* service, exi_bytes_t service_bytes, exi_string_ucs_t service_string, uint8_t* inStream, size_t max_inStream_size, uint8_t* outStream, size_t max_outStream_size,uint32_t* outPayloadLength, uint16_t transportHeaderOffset);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef V2GSERVER_H_
|
||||
#define V2GSERVER_H_
|
||||
|
||||
#include "v2g_dataTypes.h"
|
||||
|
||||
|
||||
/**
|
||||
* \brief Init the v2g service data structure
|
||||
* \param service struct EXIService* Service data structure
|
||||
* \param bytes bytes_t setted up byte data structure
|
||||
* \param string_ucs_t setted up string data structure
|
||||
* \param transportHeaderOffset uint16_t Transport protocol offset
|
||||
* \return 0 = 0K; -1 = ERROR
|
||||
*/
|
||||
int init_v2gservice(struct EXIService* service, exi_bytes_t service_bytes, exi_string_ucs_t service_string, uint16_t transportHeaderOffset);
|
||||
|
||||
/**
|
||||
* \brief Takes the EXI stream, invokes the called service method, and provides the response EXI stream
|
||||
* \param service struct EXIService* Represent the service data structure
|
||||
* \param inStream uint8_t* EXI in stream
|
||||
* \param sizeInStream uint16_t Length of the inStream
|
||||
* \param outStream uint8_t* Represent the out stream
|
||||
* \param sizeOutStream uint16_t Size of the out stream
|
||||
* \param outStreamLength uint16_t* Length of the stream
|
||||
* \return 0 = 0K; -1 = ERROR
|
||||
*/
|
||||
int messageDispatcher(struct EXIService* service, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t sizeOutStream, uint16_t* outStreamLength);
|
||||
|
||||
#endif /* V2GSERVER_H_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,186 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2013 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
* <p>Code generated by EXISeGen</p>
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef SERVICEMETHODS_H
|
||||
#define SERVICEMETHODS_H
|
||||
|
||||
#include "v2g_dataTypes.h"
|
||||
#include "EXITypes.h"
|
||||
|
||||
/** This service methods has to be implemented by the EVSE server */
|
||||
/**
|
||||
* \brief This sessionSetup method is called by the service dispatcher if there was passed a sessionSetup-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct SessionSetupReqType Parameter dataset of the sessionSetup request message
|
||||
* \param result struct SessionSetupResType Result dataset for the sessionSetup response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int sessionSetup(struct MessageHeaderType* header, struct SessionSetupReqType* param, struct SessionSetupResType* result);
|
||||
|
||||
/**
|
||||
* \brief This serviceDiscovery method is called by the service dispatcher if there was passed a serviceDiscovery-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct ServiceDiscoveryReqType Parameter dataset of the serviceDiscovery request message
|
||||
* \param result struct ServiceDiscoveryResType Result dataset for the serviceDiscovery response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int serviceDiscovery(struct MessageHeaderType* header, struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result);
|
||||
|
||||
/**
|
||||
* \brief This serviceDetail method is called by the service dispatcher if there was passed a serviceDetail-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct ServiceDetailReqType Parameter dataset of the serviceDetail request message
|
||||
* \param result struct ServiceDetailResType Result dataset for the serviceDetail response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int serviceDetail(struct MessageHeaderType* header, struct ServiceDetailReqType* param, struct ServiceDetailResType* result);
|
||||
|
||||
/**
|
||||
* \brief This paymentServiceSelection method is called by the service dispatcher if there was passed a paymentServiceSelection-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct PaymentServiceSelectionReqType Parameter dataset of the paymentServiceSelection request message
|
||||
* \param result struct PaymentServiceSelectionResType Result dataset for the paymentServiceSelection response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int paymentServiceSelection(struct MessageHeaderType* header, struct PaymentServiceSelectionReqType* param, struct PaymentServiceSelectionResType* result);
|
||||
|
||||
/**
|
||||
* \brief This paymentDetails method is called by the service dispatcher if there was passed a paymentDetails-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct PaymentDetailsReqType Parameter dataset of the paymentDetails request message
|
||||
* \param result struct PaymentDetailsResType Result dataset for the paymentDetails response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int paymentDetails(struct MessageHeaderType* header, struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result);
|
||||
|
||||
/**
|
||||
* \brief This authorization method is called by the service dispatcher if there was passed a authorization-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct AuthorizationReqType Parameter dataset of the authorization request message
|
||||
* \param result struct AuthorizationResType Result dataset for the authorization response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int authorization(struct MessageHeaderType* header, struct AuthorizationReqType* param, struct AuthorizationResType* result);
|
||||
|
||||
/**
|
||||
* \brief This chargeParameterDiscovery method is called by the service dispatcher if there was passed a chargeParameterDiscovery-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct ChargeParameterDiscoveryReqType Parameter dataset of the chargeParameterDiscovery request message
|
||||
* \param result struct ChargeParameterDiscoveryResType Result dataset for the chargeParameterDiscovery response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int chargeParameterDiscovery(struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result);
|
||||
|
||||
/**
|
||||
* \brief This powerDelivery method is called by the service dispatcher if there was passed a powerDelivery-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct PowerDeliveryReqType Parameter dataset of the powerDelivery request message
|
||||
* \param result struct PowerDeliveryResType Result dataset for the powerDelivery response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int powerDelivery(struct MessageHeaderType* header, struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result);
|
||||
|
||||
/**
|
||||
* \brief This meteringReceipt method is called by the service dispatcher if there was passed a meteringReceipt-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct MeteringReceiptReqType Parameter dataset of the meteringReceipt request message
|
||||
* \param result struct MeteringReceiptResType Result dataset for the meteringReceipt response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int meteringReceipt(struct MessageHeaderType* header, struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result);
|
||||
|
||||
/**
|
||||
* \brief This sessionStop method is called by the service dispatcher if there was passed a sessionStop-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct SessionStopReqType Parameter dataset of the sessionStop request message
|
||||
* \param result struct SessionStopResType Result dataset for the sessionStop response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int sessionStop(struct MessageHeaderType* header, struct SessionStopReqType* param, struct SessionStopResType* result);
|
||||
|
||||
/**
|
||||
* \brief This certificateUpdate method is called by the service dispatcher if there was passed a certificateUpdate-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct CertificateUpdateReqType Parameter dataset of the certificateUpdate request message
|
||||
* \param result struct CertificateUpdateResType Result dataset for the certificateUpdate response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int certificateUpdate(struct MessageHeaderType* header, struct CertificateUpdateReqType* param, struct CertificateUpdateResType* result);
|
||||
|
||||
/**
|
||||
* \brief This certificateInstallation method is called by the service dispatcher if there was passed a certificateInstallation-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct CertificateInstallationReqType Parameter dataset of the certificateInstallation request message
|
||||
* \param result struct CertificateInstallationResType Result dataset for the certificateInstallation response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int certificateInstallation(struct MessageHeaderType* header, struct CertificateInstallationReqType* param, struct CertificateInstallationResType* result);
|
||||
|
||||
/**
|
||||
* \brief This chargingStatus method is called by the service dispatcher if there was passed a chargingStatus-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct ChargingStatusReqType Parameter dataset of the chargingStatus request message
|
||||
* \param result struct ChargingStatusResType Result dataset for the chargingStatus response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int chargingStatus(struct MessageHeaderType* header, struct ChargingStatusReqType* param, struct ChargingStatusResType* result);
|
||||
|
||||
/**
|
||||
* \brief This cableCheck method is called by the service dispatcher if there was passed a cableCheck-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct CableCheckReqType Parameter dataset of the cableCheck request message
|
||||
* \param result struct CableCheckResType Result dataset for the cableCheck response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int cableCheck(struct MessageHeaderType* header, struct CableCheckReqType* param, struct CableCheckResType* result);
|
||||
|
||||
/**
|
||||
* \brief This preCharge method is called by the service dispatcher if there was passed a preCharge-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct PreChargeReqType Parameter dataset of the preCharge request message
|
||||
* \param result struct PreChargeResType Result dataset for the preCharge response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int preCharge(struct MessageHeaderType* header, struct PreChargeReqType* param, struct PreChargeResType* result);
|
||||
|
||||
/**
|
||||
* \brief This currentDemand method is called by the service dispatcher if there was passed a currentDemand-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct CurrentDemandReqType Parameter dataset of the currentDemand request message
|
||||
* \param result struct CurrentDemandResType Result dataset for the currentDemand response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int currentDemand(struct MessageHeaderType* header, struct CurrentDemandReqType* param, struct CurrentDemandResType* result);
|
||||
|
||||
/**
|
||||
* \brief This weldingDetection method is called by the service dispatcher if there was passed a weldingDetection-based request message.
|
||||
* \param header struct MessageHeaderType* Header dataset
|
||||
* \param param struct WeldingDetectionReqType Parameter dataset of the weldingDetection request message
|
||||
* \param result struct WeldingDetectionResType Result dataset for the weldingDetection response message
|
||||
* \return 0 = 0K; -1 = ERROR (message dispatcher will return an error) */
|
||||
int weldingDetection(struct MessageHeaderType* header, struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,192 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2012 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
|
||||
/* includes for the application handshake protocol */
|
||||
#include "appHand_service.h"
|
||||
#include "appHand_dataTypes.h"
|
||||
#include "v2g_service.h"
|
||||
#include "v2gtp.h"
|
||||
#include "evse_server.h"
|
||||
|
||||
#include "v2g_serviceDispatcher.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#define MAX_BYTE_SIZE 64
|
||||
#define MAX_STRING_SIZE 64
|
||||
#define MAX_STREAM_SIZE 100
|
||||
|
||||
static int appHandshakeHandler(struct EXIDatabinder* appHandService, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t* outStreamLength);
|
||||
static void printASCIIString(uint32_t* string, uint32_t len);
|
||||
|
||||
int testV2GService(uint8_t* inStream, uint16_t inStreamLength, uint8_t* outStream, uint16_t* outStreamLength)
|
||||
{
|
||||
static uint8_t byte_array[MAX_BYTE_SIZE]; /* define MAX_BYTE_SIZE before*/
|
||||
static uint32_t string_array[MAX_STRING_SIZE]; /* define MAX_STRING_SIZE before*/
|
||||
uint16_t exiMsgLength;
|
||||
uint8_t errn;
|
||||
|
||||
struct EXIDatabinder appHandService;
|
||||
struct EXIService service;
|
||||
|
||||
static uint8_t isHandshake = 1;
|
||||
|
||||
/* BINARY memory setup */
|
||||
exi_bytes_t bytes = { MAX_BYTE_SIZE, byte_array, 0 };
|
||||
|
||||
/* STRING memory setup */
|
||||
exi_string_ucs_t string = { MAX_STRING_SIZE, string_array, 0 };
|
||||
|
||||
/**********************************************
|
||||
* Init V2G server and initialize array types *
|
||||
* for the EXI decoding as well as the offset *
|
||||
* for the transportation header *
|
||||
**********************************************/
|
||||
|
||||
init_v2gservice(&service, bytes, string, V2GTP_HEADER_LENGTH);
|
||||
|
||||
/* check, if the DoIP header is correct and determine payload */
|
||||
if(read_v2gtpHeader(inStream,inStreamLength, &exiMsgLength))
|
||||
{
|
||||
/* v2gtp header not correct */
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Here, it is assumed the first message is always the application handshake protocol.
|
||||
* The successor messages are 15118 charging based messages and handled by the message
|
||||
* dispatcher. */
|
||||
|
||||
if(isHandshake)
|
||||
{
|
||||
|
||||
|
||||
|
||||
/* init the de- / serializer */
|
||||
init_appHandDeserializer(&appHandService,bytes,string,V2GTP_HEADER_LENGTH);
|
||||
init_appHandSerializer(&appHandService,bytes,string,MAX_STREAM_SIZE,V2GTP_HEADER_LENGTH);
|
||||
|
||||
if(appHandshakeHandler(&appHandService, inStream,inStreamLength,outStream,outStreamLength))
|
||||
{
|
||||
return -1; /* an error occured */
|
||||
}
|
||||
|
||||
isHandshake = 0; /* here: next time a charging message is expected */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Pass the received EXI message stream (inStream + exiMsgLength) to the *
|
||||
* v2g message dispatcher. The outStream contains the response message *
|
||||
* stream. *
|
||||
****************************************************************************/
|
||||
errn = messageDispatcher(&service, inStream, exiMsgLength, outStream, MAX_STREAM_SIZE, outStreamLength);
|
||||
|
||||
|
||||
if(errn)
|
||||
{
|
||||
|
||||
/* an error occurred; in such a case the outStream contains the generic error V2G message which
|
||||
* can be response to the EV! */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* write v2gtp header */
|
||||
write_v2gtpHeader(outStream, outStreamLength, V2GTP_EXI_TYPE);
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** Example implementation of the app handshake protocol for the EVSE side */
|
||||
static int appHandshakeHandler(struct EXIDatabinder* appHandService, uint8_t* inStream, uint16_t sizeInStream, uint8_t* outStream, uint16_t* outStreamLength)
|
||||
{
|
||||
struct EXIDocumentType_appHand exiDoc;
|
||||
struct SupportedAppProtocolReq handshake;
|
||||
struct SupportedAppProtocolRes resultHandshake;
|
||||
size_t i;
|
||||
|
||||
init_SupportedAppProtocolReq(&handshake);
|
||||
init_EXIDocumentType_appHand(&exiDoc);
|
||||
|
||||
/* we expect a supportedAppProtocolReq */
|
||||
exiDoc.supportedAppProtocolReq = &handshake;
|
||||
|
||||
|
||||
if(deserialize_appHand(appHandService,inStream,sizeInStream,&exiDoc))
|
||||
{
|
||||
/* an error occured */
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("EVSE side: List of application handshake protocols of the EV \n");
|
||||
|
||||
for(i=0;i<handshake.arraylen.AppProtocol;i++)
|
||||
{
|
||||
printf("\tProtocol entry #=%d\n",(i+1));
|
||||
printf("\t\tProtocolNamespace=");
|
||||
printASCIIString(handshake.AppProtocol[i].ProtocolNamespace.data,handshake.AppProtocol[i].ProtocolNamespace.arraylen.data);
|
||||
printf("\t\tVersion=%d.%d\n", handshake.AppProtocol[i].VersionNumberMajor,handshake.AppProtocol[i].VersionNumberMinor);
|
||||
printf("\t\tSchemaID=%d\n", handshake.AppProtocol[i].SchemaID);
|
||||
printf("\t\tPriority=%d\n", handshake.AppProtocol[i].Priority);
|
||||
}
|
||||
|
||||
/* prepare response handshake response:
|
||||
* it is assumed, we support the 15118 1.0 version :-) */
|
||||
resultHandshake.ResponseCode=OK_SuccessfulNegotiation_responseCodeType;
|
||||
resultHandshake.SchemaID=handshake.AppProtocol[0].SchemaID; /* signal the protocol by the provided schema id*/
|
||||
resultHandshake.isused.SchemaID=1;
|
||||
|
||||
/* assign the response message to the exiDoc */
|
||||
init_EXIDocumentType_appHand(&exiDoc);
|
||||
exiDoc.supportedAppProtocolRes=&resultHandshake;
|
||||
exiDoc.isused.supportedAppProtocolRes=1;
|
||||
|
||||
if(serialize_appHand(appHandService, outStream,outStreamLength, &exiDoc))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void printASCIIString(uint32_t* string, uint32_t len) {
|
||||
unsigned int i;
|
||||
for(i=0; i<len; i++) {
|
||||
printf("%c",(char)string[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2012 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
#ifndef V2G_SERVER_H_
|
||||
#define V2G_SERVER_H_
|
||||
|
||||
#include "EXITypes.h"
|
||||
|
||||
int testV2GService(uint8_t* inStream, uint16_t inStreamLength, uint8_t* outStream,uint16_t* outStreamLength);
|
||||
|
||||
#endif /* V2G_SERVER_H_ */
|
|
@ -1,843 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2012 Siemens AG
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* @author Sebastian.Kaebisch@siemens.com
|
||||
* @version 0.8
|
||||
* @contact Joerg.Heuer@siemens.com
|
||||
*
|
||||
********************************************************************/
|
||||
|
||||
#include "v2g_serviceMethods.h"
|
||||
#include "v2g_dataTypes.h"
|
||||
#include <stdio.h>
|
||||
|
||||
static void printBinaryArray(uint8_t* byte, uint32_t len);
|
||||
|
||||
int sessionSetup(struct MessageHeaderType* header, struct SessionSetupReqType* param, struct SessionSetupResType* result)
|
||||
{
|
||||
|
||||
printf("EVSE side: sessionSetup called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
printf("\tHeader SessionID=");
|
||||
printBinaryArray(header->SessionID.data,header->SessionID.arraylen.data );
|
||||
printf("\t\t EVCCID=%d\n",param->EVCCID.data[0]);
|
||||
|
||||
|
||||
/* generate an unique sessionID */
|
||||
header->SessionID.data[0] = 1;
|
||||
header->SessionID.data[1] = 2;
|
||||
header->SessionID.data[2] = 3;
|
||||
header->SessionID.data[3] = 4;
|
||||
header->SessionID.data[4] = 5;
|
||||
header->SessionID.data[5] = 6;
|
||||
header->SessionID.data[6] = 7;
|
||||
header->SessionID.data[7] = 8;
|
||||
header->SessionID.arraylen.data=8;
|
||||
|
||||
/* Prepare data for EV */
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->EVSEID.data[1]=20;
|
||||
result->EVSEID.arraylen.data=2;
|
||||
result->EVSETimeStamp=123456789;
|
||||
result->isused.EVSETimeStamp=1;
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int serviceDiscovery(struct MessageHeaderType* header, struct ServiceDiscoveryReqType* param, struct ServiceDiscoveryResType* result)
|
||||
{
|
||||
printf("EVSE side: serviceDiscovery called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
printf("\tHeader SessionID=");
|
||||
printBinaryArray(header->SessionID.data,header->SessionID.arraylen.data );
|
||||
|
||||
printf("\t\t ServiceCategory=%d\n", param->ServiceCategory);
|
||||
|
||||
|
||||
|
||||
result->isused.ServiceList=0; /* we do not provide VAS */
|
||||
result->ResponseCode= OK_responseCodeType;
|
||||
|
||||
|
||||
/* result->ChargeService.SupportedEnergyTransferMode = AC_single_phase_core_EnergyTransferModeType; */
|
||||
result->ChargeService.ServiceID=1; /* ID of the charge service */
|
||||
result->ChargeService.ServiceName.data[0]='A';
|
||||
result->ChargeService.ServiceName.data[1]='C';
|
||||
result->ChargeService.ServiceName.data[2]='_';
|
||||
result->ChargeService.ServiceName.data[3]='D';
|
||||
result->ChargeService.ServiceName.data[4]='C';
|
||||
result->ChargeService.ServiceName.arraylen.data=5;
|
||||
result->ChargeService.isused.ServiceName=1;
|
||||
result->ChargeService.isused.ServiceScope=1;
|
||||
|
||||
result->ChargeService.FreeService = 1;
|
||||
result->ChargeService.ServiceCategory = EVCharging_serviceCategoryType;
|
||||
result->ChargeService.ServiceScope.data[0] = 100;
|
||||
result->ChargeService.ServiceScope.arraylen.data = 1;
|
||||
|
||||
result->ChargeService.SupportedEnergyTransferMode.EnergyTransferMode[0] = DC_combo_core_EnergyTransferModeType;
|
||||
result->ChargeService.SupportedEnergyTransferMode.EnergyTransferMode[1] = AC_single_phase_core_EnergyTransferModeType;
|
||||
result->ChargeService.SupportedEnergyTransferMode.arraylen.EnergyTransferMode=2;
|
||||
|
||||
result->PaymentOptionList.PaymentOption[0] = ExternalPayment_paymentOptionType; /* EVSE handles the payment */
|
||||
result->PaymentOptionList.PaymentOption[1] = Contract_paymentOptionType;
|
||||
result->PaymentOptionList.arraylen.PaymentOption=2;
|
||||
|
||||
if(param->ServiceCategory==Internet_serviceCategoryType || param->ServiceCategory==OtherCustom_serviceCategoryType || param->isused.ServiceCategory==0)
|
||||
{
|
||||
|
||||
result->ServiceList.Service[0].FreeService=1;
|
||||
result->ServiceList.Service[0].ServiceID=22; /* ID of the charge service */
|
||||
result->ServiceList.Service[0].ServiceName.data[0]='W';
|
||||
result->ServiceList.Service[0].ServiceName.data[1]='W';
|
||||
result->ServiceList.Service[0].ServiceName.data[2]='W';
|
||||
result->ServiceList.Service[0].ServiceName.arraylen.data=3;
|
||||
result->ServiceList.Service[0].ServiceCategory=Internet_serviceCategoryType;
|
||||
result->ServiceList.Service[0].isused.ServiceName=1;
|
||||
result->ServiceList.Service[0].isused.ServiceScope=0;
|
||||
|
||||
result->ServiceList.Service[1].FreeService=0;
|
||||
result->ServiceList.Service[1].ServiceID=33; /* ID of the charge service */
|
||||
result->ServiceList.Service[1].ServiceName.data[0]='H';
|
||||
result->ServiceList.Service[1].ServiceName.data[1]='T';
|
||||
result->ServiceList.Service[1].ServiceName.data[2]='T';
|
||||
result->ServiceList.Service[1].ServiceName.data[3]='P';
|
||||
result->ServiceList.Service[1].ServiceName.data[4]='S';
|
||||
result->ServiceList.Service[1].ServiceName.arraylen.data=5;
|
||||
result->ServiceList.Service[1].ServiceCategory=Internet_serviceCategoryType;
|
||||
result->ServiceList.Service[1].isused.ServiceName=1;
|
||||
result->ServiceList.Service[1].isused.ServiceScope=0;
|
||||
|
||||
|
||||
|
||||
result->ServiceList.arraylen.Service=2;
|
||||
result->isused.ServiceList=1;
|
||||
|
||||
} else {
|
||||
result->isused.ServiceList=0; /* no value added service requested */
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int paymentServiceSelection(struct MessageHeaderType* header, struct PaymentServiceSelectionReqType* param, struct PaymentServiceSelectionResType* result)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
printf("EVSE side: servicePaymentSelection called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
printf("\tHeader SessionID=");
|
||||
printBinaryArray(header->SessionID.data,header->SessionID.arraylen.data );
|
||||
|
||||
if(param->SelectedPaymentOption == ExternalPayment_paymentOptionType)
|
||||
printf("\t\t SelectedPaymentOption=ExternalPayment\n");
|
||||
|
||||
for(i=0; i<param->SelectedServiceList.arraylen.SelectedService;i++)
|
||||
{
|
||||
printf("\t\t ServiceID=%d\n",param->SelectedServiceList.SelectedService[i].ServiceID);
|
||||
if( param->SelectedServiceList.SelectedService[i].isused.ParameterSetID)
|
||||
printf("\t\t ParameterSetID=%d\n",param->SelectedServiceList.SelectedService[i].ParameterSetID);
|
||||
}
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int paymentDetails(struct MessageHeaderType* header, struct PaymentDetailsReqType* param, struct PaymentDetailsResType* result)
|
||||
{
|
||||
|
||||
|
||||
printf("EVSE side: paymentDetails called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
|
||||
printf("\t\t eMAID=%d\n", param->eMAID.data[0]);
|
||||
printf("\t\t ID=%c%c\n", param->ContractSignatureCertChain.attr_Id.data[0], param->ContractSignatureCertChain.attr_Id.data[1]);
|
||||
printf("\t\t Certificate=%c%c\n", param->ContractSignatureCertChain.Certificate.data[0], param->ContractSignatureCertChain.Certificate.data[1]);
|
||||
printf("\t\t SubCertificate 1=%c%c\n", param->ContractSignatureCertChain.SubCertificates.Certificate[0].data[0], param->ContractSignatureCertChain.SubCertificates.Certificate[0].data[1]);
|
||||
printf("\t\t SubCertificate 2=%c%c%c\n", param->ContractSignatureCertChain.SubCertificates.Certificate[1].data[0], param->ContractSignatureCertChain.SubCertificates.Certificate[1].data[1], param->ContractSignatureCertChain.SubCertificates.Certificate[1].data[2]);
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->GenChallenge.data[0]=1;
|
||||
result->GenChallenge.arraylen.data=1;
|
||||
result->EVSETimeStamp=123456;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int chargeParameterDiscovery(struct MessageHeaderType* header, struct ChargeParameterDiscoveryReqType* param, struct ChargeParameterDiscoveryResType* result)
|
||||
{
|
||||
struct PhysicalValueType f;
|
||||
|
||||
printf("EVSE side: chargeParameterDiscovery called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
printf("\t\t EVRequestedEnergyTransferType=%d\n",param->RequestedEnergyTransferMode);
|
||||
|
||||
/* check,if DC or AC is requested */
|
||||
if(param->RequestedEnergyTransferMode==DC_core_EnergyTransferModeType || param->isused.DC_EVChargeParameter==1)
|
||||
{
|
||||
printf("\t\t MaxEntriesSAScheduleTuple=%d\n", param->MaxEntriesSAScheduleTuple);
|
||||
printf("\t\t EVStatus:\n");
|
||||
printf("\t\t\t EVReady=%d\n", param->DC_EVChargeParameter->DC_EVStatus.EVReady);
|
||||
printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVChargeParameter->DC_EVStatus.EVRESSSOC);
|
||||
printf("\t\t\t EVErrorCode=%d\n", param->DC_EVChargeParameter->DC_EVStatus.EVErrorCode);
|
||||
|
||||
|
||||
printf("\t\t DepartureTime=%d\n", param->DC_EVChargeParameter->DepartureTime);
|
||||
printf("\t\t EVMaximumCurrentLimit=%d\n", param->DC_EVChargeParameter->EVMaximumCurrentLimit.Value);
|
||||
printf("\t\t EVMaximumPowerLimit=%d\n", param->DC_EVChargeParameter->EVMaximumPowerLimit.Value);
|
||||
printf("\t\t EVMaximumVoltageLimit=%d\n", param->DC_EVChargeParameter->EVMaximumVoltageLimit.Value);
|
||||
printf("\t\t EVEnergyCapacity=%d\n", param->DC_EVChargeParameter->EVEnergyCapacity.Value);
|
||||
printf("\t\t EVEnergyRequest=%d\n", param->DC_EVChargeParameter->EVEnergyRequest.Value);
|
||||
printf("\t\t FullSOC=%d\n", param->DC_EVChargeParameter->FullSOC);
|
||||
printf("\t\t BulkSOC=%d\n", param->DC_EVChargeParameter->BulkSOC);
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->EVSEProcessing = Finished_EVSEProcessingType;
|
||||
|
||||
result->isused.DC_EVSEChargeParameter = 1;
|
||||
result->isused.AC_EVSEChargeParameter = 0;
|
||||
result->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
|
||||
result->DC_EVSEChargeParameter->DC_EVSEStatus.EVSEIsolationStatus = Valid_isolationLevelType;
|
||||
result->DC_EVSEChargeParameter->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
|
||||
result->DC_EVSEChargeParameter->DC_EVSEStatus.EVSENotification = None_EVSENotificationType;
|
||||
result->DC_EVSEChargeParameter->DC_EVSEStatus.NotificationMaxDelay = 10;
|
||||
|
||||
f.Multiplier = 0;
|
||||
f.Unit = A_unitSymbolType;
|
||||
f.Value = 50;
|
||||
|
||||
result->DC_EVSEChargeParameter->EVSEMaximumCurrentLimit=f;
|
||||
|
||||
f.Unit = W_unitSymbolType;
|
||||
f.Value = 20000;
|
||||
|
||||
result->DC_EVSEChargeParameter->EVSEMaximumPowerLimit=f;
|
||||
|
||||
|
||||
f.Unit = V_unitSymbolType;
|
||||
f.Value = 400;
|
||||
|
||||
result->DC_EVSEChargeParameter->EVSEMaximumVoltageLimit=f;
|
||||
|
||||
f.Unit = A_unitSymbolType;
|
||||
f.Value = 5;
|
||||
|
||||
result->DC_EVSEChargeParameter->EVSEMinimumCurrentLimit=f;
|
||||
|
||||
f.Unit = V_unitSymbolType;
|
||||
f.Value = 200;
|
||||
|
||||
result->DC_EVSEChargeParameter->EVSEMinimumVoltageLimit=f;
|
||||
|
||||
f.Unit = A_unitSymbolType;
|
||||
f.Value = 2;
|
||||
|
||||
result->DC_EVSEChargeParameter->EVSECurrentRegulationTolerance=f;
|
||||
result->DC_EVSEChargeParameter->isused.EVSECurrentRegulationTolerance=1;
|
||||
|
||||
f.Unit = A_unitSymbolType;
|
||||
f.Value = 1;
|
||||
|
||||
result->DC_EVSEChargeParameter->EVSEPeakCurrentRipple=f;
|
||||
|
||||
f.Unit = W_unitSymbolType;
|
||||
f.Value = 5000;
|
||||
|
||||
result->DC_EVSEChargeParameter->EVSEEnergyToBeDelivered=f;
|
||||
result->DC_EVSEChargeParameter->isused.EVSEEnergyToBeDelivered=1;
|
||||
|
||||
/* set up a PMax schedule */
|
||||
result->isused.SAScheduleList=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SAScheduleTupleID=10;
|
||||
result->SAScheduleList->SAScheduleTuple[0].isused.SalesTariff=0; /* no tariffs */
|
||||
|
||||
/* set up two PMax entries: #1 */
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].PMax.Value=20000;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].PMax.Unit = W_unitSymbolType;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].PMax.Multiplier =0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].RelativeTimeInterval.start=0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].RelativeTimeInterval.isused.duration=0;
|
||||
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].PMax.Value=0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].PMax.Unit = W_unitSymbolType;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].PMax.Multiplier =0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].RelativeTimeInterval.start=1200; /* 20 min */
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].RelativeTimeInterval.isused.duration=0;
|
||||
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.arraylen.PMaxScheduleEntry=2; /* we set up two time entries */
|
||||
|
||||
|
||||
/* #2 */
|
||||
result->SAScheduleList->SAScheduleTuple[1].SAScheduleTupleID=15;
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[0].PMax.Value=10000;
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[0].PMax.Unit = W_unitSymbolType;
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[0].PMax.Multiplier =0;
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[0].RelativeTimeInterval.start=0;
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[0].RelativeTimeInterval.isused.duration=0;
|
||||
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[1].PMax.Value=0;
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[1].PMax.Unit = W_unitSymbolType;
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[1].PMax.Multiplier =1;
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[1].RelativeTimeInterval.start=1800; /* 30 min */
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[1].RelativeTimeInterval.duration=3600;
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.PMaxScheduleEntry[1].RelativeTimeInterval.isused.duration=1;
|
||||
|
||||
result->SAScheduleList->SAScheduleTuple[1].PMaxSchedule.arraylen.PMaxScheduleEntry=2; /* we set up two time entries */
|
||||
|
||||
result->SAScheduleList->arraylen.SAScheduleTuple=2; /* we used 2 tuple */
|
||||
|
||||
|
||||
|
||||
|
||||
} else { /* AC related */
|
||||
|
||||
printf("\t\t DepartureTime=%d\n", param->AC_EVChargeParameter->DepartureTime);
|
||||
printf("\t\t EAmount=%d\n", param->AC_EVChargeParameter->EAmount.Value);
|
||||
printf("\t\t EVMaxCurrent=%d\n", param->AC_EVChargeParameter->EVMaxCurrent.Value);
|
||||
printf("\t\t EVMaxVoltage=%d\n", param->AC_EVChargeParameter->EVMaxVoltage.Value);
|
||||
printf("\t\t EVMinCurrent=%d\n", param->AC_EVChargeParameter->EVMinCurrent.Value);
|
||||
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->EVSEProcessing = Finished_EVSEProcessingType;
|
||||
|
||||
result->isused.AC_EVSEChargeParameter = 1;
|
||||
result->isused.DC_EVSEChargeParameter = 0;
|
||||
|
||||
result->AC_EVSEChargeParameter->AC_EVSEStatus.RCD=1;
|
||||
result->AC_EVSEChargeParameter->AC_EVSEStatus.EVSENotification=None_EVSENotificationType;
|
||||
result->AC_EVSEChargeParameter->AC_EVSEStatus.NotificationMaxDelay=123;
|
||||
|
||||
|
||||
|
||||
f.Multiplier = 0;
|
||||
f.Unit = A_unitSymbolType;
|
||||
f.Value = 100;
|
||||
|
||||
result->AC_EVSEChargeParameter->EVSEMaxCurrent=f;
|
||||
|
||||
|
||||
f.Unit = V_unitSymbolType;
|
||||
f.Value = 300;
|
||||
result->AC_EVSEChargeParameter->EVSENominalVoltage=f;
|
||||
|
||||
result->EVSEProcessing=1;
|
||||
|
||||
|
||||
/* set up a PMax schedule */
|
||||
result->isused.SAScheduleList=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SAScheduleTupleID=10;
|
||||
result->SAScheduleList->SAScheduleTuple[0].isused.SalesTariff=0; /* no tariffs */
|
||||
|
||||
/* set up two PMax entries: #1 */
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].PMax.Value=20000;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].PMax.Unit = W_unitSymbolType;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].PMax.Multiplier =0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].RelativeTimeInterval.start=0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[0].RelativeTimeInterval.isused.duration=0;
|
||||
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].PMax.Value=0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].PMax.Unit = W_unitSymbolType;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].PMax.Multiplier =0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].RelativeTimeInterval.start=1200; /* 20 min */
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.PMaxScheduleEntry[1].RelativeTimeInterval.isused.duration=0;
|
||||
|
||||
result->SAScheduleList->SAScheduleTuple[0].PMaxSchedule.arraylen.PMaxScheduleEntry=2; /* we set up two time entries */
|
||||
|
||||
result->SAScheduleList->arraylen.SAScheduleTuple=1;
|
||||
result->isused.SAScheduleList=1;
|
||||
|
||||
result->SAScheduleList->SAScheduleTuple[0].isused.SalesTariff=1;
|
||||
|
||||
|
||||
/* set up sale entries */
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->NumEPriceLevels=2;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->isused.NumEPriceLevels=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffID=20;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->attr_Id.data[0]=100;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->attr_Id.arraylen.data=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->isused.attr_Id=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[0].EPriceLevel=2;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[0].isused.EPriceLevel=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[0].isused.ConsumptionCost=0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[0].RelativeTimeInterval.start=0;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[0].RelativeTimeInterval.duration=10;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[0].RelativeTimeInterval.isused.duration=1;
|
||||
|
||||
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].EPriceLevel=3;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].RelativeTimeInterval.start=11;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].RelativeTimeInterval.duration=10;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].RelativeTimeInterval.isused.duration=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].ConsumptionCost[0].Cost[0].amount=10;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].ConsumptionCost[0].Cost[0].amountMultiplier=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].ConsumptionCost[0].Cost[0].isused.amountMultiplier=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].ConsumptionCost[0].Cost[0].costKind=RenewableGenerationPercentage_costKindType;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].ConsumptionCost[0].startValue.Value=123;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].ConsumptionCost[0].arraylen.Cost=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].isused.EPriceLevel=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].isused.ConsumptionCost=1;
|
||||
|
||||
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->SalesTariffEntry[1].arraylen.ConsumptionCost=1;
|
||||
result->SAScheduleList->SAScheduleTuple[0].SalesTariff->arraylen.SalesTariffEntry=2;
|
||||
result->SAScheduleList->arraylen.SAScheduleTuple=1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int powerDelivery(struct MessageHeaderType* header, struct PowerDeliveryReqType* param, struct PowerDeliveryResType* result)
|
||||
{
|
||||
|
||||
size_t i;
|
||||
|
||||
printf("EVSE side: powerDelivery called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
|
||||
printf("\t\t ChargeProgress=%d\n", param->ChargeProgress);
|
||||
printf("\t\t SAScheduleTupleID=%d\n", param->SAScheduleTupleID);
|
||||
|
||||
if(param->isused.DC_EVPowerDeliveryParameter)
|
||||
{
|
||||
|
||||
printf("\t\t EVStatus:\n");
|
||||
printf("\t\t\t EVReady=%d\n", param->DC_EVPowerDeliveryParameter->DC_EVStatus.EVReady);
|
||||
printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVPowerDeliveryParameter->DC_EVStatus.EVRESSSOC);
|
||||
printf("\t\t\t EVErrorCode=%d\n", param->DC_EVPowerDeliveryParameter->DC_EVStatus.EVErrorCode);
|
||||
|
||||
printf("\t\t BulkChargingComplete=%d\n", param->DC_EVPowerDeliveryParameter->BulkChargingComplete);
|
||||
printf("\t\t ChargingComplete=%d\n", param->DC_EVPowerDeliveryParameter->ChargingComplete);
|
||||
|
||||
if(param->isused.ChargingProfile)
|
||||
{
|
||||
printf("\t\t\tChargingProfile:\n");
|
||||
printf("\t\t\t SAScheduleTupleID=%d\n",param->SAScheduleTupleID );
|
||||
for(i=0;i<param->ChargingProfile.arraylen.ProfileEntry;i++)
|
||||
{
|
||||
printf("\t\t\t Entry#%d\n",i);
|
||||
printf("\t\t\t\t ChargingProfileEntryMaxPower=%d (%d %d) \n", param->ChargingProfile.ProfileEntry[i].ChargingProfileEntryMaxPower.Value, param->ChargingProfile.ProfileEntry[i].ChargingProfileEntryMaxPower.Unit, param->ChargingProfile.ProfileEntry[i].ChargingProfileEntryMaxPower.Multiplier);
|
||||
printf("\t\t\t\t ChargingProfileEntryStart=%d\n", param->ChargingProfile.ProfileEntry[i].ChargingProfileEntryStart);
|
||||
printf("\t\t\t\t ChargingProfileEntryMaxNumberOfPhasesInUse=%d\n", param->ChargingProfile.ProfileEntry[i].ChargingProfileEntryMaxNumberOfPhasesInUse);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->DC_EVSEStatus->EVSEIsolationStatus =0;
|
||||
result->DC_EVSEStatus->isused.EVSEIsolationStatus = 1;
|
||||
result->DC_EVSEStatus->EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
|
||||
result->DC_EVSEStatus->EVSENotification=None_EVSENotificationType;
|
||||
result->DC_EVSEStatus->NotificationMaxDelay=123;
|
||||
|
||||
result->isused.DC_EVSEStatus=1;
|
||||
result->isused.AC_EVSEStatus=0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->AC_EVSEStatus->RCD=0;
|
||||
result->AC_EVSEStatus->EVSENotification=3;
|
||||
result->AC_EVSEStatus->NotificationMaxDelay=12;
|
||||
|
||||
|
||||
result->isused.AC_EVSEStatus=1;
|
||||
result->isused.DC_EVSEStatus=0;
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int chargingStatus(struct MessageHeaderType* header, struct ChargingStatusReqType* param, struct ChargingStatusResType* result)
|
||||
{
|
||||
printf("EVSE side: chargingStatus called\n" );
|
||||
|
||||
|
||||
|
||||
result->ResponseCode=OK_responseCodeType;
|
||||
result->EVSEID.data[0]=12;
|
||||
result->EVSEID.arraylen.data=1;
|
||||
|
||||
result->AC_EVSEStatus.RCD=1;
|
||||
result->AC_EVSEStatus.EVSENotification=None_EVSENotificationType;
|
||||
result->AC_EVSEStatus.NotificationMaxDelay=123;
|
||||
result->ReceiptRequired=1;
|
||||
result->isused.ReceiptRequired=1;
|
||||
result->EVSEMaxCurrent.Multiplier = 2;
|
||||
result->EVSEMaxCurrent.Unit = A_unitSymbolType;
|
||||
|
||||
result->EVSEMaxCurrent.Value = 400;
|
||||
result->isused.EVSEMaxCurrent=1;
|
||||
result->SAScheduleTupleID=10;
|
||||
|
||||
result->isused.MeterInfo=1;
|
||||
result->MeterInfo.MeterID.arraylen.data=1;
|
||||
result->MeterInfo.MeterID.data[0]=2;
|
||||
|
||||
result->MeterInfo.MeterReading = 5000;
|
||||
result->MeterInfo.MeterStatus = 4321;
|
||||
result->MeterInfo.TMeter =123456789;
|
||||
result->MeterInfo.SigMeterReading.data[0]=123;
|
||||
result->MeterInfo.SigMeterReading.arraylen.data=1;
|
||||
result->MeterInfo.isused.MeterReading = 1;
|
||||
result->MeterInfo.isused.MeterStatus=1;
|
||||
result->MeterInfo.isused.TMeter=1;
|
||||
result->MeterInfo.isused.SigMeterReading=1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int meteringReceipt(struct MessageHeaderType* header, struct MeteringReceiptReqType* param, struct MeteringReceiptResType* result)
|
||||
{
|
||||
|
||||
printf("EVSE side: meteringReceipt called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
|
||||
printf("\t\t ID=%c%c%c\n", param->attr_Id.data[0],param->attr_Id.data[1],param->attr_Id.data[2]);
|
||||
printf("\t\t SAScheduleTupleID=%d\n", param->SAScheduleTupleID);
|
||||
printf("\t\t SessionID=%d\n", param->SessionID.data[1]);
|
||||
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);
|
||||
printf("\t\t MeterInfo.TMeter=%d\n", param->MeterInfo.TMeter);
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
|
||||
|
||||
result->AC_EVSEStatus->RCD=1;
|
||||
result->AC_EVSEStatus->EVSENotification=None_EVSENotificationType;
|
||||
result->AC_EVSEStatus->NotificationMaxDelay=123;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cableCheck(struct MessageHeaderType* header, struct CableCheckReqType* param, struct CableCheckResType* result)
|
||||
{
|
||||
printf("EVSE side: cableCheck called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
|
||||
|
||||
printf("\t\t EVStatus:\n");
|
||||
printf("\t\t\t EVReady=%d\n", param->DC_EVStatus.EVReady);
|
||||
printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVStatus.EVRESSSOC);
|
||||
printf("\t\t\t EVErrorCode=%d\n", param->DC_EVStatus.EVErrorCode);
|
||||
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->EVSEProcessing = Finished_EVSEProcessingType;
|
||||
result->DC_EVSEStatus.EVSEIsolationStatus= Valid_isolationLevelType;
|
||||
result->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
|
||||
result->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
|
||||
result->DC_EVSEStatus.EVSENotification=None_EVSENotificationType;
|
||||
result->DC_EVSEStatus.NotificationMaxDelay=1234;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int preCharge(struct MessageHeaderType* header, struct PreChargeReqType* param, struct PreChargeResType* result)
|
||||
{
|
||||
struct PhysicalValueType float_type;
|
||||
|
||||
|
||||
printf("EVSE side: preCharge called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
printf("\t\t EVStatus:\n");
|
||||
printf("\t\t\t EVReady=%d\n", param->DC_EVStatus.EVReady);
|
||||
printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVStatus.EVRESSSOC);
|
||||
printf("\t\t\t EVErrorCode=%d\n", param->DC_EVStatus.EVErrorCode);
|
||||
printf("\t\t EVTargetCurrent=%d (%d %d)\n", param->EVTargetCurrent.Value,param->EVTargetCurrent.Unit, param->EVTargetCurrent.Multiplier);
|
||||
printf("\t\t EVTargetVoltage=%d (%d %d)\n", param->EVTargetVoltage.Value, param->EVTargetVoltage.Unit, param->EVTargetVoltage.Multiplier);
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->DC_EVSEStatus.EVSEIsolationStatus= Valid_isolationLevelType;
|
||||
result->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
|
||||
result->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
|
||||
result->DC_EVSEStatus.EVSENotification=None_EVSENotificationType;
|
||||
result->DC_EVSEStatus.NotificationMaxDelay=1234;
|
||||
|
||||
float_type.Multiplier = 0;
|
||||
float_type.Unit = V_unitSymbolType;
|
||||
float_type.Value = 100;
|
||||
result->EVSEPresentVoltage = float_type;
|
||||
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
int currentDemand(struct MessageHeaderType* header, struct CurrentDemandReqType* param, struct CurrentDemandResType* result)
|
||||
{
|
||||
|
||||
struct PhysicalValueType f;
|
||||
|
||||
printf("EVSE side: currentDemand called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
printf("\t\t EVStatus:\n");
|
||||
printf("\t\t\t EVReady=%d\n", param->DC_EVStatus.EVReady);
|
||||
printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVStatus.EVRESSSOC);
|
||||
printf("\t\t\t EVErrorCode=%d\n", param->DC_EVStatus.EVErrorCode);
|
||||
|
||||
|
||||
printf("\t\t EVTargetCurrent=%d\n", param->EVTargetCurrent.Value);
|
||||
printf("\t\t EVMaximumVoltageLimit=%d\n", param->EVMaximumVoltageLimit.Value);
|
||||
printf("\t\t EVMaximumPowerLimit=%d\n", param->EVMaximumPowerLimit.Value);
|
||||
printf("\t\t EVMaximumCurrentLimit=%d\n", param->EVMaximumCurrentLimit.Value);
|
||||
printf("\t\t BulkChargingComplete=%d\n", param->BulkChargingComplete);
|
||||
printf("\t\t ChargingComplete=%d\n", param->ChargingComplete);
|
||||
printf("\t\t RemainingTimeToFullSoC=%d\n", param->RemainingTimeToFullSoC.Value);
|
||||
printf("\t\t RemainingTimeToBulkSoC=%d\n", param->RemainingTimeToBulkSoC.Value);
|
||||
|
||||
printf("\t\t EVTargetVoltage=%d\n", param->EVTargetVoltage.Value);
|
||||
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->DC_EVSEStatus.EVSEIsolationStatus= Valid_isolationLevelType;
|
||||
result->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
|
||||
result->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
|
||||
result->DC_EVSEStatus.EVSENotification=None_EVSENotificationType;
|
||||
result->DC_EVSEStatus.NotificationMaxDelay=1234;
|
||||
|
||||
f.Multiplier = 0;
|
||||
f.Unit = V_unitSymbolType;
|
||||
f.Value = 400;
|
||||
|
||||
result->EVSEPresentVoltage=f;
|
||||
|
||||
f.Unit = A_unitSymbolType;
|
||||
f.Value = 45;
|
||||
|
||||
result->EVSEPresentCurrent=f;
|
||||
|
||||
result->EVSECurrentLimitAchieved=0;
|
||||
|
||||
result->EVSEVoltageLimitAchieved=1;
|
||||
|
||||
result->EVSEPowerLimitAchieved=0;
|
||||
|
||||
f.Unit = V_unitSymbolType;
|
||||
f.Value = 400;
|
||||
|
||||
result->EVSEMaximumVoltageLimit=f;
|
||||
result->isused.EVSEMaximumVoltageLimit=1;
|
||||
|
||||
f.Unit = A_unitSymbolType;
|
||||
f.Value = 50;
|
||||
|
||||
result->EVSEMaximumCurrentLimit=f;
|
||||
result->isused.EVSEMaximumCurrentLimit=1;
|
||||
|
||||
f.Unit = W_unitSymbolType;
|
||||
f.Value = 20000;
|
||||
|
||||
result->EVSEMaximumPowerLimit=f;
|
||||
result->isused.EVSEMaximumPowerLimit=1;
|
||||
|
||||
result->EVSEID.data[0]=12;
|
||||
result->EVSEID.arraylen.data=1;
|
||||
|
||||
result->SAScheduleTupleID = 123;
|
||||
|
||||
|
||||
result->isused.MeterInfo=1;
|
||||
result->MeterInfo.MeterID.arraylen.data=1;
|
||||
result->MeterInfo.MeterID.data[0]=2;
|
||||
|
||||
result->MeterInfo.MeterReading = 500;
|
||||
result->MeterInfo.MeterStatus = 4321;
|
||||
result->MeterInfo.TMeter =123456789;
|
||||
result->MeterInfo.isused.MeterReading = 1;
|
||||
result->MeterInfo.isused.MeterStatus=1;
|
||||
result->MeterInfo.isused.TMeter=1;
|
||||
result->MeterInfo.isused.SigMeterReading=0;
|
||||
|
||||
result->ReceiptRequired = 1;
|
||||
result->isused.ReceiptRequired=1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int weldingDetection(struct MessageHeaderType* header, struct WeldingDetectionReqType* param, struct WeldingDetectionResType* result)
|
||||
{
|
||||
|
||||
printf("EVSE side: weldingDetection called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
printf("\t\t EVStatus:\n");
|
||||
printf("\t\t\t EVReady=%d\n", param->DC_EVStatus.EVReady);
|
||||
printf("\t\t\t EVRESSSOC=%d\n", param->DC_EVStatus.EVRESSSOC);
|
||||
printf("\t\t\t EVErrorCode=%d\n", param->DC_EVStatus.EVErrorCode);
|
||||
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
result->DC_EVSEStatus.EVSEIsolationStatus= Valid_isolationLevelType;
|
||||
result->DC_EVSEStatus.isused.EVSEIsolationStatus = 1;
|
||||
result->DC_EVSEStatus.EVSEStatusCode = EVSE_Ready_DC_EVSEStatusCodeType;
|
||||
result->DC_EVSEStatus.EVSENotification=None_EVSENotificationType;
|
||||
result->DC_EVSEStatus.NotificationMaxDelay=123;
|
||||
result->EVSEPresentVoltage.Value = 1234;
|
||||
result->EVSEPresentVoltage.Unit = V_unitSymbolType;
|
||||
result->EVSEPresentVoltage.Multiplier = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sessionStop(struct MessageHeaderType* header, struct SessionStopReqType* param, struct SessionStopResType* result)
|
||||
{
|
||||
|
||||
|
||||
printf("EVSE side: sessionStop called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
printf("\tHeader SessionID=");
|
||||
printBinaryArray(header->SessionID.data,header->SessionID.arraylen.data );
|
||||
printf("\t\t ChargingSession=%d\n", param->ChargingSession);
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int serviceDetail(struct MessageHeaderType* header, struct ServiceDetailReqType* param, struct ServiceDetailResType* result)
|
||||
{
|
||||
|
||||
printf("EVSE side: serviceDetail called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
printf("\tHeader SessionID=");
|
||||
printBinaryArray(header->SessionID.data,header->SessionID.arraylen.data );
|
||||
printf("\t\t ServiceDetailID=%d\n", param->ServiceID);
|
||||
|
||||
result->ServiceID = 1234;
|
||||
|
||||
/* Parameter Set 1*/
|
||||
result->ServiceParameterList.ParameterSet[0].ParameterSetID = 1;
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].attr_Name.data[0] = 'P';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].attr_Name.data[1] = 'r';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].attr_Name.data[2] = 'o';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].attr_Name.data[3] = 't';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].attr_Name.data[4] = 'o';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].attr_Name.data[5] = 'c';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].attr_Name.data[6] = 'o';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].attr_Name.data[7] = 'l';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].attr_Name.arraylen.data = 8;
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].intValue=15119;
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[0].isused.intValue=1;
|
||||
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].attr_Name.data[0] = 'N';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].attr_Name.data[1] = 'a';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].attr_Name.data[2] = 'm';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].attr_Name.data[3] = 'e';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].attr_Name.arraylen.data = 4;
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].stringValue.data[0] = 'V';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].stringValue.data[1] = '2';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].stringValue.data[2] = 'G';
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].stringValue.arraylen.data = 3;
|
||||
result->ServiceParameterList.ParameterSet[0].Parameter[1].isused.stringValue=1;
|
||||
result->ServiceParameterList.ParameterSet[0].arraylen.Parameter = 2;
|
||||
|
||||
/* Parameter Set 2 */
|
||||
result->ServiceParameterList.ParameterSet[1].ParameterSetID = 2;
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].attr_Name.data[0] = 'C';
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].attr_Name.data[1] = 'h';
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].attr_Name.data[2] = 'a';
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].attr_Name.data[3] = 'n';
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].attr_Name.data[4] = 'n';
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].attr_Name.data[5] = 'e';
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].attr_Name.data[6] = 'l';
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].attr_Name.arraylen.data = 7;
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].physicalValue.Value=1234;
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].physicalValue.Unit=m_unitSymbolType;
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].physicalValue.Multiplier=0;
|
||||
result->ServiceParameterList.ParameterSet[1].Parameter[0].isused.physicalValue=1;
|
||||
result->ServiceParameterList.ParameterSet[1].arraylen.Parameter =1;
|
||||
|
||||
result->ServiceParameterList.arraylen.ParameterSet = 2;
|
||||
result->isused.ServiceParameterList = 1;
|
||||
|
||||
result->ResponseCode = OK_responseCodeType;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int authorization(struct MessageHeaderType* header, struct AuthorizationReqType* param, struct AuthorizationResType* result)
|
||||
{
|
||||
|
||||
printf("EVSE: contractAuthentication called\n" );
|
||||
printf("\tReceived data:\n");
|
||||
|
||||
if(param->isused.GenChallenge)
|
||||
printf("\t\t\t GenChallenge=%d\n", param->GenChallenge.data[0]);
|
||||
|
||||
if(param->isused.attr_Id)
|
||||
printf("\t\t\t ID=%c%c%c\n", param->attr_Id.data[0],param->attr_Id.data[1],param->attr_Id.data[2]);
|
||||
|
||||
|
||||
|
||||
result->ResponseCode=OK_responseCodeType;
|
||||
result->EVSEProcessing=Finished_EVSEProcessingType;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int certificateUpdate(struct MessageHeaderType* header, struct CertificateUpdateReqType* param, struct CertificateUpdateResType* result)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int certificateInstallation(struct MessageHeaderType* header, struct CertificateInstallationReqType* param, struct CertificateInstallationResType* result)
|
||||
{
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void printBinaryArray(uint8_t* byte, uint32_t len) {
|
||||
unsigned int i;
|
||||
for(i=0; i<len; i++) {
|
||||
printf("%d ",byte[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue