📄 manageprocess.c
字号:
fprintf(stream,"\n ChannelIndicator\n");
fprintf(stream," Flag=%d\n",LPs_CBCBSC_Unpack->p_ChannelIndicator.bFlag);
fprintf(stream," Value=%d\n",LPs_CBCBSC_Unpack->p_ChannelIndicator.cChannelIndicator);
/* Close stream */
fclose( stream );
}
/* 打印接收到CBE的Write_Replace参数 */
void Print_WriteReplace(PID_t s_Pid,
WRITEREPLACE_REQUEST_t *LPs_WriteReplaceRequest,
PID_t s_OldPid)
{
FILE *stream;
char filename[100];
int i;
memset(&filename[0],0,100);
sprintf(filename, "C:\\CBCdebug\\CBE_WriteReplacePid=%d.txt" ,s_Pid.iProcessId);
if( (stream = fopen( filename, "w+" )) == NULL )
{
return;
}
fprintf(stream,"Receive CBE WriteReplace Message:\n");
/* 打印PID */
fprintf(stream,"\n NewPid\n");
fprintf(stream," Pid=%d\n",s_Pid.iProcessId);
/* 打印OldPid */
fprintf(stream,"\n OldPid\n");
fprintf(stream," Pid=%d\n",s_OldPid.iProcessId);
/* 打印MessageIdentifier */
fprintf(stream,"\n MessageIdentifier\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_MessageIdentifier.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_MessageIdentifier.iMessageIdentifier);
/* 打印SerialNumber */
fprintf(stream,"\n SerialNumber\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_NewSerialnumber.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_NewSerialnumber.iSerialNumber);
/* 打印OldSerialNumber */
fprintf(stream,"\n OldSerialNumber\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_OldSerialnumber.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_OldSerialnumber.iSerialNumber);
/* 打印channel indicator */
fprintf(stream,"\n ChannelIndictor\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_ChannelIndicator.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_ChannelIndicator.cChannelIndicator);
/* 打印Category */
fprintf(stream,"\n Category\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_Category.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_Category.cCategory);
/* 打印Repetionate */
fprintf(stream,"\n Repetionate\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_RepetionRate.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_RepetionRate.iRepetitionRate);
/* 打印NoOfBroadcastReq */
fprintf(stream,"\n NoOfBroadcastReq\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_NoOfBroadcastReq.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_NoOfBroadcastReq.iNumberOfBroadcastReq);
/* 打印DataCodingScheme */
fprintf(stream,"\n DataCodingScheme\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_DataCodingScheme.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_DataCodingScheme.cDataCodingScheme);
/* 打印NewTime */
fprintf(stream,"\n NewTime\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_NewTime.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_NewTime.lTime);
/* 打印OldTime */
fprintf(stream,"\n OldTime\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_OldTime.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_OldTime.lTime);
/* 打印DataCodingScheme */
fprintf(stream,"\n DataCodingScheme\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_NoOfBroadcastReq.bFlag);
fprintf(stream," Value=%d\n",LPs_WriteReplaceRequest->p_DataCodingScheme.cDataCodingScheme);
/* 打印CellList */
fprintf(stream,"\n CellList\n");
fprintf(stream," Flag=%d\n",LPs_WriteReplaceRequest->p_CellList.bFlag);
if (LPs_WriteReplaceRequest->p_CellList.bFlag==EXIST)
{
fprintf(stream," Length=%d\n",LPs_WriteReplaceRequest->p_CellList.iLength);
for(i=0;i<LPs_WriteReplaceRequest->p_CellList.iLength;i++)
{
fprintf(stream," CellIdDisc=%d\n",LPs_WriteReplaceRequest->p_CellList.cCellIdDisc);
fprintf(stream," CellId=%d %d %d %d \n",
LPs_WriteReplaceRequest->p_CellList.s_CellList[i].cCellId[0],
LPs_WriteReplaceRequest->p_CellList.s_CellList[i].cCellId[1],
LPs_WriteReplaceRequest->p_CellList.s_CellList[i].cCellId[2],
LPs_WriteReplaceRequest->p_CellList.s_CellList[i].cCellId[3]
);
}
}
/* Close stream */
fclose( stream );
}
/* 打印接收到CBE的KillMessage参数 */
void Print_Kill(PID_t s_Pid,
KILLMESSAGE_t *LPs_KillMessage,
PID_t s_OldPid)
{
FILE *stream;
char filename[100];
int i;
memset(&filename[0],0,100);
sprintf(filename, "C:\\CBCdebug\\CBE_KillPid=%d.txt" ,s_Pid.iProcessId);
if( (stream = fopen( filename, "w+" )) == NULL )
{
return;
}
fprintf(stream,"Receive CBE Kill Message:\n");
/* 打印PID */
fprintf(stream,"\n NewPid\n");
fprintf(stream," Pid=%d\n",s_Pid.iProcessId);
/* 打印OldPid */
fprintf(stream,"\n OldPid\n");
fprintf(stream," Pid=%d\n",s_OldPid.iProcessId);
/* 打印MessageIdentifier */
fprintf(stream,"\n MessageIdentifier\n");
fprintf(stream," Flag=%d\n",LPs_KillMessage->p_MessageIdentifier.bFlag);
fprintf(stream," Value=%d\n",LPs_KillMessage->p_MessageIdentifier.iMessageIdentifier);
/* 打印OldSerialNumber */
fprintf(stream,"\n OldSerialNumber\n");
fprintf(stream," Flag=%d\n",LPs_KillMessage->p_OldSerialnumber.bFlag);
fprintf(stream," Value=%d\n",LPs_KillMessage->p_OldSerialnumber.iSerialNumber);
/* 打印channel indicator */
fprintf(stream,"\n ChannelIndictor\n");
fprintf(stream," Flag=%d\n",LPs_KillMessage->p_ChannelIndicator.bFlag);
fprintf(stream," Value=%d\n",LPs_KillMessage->p_ChannelIndicator.cChannelIndicator);
/* 打印BeginTime */
fprintf(stream,"\n BeginTime\n");
fprintf(stream," Flag=%d\n",LPs_KillMessage->p_BeginTime.bFlag);
fprintf(stream," Value=%d\n",LPs_KillMessage->p_BeginTime.lTime);
/* 打印CellList */
fprintf(stream,"\n CellList\n");
fprintf(stream," Flag=%d\n",LPs_KillMessage->p_CellList.bFlag);
if (LPs_KillMessage->p_CellList.bFlag==EXIST)
{
fprintf(stream," Length=%d\n",LPs_KillMessage->p_CellList.iLength);
for(i=0;i<LPs_KillMessage->p_CellList.iLength;i++)
{
fprintf(stream," CellIdDisc=%d\n",LPs_KillMessage->p_CellList.cCellIdDisc);
fprintf(stream," CellId=%d %d %d %d \n",
LPs_KillMessage->p_CellList.s_CellList[i].cCellId[0],
LPs_KillMessage->p_CellList.s_CellList[i].cCellId[1],
LPs_KillMessage->p_CellList.s_CellList[i].cCellId[2],
LPs_KillMessage->p_CellList.s_CellList[i].cCellId[3]
);
}
}
/* Close stream */
fclose( stream );
}
/* 打印接收到CBE的StatusCBCHQuery参数 */
void Print_StatusCBCHQuery(PID_t s_Pid,
STATUSCBCH_REQ_t *LPs_StatusCBCHReq)
{
FILE *stream;
char filename[100];
int i;
memset(&filename[0],0,100);
sprintf(filename, "C:\\CBCdebug\\CBE_StatusCBCHPid=%d.txt" ,s_Pid.iProcessId);
if( (stream = fopen( filename, "w+" )) == NULL )
{
return;
}
fprintf(stream,"Receive CBE StatusCBCHQuery Message:\n");
/* 打印PID */
fprintf(stream,"\n NewPid\n");
fprintf(stream," Pid=%d\n",s_Pid.iProcessId);
/* 打印channel indicator */
fprintf(stream,"\n ChannelIndictor\n");
fprintf(stream," Flag=%d\n",LPs_StatusCBCHReq->p_ChannelIndicator.bFlag);
fprintf(stream," Value=%d\n",LPs_StatusCBCHReq->p_ChannelIndicator.cChannelIndicator);
/* 打印CellList */
fprintf(stream,"\n CellList\n");
fprintf(stream," Flag=%d\n",LPs_StatusCBCHReq->p_CellList.bFlag);
if (LPs_StatusCBCHReq->p_CellList.bFlag==EXIST)
{
fprintf(stream," Length=%d\n",LPs_StatusCBCHReq->p_CellList.iLength);
for(i=0;i<LPs_StatusCBCHReq->p_CellList.iLength;i++)
{
fprintf(stream," CellIdDisc=%d\n",LPs_StatusCBCHReq->p_CellList.cCellIdDisc);
fprintf(stream," CellId=%d %d %d %d \n",
LPs_StatusCBCHReq->p_CellList.s_CellList[i].cCellId[0],
LPs_StatusCBCHReq->p_CellList.s_CellList[i].cCellId[1],
LPs_StatusCBCHReq->p_CellList.s_CellList[i].cCellId[2],
LPs_StatusCBCHReq->p_CellList.s_CellList[i].cCellId[3]
);
}
}
/* Close stream */
fclose( stream );
}
/* 打印接收到CBE的Status-Message-Query参数 */
void Print_StatusMessageQuery(PID_t s_Pid,
STATUSMESSAGE_QUERY_t *LPs_StatusMessageQuery
)
{
FILE *stream;
char filename[100];
int i;
memset(&filename[0],0,100);
sprintf(filename, "C:\\CBCdebug\\CBE_StatusMessagePid=%d.txt" ,s_Pid.iProcessId);
if( (stream = fopen( filename, "w+" )) == NULL )
{
return;
}
fprintf(stream,"Receive CBE StatusMessageQuery Message:\n");
/* 打印PID */
fprintf(stream,"\n NewPid\n");
fprintf(stream," Pid=%d\n",s_Pid.iProcessId);
/* 打印MessageIdentifier */
fprintf(stream,"\n MessageIdentifier\n");
fprintf(stream," Flag=%d\n",LPs_StatusMessageQuery->p_MessageIdentifier.bFlag);
fprintf(stream," Value=%d\n",LPs_StatusMessageQuery->p_MessageIdentifier.iMessageIdentifier);
/* 打印OldSerialNumber */
fprintf(stream,"\n OldSerialNumber\n");
fprintf(stream," Flag=%d\n",LPs_StatusMessageQuery->p_CurrentSerialnumber.bFlag);
fprintf(stream," Value=%d\n",LPs_StatusMessageQuery->p_CurrentSerialnumber.iSerialNumber);
/* 打印channel indicator */
fprintf(stream,"\n ChannelIndictor\n");
fprintf(stream," Flag=%d\n",LPs_StatusMessageQuery->p_ChannelIndicator.bFlag);
fprintf(stream," Value=%d\n",LPs_StatusMessageQuery->p_ChannelIndicator.cChannelIndicator);
/* 打印CellList */
fprintf(stream,"\n CellList\n");
fprintf(stream," Flag=%d\n",LPs_StatusMessageQuery->p_CellList.bFlag);
if (LPs_StatusMessageQuery->p_CellList.bFlag==EXIST)
{
fprintf(stream," Length=%d\n",LPs_StatusMessageQuery->p_CellList.iLength);
for(i=0;i<LPs_StatusMessageQuery->p_CellList.iLength;i++)
{
fprintf(stream," CellIdDisc=%d\n",LPs_StatusMessageQuery->p_CellList.cCellIdDisc);
fprintf(stream," CellId=%d %d %d %d \n",
LPs_StatusMessageQuery->p_CellList.s_CellList[i].cCellId[0],
LPs_StatusMessageQuery->p_CellList.s_CellList[i].cCellId[1],
LPs_StatusMessageQuery->p_CellList.s_CellList[i].cCellId[2],
LPs_StatusMessageQuery->p_CellList.s_CellList[i].cCellId[3]
);
}
}
/* Close stream */
fclose( stream );
}
/* 打印接收到CBE的SET_DRX参数 */
void Print_SETDRX(PID_t s_Pid,
SET_DRX_t *LPs_SetDrx)
{
FILE *stream;
char filename[100];
int i;
memset(&filename[0],0,100);
sprintf(filename, "C:\\CBCdebug\\CBE_SetDRXPid=%d.txt" ,s_Pid.iProcessId);
if( (stream = fopen( filename, "w+" )) == NULL )
{
return;
}
fprintf(stream,"Receive CBE SetDRX Message:\n");
/* 打印PID */
fprintf(stream,"\n NewPid\n");
fprintf(stream," Pid=%d\n",s_Pid.iProcessId);
/* 打印 */
fprintf(stream,"\n SchedulePeriod\n");
fprintf(stream," Flag=%d\n",LPs_SetDrx->p_SchedulePeriod.bFlag);
fprintf(stream," Value=%d\n",LPs_SetDrx->p_SchedulePeriod.cSchedulePeriod);
/* 打印ReservedSlots */
fprintf(stream,"\n ReservedSlots\n");
fprintf(stream," Flag=%d\n",LPs_SetDrx->p_ReservedSlots.bFlag);
fprintf(stream," Value=%d\n",LPs_SetDrx->p_ReservedSlots.cReservedSlots);
/* 打印channel indicator */
fprintf(stream,"\n ChannelIndictor\n");
fprintf(stream," Flag=%d\n",LPs_SetDrx->p_ChannelIndicator.bFlag);
fprintf(stream," Value=%d\n",LPs_SetDrx->p_ChannelIndicator.cChannelIndicator);
/* 打印CellList */
fprintf(stream,"\n CellList\n");
fprintf(stream," Flag=%d\n",LPs_SetDrx->p_CellList.bFlag);
if (LPs_SetDrx->p_CellList.bFlag==EXIST)
{
fprintf(stream," Length=%d\n",LPs_SetDrx->p_CellList.iLength);
for(i=0;i<LPs_SetDrx->p_CellList.iLength;i++)
{
fprintf(stream," CellIdDisc=%d\n",LPs_SetDrx->p_CellList.cCellIdDisc);
fprintf(stream," CellId=%d %d %d %d \n",
LPs_SetDrx->p_CellList.s_CellList[i].cCellId[0],
LPs_SetDrx->p_CellList.s_CellList[i].cCellId[1],
LPs_SetDrx->p_CellList.s_CellList[i].cCellId[2],
LPs_SetDrx->p_CellList.s_CellList[i].cCellId[3]
);
}
}
/* Close stream */
fclose( stream );
}
/* 打印接收到CBE的Reset参数 */
void Print_RESET(PID_t s_Pid,
RESET_t *LPs_Reset)
{
FILE *stream;
char filename[100];
int i;
memset(&filename[0],0,100);
sprintf(filename, "C:\\CBCdebug\\CBE_ResetPid=%d.txt" ,s_Pid.iProcessId);
if( (stream = fopen( filename, "w+" )) == NULL )
{
return;
}
fprintf(stream,"Receive CBE Reset Message:\n");
/* 打印PID */
fprintf(stream,"\n NewPid\n");
fprintf(stream," Pid=%d\n",s_Pid.iProcessId);
/* 打印CellList */
fprintf(stream,"\n CellList\n");
fprintf(stream," Flag=%d\n",LPs_Reset->p_CellList.bFlag);
if (LPs_Reset->p_CellList.bFlag==EXIST)
{
fprintf(stream," Length=%d\n",LPs_Reset->p_CellList.iLength);
for(i=0;i<LPs_Reset->p_CellList.iLength;i++)
{
fprintf(stream," CellIdDisc=%d\n",LPs_Reset->p_CellList.cCellIdDisc);
fprintf(stream," CellId=%d %d %d %d \n",
LPs_Reset->p_CellList.s_CellList[i].cCellId[0],
LPs_Reset->p_CellList.s_CellList[i].cCellId[1],
LPs_Reset->p_CellList.s_CellList[i].cCellId[2],
LPs_Reset->p_CellList.s_CellList[i].cCellId[3]
);
}
}
/* Close stream */
fclose( stream );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -