/********************************************************
*                                                                                                            
* �� �� ���� 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"
#include "ParsePackPlatformData.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;
}

/*
* ���������� ����RCͨ�ŵ�VOBC��Ч���ݵ���Ӧ��ȫ������
* ����˵����
	�������
	const UINT8 *pCurCiAppDataPointer:��ǰ����ָ��
	UINT16 struNum:���鳤��,
	UINT16 struLength:�ṹ�峤��
	�������
	void *pDataStru:�ṹ��ָ��,
* ����ֵ  �� �������ݵĳ���
*/
UINT32 CopyValidSetRcVobcDataStru(const UINT8* pCurCiAppDataPointer, void* pDataStru, UINT16 struNum, UINT16 struLength)
{
	UINT32 curIndex = 0u;
	UINT16 i = 0u;
	UINT16 ValidIdNum = 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++)
		{
			if (i < struNum)
			{
				pDstAddr = (UINT8*)pDataStru + struLength * i;
				(void)CommonMemCpy((void*)pDstAddr, (UINT32)struLength, (const void*)(pCurCiAppDataPointer + curIndex), (UINT32)struLength);
				curIndex += (UINT32)struLength;
			}
			else
			{
				curIndex += (UINT32)struLength;

				debug_infor_printf((const)"ERROR: SetValidIdNum = %d\n", i);
			}
		}
	}
	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)CommonMemCpy(pCiAppDataPointer + curIndex, (UINT32)sizeof(UINT8), &CI_SYSTEM_TYPE_RCI, (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

        /*����ȫվ���Ʊ�־*/
		(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 = CopyValidGetRouteDataCC(pCiAppDataPointer + curIndex, ROUTE_SUM_MAX,&RouteDataStruCC[0]);
		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 = CopyValidGetSigDataCC(pCiAppDataPointer + curIndex, SIGNAL_SUM_MAX, &SignalDataStruCC[0]);
		curIndex = curIndex + curResult;

        /*�����������ݽṹ��*/
        curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)SwitchDataStru, SWITCH_SUM_MAX, (UINT16)sizeof(SwitchDataStruct));
		curIndex = curIndex + curResult;

		/*�����������ݽṹ��-����*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)SwitchDataStruCC, SWITCH_SUM_MAX, (UINT16)sizeof(SwitchDataStructCC));
		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*)AxisSectionDataStruCC, AXIS_SECTION_SUM_MAX, (UINT16)sizeof(AxisSectionDataStructCC));
		curIndex = curIndex + curResult;

        /*�����߼��������ݽṹ��*/
        curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)LogicSectionDataStru, LOGIC_SECTION_SUM_MAX, (UINT16)sizeof(LogicSectionDataStruct));
		curIndex = curIndex + curResult;

		/*�����߼��������ݽṹ��-����*/
		curResult = CopyValidGetLogicSecDataCC(pCiAppDataPointer + curIndex, LOGIC_SECTION_SUM_MAX, &LogicSectionDataStruCC[0]);
		curIndex = curIndex + curResult;

        /*���������������ݽṹ��*/
        curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void *)PhysicalSectionDataStru, PHYSICAL_SECTION_SUM_MAX, (UINT16)sizeof(PhysicalSectionDataStruct));
		curIndex = curIndex + curResult;

		/*���������������ݽṹ��-����*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)PhysicalSectionDataStruCC, PHYSICAL_SECTION_SUM_MAX, (UINT16)sizeof(PhysicalSectionDataStructCC));
		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));

		/*����OVERLAP���ݽṹ��-����*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)OverlapDataStruCC, OVERLAP_SUM_MAX, (UINT16)sizeof(OverlapDataStructCC));
		curIndex = curIndex + curResult;

        /*�����Զ��۷����ݽṹ��*/
        (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));

		/*�������������ݽṹ��-����*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)GaragedoorDataStruCC, GARAGE_DOOR_SUM_MAX, (UINT16)sizeof(GaragedoorDataStructCC));
		curIndex = curIndex + curResult;

		/* ����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������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ciHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*�뱾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ͨ�ŵļ���ϵͳ������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, AXLE_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), axleHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*�뱾RCͨ�ŵļ���ϵͳ������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, AXLE_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), gSzRcAxleHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*�뱾CIͨ�ŵ�OCϵͳ������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, OC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ocHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*����һ��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ϵͳ������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, TMC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), tmcHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*�뱾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));

		/*���������Ŷ�̬����-����*/
		curResult = CopyValidGetFloodGateDataCC(pCiAppDataPointer + curIndex, FLOOD_GATE_SUM_MAX, &FloodGateDataStruCC[0]);
		curIndex = curIndex + curResult;

		/*�������������̵�ӿ�ȷ�ϱ�־*/
		(void)memcpy(pCiAppDataPointer + curIndex, &CiCiRelayInterfaceConfirmFlag, sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);
