X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=policy_manager%2Fstm%2Fzipc%2FStateTransitionor%2Frse2%2Flayer%2Fapps%2FZrse2_apps_rse2_apps.c;fp=policy_manager%2Fstm%2Fzipc%2FStateTransitionor%2Frse2%2Flayer%2Fapps%2FZrse2_apps_rse2_apps.c;h=5d0e84c180d515cdab11643075631a5a85c5bf13;hb=ac17da7010c6bd90240a641d503991ca5d0cb41a;hp=0000000000000000000000000000000000000000;hpb=98006b6538c5be44350746ec3756f004a5c68af8;p=apps%2Fagl-service-windowmanager.git diff --git a/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps.c b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps.c new file mode 100755 index 0000000..5d0e84c --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps.c @@ -0,0 +1,179 @@ +/************************************************************/ +/* Zrse2_apps_rse2_apps.c */ +/* rse2_apps State transition model source file */ +/* ZIPC Designer Version 1.2.1 */ +/************************************************************/ +#include "../../../ZST_include.h" + +/* State management variable */ +static uint8_t Zrse2_apps_rse2_appsState[ZRSE2_APPS_RSE2_APPSSTATENOMAX]; + +static void Zrse2_apps_rse2_appss0e0( void ); +static void Zrse2_apps_rse2_appss1e0( void ); +static void Zrse2_apps_rse2_appss1e1( void ); +static void Zrse2_apps_rse2_appss0Event( void ); +static void Zrse2_apps_rse2_appss1Event( void ); + +/****************************************/ +/* Action function */ +/* STM : rse2_apps */ +/* State : none( No 0 ) */ +/* Event : ara_normal( No 0 ) */ +/****************************************/ +static void Zrse2_apps_rse2_appss0e0( void ) +{ + Zrse2_apps_rse2_appsState[ZRSE2_APPS_RSE2_APPS] = ( uint8_t )ZRSE2_APPS_RSE2_APPSS1; + stm_rse2_apps_start_activity_general(); +} + +/****************************************/ +/* Action function */ +/* STM : rse2_apps */ +/* State : general( No 1 ) */ +/* Event : ara_normal( No 0 ) */ +/****************************************/ +static void Zrse2_apps_rse2_appss1e0( void ) +{ + stm_rse2_apps_start_activity_general(); +} + +/****************************************/ +/* Action function */ +/* STM : rse2_apps */ +/* State : general( No 1 ) */ +/* Event : ctg_receiver( No 1 ) */ +/****************************************/ +static void Zrse2_apps_rse2_appss1e1( void ) +{ + Zrse2_apps_rse2_appsState[ZRSE2_APPS_RSE2_APPS] = ( uint8_t )ZRSE2_APPS_RSE2_APPSS0; + stm_rse2_apps_start_activity_none(); +} + +/****************************************/ +/* Event appraisal function */ +/* STM : rse2_apps */ +/* State : none( No 0 ) */ +/****************************************/ +static void Zrse2_apps_rse2_appss0Event( void ) +{ + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_receiver*/ + if( g_stm_category == StmCtgNoReceiver ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zrse2_apps_rse2_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 : rse2_apps */ +/* State : general( No 1 ) */ +/****************************************/ +static void Zrse2_apps_rse2_appss1Event( void ) +{ + /*evt_activate*/ + if( g_stm_event == StmEvtNoActivate ) + { + /*ctg_receiver*/ + if( g_stm_category == StmCtgNoReceiver ) + { + /*ara_normal*/ + if( g_stm_area == StmAreaNoNormal ) + { + Zrse2_apps_rse2_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 ) + { + Zrse2_apps_rse2_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 : rse2_apps */ +/****************************************/ +void stm_rse2_apps_event_call( void ) +{ + stm_rse2_apps_start_stm(); + switch( Zrse2_apps_rse2_appsState[ZRSE2_APPS_RSE2_APPS] ) + { + case ZRSE2_APPS_RSE2_APPSS0: + Zrse2_apps_rse2_appss0Event(); + break; + case ZRSE2_APPS_RSE2_APPSS1: + Zrse2_apps_rse2_appss1Event(); + break; + default: + /*Not accessible to this else (default).*/ + break; + } +} + +/****************************************/ +/* Initial function */ +/* STM : rse2_apps */ +/****************************************/ +void stm_rse2_apps_initialize( void ) +{ + Zrse2_apps_rse2_appsState[ZRSE2_APPS_RSE2_APPS] = ( uint8_t )ZRSE2_APPS_RSE2_APPSS0; + stm_rse2_apps_start_activity_none(); +} + +/****************************************/ +/* Terminate function */ +/* STM : rse2_apps */ +/****************************************/ +void Zrse2_apps_rse2_appsTerminate( void ) +{ + Zrse2_apps_rse2_appsState[ZRSE2_APPS_RSE2_APPS] = ( uint8_t )ZRSE2_APPS_RSE2_APPSTERMINATE; +} +