9.9基线版本
This commit is contained in:
@@ -1 +1,3 @@
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
+814
@@ -0,0 +1,814 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.1898895178">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1898895178" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.1898895178" name="aarch64le-debug" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.1898895178.439655998" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.203259723" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.1556422156" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.1968879177" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1876022724" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.1127686504" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.693527478" name="Build Type:" superClass="com.qnx.qcc.option.buildtype"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1352316322" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder arguments="-s" command="make" id="cdt.managedbuild.target.gnu.builder.base.188590944" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.591289016" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.441788077" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.385459622" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.115407820" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1325284031" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.2085985240" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/AxisSort}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.340189104" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.2069067091" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.518642259" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/public"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.691157941">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.691157941" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.691157941" name="aarch64le-release" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.691157941.1401546998" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.1429422764" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.151761149" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.338787402" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1463811141" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.1011457115" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.1060491868" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="release" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1027291205" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.172580598" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.414331704" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.930754063" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.268084290" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.984303874" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1712037338" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.1880381899" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.1387983109" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.443276640" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1946208989" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/public"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.1923716135">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1923716135" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-coverage">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.1923716135" name="aarch64le-coverage" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.1923716135.232544716" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.860429857" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.2053077575" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.297249280" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1799269231" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.2024866919" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.441290721" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="coverage" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.167631540" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.448487023" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1573895293" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.1953871695" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.669934293" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1705241935" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1830913594" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.704535072" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.2037769893" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1197282124" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.2045259756" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/public"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.1088691470">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1088691470" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-profile">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.1088691470" name="aarch64le-profile" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.1088691470.1633521277" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.634956353" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.179660503" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.313606566" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1262746660" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.87427708" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.539075209" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="profile" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.600190288" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.894535644" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1842681380" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.1532817766" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.527375705" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1591490423" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.2018725012" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.1697962313" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.717422833" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1693276407" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1493055817" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/public"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.2034181414">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.2034181414" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-profile">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.2034181414" name="aarch64le-profile" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.2034181414.149612478" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.1865511620" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.1511839536" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.591436227" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.918663847" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.1470959014" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.796055386" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="profile" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1577154900" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.1659640273" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1294027329" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.309638494" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.758367742" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1736500952" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1947523253" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.1748323435" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.1487064582" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1936914041" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.268298854" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/public"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.1322416424">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1322416424" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.1322416424" name="aarch64le-debug" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.1322416424.1503765272" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.451494519" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.416140676" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.865783000" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1430643620" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.1342741898" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.1812926040" name="Build Type:" superClass="com.qnx.qcc.option.buildtype"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.385638230" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.1755628656" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.245390234" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.1034866566" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.764963368" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.224461901" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.942775645" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.903967461" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.1670335381" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.257258345" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.721284519" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/public"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.1771705254">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1771705254" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.1771705254" name="aarch64le-release" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.1771705254.704637607" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.928452873" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.805331307" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.210787420" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1738710733" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.1396873370" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.551224083" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="release" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.478444913" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.2145709880" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1882728420" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.1958543971" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.333344947" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.2009341474" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.365537856" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.1645365308" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.838515999" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1752225216" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1980607405" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/public"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.508473458">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.508473458" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.508473458" name="aarch64le-debug" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.508473458.2105641964" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.227360216" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.871471082" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.15784798" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.336109977" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.588147567" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.1574941818" name="Build Type:" superClass="com.qnx.qcc.option.buildtype"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1216394719" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.1679627742" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="6" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1984157175" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.112007619" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.163710002" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.520844188" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.20391325" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.680021704" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.314103150" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1000589579" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.2090876633" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.11197553">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.11197553" moduleId="org.eclipse.cdt.core.settings" name="x86_64-coverage">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.11197553" name="x86_64-coverage" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.11197553.768042893" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.1677690501" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.1763665618" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.2030972224" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.x86_64" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.695756230" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.2085490978" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.1211222878" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="coverage" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.690624196" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.1898960536" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1573811045" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.989567208" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.460439821" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.82522484" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1631748443" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.740286393" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.700007729" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.736010980" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.479249048" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.312133252">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.312133252" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-profile">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.312133252" name="aarch64le-profile" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.312133252.1830811651" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.566934566" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.390003139" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.1055315239" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1893807591" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.330319677" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.459217554" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="profile" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.706344691" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.930033839" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1351783745" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.948397116" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.1640423838" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1521366613" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1374658122" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.1741170874" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.811505509" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.173000416" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1674246736" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/public"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.851831643">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.851831643" moduleId="org.eclipse.cdt.core.settings" name="x86-coverage">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.851831643" name="x86-coverage" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.851831643.838215177" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.666018849" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.652692550" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.1461458931" name="Target CPU:" superClass="com.qnx.qcc.option.cpu"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1997653790" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.570424276" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.11290833" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="coverage" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.470526191" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.1110761941" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.530989487" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.1234027203" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.299411087" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1359968577" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.84630033" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.1948912253" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.1440514454" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.116406286" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.474461871" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.1697766463">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1697766463" moduleId="org.eclipse.cdt.core.settings" name="armv7le-coverage">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.1697766463" name="armv7le-coverage" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.1697766463.1693159231" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.917976049" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.106687656" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.1885103417" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1313986256" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.1669172336" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.2088343680" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="coverage" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.449222909" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.1086123974" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.186026688" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.2090109694" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.85399836" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.562774782" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1438453230" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.378109278" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.1130936801" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.759414821" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1263698493" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.647166456">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.647166456" moduleId="org.eclipse.cdt.core.settings" name="armv7le-profile">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.647166456" name="armv7le-profile" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.647166456.1508820537" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.1979487242" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.970887142" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.239664321" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1751274850" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.1269442265" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.1431865529" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="profile" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.799655379" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.2029839409" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1975279854" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.1510714308" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.897962192" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.576900047" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.661845605" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.251749173" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.1008332808" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.17926043" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1954231787" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.844978504">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.844978504" moduleId="org.eclipse.cdt.core.settings" name="armv7le-release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.844978504" name="armv7le-release" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.844978504.731469155" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.669877348" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.1918128345" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.194470149" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1545492074" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.1562920328" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.1037042803" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="release" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1040005206" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.1798779527" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.583776540" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.704432493" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.884747388" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.265358615" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1039080703" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.1634333473" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.2124019965" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1475234954" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1459622746" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.1751632028">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.1751632028" moduleId="org.eclipse.cdt.core.settings" name="aarch64le-coverage">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<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.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.1751632028" name="aarch64le-coverage" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.1751632028.139167443" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.1922911304" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.1932184065" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.145657146" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.aarch64le" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.1234409396" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.1033770099" name="C++ Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<option id="com.qnx.qcc.option.buildtype.831900883" name="Build Type:" superClass="com.qnx.qcc.option.buildtype" value="coverage" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.301470980" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder id="cdt.managedbuild.target.gnu.builder.base.870136306" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1357395530" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.107758436" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" useByScannerDiscovery="false" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.1494855812" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.2085763103" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1269222028" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.513613045" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/TSCP/src/APP/ciapp/Train}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.207312122" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.600660352" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.503067367" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="/public"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="TSCP.null.349235574" name="TSCP"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="aarch64le-debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="x86_64-debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="armv7le-coverage">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="armv7le-debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="x86-coverage">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="x86-profile">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="armv7le-profile">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="x86_64-coverage">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="aarch64le-profile">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="aarch64le-coverage">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="x86_64-release">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="armv7le-release">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="x86-release">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="aarch64le-release">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="x86_64-profile">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
<configuration configurationName="x86-debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/TSCP"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.2111653378">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.444211187">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1923716135">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.691157941">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.705038085">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.11197553">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.444971310">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.962019019">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.867349151">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.312133252">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1100278840">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.2034181414">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1697766463">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.314237686">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1771705254">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1273206681">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1322416424">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.844978504">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1898895178">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.508473458">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.24582968">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1194012629">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.647166456">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1701031470">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1088691470">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.851831643">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.330376829">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.toolChain.1751632028">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>TIOC</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+3
-26
@@ -244,7 +244,7 @@ void APP_API_Data_Init()
|
||||
cDevType = (UINT8)((locTypeId >> 8U) & 0x00FFU); /*RC/CI类型*/
|
||||
|
||||
|
||||
cRetVal = CiPatternInit((const)DataPath); /*初始化当前联锁类型配置数据*/
|
||||
cRetVal = RciCommonConfigDataInit((const)DataPath); /*初始化当前联锁类型配置数据*/
|
||||
if ((CI_SUCCESS == cRetVal) && (CI_SUCCESS == funcRetVal)) /*初始化当前联锁类型配置数据*/
|
||||
{
|
||||
cSystemWorkType = GetSystemWorkType();
|
||||
@@ -717,46 +717,23 @@ ENUM_CM_RECCUSEB Is_Send_ExtendBoard(IN const CM_UINT16 dstDevTypeId)
|
||||
{
|
||||
ENUM_CM_RECCUSEB retVal = ENUM_CM_CC; /*返回值*/
|
||||
CM_UINT8 devType = 0U; /*设备类型*/
|
||||
CM_UINT8 devId = 0U; /*设备ID*/
|
||||
CM_UINT16 wAtsGtWayDevTypeId = 0U;
|
||||
UINT8 chLocalCiType = 0U; /*本联锁属性*/
|
||||
UINT8 chDstCiType = 0U; /*本联锁属性*/
|
||||
UINT8 chCldScxCommMode = 0U;
|
||||
UINT8 chWorkType = 0U; /*双系工作模式*/
|
||||
UINT8 cControlState = 0U;/*主备用模式*/
|
||||
UINT8 cRcWorkMode = 0u;/*RC工作模式*/
|
||||
UINT8 chResult = CI_ERROR; /*联锁属性检查结果*/
|
||||
UINT8 serialGroup = 0U; /*串口通信组索引*/
|
||||
|
||||
wAtsGtWayDevTypeId = GetTiocTrnsmtGtwyDevTypeId();
|
||||
/**使用通控板与ATS网关通信*/
|
||||
if (dstDevTypeId != wAtsGtWayDevTypeId)
|
||||
{
|
||||
devType = (CM_UINT8)((dstDevTypeId >> 8) & 0xFF);
|
||||
devId = (CM_UINT8)(dstDevTypeId & 0xFF);
|
||||
|
||||
chLocalCiType = GetLocalCiType();
|
||||
chDstCiType = GetCiType(devId);
|
||||
chCldScxCommMode = GetCiFunctionSwitchConfig(SCX_CLD_INTERFACE_TYPE);
|
||||
chWorkType = GetSystemWorkType();
|
||||
cControlState = GetLocalCiBackUpPattern();
|
||||
cRcWorkMode = GetLocalRcWorkMode();
|
||||
|
||||
if ((SCX_CLD_SERIAL_PORT_COMM == chCldScxCommMode) && (CI_SYSTEM_TYPE_RCI == devType))
|
||||
{
|
||||
if (((CI_TYPE_CLD == chLocalCiType) && (CI_TYPE_SCX == chDstCiType)) || ((CI_TYPE_SCX == chLocalCiType) && (CI_TYPE_CLD == chDstCiType)))
|
||||
{
|
||||
/*串口通信要求双方一个为车辆段一个为试车线*/
|
||||
chResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*CI类型错误,返回失败*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*不为串口通信,此时不对本地CI类型及对方CI类型进行判断*/
|
||||
}
|
||||
chResult = IsSerialDevice(dstDevTypeId, &serialGroup);
|
||||
|
||||
if ((CI_SYSTEM_TYPE_XIANDI == devType) || (CI_SYSTEM_TYPE_ATS == devType)
|
||||
|| (CI_SUCCESS == chResult)
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
#define VER_INTE_PROJECT 220 /*项目编号*/
|
||||
#define VER_INTE_PRODUCT 40 /*产品编号*/
|
||||
#define VER_INTE_EXE 1 /*可执行编号*/
|
||||
#define VER_INTE_TIME 116 /*集成次数编号*/
|
||||
#define VER_INTE_TIME 131 /*集成次数编号*/
|
||||
|
||||
#endif/*endif of #define _CI_INTEGRATE_CONFIG_H*/
|
||||
@@ -1629,11 +1629,31 @@ UINT32 GetCiAppData(UINT8 *pCiAppDataPointer)
|
||||
pCiAppDataPointer[curIndex] = gCbtcCrossStructZc[ii].wTrainId;
|
||||
curIndex += 1u;
|
||||
}
|
||||
|
||||
/*ATS/�ֵ�/����һ�����ȷ����Ϣͬ��*/
|
||||
/*������������*/
|
||||
(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&gDansuoCancleMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
|
||||
(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(&gDansuoCancleReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
|
||||
/*�����������*/
|
||||
(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&gSwitchUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
|
||||
(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(&gSwitchUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
|
||||
/*��������*/
|
||||
(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&gSecUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
|
||||
(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(&gSecUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
|
||||
/*�źŻ��������*/
|
||||
(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&gSignalUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
|
||||
(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(&gSignalUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
|
||||
/*����һ��CRC*/
|
||||
crcLength = curIndex - crcIndex;
|
||||
crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
|
||||
debug_infor_printf((const)"2oo2 RecvCiCmdDataStruCurSum-gDyTestNum CRC:%x, Length:%d\n", crcResult, crcLength);
|
||||
debug_infor_printf((const)"2oo2 RecvCiCmdDataStruCurSum-FollowUpCmd CRC:%x, Length:%d\n", crcResult, crcLength);
|
||||
}
|
||||
return curIndex;
|
||||
}
|
||||
@@ -2477,7 +2497,27 @@ UINT8 SetCiAppData(const UINT8 *pCiAppDataPointer,const UINT32 len)
|
||||
gCbtcCrossStructZc[ii].wTrainId = pCiAppDataPointer[curIndex];
|
||||
curIndex += 1u;
|
||||
}
|
||||
|
||||
/*ͬ��һ���������*/
|
||||
/*��������*/
|
||||
(void)CommonMemCpy((void *)(&gDansuoCancleMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
|
||||
(void)CommonMemCpy((void *)(&gDansuoCancleReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
|
||||
/*�������*/
|
||||
(void)CommonMemCpy((void *)(&gSwitchUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
|
||||
(void)CommonMemCpy((void *)(&gSwitchUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
|
||||
/*����*/
|
||||
(void)CommonMemCpy((void *)(&gSecUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
|
||||
(void)CommonMemCpy((void *)(&gSecUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
|
||||
/*�źŻ����*/
|
||||
(void)CommonMemCpy((void *)(&gSignalUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
|
||||
(void)CommonMemCpy((void *)(&gSignalUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru));
|
||||
curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
|
||||
rtn = 1U;
|
||||
}
|
||||
}
|
||||
@@ -3800,11 +3840,11 @@ UINT32 CopyValidGetLogicSecDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum,Lo
|
||||
curIndex++;
|
||||
for (j = 0U; j < pstLogSecDataStruCC[i].chLogSecLockBelLogRouteSum; j++)
|
||||
{
|
||||
ShortToChar(pstLogSecDataStruCC[i].szLogSecLockBelLogRouteData->wLogSecLockBelLogRouteId, (pCurCiAppDataPointer + curIndex));
|
||||
ShortToChar(pstLogSecDataStruCC[i].szLogSecLockBelLogRouteData[j].wLogSecLockBelLogRouteId, (pCurCiAppDataPointer + curIndex));
|
||||
curIndex += 2U;
|
||||
*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szLogSecLockBelLogRouteData->chLogSecLockBelLogRouteState;
|
||||
*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szLogSecLockBelLogRouteData[j].chLogSecLockBelLogRouteState;
|
||||
curIndex++;
|
||||
*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szLogSecLockBelLogRouteData->wLogSecLockBelLogRouteDir;
|
||||
*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szLogSecLockBelLogRouteData[j].wLogSecLockBelLogRouteDir;
|
||||
curIndex++;
|
||||
}
|
||||
*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].LogSecLogLockState;
|
||||
@@ -4701,7 +4741,7 @@ UINT32 CopyValidSetOcOrginData(UINT8* pCurCiAppDataPointer, UINT16 struNum, OcTo
|
||||
{
|
||||
m_OcToCiOrginDataNum = (UINT8)ValidIdNum;
|
||||
/*����*/
|
||||
//printf("m_OcToCiOrginDataNum = %d\n", m_OcToCiOrginDataNum);
|
||||
debug_infor_printf((char*)"m_OcToCiOrginDataNum = %d\n", m_OcToCiOrginDataNum);
|
||||
(void)CommonMemSet(OcRecvData, (UINT32)((OC_SUM_MAX)* sizeof(OcToCiOriginDataStruct)), 0U, (UINT32)((OC_SUM_MAX)* sizeof(OcToCiOriginDataStruct))); /*����սṹ���ֹ������*/
|
||||
for (i = 0U; i < ValidIdNum; i++)
|
||||
{
|
||||
@@ -4884,7 +4924,6 @@ UINT32 CopyValidSetOcOrginData(UINT8* pCurCiAppDataPointer, UINT16 struNum, OcTo
|
||||
UINT32 CopyValidGetOcOrginData(UINT8* pCurCiAppDataPointer, UINT16 struNum, OcToCiOriginDataStruct OcRecvData[])
|
||||
{
|
||||
UINT32 curIndex = 0U;
|
||||
UINT16 ValidIdNum = 0U;
|
||||
UINT16 i = 0U;
|
||||
UINT16 k = 0U;
|
||||
UINT8 j = 0U;
|
||||
@@ -4905,8 +4944,7 @@ UINT32 CopyValidGetOcOrginData(UINT8* pCurCiAppDataPointer, UINT16 struNum, OcTo
|
||||
ShortToChar(m_OcToCiOrginDataNum, pCurCiAppDataPointer);
|
||||
curIndex += (UINT32)sizeof(UINT16); /*�������ֽ��豸����*/
|
||||
//printf("m_OcToCiOrginDataNum = %d\n", m_OcToCiOrginDataNum);
|
||||
if (struNum > ValidIdNum)
|
||||
{
|
||||
|
||||
for (i = 0U; i < m_OcToCiOrginDataNum; i++)
|
||||
{
|
||||
ShortToChar(OcRecvData[i].OcId, (pCurCiAppDataPointer + curIndex));
|
||||
@@ -5056,7 +5094,7 @@ UINT32 CopyValidGetOcOrginData(UINT8* pCurCiAppDataPointer, UINT16 struNum, OcTo
|
||||
LongToChar(OcRecvData[i].ComStartCycle, (pCurCiAppDataPointer + curIndex));
|
||||
curIndex += 4U;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "../Route/LogicalRouteDataManage.h"
|
||||
#include "../Route/LongRouteDataManage.h"
|
||||
#include "../ReverseCut/ReverseCutDataManage.h"
|
||||
#include "../AxisSort/AxisSort.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -394,7 +394,7 @@ static UINT8 aam_AxisErrorJudge(UINT16 acID,UINT16 acIndex)
|
||||
; /*继续处理*/
|
||||
}
|
||||
/** 判断相邻范围内计轴坏车最近占用时间检查通过 */
|
||||
if ((CI_ERROR == chNearbyCheck))
|
||||
if (CI_ERROR == chNearbyCheck)
|
||||
{
|
||||
/*有 坏车接近 或左右相邻计轴均无车接近 立即清除冗余计时*/
|
||||
if ((AAM_BAD_NEAR == sameTrainType) || (AAM_BAD_NEAR == convertTrainType))
|
||||
@@ -423,7 +423,6 @@ static UINT8 aam_AxisErrorJudge(UINT16 acID,UINT16 acIndex)
|
||||
/** 冗余计时位加1*/
|
||||
aam_AddRedunTime(acIndex, maxRedunTimes);
|
||||
}
|
||||
|
||||
/** 计轴故障的判断 */
|
||||
tmpRedunTime = aam_GetRedunTime(acIndex);
|
||||
tmppassTrainType = aam_GetPassTrainFlag(acIndex);
|
||||
@@ -2111,7 +2110,7 @@ UINT8 aam_ArbContinuousOccCheck(UINT16 wAcId, UINT8 cNearAcNum, UINT16 pNearAcId
|
||||
UINT8 cRetVal = CI_ERROR;
|
||||
UINT16 wBufIndex = 0U;
|
||||
UINT16 wCurRelPhySecId = 0U; /*本计轴区段所属物理区段ID*/
|
||||
UINT8 dwCiAndAxleTransBadEnsureCnt = 0U; /*判断与计轴通信中断周期数*/
|
||||
UINT32 dwCiAndAxleTransBadEnsureCnt = 0U; /*判断与计轴通信中断周期数*/
|
||||
UINT32 dwCurAxleOccStartCycNum = 0U; /*本计轴区段占用起始周期*/
|
||||
UINT8 ii = 0U;
|
||||
UINT16 wNearRelPhySecId = 0U; /*相邻计轴区段所属物理区段ID*/
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
static UINT16 g_pSortLinkNum; /* 本控区的Link数量 */
|
||||
static UINT16 g_pSortLinkIndex[AS_LINK_MAX + 1U]; /* 本控区的Link索引 */
|
||||
|
||||
static AS_SORT_INFO_s g_pSortLinkInfo[AS_LINK_MAX + 1U]; /*link排序*/
|
||||
AS_SORT_INFO_s g_pSortLinkInfo[AS_LINK_MAX + 1U]; /*link排序*/
|
||||
|
||||
/* 通信车序列,在SortCT阶段完成CT车排序 */
|
||||
static UINT16 s_pCTSortIndex[SIZE_MAX_LINE_TRAIN_NUM]; /*本信息不周期清空*/
|
||||
@@ -2188,12 +2188,34 @@ UINT32 as_GetTransferData(OUT UINT8 * pDataBuff, IN UINT32 curIndex)
|
||||
{
|
||||
UINT32 ret = curIndex;
|
||||
UINT32 copyIndex = curIndex;
|
||||
UINT16 wLinkNum = 0U;
|
||||
UINT16 u16Index = 0U;
|
||||
UINT16 wTmpLinkId = 0U;
|
||||
UINT8 chLocalId = GetSystemParaLocalCiId();
|
||||
UINT8 chLinkCIId = 0U;/*link所属联锁*/
|
||||
UINT32 dwLinkNumIndex =0U;/*数量位置 */
|
||||
if (NULL != pDataBuff)
|
||||
{
|
||||
(void)CommonMemCpy(&pDataBuff[copyIndex], (UINT32)(sizeof(UINT16) * SIZE_MAX_LINE_TRAIN_NUM), s_pCTSortIndex, (UINT32)(sizeof(UINT16) * SIZE_MAX_LINE_TRAIN_NUM));
|
||||
copyIndex += (UINT32)(sizeof(UINT16) * SIZE_MAX_LINE_TRAIN_NUM);
|
||||
(void)CommonMemCpy(&pDataBuff[copyIndex], (UINT32)(sizeof(CT_SORT_INFO_s) * SIZE_MAX_COM_VOBC_NUM + 1u), s_pCTSortInfo, (UINT32)(sizeof(CT_SORT_INFO_s) * SIZE_MAX_COM_VOBC_NUM + 1u));
|
||||
copyIndex += (UINT32)(sizeof(CT_SORT_INFO_s) * SIZE_MAX_COM_VOBC_NUM + 1u);
|
||||
(void)CommonMemCpy(&pDataBuff[copyIndex], (UINT32)(sizeof(CT_SORT_INFO_s) * (SIZE_MAX_COM_VOBC_NUM + 1U)), s_pCTSortInfo, (UINT32)(sizeof(CT_SORT_INFO_s) * (SIZE_MAX_COM_VOBC_NUM + 1U)));
|
||||
copyIndex += (UINT32)(sizeof(CT_SORT_INFO_s) * (SIZE_MAX_COM_VOBC_NUM + 1U));
|
||||
/*拷贝link列车排序*/
|
||||
dwLinkNumIndex = copyIndex;
|
||||
copyIndex += 2U;
|
||||
for (u16Index = 1U; u16Index <= g_pSortLinkNum; u16Index++)
|
||||
{
|
||||
wTmpLinkId = g_pSortLinkInfo[u16Index].u16ID;
|
||||
chLinkCIId = (UINT8)GetLinkManageTiocById(wTmpLinkId);
|
||||
if ((0U != chLocalId) && (chLinkCIId == chLocalId))
|
||||
{
|
||||
/*仅拷贝本联锁*/
|
||||
(void)CommonMemCpy(&pDataBuff[copyIndex],(UINT32)(sizeof(AS_SORT_INFO_s)), &g_pSortLinkInfo[u16Index], (UINT32)(sizeof(AS_SORT_INFO_s)));
|
||||
copyIndex += (UINT32)(sizeof(AS_SORT_INFO_s));
|
||||
wLinkNum++;
|
||||
}
|
||||
}
|
||||
ShortToChar(wLinkNum, &pDataBuff[dwLinkNumIndex]); /* 写入有车占用的计轴区段数量 */
|
||||
ret = copyIndex;
|
||||
}
|
||||
else
|
||||
@@ -2215,12 +2237,29 @@ UINT32 as_SetTransferData(IN UINT8 * pDataBuff, IN UINT32 curIndex)
|
||||
{
|
||||
UINT32 ret = curIndex;
|
||||
UINT32 copyIndex = curIndex;
|
||||
UINT16 wLinkNum = 0U;
|
||||
UINT16 jj = 0U;
|
||||
UINT16 wTmpLinkId =0U;
|
||||
UINT16 wLinkIndex = 0U;
|
||||
if (NULL != pDataBuff)
|
||||
{
|
||||
(void)CommonMemCpy(s_pCTSortIndex, (UINT32)(sizeof(UINT16) * SIZE_MAX_LINE_TRAIN_NUM), &pDataBuff[copyIndex], (UINT32)(sizeof(UINT16) * SIZE_MAX_LINE_TRAIN_NUM));
|
||||
copyIndex += (UINT32)(sizeof(UINT16) * SIZE_MAX_LINE_TRAIN_NUM);
|
||||
(void)CommonMemCpy(s_pCTSortInfo, (UINT32)(sizeof(CT_SORT_INFO_s) * SIZE_MAX_COM_VOBC_NUM + 1u), &pDataBuff[copyIndex], (UINT32)(sizeof(CT_SORT_INFO_s) * SIZE_MAX_COM_VOBC_NUM + 1u));
|
||||
copyIndex += (UINT32)(sizeof(CT_SORT_INFO_s) * SIZE_MAX_COM_VOBC_NUM + 1u);
|
||||
(void)CommonMemCpy(s_pCTSortInfo, (UINT32)(sizeof(CT_SORT_INFO_s) * (SIZE_MAX_COM_VOBC_NUM + 1U)), &pDataBuff[copyIndex], (UINT32)(sizeof(CT_SORT_INFO_s) * (SIZE_MAX_COM_VOBC_NUM + 1U)));
|
||||
copyIndex += (UINT32)(sizeof(CT_SORT_INFO_s) * (SIZE_MAX_COM_VOBC_NUM + 1U));
|
||||
/*拷贝列车排序*/
|
||||
wLinkNum = ShortFromChar(&pDataBuff[copyIndex]);
|
||||
copyIndex += 2u;
|
||||
for (jj = 0U; jj < wLinkNum; jj++)
|
||||
{
|
||||
wTmpLinkId = ShortFromCharLE(&pDataBuff[copyIndex]);
|
||||
wLinkIndex = g_pSortLinkIndex[wTmpLinkId];
|
||||
if ((DEFAULT_ZERO < wLinkIndex) && (wLinkIndex < AS_LINK_MAX+1U))
|
||||
{
|
||||
(void)CommonMemCpy(&g_pSortLinkInfo[wLinkIndex], (UINT32)(sizeof(AS_SORT_INFO_s)), &pDataBuff[copyIndex], (UINT32)(sizeof(AS_SORT_INFO_s)));
|
||||
copyIndex += (UINT32)(sizeof(AS_SORT_INFO_s));
|
||||
}
|
||||
}
|
||||
ret = copyIndex;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -48,5 +48,5 @@ typedef struct
|
||||
UINT16 TrainEnveLopeID[ENVELOPE_SUM_MAX]; /*所有包络ID信息*/
|
||||
}s_TRAIN_ENVELOPE_ID;
|
||||
|
||||
|
||||
extern AS_SORT_INFO_s g_pSortLinkInfo[AS_LINK_MAX + 1U]; /*link排序*/
|
||||
#endif /* INC_AXIS_SORT_INC */
|
||||
@@ -105,37 +105,34 @@ SAME_LINE_ERR,
|
||||
*/
|
||||
UINT8 IsSameLineCI(const UINT8 ciA, const UINT8 ciB)
|
||||
{
|
||||
UINT32 etcsIdA, etcsIdB;
|
||||
UINT16 u16CiA, u16CiB;
|
||||
UINT32 etcsIdA = 0U;
|
||||
UINT32 etcsIdB = 0U;
|
||||
UINT16 u16CiA = 0U;
|
||||
UINT16 u16CiB = 0U;
|
||||
UINT8 retVal = SAME_LINE_ERR;
|
||||
UINT8 cbtcSysType = DQU_CBTC_FAO;
|
||||
UINT8 dquDevNameA = CI_ERROR;
|
||||
UINT8 dquDevNameB = CI_ERROR;
|
||||
UINT8 chCiAFactoryType = 0U;
|
||||
UINT8 chCiBFactoryType = 0U;
|
||||
|
||||
u16CiA = (UINT16)((CI_SYSTEM_TYPE_RCI * 256u) + ciA);
|
||||
u16CiB = (UINT16)((CI_SYSTEM_TYPE_RCI * 256u) + ciB);
|
||||
u16CiA = (UINT16)((CI_SYSTEM_TYPE_RCI * 256U) + ciA);
|
||||
u16CiB = (UINT16)((CI_SYSTEM_TYPE_RCI * 256U) + ciB);
|
||||
|
||||
cbtcSysType = GetCbtcSysType();
|
||||
dquDevNameA = dquDevName2HlhtId(u16CiA,0U,&etcsIdA);
|
||||
dquDevNameB = dquDevName2HlhtId(u16CiB,0U,&etcsIdB);
|
||||
|
||||
dquDevNameA = dquDevName2HlhtId(u16CiA,0u,&etcsIdA);
|
||||
|
||||
dquDevNameB = dquDevName2HlhtId(u16CiB,0u,&etcsIdB);
|
||||
|
||||
if(DQU_CBTC_CPK == cbtcSysType)
|
||||
{
|
||||
retVal = SAME_LINE_YES;
|
||||
}
|
||||
else if(DQU_CBTC_FAO == cbtcSysType)
|
||||
{
|
||||
retVal = SAME_LINE_YES;
|
||||
}
|
||||
else if(DQU_CBTC_HLT == cbtcSysType)
|
||||
{
|
||||
/*需要增加互联互通的判断*/
|
||||
if ((CI_SUCCESS == dquDevNameA) && (CI_SUCCESS == dquDevNameB))
|
||||
{
|
||||
/*根据互联互通ETCS编号的定义,从低到高第三个字节为线路编号*/
|
||||
if ((etcsIdA&((UINT32)0x00ff0000)) == (etcsIdB & ((UINT32)0x00ff0000)))
|
||||
if ((etcsIdA & ((UINT32)0x00ff0000)) == (etcsIdB & ((UINT32)0x00ff0000)))
|
||||
{
|
||||
retVal = SAME_LINE_YES;
|
||||
|
||||
/*同一条线路,一期二期使用不同厂家联锁,也判为不同线路,接口走互联互通*/
|
||||
chCiAFactoryType = GetCiFactoryType(ciA);
|
||||
chCiBFactoryType = GetCiFactoryType(ciB);
|
||||
if (chCiAFactoryType == chCiBFactoryType)
|
||||
{
|
||||
retVal = SAME_LINE_YES;
|
||||
}
|
||||
@@ -146,17 +143,14 @@ UINT8 IsSameLineCI(const UINT8 ciA, const UINT8 ciB)
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = SAME_LINE_ERR;
|
||||
retVal = SAME_LINE_NO;
|
||||
}
|
||||
}/* zt 删除单轨相关代码 2022-02-15 */
|
||||
else if (DQU_CBTC_CC == cbtcSysType)
|
||||
{
|
||||
retVal = SAME_LINE_YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = SAME_LINE_ERR;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -4997,15 +4997,15 @@ void SetPhySecSpksFLockBySpksId(UINT16 spksId,UINT8 spksStatus)
|
||||
*/
|
||||
UINT8 GetOtherCiDevStatus(UINT16 const devType,UINT16 const devId,UINT16 const chkDevStatus)
|
||||
{
|
||||
UINT8 devState = 0u;
|
||||
UINT8 tmpDevState = 0u;
|
||||
UINT8 tmpPsdVobcCmd = 0u;
|
||||
UINT8 tmpColor = 0u;
|
||||
UINT8 ttmpDevState = 0u;
|
||||
UINT8 psdMutualLockState = 0u;
|
||||
UINT16 tempdevId = 0u; /*临时设备ID*/
|
||||
UINT8 tempdevState = 0u; /*临时设备状态*/
|
||||
|
||||
UINT8 devState = 0U;
|
||||
UINT8 tmpDevState = 0U;
|
||||
UINT8 tmpPsdVobcCmd = 0U;
|
||||
UINT8 tmpColor = 0U;
|
||||
UINT8 ttmpDevState = 0U;
|
||||
UINT8 psdMutualLockState = 0U;
|
||||
UINT16 tempdevId = 0U; /*临时设备ID*/
|
||||
UINT8 tempdevState = 0U; /*临时设备状态*/
|
||||
UINT8 chPsdExceptState = 0U;
|
||||
switch(devType)
|
||||
{
|
||||
case CI_DEVICE_TYPE_SWITCH: /*道岔*/
|
||||
@@ -5020,12 +5020,12 @@ UINT8 GetOtherCiDevStatus(UINT16 const devType,UINT16 const devId,UINT16 const c
|
||||
}
|
||||
else
|
||||
{
|
||||
devState = 0u;
|
||||
devState = 0U;
|
||||
}
|
||||
break;
|
||||
case CI_DEVICE_TYPE_SIGNAL: /*信号机*/
|
||||
tmpColor = GetSignalCurColor(devId);
|
||||
if (tmpColor > 0u)
|
||||
if (0U < tmpColor)
|
||||
{
|
||||
tmpDevState = GetSignalOpenCloseState(tmpColor);
|
||||
if (SIGNAL_OPEN == tmpDevState)
|
||||
@@ -5039,7 +5039,7 @@ UINT8 GetOtherCiDevStatus(UINT16 const devType,UINT16 const devId,UINT16 const c
|
||||
}
|
||||
else
|
||||
{
|
||||
devState = 0u;
|
||||
devState = 0U;
|
||||
}
|
||||
break;
|
||||
case CI_DEVICE_TYPE_ROUTE: /*进路*/
|
||||
@@ -5073,13 +5073,21 @@ UINT8 GetOtherCiDevStatus(UINT16 const devType,UINT16 const devId,UINT16 const c
|
||||
}
|
||||
else
|
||||
{
|
||||
devState = 0u;
|
||||
devState = 0U;
|
||||
}
|
||||
break;
|
||||
case CI_DEVICE_TYPE_PSD: /*站台屏蔽门*/
|
||||
tmpDevState = GetPsdState(devId);
|
||||
tmpPsdVobcCmd = GetPsdVobcCmd(devId);
|
||||
psdMutualLockState = GetPsdMutualLockRemoveState(devId);
|
||||
chPsdExceptState = GePsdExceptState(devId);
|
||||
|
||||
if (PSD_EXCEPT_NO != chPsdExceptState)
|
||||
{
|
||||
devState = OTHER_CI_PSD_STATUS_OPEN; /* 屏蔽门异常状态,则认为打开 */
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((PSD_MUTUALLOCK_REMOVE_YES == psdMutualLockState) || (PSD_ATS_MUTUALLOCK_REMOVE_YES == psdMutualLockState)
|
||||
|| (PSD_ATS_AND_JD_MUTUALLOCK_REMOVE_YES == psdMutualLockState))
|
||||
{
|
||||
@@ -5088,7 +5096,7 @@ UINT8 GetOtherCiDevStatus(UINT16 const devType,UINT16 const devId,UINT16 const c
|
||||
}
|
||||
else if (PSD_STATE_OPEN == tmpDevState)
|
||||
{
|
||||
if (tmpPsdVobcCmd == VOBCTOCI_COMMAND_TYPE_PSDOPEN)
|
||||
if (VOBCTOCI_COMMAND_TYPE_PSDOPEN == tmpPsdVobcCmd)
|
||||
{
|
||||
/* 收到VOBCToCI打开屏蔽门命令,则直接认为屏蔽门占用打开 */
|
||||
devState = OTHER_CI_PSD_STATUS_OCCUPY_OPEN;
|
||||
@@ -5106,8 +5114,10 @@ UINT8 GetOtherCiDevStatus(UINT16 const devType,UINT16 const devId,UINT16 const c
|
||||
}
|
||||
else
|
||||
{
|
||||
devState = 0u;
|
||||
devState = 0U;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case CI_DEVICE_TYPE_PSD_EXCEPT_OPEN: /*站台屏蔽门(异常)*/
|
||||
devState = GePsdExceptState(devId);
|
||||
@@ -5125,7 +5135,7 @@ UINT8 GetOtherCiDevStatus(UINT16 const devType,UINT16 const devId,UINT16 const c
|
||||
}
|
||||
else
|
||||
{
|
||||
devState = 0u;
|
||||
devState = 0U;
|
||||
}
|
||||
break;
|
||||
case CI_DEVICE_TYPE_WASHMACHINE: /* 洗车机 */
|
||||
@@ -5148,7 +5158,7 @@ UINT8 GetOtherCiDevStatus(UINT16 const devType,UINT16 const devId,UINT16 const c
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ttmpDevState == SPKS_CUT_NO)
|
||||
if (SPKS_CUT_NO == ttmpDevState)
|
||||
{
|
||||
devState = OTHER_CI_SPKS_YES;
|
||||
}
|
||||
@@ -6200,6 +6210,7 @@ UINT8 CheckLogJumpLockApply(UINT16 logSectionId)
|
||||
UINT8 logSecLockState = 0U;
|
||||
UINT8 logSecLockRouteNum = 0U;
|
||||
UINT8 chFailStep = 0U;
|
||||
UINT8 cYLockAlarmFlag = FLAG_UNSET; /*引导总锁报警标志*/
|
||||
|
||||
bufIndex = GetlogSectionBufIndex(logSectionId); /*获取区段数组下标*/
|
||||
/**区段下标合法*/
|
||||
@@ -6470,13 +6481,21 @@ UINT8 CheckLogJumpLockApply(UINT16 logSectionId)
|
||||
{/*防护道岔封锁状态检查*/
|
||||
devId = 0u; /*设备ID*/
|
||||
devState = 0u; /*设备状态*/
|
||||
reVal = LogicSecRltvPrtctSwFlockCheck(logSectionId, &devId, &devState);/*封锁检查*/
|
||||
reVal = LogicSecRltvPrtctSwFLockCheck(logSectionId, &devId, &devState, &cYLockAlarmFlag);/*封锁检查*/
|
||||
if (CI_SUCCESS != reVal)
|
||||
{
|
||||
chFailStep = 13U;
|
||||
}
|
||||
}
|
||||
if (CI_SUCCESS == reVal)
|
||||
{/*防护道岔位置检查*/
|
||||
devId = 0u; /*设备ID*/
|
||||
devState = 0u; /*设备状态*/
|
||||
reVal = LogicSecRltvPrtctSwPosCheck(logSectionId, &devId, &devState);/*位置检查*/
|
||||
if (CI_SUCCESS != reVal)
|
||||
{
|
||||
chFailStep = 14U;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6863,7 +6882,7 @@ UINT8 JumpLockDriveSwitch(const UINT16 axisSecId)
|
||||
|
||||
|
||||
/*
|
||||
功能描述: 驱动计轴区段内道岔处理
|
||||
功能描述: 驱动计轴区段内道岔,计轴区段关联防护道岔处理
|
||||
输入参数: const UINT16 axisSecId 计轴区段ID
|
||||
输出参数: const UINT8 DrivFlag 道岔驱动标志
|
||||
返回值: 无
|
||||
@@ -6875,7 +6894,6 @@ void AxisSecDrvInnerSwitch(const UINT16 axisSecId, const UINT8 DrivFlag)
|
||||
UINT8 switchExpPos = 0u; /*道岔期望位置*/
|
||||
AxisSwitchStruct* pAxisSecSwitchStru = NULL; /*道岔数据*/
|
||||
UINT8 ii = 0u; /*循环变量*/
|
||||
UINT8 funRtn = CI_ERROR;
|
||||
|
||||
AxisSwitchStruct* pProtectSwitchStru = NULL; /*防护道岔数据结构指针*/
|
||||
UINT8 protectSwitchSum = 0u;
|
||||
@@ -6895,7 +6913,7 @@ void AxisSecDrvInnerSwitch(const UINT16 axisSecId, const UINT8 DrivFlag)
|
||||
{
|
||||
switchId = pAxisSecSwitchStru[ii].SwitchId;
|
||||
switchExpPos = pAxisSecSwitchStru[ii].SwitchPosition;
|
||||
funRtn = SwitchDriveProcess(switchId, switchExpPos); /*设置计轴区段内道岔的驱动状态为驱动中*/
|
||||
(void)SwitchDriveProcess(switchId, switchExpPos); /*设置计轴区段内道岔的驱动状态为驱动中*/
|
||||
}
|
||||
|
||||
for (ii = 0u; ii < protectSwitchSum; ii++)
|
||||
@@ -11657,21 +11675,19 @@ UINT8 GetLocalVirCiType(UINT8 chVirCiId)
|
||||
/*
|
||||
* 功能描述:判断本联锁临时限速状态
|
||||
* 参数说明:无
|
||||
* 返 回 值:临时限速有效返回失败,清除或与ZC通信正常返回成功
|
||||
* 返 回 值:临时限速有效返回失败,清除或与限速确认返回成功
|
||||
* Created :LYJ
|
||||
*/
|
||||
|
||||
UINT8 CheckLocalCiLSXSStata(void)
|
||||
{
|
||||
UINT8 cLocalCiId = 0U;
|
||||
UINT8 chRet = 0U;
|
||||
UINT8 chVirCINum = 0U;
|
||||
UINT8 i = 0U;
|
||||
UINT8 chXiansuState = 0U;
|
||||
UINT8 chVirtualCIid = 0U;
|
||||
UINT8 chTsrSureFlag = 0U;
|
||||
cLocalCiId = GetSystemParaLocalCiId();
|
||||
chVirCINum = GetVirtualCINum();
|
||||
|
||||
chTsrSureFlag = GetTsrSureFlag(); /*获取临时限速确认标志*/
|
||||
if (CI_TSR_SURE_YES == chTsrSureFlag)
|
||||
{
|
||||
@@ -11679,7 +11695,9 @@ UINT8 CheckLocalCiLSXSStata(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
/*临时限速未确认,判断是否做了限速确认*/
|
||||
/*临时限速未确认,判断是否做了限速清除*/
|
||||
|
||||
chVirCINum = GetVirtualCINum();
|
||||
for (i = 0U; i < chVirCINum; i++)
|
||||
{
|
||||
chVirtualCIid = GetVirtualCIid(i);
|
||||
@@ -11698,3 +11716,84 @@ UINT8 CheckLocalCiLSXSStata(void)
|
||||
|
||||
return chRet;
|
||||
}
|
||||
|
||||
/*
|
||||
功能描述:
|
||||
清除逻辑区段关联道岔单操位置
|
||||
输入参数:
|
||||
const UINT16 逻辑区段ID
|
||||
输出参数:
|
||||
无.
|
||||
返回值:
|
||||
无
|
||||
add by mpt 20260403
|
||||
*/
|
||||
void ClearLogSeceSwitchDanCaoPos(const UINT16 logicSecId)
|
||||
{
|
||||
UINT8 switchSum = 0u; /*道岔数目*/
|
||||
UINT16 switchId = 0u; /*道岔ID*/
|
||||
UINT8 ii = 0u; /*循环变量*/
|
||||
UINT8 checkSum = 0u;
|
||||
LogsecSwitchStruct* dataIdBuf = NULL;
|
||||
|
||||
UINT8 chLogicSecSwitchSum = 0U;/*逻辑区段道岔数目*/
|
||||
LogsecSwitchStruct* pLogicSecSwitchIdData = NULL;/*逻辑区段道岔ID数据*/
|
||||
|
||||
chLogicSecSwitchSum = GetLogicSecSwitchSum(logicSecId);/*逻辑区段道岔数目*/
|
||||
pLogicSecSwitchIdData = GetLogicSecSwitchIdStru(logicSecId);/*逻辑区段道岔ID数据*/
|
||||
|
||||
checkSum = GetLgcRelateProSwSum(logicSecId);/*获取指定ID逻辑区段关联防护道岔数目*/
|
||||
dataIdBuf = GetLgcRelateProSwStru(logicSecId);
|
||||
|
||||
|
||||
|
||||
if (NULL != pLogicSecSwitchIdData)
|
||||
{
|
||||
for (ii = 0u; ii < chLogicSecSwitchSum; ii++)
|
||||
{
|
||||
switchId = pLogicSecSwitchIdData[ii].SwitchId;
|
||||
/*设置该道岔期望驱动位置为无效*/
|
||||
(void)SetSwitchDanCaoPosition(switchId, SWITCH_POSITION_INVALID);
|
||||
}
|
||||
}
|
||||
|
||||
if (NULL != dataIdBuf)
|
||||
{
|
||||
for (ii = 0u; ii < checkSum; ii++)
|
||||
{
|
||||
switchId = dataIdBuf[ii].SwitchId;
|
||||
/*设置该道岔期望驱动位置为无效*/
|
||||
(void) SetSwitchDanCaoPosition(switchId, SWITCH_POSITION_INVALID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
功能描述:
|
||||
清除计轴区段关联道岔单操位置
|
||||
输入参数:
|
||||
const UINT16 计轴区段ID
|
||||
输出参数:
|
||||
无.
|
||||
返回值:
|
||||
无
|
||||
add by mpt 20260403
|
||||
*/
|
||||
void ClearAxisSeceSwitchDanCaoPos(const UINT16 axisSecId)
|
||||
{
|
||||
UINT16* pLogSectionIdBuf = NULL;
|
||||
UINT8 chLogSectionSum = 0U;
|
||||
UINT8 ii = 0U;
|
||||
|
||||
pLogSectionIdBuf = GetAxisSecLogSectionIdBuf(axisSecId);
|
||||
chLogSectionSum = GetAxisSecLogSectionSum(axisSecId);
|
||||
|
||||
if (NULL != pLogSectionIdBuf)
|
||||
{
|
||||
for (ii = 0U; ii < chLogSectionSum; ii++)
|
||||
{
|
||||
/*清除逻辑区段道岔道岔标志*/
|
||||
ClearLogSeceSwitchDanCaoPos(pLogSectionIdBuf[ii]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ typedef struct S_AreaSnowInfoStruct
|
||||
#define ALL_AREA_SNOW_SUM_MAX ((UINT8)254) /*TMC发送的全线区间雨雪站台数量*/
|
||||
#define ALL_CBTC_CROSS_SUM_MAX ((UINT8)253) /*CBTC跨压最大数量*/
|
||||
#define ALL_TACS_CROSS_SUM_MAX ((UINT8)253) /*TACS跨压最大数量*/
|
||||
#define CROSS_SIGNAL_ID_MAX ((UINT8)1499) /*跨压信号机ID最大值*/
|
||||
#define CROSS_SIGNAL_ID_MAX ((UINT16)1499) /*跨压信号机ID最大值*/
|
||||
#define CBTC_CROSS_ID_MAX ((UINT8)253) /*CBTC跨压最大列车ID*/
|
||||
#define TACS_CROSS_ID_MAX ((UINT8)253) /*TACS跨压最大列车ID*/
|
||||
|
||||
@@ -226,8 +226,6 @@ extern UINT8 comm_Train_Test_YSKJ_SCX_State; /*
|
||||
extern UINT8 comm_Train_Test_SQJ_CLD_State; /*试车线与车辆段采用通信接口时车辆段SQJ状态*/
|
||||
extern UINT8 comm_Train_Test_TYSJ_CLD_State; /*试车线与车辆段采用通信接口时车辆段TYSJ状态*/
|
||||
|
||||
extern UINT8 ZCToCIAutoRtnIndict_Flash_Sta; /*ZC给CI的无人折返灯闪灯状态*/
|
||||
extern UINT8 ZCToCIAutoRtnIndict_Steady_Sta; /*ZC给CI的无人折返灯稳灯状态*/
|
||||
extern UINT8 AutoTriggerFlag; /*自动触发标志初始化为未设置*/
|
||||
|
||||
extern UINT8 CiCiRelayInterfaceConfirmFlag;/*继电接口确认标志*/
|
||||
@@ -1988,4 +1986,28 @@ UINT8 GetLocalVirCiType(UINT8 chVirCiId);
|
||||
*/
|
||||
|
||||
UINT8 CheckLocalCiLSXSStata(void);
|
||||
/*
|
||||
功能描述:
|
||||
清除逻辑区段关联道岔单操位置
|
||||
输入参数:
|
||||
const UINT16 逻辑区段ID
|
||||
输出参数:
|
||||
无.
|
||||
返回值:
|
||||
无
|
||||
add by mpt 20260403
|
||||
*/
|
||||
void ClearLogSeceSwitchDanCaoPos(const UINT16 logicSecId);
|
||||
/*
|
||||
功能描述:
|
||||
清除计轴区段关联道岔单操位置
|
||||
输入参数:
|
||||
const UINT16 计轴区段ID
|
||||
输出参数:
|
||||
无.
|
||||
返回值:
|
||||
无
|
||||
add by mpt 20260403
|
||||
*/
|
||||
void ClearAxisSeceSwitchDanCaoPos(const UINT16 axisSecId);
|
||||
#endif
|
||||
|
||||
@@ -111,6 +111,10 @@
|
||||
#define EFUNC_OVERLAP_VALIDMASK_CHECK ((UINT8)0x4A) /*函数:OverlapValidMaskCheck 计算保护区段有效码位检查*/
|
||||
#define EFUNC_ROUTE_LOCK_DRIVE_SWITCH ((UINT8)0xD2) /*RouteLockDriveSwitch 锁闭道岔*/
|
||||
#define EFUNC_ROUTE_COUPLINK_SET ((UINT8)0xD7) /*SetCouplinkRouteLogicManage 办理联挂进路逻辑管理*/
|
||||
#define EFUNC_FOLLOWUP_SWITCH_DANSUO_CANCLE ((UINT8)0xD8) /*FollowUpSwitchUnFlockCheck 一二次道岔单解命令*/
|
||||
#define EFUNC_FOLLOWUP_SWITCH_UNFLOCK ((UINT8)0xD9) /*FollowUpSwitchUnFlockCheck 一二次道岔解封命令*/
|
||||
#define EFUNC_FOLLOWUP_SEC_UNFLOCK ((UINT8)0xDA) /*FollowUpSecUnFlockCheck 一二次区段解封命令*/
|
||||
#define EFUNC_FOLLOWUP_SIGNAL_UNFLOCK ((UINT8)0xDB) /*FollowUpSwitchUnFlockCheck 一二次信号解封命令*/
|
||||
|
||||
/*车辆段联锁逻辑检查*/
|
||||
#define EFUNC_SET_LEAD_ROUTE_CHECK ((UINT8)0x4B) /*办理引导进路检查*/
|
||||
@@ -219,7 +223,8 @@
|
||||
#define EFUNC_PARSE_LOCAL_RC2CI_DATA ((UINT8)0xD5U) /*函数:ParseRcToLocalCiDataFrame*/
|
||||
#define EFUNC_PARSE_LOCAL_CI2CI_DATA ((UINT8)0xD6U) /*函数:ParseCiToCiDataFrame*/
|
||||
#define EFUNC_PARSE_LOCAL_OC2CI_DATA ((UINT8)0xD7U) /*函数:ParseOcToCiDataFrame*/
|
||||
|
||||
#define EFUNC_CONNECT_ROUTE_RELEASE ((UINT8)0xD8U) /*函数:ConnectRouteReleaseManage*/
|
||||
#define EFUNC_PARSE_GATEWAY2CI_DATA ((UINT8)0xD9U) /*函数:ParseGateWayToCiDataProc*/
|
||||
|
||||
/*************************************************分界线******************************************************************************/
|
||||
/*************************************************分界线******************************************************************************/
|
||||
@@ -242,6 +247,7 @@
|
||||
#define ETYPE_GROUP_AUTO_ROUTE_STATE ((UINT8)0x16) /*组合自动进路*/
|
||||
#define ETYPE_ROUTE_APPLY_SWITCH_MOVE ((UINT8)0xA4) /*进路道岔单操中*/
|
||||
#define ETYPE_COUPLINK_ROUTE_IDLE ((UINT8)0xA5) /*联挂进路内无被联挂车*/
|
||||
#define ETYPE_CONNECT_ROUTE_RELEASE ((UINT8)0xA6) /*联络线接车进路解锁条件不满足*/
|
||||
|
||||
|
||||
#define ETYPE_COMM_WITH_VOBC ((UINT8)0x11) /*与VOBC通信*/
|
||||
@@ -254,6 +260,7 @@
|
||||
#define ETYPE_COMM_WITH_TMC ((UINT8)0x17) /*与TMC通信*/
|
||||
#define ETYPE_COMM_WITH_RC ((UINT8)0x18U) /*与RC通信*/
|
||||
#define ETYPE_COMM_WITH_OC ((UINT8)0x19U) /*与OC通信*/
|
||||
#define ETYPE_COMM_WITH_GATEWAY ((UINT8)0x1AU) /*与网关通信*/
|
||||
|
||||
/* 信号机故障类型编码 (UINT8)0x21-(UINT8)0x3f */
|
||||
/* 设备类型 CI_DEVICE_TYPE_SIGNAL */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -186,10 +186,9 @@ UINT8 PsdDeviceToRelayStateProc(void);
|
||||
/*
|
||||
* 功能描述: 更新洗车机继电器状态
|
||||
* 参数说明: void
|
||||
* 返回值 : 0: 更新失败
|
||||
* 1: 更新成功
|
||||
* 返回值 : void
|
||||
*/
|
||||
UINT8 WashMachineDevToRelayStaProc(void);
|
||||
void WashMachineDevToRelayStaProc(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 更新紧急停车按钮逻辑状态
|
||||
@@ -226,10 +225,9 @@ void GaragedoorDevToRelayStaProc(void);
|
||||
/*
|
||||
* 功能描述: 更新洗车机的逻辑状态
|
||||
* 参数说明: void
|
||||
* 返回值 : 0: 更新失败
|
||||
* 1: 更新成功
|
||||
* 返回值 : void
|
||||
*/
|
||||
UINT8 WashMachineToDeviceStateProc(void);
|
||||
void WashMachineToDeviceStateProc(void);
|
||||
/*
|
||||
* 功能描述: 更新Spks按钮逻辑状态
|
||||
* 参数说明: void
|
||||
@@ -1194,13 +1192,14 @@ void SwitchDoubleMainProtect(UINT16 switchId);
|
||||
* add by mpt 20260328
|
||||
*/
|
||||
void FindSwitchPostionCmdOut(UINT16 switchId);
|
||||
|
||||
/*
|
||||
* 功能描述:道岔寻表超时检测模块
|
||||
* 参数说明: UINT16 switchId 道岔ID
|
||||
* 返回值 : void
|
||||
* add by mpt 20260330
|
||||
* 功能描述: 更新倒切柜状态
|
||||
* 参数说明: void
|
||||
* 返回值 : 无
|
||||
* Create Fan 20260608
|
||||
*/
|
||||
void FindSwitchPostionCmdTimeOutCheck(UINT16 switchId);
|
||||
void ReverseStateUpdateProc(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "../IO/DeviceRelayDataProcess.h"
|
||||
#include "MSCP_APP_API.h"
|
||||
#include "LightTestButtonDataManage.h"
|
||||
#include "InterlockLogicManage.h"
|
||||
|
||||
extern PlatformToCiDataStruct platformToCiDataStru[PLATFORM_TO_CI_SUM_MAX]; /*引用站台门与CI通信数据结构体*/
|
||||
extern unsigned long TimeStamp = 0u;
|
||||
@@ -430,12 +431,10 @@ void InputDataProcess(void)
|
||||
/*处理设备状态*/
|
||||
ProcessDeviceLogicState();
|
||||
|
||||
|
||||
/*处理LEU数据*/
|
||||
ProcessLeuToCiData();
|
||||
if (RC_WORK_MODE_TIOC == cRcWorkMode)
|
||||
{
|
||||
|
||||
/*处理物理区段上的占用落到计轴区段 */
|
||||
ProcessPhyOCcStateToAxisSection();
|
||||
|
||||
@@ -445,8 +444,10 @@ void InputDataProcess(void)
|
||||
/* 列车处理 */
|
||||
TrainMainProc();
|
||||
cost[5] = MSCP_GetTick();
|
||||
|
||||
/*回收列车资源*/
|
||||
(void)TrainResRecycle();
|
||||
|
||||
if (FUNC_SWITCH_ON == chSwitch)
|
||||
{
|
||||
/* 列车占压计轴区段计算 */
|
||||
@@ -521,6 +522,9 @@ void InputDataProcess(void)
|
||||
/*处理屏蔽门数据*/
|
||||
ProcessPsdData();
|
||||
|
||||
/*新增ATS/ 现地 / 网关一二次命令帧处理*/
|
||||
AtsFollowUpCmdProcess();
|
||||
|
||||
/*处理ATS数据*/
|
||||
(void)ProcessAtsOrXianDiToCiData();
|
||||
|
||||
@@ -946,7 +950,7 @@ void ProcessOcToCiData(void)
|
||||
{
|
||||
UINT8 localCiId = 0u; /*本地联锁ID*/
|
||||
|
||||
UINT16 ii = 0u;
|
||||
UINT8 ii = 0u;
|
||||
UINT16 jj = 0u;
|
||||
UINT16 j = 0u;
|
||||
UINT16 ind = 0u;
|
||||
@@ -968,6 +972,7 @@ void ProcessOcToCiData(void)
|
||||
UINT8 chOcId = 0U;
|
||||
UINT8 transmitState = 0U;
|
||||
UINT8 chThisOcCotrolMode = 0u;
|
||||
UINT8 mm = 0u;
|
||||
|
||||
localCiId = GetSystemParaLocalCiId();
|
||||
|
||||
@@ -1015,9 +1020,9 @@ void ProcessOcToCiData(void)
|
||||
pTempOc->OcDevices[jj].szSwitchIncldeZzjState[chSwitchZzjIndex] = OC_SWITCH_POSITION_SIKAI;
|
||||
}
|
||||
|
||||
for (kk = 0u; kk < MAX_OC_SWITCH_INCLUDE_BOARD_NUM; kk++)
|
||||
for (mm = 0u; mm < MAX_OC_SWITCH_INCLUDE_BOARD_NUM; mm++)
|
||||
{
|
||||
pTempOc->OcDevices[jj].MainStandbyState[kk] = STANDBY_CONTROL;/*备控制权*/
|
||||
pTempOc->OcDevices[jj].MainStandbyState[mm] = STANDBY_CONTROL;/*备控制权*/
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1071,20 +1076,20 @@ void ProcessOcToCiData(void)
|
||||
m_Switches[jj].MainStandbyState[j] = STANDBY_CONTROL;/*备控*/
|
||||
}
|
||||
|
||||
SetSwitchOcPlusBoxSateState(m_Switches[jj].DeviceId, pTempOc->OcId, SWITCH_BOX_FAULT);/*道岔插箱故障*/
|
||||
SetSwitchOcPlusBoxSateState(m_Switches[jj].DeviceId, (UINT8)pTempOc->OcId, SWITCH_BOX_FAULT);/*道岔插箱故障*/
|
||||
|
||||
/*重置板卡为故障状态*/
|
||||
for (j = 0U; j < MAX_OC_SWITCH_INCLUDE_BOARD_NUM; j++)
|
||||
{
|
||||
SetSwitchThisOCBoardState(m_Switches[jj].DeviceId, m_Switches[jj].OcId, m_Switches[jj].BoardAddr[j], 0xffU);
|
||||
SetSwitchThisOCBoardState(m_Switches[jj].DeviceId, (UINT8)m_Switches[jj].OcId, m_Switches[jj].BoardAddr[j], 0xffU);
|
||||
}
|
||||
|
||||
/*通信中断降状态为备控并设置周期号*/
|
||||
chThisOcCotrolMode = GetSwitchThisOcCotrolMode(m_Switches[jj].DeviceId, pTempOc->OcId);
|
||||
chThisOcCotrolMode = GetSwitchThisOcCotrolMode(m_Switches[jj].DeviceId, (UINT8)pTempOc->OcId);
|
||||
if ((MAIN_CONTROL == chThisOcCotrolMode) || (ERR_MODE_CONTROL == chThisOcCotrolMode))
|
||||
{/*主控或异常控*/
|
||||
SetSwitchThisOcCotrolMode(m_Switches[jj].DeviceId, pTempOc->OcId, STANDBY_CONTROL);
|
||||
SetSwitchOutMainContrCmdCycNum(m_Switches[jj].DeviceId, pTempOc->OcId, curCycle);/*在通信中断当周期设置OC备控,并刷新周期号,其他OC做升主控操作时需延时一定时间*/
|
||||
SetSwitchThisOcCotrolMode(m_Switches[jj].DeviceId, (UINT8)pTempOc->OcId, STANDBY_CONTROL);
|
||||
SetSwitchOutMainContrCmdCycNum(m_Switches[jj].DeviceId, (UINT8)pTempOc->OcId, curCycle);/*在通信中断当周期设置OC备控,并刷新周期号,其他OC做升主控操作时需延时一定时间*/
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1382,7 +1387,7 @@ void ProcessZcToCiData(void)
|
||||
|
||||
sourceIdBuf = GetCiTransmitSpecifySysDevBuf(CI_SYSTEM_TYPE_ZC);/*获取与本联锁通信的ZC的ID,目前一个联锁最多只与一个ZC通信*/
|
||||
|
||||
if (sourceIdBuf != NULL)
|
||||
if (NULL != sourceIdBuf)
|
||||
{
|
||||
/*更新与ZC通信状态*/
|
||||
(void)UpdateCiTransmitState(localCiId, CI_SYSTEM_TYPE_ZC, sourceIdBuf[0]);
|
||||
@@ -1391,11 +1396,11 @@ void ProcessZcToCiData(void)
|
||||
hLHTHeadCtxValid = GetHLHTHeadCtxValid(CI_SYSTEM_TYPE_ZC, sourceIdBuf[0]);
|
||||
if (CI_ERROR == hLHTHeadCtxValid) /*不使用GetZcMaskZcId()来获取ZC ID,因为组包完给ZC数据就清空了*/
|
||||
{
|
||||
dataValidFlag = 0u;
|
||||
dataValidFlag = 0U;
|
||||
}
|
||||
else
|
||||
{/*消息有效*/
|
||||
dataValidFlag = 1u;
|
||||
dataValidFlag = 1U;
|
||||
}
|
||||
debug_infor_printf((const)"\n CurCycle:%d ZcCiValidFlag:%d \n",curCycle,dataValidFlag);
|
||||
|
||||
@@ -1405,7 +1410,7 @@ void ProcessZcToCiData(void)
|
||||
|
||||
secJumpLockDelayUnlockCount = GetSysParaSecJLokDelayUnlockCyc();/*获取区段跳跃延时解锁周期数*/
|
||||
|
||||
if ((0u == zcMaskValueLen) || (NULL == pZcMaskValueBuf))
|
||||
if ((0U == zcMaskValueLen) || (NULL == pZcMaskValueBuf))
|
||||
{/*未收到zc发送过来的码位数据*/
|
||||
|
||||
/*if (GetCiTransmitState(CI_SYSTEM_TYPE_ZC, 0u) != TRANSMIT_STATE_GOOD)*/
|
||||
@@ -1573,7 +1578,7 @@ void ProcessZcToCiData(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (reVal == CI_SUCCESS)
|
||||
if (CI_SUCCESS == reVal)
|
||||
{
|
||||
/*与ZC通信恢复后,倒计时立即结束,维持动态测试防护锁闭状态*/
|
||||
phySecCurSum = GetPhySecCurSum();
|
||||
@@ -1603,7 +1608,7 @@ void ProcessZcToCiData(void)
|
||||
}
|
||||
|
||||
/*处理ZC发送的临时限速信息*/
|
||||
if (reVal == CI_SUCCESS)
|
||||
if (CI_SUCCESS == reVal)
|
||||
{
|
||||
cTsrSureFlag = GetTsrSureFlag();
|
||||
pZcToCiDataStru = GetZcToCiDataStru();
|
||||
@@ -1627,7 +1632,7 @@ void ProcessZcToCiData(void)
|
||||
}
|
||||
|
||||
/*处理ZC发送的紧急制动信息*/
|
||||
if (reVal == CI_SUCCESS)
|
||||
if (CI_SUCCESS == reVal)
|
||||
{
|
||||
if (NULL != pZcToCiDataStru)
|
||||
{
|
||||
@@ -1647,12 +1652,10 @@ void ProcessZcToCiData(void)
|
||||
}
|
||||
}
|
||||
|
||||
/*此处不再处理ZC发送的雨雪信息,转至融合处处理*/
|
||||
|
||||
/*处理ZC发送的雨雪模式信息*/
|
||||
if (reVal == CI_SUCCESS)
|
||||
if (CI_SUCCESS == reVal)
|
||||
{
|
||||
if ((1u == dataValidFlag)&&(ZC_TSR_VALID == pZcToCiDataStru->tsrInputInfoStru.cTsrValidFlag))
|
||||
if (1U == dataValidFlag)
|
||||
{
|
||||
if ((CI_ALL_SNOW_VALID == pZcToCiDataStru->cSnowValidFlag) || (CI_ALL_SNOW_UNVALID == pZcToCiDataStru->cSnowValidFlag))
|
||||
{
|
||||
@@ -1674,7 +1677,7 @@ void ProcessZcToCiData(void)
|
||||
|
||||
|
||||
/*处理ZC发送的ITE全线切除信息*/
|
||||
if (reVal == CI_SUCCESS)
|
||||
if (CI_SUCCESS == reVal)
|
||||
{
|
||||
if ((1u == dataValidFlag) && (ZC_TSR_VALID == pZcToCiDataStru->tsrInputInfoStru.cTsrValidFlag) && ((CI_ITE_LINE_CUT_VALID == pZcToCiDataStru->cIteLineCutState)
|
||||
|| (CI_ITE_LINE_CUT_INVALID == pZcToCiDataStru->cIteLineCutState) || (CI_ITE_LINE_CUT_DEFAULT == pZcToCiDataStru->cIteLineCutState)))
|
||||
@@ -1699,11 +1702,18 @@ void ProcessZcToCiData(void)
|
||||
{
|
||||
if ((1u == dataValidFlag) && (ALL_CBTC_CROSS_SUM_MAX >= pZcToCiDataStru->wCbtcCrossNum))
|
||||
{
|
||||
/*设置*/
|
||||
/*当周期收到CBTC跨压帧时,设置CBTC跨压全局变量*/
|
||||
if (CI_SUCCESS == pZcToCiDataStru->cRecvCbtcCrossFrameTag)
|
||||
{
|
||||
SetCbtcCrossInfo(pZcToCiDataStru->wCbtcCrossNum,
|
||||
pZcToCiDataStru->wCbtcCrossSignalId, pZcToCiDataStru->wCbtcCrossTrainId);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_ERROR;
|
||||
}
|
||||
@@ -1731,7 +1741,11 @@ void ProcessTmcToTiocData(void)
|
||||
UINT8* deviceIdBuf = NULL;
|
||||
UINT8 ii = 0u;
|
||||
UINT8 cTransState = 0U; /*与TMC通信状态*/
|
||||
UINT8 chWorkType = 0U; /*双系工作模式*/
|
||||
UINT8 cRcWorkMode = 0u;/*RC工作模式*/
|
||||
|
||||
chWorkType = GetSystemWorkType();
|
||||
cRcWorkMode = GetLocalRcWorkMode();
|
||||
/*手动更新TMC通信状态*/
|
||||
cLocalTiocId = GetSystemParaLocalCiId();
|
||||
deviceSum = GetCiTransmitSpecifySysDevSum(CI_SYSTEM_TYPE_TMC); /*获取通信TMC设备总数*/
|
||||
@@ -1754,6 +1768,10 @@ void ProcessTmcToTiocData(void)
|
||||
else
|
||||
{
|
||||
ClearLineCommTrainData(); /*与TMC通信中断,清除本地存储的全线通信车信息*/
|
||||
if ((SYSTEM_WORK_MODE_ALL == chWorkType) && (RC_WORK_MODE_TIOC == cRcWorkMode))
|
||||
{
|
||||
SetTsrSureFlag(CI_TSR_SURE_NO);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1858,7 +1876,6 @@ void ProcessVobcToCiData(void)
|
||||
{
|
||||
UINT8 ii = 0u;
|
||||
UINT8 jj = 0u;
|
||||
UINT8 kk = 0u;
|
||||
UINT8 vobcToCiDataSum = GetVobcToCiSum();
|
||||
VobcToCiDataStruct* vobcToCiDataStru = GetVobcToCiDataStru();
|
||||
UINT8 chLineIdentity = GetCiFunctionSwitchConfig(VOBC_INTERFACE_IDENTITY);/*获取线路标识*/
|
||||
@@ -1917,7 +1934,7 @@ void ProcessVobcToCiData(void)
|
||||
for (jj = 0u; ((jj < vobcToCiDataStru[ii].PsdSum) && (jj < VOBC_TO_CI_TRAIN_PSD_MAX)); jj++)
|
||||
{
|
||||
/*由于新机场线VOBC和CI一直通信,导致故障隔离信息无法清除,故在此检查收到最后一次VOBC的控制命令是否超时*/
|
||||
if ((dwCurCycNum - vobcToCiDataStru[ii].PsdData[kk].CmdStartCycNum) > dwTransmitBadEnsureCount)
|
||||
if ((dwCurCycNum - vobcToCiDataStru[ii].PsdData[jj].CmdStartCycNum) > dwTransmitBadEnsureCount)
|
||||
{
|
||||
ClearPsdVobcContext(vobcToCiDataStru[ii].VobcId);
|
||||
break;
|
||||
@@ -2002,6 +2019,22 @@ void ProcessVobcToCiData(void)
|
||||
}
|
||||
else if ((LINE_HLHT == chLineIdentity) || (LINE_FAO == chLineIdentity))
|
||||
{
|
||||
/*厦门3处理列车非零速信息*/
|
||||
if (CI_VOBC_TRAIN_ZERO_SPEED_NO == VobcToCiDataStru[ii].chTrainZeroState)
|
||||
{/*列车非零速*/
|
||||
SetTrainZeroSpeedState(vobcToCiDataStru[ii].PsdData[jj].PsdId, PSD_TRAIN_ZERO_SPEED_NO); /*设置列车非零速*/
|
||||
SetStopDetectionState(vobcToCiDataStru[ii].PsdData[jj].PsdId, JXTC_STOP_DETECTION_NO); /*设置屏蔽门未停止间隙探测*/
|
||||
}
|
||||
else if (CI_VOBC_TRAIN_ZERO_SPEED_YES == VobcToCiDataStru[ii].chTrainZeroState)
|
||||
{/*列车零速*/
|
||||
SetTrainZeroSpeedState(vobcToCiDataStru[ii].PsdData[jj].PsdId, PSD_TRAIN_ZERO_SPEED_YES); /*设置列车零速*/
|
||||
SetStopDetectionState(vobcToCiDataStru[ii].PsdData[jj].PsdId, JXTC_STOP_DETECTION_NO); /*设置屏蔽门未停止间隙探测*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*没有非零速信息时,不处理*/
|
||||
}
|
||||
|
||||
switch (vobcToCiDataStru[ii].PsdData[jj].CmdType)
|
||||
{
|
||||
case VOBCTOCI_COMMAND_TYPE_PSDOPEN:
|
||||
@@ -4533,6 +4566,42 @@ UINT8 ProcessAtsOrXianDiToCiData(void)
|
||||
(void)CancelPsdExceptState(CmdDeviceId);
|
||||
}
|
||||
break;
|
||||
case ATS_CMD_CONNECT_ROUTE_RELEASE_ONE: /*联络线接车进路解锁一次*/
|
||||
belongVirCIid = GetRouteBelongVirCiId(CmdDeviceId);
|
||||
OrderCheckReVal = CheckOrderWhetherDoing(virCiID, belongVirCIid, cmdType, CmdDeviceId);
|
||||
if (CI_SUCCESS == OrderCheckReVal)
|
||||
{
|
||||
checkRetVal = AFFIRM_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkRetVal = AFFIRM_FAIL;
|
||||
}
|
||||
SetCiSendCmdBackData_OrderBack(commandId, CmdDeviceId, cmdDevType, terminalId, AtsOrXianDiToCiCmdStru[ii].CommandType, RESPONSE_FIRST, checkRetVal, virCiID);
|
||||
break;
|
||||
case ATS_CMD_CONNECT_ROUTE_RELEASE_TWO: /*联络线接车进路解锁二次*/
|
||||
checkRetVal = CheckSecondOrderValid(commandId, CmdDeviceId, cmdDevType, terminalId, AtsOrXianDiToCiCmdStru[ii].CommandType, virCiID);
|
||||
if (CI_SUCCESS == checkRetVal)
|
||||
{
|
||||
belongVirCIid = GetRouteBelongVirCiId(CmdDeviceId);
|
||||
OrderCheckReVal = CheckOrderWhetherDoing(virCiID, belongVirCIid, cmdType, CmdDeviceId);
|
||||
if (CI_SUCCESS == OrderCheckReVal)
|
||||
{
|
||||
checkRetVal = AFFIRM_SUCCESS;
|
||||
/*联络线接车进路解锁处理*/
|
||||
ConnectRouteReleaseManage(CmdDeviceId);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkRetVal = AFFIRM_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
checkRetVal = AFFIRM_FAIL;
|
||||
}
|
||||
SetCiSendCmdBackData_OrderBack(commandId, CmdDeviceId, cmdDevType, terminalId, AtsOrXianDiToCiCmdStru[ii].CommandType, RESPONSE_SECOND, checkRetVal, virCiID);
|
||||
break;
|
||||
default:
|
||||
localVirCiType = GetLocalVirCiType(virCiID);
|
||||
if (CI_TYPE_SCX == localVirCiType)
|
||||
@@ -4890,7 +4959,7 @@ void ProcessDeviceLogicState(void)
|
||||
(void)GaragedoorRelayToDevStaProc();
|
||||
|
||||
/*洗车机处理*/
|
||||
(void)WashMachineToDeviceStateProc();
|
||||
WashMachineToDeviceStateProc();
|
||||
|
||||
/*防淹门处理*/
|
||||
FloodGateRelayToDeviceStateProc();
|
||||
@@ -4903,6 +4972,9 @@ void ProcessDeviceLogicState(void)
|
||||
/*倒切设备继电器处理*/
|
||||
RvrsCutRlyToDvicSttPrc();
|
||||
}
|
||||
|
||||
/*倒切柜的倒切开关/板卡采集状态更新*/
|
||||
ReverseStateUpdateProc();
|
||||
}
|
||||
|
||||
|
||||
@@ -5224,6 +5296,7 @@ UINT8 MaskDataProcess(const UINT8 systemType,const UINT8* maskBuf, const UINT16
|
||||
/*不设置无效,进路状态处理设置*/
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -5318,7 +5391,7 @@ UINT8 MaskDataProcess(const UINT8 systemType,const UINT8* maskBuf, const UINT16
|
||||
*/
|
||||
void ProcessCiToCiData(void)
|
||||
{
|
||||
UINT8 localCiId = GetSystemParaLocalCiId(); /*本地联锁ID*/
|
||||
UINT8 chLocalCiId = 0U; /*本地联锁ID*/
|
||||
UINT8 jj = 0U;
|
||||
UINT8 tranCiNum = 0U;
|
||||
UINT8* tranCiIdBuf = NULL;
|
||||
@@ -5327,7 +5400,7 @@ void ProcessCiToCiData(void)
|
||||
UINT8 chMainMode = CI_SYSTEM_TYPE_RCI;/*主用模式*/
|
||||
UINT8 chSystemType = GetSystemWorkType();
|
||||
UINT8 chRcTransState = 0U;/*只判断Rc通信*/
|
||||
|
||||
chLocalCiId = GetSystemParaLocalCiId();
|
||||
/*如果相邻联锁通信中断则重置数据 通信关闭*/
|
||||
if (SYSTEM_WORK_MODE_ALL == chSystemType)
|
||||
{
|
||||
@@ -5342,16 +5415,16 @@ void ProcessCiToCiData(void)
|
||||
}
|
||||
|
||||
|
||||
for (jj = 0u;jj<tranCiNum;jj++)
|
||||
for (jj = 0U;jj < tranCiNum;jj++)
|
||||
{
|
||||
if (tranCiIdBuf[jj] != localCiId)
|
||||
if (tranCiIdBuf[jj] != chLocalCiId)
|
||||
{
|
||||
sameLineFlag = IsSameLineCI(localCiId, tranCiIdBuf[jj]);
|
||||
sameLineFlag = IsSameLineCI(chLocalCiId, tranCiIdBuf[jj]);
|
||||
if (SAME_LINE_YES == sameLineFlag)
|
||||
{
|
||||
/*更新通信状态*/
|
||||
(void)UpdateCiTransmitState(GetSystemParaLocalCiId(), CI_SYSTEM_TYPE_RC, tranCiIdBuf[jj]);
|
||||
(void)UpdateCiTransmitState(GetSystemParaLocalCiId(), CI_SYSTEM_TYPE_CI, tranCiIdBuf[jj]);
|
||||
(void)UpdateCiTransmitState(chLocalCiId, CI_SYSTEM_TYPE_RC, tranCiIdBuf[jj]);
|
||||
(void)UpdateCiTransmitState(chLocalCiId, CI_SYSTEM_TYPE_CI, tranCiIdBuf[jj]);
|
||||
if (SYSTEM_WORK_MODE_ALL == chSystemType)
|
||||
{
|
||||
chMainMode = GetNearRCISendMainUseMode(tranCiIdBuf[jj]);
|
||||
@@ -5395,10 +5468,18 @@ void ProcessCiToCiData(void)
|
||||
}
|
||||
else if (SAME_LINE_NO == sameLineFlag)
|
||||
{
|
||||
if (CI_SUCCESS != GetHLHTHeadCtxValid(CI_SYSTEM_TYPE_RCI, tranCiIdBuf[jj]))
|
||||
/*更新通信状态*/
|
||||
(void)UpdateCiTransmitState(chLocalCiId, CI_SYSTEM_TYPE_CI, tranCiIdBuf[jj]);
|
||||
tranCiState = GetCiTransmitState(CI_SYSTEM_TYPE_RCI, tranCiIdBuf[jj]);
|
||||
if (TRANSMIT_STATE_GOOD != tranCiState)
|
||||
{
|
||||
ResetCiDevStateHlht(tranCiIdBuf[jj]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不做处理*/
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6399,6 +6480,7 @@ static void ProcessPsdData(void)
|
||||
UINT32 dwCmdSetCycNum = 0U; /*PSD命令周期*/
|
||||
UINT32 dwTransmitBadEnsureCount = 0U; /*CI与VOBC通信中断判断时间*/
|
||||
|
||||
|
||||
dwCurCycNum = Get2oo2CurCycleNum();
|
||||
dwTransmitBadEnsureCount = GetCiAndVobcTransBadEnsureCnt();
|
||||
chLineIdentity = GetCiFunctionSwitchConfig(VOBC_INTERFACE_IDENTITY);/*获取线路标识*/
|
||||
@@ -6422,9 +6504,14 @@ static void ProcessPsdData(void)
|
||||
SetStartDetectionState(psdId,JXTC_START_DETECTION_NO);
|
||||
SetStopDetectionState(psdId,JXTC_STOP_DETECTION_YES);
|
||||
}
|
||||
else if(LINE_HLHT == chLineIdentity)
|
||||
{/*厦门3 HLHT线路,站台无车发送停止探测命令并且屏蔽门设置零速*/
|
||||
SetStopDetectionState(psdId, JXTC_STOP_DETECTION_YES); /*设置屏蔽门停止间隙探测状态为停止*/
|
||||
SetTrainZeroSpeedState(psdId, PSD_TRAIN_ZERO_SPEED_YES); /*设置屏蔽门非零速状态为零速*/
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
;/*无处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -6652,6 +6739,10 @@ static void HLHTVOBCDataProc(VobcToCiDataStruct* vobcToCiDataStru)
|
||||
/*处理VOBC点连式信息数据*/
|
||||
VobcBlocLinkDataProc(vobcToCiDataStru);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 功能描述: 处理VOBC停稳信息数据
|
||||
@@ -7247,7 +7338,7 @@ static UINT8 RouteReturnToThroughCmdProc(const UINT16 signalId,const UINT8 fromC
|
||||
pstLgcResInfo = GetLogSecTrainInfo(wLastLgcSecId);
|
||||
if (NULL != pstLgcResInfo)
|
||||
{
|
||||
(void)ComMemCopy(pstLgcResInfo, stTmpResInfo, (UINT16)(sizeof(LogicTrainResStruct)*LOGIC_SECTION_RES_SUM_MAX));
|
||||
(void)CommonMemCpy(pstLgcResInfo, (UINT32)(sizeof(LogicTrainResStruct)*LOGIC_SECTION_RES_SUM_MAX), stTmpResInfo, (UINT32)(sizeof(LogicTrainResStruct)*LOGIC_SECTION_RES_SUM_MAX));
|
||||
}
|
||||
SetLogSecLockState(wLastLgcSecId, LOG_SECTION_LOCK_NO, returnRouteId, saveReRouteDir);
|
||||
|
||||
@@ -8329,6 +8420,8 @@ void ClearPsdVobcContext(const UINT16 vobcId)
|
||||
{
|
||||
; /*不处理*/
|
||||
}
|
||||
/*厦门3间隙探测-CI与VOBC通信中断,设置屏蔽门非零速状态为零速*/
|
||||
PsdDataStru[bufIndex].chTrainZeroSpeedState = PSD_TRAIN_ZERO_SPEED_YES;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8379,7 +8472,8 @@ static void HLHTFAOVOBCDataProc(VobcToCiDataStruct* vobcToCiDataStru)
|
||||
&& (WASHMACHINE_HEAD_STEADY_NO == vobcToCiDataStru->headWashStopSteadyInfo)
|
||||
&& (WASHMACHINE_TAIL_STEADY_NO == vobcToCiDataStru->tailWashStopSteadyInfo)
|
||||
&& (PASS_WASHMACHINE_REQUEST_INVALID == vobcToCiDataStru->passWashMachineRequest)
|
||||
&& (PAUSE_TRAIN_WASH_REQUEST_INVALID == vobcToCiDataStru->washPauseRequest))
|
||||
&& (PAUSE_TRAIN_WASH_REQUEST_INVALID == vobcToCiDataStru->washPauseRequest)
|
||||
&& (WASHMACHINE_COUPING_STEADY_NO == vobcToCiDataStru->couplingWashStopSteadyInfo))
|
||||
{/*所有洗车命令均无效认为无洗车请求或洗车作业完毕*/
|
||||
SetWashMachineCurVobcID(washMachineId, 0u);/*清除当前洗车的VOBC ID*/
|
||||
/*清除洗车机的相关驱动状态*/
|
||||
@@ -8389,6 +8483,7 @@ static void HLHTFAOVOBCDataProc(VobcToCiDataStruct* vobcToCiDataStru)
|
||||
SetPauseTrainWashRequestDrvSta(washMachineId, WASHMACHINE_PAUSE_DRVREQ_FALSE);
|
||||
SetPassWashMachineReqtDrvSta(washMachineId, PASS_WASHMACHINE_DRVREQ_FALSE);
|
||||
SetWashMachineWorkModeDrvState(washMachineId, WASHMACHINE_WORKMODE_INVALID_DRV);
|
||||
SetCoupingStopSteadyDrvState(washMachineId, WASHMACHINE_COUPING_STEADY_NO);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -8434,6 +8529,21 @@ static void HLHTFAOVOBCDataProc(VobcToCiDataStruct* vobcToCiDataStru)
|
||||
}
|
||||
}
|
||||
|
||||
if (WASHMACHINE_COUPING_STEADY_YES == vobcToCiDataStru->couplingWashStopSteadyInfo)
|
||||
{/*联挂端停稳请求有效*/
|
||||
if (1U == washMachineCurSum)
|
||||
{
|
||||
SetCoupingStopSteadyDrvState(washMachineId, WASHMACHINE_COUPING_STEADY_YES);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (1U == washMachineCurSum)
|
||||
{
|
||||
SetCoupingStopSteadyDrvState(washMachineId, WASHMACHINE_COUPING_STEADY_NO);
|
||||
}
|
||||
}
|
||||
|
||||
if (WASHMACHINE_TAIL_STEADY_YES == vobcToCiDataStru->tailWashStopSteadyInfo)
|
||||
{/*尾端停稳请求有效*/
|
||||
if (1U == washMachineCurSum)
|
||||
@@ -8493,6 +8603,7 @@ static void HLHTFAOVOBCDataProc(VobcToCiDataStruct* vobcToCiDataStru)
|
||||
SetPauseTrainWashRequestDrvSta(washMachineId, WASHMACHINE_PAUSE_DRVREQ_FALSE);
|
||||
SetPassWashMachineReqtDrvSta(washMachineId, PASS_WASHMACHINE_DRVREQ_FALSE);
|
||||
SetWashMachineWorkModeDrvState(washMachineId, WASHMACHINE_WORKMODE_INVALID_DRV);
|
||||
SetCoupingStopSteadyDrvState(washMachineId, WASHMACHINE_COUPING_STEADY_NO);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10005,16 +10116,6 @@ static void SetIvocWashDriveState(VobcToCiDataStruct* vobcToCiDataStru,const UIN
|
||||
SetTrainTailStopSteadyDrvState(washMachineId, WASHMACHINE_TAIL_STEADY_NO);
|
||||
}
|
||||
|
||||
if (WASHMACHINE_COUPING_STEADY_YES == vobcToCiDataStru->couplingWashStopSteadyInfo)
|
||||
{
|
||||
/*尾端停稳请求有效*/
|
||||
SetCoupingStopSteadyDrvState(washMachineId, WASHMACHINE_TAIL_STEADY_YES);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCoupingStopSteadyDrvState(washMachineId, WASHMACHINE_TAIL_STEADY_NO);
|
||||
}
|
||||
|
||||
if (WASHMACHINE_PAUSE_DRVREQ_TRUE == vobcToCiDataStru->washPauseRequest)
|
||||
{
|
||||
/*暂停洗车请求有效*/
|
||||
@@ -11036,7 +11137,7 @@ void RouteSecLockApplyCmdProc(const UINT16 wCurRLockRouteId, const UINT16 wPreRL
|
||||
pstLgcResInfo = GetLogSecTrainInfo(pLogIdBuff[ii]);
|
||||
if (NULL != pstLgcResInfo)
|
||||
{
|
||||
(void)ComMemCopy(pstLgcResInfo, stTmpResInfo, (UINT16)(sizeof(LogicTrainResStruct) * LOGIC_SECTION_RES_SUM_MAX));
|
||||
(void)CommonMemCpy(pstLgcResInfo, (UINT32)((sizeof(LogicTrainResStruct)) * LOGIC_SECTION_RES_SUM_MAX),stTmpResInfo, (UINT32)((sizeof(LogicTrainResStruct)) * LOGIC_SECTION_RES_SUM_MAX));
|
||||
SetLogSecLockState(pLogIdBuff[ii], LOG_SECTION_LOCK_NO, validRouteId, 0U);/*设置区段锁闭所属之前进路未锁闭*/
|
||||
/*设置区段属于当前进路锁闭*/
|
||||
SetLogSecLockState(pLogIdBuff[ii], LOG_SECTION_LOCK_NORMAL, wCurRLockRouteId, chRouteDir);
|
||||
@@ -11116,7 +11217,7 @@ void LogRouteCleanOldLogSecLockProc(const UINT16 wPreRouteId)
|
||||
pstLgcResInfo = GetLogSecTrainInfo(pLogSecIdBuff[ii]);
|
||||
if (NULL != pstLgcResInfo)
|
||||
{
|
||||
(void)ComMemCopy(pstLgcResInfo, stTmpResInfo, (UINT16)(sizeof(LogicTrainResStruct) * LOGIC_SECTION_RES_SUM_MAX));
|
||||
(void)CommonMemCpy(pstLgcResInfo, (UINT32)(sizeof(LogicTrainResStruct) * LOGIC_SECTION_RES_SUM_MAX), stTmpResInfo, (UINT32)(sizeof(LogicTrainResStruct) * LOGIC_SECTION_RES_SUM_MAX));
|
||||
SetLogSecLockState(pLogSecIdBuff[ii], LOG_SECTION_LOCK_NO, wValidRouteId, 0U); /*设置区段锁闭所属之前进路未锁闭*/
|
||||
|
||||
CpyLgcSecResTrain(pLogSecIdBuff[ii], cResTrainSum, stTmpResInfo); /*拷贝逻辑区段列车资源信息*/
|
||||
@@ -11781,17 +11882,23 @@ void OverlapUnlockApplyDeal(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*最接近的车获取失败,不向IVOC申请保护区段解锁*/
|
||||
/*最接近的车获取失败,不向IVOC申请保护区段解锁*/
|
||||
SetOverlapUnlockApplyTrainId(wOverlapId, 0U);
|
||||
SetReqIvocUnlockStartCycNum(wOverlapId, 0U);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*保护区段无锁闭所属进路不处理向IVOC申请保护区段解锁*/
|
||||
/*保护区段无锁闭所属进路不处理向IVOC申请保护区段解锁*/
|
||||
SetOverlapUnlockApplyTrainId(wOverlapId, 0U);
|
||||
SetReqIvocUnlockStartCycNum(wOverlapId, 0U);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*未申请保护区段解锁,RC不向IVOC申请保护区段解锁*/
|
||||
/*未申请保护区段解锁,RC不向IVOC申请保护区段解锁*/
|
||||
SetOverlapUnlockApplyTrainId(wOverlapId, 0U);
|
||||
SetReqIvocUnlockStartCycNum(wOverlapId, 0U);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -12498,7 +12605,8 @@ void SignalTrainCrossPro(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
/*非TACS主控,不记录列车ID*/
|
||||
/*非TACS主控,不设置跨压和列车ID*/
|
||||
cSignalCrossState = SIGNAL_CROSS_STATE_NO;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -12751,9 +12859,12 @@ void ProcessIvocToRCData(void)
|
||||
{
|
||||
/*不处于MMI本地湿轨,不处理*/
|
||||
}
|
||||
|
||||
SetPbtacsTrainTransState(pIvocToRcDataStru[ii].VobcId, TRAIN_COMM_STATE_GOOD); /*设置与PBTACS车通信正常*/
|
||||
}
|
||||
else
|
||||
{
|
||||
SetPbtacsTrainTransState(pIvocToRcDataStru[ii].VobcId, TRAIN_COMM_STATE_BAD); /*设置与PBTACS车通信中断(暂不考虑分界点列车的通信状态)*/
|
||||
|
||||
/*从PSD数据中删除该VOBC产生的上下文信息*/
|
||||
ClearPsdVobcContext(pIvocToRcDataStru[ii].VobcId);
|
||||
@@ -12803,8 +12914,6 @@ static void ClearPsdData(const UINT16 psdId)
|
||||
UINT8 psdSum = 0u;
|
||||
UINT16 platformPsdId = 0u;
|
||||
UINT8 chRcWorkMode = 0u;
|
||||
|
||||
|
||||
chRcWorkMode = GetLocalRcWorkMode();
|
||||
bufIndex = GetPsdConfigBufIndex(psdId);
|
||||
if ((0u != psdId) && (PSD_INVALID_ID != psdId)&&(PSD_SUM_MAX > bufIndex))
|
||||
@@ -12816,7 +12925,6 @@ static void ClearPsdData(const UINT16 psdId)
|
||||
PsdDataStru[bufIndex].VOBCDoorState = PSD_DOOR_CLOSEDANDLOCKED_INVALID;
|
||||
PsdDataStru[bufIndex].psdEditGroupInfo = 0u;/*清除编组信息*/
|
||||
|
||||
|
||||
if (RC_WORK_MODE_TIOC == chRcWorkMode)
|
||||
{
|
||||
SetPsdEditGroupInfoDataCC(psdId, PSD_EDIT_GROUP_DEFAULT); /*设置RC的PSD编组信息为默认值*/
|
||||
|
||||
@@ -160,7 +160,7 @@ void OutputDataProcess(void)
|
||||
(void)PsdDeviceToRelayStateProc();
|
||||
|
||||
/*更新洗车机继电器状态*/
|
||||
(void)WashMachineDevToRelayStaProc();
|
||||
WashMachineDevToRelayStaProc();
|
||||
|
||||
/*更新计轴复位继电器状态*/
|
||||
/*虚拟联锁兼容*/
|
||||
@@ -400,6 +400,10 @@ UINT8 GetAtsBackInfoParam(const UINT8 functionId,const UINT8 deviceStateType, co
|
||||
case ETYPE_COUPLINK_ROUTE_IDLE:
|
||||
returnValue = CI_BACK_COUPLINK_ROUTE_IDLE; /*联挂进路内无被联挂车*/
|
||||
break;
|
||||
case ETYPE_CONNECT_ROUTE_RELEASE:
|
||||
returnValue = CI_BACK_CONNECT_ROUTE_RELEASE; /*联络线接车进路解锁条件不满足*/
|
||||
break;
|
||||
|
||||
|
||||
/*信号机故障反馈*/
|
||||
case ETYPE_SIG_START_OPEN_STATE:
|
||||
@@ -1890,6 +1894,30 @@ void IndicatorStateProc(void)
|
||||
}
|
||||
|
||||
}
|
||||
else if (INDICATOR_TYPE_XDC_DCGDJ == devType)
|
||||
{ /*蓄电池电池供电*/
|
||||
|
||||
devRelaySum = GetIndicatorRelaySum(devId); /*获取相关继电器总数*/
|
||||
devRelayIdBuf = GetIndicatorRelayIdBuf(devId); /*获取相关继电器ID buf*/
|
||||
|
||||
if ((0U == devRelaySum) || (NULL == devRelayIdBuf))
|
||||
{
|
||||
SetIndicatorState(devId, INDICATOR_SHOW_YES); /*设置红灯报警*/
|
||||
}
|
||||
else
|
||||
{
|
||||
relayCollState = GetRelayCollState(devRelayIdBuf[0]);
|
||||
if (RELAY_STATE_DOWN == relayCollState)
|
||||
{ /*继电器落下*/
|
||||
|
||||
SetIndicatorState(devId, INDICATOR_SHOW_NO); /*设置绿灯*/
|
||||
}
|
||||
else
|
||||
{
|
||||
SetIndicatorState(devId, INDICATOR_SHOW_YES); /*设置红灯*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (INDICATOR_TYPE_PORT_RONGSI == devType)
|
||||
{
|
||||
devRelaySum = GetIndicatorRelaySum(devId); /*获取相关继电器总数*/
|
||||
@@ -3549,7 +3577,7 @@ void NonRouteRelayStateProc(void)
|
||||
UINT8 interfaceType = FUNC_SWITCH_UNDEF;/*试车线与车辆段接口类型*/
|
||||
UINT8 i = 0u;
|
||||
UINT16 agreeTryTrainRelayId = 0u;/*同意试车继电器ID*/
|
||||
UINT16 wColWaysideTryTrainIndRelayId = 0u;/*轨旁试车指示器继电器ID*/
|
||||
UINT16 wColWaysideTryTrainIndRelayId = 0U;/*轨旁试车指示器继电器ID*/
|
||||
NonRouteDataStruct* pNonRoute = NULL;
|
||||
UINT8 localCiId = 0U; /*本联锁ID*/
|
||||
UINT8 nonRouteBelongCiId = 0U; /*非进路所属联锁ID*/
|
||||
@@ -3591,7 +3619,7 @@ void NonRouteRelayStateProc(void)
|
||||
/*不处理*/
|
||||
}
|
||||
wColWaysideTryTrainIndRelayId = GetWaysideTryTrainIndRelayId(pNonRoute->NonRouteId);
|
||||
if (0 != wColWaysideTryTrainIndRelayId)
|
||||
if (0U != wColWaysideTryTrainIndRelayId)
|
||||
{
|
||||
/*设置轨旁试车指示器继电器吸起*/
|
||||
(void)SetRelayDriveState(wColWaysideTryTrainIndRelayId, RELAY_DRIVE_STATE_UP);
|
||||
@@ -3621,7 +3649,7 @@ void NonRouteRelayStateProc(void)
|
||||
; /*不处理*/
|
||||
}
|
||||
wColWaysideTryTrainIndRelayId = GetWaysideTryTrainIndRelayId(pNonRoute->NonRouteId);
|
||||
if (0 != wColWaysideTryTrainIndRelayId)
|
||||
if (0U != wColWaysideTryTrainIndRelayId)
|
||||
{
|
||||
/*设置轨旁试车指示器继电器落下*/
|
||||
(void)SetRelayDriveState(wColWaysideTryTrainIndRelayId, RELAY_DRIVE_STATE_DOWN);
|
||||
@@ -4965,7 +4993,7 @@ UINT16 GetOverlapUnlockBackTime(const UINT16 overlapId, UINT16 OverlapUnLockCoun
|
||||
|
||||
/*自动解锁倒计时*/
|
||||
deltCount = (INT32)(curCycleNum - startCycNum);
|
||||
if((deltCount >= 0) && (deltCount <= (INT32)OverlapUnLockCount))/*倒计时数值在合理范围内*/
|
||||
if((deltCount >= 0U) && (deltCount <= (INT32)OverlapUnLockCount))/*倒计时数值在合理范围内*/
|
||||
{
|
||||
autotimeData = (UINT16)(((OverlapUnLockCount + startCycNum - curCycleNum)* appCycTime)/1000U) ;
|
||||
}
|
||||
@@ -4979,7 +5007,7 @@ UINT16 GetOverlapUnlockBackTime(const UINT16 overlapId, UINT16 OverlapUnLockCoun
|
||||
{
|
||||
deltCount = (INT32)(curCycleNum - laborUnlockStartCycNum);
|
||||
laborUnlockOverlapTimeCount =GetlabarUnlockOverlapTimeCount();
|
||||
if((deltCount >= 0) && (deltCount <= (INT32)laborUnlockOverlapTimeCount))/*倒计时数值在合理范围内*/
|
||||
if((deltCount >= 0U) && (deltCount <= (INT32)laborUnlockOverlapTimeCount))/*倒计时数值在合理范围内*/
|
||||
{
|
||||
labortimeData = (UINT16)(((laborUnlockOverlapTimeCount + laborUnlockStartCycNum- curCycleNum)* appCycTime)/1000U) ;
|
||||
|
||||
@@ -8254,7 +8282,6 @@ void SetSCApplyIndicator(const UINT16 wIndicatorId)
|
||||
UINT8 chRtuCiType = 0U; /*虚拟联锁类型*/
|
||||
UINT8 chIndicatorRtuId = 0U; /*虚拟联锁ID*/
|
||||
UINT8 chinterfaceType = 0U; /*试车线与车辆段接口方式*/
|
||||
UINT16 wApplyId = 0U; /*申请试车灯ID*/
|
||||
UINT16 wApplyRelayId = 0U; /*申请试车继电器ID*/
|
||||
UINT16 wAllowRelayId = 0U; /*允许试车灯ID*/
|
||||
UINT8 chNonRouteState = 0U; /*非进路状态*/
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
#define INDICATOR_TYPE_DOWNWASH_ALLOW_PASS ((UINT8)0x29) /* 降级模式洗车同意通过指示灯 */
|
||||
#define INDICATOR_TYPE_DOWNWASH_APPLY ((UINT8)0x63) /* 降级模式洗车请求指示灯 */
|
||||
#define INDICATOR_TYPE_DOWNWASH_PASS_APPLY ((UINT8)0x64) /* 降级模式反向通过请求指示灯 */
|
||||
#define INDICATOR_TYPE_XDC_DCGDJ ((UINT8)0x65) /* 蓄电池供电报警指示灯 */
|
||||
|
||||
#define INDICATOR_TYPE_ATS_CONFIRM_RELAY_INTERFACE ((UINT8)0x27) /*相邻联锁继电接口确认状态指示灯*/
|
||||
|
||||
|
||||
@@ -531,7 +531,7 @@ UINT8 ReadConfigureData(void)
|
||||
g_ret = ReadReverseCutConfigData(LocalCiId, gstReverseCutCfgData);
|
||||
if (-1 == g_ret)
|
||||
{
|
||||
rtnVal = 28u;/*读保护区段配置数据失败*/
|
||||
rtnVal = 28u;/*读倒切配置数据失败-OC配置数据表单30*/
|
||||
debug_infor_printf((const)"ReadReverseCutConfigData fail.");
|
||||
}
|
||||
else if (0 < g_ret)
|
||||
@@ -810,6 +810,25 @@ UINT8 ReadConfigureData(void)
|
||||
; /*不处理*/
|
||||
}
|
||||
|
||||
|
||||
if (0u == rtnVal)
|
||||
{
|
||||
g_ret = ReadReverseSwitchConfigData(LocalCiId, &gLocalReverseData);
|
||||
if (-1 == g_ret)
|
||||
{
|
||||
rtnVal = 39u;/*读板卡配置数据失败-OC配置数据表单40、41*/
|
||||
debug_infor_printf((const)"ReadReverseSwitchConfigData fail.");
|
||||
}
|
||||
else
|
||||
{
|
||||
/*无操作*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*不处理*/
|
||||
}
|
||||
|
||||
if (0u == rtnVal)
|
||||
{
|
||||
/*读系统参数配置数据*/
|
||||
@@ -2011,6 +2030,23 @@ INT8 OcConnectConfigDataToDevStruct(SignalConfigDataStruct* pSignalCfgData, Phys
|
||||
pSignalCfgData[j].DxRelayId = pConnectCfgData[i].OcConnetRelayDataBuf[k].RelayId;
|
||||
pSignalCfgData[j].DxDrvRelayId = pConnectCfgData[i].OcConnetRelayDataBuf[k].DrvRelayId;
|
||||
}
|
||||
else if (SIGNAL_DJ_TYPE == pConnectCfgData[i].OcConnetRelayDataBuf[k].RelayType)
|
||||
{
|
||||
pSignalCfgData[j].FirDsRelayId = pConnectCfgData[i].OcConnetRelayDataBuf[k].RelayId;
|
||||
pSignalCfgData[j].wFirstDsDrvRelayId = pConnectCfgData[i].OcConnetRelayDataBuf[k].DrvRelayId;
|
||||
}
|
||||
else if (SIGNAL_MAINJ_TYPE == pConnectCfgData[i].OcConnetRelayDataBuf[k].RelayType)
|
||||
{
|
||||
pSignalCfgData[j].wMainDrvRelayId = pConnectCfgData[i].OcConnetRelayDataBuf[k].DrvRelayId;
|
||||
}
|
||||
else if (SIGNAL_ACKJ_TYPE == pConnectCfgData[i].OcConnetRelayDataBuf[k].RelayType)
|
||||
{
|
||||
pSignalCfgData[j].wAckDrvRelayId = pConnectCfgData[i].OcConnetRelayDataBuf[k].DrvRelayId;
|
||||
}
|
||||
else if (SINNAL_CMAINJ_TYPE == pConnectCfgData[i].OcConnetRelayDataBuf[k].RelayType)
|
||||
{
|
||||
pSignalCfgData[j].wCMainDrvRelayId = pConnectCfgData[i].OcConnetRelayDataBuf[k].DrvRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*不处理*/
|
||||
|
||||
@@ -871,6 +871,17 @@ UINT8 InitialSwitchData(void)
|
||||
SwitchDataStru[switchId].belongOCData[jj].FindPostionCmd = NO_FIND_CMD;
|
||||
SwitchDataStru[switchId].belongOCData[jj].OutMainControlCmdCycNum = 0u;
|
||||
}
|
||||
|
||||
for (jj = 0u; jj < SWITCH_REDUN_COLL_MAX; jj++)
|
||||
{
|
||||
SwitchDataStru[switchId].RedunCollData[jj].dwRedunJudgHunXianStCyc = 0u;
|
||||
SwitchDataStru[switchId].RedunCollData[jj].dwRedunRealHunXianStCyc = 0u;
|
||||
SwitchDataStru[switchId].RedunCollData[jj].cHunXianRecovStt = REDUN_HX_RECOV_ALL;
|
||||
SwitchDataStru[switchId].RedunCollData[jj].dwRedunFaultStCyc = 0u;
|
||||
SwitchDataStru[switchId].RedunCollData[jj].cCollPos = SWITCH_POSITION_INVALID;
|
||||
SwitchDataStru[switchId].RedunCollData[jj].cCombineStt = 0u;
|
||||
SwitchDataStru[switchId].RedunCollData[jj].cCurrHunxianStt = RELAY_HUNXIAN_STATE_NO;
|
||||
}
|
||||
}
|
||||
reVal = CI_SUCCESS;
|
||||
return reVal;
|
||||
@@ -1068,6 +1079,7 @@ UINT8 InitialLogicSectionData(void)
|
||||
UINT16 ii = 0u; /*游标*/
|
||||
UINT16 jj = 0u; /*游标*/
|
||||
UINT8 kk = 0u; /*游标*/
|
||||
UINT8 mm = 0u; /*游标*/
|
||||
UINT16 zcToCiMaskSum = 0u; /*ZC-CI码位总数*/
|
||||
UINT8 reVal = CI_ERROR;
|
||||
UINT8 chTmcSwitch = 0u;
|
||||
@@ -1126,14 +1138,10 @@ UINT8 InitialLogicSectionData(void)
|
||||
LogicSectionDataStruCC[logicSectionId].LogErrlockStartCycNum = 0U;
|
||||
LogicSectionDataStruCC[logicSectionId].chAblRelLogSecUsableFlag = LOGIC_ABLNEAR_USE_FLAG_NO; /*初始化ABL接近逻辑区段可用标志*/
|
||||
LogicSectionDataStruCC[logicSectionId].cRouteLeaveLogFlag = LOGSEC_LEAVE_LOGSEC_REPLY_NO; /*离去区段ABL列车检查不通过*/
|
||||
for (jj = 0U; jj < LOGIC_SECTION_RES_SUM_MAX; jj++)
|
||||
for (mm = 0U; mm < LOGIC_SECTION_RES_SUM_MAX; mm++)
|
||||
{
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[jj].wTrainId = 0U;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[jj].chLogicResUsable = LOGIC_SECTION_RES_UNUSABLE;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[jj].chLogicReturnState = LOGIC_SECTION_TRAIN_RETURN_NO;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[jj].chTrainApplyState = LOGIC_SECTION_TRAIN_APPLY_NO;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[jj].chLogicUnlockState = LOGIC_SECTION_TRAIN_UNLOCK_NO;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[jj].dwRcvUnlockCmdCyc = 0U;
|
||||
/*重置资源信息结构体*/
|
||||
ResetResInfoStruct(logicSectionId, mm);
|
||||
}
|
||||
LogicSectionDataStruCC[logicSectionId].chLogSecLockBelLogRouteSum = 0U;
|
||||
for (jj = 0U; jj < LOGSEC_RELATE_ROUTE_SUM_MAX; jj++)
|
||||
@@ -1518,6 +1526,8 @@ UINT8 InitialPsdData(void)
|
||||
{
|
||||
PsdDataStru[psdId].ibpButtonState = PSD_RELATED_BUTTON_STATE_DEFAULT; /*IBP盘发车按钮状态初始化*/
|
||||
}
|
||||
/*初始化零速状态*/
|
||||
PsdDataStru[psdId].chTrainZeroSpeedState = PSD_TRAIN_ZERO_SPEED_YES; /*零速*/
|
||||
}
|
||||
reVal = CI_SUCCESS;
|
||||
return reVal;
|
||||
@@ -1720,6 +1730,8 @@ UINT8 InitialRouteData(void)
|
||||
RouteDataStru[routeId].chCouplinkSuccessFlag = ROUTE_COUPLINK_RESULT_NOT; /*初始化联挂成功标志为未收到*/
|
||||
RouteDataStru[routeId].chCouplinkErrorFlag = ROUTE_COUPLINK_RESULT_NOT; /*初始化联挂失败标志为未收到*/
|
||||
RouteDataStru[routeId].dwRouteIdleCycNum = 0U; /*进路空闲起始周期号*/
|
||||
RouteDataStru[routeId].chRouteConnReleaseFlag = ROUTE_CONNECT_RELEASE_NO; /*进路联络线解锁标志*/
|
||||
|
||||
|
||||
/*初始化车车结构体成员*/
|
||||
RouteDataStruCC[routeId].RouteId = routeId;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef __INVADESECTION_DEFINE_H_
|
||||
#define __INVADESECTION_DEFINE_H_
|
||||
|
||||
#define INVA_SECT_N_COND_SWIT_SUM_MAX ((UINT16)400) /*侵限区段与相关条件道岔数据条目最大数量*/
|
||||
#define INVA_SECT_N_COND_SWIT_SUM_MAX ((UINT16)800) /*侵限区段与相关条件道岔数据条目最大数量*/
|
||||
|
||||
#define COND_SWITCH_SUM_MAX ((UINT16)16) /*单一侵限区段与相关条件道岔数据条目内,条件道岔最大数量*/
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define LIGHTTESTBUTTON_LIGHT_MAX_NUM ((UINT8)13U)
|
||||
|
||||
/* 试灯表示灯支持最大数 */
|
||||
#define LIGHTTESTBUTTON_LIGHT_SUPPORT_MAX_NUM ((UINT8)39U)
|
||||
#define LIGHTTESTBUTTON_LIGHT_SUPPORT_MAX_NUM ((UINT8)208U)
|
||||
|
||||
/* 试灯按钮可配置最大数量 */
|
||||
#define LIGHTTESTBUTTON_BUTTON_MAX_NUM ((UINT16)70U)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "LogRecord.h"
|
||||
#include "../ParsePack/ParsePackVobcData.h"
|
||||
#include "../ParsePack/ParsePackZcData.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
@@ -497,6 +498,7 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
OCStationIndicDataStru* pNewOCStationIndicData = GetOCStationIndicDataStru();
|
||||
EsbDataStruct* pNewEsbData = GetEsbData();
|
||||
LogicalRouteDataStruct* pNewLogicalRouteDataStru = GetLogicalRouteStr();
|
||||
CbtcCrossStructZC* pCbtcCrossStructZCStru = GetCbtcCrossStructZc();
|
||||
UINT16 wCfpId = 0u;
|
||||
UINT8 chEnIndex = 0u;
|
||||
UINT8 chTrainIndex = 0u;
|
||||
@@ -702,6 +704,7 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newSignalData[deviceId].DoubleGreenDsBreakFlag;/*双绿灯丝断丝标志状态*/
|
||||
outString[outStringLength++] = newSignalData[deviceId].DoubleYellowDsBreakFlag;/*双黄灯丝断丝标志状态*/
|
||||
outString[outStringLength++] = newSignalData[deviceId].MaintainLightState;/*信号机维修点灯状态*/
|
||||
outString[outStringLength++] = pSignalDataCC[deviceId].wCrossTacsTrainId;/*TACS跨压列车ID*/
|
||||
|
||||
if (MAX_SIGNAL_LIGHTUPLINK_NUM < pSignalDataCC[deviceId].wSignalLightUpLinkIdSum)
|
||||
{
|
||||
@@ -986,6 +989,26 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 2u;
|
||||
}
|
||||
|
||||
outString[outStringLength] = newSwitchData[deviceId].cMainOcCollPos;
|
||||
outStringLength += 1u;
|
||||
|
||||
for (jj = 0u; jj < SWITCH_REDUN_COLL_MAX; jj++)
|
||||
{
|
||||
LongToChar(newSwitchData[deviceId].RedunCollData[jj].dwRedunJudgHunXianStCyc, &outString[outStringLength]);
|
||||
outStringLength += 4u;
|
||||
LongToChar(newSwitchData[deviceId].RedunCollData[jj].dwRedunRealHunXianStCyc, &outString[outStringLength]);
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength] = newSwitchData[deviceId].RedunCollData[jj].cHunXianRecovStt;
|
||||
outStringLength += 1u;
|
||||
LongToChar(newSwitchData[deviceId].RedunCollData[jj].dwRedunFaultStCyc, &outString[outStringLength]);
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength] = newSwitchData[deviceId].RedunCollData[jj].cCombineStt;
|
||||
outStringLength += 1u;
|
||||
outString[outStringLength] = newSwitchData[deviceId].RedunCollData[jj].cCollPos;
|
||||
outStringLength += 1u;
|
||||
outString[outStringLength] = newSwitchData[deviceId].RedunCollData[jj].cCurrHunxianStt;
|
||||
outStringLength += 1u;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1204,6 +1227,7 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newRouteData[deviceId].chRoutCouplinkFlag; /*进路联挂标志*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].chCouplinkSuccessFlag; /*进路联挂成功*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].chCouplinkErrorFlag; /*进路联挂失败*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].chRouteConnReleaseFlag; /*进路联络线解锁标志*/
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1519,9 +1543,12 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].TrainEmergencyStopState;/*列车紧急停车状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].HeadWashAllowState;/*允许车头清洗状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].TailWashAllowState;/*允许车尾清洗状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chCoupingWashAllowState;/*允许联挂端清洗状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].WashTrainRequestDrvState;/*洗车请求驱动状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].TrainHeadStopSteadyDrvState;/*车头停稳驱动状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].TrainTailStopSteadyDrvState;/*车尾停稳驱动状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chCoupingStopSteadyDrvState; /*联挂端停稳驱动状态*/
|
||||
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].TrainOutWashTrainPortAllowState;/*允许出洗车库状态*/
|
||||
ShortToChar(newWashMachineData[deviceId].CurVobcId, &outString[outStringLength]);/*当前洗车的VOBC ID*/
|
||||
outStringLength += 2u;
|
||||
@@ -1701,6 +1728,8 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newPsdData[deviceId].ibpButtonState;/*IBP盘发车按钮状态*/
|
||||
LongToChar(newPsdData[deviceId].IBPPressCycNum, &outString[outStringLength]); /*IBP盘发车按钮按下周期*/
|
||||
outStringLength += 4U;
|
||||
outString[outStringLength] = newPsdData[deviceId].chTrainZeroSpeedState; /*非零速状态*/
|
||||
outStringLength++;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2445,6 +2474,17 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
|
||||
outString[outStringLength++] = pNewTrainInfoData[deviceId].chtrainControlMode;/*当前控车模式*/
|
||||
outString[outStringLength++] = pNewTrainInfoData[deviceId].chTrainPostionMode; /*列车位置模式,0无位置,1使用IVOC位置,2使用VOBC位置*/
|
||||
ShortToChar(pNewTrainInfoData[deviceId].wMinSafeHeadLink, &outString[outStringLength]);/*延时小前所处link*/
|
||||
outStringLength += 2u;
|
||||
LongToChar(pNewTrainInfoData[deviceId].dwMinSafeHeadOffset, &outString[outStringLength]);/*延时小前所处link偏移量*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = pNewTrainInfoData[deviceId].chMinSafeHeadDir;/* 延时小前方向 */
|
||||
|
||||
outString[outStringLength] = pNewTrainInfoData[deviceId].chPbtacsTransState; /*RC与PBTACS列车通信状态:0x55-通信正常,0xAA-通信中断,0xFF-未知*/
|
||||
outStringLength++;
|
||||
|
||||
LongToChar(pNewTrainInfoData[deviceId].dwPbtacsTransBadCyc, &outString[outStringLength]); /*RC与PBTACS列车通信中断周期*/
|
||||
outStringLength += 4U;
|
||||
}
|
||||
|
||||
|
||||
@@ -2913,10 +2953,46 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
else
|
||||
{
|
||||
#ifdef PLATFORM_2OO2
|
||||
debug_infor_printf((const)"\nNonAutoReturnData:%d", (UINT16)sizeof(NonAutoReturnDataStruct), outStringLength);
|
||||
debug_infor_printf((const)"\nNonAutoReturnData:%d, length:%d", (UINT16)sizeof(NonAutoReturnDataStruct), outStringLength);
|
||||
|
||||
debug_out_array(0xAA, outString, outStringLength);
|
||||
|
||||
#endif
|
||||
|
||||
/*清空打印数据*/
|
||||
CleanString(outString);
|
||||
outStringLength = 0u;
|
||||
}
|
||||
|
||||
/*************************************打印CBTC跨压数据********************************************/
|
||||
/*打印CBTC跨压数据*/
|
||||
deviceNum = GetCbtcCrossNumZc();/* 获取边界点数量 */
|
||||
|
||||
for (ii = 0U; ii < deviceNum; ii++)
|
||||
{
|
||||
if ((CI_SUCCESS != returnValue) || (NULL == pCbtcCrossStructZCStru))
|
||||
{
|
||||
returnValue = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
ShortToChar(pCbtcCrossStructZCStru[ii].wSignalId, &outString[outStringLength]);/*CBTC跨压信号机ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength] = pCbtcCrossStructZCStru[ii].wTrainId; /*CBTC跨压列车ID*/
|
||||
outStringLength++;
|
||||
}
|
||||
|
||||
if (0u == outStringLength)
|
||||
{
|
||||
/*nothing*/
|
||||
debug_infor_printf((const)"\nCbtcCrossData:0u");
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef PLATFORM_2OO2
|
||||
debug_infor_printf((const)"\nCbtcCrossData:%d:", outStringLength);
|
||||
|
||||
debug_out_array(0xAA, outString, outStringLength);
|
||||
#endif
|
||||
|
||||
/*清空打印数据*/
|
||||
|
||||
@@ -1875,8 +1875,9 @@ void SetRouteOvlpOtherCiShrFlg(const UINT16 wRouteId, const UINT16 wOverlapId,co
|
||||
void ClearSomeFlagDependRouteState(const UINT16 routeId)
|
||||
{
|
||||
UINT8 routeState = GetRouteState(routeId);
|
||||
UINT16 startSignalId = 0u;
|
||||
UINT16 EnginVehicCroCloBelongRoute = 0u;
|
||||
UINT16 startSignalId = 0U;
|
||||
UINT16 EnginVehicCroCloBelongRoute = 0U;
|
||||
UINT8 chZrenjieFlag = 0U;
|
||||
|
||||
/*清理工程车跨压关信号所属进路,清理工程车跨压状态*/
|
||||
if ((ROUTE_STATE_YUXIAN_LOCK != routeState)
|
||||
@@ -1925,6 +1926,17 @@ void ClearSomeFlagDependRouteState(const UINT16 routeId)
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
/*无总人解标志且不处于延时解锁状态,清除联络线解锁标志*/
|
||||
chZrenjieFlag = GetRouteZongRenJieFlag(routeId);
|
||||
if ((ROUTE_ZONGRENJIE_SET_NO == chZrenjieFlag) && (ROUTE_STATE_DELAY_UNLOCK != routeState))
|
||||
{
|
||||
SetRouteConnectReleaseFlag(routeId, ROUTE_CONNECT_RELEASE_NO); /*清除联络线解锁标志*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1161,6 +1161,130 @@ void SetCouplinkRouteLogicManage(const UINT16 wRouteId);
|
||||
* 返回值 :
|
||||
*/
|
||||
void lockSwitchLogicManage(void);
|
||||
/*
|
||||
* 功能描述: 计轴区段跳跃锁闭状态机管理
|
||||
* 参数说明: const UINT16 axisSecId, 计轴区段ID
|
||||
* 返回值 : void
|
||||
* add by mpt 20260407
|
||||
*/
|
||||
void AxisJumpLockStateManage(const UINT16 axisSectionId);
|
||||
|
||||
/*
|
||||
* 功能描述: 试车状态管理逻辑处理中获取本联锁是否具备试车功能(拆分复杂度使用)
|
||||
*参数说明:无
|
||||
* 返回值 :CI_SUCCESS 是试车线(含合设) CI_ERROR
|
||||
*/
|
||||
UINT8 GetLocalCiIsScx(void);
|
||||
/*
|
||||
* 功能描述: 联络线进路解锁管理
|
||||
* 参数说明: const UINT16 wRouteId 进路ID
|
||||
* 返回值 : 无
|
||||
* Create:lyj 20260603
|
||||
*/
|
||||
void ConnectRouteReleaseManage(const UINT16 wRouteId);
|
||||
|
||||
/*
|
||||
* 功能描述: 新增一二次命令管理
|
||||
* 参数说明: 无
|
||||
* 返回值 : void
|
||||
* BY fan 20260602
|
||||
*/
|
||||
void AtsFollowUpCmdProcess(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 道岔单解命令管理
|
||||
* 参数说明: 无
|
||||
* 返回值 : void
|
||||
* BY fan 20260602
|
||||
*/
|
||||
void FollowUpDansuoCanclMsgProc(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 道岔单解命令状态检查,返回成功或检查失败原因
|
||||
* 参数说明:
|
||||
UINT16 wDevId命令中设备
|
||||
UINT16 wMsgType, 命令类型
|
||||
* 返回值 :
|
||||
1 成功
|
||||
2:道岔未设置单锁
|
||||
3:道岔不属于本集中区
|
||||
5:已办理非进路调车
|
||||
* BY fan 20260603
|
||||
*/
|
||||
UINT8 FollowUpDansuoCancleCheck(UINT16 wDevId, UINT16 wMsgType);
|
||||
|
||||
/*
|
||||
* 功能描述: 道岔解封命令管理
|
||||
* 参数说明: 无
|
||||
* 返回值 : void
|
||||
* BY fan 20260602
|
||||
*/
|
||||
void FollowUpSwitchUnFlockMsgProc(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 道岔解封命令状态检查,返回成功或检查失败原因,二次操作时执行命令
|
||||
* 参数说明:
|
||||
UINT16 wDevId命令中设备
|
||||
UINT16 wMsgType, 命令类型
|
||||
* 返回值 :
|
||||
1 成功
|
||||
2:道岔未设置封锁
|
||||
3:道岔不属于本集中区
|
||||
5:已办理非进路调车
|
||||
* BY fan 20260603
|
||||
*/
|
||||
UINT8 FollowUpSwitchUnFlockCheck(UINT16 wDevId, UINT16 wMsgType);
|
||||
|
||||
/*
|
||||
* 功能描述: 区段解封命令管理
|
||||
* 参数说明: 无
|
||||
* 返回值 : void
|
||||
* BY fan 20260604
|
||||
*/
|
||||
void FollowUpSecUnFlockMsgProc(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 区段解封命令状态检查,返回成功或检查失败原因,二次操作时执行命令
|
||||
* 参数说明:
|
||||
UINT16 wDevId命令中设备
|
||||
UINT16 wMsgType, 命令类型
|
||||
* 返回值 :
|
||||
1 成功
|
||||
2:未设置人工区段封锁
|
||||
3:不属于本集中区
|
||||
* BY fan 20260604
|
||||
*/
|
||||
UINT8 FollowUpSecUnFlockCheck(UINT16 wDevId, UINT16 wMsgType);
|
||||
|
||||
/*
|
||||
* 功能描述: 信号机解封命令管理
|
||||
* 参数说明: 无
|
||||
* 返回值 : void
|
||||
* BY fan 20260604
|
||||
*/
|
||||
void FollowUpSignalUnFlockMsgProc(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 信号机解封命令状态检查,返回成功或检查失败原因,二次操作时执行命令
|
||||
* 参数说明:
|
||||
UINT16 wDevId命令中设备
|
||||
UINT16 wMsgType, 命令类型
|
||||
* 返回值 :
|
||||
1 成功
|
||||
2:未设置信号机封锁
|
||||
3:不属于本集中区
|
||||
5:所属非进路已办理
|
||||
* BY fan 20260604
|
||||
*/
|
||||
UINT8 FollowUpSignalUnFlockCheck(UINT16 wDevId, UINT16 wMsgType);
|
||||
|
||||
/*
|
||||
* 功能描述:信号已开放进路的共享资源处理
|
||||
* 参数说明:无
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2026.06.09
|
||||
*/
|
||||
void OpenedRouteShareResPro(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -3702,6 +3702,7 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
else
|
||||
{
|
||||
/* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
/*保护区段 内所有道岔【未封锁】*/
|
||||
|
||||
@@ -6538,75 +6538,94 @@ UINT16 GetRouteBingZhiSignalId(const UINT16 routeId)
|
||||
*/
|
||||
UINT16 GetRouteChaZhiSignalId(const UINT16 routeId)
|
||||
{
|
||||
UINT16 startSigId = 0u; /*始端信号机ID*/
|
||||
UINT16 signalSum = 0u; /*信号机总数*/
|
||||
UINT16 signalId = 0u; /*信号机ID*/
|
||||
UINT16 routeSecSum = 0u; /*进路区段总数*/
|
||||
RoutePhysicalSectionStruct *pRoutePhySecStru = NULL; /*进路区段数据*/
|
||||
UINT16 returnOutSecId = 0u; /*折返信号机外方区段ID*/
|
||||
UINT16 returnInSecId = 0u; /*折返信号机内方区段ID*/
|
||||
UINT16 lockBelongRouteId = 0u; /*锁闭所属进路ID*/
|
||||
UINT16 outSecId = 0u; /*外方区段ID*/
|
||||
UINT16 ii = 0u;
|
||||
UINT16 tmpSigId = 0u;
|
||||
|
||||
UINT16 startSigId = 0U; /*始端信号机ID*/
|
||||
UINT16 signalSum = 0U; /*信号机总数*/
|
||||
UINT16 signalId = 0U; /*信号机ID*/
|
||||
UINT16 routeSecSum = 0U; /*进路区段总数*/
|
||||
RoutePhysicalSectionStruct* pRoutePhySecStru = NULL; /*进路区段数据*/
|
||||
UINT16 returnOutSecId = 0U; /*折返信号机外方区段ID*/
|
||||
UINT16 returnInSecId = 0U; /*折返信号机内方区段ID*/
|
||||
UINT16 lockBelongRouteId = 0U; /*锁闭所属进路ID*/
|
||||
UINT16 outSecId = 0U; /*外方区段ID*/
|
||||
UINT16 ii = 0U;
|
||||
UINT16 tmpSigId = 0U;
|
||||
UINT8 chPhySecType = 0U;
|
||||
UINT16 wTempPhySecId = 0U;
|
||||
UINT16 wReturnSignal = 0U;
|
||||
UINT16 wTempSigId = 0U;
|
||||
UINT8 chPhyLockState = 0U;
|
||||
UINT16 wLockRouteId = 0U;
|
||||
UINT16 wTempSigOutPhyId = 0U;
|
||||
UINT16 wTempSigInPhyId = 0U;
|
||||
|
||||
startSigId = GetRouteStartSignalId(routeId); /*获取进路始端信号机ID*/
|
||||
signalSum = GetSignalCurSum(); /*获取信号机总数*/
|
||||
|
||||
if (PHYSICAL_SEC_TYPE_NOSWITCH == GetPhySecType(GetSignalOutFirstPhySecId(startSigId)))
|
||||
outSecId = GetSignalOutFirstPhySecId(startSigId);
|
||||
chPhySecType = GetPhySecType(outSecId);
|
||||
if (PHYSICAL_SEC_TYPE_NOSWITCH == chPhySecType)
|
||||
{ /*无岔区段*/
|
||||
|
||||
for (ii = 0u; ii < signalSum; ii++)
|
||||
{
|
||||
signalId = GetSignalId(ii); /*获取信号机ID*/
|
||||
wTempPhySecId = GetSignalOutFirstPhySecId(signalId);
|
||||
|
||||
if ((GetSignalOutFirstPhySecId(startSigId) == GetSignalOutFirstPhySecId(signalId)) &&
|
||||
(startSigId != signalId))
|
||||
if ((outSecId == wTempPhySecId) && (startSigId != signalId))
|
||||
{
|
||||
return signalId;
|
||||
wReturnSignal = signalId;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ /*有岔*/
|
||||
|
||||
outSecId = GetSignalOutFirstPhySecId(startSigId); /*进路始端信号机外方区段ID*/
|
||||
lockBelongRouteId = GetPhySecRLockBelongRouteId(outSecId); /*区段锁闭所属进路ID*/
|
||||
|
||||
routeSecSum = GetRoutePhysicalSectionSum(lockBelongRouteId); /*获取进路区段总数*/
|
||||
pRoutePhySecStru = GetRouteSectionData(lockBelongRouteId); /*获取进路区段数据*/
|
||||
|
||||
if ((0u == routeSecSum) || (NULL == pRoutePhySecStru))
|
||||
if ((0U == routeSecSum) || (NULL == pRoutePhySecStru))
|
||||
{
|
||||
return 0u;
|
||||
/*不处理*/
|
||||
}
|
||||
if (routeSecSum == 1u)
|
||||
else
|
||||
{
|
||||
/*if ((PHYSICAL_SECTION_LOCK_NORMAL == GetPhySecLockState(pRoutePhySecStru[0].PhysicalSectionId)) &&
|
||||
(lockBelongRouteId == GetPhySecRLockBelongRouteId(pRoutePhySecStru[0].PhysicalSectionId)))*/
|
||||
if (1U == routeSecSum)
|
||||
{
|
||||
returnOutSecId = pRoutePhySecStru[0].PhysicalSectionId;/*折返信号机外方区段ID*/
|
||||
returnOutSecId = pRoutePhySecStru[0U].PhysicalSectionId;/*折返信号机外方区段ID*/
|
||||
|
||||
tmpSigId = GetRouteStartSignalId(lockBelongRouteId);/*折返信号机内方区段ID*/
|
||||
|
||||
returnInSecId = GetSignalOutFirstPhySecId(tmpSigId);
|
||||
}
|
||||
}
|
||||
else if (routeSecSum > 1u)
|
||||
else if (1U < routeSecSum)
|
||||
{
|
||||
for (ii = 0u; ii < routeSecSum; ii++)
|
||||
for (ii = 0U; ii < routeSecSum; ii++)
|
||||
{
|
||||
|
||||
if ((PHYSICAL_SECTION_LOCK_NORMAL == GetPhySecLockState(pRoutePhySecStru[ii].PhysicalSectionId)) &&
|
||||
(lockBelongRouteId == GetPhySecRLockBelongRouteId(pRoutePhySecStru[ii].PhysicalSectionId)))
|
||||
chPhyLockState = GetPhySecLockState(pRoutePhySecStru[ii].PhysicalSectionId);
|
||||
wLockRouteId = GetPhySecRLockBelongRouteId(pRoutePhySecStru[ii].PhysicalSectionId);
|
||||
if ((PHYSICAL_SECTION_LOCK_NORMAL == chPhyLockState) &&
|
||||
(lockBelongRouteId == wLockRouteId))
|
||||
{ /*本进路第一个锁闭的区段*/
|
||||
|
||||
returnOutSecId = pRoutePhySecStru[ii].PhysicalSectionId; /*折返信号机外方区段ID*/
|
||||
|
||||
if (ii > 0u)
|
||||
if (0U < ii)
|
||||
{
|
||||
returnInSecId = pRoutePhySecStru[ii-1U].PhysicalSectionId; /*折返信号机内方区段ID*/
|
||||
returnInSecId = pRoutePhySecStru[ii - 1U].PhysicalSectionId; /*折返信号机内方区段ID*/
|
||||
}
|
||||
else
|
||||
{
|
||||
wTempSigId = GetRouteStartSignalId(lockBelongRouteId);/*获取锁闭进路的外方第一区段*/
|
||||
returnInSecId = GetSignalOutFirstPhySecId(wTempSigId);
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -6617,24 +6636,36 @@ UINT16 GetRouteChaZhiSignalId(const UINT16 routeId)
|
||||
{
|
||||
/*无操作*/
|
||||
}
|
||||
if ((0u == returnOutSecId) || (0u == returnInSecId))
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
|
||||
if ((0U == returnOutSecId) || (0U == returnInSecId))
|
||||
{
|
||||
/*无操作*/
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ii = 0u; ii < signalSum; ii++)
|
||||
{
|
||||
signalId = GetSignalId(ii); /*获取信号机ID*/
|
||||
|
||||
if ((returnOutSecId == GetSignalOutFirstPhySecId(signalId)) &&
|
||||
(returnInSecId == GetSignalInFirstPhySecId(signalId, routeId)))
|
||||
wTempSigOutPhyId = GetSignalOutFirstPhySecId(signalId);
|
||||
wTempSigInPhyId = GetSignalInFirstPhySecId(signalId, routeId);
|
||||
if ((returnOutSecId == wTempSigOutPhyId) &&
|
||||
(returnInSecId == wTempSigInPhyId))
|
||||
{
|
||||
return signalId;
|
||||
wReturnSignal = signalId;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*无操作*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0u;
|
||||
|
||||
}
|
||||
|
||||
return wReturnSignal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7159,7 +7159,7 @@ UINT8 RouteExceptLastSecOccuClrCheck(UINT16 const routeId)
|
||||
UINT16 cancleZhaoChaRelayId = 0u; /*取消照查继电器ID*/
|
||||
UINT8 relayState = 0u; /*继电器采集状态*/
|
||||
UINT8 sendLevel = ESEND_LEVEL_ATS; /*发送ATS*/
|
||||
|
||||
UINT8 chRConnectReleaseFlag = 0U;
|
||||
/* 区段占用检查 */
|
||||
if (0u == checkSum)
|
||||
{
|
||||
@@ -7210,6 +7210,14 @@ UINT8 RouteExceptLastSecOccuClrCheck(UINT16 const routeId)
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
chRConnectReleaseFlag = GetRouteConnectReleaseFlag(routeId);
|
||||
if (ROUTE_CONNECT_RELEASE_YES == chRConnectReleaseFlag)
|
||||
{
|
||||
/* 通过检查 */
|
||||
result = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_RELAY, devId, ETYPE_CANCLE_ZHAOCHA, devState, sendLevel);
|
||||
@@ -7218,6 +7226,8 @@ UINT8 RouteExceptLastSecOccuClrCheck(UINT16 const routeId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
@@ -7802,37 +7812,61 @@ UINT8 OtherCiDevStatusCheck(UINT16 const routeId,const RouteOtherCheckStruct *pO
|
||||
*/
|
||||
static UINT8 CheckRelationSignalOnSameOpen(UINT16 const routeId,UINT16 const relationSignalId,UINT8 const devStatus)
|
||||
{
|
||||
UINT8 routeState = 0u,routeLeadProperty = 0u;
|
||||
UINT8 routeState = 0U;
|
||||
UINT8 routeLeadProperty = 0U;
|
||||
UINT8 ret = CI_SUCCESS;
|
||||
UINT8 routeType = 0u; /*进路类型*/
|
||||
UINT8 relationSignalOpenColor = GetSignalCurColor(relationSignalId);
|
||||
UINT8 cRouteStartSigOpenColor = 0U; /*进路始端信号机开放颜色*/
|
||||
|
||||
UINT8 cRouteToLeadFlag = 0U;
|
||||
UINT8 chOpenCloseState = 0U;
|
||||
routeState = GetRouteState(routeId);
|
||||
routeLeadProperty = GetRouteLeadProperty(routeId);/*获取进路引导属性*/
|
||||
routeType = GetRouteType(routeId); /*获取进路类型*/
|
||||
|
||||
if ((routeState != 0u) && (relationSignalOpenColor != 0u))
|
||||
|
||||
if ((routeState != 0U) && (relationSignalOpenColor != 0U))
|
||||
{
|
||||
/* 如果信号开放,则检查本进路将要开放的信号是否比当前的开放的级别要高 */
|
||||
if (SIGNAL_OPEN == GetSignalOpenCloseState(relationSignalOpenColor))
|
||||
chOpenCloseState = GetSignalOpenCloseState(relationSignalOpenColor);
|
||||
if (SIGNAL_OPEN == chOpenCloseState)
|
||||
{
|
||||
switch (relationSignalOpenColor)
|
||||
{
|
||||
case SIGNAL_SHOWCOLOUR_REDYELLOW:
|
||||
/* 红黄灯,即信号开放必须是引导信号 */
|
||||
|
||||
if (((ROUTE_LEAD_PROPERTY_YES == routeLeadProperty) || (ROUTE_LEAD_PROPERTY_CBTC_YES == routeLeadProperty))
|
||||
&& ((ROUTE_STATE_LEAD_LOCK == routeState)
|
||||
if ((ROUTE_LEAD_PROPERTY_YES == routeLeadProperty) || (ROUTE_LEAD_PROPERTY_CBTC_YES == routeLeadProperty))
|
||||
{
|
||||
/* 进路为可引导*/
|
||||
if ((ROUTE_STATE_LEAD_LOCK == routeState)
|
||||
|| (ROUTE_STATE_LEAD_LOCKERR == routeState)
|
||||
|| (ROUTE_STATE_LEAD_OPEN == routeState)))
|
||||
{/* 进路为可引导,且进路状态为<引导锁闭>或<引导锁闭异常>或<引导开放> ,即进路将引导开放,关联 */
|
||||
|| (ROUTE_STATE_LEAD_OPEN == routeState))
|
||||
{
|
||||
/* 进路状态为<引导锁闭>或<引导锁闭异常>或<引导开放> */
|
||||
ret = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
cRouteToLeadFlag = GetRouteToLeadFlag(routeId); /*获取引导进路转换标志*/
|
||||
if ((ROUTE_TO_LEAD_FLAG_YES == cRouteToLeadFlag) &&
|
||||
((ROUTE_STATE_YUXIAN_LOCK == routeState) || (ROUTE_STATE_NEAR_LOCK == routeState)
|
||||
|| (ROUTE_STATE_FIRST_LOCKERR == routeState) || (ROUTE_STATE_NEAR_LOCKERR == routeState)))
|
||||
{
|
||||
/*列车进路转引导,转换标志有效,列车进路接近锁闭或者预先锁闭或初锁异常或接近锁闭异常可以转引导*/
|
||||
ret = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = CI_ERROR;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = CI_ERROR;
|
||||
}
|
||||
|
||||
break;
|
||||
case SIGNAL_SHOWCOLOUR_WHITE:
|
||||
if (ROUTE_TYPE_DIAOCHE == routeType)
|
||||
@@ -9256,8 +9290,6 @@ UINT8 KeepRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel)
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{/*进路保持开放防护道岔检查*/
|
||||
if(CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
if (FUNC_SWITCH_ON == cSndSideProFuncSwitch)
|
||||
{
|
||||
/*支持二级侧防时,不检查防护道岔位置和可动性*/
|
||||
@@ -9307,12 +9339,6 @@ UINT8 KeepRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
@@ -9466,8 +9492,6 @@ UINT8 KeepLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{/*进路保持开放防护道岔检查*/
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/*进路关联防护道岔位置正确*/
|
||||
devId = 0U;
|
||||
devState = 0U;
|
||||
@@ -9510,12 +9534,6 @@ UINT8 KeepLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
@@ -9842,8 +9860,6 @@ UINT8 LockBlocRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel)
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/*进路内所有道岔位置正确或位置不正确但可动作*/
|
||||
devId = 0u;
|
||||
@@ -9862,16 +9878,8 @@ UINT8 LockBlocRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel)
|
||||
reResult = checkResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
if(CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/*
|
||||
进路内所有道岔位置正确
|
||||
@@ -9880,7 +9888,7 @@ UINT8 LockBlocRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel)
|
||||
*/
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = RouteAllSwitchPosCheck(routeId,&devId, &devState);
|
||||
checkResult = RouteAllSwitchPosCheck(routeId, &devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -9894,12 +9902,6 @@ UINT8 LockBlocRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*如果是进路内道岔等待相邻联锁反馈道岔检查状态,先不检查道岔是否全在位置,继续等待*/
|
||||
}
|
||||
@@ -10195,8 +10197,6 @@ UINT8 LockLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/*进路内所有道岔位置正确或位置不正确但可动作*/
|
||||
devId = 0U;
|
||||
@@ -10215,16 +10215,8 @@ UINT8 LockLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel
|
||||
reResult = checkResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/*
|
||||
进路内所有道岔位置正确
|
||||
@@ -10247,12 +10239,6 @@ UINT8 LockLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*如果是进路内道岔等待相邻联锁反馈道岔检查状态,先不检查道岔是否全在位置,继续等待*/
|
||||
}
|
||||
@@ -10892,7 +10878,7 @@ UINT8 CheckRouteZongRenJieFeasibility(const UINT16 routeId)
|
||||
UINT8 sectionSum = 0u;/*进路包含的物理区段数量*/ /*故障发送级别*/
|
||||
UINT8 sendLevel = ESEND_LEVEL_ATS; /*发送ATS*/
|
||||
UINT16 secIdx = 0u;/*进路内包含的物理区段遍历索引变量*/
|
||||
|
||||
UINT8 chRouteConnectFlag = 0U;
|
||||
/*联锁条件检查*/
|
||||
/* 进路内所有区段锁闭状态【正常锁闭】*/
|
||||
devId = 0u;
|
||||
@@ -11014,6 +11000,14 @@ UINT8 CheckRouteZongRenJieFeasibility(const UINT16 routeId)
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
chRouteConnectFlag = GetRouteConnectReleaseFlag(routeId);
|
||||
if (ROUTE_CONNECT_RELEASE_YES == chRouteConnectFlag)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_RELAY, devId, ETYPE_CANCLE_ZHAOCHA, devState, sendLevel);
|
||||
@@ -11022,6 +11016,8 @@ UINT8 CheckRouteZongRenJieFeasibility(const UINT16 routeId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
@@ -12752,29 +12748,8 @@ UINT8 OpenBlocRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel)
|
||||
}
|
||||
}
|
||||
|
||||
if(CI_SUCCESS == reResult)
|
||||
{
|
||||
if(CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{/*进路开放防护道岔检查*/
|
||||
if(CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
if (FUNC_SWITCH_ON == cSndSideProFuncSwitch)
|
||||
{
|
||||
/*支持二级侧防时,不检查防护道岔位置和可动性*/
|
||||
@@ -12824,12 +12799,6 @@ UINT8 OpenBlocRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
@@ -12956,27 +12925,6 @@ UINT8 OpenLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{/*进路开放防护道岔检查*/
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/*进路关联防护道岔位置正确*/
|
||||
devId = 0U;
|
||||
@@ -13020,12 +12968,6 @@ UINT8 OpenLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
@@ -13183,7 +13125,7 @@ UINT8 OpenBlocRouteOverlapCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel)
|
||||
else
|
||||
{
|
||||
/* zt 删除单轨相关代码 2022-02-15 */
|
||||
/*其他线路情况不处理*/
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
#if 0 /*进路办理完成并开灯,此时办理引导总锁,进路应保持原来状态不变*/
|
||||
@@ -15655,7 +15597,7 @@ UINT8 JumpLockSwitchCheck(const UINT16 axisSecId,UINT8 funcId,UINT8 sendLevel)
|
||||
if (CI_ERROR == reVal)
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(funcId,CI_DEVICE_TYPE_SWITCH,devId,ETYPE_SWT_FLOCK_STATE,devState,sendLevel);
|
||||
SetErrorData(funcId,CI_DEVICE_TYPE_SWITCH,devId, ETYPE_SWT_POSTION_STATE,devState,sendLevel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15668,7 +15610,7 @@ UINT8 JumpLockSwitchCheck(const UINT16 axisSecId,UINT8 funcId,UINT8 sendLevel)
|
||||
if (CI_ERROR == reVal)
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(funcId, CI_DEVICE_TYPE_SWITCH, devId, ETYPE_SWT_FLOCK_STATE, devState, sendLevel);
|
||||
SetErrorData(funcId, CI_DEVICE_TYPE_SWITCH, devId, ETYPE_SWT_POSTION_STATE, devState, sendLevel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15941,7 +15883,7 @@ UINT8 AxisSecPorteSwitchPosMoveCheck(UINT16 const axisSecId, UINT16* pDevId, UIN
|
||||
/* 计轴区段道岔 */
|
||||
|
||||
/* 局部变量定义初始化 */
|
||||
UINT16 i = 0u; /* 循环变量 */
|
||||
UINT8 i = 0u; /* 循环变量 */
|
||||
UINT16 devId = 0u;
|
||||
UINT8 devState = 0u;
|
||||
UINT8 switchPos = 0u;
|
||||
@@ -15982,6 +15924,8 @@ UINT8 AxisSecPorteSwitchPosMoveCheck(UINT16 const axisSecId, UINT16* pDevId, UIN
|
||||
}
|
||||
else
|
||||
{
|
||||
*pDevId = devId;
|
||||
*pDevState = devState;
|
||||
reVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -16044,7 +15988,7 @@ UINT8 AxisSecAllSwitchPosCheck(UINT16 const axisSecId,UINT16 *pDevId,UINT8 *pDev
|
||||
AxisSwitchStruct* const dataIdBuf = GetAxisSwitchIdStru(axisSecId);
|
||||
|
||||
/* 局部变量定义初始化 */
|
||||
UINT16 i = 0u; /* 循环变量 */
|
||||
UINT8 i = 0u; /* 循环变量 */
|
||||
UINT16 devId = 0u;
|
||||
UINT8 devState = 0u;
|
||||
UINT8 reVal = CI_ERROR;
|
||||
@@ -16098,7 +16042,7 @@ UINT8 AxisSecAllProtSwitchPosCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8
|
||||
AxisSwitchStruct* dataIdBuf =NULL;
|
||||
|
||||
/* 局部变量定义初始化 */
|
||||
UINT16 i = 0u; /* 循环变量 */
|
||||
UINT8 i = 0u; /* 循环变量 */
|
||||
UINT16 devId = 0u;
|
||||
UINT8 devState = 0u;
|
||||
UINT8 reVal = CI_ERROR;
|
||||
@@ -16119,10 +16063,11 @@ UINT8 AxisSecAllProtSwitchPosCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8
|
||||
for (i = 0u; i < checkSum; i++)
|
||||
{
|
||||
devId = dataIdBuf[i].SwitchId;
|
||||
devState = GetSwitchCurPosition(devId);
|
||||
if (devState == dataIdBuf[i].SwitchPosition)
|
||||
devState = GetSwitchCurPosition(devId); /*获取道岔当前位置*/
|
||||
reVal = checkSwtLastValDrvPosStayorNot(devId, devState); /*检查道岔上一次驱动是否还在有效期*/
|
||||
if ((devState == dataIdBuf[i].SwitchPosition)&&(CI_SUCCESS == reVal))
|
||||
{
|
||||
/*道岔位置正确*/
|
||||
/*道岔位置正确且无驱动*/
|
||||
|
||||
}
|
||||
else
|
||||
@@ -17122,7 +17067,6 @@ UINT8 LogicSecRltvPrtctSwFLockCheck(UINT16 const wLgcId, UINT16 *pDevId, UINT8 *
|
||||
UINT16 wProtectSwSum = 0U;
|
||||
UINT16* pProtectSwIdBuf = NULL;
|
||||
LogsecSwitchStruct *pstLogicSecSwitchBuf = NULL;
|
||||
|
||||
chCheckSum = GetLogicSecSwitchSum(wLgcId);
|
||||
pstLogicSecSwitchBuf = GetLogicSecSwitchIdStru(wLgcId);
|
||||
if ((NULL != pDevId) && (NULL != pDevState) && (NULL != pYLockAlarmFlag) && (NULL != pstLogicSecSwitchBuf)
|
||||
@@ -17244,12 +17188,17 @@ UINT8 LogicSecRltvPrtctSwPosCheck(UINT16 const wLgcId, UINT16 *pDevId, UINT8 *pD
|
||||
chDevId = pstLogicSecSwitchBuf[ii].SwitchId;
|
||||
chDevState = GetSwitchCurPosition(chDevId);/*获取道岔当前位置*/
|
||||
chProSwState = pstLogicSecSwitchBuf[ii].SwitchPosition;
|
||||
chRetVal = checkSwtLastValDrvPosStayorNot(chDevId, chDevState); /*检查道岔上一次驱动是否还在有效期*/
|
||||
/*当前防护道岔不在逻辑区段包含道岔内*/
|
||||
/*道岔位置一致*/
|
||||
if ((chProSwState == chDevState)
|
||||
&&(CI_SUCCESS == chRetVal)
|
||||
&& ((SWITCH_POSITION_DINGWEI == chProSwState)
|
||||
|| (SWITCH_POSITION_FANWEI == chProSwState)))
|
||||
{
|
||||
/*位置检查通过,继续检查*/
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -17283,15 +17232,10 @@ UINT8 LogicSecRltvPrtctSwLockCheck(UINT16 const wLgcId, UINT16 *pDevId, UINT8 *p
|
||||
/* 局部变量定义初始化 */
|
||||
UINT8 chRetVal = CI_ERROR;
|
||||
UINT8 ii = 0U;
|
||||
UINT16 jj = 0U;
|
||||
UINT8 kk = 0U;
|
||||
UINT16 chDevId = 0U;
|
||||
UINT8 chDevState = 0U;
|
||||
UINT16 wLgcRelativeAxleSecId = 0U;
|
||||
|
||||
UINT8 chProtectSwitchSum = 0U;
|
||||
LogsecSwitchStruct *chProtectSwitchIdBuf = NULL;
|
||||
|
||||
chProtectSwitchSum = GetLgcRelateProSwSum(wLgcId);/*获取指定ID逻辑区段关联防护道岔数目*/
|
||||
chProtectSwitchIdBuf = GetLgcRelateProSwStru(wLgcId);
|
||||
|
||||
@@ -17303,9 +17247,9 @@ UINT8 LogicSecRltvPrtctSwLockCheck(UINT16 const wLgcId, UINT16 *pDevId, UINT8 *p
|
||||
chRetVal = CI_SUCCESS;
|
||||
for (ii = 0U; ii < chProtectSwitchSum; ii++)
|
||||
{
|
||||
chDevId = chProtectSwitchIdBuf[jj].SwitchId;
|
||||
chDevId = chProtectSwitchIdBuf[ii].SwitchId;
|
||||
chDevState = GetSwitchLockStatus(chDevId);
|
||||
|
||||
/*当前防护道岔不在逻辑区段包含道岔内*/
|
||||
if ((SWITCH_LOCK_STATUS_PROTECT == chDevState) || (SWITCH_LOCK_STATUS_DAP == chDevState))
|
||||
{
|
||||
/*道岔已【防护锁闭】或【单锁且防护锁闭】*/
|
||||
@@ -18257,6 +18201,7 @@ UINT8 LogicSecResApplicabilityCheck(UINT16 const wLogicSecId)
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
devState = GetRouteState(routeId);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_ROUTE_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
@@ -26514,6 +26459,8 @@ UINT8 OtherCiOvlpRelProSwMovValCheck(const UINT16 wOverlapId)
|
||||
cRetVal = CI_ERROR; /*道岔位置不正确且道岔不可动作,返回失败*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -27865,7 +27812,7 @@ UINT8 PhySecLockMaskSideProtectCheck(UINT16 wPhySecId)
|
||||
/*存在侧防条件时,先判断当前物理区段是否位于关键道岔所处物理区段后方*/
|
||||
wSwtPhySecId = GetSwitchPhySectionId(pSideProtectData[i].KeysSwitchID);
|
||||
cKeySwtPhySecIndex = GetPhySecInRoutePosIndex(wRLockBelongRouteId, wSwtPhySecId);
|
||||
if ((ROUTE_PHYSICALSECTION_SUM_MAX > cKeySwtPhySecIndex) && (cKeySwtPhySecIndex < cCurPhySecIndex))
|
||||
if (cKeySwtPhySecIndex < cCurPhySecIndex)
|
||||
{
|
||||
/*入参物理区段位于关键道岔所处物理区段后方,无需检查该条侧防条件*/
|
||||
}
|
||||
@@ -28266,7 +28213,7 @@ UINT8 JumpPhySectionUseCheck(const UINT16 axisSecId)
|
||||
/* 局部变量定义初始化 */
|
||||
UINT8 reResult = CI_ERROR; /*返回值*/
|
||||
UINT8 phyUseState = 0u;/*物理区段征用检查*/
|
||||
UINT8 phyId = 0u;
|
||||
UINT16 phyId = 0u;
|
||||
|
||||
|
||||
|
||||
@@ -28282,11 +28229,15 @@ UINT8 JumpPhySectionUseCheck(const UINT16 axisSecId)
|
||||
/*无处理*/
|
||||
}
|
||||
|
||||
/*检查计轴区段的防护道岔所在区段的征用*/
|
||||
/*检查计轴区段的防护道岔所在区段和道岔征用*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
reResult = JumpPhySectionPortectUseCheck(axisSecId);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*无处理*/
|
||||
}
|
||||
|
||||
|
||||
/*检查计轴区段的道岔征用*/
|
||||
@@ -28294,15 +28245,14 @@ UINT8 JumpPhySectionUseCheck(const UINT16 axisSecId)
|
||||
{
|
||||
reResult = JumpPhySectionSwitchUseCheck(axisSecId);
|
||||
}
|
||||
|
||||
/*检查计轴区段的防护道岔道岔征用*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
else
|
||||
{
|
||||
reResult = JumpPhySectionSwitchUseCheck(axisSecId);
|
||||
/*无处理*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return reResult;
|
||||
}
|
||||
|
||||
@@ -28372,7 +28322,7 @@ UINT8 JumpLogicSecPortectUseCheck(const UINT16 wLgcId)
|
||||
phyId = GetSwitchPhySectionId(chDevId);
|
||||
phyUseState = GetPhySecUseState(phyId);
|
||||
if((PHYSICAL_SECTION_USING_NO != phyUseState)||(SWITCH_USING_NO !=cSwitchUsingState))
|
||||
{/**/
|
||||
{/*存区段征用或存在道岔征用*/
|
||||
chRetVal = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
@@ -28406,7 +28356,7 @@ UINT8 JumpPhySectionSwitchUseCheck(const UINT16 axisSecId)
|
||||
|
||||
/* 局部变量定义初始化 */
|
||||
UINT8 i = 0u; /* 循环变量 */
|
||||
UINT16 SwitchId = 0u;
|
||||
UINT16 wSwitchId = 0u;
|
||||
UINT8 cSwitchUsingState = 0U;
|
||||
|
||||
|
||||
@@ -28421,8 +28371,8 @@ UINT8 JumpPhySectionSwitchUseCheck(const UINT16 axisSecId)
|
||||
/*开始检查计轴区段内道岔*/
|
||||
for (i = 0u; i < checkSum; i++)
|
||||
{
|
||||
SwitchId = dataIdBuf[i].SwitchId;
|
||||
cSwitchUsingState = GetSwitchUsingState(SwitchId);
|
||||
wSwitchId = dataIdBuf[i].SwitchId;
|
||||
cSwitchUsingState = GetSwitchUsingState(wSwitchId);
|
||||
if (SWITCH_USING_NO != cSwitchUsingState)
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
@@ -28613,7 +28563,7 @@ void SetAxisRelProSwitchLockSta(const UINT16 axisSecId, const UINT8 lockCommand)
|
||||
cFuncRet = checkSwtLastValDrvPosStayorNot(protectSwitchId, dataIdBuf[ii].SwitchPosition);
|
||||
if ((SWITCH_LOCK_PROTECT_CANCEL == lockCommand)
|
||||
|| ((cSwitchCurPos == dataIdBuf[ii].SwitchPosition) && (CI_SUCCESS == cFuncRet)))
|
||||
{
|
||||
{/*道岔可动作之前已经查了,这里还是重复查下*/
|
||||
SetSwitchLockStatus(SWITCH_PLOCKTYPE_AXISSEC, axisSecId, protectSwitchId, lockCommand); /*设置道岔防护锁闭状态*/
|
||||
|
||||
}
|
||||
@@ -28642,7 +28592,7 @@ UINT8 AxisRelatedProSwitchLockCheck(UINT16 const axisSecId, UINT16* pDevId, UINT
|
||||
{
|
||||
|
||||
/* 局部变量定义初始化 */
|
||||
UINT16 i = 0u; /* 循环变量 */
|
||||
UINT8 i = 0u; /* 循环变量 */
|
||||
UINT16 devId = 0u;
|
||||
UINT8 devState = 0u;
|
||||
UINT8 reVal = CI_ERROR;
|
||||
@@ -28687,61 +28637,6 @@ UINT8 AxisRelatedProSwitchLockCheck(UINT16 const axisSecId, UINT16* pDevId, UINT
|
||||
return reVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 逻辑区段所处道岔防护道岔封锁状态检查
|
||||
* 参数说明: UINT16 const routeId, 逻辑区段ID
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
UINT8 LogicSecRltvPrtctSwFlockCheck(UINT16 const wLgcId, UINT16* pDevId, UINT8* pDevState)
|
||||
{
|
||||
/* 局部变量定义初始化 */
|
||||
UINT8 chRetVal = CI_ERROR;
|
||||
UINT8 ii = 0U;
|
||||
UINT16 jj = 0U;
|
||||
UINT16 chDevId = 0U;
|
||||
UINT8 chDevState = 0U;
|
||||
UINT8 chCheckSum = 0U;
|
||||
LogsecSwitchStruct* pstLogicSecSwitchBuf = NULL;
|
||||
|
||||
chCheckSum = GetLgcRelateProSwSum(wLgcId);/*获取指定ID逻辑区段关联防护道岔数目*/
|
||||
pstLogicSecSwitchBuf = GetLgcRelateProSwStru(wLgcId);
|
||||
if ((NULL != pDevId)
|
||||
&& (NULL != pDevState)
|
||||
&& (NULL != pstLogicSecSwitchBuf)
|
||||
&& (LOGSEC_RELATE_PRO_SW_SUM_MAX > chCheckSum))
|
||||
{
|
||||
chRetVal = CI_SUCCESS;
|
||||
/*遍历逻辑区段关联防护道岔*/
|
||||
for (ii = 0U; ii < chCheckSum; ii++)
|
||||
{
|
||||
|
||||
chDevId = pstLogicSecSwitchBuf[ii].SwitchId;
|
||||
chDevState = GetSwitchFLockState(chDevId);
|
||||
if(SWITCH_LOCK_FENGSUO_NO == chDevState)
|
||||
{
|
||||
/*位置检查通过,继续检查*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*状态不一致返回故障状态*/
|
||||
*pDevId = chDevId;
|
||||
*pDevState = chDevState;
|
||||
chRetVal = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
|
||||
return chRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置逻辑区段关联防护道岔防护锁闭状态
|
||||
@@ -28784,7 +28679,7 @@ void SetLogSecRelProSwitchLockSta(const UINT16 wLgcId, const UINT8 lockCommand)
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
{/*无处理*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28813,3 +28708,74 @@ void SetLogSecRelProSwitchLockSta(const UINT16 wLgcId, const UINT8 lockCommand)
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 功能描述:计轴区段所有道岔是否全部征用
|
||||
* 参数说明:const UINT16 axisSecId 计轴区段ID
|
||||
* 返回值 : CI_ERROR 未全部征用
|
||||
* CI_SUCCESS 全部征用
|
||||
* add by mpt 20260403
|
||||
*/
|
||||
UINT8 JumpPhySecAllUseCheck(const UINT16 axisSecId)
|
||||
{
|
||||
UINT8 retVal = CI_ERROR;
|
||||
UINT8 checkSum = 0u;
|
||||
AxisSwitchStruct* dataIdBuf = 0u;
|
||||
|
||||
/* 局部变量定义初始化 */
|
||||
UINT8 i = 0u; /* 循环变量 */
|
||||
UINT16 wSwitchId = 0u;
|
||||
UINT16 phyId = 0U;
|
||||
UINT8 phyUseState = 0U;
|
||||
|
||||
checkSum = GetAxisSecRelateProSwSum(axisSecId);/*计轴区段关联防护道岔*/
|
||||
dataIdBuf = GetAxisSecRelateProSwStru(axisSecId);
|
||||
|
||||
|
||||
if (NULL == dataIdBuf)
|
||||
{
|
||||
/*无检查项*/
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_SUCCESS;
|
||||
/*开始检查防护道岔*/
|
||||
for (i = 0u; i < checkSum; i++)
|
||||
{
|
||||
wSwitchId = dataIdBuf[i].SwitchId;
|
||||
|
||||
phyId = GetSwitchPhySectionId(wSwitchId);
|
||||
phyUseState = GetPhySecUseState(phyId);
|
||||
|
||||
if (PHYSICAL_SECTION_USING_YES != phyUseState)
|
||||
{/*非征用*/
|
||||
retVal = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*继续循环*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
phyId = GetAxisSecRelativePhySecId(axisSecId);/*获取相关物理区段ID*/
|
||||
phyUseState = GetPhySecUseState(phyId);
|
||||
|
||||
if (PHYSICAL_SECTION_USING_YES != phyUseState)
|
||||
{/*非征用*/
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*无执行*/
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3025,16 +3025,6 @@ void SetAxisRelProSwitchLockSta(const UINT16 axisSecId, const UINT8 lockCommand)
|
||||
*/
|
||||
UINT8 AxisRelatedProSwitchLockCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8* pDevState);
|
||||
/*
|
||||
* 功能描述: 逻辑区段所处道岔防护道岔封锁状态检查
|
||||
* 参数说明: UINT16 const routeId, 逻辑区段ID
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
UINT8 LogicSecRltvPrtctSwFlockCheck(UINT16 const wLgcId, UINT16* pDevId, UINT8* pDevState);
|
||||
/*
|
||||
* 功能描述: 设置逻辑区段关联防护道岔防护锁闭状态
|
||||
* 参数说明: const UINT16 axisSecId, 计轴区段ID
|
||||
* const UINT8 lockCommand, 锁闭状态
|
||||
@@ -3042,5 +3032,15 @@ UINT8 LogicSecRltvPrtctSwFlockCheck(UINT16 const wLgcId, UINT16* pDevId, UINT8*
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
void SetLogSecRelProSwitchLockSta(const UINT16 wLgcId, const UINT8 lockCommand);
|
||||
/*
|
||||
* 功能描述:计轴区段所有道岔是否全部征用
|
||||
* 参数说明:const UINT16 axisSecId 计轴区段ID
|
||||
* 返回值 : CI_ERROR 未全部征用
|
||||
* CI_SUCCESS 全部征用
|
||||
* add by mpt 20260403
|
||||
*/
|
||||
UINT8 JumpPhySecAllUseCheck(const UINT16 axisSecId);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -454,8 +454,6 @@ UINT8 SetRevrLTrainRouteLogicProcess(UINT16 const routeId)
|
||||
/* 联锁逻辑检查 */
|
||||
|
||||
/* 进路类型是【列车进路】*/
|
||||
if(CI_SUCCESS == reResult)
|
||||
{
|
||||
devState = GetRouteType(routeId);
|
||||
if (devState == ROUTE_TYPE_LIECHE)
|
||||
{
|
||||
@@ -465,14 +463,11 @@ UINT8 SetRevrLTrainRouteLogicProcess(UINT16 const routeId)
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_ROUTE,routeId,ETYPE_ROUTE_TYPE,devState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_ROUTE_TYPE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(CI_SUCCESS == reResult)
|
||||
{
|
||||
@@ -1053,8 +1048,6 @@ UINT8 SetReverseRtnRouteLogicProcess(UINT16 const routeId)
|
||||
/* 联锁逻辑检查 */
|
||||
|
||||
/* 进路类型是【折返进路】*/
|
||||
if(CI_SUCCESS == reResult)
|
||||
{
|
||||
devState = GetRouteType(routeId);
|
||||
if (devState == ROUTE_TYPE_RETURN)
|
||||
{
|
||||
@@ -1064,11 +1057,10 @@ UINT8 SetReverseRtnRouteLogicProcess(UINT16 const routeId)
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_ROUTE,routeId,ETYPE_ROUTE_TYPE,devState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_ROUTE_TYPE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if(CI_SUCCESS == reResult)
|
||||
{
|
||||
@@ -2895,12 +2887,6 @@ UINT8 LockRouteOverlapLogicProcess(UINT16 const routeId, UINT16 const overlapId,
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{/*传统线路*/
|
||||
checkResult = OverlapSwitchMoveValidCheck(overlapId,&devId,&devState);
|
||||
}/* zt 删除单轨相关代码 2022-02-15 */
|
||||
else
|
||||
{/*线路类型错误*/
|
||||
checkResult = CI_ERROR;
|
||||
}
|
||||
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查,保持当前状态 */
|
||||
@@ -2908,18 +2894,11 @@ UINT8 LockRouteOverlapLogicProcess(UINT16 const routeId, UINT16 const overlapId,
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_SWITCH,devId,ETYPE_SWT_POSTION_STATE,devState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_SWITCH, devId, ETYPE_SWT_POSTION_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
/*线路类型检查*/
|
||||
if ((CI_SUCCESS == reResult) || (RETURN_WAIT_SWITCH_USING == reResult))
|
||||
{/* zt 删除单轨相关代码 2022-02-15 */
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{/*传统线路*/
|
||||
/* 通过检查,保持当前状态 */
|
||||
}
|
||||
}/* zt 删除单轨相关代码 2022-02-15 */
|
||||
else
|
||||
{/*线路类型错误*/
|
||||
reResult = CI_ERROR;
|
||||
@@ -2934,15 +2913,7 @@ UINT8 LockRouteOverlapLogicProcess(UINT16 const routeId, UINT16 const overlapId,
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
if(CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{/*传统线路*/
|
||||
checkResult = OverlapSwitchPosCheck(overlapId,&devId,&devState);
|
||||
}/* zt 删除单轨相关代码 2022-02-15 */
|
||||
else
|
||||
{/*线路类型错误*/
|
||||
checkResult = CI_ERROR;
|
||||
}
|
||||
|
||||
checkResult = OverlapSwitchPosCheck(overlapId, &devId, &devState);
|
||||
if (checkResult == CI_ERROR)
|
||||
{
|
||||
/* 道岔位置不正确 */
|
||||
@@ -3631,8 +3602,6 @@ UINT8 OpenCbtcLTrainRouteLogicProcess(UINT16 const routeId)
|
||||
/* 联锁逻辑检查 */
|
||||
|
||||
/* 进路监督模式为【CBTC】*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
devState = GetRouteLevel(routeId);
|
||||
if ((devState == ROUTE_LEVEL_CBTC))
|
||||
{
|
||||
@@ -3642,11 +3611,10 @@ UINT8 OpenCbtcLTrainRouteLogicProcess(UINT16 const routeId)
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_ROUTE,routeId,ETYPE_ROUTE_LEVEL,devState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_ROUTE_LEVEL, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* 进路类型是列车进路*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
@@ -3886,10 +3854,8 @@ UINT8 OpenCbtcLTrainRouteLogicProcess(UINT16 const routeId)
|
||||
else
|
||||
{
|
||||
/*既不是反向进路,也不是风井进路*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/*防淹门联锁条件检查*/
|
||||
checkResult = CBTCRouteFloodGateCheck(routeId,functionId,sendLevel);
|
||||
checkResult = CBTCRouteFloodGateCheck(routeId, functionId, sendLevel);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
reResult = CI_SUCCESS;
|
||||
@@ -3900,7 +3866,6 @@ UINT8 OpenCbtcLTrainRouteLogicProcess(UINT16 const routeId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4851,8 +4816,6 @@ UINT8 OpenCbtcReturnRouteLogicProcess(UINT16 const routeId)
|
||||
/* 联锁逻辑检查 */
|
||||
|
||||
/* 进路监督模式为【CBTC】*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
devState = GetRouteLevel(routeId);
|
||||
if ((devState == ROUTE_LEVEL_CBTC))
|
||||
{
|
||||
@@ -4862,11 +4825,10 @@ UINT8 OpenCbtcReturnRouteLogicProcess(UINT16 const routeId)
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_ROUTE,routeId,ETYPE_ROUTE_LEVEL,devState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_ROUTE_LEVEL, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* 进路类型是【折返进路】*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
@@ -6400,13 +6362,15 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
UINT8 sendLevel = ESEND_LEVEL_ZERO; /*不发送ATS*/
|
||||
UINT8 chPhySecCurMergeState = 0U;/*物理区段当前融合状态*/
|
||||
UINT8 chPhySecPreMergeState = 0U;/*物理区段之前融合状态*/
|
||||
UINT8 chPhyOtherLineFlag = 0U;
|
||||
UINT16 wFrontPhyId = 0U;
|
||||
|
||||
/*联锁检查*/
|
||||
|
||||
if(CI_SUCCESS == reResult)
|
||||
{
|
||||
/*找到属于当前进路的第一个【正常锁闭】区段*/
|
||||
if (nlockSectionId > 0u)
|
||||
if (0U < nlockSectionId)
|
||||
{
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
@@ -6416,14 +6380,51 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
reResult = CI_ERROR;
|
||||
|
||||
/*返回ID = 0*/
|
||||
*phySectionId = 0u;
|
||||
*phySectionId = 0U;
|
||||
|
||||
}
|
||||
}
|
||||
if(CI_SUCCESS == reResult)
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/* 判断是否联络线对方区段 */
|
||||
chPhyOtherLineFlag = GetPhyIsThisLineState(nlockSectionId);
|
||||
if ((DEV_IS_THIS_LINE_NO == chPhyOtherLineFlag) && (UINT16_MAX == nextSecId) && (ROUTE_TYPE_RETURN != routeType))
|
||||
{
|
||||
/*区段不是本线路,且不存在下一个区段,且进路不为折返*/
|
||||
wFrontPhyId = GetRoutePhySecFrontPhyId(routeId, nlockSectionId);
|
||||
chPhySecPreMergeState = GetPhySecPreMergeState(wFrontPhyId);
|
||||
chPhySecCurMergeState = GetPhySecCurMergeState(wFrontPhyId);
|
||||
/* 前一区段当前空闲,之前占用 */
|
||||
if ((SECTION_OCCUPY_YES == chPhySecPreMergeState) && (SECTION_OCCUPY_NO == chPhySecCurMergeState))
|
||||
{
|
||||
chPhySecPreMergeState = GetPhySecPreMergeState(nlockSectionId);
|
||||
chPhySecCurMergeState = GetPhySecCurMergeState(nlockSectionId);
|
||||
/* 待解锁区段当前空闲,之前占用 */
|
||||
if ((SECTION_OCCUPY_YES == chPhySecPreMergeState) && (SECTION_OCCUPY_NO == chPhySecCurMergeState))
|
||||
{
|
||||
/*正常解锁区段*/
|
||||
reResult = CI_SUCCESS;
|
||||
*phySectionId = nlockSectionId;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
*phySectionId = nlockSectionId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
*phySectionId = nlockSectionId;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/*进路为【折返进路】且解锁区段为折返区段*/
|
||||
if ((routeType == ROUTE_TYPE_RETURN)
|
||||
if ((ROUTE_TYPE_RETURN == routeType)
|
||||
&& (nlockSectionId == returnSecId))
|
||||
{
|
||||
/*折返解锁*/
|
||||
@@ -6443,7 +6444,7 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
*phySectionId = nlockSectionId;
|
||||
}
|
||||
|
||||
if(CI_SUCCESS == reResult)
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/*折出进路第一个区段【占用】*/
|
||||
chPhySecCurMergeState = GetPhySecCurMergeState(backSecId);
|
||||
@@ -6457,13 +6458,13 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
{
|
||||
/*折返异常*/
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_PHYSEC,backSecId,ETYPE_PS_RUNLOCK_ERROR,chPhySecCurMergeState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, backSecId, ETYPE_PS_RUNLOCK_ERROR, chPhySecCurMergeState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = RETURN_AUTOLOCK_ERR_EXCEPT;
|
||||
*phySectionId = nlockSectionId;
|
||||
}
|
||||
}
|
||||
if(CI_SUCCESS == reResult)
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/*折返进路锁闭时间早于折出进路 且 折出进路状态为【接近锁闭正常】*/
|
||||
if ((returnRouteLockTime < backRouteLockTime)
|
||||
@@ -6477,7 +6478,7 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
{
|
||||
/*折返异常*/
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_ROUTE, wPhySecRLockId,ETYPE_PS_RUNLOCK_ERROR, backRouteState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, wPhySecRLockId, ETYPE_PS_RUNLOCK_ERROR, backRouteState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = RETURN_AUTOLOCK_ERR_EXCEPT;
|
||||
*phySectionId = nlockSectionId;
|
||||
@@ -6503,7 +6504,7 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
*phySectionId = nlockSectionId;
|
||||
|
||||
}
|
||||
if(CI_SUCCESS == reResult)
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/* 下一区段【占用】*/
|
||||
chPhySecCurMergeState = GetPhySecCurMergeState(nextSecId);
|
||||
@@ -6515,7 +6516,7 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (validReturnSigId > 0u)/*通过进路转折返进路*/
|
||||
if (0U < validReturnSigId)/*通过进路转折返进路*/
|
||||
{
|
||||
/*折出进路第一个区段占用*/
|
||||
chPhySecCurMergeState = GetPhySecCurMergeState(backSecId);
|
||||
@@ -6529,16 +6530,16 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
{
|
||||
/*折返异常*/
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_PHYSEC,backSecId,ETYPE_PS_RUNLOCK_ERROR, chPhySecCurMergeState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, backSecId, ETYPE_PS_RUNLOCK_ERROR, chPhySecCurMergeState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = RETURN_AUTOLOCK_ERR_EXCEPT;
|
||||
*phySectionId = nlockSectionId;
|
||||
}
|
||||
if(CI_SUCCESS == reResult)
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/*折返进路锁闭时间早于折出进路 且 折出进路状态为【接近锁闭正常】*/
|
||||
if ((((INT32)(backRouteLockTime- returnRouteLockTime)) > 0 )
|
||||
&&(backRouteState == ROUTE_STATE_NEAR_LOCK))
|
||||
if (0 < (((INT32)(backRouteLockTime - returnRouteLockTime)))
|
||||
&& (ROUTE_STATE_NEAR_LOCK == backRouteState))
|
||||
{
|
||||
reResult = CI_SUCCESS;
|
||||
*phySectionId = nlockSectionId;
|
||||
@@ -6547,7 +6548,7 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
{
|
||||
/*折返异常*/
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_ROUTE, wPhySecRLockId,ETYPE_PS_RUNLOCK_ERROR, backRouteState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, wPhySecRLockId, ETYPE_PS_RUNLOCK_ERROR, backRouteState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = RETURN_AUTOLOCK_ERR_EXCEPT;
|
||||
*phySectionId = nlockSectionId;
|
||||
@@ -6559,7 +6560,7 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
/*下一区段【空闲】(飞车)*/
|
||||
/* 解锁异常 */
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_PHYSEC,nextSecId,ETYPE_PS_AUNLOCK_ERROR, chPhySecCurMergeState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, nextSecId, ETYPE_PS_AUNLOCK_ERROR, chPhySecCurMergeState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = RETURN_AUTOLOCK_ERR_EXCEPT;
|
||||
*phySectionId = nlockSectionId;
|
||||
@@ -6568,6 +6569,10 @@ UINT8 RouteOtherSecAutoUnlockProcess(UINT16 const routeId, UINT16* phySectionId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return reResult;
|
||||
}
|
||||
|
||||
@@ -7082,6 +7087,7 @@ UINT8 RouteCancelLogicProcess(UINT16 const routeId)
|
||||
/*故障发送级别*/
|
||||
UINT8 sendLevel = ESEND_LEVEL_ATS; /*发送ATS*/
|
||||
UINT8 cRouteType = 0U; /*进路类型*/
|
||||
UINT8 chRConnectReleaseFlag = 0U;
|
||||
|
||||
/*联锁条件检查*/
|
||||
/* 进路内所有区段锁闭状态【正常锁闭】*/
|
||||
@@ -7168,14 +7174,24 @@ UINT8 RouteCancelLogicProcess(UINT16 const routeId)
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
chRConnectReleaseFlag = GetRouteConnectReleaseFlag(routeId);
|
||||
if (ROUTE_CONNECT_RELEASE_YES == chRConnectReleaseFlag)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_RELAY,devId,ETYPE_CANCLE_ZHAOCHA,devState,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_RELAY, devId, ETYPE_CANCLE_ZHAOCHA, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
@@ -7863,8 +7879,7 @@ UINT8 SetSwitchFLockLogicProcess(UINT16 const switchId)
|
||||
{
|
||||
if(FUNC_SWITCH_ON == CiFunctionLock)
|
||||
{
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{/*传统线路*/
|
||||
/*传统线路*/
|
||||
/*道岔2区段状态为【未锁闭】*/
|
||||
checkResult = switch2ndSecLockState;
|
||||
if (checkResult == PHYSICAL_SECTION_LOCK_NO)
|
||||
@@ -7888,17 +7903,9 @@ UINT8 SetSwitchFLockLogicProcess(UINT16 const switchId)
|
||||
{
|
||||
/*【锁闭】*/
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_PHYSEC,switch2ndSecId,ETYPE_PS_LOCK_STATE,checkResult,sendLevel);
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, switch2ndSecId, ETYPE_PS_LOCK_STATE, checkResult, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
|
||||
}
|
||||
}/* zt 删除单轨相关代码 2022-02-15 */
|
||||
else
|
||||
{/*线路类型错误*/
|
||||
reResult = CI_ERROR;
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_PHYSEC,phySecId,ETYPE_PS_LOCK_STATE,devState,sendLevel);
|
||||
}
|
||||
}
|
||||
else if(FUNC_SWITCH_OFF == CiFunctionLock)
|
||||
@@ -9910,7 +9917,7 @@ UINT8 CLDKeepOpenSecCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel)
|
||||
ETYPE_PS_MERGY_OCU_STATE, devState,
|
||||
sendLevel);
|
||||
}
|
||||
else if ((0u == hasUtFlag) && (1u == hasCtFlag))
|
||||
else if (1u == hasCtFlag)
|
||||
{
|
||||
if (RC_WORK_MODE_TIOC == rcWorkMode)
|
||||
{
|
||||
@@ -11655,7 +11662,10 @@ void RouteLgcSecResReleaseProcess(const UINT16 wRouteId)
|
||||
&& (NULL == pstTrainResInfo))
|
||||
{/*上一区段已经解锁,本区段由列车申请资源释放或本区段已经解锁*/
|
||||
/*删除该列车对应逻辑区段资源*/
|
||||
(void)ComMemSet((void *)&pstLgcSecInfo[wLgcBufIndex].szTrainResData[jj], (UINT16)sizeof(LogicTrainResStruct), 0U);
|
||||
|
||||
/*重置资源信息结构体*/
|
||||
ResetResInfoStruct(wLgcBufIndex, jj);
|
||||
|
||||
debug_infor_printf((const)"LogSecRes Release LgcId: %d TrainId:%d Cyc\n"
|
||||
, wUnlockLgcSecId
|
||||
, wTrainId
|
||||
@@ -13150,3 +13160,83 @@ void UpdateRouteCouplinkFlag(const UINT16 wRouteId)
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* 功能描述: 联络线接车进路解锁处理
|
||||
* 参数说明: const UINT16 wRouteId 进路ID
|
||||
* 返回值 : 无
|
||||
* Create: lyj 20260603
|
||||
*/
|
||||
void ConnectRouteReleaseProc(const UINT16 wRouteId)
|
||||
{
|
||||
UINT8 chRouteState = 0U; /*进路状态*/
|
||||
UINT8 chResult = 0U;
|
||||
UINT16 wFirstOccuSecId = 0U;/*进路内方第一个占用的物理区段ID*/
|
||||
UINT8 chDevState = 0U;
|
||||
UINT8 chTrainEnterSta = 0U;
|
||||
UINT8 chZongRenJieResult = 0U;
|
||||
|
||||
if ((0U < wRouteId) && (ROUTE_SUM_MAX > wRouteId))
|
||||
{
|
||||
chRouteState = GetRouteState(wRouteId);
|
||||
|
||||
if ((ROUTE_STATE_FIRST_LOCK == chRouteState)
|
||||
|| (ROUTE_STATE_FIRST_LOCKERR == chRouteState)
|
||||
|| (ROUTE_STATE_YUXIAN_LOCK == chRouteState)
|
||||
|| (ROUTE_STATE_NEAR_LOCKERR == chRouteState))
|
||||
{
|
||||
chZongRenJieResult = CheckRouteZongRenJieFeasibility(wRouteId);
|
||||
chResult = RouteAllSecOccuClearCheck(wRouteId, &wFirstOccuSecId, &chDevState);
|
||||
if (CI_SUCCESS == chZongRenJieResult)
|
||||
{
|
||||
SetRouteStateManage(wRouteId, ROUTE_STATE_DELAY_UNLOCK); /*-->设置进路延时解锁*/
|
||||
|
||||
if (CI_SUCCESS == chResult)
|
||||
{
|
||||
/*进路内无占压,延时后全部解锁*/
|
||||
SetRouteZongRenJieDelayType(wRouteId, ROUTE_ZRJ_DELAY_TYPE_IDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*延时后部分绿光带,即一个占压的物理区段之前的物理区段变绿光带*/
|
||||
SetRouteZongRenJieDelayType(wRouteId, ROUTE_ZRJ_DELAY_TYPE_EXP_TO_OCCUPY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*进路不能解锁*/
|
||||
}
|
||||
|
||||
}
|
||||
else if ((ROUTE_STATE_LEAD_LOCK == chRouteState) || (ROUTE_STATE_LEAD_LOCKERR == chRouteState))
|
||||
{
|
||||
chTrainEnterSta = GetRouteTrainEnterFlag(wRouteId);
|
||||
chZongRenJieResult = RouteExceptLastSecOccuClrCheck(wRouteId);
|
||||
if (CI_SUCCESS == chZongRenJieResult)
|
||||
{
|
||||
/*所有区段空闲或最后一个区段占用*/
|
||||
SetRouteStateManage(wRouteId, ROUTE_STATE_DELAY_UNLOCK); /*-->设置进路延时解锁*/
|
||||
/*延时后全部解锁*/
|
||||
SetRouteZongRenJieDelayType(wRouteId, ROUTE_ZRJ_DELAY_TYPE_IDLE);/*延时结束后所有区段解锁*/
|
||||
}
|
||||
else if (ROUTE_TRAIN_ENTER_FLAG_NO == chTrainEnterSta)
|
||||
{
|
||||
SetRouteStateManage(wRouteId, ROUTE_STATE_DELAY_UNLOCK); /*-->设置进路延时解锁*/
|
||||
/*延时后全部解锁*/
|
||||
SetRouteZongRenJieDelayType(wRouteId, ROUTE_ZRJ_DELAY_TYPE_IDLE);/*延时结束后所有区段解锁*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不解锁*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*记录进路状态不满足*/
|
||||
SetErrorData(EFUNC_ROUTE_ZRJ_DEAL, CI_DEVICE_TYPE_ROUTE, wRouteId, ETYPE_ROUTE_STATE, chRouteState, ESEND_LEVEL_ATS);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理;进路ID异常,不做报警*/
|
||||
}
|
||||
}
|
||||
@@ -841,6 +841,13 @@ UINT8 SetRouteCouplinkProcess(const UINT16 wRouteId, const UINT8 functionId, con
|
||||
* Create: 20250919
|
||||
*/
|
||||
void UpdateRouteCouplinkFlag(const UINT16 wRouteId);
|
||||
/*
|
||||
* 功能描述: 联络线接车进路解锁处理
|
||||
* 参数说明: const UINT16 wRouteId 进路ID
|
||||
* 返回值 : 无
|
||||
* Create: lyj 20260603
|
||||
*/
|
||||
void ConnectRouteReleaseProc(const UINT16 wRouteId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -890,7 +890,10 @@ void CleanOverlapSpecificFlag(const UINT16 routeId, const UINT16 overlapId)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((dwAtsLastTimeLockCyc < dwUnlockStartCycNum) && (0U < dwAtsLastTimeLockCyc))
|
||||
atsExpLockOverlapId = GetRouteAtsExpLkOverlapId(routeId);
|
||||
|
||||
if ((dwAtsLastTimeLockCyc <= dwUnlockStartCycNum) && (0U < dwAtsLastTimeLockCyc)
|
||||
&& (overlapId == atsExpLockOverlapId))
|
||||
{
|
||||
/*ATS最后一次下发锁闭保护区段命令时保护区段未自动解锁*/
|
||||
SetRouteAtsExpLkOverlapId(routeId, 0U);
|
||||
|
||||
@@ -1183,3 +1183,51 @@ UINT16 GetIbpConfmRelayId(const UINT16 doorId)
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置倒切板卡
|
||||
* 参数说明: const UINT16 PsdId, 屏蔽门ID,UINT16 wBoardId 板卡Id
|
||||
* 返回值 : CI_SUCCESS CI_ERROR
|
||||
*/
|
||||
UINT8 SetPsdRelateReverseRelay(const UINT16 PsdId, UINT16 wBoardId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 chRet = CI_ERROR;
|
||||
bufIndex = GetPsdConfigBufIndex(PsdId); /*获取数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
PsdConfigDataStru[bufIndex].wReverseBoardId = wBoardId;
|
||||
chRet = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
return chRet;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取倒切板卡
|
||||
* 参数说明: const UINT16 wPsdId, 屏蔽门ID
|
||||
* 返回值 : UINT16_MAX: 获取数据失败
|
||||
* 0: 无倒切
|
||||
* [1,65534]板卡ID
|
||||
*/
|
||||
UINT16 GetPsdRelateReverseBoardId(const UINT16 wPsdId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = UINT16_MAX;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(wPsdId); /*获取数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
retVal = PsdConfigDataStru[bufIndex].wReverseBoardId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = UINT16_MAX;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ typedef struct S_PsdConfigDataStruct
|
||||
UINT16 IncloudeEsbIdBuf[PSD_INCLUDE_ESB_NUM]; /*屏蔽门包含ESB ID*/
|
||||
UINT8 IncloudeEsbNum; /*包含ESB数量*/
|
||||
UINT16 wIbpRelayId; /*IBP盘发车按钮继电器ID*/
|
||||
UINT16 wReverseBoardId; /*所属倒切板卡Id*/
|
||||
} PsdConfigDataStruct;
|
||||
|
||||
|
||||
@@ -461,6 +462,23 @@ UINT16* GetPsdIncloudeEsbIdBuf(const UINT16 psdId);
|
||||
*/
|
||||
UINT16 GetIbpConfmRelayId(const UINT16 doorId);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置倒切板卡
|
||||
* 参数说明: const UINT16 PsdId, 屏蔽门ID,UINT16 wBoardId 板卡Id
|
||||
* 返回值 : CI_SUCCESS CI_ERROR
|
||||
*/
|
||||
UINT8 SetPsdRelateReverseRelay(const UINT16 PsdId,UINT16 wBoardId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取倒切板卡
|
||||
* 参数说明: const UINT16 wPsdId, 屏蔽门ID
|
||||
* 返回值 : UINT16_MAX: 获取数据失败
|
||||
* 0: 无倒切
|
||||
* [1,65534]板卡ID
|
||||
*/
|
||||
UINT16 GetPsdRelateReverseBoardId(const UINT16 wPsdId);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -851,7 +851,7 @@ UINT32 GetStartDetectionCycNum(const UINT16 doorId)
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStartDetectionState(const UINT16 doorId, const UINT32 detectionState)
|
||||
void SetStartDetectionState(const UINT16 doorId, const UINT8 detectionState)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
|
||||
@@ -861,7 +861,7 @@ void SetStartDetectionState(const UINT16 doorId, const UINT32 detectionState)
|
||||
{
|
||||
if ((JXTC_START_DETECTION_NO == detectionState) || (JXTC_START_DETECTION_YES == detectionState) )
|
||||
{
|
||||
PsdDataStru[bufIndex].StartDetectionState = (UINT8)(detectionState);
|
||||
PsdDataStru[bufIndex].StartDetectionState = detectionState;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -906,7 +906,7 @@ UINT8 GetStartDetectionState(const UINT16 doorId)
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStopDetectionState(const UINT16 doorId, const UINT32 detectionState)
|
||||
void SetStopDetectionState(const UINT16 doorId, const UINT8 detectionState)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
|
||||
@@ -916,7 +916,7 @@ void SetStopDetectionState(const UINT16 doorId, const UINT32 detectionState)
|
||||
{
|
||||
if ((JXTC_STOP_DETECTION_NO == detectionState) || (JXTC_STOP_DETECTION_YES == detectionState) )
|
||||
{
|
||||
PsdDataStru[bufIndex].StopDetectionState = (UINT8)(detectionState);
|
||||
PsdDataStru[bufIndex].StopDetectionState = detectionState;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1405,7 +1405,7 @@ UINT16 GetPsdEditGroupInfoFromPsdData(const UINT16 doorId)
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetVOBCDoorState(const UINT16 doorId, const UINT32 doorState)
|
||||
void SetVOBCDoorState(const UINT16 doorId, const UINT8 doorState)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
|
||||
@@ -1415,7 +1415,7 @@ void SetVOBCDoorState(const UINT16 doorId, const UINT32 doorState)
|
||||
{
|
||||
if ((PSD_DOOR_CLOSEDANDLOCKED_VALID == doorState) || (PSD_DOOR_CLOSEDANDLOCKED_INVALID == doorState))
|
||||
{
|
||||
PsdDataStru[bufIndex].VOBCDoorState = (UINT8)(doorState);
|
||||
PsdDataStru[bufIndex].VOBCDoorState = doorState;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3417,3 +3417,57 @@ UINT8 GetPsdStateToVobc(const UINT16 doorId)
|
||||
}
|
||||
return chRet;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置列车非零速状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT32 detectionState, 非零速状态
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetTrainZeroSpeedState(const UINT16 doorId, const UINT8 detectionState)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
if ((PSD_TRAIN_ZERO_SPEED_NO == detectionState) || (PSD_TRAIN_ZERO_SPEED_YES == detectionState))
|
||||
{
|
||||
PsdDataStru[bufIndex].chTrainZeroSpeedState = detectionState;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不做处理*/
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不做处理*/
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取列车非零速状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 非零速状态
|
||||
*/
|
||||
UINT8 GetTrainZeroSpeedState(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
retVal = PsdDataStru[bufIndex].chTrainZeroSpeedState;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
@@ -98,6 +98,7 @@ typedef struct S_PsdDataStruct
|
||||
UINT32 JXTCMutualLockStartCycNum; /*间隙探测互锁解除起始时间*/
|
||||
UINT8 ibpButtonState; /*IBP盘发车按钮状态(动态字段)*/
|
||||
UINT32 IBPPressCycNum; /*IBP按下起始周期*/
|
||||
UINT8 chTrainZeroSpeedState; /*列车非零速状态*/
|
||||
} PsdDataStruct;
|
||||
|
||||
/*屏蔽门数据结构体*/
|
||||
@@ -386,7 +387,7 @@ UINT32 GetStartDetectionCycNum(const UINT16 doorId);
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStartDetectionState(const UINT16 doorId, const UINT32 detectionState);
|
||||
void SetStartDetectionState(const UINT16 doorId, const UINT8 detectionState);
|
||||
/*
|
||||
* 功能描述: 获取开始启动探测状态
|
||||
* 参数说明: const UINT16 routeId, 进路ID
|
||||
@@ -402,7 +403,7 @@ UINT8 GetStartDetectionState(const UINT16 doorId);
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStopDetectionState(const UINT16 doorId, const UINT32 detectionState);
|
||||
void SetStopDetectionState(const UINT16 doorId, const UINT8 detectionState);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取停止探测状态
|
||||
@@ -541,7 +542,7 @@ UINT16 GetPsdEditGroupInfoFromPsdData(const UINT16 doorId);
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetVOBCDoorState(const UINT16 doorId, const UINT32 doorState);
|
||||
void SetVOBCDoorState(const UINT16 doorId, const UINT8 doorState);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取VOBC2CI车门状态信息
|
||||
@@ -1185,6 +1186,23 @@ UINT8 SetIBPPressCycNum(const UINT16 doorId, const UINT32 startCycNum);
|
||||
* 返回值 :屏蔽门状态
|
||||
*/
|
||||
UINT8 GetPsdStateToVobc(const UINT16 doorId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置列车非零速状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT32 detectionState, 非零速状态
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetTrainZeroSpeedState(const UINT16 doorId, const UINT8 detectionState);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取列车非零速状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 非零速状态
|
||||
*/
|
||||
UINT8 GetTrainZeroSpeedState(const UINT16 doorId);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
/*屏蔽门总数最大值*/
|
||||
#define PSD_SUM_MAX ((UINT16)90U) /*定义屏蔽门数量最大值*/
|
||||
#define PSD_SUM_MAX ((UINT16)200U) /*定义屏蔽门数量最大值*/
|
||||
|
||||
/*和屏蔽门关联的出站进路数目最大值*/
|
||||
#define RALATED_OUT_STATION_ROUTE_SUM_MAX ((UINT16)10U) /*屏蔽门关联的出站进路数目最大值*/
|
||||
@@ -228,4 +228,8 @@
|
||||
#define CI_IVOC_PSD_STATE_OPEN ((UINT8)0x55U) /*CI到IVOC屏蔽门打开*/
|
||||
#define CI_IVOC_PSD_STATE_PANGLU ((UINT8)0xCCU) /*CI到IVOC屏蔽门互锁解除*/
|
||||
#define CI_IVOC_PSD_STATE_OPEN_EXCEPT ((UINT8)0x33U) /*CI到IVOC屏蔽门异常打开*/
|
||||
|
||||
#define PSD_TRAIN_ZERO_SPEED_YES ((UINT8)0x55U) /*列车零速*/
|
||||
#define PSD_TRAIN_ZERO_SPEED_NO ((UINT8)0xAAU) /*列车非零速*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -164,6 +164,8 @@
|
||||
#define ATS_CMD_APPLY_PASSXICHE ((UINT8)0xB2) /*现地请求反向洗车命令-降级模式*/
|
||||
#define ATS_CMD_CANCEL_PASSXICHE ((UINT8)0xB3) /*现地取消反向洗车命令-降级模式*/
|
||||
#define ATS_CMD_CANCEL_PSD_EXCEPT ((UINT8)0xBA) /*现地取消站台门异常状态*/
|
||||
#define ATS_CMD_CONNECT_ROUTE_RELEASE_ONE ((UINT8)0xBB) /*联络线接车进路解锁一次*/
|
||||
#define ATS_CMD_CONNECT_ROUTE_RELEASE_TWO ((UINT8)0xBC) /*联络线接车进路解锁二次*/
|
||||
|
||||
/****联锁到其他联锁的命令宏定义****/
|
||||
#define CI_CMD_PHYSEC_USING_APPLY ((UINT16)0x0001) /*物理区段征用申请*/
|
||||
@@ -246,9 +248,10 @@
|
||||
|
||||
#define CI_BACK_GROUP_AUTO_ROUTE_SET_ERR ((UINT8)0x7e) /*组合自动进路自动属性设置失败*/
|
||||
|
||||
#define CI_BACK_AUTO_TRIGGER_SET_ERR (UINT8)0x85 /*进路的自动触发标志设置失败*/
|
||||
#define CI_BACK_AUTO_TRIGGER_SET_ERR ((UINT8)0x85) /*进路的自动触发标志设置失败*/
|
||||
#define CI_BACK_LEAD_ROUTE_CANCEL ((UINT8)0xA4) /*引导进路无法使用总取消解锁反馈*/
|
||||
#define CI_BACK_COUPLINK_ROUTE_IDLE ((UINT8)0xAF) /*联挂进路内无被联挂车*/
|
||||
#define CI_BACK_CONNECT_ROUTE_RELEASE ((UINT8)0xBB) /*联络线接车进路解锁条件不满足*/
|
||||
|
||||
/*信号机故障反馈*/
|
||||
#define CI_BACK_SIG_START_OPEN ((UINT8)0x11) /*进路始端信号机开放*/
|
||||
@@ -469,6 +472,48 @@
|
||||
#define CI_BACK_ALLAUTO_RETURN_FLOOD_STATE_ERR ((UINT8)0x9C) /*全自动折返进路存在防淹门不满足*/
|
||||
#define CI_BACK_ALLAUTO_RETURN_COUPROUTE_SET ((UINT8)0xB2) /*全自动折返联挂进路已办理*/
|
||||
|
||||
#define ATS_CI_INFO_TYPE_FIRST_LEN ((UINT16)11) /*ATS首次命令长度*/
|
||||
#define ATS_CI_INFO_TYPE_SND_LEN ((UINT16)15) /*ATS再次命令长度*/
|
||||
|
||||
/* ATS二次命令帧首次消息结构体 */
|
||||
typedef struct
|
||||
{
|
||||
UINT8 chFlag; /*首次消息接收状态*/
|
||||
UINT32 dwCycle; /*首次消息接收周期号*/
|
||||
UINT8 chAtsId; /*ATS编号:不为0时发送网关*/
|
||||
UINT8 chRtuId; /*Rtu编号:不为0时发送现地,全0发ATS*/
|
||||
UINT16 wIndex; /*操作站编号*/
|
||||
UINT8 chTiocId; /*TIOC编号*/
|
||||
UINT32 dwTime; /*请求时间*/
|
||||
UINT16 wDevId; /*操作设备ID*/
|
||||
}AtsFollowUpCmdFstStru;
|
||||
|
||||
/* ATS二次命令帧再次消息结构体 */
|
||||
typedef struct
|
||||
{
|
||||
UINT8 chFlag; /*首次消息接收状态*/
|
||||
UINT32 dwCycle; /*再次消息接收周期号*/
|
||||
UINT8 chAtsId; /*ATS编号:不为0时发送网关*/
|
||||
UINT8 chRtuId; /*Rtu编号:不为0时发送现地,全0发ATS*/
|
||||
UINT16 wIndex; /*操作站编号*/
|
||||
UINT8 chTiocId; /*TIOC编号*/
|
||||
UINT32 dwTime; /*请求时间*/
|
||||
UINT16 wDevId; /*操作设备ID*/
|
||||
UINT32 dwCrc32; /*再次发送中Crc*/
|
||||
}AtsFollowUpCmdSndStru;
|
||||
|
||||
/*二次命令帧反馈信息结构体 */
|
||||
typedef struct
|
||||
{
|
||||
UINT8 chFlag; /*消息有效性*/
|
||||
UINT8 chTiocId; /*TIOC编号*/
|
||||
UINT8 chAtsId; /*Ats编号: 判断组包对象使用,不包含在组包内容中*/
|
||||
UINT8 chRtuId; /*Rtu编号*/
|
||||
UINT16 wIndex; /*操作站编号*/
|
||||
UINT32 dwTime; /*时间*/
|
||||
UINT8 chOpStatus; /*操作结果*/
|
||||
UINT32 dwCrc32; /*CRC*/
|
||||
}RCIFollowUpReplyStru;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -46,6 +46,36 @@ PSCToCiDataStruct* pscCiSendToAtsDataStru = NULL;
|
||||
ReciveAtsCmdDataCycInfo szReciveAtsCmdDataCycInfo[ATS_SUM_MAX * 2U] = {0U}; /*收到ATS命令数据周期号信息数组*/
|
||||
UINT16 gReciveAtsCmdDataDeviceSum = 0U; /*收到ATS命令数据设备数目*/
|
||||
|
||||
AtsFollowUpCmdFstStru gDansuoCancleMsgFst = { 0u }; /*取消单锁首次消息*/
|
||||
RCIFollowUpReplyStru gDansuoCancleReplyFst = { 0u }; /*取消单锁首次确认*/
|
||||
AtsFollowUpCmdSndStru gDansuoCancleMsgSnd = { 0u }; /*取消单锁二次消息*/
|
||||
RCIFollowUpReplyStru gDansuoCancleReplySnd = { 0u }; /*取消单锁二次确认*/
|
||||
|
||||
AtsFollowUpCmdFstStru gSwitchUnflockMsgFst = { 0u }; /*道岔解封首次消息*/
|
||||
RCIFollowUpReplyStru gSwitchUnflockReplyFst = { 0u }; /*道岔解封首次确认*/
|
||||
AtsFollowUpCmdSndStru gSwitchUnflockMsgSnd = { 0u }; /*道岔解封二次消息*/
|
||||
RCIFollowUpReplyStru gSwitchUnflockReplySnd = { 0u }; /*道岔解封二次确认*/
|
||||
|
||||
AtsFollowUpCmdFstStru gSecUnflockMsgFst = { 0u }; /*区段解封首次消息*/
|
||||
RCIFollowUpReplyStru gSecUnflockReplyFst = { 0u }; /*区段解封首次确认*/
|
||||
AtsFollowUpCmdSndStru gSecUnflockMsgSnd = { 0u }; /*区段解封二次消息*/
|
||||
RCIFollowUpReplyStru gSecUnflockReplySnd = { 0u }; /*区段解封二次确认*/
|
||||
|
||||
AtsFollowUpCmdFstStru gSignalUnflockMsgFst = { 0u }; /*信号机解封首次消息*/
|
||||
RCIFollowUpReplyStru gSignalUnflockReplyFst = { 0u }; /*信号机解封首次确认*/
|
||||
AtsFollowUpCmdSndStru gSignalUnflockMsgSnd = { 0u }; /*信号机解封二次消息*/
|
||||
RCIFollowUpReplyStru gSignalUnflockReplySnd = { 0u }; /*信号机解封二次确认*/
|
||||
|
||||
AtsFollowUpCmdFstStru gZRJMsgFst = { 0u }; /*总人解首次消息*/
|
||||
RCIFollowUpReplyStru gZRJReplyFst = { 0u }; /*总人解首次确认*/
|
||||
AtsFollowUpCmdSndStru gZRJMsgSnd = { 0u }; /*总人解二次消息*/
|
||||
RCIFollowUpReplyStru gZRJReplySnd = { 0u }; /*总人解二次确认*/
|
||||
|
||||
AtsFollowUpCmdFstStru gCanclPsdExceptMsgFst = { 0u }; /*解除站台门异常首次消息*/
|
||||
RCIFollowUpReplyStru gCanclPsdExceptReplyFst = { 0u }; /*解除站台门异常首次确认*/
|
||||
AtsFollowUpCmdSndStru gCanclPsdExceptMsgSnd = { 0u }; /*解除站台门异常二次消息*/
|
||||
RCIFollowUpReplyStru gCanclPsdExceptReplySnd = { 0u }; /*解除站台门异常二次确认*/
|
||||
|
||||
/*
|
||||
* 功能描述: 组包Ci到Ats逻辑区段已征用信息
|
||||
* 参数说明: const UINT8* pDataBuf, 数据缓冲区
|
||||
@@ -189,7 +219,6 @@ UINT8 ParseAtsOrXianDiToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLengt
|
||||
UINT32 dwCiAndAtsTimeOutTime = 0u; /*联锁与ATS通信中断时间*/
|
||||
UINT32 dwCiCurappCycleTime = 0u; /*联锁当前周期*/
|
||||
INT32 remainValidiy = 0; /*剩余时间是否有效*/
|
||||
UINT16 wApplyDataLenth = 0U; /*应用层数据长度*/
|
||||
UINT16 wTmpDataLen = 0U; /*数据长度临时记录变量*/
|
||||
UINT16 wMsgLen = 0U; /*一条应用数据长度*/
|
||||
UINT16 wMsgType = 0U; /*报文类型*/
|
||||
@@ -198,7 +227,14 @@ UINT8 ParseAtsOrXianDiToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLengt
|
||||
UINT8 chCurSystemAreaState = 0U; /*当前系统区域状态*/
|
||||
UINT32 dwReciveCmdDataAtsCycNum = 0U; /*收到ATS命令数据时ATS周期号*/
|
||||
UINT32 dwSystemUpdateMainUseCycNum = 0U; /*系统主用起始周期号*/
|
||||
|
||||
UINT16 wPreCmdNum = 0U;/*上周期命令数:用于命令帧校验通过、二次信息校验失败时清除本次收到命令帧*/
|
||||
UINT16 wCurCmdNum = 0U;/*命令帧解析后当前命令总数*/
|
||||
AtsFollowUpCmdFstStru tempFstCmd[FOLLOWUP_MSGID_MAX] = { 0U };/*一次命令临时存储*/
|
||||
AtsFollowUpCmdSndStru tempSndCmd[FOLLOWUP_MSGID_MAX] = { 0U };/*二次命令临时存储*/
|
||||
UINT16 wIndex = 0U;/*临时信息存储索引*/
|
||||
UINT16 wMsgTypeTmp = 0U;/*拷贝回全局变量的信息类型*/
|
||||
AtsFollowUpCmdFstStru *pGlobalFst = NULL;
|
||||
AtsFollowUpCmdSndStru *pGlobalSnd = NULL;
|
||||
if ((NULL!= dataBuf) && (0u < dataLength))
|
||||
{
|
||||
chAtsInterfaceType = GetCiFunctionSwitchConfig(FUNC_ATS_INTERFACE_IDENTIFIER);
|
||||
@@ -261,6 +297,8 @@ UINT8 ParseAtsOrXianDiToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLengt
|
||||
else
|
||||
{
|
||||
chRetVal = CI_SUCCESS;
|
||||
/*先获取上一周期是存储进路办理命令数*/
|
||||
wPreCmdNum = GetCiRevCmdStruCurSum();
|
||||
|
||||
while (wTmpDataLen < hlhtGalHead.totalDataLen)
|
||||
{
|
||||
@@ -321,6 +359,83 @@ UINT8 ParseAtsOrXianDiToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLengt
|
||||
debug_infor_printf((const)"\nATS/Xiandi %d Not Deal Cmd,Because chCurSystemAreaState %d\n", chDeciveId, chCurSystemAreaState);
|
||||
}
|
||||
break;
|
||||
case ATS_CI_INFO_FST_DS_CANCEL:
|
||||
case ATS_CI_INFO_FST_SWIUNFLOCK:
|
||||
case ATS_CI_INFO_FST_FAULTUNLOCK:
|
||||
case ATS_CI_INFO_FST_SECUNFLOCK:
|
||||
case ATS_CI_INFO_FST_SIGUNFLOCK:
|
||||
case ATS_CI_INFO_FST_ZONGRENJIE:
|
||||
case ATS_CI_INFO_FST_PSD_UNEXCEPT:
|
||||
chCurSystemAreaState = GetLocalCiBackUpPattern();
|
||||
if (SYSTEM_WORK_MODE_MAIN == chCurSystemAreaState)
|
||||
{
|
||||
/*主用解析操作命令,必须检查当前该包数据是否已经处理过*/
|
||||
dwReciveCmdDataAtsCycNum = GetReciveCmdDataAtsCycNum(chDevType, chDeciveId);
|
||||
dwSystemUpdateMainUseCycNum = GetSystemUpdateMainUseCycNum();
|
||||
|
||||
if ((dwReciveCmdDataAtsCycNum < hlhtGalHead.crntOwnMsgSN) ||
|
||||
(dwSystemUpdateMainUseCycNum <= hlhtGalHead.recvOppMsgSN))
|
||||
{
|
||||
/*当前ATS发送数据时的周期号大于接收到ATS数据时ATS周期号
|
||||
或当前ATS发送数据时的联锁周期号大于等于当前系统升级主用起始周期号*/
|
||||
wIndex = (wMsgType - ATS_CI_INFO_FST_DS_CANCEL) / 4;
|
||||
if ((FOLLOWUP_MSGID_MAX > wIndex)&&(ATS_CI_INFO_TYPE_FIRST_LEN == wMsgCheckLen))
|
||||
{
|
||||
chRetVal = ProcessCmdFirstMsgCheck(dataBuf, ii, &tempFstCmd[wIndex]);
|
||||
ii += ATS_CI_INFO_TYPE_FIRST_LEN;
|
||||
chExistCmdDataFlag = 1U; /*先设置存在命令数据标志有效,数据解析不过在下面置为无效*/
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;/*越界防护*/
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ii += wMsgCheckLen;
|
||||
/*已经被另外一机处理过了*/
|
||||
debug_infor_printf((const)"\nATS/Xiandi %d Not Deal FstCmd%d,Because curCmd has been processed by another System,dwReciveCmdDataAtsCycNum %d dwSystemUpdateMainUseCycNum %d\n", chDeciveId, wMsgType, dwReciveCmdDataAtsCycNum, dwSystemUpdateMainUseCycNum);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ATS_CI_INFO_SND_DS_CANCEL:
|
||||
case ATS_CI_INFO_SND_SWIUNFLOCK:
|
||||
case ATS_CI_INFO_SND_FAULTUNLOCK:
|
||||
case ATS_CI_INFO_SND_SECUNFLOCK:
|
||||
case ATS_CI_INFO_SND_SIGUNFLOCK:
|
||||
case ATS_CI_INFO_TYPE_SND_ZRJ:
|
||||
case ATS_CI_INFO_SND_PSD_UNEXCEPT:
|
||||
chCurSystemAreaState = GetLocalCiBackUpPattern();
|
||||
if (SYSTEM_WORK_MODE_MAIN == chCurSystemAreaState)
|
||||
{
|
||||
/*主用解析操作命令,必须检查当前该包数据是否已经处理过*/
|
||||
dwReciveCmdDataAtsCycNum = GetReciveCmdDataAtsCycNum(chDevType, chDeciveId);
|
||||
dwSystemUpdateMainUseCycNum = GetSystemUpdateMainUseCycNum();
|
||||
|
||||
if ((dwReciveCmdDataAtsCycNum < hlhtGalHead.crntOwnMsgSN) ||
|
||||
(dwSystemUpdateMainUseCycNum <= hlhtGalHead.recvOppMsgSN))
|
||||
{
|
||||
wIndex = (wMsgType - ATS_CI_INFO_SND_DS_CANCEL) / 4;
|
||||
if ((FOLLOWUP_MSGID_MAX > wIndex) && (ATS_CI_INFO_TYPE_SND_LEN == wMsgCheckLen))
|
||||
{
|
||||
chRetVal = ProcessCmdSndMsgCheck(dataBuf, ii, &tempSndCmd[wIndex]);
|
||||
ii += ATS_CI_INFO_TYPE_SND_LEN;
|
||||
chExistCmdDataFlag = 1U; /*先设置存在命令数据标志有效,数据解析不过在下面置为无效*/
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;/*越界防护*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ii += wMsgCheckLen;
|
||||
/*已经被另外一机处理过了*/
|
||||
debug_infor_printf((const)"\nATS/Xiandi %d Not Deal SndCmd%d,Because curCmd has been processed by another System,dwReciveCmdDataAtsCycNum %d dwSystemUpdateMainUseCycNum %d\n", chDeciveId, wMsgType, dwReciveCmdDataAtsCycNum, dwSystemUpdateMainUseCycNum);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
chRetVal = CI_ERROR;
|
||||
break;
|
||||
@@ -340,20 +455,50 @@ UINT8 ParseAtsOrXianDiToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLengt
|
||||
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == chRetVal)
|
||||
{
|
||||
/*校验数据长度*/
|
||||
if (hlhtGalHead.totalDataLen != ii - 31U)
|
||||
if ((hlhtGalHead.totalDataLen != ii - (UINT16)31U) || (dataLength != hlhtGalHead.totalDataLen+ (UINT16)31U))
|
||||
{
|
||||
/* 31为应用数据帧头长度 */
|
||||
chRetVal = CI_ERROR;
|
||||
debug_infor_printf((char*)"Lenght Error \n");
|
||||
}
|
||||
|
||||
if (CI_SUCCESS != chRetVal)
|
||||
{
|
||||
/*清除本次存储的命令信息*/
|
||||
wCurCmdNum = GetCiRevCmdStruCurSum();/*当前命令信息数*/
|
||||
ToaClearCmd();
|
||||
for (wIndex = wPreCmdNum; wIndex <= wCurCmdNum; wIndex++)
|
||||
{
|
||||
(void)CommonMemSet(&CiRevCmdDataStru[wIndex], (UINT32)sizeof(CommandDataStruct), 0u, (UINT32)sizeof(CommandDataStruct));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
/*将临时一二次信息拷贝到全局变量*/
|
||||
for (wIndex = 0U; wIndex < FOLLOWUP_MSGID_MAX; wIndex++)
|
||||
{
|
||||
if (FLAG_SET == tempFstCmd[wIndex].chFlag)
|
||||
{
|
||||
wMsgTypeTmp = ATS_CI_INFO_FST_DS_CANCEL + wIndex*(UINT16)4U;
|
||||
pGlobalFst = GetAtsFollowUpMsgFst(wMsgTypeTmp);
|
||||
if (NULL != pGlobalFst)
|
||||
{
|
||||
(void)CommonMemCpy((void *)(pGlobalFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&tempFstCmd[wIndex]), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
}
|
||||
}
|
||||
if (FLAG_SET == tempSndCmd[wIndex].chFlag)
|
||||
{
|
||||
wMsgTypeTmp = ATS_CI_INFO_SND_DS_CANCEL + wIndex*(UINT16)4U;
|
||||
pGlobalSnd = GetAtsFollowUpMsgSnd(wMsgTypeTmp);
|
||||
if (NULL != pGlobalSnd)
|
||||
{
|
||||
(void)CommonMemCpy((void *)(pGlobalSnd), (UINT32)sizeof(AtsFollowUpCmdSndStru), (const void *)(&tempSndCmd[wIndex]), (UINT32)sizeof(AtsFollowUpCmdSndStru));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (CI_SUCCESS == chRetVal)
|
||||
{
|
||||
@@ -578,6 +723,12 @@ UINT8 PackCiToAtsOrXianDiData(const UINT8 deviceId, const UINT8 targetDevType, c
|
||||
; /*继续组包*/
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == chReval)
|
||||
{
|
||||
/*进行一次、二次回复单独信息帧组包*/
|
||||
chReval = PackCiToAtsFollowUpMsg(ciToXianDiDataBuffer, &ii, targetDevType, PACK_ATS_TYPE_CENTER);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1297,6 +1448,9 @@ UINT8 FindFirstOrder(UINT8 SecondOrder)
|
||||
case ATS_CMD_EMERG_XS_CANCEL_TWO:
|
||||
reVal = ATS_CMD_EMERG_XS_CANCEL_ONE; /*取消紧急临时限速一次*/
|
||||
break;
|
||||
case ATS_CMD_CONNECT_ROUTE_RELEASE_TWO: /*联络线接车进路解锁二次*/
|
||||
reVal = ATS_CMD_CONNECT_ROUTE_RELEASE_ONE; /*联络线接车进路解锁一次*/
|
||||
break;
|
||||
default:
|
||||
reVal = 0u;
|
||||
break;
|
||||
@@ -2065,7 +2219,7 @@ UINT16 TransCiToAtsSwitchZzjInfo(OcToATSSwitchZzjData* ciSendAtsSwitchZzjData, U
|
||||
}
|
||||
else
|
||||
{
|
||||
/*道岔没被驱动四开,此转辙机状态设置为正常*/
|
||||
/*道岔没被驱动四开,此转辙机状态设置为故障*/
|
||||
ciSendAtsSwitchZzjData[wSwitchNum].szSwitchIncldeZzjState[jj] = OC_TO_ATS_SWITCH_ZZJ_ALARM;
|
||||
}
|
||||
}
|
||||
@@ -3622,7 +3776,8 @@ UINT8 ReciveAtsCmdDeal(const UINT8* dataBuf, UINT16* dataIndex,const UINT16 wDat
|
||||
}
|
||||
|
||||
if (CI_ERROR == chRetVal)
|
||||
{/*包内有数据错误,丢包处理*/
|
||||
{
|
||||
/*包内有数据错误,丢包处理*/
|
||||
/*清除这本包数据*/
|
||||
ToaClearCmd();
|
||||
commandTotalSum = 0u;
|
||||
@@ -3931,3 +4086,503 @@ void PackRcOrCiDeciveCommonState(UINT8* ciToXianDiDataBuffer, UINT16* ii)
|
||||
/*入参检查失败,不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取ATS对应的首次消息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return 获取ATS二次信息帧中的首次消息
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
AtsFollowUpCmdFstStru * GetAtsFollowUpMsgFst(UINT16 chMsgType)
|
||||
{
|
||||
AtsFollowUpCmdFstStru* rtnVal = NULL;
|
||||
switch (chMsgType)
|
||||
{
|
||||
case ATS_CI_INFO_FST_DS_CANCEL:
|
||||
rtnVal = &gDansuoCancleMsgFst;
|
||||
break;
|
||||
case ATS_CI_INFO_FST_SWIUNFLOCK:
|
||||
rtnVal = &gSwitchUnflockMsgFst;
|
||||
break;
|
||||
case ATS_CI_INFO_FST_FAULTUNLOCK:
|
||||
break;
|
||||
case ATS_CI_INFO_FST_SECUNFLOCK:
|
||||
rtnVal = &gSecUnflockMsgFst;
|
||||
break;
|
||||
case ATS_CI_INFO_FST_SIGUNFLOCK:
|
||||
rtnVal = &gSignalUnflockMsgFst;
|
||||
break;
|
||||
case ATS_CI_INFO_FST_ZONGRENJIE:
|
||||
break;
|
||||
case ATS_CI_INFO_FST_PSD_UNEXCEPT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return rtnVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取ATS对应的二次消息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return 获取ATS二次信息帧中的再次消息
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
AtsFollowUpCmdSndStru * GetAtsFollowUpMsgSnd(UINT16 chMsgType)
|
||||
{
|
||||
AtsFollowUpCmdSndStru* rtnVal = NULL;
|
||||
switch (chMsgType)
|
||||
{
|
||||
case ATS_CI_INFO_SND_DS_CANCEL:
|
||||
rtnVal = &gDansuoCancleMsgSnd;
|
||||
break;
|
||||
case ATS_CI_INFO_SND_SWIUNFLOCK:
|
||||
rtnVal = &gSwitchUnflockMsgSnd;
|
||||
break;
|
||||
case ATS_CI_INFO_SND_FAULTUNLOCK:
|
||||
break;
|
||||
case ATS_CI_INFO_SND_SECUNFLOCK:
|
||||
rtnVal = &gSecUnflockMsgSnd;
|
||||
break;
|
||||
case ATS_CI_INFO_SND_SIGUNFLOCK:
|
||||
rtnVal = &gSignalUnflockMsgSnd;
|
||||
break;
|
||||
case ATS_CI_INFO_TYPE_SND_ZRJ:
|
||||
break;
|
||||
case ATS_CI_INFO_SND_PSD_UNEXCEPT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return rtnVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取ATS对应的首次反馈消息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return 获取ATS二次信息帧中的首次反馈
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
RCIFollowUpReplyStru * GetAtsFollowUpReplyFst(UINT16 chMsgType)
|
||||
{
|
||||
RCIFollowUpReplyStru* rtnVal = NULL;
|
||||
switch (chMsgType)
|
||||
{
|
||||
case RCI_ATS_INFO_FST_DS_CANCEL:
|
||||
rtnVal = &gDansuoCancleReplyFst;
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_SWIUNFLOCK:
|
||||
rtnVal = &gSwitchUnflockReplyFst;
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_FAULTUNLOCK:
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_SECUNFLOCK:
|
||||
rtnVal = &gSecUnflockReplyFst;
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_SIGUNFLOCK:
|
||||
rtnVal = &gSignalUnflockReplyFst;
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_ZONGRENJIE:
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_PSD_UNEXCEPT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return rtnVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取ATS对应的再次反馈消息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return 获取ATS二次信息帧中的再次反馈
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
RCIFollowUpReplyStru * GetAtsFollowUpReplySnd(UINT16 chMsgType)
|
||||
{
|
||||
RCIFollowUpReplyStru* rtnVal = NULL;
|
||||
switch (chMsgType)
|
||||
{
|
||||
case RCI_ATS_INFO_SND_DS_CANCEL:
|
||||
rtnVal = &gDansuoCancleReplySnd;
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_SWIUNFLOCK:
|
||||
rtnVal = &gSwitchUnflockReplySnd;
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_FAULTUNLOCK:
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_SECUNFLOCK:
|
||||
rtnVal = &gSecUnflockReplySnd;
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_SIGUNFLOCK:
|
||||
rtnVal = &gSignalUnflockReplySnd;
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_ZRJ:
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_PSD_UNEXCEPT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return rtnVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 清除1次ATS命令信息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return void
|
||||
* @note by fan 20260603
|
||||
*/
|
||||
void ClearAtsCmdMsgFst(UINT16 chMsgType)
|
||||
{
|
||||
switch (chMsgType)
|
||||
{
|
||||
case ATS_CI_INFO_FST_DS_CANCEL:
|
||||
(void)CommonMemSet((void*)&gDansuoCancleMsgFst, (UINT32)sizeof(gDansuoCancleMsgFst), (UINT8)0U, (UINT32)sizeof(gDansuoCancleMsgFst));
|
||||
break;
|
||||
case ATS_CI_INFO_FST_SWIUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSwitchUnflockMsgFst, (UINT32)sizeof(gSwitchUnflockMsgFst), (UINT8)0U, (UINT32)sizeof(gSwitchUnflockMsgFst));
|
||||
break;
|
||||
case ATS_CI_INFO_FST_FAULTUNLOCK:
|
||||
break;
|
||||
case ATS_CI_INFO_FST_SECUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSecUnflockMsgFst, (UINT32)sizeof(gSecUnflockMsgFst), (UINT8)0U, (UINT32)sizeof(gSecUnflockMsgFst));
|
||||
break;
|
||||
case ATS_CI_INFO_FST_SIGUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSignalUnflockMsgFst, (UINT32)sizeof(gSignalUnflockMsgFst), (UINT8)0U, (UINT32)sizeof(gSignalUnflockMsgFst));
|
||||
break;
|
||||
case ATS_CI_INFO_FST_ZONGRENJIE:
|
||||
break;
|
||||
case ATS_CI_INFO_FST_PSD_UNEXCEPT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 清除首次反馈信息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return void
|
||||
* @note by fan 20260603
|
||||
*/
|
||||
void ClearAtsCmdReplyFst(UINT16 chMsgType)
|
||||
{
|
||||
switch (chMsgType)
|
||||
{
|
||||
case RCI_ATS_INFO_FST_DS_CANCEL:
|
||||
(void)CommonMemSet((void*)&gDansuoCancleReplyFst, (UINT32)sizeof(gDansuoCancleReplyFst), (UINT8)0U, (UINT32)sizeof(gDansuoCancleReplyFst));
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_SWIUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSwitchUnflockReplyFst, (UINT32)sizeof(gSwitchUnflockReplyFst), (UINT8)0U, (UINT32)sizeof(gSwitchUnflockReplyFst));
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_FAULTUNLOCK:
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_SECUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSecUnflockReplyFst, (UINT32)sizeof(gSecUnflockReplyFst), (UINT8)0U, (UINT32)sizeof(gSecUnflockReplyFst));
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_SIGUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSignalUnflockReplyFst, (UINT32)sizeof(gSignalUnflockReplyFst), (UINT8)0U, (UINT32)sizeof(gSignalUnflockReplyFst));
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_ZONGRENJIE:
|
||||
break;
|
||||
case RCI_ATS_INFO_FST_PSD_UNEXCEPT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @brief 清除2次ATS命令信息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return void
|
||||
* @note by fan 20260603
|
||||
*/
|
||||
void ClearAtsCmdMsgSnd(UINT16 chMsgType)
|
||||
{
|
||||
switch (chMsgType)
|
||||
{
|
||||
case ATS_CI_INFO_SND_DS_CANCEL:
|
||||
(void)CommonMemSet((void*)&gDansuoCancleMsgSnd, (UINT32)sizeof(gDansuoCancleMsgSnd), (UINT8)0U, (UINT32)sizeof(gDansuoCancleMsgSnd));
|
||||
break;
|
||||
case ATS_CI_INFO_SND_SWIUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSwitchUnflockMsgSnd, (UINT32)sizeof(gSwitchUnflockMsgSnd), (UINT8)0U, (UINT32)sizeof(gSwitchUnflockMsgSnd));
|
||||
break;
|
||||
case ATS_CI_INFO_SND_FAULTUNLOCK:
|
||||
break;
|
||||
case ATS_CI_INFO_SND_SECUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSecUnflockMsgSnd, (UINT32)sizeof(gSecUnflockMsgSnd), (UINT8)0U, (UINT32)sizeof(gSecUnflockMsgSnd));
|
||||
break;
|
||||
case ATS_CI_INFO_SND_SIGUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSignalUnflockMsgSnd, (UINT32)sizeof(gSignalUnflockMsgSnd), (UINT8)0U, (UINT32)sizeof(gSignalUnflockMsgSnd));
|
||||
break;
|
||||
case ATS_CI_INFO_TYPE_SND_ZRJ:
|
||||
break;
|
||||
case ATS_CI_INFO_SND_PSD_UNEXCEPT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 清除再次反馈信息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return void
|
||||
* @note by fan 20260603
|
||||
*/
|
||||
void ClearAtsCmdReplySnd(UINT16 chMsgType)
|
||||
{
|
||||
switch (chMsgType)
|
||||
{
|
||||
case RCI_ATS_INFO_SND_DS_CANCEL:
|
||||
(void)CommonMemSet((void*)&gDansuoCancleReplySnd, (UINT32)sizeof(gDansuoCancleReplySnd), (UINT8)0U, (UINT32)sizeof(gDansuoCancleReplySnd));
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_SWIUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSwitchUnflockReplySnd, (UINT32)sizeof(gSwitchUnflockReplySnd), (UINT8)0U, (UINT32)sizeof(gSwitchUnflockReplySnd));
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_FAULTUNLOCK:
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_SECUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSecUnflockReplySnd, (UINT32)sizeof(gSecUnflockReplySnd), (UINT8)0U, (UINT32)sizeof(gSecUnflockReplySnd));
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_SIGUNFLOCK:
|
||||
(void)CommonMemSet((void*)&gSignalUnflockReplySnd, (UINT32)sizeof(gSignalUnflockReplySnd), (UINT8)0U, (UINT32)sizeof(gSignalUnflockReplySnd));
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_ZRJ:
|
||||
break;
|
||||
case RCI_ATS_INFO_SND_PSD_UNEXCEPT:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @brief 收到ATS/网关首次信息解析检查处理
|
||||
* @param[in] const UINT8* dataBuf, 数据缓冲区
|
||||
* @param[in] UINT16* dataIndex, 数据索引
|
||||
* @param[Out] AtsFollowUpCmdFstStru* pMsgFst 首次信息变量指针
|
||||
* @return CI_ERROR 失败 CI_SUCCESS 成功
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
UINT8 ProcessCmdFirstMsgCheck(const UINT8* dataBuf, UINT16 dataIndex, AtsFollowUpCmdFstStru* pMsgFst)
|
||||
{
|
||||
UINT8 chRetVal = CI_ERROR;
|
||||
UINT16 ii = 0U;
|
||||
UINT32 dwCurCyc = Get2oo2CurCycleNum();
|
||||
if ((NULL != dataBuf) && (0U != dataIndex)&&(NULL != pMsgFst))
|
||||
{
|
||||
chRetVal = CI_SUCCESS;
|
||||
ii = dataIndex;
|
||||
/*无条件更新最新一次命令*/
|
||||
pMsgFst->chAtsId = dataBuf[ii++];
|
||||
pMsgFst->chRtuId = dataBuf[ii++];
|
||||
pMsgFst->wIndex = ShortFromChar(&dataBuf[ii]); /* 操作站编号 */
|
||||
ii += 2u;
|
||||
pMsgFst->chTiocId = dataBuf[ii++];
|
||||
pMsgFst->dwTime = LongFromChar(&dataBuf[ii]); /* 请求时间 */
|
||||
ii += 4u;
|
||||
pMsgFst->wDevId = ShortFromChar(&dataBuf[ii]); /* 设备编号 */
|
||||
ii += 2u;
|
||||
if (((0U == pMsgFst->chAtsId) || (0U == pMsgFst->chRtuId))
|
||||
&&(0U<pMsgFst->wIndex)
|
||||
&& (0U < pMsgFst->wDevId) && (UINT16_MAX > pMsgFst->wDevId)
|
||||
&& (0U < pMsgFst->chTiocId) && (CI_SUM_MAX> pMsgFst->chTiocId))
|
||||
{
|
||||
pMsgFst->chFlag = FLAG_SET;
|
||||
pMsgFst->dwCycle = dwCurCyc;
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
return chRetVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 收到ATS/网关再次命令检查处理
|
||||
* @param[in] const UINT8* dataBuf, 数据缓冲区
|
||||
* @param[in] UINT16* dataIndex, 数据索引
|
||||
* @param[Out] AtsFollowUpCmdSndStru* pMsgSnd 再次信息变量指针
|
||||
* @return CI_ERROR 失败 CI_SUCCESS 成功
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
UINT8 ProcessCmdSndMsgCheck(const UINT8* dataBuf, UINT16 dataIndex, AtsFollowUpCmdSndStru* pMsgSnd)
|
||||
{
|
||||
UINT8 chRetVal = CI_ERROR;
|
||||
UINT16 ii = 0U;
|
||||
UINT32 dwCurCyc = Get2oo2CurCycleNum();
|
||||
if ((NULL != dataBuf) && (0U != dataIndex) && (NULL != pMsgSnd))
|
||||
{
|
||||
chRetVal = CI_SUCCESS;
|
||||
ii = dataIndex;
|
||||
pMsgSnd->chAtsId = dataBuf[ii++];
|
||||
pMsgSnd->chRtuId = dataBuf[ii++];
|
||||
pMsgSnd->wIndex = ShortFromChar(&dataBuf[ii]); /* 操作站编号 */
|
||||
ii += 2u;
|
||||
pMsgSnd->chTiocId = dataBuf[ii++];
|
||||
pMsgSnd->dwTime = LongFromChar(&dataBuf[ii]); /* 请求时间 */
|
||||
ii += 4u;
|
||||
pMsgSnd->wDevId = ShortFromChar(&dataBuf[ii]); /* 设备编号 */
|
||||
ii += 2u;
|
||||
pMsgSnd->dwCrc32 = LongFromChar(&dataBuf[ii]); /* CRC32 */
|
||||
ii += 4u;
|
||||
if (((0U == pMsgSnd->chAtsId) || (0U == pMsgSnd->chRtuId))
|
||||
&& (0U<pMsgSnd->wIndex)
|
||||
&& (0U < pMsgSnd->wDevId) && (UINT16_MAX > pMsgSnd->wDevId)
|
||||
&& (0U < pMsgSnd->chTiocId) && (CI_SUM_MAX> pMsgSnd->chTiocId))
|
||||
{
|
||||
pMsgSnd->chFlag = FLAG_SET;
|
||||
pMsgSnd->dwCycle = dwCurCyc;
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
return chRetVal;
|
||||
}
|
||||
/**
|
||||
* @brief ATS/网关/现地 二次命令回复处理
|
||||
* @brief 发送ATS通用站场状态处理
|
||||
* @param[in] UINT8* ciToXianDiDataBuffer CI组包给ATS或现地的数据数组
|
||||
* @param[out] UINT16* wDataIndex CI组包给ATS或现地的数据索引
|
||||
* @param[in] const UINT8 chTargetType, 目标系统类型
|
||||
* @param[in] const UINT8 chAtsType, ats(设备0x03)类型
|
||||
* @return 无
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
UINT8 PackCiToAtsFollowUpMsg(UINT8* ciToXianDiDataBuffer, UINT16* wDataIndex, UINT8 chTargetType, UINT8 chAtsType)
|
||||
{
|
||||
UINT8 reVal = CI_ERROR;
|
||||
UINT16 ii = 0U;/*游标*/
|
||||
UINT16 j = 0U;
|
||||
UINT16 wMsgIndex = 0u;/*命令帧类型 遍历使用*/
|
||||
RCIFollowUpReplyStru * strCfmTemp = NULL;/*回复信息指针*/
|
||||
UINT16 wMagDataLenIndex = 0U;
|
||||
UINT16 wMagLen = 0U;/*单信息长度记录*/
|
||||
UINT8 chPackCheck = CI_ERROR;/*检查组包设备是否与消息对应*/
|
||||
UINT32 dwCurCyc = Get2oo2CurCycleNum();
|
||||
if ((NULL != ciToXianDiDataBuffer) && (NULL != wDataIndex) &&
|
||||
((CI_SYSTEM_TYPE_XIANDI == chTargetType)||(CI_SYSTEM_TYPE_ATS == chTargetType)))
|
||||
{
|
||||
ii = *wDataIndex;
|
||||
for (j = 0U; j < FOLLOWUP_MSGID_MAX; j++)
|
||||
{
|
||||
wMsgIndex = (UINT16)0x0300U + j* (UINT16)4U + (UINT16)2U;
|
||||
/*获取首次消息反馈*/
|
||||
strCfmTemp = GetAtsFollowUpReplyFst(wMsgIndex);
|
||||
/*校验内容:消息有效、消息属于对应设备*/
|
||||
if ((NULL != strCfmTemp)&&(dwCurCyc == strCfmTemp->dwTime))
|
||||
{
|
||||
if ((0U < strCfmTemp->chAtsId) && (CI_SYSTEM_TYPE_ATS == chTargetType) && (PACK_ATS_TYPE_GATEWAY == chAtsType))
|
||||
{
|
||||
/*atsID不为0、对应设备为网关*/
|
||||
chPackCheck = CI_SUCCESS;
|
||||
}
|
||||
else if ((0U < strCfmTemp->chRtuId) && (CI_SYSTEM_TYPE_XIANDI == chTargetType))
|
||||
{
|
||||
/*Rtu ID不为0、对应设备为现地*/
|
||||
chPackCheck = CI_SUCCESS;
|
||||
}
|
||||
else if ((0U == strCfmTemp->chAtsId)&&(0U == strCfmTemp->chRtuId)&&(CI_SYSTEM_TYPE_ATS == chTargetType) && (PACK_ATS_TYPE_CENTER == chAtsType))
|
||||
{
|
||||
/*全0 给ATS组包*/
|
||||
chPackCheck = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
chPackCheck = CI_ERROR;/*非本设备*/
|
||||
}
|
||||
if(CI_SUCCESS == chPackCheck)
|
||||
{
|
||||
wMagDataLenIndex = ii;
|
||||
ii += 2U;
|
||||
ShortToChar(wMsgIndex, &ciToXianDiDataBuffer[ii]);/* 报文类型 */
|
||||
ii += 2u;
|
||||
/* 预留2字节 */
|
||||
ii += 2u;
|
||||
ciToXianDiDataBuffer[ii++] = strCfmTemp->chTiocId; /*RC/CI编号*/
|
||||
ciToXianDiDataBuffer[ii++] = strCfmTemp->chRtuId; /*RTU id*/
|
||||
ShortToChar(strCfmTemp->wIndex , &ciToXianDiDataBuffer[ii]);/* 操作站 */
|
||||
ii += 2u;
|
||||
LongToChar(strCfmTemp->dwTime, &ciToXianDiDataBuffer[ii]); /* 收到请求时间 */
|
||||
ii += 4U;
|
||||
ciToXianDiDataBuffer[ii++] = strCfmTemp->chOpStatus; /*反馈*/
|
||||
LongToChar(strCfmTemp->dwCrc32, &ciToXianDiDataBuffer[ii]); /* CRC */
|
||||
ii += 4U;
|
||||
wMagLen = ii - wMagDataLenIndex - 2U;
|
||||
/* 组数据长度 */
|
||||
ShortToChar(wMagLen, &ciToXianDiDataBuffer[wMagDataLenIndex]);
|
||||
/*修改反馈状态*/
|
||||
}
|
||||
}
|
||||
if ((NULL != strCfmTemp)&& (dwCurCyc != strCfmTemp->dwTime))
|
||||
{
|
||||
/*非本周期*/
|
||||
strCfmTemp->chFlag = FLAG_UNSET;
|
||||
}
|
||||
wMsgIndex = (UINT16)0x0300U + j* (UINT16)4U + (UINT16)4U;
|
||||
/*获取再次次消息反馈*/
|
||||
strCfmTemp = GetAtsFollowUpReplySnd(wMsgIndex);
|
||||
if ((NULL != strCfmTemp) && (dwCurCyc == strCfmTemp->dwTime))
|
||||
{
|
||||
/*校验内容:本周期消息、消息属于对应设备*/
|
||||
if ((0U < strCfmTemp->chAtsId) && (CI_SYSTEM_TYPE_ATS == chTargetType) && (PACK_ATS_TYPE_GATEWAY == chAtsType))
|
||||
{
|
||||
/*atsID不为0、对应设备为网关*/
|
||||
chPackCheck = CI_SUCCESS;
|
||||
}
|
||||
else if ((0U < strCfmTemp->chRtuId) && (CI_SYSTEM_TYPE_XIANDI == chTargetType))
|
||||
{
|
||||
/*Rtu ID不为0、对应设备为现地*/
|
||||
chPackCheck = CI_SUCCESS;
|
||||
}
|
||||
else if ((0U == strCfmTemp->chAtsId)&&(0U == strCfmTemp->chRtuId)&&(CI_SYSTEM_TYPE_ATS == chTargetType) && (PACK_ATS_TYPE_CENTER == chAtsType))
|
||||
{
|
||||
/*全0 给ATS组包*/
|
||||
chPackCheck = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
chPackCheck = CI_ERROR;/*非本设备*/
|
||||
}
|
||||
if (CI_SUCCESS == chPackCheck)
|
||||
{
|
||||
wMagDataLenIndex = ii;
|
||||
ii += 2U;
|
||||
ShortToChar(wMsgIndex, &ciToXianDiDataBuffer[ii]);/* 报文类型 */
|
||||
ii += 2u;
|
||||
/* 预留2字节 */
|
||||
ii += 2u;
|
||||
ciToXianDiDataBuffer[ii++] = strCfmTemp->chTiocId; /*RC/CI编号*/
|
||||
ciToXianDiDataBuffer[ii++] = strCfmTemp->chRtuId; /*RTU id*/
|
||||
ShortToChar(strCfmTemp->wIndex, &ciToXianDiDataBuffer[ii]);/* 操作站 */
|
||||
ii += 2u;
|
||||
LongToChar(strCfmTemp->dwTime, &ciToXianDiDataBuffer[ii]); /* 收到请求时间 */
|
||||
ii += 4U;
|
||||
ciToXianDiDataBuffer[ii++] = strCfmTemp->chOpStatus; /*反馈*/
|
||||
LongToChar(strCfmTemp->dwCrc32, &ciToXianDiDataBuffer[ii]); /* CRC */
|
||||
ii += 4U;
|
||||
wMagLen = ii - wMagDataLenIndex - 2U;
|
||||
/* 组数据长度 */
|
||||
ShortToChar(wMagLen, &ciToXianDiDataBuffer[wMagDataLenIndex]);
|
||||
/* 清零二次反馈*/
|
||||
}
|
||||
}
|
||||
if ((NULL != strCfmTemp) && (dwCurCyc != strCfmTemp->dwTime))
|
||||
{
|
||||
/*非本周期*/
|
||||
ClearAtsCmdReplySnd(wMsgIndex);
|
||||
}
|
||||
}
|
||||
*wDataIndex = ii;
|
||||
reVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*失败*/
|
||||
}
|
||||
return reVal;
|
||||
}
|
||||
@@ -75,11 +75,57 @@
|
||||
#define RCI_ATS_INFO_TYPE_DEVICE_STATE ((UINT16)0x0203U) /*RCI->ATS设备状态信息,间隔1周期发送*/
|
||||
#define ATS_CI_INFO_TYPE_HEART_STATE ((UINT16)0x0204U) /*ATS->CI心跳状态信息,周期发送*/
|
||||
#define ATS_CI_INFO_TYPE_CMD_CONTROL ((UINT16)0x0205U) /*ATS->CI命令控制信息,ATS触发发送*/
|
||||
#define ATS_CI_INFO_TYPE_GATEWAY_COMMON ((UINT16)0x0206U) /*网关->CI既有信息帧 ATS触发发送*/
|
||||
#define RCI_ATS_INFO_TYPE_GATEWAY_COMMON ((UINT16)0x0207U) /*RC->网关既有信息汇报,周期发送*/
|
||||
#define RCI_ATS_INFO_TYPE_GATEWAY_HEART ((UINT16)0x0208U) /*CI->网关周期心跳*/
|
||||
#define ATS_CI_INFO_FST_DS_CANCEL ((UINT16)0x0301U) /*ATS->CI道岔单解一次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_FST_DS_CANCEL ((UINT16)0x0302U) /*RCI->ATS道岔单解首次回复,触发单解一次后发送*/
|
||||
#define ATS_CI_INFO_SND_DS_CANCEL ((UINT16)0x0303U) /*ATS->CI道岔单解二次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_SND_DS_CANCEL ((UINT16)0x0304U) /*RCI->ATS道岔单解再次回复,触发单解二次后发送*/
|
||||
#define ATS_CI_INFO_FST_SWIUNFLOCK ((UINT16)0x0305U) /*ATS->CI道岔解封一次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_FST_SWIUNFLOCK ((UINT16)0x0306U) /*RCI->ATS道岔解封首次回复,触发解封一次后发送*/
|
||||
#define ATS_CI_INFO_SND_SWIUNFLOCK ((UINT16)0x0307U) /*ATS->CI道岔解封二次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_SND_SWIUNFLOCK ((UINT16)0x0308U) /*RCI->ATS道岔解封再次回复,触发解封二次后发送*/
|
||||
#define ATS_CI_INFO_FST_FAULTUNLOCK ((UINT16)0x0309U) /*ATS->CI 区故解 预留*/
|
||||
#define RCI_ATS_INFO_FST_FAULTUNLOCK ((UINT16)0x030AU) /*RCI->ATS区故解一次回复 预留*/
|
||||
#define ATS_CI_INFO_SND_FAULTUNLOCK ((UINT16)0x030BU) /*ATS->CI区故解二次 预留*/
|
||||
#define RCI_ATS_INFO_SND_FAULTUNLOCK ((UINT16)0x030CU) /*RCI->ATS区故解二次 预留*/
|
||||
#define ATS_CI_INFO_FST_SECUNFLOCK ((UINT16)0x030DU) /*ATS->CI区段解封一次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_FST_SECUNFLOCK ((UINT16)0x030EU) /*RCI->ATS区段解封首次回复,触发解封一次后发送*/
|
||||
#define ATS_CI_INFO_SND_SECUNFLOCK ((UINT16)0x030FU) /*ATS->CI区段解封二次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_SND_SECUNFLOCK ((UINT16)0x0310U) /*RCI->ATS区段解封再次回复,触发解封二次后发送*/
|
||||
#define ATS_CI_INFO_FST_SIGUNFLOCK ((UINT16)0x0311U) /*ATS->CI信号机解封一次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_FST_SIGUNFLOCK ((UINT16)0x0312U) /*RCI->ATS信号机解封首次回复,触发解封一次后发送*/
|
||||
#define ATS_CI_INFO_SND_SIGUNFLOCK ((UINT16)0x0313U) /*ATS->CI信号机解封二次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_SND_SIGUNFLOCK ((UINT16)0x0314U) /*RCI->ATS信号机解封再次回复,触发解封二次后发送*/
|
||||
#define ATS_CI_INFO_FST_ZONGRENJIE ((UINT16)0x0315U) /*ATS->CI总人解一次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_FST_ZONGRENJIE ((UINT16)0x0316U) /*RCI->ATS总人解首次回复,触发一次后发送*/
|
||||
#define ATS_CI_INFO_TYPE_SND_ZRJ ((UINT16)0x0317U) /*ATS->CI总人解二次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_SND_ZRJ ((UINT16)0x0318U) /*RCI->ATS总人解再次回复,触发二次后发送*/
|
||||
#define ATS_CI_INFO_FST_PSD_UNEXCEPT ((UINT16)0x0319U) /*ATS->CI站台门异常解除一次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_FST_PSD_UNEXCEPT ((UINT16)0x031AU) /*RCI->ATS站台门异常解除首次回复,触发一次后发送*/
|
||||
#define ATS_CI_INFO_SND_PSD_UNEXCEPT ((UINT16)0x031BU) /*ATS->CI站台门异常解除二次命令,ATS触发发送*/
|
||||
#define RCI_ATS_INFO_SND_PSD_UNEXCEPT ((UINT16)0x031CU) /*RCI->ATS站台门异常解除再次回复,触发二次后发送*/
|
||||
|
||||
|
||||
#define SHOW_2OO2_STATE_MAIN ((UINT8)0x55U) /*显示主备系状态-主系*/
|
||||
#define SHOW_2OO2_STATE_BACKUP ((UINT8)0xaaU) /*显示主备系状态-备系*/
|
||||
#define SHOW_2OO2_STATE_UNKNOW ((UINT8)0xFFU) /*显示主备系状态-未知*/
|
||||
|
||||
#define CONFIRM_REPLY_SUCCESS ((UINT8)1u) /*确认成功*/
|
||||
#define CONFIRM_FST_UNSET ((UINT8)2u) /*首次回复未设置该状态*/
|
||||
#define CONFIRM_FST_BELONGERROR ((UINT8)3u) /*首次回复设备不属于本集中区*/
|
||||
#define CONFIRM_DEVICE_NONROUTE_SET ((UINT8)5u) /*回复非进路调车已办理*/
|
||||
|
||||
#define CONFIRM_SND_DIFFCMD ((UINT8)2u) /*再次回复操作不一致*/
|
||||
#define CONFIRM_SND_FIRST_NOTFIND ((UINT8)3u) /*再次回首次命令未执行*/
|
||||
#define CONFIRM_SND_CRCFAIL ((UINT8)4u) /*再次回复CRC校验失败*/
|
||||
|
||||
#define FOLLOWUP_CONFIRM_TIMEOUT ((UINT16)400u) /*首次消息等待二次消息超时时间*/
|
||||
#define PACK_ATS_TYPE_CENTER ((UINT8) 0xAAU)/*ATS二次信息回复组包中区分ATS与网关使用后,代表ATS*/
|
||||
#define PACK_ATS_TYPE_GATEWAY ((UINT8) 0x55U) /*ATS二次信息回复组包中区分ATS与网关使用后,代表网关*/
|
||||
#define FOLLOWUP_MSGID_MAX ((UINT16)7) /*暂定二次命令种类,遍历使用*/
|
||||
|
||||
/*执行电插箱相关信息*/
|
||||
typedef struct s_PlusBoxDataSendATS
|
||||
{
|
||||
@@ -143,6 +189,36 @@ extern UINT32 FirstCmdId; /*
|
||||
extern ReciveAtsCmdDataCycInfo szReciveAtsCmdDataCycInfo[ATS_SUM_MAX * 2U]; /*收到ATS命令数据周期号信息数组*/
|
||||
extern UINT16 gReciveAtsCmdDataDeviceSum; /*收到ATS命令数据设备数目*/
|
||||
|
||||
extern AtsFollowUpCmdFstStru gDansuoCancleMsgFst;/*取消单锁首次消息*/
|
||||
extern RCIFollowUpReplyStru gDansuoCancleReplyFst;/*取消单锁首次确认*/
|
||||
extern AtsFollowUpCmdSndStru gDansuoCancleMsgSnd; /*取消单锁二次消息*/
|
||||
extern RCIFollowUpReplyStru gDansuoCancleReplySnd; /*取消单锁二次确认*/
|
||||
|
||||
extern AtsFollowUpCmdFstStru gSwitchUnflockMsgFst; /*道岔解封首次消息*/
|
||||
extern RCIFollowUpReplyStru gSwitchUnflockReplyFst; /*道岔解封首次确认*/
|
||||
extern AtsFollowUpCmdSndStru gSwitchUnflockMsgSnd; /*道岔解封二次消息*/
|
||||
extern RCIFollowUpReplyStru gSwitchUnflockReplySnd; /*道岔解封二次确认*/
|
||||
|
||||
extern AtsFollowUpCmdFstStru gSecUnflockMsgFst; /*区段解封首次消息*/
|
||||
extern RCIFollowUpReplyStru gSecUnflockReplyFst; /*区段解封首次确认*/
|
||||
extern AtsFollowUpCmdSndStru gSecUnflockMsgSnd; /*区段解封二次消息*/
|
||||
extern RCIFollowUpReplyStru gSecUnflockReplySnd; /*区段解封二次确认*/
|
||||
|
||||
extern AtsFollowUpCmdFstStru gSignalUnflockMsgFst; /*信号机解封首次消息*/
|
||||
extern RCIFollowUpReplyStru gSignalUnflockReplyFst; /*信号机解封首次确认*/
|
||||
extern AtsFollowUpCmdSndStru gSignalUnflockMsgSnd; /*信号机解封二次消息*/
|
||||
extern RCIFollowUpReplyStru gSignalUnflockReplySnd; /*信号机解封二次确认*/
|
||||
|
||||
extern AtsFollowUpCmdFstStru gZRJMsgFst; /*总人解首次消息*/
|
||||
extern RCIFollowUpReplyStru gZRJReplyFst; /*总人解首次确认*/
|
||||
extern AtsFollowUpCmdSndStru gZRJMsgSnd; /*总人解二次消息*/
|
||||
extern RCIFollowUpReplyStru gZRJReplySnd; /*总人解二次确认*/
|
||||
|
||||
extern AtsFollowUpCmdFstStru gCanclPsdExceptMsgFst; /*解除站台门异常首次消息*/
|
||||
extern RCIFollowUpReplyStru gCanclPsdExceptReplyFst; /*解除站台门异常首次确认*/
|
||||
extern AtsFollowUpCmdSndStru gCanclPsdExceptMsgSnd; /*解除站台门异常二次消息*/
|
||||
extern RCIFollowUpReplyStru gCanclPsdExceptReplySnd; /*解除站台门异常二次确认*/
|
||||
|
||||
/*
|
||||
* 功能描述: 解析操作命令数据帧
|
||||
* 参数说明: const UINT8* dataBuf, 数据缓冲区
|
||||
@@ -502,6 +578,30 @@ void SendAtsCommonStationStateDeal(UINT8* ciToXianDiDataBuffer, UINT16* wDataInd
|
||||
*/
|
||||
UINT8 ReciveAtsCmdDeal(const UINT8* dataBuf, UINT16* dataIndex, const UINT16 wDataLength);
|
||||
|
||||
/**
|
||||
* @brief 收到ATS二次命令帧中一次命令解析处理
|
||||
* @param[in] const UINT8* dataBuf, 数据缓冲区
|
||||
* @param[in] UINT16 dataIndex, 数据索引
|
||||
* @param[in] const UINT16 dataLength, 数据长度
|
||||
* @param[in] const UINT16 wMsgType, 帧类型
|
||||
* @param[in]AtsFollowUpCmdFstStru* pTempTotalFstMsg, 解析中临时存储本次解析一次命令空间
|
||||
* @return CI_ERROR 失败 CI_SUCCESS 成功
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
UINT8 ReciveAtsFollowUpFstCmd(const UINT8* dataBuf, UINT16 dataIndex, const UINT16 wDataLength, const UINT16 wMsgType, AtsFollowUpCmdFstStru* pTempTotalFstMsg);
|
||||
|
||||
/**
|
||||
* @brief 收到ATS二次命令帧中二次命令解析处理
|
||||
* @param[in] const UINT8* dataBuf, 数据缓冲区
|
||||
* @param[in] UINT16 dataIndex, 数据索引
|
||||
* @param[in] const UINT16 dataLength, 数据长度
|
||||
* @param[in] const UINT16 wMsgType, 帧类型
|
||||
* @param[in]AtsFollowUpCmdSndStru* pTempTotalSndMsg, 解析中临时存储本次解析二次命令空间
|
||||
* @return CI_ERROR 失败 CI_SUCCESS 成功
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
UINT8 ReciveAtsFollowUpSndCmd(const UINT8* dataBuf, UINT16 dataIndex, const UINT16 wDataLength, const UINT16 wMsgType, AtsFollowUpCmdSndStru* pTempTotalSndMsg);
|
||||
|
||||
/**
|
||||
* @brief 更新ATS命令数据周期号信息
|
||||
* @param[in] UINT8 chDeviceType 设备类型
|
||||
@@ -529,6 +629,100 @@ UINT32 GetReciveCmdDataAtsCycNum(UINT8 chDeviceType, UINT8 chDeviceId);
|
||||
*/
|
||||
void PackRcOrCiDeciveCommonState(UINT8* ciToXianDiDataBuffer, UINT16* ii);
|
||||
|
||||
/**
|
||||
* @brief 获取ATS对应的首次消息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return 获取ATS二次信息帧中的首次消息
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
AtsFollowUpCmdFstStru * GetAtsFollowUpMsgFst(UINT16 chMsgType);
|
||||
|
||||
/**
|
||||
* @brief 获取ATS对应的二次消息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return 获取ATS二次信息帧中的再次消息
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
AtsFollowUpCmdSndStru * GetAtsFollowUpMsgSnd(UINT16 chMsgType);
|
||||
|
||||
/**
|
||||
* @brief 获取ATS对应的首次反馈消息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return 获取ATS二次信息帧中的首次反馈
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
RCIFollowUpReplyStru * GetAtsFollowUpReplyFst(UINT16 chMsgType);
|
||||
/**
|
||||
* @brief 获取ATS对应的再次反馈消息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return 获取ATS二次信息帧中的再次反馈
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
RCIFollowUpReplyStru * GetAtsFollowUpReplySnd(UINT16 chMsgType);
|
||||
|
||||
/**
|
||||
* @brief 清除1次ATS命令信息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return void
|
||||
* @note by fan 20260603
|
||||
*/
|
||||
void ClearAtsCmdMsgFst(UINT16 chMsgType);
|
||||
|
||||
/**
|
||||
* @brief 清除2次ATS命令信息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return void
|
||||
* @note by fan 20260603
|
||||
*/
|
||||
void ClearAtsCmdMsgSnd(UINT16 chMsgType);
|
||||
|
||||
/**
|
||||
* @brief 清除再次反馈信息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return void
|
||||
* @note by fan 20260603
|
||||
*/
|
||||
void ClearAtsCmdReplySnd(UINT16 chMsgType);
|
||||
|
||||
/**
|
||||
* @brief 清除首次反馈信息
|
||||
* @param[in] const UINT16 wMsgType, 命令类型
|
||||
* @return void
|
||||
* @note by fan 20260603
|
||||
*/
|
||||
void ClearAtsCmdReplyFst(UINT16 chMsgType);
|
||||
|
||||
/**
|
||||
* @brief ATS/网关/现地 二次命令回复处理
|
||||
* @brief 发送ATS通用站场状态处理
|
||||
* @param[in] UINT8* ciToXianDiDataBuffer CI组包给ATS或现地的数据数组
|
||||
* @param[out] UINT16* wDataIndex CI组包给ATS或现地的数据索引
|
||||
* @param[in] const UINT8 chTargetType, 目标系统类型
|
||||
* @param[in] const UINT8 chAtsType, ats(设备0x03)类型
|
||||
* @return 无
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
UINT8 PackCiToAtsFollowUpMsg(UINT8* ciToXianDiDataBuffer, UINT16* wDataIndex, UINT8 chTargetType, UINT8 chAtsType);
|
||||
/**
|
||||
* @brief 收到ATS/网关首次信息解析检查处理
|
||||
* @param[in] const UINT8* dataBuf, 数据缓冲区
|
||||
* @param[in] UINT16* dataIndex, 数据索引
|
||||
* @param[Out] AtsFollowUpCmdFstStru* pMsgFst 首次信息变量指针
|
||||
* @return CI_ERROR 失败 CI_SUCCESS 成功
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
UINT8 ProcessCmdFirstMsgCheck(const UINT8* dataBuf, UINT16 dataIndex, AtsFollowUpCmdFstStru* pMsgFst);
|
||||
|
||||
/**
|
||||
* @brief 收到ATS/网关再次命令检查处理
|
||||
* @param[in] const UINT8* dataBuf, 数据缓冲区
|
||||
* @param[in] UINT16* dataIndex, 数据索引
|
||||
* @param[Out] AtsFollowUpCmdSndStru* pMsgSnd 再次信息变量指针
|
||||
* @return CI_ERROR 失败 CI_SUCCESS 成功
|
||||
* @note by fan 20260602
|
||||
*/
|
||||
UINT8 ProcessCmdSndMsgCheck(const UINT8* dataBuf, UINT16 dataIndex, AtsFollowUpCmdSndStru* pMsgSnd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -231,6 +231,12 @@ extern "C" {
|
||||
UINT16 szNeedCheckProSwtStateOlpIdBuf[OVERLAP_SUM_MAX]; /*需要检查防护道岔状态的保护区段ID数组*/
|
||||
UINT16 wSwitchSumOfOtherCi; /*涉及到保护区段征用的其它控区道岔数量*/
|
||||
UINT16 szSwitchIdBufOfOtherCi[SWITCH_SUM_MAX]; /*涉及到保护区段征用的其它控区道岔数量*/
|
||||
|
||||
/*互联互通增加分界数据类型*/
|
||||
UINT16 wSwitchPhySecNum; /*道岔所在物理区段数量*/
|
||||
UINT16 wSwitchPhySecBuf[PHYSICAL_SECTION_SUM_MAX]; /*道岔所在物理区段数组*/
|
||||
UINT16 wXianSuLogSecNum; /*限速逻辑区段数量*/
|
||||
UINT16 wXianSuLogSecBuf[LOGIC_SECTION_SUM_MAX]; /*限速逻辑区段数组*/
|
||||
} CiTransmitStruct;
|
||||
|
||||
/* 相邻TIOC发来的通信车 */
|
||||
@@ -1443,11 +1449,12 @@ UINT8 PackManufacDefPacket(UINT8* pInputBuf, UINT16* pItemLen, const UINT8 dstCi
|
||||
* 参数说明:const UINT8 *pInputData 输入数据指针
|
||||
* UINT16 *pItemLen 该项数据在输入数据中的长度
|
||||
* const UINT8 srcCiId 源联锁ID
|
||||
* const UINT16 packetLen 报文长度
|
||||
* 返 回 值:CI_SUCCESS 1 解析成功
|
||||
* CI_ERROR 0 解析失败
|
||||
* Created By LQ 2025.05.26
|
||||
*/
|
||||
UINT8 ParseManufacDefPacket(const UINT8* pInputData, UINT16* pItemLen, const UINT8 srcCiId);
|
||||
UINT8 ParseManufacDefPacket(const UINT8* pInputData, UINT16* pItemLen, const UINT8 srcCiId, const UINT16 packetLen);
|
||||
|
||||
/*
|
||||
* 功能描述:组CI到本控区RC单帧数据
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "../DataManage/PlatDataManage.h"
|
||||
#include "dquCIInterFace.h"
|
||||
#include "NonAutoReturnDataManage.h"
|
||||
|
||||
#include "ReverseCutDataManage.h"
|
||||
#include "2oo2InterfaceDataManage.h"
|
||||
|
||||
PlatHeartDataStruct RecvHeartDataStru = { 0U }; /*平台心跳帧数据结构*/
|
||||
@@ -524,6 +524,11 @@ UINT8 SwitchMaskManage(UINT8 MaskType, UINT16 DeviceId, UINT16 MaskId, UINT8* da
|
||||
UINT16 indexFind = 0U;
|
||||
UINT8 devBelongThisLine = 0U;
|
||||
UINT8 switchBoardNum = 0U;
|
||||
UINT8 chLocalCiOCSswitch = 0U;
|
||||
UINT8 chMainCotrolOCId = 0U;
|
||||
|
||||
chLocalCiOCSswitch = GetLocalCiOCSswitch();
|
||||
|
||||
|
||||
switchLockStatus = GetSwitchLockStatus(DeviceId);
|
||||
|
||||
@@ -698,15 +703,19 @@ UINT8 SwitchMaskManage(UINT8 MaskType, UINT16 DeviceId, UINT16 MaskId, UINT8* da
|
||||
}
|
||||
break;
|
||||
case MASK_TYPE_SWITCH_OPEN_CAP:
|
||||
chMainCotrolOCId = GetSwitchMainCotrolOCId(DeviceId);/*获取主控OC*/
|
||||
for (i = 0u; i < m_SwitchNum; i++)
|
||||
{
|
||||
if (m_Switches[i].DeviceId == DeviceId)
|
||||
{
|
||||
if ((chMainCotrolOCId == m_Switches[i].OcId) || (OC_S_OFF == chLocalCiOCSswitch))
|
||||
{/*当前有主控OC或OC-S功能关闭*/
|
||||
flagFind = 1u;
|
||||
indexFind = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (1u == flagFind)
|
||||
{
|
||||
/*板卡状态有一系是开盖状态*/
|
||||
@@ -1632,6 +1641,10 @@ UINT8 OverlapMaskManage(UINT8 MaskType, UINT16 DeviceId, UINT16 MaskId, UINT8* d
|
||||
UINT8 RouteMaskManage(UINT8 MaskType, UINT16 DeviceId, UINT16 MaskId, UINT8* dataBuf)
|
||||
{
|
||||
UINT8 returnValue = CI_SUCCESS; /*返回值默认成功*/
|
||||
UINT8 chVirCiId = 0u;
|
||||
UINT8 chVirCiType = 0u;
|
||||
UINT8 ciTrainTestState = 0u; /*试车线联锁状态*/
|
||||
UINT32 xuanpaiStartCycNum = 0u;/*进路选排开始周期数*/
|
||||
UINT8 routeState = GetRouteState(DeviceId); /*获取进路状态*/
|
||||
UINT8 routeLevel = GetRouteLevel(DeviceId);
|
||||
UINT16 lastPhyLockId = GetRouteLastPhySectionId(DeviceId); /*获取指定ID进路最后一个物理区段ID*/
|
||||
@@ -1640,12 +1653,11 @@ UINT8 RouteMaskManage(UINT8 MaskType, UINT16 DeviceId, UINT16 MaskId, UINT8* dat
|
||||
UINT8 dcQState = GetRouteDCQState(DeviceId);/*进路调车请求状态*/
|
||||
UINT8 dcTState = GetRouteDCTYState(DeviceId);/*进路调车同意状态*/
|
||||
UINT8 chDCAgreeBtnErrState = GetRouteDcAgreeButtonErrState(DeviceId);/*进路调车同意按钮故障状态*/
|
||||
UINT8 ciTrainTestState = 0u; /*ÊÔ³µÏßÁªËø×´Ì¬*/
|
||||
|
||||
UINT8 routeAutoTriggerFlag = GetRouteAutoTriggerFlag(DeviceId); /*获取进路自动触发标志*/
|
||||
|
||||
UINT8 chVirCiId = 0u;
|
||||
UINT8 chVirCiType = 0u;
|
||||
|
||||
xuanpaiStartCycNum = GetRouteXuanPaiStartCycNum(DeviceId);/*进路选排开始周期数*/
|
||||
switch (MaskType)
|
||||
{
|
||||
case MASK_TYPE_ROUTE_IDLE:/*进路空闲码位*/
|
||||
@@ -1659,7 +1671,8 @@ UINT8 RouteMaskManage(UINT8 MaskType, UINT16 DeviceId, UINT16 MaskId, UINT8* dat
|
||||
}
|
||||
break;
|
||||
case MASK_TYPE_ROUTE_XUANPAI:/*进路选排码位*/
|
||||
if (ROUTE_STATE_XUANPAI == routeState)
|
||||
/* 处于选排周期号有效即可发送码位*/
|
||||
if (xuanpaiStartCycNum > 0u)
|
||||
{
|
||||
SetMaskValue(MaskId, dataBuf);
|
||||
}
|
||||
@@ -4325,6 +4338,8 @@ void PackCiToCimDeviceData(void)
|
||||
UINT32 switchCollTolerateCycNum = 0U;
|
||||
UINT8 chSwitchBDState = SEND_CIM_COLLTOLERATE_NO;
|
||||
UINT8 chSignalDsState = 0xFFU;
|
||||
UINT8 chReverseState = 0xFFU;
|
||||
const ReverseSwitchCfgDataStru* pReverseCfg = NULL;
|
||||
|
||||
/*发送道岔数据*/
|
||||
pSwitchData = GetSwitchData();
|
||||
@@ -4644,9 +4659,35 @@ void PackCiToCimDeviceData(void)
|
||||
ciToCimDataBuffer[ii++] = pFloodGateDataCC[deviceId].FloodGateCloseApplyIvocSum; /*防淹门关门申请列车数量*/
|
||||
ciToCimDataBuffer[ii++] = pFloodGateDataCC[deviceId].FloodGateCloseAnsIvocSum; /*防淹门关门允许,列车回复数量*/
|
||||
ciToCimDataBuffer[ii++] = pFloodGateDataCC[deviceId].FloodGateAccessUTFlag; /*防淹门接近区段是否有非通信车标志*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*打印倒切柜数据*/
|
||||
pReverseCfg = GetReverseCfgData();
|
||||
if (NULL != pReverseCfg)
|
||||
{
|
||||
if (0U == pReverseCfg->wId)
|
||||
{
|
||||
ciToCimDataBuffer[ii++] = 0U;/*倒切开关数量发0*/
|
||||
}
|
||||
else
|
||||
{
|
||||
ciToCimDataBuffer[ii++] = 1U;/*倒切开关数量发1*/
|
||||
ShortToChar(pReverseCfg->wId, &ciToCimDataBuffer[ii]);/*倒切开关ID (初始化字段)*/
|
||||
ii += 2u;
|
||||
chReverseState = GetReverseSwitchState();
|
||||
ciToCimDataBuffer[ii++] = chReverseState;/*倒切开关状态*/
|
||||
ShortToChar(pReverseCfg->wRelateBoardNum, &ciToCimDataBuffer[ii]);/*倒切板卡数量*/
|
||||
ii += 2u;
|
||||
for (jj = 0u; jj <pReverseCfg->wRelateBoardNum; jj++)
|
||||
{
|
||||
ShortToChar(pReverseCfg->strRelateBoardBuf[jj].wReversBoardId, &ciToCimDataBuffer[ii]);/*倒切板卡ID*/
|
||||
ii += 2u;
|
||||
chReverseState = GetReverseBoardState(pReverseCfg->strRelateBoardBuf[jj].wReversBoardId);
|
||||
ciToCimDataBuffer[ii++] = chReverseState;/*倒切板卡状态*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*发送CIM*/
|
||||
debug_infor_printf((const)"\nCIM_SEND_DEVSTATE:%d", ii);
|
||||
debug_out_array(0xAA, ciToCimDataBuffer, ii);
|
||||
@@ -5537,3 +5578,130 @@ void PackCiToCimCollDiffData(void)
|
||||
/*发送维护机*/
|
||||
(void)DarkInfoPack(CIM_INFO_IO_COLL_DIFF_ALARM, ciToCimDataBuffer, ii);
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 组包发送CIM双系IO采集不一致信息
|
||||
* 参数说明: void
|
||||
* 返回值 : 无
|
||||
*/
|
||||
void PackCiToCimSwitchRedunAlarmData(void)
|
||||
{
|
||||
UINT16 wSwitchCurSum = 0u;
|
||||
UINT32 dwRedunHunXianAlarmCfg = 0u;
|
||||
UINT16 i = 0u;
|
||||
UINT16 wSwitchId = 0u;
|
||||
UINT8 cRedunCollCfg = 0u;
|
||||
UINT16 cAlarmCount = 0u;
|
||||
UINT32 dwHunXianStCyc = 0u;
|
||||
UINT8 cRedunHunXianStt = 0u;
|
||||
UINT32 dwFaultStCyc = 0u;
|
||||
UINT8 j = 0u;
|
||||
UINT32 dwSwitchDrvStCyc = 0u;
|
||||
UINT8 cTimeOut = 0u;
|
||||
UINT16 wRelayId = 0u;
|
||||
UINT16 wBelongOcId = 0u;
|
||||
UINT16 wIndex = 1u; /*组包下标,跳过1字节道岔总数*/
|
||||
UINT8 ciToCimDataBuffer[CI_TO_CIM_DATA_LEN_MAX] = { 0U }; /*数组长度5000字节,大于500个道岔*2个OC*4字节报警,暂无需越界防护*/
|
||||
|
||||
wSwitchCurSum = GetSwitchCurSum();
|
||||
dwRedunHunXianAlarmCfg = GetSwitchRedunCollHunXianCycCfg();
|
||||
for (i = 0u; i < wSwitchCurSum; i++)
|
||||
{
|
||||
wSwitchId = GetSwitchId(i);
|
||||
cRedunCollCfg = GetSwitchRedunCollCfg(wSwitchId);
|
||||
if (REDUN_COLL_YES == cRedunCollCfg)
|
||||
{
|
||||
for (j = 0u; j < SWITCH_REDUN_COLL_MAX; j++)
|
||||
{
|
||||
/*混线报警*/
|
||||
cRedunHunXianStt = GetSwitchRedunHunXianRecovStt(wSwitchId, j);
|
||||
if (REDUN_HX_RECOV_ALL != cRedunHunXianStt)
|
||||
{
|
||||
/*判断混线有效,如果道岔驱动中,容忍报警时间再报警,否则直接报警*/
|
||||
dwHunXianStCyc = GetSwitchRedunJudgHunXianStCyc(wSwitchId, j);
|
||||
dwSwitchDrvStCyc = GetSwitchDriveStartCycNum(wSwitchId);
|
||||
cTimeOut = SystemOverTimeCheck(dwHunXianStCyc, dwRedunHunXianAlarmCfg);
|
||||
if ((0u == dwSwitchDrvStCyc) || (CI_TIME_OUT == cTimeOut))
|
||||
{
|
||||
/*报警*/
|
||||
cAlarmCount += 1u;
|
||||
/*道岔ID*/
|
||||
ShortToChar(wSwitchId, &ciToCimDataBuffer[wIndex]);
|
||||
wIndex += 2u;
|
||||
/*所属OC ID,任选一个冗余采集继电器查询*/
|
||||
wRelayId = GetSwitchRedunDBJ1RelayId(wSwitchId, j);
|
||||
wBelongOcId = GetRelayBelongOCId(wRelayId);
|
||||
ciToCimDataBuffer[wIndex] = (UINT8)wBelongOcId;
|
||||
wIndex += 1u;
|
||||
/*混线报警*/
|
||||
ciToCimDataBuffer[wIndex] = REDUN_ALARM_HUNXIAN;
|
||||
wIndex += 1u;
|
||||
/*报混线则不报采集故障*/
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不报警*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*未混线,不报警*/
|
||||
}
|
||||
|
||||
/*采集故障报警*/
|
||||
dwFaultStCyc = GetSwitchRedunFaultStCyc(wSwitchId, j);
|
||||
if (0u < dwFaultStCyc)
|
||||
{
|
||||
/*采集故障有效,如果道岔驱动中,容忍报警时间再报警,否则直接报警*/
|
||||
dwSwitchDrvStCyc = GetSwitchDriveStartCycNum(wSwitchId);
|
||||
cTimeOut = SystemOverTimeCheck(dwFaultStCyc, dwRedunHunXianAlarmCfg);
|
||||
if ((0u == dwSwitchDrvStCyc) || (CI_TIME_OUT == cTimeOut))
|
||||
{
|
||||
/*报警*/
|
||||
cAlarmCount += 1u;
|
||||
/*道岔ID*/
|
||||
ShortToChar(wSwitchId, &ciToCimDataBuffer[wIndex]);
|
||||
wIndex += 2u;
|
||||
/*所属OC ID,任选一个冗余采集继电器查询*/
|
||||
wRelayId = GetSwitchRedunDBJ1RelayId(wSwitchId, j);
|
||||
wBelongOcId = GetRelayBelongOCId(wRelayId);
|
||||
ciToCimDataBuffer[wIndex] = (UINT8)wBelongOcId;
|
||||
wIndex += 1u;
|
||||
/*采集故障报警*/
|
||||
ciToCimDataBuffer[wIndex] = REDUN_ALARM_FAULT;
|
||||
wIndex += 1u;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不报警*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*未故障,不报警*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*道岔不具备冗余采集,不报警*/
|
||||
}
|
||||
}
|
||||
|
||||
if ((UINT16)UINT8_MAX < cAlarmCount)
|
||||
{
|
||||
/*报警数量非法,导向报警数量为0*/
|
||||
ciToCimDataBuffer[0] = 0u;
|
||||
(void)debug_infor_printf((const)"SwtRedunCollAlarm Err = %d\n", cAlarmCount);
|
||||
(void)DarkInfoPack(CIM_INFO_SWT_REDUN_COLL_ALARM, ciToCimDataBuffer, 1u);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*输出报警*/
|
||||
ciToCimDataBuffer[0] = (UINT8)cAlarmCount;
|
||||
(void)debug_infor_printf((const)"SwtRedunCollAlarm = %d:", cAlarmCount);
|
||||
(void)debug_out_array(0xAA, ciToCimDataBuffer, wIndex);
|
||||
(void)DarkInfoPack(CIM_INFO_SWT_REDUN_COLL_ALARM, ciToCimDataBuffer, wIndex);
|
||||
}
|
||||
}
|
||||
@@ -388,6 +388,13 @@ void PackCiToCimFlyProtectData(void);
|
||||
*/
|
||||
void PackCiToCimCollDiffData(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 组包发送CIM双系IO采集不一致信息
|
||||
* 参数说明: void
|
||||
* 返回值 : 无
|
||||
*/
|
||||
void PackCiToCimSwitchRedunAlarmData(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
#define CIM_INFO_UNIT_ALARM ((UINT16)0x2011) /*发送CIM执行单元报警*/
|
||||
#define CIM_INFO_FLYPROTECT_ALARM ((UINT16)0x2012) /*发送CIM飞车宕机报警*/
|
||||
#define CIM_INFO_IO_COLL_DIFF_ALARM ((UINT16)0x2013) /*发送CIM IO双系采集不一致报警*/
|
||||
#define CIM_INFO_SWT_REDUN_COLL_ALARM ((UINT16)0x2014) /*发送CIM道岔冗余采集报警*/
|
||||
|
||||
#define CI_AND_OTHER_TRANSMIT_GOOD ((UINT8)0x55) /*CI与其他系统双网通信正常*/
|
||||
#define CI_AND_OTHER_TRANSMIT_LINK ((UINT8)0x5A) /*CI与其他系统单网通信正常*/
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
#include "dquCIInterFace.h"
|
||||
#include "WLBrakeDataManage.h"
|
||||
#include "RRMManageAPI.h"
|
||||
#include "../ParsePack/ParsePackAtsData.h"
|
||||
#include "../HLHTMsgHead/HLHTCommonDataPacketHead.h"
|
||||
#include "../HLHTMsgHead/HLHTHeadContexManage.h"
|
||||
|
||||
AtsScreenMsgFstStru g_strAtsMsgFst = { 0u }; /*远程筛选首次消息*/
|
||||
AtsMsgCfmStru g_strAtsCfmFst = { 0u }; /*远程筛选首次确认*/
|
||||
@@ -32,14 +35,18 @@ AtsMsgCfmStru g_strSndAtsWlbCfmFst = { 0U }; /*
|
||||
AtsMsgCfmStru g_strSndAtsDaCfmFst = { 0U }; /*第二个ATS的取消脱轨防护区首次确认*/
|
||||
|
||||
/**
|
||||
* @brief 解析网关数据帧
|
||||
* @brief 解析网关数据帧---无GAL部分消息反馈内容
|
||||
* @param const UINT8* dataBuf, 数据缓冲区
|
||||
* @param const UINT16 dataLength, 数据长度
|
||||
* @param[out] UINT16* dataIndex, 数据索引
|
||||
* @param[in] const UINT16 dataLength, 数据长度
|
||||
* @return CI_SUCCESS:成功;CI_ERROR:失败
|
||||
*/
|
||||
UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, UINT16* dataIndex, const UINT16 dataLength)
|
||||
{
|
||||
UINT8 chRtn = CI_ERROR;
|
||||
UINT8 chRtn1 = CI_SUCCESS;
|
||||
UINT8 chRtn2 = CI_SUCCESS;
|
||||
UINT8 chRtn3 = CI_SUCCESS;
|
||||
UINT8 chMsgNum = 0u;
|
||||
UINT32 dwDataVer = 0u;
|
||||
UINT32 dwPrtclMsg = 0u;
|
||||
@@ -67,10 +74,11 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
UINT16 wDevId = 0U;
|
||||
UINT8 szCrcTmp[1024] = { 0U };
|
||||
|
||||
if ((NULL != dataBuf) && (0u < dataLength))
|
||||
{
|
||||
chLocalId = GetSystemParaLocalCiId();
|
||||
|
||||
if ((NULL != dataBuf) && (0u < dataLength)&&(NULL !=dataIndex))
|
||||
{
|
||||
ii = *dataIndex;
|
||||
chLocalId = GetSystemParaLocalCiId();
|
||||
/* 消息数量 */
|
||||
chMsgNum = dataBuf[ii++];
|
||||
/* 数据版本号 */
|
||||
@@ -89,6 +97,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
else
|
||||
{
|
||||
chRtn = CI_ERROR;
|
||||
chRtn3 = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -105,6 +114,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
else
|
||||
{
|
||||
chRtn = CI_ERROR;
|
||||
chRtn3 = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -236,6 +246,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
; /*DO NOTHING*/
|
||||
}
|
||||
chRtn1 = chRtn;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -355,6 +366,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
; /*DO NOTHING*/
|
||||
}
|
||||
chRtn2 = chRtn;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -469,6 +481,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
; /*DO NOTHING*/
|
||||
}
|
||||
chRtn3 = chRtn;
|
||||
break;
|
||||
}
|
||||
case MSG_TYPE_EA_CANCLE_FIRST:/* 区间疏散取消首次消息 */
|
||||
@@ -580,6 +593,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
;
|
||||
}
|
||||
chRtn1 = chRtn;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -682,6 +696,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
;
|
||||
}
|
||||
chRtn2 = chRtn;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -801,7 +816,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
chRtn3 = chRtn;
|
||||
break;
|
||||
}
|
||||
case MSG_TYPE_WLB_SET_FIRST: /* 全线列车紧急制动一次命令 */
|
||||
@@ -923,6 +938,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
;
|
||||
}
|
||||
chRtn1 = chRtn;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1039,6 +1055,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
;
|
||||
}
|
||||
chRtn2 = chRtn;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1169,7 +1186,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
chRtn3 = chRtn;
|
||||
break;
|
||||
}
|
||||
case MSG_TYPE_DA_CANCLE_FIRST:/* 脱轨防护区取消首次消息 */
|
||||
@@ -1281,6 +1298,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
;
|
||||
}
|
||||
chRtn1 = chRtn;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1383,6 +1401,7 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
;
|
||||
}
|
||||
chRtn2 = chRtn;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1502,12 +1521,13 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
chRtn3 = chRtn;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
chRtn = CI_ERROR;
|
||||
chRtn3 = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1541,24 +1561,44 @@ UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
|
||||
if (CI_SUCCESS == chRtn)
|
||||
{
|
||||
; /*不处理*/
|
||||
*dataIndex = ii;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*命令校验非法后,清除对应相关的命令存储*/
|
||||
if (CI_ERROR == chRtn1)
|
||||
{
|
||||
ClearAtsMsgFirst();
|
||||
ClearAtsMsgSecond();
|
||||
ClearAtsEaMsgFirst();
|
||||
ClearAtsEaMsgSecond();
|
||||
ClearAtsWlbMsgFirst();
|
||||
ClearAtsWlbMsgSecond();
|
||||
ClearAtsDaMsgFirst();
|
||||
ClearAtsDaMsgSecond();
|
||||
}
|
||||
if (CI_ERROR == chRtn2)
|
||||
{
|
||||
ClearSndAtsScreenFstCfmMsg();
|
||||
ClearSndAtsEaFstCfmMsg();
|
||||
ClearSndAtsWlbFstCfmMsg();
|
||||
ClearSndAtsDaFstCfmMsg();
|
||||
}
|
||||
|
||||
if (CI_ERROR == chRtn3)
|
||||
{
|
||||
ClearAtsMsgFirst();
|
||||
ClearAtsEaMsgFirst();
|
||||
ClearAtsWlbMsgFirst();
|
||||
ClearAtsDaMsgFirst();
|
||||
ClearSndAtsScreenFstCfmMsg();
|
||||
ClearSndAtsEaFstCfmMsg();
|
||||
ClearSndAtsWlbFstCfmMsg();
|
||||
ClearSndAtsDaFstCfmMsg();
|
||||
ClearAtsMsgSecond();
|
||||
ClearAtsEaMsgSecond();
|
||||
ClearAtsWlbMsgSecond();
|
||||
ClearAtsDaMsgSecond();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return chRtn;
|
||||
}
|
||||
|
||||
@@ -1803,13 +1843,12 @@ void ClearAtsDaMsgSecond(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 组TIOC到网关数据
|
||||
* @brief 组TIOC到网关数据--既有信息
|
||||
* @param 无
|
||||
* @return CI_ERROR失败;CI_SUCCESS成功
|
||||
*/
|
||||
UINT8 PackTiocToGateWayData(const UINT8 deviceId, const UINT8 targetDevType)
|
||||
UINT8 PackTiocToGateWayData(UINT8* szToGateWayDataBuf, const UINT8 targetDevType, UINT16* wDataIndex)
|
||||
{
|
||||
UINT8 szToGateWayDataBuf[CI_TO_ATS_DATA_LEN_MAX] = { 0u };
|
||||
UINT16 ii = 0u;
|
||||
UINT16 jj = 0U;
|
||||
UINT16 wMsgNumIndex = 0u;
|
||||
@@ -1825,7 +1864,6 @@ UINT8 PackTiocToGateWayData(const UINT8 deviceId, const UINT8 targetDevType)
|
||||
UINT8 chTrainIndex = 0u;
|
||||
UINT32 dwTrainId = 0u;
|
||||
UINT16 wMsgLen = 0u;
|
||||
UINT16 wDstDevId = 0u;
|
||||
UINT16 wTrainLgcId = 0u;
|
||||
UINT8 chEaNum = 0u;
|
||||
UINT16 wEaTrainid = 0u;
|
||||
@@ -1858,7 +1896,10 @@ UINT8 PackTiocToGateWayData(const UINT8 deviceId, const UINT8 targetDevType)
|
||||
TrainFlyProtectStru * pFlyData = NULL;
|
||||
|
||||
wRcId = (UINT16)chLocalId; /* RC编号,不带类型 */
|
||||
|
||||
if ((NULL != szToGateWayDataBuf) && (NULL != wDataIndex))
|
||||
{
|
||||
ii = *wDataIndex;
|
||||
wMsgNumIndex = ii;
|
||||
/* 留出消息条数填充位置 */
|
||||
ii++;
|
||||
|
||||
@@ -2653,7 +2694,7 @@ UINT8 PackTiocToGateWayData(const UINT8 deviceId, const UINT8 targetDevType)
|
||||
|
||||
if (CI_SUCCESS == chRtn)
|
||||
{
|
||||
debug_infor_printf((const)"\n GATEWAY_FLY_SHUT_DOWN \n");
|
||||
debug_infor_printf((char*)"\n GATEWAY_FLY_SHUT_DOWN \n");
|
||||
chMsgNum = 1U;
|
||||
}
|
||||
}
|
||||
@@ -2661,16 +2702,7 @@ UINT8 PackTiocToGateWayData(const UINT8 deviceId, const UINT8 targetDevType)
|
||||
{
|
||||
/* 组包成功,填入消息数量 */
|
||||
szToGateWayDataBuf[wMsgNumIndex] = chMsgNum;
|
||||
wDstDevId = (UINT16)(((UINT16)targetDevType << 8U) | (UINT16)deviceId);
|
||||
chRtn = OutnetSafeSend(wDstDevId, 0u, &szToGateWayDataBuf[0], ii);
|
||||
if (CI_SUCCESS == chRtn)
|
||||
{
|
||||
debug_infor_printf((const)"\nGATEWAY_SEND:%d", ii);
|
||||
debug_out_array(0xAA, szToGateWayDataBuf, ii);
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
*wDataIndex = ii;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2778,3 +2810,579 @@ void ClearSndAtsDaFstCfmMsg(void)
|
||||
{
|
||||
(void)CommonMemSet((void*)&g_strSndAtsDaCfmFst, (UINT32)sizeof(AtsMsgCfmStru), (UINT8)0U, (UINT32)sizeof(AtsMsgCfmStru));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 解析网关数据帧--按照接口类型区分有无GAL
|
||||
* @param const UINT8* dataBuf, 数据缓冲区
|
||||
* @param const UINT16 dataLength, 数据长度
|
||||
* @return CI_SUCCESS:成功;CI_ERROR:失败
|
||||
* @note Created By fan 20260604
|
||||
*/
|
||||
UINT8 ParseGateWayToCiDataProc(const UINT8* dataBuf, const UINT16 dataLength)
|
||||
{
|
||||
UINT8 chAtsInterfaceType = 0U; /*ATS接口类型*/
|
||||
UINT8 chGalHeadSaved = 0u; /*通用头是否已保存标志,1保存;0未保存*/
|
||||
UINT16 ii = 0U; /*数据索引*/
|
||||
UINT8 chRetVal = CI_ERROR;
|
||||
HLHTGALInfoStruct hlhtGalHead = { 0U }; /*互联互通报文头*/
|
||||
UINT8 chHeadReval = CI_ERROR; /*互联互通报文头检查结果*/
|
||||
UINT16 wTiocRcvAtsGtwyDevTypeId = 0U;
|
||||
UINT8 chLocalCiId = GetSystemParaLocalCiId();/*联锁ID*/
|
||||
UINT16 wRemoteDevName = 0U; /*对方设备信息*/
|
||||
UINT32 dwErrCode = 0U; /*通用报文头错误码记录*/
|
||||
UINT32 dwCurCycNum = Get2oo2CurCycleNum(); /*当前周期号*/
|
||||
UINT32 dwCiAndAtsTimeOutTime = 0u; /*联锁与ATS通信中断时间*/
|
||||
INT32 remainValidiy = 0; /*剩余时间是否有效*/
|
||||
UINT32 dwCiCurappCycleTime = 0u; /*联锁当前周期*/
|
||||
UINT16 wMsgLen = 0U; /*一条应用数据长度*/
|
||||
UINT16 wTmpDataLen = 0U; /*数据长度临时记录变量*/
|
||||
UINT16 wMsgType = 0U; /*报文类型*/
|
||||
UINT16 wMsgCheckLen = 0U; /* 单帧数据长度*/
|
||||
UINT8 chCurSystemAreaState = 0U; /*当前系统区域状态*/
|
||||
UINT32 dwReciveCmdDataAtsCycNum = 0U; /*收到ATS命令数据时ATS周期号*/
|
||||
UINT32 dwSystemUpdateMainUseCycNum = 0U; /*系统主用起始周期号*/
|
||||
UINT8 chExistCmdDataFlag = 0U; /*存在命令数据标志*/
|
||||
UINT8 chDeciveId = 0U; /*网关ID*/
|
||||
AtsFollowUpCmdFstStru tempFstCmd[FOLLOWUP_MSGID_MAX] = { 0U };/*一次命令临时存储*/
|
||||
AtsFollowUpCmdSndStru tempSndCmd[FOLLOWUP_MSGID_MAX] = { 0U };/*二次命令临时存储*/
|
||||
UINT16 wIndex = 0U;/*临时信息存储索引*/
|
||||
UINT16 wMsgTypeTmp = 0U;/*拷贝回全局变量的信息类型*/
|
||||
AtsFollowUpCmdFstStru *pGlobalFst = NULL;
|
||||
AtsFollowUpCmdSndStru *pGlobalSnd = NULL;
|
||||
wTiocRcvAtsGtwyDevTypeId = GetTiocTrnsmtGtwyDevTypeId();
|
||||
chDeciveId =(UINT8)(wTiocRcvAtsGtwyDevTypeId & 0x00FFU);
|
||||
if ((NULL != dataBuf) && (0u < dataLength))
|
||||
{
|
||||
chAtsInterfaceType = GetCiFunctionSwitchConfig(FUNC_GATEWAY_INTERFACE_IDENTIFIER);
|
||||
|
||||
if (ATS_INTERFACE_EXIST_GAL != chAtsInterfaceType)
|
||||
{
|
||||
/*旧数据结构只有命令信息*/
|
||||
chRetVal = ParseGateWayToCiDataFrame(dataBuf, &ii, dataLength);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*新数据结构存在GAL报文头,且存在心跳帧或命令信息帧*/
|
||||
/*解析通用消息包头*/
|
||||
hlhtGalHead.devInterInfoType = ShortFromChar(&dataBuf[ii]);
|
||||
ii += 2U;
|
||||
hlhtGalHead.sourceId = LongFromChar(&dataBuf[ii]);
|
||||
ii += 4U;
|
||||
hlhtGalHead.destId = LongFromChar(&dataBuf[ii]);
|
||||
ii += 4U;
|
||||
hlhtGalHead.emapVerCrc = LongFromChar(&dataBuf[ii]);
|
||||
ii += 4U;
|
||||
hlhtGalHead.crntOwnMsgSN = LongFromChar(&dataBuf[ii]);
|
||||
ii += 4U;
|
||||
hlhtGalHead.comPeriod = ShortFromChar(&dataBuf[ii]);
|
||||
ii += 2U;
|
||||
hlhtGalHead.recvOppMsgSN = LongFromChar(&dataBuf[ii]);
|
||||
ii += 4U;
|
||||
hlhtGalHead.preOwnMsgSN = LongFromChar(&dataBuf[ii]);
|
||||
ii += 4U;
|
||||
hlhtGalHead.prtclVer = dataBuf[ii++];
|
||||
hlhtGalHead.totalDataLen = ShortFromChar(&dataBuf[ii]);
|
||||
ii += 2U;
|
||||
|
||||
wRemoteDevName = (CI_SYSTEM_TYPE_RCI)* 256U + chLocalCiId;
|
||||
chHeadReval = HLHTRecvCommonPacketHeadCheck(wTiocRcvAtsGtwyDevTypeId, wRemoteDevName, ATS_CI_INTERFACE_INFOTYPE, 1U, &hlhtGalHead, &dwErrCode, 0U, CI_SYSTEM_TYPE_ATS);
|
||||
|
||||
debug_infor_printf((char*)"\nGateWay%#x GAL Check Result:%d errCode:%d\n", wTiocRcvAtsGtwyDevTypeId, chHeadReval, dwErrCode); /*0x55正确,0xaa错误,0x33初始通信帧*/
|
||||
|
||||
if (HLHT_HEAD_SUCCESS == chHeadReval)
|
||||
{
|
||||
dwCiAndAtsTimeOutTime = GetCiAndAtsTransBadEnsureTime();
|
||||
dwCiCurappCycleTime = GetSystemParaAppCycleTime();
|
||||
/*计算消息的时效性*/
|
||||
remainValidiy = HLHTCommonMsgRemainingValidity(dwCiAndAtsTimeOutTime, dwCurCycNum, dwCiCurappCycleTime, hlhtGalHead.recvOppMsgSN, hlhtGalHead.crntOwnMsgSN, hlhtGalHead.preOwnMsgSN, hlhtGalHead.comPeriod);
|
||||
|
||||
if (remainValidiy > 0)
|
||||
{
|
||||
/*解析应用数据*/
|
||||
if (0u == hlhtGalHead.totalDataLen)
|
||||
{
|
||||
/* 仅有GAL头信息 */
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
else if (6u > hlhtGalHead.totalDataLen)
|
||||
{
|
||||
/* 数据长度错误,返回失败 */
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_SUCCESS;
|
||||
/*先获取上一周期是存储进路办理命令数*/
|
||||
while (wTmpDataLen < hlhtGalHead.totalDataLen)
|
||||
{
|
||||
/* 一条应用数据长度 */
|
||||
wMsgLen = ShortFromChar(&dataBuf[ii]);
|
||||
ii += 2u;
|
||||
wTmpDataLen += 2U;
|
||||
wTmpDataLen += wMsgLen;
|
||||
if (0u == wMsgLen)
|
||||
{
|
||||
; /* 无处理,继续解析下一包 */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 获取报文类型 */
|
||||
wMsgType = ShortFromChar(&dataBuf[ii]);
|
||||
ii += 2u;
|
||||
|
||||
/* 跳过预留 */
|
||||
ii += 2u;
|
||||
wMsgCheckLen = wMsgLen - 4u;
|
||||
switch (wMsgType)
|
||||
{
|
||||
case ATS_CI_INFO_TYPE_HEART_STATE:
|
||||
/* 解析心跳信息 */
|
||||
ii += wMsgCheckLen;
|
||||
break;
|
||||
case ATS_CI_INFO_TYPE_GATEWAY_COMMON:
|
||||
/* 解析既有信息 */
|
||||
chRetVal = ParseGateWayToCiDataFrame(dataBuf, &ii, wMsgCheckLen);
|
||||
chExistCmdDataFlag = 1U; /*先设置存在命令数据标志有效,数据解析不过在下面置为无效*/
|
||||
break;
|
||||
case ATS_CI_INFO_FST_DS_CANCEL:
|
||||
case ATS_CI_INFO_FST_SWIUNFLOCK:
|
||||
case ATS_CI_INFO_FST_FAULTUNLOCK:
|
||||
case ATS_CI_INFO_FST_SECUNFLOCK:
|
||||
case ATS_CI_INFO_FST_SIGUNFLOCK:
|
||||
case ATS_CI_INFO_FST_ZONGRENJIE:
|
||||
case ATS_CI_INFO_FST_PSD_UNEXCEPT:
|
||||
chCurSystemAreaState = GetLocalCiBackUpPattern();
|
||||
if (SYSTEM_WORK_MODE_MAIN == chCurSystemAreaState)
|
||||
{
|
||||
/*主用解析操作命令,必须检查当前该包数据是否已经处理过*/
|
||||
dwReciveCmdDataAtsCycNum = GetReciveCmdDataAtsCycNum(CI_SYSTEM_TYPE_ATS, chDeciveId);
|
||||
dwSystemUpdateMainUseCycNum = GetSystemUpdateMainUseCycNum();
|
||||
|
||||
if ((dwReciveCmdDataAtsCycNum < hlhtGalHead.crntOwnMsgSN) ||
|
||||
(dwSystemUpdateMainUseCycNum <= hlhtGalHead.recvOppMsgSN))
|
||||
{
|
||||
/*当前ATS发送数据时的周期号大于接收到ATS数据时ATS周期号
|
||||
或当前ATS发送数据时的联锁周期号大于等于当前系统升级主用起始周期号*/
|
||||
wIndex = (wMsgType - ATS_CI_INFO_FST_DS_CANCEL) / 4;
|
||||
if ((FOLLOWUP_MSGID_MAX > wIndex) && (ATS_CI_INFO_TYPE_FIRST_LEN == wMsgCheckLen))
|
||||
{
|
||||
chRetVal = ProcessCmdFirstMsgCheck(dataBuf, ii, &tempFstCmd[wIndex]);
|
||||
ii += ATS_CI_INFO_TYPE_FIRST_LEN;
|
||||
chExistCmdDataFlag = 1U; /*先设置存在命令数据标志有效,数据解析不过在下面置为无效*/
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;/*越界防护*/
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ii += wMsgCheckLen;
|
||||
/*已经被另外一机处理过了*/
|
||||
debug_infor_printf((char*)"\nATS/Xiandi %d Not Deal FstCmd%d,Because curCmd has been processed by another System,dwReciveCmdDataAtsCycNum %d dwSystemUpdateMainUseCycNum %d\n", chDeciveId, wMsgType, dwReciveCmdDataAtsCycNum, dwSystemUpdateMainUseCycNum);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ATS_CI_INFO_SND_DS_CANCEL:
|
||||
case ATS_CI_INFO_SND_SWIUNFLOCK:
|
||||
case ATS_CI_INFO_SND_FAULTUNLOCK:
|
||||
case ATS_CI_INFO_SND_SECUNFLOCK:
|
||||
case ATS_CI_INFO_SND_SIGUNFLOCK:
|
||||
case ATS_CI_INFO_TYPE_SND_ZRJ:
|
||||
case ATS_CI_INFO_SND_PSD_UNEXCEPT:
|
||||
chCurSystemAreaState = GetLocalCiBackUpPattern();
|
||||
if (SYSTEM_WORK_MODE_MAIN == chCurSystemAreaState)
|
||||
{
|
||||
/*主用解析操作命令,必须检查当前该包数据是否已经处理过*/
|
||||
dwReciveCmdDataAtsCycNum = GetReciveCmdDataAtsCycNum(CI_SYSTEM_TYPE_ATS, chDeciveId);
|
||||
dwSystemUpdateMainUseCycNum = GetSystemUpdateMainUseCycNum();
|
||||
|
||||
if ((dwReciveCmdDataAtsCycNum < hlhtGalHead.crntOwnMsgSN) ||
|
||||
(dwSystemUpdateMainUseCycNum <= hlhtGalHead.recvOppMsgSN))
|
||||
{
|
||||
wIndex = (wMsgType - ATS_CI_INFO_SND_DS_CANCEL) / 4;
|
||||
if ((FOLLOWUP_MSGID_MAX > wIndex) && (ATS_CI_INFO_TYPE_SND_LEN == wMsgCheckLen))
|
||||
{
|
||||
chRetVal = ProcessCmdSndMsgCheck(dataBuf, ii, &tempSndCmd[wIndex]);
|
||||
ii += ATS_CI_INFO_TYPE_SND_LEN;
|
||||
chExistCmdDataFlag = 1U; /*先设置存在命令数据标志有效,数据解析不过在下面置为无效*/
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;/*越界防护*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ii += wMsgCheckLen;
|
||||
/*已经被另外一机处理过了*/
|
||||
debug_infor_printf((char*)"\nATS/Xiandi %d Not Deal SndCmd%d,Because curCmd has been processed by another System,dwReciveCmdDataAtsCycNum %d dwSystemUpdateMainUseCycNum %d\n", chDeciveId, wMsgType, dwReciveCmdDataAtsCycNum, dwSystemUpdateMainUseCycNum);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
chRetVal = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (CI_ERROR == chRetVal)
|
||||
{
|
||||
chExistCmdDataFlag = 0U;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*do nothing*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*校验数据长度*/
|
||||
if ((hlhtGalHead.totalDataLen != ii - (UINT16)31U) || (dataLength != hlhtGalHead.totalDataLen + (UINT16)31U))
|
||||
{
|
||||
/* 31为应用数据帧头长度 */
|
||||
chRetVal = CI_ERROR;
|
||||
debug_infor_printf((char*)"ParseGateWayToCiDataProc HlhtGal Length Error\n");
|
||||
}
|
||||
|
||||
if (CI_SUCCESS != chRetVal)
|
||||
{
|
||||
/*清除本次存储的命令信息*/
|
||||
ClearCurGateWayMsg();
|
||||
}
|
||||
else
|
||||
{
|
||||
/*将临时一二次信息拷贝到全局变量*/
|
||||
for (wIndex = 0U; wIndex < FOLLOWUP_MSGID_MAX; wIndex++)
|
||||
{
|
||||
if (FLAG_SET == tempFstCmd[wIndex].chFlag)
|
||||
{
|
||||
wMsgTypeTmp = ATS_CI_INFO_FST_DS_CANCEL + wIndex*(UINT16)4U;
|
||||
pGlobalFst = GetAtsFollowUpMsgFst(wMsgTypeTmp);
|
||||
if (NULL != pGlobalFst)
|
||||
{
|
||||
(void)CommonMemCpy((void *)(pGlobalFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&tempFstCmd[wIndex]), (UINT32)sizeof(AtsFollowUpCmdFstStru));
|
||||
}
|
||||
}
|
||||
if (FLAG_SET == tempSndCmd[wIndex].chFlag)
|
||||
{
|
||||
wMsgTypeTmp = ATS_CI_INFO_SND_DS_CANCEL + wIndex*(UINT16)4U;
|
||||
pGlobalSnd = GetAtsFollowUpMsgSnd(wMsgTypeTmp);
|
||||
if (NULL != pGlobalSnd)
|
||||
{
|
||||
(void)CommonMemCpy((void *)(pGlobalSnd), (UINT32)sizeof(AtsFollowUpCmdSndStru), (const void *)(&tempSndCmd[wIndex]), (UINT32)sizeof(AtsFollowUpCmdSndStru));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == chRetVal)
|
||||
{
|
||||
/*数据经过校验,需要存储通用报文上下文*/
|
||||
SetHLHTHeadCtxComPeriod(CI_SYSTEM_TYPE_ATS, chDeciveId, hlhtGalHead.comPeriod);
|
||||
SetHLHTHeadCtxSrcCrntSN(CI_SYSTEM_TYPE_ATS, chDeciveId, hlhtGalHead.crntOwnMsgSN);
|
||||
SetHLHTHeadCtxSrcOppSN(CI_SYSTEM_TYPE_ATS, chDeciveId, hlhtGalHead.recvOppMsgSN);
|
||||
SetHLHTHeadCtxSrcOwnSN(CI_SYSTEM_TYPE_ATS, chDeciveId, hlhtGalHead.preOwnMsgSN);
|
||||
SetHLHTHeadCtxCiRcvSN(CI_SYSTEM_TYPE_ATS, chDeciveId, dwCurCycNum);
|
||||
SetHLHTHeadCtxCiRcvLogId(CI_SYSTEM_TYPE_ATS, chDeciveId, 0U);
|
||||
|
||||
chGalHeadSaved = 1U;
|
||||
|
||||
if (1U == chExistCmdDataFlag)
|
||||
{
|
||||
UpdateAtsCmdDataCycInfo(CI_SYSTEM_TYPE_ATS, chDeciveId);
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*不更新最近一次收到ATS命令数据周期号*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else if (HLHT_HEAD_INIT == chHeadReval)
|
||||
{
|
||||
if (dwCurCycNum > 0U)/*判断序号大于0,因为把0当做无效序号*/
|
||||
{
|
||||
SetHLHTHeadCtxComPeriod(CI_SYSTEM_TYPE_ATS, chDeciveId, hlhtGalHead.comPeriod);
|
||||
SetHLHTHeadCtxSrcCrntSN(CI_SYSTEM_TYPE_ATS, chDeciveId, hlhtGalHead.crntOwnMsgSN);
|
||||
SetHLHTHeadCtxSrcOppSN(CI_SYSTEM_TYPE_ATS, chDeciveId, hlhtGalHead.recvOppMsgSN);
|
||||
SetHLHTHeadCtxSrcOwnSN(CI_SYSTEM_TYPE_ATS, chDeciveId, hlhtGalHead.preOwnMsgSN);
|
||||
SetHLHTHeadCtxCiRcvSN(CI_SYSTEM_TYPE_ATS, chDeciveId, dwCurCycNum);
|
||||
SetHLHTHeadCtxCiRcvLogId(CI_SYSTEM_TYPE_ATS, chDeciveId, 0U);
|
||||
|
||||
chGalHeadSaved = 1U;
|
||||
}
|
||||
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*记录校验失败信息*/
|
||||
if (GAL_COMPARE_INFO_TYPE_ERR == (dwErrCode & GAL_COMPARE_INFO_TYPE_ERR))
|
||||
{
|
||||
/*记录接口信息类型错误*/
|
||||
SetErrorData(EFUNC_PARSE_GATEWAY2CI_DATA, CI_SYSTEM_TYPE_ATS, wTiocRcvAtsGtwyDevTypeId, ETYPE_COMM_WITH_GATEWAY, CI_BACK_DATA_INFO_TYPE_ERR, ESEND_LEVEL_ZERO);
|
||||
}
|
||||
else if (GAL_COMPARE_SEND_FLAG_ERR == (dwErrCode & GAL_COMPARE_SEND_FLAG_ERR))
|
||||
{
|
||||
/*发送方标识信息错误*/
|
||||
SetErrorData(EFUNC_PARSE_GATEWAY2CI_DATA, CI_SYSTEM_TYPE_ATS, wTiocRcvAtsGtwyDevTypeId, ETYPE_COMM_WITH_GATEWAY, CI_BACK_DATA_SEND_FLAG_ERR, ESEND_LEVEL_ZERO);
|
||||
}
|
||||
else if (GAL_COMPARE_RECV_FLAG_ERR == (dwErrCode & GAL_COMPARE_RECV_FLAG_ERR))
|
||||
{
|
||||
/*数据接收方标志信息错误*/
|
||||
SetErrorData(EFUNC_PARSE_GATEWAY2CI_DATA, CI_SYSTEM_TYPE_ATS, wTiocRcvAtsGtwyDevTypeId, ETYPE_COMM_WITH_GATEWAY, CI_BACK_DATA_RECV_FLAG_ERR, ESEND_LEVEL_ZERO);
|
||||
}
|
||||
else if (GAL_COMPARE_EMAP_VER_COMP_ERR == (dwErrCode & GAL_COMPARE_EMAP_VER_COMP_ERR))
|
||||
{
|
||||
/*数据版本校验失败信息*/
|
||||
SetErrorData(EFUNC_PARSE_GATEWAY2CI_DATA, CI_SYSTEM_TYPE_ATS, wTiocRcvAtsGtwyDevTypeId, ETYPE_COMM_WITH_GATEWAY, CI_BACK_DATA_VER_CHECK_FAIL, ESEND_LEVEL_ATS);
|
||||
}
|
||||
else if (GAL_COMPARE_PROTOCOL_VER_ERR == (dwErrCode & GAL_COMPARE_PROTOCOL_VER_ERR))
|
||||
{
|
||||
/*数据协议版本号错误*/
|
||||
SetErrorData(EFUNC_PARSE_GATEWAY2CI_DATA, CI_SYSTEM_TYPE_ATS, wTiocRcvAtsGtwyDevTypeId, ETYPE_COMM_WITH_GATEWAY, CI_BACK_DATA_PROTOCOL_VER_ERR, ESEND_LEVEL_ZERO);
|
||||
}
|
||||
else if (GAL_COMPARE_MSG_BDS_SN_ERR == (dwErrCode & GAL_COMPARE_MSG_BDS_SN_ERR))
|
||||
{
|
||||
/*双方序列号错误*/
|
||||
SetErrorData(EFUNC_PARSE_GATEWAY2CI_DATA, CI_SYSTEM_TYPE_ATS, wTiocRcvAtsGtwyDevTypeId, ETYPE_COMM_WITH_GATEWAY, CI_BACK_DATA_MSG_BDS_SN_ERR, ESEND_LEVEL_ZERO);
|
||||
}
|
||||
else if (GAL_COMPARE_APP_LEN_ERR == (dwErrCode & GAL_COMPARE_APP_LEN_ERR))
|
||||
{
|
||||
/*应用层数据长度无效*/
|
||||
SetErrorData(EFUNC_PARSE_GATEWAY2CI_DATA, CI_SYSTEM_TYPE_ATS, wTiocRcvAtsGtwyDevTypeId, ETYPE_COMM_WITH_GATEWAY, CI_BACK_DATA_APP_LEN_ERR, ESEND_LEVEL_ZERO);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*记录通信故障码*/
|
||||
SetErrorData(EFUNC_PARSE_GATEWAY2CI_DATA, CI_SYSTEM_TYPE_ATS, wTiocRcvAtsGtwyDevTypeId, ETYPE_COMM_WITH_GATEWAY, CI_ERROR, ESEND_LEVEL_ZERO);
|
||||
}
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if ((CI_ERROR == chRetVal) && (0u == chGalHeadSaved))
|
||||
{
|
||||
/*如果通用头已经保存了,则不执行清除通用头操作,否则,出错后也将清除通用头*/
|
||||
ClearHlhtHeadCtx(CI_SYSTEM_TYPE_ATS, chDeciveId);
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*do nothing*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*数据无效*/
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
return chRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 组网关数据-按照接口类型区分有无GAL
|
||||
* 参数说明: QueueStruct* ciToAtsDataQueue, 组包发送队列地址
|
||||
* const UINT8 deviceId, 目标系统ID
|
||||
* const UINT8 targetDevType, 目标系统类型
|
||||
* const UINT8 frame,帧类型
|
||||
* UINT8* chSendXiandiorAtsBuf 码位数据数组首地址
|
||||
* 返回值 : 0: 组包失败
|
||||
* 1: 组包成功
|
||||
* fan 20260604
|
||||
*/
|
||||
UINT8 PackCiToGateWayDataProc(const UINT8 deviceId, const UINT8 targetDevType)
|
||||
{
|
||||
UINT8 ciToGateWayBuffer[CI_TO_ATS_DATA_LEN_MAX] = { 0u };
|
||||
UINT16 ii = 0u;
|
||||
UINT8 chReval = CI_ERROR;
|
||||
UINT8 chAtsInterfaceType = 0U; /*ATS接口类型*/
|
||||
UINT8 chLocalCiId = GetSystemParaLocalCiId(); /*本地联锁ID*/
|
||||
UINT32 dwCiEtcsId = 0U; /*联锁互联互通ID*/
|
||||
UINT32 dwAtsEtcsId = 0U; /*ATS互联互通ID*/
|
||||
UINT32 dwEmapCheckVer = 0U; /*电子地图校验版本号*/
|
||||
UINT32 dwHlhtHSrcSN = 0U; /*向CI发送数据的一方发送报文时当前的SN*/
|
||||
UINT32 dwHlhtHRcvSN = 0U; /*CI接收到数据时本身的SN*/
|
||||
UINT32 dwCurCycleNum = Get2oo2CurCycleNum(); /*联锁应用周期号*/
|
||||
UINT32 dwAppCycleTime = GetSystemParaAppCycleTime(); /*联锁应用周期*/
|
||||
UINT16 wAppDataLenIndex = 0U; /* 应用数据长度位置 */
|
||||
UINT16 wAppDataLen = 0u; /* 应用数据长度 */
|
||||
UINT16 wMagLen = 0u; /* 单包数据长度 */
|
||||
UINT16 wMagDataLenIndex = 0U; /* 消息数据长度位置 */
|
||||
UINT16 dstDevId = 0u;
|
||||
UINT8 chCurSystemAreaState = GetLocalCiBackUpPattern(); /*当前系统区域状态*/
|
||||
UINT32 dwFlyProtectOverCyc = GetFlyProtectOverCyc(); /*飞车*/
|
||||
chAtsInterfaceType = GetCiFunctionSwitchConfig(FUNC_GATEWAY_INTERFACE_IDENTIFIER);
|
||||
if (ATS_INTERFACE_EXIST_GAL != chAtsInterfaceType)
|
||||
{
|
||||
/*旧数据结构运行无需GAL报文头*/
|
||||
chReval = PackTiocToGateWayData(ciToGateWayBuffer, targetDevType, &ii);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/*新数据结构运行需要GAL报文头*/
|
||||
/*首先获取组包时所需的信息,获取成功才继续组包*/
|
||||
/*先用设备ID,后续可能用互联互通ID*/
|
||||
dwCiEtcsId = (UINT32)(CI_SYSTEM_TYPE_RCI * 256U + chLocalCiId);
|
||||
dwAtsEtcsId = (UINT32)(targetDevType * 256U + deviceId);
|
||||
chReval = GetCiEmapCheckVer(chLocalCiId, &dwEmapCheckVer, targetDevType);
|
||||
dwHlhtHSrcSN = GetHLHTHeadCtxSrcCrntSN(targetDevType, deviceId);
|
||||
dwHlhtHRcvSN = GetHLHTHeadCtxCiRcvSN(targetDevType, deviceId);
|
||||
|
||||
if (CI_SUCCESS == chReval)
|
||||
{
|
||||
/*组GAL包头*/
|
||||
ShortToChar(ATS_CI_INTERFACE_INFOTYPE, &ciToGateWayBuffer[ii]);/*接口信息类型*/
|
||||
ii += 2u;
|
||||
LongToChar(dwCiEtcsId, &ciToGateWayBuffer[ii]);/*发送方标识信息*/
|
||||
ii += 4u;
|
||||
LongToChar(dwAtsEtcsId, &ciToGateWayBuffer[ii]);/*接收方标识信息*/
|
||||
ii += 4u;
|
||||
LongToChar(dwEmapCheckVer, &ciToGateWayBuffer[ii]);/*电子地图版本校验信息*/
|
||||
ii += 4u;
|
||||
LongToChar(dwCurCycleNum, &ciToGateWayBuffer[ii]);/*本方消息序列号*/
|
||||
ii += 4u;
|
||||
ShortToChar((UINT16)dwAppCycleTime, &ciToGateWayBuffer[ii]);/*设备通讯周期*/
|
||||
ii += 2u;
|
||||
LongToChar(dwHlhtHSrcSN, &ciToGateWayBuffer[ii]);/*对方消息序列号:recvOppMsgSN记录收到对方上一条消息中的对方消息序列号*/
|
||||
ii += 4u;
|
||||
LongToChar(dwHlhtHRcvSN, &ciToGateWayBuffer[ii]);/*收到上一条消息时本方序列号*/
|
||||
ii += 4u;
|
||||
|
||||
ciToGateWayBuffer[ii++] = 1U; /*CI_ATS接口协议版本号*/
|
||||
/*应用层数据长度*/
|
||||
wAppDataLenIndex = ii;
|
||||
ii += 2u;
|
||||
|
||||
wMagDataLenIndex = ii;
|
||||
ii += 2U;
|
||||
if (RC_WORK_MODE_CI == CI_SYSTEM_TYPE_RCI)
|
||||
{
|
||||
ShortToChar(RCI_ATS_INFO_TYPE_GATEWAY_HEART, &ciToGateWayBuffer[ii]);/* 报文类型 */
|
||||
ii += 2u;
|
||||
/* 预留2字节 */
|
||||
ii += 2u;
|
||||
}
|
||||
else
|
||||
{
|
||||
ShortToChar(ATS_CI_INFO_TYPE_GATEWAY_COMMON, &ciToGateWayBuffer[ii]);/* 报文类型 */
|
||||
ii += 2u;
|
||||
/* 预留2字节 */
|
||||
ii += 2u;
|
||||
|
||||
chReval = PackTiocToGateWayData(ciToGateWayBuffer, targetDevType, &ii);
|
||||
}
|
||||
wMagLen = ii - wMagDataLenIndex - 2U;
|
||||
/* 组数据长度 */
|
||||
ShortToChar(wMagLen, &ciToGateWayBuffer[wMagDataLenIndex]);
|
||||
/*进行一次、二次回复单独信息帧组包*/
|
||||
/*主用模式、未飞车*/
|
||||
if ((CI_SUCCESS == chReval)&& (SYSTEM_WORK_MODE_MAIN == chCurSystemAreaState)&& ( 0U == dwFlyProtectOverCyc))
|
||||
{
|
||||
chReval = PackCiToAtsFollowUpMsg(ciToGateWayBuffer, &ii, targetDevType, PACK_ATS_TYPE_GATEWAY);
|
||||
}
|
||||
}
|
||||
|
||||
/* 填充数据长度 */
|
||||
if (CI_SUCCESS == chReval)
|
||||
{
|
||||
wAppDataLen = ii - wAppDataLenIndex - 2U;
|
||||
ShortToChar(wAppDataLen, &ciToGateWayBuffer[wAppDataLenIndex]);
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
if ((ii > CI_TO_ATS_DATA_LEN_MAX) || (CI_ERROR == chReval))
|
||||
{
|
||||
chReval = CI_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 向外发送 */
|
||||
dstDevId = ((UINT16)((UINT16)targetDevType << 8u) | ((UINT16)deviceId));
|
||||
chReval = OutnetSafeSend(dstDevId, 0u, &ciToGateWayBuffer[0], ii);
|
||||
if (CI_SUCCESS == chReval)
|
||||
{
|
||||
debug_infor_printf((char*)"\nGATEWAY_SEND:%d", ii);
|
||||
debug_out_array(0xAA, ciToGateWayBuffer, ii);
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
return chReval;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 网关信息解析失败、清除既有已经存储的本周期收到网关信息
|
||||
* 参数说明: 无
|
||||
* 返回值 :无
|
||||
* fan 20260604
|
||||
*/
|
||||
void ClearCurGateWayMsg(void)
|
||||
{
|
||||
/*远程筛选消息*/
|
||||
UINT32 dwCurCycNum = Get2oo2CurCycleNum(); /*当前周期号*/
|
||||
if (dwCurCycNum == g_strAtsMsgFst.dwCycle)
|
||||
{
|
||||
ClearAtsMsgFirst();
|
||||
}
|
||||
if (dwCurCycNum == g_strAtsMsgSnd.dwCycle)
|
||||
{
|
||||
ClearAtsMsgSecond();
|
||||
}
|
||||
if (FLAG_SET == g_strSndAtsCfmFst.chFlag)/*第二个反馈信息解析时直接存储至反馈并设置标志*/
|
||||
{
|
||||
ClearSndAtsScreenFstCfmMsg();
|
||||
}
|
||||
if (dwCurCycNum == g_strAtsEaMsgFst.dwCycle)
|
||||
{
|
||||
ClearAtsEaMsgFirst();
|
||||
}
|
||||
if (dwCurCycNum == g_strAtsEaMsgSnd.dwCycle)
|
||||
{
|
||||
ClearAtsEaMsgSecond();
|
||||
}
|
||||
if (FLAG_SET == g_strSndAtsEaCfmFst.chFlag)/*第二个反馈信息解析时直接存储至反馈并设置标志*/
|
||||
{
|
||||
ClearSndAtsEaFstCfmMsg();
|
||||
}
|
||||
if (dwCurCycNum == g_strAtsWlbMsgFst.dwCycle)
|
||||
{
|
||||
ClearAtsWlbMsgFirst();
|
||||
}
|
||||
if (dwCurCycNum == g_strAtsWlbMsgSnd.dwCycle)
|
||||
{
|
||||
ClearAtsWlbMsgSecond();
|
||||
}
|
||||
if (FLAG_SET == g_strSndAtsWlbCfmFst.chFlag)/*第二个反馈信息解析时直接存储至反馈并设置标志*/
|
||||
{
|
||||
ClearSndAtsWlbFstCfmMsg();
|
||||
}
|
||||
if (dwCurCycNum == g_strAtsDaMsgFst.dwCycle)
|
||||
{
|
||||
ClearAtsDaMsgFirst();
|
||||
}
|
||||
if (dwCurCycNum == g_strAtsDaMsgSnd.dwCycle)
|
||||
{
|
||||
ClearAtsDaMsgSecond();
|
||||
}
|
||||
if (FLAG_SET == g_strSndAtsDaCfmFst.chFlag)/*第二个反馈信息解析时直接存储至反馈并设置标志*/
|
||||
{
|
||||
ClearSndAtsDaFstCfmMsg();
|
||||
}
|
||||
}
|
||||
@@ -253,20 +253,21 @@ extern AtsMsgCfmStru * GetAtsCfmFst(void);
|
||||
extern AtsMsgCfmStru * GetAtsCfmSnd(void);
|
||||
|
||||
/**
|
||||
* @brief 获取远程筛选二次确认消息
|
||||
* @brief 组TIOC到网关数据--既有信息
|
||||
* @param 无
|
||||
* @return 远程筛选二次确认消息
|
||||
* @return CI_ERROR失败;CI_SUCCESS成功
|
||||
*/
|
||||
extern UINT8 PackTiocToGateWayData(const UINT8 deviceId, const UINT8 targetDevType);
|
||||
UINT8 PackTiocToGateWayData(UINT8* szToGateWayDataBuf, const UINT8 targetDevType, UINT16* wDataIndex);
|
||||
|
||||
|
||||
/**
|
||||
* @brief 解析网关数据帧
|
||||
* @brief 解析网关数据帧---无GAL部分消息反馈内容
|
||||
* @param const UINT8* dataBuf, 数据缓冲区
|
||||
* @param const UINT16 dataLength, 数据长度
|
||||
* @param[out] UINT16* dataIndex, 数据索引
|
||||
* @param[in] const UINT16 dataLength, 数据长度
|
||||
* @return CI_SUCCESS:成功;CI_ERROR:失败
|
||||
*/
|
||||
extern UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength);
|
||||
UINT8 ParseGateWayToCiDataFrame(const UINT8* dataBuf, UINT16* dataIndex, const UINT16 dataLength);
|
||||
|
||||
/**
|
||||
* @brief 清除1次ATS筛选信息
|
||||
@@ -449,4 +450,34 @@ void ClearSndAtsWlbFstCfmMsg(void);
|
||||
*/
|
||||
void ClearSndAtsDaFstCfmMsg(void);
|
||||
|
||||
/**
|
||||
* @brief 解析网关数据帧--按照接口类型区分有无GAL
|
||||
* @param const UINT8* dataBuf, 数据缓冲区
|
||||
* @param const UINT16 dataLength, 数据长度
|
||||
* @note Created By fan 20260604
|
||||
* @return CI_SUCCESS:成功;CI_ERROR:失败
|
||||
*/
|
||||
UINT8 ParseGateWayToCiDataProc(const UINT8* dataBuf, const UINT16 dataLength);
|
||||
|
||||
/*
|
||||
* 功能描述: 组网关数据-按照接口类型区分有无GAL
|
||||
* 参数说明: QueueStruct* ciToAtsDataQueue, 组包发送队列地址
|
||||
* const UINT8 deviceId, 目标系统ID
|
||||
* const UINT8 targetDevType, 目标系统类型
|
||||
* const UINT8 frame,帧类型
|
||||
* UINT8* chSendXiandiorAtsBuf 码位数据数组首地址
|
||||
* 返回值 : 0: 组包失败
|
||||
* 1: 组包成功
|
||||
* fan 20260604
|
||||
*/
|
||||
UINT8 PackCiToGateWayDataProc(const UINT8 deviceId, const UINT8 targetDevType);
|
||||
|
||||
/*
|
||||
* 功能描述: 网关信息解析失败、清除既有已经存储的本周期收到网关信息
|
||||
* 参数说明: 无
|
||||
* 返回值 :无
|
||||
* fan 20260604
|
||||
*/
|
||||
void ClearCurGateWayMsg(void);
|
||||
|
||||
#endif
|
||||
@@ -290,7 +290,7 @@ UINT8 ParseOtherSysToCiData(void)
|
||||
|
||||
debug_infor_printf((const)"\nGATEWAY_RECV:%d", dataLen);
|
||||
debug_out_array(0xAA, data, (UINT16)dataLen);
|
||||
checkResult = ParseGateWayToCiDataFrame(data, (UINT16)dataLen);
|
||||
checkResult = ParseGateWayToCiDataProc(data, (UINT16)dataLen);
|
||||
}
|
||||
|
||||
if (CI_ERROR == checkResult)
|
||||
@@ -881,7 +881,7 @@ UINT8 PackCiToOtherSysData(void)
|
||||
if (chTiocRcvAtsGtwyDevTypeId == deviceIdBuf[ii])
|
||||
{
|
||||
/*组ATS站场帧数据*/
|
||||
reVal = PackTiocToGateWayData(deviceIdBuf[ii], CI_SYSTEM_TYPE_ATS);
|
||||
reVal = PackCiToGateWayDataProc(deviceIdBuf[ii], CI_SYSTEM_TYPE_ATS);
|
||||
|
||||
if (CI_ERROR == reVal)
|
||||
{
|
||||
@@ -1256,6 +1256,8 @@ UINT8 PackCiToOtherSysData(void)
|
||||
PackCiToCimFlyProtectData();
|
||||
/*发送维护机IO双系采集不一致报警*/
|
||||
PackCiToCimCollDiffData();
|
||||
/*发送道岔冗余采集报警*/
|
||||
PackCiToCimSwitchRedunAlarmData();
|
||||
/*发送给AIM退出运营信息*/
|
||||
AIMOutput();
|
||||
/*发送给维护机执行单元报警信息*/
|
||||
|
||||
@@ -253,7 +253,7 @@ UINT8 PackCiToOcData( UINT8 deviceId)
|
||||
UINT8 chMainCotrolOCId = 0U;
|
||||
UINT8 chControlCmd = 0U;
|
||||
UINT8 chControlCmdNum = 0u;
|
||||
UINT16 cmdIndex = 0u;
|
||||
UINT32 cmdIndex = 0u;
|
||||
UINT8 chOcOutControlCmd = 0u;
|
||||
UINT8 chOcFindPostionCmd = 0u;
|
||||
UINT8 chLocalCiOCSswitch = 0u;
|
||||
@@ -348,11 +348,11 @@ UINT8 PackCiToOcData( UINT8 deviceId)
|
||||
{/*有OC-S且当前无主控,需寻表*/
|
||||
drvCmd = OC_SWITCH_DRIVE_POS_KEEP;/*保持*/
|
||||
|
||||
chOcOutControlCmd = GetSwitchThisOcOutControlCmd(pOcData->OcDevices[kk].DeviceId, pOcData->OcId);
|
||||
chOcOutControlCmd = GetSwitchThisOcOutControlCmd(pOcData->OcDevices[kk].DeviceId, (UINT8)pOcData->OcId);
|
||||
|
||||
if (MAIN_CONTROL == chOcOutControlCmd)
|
||||
{
|
||||
chOcFindPostionCmd = GetSwitchThisOcFindPostionCmd(pOcData->OcDevices[kk].DeviceId, pOcData->OcId);
|
||||
chOcFindPostionCmd = GetSwitchThisOcFindPostionCmd(pOcData->OcDevices[kk].DeviceId, (UINT8)pOcData->OcId);
|
||||
drvCmd = ConvertSwitchFindPosToSwFindCmd(chOcFindPostionCmd);
|
||||
}
|
||||
}
|
||||
@@ -680,8 +680,8 @@ UINT8 PackCiToOcData( UINT8 deviceId)
|
||||
ii += 2u;
|
||||
if (OC_S_ON == chLocalCiOCSswitch)
|
||||
{/*OS-S开关打开*/
|
||||
chControlCmd = GetSwitchThisOcOutControlCmd(pOcData->OcDevices[kk].DeviceId, pOcData->OcId);
|
||||
if ((MAIN_CONTROL == chControlCmd) || (STANDBY_CONTROL == chControlCmd) || (NO_CONTROL_FUN == chControlCmd))
|
||||
chControlCmd = GetSwitchThisOcOutControlCmd(pOcData->OcDevices[kk].DeviceId, (UINT8)pOcData->OcId);
|
||||
if ((MAIN_CONTROL == chControlCmd) || (STANDBY_CONTROL == chControlCmd))
|
||||
{
|
||||
Ci2OcDataBuffer[ii] = chControlCmd;
|
||||
}
|
||||
@@ -701,6 +701,7 @@ UINT8 PackCiToOcData( UINT8 deviceId)
|
||||
}
|
||||
default:
|
||||
{/*无执行*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1198,7 +1199,7 @@ UINT8 ParseOcToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength,const U
|
||||
UINT32 dwUpToMainCyc = 0U;/*本机升主机周期号*/
|
||||
UINT32 CiRecvOcSN = 0U;/*同步的CI数据中OC周期号*/
|
||||
HLHTHeadContextStru* pstrHlhtHeadCtx = NULL; /*CI同步的互联互通报文头上下文数据*/
|
||||
UINT32 dwMainStandbyState = 0U;
|
||||
UINT8 dwMainStandbyState = 0U;
|
||||
UINT8 chSwitchBelongOThisOCRet = 0U;
|
||||
|
||||
|
||||
@@ -1262,7 +1263,7 @@ UINT8 ParseOcToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength,const U
|
||||
localCiId = GetSystemParaLocalCiId(); /*获取联锁ID*/
|
||||
wCiName = (CI_SYSTEM_TYPE_RCI)* 256U + localCiId;
|
||||
|
||||
headRet = HLHTRecvCommonPacketHeadCheck(ocName, wCiName, CI_OC_INTERFACE_INFOTYPE, CI_OC_PRTCL_VER, &hlhtGalHead, &errCode, 0u, CI_SYSTEM_TYPE_OC);
|
||||
headRet = HLHTRecvCommonPacketHeadCheck(ocName, wCiName, CI_OC_INTERFACE_INFOTYPE, (UINT8)CI_OC_PRTCL_VER, &hlhtGalHead, &errCode, 0u, CI_SYSTEM_TYPE_OC);
|
||||
transmitBadEnsureTime = GetCiAndOcTransmitBadEnsureTime();
|
||||
debug_infor_printf((const)"\nOC %d GAL Check Result:%d errCode:%d\n", systemId, headRet, errCode); /*0x55正确,0xaa错误,0x33初始通信帧*/
|
||||
|
||||
@@ -1302,7 +1303,7 @@ UINT8 ParseOcToCiDataFrame(const UINT8* dataBuf, const UINT16 dataLength,const U
|
||||
{
|
||||
chUsableCycCheck = CI_SUCCESS;
|
||||
}
|
||||
if (0U < ocInfoRemainValidity)
|
||||
if (0 < ocInfoRemainValidity)
|
||||
{
|
||||
/*解析应用数据*/
|
||||
wApplyDataLenth = ShortFromChar(&dataBuf[ii]);/*应用层数据长度*/
|
||||
@@ -2172,7 +2173,7 @@ INT16 GetIndexBySignalId(UINT16 sigId)
|
||||
* 参数说明: UINT16 swId 道岔ID,UINT8 ocId OCID
|
||||
* 返回值 : 索引
|
||||
*/
|
||||
INT16 GetIndexBySwitchId(UINT16 swId,UINT16 ocId)
|
||||
INT16 GetIndexBySwitchId(UINT16 swId,UINT8 ocId)
|
||||
{
|
||||
INT16 retIndex = -1;
|
||||
|
||||
@@ -2180,7 +2181,7 @@ INT16 GetIndexBySwitchId(UINT16 swId,UINT16 ocId)
|
||||
|
||||
for (i=0u;i<m_SwitchNum;i++)
|
||||
{
|
||||
if ((m_Switches[i].DeviceId == swId)&&(ocId == m_Switches[i].OcId))
|
||||
if ((m_Switches[i].DeviceId == swId)&&(ocId == (UINT8)m_Switches[i].OcId))
|
||||
{
|
||||
retIndex = (INT16)i;
|
||||
break;
|
||||
@@ -2260,7 +2261,7 @@ void InitOcSignals(void)
|
||||
void InitOcSwitchs(void)
|
||||
{
|
||||
UINT16 i = 0u;
|
||||
UINT16 j = 0u;
|
||||
UINT8 j = 0u;
|
||||
UINT8 k = 0U;
|
||||
SwitchConfigDataStruct *pSwitch = NULL;
|
||||
UINT8 localCi = 0u;
|
||||
@@ -2290,8 +2291,9 @@ void InitOcSwitchs(void)
|
||||
{
|
||||
m_Switches[m_SwitchNum].BoardState[k] = 0xffU;
|
||||
m_Switches[m_SwitchNum].BoardAddr[k] = 0U;
|
||||
m_Switches[m_SwitchNum].MainStandbyState[k] = 0U;
|
||||
}
|
||||
m_Switches[m_SwitchNum].OcId = pSwitch[i].belongOCConfigData[j].OcId;/**/
|
||||
m_Switches[m_SwitchNum].OcId = pSwitch[i].belongOCConfigData[j].OcId;
|
||||
m_SwitchNum++;
|
||||
}
|
||||
}
|
||||
@@ -2360,7 +2362,7 @@ void ConvertOcOriginDataToOcSigSwDev(UINT8 devId)
|
||||
UINT8 chOcBelongCI = 0U;/*OC所属联锁*/
|
||||
UINT8 chLocalCiId = GetSystemParaLocalCiId();
|
||||
UINT8 chSwitchszPlusBoxId = 0U;
|
||||
UINT8 index = 0u;
|
||||
|
||||
for (i=0U;i<m_OcToCiOrginDataNum;i++)/*遍历OC*/
|
||||
{
|
||||
chOcId = (UINT8)m_OcToCiOrginDataArr[i].OcId & 0xFFU;
|
||||
@@ -2376,7 +2378,7 @@ void ConvertOcOriginDataToOcSigSwDev(UINT8 devId)
|
||||
if (pOcDevice->DeviceType == OC_DEVICE_TYPE_SIGNAL)
|
||||
{/*信号机*/
|
||||
ind = GetIndexBySignalId(pOcDevice->DeviceId);
|
||||
if ((ind >=0) && (OC_DEVICE_TYPE_SIGNAL == pOcDevice->DeviceType))
|
||||
if (ind >=0)
|
||||
{
|
||||
if ((m_Signals[ind].OcId == pOcDevice->OcId) &&
|
||||
(m_Signals[ind].DeviceId == pOcDevice->DeviceId))
|
||||
@@ -2429,18 +2431,18 @@ void ConvertOcOriginDataToOcSigSwDev(UINT8 devId)
|
||||
m_Switches[ind].MainStandbyState[k] = pOcDevice->MainStandbyState[k];
|
||||
}
|
||||
|
||||
chSwitchszPlusBoxId = GetSwitchszPlusBoxId(m_Switches[ind].DeviceId, m_Switches[ind].OcId);
|
||||
chSwitchszPlusBoxId = GetSwitchszPlusBoxId(m_Switches[ind].DeviceId,(UINT8)m_Switches[ind].OcId);
|
||||
for (k = 0U; k < m_OcToCiOrginDataArr[i].chPbNum; k++)
|
||||
{
|
||||
if (chSwitchszPlusBoxId == m_OcToCiOrginDataArr[i].szPlusBox[k].chPbId)
|
||||
{
|
||||
if (SWITCH_BOX_NORMAL == m_OcToCiOrginDataArr[i].szPlusBox[k].chAsState)
|
||||
{/*正常*/
|
||||
SetSwitchOcPlusBoxSateState(m_Switches[ind].DeviceId, m_Switches[ind].OcId, SWITCH_BOX_NORMAL);
|
||||
SetSwitchOcPlusBoxSateState(m_Switches[ind].DeviceId, (UINT8)m_Switches[ind].OcId, SWITCH_BOX_NORMAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSwitchOcPlusBoxSateState(m_Switches[ind].DeviceId, m_Switches[ind].OcId, SWITCH_BOX_FAULT);
|
||||
SetSwitchOcPlusBoxSateState(m_Switches[ind].DeviceId, (UINT8)m_Switches[ind].OcId, SWITCH_BOX_FAULT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2449,7 +2451,7 @@ void ConvertOcOriginDataToOcSigSwDev(UINT8 devId)
|
||||
/*将板卡故障状态导入*/
|
||||
for (k = 0U; k < m_Switches[ind].BoardNum; k++)
|
||||
{
|
||||
SetSwitchThisOCBoardState(m_Switches[ind].DeviceId, m_Switches[ind].OcId, m_Switches[ind].BoardAddr[k], m_Switches[ind].BoardState[k]);
|
||||
SetSwitchThisOCBoardState(m_Switches[ind].DeviceId, (UINT8)m_Switches[ind].OcId, m_Switches[ind].BoardAddr[k], m_Switches[ind].BoardState[k]);
|
||||
|
||||
}
|
||||
|
||||
@@ -3012,6 +3014,7 @@ UINT8 OcInputSignalStateCheck(const UINT8 chInput)
|
||||
break;
|
||||
default:
|
||||
retVal = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ INT16 GetIndexBySignalId(UINT16 sigId);
|
||||
* 参数说明: UINT16 swId 道岔ID,UINT8 ocId OCID
|
||||
* 返回值 : 索引
|
||||
*/
|
||||
INT16 GetIndexBySwitchId(UINT16 swId, UINT16 ocId);
|
||||
INT16 GetIndexBySwitchId(UINT16 swId, UINT8 ocId);
|
||||
|
||||
/*
|
||||
* 功能描述: 通过轨道id获取索引
|
||||
|
||||
@@ -364,7 +364,7 @@ UINT8 ParseTmcToTiocDataFrame(UINT8* dataBuf, UINT16 dataLength, UINT8 systemId)
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
|
||||
if ((CI_ERROR == retVal) || (0u == galHeadSaved))
|
||||
if ((CI_ERROR == retVal) && (0u == galHeadSaved))
|
||||
{
|
||||
/*清除通用报文头*/
|
||||
ClearHlhtHeadCtx(CI_SYSTEM_TYPE_TMC, systemId);
|
||||
|
||||
@@ -288,6 +288,13 @@ static UINT8 WashTrainRequestCheck(UINT8 Data);
|
||||
*/
|
||||
static UINT8 HeadWashStopSteadyInfoCheck(UINT8 Data);
|
||||
/*
|
||||
* 功能描述: 联挂端洗车停稳信息接口校验
|
||||
* 参数说明: 入参:UINT8 Data 联挂端洗车停稳信息
|
||||
* 返回值 : CI_ERROR: 接口校验失败
|
||||
* CI_SUCESS: 接口校验成功
|
||||
*/
|
||||
static UINT8 CoupingWashStopStedInfoCheck(UINT8 Data);
|
||||
/*
|
||||
* 功能描述: 暂停洗车请求信息接口校验
|
||||
* 参数说明: 入参:UINT8 Data 暂停洗车请求信息
|
||||
* 返回值 : CI_ERROR: 接口校验失败
|
||||
@@ -1577,6 +1584,7 @@ static UINT8 ParseVobcToCiDataFrameHLHT(const UINT8* dataBuf, const UINT16 dataL
|
||||
UINT16 wMsgLen = 0U; /*应用数据长度*/
|
||||
UINT32 dwCiAndVobcTransBadTime = 0U; /*ci和VOBC通信中断时间*/
|
||||
UINT32 dwAppCycleTime = 0U; /*ci周期*/
|
||||
UINT8 trainZeroSpeedState = 0U; /*列车零速状态*/
|
||||
|
||||
ci_vobcPrtclVersion = GetVersionOfVOBCToCI();
|
||||
vobcName = (CI_SYSTEM_TYPE_VOBC)*256U + systemId;
|
||||
@@ -1762,7 +1770,6 @@ static UINT8 ParseVobcToCiDataFrameHLHT(const UINT8* dataBuf, const UINT16 dataL
|
||||
ii += 4U;
|
||||
|
||||
vobcToCiDataStru->signalID = signalId; /*将信号机ID保存到结构体*/
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1777,6 +1784,23 @@ static UINT8 ParseVobcToCiDataFrameHLHT(const UINT8* dataBuf, const UINT16 dataL
|
||||
vobcToCiDataStru->ComStartCycle = Get2oo2CurCycleNum();
|
||||
}
|
||||
break;
|
||||
case VOBC_CI_INFO_TYPE_MANU_DEFINED:
|
||||
{/*只解析报文内容*/
|
||||
/*列车零速状态*/
|
||||
trainZeroSpeedState = dataBuf[ii];
|
||||
ii += 1U;
|
||||
if ((CI_VOBC_TRAIN_ZERO_SPEED_YES == trainZeroSpeedState) || (CI_VOBC_TRAIN_ZERO_SPEED_NO == trainZeroSpeedState))
|
||||
{
|
||||
vobcToCiDataStru->chTrainZeroState = trainZeroSpeedState;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
ii += 9U; /*预留*/
|
||||
|
||||
}
|
||||
break;
|
||||
case VOBC_CI_INFO_TYPE_BLOCLINK: /*点连式信息帧*/
|
||||
{
|
||||
retVal = ParseVobcBlocLinkData(&dataBuf[ii], wMsgLen-4U, vobcToCiDataStru);
|
||||
@@ -2100,7 +2124,7 @@ static UINT8 PackCiToVobcDataHLHT(VobcToCiDataStruct *vobcToCiDataStru)
|
||||
UINT16 sigId = 0U; /*信号机ID*/
|
||||
UINT32 curCycleNum = Get2oo2CurCycleNum();
|
||||
UINT32 appCycleTime = GetSystemParaAppCycleTime();
|
||||
UINT8 retVal = CI_SUCCESS;
|
||||
UINT8 retVal = CI_ERROR;
|
||||
UINT8 localCiId = GetSystemParaLocalCiId(); /*本地联锁ID*/
|
||||
UINT32 ciEtcsId = 0U;
|
||||
UINT32 vobcEtcsId = 0U;
|
||||
@@ -2113,6 +2137,7 @@ static UINT8 PackCiToVobcDataHLHT(VobcToCiDataStruct *vobcToCiDataStru)
|
||||
UINT8 outStationSignalAllowOrNot = CI_VOBC_SIGNAL_DEFAULT; /*信号机的允许或禁止状态*/
|
||||
UINT32 signalIdInterConn = 0U; /*互联互通4字节信号机ID*/
|
||||
UINT16 wTempIndex = 0U; /*临时记录下标*/
|
||||
UINT8 chPackCheck = CI_SUCCESS;
|
||||
ci_vobcPrtclVersion = GetVersionOfVOBCToCI();
|
||||
|
||||
|
||||
@@ -2158,7 +2183,7 @@ static UINT8 PackCiToVobcDataHLHT(VobcToCiDataStruct *vobcToCiDataStru)
|
||||
|
||||
ii += 2U;/*预留两个字节*/
|
||||
|
||||
if ((VOBC_CI_INFO_TYPE_PSD_CONTROL == vobcToCiDataStru->appInfoType) && (curCycleNum == vobcToCiDataStru->ComStartCycle))
|
||||
if (VOBC_CI_INFO_TYPE_PSD_CONTROL == vobcToCiDataStru->appInfoType)
|
||||
{/*只有当VOBC发送的信息类型是屏蔽门控制信息时,才组包如下内容;若信息类型为心跳帧,则只发送报文帧头(31+6)*/
|
||||
LongToChar(vobcToCiDataStru->trackSecID,&CiToVobcDataBuffer[ii]);/*回复收到的轨道区段ID,依据CI-VOBCV2.9接口文档修改*/
|
||||
ii += 4U;
|
||||
@@ -2305,7 +2330,8 @@ static UINT8 PackCiToVobcDataHLHT(VobcToCiDataStruct *vobcToCiDataStru)
|
||||
}
|
||||
else
|
||||
{
|
||||
/*信息类型错误,什么都不做*/
|
||||
/*不组包发送上述帧*/
|
||||
chPackCheck = CI_ERROR;
|
||||
}
|
||||
|
||||
/*组点连式信息*/
|
||||
@@ -2314,7 +2340,8 @@ static UINT8 PackCiToVobcDataHLHT(VobcToCiDataStruct *vobcToCiDataStru)
|
||||
/*-由于可以和屏蔽门控制帧同时发,所以判点连式周期-*/
|
||||
if (0U == CiToVobcDataBuffer[33U])
|
||||
{
|
||||
/*没有组其他信息帧,填充预留*/
|
||||
chPackCheck = CI_SUCCESS;
|
||||
/*没有组其他信息帧,填充帧类型点连式*/
|
||||
ShortToChar(CI_VOBC_INFO_TYPE_BLOCLINK, &CiToVobcDataBuffer[33U]); /*报文类型,两字节*/
|
||||
PackVobcBlocLinkData(CiToVobcDataBuffer, &ii, vobcToCiDataStru); /*组点连式信息*/
|
||||
/*应用层数据的报文长度 */
|
||||
@@ -2339,10 +2366,11 @@ static UINT8 PackCiToVobcDataHLHT(VobcToCiDataStruct *vobcToCiDataStru)
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == chPackCheck)
|
||||
{
|
||||
/*通用报文头中应用层报文总长度*/
|
||||
CiToVobcDataBuffer[29U] = (UINT8) ((UINT8)((ii - 31U) >> 8U) & 0xffU);
|
||||
CiToVobcDataBuffer[30U] = (UINT8) ((ii - 31U) & 0xffU);
|
||||
CiToVobcDataBuffer[29U] = (UINT8)((UINT8)((ii - 31U) >> 8U) & 0xffU);
|
||||
CiToVobcDataBuffer[30U] = (UINT8)((ii - 31U) & 0xffU);
|
||||
|
||||
dstDevId = ((UINT16)CI_SYSTEM_TYPE_VOBC << 8U) | vobcToCiDataStru->VobcId;
|
||||
outnetSafeSendRtn = OutnetSafeSend(dstDevId, 0U, &CiToVobcDataBuffer[0U], ii);
|
||||
@@ -2362,6 +2390,11 @@ static UINT8 PackCiToVobcDataHLHT(VobcToCiDataStruct *vobcToCiDataStru)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不组包*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
@@ -3327,37 +3360,52 @@ static UINT8 PackCiToVobcDataFAOHLHT(VobcToCiDataStruct *vobcToCiDataStru)
|
||||
}
|
||||
}
|
||||
else
|
||||
{/*无站台发车按钮给VOBC发送站台无发车按钮状态*/
|
||||
CiToVobcDataBuffer[ii] = PLATFORM_DEPAR_BUTTON_NO;
|
||||
{
|
||||
CiToVobcDataBuffer[ii] = PLATFORM_DEPAR_BUTTON_NO;;/*有些线路PSD不配置发车按钮继电器*/
|
||||
}
|
||||
/* IBP盘发车按钮检查*/
|
||||
if(PLATFORM_DEPAR_BUTTON_STATE_VALID != CiToVobcDataBuffer[ii])
|
||||
{
|
||||
if (PSD_BUTTON_PANGLU_STATE_VALID == psdButtonPangluState)
|
||||
{
|
||||
; /* 站台按钮旁路*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*之前发车按钮无效,需要检查IBP按钮状态*/
|
||||
/*无效、无站台*/
|
||||
|
||||
/*检查IBP按钮状态*/
|
||||
wibpBtnRelayId = GetIbpConfmRelayId(psdId);
|
||||
if ((0u != wibpBtnRelayId) && (UINT16_MAX != wibpBtnRelayId))
|
||||
{
|
||||
chibpState = GetPsdButtonIbpState(psdId); /*IBP按钮状态*/
|
||||
if(PLATFORM_DEPAR_BUTTON_STATE_VALID == chibpState)
|
||||
if (PSD_BUTTON_PANGLU_STATE_VALID == psdButtonPangluState)
|
||||
{
|
||||
/*无站台发车按钮给VOBC发送站台关门按钮默认值*/
|
||||
CiToVobcDataBuffer[ii] = PSD_RELATED_BUTTON_STATE_DEFAULT;
|
||||
}
|
||||
else
|
||||
{
|
||||
chibpState = GetPsdButtonIbpState(psdId); /*IBP按钮状态(有效、无效、故障)*/
|
||||
/* 有效 》 默认 》 无效*/
|
||||
if (PLATFORM_DEPAR_BUTTON_STATE_INVALID == chibpState)
|
||||
{
|
||||
/*IBP按钮状态无效*/
|
||||
if (PSD_RELATED_BUTTON_STATE_DEFAULT == CiToVobcDataBuffer[ii])
|
||||
{
|
||||
;/*组默认*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*站台发车按钮无效,给VOBC发送IBP按钮状态*/
|
||||
CiToVobcDataBuffer[ii] = chibpState;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*保持原状态不变*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*保持原状态不变*/
|
||||
/*IBP按钮状态有效或者默认,给VOBC发送站台:IBP按钮状态即可*/
|
||||
CiToVobcDataBuffer[ii] = chibpState;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*无IBP、维持既有不动*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6163,34 +6211,48 @@ static UINT8 PackCiToIvocPsdInfo(UINT8* pDataBuf, UINT16 *wDataLength)
|
||||
{/*无站台发车按钮给VOBC发送站台无发车按钮状态*/
|
||||
pDataBuf[ii] = CI_IVOC_PSD_PDB_NO_BUTTON;
|
||||
}
|
||||
/* IBP盘发车按钮检查 */
|
||||
/* IBP盘发车按钮检查*/
|
||||
if(PLATFORM_DEPAR_BUTTON_STATE_VALID != pDataBuf[ii])
|
||||
{
|
||||
if (PSD_BUTTON_PANGLU_STATE_VALID == psdButtonPangluState)
|
||||
{
|
||||
;/* 站台按钮旁路*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*之前发车按钮无效,需要检查IBP按钮状态*/
|
||||
/*无效、无站台*/
|
||||
/*检查IBP按钮状态*/
|
||||
wibpBtnRelayId = GetIbpConfmRelayId(wPsdId);
|
||||
if ((0u != wibpBtnRelayId) && (UINT16_MAX != wibpBtnRelayId))
|
||||
{
|
||||
chibpState = GetPsdButtonIbpState(wPsdId); /*IBP按钮状态*/
|
||||
if(PLATFORM_DEPAR_BUTTON_STATE_VALID == chibpState)
|
||||
if (PSD_BUTTON_PANGLU_STATE_VALID == psdButtonPangluState)
|
||||
{
|
||||
/*无站台发车按钮给VOBC发送站台关门按钮默认值*/
|
||||
pDataBuf[ii] = PSD_RELATED_BUTTON_STATE_DEFAULT;
|
||||
}
|
||||
else
|
||||
{
|
||||
chibpState = GetPsdButtonIbpState(wPsdId); /*IBP按钮状态(有效、无效、故障)*/
|
||||
/* 有效 》 默认 》 无效*/
|
||||
if (PLATFORM_DEPAR_BUTTON_STATE_INVALID == chibpState)
|
||||
{
|
||||
/*IBP按钮状态无效*/
|
||||
if (PSD_RELATED_BUTTON_STATE_DEFAULT == pDataBuf[ii])
|
||||
{
|
||||
;/*组默认*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*站台发车按钮无效,给VOBC发送IBP按钮状态*/
|
||||
pDataBuf[ii] = chibpState;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*保持原状态不变*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*保持原状态不变*/
|
||||
/*IBP按钮状态有效或者默认,给VOBC发送站台:IBP按钮状态即可*/
|
||||
pDataBuf[ii] = chibpState;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*无IBP、维持既有不动*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6885,7 +6947,7 @@ static UINT8 PackCiToIvocFLockInfo(UINT8* pDataBuf, UINT16 *wDataLength)
|
||||
chStartLockStat = GetStartFLockFlag();
|
||||
|
||||
/*上电封锁状态*/
|
||||
if (CI_START_LOCK_NO == chStartLockStat)
|
||||
if (CI_START_FLOCK_NO == chStartLockStat)
|
||||
{
|
||||
pDataBuf[ii] = CI_IVOC_ALLLINE_FLOCK_NO;
|
||||
}
|
||||
@@ -7394,6 +7456,8 @@ static UINT8 PackCiToIvocSleepTrainInfo(UINT8* pDataBuf, UINT16 *wDataLength)
|
||||
UINT16 wEnvelopeSendSumIndex = 0u;
|
||||
UINT16 wTrainId = 0u;
|
||||
UINT8 chLinkLogicDirUpAndDown = 0u;
|
||||
UINT8 chTrainVirHeadScreenFlag = 0U;/*虚拟前筛标志*/
|
||||
UINT8 chTrainVirTailScreenFlag = 0U;/*虚拟后筛标志*/
|
||||
|
||||
if ((NULL == pDataBuf)
|
||||
|| (NULL == wDataLength))
|
||||
@@ -7482,7 +7546,15 @@ static UINT8 PackCiToIvocSleepTrainInfo(UINT8* pDataBuf, UINT16 *wDataLength)
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
/*前筛*/
|
||||
chTrainVirHeadScreenFlag = GetTrainVirHeadScreenPassFlag(wTrainId);
|
||||
if (TRAIN_VIR_SCREEN_PASS_FLAG_VALID == chTrainVirHeadScreenFlag)
|
||||
{
|
||||
chHeadScreStat = CI_IVOC_HEAD_SCREEN_PASS;
|
||||
}
|
||||
else
|
||||
{
|
||||
chHeadScreStat = strEnvelope.suspicHead;
|
||||
}
|
||||
|
||||
if (CI_IVOC_HEAD_SCREEN_PASS == chHeadScreStat)
|
||||
{
|
||||
@@ -7498,7 +7570,15 @@ static UINT8 PackCiToIvocSleepTrainInfo(UINT8* pDataBuf, UINT16 *wDataLength)
|
||||
debug_infor_printf((const)"\n PackCiToIvocSleepTrainInfo HeadScreState_Error, state : %d \n", chHeadScreStat);
|
||||
}
|
||||
/*后筛*/
|
||||
chTrainVirTailScreenFlag = GetTrainVirTailScreenPassFlag(wTrainId);
|
||||
if (TRAIN_VIR_SCREEN_PASS_FLAG_VALID == chTrainVirTailScreenFlag)
|
||||
{
|
||||
chTailScreStat = CI_IVOC_TAIL_SCREEN_PASS;
|
||||
}
|
||||
else
|
||||
{
|
||||
chTailScreStat = strEnvelope.suspicTail;
|
||||
}
|
||||
if (CI_IVOC_TAIL_SCREEN_PASS == chTailScreStat)
|
||||
{
|
||||
pDataBuf[ii] |= BIT_VAL_00000001B << 4; /*后端筛选通过 01B*/
|
||||
@@ -8983,36 +9063,51 @@ UINT8 PackCiToVobcDataFAOHLHToneSelf(VobcToCiDataStruct* vobcToCiDataStru)
|
||||
CiToVobcDataBuffer[ii] = PLATFORM_DEPAR_BUTTON_NO;
|
||||
}
|
||||
/* IBP盘发车按钮检查*/
|
||||
|
||||
if(PLATFORM_DEPAR_BUTTON_STATE_VALID != CiToVobcDataBuffer[ii])
|
||||
{
|
||||
if ((PSD_BUTTON_PANGLU_STATE_VALID == psdButtonPangluState) || (1u == flag))
|
||||
{
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*之前发车按钮无效,需要检查IBP按钮状态*/
|
||||
/*无效、无站台*/
|
||||
|
||||
/*检查IBP按钮状态*/
|
||||
wibpBtnRelayId = GetIbpConfmRelayId(psdId);
|
||||
if ((0u != wibpBtnRelayId) && (UINT16_MAX != wibpBtnRelayId))
|
||||
{
|
||||
chibpState = GetPsdButtonIbpState(psdId); /*IBP按钮状态*/
|
||||
if(PLATFORM_DEPAR_BUTTON_STATE_VALID == chibpState)
|
||||
if (PSD_BUTTON_PANGLU_STATE_VALID == psdButtonPangluState)
|
||||
{
|
||||
/*无站台发车按钮给VOBC发送站台关门按钮默认值*/
|
||||
CiToVobcDataBuffer[ii] = PSD_RELATED_BUTTON_STATE_DEFAULT;
|
||||
}
|
||||
else
|
||||
{
|
||||
chibpState = GetPsdButtonIbpState(psdId); /*IBP按钮状态(有效、无效、故障)*/
|
||||
/* 有效 》 默认 》 无效*/
|
||||
if (PLATFORM_DEPAR_BUTTON_STATE_INVALID == chibpState)
|
||||
{
|
||||
/*IBP按钮状态无效*/
|
||||
if (PSD_RELATED_BUTTON_STATE_DEFAULT == CiToVobcDataBuffer[ii])
|
||||
{
|
||||
;/*组默认*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*站台发车按钮无效,给VOBC发送IBP按钮状态*/
|
||||
CiToVobcDataBuffer[ii] = chibpState;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*保持原状态不变*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*保持原状态不变*/
|
||||
/*IBP按钮状态有效或者默认,给VOBC发送站台:IBP按钮状态即可*/
|
||||
CiToVobcDataBuffer[ii] = chibpState;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*无IBP、维持既有不动*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*站台发车已经有效了,不需要再处理*/
|
||||
}
|
||||
@@ -9158,6 +9253,7 @@ UINT8 PackCiToVobcDataFAOHLHToneSelf(VobcToCiDataStruct* vobcToCiDataStru)
|
||||
CiToVobcDataBuffer[ii++] = washMachineState; /*5洗车机故障:0x55无故障,0xaa故障*/
|
||||
CiToVobcDataBuffer[ii++] = washModeState; /*洗车模式:0x01:通过洗(侧洗),0x02:端洗(全洗)*/
|
||||
CiToVobcDataBuffer[ii++] = chWashWorkModeBack; /*洗车模式设置反馈:5个取值*/
|
||||
CiToVobcDataBuffer[ii++] = GetCoupingWashAllowState(washMachineId); /*联挂端洗车允许通过:0x55允许通过,0xaa禁止通过*/
|
||||
}
|
||||
else
|
||||
{/*本联锁集中区没有洗车机,发送默认值,洗车机故障状态发送采集信息*/
|
||||
@@ -9168,6 +9264,7 @@ UINT8 PackCiToVobcDataFAOHLHToneSelf(VobcToCiDataStruct* vobcToCiDataStru)
|
||||
CiToVobcDataBuffer[ii++] = WASHMACHINE_COL_FALUT_NO_2;
|
||||
CiToVobcDataBuffer[ii++] = XTA_MODE_STATE_NO;
|
||||
CiToVobcDataBuffer[ii++] = WASH_WORKMODE_BACK_DEFAULT;
|
||||
CiToVobcDataBuffer[ii++] = WASHMACHINE_COL_COUPINGWASH_NO;
|
||||
}
|
||||
|
||||
ShortToChar(CI_VOBC_INFO_TYPE_FAO_INFO, &CiToVobcDataBuffer[33]);/*全自动运行洗车帧报文类型,两字节*/
|
||||
@@ -9712,6 +9809,30 @@ static UINT8 HeadWashStopSteadyInfoCheck(UINT8 Data)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 联挂端洗车停稳信息接口校验
|
||||
* 参数说明: 入参:UINT8 Data 联挂端洗车停稳信息
|
||||
* 返回值 : CI_ERROR: 接口校验失败
|
||||
* CI_SUCESS: 接口校验成功
|
||||
*/
|
||||
static UINT8 CoupingWashStopStedInfoCheck(UINT8 Data)
|
||||
{
|
||||
UINT8 coupingWashStopSteadyInfo = 0U;
|
||||
UINT8 retVal = CI_ERROR;
|
||||
coupingWashStopSteadyInfo = Data;
|
||||
|
||||
if ((WASHMACHINE_COUPING_STEADY_YES == coupingWashStopSteadyInfo) || (WASHMACHINE_COUPING_STEADY_NO == coupingWashStopSteadyInfo))
|
||||
{
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 暂停洗车请求信息接口校验
|
||||
* 参数说明: 入参:UINT8 Data 暂停洗车请求信息
|
||||
@@ -11863,11 +11984,23 @@ UINT8 ParseFAOHLHTOtherTypeData(const UINT16 appInfoType, UINT8* dataBuf, UINT16
|
||||
{
|
||||
vobcToCiDataStru->chWashMachineWorkMode = dataBuf[ii];
|
||||
ii += 1U;
|
||||
chRetVal = CoupingWashStopStedInfoCheck(dataBuf[ii]);
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == chRetVal)
|
||||
{
|
||||
vobcToCiDataStru->couplingWashStopSteadyInfo = dataBuf[ii];
|
||||
ii += 1U;
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = CI_ERROR;
|
||||
}
|
||||
|
||||
}
|
||||
else if ((VOBC_CI_INFO_TYPE_HEART_FRAME == appInfoType) || (VOBC_CI_INFO_TYPE_LOGOUT_ASK == appInfoType))
|
||||
{/*心跳帧或注销请求帧*/
|
||||
@@ -14049,20 +14182,22 @@ void PackVobcBlocLinkData(UINT8* CiToVobcDataBuffer, UINT16* ii, VobcToCiDataStr
|
||||
UINT8 k = 0U;
|
||||
UINT32 dwTempHLHTId = 0U;
|
||||
UINT8 chEsbPLState = 0U;
|
||||
wIndex = *ii;
|
||||
|
||||
if ((NULL != CiToVobcDataBuffer) && (NULL != ii) && (NULL != vobcToCiDataStru))
|
||||
{
|
||||
wIndex = *ii;
|
||||
|
||||
/*判断是否匹配到进路,若未匹配到进路不组应用数据*/
|
||||
chRouteNum = GetBlocLinkRouteNum(vobcToCiDataStru->VobcId);
|
||||
pRouteBuf = GetBlocLinkRouteBuf(vobcToCiDataStru->VobcId);
|
||||
debug_infor_printf((const)"\nVOBC %d BlocLink RouteNum: %d\n", VobcToCiDataStru->VobcId, chRouteNum);
|
||||
for (k = 0U;k< chRouteNum;k++)
|
||||
{
|
||||
debug_infor_printf((const)"\nRouteID: %d\n", pRouteBuf[k]);
|
||||
}
|
||||
|
||||
if ((0U < chRouteNum) && (CI_VOBC_ROUTE_MAX >= chRouteNum) && (NULL != pRouteBuf))
|
||||
{
|
||||
for (k = 0U; k < chRouteNum; k++)
|
||||
{
|
||||
debug_infor_printf((const)"\nBlocLinkRouteID: %d\n", pRouteBuf[k]);
|
||||
}
|
||||
|
||||
/*1 组下一个CI互联互通编号*/
|
||||
PackNextCiId(CiToVobcDataBuffer, &wIndex,vobcToCiDataStru);
|
||||
|
||||
@@ -14081,7 +14216,7 @@ void PackVobcBlocLinkData(UINT8* CiToVobcDataBuffer, UINT16* ii, VobcToCiDataStr
|
||||
{
|
||||
LongToChar(dwTempHLHTId, &CiToVobcDataBuffer[wIndex]); /*组道岔ID*/
|
||||
wIndex += 4U;
|
||||
chTempState = GetSwitchCurPosition(wSwitchBuffer[k]); /*组道岔状态D*/
|
||||
chTempState = GetSwitchCurPosition(wSwitchBuffer[k]); /*组道岔状态*/
|
||||
if (SWITCH_POSITION_DINGWEI == chTempState)
|
||||
{
|
||||
CiToVobcDataBuffer[wIndex++] = CI_IVOC_SWITCH_POSTION_DING;
|
||||
@@ -14114,7 +14249,7 @@ void PackVobcBlocLinkData(UINT8* CiToVobcDataBuffer, UINT16* ii, VobcToCiDataStr
|
||||
{
|
||||
LongToChar(dwTempHLHTId, &CiToVobcDataBuffer[wIndex]); /*组ID*/
|
||||
wIndex += 4U;
|
||||
CiToVobcDataBuffer[wIndex++] = GetPsdStateToVobc(wTempBuffer[k]); /*组状态D*/
|
||||
CiToVobcDataBuffer[wIndex++] = GetPsdStateToVobc(wTempBuffer[k]); /*组状态*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -14161,18 +14296,9 @@ void PackVobcBlocLinkData(UINT8* CiToVobcDataBuffer, UINT16* ii, VobcToCiDataStr
|
||||
wIndex += 2U;
|
||||
for (k = 0U; k < chTempNum; k++)
|
||||
{
|
||||
chRet = dquQueryOutDevId(QFUN_IDMAP_SPKS_ID, wTempBuffer[k], &dwTempHLHTId);
|
||||
if (CI_SUCCESS == chRet)
|
||||
{
|
||||
LongToChar(dwTempHLHTId, &CiToVobcDataBuffer[wIndex]); /*组ID*/
|
||||
LongToChar(wTempBuffer[k], &CiToVobcDataBuffer[wIndex]); /*组ID*/
|
||||
wIndex += 4U;
|
||||
}
|
||||
else
|
||||
{
|
||||
LongToChar(0U, &CiToVobcDataBuffer[wIndex]); /*组无效值*/
|
||||
wIndex += 4U;
|
||||
}
|
||||
}
|
||||
|
||||
/*7 组路径临时限速信息*/
|
||||
CiToVobcDataBuffer[wIndex++] = GetPathXianSuData(vobcToCiDataStru->VobcId);
|
||||
@@ -14450,7 +14576,13 @@ static UINT8 PackMoveAuthorityData(UINT8* CiToVobcDataBuffer, UINT16* ii, VobcTo
|
||||
UINT8 chRet = CI_ERROR;
|
||||
UINT16* pRouteBuf = NULL;
|
||||
UINT8 chRouteNum = 0U;
|
||||
|
||||
UINT8 chTempState = 0U;
|
||||
UINT8 chRouteDir = 0U;
|
||||
UINT16 wRouteLastPhy = 0U;
|
||||
UINT16 wLogBelongPhyId = 0U;
|
||||
UINT8 chTrainDir = 0U;
|
||||
struct_PathPoint end = { 0U }; /*列车逻辑终点*/
|
||||
UINT16 wEndLogSecId = 0U;
|
||||
if ((NULL != CiToVobcDataBuffer) && (NULL != ii) && (NULL != vobcToCiDataStru))
|
||||
{
|
||||
wIndex = *ii;
|
||||
@@ -14458,10 +14590,49 @@ static UINT8 PackMoveAuthorityData(UINT8* CiToVobcDataBuffer, UINT16* ii, VobcTo
|
||||
chRouteNum = GetBlocLinkRouteNum(vobcToCiDataStru->VobcId);
|
||||
pRouteBuf = GetBlocLinkRouteBuf(vobcToCiDataStru->VobcId);
|
||||
if ((NULL != pRouteBuf) && (0U < chRouteNum))
|
||||
{
|
||||
chTempState = GetRouteType(pRouteBuf[chRouteNum - 1U]);
|
||||
chRouteDir = GetRouteConfigDirection(pRouteBuf[chRouteNum - 1U]);
|
||||
chTrainDir = GetAblTrainDir(vobcToCiDataStru->VobcId);
|
||||
wRouteLastPhy = GetRouteLastPhySectionId(pRouteBuf[chRouteNum - 1U]);
|
||||
|
||||
/*车头位置*/
|
||||
end.wLinkId = GetAblTrainMaxHeadLink(vobcToCiDataStru->VobcId);
|
||||
end.dwOffset = GetAblTrainMaxHeadOffset(vobcToCiDataStru->VobcId);
|
||||
wEndLogSecId = GetPointBelongLogSec(end);
|
||||
wLogBelongPhyId = GetLgcSecRelativePhySecId(wEndLogSecId);
|
||||
|
||||
/**进路是折返进路,车的方向与进路方向不同,车在进路最后区段**/
|
||||
if ((ROUTE_TYPE_RETURN == chTempState) && (chRouteDir != chTrainDir) && (wRouteLastPhy == wLogBelongPhyId))
|
||||
{
|
||||
/*最后一条进路车换端之后,未匹配到折出进路,安全防护点组车的大前,障碍点组默认值*/
|
||||
chRet = dquQueryOutDevId(QFUN_IDMAP_TRACKSEC_ID, vobcToCiDataStru->strBlocLinkData.wTrainMaxSafeHeadLink, &dwLinkHLHTId);
|
||||
if (CI_SUCCESS == chRet)
|
||||
{
|
||||
/***组安全防护点位置*/
|
||||
LongToChar(dwLinkHLHTId, &CiToVobcDataBuffer[wIndex]);
|
||||
wIndex += 4U;
|
||||
LongToChar(vobcToCiDataStru->strBlocLinkData.dwTrainMaxSafeHeadOffset, &CiToVobcDataBuffer[wIndex]);
|
||||
wIndex += 4U;
|
||||
|
||||
/***组障碍点组默认值*/
|
||||
LongToChar(0U, &CiToVobcDataBuffer[wIndex]);
|
||||
wIndex += 4U;
|
||||
LongToChar(UINT32_MAX, &CiToVobcDataBuffer[wIndex]);
|
||||
wIndex += 4U;
|
||||
}
|
||||
else
|
||||
{
|
||||
chRet = CI_ERROR;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
chRet = CI_SUCCESS;
|
||||
wEndSigId = GetRouteEndSignalId(pRouteBuf[chRouteNum - 1U]); /*匹配终端进路的终端信号机*/
|
||||
wOverLapId = GetRouteOverlapLockedId(pRouteBuf[chRouteNum - 1U]);
|
||||
|
||||
chFlag = OverlapValidMaskCheck(wOverLapId);
|
||||
|
||||
if (CI_SUCCESS == chFlag)
|
||||
@@ -14583,7 +14754,7 @@ static UINT8 PackMoveAuthorityData(UINT8* CiToVobcDataBuffer, UINT16* ii, VobcTo
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (CI_SUCCESS == chRet)
|
||||
{
|
||||
*ii = wIndex; /*输出长度*/
|
||||
@@ -14592,6 +14763,7 @@ static UINT8 PackMoveAuthorityData(UINT8* CiToVobcDataBuffer, UINT16* ii, VobcTo
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -15580,7 +15752,7 @@ static UINT8 GetPathFloodGateData(UINT16* pPathTempBuf, const UINT16 wTrainId)
|
||||
wLogBelongPhyId = GetLgcSecRelativePhySecId(pLogSecBuf[j]);
|
||||
chFloodGateNum = GetPhySecLocatedFloodSum(wLogBelongPhyId);
|
||||
phFloodGateBuf = GetPhySecLocatedFloodId(wLogBelongPhyId);
|
||||
if ((CI_VOBC_OTHER_EQUIPMENT_MAX > (chTempNum + chFloodGateNum)) && (NULL != phFloodGateBuf))
|
||||
if ((((UINT16)CI_VOBC_OTHER_EQUIPMENT_MAX) > (((UINT16)chTempNum) + chFloodGateNum)) && (NULL != phFloodGateBuf))
|
||||
{
|
||||
for (m = 0U;m < chFloodGateNum;m++)
|
||||
{
|
||||
@@ -15624,7 +15796,7 @@ static UINT8 GetPathFloodGateData(UINT16* pPathTempBuf, const UINT16 wTrainId)
|
||||
{
|
||||
chFloodGateNum = GetPhySecLocatedFloodSum(pRoutePhyBuf[k].PhysicalSectionId);
|
||||
phFloodGateBuf = GetPhySecLocatedFloodId(pRoutePhyBuf[k].PhysicalSectionId);
|
||||
if ((CI_VOBC_OTHER_EQUIPMENT_MAX > (chTempNum + chFloodGateNum)) && (NULL != phFloodGateBuf))
|
||||
if ((((UINT16)CI_VOBC_OTHER_EQUIPMENT_MAX) > (((UINT16)chTempNum) + chFloodGateNum)) && (NULL != phFloodGateBuf))
|
||||
{
|
||||
for (m = 0U; m < chFloodGateNum; m++)
|
||||
{
|
||||
@@ -15689,7 +15861,7 @@ static UINT8 GetPathFloodGateData(UINT16* pPathTempBuf, const UINT16 wTrainId)
|
||||
{
|
||||
chFloodGateNum = GetPhySecLocatedFloodSum(pOverLapPhyBuf[k]);
|
||||
phFloodGateBuf = GetPhySecLocatedFloodId(pOverLapPhyBuf[k]);
|
||||
if ((CI_VOBC_OTHER_EQUIPMENT_MAX > (chTempNum + chFloodGateNum)) && (NULL != phFloodGateBuf))
|
||||
if ((((UINT16)CI_VOBC_OTHER_EQUIPMENT_MAX) > (((UINT16)chTempNum) + chFloodGateNum)) && (NULL != phFloodGateBuf))
|
||||
{
|
||||
for (m = 0U; m < chFloodGateNum; m++)
|
||||
{
|
||||
@@ -15744,7 +15916,7 @@ static UINT8 GetPathFloodGateData(UINT16* pPathTempBuf, const UINT16 wTrainId)
|
||||
static UINT8 GetDestinationType(UINT8 chRouteNum, UINT16* pRouteBuf)
|
||||
{
|
||||
UINT8 chTempState = 0U;
|
||||
UINT8 chRet = 0U;
|
||||
UINT8 chRet = 0xff;
|
||||
if ((NULL != pRouteBuf) && (CI_VOBC_ROUTE_MAX >= chRouteNum) && (0U < chRouteNum))
|
||||
{
|
||||
chTempState = GetRouteType(pRouteBuf[chRouteNum - 1U]);
|
||||
@@ -15832,6 +16004,13 @@ static UINT8 PackCiToIvocComErrRcInfo(UINT8* pDataBuf, UINT16* wDataLength)
|
||||
chTransRciSum = GetCiTransmitSpecifySysDevSum(CI_SYSTEM_TYPE_RC);
|
||||
pTransRciId = GetCiTransmitSpecifySysDevBuf(CI_SYSTEM_TYPE_RC);
|
||||
|
||||
if (0U == chTransRciSum)
|
||||
{
|
||||
/*如果RC没有相邻RC,故障RC数目返回0*/
|
||||
chRetVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*数据合法*/
|
||||
if (NULL != pTransRciId)
|
||||
{
|
||||
@@ -15839,10 +16018,10 @@ static UINT8 PackCiToIvocComErrRcInfo(UINT8* pDataBuf, UINT16* wDataLength)
|
||||
|
||||
for (jj = 0U; jj < chTransRciSum; jj++)
|
||||
{
|
||||
chNearRciCommState = GetCiTransmitState(CI_SYSTEM_TYPE_RC, jj); /*获取与相邻RC通信状态*/
|
||||
chNearRciCommState = GetCiTransmitState(CI_SYSTEM_TYPE_RC, pTransRciId[jj]); /*获取与相邻RC通信状态*/
|
||||
|
||||
/*通信正常*/
|
||||
if ((TRANSMIT_2OO2_STATE_GOOD == chNearRciCommState) || (TRANSMIT_2OO2_STATE_LINK == chNearRciCommState))
|
||||
if (TRANSMIT_STATE_GOOD == chNearRciCommState)
|
||||
{
|
||||
;
|
||||
}
|
||||
@@ -15852,7 +16031,7 @@ static UINT8 PackCiToIvocComErrRcInfo(UINT8* pDataBuf, UINT16* wDataLength)
|
||||
if (CI_IVOC_COM_ERR_RC_NUM_MAX > chComErrRcNum)
|
||||
{
|
||||
/*通信故障,记录当前RC ID*/
|
||||
wComRcId = ((CI_SYSTEM_TYPE_RC << 8U) || pTransRciId[jj]);
|
||||
wComRcId = (UINT16)((CI_SYSTEM_TYPE_RC << 8U) | pTransRciId[jj]);
|
||||
ShortToChar(wComRcId, &pDataBuf[ii]);
|
||||
ii += 2U;
|
||||
chComErrRcNum++;
|
||||
@@ -15871,6 +16050,8 @@ static UINT8 PackCiToIvocComErrRcInfo(UINT8* pDataBuf, UINT16* wDataLength)
|
||||
/*数据错误*/
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -267,6 +267,9 @@
|
||||
#define CI_VOBC_FLOOD_STATE_OPEN ((UINT8)0xaaU) /*CI-VOBC点连式防淹门开启锁定状态且无关门请求*/
|
||||
#define CI_VOBC_FLOOD_STATE_CLOSE ((UINT8)0x55U) /*CI-VOBC点连式防淹非开启锁定状态或有关门请求*/
|
||||
|
||||
#define CI_VOBC_TRAIN_ZERO_SPEED_NO ((UINT8)0xAAU) /*CI-VOBCÁгµ·ÇÁãËÙ*/
|
||||
#define CI_VOBC_TRAIN_ZERO_SPEED_YES ((UINT8)0x55U) /*CI-VOBCÁгµÁãËÙ*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -74,8 +74,8 @@ UINT8 ParseZcToCiDataFrame(UINT8* dataBuf, UINT16 dataLength, UINT8 systemId)
|
||||
zcName = (CI_SYSTEM_TYPE_ZC)*256U + systemId;
|
||||
ciName = (CI_SYSTEM_TYPE_RCI)*256U + localCiId;
|
||||
curntCycleNo = Get2oo2CurCycleNum();
|
||||
chDataType = GetLocalPublicDataType(); /*区分28.0.0.14与其他线路zc接口*/
|
||||
if ((NULL != dataBuf) && (dataLength > 0u))
|
||||
chDataType = GetLocalPublicDataType(); /*区分分支,与主线zc接口*/
|
||||
if ((NULL != dataBuf) && (0U < dataLength))
|
||||
{
|
||||
sourceId = GetCiTransmitSpecifySysDevBuf(CI_SYSTEM_TYPE_ZC);/*获取与本联锁通信的ZC的ID,目前一个联锁最多只与一个ZC通信*/
|
||||
|
||||
@@ -119,7 +119,7 @@ UINT8 ParseZcToCiDataFrame(UINT8* dataBuf, UINT16 dataLength, UINT8 systemId)
|
||||
/*计算消息的时效性*/
|
||||
zcInfoRemainValidity = HLHTCommonMsgRemainingValidity(GetCiAndZcTransmitBadEnsureTime(), curntCycleNo, GetSystemParaAppCycleTime(), hlhtGalHead.recvOppMsgSN, hlhtGalHead.crntOwnMsgSN, hlhtGalHead.preOwnMsgSN, hlhtGalHead.comPeriod);
|
||||
|
||||
if (zcInfoRemainValidity > 0)
|
||||
if (0 < zcInfoRemainValidity)
|
||||
{
|
||||
if (0u == hlhtGalHead.totalDataLen)
|
||||
{
|
||||
@@ -135,7 +135,6 @@ UINT8 ParseZcToCiDataFrame(UINT8* dataBuf, UINT16 dataLength, UINT8 systemId)
|
||||
{
|
||||
/*报文有效,继续解析*/
|
||||
retVal = CI_SUCCESS;
|
||||
{
|
||||
if (DATA_TYPE_MAIN_BRANCH == chDataType)
|
||||
{
|
||||
while (wTmpDataLen < hlhtGalHead.totalDataLen)
|
||||
@@ -234,9 +233,85 @@ UINT8 ParseZcToCiDataFrame(UINT8* dataBuf, UINT16 dataLength, UINT8 systemId)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (DATA_TYPE_28_BRANCH == chDataType)
|
||||
{
|
||||
/*28分支具备码位0201,0205*/
|
||||
while (wTmpDataLen < hlhtGalHead.totalDataLen)
|
||||
{
|
||||
/* 一条应用数据长度 */
|
||||
wMsgLen = ShortFromChar(&dataBuf[ii]);
|
||||
ii += 2U;
|
||||
wTmpDataLen += 2U;
|
||||
wTmpDataLen += wMsgLen;
|
||||
|
||||
if (5U > wMsgLen)
|
||||
{
|
||||
/* 单包长度不对 */
|
||||
retVal = CI_ERROR;
|
||||
debug_infor_printf((const)"ParseZcToCiDataFrame_Error wMsgLen\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
/*杭德线无报文类型、类型长度和预留,仅具备码位0201*/
|
||||
/* 获取报文类型 */
|
||||
wMsgType = ShortFromChar(&dataBuf[ii]);
|
||||
ii += 2U;
|
||||
/* 跳过预留 */
|
||||
ii += 2U;
|
||||
wMsgCheckLen = wMsgLen - 4U;
|
||||
|
||||
switch (wMsgType)
|
||||
{
|
||||
case ZC_TO_TIOC_MASK_MSG:
|
||||
{
|
||||
/* 解析ZC-CI码位信息 */
|
||||
retVal = ParseMaskData(&dataBuf[ii], wMsgCheckLen);
|
||||
}
|
||||
break;
|
||||
case ZC_TO_TIOC_SNOW_MSG:
|
||||
{
|
||||
/*解析ZC-CI雨雪模式信息*/
|
||||
retVal = ParseZcSnowData(&dataBuf[ii], wMsgCheckLen);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
retVal = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
/* 解析成功,跳过该数据包 */
|
||||
ii += wMsgCheckLen;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_infor_printf((const)"ParseZcToCiDataFrame_Error MsgType: %d\n", wMsgType);
|
||||
ClearZcData(); /*任意步骤没解析通过则清空*/
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_ERROR == retVal) /*解析失败*/
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*do nothing*/
|
||||
}
|
||||
|
||||
}
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
/*校验数据长度*/
|
||||
if (ii > dataLength)
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*23分支无报文类型、类型长度和预留,仅具备码位*/
|
||||
wMsgCheckLen = hlhtGalHead.totalDataLen;
|
||||
retVal = ParseMaskData(&dataBuf[ii], wMsgCheckLen);
|
||||
if (CI_ERROR == retVal)
|
||||
@@ -246,15 +321,26 @@ UINT8 ParseZcToCiDataFrame(UINT8* dataBuf, UINT16 dataLength, UINT8 systemId)
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*继续*/
|
||||
ii += wMsgCheckLen; /*继续*/
|
||||
}
|
||||
}
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
if (hlhtGalHead.totalDataLen != (ii - 31U))
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
debug_infor_printf((const)"\nParseZcToCiDataFrame_Error totalDataLen\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
/*继续*/
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
/*更新通信周期*/
|
||||
dwCurCyc = Get2oo2CurCycleNum();
|
||||
funRet = SetCiTransmitRecvDataCycNum(localCiId, CI_SYSTEM_TYPE_ZC, sourceId[0], dwCurCyc);
|
||||
funRet = SetCiTransmitRecvDataCycNum(localCiId, CI_SYSTEM_TYPE_ZC, sourceId[0U], dwCurCyc);
|
||||
if (CI_ERROR == funRet)
|
||||
{/*更新周期失败*/
|
||||
|
||||
@@ -263,7 +349,7 @@ UINT8 ParseZcToCiDataFrame(UINT8* dataBuf, UINT16 dataLength, UINT8 systemId)
|
||||
{/*更新周期成功*/
|
||||
|
||||
/*更新与ZC通信状态:判断与ZC是否通信中断*/
|
||||
funRet = UpdateCiTransmitState(localCiId, CI_SYSTEM_TYPE_ZC, sourceId[0]);
|
||||
funRet = UpdateCiTransmitState(localCiId, CI_SYSTEM_TYPE_ZC, sourceId[0U]);
|
||||
if (CI_ERROR == funRet)
|
||||
{
|
||||
/*更新通信状态失败*/
|
||||
@@ -282,15 +368,14 @@ UINT8 ParseZcToCiDataFrame(UINT8* dataBuf, UINT16 dataLength, UINT8 systemId)
|
||||
SetHLHTHeadCtxCiRcvSN(CI_SYSTEM_TYPE_ZC, systemId, curntCycleNo);
|
||||
SetHLHTHeadCtxCiRcvLogId(CI_SYSTEM_TYPE_ZC, systemId, 0u);
|
||||
|
||||
galHeadSaved = 1;
|
||||
}
|
||||
galHeadSaved = 1U;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (HLHT_HEAD_INIT ==headRet)
|
||||
{
|
||||
if (curntCycleNo > 0u)/*判断序号大于0,因为把0当做无效序号*/
|
||||
if (0U < curntCycleNo)/*判断序号大于0,因为把0当做无效序号*/
|
||||
{
|
||||
SetHLHTHeadCtxComPeriod(CI_SYSTEM_TYPE_ZC, systemId, hlhtGalHead.comPeriod);
|
||||
SetHLHTHeadCtxSrcCrntSN(CI_SYSTEM_TYPE_ZC, systemId, hlhtGalHead.crntOwnMsgSN);
|
||||
@@ -299,7 +384,7 @@ UINT8 ParseZcToCiDataFrame(UINT8* dataBuf, UINT16 dataLength, UINT8 systemId)
|
||||
SetHLHTHeadCtxCiRcvSN(CI_SYSTEM_TYPE_ZC, systemId, curntCycleNo);
|
||||
SetHLHTHeadCtxCiRcvLogId(CI_SYSTEM_TYPE_ZC, systemId, 0u);
|
||||
|
||||
galHeadSaved = 1;
|
||||
galHeadSaved = 1U;
|
||||
}
|
||||
|
||||
retVal = CI_ERROR;
|
||||
@@ -1061,24 +1146,24 @@ UINT8 ParseZcSnowData(UINT8* dataBuf, UINT16 dataLen)
|
||||
*/
|
||||
UINT8 PackCiToZcData( UINT8 deviceId)
|
||||
{
|
||||
UINT8 localCi = 0u; /*本地联锁ID*/
|
||||
UINT8 CiToZcDataBuffer[CI_TO_ZC_DATA_LEN_MAX] = {0u};/*CI到ZC组帧数组*/
|
||||
UINT16 SendMaskSum = 0u;
|
||||
UINT16 ii = 0u;
|
||||
UINT32 ciEtcsId = 0u; /*CI互联互通编号*/
|
||||
UINT32 zcEtcsId = 0u; /*ZC互联互通编号*/
|
||||
UINT32 emapCheckVer = 0u; /*共用数据校验信息*/
|
||||
UINT8 localCi = 0U; /*本地联锁ID*/
|
||||
UINT8 CiToZcDataBuffer[CI_TO_ZC_DATA_LEN_MAX] = {0U};/*CI到ZC组帧数组*/
|
||||
UINT16 SendMaskSum = 0U;
|
||||
UINT16 ii = 0U;
|
||||
UINT32 ciEtcsId = 0U; /*CI互联互通编号*/
|
||||
UINT32 zcEtcsId = 0U; /*ZC互联互通编号*/
|
||||
UINT32 emapCheckVer = 0U; /*共用数据校验信息*/
|
||||
UINT8 retVal = CI_ERROR;
|
||||
UINT32 curCycleNum = Get2oo2CurCycleNum(); /*联锁应用周期号*/
|
||||
UINT32 appCycleTime = GetSystemParaAppCycleTime(); /*联锁应用周期*/
|
||||
UINT8 ci_zcPrtclVersion = 0u;
|
||||
UINT16 dstDevId = 0;
|
||||
UINT8 outnetSafeSendRtn = 0u;
|
||||
UINT8 ci_zcPrtclVersion = 0U;
|
||||
UINT16 dstDevId = 0U;
|
||||
UINT8 outnetSafeSendRtn = 0U;
|
||||
UINT8 CIName2HlhtId = 0U;
|
||||
UINT8 ZCName2HlhtId = 0U;
|
||||
UINT8 CiEmapCheckVer = 0U;
|
||||
UINT32 dwHlhtHSrcSN = 0u;
|
||||
UINT32 dwHlhtHRcvSN = 0u;
|
||||
UINT32 dwHlhtHSrcSN = 0U;
|
||||
UINT32 dwHlhtHRcvSN = 0U;
|
||||
UINT16 totallenIndex = 0U;
|
||||
UINT16 wCrossFrameLen = 0U;
|
||||
UINT8 chDataType = 0U;
|
||||
@@ -1104,16 +1189,16 @@ UINT8 PackCiToZcData( UINT8 deviceId)
|
||||
if ((CI_SUCCESS == retVal))
|
||||
{
|
||||
/*获取将要发送的码位字节数*/
|
||||
if ((GetSendMaskSum(CI_SYSTEM_TYPE_ZC) % 8u) == 0u)
|
||||
if (0U == (GetSendMaskSum(CI_SYSTEM_TYPE_ZC) % 8U))
|
||||
{
|
||||
SendMaskSum = (UINT16) (GetSendMaskSum(CI_SYSTEM_TYPE_ZC) / 8u);
|
||||
SendMaskSum = (UINT16) (GetSendMaskSum(CI_SYSTEM_TYPE_ZC) / 8U);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMaskSum = (UINT16) (GetSendMaskSum(CI_SYSTEM_TYPE_ZC) / 8u + 1u);
|
||||
SendMaskSum = (UINT16) (GetSendMaskSum(CI_SYSTEM_TYPE_ZC) / 8U + 1U);
|
||||
}
|
||||
|
||||
if (0u == SendMaskSum)
|
||||
if (0U == SendMaskSum)
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
@@ -1131,21 +1216,21 @@ UINT8 PackCiToZcData( UINT8 deviceId)
|
||||
/*开始组应用数据帧*/
|
||||
/*组GAL包头*/
|
||||
ShortToChar(CI_ZC_INTERFACE_INFOTYPE, &CiToZcDataBuffer[ii]);/*接口信息类型*/
|
||||
ii += 2u;
|
||||
ii += 2U;
|
||||
LongToChar(ciEtcsId, &CiToZcDataBuffer[ii]);/*发送方标识信息*/
|
||||
ii += 4u;
|
||||
ii += 4U;
|
||||
LongToChar(zcEtcsId, &CiToZcDataBuffer[ii]);/*接收方标识信息*/
|
||||
ii += 4u;
|
||||
ii += 4U;
|
||||
LongToChar(emapCheckVer, &CiToZcDataBuffer[ii]);/*电子地图版本校验信息*/
|
||||
ii += 4u;
|
||||
ii += 4U;
|
||||
LongToChar(curCycleNum, &CiToZcDataBuffer[ii]);/*本方消息序列号*/
|
||||
ii += 4u;
|
||||
ii += 4U;
|
||||
ShortToChar((UINT16)appCycleTime, &CiToZcDataBuffer[ii]);/*设备通讯周期*/
|
||||
ii += 2u;
|
||||
ii += 2U;
|
||||
LongToChar(dwHlhtHSrcSN, &CiToZcDataBuffer[ii]);/*对方消息序列号:recvOppMsgSN记录收到对方上一条消息中的对方消息序列号*/
|
||||
ii += 4u;
|
||||
ii += 4U;
|
||||
LongToChar(dwHlhtHRcvSN, &CiToZcDataBuffer[ii]);/*收到上一条消息时本方序列号*/
|
||||
ii += 4u;
|
||||
ii += 4U;
|
||||
|
||||
lineIdentity = GetCiFunctionSwitchConfig(VOBC_INTERFACE_IDENTITY);/*获取线路标识*/
|
||||
|
||||
@@ -1159,21 +1244,23 @@ UINT8 PackCiToZcData( UINT8 deviceId)
|
||||
}
|
||||
|
||||
totallenIndex = ii;
|
||||
ii += 2u;/*通用报文头中的应用层报文总长度*/
|
||||
if (DATA_TYPE_MAIN_BRANCH == chDataType)
|
||||
ii += 2U;/*通用报文头中的应用层报文总长度*/
|
||||
|
||||
if ((DATA_TYPE_MAIN_BRANCH == chDataType) || (DATA_TYPE_28_BRANCH == chDataType))
|
||||
{
|
||||
ii += 2u;/*通用报文头中的应用层报文长度(0x202报文长度)*/
|
||||
ii += 2U;/*通用报文头中的应用层报文长度(0x202报文长度)*/
|
||||
|
||||
ShortToChar(TIOC_TO_ZC_MASK_MSG, &CiToZcDataBuffer[ii]);/*接口信息类型*/
|
||||
ii += 2u;
|
||||
ii += 2U;
|
||||
|
||||
ii += 2u; /*预留*/
|
||||
ii += 2U; /*预留*/
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*杭德线路无0x202报文长度、类型及预留*/
|
||||
/*23分支无0x202报文长度、类型及预留*/
|
||||
}
|
||||
|
||||
|
||||
/*组码位信息*/
|
||||
(void)MaskPack(CI_SYSTEM_TYPE_ZC,&CiToZcDataBuffer[ii]);
|
||||
ii = (UINT16)(ii + SendMaskSum);
|
||||
@@ -1182,27 +1269,33 @@ UINT8 PackCiToZcData( UINT8 deviceId)
|
||||
{
|
||||
/*通用应用层报文长度(0x202报文长度)*/
|
||||
/*刨去2字节应用报文总长度+2字节0202帧长度*/
|
||||
ShortToChar((ii - (totallenIndex + 4u)), &CiToZcDataBuffer[totallenIndex + 2u]);
|
||||
ShortToChar((ii - (totallenIndex + 4U)), &CiToZcDataBuffer[totallenIndex + 2U]);
|
||||
|
||||
/*组TACS列车跨压信息*/
|
||||
wCrossFrameLen = PackRcTacsCrossData(&CiToZcDataBuffer[ii]);
|
||||
ii += wCrossFrameLen;
|
||||
}
|
||||
else if(DATA_TYPE_28_BRANCH == chDataType)
|
||||
{
|
||||
/*通用应用层报文长度(0x202报文长度)*/
|
||||
/*刨去2字节应用报文总长度+2字节0202帧长度*/
|
||||
ShortToChar((ii - (totallenIndex + 4U)), &CiToZcDataBuffer[totallenIndex + 2U]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
/*23分支 nothing*/
|
||||
}
|
||||
|
||||
/*通用报文头中应用层报文总长度*/
|
||||
/*刨去2字节应用报文总长度*/
|
||||
ShortToChar(ii - (totallenIndex + 2u), &CiToZcDataBuffer[totallenIndex]);
|
||||
ShortToChar(ii - (totallenIndex + 2U), &CiToZcDataBuffer[totallenIndex]);
|
||||
|
||||
/*清ZC数据*/
|
||||
ClearZcData();
|
||||
|
||||
dstDevId = (UINT16)(CI_SYSTEM_TYPE_ZC << 8) | ((UINT16)deviceId);
|
||||
outnetSafeSendRtn = OutnetSafeSend(dstDevId, 0u, &CiToZcDataBuffer[0], ii);
|
||||
if (1u == outnetSafeSendRtn)
|
||||
dstDevId = (UINT16)(CI_SYSTEM_TYPE_ZC << 8U) | ((UINT16)deviceId);
|
||||
outnetSafeSendRtn = OutnetSafeSend(dstDevId, 0U, &CiToZcDataBuffer[0U], ii);
|
||||
if (1U == outnetSafeSendRtn)
|
||||
{ /*写队列成功*/
|
||||
#ifdef LOGPRINT/*日志打印宏*/
|
||||
#ifdef PLATFORM_2OO2/*2oo2平台打印*/
|
||||
@@ -1300,7 +1393,7 @@ static UINT16 PackRcTacsCrossData(UINT8 *pDataBuf)
|
||||
/*非法值防护*/
|
||||
if ((0u < wSignalId) && (CROSS_SIGNAL_ID_MAX >= wSignalId)
|
||||
&& (0u < wCrossTacsTrainId) && (TACS_CROSS_ID_MAX >= wCrossTacsTrainId)
|
||||
&& (ALL_TACS_CROSS_SUM_MAX >= wTacsCrossTrainSum))
|
||||
&& (ALL_TACS_CROSS_SUM_MAX > wTacsCrossTrainSum))
|
||||
{
|
||||
/*TACS主控列车ID有效,赋值至待发送数组*/
|
||||
wTacsCrossSignalBuf[wTacsCrossTrainSum] = wSignalId;
|
||||
@@ -1348,14 +1441,6 @@ static UINT16 PackRcTacsCrossData(UINT8 *pDataBuf)
|
||||
/*最后赋值长度*/
|
||||
ShortToChar((Index - 2u), &pDataBuf[0u]);
|
||||
|
||||
/*打印*/
|
||||
debug_infor_printf((const)"SendTacsCross Len=%d:", Index);
|
||||
for (i = 0u; i < Index; i++)
|
||||
{
|
||||
debug_infor_printf((const)"%x-", pDataBuf[i]);
|
||||
}
|
||||
debug_infor_printf((const)"\n");
|
||||
|
||||
return Index;
|
||||
}
|
||||
|
||||
@@ -1583,6 +1668,8 @@ static UINT8 ParseZcCbtcCrossData(UINT8* pDataBuf, UINT16 dataLen)
|
||||
if (NULL != pDataBuf)
|
||||
{
|
||||
cRetVal = CI_SUCCESS;
|
||||
ZcToCiDataStru.cRecvCbtcCrossFrameTag = CI_SUCCESS;
|
||||
|
||||
wCrossNum = pDataBuf[ii];
|
||||
ii++;
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ typedef struct S_ZcToCiDataStruct
|
||||
UINT8 cIteLineCutState; /* ITE全线切除状态 */
|
||||
UINT8 cAreaIteCutNum; /*区间ITE切除数量*/
|
||||
UINT16 szAreaIteCutId[ALL_AREA_SNOW_SUM_MAX]; /*区间ITE切除ID数组*/
|
||||
UINT8 cRecvCbtcCrossFrameTag; /*接收到主控CBTC列车跨压信息帧标志*/
|
||||
UINT8 wCbtcCrossNum; /*CBTC主控列车跨压数量*/
|
||||
UINT16 wCbtcCrossSignalId[ALL_CBTC_CROSS_SUM_MAX]; /*CBTC主控列车跨压信号机ID*/
|
||||
UINT8 wCbtcCrossTrainId[ALL_CBTC_CROSS_SUM_MAX]; /*CBTC主控列车跨压列车ID*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -176,6 +176,9 @@ typedef struct
|
||||
ReverseCutCfgDataStru stReverseCutCfgDtStr[REVERSE_CUT_SUM_MAX]; /*倒切设备配置数据*/
|
||||
UINT16 wReverseCutCfgLen;
|
||||
|
||||
ReverseSwitchCfgDataStru stReverseSwitchCfgDtStr[CI_SUM_MAX]; /*倒切设备开关板卡配置数据*/
|
||||
UINT16 wRelayReverseSwitchStrLen; /*倒切开关个数*/
|
||||
|
||||
EaConfigStru szEaCfgDtStr[EA_CFG_SUM_MAX]; /*防护区域配置数据*/
|
||||
UINT16 wEaCfgLen; /*防护区域配置数据长度*/
|
||||
|
||||
@@ -427,20 +430,6 @@ UINT8 RouteCfgDtStruFrmLSRouteStr( LS_RouteStruct * pLSRouteStr,RouteConfigDataS
|
||||
UINT8 RouteConfigDataStructInit(CHAR * FSName);
|
||||
|
||||
|
||||
/*********************************************
|
||||
*函数功能:按行解析通信关系(从设备IP表里去到的数据,每行17个数据)
|
||||
*参数说明:Data通信数组
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 TransmitRelationDataStruFrmSZ(UINT16 Data[]);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:初始化通信关系数据结构体
|
||||
*参数说明:FSName文件指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 TransmitRelationDataStructInit(CHAR* FSName);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:初始化通信关系数据结构体(NEW)
|
||||
*参数说明:FSName文件指针
|
||||
@@ -1068,5 +1057,54 @@ INT16 AxisSecCfgDtStruFromLogicSecStr(LogsecSwitchStruct* pSrcSwitchStructBuf, U
|
||||
* add mpt 20260331
|
||||
*********************************************/
|
||||
UINT8 AxisSecProtectSwitchInit(void);
|
||||
/*********************************************
|
||||
*函数功能:为某道岔计算属于同板卡的另一道岔ID
|
||||
*参数说明:OCSwitchConfigDataStruct * pOCSwitchCfgStr 道岔配置数据结构体
|
||||
* add by mpt 20260404
|
||||
*返回值:0 失败,1成功
|
||||
*********************************************/
|
||||
UINT8 SwitchOtherSwitchFromOCconfig(OCSwitchConfigDataStruct* pOCSwitchCfgStr);
|
||||
/*********************************************
|
||||
*函数功能:为所有道岔计算属于同板卡的另一道岔ID
|
||||
*参数说明:void
|
||||
*返回值:0 失败,1成功
|
||||
* add by mpt 20260404
|
||||
*********************************************/
|
||||
UINT8 AllSwitchOtherSwitchByOCconfig(void);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:初始化屏蔽门关联ESB数据----降低复杂度使用
|
||||
*参数说明:FSName文件指针
|
||||
*输入参数 wPsdIndex屏蔽门索引
|
||||
*返回值:0,失败;1,成功
|
||||
* fan 20260421
|
||||
*********************************************/
|
||||
UINT8 PsdRelateEsbConfigDataInit(UINT16 wPsdIndex);
|
||||
|
||||
/*
|
||||
*功能描述: RCI功能配置数据初始化
|
||||
*输入参数: CHAR * FSName 数据文件名指针
|
||||
*输出参数: 无
|
||||
*返回值: 0 失败
|
||||
* 1 成功
|
||||
* by cgh 20260516
|
||||
*/
|
||||
UINT8 RciCommonConfigDataInit(CHAR* FSName);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:初始化倒切开关配置数据结构体----对外结构体
|
||||
*参数说明:FSName文件指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 ReverseSwitchConfigDataStructInit(CHAR * FSName);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:倒切开关配置数据结构体计算
|
||||
*参数说明:pReverseSwitchRelay继电器初始化数据指针
|
||||
pReverseSwitchCfgDtStr配置数据结构体指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 ReverseSiwtchCfgDtStruFromDquStr(Relay_ReverseSwitchStruct* pReverseSwitchRelay, ReverseSwitchCfgDataStru* pReverseSwitchCfgDtStr);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ UINT8 InitAll(CHAR* FSName)
|
||||
{
|
||||
CIInitEmap(dsuEmapStru);/*为CI使用的公共数据赋值*/
|
||||
|
||||
RtnVal = CiPatternInit(FSName); /*初始化当前联锁类型配置数据*/
|
||||
RtnVal = RciCommonConfigDataInit(FSName); /*初始化当前联锁类型配置数据*/
|
||||
if (0u != RtnVal) /*初始化当前联锁类型配置数据*/
|
||||
{
|
||||
/*初始化系统配置数据结构体*/
|
||||
@@ -171,8 +171,8 @@ UINT8 InitAll(CHAR* FSName)
|
||||
else
|
||||
{
|
||||
#ifdef PLATFORM_2OO2
|
||||
(void)printf("CiPattern Init Error\n");
|
||||
debug_infor_printf((const)"CiPattern Init Error\n");
|
||||
(void)printf("RciCommonConfigDataInit Error\n");
|
||||
debug_infor_printf((const)"RciCommonConfigDataInit Error\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -2379,9 +2379,6 @@ UINT8 ReadSystemParamConfDataNew(const UINT8 ciId,SystemParameterStructNew* Syst
|
||||
/*一个临时限速报文中包含的最大限速区段数量*/
|
||||
SystemParameterStru->MaxSectionOfTsr = dquCICfgDtStr.SystemParaStrNew.MaxSectionOfTsr;
|
||||
|
||||
/*IVOC-OC通信故障判断时间(ms)*/
|
||||
SystemParameterStru->IvocOcCommunicationErrorTime = dquCICfgDtStr.SystemParaStrNew.IvocOcCommunicationErrorTime;
|
||||
|
||||
/*OC-TSL通信故障判断时间(ms)*/
|
||||
SystemParameterStru->OcTslCommunicationErrorTime = dquCICfgDtStr.SystemParaStrNew.OcTslCommunicationErrorTime;
|
||||
|
||||
@@ -3424,7 +3421,7 @@ void ReadEmapCiConfig(EmapCiConfigStru emapVerArr[])
|
||||
UINT8 ciId;
|
||||
UINT8 jj = 0U;
|
||||
UINT8 chLocalCiId = 0U;
|
||||
|
||||
UINT16 k = 0U;
|
||||
|
||||
chLocalCiId = GetSystemParaLocalCiId();
|
||||
if (NULL != emapVerArr)
|
||||
@@ -3484,14 +3481,30 @@ void ReadEmapCiConfig(EmapCiConfigStru emapVerArr[])
|
||||
{/*试车线与车辆段合设开关*/
|
||||
SystemParameterStruNew.chCldAndScxMergeFlag = dsuStaticHeadStru.pCIStruStru[i].chCldAndScxMergeFlag;
|
||||
}
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*RC模式校验数据信息根据RC表初始化*/
|
||||
}
|
||||
}
|
||||
/*联锁厂商定义 ** CI类型配置*/
|
||||
for (k = 0U; k < wCIStruSum; k++)
|
||||
{
|
||||
ciId = (UINT8)(dsuStaticHeadStru.pCIStruStru[k].wID & 0x00FFU);
|
||||
if (CI_SUM_MAX > ciId)
|
||||
{
|
||||
SystemParameterStruNew.chCiFactoryType[ciId] = dsuStaticHeadStru.pCIStruStru[k].chCiFactoryType;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (RC_WORK_MODE_TIOC == CI_SYSTEM_TYPE_RCI)
|
||||
{
|
||||
@@ -4124,6 +4137,70 @@ INT16 ReadReverseCutConfigData(const UINT8 ciId, ReverseCutCfgDataStru* pstRever
|
||||
return DataNum;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
*函数功能:本联锁倒切设备关联对应板卡配置数据
|
||||
*参数说明:ciId联锁ID, pLocalReverseData 本联锁倒切设备配置数据结构体指针
|
||||
*返回值:-1 失败 其他 成功
|
||||
*********************************************/
|
||||
INT16 ReadReverseSwitchConfigData(const UINT8 ciId, ReverseSwitchCfgDataStru* pLocalReverseData)
|
||||
{
|
||||
UINT16 i = 0u;
|
||||
INT16 DataNum = -1;
|
||||
UINT16 jj = 0U;
|
||||
if ((0u == ciId) || (NULL == pLocalReverseData))
|
||||
{
|
||||
DataNum = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
DataNum = 0;
|
||||
}
|
||||
|
||||
if (0 == DataNum)
|
||||
{
|
||||
for (i = 0u; i<dquCICfgDtStr.wRelayReverseSwitchStrLen; i++)
|
||||
{
|
||||
if (ciId == dquCICfgDtStr.stReverseSwitchCfgDtStr[i].chBelongCiId)
|
||||
{
|
||||
pLocalReverseData->wColCloseRelayId = dquCICfgDtStr.stReverseSwitchCfgDtStr[i].wColCloseRelayId;
|
||||
pLocalReverseData->wColOpenRelayId = dquCICfgDtStr.stReverseSwitchCfgDtStr[i].wColOpenRelayId;
|
||||
if ((0U == pLocalReverseData->wColCloseRelayId) || (UINT16_MAX == pLocalReverseData->wColCloseRelayId)
|
||||
|| (0U == pLocalReverseData->wColOpenRelayId) || (UINT16_MAX == pLocalReverseData->wColOpenRelayId))
|
||||
{
|
||||
DataNum = -1;/*本联锁配置有倒切开关但采集错误*/
|
||||
}
|
||||
else
|
||||
{
|
||||
pLocalReverseData->wRelateBoardNum = dquCICfgDtStr.stReverseSwitchCfgDtStr[i].wRelateBoardNum;
|
||||
pLocalReverseData->wId = dquCICfgDtStr.stReverseSwitchCfgDtStr[i].wId;
|
||||
pLocalReverseData->chBelongCiId = ciId;
|
||||
for (jj = 0u; jj < dquCICfgDtStr.stReverseSwitchCfgDtStr[i].wRelateBoardNum; jj++)
|
||||
{
|
||||
pLocalReverseData->strRelateBoardBuf[jj].wReversBoardId = dquCICfgDtStr.stReverseSwitchCfgDtStr[i].strRelateBoardBuf[jj].wReversBoardId;
|
||||
pLocalReverseData->strRelateBoardBuf[jj].chDevType = dquCICfgDtStr.stReverseSwitchCfgDtStr[i].strRelateBoardBuf[jj].chDevType;
|
||||
pLocalReverseData->strRelateBoardBuf[jj].wBoardColCloseRelayId = dquCICfgDtStr.stReverseSwitchCfgDtStr[i].strRelateBoardBuf[jj].wBoardColCloseRelayId;
|
||||
pLocalReverseData->strRelateBoardBuf[jj].wBoardColOpenRelayId = dquCICfgDtStr.stReverseSwitchCfgDtStr[i].strRelateBoardBuf[jj].wBoardColOpenRelayId;
|
||||
if ((0U == pLocalReverseData->strRelateBoardBuf[jj].wBoardColCloseRelayId) || (UINT16_MAX == pLocalReverseData->strRelateBoardBuf[jj].wBoardColCloseRelayId)
|
||||
|| (0U == pLocalReverseData->strRelateBoardBuf[jj].wBoardColOpenRelayId) || (UINT16_MAX == pLocalReverseData->strRelateBoardBuf[jj].wBoardColOpenRelayId))
|
||||
{
|
||||
DataNum = -1;/*配置有倒切板卡但采集错误*/
|
||||
break;
|
||||
}
|
||||
pLocalReverseData->strRelateBoardBuf[jj].wDevId = dquCICfgDtStr.stReverseSwitchCfgDtStr[i].strRelateBoardBuf[jj].wDevId;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
return DataNum;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************
|
||||
*函数功能:取VOBC设备编号相应位数,查询vobc索引
|
||||
|
||||
@@ -418,6 +418,13 @@ INT16 ReadCutoffPointConfigData(const UINT8 ciId, CfpConfigStru* pstCutoffConfig
|
||||
*返回值:本地关联分界点ID
|
||||
*********************************************/
|
||||
INT16 ReadReverseCutConfigData(const UINT8 ciId, ReverseCutCfgDataStru* pstReverseConfigData);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:本联锁倒切设备关联对应板卡配置数据
|
||||
*参数说明:ciId联锁ID, pLocalReverseData 本联锁到期配置数据结构体指针
|
||||
*返回值:-1 失败 其他 成功
|
||||
*********************************************/
|
||||
INT16 ReadReverseSwitchConfigData(const UINT8 ciId, ReverseSwitchCfgDataStru* pLocalReverseData);
|
||||
/************************************************************************
|
||||
功能:HlhtID转vobc内部编号
|
||||
输入:
|
||||
|
||||
@@ -406,8 +406,7 @@ UINT8 R_PointStructFromChar(UINT8 * pDataAddr,Relay_PointStruct* pSwitchStr)
|
||||
{/*城轨线路*/
|
||||
pSwitchStr->wPointId = dquCiShortFromChar(pData); /*道岔ID*/
|
||||
pData += 2u;
|
||||
|
||||
/*跳过OCID*/
|
||||
pSwitchStr->wOcId = dquCiShortFromChar(pData); /*OC ID*/
|
||||
pData += 2u;
|
||||
pSwitchStr->wRelayDingBiaoId = dquCiShortFromChar(pData); /*定表继电器ID */
|
||||
pData += 2u;
|
||||
@@ -426,10 +425,13 @@ UINT8 R_PointStructFromChar(UINT8 * pDataAddr,Relay_PointStruct* pSwitchStr)
|
||||
pData += 2u;
|
||||
pSwitchStr->wDFHId = dquCiShortFromChar(pData); /*DFH继电器ID*/
|
||||
pData += 2u;
|
||||
|
||||
pSwitchStr->wRelayShadowDingBiaoId = dquCiShortFromChar(pData); /*定表继电器ID */
|
||||
pSwitchStr->wRelayRedunDB1Id = dquCiShortFromChar(pData); /*(北京10冗余采集)DBJ1继电器ID*/
|
||||
pData += 2u;
|
||||
pSwitchStr->wRelayShadowFanBiaoId = dquCiShortFromChar(pData); /*反表继电器ID */
|
||||
pSwitchStr->wRelayRedunDB2Id = dquCiShortFromChar(pData); /*(北京10冗余采集)DBJ2继电器ID*/
|
||||
pData += 2u;
|
||||
pSwitchStr->wRelayRedunFB1Id = dquCiShortFromChar(pData); /*(北京10冗余采集)FBJ1继电器ID*/
|
||||
pData += 2u;
|
||||
pSwitchStr->wRelayRedunFB2Id = dquCiShortFromChar(pData); /*(北京10冗余采集)FBJ2继电器ID*/
|
||||
pData += 2u;
|
||||
}/* zt 删除单轨相关代码 2022-02-15 */
|
||||
else
|
||||
@@ -1192,4 +1194,155 @@ UINT8 R_OCIndicStruFromChar(UINT8* pDataAddr, OCStationIndicConfigDataStru* pInd
|
||||
return reVal;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
*函数功能:从数据到倒切开关配置继电器结构体
|
||||
*参数说明:pDataAddr数据地址, Relay_ReverseSwitchStruct 倒切开关继电器配置数据结构体指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 R_ReverseSwitchStrFromChar(UINT8 * pDataAddr, Relay_ReverseSwitchStruct * pReverseStr)
|
||||
{
|
||||
UINT8 * pData = pDataAddr;
|
||||
UINT8 rtnvalue = 0u;
|
||||
UINT16 j = 0U;
|
||||
UINT16 wTemp = 0U;
|
||||
if ((NULL == pDataAddr) || (NULL == pReverseStr))
|
||||
{
|
||||
rtnvalue = 0u;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
rtnvalue = 1U;
|
||||
}
|
||||
|
||||
if (1u == rtnvalue)
|
||||
{
|
||||
pReverseStr->wReversSwitchId = dquCiShortFromChar(pData); /*ID*/
|
||||
pData += 2u;
|
||||
|
||||
pReverseStr->ocId = dquCiShortFromChar(pData); /*Oc ID*/
|
||||
pData += 2u;
|
||||
|
||||
pReverseStr->wColOpenRelayId = dquCiShortFromChar(pData); /*常开继电器*/
|
||||
pData += 2u;
|
||||
|
||||
pReverseStr->wColCloseRelayId = dquCiShortFromChar(pData); /*常闭继电器*/
|
||||
pData += 2u;
|
||||
|
||||
if ((0U == pReverseStr->wColOpenRelayId)
|
||||
||(0U == pReverseStr->wColCloseRelayId)
|
||||
|| (pReverseStr->wColOpenRelayId == pReverseStr->wColCloseRelayId))
|
||||
{
|
||||
rtnvalue = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
pReverseStr->wRelateBoardNum = dquCiShortFromChar(pData); /*板卡个数*/
|
||||
pData += 2u;
|
||||
|
||||
if ((0U < pReverseStr->wRelateBoardNum)&&(OC_RELAY_REVERSE_BOARD_MAX >= pReverseStr->wRelateBoardNum))
|
||||
{
|
||||
for (j = 0U; j < pReverseStr->wRelateBoardNum; j++)
|
||||
{
|
||||
wTemp = dquCiShortFromChar(pData); /*板卡id*/
|
||||
pData += 2u;
|
||||
if ((0U == wTemp) || (UINT16_MAX == wTemp))
|
||||
{
|
||||
rtnvalue = 0U;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
pReverseStr->strRelateBoardBuf[j].wReversBoardId = wTemp;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rtnvalue = 0u;
|
||||
debug_infor_printf((char*)"\nR_ReverseSwitchStrFromChar BoardNum%d", pReverseStr->wRelateBoardNum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rtnvalue;
|
||||
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
*函数功能:从数据到倒切板卡结构体
|
||||
*参数说明:pDataAddr数据地址, Relay_ReverseBoardStruct 倒切板卡继电器配置数据结构体指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 R_ReverseBoardStrFromChar(UINT8 * pDataAddr, Relay_ReverseBoardStruct * pReverseStr)
|
||||
{
|
||||
UINT8 * pData = pDataAddr;
|
||||
UINT8 rtnvalue = 0u;
|
||||
UINT16 wBoardId = 0U;
|
||||
if ((NULL == pDataAddr) || (NULL == pReverseStr))
|
||||
{
|
||||
rtnvalue = 0u;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
rtnvalue = 1U;
|
||||
}
|
||||
|
||||
if (1u == rtnvalue)
|
||||
{
|
||||
wBoardId = dquCiShortFromChar(pData); /*ID*/
|
||||
pData += 2u;
|
||||
|
||||
if (0U == wBoardId)
|
||||
{
|
||||
rtnvalue = 0U;
|
||||
}
|
||||
else
|
||||
{
|
||||
pReverseStr->wReversBoardId = wBoardId; /*板卡ID*/
|
||||
|
||||
pReverseStr->wBoardColOpenRelayId = dquCiShortFromChar(pData); /*常开继电器*/
|
||||
pData += 2u;
|
||||
|
||||
pReverseStr->wBoardColCloseRelayId = dquCiShortFromChar(pData); /*常闭继电器*/
|
||||
pData += 2u;
|
||||
|
||||
if ((0U == pReverseStr->wBoardColCloseRelayId)
|
||||
||(0U == pReverseStr->wBoardColOpenRelayId)
|
||||
|| (pReverseStr->wBoardColOpenRelayId == pReverseStr->wBoardColCloseRelayId))
|
||||
{
|
||||
rtnvalue = 0U;
|
||||
}
|
||||
else
|
||||
{
|
||||
pReverseStr->chDevType = *pData;/*类型*/
|
||||
pData++;
|
||||
|
||||
pReverseStr->wDevId = dquCiShortFromChar(pData); /*设备ID*/
|
||||
pData += 2u;
|
||||
|
||||
if ((OC_LEN_REVERSE_TYPE_PSD == pReverseStr->chDevType) || (OC_LEN_REVERSE_TYPE_SWITCH == pReverseStr->chDevType))
|
||||
{
|
||||
if ((0U < pReverseStr->wDevId) && (UINT16_MAX != pReverseStr->wDevId))
|
||||
{
|
||||
rtnvalue = 1U;
|
||||
}
|
||||
else
|
||||
{
|
||||
rtnvalue = 0U;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rtnvalue = 0U;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rtnvalue;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -150,4 +150,18 @@ UINT8 R_ReverseCutStrFromChar(UINT8 * pDataAddr, Relay_ReverseCutStruct * pRever
|
||||
* cgh-合并CID-3037-3:
|
||||
*********************************************/
|
||||
UINT8 R_OCIndicStruFromChar(UINT8* pDataAddr, OCStationIndicConfigDataStru* pIndicStru);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:从数据到倒切开关配置继电器结构体
|
||||
*参数说明:pDataAddr数据地址, Relay_ReverseSwitchStruct 倒切开关继电器配置数据结构体指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 R_ReverseSwitchStrFromChar(UINT8 * pDataAddr, Relay_ReverseSwitchStruct * pReverseStr);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:从数据到倒切板卡结构体
|
||||
*参数说明:pDataAddr数据地址, Relay_ReverseBoardStruct 倒切板卡继电器配置数据结构体指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 R_ReverseBoardStrFromChar(UINT8 * pDataAddr, Relay_ReverseBoardStruct * pReverseStr);
|
||||
#endif
|
||||
|
||||
@@ -397,13 +397,6 @@ UINT8 InitRelay_ScreenStru(CHAR* CIDataName)
|
||||
{
|
||||
RelayDataLen.RelayScreenStrLen = wRealRowCount;
|
||||
rowLen = DataSize / wRealRowCount;
|
||||
if (DataSize < rowLen)
|
||||
{
|
||||
rtnValue = 0U;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/*动态申请空间*/
|
||||
RelayData.pRelayScreenStr = (Relay_ScreenStruct*)MyNew((UINT32)(sizeof(Relay_ScreenStruct) * RelayDataLen.RelayScreenStrLen));
|
||||
/*动态申请空间失败*/
|
||||
@@ -428,7 +421,6 @@ UINT8 InitRelay_ScreenStru(CHAR* CIDataName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*不处理*/
|
||||
@@ -476,8 +468,8 @@ UINT8 InitRelay_PointStru(CHAR* CIDataName)
|
||||
if (CI_PATTERN_TRADITIONAL == localCiPattern)
|
||||
{
|
||||
excelId = CI_DATA_TYPE;
|
||||
sheetId = RELAY_SIGNAL;
|
||||
rowLen = LEN_RELAY_SIGNAL;
|
||||
sheetId = RELAY_POINT;
|
||||
rowLen = LEN_RELAY_POINT;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1650,3 +1642,191 @@ UINT8 InitRelay_ReverseCutStru(CHAR* CIDataName)
|
||||
return rtnValue;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
*函数功能:填充倒切开关继电器结构体数组---内部用
|
||||
*参数说明:CIDataName件指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 InitRelay_ReverseSwitchStru(CHAR* CIDataName)
|
||||
{
|
||||
UINT8 funcRtn = 0u;
|
||||
Relay_ReverseSwitchStruct* pReverseSwitchStr = NULL; /*倒切开关变量*/
|
||||
UINT8* pDataAddr = NULL; /*数据地址*/
|
||||
UINT32 DataSize = 0U; /*数据大小(字节数)*/
|
||||
UINT16 j = 0U;
|
||||
UINT8 rtnValue = 0u;
|
||||
|
||||
/*已经初始化了,不用老是调用执行过程 全电子不用初始化这张表*/
|
||||
if (NULL != RelayData.pRelayReverseSwitchStr)
|
||||
{
|
||||
rtnValue = 1u;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*读取倒切设备继电器数据表*/
|
||||
funcRtn = dquGetConfigData(CIDataName, OC_DATA_TYPE, OC_RELAY_REVERSE_SWITCH_ID, &pDataAddr, &DataSize);
|
||||
if (0u == funcRtn)
|
||||
{
|
||||
/*函数调用失败*/
|
||||
rtnValue = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if ((0u != DataSize% OC_LEN_REVERSE_SWITCH_LEN))
|
||||
{ /*求得个数不为整数,数据错误*/
|
||||
debug_infor_printf((char* )"\nCI_RELAY_DATA,REVERSE_Switch len %d not equal to fs", OC_LEN_REVERSE_SWITCH_LEN);
|
||||
rtnValue = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
RelayDataLen.RelayReverseSwitchStrLen = (UINT16)(DataSize / OC_LEN_REVERSE_SWITCH_LEN);/*计算结构体个数*/
|
||||
|
||||
if (OC_LEN_REVERSE_SWITCH_LEN > DataSize)
|
||||
{/*不足一个*/
|
||||
RelayData.pRelayReverseSwitchStr = (Relay_ReverseSwitchStruct *)MyNew((UINT32)sizeof(Relay_ReverseSwitchStruct));
|
||||
RelayDataLen.RelayReverseSwitchStrLen = 0u;
|
||||
rtnValue = 1u;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/*动态申请空间*/
|
||||
RelayData.pRelayReverseSwitchStr = (Relay_ReverseSwitchStruct *)MyNew((UINT32)(sizeof(Relay_ReverseSwitchStruct) * RelayDataLen.RelayReverseSwitchStrLen));
|
||||
|
||||
if (NULL == RelayData.pRelayReverseSwitchStr)
|
||||
{/*动态申请空间失败*/
|
||||
RelayDataLen.RelayReverseSwitchStrLen = 0u;
|
||||
rtnValue = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*内存先设为无效*/
|
||||
(void)CommonMemSet(RelayData.pRelayReverseSwitchStr, (UINT32)(sizeof(Relay_ReverseSwitchStruct) * RelayDataLen.RelayReverseSwitchStrLen),
|
||||
(UINT8)0x00, (UINT32)(sizeof(Relay_ReverseSwitchStruct) * RelayDataLen.RelayReverseSwitchStrLen));
|
||||
/*解析数据到 结构体数组 */
|
||||
rtnValue = 1u;
|
||||
for (j = 0u; j < RelayDataLen.RelayReverseSwitchStrLen; j++)
|
||||
{
|
||||
pReverseSwitchStr = RelayData.pRelayReverseSwitchStr + j;
|
||||
|
||||
/*填充数据结构体*/
|
||||
rtnValue &= R_ReverseSwitchStrFromChar(pDataAddr, pReverseSwitchStr);
|
||||
pDataAddr += OC_LEN_REVERSE_SWITCH_LEN;
|
||||
if (1U != rtnValue)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return rtnValue;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
*函数功能:填充倒切板卡继电器结构体数组---内部用
|
||||
*参数说明:CIDataName件指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 InitRelay_ReverseBoardStru(CHAR* CIDataName)
|
||||
{
|
||||
UINT8 funcRtn = 0u;
|
||||
UINT8* pDataAddr = NULL; /*数据地址*/
|
||||
UINT32 DataSize = 0U; /*数据大小(字节数)*/
|
||||
Relay_ReverseBoardStruct tempBoardStru = {0}; /*倒切板卡临时存储*/
|
||||
Relay_ReverseSwitchStruct* pReverseSwitchStr = NULL;/*倒切开关指针*/
|
||||
Relay_ReverseBoardStruct* pReverseBoard = NULL; /*倒切板卡指针*/
|
||||
UINT16 j = 0U;
|
||||
UINT16 ii = 0U;
|
||||
UINT16 kk = 0U;
|
||||
UINT8 rtnValue = 0u;
|
||||
UINT16 wLen = 0U;
|
||||
UINT8 chFind = CI_ERROR;
|
||||
|
||||
if (NULL == RelayData.pRelayReverseSwitchStr)
|
||||
{
|
||||
/*需要先初始化倒切开关继电器*/
|
||||
rtnValue = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*读取倒切板卡继电器数据表*/
|
||||
funcRtn = dquGetConfigData(CIDataName, OC_DATA_TYPE, OC_RELAY_REVERSE_BOARD_ID, &pDataAddr, &DataSize);
|
||||
if (0u == funcRtn)
|
||||
{
|
||||
/*函数调用失败*/
|
||||
rtnValue = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if ((0u != DataSize% OC_LEN_REVERSE_BOARD_LEN))
|
||||
{ /*求得个数不为整数,数据错误*/
|
||||
debug_infor_printf((char*)"\nCI_RELAY_DATA,REVERSE_Board len %d not equal to fs", OC_LEN_REVERSE_BOARD_LEN);
|
||||
rtnValue = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
wLen = (UINT16)(DataSize / OC_LEN_REVERSE_BOARD_LEN);/*计算结构体个数*/
|
||||
|
||||
if ((0U == RelayDataLen.RelayReverseSwitchStrLen)&&(RelayDataLen.RelayReverseSwitchStrLen == wLen))
|
||||
{
|
||||
/*无开关*/
|
||||
rtnValue = 1u;
|
||||
}
|
||||
else if ((0U == RelayDataLen.RelayReverseSwitchStrLen) || (0U == wLen)||(CI_SUM_MAX <= RelayDataLen.RelayReverseSwitchStrLen))
|
||||
{
|
||||
/*板卡与开关配置不一致*/
|
||||
debug_infor_printf((char*)"\n InitRelay_ReverseBoardStru len %d Error \n", wLen);
|
||||
rtnValue = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*初始化到对应开关数据,板卡数据的空间已经申请在开关数据结构体内*/
|
||||
rtnValue = 1u;
|
||||
for (ii = 0U; ii < wLen; ii++)
|
||||
{
|
||||
/*填充数据结构体*/
|
||||
rtnValue &= R_ReverseBoardStrFromChar(pDataAddr, &tempBoardStru);
|
||||
pDataAddr += OC_LEN_REVERSE_BOARD_LEN;
|
||||
chFind = CI_ERROR;
|
||||
if (1U == rtnValue)
|
||||
{
|
||||
for (j = 0U; j < RelayDataLen.RelayReverseSwitchStrLen; j++)
|
||||
{
|
||||
pReverseSwitchStr = RelayData.pRelayReverseSwitchStr + j;
|
||||
for (kk = 0U; kk < pReverseSwitchStr->wRelateBoardNum; kk++)
|
||||
{
|
||||
/*遍历查找对应倒切板卡*/
|
||||
if (pReverseSwitchStr->strRelateBoardBuf[kk].wReversBoardId == tempBoardStru.wReversBoardId)
|
||||
{
|
||||
pReverseBoard = &pReverseSwitchStr->strRelateBoardBuf[kk];
|
||||
(void)CommonMemCpy((void *)(pReverseBoard), (UINT32)sizeof(Relay_ReverseBoardStruct), (const void *)(&tempBoardStru), (UINT32)sizeof(Relay_ReverseBoardStruct));
|
||||
chFind = CI_SUCCESS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (CI_SUCCESS == chFind)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((CI_ERROR == chFind)||(0U == rtnValue))
|
||||
{
|
||||
rtnValue = 0u;
|
||||
debug_infor_printf((char*)"\n InitRelay_ReverseBoardStru Board%d Not Find \n", tempBoardStru.wReversBoardId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return rtnValue;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ typedef struct SConfig_RelayDataStruct
|
||||
Relay_WashMachineStruct *pRelayWashMachineStr; /*洗车机继电器结构体*/
|
||||
Relay_DCAgreeStruct *pRelayDCAgreeStr;/*调车同意继电器结构体*/
|
||||
Relay_ReverseCutStruct *pRelayReverseCutStr;/*倒切设备继电器结构体*/
|
||||
Relay_ReverseSwitchStruct* pRelayReverseSwitchStr; /*倒切开关继电器结构体*/
|
||||
} RelayDataStruct_Config;
|
||||
/*继电器数组长度结构体*/
|
||||
typedef struct S_RelayDataStructLen
|
||||
@@ -58,6 +59,7 @@ typedef struct S_RelayDataStructLen
|
||||
UINT16 RelayMonoRailPointStrLen ; /*单轨道岔继电器结构体数组长度*/
|
||||
UINT16 RelayDCAgreeStrLen;/*调车同意继电器结构体数量*/
|
||||
UINT16 RelayReverseCutStrLen;/*倒切设备继电器结构体数量*/
|
||||
UINT16 RelayReverseSwitchStrLen;/*倒切开关继电器结构体数量*/
|
||||
} RelayDataStruct_ConfigLen;
|
||||
|
||||
/*********定义全局的继电器信息数据变量*******/
|
||||
@@ -173,5 +175,19 @@ UINT8 InitRelay_DCAgreeStru(CHAR* CIDataName);
|
||||
*********************************************/
|
||||
UINT8 InitRelay_ReverseCutStru(CHAR* CIDataName);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:填充倒切开关继电器结构体数组---内部用
|
||||
*参数说明:CIDataName件指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 InitRelay_ReverseSwitchStru(CHAR* CIDataName);
|
||||
|
||||
/*********************************************
|
||||
*函数功能:填充倒切板卡继电器结构体数组---内部用
|
||||
*参数说明:CIDataName件指针
|
||||
*返回值:0,失败;1,成功
|
||||
*********************************************/
|
||||
UINT8 InitRelay_ReverseBoardStru(CHAR* CIDataName);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1583,12 +1583,6 @@ UINT8 InitLS_OverlapLockCondStru(CHAR *LSDataName)
|
||||
realRowLen = (UINT16)(DataSize / rowLen);
|
||||
LSDataLen.LSOverlapLockCondStruLen = (UINT16)rowLen;
|
||||
|
||||
if (DataSize < realRowLen)
|
||||
{
|
||||
rtnValue = 0U;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*动态申请空间*/
|
||||
LSData.pLSOverlapLockCondStru = (LS_OveralpLockCondStru*)MyNew((UINT32)(sizeof(LS_OveralpLockCondStru) * LSDataLen.LSOverlapLockCondStruLen));
|
||||
/*动态申请空间失败*/
|
||||
@@ -1619,7 +1613,6 @@ UINT8 InitLS_OverlapLockCondStru(CHAR *LSDataName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rtnValue = 1U;
|
||||
@@ -2403,13 +2396,11 @@ UINT8 InitLSSideProtec(CHAR* LSDataName)
|
||||
for (j = 0u; j < wRouteSideProtecNum; j++)/*遍历每个侧防条件*/
|
||||
{
|
||||
wSideProtecID = LSData.pLSSideProtecGroupStru[i].RouteSideProtecBuf[j].SideProtecID;
|
||||
if (0u < wSideProtecID)/*侧防条件组表中的侧防条件ID大于0*/
|
||||
{
|
||||
for (k = 0u; k < LSDataLen.LSRouteSideProtecStruLen; k++)
|
||||
{
|
||||
if (wSideProtecID == LSData.pLSRouteSideProtecStru[k].SideProtecID)
|
||||
{
|
||||
CommonMemCpy(&LSData.pLSSideProtecGroupStru[i].RouteSideProtecBuf[j], sizeof(SideProtecStru), &LSData.pLSRouteSideProtecStru[k], sizeof(SideProtecStru));
|
||||
(void)CommonMemCpy(&LSData.pLSSideProtecGroupStru[i].RouteSideProtecBuf[j], (UINT32)sizeof(SideProtecStru), &LSData.pLSRouteSideProtecStru[k], (UINT32)sizeof(SideProtecStru));
|
||||
break;/*找到则跳出*/
|
||||
}
|
||||
else
|
||||
@@ -2422,11 +2413,6 @@ UINT8 InitLSSideProtec(CHAR* LSDataName)
|
||||
rtnValue = 0u;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -61,5 +61,7 @@
|
||||
|
||||
#define CI_SYSTEM_VERGE_KILL_ID ((UINT8)0x0F) /*计轴器对应临线的公里标转换表*/
|
||||
|
||||
#define CI_SYSTEM_SERIAL_COMM_ID ((UINT8)0x10) /*相邻联锁串口通信配置表*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#define DEVICE_IP_TYPE ((UINT32)0x40)
|
||||
|
||||
#define ZC_DSU_TRANSMIT_DATA_ID ((UINT32)4)
|
||||
#define ZC_DSU_TRANSMIT_DATA_LEN ((UINT16)(34+30))
|
||||
#define ZC_DSU_TRANSMIT_DATA_NEW_LEN ((UINT16)(34+30+40))/*ZCDSU通信关系表数据结构长度*/
|
||||
|
||||
#define ZC_DSU_TRANSMIT_DATA_NEW_NUM_MAX ((UINT16)(50)) /*ZCDSU通信关系表数据结构最大条数*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -108,11 +108,10 @@
|
||||
|
||||
/*道岔配置表*/
|
||||
#define OC_SWITCH_ID ((UINT8)2)
|
||||
#define LEN_OC_SWITCH ((UINT8)25)
|
||||
#define SWITCH_BOARD_MODE_MAX 5U /*一个OC中道岔最多的模块数*/
|
||||
/*道岔继电器配置表*/
|
||||
#define OC_SWITCH_RELAY_ID ((UINT8)4)
|
||||
#define LEN_OC_SWITCH_RELAY ((UINT8)24)
|
||||
#define LEN_OC_SWITCH_RELAY ((UINT8)28)
|
||||
/*信号机配置表*/
|
||||
#define OC_SIGNAL_ID ((UINT8)5)
|
||||
#define LEN_OC_SIGNAL ((UINT8)24)
|
||||
@@ -202,6 +201,15 @@
|
||||
/* 试灯继电器表 */
|
||||
#define OC_RELAY_LIGHTTESTBUTTON_ID ((UINT8)39)
|
||||
|
||||
/*北京10倒切板卡采集需求*/
|
||||
#define OC_RELAY_REVERSE_SWITCH_ID ((UINT8)42)/*倒切开关*/
|
||||
#define OC_RELAY_REVERSE_BOARD_ID ((UINT8)43)/*倒切板卡*/
|
||||
#define OC_RELAY_REVERSE_BOARD_MAX ((UINT16)42)/*倒切板卡个数最大值*/
|
||||
#define OC_LEN_REVERSE_SWITCH_LEN ((UINT8)94)
|
||||
#define OC_LEN_REVERSE_BOARD_LEN ((UINT8)9)
|
||||
#define OC_LEN_REVERSE_TYPE_SWITCH ((UINT8)0x01)
|
||||
#define OC_LEN_REVERSE_TYPE_PSD ((UINT8)0x10)
|
||||
|
||||
/*紧急停车按钮继电器结构体*/
|
||||
typedef struct S_Relay_EmegencyStopStruct
|
||||
{
|
||||
@@ -276,10 +284,13 @@ typedef struct S_Relay_PhysicalSegmentStruct
|
||||
typedef struct S_Relay_PointStruct
|
||||
{
|
||||
UINT16 wPointId; /*道岔ID*/
|
||||
UINT16 wOcId; /*OC ID*/
|
||||
UINT16 wRelayDingBiaoId; /*定表继电器ID*/
|
||||
UINT16 wRelayFanBiaoId; /*反表继电器ID*/
|
||||
UINT16 wRelayShadowDingBiaoId; /*定表继电器ID*/
|
||||
UINT16 wRelayShadowFanBiaoId; /*反表继电器ID*/
|
||||
UINT16 wRelayRedunDB1Id; /*(北京10道岔冗余采集)定表继电器1ID*/
|
||||
UINT16 wRelayRedunDB2Id; /*(北京10道岔冗余采集)定表继电器2ID*/
|
||||
UINT16 wRelayRedunFB1Id; /*(北京10道岔冗余采集)反表继电器1ID*/
|
||||
UINT16 wRelayRedunFB2Id; /*(北京10道岔冗余采集)反表继电器2ID*/
|
||||
UINT16 wRelayYunCaoId; /*允操继电器ID*/
|
||||
UINT16 wRelayDingCaoId; /*定操继电器ID*/
|
||||
UINT16 wRelayFanCaoId; /*反操继电器ID*/
|
||||
@@ -483,4 +494,23 @@ typedef struct S_Relay_ReverseCutStruct
|
||||
UINT16 wReverseCutRelayId; /*倒切继电器ID*/
|
||||
}Relay_ReverseCutStruct;
|
||||
|
||||
typedef struct S_Relay_ReverseBoardStruct
|
||||
{
|
||||
UINT16 wReversBoardId; /*倒切板卡D*/
|
||||
UINT8 chDevType; /*设备类型*/
|
||||
UINT16 wDevId; /*板卡配置设备 ID*/
|
||||
UINT16 wBoardColOpenRelayId; /* 常开采集继电器ID */
|
||||
UINT16 wBoardColCloseRelayId; /* 常闭采集继电器ID */
|
||||
}Relay_ReverseBoardStruct;
|
||||
|
||||
typedef struct S_Relay_ReverseSwitchStruct
|
||||
{
|
||||
UINT16 wReversSwitchId; /*倒切开关ID*/
|
||||
UINT16 ocId; /*OC ID*/
|
||||
UINT16 wColOpenRelayId; /* 常开采集继电器ID */
|
||||
UINT16 wColCloseRelayId; /* 常闭采集继电器ID */
|
||||
UINT16 wRelateBoardNum; /*关联板卡个数*/
|
||||
Relay_ReverseBoardStruct strRelateBoardBuf[OC_RELAY_REVERSE_BOARD_MAX]; /*关联板卡数据*/
|
||||
}Relay_ReverseSwitchStruct;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -97,6 +97,11 @@
|
||||
#define SIGNAL_DXJ_TYPE ((UINT8)0x0A) /*DXJ继电器*/
|
||||
#define CHECK_ZCJ_TYPE ((UINT8)0x0B) /*ZCJ继电器*/
|
||||
#define SWITCH_IBP_TYPE ((UINT8)0x0C) /*IBP继电器*/
|
||||
#define SIGNAL_DJ_TYPE ((UINT8)0x0F) /*信号机灯丝继电器*/
|
||||
#define SIGNAL_MAINJ_TYPE ((UINT8)0x10) /*信号机主控继电器*/
|
||||
#define SIGNAL_ACKJ_TYPE ((UINT8)0x11) /*信号机次控继电器*/
|
||||
#define SINNAL_CMAINJ_TYPE ((UINT8)0x12) /*信号机复杂主控继电器*/
|
||||
|
||||
|
||||
/*继电器混线相关*/
|
||||
#define RELAY_HUNXIAN_NUM ((UINT8)10) /*继电器混线容忍最大周期*/
|
||||
|
||||
@@ -1901,11 +1901,13 @@ static UINT8 rrm_CheckTrainHeadInFreeSta(UINT16 trainID, IN const EnvelopeStruct
|
||||
UINT8 chHeadAcStatus = 0U; /*车头计轴区段占用状态*/
|
||||
|
||||
/** 入口参数校验 */
|
||||
ASSERT_RET_VALUE((NULL == pTemp) || (0U == pTemp->ACCnt), errorCode, 0x80000000U);
|
||||
|
||||
ASSER_ERROR((NULL == pTemp) || (0U == pTemp->ACCnt), errorCode, 0x80000000U);
|
||||
if(0U == errorCode)
|
||||
{
|
||||
headRelStaID = rrm_PrepareAtsLgcStaOfAC(pTemp->ACID[pTemp->ACCnt - 1U]);
|
||||
|
||||
ASSER_ERROR((0xffffU == headRelStaID), errorCode, 0x40000000U);
|
||||
}
|
||||
|
||||
if (0U == errorCode)
|
||||
{
|
||||
|
||||
@@ -10,12 +10,16 @@
|
||||
********************************************************/
|
||||
|
||||
#include "ReverseCutConfigDataManage.h"
|
||||
#include "../Switch/SwitchConfigDataManage.h"
|
||||
#include "../PSD/PSDConfigDataManage.h"
|
||||
|
||||
|
||||
ReverseCutCfgDataStru gstReverseCutCfgData[REVERSE_CUT_SUM_MAX] = { 0U }; /*定义倒切装置数据配置结构体*/
|
||||
UINT16 gReverseCutCfgIdBuf[REVERSE_CUT_SUM_MAX] = { 0U }; /*定义倒切装置数据配置ID 缓存*/
|
||||
INT16 gReverseCutCfgSum = 0; /*定义倒切装置数据配置总数 */
|
||||
|
||||
ReverseSwitchCfgDataStru gLocalReverseData = { 0U };/*定义属于本联锁的倒切柜数据*/
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 获取倒切装置当前总数
|
||||
@@ -139,9 +143,13 @@ UINT8 ReverseCutConfigDataManage(void)
|
||||
UINT16 jj = 0u; /*游标*/
|
||||
UINT16 wReverseCutDataSum = 0u; /*信号机设备配置数据总数*/
|
||||
UINT8 ret = CI_ERROR;
|
||||
UINT8 localCiId = GetSystemParaLocalCiId();
|
||||
|
||||
/*保存信号机ID索引数组*/
|
||||
UINT16 wDevId = 0u;
|
||||
UINT16 wLocalSwitchSum = 0U;/*本地道岔*/
|
||||
UINT16 wLocalPsdSum = 0U;/*本地PSD*/
|
||||
UINT8 localCiId = GetSystemParaLocalCiId(); /*获取本机联锁ID*/
|
||||
UINT8 belongCiId = 0u;/*设备配置初始化所属联锁*/
|
||||
UINT8 chFind = CI_ERROR;
|
||||
/*保存倒切ID索引数组*/
|
||||
wReverseCutDataSum = GetReverseCutCurSum();
|
||||
if (wReverseCutDataSum < REVERSE_CUT_SUM_MAX)
|
||||
{/*配置数据总数错误*/
|
||||
@@ -163,6 +171,162 @@ UINT8 ReverseCutConfigDataManage(void)
|
||||
ret = CI_SUCCESS;
|
||||
}
|
||||
|
||||
return ret;
|
||||
if (CI_SUCCESS == ret)
|
||||
{
|
||||
if (0U != gLocalReverseData.wId)
|
||||
{
|
||||
wLocalSwitchSum = GetSwitchCurSum();
|
||||
wLocalPsdSum = GetPsdSum();
|
||||
/*本联锁具备倒切*/
|
||||
for (ii = 0u; ii < gLocalReverseData.wRelateBoardNum; ii++)
|
||||
{
|
||||
chFind = CI_ERROR;
|
||||
if (CI_DEVICE_TYPE_SWITCH == gLocalReverseData.strRelateBoardBuf[ii].chDevType)
|
||||
{
|
||||
for (jj = 0u; jj < wLocalSwitchSum; jj++)
|
||||
{
|
||||
wDevId = GetSwitchId(jj); /*获取道岔ID*/
|
||||
belongCiId = GetSwitchBelongCiId(wDevId); /*获取所属联锁ID*/
|
||||
if ((wDevId == gLocalReverseData.strRelateBoardBuf[ii].wDevId) && (belongCiId == localCiId))
|
||||
{
|
||||
/*设置对应倒切继电器*/
|
||||
chFind = SetSwitchRelateReverseBoardId(wDevId, gLocalReverseData.strRelateBoardBuf[ii].wReversBoardId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (CI_DEVICE_TYPE_PSD == gLocalReverseData.strRelateBoardBuf[ii].chDevType)
|
||||
{
|
||||
for (jj = 0u; jj < wLocalPsdSum; jj++)
|
||||
{
|
||||
wDevId = GetPsdId(jj); /*获取屏蔽门ID*/
|
||||
belongCiId = GetPsdBelongCiId(wDevId); /*获取所属联锁ID*/
|
||||
if ((wDevId == gLocalReverseData.strRelateBoardBuf[ii].wDevId) && (belongCiId == localCiId))
|
||||
{
|
||||
/*设置对应倒切继电器*/
|
||||
chFind = SetPsdRelateReverseRelay(wDevId, gLocalReverseData.strRelateBoardBuf[ii].wReversBoardId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chFind = CI_ERROR;
|
||||
}
|
||||
if (CI_ERROR == chFind)
|
||||
{
|
||||
ret = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区倒切开关常开继电器
|
||||
* 参数说明: 无
|
||||
* 返回值 : 0: 无倒切
|
||||
* [1,65534]继电器ID
|
||||
*/
|
||||
UINT16 GetReverseSwitchOpenRelay(void)
|
||||
{
|
||||
return gLocalReverseData.wColOpenRelayId;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区倒切开关常闭继电器
|
||||
* 参数说明: 无
|
||||
* 返回值 : 0: 无倒切
|
||||
* [1,65534]继电器ID
|
||||
*/
|
||||
UINT16 GetReverseSwitchCloseRelay(void)
|
||||
{
|
||||
return gLocalReverseData.wColCloseRelayId;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区指定索引倒切板卡常开继电器
|
||||
* 参数说明: wIndex 索引
|
||||
* 返回值 : 0: 无倒切
|
||||
* [1,65534]继电器ID
|
||||
* UINT16_MAX 错误
|
||||
*/
|
||||
UINT16 GetReverseBoardOpenRelay(UINT16 wIndex)
|
||||
{
|
||||
UINT16 chRetVal =UINT16_MAX;
|
||||
if (0U == gLocalReverseData.wRelateBoardNum)
|
||||
{
|
||||
chRetVal = 0U;
|
||||
}
|
||||
else if (wIndex < gLocalReverseData.wRelateBoardNum)
|
||||
{
|
||||
chRetVal = gLocalReverseData.strRelateBoardBuf[wIndex].wBoardColOpenRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*错误*/
|
||||
}
|
||||
return chRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区指定索引倒切板卡常闭继电器
|
||||
* 参数说明: wIndex 索引
|
||||
* 返回值 : 0: 无倒切
|
||||
* [1,65534]继电器ID
|
||||
*/
|
||||
UINT16 GetReverseBoardCloseRelay(UINT16 wIndex)
|
||||
{
|
||||
UINT16 chRetVal = UINT16_MAX;
|
||||
if (0U == gLocalReverseData.wRelateBoardNum)
|
||||
{
|
||||
chRetVal = 0U;
|
||||
}
|
||||
else if (wIndex < gLocalReverseData.wRelateBoardNum)
|
||||
{
|
||||
chRetVal = gLocalReverseData.strRelateBoardBuf[wIndex].wBoardColCloseRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*错误*/
|
||||
}
|
||||
return chRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区倒切板卡数量
|
||||
* 参数说明: 无
|
||||
* 返回值 : 0: 无倒切 [1,42]板卡数量
|
||||
*/
|
||||
UINT16 GetReverseBoardNum(void)
|
||||
{
|
||||
UINT16 chRetVal = 0U;
|
||||
if (0U == gLocalReverseData.wRelateBoardNum)
|
||||
{
|
||||
chRetVal = 0U;
|
||||
}
|
||||
else if (REVERSE_BOARD_SUM_MAX >= gLocalReverseData.wRelateBoardNum)
|
||||
{
|
||||
chRetVal = gLocalReverseData.wRelateBoardNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = REVERSE_BOARD_SUM_MAX;
|
||||
}
|
||||
return chRetVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取本集中区倒切配置数据
|
||||
* @param[in] 无
|
||||
* @return 本集中区倒切配置数据
|
||||
* @note by fan 20260610
|
||||
*/
|
||||
const ReverseSwitchCfgDataStru * GetReverseCfgData(void)
|
||||
{
|
||||
return &gLocalReverseData;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,11 +31,34 @@ extern "C" {
|
||||
UINT16 wReverseRelayId; /*倒切继电器ID (配置数据)*/
|
||||
}ReverseCutCfgDataStru;
|
||||
|
||||
typedef struct S_ReverseBoardStruct
|
||||
{
|
||||
UINT16 wReversBoardId; /*倒切板卡D*/
|
||||
UINT8 chDevType; /*设备类型*/
|
||||
UINT16 wDevId; /*板卡配置设备 ID*/
|
||||
UINT16 wBoardColOpenRelayId; /* 常开采集继电器ID */
|
||||
UINT16 wBoardColCloseRelayId; /* 常闭采集继电器ID */
|
||||
}ReverseBoardStruct;
|
||||
|
||||
/*倒切开关及板卡配置数据结构体*/
|
||||
typedef struct S_ReverseSwitchDataStruct
|
||||
{
|
||||
UINT16 wId; /*倒切开关编号*/
|
||||
UINT16 wColOpenRelayId; /* 常开采集继电器ID */
|
||||
UINT16 wColCloseRelayId; /* 常闭采集继电器ID */
|
||||
UINT16 wRelateBoardNum; /*关联板卡个数*/
|
||||
UINT8 chBelongCiId;/*所属联锁*/
|
||||
ReverseBoardStruct strRelateBoardBuf[REVERSE_BOARD_SUM_MAX]; /*关联板卡数据*/
|
||||
}ReverseSwitchCfgDataStru;
|
||||
|
||||
|
||||
|
||||
|
||||
/*******************************全局变量声明*******************************/
|
||||
extern ReverseCutCfgDataStru gstReverseCutCfgData[REVERSE_CUT_SUM_MAX]; /*定义倒切装置数据配置结构体*/
|
||||
extern UINT16 gReverseCutCfgIdBuf[REVERSE_CUT_SUM_MAX]; /*定义倒切装置数据配置ID 缓存*/
|
||||
extern INT16 gReverseCutCfgSum; /*定义倒切装置数据配置总数 */
|
||||
|
||||
extern ReverseSwitchCfgDataStru gLocalReverseData;/*定义属于本联锁的倒切柜数据*/
|
||||
/*
|
||||
* 功能描述: 获取倒切装置当前总数
|
||||
* 参数说明: void
|
||||
@@ -83,6 +106,54 @@ extern "C" {
|
||||
* CI_ERROR,整理失败
|
||||
*/
|
||||
UINT8 ReverseCutConfigDataManage(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区倒切开关常开继电器
|
||||
* 参数说明: 无
|
||||
* 返回值 : 0: 无倒切
|
||||
* [1,65534]继电器ID
|
||||
*/
|
||||
UINT16 GetReverseSwitchOpenRelay(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区倒切开关常闭继电器
|
||||
* 参数说明: 无
|
||||
* 返回值 : 0: 无倒切
|
||||
* [1,65534]继电器ID
|
||||
*/
|
||||
UINT16 GetReverseSwitchCloseRelay(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区指定索引倒切板卡常开继电器
|
||||
* 参数说明: wIndex 索引
|
||||
* 返回值 : 0: 无倒切
|
||||
* [1,65534]继电器ID
|
||||
* UINT16_MAX 错误
|
||||
*/
|
||||
UINT16 GetReverseBoardOpenRelay(UINT16 wIndex);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区指定索引倒切板卡常闭继电器
|
||||
* 参数说明: wIndex 索引
|
||||
* 返回值 : 0: 无倒切
|
||||
* [1,65534]继电器ID
|
||||
*/
|
||||
UINT16 GetReverseBoardCloseRelay(UINT16 wIndex);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取本集中区倒切板卡数量
|
||||
* 参数说明: 无
|
||||
* 返回值 : 0: 无倒切 [1,42]板卡数量
|
||||
*/
|
||||
UINT16 GetReverseBoardNum(void);
|
||||
|
||||
/**
|
||||
* @brief 获取本集中区倒切配置数据
|
||||
* @param[in] 无
|
||||
* @return 本集中区倒切配置数据
|
||||
* @note by fan 20260610
|
||||
*/
|
||||
const ReverseSwitchCfgDataStru * GetReverseCfgData(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,7 @@ ReverseCutDataStru gstReverseCutData[REVERSE_CUT_SUM_MAX] = { 0U }; /*
|
||||
UINT8 gTiocSystemMode = 0U; /*TIOC主机模式 (影子模式 主控模式)*/
|
||||
UINT8 gTiocSystemCutState = 0U; /*TIOC能否倒切状态 (能否倒切或默认)*/
|
||||
UINT8 gTiocCanntCutReason = 0U; /*不可倒切原因*/
|
||||
LocalReverseBoardDataStru gstReversetData = { 0U }; /*本集中区倒切状态存储、周期刷新*/
|
||||
|
||||
|
||||
/*
|
||||
@@ -235,6 +236,78 @@ UINT8 ReverseCutDataManageInit(void)
|
||||
;/* 初始化失败 */
|
||||
}
|
||||
|
||||
|
||||
if (CI_SUCCESS == ret)
|
||||
{
|
||||
/*初始化为非控制侧*/
|
||||
gstReversetData.chSwitchState = REVERSE_STATE_OLD_SYSTEM;
|
||||
for (i = 0u; i < REVERSE_BOARD_SUM_MAX; i++)
|
||||
{
|
||||
gstReversetData.localReverBoardState[i] = REVERSE_STATE_OLD_SYSTEM;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置倒切开关状态
|
||||
* 参数说明: const UINT8 chReverseCutState,倒切状态 0xAA新建 0x55既有 0xFF异常
|
||||
* 返回值 : 无
|
||||
*/
|
||||
void SetReverseSwitchState(const UINT8 chReverseCutState)
|
||||
{
|
||||
if ((REVERSE_STATE_NEW_SYSTEM == chReverseCutState)
|
||||
|| (REVERSE_STATE_OLD_SYSTEM == chReverseCutState)
|
||||
||(REVERSE_STATE_ABNORMAL == chReverseCutState))
|
||||
{
|
||||
gstReversetData.chSwitchState = chReverseCutState;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定索引倒切板卡状态
|
||||
* 参数说明: const UINT8 chReverseCutState,倒切状态0xAA新建 0x55既有 0xFF异常 wIndex索引
|
||||
* 返回值 : 无
|
||||
*/
|
||||
void SetReverseBoardState(const UINT8 chReverseCutState, const UINT16 wIndex)
|
||||
{
|
||||
if ((REVERSE_STATE_NEW_SYSTEM == chReverseCutState)
|
||||
|| (REVERSE_STATE_OLD_SYSTEM == chReverseCutState)
|
||||
||(REVERSE_STATE_ABNORMAL == chReverseCutState))
|
||||
{
|
||||
if(wIndex < REVERSE_BOARD_SUM_MAX)
|
||||
{
|
||||
gstReversetData.localReverBoardState[wIndex] = chReverseCutState;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取倒切开关状态
|
||||
* 参数说明: 无
|
||||
* 返回值 :0xAA新建 0x55既有 0xFF异常
|
||||
*/
|
||||
UINT8 GetReverseSwitchState(void)
|
||||
{
|
||||
UINT8 ret = gstReversetData.chSwitchState;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID指定索引倒切板卡状态
|
||||
* 参数说明: const UINT16 wBoardId,倒切板卡Id
|
||||
* 返回值 :0xAA新建 0x55既有 0xFF异常
|
||||
*/
|
||||
UINT8 GetReverseBoardState(const UINT16 wBoardId)
|
||||
{
|
||||
UINT8 ret = REVERSE_STATE_ABNORMAL;
|
||||
UINT16 jj = 0U;/*索引*/
|
||||
for (jj = 0U; jj < gLocalReverseData.wRelateBoardNum; jj++)
|
||||
{
|
||||
if (wBoardId == gLocalReverseData.strRelateBoardBuf[jj].wReversBoardId)
|
||||
{
|
||||
ret = gstReversetData.localReverBoardState[jj];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -30,6 +30,15 @@ extern "C" {
|
||||
UINT16 wReverseState; /*倒切状态*/
|
||||
}ReverseCutDataStru;
|
||||
|
||||
/*倒切状态数据结构体*/
|
||||
typedef struct S_ReverseDataStruct
|
||||
{
|
||||
UINT8 chSwitchState; /*倒切开关状态*/
|
||||
UINT8 localReverBoardState[REVERSE_BOARD_SUM_MAX];/*倒切板卡状态数组*/
|
||||
}LocalReverseBoardDataStru;
|
||||
|
||||
|
||||
|
||||
/*******************************全局变量声明*******************************/
|
||||
extern ReverseCutDataStru gstReverseCutData[REVERSE_CUT_SUM_MAX]; /*定义倒切装置数据动态数据结构体*/
|
||||
extern UINT8 gTiocSystemMode;
|
||||
@@ -109,6 +118,34 @@ void SetReverseCutState(const UINT16 wReverseCutId, const UINT8 chReverseCutStat
|
||||
*/
|
||||
UINT8 ReverseCutDataManageInit(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置倒切开关状态
|
||||
* 参数说明: const UINT8 chReverseCutState,倒切状态 0xAA新建 0x55既有 0xFF异常
|
||||
* 返回值 : 无
|
||||
*/
|
||||
void SetReverseSwitchState(const UINT8 chReverseCutState);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定索引倒切板卡状态
|
||||
* 参数说明: const UINT8 chReverseCutState,倒切状态0xAA新建 0x55既有 0xFF异常 wIndex索引
|
||||
* 返回值 : 无
|
||||
*/
|
||||
void SetReverseBoardState(const UINT8 chReverseCutState, const UINT16 wIndex);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取倒切开关状态
|
||||
* 参数说明: 无
|
||||
* 返回值 :0xAA新建 0x55既有 0xFF异常
|
||||
*/
|
||||
UINT8 GetReverseSwitchState(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID指定索引倒切板卡状态
|
||||
* 参数说明: const UINT16 wBoardId,倒切板卡Id
|
||||
* 返回值 :0xAA新建 0x55既有 0xFF异常
|
||||
*/
|
||||
UINT8 GetReverseBoardState(const UINT16 wBoardId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -31,4 +31,12 @@
|
||||
#define REVERSE_REASON_OC_COMM_ERR ((UINT8)0x01) /*不可倒切原因 OC通信故障*/
|
||||
#define REVERSE_REASON_IVOC_COMM_ERR ((UINT8)0x02) /*不可倒切原因 IVOC通信故障*/
|
||||
#define REVERSE_REASON_AXLE_COMM_ERR ((UINT8)0x04) /*不可倒切原因 计轴系统通信故障*/
|
||||
|
||||
/*倒切设备总数最大值*/
|
||||
#define REVERSE_BOARD_SUM_MAX ((UINT16)42) /*定义倒切板卡最大值*/
|
||||
|
||||
/*倒切状态*/
|
||||
#define REVERSE_STATE_NEW_SYSTEM ((UINT8)0xAAU) /*新建系统侧*/
|
||||
#define REVERSE_STATE_OLD_SYSTEM ((UINT8)0x55U) /*既有系统侧*/
|
||||
#define REVERSE_STATE_ABNORMAL ((UINT8)0xFFU) /*采集异常*/
|
||||
#endif
|
||||
@@ -2162,8 +2162,6 @@ static UINT8 LockDrSubRouteSwitchCheck(UINT16 wSubRouteId, UINT8 functionId, UIN
|
||||
#endif
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/*
|
||||
进路内所有道岔位置正确
|
||||
@@ -2185,12 +2183,6 @@ static UINT8 LockDrSubRouteSwitchCheck(UINT16 wSubRouteId, UINT8 functionId, UIN
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if ((CI_SUCCESS == reResult) || (RETURN_LOCK_ERR_SWITPOS == reResult))
|
||||
{/*进路锁闭防护道岔检查*/
|
||||
@@ -3921,29 +3913,8 @@ static UINT8 SetDrSubRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 se
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{/*进路办理防护道岔检查*/
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/*进路关联防护道岔【未引导总锁】*/
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
@@ -3984,12 +3955,6 @@ static UINT8 SetDrSubRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 se
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 *//* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
|
||||
@@ -2437,7 +2437,9 @@ void LgcSecLogicalUnlockProc(const UINT16 logRouteId, const UINT16 logSectionId,
|
||||
/*清0 防脏数据*/
|
||||
for (jj = chTrainSum; jj < chLgcResTrainSum; jj++)
|
||||
{
|
||||
(void)ComMemSet(&(pstLgcSecInfo[wLgcBufIndex].szTrainResData[jj]), (UINT16)sizeof(LogicTrainResStruct), 0U);
|
||||
|
||||
/*重置资源信息结构体*/
|
||||
ResetResInfoStruct(wLgcBufIndex, jj);
|
||||
}
|
||||
pstLgcSecInfo[wLgcBufIndex].chTrainInfoSum = chTrainSum;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "../Switch/SwitchDataManage.h"
|
||||
#include "RouteConfigDataManage.h"
|
||||
|
||||
#include "dquCILSStruInit.h"
|
||||
RouteConfigDataStruct RouteConfigDataStru[ROUTE_SUM_MAX]; /*定义进路配置数据结构体,cgh-合并CID-2539-1:此处声明不进行初始化,统一放到InitAllStaticDataStr函数中进行初始化,为解决生成内核过大得问题*/
|
||||
UINT16 LocalCiRouteIdBuf[ROUTE_SUM_MAX] = {0u}; /*定义本地联锁进路ID映射数组*/
|
||||
INT16 RouteCurSum = 0; /*进路当前总数(本联锁和相邻联锁发送给本联锁的进路总数),进路的特殊处理*/
|
||||
@@ -3727,3 +3727,75 @@ UINT8 GetRouteConfigDirection(const UINT16 routeId)
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取进路联络线属性
|
||||
* 参数说明: const UINT16 wRouteId, 进路ID
|
||||
* 返回值 : 进路联络线属性
|
||||
*
|
||||
* BY LYJ 20260602
|
||||
*/
|
||||
UINT8 GetRouteConnectType(const UINT16 wRouteId)
|
||||
{
|
||||
UINT8 chRetVal = 0U;
|
||||
UINT16 bufIndex = 0U;
|
||||
bufIndex = GetRouteConfigBufIndex(wRouteId); /*获取进路数组下标*/
|
||||
|
||||
if (ROUTE_SUM_MAX > bufIndex)
|
||||
{
|
||||
chRetVal = RouteConfigDataStru[bufIndex].chRouteConnectType;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
return chRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取进路指定区段的前一个区段
|
||||
* 参数说明: const UINT16 wRouteId, 进路ID
|
||||
* const UINT16 wPhySecId,物理区段ID
|
||||
* 返回值 : 进路指定区段的前一个区段
|
||||
*
|
||||
* BY LYJ 20260603
|
||||
*/
|
||||
UINT16 GetRoutePhySecFrontPhyId(const UINT16 wRouteId, const UINT16 wPhySecId)
|
||||
{
|
||||
UINT16 wFroutPhySecId = 0U;
|
||||
UINT8 chRoutePhySum = 0U;
|
||||
RoutePhysicalSectionStruct* pRoutePhyBuf = NULL;
|
||||
UINT8 ii = 0U;
|
||||
|
||||
chRoutePhySum = GetRoutePhysicalSectionSum(wRouteId);
|
||||
pRoutePhyBuf = GetRouteSectionData(wRouteId);
|
||||
if (NULL != pRoutePhyBuf)
|
||||
{
|
||||
for (ii = 0U;ii < chRoutePhySum;ii++)
|
||||
{
|
||||
if (pRoutePhyBuf[ii].PhysicalSectionId == wPhySecId)
|
||||
{
|
||||
if (0U < ii)
|
||||
{
|
||||
wFroutPhySecId = pRoutePhyBuf[ii - 1U].PhysicalSectionId;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*进路第一个区段属于邻线,进路是邻线,不在本线处理*/
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
return wFroutPhySecId;
|
||||
}
|
||||
@@ -317,6 +317,7 @@ typedef struct S_RouteConfigDataStruct
|
||||
UINT8 cRouteRukuProperty; /*是否为入库进路:0x55 入库进路;0xaa 非入库进路*/
|
||||
SideProtecGroupStru RouteSideProtecData;/*进路侧防条件*/
|
||||
UINT8 chRouteCouplinkType; /*进路联挂属性:0x55 配置联挂属性;0xaa 未配置联挂属性*/
|
||||
UINT8 chRouteConnectType; /*进路联络线属性:0x55 配置联络线属性;0xaa 未配置联络线属性*/
|
||||
}RouteConfigDataStruct;
|
||||
|
||||
/*******************************全局变量声明*******************************/
|
||||
@@ -1427,6 +1428,23 @@ UINT8 GetPhySecInRoutePosIndex(const UINT16 routeId, const UINT16 phySectionId);
|
||||
** by LYJ 20260330
|
||||
*/
|
||||
UINT8 GetRouteConfigDirection(const UINT16 routeId);
|
||||
/*
|
||||
* 功能描述: 获取进路联络线属性
|
||||
* 参数说明: const UINT16 wRouteId, 进路ID
|
||||
* 返回值 : 进路联络线属性
|
||||
*
|
||||
* BY LYJ 20260602
|
||||
*/
|
||||
UINT8 GetRouteConnectType(const UINT16 wRouteId);
|
||||
/*
|
||||
* 功能描述: 获取进路指定区段的前一个区段
|
||||
* 参数说明: const UINT16 wRouteId, 进路ID
|
||||
* const UINT16 wPhySecId,物理区段ID
|
||||
* 返回值 : 进路指定区段的前一个区段
|
||||
*
|
||||
* BY LYJ 20260603
|
||||
*/
|
||||
UINT16 GetRoutePhySecFrontPhyId(const UINT16 wRouteId, const UINT16 wPhySecId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -6193,3 +6193,53 @@ UINT32 GetRouteIdleCycNum(const UINT16 routeId)
|
||||
|
||||
return reVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定进路联络线解锁标志
|
||||
* 参数说明:const UINT16 routeId 需设置的进路ID
|
||||
* const UINT8 setFlag 需设置标志
|
||||
* 返 回 值:无
|
||||
* Created lyj 2026.06.03
|
||||
*/
|
||||
void SetRouteConnectReleaseFlag(const UINT16 routeId, const UINT8 setFlag)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
bufIndex = GetRouteConfigBufIndex(routeId); /*获取进路数组下标*/
|
||||
if (ROUTE_SUM_MAX > bufIndex)
|
||||
{
|
||||
if ((ROUTE_CONNECT_RELEASE_YES == setFlag) || (ROUTE_CONNECT_RELEASE_NO == setFlag))
|
||||
{
|
||||
RouteDataStru[bufIndex].chRouteConnReleaseFlag = setFlag;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 功能描述:获取指定进路联络线解锁标志
|
||||
* 参数说明:const UINT16 routeId 进路ID
|
||||
* 返 回 值:进路联络线解锁标志
|
||||
* Created lyj 2026.06.03
|
||||
*/
|
||||
UINT8 GetRouteConnectReleaseFlag(const UINT16 routeId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 chRetVal = ROUTE_CONNECT_RELEASE_NO;
|
||||
bufIndex = GetRouteConfigBufIndex(routeId); /*获取进路数组下标*/
|
||||
if (ROUTE_SUM_MAX > bufIndex)
|
||||
{
|
||||
chRetVal = RouteDataStru[bufIndex].chRouteConnReleaseFlag;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
return chRetVal;
|
||||
}
|
||||
@@ -113,6 +113,7 @@ typedef struct S_RouteDataStruct
|
||||
UINT8 chCouplinkSuccessFlag; /*进路联挂成功*/
|
||||
UINT8 chCouplinkErrorFlag; /*进路联挂失败*/
|
||||
UINT32 dwRouteIdleCycNum; /*进路空闲起始周期号*/
|
||||
UINT8 chRouteConnReleaseFlag; /*进路联络线解锁标志*/
|
||||
} RouteDataStruct;
|
||||
|
||||
/*进路动态数据结构体-车车*/
|
||||
@@ -1787,6 +1788,21 @@ void SetRouteStopensureFlagCC(const UINT16 routeId, const UINT8 stopensureFlag);
|
||||
* by cgh 20251210
|
||||
*/
|
||||
UINT32 GetRouteIdleCycNum(const UINT16 routeId);
|
||||
/*
|
||||
* 功能描述:设置指定进路联络线解锁标志
|
||||
* 参数说明:const UINT16 routeId 需设置的进路ID
|
||||
* const UINT8 setFlag 需设置标志
|
||||
* 返 回 值:无
|
||||
* Created lyj 2026.06.03
|
||||
*/
|
||||
void SetRouteConnectReleaseFlag(const UINT16 routeId, const UINT8 setFlag);
|
||||
/*
|
||||
* 功能描述:获取指定进路联络线解锁标志
|
||||
* 参数说明:const UINT16 routeId 进路ID
|
||||
* 返 回 值:进路联络线解锁标志
|
||||
* Created lyj 2026.06.03
|
||||
*/
|
||||
UINT8 GetRouteConnectReleaseFlag(const UINT16 routeId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
#define ROUTE_TYPE_AUTO_TRIGGER ((UINT8)0x66) /*自动触发进路*/
|
||||
#define ROUTE_TYPE_RUKU ((UINT8)0x77) /*入库进路*/
|
||||
#define ROUTE_TYPE_COUPLINK ((UINT8)0x88) /*联挂进路*/
|
||||
#define ROUTE_TYPE_CONNECT ((UINT8)0x99) /*联络线进路*/
|
||||
|
||||
/*进路状态*/
|
||||
#define ROUTE_STATE_IDLE ((UINT8)0x01) /*进路空闲*/
|
||||
@@ -401,5 +402,10 @@
|
||||
#define SIDE_PROTECT_SWITCH_NUM_MAX ((UINT8)5) /*侧防道岔数量*/
|
||||
#define SIDE_PROTECT_PHYSEC_NUM_MAX ((UINT8)10) /*侧防物理区段数量*/
|
||||
#define SIDE_PROTECT_NUM_MAX ((UINT8)10) /*侧防条件数量*/
|
||||
|
||||
|
||||
#define ROUTE_CONNECT_RELEASE_YES ((UINT8)0x55) /*进路联络线解锁标志有效*/
|
||||
#define ROUTE_CONNECT_RELEASE_NO ((UINT8)0xaa) /*进路联络线解锁标志无效*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -503,19 +503,42 @@ void SetAxisIncludeLogSecArbState(const UINT16 wAxisSectionId, const UINT8 chSta
|
||||
UINT16* pLogSectionIdBuf = NULL;/*计轴区段包含逻辑区段ID*/
|
||||
UINT8 chLogSectionSum = 0U;/*计轴区段包含逻辑区段数目*/
|
||||
UINT8 ii = 0U;
|
||||
UINT8 cLocalCiId = 0U;
|
||||
UINT8 chLogSecBelongCi = 0U;
|
||||
UINT8 chCheckFlag = 0U;
|
||||
|
||||
pLogSectionIdBuf = GetAxisSecLogSectionIdBuf(wAxisSectionId);
|
||||
chLogSectionSum = GetAxisSecLogSectionSum(wAxisSectionId);
|
||||
cLocalCiId = GetSystemParaLocalCiId();
|
||||
|
||||
if (NULL != pLogSectionIdBuf)
|
||||
{
|
||||
for (ii = 0U; ii < chLogSectionSum; ii++)
|
||||
{
|
||||
if ((LGC_SECTION_ARB_NO == chState) || (LGC_SECTION_ARB_YES == chState))
|
||||
{
|
||||
chLogSecBelongCi = GetLogSecBelongCiId(pLogSectionIdBuf[ii]);
|
||||
chCheckFlag = IsSameLineCI(cLocalCiId, chLogSecBelongCi);
|
||||
if (SAME_LINE_NO == chCheckFlag)
|
||||
{
|
||||
SetLgcArbState(pLogSectionIdBuf[ii], chState);
|
||||
SetLogSecCbtcArbState(pLogSectionIdBuf[ii], chState); /*互联互通,不同线路设置CBTCARB;用于显示*/
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLgcArbState(pLogSectionIdBuf[ii], chState);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1618,7 +1618,8 @@ void ClearLgcSecResTrain(UINT16 wLogSecId)
|
||||
/*清0防脏*/
|
||||
for (ii = chNeedKeepSum; ii < LOGIC_SECTION_RES_SUM_MAX; ii++)
|
||||
{
|
||||
(void)ComMemSet((UINT8*)&(LogicSectionDataStruCC[wBufIndex].szTrainResData[ii]), (UINT16)sizeof(LogicTrainResStruct), 0U);
|
||||
/*重置资源信息结构体*/
|
||||
ResetResInfoStruct(wBufIndex, ii);
|
||||
}
|
||||
LogicSectionDataStruCC[wBufIndex].chTrainInfoSum = chNeedKeepSum;
|
||||
}
|
||||
@@ -2886,7 +2887,7 @@ void RemoveLgcSecResTrain(UINT16 wLogSecId, UINT16 wTrainId)
|
||||
if (wLgcResTrainId == wTrainId)
|
||||
{
|
||||
/*删除该列车对应逻辑区段资源*/
|
||||
(void)ComMemSet((void *)&pstLgcSecInfo[wLgcBufIndex].szTrainResData[jj], (UINT16)sizeof(LogicTrainResStruct), 0U);
|
||||
ResetResInfoStruct(wLgcBufIndex, jj);
|
||||
debug_infor_printf((const)"LogSecRes Remove LgcId: %d TrainId:%d Cyc\n"
|
||||
, wLogSecId
|
||||
, wTrainId
|
||||
@@ -3806,6 +3807,8 @@ void LogJumpLockCmdManage(const UINT16 logSectionId, const UINT8 jumpLockState)
|
||||
{
|
||||
/** 设置跳跃锁闭允许标志为允许 */
|
||||
|
||||
|
||||
ClearLogSeceSwitchDanCaoPos(logSectionId);/*清除单操位置*/
|
||||
/** 设置逻辑区段跳跃锁闭 */
|
||||
SetLogSecJumpLockState(logSectionId, LOGIC_SECTION_JUMP_LOCK_YES);
|
||||
|
||||
@@ -3815,9 +3818,13 @@ void LogJumpLockCmdManage(const UINT16 logSectionId, const UINT8 jumpLockState)
|
||||
devState = 0u;
|
||||
retVal = LogicSecRltvPrtctSwLockCheck(logSectionId, &devId, &devState);
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
{/*防护道岔锁检查*/
|
||||
SetLogSecJumpLockPermFlag(logSectionId, LOGIC_JUMPUNLOCK_PERMISSIVE_YES);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLogSecJumpLockPermFlag(logSectionId, LOGIC_JUMPUNLOCK_PERMISSIVE_NO);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4985,7 +4992,7 @@ void SetLogSecLogLockState(const UINT16 wLogSectionId, const UINT8 chLogLockStat
|
||||
{
|
||||
UINT16 wBufIndex = 0U; /*数组下标*/
|
||||
UINT16 LogSecLockBelongRouteId = 0U;
|
||||
|
||||
UINT8 index = 0U;
|
||||
wBufIndex = GetlogSectionBufIndex(wLogSectionId); /*获取区段数组下标*/
|
||||
|
||||
if (LOGIC_SECTION_SUM_MAX > wBufIndex)
|
||||
@@ -5003,9 +5010,10 @@ void SetLogSecLogLockState(const UINT16 wLogSectionId, const UINT8 chLogLockStat
|
||||
else
|
||||
{
|
||||
LogicSectionDataStruCC[wBufIndex].chTrainInfoSum = 0U;
|
||||
(void)CommonMemSet(LogicSectionDataStruCC[wBufIndex].szTrainResData, \
|
||||
(UINT32)sizeof(LogicSectionDataStruCC[wBufIndex].szTrainResData), \
|
||||
0U, (UINT32)sizeof(LogicSectionDataStruCC[wBufIndex].szTrainResData));
|
||||
for(index = 0U; index < LOGIC_SECTION_RES_SUM_MAX; index++)
|
||||
{
|
||||
ResetResInfoStruct(wBufIndex, index);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5189,7 +5197,7 @@ void SetLogSecLogLockStateOtherCi(const UINT16 wLogSectionId, const UINT8 chLogL
|
||||
{
|
||||
UINT16 wBufIndex = 0U; /*数组下标*/
|
||||
UINT8 cLogSecLockState = 0U; /*逻辑区段锁闭状态*/
|
||||
|
||||
UINT8 jj = 0U;
|
||||
wBufIndex = GetlogSectionBufIndex(wLogSectionId); /*获取区段数组下标*/
|
||||
|
||||
if (LOGIC_SECTION_SUM_MAX > wBufIndex)
|
||||
@@ -5204,7 +5212,10 @@ void SetLogSecLogLockStateOtherCi(const UINT16 wLogSectionId, const UINT8 chLogL
|
||||
{
|
||||
/*进路锁闭和逻辑锁闭均未锁闭,清除逻辑区段资源列车信息*/
|
||||
LogicSectionDataStruCC[wBufIndex].chTrainInfoSum = 0U;
|
||||
(void)CommonMemSet(LogicSectionDataStruCC[wBufIndex].szTrainResData, (UINT32)sizeof(LogicSectionDataStruCC[wBufIndex].szTrainResData), 0U, (UINT32)sizeof(LogicSectionDataStruCC[wBufIndex].szTrainResData));
|
||||
for (jj = 0U; jj < LOGIC_SECTION_RES_SUM_MAX; jj++)
|
||||
{
|
||||
ResetResInfoStruct(wBufIndex, jj);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5719,13 +5730,13 @@ void SetLogSecLockDirHlht(UINT16 wLogSectionId, const UINT8 lockDir)
|
||||
|
||||
if (bufIndex < LOGIC_SECTION_SUM_MAX)
|
||||
{
|
||||
if (CI_SYSTEM_DIRECTION_NONE == lockDir)
|
||||
if ((CI_SYSTEM_DIRECTION_UP == lockDir) || (CI_SYSTEM_DIRECTION_DOWN == lockDir))
|
||||
{
|
||||
LogicSectionDataStru[bufIndex].LogLockDir = CI_SYSTEM_DIRECTION_NONE;
|
||||
LogicSectionDataStru[bufIndex].LogLockDir = lockDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
LogicSectionDataStru[bufIndex].LogLockDir = lockDir;
|
||||
LogicSectionDataStru[bufIndex].LogLockDir = CI_SYSTEM_DIRECTION_NONE;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -6385,10 +6396,6 @@ UINT8 ReqAlignmentInfoCalc(void)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*¼ÌÐøÖ´ÐÐ*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -6614,3 +6621,34 @@ void SetSendAtsLgcArbState(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 重置资源信息结构体
|
||||
* 参数说明: UINT16 logicSectionId 逻辑区段ID
|
||||
* UINT8 index 资源信息结构体数组索引
|
||||
* 返回值 : 无
|
||||
*/
|
||||
void ResetResInfoStruct(UINT16 logicSectionId, UINT8 index)
|
||||
{
|
||||
if (LOGIC_SECTION_SUM_MAX > logicSectionId)
|
||||
{
|
||||
|
||||
if (LOGIC_SECTION_RES_SUM_MAX > index)
|
||||
{
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[index].wTrainId = 0U;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[index].chLogicResUsable = LOGIC_SECTION_RES_UNUSABLE;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[index].chLogicReturnState = LOGIC_SECTION_TRAIN_RETURN_NO;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[index].chTrainApplyState = LOGIC_SECTION_TRAIN_APPLY_NO;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[index].chLogicUnlockState = LOGIC_SECTION_TRAIN_UNLOCK_NO;
|
||||
LogicSectionDataStruCC[logicSectionId].szTrainResData[index].dwRcvUnlockCmdCyc = 0U;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1469,7 +1469,13 @@ void SetLogSecPbTacsArbState(const UINT16 wLgcId, const UINT8 chArb);
|
||||
* by cgh 20260330
|
||||
*/
|
||||
void SetSendAtsLgcArbState(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 重置资源信息结构体
|
||||
* 参数说明: UINT16 logicSectionId 逻辑区段ID
|
||||
* 返回值 : 无
|
||||
* by cgh 20260330
|
||||
*/
|
||||
void ResetResInfoStruct(UINT16 logicSectionId, UINT8 index);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
/*区段最大数量*/
|
||||
#define PHYSICAL_SECTION_SUM_MAX ((UINT16)1000) /*定义物理区段数量最大值*/
|
||||
#define AXIS_SECTION_SUM_MAX ((UINT16)1200) /*定义计轴区段数量最大值*/
|
||||
#define AXIS_SECTION_SUM_MAX ((UINT16)2000) /*定义计轴区段数量最大值*/
|
||||
#define AXIS_INCLUDE_LOG_SUM_MAX ((UINT16)50) /*定义计轴包含逻辑区段数量最大值*/
|
||||
#define LOGIC_SECTION_SUM_MAX ((UINT16)1500) /*定义逻辑区段数量最大值*/
|
||||
#define LOGIC_SECTION_SUM_MAX ((UINT16)3000) /*定义逻辑区段数量最大值*/
|
||||
#define PHYSICAL_INCLUDE_AXIS_SUM_MAX ((UINT16)10) /*定义物理区段包含计轴区段数量最大值*/
|
||||
#define AXIS_INCLUDE_SWITCH_SUM_MAX ((UINT16)4) /*定义计轴区段包含的道岔数量最大值*/
|
||||
#define AXIS_INCLUDE_LINK_SUM_MAX ((UINT16)5) /*定义计轴区段包含的LINK最大值*/
|
||||
|
||||
@@ -1889,3 +1889,92 @@ UINT16 GetSignalOutFirstLogSec(const UINT16 signalId)
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID信号机1灯丝驱动继电器ID(联络线使用)
|
||||
* 参数说明: const UINT16 signalId, 信号机ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 信号1灯丝驱动继电器ID
|
||||
*/
|
||||
UINT16 GetSignalFirstDsDrvRelayId(const UINT16 signalId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetSignalConfigBufIndex(signalId); /*获取区段数组下标*/
|
||||
if (SIGNAL_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = SignalConfigDataStru[bufIndex].wFirstDsDrvRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID信号机主控驱动继电器ID(联络线使用)
|
||||
* 参数说明: const UINT16 signalId, 信号机ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 信号主控驱动继电器ID
|
||||
*/
|
||||
UINT16 GetSignalMainDrvRelayId(const UINT16 signalId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetSignalConfigBufIndex(signalId); /*获取区段数组下标*/
|
||||
if (SIGNAL_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = SignalConfigDataStru[bufIndex].wMainDrvRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID信号机次控驱动继电器ID(联络线使用)
|
||||
* 参数说明: const UINT16 signalId, 信号机ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 信号次控驱动继电器ID
|
||||
*/
|
||||
UINT16 GetSignalAckDrvRelayId(const UINT16 signalId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetSignalConfigBufIndex(signalId); /*获取区段数组下标*/
|
||||
if (SIGNAL_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = SignalConfigDataStru[bufIndex].wAckDrvRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID信号机复杂主控驱动继电器ID(联络线使用)
|
||||
* 参数说明: const UINT16 signalId, 信号机ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 信号复杂主控驱动继电器ID
|
||||
*/
|
||||
UINT16 GetSignalCMainDrvRelayId(const UINT16 signalId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetSignalConfigBufIndex(signalId); /*获取区段数组下标*/
|
||||
if (SIGNAL_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = SignalConfigDataStru[bufIndex].wCMainDrvRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@@ -102,6 +102,11 @@ typedef struct S_SignalConfigDataStruct
|
||||
UINT16 LxDrvRelayId; /*列车信号驱动继电器ID(配置字段-联络线使用)*/
|
||||
UINT16 YxDrvRelayId; /*引导信号驱动继电器ID(配置字段-联络线使用)*/
|
||||
UINT16 DxDrvRelayId; /*调车信号驱动继电器ID(配置字段-联络线使用)*/
|
||||
UINT16 wFirstDsDrvRelayId; /*1灯丝驱动继电器ID(配置字段-联络线使用)*/
|
||||
UINT16 wMainDrvRelayId; /*信号机主控驱动继电器ID(配置字段-联络线使用)*/
|
||||
UINT16 wAckDrvRelayId; /*信号机次控驱动继电器ID(配置字段-联络线使用)*/
|
||||
UINT16 wCMainDrvRelayId; /*信号机复杂主控驱动继电器ID(配置字段-联络线使用)*/
|
||||
|
||||
} SignalConfigDataStruct;
|
||||
|
||||
typedef struct S_OC_SignalConfigDataStruct
|
||||
@@ -744,6 +749,34 @@ UINT16 GetSignalDxDrvRelayId(const UINT16 signalId);
|
||||
* >0: 逻辑区段ID
|
||||
*/
|
||||
UINT16 GetSignalOutFirstLogSec(const UINT16 signalId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID信号机1灯丝驱动继电器ID(联络线使用)
|
||||
* 参数说明: const UINT16 signalId, 信号机ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 信号1灯丝驱动继电器ID
|
||||
*/
|
||||
UINT16 GetSignalFirstDsDrvRelayId(const UINT16 signalId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID信号机主控驱动继电器ID(联络线使用)
|
||||
* 参数说明: const UINT16 signalId, 信号机ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 信号主控驱动继电器ID
|
||||
*/
|
||||
UINT16 GetSignalMainDrvRelayId(const UINT16 signalId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID信号机次控驱动继电器ID(联络线使用)
|
||||
* 参数说明: const UINT16 signalId, 信号机ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 信号次控驱动继电器ID
|
||||
*/
|
||||
UINT16 GetSignalAckDrvRelayId(const UINT16 signalId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID信号机复杂主控驱动继电器ID(联络线使用)
|
||||
* 参数说明: const UINT16 signalId, 信号机ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 信号复杂主控驱动继电器ID
|
||||
*/
|
||||
UINT16 GetSignalCMainDrvRelayId(const UINT16 signalId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -5792,3 +5792,70 @@ void SetSignalCrossStateCC(const UINT16 signalId, const UINT8 signalCrossState,
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取复杂主控继电器驱动状态
|
||||
* 参数说明:const UINT16 wCMainlRralyId, 继电器ID
|
||||
* const UINT16 wSignalId, 信号机ID
|
||||
* 返 回 值:驱动状态
|
||||
* Created LYJ 2026.6.2
|
||||
*/
|
||||
UINT8 GetCMainRelayDriveState(const UINT16 wCMainlRralyId, const UINT16 wSignalId)
|
||||
{
|
||||
UINT8 chRet = CI_ERROR;
|
||||
UINT16 wSigOutPhyId = 0U;
|
||||
UINT16 wSigInPhyId = 0U;
|
||||
UINT16 wLockRouteId = 0U;
|
||||
UINT8 chOccState = 0U;
|
||||
UINT8 chLockState = 0U;
|
||||
UINT8 chFengSuoState = 0U;
|
||||
UINT8 chJLockState = 0U;
|
||||
UINT16 wQXzhaochaRelay = 0U;
|
||||
UINT8 chColleState = 0U;
|
||||
|
||||
if ((0U < wCMainlRralyId) && (RELAY_SUM_MAX > wCMainlRralyId))
|
||||
{
|
||||
wSigOutPhyId = GetSignalOutFirstPhySecId(wSignalId); /*信号机外方区段*/
|
||||
chOccState = GetPhySecCurMergeState(wSigOutPhyId); /*占用状态*/
|
||||
chLockState = GetPhySecLockState(wSigOutPhyId); /*锁闭状态*/
|
||||
chFengSuoState = GetPhySecFLockState(wSigOutPhyId); /*封锁状态*/
|
||||
chJLockState = GetPhySecJumpLockState(wSigOutPhyId); /*跳跃锁闭状态*/
|
||||
/*信号机外方区段,未锁闭,未占用,未封锁*/
|
||||
if ((SECTION_OCCUPY_NO == chOccState) && (PHYSICAL_SECTION_LOCK_NO == chLockState)
|
||||
&& (PHYSICAL_SECTION_FLOCK_NO == chFengSuoState) && (PHYSICAL_SECTION_JUMP_LOCK_NO == chJLockState))
|
||||
{
|
||||
wSigInPhyId = GetSignalInFirstPhySecId(wSignalId,0U); /*信号机内方区段*/
|
||||
wLockRouteId = GetPhySecRLockBelongRouteId(wSigInPhyId); /*锁闭所属进路*/
|
||||
wQXzhaochaRelay = GetRouteCancleZhaoChaRelayId(wLockRouteId); /*进路配置的取消照查继电器*/
|
||||
|
||||
/*信号机为始端的进路 配置的取消照查继电器落下*/
|
||||
if ((0U < wQXzhaochaRelay) && (RELAY_SUM_MAX > wQXzhaochaRelay))
|
||||
{
|
||||
chColleState = GetRelayCollState(wQXzhaochaRelay);
|
||||
if (RELAY_STATE_DOWN == chColleState)
|
||||
{
|
||||
chRet = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
return chRet;
|
||||
}
|
||||
@@ -1248,6 +1248,14 @@ UINT8 GetSignalCrossTacsTrainIdCC(const UINT16 signalId);
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
void SetSignalCrossStateCC(const UINT16 signalId, const UINT8 signalCrossState, const UINT8 wTrainId);
|
||||
/*
|
||||
* 功能描述:获取复杂主控继电器驱动状态
|
||||
* 参数说明:const UINT16 wCMainlRralyId, 信号机ID
|
||||
* const UINT16 wSignalId, 信号机ID
|
||||
* 返 回 值:驱动状态
|
||||
* Created LYJ 2026.6.2
|
||||
*/
|
||||
UINT8 GetCMainRelayDriveState(const UINT16 wCMainlRralyId, const UINT16 wSignalId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -227,31 +227,6 @@ UINT16 GetSwitchDbRelayId(const UINT16 switchId)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID道岔影子模式定位表示继电器ID
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 定位表示继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchShadowDbRelayId(const UINT16 switchId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if (bufIndex < SWITCH_SUM_MAX)
|
||||
{
|
||||
retVal = SwitchConfigDataStru[bufIndex].wShadowDbRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID道岔反位表示继电器ID
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
@@ -276,31 +251,6 @@ UINT16 GetSwitchFbRelayId(const UINT16 switchId)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID道岔影子模式反位表示继电器ID
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 反位表示继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchShadowFbRelayId(const UINT16 switchId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if (bufIndex < SWITCH_SUM_MAX)
|
||||
{
|
||||
retVal = SwitchConfigDataStru[bufIndex].wShadowFbRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID道岔允操继电器ID
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
@@ -1726,3 +1676,208 @@ UINT8 GetSwitchWhetherBelongThisOc(UINT16 switchId, UINT8 ocId)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取道岔属于本OC同块板卡的道岔ID
|
||||
* 参数说明:
|
||||
* 输入参数:
|
||||
* UINT16 switchId 道岔ID
|
||||
* UINT8 ocId OCID
|
||||
* 返回值 :
|
||||
<500 道岔ID
|
||||
=500 非法值
|
||||
* Add by mpt 20260404
|
||||
*/
|
||||
UINT16 GetSwitchThisOcOtherSwitchId(UINT16 switchId, UINT8 ocId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 i = 0u;
|
||||
UINT16 retVal = SWITCH_SUM_MAX;
|
||||
UINT8 chOCIndex = 0U;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (OC_SUM_MAX > ocId) && (0u < ocId))
|
||||
{
|
||||
chOCIndex = GetSwitchThisOCIndex(switchId, ocId);
|
||||
if (SWITCH_BELONG_OC_MAX > chOCIndex)
|
||||
{
|
||||
retVal = SwitchConfigDataStru[bufIndex].belongOCConfigData[chOCIndex].wThisOcOtherSwitchId;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*无执行*/
|
||||
}
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔是否具备冗余采集
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :REDUN_COLL_YES: 具备道岔冗余采集
|
||||
* REDUN_COLL_NO: 不具备道岔冗余采集
|
||||
* CI_ERROR: ID有误
|
||||
*/
|
||||
UINT8 GetSwitchRedunCollCfg(const UINT16 switchId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if (SWITCH_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = SwitchConfigDataStru[bufIndex].RedunCollCfg;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔的冗余表示DBJ1继电器ID
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :0: ID有误
|
||||
* 其他:继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchRedunDBJ1RelayId(const UINT16 switchId, const UINT16 ocIndex)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = 0u;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > ocIndex))
|
||||
{
|
||||
retVal = SwitchConfigDataStru[bufIndex].RedunCollRelayStru[ocIndex].wRedunDb1RelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = 0u;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔的冗余表示DBJ2继电器ID
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :0: ID有误
|
||||
* 其他:继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchRedunDBJ2RelayId(const UINT16 switchId, const UINT16 ocIndex)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = 0u;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > ocIndex))
|
||||
{
|
||||
retVal = SwitchConfigDataStru[bufIndex].RedunCollRelayStru[ocIndex].wRedunDb2RelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = 0u;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔的冗余表示FBJ1继电器ID
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :0: ID有误
|
||||
* 其他:继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchRedunFBJ1RelayId(const UINT16 switchId, const UINT16 ocIndex)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = 0u;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > ocIndex))
|
||||
{
|
||||
retVal = SwitchConfigDataStru[bufIndex].RedunCollRelayStru[ocIndex].wRedunFb1RelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = 0u;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔的冗余表示FBJ2继电器ID
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :0: ID有误
|
||||
* 其他:继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchRedunFBJ2RelayId(const UINT16 switchId, const UINT16 ocIndex)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = 0u;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > ocIndex))
|
||||
{
|
||||
retVal = SwitchConfigDataStru[bufIndex].RedunCollRelayStru[ocIndex].wRedunFb2RelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = 0u;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置倒切板卡
|
||||
* 参数说明: const UINT16 switchId, 道岔ID,UINT16 wBoardId倒切板卡Id
|
||||
* 返回值 : CI_SUCCESS CI_ERROR
|
||||
*/
|
||||
UINT8 SetSwitchRelateReverseBoardId(const UINT16 switchId, UINT16 wBoardId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 chRet = CI_ERROR;
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if (bufIndex < SWITCH_SUM_MAX)
|
||||
{
|
||||
SwitchConfigDataStru[bufIndex].wReverseBoardId = wBoardId;
|
||||
chRet = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
return chRet;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取倒切板卡id
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* 返回值 : UINT16_MAX: 获取数据失败
|
||||
* 0: 无倒切
|
||||
* [1,65534]倒切板卡Id
|
||||
*/
|
||||
UINT16 GetSwitchRelateReverseBoardId(const UINT16 switchId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = UINT16_MAX;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if (bufIndex < SWITCH_SUM_MAX)
|
||||
{
|
||||
retVal = SwitchConfigDataStru[bufIndex].wReverseBoardId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = UINT16_MAX;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,12 +33,22 @@ typedef struct S_ZzjPowerConfigDataStruct
|
||||
UINT16 ZzjFanweiPower2; /*转辙机J1反表灯_供电2*/
|
||||
}ZzjPowerConfigDataStruct;
|
||||
|
||||
typedef struct S_SwitchRedunCollCfgDataStru
|
||||
{
|
||||
UINT16 wRedunDb1RelayId; /*(北京10道岔冗余采集)道岔定表继电器1ID*/
|
||||
UINT16 wRedunDb2RelayId; /*(北京10道岔冗余采集)道岔定表继电器2ID*/
|
||||
UINT16 wRedunFb1RelayId; /*(北京10道岔冗余采集)道岔反表继电器1ID*/
|
||||
UINT16 wRedunFb2RelayId; /*(北京10道岔冗余采集)道岔反表继电器2ID*/
|
||||
}
|
||||
SwitchRedunCollCfgDataStru;
|
||||
|
||||
typedef struct S_SwitchBelongOCConfigDataStr/*道岔所属OC配置数据*/
|
||||
{
|
||||
UINT8 OcId; /*当前OC*/
|
||||
UINT8 chSwitchBoardNum; /*道岔板卡数*/
|
||||
UINT8 ModuleAddr[MAX_OC_SWITCH_INCLUDE_BOARD_NUM]; /*地址ID*/
|
||||
UINT8 szPlusBoxId; /*转辙机板所在插箱ID*/
|
||||
UINT16 wThisOcOtherSwitchId; /*同OC属于同板卡的另一道岔ID*/
|
||||
}SwitchBelongOCConfigDataStr;
|
||||
|
||||
typedef struct S_SwitchConfigDataStruct
|
||||
@@ -58,8 +68,6 @@ typedef struct S_SwitchConfigDataStruct
|
||||
UINT16 FbRelayId; /*道岔反表继电器ID (配置字段) 即单开反表表示继电器ID*/
|
||||
UINT16 YcRelayId; /*道岔允操继电器ID (配置字段) 即单开定位操作继电器ID*/
|
||||
UINT16 DcRelayId; /*道岔定操继电器ID (配置字段) 即单开反位操作继电器ID*/
|
||||
UINT16 wShadowDbRelayId; /*影子模式道岔定表继电器ID (配置字段) 迪斯尼*/
|
||||
UINT16 wShadowFbRelayId; /*影子模式道岔反表继电器ID (配置字段) 迪斯尼*/
|
||||
/*以下为单轨道岔相关继电器*/
|
||||
UINT16 GZJId; /*故障继电器ID (配置字段)*/
|
||||
UINT16 JTYJaId; /*现场状态继电器ID (配置字段)*/
|
||||
@@ -110,7 +118,9 @@ typedef struct S_SwitchConfigDataStruct
|
||||
|
||||
UINT8 chSwitchBelongOcNum;/*道岔所属OC数*/
|
||||
SwitchBelongOCConfigDataStr belongOCConfigData[SWITCH_BELONG_OC_MAX];/*道岔所属各OC的配置情况*/
|
||||
|
||||
UINT8 RedunCollCfg; /*道岔是否具备冗余采集*/
|
||||
SwitchRedunCollCfgDataStru RedunCollRelayStru[SWITCH_REDUN_COLL_MAX];
|
||||
UINT16 wReverseBoardId; /*所属倒切板卡ID*/
|
||||
} SwitchConfigDataStruct;
|
||||
|
||||
|
||||
@@ -120,6 +130,7 @@ typedef struct S_OC_SwitchConfigDataStruct
|
||||
UINT16 BelongOcId; /*所属OCID(配置字段)*/
|
||||
UINT8 ModuleAddrA[MAX_OC_SWITCH_INCLUDE_BOARD_NUM]; /*A系地址*/
|
||||
UINT8 ModuleAddrB[MAX_OC_SWITCH_INCLUDE_BOARD_NUM]; /*B系地址*/
|
||||
UINT16 otherSwitchId; /*同OC属于同板卡的另一道岔ID(运算字段)*/
|
||||
}OCSwitchConfigDataStruct;
|
||||
|
||||
/*旧版OC道岔配置数据表*/
|
||||
@@ -541,22 +552,6 @@ UINT16 GetSwitchProtectSwitchNum(const UINT16 wSwitchId);
|
||||
*/
|
||||
UINT16* GetSwitchProtectSwitchIdBuf(const UINT16 wSwitchId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID道岔影子模式反位表示继电器ID
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 反位表示继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchShadowFbRelayId(const UINT16 switchId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID道岔影子模式定位表示继电器ID
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 定位表示继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchShadowDbRelayId(const UINT16 switchId);
|
||||
|
||||
/**
|
||||
* @brief 获取道岔公里标
|
||||
* @param const UINT16 switchId 道岔ID
|
||||
@@ -670,6 +665,75 @@ UINT8 GetSwitchThisOcOtherOCId(const UINT16 switchId, const UINT8 ocId);
|
||||
* Add by mpt 20260330
|
||||
*/
|
||||
UINT8 GetSwitchWhetherBelongThisOc(UINT16 switchId, UINT8 ocId);
|
||||
/*
|
||||
* 功能描述: 获取道岔属于本OC同块板卡的道岔ID
|
||||
* 参数说明:
|
||||
* 输入参数:
|
||||
* UINT16 switchId 道岔ID
|
||||
* UINT8 ocId OCID
|
||||
* 返回值 :
|
||||
<500 道岔ID
|
||||
=500 非法值
|
||||
* Add by mpt 20260404
|
||||
*/
|
||||
UINT16 GetSwitchThisOcOtherSwitchId(UINT16 switchId, UINT8 ocId);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔是否具备冗余采集
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :REDUN_COLL_YES: 具备道岔冗余采集
|
||||
* REDUN_COLL_NO: 不具备道岔冗余采集
|
||||
* CI_ERROR: ID有误
|
||||
*/
|
||||
UINT8 GetSwitchRedunCollCfg(const UINT16 switchId);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔的冗余表示DBJ1继电器ID
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :0: ID有误
|
||||
* 其他:继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchRedunDBJ1RelayId(const UINT16 switchId, const UINT16 ocIndex);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔的冗余表示DBJ2继电器ID
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :0: ID有误
|
||||
* 其他:继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchRedunDBJ2RelayId(const UINT16 switchId, const UINT16 ocIndex);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔的冗余表示FBJ1继电器ID
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :0: ID有误
|
||||
* 其他:继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchRedunFBJ1RelayId(const UINT16 switchId, const UINT16 ocIndex);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID道岔的冗余表示FBJ2继电器ID
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* 返回值 :0: ID有误
|
||||
* 其他:继电器ID
|
||||
*/
|
||||
UINT16 GetSwitchRedunFBJ2RelayId(const UINT16 switchId, const UINT16 ocIndex);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置倒切板卡
|
||||
* 参数说明: const UINT16 switchId, 道岔ID,UINT16 wBoardId倒切板卡Id
|
||||
* 返回值 : CI_SUCCESS CI_ERROR
|
||||
*/
|
||||
UINT8 SetSwitchRelateReverseBoardId(const UINT16 switchId, UINT16 wBoardId);
|
||||
/*
|
||||
* 功能描述: 获取倒切板卡id
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* 返回值 : UINT16_MAX: 获取数据失败
|
||||
* 0: 无倒切
|
||||
* [1,65534]倒切板卡Id
|
||||
*/
|
||||
UINT16 GetSwitchRelateReverseBoardId(const UINT16 switchId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1159,14 +1159,11 @@ void SetSwitchDrivePostion(const UINT16 switchId, const UINT8 drivePosition)
|
||||
UINT8 singleSwitchCurPosition = 0U;
|
||||
UINT16 switchOtherId = 0U; /*双动道岔另一道岔ID*/
|
||||
UINT8 ciPattern = GetLocalCiPattern();
|
||||
UINT32 dwCurCycleNum = 0u;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
switchOtherId = GetDSwitchOtherId(switchId);
|
||||
bufIndex2 = GetSwitchConfigBufIndex(switchOtherId); /*获取双动道岔数组下标*/
|
||||
|
||||
dwCurCycleNum = Get2oo2CurCycleNum();
|
||||
|
||||
if (bufIndex < SWITCH_SUM_MAX)
|
||||
{
|
||||
|
||||
@@ -1190,9 +1187,7 @@ void SetSwitchDrivePostion(const UINT16 switchId, const UINT8 drivePosition)
|
||||
/*设置驱动位置*/
|
||||
SwitchDataStru[bufIndex].SwitchDrivePos = drivePosition;
|
||||
/*道岔驱动开始时间*/
|
||||
SetSwitchDriveStartCycNum(switchId, dwCurCycleNum);
|
||||
/*设置道岔驱动起始周期,直到有位置时才清0*/
|
||||
SetSwitchOutputDrvCmdCycNum(switchId, dwCurCycleNum);
|
||||
SetSwitchDriveStartCycNum(switchId, Get2oo2CurCycleNum());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1228,10 +1223,7 @@ void SetSwitchDrivePostion(const UINT16 switchId, const UINT8 drivePosition)
|
||||
/*设置驱动位置*/
|
||||
SwitchDataStru[bufIndex2].SwitchDrivePos = drivePosition;
|
||||
/*道岔驱动开始时间*/
|
||||
SetSwitchDriveStartCycNum(switchOtherId, dwCurCycleNum);
|
||||
|
||||
/*设置道岔驱动起始周期,直到有位置时才清0*/
|
||||
SetSwitchOutputDrvCmdCycNum(switchOtherId, dwCurCycleNum);
|
||||
SetSwitchDriveStartCycNum(switchOtherId, Get2oo2CurCycleNum());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2884,7 +2876,7 @@ void SetHlhtCiSwitchPlockStatus(const UINT16 switchId, const UINT8 lockStatus)
|
||||
|
||||
if (SWITCH_SUM_MAX > bufIndex)
|
||||
{
|
||||
if ((SWITCH_LOCK_STATUS_PROTECT == lockStatus) || (SWITCH_LOCK_STATUS_NO == lockStatus))
|
||||
if ((SWITCH_LOCK_STATUS_PROTECT == lockStatus) || (SWITCH_LOCK_STATUS_NO == lockStatus) || (SWITCH_LOCK_STATUS_DAP == lockStatus))
|
||||
{
|
||||
SwitchDataStru[bufIndex].LockStatus = lockStatus;
|
||||
}
|
||||
@@ -3278,7 +3270,7 @@ void SetSwitchOcPlusBoxSateState(const UINT16 switchId, const UINT8 ocId, const
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
chOCIndex = GetSwitchThisOCIndex(switchId, ocId);
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (chOCIndex < SWITCH_BELONG_OC_MAX))
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_BELONG_OC_MAX >chOCIndex))
|
||||
{
|
||||
SwitchDataStru[bufIndex].belongOCData[chOCIndex].PlusBoxSate = state;
|
||||
}
|
||||
@@ -3306,7 +3298,7 @@ UINT8 GetSwitchOcPlusBoxSateState(const UINT16 switchId, const UINT8 ocId)
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
chOCIndex = GetSwitchThisOCIndex(switchId, ocId);
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (chOCIndex < SWITCH_BELONG_OC_MAX))
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_BELONG_OC_MAX > chOCIndex))
|
||||
{
|
||||
ret = SwitchDataStru[bufIndex].belongOCData[chOCIndex].PlusBoxSate;
|
||||
}
|
||||
@@ -3371,7 +3363,7 @@ UINT8 GetSwitchThisOCBoardState(const UINT16 switchId, const UINT8 ocId)
|
||||
UINT8 num = 0u;
|
||||
UINT8 i = 0u;
|
||||
UINT8 chSwitchThisOCBoardNum = 0u;
|
||||
UINT8 chOCIndex = 0U;
|
||||
UINT8 chOCIndex = 0u;
|
||||
UINT8 addrAState = 0u;
|
||||
UINT8 addrBState = 0u;
|
||||
UINT8 retVal = SWITCH_BOARD_FAULT;
|
||||
@@ -3384,20 +3376,23 @@ UINT8 GetSwitchThisOCBoardState(const UINT16 switchId, const UINT8 ocId)
|
||||
chSwitchThisOCBoardNum = GetSwitchThisOCBoardNum(switchId, ocId);
|
||||
if (SWITCH_BELONG_OC_MAX > chOCIndex)
|
||||
{
|
||||
for (i = 0; i < (chSwitchThisOCBoardNum/2u); i+=2u)
|
||||
if (0u < chSwitchThisOCBoardNum)
|
||||
{
|
||||
retVal = SWITCH_BOARD_NORMAL;/*先置为正常*/
|
||||
for (i = 0u; i < (chSwitchThisOCBoardNum - 1u); i += 2u)
|
||||
{
|
||||
addrAState = SwitchDataStru[bufIndex].belongOCData[chOCIndex].BoardStateBuf[i];
|
||||
addrBState = SwitchDataStru[bufIndex].belongOCData[chOCIndex].BoardStateBuf[i+1];
|
||||
addrBState = SwitchDataStru[bufIndex].belongOCData[chOCIndex].BoardStateBuf[i + 1u];
|
||||
if ((SWITCH_BOARD_FAULT == addrAState) && (SWITCH_BOARD_FAULT == addrBState))
|
||||
{
|
||||
retVal = SWITCH_BOARD_FAULT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((0U < chSwitchThisOCBoardNum) && (i == chSwitchThisOCBoardNum))
|
||||
{
|
||||
retVal = SWITCH_BOARD_NORMAL;
|
||||
}
|
||||
else
|
||||
{/*异常分支,置为故障*/
|
||||
retVal = SWITCH_BOARD_FAULT;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3529,7 +3524,7 @@ void SetSwitchOutputDrvCmdCycNum(const UINT16 switchId, const UINT32 cycNum)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
if (bufIndex < SWITCH_SUM_MAX)
|
||||
if (SWITCH_SUM_MAX >bufIndex)
|
||||
{
|
||||
SwitchDataStru[bufIndex].SwitchOutputDrvCmdCycNum = cycNum;
|
||||
}
|
||||
@@ -3546,7 +3541,7 @@ UINT32 GetSwitchOutputDrvCmdCycNum(const UINT16 switchId)
|
||||
UINT32 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
if (bufIndex < SWITCH_SUM_MAX)
|
||||
if (SWITCH_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = SwitchDataStru[bufIndex].SwitchOutputDrvCmdCycNum;
|
||||
}
|
||||
@@ -3655,3 +3650,302 @@ void SetSwitchThisOcFindCmdCycNum(const UINT16 switchId, const UINT8 ocId, const
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置判断混线起始周期号
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunJudgHunXianStCyc(const UINT16 switchId, const UINT8 chOCIndex, const UINT32 cycNum)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
SwitchDataStru[bufIndex].RedunCollData[chOCIndex].dwRedunJudgHunXianStCyc = cycNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取判断混线起始周期号
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* 返回值 :周期号
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
UINT32 GetSwitchRedunJudgHunXianStCyc(const UINT16 switchId, const UINT8 chOCIndex)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT32 cycNum = 0u;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
cycNum = SwitchDataStru[bufIndex].RedunCollData[chOCIndex].dwRedunJudgHunXianStCyc;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
|
||||
return cycNum;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置实际混线起始周期号
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunRealHunXianStCyc(const UINT16 switchId, const UINT8 chOCIndex, const UINT32 cycNum)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
SwitchDataStru[bufIndex].RedunCollData[chOCIndex].dwRedunRealHunXianStCyc = cycNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取实际混线起始周期号
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* 返回值 :周期号
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
UINT32 GetSwitchRedunRealHunXianStCyc(const UINT16 switchId, const UINT8 chOCIndex)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT32 cycNum = 0u;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
cycNum = SwitchDataStru[bufIndex].RedunCollData[chOCIndex].dwRedunRealHunXianStCyc;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
|
||||
return cycNum;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置混线恢复状态
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* const UINT8 cHunXianStt 混线恢复状态
|
||||
* REDUN_HX_RECOV_1100、REDUN_HX_RECOV_1010、REDUN_HX_RECOV_0011:设置
|
||||
* 0:清除
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunHunXianRecovStt(const UINT16 switchId, const UINT8 chOCIndex, const UINT8 cHunXianStt)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
if ((REDUN_HX_RECOV_1100 == cHunXianStt) || (REDUN_HX_RECOV_1010 == cHunXianStt)
|
||||
|| (REDUN_HX_RECOV_0011 == cHunXianStt) || (REDUN_HX_RECOV_ALL == cHunXianStt))
|
||||
{
|
||||
/*记录混线恢复采集*/
|
||||
SwitchDataStru[bufIndex].RedunCollData[chOCIndex].cHunXianRecovStt |= cHunXianStt;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*清空混线恢复采集*/
|
||||
SwitchDataStru[bufIndex].RedunCollData[chOCIndex].cHunXianRecovStt = 0u;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取混线恢复状态
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* 返回值 :混线恢复状态
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
UINT8 GetSwitchRedunHunXianRecovStt(const UINT16 switchId, const UINT8 chOCIndex)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 RtnValue = 0u;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
RtnValue = SwitchDataStru[bufIndex].RedunCollData[chOCIndex].cHunXianRecovStt;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
|
||||
return RtnValue;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置采集故障起始周期号
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunFaultStCyc(const UINT16 switchId, const UINT8 chOCIndex, const UINT32 cycNum)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
SwitchDataStru[bufIndex].RedunCollData[chOCIndex].dwRedunFaultStCyc = cycNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取采集故障起始周期号
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* 返回值 :周期号
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
UINT32 GetSwitchRedunFaultStCyc(const UINT16 switchId, const UINT8 chOCIndex)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT32 cycNum = 0u;
|
||||
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
cycNum = SwitchDataStru[bufIndex].RedunCollData[chOCIndex].dwRedunFaultStCyc;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
|
||||
return cycNum;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置冗余采集组合状态
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunCombineStt(const UINT16 switchId, const UINT8 chOCIndex, const UINT8 setValue)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
SwitchDataStru[bufIndex].RedunCollData[chOCIndex].cCombineStt = setValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置主控转辙机板采集道岔位置
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchMainCollPos(const UINT16 switchId, const UINT8 setValue)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if (SWITCH_SUM_MAX > bufIndex)
|
||||
{
|
||||
SwitchDataStru[bufIndex].cMainOcCollPos = setValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置冗余采集采集道岔位置
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunCollPos(const UINT16 switchId, const UINT8 chOCIndex, const UINT8 setValue)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
SwitchDataStru[bufIndex].RedunCollData[chOCIndex].cCollPos = setValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 设置冗余采集当周期混线状态
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunCurrHunXianStt(const UINT16 switchId, const UINT8 chOCIndex, const UINT8 setValue)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
bufIndex = GetSwitchConfigBufIndex(switchId); /*获取道岔数组下标*/
|
||||
|
||||
if ((SWITCH_SUM_MAX > bufIndex) && (SWITCH_REDUN_COLL_MAX > chOCIndex))
|
||||
{
|
||||
SwitchDataStru[bufIndex].RedunCollData[chOCIndex].cCurrHunxianStt = setValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing*/
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,21 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct S_SwitchRedunCollStruct
|
||||
{
|
||||
UINT32 dwRedunJudgHunXianStCyc; /*(北京10道岔冗余采集)判断混线起始周期号,道岔移动中混线容忍用。
|
||||
设置时机为采集到混线,清零时机为容忍时间内未采集到混线,或采集到定、反、移动中*/
|
||||
UINT32 dwRedunRealHunXianStCyc; /*(北京10道岔冗余采集)实际混线起始周期号,混线恢复用。
|
||||
设置时机为采集到混线,清零时机为未采集到混线*/
|
||||
UINT8 cHunXianRecovStt; /*(北京10道岔冗余采集)混线恢复状态。
|
||||
bit0=1:采集到1100,bit1=1:采集到1010,bi2=1:采集到0011
|
||||
bit0、1、2均为1表示未混线*/
|
||||
UINT32 dwRedunFaultStCyc; /*(北京10道岔冗余采集)采集故障(四开)起始周期号*/
|
||||
UINT8 cCombineStt; /*(打印用)继电器采集组合*/
|
||||
UINT8 cCollPos; /*(打印用)冗余采集位置*/
|
||||
UINT8 cCurrHunxianStt; /*(打印用)当周期混线状态*/
|
||||
}SwitchRedunCollStruct;
|
||||
|
||||
/*道岔数据结构体*/
|
||||
typedef struct S_SwitchOcDataStruct
|
||||
{
|
||||
@@ -103,8 +118,8 @@ typedef struct S_SwitchDataStruct
|
||||
|
||||
UINT8 PLockedAxisSecNum;/*被防护锁闭的计轴区段id数量,只能在本文件使用*/
|
||||
UINT16 PLockedAxisSecIdArr[SWITCH_MAX_PROTECT_LOCKED_NUM];/*被防护锁闭的计轴区段id数组,只能在本文件使用*/
|
||||
|
||||
|
||||
SwitchRedunCollStruct RedunCollData[SWITCH_REDUN_COLL_MAX];
|
||||
UINT8 cMainOcCollPos; /*(打印用)主控转辙机板道岔位置*/
|
||||
} SwitchDataStruct;
|
||||
|
||||
/*道岔数据结构体*/
|
||||
@@ -927,6 +942,125 @@ UINT32 GetSwitchThisOcFindCmdCycNum(const UINT16 switchId, const UINT8 ocId);
|
||||
* add mpt by 20260402
|
||||
*/
|
||||
void SetSwitchThisOcFindCmdCycNum(const UINT16 switchId, const UINT8 ocId, const UINT32 cycNum);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置判断混线起始周期号
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunJudgHunXianStCyc(const UINT16 switchId, const UINT8 chOCIndex, const UINT32 cycNum);
|
||||
|
||||
/*
|
||||
* 功能描述:获取判断混线起始周期号
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* 返回值 :周期号
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
UINT32 GetSwitchRedunJudgHunXianStCyc(const UINT16 switchId, const UINT8 chOCIndex);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置实际混线起始周期号
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunRealHunXianStCyc(const UINT16 switchId, const UINT8 chOCIndex, const UINT32 cycNum);
|
||||
|
||||
/*
|
||||
* 功能描述:获取实际混线起始周期号
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* 返回值 :周期号
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
UINT32 GetSwitchRedunRealHunXianStCyc(const UINT16 switchId, const UINT8 chOCIndex);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置混线恢复状态
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* const UINT8 cHunXianStt 混线恢复状态
|
||||
* REDUN_HX_RECOV_1100、REDUN_HX_RECOV_1010、REDUN_HX_RECOV_0011:设置
|
||||
* 0:清除
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunHunXianRecovStt(const UINT16 switchId, const UINT8 chOCIndex, const UINT8 cHunXianStt);
|
||||
|
||||
/*
|
||||
* 功能描述:获取混线恢复状态
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* 返回值 :混线恢复状态
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
UINT8 GetSwitchRedunHunXianRecovStt(const UINT16 switchId, const UINT8 chOCIndex);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置采集故障起始周期号
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunFaultStCyc(const UINT16 switchId, const UINT8 chOCIndex, const UINT32 cycNum);
|
||||
|
||||
/*
|
||||
* 功能描述:获取采集故障起始周期号
|
||||
* 参数说明:const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* 返回值 :周期号
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
UINT32 GetSwitchRedunFaultStCyc(const UINT16 switchId, const UINT8 chOCIndex);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置冗余采集组合状态
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunCombineStt(const UINT16 switchId, const UINT8 chOCIndex, const UINT8 setValue);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置主控转辙机板采集道岔位置
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchMainCollPos(const UINT16 switchId, const UINT8 setValue);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置冗余采集采集道岔位置
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunCollPos(const UINT16 switchId, const UINT8 chOCIndex, const UINT8 setValue);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置冗余采集当周期混线状态
|
||||
* 参数说明: const UINT16 switchId, 道岔ID
|
||||
* const UINT8 ocIndex OC下标
|
||||
* UINT32 cycNum 周期号
|
||||
* 返回值 :void
|
||||
* add by wyd 20260604
|
||||
*/
|
||||
void SetSwitchRedunCurrHunXianStt(const UINT16 switchId, const UINT8 chOCIndex, const UINT8 setValue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
|
||||
|
||||
#define SWITCH_BELONG_OC_MAX 2U /*道岔所属OC最多数*/
|
||||
#define SWITCH_REDUN_COLL_MAX 2U /*道岔冗余采集最多数*/
|
||||
|
||||
#define MAIN_CONTROL 0x55U /*主控*/
|
||||
#define STANDBY_CONTROL 0xAAU /*备控*/
|
||||
@@ -172,5 +173,17 @@
|
||||
#define FIND_FANWEI_CMD ((UINT8)0x2) /*寻反*/
|
||||
#define INIT_FIND_CMD ((UINT8)0x3) /*初始寻*/
|
||||
#define NO_FIND_CMD ((UINT8)0x0) /*无寻位置指令*/
|
||||
|
||||
#define REDUN_COLL_YES ((UINT8)0xAAu) /*具备道岔冗余采集*/
|
||||
#define REDUN_COLL_NO ((UINT8)0x55u) /*不具备道岔冗余采集*/
|
||||
|
||||
#define REDUN_HX_RECOV_1100 ((UINT8)0x01u) /*混线恢复采集到过1100*/
|
||||
#define REDUN_HX_RECOV_1010 ((UINT8)0x02u) /*混线恢复采集到过1010*/
|
||||
#define REDUN_HX_RECOV_0011 ((UINT8)0x04u) /*混线恢复采集到过0011*/
|
||||
#define REDUN_HX_RECOV_ALL ((UINT8)0x07u) /*全部混线恢复采集*/
|
||||
|
||||
#define REDUN_ALARM_HUNXIAN ((UINT8)0x55u) /*冗余采集混线报警*/
|
||||
#define REDUN_ALARM_FAULT ((UINT8)0xAAu) /*冗余采集故障报警*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -125,6 +125,9 @@ extern UINT8 CI_SYSTEM_TYPE_RCI;
|
||||
#define CI_DEVICE_TYPE_BACKUP_VOBC ((UINT8)0xBE) /*后备VOBC列车*/
|
||||
#define CI_DEVICE_TYPE_ZHAOCHA ((UINT8)0xC0) /*照查*/
|
||||
|
||||
#define CI_DEVICE_TYPE_SWITCH_PHYSEC ((UINT8)0xC1) /*道岔所在物理区段,互联互通接口使用*/
|
||||
#define CI_DEVICE_TYPE_XIANSU_LOGSEC ((UINT8)0xC2) /*限速逻辑区段,互联互通接口使用*/
|
||||
|
||||
|
||||
#define CI_DEVICE_TYPE_CMD ((UINT8)0x0B) /*命令*/
|
||||
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
|
||||
/*联锁V13.0版本升级数据结构 2018.8.3*/
|
||||
/*版本号*/
|
||||
#define VER_MAIN_SUBCI_CI_CID ((UINT8)25) /*子系统主版本号*/
|
||||
#define VER_MAIN_SUBCI_CI_CID ((UINT8)27) /*子系统主版本号*/
|
||||
#define VER_SUB_SUBCI_CI_CID ((UINT8)0) /*子系统子版本号*/
|
||||
#define VER_BRUNCH_CI_CID ((UINT8)0) /*分支版本号..........主线填0....分支填1 调试填2 */
|
||||
#define VER_RETURN_SUBCI_CI_CID ((UINT8)2) /*子系统回归版本号*/
|
||||
#define VER_RETURN_SUBCI_CI_CID ((UINT8)1) /*子系统回归版本号*/
|
||||
|
||||
#ifdef SCADE_MODE
|
||||
/*SCADE软件版本号*/
|
||||
@@ -75,30 +75,30 @@
|
||||
/*手写软件版本号*/
|
||||
#define VER_SOFT_PRODUCT ((UINT8)40) /*产品编号*/
|
||||
#define VER_SOFT_MODUAL_APP ((UINT8)1) /*模块编号*/
|
||||
#define VER_SOFT_MIANVERSION ((UINT8)25) /*主版本号*/
|
||||
#define VER_SOFT_SUBVERSION ((UINT8)3) /*子版本号*/
|
||||
#define VER_SOFT_MIANVERSION ((UINT8)27) /*主版本号*/
|
||||
#define VER_SOFT_SUBVERSION ((UINT8)2) /*子版本号*/
|
||||
|
||||
#endif
|
||||
|
||||
/*可兼容的公共数据结构版本号*/
|
||||
#define VER_1_PUBLIC_FS_1 ((UINT8)31)
|
||||
#define VER_1_PUBLIC_FS_2 ((UINT8)5)
|
||||
#define VER_1_PUBLIC_FS_2 ((UINT8)8)
|
||||
#define VER_1_PUBLIC_FS_3 ((UINT8)0)
|
||||
#define VER_1_PUBLIC_FS_4 ((UINT8)0)
|
||||
|
||||
#define VER_2_PUBLIC_FS_1 ((UINT8)23)
|
||||
#define VER_2_PUBLIC_FS_2 ((UINT8)2)
|
||||
#define VER_2_PUBLIC_FS_3 ((UINT8)1)
|
||||
#define VER_2_PUBLIC_FS_4 ((UINT8)5)
|
||||
#define VER_2_PUBLIC_FS_4 ((UINT8)7)
|
||||
|
||||
#define VER_3_PUBLIC_FS_1 ((UINT8)28)
|
||||
#define VER_3_PUBLIC_FS_2 ((UINT8)0)
|
||||
#define VER_3_PUBLIC_FS_3 ((UINT8)0)
|
||||
#define VER_3_PUBLIC_FS_4 ((UINT8)22)
|
||||
#define VER_3_PUBLIC_FS_4 ((UINT8)25)
|
||||
|
||||
|
||||
/*可兼容的私有数据结构版本号*/
|
||||
#define VER_1_PRIVATE_FS_1 ((UINT8)50)
|
||||
#define VER_1_PRIVATE_FS_1 ((UINT8)53)
|
||||
#define VER_1_PRIVATE_FS_2 ((UINT8)0)
|
||||
|
||||
#define VER_2_PRIVATE_FS_1 ((UINT8)0xFF)
|
||||
@@ -108,7 +108,7 @@
|
||||
#define VER_3_PRIVATE_FS_2 ((UINT8)0xFF)
|
||||
|
||||
/*可兼容OC数据结构版本号*/
|
||||
#define VER_1_OCDATA_FS_1 ((UINT8)37) /*oc 3.0 较新数据版本*/
|
||||
#define VER_1_OCDATA_FS_1 ((UINT8)38) /*oc 3.0 较新数据版本*/
|
||||
#define VER_1_OCDATA_FS_2 ((UINT8)0)
|
||||
|
||||
#define VER_2_OCDATA_FS_1 ((UINT8)0xFF)
|
||||
|
||||
@@ -23,6 +23,8 @@ static UINT16 LocalCTProtectSecUnlockTime = 0u;/*
|
||||
static UINT16 LocalUTNearUnLockTime = 0u;/*本联锁UT接近延时解锁超限时间(s)*/
|
||||
static UINT16 LocalCTNearUnLockTime = 0u;/*本联锁CT接近延时解锁超限时间(s)*/
|
||||
static UINT8 LocalWaysidePattern = 0u; /*本联锁轨旁继电器接口类型*/
|
||||
UINT8 gSerialCommFlag = SERIAL_COMM_NO; /*本联锁串口通信标志*/
|
||||
SerialCommData gSzSerialCommData[SERIAL_GROUP_SUM_MAX] = { 0U }; /*串口通信数据*/
|
||||
|
||||
static UINT8 OCSswitch = 0u; /*OC-S开关*/
|
||||
/* RC合并新增,用于区分TIOC功能或者联锁联锁 */
|
||||
@@ -126,6 +128,7 @@ UINT32 gSystemUpdateMainUseCycNum = 0U; /*ϵͳ
|
||||
static UINT32 wSwitchMachineCutInterval = 0U; /*RC/CI系统控制转辙机板主控切换间隔时间(单位:S)*/
|
||||
static UINT32 wSwitchMachineDrvingCutInterval = 0U; /*RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:S)*/
|
||||
static UINT32 wSwitchLastDrvValidTime = 0U; /*RC/CI系统上一次驱动道岔有效时间*/
|
||||
static UINT32 dwSwitchRedunCollTolTime = 0U; /*道岔冗余采集报警容忍时间*/
|
||||
/*
|
||||
* 功能描述: 系统参数时间转周期数
|
||||
* 参数说明: void
|
||||
@@ -359,6 +362,9 @@ void SystemParaTimeToCycleCount(void)
|
||||
|
||||
paraVal = GetSystemParaValue(SWITCH_LAST_DRV_TIME);
|
||||
wSwitchLastDrvValidTime = TimeToCycleCount((UINT32)paraVal * 1000U, appCycleTime); /*RC/CI系统上一次驱动道岔有效时间*/
|
||||
|
||||
paraVal = GetSystemParaValue(SWITCH_REDUN_COLL_ALARM_TIME);
|
||||
dwSwitchRedunCollTolTime = TimeToCycleCount((UINT32)paraVal, appCycleTime); /*道岔冗余采集报警容忍时间*/
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1541,6 +1547,45 @@ UINT16 GetTiocSystemParameterData(UINT32* pConfigDataAdderBuf, UINT16* pConfigDa
|
||||
;/*无处理 */
|
||||
}
|
||||
|
||||
/*本联锁轨旁继电器接口类型*/
|
||||
wTmpLen = 1u + wTmpConfigDataSum;
|
||||
if (wBufMaxLen >= wTmpLen)
|
||||
{
|
||||
pConfigDataAdderBuf[wTmpConfigDataSum] = &LocalWaysidePattern;
|
||||
pConfigDataLenBuf[wTmpConfigDataSum] = (UINT16)sizeof(UINT8);
|
||||
wTmpConfigDataSum++;
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*无处理 */
|
||||
}
|
||||
|
||||
/*本联锁串口通信标志*/
|
||||
wTmpLen = 1u + wTmpConfigDataSum;
|
||||
if (wBufMaxLen >= wTmpLen)
|
||||
{
|
||||
pConfigDataAdderBuf[wTmpConfigDataSum] = &gSerialCommFlag;
|
||||
pConfigDataLenBuf[wTmpConfigDataSum] = (UINT16)sizeof(UINT8);
|
||||
wTmpConfigDataSum++;
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*无处理 */
|
||||
}
|
||||
|
||||
/*串口通信数据*/
|
||||
wTmpLen = 1u + wTmpConfigDataSum;
|
||||
if (wBufMaxLen >= wTmpLen)
|
||||
{
|
||||
pConfigDataAdderBuf[wTmpConfigDataSum] = &gSzSerialCommData;
|
||||
pConfigDataLenBuf[wTmpConfigDataSum] = (UINT16)(sizeof(SerialCommData) * (SERIAL_GROUP_SUM_MAX));
|
||||
wTmpConfigDataSum++;
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*无处理 */
|
||||
}
|
||||
|
||||
/*本联锁OC数据结构类型*/
|
||||
wTmpLen = 1u + wTmpConfigDataSum;
|
||||
if (wBufMaxLen >= wTmpLen)
|
||||
@@ -2458,7 +2503,7 @@ UINT16 GetTiocSystemParameterData(UINT32* pConfigDataAdderBuf, UINT16* pConfigDa
|
||||
;/* 无处理 */
|
||||
}
|
||||
|
||||
/* RC/CI系统控制转辙机板主控切换间隔时间(单位:S) */
|
||||
/* RC/CI系统控制转辙机板主控切换间隔时间(单位:ms) */
|
||||
wTmpLen = 1u + wTmpConfigDataSum;
|
||||
if (wBufMaxLen >= wTmpLen)
|
||||
{
|
||||
@@ -2470,7 +2515,7 @@ UINT16 GetTiocSystemParameterData(UINT32* pConfigDataAdderBuf, UINT16* pConfigDa
|
||||
{
|
||||
;/* 无处理 */
|
||||
}
|
||||
/* RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:S) */
|
||||
/* RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:ms) */
|
||||
wTmpLen = 1u + wTmpConfigDataSum;
|
||||
if (wBufMaxLen >= wTmpLen)
|
||||
{
|
||||
@@ -2907,7 +2952,7 @@ OtherCiParaStruct GetOtherCiPara(const UINT8 chOtherCiId)
|
||||
/*
|
||||
* 功能描述:获取无C轨站型B轨有UT车时可追踪功能开关
|
||||
* 参数说明:无
|
||||
* 返回值:aa关闭 55打开
|
||||
* 返回值:aa打开 55关闭
|
||||
* by cgh 20240815
|
||||
*/
|
||||
UINT8 GetNoCGFollowUtSwitch(void)
|
||||
@@ -3280,9 +3325,9 @@ UINT32 GetSwitchMachineCutInterval(void)
|
||||
return wSwitchMachineCutInterval;
|
||||
}
|
||||
/*
|
||||
* 功能描述:获取RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:S)
|
||||
* 功能描述:获取RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:ms)
|
||||
* 参数说明:无
|
||||
* 返回值:RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:S)
|
||||
* 返回值:RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:ms)
|
||||
* by mpt 20260324
|
||||
*/
|
||||
UINT32 GetSwitchMachineDrvCutInterval(void)
|
||||
@@ -3325,3 +3370,177 @@ UINT8 GetLocalCiOCSswitch(void)
|
||||
{
|
||||
return OCSswitch;
|
||||
}
|
||||
|
||||
/*
|
||||
* 获取联锁厂商信息
|
||||
* 参数说明:const UINT8 chCiId
|
||||
* 返回值:厂商信息
|
||||
* BY:lyj
|
||||
*/
|
||||
UINT8 GetCiFactoryType(const UINT8 chCiId)
|
||||
{
|
||||
UINT8 chRet = 0U;
|
||||
if (CI_SUM_MAX > chCiId)
|
||||
{
|
||||
chRet = SystemParameterStruNew.chCiFactoryType[chCiId];
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
return chRet;
|
||||
}
|
||||
/**
|
||||
* @brief 设置本联锁串口通信标志
|
||||
* @param[in] UINT8 chSerialCommFlag 串口通信标志
|
||||
* @return CI_SUCCESS 设置成功 CI_ERROR 设置失败
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
UINT8 SetLocalSerialCommFlag(UINT8 chSerialCommFlag)
|
||||
{
|
||||
UINT8 chReval = CI_ERROR;
|
||||
|
||||
if ((SERIAL_COMM_YES == chSerialCommFlag) || (SERIAL_COMM_NO == chSerialCommFlag))
|
||||
{
|
||||
gSerialCommFlag = chSerialCommFlag;
|
||||
chReval = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
return chReval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取本联锁串口通信标志
|
||||
* @param[in] void
|
||||
* @return SERIAL_COMM_YES 支持串口通信 chSerialCommFlag 不支持串口通信
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
UINT8 GetLocalSerialCommFlag(void)
|
||||
{
|
||||
return gSerialCommFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 设置本联锁串口通信数据
|
||||
* @param[in] UINT8 chGroupIndex 串口组索引
|
||||
* @param[in] UINT8 chPortIndex 端口索引
|
||||
* @param[in] UINT16 wSerialCommCiId 串口通信其它联锁ID
|
||||
* @param[in] UINT8 chSerialCommPort 串口通信端口号
|
||||
* @return CI_SUCCESS 设置成功 CI_ERROR 设置失败
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
UINT8 SetLocalSerialCommData(UINT8 chGroupIndex, UINT8 chPortIndex, UINT16 wSerialCommCiId, UINT8 chSerialCommPort)
|
||||
{
|
||||
UINT8 chReval = CI_ERROR;
|
||||
UINT8 chDevType = 0U; /*设备类型*/
|
||||
UINT8 chDevId = 0U; /*设备ID*/
|
||||
UINT8 chLocalRcWorkMode = 0u; /*本地RC工作模式*/
|
||||
|
||||
if ((SERIAL_GROUP_SUM_MAX > chGroupIndex) && (SERIAL_PORT_SUM_MAX > chPortIndex))
|
||||
{
|
||||
chLocalRcWorkMode = GetLocalRcWorkMode();
|
||||
chDevType = (UINT8)((wSerialCommCiId & 0xFF00U) >> 8U);
|
||||
chDevId = (UINT8)(wSerialCommCiId & 0x00FFU);
|
||||
|
||||
if ((0u ==wSerialCommCiId) || ((chLocalRcWorkMode == chDevType) && (CI_SUM_MAX > chDevId)))
|
||||
{
|
||||
gSzSerialCommData[chGroupIndex].wSerialCommOtherCiId = wSerialCommCiId;
|
||||
gSzSerialCommData[chGroupIndex].chSerialCommPort[chPortIndex] = chSerialCommPort;
|
||||
|
||||
chReval = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*初始化失败*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
return chReval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取本联锁串口通信数据
|
||||
* @param[in] void
|
||||
* @return 串口通信数据
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
SerialCommData* GetLocalSerialCommData(void)
|
||||
{
|
||||
return gSzSerialCommData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 根据设备名获取对应的串口组
|
||||
* @param[in] UINT16 DeviceName 设备名称
|
||||
* @param[in] UINT8* pSerialGroup 端口组索引
|
||||
* @return 串口通信数据
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
UINT8 IsSerialDevice(UINT16 DeviceName, UINT8* pSerialGroup)
|
||||
{
|
||||
UINT8 chReval = CI_ERROR;
|
||||
UINT8 chLocalRcWorkMode = 0u; /*本地RC工作模式*/
|
||||
UINT8 cDstType = 0U; /*目标设备类型*/
|
||||
UINT8 cDstId = 0U; /*目标设备ID*/
|
||||
UINT8 chSerialCommFlag = 0U; /* 串口通信标志 */
|
||||
SerialCommData* szSerialCommData = NULL; /*串口通信数据*/
|
||||
UINT8 cSerialGroupIndex = 0U;
|
||||
|
||||
chLocalRcWorkMode = GetLocalRcWorkMode();
|
||||
cDstType = (UINT8)((DeviceName & 0xFF00U) >> 8U);
|
||||
cDstId = (UINT8)(DeviceName & 0x00FFU);
|
||||
|
||||
if ((chLocalRcWorkMode == cDstType) && (NULL != pSerialGroup))
|
||||
{
|
||||
/* 先判断当前联锁是否具备串口通信的功能 */
|
||||
chSerialCommFlag = GetLocalSerialCommFlag();
|
||||
szSerialCommData = GetLocalSerialCommData();
|
||||
|
||||
if ((SERIAL_COMM_YES == chSerialCommFlag) && (NULL != szSerialCommData))
|
||||
{
|
||||
for (cSerialGroupIndex = 0U; cSerialGroupIndex < SERIAL_GROUP_SUM_MAX; cSerialGroupIndex++)
|
||||
{
|
||||
if (DeviceName == szSerialCommData[cSerialGroupIndex].wSerialCommOtherCiId)
|
||||
{
|
||||
*pSerialGroup = cSerialGroupIndex;
|
||||
chReval = CI_SUCCESS;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*继续查找第二组*/
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return chReval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取道岔冗余采集故障报警容忍时间(ms)
|
||||
* @param[in] void
|
||||
* @return 道岔冗余采集故障报警容忍时间(ms)
|
||||
* @note by wyd 20260605
|
||||
*/
|
||||
UINT32 GetSwitchRedunCollHunXianCycCfg(void)
|
||||
{
|
||||
return dwSwitchRedunCollTolTime;
|
||||
}
|
||||
@@ -108,6 +108,8 @@ extern "C" {
|
||||
#define FUNC_REOPRN_SET_NEAR ((UINT8)73) /*重开信号是否记忆进路接近锁闭状态开关:0xAA-重开后默认设置接近 0x55-重开后根据接近区段占用状态设置接近/未接近*/
|
||||
#define FUNC_OVERLAP_UT_UNLOCK_MODE ((UINT8)74) /*UT列车占压停车区域时,保护区段解锁方式*/
|
||||
#define FUNC_PSD_EXCEPT_CANCLE_TYPE ((UINT8)75) /*屏蔽门异常打开后解除异常方式:0xAA 需ATS发 0xBA命令;0x55未异常打开自动解除*/
|
||||
#define FUNC_PSD_KEEP_CLOSE_TYPE ((UINT8)76) /*联锁系统输出打开/关闭站台门命令原则*/
|
||||
#define FUNC_GATEWAY_INTERFACE_IDENTIFIER ((UINT8)77) /*联锁与网关接口标识:01:不存在GAL报文头 02:存在GAL报文头*/
|
||||
|
||||
|
||||
#define CiSum_ID ((UINT16)1)/*实际联锁集中站数量 编号*/
|
||||
@@ -190,6 +192,7 @@ extern "C" {
|
||||
#define SWITCH_MACHINE_CUT_INTERVAL (77U) /*RC/CI系统控制转辙机板主控切换间隔时间(单位:S)*/
|
||||
#define SWITCH_MACHINE_CUT_DRV_INTERVAL (78U) /*RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:S)*/
|
||||
#define SWITCH_LAST_DRV_TIME (79U) /*RC/CI系统上一次驱动道岔有效时间*/
|
||||
#define SWITCH_REDUN_COLL_ALARM_TIME (80U) /*道岔冗余采集报警容忍时间(ms)*/
|
||||
|
||||
#define FUNC_SWITCH_ON ((UINT8)0xAA) /*功能配置开关打开*/
|
||||
#define FUNC_SWITCH_OFF ((UINT8)0x55) /*功能配置开关关闭*/
|
||||
@@ -259,9 +262,15 @@ extern "C" {
|
||||
#define RC_LINK_LINE_YES ((UINT8)0x55U) /*具备联络线属性*/
|
||||
#define RC_LINK_LINE_NO ((UINT8)0xAAU) /*不具备联络线属性*/
|
||||
|
||||
#define OC_S_ON ((UINT8)0xAA) /*持续OC-S*/
|
||||
#define OC_S_ON ((UINT8)0xAA) /*支持OC-S*/
|
||||
#define OC_S_OFF ((UINT8)0x55) /*不支持OC-S*/
|
||||
|
||||
#define SERIAL_GROUP_SUM_MAX 2 /*串口通信设备数最大值 */
|
||||
#define SERIAL_PORT_SUM_MAX 2 /*串口通信端口索引最大值 */
|
||||
|
||||
#define SERIAL_COMM_YES ((UINT8)0xAAU) /*支持串口通信*/
|
||||
#define SERIAL_COMM_NO ((UINT8)0x55U) /*不支持串口通信*/
|
||||
|
||||
/*系统参数结构体*/
|
||||
typedef struct S_SystemParameterStruct
|
||||
{
|
||||
@@ -375,7 +384,6 @@ typedef struct S_SystemParaStruct
|
||||
UINT8 MaxTsrSpeed;/*临时限速最高限速*/
|
||||
UINT16 MaxTsrNum;/*一次设置临时限速的最大个数*/
|
||||
UINT16 MaxSectionOfTsr;/*一个临时限速报文中包含的最大逻辑区段数量*/
|
||||
UINT32 IvocOcCommunicationErrorTime;/*IVOC-OC通信故障判断时间(ms),add by yt,2022年3月1日,适配车车系统配置数据*/
|
||||
UINT32 TmcOcCommunicationErrorTime;/*TMC-OC通信故障判断时间(ms),add by yt,2022年3月1日,适配车车系统配置数据*/
|
||||
UINT32 OcTslCommunicationErrorTime;/*OC-TSL通信故障判断时间(ms),add by yt,2022年3月1日,适配车车系统配置数据*/
|
||||
UINT8 LinkLogicDirUpAndDown; /*系统定义逻辑方向与上下行方向的关系,add by yt,2022年3月1日,适配车车系统配置数据*/
|
||||
@@ -395,6 +403,7 @@ typedef struct S_SystemParaStruct
|
||||
UINT8 chNoCGFollowUtSwitch; /*无C轨站型B轨有UT车是可追踪功能开关 aa打开 55关闭*/
|
||||
OtherCiParaStruct otherCICiParaStru[CI_SUM_MAX]; /*其他联锁参数配置*/
|
||||
UINT8 chCldAndScxMergeFlag; /*车辆段与试车线合设开关,0x55 合设,0xaa 不合设*/
|
||||
UINT8 chCiFactoryType[CI_SUM_MAX]; /*联锁厂商定义*/
|
||||
/************************************************/
|
||||
}SystemParameterStructNew;
|
||||
|
||||
@@ -418,6 +427,12 @@ typedef struct S_CI_OC_Relation
|
||||
UINT16 OcIdNum;
|
||||
}CiOcRelateion;
|
||||
|
||||
typedef struct S_SERIAL_COMM_DATA
|
||||
{
|
||||
UINT16 wSerialCommOtherCiId; /*串口通信其它联锁ID*/
|
||||
UINT8 chSerialCommPort[SERIAL_PORT_SUM_MAX]; /*串口通信端口*/
|
||||
}SerialCommData;
|
||||
|
||||
|
||||
/*******************************全局变量声明*******************************/
|
||||
extern UINT8 LocalCiId; /*本机联锁ID*/
|
||||
@@ -506,6 +521,8 @@ extern UINT8 localBackUpFlag; /*
|
||||
extern UINT32 dwDownWashWaitAcceptTime; /*降级模式洗车等待值班员同意最大时间(S)*/
|
||||
extern UINT32 LineMinTrainLength; /*系统配置数据,线路最小车长*/
|
||||
extern UINT32 wJXTCStopDetectTime; /*间隙探测停止检测时间(s)*/
|
||||
extern UINT8 gSerialCommFlag; /*本联锁串口通信标志*/
|
||||
extern SerialCommData gSzSerialCommData[SERIAL_GROUP_SUM_MAX]; /*串口通信数据*/
|
||||
/*
|
||||
* 功能描述: 系统参数时间转周期数
|
||||
* 参数说明: void
|
||||
@@ -1353,7 +1370,7 @@ OtherCiParaStruct GetOtherCiPara(const UINT8 chOtherCiId);
|
||||
/*
|
||||
* 功能描述:获取无C轨站型B轨有UT车是可追踪功能开关
|
||||
* 参数说明:无
|
||||
* 返回值:aa关闭 55打开
|
||||
* 返回值:aa打开 55关闭
|
||||
* by cgh 20240815
|
||||
*/
|
||||
UINT8 GetNoCGFollowUtSwitch(void);
|
||||
@@ -1544,9 +1561,9 @@ void SetCiFunctionSwitchConfig(UINT8 chFunctionConfigIndex, UINT8 chSwitchVal);
|
||||
*/
|
||||
UINT32 GetSwitchMachineCutInterval(void);
|
||||
/*
|
||||
* 功能描述:获取RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:S)
|
||||
* 功能描述:获取RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:ms)
|
||||
* 参数说明:无
|
||||
* 返回值:RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:S)
|
||||
* 返回值:RC/CI系统驱动道岔后控制转辙机板主控切换时间(单位:ms)
|
||||
* by mpt 20260324
|
||||
*/
|
||||
UINT32 GetSwitchMachineDrvCutInterval(void);
|
||||
@@ -1569,6 +1586,65 @@ UINT8 SetLocalCiOCSswitch(UINT8 funSwitch);
|
||||
* 返回值:本联锁OCS开关
|
||||
*/
|
||||
UINT8 GetLocalCiOCSswitch(void);
|
||||
/*
|
||||
* 获取联锁厂商信息
|
||||
* 参数说明:const UINT8 chCiId
|
||||
* 返回值:厂商信息
|
||||
* BY:lyj
|
||||
*/
|
||||
UINT8 GetCiFactoryType(const UINT8 chCiId);
|
||||
|
||||
/**
|
||||
* @brief 设置本联锁串口通信标志
|
||||
* @param[in] UINT8 chSerialCommFlag 串口通信标志
|
||||
* @return CI_SUCCESS 设置成功 CI_ERROR 设置失败
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
UINT8 SetLocalSerialCommFlag(UINT8 chSerialCommFlag);
|
||||
|
||||
/**
|
||||
* @brief 获取本联锁串口通信标志
|
||||
* @param[in] void
|
||||
* @return SERIAL_COMM_YES 支持串口通信 chSerialCommFlag 不支持串口通信
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
UINT8 GetLocalSerialCommFlag(void);
|
||||
|
||||
/**
|
||||
* @brief 设置本联锁串口通信数据
|
||||
* @param[in] UINT8 chGroupIndex 串口组索引
|
||||
* @param[in] UINT8 chPortIndex 端口索引
|
||||
* @param[in] UINT16 wSerialCommCiId 串口通信其它联锁ID
|
||||
* @param[in] UINT8 chSerialCommPort 串口通信端口号
|
||||
* @return CI_SUCCESS 设置成功 CI_ERROR 设置失败
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
UINT8 SetLocalSerialCommData(UINT8 chGroupIndex, UINT8 chPortIndex, UINT16 wSerialCommCiId, UINT8 chSerialCommPort);
|
||||
|
||||
/**
|
||||
* @brief 获取本联锁串口通信数据
|
||||
* @param[in] void
|
||||
* @return 串口通信数据
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
SerialCommData* GetLocalSerialCommData(void);
|
||||
|
||||
/**
|
||||
* @brief 根据设备名获取对应的串口组
|
||||
* @param[in] UINT16 DeviceName 设备名称
|
||||
* @param[in] UINT8* pSerialGroup 端口组索引
|
||||
* @return 串口通信数据
|
||||
* @note by cgh 20260507
|
||||
*/
|
||||
UINT8 IsSerialDevice(UINT16 DeviceName, UINT8* pSerialGroup);
|
||||
|
||||
/**
|
||||
* @brief 获取道岔冗余采集故障报警容忍时间(ms)
|
||||
* @param[in] void
|
||||
* @return 道岔冗余采集故障报警容忍时间(ms)
|
||||
* @note by wyd 20260605
|
||||
*/
|
||||
UINT32 GetSwitchRedunCollHunXianCycCfg(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user