#if 0
		/*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));

		/*�뱾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, LoalOcIds, (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));
#endif

		/*����OCԭʼ����*/
		curResult = CopyValidGetOcOrginData(pCiAppDataPointer + curIndex, OC_SUM_MAX, &m_OcToCiOrginDataArr[0]);
		curIndex = curIndex + curResult;

		/*����һ��CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 tmcHLHTHeadCtxs-m_OcToCiOrginDataArr CRC:%x, Length:%d\n", crcResult, crcLength);
		crcIndex = curIndex;

		/*�뱾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)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;

		/* ����������Ϣ */
		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);

		/*���������Զ��Զ��۷����ݽṹ��-����*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(NonReturnDataStruCC), (const void*)(NonReturnDataStruCC), (UINT32)sizeof(NonReturnDataStruCC));
		curIndex = curIndex + (UINT32)sizeof(NonReturnDataStruCC);

		/*����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);
		crcIndex = curIndex;

		/*��������������������������Ϣ*/
		(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);

		/*�뱾CIͨ�ŵ��ֵػ�����ͨ����ͷ����������*/
		curResult = CopyValidGetXiandiHlht(pCiAppDataPointer + curIndex, ATS_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru));
		curIndex = curIndex + curResult;

		/*�뱾CIͨ�ŵ�ATS������ͨ����ͷ����������*/
		curResult = CopyValidGetAtsHlht(pCiAppDataPointer + curIndex, ATS_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru));
		curIndex = curIndex + curResult;

		/*�뱾����ͨ�ŵ�RC������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), gSzRcHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*����ATS�����������ں�������Ϣ*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16), (const void*)(&gReciveAtsCmdDataDeviceSum), (UINT32)sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ReciveAtsCmdDataCycInfo)* ATS_SUM_MAX * 2U), (void*)(&szReciveAtsCmdDataCycInfo), (UINT32)(sizeof(ReciveAtsCmdDataCycInfo)* ATS_SUM_MAX * 2U));
		curIndex = curIndex + (UINT32)(sizeof(ReciveAtsCmdDataCycInfo) * ATS_SUM_MAX * 2U);

        /*����������CC���ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)PsdDataStruCC, PSD_SUM_MAX, (UINT16)sizeof(PsdDataStructCC));
		curIndex = curIndex + curResult;

		/*����ȫ����ѩģʽCC*/
		pCiAppDataPointer[curIndex] = g_AllSnowModelCC;
		curIndex += 1U;

		/*������������ITE�г���ϢCC*/
		pCiAppDataPointer[curIndex] = gLocalAreaSnowNumCC;
		curIndex += 1U;

		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)gszLocalAreaSnowCC, LOCAL_AREA_SNOW_SUM_MAX, (UINT16)sizeof(AreaSnowInfoStruct));
		curIndex = curIndex + curResult;

		/*����������ѩģʽ����CC*/
		pCiAppDataPointer[curIndex] = g_LocalSnowModelCC;
		curIndex += 1U;




		/*����ZC���͵�ȫ����ѩģʽ*/
		pCiAppDataPointer[curIndex] = gZcToCiDymDataStru.cSnowValidFlagZc;
		curIndex += 1U;

		/*����ZC���͵ı�������ITE�г���Ϣ*/
		pCiAppDataPointer[curIndex] = gZcToCiDymDataStru.cAreaSnowPlatFormNumZc;
		curIndex += 1U;

		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)gZcToCiDymDataStru.szAreaSnowInfoZc, LOCAL_AREA_SNOW_SUM_MAX, (UINT16)sizeof(AreaSnowInfoStruct));
		curIndex = curIndex + curResult;

		/*����ZC���͵ı�����ѩģʽ����*/
		pCiAppDataPointer[curIndex] = gZcToCiDymDataStru.chLocalSnowValidFlagZc;
		curIndex += 1U;

		/*����ZC���͵��źŻ�����*/
		curResult = CopyGetZcSignalDymDataStru(pCiAppDataPointer + curIndex);
		curIndex = curIndex + curResult;

		/*����ZC���͵��߼���������*/
		curResult = CopyGetZcLogSecDymDataStru(pCiAppDataPointer + curIndex);
		curIndex = curIndex + curResult;

		/*����ZC���͵ļ�����������*/
		curResult = CopyGetZcAxisSecDymDataStru(pCiAppDataPointer + curIndex);
		curIndex = curIndex + curResult;

		/*����ZC���͵�������������*/
		curResult = CopyGetZcPhySecDymDataStru(pCiAppDataPointer + curIndex);
		curIndex = curIndex + curResult;

		/*����ZC���͵Ľ�·����*/
		curResult = CopyGetZcRouteDymDataStru(pCiAppDataPointer + curIndex);
		curIndex = curIndex + curResult;
		
		/*�뱾RCͨ�ŵ�VOBC������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, VOBC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), vobcToRcHLHTHeadCtxs);
		curIndex = curIndex + curResult;


		/*������RCͨ�ŵ�Vobc��Ϣ*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)VobcToRcDataStru, VOBC_TO_CI_SUM_MAX, (UINT16)sizeof(VobcToRcDataStruct));
		curIndex = curIndex + curResult;

		/*������RCͨ�ŵ�Vobc����*/
		pCiAppDataPointer[curIndex] = VobcToRcSum;
		curIndex += 1U;

		/*�뱾CIͨ�ŵ�OC������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, OC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ocHLHTHeadCtxsCiToRc);
		curIndex = curIndex + curResult;

		/*����������������*/
		(void)CommonMemCpy(pCiAppDataPointer + curIndex, (UINT32)sizeof(UINT32),&gSystemUpdateMainUseCycNum, (UINT32)sizeof(UINT32));
		curIndex = curIndex + (UINT32)sizeof(UINT32);

		/*CIͬ�����뱾CIͨ�ŵ�CI������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ciHLHTHeadCtxsCiToRc);
		curIndex = curIndex + curResult;

		/*CIͬ�����뱾CIͨ�ŵ�RC������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), gSzRcHLHTHeadCtxsCiToRc);
		curIndex = curIndex + curResult;

		/*��������RC���͵�֡����*/
		(void)CommonMemCpy(pCiAppDataPointer + curIndex, (UINT32)(sizeof(NeighborCiInfoStruct) * CI_COM_CI_MAX_NUM), &szNeighborCiInfo, (UINT32)(sizeof(NeighborCiInfoStruct) * CI_COM_CI_MAX_NUM));
		curIndex = curIndex + (UINT32)(sizeof(NeighborCiInfoStruct) * CI_COM_CI_MAX_NUM);

		/*�Գ����복���β���ͨ�Žӿ�ʱ������SQJ״̬*/
		pCiAppDataPointer[curIndex] = comm_Train_Test_SQJ_CLD_State;
		curIndex += 1U;

		/*�Գ����복���β���ͨ�Žӿ�ʱ������TYSJ״̬*/
		pCiAppDataPointer[curIndex] = comm_Train_Test_TYSJ_CLD_State;
		curIndex += 1U;

		/*����CI��������ṹ������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(CommandDataStruct)* ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX), (void*)(&CiRevCmdDataStru), (UINT32)(sizeof(CommandDataStruct)* ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(CommandDataStruct) * ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX);

		/*����CI��������ṹ�����鳤��*/
		ShortToChar(CiRevCmdStruCurSum, &pCiAppDataPointer[curIndex]);
		curIndex += 2U;

		/*����ATS���ֵص�CI�ź��ؿ���������ṹ������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(CommandDataStruct)* ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX), (void*)(&ATSorXDToCiCmdRtnToTRDataStru), (UINT32)(sizeof(CommandDataStruct)* ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(CommandDataStruct) * ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX);

		/*����ATS���ֵص�CI�ź��ؿ���������ṹ�����鳤��*/
		ShortToChar(ATSorXDToCiCmdReturnToTRCurSum, &pCiAppDataPointer[curIndex]);
		curIndex += 2U;

		/*��������TIOC������ͨ�ų��ṹ������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(TiocTransmitCtStruct)* TRANSMIT_OBJECT_DEVICE_SUM_MAX), (void*)(&g_szTiocCt), (UINT32)(sizeof(TiocTransmitCtStruct)* TRANSMIT_OBJECT_DEVICE_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(TiocTransmitCtStruct) * TRANSMIT_OBJECT_DEVICE_SUM_MAX);

		/*��������վ̨����CIͨ�����ݽṹ������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(PlatformToCiDataStruct)* PLATFORM_TO_CI_SUM_MAX), (void*)(&platformToCiDataStru), (UINT32)(sizeof(PlatformToCiDataStruct)* PLATFORM_TO_CI_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(PlatformToCiDataStruct) * PLATFORM_TO_CI_SUM_MAX);

		/*����Psc-CI�Ľṹ������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(PSCToCiDataStruct)* PSC_TO_CI_SUM_MAX), (void*)(&PscToCiDataStru), (UINT32)(sizeof(PSCToCiDataStruct)* PSC_TO_CI_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(PSCToCiDataStruct) * PSC_TO_CI_SUM_MAX);

		/*������̬�����г��ṹ������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(TrainDyInfoStru)* TRAIN_DYN_TEST_SUM_MAX), (void*)(&gszDyTestInfo), (UINT32)(sizeof(TrainDyInfoStru)* TRAIN_DYN_TEST_SUM_MAX));
		curIndex = curIndex + (UINT32)(sizeof(TrainDyInfoStru) * TRAIN_DYN_TEST_SUM_MAX);

		/*������̬�����г�����*/
		pCiAppDataPointer[curIndex] = gDyTestNum;
		curIndex += 1U;

		/*ZC����������CBTC�г���ѹ��Ϣ*/
		pCiAppDataPointer[curIndex] = gCbtcCrossNumZc;
		curIndex += 1u;

		for (ii = 0u; ii < gCbtcCrossNumZc; ii++)
		{
			ShortToChar(gCbtcCrossStructZc[ii].wSignalId, &pCiAppDataPointer[curIndex]);
			curIndex += 2u;
			pCiAppDataPointer[curIndex] = gCbtcCrossStructZc[ii].wTrainId;
			curIndex += 1u;
		}
		/*ATS/�ֵ�/����һ�����ȷ����Ϣͬ��*/
		/*������������*/
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&gDansuoCancleMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru));
		curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(&gDansuoCancleReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru));
		curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
		/*�����������*/
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&gSwitchUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru));
		curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(&gSwitchUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru));
		curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
		/*���ν������*/
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&gSecUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru));
		curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(&gSecUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru));
		curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
		/*�źŻ��������*/
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(&gSignalUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru));
		curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
		(void)CommonMemCpy((void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(&gSignalUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru));
		curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
		/*����һ��CRC*/
		crcLength = curIndex - crcIndex;
		crcResult = Tioc_CommonCrc32(pCiAppDataPointer + crcIndex, crcLength);
		debug_infor_printf((const)"2oo2 RecvCiCmdDataStruCurSum-FollowUpCmd 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;
	UINT8 chRcCiWorkMode = 0U; /*����ģʽ*/
	if (NULL!= pCiAppDataPointer)
	{
		allLen = 4U + LongFromChar(&pCiAppDataPointer[curIndex]);
		curIndex = curIndex + 4u; /*���ݳ���*/
		if (allLen == len)
		{
			/*��鹤��ģʽ��־*/
			chRcCiWorkMode = pCiAppDataPointer[curIndex];
			curIndex = curIndex + (UINT32)sizeof(UINT8);
			if (CI_SYSTEM_TYPE_RCI != chRcCiWorkMode)
			{
				rtn = 0u; /*����ʧ��*/
				debug_infor_printf((const)"2oo2 SetCiAppData-CI_SYSTEM ERROR, local%d, receive:%d\n", CI_SYSTEM_TYPE_RCI, chRcCiWorkMode);
			}
			else
			{
				/*����ȫվ���Ʊ�־*/
				(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 = CopyValidSetRouteDataCC(pCiAppDataPointer + curIndex, ROUTE_SUM_MAX, &RouteDataStruCC[0]);
				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 = CopyValidSetSigDataCC(pCiAppDataPointer + curIndex, SIGNAL_SUM_MAX, &SignalDataStruCC[0]);
				curIndex = curIndex + curResult;

				/*�����������ݽṹ��*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)SwitchDataStru, SWITCH_SUM_MAX, (UINT16)sizeof(SwitchDataStruct));
				curIndex = curIndex + curResult;

				/*�����������ݽṹ��-����*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)SwitchDataStruCC, SWITCH_SUM_MAX, (UINT16)sizeof(SwitchDataStructCC));
				curIndex = curIndex + curResult;

				/*���������������ݽṹ��*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)AxisSectionDataStru, AXIS_SECTION_SUM_MAX, (UINT16)sizeof(AxisSectionDataStruct));
				curIndex = curIndex + curResult;

				/*���������������ݽṹ��-����*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)AxisSectionDataStruCC, AXIS_SECTION_SUM_MAX, (UINT16)sizeof(AxisSectionDataStructCC));
				curIndex = curIndex + curResult;

				/*�����߼��������ݽṹ��*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)LogicSectionDataStru, LOGIC_SECTION_SUM_MAX, (UINT16)sizeof(LogicSectionDataStruct));
				curIndex = curIndex + curResult;

				/*�����߼��������ݽṹ��-����*/
				curResult = CopyValidSetLogicSecDataCC(pCiAppDataPointer + curIndex, LOGIC_SECTION_SUM_MAX, &LogicSectionDataStruCC[0]);
				curIndex = curIndex + curResult;

				/*���������������ݽṹ��*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void *)PhysicalSectionDataStru, PHYSICAL_SECTION_SUM_MAX, (UINT16)sizeof(PhysicalSectionDataStruct));
				curIndex = curIndex + curResult;

				/*���������������ݽṹ��-����*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)PhysicalSectionDataStruCC, PHYSICAL_SECTION_SUM_MAX, (UINT16)sizeof(PhysicalSectionDataStructCC));
				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));
        
				/*���������������ݽṹ��-����*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)OverlapDataStruCC, OVERLAP_SUM_MAX, (UINT16)sizeof(OverlapDataStructCC));
				curIndex = curIndex + curResult;

				/*�����Զ��۷����ݽṹ��*/
				(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));

				/*�������������ݽṹ��-����*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)GaragedoorDataStruCC, GARAGE_DOOR_SUM_MAX, (UINT16)sizeof(GaragedoorDataStructCC));
				curIndex = curIndex + curResult;

				/* ����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������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ciHLHTHeadCtxs);
				curIndex = curIndex + curResult;

				/*�뱾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ͨ�ŵļ���ϵͳ������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, AXLE_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), axleHLHTHeadCtxs);
				curIndex = curIndex + curResult;

				/*�뱾RCͨ�ŵļ���ϵͳ������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, AXLE_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), gSzRcAxleHLHTHeadCtxs);
				curIndex = curIndex + curResult;

				/*�뱾CIͨ�ŵ�OCϵͳ������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, OC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ocHLHTHeadCtxs);
				curIndex = curIndex + curResult;

				/*�뱾CIͨ�ŵ�TMCϵͳ������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, TMC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), tmcHLHTHeadCtxs);
				curIndex = curIndex + curResult;

				/*�뱾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));

				/*���÷����Ŷ�̬����*/
				curResult = CopyValidSetFloodGateDataCC(pCiAppDataPointer + curIndex, FLOOD_GATE_SUM_MAX, &FloodGateDataStruCC[0]);
				curIndex = curIndex + curResult;

				/*�������������̵�ӿ�ȷ�ϱ�־*/
				CiCiRelayInterfaceConfirmFlag = pCiAppDataPointer[curIndex];
				curIndex += 1u;
#if 0
				/*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));
#endif
				/*����OCԭʼ����*/
				curResult = CopyValidSetOcOrginData(pCiAppDataPointer + curIndex, OC_SUM_MAX, &m_OcToCiOrginDataArr[0]);
				curIndex = curIndex + curResult;

				/*�뱾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)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);

				/*ͬ�������Զ��Զ��۷����ݽṹ��-����*/
				(void)CommonMemCpy((void*)(NonReturnDataStruCC), (UINT32)sizeof(NonReturnDataStruCC), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(NonReturnDataStruCC));
				curIndex = curIndex + (UINT32)sizeof(NonReturnDataStruCC);

				/*����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);

				/*�뱾CIͨ�ŵ��ֵػ�����ͨ����ͷ����������*/
				curResult = CopyValidSetXiandiHlht(pCiAppDataPointer + curIndex, ATS_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru));
				curIndex = curIndex + curResult;

				/*�뱾CIͨ�ŵ�ATS������ͨ����ͷ����������*/
				curResult = CopyValidSetAtsiHlht(pCiAppDataPointer + curIndex, ATS_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru));
				curIndex = curIndex + curResult;

				/*�뱾����ͨ�ŵ�RC������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), gSzRcHLHTHeadCtxs);
				curIndex = curIndex + curResult;


				/*ATS�����������ں�������Ϣ*/
				(void)CommonMemCpy((void*)(&gReciveAtsCmdDataDeviceSum), (UINT32)sizeof(UINT16), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16));
				curIndex = curIndex + (UINT32)sizeof(UINT16);

				(void)CommonMemCpy((void*)(&szReciveAtsCmdDataCycInfo), (UINT32)(sizeof(ReciveAtsCmdDataCycInfo)* ATS_SUM_MAX * 2U), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ReciveAtsCmdDataCycInfo)* ATS_SUM_MAX * 2U));
				curIndex = curIndex + (UINT32)(sizeof(ReciveAtsCmdDataCycInfo) * ATS_SUM_MAX * 2U);

                /*ͬ��������CC���ݽṹ��*/
				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)PsdDataStruCC, PSD_SUM_MAX, (UINT16)sizeof(PsdDataStructCC));
				curIndex = curIndex + curResult;

				/*ͬ��ȫ����ѩģʽCC*/
				g_AllSnowModelCC = pCiAppDataPointer[curIndex];
				curIndex += 1U;

				/*ͬ������������ѩ��ϢCC*/
				gLocalAreaSnowNumCC = pCiAppDataPointer[curIndex];
				curIndex +=1U;

				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)gszLocalAreaSnowCC, LOCAL_AREA_SNOW_SUM_MAX, (UINT16)sizeof(AreaSnowInfoStruct));
				curIndex = curIndex + curResult;

				/*ͬ��������ѩģʽ����CC*/
				g_LocalSnowModelCC = pCiAppDataPointer[curIndex];
				curIndex += 1U;

				/*ͬ��ZC���͵�ȫ����ѩģʽ*/
				gZcToCiDymDataStru.cSnowValidFlagZc = pCiAppDataPointer[curIndex];
				curIndex += 1U;

				/*ͬ��ZC���͵ı���������ѩ��Ϣ*/
				gZcToCiDymDataStru.cAreaSnowPlatFormNumZc = pCiAppDataPointer[curIndex];
				curIndex += 1U;

				curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)gZcToCiDymDataStru.szAreaSnowInfoZc, LOCAL_AREA_SNOW_SUM_MAX, (UINT16)sizeof(AreaSnowInfoStruct));
				curIndex = curIndex + curResult;

				/*ͬ��ZC���͵ı�����ѩģʽ����*/
				gZcToCiDymDataStru.chLocalSnowValidFlagZc = pCiAppDataPointer[curIndex];
				curIndex += 1U;

				/*ͬ��ZC���͵��źŻ�����*/
				curResult = CopySetZcSignalDymDataStru(pCiAppDataPointer + curIndex);
				curIndex = curIndex + curResult;

				/*ͬ��ZC���͵��߼���������*/
				curResult = CopySetZcLogSecDymDataStru(pCiAppDataPointer + curIndex);
				curIndex = curIndex + curResult;

				/*ͬ��ZC���͵ļ�����������*/
				curResult = CopySetZcAxisSecDymDataStru(pCiAppDataPointer + curIndex);
				curIndex = curIndex + curResult;

				/*ͬ��ZC���͵�������������*/
				curResult = CopySetZcPhySecDymDataStru(pCiAppDataPointer + curIndex);
				curIndex = curIndex + curResult;

				/*ͬ��ZC���͵Ľ�·����*/
				curResult = CopySetZcRouteDymDataStru(pCiAppDataPointer + curIndex);
				curIndex = curIndex + curResult;


				/*�뱾RCͨ�ŵ�VOBC������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, VOBC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), vobcToRcHLHTHeadCtxs);
				curIndex = curIndex + curResult;
				

				/*������RCͨ�ŵ�Vobc��Ϣ*/
				(void)CommonMemSet(&VobcToRcDataStru, (UINT32)((VOBC_TO_CI_SUM_MAX) * sizeof(VobcToRcDataStruct)), 0U, (UINT32)((VOBC_TO_CI_SUM_MAX) * sizeof(VobcToRcDataStruct)));		/*����սṹ���ֹ������*/
				curResult = CopyValidSetRcVobcDataStru(pCiAppDataPointer + curIndex, VobcToRcDataStru, VOBC_TO_CI_SUM_MAX, (UINT16)sizeof(VobcToRcDataStruct));
				curIndex = curIndex + curResult;

				/*������RCͨ�ŵ�Vobc����*/
				VobcToRcSum = pCiAppDataPointer[curIndex];
				curIndex += 1U;
				
				/*�뱾CIͨ�ŵ�OC������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, OC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ocHLHTHeadCtxsCiToRc);/*�洢��CI�������ݽṹ��*/
				curIndex = curIndex + curResult;

				/*����������������*/
				(void)CommonMemCpy(&gSystemUpdateMainUseCycNum, (UINT32)sizeof(UINT32), pCiAppDataPointer + curIndex, (UINT32)sizeof(UINT32));
				curIndex = curIndex + (UINT32)sizeof(UINT32);

				/*CIͬ�����뱾CIͨ�ŵ�CI������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ciHLHTHeadCtxsCiToRc);/*�洢��CI�������ݽṹ��*/
				curIndex = curIndex + curResult;

				/*CIͬ�����뱾CIͨ�ŵ�RC������ͨ����ͷ����������*/
				curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), gSzRcHLHTHeadCtxsCiToRc);/*�洢��CI�������ݽṹ��*/
				curIndex = curIndex + curResult;

				/*ͬ������RC���͵�֡����*/
				(void)CommonMemCpy(&szNeighborCiInfo, (UINT32)(sizeof(NeighborCiInfoStruct)* CI_COM_CI_MAX_NUM), pCiAppDataPointer + curIndex, (UINT32)(sizeof(NeighborCiInfoStruct)* CI_COM_CI_MAX_NUM));
				curIndex = curIndex + (UINT32)(sizeof(NeighborCiInfoStruct) * CI_COM_CI_MAX_NUM);

				/*�Գ����복���β���ͨ�Žӿ�ʱ������SQJ״̬*/
				comm_Train_Test_SQJ_CLD_State = pCiAppDataPointer[curIndex];
				curIndex += 1U;

				/*�Գ����복���β���ͨ�Žӿ�ʱ������TYSJ״̬*/
				comm_Train_Test_TYSJ_CLD_State = pCiAppDataPointer[curIndex];
				curIndex += 1U;

				/*����CI��������ṹ������*/
				(void)CommonMemCpy((void*)(&CiRevCmdDataStru), (UINT32)(sizeof(CommandDataStruct)* ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(CommandDataStruct)* ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX));
				curIndex = curIndex + (UINT32)(sizeof(CommandDataStruct) * ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX);

				/*����CI��������ṹ�����鳤��*/
				CiRevCmdStruCurSum = ShortFromChar(&pCiAppDataPointer[curIndex]);
				curIndex += 2U;

				/*����ATS���ֵص�CI�ź��ؿ���������ṹ������*/
				(void)CommonMemCpy((void*)(&ATSorXDToCiCmdRtnToTRDataStru), (UINT32)(sizeof(CommandDataStruct)* ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(CommandDataStruct)* ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX));
				curIndex = curIndex + (UINT32)(sizeof(CommandDataStruct) * ATSORXIANDI_TO_CI_CMD_DATA_STRU_SUM_MAX);

				/*����ATS���ֵص�CI�ź��ؿ���������ṹ�����鳤��*/
				ATSorXDToCiCmdReturnToTRCurSum = ShortFromChar(&pCiAppDataPointer[curIndex]);
				curIndex += 2U;

				/*��������TIOC������ͨ�ų��ṹ������*/
				(void)CommonMemCpy((void*)(&g_szTiocCt), (UINT32)(sizeof(TiocTransmitCtStruct)* TRANSMIT_OBJECT_DEVICE_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(TiocTransmitCtStruct)* TRANSMIT_OBJECT_DEVICE_SUM_MAX));
				curIndex = curIndex + (UINT32)(sizeof(TiocTransmitCtStruct) * TRANSMIT_OBJECT_DEVICE_SUM_MAX);

				/*��������վ̨����CIͨ�����ݽṹ������*/
				(void)CommonMemCpy((void*)&platformToCiDataStru, (UINT32)(sizeof(PlatformToCiDataStruct)* PLATFORM_TO_CI_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(PlatformToCiDataStruct)* PLATFORM_TO_CI_SUM_MAX));
				curIndex = curIndex + (UINT32)(sizeof(PlatformToCiDataStruct) * PLATFORM_TO_CI_SUM_MAX);

				/*����Psc-CI�Ľṹ������*/
				(void)CommonMemCpy((void*)(&PscToCiDataStru), (UINT32)(sizeof(PSCToCiDataStruct)* PSC_TO_CI_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(PSCToCiDataStruct)* PSC_TO_CI_SUM_MAX));
				curIndex = curIndex + (UINT32)(sizeof(PSCToCiDataStruct) * PSC_TO_CI_SUM_MAX);

				/*������̬�����г��ṹ������*/
				(void)CommonMemCpy((void*)(&gszDyTestInfo), (UINT32)(sizeof(TrainDyInfoStru)* TRAIN_DYN_TEST_SUM_MAX), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(TrainDyInfoStru)* TRAIN_DYN_TEST_SUM_MAX));
				curIndex = curIndex + (UINT32)(sizeof(TrainDyInfoStru) * TRAIN_DYN_TEST_SUM_MAX);

				/*������̬�����г�����*/
				gDyTestNum = pCiAppDataPointer[curIndex];
				curIndex += 1U;

				/*ZC����������CBTC�г���ѹ��Ϣ*/
				gCbtcCrossNumZc = pCiAppDataPointer[curIndex];
				curIndex += 1u;

				for (ii = 0u; ii < gCbtcCrossNumZc; ii++)
				{
					gCbtcCrossStructZc[ii].wSignalId = ShortFromChar(&pCiAppDataPointer[curIndex]);
					curIndex += 2u;
					gCbtcCrossStructZc[ii].wTrainId = pCiAppDataPointer[curIndex];
					curIndex += 1u;
				}
				/*ͬ��һ���������*/
				/*��������*/
				(void)CommonMemCpy((void *)(&gDansuoCancleMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru));
				curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
				(void)CommonMemCpy((void *)(&gDansuoCancleReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru));
				curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
				/*�������*/
				(void)CommonMemCpy((void *)(&gSwitchUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru));
				curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
				(void)CommonMemCpy((void *)(&gSwitchUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru));
				curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
				/*���ν��*/
				(void)CommonMemCpy((void *)(&gSecUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru));
				curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
				(void)CommonMemCpy((void *)(&gSecUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru));
				curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
				/*�źŻ����*/
				(void)CommonMemCpy((void *)(&gSignalUnflockMsgFst), (UINT32)sizeof(AtsFollowUpCmdFstStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(AtsFollowUpCmdFstStru));
				curIndex = curIndex + (UINT32)sizeof(AtsFollowUpCmdFstStru);
				(void)CommonMemCpy((void *)(&gSignalUnflockReplyFst), (UINT32)sizeof(RCIFollowUpReplyStru), (const void *)(pCiAppDataPointer + curIndex), (UINT32)sizeof(RCIFollowUpReplyStru));
				curIndex = curIndex + (UINT32)sizeof(RCIFollowUpReplyStru);
				rtn = 1U;
			}
		}
		
    }
	return rtn;
}

