/********************************************************
*                                                                                                            
* 文 件 名： 2oo2DataTransferManage.c   
* 版权说明： 北京交控科技有限公司 
* 创建时间： 2011-06-24
* 作    者： 郭文章
* 功能描述： 联锁应用数据转换
* 修改记录：   
*
********************************************************/ 

#include "2oo2DataTransferManage.h"
#include "HLHTHeadContexManage.h"
#include "ParsePackGateWayData.h"
#include "WLBrakeDataManage.h"
#include "NonAutoReturnDataManage.h"
#include "DynamicRouteDataManage.h"
#include "../Deployment/DeploymentExtern.h"

/*交换变量*/
extern UINT16 TransmitStateDataCurSum;	/*通信关系状态数据当前总数*/
extern UINT8 ComCycNumForCiToAts;		/*联锁到ATS通信周期记录*/
extern UINT8 ComCycNumForCiToXianDi;	/*联锁到现地通信周期记录*/

extern TransmitStateDataStruct TransmitStateDataStru[TRANSMIT_OBJECT_SUM_MAX * TRANSMIT_OBJECT_DEVICE_SUM_MAX];  /*定义通信状态结构体*/




/*
* 功能描述： 拷贝结构中有效的id数据
	输入参数
		const void *pDataStru 结构体指针
		UINT16 struNum:数组长度,
		UINT16 struLength:结构体长度
	输出参数
		UINT8 *pCurCiAppDataPointer:当前数据指针,
* 返回值  ： 拷贝数据的长度
* 注   意 ； 只适用于结构体第一个元素为两个字节的ID
*/
UINT32 CopyValidGetDataStru(UINT8 *pCurCiAppDataPointer, const void *pDataStru, UINT16 struNum, UINT16 struLength)
{
	UINT32 curIndex = 0u;

	UINT16 ValidIdNum = 0u;

	UINT16 i = 0u;

	void * pSrcAddr = NULL;

	/*入参校验*/
	if((NULL != pCurCiAppDataPointer) && (NULL != pDataStru) && (0u != struNum) && (0u != struLength))
	{
		curIndex += (UINT32)sizeof(UINT16);

		for(i = 0u; i < struNum; i++)
		{
			pSrcAddr = (const UINT8 *)pDataStru + struLength * i;			

			/*结构体元素前两个字节ID为0时，是无效数据,此处过滤掉，提高效率*/
			if(0u != ShortFromCharLE(pSrcAddr))
			{
				(void)memcpy(pCurCiAppDataPointer + curIndex, pSrcAddr, struLength);
		
				curIndex += (UINT32)struLength;
				
				ValidIdNum++;
			}
			else
			{
				/*不执行任何操作*/
			}
		}

		/*拷贝有效长度*/
		ShortToChar(ValidIdNum, pCurCiAppDataPointer);
	}
	else
	{
		curIndex = 0u;
		
		debug_infor_printf((const)"ERROR: Parameter is invailid\n");
	}

	return curIndex;
}
/*
* 功能描述： 拷贝结构中有效的通信车id数据
	输入参数
		VobcToCiDataStruct *pDataStru 结构体指针
		UINT16 struNum:数组长度,
	输出参数
		UINT8 *pCurCiAppDataPointer:当前数据指针,
* 返回值  ： 拷贝数据的长度
* 注   意 ； 只适用于结构体第一个元素为两个字节的ID
*/
UINT32 CopyValidGetVobcDataStru(UINT8* pCurCiAppDataPointer, VobcToCiDataStruct* pDataStru, UINT16 struNum)
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;

	/*入参校验*/
	if ((NULL != pCurCiAppDataPointer) && (NULL != pDataStru) && (0U != struNum))
	{
		curIndex += (UINT32)sizeof(UINT16);  /*VOBC数量*/

		for (i = 0U; i < struNum; i++)
		{
			/*结构体元素前两个字节VOBC ID为0时，是无效数据,此处过滤掉，提高效率*/
			if (0U != pDataStru[i].VobcId)
			{
				ShortToChar(pDataStru[i].VobcId, &pCurCiAppDataPointer[curIndex]);  /*拷贝VOBC ID*/
				curIndex += 2U;

				pCurCiAppDataPointer[curIndex] = pDataStru[i].trainDirection;  /*拷贝列车运行方向*/
				curIndex++;

				pCurCiAppDataPointer[curIndex] = pDataStru[i].chTrainLevel;  /*拷贝列车运行级别*/
				curIndex++;

				ShortToChar(pDataStru[i].wTrainMaxSafeHeadLink, &pCurCiAppDataPointer[curIndex]);  /*拷贝大前link ID*/
				curIndex += 2U;

				LongToChar(pDataStru[i].dwTrainMaxSafeHeadOffset, &pCurCiAppDataPointer[curIndex]);  /*拷贝大前link偏移量*/
				curIndex += 4U;

				ShortToChar(pDataStru[i].wTrainMinSafeHeadLink, &pCurCiAppDataPointer[curIndex]);  /*拷贝小前link ID*/
				curIndex += 2U;

				LongToChar(pDataStru[i].dwTrainMinSafeHeadOffset, &pCurCiAppDataPointer[curIndex]);  /*拷贝小前link偏移量*/
				curIndex += 4U;

				ShortToChar(pDataStru[i].wTrainMaxSafeTailLink, &pCurCiAppDataPointer[curIndex]);  /*拷贝大后link ID*/
				curIndex += 2U;

				LongToChar(pDataStru[i].dwTrainMaxSafeTailOffset, &pCurCiAppDataPointer[curIndex]);  /*拷贝大后link偏移量*/
				curIndex += 4U;

				ShortToChar(pDataStru[i].wTrainMinSafeTailLink, &pCurCiAppDataPointer[curIndex]);  /*拷贝小后link ID*/
				curIndex += 2U;

				LongToChar(pDataStru[i].dwTrainMinSafeTailOffset, &pCurCiAppDataPointer[curIndex]);  /*拷贝小后link偏移量*/
				curIndex += 4U;

				ShortToChar(pDataStru[i].wTrainSpeed, &pCurCiAppDataPointer[curIndex]);  /*拷贝列车速度*/
				curIndex += 2U;

				pCurCiAppDataPointer[curIndex] = pDataStru[i].chSpeedDir;  /*拷贝列车速度方向*/
				curIndex++;

				LongToChar(pDataStru[i].ComStartCycle, &pCurCiAppDataPointer[curIndex]);  /*拷贝列车通信起始时间*/
				curIndex += 4U;

				ShortToChar(pDataStru[i].appInfoType, &pCurCiAppDataPointer[curIndex]);  /*拷贝应用信息类型*/
				curIndex += 2U;

				ShortToChar(pDataStru[i].vobcLogId, &pCurCiAppDataPointer[curIndex]);  /*拷贝VOBC互联互通ID*/
				curIndex += 2U;

				LongToChar(pDataStru[i].signalID, &pCurCiAppDataPointer[curIndex]);  /*拷贝VOBC->CI信号机ID*/
				curIndex += 4U;

				pCurCiAppDataPointer[curIndex] = pDataStru[i].chLogOutState;  /*拷贝注销申请状态*/
				curIndex++;

				ValidIdNum++;
			}
			else
			{
				/*不执行任何操作*/
			}
		}

		ShortToChar(ValidIdNum, pCurCiAppDataPointer);  /*拷贝有效长度*/
	}
	else
	{
		curIndex = 0U;

		debug_infor_printf((const)"ERROR: Parameter is invailid\n");
	}

	return curIndex;
}

/*
* 功能描述：拷贝结构中通信正常的ITE数据
* 参数说明：IteToCiDataStruct pDataStru[ITE_TO_CI_SUM_MAX] ITE结构体数组
*		    UINT16 struNum 数组长度
*		    UINT8* pCurCiAppDataPointer 当前数据指针（出参）
* 返 回 值：拷贝的数据长度
* Created By LQ 2024.06.15
*/
UINT32 CopyValidGetIteDataStru(UINT8* pCurCiAppDataPointer, IteToCiDataStruct pDataStru[ITE_TO_CI_SUM_MAX], UINT16 struNum)
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;

	/*入参校验*/
	if ((NULL != pCurCiAppDataPointer) && (NULL != pDataStru) && (0U != struNum))
	{
		curIndex += (UINT32)sizeof(UINT16);  /*ITE数量*/

		for (i = 0U; i < struNum; i++)
		{
			/*结构体元素前两个字节ITE ID为0时，是无效数据,此处过滤掉，提高效率*/
			if (0U != pDataStru[i].wIteId)
			{
				ShortToChar(pDataStru[i].wIteId, &pCurCiAppDataPointer[curIndex]);  /*拷贝ITE ID*/
				curIndex += 2U;

				ShortToChar(pDataStru[i].wIteLogId, &pCurCiAppDataPointer[curIndex]);  /*拷贝ITE逻辑ID*/
				curIndex += 2U;

				LongToChar(pDataStru[i].dwComStartCycCount, &pCurCiAppDataPointer[curIndex]);  /*拷贝通信起始周期*/
				curIndex += 4U;

				ValidIdNum++;
			}
			else
			{
				/*不执行任何操作*/
			}
		}

		ShortToChar(ValidIdNum, pCurCiAppDataPointer);  /*拷贝有效长度*/
	}
	else
	{
		curIndex = 0U;

		debug_infor_printf((const)"ERROR: Parameter is invailid\n");
	}

	return curIndex;
}

/*
* 功能描述： 拷贝有效互联互通头
输入参数
const void *pDataStru 结构体指针
UINT16 struNum:数组长度,
UINT16 struLength:结构体长度
输出参数
UINT8 *pCurCiAppDataPointer:当前数据指针,
* 返回值  ： 拷贝数据的长度
* 注   意 ； 按照互联互通的头的id判定有效
*/
UINT32 CopyValidGetVobcBackHlht(UINT8 *pCurCiAppDataPointer, UINT16 struNum, UINT16 struLength)
{
	UINT32 curIndex = 0U;

	UINT16 ValidIdNum = 0U;

	UINT16 i = 0U;

	/*入参校验*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (0U != struLength)&&(NULL != vobcBackupHLHTHeadCtxs))
	{
		curIndex += (UINT32)sizeof(UINT16);
		
		for (i = 0U; i < struNum; i++)
		{
			/*互联互通头id为0时，是无效数据*/
			if (0U != vobcBackupHLHTHeadCtxs[i].sourceId)
			{
				(void)CommonMemCpy((void *)(pCurCiAppDataPointer + curIndex), struLength, (void *)(&vobcBackupHLHTHeadCtxs[i]), struLength);
				curIndex += (UINT32)struLength;

				ValidIdNum++;
			}
			else
			{
				/*不执行任何操作*/
			}
		}

		/*拷贝有效长度*/
		ShortToChar(ValidIdNum, pCurCiAppDataPointer);
	}
	else
	{
		curIndex = 0u;

		debug_infor_printf((const)"ERROR: Parameter is invailid\n");
	}

	return curIndex;
}

/*
* 功能描述： 拷贝结构中逻辑进路数据
	输出参数
		UINT8 *pCurCiAppDataPointer:当前数据指针,
* 返回值  ： 拷贝数据的长度
* 注   意 ； 只适用于结构体第一个元素为两个字节的ID
*/
UINT32 CopyValidGetLogicRouteDataStru(UINT8* pCurCiAppDataPointer)
{
	UINT32 curIndex = 0U;

	UINT16 ValidIdNum = 0U;

	UINT16 i = 0U;
	UINT16 wLogRouteId = 0U;
	UINT8 cRouteState = ROUTE_LOGICAL_STATE_IDLE;

	void* pSrcAddr = NULL;

	/*入参校验*/
	if (NULL != pCurCiAppDataPointer)
	{
		curIndex += (UINT32)sizeof(UINT16);

		for (i = 1U; i < ROUTE_LOGICAL_SUM_MAX; i++)
		{
			pSrcAddr = (UINT8*)(void*)&LogicalRouteDataStru[i];

			wLogRouteId = GetLogicalRouteId(i - 1U);
			cRouteState = GetLogicalRouteState(wLogRouteId);

			if ((ROUTE_LOGICAL_STATE_IDLE != cRouteState) && (0U != cRouteState))
			{
				/*结构体元素前两个字节ID为0时，是无效数据,此处过滤掉，提高效率*/
				if (0U != ShortFromCharLE(pSrcAddr))
				{
					(void)memcpy(pCurCiAppDataPointer + curIndex, pSrcAddr, sizeof(LogicalRouteDataStruct));

					curIndex += (UINT32)sizeof(LogicalRouteDataStruct);

					ValidIdNum++;
				}
				else
				{
					/*不执行任何操作*/
				}
			}
		}

		/*拷贝有效长度*/
		ShortToChar(ValidIdNum, pCurCiAppDataPointer);
	}
	else
	{
		curIndex = 0U;

		debug_infor_printf((const)"ERROR: Parameter is invailid\n");
	}

	return curIndex;
}

