add source for ces2019
[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_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_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_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_on*/
201     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
202     {
203         stm_rel_event_restriction_mode_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_off*/
221     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
222     {
223         /*stt_lightstatus_brake_off*/
224         if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
225         {
226             /*stt_crr_layer_apps_changed*/
227             if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
228             {
229                 /*stt_crr_layer_apps_map_spl*/
230                 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
231                 {
232                     ZREL_RelRestOffs0e0();
233                 }
234                 /*stt_crr_layer_apps_spl_nml*/
235                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
236                 {
237                     ZREL_RelRestOffs0e1();
238                 }
239                 /*stt_crr_layer_apps_spl_spl*/
240                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
241                 {
242                     ZREL_RelRestOffs0e1();
243                 }
244                 /*stt_crr_layer_apps_gen_nml*/
245                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
246                 {
247                     ZREL_RelRestOffs0e1();
248                 }
249                 else
250                 {
251                     /*Else and default design have not done.*/
252                     /*Please confirm the STM and design else and default.*/
253                 }
254             }
255             /*evt_activate*/
256             else if( g_stm_event == StmEvtNoActivate )
257             {
258                 /*ctg_restriction*/
259                 if( g_stm_category == StmCtgNoRestriction )
260                 {
261                     /*ara_restriction_normal*/
262                     if( g_stm_area == StmAreaNoRestrictionNormal )
263                     {
264                         /*stt_crr_layer_apps_spl_nml*/
265                         if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
266                         {
267                             ZREL_RelRestOffs0e1();
268                         }
269                         /*stt_crr_layer_apps_map_spl*/
270                         else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
271                         {
272                             ZREL_RelRestOffs0e0();
273                         }
274                         else
275                         {
276                             /*Else and default design have not done.*/
277                             /*Please confirm the STM and design else and default.*/
278                         }
279                     }
280                     /*ara_restriction_split_main*/
281                     else if( g_stm_area == StmAreaNoRestrictionSplitMain )
282                     {
283                         ZREL_RelRestOffs0e8();
284                     }
285                     /*ara_restriction_split_sub*/
286                     else if( g_stm_area == StmAreaNoRestrictionSplitSub )
287                     {
288                         ZREL_RelRestOffs0e0();
289                     }
290                     else
291                     {
292                         /*Else and default design have not done.*/
293                         /*Please confirm the STM and design else and default.*/
294                     }
295                 }
296                 else
297                 {
298                     /*Else and default design have not done.*/
299                     /*Please confirm the STM and design else and default.*/
300                 }
301             }
302             else
303             {
304                 /*Else and default design have not done.*/
305                 /*Please confirm the STM and design else and default.*/
306             }
307         }
308         /*evt_undo*/
309         else 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_off*/
358     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
359     {
360         /*stt_lightstatus_brake_off*/
361         if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
362         {
363             /*stt_crr_layer_apps_changed*/
364             if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
365             {
366                 /*stt_crr_layer_apps_map_spl*/
367                 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
368                 {
369                     ZREL_RelRestOffs0e0();
370                 }
371                 /*stt_crr_layer_apps_spl_nml*/
372                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
373                 {
374                     ZREL_RelRestOffs1e1();
375                 }
376                 /*stt_crr_layer_apps_spl_spl*/
377                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
378                 {
379                     ZREL_RelRestOffs1e1();
380                 }
381                 /*stt_crr_layer_apps_gen_nml*/
382                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
383                 {
384                     ZREL_RelRestOffs1e1();
385                 }
386                 else
387                 {
388                     ZREL_RelRestOffs1e4();
389                 }
390             }
391             /*stt_crr_layer_hs_changed*/
392             else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
393             {
394                 /*stt_crr_layer_hs_hms*/
395                 if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
396                 {
397                     ZREL_RelRestOffs1e4();
398                 }
399                 else
400                 {
401                     /*Else and default design have not done.*/
402                     /*Please confirm the STM and design else and default.*/
403                 }
404             }
405             /*evt_activate*/
406             else if( g_stm_event == StmEvtNoActivate )
407             {
408                 /*ctg_restriction*/
409                 if( g_stm_category == StmCtgNoRestriction )
410                 {
411                     /*ara_restriction_normal*/
412                     if( g_stm_area == StmAreaNoRestrictionNormal )
413                     {
414                         /*stt_crr_layer_apps_map_spl*/
415                         if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
416                         {
417                             ZREL_RelRestOffs0e0();
418                         }
419                         else
420                         {
421                             /*Else and default design have not done.*/
422                             /*Please confirm the STM and design else and default.*/
423                         }
424                     }
425                     /*ara_restriction_split_main*/
426                     else if( g_stm_area == StmAreaNoRestrictionSplitMain )
427                     {
428                         ZREL_RelRestOffs0e8();
429                     }
430                     /*ara_restriction_split_sub*/
431                     else if( g_stm_area == StmAreaNoRestrictionSplitSub )
432                     {
433                         ZREL_RelRestOffs0e0();
434                     }
435                     else
436                     {
437                         /*Else and default design have not done.*/
438                         /*Please confirm the STM and design else and default.*/
439                     }
440                 }
441                 /*ctg_homescreen*/
442                 else if( g_stm_category == StmCtgNoHomescreen )
443                 {
444                     /*ara_fullscreen*/
445                     if( g_stm_area == StmAreaNoFullscreen )
446                     {
447                         ZREL_RelRestOffs1e4();
448                     }
449                     else
450                     {
451                         /*Else and default design have not done.*/
452                         /*Please confirm the STM and design else and default.*/
453                     }
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             /*evt_deactivate*/
462             else if( g_stm_event == StmEvtNoDeactivate )
463             {
464                 /*ctg_restriction*/
465                 if( g_stm_category == StmCtgNoRestriction )
466                 {
467                     ZREL_RelRestOffs1e4();
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         /*stt_lightstatus_brake_on*/
482         else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
483         {
484             /*stt_prv_layer_rst_not_none*/
485             if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
486             {
487                 ZREL_RelRestOffs1e4();
488             }
489             else
490             {
491                 /*Else and default design have not done.*/
492                 /*Please confirm the STM and design else and default.*/
493             }
494         }
495         /*evt_undo*/
496         else if( g_stm_event == StmEvtNoUndo )
497         {
498             /*stt_prv_layer_rst_none*/
499             if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
500             {
501                 ZREL_RelRestOffs1e4();
502             }
503             /*stt_prv_layer_rst_rst_nml*/
504             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
505             {
506                 ZREL_RelRestOffs1e1();
507             }
508             /*stt_prv_layer_rst_rst_spl_main*/
509             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
510             {
511                 ZREL_RelRestOffs0e8();
512             }
513             /*stt_prv_layer_rst_rst_spl_sub*/
514             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
515             {
516                 ZREL_RelRestOffs0e0();
517             }
518             else
519             {
520                 /*Else and default design have not done.*/
521                 /*Please confirm the STM and design else and default.*/
522             }
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
537 /****************************************/
538 /* Event appraisal function             */
539 /*   STM : RelRestOff                   */
540 /*   State : restriction_split_main( No 2 ) */
541 /****************************************/
542 static void ZREL_RelRestOffs2Event( void )
543 {
544     /*stt_restriction_mode_off*/
545     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
546     {
547         /*stt_lightstatus_brake_off*/
548         if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
549         {
550             /*stt_crr_layer_apps_changed*/
551             if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
552             {
553                 /*stt_crr_layer_apps_map_spl*/
554                 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
555                 {
556                     ZREL_RelRestOffs0e0();
557                 }
558                 /*stt_crr_layer_apps_spl_nml*/
559                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
560                 {
561                     ZREL_RelRestOffs0e1();
562                 }
563                 /*stt_crr_layer_apps_spl_spl*/
564                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
565                 {
566                     ZREL_RelRestOffs0e1();
567                 }
568                 /*stt_crr_layer_apps_gen_nml*/
569                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
570                 {
571                     ZREL_RelRestOffs0e1();
572                 }
573                 else
574                 {
575                     ZREL_RelRestOffs1e4();
576                 }
577             }
578             /*stt_crr_layer_hs_changed*/
579             else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
580             {
581                 /*stt_crr_layer_hs_hms*/
582                 if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
583                 {
584                     ZREL_RelRestOffs1e4();
585                 }
586                 else
587                 {
588                     /*Else and default design have not done.*/
589                     /*Please confirm the STM and design else and default.*/
590                 }
591             }
592             /*evt_activate*/
593             else if( g_stm_event == StmEvtNoActivate )
594             {
595                 /*ctg_restriction*/
596                 if( g_stm_category == StmCtgNoRestriction )
597                 {
598                     /*ara_restriction_normal*/
599                     if( g_stm_area == StmAreaNoRestrictionNormal )
600                     {
601                         /*stt_crr_layer_apps_spl_nml*/
602                         if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
603                         {
604                             ZREL_RelRestOffs0e1();
605                         }
606                         /*stt_crr_layer_apps_map_spl*/
607                         else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
608                         {
609                             ZREL_RelRestOffs0e0();
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                     /*ara_restriction_split_sub*/
618                     else if( g_stm_area == StmAreaNoRestrictionSplitSub )
619                     {
620                         ZREL_RelRestOffs0e1();
621                     }
622                     else
623                     {
624                         /*Else and default design have not done.*/
625                         /*Please confirm the STM and design else and default.*/
626                     }
627                 }
628                 /*ctg_homescreen*/
629                 else if( g_stm_category == StmCtgNoHomescreen )
630                 {
631                     /*ara_fullscreen*/
632                     if( g_stm_area == StmAreaNoFullscreen )
633                     {
634                         ZREL_RelRestOffs1e4();
635                     }
636                     else
637                     {
638                         /*Else and default design have not done.*/
639                         /*Please confirm the STM and design else and default.*/
640                     }
641                 }
642                 else
643                 {
644                     /*Else and default design have not done.*/
645                     /*Please confirm the STM and design else and default.*/
646                 }
647             }
648             /*evt_deactivate*/
649             else if( g_stm_event == StmEvtNoDeactivate )
650             {
651                 /*ctg_restriction*/
652                 if( g_stm_category == StmCtgNoRestriction )
653                 {
654                     ZREL_RelRestOffs1e4();
655                 }
656                 else
657                 {
658                     /*Else and default design have not done.*/
659                     /*Please confirm the STM and design else and default.*/
660                 }
661             }
662             else
663             {
664                 /*Else and default design have not done.*/
665                 /*Please confirm the STM and design else and default.*/
666             }
667         }
668         /*stt_lightstatus_brake_on*/
669         else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
670         {
671             /*stt_prv_layer_rst_not_none*/
672             if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
673             {
674                 ZREL_RelRestOffs1e4();
675             }
676             else
677             {
678                 /*Else and default design have not done.*/
679                 /*Please confirm the STM and design else and default.*/
680             }
681         }
682         /*evt_undo*/
683         else if( g_stm_event == StmEvtNoUndo )
684         {
685             /*stt_prv_layer_rst_none*/
686             if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
687             {
688                 ZREL_RelRestOffs1e4();
689             }
690             /*stt_prv_layer_rst_rst_nml*/
691             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
692             {
693                 ZREL_RelRestOffs0e1();
694             }
695             /*stt_prv_layer_rst_rst_spl_main*/
696             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
697             {
698                 ZREL_RelRestOffs2e15();
699             }
700             /*stt_prv_layer_rst_rst_spl_sub*/
701             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
702             {
703                 ZREL_RelRestOffs0e0();
704             }
705             else
706             {
707                 /*Else and default design have not done.*/
708                 /*Please confirm the STM and design else and default.*/
709             }
710         }
711         else
712         {
713             /*Else and default design have not done.*/
714             /*Please confirm the STM and design else and default.*/
715         }
716     }
717     else
718     {
719         /*Else and default design have not done.*/
720         /*Please confirm the STM and design else and default.*/
721     }
722 }
723
724 /****************************************/
725 /* Event appraisal function             */
726 /*   STM : RelRestOff                   */
727 /*   State : restriction_split_sub( No 3 ) */
728 /****************************************/
729 static void ZREL_RelRestOffs3Event( void )
730 {
731     /*stt_restriction_mode_off*/
732     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
733     {
734         /*stt_lightstatus_brake_off*/
735         if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
736         {
737             /*stt_crr_layer_apps_changed*/
738             if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
739             {
740                 /*stt_crr_layer_apps_map_spl*/
741                 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
742                 {
743                     ZREL_RelRestOffs3e0();
744                 }
745                 /*stt_crr_layer_apps_spl_nml*/
746                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
747                 {
748                     ZREL_RelRestOffs0e1();
749                 }
750                 /*stt_crr_layer_apps_spl_spl*/
751                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
752                 {
753                     ZREL_RelRestOffs0e1();
754                 }
755                 /*stt_crr_layer_apps_gen_nml*/
756                 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
757                 {
758                     ZREL_RelRestOffs0e1();
759                 }
760                 else
761                 {
762                     ZREL_RelRestOffs1e4();
763                 }
764             }
765             /*stt_crr_layer_hs_changed*/
766             else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
767             {
768                 /*stt_crr_layer_hs_hms*/
769                 if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
770                 {
771                     ZREL_RelRestOffs1e4();
772                 }
773                 else
774                 {
775                     /*Else and default design have not done.*/
776                     /*Please confirm the STM and design else and default.*/
777                 }
778             }
779             /*evt_activate*/
780             else if( g_stm_event == StmEvtNoActivate )
781             {
782                 /*ctg_restriction*/
783                 if( g_stm_category == StmCtgNoRestriction )
784                 {
785                     /*ara_restriction_normal*/
786                     if( g_stm_area == StmAreaNoRestrictionNormal )
787                     {
788                         /*stt_crr_layer_apps_spl_nml*/
789                         if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
790                         {
791                             ZREL_RelRestOffs0e1();
792                         }
793                         else
794                         {
795                             /*Else and default design have not done.*/
796                             /*Please confirm the STM and design else and default.*/
797                         }
798                     }
799                     /*ara_restriction_split_main*/
800                     else if( g_stm_area == StmAreaNoRestrictionSplitMain )
801                     {
802                         ZREL_RelRestOffs0e1();
803                     }
804                     else
805                     {
806                         /*Else and default design have not done.*/
807                         /*Please confirm the STM and design else and default.*/
808                     }
809                 }
810                 /*ctg_homescreen*/
811                 else if( g_stm_category == StmCtgNoHomescreen )
812                 {
813                     /*ara_fullscreen*/
814                     if( g_stm_area == StmAreaNoFullscreen )
815                     {
816                         ZREL_RelRestOffs1e4();
817                     }
818                     else
819                     {
820                         /*Else and default design have not done.*/
821                         /*Please confirm the STM and design else and default.*/
822                     }
823                 }
824                 else
825                 {
826                     /*Else and default design have not done.*/
827                     /*Please confirm the STM and design else and default.*/
828                 }
829             }
830             /*evt_deactivate*/
831             else if( g_stm_event == StmEvtNoDeactivate )
832             {
833                 /*ctg_restriction*/
834                 if( g_stm_category == StmCtgNoRestriction )
835                 {
836                     ZREL_RelRestOffs1e4();
837                 }
838                 else
839                 {
840                     /*Else and default design have not done.*/
841                     /*Please confirm the STM and design else and default.*/
842                 }
843             }
844             else
845             {
846                 /*Else and default design have not done.*/
847                 /*Please confirm the STM and design else and default.*/
848             }
849         }
850         /*stt_lightstatus_brake_on*/
851         else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
852         {
853             /*stt_prv_layer_rst_not_none*/
854             if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
855             {
856                 ZREL_RelRestOffs1e4();
857             }
858             else
859             {
860                 /*Else and default design have not done.*/
861                 /*Please confirm the STM and design else and default.*/
862             }
863         }
864         /*evt_undo*/
865         else if( g_stm_event == StmEvtNoUndo )
866         {
867             /*stt_prv_layer_rst_none*/
868             if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
869             {
870                 ZREL_RelRestOffs1e4();
871             }
872             /*stt_prv_layer_rst_rst_nml*/
873             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
874             {
875                 ZREL_RelRestOffs0e1();
876             }
877             /*stt_prv_layer_rst_rst_spl_main*/
878             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
879             {
880                 ZREL_RelRestOffs0e8();
881             }
882             /*stt_prv_layer_rst_rst_spl_sub*/
883             else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
884             {
885                 ZREL_RelRestOffs3e0();
886             }
887             else
888             {
889                 /*Else and default design have not done.*/
890                 /*Please confirm the STM and design else and default.*/
891             }
892         }
893         else
894         {
895             /*Else and default design have not done.*/
896             /*Please confirm the STM and design else and default.*/
897         }
898     }
899     else
900     {
901         /*Else and default design have not done.*/
902         /*Please confirm the STM and design else and default.*/
903     }
904 }
905
906 /****************************************/
907 /* Event appraisal function             */
908 /*   STM : RelMain                      */
909 /*   State : restriction_mode_on( No 1 )*/
910 /****************************************/
911 static void ZREL_RelMains1Event( void )
912 {
913     /*stt_restriction_mode_off*/
914     if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
915     {
916         stm_rel_event_restriction_mode_off();
917         ZREL_RelMains1e0();
918     }
919     else
920     {
921         /*Else and default design have not done.*/
922         /*Please confirm the STM and design else and default.*/
923     }
924 }
925
926 /****************************************/
927 /* Event appraisal function             */
928 /*   STM : RelRestOn                    */
929 /*   State : none( No 0 )               */
930 /****************************************/
931 static void ZREL_RelRestOns0Event( void )
932 {
933 }
934
935 /****************************************/
936 /* Event call function                  */
937 /*   STM : RelMain                      */
938 /****************************************/
939 void stm_rel_event_call( void )
940 {
941     stm_rel_start_stm();
942     switch( ZREL_RelMainState[ZREL_RELMAIN] )
943     {
944     case ZREL_RELMAINS0:
945         switch( ZREL_RelMainState[ZREL_RELMAINS0F] )
946         {
947         case ZREL_RELRESTOFFS0:
948             ZREL_RelRestOffs0Event();
949             break;
950         case ZREL_RELRESTOFFS1:
951             ZREL_RelRestOffs1Event();
952             break;
953         case ZREL_RELRESTOFFS2:
954             ZREL_RelRestOffs2Event();
955             break;
956         case ZREL_RELRESTOFFS3:
957             ZREL_RelRestOffs3Event();
958             break;
959         default:
960             /*Not accessible to this else (default).*/
961             break;
962         }
963         ZREL_RelMains0Event();
964         break;
965     case ZREL_RELMAINS1:
966         switch( ZREL_RelMainState[ZREL_RELMAINS1F] )
967         {
968         case ZREL_RELRESTONS0:
969             ZREL_RelRestOns0Event();
970             break;
971         default:
972             /*Not accessible to this else (default).*/
973             break;
974         }
975         ZREL_RelMains1Event();
976         break;
977     default:
978         /*Not accessible to this else (default).*/
979         break;
980     }
981 }
982
983 /****************************************/
984 /* Initial function                     */
985 /*   STM : RelMain                      */
986 /****************************************/
987 void stm_rel_initialize( void )
988 {
989     ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINS0;
990     ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS0;
991     ZREL_RelMainState[ZREL_RELMAINS1F] = ( uint8_t )ZREL_RELRESTONS0;
992     ZREL_RelMains0StateEntry();
993 }
994
995 /****************************************/
996 /* Terminate function                   */
997 /*   STM : RelMain                      */
998 /****************************************/
999 void ZREL_RelMainTerminate( void )
1000 {
1001     ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINTERMINATE;
1002 }
1003