亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? statistic.c

?? CBS(小區廣播)程序實現手稿
?? C
?? 第 1 頁 / 共 5 頁
字號:

	return iReturnValue;
}


/* 處理服務元素的統計 
 * <0:返回錯誤, >=0:返回Pid
 */
int Process_Statistic_Cbse(CBEMESSAGE_t *LpCBEMessage)
{
	MESSAGE_STATISTIC_t            *LpMessageStatistic;
	int                            iReturnValue;
	PID_t                          s_Pid;
	CBSE_STATISTIC_RESULT_t        s_CBSEStatisticResult;
	int                            Tid;
	int                            i,j,k;
	CELL_CBSE_STATISTIC_RESULT_t   s_CellCBSEStatisticResult;
	unsigned char                  bIfCellExist;

	LpMessageStatistic=(MESSAGE_STATISTIC_t *)LpCBEMessage;

	s_Pid.cFunctionId=MODULEID;
    s_Pid.cFunctionId=FUNCTIONID;

	switch(LpMessageStatistic->ParaId)
	{
	case CBCPROXY_CBSE_CNT:  /* CBCProxy業務請求次數 */
		{
			/* 分配一個統計進程 */
			s_Pid.cFunctionId=FUNCTIONID;
			s_Pid.cModuleId=MODULEID;
			s_Pid.iProcessId=alloc_pid((char *)&s_Pid);
			if ( s_Pid.iProcessId < 0 )
			{
				printf("Creat Process Error\n");
				return FAILURE;
			}
			
			memcpy(&LpMessageStatistic->s_StatMessageHead.s_ReceiverPid,
				&s_Pid,sizeof(PID_t));

			memset(&ProcessData[s_Pid.iProcessId][0],0,LPCB_DATA_SIZE);
			memset(&s_CBSEStatisticResult,0,sizeof(CBSE_STATISTIC_RESULT_t));

			memcpy(&ProcessData[s_Pid.iProcessId][0],LpCBEMessage,LpCBEMessage->iLen+2);
			LpMessageStatistic=(MESSAGE_STATISTIC_t *)&ProcessData[s_Pid.iProcessId][0];			

			/* 有6種業務的統計 */
			s_CBSEStatisticResult.cNumber=6;
    
			i=0;
	        /* 寫入 */
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=WRITE_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount=
				s_CBSECount.s_CbcProxyReqCnt.iCBCProxyWriteReqCnt ;
			i++;

            /* 替換 */
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=REPLACE_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount=
				s_CBSECount.s_CbcProxyReqCnt.iCBCProxyReplaceReqCnt ;
			i++;
			/* 刪除 */
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=KILL_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount= 
				s_CBSECount.s_CbcProxyReqCnt.iCBCProxyKillReqCnt;
			i++;
            /* 消息狀態查詢查詢 */
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=QUERY_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount= 
				s_CBSECount.s_CbcProxyReqCnt.iCBCProxyMsgQueryCnt;
			i++;
            /* 小區信道負荷查詢 */ 
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=CBCH_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount= 
				s_CBSECount.s_CbcProxyReqCnt.iCBCProxyCBCHReqCnt;
			i++;

            /* 小區重啟 */ 
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=RESET_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount= 
				s_CBSECount.s_CbcProxyReqCnt.iCBCProxyResetCnt;
			i++;

			memcpy(&ProcessData[s_Pid.iProcessId][sizeof(MESSAGE_STATISTIC_t)],&s_CBSEStatisticResult,s_CBSEStatisticResult.cNumber*sizeof(STATTYPE_COUNT_t)+1);

			/* 創建統計定時器 */
			iReturnValue=create_timer(LpMessageStatistic->StatTimeLength*1000,
				STATISTIC_TIMER,(char *)&s_Pid,NULL);
			/* 創建定時器失敗 */
			if (iReturnValue<0)
			{
				printf("Create timer Error!\n");
				/* 結束統計進程 */
				free_pid((char *)&s_Pid);

				return iReturnValue;
			}

			/* 保存統計定時器在進程區尾部 */
			memcpy(&ProcessData[s_Pid.iProcessId][LPCB_DATA_SIZE-sizeof(int)],&iReturnValue,sizeof(int));
						
		}
    	break;

	case BSC_CBSE_CNT: /* 對各個BSC業務請求次數 */
		{
			/* 分配一個統計進程 */
			s_Pid.cFunctionId=FUNCTIONID;
			s_Pid.cModuleId=MODULEID;
			s_Pid.iProcessId=alloc_pid((char *)&s_Pid);
			if ( s_Pid.iProcessId < 0 )
			{
				printf("Creat Process Error\n");
				return FAILURE;
			}

			memcpy(&LpMessageStatistic->s_StatMessageHead.s_ReceiverPid,
				&s_Pid,sizeof(PID_t));

			memset(&ProcessData[s_Pid.iProcessId][0],0,LPCB_DATA_SIZE);
			memset(&s_CBSEStatisticResult,0,sizeof(CBSE_STATISTIC_RESULT_t));

			memcpy(&ProcessData[s_Pid.iProcessId][0],LpCBEMessage,LpCBEMessage->iLen+2);
			LpMessageStatistic=(MESSAGE_STATISTIC_t *)&ProcessData[s_Pid.iProcessId][0];			

			Tid=GetTid(&LpMessageStatistic->BSCIdentifier[0]);
			if (Tid<0)
			{
				return UNRECOGNIZED_BSC;
			}

			/* 有6種業務的統計 */
			s_CBSEStatisticResult.cNumber=6;
    
			i=0;

	        /* 寫入 */
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=WRITE_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount=
				s_CBSECount.s_ReqBSCCnt[Tid].iCBCProxyWriteReqCnt ;
			i++;
            /* 替換 */
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=REPLACE_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount=
				s_CBSECount.s_ReqBSCCnt[Tid].iCBCProxyReplaceReqCnt ;
			i++;
			/* 刪除 */
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=KILL_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount= 
				s_CBSECount.s_ReqBSCCnt[Tid].iCBCProxyKillReqCnt;
			i++;
            /* 消息狀態查詢查詢 */
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=QUERY_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount= 
				s_CBSECount.s_ReqBSCCnt[Tid].iCBCProxyMsgQueryCnt;
			i++;
            /* 小區信道負荷查詢 */ 
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=CBCH_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount= 
				s_CBSECount.s_ReqBSCCnt[Tid].iCBCProxyCBCHReqCnt;
			i++;

            /* 小區重啟 */ 
			s_CBSEStatisticResult.s_StattypeCount[i].cStatisticType=RESET_STATISTIC;
			s_CBSEStatisticResult.s_StattypeCount[i].iCount= 
				s_CBSECount.s_ReqBSCCnt[Tid].iCBCProxyResetCnt;

			memcpy(&ProcessData[s_Pid.iProcessId][sizeof(MESSAGE_STATISTIC_t)],&s_CBSEStatisticResult,s_CBSEStatisticResult.cNumber*sizeof(STATTYPE_COUNT_t)+1);

			/* 創建統計定時器 */
			iReturnValue=create_timer(LpMessageStatistic->StatTimeLength*1000,
				STATISTIC_TIMER,(char *)&s_Pid,NULL);
			/* 創建定時器失敗 */
			if (iReturnValue<0)
			{
				printf("Create timer Error!\n");
				/* 釋放進程 */
				free_pid((char *)&s_Pid);
				return iReturnValue;
			}
			/* 保存統計定時器在進程區尾部 */
			memcpy(&ProcessData[s_Pid.iProcessId][LPCB_DATA_SIZE-sizeof(int)],&iReturnValue,sizeof(int));

		}
		break;

    case CELL_CBSE_CNT: /* 小區服務元素的統計,包括成功和失敗 */
		{
			/* 分配一個統計進程 */
		    s_Pid.cFunctionId=FUNCTIONID;
            s_Pid.cModuleId=MODULEID;
			s_Pid.iProcessId=alloc_pid((char *)&s_Pid);
			if ( s_Pid.iProcessId < 0 )
			{
				printf("Creat Process Error\n");
				return FAILURE;
			}

			memcpy(&LpMessageStatistic->s_StatMessageHead.s_ReceiverPid,
				&s_Pid,sizeof(PID_t));

			memset(&ProcessData[s_Pid.iProcessId][0],0,LPCB_DATA_SIZE);
			memset(&s_CBSEStatisticResult,0,sizeof(CBSE_STATISTIC_RESULT_t));

			memcpy(&ProcessData[s_Pid.iProcessId][0],LpCBEMessage,LpCBEMessage->iLen+2);
			LpMessageStatistic=(MESSAGE_STATISTIC_t *)&ProcessData[s_Pid.iProcessId][0];			

			/* 初始為不存在 */
			bIfCellExist=0;

			for(i=0;i<MAX_BSC_CONNECT;i++)
			{
				if (s_BSCCellInfo[i].bFlag==1)
				{
  					for(j=0;j<s_BSCCellInfo[i].cNumberOfBTS;j++)
					{
						for(k=0;k<s_BSCCellInfo[i].s_BTSCellInfo[j].cNumberOfCell;k++)
						{
							if(memcmp(&LpMessageStatistic->cCellId[0],
								&s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].cCellId[0],4)==0)
							{
								/* 記下小區在系統中的位置,記在進程尾部 */
								memcpy(&ProcessData[s_Pid.iProcessId][LPCB_DATA_SIZE-16],&i,4);
								memcpy(&ProcessData[s_Pid.iProcessId][LPCB_DATA_SIZE-12],&j,4);
								memcpy(&ProcessData[s_Pid.iProcessId][LPCB_DATA_SIZE-8],&k,4);
								bIfCellExist=EXIST;
								/* 跳出循環 */
								goto L_out;
							}
						}
					}
				}
			}

L_out:
			if(bIfCellExist==0)
			{
				return NO_RECOGNIZEABLE_CELL;
			}

			memset(&s_CellCBSEStatisticResult,0,sizeof(CELL_CBSE_STATISTIC_RESULT_t));   

			s_CellCBSEStatisticResult.cNumber=0;

			/* 寫入 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].cStatisticType=WRITE_STATISTIC;
			/* 發送總數 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].iSendCount=
				s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_WriteCount.iSendCount;
			/* 成功總數 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].iSuccessCount=
				s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_WriteCount.iSuccessCount;
			/* 基站系統負荷超載 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].ibsscapErr=
				s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_WriteCount.ibsscapErr;
			/* 小區內存溢出	 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].icellmemErr=
				s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_WriteCount.icellmemErr;
			/* 基站系統內存溢出	 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].ibssmemErr=
				s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_WriteCount.ibssmemErr;
			/* 其他錯誤 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].iotherErr=
				s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_WriteCount.iotherErr;
	
			s_CellCBSEStatisticResult.cNumber++;
    
            /* 替換 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].cStatisticType=REPLACE_STATISTIC;
			memcpy(&s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].iSuccessCount
			,&s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_ReplaceCount,sizeof(CELL_STAT_t));

			s_CellCBSEStatisticResult.cNumber++;
			
			/* 刪除 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].cStatisticType=KILL_STATISTIC;
			memcpy(&s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].iSuccessCount
			,&s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_KillCount,sizeof(CELL_STAT_t));

			s_CellCBSEStatisticResult.cNumber++;

			
            /* 消息狀態查詢查詢 */
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].cStatisticType=QUERY_STATISTIC;
			memcpy(&s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].iSuccessCount
			,&s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_QueryCount,sizeof(CELL_STAT_t));

			s_CellCBSEStatisticResult.cNumber++;

			
            /* 小區信道負荷查詢 */ 
			s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].cStatisticType=CBCH_STATISTIC;
			memcpy(&s_CellCBSEStatisticResult.s_StattypeCount[s_CellCBSEStatisticResult.cNumber].iSuccessCount
			,&s_BSCCellInfo[i].s_BTSCellInfo[j].s_CellId[k].s_CBCHCount,sizeof(CELL_STAT_t));

			s_CellCBSEStatisticResult.cNumber++;

			
			memcpy(&ProcessData[s_Pid.iProcessId][sizeof(MESSAGE_STATISTIC_t)],&s_CellCBSEStatisticResult,s_CellCBSEStatisticResult.cNumber*sizeof(CELL_STATTYPE_COUNT_t)+1);

			/* 創建統計定時器 */
			iReturnValue=create_timer(LpMessageStatistic->StatTimeLength*1000,
				STATISTIC_TIMER,(char *)&s_Pid,NULL);
			/* 創建定時器失敗 */
			if (iReturnValue<0)
			{
				printf("Create timer Error!\n");
				/* 結束統計進程 */
				free_pid((char *)&s_Pid);

				return iReturnValue;
			}
			/* 保存統計定時器在進程區尾部 */
			memcpy(&ProcessData[s_Pid.iProcessId][LPCB_DATA_SIZE-sizeof(int)],&iReturnValue,sizeof(int));

		}
		break;

	default:
		{
			/* 無法識別的統計類型 */
			return UNRECOGNIZED_STATISTIC_TYPE;
		}
		break;

	}

	return s_Pid.iProcessId;
}