/*
* 功能描述： 拷贝有效数据到对应的全局数组
* 参数说明： 
	输入参数
	const UINT8 *pCurCiAppDataPointer:当前数据指针
	UINT16 struNum:数组长度,
	UINT16 struLength:结构体长度
	输出参数
	void *pDataStru:结构体指针,
* 返回值  ： 拷贝数据的长度
* 注   意 ； 只适用于结构体第一个元素为两个字节的ID
*/
UINT32 CopyValidSetDataStru(const UINT8 *pCurCiAppDataPointer, void *pDataStru, UINT16 struNum, UINT16 struLength)
{
	UINT32 curIndex = 0u;

	UINT16 i = 0u;

	UINT16 ValidIdNum = 0u;

	UINT16 dataStruIndex = 0u;

	void * pDstAddr = NULL;

	/*入参校验*/
	if((NULL != pCurCiAppDataPointer) && (NULL != pDataStru) && (0u != struNum) && (0u != struLength))
	{
		/*获取总的有效ID个数*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);

		curIndex += (UINT32)sizeof(UINT16);

		for(i = 0u; i < ValidIdNum; i++)
		{	
			dataStruIndex = ShortFromCharLE(pCurCiAppDataPointer + curIndex);
		
			if(dataStruIndex < struNum)
			{
				pDstAddr = (UINT8 *)pDataStru + struLength * dataStruIndex;
			
				(void)memcpy(pDstAddr, pCurCiAppDataPointer + curIndex, struLength);
		
				curIndex += (UINT32)struLength;
			}
			else
			{
				curIndex += (UINT32)struLength;

				debug_infor_printf((const)"ERROR: SetValidIdNum = %d\n", (const) dataStruIndex);
			}
		}
	}
	else
	{
		curIndex = 0u;

		debug_infor_printf((const)"ERROR: Parameter is invailid\n");
	}
	
	return curIndex;
}

/*
* 功能描述： 拷贝通信车有效数据到对应的全局数组
* 参数说明：
	输入参数
	const UINT8 *pCurCiAppDataPointer:当前数据指针
	UINT16 struNum:数组长度,
	输出参数
	VobcToCiDataStruct *pDataStru:结构体指针,
* 返回值  ： 拷贝数据的长度
* 注   意 ； 只适用于结构体第一个元素为两个字节的ID
*/
UINT32 CopyValidSetVobcDataStru(const UINT8* pCurCiAppDataPointer, VobcToCiDataStruct* pDataStru, UINT16 struNum)
{
	UINT32 curIndex = 0U;
	UINT16 i = 0U;
	UINT16 ValidIdNum = 0U;

	/*入参校验*/
	if ((NULL != pCurCiAppDataPointer) && (NULL != pDataStru) && (0U != struNum))
	{
		/*获取总的有效ID个数*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);

		curIndex += (UINT32)sizeof(UINT16);

		for (i = 0U; i < ValidIdNum; i++)
		{
			if (i < struNum)
			{
				pDataStru[i].VobcId = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步VOBC ID*/
				curIndex += 2U;

				pDataStru[i].trainDirection = pCurCiAppDataPointer[curIndex];  /*同步列车运行方向*/
				curIndex++;

				pDataStru[i].chTrainLevel = pCurCiAppDataPointer[curIndex];  /*同步列车运行级别*/
				curIndex++;

				pDataStru[i].wTrainMaxSafeHeadLink = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车大前link ID*/
				curIndex += 2U;

				pDataStru[i].dwTrainMaxSafeHeadOffset = LongFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车大前link偏移量*/
				curIndex += 4U;

				pDataStru[i].wTrainMinSafeHeadLink = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车小前link ID*/
				curIndex += 2U;

				pDataStru[i].dwTrainMinSafeHeadOffset = LongFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车小前link偏移量*/
				curIndex += 4U;

				pDataStru[i].wTrainMaxSafeTailLink = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车大后link ID*/
				curIndex += 2U;

				pDataStru[i].dwTrainMaxSafeTailOffset = LongFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车大后link偏移量*/
				curIndex += 4U;

				pDataStru[i].wTrainMinSafeTailLink = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车小后link ID*/
				curIndex += 2U;

				pDataStru[i].dwTrainMinSafeTailOffset = LongFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车小后link偏移量*/
				curIndex += 4U;

				pDataStru[i].wTrainSpeed = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车速度*/
				curIndex += 2U;

				pDataStru[i].chSpeedDir = pCurCiAppDataPointer[curIndex];  /*同步列车速度方向*/
				curIndex++;

				pDataStru[i].ComStartCycle = LongFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步列车通信起始时间*/
				curIndex += 4U;

				pDataStru[i].appInfoType = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步应用信息类型*/
				curIndex += 2U;

				pDataStru[i].vobcLogId = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步VOBC互联互通ID*/
				curIndex += 2U;

				pDataStru[i].signalID = LongFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步VOBC->CI信号机ID*/
				curIndex += 4U;

				pDataStru[i].chLogOutState = pCurCiAppDataPointer[curIndex];  /*同步注销申请状态*/
				curIndex++;			
			}
			else
			{
				curIndex += VOBC_2X_DATA_LEN;
				debug_infor_printf((const)"ERROR: SetValidIdNum = %d\n", i);
			}
		}
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: Parameter is invailid\n");
	}

	return curIndex;
}

/*
* 功能描述：拷贝ITE有效数据到对应的全局数组
* 参数说明：const UINT8 *pCurCiAppDataPointer:当前数据指针
*        	UINT16 struNum 数组长度
*	        IteToCiDataStruct pDataStru[ITE_TO_CI_SUM_MAX] ITE结构体数组 （出参）
* 返 回 值：拷贝数据的长度
* Created By LQ 2024.06.15
*/
UINT32 CopyValidSetIteDataStru(const UINT8* pCurCiAppDataPointer, IteToCiDataStruct pDataStru[ITE_TO_CI_SUM_MAX], UINT16 struNum)
{
	UINT32 curIndex = 0U;
	UINT16 i = 0U;
	UINT16 ValidIdNum = 0U;

	/*入参校验*/
	if ((NULL != pCurCiAppDataPointer) && (NULL != pDataStru) && (0U != struNum))
	{
		/*获取总的有效ID个数*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);

		curIndex += (UINT32)sizeof(UINT16);

		for (i = 0U; i < ValidIdNum; i++)
		{
			if (i < struNum)
			{
				pDataStru[i].wIteId = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步ITE ID*/
				curIndex += 2U;

				pDataStru[i].wIteLogId = ShortFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步ITE逻辑ID*/
				curIndex += 2U;

				pDataStru[i].dwComStartCycCount = LongFromChar(&pCurCiAppDataPointer[curIndex]);  /*同步与ITE通信起始周期*/
				curIndex += 4U;
			}
			else
			{
				curIndex += ITE_2X_DATA_LEN;
				debug_infor_printf((const)"ERROR:ITE SetValidIdNum = %d\n", i);
			}
		}
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: ITE Parameter is invailid\n");
	}

	return curIndex;
}

/*
* 功能描述： 拷贝有效互联互通给数据头到对应的全局数组
* 参数说明：
输入参数
const UINT8 *pCurCiAppDataPointer:当前数据指针
UINT16 struNum:数组长度,
UINT16 struLength:结构体长度
输出参数
* 返回值  ： 拷贝数据的长度
*/
UINT32 CopyValidSetVobcBackHlht(const UINT8 *pCurCiAppDataPointer,UINT16 struNum, UINT16 struLength)
{
	UINT32 curIndex = 0U;

	UINT16 i = 0U;

	UINT16 ValidIdNum = 0U;

	UINT8  devId = 0U;

	HLHTHeadContextStru temp = { 0 };

	/*入参校验*/
	if ((NULL != pCurCiAppDataPointer) && (NULL != vobcBackupHLHTHeadCtxs) && (0U != struNum) && (0U != struLength))
	{
		/*获取总的有效ID个数*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);

		curIndex += (UINT32)sizeof(UINT16);

		for (i = 0u; i < ValidIdNum; i++)
		{
			/*保存到临时结构体并获取设备id*/
			(void)CommonMemCpy((void *)(&temp), struLength, (const void *)(pCurCiAppDataPointer + curIndex), struLength);
			devId = temp.sourceId;
			if (devId  <  struNum)
			{
				/*保存到全局数据*/
				(void)CommonMemCpy((void *)(&vobcBackupHLHTHeadCtxs[devId]), struLength, (const void *)(&temp), struLength);
				curIndex += (UINT32)struLength;
			}
			else
			{
				curIndex += (UINT32)struLength;

				debug_infor_printf((const)"ERROR: SetValidIdNum = %d\n", devId);
			}
		}
	}
	else
	{
		curIndex = 0u;

		debug_infor_printf((const)"ERROR: Parameter is invailid\n");
	}

	return curIndex;
}

