add source for ces2019
[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_RestrictionModeOffs1e8( void );
24 static void ZAPL_RestrictionModeOffs1e14( void );
25 static void ZAPL_RestrictionModeOffs2e3( void );
26 static void ZAPL_RestrictionModeOffs3e16( void );
27 static void ZAPL_RestrictionModeOffs4e17( 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_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_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_fullscreen( No 8 )     */
233 /****************************************/
234 static void ZAPL_RestrictionModeOffs1e8( void )
235 {
236     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS0;
237     stm_apl_start_activity_none();
238 }
239
240 /****************************************/
241 /* Action function                      */
242 /*   STM : RestrictionModeOff           */
243 /*   State : map( No 1 )                */
244 /*   Event : stt_prv_layer_apps_map_nml( No 14 ) */
245 /****************************************/
246 static void ZAPL_RestrictionModeOffs1e14( void )
247 {
248     stm_apl_start_activity_map();
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 : stt_prv_layer_apps_map_fll( No 16 ) */
267 /****************************************/
268 static void ZAPL_RestrictionModeOffs3e16( 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 : stt_prv_layer_apps_spl_nml( No 17 ) */
278 /****************************************/
279 static void ZAPL_RestrictionModeOffs4e17( 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_on*/
371     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
372     {
373         stm_apl_event_restriction_mode_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.car_element[StmCarElementNoRestrictionMode].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.car_element[StmCarElementNoRestrictionMode].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_fullscreen*/
560                 if( g_stm_area == StmAreaNoFullscreen )
561                 {
562                     ZAPL_RestrictionModeOffs0e2();
563                 }
564                 else
565                 {
566                     /*Else and default design have not done.*/
567                     /*Please confirm the STM and design else and default.*/
568                 }
569             }
570             /*ctg_splitable*/
571             else if( g_stm_category == StmCtgNoSplitable )
572             {
573                 /*ara_normal*/
574                 if( g_stm_area == StmAreaNoNormal )
575                 {
576                     ZAPL_RestrictionModeOffs0e15();
577                 }
578                 /*ara_split_sub*/
579                 else if( g_stm_area == StmAreaNoSplitSub )
580                 {
581                     ZAPL_RestrictionModeOffs0e15();
582                 }
583                 else
584                 {
585                     /*Else and default design have not done.*/
586                     /*Please confirm the STM and design else and default.*/
587                 }
588             }
589             /*ctg_general*/
590             else if( g_stm_category == StmCtgNoGeneral )
591             {
592                 /*ara_normal*/
593                 if( g_stm_area == StmAreaNoNormal )
594                 {
595                     ZAPL_RestrictionModeOffs0e6();
596                 }
597                 else
598                 {
599                     /*Else and default design have not done.*/
600                     /*Please confirm the STM and design else and default.*/
601                 }
602             }
603             /*ctg_system*/
604             else if( g_stm_category == StmCtgNoSystem )
605             {
606                 /*ara_normal*/
607                 if( g_stm_area == StmAreaNoNormal )
608                 {
609                     ZAPL_RestrictionModeOffs0e7();
610                 }
611                 else
612                 {
613                     /*Else and default design have not done.*/
614                     /*Please confirm the STM and design else and default.*/
615                 }
616             }
617             /*ctg_homescreen*/
618             else if( g_stm_category == StmCtgNoHomescreen )
619             {
620                 /*ara_fullscreen*/
621                 if( g_stm_area == StmAreaNoFullscreen )
622                 {
623                     ZAPL_RestrictionModeOffs1e8();
624                 }
625                 else
626                 {
627                     /*Else and default design have not done.*/
628                     /*Please confirm the STM and design else and default.*/
629                 }
630             }
631             else
632             {
633                 /*Else and default design have not done.*/
634                 /*Please confirm the STM and design else and default.*/
635             }
636         }
637         /*evt_deactivate*/
638         else if( g_stm_event == StmEvtNoDeactivate )
639         {
640             /*ctg_map*/
641             if( g_stm_category == StmCtgNoMap )
642             {
643                 ZAPL_RestrictionModeOffs1e8();
644             }
645             else
646             {
647                 /*Else and default design have not done.*/
648                 /*Please confirm the STM and design else and default.*/
649             }
650         }
651         /*evt_undo*/
652         else if( g_stm_event == StmEvtNoUndo )
653         {
654             /*stt_prv_layer_apps_none*/
655             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
656             {
657                 ZAPL_RestrictionModeOffs1e8();
658             }
659             /*stt_prv_layer_apps_map_nml*/
660             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
661             {
662                 ZAPL_RestrictionModeOffs1e14();
663             }
664             /*stt_prv_layer_apps_map_spl*/
665             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
666             {
667                 ZAPL_RestrictionModeOffs0e15();
668             }
669             /*stt_prv_layer_apps_map_fll*/
670             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
671             {
672                 ZAPL_RestrictionModeOffs0e2();
673             }
674             /*stt_prv_layer_apps_spl_nml*/
675             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
676             {
677                 ZAPL_RestrictionModeOffs0e3();
678             }
679             /*stt_prv_layer_apps_spl_spl*/
680             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
681             {
682                 ZAPL_RestrictionModeOffs0e18();
683             }
684             /*stt_prv_layer_apps_gen_nml*/
685             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
686             {
687                 ZAPL_RestrictionModeOffs0e6();
688             }
689             /*stt_prv_layer_apps_sys_nml*/
690             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
691             {
692                 ZAPL_RestrictionModeOffs0e7();
693             }
694             else
695             {
696                 /*Else and default design have not done.*/
697                 /*Please confirm the STM and design else and default.*/
698             }
699         }
700         else
701         {
702             /*Else and default design have not done.*/
703             /*Please confirm the STM and design else and default.*/
704         }
705     }
706     else
707     {
708         /*Else and default design have not done.*/
709         /*Please confirm the STM and design else and default.*/
710     }
711 }
712
713 /****************************************/
714 /* Event appraisal function             */
715 /*   STM : RestrictionModeOff           */
716 /*   State : map_split( No 2 )          */
717 /****************************************/
718 static void ZAPL_RestrictionModeOffs2Event( void )
719 {
720     /*stt_restriction_mode_off*/
721     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
722     {
723         /*evt_activate*/
724         if( g_stm_event == StmEvtNoActivate )
725         {
726             /*ctg_map*/
727             if( g_stm_category == StmCtgNoMap )
728             {
729                 /*ara_normal*/
730                 if( g_stm_area == StmAreaNoNormal )
731                 {
732                     ZAPL_RestrictionModeOffs0e0();
733                 }
734                 /*ara_fullscreen*/
735                 else if( g_stm_area == StmAreaNoFullscreen )
736                 {
737                     ZAPL_RestrictionModeOffs0e2();
738                 }
739                 else
740                 {
741                     /*Else and default design have not done.*/
742                     /*Please confirm the STM and design else and default.*/
743                 }
744             }
745             /*ctg_splitable*/
746             else if( g_stm_category == StmCtgNoSplitable )
747             {
748                 /*ara_normal*/
749                 if( g_stm_area == StmAreaNoNormal )
750                 {
751                     ZAPL_RestrictionModeOffs2e3();
752                 }
753                 /*ara_split_sub*/
754                 else if( g_stm_area == StmAreaNoSplitSub )
755                 {
756                     ZAPL_RestrictionModeOffs2e3();
757                 }
758                 else
759                 {
760                     /*Else and default design have not done.*/
761                     /*Please confirm the STM and design else and default.*/
762                 }
763             }
764             /*ctg_general*/
765             else if( g_stm_category == StmCtgNoGeneral )
766             {
767                 /*ara_normal*/
768                 if( g_stm_area == StmAreaNoNormal )
769                 {
770                     ZAPL_RestrictionModeOffs0e6();
771                 }
772                 else
773                 {
774                     /*Else and default design have not done.*/
775                     /*Please confirm the STM and design else and default.*/
776                 }
777             }
778             /*ctg_system*/
779             else if( g_stm_category == StmCtgNoSystem )
780             {
781                 /*ara_normal*/
782                 if( g_stm_area == StmAreaNoNormal )
783                 {
784                     ZAPL_RestrictionModeOffs0e7();
785                 }
786                 else
787                 {
788                     /*Else and default design have not done.*/
789                     /*Please confirm the STM and design else and default.*/
790                 }
791             }
792             /*ctg_homescreen*/
793             else if( g_stm_category == StmCtgNoHomescreen )
794             {
795                 /*ara_fullscreen*/
796                 if( g_stm_area == StmAreaNoFullscreen )
797                 {
798                     ZAPL_RestrictionModeOffs1e8();
799                 }
800                 else
801                 {
802                     /*Else and default design have not done.*/
803                     /*Please confirm the STM and design else and default.*/
804                 }
805             }
806             else
807             {
808                 /*Else and default design have not done.*/
809                 /*Please confirm the STM and design else and default.*/
810             }
811         }
812         /*evt_deactivate*/
813         else if( g_stm_event == StmEvtNoDeactivate )
814         {
815             /*ctg_map*/
816             if( g_stm_category == StmCtgNoMap )
817             {
818                 ZAPL_RestrictionModeOffs0e3();
819             }
820             else
821             {
822                 /*Else and default design have not done.*/
823                 /*Please confirm the STM and design else and default.*/
824             }
825         }
826         /*evt_undo*/
827         else if( g_stm_event == StmEvtNoUndo )
828         {
829             /*stt_prv_layer_apps_none*/
830             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
831             {
832                 ZAPL_RestrictionModeOffs1e8();
833             }
834             /*stt_prv_layer_apps_map_nml*/
835             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
836             {
837                 ZAPL_RestrictionModeOffs0e0();
838             }
839             /*stt_prv_layer_apps_map_spl*/
840             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
841             {
842                 ZAPL_RestrictionModeOffs2e3();
843             }
844             /*stt_prv_layer_apps_map_fll*/
845             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
846             {
847                 ZAPL_RestrictionModeOffs0e2();
848             }
849             /*stt_prv_layer_apps_spl_nml*/
850             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
851             {
852                 ZAPL_RestrictionModeOffs0e3();
853             }
854             /*stt_prv_layer_apps_spl_spl*/
855             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
856             {
857                 ZAPL_RestrictionModeOffs0e18();
858             }
859             /*stt_prv_layer_apps_gen_nml*/
860             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
861             {
862                 ZAPL_RestrictionModeOffs0e6();
863             }
864             /*stt_prv_layer_apps_sys_nml*/
865             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
866             {
867                 ZAPL_RestrictionModeOffs0e7();
868             }
869             else
870             {
871                 /*Else and default design have not done.*/
872                 /*Please confirm the STM and design else and default.*/
873             }
874         }
875         else
876         {
877             /*Else and default design have not done.*/
878             /*Please confirm the STM and design else and default.*/
879         }
880     }
881     else
882     {
883         /*Else and default design have not done.*/
884         /*Please confirm the STM and design else and default.*/
885     }
886 }
887
888 /****************************************/
889 /* Event appraisal function             */
890 /*   STM : RestrictionModeOff           */
891 /*   State : map_fullscreen( No 3 )     */
892 /****************************************/
893 static void ZAPL_RestrictionModeOffs3Event( void )
894 {
895     /*stt_restriction_mode_off*/
896     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
897     {
898         /*evt_activate*/
899         if( g_stm_event == StmEvtNoActivate )
900         {
901             /*ctg_map*/
902             if( g_stm_category == StmCtgNoMap )
903             {
904                 /*ara_normal*/
905                 if( g_stm_area == StmAreaNoNormal )
906                 {
907                     ZAPL_RestrictionModeOffs0e0();
908                 }
909                 else
910                 {
911                     /*Else and default design have not done.*/
912                     /*Please confirm the STM and design else and default.*/
913                 }
914             }
915             /*ctg_splitable*/
916             else if( g_stm_category == StmCtgNoSplitable )
917             {
918                 /*ara_normal*/
919                 if( g_stm_area == StmAreaNoNormal )
920                 {
921                     ZAPL_RestrictionModeOffs0e15();
922                 }
923                 else
924                 {
925                     /*Else and default design have not done.*/
926                     /*Please confirm the STM and design else and default.*/
927                 }
928             }
929             /*ctg_general*/
930             else if( g_stm_category == StmCtgNoGeneral )
931             {
932                 /*ara_normal*/
933                 if( g_stm_area == StmAreaNoNormal )
934                 {
935                     ZAPL_RestrictionModeOffs0e6();
936                 }
937                 else
938                 {
939                     /*Else and default design have not done.*/
940                     /*Please confirm the STM and design else and default.*/
941                 }
942             }
943             /*ctg_system*/
944             else if( g_stm_category == StmCtgNoSystem )
945             {
946                 /*ara_normal*/
947                 if( g_stm_area == StmAreaNoNormal )
948                 {
949                     ZAPL_RestrictionModeOffs0e7();
950                 }
951                 else
952                 {
953                     /*Else and default design have not done.*/
954                     /*Please confirm the STM and design else and default.*/
955                 }
956             }
957             /*ctg_homescreen*/
958             else if( g_stm_category == StmCtgNoHomescreen )
959             {
960                 /*ara_fullscreen*/
961                 if( g_stm_area == StmAreaNoFullscreen )
962                 {
963                     ZAPL_RestrictionModeOffs1e8();
964                 }
965                 else
966                 {
967                     /*Else and default design have not done.*/
968                     /*Please confirm the STM and design else and default.*/
969                 }
970             }
971             else
972             {
973                 /*Else and default design have not done.*/
974                 /*Please confirm the STM and design else and default.*/
975             }
976         }
977         /*evt_deactivate*/
978         else if( g_stm_event == StmEvtNoDeactivate )
979         {
980             /*ctg_map*/
981             if( g_stm_category == StmCtgNoMap )
982             {
983                 ZAPL_RestrictionModeOffs1e8();
984             }
985             else
986             {
987                 /*Else and default design have not done.*/
988                 /*Please confirm the STM and design else and default.*/
989             }
990         }
991         /*evt_undo*/
992         else if( g_stm_event == StmEvtNoUndo )
993         {
994             /*stt_prv_layer_apps_none*/
995             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
996             {
997                 ZAPL_RestrictionModeOffs1e8();
998             }
999             /*stt_prv_layer_apps_map_nml*/
1000             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1001             {
1002                 ZAPL_RestrictionModeOffs0e0();
1003             }
1004             /*stt_prv_layer_apps_map_spl*/
1005             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1006             {
1007                 ZAPL_RestrictionModeOffs0e15();
1008             }
1009             /*stt_prv_layer_apps_map_fll*/
1010             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1011             {
1012                 ZAPL_RestrictionModeOffs3e16();
1013             }
1014             /*stt_prv_layer_apps_spl_nml*/
1015             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1016             {
1017                 ZAPL_RestrictionModeOffs0e3();
1018             }
1019             /*stt_prv_layer_apps_spl_spl*/
1020             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1021             {
1022                 ZAPL_RestrictionModeOffs0e18();
1023             }
1024             /*stt_prv_layer_apps_gen_nml*/
1025             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1026             {
1027                 ZAPL_RestrictionModeOffs0e6();
1028             }
1029             /*stt_prv_layer_apps_sys_nml*/
1030             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1031             {
1032                 ZAPL_RestrictionModeOffs0e7();
1033             }
1034             else
1035             {
1036                 /*Else and default design have not done.*/
1037                 /*Please confirm the STM and design else and default.*/
1038             }
1039         }
1040         else
1041         {
1042             /*Else and default design have not done.*/
1043             /*Please confirm the STM and design else and default.*/
1044         }
1045     }
1046     else
1047     {
1048         /*Else and default design have not done.*/
1049         /*Please confirm the STM and design else and default.*/
1050     }
1051 }
1052
1053 /****************************************/
1054 /* Event appraisal function             */
1055 /*   STM : RestrictionModeOff           */
1056 /*   State : splitable_normal( No 4 )   */
1057 /****************************************/
1058 static void ZAPL_RestrictionModeOffs4Event( void )
1059 {
1060     /*stt_restriction_mode_off*/
1061     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1062     {
1063         /*evt_activate*/
1064         if( g_stm_event == StmEvtNoActivate )
1065         {
1066             /*ctg_map*/
1067             if( g_stm_category == StmCtgNoMap )
1068             {
1069                 /*ara_normal*/
1070                 if( g_stm_area == StmAreaNoNormal )
1071                 {
1072                     ZAPL_RestrictionModeOffs0e15();
1073                 }
1074                 /*ara_split_main*/
1075                 else if( g_stm_area == StmAreaNoSplitMain )
1076                 {
1077                     ZAPL_RestrictionModeOffs0e15();
1078                 }
1079                 /*ara_fullscreen*/
1080                 else if( g_stm_area == StmAreaNoFullscreen )
1081                 {
1082                     ZAPL_RestrictionModeOffs0e2();
1083                 }
1084                 else
1085                 {
1086                     /*Else and default design have not done.*/
1087                     /*Please confirm the STM and design else and default.*/
1088                 }
1089             }
1090             /*ctg_splitable*/
1091             else if( g_stm_category == StmCtgNoSplitable )
1092             {
1093                 /*ara_split_main*/
1094                 if( g_stm_area == StmAreaNoSplitMain )
1095                 {
1096                     ZAPL_RestrictionModeOffs0e18();
1097                 }
1098                 /*ara_split_sub*/
1099                 else if( g_stm_area == StmAreaNoSplitSub )
1100                 {
1101                     ZAPL_RestrictionModeOffs0e18();
1102                 }
1103                 else
1104                 {
1105                     /*Else and default design have not done.*/
1106                     /*Please confirm the STM and design else and default.*/
1107                 }
1108             }
1109             /*ctg_general*/
1110             else if( g_stm_category == StmCtgNoGeneral )
1111             {
1112                 /*ara_normal*/
1113                 if( g_stm_area == StmAreaNoNormal )
1114                 {
1115                     ZAPL_RestrictionModeOffs0e6();
1116                 }
1117                 else
1118                 {
1119                     /*Else and default design have not done.*/
1120                     /*Please confirm the STM and design else and default.*/
1121                 }
1122             }
1123             /*ctg_system*/
1124             else if( g_stm_category == StmCtgNoSystem )
1125             {
1126                 /*ara_normal*/
1127                 if( g_stm_area == StmAreaNoNormal )
1128                 {
1129                     ZAPL_RestrictionModeOffs0e7();
1130                 }
1131                 else
1132                 {
1133                     /*Else and default design have not done.*/
1134                     /*Please confirm the STM and design else and default.*/
1135                 }
1136             }
1137             /*ctg_homescreen*/
1138             else if( g_stm_category == StmCtgNoHomescreen )
1139             {
1140                 /*ara_fullscreen*/
1141                 if( g_stm_area == StmAreaNoFullscreen )
1142                 {
1143                     ZAPL_RestrictionModeOffs1e8();
1144                 }
1145                 else
1146                 {
1147                     /*Else and default design have not done.*/
1148                     /*Please confirm the STM and design else and default.*/
1149                 }
1150             }
1151             else
1152             {
1153                 /*Else and default design have not done.*/
1154                 /*Please confirm the STM and design else and default.*/
1155             }
1156         }
1157         /*evt_deactivate*/
1158         else if( g_stm_event == StmEvtNoDeactivate )
1159         {
1160             /*ctg_splitable*/
1161             if( g_stm_category == StmCtgNoSplitable )
1162             {
1163                 ZAPL_RestrictionModeOffs1e8();
1164             }
1165             else
1166             {
1167                 /*Else and default design have not done.*/
1168                 /*Please confirm the STM and design else and default.*/
1169             }
1170         }
1171         /*evt_undo*/
1172         else if( g_stm_event == StmEvtNoUndo )
1173         {
1174             /*stt_prv_layer_apps_none*/
1175             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1176             {
1177                 ZAPL_RestrictionModeOffs1e8();
1178             }
1179             /*stt_prv_layer_apps_map_nml*/
1180             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1181             {
1182                 ZAPL_RestrictionModeOffs0e0();
1183             }
1184             /*stt_prv_layer_apps_map_spl*/
1185             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1186             {
1187                 ZAPL_RestrictionModeOffs0e15();
1188             }
1189             /*stt_prv_layer_apps_map_fll*/
1190             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1191             {
1192                 ZAPL_RestrictionModeOffs0e2();
1193             }
1194             /*stt_prv_layer_apps_spl_nml*/
1195             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1196             {
1197                 ZAPL_RestrictionModeOffs4e17();
1198             }
1199             /*stt_prv_layer_apps_spl_spl*/
1200             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1201             {
1202                 ZAPL_RestrictionModeOffs0e18();
1203             }
1204             /*stt_prv_layer_apps_gen_nml*/
1205             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1206             {
1207                 ZAPL_RestrictionModeOffs0e6();
1208             }
1209             /*stt_prv_layer_apps_sys_nml*/
1210             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1211             {
1212                 ZAPL_RestrictionModeOffs0e7();
1213             }
1214             else
1215             {
1216                 /*Else and default design have not done.*/
1217                 /*Please confirm the STM and design else and default.*/
1218             }
1219         }
1220         else
1221         {
1222             /*Else and default design have not done.*/
1223             /*Please confirm the STM and design else and default.*/
1224         }
1225     }
1226     else
1227     {
1228         /*Else and default design have not done.*/
1229         /*Please confirm the STM and design else and default.*/
1230     }
1231 }
1232
1233 /****************************************/
1234 /* Event appraisal function             */
1235 /*   STM : RestrictionModeOff           */
1236 /*   State : splitable_split( No 5 )    */
1237 /****************************************/
1238 static void ZAPL_RestrictionModeOffs5Event( void )
1239 {
1240     /*stt_restriction_mode_off*/
1241     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1242     {
1243         /*evt_activate*/
1244         if( g_stm_event == StmEvtNoActivate )
1245         {
1246             /*ctg_map*/
1247             if( g_stm_category == StmCtgNoMap )
1248             {
1249                 /*ara_normal*/
1250                 if( g_stm_area == StmAreaNoNormal )
1251                 {
1252                     ZAPL_RestrictionModeOffs0e15();
1253                 }
1254                 /*ara_split_main*/
1255                 else if( g_stm_area == StmAreaNoSplitMain )
1256                 {
1257                     ZAPL_RestrictionModeOffs0e15();
1258                 }
1259                 /*ara_fullscreen*/
1260                 else if( g_stm_area == StmAreaNoFullscreen )
1261                 {
1262                     ZAPL_RestrictionModeOffs0e2();
1263                 }
1264                 else
1265                 {
1266                     /*Else and default design have not done.*/
1267                     /*Please confirm the STM and design else and default.*/
1268                 }
1269             }
1270             /*ctg_splitable*/
1271             else if( g_stm_category == StmCtgNoSplitable )
1272             {
1273                 /*ara_normal*/
1274                 if( g_stm_area == StmAreaNoNormal )
1275                 {
1276                     ZAPL_RestrictionModeOffs5e3();
1277                 }
1278                 /*ara_split_main*/
1279                 else if( g_stm_area == StmAreaNoSplitMain )
1280                 {
1281                     ZAPL_RestrictionModeOffs5e3();
1282                 }
1283                 /*ara_split_sub*/
1284                 else if( g_stm_area == StmAreaNoSplitSub )
1285                 {
1286                     ZAPL_RestrictionModeOffs5e3();
1287                 }
1288                 else
1289                 {
1290                     /*Else and default design have not done.*/
1291                     /*Please confirm the STM and design else and default.*/
1292                 }
1293             }
1294             /*ctg_general*/
1295             else if( g_stm_category == StmCtgNoGeneral )
1296             {
1297                 /*ara_normal*/
1298                 if( g_stm_area == StmAreaNoNormal )
1299                 {
1300                     ZAPL_RestrictionModeOffs0e6();
1301                 }
1302                 else
1303                 {
1304                     /*Else and default design have not done.*/
1305                     /*Please confirm the STM and design else and default.*/
1306                 }
1307             }
1308             /*ctg_system*/
1309             else if( g_stm_category == StmCtgNoSystem )
1310             {
1311                 /*ara_normal*/
1312                 if( g_stm_area == StmAreaNoNormal )
1313                 {
1314                     ZAPL_RestrictionModeOffs0e7();
1315                 }
1316                 else
1317                 {
1318                     /*Else and default design have not done.*/
1319                     /*Please confirm the STM and design else and default.*/
1320                 }
1321             }
1322             /*ctg_homescreen*/
1323             else if( g_stm_category == StmCtgNoHomescreen )
1324             {
1325                 /*ara_fullscreen*/
1326                 if( g_stm_area == StmAreaNoFullscreen )
1327                 {
1328                     ZAPL_RestrictionModeOffs1e8();
1329                 }
1330                 else
1331                 {
1332                     /*Else and default design have not done.*/
1333                     /*Please confirm the STM and design else and default.*/
1334                 }
1335             }
1336             else
1337             {
1338                 /*Else and default design have not done.*/
1339                 /*Please confirm the STM and design else and default.*/
1340             }
1341         }
1342         /*evt_deactivate*/
1343         else if( g_stm_event == StmEvtNoDeactivate )
1344         {
1345             /*ctg_splitable*/
1346             if( g_stm_category == StmCtgNoSplitable )
1347             {
1348                 ZAPL_RestrictionModeOffs0e3();
1349             }
1350             else
1351             {
1352                 /*Else and default design have not done.*/
1353                 /*Please confirm the STM and design else and default.*/
1354             }
1355         }
1356         /*evt_undo*/
1357         else if( g_stm_event == StmEvtNoUndo )
1358         {
1359             /*stt_prv_layer_apps_none*/
1360             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1361             {
1362                 ZAPL_RestrictionModeOffs1e8();
1363             }
1364             /*stt_prv_layer_apps_map_nml*/
1365             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1366             {
1367                 ZAPL_RestrictionModeOffs0e0();
1368             }
1369             /*stt_prv_layer_apps_map_spl*/
1370             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1371             {
1372                 ZAPL_RestrictionModeOffs0e15();
1373             }
1374             /*stt_prv_layer_apps_map_fll*/
1375             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1376             {
1377                 ZAPL_RestrictionModeOffs0e2();
1378             }
1379             /*stt_prv_layer_apps_spl_nml*/
1380             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1381             {
1382                 ZAPL_RestrictionModeOffs0e3();
1383             }
1384             /*stt_prv_layer_apps_spl_spl*/
1385             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1386             {
1387                 ZAPL_RestrictionModeOffs5e3();
1388             }
1389             /*stt_prv_layer_apps_gen_nml*/
1390             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1391             {
1392                 ZAPL_RestrictionModeOffs0e6();
1393             }
1394             /*stt_prv_layer_apps_sys_nml*/
1395             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1396             {
1397                 ZAPL_RestrictionModeOffs0e7();
1398             }
1399             else
1400             {
1401                 /*Else and default design have not done.*/
1402                 /*Please confirm the STM and design else and default.*/
1403             }
1404         }
1405         else
1406         {
1407             /*Else and default design have not done.*/
1408             /*Please confirm the STM and design else and default.*/
1409         }
1410     }
1411     else
1412     {
1413         /*Else and default design have not done.*/
1414         /*Please confirm the STM and design else and default.*/
1415     }
1416 }
1417
1418 /****************************************/
1419 /* Event appraisal function             */
1420 /*   STM : RestrictionModeOff           */
1421 /*   State : general( No 6 )            */
1422 /****************************************/
1423 static void ZAPL_RestrictionModeOffs6Event( void )
1424 {
1425     /*stt_restriction_mode_off*/
1426     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1427     {
1428         /*evt_activate*/
1429         if( g_stm_event == StmEvtNoActivate )
1430         {
1431             /*ctg_map*/
1432             if( g_stm_category == StmCtgNoMap )
1433             {
1434                 /*ara_normal*/
1435                 if( g_stm_area == StmAreaNoNormal )
1436                 {
1437                     ZAPL_RestrictionModeOffs0e0();
1438                 }
1439                 /*ara_fullscreen*/
1440                 else if( g_stm_area == StmAreaNoFullscreen )
1441                 {
1442                     ZAPL_RestrictionModeOffs0e2();
1443                 }
1444                 else
1445                 {
1446                     /*Else and default design have not done.*/
1447                     /*Please confirm the STM and design else and default.*/
1448                 }
1449             }
1450             /*ctg_splitable*/
1451             else if( g_stm_category == StmCtgNoSplitable )
1452             {
1453                 /*ara_normal*/
1454                 if( g_stm_area == StmAreaNoNormal )
1455                 {
1456                     ZAPL_RestrictionModeOffs0e3();
1457                 }
1458                 else
1459                 {
1460                     /*Else and default design have not done.*/
1461                     /*Please confirm the STM and design else and default.*/
1462                 }
1463             }
1464             /*ctg_general*/
1465             else if( g_stm_category == StmCtgNoGeneral )
1466             {
1467                 /*ara_normal*/
1468                 if( g_stm_area == StmAreaNoNormal )
1469                 {
1470                     ZAPL_RestrictionModeOffs6e6();
1471                 }
1472                 else
1473                 {
1474                     /*Else and default design have not done.*/
1475                     /*Please confirm the STM and design else and default.*/
1476                 }
1477             }
1478             /*ctg_system*/
1479             else if( g_stm_category == StmCtgNoSystem )
1480             {
1481                 /*ara_normal*/
1482                 if( g_stm_area == StmAreaNoNormal )
1483                 {
1484                     ZAPL_RestrictionModeOffs0e7();
1485                 }
1486                 else
1487                 {
1488                     /*Else and default design have not done.*/
1489                     /*Please confirm the STM and design else and default.*/
1490                 }
1491             }
1492             /*ctg_homescreen*/
1493             else if( g_stm_category == StmCtgNoHomescreen )
1494             {
1495                 /*ara_fullscreen*/
1496                 if( g_stm_area == StmAreaNoFullscreen )
1497                 {
1498                     ZAPL_RestrictionModeOffs1e8();
1499                 }
1500                 else
1501                 {
1502                     /*Else and default design have not done.*/
1503                     /*Please confirm the STM and design else and default.*/
1504                 }
1505             }
1506             else
1507             {
1508                 /*Else and default design have not done.*/
1509                 /*Please confirm the STM and design else and default.*/
1510             }
1511         }
1512         /*evt_deactivate*/
1513         else if( g_stm_event == StmEvtNoDeactivate )
1514         {
1515             /*ctg_general*/
1516             if( g_stm_category == StmCtgNoGeneral )
1517             {
1518                 ZAPL_RestrictionModeOffs1e8();
1519             }
1520             else
1521             {
1522                 /*Else and default design have not done.*/
1523                 /*Please confirm the STM and design else and default.*/
1524             }
1525         }
1526         /*evt_undo*/
1527         else if( g_stm_event == StmEvtNoUndo )
1528         {
1529             /*stt_prv_layer_apps_none*/
1530             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1531             {
1532                 ZAPL_RestrictionModeOffs1e8();
1533             }
1534             /*stt_prv_layer_apps_map_nml*/
1535             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1536             {
1537                 ZAPL_RestrictionModeOffs0e0();
1538             }
1539             /*stt_prv_layer_apps_map_spl*/
1540             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1541             {
1542                 ZAPL_RestrictionModeOffs0e15();
1543             }
1544             /*stt_prv_layer_apps_map_fll*/
1545             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1546             {
1547                 ZAPL_RestrictionModeOffs0e2();
1548             }
1549             /*stt_prv_layer_apps_spl_nml*/
1550             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1551             {
1552                 ZAPL_RestrictionModeOffs0e3();
1553             }
1554             /*stt_prv_layer_apps_spl_spl*/
1555             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1556             {
1557                 ZAPL_RestrictionModeOffs0e18();
1558             }
1559             /*stt_prv_layer_apps_gen_nml*/
1560             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1561             {
1562                 ZAPL_RestrictionModeOffs6e6();
1563             }
1564             /*stt_prv_layer_apps_sys_nml*/
1565             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1566             {
1567                 ZAPL_RestrictionModeOffs0e7();
1568             }
1569             else
1570             {
1571                 /*Else and default design have not done.*/
1572                 /*Please confirm the STM and design else and default.*/
1573             }
1574         }
1575         else
1576         {
1577             /*Else and default design have not done.*/
1578             /*Please confirm the STM and design else and default.*/
1579         }
1580     }
1581     else
1582     {
1583         /*Else and default design have not done.*/
1584         /*Please confirm the STM and design else and default.*/
1585     }
1586 }
1587
1588 /****************************************/
1589 /* Event appraisal function             */
1590 /*   STM : RestrictionModeOff           */
1591 /*   State : system( No 7 )             */
1592 /****************************************/
1593 static void ZAPL_RestrictionModeOffs7Event( void )
1594 {
1595     /*stt_restriction_mode_off*/
1596     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1597     {
1598         /*evt_activate*/
1599         if( g_stm_event == StmEvtNoActivate )
1600         {
1601             /*ctg_map*/
1602             if( g_stm_category == StmCtgNoMap )
1603             {
1604                 /*ara_normal*/
1605                 if( g_stm_area == StmAreaNoNormal )
1606                 {
1607                     ZAPL_RestrictionModeOffs0e0();
1608                 }
1609                 /*ara_fullscreen*/
1610                 else if( g_stm_area == StmAreaNoFullscreen )
1611                 {
1612                     ZAPL_RestrictionModeOffs0e2();
1613                 }
1614                 else
1615                 {
1616                     /*Else and default design have not done.*/
1617                     /*Please confirm the STM and design else and default.*/
1618                 }
1619             }
1620             /*ctg_splitable*/
1621             else if( g_stm_category == StmCtgNoSplitable )
1622             {
1623                 /*ara_normal*/
1624                 if( g_stm_area == StmAreaNoNormal )
1625                 {
1626                     ZAPL_RestrictionModeOffs0e3();
1627                 }
1628                 else
1629                 {
1630                     /*Else and default design have not done.*/
1631                     /*Please confirm the STM and design else and default.*/
1632                 }
1633             }
1634             /*ctg_general*/
1635             else if( g_stm_category == StmCtgNoGeneral )
1636             {
1637                 /*ara_normal*/
1638                 if( g_stm_area == StmAreaNoNormal )
1639                 {
1640                     ZAPL_RestrictionModeOffs0e6();
1641                 }
1642                 else
1643                 {
1644                     /*Else and default design have not done.*/
1645                     /*Please confirm the STM and design else and default.*/
1646                 }
1647             }
1648             /*ctg_system*/
1649             else if( g_stm_category == StmCtgNoSystem )
1650             {
1651                 /*ara_normal*/
1652                 if( g_stm_area == StmAreaNoNormal )
1653                 {
1654                     ZAPL_RestrictionModeOffs7e7();
1655                 }
1656                 else
1657                 {
1658                     /*Else and default design have not done.*/
1659                     /*Please confirm the STM and design else and default.*/
1660                 }
1661             }
1662             /*ctg_homescreen*/
1663             else if( g_stm_category == StmCtgNoHomescreen )
1664             {
1665                 /*ara_fullscreen*/
1666                 if( g_stm_area == StmAreaNoFullscreen )
1667                 {
1668                     ZAPL_RestrictionModeOffs1e8();
1669                 }
1670                 else
1671                 {
1672                     /*Else and default design have not done.*/
1673                     /*Please confirm the STM and design else and default.*/
1674                 }
1675             }
1676             else
1677             {
1678                 /*Else and default design have not done.*/
1679                 /*Please confirm the STM and design else and default.*/
1680             }
1681         }
1682         /*evt_deactivate*/
1683         else if( g_stm_event == StmEvtNoDeactivate )
1684         {
1685             /*ctg_system*/
1686             if( g_stm_category == StmCtgNoSystem )
1687             {
1688                 ZAPL_RestrictionModeOffs1e8();
1689             }
1690             else
1691             {
1692                 /*Else and default design have not done.*/
1693                 /*Please confirm the STM and design else and default.*/
1694             }
1695         }
1696         /*evt_undo*/
1697         else if( g_stm_event == StmEvtNoUndo )
1698         {
1699             /*stt_prv_layer_apps_none*/
1700             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1701             {
1702                 ZAPL_RestrictionModeOffs1e8();
1703             }
1704             /*stt_prv_layer_apps_map_nml*/
1705             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1706             {
1707                 ZAPL_RestrictionModeOffs0e0();
1708             }
1709             /*stt_prv_layer_apps_map_spl*/
1710             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
1711             {
1712                 ZAPL_RestrictionModeOffs0e15();
1713             }
1714             /*stt_prv_layer_apps_map_fll*/
1715             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1716             {
1717                 ZAPL_RestrictionModeOffs0e2();
1718             }
1719             /*stt_prv_layer_apps_spl_nml*/
1720             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
1721             {
1722                 ZAPL_RestrictionModeOffs0e3();
1723             }
1724             /*stt_prv_layer_apps_spl_spl*/
1725             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1726             {
1727                 ZAPL_RestrictionModeOffs0e18();
1728             }
1729             /*stt_prv_layer_apps_gen_nml*/
1730             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1731             {
1732                 ZAPL_RestrictionModeOffs0e6();
1733             }
1734             /*stt_prv_layer_apps_sys_nml*/
1735             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSysNml )
1736             {
1737                 ZAPL_RestrictionModeOffs7e7();
1738             }
1739             else
1740             {
1741                 /*Else and default design have not done.*/
1742                 /*Please confirm the STM and design else and default.*/
1743             }
1744         }
1745         else
1746         {
1747             /*Else and default design have not done.*/
1748             /*Please confirm the STM and design else and default.*/
1749         }
1750     }
1751     else
1752     {
1753         /*Else and default design have not done.*/
1754         /*Please confirm the STM and design else and default.*/
1755     }
1756 }
1757
1758 /****************************************/
1759 /* Event appraisal function             */
1760 /*   STM : AppsLayer                    */
1761 /*   State : restriction_mode_on( No 1 )*/
1762 /****************************************/
1763 static void ZAPL_AppsLayers1Event( void )
1764 {
1765     /*stt_restriction_mode_off*/
1766     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
1767     {
1768         stm_apl_event_restriction_mode_off();
1769         ZAPL_AppsLayers1e0();
1770     }
1771     else
1772     {
1773         /*Else and default design have not done.*/
1774         /*Please confirm the STM and design else and default.*/
1775     }
1776 }
1777
1778 /****************************************/
1779 /* Event appraisal function             */
1780 /*   STM : RestrictionModeOn            */
1781 /*   State : map( No 0 )                */
1782 /****************************************/
1783 static void ZAPL_RestrictionModeOns0Event( void )
1784 {
1785     /*stt_restriction_mode_on*/
1786     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
1787     {
1788         /*evt_activate*/
1789         if( g_stm_event == StmEvtNoActivate )
1790         {
1791             /*ctg_map*/
1792             if( g_stm_category == StmCtgNoMap )
1793             {
1794                 /*ara_fullscreen*/
1795                 if( g_stm_area == StmAreaNoFullscreen )
1796                 {
1797                     ZAPL_RestrictionModeOns0e1();
1798                 }
1799                 else
1800                 {
1801                     /*Else and default design have not done.*/
1802                     /*Please confirm the STM and design else and default.*/
1803                 }
1804             }
1805             else
1806             {
1807                 /*Else and default design have not done.*/
1808                 /*Please confirm the STM and design else and default.*/
1809             }
1810         }
1811         /*evt_undo*/
1812         else if( g_stm_event == StmEvtNoUndo )
1813         {
1814             /*stt_prv_layer_apps_map_nml*/
1815             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1816             {
1817                 ZAPL_RestrictionModeOns0e2();
1818             }
1819             /*stt_prv_layer_apps_map_fll*/
1820             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1821             {
1822                 ZAPL_RestrictionModeOns0e1();
1823             }
1824             else
1825             {
1826                 /*Else and default design have not done.*/
1827                 /*Please confirm the STM and design else and default.*/
1828             }
1829         }
1830         else
1831         {
1832             /*Else and default design have not done.*/
1833             /*Please confirm the STM and design else and default.*/
1834         }
1835     }
1836     else
1837     {
1838         /*Else and default design have not done.*/
1839         /*Please confirm the STM and design else and default.*/
1840     }
1841 }
1842
1843 /****************************************/
1844 /* Event appraisal function             */
1845 /*   STM : RestrictionModeOn            */
1846 /*   State : map_fullscreen( No 1 )     */
1847 /****************************************/
1848 static void ZAPL_RestrictionModeOns1Event( void )
1849 {
1850     /*stt_restriction_mode_on*/
1851     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
1852     {
1853         /*evt_activate*/
1854         if( g_stm_event == StmEvtNoActivate )
1855         {
1856             /*ctg_map*/
1857             if( g_stm_category == StmCtgNoMap )
1858             {
1859                 /*ara_normal*/
1860                 if( g_stm_area == StmAreaNoNormal )
1861                 {
1862                     ZAPL_RestrictionModeOns1e0();
1863                 }
1864                 else
1865                 {
1866                     /*Else and default design have not done.*/
1867                     /*Please confirm the STM and design else and default.*/
1868                 }
1869             }
1870             else
1871             {
1872                 /*Else and default design have not done.*/
1873                 /*Please confirm the STM and design else and default.*/
1874             }
1875         }
1876         /*evt_undo*/
1877         else if( g_stm_event == StmEvtNoUndo )
1878         {
1879             /*stt_prv_layer_apps_map_nml*/
1880             if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml )
1881             {
1882                 ZAPL_RestrictionModeOns1e0();
1883             }
1884             /*stt_prv_layer_apps_map_fll*/
1885             else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll )
1886             {
1887                 ZAPL_RestrictionModeOns1e3();
1888             }
1889             else
1890             {
1891                 /*Else and default design have not done.*/
1892                 /*Please confirm the STM and design else and default.*/
1893             }
1894         }
1895         else
1896         {
1897             /*Else and default design have not done.*/
1898             /*Please confirm the STM and design else and default.*/
1899         }
1900     }
1901     else
1902     {
1903         /*Else and default design have not done.*/
1904         /*Please confirm the STM and design else and default.*/
1905     }
1906 }
1907
1908 /****************************************/
1909 /* Event call function                  */
1910 /*   STM : AppsLayer                    */
1911 /****************************************/
1912 void stm_apl_event_call( void )
1913 {
1914     stm_apl_start_stm();
1915     switch( ZAPL_AppsLayerState[ZAPL_APPSLAYER] )
1916     {
1917     case ZAPL_APPSLAYERS0:
1918         switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] )
1919         {
1920         case ZAPL_RESTRICTIONMODEOFFS0:
1921             ZAPL_RestrictionModeOffs0Event();
1922             break;
1923         case ZAPL_RESTRICTIONMODEOFFS1:
1924             ZAPL_RestrictionModeOffs1Event();
1925             break;
1926         case ZAPL_RESTRICTIONMODEOFFS2:
1927             ZAPL_RestrictionModeOffs2Event();
1928             break;
1929         case ZAPL_RESTRICTIONMODEOFFS3:
1930             ZAPL_RestrictionModeOffs3Event();
1931             break;
1932         case ZAPL_RESTRICTIONMODEOFFS4:
1933             ZAPL_RestrictionModeOffs4Event();
1934             break;
1935         case ZAPL_RESTRICTIONMODEOFFS5:
1936             ZAPL_RestrictionModeOffs5Event();
1937             break;
1938         case ZAPL_RESTRICTIONMODEOFFS6:
1939             ZAPL_RestrictionModeOffs6Event();
1940             break;
1941         case ZAPL_RESTRICTIONMODEOFFS7:
1942             ZAPL_RestrictionModeOffs7Event();
1943             break;
1944         default:
1945             /*Not accessible to this else (default).*/
1946             break;
1947         }
1948         ZAPL_AppsLayers0Event();
1949         break;
1950     case ZAPL_APPSLAYERS1:
1951         switch( ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] )
1952         {
1953         case ZAPL_RESTRICTIONMODEONS0:
1954             ZAPL_RestrictionModeOns0Event();
1955             break;
1956         case ZAPL_RESTRICTIONMODEONS1:
1957             ZAPL_RestrictionModeOns1Event();
1958             break;
1959         default:
1960             /*Not accessible to this else (default).*/
1961             break;
1962         }
1963         ZAPL_AppsLayers1Event();
1964         break;
1965     default:
1966         /*Not accessible to this else (default).*/
1967         break;
1968     }
1969 }
1970
1971 /****************************************/
1972 /* Initial function                     */
1973 /*   STM : AppsLayer                    */
1974 /****************************************/
1975 void stm_apl_initialize( void )
1976 {
1977     ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERS0;
1978     ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS0;
1979     ZAPL_AppsLayerState[ZAPL_APPSLAYERS1F] = ( uint8_t )ZAPL_RESTRICTIONMODEONS0;
1980     ZAPL_AppsLayers0StateEntry();
1981 }
1982
1983 /****************************************/
1984 /* Terminate function                   */
1985 /*   STM : AppsLayer                    */
1986 /****************************************/
1987 void ZAPL_AppsLayerTerminate( void )
1988 {
1989     ZAPL_AppsLayerState[ZAPL_APPSLAYER] = ( uint8_t )ZAPL_APPSLAYERTERMINATE;
1990 }
1991