VOS_UINT32 NAS_UTRANCTRL_RcvUserReqMsg_PlmnSelection_WaitTdPlmnSearchCnf(
    VOS_UINT32                          ulEventType,
    struct MsgCB                       *pstMsg
)
{
    /* 记录状态机打断标记 */
    NAS_UTRANCTRL_SetAbortFlg_PlmnSelection(VOS_TRUE);

    /* 停止保护定时器 */
    NAS_UTRANCTRL_StopTimer(TI_NAS_UTRANCTRL_WAIT_TD_PLMN_SEARCH_CNF);

    /* 缓存当前用户请求消息 */
    NAS_UTRANCTRL_SaveCacheMsgInMsgQueue(ulEventType, pstMsg);

    /* 向TDRRC发送停止搜网请求 */
    NAS_UTRANCTRL_SndGuAsPlmnStopReq(TPS_PID_RRC);

    /* 迁移状态到等到TDRRC停止搜网回复 */
    NAS_UTRANCTRL_FSM_SetCurrState(NAS_UTRANCTRL_PLMN_SELECTION_STA_WAIT_TD_PLMN_STOP_CNF);

    /* 启动保护定时器 */
    NAS_UTRANCTRL_StartTimer(TI_NAS_UTRANCTRL_WAIT_TD_PLMN_STOP_CNF, TI_NAS_UTRANCTRL_WAIT_TD_PLMN_STOP_CNF_LEN);

    /* 消息处理完成不需继续处理 */
    return VOS_TRUE;
}
VOS_UINT32 NAS_UTRANCTRL_ProcessMsgInFsm(
    VOS_UINT32                          ulEventType,
    struct MsgCB                       *pstMsg
)
{
    NAS_ACTION_FUNC                     pActFun;
    NAS_UTRANCTRL_FSM_CTX_STRU         *pstCurFsm;
    VOS_UINT32                          ulRslt;

    NAS_UTRANCTRL_FSM_ID_ENUM_UINT32    enCurrFsmId;

    MSG_HEADER_STRU                    *pstMsgHeader  = VOS_NULL_PTR;

    pstMsgHeader = (MSG_HEADER_STRU *)pstMsg;

    /* 取得当前的状态机名称 */
    enCurrFsmId = NAS_UTRANCTRL_GetCurrFsmId();

    /* 获取当前UTRANCTRL的状态机地址 */
    pstCurFsm           = NAS_UTRANCTRL_GetCurFsmAddr();

    /* 查找状态转移表中的相应的动作处理函数 */
    pActFun = NAS_FSM_FindAct(pstCurFsm->pstFsmDesc, pstCurFsm->ulState, ulEventType);

    if (VOS_NULL_PTR != pActFun)
    {
        /* 在状态表中对消息进行处理 */
        ulRslt = (*pActFun) (ulEventType, (struct MsgCB *)pstMsg);
        return ulRslt;
    }

    /* 通知接入层模式通知或SYSCFG设置的时候,缓存所有找不到的消息 */
    if ((NAS_UTRANCTRL_FSM_MODE_CHANGE == enCurrFsmId)
     || (NAS_UTRANCTRL_FSM_SYSCFG      == enCurrFsmId))
    {
        /* 消息长度超过了缓存的长度,则不保存, 防止数组越界 */
        if ( (pstMsgHeader->ulLength + VOS_MSG_HEAD_LENGTH) > NAS_UTRANCTRL_MAX_MSG_BUFFER_LEN )
        {
            NAS_WARNING_LOG(WUEPS_PID_MMC, "NAS_UTRANCTRL_ProcessMsgInFsm:Msg too big to save ");

            /* 状态表中未找到要处理的消息,则需继续处理 */
            return VOS_FALSE;
        }

        NAS_UTRANCTRL_SaveCacheMsgInMsgQueue(ulEventType, pstMsg);

        /* 缓存消息,当前MMC状态机不处理,后续处理适配层缓存 */
        return VOS_TRUE;
    }

    /* 状态表中未找到要处理的消息,则需继续处理 */
    return VOS_FALSE;
}
VOS_UINT32 NAS_UTRANCTRL_RcvUserReqMsg_PlmnSelection_WaitWasPlmnStopCnf(
    VOS_UINT32                          ulEventType,
    struct MsgCB                       *pstMsg
)
{
    /* 记录状态机打断标记 */
    NAS_UTRANCTRL_SetAbortFlg_PlmnSelection(VOS_TRUE);

    /* 缓存当前用户请求消息 */
    NAS_UTRANCTRL_SaveCacheMsgInMsgQueue(ulEventType, pstMsg);

    /* 消息处理完成不需继续处理 */
    return VOS_TRUE;
}