diff options
Diffstat (limited to 'policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer')
4 files changed, 250 insertions, 0 deletions
diff --git a/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c new file mode 100644 index 0000000..a4cd474 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.c @@ -0,0 +1,152 @@ +/************************************************************/ +/* ZHSL_HomeScreen.c */ +/* HomeScreen State transition model source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/* State management variable */ +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 ); + +/****************************************/ +/* Action function */ +/* STM : HomeScreen */ +/* State : none( No 0 ) */ +/* Event : ara_fullscreen( No 0 ) */ +/****************************************/ +static void ZHSL_HomeScreens0e0( void ) +{ + ZHSL_HomeScreenState[ZHSL_HOMESCREEN] = ( uint8_t )ZHSL_HOMESCREENS1; + stm_hsl_start_activity_homescreen(); +} + +/****************************************/ +/* 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 ) */ +/****************************************/ +static void ZHSL_HomeScreens0Event( void ) +{ + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_homescreen*/ + if( g_stm_category == StmCtgNoHomescreen ) + { + /*ara_fullscreen*/ + if( g_stm_area == StmAreaNoFullscreen ) + { + ZHSL_HomeScreens0e0(); + } + 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 : HomeScreen */ +/* State : homescreen( No 1 ) */ +/****************************************/ +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.*/ + } +} + +/****************************************/ +/* Event call function */ +/* STM : HomeScreen */ +/****************************************/ +void stm_hsl_event_call( void ) +{ + stm_hsl_start_stm(); + switch( ZHSL_HomeScreenState[ZHSL_HOMESCREEN] ) + { + case ZHSL_HOMESCREENS0: + ZHSL_HomeScreens0Event(); + break; + case ZHSL_HOMESCREENS1: + ZHSL_HomeScreens1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Initial function */ +/* STM : HomeScreen */ +/****************************************/ +void stm_hsl_initialize( void ) +{ + ZHSL_HomeScreenState[ZHSL_HOMESCREEN] = ( uint8_t )ZHSL_HOMESCREENS0; + stm_hsl_start_activity_none(); +} + +/****************************************/ +/* Terminate function */ +/* STM : HomeScreen */ +/****************************************/ +void ZHSL_HomeScreenTerminate( void ) +{ + ZHSL_HomeScreenState[ZHSL_HOMESCREEN] = ( uint8_t )ZHSL_HOMESCREENTERMINATE; +} + diff --git a/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.h b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.h new file mode 100644 index 0000000..ffa8552 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen.h @@ -0,0 +1,39 @@ +/************************************************************/ +/* ZHSL_HomeScreen.h */ +/* HomeScreen State transition model header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZHSL_HOMESCREEN_H +#define ZHEADER_ZHSL_HOMESCREEN_H + +/*State management variable access define*/ +#define ZHSL_HOMESCREEN ( 0U ) +#define ZHSL_HOMESCREENS0 ( 0U ) +#define ZHSL_HOMESCREENS1 ( 1U ) +#define ZHSL_HOMESCREENSTATENOMAX ( 1U ) + +/*End state define*/ +#define ZHSL_HOMESCREENEND ( 2U ) +/*Terminate state define*/ +#define ZHSL_HOMESCREENTERMINATE ( ZHSL_HOMESCREENEND + 1U ) + +/*State no define*/ +#define ZHSL_HOMESCREENS0STATENO ( 0U ) +#define ZHSL_HOMESCREENS1STATENO ( 1U ) + +/*State serial no define*/ +#define ZHSL_HOMESCREENS0STATESERIALNO ( 0U ) +#define ZHSL_HOMESCREENS1STATESERIALNO ( 1U ) + +/*Event no define*/ +#define ZHSL_HOMESCREENE0EVENTNO ( 0U ) + +/*Event serial no define*/ +#define ZHSL_HOMESCREENE0EVENTSERIALNO ( 0U ) + +/*Extern function*/ +extern void stm_hsl_event_call( void ); +extern void stm_hsl_initialize( void ); +extern void ZHSL_HomeScreenTerminate( void ); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.c b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.c new file mode 100644 index 0000000..4d50ab0 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.c @@ -0,0 +1,45 @@ +/************************************************************/ +/* ZHSL_HomeScreen_func.c */ +/* Function and variable source file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#include "../ZST_include.h" + +/************************************************************* + Function definition +*************************************************************/ + +/* + * @name stm_hsl_start_activity_none + */ +void stm_hsl_start_activity_none() { + g_stm_crr_state.layer[StmLayerNoHomescreen].state = StmLayoutNoNone; + g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_TRUE; +} + +/* + * @name stm_hsl_start_activity_homescreen + */ +void stm_hsl_start_activity_homescreen() { + g_stm_crr_state.layer[StmLayerNoHomescreen].state = StmLayoutNoHms; + g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_TRUE; +} + +/* + * @name stm_hsl_initialize_variable + */ +void stm_hsl_initialize_variable() { + g_stm_prv_state.layer[StmLayerNoHomescreen].state = StmLayoutNoNone; + g_stm_prv_state.layer[StmLayerNoHomescreen].changed = STM_FALSE; + + g_stm_crr_state.layer[StmLayerNoHomescreen].state = StmLayoutNoNone; + g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_FALSE; +} + +/* + * @name stm_hsl_start_stm + */ +void stm_hsl_start_stm() { + g_stm_prv_state.layer[StmLayerNoHomescreen].state = g_stm_crr_state.layer[StmLayerNoHomescreen].state; + g_stm_crr_state.layer[StmLayerNoHomescreen].changed = STM_FALSE; +} diff --git a/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.h b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.h new file mode 100644 index 0000000..d5f4ab9 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/HomeScreenLayer/ZHSL_HomeScreen_func.h @@ -0,0 +1,14 @@ +/************************************************************/ +/* ZHSL_HomeScreen_func.h */ +/* Function and variable header file */ +/* ZIPC Designer Version 1.2.0 */ +/************************************************************/ +#ifndef ZHEADER_ZHSL_HOMESCREEN_FUNC_H +#define ZHEADER_ZHSL_HOMESCREEN_FUNC_H + +extern void stm_hsl_start_activity_none(); +extern void stm_hsl_start_activity_homescreen(); +extern void stm_hsl_initialize_variable(); +extern void stm_hsl_start_stm(); + +#endif |