DOC

How_LOOK_Control_MMI_States

By Derek Coleman,2014-04-28 14:40
9 views 0
How_LOOK_Control_MMI_States

............................................................................

LOOK module addressingwlz.

1

    MMI enigine ............................................................................................................................................ 3

    LOOK .............................................................................................................................................. 3

    Look state: gs_look.v_State; .................................................................................................. 5

    Menu Edit state: gs_look.s_me.v_State; ............................................................................... 6

    Flags: gs_look.v_flag, gs_look.v_flag2, gv_user_flag and gv_user_ex_flag; ................... 7

    State table:............................................................................................................................... 9 MCCMenu Control Command [For detail, reference mmi_sdd.pdf] ............................................ 32

    Execute Flow: ............................................................................................................................... 32

    T_me; ............................................................................................................................................. 33

    MCC types .................................................................................................................................... 34

    Messages related: ................................................................................................................. 34

    Display related: ..................................................................................................................... 35

    Key related: ........................................................................................................................... 35

    Control flow:......................................................................................................................... 35

    Editor related: ....................................................................................................................... 36

    Others: ................................................................................................................................... 37

    MCC states(p_me->v_State) ........................................................................................................ 37 Store and Restore Context .................................................................................................................... 38

    Store Context (MAX 5) ................................................................................................................ 38

    Restore Context............................................................................................................................. 38 Idle ......................................................................................................................................................... 39 SGs Reference CountDownSG.ppt ................................................................................................... 39

     2

MMI enigine

    The MMI is a passive and sequential entity. In our Sysol series platform, SPV response to

    control the overall GSM protocol behavior; but MMI shall implement a minimal state

    machine that does not duplicate the behavior of SPV according to MMI state table, which is

    MMI engine, who decide to present what kind of SPV states to USER or accept the User

    requirement; That means MMI engine controls MOBILE USER INTERFACE.

     DIAGRAM 1

    From the DAIGRAM 1, you can see the MMI engine includes two main parts: LOOK and

    SGs; And the LOOK is the kernel of MMI engine, which controls the MMI state machine;

    SGs are implement set of APPLICATION and interaction interface with the SPVs.

LOOK

    From RTK view, the whole MMI just have one stateStandby:

     3

/*- State Standby -*/

    DFSM( a_lk_StandbyLook )

    FFSM( lk1_0dispatch, SAME );

But its far more complex than what RTK think(some time we have to simplify the infinite

    states into one state), just like above mention, MMI running depends on the state table, and

    LOOK takes function of intercept, interpret the Events, and co-ordinates each SGs. So, from

    above Diagram, you can see LOOK can be separated into three sub-modules to process the

    message:

    a) ROUT: processes the messages which are state in-dependent(here not exactly right,

    because how the message execute, sometimes also depend on LOOKs state), such as

    which require no user action or does not change the display; and Maybe change the

    LOOKs state;

    b) MENU EDIT: interprets the MCCs and calls the different functions related to different

    SGs to send the request messages to the respective SPVs or to Display; and Maybe

    change the LOOKs state;

    c) ROOT: Maintains the MMI related states; processes asynchronous indications depending

    on the MMI states which in state table; and for the received indications, activates MENU

    EDIT with the respective MCC sequence.

    MMI to MMI event

    Execute

    SavedEvent

    New EventROOTMenuEditRoutDispatchMailBox

    Restore saved Event

    Wait the new Event

As for all actions strongly depend on the MMI states, so maintains the right states for MI is

    one critical role of LOOK, who can do it by three methods together:

     4

    MMI_STATE_INITMMI_STATE_WAITMMI_STATE_OPERATIONALMMI_STATE_FAILUREMMI_STATE_WAPMMI_STATE_ATMMI_STATE_AT_INITMMI_STATE_AT_WAITMMI_STATE_AT_FAILUREMMI_STATE_FM_RADIO

    State

    T_meMenu Edit, t_me

    MCC Sequences:p_AOCTimerSequenceIn Routep_SwitchOffTimerSequenceContext Storedp_AutoAnswerTimerSequenceUpdate Screen?p_IdleScreenTimerSequenceMCC Sequencesp_StkHelpTimerSequencep_SmsLedTimerSequencep_AOCHourTimerSequence

    Flags

    USER_FLAG_FILE_OPERATINGUSER_FLAG_FLIP_ON_ACCEPT_CALLUSER_FLAG_DONT_RETURN_IDLE_SCREENUSER_FLAG_BATTERY_CHARGINGUSER_FLAG_DISPLAY_NET_REGISTRATION_SCREENUSER_FLAG_IN_APP_LOOPUSER_FLAG_IN_STK

    ...EX_USER_FLAG_CALL_ALREADY_PLAYING_MELODYEX_USER_FLAG_NEW_SIM_CARD_INEX_USER_FLAG_ED_SCRATCHPAD_1_START

    Look state: gs_look.v_State;

    #define MMI_STATE_INIT 1

    ->Initialisation state of the mobile. The MMI will handle pin verification in this state. If pin1 code

    is verified then the MMI shall change state to Wait state. If puk1 is blocked then the MMI shall

    change state to Failure state.

    #define MMI_STATE_WAIT 2

    -> The MMI will handle personalisation code verification in this state. If personalization code is

    verified then the MMI shall change state to Operational. If personalisation code is blocked then

    the MMI shall change state to Failure.

    #define MMI_STATE_OPERATIONAL 3

    -> The mobile is in operational mode and the MMI offers all services to the user.

     5