/*
* 功能描述： 拷贝逻辑进路有效数据到对应的全局数组
* 参数说明：
	输入参数
	const UINT8 *pCurCiAppDataPointer:当前数据指针
* 返回值  ： 拷贝数据的长度
* 注   意 ； 只适用于结构体第一个元素为两个字节的ID
*/
UINT32 CopyValidSetLogicRouteDataStru(const UINT8* pCurCiAppDataPointer)
{
	UINT32 curIndex = 0U;

	UINT32 i = 0U;

	UINT16 ValidIdNum = 0U;
	UINT16 dataStruIndex = 0u;
	void* pDstAddr = NULL;

	/*入参校验*/
	if (NULL != pCurCiAppDataPointer)
	{
		/*获取总的有效ID个数*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);

		curIndex += (UINT32)sizeof(UINT16);

		for (i = 0U; i < ValidIdNum; i++)
		{
			dataStruIndex = ShortFromCharLE(pCurCiAppDataPointer + curIndex);
			if (ROUTE_LOGICAL_SUM_MAX > i)
			{
				pDstAddr = (UINT8*)(void*)&LogicalRouteDataStru[dataStruIndex];

				(void)memcpy(pDstAddr, pCurCiAppDataPointer + curIndex, sizeof(LogicalRouteDataStruct));

				curIndex += (UINT32)sizeof(LogicalRouteDataStruct);
			}
			else
			{
				curIndex += (UINT32)sizeof(LogicalRouteDataStruct);

				debug_infor_printf((const)"ERROR: SetValidIdNum = %d\n", i);
			}
		}
	}
	else
	{
		curIndex = 0U;

		debug_infor_printf((const)"ERROR: Parameter is invailid\n");
	}

	return curIndex;
}

/*
* 功能描述： 获取CI应用数据
* 参数说明： UINT8 *pCiAppDataPointer, CI应用数据指针
* 返回值  ： void      
*/
UINT32 GetCiAppData(UINT8 *pCiAppDataPointer)
{
	UINT32 curIndex = 0u;         /*记录移动下标*/
	UINT32 curResult = 0u;        /*拷贝结构中有效的id数据*/
	UINT8 ii= 0u;
	UINT32 crcIndex = 0u;		  /*用于计算CRC的下标*/
	UINT32 crcLength = 0u;		  /*用于计算CRC的长度*/
	UINT32 crcResult = 0u;		  /*用于存放CRC值*/
	
	if (NULL != pCiAppDataPointer)
	{

        /*拷贝全站亮灯标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &AllSignalBrightFlag, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

        /*拷贝全站引导总锁标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &AllSwitchYLockFlag, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

        /*拷贝全站封锁标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &StartFLockFlag, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

        /*拷贝上电锁闭标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &StartLockFlag, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

        /*拷贝停止检查未设置*/
		(void)memcpy(pCiAppDataPointer + curIndex, &StopCheckState, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝应急盘继电器ID*/
		(void)memcpy(pCiAppDataPointer + curIndex, &JkjRelayId, sizeof(UINT16));
	    curIndex = curIndex + (UINT32)sizeof(UINT16);

		/*拷贝平台宕机标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &PlatOverFlag, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝JKJ应急盘继电器无效*/
		(void)memcpy(pCiAppDataPointer + curIndex, &JkjRelayValid, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*全线雨雪模式命令*/
		(void)memcpy(pCiAppDataPointer + curIndex, &g_AllSnowModel, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝全线湿轨级别*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&g_AllSnowLevel), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝应急盘继电器有效周期*/
		(void)memcpy(pCiAppDataPointer + curIndex, &JkjRelayValidCycNum, sizeof(UINT32));
	    curIndex = curIndex + (UINT32)sizeof(UINT32);

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 AllSignalBrightFlag-JkjRelayValidCycNum CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

		/*拷贝总复位状态有效周期*/
		(void)memcpy(pCiAppDataPointer + curIndex, &ZFWValidCycNum, sizeof(UINT32));
		curIndex = curIndex + (UINT32)sizeof(UINT32);

		/*拷贝总复位命令开始周期*/
		(void)memcpy(pCiAppDataPointer + curIndex, &ZFWCmdStartCycNum, sizeof(UINT32));
		curIndex = curIndex + (UINT32)sizeof(UINT32);

		/*拷贝错误数据当前总数*/
		(void)memcpy(pCiAppDataPointer + curIndex, &ErrorDataCurSum, sizeof(UINT16));
	    curIndex = curIndex + (UINT32)sizeof(UINT16);

		/*拷贝通信关系状态数据当前总数*/
		(void)memcpy(pCiAppDataPointer + curIndex, &TransmitStateDataCurSum, sizeof(UINT16));
	    curIndex = curIndex + (UINT32)sizeof(UINT16);

		/*拷贝联锁到ATS通信周期记录*/
		(void)memcpy(pCiAppDataPointer + curIndex, &ComCycNumForCiToAts, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝联锁到现地通信周期记录*/
		(void)memcpy(pCiAppDataPointer + curIndex, &ComCycNumForCiToXianDi, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

        /*拷贝最近一次操作命令来源系统类型*/
		(void)memcpy(pCiAppDataPointer + curIndex, &LastCmdSourceSysType, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

        /*拷贝首次操作确认的命令ID号*/
		(void)memcpy(pCiAppDataPointer + curIndex, &FirstCmdId, sizeof(UINT32));
	    curIndex = curIndex + (UINT32)sizeof(UINT32);

        /*拷贝CI操作命令反馈结构体数组长度*/
        (void)memcpy(pCiAppDataPointer + curIndex, &CiSendCmdStruCurSum, sizeof(UINT16));
	    curIndex = curIndex + (UINT32)sizeof(UINT16);

        /*拷贝CI发送到其他联锁命令结构体数组长度*/
        (void)memcpy(pCiAppDataPointer + curIndex, &SendCiCmdDataStruCurSum, sizeof(UINT16));
	    curIndex = curIndex + (UINT32)sizeof(UINT16);

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 ZFWValidCycNum-SendCiCmdDataStruCurSum CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

        /*拷贝与联锁通信的Vobc数目*/
        (void)memcpy(pCiAppDataPointer + curIndex, &VobcToCiSum, sizeof(UINT8));
	    curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝与联锁通信的ITE数目*/
		(void)memcpy(pCiAppDataPointer + curIndex, &IteToCiSum, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

#if 0
        /*拷贝列车数量*/
        (void)memcpy(pCiAppDataPointer + curIndex, &ComTrainSum, sizeof(UINT16));
	    curIndex = curIndex + (UINT32)sizeof(UINT16);
#endif
		/*拷贝计轴总复位标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &generalResetFlag, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝限速确认标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &g_cTsrSureFlag, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝全线临时限速状态*/
		(void)memcpy(pCiAppDataPointer + curIndex, &g_AllLineTsrState, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝全线临时限速速度*/
		(void)memcpy(pCiAppDataPointer + curIndex, &g_AllLineTsrSpeed, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

        /*拷贝进路数据结构体*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)RouteDataStru, ROUTE_SUM_MAX, (UINT16)sizeof(RouteDataStruct));
		curIndex = curIndex + curResult;
	    
		/*拷贝逻辑进路数据结构体*/
		curResult = CopyValidGetLogicRouteDataStru(pCiAppDataPointer + curIndex);
		curIndex = curIndex + curResult;

        /*拷贝信号机数据结构体*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)SignalDataStru, SIGNAL_SUM_MAX, (UINT16)sizeof(SignalDataStruct));
		curIndex = curIndex + curResult;

        /*拷贝道岔数据结构体*/
        curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)SwitchDataStru, SWITCH_SUM_MAX, (UINT16)sizeof(SwitchDataStruct));
		curIndex = curIndex + curResult;

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 VobcToCiSum-SwitchDataStru CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

        /*拷贝计轴区段数据结构体*/
        curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)AxisSectionDataStru, AXIS_SECTION_SUM_MAX, (UINT16)sizeof(AxisSectionDataStruct));
		curIndex = curIndex + curResult;

        /*拷贝逻辑区段数据结构体*/
        curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)LogicSectionDataStru, LOGIC_SECTION_SUM_MAX, (UINT16)sizeof(LogicSectionDataStruct));
		curIndex = curIndex + curResult;

        /*拷贝物理区段数据结构体*/
        curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)PhysicalSectionDataStru, PHYSICAL_SECTION_SUM_MAX, (UINT16)sizeof(PhysicalSectionDataStruct));
		curIndex = curIndex + curResult;

        /*拷贝继电器配置数据结构体数组*/
        curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)RelayDataStru, RELAY_SUM_MAX, (UINT16)sizeof(RelayDataStruct));
	    curIndex = curIndex + curResult;

        /*拷贝ESB数据结构体*/
        (void)memcpy(pCiAppDataPointer + curIndex, EsbDataStru, (ESB_SUM_MAX)*sizeof(EsbDataStruct));
	    curIndex = curIndex + (UINT32)((ESB_SUM_MAX)*sizeof(EsbDataStruct));

        /*拷贝屏蔽门数据结构体*/
        (void)memcpy(pCiAppDataPointer + curIndex, PsdDataStru, (PSD_SUM_MAX)*sizeof(PsdDataStruct));
	    curIndex = curIndex + (UINT32)((PSD_SUM_MAX)*sizeof(PsdDataStruct));

        /*拷贝OVERLAP数据结构体*/
        (void)memcpy(pCiAppDataPointer + curIndex, OverlapDataStru, (OVERLAP_SUM_MAX)*sizeof(OverlapDataStruct));
	    curIndex = curIndex + (UINT32)((OVERLAP_SUM_MAX)*sizeof(OverlapDataStruct));

        /*拷贝自动折返数据结构体*/
        (void)memcpy(pCiAppDataPointer + curIndex, AutoReturnDataStru, (AUTO_RETURN_SUM_MAX)*sizeof(AutoReturnDataStruct));
	    curIndex = curIndex + (UINT32)((AUTO_RETURN_SUM_MAX)*sizeof(AutoReturnDataStruct));

        /*拷贝自动进路数据结构体*/
        (void)memcpy(pCiAppDataPointer + curIndex, AutoRouteDataStru, (AUTO_ROUTE_SUM_MAX)*sizeof(AutoRouteDataStruct));
	    curIndex = curIndex + (UINT32)((AUTO_ROUTE_SUM_MAX)*sizeof(AutoRouteDataStruct));

        /*拷贝非进路数据结构体*/
        (void)memcpy(pCiAppDataPointer + curIndex, NonRouteDataStruArr, NONROUTE_ID_NUM_MAX*sizeof(NonRouteDataStruct));
	    curIndex = curIndex + (UINT32)(NONROUTE_ID_NUM_MAX*sizeof(NonRouteDataStruct));

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 AxisSectionDataStru-NonRouteDataStruArr CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

        /*拷贝指示器数据结构体*/
        (void)memcpy(pCiAppDataPointer + curIndex, IndicatorDataStru, (INDICATOR_SUM_MAX)*sizeof(IndicatorDataStruct));
	    curIndex = curIndex + (UINT32)((INDICATOR_SUM_MAX)*sizeof(IndicatorDataStruct));

		/*拷贝OC站（集中站和非集中站）指示器结构体*/
		(void)memcpy(pCiAppDataPointer + curIndex, g_OCStationIndicDataStru, (INDICATOR_SUM_MAX) * sizeof(OCStationIndicDataStru));
		curIndex = curIndex + (UINT32)((INDICATOR_SUM_MAX) * sizeof(OCStationIndicDataStru));

        /*拷贝错误数据结构体*/
		(void)memcpy(pCiAppDataPointer + curIndex, ErrorDataStru, (ERROR_DATA_SUM_MAX)*sizeof(ErrorDataStruct));
	    curIndex = curIndex + (UINT32)((ERROR_DATA_SUM_MAX)*sizeof(ErrorDataStruct));

        /*拷贝长调进路数据结构体*/
#if 0
		(void)memcpy(pCiAppDataPointer + curIndex, LongRouteDataStru, (ROUTE_LONG_SUM_MAX)*sizeof(LongRouteDataStruct));
		curIndex = curIndex + (ROUTE_LONG_SUM_MAX)*sizeof(LongRouteDataStruct);
#endif
		curIndex += CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)LongRouteDataStru, ROUTE_LONG_SUM_MAX, (UINT16)sizeof(LongRouteDataStruct));

		/*拷贝通信状态结构体*/
		(void)memcpy(pCiAppDataPointer + curIndex, TransmitStateDataStru, (TRANSMIT_OBJECT_SUM_MAX * TRANSMIT_OBJECT_DEVICE_SUM_MAX)*sizeof(TransmitStateDataStruct));
		curIndex = curIndex + (UINT32)((TRANSMIT_OBJECT_SUM_MAX * TRANSMIT_OBJECT_DEVICE_SUM_MAX)*sizeof(TransmitStateDataStruct));

        /*拷贝CI操作命令反馈结构体数组*/
        (void)memcpy(pCiAppDataPointer + curIndex, CiSendCmdDataStru, (CI_TO_ATSORXIANDI_CMD_DATA_STRU_SUM_MAX)*sizeof(CommandDataStruct));
		curIndex = curIndex + (UINT32)((CI_TO_ATSORXIANDI_CMD_DATA_STRU_SUM_MAX)*sizeof(CommandDataStruct));

        /*拷贝CI发送到其他联锁命令结构体数组*/
        (void)memcpy(pCiAppDataPointer + curIndex, SendCiCmdDataStru, (SENDCI_CMD_DATA_STRU_SUM_MAX)*sizeof(ToCiCommandDataStruct));
		curIndex = curIndex + (UINT32)((SENDCI_CMD_DATA_STRU_SUM_MAX)*sizeof(ToCiCommandDataStruct));

        /*拷贝与联锁通信的Vobc信息*/
		curResult = CopyValidGetVobcDataStru(pCiAppDataPointer + curIndex, VobcToCiDataStru, VOBC_TO_CI_SUM_MAX);
		curIndex = curIndex + curResult;
		
		/*拷贝使用后备模式与联锁通信的Vobc信息*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)VobcBackUpToCiDataStru, VOBC_BACKUP_TO_CI_SUM_MAX, (UINT16)sizeof(VobcBackUpToCiDataStruct));
		curIndex = curIndex + curResult;

		/*拷贝与联锁通信的ITE信息*/
		curResult = CopyValidGetIteDataStru(pCiAppDataPointer + curIndex, IteToCiDataStru, ITE_TO_CI_SUM_MAX);
		curIndex = curIndex + curResult;
