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; }
TAF_MMA_MSG_COMPARE_PRIO_RSLT_ENUM_UINT32 TAF_MMA_GetMsgComparePrioRslt( VOS_UINT32 ulEventType, struct MsgCB *pstMsg, TAF_MMA_ABORT_FSM_TYPE_UINT8 *penAbortType ) { TAF_MMA_MSG_COMPARE_FUNC pfCompareFunc; TAF_MMA_FSM_ID_ENUM_UINT32 enCurrFsmId; TAF_MMA_MSG_COMPARE_PRIO_RSLT_ENUM_UINT32 enRslt; /* 获取当前状态机的ID */ enCurrFsmId = TAF_MMA_GetCurrFsmId(); if (TAF_MMA_FSM_BUTT <= enCurrFsmId) { TAF_ERROR_LOG(WUEPS_PID_MMA, "ERROR:FsmId Error"); } /* 获取比较函数 TAF_MMA_FindMsgPrioCompareFun() */ pfCompareFunc = TAF_MMA_FindMsgPrioCompareFun(ulEventType, pstMsg, enCurrFsmId); /* 未找到处理函数,则默认消息丢弃 */ if ( VOS_NULL_PTR == pfCompareFunc ) { *penAbortType = TAF_MMA_ABORT_BUTT; return TAF_MMA_MSG_COMPARE_PRIO_RSLT_DISCARD; } /* 调用比较函数,返回优先级和打断类型 */ enRslt = pfCompareFunc(ulEventType, pstMsg, penAbortType); return enRslt; }
VOS_UINT16 TAF_MMA_GetCurPhoneErrorCode_PhoneMode(VOS_VOID) { /* 如果当前状态机不是PHONE MODE, 异常打印 */ if (TAF_MMA_FSM_PHONE_MODE != TAF_MMA_GetCurrFsmId()) { TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_GetCurPhoneErrorCode_PhoneMode,ERROR:FsmId Error"); } return (TAF_MMA_GetMmaCtxAddr()->stCurFsm.unFsmCtx.stPhoneModeCtx.usPhoneError); }
VOS_VOID TAF_MMA_USIMRefreshFileProc( VOS_UINT16 usEfId, VOS_UINT16 usEfLen, VOS_UINT8 *pucEf ) { USIMM_READFILE_CNF_STRU *pUsimTafMsg; VOS_UINT8 *pucImsi = VOS_NULL_PTR; MMA_GET_ICC_ID_ST *pstIccId = VOS_NULL_PTR; pucImsi = TAF_SDC_GetSimImsi(); pstIccId = TAF_MMA_GetIccIdInfo(); switch (usEfId) { case USIMM_GSM_EFONS_ID: /*lint -e961*/ pUsimTafMsg = (USIMM_READFILE_CNF_STRU *)PS_MEM_ALLOC(WUEPS_PID_MMA, (VOS_UINT32)(sizeof(USIMM_READFILE_CNF_STRU) - 4 + usEfLen)); /*lint +e961*/ if (VOS_NULL_PTR == pUsimTafMsg) { MMA_ERRORLOG("MMA_USIMReadRefreshFileProc():ERROR:MALLOC FAIL"); return; } /*lint -e961*/ PS_MEM_SET(pUsimTafMsg, 0, (VOS_UINT32)(sizeof(USIMM_READFILE_CNF_STRU) - 4 + usEfLen)); /*lint +e961*/ pUsimTafMsg->stCmdResult.ulResult = MMA_SUCCESS; pUsimTafMsg->usEfLen = usEfLen; PS_MEM_CPY(pUsimTafMsg->aucEf, pucEf, usEfLen); TAF_MMA_ReadCphsFileCnf(pUsimTafMsg); PS_MEM_FREE(WUEPS_PID_MMA, pUsimTafMsg); break; case USIMM_ICCID_ID: MMA_MEM_SET(&(pstIccId->stIccId), 0, sizeof(TAF_PH_ICC_ID_STRU)); MMA_MEM_CPY(pstIccId->stIccId.aucIccId, pucEf, usEfLen); pstIccId->stIccId.ucLen = (VOS_UINT8)usEfLen; TAF_MMA_ReadIccIdFileCnf(); break; case USIMM_USIM_EFIMSI_ID: case USIMM_GSM_EFIMSI_ID: /* 判断IMSI是否改变 */ if (0 != VOS_MemCmp(pucImsi, pucEf, NAS_MAX_IMSI_LENGTH)) { if (TAF_MMA_FSM_MAIN != TAF_MMA_GetCurrFsmId()) { TAF_MMA_SndInterUsimChangeInd(); break; } if (STA_FSM_NULL == g_StatusContext.ulFsmState) { break; } TAF_MMA_SndInterUsimChangeInd(); } MMA_WARNINGLOG("MMA_USIMReadRefreshFileProc():WARNING:Refresh File Id IMSI"); break; case USIMM_USIM_EFPNN_ID: case USIMM_USIM_EFPNNI_ID: MMA_INFOLOG("MMA_USIMReadRefreshFileProc():INFO:Refresh File PNN"); break; case USIMM_USIM_EFOPL_ID: case USIMM_GSM_EFOPL_ID: MMA_INFOLOG("MMA_USIMReadRefreshFileProc():INFO:Refresh File OPL"); break; case USIMM_GSM_EFCSP_ID: TAF_MMA_RcvCustomerServiceProfileFile(VOS_OK, usEfLen, pucEf); break; case USIMM_ATTUSIM_EFRATMODE_ID: TAF_MMA_RcvRatModeFileRefresh(usEfLen, pucEf); break; default: MMA_WARNINGLOG("MMA_USIMReadRefreshFileProc():WARNING:UNKNOW EFID RECEIVE!"); break; } }