Example #1
0
VOS_UINT32 TAF_APS_SndL4aCgansRejReq(
    TAF_PS_CALL_HANGUP_REQ_STRU        *pstCallHangUpReq
)
{
    APS_L4A_SET_CGANS_REQ_STRU         *pstCgansReq;

    /* 构造消息 */
    pstCgansReq = (APS_L4A_SET_CGANS_REQ_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                            WUEPS_PID_TAF,
                            sizeof(APS_L4A_SET_CGANS_REQ_STRU));
    if (VOS_NULL_PTR == pstCgansReq)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aCgansRejReq: Memory alloc failed.");
        return VOS_ERR;
    }

    /* 初始化消息 */
    PS_MEM_SET((VOS_CHAR*)pstCgansReq + VOS_MSG_HEAD_LENGTH,
                0x00,
                sizeof(APS_L4A_SET_CGANS_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写消息头 */
    pstCgansReq->ulReceiverCpuId         = VOS_LOCAL_CPUID;
    pstCgansReq->ulReceiverPid           = MSP_L4_L4A_PID;
    pstCgansReq->enMsgId                 = ID_APS_L4A_SET_CGANS_REQ;

    /* 填写消息内容 */
    pstCgansReq->stCtrl.ulPid            = WUEPS_PID_TAF;
    pstCgansReq->stCtrl.ulClientId       = pstCallHangUpReq->stCtrl.usClientId;
    pstCgansReq->stCtrl.ulOpId           = pstCallHangUpReq->stCtrl.ucOpId;

    pstCgansReq->ulResponse              = VOS_FALSE;

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstCgansReq))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aCgansRejReq: Send message failed.");
        return VOS_ERR;
    }

    return VOS_OK;
}
VOS_VOID TAF_SPM_SendImsaInterrogateSsReq(
    struct MsgCB                       *pstMsg
)
{
    SPM_IMSA_INTERROGATE_SS_REQ_STRU   *pstSndMsg = VOS_NULL_PTR;
    VOS_UINT32                          ulRet;

    /* 申请消息内存  */
    pstSndMsg = (SPM_IMSA_INTERROGATE_SS_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                                WUEPS_PID_TAF,
                                                                sizeof(SPM_IMSA_INTERROGATE_SS_REQ_STRU));
    if (VOS_NULL_PTR == pstSndMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
            "TAF_SPM_SendImsaInterrogateSsMsg: ERROR:Memory Alloc Error for pstMsg!");

        return;
    }

    /* fill in message header */
    pstSndMsg->ulSenderCpuId               = VOS_LOCAL_CPUID;
    pstSndMsg->ulSenderPid                 = WUEPS_PID_TAF;
    pstSndMsg->ulReceiverCpuId             = VOS_LOCAL_CPUID;
    pstSndMsg->ulReceiverPid               = PS_PID_IMSA;
    pstSndMsg->ulLength                    = sizeof(SPM_IMSA_INTERROGATE_SS_REQ_STRU) - VOS_MSG_HEAD_LENGTH;

    PS_MEM_CPY( ((VOS_UINT8 *)pstSndMsg + VOS_MSG_HEAD_LENGTH),
                ((VOS_UINT8 *)pstMsg + VOS_MSG_HEAD_LENGTH),
                sizeof(SPM_IMSA_INTERROGATE_SS_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* fill in message name */
    pstSndMsg->ulMsgId                   = ID_SPM_IMSA_INTERROGATE_SS_REQ;

    ulRet = PS_SEND_MSG(WUEPS_PID_TAF, pstSndMsg);

    if (VOS_OK != ulRet)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_SPM_SendImsaInterrogateSsMsg: send msg fail!");
        return;
    }

}
VOS_UINT32 TAF_SPM_SndInternalDomainSelectionInd(VOS_VOID)
{
    TAF_SPM_DOMAIN_SEL_IND_STRU        *pstDomainSelInd = VOS_NULL_PTR;

    /* allocate memory for message */
    pstDomainSelInd = (TAF_SPM_DOMAIN_SEL_IND_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                        WUEPS_PID_TAF,
                                                        sizeof(TAF_SPM_DOMAIN_SEL_IND_STRU));
    /* return if memory allocation is failure */
    if (VOS_NULL_PTR == pstDomainSelInd)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
                      "TAF_SPM_SndInternalDomainSelectionInd: ERROR: Memory allocation is failure!");

        return VOS_FALSE;
    }

    /* initialize message */
    PS_MEM_SET(((VOS_INT8*)pstDomainSelInd) + VOS_MSG_HEAD_LENGTH,
               0x00,
               sizeof(TAF_SPM_DOMAIN_SEL_IND_STRU) - VOS_MSG_HEAD_LENGTH);


    /* fill message header */
    pstDomainSelInd->MsgHeader.ulSenderCpuId               = VOS_LOCAL_CPUID;
    pstDomainSelInd->MsgHeader.ulSenderPid                 = WUEPS_PID_TAF;
    pstDomainSelInd->MsgHeader.ulReceiverCpuId             = VOS_LOCAL_CPUID;
    pstDomainSelInd->MsgHeader.ulReceiverPid               = WUEPS_PID_TAF;
    pstDomainSelInd->MsgHeader.ulLength                    = sizeof(TAF_SPM_DOMAIN_SEL_IND_STRU) - VOS_MSG_HEAD_LENGTH;
    pstDomainSelInd->MsgHeader.ulMsgName                   = TAF_SPM_INTERNAL_DOMAIN_SEL_IND;

    /* send domain selection indication message to self */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstDomainSelInd))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
                      "TAF_SPM_SndInternalDomainSelectionInd: ERROR: Send message failed.");

        return VOS_FALSE;
    }
    
    return VOS_TRUE;
}
VOS_VOID TAF_MMA_SndSysCfgSetCnf(
    TAF_MMA_CTRL_STRU                  *pstCtrl,
    TAF_MMA_APP_OPER_RESULT_ENUM_UINT32 enRslt,
    TAF_PHONE_ERROR                     usErrorCause
)
{
    TAF_MMA_SYS_CFG_CNF_STRU           *pstSndMsg   = VOS_NULL_PTR;
    VOS_UINT32                          ulRst;

    pstSndMsg = (TAF_MMA_SYS_CFG_CNF_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                             WUEPS_PID_MMA,
                                             sizeof(TAF_MMA_SYS_CFG_CNF_STRU));
    if (VOS_NULL_PTR == pstSndMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA,"TAF_MMA_SndSysCfgSetCnf:Alloc Msg Failed");
        return;
    }

    PS_MEM_SET( (VOS_INT8 *)pstSndMsg + VOS_MSG_HEAD_LENGTH, 0X00,
            sizeof(TAF_MMA_SYS_CFG_CNF_STRU) - VOS_MSG_HEAD_LENGTH);

    pstSndMsg->ulSenderCpuId            = VOS_LOCAL_CPUID;
    pstSndMsg->ulSenderPid              = WUEPS_PID_MMA;
    pstSndMsg->ulReceiverCpuId          = VOS_LOCAL_CPUID;
    pstSndMsg->ulReceiverPid            = pstCtrl->ulModuleId;
    pstSndMsg->ulMsgName                = ID_TAF_MMA_SYS_CFG_SET_CNF;
    pstSndMsg->usClientId               = pstCtrl->usClientId;
    pstSndMsg->ucOpid                   = pstCtrl->ucOpId;
    pstSndMsg->enRslt                   = enRslt;
    pstSndMsg->usErrorCause             = usErrorCause;

    ulRst = PS_SEND_MSG(WUEPS_PID_MMA, pstSndMsg);

    if (VOS_OK != ulRst)
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA,"TAF_MMA_SndSysCfgSetCnf:Send Msg Failed");
        return;
    }

    return;

}
/*****************************************************************************
 函 数 名  : MN_PH_SndMsgUsimStatus
 功能描述  : 通知MSG模块当前卡状态
 输入参数  : VOS_UINT32  ulUsimSta
 输出参数  : 无
 返 回 值  : VOS_VOID
 调用函数  :
 被调函数  :

 修改历史      :
  1.日    期   : 2011年3月28日
    作    者   : zhoujun /40661
    修改内容   : 新生成函数

*****************************************************************************/
VOS_VOID MN_PH_SndMsgUsimStatus(VOS_UINT32  ulUsimSta)
{
    MNPH_USIM_STATUS_IND_STRU           *pstSndMsg;
    VOS_UINT32                          ulRst;

    pstSndMsg = VOS_NULL_PTR;

    pstSndMsg = (MNPH_USIM_STATUS_IND_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                             WUEPS_PID_MMA,
                                             sizeof(MNPH_USIM_STATUS_IND_STRU));
    if( VOS_NULL_PTR == pstSndMsg )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA,"MN_PH_SndMsgUsimStatus:Alloc Msg Failed");
        return;
    }

    pstSndMsg->MsgHeader.ulSenderCpuId     = VOS_LOCAL_CPUID;
    pstSndMsg->MsgHeader.ulSenderPid       = WUEPS_PID_MMA;
    pstSndMsg->MsgHeader.ulReceiverCpuId   = VOS_LOCAL_CPUID;
    pstSndMsg->MsgHeader.ulReceiverPid     = WUEPS_PID_TAF;

    pstSndMsg->MsgHeader.ulMsgName         = MN_USIM_STATUS_IND;

    if ( USIMM_CARD_SERVIC_AVAILABLE == ulUsimSta )
    {
        pstSndMsg->enUsimStatus            = MNPH_USIM_STATUS_AVILABLE;
    }
    else
    {
        pstSndMsg->enUsimStatus            = MNPH_USIM_STATUS_NOT_AVAILABLE;
    }

    ulRst = PS_SEND_MSG(WUEPS_PID_MMA, pstSndMsg);
    if( VOS_OK != ulRst)
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA,"MN_PH_SndMsgUsimStatus:Send Msg Failed");
        return;
    }

    return;
}
VOS_VOID TAF_APS_ReadPdpActLimitFlgFromNv(VOS_VOID)
{
    TAF_APS_NVIM_PDP_ACT_LIMIT_STRU     stNvPdpActLimit;
    TAF_APS_PDP_ACT_LIMIT_INFO_STRU    *pstPdpActLimitInfo = VOS_NULL_PTR;
    VOS_UINT32                          ulLength;

    ulLength = 0;


    PS_MEM_SET(&stNvPdpActLimit, 0x00, sizeof(TAF_APS_NVIM_PDP_ACT_LIMIT_STRU));

    NV_GetLength(en_NV_Item_Pdp_Act_Limit_Para, &ulLength);
    if (ulLength > sizeof(stNvPdpActLimit))
    {
        return;
    }

    /* 从en_NV_Item_Pdp_Act_Limit_Para中读取PDP激活受限标志 */
    if (NV_OK !=  NV_Read(en_NV_Item_Pdp_Act_Limit_Para,
                          &stNvPdpActLimit,
                          ulLength))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_ReadPdpActLimitFlgFromNv:NVIM Read Failed");

        return;
    }

    /* PDP激活受限标志有效性检查 */
    if ((stNvPdpActLimit.ucNvimActiveFlg != VOS_TRUE)
     && (stNvPdpActLimit.ucNvimActiveFlg != VOS_FALSE))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_ReadPdpActLimitFlgFromNv:NVIM Is Anavil");
        return;
    }

    pstPdpActLimitInfo = TAF_APS_GetPdpActLimitInfoAddr();

    pstPdpActLimitInfo->ucPdpActLimitFlg = stNvPdpActLimit.ucNvimActiveFlg;

    return;
}
Example #7
0
VOS_VOID  TAF_MMA_SaveCacheMsgInMsgQueue(
    VOS_UINT32                          ulEventType,
    VOS_VOID                           *pstMsg
)
{
    TAF_MMA_MSG_QUEUE_STRU              *pstMsgQueue   = VOS_NULL_PTR;
    MSG_HEADER_STRU                     *pstMsgHeader  = VOS_NULL_PTR;

    pstMsgHeader = (MSG_HEADER_STRU*)pstMsg;

    pstMsgQueue = TAF_MMA_GetCachMsgBufferAddr();

    if ( pstMsgQueue->ucCacheMsgNum >= TAF_MMA_MAX_MSG_QUEUE_NUM )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SaveCacheMsgInMsgQueue:buffer full");

        TAF_MMA_LogBufferQueueMsg(VOS_TRUE);

        return;
    }

    /* 比较消息优先级,判断是否需要保存在缓存池中 */
    if (VOS_FALSE == TAF_MMA_IsNeedCacheMsg(ulEventType, pstMsg))
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SaveCacheMsgInMsgQueue:already exist msg");
        
        return;
    }

    pstMsgQueue->astMsgQueue[pstMsgQueue->ucCacheMsgNum].stMsgEntry.ulEventType   = ulEventType;
    PS_MEM_CPY((pstMsgQueue->astMsgQueue[pstMsgQueue->ucCacheMsgNum].stMsgEntry.aucEntryMsgBuffer),
               pstMsg,
               pstMsgHeader->ulLength + VOS_MSG_HEAD_LENGTH);
    pstMsgQueue->ucCacheMsgNum++;

    TAF_MMA_LogBufferQueueMsg(VOS_FALSE);
    
    TAF_INFO_LOG1(WUEPS_PID_MMA, "TAF_MMA_SaveCacheMsgInMsgQueue:Cache Num", pstMsgQueue->ucCacheMsgNum);

    return;
}
VOS_UINT32 TAF_MMA_SndMsgCsServiceChangeNotify(
    TAF_CS_SERVICE_ENUM_UINT32          enCsState
)
{
    VOS_UINT32                          ulRet;
    MMA_MSG_CS_SERVICE_IND             *pstMsg = VOS_NULL_PTR;

    /* 申请内存  */
    pstMsg = (MMA_MSG_CS_SERVICE_IND *)PS_ALLOC_MSG(WUEPS_PID_MMA,
                           sizeof(MMA_MSG_CS_SERVICE_IND) - VOS_MSG_HEAD_LENGTH);

    if ( VOS_NULL_PTR == pstMsg )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SndMsgCsServiceChangeNotify:ERROR: Memory Alloc Error for pMsg");
        return VOS_ERR;
    }

    PS_MEM_SET((VOS_INT8*)pstMsg + VOS_MSG_HEAD_LENGTH, 0,
                     sizeof(MMA_MSG_CS_SERVICE_IND) - VOS_MSG_HEAD_LENGTH);

    pstMsg->ulReceiverCpuId  = VOS_LOCAL_CPUID;
    pstMsg->ulReceiverPid    = WUEPS_PID_TAF;
    pstMsg->ulSenderCpuId    = VOS_LOCAL_CPUID;
    pstMsg->ulSenderPid      = WUEPS_PID_MMA;
    pstMsg->ulLength         = sizeof(MMA_MSG_CS_SERVICE_IND) - VOS_MSG_HEAD_LENGTH;
    pstMsg->ulMsgName        = ID_MMA_MSG_CS_SERVICE_CHANGE_NOTIFY;
    pstMsg->enCSState        = enCsState;

    /* 调用VOS发送原语 */
    ulRet = PS_SEND_MSG( WUEPS_PID_MMA, pstMsg );

    if ( VOS_OK != ulRet )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SndMsgCsServiceChangeNotify:ERROR:PS_SEND_MSG FAILURE");
        return VOS_ERR;
    }

    return VOS_OK;

}
VOS_VOID TAF_MMA_SndSimStatusInd(
    TAF_MMA_USIMM_CARD_TYPE_ENUM_UINT32           enCardType,                    /* 卡类型:SIM、USIM、ROM-SIM  */
    TAF_MMA_CARD_STATUS_ENUM_UINT8                enCardStatus
)
{
    TAF_MMA_SIM_STATUS_IND_STRU        *pstSndMsg   = VOS_NULL_PTR;
    VOS_UINT32                          ulRst;

    pstSndMsg = (TAF_MMA_SIM_STATUS_IND_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                             WUEPS_PID_MMA,
                                             sizeof(TAF_MMA_SIM_STATUS_IND_STRU));
    if (VOS_NULL_PTR == pstSndMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA,"TAF_MMA_SndSimStatusInd:Alloc Msg Failed");
        return;
    }

    PS_MEM_SET( (VOS_INT8 *)pstSndMsg + VOS_MSG_HEAD_LENGTH, 0X00,
            sizeof(TAF_MMA_SIM_STATUS_IND_STRU) - VOS_MSG_HEAD_LENGTH);

    pstSndMsg->ulSenderCpuId            = VOS_LOCAL_CPUID;
    pstSndMsg->ulSenderPid              = WUEPS_PID_MMA;
    pstSndMsg->ulReceiverCpuId          = VOS_LOCAL_CPUID;
    pstSndMsg->ulReceiverPid            = WUEPS_PID_CMMCA;
    pstSndMsg->ulMsgName                = ID_TAF_MMA_SIM_STATUS_IND;
    pstSndMsg->usClientId               = CMMCA_CLIENT_ID;
    pstSndMsg->ucOpid                   = 0;
    pstSndMsg->enCardType               = enCardType;
    pstSndMsg->enCardStatus             = enCardStatus;

    ulRst = PS_SEND_MSG(WUEPS_PID_MMA, pstSndMsg);
    if (VOS_OK != ulRst)
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA,"TAF_MMA_SndSimStatusInd:Send Msg Failed");
        return;
    }

    return;

}
VOS_VOID TAF_CALL_SendImsaSrvccStatusNtf(
    CALL_IMSA_SRVCC_STATUS_ENUM_UINT32  enSrvccSta
)
{
    CALL_IMSA_SRVCC_STATUS_NOTIFY_STRU *pstSndMsg = VOS_NULL_PTR;
    VOS_UINT32                          ulRet;

    /* 申请消息内存  */
    pstSndMsg = (CALL_IMSA_SRVCC_STATUS_NOTIFY_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                                WUEPS_PID_TAF,
                                                                sizeof(CALL_IMSA_SRVCC_STATUS_NOTIFY_STRU));
    if (VOS_NULL_PTR == pstSndMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
            "TAF_CALL_SendImsaSrvccStatusNtf: ERROR:Memory Alloc Error for pstMsg!");

        return;
    }

    /* fill in message header */
    pstSndMsg->ulSenderCpuId               = VOS_LOCAL_CPUID;
    pstSndMsg->ulSenderPid                 = WUEPS_PID_TAF;
    pstSndMsg->ulReceiverCpuId             = VOS_LOCAL_CPUID;
    pstSndMsg->ulReceiverPid               = PS_PID_IMSA;
    pstSndMsg->ulLength                    = sizeof(CALL_IMSA_SRVCC_STATUS_NOTIFY_STRU) - VOS_MSG_HEAD_LENGTH;
    pstSndMsg->enSrvccStatus               = enSrvccSta; 

    /* fill in message name */
    pstSndMsg->ulMsgId                     = ID_CALL_IMSA_SRVCC_STATUS_NOTIFY;

    ulRet = PS_SEND_MSG(WUEPS_PID_TAF, pstSndMsg);

    if (VOS_OK != ulRet)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_CALL_SendImsaSrvccStatusNtf: send msg fail!");
        return;
    }

    return;
}
VOS_VOID TAF_MMA_SndSpmImsVoiceCapInd(
    VOS_UINT8                           ucAvail
)
{
    VOS_UINT32                                              ulRet;
    MMA_TAF_IMS_VOICE_CAP_IND_STRU                         *pstMsg = VOS_NULL_PTR;

    /* 申请内存  */
    pstMsg = (MMA_TAF_IMS_VOICE_CAP_IND_STRU *)PS_ALLOC_MSG(WUEPS_PID_MMA,
                           sizeof(MMA_TAF_IMS_VOICE_CAP_IND_STRU) - VOS_MSG_HEAD_LENGTH);

    if ( VOS_NULL_PTR == pstMsg )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SndSpmImsVoiceCapInd:ERROR: Memory Alloc Error for pstMsg");
        return;
    }

    PS_MEM_SET((VOS_INT8*)pstMsg + VOS_MSG_HEAD_LENGTH, 0,
                     sizeof(MMA_TAF_IMS_VOICE_CAP_IND_STRU) - VOS_MSG_HEAD_LENGTH);

    pstMsg->ulReceiverCpuId  = VOS_LOCAL_CPUID;
    pstMsg->ulReceiverPid    = WUEPS_PID_TAF;
    pstMsg->ulSenderCpuId    = VOS_LOCAL_CPUID;
    pstMsg->ulSenderPid      = WUEPS_PID_MMA;
    pstMsg->ulLength         = sizeof(MMA_TAF_IMS_VOICE_CAP_IND_STRU) - VOS_MSG_HEAD_LENGTH;
    pstMsg->ulMsgName        = ID_MMA_TAF_IMS_VOICE_CAP_IND;

    pstMsg->ucImsVoiceAvail  = ucAvail;

    /* 调用VOS发送原语 */
    ulRet = PS_SEND_MSG( WUEPS_PID_MMA, pstMsg );

    if ( VOS_OK != ulRet )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SndSpmImsVoiceCapInd:ERROR:PS_SEND_MSG FAILURE");
        return;
    }

    return;
}
Example #12
0
VOS_VOID  TAF_MMA_SetCurPhoneErrorCode_PhoneMode(
    VOS_UINT16                          usErrorCode
)
{
    /* 如果当前状态机不是PHONE MODE, 异常打印 */
    if (TAF_MMA_FSM_PHONE_MODE != TAF_MMA_GetCurrFsmId())
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SetCurPhoneErrorCode_PhoneMode,ERROR:FsmId Error");
        return;
    }

    TAF_MMA_GetMmaCtxAddr()->stCurFsm.unFsmCtx.stPhoneModeCtx.usPhoneError = usErrorCode;
}
VOS_VOID TAF_APS_SndL4aAbortReq(
    VOS_UINT8                           ucCid
)
{
    APS_L4A_ABORT_REQ_STRU             *pstAbortReq;

    /* 构造消息 */
    pstAbortReq      = (APS_L4A_ABORT_REQ_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                            WUEPS_PID_TAF,
                            sizeof(APS_L4A_ABORT_REQ_STRU));
    if (VOS_NULL_PTR == pstAbortReq)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aAbortReq: Memory alloc failed.");
        return;
    }

    /* 初始化消息 */
    PS_MEM_SET((VOS_CHAR*)pstAbortReq + VOS_MSG_HEAD_LENGTH,
           0x00,
           sizeof(APS_L4A_ABORT_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    /* 填写消息头 */
    pstAbortReq->ulReceiverCpuId             = VOS_LOCAL_CPUID;
    pstAbortReq->ulReceiverPid               = MSP_L4_L4A_PID;
    pstAbortReq->enMsgId                     = ID_APS_L4A_ABORT_REQ;

    /* 填写消息内容 */
    pstAbortReq->ucCid                      = ucCid;


    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstAbortReq))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aAbortReq: Send message failed.");
        return;
    }

    return;
}
VOS_VOID TAF_CALL_ProcStartDtmfReq(SPM_IMSA_CALL_START_DTMF_REQ_STRU *pstStartDtmfReq)
{
    MN_CALL_APP_REQ_MSG_STRU           *pstDstMsg = VOS_NULL_PTR;
    TAF_CALL_DTMF_INFO_STRU             stDtmfInfo;
    TAF_CS_CAUSE_ENUM_UINT32            ulResult;
    
    /* 申请消息内存  */
    pstDstMsg = (MN_CALL_APP_REQ_MSG_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                                WUEPS_PID_TAF,
                                                                sizeof(MN_CALL_APP_REQ_MSG_STRU));
    if (VOS_NULL_PTR == pstDstMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_CALL_ProcSupsCmdReq: ERROR:Memory Alloc is fail!");

        return;
    }
    
    PS_MEM_SET(pstDstMsg, 0, sizeof(MN_CALL_APP_REQ_MSG_STRU));

    /* 首先转换消息类型到call可处理的内部消息 */
    TAF_CALL_ConvertStartDtmfReqMsg(pstStartDtmfReq, pstDstMsg);

    /* 如果TCH还没有分配,直接就缓存 */
    if (VOS_FALSE == MN_CALL_GetTchStatus())
    {
        PS_MEM_SET(&stDtmfInfo, 0, sizeof(TAF_CALL_DTMF_INFO_STRU));
        
        stDtmfInfo.opId        = pstDstMsg->opId;
        stDtmfInfo.usClientId  = pstDstMsg->clientId;
        stDtmfInfo.CallId      = pstDstMsg->unParm.stDtmf.CallId;
        stDtmfInfo.cKey        = pstDstMsg->unParm.stDtmf.cKey;
        stDtmfInfo.usOffLength = pstDstMsg->unParm.stDtmf.usOffLength;
        stDtmfInfo.usOnLength  = pstDstMsg->unParm.stDtmf.usOnLength;
        
        ulResult = TAF_CALL_SaveDtmfInfo(&stDtmfInfo);

        TAF_CALL_SendDtmfCnf(stDtmfInfo.usClientId,
                             stDtmfInfo.opId,
                             MN_CALL_EVT_START_DTMF_CNF,
                             ulResult);
    }
    else
    {
        /* 调用call模块StartDtmfReq消息处理函数 */
        TAF_CALL_RcvStartDtmfReq((struct MsgCB *)pstDstMsg);    
    }


    /* 释放分配的内存空间 */
    PS_FREE_MSG(WUEPS_PID_TAF, pstDstMsg);
}
VOS_UINT32 TAF_APS_SndL4aPppDialReq(
    TAF_PS_PPP_DIAL_ORIG_REQ_STRU      *pstPppDialOrigReq,
    TAF_APS_AUTH_INFO_STRU             *pstAuthInfo,
    TAF_APS_IPCP_INFO_STRU             *pstIpcpInfo
)
{
    APS_L4A_PPP_DIAL_REQ_STRU          *pstPppDialReq;

    /* 构造消息 */
    pstPppDialReq = (APS_L4A_PPP_DIAL_REQ_STRU*)PS_ALLOC_MSG_WITH_HEADER_LEN(
                            WUEPS_PID_TAF,
                            sizeof(APS_L4A_PPP_DIAL_REQ_STRU));
    if (VOS_NULL_PTR == pstPppDialReq)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aPppDialReq: Memory alloc failed.");
        return VOS_ERR;
    }

    /* 初始化消息 */
    PS_MEM_SET((VOS_CHAR*)pstPppDialReq + VOS_MSG_HEAD_LENGTH,
                0x00,
                (sizeof(APS_L4A_PPP_DIAL_REQ_STRU) - VOS_MSG_HEAD_LENGTH));

    /* 填写消息头 */
    pstPppDialReq->ulReceiverCpuId         = VOS_LOCAL_CPUID;
    pstPppDialReq->ulReceiverPid           = MSP_L4_L4A_PID;
    pstPppDialReq->enMsgId                 = ID_APS_L4A_PPP_DIAL_REQ;

    /* 填写消息内容 */
    pstPppDialReq->stAppCtrl.ulPid         = WUEPS_PID_TAF;
    pstPppDialReq->stAppCtrl.ulClientId    = pstPppDialOrigReq->stCtrl.usClientId;
    pstPppDialReq->stAppCtrl.ulOpId        = pstPppDialOrigReq->stCtrl.ucOpId;
    pstPppDialReq->ulCid                   = pstPppDialOrigReq->stPppDialParaInfo.ucCid;

    PS_MEM_CPY((VOS_UINT8*)(&pstPppDialReq->stPppInfo.stAuthInfo),
               (VOS_UINT8*)(pstAuthInfo),
               sizeof(TAF_APS_AUTH_INFO_STRU));

    PS_MEM_CPY((VOS_UINT8*)(&pstPppDialReq->stPppInfo.stIpcpInfo),
               (VOS_UINT8*)(pstIpcpInfo),
               sizeof(TAF_APS_IPCP_INFO_STRU));

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_TAF, pstPppDialReq))
    {
        TAF_WARNING_LOG(WUEPS_PID_TAF, "TAF_APS_SndL4aPppDialReq():WARNING:SEND MSG FIAL");
    }
    return VOS_OK;

}
VOS_UINT32  TAF_APS_CalcDsflowRate(
    VOS_UINT32                          ulStartHigh,
    VOS_UINT32                          ulStartLow,
    VOS_UINT32                          ulEndHigh,
    VOS_UINT32                          ulEndLow,
    VOS_UINT32                          ulPeriod,
    VOS_UINT32                         *pulRate
)
{
    VOS_UINT32                          ulSubRstHigh;       /* 减法结果高字节 */
    VOS_UINT32                          ulSubRstLow;        /* 减法结果低字节 */
    VOS_UINT32                          ulQuotientHigh;     /* 整除结果高字节 */
    VOS_UINT32                          ulQuotientLow;      /* 整除结果低字节 */
    VOS_UINT32                          ulRemainder;        /* 整除结果余数 */
    VOS_UINT32                          ulResult;


    /* 计算流量值 */
    TAF_APS_BIT64_SUB(ulSubRstHigh,
                      ulSubRstLow,
                      ulEndHigh,
                      ulEndLow,
                      ulStartHigh,
                      ulStartLow);

    /* 计算速率 */
    ulResult = VOS_64Div32(ulSubRstHigh,
                           ulSubRstLow,
                           ulPeriod,
                          &ulQuotientHigh,
                          &ulQuotientLow,
                          &ulRemainder);

    if ( VOS_OK != ulResult )
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
                      "TAF_APS_CalcDsflowRate: VOS_64Div32 return error.");

        *pulRate = 0;
        return VOS_ERR;
    }

    /*目前的传输速度不会大于4GB/s,故ulQuotientHigh为0,
      只返回商的低32位ulQuotientLow就行了: */
    *pulRate = ulQuotientLow;

    return VOS_OK;

}
VOS_VOID TAF_MMA_SndImsaStartReq(VOS_VOID)
{
    VOS_UINT32                          ulRet;
    MMA_IMSA_START_REQ_STRU            *pstMsg = VOS_NULL_PTR;

    /* 申请内存  */
    pstMsg = (MMA_IMSA_START_REQ_STRU *)PS_ALLOC_MSG(WUEPS_PID_MMA,
                           sizeof(MMA_IMSA_START_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    if (VOS_NULL_PTR == pstMsg)
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SndImsaStartReq:ERROR: Memory Alloc Error for pMsg");

        return;
    }

    PS_MEM_SET((VOS_INT8*)pstMsg + VOS_MSG_HEAD_LENGTH, 0,
                     sizeof(MMA_IMSA_START_REQ_STRU) - VOS_MSG_HEAD_LENGTH);

    pstMsg->ulReceiverCpuId  = VOS_LOCAL_CPUID;
    pstMsg->ulReceiverPid    = PS_PID_IMSA;
    pstMsg->ulSenderCpuId    = VOS_LOCAL_CPUID;
    pstMsg->ulSenderPid      = WUEPS_PID_MMA;
    pstMsg->ulLength         = sizeof(MMA_IMSA_START_REQ_STRU) - VOS_MSG_HEAD_LENGTH;
    pstMsg->ulMsgId          = ID_MMA_IMSA_START_REQ;

    /* 调用VOS发送原语 */
    ulRet = PS_SEND_MSG(WUEPS_PID_MMA, pstMsg);

    if ( VOS_OK != ulRet )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SndImsaStartReq:ERROR:PS_SEND_MSG FAILURE!");
    }

    return;
}
VOS_VOID  TAF_APS_ClearDsFlowInfoInNv( VOS_VOID )
{
    TAF_APS_DSFLOW_NV_STRU              stApsDsflowNv;

    /* 初始化 */
    PS_MEM_SET(&stApsDsflowNv, 0, sizeof(TAF_APS_DSFLOW_NV_STRU));

    /* 刷新NV项 */
    if (NV_OK != NV_Write(en_NV_Item_DSFLOW_REPORT, &stApsDsflowNv, sizeof(TAF_APS_DSFLOW_NV_STRU)))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_ClearDsFlowInfoInNv:Write NVIM Failed");
    }

    return;
}
VOS_VOID TAF_MMA_SndSpmServiceStatusChangeNotify(VOS_VOID)
{
    VOS_UINT32                                              ulRet;
    MMA_TAF_SERVICE_STATUS_CHANGE_NOTIFY_STRU              *pstMsg = VOS_NULL_PTR;

    /* 申请内存  */
    pstMsg = (MMA_TAF_SERVICE_STATUS_CHANGE_NOTIFY_STRU *)PS_ALLOC_MSG(WUEPS_PID_MMA,
                           sizeof(MMA_TAF_SERVICE_STATUS_CHANGE_NOTIFY_STRU) - VOS_MSG_HEAD_LENGTH);

    if ( VOS_NULL_PTR == pstMsg )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SndSpmServiceStatusChangeNotify:ERROR: Memory Alloc Error for pstMsg");
        return;
    }

    PS_MEM_SET((VOS_INT8*)pstMsg + VOS_MSG_HEAD_LENGTH, 0,
                     sizeof(MMA_TAF_SERVICE_STATUS_CHANGE_NOTIFY_STRU) - VOS_MSG_HEAD_LENGTH);

    pstMsg->ulReceiverCpuId  = VOS_LOCAL_CPUID;
    pstMsg->ulReceiverPid    = WUEPS_PID_TAF;
    pstMsg->ulSenderCpuId    = VOS_LOCAL_CPUID;
    pstMsg->ulSenderPid      = WUEPS_PID_MMA;
    pstMsg->ulLength         = sizeof(MMA_TAF_SERVICE_STATUS_CHANGE_NOTIFY_STRU) - VOS_MSG_HEAD_LENGTH;
    pstMsg->ulMsgName        = ID_MMA_TAF_SERVICE_STATUS_CHANGE_NOTIFY;

    /* 调用VOS发送原语 */
    ulRet = PS_SEND_MSG( WUEPS_PID_MMA, pstMsg );

    if ( VOS_OK != ulRet )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_SndSpmServiceStatusChangeNotify:ERROR:PS_SEND_MSG FAILURE");
        return;
    }

    return;
}
TAF_SPM_SRV_REQ_TYPE_ENUM_UINT8 TAF_SPM_GetServiceRequestTypeWithStkClient(
    struct MsgCB                       *pstMsg
)
{
    MN_APP_REQ_MSG_STRU                *pstAppMsg = VOS_NULL_PTR;
    TAF_SPM_SRV_REQ_TYPE_ENUM_UINT8     enSrvReqType;

    pstAppMsg = (MN_APP_REQ_MSG_STRU *)pstMsg;

    enSrvReqType = TAF_SPM_SRV_REQ_TYPE_BUTT;

    switch (pstAppMsg->usMsgName)
    {
        /* STK call service request */
        case STK_CALL_CALLORIG_REQ:
        case STK_CALL_SUPS_CMD_REQ:
        case STK_CALL_START_DTMF_REQ:
        case STK_CALL_STOP_DTMF_REQ:
            enSrvReqType = TAF_SPM_SRV_REQ_TYPE_CALL;
            break;

        /* STK SMS service request */
        case STK_MSG_SEND_REQ:
            enSrvReqType = TAF_SPM_SRV_REQ_TYPE_SMS;
            break;

        /* STK SS service request */
        case STK_SS_REGISTERSS_REQ:
        case STK_SS_ERASESS_REQ:
        case STK_SS_ACTIVATESS_REQ:
        case STK_SS_DEACTIVATESS_REQ:
        case STK_SS_INTERROGATESS_REQ:
        case STK_SS_USSD_REQ:
            enSrvReqType = TAF_SPM_SRV_REQ_TYPE_SS;
            break;

        default:
            TAF_ERROR_LOG(WUEPS_PID_TAF,
                          "TAF_SPM_GetServiceRequestTypeWithStkClient: unknown message is received from STK!");

            break;
    }

    return enSrvReqType;
}
VOS_VOID TAF_CALL_ProcImsaMsgSyncInd(IMSA_CALL_MSG_SYNC_IND_STRU *pstMsgSyncInd)
{
    VOS_UINT8                           i;

    /* 检查消息数目是否合法 */
    if ((0 == pstMsgSyncInd->ucMsgNum)
     || (IMSA_CALL_MSG_SYNC_MAX_NUM < pstMsgSyncInd->ucMsgNum))
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_CALL_ProcImsaMsgSyncInd: message number is invalid!");
        
        return;
    }

    for (i = 0; i < pstMsgSyncInd->ucMsgNum; i++)
    {
        TAF_CALL_ProcSyncServiceMsgReq((MSG_HEADER_STRU *)&(pstMsgSyncInd->astMsgArray[i]));
    }    
}
VOS_UINT32 TAF_CBA_DelCbMiRangeListFromActiveList(
    TAF_CBA_CBMI_RANGE_LIST_STRU       *pstOrgCbMirList
)
{
    VOS_UINT16                          usIndex;
    VOS_UINT32                          ulRet;
    TAF_CBA_CBMI_RANGE_LIST_STRU       *pstDstCbMirList;
    TAF_CBA_CBMI_RANGE_STRU            *pstOrigCbMirInfo;
    VOS_UINT32                          ulCbmidIdx;
    VOS_UINT32                          ulDelCbmirListFlg;

    pstDstCbMirList = TAF_CBA_GetCbMiRangeList();

    /* 此处认为系统出错 */
    if ( pstOrgCbMirList->usCbmirNum >=  TAF_CBA_MAX_CBMID_RANGE_NUM)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_CBA_DelCbMiRangeListFromActiveList:usCbmirNum exceeds max ");

        return VOS_FALSE;
    }

    ulDelCbmirListFlg = VOS_FALSE;

    pstOrigCbMirInfo  = pstOrgCbMirList->astCbmiRangeInfo;

    for ( usIndex = 0 ; usIndex < pstOrgCbMirList->usCbmirNum ; usIndex++ )
    {
        ulRet = TAF_CBA_IsCbmirExist(&(pstOrigCbMirInfo[usIndex]),
                                     pstDstCbMirList,
                                     &ulCbmidIdx);

        /* 相同的则需要删除 */
        if ( VOS_TRUE == ulRet )
        {
            TAF_CBA_DelCbmiRangeListItemByInx((VOS_UINT16)ulCbmidIdx);

            ulDelCbmirListFlg = VOS_TRUE;
        }
    }

    return ulDelCbmirListFlg;
}
VOS_VOID TAF_FSM_RegisterFsm(
    TAF_FSM_DESC_STRU                  *pstFsmDesc,
    VOS_CHAR                           *pucName,
    VOS_UINT32                          ulSize,
    TAF_STA_STRU                       *pstStaTbl,
    TAF_EXCEP_FUN                       pfExceptHandle,
    TAF_INIT_FUN                        pfInitHandle
)
{
    /* 检查入口参数 */
    if ( ( VOS_NULL_PTR == pstFsmDesc )
      || ( VOS_NULL_PTR == pstStaTbl ) )
    {
        TAF_ERROR_LOG(WUEPS_PID_MMC ,
                     "TAF_FSM_RegisterFsm,Parameter null ptr,pFsmDesc,pStaTable");


        return;
    }

    /* 对状态机描述符结构进行赋值 */
    pstFsmDesc->ulSize         = ulSize;
    pstFsmDesc->pStaTable      = pstStaTbl;
    pstFsmDesc->pfExceptHandle = pfExceptHandle;
    pstFsmDesc->pfInitHandle   = pfInitHandle;

    if (VOS_NULL_PTR == pucName)
    {
        pstFsmDesc->aucName[0] = '\0';
    }
    else
    {
        PS_MEM_CPY(pstFsmDesc->aucName,pucName,TAF_FSM_NAME_LENGTH);
        pstFsmDesc->aucName[TAF_FSM_NAME_LENGTH - 1] = '\0';
    }

    /* 对状态转移表进行排序 */
    TAF_FSM_StaSort(pstStaTbl, ulSize);

    return;

}
Example #24
0
VOS_UINT32  TAF_APS_SaveCacheMsg(
    VOS_UINT32                          ulEventType,
    VOS_VOID                           *pstMsg
)
{
    MSG_HEADER_STRU                     *pstMsgHeader  = VOS_NULL_PTR;

    pstMsgHeader = (MSG_HEADER_STRU*)pstMsg;

    if ( pstMsgHeader->ulLength >= ( TAF_APS_MAX_MSG_BUFFER_LEN - VOS_MSG_HEAD_LENGTH) )
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SaveCacheMsg:Len too Long");
        return VOS_FALSE;
    }

    /* 将消息缓存在缓存内存池中 */
    TAF_APS_SaveCacheMsgInMsgQueue(ulEventType, pstMsg);

    return VOS_TRUE;
}
Example #25
0
VOS_VOID  TAF_MMA_LoadSubFsm(
    TAF_MMA_FSM_ID_ENUM_UINT32          enFsmId,
    TAF_MMA_FSM_CTX_STRU               *pstCurFsm
)
{
    switch ( enFsmId )
    {
        case TAF_MMA_FSM_PHONE_MODE :
            pstCurFsm->ulState                  = TAF_MMA_PHONE_MODE_STA_INIT;
            pstCurFsm->pstFsmDesc               = TAF_MMA_GetPhoneModeFsmDescAddr();
            break;

        default:
            TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_LoadSubFsm:Invalid Fsm Id");
            return;
    }


    /*执行初始化sub状态机的函数*/
    pstCurFsm->pstFsmDesc->pfInitHandle();
}
MMA_IMSA_SERVICE_STATUS_ENUM_UINT8 TAF_MMA_ConvertMmaPsServiceStatusToImsaFormat(
    MMA_MMC_SERVICE_STATUS_ENUM_UINT32 enMmcPsServiceStatus
)
{
    MMA_IMSA_SERVICE_STATUS_ENUM_UINT8  ucPsServiceStatus;

    switch ((VOS_UINT8)enMmcPsServiceStatus)
    {
        case MMA_MMC_SERVICE_STATUS_NORMAL_SERVICE:

            ucPsServiceStatus =  MMA_IMSA_NORMAL_SERVICE;
            break;

        case MMA_MMC_SERVICE_STATUS_LIMITED_SERVICE:
        case MMA_MMC_SERVICE_STATUS_LIMITED_SERVICE_REGION:
        case MMA_MMC_SERVICE_STATUS_NO_IMSI:

            ucPsServiceStatus =  MMA_IMSA_LIMITED_SERVICE;
            break;

        case MMA_MMC_SERVICE_STATUS_NO_CHANGE:
        case MMA_MMC_SERVICE_STATUS_DEEP_SLEEP:

            TAF_ERROR_LOG(WUEPS_PID_MMA, "TAF_MMA_ConvertMmaPsServiceStatusToImsaFormat: service status is abnormal!");
            ucPsServiceStatus =  MMA_IMSA_NO_SERVICE;
            break;

        case MMA_MMC_SERVICE_STATUS_NO_SERVICE:

            ucPsServiceStatus =  MMA_IMSA_NO_SERVICE;
            break;

        default:

            ucPsServiceStatus =  MMA_IMSA_SERVICE_STATUS_BUTT;
            break;
    }

    return ucPsServiceStatus;
}
VOS_VOID  TAF_APS_SaveDsFlowInfoToNv( VOS_VOID )
{
    TAF_APS_DSFLOW_STATS_CTX_STRU      *pstApsDsFlowCtx;
    TAF_APS_DSFLOW_NV_STRU              stApsDsflowNv;
    TAF_DSFLOW_QUERY_INFO_STRU          stDsFlowQryInfo;

    /* 初始化 */
    pstApsDsFlowCtx = TAF_APS_GetDsFlowCtxAddr();
    PS_MEM_SET(&stApsDsflowNv, 0, sizeof(TAF_APS_DSFLOW_NV_STRU));
    PS_MEM_SET(&stDsFlowQryInfo, 0, sizeof(TAF_DSFLOW_QUERY_INFO_STRU));

    if (VOS_TRUE == pstApsDsFlowCtx->ucApsDsFlowSave2NvFlg)
    {

        /* 获取历史流量信息项 */
        TAF_APS_QryAllRabDsFlowStats(&stDsFlowQryInfo);

        /* 刷新流量信息相关NV项 */
        stApsDsflowNv.ulDSLastLinkTime          = stDsFlowQryInfo.stCurrentFlowInfo.ulDSLinkTime;
        stApsDsflowNv.ulDSTotalLinkTime         = stDsFlowQryInfo.stTotalFlowInfo.ulDSLinkTime;
        stApsDsflowNv.ulDSTotalReceiveFluxHigh  = stDsFlowQryInfo.stTotalFlowInfo.ulDSReceiveFluxHigh;
        stApsDsflowNv.ulDSTotalReceiveFluxLow   = stDsFlowQryInfo.stTotalFlowInfo.ulDSReceiveFluxLow;
        stApsDsflowNv.ulDSTotalSendFluxHigh     = stDsFlowQryInfo.stTotalFlowInfo.ulDSSendFluxHigh;
        stApsDsflowNv.ulDSTotalSendFluxLow      = stDsFlowQryInfo.stTotalFlowInfo.ulDSSendFluxLow;

        /* 写NV项 */
        if (NV_OK != NV_Write(en_NV_Item_DSFLOW_REPORT, &stApsDsflowNv, sizeof(TAF_APS_DSFLOW_NV_STRU)))
        {
            TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_SaveDsFlowInfoToNv: Write NVIM Failed");
        }
    }
    else
    {
        TAF_NORMAL_LOG(WUEPS_PID_TAF, "TAF_APS_SaveDsFlowInfoToNv: Save2NvFlg is not set.");
    }

    return;
}
VOS_UINT32 TAF_CBA_IsDupMidsInActiveList(
    TAF_CBA_CBMI_RANGE_LIST_STRU       *pstAddbMids
)
{
    VOS_UINT32                          ulCbmirInx;
    VOS_UINT32                          ulRet;
    TAF_CBA_CBMI_RANGE_LIST_STRU       *pstMemCbmiRangList;
    TAF_CBA_CBMI_RANGE_STRU            *pstAddCbmirInfo;
    VOS_UINT32                          ulCbmidIdx;

    pstMemCbmiRangList = TAF_CBA_GetCbMiRangeList();

    ulRet = VOS_FALSE;

    if ( pstAddbMids->usCbmirNum > TAF_CBA_MAX_CBMID_RANGE_NUM)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_CBA_IsDupMidsInActiveList: usCbmirNum Error.");
        pstAddbMids->usCbmirNum  = TAF_CBA_MAX_CBMID_RANGE_NUM;
    }

    pstAddCbmirInfo = pstAddbMids->astCbmiRangeInfo;

    /* 检查是否有存在 */
    for ( ulCbmirInx = 0 ; ulCbmirInx < pstAddbMids->usCbmirNum; ulCbmirInx++ )
    {
        ulRet = TAF_CBA_IsCbmirExist(&pstAddCbmirInfo[ulCbmirInx],
                                     pstMemCbmiRangList,
                                     &ulCbmidIdx);
        if ( VOS_TRUE == ulRet )
        {
            TAF_INFO_LOG(WUEPS_PID_TAF, "TAF_CBA_IsDupMidsInActiveList: Cross Mids.");
            return VOS_TRUE;
        }
    }

    return VOS_FALSE;
}
VOS_VOID TAF_SPM_ProcMoSmsRpt(TAF_SPM_MSG_REPORT_IND_STRU  *pstMsgReportInd)
{
    MN_MSG_EVENT_INFO_STRU             *pstMsgEventInfo = VOS_NULL_PTR;

    pstMsgEventInfo = PS_MEM_ALLOC(WUEPS_PID_TAF, sizeof(MN_MSG_EVENT_INFO_STRU));

    if (VOS_NULL_PTR == pstMsgEventInfo)
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF,
                      "TAF_SPM_ProcMoSmsRpt: ERROR:Memory Alloc is failure!");

        return;
    }

    PS_MEM_SET(pstMsgEventInfo, 0, sizeof(MN_MSG_EVENT_INFO_STRU));

    pstMsgEventInfo->u.stSubmitRptInfo.enSaveArea  = pstMsgReportInd->stRptEvtInfo.enSaveArea;
    pstMsgEventInfo->u.stSubmitRptInfo.ulSaveIndex = pstMsgReportInd->stRptEvtInfo.ulSaveIndex;
    pstMsgEventInfo->u.stSubmitRptInfo.ucMr        = pstMsgReportInd->stRptEvtInfo.ucMr;

    pstMsgEventInfo->clientId                      = pstMsgReportInd->usClientId;
    pstMsgEventInfo->opId                          = pstMsgReportInd->ucOpId;

    if (TAF_MSG_ERROR_NO_ERROR != pstMsgReportInd->stRptEvtInfo.enErrorCode)
    {
        /* 短信发送失败,则转换cause值 */
        pstMsgEventInfo->u.stSubmitRptInfo.enErrorCode = pstMsgReportInd->stRptEvtInfo.enErrorCode;
    }

    /* 通知应用短信发送结果 */
    MN_SendClientEvent(pstMsgReportInd->usClientId,
                       MN_CALLBACK_MSG,
                       MN_MSG_EVT_SUBMIT_RPT,
                       (VOS_VOID *)pstMsgEventInfo);

    PS_MEM_FREE(WUEPS_PID_TAF, pstMsgEventInfo);
}
Example #30
0
TAF_APS_INTERNAL_MSG_BUF_STRU *TAF_APS_GetIntMsgSendBuf(
    VOS_UINT32                          ulLen
)
{
    TAF_APS_INTERNAL_MSG_BUF_STRU      *pstTafApsMsg        = VOS_NULL_PTR;
    TAF_APS_INTERNAL_MSG_QUEUE_STRU    *pstInternalMsgQueue = VOS_NULL_PTR;

    pstInternalMsgQueue         = &(TAF_APS_GetApsCtxAddr()->stInternalMsgQueue);

    /* 从上下文中获取消息缓冲区指针 */
    pstTafApsMsg = ( TAF_APS_INTERNAL_MSG_BUF_STRU *)&(pstInternalMsgQueue->stSendMsgBuf);

    if ( ulLen > TAF_APS_MAX_MSG_BUFFER_LEN )
    {
        TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_GetIntMsgSendBuf: Buffer full" );
        return VOS_NULL_PTR;
    }

    /* 清空这个消息缓冲单元 */
    PS_MEM_SET(pstTafApsMsg, 0x00, sizeof(TAF_APS_INTERNAL_MSG_BUF_STRU));

    /* 返回缓冲区指针 */
    return pstTafApsMsg;
}