diff options
author | 2018-10-30 14:36:16 +0900 | |
---|---|---|
committer | 2018-10-30 14:36:16 +0900 | |
commit | de492ca32c0cc4eb7e090ba33945eb75a21cc14a (patch) | |
tree | c81e48f9fa7199afa87a25781599ed6d963989b1 /policy_manager/stm/zipc/StateTransitionor | |
parent | 3ae8e9b6a7947b91409b112e1a699385627c5945 (diff) |
add source for ces2019
Diffstat (limited to 'policy_manager/stm/zipc/StateTransitionor')
38 files changed, 3112 insertions, 647 deletions
diff --git a/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.c b/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.c new file mode 100644 index 0000000..fa692ee --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.c @@ -0,0 +1,117 @@ +/************************************************************/ +/* ZACCEL_AccelPedal.c */ +/* AccelPedal State transition model source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/* State management variable */ +static uint8_t ZACCEL_AccelPedalState[ZACCEL_ACCELPEDALSTATENOMAX]; + +static void ZACCEL_AccelPedals0e1( void ); +static void ZACCEL_AccelPedals1e0( void ); +static void ZACCEL_AccelPedals0Event( void ); +static void ZACCEL_AccelPedals1Event( void ); + +/****************************************/ +/* Action function */ +/* STM : AccelPedal */ +/* State : accel_pedal_off( No 0 ) */ +/* Event : evt_accel_pedal_on( No 1 ) */ +/****************************************/ +static void ZACCEL_AccelPedals0e1( void ) +{ + ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] = ( uint8_t )ZACCEL_ACCELPEDALS1; + stm_aps_start_activity_accel_pedal_on(); +} + +/****************************************/ +/* Action function */ +/* STM : AccelPedal */ +/* State : accel_pedal_on( No 1 ) */ +/* Event : evt_accel_pedal_off( No 0 )*/ +/****************************************/ +static void ZACCEL_AccelPedals1e0( void ) +{ + ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] = ( uint8_t )ZACCEL_ACCELPEDALS0; + stm_aps_start_activity_accel_pedal_off(); +} + +/****************************************/ +/* Event appraisal function */ +/* STM : AccelPedal */ +/* State : accel_pedal_off( No 0 ) */ +/****************************************/ +static void ZACCEL_AccelPedals0Event( void ) +{ + /*evt_accel_pedal_on*/ + if( g_stm_event == StmEvtNoAccelPedalOn ) + { + ZACCEL_AccelPedals0e1(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : AccelPedal */ +/* State : accel_pedal_on( No 1 ) */ +/****************************************/ +static void ZACCEL_AccelPedals1Event( void ) +{ + /*evt_accel_pedal_off*/ + if( g_stm_event == StmEvtNoAccelPedalOff ) + { + ZACCEL_AccelPedals1e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event call function */ +/* STM : AccelPedal */ +/****************************************/ +void stm_aps_event_call( void ) +{ + stm_aps_start_stm(); + switch( ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] ) + { + case ZACCEL_ACCELPEDALS0: + ZACCEL_AccelPedals0Event(); + break; + case ZACCEL_ACCELPEDALS1: + ZACCEL_AccelPedals1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Initial function */ +/* STM : AccelPedal */ +/****************************************/ +void stm_aps_initialize( void ) +{ + ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] = ( uint8_t )ZACCEL_ACCELPEDALS0; + stm_aps_start_activity_accel_pedal_off(); +} + +/****************************************/ +/* Terminate function */ +/* STM : AccelPedal */ +/****************************************/ +void ZACCEL_AccelPedalTerminate( void ) +{ + ZACCEL_AccelPedalState[ZACCEL_ACCELPEDAL] = ( uint8_t )ZACCEL_ACCELPEDALTERMINATE; +} + diff --git a/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.h b/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.h new file mode 100644 index 0000000..40da956 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedal.h @@ -0,0 +1,41 @@ +/************************************************************/ +/* ZACCEL_AccelPedal.h */ +/* AccelPedal State transition model header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZACCEL_ACCELPEDAL_H +#define ZHEADER_ZACCEL_ACCELPEDAL_H + +/*State management variable access define*/ +#define ZACCEL_ACCELPEDAL ( 0U ) +#define ZACCEL_ACCELPEDALS0 ( 0U ) +#define ZACCEL_ACCELPEDALS1 ( 1U ) +#define ZACCEL_ACCELPEDALSTATENOMAX ( 1U ) + +/*End state define*/ +#define ZACCEL_ACCELPEDALEND ( 2U ) +/*Terminate state define*/ +#define ZACCEL_ACCELPEDALTERMINATE ( ZACCEL_ACCELPEDALEND + 1U ) + +/*State no define*/ +#define ZACCEL_ACCELPEDALS0STATENO ( 0U ) +#define ZACCEL_ACCELPEDALS1STATENO ( 1U ) + +/*State serial no define*/ +#define ZACCEL_ACCELPEDALS0STATESERIALNO ( 0U ) +#define ZACCEL_ACCELPEDALS1STATESERIALNO ( 1U ) + +/*Event no define*/ +#define ZACCEL_ACCELPEDALE0EVENTNO ( 0U ) +#define ZACCEL_ACCELPEDALE1EVENTNO ( 1U ) + +/*Event serial no define*/ +#define ZACCEL_ACCELPEDALE0EVENTSERIALNO ( 0U ) +#define ZACCEL_ACCELPEDALE1EVENTSERIALNO ( 1U ) + +/*Extern function*/ +extern void stm_aps_event_call( void ); +extern void stm_aps_initialize( void ); +extern void ZACCEL_AccelPedalTerminate( void ); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.c b/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.c new file mode 100644 index 0000000..1fd9c2a --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.c @@ -0,0 +1,45 @@ +/************************************************************/ +/* ZACCEL_AccelPedalState_func.c */ +/* Function and variable source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/************************************************************* + Function definition +*************************************************************/ + +/* + * @name stm_aps_start_activity_accel_pedal_off + */ +void stm_aps_start_activity_accel_pedal_off() { + g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state = StmAccelPedalSttNoOff; + g_stm_crr_state.car_element[StmCarElementNoAccelPedal].changed = STM_TRUE; +} + +/* + * @name stm_aps_start_activity_accel_pedal_on + */ +void stm_aps_start_activity_accel_pedal_on() { + g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state = StmAccelPedalSttNoOn; + g_stm_crr_state.car_element[StmCarElementNoAccelPedal].changed = STM_TRUE; +} + +/* + * @name stm_aps_initialize_variable + */ +void stm_aps_initialize_variable() { + g_stm_prv_state.car_element[StmCarElementNoAccelPedal].state = StmAccelPedalSttNoOff; + g_stm_prv_state.car_element[StmCarElementNoAccelPedal].changed = STM_FALSE; + + g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state = StmAccelPedalSttNoOff; + g_stm_crr_state.car_element[StmCarElementNoAccelPedal].changed = STM_FALSE; +} + +/* + * @name stm_aps_start_stm + */ +void stm_aps_start_stm() { + g_stm_prv_state.car_element[StmCarElementNoAccelPedal].state = g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state; + g_stm_crr_state.car_element[StmCarElementNoAccelPedal].changed = STM_FALSE; +} diff --git a/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.h b/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.h new file mode 100644 index 0000000..7d36cd0 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/AccelPedal/ZACCEL_AccelPedalState_func.h @@ -0,0 +1,14 @@ +/************************************************************/ +/* ZACCEL_AccelPedalState_func.h */ +/* Function and variable header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZACCEL_ACCELPEDALSTATE_FUNC_H +#define ZHEADER_ZACCEL_ACCELPEDALSTATE_FUNC_H + +extern void stm_aps_start_activity_accel_pedal_off(); +extern void stm_aps_start_activity_accel_pedal_on(); +extern void stm_aps_initialize_variable(); +extern void stm_aps_start_stm(); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.c b/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.c index b6891e8..9002810 100644 --- a/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.c +++ b/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_AppsLayer.c @@ -20,11 +20,11 @@ static void ZAPL_RestrictionModeOffs0e7( void ); static void ZAPL_RestrictionModeOffs0e13( void ); static void ZAPL_RestrictionModeOffs0e15( void ); static void ZAPL_RestrictionModeOffs0e18( void ); -static void ZAPL_RestrictionModeOffs1e0( void ); static void ZAPL_RestrictionModeOffs1e8( void ); +static void ZAPL_RestrictionModeOffs1e14( void ); static void ZAPL_RestrictionModeOffs2e3( void ); -static void ZAPL_RestrictionModeOffs3e2( void ); -static void ZAPL_RestrictionModeOffs4e3( void ); +static void ZAPL_RestrictionModeOffs3e16( void ); +static void ZAPL_RestrictionModeOffs4e17( void ); static void ZAPL_RestrictionModeOffs5e3( void ); static void ZAPL_RestrictionModeOffs6e6( void ); static void ZAPL_RestrictionModeOffs7e7( void ); @@ -87,7 +87,7 @@ static void ZAPL_AppsLayers0StateEntry( void ) /****************************************/ /* State start activity function */ /* STM : AppsLayer */ -/* State : restriction_mode_2_on( No 1 ) */ +/* State : restriction_mode_on( No 1 )*/ /****************************************/ static void ZAPL_AppsLayers1StateEntry( void ) { @@ -121,7 +121,7 @@ static void ZAPL_AppsLayers0e1( void ) /****************************************/ /* Action function */ /* STM : AppsLayer */ -/* State : restriction_mode_2_on( No 1 ) */ +/* State : restriction_mode_on( No 1 )*/ /* Event : stt_restriction_mode_off( No 0 ) */ /****************************************/ static void ZAPL_AppsLayers1e0( void ) @@ -229,23 +229,23 @@ static void ZAPL_RestrictionModeOffs0e18( void ) /* Action function */ /* STM : RestrictionModeOff */ /* State : map( No 1 ) */ -/* Event : ara_normal( No 0 ) */ +/* Event : ara_fullscreen( No 8 ) */ /****************************************/ -static void ZAPL_RestrictionModeOffs1e0( void ) +static void ZAPL_RestrictionModeOffs1e8( void ) { - stm_apl_start_activity_map(); + ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS0; + stm_apl_start_activity_none(); } /****************************************/ /* Action function */ /* STM : RestrictionModeOff */ /* State : map( No 1 ) */ -/* Event : ara_fullscreen( No 8 ) */ +/* Event : stt_prv_layer_apps_map_nml( No 14 ) */ /****************************************/ -static void ZAPL_RestrictionModeOffs1e8( void ) +static void ZAPL_RestrictionModeOffs1e14( void ) { - ZAPL_AppsLayerState[ZAPL_APPSLAYERS0F] = ( uint8_t )ZAPL_RESTRICTIONMODEOFFS0; - stm_apl_start_activity_none(); + stm_apl_start_activity_map(); } /****************************************/ @@ -263,9 +263,9 @@ static void ZAPL_RestrictionModeOffs2e3( void ) /* Action function */ /* STM : RestrictionModeOff */ /* State : map_fullscreen( No 3 ) */ -/* Event : ara_fullscreen( No 2 ) */ +/* Event : stt_prv_layer_apps_map_fll( No 16 ) */ /****************************************/ -static void ZAPL_RestrictionModeOffs3e2( void ) +static void ZAPL_RestrictionModeOffs3e16( void ) { stm_apl_start_activity_map_fullscreen(); } @@ -274,9 +274,9 @@ static void ZAPL_RestrictionModeOffs3e2( void ) /* Action function */ /* STM : RestrictionModeOff */ /* State : splitable_normal( No 4 ) */ -/* Event : ara_normal( No 3 ) */ +/* Event : stt_prv_layer_apps_spl_nml( No 17 ) */ /****************************************/ -static void ZAPL_RestrictionModeOffs4e3( void ) +static void ZAPL_RestrictionModeOffs4e17( void ) { stm_apl_start_activity_splitable_normal(); } @@ -367,10 +367,10 @@ static void ZAPL_RestrictionModeOns1e3( void ) /****************************************/ static void ZAPL_AppsLayers0Event( void ) { - /*stt_restriction_mode_2_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + /*stt_restriction_mode_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn ) { - stm_apl_event_restriction_mode_2_on(); + stm_apl_event_restriction_mode_on(); /*stt_map_is_activated*/ if( g_stm_map_is_activated == STM_TRUE ) { @@ -406,7 +406,7 @@ static void ZAPL_AppsLayers0Event( void ) static void ZAPL_RestrictionModeOffs0Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -548,7 +548,7 @@ static void ZAPL_RestrictionModeOffs0Event( void ) static void ZAPL_RestrictionModeOffs1Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -556,13 +556,8 @@ static void ZAPL_RestrictionModeOffs1Event( void ) /*ctg_map*/ if( g_stm_category == StmCtgNoMap ) { - /*ara_normal*/ - if( g_stm_area == StmAreaNoNormal ) - { - ZAPL_RestrictionModeOffs1e0(); - } /*ara_fullscreen*/ - else if( g_stm_area == StmAreaNoFullscreen ) + if( g_stm_area == StmAreaNoFullscreen ) { ZAPL_RestrictionModeOffs0e2(); } @@ -664,7 +659,7 @@ static void ZAPL_RestrictionModeOffs1Event( void ) /*stt_prv_layer_apps_map_nml*/ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapNml ) { - ZAPL_RestrictionModeOffs1e0(); + ZAPL_RestrictionModeOffs1e14(); } /*stt_prv_layer_apps_map_spl*/ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) @@ -723,7 +718,7 @@ static void ZAPL_RestrictionModeOffs1Event( void ) static void ZAPL_RestrictionModeOffs2Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -898,7 +893,7 @@ static void ZAPL_RestrictionModeOffs2Event( void ) static void ZAPL_RestrictionModeOffs3Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -911,11 +906,6 @@ static void ZAPL_RestrictionModeOffs3Event( void ) { ZAPL_RestrictionModeOffs0e0(); } - /*ara_fullscreen*/ - else if( g_stm_area == StmAreaNoFullscreen ) - { - ZAPL_RestrictionModeOffs3e2(); - } else { /*Else and default design have not done.*/ @@ -1019,7 +1009,7 @@ static void ZAPL_RestrictionModeOffs3Event( void ) /*stt_prv_layer_apps_map_fll*/ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMapFll ) { - ZAPL_RestrictionModeOffs3e2(); + ZAPL_RestrictionModeOffs3e16(); } /*stt_prv_layer_apps_spl_nml*/ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) @@ -1068,7 +1058,7 @@ static void ZAPL_RestrictionModeOffs3Event( void ) static void ZAPL_RestrictionModeOffs4Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -1100,13 +1090,8 @@ static void ZAPL_RestrictionModeOffs4Event( void ) /*ctg_splitable*/ else if( g_stm_category == StmCtgNoSplitable ) { - /*ara_normal*/ - if( g_stm_area == StmAreaNoNormal ) - { - ZAPL_RestrictionModeOffs4e3(); - } /*ara_split_main*/ - else if( g_stm_area == StmAreaNoSplitMain ) + if( g_stm_area == StmAreaNoSplitMain ) { ZAPL_RestrictionModeOffs0e18(); } @@ -1209,7 +1194,7 @@ static void ZAPL_RestrictionModeOffs4Event( void ) /*stt_prv_layer_apps_spl_nml*/ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) { - ZAPL_RestrictionModeOffs4e3(); + ZAPL_RestrictionModeOffs4e17(); } /*stt_prv_layer_apps_spl_spl*/ else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) @@ -1253,7 +1238,7 @@ static void ZAPL_RestrictionModeOffs4Event( void ) static void ZAPL_RestrictionModeOffs5Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -1438,7 +1423,7 @@ static void ZAPL_RestrictionModeOffs5Event( void ) static void ZAPL_RestrictionModeOffs6Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -1608,7 +1593,7 @@ static void ZAPL_RestrictionModeOffs6Event( void ) static void ZAPL_RestrictionModeOffs7Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -1773,12 +1758,12 @@ static void ZAPL_RestrictionModeOffs7Event( void ) /****************************************/ /* Event appraisal function */ /* STM : AppsLayer */ -/* State : restriction_mode_2_on( No 1 ) */ +/* State : restriction_mode_on( No 1 )*/ /****************************************/ static void ZAPL_AppsLayers1Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { stm_apl_event_restriction_mode_off(); ZAPL_AppsLayers1e0(); @@ -1797,8 +1782,8 @@ static void ZAPL_AppsLayers1Event( void ) /****************************************/ static void ZAPL_RestrictionModeOns0Event( void ) { - /*stt_restriction_mode_2_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + /*stt_restriction_mode_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -1862,8 +1847,8 @@ static void ZAPL_RestrictionModeOns0Event( void ) /****************************************/ static void ZAPL_RestrictionModeOns1Event( void ) { - /*stt_restriction_mode_2_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + /*stt_restriction_mode_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) diff --git a/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.c b/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.c index b42df05..d2e7075 100644 --- a/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.c +++ b/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.c @@ -92,15 +92,15 @@ void stm_apl_start_activity_system() { * @name stm_apl_event_restriction_mode_off */ void stm_apl_event_restriction_mode_off() { - g_stm_crr_state.layer[StmLayerNoApps].state = g_prv_apps_state_rest_mode_1; + g_stm_crr_state.layer[StmLayerNoApps].state = g_prv_apps_state_car_stop; g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE; } /* - * @name stm_apl_event_restriction_mode_2_on + * @name stm_apl_event_restriction_mode_on */ -void stm_apl_event_restriction_mode_2_on() { - g_prv_apps_state_rest_mode_1 = g_stm_prv_state.layer[StmLayerNoApps].state; +void stm_apl_event_restriction_mode_on() { + g_prv_apps_state_car_stop = g_stm_prv_state.layer[StmLayerNoApps].state; } /* diff --git a/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.h b/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.h index 6f741b5..4f74c9f 100644 --- a/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.h +++ b/policy_manager/stm/zipc/StateTransitionor/AppsLayer/ZAPL_Apps_func.h @@ -15,7 +15,7 @@ extern void stm_apl_start_activity_splitable_split(); extern void stm_apl_start_activity_general(); extern void stm_apl_start_activity_system(); extern void stm_apl_event_restriction_mode_off(); -extern void stm_apl_event_restriction_mode_2_on(); +extern void stm_apl_event_restriction_mode_on(); extern void stm_apl_initialize_variable(); extern void stm_apl_start_stm(); diff --git a/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.c b/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.c new file mode 100644 index 0000000..8e20123 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.c @@ -0,0 +1,154 @@ +/************************************************************/ +/* ZCAR_CarState.c */ +/* CarState State transition model source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/* State management variable */ +static uint8_t ZCAR_CarStateState[ZCAR_CARSTATESTATENOMAX]; + +static void ZCAR_CarStates0e1( void ); +static void ZCAR_CarStates1e0( void ); +static void ZCAR_CarStates0Event( void ); +static void ZCAR_CarStates1Event( void ); + +/****************************************/ +/* Action function */ +/* STM : CarState */ +/* State : car_stop( No 0 ) */ +/* Event : stt_accel_pedal_on( No 1 ) */ +/****************************************/ +static void ZCAR_CarStates0e1( void ) +{ + ZCAR_CarStateState[ZCAR_CARSTATE] = ( uint8_t )ZCAR_CARSTATES1; + stm_rns_start_activity_car_run(); +} + +/****************************************/ +/* Action function */ +/* STM : CarState */ +/* State : car_run( No 1 ) */ +/* Event : stt_accel_pedal_off( No 0 )*/ +/****************************************/ +static void ZCAR_CarStates1e0( void ) +{ + ZCAR_CarStateState[ZCAR_CARSTATE] = ( uint8_t )ZCAR_CARSTATES0; + stm_rns_start_activity_car_stop(); +} + +/****************************************/ +/* Event appraisal function */ +/* STM : CarState */ +/* State : car_stop( No 0 ) */ +/****************************************/ +static void ZCAR_CarStates0Event( void ) +{ + /*stt_lightstatus_brake_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) + { + /*stt_accel_pedal_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state == StmAccelPedalSttNoOn ) + { + ZCAR_CarStates0e1(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : CarState */ +/* State : car_run( No 1 ) */ +/****************************************/ +static void ZCAR_CarStates1Event( void ) +{ + /*stt_lightstatus_brake_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) + { + /*stt_accel_pedal_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state == StmAccelPedalSttNoOff ) + { + ZCAR_CarStates1e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*stt_lightstatus_brake_on*/ + else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) + { + /*stt_accel_pedal_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state == StmAccelPedalSttNoOff ) + { + ZCAR_CarStates1e0(); + } + /*stt_accel_pedal_on*/ + else if( g_stm_crr_state.car_element[StmCarElementNoAccelPedal].state == StmAccelPedalSttNoOn ) + { + ZCAR_CarStates1e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event call function */ +/* STM : CarState */ +/****************************************/ +void stm_rns_event_call( void ) +{ + stm_rns_start_stm(); + switch( ZCAR_CarStateState[ZCAR_CARSTATE] ) + { + case ZCAR_CARSTATES0: + ZCAR_CarStates0Event(); + break; + case ZCAR_CARSTATES1: + ZCAR_CarStates1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Initial function */ +/* STM : CarState */ +/****************************************/ +void stm_rns_initialize( void ) +{ + ZCAR_CarStateState[ZCAR_CARSTATE] = ( uint8_t )ZCAR_CARSTATES0; + stm_rns_start_activity_car_stop(); +} + +/****************************************/ +/* Terminate function */ +/* STM : CarState */ +/****************************************/ +void ZCAR_CarStateTerminate( void ) +{ + ZCAR_CarStateState[ZCAR_CARSTATE] = ( uint8_t )ZCAR_CARSTATETERMINATE; +} + diff --git a/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.h b/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.h new file mode 100644 index 0000000..18003a7 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState.h @@ -0,0 +1,45 @@ +/************************************************************/ +/* ZCAR_CarState.h */ +/* CarState State transition model header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZCAR_CARSTATE_H +#define ZHEADER_ZCAR_CARSTATE_H + +/*State management variable access define*/ +#define ZCAR_CARSTATE ( 0U ) +#define ZCAR_CARSTATES0 ( 0U ) +#define ZCAR_CARSTATES1 ( 1U ) +#define ZCAR_CARSTATESTATENOMAX ( 1U ) + +/*End state define*/ +#define ZCAR_CARSTATEEND ( 2U ) +/*Terminate state define*/ +#define ZCAR_CARSTATETERMINATE ( ZCAR_CARSTATEEND + 1U ) + +/*State no define*/ +#define ZCAR_CARSTATES0STATENO ( 0U ) +#define ZCAR_CARSTATES1STATENO ( 1U ) + +/*State serial no define*/ +#define ZCAR_CARSTATES0STATESERIALNO ( 0U ) +#define ZCAR_CARSTATES1STATESERIALNO ( 1U ) + +/*Event no define*/ +#define ZCAR_CARSTATEE0EVENTNO ( 0U ) +#define ZCAR_CARSTATEE1EVENTNO ( 1U ) +#define ZCAR_CARSTATEE2EVENTNO ( 2U ) +#define ZCAR_CARSTATEE3EVENTNO ( 3U ) + +/*Event serial no define*/ +#define ZCAR_CARSTATEE0EVENTSERIALNO ( 0U ) +#define ZCAR_CARSTATEE1EVENTSERIALNO ( 1U ) +#define ZCAR_CARSTATEE2EVENTSERIALNO ( 2U ) +#define ZCAR_CARSTATEE3EVENTSERIALNO ( 3U ) + +/*Extern function*/ +extern void stm_rns_event_call( void ); +extern void stm_rns_initialize( void ); +extern void ZCAR_CarStateTerminate( void ); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.c b/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.c new file mode 100644 index 0000000..d6cd5d1 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.c @@ -0,0 +1,45 @@ +/************************************************************/ +/* ZCAR_CarState_func.c */ +/* Function and variable source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/************************************************************* + Function definition +*************************************************************/ + +/* + * @name stm_rns_start_activity_car_stop + */ +void stm_rns_start_activity_car_stop() { + g_stm_crr_state.car_element[StmCarElementNoRunning].state = StmRunningNoStop; + g_stm_crr_state.car_element[StmCarElementNoRunning].changed = STM_TRUE; +} + +/* + * @name stm_rns_start_activity_car_run + */ +void stm_rns_start_activity_car_run() { + g_stm_crr_state.car_element[StmCarElementNoRunning].state = StmRunningNoRun; + g_stm_crr_state.car_element[StmCarElementNoRunning].changed = STM_TRUE; +} + +/* + * @name stm_rns_initialize_variable + */ +void stm_rns_initialize_variable() { + g_stm_prv_state.car_element[StmCarElementNoRunning].state = StmRunningNoStop; + g_stm_prv_state.car_element[StmCarElementNoRunning].changed = STM_FALSE; + + g_stm_crr_state.car_element[StmCarElementNoRunning].state = StmRunningNoStop; + g_stm_crr_state.car_element[StmCarElementNoRunning].changed = STM_FALSE; +} + +/* + * @name stm_rns_start_stm + */ +void stm_rns_start_stm() { + g_stm_prv_state.car_element[StmCarElementNoRunning].state = g_stm_crr_state.car_element[StmCarElementNoRunning].state; + g_stm_crr_state.car_element[StmCarElementNoRunning].changed = STM_FALSE; +} diff --git a/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.h b/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.h new file mode 100644 index 0000000..8c1dc93 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/CarState/ZCAR_CarState_func.h @@ -0,0 +1,14 @@ +/************************************************************/ +/* ZCAR_CarState_func.h */ +/* Function and variable header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZCAR_CARSTATE_FUNC_H +#define ZHEADER_ZCAR_CARSTATE_FUNC_H + +extern void stm_rns_start_activity_car_stop(); +extern void stm_rns_start_activity_car_run(); +extern void stm_rns_initialize_variable(); +extern void stm_rns_start_stm(); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c index a4cd474..1375c66 100644 --- a/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c +++ b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c @@ -9,7 +9,6 @@ static uint8_t ZHSL_HomeScreenState[ZHSL_HOMESCREENSTATENOMAX]; static void ZHSL_HomeScreens0e0( void ); -static void ZHSL_HomeScreens1e0( void ); static void ZHSL_HomeScreens0Event( void ); static void ZHSL_HomeScreens1Event( void ); @@ -26,17 +25,6 @@ static void ZHSL_HomeScreens0e0( void ) } /****************************************/ -/* Action function */ -/* STM : HomeScreen */ -/* State : homescreen( No 1 ) */ -/* Event : ara_fullscreen( No 0 ) */ -/****************************************/ -static void ZHSL_HomeScreens1e0( void ) -{ - stm_hsl_start_activity_homescreen(); -} - -/****************************************/ /* Event appraisal function */ /* STM : HomeScreen */ /* State : none( No 0 ) */ @@ -80,34 +68,6 @@ static void ZHSL_HomeScreens0Event( void ) /****************************************/ static void ZHSL_HomeScreens1Event( void ) { - /*evt_activate*/ - if( g_stm_event == StmEvtNoActivate ) - { - /*ctg_homescreen*/ - if( g_stm_category == StmCtgNoHomescreen ) - { - /*ara_fullscreen*/ - if( g_stm_area == StmAreaNoFullscreen ) - { - ZHSL_HomeScreens1e0(); - } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } } /****************************************/ diff --git a/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.c b/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.c new file mode 100644 index 0000000..8f65d32 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.c @@ -0,0 +1,117 @@ +/************************************************************/ +/* ZLIGHT_LightstatusBrake.c */ +/* LightstatusBrake State transition model source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/* State management variable */ +static uint8_t ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKESTATENOMAX]; + +static void ZLIGHT_LightstatusBrakes0e1( void ); +static void ZLIGHT_LightstatusBrakes1e0( void ); +static void ZLIGHT_LightstatusBrakes0Event( void ); +static void ZLIGHT_LightstatusBrakes1Event( void ); + +/****************************************/ +/* Action function */ +/* STM : LightstatusBrake */ +/* State : lightstatus_brake_on( No 0 ) */ +/* Event : evt_lightstatus_brake_off( No 1 ) */ +/****************************************/ +static void ZLIGHT_LightstatusBrakes0e1( void ) +{ + ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] = ( uint8_t )ZLIGHT_LIGHTSTATUSBRAKES1; + stm_lbs_start_activity_lightstatus_brake_off(); +} + +/****************************************/ +/* Action function */ +/* STM : LightstatusBrake */ +/* State : lightstatus_brake_off( No 1 ) */ +/* Event : evt_lightstatus_brake_on( No 0 ) */ +/****************************************/ +static void ZLIGHT_LightstatusBrakes1e0( void ) +{ + ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] = ( uint8_t )ZLIGHT_LIGHTSTATUSBRAKES0; + stm_lbs_start_activity_lightstatus_brake_on(); +} + +/****************************************/ +/* Event appraisal function */ +/* STM : LightstatusBrake */ +/* State : lightstatus_brake_on( No 0 ) */ +/****************************************/ +static void ZLIGHT_LightstatusBrakes0Event( void ) +{ + /*evt_lightstatus_brake_off*/ + if( g_stm_event == StmEvtNoLightstatusBrakeOff ) + { + ZLIGHT_LightstatusBrakes0e1(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : LightstatusBrake */ +/* State : lightstatus_brake_off( No 1 ) */ +/****************************************/ +static void ZLIGHT_LightstatusBrakes1Event( void ) +{ + /*evt_lightstatus_brake_on*/ + if( g_stm_event == StmEvtNoLightstatusBrakeOn ) + { + ZLIGHT_LightstatusBrakes1e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event call function */ +/* STM : LightstatusBrake */ +/****************************************/ +void stm_lbs_event_call( void ) +{ + stm_lbs_start_stm(); + switch( ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] ) + { + case ZLIGHT_LIGHTSTATUSBRAKES0: + ZLIGHT_LightstatusBrakes0Event(); + break; + case ZLIGHT_LIGHTSTATUSBRAKES1: + ZLIGHT_LightstatusBrakes1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Initial function */ +/* STM : LightstatusBrake */ +/****************************************/ +void stm_lbs_initialize( void ) +{ + ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] = ( uint8_t )ZLIGHT_LIGHTSTATUSBRAKES0; + stm_lbs_start_activity_lightstatus_brake_on(); +} + +/****************************************/ +/* Terminate function */ +/* STM : LightstatusBrake */ +/****************************************/ +void ZLIGHT_LightstatusBrakeTerminate( void ) +{ + ZLIGHT_LightstatusBrakeState[ZLIGHT_LIGHTSTATUSBRAKE] = ( uint8_t )ZLIGHT_LIGHTSTATUSBRAKETERMINATE; +} + diff --git a/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.h b/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.h new file mode 100644 index 0000000..0ced0ec --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrake.h @@ -0,0 +1,41 @@ +/************************************************************/ +/* ZLIGHT_LightstatusBrake.h */ +/* LightstatusBrake State transition model header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZLIGHT_LIGHTSTATUSBRAKE_H +#define ZHEADER_ZLIGHT_LIGHTSTATUSBRAKE_H + +/*State management variable access define*/ +#define ZLIGHT_LIGHTSTATUSBRAKE ( 0U ) +#define ZLIGHT_LIGHTSTATUSBRAKES0 ( 0U ) +#define ZLIGHT_LIGHTSTATUSBRAKES1 ( 1U ) +#define ZLIGHT_LIGHTSTATUSBRAKESTATENOMAX ( 1U ) + +/*End state define*/ +#define ZLIGHT_LIGHTSTATUSBRAKEEND ( 2U ) +/*Terminate state define*/ +#define ZLIGHT_LIGHTSTATUSBRAKETERMINATE ( ZLIGHT_LIGHTSTATUSBRAKEEND + 1U ) + +/*State no define*/ +#define ZLIGHT_LIGHTSTATUSBRAKES0STATENO ( 0U ) +#define ZLIGHT_LIGHTSTATUSBRAKES1STATENO ( 1U ) + +/*State serial no define*/ +#define ZLIGHT_LIGHTSTATUSBRAKES0STATESERIALNO ( 0U ) +#define ZLIGHT_LIGHTSTATUSBRAKES1STATESERIALNO ( 1U ) + +/*Event no define*/ +#define ZLIGHT_LIGHTSTATUSBRAKEE0EVENTNO ( 0U ) +#define ZLIGHT_LIGHTSTATUSBRAKEE1EVENTNO ( 1U ) + +/*Event serial no define*/ +#define ZLIGHT_LIGHTSTATUSBRAKEE0EVENTSERIALNO ( 0U ) +#define ZLIGHT_LIGHTSTATUSBRAKEE1EVENTSERIALNO ( 1U ) + +/*Extern function*/ +extern void stm_lbs_event_call( void ); +extern void stm_lbs_initialize( void ); +extern void ZLIGHT_LightstatusBrakeTerminate( void ); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.c b/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.c new file mode 100644 index 0000000..70c7478 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.c @@ -0,0 +1,45 @@ +/************************************************************/ +/* ZLIGHT_LightstatusBrakeStatus_func.c */ +/* Function and variable source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/************************************************************* + Function definition +*************************************************************/ + +/* + * @name stm_lbs_start_activity_lightstatus_brake_off + */ +void stm_lbs_start_activity_lightstatus_brake_off() { + g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state = StmLightstatusBrakeSttNoOff; + g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_TRUE; +} + +/* + * @name stm_lbs_start_activity_lightstatus_brake_on + */ +void stm_lbs_start_activity_lightstatus_brake_on() { + g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state = StmLightstatusBrakeSttNoOn; + g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_TRUE; +} + +/* + * @name stm_lbs_initialize_variable + */ +void stm_lbs_initialize_variable() { + g_stm_prv_state.car_element[StmCarElementNoLightstatusBrake].state = StmLightstatusBrakeSttNoOn; + g_stm_prv_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_FALSE; + + g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state = StmLightstatusBrakeSttNoOn; + g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_FALSE; +} + +/* + * @name stm_lbs_start_stm + */ +void stm_lbs_start_stm() { + g_stm_prv_state.car_element[StmCarElementNoLightstatusBrake].state = g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state; + g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].changed = STM_FALSE; +} diff --git a/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.h b/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.h new file mode 100644 index 0000000..5ebd5b1 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.h @@ -0,0 +1,14 @@ +/************************************************************/ +/* ZLIGHT_LightstatusBrakeStatus_func.h */ +/* Function and variable header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZLIGHT_LIGHTSTATUSBRAKESTATUS_FUNC_H +#define ZHEADER_ZLIGHT_LIGHTSTATUSBRAKESTATUS_FUNC_H + +extern void stm_lbs_start_activity_lightstatus_brake_off(); +extern void stm_lbs_start_activity_lightstatus_brake_on(); +extern void stm_lbs_initialize_variable(); +extern void stm_lbs_start_stm(); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c index c8ba22f..dad2484 100644 --- a/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c +++ b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c @@ -29,15 +29,15 @@ void stm_nhl_start_activity_software_keyboard() { * @name stm_nhl_event_restriction_mode_off */ void stm_nhl_event_restriction_mode_off() { - g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = g_prv_near_homescreen_state_rest_mode_1; + g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = g_prv_near_homescreen_state_car_stop; g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_TRUE; } /* - * @name stm_nhl_event_restriction_mode_2_on + * @name stm_nhl_event_restriction_mode_on */ void stm_nhl_event_restriction_mode_on() { - g_prv_near_homescreen_state_rest_mode_1 = g_stm_prv_state.layer[StmLayerNoNearHomescreen].state; + g_prv_near_homescreen_state_car_stop = g_stm_prv_state.layer[StmLayerNoNearHomescreen].state; } /* diff --git a/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c index cc3bbc7..1c024b8 100644 --- a/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c +++ b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c @@ -10,8 +10,8 @@ static uint8_t ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREENSTATENOMAX]; static void ZNHL_NearHomescreens0e0( void ); static void ZNHL_NearHomescreens0e3( void ); -static void ZNHL_NearHomescreens1e0( void ); static void ZNHL_NearHomescreens1e2( void ); +static void ZNHL_NearHomescreens1e4( void ); static void ZNHL_NearHomescreens0Event( void ); static void ZNHL_NearHomescreens1Event( void ); @@ -42,23 +42,23 @@ static void ZNHL_NearHomescreens0e3( void ) /* Action function */ /* STM : NearHomescreen */ /* State : software_keyboard( No 1 ) */ -/* Event : ara_software_keyboard( No 0 ) */ +/* Event : ctg_software_keyboard( No 2 ) */ /****************************************/ -static void ZNHL_NearHomescreens1e0( void ) +static void ZNHL_NearHomescreens1e2( void ) { - stm_nhl_start_activity_software_keyboard(); + ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS0; + stm_nhl_start_activity_none(); } /****************************************/ /* Action function */ /* STM : NearHomescreen */ /* State : software_keyboard( No 1 ) */ -/* Event : ctg_software_keyboard( No 2 ) */ +/* Event : stt_prv_layer_near_homescreen_sft_kbd( No 4 ) */ /****************************************/ -static void ZNHL_NearHomescreens1e2( void ) +static void ZNHL_NearHomescreens1e4( void ) { - ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS0; - stm_nhl_start_activity_none(); + stm_nhl_start_activity_software_keyboard(); } /****************************************/ @@ -123,30 +123,8 @@ static void ZNHL_NearHomescreens0Event( void ) /****************************************/ static void ZNHL_NearHomescreens1Event( void ) { - /*evt_activate*/ - if( g_stm_event == StmEvtNoActivate ) - { - /*ctg_software_keyboard*/ - if( g_stm_category == StmCtgNoSoftwareKeyboard ) - { - /*ara_software_keyboard*/ - if( g_stm_area == StmAreaNoSoftwareKyeboard ) - { - ZNHL_NearHomescreens1e0(); - } - else - { - ZNHL_NearHomescreens1e0(); - } - } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } /*evt_deactivate*/ - else if( g_stm_event == StmEvtNoDeactivate ) + if( g_stm_event == StmEvtNoDeactivate ) { /*ctg_software_keyboard*/ if( g_stm_category == StmCtgNoSoftwareKeyboard ) @@ -170,7 +148,7 @@ static void ZNHL_NearHomescreens1Event( void ) /*stt_prv_layer_near_homescreen_sft_kbd*/ else if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoSftKbd ) { - ZNHL_NearHomescreens1e0(); + ZNHL_NearHomescreens1e4(); } else { @@ -178,8 +156,8 @@ static void ZNHL_NearHomescreens1Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*stt_restriction_mode_1_on*/ - else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On ) + /*stt_lightstatus_brake_off*/ + else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) { ZNHL_NearHomescreens1e2(); } diff --git a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c index 90a6f6f..c131608 100644 --- a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c +++ b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c @@ -37,15 +37,15 @@ void stm_osl_start_activity_system_alert() { * @name stm_osl_event_restriction_mode_off */ void stm_osl_event_restriction_mode_off() { - g_stm_crr_state.layer[StmLayerNoOnScreen].state = g_prv_on_screen_state_rest_mode_1; + g_stm_crr_state.layer[StmLayerNoOnScreen].state = g_prv_on_screen_state_car_stop; g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE; } /* - * @name stm_osl_event_restriction_mode_2_on + * @name stm_osl_event_restriction_mode_on */ -void stm_osl_event_restriction_mode_2_on() { - g_prv_on_screen_state_rest_mode_1 = g_stm_prv_state.layer[StmLayerNoOnScreen].state; +void stm_osl_event_restriction_mode_on() { + g_prv_on_screen_state_car_stop = g_stm_prv_state.layer[StmLayerNoOnScreen].state; } /* * @name stm_osl_initialize_variable diff --git a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h index e85accb..3edef28 100644 --- a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h +++ b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h @@ -10,7 +10,7 @@ extern void stm_osl_start_activity_none(); extern void stm_osl_start_activity_pop_up(); extern void stm_osl_start_activity_system_alert(); extern void stm_osl_event_restriction_mode_off(); -extern void stm_osl_event_restriction_mode_2_on(); +extern void stm_osl_event_restriction_mode_on(); extern void stm_osl_initialize_variable(); extern void stm_osl_start_stm(); diff --git a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c index 53a50e1..6b60219 100644 --- a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c +++ b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c @@ -18,11 +18,11 @@ static void ZOSL_OslRestOffs0e1( void ); static void ZOSL_OslRestOffs0e4( void ); static void ZOSL_OslRestOffs1e0( void ); static void ZOSL_OslRestOffs1e2( void ); -static void ZOSL_OslRestOffs2e1( void ); +static void ZOSL_OslRestOffs2e6( void ); static void ZOSL_OslRestOns0e0( void ); static void ZOSL_OslRestOns0e2( void ); -static void ZOSL_OslRestOns1e0( void ); static void ZOSL_OslRestOns1e1( void ); +static void ZOSL_OslRestOns1e3( void ); static void ZOSL_OslMains0Event( void ); static void ZOSL_OslRestOffs0Event( void ); static void ZOSL_OslRestOffs1Event( void ); @@ -58,7 +58,7 @@ static void ZOSL_OslMains0StateEntry( void ) /****************************************/ /* State start activity function */ /* STM : OslMain */ -/* State : restriction_mode_2_on( No 1 ) */ +/* State : restriction_mode_on( No 1 )*/ /****************************************/ static void ZOSL_OslMains1StateEntry( void ) { @@ -105,7 +105,7 @@ static void ZOSL_OslMains0e2( void ) /****************************************/ /* Action function */ /* STM : OslMain */ -/* State : restriction_mode_2_on( No 1 ) */ +/* State : restriction_mode_on( No 1 )*/ /* Event : stt_restriction_mode_off( No 0 ) */ /****************************************/ static void ZOSL_OslMains1e0( void ) @@ -176,9 +176,9 @@ static void ZOSL_OslRestOffs1e2( void ) /* Action function */ /* STM : OslRestOff */ /* State : system_alert( No 2 ) */ -/* Event : ara_onscreen( No 1 ) */ +/* Event : stt_prv_layer_on_screen_sys_alt( No 6 ) */ /****************************************/ -static void ZOSL_OslRestOffs2e1( void ) +static void ZOSL_OslRestOffs2e6( void ) { stm_osl_start_activity_system_alert(); } @@ -210,23 +210,23 @@ static void ZOSL_OslRestOns0e2( void ) /* Action function */ /* STM : OslRestOn */ /* State : system_alert( No 1 ) */ -/* Event : ara_onscreen( No 0 ) */ +/* Event : ctg_systemalert( No 1 ) */ /****************************************/ -static void ZOSL_OslRestOns1e0( void ) +static void ZOSL_OslRestOns1e1( void ) { - stm_osl_start_activity_system_alert(); + ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0; + stm_osl_start_activity_none(); } /****************************************/ /* Action function */ /* STM : OslRestOn */ /* State : system_alert( No 1 ) */ -/* Event : ctg_systemalert( No 1 ) */ +/* Event : stt_prv_layer_on_screen_sys_alt( No 3 ) */ /****************************************/ -static void ZOSL_OslRestOns1e1( void ) +static void ZOSL_OslRestOns1e3( void ) { - ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0; - stm_osl_start_activity_none(); + stm_osl_start_activity_system_alert(); } /****************************************/ @@ -236,10 +236,10 @@ static void ZOSL_OslRestOns1e1( void ) /****************************************/ static void ZOSL_OslMains0Event( void ) { - /*stt_restriction_mode_2_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + /*stt_restriction_mode_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn ) { - stm_rel_event_restriction_mode_2_on(); + stm_rel_event_restriction_mode_on(); /*stt_crr_layer_on_screen_pop*/ if( g_stm_crr_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp ) { @@ -271,7 +271,7 @@ static void ZOSL_OslMains0Event( void ) static void ZOSL_OslRestOffs0Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -355,7 +355,7 @@ static void ZOSL_OslRestOffs0Event( void ) static void ZOSL_OslRestOffs1Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -453,33 +453,10 @@ static void ZOSL_OslRestOffs1Event( void ) static void ZOSL_OslRestOffs2Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { - /*evt_activate*/ - if( g_stm_event == StmEvtNoActivate ) - { - /*ctg_systemalert*/ - if( g_stm_category == StmCtgNoSystemAlert ) - { - /*ara_onscreen*/ - if( g_stm_area == StmAreaNoOnScreen ) - { - ZOSL_OslRestOffs2e1(); - } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } /*evt_deactivate*/ - else if( g_stm_event == StmEvtNoDeactivate ) + if( g_stm_event == StmEvtNoDeactivate ) { /*ctg_systemalert*/ if( g_stm_category == StmCtgNoSystemAlert ) @@ -508,7 +485,7 @@ static void ZOSL_OslRestOffs2Event( void ) /*stt_prv_layer_on_screen_sys_alt*/ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt ) { - ZOSL_OslRestOffs2e1(); + ZOSL_OslRestOffs2e6(); } else { @@ -532,12 +509,12 @@ static void ZOSL_OslRestOffs2Event( void ) /****************************************/ /* Event appraisal function */ /* STM : OslMain */ -/* State : restriction_mode_2_on( No 1 ) */ +/* State : restriction_mode_on( No 1 )*/ /****************************************/ static void ZOSL_OslMains1Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { stm_rel_event_restriction_mode_off(); ZOSL_OslMains1e0(); @@ -556,8 +533,8 @@ static void ZOSL_OslMains1Event( void ) /****************************************/ static void ZOSL_OslRestOns0Event( void ) { - /*stt_restriction_mode_2_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + /*stt_restriction_mode_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) @@ -621,34 +598,11 @@ static void ZOSL_OslRestOns0Event( void ) /****************************************/ static void ZOSL_OslRestOns1Event( void ) { - /*stt_restriction_mode_2_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + /*stt_restriction_mode_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn ) { - /*evt_activate*/ - if( g_stm_event == StmEvtNoActivate ) - { - /*ctg_systemalert*/ - if( g_stm_category == StmCtgNoSystemAlert ) - { - /*ara_onscreen*/ - if( g_stm_area == StmAreaNoOnScreen ) - { - ZOSL_OslRestOns1e0(); - } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } /*evt_deactivate*/ - else if( g_stm_event == StmEvtNoDeactivate ) + if( g_stm_event == StmEvtNoDeactivate ) { /*ctg_systemalert*/ if( g_stm_category == StmCtgNoSystemAlert ) @@ -672,7 +626,7 @@ static void ZOSL_OslRestOns1Event( void ) /*stt_prv_layer_on_screen_sys_alt*/ else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt ) { - ZOSL_OslRestOns1e0(); + ZOSL_OslRestOns1e3(); } else { diff --git a/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.c b/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.c index 6d07643..4c390ff 100644 --- a/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.c +++ b/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_RelMain.c @@ -58,7 +58,7 @@ static void ZREL_RelMains0StateEntry( void ) /****************************************/ /* State start activity function */ /* STM : RelMain */ -/* State : restriction_mode_2_on( No 1 ) */ +/* State : restriction_mode_on( No 1 )*/ /****************************************/ static void ZREL_RelMains1StateEntry( void ) { @@ -77,7 +77,7 @@ static void ZREL_RelMains1StateEntry( void ) /* Action function */ /* STM : RelMain */ /* State : restriction_mode_off( No 0 ) */ -/* Event : stt_restriction_mode_2_on( No 1 ) */ +/* Event : stt_restriction_mode_on( No 1 ) */ /****************************************/ static void ZREL_RelMains0e1( void ) { @@ -89,7 +89,7 @@ static void ZREL_RelMains0e1( void ) /****************************************/ /* Action function */ /* STM : RelMain */ -/* State : restriction_mode_2_on( No 1 ) */ +/* State : restriction_mode_on( No 1 )*/ /* Event : stt_restriction_mode_off( No 0 ) */ /****************************************/ static void ZREL_RelMains1e0( void ) @@ -197,10 +197,10 @@ static void ZREL_RelRestOffs3e0( void ) /****************************************/ static void ZREL_RelMains0Event( void ) { - /*stt_restriction_mode_2_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + /*stt_restriction_mode_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOn ) { - stm_rel_event_restriction_mode_2_on(); + stm_rel_event_restriction_mode_on(); ZREL_RelMains0e1(); } else @@ -217,54 +217,73 @@ static void ZREL_RelMains0Event( void ) /****************************************/ static void ZREL_RelRestOffs0Event( void ) { - /*stt_restriction_mode_1_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On ) + /*stt_restriction_mode_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { - /*stt_crr_layer_apps_changed*/ - if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE ) + /*stt_lightstatus_brake_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) { - /*stt_crr_layer_apps_map_spl*/ - if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + /*stt_crr_layer_apps_changed*/ + if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE ) { - ZREL_RelRestOffs0e0(); - } - /*stt_crr_layer_apps_spl_nml*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) - { - ZREL_RelRestOffs0e1(); - } - /*stt_crr_layer_apps_spl_spl*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) - { - ZREL_RelRestOffs0e1(); - } - /*stt_crr_layer_apps_gen_nml*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) - { - ZREL_RelRestOffs0e1(); + /*stt_crr_layer_apps_map_spl*/ + if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + { + ZREL_RelRestOffs0e0(); + } + /*stt_crr_layer_apps_spl_nml*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + { + ZREL_RelRestOffs0e1(); + } + /*stt_crr_layer_apps_spl_spl*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + ZREL_RelRestOffs0e1(); + } + /*stt_crr_layer_apps_gen_nml*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + ZREL_RelRestOffs0e1(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } } - else + /*evt_activate*/ + else if( g_stm_event == StmEvtNoActivate ) { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } - /*evt_activate*/ - else if( g_stm_event == StmEvtNoActivate ) - { - /*ctg_restriction*/ - if( g_stm_category == StmCtgNoRestriction ) - { - /*ara_restriction_normal*/ - if( g_stm_area == StmAreaNoRestrictionNormal ) + /*ctg_restriction*/ + if( g_stm_category == StmCtgNoRestriction ) { - /*stt_crr_layer_apps_spl_nml*/ - if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + /*ara_restriction_normal*/ + if( g_stm_area == StmAreaNoRestrictionNormal ) { - ZREL_RelRestOffs0e1(); + /*stt_crr_layer_apps_spl_nml*/ + if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + { + ZREL_RelRestOffs0e1(); + } + /*stt_crr_layer_apps_map_spl*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + { + ZREL_RelRestOffs0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ara_restriction_split_main*/ + else if( g_stm_area == StmAreaNoRestrictionSplitMain ) + { + ZREL_RelRestOffs0e8(); } - /*stt_crr_layer_apps_map_spl*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + /*ara_restriction_split_sub*/ + else if( g_stm_area == StmAreaNoRestrictionSplitSub ) { ZREL_RelRestOffs0e0(); } @@ -274,16 +293,6 @@ static void ZREL_RelRestOffs0Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*ara_restriction_split_main*/ - else if( g_stm_area == StmAreaNoRestrictionSplitMain ) - { - ZREL_RelRestOffs0e8(); - } - /*ara_restriction_split_sub*/ - else if( g_stm_area == StmAreaNoRestrictionSplitSub ) - { - ZREL_RelRestOffs0e0(); - } else { /*Else and default design have not done.*/ @@ -296,17 +305,8 @@ static void ZREL_RelRestOffs0Event( void ) /*Please confirm the STM and design else and default.*/ } } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } - /*stt_restriction_mode_off*/ - else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) - { /*evt_undo*/ - if( g_stm_event == StmEvtNoUndo ) + else if( g_stm_event == StmEvtNoUndo ) { /*stt_prv_layer_rst_none*/ if( g_stm_prv_state.layer[StmLayerNoRestriction].state == StmLayoutNoNone ) @@ -354,62 +354,81 @@ static void ZREL_RelRestOffs0Event( void ) /****************************************/ static void ZREL_RelRestOffs1Event( void ) { - /*stt_restriction_mode_1_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On ) + /*stt_restriction_mode_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { - /*stt_crr_layer_apps_changed*/ - if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE ) - { - /*stt_crr_layer_apps_map_spl*/ - if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) - { - ZREL_RelRestOffs0e0(); - } - /*stt_crr_layer_apps_spl_nml*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) - { - ZREL_RelRestOffs1e1(); - } - /*stt_crr_layer_apps_spl_spl*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) - { - ZREL_RelRestOffs1e1(); - } - /*stt_crr_layer_apps_gen_nml*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) - { - ZREL_RelRestOffs1e1(); - } - else - { - ZREL_RelRestOffs1e4(); - } - } - /*stt_crr_layer_hs_changed*/ - else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE ) + /*stt_lightstatus_brake_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) { - /*stt_crr_layer_hs_hms*/ - if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms ) + /*stt_crr_layer_apps_changed*/ + if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE ) { - ZREL_RelRestOffs1e4(); + /*stt_crr_layer_apps_map_spl*/ + if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + { + ZREL_RelRestOffs0e0(); + } + /*stt_crr_layer_apps_spl_nml*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + { + ZREL_RelRestOffs1e1(); + } + /*stt_crr_layer_apps_spl_spl*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + ZREL_RelRestOffs1e1(); + } + /*stt_crr_layer_apps_gen_nml*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + ZREL_RelRestOffs1e1(); + } + else + { + ZREL_RelRestOffs1e4(); + } } - else + /*stt_crr_layer_hs_changed*/ + else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE ) { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ + /*stt_crr_layer_hs_hms*/ + if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms ) + { + ZREL_RelRestOffs1e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } } - } - /*evt_activate*/ - else if( g_stm_event == StmEvtNoActivate ) - { - /*ctg_restriction*/ - if( g_stm_category == StmCtgNoRestriction ) + /*evt_activate*/ + else if( g_stm_event == StmEvtNoActivate ) { - /*ara_restriction_normal*/ - if( g_stm_area == StmAreaNoRestrictionNormal ) + /*ctg_restriction*/ + if( g_stm_category == StmCtgNoRestriction ) { - /*stt_crr_layer_apps_map_spl*/ - if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + /*ara_restriction_normal*/ + if( g_stm_area == StmAreaNoRestrictionNormal ) + { + /*stt_crr_layer_apps_map_spl*/ + if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + { + ZREL_RelRestOffs0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ara_restriction_split_main*/ + else if( g_stm_area == StmAreaNoRestrictionSplitMain ) + { + ZREL_RelRestOffs0e8(); + } + /*ara_restriction_split_sub*/ + else if( g_stm_area == StmAreaNoRestrictionSplitSub ) { ZREL_RelRestOffs0e0(); } @@ -419,15 +438,19 @@ static void ZREL_RelRestOffs1Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*ara_restriction_split_main*/ - else if( g_stm_area == StmAreaNoRestrictionSplitMain ) + /*ctg_homescreen*/ + else if( g_stm_category == StmCtgNoHomescreen ) { - ZREL_RelRestOffs0e8(); - } - /*ara_restriction_split_sub*/ - else if( g_stm_area == StmAreaNoRestrictionSplitSub ) - { - ZREL_RelRestOffs0e0(); + /*ara_fullscreen*/ + if( g_stm_area == StmAreaNoFullscreen ) + { + ZREL_RelRestOffs1e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } } else { @@ -435,11 +458,11 @@ static void ZREL_RelRestOffs1Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*ctg_homescreen*/ - else if( g_stm_category == StmCtgNoHomescreen ) + /*evt_deactivate*/ + else if( g_stm_event == StmEvtNoDeactivate ) { - /*ara_fullscreen*/ - if( g_stm_area == StmAreaNoFullscreen ) + /*ctg_restriction*/ + if( g_stm_category == StmCtgNoRestriction ) { ZREL_RelRestOffs1e4(); } @@ -455,11 +478,11 @@ static void ZREL_RelRestOffs1Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*evt_deactivate*/ - else if( g_stm_event == StmEvtNoDeactivate ) + /*stt_lightstatus_brake_on*/ + else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) { - /*ctg_restriction*/ - if( g_stm_category == StmCtgNoRestriction ) + /*stt_prv_layer_rst_not_none*/ + if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone ) { ZREL_RelRestOffs1e4(); } @@ -469,20 +492,6 @@ static void ZREL_RelRestOffs1Event( void ) /*Please confirm the STM and design else and default.*/ } } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } - /*stt_restriction_mode_off*/ - else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) - { - /*stt_prv_layer_rst_not_none*/ - if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone ) - { - ZREL_RelRestOffs1e4(); - } /*evt_undo*/ else if( g_stm_event == StmEvtNoUndo ) { @@ -532,69 +541,83 @@ static void ZREL_RelRestOffs1Event( void ) /****************************************/ static void ZREL_RelRestOffs2Event( void ) { - /*stt_restriction_mode_1_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On ) + /*stt_restriction_mode_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { - /*stt_crr_layer_apps_changed*/ - if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE ) - { - /*stt_crr_layer_apps_map_spl*/ - if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) - { - ZREL_RelRestOffs0e0(); - } - /*stt_crr_layer_apps_spl_nml*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) - { - ZREL_RelRestOffs0e1(); - } - /*stt_crr_layer_apps_spl_spl*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) - { - ZREL_RelRestOffs0e1(); - } - /*stt_crr_layer_apps_gen_nml*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) - { - ZREL_RelRestOffs0e1(); - } - else - { - ZREL_RelRestOffs1e4(); - } - } - /*stt_crr_layer_hs_changed*/ - else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE ) + /*stt_lightstatus_brake_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) { - /*stt_crr_layer_hs_hms*/ - if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms ) + /*stt_crr_layer_apps_changed*/ + if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE ) { - ZREL_RelRestOffs1e4(); + /*stt_crr_layer_apps_map_spl*/ + if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + { + ZREL_RelRestOffs0e0(); + } + /*stt_crr_layer_apps_spl_nml*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + { + ZREL_RelRestOffs0e1(); + } + /*stt_crr_layer_apps_spl_spl*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + ZREL_RelRestOffs0e1(); + } + /*stt_crr_layer_apps_gen_nml*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + ZREL_RelRestOffs0e1(); + } + else + { + ZREL_RelRestOffs1e4(); + } } - else + /*stt_crr_layer_hs_changed*/ + else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE ) { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ + /*stt_crr_layer_hs_hms*/ + if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms ) + { + ZREL_RelRestOffs1e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } } - } - /*evt_activate*/ - else if( g_stm_event == StmEvtNoActivate ) - { - /*ctg_restriction*/ - if( g_stm_category == StmCtgNoRestriction ) + /*evt_activate*/ + else if( g_stm_event == StmEvtNoActivate ) { - /*ara_restriction_normal*/ - if( g_stm_area == StmAreaNoRestrictionNormal ) + /*ctg_restriction*/ + if( g_stm_category == StmCtgNoRestriction ) { - /*stt_crr_layer_apps_spl_nml*/ - if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + /*ara_restriction_normal*/ + if( g_stm_area == StmAreaNoRestrictionNormal ) { - ZREL_RelRestOffs0e1(); + /*stt_crr_layer_apps_spl_nml*/ + if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + { + ZREL_RelRestOffs0e1(); + } + /*stt_crr_layer_apps_map_spl*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + { + ZREL_RelRestOffs0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } } - /*stt_crr_layer_apps_map_spl*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + /*ara_restriction_split_sub*/ + else if( g_stm_area == StmAreaNoRestrictionSplitSub ) { - ZREL_RelRestOffs0e0(); + ZREL_RelRestOffs0e1(); } else { @@ -602,10 +625,19 @@ static void ZREL_RelRestOffs2Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*ara_restriction_split_sub*/ - else if( g_stm_area == StmAreaNoRestrictionSplitSub ) + /*ctg_homescreen*/ + else if( g_stm_category == StmCtgNoHomescreen ) { - ZREL_RelRestOffs0e1(); + /*ara_fullscreen*/ + if( g_stm_area == StmAreaNoFullscreen ) + { + ZREL_RelRestOffs1e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } } else { @@ -613,11 +645,11 @@ static void ZREL_RelRestOffs2Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*ctg_homescreen*/ - else if( g_stm_category == StmCtgNoHomescreen ) + /*evt_deactivate*/ + else if( g_stm_event == StmEvtNoDeactivate ) { - /*ara_fullscreen*/ - if( g_stm_area == StmAreaNoFullscreen ) + /*ctg_restriction*/ + if( g_stm_category == StmCtgNoRestriction ) { ZREL_RelRestOffs1e4(); } @@ -633,11 +665,11 @@ static void ZREL_RelRestOffs2Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*evt_deactivate*/ - else if( g_stm_event == StmEvtNoDeactivate ) + /*stt_lightstatus_brake_on*/ + else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) { - /*ctg_restriction*/ - if( g_stm_category == StmCtgNoRestriction ) + /*stt_prv_layer_rst_not_none*/ + if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone ) { ZREL_RelRestOffs1e4(); } @@ -647,20 +679,6 @@ static void ZREL_RelRestOffs2Event( void ) /*Please confirm the STM and design else and default.*/ } } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } - /*stt_restriction_mode_off*/ - else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) - { - /*stt_prv_layer_rst_not_none*/ - if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone ) - { - ZREL_RelRestOffs1e4(); - } /*evt_undo*/ else if( g_stm_event == StmEvtNoUndo ) { @@ -710,62 +728,76 @@ static void ZREL_RelRestOffs2Event( void ) /****************************************/ static void ZREL_RelRestOffs3Event( void ) { - /*stt_restriction_mode_1_on*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On ) + /*stt_restriction_mode_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { - /*stt_crr_layer_apps_changed*/ - if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE ) - { - /*stt_crr_layer_apps_map_spl*/ - if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) - { - ZREL_RelRestOffs3e0(); - } - /*stt_crr_layer_apps_spl_nml*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) - { - ZREL_RelRestOffs0e1(); - } - /*stt_crr_layer_apps_spl_spl*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) - { - ZREL_RelRestOffs0e1(); - } - /*stt_crr_layer_apps_gen_nml*/ - else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) - { - ZREL_RelRestOffs0e1(); - } - else - { - ZREL_RelRestOffs1e4(); - } - } - /*stt_crr_layer_hs_changed*/ - else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE ) + /*stt_lightstatus_brake_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) { - /*stt_crr_layer_hs_hms*/ - if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms ) + /*stt_crr_layer_apps_changed*/ + if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE ) { - ZREL_RelRestOffs1e4(); + /*stt_crr_layer_apps_map_spl*/ + if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoMapSpl ) + { + ZREL_RelRestOffs3e0(); + } + /*stt_crr_layer_apps_spl_nml*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + { + ZREL_RelRestOffs0e1(); + } + /*stt_crr_layer_apps_spl_spl*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + ZREL_RelRestOffs0e1(); + } + /*stt_crr_layer_apps_gen_nml*/ + else if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + ZREL_RelRestOffs0e1(); + } + else + { + ZREL_RelRestOffs1e4(); + } } - else + /*stt_crr_layer_hs_changed*/ + else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE ) { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ + /*stt_crr_layer_hs_hms*/ + if( g_stm_crr_state.layer[StmLayerNoHomescreen].state == StmLayoutNoHms ) + { + ZREL_RelRestOffs1e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } } - } - /*evt_activate*/ - else if( g_stm_event == StmEvtNoActivate ) - { - /*ctg_restriction*/ - if( g_stm_category == StmCtgNoRestriction ) + /*evt_activate*/ + else if( g_stm_event == StmEvtNoActivate ) { - /*ara_restriction_normal*/ - if( g_stm_area == StmAreaNoRestrictionNormal ) + /*ctg_restriction*/ + if( g_stm_category == StmCtgNoRestriction ) { - /*stt_crr_layer_apps_spl_nml*/ - if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + /*ara_restriction_normal*/ + if( g_stm_area == StmAreaNoRestrictionNormal ) + { + /*stt_crr_layer_apps_spl_nml*/ + if( g_stm_crr_state.layer[StmLayerNoApps].state == StmLayoutNoSplNml ) + { + ZREL_RelRestOffs0e1(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ara_restriction_split_main*/ + else if( g_stm_area == StmAreaNoRestrictionSplitMain ) { ZREL_RelRestOffs0e1(); } @@ -775,10 +807,19 @@ static void ZREL_RelRestOffs3Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*ara_restriction_split_main*/ - else if( g_stm_area == StmAreaNoRestrictionSplitMain ) + /*ctg_homescreen*/ + else if( g_stm_category == StmCtgNoHomescreen ) { - ZREL_RelRestOffs0e1(); + /*ara_fullscreen*/ + if( g_stm_area == StmAreaNoFullscreen ) + { + ZREL_RelRestOffs1e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } } else { @@ -786,11 +827,11 @@ static void ZREL_RelRestOffs3Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*ctg_homescreen*/ - else if( g_stm_category == StmCtgNoHomescreen ) + /*evt_deactivate*/ + else if( g_stm_event == StmEvtNoDeactivate ) { - /*ara_fullscreen*/ - if( g_stm_area == StmAreaNoFullscreen ) + /*ctg_restriction*/ + if( g_stm_category == StmCtgNoRestriction ) { ZREL_RelRestOffs1e4(); } @@ -806,11 +847,11 @@ static void ZREL_RelRestOffs3Event( void ) /*Please confirm the STM and design else and default.*/ } } - /*evt_deactivate*/ - else if( g_stm_event == StmEvtNoDeactivate ) + /*stt_lightstatus_brake_on*/ + else if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) { - /*ctg_restriction*/ - if( g_stm_category == StmCtgNoRestriction ) + /*stt_prv_layer_rst_not_none*/ + if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone ) { ZREL_RelRestOffs1e4(); } @@ -820,20 +861,6 @@ static void ZREL_RelRestOffs3Event( void ) /*Please confirm the STM and design else and default.*/ } } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } - } - /*stt_restriction_mode_off*/ - else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) - { - /*stt_prv_layer_rst_not_none*/ - if( g_stm_prv_state.layer[StmLayerNoRestriction].state != StmLayoutNoNone ) - { - ZREL_RelRestOffs1e4(); - } /*evt_undo*/ else if( g_stm_event == StmEvtNoUndo ) { @@ -879,12 +906,12 @@ static void ZREL_RelRestOffs3Event( void ) /****************************************/ /* Event appraisal function */ /* STM : RelMain */ -/* State : restriction_mode_2_on( No 1 ) */ +/* State : restriction_mode_on( No 1 )*/ /****************************************/ static void ZREL_RelMains1Event( void ) { /*stt_restriction_mode_off*/ - if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + if( g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state == StmRestrictionModeSttNoOff ) { stm_rel_event_restriction_mode_off(); ZREL_RelMains1e0(); diff --git a/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.c b/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.c index 5195f98..a1aa213 100644 --- a/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.c +++ b/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.c @@ -45,15 +45,15 @@ void stm_rel_start_activity_restriction_split_sub() { * @name stm_rel_event_restriction_mode_off */ void stm_rel_event_restriction_mode_off() { - g_stm_crr_state.layer[StmLayerNoRestriction].state = g_prv_restriction_state_rest_mode_1; + g_stm_crr_state.layer[StmLayerNoRestriction].state = g_prv_restriction_state_car_stop; g_stm_crr_state.layer[StmLayerNoRestriction].changed = STM_TRUE; } /* - * @name stm_rel_event_restriction_mode_2_on + * @name stm_rel_event_restriction_mode_on */ -void stm_rel_event_restriction_mode_2_on() { - g_prv_restriction_state_rest_mode_1 = g_stm_prv_state.layer[StmLayerNoRestriction].state; +void stm_rel_event_restriction_mode_on() { + g_prv_restriction_state_car_stop = g_stm_prv_state.layer[StmLayerNoRestriction].state; } /* diff --git a/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.h b/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.h index 5cd9b7d..3763820 100644 --- a/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.h +++ b/policy_manager/stm/zipc/StateTransitionor/RestrictionLayer/ZREL_Restriction_func.h @@ -11,7 +11,7 @@ extern void stm_rel_start_activity_restriction_normal(); extern void stm_rel_start_activity_restriction_split_main(); extern void stm_rel_start_activity_restriction_split_sub(); extern void stm_rel_event_restriction_mode_off(); -extern void stm_rel_event_restriction_mode_2_on(); +extern void stm_rel_event_restriction_mode_on(); extern void stm_rel_initialize_variable(); extern void stm_rel_start_stm(); diff --git a/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.c b/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.c index 7fe5700..2ba6a87 100644 --- a/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.c +++ b/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.c @@ -9,88 +9,45 @@ static uint8_t ZREM_RestrictionModeState[ZREM_RESTRICTIONMODESTATENOMAX]; static void ZREM_RestrictionModes0e1( void ); -static void ZREM_RestrictionModes0e2( void ); static void ZREM_RestrictionModes1e0( void ); static void ZREM_RestrictionModes0Event( void ); static void ZREM_RestrictionModes1Event( void ); -static void ZREM_RestrictionModes2Event( void ); /****************************************/ /* Action function */ /* STM : RestrictionMode */ -/* State : restriction_mode_off( No 0 ) */ -/* Event : evt_restriction_mode_1_on( No 1 ) */ +/* State : restriction_mode_on( No 0 )*/ +/* Event : evt_restriction_mode_off( No 1 ) */ /****************************************/ static void ZREM_RestrictionModes0e1( void ) { ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES1; - stm_rem_start_activity_restriction_mode_1_on(); -} - -/****************************************/ -/* Action function */ -/* STM : RestrictionMode */ -/* State : restriction_mode_off( No 0 ) */ -/* Event : evt_restriction_mode_2_on( No 2 ) */ -/****************************************/ -static void ZREM_RestrictionModes0e2( void ) -{ - ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES2; - stm_rem_start_activity_restriction_mode_2_on(); + stm_rem_start_activity_restriction_mode_off(); } /****************************************/ /* Action function */ /* STM : RestrictionMode */ -/* State : restriction_mode_1_on( No 1 ) */ -/* Event : evt_restriction_mode_off( No 0 ) */ +/* State : restriction_mode_off( No 1 ) */ +/* Event : evt_restriction_mode_on( No 0 ) */ /****************************************/ static void ZREM_RestrictionModes1e0( void ) { ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES0; - stm_rem_start_activity_restriction_mode_off(); + stm_rem_start_activity_restriction_mode_on(); } /****************************************/ /* Event appraisal function */ /* STM : RestrictionMode */ -/* State : restriction_mode_off( No 0 ) */ +/* State : restriction_mode_on( No 0 )*/ /****************************************/ static void ZREM_RestrictionModes0Event( void ) { - /*evt_restriction_mode_1_on*/ - if( g_stm_event == StmEvtNoRestrictionMode1On ) - { - ZREM_RestrictionModes0e1(); - } - /*evt_restriction_mode_2_on*/ - else if( g_stm_event == StmEvtNoRestrictionMode2On ) - { - ZREM_RestrictionModes0e2(); - } - else - { - /*Else and default design have not done.*/ - /*Please confirm the STM and design else and default.*/ - } -} - -/****************************************/ -/* Event appraisal function */ -/* STM : RestrictionMode */ -/* State : restriction_mode_1_on( No 1 ) */ -/****************************************/ -static void ZREM_RestrictionModes1Event( void ) -{ /*evt_restriction_mode_off*/ if( g_stm_event == StmEvtNoRestrictionModeOff ) { - ZREM_RestrictionModes1e0(); - } - /*evt_restriction_mode_2_on*/ - else if( g_stm_event == StmEvtNoRestrictionMode2On ) - { - ZREM_RestrictionModes0e2(); + ZREM_RestrictionModes0e1(); } else { @@ -102,20 +59,15 @@ static void ZREM_RestrictionModes1Event( void ) /****************************************/ /* Event appraisal function */ /* STM : RestrictionMode */ -/* State : restriction_mode_2_on( No 2 ) */ +/* State : restriction_mode_off( No 1 ) */ /****************************************/ -static void ZREM_RestrictionModes2Event( void ) +static void ZREM_RestrictionModes1Event( void ) { - /*evt_restriction_mode_off*/ - if( g_stm_event == StmEvtNoRestrictionModeOff ) + /*evt_restriction_mode_on*/ + if( g_stm_event == StmEvtNoRestrictionModeOn ) { ZREM_RestrictionModes1e0(); } - /*evt_restriction_mode_1_on*/ - else if( g_stm_event == StmEvtNoRestrictionMode1On ) - { - ZREM_RestrictionModes0e1(); - } else { /*Else and default design have not done.*/ @@ -138,9 +90,6 @@ void stm_rem_event_call( void ) case ZREM_RESTRICTIONMODES1: ZREM_RestrictionModes1Event(); break; - case ZREM_RESTRICTIONMODES2: - ZREM_RestrictionModes2Event(); - break; default: /*Not accessible to this else (default).*/ break; @@ -153,7 +102,7 @@ void stm_rem_event_call( void ) /****************************************/ void stm_rem_initialize( void ) { - ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES0; + ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES1; stm_rem_start_activity_restriction_mode_off(); } diff --git a/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.h b/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.h index f2c2026..4ce0cac 100644 --- a/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.h +++ b/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode.h @@ -10,33 +10,28 @@ #define ZREM_RESTRICTIONMODE ( 0U ) #define ZREM_RESTRICTIONMODES0 ( 0U ) #define ZREM_RESTRICTIONMODES1 ( 1U ) -#define ZREM_RESTRICTIONMODES2 ( 2U ) #define ZREM_RESTRICTIONMODESTATENOMAX ( 1U ) /*End state define*/ -#define ZREM_RESTRICTIONMODEEND ( 3U ) +#define ZREM_RESTRICTIONMODEEND ( 2U ) /*Terminate state define*/ #define ZREM_RESTRICTIONMODETERMINATE ( ZREM_RESTRICTIONMODEEND + 1U ) /*State no define*/ #define ZREM_RESTRICTIONMODES0STATENO ( 0U ) #define ZREM_RESTRICTIONMODES1STATENO ( 1U ) -#define ZREM_RESTRICTIONMODES2STATENO ( 2U ) /*State serial no define*/ #define ZREM_RESTRICTIONMODES0STATESERIALNO ( 0U ) #define ZREM_RESTRICTIONMODES1STATESERIALNO ( 1U ) -#define ZREM_RESTRICTIONMODES2STATESERIALNO ( 2U ) /*Event no define*/ #define ZREM_RESTRICTIONMODEE0EVENTNO ( 0U ) #define ZREM_RESTRICTIONMODEE1EVENTNO ( 1U ) -#define ZREM_RESTRICTIONMODEE2EVENTNO ( 2U ) /*Event serial no define*/ #define ZREM_RESTRICTIONMODEE0EVENTSERIALNO ( 0U ) #define ZREM_RESTRICTIONMODEE1EVENTSERIALNO ( 1U ) -#define ZREM_RESTRICTIONMODEE2EVENTSERIALNO ( 2U ) /*Extern function*/ extern void stm_rem_event_call( void ); diff --git a/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.c b/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.c index 94807f8..e920916 100644 --- a/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.c +++ b/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.c @@ -10,44 +10,36 @@ *************************************************************/ /* - * @name stm_rem_start_activity_restriction_mode_1_on + * @name stm_rem_start_activity_restriction_mode_on */ -void stm_rem_start_activity_restriction_mode_1_on() { - g_stm_crr_state.mode[StmModeNoRestrictionMode].state = StmRestrictionModeSttNo1On; - g_stm_crr_state.mode[StmModeNoRestrictionMode].changed = STM_TRUE; -} - -/* - * @name stm_rem_start_activity_restriction_mode_2_on - */ -void stm_rem_start_activity_restriction_mode_2_on() { - g_stm_crr_state.mode[StmModeNoRestrictionMode].state = StmRestrictionModeSttNo2On; - g_stm_crr_state.mode[StmModeNoRestrictionMode].changed = STM_TRUE; +void stm_rem_start_activity_restriction_mode_on() { + g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state = StmRestrictionModeSttNoOn; + g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].changed = STM_TRUE; } /* * @name stm_rem_start_activity_restriction_mode_off */ void stm_rem_start_activity_restriction_mode_off() { - g_stm_crr_state.mode[StmModeNoRestrictionMode].state = StmRestrictionModeSttNoOff; - g_stm_crr_state.mode[StmModeNoRestrictionMode].changed = STM_TRUE; + g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state = StmRestrictionModeSttNoOff; + g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].changed = STM_TRUE; } /* * @name stm_rem_initialize_variable */ void stm_rem_initialize_variable() { - g_stm_prv_state.mode[StmModeNoRestrictionMode].state = StmRestrictionModeSttNoOff; - g_stm_prv_state.mode[StmModeNoRestrictionMode].changed = STM_FALSE; + g_stm_prv_state.car_element[StmCarElementNoRestrictionMode].state = StmRestrictionModeSttNoOff; + g_stm_prv_state.car_element[StmCarElementNoRestrictionMode].changed = STM_FALSE; - g_stm_crr_state.mode[StmModeNoRestrictionMode].state = StmRestrictionModeSttNoOff; - g_stm_crr_state.mode[StmModeNoRestrictionMode].changed = STM_FALSE; + g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state = StmRestrictionModeSttNoOff; + g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].changed = STM_FALSE; } /* * @name stm_rem_start_stm */ void stm_rem_start_stm() { - g_stm_prv_state.mode[StmModeNoRestrictionMode].state = g_stm_crr_state.mode[StmModeNoRestrictionMode].state; - g_stm_crr_state.mode[StmModeNoRestrictionMode].changed = STM_FALSE; + g_stm_prv_state.car_element[StmCarElementNoRestrictionMode].state = g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].state; + g_stm_crr_state.car_element[StmCarElementNoRestrictionMode].changed = STM_FALSE; } diff --git a/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.h b/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.h index f85ab14..bbb6edf 100644 --- a/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.h +++ b/policy_manager/stm/zipc/StateTransitionor/RestrictionMode/ZREM_RestrictionMode_func.h @@ -6,8 +6,7 @@ #ifndef ZHEADER_ZREM_RESTRICTIONMODE_FUNC_H #define ZHEADER_ZREM_RESTRICTIONMODE_FUNC_H -extern void stm_rem_start_activity_restriction_mode_1_on(); -extern void stm_rem_start_activity_restriction_mode_2_on(); +extern void stm_rem_start_activity_restriction_mode_on(); extern void stm_rem_start_activity_restriction_mode_off(); extern void stm_rem_initialize_variable(); extern void stm_rem_start_stm(); diff --git a/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.c b/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.c index 3903202..daea2ca 100644 --- a/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.c +++ b/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_func.c @@ -4,12 +4,17 @@ /* ZIPC Designer Version 1.2.0 */ /************************************************************/ #include "ZST_include.h" +#include "../stm_master_apps.h" +#include "../stm_master_remote.h" /************************************************************* Function definition *************************************************************/ #include <string.h> +#include <stdbool.h> + +static bool isMaster = false; //================================= // API @@ -17,34 +22,69 @@ /** * Initialize STM */ -void stmInitializeInner() { +void stmInitializeInner(const char *ecu_name) { + + // TODO: Set master mode + if (0 == strcmp("master", ecu_name)) + { + isMaster = true; + } + // Initialize previous state memset(&g_stm_prv_state, 0, sizeof(g_stm_prv_state)); // Initialize current state g_stm_crr_state = g_stm_prv_state; - /* Initialize restriction mode state */ - stm_rem_initialize(); - stm_rem_initialize_variable(); - - // Initialize homecsreen layer - stm_hsl_initialize(); - stm_hsl_initialize_variable(); - - // Initialize apps layer - stm_apl_initialize(); - stm_apl_initialize_variable(); - - // Initialize near_homecsreen layer - stm_nhl_initialize(); - stm_nhl_initialize_variable(); - - /* Initialize restriction layer */ - stm_rel_initialize(); - stm_rel_initialize_variable(); - - g_stm_map_is_activated = STM_FALSE; + /* Initialize LightstatusBrake state */ + stm_lbs_initialize(); + stm_lbs_initialize_variable(); + + /* Initialize AccelPedal state */ + stm_aps_initialize(); + stm_aps_initialize_variable(); + + /* Initialize car state */ + stm_rns_initialize(); + stm_rns_initialize_variable(); + + /* Initialize restriction mode state */ + stm_rem_initialize(); + stm_rem_initialize_variable(); + + // Initialize homecsreen layer + stm_hsl_initialize(); + stm_hsl_initialize_variable(); + + if (isMaster) + { + // Initialize apps layer on master ecu + stm_master_apl_initialize(); + stm_master_apl_initialize_valiable(); + } + else + { + // Initialize apps layer + stm_apl_initialize(); + stm_apl_initialize_variable(); + } + + // Initialize near_homecsreen layer + stm_nhl_initialize(); + stm_nhl_initialize_variable(); + + /* Initialize restriction layer */ + stm_rel_initialize(); + stm_rel_initialize_variable(); + + if (isMaster) + { + // Initialize remote layer on master ecu + stm_mst_rmt_initialize(); + stm_mst_rmt_initialize_valiable(); + } + + g_stm_map_is_activated = STM_FALSE; } /** @@ -55,14 +95,31 @@ int stmTransitionStateInner(int event_id, StmState* state) { g_stm_category = STM_GET_CATEGORY_FROM_ID(event_id); g_stm_area = STM_GET_AREA_FROM_ID(event_id); + // LightstatusBrake state + stm_lbs_event_call(); + + // AccelPedal state + stm_aps_event_call(); + + // Car state + stm_rns_event_call(); + // restriction mode stm_rem_event_call(); // homescreen layer stm_hsl_event_call(); - // apps layer - stm_apl_event_call(); + if (isMaster) + { + // apps layer on master ecu + stm_master_apl_event_call(); + } + else + { + // apps layer + stm_apl_event_call(); + } // near_homecsreen layer stm_nhl_event_call(); @@ -73,6 +130,12 @@ int stmTransitionStateInner(int event_id, StmState* state) { // on_screen layer stm_osl_event_call(); + if (isMaster) + { + // remote layer on master ecu + stm_mst_rmt_event_call(); + } + // Copy current state for return memcpy(state, &g_stm_crr_state, sizeof(g_stm_crr_state)); @@ -85,8 +148,16 @@ int stmTransitionStateInner(int event_id, StmState* state) { void stmUndoStateInner() { g_stm_event = StmEvtNoUndo; - // apps layer - stm_apl_event_call(); + if (isMaster) + { + // apps layer on master ecu + stm_master_apl_event_call(); + } + else + { + // apps layer + stm_apl_event_call(); + } // near_homecsreen layer stm_nhl_event_call(); @@ -97,6 +168,11 @@ void stmUndoStateInner() { // on_screen layer stm_osl_event_call(); + if (isMaster) + { + // remote layer on master ecu + stm_mst_rmt_event_call(); + } + g_stm_crr_state = g_stm_prv_state; } - diff --git a/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.c b/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.c index b3a2273..a5e67ff 100644 --- a/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.c +++ b/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.c @@ -36,21 +36,21 @@ int g_stm_area; int g_stm_map_is_activated; /** - * g_prv_apps_state_rest_mode_1 + * g_prv_apps_state_car_stop */ -int g_prv_apps_state_rest_mode_1; +int g_prv_apps_state_car_stop; /** - * g_prv_near_homescreen_state_rest_mode_1 + * g_prv_near_homescreen_state_car_stop */ -int g_prv_near_homescreen_state_rest_mode_1; +int g_prv_near_homescreen_state_car_stop; /** - * g_prv_restriction_state_rest_mode_1 + * g_prv_restriction_state_car_stop */ -int g_prv_restriction_state_rest_mode_1; +int g_prv_restriction_state_car_stop; /** - * g_prv_on_screen_state_rest_mode_1 + * g_prv_on_screen_state_car_stop */ -int g_prv_on_screen_state_rest_mode_1; +int g_prv_on_screen_state_car_stop; diff --git a/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.h b/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.h index 57b52ee..4cabced 100644 --- a/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.h +++ b/policy_manager/stm/zipc/StateTransitionor/ZST_StateTransitionor_var.h @@ -12,9 +12,9 @@ extern int g_stm_event; extern int g_stm_category; extern int g_stm_area; extern int g_stm_map_is_activated; -extern int g_prv_apps_state_rest_mode_1; -extern int g_prv_near_homescreen_state_rest_mode_1; -extern int g_prv_restriction_state_rest_mode_1; -extern int g_prv_on_screen_state_rest_mode_1; +extern int g_prv_apps_state_car_stop; +extern int g_prv_near_homescreen_state_car_stop; +extern int g_prv_restriction_state_car_stop; +extern int g_prv_on_screen_state_car_stop; #endif diff --git a/policy_manager/stm/zipc/StateTransitionor/ZST_include.h b/policy_manager/stm/zipc/StateTransitionor/ZST_include.h index e3d1572..2158660 100644 --- a/policy_manager/stm/zipc/StateTransitionor/ZST_include.h +++ b/policy_manager/stm/zipc/StateTransitionor/ZST_include.h @@ -11,6 +11,8 @@ #include "../Common/MisraCType.h" #include "../Common/Event.h" #include "ZST_StateTransitionor_def.h" +#include "master/layer/apps/Zmaster_apps_master_apps_def.h" +#include "master/layer/remote/Zmaster_remote_master_remote_def.h" #include "ZST_StateTransitionor_func.h" #include "ZST_StateTransitionor_var.h" #include "AppsLayer/ZAPL_Apps_func.h" @@ -19,11 +21,19 @@ #include "RestrictionLayer/ZREL_Restriction_func.h" #include "RestrictionMode/ZREM_RestrictionMode_func.h" #include "NearHomeScreen/ZNHL_NearHomeScreen_func.h" +#include "AccelPedal/ZACCEL_AccelPedalState_func.h" +#include "CarState/ZCAR_CarState_func.h" +#include "LightStatusBrake/ZLIGHT_LightstatusBrakeStatus_func.h" +#include "master/layer/apps/Zmaster_apps_apps_main.h" +#include "master/layer/remote/Zmaster_remote_remote.h" #include "AppsLayer/ZAPL_AppsLayer.h" #include "OnScreenlayer/ZOSL_OslMain.h" #include "HomeScreenLayer/ZHSL_HomeScreen.h" #include "RestrictionLayer/ZREL_RelMain.h" #include "RestrictionMode/ZREM_RestrictionMode.h" #include "NearHomeScreen/ZNHL_NearHomescreen.h" +#include "AccelPedal/ZACCEL_AccelPedal.h" +#include "CarState/ZCAR_CarState.h" +#include "LightStatusBrake/ZLIGHT_LightstatusBrake.h" #endif diff --git a/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.c b/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.c new file mode 100644 index 0000000..af46ea9 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.c @@ -0,0 +1,1456 @@ +/************************************************************/ +/* Zmaster_apps_apps_main.c */ +/* apps_main State transition model source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../../../ZST_include.h" + +/* State management variable */ +static uint8_t Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINSTATENOMAX]; + +static void Zmaster_apps_apps_mains0StateEntry( void ); +static void Zmaster_apps_apps_mains1StateEntry( void ); +static void Zmaster_apps_apps_mains0e1( void ); +static void Zmaster_apps_apps_mains1e0( void ); +static void Zmaster_apps_apps_car_stops0e0( void ); +static void Zmaster_apps_apps_car_stops0e2( void ); +static void Zmaster_apps_apps_car_stops0e3( void ); +static void Zmaster_apps_apps_car_stops0e4( void ); +static void Zmaster_apps_apps_car_stops0e11( void ); +static void Zmaster_apps_apps_car_stops0e15( void ); +static void Zmaster_apps_apps_car_runs0e0( void ); +static void Zmaster_apps_apps_car_runs0e3( void ); +static void Zmaster_apps_apps_mains0Event( void ); +static void Zmaster_apps_apps_car_stops0Event( void ); +static void Zmaster_apps_apps_car_stops1Event( void ); +static void Zmaster_apps_apps_car_stops2Event( void ); +static void Zmaster_apps_apps_car_stops3Event( void ); +static void Zmaster_apps_apps_car_stops4Event( void ); +static void Zmaster_apps_apps_car_stops5Event( void ); +static void Zmaster_apps_apps_mains1Event( void ); +static void Zmaster_apps_apps_car_runs0Event( void ); +static void Zmaster_apps_apps_car_runs1Event( void ); + +/****************************************/ +/* State start activity function */ +/* STM : apps_main */ +/* State : lightstatus_brake_on( No 0 ) */ +/****************************************/ +static void Zmaster_apps_apps_mains0StateEntry( void ) +{ + switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] ) + { + case ZMASTER_APPS_APPS_CAR_STOPS0: + stm_mst_apl_start_activity_none(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS1: + stm_mst_apl_start_activity_meter_receiver(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS2: + stm_mst_apl_start_activity_meter_splitable(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS3: + stm_mst_apl_start_activity_splitable_receiver(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS4: + stm_mst_apl_start_activity_splitable_split(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS5: + stm_mst_apl_start_activity_general(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* State start activity function */ +/* STM : apps_main */ +/* State : lightstatus_brake_off( No 1 ) */ +/****************************************/ +static void Zmaster_apps_apps_mains1StateEntry( void ) +{ + switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] ) + { + case ZMASTER_APPS_APPS_CAR_RUNS0: + stm_mst_apl_start_activity_meter_receiver(); + break; + case ZMASTER_APPS_APPS_CAR_RUNS1: + stm_mst_apl_start_activity_meter(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Action function */ +/* STM : apps_main */ +/* State : lightstatus_brake_on( No 0 ) */ +/* Event : stt_lightstatus_brake_off( No 1 ) */ +/****************************************/ +static void Zmaster_apps_apps_mains0e1( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINS1; + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS0; + Zmaster_apps_apps_mains1StateEntry(); +} + +/****************************************/ +/* Action function */ +/* STM : apps_main */ +/* State : lightstatus_brake_off( No 1 ) */ +/* Event : stt_lightstatus_brake_on( No 0 ) */ +/****************************************/ +static void Zmaster_apps_apps_mains1e0( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINS0; + Zmaster_apps_apps_mains0StateEntry(); +} + +/****************************************/ +/* Action function */ +/* STM : apps_car_stop */ +/* State : none( No 0 ) */ +/* Event : ara_split_main( No 0 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops0e0( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS1; + stm_mst_apl_start_activity_meter_receiver(); +} + +/****************************************/ +/* Action function */ +/* STM : apps_car_stop */ +/* State : none( No 0 ) */ +/* Event : ara_split_main( No 2 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops0e2( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS3; + stm_mst_apl_start_activity_splitable_receiver(); +} + +/****************************************/ +/* Action function */ +/* STM : apps_car_stop */ +/* State : none( No 0 ) */ +/* Event : ara_split_sub( No 3 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops0e3( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS2; + stm_mst_apl_start_activity_meter_splitable(); +} + +/****************************************/ +/* Action function */ +/* STM : apps_car_stop */ +/* State : none( No 0 ) */ +/* Event : ara_normal( No 4 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops0e4( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS5; + stm_mst_apl_start_activity_general(); +} + +/****************************************/ +/* Action function */ +/* STM : apps_car_stop */ +/* State : none( No 0 ) */ +/* Event : stt_prv_layer_apps_none( No 11 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops0e11( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS0; + stm_mst_apl_start_activity_none(); +} + +/****************************************/ +/* Action function */ +/* STM : apps_car_stop */ +/* State : none( No 0 ) */ +/* Event : stt_prv_layer_apps_splitable_split( No 15 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops0e15( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS4; + stm_mst_apl_start_activity_splitable_split(); +} + +/****************************************/ +/* Action function */ +/* STM : apps_car_run */ +/* State : meter_receiver( No 0 ) */ +/* Event : ara_normal( No 0 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_runs0e0( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS1; + stm_mst_apl_start_activity_meter(); +} + +/****************************************/ +/* Action function */ +/* STM : apps_car_run */ +/* State : meter_receiver( No 0 ) */ +/* Event : stt_prv_layer_apps_meter_receiver( No 3 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_runs0e3( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS0; + stm_mst_apl_start_activity_meter_receiver(); +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_main */ +/* State : lightstatus_brake_on( No 0 ) */ +/****************************************/ +static void Zmaster_apps_apps_mains0Event( void ) +{ + /*stt_lightstatus_brake_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) + { + stm_mst_apl_event_lightstatus_brake_off(); + Zmaster_apps_apps_mains0e1(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_car_stop */ +/* State : none( No 0 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops0Event( void ) +{ + /*stt_lightstatus_brake_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_meter*/ + if( g_stm_category == StmCtgNoMeter ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_receiver*/ + else if( g_stm_category == StmCtgNoReceiver ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_main*/ + else if( g_stm_category == StmCtgNoSplitableMain ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e2(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_sub*/ + else if( g_stm_category == StmCtgNoSplitableSub ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e3(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_general*/ + else if( g_stm_category == StmCtgNoGeneral ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_apps_none*/ + if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone ) + { + Zmaster_apps_apps_car_stops0e11(); + } + /*stt_prv_layer_apps_meter_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv ) + { + Zmaster_apps_apps_car_stops0e0(); + } + /*stt_prv_layer_apps_meter_splitable*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl ) + { + Zmaster_apps_apps_car_stops0e3(); + } + /*stt_prv_layer_apps_splitable_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv ) + { + Zmaster_apps_apps_car_stops0e2(); + } + /*stt_prv_layer_apps_splitable_split*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + Zmaster_apps_apps_car_stops0e15(); + } + /*stt_prv_layer_apps_gen_nml*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_car_stop */ +/* State : meter_receiver( No 1 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops1Event( void ) +{ + /*stt_lightstatus_brake_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_splitable_main*/ + if( g_stm_category == StmCtgNoSplitableMain ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e2(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_sub*/ + else if( g_stm_category == StmCtgNoSplitableSub ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e3(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_general*/ + else if( g_stm_category == StmCtgNoGeneral ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_homescreen*/ + else if( g_stm_category == StmCtgNoHomescreen ) + { + /*ara_fullscreen*/ + if( g_stm_area == StmAreaNoFullscreen ) + { + Zmaster_apps_apps_car_stops0e11(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_deactivate*/ + else if( g_stm_event == StmEvtNoDeactivate ) + { + /*ctg_meter*/ + if( g_stm_category == StmCtgNoMeter ) + { + Zmaster_apps_apps_car_stops0e11(); + } + /*ctg_receiver*/ + else if( g_stm_category == StmCtgNoReceiver ) + { + Zmaster_apps_apps_car_stops0e11(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_apps_none*/ + if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone ) + { + Zmaster_apps_apps_car_stops0e11(); + } + /*stt_prv_layer_apps_meter_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv ) + { + Zmaster_apps_apps_car_stops0e0(); + } + /*stt_prv_layer_apps_meter_splitable*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl ) + { + Zmaster_apps_apps_car_stops0e3(); + } + /*stt_prv_layer_apps_splitable_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv ) + { + Zmaster_apps_apps_car_stops0e2(); + } + /*stt_prv_layer_apps_splitable_split*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + Zmaster_apps_apps_car_stops0e15(); + } + /*stt_prv_layer_apps_gen_nml*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_car_stop */ +/* State : meter_splitable( No 2 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops2Event( void ) +{ + /*stt_lightstatus_brake_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_receiver*/ + if( g_stm_category == StmCtgNoReceiver ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_main*/ + else if( g_stm_category == StmCtgNoSplitableMain ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e15(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_sub*/ + else if( g_stm_category == StmCtgNoSplitableSub ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e3(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_general*/ + else if( g_stm_category == StmCtgNoGeneral ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_homescreen*/ + else if( g_stm_category == StmCtgNoHomescreen ) + { + /*ara_fullscreen*/ + if( g_stm_area == StmAreaNoFullscreen ) + { + Zmaster_apps_apps_car_stops0e11(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_deactivate*/ + else if( g_stm_event == StmEvtNoDeactivate ) + { + /*ctg_meter*/ + if( g_stm_category == StmCtgNoMeter ) + { + Zmaster_apps_apps_car_stops0e11(); + } + /*ctg_splitable_sub*/ + else if( g_stm_category == StmCtgNoSplitableSub ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_apps_none*/ + if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone ) + { + Zmaster_apps_apps_car_stops0e11(); + } + /*stt_prv_layer_apps_meter_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv ) + { + Zmaster_apps_apps_car_stops0e0(); + } + /*stt_prv_layer_apps_meter_splitable*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl ) + { + Zmaster_apps_apps_car_stops0e3(); + } + /*stt_prv_layer_apps_splitable_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv ) + { + Zmaster_apps_apps_car_stops0e2(); + } + /*stt_prv_layer_apps_splitable_split*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + Zmaster_apps_apps_car_stops0e15(); + } + /*stt_prv_layer_apps_gen_nml*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_car_stop */ +/* State : splitable_receiver( No 3 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops3Event( void ) +{ + /*stt_lightstatus_brake_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_meter*/ + if( g_stm_category == StmCtgNoMeter ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_main*/ + else if( g_stm_category == StmCtgNoSplitableMain ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e2(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_sub*/ + else if( g_stm_category == StmCtgNoSplitableSub ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e15(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_general*/ + else if( g_stm_category == StmCtgNoGeneral ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_homescreen*/ + else if( g_stm_category == StmCtgNoHomescreen ) + { + /*ara_fullscreen*/ + if( g_stm_area == StmAreaNoFullscreen ) + { + Zmaster_apps_apps_car_stops0e11(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_deactivate*/ + else if( g_stm_event == StmEvtNoDeactivate ) + { + /*ctg_receiver*/ + if( g_stm_category == StmCtgNoReceiver ) + { + Zmaster_apps_apps_car_stops0e11(); + } + /*ctg_splitable_main*/ + else if( g_stm_category == StmCtgNoSplitableMain ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_apps_none*/ + if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone ) + { + Zmaster_apps_apps_car_stops0e11(); + } + /*stt_prv_layer_apps_meter_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv ) + { + Zmaster_apps_apps_car_stops0e0(); + } + /*stt_prv_layer_apps_meter_splitable*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl ) + { + Zmaster_apps_apps_car_stops0e3(); + } + /*stt_prv_layer_apps_splitable_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv ) + { + Zmaster_apps_apps_car_stops0e2(); + } + /*stt_prv_layer_apps_splitable_split*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + Zmaster_apps_apps_car_stops0e15(); + } + /*stt_prv_layer_apps_gen_nml*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_car_stop */ +/* State : splitable_split( No 4 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops4Event( void ) +{ + /*stt_lightstatus_brake_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_meter*/ + if( g_stm_category == StmCtgNoMeter ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e3(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_receiver*/ + else if( g_stm_category == StmCtgNoReceiver ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e2(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_main*/ + else if( g_stm_category == StmCtgNoSplitableMain ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e15(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_sub*/ + else if( g_stm_category == StmCtgNoSplitableSub ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e15(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_general*/ + else if( g_stm_category == StmCtgNoGeneral ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_homescreen*/ + else if( g_stm_category == StmCtgNoHomescreen ) + { + /*ara_fullscreen*/ + if( g_stm_area == StmAreaNoFullscreen ) + { + Zmaster_apps_apps_car_stops0e11(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_deactivate*/ + else if( g_stm_event == StmEvtNoDeactivate ) + { + /*ctg_splitable_main*/ + if( g_stm_category == StmCtgNoSplitableMain ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e3(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_sub*/ + else if( g_stm_category == StmCtgNoSplitableSub ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e2(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_apps_none*/ + if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone ) + { + Zmaster_apps_apps_car_stops0e11(); + } + /*stt_prv_layer_apps_meter_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv ) + { + Zmaster_apps_apps_car_stops0e0(); + } + /*stt_prv_layer_apps_meter_splitable*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl ) + { + Zmaster_apps_apps_car_stops0e3(); + } + /*stt_prv_layer_apps_splitable_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv ) + { + Zmaster_apps_apps_car_stops0e2(); + } + /*stt_prv_layer_apps_splitable_split*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + Zmaster_apps_apps_car_stops0e15(); + } + /*stt_prv_layer_apps_gen_nml*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_car_stop */ +/* State : general( No 5 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_stops5Event( void ) +{ + /*stt_lightstatus_brake_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_meter*/ + if( g_stm_category == StmCtgNoMeter ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_receiver*/ + else if( g_stm_category == StmCtgNoReceiver ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_main*/ + else if( g_stm_category == StmCtgNoSplitableMain ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_stops0e2(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_splitable_sub*/ + else if( g_stm_category == StmCtgNoSplitableSub ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_stops0e3(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_general*/ + else if( g_stm_category == StmCtgNoGeneral ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_homescreen*/ + else if( g_stm_category == StmCtgNoHomescreen ) + { + /*ara_fullscreen*/ + if( g_stm_area == StmAreaNoFullscreen ) + { + Zmaster_apps_apps_car_stops0e11(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_deactivate*/ + else if( g_stm_event == StmEvtNoDeactivate ) + { + /*ctg_general*/ + if( g_stm_category == StmCtgNoGeneral ) + { + Zmaster_apps_apps_car_stops0e11(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_apps_none*/ + if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoNone ) + { + Zmaster_apps_apps_car_stops0e11(); + } + /*stt_prv_layer_apps_meter_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv ) + { + Zmaster_apps_apps_car_stops0e0(); + } + /*stt_prv_layer_apps_meter_splitable*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrSpl ) + { + Zmaster_apps_apps_car_stops0e3(); + } + /*stt_prv_layer_apps_splitable_receiver*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplRcv ) + { + Zmaster_apps_apps_car_stops0e2(); + } + /*stt_prv_layer_apps_splitable_split*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoSplSpl ) + { + Zmaster_apps_apps_car_stops0e15(); + } + /*stt_prv_layer_apps_gen_nml*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoGenNml ) + { + Zmaster_apps_apps_car_stops0e4(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_main */ +/* State : lightstatus_brake_off( No 1 ) */ +/****************************************/ +static void Zmaster_apps_apps_mains1Event( void ) +{ + /*stt_lightstatus_brake_on*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOn ) + { + stm_mst_apl_event_lightstatus_brake_on(); + Zmaster_apps_apps_mains1e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_car_run */ +/* State : meter_receiver( No 0 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_runs0Event( void ) +{ + /*stt_lightstatus_brake_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_meter*/ + if( g_stm_category == StmCtgNoMeter ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zmaster_apps_apps_car_runs0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_apps_meter_receiver*/ + if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv ) + { + Zmaster_apps_apps_car_runs0e3(); + } + /*stt_prv_layer_apps_meter*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrNml ) + { + Zmaster_apps_apps_car_runs0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : apps_car_run */ +/* State : meter( No 1 ) */ +/****************************************/ +static void Zmaster_apps_apps_car_runs1Event( void ) +{ + /*stt_lightstatus_brake_off*/ + if( g_stm_crr_state.car_element[StmCarElementNoLightstatusBrake].state == StmLightstatusBrakeSttNoOff ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_meter*/ + if( g_stm_category == StmCtgNoMeter ) + { + /*ara_split_main*/ + if( g_stm_area == StmAreaNoSplitMain ) + { + Zmaster_apps_apps_car_runs0e3(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_receiver*/ + else if( g_stm_category == StmCtgNoReceiver ) + { + /*ara_split_sub*/ + if( g_stm_area == StmAreaNoSplitSub ) + { + Zmaster_apps_apps_car_runs0e3(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_apps_meter_receiver*/ + if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrRcv ) + { + Zmaster_apps_apps_car_runs0e3(); + } + /*stt_prv_layer_apps_meter*/ + else if( g_stm_prv_state.layer[StmLayerNoApps].state == StmLayoutNoMtrNml ) + { + Zmaster_apps_apps_car_runs0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event call function */ +/* STM : apps_main */ +/****************************************/ +void stm_master_apl_event_call( void ) +{ + stm_mst_apl_start_stm(); + switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] ) + { + case ZMASTER_APPS_APPS_MAINS0: + switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] ) + { + case ZMASTER_APPS_APPS_CAR_STOPS0: + Zmaster_apps_apps_car_stops0Event(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS1: + Zmaster_apps_apps_car_stops1Event(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS2: + Zmaster_apps_apps_car_stops2Event(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS3: + Zmaster_apps_apps_car_stops3Event(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS4: + Zmaster_apps_apps_car_stops4Event(); + break; + case ZMASTER_APPS_APPS_CAR_STOPS5: + Zmaster_apps_apps_car_stops5Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } + Zmaster_apps_apps_mains0Event(); + break; + case ZMASTER_APPS_APPS_MAINS1: + switch( Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] ) + { + case ZMASTER_APPS_APPS_CAR_RUNS0: + Zmaster_apps_apps_car_runs0Event(); + break; + case ZMASTER_APPS_APPS_CAR_RUNS1: + Zmaster_apps_apps_car_runs1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } + Zmaster_apps_apps_mains1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Initial function */ +/* STM : apps_main */ +/****************************************/ +void stm_master_apl_initialize( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINS0; + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS0F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_STOPS0; + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAINS1F] = ( uint8_t )ZMASTER_APPS_APPS_CAR_RUNS0; + Zmaster_apps_apps_mains0StateEntry(); +} + +/****************************************/ +/* Terminate function */ +/* STM : apps_main */ +/****************************************/ +void Zmaster_apps_apps_mainTerminate( void ) +{ + Zmaster_apps_apps_mainState[ZMASTER_APPS_APPS_MAIN] = ( uint8_t )ZMASTER_APPS_APPS_MAINTERMINATE; +} + diff --git a/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.h b/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.h new file mode 100644 index 0000000..afa2e67 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_apps_main.h @@ -0,0 +1,111 @@ +/************************************************************/ +/* Zmaster_apps_apps_main.h */ +/* apps_main State transition model header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZMASTER_APPS_APPS_MAIN_H +#define ZHEADER_ZMASTER_APPS_APPS_MAIN_H + +/*State management variable access define*/ +#define ZMASTER_APPS_APPS_MAIN ( 0U ) +#define ZMASTER_APPS_APPS_MAINS0F ( 1U ) +#define ZMASTER_APPS_APPS_MAINS1F ( 2U ) +#define ZMASTER_APPS_APPS_MAINS0 ( 0U ) +#define ZMASTER_APPS_APPS_CAR_STOPS0 ( 0U ) +#define ZMASTER_APPS_APPS_CAR_STOPS1 ( 1U ) +#define ZMASTER_APPS_APPS_CAR_STOPS2 ( 2U ) +#define ZMASTER_APPS_APPS_CAR_STOPS3 ( 3U ) +#define ZMASTER_APPS_APPS_CAR_STOPS4 ( 4U ) +#define ZMASTER_APPS_APPS_CAR_STOPS5 ( 5U ) +#define ZMASTER_APPS_APPS_MAINS1 ( 1U ) +#define ZMASTER_APPS_APPS_CAR_RUNS0 ( 0U ) +#define ZMASTER_APPS_APPS_CAR_RUNS1 ( 1U ) +#define ZMASTER_APPS_APPS_MAINSTATENOMAX ( 3U ) + +/*End state define*/ +#define ZMASTER_APPS_APPS_MAINEND ( 6U ) +/*Terminate state define*/ +#define ZMASTER_APPS_APPS_MAINTERMINATE ( ZMASTER_APPS_APPS_MAINEND + 1U ) + +/*State no define*/ +#define ZMASTER_APPS_APPS_MAINS0STATENO ( 0U ) +#define ZMASTER_APPS_APPS_CAR_STOPS0STATENO ( 0U ) +#define ZMASTER_APPS_APPS_CAR_STOPS1STATENO ( 1U ) +#define ZMASTER_APPS_APPS_CAR_STOPS2STATENO ( 2U ) +#define ZMASTER_APPS_APPS_CAR_STOPS3STATENO ( 3U ) +#define ZMASTER_APPS_APPS_CAR_STOPS4STATENO ( 4U ) +#define ZMASTER_APPS_APPS_CAR_STOPS5STATENO ( 5U ) +#define ZMASTER_APPS_APPS_MAINS1STATENO ( 1U ) +#define ZMASTER_APPS_APPS_CAR_RUNS0STATENO ( 0U ) +#define ZMASTER_APPS_APPS_CAR_RUNS1STATENO ( 1U ) + +/*State serial no define*/ +#define ZMASTER_APPS_APPS_MAINS0STATESERIALNO ( 0U ) +#define ZMASTER_APPS_APPS_CAR_STOPS0STATESERIALNO ( 1U ) +#define ZMASTER_APPS_APPS_CAR_STOPS1STATESERIALNO ( 2U ) +#define ZMASTER_APPS_APPS_CAR_STOPS2STATESERIALNO ( 3U ) +#define ZMASTER_APPS_APPS_CAR_STOPS3STATESERIALNO ( 4U ) +#define ZMASTER_APPS_APPS_CAR_STOPS4STATESERIALNO ( 5U ) +#define ZMASTER_APPS_APPS_CAR_STOPS5STATESERIALNO ( 6U ) +#define ZMASTER_APPS_APPS_MAINS1STATESERIALNO ( 7U ) +#define ZMASTER_APPS_APPS_CAR_RUNS0STATESERIALNO ( 8U ) +#define ZMASTER_APPS_APPS_CAR_RUNS1STATESERIALNO ( 9U ) + +/*Event no define*/ +#define ZMASTER_APPS_APPS_MAINE0EVENTNO ( 0U ) +#define ZMASTER_APPS_APPS_MAINE1EVENTNO ( 1U ) +#define ZMASTER_APPS_APPS_CAR_STOPE0EVENTNO ( 0U ) +#define ZMASTER_APPS_APPS_CAR_STOPE1EVENTNO ( 1U ) +#define ZMASTER_APPS_APPS_CAR_STOPE2EVENTNO ( 2U ) +#define ZMASTER_APPS_APPS_CAR_STOPE3EVENTNO ( 3U ) +#define ZMASTER_APPS_APPS_CAR_STOPE4EVENTNO ( 4U ) +#define ZMASTER_APPS_APPS_CAR_STOPE5EVENTNO ( 5U ) +#define ZMASTER_APPS_APPS_CAR_STOPE6EVENTNO ( 6U ) +#define ZMASTER_APPS_APPS_CAR_STOPE7EVENTNO ( 7U ) +#define ZMASTER_APPS_APPS_CAR_STOPE8EVENTNO ( 8U ) +#define ZMASTER_APPS_APPS_CAR_STOPE9EVENTNO ( 9U ) +#define ZMASTER_APPS_APPS_CAR_STOPE10EVENTNO ( 10U ) +#define ZMASTER_APPS_APPS_CAR_STOPE11EVENTNO ( 11U ) +#define ZMASTER_APPS_APPS_CAR_STOPE12EVENTNO ( 12U ) +#define ZMASTER_APPS_APPS_CAR_STOPE13EVENTNO ( 13U ) +#define ZMASTER_APPS_APPS_CAR_STOPE14EVENTNO ( 14U ) +#define ZMASTER_APPS_APPS_CAR_STOPE15EVENTNO ( 15U ) +#define ZMASTER_APPS_APPS_CAR_STOPE16EVENTNO ( 16U ) +#define ZMASTER_APPS_APPS_CAR_RUNE0EVENTNO ( 0U ) +#define ZMASTER_APPS_APPS_CAR_RUNE1EVENTNO ( 1U ) +#define ZMASTER_APPS_APPS_CAR_RUNE2EVENTNO ( 2U ) +#define ZMASTER_APPS_APPS_CAR_RUNE3EVENTNO ( 3U ) +#define ZMASTER_APPS_APPS_CAR_RUNE4EVENTNO ( 4U ) + +/*Event serial no define*/ +#define ZMASTER_APPS_APPS_MAINE0EVENTSERIALNO ( 0U ) +#define ZMASTER_APPS_APPS_MAINE1EVENTSERIALNO ( 1U ) +#define ZMASTER_APPS_APPS_CAR_STOPE0EVENTNO ( 0U ) +#define ZMASTER_APPS_APPS_CAR_STOPE1EVENTNO ( 1U ) +#define ZMASTER_APPS_APPS_CAR_STOPE2EVENTNO ( 2U ) +#define ZMASTER_APPS_APPS_CAR_STOPE3EVENTNO ( 3U ) +#define ZMASTER_APPS_APPS_CAR_STOPE4EVENTNO ( 4U ) +#define ZMASTER_APPS_APPS_CAR_STOPE5EVENTNO ( 5U ) +#define ZMASTER_APPS_APPS_CAR_STOPE6EVENTNO ( 6U ) +#define ZMASTER_APPS_APPS_CAR_STOPE7EVENTNO ( 7U ) +#define ZMASTER_APPS_APPS_CAR_STOPE8EVENTNO ( 8U ) +#define ZMASTER_APPS_APPS_CAR_STOPE9EVENTNO ( 9U ) +#define ZMASTER_APPS_APPS_CAR_STOPE10EVENTNO ( 10U ) +#define ZMASTER_APPS_APPS_CAR_STOPE11EVENTNO ( 11U ) +#define ZMASTER_APPS_APPS_CAR_STOPE12EVENTNO ( 12U ) +#define ZMASTER_APPS_APPS_CAR_STOPE13EVENTNO ( 13U ) +#define ZMASTER_APPS_APPS_CAR_STOPE14EVENTNO ( 14U ) +#define ZMASTER_APPS_APPS_CAR_STOPE15EVENTNO ( 15U ) +#define ZMASTER_APPS_APPS_CAR_STOPE16EVENTNO ( 16U ) +#define ZMASTER_APPS_APPS_CAR_RUNE0EVENTNO ( 0U ) +#define ZMASTER_APPS_APPS_CAR_RUNE1EVENTNO ( 1U ) +#define ZMASTER_APPS_APPS_CAR_RUNE2EVENTNO ( 2U ) +#define ZMASTER_APPS_APPS_CAR_RUNE3EVENTNO ( 3U ) +#define ZMASTER_APPS_APPS_CAR_RUNE4EVENTNO ( 4U ) + +/*Extern function*/ +extern void stm_master_apl_event_call( void ); +extern void stm_master_apl_initialize( void ); +extern void Zmaster_apps_apps_mainTerminate( void ); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_master_apps_def.h b/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_master_apps_def.h new file mode 100644 index 0000000..5c22ae6 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/master/layer/apps/Zmaster_apps_master_apps_def.h @@ -0,0 +1,15 @@ +/************************************************************/ +/* Zmaster_apps_master_apps_def.h */ +/* Define header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZMASTER_APPS_MASTER_APPS_DEF_H +#define ZHEADER_ZMASTER_APPS_MASTER_APPS_DEF_H + +/************************************************************* + Define definition +*************************************************************/ + +#include "../../../../stm_master_apps.h" + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_master_remote_def.h b/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_master_remote_def.h new file mode 100644 index 0000000..7cd92cd --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_master_remote_def.h @@ -0,0 +1,15 @@ +/************************************************************/ +/* Zmaster_remote_master_remote_def.h */ +/* Define header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZMASTER_REMOTE_MASTER_REMOTE_DEF_H +#define ZHEADER_ZMASTER_REMOTE_MASTER_REMOTE_DEF_H + +/************************************************************* + Define definition +*************************************************************/ + +#include "../../../../stm_master_remote.h" + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.c b/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.c new file mode 100644 index 0000000..53ceafa --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.c @@ -0,0 +1,206 @@ +/************************************************************/ +/* Zmaster_remote_remote.c */ +/* remote State transition model source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../../../ZST_include.h" + +/* State management variable */ +static uint8_t Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTESTATENOMAX]; + +static void Zmaster_remote_remotes0e0( void ); +static void Zmaster_remote_remotes0e2( void ); +static void Zmaster_remote_remotes1e1( void ); +static void Zmaster_remote_remotes1e3( void ); +static void Zmaster_remote_remotes0Event( void ); +static void Zmaster_remote_remotes1Event( void ); + +/****************************************/ +/* Action function */ +/* STM : remote */ +/* State : none( No 0 ) */ +/* Event : ara_master_split_sub( No 0 ) */ +/****************************************/ +static void Zmaster_remote_remotes0e0( void ) +{ + Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] = ( uint8_t )ZMASTER_REMOTE_REMOTES1; + stm_mst_rmt_start_activity_tbt(); +} + +/****************************************/ +/* Action function */ +/* STM : remote */ +/* State : none( No 0 ) */ +/* Event : stt_prv_layer_remote_none( No 2 ) */ +/****************************************/ +static void Zmaster_remote_remotes0e2( void ) +{ + stm_mst_rmt_start_activity_none(); +} + +/****************************************/ +/* Action function */ +/* STM : remote */ +/* State : tbt( No 1 ) */ +/* Event : ctg_tbt( No 1 ) */ +/****************************************/ +static void Zmaster_remote_remotes1e1( void ) +{ + Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] = ( uint8_t )ZMASTER_REMOTE_REMOTES0; + stm_mst_rmt_start_activity_none(); +} + +/****************************************/ +/* Action function */ +/* STM : remote */ +/* State : tbt( No 1 ) */ +/* Event : stt_prv_layer_remote_tbt( No 3 ) */ +/****************************************/ +static void Zmaster_remote_remotes1e3( void ) +{ + stm_mst_rmt_start_activity_tbt(); +} + +/****************************************/ +/* Event appraisal function */ +/* STM : remote */ +/* State : none( No 0 ) */ +/****************************************/ +static void Zmaster_remote_remotes0Event( void ) +{ + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_tbt*/ + if( g_stm_category == StmCtgNoTbt ) + { + /*ara_master_split_sub*/ + if( g_stm_area == StmAreaNoMasterSplitSub ) + { + Zmaster_remote_remotes0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_remote_none*/ + if( g_stm_prv_state.layer[StmLayerNoRemote].state == StmLayoutNoNone ) + { + Zmaster_remote_remotes0e2(); + } + /*stt_prv_layer_remote_tbt*/ + else if( g_stm_prv_state.layer[StmLayerNoRemote].state == StmLayoutNoRmtTbt ) + { + Zmaster_remote_remotes0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : remote */ +/* State : tbt( No 1 ) */ +/****************************************/ +static void Zmaster_remote_remotes1Event( void ) +{ + /*evt_deactivate*/ + if( g_stm_event == StmEvtNoDeactivate ) + { + /*ctg_tbt*/ + if( g_stm_category == StmCtgNoTbt ) + { + Zmaster_remote_remotes1e1(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*evt_undo*/ + else if( g_stm_event == StmEvtNoUndo ) + { + /*stt_prv_layer_remote_none*/ + if( g_stm_prv_state.layer[StmLayerNoRemote].state == StmLayoutNoNone ) + { + Zmaster_remote_remotes1e1(); + } + /*stt_prv_layer_remote_tbt*/ + else if( g_stm_prv_state.layer[StmLayerNoRemote].state == StmLayoutNoRmtTbt ) + { + Zmaster_remote_remotes1e3(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event call function */ +/* STM : remote */ +/****************************************/ +void stm_mst_rmt_event_call( void ) +{ + stm_mst_rmt_start_stm(); + switch( Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] ) + { + case ZMASTER_REMOTE_REMOTES0: + Zmaster_remote_remotes0Event(); + break; + case ZMASTER_REMOTE_REMOTES1: + Zmaster_remote_remotes1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Initial function */ +/* STM : remote */ +/****************************************/ +void stm_mst_rmt_initialize( void ) +{ + Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] = ( uint8_t )ZMASTER_REMOTE_REMOTES0; + stm_mst_rmt_start_activity_none(); +} + +/****************************************/ +/* Terminate function */ +/* STM : remote */ +/****************************************/ +void Zmaster_remote_remoteTerminate( void ) +{ + Zmaster_remote_remoteState[ZMASTER_REMOTE_REMOTE] = ( uint8_t )ZMASTER_REMOTE_REMOTETERMINATE; +} + diff --git a/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.h b/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.h new file mode 100644 index 0000000..5899b07 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/master/layer/remote/Zmaster_remote_remote.h @@ -0,0 +1,45 @@ +/************************************************************/ +/* Zmaster_remote_remote.h */ +/* remote State transition model header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZMASTER_REMOTE_REMOTE_H +#define ZHEADER_ZMASTER_REMOTE_REMOTE_H + +/*State management variable access define*/ +#define ZMASTER_REMOTE_REMOTE ( 0U ) +#define ZMASTER_REMOTE_REMOTES0 ( 0U ) +#define ZMASTER_REMOTE_REMOTES1 ( 1U ) +#define ZMASTER_REMOTE_REMOTESTATENOMAX ( 1U ) + +/*End state define*/ +#define ZMASTER_REMOTE_REMOTEEND ( 2U ) +/*Terminate state define*/ +#define ZMASTER_REMOTE_REMOTETERMINATE ( ZMASTER_REMOTE_REMOTEEND + 1U ) + +/*State no define*/ +#define ZMASTER_REMOTE_REMOTES0STATENO ( 0U ) +#define ZMASTER_REMOTE_REMOTES1STATENO ( 1U ) + +/*State serial no define*/ +#define ZMASTER_REMOTE_REMOTES0STATESERIALNO ( 0U ) +#define ZMASTER_REMOTE_REMOTES1STATESERIALNO ( 1U ) + +/*Event no define*/ +#define ZMASTER_REMOTE_REMOTEE0EVENTNO ( 0U ) +#define ZMASTER_REMOTE_REMOTEE1EVENTNO ( 1U ) +#define ZMASTER_REMOTE_REMOTEE2EVENTNO ( 2U ) +#define ZMASTER_REMOTE_REMOTEE3EVENTNO ( 3U ) + +/*Event serial no define*/ +#define ZMASTER_REMOTE_REMOTEE0EVENTSERIALNO ( 0U ) +#define ZMASTER_REMOTE_REMOTEE1EVENTSERIALNO ( 1U ) +#define ZMASTER_REMOTE_REMOTEE2EVENTSERIALNO ( 2U ) +#define ZMASTER_REMOTE_REMOTEE3EVENTSERIALNO ( 3U ) + +/*Extern function*/ +extern void stm_mst_rmt_event_call( void ); +extern void stm_mst_rmt_initialize( void ); +extern void Zmaster_remote_remoteTerminate( void ); + +#endif |