1 /************************************************************/
3 /* RelMain State transition model source file */
4 /* ZIPC Designer Version 1.2.0 */
5 /************************************************************/
6 #include "../ZST_include.h"
8 /* State management variable */
9 static uint8_t ZREL_RelMainState[ZREL_RELMAINSTATENOMAX];
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 );
31 /****************************************/
32 /* State start activity function */
34 /* State : restriction_mode_off( No 0 ) */
35 /****************************************/
36 static void ZREL_RelMains0StateEntry( void )
38 switch( ZREL_RelMainState[ZREL_RELMAINS0F] )
40 case ZREL_RELRESTOFFS0:
41 stm_rel_start_activity_none();
43 case ZREL_RELRESTOFFS1:
44 stm_rel_start_activity_restriction_normal();
46 case ZREL_RELRESTOFFS2:
47 stm_rel_start_activity_restriction_split_main();
49 case ZREL_RELRESTOFFS3:
50 stm_rel_start_activity_restriction_split_sub();
53 /*Not accessible to this else (default).*/
58 /****************************************/
59 /* State start activity function */
61 /* State : restriction_mode_on( No 1 )*/
62 /****************************************/
63 static void ZREL_RelMains1StateEntry( void )
65 switch( ZREL_RelMainState[ZREL_RELMAINS1F] )
67 case ZREL_RELRESTONS0:
68 stm_rel_start_activity_none();
71 /*Not accessible to this else (default).*/
76 /****************************************/
79 /* State : restriction_mode_off( No 0 ) */
80 /* Event : stt_restriction_mode_on( No 1 ) */
81 /****************************************/
82 static void ZREL_RelMains0e1( void )
84 ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINS1;
85 ZREL_RelMainState[ZREL_RELMAINS1F] = ( uint8_t )ZREL_RELRESTONS0;
86 ZREL_RelMains1StateEntry();
89 /****************************************/
92 /* State : restriction_mode_on( No 1 )*/
93 /* Event : stt_restriction_mode_off( No 0 ) */
94 /****************************************/
95 static void ZREL_RelMains1e0( void )
97 ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINS0;
98 ZREL_RelMains0StateEntry();
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 )
109 ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS3;
110 stm_rel_start_activity_restriction_split_sub();
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 )
121 ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS1;
122 stm_rel_start_activity_restriction_normal();
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 )
133 ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS2;
134 stm_rel_start_activity_restriction_split_main();
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 )
145 stm_rel_start_activity_none();
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 )
156 stm_rel_start_activity_restriction_normal();
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 )
167 ZREL_RelMainState[ZREL_RELMAINS0F] = ( uint8_t )ZREL_RELRESTOFFS0;
168 stm_rel_start_activity_none();
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 )
179 stm_rel_start_activity_restriction_split_main();
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 )
190 stm_rel_start_activity_restriction_split_sub();
193 /****************************************/
194 /* Event appraisal function */
196 /* State : restriction_mode_off( No 0 ) */
197 /****************************************/
198 static void ZREL_RelMains0Event( void )
200 /*stt_restriction_mode_on*/
201 if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn )
203 stm_rel_event_restriction_mode_on();
208 /*Else and default design have not done.*/
209 /*Please confirm the STM and design else and default.*/
213 /****************************************/
214 /* Event appraisal function */
215 /* STM : RelRestOff */
216 /* State : none( No 0 ) */
217 /****************************************/
218 static void ZREL_RelRestOffs0Event( void )
220 /*stt_restriction_mode_off*/
221 if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
223 /*stt_lightstatus_brake_off*/
224 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
226 /*stt_crr_layer_apps_changed*/
227 if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
229 /*stt_crr_layer_apps_map_spl*/
230 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
232 ZREL_RelRestOffs0e0();
234 /*stt_crr_layer_apps_spl_nml*/
235 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
237 ZREL_RelRestOffs0e1();
239 /*stt_crr_layer_apps_spl_spl*/
240 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
242 ZREL_RelRestOffs0e1();
244 /*stt_crr_layer_apps_gen_nml*/
245 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
247 ZREL_RelRestOffs0e1();
251 /*Else and default design have not done.*/
252 /*Please confirm the STM and design else and default.*/
256 else if( g_stm_event == StmEvtNoActivate )
259 if( g_stm_category == StmCtgNoRestriction )
261 /*ara_restriction_normal*/
262 if( g_stm_area == StmAreaNoRestrictionNormal )
264 /*stt_crr_layer_apps_spl_nml*/
265 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
267 ZREL_RelRestOffs0e1();
269 /*stt_crr_layer_apps_map_spl*/
270 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
272 ZREL_RelRestOffs0e0();
276 /*Else and default design have not done.*/
277 /*Please confirm the STM and design else and default.*/
280 /*ara_restriction_split_main*/
281 else if( g_stm_area == StmAreaNoRestrictionSplitMain )
283 ZREL_RelRestOffs0e8();
285 /*ara_restriction_split_sub*/
286 else if( g_stm_area == StmAreaNoRestrictionSplitSub )
288 ZREL_RelRestOffs0e0();
292 /*Else and default design have not done.*/
293 /*Please confirm the STM and design else and default.*/
298 /*Else and default design have not done.*/
299 /*Please confirm the STM and design else and default.*/
304 /*Else and default design have not done.*/
305 /*Please confirm the STM and design else and default.*/
309 else if( g_stm_event == StmEvtNoUndo )
311 /*stt_prv_layer_rst_none*/
312 if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
314 ZREL_RelRestOffs0e13();
316 /*stt_prv_layer_rst_rst_nml*/
317 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
319 ZREL_RelRestOffs0e1();
321 /*stt_prv_layer_rst_rst_spl_main*/
322 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
324 ZREL_RelRestOffs0e8();
326 /*stt_prv_layer_rst_rst_spl_sub*/
327 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
329 ZREL_RelRestOffs0e0();
333 /*Else and default design have not done.*/
334 /*Please confirm the STM and design else and default.*/
339 /*Else and default design have not done.*/
340 /*Please confirm the STM and design else and default.*/
345 /*Else and default design have not done.*/
346 /*Please confirm the STM and design else and default.*/
350 /****************************************/
351 /* Event appraisal function */
352 /* STM : RelRestOff */
353 /* State : restriction_normal( No 1 ) */
354 /****************************************/
355 static void ZREL_RelRestOffs1Event( void )
357 /*stt_restriction_mode_off*/
358 if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
360 /*stt_lightstatus_brake_off*/
361 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
363 /*stt_crr_layer_apps_changed*/
364 if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
366 /*stt_crr_layer_apps_map_spl*/
367 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
369 ZREL_RelRestOffs0e0();
371 /*stt_crr_layer_apps_spl_nml*/
372 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
374 ZREL_RelRestOffs1e1();
376 /*stt_crr_layer_apps_spl_spl*/
377 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
379 ZREL_RelRestOffs1e1();
381 /*stt_crr_layer_apps_gen_nml*/
382 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
384 ZREL_RelRestOffs1e1();
388 ZREL_RelRestOffs1e4();
391 /*stt_crr_layer_hs_changed*/
392 else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
394 /*stt_crr_layer_hs_hms*/
395 if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
397 ZREL_RelRestOffs1e4();
401 /*Else and default design have not done.*/
402 /*Please confirm the STM and design else and default.*/
406 else if( g_stm_event == StmEvtNoActivate )
409 if( g_stm_category == StmCtgNoRestriction )
411 /*ara_restriction_normal*/
412 if( g_stm_area == StmAreaNoRestrictionNormal )
414 /*stt_crr_layer_apps_map_spl*/
415 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
417 ZREL_RelRestOffs0e0();
421 /*Else and default design have not done.*/
422 /*Please confirm the STM and design else and default.*/
425 /*ara_restriction_split_main*/
426 else if( g_stm_area == StmAreaNoRestrictionSplitMain )
428 ZREL_RelRestOffs0e8();
430 /*ara_restriction_split_sub*/
431 else if( g_stm_area == StmAreaNoRestrictionSplitSub )
433 ZREL_RelRestOffs0e0();
437 /*Else and default design have not done.*/
438 /*Please confirm the STM and design else and default.*/
442 else if( g_stm_category == StmCtgNoHomescreen )
445 if( g_stm_area == StmAreaNoFullscreen )
447 ZREL_RelRestOffs1e4();
451 /*Else and default design have not done.*/
452 /*Please confirm the STM and design else and default.*/
457 /*Else and default design have not done.*/
458 /*Please confirm the STM and design else and default.*/
462 else if( g_stm_event == StmEvtNoDeactivate )
465 if( g_stm_category == StmCtgNoRestriction )
467 ZREL_RelRestOffs1e4();
471 /*Else and default design have not done.*/
472 /*Please confirm the STM and design else and default.*/
477 /*Else and default design have not done.*/
478 /*Please confirm the STM and design else and default.*/
481 /*stt_lightstatus_brake_on*/
482 else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
484 /*stt_prv_layer_rst_not_none*/
485 if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
487 ZREL_RelRestOffs1e4();
491 /*Else and default design have not done.*/
492 /*Please confirm the STM and design else and default.*/
496 else if( g_stm_event == StmEvtNoUndo )
498 /*stt_prv_layer_rst_none*/
499 if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
501 ZREL_RelRestOffs1e4();
503 /*stt_prv_layer_rst_rst_nml*/
504 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
506 ZREL_RelRestOffs1e1();
508 /*stt_prv_layer_rst_rst_spl_main*/
509 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
511 ZREL_RelRestOffs0e8();
513 /*stt_prv_layer_rst_rst_spl_sub*/
514 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
516 ZREL_RelRestOffs0e0();
520 /*Else and default design have not done.*/
521 /*Please confirm the STM and design else and default.*/
526 /*Else and default design have not done.*/
527 /*Please confirm the STM and design else and default.*/
532 /*Else and default design have not done.*/
533 /*Please confirm the STM and design else and default.*/
537 /****************************************/
538 /* Event appraisal function */
539 /* STM : RelRestOff */
540 /* State : restriction_split_main( No 2 ) */
541 /****************************************/
542 static void ZREL_RelRestOffs2Event( void )
544 /*stt_restriction_mode_off*/
545 if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
547 /*stt_lightstatus_brake_off*/
548 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
550 /*stt_crr_layer_apps_changed*/
551 if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
553 /*stt_crr_layer_apps_map_spl*/
554 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
556 ZREL_RelRestOffs0e0();
558 /*stt_crr_layer_apps_spl_nml*/
559 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
561 ZREL_RelRestOffs0e1();
563 /*stt_crr_layer_apps_spl_spl*/
564 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
566 ZREL_RelRestOffs0e1();
568 /*stt_crr_layer_apps_gen_nml*/
569 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
571 ZREL_RelRestOffs0e1();
575 ZREL_RelRestOffs1e4();
578 /*stt_crr_layer_hs_changed*/
579 else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
581 /*stt_crr_layer_hs_hms*/
582 if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
584 ZREL_RelRestOffs1e4();
588 /*Else and default design have not done.*/
589 /*Please confirm the STM and design else and default.*/
593 else if( g_stm_event == StmEvtNoActivate )
596 if( g_stm_category == StmCtgNoRestriction )
598 /*ara_restriction_normal*/
599 if( g_stm_area == StmAreaNoRestrictionNormal )
601 /*stt_crr_layer_apps_spl_nml*/
602 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
604 ZREL_RelRestOffs0e1();
606 /*stt_crr_layer_apps_map_spl*/
607 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
609 ZREL_RelRestOffs0e0();
613 /*Else and default design have not done.*/
614 /*Please confirm the STM and design else and default.*/
617 /*ara_restriction_split_sub*/
618 else if( g_stm_area == StmAreaNoRestrictionSplitSub )
620 ZREL_RelRestOffs0e1();
624 /*Else and default design have not done.*/
625 /*Please confirm the STM and design else and default.*/
629 else if( g_stm_category == StmCtgNoHomescreen )
632 if( g_stm_area == StmAreaNoFullscreen )
634 ZREL_RelRestOffs1e4();
638 /*Else and default design have not done.*/
639 /*Please confirm the STM and design else and default.*/
644 /*Else and default design have not done.*/
645 /*Please confirm the STM and design else and default.*/
649 else if( g_stm_event == StmEvtNoDeactivate )
652 if( g_stm_category == StmCtgNoRestriction )
654 ZREL_RelRestOffs1e4();
658 /*Else and default design have not done.*/
659 /*Please confirm the STM and design else and default.*/
664 /*Else and default design have not done.*/
665 /*Please confirm the STM and design else and default.*/
668 /*stt_lightstatus_brake_on*/
669 else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
671 /*stt_prv_layer_rst_not_none*/
672 if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
674 ZREL_RelRestOffs1e4();
678 /*Else and default design have not done.*/
679 /*Please confirm the STM and design else and default.*/
683 else if( g_stm_event == StmEvtNoUndo )
685 /*stt_prv_layer_rst_none*/
686 if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
688 ZREL_RelRestOffs1e4();
690 /*stt_prv_layer_rst_rst_nml*/
691 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
693 ZREL_RelRestOffs0e1();
695 /*stt_prv_layer_rst_rst_spl_main*/
696 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
698 ZREL_RelRestOffs2e15();
700 /*stt_prv_layer_rst_rst_spl_sub*/
701 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
703 ZREL_RelRestOffs0e0();
707 /*Else and default design have not done.*/
708 /*Please confirm the STM and design else and default.*/
713 /*Else and default design have not done.*/
714 /*Please confirm the STM and design else and default.*/
719 /*Else and default design have not done.*/
720 /*Please confirm the STM and design else and default.*/
724 /****************************************/
725 /* Event appraisal function */
726 /* STM : RelRestOff */
727 /* State : restriction_split_sub( No 3 ) */
728 /****************************************/
729 static void ZREL_RelRestOffs3Event( void )
731 /*stt_restriction_mode_off*/
732 if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
734 /*stt_lightstatus_brake_off*/
735 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
737 /*stt_crr_layer_apps_changed*/
738 if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
740 /*stt_crr_layer_apps_map_spl*/
741 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl )
743 ZREL_RelRestOffs3e0();
745 /*stt_crr_layer_apps_spl_nml*/
746 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
748 ZREL_RelRestOffs0e1();
750 /*stt_crr_layer_apps_spl_spl*/
751 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
753 ZREL_RelRestOffs0e1();
755 /*stt_crr_layer_apps_gen_nml*/
756 else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
758 ZREL_RelRestOffs0e1();
762 ZREL_RelRestOffs1e4();
765 /*stt_crr_layer_hs_changed*/
766 else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
768 /*stt_crr_layer_hs_hms*/
769 if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms )
771 ZREL_RelRestOffs1e4();
775 /*Else and default design have not done.*/
776 /*Please confirm the STM and design else and default.*/
780 else if( g_stm_event == StmEvtNoActivate )
783 if( g_stm_category == StmCtgNoRestriction )
785 /*ara_restriction_normal*/
786 if( g_stm_area == StmAreaNoRestrictionNormal )
788 /*stt_crr_layer_apps_spl_nml*/
789 if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml )
791 ZREL_RelRestOffs0e1();
795 /*Else and default design have not done.*/
796 /*Please confirm the STM and design else and default.*/
799 /*ara_restriction_split_main*/
800 else if( g_stm_area == StmAreaNoRestrictionSplitMain )
802 ZREL_RelRestOffs0e1();
806 /*Else and default design have not done.*/
807 /*Please confirm the STM and design else and default.*/
811 else if( g_stm_category == StmCtgNoHomescreen )
814 if( g_stm_area == StmAreaNoFullscreen )
816 ZREL_RelRestOffs1e4();
820 /*Else and default design have not done.*/
821 /*Please confirm the STM and design else and default.*/
826 /*Else and default design have not done.*/
827 /*Please confirm the STM and design else and default.*/
831 else if( g_stm_event == StmEvtNoDeactivate )
834 if( g_stm_category == StmCtgNoRestriction )
836 ZREL_RelRestOffs1e4();
840 /*Else and default design have not done.*/
841 /*Please confirm the STM and design else and default.*/
846 /*Else and default design have not done.*/
847 /*Please confirm the STM and design else and default.*/
850 /*stt_lightstatus_brake_on*/
851 else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
853 /*stt_prv_layer_rst_not_none*/
854 if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone )
856 ZREL_RelRestOffs1e4();
860 /*Else and default design have not done.*/
861 /*Please confirm the STM and design else and default.*/
865 else if( g_stm_event == StmEvtNoUndo )
867 /*stt_prv_layer_rst_none*/
868 if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone )
870 ZREL_RelRestOffs1e4();
872 /*stt_prv_layer_rst_rst_nml*/
873 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstNml )
875 ZREL_RelRestOffs0e1();
877 /*stt_prv_layer_rst_rst_spl_main*/
878 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplMain )
880 ZREL_RelRestOffs0e8();
882 /*stt_prv_layer_rst_rst_spl_sub*/
883 else if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoRstSplSub )
885 ZREL_RelRestOffs3e0();
889 /*Else and default design have not done.*/
890 /*Please confirm the STM and design else and default.*/
895 /*Else and default design have not done.*/
896 /*Please confirm the STM and design else and default.*/
901 /*Else and default design have not done.*/
902 /*Please confirm the STM and design else and default.*/
906 /****************************************/
907 /* Event appraisal function */
909 /* State : restriction_mode_on( No 1 )*/
910 /****************************************/
911 static void ZREL_RelMains1Event( void )
913 /*stt_restriction_mode_off*/
914 if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff )
916 stm_rel_event_restriction_mode_off();
921 /*Else and default design have not done.*/
922 /*Please confirm the STM and design else and default.*/
926 /****************************************/
927 /* Event appraisal function */
928 /* STM : RelRestOn */
929 /* State : none( No 0 ) */
930 /****************************************/
931 static void ZREL_RelRestOns0Event( void )
935 /****************************************/
936 /* Event call function */
938 /****************************************/
939 void stm_rel_event_call( void )
942 switch( ZREL_RelMainState[ZREL_RELMAIN] )
945 switch( ZREL_RelMainState[ZREL_RELMAINS0F] )
947 case ZREL_RELRESTOFFS0:
948 ZREL_RelRestOffs0Event();
950 case ZREL_RELRESTOFFS1:
951 ZREL_RelRestOffs1Event();
953 case ZREL_RELRESTOFFS2:
954 ZREL_RelRestOffs2Event();
956 case ZREL_RELRESTOFFS3:
957 ZREL_RelRestOffs3Event();
960 /*Not accessible to this else (default).*/
963 ZREL_RelMains0Event();
966 switch( ZREL_RelMainState[ZREL_RELMAINS1F] )
968 case ZREL_RELRESTONS0:
969 ZREL_RelRestOns0Event();
972 /*Not accessible to this else (default).*/
975 ZREL_RelMains1Event();
978 /*Not accessible to this else (default).*/
983 /****************************************/
984 /* Initial function */
986 /****************************************/
987 void stm_rel_initialize( void )
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();
995 /****************************************/
996 /* Terminate function */
998 /****************************************/
999 void ZREL_RelMainTerminate( void )
1001 ZREL_RelMainState[ZREL_RELMAIN] = ( uint8_t )ZREL_RELMAINTERMINATE;