/* 處理小區廣播失敗和重新復位的次數的統計 
 * <0:返回錯誤, >=0:返回Pid
 */
int Process_Statistic_FailAndReset(CBEMESSAGE_t *LpCBEMessage)
{
	MESSAGE_STATISTIC_t            *LpMessageStatistic;
	int                            iReturnValue;
	PID_t                          s_Pid;
	int                            Tid;
	int                            i,j,k;
//    CELL_RESET_AND_FAIL_STAT_RESULT_t  s_CellResetAndFailStatResult;
	CELL_RESETFAIL_COUNT_t         s_Cell_ResetFail_Count; 
	unsigned char                  bIfCellExist; 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲大片免费看| 色综合婷婷久久| 国产欧美综合在线| 国产精品乡下勾搭老头1| 精品国产乱码久久久久久1区2区| 亚洲一二三四久久| 欧美性受xxxx黑人xyx| 一区二区三区蜜桃网| 欧美精品三级日韩久久| 成人一区二区三区在线观看| 久久综合丝袜日本网| 国产成人99久久亚洲综合精品| 国产日韩欧美激情| 91麻豆国产精品久久| 全部av―极品视觉盛宴亚洲| 国产日韩欧美一区二区三区综合| 99精品桃花视频在线观看| 亚洲综合男人的天堂| 精品国产伦理网| 91碰在线视频| 老司机免费视频一区二区三区| 国产精品久久网站| 日韩欧美在线网站| 色综合天天视频在线观看| 蜜桃精品在线观看| 亚洲精品写真福利| 亚洲一区二区三区精品在线| 国产欧美日产一区| 日韩限制级电影在线观看| 91国产福利在线| 91无套直看片红桃| 91小视频在线观看| 国产69精品一区二区亚洲孕妇 | 欧美一级黄色大片| 99国产麻豆精品| 99国产精品久久久久久久久久久| 国产一区二区调教| 久久av资源站| 卡一卡二国产精品| 青青草国产精品97视觉盛宴| 亚洲激情五月婷婷| 亚洲综合男人的天堂| 亚洲精品国产精华液| 一区视频在线播放| 中文字幕永久在线不卡| 国产精品乱码妇女bbbb| 国产精品美女www爽爽爽| 国产无一区二区| 亚洲国产高清在线观看视频| 国产欧美精品一区| 国产精品美女久久久久久久网站| 亚洲精品成人天堂一二三| 亚洲视频一二三区| 亚洲无线码一区二区三区| 亚洲一区二区精品久久av| 亚洲成人你懂的| 免费美女久久99| 极品少妇xxxx精品少妇偷拍| 成av人片一区二区| 欧美女孩性生活视频| 欧美成人性战久久| 国产精品沙发午睡系列990531| 国产精品久久久久久久裸模| 亚洲乱码精品一二三四区日韩在线| 亚洲综合一区二区精品导航| 日韩精品久久久久久| 国产精品一二三| 欧美日韩大陆一区二区| 久久久.com| 青青草国产成人av片免费| 不卡大黄网站免费看| 欧美日韩国产bt| 亚洲精品久久久蜜桃| 激情欧美日韩一区二区| 色94色欧美sute亚洲线路一ni| 日韩视频免费观看高清完整版| 亚洲欧美偷拍卡通变态| 国产成人午夜视频| 日韩三级视频在线观看| 韩国一区二区三区| 一本大道av伊人久久综合| 欧美精品一区二区三区四区| 天天色 色综合| 在线观看亚洲一区| 中文字幕一区二区三区蜜月| 国产精品羞羞答答xxdd| 日韩欧美在线123| 蜜桃一区二区三区四区| 欧美精品aⅴ在线视频| 亚洲精品久久久蜜桃| 成人av网站免费观看| 中文字幕在线不卡一区| 成人动漫一区二区在线| 亚洲国产精品ⅴa在线观看| 精品一区二区三区免费观看 | 日韩视频免费观看高清在线视频| 亚洲午夜私人影院| 欧美日韩视频一区二区| 亚洲va国产天堂va久久en| 欧美日韩色综合| 日韩电影在线观看电影| 欧美一区二区视频在线观看2022| 爽好多水快深点欧美视频| 日韩欧美中文字幕精品| 国产福利不卡视频| 亚洲日本一区二区| 欧美美女直播网站| 国产美女一区二区| 亚洲欧美成人一区二区三区| 777a∨成人精品桃花网| 久久99久久99小草精品免视看| 麻豆一区二区三| 国产亚洲一区二区三区在线观看 | 久久精品人人爽人人爽| 色老汉一区二区三区| 免费观看在线综合| 日韩伦理电影网| 日韩一区二区精品| 日本高清不卡一区| 另类的小说在线视频另类成人小视频在线| 精品久久五月天| 在线不卡a资源高清| 国产精品自在欧美一区| 天天操天天色综合| 一区二区视频免费在线观看| 日韩欧美一二三四区| 欧美色大人视频| 色偷偷88欧美精品久久久| 久久69国产一区二区蜜臀| 中文字幕在线不卡视频| 欧美日韩国产首页在线观看| 不卡av免费在线观看| 精品一区二区三区香蕉蜜桃 | 国产精品传媒视频| 在线不卡免费av| 一本色道综合亚洲| 麻豆久久一区二区| 亚洲一区免费在线观看| 亚洲国产精品精华液ab| 欧美久久久久久蜜桃| 欧美综合在线视频| 不卡免费追剧大全电视剧网站| 五月天国产精品| 一区二区三区**美女毛片| 欧美高清在线视频| 欧美熟乱第一页| 91麻豆视频网站| av在线不卡网| 国产69精品久久久久毛片| 国产精品1区2区| 国产毛片精品视频| 国产精品白丝jk白祙喷水网站| 美女免费视频一区| 久久精品国产亚洲aⅴ| 日本不卡一二三| 美女精品自拍一二三四| 国产麻豆成人精品| 国产成人h网站| 不卡视频一二三四| 欧美另类videos死尸| 欧美久久高跟鞋激| 日韩午夜中文字幕| 国产视频911| 国产精品视频麻豆| 亚洲男人天堂一区| 日韩av中文字幕一区二区三区| 国产麻豆一精品一av一免费| 国产99久久精品| 色综合久久88色综合天天| 欧美日韩在线亚洲一区蜜芽| 欧美一区二区三区在线| 久久久美女艺术照精彩视频福利播放 | 精品少妇一区二区三区视频免付费| 日韩女优毛片在线| 亚洲bdsm女犯bdsm网站| 久草精品在线观看| 91在线国产观看| 精品成人a区在线观看| 亚洲精品视频在线观看免费| 免费美女久久99| 欧美日韩精品一区二区天天拍小说| 精品国产百合女同互慰| 亚洲国产一区在线观看| 久久精品国产久精国产爱| 韩国精品久久久| 国产成人免费在线| 91精品在线麻豆| 国产毛片一区二区| 国产精品福利一区| 懂色av一区二区在线播放| 国产精品免费aⅴ片在线观看| 亚洲第一成年网| 欧美日韩一本到| 久草热8精品视频在线观看| 日韩一级二级三级精品视频| 丝袜诱惑制服诱惑色一区在线观看| 欧美一区二区三区视频在线| 麻豆一区二区在线| 337p日本欧洲亚洲大胆精品 | 欧美无乱码久久久免费午夜一区|