#if 0
        /*拷贝列车位置信息*/
        (void)memcpy(pCiAppDataPointer + curIndex, ComTrainPosDataStru, (ZC_TO_CI_TRAIN_MAX)*sizeof(ComTrainPosDataStruct));
		curIndex = curIndex + (ZC_TO_CI_TRAIN_MAX)*sizeof(ComTrainPosDataStruct);
#endif
        /*拷贝全自动折返数据结构体*/
        (void)memcpy(pCiAppDataPointer + curIndex, AllAutoReturnDataStru, (ALL_AUTO_RETURN_SUM_MAX)*sizeof(AllAutoReturnDataStruct));
	    curIndex = curIndex + (UINT32)((ALL_AUTO_RETURN_SUM_MAX)*sizeof(AllAutoReturnDataStruct));
		
		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 IndicatorDataStru-AllAutoReturnDataStru CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

        /*拷贝车库门数据结构体*/
        (void)memcpy(pCiAppDataPointer + curIndex, GaragedoorDataStru, (GARAGE_DOOR_SUM_MAX)*sizeof(GaragedoorDataStruct));
	    curIndex = curIndex + (UINT32)((GARAGE_DOOR_SUM_MAX)*sizeof(GaragedoorDataStruct));

		/* 拷贝SPKS数据 (void *pDest, UINT32 destBuffSize, const void *pSrc, UINT32 count);*/
		(void)memcpy(pCiAppDataPointer + curIndex,spksDataBuff,(SPKS_SUM_MAX)*sizeof(SpksDataStruct));
		curIndex += (UINT32)((SPKS_SUM_MAX)*sizeof(SpksDataStruct));
		
		/* 站控模式 */
		pCiAppDataPointer[curIndex] = GetCiModeFlag();
		curIndex += 1U;

		/*人工取消临时限速状态转移*/
		pCiAppDataPointer[curIndex] = LabourCancelLinShiXianState;
		curIndex += 1U;

		/*与本CI通信的相邻CI互联互通报文头上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex,ciHLHTHeadCtxs,(CI_SUM_MAX)*sizeof(HLHTHeadContextStru));
	    curIndex = curIndex + (UINT32)((CI_SUM_MAX)*sizeof(HLHTHeadContextStru));

		/*与本CI通信的VOBC互联互通报文头上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex,vobcHLHTHeadCtxs,(VOBC_SUM_MAX)*sizeof(HLHTHeadContextStru));
	    curIndex = curIndex + (UINT32)((VOBC_SUM_MAX)*sizeof(HLHTHeadContextStru));

		/*与本CI通信的VOBC后备互联互通报文头上下文数据*/
		curResult = CopyValidGetVobcBackHlht(pCiAppDataPointer + curIndex, VOBC_BACKUP_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru));
		curIndex = curIndex + curResult;

		/*与本CI通信的ZC互联互通报文头上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex,zcHLHTHeadCtxs,(ZC_SUM_MAX)*sizeof(HLHTHeadContextStru));
	    curIndex = curIndex + (UINT32)((ZC_SUM_MAX)*sizeof(HLHTHeadContextStru));

		/*与本CI通信的计轴系统互联互通报文头上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex, axleHLHTHeadCtxs, (AXLE_SUM_MAX) * sizeof(HLHTHeadContextStru));
		curIndex = curIndex + (UINT32)((AXLE_SUM_MAX) * sizeof(HLHTHeadContextStru));

		/*与本CI通信的OC系统互联互通报文头上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex, ocHLHTHeadCtxs, (OC_SUM_MAX) * sizeof(HLHTHeadContextStru));
		curIndex = curIndex + (UINT32)((OC_SUM_MAX) * sizeof(HLHTHeadContextStru));

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 GaragedoorDataStru-ocHLHTHeadCtxs CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

		/*与本CI通信的TMC系统互联互通报文头上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex, tmcHLHTHeadCtxs, (TMC_SUM_MAX) * sizeof(HLHTHeadContextStru));
		curIndex = curIndex + (UINT32)((TMC_SUM_MAX) * sizeof(HLHTHeadContextStru));

		/*与本CI通信的ITE互联互通报文头上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex, IteHLHTHeadCtxs, (ITE_SUM_MAX * VOBC_INC_ITE_SUM_MAX) * sizeof(HLHTHeadContextStru));
		curIndex = curIndex + (UINT32)((ITE_SUM_MAX * VOBC_INC_ITE_SUM_MAX) * sizeof(HLHTHeadContextStru));

		/*拷贝当前试车状态*/
		(void)memcpy(pCiAppDataPointer + curIndex, &ciTrainTestStatus, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝当前洗车机状态*/
		(void)memcpy(pCiAppDataPointer + curIndex, WashMachineDataStru, (WASHMACHINE_SUM_MAX)*sizeof(WashMachineDataStruct));
		curIndex = curIndex + (UINT32)((WASHMACHINE_SUM_MAX)*sizeof(WashMachineDataStruct));

		/*拷贝自动触发标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &AutoTriggerFlag, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝防淹门动态数据*/
		curIndex += CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)FloodGateDataStru, FLOOD_GATE_SUM_MAX, (UINT16)sizeof(FloodGateDataStruct));

		/*拷贝相邻联锁继电接口确认标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &CiCiRelayInterfaceConfirmFlag, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*OC的所有信号机设备的数量*/
		(void)memcpy(pCiAppDataPointer + curIndex, &m_SignalNum, sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);
		/*与本CI通信的OC信号机上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex, m_Signals, m_SignalNum * sizeof(OcDeviceStruct));
		curIndex = curIndex + (UINT32)(m_SignalNum * sizeof(OcDeviceStruct));

		/*OC的所有道岔设备的数量*/
		(void)memcpy(pCiAppDataPointer + curIndex, &m_SwitchNum, sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);
		/*与本CI通信的OC道岔上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex, m_Switches, m_SwitchNum * sizeof(OcDeviceStruct));
		curIndex = curIndex + (UINT32)(m_SwitchNum * sizeof(OcDeviceStruct));

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 tmcHLHTHeadCtxs-m_Switches CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

		/*与本CI通信的OC DI上下文数据*/
		curIndex += CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)m_OcConvertedPtDataArr, (OC_SUM_MAX), (UINT16)sizeof(OcCollBoardDataStruct));

		/*OC的所有轨道板的数量*/
		(void)memcpy(pCiAppDataPointer + curIndex, &m_GdNum, sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);
		/*与本CI通信的OC 轨道板上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex, m_Gds, m_GdNum * sizeof(OcGdDevice));
		curIndex = curIndex + (UINT32)(m_GdNum * sizeof(OcGdDevice));

		/*与本CI通信的OC ID上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex, LocalOcIds, (OC_SUM_MAX) * sizeof(UINT16));
		curIndex = curIndex + (UINT32)((OC_SUM_MAX) * sizeof(UINT16));

		/*Oc到Ci的数据当前的数量*/
		(void)memcpy(pCiAppDataPointer + curIndex, &m_OcToCiOrginDataNum, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);
		/*与本CI通信的OC 原始上下文数据*/
		(void)memcpy(pCiAppDataPointer + curIndex, m_OcToCiOrginDataArr, m_OcToCiOrginDataNum * sizeof(OcToCiOriginDataStruct));
		curIndex = curIndex + (UINT32)(m_OcToCiOrginDataNum * sizeof(OcToCiOriginDataStruct));

		/*与本CI通信的计轴上下文数据*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)axisToCiDataStru, AXIS_TO_CI_SUM_MAX, (UINT16)sizeof(AxisToCiDataStruct));
		curIndex = curIndex + curResult;

		/*拷贝计轴总复位混线标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &ZFWJRelayHunXianFlag, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝暂存的一次命令反馈*/
		(void)memcpy(pCiAppDataPointer + curIndex, CiSendBackDataTempStru, (CI_TO_ATSORXIANDI_CMD_DATA_STRU_SUM_MAX)*sizeof(CommandDataStruct));
		curIndex = curIndex + (UINT32)((CI_TO_ATSORXIANDI_CMD_DATA_STRU_SUM_MAX)*sizeof(CommandDataStruct));

		/*拷贝暂存的一次命令反馈*/
		(void)memcpy(pCiAppDataPointer + curIndex, &CiSendBackDataTempStruSum, sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 m_OcConvertedPtDataArr-CiSendBackDataTempStruSum CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

		/*拷贝虚拟联锁数据*/
		for(ii = 0u;ii<g_VirtualCIStructData.virtualCiNum;ii++)
		{
			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].virtualCiId, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].chAllSignalBrightFlag, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].chAllSwitchYLockFlag, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)CommonMemCpy((const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(VirCIRtnIndicatorState) * RTNINDICATOR_SUM_MAX), (void*)(&g_VirtualCIStructData.virtualCi[ii].VirCIRtnIndicatorStaData), (UINT32)(sizeof(VirCIRtnIndicatorState) * RTNINDICATOR_SUM_MAX));
			curIndex = curIndex + (UINT32)(sizeof(VirCIRtnIndicatorState) * RTNINDICATOR_SUM_MAX);

			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].autoTriggerflag, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].cimode, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].chLabourCancelLinShiXianState, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].ZfwFlag, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].ZfwjHunXianFLag, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].ZfwStartCycNum, sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);

			(void)memcpy(pCiAppDataPointer + curIndex, &g_VirtualCIStructData.virtualCi[ii].ZfwValidCycNum, sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);

			/*指示灯状态拷贝*/
			(void)memcpy(pCiAppDataPointer + curIndex,  &g_VirtualCIStructData.virtualCi[ii].IndicatorData, (VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct));
			curIndex = curIndex + (UINT32)((VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct));
		}

		/*拷贝取消道岔封连报警标志*/
		(void)memcpy(pCiAppDataPointer + curIndex, &SwitchBlockLinkState, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝中央联锁控制结构体*/ /*20220208 lc-合并ECI11.0 */
		for(ii = 0;ii<g_VirtualCIStructData.virtualCiNum;ii++)
		{
			(void)memcpy(pCiAppDataPointer + curIndex, &ctrlpowerFlag[ii].virCiId, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
			(void)memcpy(pCiAppDataPointer + curIndex, &ctrlpowerFlag[ii].ctrlDeviceId, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
			(void)memcpy(pCiAppDataPointer + curIndex, &ctrlpowerFlag[ii].ctrlDeviceType, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
			(void)memcpy(pCiAppDataPointer + curIndex, &ctrlpowerFlag[ii].ctrlPowerState, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
		}

		/*拷贝区间雨雪信息*/
		(void)memcpy(pCiAppDataPointer + curIndex, &LocalAreaSnowNum, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(AreaSnowInfoStruct)* LOCAL_AREA_SNOW_SUM_MAX), (const void*)(szLocalAreaSnow), (UINT32)(sizeof(AreaSnowInfoStruct) * LOCAL_AREA_SNOW_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(AreaSnowInfoStruct) * LOCAL_AREA_SNOW_SUM_MAX);

		/*拷贝本地区间ITE切除信息*/
		pCiAppDataPointer[curIndex] = gLocalAreaIteCutNum;
		curIndex += 1U;

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(UINT16) * ALL_AREA_SNOW_SUM_MAX), (const void*)(gSzLocalAreaIteCutId), (UINT32)(sizeof(UINT16) * ALL_AREA_SNOW_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(UINT16) * ALL_AREA_SNOW_SUM_MAX);

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 m_OcConvertedPtDataArr-CiSendBackDataTempStruSum CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

#if 1
		/* 拷贝排序信息 */
		curIndex = as_GetTransferData(pCiAppDataPointer, curIndex);

		/* 拷贝分界点信息 */
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)g_CutoffPointDataBuf, CUTOFF_POINT_SUM_MAX, (UINT16)sizeof(CfpDataStru));
		curIndex = curIndex + curResult;

		/* 拷贝列车信息 */
		curIndex = GetTrainTransferData(pCiAppDataPointer, curIndex);

		/** 拷贝包络信息 */
		curIndex = elm_GetTransferData(pCiAppDataPointer, curIndex);

		/* 拷贝全线免筛信息 */
		curIndex = wls_GetTransferData(pCiAppDataPointer, curIndex);

		curIndex = GetTsrFollowData(pCiAppDataPointer, curIndex);

		/* 拷贝倒切设备信息 */
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)gstReverseCutData, REVERSE_CUT_SUM_MAX, (UINT16)sizeof(ReverseCutDataStru));
		curIndex = curIndex + curResult;

		/*拷贝TIOC系统模式*/
		(void)memcpy(pCiAppDataPointer + curIndex, &gTiocSystemMode, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝TIOC系统倒切状态*/
		(void)memcpy(pCiAppDataPointer + curIndex, &gTiocSystemCutState, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝TIOC系统不可倒切原因*/
		(void)memcpy(pCiAppDataPointer + curIndex, &gTiocCanntCutReason, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);
		
		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 g_CutoffPointDataBuf-gTiocCanntCutReason CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

		/*拷贝无直轨计轴占用信息*/
		curIndex = ToaGetTransferData(pCiAppDataPointer, curIndex);

		/*拷贝区间疏散信息*/
		curIndex = GetEaTransferData(pCiAppDataPointer, curIndex);

		/*拷贝全线列车紧急制动信息*/
		curIndex = WlbGetTransferData(pCiAppDataPointer, curIndex);

		/* 拷贝组合动态进路信息 */
		curIndex = GetDrTransferData(pCiAppDataPointer, curIndex);

		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsMsgFst), (const void *)(&g_strAtsMsgFst), (UINT32)sizeof(g_strAtsMsgFst));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsMsgFst);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsCfmFst), (const void *)(&g_strAtsCfmFst), (UINT32)sizeof(g_strAtsCfmFst));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsCfmFst);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsMsgSnd), (const void *)(&g_strAtsMsgSnd), (UINT32)sizeof(g_strAtsMsgSnd));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsMsgSnd);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsCfmSnd), (const void *)(&g_strAtsCfmSnd), (UINT32)sizeof(g_strAtsCfmSnd));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsCfmSnd);

		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsEaMsgFst), (const void *)(&g_strAtsEaMsgFst), (UINT32)sizeof(g_strAtsEaMsgFst));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsEaMsgFst);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsEaCfmFst), (const void *)(&g_strAtsEaCfmFst), (UINT32)sizeof(g_strAtsEaCfmFst));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsEaCfmFst);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsEaMsgSnd), (const void *)(&g_strAtsEaMsgSnd), (UINT32)sizeof(g_strAtsEaMsgSnd));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsEaMsgSnd);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsEaCfmSnd), (const void *)(&g_strAtsEaCfmSnd), (UINT32)sizeof(g_strAtsEaCfmSnd));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsEaCfmSnd);

		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsWlbMsgFst), (const void *)(&g_strAtsWlbMsgFst), (UINT32)sizeof(g_strAtsWlbMsgFst));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsWlbMsgFst);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsWlbCfmFst), (const void *)(&g_strAtsWlbCfmFst), (UINT32)sizeof(g_strAtsWlbCfmFst));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsWlbCfmFst);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsWlbMsgSnd), (const void *)(&g_strAtsWlbMsgSnd), (UINT32)sizeof(g_strAtsWlbMsgSnd));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsWlbMsgSnd);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsWlbCfmSnd), (const void *)(&g_strAtsWlbCfmSnd), (UINT32)sizeof(g_strAtsWlbCfmSnd));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsWlbCfmSnd);

		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsDaMsgFst), (const void *)(&g_strAtsDaMsgFst), (UINT32)sizeof(g_strAtsDaMsgFst));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsDaMsgFst);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsDaCfmFst), (const void *)(&g_strAtsDaCfmFst), (UINT32)sizeof(g_strAtsDaCfmFst));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsDaCfmFst);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsDaMsgSnd), (const void *)(&g_strAtsDaMsgSnd), (UINT32)sizeof(g_strAtsDaMsgSnd));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsDaMsgSnd);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsDaCfmSnd), (const void *)(&g_strAtsDaCfmSnd), (UINT32)sizeof(g_strAtsDaCfmSnd));
		curIndex = curIndex + (UINT32)sizeof(g_strAtsDaCfmSnd);

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsMsgCfmStru), (const void*)(&g_strSndAtsCfmFst), (UINT32)sizeof(AtsMsgCfmStru));
		curIndex = curIndex + (UINT32)sizeof(AtsMsgCfmStru);
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsMsgCfmStru), (const void*)(&g_strSndAtsEaCfmFst), (UINT32)sizeof(AtsMsgCfmStru));
		curIndex = curIndex + (UINT32)sizeof(AtsMsgCfmStru);
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsMsgCfmStru), (const void*)(&g_strSndAtsWlbCfmFst), (UINT32)sizeof(AtsMsgCfmStru));
		curIndex = curIndex + (UINT32)sizeof(AtsMsgCfmStru);
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsMsgCfmStru), (const void*)(&g_strSndAtsDaCfmFst), (UINT32)sizeof(AtsMsgCfmStru));
		curIndex = curIndex + (UINT32)sizeof(AtsMsgCfmStru);

		/*拷贝异地试车线SQAJ状态*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&comm_Train_Test_SQAJ_SCX_State), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);
		/*拷贝异地试车线YSKJ状态*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&comm_Train_Test_YSKJ_SCX_State), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8); 

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(NonReturnDataStru), (const void*)(NonReturnDataStru), (UINT32)sizeof(NonReturnDataStru));
		curIndex = curIndex + (UINT32)sizeof(NonReturnDataStru);

		/*拷贝LEU信息*/
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void *)(&leuToCiSum), (UINT32)sizeof(UINT8));	/*与联锁通信的LEU数目*/
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void *)(&leuFaultFlag), (UINT32)sizeof(UINT8));		/*LEU故障标志，1无故障，0故障*/
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(LeuToCiDataStru), (const void *)LeuToCiDataStru, (UINT32)sizeof(LeuToCiDataStru));
		curIndex = curIndex + (UINT32)((LEU_TO_CI_SUM_MAX) * sizeof(LeuToCiDataStruct));

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 ToaGetTransferData-LeuToCiDataStru CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

		/* 拷贝停止运营信息 */
		curIndex = Deploy_GetTransferData(pCiAppDataPointer, curIndex);

		/*拷贝ITE全线切除状态*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&g_IteLineCutState), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*拷贝全线通信车信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(LineCommTrainStruct), (const void*)(&gStrLineCommTrain), (UINT32)sizeof(LineCommTrainStruct));
		curIndex = curIndex + (UINT32)sizeof(LineCommTrainStruct);

		/*同步相邻联锁区间雨雪发送信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiAreaSnowStruct)* CI_COM_CI_MAX_NUM), (void*)(szSendCiAreaSnow), (UINT32)(sizeof(ToCiAreaSnowStruct)* CI_COM_CI_MAX_NUM));
		curIndex = curIndex + (UINT32)(sizeof(ToCiAreaSnowStruct) * CI_COM_CI_MAX_NUM);

		/*同步相邻联锁区间接收雨雪信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiAreaSnowStruct)* CI_COM_CI_MAX_NUM), (void*)(szRecvCiAreaSnow), (UINT32)(sizeof(ToCiAreaSnowStruct)* CI_COM_CI_MAX_NUM));
		curIndex = curIndex + (UINT32)(sizeof(ToCiAreaSnowStruct) * CI_COM_CI_MAX_NUM);

		/*同步相邻联锁区间ITE切除接收信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiAreaIteCutStruct)* CI_COM_CI_MAX_NUM), (void*)(szRecvCiAreaIteCut), (UINT32)(sizeof(ToCiAreaIteCutStruct)* CI_COM_CI_MAX_NUM));
		curIndex = curIndex + (UINT32)(sizeof(ToCiAreaIteCutStruct) * CI_COM_CI_MAX_NUM);

		/*同步相邻联锁区间ITE切除发送信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiAreaIteCutStruct)* CI_COM_CI_MAX_NUM), (void*)(szSendCiAreaIteCut), (UINT32)(sizeof(ToCiAreaIteCutStruct)* CI_COM_CI_MAX_NUM));
		curIndex = curIndex + (UINT32)(sizeof(ToCiAreaIteCutStruct) * CI_COM_CI_MAX_NUM);

		/*拷贝虚拟无人折返信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(VirtualZDZFAJDataStruct), (const void*)(&VirtualZDZFAJData), (UINT32)sizeof(VirtualZDZFAJDataStruct));
		curIndex = curIndex + (UINT32)sizeof(VirtualZDZFAJDataStruct);

		/*拷贝飞车宕机开始周期*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT32), &gFlyProtectOverCyc, (UINT32)sizeof(UINT32));
		curIndex = curIndex + (UINT32)sizeof(UINT32);
		/*拷贝飞车宕机报警数据*/
		curIndex = GeFlyProtectTransferData(pCiAppDataPointer, curIndex);

		/* 拷贝本地雨雪命令 */
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&g_LocalSnowModel), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 Deploy_GetTransferData-g_LocalSnowModel CRC:%x, Length:%d\n", crcResult, crcLength);

		/*拷贝本地相邻联锁接受命令信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16), (const void*)(&RecvCiCmdDataStruCurSum), (UINT32)sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiCommandDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX), (void*)(&RecvCiCmdDataStru), (UINT32)(sizeof(ToCiCommandDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(ToCiCommandDataStruct) * RECVCI_CMD_DATA_STRU_SUM_MAX);

		/*拷贝本地相邻联锁发送命令信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16), (const void*)(&SendCiCmdDataStruCurSum), (UINT32)sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiCommandDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX), (void*)(&SendCiCmdDataStru), (UINT32)(sizeof(ToCiCommandDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(ToCiCommandDataStruct) * RECVCI_CMD_DATA_STRU_SUM_MAX);

		/*拷贝本地相邻联锁接受动态进路命令信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&RecvCiDrCmdSum), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiDrCmdDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX), (void*)(&RecvCiDrCmdDataStru), (UINT32)(sizeof(ToCiDrCmdDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(ToCiDrCmdDataStruct) * RECVCI_CMD_DATA_STRU_SUM_MAX);

		/*拷贝本地相邻联锁发送动态进路命令信息*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&SendCiDrCmdSum), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiDrCmdDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX), (void*)(&SendCiDrCmdDataStru), (UINT32)(sizeof(ToCiDrCmdDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(ToCiDrCmdDataStruct) * RECVCI_CMD_DATA_STRU_SUM_MAX);

		/*拷贝平台IO电源采集容忍数据*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(PlatGPIOToleranceDataStruct), (void*)(&gPlatDataGPIOTolercance), (UINT32)sizeof(PlatGPIOToleranceDataStruct));
		curIndex = curIndex + (UINT32)sizeof(PlatGPIOToleranceDataStruct);

		/*计算一次CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 RecvCiCmdDataStruCurSum-gPlatDataGPIOTolercance CRC:%x, Length:%d\n", crcResult, crcLength);
	}
	return curIndex;
}


/*
* 功能描述： 设置CI应用数据
* 参数说明： UINT8 *pCiAppDataPointer, CI应用数据指针
*			 const UINT32 len，数据长度
* 返回值  ： UINT8，      
*/
UINT8 SetCiAppData(const UINT8 *pCiAppDataPointer,const UINT32 len)
{
	UINT8 rtn = 0u; /*返回值*/
	UINT32 allLen = 0u; /*总长度*/
	UINT32 curIndex = 0u;         /*记录移动下标*/
	UINT32 curResult = 0u;        /*拷贝结构中有效的id数据*/
	UINT8 ii =0u;

	if (NULL!= pCiAppDataPointer)
	{
		allLen = 4U + LongFromChar(&pCiAppDataPointer[curIndex]);
		curIndex = curIndex + 4u; /*数据长度*/
		if (allLen == len)
		{
			/*拷贝全站亮灯标志*/
			(void)memcpy(&AllSignalBrightFlag, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
			
			/*拷贝全站引导总锁标志*/
			(void)memcpy(&AllSwitchYLockFlag, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
        
			/*拷贝全站封锁标志*/
			(void)memcpy(&StartFLockFlag, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
        
			/*拷贝上电锁闭标志*/
			(void)memcpy(&StartLockFlag, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
        
			/*拷贝停止检查未设置*/
			(void)memcpy(&StopCheckState, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
        
			/*拷贝应急盘继电器ID*/
			(void)memcpy(&JkjRelayId, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
        
			/*拷贝平台宕机标志*/
			(void)memcpy(&PlatOverFlag, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝JKJ应急盘继电器无效*/
			(void)memcpy(&JkjRelayValid, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*全线雨雪模式命令*/
			(void)memcpy(&g_AllSnowModel, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*同步全线湿轨级别*/
			(void)CommonMemCpy((void*)(&g_AllSnowLevel), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝应急盘继电器有效周期*/
			(void)memcpy(&JkjRelayValidCycNum, pCiAppDataPointer + curIndex, sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);
        
			/*拷贝总复位状态有效周期*/
			(void)memcpy(&ZFWValidCycNum, pCiAppDataPointer + curIndex, sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);
		
			/*拷贝总复位命令开始周期*/
			(void)memcpy(&ZFWCmdStartCycNum, pCiAppDataPointer + curIndex, sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);
		
			/*拷贝错误数据当前总数*/
			(void)memcpy(&ErrorDataCurSum, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
        
			/*拷贝通信关系状态数据当前总数*/
			(void)memcpy(&TransmitStateDataCurSum, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
        
			/*拷贝联锁到ATS通信周期记录*/
			(void)memcpy(&ComCycNumForCiToAts, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
        
			/*拷贝联锁到现地通信周期记录*/
			(void)memcpy(&ComCycNumForCiToXianDi, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝最近一次操作命令来源系统类型*/
			(void)memcpy(&LastCmdSourceSysType, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝首次操作确认的命令ID号*/
			(void)memcpy(&FirstCmdId, pCiAppDataPointer + curIndex, sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);

			/*拷贝CI操作命令反馈结构体数组长度*/
			(void)memcpy(&CiSendCmdStruCurSum, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
        
			/*拷贝CI发送到其他联锁命令结构体数组长度*/
			(void)memcpy(&SendCiCmdDataStruCurSum, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
        
			/*拷贝与联锁通信的Vobc数目*/
			(void)memcpy(&VobcToCiSum, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝与联锁通信的ITE数目*/
			(void)memcpy(&IteToCiSum, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
        
#if 0
			/*拷贝列车数量*/
			(void)memcpy(&ComTrainSum, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
#endif
			/*拷贝计轴总复位标志*/
			(void)memcpy(&generalResetFlag, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝限速确认标志*/
			(void)memcpy(&g_cTsrSureFlag, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝全线临时限速状态*/
			(void)memcpy(&g_AllLineTsrState, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝全线临时限速速度*/
			(void)memcpy(&g_AllLineTsrSpeed, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝进路数据结构体*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)&RouteDataStru[0], ROUTE_SUM_MAX, (UINT16)sizeof(RouteDataStruct));
			curIndex = curIndex + curResult;

			/*拷贝逻辑进路数据结构体*/
			curResult = CopyValidSetLogicRouteDataStru(pCiAppDataPointer + curIndex);
			curIndex = curIndex + curResult;

			/*拷贝信号机数据结构体*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)&SignalDataStru[0], SIGNAL_SUM_MAX, (UINT16)sizeof(SignalDataStruct));
			curIndex = curIndex + curResult;

			/*拷贝道岔数据结构体*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)SwitchDataStru, SWITCH_SUM_MAX, (UINT16)sizeof(SwitchDataStruct));
			curIndex = curIndex + curResult;

			/*拷贝计轴区段数据结构体*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)AxisSectionDataStru, AXIS_SECTION_SUM_MAX, (UINT16)sizeof(AxisSectionDataStruct));
			curIndex = curIndex + curResult;

			/*拷贝逻辑区段数据结构体*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)LogicSectionDataStru, LOGIC_SECTION_SUM_MAX, (UINT16)sizeof(LogicSectionDataStruct));
			curIndex = curIndex + curResult;

			/*拷贝物理区段数据结构体*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)PhysicalSectionDataStru, PHYSICAL_SECTION_SUM_MAX, (UINT16)sizeof(PhysicalSectionDataStruct));
			curIndex = curIndex + curResult;

			/*拷贝继电器配置数据结构体数组*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)RelayDataStru, RELAY_SUM_MAX, (UINT16)sizeof(RelayDataStruct));
			curIndex = curIndex + curResult;

			/*拷贝ESB数据结构体*/
			(void)memcpy(EsbDataStru, pCiAppDataPointer + curIndex, (ESB_SUM_MAX)*sizeof(EsbDataStruct));
			curIndex = curIndex + (UINT32)((ESB_SUM_MAX)*sizeof(EsbDataStruct));
        
			/*拷贝屏蔽门数据结构体*/
			(void)memcpy(PsdDataStru, pCiAppDataPointer + curIndex, (PSD_SUM_MAX)*sizeof(PsdDataStruct));
			curIndex = curIndex + (UINT32)((PSD_SUM_MAX)*sizeof(PsdDataStruct));
        
			/*拷贝OVERLAP数据结构体*/
			(void)memcpy(OverlapDataStru, pCiAppDataPointer + curIndex, (OVERLAP_SUM_MAX)*sizeof(OverlapDataStruct));
			curIndex = curIndex + (UINT32)((OVERLAP_SUM_MAX)*sizeof(OverlapDataStruct));
        
			/*拷贝自动折返数据结构体*/
			(void)memcpy(AutoReturnDataStru, pCiAppDataPointer + curIndex, (AUTO_RETURN_SUM_MAX)*sizeof(AutoReturnDataStruct));
			curIndex = curIndex + (UINT32)((AUTO_RETURN_SUM_MAX)*sizeof(AutoReturnDataStruct));
        
			/*拷贝自动进路数据结构体*/
			(void)memcpy(AutoRouteDataStru, pCiAppDataPointer + curIndex, (AUTO_ROUTE_SUM_MAX)*sizeof(AutoRouteDataStruct));
			curIndex = curIndex + (UINT32)((AUTO_ROUTE_SUM_MAX)*sizeof(AutoRouteDataStruct));
        
			/*拷贝非进路数据结构体*/
			(void)memcpy(NonRouteDataStruArr, pCiAppDataPointer + curIndex, NONROUTE_ID_NUM_MAX*sizeof(NonRouteDataStruct));
			curIndex = curIndex + (UINT32)(NONROUTE_ID_NUM_MAX*sizeof(NonRouteDataStruct));
        
			/*拷贝指示器数据结构体*/
			(void)memcpy(IndicatorDataStru, pCiAppDataPointer + curIndex, (INDICATOR_SUM_MAX)*sizeof(IndicatorDataStruct));
			curIndex = curIndex + (UINT32)((INDICATOR_SUM_MAX)*sizeof(IndicatorDataStruct));

			/*OC站（集中站和非集中站）指示器数据*/
			(void)memcpy(g_OCStationIndicDataStru, pCiAppDataPointer + curIndex, (INDICATOR_SUM_MAX) * sizeof(OCStationIndicDataStru));
			curIndex = curIndex + (UINT32)((INDICATOR_SUM_MAX) * sizeof(OCStationIndicDataStru));

			/*拷贝错误数据结构体*/
			(void)memcpy(ErrorDataStru, pCiAppDataPointer + curIndex, (ERROR_DATA_SUM_MAX)*sizeof(ErrorDataStruct));
			curIndex = curIndex + (UINT32)((ERROR_DATA_SUM_MAX)*sizeof(ErrorDataStruct));
        
			/*拷贝长调进路数据结构体*/
	#if 0
			(void)memcpy(LongRouteDataStru, pCiAppDataPointer + curIndex, (ROUTE_LONG_SUM_MAX)*sizeof(LongRouteDataStruct));
			curIndex = curIndex + (ROUTE_LONG_SUM_MAX)*sizeof(LongRouteDataStruct);
	#endif
			curIndex += CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)LongRouteDataStru, ROUTE_LONG_SUM_MAX, (UINT16)sizeof(LongRouteDataStruct));
        
			/*拷贝通信状态结构体*/
			(void)memcpy(TransmitStateDataStru, pCiAppDataPointer + curIndex, (TRANSMIT_OBJECT_SUM_MAX * TRANSMIT_OBJECT_DEVICE_SUM_MAX)*sizeof(TransmitStateDataStruct));
			curIndex = curIndex + (UINT32)((TRANSMIT_OBJECT_SUM_MAX * TRANSMIT_OBJECT_DEVICE_SUM_MAX)*sizeof(TransmitStateDataStruct));
        
			/*拷贝CI操作命令反馈结构体数组*/
			(void)memcpy(CiSendCmdDataStru, pCiAppDataPointer + curIndex, (CI_TO_ATSORXIANDI_CMD_DATA_STRU_SUM_MAX)*sizeof(CommandDataStruct));
			curIndex = curIndex + (UINT32)((CI_TO_ATSORXIANDI_CMD_DATA_STRU_SUM_MAX)*sizeof(CommandDataStruct));
        
			/*拷贝CI发送到其他联锁命令结构体数组*/
			(void)memcpy(SendCiCmdDataStru, pCiAppDataPointer + curIndex, (SENDCI_CMD_DATA_STRU_SUM_MAX)*sizeof(ToCiCommandDataStruct));
			curIndex = curIndex + (UINT32)((SENDCI_CMD_DATA_STRU_SUM_MAX)*sizeof(ToCiCommandDataStruct));
        
			/*拷贝与联锁通信的Vobc信息*/
			(void)CommonMemSet(&VobcToCiDataStru, (UINT32)((VOBC_TO_CI_SUM_MAX) * sizeof(VobcToCiDataStruct)), 0U, (UINT32)((VOBC_TO_CI_SUM_MAX) * sizeof(VobcToCiDataStruct)));		/*先清空结构体防止脏数据*/
			curResult = CopyValidSetVobcDataStru(pCiAppDataPointer + curIndex, VobcToCiDataStru, VOBC_TO_CI_SUM_MAX);
			curIndex = curIndex + curResult;

			/*拷贝使用后备模式与联锁通信的Vobc信息*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)VobcBackUpToCiDataStru, VOBC_BACKUP_TO_CI_SUM_MAX, (UINT16)sizeof(VobcBackUpToCiDataStruct));
			curIndex = curIndex + curResult;

			/*拷贝与联锁通信的ITE信息*/
			(void)CommonMemSet(&IteToCiDataStru, (UINT32)((ITE_TO_CI_SUM_MAX) * sizeof(IteToCiDataStruct)), 0U, (UINT32)((ITE_TO_CI_SUM_MAX) * sizeof(IteToCiDataStruct)));  /*先清空结构体防止脏数据*/
			curResult = CopyValidSetIteDataStru(pCiAppDataPointer + curIndex, IteToCiDataStru, ITE_TO_CI_SUM_MAX);
			curIndex = curIndex + curResult;

#if 0
			/*拷贝列车位置信息*/
			(void)memcpy(ComTrainPosDataStru, pCiAppDataPointer + curIndex, (ZC_TO_CI_TRAIN_MAX)*sizeof(ComTrainPosDataStruct));
			curIndex = curIndex + (ZC_TO_CI_TRAIN_MAX)*sizeof(ComTrainPosDataStruct);
#endif
			/*拷贝全自动折返数据结构体*/
			(void)memcpy(AllAutoReturnDataStru,pCiAppDataPointer + curIndex , (ALL_AUTO_RETURN_SUM_MAX)*sizeof(AllAutoReturnDataStruct));
			curIndex = curIndex + (UINT32)((ALL_AUTO_RETURN_SUM_MAX)*sizeof(AllAutoReturnDataStruct));
		
			/*拷贝车库门数据结构体*/
			(void)memcpy( GaragedoorDataStru,pCiAppDataPointer + curIndex, (GARAGE_DOOR_SUM_MAX)*sizeof(GaragedoorDataStruct));
			curIndex = curIndex + (UINT32)((GARAGE_DOOR_SUM_MAX)*sizeof(GaragedoorDataStruct));

			/* 拷贝SPKS数据 (void *pDest, UINT32 destBuffSize, const void *pSrc, UINT32 count);*/
			(void)memcpy(spksDataBuff,pCiAppDataPointer + curIndex,(SPKS_SUM_MAX)*sizeof(SpksDataStruct));
			curIndex += (UINT32)((SPKS_SUM_MAX)*sizeof(SpksDataStruct));

			/* 站控模式 */
			SetCiModeFlag(pCiAppDataPointer[curIndex]);
			curIndex += 1u;

			/*人工取消临时限速状态转移*/
			LabourCancelLinShiXianState = pCiAppDataPointer[curIndex];
			curIndex += 1u;
		
			/*与本CI通信的相邻CI互联互通报文头上下文数据*/
			(void)memcpy(ciHLHTHeadCtxs,pCiAppDataPointer + curIndex,(CI_SUM_MAX)*sizeof(HLHTHeadContextStru));
			curIndex = curIndex + (UINT32)((CI_SUM_MAX)*sizeof(HLHTHeadContextStru));

			/*与本CI通信的VOBC互联互通报文头上下文数据*/
			(void)memcpy(vobcHLHTHeadCtxs,pCiAppDataPointer + curIndex,(VOBC_SUM_MAX)*sizeof(HLHTHeadContextStru));
			curIndex = curIndex + (UINT32)((VOBC_SUM_MAX)*sizeof(HLHTHeadContextStru));
			
			/*与本CI通信的VOBC后备互联互通报文头上下文数据*/
			curResult = CopyValidSetVobcBackHlht(pCiAppDataPointer + curIndex,VOBC_BACKUP_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru));
			curIndex = curIndex + curResult;
			
			/*与本CI通信的ZC互联互通报文头上下文数据*/
			(void)memcpy(zcHLHTHeadCtxs,pCiAppDataPointer + curIndex,(ZC_SUM_MAX)*sizeof(HLHTHeadContextStru));
			curIndex = curIndex + (UINT32)((ZC_SUM_MAX)*sizeof(HLHTHeadContextStru));

			/*与本CI通信的计轴系统互联互通报文头上下文数据*/
			(void)memcpy(axleHLHTHeadCtxs, pCiAppDataPointer + curIndex, (AXLE_SUM_MAX) * sizeof(HLHTHeadContextStru));
			curIndex = curIndex + (UINT32)((AXLE_SUM_MAX) * sizeof(HLHTHeadContextStru));

			/*与本CI通信的OC系统互联互通报文头上下文数据*/
			(void)memcpy(ocHLHTHeadCtxs, pCiAppDataPointer + curIndex, (OC_SUM_MAX) * sizeof(HLHTHeadContextStru));
			curIndex = curIndex + (UINT32)((OC_SUM_MAX) * sizeof(HLHTHeadContextStru));

			/*与本CI通信的TMC系统互联互通报文头上下文数据*/
			(void)memcpy(tmcHLHTHeadCtxs, pCiAppDataPointer + curIndex, (TMC_SUM_MAX) * sizeof(HLHTHeadContextStru));
			curIndex = curIndex + (UINT32)((TMC_SUM_MAX) * sizeof(HLHTHeadContextStru));

			/*与本CI通信的ITE互联互通报文头上下文数据*/
			(void)memcpy(IteHLHTHeadCtxs, pCiAppDataPointer + curIndex, (ITE_SUM_MAX * VOBC_INC_ITE_SUM_MAX) * sizeof(HLHTHeadContextStru));
			curIndex = curIndex + (UINT32)((ITE_SUM_MAX * VOBC_INC_ITE_SUM_MAX) * sizeof(HLHTHeadContextStru));

			/* 试车线试车状态 */
			SetCiTrainTestStatus(pCiAppDataPointer[curIndex]);
			curIndex += 1u;

			/*拷贝当前洗车机状态*/
			(void)memcpy(WashMachineDataStru,pCiAppDataPointer + curIndex,(WASHMACHINE_SUM_MAX)*sizeof(WashMachineDataStruct));
			curIndex = curIndex + (UINT32)((WASHMACHINE_SUM_MAX)*sizeof(WashMachineDataStruct));

			/* 自动触发标志 */
			SetAutoTriggerFlag(pCiAppDataPointer[curIndex]);
			curIndex += 1u;

			/*设置防淹门动态数据*/
			curIndex += CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)&FloodGateDataStru[0], FLOOD_GATE_SUM_MAX, (UINT16)sizeof(FloodGateDataStruct));

			/*设置相邻联锁继电接口确认标志*/
			CiCiRelayInterfaceConfirmFlag = pCiAppDataPointer[curIndex];
			curIndex += 1u;

			/*OC的所有信号机设备的数量*/
			(void)memcpy(&m_SignalNum, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
			/*与本CI通信的OC信号机上下文数据*/
			(void)memcpy(m_Signals, pCiAppDataPointer + curIndex, m_SignalNum * sizeof(OcDeviceStruct));
			curIndex = curIndex + (UINT32)(m_SignalNum * sizeof(OcDeviceStruct));

			/*OC的所有道岔设备的数量*/
			(void)memcpy(&m_SwitchNum, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
			/*与本CI通信的OC道岔上下文数据*/
			(void)memcpy(m_Switches, pCiAppDataPointer + curIndex, m_SwitchNum * sizeof(OcDeviceStruct));
			curIndex = curIndex + (UINT32)(m_SwitchNum * sizeof(OcDeviceStruct));

			/*与本CI通信的OC DI上下文数据*/
			curIndex += CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)&m_OcConvertedPtDataArr[0], (OC_SUM_MAX), (UINT16)sizeof(OcCollBoardDataStruct));

			/*OC的所有轨道板的数量*/
			(void)memcpy(&m_GdNum, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
			/*与本CI通信的OC 轨道板上下文数据*/
			(void)memcpy(m_Gds, pCiAppDataPointer + curIndex, m_GdNum * sizeof(OcGdDevice));
			curIndex = curIndex + (UINT32)(m_GdNum * sizeof(OcGdDevice));

			/*与本CI通信的OC ID上下文数据*/
			(void)memcpy(LocalOcIds, pCiAppDataPointer + curIndex, (OC_SUM_MAX) * sizeof(UINT16));
			curIndex = curIndex + (UINT32)((OC_SUM_MAX) * sizeof(UINT16));

			/*Oc到Ci的数据当前的数量*/
			(void)memcpy(&m_OcToCiOrginDataNum, pCiAppDataPointer + curIndex, sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
			/*与本CI通信的OC 原始上下文数据*/
			(void)memcpy(m_OcToCiOrginDataArr, pCiAppDataPointer + curIndex, m_OcToCiOrginDataNum * sizeof(OcToCiOriginDataStruct));
			curIndex = curIndex + (UINT32)(m_OcToCiOrginDataNum * sizeof(OcToCiOriginDataStruct));

			/*与本CI通信的计轴上下文数据*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)&axisToCiDataStru[0], AXIS_TO_CI_SUM_MAX, (UINT16)sizeof(AxisToCiDataStruct));
			curIndex = curIndex + curResult;

			/*设置计轴总复位混线标志*/
			ZFWJRelayHunXianFlag = pCiAppDataPointer[curIndex];
			curIndex += 1u;

			/*拷贝CI暂存的一次操作命令反馈结构体数组*/
			(void)memcpy(CiSendBackDataTempStru, pCiAppDataPointer + curIndex, (CI_TO_ATSORXIANDI_CMD_DATA_STRU_SUM_MAX)*sizeof(CommandDataStruct));
			curIndex = curIndex + (UINT32)((CI_TO_ATSORXIANDI_CMD_DATA_STRU_SUM_MAX)*sizeof(CommandDataStruct));

			/*拷贝CI暂存的一次操作命令反馈结构体数组长度*/
			(void)memcpy(&CiSendBackDataTempStruSum, pCiAppDataPointer + curIndex, sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);

			/*设置虚拟联锁数据*/
			for(ii = 0u;ii<g_VirtualCIStructData.virtualCiNum;ii++)
			{
				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].virtualCiId,pCiAppDataPointer + curIndex, sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);

				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].chAllSignalBrightFlag,pCiAppDataPointer + curIndex,  sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);

				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].chAllSwitchYLockFlag,pCiAppDataPointer + curIndex, sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);

				(void)CommonMemCpy((void*)(&g_VirtualCIStructData.virtualCi[ii].VirCIRtnIndicatorStaData), (UINT32)(RTNINDICATOR_SUM_MAX * sizeof(VirCIRtnIndicatorState)), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(RTNINDICATOR_SUM_MAX * sizeof(VirCIRtnIndicatorState)));
				curIndex = curIndex + (UINT32)(RTNINDICATOR_SUM_MAX * sizeof(VirCIRtnIndicatorState));

				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].autoTriggerflag,pCiAppDataPointer + curIndex, sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);

				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].cimode,pCiAppDataPointer + curIndex,  sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);

				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].chLabourCancelLinShiXianState,pCiAppDataPointer + curIndex,sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);

				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].ZfwFlag,pCiAppDataPointer + curIndex, sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);

				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].ZfwjHunXianFLag,pCiAppDataPointer + curIndex, sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);

				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].ZfwStartCycNum,pCiAppDataPointer + curIndex, sizeof(UINT32));
				curIndex = curIndex + (UINT32)sizeof(UINT32);

				(void)memcpy(&g_VirtualCIStructData.virtualCi[ii].ZfwValidCycNum,pCiAppDataPointer + curIndex, sizeof(UINT32));
				curIndex = curIndex + (UINT32)sizeof(UINT32);

				/*指示灯状态设置*/
				(void)memcpy(g_VirtualCIStructData.virtualCi[ii].IndicatorData,pCiAppDataPointer + curIndex, (VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct));
				curIndex = curIndex + (UINT32)((VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct));
			}

			/*设置取消封连报警标志*/
			SwitchBlockLinkState = pCiAppDataPointer[curIndex];
			curIndex += 1u;
			/*设置中央联锁控制结构体*/ /*20221208 lc-合并ECI11.0并修改 */
			for (ii = 0; ii < g_VirtualCIStructData.virtualCiNum; ii++)
			{
				(void)memcpy(&ctrlpowerFlag[ii].virCiId, pCiAppDataPointer + curIndex, sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);
				(void)memcpy(&ctrlpowerFlag[ii].ctrlDeviceId, pCiAppDataPointer + curIndex, sizeof(UINT16));
				curIndex = curIndex + (UINT32)sizeof(UINT16);
				(void)memcpy(&ctrlpowerFlag[ii].ctrlDeviceType, pCiAppDataPointer + curIndex, sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);
				(void)memcpy(&ctrlpowerFlag[ii].ctrlPowerState, pCiAppDataPointer + curIndex, sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);
			}

			/*设置区间雨雪信息*/
			LocalAreaSnowNum = pCiAppDataPointer[curIndex];
			curIndex += 1U;

			(void)CommonMemCpy((const void*)(szLocalAreaSnow), (UINT32)(sizeof(AreaSnowInfoStruct) * LOCAL_AREA_SNOW_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(AreaSnowInfoStruct) * LOCAL_AREA_SNOW_SUM_MAX));
			curIndex = curIndex + (UINT32)(sizeof(AreaSnowInfoStruct) * LOCAL_AREA_SNOW_SUM_MAX);

			/*设置本地区间ITE切除信息*/
			gLocalAreaIteCutNum = pCiAppDataPointer[curIndex];
			curIndex += 1U;

			(void)CommonMemCpy((const void*)(gSzLocalAreaIteCutId), (UINT32)(sizeof(UINT16) * ALL_AREA_SNOW_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(UINT16) * ALL_AREA_SNOW_SUM_MAX));
			curIndex = curIndex + (UINT32)(sizeof(UINT16) * ALL_AREA_SNOW_SUM_MAX);

#if 1
			/* 拷贝排序信息 */
			curIndex = as_SetTransferData(pCiAppDataPointer, curIndex);

			/* 拷贝分界点信息 */
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)g_CutoffPointDataBuf, CUTOFF_POINT_SUM_MAX, (UINT16)sizeof(CfpDataStru));
			curIndex = curIndex + curResult;

			/* 拷贝列车信息 */
			curIndex = SetTrainTransferData(pCiAppDataPointer, curIndex);

			/** 拷贝包络信息 */
			curIndex = elm_SetTransferData(pCiAppDataPointer,curIndex,len);

			/* 拷贝全线免筛信息 */
			curIndex = wls_SetTransferData(pCiAppDataPointer,curIndex,len);

			curIndex = SetTsrFollowData(pCiAppDataPointer, curIndex);

			/* 拷贝倒切设备信息 */
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)gstReverseCutData, REVERSE_CUT_SUM_MAX, (UINT16)sizeof(ReverseCutDataStru));
			curIndex = curIndex + curResult;

			/*拷贝TIOC系统模式*/
			gTiocSystemMode = pCiAppDataPointer[curIndex];
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝TIOC系统倒切状态*/
			gTiocSystemCutState = pCiAppDataPointer[curIndex];
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝TIOC系统不可倒切原因*/
			gTiocCanntCutReason = pCiAppDataPointer[curIndex];
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝无直轨计轴占用信息*/
			curIndex = ToaSetTransferData(pCiAppDataPointer, curIndex);

			/*拷贝区间疏散信息*/
			curIndex = SetEaTransferData(pCiAppDataPointer, curIndex);

			/*拷贝全线列车紧急制动信息*/
			curIndex = WlbSetTransferData(pCiAppDataPointer, curIndex);

			/* 拷贝组合动态进路信息 */
			curIndex = SetDrTransferData(pCiAppDataPointer, curIndex);

			(void)CommonMemCpy((void *)(&g_strAtsMsgFst), (UINT32)sizeof(g_strAtsMsgFst), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsMsgFst));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsMsgFst);
			(void)CommonMemCpy((void *)(&g_strAtsCfmFst), (UINT32)sizeof(g_strAtsCfmFst), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsCfmFst));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsCfmFst);
			(void)CommonMemCpy((void *)(&g_strAtsMsgSnd), (UINT32)sizeof(g_strAtsMsgSnd), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsMsgSnd));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsMsgSnd);
			(void)CommonMemCpy((void *)(&g_strAtsCfmSnd), (UINT32)sizeof(g_strAtsCfmSnd), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsCfmSnd));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsCfmSnd);

			(void)CommonMemCpy((void *)(&g_strAtsEaMsgFst), (UINT32)sizeof(g_strAtsEaMsgFst), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsEaMsgFst));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsEaMsgFst);
			(void)CommonMemCpy((void *)(&g_strAtsEaCfmFst), (UINT32)sizeof(g_strAtsEaCfmFst), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsEaCfmFst));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsEaCfmFst);
			(void)CommonMemCpy((void *)(&g_strAtsEaMsgSnd), (UINT32)sizeof(g_strAtsEaMsgSnd), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsEaMsgSnd));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsEaMsgSnd);
			(void)CommonMemCpy((void *)(&g_strAtsEaCfmSnd), (UINT32)sizeof(g_strAtsEaCfmSnd), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsEaCfmSnd));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsEaCfmSnd);

			(void)CommonMemCpy((void *)(&g_strAtsWlbMsgFst), (UINT32)sizeof(g_strAtsWlbMsgFst), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsWlbMsgFst));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsWlbMsgFst);
			(void)CommonMemCpy((void *)(&g_strAtsWlbCfmFst), (UINT32)sizeof(g_strAtsWlbCfmFst), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsWlbCfmFst));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsWlbCfmFst);
			(void)CommonMemCpy((void *)(&g_strAtsWlbMsgSnd), (UINT32)sizeof(g_strAtsWlbMsgSnd), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsWlbMsgSnd));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsWlbMsgSnd);
			(void)CommonMemCpy((void *)(&g_strAtsWlbCfmSnd), (UINT32)sizeof(g_strAtsWlbCfmSnd), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsWlbCfmSnd));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsWlbCfmSnd);

			(void)CommonMemCpy((void *)(&g_strAtsDaMsgFst), (UINT32)sizeof(g_strAtsDaMsgFst), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsDaMsgFst));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsDaMsgFst);
			(void)CommonMemCpy((void *)(&g_strAtsDaCfmFst), (UINT32)sizeof(g_strAtsDaCfmFst), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsDaCfmFst));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsDaCfmFst);
			(void)CommonMemCpy((void *)(&g_strAtsDaMsgSnd), (UINT32)sizeof(g_strAtsDaMsgSnd), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsDaMsgSnd));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsDaMsgSnd);
			(void)CommonMemCpy((void *)(&g_strAtsDaCfmSnd), (UINT32)sizeof(g_strAtsDaCfmSnd), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(g_strAtsDaCfmSnd));
			curIndex = curIndex + (UINT32)sizeof(g_strAtsDaCfmSnd);

			(void)CommonMemCpy((void*)(&g_strSndAtsCfmFst), (UINT32)sizeof(AtsMsgCfmStru), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsMsgCfmStru));
			curIndex = curIndex + (UINT32)sizeof(AtsMsgCfmStru);
			(void)CommonMemCpy((void*)(&g_strSndAtsEaCfmFst), (UINT32)sizeof(AtsMsgCfmStru), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsMsgCfmStru));
			curIndex = curIndex + (UINT32)sizeof(AtsMsgCfmStru);
			(void)CommonMemCpy((void*)(&g_strSndAtsWlbCfmFst), (UINT32)sizeof(AtsMsgCfmStru), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsMsgCfmStru));
			curIndex = curIndex + (UINT32)sizeof(AtsMsgCfmStru);
			(void)CommonMemCpy((void*)(&g_strSndAtsDaCfmFst), (UINT32)sizeof(AtsMsgCfmStru), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsMsgCfmStru));
			curIndex = curIndex + (UINT32)sizeof(AtsMsgCfmStru);

			/*拷贝异地试车线SQAJ状态*/
			(void)CommonMemCpy((void*)(&comm_Train_Test_SQAJ_SCX_State), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
			/*拷贝异地试车线YSKJ状态*/
			(void)CommonMemCpy((void*)(&comm_Train_Test_YSKJ_SCX_State), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)CommonMemCpy((void*)(NonReturnDataStru), (UINT32)sizeof(NonReturnDataStru), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(NonReturnDataStru));
			curIndex = curIndex + (UINT32)sizeof(NonReturnDataStru);

			/*拷贝LEU信息*/
			leuToCiSum = pCiAppDataPointer[curIndex];
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			leuFaultFlag = pCiAppDataPointer[curIndex];
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)CommonMemCpy((void*)(LeuToCiDataStru), (UINT32)sizeof(LeuToCiDataStru), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(LeuToCiDataStru));
			curIndex = curIndex + (UINT32)sizeof(LeuToCiDataStru);