#define MMI_STATE_FAILURE 4

    -> The mobile enters into this state due to any one of the following errors: No Sim, SIM error,

    IMSI invalid, PUK1 blocked, IMEI Corrupted and personalisation error.

    #define MMI_STATE_WAP 5

    -> The mobile enters this state when a WAP session is initiated.

    #define MMI_STATE_AT 6

    -> The mobile enters this state when an AT command session is initiated.

    #define MMI_STATE_AT_INIT 7

    #define MMI_STATE_AT_WAIT 8

    #define MMI_STATE_AT_FAILURE 9

    #define MMI_STATE_FM_RADIO 10

    #define MMI_STATE_GAME 11

    #define MMI_STATE_PCSYNC 12

    #define MMI_STATE_JAVA 13

    Menu Edit state: gs_look.s_me.v_State;

    #define MCC_ZERO_S 0x00 /* semantics: not activated */

    #define MCC_START 0x01 /* transient start state */

    #define MCC_EDIT_S 0x05

    #define MCC_EDIT_START_S 0x07

    #define MCC_EDIT_STK_START_S 0x09

    #define MCC_EDIT_STK_S 0x0a

    #define MCC_EDIT_CALL_START_S 0x0c

    #define MCC_EDIT_CALL_S 0x0d

    #define MCC_NAVIG_S 0x12

    #define MCC_LIST_S 0x14

    #define MCC_BSRP_S 0x19

    #define MCC_TPRESENT_S 0x27

    #define MCC_NPRESENT_S 0x29

    #define MCC_ASTPRESENT_S 0x2b

    #define MCC_ASPRESENT_S 0x2d

    #define MCC_ASTPRESENT_ENDTIMER_S 0x2e

    #define MCC_ASTPRESENT_ENDKEY_S 0x2f

    #define MCC_TDISPLAY_S 0x33

    #define MCC_INIT_DISPLAY_CONTEXT 0x36

    #define MCC_GETKEY_S 0x38

    #define MCC_GETKEY_INCALL_S 0x3a

    #define MCC_GETKEY_ACCEPT_REJECT_S 0x3c

    #define MCC_TGETKEY_S 0x3e

    #define MCC_ENAVIG_S 0x4d

    #define MCC_LDNAVIG_S 0x5A

    #define MCC_LCNAVIG_S 0x5E

    #define MCC_APP_LOOP_S 0x62

     6

