DOC

CB_Example_MCC_Code

By Josephine Warren,2014-05-11 16:27
14 views 0
CB_Example_MCC_Code

    APPI_CB_RECEIVE_MSG_IND

    DFSM( a_lk_StandbyLook )

    FFSM( lk1_0dispatch, SAME ) void lk1_0dispatch ( t_FsmObject *p_ReceivedMsg ) {… …

     lk2_30SaveMessage(p_mes, p_ReceivedMsg);

     do

     { if (lk1_1rout_fsm() != MMI_CONSUMED)

     {

     if (lk1_2menu_edit_fsm() != MMI_CONSUMED)

     {lk1_3root_fsm();}

     }

    … …

static u8 lk1_1rout_fsm( void )

    {… …

    case APPI_CB_RECEIVE_MSG_IND:

    

    lk2_12start_menu_edit_fsm(mcc_cb_receive_msg_ind_check,

    NULL);

    if (gs_look.v_flag & FL_SMS_CB_VALID)

    {

     v_Return = MMI_PASSED;

    }

    … …

    }

     1 2

    t_mcc mcc_cb_receive_msg_ind_check[] =

    {

     MC_MCC_IP(SG_CB, IP_SMS_CB_RECEIVE_MSG), void lk2_12start_menu_edit_fsm (t_mcc *p_mcc, /*#define MC_MCC_IP(sg,id)

    char *p_String) MCC_IP, sg, id, 0, 0, 0, 0*/ { MC_MCC_FLAG(FL_SMS_CB_VALID, FL_CLEAR),

     … … /*#define MC_MCC_FLAG(flag,value)

     gs_look.s_me.p_mcc = p_mcc; MCC_FLAG, 0, value,(u32)flag>>16,flag&0xFFFF, 0, 0*/

     gs_look.s_me.v_State = MCC_START; /*file "look.hem"*/

     … … MC_MCC_IF(SG_CB, IF_SMS_CB_CLASS,

     lk1_2menu_edit_fsm(); SPB_MSG_CLASS_3, TT_TRANSF, mcc_sms_cb_exit),

     } /*#define MC_MCC_IF(sg,if_id,value,type,link) } MCC_IF, sg, if_id, value, type, link, 0*/

     MC_MCC_FLAG(FL_SMS_CB_VALID, FL_SET),

     MC_MCC_EXIT

     /*#define MC_MCC_EXIT

    MCC_EXIT, 0, 0, 0, 0, 0, 0*/

    };

    =

    t_mcc mcc_cb_receive_msg_ind_check[] = u8 lk1_2menu_edit_fsm( void )

    { {… …

     //sg=SG_CB;id=IP_SMS_CB_RECEIVE_MSG; u8 v_Status = MMI_CONTINUE;

    {MCC_IP, SG_CB,IP_SMS_CB_RECEIVE_MSG,0,0,0,0}, t_me *p_me =

    {MCC_FLAG,0,FL_CLEAR,(u32)FL_SMS_CB_VALID>>16, &gs_look.s_me;

    FL_SMS_CB_VALID&0xFFFF, 0,0}, while (v_Status ==

     //flag=FL_SMS_CB_VALID;value=FL_CLEAR; MMI_CONTINUE)

    {MCC_IF,SG_CB,IF_SMS_CB_CLASS,SPB_MSG_CLASS_3,TT_T {

    RANSF,mcc_sms_cb_exit,0}, switch (p_me->v_State){

    //if_id=IF_SMS_CB_CLASS;value=SPB_MSG_CLASS_3;type=TT_ case MCC_START:

    TRANSF;link=mcc_sms_cb_exit; /* clear call

    {MCC_FLAG,0,FL_SET,(u32)FL_SMS_CB_VALID>>16, stack*/ break

    FL_SMS_CB_VALID&0xFFFF,0,0}, ;

     //flag=FL_SMS_CB_VALID;value=FL_SET; p_me->v_CallStackIndex = 0; {MCC_EXIT,0,0,0,0,0,0}

    }; … …

     }//end “switch (p_me->v_State)”

     if(v_Status == MMI_CONTINUE) p_me->v_State=MCC_IP

     {

     The condition of “while” is MC_LK_CHANGE_STATE(p_me->p_mcc->v_ctsatisfied still, so program can’t rl_code); jump from the “while-loop”, but } the “p_me->v_State” has }//end “while(v_Status == changed to “MCC_IP”. MMI_CONTINUE)”

     return (v_Status);

    }

    #define MC_LK_CHANGE_STATE(state) { p_me->v_State = state;

    p_me->p_mcc->v_attrib1=SG_CB

    case MCC_IP:

     /* call ip function of specified SG (p_me->p _mcc->v_attrib1) */

     ip_func_tab[p_me->p_mcc->v_attrib1](p_mes->v_Inparam, p_me->p_mcc);

     p_me->p_mcc++;

    {MCC_IP, SG_CB,IP_SMS_CB_RECEIVE_MSG,0,0,0,0}, break;

    … …

    static ip_func * const ip_func_tab[] = {

     … …

     (ip_func *)dir0_3ip,

     (ip_func *)pap0_3ip,

     (ip_func *)cb0_3ip,

     (ip_func *)sms0_3ip,

     … …

     }

void cb0_3ip(u32 v_inparam, t_mcc *p_mcc)

    {

     switch(p_mcc->v_attrib2)

     {

     case IP_SMS_CB_RECEIVE_MSG:

     {

     t_spb_AppiReceiveMsgInd *p_AppiReceiveMsgInd =(t_spb_AppiReceiveMsgInd *)

    v_inparam;

     gv_Class = p_AppiReceiveMsgInd->s_DataCodingScheme.v_Class;

     /* received cell broadcast message into edit buffer */

     MC_MMI_EB_WRITE_FIRST(p_AppiReceiveMsgInd->a_Data);

     }

     break;

     default:

     break;

     }

    }

t_mcc mcc_cb_receive_msg_ind_check[] =

    {

     {MCC_IP, SG_CB,IP_SMS_CB_RECEIVE_MSG,0,0,0,0},

     {MCC_FLAG,0,FL_CLEAR,(u32)FL_SMS_CB_VALID>>16, FL_SMS_CB_VALID&0xFFFF, 0,0},

     {MCC_IF,SG_CB,IF_SMS_CB_CLASS,SPB_MSG_CLASS_3,TT_TRANSF,mcc_sms_cb_exit,0},

     {MCC_FLAG,0,FL_SET,(u32)FL_SMS_CB_VALID>>16, FL_SMS_CB_VALID&0xFFFF,0,0},

     {MCC_EXIT,0,0,0,0,0,0}

    };

    case MCC_EXIT:

     p_me->v_CallStackIndex = 0;

     MC_LK_CHANGE_STATE(MCC_ZERO_S);

     p_me->v_MsgToBeRestored = MES_ALL;

     v_Status = MMI_CONSUMED;

     break;

    if (gs_look.v_flag & FL_SMS_CB_VALID)

    static void lk1_3root_fsm( void )

    {… … /*file “look.hiv”*/

    switch (gs_look.v_State) t_ind ga_ind_operational[] = {

    { … …

    … … APPI_CB_RECEIVE_MSG_IND,

    case MMI_STATE_OPERATIONAL: mcc_cb_receive_msg_ind,

    … … … …

    for (p_ind = ga_ind_operational; p_ind->v_OperationType!= 0; p_ind++)

     {

     if (p_mes->v_OperationType == p_ind->v_OperationType)

     {

     lk2_12start_menu_edit_fsm(p_ind->p_MccSequence, "");

     break;

     }

     }

    … …

    Run “mcc_cb_receive_msg_ind”

/*file “cb_mcc.hev”*/

    /* APPI_CB_RECEIVE_MSG_IND */

    t_mcc mcc_cb_receive_msg_ind[] =

    {

     MC_MCC_IP(SG_CB, IP_SMS_CB_RECEIVE_MSG),

     MC_MCC_CLEAR_STORED_CONTEXT,

     MC_MCC_FLAG(FL_SMS_CB_VIEW, FL_SET),

     MC_MCC_NPRESENT(WIN_E2, PM_CIRCULAR, WT_CHAR, KF_CANCEL | KF_CLEAR |

     KF_SKR | KF_OK | KF_DIGITS | KF_SKL | KF_UP | KF_DOWN),

     MC_MCC_FLAG(FL_SMS_CB_VIEW, FL_CLEAR),

     MC_MCC_EXIT_TO_ROOT /* let root handle the key press */ };

Report this document

For any questions or suggestions please email
cust-service@docsford.com