diff options
Diffstat (limited to 'policy_manager/stm/zipc/StateTransitionor/OnScreenlayer')
4 files changed, 935 insertions, 0 deletions
diff --git a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c new file mode 100644 index 0000000..90a6f6f --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.c @@ -0,0 +1,72 @@ +/************************************************************/ +/* ZOSL_OnScreen_func.c */ +/* Function and variable source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/************************************************************* + Function definition +*************************************************************/ + +/* + * @name stm_osl_start_activity_none + */ +void stm_osl_start_activity_none() { + g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoNone; + g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE; +} + +/* + * @name stm_osl_start_activity_pop_up + */ +void stm_osl_start_activity_pop_up() { + g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoPopUp; + g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE; +} + +/* + * @name stm_osl_start_activity_system_alert + */ +void stm_osl_start_activity_system_alert() { + g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoSysAlt; + g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_TRUE; +} + +/* + * @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].changed = STM_TRUE; +} + +/* + * @name stm_osl_event_restriction_mode_2_on + */ +void stm_osl_event_restriction_mode_2_on() { + g_prv_on_screen_state_rest_mode_1 = g_stm_prv_state.layer[StmLayerNoOnScreen].state; +} +/* + * @name stm_osl_initialize_variable + */ +void stm_osl_initialize_variable() { + g_stm_prv_state.layer[StmLayerNoOnScreen].state = StmLayoutNoNone; + g_stm_prv_state.layer[StmLayerNoOnScreen].changed = STM_FALSE; + + g_stm_crr_state.layer[StmLayerNoOnScreen].state = StmLayoutNoNone; + g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_FALSE; +} + +/* + * @name stm_osl_start_stm + */ +void stm_osl_start_stm() { + if (g_stm_event == StmEvtNoUndo) { + // nop + } + else { + g_stm_prv_state.layer[StmLayerNoOnScreen].state = g_stm_crr_state.layer[StmLayerNoOnScreen].state; + } + g_stm_crr_state.layer[StmLayerNoOnScreen].changed = STM_FALSE; +} diff --git a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h new file mode 100644 index 0000000..e85accb --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OnScreen_func.h @@ -0,0 +1,17 @@ +/************************************************************/ +/* ZOSL_OnScreen_func.h */ +/* Function and variable header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZOSL_ONSCREEN_FUNC_H +#define ZHEADER_ZOSL_ONSCREEN_FUNC_H + +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_initialize_variable(); +extern void stm_osl_start_stm(); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c new file mode 100644 index 0000000..53a50e1 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.c @@ -0,0 +1,764 @@ +/************************************************************/ +/* ZOSL_OslMain.c */ +/* OslMain State transition model source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/* State management variable */ +static uint8_t ZOSL_OslMainState[ZOSL_OSLMAINSTATENOMAX]; + +static void ZOSL_OslMains0StateEntry( void ); +static void ZOSL_OslMains1StateEntry( void ); +static void ZOSL_OslMains0e1( void ); +static void ZOSL_OslMains0e2( void ); +static void ZOSL_OslMains1e0( void ); +static void ZOSL_OslRestOffs0e0( void ); +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_OslRestOns0e0( void ); +static void ZOSL_OslRestOns0e2( void ); +static void ZOSL_OslRestOns1e0( void ); +static void ZOSL_OslRestOns1e1( void ); +static void ZOSL_OslMains0Event( void ); +static void ZOSL_OslRestOffs0Event( void ); +static void ZOSL_OslRestOffs1Event( void ); +static void ZOSL_OslRestOffs2Event( void ); +static void ZOSL_OslMains1Event( void ); +static void ZOSL_OslRestOns0Event( void ); +static void ZOSL_OslRestOns1Event( void ); + +/****************************************/ +/* State start activity function */ +/* STM : OslMain */ +/* State : restriction_mode_off( No 0 ) */ +/****************************************/ +static void ZOSL_OslMains0StateEntry( void ) +{ + switch( ZOSL_OslMainState[ZOSL_OSLMAINS0F] ) + { + case ZOSL_OSLRESTOFFS0: + stm_osl_start_activity_none(); + break; + case ZOSL_OSLRESTOFFS1: + stm_osl_start_activity_pop_up(); + break; + case ZOSL_OSLRESTOFFS2: + stm_osl_start_activity_system_alert(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* State start activity function */ +/* STM : OslMain */ +/* State : restriction_mode_2_on( No 1 ) */ +/****************************************/ +static void ZOSL_OslMains1StateEntry( void ) +{ + switch( ZOSL_OslMainState[ZOSL_OSLMAINS1F] ) + { + case ZOSL_OSLRESTONS0: + stm_osl_start_activity_none(); + break; + case ZOSL_OSLRESTONS1: + stm_osl_start_activity_system_alert(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Action function */ +/* STM : OslMain */ +/* State : restriction_mode_off( No 0 ) */ +/* Event : stt_crr_layer_on_screen_pop( No 1 ) */ +/****************************************/ +static void ZOSL_OslMains0e1( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS1; + ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0; + ZOSL_OslMains1StateEntry(); +} + +/****************************************/ +/* Action function */ +/* STM : OslMain */ +/* State : restriction_mode_off( No 0 ) */ +/* Event : stt_crr_layer_on_screen_sys( No 2 ) */ +/****************************************/ +static void ZOSL_OslMains0e2( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS1; + ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS1; + ZOSL_OslMains1StateEntry(); +} + +/****************************************/ +/* Action function */ +/* STM : OslMain */ +/* State : restriction_mode_2_on( No 1 ) */ +/* Event : stt_restriction_mode_off( No 0 ) */ +/****************************************/ +static void ZOSL_OslMains1e0( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS0; + ZOSL_OslMains0StateEntry(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOff */ +/* State : none( No 0 ) */ +/* Event : ara_onscreen( No 0 ) */ +/****************************************/ +static void ZOSL_OslRestOffs0e0( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS1; + stm_osl_start_activity_pop_up(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOff */ +/* State : none( No 0 ) */ +/* Event : ara_onscreen( No 1 ) */ +/****************************************/ +static void ZOSL_OslRestOffs0e1( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS2; + stm_osl_start_activity_system_alert(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOff */ +/* State : none( No 0 ) */ +/* Event : stt_prv_layer_on_screen_none( No 4 ) */ +/****************************************/ +static void ZOSL_OslRestOffs0e4( void ) +{ + stm_osl_start_activity_none(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOff */ +/* State : popup( No 1 ) */ +/* Event : ara_onscreen( No 0 ) */ +/****************************************/ +static void ZOSL_OslRestOffs1e0( void ) +{ + stm_osl_start_activity_pop_up(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOff */ +/* State : popup( No 1 ) */ +/* Event : ctg_popup( No 2 ) */ +/****************************************/ +static void ZOSL_OslRestOffs1e2( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS0; + stm_osl_start_activity_none(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOff */ +/* State : system_alert( No 2 ) */ +/* Event : ara_onscreen( No 1 ) */ +/****************************************/ +static void ZOSL_OslRestOffs2e1( void ) +{ + stm_osl_start_activity_system_alert(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOn */ +/* State : none( No 0 ) */ +/* Event : ara_onscreen( No 0 ) */ +/****************************************/ +static void ZOSL_OslRestOns0e0( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS1; + stm_osl_start_activity_system_alert(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOn */ +/* State : none( No 0 ) */ +/* Event : stt_prv_layer_on_screen_none( No 2 ) */ +/****************************************/ +static void ZOSL_OslRestOns0e2( void ) +{ + stm_osl_start_activity_none(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOn */ +/* State : system_alert( No 1 ) */ +/* Event : ara_onscreen( No 0 ) */ +/****************************************/ +static void ZOSL_OslRestOns1e0( void ) +{ + stm_osl_start_activity_system_alert(); +} + +/****************************************/ +/* Action function */ +/* STM : OslRestOn */ +/* State : system_alert( No 1 ) */ +/* Event : ctg_systemalert( No 1 ) */ +/****************************************/ +static void ZOSL_OslRestOns1e1( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0; + stm_osl_start_activity_none(); +} + +/****************************************/ +/* Event appraisal function */ +/* STM : OslMain */ +/* State : restriction_mode_off( No 0 ) */ +/****************************************/ +static void ZOSL_OslMains0Event( void ) +{ + /*stt_restriction_mode_2_on*/ + if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + { + stm_rel_event_restriction_mode_2_on(); + /*stt_crr_layer_on_screen_pop*/ + if( g_stm_crr_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp ) + { + ZOSL_OslMains0e1(); + } + /*stt_crr_layer_on_screen_sys*/ + else if( g_stm_crr_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt ) + { + ZOSL_OslMains0e2(); + } + 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 : OslRestOff */ +/* State : none( No 0 ) */ +/****************************************/ +static void ZOSL_OslRestOffs0Event( void ) +{ + /*stt_restriction_mode_off*/ + if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_popup*/ + if( g_stm_category == StmCtgNoPopUp ) + { + /*ara_onscreen*/ + if( g_stm_area == StmAreaNoOnScreen ) + { + ZOSL_OslRestOffs0e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_systemalert*/ + else if( g_stm_category == StmCtgNoSystemAlert ) + { + /*ara_onscreen*/ + if( g_stm_area == StmAreaNoOnScreen ) + { + ZOSL_OslRestOffs0e1(); + } + 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_on_screen_none*/ + if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone ) + { + ZOSL_OslRestOffs0e4(); + } + /*stt_prv_layer_on_screen_pop_up*/ + else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp ) + { + ZOSL_OslRestOffs0e0(); + } + /*stt_prv_layer_on_screen_sys_alt*/ + else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt ) + { + ZOSL_OslRestOffs0e1(); + } + 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 : OslRestOff */ +/* State : popup( No 1 ) */ +/****************************************/ +static void ZOSL_OslRestOffs1Event( void ) +{ + /*stt_restriction_mode_off*/ + if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_popup*/ + if( g_stm_category == StmCtgNoPopUp ) + { + /*ara_onscreen*/ + if( g_stm_area == StmAreaNoOnScreen ) + { + ZOSL_OslRestOffs1e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } + } + /*ctg_systemalert*/ + else if( g_stm_category == StmCtgNoSystemAlert ) + { + /*ara_onscreen*/ + if( g_stm_area == StmAreaNoOnScreen ) + { + ZOSL_OslRestOffs0e1(); + } + 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_popup*/ + if( g_stm_category == StmCtgNoPopUp ) + { + ZOSL_OslRestOffs1e2(); + } + 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_on_screen_none*/ + if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone ) + { + ZOSL_OslRestOffs1e2(); + } + /*stt_prv_layer_on_screen_pop_up*/ + else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp ) + { + ZOSL_OslRestOffs1e0(); + } + /*stt_prv_layer_on_screen_sys_alt*/ + else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt ) + { + ZOSL_OslRestOffs0e1(); + } + 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 : OslRestOff */ +/* State : system_alert( No 2 ) */ +/****************************************/ +static void ZOSL_OslRestOffs2Event( void ) +{ + /*stt_restriction_mode_off*/ + if( g_stm_crr_state.mode[StmModeNoRestrictionMode].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 ) + { + /*ctg_systemalert*/ + if( g_stm_category == StmCtgNoSystemAlert ) + { + ZOSL_OslRestOffs1e2(); + } + 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_on_screen_none*/ + if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone ) + { + ZOSL_OslRestOffs1e2(); + } + /*stt_prv_layer_on_screen_pop_up*/ + else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoPopUp ) + { + ZOSL_OslRestOffs0e0(); + } + /*stt_prv_layer_on_screen_sys_alt*/ + else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt ) + { + 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.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : OslMain */ +/* State : restriction_mode_2_on( No 1 ) */ +/****************************************/ +static void ZOSL_OslMains1Event( void ) +{ + /*stt_restriction_mode_off*/ + if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNoOff ) + { + stm_rel_event_restriction_mode_off(); + ZOSL_OslMains1e0(); + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event appraisal function */ +/* STM : OslRestOn */ +/* State : none( No 0 ) */ +/****************************************/ +static void ZOSL_OslRestOns0Event( void ) +{ + /*stt_restriction_mode_2_on*/ + if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + { + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_systemalert*/ + if( g_stm_category == StmCtgNoSystemAlert ) + { + /*ara_onscreen*/ + if( g_stm_area == StmAreaNoOnScreen ) + { + ZOSL_OslRestOns0e0(); + } + 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_on_screen_none*/ + if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone ) + { + ZOSL_OslRestOns0e2(); + } + /*stt_prv_layer_on_screen_sys_alt*/ + else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt ) + { + ZOSL_OslRestOns0e0(); + } + 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 : OslRestOn */ +/* State : system_alert( No 1 ) */ +/****************************************/ +static void ZOSL_OslRestOns1Event( void ) +{ + /*stt_restriction_mode_2_on*/ + if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo2On ) + { + /*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 ) + { + /*ctg_systemalert*/ + if( g_stm_category == StmCtgNoSystemAlert ) + { + ZOSL_OslRestOns1e1(); + } + 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_on_screen_none*/ + if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoNone ) + { + ZOSL_OslRestOns1e1(); + } + /*stt_prv_layer_on_screen_sys_alt*/ + else if( g_stm_prv_state.layer[StmLayerNoOnScreen].state == StmLayoutNoSysAlt ) + { + 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.*/ + } + } + else + { + /*Else and default design have not done.*/ + /*Please confirm the STM and design else and default.*/ + } +} + +/****************************************/ +/* Event call function */ +/* STM : OslMain */ +/****************************************/ +void stm_osl_event_call( void ) +{ + stm_osl_start_stm(); + switch( ZOSL_OslMainState[ZOSL_OSLMAIN] ) + { + case ZOSL_OSLMAINS0: + switch( ZOSL_OslMainState[ZOSL_OSLMAINS0F] ) + { + case ZOSL_OSLRESTOFFS0: + ZOSL_OslRestOffs0Event(); + break; + case ZOSL_OSLRESTOFFS1: + ZOSL_OslRestOffs1Event(); + break; + case ZOSL_OSLRESTOFFS2: + ZOSL_OslRestOffs2Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } + ZOSL_OslMains0Event(); + break; + case ZOSL_OSLMAINS1: + switch( ZOSL_OslMainState[ZOSL_OSLMAINS1F] ) + { + case ZOSL_OSLRESTONS0: + ZOSL_OslRestOns0Event(); + break; + case ZOSL_OSLRESTONS1: + ZOSL_OslRestOns1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } + ZOSL_OslMains1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Initial function */ +/* STM : OslMain */ +/****************************************/ +void stm_osl_initialize( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINS0; + ZOSL_OslMainState[ZOSL_OSLMAINS0F] = ( uint8_t )ZOSL_OSLRESTOFFS0; + ZOSL_OslMainState[ZOSL_OSLMAINS1F] = ( uint8_t )ZOSL_OSLRESTONS0; + ZOSL_OslMains0StateEntry(); +} + +/****************************************/ +/* Terminate function */ +/* STM : OslMain */ +/****************************************/ +void ZOSL_OslMainTerminate( void ) +{ + ZOSL_OslMainState[ZOSL_OSLMAIN] = ( uint8_t )ZOSL_OSLMAINTERMINATE; +} + diff --git a/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.h b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.h new file mode 100644 index 0000000..ee45304 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/OnScreenlayer/ZOSL_OslMain.h @@ -0,0 +1,82 @@ +/************************************************************/ +/* ZOSL_OslMain.h */ +/* OslMain State transition model header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZOSL_OSLMAIN_H +#define ZHEADER_ZOSL_OSLMAIN_H + +/*State management variable access define*/ +#define ZOSL_OSLMAIN ( 0U ) +#define ZOSL_OSLMAINS0F ( 1U ) +#define ZOSL_OSLMAINS1F ( 2U ) +#define ZOSL_OSLMAINS0 ( 0U ) +#define ZOSL_OSLRESTOFFS0 ( 0U ) +#define ZOSL_OSLRESTOFFS1 ( 1U ) +#define ZOSL_OSLRESTOFFS2 ( 2U ) +#define ZOSL_OSLMAINS1 ( 1U ) +#define ZOSL_OSLRESTONS0 ( 0U ) +#define ZOSL_OSLRESTONS1 ( 1U ) +#define ZOSL_OSLMAINSTATENOMAX ( 3U ) + +/*End state define*/ +#define ZOSL_OSLMAINEND ( 3U ) +/*Terminate state define*/ +#define ZOSL_OSLMAINTERMINATE ( ZOSL_OSLMAINEND + 1U ) + +/*State no define*/ +#define ZOSL_OSLMAINS0STATENO ( 0U ) +#define ZOSL_OSLRESTOFFS0STATENO ( 0U ) +#define ZOSL_OSLRESTOFFS1STATENO ( 1U ) +#define ZOSL_OSLRESTOFFS2STATENO ( 2U ) +#define ZOSL_OSLMAINS1STATENO ( 1U ) +#define ZOSL_OSLRESTONS0STATENO ( 0U ) +#define ZOSL_OSLRESTONS1STATENO ( 1U ) + +/*State serial no define*/ +#define ZOSL_OSLMAINS0STATESERIALNO ( 0U ) +#define ZOSL_OSLRESTOFFS0STATESERIALNO ( 1U ) +#define ZOSL_OSLRESTOFFS1STATESERIALNO ( 2U ) +#define ZOSL_OSLRESTOFFS2STATESERIALNO ( 3U ) +#define ZOSL_OSLMAINS1STATESERIALNO ( 4U ) +#define ZOSL_OSLRESTONS0STATESERIALNO ( 5U ) +#define ZOSL_OSLRESTONS1STATESERIALNO ( 6U ) + +/*Event no define*/ +#define ZOSL_OSLMAINE0EVENTNO ( 0U ) +#define ZOSL_OSLMAINE1EVENTNO ( 1U ) +#define ZOSL_OSLMAINE2EVENTNO ( 2U ) +#define ZOSL_OSLRESTOFFE0EVENTNO ( 0U ) +#define ZOSL_OSLRESTOFFE1EVENTNO ( 1U ) +#define ZOSL_OSLRESTOFFE2EVENTNO ( 2U ) +#define ZOSL_OSLRESTOFFE3EVENTNO ( 3U ) +#define ZOSL_OSLRESTOFFE4EVENTNO ( 4U ) +#define ZOSL_OSLRESTOFFE5EVENTNO ( 5U ) +#define ZOSL_OSLRESTOFFE6EVENTNO ( 6U ) +#define ZOSL_OSLRESTONE0EVENTNO ( 0U ) +#define ZOSL_OSLRESTONE1EVENTNO ( 1U ) +#define ZOSL_OSLRESTONE2EVENTNO ( 2U ) +#define ZOSL_OSLRESTONE3EVENTNO ( 3U ) + +/*Event serial no define*/ +#define ZOSL_OSLMAINE0EVENTSERIALNO ( 0U ) +#define ZOSL_OSLMAINE1EVENTSERIALNO ( 1U ) +#define ZOSL_OSLMAINE2EVENTSERIALNO ( 2U ) +#define ZOSL_OSLRESTOFFE0EVENTNO ( 0U ) +#define ZOSL_OSLRESTOFFE1EVENTNO ( 1U ) +#define ZOSL_OSLRESTOFFE2EVENTNO ( 2U ) +#define ZOSL_OSLRESTOFFE3EVENTNO ( 3U ) +#define ZOSL_OSLRESTOFFE4EVENTNO ( 4U ) +#define ZOSL_OSLRESTOFFE5EVENTNO ( 5U ) +#define ZOSL_OSLRESTOFFE6EVENTNO ( 6U ) +#define ZOSL_OSLRESTONE0EVENTNO ( 0U ) +#define ZOSL_OSLRESTONE1EVENTNO ( 1U ) +#define ZOSL_OSLRESTONE2EVENTNO ( 2U ) +#define ZOSL_OSLRESTONE3EVENTNO ( 3U ) + +/*Extern function*/ +extern void stm_osl_event_call( void ); +extern void stm_osl_initialize( void ); +extern void ZOSL_OslMainTerminate( void ); + +#endif |