VOS_UINT32 GUNAS_SMS_ATCmdFilter( VOS_UINT8 *pucATData, VOS_UINT16 usLen ) { VOS_UINT32 i; VOS_UINT8 *pucTempData = VOS_NULL_PTR; pucTempData = (VOS_UINT8 *)PS_MEM_ALLOC(WUEPS_PID_AT, usLen); if (VOS_NULL_PTR == pucTempData) { return VOS_FALSE; } (VOS_VOID)PS_MEM_CPY(pucTempData, pucATData, usLen); (VOS_VOID)At_UpString(pucTempData, usLen); for (i = 0; i < (sizeof(g_apcATFileterTable)/sizeof(g_apcATFileterTable[0])); i++) { if (VOS_OK == PS_MEM_CMP((VOS_UINT8 *)g_apcATFileterTable[i], pucTempData, VOS_StrLen(g_apcATFileterTable[i]))) { PS_MEM_FREE(WUEPS_PID_AT, pucTempData); return VOS_TRUE; } } PS_MEM_FREE(WUEPS_PID_AT, pucTempData); return VOS_FALSE; }
VOS_VOID CMMCA_LogBuffFullInd(VOS_VOID) { CMMCA_MNTN_BUFF_FULL_IND_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (CMMCA_MNTN_BUFF_FULL_IND_STRU*)PS_MEM_ALLOC(WUEPS_PID_CMMCA, sizeof(CMMCA_MNTN_BUFF_FULL_IND_STRU)); if (VOS_NULL_PTR == pstMsg) { CMMCA_ERROR_LOG("CMMCA_LogBuffFullInd:ERROR:Alloc Mem Fail."); return; } pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = WUEPS_PID_CMMCA; pstMsg->ulReceiverPid = WUEPS_PID_CMMCA; pstMsg->ulLength = sizeof(CMMCA_MNTN_BUFF_FULL_IND_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = CMMCA_MNTN_BUFF_FULL_IND; OM_TraceMsgHook(pstMsg); PS_MEM_FREE(WUEPS_PID_CMMCA, pstMsg); return; }
VOS_VOID NAS_CC_LogBufferQueueMsg( VOS_UINT32 ulFullFlg ) { NAS_CC_LOG_BUFFER_MSG_INFO_STRU *pstBufferMsg = VOS_NULL_PTR; NAS_CC_MSG_QUEUE_STRU *pstMsgQueue = VOS_NULL_PTR; pstBufferMsg = (NAS_CC_LOG_BUFFER_MSG_INFO_STRU*)PS_MEM_ALLOC(WUEPS_PID_CC, sizeof(NAS_CC_LOG_BUFFER_MSG_INFO_STRU)); if ( VOS_NULL_PTR == pstBufferMsg ) { NAS_CC_ERR_LOG("NAS_cc_LogBufferQueueMsg:ERROR:Alloc Mem Fail."); return; } pstMsgQueue = NAS_CC_GetCachMsgBufferAddr(); pstBufferMsg->stMsgHeader.ulReceiverCpuId = VOS_LOCAL_CPUID; pstBufferMsg->stMsgHeader.ulSenderPid = WUEPS_PID_CC; pstBufferMsg->stMsgHeader.ulReceiverPid = WUEPS_PID_CC; pstBufferMsg->stMsgHeader.ulLength = sizeof(NAS_CC_LOG_BUFFER_MSG_INFO_STRU) - VOS_MSG_HEAD_LENGTH; pstBufferMsg->stMsgHeader.ulMsgName = CCOM_LOG_BUFFER_MSG_INFO_IND; pstBufferMsg->ulFullFlg = ulFullFlg; PS_MEM_CPY(&(pstBufferMsg->stMsgQueue), pstMsgQueue, sizeof(pstBufferMsg->stMsgQueue)); OM_TraceMsgHook(pstBufferMsg); PS_MEM_FREE(WUEPS_PID_CC, pstBufferMsg); return; }
VOS_VOID TAF_MMA_LogOperCtxInfo(VOS_VOID) { TAF_MMA_LOG_OPER_CTX_INFO_STRU *pstBufferMsg = VOS_NULL_PTR; TAF_MMA_OPER_CTX_STRU *pstMmaOperCtx = VOS_NULL_PTR; pstBufferMsg = (TAF_MMA_LOG_OPER_CTX_INFO_STRU*)PS_MEM_ALLOC(WUEPS_PID_MMA, sizeof(TAF_MMA_LOG_OPER_CTX_INFO_STRU)); if ( VOS_NULL_PTR == pstBufferMsg ) { TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_LogOperCtxInfo:ERROR:Alloc Mem Fail."); return; } pstMmaOperCtx = TAF_MMA_GetOperCtxAddr(); pstBufferMsg->stMsgHeader.ulReceiverCpuId = VOS_LOCAL_CPUID; pstBufferMsg->stMsgHeader.ulSenderCpuId = VOS_LOCAL_CPUID; pstBufferMsg->stMsgHeader.ulSenderPid = WUEPS_PID_MMA; pstBufferMsg->stMsgHeader.ulReceiverPid = WUEPS_PID_MMA; pstBufferMsg->stMsgHeader.ulLength = sizeof(TAF_MMA_LOG_OPER_CTX_INFO_STRU) - VOS_MSG_HEAD_LENGTH; pstBufferMsg->stMsgHeader.ulMsgName = TAF_MMA_LOG_OPER_CTX_INFO_IND; PS_MEM_CPY(pstBufferMsg->astMmaOperCtx, pstMmaOperCtx, sizeof(pstBufferMsg->astMmaOperCtx)); OM_TraceMsgHook(pstBufferMsg); PS_MEM_FREE(WUEPS_PID_MMA, pstBufferMsg); return; }
VOS_VOID TAF_MMA_LogDrvApiPwrCtrlSleepVoteLock( VOS_UINT32 ulRslt, PWC_CLIENT_ID_E enClientId ) { TAF_MMA_LOG_DRV_API_PWRCTRL_SLEEPVOTE_LOCK_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (TAF_MMA_LOG_DRV_API_PWRCTRL_SLEEPVOTE_LOCK_STRU*)PS_MEM_ALLOC(WUEPS_PID_MMA, sizeof(TAF_MMA_LOG_DRV_API_PWRCTRL_SLEEPVOTE_LOCK_STRU)); if (VOS_NULL_PTR == pstMsg) { TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_LogDrvApiPwrCtrlSleepVoteLock:ERROR:Alloc Mem Fail."); return; } PS_MEM_SET((VOS_INT8*)pstMsg + VOS_MSG_HEAD_LENGTH,0, sizeof(TAF_MMA_LOG_DRV_API_PWRCTRL_SLEEPVOTE_LOCK_STRU) - VOS_MSG_HEAD_LENGTH); pstMsg->stMsgHeader.ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->stMsgHeader.ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->stMsgHeader.ulSenderPid = WUEPS_PID_MMA; pstMsg->stMsgHeader.ulReceiverPid = WUEPS_PID_MMA; pstMsg->stMsgHeader.ulLength = sizeof(TAF_MMA_LOG_DRV_API_PWRCTRL_SLEEPVOTE_LOCK_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->stMsgHeader.ulMsgName = TAF_MMA_LOG_DRV_API_PWRCTRL_SLEEPVOTE_LOCK; pstMsg->ulRslt = ulRslt; pstMsg->enClientId = enClientId; OM_TraceMsgHook(pstMsg); PS_MEM_FREE(WUEPS_PID_MMA, pstMsg); return; }
VOS_VOID SSA_ReportUssdDataSndEvent(VOS_UINT8 ucTi) { TAF_SS_CALL_INDEPENDENT_EVENT_STRU *pstSsEvent; pstSsEvent = (TAF_SS_CALL_INDEPENDENT_EVENT_STRU *)PS_MEM_ALLOC(WUEPS_PID_SS, sizeof(TAF_SS_CALL_INDEPENDENT_EVENT_STRU)); if (VOS_NULL_PTR == pstSsEvent) { SSA_LOG(ERROR_PRINT, "SSA_ReportUssdDataSndEvent:ERROR: Alloc Mem Fail"); SSA_TiFree(ucTi); return; } /*对事件上报的内容赋初值*/ PS_MEM_SET(pstSsEvent, 0 , 4); pstSsEvent->SsEvent = TAF_SS_EVT_USSD_DATA_SND; pstSsEvent->OpId = gastSsaStatetable[ucTi].OpId; pstSsEvent->ClientId = gastSsaStatetable[ucTi].ClientId; MN_SendClientEvent(pstSsEvent->ClientId, MN_CALLBACK_SS, pstSsEvent->SsEvent, pstSsEvent); PS_MEM_FREE(WUEPS_PID_SS, pstSsEvent); return; }
VOS_VOID SSA_TiFree(VOS_UINT8 ucTi) { if ((ucTi > TAF_MAX_SSA_TI) || (ucTi == TAF_MIDDLE_SSA_TI)) { SSA_LOG1(WARNING_PRINT, "SSA_TiFree:WARNING: Ti Value is Wrong, ucTi:", ucTi); return; } if (VOS_NULL_PTR != gastSsaStatetable[ucTi].pstUssdBuf) { PS_MEM_FREE(WUEPS_PID_SS, gastSsaStatetable[ucTi].pstUssdBuf); gastSsaStatetable[ucTi].pstUssdBuf = VOS_NULL_PTR; } PS_MEM_SET(&gastSsaStatetable[ucTi], 0, sizeof(SSA_STATE_TABLE_STRU)); /* 当前Ti释放完了之后,判断一下是否所有的TI都释放了, 如果所有的TI都释放了,置一下CS域的SS业务不存在的标志 */ if (SSA_IDLE == SSA_TiIdle()) { TAF_SDC_SetCsSsSrvExistFlg(VOS_FALSE); #if (FEATURE_MULTI_MODEM == FEATURE_ON) /* 给MTC模块上报当前CS域业务状态 */ TAF_SendMtcCsSrvInfoInd(); #endif } return ; }
VOS_VOID TAF_MMA_SndOmTimerStatus( TAF_MMA_TIMER_STATUS_ENUM_UINT8 enTimerStatus, TAF_MMA_TIMER_ID_ENUM_UINT32 enTimerId, VOS_UINT32 ulLen ) { TAF_MMA_TIMER_INFO_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (TAF_MMA_TIMER_INFO_STRU*)PS_MEM_ALLOC(WUEPS_PID_MMA, sizeof(TAF_MMA_TIMER_INFO_STRU)); if (VOS_NULL_PTR == pstMsg) { TAF_ERROR_LOG(WUEPS_PID_TAF,"TAF_MMA_SndOmTimerStatus:ERROR:Alloc Mem Fail."); return; } /* 定时器勾包消息赋值 */ pstMsg->stMsgHeader.ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->stMsgHeader.ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->stMsgHeader.ulSenderPid = WUEPS_PID_MMA; pstMsg->stMsgHeader.ulReceiverPid = VOS_PID_TIMER; pstMsg->stMsgHeader.ulLength = sizeof(TAF_MMA_TIMER_INFO_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->stMsgHeader.ulMsgName = enTimerId; pstMsg->enTimerStatus = enTimerStatus; pstMsg->ulLen = ulLen; /* 定时器消息勾包 */ OM_TraceMsgHook(pstMsg); PS_MEM_FREE(WUEPS_PID_MMA, pstMsg); }
VOS_VOID TAF_XPDS_MNTN_TraceAlmInfoCtxIndMsg(VOS_VOID) { TAF_XPDS_MNTN_ALM_INFO_CTX_IND_STRU *pstMsg = VOS_NULL_PTR; TAF_XPDS_FWDLINK_RSP_GPS_ALM_STRU *pstProvAlm = VOS_NULL_PTR; pstProvAlm = &(TAF_XPDS_GetPdePublicData()->stProvGpsAlm); pstMsg = (TAF_XPDS_MNTN_ALM_INFO_CTX_IND_STRU *)PS_MEM_ALLOC(UEPS_PID_XPDS, sizeof(TAF_XPDS_MNTN_ALM_INFO_CTX_IND_STRU)); if (VOS_NULL_PTR == pstMsg) { XPDS_ERROR_LOG("TAF_XPDS_MNTN_TraceEphInfoCtxIndMsg:ERROR:Alloc Mem Fail!"); return; } PS_MEM_SET( ((VOS_UINT8*)pstMsg + VOS_MSG_HEAD_LENGTH), 0, sizeof(TAF_XPDS_MNTN_ALM_INFO_CTX_IND_STRU) - VOS_MSG_HEAD_LENGTH); pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverPid = UEPS_PID_XPDS; pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = UEPS_PID_XPDS; pstMsg->ulLength = sizeof(TAF_XPDS_MNTN_ALM_INFO_CTX_IND_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = ID_TAF_XPDS_MNTN_ALM_INFO_CTX_IND; PS_MEM_CPY(&(pstMsg->stProvAlm), pstProvAlm, sizeof(TAF_XPDS_FWDLINK_RSP_GPS_ALM_STRU)); /* 消息勾包 */ DIAG_TraceReport(pstMsg); PS_MEM_FREE(UEPS_PID_XPDS, pstMsg); return; }
VOS_VOID TAF_XPDS_MNTN_TracePseuRangeInfoCtxIndMsg(VOS_VOID) { TAF_XPDS_MNTN_PSEU_RANGE_INFO_CTX_IND_STRU *pstMsg = VOS_NULL_PTR; TAF_XPDS_REVLINK_RSP_PSEU_RANGE_MEAS_STRU *pstRspPrmInfo = VOS_NULL_PTR; pstRspPrmInfo = &(TAF_XPDS_GetPdePublicData()->stRspPrmInfo); pstMsg = (TAF_XPDS_MNTN_PSEU_RANGE_INFO_CTX_IND_STRU *)PS_MEM_ALLOC(UEPS_PID_XPDS, sizeof(TAF_XPDS_MNTN_PSEU_RANGE_INFO_CTX_IND_STRU)); if (VOS_NULL_PTR == pstMsg) { XPDS_ERROR_LOG("TAF_XPDS_MNTN_TracePseuRangeInfoCtxIndMsg:ERROR:Alloc Mem Fail!"); return; } PS_MEM_SET( ((VOS_UINT8*)pstMsg + VOS_MSG_HEAD_LENGTH), 0, sizeof(TAF_XPDS_MNTN_PSEU_RANGE_INFO_CTX_IND_STRU) - VOS_MSG_HEAD_LENGTH); pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverPid = UEPS_PID_XPDS; pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = UEPS_PID_XPDS; pstMsg->ulLength = sizeof(TAF_XPDS_MNTN_PSEU_RANGE_INFO_CTX_IND_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = ID_TAF_XPDS_MNTN_PSEU_RANGE_INFO_CTX_IND; PS_MEM_CPY(&pstMsg->stRspPrmInfo, pstRspPrmInfo, sizeof(TAF_XPDS_REVLINK_RSP_PSEU_RANGE_MEAS_STRU)); /* 消息勾包 */ DIAG_TraceReport(pstMsg); PS_MEM_FREE(UEPS_PID_XPDS, pstMsg); return; }
VOS_VOID TAF_XPDS_MNTN_LogFsmInfo( VOS_UINT32 ulPid, VOS_UINT32 ulFsmId, VOS_UINT32 ulFsmState ) { TAF_XPDS_MNTN_LOG_FSM_INFO_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (TAF_XPDS_MNTN_LOG_FSM_INFO_STRU*)PS_MEM_ALLOC(ulPid, sizeof(TAF_XPDS_MNTN_LOG_FSM_INFO_STRU)); if (VOS_NULL_PTR == pstMsg) { return; } pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverPid = ulPid; pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = ulPid; pstMsg->ulLength = sizeof(TAF_XPDS_MNTN_LOG_FSM_INFO_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = ID_TAF_XPDS_MNTN_LOG_FSM_INFO_IND; pstMsg->ulModuleId = ulPid; pstMsg->ulCurFsmId = ulFsmId; pstMsg->ulCurFsmState = ulFsmState; DIAG_TraceReport(pstMsg); PS_MEM_FREE(ulPid, pstMsg); return; }
VOS_VOID NAS_CC_InitErrLogInfo(VOS_VOID) { VOS_CHAR *pbuffer; OM_RING_ID pRingbuffer; /* en_NV_Item_ErrLogCtrlInfo */ NAS_CC_ReadErrlogCtrlInfoNvim(); /* 申请cache的动态内存 , 长度加1是因为读和写指针之间在写满时会相差一个字节 */ pbuffer = (char *)PS_MEM_ALLOC(WUEPS_PID_CC, NAS_CC_RING_BUFFER_SIZE + 1); if (VOS_NULL_PTR == pbuffer) { NAS_CC_SetErrLogRingBufAddr(VOS_NULL_PTR); return; } /* 调用OM的接口,将申请的动态内存创建为RING BUFFER */ pRingbuffer = OM_RingBufferCreateEx(pbuffer, NAS_CC_RING_BUFFER_SIZE + 1); if (VOS_NULL_PTR == pRingbuffer) { PS_MEM_FREE(WUEPS_PID_CC, pbuffer); } /* 保存ringbuffer指针 */ NAS_CC_SetErrLogRingBufAddr(pRingbuffer); NAS_CC_SetErrlogOverflowCnt(0); return; }
VOS_VOID TAF_MTA_DelItemInCmdBufferQueue( TAF_MTA_TIMER_ID_ENUM_UINT32 enTimerId ) { VOS_UINT32 i; TAF_MTA_CMD_BUFFER_STRU *pstCmdBufferQueue; pstCmdBufferQueue = TAF_MTA_GetCmdBufferQueueAddr(); for ( i = 0; i < TAF_MTA_MAX_CMD_BUFFER_QUEUE_SIZE; i++ ) { if (enTimerId == pstCmdBufferQueue[i].enTimerId) { /* 如果有缓存的消息,释放消息内存 */ if (VOS_NULL_PTR != pstCmdBufferQueue[i].pucMsgInfo) { PS_MEM_FREE(UEPS_PID_MTA, pstCmdBufferQueue[i].pucMsgInfo); } /* 初始化 */ pstCmdBufferQueue[i].pucMsgInfo = VOS_NULL_PTR; pstCmdBufferQueue[i].enTimerId = TI_TAF_MTA_TIMER_BUTT; pstCmdBufferQueue[i].ulMsgInfoLen = 0; break; } } return; }
VOS_VOID NAS_SMS_SndOmInquireCnfMsg( ID_NAS_OM_INQUIRE_STRU *pstOmInquireMsg ) { ID_NAS_OM_CNF_STRU *pstSmsOmCnf ; pstSmsOmCnf = VOS_NULL_PTR; pstSmsOmCnf = (ID_NAS_OM_CNF_STRU *)PS_MEM_ALLOC(WUEPS_PID_SMS, (sizeof(ID_NAS_OM_CNF_STRU) + sizeof(NAS_OM_SMS_CONFIRM_STRU)) - NAS_OM_DATA_PTR_LEN); /* 申请内存 */ if (VOS_NULL_PTR == pstSmsOmCnf) { NAS_ERROR_LOG(WUEPS_PID_SMS, "NAS_MMC_SndOmInquireCnfMsg:Memory Allocate fail!"); return; } PS_MEM_SET((VOS_INT8*)pstSmsOmCnf, 0 ,sizeof(ID_NAS_OM_CNF_STRU)); pstSmsOmCnf->ucFuncType = 4; pstSmsOmCnf->ucReserve = 0; pstSmsOmCnf->usLength = NAS_OM_DATA_OFFSET + sizeof(NAS_OM_SMS_CONFIRM_STRU); pstSmsOmCnf->ulSn = 0; pstSmsOmCnf->ulTimeStamp = OM_GetSlice(); pstSmsOmCnf->usPrimId = ID_NAS_OM_SMS_CONFIRM; pstSmsOmCnf->usToolsId = pstOmInquireMsg->usToolsId; NAS_SMS_BuildSmsOmInfo((NAS_OM_SMS_CONFIRM_STRU*)(pstSmsOmCnf->aucData)); OM_SendData( (OM_RSP_PACKET_STRU*)pstSmsOmCnf, (sizeof(ID_NAS_OM_CNF_STRU) + sizeof(NAS_OM_SMS_CONFIRM_STRU)) - NAS_OM_DATA_PTR_LEN ); /* 原语发送 */ PS_MEM_FREE(WUEPS_PID_SMS, pstSmsOmCnf); }
VOS_VOID TAF_SPM_SendEconfNotifyInd( MN_OPERATION_ID_T ucOpId, VOS_UINT8 ucNumOfCalls, TAF_CALL_ECONF_INFO_PARAM_STRU *pstCallInfo ) { TAF_CALL_EVT_ECONF_NOTIFY_IND_STRU *pstEconfNotify = VOS_NULL_PTR; /* 由于sizeof(TAF_CALL_EVT_ECONF_NOTIFY_IND_STRU)太大,采用动态内存 */ pstEconfNotify = (TAF_CALL_EVT_ECONF_NOTIFY_IND_STRU *)PS_MEM_ALLOC(WUEPS_PID_TAF, sizeof(TAF_CALL_EVT_ECONF_NOTIFY_IND_STRU)); if (VOS_NULL_PTR == pstEconfNotify) { return; } PS_MEM_SET(pstEconfNotify, 0, sizeof(TAF_CALL_EVT_ECONF_NOTIFY_IND_STRU)); pstEconfNotify->enEvent = TAF_CALL_EVT_ECONF_NOTIFY_IND; pstEconfNotify->usClientId = MN_GetRealClientId(MN_CLIENT_ID_BROADCAST, WUEPS_PID_TAF);; pstEconfNotify->ucOpId = ucOpId; pstEconfNotify->ucNumOfCalls = ucNumOfCalls; PS_MEM_CPY(pstEconfNotify->astCallInfo, pstCallInfo, sizeof(TAF_CALL_ECONF_INFO_PARAM_STRU) * ucNumOfCalls); MN_SendReportMsg(MN_CALLBACK_CS_CALL, (VOS_UINT8 *)pstEconfNotify, sizeof(TAF_CALL_EVT_ECONF_NOTIFY_IND_STRU)); PS_MEM_FREE(WUEPS_PID_TAF, pstEconfNotify); return; }
VOS_VOID TAF_XPDS_MNTN_TraceForwardPdeHeaderInfo(VOS_VOID) { TAF_XPDS_MNTN_FORWARD_PDE_MSG_HEADER_IND_STRU_STRU *pstMsg = VOS_NULL_PTR; TAF_XPDS_PD_MSG_HEADER_STRU *pstPdMsgHeader = VOS_NULL_PTR; pstPdMsgHeader = &(TAF_XPDS_GetPdePublicData()->stFwdPdMsgHeader); pstMsg = (TAF_XPDS_MNTN_FORWARD_PDE_MSG_HEADER_IND_STRU_STRU *)PS_MEM_ALLOC(UEPS_PID_XPDS, sizeof(TAF_XPDS_MNTN_FORWARD_PDE_MSG_HEADER_IND_STRU_STRU)); if (VOS_NULL_PTR == pstMsg) { XPDS_ERROR_LOG("TAF_XPDS_MNTN_TraceForwardPdeHeaderInfo:ERROR:Alloc Mem Fail!"); return; } PS_MEM_SET( ((VOS_UINT8*)pstMsg + VOS_MSG_HEAD_LENGTH), 0, sizeof(TAF_XPDS_MNTN_FORWARD_PDE_MSG_HEADER_IND_STRU_STRU) - VOS_MSG_HEAD_LENGTH); pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverPid = UEPS_PID_XPDS; pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = UEPS_PID_XPDS; pstMsg->ulLength = sizeof(TAF_XPDS_MNTN_FORWARD_PDE_MSG_HEADER_IND_STRU_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = ID_TAF_XPDS_MNTN_FORWARD_PDE_HEADER_IND; PS_MEM_CPY(&(pstMsg->stPdMsgHeader), pstPdMsgHeader, sizeof(TAF_XPDS_PD_MSG_HEADER_STRU)); /* 消息勾包 */ DIAG_TraceReport(pstMsg); PS_MEM_FREE(UEPS_PID_XPDS, pstMsg); return; }
VOS_UINT32 NAS_CC_ProcessSpecTypeBufferMsg(VOS_UINT32 ulEventType) { NAS_CC_ENTRY_MSG_STRU *pstEntryMsg = VOS_NULL_PTR; VOS_UINT32 ulRet; /* 内存空间分配 */ pstEntryMsg = (NAS_CC_ENTRY_MSG_STRU *)PS_MEM_ALLOC(WUEPS_PID_CC, sizeof(NAS_CC_ENTRY_MSG_STRU)); if (VOS_NULL_PTR == pstEntryMsg) { NAS_CC_ERR_LOG("NAS_CC_ProcessSpecTypeBufferMsg:ERROR: MEM ALLOC FAIL"); return VOS_FALSE; } ulRet = VOS_FALSE; while (VOS_TRUE == NAS_CC_GetNextSpecEventTypeCachedMsg(ulEventType, pstEntryMsg)) { NAS_CC_MsgRoute((struct MsgCB*)pstEntryMsg->aucEntryMsgBuffer); ulRet = VOS_TRUE; } PS_MEM_FREE(WUEPS_PID_CC, pstEntryMsg); return ulRet; }
VOS_VOID TAF_XPDS_MNTN_TraceIntMsg( VOS_UINT32 ulModuleId, VOS_UINT32 ulLength, VOS_VOID *pstMsg ) { VOS_UINT8 *pucData = VOS_NULL_PTR; pucData = (VOS_UINT8 *)PS_MEM_ALLOC(ulModuleId, ulLength); if (VOS_NULL_PTR == pucData) { XPDS_ERROR_LOG("CNAS_CDMA_TraceIntMsg:ERROR:Alloc Mem Fail!"); return; } /* 勾包消息赋值 */ PS_MEM_CPY(pucData, pstMsg, ulLength); /* 消息勾包 */ DIAG_TraceReport(pucData); PS_MEM_FREE(ulModuleId, pucData); return; }
VOS_VOID ADS_UL_RcvTiRptStatsInfoExpired( VOS_UINT32 ulTimerName, VOS_UINT32 ulParam ) { ADS_LOG_RPT_STATS_INFO_STRU *pstMsg = VOS_NULL_PTR; /* 将记录的统计信息通过SDT消息勾出来 */ pstMsg = (ADS_LOG_RPT_STATS_INFO_STRU*)PS_MEM_ALLOC(ACPU_PID_ADS_UL, sizeof(ADS_LOG_RPT_STATS_INFO_STRU)); if (VOS_NULL_PTR == pstMsg) { ADS_ERROR_LOG(ACPU_PID_ADS_UL, "ADS_UL_RcvTiRptStatsInfoExpired: ERROR:Alloc Mem Fail"); return; } PS_MEM_SET(pstMsg, 0, sizeof(ADS_LOG_RPT_STATS_INFO_STRU)); pstMsg->stLogHeader.ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->stLogHeader.ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->stLogHeader.ulSenderPid = ACPU_PID_ADS_UL; pstMsg->stLogHeader.ulReceiverPid = ACPU_PID_ADS_UL; pstMsg->stLogHeader.ulLength = sizeof(ADS_LOG_RPT_STATS_INFO_STRU) - VOS_MSG_HEAD_LENGTH;; pstMsg->stLogHeader.enMsgId = ID_ADS_LOG_RPT_STATS_INFO; PS_MEM_CPY(&pstMsg->stAdsStats, &g_stAdsStats, sizeof(g_stAdsStats)); OM_AcpuTraceMsgHook(pstMsg); PS_MEM_FREE(ACPU_PID_ADS_UL, pstMsg); /* 重新启动上报统计信息定时器 */ ADS_StartTimer(ACPU_PID_ADS_UL, ulTimerName, TI_ADS_RPT_STATS_LEN); return ; }
VOS_VOID TAF_XPDS_MNTN_TraceReverseStartDeliverData( TAF_XPDS_START_DELV_DATA_STRU *pstStartDelvData ) { TAF_XPDS_MNTN_REVERSE_START_DELIVER_DATA_IND_STRU_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (TAF_XPDS_MNTN_REVERSE_START_DELIVER_DATA_IND_STRU_STRU *)PS_MEM_ALLOC(UEPS_PID_XPDS, sizeof(TAF_XPDS_MNTN_REVERSE_START_DELIVER_DATA_IND_STRU_STRU)); if (VOS_NULL_PTR == pstMsg) { XPDS_ERROR_LOG("TAF_XPDS_MNTN_TraceReverseStartDeliverData:ERROR:Alloc Mem Fail!"); return; } PS_MEM_SET( ((VOS_UINT8*)pstMsg + VOS_MSG_HEAD_LENGTH), 0, sizeof(TAF_XPDS_MNTN_REVERSE_START_DELIVER_DATA_IND_STRU_STRU) - VOS_MSG_HEAD_LENGTH); pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverPid = UEPS_PID_XPDS; pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = UEPS_PID_XPDS; pstMsg->ulLength = sizeof(TAF_XPDS_MNTN_REVERSE_START_DELIVER_DATA_IND_STRU_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = ID_TAF_XPDS_MNTN_REVERSE_START_DELIVER_DATA_IND; PS_MEM_CPY(&(pstMsg->stStartDelvData), pstStartDelvData, sizeof(TAF_XPDS_START_DELV_DATA_STRU)); /* 消息勾包 */ DIAG_TraceReport(pstMsg); PS_MEM_FREE(UEPS_PID_XPDS, pstMsg); return; }
VOS_VOID SSA_ReportErrorEvent( VOS_UINT16 ClientId, VOS_UINT8 OpId, TAF_SS_ERROR ErrorCode ) { TAF_SS_CALL_INDEPENDENT_EVENT_STRU *pstSsEvent = VOS_NULL_PTR; pstSsEvent = (TAF_SS_CALL_INDEPENDENT_EVENT_STRU *)PS_MEM_ALLOC(WUEPS_PID_SS, sizeof(TAF_SS_CALL_INDEPENDENT_EVENT_STRU)); if (VOS_NULL_PTR == pstSsEvent) { SSA_LOG( ERROR_PRINT, "TAF_SSA_ReportEvtError: Alloc Mem Fail"); return; } /* 出错事件的OP项初始化 */ PS_MEM_SET(pstSsEvent, 0, sizeof(VOS_UINT32)); pstSsEvent->OP_Error = VOS_TRUE; pstSsEvent->SsEvent = TAF_SS_EVT_ERROR; pstSsEvent->ClientId = ClientId; pstSsEvent->OpId = OpId; pstSsEvent->ErrorCode = ErrorCode; TAF_SsEventReport(pstSsEvent); PS_MEM_FREE(WUEPS_PID_SS, pstSsEvent); return; }
VOS_VOID TAF_XPDS_MNTN_TraceReverseMpcPosReportReq( TAF_XPDS_MPC_POS_REPORT_STRU *pstPosReportReq ) { TAF_XPDS_MNTN_REVERSE_MPC_POS_REPORT_REQ_IND_STRU_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (TAF_XPDS_MNTN_REVERSE_MPC_POS_REPORT_REQ_IND_STRU_STRU *)PS_MEM_ALLOC(UEPS_PID_XPDS, sizeof(TAF_XPDS_MNTN_REVERSE_MPC_POS_REPORT_REQ_IND_STRU_STRU)); if (VOS_NULL_PTR == pstMsg) { XPDS_ERROR_LOG("TAF_XPDS_MNTN_TraceReverseMpcPosReportReq:ERROR:Alloc Mem Fail!"); return; } PS_MEM_SET( ((VOS_UINT8*)pstMsg + VOS_MSG_HEAD_LENGTH), 0, sizeof(TAF_XPDS_MNTN_REVERSE_MPC_POS_REPORT_REQ_IND_STRU_STRU) - VOS_MSG_HEAD_LENGTH); pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverPid = UEPS_PID_XPDS; pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = UEPS_PID_XPDS; pstMsg->ulLength = sizeof(TAF_XPDS_MNTN_REVERSE_MPC_POS_REPORT_REQ_IND_STRU_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = ID_TAF_XPDS_MNTN_REVERSE_MPC_POS_REPORT_REQ_IND; PS_MEM_CPY(&(pstMsg->stPosReportReq), pstPosReportReq, sizeof(TAF_XPDS_MPC_POS_REPORT_STRU)); /* 消息勾包 */ DIAG_TraceReport(pstMsg); PS_MEM_FREE(UEPS_PID_XPDS, pstMsg); return; }
VOS_VOID TAF_MMA_SndOmInternalMsgQueueInfo( VOS_UINT8 ucFullFlg, VOS_UINT8 ucMsgLenValidFlg ) { TAF_MMA_LOG_INTER_MSG_INFO_STRU *pstInterMsg = VOS_NULL_PTR; pstInterMsg = (TAF_MMA_LOG_INTER_MSG_INFO_STRU*)PS_MEM_ALLOC(WUEPS_PID_MMA, sizeof(TAF_MMA_LOG_INTER_MSG_INFO_STRU)); if ( VOS_NULL_PTR == pstInterMsg ) { TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SndOmInternalMsgQueueInfo:ERROR:Alloc Mem Fail."); return; } pstInterMsg->stMsgHeader.ulReceiverCpuId = VOS_LOCAL_CPUID; pstInterMsg->stMsgHeader.ulSenderPid = WUEPS_PID_MMA; pstInterMsg->stMsgHeader.ulReceiverPid = WUEPS_PID_MMA; pstInterMsg->stMsgHeader.ulLength = sizeof(TAF_MMA_LOG_INTER_MSG_INFO_STRU) - VOS_MSG_HEAD_LENGTH; pstInterMsg->stMsgHeader.ulMsgName = TAF_MMA_LOG_INTER_MSG_INFO_IND; pstInterMsg->ucFullFlg = ucFullFlg; pstInterMsg->ucMsgLenValidFlg = ucMsgLenValidFlg; OM_TraceMsgHook(pstInterMsg); PS_MEM_FREE(WUEPS_PID_MMA, pstInterMsg); return; }
VOS_VOID TAF_XPDS_MNTN_TraceReversePdeRejRsp( TAF_XPDS_REVLINK_RSP_REJECT_STRU *pstRejInfo ) { TAF_XPDS_MNTN_REVERSE_PDE_REJ_RSP_IND_STRU_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (TAF_XPDS_MNTN_REVERSE_PDE_REJ_RSP_IND_STRU_STRU *)PS_MEM_ALLOC(UEPS_PID_XPDS, sizeof(TAF_XPDS_MNTN_REVERSE_PDE_REJ_RSP_IND_STRU_STRU)); if (VOS_NULL_PTR == pstMsg) { XPDS_ERROR_LOG("TAF_XPDS_MNTN_TraceReversePdeRejRsp:ERROR:Alloc Mem Fail!"); return; } PS_MEM_SET( ((VOS_UINT8*)pstMsg + VOS_MSG_HEAD_LENGTH), 0, sizeof(TAF_XPDS_MNTN_REVERSE_PDE_REJ_RSP_IND_STRU_STRU) - VOS_MSG_HEAD_LENGTH); pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverPid = UEPS_PID_XPDS; pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = UEPS_PID_XPDS; pstMsg->ulLength = sizeof(TAF_XPDS_MNTN_REVERSE_PDE_REJ_RSP_IND_STRU_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = ID_TAF_XPDS_MNTN_REVERSE_PDE_REJ_RSP_IND; PS_MEM_CPY(&(pstMsg->stRejInfo), pstRejInfo, sizeof(TAF_XPDS_REVLINK_RSP_REJECT_STRU)); /* 消息勾包 */ DIAG_TraceReport(pstMsg); PS_MEM_FREE(UEPS_PID_XPDS, pstMsg); return; }
VOS_VOID TAF_MMA_LogFsmInfo(VOS_VOID) { TAF_MMA_LOG_FSM_INFO_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (TAF_MMA_LOG_FSM_INFO_STRU*)PS_MEM_ALLOC(WUEPS_PID_MMA, sizeof(TAF_MMA_LOG_FSM_INFO_STRU)); if (VOS_NULL_PTR == pstMsg) { TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_MMA_LogFsmInfo:ERROR:Alloc Mem Fail."); return; } pstMsg->stMsgHeader.ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->stMsgHeader.ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->stMsgHeader.ulSenderPid = WUEPS_PID_MMA; pstMsg->stMsgHeader.ulReceiverPid = WUEPS_PID_MMA; pstMsg->stMsgHeader.ulLength = sizeof(TAF_MMA_LOG_FSM_INFO_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->stMsgHeader.ulMsgName = TAF_MMA_LOG_FSM_INFO_IND; pstMsg->ulState = TAF_MMA_FSM_GetFsmTopState(); pstMsg->enFsmId = TAF_MMA_GetCurrFsmId(); OM_TraceMsgHook(pstMsg); PS_MEM_FREE(WUEPS_PID_MMA, pstMsg); return; }
VOS_VOID TAF_XPDS_MNTN_TraceSessionBeginIndMsg(VOS_VOID) { TAF_XPDS_MNTN_SESSION_BEGIN_IND_STRU *pstMsg = VOS_NULL_PTR; TAF_XPDS_CFG_INFO_STRU *pstCagpsCfg = VOS_NULL_PTR; pstCagpsCfg = TAF_XPDS_GetAgpsCfg(); pstMsg = (TAF_XPDS_MNTN_SESSION_BEGIN_IND_STRU *)PS_MEM_ALLOC(UEPS_PID_XPDS, sizeof(TAF_XPDS_MNTN_SESSION_BEGIN_IND_STRU)); if (VOS_NULL_PTR == pstMsg) { XPDS_ERROR_LOG("TAF_XPDS_MNTN_TraceSessionBeginIndMsg:ERROR:Alloc Mem Fail!"); return; } PS_MEM_SET( ((VOS_UINT8*)pstMsg + VOS_MSG_HEAD_LENGTH), 0, sizeof(TAF_XPDS_MNTN_SESSION_BEGIN_IND_STRU) - VOS_MSG_HEAD_LENGTH); pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverPid = UEPS_PID_XPDS; pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = UEPS_PID_XPDS; pstMsg->ulLength = sizeof(TAF_XPDS_MNTN_SESSION_BEGIN_IND_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = ID_TAF_XPDS_MNTN_SESSION_BEGIN_IND; PS_MEM_CPY(&pstMsg->stCagpsCfg, pstCagpsCfg, sizeof(TAF_XPDS_CFG_INFO_STRU)); /* 消息勾包 */ DIAG_TraceReport(pstMsg); PS_MEM_FREE(UEPS_PID_XPDS, pstMsg); return; }
VOS_VOID TAF_APS_DelItemInCmdBufferQueue( TAF_APS_TIMER_ID_ENUM_UINT32 enTimerId, VOS_UINT32 ulPara ) { VOS_UINT32 i; TAF_APS_CMD_BUFFER_STRU *pstCmdBufferQueue; pstCmdBufferQueue = TAF_APS_GetCmdBufferQueueAddr(); for ( i = 0 ; i < TAF_APS_MAX_CMD_BUFFER_QUEUE_SIZE; i++ ) { if ((enTimerId == pstCmdBufferQueue[i].enTimerId) && (ulPara == pstCmdBufferQueue[i].ulPara)) { /* 如果有缓存的消息,释放消息内存 */ if (VOS_NULL_PTR != pstCmdBufferQueue[i].pulMsgInfo) { PS_MEM_FREE(WUEPS_PID_TAF, pstCmdBufferQueue[i].pulMsgInfo); } /* 初始化 */ pstCmdBufferQueue[i].pulMsgInfo = VOS_NULL_PTR; pstCmdBufferQueue[i].enTimerId = TI_TAF_APS_TIMER_BUTT; pstCmdBufferQueue[i].ulMsgInfoLen = 0; pstCmdBufferQueue[i].ulPara = TAF_APS_INVALID_CMD_PARA; break; } } return; }
VOS_VOID APP_VC_LogEndCallReq( APP_VC_OPEN_CHANNEL_FAIL_CAUSE_ENUM_UINT32 enVcCause ) { TAF_OAM_LOG_END_CALL_REQ_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (TAF_OAM_LOG_END_CALL_REQ_STRU*)PS_MEM_ALLOC(WUEPS_PID_VC, sizeof(TAF_OAM_LOG_END_CALL_REQ_STRU)); if (VOS_NULL_PTR == pstMsg) { return; } PS_MEM_SET(((VOS_UINT8*)pstMsg) + VOS_MSG_HEAD_LENGTH, 0, sizeof(TAF_OAM_LOG_END_CALL_REQ_STRU) - VOS_MSG_HEAD_LENGTH); pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = WUEPS_PID_VC; pstMsg->ulReceiverPid = WUEPS_PID_VC; pstMsg->ulLength = sizeof(TAF_OAM_LOG_END_CALL_REQ_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->ulMsgId = TAF_OAM_LOG_END_CALL_REQ; pstMsg->ulCause = enVcCause; OM_TraceMsgHook(pstMsg); PS_MEM_FREE(WUEPS_PID_VC, pstMsg); return; }
VOS_VOID TAF_APS_SndOmDfsInfo(TAF_APS_SWITCH_DDR_RATE_INFO_STRU *pstSwitchDdrInfo) { TAF_APS_MNTN_DFS_INFO_STRU *pstMsg = VOS_NULL_PTR; pstMsg = (TAF_APS_MNTN_DFS_INFO_STRU*)PS_MEM_ALLOC(WUEPS_PID_TAF, sizeof(TAF_APS_MNTN_DFS_INFO_STRU)); if (VOS_NULL_PTR == pstMsg) { TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndOmDfsInfo:ERROR:Alloc Mem Fail."); return; } /* 定时器勾包消息赋值 */ pstMsg->ulSenderCpuId = VOS_LOCAL_CPUID; pstMsg->ulReceiverCpuId = VOS_LOCAL_CPUID; pstMsg->ulSenderPid = WUEPS_PID_TAF; pstMsg->ulReceiverPid = WUEPS_PID_TAF; pstMsg->ulLength = sizeof(TAF_APS_MNTN_DFS_INFO_STRU) - VOS_MSG_HEAD_LENGTH; pstMsg->enMsgId = ID_MSG_TAF_PS_APS_MNTN_DFS_INFO; PS_MEM_CPY(&pstMsg->stDfsInfo, pstSwitchDdrInfo, sizeof(TAF_APS_SWITCH_DDR_RATE_INFO_STRU)); /* 消息勾包 */ OM_TraceMsgHook(pstMsg); PS_MEM_FREE(WUEPS_PID_TAF, pstMsg); }
VOS_VOID TAF_MSG_ListLeftMsg(VOS_VOID) { MN_MSG_LIST_EVT_INFO_STRU *pstListEvt; pstListEvt = (MN_MSG_LIST_EVT_INFO_STRU *)PS_MEM_ALLOC(WUEPS_PID_TAF, sizeof(MN_MSG_LIST_EVT_INFO_STRU)); if (VOS_NULL_PTR == pstListEvt) { MN_ERR_LOG("TAF_MSG_ListLeftMsg:ALLOC MEM FAIL"); return; } else { pstListEvt->bSuccess = VOS_TRUE; pstListEvt->bLastListEvt = VOS_TRUE; pstListEvt->bFirstListEvt = VOS_FALSE; PS_MEM_CPY( &(pstListEvt->stReceivedListPara), &g_stList, sizeof(MN_MSG_LIST_PARM_STRU) ); } if (0 == g_ulLeftReportNum) { pstListEvt->ulReportNum = 0; pstListEvt->ulFailCause = MN_ERR_NO_ERROR; MN_MSG_ReportListEvent(g_clientId,g_opId,pstListEvt,MN_MSG_EVT_LIST); } else { /* 调用函数分段上报需列表个数 */ MN_MSG_RptMsg(g_clientId, g_opId, g_ulLeftReportNum, &g_stList, pstListEvt); } PS_MEM_FREE(WUEPS_PID_TAF, pstListEvt); }