/**
* @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)
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;

	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (0U != struLength) && (NULL != gSzXiandiHLHTHeadCtxs))
	{
		curIndex += (UINT32)sizeof(UINT16);

		for (i = 0U; i < struNum; i++)
		{
			/*������ͨͷidΪ0ʱ������Ч����*/
			if (0U != gSzXiandiHLHTHeadCtxs[i].sourceId)
			{
				(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), struLength, (void*)(&gSzXiandiHLHTHeadCtxs[i]), struLength);
				curIndex += (UINT32)struLength;

				ValidIdNum++;
			}
			else
			{
				/*��ִ���κβ���*/
			}
		}

		/*������Ч����*/
		ShortToChar(ValidIdNum, pCurCiAppDataPointer);
	}
	else
	{
		curIndex = 0u;

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

	return curIndex;
}

/**
* @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)
{
	UINT32 curIndex = 0U;
	UINT16 i = 0U;
	UINT16 ValidIdNum = 0U;
	UINT8  devId = 0U;
	HLHTHeadContextStru temp = { 0U };

	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (NULL != gSzXiandiHLHTHeadCtxs) && (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*)(&gSzXiandiHLHTHeadCtxs[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;
}

/**
* @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)
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;

	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (0U != struLength) && (NULL != gSzAtsHLHTHeadCtxs))
	{
		curIndex += (UINT32)sizeof(UINT16);

		for (i = 0U; i < struNum; i++)
		{
			/*������ͨͷidΪ0ʱ������Ч����*/
			if (0U != gSzAtsHLHTHeadCtxs[i].sourceId)
			{
				(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), struLength, (void*)(&gSzAtsHLHTHeadCtxs[i]), struLength);
				curIndex += (UINT32)struLength;

				ValidIdNum++;
			}
			else
			{
				/*��ִ���κβ���*/
			}
		}

		/*������Ч����*/
		ShortToChar(ValidIdNum, pCurCiAppDataPointer);
	}
	else
	{
		curIndex = 0u;

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

	return curIndex;
}

/**
* @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)
{
	UINT32 curIndex = 0U;
	UINT16 i = 0U;
	UINT16 ValidIdNum = 0U;
	UINT8  devId = 0U;
	HLHTHeadContextStru temp = { 0U };

	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (NULL != gSzAtsHLHTHeadCtxs) && (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*)(&gSzAtsHLHTHeadCtxs[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;
}

/*
* ���������� CI������RCͨ�ó�Ա����
* ����˵���� UINT8 *pCiAppDataPointer, CIӦ������ָ��
* ����ֵ  �� void
*/
UINT32 GetCiGeneralData(UINT8* pCiAppDataPointer)
{
	UINT32 curIndex = 0u;         /*��¼�ƶ��±�*/
	UINT8 ii = 0u;
	UINT32 curResult = 0u;        /*�����ṹ����Ч��id����*/

	if (NULL != pCiAppDataPointer)
	{
		/*�������������۷���Ϣ*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(VirtualZDZFAJDataStruct), (const void*)(&VirtualZDZFAJData), (UINT32)sizeof(VirtualZDZFAJDataStruct));
		curIndex = curIndex + (UINT32)sizeof(VirtualZDZFAJDataStruct);

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

		(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(NonReturnDataStru), (const void*)(NonReturnDataStru), (UINT32)sizeof(NonReturnDataStru));
		curIndex = curIndex + (UINT32)sizeof(NonReturnDataStru);

		/*��������Գ���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);

		/*���������������ƽṹ��*/
		for (ii = 0; ii < g_VirtualCIStructData.virtualCiNum; ii++)
		{
			(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&ctrlpowerFlag[ii].virCiId), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
			(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16), (const void*)(&ctrlpowerFlag[ii].ctrlDeviceId), (UINT32)sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
			(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&ctrlpowerFlag[ii].ctrlDeviceType), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
			(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&ctrlpowerFlag[ii].ctrlPowerState), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
		}

		/*����ȡ����������������־*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&SwitchBlockLinkState), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);
#if 0
		/*�뱾CIͨ�ŵ�OC ���������������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(m_GdNum * sizeof(OcGdDevice)), (const void*)m_Gds, (UINT32)(m_GdNum * sizeof(OcGdDevice)));
		curIndex = curIndex + (UINT32)(m_GdNum * sizeof(OcGdDevice));

		/*OC�����й���������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16), (const void*)(&m_GdNum), (UINT32)sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);

		/*�뱾CIͨ�ŵ�OC DI����������*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)m_OcConvertedPtDataArr, (OC_SUM_MAX), (UINT16)sizeof(OcCollBoardDataStruct));
		curIndex = curIndex + curResult;

		/*�뱾CIͨ�ŵ�OC��������������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)m_SwitchNum * sizeof(OcDeviceStruct), (const void*)m_Switches, (UINT32)m_SwitchNum * sizeof(OcDeviceStruct));
		curIndex = curIndex + (UINT32)(m_SwitchNum * sizeof(OcDeviceStruct));

		/*OC�����е����豸������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16), (const void*)(&m_SwitchNum), (UINT32)sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);

		/*�뱾CIͨ�ŵ�OC�źŻ�����������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(m_SignalNum * sizeof(OcDeviceStruct)), (const void*)m_Signals, (UINT32)(m_SignalNum * sizeof(OcDeviceStruct)));
		curIndex = curIndex + (UINT32)(m_SignalNum * sizeof(OcDeviceStruct));

		/*OC�������źŻ��豸������*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16), (const void*)(&m_SignalNum), (UINT32)sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);
#endif
		/*����ȫվ���Ʊ�־*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&AllSignalBrightFlag), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*����ȫվ����������־*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&AllSwitchYLockFlag), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*����ȫվ������־*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&StartFLockFlag), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*�����ϵ����ձ�־*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&StartLockFlag), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*����ֹͣ���δ����*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&StopCheckState), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*����Ӧ���̵̼���ID*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16), (const void*)(&JkjRelayId), (UINT32)sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);

		/*����ƽ̨崻���־*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&PlatOverFlag), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*����JKJӦ���̵̼�����Ч*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&JkjRelayValid), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*����Ӧ���̵̼�����Ч����*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT32), (const void*)(&JkjRelayValidCycNum), (UINT32)sizeof(UINT32));
		curIndex = curIndex + (UINT32)sizeof(UINT32);

		/*�����ܸ�λ״̬��Ч����*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT32), (const void*)(&ZFWValidCycNum), (UINT32)sizeof(UINT32));
		curIndex = curIndex + (UINT32)sizeof(UINT32);

		/*�����ܸ�λ���ʼ����*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT32), (const void*)(&ZFWCmdStartCycNum), (UINT32)sizeof(UINT32));
		curIndex = curIndex + (UINT32)sizeof(UINT32);

		/*����������ATSͨ�����ڼ�¼*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&ComCycNumForCiToAts), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*�����������ֵ�ͨ�����ڼ�¼*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&ComCycNumForCiToXianDi), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*���������ܸ�λ��־*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&generalResetFlag), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*������·���ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)RouteDataStru, ROUTE_SUM_MAX, (UINT16)sizeof(RouteDataStruct));
		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;

		/*���������������ݽṹ��*/
		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���ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)EsbDataStru, ESB_SUM_MAX, (UINT16)sizeof(EsbDataStruct));
		curIndex = curIndex + curResult;

		/*�������������ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)PsdDataStru, PSD_SUM_MAX, (UINT16)sizeof(PsdDataStruct));
		curIndex = curIndex + curResult;

		/*���������������ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)OverlapDataStru, OVERLAP_SUM_MAX, (UINT16)sizeof(OverlapDataStruct));
		curIndex = curIndex + curResult;

		/*�����Զ��۷����ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)AutoReturnDataStru, AUTO_RETURN_SUM_MAX, (UINT16)sizeof(AutoReturnDataStruct));
		curIndex = curIndex + curResult;

		/*�����Զ���·���ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)AutoRouteDataStru, AUTO_ROUTE_SUM_MAX, (UINT16)sizeof(AutoRouteDataStruct));
		curIndex = curIndex + curResult;

		/*�����ǽ�·���ݽṹ��*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(NONROUTE_ID_NUM_MAX * sizeof(NonRouteDataStruct)), (const void*)NonRouteDataStruArr, (UINT32)(NONROUTE_ID_NUM_MAX * sizeof(NonRouteDataStruct)));
		curIndex = curIndex + (UINT32)(NONROUTE_ID_NUM_MAX * sizeof(NonRouteDataStruct));

		/*����ָʾ�����ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)IndicatorDataStru, INDICATOR_SUM_MAX, (UINT16)sizeof(IndicatorDataStruct));
		curIndex = curIndex + curResult;

		/*����������·���ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)LongRouteDataStru, ROUTE_LONG_SUM_MAX, (UINT16)sizeof(LongRouteDataStruct));
		curIndex = curIndex + curResult;

		/*����CI���͵�������������ṹ������*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)SendCiCmdDataStru, SENDCI_CMD_DATA_STRU_SUM_MAX, (UINT16)sizeof(ToCiCommandDataStruct));
		curIndex = curIndex + curResult;

		/*����ȫ�Զ��۷����ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)AllAutoReturnDataStru, ALL_AUTO_RETURN_SUM_MAX, (UINT16)sizeof(AllAutoReturnDataStruct));
		curIndex = curIndex + curResult;

		/*�������������ݽṹ��*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)GaragedoorDataStru, GARAGE_DOOR_SUM_MAX, (UINT16)sizeof(GaragedoorDataStruct));
		curIndex = curIndex + curResult;

		/*����SPKS����*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)spksDataBuff, SPKS_SUM_MAX, (UINT16)sizeof(SpksDataStruct));
		curIndex = curIndex + curResult;

		/* վ��ģʽ */
		pCiAppDataPointer[curIndex] = GetCiModeFlag();
		curIndex += 1U;

		/*�˹�ȡ����ʱ����״̬ת��*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&LabourCancelLinShiXianState), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*������ǰ�Գ�״̬*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&ciTrainTestStatus), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*�����Զ�������־*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&AutoTriggerFlag), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*���������Ŷ�̬����*/
		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)FloodGateDataStru, FLOOD_GATE_SUM_MAX, (UINT16)sizeof(FloodGateDataStruct));
		curIndex = curIndex + curResult;

		/*����������ѩ��Ϣ*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&LocalAreaSnowNum), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		curResult = CopyValidGetDataStru(pCiAppDataPointer + curIndex, (void*)szLocalAreaSnow, LOCAL_AREA_SNOW_SUM_MAX, (UINT16)sizeof(AreaSnowInfoStruct));
		curIndex = curIndex + curResult;

		/*ͬ����������������ѩ������Ϣ*/
		(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);

		/* ����������ѩ���� */
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&g_LocalSnowModel), (UINT32)sizeof(UINT8));
		curIndex = curIndex + (UINT32)sizeof(UINT8);

		/*�յ�ATS�����������ں���Ϣ*/
		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16), (const void*)(&gReciveAtsCmdDataDeviceSum), (UINT32)sizeof(UINT16));
		curIndex = curIndex + (UINT32)sizeof(UINT16);

		(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ReciveAtsCmdDataCycInfo) * ATS_SUM_MAX * 2U), (const void*)szReciveAtsCmdDataCycInfo, (UINT32)(sizeof(ReciveAtsCmdDataCycInfo)* ATS_SUM_MAX * 2U));
		curIndex = curIndex + (UINT32)(sizeof(ReciveAtsCmdDataCycInfo) * ATS_SUM_MAX * 2U);

		/*�뱾CIͨ�ŵļ���ϵͳ������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, AXLE_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), axleHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*�뱾CIͨ�ŵ�OC������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, OC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ocHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*����OCԭʼ����*/
		curResult = CopyValidGetOcOrginData(pCiAppDataPointer + curIndex, OC_SUM_MAX, &m_OcToCiOrginDataArr[0]);
		curIndex = curIndex + curResult;

		/*�뱾CIͨ�ŵ�CI������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ciHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*�뱾CIͨ�ŵ�Rc������ͨ����ͷ����������*/
		curResult = CopyValidGetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), gSzRcHLHTHeadCtxs);
		curIndex = curIndex + curResult;

		/*ZC����������CBTC�г���ѹ��Ϣ*/
		pCiAppDataPointer[curIndex] = gCbtcCrossNumZc;
		curIndex += 1u;

		for (ii = 0u; ii < gCbtcCrossNumZc; ii++)
		{
			ShortToChar(gCbtcCrossStructZc[ii].wSignalId, &pCiAppDataPointer[curIndex]);
			curIndex += 2u;
			pCiAppDataPointer[curIndex] = gCbtcCrossStructZc[ii].wTrainId;
			curIndex += 1u;
		}
		/*����������������*/
		for (ii = 0U; ii < g_VirtualCIStructData.virtualCiNum; ii++)
		{
			(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8), (const void*)(&g_VirtualCIStructData.virtualCi[ii].virtualCiId), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

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

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


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

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

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

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

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

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

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

			/*ָʾ��״̬����*/
			(void)CommonMemCpy((void*)(pCiAppDataPointer + curIndex), (UINT32)(VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct) ,(const void*)(&g_VirtualCIStructData.virtualCi[ii].IndicatorData) , (UINT32)(VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct));
			curIndex = curIndex + (UINT32)((VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct));
		}
	}

	return curIndex;
}