#define MCC_CAMERA_GETKEY_S 0x72

    Flags: gs_look.v_flag, gs_look.v_flag2, gv_user_flag and

    gv_user_ex_flag;

    1) gs_look.v_flag, gs_look.v_flag2:

    /*Context insensitive flags*/

    #define FL_KEYPAD_LOCKED 0x00000001 #define FL_DATA_CALL 0x00000002 #define FL_INCALL 0x00000004 #define FL_ENTERCHV 0x00000008 #define FL_DISPLAY_AOC 0x00000010 #define FL_SMS_CB_VIEW 0x00000020 #define FL_DISPLAY_NOTIFICATION 0x00000040 #define FL_DISPLAY_BATTERY_INFO 0x00000080 #define FL_SWITCH_OFF 0x00000100 #define FL_PLAYING_INFINITE_MELODY 0x00000200 #define FL_IGNORE_KEY_PRESS 0x00000400 #define FL_USSD_INCALL_DISPLAY 0x00000800 #define FL_IDLE_SCREEN_TIME 0x00001000 #define FL_TEST_SIM 0x00002000 #define FL_INTERNAL_MENU 0x00004000 #define FL_RESTART_WAP 0x00008000 #define FL_MISSEDCALL_SCREEN 0x00010000 #define FL_CALL_DISCONNECT_DISPLAY 0x00020000 #define FL_SS_PASSWORD 0x00040000 #define FL_PROCESS_STK_COMMAND 0x00080000 #define FL_STK_SESSION_ACTIVE 0x00100000 #define FL_SMS_CB_VALID 0x00200000 #define FL_SMS_NOT_STORED 0x00400000 #define FL_UPDATE_ALERT_DISPLAY 0x00800000 #define FL_LK_EDITOR_END_IN_PROCESS 0x01000000 #define FL_MAT 0x02000000 #define FL_PUSH_HIGH_PRIORITY 0x04000000 #define FL_EDIT_EXTND_MSG 0x08000000 #define FL_SR_GPRS_ABORT 0x10000000 #define FL_IGNORE_DTMF 0x20000000 #define FL_GPRS_DISCONNECTED 0x40000000 #define FL_MS_APPL 0x80000000 #if defined TELECA_MS20_MMS_FTR

    #define FL_MMS_DIALOG 0x10000000 //this will cause issue

    #endif

     7

/* Since 32 flags are already defined, flag extension is done through the macro

    MC_MCC_FLAG2. This macro uses the variable gs_look.v_flag2. The following flags

    declarations uses the macro MC_MCC_FLAG2. Let a new flag be added before the line

    "The end of flag2 declarations" */

