1 /************************************************************/
2 /* Zmaster_apps_apps_main.c */
3 /* apps_main 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 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINSTATENOMAX];
11 static void Zmaster_apps_apps_mains0StateEntry( void );
12 static void Zmaster_apps_apps_mains1StateEntry( void );
13 static void Zmaster_apps_apps_mains0e1( void );
14 static void Zmaster_apps_apps_mains1e0( void );
15 static void Zmaster_apps_apps_car_stops0e0( void );
16 static void Zmaster_apps_apps_car_stops0e2( void );
17 static void Zmaster_apps_apps_car_stops0e3( void );
18 static void Zmaster_apps_apps_car_stops0e4( void );
19 static void Zmaster_apps_apps_car_stops0e11( void );
20 static void Zmaster_apps_apps_car_stops0e15( void );
21 static void Zmaster_apps_apps_car_runs0e0( void );
22 static void Zmaster_apps_apps_car_runs0e3( void );
23 static void Zmaster_apps_apps_mains0Event( void );
24 static void Zmaster_apps_apps_car_stops0Event( void );
25 static void Zmaster_apps_apps_car_stops1Event( void );
26 static void Zmaster_apps_apps_car_stops2Event( void );
27 static void Zmaster_apps_apps_car_stops3Event( void );
28 static void Zmaster_apps_apps_car_stops4Event( void );
29 static void Zmaster_apps_apps_car_stops5Event( void );
30 static void Zmaster_apps_apps_mains1Event( void );
31 static void Zmaster_apps_apps_car_runs0Event( void );
32 static void Zmaster_apps_apps_car_runs1Event( void );
34 /****************************************/
35 /* State start activity function */
37 /* State : lightstatus_brake_on( No 0 ) */
38 /****************************************/
39 static void Zmaster_apps_apps_mains0StateEntry( void )
41 switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] )
43 case ZMASTER_APPS_APPS_CAR_STOPS0:
44 stm_mst_apl_start_activity_none();
46 case ZMASTER_APPS_APPS_CAR_STOPS1:
47 stm_mst_apl_start_activity_meter_receiver();
49 case ZMASTER_APPS_APPS_CAR_STOPS2:
50 stm_mst_apl_start_activity_meter_splitable();
52 case ZMASTER_APPS_APPS_CAR_STOPS3:
53 stm_mst_apl_start_activity_splitable_receiver();
55 case ZMASTER_APPS_APPS_CAR_STOPS4:
56 stm_mst_apl_start_activity_splitable_split();
58 case ZMASTER_APPS_APPS_CAR_STOPS5:
59 stm_mst_apl_start_activity_general();
62 /*Not accessible to this else (default).*/
67 /****************************************/
68 /* State start activity function */
70 /* State : lightstatus_brake_off( No 1 ) */
71 /****************************************/
72 static void Zmaster_apps_apps_mains1StateEntry( void )
74 switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] )
76 case ZMASTER_APPS_APPS_CAR_RUNS0:
77 stm_mst_apl_start_activity_meter_receiver();
79 case ZMASTER_APPS_APPS_CAR_RUNS1:
80 stm_mst_apl_start_activity_meter();
83 /*Not accessible to this else (default).*/
88 /****************************************/
91 /* State : lightstatus_brake_on( No 0 ) */
92 /* Event : stt_lightstatus_brake_off( No 1 ) */
93 /****************************************/
94 static void Zmaster_apps_apps_mains0e1( void )
96 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINS1;
97 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS0;
98 Zmaster_apps_apps_mains1StateEntry();
101 /****************************************/
102 /* Action function */
103 /* STM : apps_main */
104 /* State : lightstatus_brake_off( No 1 ) */
105 /* Event : stt_lightstatus_brake_on( No 0 ) */
106 /****************************************/
107 static void Zmaster_apps_apps_mains1e0( void )
109 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINS0;
110 Zmaster_apps_apps_mains0StateEntry();
113 /****************************************/
114 /* Action function */
115 /* STM : apps_car_stop */
116 /* State : none( No 0 ) */
117 /* Event : ara_split_main( No 0 ) */
118 /****************************************/
119 static void Zmaster_apps_apps_car_stops0e0( void )
121 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS1;
122 stm_mst_apl_start_activity_meter_receiver();
125 /****************************************/
126 /* Action function */
127 /* STM : apps_car_stop */
128 /* State : none( No 0 ) */
129 /* Event : ara_split_main( No 2 ) */
130 /****************************************/
131 static void Zmaster_apps_apps_car_stops0e2( void )
133 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS3;
134 stm_mst_apl_start_activity_splitable_receiver();
137 /****************************************/
138 /* Action function */
139 /* STM : apps_car_stop */
140 /* State : none( No 0 ) */
141 /* Event : ara_split_sub( No 3 ) */
142 /****************************************/
143 static void Zmaster_apps_apps_car_stops0e3( void )
145 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS2;
146 stm_mst_apl_start_activity_meter_splitable();
149 /****************************************/
150 /* Action function */
151 /* STM : apps_car_stop */
152 /* State : none( No 0 ) */
153 /* Event : ara_normal( No 4 ) */
154 /****************************************/
155 static void Zmaster_apps_apps_car_stops0e4( void )
157 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS5;
158 stm_mst_apl_start_activity_general();
161 /****************************************/
162 /* Action function */
163 /* STM : apps_car_stop */
164 /* State : none( No 0 ) */
165 /* Event : stt_prv_layer_apps_none( No 11 ) */
166 /****************************************/
167 static void Zmaster_apps_apps_car_stops0e11( void )
169 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS0;
170 stm_mst_apl_start_activity_none();
173 /****************************************/
174 /* Action function */
175 /* STM : apps_car_stop */
176 /* State : none( No 0 ) */
177 /* Event : stt_prv_layer_apps_splitable_split( No 15 ) */
178 /****************************************/
179 static void Zmaster_apps_apps_car_stops0e15( void )
181 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS4;
182 stm_mst_apl_start_activity_splitable_split();
185 /****************************************/
186 /* Action function */
187 /* STM : apps_car_run */
188 /* State : meter_receiver( No 0 ) */
189 /* Event : ara_normal( No 0 ) */
190 /****************************************/
191 static void Zmaster_apps_apps_car_runs0e0( void )
193 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS1;
194 stm_mst_apl_start_activity_meter();
197 /****************************************/
198 /* Action function */
199 /* STM : apps_car_run */
200 /* State : meter_receiver( No 0 ) */
201 /* Event : stt_prv_layer_apps_meter_receiver( No 3 ) */
202 /****************************************/
203 static void Zmaster_apps_apps_car_runs0e3( void )
205 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS0;
206 stm_mst_apl_start_activity_meter_receiver();
209 /****************************************/
210 /* Event appraisal function */
211 /* STM : apps_main */
212 /* State : lightstatus_brake_on( No 0 ) */
213 /****************************************/
214 static void Zmaster_apps_apps_mains0Event( void )
216 /*stt_lightstatus_brake_off*/
217 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
219 stm_mst_apl_event_lightstatus_brake_off();
220 Zmaster_apps_apps_mains0e1();
224 /*Else and default design have not done.*/
225 /*Please confirm the STM and design else and default.*/
229 /****************************************/
230 /* Event appraisal function */
231 /* STM : apps_car_stop */
232 /* State : none( No 0 ) */
233 /****************************************/
234 static void Zmaster_apps_apps_car_stops0Event( void )
236 /*stt_lightstatus_brake_on*/
237 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
240 if( g_stm_event == StmEvtNoActivate )
243 if( g_stm_category == StmCtgNoMeter )
246 if( g_stm_area == StmAreaNoSplitMain )
248 Zmaster_apps_apps_car_stops0e0();
252 /*Else and default design have not done.*/
253 /*Please confirm the STM and design else and default.*/
257 else if( g_stm_category == StmCtgNoReceiver )
260 if( g_stm_area == StmAreaNoSplitSub )
262 Zmaster_apps_apps_car_stops0e0();
266 /*Else and default design have not done.*/
267 /*Please confirm the STM and design else and default.*/
270 /*ctg_splitable_main*/
271 else if( g_stm_category == StmCtgNoSplitableMain )
274 if( g_stm_area == StmAreaNoSplitMain )
276 Zmaster_apps_apps_car_stops0e2();
280 /*Else and default design have not done.*/
281 /*Please confirm the STM and design else and default.*/
284 /*ctg_splitable_sub*/
285 else if( g_stm_category == StmCtgNoSplitableSub )
288 if( g_stm_area == StmAreaNoSplitSub )
290 Zmaster_apps_apps_car_stops0e3();
294 /*Else and default design have not done.*/
295 /*Please confirm the STM and design else and default.*/
299 else if( g_stm_category == StmCtgNoGeneral )
302 if( g_stm_area == StmAreaNoNormal )
304 Zmaster_apps_apps_car_stops0e4();
308 /*Else and default design have not done.*/
309 /*Please confirm the STM and design else and default.*/
314 /*Else and default design have not done.*/
315 /*Please confirm the STM and design else and default.*/
319 else if( g_stm_event == StmEvtNoUndo )
321 /*stt_prv_layer_apps_none*/
322 if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
324 Zmaster_apps_apps_car_stops0e11();
326 /*stt_prv_layer_apps_meter_receiver*/
327 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
329 Zmaster_apps_apps_car_stops0e0();
331 /*stt_prv_layer_apps_meter_splitable*/
332 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
334 Zmaster_apps_apps_car_stops0e3();
336 /*stt_prv_layer_apps_splitable_receiver*/
337 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
339 Zmaster_apps_apps_car_stops0e2();
341 /*stt_prv_layer_apps_splitable_split*/
342 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
344 Zmaster_apps_apps_car_stops0e15();
346 /*stt_prv_layer_apps_gen_nml*/
347 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
349 Zmaster_apps_apps_car_stops0e4();
353 /*Else and default design have not done.*/
354 /*Please confirm the STM and design else and default.*/
359 /*Else and default design have not done.*/
360 /*Please confirm the STM and design else and default.*/
365 /*Else and default design have not done.*/
366 /*Please confirm the STM and design else and default.*/
370 /****************************************/
371 /* Event appraisal function */
372 /* STM : apps_car_stop */
373 /* State : meter_receiver( No 1 ) */
374 /****************************************/
375 static void Zmaster_apps_apps_car_stops1Event( void )
377 /*stt_lightstatus_brake_on*/
378 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
381 if( g_stm_event == StmEvtNoActivate )
383 /*ctg_splitable_main*/
384 if( g_stm_category == StmCtgNoSplitableMain )
387 if( g_stm_area == StmAreaNoSplitMain )
389 Zmaster_apps_apps_car_stops0e2();
393 /*Else and default design have not done.*/
394 /*Please confirm the STM and design else and default.*/
397 /*ctg_splitable_sub*/
398 else if( g_stm_category == StmCtgNoSplitableSub )
401 if( g_stm_area == StmAreaNoSplitSub )
403 Zmaster_apps_apps_car_stops0e3();
407 /*Else and default design have not done.*/
408 /*Please confirm the STM and design else and default.*/
412 else if( g_stm_category == StmCtgNoGeneral )
415 if( g_stm_area == StmAreaNoNormal )
417 Zmaster_apps_apps_car_stops0e4();
421 /*Else and default design have not done.*/
422 /*Please confirm the STM and design else and default.*/
426 else if( g_stm_category == StmCtgNoHomescreen )
429 if( g_stm_area == StmAreaNoFullscreen )
431 Zmaster_apps_apps_car_stops0e11();
435 /*Else and default design have not done.*/
436 /*Please confirm the STM and design else and default.*/
441 /*Else and default design have not done.*/
442 /*Please confirm the STM and design else and default.*/
446 else if( g_stm_event == StmEvtNoDeactivate )
449 if( g_stm_category == StmCtgNoMeter )
451 Zmaster_apps_apps_car_stops0e11();
454 else if( g_stm_category == StmCtgNoReceiver )
456 Zmaster_apps_apps_car_stops0e11();
460 /*Else and default design have not done.*/
461 /*Please confirm the STM and design else and default.*/
465 else if( g_stm_event == StmEvtNoUndo )
467 /*stt_prv_layer_apps_none*/
468 if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
470 Zmaster_apps_apps_car_stops0e11();
472 /*stt_prv_layer_apps_meter_receiver*/
473 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
475 Zmaster_apps_apps_car_stops0e0();
477 /*stt_prv_layer_apps_meter_splitable*/
478 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
480 Zmaster_apps_apps_car_stops0e3();
482 /*stt_prv_layer_apps_splitable_receiver*/
483 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
485 Zmaster_apps_apps_car_stops0e2();
487 /*stt_prv_layer_apps_splitable_split*/
488 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
490 Zmaster_apps_apps_car_stops0e15();
492 /*stt_prv_layer_apps_gen_nml*/
493 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
495 Zmaster_apps_apps_car_stops0e4();
499 /*Else and default design have not done.*/
500 /*Please confirm the STM and design else and default.*/
505 /*Else and default design have not done.*/
506 /*Please confirm the STM and design else and default.*/
511 /*Else and default design have not done.*/
512 /*Please confirm the STM and design else and default.*/
516 /****************************************/
517 /* Event appraisal function */
518 /* STM : apps_car_stop */
519 /* State : meter_splitable( No 2 ) */
520 /****************************************/
521 static void Zmaster_apps_apps_car_stops2Event( void )
523 /*stt_lightstatus_brake_on*/
524 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
527 if( g_stm_event == StmEvtNoActivate )
530 if( g_stm_category == StmCtgNoReceiver )
533 if( g_stm_area == StmAreaNoSplitSub )
535 Zmaster_apps_apps_car_stops0e0();
539 /*Else and default design have not done.*/
540 /*Please confirm the STM and design else and default.*/
543 /*ctg_splitable_main*/
544 else if( g_stm_category == StmCtgNoSplitableMain )
547 if( g_stm_area == StmAreaNoSplitMain )
549 Zmaster_apps_apps_car_stops0e15();
553 /*Else and default design have not done.*/
554 /*Please confirm the STM and design else and default.*/
557 /*ctg_splitable_sub*/
558 else if( g_stm_category == StmCtgNoSplitableSub )
561 if( g_stm_area == StmAreaNoSplitSub )
563 Zmaster_apps_apps_car_stops0e3();
567 /*Else and default design have not done.*/
568 /*Please confirm the STM and design else and default.*/
572 else if( g_stm_category == StmCtgNoGeneral )
575 if( g_stm_area == StmAreaNoNormal )
577 Zmaster_apps_apps_car_stops0e4();
581 /*Else and default design have not done.*/
582 /*Please confirm the STM and design else and default.*/
586 else if( g_stm_category == StmCtgNoHomescreen )
589 if( g_stm_area == StmAreaNoFullscreen )
591 Zmaster_apps_apps_car_stops0e11();
595 /*Else and default design have not done.*/
596 /*Please confirm the STM and design else and default.*/
601 /*Else and default design have not done.*/
602 /*Please confirm the STM and design else and default.*/
606 else if( g_stm_event == StmEvtNoDeactivate )
609 if( g_stm_category == StmCtgNoMeter )
611 Zmaster_apps_apps_car_stops0e11();
613 /*ctg_splitable_sub*/
614 else if( g_stm_category == StmCtgNoSplitableSub )
617 if( g_stm_area == StmAreaNoSplitSub )
619 Zmaster_apps_apps_car_stops0e0();
623 /*Else and default design have not done.*/
624 /*Please confirm the STM and design else and default.*/
629 /*Else and default design have not done.*/
630 /*Please confirm the STM and design else and default.*/
634 else if( g_stm_event == StmEvtNoUndo )
636 /*stt_prv_layer_apps_none*/
637 if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
639 Zmaster_apps_apps_car_stops0e11();
641 /*stt_prv_layer_apps_meter_receiver*/
642 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
644 Zmaster_apps_apps_car_stops0e0();
646 /*stt_prv_layer_apps_meter_splitable*/
647 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
649 Zmaster_apps_apps_car_stops0e3();
651 /*stt_prv_layer_apps_splitable_receiver*/
652 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
654 Zmaster_apps_apps_car_stops0e2();
656 /*stt_prv_layer_apps_splitable_split*/
657 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
659 Zmaster_apps_apps_car_stops0e15();
661 /*stt_prv_layer_apps_gen_nml*/
662 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
664 Zmaster_apps_apps_car_stops0e4();
668 /*Else and default design have not done.*/
669 /*Please confirm the STM and design else and default.*/
674 /*Else and default design have not done.*/
675 /*Please confirm the STM and design else and default.*/
680 /*Else and default design have not done.*/
681 /*Please confirm the STM and design else and default.*/
685 /****************************************/
686 /* Event appraisal function */
687 /* STM : apps_car_stop */
688 /* State : splitable_receiver( No 3 ) */
689 /****************************************/
690 static void Zmaster_apps_apps_car_stops3Event( void )
692 /*stt_lightstatus_brake_on*/
693 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
696 if( g_stm_event == StmEvtNoActivate )
699 if( g_stm_category == StmCtgNoMeter )
702 if( g_stm_area == StmAreaNoSplitMain )
704 Zmaster_apps_apps_car_stops0e0();
708 /*Else and default design have not done.*/
709 /*Please confirm the STM and design else and default.*/
712 /*ctg_splitable_main*/
713 else if( g_stm_category == StmCtgNoSplitableMain )
716 if( g_stm_area == StmAreaNoSplitMain )
718 Zmaster_apps_apps_car_stops0e2();
722 /*Else and default design have not done.*/
723 /*Please confirm the STM and design else and default.*/
726 /*ctg_splitable_sub*/
727 else if( g_stm_category == StmCtgNoSplitableSub )
730 if( g_stm_area == StmAreaNoSplitSub )
732 Zmaster_apps_apps_car_stops0e15();
736 /*Else and default design have not done.*/
737 /*Please confirm the STM and design else and default.*/
741 else if( g_stm_category == StmCtgNoGeneral )
744 if( g_stm_area == StmAreaNoNormal )
746 Zmaster_apps_apps_car_stops0e4();
750 /*Else and default design have not done.*/
751 /*Please confirm the STM and design else and default.*/
755 else if( g_stm_category == StmCtgNoHomescreen )
758 if( g_stm_area == StmAreaNoFullscreen )
760 Zmaster_apps_apps_car_stops0e11();
764 /*Else and default design have not done.*/
765 /*Please confirm the STM and design else and default.*/
770 /*Else and default design have not done.*/
771 /*Please confirm the STM and design else and default.*/
775 else if( g_stm_event == StmEvtNoDeactivate )
778 if( g_stm_category == StmCtgNoReceiver )
780 Zmaster_apps_apps_car_stops0e11();
782 /*ctg_splitable_main*/
783 else if( g_stm_category == StmCtgNoSplitableMain )
786 if( g_stm_area == StmAreaNoSplitMain )
788 Zmaster_apps_apps_car_stops0e0();
792 /*Else and default design have not done.*/
793 /*Please confirm the STM and design else and default.*/
798 /*Else and default design have not done.*/
799 /*Please confirm the STM and design else and default.*/
803 else if( g_stm_event == StmEvtNoUndo )
805 /*stt_prv_layer_apps_none*/
806 if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
808 Zmaster_apps_apps_car_stops0e11();
810 /*stt_prv_layer_apps_meter_receiver*/
811 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
813 Zmaster_apps_apps_car_stops0e0();
815 /*stt_prv_layer_apps_meter_splitable*/
816 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
818 Zmaster_apps_apps_car_stops0e3();
820 /*stt_prv_layer_apps_splitable_receiver*/
821 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
823 Zmaster_apps_apps_car_stops0e2();
825 /*stt_prv_layer_apps_splitable_split*/
826 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
828 Zmaster_apps_apps_car_stops0e15();
830 /*stt_prv_layer_apps_gen_nml*/
831 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
833 Zmaster_apps_apps_car_stops0e4();
837 /*Else and default design have not done.*/
838 /*Please confirm the STM and design else and default.*/
843 /*Else and default design have not done.*/
844 /*Please confirm the STM and design else and default.*/
849 /*Else and default design have not done.*/
850 /*Please confirm the STM and design else and default.*/
854 /****************************************/
855 /* Event appraisal function */
856 /* STM : apps_car_stop */
857 /* State : splitable_split( No 4 ) */
858 /****************************************/
859 static void Zmaster_apps_apps_car_stops4Event( void )
861 /*stt_lightstatus_brake_on*/
862 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
865 if( g_stm_event == StmEvtNoActivate )
868 if( g_stm_category == StmCtgNoMeter )
871 if( g_stm_area == StmAreaNoSplitMain )
873 Zmaster_apps_apps_car_stops0e3();
877 /*Else and default design have not done.*/
878 /*Please confirm the STM and design else and default.*/
882 else if( g_stm_category == StmCtgNoReceiver )
885 if( g_stm_area == StmAreaNoSplitSub )
887 Zmaster_apps_apps_car_stops0e2();
891 /*Else and default design have not done.*/
892 /*Please confirm the STM and design else and default.*/
895 /*ctg_splitable_main*/
896 else if( g_stm_category == StmCtgNoSplitableMain )
899 if( g_stm_area == StmAreaNoSplitMain )
901 Zmaster_apps_apps_car_stops0e15();
905 /*Else and default design have not done.*/
906 /*Please confirm the STM and design else and default.*/
909 /*ctg_splitable_sub*/
910 else if( g_stm_category == StmCtgNoSplitableSub )
913 if( g_stm_area == StmAreaNoSplitSub )
915 Zmaster_apps_apps_car_stops0e15();
919 /*Else and default design have not done.*/
920 /*Please confirm the STM and design else and default.*/
924 else if( g_stm_category == StmCtgNoGeneral )
927 if( g_stm_area == StmAreaNoNormal )
929 Zmaster_apps_apps_car_stops0e4();
933 /*Else and default design have not done.*/
934 /*Please confirm the STM and design else and default.*/
938 else if( g_stm_category == StmCtgNoHomescreen )
941 if( g_stm_area == StmAreaNoFullscreen )
943 Zmaster_apps_apps_car_stops0e11();
947 /*Else and default design have not done.*/
948 /*Please confirm the STM and design else and default.*/
953 /*Else and default design have not done.*/
954 /*Please confirm the STM and design else and default.*/
958 else if( g_stm_event == StmEvtNoDeactivate )
960 /*ctg_splitable_main*/
961 if( g_stm_category == StmCtgNoSplitableMain )
964 if( g_stm_area == StmAreaNoSplitMain )
966 Zmaster_apps_apps_car_stops0e3();
970 /*Else and default design have not done.*/
971 /*Please confirm the STM and design else and default.*/
974 /*ctg_splitable_sub*/
975 else if( g_stm_category == StmCtgNoSplitableSub )
978 if( g_stm_area == StmAreaNoSplitSub )
980 Zmaster_apps_apps_car_stops0e2();
984 /*Else and default design have not done.*/
985 /*Please confirm the STM and design else and default.*/
990 /*Else and default design have not done.*/
991 /*Please confirm the STM and design else and default.*/
995 else if( g_stm_event == StmEvtNoUndo )
997 /*stt_prv_layer_apps_none*/
998 if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1000 Zmaster_apps_apps_car_stops0e11();
1002 /*stt_prv_layer_apps_meter_receiver*/
1003 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
1005 Zmaster_apps_apps_car_stops0e0();
1007 /*stt_prv_layer_apps_meter_splitable*/
1008 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
1010 Zmaster_apps_apps_car_stops0e3();
1012 /*stt_prv_layer_apps_splitable_receiver*/
1013 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
1015 Zmaster_apps_apps_car_stops0e2();
1017 /*stt_prv_layer_apps_splitable_split*/
1018 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1020 Zmaster_apps_apps_car_stops0e15();
1022 /*stt_prv_layer_apps_gen_nml*/
1023 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1025 Zmaster_apps_apps_car_stops0e4();
1029 /*Else and default design have not done.*/
1030 /*Please confirm the STM and design else and default.*/
1035 /*Else and default design have not done.*/
1036 /*Please confirm the STM and design else and default.*/
1041 /*Else and default design have not done.*/
1042 /*Please confirm the STM and design else and default.*/
1046 /****************************************/
1047 /* Event appraisal function */
1048 /* STM : apps_car_stop */
1049 /* State : general( No 5 ) */
1050 /****************************************/
1051 static void Zmaster_apps_apps_car_stops5Event( void )
1053 /*stt_lightstatus_brake_on*/
1054 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
1057 if( g_stm_event == StmEvtNoActivate )
1060 if( g_stm_category == StmCtgNoMeter )
1063 if( g_stm_area == StmAreaNoSplitMain )
1065 Zmaster_apps_apps_car_stops0e0();
1069 /*Else and default design have not done.*/
1070 /*Please confirm the STM and design else and default.*/
1074 else if( g_stm_category == StmCtgNoReceiver )
1077 if( g_stm_area == StmAreaNoSplitSub )
1079 Zmaster_apps_apps_car_stops0e0();
1083 /*Else and default design have not done.*/
1084 /*Please confirm the STM and design else and default.*/
1087 /*ctg_splitable_main*/
1088 else if( g_stm_category == StmCtgNoSplitableMain )
1091 if( g_stm_area == StmAreaNoSplitMain )
1093 Zmaster_apps_apps_car_stops0e2();
1097 /*Else and default design have not done.*/
1098 /*Please confirm the STM and design else and default.*/
1101 /*ctg_splitable_sub*/
1102 else if( g_stm_category == StmCtgNoSplitableSub )
1105 if( g_stm_area == StmAreaNoSplitSub )
1107 Zmaster_apps_apps_car_stops0e3();
1111 /*Else and default design have not done.*/
1112 /*Please confirm the STM and design else and default.*/
1116 else if( g_stm_category == StmCtgNoGeneral )
1119 if( g_stm_area == StmAreaNoNormal )
1121 Zmaster_apps_apps_car_stops0e4();
1125 /*Else and default design have not done.*/
1126 /*Please confirm the STM and design else and default.*/
1130 else if( g_stm_category == StmCtgNoHomescreen )
1133 if( g_stm_area == StmAreaNoFullscreen )
1135 Zmaster_apps_apps_car_stops0e11();
1139 /*Else and default design have not done.*/
1140 /*Please confirm the STM and design else and default.*/
1145 /*Else and default design have not done.*/
1146 /*Please confirm the STM and design else and default.*/
1150 else if( g_stm_event == StmEvtNoDeactivate )
1153 if( g_stm_category == StmCtgNoGeneral )
1155 Zmaster_apps_apps_car_stops0e11();
1159 /*Else and default design have not done.*/
1160 /*Please confirm the STM and design else and default.*/
1164 else if( g_stm_event == StmEvtNoUndo )
1166 /*stt_prv_layer_apps_none*/
1167 if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone )
1169 Zmaster_apps_apps_car_stops0e11();
1171 /*stt_prv_layer_apps_meter_receiver*/
1172 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
1174 Zmaster_apps_apps_car_stops0e0();
1176 /*stt_prv_layer_apps_meter_splitable*/
1177 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl )
1179 Zmaster_apps_apps_car_stops0e3();
1181 /*stt_prv_layer_apps_splitable_receiver*/
1182 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv )
1184 Zmaster_apps_apps_car_stops0e2();
1186 /*stt_prv_layer_apps_splitable_split*/
1187 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl )
1189 Zmaster_apps_apps_car_stops0e15();
1191 /*stt_prv_layer_apps_gen_nml*/
1192 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml )
1194 Zmaster_apps_apps_car_stops0e4();
1198 /*Else and default design have not done.*/
1199 /*Please confirm the STM and design else and default.*/
1204 /*Else and default design have not done.*/
1205 /*Please confirm the STM and design else and default.*/
1210 /*Else and default design have not done.*/
1211 /*Please confirm the STM and design else and default.*/
1215 /****************************************/
1216 /* Event appraisal function */
1217 /* STM : apps_main */
1218 /* State : lightstatus_brake_off( No 1 ) */
1219 /****************************************/
1220 static void Zmaster_apps_apps_mains1Event( void )
1222 /*stt_lightstatus_brake_on*/
1223 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn )
1225 stm_mst_apl_event_lightstatus_brake_on();
1226 Zmaster_apps_apps_mains1e0();
1230 /*Else and default design have not done.*/
1231 /*Please confirm the STM and design else and default.*/
1235 /****************************************/
1236 /* Event appraisal function */
1237 /* STM : apps_car_run */
1238 /* State : meter_receiver( No 0 ) */
1239 /****************************************/
1240 static void Zmaster_apps_apps_car_runs0Event( void )
1242 /*stt_lightstatus_brake_off*/
1243 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
1246 if( g_stm_event == StmEvtNoActivate )
1249 if( g_stm_category == StmCtgNoMeter )
1252 if( g_stm_area == StmAreaNoNormal )
1254 Zmaster_apps_apps_car_runs0e0();
1258 /*Else and default design have not done.*/
1259 /*Please confirm the STM and design else and default.*/
1264 /*Else and default design have not done.*/
1265 /*Please confirm the STM and design else and default.*/
1269 else if( g_stm_event == StmEvtNoUndo )
1271 /*stt_prv_layer_apps_meter_receiver*/
1272 if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
1274 Zmaster_apps_apps_car_runs0e3();
1276 /*stt_prv_layer_apps_meter*/
1277 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrNml )
1279 Zmaster_apps_apps_car_runs0e0();
1283 /*Else and default design have not done.*/
1284 /*Please confirm the STM and design else and default.*/
1289 /*Else and default design have not done.*/
1290 /*Please confirm the STM and design else and default.*/
1295 /*Else and default design have not done.*/
1296 /*Please confirm the STM and design else and default.*/
1300 /****************************************/
1301 /* Event appraisal function */
1302 /* STM : apps_car_run */
1303 /* State : meter( No 1 ) */
1304 /****************************************/
1305 static void Zmaster_apps_apps_car_runs1Event( void )
1307 /*stt_lightstatus_brake_off*/
1308 if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff )
1311 if( g_stm_event == StmEvtNoActivate )
1314 if( g_stm_category == StmCtgNoMeter )
1317 if( g_stm_area == StmAreaNoSplitMain )
1319 Zmaster_apps_apps_car_runs0e3();
1323 /*Else and default design have not done.*/
1324 /*Please confirm the STM and design else and default.*/
1328 else if( g_stm_category == StmCtgNoReceiver )
1331 if( g_stm_area == StmAreaNoSplitSub )
1333 Zmaster_apps_apps_car_runs0e3();
1337 /*Else and default design have not done.*/
1338 /*Please confirm the STM and design else and default.*/
1343 /*Else and default design have not done.*/
1344 /*Please confirm the STM and design else and default.*/
1348 else if( g_stm_event == StmEvtNoUndo )
1350 /*stt_prv_layer_apps_meter_receiver*/
1351 if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv )
1353 Zmaster_apps_apps_car_runs0e3();
1355 /*stt_prv_layer_apps_meter*/
1356 else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrNml )
1358 Zmaster_apps_apps_car_runs0e0();
1362 /*Else and default design have not done.*/
1363 /*Please confirm the STM and design else and default.*/
1368 /*Else and default design have not done.*/
1369 /*Please confirm the STM and design else and default.*/
1374 /*Else and default design have not done.*/
1375 /*Please confirm the STM and design else and default.*/
1379 /****************************************/
1380 /* Event call function */
1381 /* STM : apps_main */
1382 /****************************************/
1383 void stm_master_apl_event_call( void )
1385 stm_mst_apl_start_stm();
1386 switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] )
1388 case ZMASTER_APPS_APPS_MAINS0:
1389 switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] )
1391 case ZMASTER_APPS_APPS_CAR_STOPS0:
1392 Zmaster_apps_apps_car_stops0Event();
1394 case ZMASTER_APPS_APPS_CAR_STOPS1:
1395 Zmaster_apps_apps_car_stops1Event();
1397 case ZMASTER_APPS_APPS_CAR_STOPS2:
1398 Zmaster_apps_apps_car_stops2Event();
1400 case ZMASTER_APPS_APPS_CAR_STOPS3:
1401 Zmaster_apps_apps_car_stops3Event();
1403 case ZMASTER_APPS_APPS_CAR_STOPS4:
1404 Zmaster_apps_apps_car_stops4Event();
1406 case ZMASTER_APPS_APPS_CAR_STOPS5:
1407 Zmaster_apps_apps_car_stops5Event();
1410 /*Not accessible to this else (default).*/
1413 Zmaster_apps_apps_mains0Event();
1415 case ZMASTER_APPS_APPS_MAINS1:
1416 switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] )
1418 case ZMASTER_APPS_APPS_CAR_RUNS0:
1419 Zmaster_apps_apps_car_runs0Event();
1421 case ZMASTER_APPS_APPS_CAR_RUNS1:
1422 Zmaster_apps_apps_car_runs1Event();
1425 /*Not accessible to this else (default).*/
1428 Zmaster_apps_apps_mains1Event();
1431 /*Not accessible to this else (default).*/
1436 /****************************************/
1437 /* Initial function */
1438 /* STM : apps_main */
1439 /****************************************/
1440 void stm_master_apl_initialize( void )
1442 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINS0;
1443 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS0;
1444 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS0;
1445 Zmaster_apps_apps_mains0StateEntry();
1448 /****************************************/
1449 /* Terminate function */
1450 /* STM : apps_main */
1451 /****************************************/
1452 void Zmaster_apps_apps_mainTerminate( void )
1454 Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINTERMINATE;