6d076439357fc1ccdf0c9c6afe17e33fff85a9a1
[apps/agl-service-windowmanager-2017.git] / policy_manager / stm / zipc / StateTransitionor / RestrictionLayer / ZREL_RelMain.c
1 /************************************************************/
2 /*     ZREL_RelMain.c                                       */
3 /*     RelMain 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 ZREL_RelMainState[ZREL_RELMAINSTATENOMAX];
10
11 static void ZREL_RelMains0StateEntry( void );
12 static void ZREL_RelMains1StateEntry( void );
13 static void ZREL_RelMains0e1( void );
14 static void ZREL_RelMains1e0( void );
15 static void ZREL_RelRestOffs0e0( void );
16 static void ZREL_RelRestOffs0e1( void );
17 static void ZREL_RelRestOffs0e8( void );
18 static void ZREL_RelRestOffs0e13( void );
19 static void ZREL_RelRestOffs1e1( void );
20 static void ZREL_RelRestOffs1e4( void );
21 static void ZREL_RelRestOffs2e15( void );
22 static void ZREL_RelRestOffs3e0( void );
23 static void ZREL_RelMains0Event( void );
24 static void ZREL_RelRestOffs0Event( void );
25 static void ZREL_RelRestOffs1Event( void );
26 static void ZREL_RelRestOffs2Event( void );
27 static void ZREL_RelRestOffs3Event( void );
28 static void ZREL_RelMains1Event( void );
29 static void ZREL_RelRestOns0Event( void );
30
31 /****************************************/
32 /* State start activity function        */
33 /*   STM : RelMain                      */
34 /*   State : restriction_mode_off( No 0 ) */
35 /****************************************/
36 static void ZREL_RelMains0StateEntry( void )
37 {
38     switch( ZREL_RelMainState[ZREL_RELMAINS0F] )
39     {
40     case ZREL_RELRESTOFFS0:
41         stm_rel_start_activity_none();
42         break;
43     case ZREL_RELRESTOFFS1:
44         stm_rel_start_activity_restriction_normal();
45         break;
46     case ZREL_RELRESTOFFS2:
47         stm_rel_start_activity_restriction_split_main();
48         break;
49     case ZREL_RELRESTOFFS3:
50         stm_rel_start_activity_restriction_split_sub();
51         break;
52     default:
53         /*Not accessible to this else (default).*/
54         break;
55     }
56 }
57
58 /****************************************/
59 /* State start activity function        */
60 /*   STM : RelMain                      */
61 /*   State : restriction_mode_2_on( No 1 ) */
62 /****************************************/
63 static void ZREL_RelMains1StateEntry( void )
64 {
65     switch( ZREL_RelMainState[ZREL_RELMAINS1F] )
66     {
67     case ZREL_RELRESTONS0:
68         stm_rel_start_activity_none();
69         break;
70     default:
71         /*Not accessible to this else (default).*/
72         break;
73     }
74 }
75
76 /****************************************/
77 /* Action function                      */
78 /*   STM : RelMain                      */
79 /*   State : restriction_mode_off( No 0 ) */
80 /*   Event : stt_restriction_mode_2_on( No 1 ) */
81 /****************************************/
82 static void ZREL_RelMains0e1( void )
83 {
84     ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINS1;
85     ZREL_RelMainState[ZREL_RELMAINS1F] = ( uint8_t )ZREL_RELRESTONS0;
86     ZREL_RelMains1StateEntry();
87 }
88
89 /****************************************/
90 /* Action function                      */
91 /*   STM : RelMain                      */
92 /*   State : restriction_mode_2_on( No 1 ) */
93 /*   Event : stt_restriction_mode_off( No 0 ) */
94 /****************************************/
95 static void ZREL_RelMains1e0( void )
96 {
97     ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINS0;
98     ZREL_RelMains0StateEntry();
99 }
100
101 /****************************************/
102 /* Action function                      */
103 /*   STM : RelRestOff                   */
104 /*   State : none( No 0 )               */
105 /*   Event : stt_crr_layer_apps_map_spl( No 0 ) */
106 /****************************************/
107 static void ZREL_RelRestOffs0e0( void )
108 {
109     ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS3;
110     stm_rel_start_activity_restriction_split_sub();
111 }
112
113 /****************************************/
114 /* Action function                      */
115 /*   STM : RelRestOff                   */
116 /*   State : none( No 0 )               */
117 /*   Event : stt_crr_layer_apps_spl_nml( No 1 ) */
118 /****************************************/
119 static void ZREL_RelRestOffs0e1( void )
120 {
121     ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS1;
122     stm_rel_start_activity_restriction_normal();
123 }
124
125 /****************************************/
126 /* Action function                      */
127 /*   STM : RelRestOff                   */
128 /*   State : none( No 0 )               */
129 /*   Event : ara_restriction_split_main( No 8 ) */
130 /****************************************/
131 static void ZREL_RelRestOffs0e8( void )
132 {
133     ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS2;
134     stm_rel_start_activity_restriction_split_main();
135 }
136
137 /****************************************/
138 /* Action function                      */
139 /*   STM : RelRestOff                   */
140 /*   State : none( No 0 )               */
141 /*   Event : stt_prv_layer_rst_none( No 13 ) */
142 /****************************************/
143 static void ZREL_RelRestOffs0e13( void )
144 {
145     stm_rel_start_activity_none();
146 }
147
148 /****************************************/
149 /* Action function                      */
150 /*   STM : RelRestOff                   */
151 /*   State : restriction_normal( No 1 ) */
152 /*   Event : stt_crr_layer_apps_spl_nml( No 1 ) */
153 /****************************************/
154 static void ZREL_RelRestOffs1e1( void )
155 {
156     stm_rel_start_activity_restriction_normal();
157 }
158
159 /****************************************/
160 /* Action function                      */
161 /*   STM : RelRestOff                   */
162 /*   State : restriction_normal( No 1 ) */
163 /*   Event : ELSE( No 4 )               */
164 /****************************************/
165 static void ZREL_RelRestOffs1e4( void )
166 {
167     ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS0;
168     stm_rel_start_activity_none();
169 }
170
171 /****************************************/
172 /* Action function                      */
173 /*   STM : RelRestOff                   */
174 /*   State : restriction_split_main( No 2 ) */
175 /*   Event : stt_prv_layer_rst_rst_spl_main( No 15 ) */
176 /****************************************/
177 static void ZREL_RelRestOffs2e15( void )
178 {
179     stm_rel_start_activity_restriction_split_main();
180 }
181
182 /****************************************/
183 /* Action function                      */
184 /*   STM : RelRestOff                   */
185 /*   State : restriction_split_sub( No 3 ) */
186 /*   Event : stt_crr_layer_apps_map_spl( No 0 ) */
187 /****************************************/
188 static void ZREL_RelRestOffs3e0( void )
189 {
190     stm_rel_start_activity_restriction_split_sub();
191 }
192
193 /****************************************/
194 /* Event appraisal function             */
195 /*   STM : RelMain                      */
196 /*   State : restriction_mode_off( No 0 ) */
197 /****************************************/
198 static void ZREL_RelMains0Event( void )
199 {
200     /*stt_restriction_mode_2_on*/
201     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On )
202     {
203         stm_rel_event_restriction_mode_2_on();
204         ZREL_RelMains0e1();
205     }
206     else
207     {
208         /*Else and default design have not done.*/
209         /*Please confirm the STM and design else and default.*/
210     }
211 }
212
213 /****************************************/
214 /* Event appraisal function             */
215 /*   STM : RelRestOff                   */
216 /*   State : none( No 0 )               */
217 /****************************************/
218 static void ZREL_RelRestOffs0Event( void )
219 {
220     /*stt_restriction_mode_1_on*/
221     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On )
222     {
223         /*stt_crr_layer_apps_changed*/
224         if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
225         {
226             /*stt_crr_layer_apps_map_spl*/
227             if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
228             {
229                 ZREL_RelRestOffs0e0();
230             }
231             /*stt_crr_layer_apps_spl_nml*/
232             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
233             {
234                 ZREL_RelRestOffs0e1();
235             }
236             /*stt_crr_layer_apps_spl_spl*/
237             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
238             {
239                 ZREL_RelRestOffs0e1();
240             }
241             /*stt_crr_layer_apps_gen_nml*/
242             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
243             {
244                 ZREL_RelRestOffs0e1();
245             }
246             else
247             {
248                 /*Else and default design have not done.*/
249                 /*Please confirm the STM and design else and default.*/
250             }
251         }
252         /*evt_activate*/
253         else if( g_stm_event == StmEvtNoActivate )
254         {
255             /*ctg_restriction*/
256             if( g_stm_category == StmCtgNoRestriction )
257             {
258                 /*ara_restriction_normal*/
259                 if( g_stm_area == StmAreaNoRestrictionNormal )
260                 {
261                     /*stt_crr_layer_apps_spl_nml*/
262                     if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
263                     {
264                         ZREL_RelRestOffs0e1();
265                     }
266                     /*stt_crr_layer_apps_map_spl*/
267                     else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
268                     {
269                         ZREL_RelRestOffs0e0();
270                     }
271                     else
272                     {
273                         /*Else and default design have not done.*/
274                         /*Please confirm the STM and design else and default.*/
275                     }
276                 }
277                 /*ara_restriction_split_main*/
278                 else if( g_stm_area == StmAreaNoRestrictionSplitMain )
279                 {
280                     ZREL_RelRestOffs0e8();
281                 }
282                 /*ara_restriction_split_sub*/
283                 else if( g_stm_area == StmAreaNoRestrictionSplitSub )
284                 {
285                     ZREL_RelRestOffs0e0();
286                 }
287                 else
288                 {
289                     /*Else and default design have not done.*/
290                     /*Please confirm the STM and design else and default.*/
291                 }
292             }
293             else
294             {
295                 /*Else and default design have not done.*/
296                 /*Please confirm the STM and design else and default.*/
297             }
298         }
299         else
300         {
301             /*Else and default design have not done.*/
302             /*Please confirm the STM and design else and default.*/
303         }
304     }
305     /*stt_restriction_mode_off*/
306     else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
307     {
308         /*evt_undo*/
309         if( g_stm_event == StmEvtNoUndo )
310         {
311             /*stt_prv_layer_rst_none*/
312             if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
313             {
314                 ZREL_RelRestOffs0e13();
315             }
316             /*stt_prv_layer_rst_rst_nml*/
317             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
318             {
319                 ZREL_RelRestOffs0e1();
320             }
321             /*stt_prv_layer_rst_rst_spl_main*/
322             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
323             {
324                 ZREL_RelRestOffs0e8();
325             }
326             /*stt_prv_layer_rst_rst_spl_sub*/
327             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
328             {
329                 ZREL_RelRestOffs0e0();
330             }
331             else
332             {
333                 /*Else and default design have not done.*/
334                 /*Please confirm the STM and design else and default.*/
335             }
336         }
337         else
338         {
339             /*Else and default design have not done.*/
340             /*Please confirm the STM and design else and default.*/
341         }
342     }
343     else
344     {
345         /*Else and default design have not done.*/
346         /*Please confirm the STM and design else and default.*/
347     }
348 }
349
350 /****************************************/
351 /* Event appraisal function             */
352 /*   STM : RelRestOff                   */
353 /*   State : restriction_normal( No 1 ) */
354 /****************************************/
355 static void ZREL_RelRestOffs1Event( void )
356 {
357     /*stt_restriction_mode_1_on*/
358     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On )
359     {
360         /*stt_crr_layer_apps_changed*/
361         if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
362         {
363             /*stt_crr_layer_apps_map_spl*/
364             if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
365             {
366                 ZREL_RelRestOffs0e0();
367             }
368             /*stt_crr_layer_apps_spl_nml*/
369             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
370             {
371                 ZREL_RelRestOffs1e1();
372             }
373             /*stt_crr_layer_apps_spl_spl*/
374             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
375             {
376                 ZREL_RelRestOffs1e1();
377             }
378             /*stt_crr_layer_apps_gen_nml*/
379             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
380             {
381                 ZREL_RelRestOffs1e1();
382             }
383             else
384             {
385                 ZREL_RelRestOffs1e4();
386             }
387         }
388         /*stt_crr_layer_hs_changed*/
389         else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
390         {
391             /*stt_crr_layer_hs_hms*/
392             if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
393             {
394                 ZREL_RelRestOffs1e4();
395             }
396             else
397             {
398                 /*Else and default design have not done.*/
399                 /*Please confirm the STM and design else and default.*/
400             }
401         }
402         /*evt_activate*/
403         else if( g_stm_event == StmEvtNoActivate )
404         {
405             /*ctg_restriction*/
406             if( g_stm_category == StmCtgNoRestriction )
407             {
408                 /*ara_restriction_normal*/
409                 if( g_stm_area == StmAreaNoRestrictionNormal )
410                 {
411                     /*stt_crr_layer_apps_map_spl*/
412                     if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
413                     {
414                         ZREL_RelRestOffs0e0();
415                     }
416                     else
417                     {
418                         /*Else and default design have not done.*/
419                         /*Please confirm the STM and design else and default.*/
420                     }
421                 }
422                 /*ara_restriction_split_main*/
423                 else if( g_stm_area == StmAreaNoRestrictionSplitMain )
424                 {
425                     ZREL_RelRestOffs0e8();
426                 }
427                 /*ara_restriction_split_sub*/
428                 else if( g_stm_area == StmAreaNoRestrictionSplitSub )
429                 {
430                     ZREL_RelRestOffs0e0();
431                 }
432                 else
433                 {
434                     /*Else and default design have not done.*/
435                     /*Please confirm the STM and design else and default.*/
436                 }
437             }
438             /*ctg_homescreen*/
439             else if( g_stm_category == StmCtgNoHomescreen )
440             {
441                 /*ara_fullscreen*/
442                 if( g_stm_area == StmAreaNoFullscreen )
443                 {
444                     ZREL_RelRestOffs1e4();
445                 }
446                 else
447                 {
448                     /*Else and default design have not done.*/
449                     /*Please confirm the STM and design else and default.*/
450                 }
451             }
452             else
453             {
454                 /*Else and default design have not done.*/
455                 /*Please confirm the STM and design else and default.*/
456             }
457         }
458         /*evt_deactivate*/
459         else if( g_stm_event == StmEvtNoDeactivate )
460         {
461             /*ctg_restriction*/
462             if( g_stm_category == StmCtgNoRestriction )
463             {
464                 ZREL_RelRestOffs1e4();
465             }
466             else
467             {
468                 /*Else and default design have not done.*/
469                 /*Please confirm the STM and design else and default.*/
470             }
471         }
472         else
473         {
474             /*Else and default design have not done.*/
475             /*Please confirm the STM and design else and default.*/
476         }
477     }
478     /*stt_restriction_mode_off*/
479     else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
480     {
481         /*stt_prv_layer_rst_not_none*/
482         if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
483         {
484             ZREL_RelRestOffs1e4();
485         }
486         /*evt_undo*/
487         else if( g_stm_event == StmEvtNoUndo )
488         {
489             /*stt_prv_layer_rst_none*/
490             if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
491             {
492                 ZREL_RelRestOffs1e4();
493             }
494             /*stt_prv_layer_rst_rst_nml*/
495             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
496             {
497                 ZREL_RelRestOffs1e1();
498             }
499             /*stt_prv_layer_rst_rst_spl_main*/
500             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
501             {
502                 ZREL_RelRestOffs0e8();
503             }
504             /*stt_prv_layer_rst_rst_spl_sub*/
505             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
506             {
507                 ZREL_RelRestOffs0e0();
508             }
509             else
510             {
511                 /*Else and default design have not done.*/
512                 /*Please confirm the STM and design else and default.*/
513             }
514         }
515         else
516         {
517             /*Else and default design have not done.*/
518             /*Please confirm the STM and design else and default.*/
519         }
520     }
521     else
522     {
523         /*Else and default design have not done.*/
524         /*Please confirm the STM and design else and default.*/
525     }
526 }
527
528 /****************************************/
529 /* Event appraisal function             */
530 /*   STM : RelRestOff                   */
531 /*   State : restriction_split_main( No 2 ) */
532 /****************************************/
533 static void ZREL_RelRestOffs2Event( void )
534 {
535     /*stt_restriction_mode_1_on*/
536     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On )
537     {
538         /*stt_crr_layer_apps_changed*/
539         if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
540         {
541             /*stt_crr_layer_apps_map_spl*/
542             if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
543             {
544                 ZREL_RelRestOffs0e0();
545             }
546             /*stt_crr_layer_apps_spl_nml*/
547             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
548             {
549                 ZREL_RelRestOffs0e1();
550             }
551             /*stt_crr_layer_apps_spl_spl*/
552             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
553             {
554                 ZREL_RelRestOffs0e1();
555             }
556             /*stt_crr_layer_apps_gen_nml*/
557             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
558             {
559                 ZREL_RelRestOffs0e1();
560             }
561             else
562             {
563                 ZREL_RelRestOffs1e4();
564             }
565         }
566         /*stt_crr_layer_hs_changed*/
567         else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
568         {
569             /*stt_crr_layer_hs_hms*/
570             if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
571             {
572                 ZREL_RelRestOffs1e4();
573             }
574             else
575             {
576                 /*Else and default design have not done.*/
577                 /*Please confirm the STM and design else and default.*/
578             }
579         }
580         /*evt_activate*/
581         else if( g_stm_event == StmEvtNoActivate )
582         {
583             /*ctg_restriction*/
584             if( g_stm_category == StmCtgNoRestriction )
585             {
586                 /*ara_restriction_normal*/
587                 if( g_stm_area == StmAreaNoRestrictionNormal )
588                 {
589                     /*stt_crr_layer_apps_spl_nml*/
590                     if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
591                     {
592                         ZREL_RelRestOffs0e1();
593                     }
594                     /*stt_crr_layer_apps_map_spl*/
595                     else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
596                     {
597                         ZREL_RelRestOffs0e0();
598                     }
599                     else
600                     {
601                         /*Else and default design have not done.*/
602                         /*Please confirm the STM and design else and default.*/
603                     }
604                 }
605                 /*ara_restriction_split_sub*/
606                 else if( g_stm_area == StmAreaNoRestrictionSplitSub )
607                 {
608                     ZREL_RelRestOffs0e1();
609                 }
610                 else
611                 {
612                     /*Else and default design have not done.*/
613                     /*Please confirm the STM and design else and default.*/
614                 }
615             }
616             /*ctg_homescreen*/
617             else if( g_stm_category == StmCtgNoHomescreen )
618             {
619                 /*ara_fullscreen*/
620                 if( g_stm_area == StmAreaNoFullscreen )
621                 {
622                     ZREL_RelRestOffs1e4();
623                 }
624                 else
625                 {
626                     /*Else and default design have not done.*/
627                     /*Please confirm the STM and design else and default.*/
628                 }
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         /*evt_deactivate*/
637         else if( g_stm_event == StmEvtNoDeactivate )
638         {
639             /*ctg_restriction*/
640             if( g_stm_category == StmCtgNoRestriction )
641             {
642                 ZREL_RelRestOffs1e4();
643             }
644             else
645             {
646                 /*Else and default design have not done.*/
647                 /*Please confirm the STM and design else and default.*/
648             }
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     /*stt_restriction_mode_off*/
657     else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
658     {
659         /*stt_prv_layer_rst_not_none*/
660         if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
661         {
662             ZREL_RelRestOffs1e4();
663         }
664         /*evt_undo*/
665         else if( g_stm_event == StmEvtNoUndo )
666         {
667             /*stt_prv_layer_rst_none*/
668             if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
669             {
670                 ZREL_RelRestOffs1e4();
671             }
672             /*stt_prv_layer_rst_rst_nml*/
673             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
674             {
675                 ZREL_RelRestOffs0e1();
676             }
677             /*stt_prv_layer_rst_rst_spl_main*/
678             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
679             {
680                 ZREL_RelRestOffs2e15();
681             }
682             /*stt_prv_layer_rst_rst_spl_sub*/
683             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
684             {
685                 ZREL_RelRestOffs0e0();
686             }
687             else
688             {
689                 /*Else and default design have not done.*/
690                 /*Please confirm the STM and design else and default.*/
691             }
692         }
693         else
694         {
695             /*Else and default design have not done.*/
696             /*Please confirm the STM and design else and default.*/
697         }
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
706 /****************************************/
707 /* Event appraisal function             */
708 /*   STM : RelRestOff                   */
709 /*   State : restriction_split_sub( No 3 ) */
710 /****************************************/
711 static void ZREL_RelRestOffs3Event( void )
712 {
713     /*stt_restriction_mode_1_on*/
714     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On )
715     {
716         /*stt_crr_layer_apps_changed*/
717         if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
718         {
719             /*stt_crr_layer_apps_map_spl*/
720             if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
721             {
722                 ZREL_RelRestOffs3e0();
723             }
724             /*stt_crr_layer_apps_spl_nml*/
725             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
726             {
727                 ZREL_RelRestOffs0e1();
728             }
729             /*stt_crr_layer_apps_spl_spl*/
730             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
731             {
732                 ZREL_RelRestOffs0e1();
733             }
734             /*stt_crr_layer_apps_gen_nml*/
735             else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
736             {
737                 ZREL_RelRestOffs0e1();
738             }
739             else
740             {
741                 ZREL_RelRestOffs1e4();
742             }
743         }
744         /*stt_crr_layer_hs_changed*/
745         else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
746         {
747             /*stt_crr_layer_hs_hms*/
748             if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
749             {
750                 ZREL_RelRestOffs1e4();
751             }
752             else
753             {
754                 /*Else and default design have not done.*/
755                 /*Please confirm the STM and design else and default.*/
756             }
757         }
758         /*evt_activate*/
759         else if( g_stm_event == StmEvtNoActivate )
760         {
761             /*ctg_restriction*/
762             if( g_stm_category == StmCtgNoRestriction )
763             {
764                 /*ara_restriction_normal*/
765                 if( g_stm_area == StmAreaNoRestrictionNormal )
766                 {
767                     /*stt_crr_layer_apps_spl_nml*/
768                     if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
769                     {
770                         ZREL_RelRestOffs0e1();
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                 /*ara_restriction_split_main*/
779                 else if( g_stm_area == StmAreaNoRestrictionSplitMain )
780                 {
781                     ZREL_RelRestOffs0e1();
782                 }
783                 else
784                 {
785                     /*Else and default design have not done.*/
786                     /*Please confirm the STM and design else and default.*/
787                 }
788             }
789             /*ctg_homescreen*/
790             else if( g_stm_category == StmCtgNoHomescreen )
791             {
792                 /*ara_fullscreen*/
793                 if( g_stm_area == StmAreaNoFullscreen )
794                 {
795                     ZREL_RelRestOffs1e4();
796                 }
797                 else
798                 {
799                     /*Else and default design have not done.*/
800                     /*Please confirm the STM and design else and default.*/
801                 }
802             }
803             else
804             {
805                 /*Else and default design have not done.*/
806                 /*Please confirm the STM and design else and default.*/
807             }
808         }
809         /*evt_deactivate*/
810         else if( g_stm_event == StmEvtNoDeactivate )
811         {
812             /*ctg_restriction*/
813             if( g_stm_category == StmCtgNoRestriction )
814             {
815                 ZREL_RelRestOffs1e4();
816             }
817             else
818             {
819                 /*Else and default design have not done.*/
820                 /*Please confirm the STM and design else and default.*/
821             }
822         }
823         else
824         {
825             /*Else and default design have not done.*/
826             /*Please confirm the STM and design else and default.*/
827         }
828     }
829     /*stt_restriction_mode_off*/
830     else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
831     {
832         /*stt_prv_layer_rst_not_none*/
833         if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
834         {
835             ZREL_RelRestOffs1e4();
836         }
837         /*evt_undo*/
838         else if( g_stm_event == StmEvtNoUndo )
839         {
840             /*stt_prv_layer_rst_none*/
841             if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
842             {
843                 ZREL_RelRestOffs1e4();
844             }
845             /*stt_prv_layer_rst_rst_nml*/
846             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
847             {
848                 ZREL_RelRestOffs0e1();
849             }
850             /*stt_prv_layer_rst_rst_spl_main*/
851             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
852             {
853                 ZREL_RelRestOffs0e8();
854             }
855             /*stt_prv_layer_rst_rst_spl_sub*/
856             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
857             {
858                 ZREL_RelRestOffs3e0();
859             }
860             else
861             {
862                 /*Else and default design have not done.*/
863                 /*Please confirm the STM and design else and default.*/
864             }
865         }
866         else
867         {
868             /*Else and default design have not done.*/
869             /*Please confirm the STM and design else and default.*/
870         }
871     }
872     else
873     {
874         /*Else and default design have not done.*/
875         /*Please confirm the STM and design else and default.*/
876     }
877 }
878
879 /****************************************/
880 /* Event appraisal function             */
881 /*   STM : RelMain                      */
882 /*   State : restriction_mode_2_on( No 1 ) */
883 /****************************************/
884 static void ZREL_RelMains1Event( void )
885 {
886     /*stt_restriction_mode_off*/
887     if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff )
888     {
889         stm_rel_event_restriction_mode_off();
890         ZREL_RelMains1e0();
891     }
892     else
893     {
894         /*Else and default design have not done.*/
895         /*Please confirm the STM and design else and default.*/
896     }
897 }
898
899 /****************************************/
900 /* Event appraisal function             */
901 /*   STM : RelRestOn                    */
902 /*   State : none( No 0 )               */
903 /****************************************/
904 static void ZREL_RelRestOns0Event( void )
905 {
906 }
907
908 /****************************************/
909 /* Event call function                  */
910 /*   STM : RelMain                      */
911 /****************************************/
912 void stm_rel_event_call( void )
913 {
914     stm_rel_start_stm();
915     switch( ZREL_RelMainState[ZREL_RELMAIN] )
916     {
917     case ZREL_RELMAINS0:
918         switch( ZREL_RelMainState[ZREL_RELMAINS0F] )
919         {
920         case ZREL_RELRESTOFFS0:
921             ZREL_RelRestOffs0Event();
922             break;
923         case ZREL_RELRESTOFFS1:
924             ZREL_RelRestOffs1Event();
925             break;
926         case ZREL_RELRESTOFFS2:
927             ZREL_RelRestOffs2Event();
928             break;
929         case ZREL_RELRESTOFFS3:
930             ZREL_RelRestOffs3Event();
931             break;
932         default:
933             /*Not accessible to this else (default).*/
934             break;
935         }
936         ZREL_RelMains0Event();
937         break;
938     case ZREL_RELMAINS1:
939         switch( ZREL_RelMainState[ZREL_RELMAINS1F] )
940         {
941         case ZREL_RELRESTONS0:
942             ZREL_RelRestOns0Event();
943             break;
944         default:
945             /*Not accessible to this else (default).*/
946             break;
947         }
948         ZREL_RelMains1Event();
949         break;
950     default:
951         /*Not accessible to this else (default).*/
952         break;
953     }
954 }
955
956 /****************************************/
957 /* Initial function                     */
958 /*   STM : RelMain                      */
959 /****************************************/
960 void stm_rel_initialize( void )
961 {
962     ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINS0;
963     ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS0;
964     ZREL_RelMainState[ZREL_RELMAINS1F] = ( uint8_t )ZREL_RELRESTONS0;
965     ZREL_RelMains0StateEntry();
966 }
967
968 /****************************************/
969 /* Terminate function                   */
970 /*   STM : RelMain                      */
971 /****************************************/
972 void ZREL_RelMainTerminate( void )
973 {
974     ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINTERMINATE;
975 }
976