diff options
Diffstat (limited to 'policy_manager/stm/zipc/StateTransitionor/hud/layer/apps')
4 files changed, 284 insertions, 0 deletions
diff --git a/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps.c b/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps.c new file mode 100755 index 0000000..52744cd --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps.c @@ -0,0 +1,179 @@ +/************************************************************/ +/* Zhud_apps_hud_apps.c */ +/* hud_apps State transition model source file */ +/* ZIPC Designer Version 1.2.1 */ +/************************************************************/ +#include "../../../ZST_include.h" + +/* State management variable */ +static uint8_t Zhud_apps_hud_appsState[ZHUD_APPS_HUD_APPSSTATENOMAX]; + +static void Zhud_apps_hud_appss0e0( void ); +static void Zhud_apps_hud_appss1e0( void ); +static void Zhud_apps_hud_appss1e1( void ); +static void Zhud_apps_hud_appss0Event( void ); +static void Zhud_apps_hud_appss1Event( void ); + +/****************************************/ +/* Action function */ +/* STM : hud_apps */ +/* State : none( No 0 ) */ +/* Event : ara_normal( No 0 ) */ +/****************************************/ +static void Zhud_apps_hud_appss0e0( void ) +{ + Zhud_apps_hud_appsState[ZHUD_APPS_HUD_APPS] = ( uint8_t )ZHUD_APPS_HUD_APPSS1; + stm_hud_apps_start_activity_general(); +} + +/****************************************/ +/* Action function */ +/* STM : hud_apps */ +/* State : general( No 1 ) */ +/* Event : ara_normal( No 0 ) */ +/****************************************/ +static void Zhud_apps_hud_appss1e0( void ) +{ + stm_hud_apps_start_activity_general(); +} + +/****************************************/ +/* Action function */ +/* STM : hud_apps */ +/* State : general( No 1 ) */ +/* Event : ctg_receiver( No 1 ) */ +/****************************************/ +static void Zhud_apps_hud_appss1e1( void ) +{ + Zhud_apps_hud_appsState[ZHUD_APPS_HUD_APPS] = ( uint8_t )ZHUD_APPS_HUD_APPSS0; + stm_hud_apps_start_activity_none(); +} + +/****************************************/ +/* Event appraisal function */ +/* STM : hud_apps */ +/* State : none( No 0 ) */ +/****************************************/ +static void Zhud_apps_hud_appss0Event( void ) +{ + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_receiver*/ + if( g_stm_category == StmCtgNoReceiver ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zhud_apps_hud_appss0e0(); + } + 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 : hud_apps */ +/* State : general( No 1 ) */ +/****************************************/ +static void Zhud_apps_hud_appss1Event( void ) +{ + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_receiver*/ + if( g_stm_category == StmCtgNoReceiver ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zhud_apps_hud_appss1e0(); + } + 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 ) + { + Zhud_apps_hud_appss1e1(); + } + 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 : hud_apps */ +/****************************************/ +void stm_hud_apps_event_call( void ) +{ + stm_hud_apps_start_stm(); + switch( Zhud_apps_hud_appsState[ZHUD_APPS_HUD_APPS] ) + { + case ZHUD_APPS_HUD_APPSS0: + Zhud_apps_hud_appss0Event(); + break; + case ZHUD_APPS_HUD_APPSS1: + Zhud_apps_hud_appss1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Initial function */ +/* STM : hud_apps */ +/****************************************/ +void stm_hud_apps_initialize( void ) +{ + Zhud_apps_hud_appsState[ZHUD_APPS_HUD_APPS] = ( uint8_t )ZHUD_APPS_HUD_APPSS0; + stm_hud_apps_start_activity_none(); +} + +/****************************************/ +/* Terminate function */ +/* STM : hud_apps */ +/****************************************/ +void Zhud_apps_hud_appsTerminate( void ) +{ + Zhud_apps_hud_appsState[ZHUD_APPS_HUD_APPS] = ( uint8_t )ZHUD_APPS_HUD_APPSTERMINATE; +} + diff --git a/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps.h b/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps.h new file mode 100755 index 0000000..77063df --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps.h @@ -0,0 +1,41 @@ +/************************************************************/ +/* Zhud_apps_hud_apps.h */ +/* hud_apps State transition model header file */ +/* ZIPC Designer Version 1.2.1 */ +/************************************************************/ +#ifndef ZHEADER_ZHUD_APPS_HUD_APPS_H +#define ZHEADER_ZHUD_APPS_HUD_APPS_H + +/*State management variable access define*/ +#define ZHUD_APPS_HUD_APPS ( 0U ) +#define ZHUD_APPS_HUD_APPSS0 ( 0U ) +#define ZHUD_APPS_HUD_APPSS1 ( 1U ) +#define ZHUD_APPS_HUD_APPSSTATENOMAX ( 1U ) + +/*End state define*/ +#define ZHUD_APPS_HUD_APPSEND ( 2U ) +/*Terminate state define*/ +#define ZHUD_APPS_HUD_APPSTERMINATE ( ZHUD_APPS_HUD_APPSEND + 1U ) + +/*State no define*/ +#define ZHUD_APPS_HUD_APPSS0STATENO ( 0U ) +#define ZHUD_APPS_HUD_APPSS1STATENO ( 1U ) + +/*State serial no define*/ +#define ZHUD_APPS_HUD_APPSS0STATESERIALNO ( 0U ) +#define ZHUD_APPS_HUD_APPSS1STATESERIALNO ( 1U ) + +/*Event no define*/ +#define ZHUD_APPS_HUD_APPSE0EVENTNO ( 0U ) +#define ZHUD_APPS_HUD_APPSE1EVENTNO ( 1U ) + +/*Event serial no define*/ +#define ZHUD_APPS_HUD_APPSE0EVENTSERIALNO ( 0U ) +#define ZHUD_APPS_HUD_APPSE1EVENTSERIALNO ( 1U ) + +/*Extern function*/ +extern void stm_hud_apps_event_call( void ); +extern void stm_hud_apps_initialize( void ); +extern void Zhud_apps_hud_appsTerminate( void ); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps_func.c b/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps_func.c new file mode 100755 index 0000000..b11ef61 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps_func.c @@ -0,0 +1,50 @@ +/************************************************************/ +/* Zhud_apps_hud_apps_func.c */ +/* Function and variable source file */ +/* ZIPC Designer Version 1.2.1 */ +/************************************************************/ +#include "../../../ZST_include.h" + +/************************************************************* + Function definition +*************************************************************/ + +/** + * stm_hud_apps_initialize_variable + */ +void stm_hud_apps_initialize_variable() { + g_stm_prv_state.layer[StmLayerNoApps].state = StmLayoutNoGenNml; + g_stm_prv_state.layer[StmLayerNoApps].changed = STM_FALSE; + + g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoGenNml; + g_stm_crr_state.layer[StmLayerNoApps].changed = STM_FALSE; +} + +/** + * stm_hud_apps_start_stm + */ +void stm_hud_apps_start_stm() { + if (g_stm_event == StmEvtNoUndo) { + // nop + } + else { + g_stm_prv_state.layer[StmLayerNoApps].state = g_stm_crr_state.layer[StmLayerNoApps].state; + } + g_stm_crr_state.layer[StmLayerNoApps].changed = STM_FALSE; +} + +/* + * @name stm_hud_apps_start_activity_none + */ +void stm_hud_apps_start_activity_none() { + g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone; + g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE; +} + +/** + * stm_hud_apps_start_activity_general + */ +void stm_hud_apps_start_activity_general(){ + g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoGenNml; + g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE; +} diff --git a/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps_func.h b/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps_func.h new file mode 100755 index 0000000..161107f --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps_func.h @@ -0,0 +1,14 @@ +/************************************************************/ +/* Zhud_apps_hud_apps_func.h */ +/* Function and variable header file */ +/* ZIPC Designer Version 1.2.1 */ +/************************************************************/ +#ifndef ZHEADER_ZHUD_APPS_HUD_APPS_FUNC_H +#define ZHEADER_ZHUD_APPS_HUD_APPS_FUNC_H + +extern void stm_hud_apps_initialize_variable(); +extern void stm_hud_apps_start_stm(); +extern void stm_hud_apps_start_activity_none(); +extern void stm_hud_apps_start_activity_general(); + +#endif |