summaryrefslogtreecommitdiffstats
path: root/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c
blob: cc3bbc7adf41e60307792127e4dca34ebf78ed05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
/************************************************************/
/*     ZNHL_NearHomescreen.c                                */
/*     NearHomescreen State transition model source file    */
/*     ZIPC Designer Version 1.2.0                          */
/************************************************************/
#include "../ZST_include.h"

/* State management variable */
static uint8_t ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREENSTATENOMAX];

static void ZNHL_NearHomescreens0e0( void );
static void ZNHL_NearHomescreens0e3( void );
static void ZNHL_NearHomescreens1e0( void );
static void ZNHL_NearHomescreens1e2( void );
static void ZNHL_NearHomescreens0Event( void );
static void ZNHL_NearHomescreens1Event( void );

/****************************************/
/* Action function                      */
/*   STM : NearHomescreen               */
/*   State : none( No 0 )               */
/*   Event : ara_software_keyboard( No 0 ) */
/****************************************/
static void ZNHL_NearHomescreens0e0( void )
{
    ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS1;
    stm_nhl_start_activity_software_keyboard();
}

/****************************************/
/* Action function                      */
/*   STM : NearHomescreen               */
/*   State : none( No 0 )               */
/*   Event : stt_prv_layer_near_homescreen_none( No 3 ) */
/****************************************/
static void ZNHL_NearHomescreens0e3( void )
{
    stm_nhl_start_activity_none();
}

/****************************************/
/* Action function                      */
/*   STM : NearHomescreen               */
/*   State : software_keyboard( No 1 )  */
/*   Event : ara_software_keyboard( No 0 ) */
/****************************************/
static void ZNHL_NearHomescreens1e0( void )
{
    stm_nhl_start_activity_software_keyboard();
}

/****************************************/
/* Action function                      */
/*   STM : NearHomescreen               */
/*   State : software_keyboard( No 1 )  */
/*   Event : ctg_software_keyboard( No 2 ) */
/****************************************/
static void ZNHL_NearHomescreens1e2( void )
{
    ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS0;
    stm_nhl_start_activity_none();
}

/****************************************/
/* Event appraisal function             */
/*   STM : NearHomescreen               */
/*   State : none( No 0 )               */
/****************************************/
static void ZNHL_NearHomescreens0Event( void )
{
    /*evt_activate*/
    if( g_stm_event == StmEvtNoActivate )
    {
        /*ctg_software_keyboard*/
        if( g_stm_category == StmCtgNoSoftwareKeyboard )
        {
            /*ara_software_keyboard*/
            if( g_stm_area == StmAreaNoSoftwareKyeboard )
            {
                ZNHL_NearHomescreens0e0();
            }
            else
            {
                ZNHL_NearHomescreens0e0();
            }
        }
        else
        {
            /*Else and default design have not done.*/
            /*Please confirm the STM and design else and default.*/
        }
    }
    /*evt_undo*/
    else if( g_stm_event == StmEvtNoUndo )
    {
        /*stt_prv_layer_near_homescreen_none*/
        if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoNone )
        {
            ZNHL_NearHomescreens0e3();
        }
        /*stt_prv_layer_near_homescreen_sft_kbd*/
        else if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoSftKbd )
        {
            ZNHL_NearHomescreens0e0();
        }
        else
        {
            /*Else and default design have not done.*/
            /*Please confirm the STM and design else and default.*/
        }
    }
    else
    {
        /*Else and default design have not done.*/
        /*Please confirm the STM and design else and default.*/
    }
}

/****************************************/
/* Event appraisal function             */
/*   STM : NearHomescreen               */
/*   State : software_keyboard( No 1 )  */
/****************************************/
static void ZNHL_NearHomescreens1Event( void )
{
    /*evt_activate*/
    if( g_stm_event == StmEvtNoActivate )
    {
        /*ctg_software_keyboard*/
        if( g_stm_category == StmCtgNoSoftwareKeyboard )
        {
            /*ara_software_keyboard*/
            if( g_stm_area == StmAreaNoSoftwareKyeboard )
            {
                ZNHL_NearHomescreens1e0();
            }
            else
            {
                ZNHL_NearHomescreens1e0();
            }
        }
        else
        {
            /*Else and default design have not done.*/
            /*Please confirm the STM and design else and default.*/
        }
    }
    /*evt_deactivate*/
    else if( g_stm_event == StmEvtNoDeactivate )
    {
        /*ctg_software_keyboard*/
        if( g_stm_category == StmCtgNoSoftwareKeyboard )
        {
            ZNHL_NearHomescreens1e2();
        }
        else
        {
            /*Else and default design have not done.*/
            /*Please confirm the STM and design else and default.*/
        }
    }
    /*evt_undo*/
    else if( g_stm_event == StmEvtNoUndo )
    {
        /*stt_prv_layer_near_homescreen_none*/
        if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoNone )
        {
            ZNHL_NearHomescreens1e2();
        }
        /*stt_prv_layer_near_homescreen_sft_kbd*/
        else if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoSftKbd )
        {
            ZNHL_NearHomescreens1e0();
        }
        else
        {
            /*Else and default design have not done.*/
            /*Please confirm the STM and design else and default.*/
        }
    }
    /*stt_restriction_mode_1_on*/
    else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On )
    {
        ZNHL_NearHomescreens1e2();
    }
    /*stt_crr_layer_apps_changed*/
    else if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
    {
        ZNHL_NearHomescreens1e2();
    }
    /*stt_crr_layer_hs_changed*/
    else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
    {
        ZNHL_NearHomescreens1e2();
    }
    else
    {
        /*Else and default design have not done.*/
        /*Please confirm the STM and design else and default.*/
    }
}

/****************************************/
/* Event call function                  */
/*   STM : NearHomescreen               */
/****************************************/
void stm_nhl_event_call( void )
{
    stm_nhl_start_stm();
    switch( ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] )
    {
    case ZNHL_NEARHOMESCREENS0:
        ZNHL_NearHomescreens0Event();
        break;
    case ZNHL_NEARHOMESCREENS1:
        ZNHL_NearHomescreens1Event();
        break;
    default:
        /*Not accessible to this else (default).*/
        break;
    }
}

/****************************************/
/* Initial function                     */
/*   STM : NearHomescreen               */
/****************************************/
void stm_nhl_initialize( void )
{
    ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS0;
    stm_nhl_start_activity_none();
}

/****************************************/
/* Terminate function                   */
/*   STM : NearHomescreen               */
/****************************************/
void ZNHL_NearHomescreenTerminate( void )
{
    ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENTERMINATE;
}