/*
* ���������� RC����CI��Ӧ������
* ����˵���� UINT8 *pCiAppDataPointer, CIӦ������ָ��
*			 const UINT32 len�����ݳ���
* ����ֵ  �� UINT8��
*/
UINT8 SetCiGeneralData(const UINT8* pCiAppDataPointer, const UINT32 len)
{
	UINT8 rtn = 0u; /*����ֵ*/
	UINT32 allLen = 0u; /*�ܳ���*/
	UINT32 curIndex = 0u;         /*��¼�ƶ��±�*/
	UINT8 ii = 0u;
	UINT32 curResult = 0u;        /*�����ṹ����Ч��id����*/

	if (NULL != pCiAppDataPointer)
	{
		allLen = 4U + LongFromChar(&pCiAppDataPointer[curIndex]);
		curIndex = curIndex + 4u; /*���ݳ���*/
		if (allLen == len)
		{
			debug_infor_printf("sync ing\n");
			/*�������������۷���Ϣ*/
			(void)CommonMemCpy((void*)(&VirtualZDZFAJData), (UINT32)sizeof(VirtualZDZFAJDataStruct), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(VirtualZDZFAJDataStruct));
			curIndex = curIndex + (UINT32)sizeof(VirtualZDZFAJDataStruct);

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

			(void)CommonMemCpy((void*)(&leuToCiSum), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));	/*������ͨ�ŵ�LEU��Ŀ*/
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			(void)CommonMemCpy((void*)(&leuFaultFlag), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));		/*LEU���ϱ�־��1�޹��ϣ�0����*/
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*���������۷���Ϣ*/
			(void)CommonMemCpy((void*)(NonReturnDataStru), (UINT32)sizeof(NonReturnDataStru), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(NonReturnDataStru));
			curIndex = curIndex + (UINT32)sizeof(NonReturnDataStru);

			/*��������Գ���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);

			/*���������������ƽṹ��*/
			for (ii = 0; ii < g_VirtualCIStructData.virtualCiNum; ii++)
			{
				(void)CommonMemCpy((void*)(&ctrlpowerFlag[ii].virCiId), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);
				(void)CommonMemCpy((void*)(&ctrlpowerFlag[ii].ctrlDeviceId), (UINT32)sizeof(UINT16), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16));
				curIndex = curIndex + (UINT32)sizeof(UINT16);
				(void)CommonMemCpy((void*)(&ctrlpowerFlag[ii].ctrlDeviceType), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);
				(void)CommonMemCpy((void*)(&ctrlpowerFlag[ii].ctrlPowerState), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);
			}

			/*����ȡ����������������־*/
			(void)CommonMemCpy((void*)(&SwitchBlockLinkState), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);
#if 0
			/*�뱾CIͨ�ŵ�OC ���������������*/
			(void)CommonMemCpy((void*)m_Gds, (UINT32)(m_GdNum * sizeof(OcGdDevice)), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(m_GdNum * sizeof(OcGdDevice)));
			curIndex = curIndex + (UINT32)(m_GdNum * sizeof(OcGdDevice));

			/*OC�����й���������*/
			(void)CommonMemCpy((void*)(&m_GdNum), (UINT32)sizeof(UINT16), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);

			/*�뱾CIͨ�ŵ�OC DI����������*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)m_OcConvertedPtDataArr, (OC_SUM_MAX), (UINT16)sizeof(OcCollBoardDataStruct));
			curIndex = curIndex + curResult;

			/*�뱾CIͨ�ŵ�OC��������������*/
			(void)CommonMemCpy((void*)m_Switches, (UINT32)m_SwitchNum * sizeof(OcDeviceStruct), (const void*)(pCiAppDataPointer + curIndex), (UINT32)m_SwitchNum * sizeof(OcDeviceStruct));
			curIndex = curIndex + (UINT32)(m_SwitchNum * sizeof(OcDeviceStruct));

			/*OC�����е����豸������*/
			(void)CommonMemCpy((void*)(&m_SwitchNum), (UINT32)sizeof(UINT16), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);

			/*�뱾CIͨ�ŵ�OC�źŻ�����������*/
			(void)CommonMemCpy((void*)m_Signals, (UINT32)(m_SignalNum * sizeof(OcDeviceStruct)), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(m_SignalNum * sizeof(OcDeviceStruct)));
			curIndex = curIndex + (UINT32)(m_SignalNum * sizeof(OcDeviceStruct));

			/*OC�������źŻ��豸������*/
			(void)CommonMemCpy((void*)(&m_SignalNum), (UINT32)sizeof(UINT16), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);
#endif
			/*����ȫվ���Ʊ�־*/
			(void)CommonMemCpy((void*)(&AllSignalBrightFlag), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*����ȫվ����������־*/
			(void)CommonMemCpy((void*)(&AllSwitchYLockFlag), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*����ȫվ������־*/
			(void)CommonMemCpy((void*)(&StartFLockFlag), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*�����ϵ����ձ�־*/
			(void)CommonMemCpy((void*)(&StartLockFlag), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*����ֹͣ���δ����*/
			(void)CommonMemCpy((void*)(&StopCheckState), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*����Ӧ���̵̼���ID*/
			(void)CommonMemCpy((void*)(&JkjRelayId), (UINT32)sizeof(UINT16), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);

			/*����ƽ̨崻���־*/
			(void)CommonMemCpy((void*)(&PlatOverFlag), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*����JKJӦ���̵̼�����Ч*/
			(void)CommonMemCpy((void*)(&JkjRelayValid), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*����Ӧ���̵̼�����Ч����*/
			(void)CommonMemCpy((void*)(&JkjRelayValidCycNum), (UINT32)sizeof(UINT32), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);

			/*�����ܸ�λ״̬��Ч����*/
			(void)CommonMemCpy((void*)(&ZFWValidCycNum), (UINT32)sizeof(UINT32), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);

			/*�����ܸ�λ���ʼ����*/
			(void)CommonMemCpy((void*)(&ZFWCmdStartCycNum), (UINT32)sizeof(UINT32), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT32));
			curIndex = curIndex + (UINT32)sizeof(UINT32);

			/*����������ATSͨ�����ڼ�¼*/
			(void)CommonMemCpy((void*)(&ComCycNumForCiToAts), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*�����������ֵ�ͨ�����ڼ�¼*/
			(void)CommonMemCpy((void*)(&ComCycNumForCiToXianDi), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*���������ܸ�λ��־*/
			(void)CommonMemCpy((void*)(&generalResetFlag), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*������·���ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)RouteDataStru, ROUTE_SUM_MAX, (UINT16)sizeof(RouteDataStruct));
			curIndex = curIndex + curResult;

			/*�����źŻ����ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)SignalDataStru, 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���ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)EsbDataStru, ESB_SUM_MAX, (UINT16)sizeof(EsbDataStruct));
			curIndex = curIndex + curResult;

			/*�������������ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)PsdDataStru, PSD_SUM_MAX, (UINT16)sizeof(PsdDataStruct));
			curIndex = curIndex + curResult;

			/*���������������ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)OverlapDataStru, OVERLAP_SUM_MAX, (UINT16)sizeof(OverlapDataStruct));
			curIndex = curIndex + curResult;

			/*�����Զ��۷����ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)AutoReturnDataStru, AUTO_RETURN_SUM_MAX, (UINT16)sizeof(AutoReturnDataStruct));
			curIndex = curIndex + curResult;

			/*�����Զ���·���ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)AutoRouteDataStru, AUTO_ROUTE_SUM_MAX, (UINT16)sizeof(AutoRouteDataStruct));
			curIndex = curIndex + curResult;

			/*�����ǽ�·���ݽṹ��*/
			(void)CommonMemCpy((void*)NonRouteDataStruArr, (UINT32)(NONROUTE_ID_NUM_MAX * sizeof(NonRouteDataStruct)), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(NONROUTE_ID_NUM_MAX * sizeof(NonRouteDataStruct)));
			curIndex = curIndex + (UINT32)(NONROUTE_ID_NUM_MAX * sizeof(NonRouteDataStruct));

			/*����ָʾ�����ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)IndicatorDataStru, INDICATOR_SUM_MAX, (UINT16)sizeof(IndicatorDataStruct));
			curIndex = curIndex + curResult;

			/*����������·���ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)LongRouteDataStru, ROUTE_LONG_SUM_MAX, (UINT16)sizeof(LongRouteDataStruct));
			curIndex = curIndex + curResult;

			/*����CI���͵�������������ṹ������*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)SendCiCmdDataStru, SENDCI_CMD_DATA_STRU_SUM_MAX, (UINT16)sizeof(ToCiCommandDataStruct));
			curIndex = curIndex + curResult;

			/*����ȫ�Զ��۷����ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)AllAutoReturnDataStru, ALL_AUTO_RETURN_SUM_MAX, (UINT16)sizeof(AllAutoReturnDataStruct));
			curIndex = curIndex + curResult;

			/*�������������ݽṹ��*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)GaragedoorDataStru, GARAGE_DOOR_SUM_MAX, (UINT16)sizeof(GaragedoorDataStruct));
			curIndex = curIndex + curResult;

			/*����SPKS����*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)spksDataBuff, SPKS_SUM_MAX, (UINT16)sizeof(SpksDataStruct));
			curIndex = curIndex + curResult;

			/* վ��ģʽ */
			SetCiModeFlag(pCiAppDataPointer[curIndex]);
			curIndex += 1u;

			/*�˹�ȡ����ʱ����״̬ת��*/
			(void)CommonMemCpy((void*)(&LabourCancelLinShiXianState), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*������ǰ�Գ�״̬*/
			(void)CommonMemCpy((void*)(&ciTrainTestStatus), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*�����Զ�������־*/
			(void)CommonMemCpy((void*)(&AutoTriggerFlag), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*���������Ŷ�̬����*/
			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)FloodGateDataStru, FLOOD_GATE_SUM_MAX, (UINT16)sizeof(FloodGateDataStruct));
			curIndex = curIndex + curResult;

			/*����������ѩ��Ϣ*/
			(void)CommonMemCpy((void*)(&LocalAreaSnowNum), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			curResult = CopyValidSetDataStru(pCiAppDataPointer + curIndex, (void*)szLocalAreaSnow, LOCAL_AREA_SNOW_SUM_MAX, (UINT16)sizeof(AreaSnowInfoStruct));
			curIndex = curIndex + curResult;

			/*ͬ����������������ѩ������Ϣ*/
			(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);

			/* ����������ѩ���� */
			(void)CommonMemCpy((void*)(&g_LocalSnowModel), (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
			curIndex = curIndex + (UINT32)sizeof(UINT8);

			/*ͬ��ATS�����������ں���Ϣ*/
			(void)CommonMemCpy((void*)(&gReciveAtsCmdDataDeviceSum), (UINT32)sizeof(UINT16), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT16));
			curIndex = curIndex + (UINT32)sizeof(UINT16);

			(void)CommonMemCpy((void*)szReciveAtsCmdDataCycInfo, (UINT32)(sizeof(ReciveAtsCmdDataCycInfo)* ATS_SUM_MAX * 2U), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(sizeof(ReciveAtsCmdDataCycInfo)* ATS_SUM_MAX * 2U));
			curIndex = curIndex + (UINT32)(sizeof(ReciveAtsCmdDataCycInfo) * ATS_SUM_MAX * 2U);

			/*�뱾CIͨ�ŵļ���ϵͳ������ͨ����ͷ����������*/
			curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, AXLE_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), axleHLHTHeadCtxs);
			curIndex = curIndex + curResult;

			/*�뱾CIͨ�ŵ�OC������ͨ����ͷ����������*/
			curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, OC_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ocHLHTHeadCtxsCiToRc);/*�洢��CI�������ݽṹ��*/
			curIndex = curIndex + curResult;

			/*����OCԭʼ����*/
			curResult = CopyValidSetOcOrginData(pCiAppDataPointer + curIndex, OC_SUM_MAX, &m_OcToCiOrginDataArr[0]);
			curIndex = curIndex + curResult;

			/*�뱾����ͨ�ŵ�CI������ͨ����ͷ����������*/
			curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), ciHLHTHeadCtxsCiToRc);
			curIndex = curIndex + curResult;

			/*�뱾����ͨ�ŵ�Rc������ͨ����ͷ����������*/
			curResult = CopyValidSetHlhtHeadCtxs(pCiAppDataPointer + curIndex, CI_SUM_MAX, (UINT16)sizeof(HLHTHeadContextStru), gSzRcHLHTHeadCtxsCiToRc);
			curIndex = curIndex + curResult;

			/*ZC����������CBTC�г���ѹ��Ϣ*/
			gCbtcCrossNumZc = pCiAppDataPointer[curIndex];
			curIndex += 1u;

			for (ii = 0u; ii < gCbtcCrossNumZc; ii++)
			{
				gCbtcCrossStructZc[ii].wSignalId = ShortFromChar(&pCiAppDataPointer[curIndex]);
				curIndex += 2u;
				gCbtcCrossStructZc[ii].wTrainId = pCiAppDataPointer[curIndex];
				curIndex += 1u;
			}

			/*����������������*/
			for (ii = 0U; ii < g_VirtualCIStructData.virtualCiNum; ii++)
			{
				(void)CommonMemCpy((void*)(&g_VirtualCIStructData.virtualCi[ii].virtualCiId) , (UINT32)sizeof(UINT8), (const void*)(pCiAppDataPointer + curIndex), (UINT32)sizeof(UINT8));
				curIndex = curIndex + (UINT32)sizeof(UINT8);

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

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

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

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

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

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

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

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

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

				/*ָʾ��״̬����*/
				(void)CommonMemCpy((void*)(g_VirtualCIStructData.virtualCi[ii].IndicatorData), (UINT32)(VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct), (const void*)(pCiAppDataPointer + curIndex), (UINT32)(VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct));
				curIndex = curIndex + (UINT32)((VIRTUAL_CI_INDICATOR_SUM_MAX) * sizeof(IndicatorDataStruct));
			}

			rtn = 1u;
		}
		else
		{
		}
	}

	return rtn;
}

/*
* �������������˿���������ͨ����ͷ
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           struLength �ṹ�峤��
*           HLHTHeadContextStru pstrHLHTHeadCtxs[] �������Ļ�����ͨ����ͷ
* �� �� ֵ�����������ݳ���
* Created By LQ 2025.11.04
*/
UINT32 CopyValidGetHlhtHeadCtxs(UINT8* pCurCiAppDataPointer, UINT16 struNum, UINT16 struLength, HLHTHeadContextStru pstrHLHTHeadCtxs[])
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;

	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (0U != struLength) && (NULL != pstrHLHTHeadCtxs))
	{
		curIndex += (UINT32)sizeof(UINT16);  /*�������ֽ��豸����*/

		for (i = 0U; i < struNum; i++)
		{
			/*������ͨͷidΪ0ʱ������Ч����*/
			if (0U != pstrHLHTHeadCtxs[i].sourceId)
			{
				(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), struLength, (void*)(&pstrHLHTHeadCtxs[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 ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           struLength �ṹ�峤��
*           HLHTHeadContextStru pstrHLHTHeadCtxs[] �����õĻ�����ͨ����ͷ
* �� �� ֵ�����������ݳ���
* Created By LQ 2025.11.04
*/
UINT32 CopyValidSetHlhtHeadCtxs(const UINT8* pCurCiAppDataPointer, UINT16 struNum, UINT16 struLength, HLHTHeadContextStru pstrHLHTHeadCtxs[])
{
	UINT32 curIndex = 0U;
	UINT16 i = 0U;
	UINT16 ValidIdNum = 0U;
	UINT8  devId = 0U;
	HLHTHeadContextStru temp = { 0U };

	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (0U != struLength) && (NULL != pstrHLHTHeadCtxs))
	{
		/*��ȡ�ܵ���Ч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*)(&pstrHLHTHeadCtxs[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;
}

/*
* �������������˿����źŻ��ṹ��-����
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           SignalDataStructCC pstSignalDataStruCC[] �������Ľṹ��
* �� �� ֵ�����������ݳ���
* Created By LYJ 2025.11.07
*/
UINT32 CopyValidGetSigDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, SignalDataStructCC pstSignalDataStruCC[])
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;
	UINT16 j = 0U;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != pstSignalDataStruCC))
	{
		curIndex += (UINT32)sizeof(UINT16);  /*�������ֽ��豸����*/

		for (i = 0U; i < struNum; i++)
		{
			/*�źŻ�idΪ0ʱ������Ч����*/
			if (0U != pstSignalDataStruCC[i].SignalId)
			{
				ValidIdNum++;   /*�豸����*/
				ShortToChar(pstSignalDataStruCC[i].SignalId, (pCurCiAppDataPointer+ curIndex));
				curIndex += 2U;
				ShortToChar(pstSignalDataStruCC[i].wSignalLightUpLinkIdSum, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				for (j = 0U;j< pstSignalDataStruCC[i].wSignalLightUpLinkIdSum;j++)
				{
					ShortToChar(pstSignalDataStruCC[i].szSignalLightUpLinkIdBuf[j], (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
				}
				ShortToChar(pstSignalDataStruCC[i].wSignalLightUpTrainId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				
				*(pCurCiAppDataPointer + curIndex) = pstSignalDataStruCC[i].LogRouteSignalErrCloseFlag;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstSignalDataStruCC[i].cSleepTrainLightUpFlag;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstSignalDataStruCC[i].LightExtinctState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstSignalDataStruCC[i].SignalCrossState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstSignalDataStruCC[i].wCrossTacsTrainId;
				curIndex++;
			}
			else
			{
				/*��ִ���κβ���*/
			}

		}

		/*������Ч�豸����*/
		ShortToChar(ValidIdNum, pCurCiAppDataPointer);
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidGetSigDataCC is invailid\n");
	}

	return curIndex;
}

/*
* �������������������źŻ��ṹ��-����
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           SignalDataStructCC pstSignalDataStruCC[] �����õĽṹ��
* �� �� ֵ�����������ݳ���
* Created By LYJ 2025.11.07
*/
UINT32 CopyValidSetSigDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, SignalDataStructCC pstSignalDataStruCC[])
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;
	UINT16 j = 0U;
	UINT16 devId = 0U;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != pstSignalDataStruCC))
	{
		/*��ȡ�ܵ���ЧID����*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);
		curIndex += (UINT32)sizeof(UINT16);
		for (i = 0U; i < ValidIdNum; i++)
		{
			devId = ShortFromChar(pCurCiAppDataPointer + curIndex);
			curIndex += 2U;
			if (devId < struNum)
			{
				/*���浽ȫ������*/
				pstSignalDataStruCC[devId].SignalId = devId;
				pstSignalDataStruCC[devId].wSignalLightUpLinkIdSum = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				for (j = 0U;j< pstSignalDataStruCC[devId].wSignalLightUpLinkIdSum;j++)
				{
					pstSignalDataStruCC[devId].szSignalLightUpLinkIdBuf[j] = ShortFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 2U;
				}
				pstSignalDataStruCC[devId].wSignalLightUpTrainId = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				pstSignalDataStruCC[devId].LogRouteSignalErrCloseFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstSignalDataStruCC[devId].cSleepTrainLightUpFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstSignalDataStruCC[devId].LightExtinctState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstSignalDataStruCC[devId].SignalCrossState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstSignalDataStruCC[devId].wCrossTacsTrainId = *(pCurCiAppDataPointer + curIndex);
				curIndex++;

			}
			else
			{
				debug_infor_printf((const)"ERROR: CopyValidSetSigDataCC = %d\n", devId);
				break;
			}
		}
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidSetSigDataCC is invailid\n");
	}

	return curIndex;
}
/*
* �������������˿��������Žṹ��-����
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           FloodGateDataStructCC pstFloodGateDataStruCC[] �������Ľṹ��
* �� �� ֵ�����������ݳ���
* Created By LYJ 2025.11.07
*/
UINT32 CopyValidGetFloodGateDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum,FloodGateDataStructCC pstFloodGateDataStruCC[])
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;
	UINT8 j = 0U;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != pstFloodGateDataStruCC))
	{
		curIndex += (UINT32)sizeof(UINT16);  /*�������ֽ��豸����*/

		for (i = 0U; i < struNum; i++)
		{
			/*idΪ0ʱ������Ч����*/
			if (0U != pstFloodGateDataStruCC[i].FloodGateId)
			{
				ValidIdNum++;   /*�豸����*/
				ShortToChar(pstFloodGateDataStruCC[i].FloodGateId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				*(pCurCiAppDataPointer + curIndex) = pstFloodGateDataStruCC[i].FloodGateCloseApplyIvocSum;
				curIndex++;
				for (j = 0U;j < pstFloodGateDataStruCC[i].FloodGateCloseApplyIvocSum;j++)
				{
					ShortToChar(pstFloodGateDataStruCC[i].FloodGateCloseApplyIvocId[j], (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
				}
				*(pCurCiAppDataPointer + curIndex) = pstFloodGateDataStruCC[i].FloodGateCloseAnsIvocSum;
				curIndex++;
				for (j = 0U; j < pstFloodGateDataStruCC[i].FloodGateCloseAnsIvocSum; j++)
				{
					ShortToChar(pstFloodGateDataStruCC[i].FloodGateCloseFromIvocStru[j].wTrainId, (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
					*(pCurCiAppDataPointer + curIndex) = pstFloodGateDataStruCC[i].FloodGateCloseFromIvocStru[j].wFloodGateCloseIvocFlag;
					curIndex++;
				}
				*(pCurCiAppDataPointer + curIndex) = pstFloodGateDataStruCC[i].FloodGateAccessUTFlag;
				curIndex++;
			}
			else
			{
				/*��ִ���κβ���*/
			}
		}
		/*������Ч�豸����*/
		ShortToChar(ValidIdNum, pCurCiAppDataPointer);
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidGetFloodGateDataCC is invailid\n");
	}
	return curIndex;
}
/*
* �����������������÷����Žṹ��-����
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           FloodGateDataStructCC pstFloodGateDataStruCC[] �������Ľṹ��
* �� �� ֵ�����������ݳ���
* Created By LYJ 2025.11.07
*/
UINT32 CopyValidSetFloodGateDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum,FloodGateDataStructCC pstFloodGateDataStruCC[])
{

	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;
	UINT8 j = 0U;
	UINT16 devId = 0U;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != pstFloodGateDataStruCC))
	{
		/*��ȡ�ܵ���ЧID����*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);
		curIndex += (UINT32)sizeof(UINT16);
		for (i = 0U; i < ValidIdNum; i++)
		{
			devId = ShortFromChar(pCurCiAppDataPointer + curIndex);
			curIndex += 2U;
			if (devId < struNum)
			{
				pstFloodGateDataStruCC[devId].FloodGateId = devId;
				pstFloodGateDataStruCC[devId].FloodGateCloseApplyIvocSum = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				for (j = 0U;j < pstFloodGateDataStruCC[devId].FloodGateCloseApplyIvocSum;j++)
				{
					pstFloodGateDataStruCC[devId].FloodGateCloseApplyIvocId[j] = ShortFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 2U;
				}
				pstFloodGateDataStruCC[devId].FloodGateCloseAnsIvocSum = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				for (j = 0U; j < pstFloodGateDataStruCC[devId].FloodGateCloseAnsIvocSum; j++)
				{
					pstFloodGateDataStruCC[devId].FloodGateCloseFromIvocStru[j].wTrainId = ShortFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 2U;
					pstFloodGateDataStruCC[devId].FloodGateCloseFromIvocStru[j].wFloodGateCloseIvocFlag = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
				}
				pstFloodGateDataStruCC[devId].FloodGateAccessUTFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
			}
			else
			{
				debug_infor_printf((const)"ERROR: CopyValidSetFloodGateDataCC = %d\n", devId);
				break;
			}
		}
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidSetFloodGateDataCC is invailid\n");
	}
	return curIndex;
}

/*
* �������������˿����߼����νṹ��-����
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           LogicSectionDataStructCC pstLogSecDataStruCC[] �������Ľṹ��
* �� �� ֵ�����������ݳ���
* Created By LYJ 2025.11.07
*/
UINT32 CopyValidGetLogicSecDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum,LogicSectionDataStructCC pstLogSecDataStruCC[])
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;
	UINT8 j = 0U;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != pstLogSecDataStruCC))
	{
		curIndex += (UINT32)sizeof(UINT16);  /*�������ֽ��豸����*/

		for (i = 0U; i < struNum; i++)
		{
			/*idΪ0ʱ������Ч����*/
			if (0U != pstLogSecDataStruCC[i].LogicSectionId)
			{
				ValidIdNum++;   /*�豸����*/
				ShortToChar(pstLogSecDataStruCC[i].LogicSectionId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].chTrainInfoSum;
				curIndex++;
		
				for (j = 0U; j < pstLogSecDataStruCC[i].chTrainInfoSum; j++)
				{
					ShortToChar(pstLogSecDataStruCC[i].szTrainResData[j].wTrainId, (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
					*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szTrainResData[j].chTrainApplyState;
					curIndex++;
					*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szTrainResData[j].chLogicResUsable;
					curIndex++;
					*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szTrainResData[j].chLogicReturnState;
					curIndex++;
					*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szTrainResData[j].chLogicUnlockState;
					curIndex++;
					*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szTrainResData[j].chTrainLevel;
					curIndex++;
					LongToChar(pstLogSecDataStruCC[i].szTrainResData[j].dwRcvUnlockCmdCyc, (pCurCiAppDataPointer + curIndex));
					curIndex += 4U;
				}
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].cResReqOtherCIId;
				curIndex++;
				ShortToChar(pstLogSecDataStruCC[i].wResReqTrainId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].chResShareFlag;
				curIndex++;
				ShortToChar(pstLogSecDataStruCC[i].JumpLockTrainId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].LogJumpLockState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].LogJumpLockDelayUnlockFlag;
				curIndex++;
				LongToChar(pstLogSecDataStruCC[i].LogSecJumpDelayUnlockStartCyc, (pCurCiAppDataPointer + curIndex));
				curIndex += 4U;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].LogSecJumpLockPermFlag;
				curIndex++;
				LongToChar(pstLogSecDataStruCC[i].LogErrlockStartCycNum, (pCurCiAppDataPointer + curIndex));
				curIndex += 4U;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].chLogSecLockBelLogRouteSum;
				curIndex++;
				for (j = 0U; j < pstLogSecDataStruCC[i].chLogSecLockBelLogRouteSum; j++)
				{
					ShortToChar(pstLogSecDataStruCC[i].szLogSecLockBelLogRouteData[j].wLogSecLockBelLogRouteId, (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
					*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szLogSecLockBelLogRouteData[j].chLogSecLockBelLogRouteState;
					curIndex++;
					*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].szLogSecLockBelLogRouteData[j].wLogSecLockBelLogRouteDir;
					curIndex++;
				}
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].LogSecLogLockState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].LogSecLogLockDir;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].chAblRelLogSecUsableFlag;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].cRouteLeaveLogFlag;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].LinShiXianSuSetFlag;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].OccupyState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstLogSecDataStruCC[i].TXOccupyState;
				curIndex++;
			}
			else
			{
				/*��ִ���κβ���*/
			}
		}

		/*������Ч�豸����*/
		ShortToChar(ValidIdNum, pCurCiAppDataPointer);
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidGetLogicSecDataCC is invailid\n");
	}
	return curIndex;
}

