Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa00c19d00 | |||
| 9acbe6ea13 | |||
| 1099e62e73 | |||
| d1e26124c4 |
@@ -1,3 +1 @@
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
+58
-59
@@ -20,23 +20,77 @@ LD = $(CC)
|
||||
|
||||
#INCLUDES += -I/path/to/my/lib/include
|
||||
#INCLUDES += -I../mylib/public
|
||||
INCLUDES += -I ./src/commoncode/common \
|
||||
INCLUDES += -I ./src/APP \
|
||||
-I ./src/APP/ciapp/2oo2 \
|
||||
-I ./src/APP/ciapp/AllAutoReturn \
|
||||
-I ./src/APP/ciapp/AutoReturn \
|
||||
-I ./src/APP/ciapp/AutoRoute \
|
||||
-I ./src/APP/ciapp/AxisAssert \
|
||||
-I ./src/APP/ciapp/AxisSort \
|
||||
-I ./src/APP/ciapp/CutoffPoint \
|
||||
-I ./src/APP/ciapp/DataManage \
|
||||
-I ./src/APP/ciapp/DebugPrint \
|
||||
-I ./src/APP/ciapp/Deployment \
|
||||
-I ./src/APP/ciapp/DiffLineDev \
|
||||
-I ./src/APP/ciapp/EnvelopeManage \
|
||||
-I ./src/APP/ciapp/ERROR \
|
||||
-I ./src/APP/ciapp/ESB \
|
||||
-I ./src/APP/ciapp/FloodGate \
|
||||
-I ./src/APP/ciapp/Garagedoor \
|
||||
-I ./src/APP/ciapp/HLHTMsgHead \
|
||||
-I ./src/APP/ciapp/Indicator \
|
||||
-I ./src/APP/ciapp/Initial \
|
||||
-I ./src/APP/ciapp/InvadeSection \
|
||||
-I ./src/APP/ciapp/IO \
|
||||
-I ./src/APP/ciapp/LogicManage \
|
||||
-I ./src/APP/ciapp/LogicProcess \
|
||||
-I ./src/APP/ciapp/LogRecord \
|
||||
-I ./src/APP/ciapp/Main \
|
||||
-I ./src/APP/ciapp/Mask \
|
||||
-I ./src/APP/ciapp/NonAutoReturn \
|
||||
-I ./src/APP/ciapp/NonRoute \
|
||||
-I ./src/APP/ciapp/Overlap \
|
||||
-I ./src/APP/ciapp/ParsePack \
|
||||
-I ./src/APP/ciapp/PSC \
|
||||
-I ./src/APP/ciapp/PSD \
|
||||
-I ./src/APP/ciapp/QueryFiles \
|
||||
-I ./src/APP/ciapp/Relay \
|
||||
-I ./src/APP/ciapp/RemoteRM \
|
||||
-I ./src/APP/ciapp/ReverseCut \
|
||||
-I ./src/APP/ciapp/ReverseRoute \
|
||||
-I ./src/APP/ciapp/Route \
|
||||
-I ./src/APP/ciapp/Section \
|
||||
-I ./src/APP/ciapp/SectionStateProcess \
|
||||
-I ./src/APP/ciapp/SGBJ \
|
||||
-I ./src/APP/ciapp/Signal \
|
||||
-I ./src/APP/ciapp/SPKS \
|
||||
-I ./src/APP/ciapp/Switch \
|
||||
-I ./src/APP/ciapp/System \
|
||||
-I ./src/APP/ciapp/Train \
|
||||
-I ./src/APP/ciapp/Transmit \
|
||||
-I ./src/APP/ciapp/VirtualDevice \
|
||||
-I ./src/APP/ciapp/WashMachine \
|
||||
-I ./src/APP/ciapp/WLScreen \
|
||||
-I ./src/APP/ciapp/WLBrake \
|
||||
-I ./src/APP/PU13_integration_config \
|
||||
-I ./src/commoncode/common \
|
||||
-I ./src/commoncode/commoncode_config_vxworks \
|
||||
-I ./src/dqu_common/dqu_idmap_common \
|
||||
-I ./src/dqu_common/dqu_emap_common \
|
||||
-I ./src/dqu_common/dqu_dfs_common \
|
||||
-I ./src/dqu_common/dqu_cbtc_common \
|
||||
-I .\src\protocol\fsfb\common_dqu_fsfb \
|
||||
-I .\src\protocol\fsfb\common_fsfb \
|
||||
-I .\src\protocol\protocol_cbtc\common_protocol_config \
|
||||
-I .\src\protocol\protocol_cbtc\common_dqu_protocol \
|
||||
-I .\src\protocol\protocol_cbtc\common_protocol \
|
||||
-I .\src\protocol\protocol_cbtc\common_protocol_sfp_rsspi-config \
|
||||
-I .\src\protocol\redun_record_cbtc\common_dqu_rp \
|
||||
-I .\src\protocol\redun_record_cbtc\common_redun \
|
||||
-I .\src\protocol\redun_record_cbtc\common_redun_record_config \
|
||||
-I .\src\protocol\rsr_record_cbtc\common_dqu_rsr \
|
||||
-I .\src\protocol\rsr_record_cbtc\common_rsr \
|
||||
-I .\src\protocol\rsr_record_cbtc\common_rsr\rssp \
|
||||
-I .\src\protocol\rsr_record_cbtc\common_rsr\sig \
|
||||
-I .\src\protocol\rsr_record_cbtc\common_rsr \
|
||||
-I .\src\protocol\rsr_record_cbtc\common_rsr_record_config \
|
||||
-I .\src\protocol\rssp_record_cbtc1\common_dqu_rssp \
|
||||
-I .\src\protocol\rssp_record_cbtc1\common_rssp \
|
||||
@@ -47,8 +101,6 @@ INCLUDES += -I ./src/commoncode/common \
|
||||
-I .\src\protocol\sfp_record_cbtc1\common_dqu_sfp \
|
||||
-I .\src\protocol\sfp_record_cbtc1\common_sfp \
|
||||
-I .\src\protocol\sfp_record_cbtc1\common_sfp_nr_config \
|
||||
-I .\src\protocol\fsfb\common_dqu_fsfb \
|
||||
-I .\src\protocol\fsfb\common_fsfb \
|
||||
-I ./src/DRV \
|
||||
-I ./src/MSCP \
|
||||
-I ./src/MSCP/CM \
|
||||
@@ -57,60 +109,7 @@ INCLUDES += -I ./src/commoncode/common \
|
||||
-I ./src/MSCP/SFM \
|
||||
-I ./src/MSCP/PFM \
|
||||
-I ./src/MSCP_CFG \
|
||||
-I ./src/APP \
|
||||
-I ./src/APP/ciapp/2oo2 \
|
||||
-I ./src/APP/ciapp/AllAutoReturn \
|
||||
-I ./src/APP/ciapp/AutoReturn \
|
||||
-I ./src/APP/ciapp/AutoRoute \
|
||||
-I ./src/APP/ciapp/DataManage \
|
||||
-I ./src/APP/ciapp/DebugPrint \
|
||||
-I ./src/APP/ciapp/DiffLineDev \
|
||||
-I ./src/APP/ciapp/ERROR \
|
||||
-I ./src/APP/ciapp/ESB \
|
||||
-I ./src/APP/ciapp/FloodGate \
|
||||
-I ./src/APP/ciapp/Garagedoor \
|
||||
-I ./src/APP/ciapp/HLHTMsgHead \
|
||||
-I ./src/APP/ciapp/Indicator \
|
||||
-I ./src/APP/ciapp/Initial \
|
||||
-I ./src/APP/ciapp/InvadeSection \
|
||||
-I ./src/APP/ciapp/IO \
|
||||
-I ./src/APP/ciapp/LightTestButtonManage \
|
||||
-I ./src/APP/ciapp/LogicManage \
|
||||
-I ./src/APP/ciapp/LogicProcess \
|
||||
-I ./src/APP/ciapp/LogRecord \
|
||||
-I ./src/APP/ciapp/Main \
|
||||
-I ./src/APP/ciapp/Mask \
|
||||
-I ./src/APP/ciapp/NonRoute \
|
||||
-I ./src/APP/ciapp/Overlap \
|
||||
-I ./src/APP/ciapp/ParsePack \
|
||||
-I ./src/APP/ciapp/PSC \
|
||||
-I ./src/APP/ciapp/PSD \
|
||||
-I ./src/APP/ciapp/QueryFiles \
|
||||
-I ./src/APP/ciapp/Relay \
|
||||
-I ./src/APP/ciapp/ReverseRoute \
|
||||
-I ./src/APP/ciapp/Route \
|
||||
-I ./src/APP/ciapp/Section \
|
||||
-I ./src/APP/ciapp/Signal \
|
||||
-I ./src/APP/ciapp/SPKS \
|
||||
-I ./src/APP/ciapp/Switch \
|
||||
-I ./src/APP/ciapp/System \
|
||||
-I ./src/APP/ciapp/Transmit \
|
||||
-I ./src/APP/ciapp/VirtualDevice \
|
||||
-I ./src/APP/ciapp/WashMachine \
|
||||
-I ./src/APP/PU13_integration_config \
|
||||
-I ./src/APP/ciapp/AxisSort \
|
||||
-I ./src/APP/ciapp/Train \
|
||||
-I ./src/APP/ciapp/EnvelopeManage \
|
||||
-I ./src/APP/ciapp/CutoffPoint \
|
||||
-I ./src/APP/ciapp/SectionStateProcess \
|
||||
-I ./src/APP/ciapp/AxisAssert \
|
||||
-I ./src/APP/ciapp/ReverseCut \
|
||||
-I ./src/APP/ciapp/WLScreen \
|
||||
-I ./src/APP/ciapp/WLBrake \
|
||||
-I ./src/APP/ciapp/RemoteRM \
|
||||
-I ./src/APP/ciapp/NonAutoReturn \
|
||||
-include stdarg.h
|
||||
|
||||
|
||||
#LIBS += -L/path/to/my/lib/$(PLATFORM)/usr/lib -lmylib
|
||||
#LIBS += -L../mylib/$(OUTPUT_DIR) -lmylib
|
||||
|
||||
|
||||
+91
-295
@@ -16,10 +16,6 @@
|
||||
static CM_UINT32 gFollowDataLen = 0u; /*应用跟随数据长度*/
|
||||
static CM_UINT8 gFollowData[MSCP_FOLLOW_BUFF_SIZE] = { 0 }; /*应用跟随数据*/
|
||||
|
||||
static CM_UINT32 gCiRcFollowDataLen = 0u; /*CI-RC同步数据长度*/
|
||||
static CM_UINT8 gCiRcFollowData[MSCP_FOLLOW_BUFF_SIZE] = { 0 }; /*CI-RC同步数据*/
|
||||
|
||||
extern UINT8 LocalCiId; /*系统配置文件中定义的联锁ID*/
|
||||
/* 内网安全通信配置参数,示例: */
|
||||
/* 内网安全通信配置参数,示例: */
|
||||
/*ATP、ATO、MMI间通信时,SFP协议使用的数据库数组:
|
||||
@@ -29,15 +25,14 @@ extern UINT8 LocalCiId; /*系
|
||||
const CM_UINT8 g_SfpInnetParam[] =
|
||||
{
|
||||
|
||||
0,5,/*不同设备通信关系表记录个数*/
|
||||
0,4,/*不同设备通信关系表记录个数*/
|
||||
/*记录的格式如下:*/
|
||||
/* 发起方 发起方发送数据 发起方报文 发起方报文 发起方接收Ack 跟随方 跟随方发送数据 跟随方运行 跟随方报文 此通信关系中成功发送 */
|
||||
/* 设备类型 通信类型 发送周期长度 最大延时 报文最大延时差 设备类型 通信类型 周期长度 最大延时 一包数据所需最小周期数 */
|
||||
/*ZC->CI*/ 0x22, 0x55, 0x01,0x1D, 0x01,0x1D, 0x01,0x1D, 0xff, 0x55, 0x00,0xC8, 0x00,0xC8, 0x02,
|
||||
/*AOM->TIAS*/ 0x15, 0x55, 0x00,0xC8, 0x00,0xC8, 0x00,0xC8, 0x03, 0x55, 0x00,0xC8, 0x00,0xC8, 0x02,
|
||||
/*AOM->ATP*/ 0x14, 0x55, 0x00,0xC8, 0x00,0xC8, 0x00,0xC8, 0x15, 0x55, 0x00,0xC8, 0x00,0xC8, 0x02,
|
||||
/*RC主机->维护机*/ 0xD9, 0x55, 0x01,0x2c, 0x01,0x2C, 0x01,0x2C, 0xf8, 0x55, 0x00,0xc8, 0x00,0xc8, 0x02,
|
||||
/*CI主机->维护机*/ 0xDE, 0x55, 0x01,0x2c, 0x01,0x2C, 0x01,0x2C, 0xf8, 0x55, 0x00,0xc8, 0x00,0xc8, 0x02,
|
||||
/*主机->维护机*/ 0xD9, 0x55, 0x01,0x2c, 0x01,0x2C, 0x01,0x2C, 0xf8, 0x55, 0x00,0xc8, 0x00,0xc8, 0x02,
|
||||
0,2,/*相同设备通信关系表记录个数*/
|
||||
/*记录的格式如下:*/
|
||||
/* 发起方 发起方 发起方发送数据 发起方报文 发起方报文 发起方接收Ack 跟随方 跟随方 跟随方发送数据 跟随方运行 跟随方报文 此通信关系中成功发送 */
|
||||
@@ -190,7 +185,6 @@ ENUM_CM_RETURN APP_API_Init(OUT CM_UINT8 VitalBuf[200], OUT CM_UINT16* pVitalLen
|
||||
MSCP_SetOutAtsVobcFunc(pReserveOutVobc);
|
||||
pReserveInAts = SerialInVobcAtsFunc;
|
||||
MSCP_SetInVobcAtsFunc(pReserveInAts);
|
||||
MSCP_SetRCFollowUpFunc(SetCiGeneralData);
|
||||
#if 1
|
||||
cSwtichFalg = GetCiFunctionSwitchConfig(FUNC_OC_200_INOUTNET);
|
||||
|
||||
@@ -230,65 +224,11 @@ void APP_API_Data_Init()
|
||||
UINT16 ii = 0U;
|
||||
UINT8 szFSFILEVersionFS[DFS_VERSION_LENGTH] = { 0 };
|
||||
UINT8 funcRetVal = 0U;
|
||||
UINT8 cBoardInfo = 0U;
|
||||
UINT8 cPluginId = 0U;
|
||||
UINT8 cBoardId = 0U;
|
||||
UINT8 cRetVal = CI_ERROR;
|
||||
UINT16 locTypeId = 0U;
|
||||
UINT8 cDevType = 0U;
|
||||
UINT8 cSystemWorkType = SYSTEM_WORK_MODE_ONLY;
|
||||
funcRetVal = dquGetFSVersion(DataPath, szFSFILEVersionFS);
|
||||
|
||||
locTypeId = MSCP_GetOutnetID();
|
||||
LocalCiId = (UINT8)(locTypeId & 0x00FFU); /*联锁设备ID*/
|
||||
cDevType = (UINT8)((locTypeId >> 8U) & 0x00FFU); /*RC/CI类型*/
|
||||
|
||||
|
||||
cRetVal = RciCommonConfigDataInit((const)DataPath); /*初始化当前联锁类型配置数据*/
|
||||
if ((CI_SUCCESS == cRetVal) && (CI_SUCCESS == funcRetVal)) /*初始化当前联锁类型配置数据*/
|
||||
{
|
||||
cSystemWorkType = GetSystemWorkType();
|
||||
#if (kPLATFORM==kVXWORKS)
|
||||
/*若为真机,则通过平台获取设备类型*/
|
||||
cBoardInfo = MSCP_GetDrvBoardID();
|
||||
PlatSheBeiType = &gSheBeiType; /*联锁设备类型*/
|
||||
cPluginId = ((cBoardInfo >> 4U) & 0x0FU);
|
||||
cBoardId = (cBoardInfo & 0x0FU);
|
||||
if (((0x03U == cPluginId) && ((0x03U == cBoardId) || (0x05U == cBoardId)))
|
||||
|| ((0x0CU == cPluginId) && ((0x06U == cBoardId) || (0x0AU == cBoardId))))
|
||||
{
|
||||
(void)SetLocalRcWorkMode(RC_WORK_MODE_TIOC);
|
||||
gSheBeiType = RC_WORK_MODE_TIOC;
|
||||
}
|
||||
else if (((0x04U == cPluginId) && ((0x03U == cBoardId) || (0x05U == cBoardId)))
|
||||
|| ((0x0BU == cPluginId) && ((0x06U == cBoardId) || (0x0AU == cBoardId))))
|
||||
{
|
||||
(void)SetLocalRcWorkMode(RC_WORK_MODE_CI);
|
||||
gSheBeiType = RC_WORK_MODE_CI;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_infor_printf((const)"APP_API_Data_Init Error: CI_SYSTEM_TYPE Error.\n");
|
||||
printf((const)"APP_API_Data_Init Error: CI_SYSTEM_TYPE Error.\n");
|
||||
}
|
||||
/*真机需校验设备类型是否一致*/
|
||||
locTypeId = MSCP_GetOutnetID();
|
||||
cDevType = (UINT8)((locTypeId >> 8U) & 0x00FFU); /*RC/CI类型*/
|
||||
if (gSheBeiType == cDevType)
|
||||
{
|
||||
/*继续处理*/
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_infor_printf((const)"APP_API_Data_Init Error: DevType[0x%x] And [0x%x] Is Not Equal \n", gSheBeiType, cDevType);
|
||||
cRetVal = CI_ERROR;
|
||||
}
|
||||
|
||||
}
|
||||
if(CI_SUCCESS == cRetVal)
|
||||
{
|
||||
/*文件配置*/
|
||||
STRU_APP_CFG_T AppCfgInterface = {
|
||||
/*文件配置*/
|
||||
STRU_APP_CFG_T AppCfgInterface = {
|
||||
.FS_NAME = "RCI.FS", /**< FS文件名称 */
|
||||
.APP_NAME = "RCOCI", /**< 应用文件名称 */
|
||||
.CYC_TIME = 300, /**< 系统周期 */
|
||||
@@ -306,29 +246,51 @@ void APP_API_Data_Init()
|
||||
.reboot_replycount = 10, /**< 重启确认报文回复次数 */
|
||||
.M_AutoReboot_Count = 3, /**< 自动重启次数 */
|
||||
.M_AutoClear_Days = 1, /**< 连续运行多久清空宕机次数的天数 */
|
||||
.M_Area_Enable = 0, /**< 区域状态开关配置 */
|
||||
.M_AREA_SEB_Enable = 0xAA, /**< RC与CI扩展板卡通信功能开关配置 */
|
||||
|
||||
.CPU[0].IP_2oo2 = "192.168.0.11", /**< 2oo2通信IP */
|
||||
.CPU[0].IP_2x2 = "192.168.1.62", /**< 2x2通信IP */
|
||||
.CPU[0].IP_Out = "192.168.1.62", /**< 外网通信IP */
|
||||
.CPU[0].IP_Maintain = "192.168.146.101", /**< 维护通信IP */
|
||||
/*适用透传通道-选配*/
|
||||
.CPU[0].IP_Com = "192.168.1.62", /**< 通用通信IP */
|
||||
.CPU[0].IP_Com_Extend = "192.168.1.62",/**< 通用通信扩展IP */
|
||||
.CPU[0].Logger_PortBase = 55011, /**< 明文日志记录发送端口 */
|
||||
.CPU[0].Logger_PortCiphertext = 55002, /**< 暗文日志记录发送端口 */
|
||||
|
||||
|
||||
.CPU[1].IP_2oo2 = "192.168.0.12", /**< 2oo2通信IP */
|
||||
.CPU[1].IP_2x2 = "192.168.2.62", /**< 2x2通信IP */
|
||||
.CPU[1].IP_Out = "192.168.2.62", /**< 外网通信IP */
|
||||
.CPU[1].IP_Maintain = "192.168.18.102", /**< 维护通信IP */
|
||||
/*适用透传通道-选配*/
|
||||
.CPU[1].IP_Com = "192.168.2.62", /**< 通用通信IP */
|
||||
.CPU[1].IP_Com_Extend = "192.168.2.62",/**< 通用通信扩展IP */
|
||||
.CPU[1].Logger_PortBase = 55012, /**< 明文日志记录发送端口 */
|
||||
.CPU[1].Logger_PortCiphertext = 55002, /**< 暗文日志记录发送端口 */
|
||||
|
||||
|
||||
.CPU[2].IP_2oo2 = "192.168.0.21", /**< 2oo2通信IP */
|
||||
.CPU[2].IP_2x2 = "192.168.1.64", /**< 2x2通信IP */
|
||||
.CPU[2].IP_Out = "192.168.1.64", /**< 外网通信IP */
|
||||
.CPU[2].IP_Maintain = "192.168.146.103", /**< 维护通信IP */
|
||||
/*适用透传通道-选配*/
|
||||
.CPU[2].IP_Com = "192.168.1.64", /**< 通用通信IP */
|
||||
.CPU[2].IP_Com_Extend = "192.168.1.64",/**< 通用通信扩展IP */
|
||||
.CPU[2].Logger_PortBase = 55021, /**< 明文日志记录发送端口 */
|
||||
.CPU[2].Logger_PortCiphertext = 55002, /**< 暗文日志记录发送端口 */
|
||||
|
||||
|
||||
.CPU[3].IP_2oo2 = "192.168.0.22", /**< 2oo2通信IP */
|
||||
.CPU[3].IP_2x2 = "192.168.2.64", /**< 2x2通信IP */
|
||||
.CPU[3].IP_Out = "192.168.2.64", /**< 外网通信IP */
|
||||
.CPU[3].IP_Maintain = "192.168.18.104", /**< 维护通信IP */
|
||||
/*适用透传通道-选配*/
|
||||
.CPU[3].IP_Com = "192.168.2.64", /**< 通用通信IP */
|
||||
.CPU[3].IP_Com_Extend = "192.168.2.64",/**< 通用通信扩展IP */
|
||||
.CPU[3].Logger_PortBase = 55022, /**< 明文日志记录发送端口 */
|
||||
.CPU[3].Logger_PortCiphertext = 55002, /**< 暗文日志记录发送端口 */
|
||||
/*通用端口配置*/
|
||||
/*通用端口配置*/
|
||||
.Port_Outnet_Safe = 54001, /**< 外网安全通信端口 */
|
||||
.Port_Innet_Safe = 53001, /**< 内网安全通信端口 */
|
||||
.Port_Outnet_Raw = 54002, /**< 外网透明传输端口 */
|
||||
.Port_Remote_Update = 50000, /**< 远程部署通信端口 */
|
||||
/*透传配置-选配*/
|
||||
/*透传配置-选配*/
|
||||
.Port_Innet_Raw_Num = 0, /**< 内网透传端口数量 */
|
||||
.Port_Innet_Raw_Extend_Num = 0, /**< 内网透传扩展端口数量 */
|
||||
.Innet_Raw_Parameter[0].Port_Innet_Raw = 3956, /**< 内网透明传输端口 */
|
||||
@@ -346,215 +308,57 @@ void APP_API_Data_Init()
|
||||
.Innet_Raw_Parameter[1].INNET_2oo2_RAW = 0X55, /**< 透传通道2取开关 */
|
||||
.Innet_Raw_Parameter[1].INNET_2x2_RAW = 0XAA, /**< 透传通道2乘开关 */
|
||||
.Innet_Raw_Parameter[1].IP_InnetRaw_maddr = "224.0.0.32",/**< 内网透传的组播IP */
|
||||
/*外网通信配置*/
|
||||
/*外网通信配置*/
|
||||
.OutNetRed.CC_G_IP = "192.168.1.60", /**< 通控的内网IP */
|
||||
.OutNetRed.CC_P_IP = "192.168.2.60", /**< 通控的内网IP */
|
||||
.OutNetRed.EXTEND_G_IP = "192.168.1.70", /**< 扩展板卡的内网IP */
|
||||
.OutNetRed.EXTEND_P_IP = "192.168.2.70", /**< 扩展板卡的内网IP */
|
||||
.Another_SEB.EXTEND_R_G_IP = "192.168.1.90", /**< CI扩展板卡的内网IP */
|
||||
.Another_SEB.EXTEND_R_P_IP = "192.168.2.90", /**< CI扩展板卡的内网IP */
|
||||
.Another_SEB.OutnetSafe_R_Port = 54001, /**< 外网安全通信端口 */
|
||||
.OutNetRed.OutnetSafe_Port = 54001, /**< 外网安全通信端口 */
|
||||
.OutNetRed.OutnetRaw_Port = 54002, /**< 外网透传通信端口 */
|
||||
.OutNetRed.InnetRaw_Port = 53003, /**< 内网透传通信端口 */
|
||||
|
||||
.OutNetBlue.CC_G_IP = "192.168.1.61", /**< 通控的内网IP */
|
||||
.OutNetBlue.CC_P_IP = "192.168.2.61", /**< 通控的内网IP */
|
||||
.OutNetBlue.EXTEND_G_IP = "192.168.1.71", /**< 扩展板卡的内网IP */
|
||||
.OutNetBlue.EXTEND_P_IP = "192.168.2.71", /**< 扩展板卡的内网IP */
|
||||
.Another_SEB.EXTEND_B_G_IP = "192.168.1.91", /**< CI扩展板卡的内网IP */
|
||||
.Another_SEB.EXTEND_B_P_IP = "192.168.2.91", /**< CI扩展板卡的内网IP */
|
||||
.Another_SEB.OutnetSafe_B_Port = 54001, /**< 外网安全通信端口 */
|
||||
.OutNetBlue.EXTEND_G_IP = "192.168.1.71", /**< 扩展板卡的内网IP */
|
||||
.OutNetBlue.EXTEND_P_IP = "192.168.2.71", /**< 扩展板卡的内网IP */
|
||||
.OutNetBlue.OutnetSafe_Port = 54001, /**< 外网安全通信端口 */
|
||||
.OutNetBlue.OutnetRaw_Port = 54002, /**< 外网透传通信端口 */
|
||||
.OutNetBlue.InnetRaw_Port = 53003, /**< 内网透传通信端口 */
|
||||
|
||||
/*日志记录目标设备IP配置*/
|
||||
.Logger_G_IP = "192.168.146.100", /**< 绿网日志记录IP */
|
||||
.Logger_P_IP = "192.168.18.100", /**< 紫网日志记录IP */
|
||||
/*内网通信设备注册最大支持0-255*/
|
||||
.INNET_COM_NUM = 1, /**< 内网通信设备数量 */
|
||||
.INNET_COM_CFG[0].InnetID = DEVICE_TYPE_AIM, /**< 内网通信ID */
|
||||
.INNET_COM_CFG[0].IP_G = (CM_UINT32)inet_addr("192.168.146.100"),/**< 绿网IP */
|
||||
.INNET_COM_CFG[0].Port_Raw_G = 55004, /**< 绿网透传端口 */
|
||||
.INNET_COM_CFG[0].Port_Safe_G = 55003, /**< 绿网安全端口 */
|
||||
.INNET_COM_CFG[0].IP_P = (CM_UINT32)inet_addr("192.168.18.100"),/**< 紫网IP */
|
||||
.INNET_COM_CFG[0].Port_Raw_P = 55004, /**< 紫网透传端口 */
|
||||
.INNET_COM_CFG[0].Port_Safe_P = 55003, /**< 紫网安全端口 */
|
||||
|
||||
};
|
||||
|
||||
|
||||
if (RC_WORK_MODE_TIOC == CI_SYSTEM_TYPE_RCI)
|
||||
{
|
||||
/*设置IP 与CIIP一致*/
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_2oo2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.0.11"), (UINT32)sizeof("192.168.0.11"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_2x2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.62"), (UINT32)sizeof("192.168.1.62"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_Out), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.62"), (UINT32)sizeof("192.168.1.62"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_Com), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.62"), (UINT32)sizeof("192.168.1.62"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_Com_Extend), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.62"), (UINT32)sizeof("192.168.1.62"));
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_2oo2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.0.12"), (UINT32)sizeof("192.168.0.12"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_2x2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.62"), (UINT32)sizeof("192.168.2.62"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_Out), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.62"), (UINT32)sizeof("192.168.2.62"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_Com), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.62"), (UINT32)sizeof("192.168.2.62"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_Com_Extend), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.62"), (UINT32)sizeof("192.168.2.62"));
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_2oo2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.0.21"), (UINT32)sizeof("192.168.0.21"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_2x2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.64"), (UINT32)sizeof("192.168.1.64"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_Out), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.64"), (UINT32)sizeof("192.168.1.64"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_Com), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.64"), (UINT32)sizeof("192.168.1.64"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_Com_Extend), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.64"), (UINT32)sizeof("192.168.1.64"));
|
||||
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_2oo2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.0.22"), (UINT32)sizeof("192.168.0.22"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_2x2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.64"), (UINT32)sizeof("192.168.2.64"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_Out), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.64"), (UINT32)sizeof("192.168.2.64"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_Com), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.64"), (UINT32)sizeof("192.168.2.64"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_Com_Extend), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.64"), (UINT32)sizeof("192.168.2.64"));
|
||||
|
||||
/*CPU1*/
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[0].IP_Area_A), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.66"), (UINT32)sizeof("192.168.1.66"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[0].IP_Area_B), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.68"), (UINT32)sizeof("192.168.1.68"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[0].IP_Multicast_Mine), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("239.0.0.21"), (UINT32)sizeof("239.0.0.21"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[0].IP_Multicast_Dest), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("239.0.0.11"), (UINT32)sizeof("239.0.0.11"));
|
||||
|
||||
/*CPU2*/
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[1].IP_Area_A), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.66"), (UINT32)sizeof("192.168.2.66"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[1].IP_Area_B), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.68"), (UINT32)sizeof("192.168.2.68"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[1].IP_Multicast_Mine), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("239.0.0.22"), (UINT32)sizeof("239.0.0.22"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[1].IP_Multicast_Dest), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("239.0.0.12"), (UINT32)sizeof("239.0.0.12"));
|
||||
|
||||
/*内网 通控与扩展板卡*/
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetRed.CC_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.60"), (UINT32)sizeof("192.168.1.60"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetRed.CC_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.60"), (UINT32)sizeof("192.168.2.60"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetRed.EXTEND_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.70"), (UINT32)sizeof("192.168.1.70"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetRed.EXTEND_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.70"), (UINT32)sizeof("192.168.2.70"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Another_SEB.EXTEND_R_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.90"), (UINT32)sizeof("192.168.1.90"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Another_SEB.EXTEND_R_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.90"), (UINT32)sizeof("192.168.2.90"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetBlue.CC_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.61"), (UINT32)sizeof("192.168.1.61"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetBlue.CC_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.61"), (UINT32)sizeof("192.168.2.61"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetBlue.EXTEND_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.71"), (UINT32)sizeof("192.168.1.71"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetBlue.EXTEND_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.71"), (UINT32)sizeof("192.168.2.71"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Another_SEB.EXTEND_B_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.91"), (UINT32)sizeof("192.168.1.91"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Another_SEB.EXTEND_B_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.91"), (UINT32)sizeof("192.168.2.91"));
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_Maintain), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.146.101"), (UINT32)sizeof("192.168.146.101"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_Maintain), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.18.102"), (UINT32)sizeof("192.168.18.102"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_Maintain), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.146.103"), (UINT32)sizeof("192.168.146.103"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_Maintain), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.18.104"), (UINT32)sizeof("192.168.18.104"));
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Logger_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.146.100"), (UINT32)sizeof("192.168.146.100"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Logger_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.18.100"), (UINT32)sizeof("192.168.18.100"));
|
||||
AppCfgInterface.INNET_COM_CFG[0].IP_G = (CM_UINT32)inet_addr("192.168.146.100");
|
||||
AppCfgInterface.INNET_COM_CFG[0].IP_P = (CM_UINT32)inet_addr("192.168.18.100");
|
||||
|
||||
}
|
||||
else
|
||||
{/*设置IP 与CIIP一致*/
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_2oo2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.0.11"), (UINT32)sizeof("192.168.0.11"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_2x2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.66"), (UINT32)sizeof("192.168.1.66"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_Out), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.66"), (UINT32)sizeof("192.168.1.66"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_Com), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.66"), (UINT32)sizeof("192.168.1.66"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_Com_Extend), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.66"), (UINT32)sizeof("192.168.1.66"));
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_2oo2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.0.12"), (UINT32)sizeof("192.168.0.12"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_2x2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.66"), (UINT32)sizeof("192.168.2.66"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_Out), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.66"), (UINT32)sizeof("192.168.2.66"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_Com), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.66"), (UINT32)sizeof("192.168.2.66"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_Com_Extend), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.66"), (UINT32)sizeof("192.168.2.66"));
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_2oo2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.0.21"), (UINT32)sizeof("192.168.0.21"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_2x2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.68"), (UINT32)sizeof("192.168.1.68"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_Out), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.68"), (UINT32)sizeof("192.168.1.68"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_Com), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.68"), (UINT32)sizeof("192.168.1.68"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_Com_Extend), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.68"), (UINT32)sizeof("192.168.1.68"));
|
||||
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_2oo2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.0.22"), (UINT32)sizeof("192.168.0.22"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_2x2), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.68"), (UINT32)sizeof("192.168.2.68"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_Out), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.68"), (UINT32)sizeof("192.168.2.68"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_Com), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.68"), (UINT32)sizeof("192.168.2.68"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_Com_Extend), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.68"), (UINT32)sizeof("192.168.2.68"));
|
||||
|
||||
/*CPU1*/
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[0].IP_Area_A), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.62"), (UINT32)sizeof("192.168.1.62"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[0].IP_Area_B), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.64"), (UINT32)sizeof("192.168.1.64"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[0].IP_Multicast_Mine), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("239.0.0.11"), (UINT32)sizeof("239.0.0.11"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[0].IP_Multicast_Dest), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("239.0.0.21"), (UINT32)sizeof("239.0.0.21"));
|
||||
|
||||
/*CPU2*/
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[1].IP_Area_A), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.62"), (UINT32)sizeof("192.168.2.62"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[1].IP_Area_B), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.64"), (UINT32)sizeof("192.168.2.64"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[1].IP_Multicast_Mine), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("239.0.0.12"), (UINT32)sizeof("239.0.0.12"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.AREA_CPU[1].IP_Multicast_Dest), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("239.0.0.22"), (UINT32)sizeof("239.0.0.22"));
|
||||
|
||||
/*内网 通控与扩展板卡*/
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetRed.CC_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.80"), (UINT32)sizeof("192.168.1.80"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetRed.CC_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.80"), (UINT32)sizeof("192.168.2.80"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetRed.EXTEND_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.90"), (UINT32)sizeof("192.168.1.90"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetRed.EXTEND_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.90"), (UINT32)sizeof("192.168.2.90"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Another_SEB.EXTEND_R_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.90"), (UINT32)sizeof("192.168.1.90"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Another_SEB.EXTEND_R_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.90"), (UINT32)sizeof("192.168.2.90"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetBlue.CC_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.81"), (UINT32)sizeof("192.168.1.81"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetBlue.CC_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.81"), (UINT32)sizeof("192.168.2.81"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetBlue.EXTEND_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.91"), (UINT32)sizeof("192.168.1.91"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.OutNetBlue.EXTEND_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.91"), (UINT32)sizeof("192.168.2.91"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Another_SEB.EXTEND_B_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.1.91"), (UINT32)sizeof("192.168.1.91"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Another_SEB.EXTEND_B_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.2.91"), (UINT32)sizeof("192.168.2.91"));
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[0].IP_Maintain), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.148.101"), (UINT32)sizeof("192.168.148.101"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[1].IP_Maintain), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.20.102"), (UINT32)sizeof("192.168.20.102"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[2].IP_Maintain), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.148.103"), (UINT32)sizeof("192.168.148.103"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.CPU[3].IP_Maintain), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.20.104"), (UINT32)sizeof("192.168.20.104"));
|
||||
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Logger_G_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.148.100"), (UINT32)sizeof("192.168.148.100"));
|
||||
(void)CommonMemCpy((void*)(AppCfgInterface.Logger_P_IP), (UINT32)sizeof(CM_CHAR) * 32, (const void*)("192.168.20.100"), (UINT32)sizeof("192.168.20.100"));
|
||||
AppCfgInterface.INNET_COM_CFG[0].IP_G = (CM_UINT32)inet_addr("192.168.148.100");
|
||||
AppCfgInterface.INNET_COM_CFG[0].IP_P = (CM_UINT32)inet_addr("192.168.20.100");
|
||||
|
||||
}
|
||||
if(SYSTEM_WORK_MODE_ONLY == cSystemWorkType)
|
||||
{
|
||||
/*单系统运行:区域开关设置为0*/
|
||||
AppCfgInterface.M_Area_Enable = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*双系统运行*/
|
||||
if (RC_WORK_MODE_TIOC == CI_SYSTEM_TYPE_RCI)
|
||||
{
|
||||
/*RC区域开关设置为0xAA*/
|
||||
AppCfgInterface.M_Area_Enable = 0xAAu;
|
||||
/**< RC与CI扩展板卡通信功能开关配置 */
|
||||
AppCfgInterface.M_AREA_SEB_Enable = 0x55u;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/*设置CI IP+区域IP*/
|
||||
AppCfgInterface.M_Area_Enable = 0x55u;
|
||||
}
|
||||
|
||||
}
|
||||
MSCP_Set_APP_ConfigData(&AppCfgInterface);
|
||||
|
||||
};
|
||||
MSCP_Set_APP_ConfigData(&AppCfgInterface);
|
||||
#endif
|
||||
|
||||
/*组FS版本号*/
|
||||
ii = 0U;
|
||||
fsVersBuffer[ii++] = szFSFILEVersionFS[0];
|
||||
fsVersBuffer[ii++] = szFSFILEVersionFS[1];
|
||||
fsVersBuffer[ii++] = szFSFILEVersionFS[2];
|
||||
fsVersBuffer[ii++] = szFSFILEVersionFS[3];
|
||||
/*组FS版本号*/
|
||||
ii = 0U;
|
||||
fsVersBuffer[ii++] = szFSFILEVersionFS[0];
|
||||
fsVersBuffer[ii++] = szFSFILEVersionFS[1];
|
||||
fsVersBuffer[ii++] = szFSFILEVersionFS[2];
|
||||
fsVersBuffer[ii++] = szFSFILEVersionFS[3];
|
||||
|
||||
/*组软件版本号*/
|
||||
ii = 0U;
|
||||
appVersBuffer[ii++] = VER_INTE_PROJECT;
|
||||
appVersBuffer[ii++] = VER_INTE_PRODUCT >> 2U;
|
||||
appVersBuffer[ii++] = (VER_INTE_PRODUCT << 6U) + (VER_INTE_EXE & (UINT8)0x3F);
|
||||
appVersBuffer[ii++] = VER_INTE_TIME;
|
||||
/*设置平台调用获取外网信息函数*/
|
||||
MSCP_SetSrcId(SetOutNetPara);
|
||||
/*设置内网参数*/
|
||||
MSCP_SetSfpInnetPara(g_SfpInnetParam);
|
||||
MSCP_SetAppVersion(appVersBuffer);
|
||||
MSCP_SetFsVersion(fsVersBuffer);
|
||||
}
|
||||
/*组软件版本号*/
|
||||
ii = 0U;
|
||||
appVersBuffer[ii++] = VER_INTE_PROJECT;
|
||||
appVersBuffer[ii++] = VER_INTE_PRODUCT >> 2U;
|
||||
appVersBuffer[ii++] = (VER_INTE_PRODUCT << 6U) + (VER_INTE_EXE & (UINT8)0x3F);
|
||||
appVersBuffer[ii++] = VER_INTE_TIME;
|
||||
/*设置平台调用获取外网信息函数*/
|
||||
MSCP_SetSrcId(SetOutNetPara);
|
||||
/*设置内网参数*/
|
||||
MSCP_SetSfpInnetPara(g_SfpInnetParam);
|
||||
MSCP_SetAppVersion(appVersBuffer);
|
||||
MSCP_SetFsVersion(fsVersBuffer);
|
||||
}
|
||||
/**
|
||||
* @brief 应用周期主逻辑
|
||||
@@ -592,9 +396,6 @@ ENUM_CM_RETURN APP_API_MainFunc(void)
|
||||
gFollowDataLen = GetCiAppData(gFollowData);
|
||||
MSCP_SetFollowData(gFollowData, gFollowDataLen);
|
||||
|
||||
gCiRcFollowDataLen = GetCiGeneralData(gCiRcFollowData);
|
||||
MSCP_CISendAppData(gCiRcFollowData, gCiRcFollowDataLen);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@@ -717,27 +518,44 @@ 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 chWorkType = 0U; /*双系工作模式*/
|
||||
UINT8 cControlState = 0U;/*主备用模式*/
|
||||
UINT8 cRcWorkMode = 0u;/*RC工作模式*/
|
||||
UINT8 chLocalCiType = 0U; /*本联锁属性*/
|
||||
UINT8 chDstCiType = 0U; /*本联锁属性*/
|
||||
UINT8 chCldScxCommMode = 0U;
|
||||
UINT8 chResult = CI_ERROR; /*联锁属性检查结果*/
|
||||
UINT8 serialGroup = 0U; /*串口通信组索引*/
|
||||
|
||||
wAtsGtWayDevTypeId = GetTiocTrnsmtGtwyDevTypeId();
|
||||
/**使用通控板与ATS网关通信*/
|
||||
if (dstDevTypeId != wAtsGtWayDevTypeId)
|
||||
{
|
||||
devType = (CM_UINT8)((dstDevTypeId >> 8) & 0xFF);
|
||||
chWorkType = GetSystemWorkType();
|
||||
cControlState = GetLocalCiBackUpPattern();
|
||||
cRcWorkMode = GetLocalRcWorkMode();
|
||||
devId = (CM_UINT8)(dstDevTypeId & 0xFF);
|
||||
|
||||
chResult = IsSerialDevice(dstDevTypeId, &serialGroup);
|
||||
chLocalCiType = GetLocalCiType();
|
||||
chDstCiType = GetCiType(devId);
|
||||
chCldScxCommMode = GetCiFunctionSwitchConfig(SCX_CLD_INTERFACE_TYPE);
|
||||
|
||||
if ((CI_SYSTEM_TYPE_XIANDI == devType) || (CI_SYSTEM_TYPE_ATS == devType)
|
||||
if ((SCX_CLD_SERIAL_PORT_COMM == chCldScxCommMode) && (CI_SYSTEM_TYPE_CI == 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类型进行判断*/
|
||||
}
|
||||
|
||||
if ((CI_SYSTEM_TYPE_XIANDI == devType) || (CI_SYSTEM_TYPE_ATS == devType) || (CI_SYSTEM_TYPE_LEU == devType)
|
||||
|| (CI_SUCCESS == chResult)
|
||||
|| (CI_SYSTEM_TYPE_VOBC_BACKUP == devType)) /*现地,ATS,使用串口的相邻CI*/
|
||||
|| (CI_SYSTEM_TYPE_VOBC_BACKUP == devType)) /*现地,ATS,LEU,使用串口的相邻CI*/
|
||||
{
|
||||
retVal = ENUM_CM_SEB;
|
||||
}
|
||||
@@ -745,28 +563,6 @@ ENUM_CM_RECCUSEB Is_Send_ExtendBoard(IN const CM_UINT16 dstDevTypeId)
|
||||
{
|
||||
retVal = ENUM_CM_CCSEB;
|
||||
}
|
||||
else if (CI_SYSTEM_TYPE_LEU == devType)
|
||||
{
|
||||
if ((SYSTEM_WORK_MODE_ALL == chWorkType) && (RC_WORK_MODE_TIOC == cRcWorkMode))
|
||||
{
|
||||
/*双系统,并且当前是RC*/
|
||||
if (SYSTEM_WORK_MODE_MAIN == cControlState)
|
||||
{
|
||||
/*是RC主用时,需要用CI的串口板进行LEU通信*/
|
||||
retVal = ENUM_CM_SEB_ANOTHER;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*RC备用,禁止发送*/
|
||||
retVal = ENUM_CM_FORBIDDEN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*单系统,或当前是CI*/
|
||||
retVal = ENUM_CM_SEB;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = ENUM_CM_CC;
|
||||
@@ -965,7 +761,7 @@ ENUM_CM_RETURN SerialOutAtsVobcFunc(UINT16 inDstId IN, UINT16* outSrcId OUT, UIN
|
||||
inDstType = (UINT8)((inDstId & 0xff00U) >> 8);
|
||||
if ((CI_SYSTEM_TYPE_VOBC_BACKUP == inDstType) || (CI_SYSTEM_TYPE_ITE == inDstType))
|
||||
{
|
||||
*outSrcId = (CI_SYSTEM_TYPE_RCI << 8) + GetSystemParaLocalCiId();
|
||||
*outSrcId = (CI_SYSTEM_TYPE_CI << 8) + GetSystemParaLocalCiId();
|
||||
*outDstId = GetATSInterfaceTypeId();
|
||||
|
||||
retVal = ENUM_CM_TRUE;
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
#define VER_INTE_PROJECT 220 /*项目编号*/
|
||||
#define VER_INTE_PRODUCT 40 /*产品编号*/
|
||||
#define VER_INTE_EXE 1 /*可执行编号*/
|
||||
#define VER_INTE_TIME 131 /*集成次数编号*/
|
||||
#define VER_INTE_TIME 126 /*集成次数编号*/
|
||||
|
||||
#endif/*endif of #define _CI_INTEGRATE_CONFIG_H*/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -154,20 +154,6 @@ UINT32 CopyValidSetVobcBackHlht(const UINT8 *pCurCiAppDataPointer, UINT16 struNu
|
||||
*/
|
||||
UINT32 CopyValidSetVobcDataStru(const UINT8* pCurCiAppDataPointer, VobcToCiDataStruct* pDataStru, UINT16 struNum);
|
||||
|
||||
/*
|
||||
* 功能描述: 拷贝RC通信的VOBC有效数据到对应的全局数组
|
||||
* 参数说明:
|
||||
输入参数
|
||||
const UINT8 *pCurCiAppDataPointer:当前数据指针
|
||||
UINT16 struNum:数组长度,
|
||||
UINT16 struLength:结构体长度
|
||||
输出参数
|
||||
void *pDataStru:结构体指针,
|
||||
* 返回值 : 拷贝数据的长度
|
||||
*/
|
||||
UINT32 CopyValidSetRcVobcDataStru(const UINT8* pCurCiAppDataPointer, void* pDataStru, UINT16 struNum, UINT16 struLength);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述:拷贝ITE有效数据到对应的全局数组
|
||||
* 参数说明:const UINT8 *pCurCiAppDataPointer:当前数据指针
|
||||
@@ -203,280 +189,6 @@ UINT32 GetCiAppData(UINT8 *pCiAppDataPointer);
|
||||
*/
|
||||
UINT8 SetCiAppData(const UINT8 *pCiAppDataPointer,const UINT32 len);
|
||||
|
||||
|
||||
/**
|
||||
* @brief 拷贝获取现地有效互联互通头
|
||||
* @param[in] UINT8 *pCurCiAppDataPointer:当前数据指针
|
||||
* @param[in] UINT16 struNum:数组长度
|
||||
* @param[in] struLength:结构体长度
|
||||
* @return 无
|
||||
* @note by cgh 20251103
|
||||
*/
|
||||
UINT32 CopyValidGetXiandiHlht(UINT8* pCurCiAppDataPointer, UINT16 struNum, UINT16 struLength);
|
||||
|
||||
/**
|
||||
* @brief 拷贝设置现地有效互联互通头
|
||||
* @param[in] UINT8 *pCurCiAppDataPointer:当前数据指针
|
||||
* @param[in] UINT16 struNum:数组长度
|
||||
* @param[in] struLength:结构体长度
|
||||
* @return 无
|
||||
* @note by cgh 20251103
|
||||
*/
|
||||
UINT32 CopyValidSetXiandiHlht(const UINT8* pCurCiAppDataPointer, UINT16 struNum, UINT16 struLength);
|
||||
|
||||
/**
|
||||
* @brief 拷贝获取ATS有效互联互通头
|
||||
* @param[in] UINT8 *pCurCiAppDataPointer:当前数据指针
|
||||
* @param[in] UINT16 struNum:数组长度
|
||||
* @param[in] struLength:结构体长度
|
||||
* @return 无
|
||||
* @note by cgh 20251103
|
||||
*/
|
||||
UINT32 CopyValidGetAtsHlht(UINT8* pCurCiAppDataPointer, UINT16 struNum, UINT16 struLength);
|
||||
|
||||
/**
|
||||
* @brief 拷贝设置ATS有效互联互通头
|
||||
* @param[in] UINT8 *pCurCiAppDataPointer:当前数据指针
|
||||
* @param[in] UINT16 struNum:数组长度
|
||||
* @param[in] struLength:结构体长度
|
||||
* @return 无
|
||||
* @note by cgh 20251103
|
||||
*/
|
||||
UINT32 CopyValidSetAtsiHlht(const UINT8* pCurCiAppDataPointer, UINT16 struNum, UINT16 struLength);
|
||||
|
||||
/*
|
||||
* 功能描述: CI待发送RC应用数据
|
||||
* 参数说明: UINT8 *pCiAppDataPointer, CI应用数据指针
|
||||
* 返回值 : void
|
||||
*/
|
||||
UINT32 GetCiGeneralData(UINT8* pCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述: RC设置CI的应用数据
|
||||
* 参数说明: UINT8 *pCiAppDataPointer, CI应用数据指针
|
||||
* const UINT32 len,数据长度
|
||||
* 返回值 : UINT8,
|
||||
*/
|
||||
UINT8 SetCiGeneralData(const UINT8* pCiAppDataPointer, const UINT32 len);
|
||||
|
||||
/*
|
||||
* 功能描述:二乘拷贝互联互通报文头
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* struLength 结构体长度
|
||||
* HLHTHeadContextStru pstrHLHTHeadCtxs[] 待拷贝的互联互通报文头
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LQ 2025.11.04
|
||||
*/
|
||||
UINT32 CopyValidGetHlhtHeadCtxs(UINT8* pCurCiAppDataPointer, UINT16 struNum, UINT16 struLength, HLHTHeadContextStru pstrHLHTHeadCtxs[]);
|
||||
|
||||
/*
|
||||
* 功能描述:二乘设置互联互通报文头
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* struLength 结构体长度
|
||||
* HLHTHeadContextStru pstrHLHTHeadCtxs[] 待设置的互联互通报文头
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LQ 2025.11.04
|
||||
*/
|
||||
UINT32 CopyValidSetHlhtHeadCtxs(const UINT8* pCurCiAppDataPointer, UINT16 struNum, UINT16 struLength, HLHTHeadContextStru pstrHLHTHeadCtxs[]);
|
||||
/*
|
||||
* 功能描述:二乘拷贝信号机结构体-车车
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* SignalDataStructCC pstSignalDataStruCC[] 待拷贝的结构体
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LYJ 2025.11.07
|
||||
*/
|
||||
UINT32 CopyValidGetSigDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, SignalDataStructCC pstSignalDataStruCC[]);
|
||||
/*
|
||||
* 功能描述:二乘设置信号机结构体-车车
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* SignalDataStructCC pstSignalDataStruCC[] 待设置的结构体
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LYJ 2025.11.07
|
||||
*/
|
||||
UINT32 CopyValidSetSigDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, SignalDataStructCC pstSignalDataStruCC[]);
|
||||
/*
|
||||
* 功能描述:二乘拷贝防淹门结构体-车车
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* FloodGateDataStructCC pstFloodGateDataStruCC[] 待拷贝的结构体
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LYJ 2025.11.07
|
||||
*/
|
||||
UINT32 CopyValidGetFloodGateDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, FloodGateDataStructCC pstFloodGateDataStruCC[]);
|
||||
/*
|
||||
* 功能描述:二乘设置防淹门结构体-车车
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* FloodGateDataStructCC pstFloodGateDataStruCC[] 待拷贝的结构体
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LYJ 2025.11.07
|
||||
*/
|
||||
UINT32 CopyValidSetFloodGateDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, FloodGateDataStructCC pstFloodGateDataStruCC[]);
|
||||
/*
|
||||
* 功能描述:二乘拷贝逻辑区段结构体-车车
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* LogicSectionDataStructCC pstLogSecDataStruCC[] 待拷贝的结构体
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LYJ 2025.11.07
|
||||
*/
|
||||
UINT32 CopyValidGetLogicSecDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, LogicSectionDataStructCC pstLogSecDataStruCC[]);
|
||||
/*
|
||||
* 功能描述:二乘设置逻辑区段结构体-车车
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* LogicSectionDataStructCC pstLogSecDataStruCC[] 待拷贝的结构体
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LYJ 2025.11.07
|
||||
*/
|
||||
UINT32 CopyValidSetLogicSecDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, LogicSectionDataStructCC pstLogSecDataStruCC[]);
|
||||
/*
|
||||
* 功能描述:二乘拷贝进路结构体-车车
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* RouteDataStructCC pstRouteDataStruCC[] 待拷贝的结构体
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LYJ 2025.11.10
|
||||
*/
|
||||
UINT32 CopyValidGetRouteDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, RouteDataStructCC pstRouteDataStruCC[]);
|
||||
/*
|
||||
* 功能描述:二乘拷贝进路结构体-车车
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* RouteDataStructCC pstRouteDataStruCC[] 待拷贝的结构体
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By LYJ 2025.11.10
|
||||
*/
|
||||
UINT32 CopyValidSetRouteDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, RouteDataStructCC pstRouteDataStruCC[]);
|
||||
|
||||
/*
|
||||
* 功能描述:拷贝ZC发送的信号机数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopyGetZcSignalDymDataStru(UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:同步ZC发送的信号机数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopySetZcSignalDymDataStru(const UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:拷贝ZC发送的逻辑区段数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopyGetZcLogSecDymDataStru(UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:同步ZC发送的逻辑区段数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopySetZcLogSecDymDataStru(const UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:拷贝ZC发送的计轴区段数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopyGetZcAxisSecDymDataStru(UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:同步ZC发送的计轴区段数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopySetZcAxisSecDymDataStru(const UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:拷贝ZC发送的物理区段数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopyGetZcPhySecDymDataStru(UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:同步ZC发送的物理区段数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopySetZcPhySecDymDataStru(const UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:拷贝ZC发送的进路数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopyGetZcRouteDymDataStru(UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:同步ZC发送的进路数据
|
||||
* 参数说明:UINT8* pCurCiAppDataPointer 当前数据指针
|
||||
* 返 回 值:拷贝数据的长度
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
UINT32 CopySetZcRouteDymDataStru(const UINT8* pCurCiAppDataPointer);
|
||||
|
||||
/*
|
||||
* 功能描述:二乘设置OC有效数据
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By fan 2025.11.12
|
||||
*/
|
||||
UINT32 CopyValidSetOcOrginData(UINT8* pCurCiAppDataPointer, UINT16 struNum, OcToCiOriginDataStruct OcRecvData[]);
|
||||
|
||||
/*
|
||||
* 功能描述:二乘拷贝OC原始数据有效值
|
||||
* 参数说明:UINT8 *pCurCiAppDataPointer 当前数据指针
|
||||
* UINT16 struNum 数组长度
|
||||
* OcToCiOriginDataStruct OcRecvData[] 待拷贝的结构体
|
||||
* 返 回 值:拷贝的数据长度
|
||||
* Created By fan 2025.11.12
|
||||
*/
|
||||
UINT32 CopyValidGetOcOrginData(UINT8* pCurCiAppDataPointer, UINT16 struNum, OcToCiOriginDataStruct OcRecvData[]);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置报文上下文数据
|
||||
* 参数说明:
|
||||
输入参数
|
||||
const UINT8 *pCurCiAppDataPointer:当前数据指针
|
||||
UINT16 struNum:数组长度,
|
||||
输出参数
|
||||
HLHTHeadContextStru *pDataStru:结构体指针,
|
||||
* 返回值 : 拷贝数据的长度
|
||||
* 注 意 ; 只适用于报文上下文
|
||||
*/
|
||||
UINT32 CopyValidSetHlhtHeadDataStru(const UINT8 *pCurCiAppDataPointer, UINT16 struNum, HLHTHeadContextStru *pDataStru);
|
||||
|
||||
/*
|
||||
* 功能描述: 拷贝报文上下文数据数据
|
||||
输入参数
|
||||
const HLHTHeadContextStru *pDataStru 结构体指针
|
||||
UINT16 struNum:数组长度,
|
||||
输出参数
|
||||
UINT8 *pCurCiAppDataPointer:当前数据指针,
|
||||
* 返回值 : 拷贝数据的长度
|
||||
* 注 意 ; 只适用于报文上下文
|
||||
*/
|
||||
UINT32 CopyValidGetHlhtHeadDataStru(UINT8 *pCurCiAppDataPointer, UINT16 struNum, const HLHTHeadContextStru *pDataStru);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
********************************************************/
|
||||
|
||||
#include "../2oo2/2oo2InterfaceDataManage.h"
|
||||
#include "MSCP_APP_API.h"
|
||||
#include "stdarg.h"
|
||||
#include "protclStruct.h"
|
||||
#include "ParsePackCommon.h"
|
||||
@@ -28,7 +29,9 @@ extern UINT8 processor_mode; /*ƽ̨
|
||||
extern UINT8 FSIOLinkStatusInfo; /*联锁机与FSIO之间连接状态*/
|
||||
extern UINT8 LEULinkStatusInfo; /*联锁与LEU通信状态*/
|
||||
extern UINT8 ZCLinkStatusInfo; /*联锁与ZC通信状态*/
|
||||
extern UINT8 gSheBeiType; /*对外的设备类型*/
|
||||
extern UINT8 gSheBeiID; /*对外的设备ID*/
|
||||
extern UINT8 LocalCiId; /*系统配置文件中定义的联锁ID*/
|
||||
extern QueueStruct logPrintfQue; /*日志存储数据队列*/
|
||||
UINT8 gSheBeiType;
|
||||
#endif
|
||||
@@ -94,52 +97,52 @@ QueueStruct logPrintfQue; /*
|
||||
/*
|
||||
* 功能描述: 平台初始化
|
||||
* 参数说明: void
|
||||
* 返回值 : 0: 失败
|
||||
* 1: 成功
|
||||
* Modified By LQ 2025.08.27
|
||||
* 返回值 : NULL: 获取数据失败
|
||||
* !NULL: 平台ATS到CI接口队列
|
||||
*/
|
||||
UINT8 Initial2oo2Interface(void)
|
||||
{
|
||||
UINT8 rtn = CI_ERROR;
|
||||
UINT8 result = 0U;
|
||||
|
||||
/*定义平台数据队列指针*/
|
||||
|
||||
UINT8 rtn = 0u;
|
||||
UINT16 locTypeId = 0;
|
||||
UINT8 result = 0u;
|
||||
|
||||
/*定义平台数据队列指针*/
|
||||
|
||||
#ifdef PLATFORM_2OO2
|
||||
|
||||
rtn = CI_SUCCESS;
|
||||
|
||||
|
||||
ProtocolToCiDataQueue = &gCbtcData.DataToApp; /*初始化协议到CI数据队列*/
|
||||
CiToProtocolDataQueue = &gCbtcData.OutputDataQueue; /*初始化CI到协议数据队列*/
|
||||
|
||||
FsfbToCiDataQueue = &Fsfb_Info.DataToApp; /*初始化Fsfb到CI数据队列*/
|
||||
CiToFsfbDataQueue = &Fsfb_Info.OutputDataQueue; /*初始化CI到Fsfb数据队列*/
|
||||
|
||||
|
||||
FsfbToCiDataQueue = &Fsfb_Info.DataToApp; /*初始化Fsfb到CI数据队列*/
|
||||
CiToFsfbDataQueue = &Fsfb_Info.OutputDataQueue; /*初始化CI到Fsfb数据队列*/
|
||||
|
||||
CurCycleNum = &CycleNum; /*初始化平台周期*/
|
||||
StartCycleNum = MSCP_GetSysCount(); /*上电周期号*/
|
||||
|
||||
PlatComputerId = &Computer_Id_Local_File;
|
||||
PlatRunMode = &processor_mode;
|
||||
|
||||
PlatComputerId = &Computer_Id_Local_File;
|
||||
PlatRunMode = &processor_mode;
|
||||
|
||||
IoToCiDataQueue = &canQueueRecv; /*初始化IO到CI数据队列*/
|
||||
CiToIoDataQueue = &canQueueSend; /*初始化CI到IO数据队列*/
|
||||
|
||||
|
||||
AtsToCiDataQueue = NULL; /*初始化ATS到CI数据队列*/
|
||||
CiToAtsDataQueue = CiToProtocolDataQueue; /*初始化CI到ATS数据队列*/
|
||||
|
||||
XianDiToCiDataQueue = NULL; /*初始化ATS到CI数据队列*/
|
||||
CiToAtsDataQueue = CiToProtocolDataQueue; /*初始化CI到ATS数据队列*/
|
||||
|
||||
XianDiToCiDataQueue = NULL; /*初始化ATS到CI数据队列*/
|
||||
CiToXianDiDataQueue = CiToProtocolDataQueue; /*初始化CI到ATS数据队列*/
|
||||
|
||||
|
||||
|
||||
ZcToCiDataQueue = NULL; /*初始化ZC到CI数据队列*/
|
||||
CiToZcDataQueue = CiToProtocolDataQueue; /*初始化CI到ZC数据队列*/
|
||||
|
||||
CiToZcDataQueue = CiToProtocolDataQueue; /*初始化CI到ZC数据队列*/
|
||||
|
||||
AxisToCiDataQueue = NULL; /*初始化Axis到CI数据队列*/
|
||||
CiToAxisDataQueue = CiToProtocolDataQueue; /*初始化CI到Axis数据队列*/
|
||||
|
||||
CiRecvFromCiDataQueue = NULL; /*初始化CI接受其他CI数据队列*/
|
||||
CiSendToCiDataQueue = CiToProtocolDataQueue; /*初始化CI发送到其他CI数据队列*/
|
||||
|
||||
VobcToCiDataQueue = NULL; /*初始化Vobc到CI数据队列*/
|
||||
|
||||
VobcToCiDataQueue = NULL; /*初始化Vobc到CI数据队列*/
|
||||
CiToVobcDataQueue = CiToProtocolDataQueue; /*初始化CI到Vobc数据队列*/
|
||||
|
||||
PlatformToCiDataQueue = NULL; /*初始化Psd到CI数据队列*/
|
||||
@@ -147,67 +150,56 @@ UINT8 Initial2oo2Interface(void)
|
||||
|
||||
PscToCiDataQueue = NULL; /*初始化PSC到CI数据队列*/
|
||||
CiToPscDataQueue = CiToProtocolDataQueue; /*初始化CI到PSC数据队列*/
|
||||
|
||||
LEUToCiDataQueue = NULL; /*初始化Leu到CI数据队列*/
|
||||
|
||||
LEUToCiDataQueue = NULL; /*初始化Leu到CI数据队列*/
|
||||
CiToLEUDataQueue = CiToFsfbDataQueue; /*初始化CI到Leu数据队列*/
|
||||
|
||||
CiAndIoComState = &FSIOLinkStatusInfo; /*联锁与IO通信状态*/
|
||||
|
||||
|
||||
|
||||
CiAndIoComState = &FSIOLinkStatusInfo; /*联锁与IO通信状态*/
|
||||
locTypeId = MSCP_GetOutnetID();
|
||||
/*LocalCiId = gSheBeiID;*/ /*联锁设备ID*/
|
||||
PlatSheBeiType = &gSheBeiType; /*联锁设备类型*/
|
||||
LocalCiId = (UINT8)(locTypeId & 0xFFu); /*联锁设备ID*/
|
||||
gSheBeiType = (UINT8)((locTypeId >> 8u) & 0xFFu);
|
||||
|
||||
OcToCiDataQueue = NULL; /*初始化Oc到Ci的数据队列*/
|
||||
CiToOcDataQueue = CiToProtocolDataQueue; /*初始化Ci到Oc的数据队列*/
|
||||
|
||||
if (CI_SUCCESS == rtn)
|
||||
|
||||
if (1U != QueueInitial(&logPrintfQue, 500000U)) /*初始化日志缓存队列*/
|
||||
{
|
||||
if (1U != QueueInitial(&logPrintfQue, 500000U)) /*初始化日志缓存队列*/
|
||||
{
|
||||
debug_infor_printf((const)"canQueueRecv init error \n");
|
||||
rtn = CI_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_infor_printf((const)"canQueueRecv init error \n");
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*联锁与LEU、ZC、CI等的通信状态描述*/
|
||||
if (TransmitRelaDataCurSum < TRANSMIT_OBJECT_SUM_MAX)
|
||||
{
|
||||
for (ii = 0u; ii < TRANSMIT_OBJECT_SUM_MAX; ii++)
|
||||
{
|
||||
PlatComStatusStru[ii].SystemType = &(ComDevStatusInfo[ii].DeviceTypeOther);
|
||||
PlatComStatusStru[ii].SystemNum = &(ComDevStatusInfo[ii].ComDevSum);
|
||||
for (jj = 0u; jj < TRANSMIT_OBJECT_DEVICE_SUM_MAX; jj++)
|
||||
{
|
||||
PlatComStatusStru[ii].SystemIdBuf[jj] = &(ComDevStatusInfo[ii].ComDevIdBuf[jj]);
|
||||
PlatComStatusStru[ii].CommunicationStatusBuf[jj] = &(ComDevStatusInfo[ii].ComDevIdComStatusBuf[jj]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
/*联锁与LEU、ZC、CI等的通信状态描述*/
|
||||
if (TransmitRelaDataCurSum < TRANSMIT_OBJECT_SUM_MAX)
|
||||
{
|
||||
for (ii = 0u; ii < TRANSMIT_OBJECT_SUM_MAX; ii++)
|
||||
{
|
||||
PlatComStatusStru[ii].SystemType = &(ComDevStatusInfo[ii].DeviceTypeOther);
|
||||
PlatComStatusStru[ii].SystemNum = &(ComDevStatusInfo[ii].ComDevSum);
|
||||
for (jj = 0u; jj < TRANSMIT_OBJECT_DEVICE_SUM_MAX; jj++)
|
||||
{
|
||||
PlatComStatusStru[ii].SystemIdBuf[jj] = &(ComDevStatusInfo[ii].ComDevIdBuf[jj]);
|
||||
PlatComStatusStru[ii].CommunicationStatusBuf[jj] = &(ComDevStatusInfo[ii].ComDevIdComStatusBuf[jj]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
result = HLHTCiIdMapInitial();
|
||||
if (CI_SUCCESS == result)
|
||||
{
|
||||
rtn = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_infor_printf((const)"Initial2oo2Interface init error: HLHTCiIdMapInitial Error\n");
|
||||
rtn = CI_ERROR; /*返回失败*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
result = HLHTCiIdMapInitial();
|
||||
if (CI_SUCCESS == result)
|
||||
{
|
||||
rtn = CI_ERROR; /*返回失败*/
|
||||
rtn = 1;
|
||||
}
|
||||
|
||||
return rtn;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -512,7 +504,7 @@ QueueStruct* Get2oo2CiToPscDataQueue(void)
|
||||
UINT32 Get2oo2CurCycleNum(void)
|
||||
{
|
||||
#if (kPLATFORM==kVXWORKS)
|
||||
return MSCP_GetAreaSysCount();
|
||||
return MSCP_GetSysCount();
|
||||
#else
|
||||
return *CurCycleNum;
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "CommonQueue.h"
|
||||
#include "../Transmit/TransmitStateDataManage.h"
|
||||
|
||||
#include "MSCP_APP_API.h"
|
||||
#ifdef PLATFORM_2OO2
|
||||
#include "sfpplatform.h"
|
||||
#include "RsspWl.h"
|
||||
@@ -90,14 +89,12 @@ extern UINT8* CiAndCiComDeviceNum; /*
|
||||
extern UINT8* CiAndCiComIdBuf; /*联锁与联锁通信设备ID*/
|
||||
extern UINT8* CiAndCiComState; /*联锁与联锁通信状态*/
|
||||
extern UINT8* PlatSheBeiType; /*平台对外设备类型*/
|
||||
extern UINT8 gSheBeiType; /*对外的设备类型*/
|
||||
|
||||
/*
|
||||
* 功能描述: 平台初始化
|
||||
* 参数说明: void
|
||||
* 返回值 : 0: 失败
|
||||
* 1: 成功
|
||||
* Modified By LQ 2025.08.27
|
||||
* 返回值 : NULL: 获取数据失败
|
||||
* !NULL: 平台ATS到CI接口队列
|
||||
*/
|
||||
UINT8 Initial2oo2Interface(void);
|
||||
|
||||
|
||||
@@ -125,27 +125,6 @@ UINT8 GetAllAutoReturnRouteBelongCiId(const UINT16 allAutoReturnId)
|
||||
|
||||
return belongCiId;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID全自动折返所属虚拟联锁ID
|
||||
* 参数说明: const UINT16 allAutoReturnId, 全自动折返ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 所属虚拟联锁ID
|
||||
* add by mpt 20260107
|
||||
*/
|
||||
UINT8 GetAllAutoRetRoutBelongVirCiId(const UINT16 allAutoReturnId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 belongVirCiId = CI_ERROR;
|
||||
|
||||
bufIndex = GetAllAutoReturnBufIndex(allAutoReturnId); /*获取全自动折返数组下标*/
|
||||
|
||||
if (bufIndex < ALL_AUTO_RETURN_SUM_MAX)
|
||||
{
|
||||
belongVirCiId = AllAutoReturnConfigDataStru[bufIndex].BelongVirCiId;
|
||||
}
|
||||
|
||||
return belongVirCiId;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID全自动折返包含进路ID数组
|
||||
|
||||
@@ -34,7 +34,6 @@ typedef struct S_AllAutoReturnConfigDataStruct
|
||||
{
|
||||
UINT16 AllAutoReturnId; /*全自动折返ID (配置字段)*/
|
||||
UINT8 BelongCiId; /*所属联锁ID*/
|
||||
UINT8 BelongVirCiId; /*虚拟联锁ID*/
|
||||
UINT8 RouteSum; /*全自动折返包含进路数目 (配置字段)*/
|
||||
UINT16 RouteIdBuf[ALL_AUTO_RETURN_INCLROUTE_SUM_MAX]; /*全自动折返进路ID数组 (配置字段)*/
|
||||
UINT16 RebackRouteIdBuf[ALL_AUTO_RETURN_REBACKROUTE_SUM_MAX]; /*全自动折返包含折出进路数组(配置字段)*/
|
||||
@@ -93,14 +92,6 @@ UINT8 GetAllAutoReturnIncludeRouteSum(const UINT16 allAutoReturnId);
|
||||
* >0: 所属联锁ID
|
||||
*/
|
||||
UINT8 GetAllAutoReturnRouteBelongCiId(const UINT16 allAutoReturnId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID全自动折返所属虚拟联锁ID
|
||||
* 参数说明: const UINT16 allAutoReturnId, 全自动折返ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 所属虚拟联锁ID
|
||||
* add by mpt 20260107
|
||||
*/
|
||||
UINT8 GetAllAutoRetRoutBelongVirCiId(const UINT16 allAutoReturnId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID全自动折返包含进路ID数组
|
||||
|
||||
@@ -41,5 +41,5 @@
|
||||
#define ALL_AUTO_RETURN_DICHU_COMMR ((UINT8)0x06) /*抵触的普通进路已办理*/
|
||||
#define ALL_AUTO_RETURN_HAVE_BLOCK ((UINT8)0x02) /*全自动折返进路存在封锁*/
|
||||
#define ALL_AUTO_RETURN_FLOOD_STATE_ERR ((UINT8)0x03) /*全自动折返进路存在防淹门不满足*/
|
||||
#define ALL_AUTO_RETURN_COUPROUTE_SET ((UINT8)0x07) /*联挂进路已办理*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -119,27 +119,6 @@ UINT8 GetAutoReturnRouteBelongCiId(const UINT16 autoReturnId)
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID自动折返所属虚拟联锁ID
|
||||
* 参数说明: const UINT16 autoReturnId, 自动折返ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 所属联锁ID
|
||||
* add by mpt 20260107
|
||||
*/
|
||||
UINT8 GetAutoReturnRouteBelongVirCiId(const UINT16 autoReturnId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 returnValue = CI_ERROR;
|
||||
|
||||
bufIndex = GetAutoReturnBufIndex(autoReturnId); /*获取自动折返数组下标*/
|
||||
|
||||
if (bufIndex < AUTO_RETURN_SUM_MAX)
|
||||
{
|
||||
returnValue = AutoReturnConfigDataStru[bufIndex].BelongVirCiId;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID自动折返包含进路ID数组
|
||||
|
||||
@@ -34,7 +34,6 @@ typedef struct S_AutoReturnConfigDataStruct
|
||||
{
|
||||
UINT16 AutoReturnId; /*自动折返ID (配置字段)*/
|
||||
UINT8 BelongCiId; /*所属联锁ID*/
|
||||
UINT8 BelongVirCiId; /*所属虚拟联锁ID*/
|
||||
UINT8 RouteSum; /*自动折返包含进路数目 (配置字段)*/
|
||||
UINT16 RouteIdBuf[AUTO_RETURN_INCLROUTE_SUM_MAX]; /*自动折返进路包含进路ID数组 (配置字段)*/
|
||||
UINT8 AutoReturnOpposedReturnIdSum; /*自动折返抵触自动折返进路数目 (配置字段)*/
|
||||
@@ -89,14 +88,6 @@ UINT8 GetAutoReturnIncludeRouteSum(const UINT16 autoReturnId);
|
||||
* >0: 所属联锁ID
|
||||
*/
|
||||
UINT8 GetAutoReturnRouteBelongCiId(const UINT16 autoReturnId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID自动折返所属虚拟联锁ID
|
||||
* 参数说明: const UINT16 autoReturnId, 自动折返ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 所属联锁ID
|
||||
* add by mpt 20260107
|
||||
*/
|
||||
UINT8 GetAutoReturnRouteBelongVirCiId(const UINT16 autoReturnId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID自动折返包含进路ID数组
|
||||
|
||||
@@ -41,5 +41,5 @@
|
||||
#define AUTO_RETURN_DICHU_COMMROUTE ((UINT8)0x06) /*抵触的普通进路已办理*/
|
||||
#define AUTO_RETURN_HAVE_BLOCK ((UINT8)0x02) /*自动折返进路存在封锁*/
|
||||
#define AUTO_RETURN_FLOOD_STATE_ERR ((UINT8)0x03) /*自动折返进路存在防淹门不满足*/
|
||||
#define AUTO_RETURN_COUPROUTE_SET ((UINT8)0x07) /*联挂进路已办理*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -97,26 +97,6 @@ UINT8 GetAutoRouteBelongCiId(const UINT16 autoRouteId)
|
||||
}
|
||||
return belongCiId;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID自动进路所属虚拟联锁ID
|
||||
* 参数说明: const UINT16 autoRouteId, 自动进路ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 所属联锁ID
|
||||
* add by mpt 20260107
|
||||
*/
|
||||
UINT8 GetAutoRouteBelongVirCiId(const UINT16 autoRouteId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 belongVirCiId = CI_ERROR;
|
||||
|
||||
bufIndex = GetAutoRouteBufIndex(autoRouteId); /*获取自动进路数组下标*/
|
||||
|
||||
if (bufIndex < AUTO_ROUTE_SUM_MAX)
|
||||
{
|
||||
belongVirCiId = AutoRouteConfigDataStru[bufIndex].BelongVirCiId;
|
||||
}
|
||||
return belongVirCiId;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -32,7 +32,6 @@ typedef struct S_AutoRouteConfigDataStruct
|
||||
{
|
||||
UINT16 AutoRouteId; /*自动进路ID (配置字段)*/
|
||||
UINT8 BelongCiId; /*所属联锁ID*/
|
||||
UINT8 BelongVirCiId; /*所属虚拟联锁ID*/
|
||||
UINT8 RouteSum; /*自动进路包含进路数目 (配置字段)*/
|
||||
UINT16 RouteIdBuf[AUTO_ROUTE_INCLROUTE_SUM_MAX]; /*自动进路进路ID数组 (配置字段)*/
|
||||
UINT8 AutoRouteOpposedRouteIdSum; /*自动通过进路抵触自动通过进路数目 (配置字段)*/
|
||||
@@ -90,13 +89,6 @@ UINT16 GetAutoRouteBufIndex(const UINT16 AutoRouteId);
|
||||
* >0: 所属联锁ID
|
||||
*/
|
||||
UINT8 GetAutoRouteBelongCiId(const UINT16 autoRouteId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID自动进路所属虚拟联锁ID
|
||||
* 参数说明: const UINT16 autoRouteId, 自动进路ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 所属联锁ID
|
||||
*/
|
||||
UINT8 GetAutoRouteBelongVirCiId(const UINT16 autoRouteId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID自动进路包含进路数目
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#define AUTO_ROUTE_DICHU_COMMROUTE ((UINT8)0x06) /*抵触普通进路已办理*/
|
||||
#define AUTO_ROUTE_HAVE_BLOCK ((UINT8)0x02) /*自动进路存在封锁*/
|
||||
#define AUTO_ROUTE_FLOOD_STATE_ERR ((UINT8)0x03) /*自动进路存在防淹门不满足*/
|
||||
#define AUTO_ROUTE_COUPROUTE_SET ((UINT8)0x07) /*联挂进路已办理*/
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -87,15 +87,14 @@ UINT8 aam_PrepareACStatus(UINT16 ACID)
|
||||
* @param[in] UINT16 ACID 基准计轴ID
|
||||
* @param[in] UINT8 dir 查询方向
|
||||
* @param[out] UINT16 arACID[AC_MAXCNT_IN_SWITCH] 相邻计轴ID
|
||||
* @param[out] UINT8* DirectionPointFlag 是否有方向变化点 DIRECTIONPOINT_FLAG_VALID
|
||||
* @return UINT8_MAX 查询失败
|
||||
0~AC_MAXCNT_IN_SWITCH 查询成功
|
||||
* @note 无
|
||||
*/
|
||||
UINT8 aam_PrepareAdjacentAC(UINT16 ACID, UINT8 dir, INOUT UINT16 arACID[AC_MAXCNT_IN_SWITCH])
|
||||
UINT8 aam_PrepareAdjacentAC(UINT16 ACID, UINT8 dir, INOUT UINT16 arACID[AC_MAXCNT_IN_SWITCH], UINT8* DirectionPointFlag)
|
||||
{
|
||||
UINT8 cDirectionPointFlag = 0U; /*是否具有方向变化点标志*/
|
||||
|
||||
return elm_PrepareAdjacentAC(ACID, dir, arACID, &cDirectionPointFlag);
|
||||
return elm_PrepareAdjacentAC(ACID, dir, arACID, DirectionPointFlag);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -89,11 +89,12 @@ UINT8 aam_PrepareACStatus(UINT16 ACID);
|
||||
* @param[in] UINT16 ACID 基准计轴ID
|
||||
* @param[in] UINT8 dir 查询方向
|
||||
* @param[out] UINT16 arACID[AC_MAXCNT_IN_SWITCH] 相邻计轴ID
|
||||
* @param[out] UINT8* DirectionPointFlag 是否有方向变化点 DIRECTIONPOINT_FLAG_VALID
|
||||
* @return UINT8_MAX 查询失败
|
||||
0~AC_MAXCNT_IN_SWITCH 查询成功
|
||||
* @note 无
|
||||
*/
|
||||
UINT8 aam_PrepareAdjacentAC(UINT16 ACID, UINT8 dir, INOUT UINT16 arACID[AC_MAXCNT_IN_SWITCH]);
|
||||
UINT8 aam_PrepareAdjacentAC(UINT16 ACID, UINT8 dir, INOUT UINT16 arACID[AC_MAXCNT_IN_SWITCH], UINT8* DirectionPointFlag);
|
||||
|
||||
/**
|
||||
* @brief 通过计轴区段ID查找计轴区段位置
|
||||
|
||||
@@ -182,9 +182,12 @@ UINT8 aam_SetAxisAssert(UINT16 acIndex,const AxisAsserStruct* pBuff)
|
||||
*/
|
||||
void aam_ResetAxisAssertByACIndex(UINT16 acIndex)
|
||||
{
|
||||
UINT8 chCanArbTag = 0U;/*保留Arb判断*/
|
||||
if ((0U != acIndex) && (acIndex < AXIS_SECTION_SUM_MAX))
|
||||
{
|
||||
chCanArbTag = gs_AxisAssert[acIndex].redunOverCanArb;
|
||||
(void)CommonMemSet(&gs_AxisAssert[acIndex], (UINT32)sizeof(AxisAsserStruct),0, (UINT32)sizeof(AxisAsserStruct));
|
||||
gs_AxisAssert[acIndex].redunOverCanArb = chCanArbTag;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -319,8 +319,15 @@ static UINT8 aam_AxisErrorJudge(UINT16 acID,UINT16 acIndex)
|
||||
UINT8 cAxisCommBadArbFlag = AAM_COMM_BAD_ARB_NO;
|
||||
UINT8 chPhyTrainCheck = CI_SUCCESS;
|
||||
UINT8 cAcCbtcAttr = 0U; /*计轴区段CBTC区域属性*/
|
||||
UINT8 cAcRelEnvelopeCnt = 0U; /*计轴区段包络数量*/
|
||||
UINT32 dwOccupyStartCyc = 0U;/*计轴占用起始周期号*/
|
||||
UINT32 dwCurCyc = 0U;/*当前周期号*/
|
||||
UINT8 DirectionPointSameSide = DIRECTIONPOINT_FLAG_INVALID;
|
||||
UINT8 DirectionPointConvertSide = DIRECTIONPOINT_FLAG_INVALID;
|
||||
EnvelopeStruct strEnvelopeInfo[SECTION_REL_ENVELOPE_SUM_MAX] = { 0U };
|
||||
|
||||
chSwitch = aam_PrepareArbSwitch();
|
||||
dwCurCyc = Get2oo2CurCycleNum();
|
||||
if (CI_SUCCESS == chSwitch)
|
||||
{
|
||||
;
|
||||
@@ -337,10 +344,10 @@ static UINT8 aam_AxisErrorJudge(UINT16 acID,UINT16 acIndex)
|
||||
else
|
||||
{
|
||||
/** 查询前方计轴*/
|
||||
acSameCnt = aam_PrepareAdjacentAC(acID, EMAP_SAME_DIR, acSameID);
|
||||
acSameCnt = aam_PrepareAdjacentAC(acID, EMAP_SAME_DIR, acSameID, &DirectionPointSameSide);
|
||||
|
||||
/** 查询后方计轴 */
|
||||
acConvertCnt = aam_PrepareAdjacentAC(acID, EMAP_CONVER_DIR, acConvertID);
|
||||
acConvertCnt = aam_PrepareAdjacentAC(acID, EMAP_CONVER_DIR, acConvertID,&DirectionPointConvertSide);
|
||||
|
||||
/** 获取区段由占用变空闲持续时间 */
|
||||
maxRedunTimes = aam_PrepareRedunTimes();
|
||||
@@ -358,14 +365,23 @@ static UINT8 aam_AxisErrorJudge(UINT16 acID,UINT16 acIndex)
|
||||
}
|
||||
else
|
||||
{
|
||||
/** 检查附近区段状态*/
|
||||
chNearbyCheck = aam_CheckNearbyTrainType(acID);
|
||||
/*仅在待判断计轴当周期由空闲变占用时检查*/
|
||||
dwOccupyStartCyc = GetAxisSecOccCyc(acID);
|
||||
if (dwCurCyc == dwOccupyStartCyc)
|
||||
{
|
||||
/** 检查附近区段状态*/
|
||||
chNearbyCheck = aam_CheckNearbyTrainType(acID);
|
||||
}
|
||||
else
|
||||
{
|
||||
chNearbyCheck = CI_SUCCESS;
|
||||
}
|
||||
|
||||
/** 处理前方计轴车辆接近*/
|
||||
sameTrainType = aam_SearchNearbyTrainType(acID, EMAP_SAME_DIR, acSameCnt, acSameID);
|
||||
sameTrainType = aam_CheckNearbyTrainEnvelopeType(acID, EMAP_SAME_DIR, acSameCnt, acSameID, DirectionPointSameSide);
|
||||
|
||||
/** 处理后方计轴车辆接近 */
|
||||
convertTrainType = aam_SearchNearbyTrainType(acID, EMAP_CONVER_DIR, acConvertCnt, acConvertID);
|
||||
convertTrainType = aam_CheckNearbyTrainEnvelopeType(acID, EMAP_CONVER_DIR, acConvertCnt, acConvertID, DirectionPointConvertSide);
|
||||
|
||||
/*检查所属物理区段有无故障车*/
|
||||
chPhyTrainCheck = aam_CheckPhyTrain(acID);
|
||||
@@ -393,36 +409,34 @@ static UINT8 aam_AxisErrorJudge(UINT16 acID,UINT16 acIndex)
|
||||
{
|
||||
; /*继续处理*/
|
||||
}
|
||||
/** 判断相邻范围内计轴坏车最近占用时间检查通过 */
|
||||
if (CI_ERROR == chNearbyCheck)
|
||||
|
||||
/*有 坏车接近 或左右相邻计轴均无车接近 立即清除冗余计时*/
|
||||
if ((AAM_BAD_NEAR == sameTrainType) || (AAM_BAD_NEAR == convertTrainType))
|
||||
{
|
||||
/*有 坏车接近 或左右相邻计轴均无车接近 立即清除冗余计时*/
|
||||
if ((AAM_BAD_NEAR == sameTrainType) || (AAM_BAD_NEAR == convertTrainType))
|
||||
{
|
||||
/** 清除之前的冗余计时位 */
|
||||
funRtn = aam_ClearPassTrainFlag(acIndex);
|
||||
ASSER_ERROR(CI_ERROR == funRtn, errorCode, 0x20000000u);
|
||||
/** 清除之前的冗余计时位 */
|
||||
funRtn = aam_ClearPassTrainFlag(acIndex);
|
||||
ASSER_ERROR(CI_ERROR == funRtn, errorCode, 0x20000000u);
|
||||
|
||||
funRtn = aam_ClearRedunTime(acIndex);
|
||||
ASSER_ERROR(CI_ERROR == funRtn, errorCode, 0x10000000u);
|
||||
funRtn = aam_ClearRedunTime(acIndex);
|
||||
ASSER_ERROR(CI_ERROR == funRtn, errorCode, 0x10000000u);
|
||||
|
||||
aam_SetAxisStatus(acIndex, AAM_STATUS_OCC);
|
||||
AAM_LOG(AAM_LOG_FATAL, "info:AC%d not match ARB condition, NearByTrainCheck:%d.\n", acID, chNearbyCheck);
|
||||
}
|
||||
else
|
||||
{
|
||||
/** 冗余计时位加1*/
|
||||
aam_AddRedunTime(acIndex, maxRedunTimes);
|
||||
aam_SetAxisStatus(acIndex, AAM_STATUS_OCC);
|
||||
AAM_LOG(AAM_LOG_FATAL, "info:AC%d not match ARB condition, NearByTrainCheck:%d.\n", acID, chNearbyCheck);
|
||||
}
|
||||
else if (CI_ERROR == chNearbyCheck)
|
||||
{
|
||||
/** 范围内坏车失败 UT冗余*/
|
||||
aam_AddRedunTime(acIndex, maxRedunTimes);
|
||||
|
||||
/*置标志位*/
|
||||
aam_SetAxisRedunCanArbFlag(acIndex, REDUN_OVER_ARB_NO);
|
||||
}
|
||||
/*置标志位*/
|
||||
aam_SetAxisRedunCanArbFlag(acIndex, REDUN_OVER_ARB_NO);
|
||||
}
|
||||
else
|
||||
{
|
||||
/** 冗余计时位加1*/
|
||||
aam_AddRedunTime(acIndex, maxRedunTimes);
|
||||
}
|
||||
|
||||
/** 计轴故障的判断 */
|
||||
tmpRedunTime = aam_GetRedunTime(acIndex);
|
||||
tmppassTrainType = aam_GetPassTrainFlag(acIndex);
|
||||
@@ -434,21 +448,14 @@ static UINT8 aam_AxisErrorJudge(UINT16 acID,UINT16 acIndex)
|
||||
{
|
||||
if (AAM_STATUS_ARB == tmpACStatus)
|
||||
{
|
||||
/** 计轴已经ARB 检查防护范围 防护失败不应维持ARB*/
|
||||
if (CI_ERROR == chNearbyCheck)
|
||||
/** 计轴已经ARB 不检查防护范围*/
|
||||
cAcRelEnvelopeCnt = elm_GetEnvelopeInAC(acID, strEnvelopeInfo);
|
||||
if ((0U < cAcRelEnvelopeCnt) && (SECTION_REL_ENVELOPE_SUM_MAX > cAcRelEnvelopeCnt))
|
||||
{
|
||||
/** 清除之前的冗余计时位 */
|
||||
funRtn = aam_ClearPassTrainFlag(acIndex);
|
||||
ASSER_ERROR(CI_ERROR == funRtn, errorCode, 0x20000000u);
|
||||
|
||||
funRtn = aam_ClearRedunTime(acIndex);
|
||||
ASSER_ERROR(CI_ERROR == funRtn, errorCode, 0x10000000u);
|
||||
|
||||
aam_SetAxisStatus(acIndex, AAM_STATUS_OCC);
|
||||
AAM_LOG(AAM_LOG_FATAL, "info:AC%d keep ARB Fail, NearByTrainCheck:%d.\n", acID, chNearbyCheck);
|
||||
/*ARB区段存在包络,不进行ARB连续占用判断*/
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
/*ARB计轴区段同向相邻计轴区段连续占用*/
|
||||
funRtn = aam_ArbContinuousOccCheck(acID, acSameCnt, acSameID);
|
||||
|
||||
@@ -1558,7 +1565,7 @@ UINT8 aam_CheckNearbyTrainType(UINT16 ACID)
|
||||
UINT8 retVal = CI_ERROR;
|
||||
UINT8 phyAcNum = 0u;
|
||||
UINT16* pACBuff = NULL;
|
||||
UINT16 wBasePhyid = 0U;
|
||||
UINT16 wBasePhyid = 0U;/*基准物理区段*/
|
||||
UINT8 jj = 0U;
|
||||
UINT8 ii = 0U;
|
||||
UINT8 chKeepcheck = CI_SUCCESS; /*继续检查标志*/
|
||||
@@ -1566,11 +1573,13 @@ UINT8 aam_CheckNearbyTrainType(UINT16 ACID)
|
||||
UINT32 cyCheckUtCyc = 0U; /*检查周期数*/
|
||||
UINT32 dwRecentUtCyc = 0U; /*最近坏车占用周期号*/
|
||||
UINT16 wCheckPhySec = 0U; /*待检查区段*/
|
||||
UINT16* wAdjacentPhyBuf = NULL; /*直接相连区段数组*/
|
||||
UINT16* pAdjacentPhyBuf = NULL; /*直接相连区段数组*/
|
||||
UINT8 chAdjacentPhyNum = 0U; /*直接相连区段数量*/
|
||||
UINT8 chNearSecNum = 0U; /*间接相邻数量*/
|
||||
UINT16* dwNearSecBuf = NULL; /*间接相连区段数组*/
|
||||
|
||||
UINT16* pNearSecBuf = NULL; /*间接相连区段数组*/
|
||||
UINT8 chSwitchPosCheck = CI_ERROR;/*当前道岔检查结果*/
|
||||
UINT8 chTransitAcNum = 0U; /*跳转计轴数量*/
|
||||
UINT16* pTransitAcBuf = NULL; /*跳转计轴数组*/
|
||||
cyCheckUtCyc = GetArbProtectCheckTime();
|
||||
wBasePhyid = aam_PrepareACBelongPhyid(ACID);
|
||||
|
||||
@@ -1607,12 +1616,79 @@ UINT8 aam_CheckNearbyTrainType(UINT16 ACID)
|
||||
{
|
||||
/*Step2 :当前物理区段直接相邻物理区段所有计轴无坏车*/
|
||||
chAdjacentPhyNum = GetAdjacentPhySecNum(wBasePhyid);
|
||||
wAdjacentPhyBuf = GetAdjacentPhySecBuf(wBasePhyid);
|
||||
if ((0U != chAdjacentPhyNum) && (NULL != wAdjacentPhyBuf))
|
||||
pAdjacentPhyBuf = GetAdjacentPhySecBuf(wBasePhyid);
|
||||
if ((0U != chAdjacentPhyNum) && (NULL != pAdjacentPhyBuf))
|
||||
{
|
||||
for (ii = 0; ii < chAdjacentPhyNum; ii++)
|
||||
{
|
||||
wCheckPhySec = wAdjacentPhyBuf[ii];
|
||||
wCheckPhySec = pAdjacentPhyBuf[ii];
|
||||
chSwitchPosCheck = GetAdjacentPhySecAcCheck(wBasePhyid, wCheckPhySec);
|
||||
if (CI_SUCCESS == chSwitchPosCheck)
|
||||
{
|
||||
/* 邻近区段有坏车曾占用再取消,认为坏车接近*/
|
||||
phyAcNum = GetPAxisSectionSum(wCheckPhySec);
|
||||
pACBuff = GetPAxisSectionIdBuf(wCheckPhySec);
|
||||
/*遍历计轴上最近坏车占用周期*/
|
||||
if ((0U != phyAcNum) && (NULL != pACBuff))
|
||||
{
|
||||
for (jj = 0; jj < phyAcNum; jj++)
|
||||
{
|
||||
dwRecentUtCyc = GetAxisRecentUtOccupyCyc(pACBuff[jj]);
|
||||
chTimeFlag = SystemOverTimeCheck(dwRecentUtCyc, cyCheckUtCyc);
|
||||
if (CI_TIME_IN == chTimeFlag)
|
||||
{
|
||||
/*还在时间范围内*/
|
||||
chKeepcheck = CI_ERROR;
|
||||
retVal = CI_ERROR;
|
||||
debug_infor_printf((const)"ACid: %d , ArbNearSecCheck fail step2, PhySec = %d\n", ACID, wCheckPhySec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chKeepcheck = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*不处理*/
|
||||
debug_infor_printf((const)"ACid: %d ,AdjacentSec Skip PhySec = %d\n", ACID, wCheckPhySec);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chKeepcheck = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == chKeepcheck)
|
||||
{
|
||||
/*Step3 :当前物理区段间接相邻物理区段所有计轴无坏车*/
|
||||
chNearSecNum = GetNearPhySecNum(wBasePhyid);
|
||||
pNearSecBuf = GetIndirectNearPhySecBuf(wBasePhyid);
|
||||
for (ii = 0; ii < chNearSecNum; ii++)
|
||||
{
|
||||
wCheckPhySec = pNearSecBuf[ii];
|
||||
chTransitAcNum = GetPhySecNearSecTransitAcNum(wBasePhyid, wCheckPhySec);
|
||||
pTransitAcBuf = GetPhySecNearSecTransitAcBuf(wBasePhyid, wCheckPhySec);
|
||||
chSwitchPosCheck = CI_ERROR;
|
||||
if (NULL != pTransitAcBuf)
|
||||
{
|
||||
for (jj = 0; jj < chTransitAcNum; jj++)
|
||||
{
|
||||
chSwitchPosCheck = GetTransitPhySecAcCheck(wBasePhyid, pTransitAcBuf[jj]);
|
||||
if (CI_SUCCESS == chSwitchPosCheck)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == chSwitchPosCheck)
|
||||
{
|
||||
/* 邻近可达区段有坏车曾占用再取消,认为坏车接近*/
|
||||
phyAcNum = GetPAxisSectionSum(wCheckPhySec);
|
||||
pACBuff = GetPAxisSectionIdBuf(wCheckPhySec);
|
||||
/*遍历计轴上最近坏车占用周期*/
|
||||
@@ -1627,7 +1703,7 @@ UINT8 aam_CheckNearbyTrainType(UINT16 ACID)
|
||||
/*还在时间范围内 认为坏车接近*/
|
||||
chKeepcheck = CI_ERROR;
|
||||
retVal = CI_ERROR;
|
||||
debug_infor_printf((const)"ACid: %d , ArbNearSecCheck fail step2, PhySec = %d\n", ACID, wCheckPhySec);
|
||||
debug_infor_printf((const)"ACid: %d , ArbNearSecCheck fail step3, PhySec = %d\n", ACID, wCheckPhySec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1637,43 +1713,14 @@ UINT8 aam_CheckNearbyTrainType(UINT16 ACID)
|
||||
chKeepcheck = CI_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chKeepcheck = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == chKeepcheck)
|
||||
{
|
||||
/*Step3 :当前物理区段间接相邻物理区段所有计轴无坏车*/
|
||||
chNearSecNum = GetNearPhySecNum(wBasePhyid);
|
||||
dwNearSecBuf = GetIndirectNearPhySecBuf(wBasePhyid);
|
||||
for (ii = 0; ii < chNearSecNum; ii++)
|
||||
{
|
||||
wCheckPhySec = dwNearSecBuf[ii];
|
||||
phyAcNum = GetPAxisSectionSum(wCheckPhySec);
|
||||
pACBuff = GetPAxisSectionIdBuf(wCheckPhySec);
|
||||
/*遍历计轴上最近坏车占用周期*/
|
||||
if ((0U != phyAcNum) && (NULL != pACBuff))
|
||||
{
|
||||
for (jj = 0; jj < phyAcNum; jj++)
|
||||
{
|
||||
dwRecentUtCyc = GetAxisRecentUtOccupyCyc(pACBuff[jj]);
|
||||
chTimeFlag = SystemOverTimeCheck(dwRecentUtCyc, cyCheckUtCyc);
|
||||
if (CI_TIME_IN == chTimeFlag)
|
||||
{
|
||||
/*还在时间范围内 认为坏车接近*/
|
||||
chKeepcheck = CI_ERROR;
|
||||
retVal = CI_ERROR;
|
||||
debug_infor_printf((const)"ACid: %d , ArbNearSecCheck fail step3, PhySec = %d\n", ACID, wCheckPhySec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chKeepcheck = CI_ERROR;
|
||||
;/*不可达状态 坏车占用不影响*/
|
||||
debug_infor_printf((const)"ACid: %d ,NearSec Skip PhySec = %d\n", ACID, wCheckPhySec);
|
||||
}
|
||||
if (CI_SUCCESS != chKeepcheck)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2114,12 +2161,14 @@ UINT8 aam_ArbContinuousOccCheck(UINT16 wAcId, UINT8 cNearAcNum, UINT16 pNearAcId
|
||||
UINT32 dwCurAxleOccStartCycNum = 0U; /*本计轴区段占用起始周期*/
|
||||
UINT8 ii = 0U;
|
||||
UINT16 wNearRelPhySecId = 0U; /*相邻计轴区段所属物理区段ID*/
|
||||
UINT8 cAcRelEnvelopeCnt = 0U;
|
||||
UINT8 cAcRelEnvelopeCnt = 0U; /*计轴区段包络数量*/
|
||||
EnvelopeStruct strEnvelopeInfo[SECTION_REL_ENVELOPE_SUM_MAX] = { 0U };
|
||||
UINT32 dwNearAxleOccStartCycNum = 0U; /*相邻计轴区段占用起始周期*/
|
||||
UINT8 cRcId = 0U;
|
||||
UINT8 cFunRtn = 0U;
|
||||
UINT16 wNearAcIndex = 0U;
|
||||
UINT8 cPhySecPreOccState = 0U; /*区段上周期占用状态*/
|
||||
UINT8 cAxisSecTXSafeLocFlag = 0U; /*计轴区段列车安全位置覆盖标志*/
|
||||
|
||||
wBufIndex = GetAxisSecConfigBufIndex(wAcId); /*获取区段数组下标*/
|
||||
|
||||
@@ -2136,12 +2185,18 @@ UINT8 aam_ArbContinuousOccCheck(UINT16 wAcId, UINT8 cNearAcNum, UINT16 pNearAcId
|
||||
wNearRelPhySecId = GetAxisSecRelativePhySecId(pNearAcId[ii]);
|
||||
if (0U != wNearRelPhySecId)
|
||||
{
|
||||
cAcRelEnvelopeCnt = elm_GetEnvelopeInAC(pNearAcId[ii], strEnvelopeInfo);
|
||||
dwNearAxleOccStartCycNum = GetSecColOccupyStartCycNum(wNearRelPhySecId);
|
||||
cAcRelEnvelopeCnt = elm_GetEnvelopeInAC(pNearAcId[ii], strEnvelopeInfo); /*获取相邻计轴区段的包络信息*/
|
||||
dwNearAxleOccStartCycNum = GetSecColOccupyStartCycNum(wNearRelPhySecId); /*获取相邻计轴区段采集占用起始周期*/
|
||||
cPhySecPreOccState = GetPhySecPreOccupyState(wNearRelPhySecId); /*获取相邻计轴区段上周期采集占用状态*/
|
||||
cAxisSecTXSafeLocFlag =GetAxisTXSafeLocFlag(pNearAcId[ii]); /*获取相邻计轴区段列车安全位置覆盖标志*/
|
||||
|
||||
if (((0U == cAcRelEnvelopeCnt) || (SECTION_REL_ENVELOPE_SUM_MAX == cAcRelEnvelopeCnt))
|
||||
&& ((dwCurAxleOccStartCycNum + dwCiAndAxleTransBadEnsureCnt) < dwNearAxleOccStartCycNum))
|
||||
&& ((dwCurAxleOccStartCycNum + dwCiAndAxleTransBadEnsureCnt) < dwNearAxleOccStartCycNum)
|
||||
&& (SECTION_OCCUPY_NO == cPhySecPreOccState)
|
||||
&& (AXIS_SECTION_SAFELOC_YES != cAxisSecTXSafeLocFlag))
|
||||
{
|
||||
cRetVal = CI_ERROR; /*相邻计轴区段无包络且占用起始时间超过了“与计轴通信中断超时判断时间”*/
|
||||
/*相邻计轴区段无包络&&占用起始时间超过了“与计轴通信中断超时判断时间”&&相邻计轴区段上周期采集为空闲&&相邻计轴区段无列车安全位置覆盖*/
|
||||
cRetVal = CI_ERROR;
|
||||
|
||||
cFunRtn = aam_PrepareACIsSelf(pNearAcId[ii], &cRcId); /*判断相邻区段是否为本控区区段*/
|
||||
|
||||
@@ -2161,7 +2216,7 @@ UINT8 aam_ArbContinuousOccCheck(UINT16 wAcId, UINT8 cNearAcNum, UINT16 pNearAcId
|
||||
}
|
||||
else
|
||||
{
|
||||
/*相邻计轴区段占用起始周期未超过“与计轴通信中断超时判断时间”,继续检查*/
|
||||
/*继续检查*/
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2181,4 +2236,210 @@ UINT8 aam_ArbContinuousOccCheck(UINT16 wAcId, UINT8 cNearAcNum, UINT16 pNearAcId
|
||||
}
|
||||
|
||||
return cRetVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能:查询计轴区段邻近范围内包络类型
|
||||
* @param[in] UINT16 ACID 基准计轴ID
|
||||
* @param[in] UINT8 dir 查询方向
|
||||
* @param[in] UINT16 arACID[AC_MAXCNT_IN_SWITCH] 相邻计轴ID
|
||||
* @param[in] UINT8 DirectionPointFlag 是否有方向变化点 DIRECTIONPOINT_FLAG_VALID
|
||||
* 返回值:
|
||||
AAM_NO_TRAIN_NEAR 无车接近
|
||||
AAM_BAD_NEAR 坏车
|
||||
AAM_GOOD_OCC 好车占用
|
||||
AAM_SLEEP_OCC 休眠车
|
||||
AAM_GOOD_FAR_AWAY 好车远离
|
||||
AAM_GOOD_NEAR 好车接近
|
||||
* Create: fan 2026/04/11
|
||||
*/
|
||||
UINT8 aam_CheckNearbyTrainEnvelopeType(UINT16 baseACID, UINT8 Dir, UINT8 acCnt, UINT16 acID[AC_MAXCNT_IN_SWITCH], UINT8 DirectionPointFlag)
|
||||
{
|
||||
UINT8 chAdjacentTrainType = AAM_BAD_NEAR;
|
||||
UINT8 chFirstStepTrainType = AAM_BAD_NEAR;
|
||||
UINT8 chSndStepTrainType = AAM_BAD_NEAR;
|
||||
UINT8 ii = 0U;
|
||||
UINT8 jj = 0U;
|
||||
UINT8 kk = 0U;
|
||||
UINT8 chRetTrainType = AAM_BAD_NEAR;
|
||||
UINT16 wTempAcList[AC_MAXCNT_IN_SWITCH] = { 0U };
|
||||
UINT8 chFirstStepAcCnt = 0U;
|
||||
UINT16 wFirstStepID[AC_MAXCNT_IN_SWITCH] = { 0U };
|
||||
UINT8 chSndStepAcCnt = 0U;
|
||||
UINT16 wSndStepID[AC_MAXCNT_IN_SWITCH] = { 0U };
|
||||
UINT32 dwArbProtectLen = 0U;/*ARB防护距离*/
|
||||
UINT16 wArbProtectDis = GetSystemParaValue(ARB_CHECK_ALXE_SEC_LEN);
|
||||
UINT32 dwCheckAcLen = 0U; /*找到计轴长度*/
|
||||
UINT32 dwTempAcLen = 0U; /*计轴长度*/
|
||||
UINT8 chChangePoitFlag = DIRECTIONPOINT_FLAG_INVALID;
|
||||
UINT8 chTemp = 0U;
|
||||
UINT8 chChangePoitCnt = 0U;
|
||||
UINT8 chFirstDir = Dir;
|
||||
UINT8 chSndDir = Dir;
|
||||
UINT8 chLocalId = 0U;/*本联锁ID*/
|
||||
UINT8 chAcBelongCi = 0U;
|
||||
UINT8 chRelEnvelopeCnt = 0u;
|
||||
UINT16 envelopeIds[SECTION_REL_ENVELOPE_SUM_MAX] = { 0u };
|
||||
EnvelopeStruct* pTempEnvelope = NULL;/*包络信息*/
|
||||
UINT8 chUseNvram = 0U;
|
||||
dwArbProtectLen = (UINT32)(wArbProtectDis * 100U);
|
||||
chLocalId = GetSystemParaLocalCiId();
|
||||
if (0U == acCnt)
|
||||
{
|
||||
/*失败返回MAX 尽头线为0*/
|
||||
chRetTrainType = AAM_NO_TRAIN_NEAR;
|
||||
}
|
||||
else if(AC_MAXCNT_IN_SWITCH >= acCnt)
|
||||
{
|
||||
for (ii = 0U; ii < acCnt; ii++)
|
||||
{
|
||||
wTempAcList[0] = acID[ii];
|
||||
dwCheckAcLen = GetAxisSecTotalLen(acID[ii]);
|
||||
chAdjacentTrainType = aam_SearchNearbyTrainType(baseACID, Dir, 1U, wTempAcList);
|
||||
chAcBelongCi = GetAxisSectionBelongCiId(acID[ii]);
|
||||
|
||||
if (chAcBelongCi == chLocalId)
|
||||
{
|
||||
/*额外检查属于本联锁的直接相邻区段 无NVRAM车 */
|
||||
chRelEnvelopeCnt = elm_GetEnvelopeIDsInAC(acID[ii], envelopeIds);
|
||||
if (0u != chRelEnvelopeCnt)
|
||||
{
|
||||
for (jj = 0u; jj < chRelEnvelopeCnt; jj++)
|
||||
{
|
||||
pTempEnvelope = elm_GetEnvelopeInfoByID(envelopeIds[jj]);
|
||||
for (kk = 0u; kk < pTempEnvelope->trianCnt; kk++)
|
||||
{
|
||||
chUseNvram = GetTrainNvramPosFlag(pTempEnvelope->trainID[kk]);
|
||||
if (TRAIN_NVRAM_POS_FLAG_NO != chUseNvram)
|
||||
{
|
||||
chAdjacentTrainType = AAM_BAD_NEAR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/** 根据列车包络数量进行处理 */
|
||||
if ((0U == ii) || (AAM_BAD_NEAR == chAdjacentTrainType))
|
||||
{
|
||||
chRetTrainType = chAdjacentTrainType;/*记录第一个结果 或更新为最坏结果*/
|
||||
}
|
||||
if ((AAM_NO_TRAIN_NEAR == chAdjacentTrainType) && (dwArbProtectLen > dwCheckAcLen))
|
||||
{
|
||||
/*路径无车 继续查找*/
|
||||
chFirstDir = TransDirectionPointDir(DirectionPointFlag, Dir, &chChangePoitCnt);
|
||||
chFirstStepAcCnt = aam_PrepareAdjacentAC(acID[ii], chFirstDir, wFirstStepID, &chChangePoitFlag);
|
||||
if (UINT8_MAX != chFirstStepAcCnt)
|
||||
{
|
||||
for (jj = 0U; jj < chFirstStepAcCnt; jj++)
|
||||
{
|
||||
wTempAcList[0] = wFirstStepID[jj];
|
||||
|
||||
chFirstStepTrainType = aam_SearchNearbyTrainType(acID[ii], chFirstDir, 1U, wTempAcList);
|
||||
dwTempAcLen = GetAxisSecTotalLen(wFirstStepID[jj]);
|
||||
if ((AAM_NO_TRAIN_NEAR == chFirstStepTrainType) && (dwArbProtectLen >(dwCheckAcLen + dwTempAcLen)))
|
||||
{
|
||||
/*路径无车 继续查找*/
|
||||
chSndDir = TransDirectionPointDir(chChangePoitFlag, chFirstDir, &chChangePoitCnt);
|
||||
chSndStepAcCnt = aam_PrepareAdjacentAC(wFirstStepID[jj], chSndDir, wSndStepID, &chTemp);
|
||||
if (UINT8_MAX != chSndStepAcCnt)
|
||||
{
|
||||
for (kk = 0U; kk < chSndStepAcCnt; kk++)
|
||||
{
|
||||
wTempAcList[0] = wSndStepID[kk];
|
||||
chSndStepTrainType = aam_SearchNearbyTrainType(wFirstStepID[jj], chSndDir, 1U, wTempAcList);
|
||||
/*更新最坏结果*/
|
||||
chFirstStepTrainType = GetWorseNearbyTrainType(chFirstStepTrainType, chSndStepTrainType);
|
||||
if (AAM_BAD_NEAR == chFirstStepTrainType)
|
||||
{
|
||||
/*可以停止遍历其他计轴*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*异常防护*/
|
||||
chFirstStepTrainType = AAM_BAD_NEAR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*停止当前路线*/
|
||||
}
|
||||
/*更新最坏结果*/
|
||||
chAdjacentTrainType = GetWorseNearbyTrainType(chAdjacentTrainType, chFirstStepTrainType);
|
||||
if (AAM_BAD_NEAR == chAdjacentTrainType)
|
||||
{
|
||||
/*可以停止遍历其他计轴*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*异常防护*/
|
||||
chAdjacentTrainType = AAM_BAD_NEAR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*停止当前路线*/
|
||||
}
|
||||
/*更新最坏结果*/
|
||||
chRetTrainType = GetWorseNearbyTrainType(chRetTrainType, chAdjacentTrainType);
|
||||
if (AAM_BAD_NEAR == chRetTrainType)
|
||||
{
|
||||
/*可以停止遍历其他计轴*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*返回坏车*/
|
||||
}
|
||||
return chRetTrainType;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 功能:更新路线上更有风险的结果
|
||||
* 输入参数:UINT8 chPreType当前记录类型 UINT8 chAfterType比较的更新列车类型
|
||||
* 返回值:
|
||||
AAM_NO_TRAIN_NEAR 无车接近
|
||||
AAM_BAD_NEAR 坏车
|
||||
AAM_GOOD_OCC 好车占用
|
||||
AAM_SLEEP_OCC 休眠车
|
||||
AAM_GOOD_FAR_AWAY 好车远离
|
||||
AAM_GOOD_NEAR 好车接近
|
||||
* Create: fan 2026/04/11
|
||||
*/
|
||||
UINT8 GetWorseNearbyTrainType(UINT8 chPreType, UINT8 chAfterType)
|
||||
{
|
||||
/*定义结果严重程度: 坏车接近>休眠车>好车占用>其他>无车*/
|
||||
UINT8 chRetval = AAM_BAD_NEAR;
|
||||
if ((AAM_BAD_NEAR == chPreType)||(AAM_BAD_NEAR == chAfterType))
|
||||
{
|
||||
chRetval = AAM_BAD_NEAR;
|
||||
}
|
||||
else if ((AAM_SLEEP_OCC == chPreType) || (AAM_SLEEP_OCC == chAfterType))
|
||||
{
|
||||
chRetval = AAM_SLEEP_OCC;
|
||||
}
|
||||
else if ((AAM_GOOD_OCC == chPreType) || (AAM_GOOD_OCC == chAfterType))
|
||||
{
|
||||
chRetval = AAM_GOOD_OCC;
|
||||
}
|
||||
else if(AAM_NO_TRAIN_NEAR == chPreType)
|
||||
{
|
||||
chRetval = chAfterType;
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetval = chPreType;
|
||||
}
|
||||
return chRetval;
|
||||
}
|
||||
@@ -233,4 +233,36 @@ UINT8 aam_CheckPhyTrain(UINT16 ACID);
|
||||
*/
|
||||
UINT8 aam_ArbContinuousOccCheck(UINT16 wAcId, UINT8 cNearAcNum, UINT16 pNearAcId[AC_MAXCNT_IN_SWITCH]);
|
||||
|
||||
|
||||
/**
|
||||
* 功能:查询计轴区段邻近范围内包络类型
|
||||
* 输入参数:UINT16 ACID 计轴区段
|
||||
* @param[in] UINT16 ACID 基准计轴ID
|
||||
* @param[in] UINT8 dir 查询方向
|
||||
* @param[in] UINT16 arACID[AC_MAXCNT_IN_SWITCH] 相邻计轴ID
|
||||
* @param[in] UINT8 DirectionPointFlag 是否有方向变化点 DIRECTIONPOINT_FLAG_VALID
|
||||
AAM_NO_TRAIN_NEAR 无车接近
|
||||
AAM_BAD_NEAR 坏车
|
||||
AAM_GOOD_OCC 好车占用
|
||||
AAM_SLEEP_OCC 休眠车
|
||||
AAM_GOOD_FAR_AWAY 好车远离
|
||||
AAM_GOOD_NEAR 好车接近
|
||||
* Create: fan 2026/04/11
|
||||
*/
|
||||
UINT8 aam_CheckNearbyTrainEnvelopeType(UINT16 baseACID, UINT8 Dir, UINT8 acCnt, UINT16 acID[AC_MAXCNT_IN_SWITCH], UINT8 DirectionPointFlag);
|
||||
|
||||
|
||||
/**
|
||||
* 功能:更新路线上更有风险的列车类型结果
|
||||
* 输入参数:UINT8 chPreType当前记录类型 UINT8 chAfterType比较的更新列车类型
|
||||
* 返回值:
|
||||
AAM_NO_TRAIN_NEAR 无车接近
|
||||
AAM_BAD_NEAR 坏车
|
||||
AAM_GOOD_OCC 好车占用
|
||||
AAM_SLEEP_OCC 休眠车
|
||||
AAM_GOOD_FAR_AWAY 好车远离
|
||||
AAM_GOOD_NEAR 好车接近
|
||||
* Create: fan 2026/04/11
|
||||
*/
|
||||
UINT8 GetWorseNearbyTrainType(UINT8 chPreType, UINT8 chAfterType);
|
||||
#endif /*AXIS_ASSERT_MANAGE_API_H_*/
|
||||
|
||||
@@ -667,65 +667,205 @@ void SetCfpOtherOcEData(const UINT16 wCfpId, const UINT8 chEnvelopeIndex, const
|
||||
* @param wCfpId 分界点ID
|
||||
* @return 无
|
||||
* @note 内部优化 20220419 wqm 编码规范:函数dsuCheckSameLoc返回值需要变量承接
|
||||
* @note 内部优化 20260413 相邻联锁发送按照分界点计轴向内方计算一个ARB防护距离
|
||||
*/
|
||||
void SetCfpLocalOcEData(const UINT16 wCfpId)
|
||||
{
|
||||
UINT16 wIndex = 0u;
|
||||
UINT8 chEnvelopeNum = 0u;
|
||||
UINT16 wLinkId = 0u;
|
||||
UINT16 wAcId = 0u;
|
||||
UINT16 tmpACCnt = 0U;
|
||||
UINT16 tmpAcIdBuf[AC_MAXCNT_IN_SWITCH] = { 0U };
|
||||
UINT8 chEnvelopeIndex = 0u;
|
||||
EnvelopeStruct szTmpEnvelope[SECTION_REL_ENVELOPE_SUM_MAX] = { 0u };
|
||||
UINT8 chLocalId = 0u;
|
||||
UINT16 wLinkTioc = 0u;
|
||||
|
||||
UINT16 wArbProtectDis = GetSystemParaValue(ARB_CHECK_ALXE_SEC_LEN);
|
||||
UINT32 dwCheckAcLen = 0U; /*找到计轴长度*/
|
||||
UINT32 dwFirstStepAcLen = 0U; /*找到计轴长度*/
|
||||
UINT32 dwArbProtectLen = 0U;/*ARB防护距离*/
|
||||
UINT8 chLocalCiType = 0U;
|
||||
UINT8 chDir = 0U; /*分界点计轴方向*/
|
||||
UINT8 chFirstStepAcCnt = 0U;
|
||||
UINT16 wFirstStepID[AC_MAXCNT_IN_SWITCH] = { 0U };
|
||||
UINT8 chSndStepAcCnt = 0U;
|
||||
UINT16 wSndStepID[AC_MAXCNT_IN_SWITCH] = { 0U };
|
||||
UINT8 chChangePoint = 0U;
|
||||
UINT8 ii = 0U;
|
||||
UINT8 jj = 0U;
|
||||
UINT8 chCfpAcIndex = 0U;
|
||||
UINT8 chStepCheck = CI_ERROR;
|
||||
UINT8 chNextDir = 0U;
|
||||
UINT8 chPointNum = 0u;
|
||||
UINT8 chAcBelongTioc = 0U;
|
||||
UINT8 chFail = CI_SUCCESS;
|
||||
wIndex = GetCfpBufIndex(wCfpId);
|
||||
chLocalId = GetSystemParaLocalCiId();
|
||||
dwArbProtectLen = (UINT32)(wArbProtectDis * 100U);
|
||||
chLocalCiType = GetLocalCiType();
|
||||
/* 输入合法 */
|
||||
if (CUTOFF_POINT_SUM_MAX > wIndex)
|
||||
{
|
||||
wLinkId = GetCfpInFirstLink(wCfpId);
|
||||
wAcId = GetLinkBelongAcId(wLinkId);
|
||||
chEnvelopeNum = elm_GetEnvelopeInAC(wAcId, szTmpEnvelope);
|
||||
if (SECTION_REL_ENVELOPE_SUM_MAX == chEnvelopeNum)
|
||||
/*清除脏数据*/
|
||||
g_CutoffPointDataBuf[wIndex].chLocalTiocEnvelopeNum = 0U;
|
||||
(void)CommonMemSet(&g_CutoffPointDataBuf[wIndex].szLocalEnvelope, (UINT32)((OTHER_RC_SEND_ENVELOPE_SUM_MAX)*sizeof(CfpEnvelopeStruct)), 0U, (UINT32)((OTHER_RC_SEND_ENVELOPE_SUM_MAX)*sizeof(CfpEnvelopeStruct)));
|
||||
chStepCheck = GetAxisSeqFromLinkSeq(&wLinkId, 1u, tmpAcIdBuf, &tmpACCnt, AC_MAXCNT_IN_SWITCH);
|
||||
chDir = GetCfpLocDir(wCfpId);
|
||||
if ((CI_SUCCESS == chStepCheck) && (0u != tmpACCnt))
|
||||
{
|
||||
;
|
||||
}
|
||||
else
|
||||
{/* 将包络信息添加到分界点动态数据 */
|
||||
g_CutoffPointDataBuf[wIndex].chLocalTiocEnvelopeNum = chEnvelopeNum;
|
||||
for (chEnvelopeIndex = 0u; chEnvelopeIndex < chEnvelopeNum; chEnvelopeIndex++)
|
||||
for (chCfpAcIndex = 0U; chCfpAcIndex < tmpACCnt; chCfpAcIndex++)
|
||||
{
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].envelopeType = szTmpEnvelope[chEnvelopeIndex].envelopeType;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].headTrainID = szTmpEnvelope[chEnvelopeIndex].headTrainID;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].tailTrainID = szTmpEnvelope[chEnvelopeIndex].tailTrainID;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos = szTmpEnvelope[chEnvelopeIndex].startPos;
|
||||
wLinkTioc = GetLinkManageTiocById(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Lnk);
|
||||
/* 内部优化 20220419 wqm 编码规范:函数dsuCheckSameLoc返回值需要变量承接*/
|
||||
if (wLinkTioc != chLocalId)
|
||||
chEnvelopeNum = elm_GetEnvelopeInAC(tmpAcIdBuf[chCfpAcIndex], szTmpEnvelope);
|
||||
chFail = CI_SUCCESS;
|
||||
if (SECTION_REL_ENVELOPE_SUM_MAX == chEnvelopeNum)
|
||||
{
|
||||
(void)dsuCheckSameLoc(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Lnk, \
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Off, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Lnk, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Off);
|
||||
/*查找失败 添加坏车包络*/
|
||||
chEnvelopeNum = 1U;
|
||||
(void)elm_CreatTempUKTEnvelope(tmpAcIdBuf[chCfpAcIndex], chDir, &szTmpEnvelope[0]);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos = szTmpEnvelope[chEnvelopeIndex].endPos;
|
||||
wLinkTioc = GetLinkManageTiocById(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Lnk);
|
||||
if (wLinkTioc != chLocalId)
|
||||
/*将包络信息添加到分界点动态数据 */
|
||||
g_CutoffPointDataBuf[wIndex].chLocalTiocEnvelopeNum += chEnvelopeNum;
|
||||
|
||||
for (chEnvelopeIndex = 0U; chEnvelopeIndex < chEnvelopeNum; chEnvelopeIndex++)
|
||||
{
|
||||
(void)dsuCheckSameLoc(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Lnk, \
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Off, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Lnk, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Off);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].trianCnt = szTmpEnvelope[chEnvelopeIndex].trianCnt;
|
||||
(void)CommonMemCpy(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].trainID, (UINT32)sizeof(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].trainID), \
|
||||
szTmpEnvelope[chEnvelopeIndex].trainID, (UINT32)sizeof(szTmpEnvelope[chEnvelopeIndex].trainID));
|
||||
chStepCheck = CutCfpOtherOcEData(tmpAcIdBuf[chCfpAcIndex], &szTmpEnvelope[chEnvelopeIndex], chDir);
|
||||
if (CI_ERROR == chStepCheck)
|
||||
{
|
||||
/*截取失败设置坏车*/
|
||||
(void)elm_CreatTempUKTEnvelope(tmpAcIdBuf[chCfpAcIndex], chDir, &szTmpEnvelope[chEnvelopeIndex]);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].envelopeType = szTmpEnvelope[chEnvelopeIndex].envelopeType;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].headTrainID = szTmpEnvelope[chEnvelopeIndex].headTrainID;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].tailTrainID = szTmpEnvelope[chEnvelopeIndex].tailTrainID;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos = szTmpEnvelope[chEnvelopeIndex].startPos;
|
||||
wLinkTioc = GetLinkManageTiocById(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Lnk);
|
||||
/* 内部优化 20220419 wqm 编码规范:函数dsuCheckSameLoc返回值需要变量承接*/
|
||||
if (wLinkTioc != chLocalId)
|
||||
{
|
||||
(void)dsuCheckSameLoc(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Lnk, \
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Off, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Lnk, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Off);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos = szTmpEnvelope[chEnvelopeIndex].endPos;
|
||||
wLinkTioc = GetLinkManageTiocById(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Lnk);
|
||||
if (wLinkTioc != chLocalId)
|
||||
{
|
||||
(void)dsuCheckSameLoc(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Lnk, \
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Off, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Lnk, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Off);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].trianCnt = szTmpEnvelope[chEnvelopeIndex].trianCnt;
|
||||
(void)CommonMemCpy(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].trainID, (UINT32)sizeof(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].trainID), \
|
||||
szTmpEnvelope[chEnvelopeIndex].trainID, (UINT32)sizeof(szTmpEnvelope[chEnvelopeIndex].trainID));
|
||||
|
||||
(void)CommonMemCpy(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].ACTPort, (UINT32)sizeof(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].ACTPort), \
|
||||
szTmpEnvelope[chEnvelopeIndex].ACTPort, (UINT32)sizeof(szTmpEnvelope[chEnvelopeIndex].ACTPort));
|
||||
(void)CommonMemCpy(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].ACTPort, (UINT32)sizeof(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].ACTPort), \
|
||||
szTmpEnvelope[chEnvelopeIndex].ACTPort, (UINT32)sizeof(szTmpEnvelope[chEnvelopeIndex].ACTPort));
|
||||
}
|
||||
|
||||
if (0U == chEnvelopeNum)
|
||||
{
|
||||
/*分界点无包络计轴 向本联锁内方继续查找*/
|
||||
chStepCheck = GetAcSwitchPosCheck(tmpAcIdBuf[chCfpAcIndex]);/*本计轴道岔位置不满足时停止检查*/
|
||||
dwCheckAcLen = GetAxisSecTotalLen(tmpAcIdBuf[chCfpAcIndex]);
|
||||
if ((dwArbProtectLen > dwCheckAcLen) && (CI_TYPE_CLD != chLocalCiType)&&(CI_SUCCESS == chStepCheck))
|
||||
{
|
||||
chFirstStepAcCnt = elm_PrepareAdjacentAC(tmpAcIdBuf[chCfpAcIndex], chDir, wFirstStepID, &chChangePoint);
|
||||
if (AC_MAXCNT_IN_SWITCH < chFirstStepAcCnt)
|
||||
{
|
||||
chFail = CI_ERROR;
|
||||
(void)elm_CreatTempUKTEnvelope(tmpAcIdBuf[chCfpAcIndex], chDir, &szTmpEnvelope[0]);
|
||||
(void)CutCfpOtherOcEData(tmpAcIdBuf[chCfpAcIndex], &szTmpEnvelope[0], chDir);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ii = 0U; ii < chFirstStepAcCnt; ii++)
|
||||
{
|
||||
chAcBelongTioc = GetAxisSectionBelongCiId(tmpAcIdBuf[chCfpAcIndex]);
|
||||
if (chAcBelongTioc == chLocalId)
|
||||
{
|
||||
chStepCheck = SetCfpLocalArbDistanceData(wFirstStepID[ii], wCfpId, chDir);
|
||||
dwFirstStepAcLen = GetAxisSecTotalLen(wFirstStepID[ii]);
|
||||
if ((dwArbProtectLen > (dwCheckAcLen + dwFirstStepAcLen)) && (CI_SUCCESS == chStepCheck))
|
||||
{
|
||||
chNextDir = TransDirectionPointDir(chChangePoint, chDir, &chPointNum);
|
||||
chSndStepAcCnt = elm_PrepareAdjacentAC(wFirstStepID[ii], chNextDir, wSndStepID, &chChangePoint);
|
||||
if (AC_MAXCNT_IN_SWITCH < chFirstStepAcCnt)
|
||||
{
|
||||
chFail = CI_ERROR;
|
||||
(void)elm_CreatTempUKTEnvelope(wFirstStepID[ii], chNextDir, &szTmpEnvelope[0]);
|
||||
(void)CutCfpOtherOcEData(wFirstStepID[ii], &szTmpEnvelope[0], chNextDir);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (jj = 0U; jj < chSndStepAcCnt; jj++)
|
||||
{
|
||||
chAcBelongTioc = GetAxisSectionBelongCiId(tmpAcIdBuf[chCfpAcIndex]);
|
||||
if (chAcBelongTioc == chLocalId)
|
||||
{
|
||||
(void)SetCfpLocalArbDistanceData(wSndStepID[jj], wCfpId, chNextDir);
|
||||
}
|
||||
/*不继续添加*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*不查找下一计轴*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CI_ERROR == chFail)
|
||||
{
|
||||
/* 异常防护 生成UKT*/
|
||||
chEnvelopeIndex = g_CutoffPointDataBuf[wIndex].chLocalTiocEnvelopeNum;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].envelopeType = szTmpEnvelope[0].envelopeType;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].headTrainID = szTmpEnvelope[0].headTrainID;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].tailTrainID = szTmpEnvelope[0].tailTrainID;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos = szTmpEnvelope[0].startPos;
|
||||
wLinkTioc = GetLinkManageTiocById(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Lnk);
|
||||
/* 内部优化 20220419 wqm 编码规范:函数dsuCheckSameLoc返回值需要变量承接*/
|
||||
if (wLinkTioc != chLocalId)
|
||||
{
|
||||
(void)dsuCheckSameLoc(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Lnk, \
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Off, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Lnk, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].startPos.Off);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos = szTmpEnvelope[0].endPos;
|
||||
wLinkTioc = GetLinkManageTiocById(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Lnk);
|
||||
if (wLinkTioc != chLocalId)
|
||||
{
|
||||
(void)dsuCheckSameLoc(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Lnk, \
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Off, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Lnk, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].endPos.Off);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].trianCnt = szTmpEnvelope[0].trianCnt;
|
||||
(void)CommonMemCpy(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].trainID, (UINT32)sizeof(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].trainID), \
|
||||
szTmpEnvelope[0].trainID, (UINT32)sizeof(szTmpEnvelope[0].trainID));
|
||||
|
||||
(void)CommonMemCpy(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].ACTPort, (UINT32)sizeof(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[chEnvelopeIndex].ACTPort), \
|
||||
szTmpEnvelope[0].ACTPort, (UINT32)sizeof(szTmpEnvelope[0].ACTPort));
|
||||
g_CutoffPointDataBuf[wIndex].chLocalTiocEnvelopeNum++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;/*找到列车包络 不再查找该计轴后续方向*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -739,7 +879,7 @@ void SetCfpLocalOcEData(const UINT16 wCfpId)
|
||||
* @param CfpEnvelopeStruct szEnvelope 包络数据
|
||||
* @return 包络数量
|
||||
*/
|
||||
UINT8 GetOtherOcEnvelope(const UINT16 wOtherOc, CfpEnvelopeStruct szEnvelope[SECTION_REL_ENVELOPE_SUM_MAX * ONE_OTHER_CFP_SUM_MAX])
|
||||
UINT8 GetOtherOcEnvelope(const UINT16 wOtherOc, CfpEnvelopeStruct szEnvelope[OTHER_RC_SEND_ENVELOPE_SUM_MAX * ONE_OTHER_CFP_SUM_MAX])
|
||||
{
|
||||
UINT16 wCfpIndex = 0u;
|
||||
UINT16 wCfpId = 0u;
|
||||
@@ -792,7 +932,6 @@ void SetCfpLocalOcCtData(const UINT16 wCfpId)
|
||||
UINT8 chSendNum = 0u;
|
||||
UINT8 chFunRtn = CI_ERROR;
|
||||
struct_PathPoint strPoint = { 0u };
|
||||
UINT8 dir = 0u;
|
||||
|
||||
wIndex = GetCfpBufIndex(wCfpId);
|
||||
/* 输入合法 */
|
||||
@@ -813,9 +952,7 @@ void SetCfpLocalOcCtData(const UINT16 wCfpId)
|
||||
g_CutoffPointDataBuf[wIndex].szLocalCtTrain[chSendNum].dwDelay = GetTrainMsgDelayTime(szCtTrainId[chCtIndex]);
|
||||
g_CutoffPointDataBuf[wIndex].szLocalCtTrain[chSendNum].wSpeed = GetTrainSpeed(szCtTrainId[chCtIndex]);
|
||||
g_CutoffPointDataBuf[wIndex].szLocalCtTrain[chSendNum].chSpeedDir = GetTrainSpeedDir(szCtTrainId[chCtIndex]);
|
||||
|
||||
dir = GetTrainDir(szCtTrainId[chCtIndex]); /*获取列车的逻辑方向*/
|
||||
g_CutoffPointDataBuf[wIndex].szLocalCtTrain[chSendNum].chTrainDir = ConvertDirectionToLogic(dir); /*将逻辑方向转换为运营方向*/
|
||||
g_CutoffPointDataBuf[wIndex].szLocalCtTrain[chSendNum].chTrainDir = GetTrainDir(szCtTrainId[chCtIndex]);
|
||||
g_CutoffPointDataBuf[wIndex].szLocalCtTrain[chSendNum].wMaxHeadLink = GetTrainMaxHeadLink(szCtTrainId[chCtIndex]);
|
||||
g_CutoffPointDataBuf[wIndex].szLocalCtTrain[chSendNum].dwMaxHeadOff = GetTrainMaxHeadOffset(szCtTrainId[chCtIndex]);
|
||||
g_CutoffPointDataBuf[wIndex].szLocalCtTrain[chSendNum].wMinHeadLink = GetTrainMinHeadLink(szCtTrainId[chCtIndex]);
|
||||
@@ -883,22 +1020,16 @@ UINT8 GetCfpLocalOcCtNum(const UINT16 wCfpId)
|
||||
|
||||
/**
|
||||
* @brief 截取分界点相邻OC发来的包络数据
|
||||
* @param wCfpId 分界点ID
|
||||
* @param CfpEnvelopeStruct* strEnvelope 包络数据
|
||||
* @param wAcId 截取计轴ID UINT8 chDir 方向
|
||||
* @param EnvelopeStruct* strEnvelope 包络数据
|
||||
* @return CI_ ERROR 截取失败
|
||||
* CI_ SUCCESS 截取成功
|
||||
* by cgh 20240111
|
||||
* modify fan20260413:按照计轴进行包络截取
|
||||
*/
|
||||
UINT8 CutCfpOtherOcEData(const UINT16 wCfpId, CfpEnvelopeStruct* strEnvelope)
|
||||
UINT8 CutCfpOtherOcEData(const UINT16 wAcId, EnvelopeStruct* strEnvelope, UINT8 chDir)
|
||||
{
|
||||
UINT8 chReval = CI_ERROR;
|
||||
UINT8 chLocalCiId = 0U;/*本地联锁ID*/
|
||||
UINT16 wLinkTioc = 0U;/*LINK所属联锁ID*/
|
||||
UINT16 wCfpLinkId = 0U;/*分界点LINK ID*/
|
||||
UINT32 dwCfpLinkOffset = 0U;/*分界点LINK偏移量*/
|
||||
UINT16 wCfpSameLocLinkId = 0U;/*分界点同位点LINK ID*/
|
||||
UINT32 dwCfpSameLocLinkOffset = 0U;/*分界点同位点LINK偏移量*/
|
||||
UINT16 wLinkBelongAxieId = 0U;/*LINK所属计轴区段ID*/
|
||||
UINT8 chAxieIncLinkSum = 0U;/*计轴区段包含LINK数目*/
|
||||
UINT16* szAxieIncLink = NULL;/*计轴区段包含LINK*/
|
||||
UINT8 ii = 0U;
|
||||
@@ -907,111 +1038,85 @@ UINT8 CutCfpOtherOcEData(const UINT16 wCfpId, CfpEnvelopeStruct* strEnvelope)
|
||||
UINT8 chEnvelopeEndFlag = 0U;/*包络终端是否在计轴区段标志*/
|
||||
ELM_AxisLocStruct tmpAxieSecLoc = { 0U };/*计轴区段位置*/
|
||||
|
||||
if (CUTOFF_POINT_SUM_MAX > wCfpId)
|
||||
if (AXIS_SECTION_SUM_MAX > wAcId)
|
||||
{
|
||||
/*只截取UCT包络*/
|
||||
if ((TYPE_UCT_ENVELOPE == strEnvelope->envelopeType) || (TYPE_CT_ENVELOPE == strEnvelope->envelopeType))
|
||||
{
|
||||
chLocalCiId = GetSystemParaLocalCiId();
|
||||
wCfpLinkId = GetCfpLink(wCfpId);
|
||||
dwCfpLinkOffset = GetCfpOffset(wCfpId);
|
||||
wLinkTioc = GetLinkManageTiocById(wCfpLinkId);
|
||||
|
||||
if (chLocalCiId == wLinkTioc)
|
||||
{
|
||||
/*分界点数据配置的位置为本联锁,需要转换为相邻联锁的同位点*/
|
||||
chKeepFlag = dsuCheckSameLoc(wCfpLinkId, dwCfpLinkOffset, &wCfpSameLocLinkId, &dwCfpSameLocLinkOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*分界点LINK属于相邻联锁,此时使用分界点对应的LINK数据*/
|
||||
chKeepFlag = CI_SUCCESS;
|
||||
wCfpSameLocLinkId = wCfpLinkId;
|
||||
dwCfpSameLocLinkOffset = dwCfpLinkOffset;
|
||||
}
|
||||
chAxieIncLinkSum = GetAxisLinkSum(wAcId);
|
||||
szAxieIncLink = GetAxisLinkIdBuf(wAcId);
|
||||
chKeepFlag = elm_PrepareACLoc(wAcId, chDir, &tmpAxieSecLoc);
|
||||
|
||||
if (CI_SUCCESS == chKeepFlag)
|
||||
{
|
||||
wLinkBelongAxieId = GetLinkBelongAcId(wCfpSameLocLinkId);
|
||||
chAxieIncLinkSum = GetAxisLinkSum(wLinkBelongAxieId);
|
||||
szAxieIncLink = GetAxisLinkIdBuf(wLinkBelongAxieId);
|
||||
chKeepFlag = elm_PrepareACLoc(wLinkBelongAxieId, ELM_DIR_SAME, &tmpAxieSecLoc);
|
||||
|
||||
if (CI_SUCCESS == chKeepFlag)
|
||||
for (ii = 0U; ii < chAxieIncLinkSum; ii++)
|
||||
{
|
||||
for (ii = 0U; ii < chAxieIncLinkSum; ii++)
|
||||
if (szAxieIncLink[ii] == strEnvelope->startPos.Lnk)
|
||||
{
|
||||
if (szAxieIncLink[ii] == strEnvelope->startPos.Lnk)
|
||||
{
|
||||
chEnvelopeStartFlag = CI_SUCCESS;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*继续找*/
|
||||
}
|
||||
}
|
||||
|
||||
for (ii = 0U; ii < chAxieIncLinkSum; ii++)
|
||||
{
|
||||
if (szAxieIncLink[ii] == strEnvelope->endPos.Lnk)
|
||||
{
|
||||
chEnvelopeEndFlag = CI_SUCCESS;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*继续找*/
|
||||
}
|
||||
}
|
||||
|
||||
chReval = CI_SUCCESS;
|
||||
if ((CI_SUCCESS == chEnvelopeStartFlag) && (CI_SUCCESS == chEnvelopeEndFlag))
|
||||
{
|
||||
; /*包络始端端均在计轴区段内,不截取*/
|
||||
}
|
||||
else if (CI_SUCCESS == chEnvelopeStartFlag)
|
||||
{
|
||||
/*包络始端在计轴区段内*/
|
||||
strEnvelope->endPos.Dir = strEnvelope->startPos.Dir;
|
||||
if (EMAP_SAME_DIR == strEnvelope->startPos.Dir)
|
||||
{
|
||||
/*包络始端方向为逻辑正方向,截取的包络终端为计轴区段终点*/
|
||||
strEnvelope->endPos.Lnk = tmpAxieSecLoc.endPos.Lnk;
|
||||
strEnvelope->endPos.Off = tmpAxieSecLoc.endPos.Off;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*包络始端方向为逻辑反方向,截取的包络终端为计轴区段起点*/
|
||||
strEnvelope->endPos.Lnk = tmpAxieSecLoc.startPos.Lnk;
|
||||
strEnvelope->endPos.Off = tmpAxieSecLoc.startPos.Off;
|
||||
}
|
||||
}
|
||||
else if (CI_SUCCESS == chEnvelopeEndFlag)
|
||||
{
|
||||
/*包络终端在计轴区段内*/
|
||||
strEnvelope->startPos.Dir = strEnvelope->endPos.Dir;
|
||||
if (EMAP_SAME_DIR == strEnvelope->endPos.Dir)
|
||||
{
|
||||
/*包络尾方向为逻辑正方向,截取的包络终端为计轴区段起点*/
|
||||
strEnvelope->startPos.Lnk = tmpAxieSecLoc.startPos.Lnk;
|
||||
strEnvelope->startPos.Off = tmpAxieSecLoc.startPos.Off;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*包络尾方向为逻辑反方向,截取的包络终端为计轴区段终点*/
|
||||
strEnvelope->startPos.Lnk = tmpAxieSecLoc.endPos.Lnk;
|
||||
strEnvelope->startPos.Off = tmpAxieSecLoc.endPos.Off;
|
||||
}
|
||||
chEnvelopeStartFlag = CI_SUCCESS;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
chReval = CI_ERROR;
|
||||
; /*继续找*/
|
||||
}
|
||||
}
|
||||
|
||||
for (ii = 0U; ii < chAxieIncLinkSum; ii++)
|
||||
{
|
||||
if (szAxieIncLink[ii] == strEnvelope->endPos.Lnk)
|
||||
{
|
||||
chEnvelopeEndFlag = CI_SUCCESS;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*继续找*/
|
||||
}
|
||||
}
|
||||
|
||||
chReval = CI_SUCCESS;
|
||||
if ((CI_SUCCESS == chEnvelopeStartFlag) && (CI_SUCCESS == chEnvelopeEndFlag))
|
||||
{
|
||||
; /*包络始端端均在计轴区段内,不截取*/
|
||||
}
|
||||
else if (CI_SUCCESS == chEnvelopeStartFlag)
|
||||
{
|
||||
/*包络始端在计轴区段内*/
|
||||
strEnvelope->endPos.Dir = strEnvelope->startPos.Dir;
|
||||
if (EMAP_SAME_DIR == strEnvelope->startPos.Dir)
|
||||
{
|
||||
/*包络始端方向为逻辑正方向,截取的包络终端为计轴区段终点*/
|
||||
strEnvelope->endPos.Lnk = tmpAxieSecLoc.endPos.Lnk;
|
||||
strEnvelope->endPos.Off = tmpAxieSecLoc.endPos.Off;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*包络始端方向为逻辑反方向,截取的包络终端为计轴区段起点*/
|
||||
strEnvelope->endPos.Lnk = tmpAxieSecLoc.startPos.Lnk;
|
||||
strEnvelope->endPos.Off = tmpAxieSecLoc.startPos.Off;
|
||||
}
|
||||
}
|
||||
else if (CI_SUCCESS == chEnvelopeEndFlag)
|
||||
{
|
||||
/*包络终端在计轴区段内*/
|
||||
strEnvelope->startPos.Dir = strEnvelope->endPos.Dir;
|
||||
if (EMAP_SAME_DIR == strEnvelope->endPos.Dir)
|
||||
{
|
||||
/*包络尾方向为逻辑正方向,截取的包络终端为计轴区段起点*/
|
||||
strEnvelope->startPos.Lnk = tmpAxieSecLoc.startPos.Lnk;
|
||||
strEnvelope->startPos.Off = tmpAxieSecLoc.startPos.Off;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*包络尾方向为逻辑反方向,截取的包络终端为计轴区段终点*/
|
||||
strEnvelope->startPos.Lnk = tmpAxieSecLoc.endPos.Lnk;
|
||||
strEnvelope->startPos.Off = tmpAxieSecLoc.endPos.Off;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*返回失败*/
|
||||
chReval = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1632,7 +1737,7 @@ void OtherCfpTrainInfoCal(UINT16 wLinkId,UINT32 dwOffSet,UINT32 dwLocalOffSet, C
|
||||
{
|
||||
chLinkTiocId = (UINT8)GetLinkManageTiocById(wLinkId);
|
||||
strCfpInfo = GetCfpOtherOcTrainInfo(wCfpId);
|
||||
chTransmitStat = GetRcPbTacsTransmitState(chLinkTiocId);
|
||||
chTransmitStat = GetCiTransmitState(CI_SYSTEM_TYPE_CI, chLinkTiocId);
|
||||
if ((TRANSMIT_STATE_GOOD != chTransmitStat) || (UINT16_MAX == strCfpInfo.wTrainId))
|
||||
{
|
||||
;/*通信不良好,或者分界点列车信息获取失败*/
|
||||
@@ -1731,4 +1836,86 @@ void CfpTrainInfoCal(UINT16 wLinkId, UINT32 dwOffSet, UINT32 dwLocalOffSet, CfpT
|
||||
trainInfo->dwDis = dwLocalOffSet + dwDis;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @brief 根据分界点内方计轴向内查找ARB防护距离内可达计轴上包络
|
||||
* 输入参数: wAcId 本联锁分界点计轴 wCfpId分界点 UINT8 chDir 方向
|
||||
* 返回值: CI_SUCCESS(计轴无包络 需继续查找) CI_ERROR(计轴存在包络)
|
||||
* Create fanwen 2026.4.13
|
||||
**/
|
||||
UINT8 SetCfpLocalArbDistanceData(const UINT16 wAcId, const UINT16 wCfpId,UINT8 chDir)
|
||||
{
|
||||
UINT8 retVal = CI_ERROR;
|
||||
UINT8 chEnvelopeNum = 0U;
|
||||
EnvelopeStruct szTmpEnvelope[SECTION_REL_ENVELOPE_SUM_MAX] = { 0u };
|
||||
UINT16 wIndex = GetCfpBufIndex(wCfpId);
|
||||
UINT8 ii = 0u;/*索引*/
|
||||
UINT8 chLocalId = 0u;
|
||||
UINT16 wLinkTioc = 0u;
|
||||
UINT8 chCurNum = 0U;
|
||||
UINT8 chStepCheck = CI_ERROR;
|
||||
chLocalId = GetSystemParaLocalCiId();
|
||||
chEnvelopeNum = elm_GetEnvelopeInAC(wAcId, szTmpEnvelope);
|
||||
chCurNum = g_CutoffPointDataBuf[wIndex].chLocalTiocEnvelopeNum;
|
||||
if (SECTION_REL_ENVELOPE_SUM_MAX == chEnvelopeNum)
|
||||
{
|
||||
/*查找失败 添加坏车包络*/
|
||||
chEnvelopeNum = 1U;
|
||||
(void)elm_CreatTempUKTEnvelope(wAcId, chDir, &szTmpEnvelope[0]);
|
||||
}
|
||||
if (0U != chEnvelopeNum)
|
||||
{
|
||||
if (OTHER_RC_SEND_ENVELOPE_SUM_MAX > chCurNum + chEnvelopeNum)
|
||||
{
|
||||
/* 将包络信息添加到分界点动态数据 */
|
||||
g_CutoffPointDataBuf[wIndex].chLocalTiocEnvelopeNum = chCurNum + chEnvelopeNum;
|
||||
for (ii = 0U; ii < chEnvelopeNum; ii ++)
|
||||
{
|
||||
/*仅截取本计轴*/
|
||||
chStepCheck = CutCfpOtherOcEData(wAcId, &szTmpEnvelope[ii], chDir);
|
||||
if (CI_ERROR == chStepCheck)
|
||||
{
|
||||
/*截取失败设置坏车*/
|
||||
(void)elm_CreatTempUKTEnvelope(wAcId, chDir, &szTmpEnvelope[ii]);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].envelopeType = szTmpEnvelope[ii].envelopeType;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].headTrainID = szTmpEnvelope[ii].headTrainID;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].tailTrainID = szTmpEnvelope[ii].tailTrainID;
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].startPos = szTmpEnvelope[ii].startPos;
|
||||
wLinkTioc = GetLinkManageTiocById(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].startPos.Lnk);
|
||||
/* 内部优化 20220419 wqm 编码规范:函数dsuCheckSameLoc返回值需要变量承接*/
|
||||
if (wLinkTioc != (UINT16)chLocalId)
|
||||
{
|
||||
(void)dsuCheckSameLoc(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].startPos.Lnk, \
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].startPos.Off, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].startPos.Lnk, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].startPos.Off);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].endPos = szTmpEnvelope[ii].endPos;
|
||||
wLinkTioc = GetLinkManageTiocById(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].endPos.Lnk);
|
||||
if (wLinkTioc != (UINT16)chLocalId)
|
||||
{
|
||||
(void)dsuCheckSameLoc(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].endPos.Lnk, \
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].endPos.Off, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].endPos.Lnk, \
|
||||
&g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].endPos.Off);
|
||||
}
|
||||
g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].trianCnt = szTmpEnvelope[ii].trianCnt;
|
||||
(void)CommonMemCpy(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].trainID, (UINT32)sizeof(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].trainID), \
|
||||
szTmpEnvelope[ii].trainID, (UINT32)sizeof(szTmpEnvelope[ii].trainID));
|
||||
|
||||
(void)CommonMemCpy(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].ACTPort, (UINT32)sizeof(g_CutoffPointDataBuf[wIndex].szLocalEnvelope[ii + chCurNum].ACTPort), \
|
||||
szTmpEnvelope[ii].ACTPort, (UINT32)sizeof(szTmpEnvelope[ii].ACTPort));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_SUCCESS;/*对应计轴无包络*/
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
@@ -65,9 +65,9 @@ typedef struct
|
||||
CfpTrainInfoStru otherTiocTrainInfo; /* 接收到的其他联锁的列车信息 */
|
||||
CfpTrainInfoStru localTiocTrainInfo; /* 待发送到其他联锁的列车信息 */
|
||||
UINT8 chLocalTiocEnvelopeNum; /* 待发送到其他联锁的包络数量 */
|
||||
CfpEnvelopeStruct szLocalEnvelope[SECTION_REL_ENVELOPE_SUM_MAX]; /* 待发送到其他联锁的包络数量 */
|
||||
CfpEnvelopeStruct szLocalEnvelope[OTHER_RC_SEND_ENVELOPE_SUM_MAX]; /* 待发送到其他联锁的包络数量 */
|
||||
UINT8 chOtherTiocEnvelopeNum; /* 接收到的其他联锁的包络数量 */
|
||||
CfpEnvelopeStruct szOtherEnvelope[SECTION_REL_ENVELOPE_SUM_MAX]; /* 接收到的其他联锁的包络信息 */
|
||||
CfpEnvelopeStruct szOtherEnvelope[OTHER_RC_SEND_ENVELOPE_SUM_MAX]; /* 接收到的其他联锁的包络信息 */
|
||||
UINT8 chCtNum; /* 分界点通信车数量 */
|
||||
CfpCtTrainStruct szLocalCtTrain[TRAIN_SUM_MAX]; /* 分界点通信车信息 */
|
||||
CfpRRMDataStruct szCfpRRMData; /* 分界点远程RM数据*/
|
||||
@@ -179,7 +179,7 @@ void SetCfpLocalOcEData(const UINT16 wCfpId);
|
||||
* @param CfpEnvelopeStruct szEnvelope 包络数据
|
||||
* @return 包络数量
|
||||
*/
|
||||
UINT8 GetOtherOcEnvelope(const UINT16 wOtherOc, CfpEnvelopeStruct szEnvelope[SECTION_REL_ENVELOPE_SUM_MAX * ONE_OTHER_CFP_SUM_MAX]);
|
||||
UINT8 GetOtherOcEnvelope(const UINT16 wOtherOc, CfpEnvelopeStruct szEnvelope[OTHER_RC_SEND_ENVELOPE_SUM_MAX * ONE_OTHER_CFP_SUM_MAX]);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取边界点数据存储地址
|
||||
@@ -212,13 +212,13 @@ UINT8 GetCfpLocalOcCtNum(const UINT16 wCfpId);
|
||||
|
||||
/**
|
||||
* @brief 截取分界点相邻OC发来的包络数据
|
||||
* @param wCfpId 分界点ID
|
||||
* @param CfpEnvelopeStruct* strEnvelope 包络数据
|
||||
* @param wAcId 截取计轴ID
|
||||
* @param EnvelopeStruct* strEnvelope 包络数据 chDir方向
|
||||
* @return CI_ ERROR 截取失败
|
||||
* CI_ SUCCESS 截取成功
|
||||
* by cgh 20240111
|
||||
*/
|
||||
UINT8 CutCfpOtherOcEData(const UINT16 wCfpId,CfpEnvelopeStruct* strEnvelope);
|
||||
UINT8 CutCfpOtherOcEData(const UINT16 wAcId, EnvelopeStruct* strEnvelope, UINT8 chDir);
|
||||
|
||||
/**
|
||||
* @brief 获取分界点跨控区RRM源RC ID
|
||||
@@ -367,6 +367,14 @@ void OtherCfpTrainInfoCal(UINT16 wLinkId, UINT32 dwOffSet, UINT32 dwLocalOffSet,
|
||||
*/
|
||||
void CfpTrainInfoCal(UINT16 wLinkId, UINT32 dwOffSet, UINT32 dwLocalOffSet, CfpTrainInfoStru* trainInfo, UINT8 cDir);
|
||||
|
||||
/**
|
||||
* @brief 根据分界点内方计轴向内查找ARB防护距离内可达计轴上包络
|
||||
* 输入参数: wAcId 本联锁分界点计轴 wCfpId分界点 UINT8 chDir 方向
|
||||
* 返回值: CI_SUCCESS(计轴无包络 需继续查找) CI_ERROR(计轴存在包络)
|
||||
* Create fanwen 2026.4.13
|
||||
**/
|
||||
UINT8 SetCfpLocalArbDistanceData(const UINT16 wAcId, const UINT16 wCfpId, UINT8 chDir);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,6 @@ UINT8 GetCiEmapCheckVer(const UINT8 ciId, UINT32 *emapVer,const UINT8 commDevTyp
|
||||
switch (commDevType)
|
||||
{/*根据通信设备类型获取CI与该通信设备的共用数据校验信息*/
|
||||
case CI_SYSTEM_TYPE_VOBC:
|
||||
case CI_SYSTEM_TYPE_IVOC:
|
||||
case CI_SYSTEM_TYPE_ITE:
|
||||
*emapVer = gEmapCiConfigStrus[ciId].dataVerCheckCIAndVOBC; /*ITE使用与VOBC相同的校验信息*/
|
||||
break;
|
||||
@@ -58,7 +57,7 @@ UINT8 GetCiEmapCheckVer(const UINT8 ciId, UINT32 *emapVer,const UINT8 commDevTyp
|
||||
*emapVer = gEmapCiConfigStrus[ciId].dataVerCheckCIAndTMC;
|
||||
break;
|
||||
default:
|
||||
/*CI_SYSTEM_TYPE_RCI等情况*/
|
||||
/*CI_SYSTEM_TYPE_CI等情况*/
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -105,34 +104,37 @@ SAME_LINE_ERR,
|
||||
*/
|
||||
UINT8 IsSameLineCI(const UINT8 ciA, const UINT8 ciB)
|
||||
{
|
||||
UINT32 etcsIdA = 0U;
|
||||
UINT32 etcsIdB = 0U;
|
||||
UINT16 u16CiA = 0U;
|
||||
UINT16 u16CiB = 0U;
|
||||
UINT32 etcsIdA, etcsIdB;
|
||||
UINT16 u16CiA, u16CiB;
|
||||
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_CI * 256u) + ciA);
|
||||
u16CiB = (UINT16)((CI_SYSTEM_TYPE_CI * 256u) + ciB);
|
||||
|
||||
dquDevNameA = dquDevName2HlhtId(u16CiA,0U,&etcsIdA);
|
||||
dquDevNameB = dquDevName2HlhtId(u16CiB,0U,&etcsIdB);
|
||||
cbtcSysType = GetCbtcSysType();
|
||||
|
||||
/*需要增加互联互通的判断*/
|
||||
if ((CI_SUCCESS == dquDevNameA) && (CI_SUCCESS == dquDevNameB))
|
||||
dquDevNameA = dquDevName2HlhtId(u16CiA,0u,&etcsIdA);
|
||||
|
||||
dquDevNameB = dquDevName2HlhtId(u16CiB,0u,&etcsIdB);
|
||||
|
||||
if(DQU_CBTC_CPK == cbtcSysType)
|
||||
{
|
||||
/*根据互联互通ETCS编号的定义,从低到高第三个字节为线路编号*/
|
||||
if ((etcsIdA & ((UINT32)0x00ff0000)) == (etcsIdB & ((UINT32)0x00ff0000)))
|
||||
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))
|
||||
{
|
||||
retVal = SAME_LINE_YES;
|
||||
|
||||
/*同一条线路,一期二期使用不同厂家联锁,也判为不同线路,接口走互联互通*/
|
||||
chCiAFactoryType = GetCiFactoryType(ciA);
|
||||
chCiBFactoryType = GetCiFactoryType(ciB);
|
||||
if (chCiAFactoryType == chCiBFactoryType)
|
||||
/*根据互联互通ETCS编号的定义,从低到高第三个字节为线路编号*/
|
||||
if ((etcsIdA&((UINT32)0x00ff0000)) == (etcsIdB & ((UINT32)0x00ff0000)))
|
||||
{
|
||||
retVal = SAME_LINE_YES;
|
||||
}
|
||||
@@ -143,14 +145,17 @@ UINT8 IsSameLineCI(const UINT8 ciA, const UINT8 ciB)
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = SAME_LINE_NO;
|
||||
retVal = SAME_LINE_ERR;
|
||||
}
|
||||
}/* zt 删除单轨相关代码 2022-02-15 */
|
||||
else if (DQU_CBTC_CC == cbtcSysType)
|
||||
{
|
||||
retVal = SAME_LINE_YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
retVal = SAME_LINE_ERR;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
/*
|
||||
@@ -197,55 +202,28 @@ UINT32 GetCiTranCiDataCheckVer(const UINT8 ciId, const UINT16 deviceName)
|
||||
UINT32 retDataVer = CI_ERROR;
|
||||
UINT8 ii = 0U;
|
||||
UINT8 chBreakFlag = 0U;
|
||||
UINT8 chDevType = 0U;
|
||||
chDevType = (UINT8)((deviceName & 0xFF00u) >> 8U);
|
||||
if ((ciId > 0U) && (ciId < CI_SUM_MAX) &&
|
||||
((RC_WORK_MODE_CI == chDevType)||(RC_WORK_MODE_TIOC == chDevType)))
|
||||
|
||||
if ((ciId > 0U) && (ciId < CI_SUM_MAX) && (deviceName > 0U))
|
||||
{
|
||||
if (gEmapCiConfigStrus[ciId].devId == ciId)
|
||||
{
|
||||
if (RC_WORK_MODE_CI == chDevType)
|
||||
for (ii = 0U; ii < gEmapCiConfigStrus[ciId].chAdjoinCICount; ii++)
|
||||
{
|
||||
for (ii = 0U; ii < gEmapCiConfigStrus[ciId].chAdjoinCICount; ii++)
|
||||
if (ii < CI_TRAINSMIT_CI_MAX_NUM)
|
||||
{
|
||||
if (ii < CI_TRAINSMIT_CI_MAX_NUM)
|
||||
{
|
||||
if ((deviceName == gEmapCiConfigStrus[ciId].wAdjoinCIId[ii]) && (gEmapCiConfigStrus[ciId].wAdjoinCIId[ii] > 0U) && (gEmapCiConfigStrus[ciId].wAdjoinCIId[ii] < 0xFFFFU))
|
||||
{
|
||||
retDataVer = gEmapCiConfigStrus[ciId].dwAdjoinCIShareCheckData[ii];
|
||||
chBreakFlag = 1U;
|
||||
}
|
||||
}
|
||||
else
|
||||
if ((deviceName == gEmapCiConfigStrus[ciId].wAdjoinCIId[ii]) && (gEmapCiConfigStrus[ciId].wAdjoinCIId[ii] > 0U) && (gEmapCiConfigStrus[ciId].wAdjoinCIId[ii] < 0xFFFFU))
|
||||
{
|
||||
retDataVer = gEmapCiConfigStrus[ciId].dwAdjoinCIShareCheckData[ii];
|
||||
chBreakFlag = 1U;
|
||||
}
|
||||
if (1U == chBreakFlag)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ii = 0U; ii < gEmapCiConfigStrus[ciId].chAdjoinRCCount; ii++)
|
||||
else
|
||||
{
|
||||
if (ii < CI_TRAINSMIT_CI_MAX_NUM)
|
||||
{
|
||||
if ((deviceName == gEmapCiConfigStrus[ciId].wAdjoinRCId[ii]) && (gEmapCiConfigStrus[ciId].wAdjoinRCId[ii] > 0U) && (gEmapCiConfigStrus[ciId].wAdjoinRCId[ii] < 0xFFFFU))
|
||||
{
|
||||
retDataVer = gEmapCiConfigStrus[ciId].dwAdjoinRCShareCheckData[ii];
|
||||
chBreakFlag = 1U;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chBreakFlag = 1U;
|
||||
}
|
||||
if (1U == chBreakFlag)
|
||||
{
|
||||
break;
|
||||
}
|
||||
chBreakFlag = 1U;
|
||||
}
|
||||
if (1U == chBreakFlag)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,15 +36,11 @@ typedef struct S_EmapCheckVerConfigStruct
|
||||
UINT8 chAdjoinCICount; /*相邻CI数量*/
|
||||
UINT16 wAdjoinCIId[CI_TRAINSMIT_CI_MAX_NUM]; /*相邻CI[1-6]的ID*/
|
||||
UINT32 dwAdjoinCIShareCheckData[CI_TRAINSMIT_CI_MAX_NUM]; /*与相邻CI[1-6]的共用数据校验信息*/
|
||||
UINT8 chAdjoinRCCount; /*相邻RC数量*/
|
||||
UINT16 wAdjoinRCId[CI_TRAINSMIT_CI_MAX_NUM]; /*相邻RC[1-6]的ID*/
|
||||
UINT32 dwAdjoinRCShareCheckData[CI_TRAINSMIT_CI_MAX_NUM]; /*与相邻RC[1-6]的共用数据校验信息*/
|
||||
UINT16 ciTransmitAxisId[CI_TRAINSMIT_AXIS_MAX_NUM];/*与联锁通信的计轴系统ID*/
|
||||
UINT32 ciTransmitAxisCheckData[CI_TRAINSMIT_AXIS_MAX_NUM];/*与联锁通信的计轴系统校验信息*/
|
||||
UINT8 chAdjoinOcCount; /*与CI通信的oc数量*/
|
||||
UINT16 wAdjoinOcId[CI_TRAINSMIT_OC_MAX_NUM]; /*Oc[1-10]的ID*/
|
||||
UINT32 dwAdjoinOcShareCheckData[CI_TRAINSMIT_OC_MAX_NUM]; /*与OC[1-10]的共用数据校验信息*/
|
||||
UINT32 dwLocalShareCheckData; /*与本控区RC/CI校验信息*/
|
||||
} EmapCiConfigStru;
|
||||
|
||||
extern EmapCiConfigStru gEmapCiConfigStrus[CI_SUM_MAX];/*存储各CI使用的电子地图版本*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -72,13 +72,8 @@ typedef struct S_AreaSnowInfoStruct
|
||||
* 其他联锁条件状态定义
|
||||
*--------------------------------------------------------------------------*/
|
||||
/* 其他联锁条件检查配置状态相关定义 */
|
||||
#define LOCAL_AREA_SNOW_SUM_MAX ((UINT8)20) /*本控区及相邻控区发送的区间雨雪站台数量*/
|
||||
#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 ((UINT16)1499) /*跨压信号机ID最大值*/
|
||||
#define CBTC_CROSS_ID_MAX ((UINT8)253) /*CBTC跨压最大列车ID*/
|
||||
#define TACS_CROSS_ID_MAX ((UINT8)253) /*TACS跨压最大列车ID*/
|
||||
#define LOCAL_AREA_SNOW_SUM_MAX ((UINT8)20) /*本控区及相邻控区发送的区间雨雪站台数量*/
|
||||
#define ALL_AREA_SNOW_SUM_MAX ((UINT8)254) /*TMC发送的全线区间雨雪站台数量*/
|
||||
|
||||
/* 1 信号机
|
||||
开放0x55
|
||||
@@ -195,8 +190,6 @@ extern UINT8 g_AllTsrFlag; /*
|
||||
|
||||
extern UINT8 g_AllSnowModel; /*全线雨雪模式命令*/
|
||||
|
||||
extern UINT8 g_AllSnowModelCC; /*全线雨雪模式命令CC:0x55-有效;0xAA-无效*/
|
||||
|
||||
extern UINT8 g_AllSnowLevel; /*全线湿轨级别:0-默认值;1-一级;2-二级*/
|
||||
|
||||
extern UINT8 g_IteLineCutState; /*ITE全线切除状态:0x55:切除ITE;0xAA:使用ITE;0xFF:默认值*/
|
||||
@@ -226,6 +219,8 @@ 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;/*继电接口确认标志*/
|
||||
@@ -237,16 +232,11 @@ extern CtrlPowerStruct ctrlpowerFlag[VIRTUAL_CI_MAX];
|
||||
extern UINT8 LocalAreaSnowNum; /*本地区间雨雪站台数量*/
|
||||
extern AreaSnowInfoStruct szLocalAreaSnow[LOCAL_AREA_SNOW_SUM_MAX]; /*本地区间雨雪数组*/
|
||||
|
||||
extern UINT8 gLocalAreaSnowNumCC; /*本地区间雨雪站台数量CC*/
|
||||
extern AreaSnowInfoStruct gszLocalAreaSnowCC[LOCAL_AREA_SNOW_SUM_MAX]; /*本地区间雨雪数组CC*/
|
||||
|
||||
extern LineCommTrainStruct gStrLineCommTrain; /*全线通信车结构体*/
|
||||
|
||||
extern UINT32 gFlyProtectOverCyc; /*飞车宕机报警起始周期*/
|
||||
extern UINT8 g_LocalSnowModel; /*本地雨雪模式命令*/
|
||||
|
||||
extern UINT8 g_LocalSnowModelCC; /*本地雨雪模式命令CC*/
|
||||
|
||||
extern UINT8 gLocalAreaIteCutNum; /*本地区间ITE切除数量*/
|
||||
extern UINT16 gSzLocalAreaIteCutId[ALL_AREA_SNOW_SUM_MAX]; /*本地区间ITE切除ID数组*/
|
||||
|
||||
@@ -298,6 +288,13 @@ void SetStartLockFlag(UINT8 setFlag);
|
||||
LINSHIXIANSU_COMM_BAD_YES_LABOURCANCLE_STATE
|
||||
*/
|
||||
UINT8 GetLabourCancelLinShiXianState(void);
|
||||
|
||||
/*
|
||||
功能描述:人工取消临时限速状态迁移处理
|
||||
参数说明:setFlag 状态
|
||||
返回值:无
|
||||
*/
|
||||
void LabourCancelLSXianStaMoveProc(UINT8 setFlag);
|
||||
/*
|
||||
功能描述:人工取消临时限速状态迁移处理
|
||||
参数说明:setFlag 状态,UINT8 virCIid 虚拟联锁ID
|
||||
@@ -1900,92 +1897,7 @@ void SetLocalAreaIteCutInfo(const UINT8 cAreaIteCutNum, const UINT16 pAreaIteCut
|
||||
* Created By LQ 2025.05.08
|
||||
*/
|
||||
UINT16 GetRouteFirstLockedLogSecId(UINT16 wRouteId);
|
||||
/*
|
||||
* 功能描述:紧急临时限速处理
|
||||
* 参数说明:const UINT16 wPhySectionId 逻辑区段ID
|
||||
* const UINT8 chExiansuState 限速状态
|
||||
* 返 回 值:无
|
||||
* by 202500916
|
||||
*/
|
||||
|
||||
void EmergXianSuProcess(const UINT16 wPhySectionId, const UINT8 chExiansuState);
|
||||
|
||||
/*
|
||||
* 功能描述:获取全线雨雪模式命令CC
|
||||
* 参数说明:void
|
||||
* 返 回 值:0x55 有效
|
||||
* 0xAA 无效
|
||||
* Created By LQ 2025.11.07
|
||||
*/
|
||||
UINT8 GetAllSnowModelCC(void);
|
||||
|
||||
/*
|
||||
* 功能描述:设置全线雨雪模式命令CC
|
||||
* 参数说明:UINT8 setmodle 全线雨雪模式
|
||||
* 返 回 值:void
|
||||
* Created By LQ 2025.11.07
|
||||
*/
|
||||
void SetAllSnowModelCC(UINT8 setmodle);
|
||||
|
||||
/*
|
||||
* 功能描述:获取本地区间雨雪站台数量CC
|
||||
* 参数说明:无
|
||||
* 返 回 值:区间雨雪站台数量
|
||||
* Created By LQ 2025.11.06
|
||||
*/
|
||||
UINT8 GetLocalAreaSnowNumCC(void);
|
||||
|
||||
/*
|
||||
* 功能描述:获取本地区间雨雪信息CC
|
||||
* 参数说明:无
|
||||
* 返 回 值:区间雨雪信息
|
||||
* Created By LQ 2025.11.06
|
||||
*/
|
||||
AreaSnowInfoStruct* GetLocalAreaSnowCC(void);
|
||||
|
||||
/*
|
||||
* 功能描述:设置本地区间雨雪站台信息CC
|
||||
* 参数说明:const UINT8 cAreaSnowNum 区间雨雪数量
|
||||
* const AreaSnowInfoStruct pAreaSnowBuf[LOCAL_AREA_SNOW_SUM_MAX] 区间雨雪数组
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.06
|
||||
*/
|
||||
void SetLocalAreaSnowInfoCC(const UINT8 cAreaSnowNum, const AreaSnowInfoStruct pAreaSnowBuf[LOCAL_AREA_SNOW_SUM_MAX]);
|
||||
|
||||
/*
|
||||
* 功能描述:获取本地雨雪模式命令CC
|
||||
* 参数说明:无
|
||||
* 返 回 值:0x55 无效
|
||||
* 0xAA 有效
|
||||
* Created By LQ 2025.11.06
|
||||
*/
|
||||
UINT8 GetLocalSnowModelCC(void);
|
||||
|
||||
/*
|
||||
* 功能描述:设置本地雨雪模式命令CC
|
||||
* 参数说明:UINT8 setmodle 本地雨雪模式
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.06
|
||||
*/
|
||||
void SetLocalSnowModelCC(UINT8 setmodle);
|
||||
/*
|
||||
* 功能描述: 获取虚拟联锁类型
|
||||
* 参数说明: UINT8 chVirCiId 虚拟联锁ID
|
||||
* 返回值 :
|
||||
CI_TYPE_ZX ((UINT8)0x01) 正线联锁
|
||||
CI_TYPE_CLD ((UINT8)0x04) 车辆段联锁
|
||||
CI_TYPE_SCX ((UINT8)0x02) 试车线
|
||||
add by mpt 20260104
|
||||
*/
|
||||
UINT8 GetLocalVirCiType(UINT8 chVirCiId);
|
||||
/*
|
||||
* 功能描述:判断本联锁临时限速状态
|
||||
* 参数说明:无
|
||||
* 返 回 值:临时限速有效返回失败,清除或与ZC通信正常返回成功
|
||||
* Created :LYJ
|
||||
*/
|
||||
|
||||
UINT8 CheckLocalCiLSXSStata(void);
|
||||
/*
|
||||
功能描述:
|
||||
清除逻辑区段关联道岔单操位置
|
||||
@@ -1998,6 +1910,7 @@ UINT8 CheckLocalCiLSXSStata(void);
|
||||
add by mpt 20260403
|
||||
*/
|
||||
void ClearLogSeceSwitchDanCaoPos(const UINT16 logicSecId);
|
||||
|
||||
/*
|
||||
功能描述:
|
||||
清除计轴区段关联道岔单操位置
|
||||
@@ -2010,4 +1923,5 @@ void ClearLogSeceSwitchDanCaoPos(const UINT16 logicSecId);
|
||||
add by mpt 20260403
|
||||
*/
|
||||
void ClearAxisSeceSwitchDanCaoPos(const UINT16 axisSecId);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -443,14 +443,14 @@ UINT8 CheckRCIAPowerFaultState(void)
|
||||
gPlatDataGPIOTolercance.powerANode_TolCyc = dwCurCyc;
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else if (CI_TIME_IN == chCheckState)
|
||||
else if(CI_TIME_IN == chCheckState)
|
||||
{
|
||||
retVal = CI_SUCCESS;/*继续容忍*/
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
debug_infor_printf((const)"\nPLATIO_A_Node_Power_FaultState StartTime%d\n", dwErrorStartCyc);
|
||||
debug_infor_printf((const)"PLATIO_A_Node_Power_FaultState StartTime%d\n", dwErrorStartCyc);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -494,7 +494,7 @@ UINT8 CheckRCIBPowerFaultState(void)
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
debug_infor_printf((const)"\nPLATIO_B_Node_Power_FaultState StartTime%d\n", dwErrorStartCyc);
|
||||
debug_infor_printf((const)"PLATIO_B_Node_Power_FaultState StartTime%d\n", dwErrorStartCyc);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -515,6 +515,7 @@ UINT8 CheckRCIBPowerFaultState(void)
|
||||
UINT8 CheckRCIAPowerModeFaultState(void)
|
||||
{
|
||||
UINT8 retVal = CI_ERROR;
|
||||
|
||||
UINT8 powerAPUBAState = 0U; /*PUB A采集的24VA电源状态 1*/
|
||||
UINT8 powerBPUBAState = 0U; /*PUB A采集的24VB电源状态 3*/
|
||||
UINT8 vol1Flag = 0U; /*CPI A采集24VA电源 1*/
|
||||
@@ -550,7 +551,7 @@ UINT8 CheckRCIAPowerModeFaultState(void)
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
debug_infor_printf((const)"\nPLATIO_A_Mode_Power_FaultState StartTime%d\n", dwErrorStartCyc);
|
||||
debug_infor_printf((const)"PLATIO_A_Mode_Power_FaultState StartTime%d\n", dwErrorStartCyc);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -588,7 +589,7 @@ UINT8 CheckRCIBPowerModeFaultState(void)
|
||||
dwCurCyc = Get2oo2CurCycleNum();
|
||||
|
||||
/* 1、PUB B采集的24VA电源异常、或24VB电源异常
|
||||
2、CPI B采集24VA电源、或24VB电源电压为0V */
|
||||
2、CPI B采集24VA电源、或24VB电源电压为0V */
|
||||
if (((CHECK_VOLTAGE_ZERO == vol2Flag) || (CHECK_VOLTAGE_ZERO == vol4Flag))
|
||||
&& ((POWER_STATUS_ABNORMAL == powerAPUBBState) || (POWER_STATUS_ABNORMAL == powerBPUBBState)))
|
||||
{
|
||||
@@ -606,7 +607,7 @@ UINT8 CheckRCIBPowerModeFaultState(void)
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
debug_infor_printf((const)"\nPLATIO_B_Mode_Power_FaultState StartTime%d\n", dwErrorStartCyc);
|
||||
debug_infor_printf((const)"PLATIO_B_Mode_Power_FaultState StartTime%d\n", dwErrorStartCyc);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
#define CCU_CommBadEnsureTime_CycleCount ((UINT16)5u) /*应用与通控通信中断判断周期数*/
|
||||
|
||||
#define VOLTAGE_MAX_TO_0 ((UINT16)500U) /*电压判断为0的阈值*/
|
||||
|
||||
#define IO_POWERSTATE_TOLERANCE ((UINT8)0x02) /*平台电源报警容忍周期数,容忍3周期,超过2周期报警*/
|
||||
|
||||
/*平台心跳帧信息结构*/
|
||||
@@ -101,6 +102,7 @@ typedef struct S_PlatGPIODataStruct
|
||||
UINT8 ModepowerBState_PUB; /*机柜B系电源插箱中为CPUB供电的24VDC电源模块状态*/
|
||||
}PlatGPIODataStruct;
|
||||
|
||||
|
||||
/*平台发送的电源采集状态容忍同步数据*/
|
||||
typedef struct S_PlatGPIOToleranceData
|
||||
{
|
||||
@@ -112,7 +114,6 @@ typedef struct S_PlatGPIOToleranceData
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 清空指定通控板卡发送的心跳数据
|
||||
* 参数说明: 板卡ID
|
||||
|
||||
@@ -110,11 +110,6 @@
|
||||
#define EFUNC_SWITCHTESTLOGIC ((UINT8)0x80U) /*函数:SetSwitchTestLogicManage道岔定反位测试*/
|
||||
#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,12 +214,6 @@
|
||||
|
||||
#define EFUNC_OVERLAP_ZHAOCHA_CHECK ((UINT8)0xD3) /*保护区段照查条件检查*/
|
||||
|
||||
#define EFUNC_PARSE_LOCAL_CI2RC_DATA ((UINT8)0xD4U) /*函数:ParseCiToLocalRcDataFrame*/
|
||||
#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*/
|
||||
|
||||
/*************************************************分界线******************************************************************************/
|
||||
/*************************************************分界线******************************************************************************/
|
||||
@@ -246,8 +235,6 @@
|
||||
#define ETYPE_ROUTE_XUANPAI_OVERTIME ((UINT8)0x10) /*进路选排超时*/
|
||||
#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通信*/
|
||||
@@ -258,9 +245,6 @@
|
||||
#define ETYPE_COMM_WITH_PSC ((UINT8)0x15) /*CI与PSC通信*/
|
||||
|
||||
#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 */
|
||||
@@ -314,7 +298,6 @@
|
||||
/*保护区段类型*/
|
||||
#define ETYPE_OVERLAP_LABORUNLOCK_FAIL ((UINT8)0x51U) /*保护区段人工锁闭条件不满足*/
|
||||
#define ETYPE_OVERLAP_RES_CHECK_FAIL ((UINT8)0x52U) /*保护区段资源检查条件不满足*/
|
||||
#define ETYPE_OVERLAP_LABORUNLOCK_STATE ((UINT8)0x53U) /*保护区段人工解锁状态不满足*/
|
||||
|
||||
/* 道岔类型编码 (UINT8)0x61-(UINT8)0x7f */
|
||||
/* 设备类型 CI_DEVICE_TYPE_SWITCH */
|
||||
@@ -402,16 +385,6 @@
|
||||
#define ETYPE_LOGSEC_XIANSU_STATE ((UINT8)0xC5) /*逻辑区段限速设置*/
|
||||
#define ETYPE_LOGSEC_FIRSTLOCK_STATE ((UINT8)0xC6) /*逻辑区段为第一个锁闭区段检查*/
|
||||
#define ETYPE_LOGSEC_CBTC_PROPERTY ((UINT8)0xC7) /*逻辑区段CBTC属性检查*/
|
||||
#define ETYPE_LOGSEC_CONTINUOUS ((UINT8)0xC8) /*逻辑区段连续性检查*/
|
||||
|
||||
/*动态路径故障类型*/
|
||||
#define ETYPE_PART_ROUTE_RES ((UINT8)0xD0) /*动态路径资源检查*/
|
||||
#define ETYPE_PART_ROUTE_MATCH_ROUTE ((UINT8)0xD1) /*动态路径匹配进路检查*/
|
||||
#define ETYPE_PART_ROUTE_SCREEN ((UINT8)0xD2) /*动态路径列车筛选检查*/
|
||||
#define ETYPE_PART_ROUTE_REPEAT ((UINT8)0xD3) /*动态路径重复办理检查*/
|
||||
#define ETYPE_PART_ROUTE_SEC_ATTR ((UINT8)0xD4) /*动态路径区段属性检查*/
|
||||
#define ETYPE_PART_ROUTE_TRAIN_COMM ((UINT8)0xD5) /*动态路径列车通信状态检查*/
|
||||
#define ETYPE_PART_ROUTE_TRAIN_POS ((UINT8)0xD6) /*动态路径列车位置检查*/
|
||||
|
||||
/* 系统故障 */
|
||||
/* 设备类型 EFUNC_LOGIC_MANAGE_SYETEM */
|
||||
|
||||
@@ -662,55 +662,4 @@ UINT8 CheckEsbBelSendRange(const UINT16 wCheckEsbId)
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID紧急停车按钮关联的同站紧急按钮数量
|
||||
* 参数说明:const UINT16 esbId 紧急停车按钮ID
|
||||
* 返 回 值:同站紧急按钮数量
|
||||
* Created By LQ 2025.12.30
|
||||
*/
|
||||
UINT8 GetEsbRelOnePlatEsbNum(const UINT16 esbId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 reVal = 0U;
|
||||
|
||||
bufIndex = GetEsbConfigBufIndex(esbId); /*获取数组下标*/
|
||||
|
||||
if (ESB_SUM_MAX > bufIndex)
|
||||
{
|
||||
reVal = EsbConfigDataStru[bufIndex].RelOnePlatEsbNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*返回0*/
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID紧急停车按钮关联的同站紧急按钮ID数组
|
||||
* 参数说明:const UINT16 esbId 紧急停车按钮ID
|
||||
* 返 回 值:NULL 获取数据失败
|
||||
* 其它 同站紧急按钮ID数组
|
||||
* Created By LQ 2025.12.30
|
||||
*/
|
||||
UINT16* GetEsbRelOnePlatEsbId(const UINT16 esbId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT16* reVal = NULL;
|
||||
|
||||
bufIndex = GetEsbConfigBufIndex(esbId); /*获取数组下标*/
|
||||
|
||||
if (ESB_SUM_MAX > bufIndex)
|
||||
{
|
||||
reVal = EsbConfigDataStru[bufIndex].RelOnePlatEsbId;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*返回NULL*/
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "CommonTypes.h"
|
||||
#include "../System/CiSystemDefine.h"
|
||||
#include "../System/SystemParameterManage.h"
|
||||
#include "dquStructInit.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -51,8 +50,6 @@ typedef struct S_EsbConfigDataStruct
|
||||
UINT16 EsbCutoffBuzzRelayId; /*切除蜂鸣器报警继电器ID*/
|
||||
UINT8 ConfigAtsCiEssSteadyMask; /*是否配置了ATS-CI稳灯状态码位0x55 配置;0xaa未配置*/
|
||||
UINT8 ConfigAtsCiEssFlashMask; /*是否配置了ATS-CI闪灯状态码位0x55 配置;0xaa未配置*/
|
||||
UINT8 RelOnePlatEsbNum; /*关联同站ESB数量*/
|
||||
UINT16 RelOnePlatEsbId[ESB_PROTECT_LINK_NUM]; /*关联同站ESB ID数组*/
|
||||
} EsbConfigDataStruct;
|
||||
|
||||
/*******************************全局变量声明*******************************/
|
||||
@@ -296,23 +293,6 @@ UINT16 GetEsbCutoffBuzzRelayId(const UINT16 esbId);
|
||||
*/
|
||||
UINT8 CheckEsbBelSendRange(const UINT16 wCheckEsbId);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID紧急停车按钮关联的同站紧急按钮数量
|
||||
* 参数说明:const UINT16 esbId 紧急停车按钮ID
|
||||
* 返 回 值:同站紧急按钮数量
|
||||
* Created By LQ 2025.12.30
|
||||
*/
|
||||
UINT8 GetEsbRelOnePlatEsbNum(const UINT16 esbId);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID紧急停车按钮关联的同站紧急按钮ID数组
|
||||
* 参数说明:const UINT16 esbId 紧急停车按钮ID
|
||||
* 返 回 值:NULL 获取数据失败
|
||||
* 其它 同站紧急按钮ID数组
|
||||
* Created By LQ 2025.12.30
|
||||
*/
|
||||
UINT16* GetEsbRelOnePlatEsbId(const UINT16 esbId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -171,8 +171,6 @@ UINT8 EsbDataManageInit(void)
|
||||
EsbDataStru[esbId].EsbCutErrTriggerPressCycNum = 0U; /*紧急关闭旁路按钮误触发按下周期*/
|
||||
EsbDataStru[esbId].EsbCutErrorFlag = ESB_ERROR_FLAG_NO; /*紧急关闭旁路按钮未故障*/
|
||||
EsbDataStru[esbId].EsbCutRelayDownState = ESB_RELAY_ERROR_DOWN_YES; /*紧急关闭旁路按钮采集继电器落下状态初始化为通信异常落下*/
|
||||
EsbDataStru[esbId].cOnePlatEsbState = ESB_STATE_VALID_NO; /*初始化同站紧急按钮未激活*/
|
||||
EsbDataStru[esbId].cOnePlatEsbCutState = ESB_CUT_NO; /*初始化同站紧急旁路按钮未激活*/
|
||||
}
|
||||
rtn = CI_SUCCESS;
|
||||
return rtn;
|
||||
@@ -1074,303 +1072,4 @@ UINT8 GetEsbRelayDownState(const UINT16 esbId)
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID紧急停车按钮状态(融合了旁路状态)
|
||||
* 参数说明: const UINT16 esbId, 紧急停车按钮ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 紧急停车按钮状态
|
||||
*/
|
||||
UINT8 GetEsbMergeState(const UINT16 esbId)
|
||||
{
|
||||
|
||||
UINT8 reVal = CI_ERROR;
|
||||
UINT8 chEsbState = 0U;
|
||||
UINT8 chEsbCutState = 0U;
|
||||
|
||||
|
||||
chEsbState = GetEsbState(esbId);
|
||||
chEsbCutState = GetEsbCutState(esbId);
|
||||
if (ESB_CUT_YES == chEsbCutState)
|
||||
{
|
||||
reVal = ESB_STATE_VALID_NO;/*未按下*/
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ESB_STATE_VALID_NO == chEsbState)
|
||||
{
|
||||
reVal = ESB_STATE_VALID_NO;/*未按下*/
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = ESB_STATE_VALID_YES;
|
||||
}
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID紧急按钮同站紧急按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急停车按钮ID
|
||||
* 返 回 值:0 获取数据失败
|
||||
* 0x55 紧急未激活
|
||||
* 0xAA 紧急激活
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
UINT8 GetOnePlatEsbState(const UINT16 esbId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 reVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetEsbConfigBufIndex(esbId); /*获取数组下标*/
|
||||
|
||||
if (ESB_SUM_MAX > bufIndex)
|
||||
{
|
||||
reVal = EsbDataStru[bufIndex].cOnePlatEsbState;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*返回失败*/
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID紧急按钮同站紧急按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* const UINT8 esbState 紧急按钮状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
void SetOnePlatEsbState(const UINT16 esbId, const UINT8 esbState)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetEsbConfigBufIndex(esbId); /*获取数组下标*/
|
||||
|
||||
if (ESB_SUM_MAX > bufIndex)
|
||||
{
|
||||
if ((ESB_STATE_VALID_NO == esbState) || (ESB_STATE_VALID_YES == esbState))
|
||||
{
|
||||
EsbDataStru[bufIndex].cOnePlatEsbState = esbState; /*同站紧急按钮激活状态*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID紧急按钮同站紧急旁路按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急停车按钮ID
|
||||
* 返 回 值:0 获取数据失败
|
||||
* 0x55 旁路未激活
|
||||
* 0xAA 旁路激活
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
UINT8 GetOnePlatEsbCutState(const UINT16 esbId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 reVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetEsbConfigBufIndex(esbId); /*获取数组下标*/
|
||||
|
||||
if (ESB_SUM_MAX > bufIndex)
|
||||
{
|
||||
reVal = EsbDataStru[bufIndex].cOnePlatEsbCutState;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*返回失败*/
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID紧急按钮同站紧急旁路按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* const UINT8 esbCutState 紧急旁路按钮状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
void SetOnePlatEsbCutState(const UINT16 esbId, const UINT8 esbCutState)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetEsbConfigBufIndex(esbId); /*获取数组下标*/
|
||||
|
||||
if (ESB_SUM_MAX > bufIndex)
|
||||
{
|
||||
if ((ESB_CUT_NO == esbCutState) || (ESB_CUT_YES == esbCutState))
|
||||
{
|
||||
EsbDataStru[bufIndex].cOnePlatEsbCutState = esbCutState; /*同站紧急按钮激活状态*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:清除同站紧急按钮及旁路按钮激活状态
|
||||
* 参数说明:无
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.30
|
||||
*/
|
||||
void ClearOnePlatEsbAndCutState(void)
|
||||
{
|
||||
UINT16 wEsbTotalSum = 0U; /*ESB总数*/
|
||||
UINT16 ii = 0U;
|
||||
UINT16 wEsbId = 0U; /*ESB ID*/
|
||||
|
||||
wEsbTotalSum = GetTotalEsbCurNum();
|
||||
|
||||
/*重置所有紧急按钮的同站紧急按钮及旁路按钮为未激活状态*/
|
||||
for (ii = 0U; ii < wEsbTotalSum; ii++)
|
||||
{
|
||||
wEsbId = GetEsbId(ii);
|
||||
SetOnePlatEsbState(wEsbId, ESB_STATE_VALID_NO);
|
||||
SetOnePlatEsbCutState(wEsbId, ESB_CUT_NO);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID紧急按钮关联的其它同站紧急按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* const UINT8 esbState 紧急按钮状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
void SetRelOtherOnePlatEsbState(const UINT16 esbId, const UINT8 esbState)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 cRelOnePlatEsbNum = 0U; /*关联的其它同站紧急按钮数量*/
|
||||
UINT16* pRelOnePlatEsbId = NULL; /*关联的其它同站紧急按钮ID*/
|
||||
UINT8 ii = 0U;
|
||||
|
||||
bufIndex = GetEsbConfigBufIndex(esbId); /*获取数组下标*/
|
||||
cRelOnePlatEsbNum = GetEsbRelOnePlatEsbNum(esbId);
|
||||
pRelOnePlatEsbId = GetEsbRelOnePlatEsbId(esbId);
|
||||
|
||||
if ((ESB_SUM_MAX > bufIndex) && (0U < cRelOnePlatEsbNum) && (NULL != pRelOnePlatEsbId))
|
||||
{
|
||||
if ((ESB_STATE_VALID_NO == esbState) || (ESB_STATE_VALID_YES == esbState))
|
||||
{
|
||||
for (ii = 0U; ii < cRelOnePlatEsbNum; ii++)
|
||||
{
|
||||
SetOnePlatEsbState(pRelOnePlatEsbId[ii], esbState);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID紧急按钮关联的其它同站紧急旁路按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* const UINT8 esbCutState 紧急旁路按钮状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
void SetRelOtherOnePlatEsbCutState(const UINT16 esbId, const UINT8 esbCutState)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 cRelOnePlatEsbNum = 0U; /*关联的其它同站紧急按钮数量*/
|
||||
UINT16* pRelOnePlatEsbId = NULL; /*关联的其它同站紧急按钮ID*/
|
||||
UINT8 ii = 0U;
|
||||
|
||||
bufIndex = GetEsbConfigBufIndex(esbId); /*获取数组下标*/
|
||||
cRelOnePlatEsbNum = GetEsbRelOnePlatEsbNum(esbId);
|
||||
pRelOnePlatEsbId = GetEsbRelOnePlatEsbId(esbId);
|
||||
|
||||
if ((ESB_SUM_MAX > bufIndex) && (0U < cRelOnePlatEsbNum) && (NULL != pRelOnePlatEsbId))
|
||||
{
|
||||
if ((ESB_CUT_NO == esbCutState) || (ESB_CUT_YES == esbCutState))
|
||||
{
|
||||
for (ii = 0U; ii < cRelOnePlatEsbNum; ii++)
|
||||
{
|
||||
SetOnePlatEsbCutState(pRelOnePlatEsbId[ii], esbCutState);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:检查指定ID紧急按钮关联的其它同站紧急按钮状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* 返 回 值:1 紧急无效或旁路有效
|
||||
* 0 紧急有效
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
UINT8 CheckRelOtherOnePlatEsbState(const UINT16 esbId)
|
||||
{
|
||||
UINT8 cRetVal = CI_ERROR;
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 cRelOnePlatEsbNum = 0U; /*关联的其它同站紧急按钮数量*/
|
||||
UINT16* pRelOnePlatEsbId = NULL; /*关联的其它同站紧急按钮ID*/
|
||||
UINT8 ii = 0U;
|
||||
UINT8 cEsbState = 0U; /*紧急按钮状态*/
|
||||
UINT8 cEsbCutState = 0U; /*紧急按钮旁路状态*/
|
||||
|
||||
bufIndex = GetEsbConfigBufIndex(esbId); /*获取数组下标*/
|
||||
cRelOnePlatEsbNum = GetEsbRelOnePlatEsbNum(esbId);
|
||||
pRelOnePlatEsbId = GetEsbRelOnePlatEsbId(esbId);
|
||||
|
||||
if ((ESB_SUM_MAX > bufIndex) && (NULL != pRelOnePlatEsbId))
|
||||
{
|
||||
cRetVal = CI_SUCCESS;
|
||||
for (ii = 0U; ii < cRelOnePlatEsbNum; ii++)
|
||||
{
|
||||
cEsbState = GetEsbState(pRelOnePlatEsbId[ii]);
|
||||
cEsbCutState = GetEsbCutState(pRelOnePlatEsbId[ii]);
|
||||
|
||||
if ((ESB_STATE_VALID_NO == cEsbState) || (ESB_CUT_YES == cEsbCutState))
|
||||
{
|
||||
/*继续检查*/
|
||||
}
|
||||
else
|
||||
{
|
||||
cRetVal = CI_ERROR; /*存在一个ESB紧急有效且旁路无效,返回0*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cRetVal = CI_ERROR; /*入参非法,返回0*/
|
||||
}
|
||||
|
||||
return cRetVal;
|
||||
}
|
||||
@@ -49,8 +49,6 @@ typedef struct S_EsbDataStruct
|
||||
UINT32 EsbCutErrTriggerPressCycNum; /*紧急关闭旁路按钮误触发按下周期*/
|
||||
UINT8 EsbCutErrorFlag; /*紧急关闭旁路按钮故障标志,0x55-未故障,0xaa-故障*/
|
||||
UINT8 EsbCutRelayDownState; /*紧急关闭旁路按钮采集继电器落下状态,0x55-正常采集落下,0xaa-通信异常落下*/
|
||||
UINT8 cOnePlatEsbState; /*同站紧急按钮激活状态:0x55-未激活,0xAA-激活*/
|
||||
UINT8 cOnePlatEsbCutState; /*同站紧急旁路按钮激活状态:0x55-未激活,0xAA-激活*/
|
||||
} EsbDataStruct;
|
||||
|
||||
/*******************************全局变量声明*******************************/
|
||||
@@ -408,86 +406,6 @@ void SetEsbRelayDownState(const UINT16 esbId, const UINT8 cRelayDownState);
|
||||
* Created By LQ 2025.04.01
|
||||
*/
|
||||
UINT8 GetEsbRelayDownState(const UINT16 esbId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID紧急停车按钮状态(融合了旁路状态)
|
||||
* 参数说明: const UINT16 esbId, 紧急停车按钮ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 紧急停车按钮状态
|
||||
*/
|
||||
UINT8 GetEsbMergeState(const UINT16 esbId);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID紧急按钮同站紧急按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急停车按钮ID
|
||||
* 返 回 值:0 获取数据失败
|
||||
* 0x55 紧急未激活
|
||||
* 0xAA 紧急激活
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
UINT8 GetOnePlatEsbState(const UINT16 esbId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID紧急按钮同站紧急按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* const UINT8 esbState 紧急按钮状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
void SetOnePlatEsbState(const UINT16 esbId, const UINT8 esbState);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID紧急按钮同站紧急旁路按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急停车按钮ID
|
||||
* 返 回 值:0 获取数据失败
|
||||
* 0x55 旁路未激活
|
||||
* 0xAA 旁路激活
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
UINT8 GetOnePlatEsbCutState(const UINT16 esbId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID紧急按钮同站紧急旁路按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* const UINT8 esbCutState 紧急旁路按钮状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
void SetOnePlatEsbCutState(const UINT16 esbId, const UINT8 esbCutState);
|
||||
|
||||
/*
|
||||
* 功能描述:清除同站紧急按钮及旁路按钮激活状态
|
||||
* 参数说明:无
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.30
|
||||
*/
|
||||
void ClearOnePlatEsbAndCutState(void);
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID紧急按钮关联的其它同站紧急按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* const UINT8 esbState 紧急按钮状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
void SetRelOtherOnePlatEsbState(const UINT16 esbId, const UINT8 esbState);
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID紧急按钮关联的其它同站紧急旁路按钮激活状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* const UINT8 esbCutState 紧急旁路按钮状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
void SetRelOtherOnePlatEsbCutState(const UINT16 esbId, const UINT8 esbCutState);
|
||||
|
||||
/*
|
||||
* 功能描述:检查指定ID紧急按钮关联的其它同站紧急按钮状态
|
||||
* 参数说明:const UINT16 esbId 紧急按钮ID
|
||||
* 返 回 值:1 紧急无效或旁路有效
|
||||
* 0 紧急有效
|
||||
* Created By LQ 2025.12.29
|
||||
*/
|
||||
UINT8 CheckRelOtherOnePlatEsbState(const UINT16 esbId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ else
|
||||
UINT8 elm_PrepareTrainSafeLoc(UINT16 trainID,INOUT ELM_TrainSafeLocStruct* pTrainSafeLoc)
|
||||
{
|
||||
UINT8 chRtnVal = CI_ERROR;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainID & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainID & 0x00ffu));
|
||||
|
||||
if (NULL != pTrainSafeLoc)
|
||||
{
|
||||
@@ -1012,7 +1012,7 @@ UINT32 elm_PrepareTrainLength(UINT16 trainid)
|
||||
UINT8 chTrainType = 0u;
|
||||
UINT8 chFunRtn = CI_ERROR;
|
||||
UINT32 dwRtnVal = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
|
||||
/*获取列车类型*/
|
||||
chFunRtn = dquGetTrainType(wTrainID, &chTrainType);
|
||||
@@ -1074,7 +1074,7 @@ UINT8 elm_PrepareNextAcMinSafeHeadLoc(UINT16 trainid, OUT UINT16 acID[AC_MAXCNT_
|
||||
UINT8 chFunRtn = CI_ERROR;
|
||||
LinkPointDataStru strPoint = { 0u };
|
||||
UINT16 wSwitchId = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
UINT8 cDirectionPointFlag = 0U; /*是否具有方向变化点标志*/
|
||||
|
||||
|
||||
@@ -1135,7 +1135,7 @@ UINT8 elm_PrepareMaxSafeHeadLoc(UINT16 trainid, OUT LOD_STRU *pLoc)
|
||||
UINT16 wLink = 0u;
|
||||
UINT32 dwOff = UINT32_MAX;
|
||||
UINT8 chDir = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
|
||||
|
||||
wLink = GetTrainMaxHeadLink(wTrainID);
|
||||
@@ -1169,7 +1169,7 @@ UINT8 elm_PrepareMinSafeHeadLoc(UINT16 trainid, OUT LOD_STRU *pLoc)
|
||||
UINT16 wLink = 0u;
|
||||
UINT32 dwOff = UINT32_MAX;
|
||||
UINT8 chDir = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
|
||||
|
||||
wLink = GetTrainMinHeadLink(wTrainID);
|
||||
@@ -1200,7 +1200,7 @@ UINT16 elm_PrepareACOfMaxSafeHeadLoc(UINT16 trainid)
|
||||
UINT16 wMinHeadLink = 0u;
|
||||
UINT8 chFunRtn = CI_ERROR;
|
||||
UINT16 wRtn = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
|
||||
wMinHeadLink = GetTrainMaxHeadLink(wTrainID);
|
||||
chFunRtn = IsLinkIdValid(wMinHeadLink);
|
||||
@@ -1227,7 +1227,7 @@ UINT16 elm_PrepareACOfMinSafeHeadLoc(UINT16 trainid)
|
||||
UINT16 wMinHeadLink = 0u;
|
||||
UINT8 chFunRtn = CI_ERROR;
|
||||
UINT16 wRtn = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
|
||||
wMinHeadLink = GetTrainMinHeadLink(wTrainID);
|
||||
chFunRtn = IsLinkIdValid(wMinHeadLink);
|
||||
@@ -1261,7 +1261,7 @@ UINT8 elm_PrepareNextAcMaxSafeTailLoc(UINT16 trainid, OUT UINT16 acID[AC_MAXCNT_
|
||||
UINT8 chFunRtn = CI_ERROR;
|
||||
LinkPointDataStru strPoint = { 0u };
|
||||
UINT16 wSwitchId = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
UINT8 cDirectionPointFlag = 0U; /*是否具有方向变化点标志*/
|
||||
|
||||
|
||||
@@ -1324,7 +1324,7 @@ UINT8 elm_PrepareMaxSafeTailLoc(UINT16 trainid, OUT LOD_STRU *pLoc)
|
||||
UINT16 wLink = 0u;
|
||||
UINT32 dwOff = UINT32_MAX;
|
||||
UINT8 chDir = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
|
||||
wLink = GetTrainMaxTailLink(wTrainID);
|
||||
dwOff = GetTrainMaxTailOffset(wTrainID);
|
||||
@@ -1357,7 +1357,7 @@ UINT8 elm_PrepareMinSafeTailLoc(UINT16 trainid, OUT LOD_STRU *pLoc)
|
||||
UINT16 wLink = 0u;
|
||||
UINT32 dwOff = UINT32_MAX;
|
||||
UINT8 chDir = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
|
||||
wLink = GetTrainMinTailLink(wTrainID);
|
||||
dwOff = GetTrainMinTailOffset(wTrainID);
|
||||
@@ -1387,7 +1387,7 @@ UINT16 elm_PrepareACOfMaxSafeTailLoc(UINT16 trainid)
|
||||
UINT16 wMaxTailLink = 0u;
|
||||
UINT8 chFunRtn = CI_ERROR;
|
||||
UINT16 wRtn = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
|
||||
wMaxTailLink = GetTrainMaxTailLink(wTrainID);
|
||||
chFunRtn = IsLinkIdValid(wMaxTailLink);
|
||||
@@ -1414,7 +1414,7 @@ UINT16 elm_PrepareACOfMinSafeTailLoc(UINT16 trainid)
|
||||
UINT16 wMaxTailLink = 0u;
|
||||
UINT8 chFunRtn = CI_ERROR;
|
||||
UINT16 wRtn = 0u;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainid & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainid & 0x00ffu));
|
||||
|
||||
wMaxTailLink = GetTrainMinTailLink(wTrainID);
|
||||
chFunRtn = IsLinkIdValid(wMaxTailLink);
|
||||
@@ -1529,7 +1529,7 @@ UINT8 elm_PrepareEnvelopeIsSelf(IN const EnvelopeStruct* ptemp)
|
||||
/** 在一个OC*/
|
||||
ret = ELM_BELONG_OWNER;
|
||||
}
|
||||
else if ((localOCid != pointABelongOcid) && (localOCid != pointBBelongOcid))
|
||||
else if((localOCid != pointABelongOcid) && (localOCid != pointBBelongOcid))
|
||||
{
|
||||
/** 不在同一OC*/
|
||||
ret = ELM_BELONG_OTHER;
|
||||
@@ -1652,7 +1652,7 @@ UINT8 elm_PrepareComOCID(IN const UINT8 **pOCIDbuff)
|
||||
else
|
||||
{
|
||||
/** 获取本OC通信的OC数量 */
|
||||
ret = GetCiTransmitSpecifySysDevSum(CI_SYSTEM_TYPE_RCI);
|
||||
ret = GetCiTransmitSpecifySysDevSum(CI_SYSTEM_TYPE_CI);
|
||||
|
||||
/** 判断是否存在,不存在直接返回*/
|
||||
if (0u == ret)
|
||||
@@ -1662,7 +1662,7 @@ UINT8 elm_PrepareComOCID(IN const UINT8 **pOCIDbuff)
|
||||
else
|
||||
{
|
||||
/** 获取相邻通信的TIOC ID */
|
||||
(*pOCIDbuff) = GetCiTransmitSpecifySysDevBuf(CI_SYSTEM_TYPE_RCI);
|
||||
(*pOCIDbuff) = GetCiTransmitSpecifySysDevBuf(CI_SYSTEM_TYPE_CI);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1683,8 +1683,8 @@ UINT8 elm_PrepareOCCommStatus(UINT8 OCID)
|
||||
UINT8 ret = ELM_COM_STATUS_ERROR;
|
||||
UINT8 funRtn = TRANSMIT_STATE_BAD;
|
||||
|
||||
/** 获取Rc通信状态 */
|
||||
funRtn = GetRcPbTacsTransmitState(OCID);
|
||||
/** 获取OC通信状态 */
|
||||
funRtn = GetCiTransmitState(CI_SYSTEM_TYPE_CI,OCID);
|
||||
|
||||
/** 设置函数返回值 */
|
||||
ASSERT_SETRET(TRANSMIT_STATE_GOOD == funRtn,ret,ELM_COM_STATUS_OK,ELM_COM_STATUS_ERROR)
|
||||
@@ -1771,7 +1771,7 @@ UINT8 elm_PrepareTrainSafeHeadFlag(UINT16 trainId)
|
||||
{
|
||||
UINT8 ret = CI_ERROR;
|
||||
UINT16 funRtn = TRAIN_HEAD_FLAG_YES;
|
||||
UINT16 wTrainID = (UINT16)(TRAIN_ID_MIN_IVOC + (trainId & 0x00ffU));
|
||||
UINT16 wTrainID = (UINT16)(0x1400u + (trainId & 0x00ffu));
|
||||
|
||||
funRtn = GetTrainSafeHeadFlag(wTrainID);
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#define TRAIN_IN_ENVELOPE_SUM_MAX (15u) /*列车包络中包含的列车最大数量(开区间)*/
|
||||
#define SECTION_IN_ENVELOPE_SUM_MAX (10u) /*列车包络中包含的区段最大个数(开区间)*/
|
||||
#define SECTION_REL_ENVELOPE_SUM_MAX (15u) /*区段关联的包络最大个数(开区间)*/
|
||||
#define OTHER_RC_SEND_ENVELOPE_SUM_MAX (50u) /*相邻联锁发送最大包络数量*/
|
||||
#define TRAIN_REL_ENVELOPE_SUM_MAX (15u) /*列车关联的包络最大个数(开区间)*/
|
||||
#define MAX_ENVELOPE_LOG_NUM (10000U) /*包络日志打印缓存大小*/
|
||||
|
||||
|
||||
@@ -330,6 +330,12 @@ static void elm_FlyingProtect(void)
|
||||
UINT16 wTrainId = 0U;
|
||||
UINT8 chTimeCheck = 0u;
|
||||
UINT32 dwFlyOverCyc = 0U;
|
||||
UINT8 cNvramFlag = 0U; /*列车使用NVRAM标志*/
|
||||
UINT8 cPosMonistorState = 0U; /*列车位置监督状态*/
|
||||
UINT8 cFuncSwitch = 0U; /*使用NVRAM位置且位置监督无效的列车飞车不宕机开关:0xAA-飞车不宕机 0x55-飞车宕机*/
|
||||
|
||||
/*周期清除使用NVRAM位置且位置监督无效的飞车信息*/
|
||||
ClearNvramFlyingTrain();
|
||||
|
||||
chCTCheck = elm_FlyingProtect_CT(); /*检查CT飞车*/
|
||||
elm_FlyingProtect_UCT();/*UCT包络飞车删除为UKT*/
|
||||
@@ -344,7 +350,7 @@ static void elm_FlyingProtect(void)
|
||||
{
|
||||
/** 获取数据配置的飞车宕机最大冗余时间 */
|
||||
maxShutdownRedunTime = elm_PrepareCTFlyingRedunTime();
|
||||
|
||||
cFuncSwitch = GetCiFunctionSwitchConfig(FUNC_NVRAM_TRAIN_FlYING_OVER);
|
||||
for (ii = 0U; ii < trainCnt; ii++)
|
||||
{
|
||||
wTrainId = GetTrainId(ii);
|
||||
@@ -352,13 +358,23 @@ static void elm_FlyingProtect(void)
|
||||
{
|
||||
dwFlyStartCyc = GetTrainStartFlyProtectCycNum(wTrainId);
|
||||
chTimeCheck = SystemOverTimeCheck(dwFlyStartCyc, (UINT32)maxShutdownRedunTime);
|
||||
if (CI_TIME_OUT== chTimeCheck)
|
||||
|
||||
if (CI_TIME_OUT== chTimeCheck)
|
||||
{
|
||||
SetFlyProtectOverCyc(dwCurCyc); /*飞车标志*/
|
||||
cNvramFlag = GetTrainNvramPosFlag(wTrainId);
|
||||
cPosMonistorState = GetTrainPosMonitorState(wTrainId);
|
||||
if ((TRAIN_NVRAM_POS_FLAG_YES == cNvramFlag) && (TRAIN_POS_MONITOR_VALID != cPosMonistorState) && (FUNC_SWITCH_ON == cFuncSwitch))
|
||||
{
|
||||
/*使用NVRAM位置且位置监督无效的列车飞车后,若NVRAM列车飞车不宕机开关打开,RC仅向列车发飞车特控报文,不宕机*/
|
||||
}
|
||||
else
|
||||
{
|
||||
SetFlyProtectOverCyc(dwCurCyc); /*飞车标志*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*未超过冗余时间*/
|
||||
; /*未超过冗余时间或列车通信中断*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1183,7 +1199,7 @@ void elm_AddNextOCEnvelopetoBuff(UINT8 OCid)
|
||||
UINT16 buffIndex = ENVELOPE_UNVAILD_INDEX;
|
||||
UINT32 errorCode = 0u;
|
||||
EnvelopeStruct tempEnvelope = {0u};
|
||||
CfpEnvelopeStruct InfEnvelope[SECTION_REL_ENVELOPE_SUM_MAX * ONE_OTHER_CFP_SUM_MAX] = {0u};
|
||||
CfpEnvelopeStruct InfEnvelope[OTHER_RC_SEND_ENVELOPE_SUM_MAX * ONE_OTHER_CFP_SUM_MAX] = {0u};
|
||||
|
||||
/** 获取OC发送的包络信息个数 */
|
||||
envelopeCnt = elm_PrepareNextOcInfEnvelope(OCid,InfEnvelope);
|
||||
@@ -3048,9 +3064,13 @@ UINT8 elm_UCTEnvelopeLeaveAC(UINT8 flag,IN const EnvelopeStruct* pEnvelope,UINT1
|
||||
UINT32 dwFlyStartCyc = 0U;
|
||||
UINT8 chTimeCheck = 0U;
|
||||
UINT8 flyCheck = 0U;
|
||||
UINT8 cNvramFlag = 0U; /*列车使用NVRAM标志*/
|
||||
UINT8 cPosMonistorState = 0U; /*列车位置监督状态*/
|
||||
UINT8 cFuncSwitch = 0U; /*使用NVRAM位置且位置监督无效的列车飞车不宕机开关:0xAA-飞车不宕机 0x55-飞车宕机*/
|
||||
|
||||
/** CT飞车防护*/
|
||||
trainCnt = elm_PrepareCommTrainID(trainID);
|
||||
|
||||
cFuncSwitch = GetCiFunctionSwitchConfig(FUNC_NVRAM_TRAIN_FlYING_OVER);
|
||||
/** 遍历所有的通信车 */
|
||||
for (cycle = 0u; cycle < trainCnt; cycle++)
|
||||
{
|
||||
@@ -3097,7 +3117,17 @@ UINT8 elm_UCTEnvelopeLeaveAC(UINT8 flag,IN const EnvelopeStruct* pEnvelope,UINT1
|
||||
chTimeCheck = SystemOverTimeCheck(dwFlyStartCyc, (UINT32)maxShutdownRedunTime);
|
||||
if (CI_TIME_OUT == chTimeCheck)
|
||||
{
|
||||
elm_AddFlyingTrain(trainID[cycle], pEnvelop->id);
|
||||
cNvramFlag = GetTrainNvramPosFlag(trainID[cycle]);
|
||||
cPosMonistorState = GetTrainPosMonitorState(trainID[cycle]);
|
||||
if ((TRAIN_NVRAM_POS_FLAG_YES == cNvramFlag) && (TRAIN_POS_MONITOR_VALID != cPosMonistorState) && (FUNC_SWITCH_ON == cFuncSwitch))
|
||||
{
|
||||
/*使用NVRAM位置且位置监督无效的列车飞车后,若NVRAM列车飞车不宕机开关打开,RC仅向列车发飞车特控报文,不宕机*/
|
||||
AddNvramFlyingTrain(trainID[cycle]);
|
||||
}
|
||||
else
|
||||
{
|
||||
elm_AddFlyingTrain(trainID[cycle], pEnvelop->id);
|
||||
}
|
||||
}
|
||||
flyCheck++;
|
||||
}
|
||||
|
||||
@@ -2114,8 +2114,10 @@ static UINT8 elm_UCTEnvelopeHeadHandle(UINT8 endlineFlag, IN const EnvelopeStruc
|
||||
wAgLink = GetBGLinkRelAGLinkId(wLinkId);
|
||||
chBgUtSwitch = GetNoCGFollowUtSwitch();
|
||||
wNextLinkId = FindAdjacentLinkIDSafe(wLinkId, ptemp->endPos.Dir, &wSwitchId, &cDirectionPointFlag);
|
||||
if ((FUNC_SWITCH_ON == chBgUtSwitch) && (LINK_REL_PHYSEC_BG == chBgAtt) && (wNextLinkId == wAgLink) && ((pPretemp->startPos.Lnk == wAgLink) || (pPretemp->endPos.Lnk == wAgLink)))
|
||||
{/* B轨UT可追踪开关打开,UCT处于B轨,相邻区段是A轨,CT包络在A轨,此场景不延伸 */
|
||||
if ((FUNC_SWITCH_ON == chBgUtSwitch) && (LINK_REL_PHYSEC_BG == chBgAtt) && (wNextLinkId == wAgLink)
|
||||
&& ((pPretemp->startPos.Lnk == wAgLink) || (pPretemp->endPos.Lnk == wAgLink))
|
||||
&& (1U == ptemp->ACCnt))
|
||||
{/* B轨UT可追踪开关打开,UCT仅处于B轨,相邻区段是A轨,CT包络在A轨,此场景不延伸 */
|
||||
ret = 0x55u;
|
||||
}
|
||||
else
|
||||
@@ -2784,8 +2786,10 @@ static UINT8 elm_UCTEnvelopeTailHandle(UINT8 endlineFlag, const EnvelopeStruct *
|
||||
wAgLink = GetBGLinkRelAGLinkId(wLinkId);
|
||||
chBgUtSwitch = GetNoCGFollowUtSwitch();
|
||||
wNextLinkId = FindAdjacentLinkIDSafe(wLinkId, ~ptemp->startPos.Dir, &wSwitchId, &cDirectionPointFlag);
|
||||
if ((FUNC_SWITCH_ON == chBgUtSwitch) && (LINK_REL_PHYSEC_BG == chBgAtt) && (wNextLinkId == wAgLink) && ((pBacktemp->startPos.Lnk == wAgLink) || (pBacktemp->endPos.Lnk == wAgLink)))
|
||||
{/* B轨UT可追踪开关打开,UCT处于B轨,相邻区段是A轨,CT包络在A轨,此场景不延伸 */
|
||||
if ((FUNC_SWITCH_ON == chBgUtSwitch) && (LINK_REL_PHYSEC_BG == chBgAtt) && (wNextLinkId == wAgLink)
|
||||
&& ((pBacktemp->startPos.Lnk == wAgLink) || (pBacktemp->endPos.Lnk == wAgLink))
|
||||
&& (1U == ptemp->ACCnt))
|
||||
{/* B轨UT可追踪开关打开,UCT仅处于B轨,相邻区段是A轨,CT包络在A轨,此场景不延伸 */
|
||||
ret = 0x55u;
|
||||
}
|
||||
else
|
||||
@@ -3291,10 +3295,11 @@ static UINT8 elm_UCTEnvelopeMoving(const EnvelopeStruct* ptemp)
|
||||
* @return CI_ERROR 转换失败
|
||||
* CI_SUCCESS 转换成功
|
||||
* @note CT包络转换成UCT时,需要满足:
|
||||
1,无前端可疑
|
||||
2、包络内包含的道岔无四开且占用,
|
||||
3,不为休眠车,
|
||||
4、列车车长不小于两倍线路最小车长
|
||||
1,无前端可疑
|
||||
2、包络内包含的道岔无四开且占用,
|
||||
3,不为休眠车,
|
||||
4、列车车长不小于两倍线路最小车长
|
||||
* by cgh 20250915
|
||||
*/
|
||||
static UINT8 elm_ConvertToUCTCheck(const EnvelopeStruct* ptemp)
|
||||
{
|
||||
@@ -3306,6 +3311,7 @@ static UINT8 elm_ConvertToUCTCheck(const EnvelopeStruct* ptemp)
|
||||
UINT32 minTrainLength = 0U;
|
||||
UINT32 dwTempLength = 0U;
|
||||
UINT8 chTrainNvramPosFlag = 0U;
|
||||
UINT8 chTrainIsIsFollowUtFlag = 0U;/*是否为列车可追踪UT*/
|
||||
|
||||
/** 入口参数校验 */
|
||||
ASSERT_RET_VALUE(NULL == ptemp,ret,0x80000000U);
|
||||
@@ -3357,6 +3363,17 @@ static UINT8 elm_ConvertToUCTCheck(const EnvelopeStruct* ptemp)
|
||||
{
|
||||
; /* 不满足转为UCT条件 */
|
||||
}
|
||||
|
||||
if (0U == errorCode)
|
||||
{
|
||||
/** 获取列车是否处于可追踪UT场景 */
|
||||
chTrainIsIsFollowUtFlag = CheckTrainIsFollowUt(ptemp->id);
|
||||
ASSER_ERROR(CI_SUCCESS == chTrainIsIsFollowUtFlag, errorCode, 0x02000000U);
|
||||
}
|
||||
else
|
||||
{
|
||||
; /* 不满足转为UCT条件 */
|
||||
}
|
||||
|
||||
/** 设置函数返回值 */
|
||||
ASSERT_SETRET(0U == errorCode,ret,CI_SUCCESS,CI_ERROR);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
|
||||
FloodGateDataStruct FloodGateDataStru[FLOOD_GATE_SUM_MAX]; /*定义防淹门动态数据*/
|
||||
FloodGateDataStructCC FloodGateDataStruCC[FLOOD_GATE_SUM_MAX]; /*定义防淹门动态数据-车车*/
|
||||
|
||||
|
||||
/*
|
||||
@@ -27,16 +26,7 @@ FloodGateDataStruct *GetFloodGateData(void)
|
||||
{
|
||||
return FloodGateDataStru;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取防淹门数据结构体指针车车
|
||||
* 参数说明:
|
||||
* 返回值 :
|
||||
FloodGateDataStructCC *
|
||||
*/
|
||||
FloodGateDataStructCC* GetFloodGateDataCC(void)
|
||||
{
|
||||
return FloodGateDataStruCC;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID防淹门开门锁闭状态
|
||||
@@ -492,7 +482,7 @@ UINT8 GetFloodGateCloseApplyIvocSum(const UINT16 floodGateId)
|
||||
|
||||
if (0u < bufIndex)
|
||||
{
|
||||
reVal = FloodGateDataStruCC[bufIndex].FloodGateCloseApplyIvocSum;
|
||||
reVal = FloodGateDataStru[bufIndex].FloodGateCloseApplyIvocSum;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -515,7 +505,7 @@ void SetFloodGateCloseApplyIvocSum(const UINT16 floodGateId, const UINT8 wTrainS
|
||||
|
||||
if (0u < bufIndex)
|
||||
{
|
||||
FloodGateDataStruCC[bufIndex].FloodGateCloseApplyIvocSum = wTrainSum;
|
||||
FloodGateDataStru[bufIndex].FloodGateCloseApplyIvocSum = wTrainSum;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -537,7 +527,7 @@ UINT16* GetFloodGateCloseApplyIvocId(const UINT16 floodGateId)
|
||||
|
||||
if (0u < bufIndex)
|
||||
{
|
||||
applyIvocBuf = FloodGateDataStruCC[bufIndex].FloodGateCloseApplyIvocId;
|
||||
applyIvocBuf = FloodGateDataStru[bufIndex].FloodGateCloseApplyIvocId;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -559,11 +549,11 @@ void SetFloodGateCloseApplyIvocId(const UINT16 floodGateId, const UINT16* applyI
|
||||
|
||||
if (0u < bufIndex)
|
||||
{
|
||||
(void)CommonMemSet(FloodGateDataStruCC[bufIndex].FloodGateCloseApplyIvocId,
|
||||
(void)CommonMemSet(FloodGateDataStru[bufIndex].FloodGateCloseApplyIvocId,
|
||||
(UINT32)(sizeof(UINT16)*FLOOD_GATE_APPLY_TRAIN_SUM_MAX),
|
||||
0U, (UINT32)(sizeof(UINT16)*FLOOD_GATE_APPLY_TRAIN_SUM_MAX)); /*先出清,防止脏数据*/
|
||||
|
||||
(void)CommonMemCpy(FloodGateDataStruCC[bufIndex].FloodGateCloseApplyIvocId, /*赋值申请的列车ID*/
|
||||
(void)CommonMemCpy(FloodGateDataStru[bufIndex].FloodGateCloseApplyIvocId, /*赋值申请的列车ID*/
|
||||
(UINT32)(sizeof(UINT16)*FLOOD_GATE_APPLY_TRAIN_SUM_MAX),
|
||||
applyIvocBuf, (UINT32)(sizeof(UINT16)*FLOOD_GATE_APPLY_TRAIN_SUM_MAX));
|
||||
}
|
||||
@@ -584,7 +574,7 @@ FloodGateTrainAnsStruct* GetFloodGateCloseFromIvocStru(const UINT16 floodGateId)
|
||||
|
||||
if (0u < bufIndex)
|
||||
{
|
||||
retVal = FloodGateDataStruCC[bufIndex].FloodGateCloseFromIvocStru;
|
||||
retVal = FloodGateDataStru[bufIndex].FloodGateCloseFromIvocStru;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -620,7 +610,7 @@ void SetFloodGateAllowCloseFlagIVOC(UINT16 floodGateId, UINT16 wTrainId, UINT8 a
|
||||
trainSumIndex = chIvocSum;
|
||||
for (ii = 0U; ii < chIvocSum; ii++)
|
||||
{
|
||||
if (FloodGateDataStruCC[bufIndex].FloodGateCloseFromIvocStru[ii].wTrainId == wTrainId)
|
||||
if (FloodGateDataStru[bufIndex].FloodGateCloseFromIvocStru[ii].wTrainId == wTrainId)
|
||||
{
|
||||
retVal = CI_ERROR; /*已存入过的列车,且回复了,不再存入*/
|
||||
break;
|
||||
@@ -629,8 +619,8 @@ void SetFloodGateAllowCloseFlagIVOC(UINT16 floodGateId, UINT16 wTrainId, UINT8 a
|
||||
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
FloodGateDataStruCC[bufIndex].FloodGateCloseFromIvocStru[trainSumIndex].wTrainId = wTrainId;
|
||||
FloodGateDataStruCC[bufIndex].FloodGateCloseFromIvocStru[trainSumIndex].wFloodGateCloseIvocFlag = agreeFlag; /*检查标志的时候,查所有起始周期询问的列车是否都回复了同意*/
|
||||
FloodGateDataStru[bufIndex].FloodGateCloseFromIvocStru[trainSumIndex].wTrainId = wTrainId;
|
||||
FloodGateDataStru[bufIndex].FloodGateCloseFromIvocStru[trainSumIndex].wFloodGateCloseIvocFlag = agreeFlag; /*检查标志的时候,查所有起始周期询问的列车是否都回复了同意*/
|
||||
chIvocSum++;
|
||||
SetFloodGateCloseAnsIvocSum(floodGateId, chIvocSum);
|
||||
}
|
||||
@@ -663,8 +653,8 @@ void ClearFloodGateAllowClosFlagIVOC(UINT16 floodGateId)
|
||||
{
|
||||
for (ii = 0U; ii < chIvocSum; ii++)
|
||||
{
|
||||
FloodGateDataStruCC[bufIndex].FloodGateCloseFromIvocStru[ii].wTrainId = 0U;
|
||||
FloodGateDataStruCC[bufIndex].FloodGateCloseFromIvocStru[ii].wFloodGateCloseIvocFlag = FLOOD_GATE_NOT_ALLOWCLOSE_IVOC;
|
||||
FloodGateDataStru[bufIndex].FloodGateCloseFromIvocStru[ii].wTrainId = 0U;
|
||||
FloodGateDataStru[bufIndex].FloodGateCloseFromIvocStru[ii].wFloodGateCloseIvocFlag = FLOOD_GATE_NOT_ALLOWCLOSE_IVOC;
|
||||
}
|
||||
SetFloodGateCloseAnsIvocSum(floodGateId, 0U);
|
||||
}
|
||||
@@ -684,7 +674,7 @@ UINT8 GetFloodGateAccessUTFlag(const UINT16 floodGateId)
|
||||
|
||||
if (0u < bufIndex)
|
||||
{
|
||||
reVal = FloodGateDataStruCC[bufIndex].FloodGateAccessUTFlag;
|
||||
reVal = FloodGateDataStru[bufIndex].FloodGateAccessUTFlag;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -709,7 +699,7 @@ void SetFloodGateAccessUTFlag(const UINT16 floodGateId, const UINT8 accessUTFlag
|
||||
{
|
||||
if ((FLOOD_GATE_ACCESS_UT_YES == accessUTFlag) || (FLOOD_GATE_ACCESS_UT_NO == accessUTFlag))
|
||||
{/*混跑或者纯CT跑*/
|
||||
FloodGateDataStruCC[bufIndex].FloodGateAccessUTFlag = accessUTFlag;
|
||||
FloodGateDataStru[bufIndex].FloodGateAccessUTFlag = accessUTFlag;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -732,7 +722,7 @@ UINT8 GetFloodGateCloseAnsIvocSum(const UINT16 floodGateId)
|
||||
|
||||
if (0u < bufIndex)
|
||||
{
|
||||
reVal = FloodGateDataStruCC[bufIndex].FloodGateCloseAnsIvocSum;
|
||||
reVal = FloodGateDataStru[bufIndex].FloodGateCloseAnsIvocSum;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -755,7 +745,7 @@ void SetFloodGateCloseAnsIvocSum(const UINT16 floodGateId, const UINT8 wTrainSum
|
||||
|
||||
if (0u < bufIndex)
|
||||
{
|
||||
FloodGateDataStruCC[bufIndex].FloodGateCloseAnsIvocSum = wTrainSum;
|
||||
FloodGateDataStru[bufIndex].FloodGateCloseAnsIvocSum = wTrainSum;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -50,23 +50,21 @@ typedef struct S_FloodGateDataStruct
|
||||
* 条件1为当前关门请求为是,且条件2满足,当前同意关门状态才为同意;
|
||||
*/
|
||||
UINT8 CurAgreeCloseStateOut; /*当前同意关门输出状态(动态字段):FLOOD_GATE_AGREE_CLOSE、FLOOD_GATE_NOT_AGREE_CLOSE*/
|
||||
UINT32 CurYGJCrossLineStartCount;/*当前YGJ混线开始时间*/
|
||||
UINT32 CurFloodGateDelayCloseStartCyc; /*防淹门接近区段占压延时关门开始时间*/
|
||||
} FloodGateDataStruct;
|
||||
|
||||
/*防淹门数据结构体*/
|
||||
typedef struct S_FloodGateDataStructCC
|
||||
{
|
||||
UINT16 FloodGateId; /*防淹门ID (初始化字段)*/
|
||||
UINT32 CurYGJCrossLineStartCount;/*当前YGJ混线开始时间*/
|
||||
|
||||
UINT32 CurFloodGateDelayCloseStartCyc; /*防淹门接近区段占压延时关门开始时间*/
|
||||
UINT8 FloodGateCloseApplyIvocSum; /*防淹门关门申请列车数量*/
|
||||
UINT16 FloodGateCloseApplyIvocId[FLOOD_GATE_APPLY_TRAIN_SUM_MAX]; /*防淹门关门申请列车ID*/
|
||||
|
||||
UINT8 FloodGateCloseAnsIvocSum; /*防淹门关门允许,列车回复数量*/
|
||||
FloodGateTrainAnsStruct FloodGateCloseFromIvocStru[FLOOD_GATE_APPLY_TRAIN_SUM_MAX]; /*列车同意防淹门关门请求结构体*/
|
||||
UINT8 FloodGateAccessUTFlag; /*防淹门接近区段是否有非通信车标志*/
|
||||
}FloodGateDataStructCC;
|
||||
} FloodGateDataStruct;
|
||||
|
||||
/*******************************全局变量声明*******************************/
|
||||
extern FloodGateDataStruct FloodGateDataStru[FLOOD_GATE_SUM_MAX]; /*定义防淹门动态数据*/
|
||||
extern FloodGateDataStructCC FloodGateDataStruCC[FLOOD_GATE_SUM_MAX]; /*定义防淹门动态数据-车车*/
|
||||
|
||||
/*
|
||||
* 功能描述: 获取防淹门数据结构体指针
|
||||
* 参数说明:
|
||||
@@ -74,13 +72,6 @@ extern FloodGateDataStructCC FloodGateDataStruCC[FLOOD_GATE_SUM_MAX]; /*
|
||||
FloodGateDataStruct *
|
||||
*/
|
||||
FloodGateDataStruct *GetFloodGateData(void);
|
||||
/*
|
||||
* 功能描述: 获取防淹门数据结构体指针车车
|
||||
* 参数说明:
|
||||
* 返回值 :
|
||||
FloodGateDataStructCC *
|
||||
*/
|
||||
FloodGateDataStructCC* GetFloodGateDataCC(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID防淹门开门锁闭状态
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "WLScreenDataPrepare.h"
|
||||
|
||||
GaragedoorDataStruct GaragedoorDataStru[GARAGE_DOOR_SUM_MAX]; /*定义车库门数据结构体*/
|
||||
GaragedoorDataStructCC GaragedoorDataStruCC[GARAGE_DOOR_SUM_MAX]; /*定义车库门数据结构体-车车*/
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定车库门数据
|
||||
@@ -26,16 +26,7 @@ GaragedoorDataStruct *GetGaragedoorData(void)
|
||||
{
|
||||
return GaragedoorDataStru;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定车库门数据-车车
|
||||
* 参数说明:
|
||||
* 返回值 :
|
||||
GaragedoorDataStructCC *
|
||||
*/
|
||||
GaragedoorDataStructCC* GetGaragedoorDataCC(void)
|
||||
{
|
||||
return GaragedoorDataStruCC;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID车库门状态
|
||||
* 参数说明: const UINT16 garagedoorId, 车库门ID
|
||||
@@ -152,7 +143,7 @@ UINT8 GetGaragedoorAllowCloseFlagIVOC(const UINT16 garagedoorId)
|
||||
|
||||
if (bufIndex < GARAGE_DOOR_SUM_MAX)
|
||||
{
|
||||
reVal = GaragedoorDataStruCC[bufIndex].GDAllowCloseFlagIVOC;
|
||||
reVal = GaragedoorDataStru[bufIndex].GDAllowCloseFlagIVOC;
|
||||
}
|
||||
|
||||
return reVal;
|
||||
@@ -176,7 +167,7 @@ void SetGaragedoorAllowCloseFlagIVOC(const UINT16 garagedoorId, const UINT8 allo
|
||||
if ((GARAGE_DOOR_ALLOW_CLOSE_YES == allowCloseFlag) || (GARAGE_DOOR_ALLOW_CLOSE_NO == allowCloseFlag))
|
||||
{
|
||||
|
||||
GaragedoorDataStruCC[bufIndex].GDAllowCloseFlagIVOC = allowCloseFlag; /*允许关门标志*/
|
||||
GaragedoorDataStru[bufIndex].GDAllowCloseFlagIVOC = allowCloseFlag; /*允许关门标志*/
|
||||
|
||||
}
|
||||
}
|
||||
@@ -199,7 +190,7 @@ UINT16 GetGaragedoorNearestTrainId(const UINT16 garagedoorId)
|
||||
|
||||
if (bufIndex < GARAGE_DOOR_SUM_MAX)
|
||||
{
|
||||
reVal = GaragedoorDataStruCC[bufIndex].GDAkuNearestTrainId;
|
||||
reVal = GaragedoorDataStru[bufIndex].GDAkuNearestTrainId;
|
||||
}
|
||||
|
||||
return reVal;
|
||||
@@ -224,7 +215,7 @@ void SetGaragedoorNearestTrainId(const UINT16 garagedoorId, const UINT16 trainId
|
||||
if (UINT16_MAX!= trainId)
|
||||
{
|
||||
|
||||
GaragedoorDataStruCC[bufIndex].GDAkuNearestTrainId = trainId; /*允许关门标志*/
|
||||
GaragedoorDataStru[bufIndex].GDAkuNearestTrainId = trainId; /*允许关门标志*/
|
||||
|
||||
}
|
||||
}
|
||||
@@ -570,7 +561,7 @@ void SetWaiteIVOCResponseStartCycNum(const UINT16 garagedoorId, const UINT32 sta
|
||||
|
||||
if (bufIndex < GARAGE_DOOR_SUM_MAX)
|
||||
{
|
||||
GaragedoorDataStruCC[bufIndex].waiteIVOCResponseStartCycNum = startCycNum; /*起始周期号*/
|
||||
GaragedoorDataStru[bufIndex].waiteIVOCResponseStartCycNum = startCycNum; /*起始周期号*/
|
||||
}
|
||||
|
||||
}
|
||||
@@ -590,7 +581,7 @@ UINT32 GetWaiteIVOCResponseStartCycNum(const UINT16 garagedoorId)
|
||||
|
||||
if (bufIndex < GARAGE_DOOR_SUM_MAX)
|
||||
{
|
||||
ret = GaragedoorDataStruCC[bufIndex].waiteIVOCResponseStartCycNum;
|
||||
ret = GaragedoorDataStru[bufIndex].waiteIVOCResponseStartCycNum;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -32,7 +32,8 @@ typedef struct S_GaragedoorDataStruct
|
||||
UINT16 GaragedoorId; /*车库门ID (初始化字段)*/
|
||||
UINT8 GaragedoorState; /*车库门状态 (动态字段)*/
|
||||
UINT8 GaragedoorAllowCloseFlag; /*车库门允许关门标志,ZC发送*/
|
||||
|
||||
UINT8 GDAllowCloseFlagIVOC; /*车库门允许关门标志,IVOC发送*/
|
||||
UINT16 GDAkuNearestTrainId; /*A库物理区段上最接近的列车*/
|
||||
UINT8 GaragedoorModeState; /*车库门模式状态*/
|
||||
UINT8 GaragedoorFaultState; /*车库门故障状态*/
|
||||
UINT8 GaragedoorPangLuState; /*车库门旁路状态*/
|
||||
@@ -40,21 +41,14 @@ typedef struct S_GaragedoorDataStruct
|
||||
UINT8 cmdProcessState; /* 命令处理状态 */
|
||||
UINT32 drvDoorStartCycle; /* 驱动开始时间,预留 */
|
||||
UINT32 waiteZCResponseStartCycNum; /*等待ZC反馈开始时间*/
|
||||
|
||||
UINT32 waiteIVOCResponseStartCycNum; /*等待IVOC反馈开始时间*/
|
||||
UINT32 GaragedoorOpenStartCycNum; /*车库门打开开始周期 (动态字段)*/
|
||||
UINT32 GaragedoorCloseStartCycNum; /*车库门关闭开始周期 (动态字段)*/
|
||||
} GaragedoorDataStruct;
|
||||
/*车库门数据结构体*/
|
||||
typedef struct S_GaragedoorDataStructCC
|
||||
{
|
||||
UINT16 GaragedoorId; /*车库门ID (初始化字段)*/
|
||||
UINT8 GDAllowCloseFlagIVOC; /*车库门允许关门标志,IVOC发送*/
|
||||
UINT16 GDAkuNearestTrainId; /*A库物理区段上最接近的列车*/
|
||||
UINT32 waiteIVOCResponseStartCycNum; /*等待IVOC反馈开始时间*/
|
||||
}GaragedoorDataStructCC;
|
||||
|
||||
|
||||
extern GaragedoorDataStruct GaragedoorDataStru[GARAGE_DOOR_SUM_MAX]; /*定义车库门数据结构体*/
|
||||
extern GaragedoorDataStructCC GaragedoorDataStruCC[GARAGE_DOOR_SUM_MAX]; /*定义车库门数据结构体-车车*/
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定车库门数据
|
||||
* 参数说明:
|
||||
@@ -62,13 +56,6 @@ extern GaragedoorDataStructCC GaragedoorDataStruCC[GARAGE_DOOR_SUM_MAX]; /*
|
||||
GaragedoorDataStruct *
|
||||
*/
|
||||
GaragedoorDataStruct *GetGaragedoorData(void);
|
||||
/*
|
||||
* 功能描述: 获取指定车库门数据-车车
|
||||
* 参数说明:
|
||||
* 返回值 :
|
||||
GaragedoorDataStructCC *
|
||||
*/
|
||||
GaragedoorDataStructCC* GetGaragedoorDataCC(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID车库门驱动状态
|
||||
|
||||
@@ -93,7 +93,7 @@ UINT8 HLHTRecvCommonPacketHeadCheck(UINT16 LocalDevName, UINT16 RemoteDevName, U
|
||||
UINT32 LocalEtcsId = 0u; /*发送方标识*/
|
||||
UINT32 RemoteEtcsId = 0u; /*接收方标识*/
|
||||
UINT32 emapVer = 0U;/*应该使用的电子地图版本*/
|
||||
UINT8 emapCheckVer = CI_ERROR; /*电子地图版本获取结果*/
|
||||
UINT8 emapCheckVer = 0U; /*电子地图版本校验结果*/
|
||||
UINT8 chRet = 0U;
|
||||
|
||||
/*错误码每次都清零*/
|
||||
@@ -109,66 +109,29 @@ UINT8 HLHTRecvCommonPacketHeadCheck(UINT16 LocalDevName, UINT16 RemoteDevName, U
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
if ((CI_SYSTEM_TYPE_OC == devType) || (CI_SYSTEM_TYPE_XIANDI == devType) || (CI_SYSTEM_TYPE_ATS == devType))
|
||||
/*发送方校验*/
|
||||
chRet = dquDevName2HlhtId(LocalDevName, logId, &LocalEtcsId);
|
||||
if ((CI_ERROR == chRet) || (pMICommonPackage->sourceId != LocalEtcsId))
|
||||
{
|
||||
/*OC/现地/ATS无互联互通ID*/
|
||||
if ((UINT16)(pMICommonPackage->sourceId & 0x0000FFFFU) != LocalDevName)
|
||||
{
|
||||
*pErrorCode |= GAL_COMPARE_SEND_FLAG_ERR;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
if((UINT16)(pMICommonPackage->destId & 0x0000FFFFU) != RemoteDevName)
|
||||
{
|
||||
*pErrorCode |= GAL_COMPARE_RECV_FLAG_ERR;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
*pErrorCode |= GAL_COMPARE_SEND_FLAG_ERR;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*发送方校验*/
|
||||
chRet = dquDevName2HlhtId(LocalDevName, logId, &LocalEtcsId);
|
||||
if ((CI_ERROR == chRet) || (pMICommonPackage->sourceId != LocalEtcsId))
|
||||
{
|
||||
*pErrorCode |= GAL_COMPARE_SEND_FLAG_ERR;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
/*接收方校验*/
|
||||
chRet = dquDevName2HlhtId(RemoteDevName, logId, &RemoteEtcsId);
|
||||
if ((CI_ERROR == chRet) || (pMICommonPackage->destId != RemoteEtcsId))
|
||||
{
|
||||
*pErrorCode |= GAL_COMPARE_RECV_FLAG_ERR;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
if ((CI_SYSTEM_TYPE_CI == devType) || (CI_SYSTEM_TYPE_RC == devType))
|
||||
/*接收方校验*/
|
||||
chRet = dquDevName2HlhtId(RemoteDevName, logId, &RemoteEtcsId);
|
||||
if ((CI_ERROR == chRet) || (pMICommonPackage->destId != RemoteEtcsId))
|
||||
{
|
||||
/*修改:根据发送方类型获取电子地图校验*/
|
||||
emapVer = GetCiTranCiDataCheckVer((UINT8)(RemoteDevName & 0x00FFU), LocalDevName);
|
||||
emapCheckVer = CI_SUCCESS;
|
||||
}
|
||||
else if (CI_SYSTEM_TYPE_OC == devType)
|
||||
{
|
||||
emapVer = GetCiTranOcDataCheckVer((UINT8)(RemoteDevName & 0x00FFU), LocalDevName);
|
||||
emapCheckVer = CI_SUCCESS;
|
||||
*pErrorCode |= GAL_COMPARE_RECV_FLAG_ERR;
|
||||
}
|
||||
else
|
||||
{
|
||||
emapCheckVer = GetCiEmapCheckVer((UINT8)RemoteDevName, &emapVer, devType);
|
||||
;
|
||||
}
|
||||
|
||||
emapCheckVer = GetCiEmapCheckVer((UINT8)RemoteDevName, &emapVer, devType);
|
||||
if (CI_SUCCESS == emapCheckVer)
|
||||
{
|
||||
/*电子地图版本校验信息(4字节CRC比较)*/
|
||||
|
||||
@@ -15,22 +15,15 @@
|
||||
#include "../2oo2/2oo2InterfaceDataManage.h"
|
||||
#include "CommonMemory.h"
|
||||
|
||||
HLHTHeadContextStru ciHLHTHeadCtxs[CI_SUM_MAX]={0U};/*存放与本控区通信的相邻CI互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru gSzRcHLHTHeadCtxs[CI_SUM_MAX] = { 0U }; /*存放与本控区通信的相邻RC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru ciHLHTHeadCtxsCiToRc[CI_SUM_MAX] = { 0U };/*存放本控区CI同步的相邻CI互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru gSzRcHLHTHeadCtxsCiToRc[CI_SUM_MAX] = { 0U }; /*存放本控区CI同步的相邻RC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru vobcHLHTHeadCtxs[VOBC_SUM_MAX]={0U};/*存放与本CI通信的VOBC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru vobcBackupHLHTHeadCtxs[VOBC_BACKUP_SUM_MAX] = { 0U };/*存放与本CI通信的后备模式VOBC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru zcHLHTHeadCtxs[ZC_SUM_MAX]={0U};/*存放与本CI通信的ZC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru ocHLHTHeadCtxs[OC_SUM_MAX]={0U};/*存放与本CI通信的OC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru ocHLHTHeadCtxsCiToRc[OC_SUM_MAX] = { 0U };/*存放同步的CI通-OC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru axleHLHTHeadCtxs[AXLE_SUM_MAX] = { 0U };/*存放与本CI通信的计轴系统互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru gSzRcAxleHLHTHeadCtxs[AXLE_SUM_MAX] = { 0U };/*存放与RC通信的计轴系统互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru tmcHLHTHeadCtxs[TMC_SUM_MAX] = { 0U };/*存放与本TIOC通信的TMC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru ciHLHTHeadCtxs[CI_SUM_MAX]={0};/*存放与本CI通信的相邻CI互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru vobcHLHTHeadCtxs[VOBC_SUM_MAX]={0};/*存放与本CI通信的VOBC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru vobcBackupHLHTHeadCtxs[VOBC_BACKUP_SUM_MAX] = { 0 };/*存放与本CI通信的后备模式VOBC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru zcHLHTHeadCtxs[ZC_SUM_MAX]={0};/*存放与本CI通信的ZC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru ocHLHTHeadCtxs[OC_SUM_MAX]={0};/*存放与本CI通信的OC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru axleHLHTHeadCtxs[AXLE_SUM_MAX] = { 0 };/*存放与本CI通信的计轴系统互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru tmcHLHTHeadCtxs[TMC_SUM_MAX] = { 0 };/*存放与本TIOC通信的TMC互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru IteHLHTHeadCtxs[ITE_SUM_MAX][VOBC_INC_ITE_SUM_MAX] = { 0U };/*存放与本TIOC通信的ITE互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru gSzXiandiHLHTHeadCtxs[ATS_SUM_MAX] = { 0U };/*存放与本CI通信的现地互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru gSzAtsHLHTHeadCtxs[ATS_SUM_MAX] = { 0U };/*存放与本CI通信的ATS互联互通报文头上下文数据*/
|
||||
HLHTHeadContextStru vobcToRcHLHTHeadCtxs[VOBC_SUM_MAX] = { 0 };/*RC模式下,存放与本RC通信的510 VOBC互联互通报文头上下文数据。CI模式下不使用*/
|
||||
|
||||
/*
|
||||
* 功能描述:本地函数,获得某种设备类型的用于后续运算的互联互通头上下文数据
|
||||
* 参数说明:
|
||||
@@ -424,7 +417,6 @@ void ProcHlhtHeadCtxTimeOut(void)
|
||||
{
|
||||
UINT32 timeoutSnCount = 0U;
|
||||
UINT32 timeoutSpan = 0U;
|
||||
UINT8 chSystemWorkType = GetSystemWorkType();; /*系统工作类型*/
|
||||
|
||||
/*处理VOBC通用报文头的时效性*/
|
||||
timeoutSnCount = GetCiAndVobcTransBadEnsureCnt();
|
||||
@@ -444,11 +436,6 @@ void ProcHlhtHeadCtxTimeOut(void)
|
||||
timeoutSpan = GetCiAndCiTransmitBadEnsureTime();
|
||||
ProcHlhtHeadCtxTimeOutDiffSys(timeoutSnCount, timeoutSpan, ciHLHTHeadCtxs, CI_SUM_MAX);
|
||||
|
||||
/*处理RC通用报文头的时效性*/
|
||||
timeoutSnCount = GetCiAndCiTransBadEnsureCnt();
|
||||
timeoutSpan = GetCiAndCiTransmitBadEnsureTime();
|
||||
ProcHlhtHeadCtxTimeOutDiffSys(timeoutSnCount, timeoutSpan, gSzRcHLHTHeadCtxs, CI_SUM_MAX);
|
||||
|
||||
/*处理与CI通信的ZC通用报文头的时效性*/
|
||||
timeoutSnCount = GetCiAndZcTransBadEnsureCnt();
|
||||
timeoutSpan = GetCiAndZcTransmitBadEnsureTime();
|
||||
@@ -464,38 +451,10 @@ void ProcHlhtHeadCtxTimeOut(void)
|
||||
timeoutSpan = GetCiAndOcTransmitBadEnsureTime();
|
||||
ProcHlhtHeadCtxTimeOutDiffSys(timeoutSnCount, timeoutSpan, ocHLHTHeadCtxs, OC_SUM_MAX);
|
||||
|
||||
#if 0
|
||||
/*不需要处理CI同步过来的数据 需要留着周期号用来做接收数据判断*/
|
||||
ProcHlhtHeadCtxTimeOutDiffSys(timeoutSnCount, timeoutSpan, ocHLHTHeadCtxsCiToRc, OC_SUM_MAX);
|
||||
#endif
|
||||
/*处理与AXLE通信报文头的时效性*/
|
||||
timeoutSnCount = GetCiAndAxleTransBadEnsureCnt();
|
||||
timeoutSpan = GetCiAndAxleTransBadEnsureTime();
|
||||
ProcHlhtHeadCtxTimeOutDiffSys(timeoutSnCount, timeoutSpan, axleHLHTHeadCtxs, AXLE_SUM_MAX);
|
||||
if ((SYSTEM_WORK_MODE_ALL == chSystemWorkType) && (RC_WORK_MODE_TIOC == CI_SYSTEM_TYPE_RCI))
|
||||
{
|
||||
/*双系统RC还需要处理RC通用报文头*/
|
||||
ProcHlhtHeadCtxTimeOutDiffSys(timeoutSnCount, timeoutSpan, gSzRcAxleHLHTHeadCtxs, AXLE_SUM_MAX);
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*处理与现地通信报文头的时效性*/
|
||||
timeoutSnCount = GetCiAndAtsTransBadEnsureCnt();
|
||||
timeoutSpan = GetCiAndAtsTransBadEnsureTime();
|
||||
ProcHlhtHeadCtxTimeOutDiffSys(timeoutSnCount, timeoutSpan, gSzXiandiHLHTHeadCtxs, ATS_SUM_MAX);
|
||||
|
||||
/*处理与ATS通信报文头的时效性*/
|
||||
timeoutSnCount = GetCiAndAtsTransBadEnsureCnt();
|
||||
timeoutSpan = GetCiAndAtsTransBadEnsureTime();
|
||||
ProcHlhtHeadCtxTimeOutDiffSys(timeoutSnCount, timeoutSpan, gSzAtsHLHTHeadCtxs, ATS_SUM_MAX);
|
||||
|
||||
/*处理VOBC通用报文头的时效性*/
|
||||
timeoutSnCount = GetCiAndVobcTransBadEnsureCnt();
|
||||
timeoutSpan = GetCiAndVobcTransBadEnsureTime();
|
||||
ProcHlhtHeadCtxTimeOutDiffSys(timeoutSnCount, timeoutSpan, vobcToRcHLHTHeadCtxs, VOBC_SUM_MAX);
|
||||
}
|
||||
/*
|
||||
* 功能描述: 根据设备类型,获得具备初始通信互联互通头的所有设备ID
|
||||
@@ -578,43 +537,18 @@ static UINT8 GetHLHTHeadCtxTmepVars(const UINT8 devType, UINT16 *devMaxSum, HLHT
|
||||
UINT8 retVal = CI_ERROR;
|
||||
UINT16 maxDevSum = 0u;
|
||||
HLHTHeadContextStru *tempHeadCtxPtr = NULL;
|
||||
UINT8 chSystemWorkType = GetSystemWorkType();/*系统工作类型*/
|
||||
UINT8 cRcWorkMode = 0U;/*本系统当前工作模式*/
|
||||
|
||||
cRcWorkMode = GetLocalRcWorkMode();
|
||||
|
||||
if (CI_SYSTEM_TYPE_CI == devType)
|
||||
if ((CI_SYSTEM_TYPE_CI == devType))
|
||||
{
|
||||
maxDevSum = CI_SUM_MAX;
|
||||
tempHeadCtxPtr = ciHLHTHeadCtxs;
|
||||
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else if (CI_SYSTEM_TYPE_RC == devType)
|
||||
{
|
||||
maxDevSum = CI_SUM_MAX;
|
||||
tempHeadCtxPtr = gSzRcHLHTHeadCtxs;
|
||||
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else if (CI_SYSTEM_TYPE_VOBC == devType)
|
||||
{
|
||||
maxDevSum = VOBC_SUM_MAX;
|
||||
if (RC_WORK_MODE_CI == cRcWorkMode)
|
||||
{
|
||||
tempHeadCtxPtr = vobcHLHTHeadCtxs;
|
||||
}
|
||||
else
|
||||
{/*RC模式下*/
|
||||
tempHeadCtxPtr = vobcToRcHLHTHeadCtxs;
|
||||
}
|
||||
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else if (CI_SYSTEM_TYPE_IVOC == devType)
|
||||
{
|
||||
maxDevSum = VOBC_SUM_MAX;
|
||||
tempHeadCtxPtr = vobcHLHTHeadCtxs;
|
||||
tempHeadCtxPtr = vobcHLHTHeadCtxs;
|
||||
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
@@ -642,15 +576,8 @@ static UINT8 GetHLHTHeadCtxTmepVars(const UINT8 devType, UINT16 *devMaxSum, HLHT
|
||||
else if (CI_SYSTEM_TYPE_AXIS == devType)
|
||||
{
|
||||
maxDevSum = AXLE_SUM_MAX;
|
||||
if((SYSTEM_WORK_MODE_ALL == chSystemWorkType) && (RC_WORK_MODE_TIOC == CI_SYSTEM_TYPE_RCI))
|
||||
{
|
||||
tempHeadCtxPtr = gSzRcAxleHLHTHeadCtxs;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempHeadCtxPtr = axleHLHTHeadCtxs;
|
||||
}
|
||||
|
||||
tempHeadCtxPtr = axleHLHTHeadCtxs;
|
||||
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else if (CI_SYSTEM_TYPE_TMC == devType)
|
||||
@@ -660,20 +587,6 @@ static UINT8 GetHLHTHeadCtxTmepVars(const UINT8 devType, UINT16 *devMaxSum, HLHT
|
||||
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else if (CI_SYSTEM_TYPE_XIANDI == devType)
|
||||
{
|
||||
maxDevSum = ATS_SUM_MAX;
|
||||
tempHeadCtxPtr = gSzXiandiHLHTHeadCtxs;
|
||||
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else if (CI_SYSTEM_TYPE_ATS == devType)
|
||||
{
|
||||
maxDevSum = ATS_SUM_MAX;
|
||||
tempHeadCtxPtr = gSzAtsHLHTHeadCtxs;
|
||||
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
@@ -701,7 +614,7 @@ static void ProcHlhtHeadCtxTimeOutDiffSys(const UINT32 timeoutSnCount, const UIN
|
||||
HLHTHeadContextStru tempHeadCtx = { 0u };
|
||||
UINT8 headValid = 0u;
|
||||
INT32 remainValidiy;/*剩余的时间*/
|
||||
UINT8 chRcID = 0U;
|
||||
|
||||
if (NULL != headCtxs)
|
||||
{
|
||||
for (i = 0u;i < headCount;i++)
|
||||
@@ -739,9 +652,21 @@ static void ProcHlhtHeadCtxTimeOutDiffSys(const UINT32 timeoutSnCount, const UIN
|
||||
|
||||
if (0u == headValid)
|
||||
{
|
||||
(void)CommonMemSet(&(headCtxs[i]), (UINT32)sizeof(HLHTHeadContextStru), 0u, (UINT32)sizeof(HLHTHeadContextStru));
|
||||
headCtxs[i].sourceCrntOwnMsgSN = 0xFFFFFFFFu;
|
||||
headCtxs[i].ciPreRecvOwnSn = 0xFFFFFFFFu;
|
||||
if (headCtxs == axleHLHTHeadCtxs) /*计轴系统中断时,GAL层对方序号,收到对方数据时本方序号,设置0xFFFFFFFF*/
|
||||
{
|
||||
headCtxs[i].logId = 0u;
|
||||
headCtxs[i].sourceRecvOppMsgSN = 0u;
|
||||
headCtxs[i].sourcePreOwnMsgSN = 0u;
|
||||
headCtxs[i].sourceComPeriod = 0u;
|
||||
headCtxs[i].sourceCrntOwnMsgSN = 0xFFFFFFFFu;
|
||||
headCtxs[i].ciPreRecvOwnSn = 0xFFFFFFFFu;
|
||||
}
|
||||
else
|
||||
{
|
||||
(void)CommonMemSet(&(headCtxs[i]), (UINT32)sizeof(HLHTHeadContextStru), 0u, (UINT32)sizeof(HLHTHeadContextStru));
|
||||
headCtxs[i].sourceCrntOwnMsgSN = 0xFFFFFFFFu;
|
||||
headCtxs[i].ciPreRecvOwnSn = 0xFFFFFFFFu;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1257,73 +1182,4 @@ void ProcIteHlhtHeadCtxTimeOut(const UINT32 dwTimeoutSnCount, const UINT32 dwTim
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定oc的CI-RC同步互联互通报文头上下文数据
|
||||
* 参数说明:const UINT8 oc ID
|
||||
* 返 回 值:NULL 获取数据失败
|
||||
* 非NULL 获取数据成功
|
||||
* Created By fan 2025.11.12
|
||||
*/
|
||||
HLHTHeadContextStru* GetCiToRcHLHTOcHeadCtx(const UINT8 ocId)
|
||||
{
|
||||
HLHTHeadContextStru* pstrRetVal = NULL;
|
||||
|
||||
if ((0U < ocId) && (OC_SUM_MAX > ocId))
|
||||
{
|
||||
pstrRetVal = &ocHLHTHeadCtxsCiToRc[ocId];
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
return pstrRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定CI的CI-RC同步CI互联互通报文头上下文数据
|
||||
* 参数说明:const UINT8 chDevId 设备ID
|
||||
* 返 回 值:NULL 获取数据失败
|
||||
* 非NULL 获取数据成功
|
||||
* Created By fan 2025.12.31
|
||||
*/
|
||||
HLHTHeadContextStru* GetCiToRcWithCiHeadCtx(const UINT8 chDevId)
|
||||
{
|
||||
HLHTHeadContextStru* pstrRetVal = NULL;
|
||||
|
||||
if ((0U < chDevId) && (CI_SUM_MAX > chDevId))
|
||||
{
|
||||
pstrRetVal = &ciHLHTHeadCtxsCiToRc[chDevId];
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
return pstrRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定CI的CI-RC同步RC互联互通报文头上下文数据
|
||||
* 参数说明:const UINT8 chDevId 设备ID
|
||||
* 返 回 值:NULL 获取数据失败
|
||||
* 非NULL 获取数据成功
|
||||
* Created By fan 2025.12.31
|
||||
*/
|
||||
HLHTHeadContextStru* GetCiToRcWithRcHeadCtx(const UINT8 chDevId)
|
||||
{
|
||||
HLHTHeadContextStru* pstrRetVal = NULL;
|
||||
|
||||
if ((0U < chDevId) && (CI_SUM_MAX > chDevId))
|
||||
{
|
||||
pstrRetVal = &gSzRcHLHTHeadCtxsCiToRc[chDevId];
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
return pstrRetVal;
|
||||
}
|
||||
@@ -38,22 +38,15 @@ extern "C" {
|
||||
} HLHTHeadContextStru;
|
||||
|
||||
/*******************************全局变量声明*******************************/
|
||||
extern HLHTHeadContextStru ciHLHTHeadCtxs[CI_SUM_MAX];/*存放与本控区通信的相邻CI互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru gSzRcHLHTHeadCtxs[CI_SUM_MAX]; /*存放与本控区通信的相邻RC互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru ciHLHTHeadCtxsCiToRc[CI_SUM_MAX];/*存放与本控区通信的相邻CI互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru gSzRcHLHTHeadCtxsCiToRc[CI_SUM_MAX]; /*存放与本控区通信的相邻RC互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru ciHLHTHeadCtxs[CI_SUM_MAX];/*存放与本CI通信的相邻CI互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru vobcHLHTHeadCtxs[VOBC_SUM_MAX];/*存放与本CI通信的VOBC互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru vobcBackupHLHTHeadCtxs[VOBC_BACKUP_SUM_MAX];/*存放与本CI通信的后备模式VOBC互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru zcHLHTHeadCtxs[ZC_SUM_MAX];/*存放与本CI通信的ZC互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru ocHLHTHeadCtxs[OC_SUM_MAX];/*存放与本CI通信的OC互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru ocHLHTHeadCtxsCiToRc[OC_SUM_MAX];/*存放与本CI通信的OC互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru axleHLHTHeadCtxs[AXLE_SUM_MAX];/*存放与本CI通信的计轴系统互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru gSzRcAxleHLHTHeadCtxs[AXLE_SUM_MAX];/*存放与RC通信的计轴系统互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru tmcHLHTHeadCtxs[TMC_SUM_MAX];/*存放与本TIOC通信的TMC互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru IteHLHTHeadCtxs[ITE_SUM_MAX][VOBC_INC_ITE_SUM_MAX];/*存放与本TIOC通信的ITE互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru gSzXiandiHLHTHeadCtxs[ATS_SUM_MAX]; /*存放与本CI通信的现地互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru gSzAtsHLHTHeadCtxs[ATS_SUM_MAX]; /*存放与本CI通信的ATS互联互通报文头上下文数据*/
|
||||
extern HLHTHeadContextStru vobcToRcHLHTHeadCtxs[VOBC_SUM_MAX];/*RC模式下,存放与本RC通信的510 VOBC互联互通报文头上下文数据。CI模式下不使用*/
|
||||
|
||||
/*
|
||||
* 功能描述:获取某个设备最近一次给CI发送数据时其当前的序号
|
||||
* 参数说明:
|
||||
@@ -292,31 +285,6 @@ extern "C" {
|
||||
* Created By LQ 2024.06.11
|
||||
*/
|
||||
void ProcIteHlhtHeadCtxTimeOut(const UINT32 dwTimeoutSnCount, const UINT32 dwTimeoutSpan);
|
||||
/*
|
||||
* 功能描述:获取指定oc的CI-RC同步互联互通报文头上下文数据
|
||||
* 参数说明:const UINT8 oc ID
|
||||
* 返 回 值:NULL 获取数据失败
|
||||
* 非NULL 获取数据成功
|
||||
* Created By fan 2025.11.12
|
||||
*/
|
||||
HLHTHeadContextStru* GetCiToRcHLHTOcHeadCtx(const UINT8 ocId);
|
||||
/*
|
||||
* 功能描述:获取指定CI的CI-RC同步CI互联互通报文头上下文数据
|
||||
* 参数说明:const UINT8 chDevId 设备ID
|
||||
* 返 回 值:NULL 获取数据失败
|
||||
* 非NULL 获取数据成功
|
||||
* Created By fan 2025.12.31
|
||||
*/
|
||||
HLHTHeadContextStru* GetCiToRcWithCiHeadCtx(const UINT8 chDevId);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定CI的CI-RC同步RC互联互通报文头上下文数据
|
||||
* 参数说明:const UINT8 chDevId 设备ID
|
||||
* 返 回 值:NULL 获取数据失败
|
||||
* 非NULL 获取数据成功
|
||||
* Created By fan 2025.12.31
|
||||
*/
|
||||
HLHTHeadContextStru* GetCiToRcWithRcHeadCtx(const UINT8 chDevId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -137,14 +137,12 @@ void SwitchDeviceToRelayStateProc(void);
|
||||
*/
|
||||
void PhySecRelayToDeviceStateProc(void);
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* 功能描述: 更新区段计轴复位继电器状态
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
*/
|
||||
void PhySecResetToRelayStateProc(void);
|
||||
#endif
|
||||
/*
|
||||
* 功能描述: 更新区段计轴复位继电器状态
|
||||
* 参数说明: void
|
||||
@@ -186,9 +184,10 @@ UINT8 PsdDeviceToRelayStateProc(void);
|
||||
/*
|
||||
* 功能描述: 更新洗车机继电器状态
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
* 返回值 : 0: 更新失败
|
||||
* 1: 更新成功
|
||||
*/
|
||||
void WashMachineDevToRelayStaProc(void);
|
||||
UINT8 WashMachineDevToRelayStaProc(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 更新紧急停车按钮逻辑状态
|
||||
@@ -225,9 +224,10 @@ void GaragedoorDevToRelayStaProc(void);
|
||||
/*
|
||||
* 功能描述: 更新洗车机的逻辑状态
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
* 返回值 : 0: 更新失败
|
||||
* 1: 更新成功
|
||||
*/
|
||||
void WashMachineToDeviceStateProc(void);
|
||||
UINT8 WashMachineToDeviceStateProc(void);
|
||||
/*
|
||||
* 功能描述: 更新Spks按钮逻辑状态
|
||||
* 参数说明: void
|
||||
@@ -326,17 +326,12 @@ void OcSwitchDeviceOutput(void);
|
||||
UINT8 GetOcSignalColor(UINT16 signalId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取OC道岔设备状态
|
||||
* 功能描述: 获取OC道岔设备颜色
|
||||
* 参数说明:
|
||||
UINT16 switchId:道岔id
|
||||
UINT8 mainControlOCId 主控OCId
|
||||
* 返回值 :
|
||||
* ((UINT8)0x01) 道岔定位
|
||||
* ((UINT8)0x02) 道岔反位
|
||||
* ((UINT8)0x04) 道岔四开
|
||||
* ((UINT8)0x08) 道岔移动
|
||||
UINT16 signalId:信号机id
|
||||
* 返回值 : void
|
||||
*/
|
||||
UINT8 GetOcSwitchState(UINT16 switchId, UINT8 mainControlOCId);
|
||||
UINT8 GetOcSwitchState(UINT16 switchId);
|
||||
|
||||
/*
|
||||
* 功能描述: 间隙探测脉冲接口方式启动驱动处理
|
||||
@@ -359,7 +354,7 @@ void ProcessJXTCPulseInterfStopDrv(UINT16 startJXTCRelayId, UINT16 stopJXTCRelay
|
||||
|
||||
/******************************OC spks指示灯输出处理****************************/
|
||||
/*
|
||||
* 功能描述: OC spks指示灯、spks旁路指示灯及蜂鸣继电器处理
|
||||
* 功能描述: OC spks指示灯和spks旁路指示灯输出处理
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
*/
|
||||
@@ -808,7 +803,7 @@ UINT8 WashMachineWorkModeRelayProc(const UINT16 washMachineId);
|
||||
* CI_SUCCESS: 更新成功
|
||||
* by cgh 20231113
|
||||
*/
|
||||
void DownWashDevToRelayStaProc(const UINT16 washMachineId);
|
||||
UINT8 DownWashDevToRelayStaProc(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 降级模式洗车线关联进路状态检查
|
||||
@@ -990,217 +985,13 @@ UINT8 GetFstDetBtnCollTolerateRet(const UINT16 wSignalId);
|
||||
UINT8 GetSndDetBtnCollTolerateRet(const UINT16 wSignalId);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置所有道岔转辙机位置
|
||||
* 参数说明: UINT16 switchCurSum 道岔总数
|
||||
* 返回值 : 无
|
||||
*/
|
||||
void SetAllSingleSwitchZzjState(UINT16 switchCurSum);
|
||||
|
||||
/*
|
||||
* 功能描述: 指定洗车机ID降级模式洗车按钮状态更新
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void WashMachineButtonStateProc(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 指定洗车机ID降级模式请求信息处理
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void WashMachineApplyStateProc(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 指定洗车机ID降级模式洗车请求信息处理
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void WashMachineApplyProc(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 指定洗车机ID降级模式反向通过请求信息处理
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void WashMachinePassApplyProc(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 洗车线控制室更新洗车同意按钮逻辑
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void WashMachineButtonUpdate(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: DCC更新洗车同意按钮逻辑
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void WashMachineDCCButtonUpdate(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 融合洗车同意状态
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void FusionWashMachineAllowState(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 洗车线控制室更新反向洗车同意按钮逻辑
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void WashMachinePassButtonUpdate(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: DCC更新反向洗车同意按钮逻辑
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void WashMachineDCCPassButtonUpdate(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 融合反向通过同意按钮状态
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void FusionWashMachinePassAllowState(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 降级模式洗车线洗车请求指示灯
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 :void
|
||||
*/
|
||||
void WashMachineApplyLight(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 降级模式DCC洗车请求指示灯
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 :void
|
||||
*/
|
||||
void WashMachineDccApplyLight(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 降级模式洗车线洗车反向通过请求指示灯
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 :void
|
||||
*/
|
||||
void WashMachinePassApplyLight(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 降级模式DCC洗车反向通过请求指示灯
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 :void
|
||||
*/
|
||||
void WashMachineDccPassApplyLight(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 降级模式洗车同意指示灯
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 :void
|
||||
*/
|
||||
void WashMachineAllowLight(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 降级模式DCC洗车同意指示灯
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 :void
|
||||
*/
|
||||
void WashMachineDccAllowLight(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 降级模式洗车同意反向通过指示灯
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 :void
|
||||
*/
|
||||
void WashMachinePassAllowLight(const UINT16 washMachineId);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 降级模式DCC洗车同意反向通过指示灯
|
||||
* 参数说明: const UINT16 washMachineId 洗车机ID
|
||||
* 返回值 :void
|
||||
*/
|
||||
void WashMachineDccPassAllowLight(const UINT16 washMachineId);
|
||||
|
||||
/*
|
||||
* 功能描述: 更新屏蔽门对应IBP盘发车按钮继电器状态
|
||||
* 参数说明: const UINT16 wPsdId 屏蔽门ID
|
||||
* 返回值 : CI_ERROR: 更新失败
|
||||
* CI_SUCCESS: 更新成功
|
||||
*/
|
||||
UINT8 PsdIbpRelToDevStaProc(const UINT16 wPsdId);
|
||||
|
||||
/*
|
||||
* 功能描述:同站紧急按钮及旁路按钮状态处理
|
||||
* 参数说明:void
|
||||
* 功能描述:清除物理区段复位起始周期
|
||||
* 参数说明:无
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.12.30
|
||||
* 注:解决复位指令执行期间,总复位未按下一直下发复位指令的问题
|
||||
* Created By fan 2026.03.24
|
||||
*/
|
||||
void OnePlatEsbAndCutBtnProc(void);
|
||||
|
||||
/*
|
||||
* 功能描述:取消当前未异常打开的站台门的异常状态
|
||||
* 参数说明: const UINT16 doorId,屏蔽门ID
|
||||
* 返回值 :无
|
||||
*Create fan 2026.03.26
|
||||
*/
|
||||
void CancelPsdExceptState(UINT16 doorId);
|
||||
/*
|
||||
* 功能描述: 设置道岔的每一个OC的主控状态
|
||||
* 参数说明:
|
||||
UINT16 switchId:道岔id
|
||||
* 返回值 :void
|
||||
* add by mpt 20260326
|
||||
*/
|
||||
void SetOcSwitchControlState(UINT16 switchId);
|
||||
/*
|
||||
* 功能描述: 仲裁当前道岔的主控OC
|
||||
* 参数说明: UINT16 switchCurSum 道岔总数
|
||||
* 返回值 : 无
|
||||
* add by mpt 20260326
|
||||
*/
|
||||
void SetAllSwitchCurMainControlOC(UINT16 switchCurSum);
|
||||
/*
|
||||
* 功能描述: OC道岔主控命令生成处理
|
||||
* 参数说明: UINT16 switchId 道岔ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void OutSwitchControlModeCmd(UINT16 switchId);
|
||||
/*
|
||||
* 功能描述: 道岔无主控时产生主备控命令处理
|
||||
* 参数说明: UINT16 switchId
|
||||
* 返回值 : void
|
||||
*/
|
||||
void SwitchMainControlCmdOut(UINT16 switchId, UINT8 ocId);
|
||||
/*
|
||||
* 功能描述: OC道岔主控状态管理
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
*/
|
||||
void OcSwitchControlModeCmdOutput(void);
|
||||
/*
|
||||
* 功能描述: 双主防护模块
|
||||
* 参数说明: UINT16 switchId 道岔ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void SwitchDoubleMainProtect(UINT16 switchId);
|
||||
/*
|
||||
* 功能描述:道岔寻表模块
|
||||
* 参数说明: UINT16 switchId 道岔ID
|
||||
* 返回值 : void
|
||||
* add by mpt 20260328
|
||||
*/
|
||||
void FindSwitchPostionCmdOut(UINT16 switchId);
|
||||
|
||||
/*
|
||||
* 功能描述: 更新倒切柜状态
|
||||
* 参数说明: void
|
||||
* 返回值 : 无
|
||||
* Create Fan 20260608
|
||||
*/
|
||||
void ReverseStateUpdateProc(void);
|
||||
|
||||
void CleanPhySecResetStartCycNum(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+2549
-3187
File diff suppressed because it is too large
Load Diff
@@ -128,6 +128,14 @@ void ProcessPscToCiData(void);
|
||||
*/
|
||||
UINT8 ProcessAtsOrXianDiToCiData(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 处理车辆段的ATS或现地到CI数据
|
||||
* 参数说明: void
|
||||
* 返回值 : 0:处理失败
|
||||
* 1:处理成功
|
||||
*/
|
||||
UINT8 ProcessAtsOrXianDiToCiDataCld(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 处理设备逻辑状态
|
||||
* 参数说明: void
|
||||
@@ -296,7 +304,7 @@ UINT8 CheckOrderWhetherDoing(UINT8 virCIid,UINT8 belongVirCIid,UINT8 orderType,U
|
||||
* UINT8 MaskType 码位类型
|
||||
* 返回值 : 无
|
||||
*/
|
||||
void DealAutoReturnMask(UINT16 DeviceId,UINT8* pMaskBuf,UINT8 MaskType,UINT16 index);
|
||||
void DealAutoReturnMask_UseVirCI(UINT16 DeviceId,UINT16*maskBuf,UINT8 MaskType,UINT16 index);
|
||||
/*
|
||||
* 功能描述: 获取全站维修点灯状态
|
||||
* 参数说明: UINT8 virCIid 虚拟联锁ID
|
||||
@@ -458,93 +466,6 @@ void ProcessOCToCiPsdData(void);
|
||||
*/
|
||||
void ProcessOcToCiRelayDiffData(void);
|
||||
|
||||
/*
|
||||
* 功能描述:处理CI与RC间通信状态和数据
|
||||
* 参数说明:void
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.04
|
||||
*/
|
||||
void ProcessCiAndRcInfo(void);
|
||||
|
||||
/**
|
||||
* @brief 保护区段解锁申请
|
||||
* @param[in] 无
|
||||
* @return 无
|
||||
* @note by cgh 20251107
|
||||
*/
|
||||
void OverlapUnlockApplyDeal(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief 进路停车保证处理
|
||||
* @param[in] 无
|
||||
* @return 无
|
||||
* @note by cgh 20251107
|
||||
*/
|
||||
void RouteStopensureDeal(void);
|
||||
|
||||
/**
|
||||
* @brief 更新双系统融合数据
|
||||
* @param[in] void
|
||||
* @return 无
|
||||
* @note by cgh 20251106
|
||||
*/
|
||||
void UpdateDoubleSystemMergeInfo(void);
|
||||
|
||||
/*
|
||||
* 功能描述:逻辑区段信息融合处理
|
||||
* 参数说明:无
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.07
|
||||
*/
|
||||
void LogSecInfoMergePro(void);
|
||||
|
||||
/*
|
||||
* 功能描述:雨雪信息融合处理
|
||||
* 参数说明:无
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.10
|
||||
*/
|
||||
void SnowInfoMergePro(void);
|
||||
|
||||
/**
|
||||
* @brief 进路停车保证信息融合
|
||||
* @param[in] void
|
||||
* @return 无
|
||||
* @note by cgh 20251106
|
||||
*/
|
||||
void RouteStopensureFlagMergeDeal(void);
|
||||
|
||||
/**
|
||||
* @brief 信号机信息融合处理
|
||||
* @param[in] void
|
||||
* @return 无
|
||||
* @note by cgh 20251106
|
||||
*/
|
||||
void SignalInfoMergeDeal(void);
|
||||
|
||||
/*
|
||||
* 功能描述:信号机列车跨压处理
|
||||
* 参数说明:无
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.11
|
||||
*/
|
||||
void SignalTrainCrossPro(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 处理VOBC到CI数据
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
*/
|
||||
void ProcessIvocToRCData(void);
|
||||
/*
|
||||
* 功能描述: Vobc点连式信息清除
|
||||
* 参数说明: UINT16 wTrainId:VOBCid
|
||||
* 返回值 : void
|
||||
* by lyj 20260316
|
||||
*/
|
||||
void VobcBlocLinkDataClear(const UINT16 wTrainId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+1119
-1548
File diff suppressed because it is too large
Load Diff
@@ -92,7 +92,6 @@ UINT8 CiToAtsBackInfoFunctionJudge(const UINT8 functionId,const UINT8 deviceType
|
||||
*/
|
||||
void IndicatorStateProc(void);
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* 功能描述: 指示器状态处理
|
||||
* 参数说明: void
|
||||
@@ -100,7 +99,6 @@ void IndicatorStateProc(void);
|
||||
*/
|
||||
void IndicatorStateProc_UseVirCI(UINT8 virCIid);
|
||||
|
||||
#endif
|
||||
/*
|
||||
* 功能描述: 非进路继电器状态处理
|
||||
* 参数说明: void
|
||||
@@ -149,7 +147,12 @@ void SignaDsBreakAlarmIndicator_Vir(UINT8 virCIid,UINT8 devId);
|
||||
*/
|
||||
void CiToCiOutputCmdProc(void);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 根据无人折返指示灯的闪灯和稳灯状态驱动继电器或设置状态
|
||||
* 参数说明: 无
|
||||
* 返回值 : 无
|
||||
*/
|
||||
static void AutoRtnIndictStatusProc_VirCI(void);
|
||||
/*
|
||||
* 功能描述: 获取组合自动进路所属虚拟联锁ID
|
||||
* 参数说明: groupAutoRouteId 组合自动进路的ID
|
||||
@@ -453,101 +456,6 @@ UINT8 FindRouteLeaveAxis(const UINT16 routeId);
|
||||
*/
|
||||
void RtnRealyAdhesionStatePro(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取人工解锁保护区段剩余倒计时
|
||||
* 参数说明: const UINT16 overlapId 保护区段id
|
||||
* 返回值 : 倒计时
|
||||
* by cgh 20250928
|
||||
*/
|
||||
UINT16 GetOverlapLaborUnlockBackTime(const UINT16 overlapId);
|
||||
/*
|
||||
* 功能描述: 设置联锁I系II系工作状态指示灯
|
||||
* 参数说明: const UINT16 wFIndicatorId I系指示灯id
|
||||
* const UINT16 wSIndicatorId II系指示灯id
|
||||
* 返回值 : 无
|
||||
* by lyj 20260105
|
||||
*/
|
||||
void SetWorkStatusIndicator(const UINT16 wFIndicatorId, const UINT16 wSIndicatorId);
|
||||
/*
|
||||
* 功能描述: 设置信号故障关闭指示灯
|
||||
* 参数说明: const UINT16 wIndicatorId 指示灯id
|
||||
* 返回值 : 无
|
||||
* by lyj 20260105
|
||||
*/
|
||||
void SetSigFaultCloseIndicator(const UINT16 wIndicatorId);
|
||||
/*
|
||||
* 功能描述: 设置道岔挤岔指示灯
|
||||
* 参数说明: const UINT16 wIndicatorId 指示灯id
|
||||
* 返回值 : 无
|
||||
* by lyj 20260105
|
||||
*/
|
||||
void SetSwitchJiChaIndicator(const UINT16 wIndicatorId);
|
||||
/*
|
||||
* 功能描述: 设置车库门故障指示灯
|
||||
* 参数说明: const UINT16 wIndicatorId 指示灯id
|
||||
* 返回值 : 无
|
||||
* by lyj 20260105
|
||||
*/
|
||||
void SetGDoorFaultIndicator(const UINT16 wIndicatorId);
|
||||
/*
|
||||
* 功能描述: 设置继电器混线指示灯
|
||||
* 参数说明: const UINT16 wIndicatorId 指示灯id
|
||||
* 返回值 : 无
|
||||
* by lyj 20260105
|
||||
*/
|
||||
void SetRealyHunXianIndicator(const UINT16 wIndicatorId);
|
||||
/*
|
||||
* 功能描述: 设置应急盘指示灯
|
||||
* 参数说明: const UINT16 wIndicatorId 指示灯id
|
||||
* 返回值 : 无
|
||||
* by lyj 20260106
|
||||
*/
|
||||
void SetYjpIndicator(const UINT16 wIndicatorId);
|
||||
/*
|
||||
* 功能描述: 设置试车请求指示灯
|
||||
* 参数说明: const UINT16 wIndicatorId 指示灯id
|
||||
* 返回值 : 无
|
||||
* by lyj 20260106
|
||||
*/
|
||||
void SetSCApplyIndicator(const UINT16 wIndicatorId);
|
||||
/*
|
||||
* 功能描述: 设置试车同意指示灯
|
||||
* 参数说明: const UINT16 wIndicatorId 指示灯id
|
||||
* 返回值 : 无
|
||||
* by lyj 20260106
|
||||
*/
|
||||
void SetSCAllowIndicator(const UINT16 wIndicatorId);
|
||||
/*
|
||||
* 功能描述: 设置试车结束指示灯
|
||||
* 参数说明: const UINT16 wIndicatorId 指示灯id
|
||||
* 返回值 : 无
|
||||
* by lyj 20260106
|
||||
*/
|
||||
void SetSCOverIndicator(const UINT16 wIndicatorId);
|
||||
/*
|
||||
* 功能描述: 处理点连式列车发送数据信息
|
||||
* 参数说明: void
|
||||
* 返回值 : 无
|
||||
* by lyj 20260314
|
||||
*/
|
||||
void VobcBlocLinkOutputProcess(void);
|
||||
/*
|
||||
* 功能描述: 处理点连式列车进路信息
|
||||
* 参数说明: const UINT16 wTrainId 列车ID
|
||||
* 返回值 : 计算结果
|
||||
* by lyj 20260316
|
||||
*/
|
||||
|
||||
UINT8 BlocLinkTrainRouteMange(const UINT16 wTrainId);
|
||||
/*
|
||||
* 功能描述: 处理点连式列车逻辑区段信息
|
||||
* 参数说明: const UINT16 wTrainId 列车ID
|
||||
* 返回值 : 计算结果
|
||||
* by lyj 20260316
|
||||
*/
|
||||
|
||||
UINT8 BlocLinkTrainLogSecMange(const UINT16 wTrainId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -423,7 +423,7 @@ UINT8 GetIndicatorDevId(UINT16 indicatorId)
|
||||
* >0u: 报警灯设备ID
|
||||
* by cgh 20240910
|
||||
*/
|
||||
UINT16 GetIndicatorRelNonReturnId(UINT16 indicatorId)
|
||||
UINT8 GetIndicatorRelNonReturnId(UINT16 indicatorId)
|
||||
{
|
||||
|
||||
UINT16 wRetVal = CI_ERROR;
|
||||
@@ -456,30 +456,4 @@ UINT16 GetIndicatorRelNonReturnId(UINT16 indicatorId)
|
||||
}
|
||||
|
||||
return wRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 根据指示灯ID获取指示灯虚拟联锁ID
|
||||
* 参数说明: UINT16 wIndicId 指示灯ID
|
||||
* 返回值 : 0u: 获取数据失败
|
||||
* >0u: 虚拟联锁ID
|
||||
* BY:lyj 20260105
|
||||
*/
|
||||
UINT8 GetIndicBelongRtuId(UINT16 wIndicId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 reVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetIndicatorConfigBufIndex(wIndicId); /*获取指示器相关继电器数组下标*/
|
||||
|
||||
if (INDICATOR_SUM_MAX > bufIndex)
|
||||
{
|
||||
reVal = IndicatorConfigDataStru[bufIndex].chBelongVirCIid;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
}
|
||||
@@ -29,8 +29,7 @@ typedef struct S_IndicatorConfigDataStruct
|
||||
UINT8 AvalibleFlag;/*指示灯有效标志位 0x55无效 0xAA进路相关 0xAA继电器相关*/
|
||||
UINT8 IdSum; /*相关Id数量(配置字段)*/
|
||||
UINT16 IdBuf[INDICATOR_RELAY_SUM_MAX]; /*相关ID (配置字段)*/
|
||||
UINT8 BjdDeviceId; /*报警灯设备ID*/
|
||||
UINT8 chBelongVirCIid; /*所属虚拟联锁ID*/
|
||||
UINT8 BjdDeviceId; /*报警灯设备ID*/
|
||||
} IndicatorConfigDataStruct;
|
||||
|
||||
/*cgh-合并ECI11.0:OC站表示灯 OC站指一级集中站(CI+OC)的现地工作站、二级集中站(OC)的有岔非集现地工作站,中央联锁工作站*/
|
||||
@@ -184,15 +183,7 @@ UINT8 GetIndicatorDevId(UINT16 indicatorId);
|
||||
* >0u: 报警灯设备ID
|
||||
* by cgh 20240910
|
||||
*/
|
||||
UINT16 GetIndicatorRelNonReturnId(UINT16 indicatorId);
|
||||
/*
|
||||
* 功能描述: 根据指示灯ID获取指示灯虚拟联锁ID
|
||||
* 参数说明: UINT16 wIndicId 指示灯ID
|
||||
* 返回值 : 0u: 获取数据失败
|
||||
* >0u: 虚拟联锁ID
|
||||
* BY:lyj 20260105
|
||||
*/
|
||||
UINT8 GetIndicBelongRtuId(UINT16 wIndicId);
|
||||
UINT8 GetIndicatorRelNonReturnId(UINT16 indicatorId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -64,10 +64,7 @@
|
||||
#define INDICATOR_TYPE_SWITCH_JICHA ((UINT8)0x24) /* 道岔挤岔状态 */
|
||||
#define INDICATOR_TYPE_GD_DAD ((UINT8)0x25) /* 车库门故障报警状态 */
|
||||
#define INDICATOR_TYPE_XICHEJI_ALLOW_STATE ((UINT8)0x26) /* 非FAO线路同意洗车状态指示灯 */
|
||||
#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_DOWNWASH_ALLOW_PASS_STATE ((UINT8)0x29) /* 降级模式洗车同意通过指示灯 */
|
||||
|
||||
#define INDICATOR_TYPE_ATS_CONFIRM_RELAY_INTERFACE ((UINT8)0x27) /*相邻联锁继电接口确认状态指示灯*/
|
||||
|
||||
|
||||
@@ -129,9 +129,6 @@ UINT8 InitAllStaticDataStr(void)
|
||||
/*声光报警器配置数据结构体*/
|
||||
chRtn &= CommonMemSet(SGBJConfigDataStru, (UINT32)(SGBJ_SUM_MAX * sizeof(SGBJConfigDataStruct)), 0u, (UINT32)(SGBJ_SUM_MAX * sizeof(SGBJConfigDataStruct)));
|
||||
|
||||
/*试灯数据配置结构体*/
|
||||
chRtn &= CommonMemSet(LightTestButtonConfigDataStru, (UINT32)(LIGHTTESTBUTTON_BUTTON_MAX_NUM * sizeof(LightTestButtonConfigDataStruct)), 0u, (UINT32)(LIGHTTESTBUTTON_BUTTON_MAX_NUM * sizeof(LightTestButtonConfigDataStruct)));
|
||||
|
||||
return chRtn;
|
||||
}
|
||||
|
||||
@@ -249,7 +246,6 @@ UINT8 ReadConfigureData(void)
|
||||
{
|
||||
; /*不处理*/
|
||||
}
|
||||
|
||||
if (0u == rtnVal)
|
||||
{
|
||||
PhysicalSectionCurSum = ReadPhySicalSectionConfigData(LocalCiId, PhysicalSectionConfigDataStru);/*读物理区段配置数据*/
|
||||
@@ -450,13 +446,6 @@ UINT8 ReadConfigureData(void)
|
||||
|
||||
if (0u == rtnVal)
|
||||
{
|
||||
IndicatorCurSum = ReadIndicatorConfigData(LocalCiId, IndicatorConfigDataStru); /*读指示灯报警灯配置数据*/
|
||||
if (-1 == IndicatorCurSum)
|
||||
{
|
||||
rtnVal = 20u;/*读取指示灯报警灯配置数据失败*/
|
||||
debug_infor_printf((const)"ReadIndicatorConfigData fail.");
|
||||
}
|
||||
#if 0
|
||||
includeVirFlag = GetCiFunctionSwitchConfig(FUNC_INCLUDEVIRCI_FLAG);
|
||||
if (FUNC_SWITCH_ON == includeVirFlag)
|
||||
{
|
||||
@@ -479,7 +468,15 @@ UINT8 ReadConfigureData(void)
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
IndicatorCurSum = ReadIndicatorConfigData(LocalCiId, IndicatorConfigDataStru); /*读指示灯报警灯配置数据*/
|
||||
if (-1 == IndicatorCurSum)
|
||||
{
|
||||
rtnVal = 20u;/*读取指示灯报警灯配置数据失败*/
|
||||
debug_infor_printf((const)"ReadIndicatorConfigData fail.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -531,7 +528,7 @@ UINT8 ReadConfigureData(void)
|
||||
g_ret = ReadReverseCutConfigData(LocalCiId, gstReverseCutCfgData);
|
||||
if (-1 == g_ret)
|
||||
{
|
||||
rtnVal = 28u;/*读倒切配置数据失败-OC配置数据表单30*/
|
||||
rtnVal = 28u;/*读保护区段配置数据失败*/
|
||||
debug_infor_printf((const)"ReadReverseCutConfigData fail.");
|
||||
}
|
||||
else if (0 < g_ret)
|
||||
@@ -555,23 +552,7 @@ UINT8 ReadConfigureData(void)
|
||||
{
|
||||
; /*不处理*/
|
||||
}
|
||||
if (0u == rtnVal)
|
||||
{
|
||||
LightTestButtonCurSum = ReadLightTestConfigData(LocalCiId, LightTestButtonConfigDataStru); /*读OC试灯按钮配置数据*/
|
||||
if (-1 == LightTestButtonCurSum)
|
||||
{
|
||||
rtnVal = 44u;/*读取OC试灯按钮数据失败*/
|
||||
debug_infor_printf((const)"\nReadLightTestConfigData fail.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*不处理*/
|
||||
}
|
||||
|
||||
if (0u == rtnVal)
|
||||
{
|
||||
CiToAtsMaskCurSum = ReadCiToAtsMaskConfigData(LocalCiId, CiToAtsMaskConfigDataStru); /*读CI-ATS配置数据*/
|
||||
@@ -810,25 +791,6 @@ 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)
|
||||
{
|
||||
/*读系统参数配置数据*/
|
||||
@@ -1121,32 +1083,6 @@ UINT8 ReadConfigureData(void)
|
||||
rtnVal = 2u;
|
||||
}
|
||||
|
||||
if (0u == rtnVal)
|
||||
{
|
||||
g_ret = QueryTrackBelongLink();
|
||||
if (CI_ERROR == g_ret)
|
||||
{
|
||||
debug_infor_printf((const)"QueryTrackBelongLink Error\n");
|
||||
rtnVal = 43u;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
if (0u == rtnVal)
|
||||
{
|
||||
/*设置试车线与车辆段合设配置*/
|
||||
g_ret = (INT16)SetCldAndScxMergeConfig();
|
||||
if (0 == g_ret)
|
||||
{
|
||||
debug_infor_printf((const)"SetCldAndScxMergeConfig fail.\r\n");
|
||||
rtnVal = 44u;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1163,6 +1099,7 @@ UINT8 ReadConfigureData(void)
|
||||
UINT8 DeviceDataManage(void)
|
||||
{
|
||||
UINT8 rtValue = 0u;
|
||||
UINT8 includeVirFlag= GetCiFunctionSwitchConfig(FUNC_INCLUDEVIRCI_FLAG);
|
||||
UINT8 reval = CI_ERROR;
|
||||
/*整理继电器数据*/
|
||||
if (CI_ERROR == RelayConfigDataManage())
|
||||
@@ -1286,7 +1223,6 @@ UINT8 DeviceDataManage(void)
|
||||
{
|
||||
rtValue = 0u;
|
||||
}
|
||||
#if 0
|
||||
if(FUNC_SWITCH_ON == includeVirFlag)
|
||||
{
|
||||
reval = InitVirCIlocalCiIndicatorIdBuf();
|
||||
@@ -1295,16 +1231,14 @@ UINT8 DeviceDataManage(void)
|
||||
rtValue = 1u;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (0U == rtValue)
|
||||
else
|
||||
{
|
||||
reval = IndicatorConfigDataManage();
|
||||
if (CI_ERROR == reval)
|
||||
if(CI_ERROR == reval)
|
||||
{
|
||||
rtValue = 1u;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (0U == rtValue)
|
||||
{
|
||||
@@ -2030,23 +1964,6 @@ 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
|
||||
{
|
||||
; /*不处理*/
|
||||
@@ -2123,11 +2040,6 @@ INT8 OcConnectConfigDataToDevStruct(SignalConfigDataStruct* pSignalCfgData, Phys
|
||||
{
|
||||
pSwitchCfgData[j].ByPassRelayId = pConnectCfgData[i].OcConnetRelayDataBuf[k].RelayId;
|
||||
}
|
||||
/*IBP*/
|
||||
else if(SWITCH_IBP_TYPE == pConnectCfgData[i].OcConnetRelayDataBuf[k].RelayType)
|
||||
{
|
||||
pSwitchCfgData[j].IbpDrvRelayId = pConnectCfgData[i].OcConnetRelayDataBuf[k].DrvRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不做处理*/
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
#include "../Route/LongRouteConfigDataManage.h"
|
||||
#include "../SGBJ/SGBJConfigDataManage.h"
|
||||
#include "../VirtualDevice/VirtualDevDataManage.h"
|
||||
#include "LightTestButtonConfigDataManage.h"
|
||||
|
||||
extern INT16 trackCheckRes;
|
||||
extern INT16 g_ret;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -243,12 +243,7 @@ UINT8 InitialPhySecIdBufOfOtherCi(void);
|
||||
* 返回值 : void
|
||||
*/
|
||||
void ResetDynamicState(const UINT8 ciId);
|
||||
/*
|
||||
* 功能描述:重置相邻Rc通信中断动态数据
|
||||
* 参数说明:const UINT8 ciId, 重置联锁ID
|
||||
* 返回值 : void
|
||||
*/
|
||||
void ResetDynamicRcState(const UINT8 ciId);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 初始化全自动折返进路数据
|
||||
@@ -335,24 +330,6 @@ UINT8 InitLEUDataStru(void);
|
||||
*/
|
||||
UINT8 InitialRtnIndicStaData(void);
|
||||
|
||||
/*
|
||||
* 功能描述:重置本控区RC的设备动态数据
|
||||
* 参数说明:void
|
||||
* 返 回 值:void
|
||||
* Created By LQ 2025.11.07
|
||||
*/
|
||||
void ResetLocalRcDynamicState(void);
|
||||
|
||||
/*
|
||||
* 功能描述:重置控区设备状态处理
|
||||
* 参数说明:void
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.19
|
||||
*/
|
||||
void ResetDevStateProcess(void);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef __INVADESECTION_DEFINE_H_
|
||||
#define __INVADESECTION_DEFINE_H_
|
||||
|
||||
#define INVA_SECT_N_COND_SWIT_SUM_MAX ((UINT16)800) /*侵限区段与相关条件道岔数据条目最大数量*/
|
||||
#define INVA_SECT_N_COND_SWIT_SUM_MAX ((UINT16)400) /*侵限区段与相关条件道岔数据条目最大数量*/
|
||||
|
||||
#define COND_SWITCH_SUM_MAX ((UINT16)16) /*单一侵限区段与相关条件道岔数据条目内,条件道岔最大数量*/
|
||||
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
/********************************************************
|
||||
*
|
||||
* 文 件 名: LightTestButtonConfigDataManage.c
|
||||
* 版权说明: 北京交控科技有限公司
|
||||
* 创建时间: 2025-12-09
|
||||
* 作 者: 联锁组
|
||||
* 功能描述: 试灯按钮配置数据管理
|
||||
* 修改记录:
|
||||
*
|
||||
********************************************************/
|
||||
|
||||
#include "LightTestButtonConfigDataManage.h"
|
||||
|
||||
LightTestButtonConfigDataStruct LightTestButtonConfigDataStru[LIGHTTESTBUTTON_BUTTON_MAX_NUM] = {0}; /*定义试灯按钮数据配置结构体*/
|
||||
INT16 LightTestButtonCurSum = 0; /*试灯按钮当前总数*/
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮当前总数
|
||||
* 参数说明: void
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 试灯按钮当前总数
|
||||
*/
|
||||
UINT16 GetLightTestButtonCurSum(void)
|
||||
{
|
||||
UINT16 retVal = 0u;
|
||||
if (LIGHTTESTBUTTON_BUTTON_MAX_NUM <= ((UINT16)LightTestButtonCurSum))
|
||||
{
|
||||
retVal = LIGHTTESTBUTTON_BUTTON_MAX_NUM;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = (UINT16)LightTestButtonCurSum;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮的ID
|
||||
* 参数说明: UINT16 index 试灯按钮索引
|
||||
* 返回值 UINT16 retVal 试灯按钮ID
|
||||
*/
|
||||
UINT16 GetLightTestButtonId(UINT16 index)
|
||||
{
|
||||
UINT16 retVal = 0u;
|
||||
UINT16 lightTestButtonCurSum = GetLightTestButtonCurSum();
|
||||
if (index < lightTestButtonCurSum)
|
||||
{
|
||||
retVal = LightTestButtonConfigDataStru[index].LightTestButtonId;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮ID对应的继电器数据
|
||||
* 参数说明: UINT16 lightTestButtonId 试灯按钮ID
|
||||
* 返回值 :
|
||||
LightTestButtonConfigDataStruct *
|
||||
*/
|
||||
LightTestButtonConfigDataStruct *GetLightTestButtonConfigData(UINT16 lightTestButtonId)
|
||||
{
|
||||
LightTestButtonConfigDataStruct *retVal = NULL;
|
||||
UINT16 i = 0u;
|
||||
UINT16 lightTestButtonCurSum = GetLightTestButtonCurSum();
|
||||
|
||||
for (i = 0u; i < lightTestButtonCurSum; i++)
|
||||
{
|
||||
if (lightTestButtonId == LightTestButtonConfigDataStru[i].LightTestButtonId)
|
||||
{
|
||||
retVal = &LightTestButtonConfigDataStru[i];
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮ID对应继电器的总数量
|
||||
* 参数说明: UINT16 lightTestButtonId 试灯按钮ID
|
||||
* 返回值 : UINT16 lightTestButtonRelayNum 继电器数量
|
||||
*/
|
||||
UINT16 GetLightTestButtonRelayNum(UINT16 lightTestButtonId)
|
||||
{
|
||||
UINT16 lightTestButtonRelayNum = 0u;
|
||||
LightTestButtonConfigDataStruct *lightTestButtonConfigData = GetLightTestButtonConfigData(lightTestButtonId);
|
||||
if (NULL != lightTestButtonConfigData)
|
||||
{
|
||||
lightTestButtonRelayNum = lightTestButtonConfigData->LightTestButtonRelayNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /* 不处理 */
|
||||
}
|
||||
return lightTestButtonRelayNum;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮ID对应继电器ID
|
||||
* 参数说明: UINT16 lightTestButtonId 试灯按钮ID
|
||||
* UINT16 index 继电器索引
|
||||
* 返回值 : UINT16 lightTestButtonRelayId 继电器ID
|
||||
*/
|
||||
UINT16 GetLightTestButtonRelayId(UINT16 lightTestButtonId, UINT16 index)
|
||||
{
|
||||
UINT16 lightTestButtonRelayId = 0u;
|
||||
LightTestButtonConfigDataStruct *lightTestButtonConfigData = GetLightTestButtonConfigData(lightTestButtonId);
|
||||
if (NULL != lightTestButtonConfigData)
|
||||
{
|
||||
if (index < lightTestButtonConfigData->LightTestButtonRelayNum)
|
||||
{
|
||||
lightTestButtonRelayId = lightTestButtonConfigData->LightRelayId[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
; /* 不处理 */
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /* 不处理 */
|
||||
}
|
||||
return lightTestButtonRelayId;
|
||||
}
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/********************************************************
|
||||
*
|
||||
* 文 件 名: LightTestButtonConfigDataManage.h
|
||||
* 版权说明: 北京交控科技有限公司
|
||||
* 创建时间: 2025-12-09
|
||||
* 作 者: 联锁组
|
||||
* 功能描述: 试灯按钮配置数据管理头文件
|
||||
* 函数包括:
|
||||
* 使用注意:
|
||||
* 修改记录:
|
||||
*
|
||||
********************************************************/
|
||||
|
||||
#ifndef _LIGHTTESTBUTTON_CONFIG_DATA_MANAGE_H_
|
||||
#define _LIGHTTESTBUTTON_CONFIG_DATA_MANAGE_H_
|
||||
|
||||
|
||||
#include "LightTestButtonDefine.h"
|
||||
|
||||
|
||||
typedef struct S_LightTestButtonConfigDataStruct
|
||||
{
|
||||
UINT16 LightTestButtonId; /* 试灯按钮ID (配置字段) */
|
||||
UINT16 BelongOcId; /* 所属OC ID (配置字段) */
|
||||
UINT8 LightTestButtonType; /* 试灯按钮类型 (配置字段) */
|
||||
UINT16 LightTestButtonRelayNum; /* 试灯表示灯继电器数量 */
|
||||
UINT16 LightRelayId[LIGHTTESTBUTTON_LIGHT_SUPPORT_MAX_NUM]; /* 试灯表示灯继电器ID数组 */
|
||||
}LightTestButtonConfigDataStruct;
|
||||
|
||||
|
||||
extern LightTestButtonConfigDataStruct LightTestButtonConfigDataStru[LIGHTTESTBUTTON_BUTTON_MAX_NUM]; /*定义试灯按钮数据配置结构体*/
|
||||
extern INT16 LightTestButtonCurSum; /*试灯按钮当前总数*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮当前总数
|
||||
* 参数说明: void
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 信试灯按钮当前总数
|
||||
*/
|
||||
UINT16 GetLightTestButtonCurSum(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮的ID
|
||||
* 参数说明: UINT16 index 试灯按钮索引
|
||||
* 返回值 UINT16 retVal 试灯按钮ID
|
||||
*/
|
||||
UINT16 GetLightTestButtonId(UINT16 index);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮ID对应的继电器数据
|
||||
* 参数说明: UINT16 lightTestButtonId 试灯按钮ID
|
||||
* 返回值 :
|
||||
LightTestButtonConfigDataStruct *
|
||||
*/
|
||||
LightTestButtonConfigDataStruct *GetLightTestButtonConfigData(UINT16 lightTestButtonId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮ID对应继电器的总数量
|
||||
* 参数说明: UINT16 lightTestButtonId 试灯按钮ID
|
||||
* 返回值 : UINT16 lightTestButtonRelayNum 继电器数量
|
||||
*/
|
||||
UINT16 GetLightTestButtonRelayNum(UINT16 lightTestButtonId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试灯按钮ID对应继电器ID
|
||||
* 参数说明: UINT16 lightTestButtonId 试灯按钮ID
|
||||
* UINT16 index 继电器索引
|
||||
* 返回值 : UINT16 lightTestButtonRelayId 继电器ID
|
||||
*/
|
||||
UINT16 GetLightTestButtonRelayId(UINT16 lightTestButtonId, UINT16 index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,63 +0,0 @@
|
||||
/********************************************************
|
||||
*
|
||||
* 文 件 名: LightTestButtonDataManage.c
|
||||
* 版权说明: 北京交控科技有限公司
|
||||
* 创建时间: 2025-12-09
|
||||
* 作 者: 联锁组
|
||||
* 功能描述: 试灯按钮数据管理
|
||||
* 修改记录:
|
||||
*
|
||||
********************************************************/
|
||||
|
||||
#include "LightTestButtonDataManage.h"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 试灯按钮处理函数
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
*/
|
||||
void LightTestButtonDataManageProc(void)
|
||||
{
|
||||
UINT16 i = 0u; /*循环变量*/
|
||||
UINT16 j = 0u; /*循环变量*/
|
||||
|
||||
UINT16 lightTestButtonId = 0u; /* 试灯按钮ID */
|
||||
UINT16 lightTestButtonRelayNum = 0u; /* 试灯按钮ID数量 */
|
||||
UINT16 lightRelayId = 0u; /* 试灯表示灯继电器ID */
|
||||
UINT16 ligthtRelatNum = 0u; /* 试灯表示灯继电器数量 */
|
||||
|
||||
UINT8 lightTestButtonState = RELAY_STATE_DOWN; /*试灯按钮状态*/
|
||||
|
||||
lightTestButtonRelayNum = GetLightTestButtonCurSum(); /*获取试灯按钮总数量*/
|
||||
|
||||
for(i = 0u; i < lightTestButtonRelayNum; i++)
|
||||
{
|
||||
/* 获取对应试灯按钮ID*/
|
||||
lightTestButtonId = GetLightTestButtonId(i);
|
||||
/*获取试灯按钮继电器采集状态*/
|
||||
lightTestButtonState = GetRelayCollState(lightTestButtonId);
|
||||
if(RELAY_STATE_UP == lightTestButtonState) /*试灯按钮按下*/
|
||||
{
|
||||
/* 试灯表示灯继电器数量*/
|
||||
ligthtRelatNum = GetLightTestButtonRelayNum(lightTestButtonId);
|
||||
for(j = 0u; j < ligthtRelatNum; j++)
|
||||
{
|
||||
/* 获取对应试灯表示灯继电器ID*/
|
||||
lightRelayId = GetLightTestButtonRelayId(lightTestButtonId,j);
|
||||
/*设置试灯表示灯继电器吸起*/
|
||||
(void)SetRelayDriveState(lightRelayId, RELAY_DRIVE_STATE_UP);
|
||||
|
||||
}
|
||||
}
|
||||
else if(RELAY_STATE_DOWN == lightTestButtonState) /*试灯按钮未按下*/
|
||||
{
|
||||
/* 不处理即可 */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 不处理 */
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/********************************************************
|
||||
* 文 件 名: LightTestButtonDataManage.h
|
||||
* 版权说明: 北京交控科技有限公司
|
||||
* 创建时间: 2025-12-09
|
||||
* 作 者: 联锁组
|
||||
* 功能描述: 试灯按钮数据管理头文件
|
||||
* 函数包括:
|
||||
* 使用注意:
|
||||
* 修改记录:
|
||||
*
|
||||
********************************************************/
|
||||
|
||||
#ifndef _LIGHTTEST_BUTTON_DATA_MANAGE_H_
|
||||
#define _LIGHTTEST_BUTTON_DATA_MANAGE_H_
|
||||
|
||||
|
||||
#include "LightTestButtonDefine.h"
|
||||
#include "LightTestButtonConfigDataManage.h"
|
||||
#include "RelayDefine.h"
|
||||
#include "RelayDataManage.h"
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 试灯按钮处理函数
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
*/
|
||||
void LightTestButtonDataManageProc(void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,33 +0,0 @@
|
||||
/********************************************************
|
||||
*
|
||||
* 文 件 名: LightTestButtonDefine.h
|
||||
* 版权说明: 北京交控科技有限公司
|
||||
* 创建时间: 2025-12-09
|
||||
* 作 者: 联锁组
|
||||
* 功能描述: 试灯按钮配置数据头文件
|
||||
* 函数包括:
|
||||
* 使用注意:
|
||||
* 修改记录:
|
||||
*
|
||||
********************************************************/
|
||||
|
||||
#ifndef _LIGHTTESTBUTTON_DEFINE_H_
|
||||
#define _LIGHTTESTBUTTON_DEFINE_H_
|
||||
|
||||
#include "CommonTypes.h"
|
||||
|
||||
/* 试灯表示灯最大数量 */
|
||||
#define LIGHTTESTBUTTON_LIGHT_MAX_NUM ((UINT8)13U)
|
||||
|
||||
/* 试灯表示灯支持最大数 */
|
||||
#define LIGHTTESTBUTTON_LIGHT_SUPPORT_MAX_NUM ((UINT8)208U)
|
||||
|
||||
/* 试灯按钮可配置最大数量 */
|
||||
#define LIGHTTESTBUTTON_BUTTON_MAX_NUM ((UINT16)70U)
|
||||
|
||||
/* 武汉新港OC采集试灯按钮类型 */
|
||||
#define LIGHTTESTBUTTON_TYPE_XINGANG ((UINT8)0xaaU)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
|
||||
#include "LogRecord.h"
|
||||
#include "../ParsePack/ParsePackVobcData.h"
|
||||
#include "../ParsePack/ParsePackZcData.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
@@ -22,27 +21,18 @@ UINT16 colStringLength = 0u;
|
||||
UINT8 drvString[RELAY_SUM_MAX] = {0u};/*驱动数据*/
|
||||
UINT16 drvStringLength = 0u;
|
||||
AxisSectionDataStruct Record_AxisSecDataStru[AXIS_SECTION_SUM_MAX];/*参考计轴区段数据*/
|
||||
AxisSectionDataStructCC Record_AxisSecDataStruCC[AXIS_SECTION_SUM_MAX];/*参考计轴区段数据-车车*/
|
||||
SignalDataStruct Record_SignalDataStru[SIGNAL_SUM_MAX];/*参考信号机动态数据*/
|
||||
SignalDataStructCC Record_SignalDataStruCC[SIGNAL_SUM_MAX];/*参考信号机动态数据-车车*/
|
||||
EsbDataStruct Record_EsbDataStru[ESB_SUM_MAX]; /*参考ESB动态数据*/
|
||||
SwitchDataStruct Record_SwitchDataStru[SWITCH_SUM_MAX];/*参考道岔动态数据*/
|
||||
PhysicalSectionDataStruct Record_PhysicalSectionDataStru[PHYSICAL_SECTION_SUM_MAX];/*参考物理区段动态数据*/
|
||||
PhysicalSectionDataStructCC Record_PhySecDataStruCC[PHYSICAL_SECTION_SUM_MAX] = { 0U };/*参考物理区段动态数据CC*/
|
||||
RouteDataStruct Record_RouteDataStru[ROUTE_SUM_MAX];/*参考进路动态数据*/
|
||||
RouteDataStructCC Record_RouteDataStruCC[ROUTE_SUM_MAX];/*参考进路动态数据-车车*/
|
||||
NonRouteDataStruct Record_NonRouteDataStru[NONROUTE_ID_NUM_MAX]; /*参考非进路调车动态数据*/
|
||||
LogicSectionDataStruct Record_LogicSecDataStru[LOGIC_SECTION_SUM_MAX];/*参考逻辑区段动态数据*/
|
||||
LogicSectionDataStructCC Record_LogicSecDataStruCC[LOGIC_SECTION_SUM_MAX];/*参考逻辑区段动态数据-车车*/
|
||||
WashMachineDataStruct Record_WashMachineDataStru[WASHMACHINE_SUM_MAX]; /*参考洗车机动态数据*/
|
||||
PsdDataStruct Record_PsdDataStru[PSD_SUM_MAX];/*参考屏蔽门动态数据*/
|
||||
PsdDataStructCC Record_PsdDataStruCC[PSD_SUM_MAX] = { 0U };/*参考屏蔽门动态数据CC*/
|
||||
GaragedoorDataStruct Record_GaragedoorDataStru[GARAGE_DOOR_SUM_MAX]; /*参考车库门数据结构体*/
|
||||
GaragedoorDataStructCC Record_GaragedoorDataStruCC[GARAGE_DOOR_SUM_MAX]; /*参考车库门数据结构体-车车*/
|
||||
FloodGateDataStruct Record_FloodGateDataStru[FLOOD_GATE_SUM_MAX]; /*参考防烟门数据结构体*/
|
||||
FloodGateDataStructCC Record_FloodGateDataStruCC[FLOOD_GATE_SUM_MAX]; /*参考防烟门数据结构体-车车*/
|
||||
FloodGateDataStruct Record_FloodGateDataStru[FLOOD_GATE_SUM_MAX]; /**/
|
||||
OverlapDataStruct Record_OverlapDataStru[OVERLAP_SUM_MAX];/*参考保护区段动态数据*/
|
||||
OverlapDataStructCC Record_OverlapDataStruCC[OVERLAP_SUM_MAX];/*参考保护区段动态数据-车车*/
|
||||
VirCIKeyDataStru Record_VirCIKeyDataStru[VIRTUAL_CI_MAX]= {0u};/*记录虚拟联锁关键数据*/
|
||||
VirCIKeyDataStru newVirCIKeyDataStru[VIRTUAL_CI_MAX]= {0u};
|
||||
SpksDataStruct Record_spksDataBuff[SPKS_SUM_MAX] = { 0u };
|
||||
@@ -52,7 +42,7 @@ TsrDataStruct Record_TsrInfo[TSR_MAX_SUM] = { 0u }; /*
|
||||
OCStationIndicDataStru Record_OCStationIndicBuff[INDICATOR_SUM_MAX] = { 0u };
|
||||
LogicalRouteDataStruct Record_LogicalRouteDataStru[ROUTE_LOGICAL_SUM_MAX] = { 0U };
|
||||
NonAutoReturnDataStruct Record_NonReturnDataStru[NON_AUTO_RETURN_SUM_MAX] = { 0U };
|
||||
NonAutoReturnDataStructCC Record_NonReturnDataStruCC[NON_AUTO_RETURN_SUM_MAX] = { 0U };
|
||||
|
||||
UINT8 outString[1024*1024] = {0u};/*比较后的设备打印数据缓冲*/
|
||||
extern QueueStruct logPrintfQue; /*日志打印缓存队列*/
|
||||
UINT16 logIndex = 0u; /*日志缓存索引*/
|
||||
@@ -468,29 +458,19 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
UINT16 wTrainId = 0u;
|
||||
UINT8 returnValue = CI_SUCCESS;/*返回值*/
|
||||
UINT8 comparaResult = 0u;/*比较结果*/
|
||||
UINT8 comparaResultCC = 0u;/*比较结果*/
|
||||
UINT16 floodGateTotalSum = 0u;/*防淹门总数量*/
|
||||
AxisSectionDataStruct* newAxisSecData = GetAxisSecData();
|
||||
AxisSectionDataStructCC* pAxisSecDataCC = GetAxisSecDataCC();
|
||||
SignalDataStruct* newSignalData = GetSignalData();
|
||||
SignalDataStructCC* pSignalDataCC = GetSignalDataCC();
|
||||
SwitchDataStruct* newSwitchData = GetSwitchData();
|
||||
PhysicalSectionDataStruct* newPhysicalSectionData = GetPhySecData();
|
||||
PhysicalSectionDataStructCC* pPhysicalSectionDataCC = GetPhySecDataCC();
|
||||
RouteDataStruct* newRouteData = GetRouteData();
|
||||
RouteDataStructCC* pRouteDataCC = GetRouteDataCC();
|
||||
NonRouteDataStruct* newNonRouteDataStru = GetNonRouteDataPtr();
|
||||
LogicSectionDataStruct* newLogicSecData = GetLogicSecData();
|
||||
LogicSectionDataStructCC* pLogicSecDataCC = GetLogicSecDataCC();
|
||||
WashMachineDataStruct* newWashMachineData = GetWashMachineData();
|
||||
PsdDataStruct * newPsdData = GetPsdData();
|
||||
PsdDataStructCC* pPsdDataCC = GetPsdDataCC();
|
||||
GaragedoorDataStruct* newGaragedoorData = GetGaragedoorData(); /*获取车库门数据结构体*/
|
||||
GaragedoorDataStructCC* pGaragedoorDataCC = GetGaragedoorDataCC(); /*获取车库门数据结构体*/
|
||||
FloodGateDataStruct *pNewFloodGateData = GetFloodGateData(); /*获取防淹门数据结构体*/
|
||||
FloodGateDataStructCC* pNewFloodGateDataCC = GetFloodGateDataCC(); /*获取防淹门数据结构体*/
|
||||
OverlapDataStruct* newOverlapData = GetOverlapData();
|
||||
OverlapDataStructCC* pOverlapDataCC = GetOverlapDataCC();
|
||||
TrainInfoStru* pNewTrainInfoData = GetTrainInfoData();
|
||||
TsrDataStruct* pNewTsrInfo = GetTsrData(); /* 临时限速信息 */
|
||||
CfpDataStru * pNewCfpData = GetCfpData();
|
||||
@@ -498,16 +478,14 @@ 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;
|
||||
UINT16 deviceNum = 0u;
|
||||
UINT8 localCiType = 0u;
|
||||
UINT16 wNonAutoReturnCurSum = 0U;/*无人折返按钮当前总数*/
|
||||
NonAutoReturnDataStruct* pNonAutoReturnData = NULL; /*无人折返数据结构体指针*/
|
||||
NonAutoReturnDataStructCC* pNonReturnDataStruCC = NULL; /*无人折返数据结构体指针-CC*/
|
||||
UINT8 chThisOCBoardState = 0U;
|
||||
NonAutoReturnDataStruct* pNonAutoReturnData = NULL;/*无人折返数据结构体指针*/
|
||||
|
||||
|
||||
/*************************************打印物理区段数据********************************************/
|
||||
/*打印区段数据*/
|
||||
@@ -519,10 +497,9 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
deviceId = GetPhySecId(ii);
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_PhysicalSectionDataStru[deviceId]), (UINT16)sizeof(PhysicalSectionDataStruct),
|
||||
(UINT8*)(&newPhysicalSectionData[deviceId]), (UINT16)sizeof(PhysicalSectionDataStruct));
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_PhySecDataStruCC[deviceId]), (UINT16)sizeof(PhysicalSectionDataStructCC),
|
||||
(UINT8*)(&pPhysicalSectionDataCC[deviceId]), (UINT16)sizeof(PhysicalSectionDataStructCC));
|
||||
|
||||
if ((1U == comparaResult) || (1U == comparaResultCC))
|
||||
|
||||
if(0u != comparaResult)
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR != Flag)
|
||||
@@ -552,15 +529,11 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].SectionResetType;/*区段计轴复位类型*/
|
||||
LongToChar(newPhysicalSectionData[deviceId].SectionResetStartCycNum, &outString[outStringLength]);/*区段计轴复位开始周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].chResetCmdTag;/*复位命令标签*/
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].chResetCmdTagBack;/*复位命令标签反馈*/
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].PhySecPreResetState;/*计轴预复位状态*/
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].chPreResetBack;/*预复位命令反馈*/
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].chDirectResetRst;/*直接复位结果*/
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].chDirectResetBack;/*直接复位命令反馈*/
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].StopSteadyFlag;/*停稳状态信息*/
|
||||
outString[outStringLength] = pPhysicalSectionDataCC[deviceId].StopSteadyFlag;/*停稳状态信息CC(0x55-未停稳,0xAA-停稳)*/
|
||||
outStringLength++;
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].ArbState;/*ARB状态*/
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].ProtectSecLockDelayTimeFlag;/*保护区段锁闭延时标志(动态字段)*/
|
||||
outString[outStringLength++] = newPhysicalSectionData[deviceId].StopCheckFlag; /*物理区段停止检查标志(未设置/设置) (动态字段)*/
|
||||
@@ -594,10 +567,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 4u;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*数据一致,不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
if (0u == outStringLength)
|
||||
@@ -644,14 +613,11 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_SignalDataStru[deviceId]), (UINT16)sizeof(SignalDataStruct),
|
||||
(UINT8*)(&newSignalData[deviceId]), (UINT16)sizeof(SignalDataStruct));
|
||||
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_SignalDataStruCC[deviceId]), (UINT16)sizeof(SignalDataStructCC),
|
||||
(UINT8*)(&pSignalDataCC[deviceId]), (UINT16)sizeof(SignalDataStructCC));
|
||||
|
||||
if ((0U==comparaResult) && (0U == comparaResultCC))
|
||||
if (0u==comparaResult)
|
||||
{/*比较数据一致*/
|
||||
|
||||
}
|
||||
else if ((1U==comparaResult ) || (1U == comparaResultCC))
|
||||
else if (1u==comparaResult )
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR != Flag)
|
||||
@@ -662,8 +628,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength++] = newSignalData[deviceId].FLockState;/*封锁状态*/
|
||||
outString[outStringLength++] = newSignalData[deviceId].LightExtinctState;/*亮灭灯状态*/
|
||||
outString[outStringLength] = pSignalDataCC[deviceId].LightExtinctState;/*亮灭灯状态CC(0x55:灭灯,0xaa:亮灯)*/
|
||||
outStringLength++;
|
||||
outString[outStringLength++] = newSignalData[deviceId].PreColor;/*之前显示颜色*/
|
||||
outString[outStringLength++] = newSignalData[deviceId].CurColor;/*当前显示颜色*/
|
||||
outString[outStringLength++] = newSignalData[deviceId].PreDriveColor;/*之前驱动颜色*/
|
||||
@@ -676,8 +640,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
LongToChar(newSignalData[deviceId].CollSigOpenStartCycNum,&outString[outStringLength]); /*采集信号机开放起始周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newSignalData[deviceId].SignalCrossState;/*信号机跨压状态*/
|
||||
outString[outStringLength] = pSignalDataCC[deviceId].SignalCrossState;/*信号机跨压状态CC(0x55:未跨压,0xaa:跨压)*/
|
||||
outStringLength++;
|
||||
outString[outStringLength++] = newSignalData[deviceId].SignalYLockOpenState;/*引导总锁信号开放状态*/
|
||||
outString[outStringLength++] = newSignalData[deviceId].AtsDetainFlag;/*Ats人工扣车标志*/
|
||||
outString[outStringLength++] = newSignalData[deviceId].AtsDetainFlagAuto;/*Ats自动扣车标志*/
|
||||
@@ -704,9 +666,8 @@ 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)
|
||||
if (MAX_SIGNAL_LIGHTUPLINK_NUM < newSignalData[deviceId].wSignalLightUpLinkIdSum)
|
||||
{
|
||||
/* 数量合法 */
|
||||
ShortToChar(0u, &outString[outStringLength]);/*信号机点灯link数量*/
|
||||
@@ -715,12 +676,12 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
else
|
||||
{
|
||||
/* 数量合法 */
|
||||
ShortToChar(pSignalDataCC[deviceId].wSignalLightUpLinkIdSum, &outString[outStringLength]);/*信号机点灯link数量*/
|
||||
ShortToChar(newSignalData[deviceId].wSignalLightUpLinkIdSum, &outString[outStringLength]);/*信号机点灯link数量*/
|
||||
outStringLength += 2u;
|
||||
|
||||
for (jj = 0u; jj < pSignalDataCC[deviceId].wSignalLightUpLinkIdSum; jj++)
|
||||
for (jj = 0u; jj < newSignalData[deviceId].wSignalLightUpLinkIdSum; jj++)
|
||||
{
|
||||
ShortToChar(pSignalDataCC[deviceId].szSignalLightUpLinkIdBuf[jj], &outString[outStringLength]);/*信号机点灯link数量*/
|
||||
ShortToChar(newSignalData[deviceId].szSignalLightUpLinkIdBuf[jj], &outString[outStringLength]);/*信号机点灯link数量*/
|
||||
outStringLength += 2u;
|
||||
}
|
||||
}
|
||||
@@ -738,9 +699,9 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 4u;
|
||||
LongToChar(newSignalData[deviceId].CancelDetainErrTrigPressCycNum, &outString[outStringLength]); /*取消扣车按钮误触发按下周期*/
|
||||
outStringLength += 4u;
|
||||
ShortToChar(pSignalDataCC[deviceId].wSignalLightUpTrainId, &outString[outStringLength]);/*信号机点灯区段接近列车ID*/
|
||||
ShortToChar(newSignalData[deviceId].wSignalLightUpTrainId, &outString[outStringLength]);/*信号机点灯区段接近列车ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength++] = pSignalDataCC[deviceId].cSleepTrainLightUpFlag; /*休眠车点亮信号机标志:0x55 无效,0xAA 有效*/
|
||||
outString[outStringLength++] = newSignalData[deviceId].cSleepTrainLightUpFlag; /*休眠车点亮信号机标志:0x55 无效,0xAA 有效*/
|
||||
outString[outStringLength++] = newSignalData[deviceId].cInHumidRailFlag; /*信号机湿轨标志:0x55 无效,0xAA 有效*/
|
||||
outString[outStringLength] = newSignalData[deviceId].cDetCutBtnState; /*扣车旁路按钮状态:0x55-无效,0xAA-有效*/
|
||||
outStringLength++;
|
||||
@@ -837,11 +798,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 4u;
|
||||
LongToChar(pNewEsbData[deviceId].EsbCutErrTriggerPressCycNum, &outString[outStringLength]); /*紧急关闭旁路按钮误触发按下周期*/
|
||||
outStringLength += 4U;
|
||||
|
||||
outString[outStringLength] = pNewEsbData[deviceId].cOnePlatEsbState;/*同站紧急按钮激活状态:0x55-未激活,0xAA-激活*/
|
||||
outStringLength++;
|
||||
outString[outStringLength] = pNewEsbData[deviceId].cOnePlatEsbCutState;/*同站紧急旁路按钮激活状态:0x55-未激活,0xAA-激活*/
|
||||
outStringLength++;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -959,56 +915,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newSwitchData[deviceId].chSwitchJichaState; /*道岔挤岔状态*/
|
||||
LongToChar(newSwitchData[deviceId].SwitchCollTolerateCycNum, &outString[outStringLength]);/*容忍周期号*/
|
||||
outStringLength += 4u;
|
||||
|
||||
LongToChar(newSwitchData[deviceId].SwitchOutputDrvCmdCycNum, &outString[outStringLength]);/*驱动起始周期*/
|
||||
outStringLength += 4u;
|
||||
|
||||
outString[outStringLength++] = newSwitchData[deviceId].mainControlOcId;/*主控OC*/
|
||||
|
||||
outString[outStringLength++] = newSwitchData[deviceId].chSwitchBelongOcNum;/*道岔所属OC数*/
|
||||
for (jj = 0U; jj < newSwitchData[deviceId].chSwitchBelongOcNum; jj++)
|
||||
{
|
||||
outString[outStringLength++] = newSwitchData[deviceId].belongOCData[jj].OcId;/*道岔所属OC*/
|
||||
outString[outStringLength++] = newSwitchData[deviceId].belongOCData[jj].controlMode;/*OC当前主控状态*/
|
||||
outString[outStringLength++] = newSwitchData[deviceId].belongOCData[jj].OutControlCmd;/*发送OC当前主控命令*/
|
||||
outString[outStringLength++] = newSwitchData[deviceId].belongOCData[jj].PlusBoxSate;/*插箱状态*/
|
||||
chThisOCBoardState = GetSwitchThisOCBoardState(deviceId, newSwitchData[deviceId].belongOCData[jj].OcId);
|
||||
outString[outStringLength++] = chThisOCBoardState;/*双系板卡故障状态*/
|
||||
|
||||
LongToChar(newSwitchData[deviceId].belongOCData[jj].OutMainControlCmdCycNum, &outString[outStringLength]);/*升主控命令周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newSwitchData[deviceId].belongOCData[jj].FindPostionCmd;/*寻表命令*/
|
||||
LongToChar(newSwitchData[deviceId].belongOCData[jj].FindCmdStartCycNum, &outString[outStringLength]);/*寻表命令起始周期*/
|
||||
outStringLength += 4u;
|
||||
}
|
||||
|
||||
outString[outStringLength++] = newSwitchData[deviceId].PLockedAxisSecNum;/*被防护锁闭的计轴区段ID*/
|
||||
for (jj = 0; jj < SWITCH_MAX_PROTECT_LOCKED_NUM; jj++)
|
||||
{
|
||||
ShortToChar(newSwitchData[deviceId].PLockedAxisSecIdArr[jj], &outString[outStringLength]);
|
||||
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
|
||||
@@ -1057,14 +963,11 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_RouteDataStru[deviceId]), (UINT16)sizeof(RouteDataStruct),
|
||||
(UINT8*)(&newRouteData[deviceId]), (UINT16)sizeof(RouteDataStruct));
|
||||
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_RouteDataStruCC[deviceId]), (UINT16)sizeof(RouteDataStructCC),
|
||||
(UINT8*)(&pRouteDataCC[deviceId]), (UINT16)sizeof(RouteDataStructCC));
|
||||
|
||||
if ((0U == comparaResult) && (0U == comparaResultCC))
|
||||
if (0u==comparaResult)
|
||||
{/*比较数据一致*/
|
||||
|
||||
}
|
||||
else if ((1U==comparaResult) || (1U == comparaResultCC))
|
||||
else if (1u==comparaResult )
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR != Flag)
|
||||
@@ -1100,8 +1003,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
ShortToChar(newRouteData[deviceId].AllAutoReturnId,&outString[outStringLength]);/*全自动折返进路ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength++] = newRouteData[deviceId].StopensureFlag;/*停车保证标志*/
|
||||
outString[outStringLength] = pRouteDataCC[deviceId].StopensureFlag;/*停车保证标志CC(0x55:已设置,0xAA:未设置)*/
|
||||
outStringLength++;
|
||||
outString[outStringLength++] = newRouteData[deviceId].StopKeepCheckFlag; /* 保持时候用的停车保证标志 */
|
||||
outString[outStringLength++] = newRouteData[deviceId].RouteStateFlag; /*进路状态标志(1:表示有效;0:表示无效)*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].TrainEnterFlag;/*列车驶入标志*/
|
||||
@@ -1134,19 +1035,19 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newRouteData[deviceId].AutoSigPropertyLoseEfficacyFlag; /*自动信号属性失效标志(未设置/设置)*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].OverlapNeedCIlockFlag; /*保护区段需要CI锁闭标志*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].OverlapLockProcFlag; /*保护区段在锁闭过程中标志*/
|
||||
ShortToChar(pRouteDataCC[deviceId].wStopEnsureTrainId, &outString[outStringLength]);/*进路停车保证列车ID*/
|
||||
ShortToChar(newRouteData[deviceId].wStopEnsureTrainId, &outString[outStringLength]);/*进路停车保证列车ID*/
|
||||
outStringLength += 2u;
|
||||
LongToChar(pRouteDataCC[deviceId].dwStopEnsureCyc, &outString[outStringLength]);/*停车保证询问周期号*/
|
||||
LongToChar(newRouteData[deviceId].dwStopEnsureCyc, &outString[outStringLength]);/*停车保证询问周期号*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = pRouteDataCC[deviceId].cResReqOtherCIId; /*发送资源申请的联锁ID*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].cResReqOtherCIId; /*发送资源申请的联锁ID*/
|
||||
|
||||
|
||||
if (ROUTE_APPLY_RECD_TRAIN_SUM_MAX >= pRouteDataCC[deviceId].chResReqTrainSum)
|
||||
if (ROUTE_APPLY_RECD_TRAIN_SUM_MAX >= newRouteData[deviceId].chResReqTrainSum)
|
||||
{
|
||||
outString[outStringLength++] = pRouteDataCC[deviceId].chResReqTrainSum; /*发送资源申请的联锁ID*/
|
||||
for (jj = 0u; jj < pRouteDataCC[deviceId].chResReqTrainSum; jj++)
|
||||
outString[outStringLength++] = newRouteData[deviceId].chResReqTrainSum; /*发送资源申请的联锁ID*/
|
||||
for (jj = 0u; jj < newRouteData[deviceId].chResReqTrainSum; jj++)
|
||||
{
|
||||
ShortToChar(pRouteDataCC[deviceId].wszResReqTrainId[jj], &outString[outStringLength]);/*发送资源申请的列车ID*/
|
||||
ShortToChar(newRouteData[deviceId].wszResReqTrainId[jj], &outString[outStringLength]);/*发送资源申请的列车ID*/
|
||||
outStringLength += 2u;
|
||||
}
|
||||
}
|
||||
@@ -1155,13 +1056,13 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = 0u; /*发送资源申请的联锁ID*/
|
||||
}
|
||||
|
||||
if (ROUTE_APPLY_RECD_TRAIN_SUM_MAX >= pRouteDataCC[deviceId].ITSRouteApplyTrainIdSum)
|
||||
if (ROUTE_APPLY_RECD_TRAIN_SUM_MAX >= newRouteData[deviceId].ITSRouteApplyTrainIdSum)
|
||||
{
|
||||
outString[outStringLength++] = pRouteDataCC[deviceId].ITSRouteApplyTrainIdSum; /*ITS申请路径命令的列车ID记录总数*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].ITSRouteApplyTrainIdSum; /*ITS申请路径命令的列车ID记录总数*/
|
||||
|
||||
for (jj = 0u; jj < pRouteDataCC[deviceId].ITSRouteApplyTrainIdSum; jj++)
|
||||
for (jj = 0u; jj < newRouteData[deviceId].ITSRouteApplyTrainIdSum; jj++)
|
||||
{
|
||||
ShortToChar(pRouteDataCC[deviceId].ITSRouteApplyTrainIdBuf[jj], &outString[outStringLength]);/*通过ITS申请路径命令记录的列车ID数组*/
|
||||
ShortToChar(newRouteData[deviceId].ITSRouteApplyTrainIdBuf[jj], &outString[outStringLength]);/*通过ITS申请路径命令记录的列车ID数组*/
|
||||
outStringLength += 2u;
|
||||
}
|
||||
|
||||
@@ -1172,16 +1073,16 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
}
|
||||
|
||||
/*可动道岔标志*/
|
||||
outString[outStringLength++] = pRouteDataCC[deviceId].HalfRouteDataSt.HalfRouteSwitchMoveValid;
|
||||
outString[outStringLength++] = newRouteData[deviceId].HalfRouteDataSt.HalfRouteSwitchMoveValid;
|
||||
|
||||
if (MAX_ROUTE_IN_LT_NUM > pRouteDataCC[deviceId].HalfRouteDataSt.RouteLockLgcSecNum)
|
||||
if (MAX_ROUTE_IN_LT_NUM > newRouteData[deviceId].HalfRouteDataSt.RouteLockLgcSecNum)
|
||||
{
|
||||
/*部分锁闭逻辑区段数量*/
|
||||
outString[outStringLength++] = pRouteDataCC[deviceId].HalfRouteDataSt.RouteLockLgcSecNum;
|
||||
outString[outStringLength++] = newRouteData[deviceId].HalfRouteDataSt.RouteLockLgcSecNum;
|
||||
/*部分锁闭逻辑区段ID*/
|
||||
for (jj = 0u; jj < pRouteDataCC[deviceId].HalfRouteDataSt.RouteLockLgcSecNum; jj++)
|
||||
for (jj = 0u; jj < newRouteData[deviceId].HalfRouteDataSt.RouteLockLgcSecNum; jj++)
|
||||
{
|
||||
ShortToChar(pRouteDataCC[deviceId].HalfRouteDataSt.RouteLockLgcSecIdBuf[jj], &outString[outStringLength]);/*通过ITS申请路径命令记录的列车ID数组*/
|
||||
ShortToChar(newRouteData[deviceId].HalfRouteDataSt.RouteLockLgcSecIdBuf[jj], &outString[outStringLength]);/*通过ITS申请路径命令记录的列车ID数组*/
|
||||
outStringLength += 2u;
|
||||
}
|
||||
|
||||
@@ -1191,18 +1092,18 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = 0u;
|
||||
}
|
||||
/*部分锁闭列车ID*/
|
||||
ShortToChar(pRouteDataCC[deviceId].HalfRouteDataSt.HalfResReqTrainId, &outString[outStringLength]);/*通过ITS申请路径命令记录的列车ID数组*/
|
||||
ShortToChar(newRouteData[deviceId].HalfRouteDataSt.HalfResReqTrainId, &outString[outStringLength]);/*通过ITS申请路径命令记录的列车ID数组*/
|
||||
outStringLength += 2u;
|
||||
|
||||
if (ROUTE_TRAIN_LOC_MAX_LGC_SUM >= pRouteDataCC[deviceId].HalfRouteDataSt.TrainLocLgcSecNum)
|
||||
if (ROUTE_TRAIN_LOC_MAX_LGC_SUM >= newRouteData[deviceId].HalfRouteDataSt.TrainLocLgcSecNum)
|
||||
{
|
||||
/*部分锁闭列车身下资源数量*/
|
||||
outString[outStringLength++] = pRouteDataCC[deviceId].HalfRouteDataSt.TrainLocLgcSecNum;
|
||||
outString[outStringLength++] = newRouteData[deviceId].HalfRouteDataSt.TrainLocLgcSecNum;
|
||||
|
||||
for (jj = 0u; jj < pRouteDataCC[deviceId].HalfRouteDataSt.TrainLocLgcSecNum; jj++)
|
||||
for (jj = 0u; jj < newRouteData[deviceId].HalfRouteDataSt.TrainLocLgcSecNum; jj++)
|
||||
{
|
||||
/*部分锁闭列车身下资源逻辑区段ID*/
|
||||
ShortToChar(pRouteDataCC[deviceId].HalfRouteDataSt.TrainLocLgcSecIdBuf[jj], &outString[outStringLength]);/*通过ITS申请路径命令记录的列车ID数组*/
|
||||
ShortToChar(newRouteData[deviceId].HalfRouteDataSt.TrainLocLgcSecIdBuf[jj], &outString[outStringLength]);/*通过ITS申请路径命令记录的列车ID数组*/
|
||||
outStringLength += 2u;
|
||||
}
|
||||
|
||||
@@ -1211,7 +1112,7 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
{
|
||||
outString[outStringLength++] = 0u;
|
||||
}
|
||||
LongToChar(pRouteDataCC[deviceId].dwFirstElockStartCycNum, &outString[outStringLength]); /*进路第一个锁闭的逻辑区段延时设置区段故障起始周期号*/
|
||||
LongToChar(newRouteData[deviceId].dwFirstElockStartCycNum, &outString[outStringLength]); /*进路第一个锁闭的逻辑区段延时设置区段故障起始周期号*/
|
||||
outStringLength += 4u;
|
||||
|
||||
outString[outStringLength++] = newRouteData[deviceId].cRelZuHeRouteSGBJDelayFlag; /*关联组合进路声光报警是否延时标志*/
|
||||
@@ -1222,12 +1123,8 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newRouteData[deviceId].cRouteNeedDriveSGBJFlag; /*进路驱动声光报警标志*/
|
||||
|
||||
outString[outStringLength++] = newRouteData[deviceId].cRouteDrivedSGBJFlag; /*进路驱动声光报警标志:0x55 未驱动过;0xAA 已驱动过*/
|
||||
outString[outStringLength++] = pRouteDataCC[deviceId].chRouteNearSecSearchState; /*进路接近区段查询状态是否有故障车*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].chRouteNearSecSearchState; /*进路接近区段查询状态是否有故障车*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].chRouteApplySwitchCheckFlag; /*进路办理相邻控区道岔检查标志*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].chRoutCouplinkFlag; /*进路联挂标志*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].chCouplinkSuccessFlag; /*进路联挂成功*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].chCouplinkErrorFlag; /*进路联挂失败*/
|
||||
outString[outStringLength++] = newRouteData[deviceId].chRouteConnReleaseFlag; /*进路联络线解锁标志*/
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1368,13 +1265,12 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
deviceId = GetLogicSecId(ii);
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_LogicSecDataStru[deviceId]), (UINT16)sizeof(LogicSectionDataStruct),
|
||||
(UINT8*)(&newLogicSecData[deviceId]), (UINT16)sizeof(LogicSectionDataStruct));
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_LogicSecDataStruCC[deviceId]), (UINT16)sizeof(LogicSectionDataStructCC),
|
||||
(UINT8*)(&pLogicSecDataCC[deviceId]), (UINT16)sizeof(LogicSectionDataStructCC));
|
||||
if ((0U==comparaResult) && (0U == comparaResultCC))
|
||||
|
||||
if (0u==comparaResult)
|
||||
{/*比较数据一致*/
|
||||
|
||||
}
|
||||
else if ((1U==comparaResult) || (1U == comparaResultCC))
|
||||
else if (1u==comparaResult )
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR==Flag)
|
||||
@@ -1390,21 +1286,10 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].PreOccupyState;/*逻辑区段之前占用状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].CurOccupyState;/*逻辑区段当前占用状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].LinShiXianSuSetFlag;/*逻辑区段临时限速*/
|
||||
outString[outStringLength] = pLogicSecDataCC[deviceId].LinShiXianSuSetFlag;/*逻辑区段临时限速CC(0x55-已未设置临时限速,0xAA-已设置临时限速,0xFF-临时限速无效)*/
|
||||
outStringLength++;
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].OccupyState;/*逻辑区段初始占用状态*/
|
||||
outString[outStringLength] = pLogicSecDataCC[deviceId].OccupyState;/*逻辑区段初始占用状态CC(0x55-未占用,0xAA-非通信车占用,0xBB-通信车占用)*/
|
||||
outStringLength++;
|
||||
outString[outStringLength] = newLogicSecData[deviceId].TXOccupyState;/*逻辑区段通信车占用状态(0x55-无车或非通信车占用,0xAA-通信车占用)*/
|
||||
outStringLength++;
|
||||
outString[outStringLength] = pLogicSecDataCC[deviceId].TXOccupyState;/*逻辑区段通信车占用状态CC(0x55-无车或非通信车占用,0xAA-通信车占用)*/
|
||||
outStringLength++;
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chLogSecCbtcArbState;/*逻辑区段CBTC_ARB状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chLogSecPbTacsArbState;/*逻辑区段PB_TACS_ARB状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chArbState;/*逻辑区段ARB状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].OccupyState;/*逻辑区段占用状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].LogLockState;/*逻辑区段锁闭状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].LogLockDir;/*逻辑区段锁闭方向*/
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].chResShareFlag;/*逻辑区段共享标志 0x55共享 0xAA非共享*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chResShareFlag;/*逻辑区段共享标志 0x55共享 0xAA非共享*/
|
||||
ShortToChar(newLogicSecData[deviceId].LogLockBelongRoute,&outString[outStringLength]);/*逻辑锁闭所属进路*/
|
||||
outStringLength += 2u;
|
||||
LongToChar(newLogicSecData[deviceId].LogUnlockStartCycNum,&outString[outStringLength]);/*逻辑延时解锁周期号*/
|
||||
@@ -1412,53 +1297,53 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
ShortToChar(newLogicSecData[deviceId].wPLockBelongRouteId, &outString[outStringLength]);/*防护锁闭的进路编号*/
|
||||
outStringLength += 2u;
|
||||
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].cResReqOtherCIId;/*发送资源请求的其他联锁ID*/
|
||||
ShortToChar(pLogicSecDataCC[deviceId].wResReqTrainId, &outString[outStringLength]);/*发送资源请求的列车ID*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].cResReqOtherCIId;/*发送资源请求的其他联锁ID*/
|
||||
ShortToChar(newLogicSecData[deviceId].wResReqTrainId, &outString[outStringLength]);/*发送资源请求的列车ID*/
|
||||
outStringLength += 2u;
|
||||
ShortToChar(pLogicSecDataCC[deviceId].JumpLockTrainId, &outString[outStringLength]);/*申请或释放跳跃锁闭命令的列车ID*/
|
||||
ShortToChar(newLogicSecData[deviceId].JumpLockTrainId, &outString[outStringLength]);/*申请或释放跳跃锁闭命令的列车ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].LogJumpLockState;/*逻辑区段跳跃锁闭状态 0x55 未锁闭,0xAA 锁闭*/
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].LogJumpLockDelayUnlockFlag;/*逻辑区段跳跃锁闭延时解锁设置标志 0x55 未设置,0xaa 设置*/
|
||||
LongToChar(pLogicSecDataCC[deviceId].LogSecJumpDelayUnlockStartCyc, &outString[outStringLength]);/*逻辑区段跳跃锁闭延时解锁起始周期号*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].LogJumpLockState;/*逻辑区段跳跃锁闭状态 0x55 未锁闭,0xAA 锁闭*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].LogJumpLockDelayUnlockFlag;/*逻辑区段跳跃锁闭延时解锁设置标志 0x55 未设置,0xaa 设置*/
|
||||
LongToChar(newLogicSecData[deviceId].LogSecJumpDelayUnlockStartCyc, &outString[outStringLength]);/*逻辑区段跳跃锁闭延时解锁起始周期号*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].LogSecJumpLockPermFlag;/*逻辑区段跳跃锁闭允许标志 0x55 允许,0xaa 禁止*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].LogSecJumpLockPermFlag;/*逻辑区段跳跃锁闭允许标志 0x55 允许,0xaa 禁止*/
|
||||
|
||||
|
||||
if (LOGIC_SECTION_RES_SUM_MAX < pLogicSecDataCC[deviceId].chTrainInfoSum)
|
||||
if (LOGIC_SECTION_RES_SUM_MAX < newLogicSecData[deviceId].chTrainInfoSum)
|
||||
{
|
||||
/* 数量不合法 */
|
||||
outString[outStringLength++] = 0u;/*逻辑区段资源数量*/
|
||||
}
|
||||
else
|
||||
{
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].chTrainInfoSum;/*逻辑区段资源数量*/
|
||||
for (jj = 0u; jj < pLogicSecDataCC[deviceId].chTrainInfoSum; jj++)
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chTrainInfoSum;/*逻辑区段资源数量*/
|
||||
for (jj = 0u; jj < newLogicSecData[deviceId].chTrainInfoSum; jj++)
|
||||
{
|
||||
ShortToChar(pLogicSecDataCC[deviceId].szTrainResData[jj].wTrainId, &outString[outStringLength]);/*列车ID*/
|
||||
ShortToChar(newLogicSecData[deviceId].szTrainResData[jj].wTrainId, &outString[outStringLength]);/*列车ID*/
|
||||
outStringLength += 2u;
|
||||
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].szTrainResData[jj].chTrainApplyState;/*列车申请状态*/
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].szTrainResData[jj].chLogicResUsable;/*列车资源状态*/
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].szTrainResData[jj].chLogicReturnState;/*折返逻辑区段标志*/
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].szTrainResData[jj].chLogicUnlockState;/*列车申请状态*/
|
||||
LongToChar(pLogicSecDataCC[deviceId].szTrainResData[jj].dwRcvUnlockCmdCyc, &outString[outStringLength]);/*逻辑延时解锁周期号*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].szTrainResData[jj].chTrainApplyState;/*列车申请状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].szTrainResData[jj].chLogicResUsable;/*列车资源状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].szTrainResData[jj].chLogicReturnState;/*折返逻辑区段标志*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].szTrainResData[jj].chLogicUnlockState;/*列车申请状态*/
|
||||
LongToChar(newLogicSecData[deviceId].szTrainResData[jj].dwRcvUnlockCmdCyc, &outString[outStringLength]);/*逻辑延时解锁周期号*/
|
||||
outStringLength += 4u;
|
||||
}
|
||||
}
|
||||
LongToChar(pLogicSecDataCC[deviceId].LogErrlockStartCycNum, &outString[outStringLength]);/*逻辑区段延时设置故障锁闭起始周期号*/
|
||||
LongToChar(newLogicSecData[deviceId].LogErrlockStartCycNum, &outString[outStringLength]);/*逻辑区段延时设置故障锁闭起始周期号*/
|
||||
outStringLength += 4U;
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chLogicProResUsable;/*逻辑区段防护锁闭资源可用状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chLogicSpksFLockState;/*逻辑区段被SPKS封锁状态*/
|
||||
|
||||
if (LOGSEC_RELATE_ROUTE_SUM_MAX >= pLogicSecDataCC[deviceId].chLogSecLockBelLogRouteSum)
|
||||
if (LOGSEC_RELATE_ROUTE_SUM_MAX >= newLogicSecData[deviceId].chLogSecLockBelLogRouteSum)
|
||||
{
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].chLogSecLockBelLogRouteSum; /*逻辑区段锁闭所属逻辑进路数量*/
|
||||
for (kk = 0U; kk < pLogicSecDataCC[deviceId].chLogSecLockBelLogRouteSum; kk++)
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chLogSecLockBelLogRouteSum; /*逻辑区段锁闭所属逻辑进路数量*/
|
||||
for (kk = 0U; kk < newLogicSecData[deviceId].chLogSecLockBelLogRouteSum; kk++)
|
||||
{
|
||||
ShortToChar(pLogicSecDataCC[deviceId].szLogSecLockBelLogRouteData[kk].wLogSecLockBelLogRouteId, &outString[outStringLength]); /*逻辑区段锁闭所属逻辑进路ID*/
|
||||
ShortToChar(newLogicSecData[deviceId].szLogSecLockBelLogRouteData[kk].wLogSecLockBelLogRouteId, &outString[outStringLength]); /*逻辑区段锁闭所属逻辑进路ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].szLogSecLockBelLogRouteData[kk].chLogSecLockBelLogRouteState; /*逻辑区段锁闭所属逻辑进路状态*/
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].szLogSecLockBelLogRouteData[kk].wLogSecLockBelLogRouteDir; /*逻辑区段被逻辑进路锁闭的方向ID*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].szLogSecLockBelLogRouteData[kk].chLogSecLockBelLogRouteState; /*逻辑区段锁闭所属逻辑进路状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].szLogSecLockBelLogRouteData[kk].wLogSecLockBelLogRouteDir; /*逻辑区段被逻辑进路锁闭的方向ID*/
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1466,12 +1351,11 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = 0U; /*逻辑区段锁闭所属逻辑进路数量超限,不解析*/
|
||||
}
|
||||
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].LogSecLogLockState; /*逻辑区段逻辑锁闭状态*/
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].LogSecLogLockDir; /*逻辑区段逻辑锁闭方向*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].LogSecLogLockState; /*逻辑区段逻辑锁闭状态*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].LogSecLogLockDir; /*逻辑区段逻辑锁闭方向*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chLinShiXianSuSetSpeed; /*逻辑区段临时限速值*/
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].chAblRelLogSecUsableFlag; /*ABL列车关联逻辑区段允许使用标志*/
|
||||
outString[outStringLength++] = pLogicSecDataCC[deviceId].cRouteLeaveLogFlag; /*离去区段ABL列车检查标志*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chLogSecEmergXianSu;/*逻辑区段紧急临时限速*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].chAblRelLogSecUsableFlag; /*ABL列车关联逻辑区段允许使用标志*/
|
||||
outString[outStringLength++] = newLogicSecData[deviceId].cRouteLeaveLogFlag; /*离去区段ABL列车检查标志*/
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1543,12 +1427,9 @@ 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;
|
||||
@@ -1556,46 +1437,18 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].PauseTrainWashRequestDrvState;/*暂停洗车请求驱动状态(动态字段:驱动)*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].PaseWashMachineRequesDrvtState;/*通过洗车机请求驱动状态(动态字段:驱动)*/
|
||||
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].WashmachineXTACurState;/*洗车同意按钮当前状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].WashmachineXTAPreState;/*洗车同意按钮上周期状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].WashmachineXTALogicState;/*洗车机按钮逻辑状态*/
|
||||
LongToChar(newWashMachineData[deviceId].WashmachineXTAPressDownCycle,&outString[outStringLength]);/*洗车机洗车同意按钮按下起始周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].WashMachineWorkModeDrvtState;/*洗车机洗车模式驱动状态(动态字段:驱动)*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].WashModeState;/*洗车机洗车模式采集状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chSetWashWorkModeBack;/*设置洗车机工作模式反馈*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashAllowState;/*降级模式洗车同意状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashAllowPassState;/*降级模式洗车同意通过状态*/
|
||||
LongToChar(newWashMachineData[deviceId].WashWorkModeRelayDrvCycle, &outString[outStringLength]);/*洗车模式继电器驱动起始周期号*/
|
||||
outStringLength += 4u;
|
||||
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashAllowState;/**降级模式洗车同意状态(动态字段:融合)*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashAllowPassState;/*降级模式洗车同意通过状态(动态字段:融合)*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashReqState;/*降级模式洗车请求状态*/
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashReqCycle, &outString[outStringLength]);/*降级模式洗车请求周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashPassReqState;/*降级模式反向洗车请求状态*/
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashPassReqCycle, &outString[outStringLength]);/*降级模式反向洗车请求周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashAllowColState;/*降级模式洗车线洗车同意状态*/
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashAllowCycle, &outString[outStringLength]);/*降级模式洗车线洗车同意按钮按下起始周期*/
|
||||
outStringLength += 4u;
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashBtVadCycle, &outString[outStringLength]);/*降级模式洗车线洗车同意按钮有效周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownDccWashAllowColState;/*降级模式DCC洗车同意状态*/
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashDccAllowCycle, &outString[outStringLength]);/*降级模式DCC洗车同意按钮按下起始周期*/
|
||||
outStringLength += 4u;
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashDccBtVadCycle, &outString[outStringLength]);/*降级模式DCC洗车同意按钮有效周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashAllowErrState;/*降级模式洗车线洗车同意粘连状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownDccWashAllowErrState;/*降级模式DCC洗车同意粘连状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashAllowPassColState;/*降级模式洗车线洗车同意反向通过状态*/
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashAllowPassCycle, &outString[outStringLength]);/*降级模式洗车线反向通过洗车同意按钮按下起始周期*/
|
||||
outStringLength += 4u;
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashBtVadPassCycle, &outString[outStringLength]);/*降级模式洗车线反向通过洗车同意按钮有效周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownDccWashAllowPassColState;/*降级模式DCC洗车同意反向通过状态*/
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashDccAllowPassCycle, &outString[outStringLength]);/*降级模式DCC反向通过洗车同意按钮按下起始周期*/
|
||||
outStringLength += 4u;
|
||||
LongToChar(newWashMachineData[deviceId].dwDownWashDccBtVadPassCycle, &outString[outStringLength]);/*降级模式DCC反向通过洗车同意按钮有效周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownWashAllowPassErrState;/*降级模式洗车线洗车同意反向通过粘连状态*/
|
||||
outString[outStringLength++] = newWashMachineData[deviceId].chDownDccWashAllowPassErrState;/*降级模式DCC洗车同意反向通过粘连状态*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1639,14 +1492,12 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
deviceId = GetPsdId(ii);
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_PsdDataStru[deviceId]), (UINT16)sizeof(PsdDataStruct),
|
||||
(UINT8*)(&newPsdData[deviceId]), (UINT16)sizeof(PsdDataStruct));
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_PsdDataStruCC[deviceId]), (UINT16)sizeof(PsdDataStructCC),
|
||||
(UINT8*)(&pPsdDataCC[deviceId]), (UINT16)sizeof(PsdDataStructCC));
|
||||
|
||||
if ((0U == comparaResult) && (0U == comparaResultCC))
|
||||
if (0u==comparaResult)
|
||||
{/*比较数据一致*/
|
||||
|
||||
}
|
||||
else if ((1U == comparaResult)|| (1U == comparaResultCC))
|
||||
else if (1u==comparaResult )
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR==Flag)
|
||||
@@ -1661,8 +1512,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 2u;
|
||||
ShortToChar(newPsdData[deviceId].psdEditGroupInfo,&outString[outStringLength]);/*PSD 编组信息*/
|
||||
outStringLength += 2u;
|
||||
ShortToChar(pPsdDataCC[deviceId].psdEditGroupInfo, &outString[outStringLength]);/*PSD 编组信息CC(0-默认值,3-三编组,4-四编组,6-六编组,8-八编组)*/
|
||||
outStringLength += 2U;
|
||||
outString[outStringLength++] = newPsdData[deviceId].DoorButtonState;/*屏蔽门按钮状态*/
|
||||
outString[outStringLength++] = newPsdData[deviceId].MutualLockRemoveState;/*屏蔽门互锁解除状态*/
|
||||
outString[outStringLength++] = newPsdData[deviceId].PsdDriveState;/*屏蔽门驱动状态*/
|
||||
@@ -1672,12 +1521,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newPsdData[deviceId].PsdCmd;/*操作屏蔽门的命令*/
|
||||
LongToChar(newPsdData[deviceId].CmdSetCycle,&outString[outStringLength]);/*命令设置周期*/
|
||||
outStringLength += 4u;
|
||||
ShortToChar(pPsdDataCC[deviceId].SrcVobcId, &outString[outStringLength]);/*操作该屏蔽门的当前VOBC编号CC*/
|
||||
outStringLength += 2U;
|
||||
outString[outStringLength] = pPsdDataCC[deviceId].PsdCmd;/*操作屏蔽门的命令CC(0x00-默认值,0x55-打开PSD命令,0xAA-关闭PSD命令,0xFF-查询PSD命令)*/
|
||||
outStringLength++;
|
||||
LongToChar(pPsdDataCC[deviceId].CmdSetCycle, &outString[outStringLength]);/*命令设置周期CC*/
|
||||
outStringLength += 4U;
|
||||
LongToChar(newPsdData[deviceId].CmdSetCyclePsc,&outString[outStringLength]);/*psc状态设置周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newPsdData[deviceId].doorOpenButtonState;/*站台开门按钮状态*/
|
||||
@@ -1689,8 +1532,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newPsdData[deviceId].StartDetectionState;/*启动探测状态*/
|
||||
outString[outStringLength++] = newPsdData[deviceId].StopDetectionState; /*停止探测状态*/
|
||||
LongToChar(newPsdData[deviceId].StopDetectionCycNum,&outString[outStringLength]);/*停止探测周期*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newPsdData[deviceId].VOBCDoorState; /*VOBC车门状态*/
|
||||
LongToChar(newPsdData[deviceId].PCBPressCycNum,&outString[outStringLength]);/*PCB按下起始周期*/
|
||||
outStringLength += 4u;
|
||||
@@ -1720,16 +1561,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength++;
|
||||
LongToChar(newPsdData[deviceId].dwPsdRelayDownCycNum, &outString[outStringLength]); /*PSD门关继电器落下起始周期*/
|
||||
outStringLength += 4U;
|
||||
|
||||
outString[outStringLength] = newPsdData[deviceId].JXTCMutualLockFaultState; /*间隙探测旁路按钮故障状态*/
|
||||
outStringLength++;
|
||||
LongToChar(newPsdData[deviceId].JXTCMutualLockStartCycNum, &outString[outStringLength]); /*间隙探测旁路按钮按压起始周期*/
|
||||
outStringLength += 4U;
|
||||
outString[outStringLength++] = newPsdData[deviceId].ibpButtonState;/*IBP盘发车按钮状态*/
|
||||
LongToChar(newPsdData[deviceId].IBPPressCycNum, &outString[outStringLength]); /*IBP盘发车按钮按下周期*/
|
||||
outStringLength += 4U;
|
||||
outString[outStringLength] = newPsdData[deviceId].chTrainZeroSpeedState; /*非零速状态*/
|
||||
outStringLength++;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1773,14 +1604,12 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
deviceId = GetGaragedoorId(ii);
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_GaragedoorDataStru[deviceId]), (UINT16)sizeof(GaragedoorDataStruct),
|
||||
(UINT8*)(&newGaragedoorData[deviceId]), (UINT16)sizeof(GaragedoorDataStruct));
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_GaragedoorDataStruCC[deviceId]), (UINT16)sizeof(GaragedoorDataStructCC),
|
||||
(UINT8*)(&pGaragedoorDataCC[deviceId]), (UINT16)sizeof(GaragedoorDataStructCC));
|
||||
|
||||
if ((0U == comparaResult) && (0U == comparaResultCC))
|
||||
if (0u==comparaResult)
|
||||
{/*比较数据一致*/
|
||||
|
||||
}
|
||||
else if ((1U == comparaResult) || (1U == comparaResultCC))
|
||||
else if (1u==comparaResult )
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR==Flag)
|
||||
@@ -1795,7 +1624,7 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength++] = newGaragedoorData[deviceId].GaragedoorState; /*车库门状态 (动态字段)*/
|
||||
outString[outStringLength++] = newGaragedoorData[deviceId].GaragedoorAllowCloseFlag; /*车库门允许关门标志ZC*/
|
||||
outString[outStringLength++] = pGaragedoorDataCC[deviceId].GDAllowCloseFlagIVOC; /*车库门允许关门标志IVOC*/
|
||||
outString[outStringLength++] = newGaragedoorData[deviceId].GDAllowCloseFlagIVOC; /*车库门允许关门标志IVOC*/
|
||||
outString[outStringLength++] = newGaragedoorData[deviceId].GaragedoorModeState; /*车库门模式状态*/
|
||||
outString[outStringLength++] = newGaragedoorData[deviceId].GaragedoorFaultState; /*车库门故障状态*/
|
||||
outString[outStringLength++] = newGaragedoorData[deviceId].GaragedoorPangLuState; /*车库门旁路状态*/;
|
||||
@@ -1803,7 +1632,7 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = newGaragedoorData[deviceId].cmdProcessState; /* 命令处理状态 */
|
||||
LongToChar(newGaragedoorData[deviceId].waiteZCResponseStartCycNum,&outString[outStringLength]);/* 等待ZC反馈开始时间 */
|
||||
outStringLength += 4u;
|
||||
LongToChar(pGaragedoorDataCC[deviceId].waiteIVOCResponseStartCycNum, &outString[outStringLength]);/* 等待IVOC反馈开始时间 */
|
||||
LongToChar(newGaragedoorData[deviceId].waiteIVOCResponseStartCycNum, &outString[outStringLength]);/* 等待IVOC反馈开始时间 */
|
||||
outStringLength += 4u;
|
||||
LongToChar(newGaragedoorData[deviceId].GaragedoorOpenStartCycNum,&outString[outStringLength]);/* 车库门打开开始周期 */
|
||||
outStringLength += 4u;
|
||||
@@ -1852,14 +1681,12 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
deviceId = GetFloodGateId(ii);
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_FloodGateDataStru[deviceId]), (UINT16)sizeof(FloodGateDataStruct),
|
||||
(UINT8*)(&pNewFloodGateData[deviceId]), (UINT16)sizeof(FloodGateDataStruct));
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_FloodGateDataStruCC[deviceId]), (UINT16)sizeof(FloodGateDataStructCC),
|
||||
(UINT8*)(&pNewFloodGateDataCC[deviceId]), (UINT16)sizeof(FloodGateDataStructCC));
|
||||
|
||||
if ((0U == comparaResult) && (0U == comparaResultCC))
|
||||
if (0u==comparaResult )
|
||||
{/*比较数据一致*/
|
||||
|
||||
}
|
||||
else if ((1U == comparaResult) || (1U == comparaResultCC))
|
||||
else if (1u==comparaResult )
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR==Flag )
|
||||
@@ -1879,19 +1706,19 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength++] = pNewFloodGateData[deviceId].CurAgreeCloseStateIn; /*当前同意关门采集状态*/;
|
||||
outString[outStringLength++] = pNewFloodGateData[deviceId].CurAgreeCloseStateOut; /* 当前同意关门输出状态(动态字段)*/
|
||||
|
||||
outString[outStringLength++] = pNewFloodGateDataCC[deviceId].FloodGateCloseApplyIvocSum; /*防淹门关门申请列车数量*/
|
||||
for (jj = 0u; jj < pNewFloodGateDataCC[deviceId].FloodGateCloseApplyIvocSum; jj++)
|
||||
outString[outStringLength++] = pNewFloodGateData[deviceId].FloodGateCloseApplyIvocSum; /*防淹门关门申请列车数量*/
|
||||
for (jj = 0u; jj < pNewFloodGateData[deviceId].FloodGateCloseApplyIvocSum; jj++)
|
||||
{
|
||||
ShortToChar(pNewFloodGateDataCC[deviceId].FloodGateCloseApplyIvocId[jj], &outString[outStringLength]);/*防淹门关门申请列车ID*/
|
||||
ShortToChar(pNewFloodGateData[deviceId].FloodGateCloseApplyIvocId[jj], &outString[outStringLength]);/*防淹门关门申请列车ID*/
|
||||
outStringLength += 2u;
|
||||
}
|
||||
|
||||
outString[outStringLength++] = pNewFloodGateDataCC[deviceId].FloodGateCloseAnsIvocSum; /*防淹门关门列车回复列车数量*/
|
||||
for (jj = 0u; jj < pNewFloodGateDataCC[deviceId].FloodGateCloseAnsIvocSum; jj++)
|
||||
outString[outStringLength++] = pNewFloodGateData[deviceId].FloodGateCloseAnsIvocSum; /*防淹门关门列车回复列车数量*/
|
||||
for (jj = 0u; jj < pNewFloodGateData[deviceId].FloodGateCloseAnsIvocSum; jj++)
|
||||
{
|
||||
ShortToChar(pNewFloodGateDataCC[deviceId].FloodGateCloseFromIvocStru[jj].wTrainId, &outString[outStringLength]);/*列车同意防淹门关门请求列车ID*/
|
||||
ShortToChar(pNewFloodGateData[deviceId].FloodGateCloseFromIvocStru[jj].wTrainId, &outString[outStringLength]);/*列车同意防淹门关门请求列车ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength++] = pNewFloodGateDataCC[deviceId].FloodGateCloseFromIvocStru[jj].wFloodGateCloseIvocFlag; /*列车同意防淹门关门请求状态*/
|
||||
outString[outStringLength++] = pNewFloodGateData[deviceId].FloodGateCloseFromIvocStru[jj].wFloodGateCloseIvocFlag; /*列车同意防淹门关门请求状态*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1935,14 +1762,12 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
deviceId = GetOverlapId(ii);
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_OverlapDataStru[deviceId]), (UINT16)sizeof(OverlapDataStruct),
|
||||
(UINT8*)(&newOverlapData[deviceId]), (UINT16)sizeof(OverlapDataStruct));
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_OverlapDataStruCC[deviceId]), (UINT16)sizeof(OverlapDataStructCC),
|
||||
(UINT8*)(&pOverlapDataCC[deviceId]), (UINT16)sizeof(OverlapDataStructCC));
|
||||
|
||||
if ((0U == comparaResult) && (0U == comparaResultCC))
|
||||
if (0u==comparaResult)
|
||||
{/*比较数据一致*/
|
||||
|
||||
}
|
||||
else if ((1U == comparaResult) || (1U == comparaResultCC))
|
||||
else if (1u==comparaResult )
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR != Flag)
|
||||
@@ -1957,10 +1782,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 4u;
|
||||
LongToChar(newOverlapData[deviceId].XuanPaiStartCycNum,&outString[outStringLength]);/*保护区段选排开始周期号*/
|
||||
outStringLength += 4u;
|
||||
LongToChar(newOverlapData[deviceId].dwAtsLastTimeLockCyc, &outString[outStringLength]);/*最近一次ATS锁闭保护区段周期号*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newOverlapData[deviceId].OverlapFromSetRouteCmdFlag; /*保护区段由进路办理时连带的标志*/
|
||||
outString[outStringLength++] = newOverlapData[deviceId].chPreLaborUnlockState; /*之前人工解锁状态*/
|
||||
outString[outStringLength++] = newOverlapData[deviceId].OverlapUnlockApplyFlag;/*向ZC申请解锁保护区段解锁标志*/
|
||||
outString[outStringLength++] = newOverlapData[deviceId].OverlapCanLaborUnlockFlag;/*保护区段可以人工解锁标志*/
|
||||
outString[outStringLength++] = newOverlapData[deviceId].OverlapLaborUnlockSetState;/*保护区段人工解锁设置状态*/
|
||||
@@ -1977,10 +1798,10 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outStringLength += 2U;
|
||||
outString[outStringLength++] = newOverlapData[deviceId].laborLockOverlapCmd;/*人工锁闭保护区段命令标志*/
|
||||
|
||||
ShortToChar(pOverlapDataCC[deviceId].wOverlapUnlockApplyTrainId, &outString[outStringLength]);/*申请解锁保护区段的列车ID*/
|
||||
ShortToChar(newOverlapData[deviceId].wOverlapUnlockApplyTrainId, &outString[outStringLength]);/*申请解锁保护区段的列车ID*/
|
||||
outStringLength += 2U;
|
||||
|
||||
LongToChar(pOverlapDataCC[deviceId].dwReqIvocUnLockStartCycNum, &outString[outStringLength]);/*向车申请解锁保护区段起始周期号*/
|
||||
LongToChar(newOverlapData[deviceId].dwReqIvocUnLockStartCycNum, &outString[outStringLength]);/*向车申请解锁保护区段起始周期号*/
|
||||
outStringLength += 4U;
|
||||
|
||||
outString[outStringLength++] = newOverlapData[deviceId].cProSwitchCheckResultFlag;/*跨控区防护道岔检查结果标志(0xFF:默认值,0x55:失败,0xAA:成功)*/
|
||||
@@ -2055,14 +1876,11 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_AxisSecDataStru[deviceId]), (UINT16)sizeof(AxisSectionDataStruct),
|
||||
(UINT8*)(&newAxisSecData[deviceId]), (UINT16)sizeof(AxisSectionDataStruct));
|
||||
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_AxisSecDataStruCC[deviceId]), (UINT16)sizeof(AxisSectionDataStructCC),
|
||||
(UINT8*)(&pAxisSecDataCC[deviceId]), (UINT16)sizeof(AxisSectionDataStructCC));
|
||||
|
||||
if ((0u==comparaResult) && (0U == comparaResultCC))
|
||||
if (0u==comparaResult)
|
||||
{/*比较数据一致*/
|
||||
|
||||
}
|
||||
else if ((1U==comparaResult ) || (1U == comparaResultCC))
|
||||
else if (1u==comparaResult )
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR != Flag)
|
||||
@@ -2072,20 +1890,20 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
ShortToChar(newAxisSecData[deviceId].AxisSectionId,&outString[outStringLength]);/*计轴区段ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength++] = newAxisSecData[deviceId].AxisArbState;/*计轴ARB状态 (动态字段)*/
|
||||
outString[outStringLength] = pAxisSecDataCC[deviceId].AxisArbState;/*计轴ARB状态CC(0x55-未ARB,0xaa-ARB)*/
|
||||
outStringLength++;
|
||||
outString[outStringLength++] = newAxisSecData[deviceId].AxisJumpLockApplyFlag;/*跳跃锁闭申请标志*/
|
||||
outString[outStringLength++] = newAxisSecData[deviceId].AxisJumpLockCancelApplyFlag;/*跳跃锁闭取消申请标志*/
|
||||
LongToChar(newAxisSecData[deviceId].AxisJumpLockApplyCylce,&outString[outStringLength]);/*跳跃锁闭申请周期号*/
|
||||
outStringLength += 4u;
|
||||
outString[outStringLength++] = newAxisSecData[deviceId].AxisJumpLockState;/*跳跃锁闭状态*/
|
||||
outString[outStringLength++] = pAxisSecDataCC[deviceId].AxisOccStatus;/*计轴占用状态*/
|
||||
LongToChar(pAxisSecDataCC[deviceId].dwAxisOccCycNum, &outString[outStringLength]);/*计轴占用起始周期*/
|
||||
outString[outStringLength++] = newAxisSecData[deviceId].AxisOccStatus;/*计轴占用状态*/
|
||||
LongToChar(newAxisSecData[deviceId].dwAxisOccCycNum, &outString[outStringLength]);/*计轴占用起始周期*/
|
||||
outStringLength += 4u;
|
||||
LongToChar(pAxisSecDataCC[deviceId].dwUtOccupyCycNum, &outString[outStringLength]);/*计轴最近坏车占用周期*/
|
||||
LongToChar(newAxisSecData[deviceId].dwUtOccupyCycNum, &outString[outStringLength]);/*计轴最近坏车占用周期*/
|
||||
outStringLength += 4u;
|
||||
ShortToChar(pAxisSecDataCC[deviceId].wPosMonitorTrainId, &outString[outStringLength]); /*监督有效的列车ID*/
|
||||
ShortToChar(newAxisSecData[deviceId].wPosMonitorTrainId, &outString[outStringLength]); /*监督有效的列车ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength] = newAxisSecData[deviceId].cAxisTXSafeLocFlag; /*计轴区段列车安全位置覆盖标志:0x55-无效;0xAA-有效*/
|
||||
outStringLength++;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2471,20 +2289,6 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
outString[outStringLength] = pNewTrainInfoData[deviceId].chTrainReportState; /*列车汇报状态*/
|
||||
outStringLength++;
|
||||
outString[outStringLength++] = pNewTrainInfoData[deviceId].chEaCmdState; /*区间疏散命令状态:0x55 有效;0xAA 无效*/
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@@ -2903,19 +2707,17 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
break;
|
||||
}
|
||||
pNonAutoReturnData = GetNonReturnData();
|
||||
pNonReturnDataStruCC = GetNonReturnDataCC();
|
||||
|
||||
/*比较数据*/
|
||||
deviceId = GetNonReturnId(ii);
|
||||
comparaResult = DeviceCompara((UINT8*)(&Record_NonReturnDataStru[deviceId]), (UINT16)sizeof(NonAutoReturnDataStruct),
|
||||
(UINT8*)(&pNonAutoReturnData[deviceId]), (UINT16)sizeof(NonAutoReturnDataStruct));
|
||||
|
||||
comparaResultCC = DeviceCompara((UINT8*)(&Record_NonReturnDataStruCC[deviceId]), (UINT16)sizeof(NonAutoReturnDataStructCC),
|
||||
(UINT8*)(&pNonReturnDataStruCC[deviceId]), (UINT16)sizeof(NonAutoReturnDataStructCC));
|
||||
if ((0U == comparaResult) && (0U == comparaResultCC))
|
||||
if (0u == comparaResult)
|
||||
{/*比较数据一致*/
|
||||
|
||||
}
|
||||
else if ((1U == comparaResult) || (1U == comparaResultCC))
|
||||
else if (1u == comparaResult)
|
||||
{/*比较数据不一致*/
|
||||
|
||||
if (CI_ERROR == Flag)
|
||||
@@ -2926,12 +2728,10 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
{
|
||||
/**************打印数据信息****************/
|
||||
outString[outStringLength++] = pNonAutoReturnData[deviceId].IndicatorDevID; /*指示灯设备ID*/
|
||||
ShortToChar(pNonReturnDataStruCC[deviceId].cmdSetTrainId, &outString[outStringLength]);/*命令列车ID*/
|
||||
ShortToChar(pNonAutoReturnData[deviceId].cmdSetTrainId, &outString[outStringLength]);/*命令列车ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength] = pNonAutoReturnData[deviceId].VobcToCIAutoRtnIndicFlashState; /*车载给联锁的无人折返指示灯闪灯状态*/
|
||||
outStringLength++;
|
||||
outString[outStringLength] = pNonAutoReturnData[deviceId].VobcToCIAutoRtnIndicSteadyState; /*车载给联锁的无人折返指示灯稳灯状态*/
|
||||
outStringLength++;
|
||||
outString[outStringLength++] = pNonAutoReturnData[deviceId].VobcToCIAutoRtnIndicFlashState; /*车载给联锁的无人折返指示灯闪灯状态*/
|
||||
outString[outStringLength++] = pNonAutoReturnData[deviceId].VobcToCIAutoRtnIndicSteadyState; /*车载给联锁的无人折返指示灯稳灯状态*/
|
||||
ShortToChar(pNonAutoReturnData[deviceId].RtnRelayAdhesionState.AdhesionRealyId, &outString[outStringLength]);/*粘连继电器ID*/
|
||||
outStringLength += 2u;
|
||||
outString[outStringLength++] = pNonAutoReturnData[deviceId].RtnRelayAdhesionState.AdhesionState; /*继电器粘连状态*/
|
||||
@@ -2953,46 +2753,10 @@ UINT8 RecordDeviceDataLog(UINT8 Flag)
|
||||
else
|
||||
{
|
||||
#ifdef PLATFORM_2OO2
|
||||
debug_infor_printf((const)"\nNonAutoReturnData:%d, length:%d", (UINT16)sizeof(NonAutoReturnDataStruct), outStringLength);
|
||||
debug_infor_printf((const)"\nNonAutoReturnData:%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
|
||||
|
||||
/*清空打印数据*/
|
||||
@@ -3159,7 +2923,7 @@ UINT8 DeviceCompara(UINT8* deviceStruAddr1, const UINT16 deviceStruLen1,
|
||||
void GetVirCIKeyDataStru(void)
|
||||
{
|
||||
UINT8 ii = 0u;
|
||||
|
||||
UINT8 jj = 0U;
|
||||
|
||||
for(ii=0u;ii<g_VirtualCIStructData.virtualCiNum;ii++)
|
||||
{
|
||||
@@ -3178,6 +2942,12 @@ void GetVirCIKeyDataStru(void)
|
||||
newVirCIKeyDataStru[ii].ZfwValidCycNum = g_VirtualCIStructData.virtualCi[ii].ZfwValidCycNum;
|
||||
|
||||
|
||||
for (jj = 0U; jj < RTNINDICATOR_SUM_MAX; jj++)
|
||||
{
|
||||
newVirCIKeyDataStru[ii].RtnIndicatorKeyData[jj].PrintVirCiIndicatorDevId = g_VirtualCIStructData.virtualCi[ii].VirCIRtnIndicatorStaData[jj].VirCiIndicatorDevId;
|
||||
newVirCIKeyDataStru[ii].RtnIndicatorKeyData[jj].PrintVirCiFlashState = g_VirtualCIStructData.virtualCi[ii].VirCIRtnIndicatorStaData[jj].VirCiFlashState;
|
||||
newVirCIKeyDataStru[ii].RtnIndicatorKeyData[jj].PrintVirCiSteadyState = g_VirtualCIStructData.virtualCi[ii].VirCIRtnIndicatorStaData[jj].VirCiSteadyState;
|
||||
}
|
||||
newVirCIKeyDataStru[ii].ZfwjHunXianFLag = g_VirtualCIStructData.virtualCi[ii].ZfwjHunXianFLag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#include "../Section/LogicSectionDataManage.h"
|
||||
#include "LogicalRouteDataManage.h"
|
||||
#include "../LogicProcess/LogicalRouteLogicCheck.h"
|
||||
#include "../Overlap/OverlapDataManage.h"
|
||||
|
||||
/* C01_进路监督级别确认 */
|
||||
/*
|
||||
@@ -565,8 +564,6 @@ void SetRouteRelProSwitchLockSta(const UINT16 routeId, const UINT8 lockCommand)
|
||||
UINT16 protectSwitchId = 0u; /*防护道岔ID*/
|
||||
UINT8 routeProtectSwitchSum = 0u; /*防护道岔数目*/
|
||||
RouteProtectSwitchStruct* routeProtectSwitchStru = NULL; /*防护道岔数据*/
|
||||
UINT8 cSwitchCurPos = 0U; /*道岔当前位置*/
|
||||
UINT8 cFuncRet = CI_ERROR;
|
||||
|
||||
routeProtectSwitchSum = GetRouteRelatedProtectSwitchSum(routeId); /*获取防护道岔数目*/
|
||||
routeProtectSwitchStru = GetRouteRelatedProtSwitchData(routeId); /*获取防护道岔数据*/
|
||||
@@ -589,30 +586,20 @@ void SetRouteRelProSwitchLockSta(const UINT16 routeId, const UINT8 lockCommand)
|
||||
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
for (ii = 0u; ii < routeProtectSwitchSum; ii++)
|
||||
for (ii= 0u; ii < routeProtectSwitchSum; ii++)
|
||||
{
|
||||
protectSwitchId = routeProtectSwitchStru[ii].ProtectSwitchId;
|
||||
cSwitchCurPos = GetSwitchCurPosition(protectSwitchId);
|
||||
cFuncRet = checkSwtLastValDrvPosStayorNot(protectSwitchId, routeProtectSwitchStru[ii].ProtectPosition);
|
||||
if ((SWITCH_LOCK_PROTECT_CANCEL == lockCommand)
|
||||
|| ((cSwitchCurPos == routeProtectSwitchStru[ii].ProtectPosition) && (CI_SUCCESS == cFuncRet)))
|
||||
{
|
||||
SetSwitchLockStatus(SWITCH_PLOCKTYPE_ROUTE, routeId, protectSwitchId, lockCommand); /*设置道岔防护锁闭状态*/
|
||||
/*RC 13.0.0 修:不检查防护道岔中双动道岔另一端*/
|
||||
SetSwitchLockStatus(SWITCH_PLOCKTYPE_ROUTE,routeId,protectSwitchId, lockCommand); /*设置道岔防护锁闭状态*/
|
||||
/*RC 13.0.0 修:不检查防护道岔中双动道岔另一端*/
|
||||
#if 0
|
||||
if (SWITCH_TYPE_DOUBLE == GetSwitchType(protectSwitchId))
|
||||
{ /*双动道岔*/
|
||||
SetSwitchLockStatus(SWITCH_PLOCKTYPE_ROUTE, routeId, GetDSwitchOtherId(protectSwitchId), lockCommand); /*设置道岔防护锁闭状态*/
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
#endif
|
||||
if (SWITCH_TYPE_DOUBLE == GetSwitchType(protectSwitchId))
|
||||
{ /*双动道岔*/
|
||||
SetSwitchLockStatus(SWITCH_PLOCKTYPE_ROUTE,routeId,GetDSwitchOtherId(protectSwitchId), lockCommand); /*设置道岔防护锁闭状态*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*防护道岔不在防护位置或防护道岔存在反向驱动,不设置防护锁闭*/
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -802,6 +789,7 @@ void PhySecFaultUnlockLogicManage(const UINT16 phySectionId,const UINT8 virCIid)
|
||||
UINT8 goExec = CI_ERROR;
|
||||
UINT8 autoTriggerType = 0U;
|
||||
UINT8 belongvirCIid = 0U;
|
||||
UINT8 includeVirFlag = GetCiFunctionSwitchConfig(FUNC_INCLUDEVIRCI_FLAG);
|
||||
UINT8 chPhyIncLogSum = 0U; /*包含逻辑区段数目*/
|
||||
UINT16* pPhyIncLogId = NULL; /*物理区段包含逻辑区段ID数组*/
|
||||
UINT16 wLogLockBelongRouteId = 0U; /*逻辑区段锁闭所属进路ID*/
|
||||
@@ -1038,13 +1026,21 @@ void PhySecFaultUnlockLogicManage(const UINT16 phySectionId,const UINT8 virCIid)
|
||||
}
|
||||
}
|
||||
else if((phyBelongCi == localCiId)&&(TRANSMIT_STATE_GOOD == commState))
|
||||
{
|
||||
belongvirCIid = GetPhySecBelongVirCiId(phySectionId);
|
||||
if((belongvirCIid == virCIid)&&(0u != virCIid))/*区故解可以由相邻虚拟联锁现地操作,不相邻不能操作*/
|
||||
{
|
||||
if(FUNC_SWITCH_ON == includeVirFlag)
|
||||
{
|
||||
belongvirCIid = GetPhySecBelongVirCiId(phySectionId);
|
||||
if((belongvirCIid == virCIid)&&(0u != virCIid))/*区故解可以由相邻虚拟联锁现地操作,不相邻不能操作*/
|
||||
{
|
||||
/*进路属于相邻联锁,且区段属于本联锁时,传递区段故障解锁命令 */
|
||||
AddCiSendToCiCmdInfo(CI_CMD_SECTION_FAULT_UNLOCK,phySectionId,0u,routeBelongCi);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*进路属于相邻联锁,且区段属于本联锁时,传递区段故障解锁命令 */
|
||||
AddCiSendToCiCmdInfo(CI_CMD_SECTION_FAULT_UNLOCK,phySectionId,0u,routeBelongCi);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1384,12 +1380,6 @@ void RouteRecoverOpenProc(const UINT16 routeId)
|
||||
UINT8 errType = CI_ERROR;
|
||||
UINT8 localCiType = GetLocalCiType();/*获得联锁类型*/
|
||||
UINT16 wStartSignalId = 0U; /*进路始端信号机ID*/
|
||||
UINT8 chVirCiId = 0U;/*虚拟联锁*/
|
||||
UINT8 chLocalVirCiType = 0U;
|
||||
|
||||
|
||||
chVirCiId = GetRouteBelongVirCiId(routeId);
|
||||
chLocalVirCiType = GetLocalVirCiType(chVirCiId);
|
||||
|
||||
routeState = GetRouteState(routeId);
|
||||
recoverState = GetRouteRecoverOpenFlag(routeId);
|
||||
@@ -1398,7 +1388,7 @@ void RouteRecoverOpenProc(const UINT16 routeId)
|
||||
{
|
||||
if (ROUTE_RECOVER_STA_WAIT == recoverState)
|
||||
{
|
||||
if ((CI_TYPE_ZX == chLocalVirCiType) || (CI_TYPE_SCX == chLocalVirCiType))
|
||||
if ((CI_TYPE_ZX == localCiType) || (CI_TYPE_SCX == localCiType))
|
||||
{
|
||||
errType = RecoverOpenRouteCheck(routeId);
|
||||
}
|
||||
@@ -1443,6 +1433,7 @@ void SetAtsExpectLockOverlapIdProc(const UINT16 expLkOverlapId,const UINT8 lockT
|
||||
UINT16 ii = 0u;
|
||||
UINT16 routeOverlapSum = 0u; /*进路保护区段数目*/
|
||||
UINT16 routeId = 0u; /*进路ID*/
|
||||
UINT16 routedLockOverlapId = 0u; /*进路锁闭过OverlapId*/
|
||||
UINT8 retVal = CI_SUCCESS; /*执行检查*/
|
||||
UINT8 routeState = 0u; /*进路状态*/
|
||||
UINT16 preOverlepId = 0u;
|
||||
@@ -1452,9 +1443,9 @@ void SetAtsExpectLockOverlapIdProc(const UINT16 expLkOverlapId,const UINT8 lockT
|
||||
UINT8 flag = 0u;
|
||||
UINT8 belongCiId = 0u;
|
||||
UINT8 localCiId = GetSystemParaLocalCiId(); /*获取本机联锁ID*/
|
||||
UINT8 includeVirFlag = GetCiFunctionSwitchConfig(FUNC_INCLUDEVIRCI_FLAG);
|
||||
UINT8 virCIid = 0u;
|
||||
UINT8 ciCtrModeFlag = 0u;
|
||||
UINT32 dwCurCycNum = Get2oo2CurCycleNum();
|
||||
|
||||
if ((0u == expLkOverlapId) || (UINT16_MAX == expLkOverlapId))
|
||||
{/*判断输入参数有效性*/
|
||||
@@ -1495,9 +1486,9 @@ void SetAtsExpectLockOverlapIdProc(const UINT16 expLkOverlapId,const UINT8 lockT
|
||||
if (routeOverlapSum >= 1u)
|
||||
{/*只有当进路的保护区段数目大于等于1个时,ATS或现地才发送期望锁闭保护区段ID*/
|
||||
/*输入参数保护区段ID是否属于当前进路 且进路保护区段未锁闭过*/
|
||||
if (1u == checkExpOverlapBelongToRtOrNot(routeId, expLkOverlapId))
|
||||
if (1u == checkExpOverlapBelongToRtOrNot(routeId,expLkOverlapId))
|
||||
{/*期望锁闭的保护区段ID属于进路的保护区段ID*/
|
||||
flag = 1u;/*有任意一条匹配到了,则置为1*/
|
||||
flag = 1u;/*有任意一条匹配到了,则置为1*/
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
@@ -1522,62 +1513,79 @@ void SetAtsExpectLockOverlapIdProc(const UINT16 expLkOverlapId,const UINT8 lockT
|
||||
/*判断当前保护区段所属联锁控制模式是否可以响应锁闭保护区段命令*/
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
virCIid = GetOverlapBelongVirCiId(expLkOverlapId);
|
||||
virCIid= GetOverlapBelongVirCiId(expLkOverlapId);
|
||||
if(FUNC_SWITCH_ON == includeVirFlag)
|
||||
{
|
||||
ciCtrModeFlag = GetVirCImode(virCIid);/*获取联锁控制模式*/
|
||||
}
|
||||
else
|
||||
{
|
||||
ciCtrModeFlag = GetCiModeFlag(); /*获取联锁控制模式*/
|
||||
}
|
||||
|
||||
ciCtrModeFlag = GetVirCImode(virCIid);/*获取联锁控制模式*/
|
||||
if ((CI_MODE_CI_LOCAL == ciCtrModeFlag) || (0u == ciCtrModeFlag))/*处于联锁控或者获取错误,发送现地不能响应人工锁闭命令*/
|
||||
if((CI_MODE_CI_LOCAL ==ciCtrModeFlag)||(0u ==ciCtrModeFlag))/*处于联锁控或者获取错误,发送现地不能响应人工锁闭命令*/
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/*add by shl*/
|
||||
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
/*判断进路状态,是否满足锁闭保护区段条件,若满足则设置期望锁闭保护区段*/
|
||||
routeState = GetRouteState(routeId);
|
||||
|
||||
if ((routeState == ROUTE_STATE_FIRST_XUANPAI) ||
|
||||
(routeState == ROUTE_STATE_XUANPAI) ||
|
||||
(routeState == ROUTE_STATE_FIRST_LOCK) ||
|
||||
(routeState == ROUTE_STATE_FIRST_LOCKERR) ||
|
||||
(routeState == ROUTE_STATE_YUXIAN_OPEN) ||
|
||||
(routeState == ROUTE_STATE_YUXIAN_LOCK) ||
|
||||
(routeState == ROUTE_STATE_NEAR_OPEN) ||
|
||||
(routeState == ROUTE_STATE_NEAR_LOCK) ||
|
||||
(routeState == ROUTE_STATE_NEAR_LOCKERR) ||
|
||||
(routeState == ROUTE_STATE_AUTO_UNLOCK) ||
|
||||
(routeState == ROUTE_STATE_HALF_UNLOCK)
|
||||
)
|
||||
{/*设置指定ID进路的期望锁闭保护区段ID*/
|
||||
if (LABOR_LOCK_OVERLAP == lockType)/*人工锁闭*/
|
||||
{
|
||||
SetOverlapAtsOrlaborLockCmdFlag(expLkOverlapId, LOCK_OVERLAP_CMD_YES);/*设置保护区段锁闭命令标志,用于保护区段解锁倒计时计算*/
|
||||
SetOverlaplaborLockCmdFlag(expLkOverlapId, LOCK_OVERLAP_CMD_YES);/*设置人工锁闭标志,用于人工命令一次有效处理*/
|
||||
ClearPreLoaborUnlockState(expLkOverlapId);
|
||||
}
|
||||
else if (ATS_LOCK_OVERLAP == lockType)/*ATS锁闭*/
|
||||
{
|
||||
phySectionId = GetRouteLastPhySectionId(routeId);
|
||||
phySectionSta = GetPhySecCurMergeState(phySectionId);
|
||||
if (SECTION_OCCUPY_YES == phySectionSta)
|
||||
routedLockOverlapId = GetRouteOverlapLockedId(routeId); /*获取进路锁闭过保护区段ID*/
|
||||
|
||||
if (0u == routedLockOverlapId)
|
||||
{
|
||||
/*判断进路状态,是否满足锁闭保护区段条件,若满足则设置期望锁闭保护区段*/
|
||||
routeState = GetRouteState(routeId);
|
||||
|
||||
if ((routeState == ROUTE_STATE_FIRST_XUANPAI) ||
|
||||
(routeState == ROUTE_STATE_XUANPAI) ||
|
||||
(routeState == ROUTE_STATE_FIRST_LOCK) ||
|
||||
(routeState == ROUTE_STATE_FIRST_LOCKERR) ||
|
||||
(routeState == ROUTE_STATE_YUXIAN_OPEN) ||
|
||||
(routeState == ROUTE_STATE_YUXIAN_LOCK) ||
|
||||
(routeState == ROUTE_STATE_NEAR_OPEN) ||
|
||||
(routeState == ROUTE_STATE_NEAR_LOCK) ||
|
||||
(routeState == ROUTE_STATE_NEAR_LOCKERR) ||
|
||||
(routeState == ROUTE_STATE_AUTO_UNLOCK) ||
|
||||
(routeState == ROUTE_STATE_HALF_UNLOCK)
|
||||
)
|
||||
{/*设置指定ID进路的期望锁闭保护区段ID*/
|
||||
if(LABOR_LOCK_OVERLAP == lockType)/*人工锁闭*/
|
||||
{
|
||||
SetOverlapAtsOrlaborLockCmdFlag(expLkOverlapId, LOCK_OVERLAP_CMD_YES);/*设置保护区段锁闭命令标志*/
|
||||
SetOverlapAtsOrlaborLockCmdFlag(expLkOverlapId,LOCK_OVERLAP_CMD_YES);/*设置保护区段锁闭命令标志,用于保护区段解锁倒计时计算*/
|
||||
SetOverlaplaborLockCmdFlag(expLkOverlapId,LOCK_OVERLAP_CMD_YES);/*设置人工锁闭标志,用于人工命令一次有效处理*/
|
||||
}
|
||||
else if(ATS_LOCK_OVERLAP == lockType)/*ATS锁闭*/
|
||||
{
|
||||
phySectionId = GetRouteLastPhySectionId(routeId);
|
||||
phySectionSta = GetPhySecCurMergeState(phySectionId);
|
||||
if(SECTION_OCCUPY_YES==phySectionSta)
|
||||
{
|
||||
SetOverlapAtsOrlaborLockCmdFlag(expLkOverlapId,LOCK_OVERLAP_CMD_YES);/*设置保护区段锁闭命令标志*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*什么也不做*/
|
||||
}
|
||||
SetRouteAtsExpLkOverlapId(routeId,expLkOverlapId);
|
||||
SetOverlapFromSetRouteCmdFlag(expLkOverlapId, OVERLAP_ROUTE_FLAG_NO);/*清除标志*/
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*什么也不做*/
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
SetRouteAtsExpLkOverlapId(routeId, expLkOverlapId);
|
||||
SetOverlapFromSetRouteCmdFlag(expLkOverlapId, OVERLAP_ROUTE_FLAG_NO);/*清除标志*/
|
||||
SetOverlapAtsLastTimeLockCyc(expLkOverlapId, dwCurCycNum);
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1601,6 +1609,7 @@ UINT8 CheckPhySecFaultUnlockCanDo(const UINT16 phySectionId,const UINT8 virCIid)
|
||||
UINT16 lockBelongRouteId = 0u; /*区段锁闭所属进路ID*/
|
||||
UINT8 reVal = CI_ERROR;
|
||||
UINT8 belongvirCIid = 0u;
|
||||
UINT8 includeVirFlag = GetCiFunctionSwitchConfig(FUNC_INCLUDEVIRCI_FLAG);
|
||||
UINT8 isErrLock = CI_ERROR;
|
||||
UINT8 phyLockState = 0U;
|
||||
|
||||
@@ -1626,33 +1635,38 @@ UINT8 CheckPhySecFaultUnlockCanDo(const UINT16 phySectionId,const UINT8 virCIid)
|
||||
}
|
||||
if(CI_SUCCESS == reVal)
|
||||
{
|
||||
|
||||
belongvirCIid = GetRouteBelongVirCiId(lockBelongRouteId);
|
||||
if(0u < virCIid)
|
||||
if(FUNC_SWITCH_ON == includeVirFlag)
|
||||
{
|
||||
if(virCIid == belongvirCIid)
|
||||
{
|
||||
reVal = CI_SUCCESS; /*本Rtu(虚拟联锁现地)可以操作属于本虚拟联锁的进路锁闭的物理区段区故解,无论该物理区段是否属于该Rtu*/
|
||||
}
|
||||
else
|
||||
belongvirCIid = GetRouteBelongVirCiId(lockBelongRouteId);
|
||||
if(0u < virCIid)
|
||||
{
|
||||
belongvirCIid = GetPhySecBelongVirCiId(phySectionId);
|
||||
if(belongvirCIid == virCIid)
|
||||
{
|
||||
reVal = CI_SUCCESS;/*本虚拟联锁物理区段由相邻虚拟联锁进路锁闭的,可以在该物理区段所属Rtu上操作区故解*/
|
||||
if(virCIid == belongvirCIid)
|
||||
{
|
||||
reVal = CI_SUCCESS; /*本Rtu(虚拟联锁现地)可以操作属于本虚拟联锁的进路锁闭的物理区段区故解,无论该物理区段是否属于该Rtu*/
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_ERROR;
|
||||
belongvirCIid = GetPhySecBelongVirCiId(phySectionId);
|
||||
if(belongvirCIid == virCIid)
|
||||
{
|
||||
reVal = CI_SUCCESS;/*本虚拟联锁物理区段由相邻虚拟联锁进路锁闭的,可以在该物理区段所属Rtu上操作区故解*/
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_ERROR;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
/*按顺序解锁进路异常锁闭*/
|
||||
@@ -1875,9 +1889,8 @@ void SetRouteOvlpOtherCiShrFlg(const UINT16 wRouteId, const UINT16 wOverlapId,co
|
||||
void ClearSomeFlagDependRouteState(const UINT16 routeId)
|
||||
{
|
||||
UINT8 routeState = GetRouteState(routeId);
|
||||
UINT16 startSignalId = 0U;
|
||||
UINT16 EnginVehicCroCloBelongRoute = 0U;
|
||||
UINT8 chZrenjieFlag = 0U;
|
||||
UINT16 startSignalId = 0u;
|
||||
UINT16 EnginVehicCroCloBelongRoute = 0u;
|
||||
|
||||
/*清理工程车跨压关信号所属进路,清理工程车跨压状态*/
|
||||
if ((ROUTE_STATE_YUXIAN_LOCK != routeState)
|
||||
@@ -1914,29 +1927,6 @@ void ClearSomeFlagDependRouteState(const UINT16 routeId)
|
||||
{
|
||||
SetRouteGroupRouteCmdFlag(routeId, ROUTE_GROUPROUTE_CMD_NO); /*清除进路的组合进路命令标志*/
|
||||
}
|
||||
|
||||
/*若进路处于以下状态,清除联挂进路标志*/
|
||||
if ((ROUTE_STATE_IDLE == routeState) || (ROUTE_STATE_DELAY_UNLOCK == routeState)
|
||||
|| (ROUTE_STATE_LEAD_XUANPAI == routeState) || (ROUTE_STATE_LEAD_LOCK == routeState)
|
||||
|| (ROUTE_STATE_LEAD_LOCKERR == routeState) || (ROUTE_STATE_LEAD_OPEN == routeState))
|
||||
{
|
||||
SetRouteCouplinkFlag(routeId, ROUTE_COUPLINK_FLAG_NO);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
/*无总人解标志且不处于延时解锁状态,清除联络线解锁标志*/
|
||||
chZrenjieFlag = GetRouteZongRenJieFlag(routeId);
|
||||
if ((ROUTE_ZONGRENJIE_SET_NO == chZrenjieFlag) && (ROUTE_STATE_DELAY_UNLOCK != routeState))
|
||||
{
|
||||
SetRouteConnectReleaseFlag(routeId, ROUTE_CONNECT_RELEASE_NO); /*清除联络线解锁标志*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3410,12 +3400,14 @@ void OtherCiLogSecFaultUnlockProcess(const UINT16 wLogSectionId, const UINT8 chV
|
||||
UINT8 chLogFaultUnLockRes = 0U;/*逻辑区段故障解锁条件检查结果*/
|
||||
UINT8 chLogSecBelongRouteDir = 0U;/*逻辑区段锁闭所属进路方向*/
|
||||
UINT8 chRouteLogSecHaveUnLock = 0u;/*进路逻辑区段是否已解锁*/
|
||||
UINT8 chIncludeVirFlag = 0U;/*是否支持虚拟联锁*/
|
||||
UINT8 chBelongVirCiId = 0U;/*逻辑区段所属虚拟联锁ID*/
|
||||
UINT16 wLogSecBelongPhySecId = 0U;/*逻辑区段所属物理区段ID*/
|
||||
|
||||
chLocalCiId = GetSystemParaLocalCiId(); /*获取本机联锁ID*/
|
||||
wLogLockBelongRouteId = GetLogSecLockBelongRoute(wLogSectionId);
|
||||
chFuncSwitch = GetCiFunctionSwitchConfig(FUNC_SWITCH_USE_RELAY_INTERFACE_BETWEEN_NEIGHBOURCI);
|
||||
chIncludeVirFlag = GetCiFunctionSwitchConfig(FUNC_INCLUDEVIRCI_FLAG);
|
||||
chConfirmRelayInterfaceFlag = GetCiCiRelayInterfConfirmFlag();/*继电接口确认状态*/
|
||||
|
||||
if ((0U < wLogLockBelongRouteId) && (ROUTE_SUM_MAX > wLogLockBelongRouteId))
|
||||
@@ -3449,15 +3441,21 @@ void OtherCiLogSecFaultUnlockProcess(const UINT16 wLogSectionId, const UINT8 chV
|
||||
else if ((chLocalCiId == chLogSecBelongCiId) && (TRANSMIT_STATE_GOOD == chCommState))
|
||||
{
|
||||
wLogSecBelongPhySecId = GetLgcSecRelativePhySecId(wLogSectionId);
|
||||
|
||||
chBelongVirCiId = GetLogSecBelongVirCiId(wLogSectionId);
|
||||
if ((chVirCIid == chBelongVirCiId) && (0U != chVirCIid))
|
||||
if (FUNC_SWITCH_ON == chIncludeVirFlag)
|
||||
{
|
||||
chBelongVirCiId = GetLogSecBelongVirCiId(wLogSectionId);
|
||||
if ((chVirCIid == chBelongVirCiId) && (0U != chVirCIid))
|
||||
{
|
||||
/*进路属于相邻联锁,且区段属于本联锁时,传递区段故障解锁命令 */
|
||||
AddCiSendToCiCmdInfo(CI_CMD_SECTION_FAULT_UNLOCK, wLogSecBelongPhySecId, 0U, chRouteBelongCiId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*进路属于相邻联锁,且区段属于本联锁时,传递区段故障解锁命令 */
|
||||
AddCiSendToCiCmdInfo(CI_CMD_SECTION_FAULT_UNLOCK, wLogSecBelongPhySecId, 0U, chRouteBelongCiId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3478,6 +3476,7 @@ UINT8 CheckLogSecFaultUnlockCanDo(const UINT16 wLogSectionId, const UINT8 chVirC
|
||||
UINT16 wLockBelongRouteId = 0U; /*区段锁闭所属进路ID*/
|
||||
UINT8 reVal = CI_ERROR;
|
||||
UINT8 chBelongvirCIid = 0U;
|
||||
UINT8 chIncludeVirFlag = GetCiFunctionSwitchConfig(FUNC_INCLUDEVIRCI_FLAG);
|
||||
|
||||
if ((0u == wLogSectionId) || (LOGIC_SECTION_SUM_MAX <= wLogSectionId))
|
||||
{
|
||||
@@ -3500,32 +3499,38 @@ UINT8 CheckLogSecFaultUnlockCanDo(const UINT16 wLogSectionId, const UINT8 chVirC
|
||||
}
|
||||
if (CI_SUCCESS == reVal)
|
||||
{
|
||||
|
||||
chBelongvirCIid = GetRouteBelongVirCiId(wLockBelongRouteId);
|
||||
if (0U < chVirCIid)
|
||||
if (FUNC_SWITCH_ON == chIncludeVirFlag)
|
||||
{
|
||||
if (chVirCIid == chBelongvirCIid)
|
||||
chBelongvirCIid = GetRouteBelongVirCiId(wLockBelongRouteId);
|
||||
if (0U < chVirCIid)
|
||||
{
|
||||
reVal = CI_SUCCESS; /*本Rtu(虚拟联锁现地)可以操作属于本虚拟联锁的进路锁闭的逻辑区段区故解,无论该逻辑区段是否属于该Rtu*/
|
||||
}
|
||||
else
|
||||
{
|
||||
chBelongvirCIid = GetLogSecBelongVirCiId(wLogSectionId);
|
||||
if (chVirCIid == chBelongvirCIid)
|
||||
{
|
||||
reVal = CI_SUCCESS;/*本虚拟联锁逻辑区段由相邻虚拟联锁进路锁闭的,可以在该逻辑区段所属Rtu上操作区故解*/
|
||||
reVal = CI_SUCCESS; /*本Rtu(虚拟联锁现地)可以操作属于本虚拟联锁的进路锁闭的逻辑区段区故解,无论该逻辑区段是否属于该Rtu*/
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_ERROR;
|
||||
chBelongvirCIid = GetLogSecBelongVirCiId(wLogSectionId);
|
||||
if (chVirCIid == chBelongvirCIid)
|
||||
{
|
||||
reVal = CI_SUCCESS;/*本虚拟联锁逻辑区段由相邻虚拟联锁进路锁闭的,可以在该逻辑区段所属Rtu上操作区故解*/
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_ERROR;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_ERROR;
|
||||
reVal = CI_SUCCESS;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return reVal;
|
||||
@@ -4483,6 +4488,7 @@ void DriveLogRouteSignalClose(const UINT16 wLogSignalId)
|
||||
UINT8 sigalMaintainState = 0u;
|
||||
UINT8 detainOpenRedBright = 0u;
|
||||
UINT8 signalDetainFlag = 0u;
|
||||
UINT8 includeVirFlag = GetCiFunctionSwitchConfig(FUNC_INCLUDEVIRCI_FLAG);
|
||||
if ((0u == wLogSignalId) || (SIGNAL_SUM_MAX <= wLogSignalId))
|
||||
{
|
||||
/*不做处理*/
|
||||
@@ -4490,11 +4496,15 @@ void DriveLogRouteSignalClose(const UINT16 wLogSignalId)
|
||||
else
|
||||
{
|
||||
/*虚拟联锁兼容*/
|
||||
|
||||
belongVirCIid = GetSignalBelongVirCiId(wLogSignalId);
|
||||
allSignalBrightFlag = GetVirCIAllSignalBrightState(belongVirCIid); /*全站亮灯标志*/
|
||||
|
||||
|
||||
if (FUNC_SWITCH_ON == includeVirFlag)
|
||||
{
|
||||
belongVirCIid = GetSignalBelongVirCiId(wLogSignalId);
|
||||
allSignalBrightFlag = GetVirCIAllSignalBrightState(belongVirCIid); /*全站亮灯标志*/
|
||||
}
|
||||
else
|
||||
{
|
||||
allSignalBrightFlag = GetAllSignalBrightFlag(); /*全站亮灯标志*/
|
||||
}
|
||||
|
||||
/*无论什么时候,复示信号机关闭都驱动红灭*/
|
||||
signalIsfushiFlag = GetSignalIsfushiFlag(wLogSignalId);
|
||||
@@ -5093,6 +5103,7 @@ void LogRouteErrLockFaultManage(const UINT16 wPhySectionId)
|
||||
void SetAtsLockOverlapHaveRouteId(const UINT16 expLkOverlapId, const UINT16 routeId)
|
||||
{
|
||||
UINT16 routeOverlapSum = 0U; /*进路保护区段数目*/
|
||||
UINT16 routedLockOverlapId = 0U; /*进路锁闭过OverlapId*/
|
||||
UINT8 retVal = CI_SUCCESS; /*返回值*/
|
||||
UINT8 routeState = 0U; /*进路状态*/
|
||||
UINT16 preOverlepId = 0U;
|
||||
@@ -5101,11 +5112,11 @@ void SetAtsLockOverlapHaveRouteId(const UINT16 expLkOverlapId, const UINT16 rout
|
||||
UINT8 phySectionSta = 0U;
|
||||
UINT8 belongCiId = 0U;
|
||||
UINT8 localCiId = GetSystemParaLocalCiId(); /*获取本机联锁ID*/
|
||||
UINT8 includeVirFlag = GetCiFunctionSwitchConfig(FUNC_INCLUDEVIRCI_FLAG);
|
||||
UINT8 virCIid = 0U;
|
||||
UINT8 ciCtrModeFlag = 0U;
|
||||
UINT8 routeStateFlag = 0U;
|
||||
UINT8 flag = 0U;
|
||||
UINT32 dwCurCycNum = Get2oo2CurCycleNum();
|
||||
|
||||
routeStateFlag = GetRouteStateFlag(routeId);
|
||||
|
||||
@@ -5168,8 +5179,14 @@ void SetAtsLockOverlapHaveRouteId(const UINT16 expLkOverlapId, const UINT16 rout
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
virCIid = GetOverlapBelongVirCiId(expLkOverlapId);
|
||||
ciCtrModeFlag = GetVirCImode(virCIid);/*获取联锁控制模式*/
|
||||
|
||||
if (FUNC_SWITCH_ON == includeVirFlag)
|
||||
{
|
||||
ciCtrModeFlag = GetVirCImode(virCIid);/*获取联锁控制模式*/
|
||||
}
|
||||
else
|
||||
{
|
||||
ciCtrModeFlag = GetCiModeFlag(); /*获取联锁控制模式*/
|
||||
}
|
||||
|
||||
if ((CI_MODE_CI_LOCAL == ciCtrModeFlag) || (0U == ciCtrModeFlag))/*处于联锁控或者获取错误,发送现地不能响应人工锁闭命令*/
|
||||
{
|
||||
@@ -5179,50 +5196,54 @@ void SetAtsLockOverlapHaveRouteId(const UINT16 expLkOverlapId, const UINT16 rout
|
||||
|
||||
if (CI_SUCCESS == retVal)
|
||||
{
|
||||
/*判断进路状态,是否满足锁闭保护区段条件,若满足则设置期望锁闭保护区段*/
|
||||
routeState = GetRouteState(routeId);
|
||||
routedLockOverlapId = GetRouteOverlapLockedId(routeId); /*获取进路锁闭过保护区段ID*/
|
||||
|
||||
if ((ROUTE_STATE_FIRST_XUANPAI == routeState)
|
||||
|| (ROUTE_STATE_XUANPAI == routeState)
|
||||
|| (ROUTE_STATE_FIRST_LOCK == routeState)
|
||||
|| (ROUTE_STATE_FIRST_LOCKERR == routeState)
|
||||
|| (ROUTE_STATE_YUXIAN_OPEN == routeState)
|
||||
|| (ROUTE_STATE_YUXIAN_LOCK == routeState)
|
||||
|| (ROUTE_STATE_NEAR_OPEN == routeState)
|
||||
|| (ROUTE_STATE_NEAR_LOCK == routeState)
|
||||
|| (ROUTE_STATE_NEAR_LOCKERR == routeState)
|
||||
|| ((ROUTE_STATE_AUTO_UNLOCK == routeState) && (ROUTE_STATE_FLAG_YES == routeStateFlag))
|
||||
)
|
||||
if (0U == routedLockOverlapId)
|
||||
{
|
||||
/*设置指定ID进路的期望锁闭保护区段ID*/
|
||||
/*仅处理ATS办理保护区段,不处理人工办理保护区段*/
|
||||
phySectionId = GetRouteLastPhySectionId(routeId);
|
||||
phySectionSta = GetPhySecCurMergeState(phySectionId);
|
||||
if (SECTION_OCCUPY_YES == phySectionSta)
|
||||
{
|
||||
SetOverlapAtsOrlaborLockCmdFlag(expLkOverlapId, LOCK_OVERLAP_CMD_YES);/*设置保护区段锁闭命令标志,用于保护区段解锁倒计时计算*/
|
||||
/*判断进路状态,是否满足锁闭保护区段条件,若满足则设置期望锁闭保护区段*/
|
||||
routeState = GetRouteState(routeId);
|
||||
|
||||
if ((ROUTE_STATE_FIRST_XUANPAI == routeState)
|
||||
|| (ROUTE_STATE_XUANPAI == routeState)
|
||||
|| (ROUTE_STATE_FIRST_LOCK == routeState)
|
||||
|| (ROUTE_STATE_FIRST_LOCKERR == routeState)
|
||||
|| (ROUTE_STATE_YUXIAN_OPEN == routeState)
|
||||
|| (ROUTE_STATE_YUXIAN_LOCK == routeState)
|
||||
|| (ROUTE_STATE_NEAR_OPEN == routeState)
|
||||
|| (ROUTE_STATE_NEAR_LOCK == routeState)
|
||||
|| (ROUTE_STATE_NEAR_LOCKERR == routeState)
|
||||
|| ((ROUTE_STATE_AUTO_UNLOCK == routeState) && (ROUTE_STATE_FLAG_YES == routeStateFlag))
|
||||
)
|
||||
{/*设置指定ID进路的期望锁闭保护区段ID*/
|
||||
/*仅处理ATS办理保护区段,不处理人工办理保护区段*/
|
||||
phySectionId = GetRouteLastPhySectionId(routeId);
|
||||
phySectionSta = GetPhySecCurMergeState(phySectionId);
|
||||
if (SECTION_OCCUPY_YES == phySectionSta)
|
||||
{
|
||||
SetOverlapAtsOrlaborLockCmdFlag(expLkOverlapId, LOCK_OVERLAP_CMD_YES);/*设置保护区段锁闭命令标志,用于保护区段解锁倒计时计算*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing do*/
|
||||
}
|
||||
|
||||
SetRouteAtsExpLkOverlapId(routeId, expLkOverlapId);/*设置期望锁闭保护区段*/
|
||||
|
||||
SetOverlapFromSetRouteCmdFlag(expLkOverlapId, OVERLAP_ROUTE_FLAG_YES);/*设置保护区段由进路连带标识*/
|
||||
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*nothing do*/
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
|
||||
SetRouteAtsExpLkOverlapId(routeId, expLkOverlapId);/*设置期望锁闭保护区段*/
|
||||
|
||||
SetOverlapFromSetRouteCmdFlag(expLkOverlapId, OVERLAP_ROUTE_FLAG_YES);/*设置保护区段由进路连带标识*/
|
||||
|
||||
SetOverlapAtsLastTimeLockCyc(expLkOverlapId, dwCurCycNum);
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
; /*当前进路保护区段已锁,不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*当前进路保护区段已锁,不处理*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (0U == flag)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -628,6 +628,14 @@ void StartTrianTestManage(void);
|
||||
*/
|
||||
void StopTrianTestManage(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 取消临时限速设置
|
||||
* 参数说明: 无
|
||||
* 返回值 :
|
||||
CI_ERROR 失败
|
||||
CI_SUCCESS 成功
|
||||
*/
|
||||
UINT8 CancleLinShiXianSuManage(void);
|
||||
/*
|
||||
* 功能描述: 取消临时限速设置
|
||||
* 参数说明: 无
|
||||
@@ -1134,12 +1142,12 @@ void LeadRouteFirstXuanPaiManage(const UINT16 routeId);
|
||||
void SetOcPscPlConfirmFlag(UINT8 setFlag, const UINT16 ocPId);
|
||||
|
||||
/*
|
||||
* 功能描述: 保护区段状态更新
|
||||
* 功能描述: 保护区段照查条件更新
|
||||
* 参数说明: const UINT16 wRouteId 进路ID
|
||||
* 返回值 :无
|
||||
* by cgh 20250928
|
||||
* by cgh 20250617
|
||||
*/
|
||||
void OverlapStateUpdateManage(void);
|
||||
void OverlapZhaoChaRelayUpDateManage(void);
|
||||
/*
|
||||
* 功能描述: 更新列车向后跳跃允许状态处理
|
||||
* 参数说明: 无
|
||||
@@ -1148,19 +1156,21 @@ void OverlapStateUpdateManage(void);
|
||||
*/
|
||||
void TrainJumpBackApplyProc(void);
|
||||
/*
|
||||
* 功能描述: 办理联挂进路逻辑管理
|
||||
* 参数说明: const UINT16 wRouteId
|
||||
* 返回值 : 无
|
||||
* Create: 20250917
|
||||
* 功能描述: 批量计轴复位命令逻辑管理
|
||||
* 参数说明: const UINT8 cPhySecSum 物理区段数量
|
||||
* const UINT16 pPhySecIdBuff[] 物理区段ID数组
|
||||
* 返回值 : void
|
||||
*/
|
||||
void SetCouplinkRouteLogicManage(const UINT16 wRouteId);
|
||||
void BatchAixsResetLogicManage(const UINT8 cPhySecSum, const UINT16 pPhySecIdBuff[], const UINT8 resetType);
|
||||
|
||||
/*
|
||||
* 功能描述: 锁闭道岔逻辑管理
|
||||
* 参数说明: void
|
||||
* 返回值 :
|
||||
* 功能描述:牵出线区段外方进路检查
|
||||
* 参数说明: const UINT16 wPhySecId 牵出线区段
|
||||
* 返回值 :CI_SUCCESS列车进路已办理 CI_ERROR未办理列车进路
|
||||
* by fan 20260415
|
||||
*/
|
||||
void lockSwitchLogicManage(void);
|
||||
UINT8 CheckQcxLiecheRoute(UINT16 wPhySecId);
|
||||
|
||||
/*
|
||||
* 功能描述: 计轴区段跳跃锁闭状态机管理
|
||||
* 参数说明: const UINT16 axisSecId, 计轴区段ID
|
||||
@@ -1169,123 +1179,6 @@ void lockSwitchLogicManage(void);
|
||||
*/
|
||||
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
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -189,7 +189,7 @@ UINT8 OpenCbtcLTrainRouteErrProcess(const UINT16 routeId, const UINT8 checkStep)
|
||||
UINT8 sendLevel = ESEND_LEVEL_ZERO;
|
||||
UINT8 routeReverseProperty = 0u;
|
||||
UINT8 airShaftRouteType = 0u;
|
||||
UINT8 chRouteCouplinkFlag = 0U;
|
||||
|
||||
/* 联锁逻辑检查 */
|
||||
/* 进路监督模式为【CBTC】*/
|
||||
|
||||
@@ -325,36 +325,24 @@ UINT8 OpenCbtcLTrainRouteErrProcess(const UINT16 routeId, const UINT8 checkStep)
|
||||
{
|
||||
routeReverseProperty = GetRouteReverseProperty(routeId);
|
||||
airShaftRouteType = GetAirShaftRouteType(routeId);
|
||||
chRouteCouplinkFlag = GetRouteCouplinkFlag(routeId); /*获取进路联挂标志*/
|
||||
if ((ROUTE_REVERSE_PROPERTY_YES == routeReverseProperty)|| (ROUTE_TYPE_AIRSHAFT == airShaftRouteType))
|
||||
{
|
||||
if (ROUTE_COUPLINK_FLAG_YES == chRouteCouplinkFlag)
|
||||
if ((ROUTE_REVERSE_PROPERTY_YES == routeReverseProperty) || (ROUTE_TYPE_AIRSHAFT == airShaftRouteType))
|
||||
{ /*反向进路需检查所有区段的占用状态,之前由于不检查占用状态导致信号出清进路内方第一区段,信号机重开的问题*/
|
||||
/*风井进路不允许追踪办理,故开放条件需增加对进路内方所有区段的占用状态检查*/
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId,&devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 反向联挂进路允许追踪,区段条件在OpenCbtcRouteSectionErrCheck */
|
||||
/*存在联挂标志,不在查反向进路全部空闲,其他条件检查;风井进路设置不上联挂标志所以需要检查全部区段空闲*/
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*反向进路需检查所有区段的占用状态,之前由于不检查占用状态导致信号出清进路内方第一区段,信号机重开的问题*/
|
||||
|
||||
/*风井进路不允许追踪办理,故开放条件需增加对进路内方所有区段的占用状态检查*/
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId, &devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, devId, ETYPE_PS_MERGY_OCU_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_PHYSEC,devId,ETYPE_PS_MERGY_OCU_STATE,devState,sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
/* 防护进路联锁条件检查 */
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
@@ -439,6 +427,26 @@ UINT8 OpenCbtcLTrainRouteErrProcess(const UINT16 routeId, const UINT8 checkStep)
|
||||
{
|
||||
;
|
||||
}
|
||||
/*风井占用检查*/
|
||||
if ((CI_SUCCESS == reResult) || (CI_ROUTE_RECOVER_ERR == reResult))
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = RouteAirShaftSecOccuCheck(routeId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
/* 侵限区段SPKS联锁条件检查 */
|
||||
if ((CI_SUCCESS == reResult) || (CI_ROUTE_RECOVER_ERR == reResult))
|
||||
@@ -775,7 +783,7 @@ UINT8 OpenCbtcReturnRouteErrProcess(const UINT16 routeId, const UINT8 checkStep)
|
||||
/* 取消标志 */
|
||||
UINT8 const zxqFlag = GetRouteZongQuXiaoFlag(routeId);
|
||||
UINT8 const zrjFlag = GetRouteZongRenJieFlag(routeId);
|
||||
UINT8 chRouteCouplinkFlag = 0U;
|
||||
|
||||
/*故障发送级别*/
|
||||
UINT8 sendLevel = ESEND_LEVEL_ZERO;
|
||||
|
||||
@@ -912,16 +920,8 @@ UINT8 OpenCbtcReturnRouteErrProcess(const UINT16 routeId, const UINT8 checkStep)
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
chRouteCouplinkFlag = GetRouteCouplinkFlag(routeId); /*获取进路联挂标志*/
|
||||
if (ROUTE_COUPLINK_FLAG_YES == chRouteCouplinkFlag)
|
||||
{
|
||||
checkResult = SetCouplinkRouteSecOccCheck(routeId, &devId, &devState);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId, &devId, &devState);
|
||||
}
|
||||
if (CI_SUCCESS == checkResult)
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId, &devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
@@ -1366,7 +1366,6 @@ UINT8 KeepCbtcLTrainRouteErrProcess(const UINT16 routeId)
|
||||
UINT16 trainEnteringRouteState = 0u;
|
||||
UINT8 signalCrossState = 0u;
|
||||
UINT8 rcWorkMode = 0U; /*rc工作模式*/
|
||||
UINT8 chRouteCouplinkFlag = 0U;
|
||||
rcWorkMode = GetLocalRcWorkMode();
|
||||
/* 联锁逻辑检查 */
|
||||
|
||||
@@ -1492,16 +1491,7 @@ UINT8 KeepCbtcLTrainRouteErrProcess(const UINT16 routeId)
|
||||
{ /*反向进路或风井进路需对进路内方所有区段的占压状态进行检查*/
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
chRouteCouplinkFlag = GetRouteCouplinkFlag(routeId); /*获取进路联挂标志*/
|
||||
if (ROUTE_COUPLINK_FLAG_YES == chRouteCouplinkFlag)
|
||||
{
|
||||
checkResult = KeepCouplinkRouteSecOccCheck(routeId, &devId, &devState);;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId, &devId, &devState);
|
||||
}
|
||||
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId,&devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -1886,7 +1876,6 @@ UINT8 KeepCbtcReturnRouteErrProcess(const UINT16 routeId)
|
||||
UINT8 trainEnteringRouteState =0u;
|
||||
UINT8 signalCrossState = 0u;
|
||||
UINT8 rcWorkMode = 0U; /*rc工作模式*/
|
||||
UINT8 chRouteCouplinkFlag = 0U;
|
||||
rcWorkMode = GetLocalRcWorkMode();
|
||||
devState = GetRouteLevel(routeId);
|
||||
if (ROUTE_LEVEL_CBTC == devState)
|
||||
@@ -2022,16 +2011,7 @@ UINT8 KeepCbtcReturnRouteErrProcess(const UINT16 routeId)
|
||||
}
|
||||
else if(RC_WORK_MODE_CI == rcWorkMode)
|
||||
{
|
||||
chRouteCouplinkFlag = GetRouteCouplinkFlag(routeId); /*获取进路联挂标志*/
|
||||
if (ROUTE_COUPLINK_FLAG_YES == chRouteCouplinkFlag)
|
||||
{
|
||||
checkResult = KeepCouplinkRouteSecOccCheck(routeId, &devId, &devState);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId, &devId, &devState);
|
||||
}
|
||||
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -3107,7 +3087,6 @@ static UINT8 OtherCiValidErrCheck(UINT16 const routeId)
|
||||
UINT8 toOpenCheckFlag = 0u;/*恢复可重开信号的条件标志*/
|
||||
UINT8 otherResult = 0u;/*其他联锁检查条件返回值*/
|
||||
UINT8 cFuncSwitchSpks = 0U; /*SPKS信号重开检查进路级别开关*/
|
||||
UINT8 cPsdExceptOpenState = 0U; /*PSD异常打开状态*/
|
||||
|
||||
if (routeLevel == ROUTE_LEVEL_BLOC)
|
||||
{
|
||||
@@ -3133,7 +3112,7 @@ static UINT8 OtherCiValidErrCheck(UINT16 const routeId)
|
||||
psdSum = GetSignalRelatedPsdSum(rtStartSigId);/*获得进路始端信号机关联的PSD数量*/
|
||||
psdIdBuf = GetSignalRelatedPsdBuf(rtStartSigId);/*获得进路始端信号机关联的PSD ID数组*/
|
||||
|
||||
/*开始检查*/
|
||||
/*开始检查*/
|
||||
for (i = 0u; i < checkSum; i++)
|
||||
{
|
||||
tmpOtherCiDevInfo = &dataOtherCiDevBuf[i];
|
||||
@@ -3161,16 +3140,8 @@ static UINT8 OtherCiValidErrCheck(UINT16 const routeId)
|
||||
{
|
||||
if (psdIdBuf[j] == tmpOtherCiDevInfo->DevId)
|
||||
{
|
||||
cPsdExceptOpenState = GePsdExceptState(tmpOtherCiDevInfo->DevId);
|
||||
if (PSD_EXCEPT_NO == cPsdExceptOpenState)
|
||||
{
|
||||
toOpenCheckFlag = 1U; /*PSD未异常,设置可自动重开*/
|
||||
}
|
||||
else
|
||||
{
|
||||
toOpenCheckFlag = 0U; /*存在PSD异常,停止遍历,设置不可自动重开*/
|
||||
break;
|
||||
}
|
||||
toOpenCheckFlag = 1u;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3633,9 +3604,6 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
/*防护进路*/
|
||||
UINT8 const overlapSum = GetRouteOverlapSum(routeId);
|
||||
UINT16 const overlapId = GetRouteOverlapLockedId(routeId);
|
||||
UINT8 cSndSideProFuncSwitch = 0U;
|
||||
|
||||
cSndSideProFuncSwitch = GetSndSideProtectFuncSwitch(); /*二级侧防功能开关*/
|
||||
|
||||
UINT8 lineIdentity = CI_TRADITION_RAILWAY;
|
||||
|
||||
@@ -3679,7 +3647,7 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_TRADITION_RAILWAY == lineIdentity)
|
||||
if(CI_TRADITION_RAILWAY == lineIdentity)
|
||||
{
|
||||
/*保护区段道岔【位置正确】*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
@@ -3698,11 +3666,12 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/* zt 删除单轨相关代码 2022-02-15 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
/*保护区段 内所有道岔【未封锁】*/
|
||||
@@ -3742,11 +3711,29 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
}
|
||||
|
||||
/*保护区段关联防护道岔【位置正确】*/
|
||||
if(CI_SUCCESS == reResult)
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = OvlpRelatedProtSwitchPosCheck(overlapId,&devId,&devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/*保护区段关联防护道岔【防护锁闭】或【单锁且防护锁闭】*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = OvlpRelatedProtSwitchPosCheck(overlapId, &devId, &devState);
|
||||
checkResult = OvlpRelatedProtSwitchLockCheck(overlapId,&devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -3759,23 +3746,6 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
}
|
||||
}
|
||||
|
||||
/*保护区段关联防护道岔【防护锁闭】或【单锁且防护锁闭】*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = OvlpRelatedProtSwitchLockCheck(overlapId, &devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
@@ -3792,21 +3762,13 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
/*保护区段侧防条件检查*/
|
||||
if ((CI_SUCCESS == reResult) || (CI_ROUTE_RECOVER_ERR == reResult))
|
||||
{
|
||||
if (FUNC_SWITCH_ON == cSndSideProFuncSwitch)
|
||||
/*检查保护区段侧防道岔区段状态*/
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = OverlapLateralDfnCheck(overlapId, &devId, &devState);
|
||||
if (CI_ERROR == checkResult)
|
||||
{
|
||||
/*仅在二级侧防开关配置为支持二级侧防时才进行侧防条件检查*/
|
||||
/*检查保护区段侧防道岔区段状态*/
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = OlapSideProtectConditionCheck(overlapId, 0U, 0U);
|
||||
if (CI_ERROR == checkResult)
|
||||
{
|
||||
reResult = checkResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
reResult = checkResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3826,7 +3788,7 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = OverlapAllSecJumpLockStateCheck(overlapId, &devId, &devState);
|
||||
checkResult = OverlapAllSecJumpLockStateCheck(overlapId,&devId,&devState);
|
||||
if (CI_ERROR == checkResult)
|
||||
{
|
||||
reResult = checkResult;
|
||||
@@ -3847,7 +3809,7 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = OverlapFloodGateStateCheck(overlapId, &devId, &devStateType, &devState);
|
||||
checkResult = OverlapFloodGateStateCheck(overlapId,&devId,&devStateType,&devState);
|
||||
if (CI_ERROR == checkResult)
|
||||
{
|
||||
reResult = checkResult;
|
||||
@@ -3866,11 +3828,11 @@ static UINT8 OpenBlocRouteOverlapErrCheck(const UINT16 routeId)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4172,15 +4134,12 @@ static UINT8 KeepCbtcRouteSectionErrCheck(const UINT16 routeId)
|
||||
UINT8 preLogDevState = 0u; /*之前逻辑区段占用状态*/
|
||||
UINT8 LogSecCurCtOrUtOcc = 0U; /*逻辑区段当前占用状态*/
|
||||
UINT8 cLocalCiType = 0U; /*本控区类型*/
|
||||
UINT8 chRouteBelongVirCiId = 0U;
|
||||
|
||||
rcWorkMode = GetLocalRcWorkMode();
|
||||
|
||||
/* 联锁逻辑检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
cLocalCiType = GetLocalCiType();
|
||||
chRouteBelongVirCiId = GetRouteBelongVirCiId(routeId);
|
||||
cLocalCiType = GetLocalVirCiType(chRouteBelongVirCiId);
|
||||
if (CI_TYPE_CLD != cLocalCiType)
|
||||
{
|
||||
/*非车辆段,按CBTC既有逻辑处理*/
|
||||
@@ -4326,14 +4285,11 @@ static UINT8 OpenCbtcRouteSectionErrCheck(const UINT16 routeId)
|
||||
UINT8 functionId = EFUNC_OPENROUTESECTIONERRCHECK;
|
||||
UINT8 rcWorkMode = 0U;
|
||||
UINT8 cLocalCiType = 0U; /*本控区类型*/
|
||||
UINT8 chRouteCouplinkFlag = 0U;
|
||||
UINT8 chSigCrossState = 0U;
|
||||
UINT8 chRouteBelongVirCiId = 0U;
|
||||
|
||||
rcWorkMode = GetLocalRcWorkMode();
|
||||
|
||||
/* 联锁逻辑检查 */
|
||||
chRouteBelongVirCiId = GetRouteBelongVirCiId(routeId);
|
||||
cLocalCiType = GetLocalVirCiType(chRouteBelongVirCiId);
|
||||
cLocalCiType = GetLocalCiType();
|
||||
if (CI_TYPE_CLD != cLocalCiType)
|
||||
{
|
||||
/*非车辆段,按CBTC既有逻辑处理*/
|
||||
@@ -4356,30 +4312,16 @@ static UINT8 OpenCbtcRouteSectionErrCheck(const UINT16 routeId)
|
||||
}
|
||||
else if (RC_WORK_MODE_CI == rcWorkMode)
|
||||
{/*CI*/
|
||||
|
||||
/* 进路始端信号机【未跨压】且内方第一逻辑区段【空闲】*/
|
||||
startSignalId = GetRouteStartSignalId(routeId);
|
||||
chSigCrossState = GetSignalCrossState(startSignalId);
|
||||
if (SIGNAL_CROSS_STATE_NO == chSigCrossState)
|
||||
devId = GetRouteInFirstLogSecId(routeId);
|
||||
devState = GetLogSecCurOccupyState(devId);
|
||||
if ((GetSignalCrossState(startSignalId) == SIGNAL_CROSS_STATE_NO) &&
|
||||
(devState == SECTION_OCCUPY_NO))
|
||||
{
|
||||
chRouteCouplinkFlag = GetRouteCouplinkFlag(routeId); /*获取进路联挂标志*/
|
||||
if (ROUTE_COUPLINK_FLAG_YES == chRouteCouplinkFlag)
|
||||
{
|
||||
/*联挂进路区段占用检查*/
|
||||
reResult = SetCouplinkRouteSecOccCheck(routeId, &devId, &devState);
|
||||
}
|
||||
else
|
||||
{
|
||||
devId = GetRouteInFirstLogSecId(routeId);
|
||||
devState = GetLogSecCurOccupyState(devId);
|
||||
if (SECTION_OCCUPY_NO == devState)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4419,7 +4361,6 @@ static UINT8 OpenCbtcRouteSectionErrCheck(const UINT16 routeId)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*使用新增的函数RouteIntruSecVainSPKSErrCheck*/
|
||||
#if 0
|
||||
/*侵限区段侵限条件不满足检查*/
|
||||
|
||||
@@ -229,7 +229,6 @@ void NonRouteLogicProcess(void)
|
||||
{
|
||||
NonRouteCancelDeal(pNonRoute->NonRouteId); /*非进路取消处理*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,42 +240,22 @@ void NonRouteLogicProcess(void)
|
||||
*/
|
||||
void NonRouteXuanPaiDeal(UINT8 nonRouteId)
|
||||
{
|
||||
UINT8 reResult = CI_ERROR;
|
||||
NonRouteDataStruct *pNonRoute = GetNonRouteDataById(nonRouteId);
|
||||
reResult = LockNonRouteP(nonRouteId);
|
||||
if (CI_SUCCESS == reResult)
|
||||
if (CI_SUCCESS == LockNonRouteP(nonRouteId))
|
||||
{ /*锁闭成功*/
|
||||
reResult = CheckNonRouteSwitchPosRight(nonRouteId, 0U, 0U);
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/*进路道岔位置正确*/
|
||||
/*侵限区段侵限条件不满足检查*/
|
||||
reResult = NonRouteIntruSecVainCheck(nonRouteId, EFUNC_CLD_LOCK_NONROUTE, ESEND_LEVEL_ATS);
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
SetNonRouteStateDeal(nonRouteId, NONROUTE_STATE_LOCK); /*设置非进路为锁闭*/
|
||||
}
|
||||
else
|
||||
{
|
||||
SetNonRouteStateDeal(nonRouteId, NONROUTE_STATE_IDLE); /*设置非进路为空闲*/
|
||||
/* NonRouteIntruSecVainCheck函数已经有故障码,不再记录*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (CI_SUCCESS == CheckNonRouteSwitchPosRight(nonRouteId,0u,0u))
|
||||
{ /*进路道岔位置正确*/
|
||||
SetNonRouteStateDeal(nonRouteId,NONROUTE_STATE_LOCK); /*设置非进路为锁闭*/
|
||||
}
|
||||
else
|
||||
{ /*道岔未动作到位*/
|
||||
|
||||
/*非进路锁闭驱动道岔*/
|
||||
reResult = NonRouteLockDrvSwitchDeal(nonRouteId);
|
||||
if (CI_SUCCESS == reResult)
|
||||
if (CI_ERROR == NonRouteLockDrvSwitchDeal(nonRouteId))
|
||||
{
|
||||
/*继续驱动道岔*/
|
||||
SetNonRouteStateDeal(nonRouteId,NONROUTE_STATE_IDLE); /*设置非进路为空闲*/
|
||||
}
|
||||
else
|
||||
{
|
||||
SetNonRouteStateDeal(nonRouteId, NONROUTE_STATE_IDLE); /*设置非进路为空闲*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6047,8 +6026,6 @@ void DTrainReturnUnlockP(void)
|
||||
UINT16 routeId = 0u; /*进路ID*/
|
||||
UINT8 belongCiId = 0u; /*进路所属联锁ID*/
|
||||
UINT16 ii = 0u; /*循环索引*/
|
||||
UINT8 belongVirCIid = 0U;
|
||||
UINT8 chLocalVirCiType = 0U;
|
||||
|
||||
|
||||
routeCurSum = GetRouteCurSum(); /*获取进路总数*/
|
||||
@@ -6070,13 +6047,9 @@ void DTrainReturnUnlockP(void)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
belongVirCIid = GetRouteBelongVirCiId(routeId);
|
||||
chLocalVirCiType = GetLocalVirCiType(belongVirCIid);
|
||||
if (CI_TYPE_CLD == chLocalVirCiType)
|
||||
{
|
||||
/*调车中途折返进路完整锁闭处理*/
|
||||
DTrainReturnUnlockRouteAllLockP(routeId);
|
||||
}
|
||||
|
||||
/*调车中途折返进路完整锁闭处理*/
|
||||
DTrainReturnUnlockRouteAllLockP(routeId);
|
||||
}
|
||||
|
||||
/*处理调车中途折返*/
|
||||
@@ -6095,13 +6068,9 @@ void DTrainReturnUnlockP(void)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
belongVirCIid = GetRouteBelongVirCiId(routeId);
|
||||
chLocalVirCiType = GetLocalVirCiType(belongVirCIid);
|
||||
if (CI_TYPE_CLD == chLocalVirCiType)
|
||||
{
|
||||
/*调车中途折返进路部分锁闭处理*/
|
||||
DTrainRtnUnlockRoutePartLockP(routeId);
|
||||
}
|
||||
|
||||
/*调车中途折返进路部分锁闭处理*/
|
||||
DTrainRtnUnlockRoutePartLockP(routeId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6120,11 +6089,6 @@ UINT16 GetReturnId(const UINT16 routeId)
|
||||
UINT8 preRouteState = 0u; /* 之前进路状态 */
|
||||
UINT16 ii = 0u;
|
||||
UINT8 toGo = CI_SUCCESS;
|
||||
UINT8 chRouteState = 0U;
|
||||
UINT8 chRoutePhysicalType = 0U;
|
||||
UINT8 chAllLockSecNoOccupyCheck = 0U;
|
||||
UINT8 chTrainEnterRouteFlag = 0U;
|
||||
|
||||
routeState = GetRouteState(routeId); /*获取进路状态*/
|
||||
preRouteState = GetRoutePreState(routeId);/*获取进路前一状态*/
|
||||
|
||||
@@ -6134,8 +6098,7 @@ UINT16 GetReturnId(const UINT16 routeId)
|
||||
toGo = CI_ERROR;
|
||||
}
|
||||
|
||||
chAllLockSecNoOccupyCheck = RouteAllLockSecNoOccupyCheck(routeId);
|
||||
if ((CI_ERROR == chAllLockSecNoOccupyCheck) && (CI_SUCCESS == toGo))
|
||||
if ((CI_ERROR == RouteAllLockSecNoOccupyCheck(routeId)) && (CI_SUCCESS == toGo))
|
||||
{ /*进路区段不是都空闲*/
|
||||
|
||||
toGo = CI_ERROR;
|
||||
@@ -6156,14 +6119,12 @@ UINT16 GetReturnId(const UINT16 routeId)
|
||||
/*获取所有满足道岔条件的进路ID*/
|
||||
for (ii = 0u; ii < starSigRouteSum; ii++)
|
||||
{
|
||||
chRouteState = GetRouteState(starSigRouteBuf[ii]);
|
||||
chRoutePhysicalType = CheckRoutePhysicalType(starSigRouteBuf[ii]);
|
||||
/*B库改为两条进路,当8编组车占压两条进路时,此时BG2进路解锁需要检查以差值信号机为始端的进路的状态*/
|
||||
if ((ROUTE_STATE_IDLE == chRouteState) &&(CI_SUCCESS == chRoutePhysicalType))
|
||||
if ((ROUTE_STATE_IDLE == GetRouteState(starSigRouteBuf[ii])) &&(CI_SUCCESS == CheckRoutePhysicalType(starSigRouteBuf[ii])) &&
|
||||
(SIGNAL_VIRTUAL_YES == GetSignalVirtualAttr(returnSigId)))
|
||||
{
|
||||
/*以并置信号机为始端的进路均为空闲且进路包含的区段均为列检库区段,且并置信号机为虚拟信号机,
|
||||
该种算法目前只限制在库线中中途折返场景(SIGNAL_VIRTUAL_YES == GetSignalVirtualAttr(returnSigId))*/
|
||||
/*联挂功能去掉虚拟信号机检查条件*/
|
||||
该种算法目前只限制在库线中中途折返场景*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6187,8 +6148,7 @@ UINT16 GetReturnId(const UINT16 routeId)
|
||||
/* 如果是差至,如果列车驶入过进路,同时之前状态必须为接近锁闭开放
|
||||
* 否则不认为是同一列车跨入中途折返处理
|
||||
*/
|
||||
chTrainEnterRouteFlag = GetTrainEnterRouteFlag(routeId);
|
||||
if((ROUTE_STATE_NEAR_OPEN == preRouteState) && (TRAIN_ENTER_ROUTE_FLAG_YES == chTrainEnterRouteFlag))
|
||||
if((ROUTE_STATE_NEAR_OPEN == preRouteState) && (TRAIN_ENTER_ROUTE_FLAG_YES == GetTrainEnterRouteFlag(routeId)))
|
||||
{
|
||||
returnSigId = GetRouteChaZhiSignalId(routeId); /*获取差置信号机ID*/
|
||||
}
|
||||
@@ -6538,134 +6498,103 @@ 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;
|
||||
UINT8 chPhySecType = 0U;
|
||||
UINT16 wTempPhySecId = 0U;
|
||||
UINT16 wReturnSignal = 0U;
|
||||
UINT16 wTempSigId = 0U;
|
||||
UINT8 chPhyLockState = 0U;
|
||||
UINT16 wLockRouteId = 0U;
|
||||
UINT16 wTempSigOutPhyId = 0U;
|
||||
UINT16 wTempSigInPhyId = 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;
|
||||
|
||||
|
||||
startSigId = GetRouteStartSignalId(routeId); /*获取进路始端信号机ID*/
|
||||
signalSum = GetSignalCurSum(); /*获取信号机总数*/
|
||||
|
||||
outSecId = GetSignalOutFirstPhySecId(startSigId);
|
||||
chPhySecType = GetPhySecType(outSecId);
|
||||
if (PHYSICAL_SEC_TYPE_NOSWITCH == chPhySecType)
|
||||
if (PHYSICAL_SEC_TYPE_NOSWITCH == GetPhySecType(GetSignalOutFirstPhySecId(startSigId)))
|
||||
{ /*无岔区段*/
|
||||
|
||||
for (ii = 0u; ii < signalSum; ii++)
|
||||
{
|
||||
signalId = GetSignalId(ii); /*获取信号机ID*/
|
||||
wTempPhySecId = GetSignalOutFirstPhySecId(signalId);
|
||||
|
||||
if ((outSecId == wTempPhySecId) && (startSigId != signalId))
|
||||
if ((GetSignalOutFirstPhySecId(startSigId) == GetSignalOutFirstPhySecId(signalId)) &&
|
||||
(startSigId != signalId))
|
||||
{
|
||||
wReturnSignal = signalId;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
return signalId;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
else
|
||||
if (routeSecSum == 1u)
|
||||
{
|
||||
if (1U == routeSecSum)
|
||||
/*if ((PHYSICAL_SECTION_LOCK_NORMAL == GetPhySecLockState(pRoutePhySecStru[0].PhysicalSectionId)) &&
|
||||
(lockBelongRouteId == GetPhySecRLockBelongRouteId(pRoutePhySecStru[0].PhysicalSectionId)))*/
|
||||
{
|
||||
returnOutSecId = pRoutePhySecStru[0U].PhysicalSectionId;/*折返信号机外方区段ID*/
|
||||
returnOutSecId = pRoutePhySecStru[0].PhysicalSectionId;/*折返信号机外方区段ID*/
|
||||
|
||||
tmpSigId = GetRouteStartSignalId(lockBelongRouteId);/*折返信号机内方区段ID*/
|
||||
|
||||
|
||||
returnInSecId = GetSignalOutFirstPhySecId(tmpSigId);
|
||||
}
|
||||
else if (1U < routeSecSum)
|
||||
}
|
||||
else if (routeSecSum > 1u)
|
||||
{
|
||||
for (ii = 0u; ii < routeSecSum; ii++)
|
||||
{
|
||||
for (ii = 0U; ii < routeSecSum; ii++)
|
||||
{
|
||||
|
||||
chPhyLockState = GetPhySecLockState(pRoutePhySecStru[ii].PhysicalSectionId);
|
||||
wLockRouteId = GetPhySecRLockBelongRouteId(pRoutePhySecStru[ii].PhysicalSectionId);
|
||||
if ((PHYSICAL_SECTION_LOCK_NORMAL == chPhyLockState) &&
|
||||
(lockBelongRouteId == wLockRouteId))
|
||||
{ /*本进路第一个锁闭的区段*/
|
||||
if ((PHYSICAL_SECTION_LOCK_NORMAL == GetPhySecLockState(pRoutePhySecStru[ii].PhysicalSectionId)) &&
|
||||
(lockBelongRouteId == GetPhySecRLockBelongRouteId(pRoutePhySecStru[ii].PhysicalSectionId)))
|
||||
{ /*本进路第一个锁闭的区段*/
|
||||
|
||||
returnOutSecId = pRoutePhySecStru[ii].PhysicalSectionId; /*折返信号机外方区段ID*/
|
||||
|
||||
returnOutSecId = pRoutePhySecStru[ii].PhysicalSectionId; /*折返信号机外方区段ID*/
|
||||
|
||||
if (0U < ii)
|
||||
{
|
||||
returnInSecId = pRoutePhySecStru[ii - 1U].PhysicalSectionId; /*折返信号机内方区段ID*/
|
||||
}
|
||||
else
|
||||
{
|
||||
wTempSigId = GetRouteStartSignalId(lockBelongRouteId);/*获取锁闭进路的外方第一区段*/
|
||||
returnInSecId = GetSignalOutFirstPhySecId(wTempSigId);
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
if (ii > 0u)
|
||||
{
|
||||
returnInSecId = pRoutePhySecStru[ii-1U].PhysicalSectionId; /*折返信号机内方区段ID*/
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*无操作*/
|
||||
}
|
||||
}
|
||||
|
||||
if ((0U == returnOutSecId) || (0U == returnInSecId))
|
||||
else
|
||||
{
|
||||
/*无操作*/
|
||||
}
|
||||
else
|
||||
if ((0u == returnOutSecId) || (0u == returnInSecId))
|
||||
{
|
||||
for (ii = 0u; ii < signalSum; ii++)
|
||||
{
|
||||
signalId = GetSignalId(ii); /*获取信号机ID*/
|
||||
wTempSigOutPhyId = GetSignalOutFirstPhySecId(signalId);
|
||||
wTempSigInPhyId = GetSignalInFirstPhySecId(signalId, routeId);
|
||||
if ((returnOutSecId == wTempSigOutPhyId) &&
|
||||
(returnInSecId == wTempSigInPhyId))
|
||||
{
|
||||
wReturnSignal = signalId;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*无操作*/
|
||||
}
|
||||
}
|
||||
return 0u;
|
||||
}
|
||||
|
||||
|
||||
for (ii = 0u; ii < signalSum; ii++)
|
||||
{
|
||||
signalId = GetSignalId(ii); /*获取信号机ID*/
|
||||
|
||||
if ((returnOutSecId == GetSignalOutFirstPhySecId(signalId)) &&
|
||||
(returnInSecId == GetSignalInFirstPhySecId(signalId, routeId)))
|
||||
{
|
||||
return signalId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return wReturnSignal;
|
||||
return 0u;
|
||||
}
|
||||
|
||||
|
||||
@@ -7171,187 +7100,23 @@ UINT8 CLDPhySectionFaultUnlockDeal(const UINT16 phySectionId,const UINT16 lockBe
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 取消洗车命令处理
|
||||
* 参数说明: 无
|
||||
* 功能描述: 取消洗车逻辑管理
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
by hh 20251208
|
||||
*/
|
||||
void CancelWashWorkLogicM(void)
|
||||
{
|
||||
UINT16 washMachineId = 0U; /*洗车机ID*/
|
||||
UINT16 wDownWashRelateRouteFirstId = 0U; /*降级模式洗车线控制台表示灯1关联进路ID*/
|
||||
UINT8 chRouteState = 0U;/*进路状态*/
|
||||
UINT8 downWashAllowState = 0U;/*降级模式洗车同意状态(融合)*/
|
||||
UINT8 washMachineButtonType = GetCiFunctionSwitchConfig(FUNC_WDOWNWASH_ZIFUSHI_BUTTON); /*降级模式洗车同意按钮自复式类型*/
|
||||
washMachineId = GetWashMachineId(0U);
|
||||
|
||||
if ((FUNC_SWITCH_ON == washMachineButtonType) && (washMachineId > 0u) && (washMachineId < WASHMACHINE_SUM_MAX))
|
||||
{
|
||||
downWashAllowState = GetDownWashAllowState(washMachineId);
|
||||
|
||||
if (WASH_COL_STATE_ALLOW_YES == downWashAllowState)
|
||||
{
|
||||
wDownWashRelateRouteFirstId = GetDownWashRelateRoute1Id(washMachineId);
|
||||
chRouteState = GetRouteState(wDownWashRelateRouteFirstId);
|
||||
|
||||
if (ROUTE_STATE_IDLE == chRouteState)
|
||||
{
|
||||
/*设置降级模式洗车线和DCC的洗车同意按钮状态无效*/
|
||||
SetDownWashAllowColState(washMachineId, WASH_COL_STATE_ALLOW_NO);
|
||||
/*清除洗车线洗车同意按钮有效周期*/
|
||||
SetDownWashBtVadCycle(washMachineId, 0U);
|
||||
SetDownDccWashAllowColState(washMachineId, WASH_COL_STATE_ALLOW_NO);
|
||||
/*清除DCC洗车同意按钮有效周期*/
|
||||
SetDownWashDccBtVadCycle(washMachineId, 0U);
|
||||
SetDownWashReqState(washMachineId, WASH_REQ_STATE_ALLOW_NO);
|
||||
SetDownWashReqCycle(washMachineId, 0U);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*向ATS报警进路未取消,请先取消进路 0XB5*/
|
||||
SetCiSendCmdBackInfoData(CI_BACK_ROUTE_IDLE_NOT, CI_DEVICE_TYPE_ROUTE, wDownWashRelateRouteFirstId, 0U, 0U);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*向ATS报警"当前洗车机洗车同意按钮未按下,不需要取消 0XB6"*/
|
||||
SetCiSendCmdBackInfoData(CI_BACK_WASH_BUTTON_PRESS_NOT, CI_DEVICE_TYPE_WASHMACHINE, washMachineId, 0U, 0U);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*其他情况不处理*/
|
||||
{/*取消洗车命令*/
|
||||
UINT16 washMachineId = 0u;
|
||||
washMachineId = GetWashMachineId(0u);
|
||||
#if 0
|
||||
SetCancelWashMachineFlag(washMachineId,CANCEL_WASH_FLAG_SET_YES);
|
||||
#endif
|
||||
if (washMachineId >0u)
|
||||
{/*收到现地取消洗车命令,直接把洗车同意按钮状逻辑态置为抬起*/
|
||||
(void)SetWashmachineXTALogicState(washMachineId,XTA_STATE_RAISE_UP);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 请求洗车命令处理
|
||||
* 参数说明: 无
|
||||
* 返回值 : void
|
||||
*by hh 20251208
|
||||
*/
|
||||
void ReqWashWorkLogicM(void)
|
||||
{
|
||||
UINT32 curCycle = Get2oo2CurCycleNum(); /*当前周期号*/
|
||||
UINT8 downWashReqState = WASH_REQ_STATE_ALLOW_NO; /*洗车机洗车请求状态*/
|
||||
UINT16 wMachineId = 0U; /*洗车机ID*/
|
||||
UINT8 washMachineButtonType = GetCiFunctionSwitchConfig(FUNC_WDOWNWASH_ZIFUSHI_BUTTON); /*降级模式洗车同意按钮自复式类型*/
|
||||
wMachineId = GetWashMachineId(0U);
|
||||
|
||||
if((FUNC_SWITCH_ON == washMachineButtonType) && (wMachineId >0u) && (wMachineId < WASHMACHINE_SUM_MAX))
|
||||
{
|
||||
downWashReqState = GetDownWashReqState(wMachineId);
|
||||
if (WASH_REQ_STATE_ALLOW_NO == downWashReqState)
|
||||
{
|
||||
/*设置降级模式洗车请求有效*/
|
||||
SetDownWashReqState(wMachineId, WASH_REQ_STATE_ALLOW_YES);
|
||||
/*设置降级模式洗车请求周期号有效*/
|
||||
SetDownWashReqCycle(wMachineId, curCycle);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*向ATS报警当前洗车机洗车请求有效,请勿重复操作 0xB3*/
|
||||
SetCiSendCmdBackInfoData(CI_BACK_WASH_APPLY_NOT, CI_DEVICE_TYPE_WASHMACHINE, wMachineId, 0U, 0U);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 反向通过请求命令处理
|
||||
* 参数说明:无
|
||||
* 返回值 : void
|
||||
*by hh 20251208
|
||||
*/
|
||||
void ReqPassWashWorkLogicM(void)
|
||||
{
|
||||
UINT32 curCycle = Get2oo2CurCycleNum(); /*当前周期号*/
|
||||
UINT8 downWashPassReqState = WASH_REQ_STATE_ALLOW_NO; /*反向洗车请求状态*/
|
||||
UINT16 wMachineId = 0U; /*洗车机ID*/
|
||||
UINT8 washMachineButtonType = GetCiFunctionSwitchConfig(FUNC_WDOWNWASH_ZIFUSHI_BUTTON); /*降级模式洗车同意按钮自复式类型*/
|
||||
wMachineId = GetWashMachineId(0U);
|
||||
|
||||
if ((FUNC_SWITCH_ON == washMachineButtonType) && (wMachineId > 0u) && (wMachineId < WASHMACHINE_SUM_MAX))
|
||||
{
|
||||
downWashPassReqState = GetDownWashPassReqState(wMachineId);
|
||||
|
||||
if (WASH_REQ_STATE_ALLOW_NO == downWashPassReqState)
|
||||
{
|
||||
/*设置降级模式反向洗车请求有效*/
|
||||
SetDownWashPassReqState(wMachineId, WASH_REQ_STATE_ALLOW_YES);
|
||||
/*设置降级模式反向洗车请求周期号有效*/
|
||||
SetDownWashPassReqCycle(wMachineId, curCycle);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCiSendCmdBackInfoData(CI_BACK_WASH_PASSAPPLY_NOT, CI_DEVICE_TYPE_WASHMACHINE, wMachineId, 0U, 0U);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 取消反向通过请求命令处理
|
||||
* 参数说明: 无
|
||||
* 返回值 : void
|
||||
*by hh 20251208
|
||||
*/
|
||||
void CancelPassWashWorkLogicM(void)
|
||||
{
|
||||
UINT16 wDownWashRelateRouteSecId = 0U; /*降级模式洗车线控制台表示灯2关联进路ID*/
|
||||
UINT8 chRouteState = 0U;/*进路状态*/
|
||||
UINT8 downWashAllowPassState = 0U;/*降级模式反向通过洗车同意状态(融合)*/
|
||||
UINT16 wMachineId = 0U; /*洗车机ID*/
|
||||
UINT8 washMachineButtonType = GetCiFunctionSwitchConfig(FUNC_WDOWNWASH_ZIFUSHI_BUTTON); /*降级模式洗车同意按钮自复式类型*/
|
||||
wMachineId = GetWashMachineId(0U);
|
||||
if ((FUNC_SWITCH_ON == washMachineButtonType) && (wMachineId > 0u && wMachineId < WASHMACHINE_SUM_MAX))
|
||||
{
|
||||
downWashAllowPassState = GetDownWashAllowPassState(wMachineId);
|
||||
|
||||
if (WASH_COL_STATE_ALLOW_YES == downWashAllowPassState)
|
||||
{
|
||||
wDownWashRelateRouteSecId = GetDownWashRelateRoute2Id(wMachineId);
|
||||
chRouteState = GetRouteState(wDownWashRelateRouteSecId);
|
||||
|
||||
if (ROUTE_STATE_IDLE == chRouteState)
|
||||
{
|
||||
/*设置降级模式洗车线和DCC的反向洗车同意按钮状态无效*/
|
||||
SetDownWashAllowPassColState(wMachineId, WASH_COL_STATE_ALLOW_NO);
|
||||
/*清除洗车线反向通过同意按钮有效周期*/
|
||||
SetDownWashBtVadPassCycle(wMachineId, 0U);
|
||||
SetDownDccWashAllowPassColState(wMachineId, WASH_COL_STATE_ALLOW_NO);
|
||||
/*清除DCC反向通过同意按钮有效周期*/
|
||||
SetDownWashDccBtVadPassCycle(wMachineId, 0U);
|
||||
SetDownWashPassReqState(wMachineId, WASH_REQ_STATE_ALLOW_NO);
|
||||
SetDownWashPassReqCycle(wMachineId, 0U);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*向ATS报警进路未取消,请先取消进路 0XB5*/
|
||||
SetCiSendCmdBackInfoData(CI_BACK_ROUTE_IDLE_NOT, CI_DEVICE_TYPE_ROUTE, wDownWashRelateRouteSecId, 0U, 0U);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/*向ATS报警"洗车机XXX反向通过同意按钮未按下,不需要取消 0XB7"*/
|
||||
SetCiSendCmdBackInfoData(CI_BACK_WASH_PASSBUTTON_PRESS_NOT, CI_DEVICE_TYPE_WASHMACHINE, wMachineId, 0U, 0U);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*其他情况不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 进路调车同意逻辑管理
|
||||
* 参数说明: void
|
||||
|
||||
@@ -766,37 +766,12 @@ UINT16 GetReturnId(const UINT16 routeId);
|
||||
void DTrainRtnUnlockRemoteRAllLockP(const UINT16 routeId);
|
||||
|
||||
/*
|
||||
* 功能描述: 取消洗车命令处理
|
||||
* 参数说明: 无
|
||||
* 返回值 : void
|
||||
by hh 20251208
|
||||
* 功能描述: 取消洗车逻辑管理
|
||||
* 参数说明: void
|
||||
* 返回值 : void
|
||||
*/
|
||||
void CancelWashWorkLogicM(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 请求洗车命令处理
|
||||
* 参数说明: 无
|
||||
* 返回值 : void
|
||||
*by hh 20251208
|
||||
*/
|
||||
void ReqWashWorkLogicM(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 反向通过请求命令处理
|
||||
* 参数说明:无
|
||||
* 返回值 : void
|
||||
*by hh 20251208
|
||||
*/
|
||||
void ReqPassWashWorkLogicM(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 取消反向通过请求洗车逻辑管理
|
||||
* 参数说明: const UINT16 wMachineId 洗车机ID
|
||||
* 返回值 : void
|
||||
*by hh 20251208
|
||||
*/
|
||||
void CancelPassWashWorkLogicM(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 进路调车同意逻辑管理
|
||||
* 参数说明: void
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -946,18 +946,6 @@ UINT8 RouteAllSecJumpLockStateCheck(UINT16 const routeId,UINT16 *pDevId,UINT8 *p
|
||||
* CI_SUCCESS
|
||||
*/
|
||||
UINT8 KeepRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述:引导进路信号保持道岔联锁条件检查
|
||||
* 参数说明:UINT16 RouteId, 进路号
|
||||
* UINT8 functionId, 调用函数编号
|
||||
* UINT8 sendLevel, 故障码发送级别
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Created By LQ 2025.09.29
|
||||
*/
|
||||
UINT8 KeepLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述: 保持列车进路信号机联锁条件检查
|
||||
* 参数说明:
|
||||
@@ -982,18 +970,6 @@ UINT8 KeepLTrainRouteSignalCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel
|
||||
*/
|
||||
UINT8 LockBlocRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述:引导进路锁闭道岔联锁条件检查
|
||||
* 参数说明:UINT16 RouteId, 进路号
|
||||
* UINT8 functionId, 调用函数编号
|
||||
* UINT8 sendLevel, 故障码发送级别
|
||||
* 返 回 值:CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* RETURN_LOCK_ERR_SWITPOS 道岔位置不正确
|
||||
* Created By LQ 2025.09.29
|
||||
*/
|
||||
UINT8 LockLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述: 锁闭点式进路区段联锁条件检查
|
||||
* 参数说明:
|
||||
@@ -1189,17 +1165,6 @@ UINT8 OpenLTrainRouteSignalCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel
|
||||
*/
|
||||
UINT8 OpenBlocRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述:引导进路开放信号道岔联锁条件检查
|
||||
* 参数说明:UINT16 RouteId, 进路号
|
||||
* UINT8 functionId, 调用函数编号
|
||||
* UINT8 sendLevel, 故障码发送级别
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Created By LQ 2025.09.29
|
||||
*/
|
||||
UINT8 OpenLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel);
|
||||
|
||||
/* L10_点式进路开放信号保护区段联锁条件检查 */
|
||||
/*
|
||||
* 功能描述: 点式进路开放信号保护区段联锁条件检查
|
||||
@@ -1711,17 +1676,6 @@ UINT8 LogRouteNextLogSecLockCheck(UINT16 const wLogicSecId, UINT16 const wLogRou
|
||||
*/
|
||||
UINT8 LogicSecRltvPrtctSwLockCheck(UINT16 const wLgcId, UINT16 *pDevId, UINT8 *pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述: 逻辑区段所处道岔防护道岔位置检查
|
||||
* 参数说明: UINT16 const routeId, 进路ID
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* 创建 : qw.liu 2022-03-01
|
||||
*/
|
||||
UINT8 LogicSecRltvPrtctSwPosCheck(UINT16 const wLgcId, UINT16 *pDevId, UINT8 *pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述: 逻辑区段所处道岔防护道岔未封锁检查
|
||||
* 参数说明: UINT16 const routeId, 进路ID
|
||||
@@ -1734,6 +1688,18 @@ UINT8 LogicSecRltvPrtctSwPosCheck(UINT16 const wLgcId, UINT16 *pDevId, UINT8 *pD
|
||||
*/
|
||||
UINT8 LogicSecRltvPrtctSwFLockCheck(UINT16 const wLgcId, UINT16* pDevId, UINT8* pDevState, UINT8* pYLockAlarmFlag);
|
||||
|
||||
/*
|
||||
* 功能描述: 逻辑区段所处道岔防护道岔位置检查
|
||||
* 参数说明: UINT16 const routeId, 进路ID
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* 创建 : qw.liu 2022-03-01
|
||||
*/
|
||||
UINT8 LogicSecRltvPrtctSwPosCheck(UINT16 const wLgcId, UINT16 *pDevId, UINT8 *pDevState);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 逻辑区段所处道岔未封锁检查
|
||||
* 参数说明: UINT16 const routeId, 进路ID
|
||||
@@ -1897,7 +1863,15 @@ UINT8 LockLeadRouteSectionCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLeve
|
||||
*/
|
||||
UINT8 LogicSecSwitchLtrlDfncCheck(UINT16 const wLgcId, UINT16 *pDevId, UINT8 *pDevState);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 进路区段全部侧防条件满足检查
|
||||
* 参数说明: UINT16 routeId, 进路号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
*/
|
||||
UINT8 RouteAllLtrlDfncSwitchCheck(UINT16 const routeId, UINT16 *pDevId, UINT8 *pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述: 进路区段全部联络线设备条件满足检查
|
||||
@@ -2231,7 +2205,15 @@ UINT8 LogSecSeqIncUTCheck(const UINT16 wTrainId, const UINT8 cLogSecSum, const U
|
||||
*/
|
||||
UINT8 RouteHalfProSwitchFLockCheck(UINT16 const routeId, UINT16* pDevId, UINT8* pDevState, UINT8* pYLockAlarmFlag);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 进路区段全部侧防条件满足检查
|
||||
* 参数说明: UINT16 routeId, 进路号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
*/
|
||||
UINT8 RouteHalfLtrlDfncSwitchCheck(UINT16 const routeId, UINT16 *pDevId, UINT8 *pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述: 部分进路区段全部联络线设备条件满足检查
|
||||
@@ -2518,7 +2500,16 @@ UINT8 CheckRouteZhefanJiesuo(UINT16 const routeId);
|
||||
*/
|
||||
UINT8 CheckOverlapPhysecOtherLock(UINT16 const overlapId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述:保护区段侧防条件检查
|
||||
* 参数说明:UINT16 const overlapId, OverlapID
|
||||
* UINT16* pDevId 设备Id(返回)
|
||||
* UINT8* pDevState 设备状态(返回)
|
||||
* 返回值 :0 检查失败
|
||||
* 1 检查成功
|
||||
* Created By LQ 2024.01.05
|
||||
*/
|
||||
UINT8 OverlapLateralDfnCheck(UINT16 const overlapId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述: 检查保护区段的CBTC区域属性
|
||||
@@ -2623,7 +2614,7 @@ UINT8 CtTrainHeadSuspCheck(const UINT16 wTrainId, const UINT8 cLogSecSeqDir, con
|
||||
* 输出参数:无
|
||||
* 返回值 :CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Created By LQ 2024.09.05
|
||||
* Edit By cgh 2025.10.17
|
||||
*/
|
||||
UINT8 LogSecSeqAndTrainPosCheckCLD(const UINT8 cLogSecSum, const UINT16* pLogSecIdBuff, const UINT16 wTrainId, const UINT8 cFunctionId, const UINT8 cSendLevel);
|
||||
|
||||
@@ -2716,13 +2707,13 @@ UINT8 OtherCiOvlpRelProSwMovValCheck(const UINT16 wOverlapId);
|
||||
UINT8 OverlapProSwUsingCheck(const UINT16 wOverlapId, UINT16* pDevId, UINT8* pDevState, UINT8* pAlarmType);
|
||||
|
||||
/*
|
||||
* 功能描述: 进路关联所有道岔位置正确检查
|
||||
* 参数说明: UINT16 const routeId, 进路号)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* BY CGH 20250224
|
||||
* 功能描述: 获取指定进路办理相邻控区道岔检查标志
|
||||
* 参数说明: const UINT16 routeId 进路ID
|
||||
* 返 回 值: 进路办理相邻控区道岔检查标志
|
||||
* 输出参数:UINT16* switchID道岔ID、UINT8* chSwitchState道岔状态
|
||||
* by cgh 20241202
|
||||
*/
|
||||
UINT8 RouteRelAllSwitchPosCheck(UINT16 const routeId);
|
||||
UINT8 RouteRelAllSwitchPosCheck(UINT16 const routeId, UINT16* switchID, UINT8* chSwitchState);
|
||||
|
||||
/*
|
||||
*函数功能:保护区段照查继电器检查
|
||||
@@ -2771,154 +2762,93 @@ UINT8 RouteCldAttrCheck(UINT16 wRouteId);
|
||||
* Created By LQ 2025.08.18
|
||||
*/
|
||||
UINT8 OverlapOccuUnlockCheck(UINT16 overlapId, UINT8 functionId);
|
||||
/*
|
||||
* 功能描述:办理联挂进路区段检查
|
||||
* 参数说明:const UINT16 wRouteId 进路ID
|
||||
* UINT16* pDevId 设备ID
|
||||
* UINT8* pDevState 设备状态
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Created By 2025.09.18
|
||||
*/
|
||||
UINT8 SetCouplinkRouteSecOccCheck(const UINT16 wRouteId, UINT16* pDevId, UINT8* pDevState);
|
||||
/*
|
||||
* 功能描述:保持联挂进路区段占用检查
|
||||
* 参数说明:const UINT16 wRouteId 进路ID
|
||||
* UINT16* pDevId 设备ID
|
||||
* UINT8* pDevState 设备状态
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Created By 2025.09.18
|
||||
*/
|
||||
UINT8 KeepCouplinkRouteSecOccCheck(const UINT16 wRouteId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述:单个侧防条件检查
|
||||
* 参数说明:SideProtecStru SidePretectData 一项侧防条件
|
||||
* UINT16 wDevId 设备ID
|
||||
* UINT8 cDevType 设备类型
|
||||
* UINT8 functionId 函数ID
|
||||
* UINT8 sendLevel 发送等级
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* 功能描述:列车占用完全在指定区段检查
|
||||
* 输入参数:const UINT16 wPhySecId 物理区段ID
|
||||
* const UINT16 wTrainId 列车ID
|
||||
* 输出参数:无
|
||||
* 返回值 :CI_ERROR 0 不完全在
|
||||
* CI_SUCCESS 1 完全在
|
||||
* by cgh 20251017
|
||||
*/
|
||||
UINT8 SingleSideProtectCheck(SideProtecStru SidePretectData, UINT16 wDevId, UINT8 cDevType, UINT8 functionId, UINT8 sendLevel);
|
||||
UINT8 TrainOccSameSecCheck(const UINT16 wPhySecId, const UINT16 wTrainId);
|
||||
|
||||
/*
|
||||
* 功能描述:侧防道岔位置检查
|
||||
* 参数说明:SideProtecSwitchData* pSideProtecSwitchBuf 道岔侧防条件
|
||||
* UINT8 chSideProtecSwitchNum 侧防道岔数量
|
||||
* 返 回 值:CI_ERROR 0 侧防道岔位置连通
|
||||
* CI_SUCCESS 1 侧防道岔位置不连通
|
||||
* 功能描述:占用是否属于同一区段检查
|
||||
* 输入参数:const UINT16 wBasePhySecId 基准物理区段ID
|
||||
* const UINT16 wCheckPhySecId 待检查物理区段ID
|
||||
* 输出参数:无
|
||||
* 返回值 :CI_ERROR 0 不属于
|
||||
* CI_SUCCESS 1 属于
|
||||
* by cgh 20251017
|
||||
*/
|
||||
UINT8 SideProtectSwitchPosCheck(SideProtecSwitchData* pSideProtecSwitchBuf, UINT8 chSideProtecSwitchNum);
|
||||
UINT8 OccBelSameSecCheck(const UINT16 wBasePhySecId, const UINT16 wCheckPhySecId);
|
||||
|
||||
/*
|
||||
* 功能描述:侧防物理区段条件检查
|
||||
* 参数说明:SideProtecStru SidePretectData 侧防条件
|
||||
* UINT8 functionId 函数ID
|
||||
* UINT8 sendLevel 发送等级
|
||||
* 返 回 值: CI_ERROR 失败
|
||||
* CI_SUCCESS 成功
|
||||
*/
|
||||
UINT8 SideProtectPhySecCheck(SideProtecStru SidePretectData, UINT8 functionId, UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述: 检查进路侧防条件
|
||||
* 参数说明:UINT16 routeId 进路ID
|
||||
UINT8 functionId 函数ID
|
||||
UINT8 sendLevel 发送等级
|
||||
* 功能描述: 进路风井区段占用检查
|
||||
* 参数说明: UINT16 routeId, 进路号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)(占用/空闲)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* 创建 :
|
||||
* by yx 2026.03.04
|
||||
*/
|
||||
UINT8 RouteSideProtectConditionCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel);
|
||||
UINT8 RouteAirShaftSecOccuCheck(UINT16 const routeId, UINT16* pDevId, UINT8* pDevState);
|
||||
/*
|
||||
* 功能描述: 检查保护区段侧防条件
|
||||
* 参数说明:UINT16 wOverlapId 保护区段ID
|
||||
UINT8 functionId 函数ID
|
||||
UINT8 sendLevel 发送等级
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* 创建 :
|
||||
*/
|
||||
UINT8 OlapSideProtectConditionCheck(UINT16 wOverlapId, UINT8 functionId, UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述:侧防区段道岔位置检查
|
||||
* 参数说明:UINT16 const physicalId, 物理区段ID
|
||||
* SideProtecStru SidePretectData 侧防数据
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
*/
|
||||
UINT8 SideProtectPhySecSwtPosCheck(const UINT16 physicalId, SideProtecStru SidePretectData);
|
||||
|
||||
/*
|
||||
* 功能描述:检查保护区段道岔及防护道岔位置是否正确
|
||||
* 参数说明:const UINT16 overlapId overlap ID
|
||||
* 返 回 值:CI_ERROR 0 道岔位置错误
|
||||
* CI_SUCCESS 1 道岔位置正确
|
||||
* Created By LQ 2025.09.28
|
||||
*/
|
||||
UINT8 CheckOverlapSwitchPosRight(const UINT16 overlapId);
|
||||
|
||||
/*
|
||||
*函数功能:保护区段之前人工解锁状态检查
|
||||
*参数说明:const UINT16 wRouteId 进路ID
|
||||
* 功能描述: 进路风井区段锁闭检查
|
||||
* 参数说明: UINT16 routeId, 进路号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* by cgh 20250929
|
||||
* by yx 2026.03.04
|
||||
*/
|
||||
UINT8 OverlapPreLaborUnLockStateCheck(UINT16 const wRouteId, UINT16* pDevId, UINT8* pDevState);
|
||||
UINT8 RouteAirShaftSecLockCheck(UINT16 const routeId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述:侧防关键道岔检查
|
||||
* 参数说明:UINT16 wSwitchId 关键道岔ID
|
||||
* UINT16 wDevId 设备ID
|
||||
* UINT8 cDevType 设备类型
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Created By LQ 2025.09.29
|
||||
* 功能描述: 计轴区段所有防护道岔位置正确检查
|
||||
* 参数说明: UINT16 const axisSecId, 计轴区段编号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* add mpt 20260331
|
||||
*/
|
||||
UINT8 SingleSideKeySwitchCheck(UINT16 wSwitchId, UINT16 wDevId, UINT8 cDevType);
|
||||
UINT8 AxisSecAllProtSwitchPosCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述:物理区段锁闭码位侧防条件检查
|
||||
* 参数说明:UINT16 wPhySecId 物理区段ID
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Created By LQ 2025.09.29
|
||||
*/
|
||||
UINT8 PhySecLockMaskSideProtectCheck(UINT16 wPhySecId);
|
||||
/*
|
||||
*函数功能:自动通过进路办理联挂属性检查
|
||||
*参数说明: const UINT16 wAutoRouteId 进路ID
|
||||
* const UINT8 chFunctionId 函数ID
|
||||
* 功能描述: 计轴区段道岔封锁状态检查
|
||||
* 参数说明: UINT16 const axisSecId, 计轴区段编号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* by lyj 20250929
|
||||
* Add by mpt 20260331
|
||||
*/
|
||||
UINT8 AutoRouteCouplinkStateCheck(const UINT16 wAutoRouteId, const UINT8 chFunctionId);
|
||||
UINT8 AxisSecProtSwitchFLockCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
/*
|
||||
*函数功能:自动折返进路办理联挂属性检查
|
||||
*参数说明: const UINT16 wAutoRouteId 进路ID
|
||||
* const UINT8 chFunctionId 函数ID
|
||||
* 功能描述: 检查计轴区段跳跃锁闭是否有防护道岔驱动超时
|
||||
* 参数说明: const UINT16 routeId, 进路ID
|
||||
* 返回值 : UINT8
|
||||
CI_SUCCESS:计轴区段防护道岔无道岔驱动超时
|
||||
CI_ERROR:计轴区段防护道岔驱动超时
|
||||
add by mpt 20260331
|
||||
*/
|
||||
UINT8 ChekJumpLockProtectSwitDrivOvtmStat(const UINT16 axisSecId);
|
||||
|
||||
/*
|
||||
* 功能描述: 计轴区段的防护道岔位置和动作有效性检查
|
||||
* 参数说明: UINT16 const axisSecId, 计轴区段编号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* by lyj 20250929
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
UINT8 AutoReturnRouteCouplinkCheck(const UINT16 wAutoRouteId, const UINT8 chFunctionId);
|
||||
/*
|
||||
*函数功能:全自动折返进路办理联挂属性检查
|
||||
*参数说明: const UINT16 wAutoRouteId 进路ID
|
||||
* const UINT8 chFunctionId 函数ID
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* by lyj 20250929
|
||||
*/
|
||||
UINT8 AllAutoReturnRCouplinkCheck(const UINT16 wAutoRouteId, const UINT8 chFunctionId);
|
||||
UINT8 AxisSecPorteSwitchPosMoveCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8* pDevState, UINT8 funcId, UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述: 区段征用、区段防护道岔区段征用、区段内道岔道岔征用检查、区段内防护道岔道岔征用
|
||||
* 参数说明:const UINT16 axisSecId 计轴区段ID
|
||||
@@ -2935,6 +2865,7 @@ UINT8 JumpPhySectionUseCheck(const UINT16 axisSecId);
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
UINT8 JumpPhySectionPortectUseCheck(const UINT16 axisSecId);
|
||||
|
||||
/*
|
||||
* 功能描述:逻辑区段防护道岔区段征用、道岔征用检查
|
||||
* 参数说明:const UINT16 axisSecId 计轴区段ID
|
||||
@@ -2943,6 +2874,7 @@ UINT8 JumpPhySectionPortectUseCheck(const UINT16 axisSecId);
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
UINT8 JumpLogicSecPortectUseCheck(const UINT16 wLgcId);
|
||||
|
||||
/*
|
||||
* 功能描述:计轴区段所在道岔道岔征用检查
|
||||
* 参数说明:const UINT16 axisSecId 计轴区段ID
|
||||
@@ -2951,6 +2883,7 @@ UINT8 JumpLogicSecPortectUseCheck(const UINT16 wLgcId);
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
UINT8 JumpPhySectionSwitchUseCheck(const UINT16 axisSecId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置跳跃锁闭防护道岔区段征用状态
|
||||
* 参数说明:const UINT16 axisSecId 计轴区段ID
|
||||
@@ -2959,6 +2892,7 @@ UINT8 JumpPhySectionSwitchUseCheck(const UINT16 axisSecId);
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
void SetJumpPhySectionPortectSecUse(const UINT16 axisSecId, const UINT8 state);
|
||||
|
||||
/*
|
||||
* 功能描述:设置逻辑区段的防护道岔区段征用
|
||||
* 参数说明:const UINT16 axisSecId 计轴区段ID
|
||||
@@ -2967,45 +2901,7 @@ void SetJumpPhySectionPortectSecUse(const UINT16 axisSecId, const UINT8 state);
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
void SetJumpLogicSecPortectUse(const UINT16 wLgcId, const UINT8 state);
|
||||
/*
|
||||
* 功能描述: 检查计轴区段跳跃锁闭是否有防护道岔驱动超时
|
||||
* 参数说明: const UINT16 routeId, 进路ID
|
||||
* 返回值 : UINT8
|
||||
CI_SUCCESS:计轴区段防护道岔无道岔驱动超时
|
||||
CI_ERROR:计轴区段防护道岔驱动超时
|
||||
add by mpt 20260331
|
||||
*/
|
||||
UINT8 ChekJumpLockProtectSwitDrivOvtmStat(const UINT16 axisSecId);
|
||||
/*
|
||||
* 功能描述: 计轴区段道岔封锁状态检查
|
||||
* 参数说明: UINT16 const axisSecId, 计轴区段编号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* Add by mpt 20260331
|
||||
*/
|
||||
UINT8 AxisSecProtSwitchFLockCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8* pDevState);
|
||||
/*
|
||||
* 功能描述: 计轴区段的防护道岔位置和动作有效性检查
|
||||
* 参数说明: UINT16 const axisSecId, 计轴区段编号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
UINT8 AxisSecPorteSwitchPosMoveCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8* pDevState, UINT8 funcId, UINT8 sendLevel);
|
||||
/*
|
||||
* 功能描述: 计轴区段所有防护道岔位置正确检查
|
||||
* 参数说明: UINT16 const axisSecId, 计轴区段编号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
* add mpt 20260331
|
||||
*/
|
||||
UINT8 AxisSecAllProtSwitchPosCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置计轴区段关联防护道岔防护锁闭状态
|
||||
* 参数说明: const UINT16 axisSecId, 计轴区段ID
|
||||
@@ -3014,6 +2910,7 @@ UINT8 AxisSecAllProtSwitchPosCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
void SetAxisRelProSwitchLockSta(const UINT16 axisSecId, const UINT8 lockCommand);
|
||||
|
||||
/*
|
||||
* 功能描述: 计轴区段关联防护道岔防护锁闭检查
|
||||
* 参数说明: UINT16 const routeId, 计轴区段号
|
||||
@@ -3024,6 +2921,7 @@ void SetAxisRelProSwitchLockSta(const UINT16 axisSecId, const UINT8 lockCommand)
|
||||
* add mpt 20260331
|
||||
*/
|
||||
UINT8 AxisRelatedProSwitchLockCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置逻辑区段关联防护道岔防护锁闭状态
|
||||
* 参数说明: const UINT16 axisSecId, 计轴区段ID
|
||||
@@ -3031,7 +2929,8 @@ UINT8 AxisRelatedProSwitchLockCheck(UINT16 const axisSecId, UINT16* pDevId, UINT
|
||||
* 返回值 : void
|
||||
* add by mpt 20260331
|
||||
*/
|
||||
void SetLogSecRelProSwitchLockSta(const UINT16 wLgcId, const UINT8 lockCommand);
|
||||
void SetLogSecRelProSwitchLockSta(const UINT16 wLgcId, const UINT8 lockCommand);
|
||||
|
||||
/*
|
||||
* 功能描述:计轴区段所有道岔是否全部征用
|
||||
* 参数说明:const UINT16 axisSecId 计轴区段ID
|
||||
@@ -3042,5 +2941,19 @@ void SetLogSecRelProSwitchLockSta(const UINT16 wLgcId, const UINT8 lockCommand);
|
||||
UINT8 JumpPhySecAllUseCheck(const UINT16 axisSecId);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 计轴区段防护道岔引导总锁状态检查
|
||||
* 参数说明: UINT16 const axisSecId, 计轴区段编号
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Add by LQ 20260518
|
||||
*/
|
||||
UINT8 AxisSecProtSwtYLockCheck(UINT16 const axisSecId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -688,16 +688,15 @@ void LgcSecUnlockProc(const UINT16 routeId, const UINT16 logSectionId);
|
||||
* 返回值 : void
|
||||
*/
|
||||
void RouteLgcSecResReleaseProcess(const UINT16 wRouteId);
|
||||
|
||||
/*
|
||||
* 功能描述: 检查保护区段人工解锁是否可执行
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* const UINT16 wRouteId 进路ID
|
||||
* const UINT32 dwOverlapUnlockCount 保护区段自动解锁周期数
|
||||
* const UINT32 dwOverlapUnlockStartCyc 保护区段自动解锁起始周期
|
||||
* 返回值 : CI_SUCCESS:成功
|
||||
CI_ERROR:失败
|
||||
* edit cgh 20250928
|
||||
*/
|
||||
UINT8 CheckOverlapLaborUnlock(const UINT16 overlapId, const UINT16 wRouteId);
|
||||
UINT8 CheckOverlapLaborUnlock(const UINT16 overlapId, const UINT32 dwOverlapUnlockCount, const UINT32 dwOverlapUnlockStartCyc);
|
||||
/*
|
||||
* 功能描述: 计算保护区段解锁倒计时开始周期
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
@@ -825,30 +824,6 @@ UINT8 RouteLgcSecResReturnSecCheck(UINT16 wValidReturnSigId, const UINT16 wRoute
|
||||
*/
|
||||
UINT8 LgcOverlapUsableProcess(UINT16 const wLgcSecId);
|
||||
#endif
|
||||
/*
|
||||
* 功能描述: 进路联挂标志处理
|
||||
* 参数说明: const UINT16 wRouteId 进路ID
|
||||
* const UINT8 functionId 函数ID
|
||||
* const UINT8 sendLevel 报警级别
|
||||
* 返回值 : 联挂标志设置结果
|
||||
* Create: 20250917
|
||||
*/
|
||||
UINT8 SetRouteCouplinkProcess(const UINT16 wRouteId, const UINT8 functionId, const UINT8 sendLevel);
|
||||
/*
|
||||
* 功能描述: 刷新联挂标志
|
||||
* 参数说明: const UINT16 wRouteId 进路ID
|
||||
* 返回值 : 无
|
||||
* Create: 20250919
|
||||
*/
|
||||
void UpdateRouteCouplinkFlag(const UINT16 wRouteId);
|
||||
/*
|
||||
* 功能描述: 联络线接车进路解锁处理
|
||||
* 参数说明: const UINT16 wRouteId 进路ID
|
||||
* 返回值 : 无
|
||||
* Create: lyj 20260603
|
||||
*/
|
||||
void ConnectRouteReleaseProc(const UINT16 wRouteId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -823,7 +823,7 @@ UINT8 SetLogRouteSwitchCheck(UINT16 logRouteId, UINT8 functionId, UINT8 sendLeve
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = LogRouteCeFangSwitchCheck(logRouteId, functionId, sendLevel);
|
||||
checkResult = LogRouteCeFangSwitchCheck(logRouteId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -831,7 +831,8 @@ UINT8 SetLogRouteSwitchCheck(UINT16 logRouteId, UINT8 functionId, UINT8 sendLeve
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, devId, ETYPE_PS_NO_UT_CT_OCU_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
@@ -1033,7 +1034,7 @@ UINT8 LockLogRouteSwitchCheck(UINT16 logRouteId, UINT8 functionId, UINT8 sendLev
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = LogRouteCeFangSwitchCheck(logRouteId, functionId, sendLevel);
|
||||
checkResult = LogRouteCeFangSwitchCheck(logRouteId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -1041,7 +1042,8 @@ UINT8 LockLogRouteSwitchCheck(UINT16 logRouteId, UINT8 functionId, UINT8 sendLev
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, devId, ETYPE_PS_NO_UT_CT_OCU_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
@@ -1296,39 +1298,46 @@ UINT8 LogRouteProSwitchFLockCheck(UINT16 const routeId, UINT16* pDevId, UINT8* p
|
||||
/*
|
||||
* 功能描述: 逻辑进路侧防条件满足检查
|
||||
* 参数说明: UINT16 routeId, 逻辑进路号
|
||||
* UINT8 functionId, 函数ID
|
||||
* UINT8 sendLevel 发送等级
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
*/
|
||||
UINT8 LogRouteCeFangSwitchCheck(UINT16 const routeId,UINT8 functionId, UINT8 sendLevel)
|
||||
UINT8 LogRouteCeFangSwitchCheck(UINT16 const routeId, UINT16* pDevId, UINT8* pDevState)
|
||||
{
|
||||
/* 进路区段*/
|
||||
UINT16 const checkSum = GetLogicalRouteInLogSecSum(routeId);
|
||||
UINT16* const dataIdBuf = GetLogicalRouteInLogSecId(routeId);
|
||||
|
||||
/* 局部变量定义初始化 */
|
||||
UINT8 i = 0u; /* 循环变量 */
|
||||
UINT16 i = 0u; /* 循环变量 */
|
||||
UINT16 devId = 0u;
|
||||
UINT8 reVal = CI_ERROR;
|
||||
SideProtecStru* pLogRoutSidePrtectData = NULL;
|
||||
UINT8 chLogRoutSidePrtectDataNum = 0u;
|
||||
|
||||
UINT8 cDevType = 0u;
|
||||
UINT8 cDevStateType = 0u;
|
||||
UINT16 cDevId = 0u;
|
||||
UINT8 cDevState = 0u;
|
||||
|
||||
pLogRoutSidePrtectData = GetLogRoutSidePrtectData(routeId);
|
||||
chLogRoutSidePrtectDataNum = GetLogRoutSidePrtectDataNum(routeId);
|
||||
|
||||
if (NULL == pLogRoutSidePrtectData)
|
||||
if ((0u == checkSum) || (NULL == pDevId) || (NULL == pDevState))
|
||||
{
|
||||
/*区段数据错误*/
|
||||
reVal = CI_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
reVal = CI_SUCCESS;
|
||||
/*功能预留*/
|
||||
/*开始检查*/
|
||||
for (i = 0u; i < checkSum; i++)
|
||||
{
|
||||
devId = dataIdBuf[i];
|
||||
reVal = LogicSecSwitchLtrlDfncCheck(devId, pDevId, pDevState);
|
||||
if (CI_SUCCESS == reVal)
|
||||
{
|
||||
/* 通过检查*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*状态不一致返回故障状态*/
|
||||
reVal = CI_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*全部通过检查*/
|
||||
return reVal;
|
||||
}
|
||||
@@ -2791,7 +2800,7 @@ UINT8 KeepLogRouteSwitchCheck(UINT16 wLogRouteId, UINT8 functionId, UINT8 sendLe
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
checkResult = LogRouteCeFangSwitchCheck(wLogRouteId, functionId, sendLevel);
|
||||
checkResult = LogRouteCeFangSwitchCheck(wLogRouteId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -2799,7 +2808,8 @@ UINT8 KeepLogRouteSwitchCheck(UINT16 wLogRouteId, UINT8 functionId, UINT8 sendLe
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, devId, ETYPE_PS_NO_UT_CT_OCU_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
@@ -138,12 +138,12 @@ UINT8 LogRouteProSwitchFLockCheck(UINT16 const routeId, UINT16* pDevId, UINT8* p
|
||||
/*
|
||||
* 功能描述: 逻辑进路侧防条件满足检查
|
||||
* 参数说明: UINT16 routeId, 逻辑进路号
|
||||
* UINT8 functionId, 函数ID
|
||||
* UINT8 sendLevel 发送等级
|
||||
* UINT16 *pDevId, 设备Id(返回)
|
||||
* UINT8 *pDevState, 设备状态(返回)
|
||||
* 返回值 : CI_ERROR
|
||||
* CI_SUCCESS
|
||||
*/
|
||||
UINT8 LogRouteCeFangSwitchCheck(UINT16 const routeId, UINT8 functionId, UINT8 sendLevel);
|
||||
UINT8 LogRouteCeFangSwitchCheck(UINT16 const routeId, UINT16* pDevId, UINT8* pDevState);
|
||||
|
||||
/*
|
||||
* 功能描述: 逻辑进路区段全部联络线设备条件满足检查
|
||||
|
||||
@@ -28,47 +28,23 @@ UINT8 SetLTrainRouteP(const UINT16 routeId)
|
||||
/* 局部变量定义初始化 */
|
||||
UINT8 devState = 0U; /*设备状态*/
|
||||
UINT8 reResult = CI_ERROR; /*返回值*/
|
||||
UINT8 chRouteCouplinkFlag = 0U;
|
||||
UINT8 chRouteLevel = 0U;
|
||||
|
||||
/* 联锁条件检查 */
|
||||
chRouteCouplinkFlag = GetRouteCouplinkFlag(routeId); /*获取进路联挂标志*/
|
||||
chRouteLevel = GetRouteLevel(routeId); /*获取进路监督级别*/
|
||||
|
||||
devState = GetRouteState(routeId);
|
||||
if ((ROUTE_COUPLINK_FLAG_YES == chRouteCouplinkFlag) && (ROUTE_LEVEL_CBTC == chRouteLevel))
|
||||
/*进路状态空闲或初选或自动解锁异常(ARB且故障锁闭)*/
|
||||
if ((ROUTE_STATE_IDLE == devState) || (ROUTE_STATE_FIRST_XUANPAI == devState) || (ROUTE_STATE_AUTO_UNLOCKERR == devState))
|
||||
{
|
||||
/* 进路状态条件:进路状态空闲、进路初选、自动解锁正常、自动解锁异常(ARB)、初锁异常、预先锁闭、接近锁闭正常、接近锁闭异常都可以办理联挂进路 */
|
||||
if ((ROUTE_STATE_IDLE == devState) || (ROUTE_STATE_FIRST_XUANPAI == devState) || (ROUTE_STATE_FIRST_LOCKERR == devState)
|
||||
|| (ROUTE_STATE_YUXIAN_LOCK == devState) || (ROUTE_STATE_NEAR_LOCK == devState) || (ROUTE_STATE_NEAR_LOCKERR == devState)
|
||||
|| (ROUTE_STATE_AUTO_UNLOCK == devState) || (ROUTE_STATE_AUTO_UNLOCKERR == devState))
|
||||
{
|
||||
/* 返回成功 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_ROUTE_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
/* 返回成功 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*进路状态空闲或初选或自动解锁异常(ARB且故障锁闭)*/
|
||||
if ((ROUTE_STATE_IDLE == devState) || (ROUTE_STATE_FIRST_XUANPAI == devState) || (ROUTE_STATE_AUTO_UNLOCKERR == devState))
|
||||
{
|
||||
/* 返回成功 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_ROUTE_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_ROUTE_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
|
||||
|
||||
/*信号联锁条件检查*/
|
||||
/*if ((CI_SUCCESS == reResult) && (CI_ERROR == SetLTrainRouteSignalCheck(routeId,functionId,sendLevel)))*/
|
||||
@@ -242,7 +218,7 @@ UINT8 SetLeadRouteP(const UINT16 routeId)
|
||||
}
|
||||
|
||||
/*道岔联锁条件检查*/
|
||||
if ((CI_SUCCESS == reResult) && (CI_ERROR == SetLeadRouteSwitchCheck(routeId,functionId,sendLevel)))
|
||||
if ((CI_SUCCESS == reResult) && (CI_ERROR == SetLTrainRouteSwitchCheck(routeId,functionId,sendLevel)))
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
@@ -694,7 +670,7 @@ UINT8 LockLeadTrainRouteP(const UINT16 routeId)
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
chCheckResult = SetLeadRouteSwitchCheck(routeId, functionId, sendLevel);
|
||||
chCheckResult = SetLTrainRouteSwitchCheck(routeId, functionId, sendLevel);
|
||||
if (CI_ERROR == chCheckResult)
|
||||
{
|
||||
/* 失败返回 */
|
||||
@@ -1598,14 +1574,12 @@ UINT8 SetNonRouteP(UINT8 nonRouteId)
|
||||
reResult = NonRouteRelProSwiPosMovValCheck(nonRouteId,functionId,sendLevel);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*修复缺陷YF0083-2105---LYJ--20260128*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{/*侵限区段侵限条件不满足检查*/
|
||||
reResult = NonRouteIntruSecVainCheck(nonRouteId,functionId,sendLevel);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
return reResult;
|
||||
}
|
||||
@@ -1723,6 +1697,14 @@ UINT8 LockNonRouteP(UINT8 nonRouteId)
|
||||
|
||||
reResult = NonRouteRelProSwiPosMovValCheck(nonRouteId,functionId,sendLevel);
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{/*侵限区段侵限条件不满足检查*/
|
||||
reResult = NonRouteIntruSecVainCheck(nonRouteId,functionId,sendLevel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return reResult;
|
||||
}
|
||||
|
||||
@@ -2201,8 +2183,7 @@ UINT8 SetLTrainRouteSectionCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel
|
||||
|
||||
UINT16 devId = 0u; /*设备ID*/
|
||||
UINT8 devState = 0u; /*设备状态*/
|
||||
UINT8 chRouteCouplinkFlag = 0U;
|
||||
UINT8 chRouteLevel = 0U;
|
||||
|
||||
|
||||
/* 联锁逻辑检查 */
|
||||
/* 进路内所有区段未被封锁 */
|
||||
@@ -2227,17 +2208,7 @@ UINT8 SetLTrainRouteSectionCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
chRouteCouplinkFlag = GetRouteCouplinkFlag(routeId); /*获取进路联挂标志*/
|
||||
chRouteLevel = GetRouteLevel(routeId); /*获取进路监督级别*/
|
||||
if ((ROUTE_COUPLINK_FLAG_YES == chRouteCouplinkFlag) && (ROUTE_LEVEL_CBTC == chRouteLevel))
|
||||
{
|
||||
checkResult = SetCouplinkRouteSecOccCheck(routeId, &devId, &devState);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId, &devId, &devState);
|
||||
}
|
||||
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId,&devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -2245,17 +2216,8 @@ UINT8 SetLTrainRouteSectionCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel
|
||||
}
|
||||
else
|
||||
{
|
||||
if (0U == devId)
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_COUPLINK_ROUTE_IDLE, 0U, sendLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, devId, ETYPE_PS_MERGY_OCU_STATE, devState, sendLevel);
|
||||
}
|
||||
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_PHYSEC,devId,ETYPE_PS_MERGY_OCU_STATE,devState,sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
@@ -2408,12 +2370,11 @@ UINT8 SetLTrainRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLeve
|
||||
|
||||
}
|
||||
}
|
||||
/*场段进路不查侧防条件*/
|
||||
#if 0
|
||||
|
||||
/*进路侧防道岔条件检查*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
checkResult = RouteSideProtectConditionCheck(routeId, functionId, sendLevel);
|
||||
checkResult = RouteAllLtrlDfncSwitchCheck(routeId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -2421,7 +2382,8 @@ UINT8 SetLTrainRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLeve
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, devId, ETYPE_PS_NO_UT_CT_OCU_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
@@ -2431,7 +2393,6 @@ UINT8 SetLTrainRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLeve
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
@@ -2603,285 +2564,6 @@ UINT8 SetLTrainRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLeve
|
||||
return reResult;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:办理引导进路道岔联锁条件检查
|
||||
* 参数说明:UINT16 RouteId, 进路号
|
||||
* UINT8 functionId, 调用函数编号
|
||||
* UINT8 sendLevel, 故障码发送级别
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Created By LQ 2025.09.29
|
||||
*/
|
||||
UINT8 SetLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel)
|
||||
{
|
||||
/* 局部变量定义初始化 */
|
||||
UINT8 reResult = CI_ERROR; /*返回值*/
|
||||
UINT8 checkResult = CI_ERROR; /*检查结果*/
|
||||
UINT16 devId = 0U; /*设备ID*/
|
||||
UINT8 devState = 0U; /*设备状态*/
|
||||
UINT8 reResultP = CI_ERROR; /*道岔位置局部检查返回值*/
|
||||
UINT8 chConnetCheckFunc = 0U;
|
||||
|
||||
chConnetCheckFunc = GetCiFunctionSwitchConfig(FUNC_SETROUTE_CONNECT_CHECK); /*获取是否要检查联络线条件的开关*/
|
||||
|
||||
/*进路内所有道岔【未引导总锁】*/
|
||||
devId = 0U;
|
||||
devState = 0U;
|
||||
checkResult = RouteSwitchYLockCheck(routeId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_SWITCH, devId, ETYPE_SWT_YLOCK_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/*进路内所有道岔【未封锁】*/
|
||||
devId = 0U;
|
||||
devState = 0U;
|
||||
checkResult = RouteSwitchFLockCheck(routeId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_SWITCH, devId, ETYPE_SWT_FLOCK_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*继续执行*/
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/*进路防护道岔【未封锁】*/
|
||||
devId = 0U;
|
||||
devState = 0U;
|
||||
checkResult = RouteReltProtSwitchFLockCheck(routeId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_SWITCH, devId, ETYPE_SWT_FLOCK_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*进路侧防道岔条件检查*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
checkResult = RouteSideProtectConditionCheck(routeId, functionId, sendLevel);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
if (FUNC_SWITCH_ON == chConnetCheckFunc)
|
||||
{
|
||||
; /*开关打开,不检查联络线条件*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*进路联络线设备条件检查*/
|
||||
checkResult = RouteContactLineDevSwitchCheck(routeId, functionId, sendLevel);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/*进路内所有道岔位置正确或位置不正确但可动作*/
|
||||
devId = 0U;
|
||||
devState = 0U;
|
||||
checkResult = RouteSwitchPosAndMoveValidCheck(routeId, sendLevel);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = checkResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*继续执行*/
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
/*进路内所有道岔位置正确
|
||||
不正确:RETURN_LOCK_ERR_SWITPOS
|
||||
正确:CI_SUCCESS */
|
||||
devId = 0U;
|
||||
devState = 0U;
|
||||
checkResult = RouteAllSwitchPosCheck(routeId, &devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResult = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = RETURN_LOCK_ERR_SWITPOS;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*如果是进路内道岔等待相邻联锁反馈道岔检查状态,先不检查道岔是否全在位置,继续等待*/
|
||||
}
|
||||
|
||||
if ((CI_SUCCESS == reResult) || (RETURN_LOCK_ERR_SWITPOS == reResult))
|
||||
{
|
||||
/*进路关联防护道岔【未引导总锁】*/
|
||||
devId = 0U;
|
||||
devState = 0U;
|
||||
checkResult = RouteRelatedProSwitchYLockCheck(routeId, &devId, &devState);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResultP = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_SWITCH, devId, ETYPE_SWT_YLOCK_STATE, devState, sendLevel);
|
||||
/* 失败返回 */
|
||||
reResultP = CI_ERROR;
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResultP)
|
||||
{
|
||||
/*进路关联防护道岔位置正确或位置不正确但可动作*/
|
||||
devId = 0U;
|
||||
devState = 0U;
|
||||
checkResult = RouteRelProSwiPosAndMovValCheck(routeId, sendLevel);
|
||||
if (CI_SUCCESS == checkResult)
|
||||
{
|
||||
/* 能检查到防护道岔是否可动作,说明道岔全在本控区或相邻控区已反馈道岔检查状态 */
|
||||
/* 通过检查 */
|
||||
reResultP = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResultP = checkResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
reResultP = CI_ERROR;
|
||||
}
|
||||
|
||||
if (CI_SUCCESS == reResultP)
|
||||
{
|
||||
/*进路关联防护道岔位置正确*/
|
||||
devId = 0U;
|
||||
devState = 0U;
|
||||
checkResult = RouteRelatedProSwitchPosCheck(routeId, &devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
reResultP = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResultP = RETURN_LOCK_ERR_SWITPOS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*如果是进路防护道岔等待相邻联锁反馈道岔检查状态,先不检查防护道岔是否全在位置,继续等待*/
|
||||
}
|
||||
|
||||
if (CI_ERROR == reResultP)
|
||||
{/*如果防护道岔的检查结果为错误,则总的检查结果为错误*/
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
else if (CI_SUCCESS == reResultP)
|
||||
{
|
||||
/*如果防护道岔的检查结果为成功,则总的检查结果保持不变*/
|
||||
}
|
||||
else if (RETURN_LOCK_ERR_WAIT_SWCHECK == reResultP)
|
||||
{
|
||||
/*如果防护道岔的检查结果等待检查,则总的检查结果等待检查*/
|
||||
reResult = RETURN_LOCK_ERR_WAIT_SWCHECK;
|
||||
}
|
||||
else if (RETURN_LOCK_ERR_SWITPOS == reResultP)
|
||||
{/*如果防护道岔的检查结果为锁闭位置错误,则总的检查结果为锁闭位置错误*/
|
||||
reResult = RETURN_LOCK_ERR_SWITPOS;
|
||||
}
|
||||
else
|
||||
{/*其它不存在的情况,置总的结果为错误*/
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else if (RETURN_LOCK_ERR_WAIT_SWCHECK == reResult)
|
||||
{
|
||||
/*进路内道岔等待相邻联锁反馈道岔检查状态,先不检查防护道岔状态,继续等待*/
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
/* 返回结果 */
|
||||
return reResult;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 办理调车进路区段联锁条件检查
|
||||
* 参数说明:
|
||||
@@ -3210,8 +2892,7 @@ UINT8 LockLTrainRouteSectionCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLeve
|
||||
|
||||
UINT16 devId = 0u; /*设备ID*/
|
||||
UINT8 devState = 0u; /*设备状态*/
|
||||
UINT8 chRouteCouplinkFlag = 0U;
|
||||
UINT8 chRouteLevel = 0U;
|
||||
|
||||
|
||||
/* 联锁逻辑检查 */
|
||||
/* 进路内所有区段未被封锁 */
|
||||
@@ -3236,17 +2917,7 @@ UINT8 LockLTrainRouteSectionCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLeve
|
||||
{
|
||||
devId = 0u;
|
||||
devState = 0u;
|
||||
chRouteCouplinkFlag = GetRouteCouplinkFlag(routeId); /*获取进路联挂标志*/
|
||||
chRouteLevel = GetRouteLevel(routeId); /*获取进路监督级别*/
|
||||
if ((ROUTE_COUPLINK_FLAG_YES == chRouteCouplinkFlag) && (ROUTE_LEVEL_CBTC == chRouteLevel))
|
||||
{
|
||||
checkResult = SetCouplinkRouteSecOccCheck(routeId, &devId, &devState);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId, &devId, &devState);
|
||||
}
|
||||
|
||||
checkResult = RouteAllSecOccuClearCheck(routeId,&devId, &devState);
|
||||
if (checkResult == CI_SUCCESS)
|
||||
{
|
||||
/* 通过检查 */
|
||||
@@ -3254,17 +2925,8 @@ UINT8 LockLTrainRouteSectionCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLeve
|
||||
}
|
||||
else
|
||||
{
|
||||
if (0U == devId)
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_ROUTE, routeId, ETYPE_COUPLINK_ROUTE_IDLE, 0U, sendLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId, CI_DEVICE_TYPE_PHYSEC, devId, ETYPE_PS_MERGY_OCU_STATE, devState, sendLevel);
|
||||
}
|
||||
|
||||
/* 记录故障码 */
|
||||
SetErrorData(functionId,CI_DEVICE_TYPE_PHYSEC,devId,ETYPE_PS_MERGY_OCU_STATE,devState,sendLevel);
|
||||
/* 失败返回 */
|
||||
reResult = CI_ERROR;
|
||||
}
|
||||
@@ -4531,7 +4193,7 @@ UINT8 SetLeadRouteCheck(const UINT16 routeId)
|
||||
/*道岔联锁条件检查*/
|
||||
if (CI_SUCCESS == reResult)
|
||||
{
|
||||
reResult = SetLeadRouteSwitchCheck(routeId, functionId, sendLevel);
|
||||
reResult = SetLTrainRouteSwitchCheck(routeId, functionId, sendLevel);
|
||||
if (CI_ERROR == reResult)
|
||||
{
|
||||
/* 失败返回 */
|
||||
|
||||
@@ -266,17 +266,6 @@ UINT8 SetLTrainRouteSectionCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel
|
||||
*/
|
||||
UINT8 SetLTrainRouteSwitchCheck(UINT16 routeId,UINT8 functionId,UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述:办理引导进路道岔联锁条件检查
|
||||
* 参数说明:UINT16 RouteId, 进路号
|
||||
* UINT8 functionId, 调用函数编号
|
||||
* UINT8 sendLevel, 故障码发送级别
|
||||
* 返 回 值:CI_ERROR 0 失败
|
||||
* CI_SUCCESS 1 成功
|
||||
* Created By LQ 2025.09.29
|
||||
*/
|
||||
UINT8 SetLeadRouteSwitchCheck(UINT16 routeId, UINT8 functionId, UINT8 sendLevel);
|
||||
|
||||
/*
|
||||
* 功能描述: 办理调车进路区段联锁条件检查
|
||||
* 参数说明:
|
||||
|
||||
@@ -46,7 +46,6 @@ UINT8 MainProcess(void)
|
||||
UINT8 retVal = CI_SUCCESS;
|
||||
UINT8 localCiType = GetLocalCiType();
|
||||
UINT16* pTiocFsVersion = NULL;
|
||||
UINT8 cControlState = 0U; /*主备用状态*/
|
||||
unsigned long long cost[20] = {0U};
|
||||
|
||||
#ifdef LOGPRINT
|
||||
@@ -103,10 +102,6 @@ UINT8 MainProcess(void)
|
||||
#endif/*2OO2平台标志结束*/
|
||||
}
|
||||
|
||||
/*更新当前系统升主起始周期号*/
|
||||
UpdateSystemMainUseCyc();
|
||||
debug_infor_printf((const)"\n\nSystemMainUseCyc: %d\n", gSystemUpdateMainUseCycNum);/*系统切换主用起始周期号*/
|
||||
|
||||
#endif/*打印标志结束*/
|
||||
|
||||
cost[0] = MSCP_GetTick();
|
||||
@@ -149,21 +144,6 @@ UINT8 MainProcess(void)
|
||||
/*清除上周期故障码*/
|
||||
ClearErrorData();
|
||||
|
||||
cControlState = GetLocalCiBackUpPattern();
|
||||
|
||||
if (SYSTEM_WORK_MODE_UNAVAILABLE == cControlState)
|
||||
{
|
||||
#if 0
|
||||
/*系统不可用时,周期重置设备状态*/
|
||||
ResetDevStateProcess();
|
||||
debug_infor_printf((const)"\nMainProcess: ControlState[%d], ResetDevStateProcess\n", cControlState);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
cost[6] = MSCP_GetTick();
|
||||
debug_infor_printf((const)"\n Parse :%dms InputData:%dms MainProcess:%dms Output:%dms PackOut:%dms SendLog:%dms \n", (cost[1] - cost[0]) / 1000, (cost[2] - cost[1]) / 1000, (cost[3] - cost[2]) / 1000, (cost[4] - cost[3]) / 1000, (cost[5] - cost[4]) / 1000, (cost[6] - cost[5]) / 1000);
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ UINT16 GetMaskId(const UINT8 SendsystemType, const UINT8 RecvsystemType, const U
|
||||
{
|
||||
UINT16 returnValue = 0u;/*·µ»ØÖµ*/
|
||||
|
||||
if (SendsystemType == CI_SYSTEM_TYPE_RCI)
|
||||
if (SendsystemType == CI_SYSTEM_TYPE_CI)
|
||||
{
|
||||
switch (RecvsystemType)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ UINT16 GetMaskId(const UINT8 SendsystemType, const UINT8 RecvsystemType, const U
|
||||
}
|
||||
else if (SendsystemType == CI_SYSTEM_TYPE_ZC)
|
||||
{
|
||||
if (CI_SYSTEM_TYPE_RCI == RecvsystemType)
|
||||
if (CI_SYSTEM_TYPE_CI == RecvsystemType)
|
||||
{
|
||||
returnValue = ZcToCiMaskConfigDataStru[Index].MaskId;
|
||||
}
|
||||
@@ -345,7 +345,7 @@ UINT16 GetMaskIndex(const UINT8 SendsystemType, const UINT8 RecvsystemType, cons
|
||||
|
||||
|
||||
|
||||
if (SendsystemType == CI_SYSTEM_TYPE_RCI)
|
||||
if (SendsystemType == CI_SYSTEM_TYPE_CI)
|
||||
{
|
||||
switch (RecvsystemType)
|
||||
{
|
||||
@@ -390,7 +390,7 @@ UINT16 GetMaskIndex(const UINT8 SendsystemType, const UINT8 RecvsystemType, cons
|
||||
}
|
||||
else if (SendsystemType == CI_SYSTEM_TYPE_ZC)
|
||||
{
|
||||
if (CI_SYSTEM_TYPE_RCI == RecvsystemType)
|
||||
if (CI_SYSTEM_TYPE_CI == RecvsystemType)
|
||||
{
|
||||
for (ii = 1u; ii <= ZcToCiMaskCurSum; ii++)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
#define MASK_TYPE_SWITCH_OPEN_CAP ((UINT8)0x0E) /*定义道岔所在板卡开盖状态*/
|
||||
#define MASK_TYPE_SWITCH_SUDDEN_JICHA ((UINT8)0x0F) /*定义道岔静态红闪码位*/
|
||||
#define MASK_TYPE_SWITCH_JICHA ((UINT8)0x10) /*定义道岔挤岔码位:28.0.0.14数据结构使用*/
|
||||
#define MASK_TYPE_SWITCH_QINGXIAN ((UINT8)0x11) /*定义道岔侵限状态码位*/
|
||||
|
||||
/*单轨_道岔码位*/
|
||||
/* zt 删除单轨相关代码 2022-02-15 */
|
||||
@@ -118,8 +117,6 @@
|
||||
#define MASK_TYPE_PHYSECTION_HEAD_XTD ((UINT8)0x31) /*定义物理区段运行方向下行状态码位*/
|
||||
#define MASK_TYPE_PHYSECTION_HEAD_STD ((UINT8)0x32) /*定义物理区段运行方向上行状态码位*/
|
||||
#define MASK_TYPE_LIECHE_STOPSTATE ((UINT8)0x3a) /*定义列车停稳信息状态码位*/
|
||||
#define MASK_TYPE_PHYSECTION_INTRUSION ((UINT8)0x5a) /*定义物理区段侵限状态码位(CI->ZC)*/
|
||||
#define MASK_TYPE_PHYSECTION_ATS_FLOCK ((UINT8)0x5b) /*定义物理区段由ATS封锁状态码位(CI->ZC)*/
|
||||
#define MASK_TYPE_PHYSEC_CENTERDETAIN_UP ((UINT8)0x3d) /*定义物理区段CI-ATS中心上行扣车状态状态码位 (兼容28.0.0.14使用)*/
|
||||
#define MASK_TYPE_PHYSEC_CENTERDETAIN_DOWN ((UINT8)0x3e) /*定义物理区段CI-ATS中心下行扣车状态状态码位 (兼容28.0.0.14使用)*/
|
||||
#define MASK_TYPE_PHYSEC_STATIONDETAIN_UP ((UINT8)0x3f) /*定义物理区段CI-ATS车站上行扣车状态状态码位 (兼容28.0.0.14使用)*/
|
||||
@@ -141,10 +138,9 @@
|
||||
#define MASK_TYPE_DOWNWARD_DIRECTION ((UINT8)0x94) /*定义逻辑区段下行锁闭码位*/
|
||||
#define MASK_TYPE_LOGICSECTION_PROTECTLOCK ((UINT8)0x99) /*定义逻辑区段防护锁闭码位*/
|
||||
#define MASK_TYPE_LOGICSECTION_JUMPLOCK ((UINT8)0x9A) /*定义逻辑区段跳跃锁闭码位*/
|
||||
#define MASK_TYPE_LOGSEC_CBTC_ARB ((UINT8)0x9B) /*定义逻辑区段CBTC_ARB状态码位*/
|
||||
#define MASK_TYPE_LOGICSECTION_ARB ((UINT8)0x9B) /*定义逻辑区段ARB状态码位*/
|
||||
#define MASK_TYPE_LOGICSECTION_SPKS_FLOCK ((UINT8)0x9C) /*定义逻辑区段SPKS封锁状态码位*/
|
||||
#define MASK_TYPE_LOGICSECTION_EMERG_XIANSU ((UINT8)0x9D) /*定义逻辑区段紧急临时限速码位*/
|
||||
#define MASK_TYPE_LOGSEC_PB_TACS_ARB ((UINT8)0xB3) /*定义逻辑区段PB_TACS_ARB状态码位*/
|
||||
|
||||
|
||||
|
||||
/*保护区段相关码位*/
|
||||
@@ -171,8 +167,6 @@
|
||||
#define MASK_TYPE_ROUTE_DC_AGREE ((UINT8)0x52) /*定义进路调车同意状态码位(CI-ATS)*/
|
||||
#define MASK_TYPE_ROUTE_AUTO_TRIGGER ((UINT8)0x53) /*定义进路自动触发标码位(CI-ATS)*/
|
||||
#define MASK_TYPE_ROUTE_DC_AGREE_ERR ((UINT8)0x54) /*定义进路调车同意按钮故障状态码位(CI-ATS)*/
|
||||
#define MASK_TYPE_ROUTE_COUPLIN_SUCCESS ((UINT8)0xA8) /*定义进路联挂成功码位(ZC-CI)*/
|
||||
#define MASK_TYPE_ROUTE_COUPLIN_ERROR ((UINT8)0xA9) /*定义进路联挂失败码位(ZC-CI)*/
|
||||
|
||||
|
||||
/*站台相关码位*/
|
||||
@@ -187,9 +181,7 @@
|
||||
#define MASK_TYPE_CANCEL_ESP_FAULT ((UINT8)0x9c) /*定义取消紧急关闭按钮故障码位*/
|
||||
#define MASK_TYPE_ESP_FAULT ((UINT8)0x9d) /*定义紧急关闭按钮故障码位*/
|
||||
#define MASK_TYPE_CUT_ESP_FAULT ((UINT8)0xA3) /*定义紧急关闭旁路按钮故障码位*/
|
||||
#define MASK_TYPE_CUT_ESP_STATE ((UINT8)0xA4) /*定义紧急关闭旁路按钮激活状态码位*/
|
||||
#define MASK_TYPE_ONEPLAT_ESP_STATE ((UINT8)0xAB) /*定义紧急关闭按钮同站紧急按钮激活状态码位*/
|
||||
#define MASK_TYPE_ONEPLAT_CUT_ESP_STATE ((UINT8)0xAC) /*定义紧急关闭按钮同站旁路按钮激活状态码位*/
|
||||
#define MASK_TYPE_ESP_PRESS_STATE ((UINT8)0xA4) /*定义紧急关闭按钮按下状态码位*/
|
||||
|
||||
/*站台安全门相关码位*/
|
||||
#define MASK_TYPE_PSD_STATE ((UINT8)0x60) /*定义站台安全门状态码位-ZC,LEU用*/
|
||||
@@ -207,11 +199,8 @@
|
||||
#define MASK_TYPE_PSD_PDB_FLASH_STATE ((UINT8)0xA0) /*定义清客确认箱PDB按钮指示灯闪灯状态码位*/
|
||||
#define MASK_TYPE_PSD_VIDEO_QK_LU ((UINT8)0xA1) /*定义清客按钮箱视频清客表示灯(绿)状态码位*/
|
||||
#define MASK_TYPE_PSD_VIDEO_QK_HONG ((UINT8)0xA2) /*定义清客按钮箱视频清客表示灯(红)状态码位*/
|
||||
#define MASK_TYPE_PSD_EXCEPT ((UINT8)0xA5) /*定义站台安全门异常码位 CI-ATS、CI-ZC*/
|
||||
#define MASK_TYPE_PSD_JXTCPANGLU_FAULT ((UINT8)0xAA) /*定义间隙探测旁路按钮故障码位*/
|
||||
#define MASK_TYPE_PSD_IBP_STATE ((UINT8)0xAD) /*定义IBP盘按钮状态码位*/
|
||||
#define MASK_TYPE_PSD_IBP_FAULT ((UINT8)0xAE) /*定义IBP盘按钮故障码位*/
|
||||
#define MASK_TYPE_PSD_JXTC_STATE ((UINT8)0xAF) /*定义间隙探测状态码位*/
|
||||
#define MASK_TYPE_PSD_EXCEPT_OPEN ((UINT8)0xA5) /*定义站台安全门异常打开码位*/
|
||||
|
||||
/*车库门相关码位*/
|
||||
#define MASK_TYPE_GARAGEDOOR_OPEN_STATE ((UINT8)0x62) /*定义车库门开门状态码位(CI->ATS)*/
|
||||
#define MASK_TYPE_GARAGEDOOR_CLOSE_STATE ((UINT8)0x63) /*定义车库门关门状态码位(CI->ATS)*/
|
||||
@@ -243,10 +232,6 @@
|
||||
/*洗车机相关码位*/
|
||||
#define MASK_TYPE_WASHMACHINE_READYSTATE ((UINT8)0x74) /*定义洗车机就绪状态码位*/
|
||||
#define MASK_TYPE_WASHMACHINE_WORKMODE ((UINT8)0x9E) /*定义洗车机工作模式码位*/
|
||||
#define MASK_TYPE_WASHMACHINE_ZNTBUTTN ((UINT8)0x9F) /*定义CI-ATS洗车机降级模式洗车线洗车同意按钮粘连码位,0有粘连,1为无粘连*/
|
||||
#define MASK_TYPE_DCCWASHACHINE_ZNTBUTTN ((UINT8)0xb0) /*定义CI-ATS洗车机降级模式DCC洗车同意按钮粘连码位,0有粘连,1为无粘连*/
|
||||
#define MASK_TYPE_PASSWASHMACHINE_ZNTBUTTN ((UINT8)0xb1) /*定义CI-ATS洗车机降级模式洗车线洗车反向通过同意按钮粘连码位,0有粘连,1为无粘连*/
|
||||
#define MASK_TYPE_DCCPASSWASHMACHINE_ZNTBUTTN ((UINT8)0xb2) /*定义CI-ATS洗车机降级模式DCC洗车反向通过同意按钮粘连码位,0有粘连,1为无粘连*/
|
||||
|
||||
/*防淹门相关码位*/
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
|
||||
|
||||
NonAutoReturnDataStruct NonReturnDataStru[NON_AUTO_RETURN_SUM_MAX]; /*无人自动折返动态结构体*/
|
||||
NonAutoReturnDataStructCC NonReturnDataStruCC[NON_AUTO_RETURN_SUM_MAX]; /*无人自动折返动态结构体-车车*/
|
||||
NonAutoReturnDataStruct NonReturnDataStru[NON_AUTO_RETURN_SUM_MAX]; /*无人自动折返动态结构体*/
|
||||
|
||||
/*
|
||||
* 功能描述: 获取无人折返数据结构体指针
|
||||
@@ -29,16 +28,6 @@ NonAutoReturnDataStruct* GetNonReturnData(void)
|
||||
return NonReturnDataStru;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取无人折返数据结构体指针-车车
|
||||
* 参数说明:
|
||||
* 返回值 :
|
||||
NonAutoReturnDataStruct *
|
||||
*/
|
||||
NonAutoReturnDataStruct* GetNonReturnDataCC(void)
|
||||
{
|
||||
return NonReturnDataStruCC;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID无人自动折返按钮命令列车ID
|
||||
* 参数说明: const UINT16 autoReturnId, 自动折返ID
|
||||
@@ -52,7 +41,7 @@ UINT16 GetNonRtnCmdSetTrainId(const UINT16 nonReturnId)
|
||||
bufIndex = GetNonReturnBufIndex(nonReturnId);
|
||||
if (bufIndex < NON_AUTO_RETURN_SUM_MAX)
|
||||
{
|
||||
trainId = NonReturnDataStruCC[bufIndex].cmdSetTrainId;
|
||||
trainId = NonReturnDataStru[bufIndex].cmdSetTrainId;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -75,7 +64,7 @@ void SetNonRtnCmdSetTrainId(const UINT16 nonReturnId,const UINT16 trainId)
|
||||
if (bufIndex < NON_AUTO_RETURN_SUM_MAX)
|
||||
{
|
||||
|
||||
NonReturnDataStruCC[bufIndex].cmdSetTrainId = trainId;
|
||||
NonReturnDataStru[bufIndex].cmdSetTrainId = trainId;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -35,21 +35,15 @@ typedef struct S_RtnRelayAdhesionStruct
|
||||
/*无人自动自动折返数据结构体*/
|
||||
typedef struct S_NonAutoReturnDataStruct
|
||||
{
|
||||
UINT16 cmdSetTrainId; /*命令列车ID (动态字段)*/
|
||||
UINT8 IndicatorDevID; /*指示灯设备ID*/
|
||||
UINT8 VobcToCIAutoRtnIndicFlashState; /*车载给联锁的无人折返指示灯闪灯状态*/
|
||||
UINT8 VobcToCIAutoRtnIndicSteadyState; /*车载给联锁的无人折返指示灯稳灯状态*/
|
||||
RtnRelayAdhesionStruct RtnRelayAdhesionState; /*无人折返继电器粘连状态*/
|
||||
} NonAutoReturnDataStruct;
|
||||
|
||||
/*无人自动自动折返数据结构体-车车*/
|
||||
typedef struct S_NonAutoReturnDataStructCC
|
||||
{
|
||||
UINT8 IndicatorDevID; /*指示灯设备ID*/
|
||||
UINT16 cmdSetTrainId; /*命令列车ID (动态字段)*/
|
||||
} NonAutoReturnDataStructCC;
|
||||
|
||||
extern NonAutoReturnDataStruct NonReturnDataStru[NON_AUTO_RETURN_SUM_MAX]; /*无人自动折返动态结构体*/
|
||||
extern NonAutoReturnDataStructCC NonReturnDataStruCC[NON_AUTO_RETURN_SUM_MAX]; /*无人自动折返动态结构体-车车*/
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID无人自动折返按钮命令列车ID
|
||||
* 参数说明: const UINT16 autoReturnId, 自动折返ID
|
||||
@@ -57,13 +51,6 @@ extern NonAutoReturnDataStructCC NonReturnDataStruCC[NON_AUTO_RETURN_SUM_MAX];
|
||||
* >0: 无人自动折返按钮指示灯继电器ID
|
||||
*/
|
||||
UINT16 GetNonRtnCmdSetTrainId(const UINT16 nonReturnId);
|
||||
/*
|
||||
* 功能描述: 获取无人折返数据结构体指针-车车
|
||||
* 参数说明:
|
||||
* 返回值 :
|
||||
NonAutoReturnDataStruct *
|
||||
*/
|
||||
NonAutoReturnDataStruct* GetNonReturnDataCC(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取无人折返数据结构体指针
|
||||
|
||||
@@ -365,24 +365,6 @@ UINT16 GetSCXColAgreeTryRelayIdById(UINT8 nonRouteId)
|
||||
return collAgreeTryTrainRelayId;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试车线采集的轨旁试车指示器继电器ID
|
||||
* 参数说明: UINT8 nonRouteId 非进路id
|
||||
* 返回值 : 试车线采集的轨旁试车指示器继电器ID
|
||||
*/
|
||||
UINT16 GetWaysideTryTrainIndRelayId(UINT8 nonRouteId)
|
||||
{
|
||||
UINT16 collAgreeTryTrainRelayId = 0u;
|
||||
|
||||
NonRouteConfigDataStruct* pNonRouteConfig = GetNonRouteConfigDataPtrById(nonRouteId);
|
||||
if (pNonRouteConfig != NULL)
|
||||
{
|
||||
collAgreeTryTrainRelayId = pNonRouteConfig->ColWaysideTryTrainIndRelayId; /* 试车线采集的轨旁试车指示器继电器ID */
|
||||
}
|
||||
|
||||
return collAgreeTryTrainRelayId;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:根据道岔id查找对应的非进路
|
||||
* 参数说明:swId-道岔id
|
||||
|
||||
@@ -82,7 +82,6 @@ typedef struct S_NonRouteConfigDataStruct
|
||||
UINT16 AgreeTryTrainRelayId; /*同意试车继电器ID (配置字段)*/
|
||||
UINT16 DrvApplyTryTrainRelayId; /* 试车线驱动的申请试车继电器ID */
|
||||
UINT16 ColAgreeTryTrainRelayId; /* 试车线采集的同意试车继电器ID */
|
||||
UINT16 ColWaysideTryTrainIndRelayId; /* 试车线采集的轨旁试车指示器继电器ID */
|
||||
} NonRouteConfigDataStruct;
|
||||
|
||||
/*******************************全局变量声明*******************************/
|
||||
@@ -269,14 +268,6 @@ UINT8 GetnonRouteIdbelongVirCIid(UINT8 nonRouteId);
|
||||
*/
|
||||
UINT8 GetnonRouteIdbelongCIid(UINT8 nonRouteId);
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 获取试车线采集的轨旁试车指示器继电器ID
|
||||
* 参数说明: UINT8 nonRouteId 非进路id
|
||||
* 返回值 : 试车线采集的轨旁试车指示器继电器ID
|
||||
*/
|
||||
UINT16 GetWaysideTryTrainIndRelayId(UINT8 nonRouteId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
/*·Ç½øÂ·µ÷³µ×´Ì¬*/
|
||||
#define NONROUTE_STATE_INVALID ((UINT8)0x0) /*·Ç½øÂ·×´Ì¬ÎÞЧ*/
|
||||
#define NONROUTE_STATE_INVALID ((UINT8)0x0) /*·Ç½øÂ·×´Ì¬ÎÞЧ*/
|
||||
#define NONROUTE_STATE_IDLE ((UINT8)0x01) /*·Ç½øÂ·¿ÕÏÐ*/
|
||||
#define NONROUTE_STATE_XUANPAI ((UINT8)0x02) /*·Ç½øÂ·Ñ¡ÅÅ*/
|
||||
#define NONROUTE_STATE_LOCK ((UINT8)0x04) /*·Ç½øÂ·Ëø±Õ*/
|
||||
|
||||
@@ -922,73 +922,4 @@ UINT16 GetOverlapThatZhaoChaRelayId(const UINT16 overlapId)
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定保护区段侧防条件
|
||||
* 参数说明: const UINT16 wRouteId, 进路ID
|
||||
* 返回值 : 返回侧防条件数据
|
||||
*/
|
||||
SideProtecGroupStru GetOverlapSideProtecGroupData(const UINT16 wOverlapId)
|
||||
{
|
||||
SideProtecGroupStru cRetVal = { 0u };
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetOverlapConfigBufIndex(wOverlapId); /*获取数组下标*/
|
||||
|
||||
if (OVERLAP_SUM_MAX > bufIndex)
|
||||
{
|
||||
cRetVal = OverlapConfigDataStru[bufIndex].SideProtecGroupData;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*无处理*/
|
||||
}
|
||||
|
||||
return cRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取保护区段指定道岔的防护锁闭位置
|
||||
* 参数说明: const UINT16 wOverlapId, 保护区段ID
|
||||
* const UINT16 wSwitchId 道岔ID
|
||||
*
|
||||
* 返回值 :1,2为道岔位置,0u 非法值
|
||||
*
|
||||
*/
|
||||
UINT8 GetOverlapThisPortecSwitchPos(const UINT16 wOverlapId, const UINT16 wSwitchId)
|
||||
{
|
||||
UINT8 chRetVal = 0U;
|
||||
UINT16 bufIndex = 0U;
|
||||
UINT8 i = 0u;
|
||||
|
||||
bufIndex = GetOverlapConfigBufIndex(wOverlapId); /*获取保护区段数组下标*/
|
||||
|
||||
if (OVERLAP_SUM_MAX > bufIndex)
|
||||
{
|
||||
for (i = 0u; i < OverlapConfigDataStru[bufIndex].ProtectSwitchSum; i++)
|
||||
{
|
||||
if (OverlapConfigDataStru[bufIndex].ProtectSwitchStru[i].ProtectSwitchId == wSwitchId)
|
||||
{
|
||||
chRetVal = OverlapConfigDataStru[bufIndex].ProtectSwitchStru[i].ProtectPosition;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
|
||||
if ((SWITCH_POSITION_DINGWEI == chRetVal) || (SWITCH_POSITION_FANWEI == chRetVal))
|
||||
{
|
||||
/*校验通过*/
|
||||
}
|
||||
else
|
||||
{
|
||||
chRetVal = 0u;
|
||||
}
|
||||
|
||||
return chRetVal;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "CommonTypes.h"
|
||||
#include "../System/CiSystemDefine.h"
|
||||
#include "../System/SystemParameterManage.h"
|
||||
#include "RouteConfigDataManage.h"
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -74,7 +74,6 @@ typedef struct S_OverlapConfigDataStruct
|
||||
UINT16 AxisSecFarId; /*保护区段最远端计轴区段ID*/
|
||||
UINT16 wOverlapThisZhaoChaRelayId; /*保护区段本端照查继电器ID*/
|
||||
UINT16 wOverlapThatZhaoChaRelayId; /*保护区段对端照查继电器ID*/
|
||||
SideProtecGroupStru SideProtecGroupData; /*保护区段侧防条件*/
|
||||
} OverlapConfigDataStruct;
|
||||
|
||||
extern OverlapConfigDataStruct OverlapConfigDataStru[OVERLAP_SUM_MAX]; /*定义OVERLAP数据配置结构体,cgh-合并CID-2539-1:此处声明不进行初始化,统一放到InitAllStaticDataStr函数中进行初始化,为解决生成内核过大得问题*/
|
||||
@@ -390,21 +389,7 @@ UINT16 GetOverlapThisZhaoChaRelayId(const UINT16 overlapId);
|
||||
* by cgh 20250617
|
||||
*/
|
||||
UINT16 GetOverlapThatZhaoChaRelayId(const UINT16 overlapId);
|
||||
/*
|
||||
* 功能描述: 获取指定保护区段侧防条件
|
||||
* 参数说明: const UINT16 wRouteId, 进路ID
|
||||
* 返回值 : 返回侧防条件数据
|
||||
*/
|
||||
SideProtecGroupStru GetOverlapSideProtecGroupData(const UINT16 wOverlapId);
|
||||
/*
|
||||
* 功能描述: 获取保护区段指定道岔的防护锁闭位置
|
||||
* 参数说明: const UINT16 wOverlapId, 保护区段ID
|
||||
* const UINT16 wSwitchId 道岔ID
|
||||
*
|
||||
* 返回值 :1,2为道岔位置,0u 非法值
|
||||
*
|
||||
*/
|
||||
UINT8 GetOverlapThisPortecSwitchPos(const UINT16 wOverlapId, const UINT16 wSwitchId);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
|
||||
|
||||
OverlapDataStruct OverlapDataStru[OVERLAP_SUM_MAX]; /*定义OVERLAP数据结构体*/
|
||||
OverlapDataStructCC OverlapDataStruCC[OVERLAP_SUM_MAX]; /*定义OVERLAP数据结构体-车车*/
|
||||
OverlapDataStruct OverlapDataStru[OVERLAP_SUM_MAX]; /*定义OVERLAP数据结构体*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ -28,16 +28,7 @@ OverlapDataStruct *GetOverlapData(void)
|
||||
{
|
||||
return OverlapDataStru;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段数据-车车
|
||||
* 参数说明:
|
||||
* 返回值 :
|
||||
OverlapDataStructCC *
|
||||
*/
|
||||
OverlapDataStructCC* GetOverlapDataCC(void)
|
||||
{
|
||||
return OverlapDataStruCC;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段所属进路ID
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
@@ -91,13 +82,11 @@ void SetOverlapRelateProtSwLockSta(const UINT16 overlapId, const UINT8 lockComma
|
||||
UINT16 protectSwitchId = 0u; /*防护道岔ID*/
|
||||
UINT8 overlapProtectSwitchSum = 0u; /*防护道岔数目*/
|
||||
OverlapProtectSwitchStruct* overlapProtectSwitchStru = NULL; /*防护道岔数据*/
|
||||
UINT8 cSwitchCurPos = 0U;
|
||||
UINT8 cFuncRet = CI_ERROR;
|
||||
|
||||
overlapProtectSwitchSum = GetOverlapRelatedProtSwitSum(overlapId); /*获取防护道岔数目*/
|
||||
overlapProtectSwitchStru = GetOverlapRelatedProtSwitStru(overlapId); /*获取防护道岔数据*/
|
||||
|
||||
if ((0U == overlapProtectSwitchSum) || (NULL == overlapProtectSwitchStru))
|
||||
if (0u == overlapProtectSwitchSum)
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
@@ -118,27 +107,17 @@ void SetOverlapRelateProtSwLockSta(const UINT16 overlapId, const UINT8 lockComma
|
||||
for (ii= 0u; ii < overlapProtectSwitchSum; ii++)
|
||||
{
|
||||
protectSwitchId = overlapProtectSwitchStru[ii].ProtectSwitchId;
|
||||
cSwitchCurPos = GetSwitchCurPosition(protectSwitchId);
|
||||
cFuncRet = checkSwtLastValDrvPosStayorNot(protectSwitchId, overlapProtectSwitchStru[ii].ProtectPosition);
|
||||
if ((SWITCH_LOCK_PROTECT_CANCEL == lockCommand)
|
||||
|| ((SWITCH_LOCK_PROTECT_SET == lockCommand) && (cSwitchCurPos == overlapProtectSwitchStru[ii].ProtectPosition) && (CI_SUCCESS == cFuncRet)))
|
||||
{
|
||||
SetSwitchLockStatus(SWITCH_PLOCKTYPE_OVERLAP, overlapId, protectSwitchId, lockCommand); /*设置道岔防护锁闭状态*/
|
||||
/*RC 13.0.0 修:不检查防护道岔中双动道岔另一端*/
|
||||
SetSwitchLockStatus(SWITCH_PLOCKTYPE_OVERLAP,overlapId,protectSwitchId, lockCommand); /*设置道岔防护锁闭状态*/
|
||||
/*RC 13.0.0 修:不检查防护道岔中双动道岔另一端*/
|
||||
#if 0
|
||||
if (SWITCH_TYPE_DOUBLE == GetSwitchType(protectSwitchId))
|
||||
{ /*双动道岔*/
|
||||
SetSwitchLockStatus(SWITCH_PLOCKTYPE_OVERLAP, overlapId, GetDSwitchOtherId(protectSwitchId), lockCommand); /*设置道岔防护锁 闭状态*/
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
#endif
|
||||
if (SWITCH_TYPE_DOUBLE == GetSwitchType(protectSwitchId))
|
||||
{ /*双动道岔*/
|
||||
SetSwitchLockStatus(SWITCH_PLOCKTYPE_OVERLAP,overlapId,GetDSwitchOtherId(protectSwitchId), lockCommand); /*设置道岔防护锁 闭状态*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*防护道岔不在防护位置或防护道岔存在反向驱动时,不设置防护锁闭*/
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -286,7 +265,7 @@ void SetOverlapUnlockApplyFlag(const UINT16 overlapId, const UINT8 overlapUnlock
|
||||
* 功能描述:获取指定ID保护区段申请解锁的列车ID
|
||||
* 参数说明:const UINT16 overlapId, 保护区段ID
|
||||
* 返回值 :0 获取失败
|
||||
* 其它 列车ID(不带0x10)
|
||||
* 其它 列车ID(不带0x14)
|
||||
*/
|
||||
UINT16 GetOverlapUnlockApplyTrainId(const UINT16 overlapId)
|
||||
{
|
||||
@@ -297,7 +276,7 @@ UINT16 GetOverlapUnlockApplyTrainId(const UINT16 overlapId)
|
||||
|
||||
if (bufIndex < OVERLAP_SUM_MAX)
|
||||
{
|
||||
reVal = OverlapDataStruCC[bufIndex].wOverlapUnlockApplyTrainId;
|
||||
reVal = OverlapDataStru[bufIndex].wOverlapUnlockApplyTrainId;
|
||||
}
|
||||
return reVal;
|
||||
}
|
||||
@@ -306,7 +285,7 @@ UINT16 GetOverlapUnlockApplyTrainId(const UINT16 overlapId)
|
||||
/*
|
||||
* 功能描述: 设置指定ID保护区段申请解锁的列车ID
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* const UINT16 wTrainId,列车ID(不带0x10)
|
||||
* const UINT16 wTrainId,列车ID(不带0x14)
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
@@ -318,7 +297,7 @@ void SetOverlapUnlockApplyTrainId(const UINT16 overlapId, const UINT16 wTrainId)
|
||||
|
||||
if (bufIndex < OVERLAP_SUM_MAX)
|
||||
{
|
||||
OverlapDataStruCC[bufIndex].wOverlapUnlockApplyTrainId = wTrainId;
|
||||
OverlapDataStru[bufIndex].wOverlapUnlockApplyTrainId = wTrainId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -643,7 +622,7 @@ void SetReqIvocUnlockStartCycNum(const UINT16 overlapId, const UINT32 reqIvocUnl
|
||||
|
||||
if (bufIndex < OVERLAP_SUM_MAX)
|
||||
{
|
||||
OverlapDataStruCC[bufIndex].dwReqIvocUnLockStartCycNum = reqIvocUnlockStartCycNum; /*人工解锁起始周期号*/
|
||||
OverlapDataStru[bufIndex].dwReqIvocUnLockStartCycNum = reqIvocUnlockStartCycNum; /*人工解锁起始周期号*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -662,7 +641,7 @@ UINT32 GetReqIvocUnlockStartCycNum(const UINT16 overlapId)
|
||||
|
||||
if (bufIndex < OVERLAP_SUM_MAX)
|
||||
{
|
||||
reVal = OverlapDataStruCC[bufIndex].dwReqIvocUnLockStartCycNum; /*人工解锁起始周期号*/
|
||||
reVal = OverlapDataStru[bufIndex].dwReqIvocUnLockStartCycNum; /*人工解锁起始周期号*/
|
||||
}
|
||||
return reVal;
|
||||
}
|
||||
@@ -682,7 +661,7 @@ void SetOverlapIvocAllowUnlockFlag(const UINT16 overlapId, const UINT8 overlapIv
|
||||
|
||||
if ((bufIndex < OVERLAP_SUM_MAX) && ((IVOC_ALLOW_UNLOCK_OVERLAP_YES == overlapIvocUnlockFlag) || (IVOC_ALLOW_UNLOCK_OVERLAP_NO == overlapIvocUnlockFlag)))
|
||||
{
|
||||
OverlapDataStruCC[bufIndex].cIvocAllowUnlockFlag = overlapIvocUnlockFlag;
|
||||
OverlapDataStru[bufIndex].cIvocAllowUnlockFlag = overlapIvocUnlockFlag;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -706,7 +685,7 @@ UINT8 GetOverlapIvocAllowUnlockFlag(const UINT16 overlapId)
|
||||
|
||||
if (bufIndex < OVERLAP_SUM_MAX)
|
||||
{
|
||||
reVal = OverlapDataStruCC[bufIndex].cIvocAllowUnlockFlag;
|
||||
reVal = OverlapDataStru[bufIndex].cIvocAllowUnlockFlag;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -842,13 +821,13 @@ UINT8 GetOverlapFromSetRouteCmdFlag(const UINT16 overlapId)
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 清除保护区段个别标志
|
||||
* 功能描述: 清保护区段人工或ATS锁闭命令标志
|
||||
* 参数说明: const UINT16 routeId, 进路ID
|
||||
* const UINT16 overlapId, 保护区段ID
|
||||
* 返回值:无
|
||||
* by cgh 20260106
|
||||
* by cgh 20240920
|
||||
*/
|
||||
void CleanOverlapSpecificFlag(const UINT16 routeId, const UINT16 overlapId)
|
||||
void CleanOverlapAtsOrlaborLockFlag(const UINT16 routeId, const UINT16 overlapId)
|
||||
{
|
||||
UINT16 overlapRouteSum = 0U; /*保护区段进路数量*/
|
||||
UINT16* pOverlapRouteBuf = NULL; /*保护区段进路数据*/
|
||||
@@ -856,8 +835,6 @@ void CleanOverlapSpecificFlag(const UINT16 routeId, const UINT16 overlapId)
|
||||
UINT16 routeLastPhyId = 0U; /*进路最后一个物理区段ID*/
|
||||
UINT8 routeLastPhyState = 0U; /*进路最后一个物理区段融合占用状态*/
|
||||
UINT16 ii = 0U; /*游标*/
|
||||
UINT32 dwUnlockStartCycNum = 0U; /*保护区段解锁起始周期号*/
|
||||
UINT32 dwAtsLastTimeLockCyc = 0U; /*最近一次ATS锁闭保护区段周期号*/
|
||||
|
||||
overlapRouteSum = GetOverlapRouteIdSum(overlapId); /*获取保护区段进路数量*/
|
||||
pOverlapRouteBuf = GetOverlapRouteIdBuf(overlapId); /*获取保护区段进路数据*/
|
||||
@@ -878,32 +855,6 @@ void CleanOverlapSpecificFlag(const UINT16 routeId, const UINT16 overlapId)
|
||||
{
|
||||
SetOverlapAtsOrlaborLockCmdFlag(overlapId, LOCK_OVERLAP_CMD_NO);
|
||||
}
|
||||
|
||||
dwUnlockStartCycNum = GetOverlapUnlockStartCycNum(overlapId);
|
||||
dwAtsLastTimeLockCyc = GetOverlapAtsLastTimeLockCyc(overlapId);
|
||||
|
||||
if (0U == dwUnlockStartCycNum)
|
||||
{
|
||||
/*说明是人工解锁,人工解锁就不保留之前的命令了*/
|
||||
SetRouteAtsExpLkOverlapId(routeId, 0U);
|
||||
SetOverlapFromSetRouteCmdFlag(overlapId, OVERLAP_ROUTE_FLAG_NO);/*清除保护区段建立命令由进路命令连带下发标志*/
|
||||
}
|
||||
else
|
||||
{
|
||||
atsExpLockOverlapId = GetRouteAtsExpLkOverlapId(routeId);
|
||||
|
||||
if ((dwAtsLastTimeLockCyc <= dwUnlockStartCycNum) && (0U < dwAtsLastTimeLockCyc)
|
||||
&& (overlapId == atsExpLockOverlapId))
|
||||
{
|
||||
/*ATS最后一次下发锁闭保护区段命令时保护区段未自动解锁*/
|
||||
SetRouteAtsExpLkOverlapId(routeId, 0U);
|
||||
SetOverlapFromSetRouteCmdFlag(overlapId, OVERLAP_ROUTE_FLAG_NO);/*清除保护区段建立命令由进路命令连带下发标志*/
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1024,263 +975,4 @@ UINT8 GetOverlapProSwtCheckStartFlag(const UINT16 wOverlapId)
|
||||
}
|
||||
|
||||
return cRetVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段之前人工解锁状态
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0:之前人工解锁状态
|
||||
* BY CGH 20250928
|
||||
*/
|
||||
UINT8 GetOverlapPreLoaborUnlockState(const UINT16 overlapId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 reVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetOverlapConfigBufIndex(overlapId); /*获取数组下标*/
|
||||
|
||||
if (bufIndex < OVERLAP_SUM_MAX)
|
||||
{
|
||||
reVal = OverlapDataStru[bufIndex].chPreLaborUnlockState;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定ID保护区段之前人工解锁状态
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* const UINT8 chPreLaborUnlockState, 之前人工解锁状态
|
||||
* 返回值 void
|
||||
* by cgh 20250928
|
||||
*/
|
||||
void SetOverlapPreLoaborUnlockState(const UINT16 overlapId, const UINT8 chPreLaborUnlockState)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetOverlapConfigBufIndex(overlapId); /*获取数组下标*/
|
||||
|
||||
if ((bufIndex < OVERLAP_SUM_MAX)
|
||||
&& ((PRO_PRE_LABOR_UNLOCK_STATE_YES == chPreLaborUnlockState)
|
||||
|| (PRO_PRE_LABOR_UNLOCK_STATE_NO == chPreLaborUnlockState)))
|
||||
{
|
||||
OverlapDataStru[bufIndex].chPreLaborUnlockState = chPreLaborUnlockState; /*设置解锁起始周期号*/
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:保护区段锁闭所属进路检查
|
||||
* 参数说明: const UINT16 wOverlapId 进路ID
|
||||
* 返回值 :CI_SUCCESS 所有进路均空闲
|
||||
* CI_ERROR 存在进路不是空闲
|
||||
* by cgh 20250928
|
||||
*/
|
||||
UINT8 OverlapLockRouteCheck(const UINT16 wOverlapId)
|
||||
{
|
||||
UINT8 chReval = CI_ERROR;
|
||||
UINT16 dwOverlapRouteSum = 0U; /*保护区段进路数目*/
|
||||
UINT16* pOverlapRouteBuf = NULL; /*保护区段进路数组*/
|
||||
UINT16 jj = 0U;
|
||||
UINT8 chRouteState = 0U; /*进路状态*/
|
||||
UINT8 chFlag = 0U; /*检查标志*/
|
||||
|
||||
if ((0U < wOverlapId) && (OVERLAP_SUM_MAX > wOverlapId))
|
||||
{
|
||||
dwOverlapRouteSum = GetOverlapRouteIdSum(wOverlapId);
|
||||
pOverlapRouteBuf = GetOverlapRouteIdBuf(wOverlapId);
|
||||
|
||||
if ((NULL != pOverlapRouteBuf))
|
||||
{
|
||||
for (jj = 0U; jj < dwOverlapRouteSum; jj++)
|
||||
{
|
||||
chRouteState = GetRouteState(pOverlapRouteBuf[jj]);
|
||||
|
||||
if ((ROUTE_STATE_IDLE != chRouteState))
|
||||
{
|
||||
chFlag = 1U;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
if (0U == chFlag)
|
||||
{
|
||||
chReval = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*存在不空闲的进路*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
return chReval;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID保护区段关联物理区段停准停稳状态
|
||||
* 参数说明:const UINT16 overlapId 保护区段ID
|
||||
* const UINT8 chSetFlag 设置标志
|
||||
* 返回值 :无
|
||||
*/
|
||||
void SetOverlapBelPhyStopSteadyFlag(const UINT16 wOverlapId, const UINT8 chSetFlag)
|
||||
{
|
||||
UINT16 wOverlopBelRouteId = 0U; /*保护区段锁闭所属进路ID*/
|
||||
UINT8 chRoutePhySecSum = 0U; /*进路包含的物理区段数目*/
|
||||
RoutePhysicalSectionStruct* szRoutePhySecData = NULL; /*进路包含物理区段结构数组*/
|
||||
|
||||
if ((0U < wOverlapId) && (wOverlapId < OVERLAP_SUM_MAX)
|
||||
&& ((PHYSICAL_SECTION_STOPSTEADY_NO == chSetFlag) || (PHYSICAL_SECTION_STOPSTEADY_YES == chSetFlag)))
|
||||
{
|
||||
wOverlopBelRouteId = GetOverlapBelongRouteId(wOverlapId);
|
||||
|
||||
if (0U != wOverlopBelRouteId)
|
||||
{
|
||||
chRoutePhySecSum = GetRoutePhysicalSectionSum(wOverlopBelRouteId);
|
||||
szRoutePhySecData = GetRouteSectionData(wOverlopBelRouteId);
|
||||
|
||||
if (NULL != szRoutePhySecData)
|
||||
{
|
||||
/*设置车车的物理区段停稳状态*/
|
||||
SetPhySecStopSteadyFlagCC(szRoutePhySecData[chRoutePhySecSum - 1U].PhysicalSectionId, chSetFlag);
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*无锁闭所属进路不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/* 功能描述:清除期望保护区段关联所有进路的所有保护区段人工锁闭过标志
|
||||
* 参数说明: const UINT16 expLkOverlapId, ATS或现地发送的期望锁闭区段ID
|
||||
* 返回值 : 无
|
||||
* by cgh 20260106
|
||||
*/
|
||||
void ClearPreLoaborUnlockState(const UINT16 expLkOverlapId)
|
||||
{
|
||||
UINT8 overlapSum = 0U;
|
||||
UINT16* overlapIdBuf = NULL;
|
||||
UINT16 ii = 0U;
|
||||
UINT8 jj = 0U;
|
||||
UINT8 localCiId = 0U; /*本联锁集中区ID*/
|
||||
UINT8 OverlapBelongCiId = 0U;
|
||||
UINT16 overlapRouteSum = 0U;/*保护区段关联进路数量*/
|
||||
UINT16* overlapRouteBuf = NULL;/*保护区段关联进路数据*/
|
||||
|
||||
overlapRouteSum = GetOverlapRouteIdSum(expLkOverlapId);/*获取保护区段关联进路总数*/
|
||||
overlapRouteBuf = GetOverlapRouteIdBuf(expLkOverlapId);/*获取进路数据*/
|
||||
localCiId = GetSystemParaLocalCiId(); /*获取本机联锁ID*/
|
||||
|
||||
if ((0U != overlapRouteSum) && (NULL != overlapRouteBuf))
|
||||
{
|
||||
for (ii = 0U; ii < overlapRouteSum; ii++)
|
||||
{
|
||||
overlapSum = GetRouteOverlapSum(overlapRouteBuf[ii]); /*获取Overlap总数*/
|
||||
overlapIdBuf = GetRouteOverlapIdBuf(overlapRouteBuf[ii]); /*获取Overlap ID BUF*/
|
||||
|
||||
if ((0U == overlapSum) || (NULL == overlapIdBuf))
|
||||
{
|
||||
;/*数据异常*/
|
||||
}
|
||||
else
|
||||
{
|
||||
for (jj = 0U; jj < overlapSum; jj++)
|
||||
{
|
||||
OverlapBelongCiId = GetOverlapBelongCiId(overlapIdBuf[jj]);
|
||||
if (OverlapBelongCiId == localCiId)
|
||||
{
|
||||
SetOverlapPreLoaborUnlockState(overlapIdBuf[jj], PRO_PRE_LABOR_UNLOCK_STATE_NO);
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*相邻联锁的不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
; /*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段最近一次ATS锁闭保护区段周期号
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* 返回值 : 最近一次ATS锁闭保护区段周期号
|
||||
* BY CGH 20260106
|
||||
*/
|
||||
UINT32 GetOverlapAtsLastTimeLockCyc(const UINT16 overlapId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT32 reVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetOverlapConfigBufIndex(overlapId); /*获取数组下标*/
|
||||
|
||||
if (bufIndex < OVERLAP_SUM_MAX)
|
||||
{
|
||||
reVal = OverlapDataStru[bufIndex].dwAtsLastTimeLockCyc;
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
return reVal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定ID保护区段最近一次ATS锁闭保护区段周期号
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* const UINT32 dwAtsLastTimeLockCyc, 最近一次ATS锁闭保护区段周期号
|
||||
* 返回值 void
|
||||
* by cgh 20250928
|
||||
*/
|
||||
void SetOverlapAtsLastTimeLockCyc(const UINT16 overlapId, const UINT32 dwAtsLastTimeLockCyc)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetOverlapConfigBufIndex(overlapId); /*获取数组下标*/
|
||||
|
||||
if (bufIndex < OVERLAP_SUM_MAX)
|
||||
{
|
||||
OverlapDataStru[bufIndex].dwAtsLastTimeLockCyc = dwAtsLastTimeLockCyc; /*设置解锁起始周期号*/
|
||||
}
|
||||
else
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,9 @@ typedef struct S_OverlapDataStruct
|
||||
UINT32 UnlockStartCycNum; /*保护区段解锁起始周期号 (动态字段)*/
|
||||
UINT32 XuanPaiStartCycNum; /*保护区段选排开始周期号(动态字段)*/
|
||||
UINT8 OverlapUnlockApplyFlag; /*向ZC申请解锁保护区段解锁标志,20181105*/
|
||||
UINT16 wOverlapUnlockApplyTrainId;/* 申请保护区段解锁的列车ID(不带0x14)*/
|
||||
UINT32 dwReqIvocUnLockStartCycNum; /*向车申请解锁保护区段起始周期号*/
|
||||
UINT8 cIvocAllowUnlockFlag; /*列车允许解锁保护区段标志,0xAA同意解锁,0x55不同意解锁*/
|
||||
UINT8 OverlapCanLaborUnlockFlag;/*保护区段可以人工解锁标志*/
|
||||
UINT8 OverlapLaborUnlockSetState;/*保护区段人工解锁设置状态*/
|
||||
UINT32 laborUnlockStartCycNum;/*人工解锁起始周期号*/
|
||||
@@ -45,21 +48,10 @@ typedef struct S_OverlapDataStruct
|
||||
UINT8 OverlapFromSetRouteCmdFlag;/*保护区段由进路办理时连带的标志*/
|
||||
UINT8 cProSwitchCheckResultFlag; /*跨控区防护道岔检查结果标志(0xFF:默认值,0x55:失败,0xAA:成功)*/
|
||||
UINT8 cProSwitchCheckStartFlag; /*跨控区防护道岔检查开始标志(0x55:检查开始,0xAA:检查停止)*/
|
||||
UINT8 chPreLaborUnlockState; /*之前人工解锁状态*/
|
||||
UINT32 dwAtsLastTimeLockCyc; /*最近一次ATS锁闭保护区段周期号*/
|
||||
} OverlapDataStruct;
|
||||
|
||||
/*保护区段数据结构体*/
|
||||
typedef struct S_OverlapDataStructCC
|
||||
{
|
||||
UINT16 OverlapId; /*保护区段组ID (初始化字段)*/
|
||||
UINT16 wOverlapUnlockApplyTrainId; /*申请保护区段解锁的列车ID(不带0x10)*/
|
||||
UINT32 dwReqIvocUnLockStartCycNum; /*向车申请解锁保护区段起始周期号*/
|
||||
UINT8 cIvocAllowUnlockFlag; /*列车允许解锁保护区段标志,0xAA同意解锁,0x55不同意解锁*/
|
||||
}OverlapDataStructCC;
|
||||
/*******************************全局变量声明*******************************/
|
||||
extern OverlapDataStruct OverlapDataStru[OVERLAP_SUM_MAX]; /*定义OVERLAP数据结构体*/
|
||||
extern OverlapDataStructCC OverlapDataStruCC[OVERLAP_SUM_MAX]; /*定义OVERLAP数据结构体-车车*/
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段数据
|
||||
* 参数说明:
|
||||
@@ -67,19 +59,6 @@ extern OverlapDataStructCC OverlapDataStruCC[OVERLAP_SUM_MAX]; /*
|
||||
OverlapDataStruct *
|
||||
*/
|
||||
OverlapDataStruct *GetOverlapData(void);
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段数据-车车
|
||||
* 参数说明:
|
||||
* 返回值 :
|
||||
OverlapDataStructCC *
|
||||
*/
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段数据-车车
|
||||
* 参数说明:
|
||||
* 返回值 :
|
||||
OverlapDataStructCC *
|
||||
*/
|
||||
OverlapDataStructCC* GetOverlapDataCC(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段所属进路ID
|
||||
@@ -90,11 +69,11 @@ OverlapDataStructCC* GetOverlapDataCC(void);
|
||||
UINT16 GetOverlapBelongRouteId(const UINT16 overlapId);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定ID保护区段所属进路
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* 功能描述: 设置指定ID保护区段组解锁起始周期号
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* const UINT16 belongRouteId, 所属进路号
|
||||
* 返回值 : 无
|
||||
*
|
||||
*
|
||||
*/
|
||||
void SetOverlapBelongRouteId(const UINT16 overlapId, const UINT16 belongRouteId);
|
||||
|
||||
@@ -159,7 +138,7 @@ void SetOverlapUnlockApplyFlag(const UINT16 overlapId, const UINT8 overlapUnlock
|
||||
* 功能描述:获取指定ID保护区段申请解锁的列车ID
|
||||
* 参数说明:const UINT16 overlapId, 保护区段ID
|
||||
* 返回值 :0 获取失败
|
||||
* 其它 列车ID(不带0x10)
|
||||
* 其它 列车ID(不带0x14)
|
||||
*/
|
||||
UINT16 GetOverlapUnlockApplyTrainId(const UINT16 overlapId);
|
||||
|
||||
@@ -167,7 +146,7 @@ UINT16 GetOverlapUnlockApplyTrainId(const UINT16 overlapId);
|
||||
/*
|
||||
* 功能描述: 设置指定ID保护区段申请解锁的列车ID
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* const UINT16 wTrainId,列车ID(不带0x10)
|
||||
* const UINT16 wTrainId,列车ID(不带0x14)
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
@@ -336,13 +315,13 @@ void SetOverlapFromSetRouteCmdFlag(const UINT16 overlapId, const UINT8 setFlag);
|
||||
UINT8 GetOverlapFromSetRouteCmdFlag(const UINT16 overlapId);
|
||||
|
||||
/*
|
||||
* 功能描述: 清除保护区段个别标志
|
||||
* 功能描述: 清保护区段人工或ATS锁闭命令标志
|
||||
* 参数说明: const UINT16 routeId, 进路ID
|
||||
* const UINT16 overlapId, 保护区段ID
|
||||
* 返回值:无
|
||||
* by cgh 20260106
|
||||
* by cgh 20240920
|
||||
*/
|
||||
void CleanOverlapSpecificFlag(const UINT16 routeId, const UINT16 overlapId);
|
||||
void CleanOverlapAtsOrlaborLockFlag(const UINT16 routeId, const UINT16 overlapId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置保护区段防护道岔检查结果标志
|
||||
@@ -381,65 +360,6 @@ void SetOverlapProSwtCheckStartFlag(const UINT16 wOverlapId, const UINT8 cCheckS
|
||||
*/
|
||||
UINT8 GetOverlapProSwtCheckStartFlag(const UINT16 wOverlapId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段之前人工解锁状态
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0:之前人工解锁状态
|
||||
* BY CGH 20250928
|
||||
*/
|
||||
UINT8 GetOverlapPreLoaborUnlockState(const UINT16 overlapId);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定ID保护区段之前人工解锁状态
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* const UINT8 chPreLaborUnlockState, 之前人工解锁状态
|
||||
* 返回值 void
|
||||
* by cgh 20250928
|
||||
*/
|
||||
void SetOverlapPreLoaborUnlockState(const UINT16 overlapId, const UINT8 chPreLaborUnlockState);
|
||||
|
||||
/*
|
||||
* 功能描述:保护区段锁闭所属进路检查
|
||||
* 参数说明: const UINT16 wOverlapId 进路ID
|
||||
* 返回值 :CI_SUCCESS 所有进路均空闲
|
||||
* CI_ERROR 存在进路不是空闲
|
||||
* by cgh 20250928
|
||||
*/
|
||||
UINT8 OverlapLockRouteCheck(const UINT16 wOverlapId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID保护区段关联物理区段停准停稳状态
|
||||
* 参数说明:const UINT16 overlapId 保护区段ID
|
||||
* const UINT8 chSetFlag 设置标志
|
||||
* 返回值 :无
|
||||
*/
|
||||
void SetOverlapBelPhyStopSteadyFlag(const UINT16 wOverlapId, const UINT8 chSetFlag);
|
||||
|
||||
/* 功能描述:清除期望保护区段关联所有进路的所有保护区段人工锁闭过标志
|
||||
* 参数说明: const UINT16 expLkOverlapId, ATS或现地发送的期望锁闭区段ID
|
||||
* 返回值 : 无
|
||||
* by cgh 20260106
|
||||
*/
|
||||
void ClearPreLoaborUnlockState(const UINT16 expLkOverlapId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID保护区段最近一次ATS锁闭保护区段周期号
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* 返回值 : 最近一次ATS锁闭保护区段周期号
|
||||
* BY CGH 20260106
|
||||
*/
|
||||
UINT32 GetOverlapAtsLastTimeLockCyc(const UINT16 overlapId);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定ID保护区段最近一次ATS锁闭保护区段周期号
|
||||
* 参数说明: const UINT16 overlapId, 保护区段ID
|
||||
* const UINT32 dwAtsLastTimeLockCyc, 最近一次ATS锁闭保护区段周期号
|
||||
* 返回值 void
|
||||
* by cgh 20250928
|
||||
*/
|
||||
void SetOverlapAtsLastTimeLockCyc(const UINT16 overlapId, const UINT32 dwAtsLastTimeLockCyc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -72,10 +72,6 @@
|
||||
#define PROSWITCH_CHECK_START_VALID ((UINT8)0x55) /*开始检查*/
|
||||
#define PROSWITCH_CHECK_START_INVALID ((UINT8)0xAA) /*停止检查*/
|
||||
|
||||
/*保护区段之前人工解锁标志*/
|
||||
#define PRO_PRE_LABOR_UNLOCK_STATE_YES ((UINT8)0x55) /*之前成功人工解锁过*/
|
||||
#define PRO_PRE_LABOR_UNLOCK_STATE_NO ((UINT8)0xAA) /*之前未人工解锁过*/
|
||||
|
||||
#define OVERLAP_USING_OVERTIME_CYC_NUM 10U /*保护区段征用超时周期数*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1065,169 +1065,4 @@ UINT8 GetPsdControlType(const UINT16 doorId)
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门三编组驱动开门继电器ID
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 驱动开门继电器ID
|
||||
*/
|
||||
UINT16 GetThreeGroupPsdOpenDrvRelayId(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = 0u;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (PSD_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = PsdConfigDataStru[bufIndex].OpenThreeEditGroupDriveRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门再次开门继电器ID2
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 再次开门继电器ID
|
||||
*/
|
||||
UINT16 GetPsdReOpenRelayId2(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (PSD_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = PsdConfigDataStru[bufIndex].doorReopenRelayId2;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门包含ESB
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 :ESB ID数组
|
||||
*/
|
||||
UINT16* GetPsdIncloudeEsbIdBuf(const UINT16 psdId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16* retVal = NULL;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(psdId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (PSD_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = PsdConfigDataStru[bufIndex].IncloudeEsbIdBuf;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = NULL;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门包含ESB数量
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 :ESB ID数组
|
||||
*/
|
||||
UINT8 GetPsdIncloudeEsbNum(const UINT16 psdId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 retVal = NULL;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(psdId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (PSD_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = PsdConfigDataStru[bufIndex].IncloudeEsbNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = NULL;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门IBP盘发车按钮继电器ID
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: IBP盘发车按钮继电器ID
|
||||
*/
|
||||
UINT16 GetIbpConfmRelayId(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
retVal = PsdConfigDataStru[bufIndex].wIbpRelayId;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -39,15 +39,13 @@ typedef struct S_PsdConfigDataStruct
|
||||
UINT16 MutualLockRelayId; /*互锁解除继电器ID (配置字段)*/
|
||||
UINT16 wMutualLockRelayId2; /*互锁解除继电器ID2(配置字段) 迪斯尼*/
|
||||
UINT16 CloseDriveRelayId; /*关门继电器ID (配置字段)*/
|
||||
UINT16 OpenThreeEditGroupDriveRelayId; /*打开三编组屏蔽门的驱动继电器(配置字段)*/
|
||||
UINT16 OpenFourEditGroupDriveRelayId; /*打开四编组屏蔽门的驱动继电器(配置字段)*/
|
||||
UINT16 OpenSixEditGroupDriveRelayId; /*打开六编组屏蔽门的驱动继电器(配置字段)*/
|
||||
UINT16 OpenEightEditGroupDriveRelayId; /*打开八编组屏蔽门的驱动继电器(配置字段)*/
|
||||
UINT16 DoorStateRelayId; /*门开采集继电器ID (配置字段)*/
|
||||
UINT16 DoorStateRelayId; /*门开采集继电器ID (配置字段)*/
|
||||
UINT16 wDoorStateRelayId2; /*门开采集继电器ID2(配置字段) 迪斯尼*/
|
||||
UINT16 wRelayDoorButtonId; /*屏蔽门再关门按钮继电器*/
|
||||
UINT16 doorReopenRelayId; /*站台门再次开门继电器*/
|
||||
UINT16 doorReopenRelayId2; /*站台门再次开门继电器2*/
|
||||
UINT16 departureConfirmRelayId; /*发车确认继电器*/
|
||||
UINT16 detectStartRelayId; /*启动探测继电器*/
|
||||
UINT16 detectStopRelayId; /*停止探测继电器*/
|
||||
@@ -70,10 +68,6 @@ typedef struct S_PsdConfigDataStruct
|
||||
UINT16 wPsdSndProLinkId; /*屏蔽门防护link2ID*/
|
||||
UINT16 wPsdTrdProLinkId; /*屏蔽门防护link3ID*/
|
||||
UINT8 chPsdControlType; /*屏蔽门控制类型*/
|
||||
UINT16 IncloudeEsbIdBuf[PSD_INCLUDE_ESB_NUM]; /*屏蔽门包含ESB ID*/
|
||||
UINT8 IncloudeEsbNum; /*包含ESB数量*/
|
||||
UINT16 wIbpRelayId; /*IBP盘发车按钮继电器ID*/
|
||||
UINT16 wReverseBoardId; /*所属倒切板卡Id*/
|
||||
} PsdConfigDataStruct;
|
||||
|
||||
|
||||
@@ -427,57 +421,6 @@ UINT8 CheckPsdBelSendRange(const UINT16 wCheckPsdId);
|
||||
* 返回值 : UINT8 控制类型(0x55 OC-P控制 0xAA RCI控制)
|
||||
*/
|
||||
UINT8 GetPsdControlType(const UINT16 doorId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门三编组驱动开门继电器ID
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 驱动开门继电器ID
|
||||
*/
|
||||
UINT16 GetThreeGroupPsdOpenDrvRelayId(const UINT16 doorId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门再次开门继电器ID2
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 再次开门继电器ID
|
||||
*/
|
||||
UINT16 GetPsdReOpenRelayId2(const UINT16 doorId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门包含ESB数量
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 :ESB ID数组
|
||||
*/
|
||||
UINT8 GetPsdIncloudeEsbNum(const UINT16 psdId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门包含ESB
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 :ESB ID数组
|
||||
*/
|
||||
UINT16* GetPsdIncloudeEsbIdBuf(const UINT16 psdId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门IBP盘发车按钮继电器ID
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: IBP盘发车按钮继电器ID
|
||||
*/
|
||||
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
|
||||
}
|
||||
|
||||
@@ -11,10 +11,8 @@
|
||||
|
||||
#include "PSDDataManage.h"
|
||||
#include "../ParsePack/ParsePackDefine.h"
|
||||
#include "ESBDataManage.h"
|
||||
|
||||
PsdDataStruct PsdDataStru[PSD_SUM_MAX] = { 0U }; /*定义屏蔽门数据结构体*/
|
||||
PsdDataStructCC PsdDataStruCC[PSD_SUM_MAX] = { 0U }; /*定义车车屏蔽门数据结构体*/
|
||||
PsdDataStruct PsdDataStru[PSD_SUM_MAX]; /*定义屏蔽门数据结构体*/
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门数据
|
||||
@@ -26,16 +24,6 @@ PsdDataStruct *GetPsdData(void)
|
||||
return PsdDataStru;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门数据CC
|
||||
* 参数说明:无
|
||||
* 返 回 值:车车屏蔽门动态数据
|
||||
*/
|
||||
PsdDataStructCC* GetPsdDataCC(void)
|
||||
{
|
||||
return PsdDataStruCC;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门互锁解除状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
@@ -531,9 +519,6 @@ void ResetPsdData(const UINT16 psdId)
|
||||
|
||||
PsdDataStru[bufIndex].PsdDriveState=PSD_DRIVE_STATE_INVALID;
|
||||
PsdDataStru[bufIndex].PsdPreDriveState=PSD_DRIVE_STATE_INVALID;
|
||||
|
||||
SetPsdVobcCmdCC(psdId,0u, PSD_DEFAULT_CONTROL_CMD,0u);
|
||||
SetPsdEditGroupInfoDataCC(psdId, PSD_EDIT_GROUP_DEFAULT); /*设置RC的PSD编组信息为默认值*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -851,7 +836,7 @@ UINT32 GetStartDetectionCycNum(const UINT16 doorId)
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStartDetectionState(const UINT16 doorId, const UINT8 detectionState)
|
||||
void SetStartDetectionState(const UINT16 doorId, const UINT32 detectionState)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
|
||||
@@ -861,7 +846,7 @@ void SetStartDetectionState(const UINT16 doorId, const UINT8 detectionState)
|
||||
{
|
||||
if ((JXTC_START_DETECTION_NO == detectionState) || (JXTC_START_DETECTION_YES == detectionState) )
|
||||
{
|
||||
PsdDataStru[bufIndex].StartDetectionState = detectionState;
|
||||
PsdDataStru[bufIndex].StartDetectionState = (UINT8)(detectionState);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -906,7 +891,7 @@ UINT8 GetStartDetectionState(const UINT16 doorId)
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStopDetectionState(const UINT16 doorId, const UINT8 detectionState)
|
||||
void SetStopDetectionState(const UINT16 doorId, const UINT32 detectionState)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
|
||||
@@ -916,7 +901,7 @@ void SetStopDetectionState(const UINT16 doorId, const UINT8 detectionState)
|
||||
{
|
||||
if ((JXTC_STOP_DETECTION_NO == detectionState) || (JXTC_STOP_DETECTION_YES == detectionState) )
|
||||
{
|
||||
PsdDataStru[bufIndex].StopDetectionState = detectionState;
|
||||
PsdDataStru[bufIndex].StopDetectionState = (UINT8)(detectionState);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -952,54 +937,6 @@ UINT8 GetStopDetectionState(const UINT16 doorId)
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定PSD停止探测周期号
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT32 startCycNum, 起始周期号
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStopDetectionCycNum(const UINT16 doorId, const UINT32 startCycNum)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
PsdDataStru[bufIndex].StopDetectionCycNum = startCycNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不做处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取停止探测起始周期号
|
||||
* 参数说明: const UINT16 doorId, 进路ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 起始周期号
|
||||
*/
|
||||
UINT32 GetStopDetectionCycNum(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT32 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
retVal = PsdDataStru[bufIndex].StopDetectionCycNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* 功能描述: 设置因VOBC关PSD而需要被重开的进路
|
||||
@@ -1405,7 +1342,7 @@ UINT16 GetPsdEditGroupInfoFromPsdData(const UINT16 doorId)
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetVOBCDoorState(const UINT16 doorId, const UINT8 doorState)
|
||||
void SetVOBCDoorState(const UINT16 doorId, const UINT32 doorState)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
|
||||
@@ -1415,7 +1352,7 @@ void SetVOBCDoorState(const UINT16 doorId, const UINT8 doorState)
|
||||
{
|
||||
if ((PSD_DOOR_CLOSEDANDLOCKED_VALID == doorState) || (PSD_DOOR_CLOSEDANDLOCKED_INVALID == doorState))
|
||||
{
|
||||
PsdDataStru[bufIndex].VOBCDoorState = doorState;
|
||||
PsdDataStru[bufIndex].VOBCDoorState = (UINT8)(doorState);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1565,6 +1502,7 @@ UINT8 GetPsdPlFlag(const UINT16 doorId)
|
||||
void SetNearCiPscPlFlag(const UINT16 psdId,const UINT16 pscId,const UINT8 setFlag)
|
||||
{
|
||||
/*变量初始化*/
|
||||
UINT8 i = 0u;
|
||||
UINT8 transmitState = 0u;
|
||||
UINT8 localCiId = 0u;
|
||||
UINT8 psdCiId = 0u;
|
||||
@@ -2574,21 +2512,21 @@ UINT16 GePsdVideoQkRelateVobcId(const UINT16 wPsdId)
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门异常状态
|
||||
* 功能描述:设置指定ID屏蔽门异常打开状态
|
||||
* 参数说明:const UINT16 wPsdId 屏蔽门ID
|
||||
* const UINT8 cExceptOpenState 屏蔽门异常状态
|
||||
* const UINT8 cExceptOpenState 屏蔽门异常打开状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.05.22
|
||||
*/
|
||||
void SetPsdExceptState(const UINT16 wPsdId, const UINT8 cExceptOpenState)
|
||||
void SetPsdExceptOpenState(const UINT16 wPsdId, const UINT8 cExceptOpenState)
|
||||
{
|
||||
UINT16 bufIndex = 0U;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(wPsdId); /*获取屏蔽门数组下标*/
|
||||
bufIndex = GetPsdConfigBufIndex(wPsdId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if ((PSD_SUM_MAX > bufIndex) && ((PSD_EXCEPT_YES == cExceptOpenState) || (PSD_EXCEPT_NO == cExceptOpenState)))
|
||||
if ((PSD_SUM_MAX > bufIndex) && ((PSD_EXCEPT_OPEN_YES == cExceptOpenState) || (PSD_EXCEPT_OPEN_NO == cExceptOpenState)))
|
||||
{
|
||||
PsdDataStru[bufIndex].cPsdExceptOpenState = cExceptOpenState; /*设置屏蔽门异常状态*/
|
||||
PsdDataStru[bufIndex].cPsdExceptOpenState = cExceptOpenState; /*设置屏蔽门异常打开状态*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2597,16 +2535,16 @@ void SetPsdExceptState(const UINT16 wPsdId, const UINT8 cExceptOpenState)
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门异常状态
|
||||
* 功能描述:获取指定ID屏蔽门异常打开状态
|
||||
* 参数说明:const UINT16 wPsdId 屏蔽门ID
|
||||
* 返 回 值:0x55 异常(曾异常打开未解除)
|
||||
* 0xAA 未异常
|
||||
* 返 回 值:0x55 异常打开
|
||||
* 0xAA 未异常打开
|
||||
* Created By LQ 2025.05.22
|
||||
*/
|
||||
UINT8 GePsdExceptState(const UINT16 wPsdId)
|
||||
UINT8 GePsdExceptOpenState(const UINT16 wPsdId)
|
||||
{
|
||||
UINT16 bufIndex = 0U;
|
||||
UINT8 cRetVal = PSD_EXCEPT_YES;
|
||||
UINT8 cRetVal = PSD_EXCEPT_OPEN_YES;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(wPsdId); /*获取屏蔽门数组下标*/
|
||||
|
||||
@@ -2917,557 +2855,4 @@ void SetPsdRelayDownCycNum(const UINT16 doorId, const UINT32 startCycNum)
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门编组信息CC
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* 返 回 值:0 无编组信息
|
||||
* 3 三编组
|
||||
* 4 四编组
|
||||
* 6 六编组
|
||||
* 8 八编组
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
UINT16 GetPsdEditGroupInfoDataCC(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
retVal = PsdDataStruCC[bufIndex].psdEditGroupInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门编组信息CC
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT16 wPsdEditGroupInfo 屏蔽门编组信息
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
void SetPsdEditGroupInfoDataCC(const UINT16 doorId, const UINT16 wPsdEditGroupInfo)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
if ((PSD_THREE_EDIT_GROUP == wPsdEditGroupInfo)
|
||||
|| (PSD_FOUR_EDIT_GROUP == wPsdEditGroupInfo)
|
||||
|| (PSD_SIX_EDIT_GROUP == wPsdEditGroupInfo)
|
||||
|| (PSD_EIGHT_EDIT_GROUP == wPsdEditGroupInfo)
|
||||
|| (PSD_EDIT_GROUP_DEFAULT == wPsdEditGroupInfo))
|
||||
{
|
||||
PsdDataStruCC[bufIndex].psdEditGroupInfo = wPsdEditGroupInfo; /*不考虑FAO的特殊接口*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取PSD的VOBC控制命令CC
|
||||
* 参数说明:const UINT16 doorId,屏蔽门ID
|
||||
* 返 回 值:0x00-默认值
|
||||
* 0x55-打开PSD命令
|
||||
* 0xAA-关闭PSD命令
|
||||
* 0xFF-查询PSD命令
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
UINT8 GetPsdVobcCmdCC(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 ctrlCmd = PSD_DEFAULT_CONTROL_CMD;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
ctrlCmd = PsdDataStruCC[bufIndex].PsdCmd;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctrlCmd = PSD_DEFAULT_CONTROL_CMD;
|
||||
}
|
||||
|
||||
return ctrlCmd;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取当前控制该PSD的VOBC的编号CC
|
||||
* 参数说明: const UINT16 doorId,屏蔽门ID
|
||||
* 返 回 值: VOBC ID
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
UINT16 GetPsdVobcIdCC(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT16 vobcId = 0U;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
vobcId = PsdDataStruCC[bufIndex].SrcVobcId;
|
||||
}
|
||||
else
|
||||
{
|
||||
vobcId = 0U;
|
||||
}
|
||||
|
||||
return vobcId;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获得该PSD的控制命令的设置周期CC
|
||||
* 参数说明:const UINT16 doorId,屏蔽门ID
|
||||
* 返 回 值:该PSD的控制命令的设置周期
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
UINT32 GetPsdCmdSetCycleCC(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT32 setCycle = 0U;
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
setCycle = PsdDataStruCC[bufIndex].CmdSetCycle;
|
||||
}
|
||||
else
|
||||
{
|
||||
setCycle = 0U;
|
||||
}
|
||||
|
||||
return setCycle;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置PSD的VOBC操作命令CC
|
||||
* 参数说明:const UINT16 doorId 屏蔽门ID
|
||||
* const UINT16 vobcId 操作屏蔽门的VOBC ID
|
||||
* const UINT8 operCmd 来自VOBC的开关门命令
|
||||
* const UINT32 dwCycNum 周期号
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
void SetPsdVobcCmdCC(const UINT16 doorId, const UINT16 vobcId, const UINT8 operCmd, const UINT32 dwCycNum)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
if ((PSD_DEFAULT_CONTROL_CMD == operCmd)
|
||||
|| (VOBCTOCI_COMMAND_TYPE_PSDOPEN == operCmd)
|
||||
|| (VOBCTOCI_COMMAND_TYPE_PSDCLOSE == operCmd)
|
||||
|| (VOBCTOCI_COMMAND_TYPE_PSDCHECK_FAOHLHT == operCmd))
|
||||
{
|
||||
if (PsdDataStruCC[bufIndex].SrcVobcId == vobcId)
|
||||
{
|
||||
PsdDataStruCC[bufIndex].PsdCmd = operCmd;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*另一个VOBC开始操作该屏蔽门,对之前VOBC操作该屏蔽门产生的上下文进行复位*/
|
||||
PsdDataStruCC[bufIndex].SrcVobcId = vobcId;
|
||||
PsdDataStruCC[bufIndex].PsdCmd = operCmd;
|
||||
}
|
||||
PsdDataStruCC[bufIndex].CmdSetCycle = dwCycNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*命令非法,不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不做处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门编组信息CC
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* 返 回 值:0 无编组信息
|
||||
* 3 三编组
|
||||
* 4 四编组
|
||||
* 6 六编组
|
||||
* 8 八编组
|
||||
*/
|
||||
UINT16 GetPsdEditGroupInfoData(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT16 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
retVal = PsdDataStru[bufIndex].psdEditGroupInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门编组信息
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT16 wPsdEditGroupInfo 屏蔽门编组信息
|
||||
* 返 回 值:无
|
||||
*/
|
||||
void SetPsdEditGroupInfoData(const UINT16 doorId, const UINT16 wPsdEditGroupInfo)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
if ((PSD_THREE_EDIT_GROUP == wPsdEditGroupInfo)
|
||||
|| (PSD_FOUR_EDIT_GROUP == wPsdEditGroupInfo)
|
||||
|| (PSD_SIX_EDIT_GROUP == wPsdEditGroupInfo)
|
||||
|| (PSD_EIGHT_EDIT_GROUP == wPsdEditGroupInfo)
|
||||
|| (PSD_EDIT_GROUP_DEFAULT == wPsdEditGroupInfo))
|
||||
{
|
||||
PsdDataStru[bufIndex].psdEditGroupInfo = wPsdEditGroupInfo; /*不考虑FAO的特殊接口*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门间隙探测互锁解除故障状态
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* 返 回 值: 0 返回失败
|
||||
* 0< 间隙探测互锁解除故障状态
|
||||
*/
|
||||
UINT8 GetPsdJXTCMutualLockFaultState(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT8 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (PSD_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = PsdDataStru[bufIndex].JXTCMutualLockFaultState;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门间隙探测互锁解除故障状态
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT8 wJXTCMutualLockFaultState 间隙探测互锁解除故障状态
|
||||
* 返 回 值:无
|
||||
*/
|
||||
void SetPsdJXTCMutualLockFaultState(const UINT16 doorId, const UINT8 wJXTCMutualLockFaultState)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (PSD_SUM_MAX > bufIndex)
|
||||
{
|
||||
if ((JXTC_MUTUALLOCKFAULT_YES == wJXTCMutualLockFaultState)
|
||||
|| (JXTC_MUTUALLOCKFAULT_NO == wJXTCMutualLockFaultState))
|
||||
{
|
||||
PsdDataStru[bufIndex].JXTCMutualLockFaultState = wJXTCMutualLockFaultState; /*间隙探测互锁解除故障状态*/
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门间隙探测互锁解除时间
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* 返 回 值: 0 返回失败
|
||||
* 0< 屏蔽门间隙探测互锁解除时间
|
||||
*/
|
||||
UINT32 GetPsdJXTCMutualLockStartCycNum(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
UINT32 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (PSD_SUM_MAX > bufIndex)
|
||||
{
|
||||
retVal = PsdDataStru[bufIndex].JXTCMutualLockStartCycNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门间隙探测互锁解除起始时间
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT32 cycnum 互锁解除起始时间
|
||||
* 返 回 值:无
|
||||
*/
|
||||
void SetPsdJXTCMutualLockStartCycNum(const UINT16 doorId, const UINT32 cycnum)
|
||||
{
|
||||
UINT16 bufIndex = 0U; /*数组下标*/
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (PSD_SUM_MAX > bufIndex)
|
||||
{
|
||||
PsdDataStru[bufIndex].JXTCMutualLockStartCycNum = cycnum;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*不处理*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定ID屏蔽门IBP盘发车按钮状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* UINT8 setFlag 需设置的按钮状态
|
||||
* 返回值 : CI_ERROR 失败
|
||||
* CI_SUCCESS 成功
|
||||
*/
|
||||
UINT8 SetPsdButtonIbpState(const UINT16 doorId, const UINT8 setFlag)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 retVal = 0u;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
if ((PLATFORM_DEPAR_BUTTON_STATE_VALID == setFlag) || (PLATFORM_DEPAR_BUTTON_STATE_INVALID == setFlag)
|
||||
||(PLATFORM_DEPAR_BUTTON_STATE_FAULT == setFlag))
|
||||
{
|
||||
PsdDataStru[bufIndex].ibpButtonState = setFlag; /*设置按钮状态*/
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门IBP盘发车按钮状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 :0: 获取数据失败
|
||||
* >0: IBP盘发车按钮状态
|
||||
*/
|
||||
UINT8 GetPsdButtonIbpState(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 retVal = 0u;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
retVal = PsdDataStru[bufIndex].ibpButtonState;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门IBP按下起始周期号
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT32 startCycNum, 起始周期号
|
||||
* 返回值 : 0: 设置数据失败
|
||||
* >0: 设置数据成功
|
||||
*/
|
||||
UINT8 SetIBPPressCycNum(const UINT16 doorId, const UINT32 startCycNum)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT8 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
PsdDataStru[bufIndex].IBPPressCycNum = startCycNum;
|
||||
retVal = CI_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门IBP按下起始周期号
|
||||
* 参数说明: const UINT16 doorId,屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 起始周期号
|
||||
*/
|
||||
UINT32 GetIBPPressCycNum(const UINT16 doorId)
|
||||
{
|
||||
UINT16 bufIndex = 0u; /*数组下标*/
|
||||
UINT32 retVal = CI_ERROR;
|
||||
|
||||
bufIndex = GetPsdConfigBufIndex(doorId); /*获取屏蔽门数组下标*/
|
||||
|
||||
if (bufIndex < PSD_SUM_MAX)
|
||||
{
|
||||
retVal = PsdDataStru[bufIndex].IBPPressCycNum;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = CI_ERROR;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门状态给 VOBC
|
||||
* 参数说明: const UINT16 doorId,屏蔽门ID
|
||||
* 返回值 :屏蔽门状态
|
||||
*/
|
||||
UINT8 GetPsdStateToVobc(const UINT16 doorId)
|
||||
{
|
||||
UINT8 chPsdState = 0U;
|
||||
UINT8 chPsdPlState = 0U;
|
||||
UINT8 chExceptOpenState = 0U;
|
||||
UINT8 chRet = 0U;
|
||||
chPsdPlState = GetPsdMutualLockRemoveState(doorId); /*屏蔽门互锁解除*/
|
||||
if ((PSD_MUTUALLOCK_REMOVE_YES == chPsdPlState) || (PSD_ATS_MUTUALLOCK_REMOVE_YES == chPsdPlState) || (PSD_ATS_AND_JD_MUTUALLOCK_REMOVE_YES == chPsdPlState))
|
||||
{
|
||||
/*屏蔽门互锁解除*/
|
||||
chRet = CI_IVOC_PSD_STATE_PANGLU;
|
||||
}
|
||||
else
|
||||
{
|
||||
chPsdState = GetPsdState(doorId);
|
||||
if (PSD_STATE_CLOSE == chPsdState)
|
||||
{/*屏蔽门关*/
|
||||
chRet = CI_IVOC_PSD_STATE_CLOSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*屏蔽门开, 判断是否异常*/
|
||||
chExceptOpenState = GePsdExceptState(doorId);
|
||||
if (PSD_EXCEPT_NO == chExceptOpenState)
|
||||
{
|
||||
chRet = CI_IVOC_PSD_STATE_OPEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*屏蔽门异常打开*/
|
||||
chRet = CI_IVOC_PSD_STATE_OPEN_EXCEPT;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "CommonTypes.h"
|
||||
#include "../System/CiSystemDefine.h"
|
||||
#include "../Relay/RelayConfigDataManage.h"
|
||||
#include "CiInterfaceDefine.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -59,7 +58,6 @@ typedef struct S_PsdDataStruct
|
||||
UINT32 StartDetectionCycNum; /*开启探测周期*/
|
||||
UINT8 StartDetectionState; /*启动探测状态*/
|
||||
UINT8 StopDetectionState; /*停止探测状态*/
|
||||
UINT32 StopDetectionCycNum; /*停止探测周期*/
|
||||
UINT8 VOBCDoorState; /*VOBC车门状态*/
|
||||
UINT32 PCBPressCycNum; /*PCB按下起始周期*/
|
||||
UINT32 POBPressCycNum; /*POB按下起始周期*/
|
||||
@@ -93,26 +91,9 @@ typedef struct S_PsdDataStruct
|
||||
UINT8 psdCloseErrState; /*关门故障状态*/
|
||||
UINT8 cPsdExceptOpenState; /*屏蔽门异常打开状态:0x55-异常打开,0xAA-未异常打开*/
|
||||
UINT32 dwPsdRelayDownCycNum; /*PSD门关继电器落下起始周期*/
|
||||
|
||||
UINT8 JXTCMutualLockFaultState; /*间隙探测互锁解除按钮故障状态 (动态字段)*/
|
||||
UINT32 JXTCMutualLockStartCycNum; /*间隙探测互锁解除起始时间*/
|
||||
UINT8 ibpButtonState; /*IBP盘发车按钮状态(动态字段)*/
|
||||
UINT32 IBPPressCycNum; /*IBP按下起始周期*/
|
||||
UINT8 chTrainZeroSpeedState; /*列车非零速状态*/
|
||||
} PsdDataStruct;
|
||||
|
||||
/*屏蔽门数据结构体*/
|
||||
typedef struct S_PsdDataStructCC
|
||||
{
|
||||
UINT16 PsdId; /*屏蔽门ID (初始化字段)*/
|
||||
UINT16 psdEditGroupInfo; /*屏蔽门编组信息CC(0-默认值,3-三编组,4-四编组,6-六编组,8-八编组)*/
|
||||
UINT16 SrcVobcId; /*操作该屏蔽门的当前VOBC编号CC*/
|
||||
UINT8 PsdCmd; /*操作屏蔽门的命令CC(0x00-默认值,0x55-打开PSD命令,0xAA-关闭PSD命令,0xFF-查询PSD命令)*/
|
||||
UINT32 CmdSetCycle;/*命令设置周期CC*/
|
||||
} PsdDataStructCC;
|
||||
|
||||
extern PsdDataStruct PsdDataStru[PSD_SUM_MAX]; /*定义屏蔽门数据结构体*/
|
||||
extern PsdDataStructCC PsdDataStruCC[PSD_SUM_MAX]; /*定义车车屏蔽门数据结构体*/
|
||||
|
||||
/*
|
||||
* 功能描述: 设置PSD的VOBC操作命令
|
||||
@@ -188,13 +169,6 @@ void ResetPsdData(const UINT16 psdId);
|
||||
*/
|
||||
PsdDataStruct *GetPsdData(void);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门数据CC
|
||||
* 参数说明:无
|
||||
* 返 回 值:车车屏蔽门动态数据
|
||||
*/
|
||||
PsdDataStructCC* GetPsdDataCC(void);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门互锁解除状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
@@ -387,7 +361,7 @@ UINT32 GetStartDetectionCycNum(const UINT16 doorId);
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStartDetectionState(const UINT16 doorId, const UINT8 detectionState);
|
||||
void SetStartDetectionState(const UINT16 doorId, const UINT32 detectionState);
|
||||
/*
|
||||
* 功能描述: 获取开始启动探测状态
|
||||
* 参数说明: const UINT16 routeId, 进路ID
|
||||
@@ -403,7 +377,7 @@ UINT8 GetStartDetectionState(const UINT16 doorId);
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStopDetectionState(const UINT16 doorId, const UINT8 detectionState);
|
||||
void SetStopDetectionState(const UINT16 doorId, const UINT32 detectionState);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取停止探测状态
|
||||
@@ -413,23 +387,6 @@ void SetStopDetectionState(const UINT16 doorId, const UINT8 detectionState);
|
||||
*/
|
||||
UINT8 GetStopDetectionState(const UINT16 doorId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定PSD停止探测周期号
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT32 startCycNum, 起始周期号
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetStopDetectionCycNum(const UINT16 doorId, const UINT32 startCycNum);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取停止探测起始周期号
|
||||
* 参数说明: const UINT16 doorId, 进路ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 起始周期号
|
||||
*/
|
||||
UINT32 GetStopDetectionCycNum(const UINT16 doorId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门开门按钮状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
@@ -542,7 +499,7 @@ UINT16 GetPsdEditGroupInfoFromPsdData(const UINT16 doorId);
|
||||
* 返回值 : 无
|
||||
*
|
||||
*/
|
||||
void SetVOBCDoorState(const UINT16 doorId, const UINT8 doorState);
|
||||
void SetVOBCDoorState(const UINT16 doorId, const UINT32 doorState);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取VOBC2CI车门状态信息
|
||||
@@ -926,22 +883,22 @@ void SetPsdVideoQkRelateVobcId(const UINT16 wPsdId, const UINT16 wVobcId);
|
||||
UINT16 GePsdVideoQkRelateVobcId(const UINT16 wPsdId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门异常状态
|
||||
* 功能描述:设置指定ID屏蔽门异常打开状态
|
||||
* 参数说明:const UINT16 wPsdId 屏蔽门ID
|
||||
* const UINT8 cExceptOpenState 屏蔽门异常状态
|
||||
* const UINT8 cExceptOpenState 屏蔽门异常打开状态
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.05.22
|
||||
*/
|
||||
void SetPsdExceptState(const UINT16 wPsdId, const UINT8 cExceptOpenState);
|
||||
void SetPsdExceptOpenState(const UINT16 wPsdId, const UINT8 cExceptOpenState);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门异常状态
|
||||
* 功能描述:获取指定ID屏蔽门异常打开状态
|
||||
* 参数说明:const UINT16 wPsdId 屏蔽门ID
|
||||
* 返 回 值:0x55 异常(曾异常打开未解除)
|
||||
* 0xAA 未异常
|
||||
* 返 回 值:0x55 异常打开
|
||||
* 0xAA 未异常打开
|
||||
* Created By LQ 2025.05.22
|
||||
*/
|
||||
UINT8 GePsdExceptState(const UINT16 wPsdId);
|
||||
UINT8 GePsdExceptOpenState(const UINT16 wPsdId);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定ID屏蔽门故障隔离信息
|
||||
@@ -1045,164 +1002,6 @@ UINT32 GetPsdRelayDownCycNum(const UINT16 doorId);
|
||||
*/
|
||||
void SetPsdRelayDownCycNum(const UINT16 doorId, const UINT32 startCycNum);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门编组信息CC
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* 返 回 值:0 无编组信息
|
||||
* 3 三编组
|
||||
* 4 四编组
|
||||
* 6 六编组
|
||||
* 8 八编组
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
UINT16 GetPsdEditGroupInfoDataCC(const UINT16 doorId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门编组信息CC
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT16 wPsdEditGroupInfo 屏蔽门编组信息
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
void SetPsdEditGroupInfoDataCC(const UINT16 doorId, const UINT16 wPsdEditGroupInfo);
|
||||
|
||||
/*
|
||||
* 功能描述:获取PSD的VOBC控制命令CC
|
||||
* 参数说明:const UINT16 doorId,屏蔽门ID
|
||||
* 返 回 值:0x00-默认值
|
||||
* 0x55-打开PSD命令
|
||||
* 0xAA-关闭PSD命令
|
||||
* 0xFF-查询PSD命令
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
UINT8 GetPsdVobcCmdCC(const UINT16 doorId);
|
||||
|
||||
/*
|
||||
* 功能描述: 获取当前控制该PSD的VOBC的编号CC
|
||||
* 参数说明: const UINT16 doorId,屏蔽门ID
|
||||
* 返 回 值: VOBC ID
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
UINT16 GetPsdVobcIdCC(const UINT16 doorId);
|
||||
|
||||
/*
|
||||
* 功能描述:获得该PSD的控制命令的设置周期CC
|
||||
* 参数说明:const UINT16 doorId,屏蔽门ID
|
||||
* 返 回 值:该PSD的控制命令的设置周期
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
UINT32 GetPsdCmdSetCycleCC(const UINT16 doorId);
|
||||
|
||||
/*
|
||||
* 功能描述:设置PSD的VOBC操作命令CC
|
||||
* 参数说明:const UINT16 doorId 屏蔽门ID
|
||||
* const UINT16 vobcId 操作屏蔽门的VOBC ID
|
||||
* const UINT8 operCmd 来自VOBC的开关门命令
|
||||
* const UINT32 dwCycNum 周期号
|
||||
* 返 回 值:无
|
||||
* Created By LQ 2025.11.05
|
||||
*/
|
||||
void SetPsdVobcCmdCC(const UINT16 doorId, const UINT16 vobcId, const UINT8 operCmd, const UINT32 dwCycNum);
|
||||
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门编组信息CC
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* 返 回 值:0 无编组信息
|
||||
* 3 三编组
|
||||
* 4 四编组
|
||||
* 6 六编组
|
||||
* 8 八编组
|
||||
*/
|
||||
UINT16 GetPsdEditGroupInfoData(const UINT16 doorId);
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门编组信息
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT16 wPsdEditGroupInfo 屏蔽门编组信息
|
||||
* 返 回 值:无
|
||||
*/
|
||||
void SetPsdEditGroupInfoData(const UINT16 doorId, const UINT16 wPsdEditGroupInfo);
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门间隙探测互锁解除故障状态
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* 返 回 值: 0 返回失败
|
||||
* 0< 间隙探测互锁解除故障状态
|
||||
*/
|
||||
UINT8 GetPsdJXTCMutualLockFaultState(const UINT16 doorId);
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门间隙探测互锁解除故障状态
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT8 wJXTCMutualLockFaultState 间隙探测互锁解除故障状态
|
||||
* 返 回 值:无
|
||||
*/
|
||||
void SetPsdJXTCMutualLockFaultState(const UINT16 doorId, const UINT8 wJXTCMutualLockFaultState);
|
||||
/*
|
||||
* 功能描述:获取指定ID屏蔽门间隙探测互锁解除时间
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* 返 回 值: 0 返回失败
|
||||
* 0< 屏蔽门间隙探测互锁解除时间
|
||||
*/
|
||||
UINT32 GetPsdJXTCMutualLockStartCycNum(const UINT16 doorId);
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门间隙探测互锁解除起始时间
|
||||
* 参数说明:const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT32 cycnum 互锁解除起始时间
|
||||
* 返 回 值:无
|
||||
*/
|
||||
void SetPsdJXTCMutualLockStartCycNum(const UINT16 doorId, const UINT32 cycnum);
|
||||
|
||||
/*
|
||||
* 功能描述: 设置指定ID屏蔽门IBP盘发车按钮状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* UINT8 setFlag 需设置的按钮状态
|
||||
* 返回值 : PSD_BUTTON_PANGLU_STATE_VALID 0x55 有效
|
||||
* PSD_BUTTON_PANGLU_STATE_INVALID 0xaa 无效
|
||||
*/
|
||||
UINT8 SetPsdButtonIbpState(const UINT16 doorId, const UINT8 setFlag);
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门IBP按下起始周期号
|
||||
* 参数说明: const UINT16 doorId,屏蔽门ID
|
||||
* 返回值 : 0: 获取数据失败
|
||||
* >0: 起始周期号
|
||||
*/
|
||||
UINT32 GetIBPPressCycNum(const UINT16 doorId);
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门IBP盘发车按钮状态
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* 返回值 :0: 获取数据失败
|
||||
* >0: IBP盘发车按钮状态
|
||||
*/
|
||||
UINT8 GetPsdButtonIbpState(const UINT16 doorId);
|
||||
/*
|
||||
* 功能描述:设置指定ID屏蔽门IBP按下起始周期号
|
||||
* 参数说明: const UINT16 doorId, 屏蔽门ID
|
||||
* const UINT32 startCycNum, 起始周期号
|
||||
* 返回值 : 0: 设置数据失败
|
||||
* >0: 设置数据成功
|
||||
*/
|
||||
UINT8 SetIBPPressCycNum(const UINT16 doorId, const UINT32 startCycNum);
|
||||
/*
|
||||
* 功能描述: 获取指定ID屏蔽门状态给 VOBC
|
||||
* 参数说明: const UINT16 doorId,屏蔽门ID
|
||||
* 返回值 :屏蔽门状态
|
||||
*/
|
||||
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)200U) /*定义屏蔽门数量最大值*/
|
||||
#define PSD_SUM_MAX ((UINT16)90U) /*定义屏蔽门数量最大值*/
|
||||
|
||||
/*和屏蔽门关联的出站进路数目最大值*/
|
||||
#define RALATED_OUT_STATION_ROUTE_SUM_MAX ((UINT16)10U) /*屏蔽门关联的出站进路数目最大值*/
|
||||
@@ -92,11 +92,9 @@
|
||||
#define PSD_SIX_EDIT_GROUP_FAO_YF ((UINT8)0x02U) /*六编组*/
|
||||
|
||||
/*屏蔽门编组信息定义*/
|
||||
#define PSD_EDIT_GROUP_DEFAULT ((UINT16)0x00U) /*默认值*/
|
||||
#define PSD_THREE_EDIT_GROUP ((UINT16)0x03U) /*三编组*/
|
||||
#define PSD_FOUR_EDIT_GROUP ((UINT16)0x04U) /*四编组*/
|
||||
#define PSD_SIX_EDIT_GROUP ((UINT16)0x06U) /*六编组*/
|
||||
#define PSD_EIGHT_EDIT_GROUP ((UINT16)0x08U) /*八编组*/
|
||||
#define PSD_FOUR_EDIT_GROUP ((UINT8)0x04U) /*四编组*/
|
||||
#define PSD_SIX_EDIT_GROUP ((UINT8)0x06U) /*六编组*/
|
||||
#define PSD_EIGHT_EDIT_GROUP ((UINT8)0x08U) /*八编组*/
|
||||
|
||||
/*办理出来的出站进路信号关闭是否在屏蔽门打开之前的标志*/
|
||||
#define PSD_OPEN_BEFORE_SIG_CLOSE_YES ((UINT8)0xaaU) /*屏蔽门打开之前信号关闭*/
|
||||
@@ -135,7 +133,6 @@
|
||||
#define PLATFORM_DEPAR_BUTTON_STATE_VALID ((UINT8)0x55U) /*有效*/
|
||||
#define PLATFORM_DEPAR_BUTTON_STATE_INVALID ((UINT8)0xaaU) /*无效*/
|
||||
#define PLATFORM_DEPAR_BUTTON_NO ((UINT8)0xccU) /*无站台发车按钮*/
|
||||
#define PLATFORM_DEPAR_BUTTON_STATE_FAULT ((UINT8)0xffU) /*站台发车按钮故障(IBP)*/
|
||||
|
||||
/*站台按钮旁路状态*/
|
||||
#define PSD_BUTTON_PANGLU_STATE_VALID ((UINT8)0x55U) /*有效*/
|
||||
@@ -198,13 +195,9 @@
|
||||
#define VIDEO_QK_DRIVE_STATE_TESTING ((UINT8)0xccU) /*视频清客驱动状态—检测中*/
|
||||
#define VIDEO_QK_DRIVE_STATE_INVALID ((UINT8)0xffU) /*视频清客驱动状态—无效*/
|
||||
|
||||
/*屏蔽门异常状态*/
|
||||
#define PSD_EXCEPT_NO ((UINT8)0xAAU) /*未异常*/
|
||||
#define PSD_EXCEPT_YES ((UINT8)0x55U) /*异常(曾异常打开未取消)*/
|
||||
|
||||
/*屏蔽门异常取消方式*/
|
||||
#define PSD_EXCEPT_CANCLE_ATS ((UINT8)0xAAU) /*ATS命令取消*/
|
||||
#define PSD_EXCEPT_CANCLE_RCI ((UINT8)0x55U) /*未异常打开时联锁自动取消异常*/
|
||||
/*屏蔽门异常打开状态*/
|
||||
#define PSD_EXCEPT_OPEN_NO ((UINT8)0xAAU) /*未异常打开*/
|
||||
#define PSD_EXCEPT_OPEN_YES ((UINT8)0x55U) /*异常打开*/
|
||||
|
||||
/*OC-P旁路状态确认*/
|
||||
#define OC_PSC_PL_CONFIRM_YES ((UINT8)0xaaU) /*OC-P旁路状态已确认*/
|
||||
@@ -214,22 +207,4 @@
|
||||
#define HIGH_FOUR_CHAR ((UINT8)0U) /*高四字节*/
|
||||
#define LOW_FOUR_CHAR ((UINT8)1U) /*低四字节*/
|
||||
|
||||
|
||||
/*间隙探测互锁解除故障状态*/
|
||||
#define JXTC_MUTUALLOCKFAULT_YES ((UINT8)0x55U) /*间隙探测互锁解除按钮故障*/
|
||||
#define JXTC_MUTUALLOCKFAULT_NO ((UINT8)0xaaU) /*间隙探测互锁解除按钮未故障*/
|
||||
#define JXTC_MUTUALLOCKFAULT_NOCHECK ((UINT8)0xFFU) /*间隙探测互锁解除按钮未检测*/
|
||||
|
||||
|
||||
#define PSD_INCLUDE_ESB_NUM ((UINT8)10U) /*ESB个数*/
|
||||
|
||||
/*CI-VOBC屏蔽门状态*/
|
||||
#define CI_IVOC_PSD_STATE_CLOSE ((UINT8)0xAAU) /*CI到IVOC屏蔽门关闭*/
|
||||
#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
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
#define ATS_CMD_SECTION_FENGSUO_CANCEL ((UINT8)0x61) /*区段解封*/
|
||||
#define ATS_CMD_PHYSEC_PRE_RESET_ONE ((UINT8)0x62) /*计轴预复位一次*/
|
||||
#define ATS_CMD_PHYSEC_PRE_RESET_TWO ((UINT8)0x63) /*计轴预复位二次*/
|
||||
#define ATS_CMD_CANCEL_XICHE ((UINT8)0x64) /*取消降级模式洗车命令*/
|
||||
#define ATS_CMD_CANCEL_XICHE ((UINT8)0x64) /*现地取消洗车命令*/
|
||||
#define ATS_CMD_PHYSEC_GENERAL_RESET_SET ((UINT8)0x65) /*计轴总复位命令*/
|
||||
#define ATS_CMD_PHYSEC_GENERAL_RESET_CANCEL ((UINT8)0x66) /*取消计轴总复位命令*/
|
||||
#define ATS_CMD_CICI_NET_TO_RELAY_ONE ((UINT8)0x68) /*联锁与联锁网络接口转继电接口一次命令*/
|
||||
@@ -115,9 +115,10 @@
|
||||
#define ATS_CMD_PSC_PL_ONE ((UINT8)0x70) /*设置PSC旁路一次命令*/
|
||||
#define ATS_CMD_PSC_PL_TWO ((UINT8)0x71) /*设置PSC旁路二次命令*/
|
||||
#define ATS_CMD_QUXIAO_PSC_PL_ONE ((UINT8)0x72) /*取消PSC旁路一次命令*/
|
||||
#define ATS_CMD_QUXIAO_PSC_PL_TWO ((UINT8)0x73) /*取消PSC旁路二次命令*/
|
||||
#define ATS_CMD_ROUTE_GROUP_AUTO_SET ((UINT8)0x74) /*办理组合自动进路命令*/
|
||||
#define ATS_CMD_ROUTE_GROUP_AUTO_CANCLE ((UINT8)0x75) /*取消组合自动进路命令*/
|
||||
#define ATS_CMD_QUXIAO_PSC_PL_TWO ((UINT8)0x73) /*取消PSC旁路二次命令*/
|
||||
#define ATS_CMD_ROUTE_GROUP_AUTO_SET ((UINT8)0x74) /*办理组合自动进路命令*/
|
||||
#define ATS_CMD_ROUTE_GROUP_AUTO_CANCLE ((UINT8)0x75) /*取消组合自动进路命令*/
|
||||
|
||||
#define ATS_CMD_SIGNALMAINTAINSTATE_ONE ((UINT8)0x76) /*信号机维修点灯一次*/
|
||||
#define ATS_CMD_SIGNALMAINTAINSTATE_TWO ((UINT8)0x77) /*信号机维修点灯二次*/
|
||||
#define ATS_CMD_CANCEL_SIG_MAINTAIN_ONE ((UINT8)0x78) /*取消信号机维修点灯一次*/
|
||||
@@ -126,12 +127,17 @@
|
||||
#define ATS_CMD_CANCEL_SW_ALARM_TWO ((UINT8)0x7b) /*取消转辙机封连报警二次命令*/
|
||||
#define ATS_CMD_RECOVER_SW_ALARM_ONE ((UINT8)0x7c) /*恢复转辙机封连报警一次命令*/
|
||||
#define ATS_CMD_RECOVER_SW_ALARM_TWO ((UINT8)0x7d) /*恢复转辙机封连报警二次命令*/
|
||||
|
||||
#define LABOR_CMD_CANCEL_OVERLAP_ONE ((UINT8)0x7e) /* 人工取消保护区段一次命令 */
|
||||
#define LABOR_CMD_CANCEL_OVERLAP_TWO ((UINT8)0x7f) /* 人工取消保护区段二次命令 */
|
||||
#define LABOR_CMD_SET_UP_OVERLAP ((UINT8)0x80) /* 人工建立保护区段命令,合代码暂时改成80 */
|
||||
|
||||
#define ATS_CMD_ROUTE_APPLY ((UINT8)0x92) /*申请路径*/
|
||||
#define ATS_CMD_ROUTE_APPLY_CANCLE ((UINT8)0x93) /*取消申请路径*/
|
||||
#define ATS_CMD_ROUTE_PART_APPLY ((UINT8)0x94) /*申请部分路径*/
|
||||
#define ATS_CMD_ROUTE_PART_APPLY_CANCEL ((UINT8)0x95) /*取消申请部分路径*/
|
||||
#define ATS_CMD_AUTO_RETURN_SET_ONE ((UINT8)0x96) /*自动折返一次有效命令*/
|
||||
#define ATS_CMD_AUTO_RETURN_CMD_CANCEL ((UINT8)0x97) /*取消自动折返命令*/
|
||||
#define ATS_CMD_SET_PHYSEC_ERR ((UINT8)0x98) /*物理区段故障占用设置命令*/
|
||||
#define ATS_CMD_CANCEL_PHYSEC_FIRST ((UINT8)0x99) /*物理区段故障占用取消一次命令*/
|
||||
#define ATS_CMD_CANCEL_PHYSEC_SECOND ((UINT8)0x9a) /*物理区段故障占用取消二次命令*/
|
||||
@@ -140,32 +146,25 @@
|
||||
#define ATS_CMD_OPEN_XIANSU_SIGNAL_FIRST ((UINT8)0x9d) /*开放限速信号一次*/
|
||||
#define ATS_CMD_OPEN_XIANSU_SIGNAL_SECOND ((UINT8)0x9e) /*开放限速信号二次*/
|
||||
#define ATS_CMD_OPEN_XIANSU_SIGNAL_SPECIAL ((UINT8)0xa6) /*限速信号特殊开放*/
|
||||
|
||||
#define ATS_CMD_OC_P_PL_ONE ((UINT8)0xa8) /*设置OC-P旁路一次命令*/
|
||||
#define ATS_CMD_OC_P_PL_TWO ((UINT8)0xa9) /*设置OC-P旁路二次命令*/
|
||||
#define ATS_CMD_QUXIAO_OC_P_PL_ONE ((UINT8)0xaa) /*取消OC-P旁路一次命令*/
|
||||
#define ATS_CMD_QUXIAO_OC_P_PL_TWO ((UINT8)0xab) /*取消OC-P旁路二次命令*/
|
||||
|
||||
#define ATS_CMD_GET_CTRL_POWER ((UINT8)0x81) /* 获取联锁控制权*/
|
||||
#define ATS_CMD_RELEASE_CTRL_POWER ((UINT8)0x82) /* 释放联锁控制权*/
|
||||
|
||||
#define ATS_CMD_ROUTE_AUTO_TRIGGER_SET (UINT8)0x83 /*单个进路自动触发进路办理 */
|
||||
#define ATS_CMD_ROUTE_CANCLE_AUTO_TRIGGER (UINT8)0x84 /*单个进路取消自动触发进路 */
|
||||
#define ATS_CMD_SWITCH_DINGWEI_TEST_ONE ((UINT8)0x85) /* 道岔定位测试一次命令*/
|
||||
#define ATS_CMD_SWITCH_DINGWEI_TEST_TWO ((UINT8)0x86) /* 道岔定位测试二次命令*/
|
||||
#define ATS_CMD_SWITCH_FANWEI_TEST_ONE ((UINT8)0x87) /* 道岔反位测试一次命令*/
|
||||
#define ATS_CMD_SWITCH_FANWEI_TEST_TWO ((UINT8)0x88) /*道岔反位测试二次命令*/
|
||||
|
||||
#define SCX_ATS_CMD_ESS_GO_POSITION (UINT8)0x89 /*ESS去位命令*/
|
||||
#define SCX_ATS_CMD_ESS_STOP_POSITION (UINT8)0x90 /*ESS停位命令*/
|
||||
#define ATS_CMD_STATION_QK_SET (UINT8)0x91 /*站台清客标志设置 */
|
||||
#define ATS_CMD_EMERG_XS_SET_ONE (UINT8)0xAC /*设置紧急临时限速一次命令 */
|
||||
#define ATS_CMD_EMERG_XS_SET_TWO (UINT8)0xAD /*设置紧急临时限速二次命令 */
|
||||
#define ATS_CMD_EMERG_XS_CANCEL_ONE (UINT8)0xAE /*取消紧急临时限速一次命令 */
|
||||
#define ATS_CMD_EMERG_XS_CANCEL_TWO (UINT8)0xAF /*取消紧急临时限速二次命令 */
|
||||
#define ATS_CMD_COUPLING_ROUTE_SET (UINT8)0xB0 /*联挂进路办理 */
|
||||
#define ATS_CMD_APPLY_XICHE ((UINT8)0xB1) /*降级模式洗车请求*/
|
||||
#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) /*物理区段征用申请*/
|
||||
@@ -238,7 +237,7 @@
|
||||
#define CI_BACK_ROUTE_LOCK_NOTALL ((UINT8)0x06) /*进路不完整锁闭?新增?*/
|
||||
|
||||
#define CI_BACK_ROUTE_LEVEL_CBTC ((UINT8)0x08) /*进路监督级别不为点式?未使用?*/
|
||||
#define CI_BACK_ROUTE_LEVEL_BLOC ((UINT8)0xBA) /*进路监督级别不为CBTC*/
|
||||
#define CI_BACK_ROUTE_LEVEL_BLOC ((UINT8)0x00) /*进路监督级别不为CBTC?未使用?*/
|
||||
#define CI_BACK_ROUTE_TYPE_ERROR ((UINT8)0x00) /*进路类型异常?未使用?*/
|
||||
#define CI_BACK_ROUTE_STATE_ERROR ((UINT8)0x59) /*进路建立条件不满足*/
|
||||
#define CI_BACK_RETURN_ROUTE_STATE_ERROR ((UINT8)0x5A) /*折返进路不允许追踪办理*/
|
||||
@@ -248,10 +247,8 @@
|
||||
|
||||
#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) /*进路始端信号机开放*/
|
||||
@@ -292,7 +289,6 @@
|
||||
#define CI_BACK_PSEC_RESET_IN_CT ((UINT8)0x58) /*计轴复位中CT占用*/
|
||||
#define UNLOCK_OVELAP_CANNOT (UINT8)0x80 /*解锁保护区段条件不满足*/
|
||||
#define LOCK_OVELAP_OUT_CANNOT (UINT8)0x81 /*保护区段锁闭条件不满足*/
|
||||
#define CI_BACK_PSEC_RESET_ING ((UINT8)0xAE) /*物理区段正在计轴复位*/
|
||||
|
||||
/*道岔故障反馈*/
|
||||
#define CI_BACK_SWT_YLOCK_YES ((UINT8)0x31) /*道岔引导总锁*/
|
||||
@@ -341,14 +337,6 @@
|
||||
#define CI_BACK_OTHER_ROUTE_NOT_OPEN ((UINT8)0x9D) /*进路其他联锁条件需开放进路未开放*/
|
||||
#define CI_BACK_WASH_PASS_ALLOW_NOT ((UINT8)0x9E) /*洗车库/线未同意通过*/
|
||||
|
||||
#define CI_BACK_WASH_APPLY_NOT ((UINT8)0xB3) /*洗车机洗车请求有效,请勿重复操作*/
|
||||
#define CI_BACK_WASH_PASSAPPLY_NOT ((UINT8)0xB4) /*洗车机反向通过请求有效,请勿重复操作*/
|
||||
#define CI_BACK_ROUTE_IDLE_NOT ((UINT8)0xB5) /*进路未空闲,请先取消进路*/
|
||||
#define CI_BACK_WASH_BUTTON_PRESS_NOT ((UINT8)0xB6) /*洗车同意按钮未按下,不需要取消*/
|
||||
#define CI_BACK_WASH_PASSBUTTON_PRESS_NOT ((UINT8)0xB7) /*洗车反向通过同意按钮未按下,不需要取消*/
|
||||
#define CI_BACK_WASH_APPLY_BUTTON_NOT ((UINT8)0xB8) /*洗车机XXX洗车同意按钮在规定时间内未按下,洗车请求失效*/
|
||||
#define CI_BACK_WASH_PASS_BUTTON_NOT ((UINT8)0xB9) /*洗车机XXX反向同意按钮在规定时间内未按下,反向通过请求失效*/
|
||||
|
||||
/* 设置与取消物理区段故障列车占用反馈 */
|
||||
#define CI_BACK_SPE_TRAIN_DIR_ERR ((UINT8)0x86) /*设置物理区段故障车占用:与已存在的故障车方向不一致*/
|
||||
#define CI_BACK_SPE_LOOK_DIR_ERR ((UINT8)0x87) /*设置物理区段故障车占用:与物理区段锁闭方向不一致*/
|
||||
@@ -460,60 +448,16 @@
|
||||
|
||||
#define CI_BACK_AUTO_ROUTE_HAVE_BLOCK ((UINT8)0x95) /*自动通过进路自动进路存在封锁*/
|
||||
#define CI_BACK_AUTO_ROUTE_FLOOD_STATE_ERR ((UINT8)0x96) /*自动通过进路存在防淹门不满足*/
|
||||
#define CI_BACK_AUTO_ROUTE_COUPROUTE_SET ((UINT8)0xB0) /*自动通过联挂进路已办理*/
|
||||
|
||||
|
||||
|
||||
#define CI_BACK_AUTO_RETURN_HAVE_BLOCK ((UINT8)0x98) /*自动折返进路存在封锁*/
|
||||
#define CI_BACK_AUTO_RETURN_FLOOD_STATE_ERR ((UINT8)0x99) /*自动折返进路存在防淹门不满足*/
|
||||
#define CI_BACK_AUTO_RETURN_COUPROUTE_SET ((UINT8)0xB1) /*自动折返联挂进路已办理*/
|
||||
|
||||
|
||||
#define CI_BACK_ALLAUTO_RETURN_HAVE_BLOCK ((UINT8)0x9B) /*全自动折返进路存在封锁*/
|
||||
#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
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user