#define FL_SMS_CLASS_0_VALID 0x00000001

    #define FL_SMS_WAITING_IND 0x00000002

    #define FL_AUDIO_PLAYER 0x00000004

    #define FL_SMS_DELIVERY_REPORT 0x00000008

    #define FL_AT_RJT_INCOM_SPEECHCALL 0x00000010

    #define FL_SCRATCHCALL_INITIATED 0x00000040

    #define FL_RESTART_GAME 0x00000080

    #define FL_RESTART_CAMERA 0x00000100

    #define FL_DEAL_SMS 0x00000200

    #define FL_DEAL_MMS 0x00000400

    #define FL_USSD 0x00000800

    #define FL_AMR_RECORDING_STARTED 0x00001000

    2) gv_user_flag, gv_user_ex_flag:

    #define USER_FLAG_FILE_OPERATING 0x00000001 #define USER_FLAG_FLIP_ON_ACCEPT_CALL 0X00000002 #define USER_FLAG_DONT_RETURN_IDLE_SCREEN 0X00000004 #define USER_FLAG_BATTERY_CHARGING 0X00000008 #define USER_FLAG_DISPLAY_NET_REGISTRATION_SCREEN 0X00000010 #define USER_FLAG_IN_APP_LOOP 0X00000020 #define USER_FLAG_IN_STK 0X00000040 #define USER_FLAG_ACC_BACK_FROM_SOS 0X00000080

    #define USER_FLAG_SMS_RECEIVED_STATUS_REPORT 0X00000100 #define USER_FLAG_COUNTDOWN_TIMES_UP 0X00000200 #define USER_FLAG_FLIP_OFF 0X00000400 #define USER_FLAG_NOTE_TIME_OUT 0X00000800 #define USER_FLAG_ALARM_TIME_OUT 0X00001000 #define USER_FLAG_SMS_CLASS0_MESSAGE_DISPLAY 0X00002000 #define USER_FLAG_START_CALL_DIVERT_FLAGE 0X00004000 #define USER_FLAG_MO_ALERT_IND_NOT_HANDLE 0X00008000 #defineUSER_FLAG_RETURN_TO_IDLE_SCREEN_SEND_END_KEY 0X00010000 #defineUSER_FLAG_END_MT_SETUP_OR_MT_WAITING_CALL 0X00020000

    #defineUSER_FLAG_APPI_CALL_USER_ALERT_IND_NOT_HANDLE0X00040000

    #defineUSER_FLAG_CALL_DONT_SEND_DTMF 0X00080000

    #define USER_FLAG_ACC_LED_FLASH_ON 0X00100000 #define USER_FLAG_IN_CALL 0X00200000 #defineUSER_FLAG_FLIP_OFF_DONT_RETURN_IDLE_SCREEN 0X00400000 #defineUSER_FLAG_REMOTE_HEADSET_IN 0X00800000 #defineUSER_FLAG_NET_RE_REGISTRATION 0X01000000 #defineUSER_FLAG_SWITCH_OFF_TIME_OUT 0X02000000

     8

    #defineUSER_FLAG_DONT_DIRECT_RETURN_TO_IDLE 0X04000000

    #defineUSER_FLAG_IN_ALARM_PROCESS 0X08000000

    #defineUSER_FLAG_DONT_PLAY_KEYTONE 0X10000000

    #defineUSER_FLAG_DONT_CHECK_PASSWORD 0X20000000

    #defineUSER_FLAG_TOP_TEST_SPECIAL_KEY_HANDLE 0X40000000

    #defineUSER_FLAG_PLAY_FLIP_OFF_MIDI 0X80000000

    #define EX_USER_FLAG_NOTEPAD_SCREEN 0x00000001

    #define EX_USER_FLAG_NEW_MMS_SCREEN 0x00000002

    #define EX_USER_FLAG_NEW_MSG_SCREEN 0x00000004

    #define EX_USER_FLAG_MISSED_CALL_SCREEN 0x00000008

    #defineEX_USER_FLAG_FLIP_ONOFF_TO_KEY 0x02000000

    #define EX_USER_FLAG_SYSTEM_ON 0x00000010

    #define EX_USER_FLAG_NEW_SIM_CARD_IN 0x00000020

    #define EX_USER_FLAG_ED_SCRATCHPAD_1_START 0x00000040

    #define EX_USER_FLAG_CB_MESSAGE_DISPLAY 0x00000080

    #defineEX_USER_FLAG_REDRAW_IDLE_SUBSCREEN_AFTER_ANIMATION 0x00000100

    #define EX_USER_FLAG_QQ_NEW_MESS 0x00000200

    #defineEX_USER_FLAG_DIAL_SOUND_MESS 0x00000400

    #define EX_USER_FLAG_ALARM_SCREEN 0x00000800

    #define EX_USER_FLAG_QQ_NEW_MESS_SCREEN 0x00001000

    #define EX_USER_FLAG_WAP_ALERT_SCREEN 0x00002000

    #define EX_USER_FLAG_IN_CALL_HANGUPING 0x00004000

    #define EX_USER_FLAG_SCREEN_SAVE_STATE 0x00008000

    #defineEX_USER_FLAG_INSTANT_REFRESH_WINDOW_STATE x00010000

    #define EX_USER_FLAG_INCOMING_CALL_PLAY_RING 0x00020000

    #define EX_USER_FLAG_SMS_NOT_STORED 0x00040000

    #define EX_USER_FLAG_DRAW_IDLESCREEN_EVER 0x00080000

    #define EX_USER_FLAG_FLIP_OFF_ANIMATION 0x00100000

    #defineEX_USER_FLAG_RETURN_TO_IDLE_AFTER_INTERRUPT 0x00200000

    State table:

    static bs_func * const bs_func_tab[] = {

     (bs_func *)cal0_1bs,

     (bs_func *)net0_1bs,

     (bs_func *)sec0_1bs,

     (bs_func *)ss0_1bs,

     (bs_func *)acc0_1bs,

     (bs_func *)dir0_1bs,

     (bs_func *)pap0_1bs,

     9

     (bs_func *)cb0_1bs,

     (bs_func *)sms0_1bs,

     (bs_func *)ed0_1bs,

     (bs_func *)set0_1bs,

     (bs_func *)aoc0_1bs,

     (bs_func *)st0_1bs,

     (bs_func *)int0_1bs, #ifdef AT_COMMAND_FTR

     (bs_func *)at0_1bs, #else

     (bs_func *)NULL, #endif

    ……

     (bs_func *)lk7_1bs

};

static rp_func * const rp_func_tab[] = {

     (rp_func *)cal0_2rp,

     (rp_func *)net0_2rp,

     (rp_func *)sec0_2rp,

     (rp_func *)ss0_2rp,

     (rp_func *)acc0_2rp,

     (rp_func *)dir0_2rp,

     (rp_func *)pap0_2rp,

     (rp_func *)cb0_2rp,

     (rp_func *)sms0_2rp,

     (rp_func *)ed0_2rp,

     (rp_func *)set0_2rp,

     (rp_func *)aoc0_2rp,

     (rp_func *)st0_2rp,

     (rp_func *)int0_2rp, #ifdef AT_COMMAND_FTR

     (rp_func *)at0_2rp, #else

     (rp_func *)NULL, #endif

    ……

     (rp_func *)lk7_2rp

};

static ip_func * const ip_func_tab[] = {

     (ip_func *)cal0_3ip,

     10

Report this document

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