/*
* �������������������߼����νṹ��-����
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           LogicSectionDataStructCC pstLogSecDataStruCC[] �������Ľṹ��
* �� �� ֵ�����������ݳ���
* Created By LYJ 2025.11.07
*/
UINT32 CopyValidSetLogicSecDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum,LogicSectionDataStructCC pstLogSecDataStruCC[])
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;
	UINT8 j = 0U;
	UINT16 devId = 0U;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != pstLogSecDataStruCC))
	{
		/*��ȡ�ܵ���ЧID����*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);
		curIndex += (UINT32)sizeof(UINT16);
		for (i = 0U; i < ValidIdNum; i++)
		{
			devId = ShortFromChar(pCurCiAppDataPointer + curIndex);
			curIndex += 2U;
			if (devId < struNum)
			{
				pstLogSecDataStruCC[devId].LogicSectionId = devId;
				pstLogSecDataStruCC[devId].chTrainInfoSum = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				for (j = 0U;j < pstLogSecDataStruCC[devId].chTrainInfoSum;j++)
				{
					pstLogSecDataStruCC[devId].szTrainResData[j].wTrainId = ShortFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 2U;
					pstLogSecDataStruCC[devId].szTrainResData[j].chTrainApplyState = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
					pstLogSecDataStruCC[devId].szTrainResData[j].chLogicResUsable = * (pCurCiAppDataPointer + curIndex);
					curIndex++;
					pstLogSecDataStruCC[devId].szTrainResData[j].chLogicReturnState = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
					pstLogSecDataStruCC[devId].szTrainResData[j].chLogicUnlockState = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
					pstLogSecDataStruCC[devId].szTrainResData[j].chTrainLevel = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
					pstLogSecDataStruCC[devId].szTrainResData[j].dwRcvUnlockCmdCyc = LongFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 4U;

				}
				pstLogSecDataStruCC[devId].cResReqOtherCIId = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].wResReqTrainId = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				pstLogSecDataStruCC[devId].chResShareFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].JumpLockTrainId = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				pstLogSecDataStruCC[devId].LogJumpLockState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].LogJumpLockDelayUnlockFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].LogSecJumpDelayUnlockStartCyc = LongFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 4U;
				pstLogSecDataStruCC[devId].LogSecJumpLockPermFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].LogErrlockStartCycNum = LongFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 4U;
				pstLogSecDataStruCC[devId].chLogSecLockBelLogRouteSum = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				for (j = 0U; j < pstLogSecDataStruCC[devId].chLogSecLockBelLogRouteSum; j++)
				{
					pstLogSecDataStruCC[devId].szLogSecLockBelLogRouteData[j].wLogSecLockBelLogRouteId = ShortFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 2U;
					pstLogSecDataStruCC[devId].szLogSecLockBelLogRouteData[j].chLogSecLockBelLogRouteState = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
					pstLogSecDataStruCC[devId].szLogSecLockBelLogRouteData[j].wLogSecLockBelLogRouteDir = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
				}
				pstLogSecDataStruCC[devId].LogSecLogLockState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].LogSecLogLockDir = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].chAblRelLogSecUsableFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].cRouteLeaveLogFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].LinShiXianSuSetFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].OccupyState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstLogSecDataStruCC[devId].TXOccupyState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
			}
			else
			{
				debug_infor_printf((const)"ERROR: CopyValidSetLogicSecDataCC = %d\n", devId);
				break;
			}
		}
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidSetLogicSecDataCC is invailid\n");
	}
	return curIndex;

}
/*
* �������������˿�����·�ṹ��-����
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           RouteDataStructCC pstRouteDataStruCC[] �������Ľṹ��
* �� �� ֵ�����������ݳ���
* Created By LYJ 2025.11.10
*/
UINT32 CopyValidGetRouteDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, RouteDataStructCC pstRouteDataStruCC[])
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;
	UINT8 j = 0U;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != pstRouteDataStruCC))
	{
		curIndex += (UINT32)sizeof(UINT16);  /*�������ֽ��豸����*/

		for (i = 0U; i < struNum; i++)
		{
			/*idΪ0ʱ������Ч����*/
			if (0U != pstRouteDataStruCC[i].RouteId)
			{
				ValidIdNum++;   /*�豸����*/
				ShortToChar(pstRouteDataStruCC[i].RouteId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				ShortToChar(pstRouteDataStruCC[i].wStopEnsureTrainId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				LongToChar(pstRouteDataStruCC[i].dwStopEnsureCyc, (pCurCiAppDataPointer + curIndex));
				curIndex += 4U;
				ShortToChar(pstRouteDataStruCC[i].wResourceCancelTrainId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				LongToChar(pstRouteDataStruCC[i].dwResourceCancelCyc, (pCurCiAppDataPointer + curIndex));
				curIndex += 4U;
				ShortToChar(pstRouteDataStruCC[i].wZhefanjiesuoTrainId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				LongToChar(pstRouteDataStruCC[i].dwRouteZhefanjiesuoCyc, (pCurCiAppDataPointer + curIndex));
				curIndex += 4U;
				*(pCurCiAppDataPointer + curIndex) = pstRouteDataStruCC[i].cResReqOtherCIId;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstRouteDataStruCC[i].chResReqTrainSum;
				curIndex++;
				for (j = 0U; j < pstRouteDataStruCC[i].chResReqTrainSum; j++)
				{
					ShortToChar(pstRouteDataStruCC[i].wszResReqTrainId[j], (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
				}
				*(pCurCiAppDataPointer + curIndex) = pstRouteDataStruCC[i].ITSRouteApplyTrainIdSum;
				curIndex++;
				for (j = 0U; j < pstRouteDataStruCC[i].ITSRouteApplyTrainIdSum; j++)
				{
					ShortToChar(pstRouteDataStruCC[i].ITSRouteApplyTrainIdBuf[j], (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
				}
				*(pCurCiAppDataPointer + curIndex) = pstRouteDataStruCC[i].HalfRouteDataSt.HalfRouteSwitchMoveValid;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstRouteDataStruCC[i].HalfRouteDataSt.RouteLockLgcSecNum;
				curIndex++;
				for (j = 0U; j < pstRouteDataStruCC[i].HalfRouteDataSt.RouteLockLgcSecNum; j++)
				{
					ShortToChar(pstRouteDataStruCC[i].HalfRouteDataSt.RouteLockLgcSecIdBuf[j], (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
				}
				ShortToChar(pstRouteDataStruCC[i].HalfRouteDataSt.HalfResReqTrainId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				*(pCurCiAppDataPointer + curIndex) = pstRouteDataStruCC[i].HalfRouteDataSt.TrainLocLgcSecNum;
				curIndex++;
				for (j = 0U; j < pstRouteDataStruCC[i].HalfRouteDataSt.TrainLocLgcSecNum; j++)
				{
					ShortToChar(pstRouteDataStruCC[i].HalfRouteDataSt.TrainLocLgcSecIdBuf[j], (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
				}
				ShortToChar(pstRouteDataStruCC[i].wBelongDrId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				LongToChar(pstRouteDataStruCC[i].dwFirstElockStartCycNum, (pCurCiAppDataPointer + curIndex));
				curIndex += 4U;
				*(pCurCiAppDataPointer + curIndex) = pstRouteDataStruCC[i].chRouteNearSecSearchState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = pstRouteDataStruCC[i].StopensureFlag;
				curIndex++;
			}
			else
			{
				/*��ִ���κβ���*/
			}
		}
		/*������Ч�豸����*/
		ShortToChar(ValidIdNum, pCurCiAppDataPointer);
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidGetRouteDataCC is invailid\n");
	}
	return curIndex;
}

/*
* �������������˿�����·�ṹ��-����
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*           RouteDataStructCC pstRouteDataStruCC[] �������Ľṹ��
* �� �� ֵ�����������ݳ���
* Created By LYJ 2025.11.10
*/
UINT32 CopyValidSetRouteDataCC(UINT8* pCurCiAppDataPointer, UINT16 struNum, RouteDataStructCC pstRouteDataStruCC[])
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;
	UINT8 j = 0U;
	UINT16 devId = 0U;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != pstRouteDataStruCC))
	{
		/*��ȡ�ܵ���ЧID����*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);
		curIndex += (UINT32)sizeof(UINT16);
		for (i = 0U; i < ValidIdNum; i++)
		{
			devId = ShortFromChar(pCurCiAppDataPointer + curIndex);
			curIndex += 2U;
			if (devId < struNum)
			{
				pstRouteDataStruCC[devId].RouteId = devId;
				pstRouteDataStruCC[devId].wStopEnsureTrainId = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				pstRouteDataStruCC[devId].dwStopEnsureCyc = LongFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 4U;
				pstRouteDataStruCC[devId].wResourceCancelTrainId = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				pstRouteDataStruCC[devId].dwResourceCancelCyc = LongFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 4U;
				pstRouteDataStruCC[devId].wZhefanjiesuoTrainId = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				pstRouteDataStruCC[devId].dwRouteZhefanjiesuoCyc = LongFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 4U;
				pstRouteDataStruCC[devId].cResReqOtherCIId = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstRouteDataStruCC[devId].chResReqTrainSum = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				for (j = 0U; j < pstRouteDataStruCC[devId].chResReqTrainSum; j++)
				{
					pstRouteDataStruCC[devId].wszResReqTrainId[j] = ShortFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 2U;
				}
				pstRouteDataStruCC[devId].ITSRouteApplyTrainIdSum = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				for (j = 0U; j < pstRouteDataStruCC[devId].ITSRouteApplyTrainIdSum; j++)
				{
					pstRouteDataStruCC[devId].ITSRouteApplyTrainIdBuf[j] = ShortFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 2U;
				}
				pstRouteDataStruCC[devId].HalfRouteDataSt.HalfRouteSwitchMoveValid = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstRouteDataStruCC[devId].HalfRouteDataSt.RouteLockLgcSecNum = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				for (j = 0U; j < pstRouteDataStruCC[devId].HalfRouteDataSt.RouteLockLgcSecNum; j++)
				{
					pstRouteDataStruCC[devId].HalfRouteDataSt.RouteLockLgcSecIdBuf[j] = ShortFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 2U;
				}
				pstRouteDataStruCC[devId].HalfRouteDataSt.HalfResReqTrainId = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				pstRouteDataStruCC[devId].HalfRouteDataSt.TrainLocLgcSecNum = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				for (j = 0U; j < pstRouteDataStruCC[devId].HalfRouteDataSt.TrainLocLgcSecNum; j++)
				{
					pstRouteDataStruCC[devId].HalfRouteDataSt.TrainLocLgcSecIdBuf[j] = ShortFromChar(pCurCiAppDataPointer + curIndex);
					curIndex += 2U;
				}
				pstRouteDataStruCC[devId].wBelongDrId = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				pstRouteDataStruCC[devId].dwFirstElockStartCycNum = LongFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 4U;
				pstRouteDataStruCC[devId].chRouteNearSecSearchState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				pstRouteDataStruCC[devId].StopensureFlag = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
			}
			else
			{
				debug_infor_printf((const)"ERROR: CopyValidSetRouteDataCC = %d\n", devId);
				break;
			}
		}
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidSetRouteDataCC is invailid\n");
	}
	return curIndex;
}

/*
* ��������������ZC���͵��źŻ�����
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopyGetZcSignalDymDataStru(UINT8* pCurCiAppDataPointer)
{
	UINT32 dwCurIndex = 0U;
	UINT8 cLocalCiId = 0U;
	UINT16 ii = 0U;
	UINT16 wSignalSum = 0U;  /*�������źŻ�����*/
	UINT16 wSignalId = 0U;  /*�źŻ�ID*/
	UINT16 wBufIndex = 0U;
	UINT8 cSignalBlongCiId = 0U;  /*�źŻ���������*/
	UINT16 wValidDevNum = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		cLocalCiId = GetSystemParaLocalCiId();
		wSignalSum = GetSignalCurSum();
		for (ii = 0U; ii < wSignalSum; ii++)
		{
			wSignalId = GetSignalId(ii);
			wBufIndex = GetSignalConfigBufIndex(wSignalId);
			cSignalBlongCiId = GetSignalBelongCiId(wSignalId);
			if (cLocalCiId == cSignalBlongCiId)
			{
				/*�������������źŻ�����*/
				(void)CommonMemCpy((void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(SignalDataStructZC)), (const void*)(&gZcToCiDymDataStru.szSignalDataStruZc[wBufIndex]), (UINT32)(sizeof(SignalDataStructZC)));
				dwCurIndex += (UINT32)(sizeof(SignalDataStructZC));
				wValidDevNum++;
			}
			else
			{
				/*�Ǳ������źŻ�����ͬ��*/
			}
		}

		/*������Ч���豸����*/
		ShortToChar(wValidDevNum, pCurCiAppDataPointer);
	}
	else
	{
		debug_infor_printf((const)"\nCopyGetZcSignalDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}

/*
* ����������ͬ��ZC���͵��źŻ�����
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopySetZcSignalDymDataStru(const UINT8* pCurCiAppDataPointer)
{
	UINT16 wValidDevNum = 0U;
	UINT32 dwCurIndex = 0U;
	UINT16 ii = 0U;
	UINT16 wSignalId = 0U;  /*�źŻ�ID*/
	UINT16 wBufIndex = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		/*��ȡ���豸����*/
		wValidDevNum = ShortFromChar(pCurCiAppDataPointer);

		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		/*ͬ��ǰ������*/
		(void)CommonMemSet((void*)(gZcToCiDymDataStru.szSignalDataStruZc), (UINT32)(sizeof(SignalDataStructZC) * SIGNAL_SUM_MAX), (UINT8)0U, (UINT32)(sizeof(SignalDataStructZC) * SIGNAL_SUM_MAX));

		/*��ʼͬ����������*/
		for (ii = 0U; ii < wValidDevNum; ii++)
		{
			wSignalId = ShortFromCharLE(pCurCiAppDataPointer + dwCurIndex);
			wBufIndex = GetSignalConfigBufIndex(wSignalId);
			if (wBufIndex < SIGNAL_SUM_MAX)
			{
				(void)CommonMemCpy((void*)(&gZcToCiDymDataStru.szSignalDataStruZc[wBufIndex]), (UINT32)(sizeof(SignalDataStructZC)), (const void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(SignalDataStructZC)));
			}
			else
			{
				debug_infor_printf((const)"\nCopySetZcSignalDymDataStru: wSignalId[%d] Is Invalid\n", wSignalId);
			}

			dwCurIndex += (UINT32)(sizeof(SignalDataStructZC));
		}
	}
	else
	{
		debug_infor_printf((const)"\nCopySetZcSignalDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}

/*
* ��������������ZC���͵��߼���������
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopyGetZcLogSecDymDataStru(UINT8* pCurCiAppDataPointer)
{
	UINT32 dwCurIndex = 0U;
	UINT8 cLocalCiId = 0U;
	UINT16 ii = 0U;
	UINT16 wLogSecSum = 0U;  /*�������߼���������*/
	UINT16 wLogSecId = 0U;  /*�߼�����ID*/
	UINT16 wBufIndex = 0U;
	UINT8 cLogSecBlongCiId = 0U;  /*�߼�������������*/
	UINT16 wValidDevNum = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		cLocalCiId = GetSystemParaLocalCiId();
		wLogSecSum = GetLogicSecCurSum();
		for (ii = 0U; ii < wLogSecSum; ii++)
		{
			wLogSecId = GetLogicSecId(ii);
			wBufIndex = GetlogSectionBufIndex(wLogSecId);
			cLogSecBlongCiId = GetLogSecBelongCiId(wLogSecId);
			if (cLocalCiId == cLogSecBlongCiId)
			{
				/*�������������߼���������*/
				(void)CommonMemCpy((void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(LogicSectionDataStructZC)), (const void*)(&gZcToCiDymDataStru.LogicSectionDataStruZc[wBufIndex]), (UINT32)(sizeof(LogicSectionDataStructZC)));
				dwCurIndex += (UINT32)(sizeof(LogicSectionDataStructZC));
				wValidDevNum++;
			}
			else
			{
				/*�Ǳ������߼����Σ���ͬ��*/
			}
		}

		/*������Ч���豸����*/
		ShortToChar(wValidDevNum, pCurCiAppDataPointer);
	}
	else
	{
		debug_infor_printf((const)"\nCopyGetZcLogSecDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}

/*
* ����������ͬ��ZC���͵��߼���������
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopySetZcLogSecDymDataStru(const UINT8* pCurCiAppDataPointer)
{
	UINT16 wValidDevNum = 0U;
	UINT32 dwCurIndex = 0U;
	UINT16 ii = 0U;
	UINT16 wLogSecId = 0U;  /*�߼�����ID*/
	UINT16 wBufIndex = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		/*��ȡ���豸����*/
		wValidDevNum = ShortFromChar(pCurCiAppDataPointer);

		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		/*ͬ��ǰ������*/
		(void)CommonMemSet((void*)(gZcToCiDymDataStru.LogicSectionDataStruZc), (UINT32)(sizeof(LogicSectionDataStructZC) * LOGIC_SECTION_SUM_MAX), (UINT8)0U, (UINT32)(sizeof(LogicSectionDataStructZC) * LOGIC_SECTION_SUM_MAX));

		/*��ʼͬ����������*/
		for (ii = 0U; ii < wValidDevNum; ii++)
		{
			wLogSecId = ShortFromCharLE(pCurCiAppDataPointer + dwCurIndex);
			wBufIndex = GetlogSectionBufIndex(wLogSecId);
			if (wBufIndex < LOGIC_SECTION_SUM_MAX)
			{
				(void)CommonMemCpy((void*)(&gZcToCiDymDataStru.LogicSectionDataStruZc[wBufIndex]), (UINT32)(sizeof(LogicSectionDataStructZC)), (const void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(LogicSectionDataStructZC)));
			}
			else
			{
				debug_infor_printf((const)"\nCopySetZcLogSecDymDataStru: wLogSecId[%d] Is Invalid\n", wLogSecId);
			}

			dwCurIndex += (UINT32)(sizeof(LogicSectionDataStructZC));
		}
	}
	else
	{
		debug_infor_printf((const)"\nCopySetZcLogSecDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}

/*
* ��������������ZC���͵ļ�����������
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopyGetZcAxisSecDymDataStru(UINT8* pCurCiAppDataPointer)
{
	UINT32 dwCurIndex = 0U;
	UINT8 cLocalCiId = 0U;
	UINT16 ii = 0U;
	UINT16 wAxisSecSum = 0U;  /*������������������*/
	UINT16 wAxisSecId = 0U;  /*��������ID*/
	UINT16 wBufIndex = 0U;
	UINT8 cAxisSecBlongCiId = 0U;  /*����������������*/
	UINT16 wValidDevNum = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		cLocalCiId = GetSystemParaLocalCiId();
		wAxisSecSum = GetAxisSecCurSum();
		for (ii = 0U; ii < wAxisSecSum; ii++)
		{
			wAxisSecId = GetAxisSecId(ii);
			wBufIndex = GetAxisSecConfigBufIndex(wAxisSecId);
			cAxisSecBlongCiId = GetAxisSectionBelongCiId(wAxisSecId);
			if (cLocalCiId == cAxisSecBlongCiId)
			{
				/*������������������������*/
				(void)CommonMemCpy((void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(AxisSectionDataStructZC)), (const void*)(&gZcToCiDymDataStru.AxisSectionDataStruZc[wBufIndex]), (UINT32)(sizeof(AxisSectionDataStructZC)));
				dwCurIndex += (UINT32)(sizeof(AxisSectionDataStructZC));
				wValidDevNum++;
			}
			else
			{
				/*�Ǳ������������Σ���ͬ��*/
			}
		}

		/*������Ч���豸����*/
		ShortToChar(wValidDevNum, pCurCiAppDataPointer);
	}
	else
	{
		debug_infor_printf((const)"\nCopyGetZcAxisSecDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}

/*
* ����������ͬ��ZC���͵ļ�����������
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopySetZcAxisSecDymDataStru(const UINT8* pCurCiAppDataPointer)
{
	UINT16 wValidDevNum = 0U;
	UINT32 dwCurIndex = 0U;
	UINT16 ii = 0U;
	UINT16 wAxisSecId = 0U;  /*��������ID*/
	UINT16 wBufIndex = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		/*��ȡ���豸����*/
		wValidDevNum = ShortFromChar(pCurCiAppDataPointer);

		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		/*ͬ��ǰ������*/
		(void)CommonMemSet((void*)(gZcToCiDymDataStru.AxisSectionDataStruZc), (UINT32)(sizeof(AxisSectionDataStructZC) * AXIS_SECTION_SUM_MAX), (UINT8)0U, (UINT32)(sizeof(AxisSectionDataStructZC) * AXIS_SECTION_SUM_MAX));

		/*��ʼͬ����������*/
		for (ii = 0U; ii < wValidDevNum; ii++)
		{
			wAxisSecId = ShortFromCharLE(pCurCiAppDataPointer + dwCurIndex);
			wBufIndex = GetAxisSecConfigBufIndex(wAxisSecId);
			if (wBufIndex < AXIS_SECTION_SUM_MAX)
			{
				(void)CommonMemCpy((void*)(&gZcToCiDymDataStru.AxisSectionDataStruZc[wBufIndex]), (UINT32)(sizeof(AxisSectionDataStructZC)), (const void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(AxisSectionDataStructZC)));
			}
			else
			{
				debug_infor_printf((const)"\nCopySetZcAxisSecDymDataStru: wAxisSecId[%d] Is Invalid\n", wAxisSecId);
			}

			dwCurIndex += (UINT32)(sizeof(AxisSectionDataStructZC));
		}
	}
	else
	{
		debug_infor_printf((const)"\nCopySetZcAxisSecDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}

/*
* ��������������ZC���͵�������������
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopyGetZcPhySecDymDataStru(UINT8* pCurCiAppDataPointer)
{
	UINT32 dwCurIndex = 0U;
	UINT8 cLocalCiId = 0U;
	UINT16 ii = 0U;
	UINT16 wPhySecSum = 0U;  /*������������������*/
	UINT16 wPhySecId = 0U;  /*��������ID*/
	UINT16 wBufIndex = 0U;
	UINT8 cPhySecBlongCiId = 0U;  /*����������������*/
	UINT16 wValidDevNum = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		cLocalCiId = GetSystemParaLocalCiId();
		wPhySecSum = GetPhySecCurSum();
		for (ii = 0U; ii < wPhySecSum; ii++)
		{
			wPhySecId = GetPhySecId(ii);
			wBufIndex = GetPhySecConfigBufIndex(wPhySecId);
			cPhySecBlongCiId = GetPhySecBelongCiId(wPhySecId);
			if (cLocalCiId == cPhySecBlongCiId)
			{
				/*������������������������*/
				(void)CommonMemCpy((void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(PhysicalSectionDataStructZC)), (const void*)(&gZcToCiDymDataStru.PhysicalSectionDataStruZc[wBufIndex]), (UINT32)(sizeof(PhysicalSectionDataStructZC)));
				dwCurIndex += (UINT32)(sizeof(PhysicalSectionDataStructZC));
				wValidDevNum++;
			}
			else
			{
				/*�Ǳ������������Σ���ͬ��*/
			}
		}

		/*������Ч���豸����*/
		ShortToChar(wValidDevNum, pCurCiAppDataPointer);
	}
	else
	{
		debug_infor_printf((const)"\nCopyGetZcPhySecDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}

/*
* ����������ͬ��ZC���͵�������������
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopySetZcPhySecDymDataStru(const UINT8* pCurCiAppDataPointer)
{
	UINT16 wValidDevNum = 0U;
	UINT32 dwCurIndex = 0U;
	UINT16 ii = 0U;
	UINT16 wPhySecId = 0U;  /*��������ID*/
	UINT16 wBufIndex = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		/*��ȡ���豸����*/
		wValidDevNum = ShortFromChar(pCurCiAppDataPointer);

		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		/*ͬ��ǰ������*/
		(void)CommonMemSet((void*)(gZcToCiDymDataStru.PhysicalSectionDataStruZc), (UINT32)(sizeof(PhysicalSectionDataStructZC) * PHYSICAL_SECTION_SUM_MAX), (UINT8)0U, (UINT32)(sizeof(PhysicalSectionDataStructZC) * PHYSICAL_SECTION_SUM_MAX));

		/*��ʼͬ����������*/
		for (ii = 0U; ii < wValidDevNum; ii++)
		{
			wPhySecId = ShortFromCharLE(pCurCiAppDataPointer + dwCurIndex);
			wBufIndex = GetPhySecConfigBufIndex(wPhySecId);
			if (wBufIndex < PHYSICAL_SECTION_SUM_MAX)
			{
				(void)CommonMemCpy((void*)(&gZcToCiDymDataStru.PhysicalSectionDataStruZc[wBufIndex]), (UINT32)(sizeof(PhysicalSectionDataStructZC)), (const void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(PhysicalSectionDataStructZC)));
			}
			else
			{
				debug_infor_printf((const)"\nCopySetZcPhySecDymDataStru: wPhySecId[%d] Is Invalid\n", wPhySecId);
			}

			dwCurIndex += (UINT32)(sizeof(PhysicalSectionDataStructZC));
		}
	}
	else
	{
		debug_infor_printf((const)"\nCopySetZcPhySecDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}

/*
* ��������������ZC���͵Ľ�·����
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopyGetZcRouteDymDataStru(UINT8* pCurCiAppDataPointer)
{
	UINT32 dwCurIndex = 0U;
	UINT8 cLocalCiId = 0U;
	UINT16 ii = 0U;
	UINT16 wRouteSum = 0U;  /*��������·����*/
	UINT16 wRouteId = 0U;  /*��·ID*/
	UINT16 wBufIndex = 0U;
	UINT8 cRouteBlongCiId = 0U;  /*��·��������*/
	UINT16 wValidDevNum = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		cLocalCiId = GetSystemParaLocalCiId();
		wRouteSum = GetRouteCurSum();
		for (ii = 0U; ii < wRouteSum; ii++)
		{
			wRouteId = GetRouteId(ii);
			wBufIndex = GetRouteConfigBufIndex(wRouteId);
			cRouteBlongCiId = GetRouteBelongCiId(wRouteId);
			if (cLocalCiId == cRouteBlongCiId)
			{
				/*��������������·����*/
				(void)CommonMemCpy((void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(RouteDataStructZC)), (const void*)(&gZcToCiDymDataStru.szRouteDataStruZc[wBufIndex]), (UINT32)(sizeof(RouteDataStructZC)));
				dwCurIndex += (UINT32)(sizeof(RouteDataStructZC));
				wValidDevNum++;
			}
			else
			{
				/*�Ǳ�������·����ͬ��*/
			}
		}

		/*������Ч���豸����*/
		ShortToChar(wValidDevNum, pCurCiAppDataPointer);
	}
	else
	{
		debug_infor_printf((const)"\nCopyGetZcRouteDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}

/*
* ����������ͬ��ZC���͵Ľ�·����
* ����˵����UINT8* pCurCiAppDataPointer ��ǰ����ָ��
* �� �� ֵ���������ݵĳ���
* Created By LQ 2025.11.10
*/
UINT32 CopySetZcRouteDymDataStru(const UINT8* pCurCiAppDataPointer)
{
	UINT16 wValidDevNum = 0U;
	UINT32 dwCurIndex = 0U;
	UINT16 ii = 0U;
	UINT16 wRouteId = 0U;  /*��·ID*/
	UINT16 wBufIndex = 0U;

	/*���У��*/
	if (NULL != pCurCiAppDataPointer)
	{
		/*��ȡ���豸����*/
		wValidDevNum = ShortFromChar(pCurCiAppDataPointer);

		dwCurIndex += (UINT32)(sizeof(UINT16));  /*�������ֽ��豸����*/

		/*ͬ��ǰ������*/
		(void)CommonMemSet((void*)(gZcToCiDymDataStru.szRouteDataStruZc), (UINT32)(sizeof(RouteDataStructZC) * ROUTE_SUM_MAX), (UINT8)0U, (UINT32)(sizeof(RouteDataStructZC) * ROUTE_SUM_MAX));

		/*��ʼͬ����������*/
		for (ii = 0U; ii < wValidDevNum; ii++)
		{
			wRouteId = ShortFromCharLE(pCurCiAppDataPointer + dwCurIndex);
			wBufIndex = GetRouteConfigBufIndex(wRouteId);
			if (wBufIndex < ROUTE_SUM_MAX)
			{
				(void)CommonMemCpy((void*)(&gZcToCiDymDataStru.szRouteDataStruZc[wBufIndex]), (UINT32)(sizeof(RouteDataStructZC)), (const void*)(pCurCiAppDataPointer + dwCurIndex), (UINT32)(sizeof(RouteDataStructZC)));
			}
			else
			{
				debug_infor_printf((const)"\nCopySetZcRouteDymDataStru: wRouteId[%d] Is Invalid\n", wRouteId);
			}

			dwCurIndex += (UINT32)(sizeof(RouteDataStructZC));
		}
	}
	else
	{
		debug_infor_printf((const)"\nCopySetZcRouteDymDataStru: InputPara Is Invalid\n");
		dwCurIndex = 0U;
	}

	return dwCurIndex;
}
/*
* ������������������OC��Ч����
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
* �� �� ֵ�����������ݳ���
* Created By fan 2025.11.12
*/
UINT32 CopyValidSetOcOrginData(UINT8* pCurCiAppDataPointer, UINT16 struNum, OcToCiOriginDataStruct OcRecvData[])
{
	UINT32 curIndex = 0U;
	UINT16 ValidIdNum = 0U;
	UINT16 i = 0U;
	UINT16 k = 0U;
	UINT8 j = 0U;
	UINT16  devId = 0U;
	UINT16 devNum = 0U;
	OcDeviceStruct *pOcDevice = NULL;
	OcGdDevice *pOcGdDevice = NULL;
	OcDIBoard *pOcDIDevice = NULL;
	OcSIBoard *pOcSIDevice = NULL;
	OcDoBoard *pOcDoDevice = NULL;
	OcDoBoard *pOcSoDevice = NULL;
	OcSorBoard *pOcSorDevice = NULL;
	OcPlusBox *pOcPbDevice = NULL;
	OcToCiPsdInfo *pOcPsdDevice = NULL;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != OcRecvData))
	{
		/*��ȡ�ܵ���ЧID����*/
		ValidIdNum = ShortFromChar(pCurCiAppDataPointer);
		curIndex += (UINT32)sizeof(UINT16);
		if (struNum > ValidIdNum)
		{
			m_OcToCiOrginDataNum = (UINT8)ValidIdNum;
			/*����*/
			debug_infor_printf((char*)"m_OcToCiOrginDataNum = %d\n", m_OcToCiOrginDataNum);
			(void)CommonMemSet(OcRecvData, (UINT32)((OC_SUM_MAX)* sizeof(OcToCiOriginDataStruct)), 0U, (UINT32)((OC_SUM_MAX)* sizeof(OcToCiOriginDataStruct)));		/*����սṹ���ֹ������*/
			for (i = 0U; i < ValidIdNum; i++)
			{
				devId = ShortFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 2U;
				/*���ڱ�����*/
				OcRecvData[i].OcId = devId;
				devNum = ShortFromChar(pCurCiAppDataPointer + curIndex);/*�豸�ṹ������*/
				curIndex += 2U;
				OcRecvData[i].OcDeviceNum = devNum;/*�豸����*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_DEVICE_NUM); k++)
				{
					pOcDevice = &(OcRecvData[i].OcDevices[k]);
					pOcDevice->OcId = devId;
					pOcDevice->DeviceType = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
					pOcDevice->DeviceId = ShortFromChar(pCurCiAppDataPointer + curIndex);/*�豸id*/
					curIndex += 2U;
					pOcDevice->DeviceState = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
					pOcDevice->chSwitchIncldeZzjNum = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
					for (j = 0U;( j < pOcDevice->chSwitchIncldeZzjNum)&& (j < MAX_OC_SWITCH_INCLUDE_ZZJ_NUM); j++)
					{
						pOcDevice->szSwitchIncldeZzjState[j] = *(pCurCiAppDataPointer + curIndex);
						curIndex++;
					}
					pOcDevice->BoardNum = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
					for (j = 0U; (j < pOcDevice->BoardNum) && (j < MAX_OC_SWITCH_INCLUDE_BOARD_NUM); j++)
					{
						pOcDevice->BoardAddr[j] = *(pCurCiAppDataPointer + curIndex);
						curIndex++;
						pOcDevice->BoardState[j] = *(pCurCiAppDataPointer + curIndex);
						curIndex++;
						pOcDevice->MainStandbyState[j] = *(pCurCiAppDataPointer + curIndex);
						curIndex++;
					}
				}

				devNum = ShortFromChar(pCurCiAppDataPointer + curIndex);/*�������*/
				curIndex += 2U;
				OcRecvData[i].OcGdNum = devNum;
				/*ֱ�ӿ���*/
				for (k = 0U; (k < devNum) && (k < Max_OC_GD_NUM); k++)
				{
					pOcGdDevice = &(OcRecvData[i].OcGdDevices[k]);
					(void)CommonMemCpy((void*)pOcGdDevice, (UINT32)sizeof(OcGdDevice), (const void*)(pCurCiAppDataPointer + curIndex), (UINT32) sizeof(OcGdDevice));
					curIndex = curIndex + (UINT32)sizeof(OcGdDevice);
				}

				devNum = ShortFromChar(pCurCiAppDataPointer + curIndex);/*DI�忨*/
				curIndex += 2U;
				OcRecvData[i].OcDIBoardDataNum = devNum;
				/*ֱ�ӿ���*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_BOARD_NUM); k++)
				{
					pOcDIDevice = &(OcRecvData[i].OcDIBoardDatas[k]);
					(void)CommonMemCpy((void*)pOcDIDevice, (UINT32)sizeof(OcDIBoard), (const void*)(pCurCiAppDataPointer + curIndex), (UINT32) sizeof(OcDIBoard));
					curIndex = curIndex + (UINT32)sizeof(OcDIBoard);
				}

				devNum = ShortFromChar(pCurCiAppDataPointer + curIndex);/*SI�忨*/
				curIndex += 2U;
				OcRecvData[i].OcSIBoardDataNum = devNum;
				/*ֱ�ӿ���*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_BOARD_NUM); k++)
				{
					pOcSIDevice = &(OcRecvData[i].OcSIBoardDatas[k]);
					(void)CommonMemCpy((void*)pOcSIDevice, (UINT32)sizeof(OcSIBoard), (const void*)(pCurCiAppDataPointer + curIndex), (UINT32) sizeof(OcSIBoard));
					curIndex = curIndex + (UINT32)sizeof(OcSIBoard);
				}

				devNum = ShortFromChar(pCurCiAppDataPointer + curIndex);/*DO�忨*/
				curIndex += 2U;
				OcRecvData[i].OcDOBoardNum = devNum;
				/*ֱ�ӿ���*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_BOARD_NUM); k++)
				{
					pOcDoDevice = &(OcRecvData[i].OcDOBoardDatas[k]);
					(void)CommonMemCpy((void*)pOcDoDevice, (UINT32)sizeof(OcDoBoard), (const void*)(pCurCiAppDataPointer + curIndex), (UINT32) sizeof(OcDoBoard));
					curIndex = curIndex + (UINT32)sizeof(OcDoBoard);
				}

				devNum = ShortFromChar(pCurCiAppDataPointer + curIndex);/*SO�忨*/
				curIndex += 2U;
				OcRecvData[i].OcSOBoardNum = devNum;
				/*ֱ�ӿ���*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_BOARD_NUM); k++)
				{
					pOcSoDevice = &(OcRecvData[i].OcSOBoardDatas[k]);
					(void)CommonMemCpy((void*)pOcSoDevice, (UINT32)sizeof(OcDoBoard), (const void*)(pCurCiAppDataPointer + curIndex), (UINT32) sizeof(OcDoBoard));
					curIndex = curIndex + (UINT32)sizeof(OcDoBoard);
				}

				OcRecvData[i].OcSORBoardNum = *(pCurCiAppDataPointer + curIndex);/*Sor�忨*/
				curIndex++;
				/*ֱ�ӿ���*/
				for (j = 0U; (j < OcRecvData[i].OcSORBoardNum) && (j < MAX_OC_BOARD_NUM); j++)
				{
					pOcSorDevice = &(OcRecvData[i].OcSORBoardDatas[j]);
					(void)CommonMemCpy((void*)pOcSorDevice, (UINT32)sizeof(OcSorBoard), (const void*)(pCurCiAppDataPointer + curIndex), (UINT32) sizeof(OcSorBoard));
					curIndex = curIndex + (UINT32)sizeof(OcSorBoard);
				}
				OcRecvData[i].PowerAState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].PowerBState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].OCDevFaultState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].FanState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;

				OcRecvData[i].chPbNum = *(pCurCiAppDataPointer + curIndex);/*ִ�е����*/
				curIndex++; 
				/*ֱ�ӿ���*/
				for (j = 0U; (j < OcRecvData[i].chPbNum) && (j < MAX_OC_PLUS_BOX_NUM); j++)
				{
					pOcPbDevice = &(OcRecvData[i].szPlusBox[j]);
					(void)CommonMemCpy((void*)pOcPbDevice, (UINT32)sizeof(OcPlusBox), (const void*)(pCurCiAppDataPointer + curIndex), (UINT32) sizeof(OcPlusBox));
					curIndex = curIndex + (UINT32)sizeof(OcPlusBox);
				}

				devNum = ShortFromChar(pCurCiAppDataPointer + curIndex);/*��ϵ�忨*/
				curIndex += 2U;
				OcRecvData[i].OCBoardSwapSysNum = devNum;
				/*ֱ�ӿ���*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_DEVICE_SWAP_MAX); k++)
				{
					OcRecvData[i].SwapSysBoardId[k] = *(pCurCiAppDataPointer + curIndex);
					curIndex++;
				}

				OcRecvData[i].OCPsdNum = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].DrvPowerState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].CtlPowerState = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].EdgeCtllerState1 = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].EdgeCtllerState2 = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				/*��������������*/
				for (j = 0U; (j < OcRecvData[i].OCPsdNum) && (j < MAX_OC_DEVICE_PSD_MAX); j++)
				{
					pOcPsdDevice = &(OcRecvData[i].PsdInfo[j]);
					(void)CommonMemCpy((void*)pOcPsdDevice, (UINT32)sizeof(OcToCiPsdInfo), (const void*)(pCurCiAppDataPointer + curIndex), (UINT32) sizeof(OcToCiPsdInfo));
					curIndex = curIndex + (UINT32)sizeof(OcToCiPsdInfo);
				}

				OcRecvData[i].chHaveYjk = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].chControlMode = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].chOcYjpComm = *(pCurCiAppDataPointer + curIndex);
				curIndex++;
				OcRecvData[i].ComStartCycle = LongFromChar(pCurCiAppDataPointer + curIndex);
				curIndex += 4U;
			}
		}

	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidSetOcOrginData is invailid\n");
	}
	return curIndex;
}

/*
* �������������˿���OCԭʼ������Чֵ
* ����˵����UINT8 *pCurCiAppDataPointer ��ǰ����ָ��
*           UINT16 struNum ���鳤��
*          OcToCiOriginDataStruct OcRecvData[] �������Ľṹ��
* �� �� ֵ�����������ݳ���
* Created By fan 2025.11.12
*/
UINT32 CopyValidGetOcOrginData(UINT8* pCurCiAppDataPointer, UINT16 struNum, OcToCiOriginDataStruct OcRecvData[])
{
	UINT32 curIndex = 0U;
	UINT16 i = 0U;
	UINT16 k = 0U;
	UINT8 j = 0U;
	UINT16 devNum = 0U;
	OcDeviceStruct *pOcDevice = NULL;
	OcGdDevice *pOcGdDevice = NULL;
	OcDIBoard *pOcDIDevice = NULL;
	OcSIBoard *pOcSIDevice = NULL;
	OcDoBoard *pOcDoDevice = NULL;
	OcDoBoard *pOcSoDevice = NULL;
	OcSorBoard *pOcSorDevice = NULL;
	OcPlusBox *pOcPbDevice = NULL;
	OcToCiPsdInfo *pOcPsdDevice = NULL;
	/*���У��*/
	if ((NULL != pCurCiAppDataPointer) && (0U != struNum) && (NULL != OcRecvData))
	{
		/*������Ч�豸����*/
		ShortToChar(m_OcToCiOrginDataNum, pCurCiAppDataPointer);
		curIndex += (UINT32)sizeof(UINT16);  /*�������ֽ��豸����*/
		//printf("m_OcToCiOrginDataNum = %d\n", m_OcToCiOrginDataNum);

		for (i = 0U; i < m_OcToCiOrginDataNum; i++)
			{
				ShortToChar(OcRecvData[i].OcId, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				ShortToChar(OcRecvData[i].OcDeviceNum, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				devNum = OcRecvData[i].OcDeviceNum;
				for (k = 0U; (k < devNum) && (k < MAX_OC_DEVICE_NUM); k++)
				{
					pOcDevice = &(OcRecvData[i].OcDevices[k]);
					*(pCurCiAppDataPointer + curIndex) = pOcDevice->DeviceType;
					curIndex++;
					ShortToChar(pOcDevice->DeviceId, (pCurCiAppDataPointer + curIndex));
					curIndex += 2U;
					*(pCurCiAppDataPointer + curIndex) = pOcDevice->DeviceState;
					curIndex++;
					*(pCurCiAppDataPointer + curIndex) = pOcDevice->chSwitchIncldeZzjNum;
					curIndex++;
					for (j = 0U; (j < pOcDevice->chSwitchIncldeZzjNum )&& (j < MAX_OC_SWITCH_INCLUDE_ZZJ_NUM); j++)
					{
						*(pCurCiAppDataPointer + curIndex) = pOcDevice->szSwitchIncldeZzjState[j];
						curIndex++;
					}
					*(pCurCiAppDataPointer + curIndex) = pOcDevice->BoardNum;
					curIndex++;
					for (j = 0U; (j < pOcDevice->BoardNum)&&(j < MAX_OC_SWITCH_INCLUDE_BOARD_NUM); j++)
					{
						*(pCurCiAppDataPointer + curIndex) = pOcDevice->BoardAddr[j];
						curIndex++;
						*(pCurCiAppDataPointer + curIndex) = pOcDevice->BoardState[j];
						curIndex++;
						*(pCurCiAppDataPointer + curIndex) = pOcDevice->MainStandbyState[j];
						curIndex++;
					}
				}
				ShortToChar(OcRecvData[i].OcGdNum, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				devNum = OcRecvData[i].OcGdNum;/*һ��oc�����й�����ε�����*/
											   /*ֱ�ӿ���*/
				for (k = 0U; (k < devNum) && (k < Max_OC_GD_NUM); k++)
				{
					pOcGdDevice = &(OcRecvData[i].OcGdDevices[k]);
					(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), (UINT32)sizeof(OcGdDevice), (const void*)pOcGdDevice, (UINT32) sizeof(OcGdDevice));
					curIndex = curIndex + (UINT32)sizeof(OcGdDevice);
				}

				ShortToChar(OcRecvData[i].OcDIBoardDataNum, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				devNum = OcRecvData[i].OcDIBoardDataNum;/*һ��oc������DI�忨*/
														/*ֱ�ӿ���*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_BOARD_NUM); k++)
				{
					pOcDIDevice = &(OcRecvData[i].OcDIBoardDatas[k]);
					(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), (UINT32)sizeof(OcDIBoard), (const void*)pOcDIDevice, (UINT32) sizeof(OcDIBoard));
					curIndex = curIndex + (UINT32)sizeof(OcDIBoard);
				}

				ShortToChar(OcRecvData[i].OcSIBoardDataNum, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				devNum = OcRecvData[i].OcSIBoardDataNum;/*һ��oc������SI�忨*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_BOARD_NUM); k++)
				{
					pOcSIDevice = &(OcRecvData[i].OcSIBoardDatas[k]);
					(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), (UINT32)sizeof(OcSIBoard), (const void*)pOcSIDevice, (UINT32) sizeof(OcSIBoard));
					curIndex = curIndex + (UINT32)sizeof(OcSIBoard);
				}

				ShortToChar(OcRecvData[i].OcDOBoardNum, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				devNum = OcRecvData[i].OcDOBoardNum;/*һ��oc������DO�忨*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_BOARD_NUM); k++)
				{
					pOcDoDevice = &(OcRecvData[i].OcDOBoardDatas[k]);
					(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), (UINT32)sizeof(OcDoBoard), (const void*)pOcDoDevice, (UINT32) sizeof(OcDoBoard));
					curIndex = curIndex + (UINT32)sizeof(OcDoBoard);
				}

				ShortToChar(OcRecvData[i].OcSOBoardNum, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				devNum = OcRecvData[i].OcSOBoardNum;/*һ��oc������SO�忨*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_BOARD_NUM); k++)
				{
					pOcSoDevice = &(OcRecvData[i].OcSOBoardDatas[k]);
					(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), (UINT32)sizeof(OcDoBoard), (const void*)pOcSoDevice, (UINT32) sizeof(OcDoBoard));
					curIndex = curIndex + (UINT32)sizeof(OcDoBoard);
				}

				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].OcSORBoardNum;
				curIndex++;
				for (j = 0U; (j < OcRecvData[i].OcSORBoardNum) && (j < MAX_OC_BOARD_NUM); j++)
				{
					pOcSorDevice = &(OcRecvData[i].OcSORBoardDatas[j]);
					(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), (UINT32)sizeof(OcSorBoard), (const void*)pOcSorDevice, (UINT32) sizeof(OcSorBoard));
					curIndex = curIndex + (UINT32)sizeof(OcSorBoard);
				}

				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].PowerAState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].PowerBState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].OCDevFaultState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].FanState;
				curIndex++;

				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].chPbNum;/*ִ�е����*/
				curIndex++;
				for (j = 0U; (j < OcRecvData[i].chPbNum) && (j < MAX_OC_PLUS_BOX_NUM); j++)
				{
					pOcPbDevice = &(OcRecvData[i].szPlusBox[j]);
					(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), (UINT32)sizeof(OcPlusBox), (const void*)pOcPbDevice, (UINT32) sizeof(OcPlusBox));
					curIndex = curIndex + (UINT32)sizeof(OcPlusBox);
				}

				ShortToChar(OcRecvData[i].OCBoardSwapSysNum, (pCurCiAppDataPointer + curIndex));
				curIndex += 2U;
				devNum = OcRecvData[i].OCBoardSwapSysNum;/*һ��oc����ϵ�忨*/
				for (k = 0U; (k < devNum) && (k < MAX_OC_DEVICE_SWAP_MAX); k++)
				{
					*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].SwapSysBoardId[k];
					curIndex++;
				}

				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].OCPsdNum;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].DrvPowerState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].CtlPowerState;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].EdgeCtllerState1;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].EdgeCtllerState2;
				curIndex++;
				for (j = 0U; (j < OcRecvData[i].OCPsdNum) && (j < MAX_OC_DEVICE_PSD_MAX); j++)
				{
					pOcPsdDevice = &(OcRecvData[i].PsdInfo[j]);
					(void)CommonMemCpy((void*)(pCurCiAppDataPointer + curIndex), (UINT32)sizeof(OcToCiPsdInfo), (const void*)pOcPsdDevice, (UINT32) sizeof(OcToCiPsdInfo));
					curIndex = curIndex + (UINT32)sizeof(OcToCiPsdInfo);
				}

				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].chHaveYjk;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].chControlMode;
				curIndex++;
				*(pCurCiAppDataPointer + curIndex) = OcRecvData[i].chOcYjpComm;
				curIndex++;
				LongToChar(OcRecvData[i].ComStartCycle, (pCurCiAppDataPointer + curIndex));
				curIndex += 4U;
			}
		
	}
	else
	{
		curIndex = 0U;
		debug_infor_printf((const)"ERROR: CopyValidGetOcOrginData is invailid\n");
	}
	return curIndex;
}