VOS_VOID MTC_SndModem0GmmRrcAreaLostInd(VOS_VOID)
{
    VOS_UINT16                          ulLenth;
    MTC_GMM_RRC_AREA_LOST_IND_STRU     *pstAreaLostInd = VOS_NULL_PTR;

    ulLenth = sizeof(MTC_GMM_RRC_AREA_LOST_IND_STRU) - VOS_MSG_HEAD_LENGTH;

    /* 分配消息空间 */
    pstAreaLostInd = (MTC_GMM_RRC_AREA_LOST_IND_STRU*)PS_ALLOC_MSG(UEPS_PID_MTC, ulLenth);

    if (VOS_NULL_PTR == pstAreaLostInd)
    {
        MTC_ERROR_LOG("MTC_SndModem0GmmRrcAreaLostInd: Alloc msg fail!");
        return;
    }

    /* 清消息空间 */
    PS_MEM_SET((VOS_UINT8*)pstAreaLostInd + VOS_MSG_HEAD_LENGTH, 0, ulLenth);

    /* 填充消息 */
    pstAreaLostInd->stMsgHeader.ulReceiverPid   = I0_WUEPS_PID_GMM;
    pstAreaLostInd->stMsgHeader.ulMsgName       = ID_MTC_GMM_RRC_AREA_LOST_IND;

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(UEPS_PID_MTC, pstAreaLostInd))
    {
        MTC_ERROR1_LOG("MTC_SndModem0GmmRrcAreaLostInd: Snd Msg err. Rec Pid ", I0_UEPS_PID_MTA);
        return;
    }

    return;
}
VOS_VOID MTC_DEBUG_IntrusionSendSetBandReq(VOS_UINT32 ulPid)
{
    MTC_INTRUSION_DEBUG_INFO           *pstIntrusionDebugInfo;
    pstIntrusionDebugInfo = MTC_GetIntrusionDebugCtxAddr();

    if (TPS_PID_RRC == ulPid)
    {
        pstIntrusionDebugInfo->usSndTdsSetBandReqNum++;
    }
    else if (PS_PID_ERRC == ulPid)
    {
        pstIntrusionDebugInfo->usSndLteSetBandReqNum++;
    }
    else if (I1_UEPS_PID_GAS == ulPid)
    {
        pstIntrusionDebugInfo->usSndGasSetBandReqNum++;
    }
    else
    {
        MTC_ERROR1_LOG("MTC_DEBUG_IntrusionSendSetBandReq: Err SenderPid ", ulPid);
    }

    return;

}
VOS_VOID MTC_DEBUG_IntrusionSendActionReq(VOS_UINT32 ulPid)
{
    MTC_INTRUSION_DEBUG_INFO           *pstIntrusionDebugInfo;
    pstIntrusionDebugInfo = MTC_GetIntrusionDebugCtxAddr();

    if (TPS_PID_RRC == ulPid)
    {
        pstIntrusionDebugInfo->usSndAction2TDSRrcReqNum++;
    }
    else if (PS_PID_ERRC == ulPid)
    {
        pstIntrusionDebugInfo->usSndAction2LTERrcReqNum++;
    }
    else if (I1_UEPS_PID_GAS == ulPid)
    {
        pstIntrusionDebugInfo->usSndAction2GASReqNum++;
    }
    else
    {
        MTC_ERROR1_LOG("MTC_DEBUG_IntrusionSendActionReq: Err SenderPid ", ulPid);
    }

    return;

}
VOS_VOID MTC_DEBUG_IntrusionRcvActionCnf(VOS_UINT32 ulPid)
{
    MTC_INTRUSION_DEBUG_INFO           *pstIntrusionDebugInfo;
    pstIntrusionDebugInfo = MTC_GetIntrusionDebugCtxAddr();

    if (TPS_PID_RRC == ulPid)
    {
        pstIntrusionDebugInfo->usRcvTDSRrcActionCnfNum++;
    }
    else if (PS_PID_ERRC == ulPid)
    {
        pstIntrusionDebugInfo->usRcvLTERrcActionCnfNum++;
    }
    else if (I1_UEPS_PID_GAS == ulPid)
    {
        pstIntrusionDebugInfo->usRcvGASActionCnfNum++;
    }
    else
    {
        MTC_ERROR1_LOG("MTC_DEBUG_IntrusionRcvActionCnf: Err SenderPid ", ulPid);
    }

    return;

}
VOS_VOID MTC_SndRrcIntrusionBandSetReq(
    VOS_UINT32                          ulRecvPid,
    RRC_MTC_MS_BAND_INFO_STRU          *pstForbiddenBandInfo
)
{
    VOS_UINT16                              ulLenth;
    MODEM_ID_ENUM_UINT16                    enModemId;
    MTC_RRC_INTRUSION_BAND_SET_REQ_STRU    *pstBandSetReq = VOS_NULL_PTR;

    enModemId = VOS_GetModemIDFromPid(ulRecvPid);
    if (enModemId >= MODEM_ID_BUTT)
    {
        return;
    }

    /* 如果当前已经关机,则停止发送信息 */
    if (MTC_MODEM_POWER_OFF == MTC_GetModemPowerState(enModemId))
    {
        return;
    }

    /* 分配消息空间 */
    ulLenth         = sizeof(MTC_RRC_INTRUSION_BAND_SET_REQ_STRU);
    pstBandSetReq   = (MTC_RRC_INTRUSION_BAND_SET_REQ_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                                UEPS_PID_MTC,
                                                                ulLenth);

    if (VOS_NULL_PTR == pstBandSetReq)
    {
        MTC_ERROR_LOG("MTC_SndRrcIntrusionActionSetReq: Alloc Msg Fail!");
        return;
    }

    /* 填充消息 */
    pstBandSetReq->stMsgHeader.ulReceiverPid    = ulRecvPid;
    pstBandSetReq->stMsgHeader.ulMsgName        = ID_MTC_RRC_INTRUSION_BAND_SET_REQ;

    PS_MEM_CPY(&pstBandSetReq->stForbiddenBandInfo,
               pstForbiddenBandInfo,
               sizeof(RRC_MTC_MS_BAND_INFO_STRU));

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(UEPS_PID_MTC, pstBandSetReq))
    {
        MTC_ERROR1_LOG("MTC_SndRrcIntrusionActionSetReq: Snd Msg Err. ReceiverPid: ", ulRecvPid);
        return;
    }

    /* 记录可维可测 */
    MTC_DEBUG_IntrusionSendSetBandReq(ulRecvPid);

    return;

}
VOS_VOID MTC_DEBUG_SendBandInfoInd(
    VOS_UINT8                               ucAs,
    MTC_DEBUG_BAND_ENUM_UINT8               enBand
)
{
    VOS_UINT16                              ulLenth;
    RRC_MTC_INTRUSION_BAND_INFO_IND_STRU   *pstBandInfo = VOS_NULL_PTR;
    VOS_UINT32                              ulSendPid;

    /* 分配消息空间 */
    ulLenth         = sizeof(RRC_MTC_INTRUSION_BAND_INFO_IND_STRU);
    pstBandInfo     = (RRC_MTC_INTRUSION_BAND_INFO_IND_STRU *)PS_ALLOC_MSG_WITH_HEADER_LEN(
                                                                UEPS_PID_MTC,
                                                                ulLenth);

    if (VOS_NULL_PTR == pstBandInfo)
    {
        MTC_ERROR_LOG("MTC_DEBUG_SendBandInfoInd: Alloc Msg Fail!");
        return;
    }

    /* 填充消息 */
    pstBandInfo->stMsgHeader.ulReceiverCpuId   = VOS_LOCAL_CPUID;
    pstBandInfo->stMsgHeader.ulSenderCpuId     = VOS_LOCAL_CPUID;
    pstBandInfo->stMsgHeader.ulReceiverPid     = UEPS_PID_MTC;
    pstBandInfo->stMsgHeader.ulMsgName         = ID_RRC_MTC_INTRUSION_BAND_INFO_IND;

    PS_MEM_SET(&pstBandInfo->stCurBandInfo, 0, sizeof(RRC_MTC_MS_BAND_INFO_STRU));

    if (1 == ucAs)
    {
        ulSendPid = TPS_PID_RRC;
    }
    else if(2 == ucAs)
    {
        ulSendPid = PS_PID_ERRC;
    }
    else
    {
        ulSendPid = I1_UEPS_PID_GAS;
    }
    pstBandInfo->stMsgHeader.ulSenderPid       = ulSendPid;

    MTC_DEBUG_FillBandInfo(pstBandInfo, enBand);

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(ulSendPid, pstBandInfo))
    {
        MTC_ERROR1_LOG("MTC_DEBUG_SendBandInfoInd: Snd Msg Err. SendPid: ", ulSendPid);
        return;
    }

    return;
}
VOS_VOID MTC_RcvRrcAreaAvaliableInd(VOS_VOID * pMsg)
{
    MODEM_ID_ENUM_UINT16                enModemId;
    RRC_MTC_AREA_AVALIABLE_IND_STRU    *pstAreaAvaliableInd = VOS_NULL_PTR;
    MTC_MODEM_NETWORK_INFO_STRU        *pstNetworkInfo      = VOS_NULL_PTR;

    VOS_UINT8                           ucUsimValidFlag;
    MTC_PS_TRANSFER_CTX_STRU           *pstPsTransferCtx    = VOS_NULL_PTR;

    pstPsTransferCtx    = MTC_GetPsTransferCtxAddr();
    ucUsimValidFlag     = MTC_GetModemUsimValidFlag(MODEM_ID_0);

    pstAreaAvaliableInd = (RRC_MTC_AREA_AVALIABLE_IND_STRU*)pMsg;
    enModemId           = VOS_GetModemIDFromPid(pstAreaAvaliableInd->stMsgHeader.ulSenderPid);

    /* 仅处理Modem0发送的网络恢复指示 */
    if (enModemId != MODEM_ID_0)
    {
        MTC_ERROR1_LOG("MTC_RcvRrcAreaAvaliableInd: Err ModemId ", enModemId);
        return;
    }

    /* PS域离网重选策略开启时 */
    if (MTC_PS_TRANSFER_OFF_AREA == MTC_GetPsTransferCfg())
    {
        pstNetworkInfo = MTC_GetModemNetworkInfoAddr(enModemId);

        /* 当前驻留网络非禁止PLMN、非禁止GPRS接入、卡状态有效、不重复上报 */
        if ( (VOS_FALSE == pstNetworkInfo->ucIsForbiddenPlmnFlag)
          && (VOS_TRUE == pstNetworkInfo->stPsDomainInfo.ucPsSupportFlg)
          && (VOS_TRUE == ucUsimValidFlag)
          && (MTC_PS_TRANSFER_CAUSE_AREA_AVALIABLE != pstPsTransferCtx->enReportCause))
        {
            /* 上报PS域迁移网络恢复指示AT命令 */
            MTC_SndModem0MtaPsTransferInd(MTC_PS_TRANSFER_CAUSE_AREA_AVALIABLE);
        }

        pstPsTransferCtx->enRrcCause = MTC_PS_TRANSFER_CAUSE_AREA_AVALIABLE;

        MTC_SndModem0MmaPsTransferInd(MTC_PS_TRANSFER_CAUSE_AREA_AVALIABLE);
 
    }

    /* 可维可测: 记录接收到丢网指示的次数 */
    MTC_DEBUG_RcvRrcAreaAvaliableInd();

    return;
}
Exemplo n.º 8
0
VOS_VOID MTC_RcvRrcNcellInfoInd(VOS_VOID * pMsg)
{
    MODEM_ID_ENUM_UINT16                                    enModemId;
    MODEM_ID_ENUM_UINT16                                    enOtherModemId;
    RRC_MTC_NCELL_INFO_IND_STRU                            *pstNcellInfoInd;
    MTC_MMA_TDS_NCELL_INFO_STRU                             stTdsNcellInfo;
    MTC_MMA_LTE_NCELL_INFO_STRU                             stLteNcellInfo;

    pstNcellInfoInd = (RRC_MTC_NCELL_INFO_IND_STRU*)pMsg;
    enModemId       = VOS_GetModemIDFromPid(pstNcellInfoInd->stMsgHeader.ulSenderPid);
    enOtherModemId  = MODEM_ID_BUTT;

    PS_MEM_SET(&stTdsNcellInfo, 0x00, sizeof(stTdsNcellInfo));
    PS_MEM_SET(&stLteNcellInfo, 0x00, sizeof(stLteNcellInfo));

    if (enModemId >= MODEM_ID_BUTT)
    {
        MTC_ERROR1_LOG("MTC_RcvRrcNcellInfoInd: Err ModemId ", enModemId);
        return;
    }

    /* 只有在PS域迁移策略使能时才执行后续流程 */
    if (MTC_PS_TRANSFER_NONE == MTC_GetPsTransferCfg())
    {
        return;
    }

    /* 只有中移SVLTE方案才需要发送 */
    if (MTC_OPERATOR_CUST_CMCC_SVLTE == MTC_GetOperatorCustSolution())
    {
        if (VOS_OK == MTC_GetOtherModemId(enModemId, &enOtherModemId))
        {
            stTdsNcellInfo.ucTdsArfcnNum = pstNcellInfoInd->stTdsNCellInfo.ucTdsArfcnNum;
            PS_MEM_CPY(stTdsNcellInfo.ausTdsArfcnList, pstNcellInfoInd->stTdsNCellInfo.ausTdsArfcnList,
                       sizeof(stTdsNcellInfo.ausTdsArfcnList));
            stLteNcellInfo.ucLteArfcnNum = pstNcellInfoInd->stLteNCellInfo.ucLteArfcnNum;
            PS_MEM_CPY(stLteNcellInfo.ausLteArfcnList, pstNcellInfoInd->stLteNCellInfo.ausLteArfcnList,
                       sizeof(stLteNcellInfo.ausLteArfcnList));
            MTC_SndMmaNcellInfoInd(enOtherModemId, &stTdsNcellInfo, &stLteNcellInfo);
        }
    }

    return;
}
VOS_VOID MTC_SndModem0MtaPsTransferInd(
    MTC_PS_TRANSFER_CAUSE_ENUM_UINT8    enPsTransferCause
)
{
    VOS_UINT16                          ulLenth;
    MTC_MTA_PS_TRANSFER_IND_STRU       *pstPsTransferInd = VOS_NULL_PTR;

    MTC_PS_TRANSFER_CTX_STRU           *pstPsTransferCtx = VOS_NULL_PTR;

    pstPsTransferCtx                    = MTC_GetPsTransferCtxAddr();
    pstPsTransferCtx->enReportCause     = enPsTransferCause;

    ulLenth = sizeof(MTC_MTA_PS_TRANSFER_IND_STRU) - VOS_MSG_HEAD_LENGTH;

    /* 分配消息空间 */
    pstPsTransferInd = (MTC_MTA_PS_TRANSFER_IND_STRU*)PS_ALLOC_MSG(UEPS_PID_MTC, ulLenth);

    if (VOS_NULL_PTR == pstPsTransferInd)
    {
        MTC_ERROR_LOG("MTC_SndModem0MtaPsTransferInd: Alloc msg fail!");
        return;
    }

    /* 清消息空间 */
    PS_MEM_SET((VOS_UINT8*)pstPsTransferInd + VOS_MSG_HEAD_LENGTH, 0, ulLenth);

    /* 填充消息 */
    pstPsTransferInd->stMsgHeader.ulReceiverPid = I0_UEPS_PID_MTA;
    pstPsTransferInd->stMsgHeader.ulMsgName     = ID_MTC_MTA_PS_TRANSFER_IND;
    pstPsTransferInd->ucCause                   = enPsTransferCause;

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(UEPS_PID_MTC, pstPsTransferInd))
    {
        MTC_ERROR1_LOG("MTC_SndModem0MtaPsTransferInd: Snd Msg err. Rec Pid ", I0_UEPS_PID_MTA);
        return;
    }

    /* 可维可测: 记录上报PS域迁移指示次数 */
    MTC_DEBUG_SndPsTransferInd(enPsTransferCause);

    return;
}
VOS_VOID MTC_SndRrcIntrusionActionSetReq(
    VOS_UINT32                          ulRecvPid,
    PS_BOOL_ENUM_UINT8                  enEnableFlag
)
{
    VOS_UINT16                          ulLenth;
    MTC_RRC_INTRUSION_ACTION_SET_REQ_STRU   *pstMtcRrcActionReq = VOS_NULL_PTR;

    ulLenth             = sizeof(MTC_RRC_INTRUSION_ACTION_SET_REQ_STRU)
                            - VOS_MSG_HEAD_LENGTH;

    /* 分配消息空间 */
    pstMtcRrcActionReq  = (MTC_RRC_INTRUSION_ACTION_SET_REQ_STRU *)PS_ALLOC_MSG(
                                    UEPS_PID_MTC,
                                    ulLenth);

    if (VOS_NULL_PTR == pstMtcRrcActionReq)
    {
        MTC_ERROR_LOG("MTC_SndRrcIntrusionActionSetReq: alloc msg fail.");
        return;
    }

    /* 清消息空间 */
    PS_MEM_SET((VOS_UINT8*)pstMtcRrcActionReq + VOS_MSG_HEAD_LENGTH, 0, ulLenth);

    /* 填充消息 */
    pstMtcRrcActionReq->stMsgHeader.ulReceiverPid   = ulRecvPid;
    pstMtcRrcActionReq->stMsgHeader.ulMsgName       = ID_MTC_RRC_INTRUSION_ACTION_SET_REQ;
    pstMtcRrcActionReq->enActionFlag                = enEnableFlag;

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(UEPS_PID_MTC, pstMtcRrcActionReq))
    {
        MTC_ERROR1_LOG("MTC_SndRrcIntrusionActionSetReq: Snd Msg err. Rec Pid ", ulRecvPid);
        return;
    }

    MTC_DEBUG_IntrusionSendActionReq(ulRecvPid);

    return;
}
VOS_VOID MTC_DEBUG_SendOtherRatInfoInd(VOS_VOID)
{
    VOS_UINT16                              ulLenth;
    VOS_UINT8                              *pMsg     = VOS_NULL_PTR;
    VOS_UINT8                               aucMsg[] =
    {
        0x00, 0x00, 0x00, 0x00, 0xDC, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0xDB, 0x00, 0x00, 0x00,
        0x36, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x10,
        0x2E, 0x00, 0x00, 0x00, 0x18, 0x09, 0x01, 0x00,
        0x16, 0x0D, 0x01, 0x0E, 0x80, 0xFF, 0xFF, 0x35,
        0x05, 0x01, 0x2F, 0x00, 0x46, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00
    };

    /* 分配消息空间 */
    ulLenth = sizeof(aucMsg);
    pMsg    = (VOS_UINT8 *)PS_ALLOC_MSG_WITH_HEADER_LEN(WUEPS_PID_CBPCA, ulLenth);

    if (VOS_NULL_PTR == pMsg)
    {
        MTC_ERROR_LOG("MTC_DEBUG_SendOtherRatInfoInd: Alloc Msg Fail!");
        return;
    }

    /* 填充消息 */
    PS_MEM_CPY(pMsg, aucMsg, ulLenth);

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(WUEPS_PID_CBPCA, pMsg))
    {
        MTC_ERROR1_LOG("MTC_DEBUG_SendOtherRatInfoInd: Snd Msg Err. SendPid: ", WUEPS_PID_CBPCA);
        return;
    }

    return;
}
VOS_VOID MTC_SndRrcNotchChannelInd(
    VOS_UINT32                          ulRecvPid,
    PS_BOOL_ENUM_UINT8                  enEnableFlag
)
{
    VOS_UINT16                          ulLenth;
    MTC_RRC_NOTCH_CHANNEL_IND_STRU     *pstNotchChannelInd = VOS_NULL_PTR;

    ulLenth = sizeof(MTC_RRC_NOTCH_CHANNEL_IND_STRU) - VOS_MSG_HEAD_LENGTH;

    /* 分配消息空间 */
    pstNotchChannelInd  = (MTC_RRC_NOTCH_CHANNEL_IND_STRU *)PS_ALLOC_MSG(
                                    UEPS_PID_MTC,
                                    ulLenth);

    if (VOS_NULL_PTR == pstNotchChannelInd)
    {
        MTC_ERROR_LOG("MTC_SndRrcNotchChannelInd: alloc msg fail.");
        return;
    }

    /* 清消息空间 */
    PS_MEM_SET((VOS_UINT8*)pstNotchChannelInd + VOS_MSG_HEAD_LENGTH, 0, ulLenth);

    /* 填充消息 */
    pstNotchChannelInd->stMsgHeader.ulReceiverPid   = ulRecvPid;
    pstNotchChannelInd->stMsgHeader.ulMsgName       = ID_MTC_RRC_NOTCH_CHANNEL_IND;
    pstNotchChannelInd->enStartFlag                 = enEnableFlag;

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(UEPS_PID_MTC, pstNotchChannelInd))
    {
        MTC_ERROR1_LOG("MTC_SndRrcNotchChannelInd: Snd Msg err. Rec Pid ", ulRecvPid);
        return;
    }

    return;
}
VOS_VOID MTC_SndModem0MmaPsTransferInd(
    MTC_PS_TRANSFER_CAUSE_ENUM_UINT8    enPsTransferCause
)
{
    VOS_UINT16                          ulLenth;
    MTC_MMA_PS_TRANSFER_IND_STRU       *pstPsTransferInd = VOS_NULL_PTR;

    ulLenth = sizeof(MTC_MMA_PS_TRANSFER_IND_STRU) - VOS_MSG_HEAD_LENGTH;

    /* 分配消息空间 */
    pstPsTransferInd = (MTC_MMA_PS_TRANSFER_IND_STRU*)PS_ALLOC_MSG(UEPS_PID_MTC, ulLenth);

    if (VOS_NULL_PTR == pstPsTransferInd)
    {
        MTC_ERROR_LOG("MTC_SndMmaPsTransferInd: Alloc msg fail!");
        return;
    }

    /* 清消息空间 */
    PS_MEM_SET((VOS_UINT8*)pstPsTransferInd + VOS_MSG_HEAD_LENGTH, 0, ulLenth);

    /* 填充消息 */
    pstPsTransferInd->stMsgHeader.ulReceiverPid     = I0_WUEPS_PID_MMA;
    pstPsTransferInd->stMsgHeader.ulMsgName         = ID_MTC_MMA_PS_TRANSFER_IND;
    pstPsTransferInd->enSolutionCfg                 = MTC_GetPsTransferCfg();
    pstPsTransferInd->ucCause                       = enPsTransferCause;

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(UEPS_PID_MTC, pstPsTransferInd))
    {
        MTC_ERROR1_LOG("MTC_SndMmaPsTransferInd: Snd Msg err. Rec Pid ", I0_WUEPS_PID_MMA);
        return;
    }

    return;
}
Exemplo n.º 14
0
VOS_VOID MTC_SndMmaOtherModemInfoNotify(
    MODEM_ID_ENUM_UINT16                enModemId,
    MTC_MMA_PLMN_ID_STRU               *pstCurrCampPlmnId,
    MTC_MMA_EPLMN_INFO_STRU            *pstEplmnInfo
)
{
    VOS_UINT32                                  ulLenth;
    VOS_UINT32                                  ulReceivePid;
    MTC_MMA_OTHER_MODEM_INFO_NOTIFY_STRU       *pstOtherModemInfoNotify = VOS_NULL_PTR;

    ulLenth = sizeof(MTC_MMA_OTHER_MODEM_INFO_NOTIFY_STRU) - VOS_MSG_HEAD_LENGTH;

    if (MODEM_ID_0 == enModemId)
    {
        ulReceivePid = I0_WUEPS_PID_MMA;
    }
    else if (MODEM_ID_1 == enModemId)
    {
        ulReceivePid = I1_WUEPS_PID_MMA;
    }
    else
    {
        MTC_ERROR_LOG("MTC_SndMmaOtherModemInfoNotify: Error Modem Id!");
        return;
    }

    /* 分配消息空间 */
    pstOtherModemInfoNotify = (MTC_MMA_OTHER_MODEM_INFO_NOTIFY_STRU*)PS_ALLOC_MSG(UEPS_PID_MTC, ulLenth);

    if (VOS_NULL_PTR == pstOtherModemInfoNotify)
    {
        MTC_ERROR_LOG("MTC_SndMmaOtherModemInfoNotify: Alloc msg fail!");
        return;
    }

    /* 清消息空间 */
    PS_MEM_SET((VOS_UINT8*)pstOtherModemInfoNotify + VOS_MSG_HEAD_LENGTH, 0, ulLenth);

    /* 填充消息 */
    pstOtherModemInfoNotify->stMsgHeader.ulReceiverPid   = ulReceivePid;
    pstOtherModemInfoNotify->stMsgHeader.ulMsgName       = ID_MTC_MMA_OTHER_MODEM_INFO_NOTIFY;

    if (VOS_NULL_PTR != pstCurrCampPlmnId)
    {
        pstOtherModemInfoNotify->stCurrCampPlmnId.ulMcc = pstCurrCampPlmnId->ulMcc;
        pstOtherModemInfoNotify->stCurrCampPlmnId.ulMnc = pstCurrCampPlmnId->ulMnc;
        pstOtherModemInfoNotify->bitOpCurrCampPlmnId    = VOS_TRUE;
    }

    if (VOS_NULL_PTR != pstEplmnInfo)
    {
        pstOtherModemInfoNotify->bitOpEplmnInfo           = VOS_TRUE;
        pstOtherModemInfoNotify->stEplmnInfo.ucEquPlmnNum = pstEplmnInfo->ucEquPlmnNum;
        PS_MEM_CPY(pstOtherModemInfoNotify->stEplmnInfo.astEquPlmnAddr, pstEplmnInfo->astEquPlmnAddr,
                   sizeof(pstOtherModemInfoNotify->stEplmnInfo.astEquPlmnAddr));
    }

    /* 发送消息 */
    if (VOS_OK != PS_SEND_MSG(UEPS_PID_MTC, pstOtherModemInfoNotify))
    {
        MTC_ERROR1_LOG("MTC_SndMmaOtherModemInfoNotify: Snd Msg err. Rec Pid ", I0_WUEPS_PID_MMA);
        return;
    }

    return;
}
VOS_VOID MTC_RcvIntrusionBandInfoInd(VOS_VOID * pMsg)
{
    MODEM_ID_ENUM_UINT16                    enModemId;
    MTC_MODEM_INFO_STRU                    *pstModemInfo;
    RRC_MTC_INTRUSION_BAND_INFO_IND_STRU   *pstModemBandInfo;
    MTC_CFG_ENUM_UINT8                      enIntrusionCfg;
    MTC_CFG_ENUM_UINT8                      enNotchCfg;
#if 0
    MTC_CFG_ENUM_UINT8                      enNarrowDcsCfg;
#endif
    pstModemBandInfo    = (RRC_MTC_INTRUSION_BAND_INFO_IND_STRU*)pMsg;
    enModemId           = VOS_GetModemIDFromPid(pstModemBandInfo->stMsgHeader.ulSenderPid);

    /* 检查ModemID有效性,并更新本地全局变量 */
    if (enModemId >= MODEM_ID_BUTT)
    {
        MTC_ERROR1_LOG("MTC_RcvIntrusionBandInfoInd: Err ModemId ", enModemId);
        return;
    }

    pstModemInfo = MTC_GetModemCtxAddr(enModemId);

    PS_MEM_CPY(&pstModemInfo->stCurBandInfo,
               &pstModemBandInfo->stCurBandInfo,
               sizeof(RRC_MTC_MS_BAND_INFO_STRU));

    PS_MEM_CPY(&pstModemInfo->stSerCellBandInfo,
               &pstModemBandInfo->stSerCellBandInfo,
               sizeof(RRC_MTC_MS_BAND_INFO_STRU));

    enIntrusionCfg  = MTC_GetIntrusionCfg();
    enNotchCfg      = MTC_GetNotchCfg();

    /* 将当前MTC上下文上报到SDT */
    MTC_DEBUG_TraceCtxInfo();

    if (MTC_CFG_ENABLE == enIntrusionCfg)
    {
        /* 更新频段信息后,触发干扰控制裁决 */
        MTC_ProcIntrusionStrategy();
    }

    if (MTC_CFG_ENABLE == enNotchCfg)
    {
        /* 更新频段信息后,触发notch控制裁决 */
        MTC_ProcNotchStrategy();
    }
#if 0
    /* 判断Narrow band dcs裁决是否使能 */
    enNarrowDcsCfg = MTC_GetNarrowBandDcsCfg();
    if (MTC_CFG_ENABLE == enNarrowDcsCfg)
    {
        /* 执行Narrow band dcs裁决 */
        MTC_ProcNarrowDcsStrategy();
    }
#endif
    /* TL射频控制开关开启时, 触发干扰控制裁决 */
    if ( (MTC_CFG_ENABLE == MTC_GetTlRfCtrlCfg())
      && (MODEM_ID_0 == enModemId) )
    {
        MTC_ProcB39B32Intrusion();
    }

    return;
}
VOS_VOID MTC_RcvRrcAreaLostInd(VOS_VOID * pMsg)
{
    MODEM_ID_ENUM_UINT16                enModemId;
    RRC_MTC_AREA_LOST_IND_STRU         *pstAreaLostInd = VOS_NULL_PTR;
    MTC_MODEM_POWER_STATE_ENUM_UINT8    enModem1PowerState;
    MTC_OPERATOR_CUST_SOLUTION_ENUM_UINT8   enOperatorCustSolution;
    VOS_BOOL                            enTestCardFlg;

    MTC_PS_TRANSFER_CTX_STRU           *pstPsTransferCtx    = VOS_NULL_PTR;
    pstPsTransferCtx                    = MTC_GetPsTransferCtxAddr();

    /* GCF测试时不需要启动PSTRANSFER流程,否则导致GCF测试部不通过 */
    enTestCardFlg = USIMM_IsTestCard();
    if (VOS_TRUE == enTestCardFlg)
    {
        return;
    }

    pstAreaLostInd      = (RRC_MTC_AREA_LOST_IND_STRU*)pMsg;
    enModemId           = VOS_GetModemIDFromPid(pstAreaLostInd->stMsgHeader.ulSenderPid);

    /* 仅处理Modem0发送的丢网指示 */
    if (enModemId != MODEM_ID_0)
    {
        MTC_ERROR1_LOG("MTC_RcvRrcAreaLostInd: Err ModemId ", enModemId);
        return;
    }

    /* 未开启PS域迁移策略,只记录次数 */
    if (MTC_PS_TRANSFER_NONE == MTC_GetPsTransferCfg())
    {
        /* 可维可测: 记录接收到丢网指示的次数 */
        MTC_DEBUG_RcvRrcAreaLostInd(pstAreaLostInd->stMsgHeader.ulSenderPid);
        return;
    }

    /* 运营商定制方案SVLTE或C+L时需要上报AT丢网指示 */
    enOperatorCustSolution  = MTC_GetOperatorCustSolution();
    enModem1PowerState      = MTC_GetModemPowerState(MODEM_ID_1);

    /* 当接入层在业务态或idle态丢网且Modem1开机且卡有效时,上报PS域迁移指示 */
    if ((VOS_TRUE == MTC_GetModemUsimValidFlag(enModemId))
     && (((MTC_OPERATOR_CUST_CMCC_SVLTE == enOperatorCustSolution)
       && (MTC_MODEM_POWER_ON == enModem1PowerState))
      || (MTC_OPERATOR_CUST_CT_LC == enOperatorCustSolution) ))
    {
        if (MTC_PS_TRANSFER_CAUSE_AREA_LOST != pstPsTransferCtx->enReportCause)
        {
            MTC_SndModem0MtaPsTransferInd(MTC_PS_TRANSFER_CAUSE_AREA_LOST);

            /* 通知modem0 gmm丢网,gmm记录全局变量后续detach只做一次减少detach时间 */
            MTC_SndModem0GmmRrcAreaLostInd();
        }
    }

    pstPsTransferCtx->enRrcCause = MTC_PS_TRANSFER_CAUSE_AREA_LOST;

    /* 可维可测: 记录接收到丢网指示的次数 */
    MTC_DEBUG_RcvRrcAreaLostInd(pstAreaLostInd->stMsgHeader.ulSenderPid);

    return;
}