#endif
			/*拷贝停止运营信息*/
			curIndex = Deploy_SetTransferData(pCiAppDataPointer, curIndex);
			
			/*同步ITE全线切除状态*/
			(void)CommonMemCpy((void*)(&g_IteLineCutState), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*同步全线通信车信息*/
			(void)CommonMemCpy((void*)(&gStrLineCommTrain), (UINT32)sizeof(LineCommTrainStruct), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(LineCommTrainStruct));
			curIndex = curIndex + (UINT32)sizeof(LineCommTrainStruct);
			
			/*同步相邻联锁区间雨雪发送信息*/
			(void)CommonMemCpy((void*)(szSendCiAreaSnow), (UINT32)(sizeof(ToCiAreaSnowStruct)* CI_COM_CI_MAX_NUM), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiAreaSnowStruct)* CI_COM_CI_MAX_NUM));
			curIndex = curIndex + (UINT32)(sizeof(ToCiAreaSnowStruct) * CI_COM_CI_MAX_NUM);

			/*同步相邻联锁区间接收雨雪信息*/
			(void)CommonMemCpy((void*)(szRecvCiAreaSnow), (UINT32)(sizeof(ToCiAreaSnowStruct)* CI_COM_CI_MAX_NUM), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiAreaSnowStruct)* CI_COM_CI_MAX_NUM));
			curIndex = curIndex + (UINT32)(sizeof(ToCiAreaSnowStruct) * CI_COM_CI_MAX_NUM);

			/*同步相邻联锁区间ITE切除接收信息*/
			(void)CommonMemCpy((void*)(szRecvCiAreaIteCut), (UINT32)(sizeof(ToCiAreaIteCutStruct)* CI_COM_CI_MAX_NUM), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiAreaIteCutStruct)* CI_COM_CI_MAX_NUM));
			curIndex = curIndex + (UINT32)(sizeof(ToCiAreaIteCutStruct) * CI_COM_CI_MAX_NUM);

			/*同步相邻联锁区间ITE切除发送信息*/
			(void)CommonMemCpy((void*)(szSendCiAreaIteCut), (UINT32)(sizeof(ToCiAreaIteCutStruct)* CI_COM_CI_MAX_NUM), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiAreaIteCutStruct)* CI_COM_CI_MAX_NUM));
			curIndex = curIndex + (UINT32)(sizeof(ToCiAreaIteCutStruct) * CI_COM_CI_MAX_NUM);

			/*拷贝虚拟无人折返信息*/
			(void)CommonMemCpy((void*)(&VirtualZDZFAJData), (UINT32)sizeof(VirtualZDZFAJDataStruct), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(VirtualZDZFAJDataStruct));
			curIndex = curIndex + (UINT32)sizeof(VirtualZDZFAJDataStruct);

			/*拷贝飞车宕机开始周期号*/
			(void)CommonMemCpy((void*)(&gFlyProtectOverCyc), (UINT32)sizeof(UINT32), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);

			/*拷贝飞车宕机报警数据*/
			curIndex = SeFlyProtectTransferData(pCiAppDataPointer, curIndex);

			/*同步本地雨雪命令*/
			(void)CommonMemCpy((void*)(&g_LocalSnowModel), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*拷贝本地相邻联锁接受命令信息*/
			(void)CommonMemCpy((void*)(&RecvCiCmdDataStruCurSum), (UINT32)sizeof(UINT16), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);

			(void)CommonMemCpy((void*)(&RecvCiCmdDataStru), (UINT32)(sizeof(ToCiCommandDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiCommandDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX));
			curIndex = curIndex + (UINT32)(sizeof(ToCiCommandDataStruct) * RECVCI_CMD_DATA_STRU_SUM_MAX);

			/*拷贝本地相邻联锁发送命令信息*/
			(void)CommonMemCpy((void*)(&SendCiCmdDataStruCurSum), (UINT32)sizeof(UINT16), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);

			(void)CommonMemCpy((void*)(&SendCiCmdDataStru), (UINT32)(sizeof(ToCiCommandDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiCommandDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX));
			curIndex = curIndex + (UINT32)(sizeof(ToCiCommandDataStruct) * RECVCI_CMD_DATA_STRU_SUM_MAX);

			/*拷贝本地相邻联锁接受动态进路命令信息*/
			(void)CommonMemCpy((void*)(&RecvCiDrCmdSum), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)CommonMemCpy((void*)(&RecvCiDrCmdDataStru), (UINT32)(sizeof(ToCiDrCmdDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiDrCmdDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX));
			curIndex = curIndex + (UINT32)(sizeof(ToCiDrCmdDataStruct) * RECVCI_CMD_DATA_STRU_SUM_MAX);

			/*拷贝本地相邻联锁发送动态进路命令信息*/
			(void)CommonMemCpy((void*)(&SendCiDrCmdSum), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)CommonMemCpy((void*)(&SendCiDrCmdDataStru), (UINT32)(sizeof(ToCiDrCmdDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ToCiDrCmdDataStruct)* RECVCI_CMD_DATA_STRU_SUM_MAX));
			curIndex = curIndex + (UINT32)(sizeof(ToCiDrCmdDataStruct) * RECVCI_CMD_DATA_STRU_SUM_MAX);

			/*拷贝平台IO电源采集容忍数据*/
			(void)CommonMemCpy((void*)(&gPlatDataGPIOTolercance), (UINT32)sizeof(PlatGPIOToleranceDataStruct), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(PlatGPIOToleranceDataStruct));
			curIndex = curIndex + (UINT32)sizeof(PlatGPIOToleranceDataStruct);

#endif
			rtn = 1u;
		}
		
    }
	return rtn;
}


