From ac17da7010c6bd90240a641d503991ca5d0cb41a Mon Sep 17 00:00:00 2001 From: "fukubayashi.akio" Date: Thu, 6 Jun 2019 17:55:08 +0900 Subject: Add chage remote app Signed-off-by: fukubayashi.akio --- .../rse2/layer/apps/Zrse2_apps_rse2_apps.c | 179 +++++++++++++++++++++ .../rse2/layer/apps/Zrse2_apps_rse2_apps.h | 41 +++++ .../rse2/layer/apps/Zrse2_apps_rse2_apps_func.c | 50 ++++++ .../rse2/layer/apps/Zrse2_apps_rse2_apps_func.h | 14 ++ .../layer/remote_rse2/Zremote_rse2_remote_rse2.c | 32 ++-- .../remote_rse2/Zremote_rse2_remote_rse2_func.c | 2 +- 6 files changed, 301 insertions(+), 17 deletions(-) create mode 100755 policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps.c create mode 100755 policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps.h create mode 100755 policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps_func.c create mode 100755 policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps_func.h (limited to 'policy_manager/stm/zipc/StateTransitionor/rse2/layer') 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; +} + diff --git a/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps.h b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps.h new file mode 100755 index 0000000..371f4a5 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps.h @@ -0,0 +1,41 @@ +/************************************************************/ +/* Zrse2_apps_rse2_apps.h */ +/* rse2_apps State transition model header file */ +/* ZIPC Designer Version 1.2.1 */ +/************************************************************/ +#ifndef ZHEADER_ZRSE2_APPS_RSE2_APPS_H +#define ZHEADER_ZRSE2_APPS_RSE2_APPS_H + +/*State management variable access define*/ +#define ZRSE2_APPS_RSE2_APPS ( 0U ) +#define ZRSE2_APPS_RSE2_APPSS0 ( 0U ) +#define ZRSE2_APPS_RSE2_APPSS1 ( 1U ) +#define ZRSE2_APPS_RSE2_APPSSTATENOMAX ( 1U ) + +/*End state define*/ +#define ZRSE2_APPS_RSE2_APPSEND ( 2U ) +/*Terminate state define*/ +#define ZRSE2_APPS_RSE2_APPSTERMINATE ( ZRSE2_APPS_RSE2_APPSEND + 1U ) + +/*State no define*/ +#define ZRSE2_APPS_RSE2_APPSS0STATENO ( 0U ) +#define ZRSE2_APPS_RSE2_APPSS1STATENO ( 1U ) + +/*State serial no define*/ +#define ZRSE2_APPS_RSE2_APPSS0STATESERIALNO ( 0U ) +#define ZRSE2_APPS_RSE2_APPSS1STATESERIALNO ( 1U ) + +/*Event no define*/ +#define ZRSE2_APPS_RSE2_APPSE0EVENTNO ( 0U ) +#define ZRSE2_APPS_RSE2_APPSE1EVENTNO ( 1U ) + +/*Event serial no define*/ +#define ZRSE2_APPS_RSE2_APPSE0EVENTSERIALNO ( 0U ) +#define ZRSE2_APPS_RSE2_APPSE1EVENTSERIALNO ( 1U ) + +/*Extern function*/ +extern void stm_rse2_apps_event_call( void ); +extern void stm_rse2_apps_initialize( void ); +extern void Zrse2_apps_rse2_appsTerminate( void ); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps_func.c b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps_func.c new file mode 100755 index 0000000..7ae2775 --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps_func.c @@ -0,0 +1,50 @@ +/************************************************************/ +/* Zrse2_apps_rse2_apps_func.c */ +/* Function and variable source file */ +/* ZIPC Designer Version 1.2.1 */ +/************************************************************/ +#include "../../../ZST_include.h" + +/************************************************************* + Function definition +*************************************************************/ + +/** + * stm_rse2_apps_initialize_variable + */ +void stm_rse2_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_rse2_apps_start_stm + */ +void stm_rse2_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_rse2_apps_start_activity_none + */ +void stm_rse2_apps_start_activity_none() { + g_stm_crr_state.layer[StmLayerNoApps].state = StmLayoutNoNone; + g_stm_crr_state.layer[StmLayerNoApps].changed = STM_TRUE; +} + +/** + * stm_rse2_apps_start_activity_general + */ +void stm_rse2_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/rse2/layer/apps/Zrse2_apps_rse2_apps_func.h b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps_func.h new file mode 100755 index 0000000..91467ef --- /dev/null +++ b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/apps/Zrse2_apps_rse2_apps_func.h @@ -0,0 +1,14 @@ +/************************************************************/ +/* Zrse2_apps_rse2_apps_func.h */ +/* Function and variable header file */ +/* ZIPC Designer Version 1.2.1 */ +/************************************************************/ +#ifndef ZHEADER_ZRSE2_APPS_RSE2_APPS_FUNC_H +#define ZHEADER_ZRSE2_APPS_RSE2_APPS_FUNC_H + +extern void stm_rse2_apps_initialize_variable(); +extern void stm_rse2_apps_start_stm(); +extern void stm_rse2_apps_start_activity_none(); +extern void stm_rse2_apps_start_activity_general(); + +#endif diff --git a/policy_manager/stm/zipc/StateTransitionor/rse2/layer/remote_rse2/Zremote_rse2_remote_rse2.c b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/remote_rse2/Zremote_rse2_remote_rse2.c index 4f2cd6c..d3b3177 100755 --- a/policy_manager/stm/zipc/StateTransitionor/rse2/layer/remote_rse2/Zremote_rse2_remote_rse2.c +++ b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/remote_rse2/Zremote_rse2_remote_rse2.c @@ -18,7 +18,7 @@ static void Zremote_rse2_remote_rse2s1Event( void ); /* Action function */ /* STM : remote_rse2 */ /* State : none( No 0 ) */ -/* Event : ara_normal( No 0 ) */ +/* Event : ara_rse2_normal( No 0 ) */ /****************************************/ static void Zremote_rse2_remote_rse2s0e0( void ) { @@ -29,8 +29,8 @@ static void Zremote_rse2_remote_rse2s0e0( void ) /****************************************/ /* Action function */ /* STM : remote_rse2 */ -/* State : general( No 1 ) */ -/* Event : ara_normal( No 0 ) */ +/* State : remote_rse2( No 1 ) */ +/* Event : ara_rse2_normal( No 0 ) */ /****************************************/ static void Zremote_rse2_remote_rse2s1e0( void ) { @@ -40,8 +40,8 @@ static void Zremote_rse2_remote_rse2s1e0( void ) /****************************************/ /* Action function */ /* STM : remote_rse2 */ -/* State : general( No 1 ) */ -/* Event : ctg_receiver( No 1 ) */ +/* State : remote_rse2( No 1 ) */ +/* Event : ctg_general( No 1 ) */ /****************************************/ static void Zremote_rse2_remote_rse2s1e1( void ) { @@ -59,11 +59,11 @@ static void Zremote_rse2_remote_rse2s0Event( void ) /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) { - /*ctg_receiver*/ - if( g_stm_category == StmCtgNoReceiver ) + /*ctg_general*/ + if( g_stm_category == StmCtgNoGeneral ) { - /*ara_normal*/ - if( g_stm_area == StmAreaNoNormal ) + /*ara_rse2_normal*/ + if( g_stm_area == StmAreaNoRse2Normal ) { Zremote_rse2_remote_rse2s0e0(); } @@ -89,18 +89,18 @@ static void Zremote_rse2_remote_rse2s0Event( void ) /****************************************/ /* Event appraisal function */ /* STM : remote_rse2 */ -/* State : general( No 1 ) */ +/* State : remote_rse2( No 1 ) */ /****************************************/ static void Zremote_rse2_remote_rse2s1Event( void ) { /*evt_activate*/ if( g_stm_event == StmEvtNoActivate ) { - /*ctg_receiver*/ - if( g_stm_category == StmCtgNoReceiver ) + /*ctg_general*/ + if( g_stm_category == StmCtgNoGeneral ) { - /*ara_normal*/ - if( g_stm_area == StmAreaNoNormal ) + /*ara_rse2_normal*/ + if( g_stm_area == StmAreaNoRse2Normal ) { Zremote_rse2_remote_rse2s1e0(); } @@ -119,8 +119,8 @@ static void Zremote_rse2_remote_rse2s1Event( void ) /*evt_deactivate*/ else if( g_stm_event == StmEvtNoDeactivate ) { - /*ctg_receiver*/ - if( g_stm_category == StmCtgNoReceiver ) + /*ctg_general*/ + if( g_stm_category == StmCtgNoGeneral ) { Zremote_rse2_remote_rse2s1e1(); } diff --git a/policy_manager/stm/zipc/StateTransitionor/rse2/layer/remote_rse2/Zremote_rse2_remote_rse2_func.c b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/remote_rse2/Zremote_rse2_remote_rse2_func.c index cae3382..12d9cc3 100755 --- a/policy_manager/stm/zipc/StateTransitionor/rse2/layer/remote_rse2/Zremote_rse2_remote_rse2_func.c +++ b/policy_manager/stm/zipc/StateTransitionor/rse2/layer/remote_rse2/Zremote_rse2_remote_rse2_func.c @@ -44,6 +44,6 @@ void stm_remote_rse2_start_activity_none() { * @name stm_remote_rse2_start_activity_general */ void stm_remote_rse2_start_activity_general(){ - g_stm_crr_state.layer[StmLayerNoRemoteRSE2].state = StmLayoutNoGenNml; + g_stm_crr_state.layer[StmLayerNoRemoteRSE2].state = StmLayoutNoRmtRse2; g_stm_crr_state.layer[StmLayerNoRemoteRSE2].changed = STM_TRUE; } -- cgit 1.2.3-korg