Пример #1
0
VOS_VOID  MN_CALL_ProcCstCallPrimitive(
    const VOS_VOID                      *pMsg
)
{
    VOS_UINT16                           usMsgType;

    usMsgType =  *((VOS_UINT16*)((VOS_UINT8*)pMsg + VOS_MSG_HEAD_LENGTH));

    MN_INFO_LOG1("MN_CALL_ProcCstCcPrimitive: primitive:", (VOS_INT32)(usMsgType));

    switch ( usMsgType )
    {
        case ID_CST_CALL_ERROR_IND :
            MN_CALL_ProcCstErrorInd(pMsg);
            break;

        case ID_CST_CALL_SETUP_CNF :
            MN_CALL_ProcCstSetupCnf(pMsg);
            break;

        default:
            MN_WARN_LOG1("MN_CALL_ProcCstCcPrimitive: wrong enMsgID:",  (VOS_INT32)(usMsgType));
            break;
    }
}
Пример #2
0
VOS_VOID  MN_CALL_ProcVCMsg (VOS_VOID * pstMsg)
{
    VC_CALL_MSG_STRU                    *pstTmpMsg;
    TAF_UINT8                           ucNumOfCalls;
    MN_CALL_END_PARAM_STRU              stEndParm;
    VOS_UINT32                          ulRet;


    pstTmpMsg = (VC_CALL_MSG_STRU*)pstMsg;

    switch(pstTmpMsg->enMsgName)
    {
        case VC_CALL_END_CALL:
            stEndParm.enEndCause    = TAF_CALL_ConvertVcCauseToTafCsCause(pstTmpMsg->enCause);

            MN_CALL_GetCallInfoList(&ucNumOfCalls,f_astCallInfos);
            if (ucNumOfCalls != 0)
            {
                ulRet = MN_CALL_InternalCallEndReqProc(MN_CLIENT_ALL,
                                                       0,
                                                       f_astCallInfos[0].callId,
                                                       &stEndParm);
                if (TAF_CS_CAUSE_SUCCESS != ulRet)
                {
                    MN_WARN_LOG("MN_CALL_ProcVCMsg: Fail to MN_CALL_InternalCallEndReqProc.");
                }
            }
            break;

        default:
            MN_WARN_LOG1("MN_CALL_ProcVCMsg:Wrong Msg.", pstTmpMsg->enMsgName);
            break;
    }
}
VOS_VOID  MN_MSG_ProcTimeoutMsg(
    REL_TIMER_MSG                       * pTmrMsg
)
{
    MN_MSG_TIMER_HANDLE_STRU            *pstHandle;
    MN_MSG_TIMER_ID_ENUM_U32            enTimerId;
    VOS_UINT32                          ulIndex;
    VOS_UINT32                          i;

    enTimerId = (MN_MSG_TIMER_ID_ENUM_U32)pTmrMsg->ulName;
    if (enTimerId < MN_TIMER_CLASS_MSG)
    {
        return;
    }
    else
    {
        for (i=0; i < (MN_MSG_TID_MAX - MN_TIMER_CLASS_MSG); i++)
        {
            if (enTimerId == f_astMsgTimerHandle[i].enTimerId)
            {
                break;
            }
        }

        if ( i < (MN_MSG_TID_MAX - MN_TIMER_CLASS_MSG) )
        {
            ulIndex = enTimerId - MN_TIMER_CLASS_MSG;

        }
        else
        {
            MN_WARN_LOG1("MN_MSG_ProcTimeoutMsg:Invalid Timer ID", (VOS_INT32)enTimerId);
            return;
        }
    }

    MN_NORM_LOG1("TAF SMA Timer expired.", (VOS_INT32)enTimerId);

    /* 由ulName得到定时器句柄 将该句柄复位 */
    pstHandle = (MN_MSG_TIMER_HANDLE_STRU *)&f_astMsgTimerHandle[i];
    pstHandle->hTimer = VOS_NULL_PTR;
    pstHandle->enTimerId = MN_MSG_TID_MAX;

    /* 调用Timer ID对应的超时处理函数 */
    f_astMsgTimerInfoTbl[ulIndex].pfnTimeoutProc(pTmrMsg->ulPara);
}
Пример #4
0
VOS_VOID  MN_CALL_ProcRabmCallPrimitive(
    const VOS_VOID                      *pMsg
)
{
    MSG_HEADER_STRU                     *pstTmpMsg;

    pstTmpMsg = (MSG_HEADER_STRU*)pMsg;

    switch ( pstTmpMsg->ulMsgName)
    {
        case RABM_CALL_SYNC_IND:
            MN_CALL_ProcRabmCallSyncInd(pMsg);
            break;

        default:
            /*异常打印*/
            MN_WARN_LOG1( "MN_CALL_ProcRabmCallPrimitive: wrong MsgName:",
                          (VOS_INT32)(pstTmpMsg->ulMsgName));
            break;
    }

}
VOS_VOID  MN_CALL_ProcVCMsg (VOS_VOID * pstMsg)
{
    VC_CALL_MSG_STRU                    *pstTmpMsg;

    pstTmpMsg = (VC_CALL_MSG_STRU*)pstMsg;

    switch(pstTmpMsg->enMsgName)
    {
        case VC_CALL_END_CALL:
            TAF_CALL_RcvVcCallEndCall(pstTmpMsg);
            break;

#if (FEATURE_ON == FEATURE_ECALL)
        case VC_CALL_ECALL_TRANS_STATUS_NTF:
            TAF_CALL_RcvVcEcallTransStatusNtf((VC_CALL_ECALL_TRANS_STATUS_NTF_STRU *)pstMsg);
            break;
#endif

        default:
            MN_WARN_LOG1("MN_CALL_ProcVCMsg:Wrong Msg.", pstTmpMsg->enMsgName);
            break;
    }
}
Пример #6
0
VOS_UINT32  MN_MSG_DecodeCbmPage(
    const MN_MSG_CBRAW_TS_DATA_STRU     *pstCbRawInfo,
    MN_MSG_CBPAGE_STRU                  *pstCbmPageInfo
)
{
    VOS_UINT32                          ulRet;
    MN_MSG_CBGSMPAGE_STRU               *pstGsmPage;
    VOS_UINT32                          ulDataLen;

    /*判断输入参数的合法性*/
    if ((VOS_NULL_PTR == pstCbRawInfo)
     || (VOS_NULL_PTR == pstCbmPageInfo))
    {
        MN_ERR_LOG("MN_MSG_DecodeCbmPage: Parameter of the function is null.");
        return MN_ERR_NULLPTR;
    }

    pstGsmPage = (MN_MSG_CBGSMPAGE_STRU   *)pstCbRawInfo->aucData;

    /* 解析DCS */
    /* Modified by f62575 for V9R1 STK升级, 2013-6-26, begin */
    ulRet = MN_MSG_DecodeCbsDcs(pstGsmPage->ucDCS,
                                pstGsmPage->aucContent,
                                TAF_CBA_MAX_CBDATA_LEN,
                                &(pstCbmPageInfo->stDcs));
    /* Modified by f62575 for V9R1 STK升级, 2013-6-26, end */
    if (MN_ERR_NO_ERROR != ulRet)
    {
        MN_WARN_LOG1("MN_MSG_DecodeCbmPage:DCS Invalid:ulRet",(VOS_INT32)ulRet);
    }

    /* 解析SN */
    ulRet = MSG_CbDecodeSn(pstGsmPage, &(pstCbmPageInfo->stSn));
    if (MN_ERR_NO_ERROR != ulRet)
    {
        MN_WARN_LOG1("MN_MSG_DecodeCbmPage:SN Invalid:ulRet",(VOS_INT32)ulRet);
    }

    /* 解析MID */
    pstCbmPageInfo->usMid = pstGsmPage->ucMIdHigh;
    pstCbmPageInfo->usMid = (VOS_UINT16)(pstCbmPageInfo->usMid << 8) | pstGsmPage->ucMIdLow;

    /* page info */
    pstCbmPageInfo->ucPageIndex = pstGsmPage->Pagebit4;
    pstCbmPageInfo->ucPageNum = pstGsmPage->Pagesbit4;

    /* This parameter is coded as two 4-bit fields. The first field (bits 0-3) indicates the binary value of the total number of
    pages in the CBS message and the second field (bits 4-7) indicates binary the page number within that sequence. The
    coding starts at 0001, with 0000 reserved. If a mobile receives the code 0000 in either the first field or the second field
    then it shall treat the CBS message exactly the same as a CBS message with page parameter 0001 0001 (i.e. a single
    page message). */
    if ( ( 0 == pstCbmPageInfo->ucPageIndex )
      || ( 0 == pstCbmPageInfo->ucPageNum ))
    {
        pstCbmPageInfo->ucPageIndex = 1;
        pstCbmPageInfo->ucPageNum   = 1;
    }
    ulDataLen = pstCbRawInfo->ulLen - MSG_CBPAGE_HEADER_LEN;

    /* 如果是 7bit编码需要将其转化为8bit */
    if (MN_MSG_MSG_CODING_7_BIT == pstCbmPageInfo->stDcs.enMsgCoding )
    {

        pstCbmPageInfo->stContent.ulLen = (ulDataLen * 8)/7;

        if ( pstCbmPageInfo->stContent.ulLen > TAF_CBA_MAX_RAW_CBDATA_LEN )
        {
            pstCbmPageInfo->stContent.ulLen = TAF_CBA_MAX_RAW_CBDATA_LEN;
        }

        /* Modified by f62575 for V9R1 STK升级, 2013-6-26, begin */
        ulRet = TAF_STD_UnPack7Bit(pstGsmPage->aucContent,
                           pstCbmPageInfo->stContent.ulLen,
                           0,
                           pstCbmPageInfo->stContent.aucContent);
        if (VOS_OK != ulRet)
        {
            MN_WARN_LOG("MN_MSG_DecodeCbmPage:TAF_STD_UnPack7Bit fail");
        }
        /* Modified by f62575 for V9R1 STK升级, 2013-6-26, end */
    }
    else
    {
        pstCbmPageInfo->stContent.ulLen = ulDataLen;
        PS_MEM_CPY(pstCbmPageInfo->stContent.aucContent,
                   pstGsmPage->aucContent,
                   pstCbmPageInfo->stContent.ulLen);

    }
    return MN_ERR_NO_ERROR;
}