Readd policy table generated by ZIPC for EXAMPLE
[apps/agl-service-windowmanager-2017.git] / policy_manager / stm / zipc / StateTransitionor / AppsLayer / ZAPL_AppsLayer.c
1 /************************************************************/
2 /*     ZAPL_AppsLayer.c                                     */
3 /*     AppsLayer State transition model source file         */
4 /*     ZIPC Designer Version 1.2.0                          */
5 /************************************************************/
6 #include "../ZST_include.h"
7
8 /* State management variable */
9 static uint8_t ZAPL_AppsLayerState[ZAPL_APPSLAYERSTATENOMAX];
10
11 static void ZAPL_AppsLayers0StateEntry( void );
12 static void ZAPL_AppsLayers1StateEntry( void );
13 static void ZAPL_AppsLayers0e1( void );
14 static void ZAPL_AppsLayers1e0( void );
15 static void ZAPL_RestrictionModeOffs0e0( void );
16 static void ZAPL_RestrictionModeOffs0e2( void );
17 static void ZAPL_RestrictionModeOffs0e3( void );
18 static void ZAPL_RestrictionModeOffs0e6( void );
19 static void ZAPL_RestrictionModeOffs0e7( void );
20 static void ZAPL_RestrictionModeOffs0e13( void );
21 static void ZAPL_RestrictionModeOffs0e15( void );
22 static void ZAPL_RestrictionModeOffs0e18( void );
23 static void ZAPL_RestrictionModeOffs1e0( void );
24 static void ZAPL_RestrictionModeOffs1e8( void );
25 static void ZAPL_RestrictionModeOffs2e3( void );
26 static void ZAPL_RestrictionModeOffs3e2( void );
27 static void ZAPL_RestrictionModeOffs4e3( void );
28 static void ZAPL_RestrictionModeOffs5e3( void );
29 static void ZAPL_RestrictionModeOffs6e6( void );
30 static void ZAPL_RestrictionModeOffs7e7( void );
31 static void ZAPL_RestrictionModeOns0e1( void );
32 static void ZAPL_RestrictionModeOns0e2( void );
33 static void ZAPL_RestrictionModeOns1e0( void );
34 static void ZAPL_RestrictionModeOns1e3( void );
35 static void ZAPL_AppsLayers0Event( void );
36 static void ZAPL_RestrictionModeOffs0Event( void );
37 static void ZAPL_RestrictionModeOffs1Event( void );
38 static void ZAPL_RestrictionModeOffs2Event( void );
39 static void ZAPL_RestrictionModeOffs3Event( void );
40 static void ZAPL_RestrictionModeOffs4Event( void );
41 static void ZAPL_RestrictionModeOffs5Event( void );
42 static void ZAPL_RestrictionModeOffs6Event( void );
43 static void ZAPL_RestrictionModeOffs7Event( void );
44 static void ZAPL_AppsLayers1Event( void );
45 static void ZAPL_RestrictionModeOns0Event( void );
46 static void ZAPL_RestrictionModeOns1Event( void );
47
48 /****************************************/
49 /* State start activity function        */
50 /*   STM : AppsLayer                    */
51 /*   State : restriction_mode_off( No 0 ) */
52 /****************************************/
53 static void ZAPL_AppsLayers0StateEntry( void )
54 {
55     switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] )
56     {
57     case ZAPL_RESTRICTIONMODEOFFS0:
58         stm_apl_start_activity_none();
59         break;
60     case ZAPL_RESTRICTIONMODEOFFS1:
61         stm_apl_start_activity_map();
62         break;
63     case ZAPL_RESTRICTIONMODEOFFS2:
64         stm_apl_start_activity_map_split();
65         break;
66     case ZAPL_RESTRICTIONMODEOFFS3:
67         stm_apl_start_activity_map_fullscreen();
68         break;
69     case ZAPL_RESTRICTIONMODEOFFS4:
70         stm_apl_start_activity_splitable_normal();
71         break;
72     case ZAPL_RESTRICTIONMODEOFFS5:
73         stm_apl_start_activity_splitable_split();
74         break;
75     case ZAPL_RESTRICTIONMODEOFFS6:
76         stm_apl_start_activity_general();
77         break;
78     case ZAPL_RESTRICTIONMODEOFFS7:
79         stm_apl_start_activity_system();
80         break;
81     default:
82         /*Not accessible to this else (default).*/
83         break;
84     }
85 }
86
87 /****************************************/
88 /* State start activity function        */
89 /*   STM : AppsLayer                    */
90 /*   State : restriction_mode_2_on( No 1 ) */
91 /****************************************/
92 static void ZAPL_AppsLayers1StateEntry( void )
93 {
94     switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] )
95     {
96     case ZAPL_RESTRICTIONMODEONS0:
97         stm_apl_start_activity_map();
98         break;
99     case ZAPL_RESTRICTIONMODEONS1:
100         stm_apl_start_activity_map_fullscreen();
101         break;
102     default:
103         /*Not accessible to this else (default).*/
104         break;
105     }
106 }
107
108 /****************************************/
109 /* Action function                      */
110 /*   STM : AppsLayer                    */
111 /*   State : restriction_mode_off( No 0 ) */
112 /*   Event : stt_prv_layer_apps_not_sys_nml( No 1 ) */
113 /****************************************/
114 static void ZAPL_AppsLayers0e1( void )
115 {
116     ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERS1;
117     ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] = ( uint8_t )ZAPL_RESTRICTIONMODEONS0;
118     ZAPL_AppsLayers1StateEntry();
119 }
120
121 /****************************************/
122 /* Action function                      */
123 /*   STM : AppsLayer                    */
124 /*   State : restriction_mode_2_on( No 1 ) */
125 /*   Event : stt_restriction_mode_off( No 0 ) */
126 /****************************************/
127 static void ZAPL_AppsLayers1e0( void )
128 {
129     ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERS0;
130     ZAPL_AppsLayers0StateEntry();
131 }
132
133 /****************************************/
134 /* Action function                      */
135 /*   STM : RestrictionModeOff           */
136 /*   State : none( No 0 )               */
137 /*   Event : ara_normal( No 0 )         */
138 /****************************************/
139 static void ZAPL_RestrictionModeOffs0e0( void )
140 {
141     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS1;
142     stm_apl_start_activity_map();
143 }
144
145 /****************************************/
146 /* Action function                      */
147 /*   STM : RestrictionModeOff           */
148 /*   State : none( No 0 )               */
149 /*   Event : ara_fullscreen( No 2 )     */
150 /****************************************/
151 static void ZAPL_RestrictionModeOffs0e2( void )
152 {
153     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS3;
154     stm_apl_start_activity_map_fullscreen();
155 }
156
157 /****************************************/
158 /* Action function                      */
159 /*   STM : RestrictionModeOff           */
160 /*   State : none( No 0 )               */
161 /*   Event : ara_normal( No 3 )         */
162 /****************************************/
163 static void ZAPL_RestrictionModeOffs0e3( void )
164 {
165     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS4;
166     stm_apl_start_activity_splitable_normal();
167 }
168
169 /****************************************/
170 /* Action function                      */
171 /*   STM : RestrictionModeOff           */
172 /*   State : none( No 0 )               */
173 /*   Event : ara_normal( No 6 )         */
174 /****************************************/
175 static void ZAPL_RestrictionModeOffs0e6( void )
176 {
177     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS6;
178     stm_apl_start_activity_general();
179 }
180
181 /****************************************/
182 /* Action function                      */
183 /*   STM : RestrictionModeOff           */
184 /*   State : none( No 0 )               */
185 /*   Event : ara_normal( No 7 )         */
186 /****************************************/
187 static void ZAPL_RestrictionModeOffs0e7( void )
188 {
189     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS7;
190     stm_apl_start_activity_system();
191 }
192
193 /****************************************/
194 /* Action function                      */
195 /*   STM : RestrictionModeOff           */
196 /*   State : none( No 0 )               */
197 /*   Event : stt_prv_layer_apps_none( No 13 ) */
198 /****************************************/
199 static void ZAPL_RestrictionModeOffs0e13( void )
200 {
201     stm_apl_start_activity_none();
202 }
203
204 /****************************************/
205 /* Action function                      */
206 /*   STM : RestrictionModeOff           */
207 /*   State : none( No 0 )               */
208 /*   Event : stt_prv_layer_apps_map_spl( No 15 ) */
209 /****************************************/
210 static void ZAPL_RestrictionModeOffs0e15( void )
211 {
212     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS2;
213     stm_apl_start_activity_map_split();
214 }
215
216 /****************************************/
217 /* Action function                      */
218 /*   STM : RestrictionModeOff           */
219 /*   State : none( No 0 )               */
220 /*   Event : stt_prv_layer_apps_spl_spl( No 18 ) */
221 /****************************************/
222 static void ZAPL_RestrictionModeOffs0e18( void )
223 {
224     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS5;
225     stm_apl_start_activity_splitable_split();
226 }
227
228 /****************************************/
229 /* Action function                      */
230 /*   STM : RestrictionModeOff           */
231 /*   State : map( No 1 )                */
232 /*   Event : ara_normal( No 0 )         */
233 /****************************************/
234 static void ZAPL_RestrictionModeOffs1e0( void )
235 {
236     stm_apl_start_activity_map();
237 }
238
239 /****************************************/
240 /* Action function                      */
241 /*   STM : RestrictionModeOff           */
242 /*   State : map( No 1 )                */
243 /*   Event : ara_fullscreen( No 8 )     */
244 /****************************************/
245 static void ZAPL_RestrictionModeOffs1e8( void )
246 {
247     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS0;
248     stm_apl_start_activity_none();
249 }
250
251 /****************************************/
252 /* Action function                      */
253 /*   STM : RestrictionModeOff           */
254 /*   State : map_split( No 2 )          */
255 /*   Event : ara_normal( No 3 )         */
256 /****************************************/
257 static void ZAPL_RestrictionModeOffs2e3( void )
258 {
259     stm_apl_start_activity_map_split();
260 }
261
262 /****************************************/
263 /* Action function                      */
264 /*   STM : RestrictionModeOff           */
265 /*   State : map_fullscreen( No 3 )     */
266 /*   Event : ara_fullscreen( No 2 )     */
267 /****************************************/
268 static void ZAPL_RestrictionModeOffs3e2( void )
269 {
270     stm_apl_start_activity_map_fullscreen();
271 }
272
273 /****************************************/
274 /* Action function                      */
275 /*   STM : RestrictionModeOff           */
276 /*   State : splitable_normal( No 4 )   */
277 /*   Event : ara_normal( No 3 )         */
278 /****************************************/
279 static void ZAPL_RestrictionModeOffs4e3( void )
280 {
281     stm_apl_start_activity_splitable_normal();
282 }
283
284 /****************************************/
285 /* Action function                      */
286 /*   STM : RestrictionModeOff           */
287 /*   State : splitable_split( No 5 )    */
288 /*   Event : ara_normal( No 3 )         */
289 /****************************************/
290 static void ZAPL_RestrictionModeOffs5e3( void )
291 {
292     stm_apl_start_activity_splitable_split();
293 }
294
295 /****************************************/
296 /* Action function                      */
297 /*   STM : RestrictionModeOff           */
298 /*   State : general( No 6 )            */
299 /*   Event : ara_normal( No 6 )         */
300 /****************************************/
301 static void ZAPL_RestrictionModeOffs6e6( void )
302 {
303     stm_apl_start_activity_general();
304 }
305
306 /****************************************/
307 /* Action function                      */
308 /*   STM : RestrictionModeOff           */
309 /*   State : system( No 7 )             */
310 /*   Event : ara_normal( No 7 )         */
311 /****************************************/
312 static void ZAPL_RestrictionModeOffs7e7( void )
313 {
314     stm_apl_start_activity_system();
315 }
316
317 /****************************************/
318 /* Action function                      */
319 /*   STM : RestrictionModeOn            */
320 /*   State : map( No 0 )                */
321 /*   Event : ara_fullscreen( No 1 )     */
322 /****************************************/
323 static void ZAPL_RestrictionModeOns0e1( void )
324 {
325     ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] = ( uint8_t )ZAPL_RESTRICTIONMODEONS1;
326     stm_apl_start_activity_map_fullscreen();
327 }
328
329 /****************************************/
330 /* Action function                      */
331 /*   STM : RestrictionModeOn            */
332 /*   State : map( No 0 )                */
333 /*   Event : stt_prv_layer_apps_map_nml( No 2 ) */
334 /****************************************/
335 static void ZAPL_RestrictionModeOns0e2( void )
336 {
337     stm_apl_start_activity_map();
338 }
339
340 /****************************************/
341 /* Action function                      */
342 /*   STM : RestrictionModeOn            */
343 /*   State : map_fullscreen( No 1 )     */
344 /*   Event : ara_normal( No 0 )         */
345 /****************************************/
346 static void ZAPL_RestrictionModeOns1e0( void )
347 {
348     ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] = ( uint8_t )ZAPL_RESTRICTIONMODEONS0;
349     stm_apl_start_activity_map();
350 }
351
352 /****************************************/
353 /* Action function                      */
354 /*   STM : RestrictionModeOn            */
355 /*   State : map_fullscreen( No 1 )     */
356 /*   Event : stt_prv_layer_apps_map_fll( No 3 ) */
357 /****************************************/
358 static void ZAPL_RestrictionModeOns1e3( void )
359 {
360     stm_apl_start_activity_map_fullscreen();
361 }
362
363 /****************************************/
364 /* Event appraisal function             */
365 /*   STM : AppsLayer                    */
366 /*   State : restriction_mode_off( No 0 ) */
367 /****************************************/
368 static void ZAPL_AppsLayers0Event( void )
369 {
370     /*stt_restriction_mode_2_on*/
371     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On )
372     {
373         stm_apl_event_restriction_mode_2_on();
374         /*stt_map_is_activated*/
375         if( g_stm_map_is_activated == STM_TRUE )
376         {
377             /*stt_prv_layer_apps_not_sys_nml*/
378             if( g_stm_prv_state.layer[StmLayerNoApps].state != StmLayoutNoSysNml )
379             {
380                 ZAPL_AppsLayers0e1();
381             }
382             else
383             {
384                 /*Else and default design have not done.*/
385                 /*Please confirm the STM and design else and default.*/
386             }
387         }
388         else
389         {
390             /*Else and default design have not done.*/
391             /*Please confirm the STM and design else and default.*/
392         }
393     }
394     else
395     {
396         /*Else and default design have not done.*/
397         /*Please confirm the STM and design else and default.*/
398     }
399 }
400
401 /****************************************/
402 /* Event appraisal function             */
403 /*   STM : RestrictionModeOff           */
404 /*   State : none( No 0 )               */
405 /****************************************/
406 static void ZAPL_RestrictionModeOffs0Event( void )
407 {
408     /*stt_restriction_mode_off*/
409     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
410     {
411         /*evt_activate*/
412         if( g_stm_event == StmEvtNoActivate )
413         {
414             /*ctg_map*/
415             if( g_stm_category == StmCtgNoMap )
416             {
417                 /*ara_normal*/
418                 if( g_stm_area == StmAreaNoNormal )
419                 {
420                     ZAPL_RestrictionModeOffs0e0();
421                 }
422                 /*ara_fullscreen*/
423                 else if( g_stm_area == StmAreaNoFullscreen )
424                 {
425                     ZAPL_RestrictionModeOffs0e2();
426                 }
427                 else
428                 {
429                     /*Else and default design have not done.*/
430                     /*Please confirm the STM and design else and default.*/
431                 }
432             }
433             /*ctg_splitable*/
434             else if( g_stm_category == StmCtgNoSplitable )
435             {
436                 /*ara_normal*/
437                 if( g_stm_area == StmAreaNoNormal )
438                 {
439                     ZAPL_RestrictionModeOffs0e3();
440                 }
441                 else
442                 {
443                     /*Else and default design have not done.*/
444                     /*Please confirm the STM and design else and default.*/
445                 }
446             }
447             /*ctg_general*/
448             else if( g_stm_category == StmCtgNoGeneral )
449             {
450                 /*ara_normal*/
451                 if( g_stm_area == StmAreaNoNormal )
452                 {
453                     ZAPL_RestrictionModeOffs0e6();
454                 }
455                 else
456                 {
457                     /*Else and default design have not done.*/
458                     /*Please confirm the STM and design else and default.*/
459                 }
460             }
461             /*ctg_system*/
462             else if( g_stm_category == StmCtgNoSystem )
463             {
464                 /*ara_normal*/
465                 if( g_stm_area == StmAreaNoNormal )
466                 {
467                     ZAPL_RestrictionModeOffs0e7();
468                 }
469                 else
470                 {
471                     /*Else and default design have not done.*/
472                     /*Please confirm the STM and design else and default.*/
473                 }
474             }
475             else
476             {
477                 /*Else and default design have not done.*/
478                 /*Please confirm the STM and design else and default.*/
479             }
480         }
481         /*evt_undo*/
482         else if( g_stm_event == StmEvtNoUndo )
483         {
484             /*stt_prv_layer_apps_none*/
485             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
486             {
487                 ZAPL_RestrictionModeOffs0e13();
488             }
489             /*stt_prv_layer_apps_map_nml*/
490             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
491             {
492                 ZAPL_RestrictionModeOffs0e0();
493             }
494             /*stt_prv_layer_apps_map_spl*/
495             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
496             {
497                 ZAPL_RestrictionModeOffs0e15();
498             }
499             /*stt_prv_layer_apps_map_fll*/
500             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
501             {
502                 ZAPL_RestrictionModeOffs0e2();
503             }
504             /*stt_prv_layer_apps_spl_nml*/
505             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
506             {
507                 ZAPL_RestrictionModeOffs0e3();
508             }
509             /*stt_prv_layer_apps_spl_spl*/
510             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
511             {
512                 ZAPL_RestrictionModeOffs0e18();
513             }
514             /*stt_prv_layer_apps_gen_nml*/
515             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
516             {
517                 ZAPL_RestrictionModeOffs0e6();
518             }
519             /*stt_prv_layer_apps_sys_nml*/
520             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
521             {
522                 ZAPL_RestrictionModeOffs0e7();
523             }
524             else
525             {
526                 /*Else and default design have not done.*/
527                 /*Please confirm the STM and design else and default.*/
528             }
529         }
530         else
531         {
532             /*Else and default design have not done.*/
533             /*Please confirm the STM and design else and default.*/
534         }
535     }
536     else
537     {
538         /*Else and default design have not done.*/
539         /*Please confirm the STM and design else and default.*/
540     }
541 }
542
543 /****************************************/
544 /* Event appraisal function             */
545 /*   STM : RestrictionModeOff           */
546 /*   State : map( No 1 )                */
547 /****************************************/
548 static void ZAPL_RestrictionModeOffs1Event( void )
549 {
550     /*stt_restriction_mode_off*/
551     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
552     {
553         /*evt_activate*/
554         if( g_stm_event == StmEvtNoActivate )
555         {
556             /*ctg_map*/
557             if( g_stm_category == StmCtgNoMap )
558             {
559                 /*ara_normal*/
560                 if( g_stm_area == StmAreaNoNormal )
561                 {
562                     ZAPL_RestrictionModeOffs1e0();
563                 }
564                 /*ara_fullscreen*/
565                 else if( g_stm_area == StmAreaNoFullscreen )
566                 {
567                     ZAPL_RestrictionModeOffs0e2();
568                 }
569                 else
570                 {
571                     /*Else and default design have not done.*/
572                     /*Please confirm the STM and design else and default.*/
573                 }
574             }
575             /*ctg_splitable*/
576             else if( g_stm_category == StmCtgNoSplitable )
577             {
578                 /*ara_normal*/
579                 if( g_stm_area == StmAreaNoNormal )
580                 {
581                     ZAPL_RestrictionModeOffs0e15();
582                 }
583                 /*ara_split_sub*/
584                 else if( g_stm_area == StmAreaNoSplitSub )
585                 {
586                     ZAPL_RestrictionModeOffs0e15();
587                 }
588                 else
589                 {
590                     /*Else and default design have not done.*/
591                     /*Please confirm the STM and design else and default.*/
592                 }
593             }
594             /*ctg_general*/
595             else if( g_stm_category == StmCtgNoGeneral )
596             {
597                 /*ara_normal*/
598                 if( g_stm_area == StmAreaNoNormal )
599                 {
600                     ZAPL_RestrictionModeOffs0e6();
601                 }
602                 else
603                 {
604                     /*Else and default design have not done.*/
605                     /*Please confirm the STM and design else and default.*/
606                 }
607             }
608             /*ctg_system*/
609             else if( g_stm_category == StmCtgNoSystem )
610             {
611                 /*ara_normal*/
612                 if( g_stm_area == StmAreaNoNormal )
613                 {
614                     ZAPL_RestrictionModeOffs0e7();
615                 }
616                 else
617                 {
618                     /*Else and default design have not done.*/
619                     /*Please confirm the STM and design else and default.*/
620                 }
621             }
622             /*ctg_homescreen*/
623             else if( g_stm_category == StmCtgNoHomescreen )
624             {
625                 /*ara_fullscreen*/
626                 if( g_stm_area == StmAreaNoFullscreen )
627                 {
628                     ZAPL_RestrictionModeOffs1e8();
629                 }
630                 else
631                 {
632                     /*Else and default design have not done.*/
633                     /*Please confirm the STM and design else and default.*/
634                 }
635             }
636             else
637             {
638                 /*Else and default design have not done.*/
639                 /*Please confirm the STM and design else and default.*/
640             }
641         }
642         /*evt_deactivate*/
643         else if( g_stm_event == StmEvtNoDeactivate )
644         {
645             /*ctg_map*/
646             if( g_stm_category == StmCtgNoMap )
647             {
648                 ZAPL_RestrictionModeOffs1e8();
649             }
650             else
651             {
652                 /*Else and default design have not done.*/
653                 /*Please confirm the STM and design else and default.*/
654             }
655         }
656         /*evt_undo*/
657         else if( g_stm_event == StmEvtNoUndo )
658         {
659             /*stt_prv_layer_apps_none*/
660             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
661             {
662                 ZAPL_RestrictionModeOffs1e8();
663             }
664             /*stt_prv_layer_apps_map_nml*/
665             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
666             {
667                 ZAPL_RestrictionModeOffs1e0();
668             }
669             /*stt_prv_layer_apps_map_spl*/
670             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
671             {
672                 ZAPL_RestrictionModeOffs0e15();
673             }
674             /*stt_prv_layer_apps_map_fll*/
675             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
676             {
677                 ZAPL_RestrictionModeOffs0e2();
678             }
679             /*stt_prv_layer_apps_spl_nml*/
680             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
681             {
682                 ZAPL_RestrictionModeOffs0e3();
683             }
684             /*stt_prv_layer_apps_spl_spl*/
685             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
686             {
687                 ZAPL_RestrictionModeOffs0e18();
688             }
689             /*stt_prv_layer_apps_gen_nml*/
690             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
691             {
692                 ZAPL_RestrictionModeOffs0e6();
693             }
694             /*stt_prv_layer_apps_sys_nml*/
695             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
696             {
697                 ZAPL_RestrictionModeOffs0e7();
698             }
699             else
700             {
701                 /*Else and default design have not done.*/
702                 /*Please confirm the STM and design else and default.*/
703             }
704         }
705         else
706         {
707             /*Else and default design have not done.*/
708             /*Please confirm the STM and design else and default.*/
709         }
710     }
711     else
712     {
713         /*Else and default design have not done.*/
714         /*Please confirm the STM and design else and default.*/
715     }
716 }
717
718 /****************************************/
719 /* Event appraisal function             */
720 /*   STM : RestrictionModeOff           */
721 /*   State : map_split( No 2 )          */
722 /****************************************/
723 static void ZAPL_RestrictionModeOffs2Event( void )
724 {
725     /*stt_restriction_mode_off*/
726     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
727     {
728         /*evt_activate*/
729         if( g_stm_event == StmEvtNoActivate )
730         {
731             /*ctg_map*/
732             if( g_stm_category == StmCtgNoMap )
733             {
734                 /*ara_normal*/
735                 if( g_stm_area == StmAreaNoNormal )
736                 {
737                     ZAPL_RestrictionModeOffs0e0();
738                 }
739                 /*ara_fullscreen*/
740                 else if( g_stm_area == StmAreaNoFullscreen )
741                 {
742                     ZAPL_RestrictionModeOffs0e2();
743                 }
744                 else
745                 {
746                     /*Else and default design have not done.*/
747                     /*Please confirm the STM and design else and default.*/
748                 }
749             }
750             /*ctg_splitable*/
751             else if( g_stm_category == StmCtgNoSplitable )
752             {
753                 /*ara_normal*/
754                 if( g_stm_area == StmAreaNoNormal )
755                 {
756                     ZAPL_RestrictionModeOffs2e3();
757                 }
758                 /*ara_split_sub*/
759                 else if( g_stm_area == StmAreaNoSplitSub )
760                 {
761                     ZAPL_RestrictionModeOffs2e3();
762                 }
763                 else
764                 {
765                     /*Else and default design have not done.*/
766                     /*Please confirm the STM and design else and default.*/
767                 }
768             }
769             /*ctg_general*/
770             else if( g_stm_category == StmCtgNoGeneral )
771             {
772                 /*ara_normal*/
773                 if( g_stm_area == StmAreaNoNormal )
774                 {
775                     ZAPL_RestrictionModeOffs0e6();
776                 }
777                 else
778                 {
779                     /*Else and default design have not done.*/
780                     /*Please confirm the STM and design else and default.*/
781                 }
782             }
783             /*ctg_system*/
784             else if( g_stm_category == StmCtgNoSystem )
785             {
786                 /*ara_normal*/
787                 if( g_stm_area == StmAreaNoNormal )
788                 {
789                     ZAPL_RestrictionModeOffs0e7();
790                 }
791                 else
792                 {
793                     /*Else and default design have not done.*/
794                     /*Please confirm the STM and design else and default.*/
795                 }
796             }
797             /*ctg_homescreen*/
798             else if( g_stm_category == StmCtgNoHomescreen )
799             {
800                 /*ara_fullscreen*/
801                 if( g_stm_area == StmAreaNoFullscreen )
802                 {
803                     ZAPL_RestrictionModeOffs1e8();
804                 }
805                 else
806                 {
807                     /*Else and default design have not done.*/
808                     /*Please confirm the STM and design else and default.*/
809                 }
810             }
811             else
812             {
813                 /*Else and default design have not done.*/
814                 /*Please confirm the STM and design else and default.*/
815             }
816         }
817         /*evt_deactivate*/
818         else if( g_stm_event == StmEvtNoDeactivate )
819         {
820             /*ctg_map*/
821             if( g_stm_category == StmCtgNoMap )
822             {
823                 ZAPL_RestrictionModeOffs0e3();
824             }
825             else
826             {
827                 /*Else and default design have not done.*/
828                 /*Please confirm the STM and design else and default.*/
829             }
830         }
831         /*evt_undo*/
832         else if( g_stm_event == StmEvtNoUndo )
833         {
834             /*stt_prv_layer_apps_none*/
835             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
836             {
837                 ZAPL_RestrictionModeOffs1e8();
838             }
839             /*stt_prv_layer_apps_map_nml*/
840             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
841             {
842                 ZAPL_RestrictionModeOffs0e0();
843             }
844             /*stt_prv_layer_apps_map_spl*/
845             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
846             {
847                 ZAPL_RestrictionModeOffs2e3();
848             }
849             /*stt_prv_layer_apps_map_fll*/
850             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
851             {
852                 ZAPL_RestrictionModeOffs0e2();
853             }
854             /*stt_prv_layer_apps_spl_nml*/
855             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
856             {
857                 ZAPL_RestrictionModeOffs0e3();
858             }
859             /*stt_prv_layer_apps_spl_spl*/
860             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
861             {
862                 ZAPL_RestrictionModeOffs0e18();
863             }
864             /*stt_prv_layer_apps_gen_nml*/
865             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
866             {
867                 ZAPL_RestrictionModeOffs0e6();
868             }
869             /*stt_prv_layer_apps_sys_nml*/
870             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
871             {
872                 ZAPL_RestrictionModeOffs0e7();
873             }
874             else
875             {
876                 /*Else and default design have not done.*/
877                 /*Please confirm the STM and design else and default.*/
878             }
879         }
880         else
881         {
882             /*Else and default design have not done.*/
883             /*Please confirm the STM and design else and default.*/
884         }
885     }
886     else
887     {
888         /*Else and default design have not done.*/
889         /*Please confirm the STM and design else and default.*/
890     }
891 }
892
893 /****************************************/
894 /* Event appraisal function             */
895 /*   STM : RestrictionModeOff           */
896 /*   State : map_fullscreen( No 3 )     */
897 /****************************************/
898 static void ZAPL_RestrictionModeOffs3Event( void )
899 {
900     /*stt_restriction_mode_off*/
901     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
902     {
903         /*evt_activate*/
904         if( g_stm_event == StmEvtNoActivate )
905         {
906             /*ctg_map*/
907             if( g_stm_category == StmCtgNoMap )
908             {
909                 /*ara_normal*/
910                 if( g_stm_area == StmAreaNoNormal )
911                 {
912                     ZAPL_RestrictionModeOffs0e0();
913                 }
914                 /*ara_fullscreen*/
915                 else if( g_stm_area == StmAreaNoFullscreen )
916                 {
917                     ZAPL_RestrictionModeOffs3e2();
918                 }
919                 else
920                 {
921                     /*Else and default design have not done.*/
922                     /*Please confirm the STM and design else and default.*/
923                 }
924             }
925             /*ctg_splitable*/
926             else if( g_stm_category == StmCtgNoSplitable )
927             {
928                 /*ara_normal*/
929                 if( g_stm_area == StmAreaNoNormal )
930                 {
931                     ZAPL_RestrictionModeOffs0e15();
932                 }
933                 else
934                 {
935                     /*Else and default design have not done.*/
936                     /*Please confirm the STM and design else and default.*/
937                 }
938             }
939             /*ctg_general*/
940             else if( g_stm_category == StmCtgNoGeneral )
941             {
942                 /*ara_normal*/
943                 if( g_stm_area == StmAreaNoNormal )
944                 {
945                     ZAPL_RestrictionModeOffs0e6();
946                 }
947                 else
948                 {
949                     /*Else and default design have not done.*/
950                     /*Please confirm the STM and design else and default.*/
951                 }
952             }
953             /*ctg_system*/
954             else if( g_stm_category == StmCtgNoSystem )
955             {
956                 /*ara_normal*/
957                 if( g_stm_area == StmAreaNoNormal )
958                 {
959                     ZAPL_RestrictionModeOffs0e7();
960                 }
961                 else
962                 {
963                     /*Else and default design have not done.*/
964                     /*Please confirm the STM and design else and default.*/
965                 }
966             }
967             /*ctg_homescreen*/
968             else if( g_stm_category == StmCtgNoHomescreen )
969             {
970                 /*ara_fullscreen*/
971                 if( g_stm_area == StmAreaNoFullscreen )
972                 {
973                     ZAPL_RestrictionModeOffs1e8();
974                 }
975                 else
976                 {
977                     /*Else and default design have not done.*/
978                     /*Please confirm the STM and design else and default.*/
979                 }
980             }
981             else
982             {
983                 /*Else and default design have not done.*/
984                 /*Please confirm the STM and design else and default.*/
985             }
986         }
987         /*evt_deactivate*/
988         else if( g_stm_event == StmEvtNoDeactivate )
989         {
990             /*ctg_map*/
991             if( g_stm_category == StmCtgNoMap )
992             {
993                 ZAPL_RestrictionModeOffs1e8();
994             }
995             else
996             {
997                 /*Else and default design have not done.*/
998                 /*Please confirm the STM and design else and default.*/
999             }
1000         }
1001         /*evt_undo*/
1002         else if( g_stm_event == StmEvtNoUndo )
1003         {
1004             /*stt_prv_layer_apps_none*/
1005             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1006             {
1007                 ZAPL_RestrictionModeOffs1e8();
1008             }
1009             /*stt_prv_layer_apps_map_nml*/
1010             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1011             {
1012                 ZAPL_RestrictionModeOffs0e0();
1013             }
1014             /*stt_prv_layer_apps_map_spl*/
1015             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1016             {
1017                 ZAPL_RestrictionModeOffs0e15();
1018             }
1019             /*stt_prv_layer_apps_map_fll*/
1020             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1021             {
1022                 ZAPL_RestrictionModeOffs3e2();
1023             }
1024             /*stt_prv_layer_apps_spl_nml*/
1025             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1026             {
1027                 ZAPL_RestrictionModeOffs0e3();
1028             }
1029             /*stt_prv_layer_apps_spl_spl*/
1030             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1031             {
1032                 ZAPL_RestrictionModeOffs0e18();
1033             }
1034             /*stt_prv_layer_apps_gen_nml*/
1035             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1036             {
1037                 ZAPL_RestrictionModeOffs0e6();
1038             }
1039             /*stt_prv_layer_apps_sys_nml*/
1040             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1041             {
1042                 ZAPL_RestrictionModeOffs0e7();
1043             }
1044             else
1045             {
1046                 /*Else and default design have not done.*/
1047                 /*Please confirm the STM and design else and default.*/
1048             }
1049         }
1050         else
1051         {
1052             /*Else and default design have not done.*/
1053             /*Please confirm the STM and design else and default.*/
1054         }
1055     }
1056     else
1057     {
1058         /*Else and default design have not done.*/
1059         /*Please confirm the STM and design else and default.*/
1060     }
1061 }
1062
1063 /****************************************/
1064 /* Event appraisal function             */
1065 /*   STM : RestrictionModeOff           */
1066 /*   State : splitable_normal( No 4 )   */
1067 /****************************************/
1068 static void ZAPL_RestrictionModeOffs4Event( void )
1069 {
1070     /*stt_restriction_mode_off*/
1071     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1072     {
1073         /*evt_activate*/
1074         if( g_stm_event == StmEvtNoActivate )
1075         {
1076             /*ctg_map*/
1077             if( g_stm_category == StmCtgNoMap )
1078             {
1079                 /*ara_normal*/
1080                 if( g_stm_area == StmAreaNoNormal )
1081                 {
1082                     ZAPL_RestrictionModeOffs0e15();
1083                 }
1084                 /*ara_split_main*/
1085                 else if( g_stm_area == StmAreaNoSplitMain )
1086                 {
1087                     ZAPL_RestrictionModeOffs0e15();
1088                 }
1089                 /*ara_fullscreen*/
1090                 else if( g_stm_area == StmAreaNoFullscreen )
1091                 {
1092                     ZAPL_RestrictionModeOffs0e2();
1093                 }
1094                 else
1095                 {
1096                     /*Else and default design have not done.*/
1097                     /*Please confirm the STM and design else and default.*/
1098                 }
1099             }
1100             /*ctg_splitable*/
1101             else if( g_stm_category == StmCtgNoSplitable )
1102             {
1103                 /*ara_normal*/
1104                 if( g_stm_area == StmAreaNoNormal )
1105                 {
1106                     ZAPL_RestrictionModeOffs4e3();
1107                 }
1108                 /*ara_split_main*/
1109                 else if( g_stm_area == StmAreaNoSplitMain )
1110                 {
1111                     ZAPL_RestrictionModeOffs0e18();
1112                 }
1113                 /*ara_split_sub*/
1114                 else if( g_stm_area == StmAreaNoSplitSub )
1115                 {
1116                     ZAPL_RestrictionModeOffs0e18();
1117                 }
1118                 else
1119                 {
1120                     /*Else and default design have not done.*/
1121                     /*Please confirm the STM and design else and default.*/
1122                 }
1123             }
1124             /*ctg_general*/
1125             else if( g_stm_category == StmCtgNoGeneral )
1126             {
1127                 /*ara_normal*/
1128                 if( g_stm_area == StmAreaNoNormal )
1129                 {
1130                     ZAPL_RestrictionModeOffs0e6();
1131                 }
1132                 else
1133                 {
1134                     /*Else and default design have not done.*/
1135                     /*Please confirm the STM and design else and default.*/
1136                 }
1137             }
1138             /*ctg_system*/
1139             else if( g_stm_category == StmCtgNoSystem )
1140             {
1141                 /*ara_normal*/
1142                 if( g_stm_area == StmAreaNoNormal )
1143                 {
1144                     ZAPL_RestrictionModeOffs0e7();
1145                 }
1146                 else
1147                 {
1148                     /*Else and default design have not done.*/
1149                     /*Please confirm the STM and design else and default.*/
1150                 }
1151             }
1152             /*ctg_homescreen*/
1153             else if( g_stm_category == StmCtgNoHomescreen )
1154             {
1155                 /*ara_fullscreen*/
1156                 if( g_stm_area == StmAreaNoFullscreen )
1157                 {
1158                     ZAPL_RestrictionModeOffs1e8();
1159                 }
1160                 else
1161                 {
1162                     /*Else and default design have not done.*/
1163                     /*Please confirm the STM and design else and default.*/
1164                 }
1165             }
1166             else
1167             {
1168                 /*Else and default design have not done.*/
1169                 /*Please confirm the STM and design else and default.*/
1170             }
1171         }
1172         /*evt_deactivate*/
1173         else if( g_stm_event == StmEvtNoDeactivate )
1174         {
1175             /*ctg_splitable*/
1176             if( g_stm_category == StmCtgNoSplitable )
1177             {
1178                 ZAPL_RestrictionModeOffs1e8();
1179             }
1180             else
1181             {
1182                 /*Else and default design have not done.*/
1183                 /*Please confirm the STM and design else and default.*/
1184             }
1185         }
1186         /*evt_undo*/
1187         else if( g_stm_event == StmEvtNoUndo )
1188         {
1189             /*stt_prv_layer_apps_none*/
1190             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1191             {
1192                 ZAPL_RestrictionModeOffs1e8();
1193             }
1194             /*stt_prv_layer_apps_map_nml*/
1195             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1196             {
1197                 ZAPL_RestrictionModeOffs0e0();
1198             }
1199             /*stt_prv_layer_apps_map_spl*/
1200             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1201             {
1202                 ZAPL_RestrictionModeOffs0e15();
1203             }
1204             /*stt_prv_layer_apps_map_fll*/
1205             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1206             {
1207                 ZAPL_RestrictionModeOffs0e2();
1208             }
1209             /*stt_prv_layer_apps_spl_nml*/
1210             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1211             {
1212                 ZAPL_RestrictionModeOffs4e3();
1213             }
1214             /*stt_prv_layer_apps_spl_spl*/
1215             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1216             {
1217                 ZAPL_RestrictionModeOffs0e18();
1218             }
1219             /*stt_prv_layer_apps_gen_nml*/
1220             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1221             {
1222                 ZAPL_RestrictionModeOffs0e6();
1223             }
1224             /*stt_prv_layer_apps_sys_nml*/
1225             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1226             {
1227                 ZAPL_RestrictionModeOffs0e7();
1228             }
1229             else
1230             {
1231                 /*Else and default design have not done.*/
1232                 /*Please confirm the STM and design else and default.*/
1233             }
1234         }
1235         else
1236         {
1237             /*Else and default design have not done.*/
1238             /*Please confirm the STM and design else and default.*/
1239         }
1240     }
1241     else
1242     {
1243         /*Else and default design have not done.*/
1244         /*Please confirm the STM and design else and default.*/
1245     }
1246 }
1247
1248 /****************************************/
1249 /* Event appraisal function             */
1250 /*   STM : RestrictionModeOff           */
1251 /*   State : splitable_split( No 5 )    */
1252 /****************************************/
1253 static void ZAPL_RestrictionModeOffs5Event( void )
1254 {
1255     /*stt_restriction_mode_off*/
1256     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1257     {
1258         /*evt_activate*/
1259         if( g_stm_event == StmEvtNoActivate )
1260         {
1261             /*ctg_map*/
1262             if( g_stm_category == StmCtgNoMap )
1263             {
1264                 /*ara_normal*/
1265                 if( g_stm_area == StmAreaNoNormal )
1266                 {
1267                     ZAPL_RestrictionModeOffs0e15();
1268                 }
1269                 /*ara_split_main*/
1270                 else if( g_stm_area == StmAreaNoSplitMain )
1271                 {
1272                     ZAPL_RestrictionModeOffs0e15();
1273                 }
1274                 /*ara_fullscreen*/
1275                 else if( g_stm_area == StmAreaNoFullscreen )
1276                 {
1277                     ZAPL_RestrictionModeOffs0e2();
1278                 }
1279                 else
1280                 {
1281                     /*Else and default design have not done.*/
1282                     /*Please confirm the STM and design else and default.*/
1283                 }
1284             }
1285             /*ctg_splitable*/
1286             else if( g_stm_category == StmCtgNoSplitable )
1287             {
1288                 /*ara_normal*/
1289                 if( g_stm_area == StmAreaNoNormal )
1290                 {
1291                     ZAPL_RestrictionModeOffs5e3();
1292                 }
1293                 /*ara_split_main*/
1294                 else if( g_stm_area == StmAreaNoSplitMain )
1295                 {
1296                     ZAPL_RestrictionModeOffs5e3();
1297                 }
1298                 /*ara_split_sub*/
1299                 else if( g_stm_area == StmAreaNoSplitSub )
1300                 {
1301                     ZAPL_RestrictionModeOffs5e3();
1302                 }
1303                 else
1304                 {
1305                     /*Else and default design have not done.*/
1306                     /*Please confirm the STM and design else and default.*/
1307                 }
1308             }
1309             /*ctg_general*/
1310             else if( g_stm_category == StmCtgNoGeneral )
1311             {
1312                 /*ara_normal*/
1313                 if( g_stm_area == StmAreaNoNormal )
1314                 {
1315                     ZAPL_RestrictionModeOffs0e6();
1316                 }
1317                 else
1318                 {
1319                     /*Else and default design have not done.*/
1320                     /*Please confirm the STM and design else and default.*/
1321                 }
1322             }
1323             /*ctg_system*/
1324             else if( g_stm_category == StmCtgNoSystem )
1325             {
1326                 /*ara_normal*/
1327                 if( g_stm_area == StmAreaNoNormal )
1328                 {
1329                     ZAPL_RestrictionModeOffs0e7();
1330                 }
1331                 else
1332                 {
1333                     /*Else and default design have not done.*/
1334                     /*Please confirm the STM and design else and default.*/
1335                 }
1336             }
1337             /*ctg_homescreen*/
1338             else if( g_stm_category == StmCtgNoHomescreen )
1339             {
1340                 /*ara_fullscreen*/
1341                 if( g_stm_area == StmAreaNoFullscreen )
1342                 {
1343                     ZAPL_RestrictionModeOffs1e8();
1344                 }
1345                 else
1346                 {
1347                     /*Else and default design have not done.*/
1348                     /*Please confirm the STM and design else and default.*/
1349                 }
1350             }
1351             else
1352             {
1353                 /*Else and default design have not done.*/
1354                 /*Please confirm the STM and design else and default.*/
1355             }
1356         }
1357         /*evt_deactivate*/
1358         else if( g_stm_event == StmEvtNoDeactivate )
1359         {
1360             /*ctg_splitable*/
1361             if( g_stm_category == StmCtgNoSplitable )
1362             {
1363                 ZAPL_RestrictionModeOffs0e3();
1364             }
1365             else
1366             {
1367                 /*Else and default design have not done.*/
1368                 /*Please confirm the STM and design else and default.*/
1369             }
1370         }
1371         /*evt_undo*/
1372         else if( g_stm_event == StmEvtNoUndo )
1373         {
1374             /*stt_prv_layer_apps_none*/
1375             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1376             {
1377                 ZAPL_RestrictionModeOffs1e8();
1378             }
1379             /*stt_prv_layer_apps_map_nml*/
1380             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1381             {
1382                 ZAPL_RestrictionModeOffs0e0();
1383             }
1384             /*stt_prv_layer_apps_map_spl*/
1385             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1386             {
1387                 ZAPL_RestrictionModeOffs0e15();
1388             }
1389             /*stt_prv_layer_apps_map_fll*/
1390             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1391             {
1392                 ZAPL_RestrictionModeOffs0e2();
1393             }
1394             /*stt_prv_layer_apps_spl_nml*/
1395             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1396             {
1397                 ZAPL_RestrictionModeOffs0e3();
1398             }
1399             /*stt_prv_layer_apps_spl_spl*/
1400             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1401             {
1402                 ZAPL_RestrictionModeOffs5e3();
1403             }
1404             /*stt_prv_layer_apps_gen_nml*/
1405             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1406             {
1407                 ZAPL_RestrictionModeOffs0e6();
1408             }
1409             /*stt_prv_layer_apps_sys_nml*/
1410             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1411             {
1412                 ZAPL_RestrictionModeOffs0e7();
1413             }
1414             else
1415             {
1416                 /*Else and default design have not done.*/
1417                 /*Please confirm the STM and design else and default.*/
1418             }
1419         }
1420         else
1421         {
1422             /*Else and default design have not done.*/
1423             /*Please confirm the STM and design else and default.*/
1424         }
1425     }
1426     else
1427     {
1428         /*Else and default design have not done.*/
1429         /*Please confirm the STM and design else and default.*/
1430     }
1431 }
1432
1433 /****************************************/
1434 /* Event appraisal function             */
1435 /*   STM : RestrictionModeOff           */
1436 /*   State : general( No 6 )            */
1437 /****************************************/
1438 static void ZAPL_RestrictionModeOffs6Event( void )
1439 {
1440     /*stt_restriction_mode_off*/
1441     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1442     {
1443         /*evt_activate*/
1444         if( g_stm_event == StmEvtNoActivate )
1445         {
1446             /*ctg_map*/
1447             if( g_stm_category == StmCtgNoMap )
1448             {
1449                 /*ara_normal*/
1450                 if( g_stm_area == StmAreaNoNormal )
1451                 {
1452                     ZAPL_RestrictionModeOffs0e0();
1453                 }
1454                 /*ara_fullscreen*/
1455                 else if( g_stm_area == StmAreaNoFullscreen )
1456                 {
1457                     ZAPL_RestrictionModeOffs0e2();
1458                 }
1459                 else
1460                 {
1461                     /*Else and default design have not done.*/
1462                     /*Please confirm the STM and design else and default.*/
1463                 }
1464             }
1465             /*ctg_splitable*/
1466             else if( g_stm_category == StmCtgNoSplitable )
1467             {
1468                 /*ara_normal*/
1469                 if( g_stm_area == StmAreaNoNormal )
1470                 {
1471                     ZAPL_RestrictionModeOffs0e3();
1472                 }
1473                 else
1474                 {
1475                     /*Else and default design have not done.*/
1476                     /*Please confirm the STM and design else and default.*/
1477                 }
1478             }
1479             /*ctg_general*/
1480             else if( g_stm_category == StmCtgNoGeneral )
1481             {
1482                 /*ara_normal*/
1483                 if( g_stm_area == StmAreaNoNormal )
1484                 {
1485                     ZAPL_RestrictionModeOffs6e6();
1486                 }
1487                 else
1488                 {
1489                     /*Else and default design have not done.*/
1490                     /*Please confirm the STM and design else and default.*/
1491                 }
1492             }
1493             /*ctg_system*/
1494             else if( g_stm_category == StmCtgNoSystem )
1495             {
1496                 /*ara_normal*/
1497                 if( g_stm_area == StmAreaNoNormal )
1498                 {
1499                     ZAPL_RestrictionModeOffs0e7();
1500                 }
1501                 else
1502                 {
1503                     /*Else and default design have not done.*/
1504                     /*Please confirm the STM and design else and default.*/
1505                 }
1506             }
1507             /*ctg_homescreen*/
1508             else if( g_stm_category == StmCtgNoHomescreen )
1509             {
1510                 /*ara_fullscreen*/
1511                 if( g_stm_area == StmAreaNoFullscreen )
1512                 {
1513                     ZAPL_RestrictionModeOffs1e8();
1514                 }
1515                 else
1516                 {
1517                     /*Else and default design have not done.*/
1518                     /*Please confirm the STM and design else and default.*/
1519                 }
1520             }
1521             else
1522             {
1523                 /*Else and default design have not done.*/
1524                 /*Please confirm the STM and design else and default.*/
1525             }
1526         }
1527         /*evt_deactivate*/
1528         else if( g_stm_event == StmEvtNoDeactivate )
1529         {
1530             /*ctg_general*/
1531             if( g_stm_category == StmCtgNoGeneral )
1532             {
1533                 ZAPL_RestrictionModeOffs1e8();
1534             }
1535             else
1536             {
1537                 /*Else and default design have not done.*/
1538                 /*Please confirm the STM and design else and default.*/
1539             }
1540         }
1541         /*evt_undo*/
1542         else if( g_stm_event == StmEvtNoUndo )
1543         {
1544             /*stt_prv_layer_apps_none*/
1545             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1546             {
1547                 ZAPL_RestrictionModeOffs1e8();
1548             }
1549             /*stt_prv_layer_apps_map_nml*/
1550             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1551             {
1552                 ZAPL_RestrictionModeOffs0e0();
1553             }
1554             /*stt_prv_layer_apps_map_spl*/
1555             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1556             {
1557                 ZAPL_RestrictionModeOffs0e15();
1558             }
1559             /*stt_prv_layer_apps_map_fll*/
1560             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1561             {
1562                 ZAPL_RestrictionModeOffs0e2();
1563             }
1564             /*stt_prv_layer_apps_spl_nml*/
1565             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1566             {
1567                 ZAPL_RestrictionModeOffs0e3();
1568             }
1569             /*stt_prv_layer_apps_spl_spl*/
1570             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1571             {
1572                 ZAPL_RestrictionModeOffs0e18();
1573             }
1574             /*stt_prv_layer_apps_gen_nml*/
1575             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1576             {
1577                 ZAPL_RestrictionModeOffs6e6();
1578             }
1579             /*stt_prv_layer_apps_sys_nml*/
1580             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1581             {
1582                 ZAPL_RestrictionModeOffs0e7();
1583             }
1584             else
1585             {
1586                 /*Else and default design have not done.*/
1587                 /*Please confirm the STM and design else and default.*/
1588             }
1589         }
1590         else
1591         {
1592             /*Else and default design have not done.*/
1593             /*Please confirm the STM and design else and default.*/
1594         }
1595     }
1596     else
1597     {
1598         /*Else and default design have not done.*/
1599         /*Please confirm the STM and design else and default.*/
1600     }
1601 }
1602
1603 /****************************************/
1604 /* Event appraisal function             */
1605 /*   STM : RestrictionModeOff           */
1606 /*   State : system( No 7 )             */
1607 /****************************************/
1608 static void ZAPL_RestrictionModeOffs7Event( void )
1609 {
1610     /*stt_restriction_mode_off*/
1611     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1612     {
1613         /*evt_activate*/
1614         if( g_stm_event == StmEvtNoActivate )
1615         {
1616             /*ctg_map*/
1617             if( g_stm_category == StmCtgNoMap )
1618             {
1619                 /*ara_normal*/
1620                 if( g_stm_area == StmAreaNoNormal )
1621                 {
1622                     ZAPL_RestrictionModeOffs0e0();
1623                 }
1624                 /*ara_fullscreen*/
1625                 else if( g_stm_area == StmAreaNoFullscreen )
1626                 {
1627                     ZAPL_RestrictionModeOffs0e2();
1628                 }
1629                 else
1630                 {
1631                     /*Else and default design have not done.*/
1632                     /*Please confirm the STM and design else and default.*/
1633                 }
1634             }
1635             /*ctg_splitable*/
1636             else if( g_stm_category == StmCtgNoSplitable )
1637             {
1638                 /*ara_normal*/
1639                 if( g_stm_area == StmAreaNoNormal )
1640                 {
1641                     ZAPL_RestrictionModeOffs0e3();
1642                 }
1643                 else
1644                 {
1645                     /*Else and default design have not done.*/
1646                     /*Please confirm the STM and design else and default.*/
1647                 }
1648             }
1649             /*ctg_general*/
1650             else if( g_stm_category == StmCtgNoGeneral )
1651             {
1652                 /*ara_normal*/
1653                 if( g_stm_area == StmAreaNoNormal )
1654                 {
1655                     ZAPL_RestrictionModeOffs0e6();
1656                 }
1657                 else
1658                 {
1659                     /*Else and default design have not done.*/
1660                     /*Please confirm the STM and design else and default.*/
1661                 }
1662             }
1663             /*ctg_system*/
1664             else if( g_stm_category == StmCtgNoSystem )
1665             {
1666                 /*ara_normal*/
1667                 if( g_stm_area == StmAreaNoNormal )
1668                 {
1669                     ZAPL_RestrictionModeOffs7e7();
1670                 }
1671                 else
1672                 {
1673                     /*Else and default design have not done.*/
1674                     /*Please confirm the STM and design else and default.*/
1675                 }
1676             }
1677             /*ctg_homescreen*/
1678             else if( g_stm_category == StmCtgNoHomescreen )
1679             {
1680                 /*ara_fullscreen*/
1681                 if( g_stm_area == StmAreaNoFullscreen )
1682                 {
1683                     ZAPL_RestrictionModeOffs1e8();
1684                 }
1685                 else
1686                 {
1687                     /*Else and default design have not done.*/
1688                     /*Please confirm the STM and design else and default.*/
1689                 }
1690             }
1691             else
1692             {
1693                 /*Else and default design have not done.*/
1694                 /*Please confirm the STM and design else and default.*/
1695             }
1696         }
1697         /*evt_deactivate*/
1698         else if( g_stm_event == StmEvtNoDeactivate )
1699         {
1700             /*ctg_system*/
1701             if( g_stm_category == StmCtgNoSystem )
1702             {
1703                 ZAPL_RestrictionModeOffs1e8();
1704             }
1705             else
1706             {
1707                 /*Else and default design have not done.*/
1708                 /*Please confirm the STM and design else and default.*/
1709             }
1710         }
1711         /*evt_undo*/
1712         else if( g_stm_event == StmEvtNoUndo )
1713         {
1714             /*stt_prv_layer_apps_none*/
1715             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1716             {
1717                 ZAPL_RestrictionModeOffs1e8();
1718             }
1719             /*stt_prv_layer_apps_map_nml*/
1720             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1721             {
1722                 ZAPL_RestrictionModeOffs0e0();
1723             }
1724             /*stt_prv_layer_apps_map_spl*/
1725             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1726             {
1727                 ZAPL_RestrictionModeOffs0e15();
1728             }
1729             /*stt_prv_layer_apps_map_fll*/
1730             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1731             {
1732                 ZAPL_RestrictionModeOffs0e2();
1733             }
1734             /*stt_prv_layer_apps_spl_nml*/
1735             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1736             {
1737                 ZAPL_RestrictionModeOffs0e3();
1738             }
1739             /*stt_prv_layer_apps_spl_spl*/
1740             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1741             {
1742                 ZAPL_RestrictionModeOffs0e18();
1743             }
1744             /*stt_prv_layer_apps_gen_nml*/
1745             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1746             {
1747                 ZAPL_RestrictionModeOffs0e6();
1748             }
1749             /*stt_prv_layer_apps_sys_nml*/
1750             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1751             {
1752                 ZAPL_RestrictionModeOffs7e7();
1753             }
1754             else
1755             {
1756                 /*Else and default design have not done.*/
1757                 /*Please confirm the STM and design else and default.*/
1758             }
1759         }
1760         else
1761         {
1762             /*Else and default design have not done.*/
1763             /*Please confirm the STM and design else and default.*/
1764         }
1765     }
1766     else
1767     {
1768         /*Else and default design have not done.*/
1769         /*Please confirm the STM and design else and default.*/
1770     }
1771 }
1772
1773 /****************************************/
1774 /* Event appraisal function             */
1775 /*   STM : AppsLayer                    */
1776 /*   State : restriction_mode_2_on( No 1 ) */
1777 /****************************************/
1778 static void ZAPL_AppsLayers1Event( void )
1779 {
1780     /*stt_restriction_mode_off*/
1781     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1782     {
1783         stm_apl_event_restriction_mode_off();
1784         ZAPL_AppsLayers1e0();
1785     }
1786     else
1787     {
1788         /*Else and default design have not done.*/
1789         /*Please confirm the STM and design else and default.*/
1790     }
1791 }
1792
1793 /****************************************/
1794 /* Event appraisal function             */
1795 /*   STM : RestrictionModeOn            */
1796 /*   State : map( No 0 )                */
1797 /****************************************/
1798 static void ZAPL_RestrictionModeOns0Event( void )
1799 {
1800     /*stt_restriction_mode_2_on*/
1801     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On )
1802     {
1803         /*evt_activate*/
1804         if( g_stm_event == StmEvtNoActivate )
1805         {
1806             /*ctg_map*/
1807             if( g_stm_category == StmCtgNoMap )
1808             {
1809                 /*ara_fullscreen*/
1810                 if( g_stm_area == StmAreaNoFullscreen )
1811                 {
1812                     ZAPL_RestrictionModeOns0e1();
1813                 }
1814                 else
1815                 {
1816                     /*Else and default design have not done.*/
1817                     /*Please confirm the STM and design else and default.*/
1818                 }
1819             }
1820             else
1821             {
1822                 /*Else and default design have not done.*/
1823                 /*Please confirm the STM and design else and default.*/
1824             }
1825         }
1826         /*evt_undo*/
1827         else if( g_stm_event == StmEvtNoUndo )
1828         {
1829             /*stt_prv_layer_apps_map_nml*/
1830             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1831             {
1832                 ZAPL_RestrictionModeOns0e2();
1833             }
1834             /*stt_prv_layer_apps_map_fll*/
1835             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1836             {
1837                 ZAPL_RestrictionModeOns0e1();
1838             }
1839             else
1840             {
1841                 /*Else and default design have not done.*/
1842                 /*Please confirm the STM and design else and default.*/
1843             }
1844         }
1845         else
1846         {
1847             /*Else and default design have not done.*/
1848             /*Please confirm the STM and design else and default.*/
1849         }
1850     }
1851     else
1852     {
1853         /*Else and default design have not done.*/
1854         /*Please confirm the STM and design else and default.*/
1855     }
1856 }
1857
1858 /****************************************/
1859 /* Event appraisal function             */
1860 /*   STM : RestrictionModeOn            */
1861 /*   State : map_fullscreen( No 1 )     */
1862 /****************************************/
1863 static void ZAPL_RestrictionModeOns1Event( void )
1864 {
1865     /*stt_restriction_mode_2_on*/
1866     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On )
1867     {
1868         /*evt_activate*/
1869         if( g_stm_event == StmEvtNoActivate )
1870         {
1871             /*ctg_map*/
1872             if( g_stm_category == StmCtgNoMap )
1873             {
1874                 /*ara_normal*/
1875                 if( g_stm_area == StmAreaNoNormal )
1876                 {
1877                     ZAPL_RestrictionModeOns1e0();
1878                 }
1879                 else
1880                 {
1881                     /*Else and default design have not done.*/
1882                     /*Please confirm the STM and design else and default.*/
1883                 }
1884             }
1885             else
1886             {
1887                 /*Else and default design have not done.*/
1888                 /*Please confirm the STM and design else and default.*/
1889             }
1890         }
1891         /*evt_undo*/
1892         else if( g_stm_event == StmEvtNoUndo )
1893         {
1894             /*stt_prv_layer_apps_map_nml*/
1895             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1896             {
1897                 ZAPL_RestrictionModeOns1e0();
1898             }
1899             /*stt_prv_layer_apps_map_fll*/
1900             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1901             {
1902                 ZAPL_RestrictionModeOns1e3();
1903             }
1904             else
1905             {
1906                 /*Else and default design have not done.*/
1907                 /*Please confirm the STM and design else and default.*/
1908             }
1909         }
1910         else
1911         {
1912             /*Else and default design have not done.*/
1913             /*Please confirm the STM and design else and default.*/
1914         }
1915     }
1916     else
1917     {
1918         /*Else and default design have not done.*/
1919         /*Please confirm the STM and design else and default.*/
1920     }
1921 }
1922
1923 /****************************************/
1924 /* Event call function                  */
1925 /*   STM : AppsLayer                    */
1926 /****************************************/
1927 void stm_apl_event_call( void )
1928 {
1929     stm_apl_start_stm();
1930     switch( ZAPL_AppsLayerState[ZAPL_APPSLAYER] )
1931     {
1932     case ZAPL_APPSLAYERS0:
1933         switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] )
1934         {
1935         case ZAPL_RESTRICTIONMODEOFFS0:
1936             ZAPL_RestrictionModeOffs0Event();
1937             break;
1938         case ZAPL_RESTRICTIONMODEOFFS1:
1939             ZAPL_RestrictionModeOffs1Event();
1940             break;
1941         case ZAPL_RESTRICTIONMODEOFFS2:
1942             ZAPL_RestrictionModeOffs2Event();
1943             break;
1944         case ZAPL_RESTRICTIONMODEOFFS3:
1945             ZAPL_RestrictionModeOffs3Event();
1946             break;
1947         case ZAPL_RESTRICTIONMODEOFFS4:
1948             ZAPL_RestrictionModeOffs4Event();
1949             break;
1950         case ZAPL_RESTRICTIONMODEOFFS5:
1951             ZAPL_RestrictionModeOffs5Event();
1952             break;
1953         case ZAPL_RESTRICTIONMODEOFFS6:
1954             ZAPL_RestrictionModeOffs6Event();
1955             break;
1956         case ZAPL_RESTRICTIONMODEOFFS7:
1957             ZAPL_RestrictionModeOffs7Event();
1958             break;
1959         default:
1960             /*Not accessible to this else (default).*/
1961             break;
1962         }
1963         ZAPL_AppsLayers0Event();
1964         break;
1965     case ZAPL_APPSLAYERS1:
1966         switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] )
1967         {
1968         case ZAPL_RESTRICTIONMODEONS0:
1969             ZAPL_RestrictionModeOns0Event();
1970             break;
1971         case ZAPL_RESTRICTIONMODEONS1:
1972             ZAPL_RestrictionModeOns1Event();
1973             break;
1974         default:
1975             /*Not accessible to this else (default).*/
1976             break;
1977         }
1978         ZAPL_AppsLayers1Event();
1979         break;
1980     default:
1981         /*Not accessible to this else (default).*/
1982         break;
1983     }
1984 }
1985
1986 /****************************************/
1987 /* Initial function                     */
1988 /*   STM : AppsLayer                    */
1989 /****************************************/
1990 void stm_apl_initialize( void )
1991 {
1992     ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERS0;
1993     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS0;
1994     ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] = ( uint8_t )ZAPL_RESTRICTIONMODEONS0;
1995     ZAPL_AppsLayers0StateEntry();
1996 }
1997
1998 /****************************************/
1999 /* Terminate function                   */
2000 /*   STM : AppsLayer                    */
2001 /****************************************/
2002 void ZAPL_AppsLayerTerminate( void )
2003 {
2004     ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERTERMINATE;
2005 }
2006