summaryrefslogtreecommitdiffstats
path: root/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-07-11 16:21:37 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-08-15 01:49:00 +0000
commit1859dd4135f5d019f16a1333df318ecd1211afb9 (patch)
treee8b5e087215b087143f7982bf459d1d60ed45f65 /policy_manager/stm/zipc/StateTransitionor/NearHomeScreen
parentc1d85371b1eb693128cf9553c356ea77e609d9a3 (diff)
Readd policy table generated by ZIPC for EXAMPLE
This patch reverts commit e4222ca8da3b02afca5625fa2cef6832aa8ce90e and update it. To Policy Manager, add the source code of policy table which is generated by ZIPC for EXAMPLE. If use this example, please comment out line 22 and uncomment line 23 in policy_manager/CMakeLists.txt as follows: #set(STM_DIR stub) set(STM_DIR zipc) If try to show split layout, please set bool value "ON" to TRY_SPLIT_LAYOUT at line 28 in policy_manager/CMakeLists.txt as follows: set(TRY_SPLIT_LAYOUT OFF CACHE BOOL "Enable to show split layout") The generated source codes by ZIPC are "Common" and "StateTransitionor" in policy_manager/stm/zipc/. Bug-AGL: SPEC-1537 Change-Id: I1f91cf728eab79c229c5b4b12b9e1bdd338f64aa Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'policy_manager/stm/zipc/StateTransitionor/NearHomeScreen')
-rw-r--r--policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c65
-rw-r--r--policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.h16
-rw-r--r--policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c242
-rw-r--r--policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.h53
4 files changed, 376 insertions, 0 deletions
diff --git a/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c
new file mode 100644
index 0000000..c8ba22f
--- /dev/null
+++ b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.c
@@ -0,0 +1,65 @@
+/************************************************************/
+/* ZNHL_NearHomeScreen_func.c */
+/* Function and variable source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/*************************************************************
+ Function definition
+*************************************************************/
+
+/*
+ * @name stm_nhl_start_activity_none
+ */
+void stm_nhl_start_activity_none() {
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_nhl_start_activity_software_keyboard
+ */
+void stm_nhl_start_activity_software_keyboard() {
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoSftKbd;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_nhl_event_restriction_mode_off
+ */
+void stm_nhl_event_restriction_mode_off() {
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = g_prv_near_homescreen_state_rest_mode_1;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_TRUE;
+}
+
+/*
+ * @name stm_nhl_event_restriction_mode_2_on
+ */
+void stm_nhl_event_restriction_mode_on() {
+ g_prv_near_homescreen_state_rest_mode_1 = g_stm_prv_state.layer[StmLayerNoNearHomescreen].state;
+}
+
+/*
+ * @name stm_nhl_initialize_variable
+ */
+void stm_nhl_initialize_variable() {
+ g_stm_prv_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoNone;
+ g_stm_prv_state.layer[StmLayerNoNearHomescreen].changed = STM_FALSE;
+
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].state = StmLayoutNoNone;
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_FALSE;
+}
+
+/*
+ * @name stm_nhl_start_stm
+ */
+void stm_nhl_start_stm() {
+ if (g_stm_event == StmEvtNoUndo) {
+ // nop
+ }
+ else {
+ g_stm_prv_state.layer[StmLayerNoNearHomescreen].state = g_stm_crr_state.layer[StmLayerNoNearHomescreen].state;
+ }
+ g_stm_crr_state.layer[StmLayerNoNearHomescreen].changed = STM_FALSE;
+}
diff --git a/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.h b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.h
new file mode 100644
index 0000000..d2b13f7
--- /dev/null
+++ b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomeScreen_func.h
@@ -0,0 +1,16 @@
+/************************************************************/
+/* ZNHL_NearHomeScreen_func.h */
+/* Function and variable header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZNHL_NEARHOMESCREEN_FUNC_H
+#define ZHEADER_ZNHL_NEARHOMESCREEN_FUNC_H
+
+extern void stm_nhl_start_activity_none();
+extern void stm_nhl_start_activity_software_keyboard();
+extern void stm_nhl_event_restriction_mode_off();
+extern void stm_nhl_event_restriction_mode_on();
+extern void stm_nhl_initialize_variable();
+extern void stm_nhl_start_stm();
+
+#endif
diff --git a/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c
new file mode 100644
index 0000000..cc3bbc7
--- /dev/null
+++ b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.c
@@ -0,0 +1,242 @@
+/************************************************************/
+/* ZNHL_NearHomescreen.c */
+/* NearHomescreen State transition model source file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#include "../ZST_include.h"
+
+/* State management variable */
+static uint8_t ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREENSTATENOMAX];
+
+static void ZNHL_NearHomescreens0e0( void );
+static void ZNHL_NearHomescreens0e3( void );
+static void ZNHL_NearHomescreens1e0( void );
+static void ZNHL_NearHomescreens1e2( void );
+static void ZNHL_NearHomescreens0Event( void );
+static void ZNHL_NearHomescreens1Event( void );
+
+/****************************************/
+/* Action function */
+/* STM : NearHomescreen */
+/* State : none( No 0 ) */
+/* Event : ara_software_keyboard( No 0 ) */
+/****************************************/
+static void ZNHL_NearHomescreens0e0( void )
+{
+ ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS1;
+ stm_nhl_start_activity_software_keyboard();
+}
+
+/****************************************/
+/* Action function */
+/* STM : NearHomescreen */
+/* State : none( No 0 ) */
+/* Event : stt_prv_layer_near_homescreen_none( No 3 ) */
+/****************************************/
+static void ZNHL_NearHomescreens0e3( void )
+{
+ stm_nhl_start_activity_none();
+}
+
+/****************************************/
+/* Action function */
+/* STM : NearHomescreen */
+/* State : software_keyboard( No 1 ) */
+/* Event : ara_software_keyboard( No 0 ) */
+/****************************************/
+static void ZNHL_NearHomescreens1e0( void )
+{
+ stm_nhl_start_activity_software_keyboard();
+}
+
+/****************************************/
+/* Action function */
+/* STM : NearHomescreen */
+/* State : software_keyboard( No 1 ) */
+/* Event : ctg_software_keyboard( No 2 ) */
+/****************************************/
+static void ZNHL_NearHomescreens1e2( void )
+{
+ ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS0;
+ stm_nhl_start_activity_none();
+}
+
+/****************************************/
+/* Event appraisal function */
+/* STM : NearHomescreen */
+/* State : none( No 0 ) */
+/****************************************/
+static void ZNHL_NearHomescreens0Event( void )
+{
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_software_keyboard*/
+ if( g_stm_category == StmCtgNoSoftwareKeyboard )
+ {
+ /*ara_software_keyboard*/
+ if( g_stm_area == StmAreaNoSoftwareKyeboard )
+ {
+ ZNHL_NearHomescreens0e0();
+ }
+ else
+ {
+ ZNHL_NearHomescreens0e0();
+ }
+ }
+ 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_near_homescreen_none*/
+ if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoNone )
+ {
+ ZNHL_NearHomescreens0e3();
+ }
+ /*stt_prv_layer_near_homescreen_sft_kbd*/
+ else if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoSftKbd )
+ {
+ ZNHL_NearHomescreens0e0();
+ }
+ 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 : NearHomescreen */
+/* State : software_keyboard( No 1 ) */
+/****************************************/
+static void ZNHL_NearHomescreens1Event( void )
+{
+ /*evt_activate*/
+ if( g_stm_event == StmEvtNoActivate )
+ {
+ /*ctg_software_keyboard*/
+ if( g_stm_category == StmCtgNoSoftwareKeyboard )
+ {
+ /*ara_software_keyboard*/
+ if( g_stm_area == StmAreaNoSoftwareKyeboard )
+ {
+ ZNHL_NearHomescreens1e0();
+ }
+ else
+ {
+ ZNHL_NearHomescreens1e0();
+ }
+ }
+ 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_software_keyboard*/
+ if( g_stm_category == StmCtgNoSoftwareKeyboard )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ 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_near_homescreen_none*/
+ if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoNone )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ /*stt_prv_layer_near_homescreen_sft_kbd*/
+ else if( g_stm_prv_state.layer[StmLayerNoNearHomescreen].state == StmLayoutNoSftKbd )
+ {
+ ZNHL_NearHomescreens1e0();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+ }
+ /*stt_restriction_mode_1_on*/
+ else if( g_stm_crr_state.mode[StmModeNoRestrictionMode].state == StmRestrictionModeSttNo1On )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ /*stt_crr_layer_apps_changed*/
+ else if( g_stm_crr_state.layer[StmLayerNoApps].changed == STM_TRUE )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ /*stt_crr_layer_hs_changed*/
+ else if( g_stm_crr_state.layer[StmLayerNoHomescreen].changed == STM_TRUE )
+ {
+ ZNHL_NearHomescreens1e2();
+ }
+ else
+ {
+ /*Else and default design have not done.*/
+ /*Please confirm the STM and design else and default.*/
+ }
+}
+
+/****************************************/
+/* Event call function */
+/* STM : NearHomescreen */
+/****************************************/
+void stm_nhl_event_call( void )
+{
+ stm_nhl_start_stm();
+ switch( ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] )
+ {
+ case ZNHL_NEARHOMESCREENS0:
+ ZNHL_NearHomescreens0Event();
+ break;
+ case ZNHL_NEARHOMESCREENS1:
+ ZNHL_NearHomescreens1Event();
+ break;
+ default:
+ /*Not accessible to this else (default).*/
+ break;
+ }
+}
+
+/****************************************/
+/* Initial function */
+/* STM : NearHomescreen */
+/****************************************/
+void stm_nhl_initialize( void )
+{
+ ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENS0;
+ stm_nhl_start_activity_none();
+}
+
+/****************************************/
+/* Terminate function */
+/* STM : NearHomescreen */
+/****************************************/
+void ZNHL_NearHomescreenTerminate( void )
+{
+ ZNHL_NearHomescreenState[ZNHL_NEARHOMESCREEN] = ( uint8_t )ZNHL_NEARHOMESCREENTERMINATE;
+}
+
diff --git a/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.h b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.h
new file mode 100644
index 0000000..f23775e
--- /dev/null
+++ b/policy_manager/stm/zipc/StateTransitionor/NearHomeScreen/ZNHL_NearHomescreen.h
@@ -0,0 +1,53 @@
+/************************************************************/
+/* ZNHL_NearHomescreen.h */
+/* NearHomescreen State transition model header file */
+/* ZIPC Designer Version 1.2.0 */
+/************************************************************/
+#ifndef ZHEADER_ZNHL_NEARHOMESCREEN_H
+#define ZHEADER_ZNHL_NEARHOMESCREEN_H
+
+/*State management variable access define*/
+#define ZNHL_NEARHOMESCREEN ( 0U )
+#define ZNHL_NEARHOMESCREENS0 ( 0U )
+#define ZNHL_NEARHOMESCREENS1 ( 1U )
+#define ZNHL_NEARHOMESCREENSTATENOMAX ( 1U )
+
+/*End state define*/
+#define ZNHL_NEARHOMESCREENEND ( 2U )
+/*Terminate state define*/
+#define ZNHL_NEARHOMESCREENTERMINATE ( ZNHL_NEARHOMESCREENEND + 1U )
+
+/*State no define*/
+#define ZNHL_NEARHOMESCREENS0STATENO ( 0U )
+#define ZNHL_NEARHOMESCREENS1STATENO ( 1U )
+
+/*State serial no define*/
+#define ZNHL_NEARHOMESCREENS0STATESERIALNO ( 0U )
+#define ZNHL_NEARHOMESCREENS1STATESERIALNO ( 1U )
+
+/*Event no define*/
+#define ZNHL_NEARHOMESCREENE0EVENTNO ( 0U )
+#define ZNHL_NEARHOMESCREENE1EVENTNO ( 1U )
+#define ZNHL_NEARHOMESCREENE2EVENTNO ( 2U )
+#define ZNHL_NEARHOMESCREENE3EVENTNO ( 3U )
+#define ZNHL_NEARHOMESCREENE4EVENTNO ( 4U )
+#define ZNHL_NEARHOMESCREENE5EVENTNO ( 5U )
+#define ZNHL_NEARHOMESCREENE6EVENTNO ( 6U )
+#define ZNHL_NEARHOMESCREENE7EVENTNO ( 7U )
+
+/*Event serial no define*/
+#define ZNHL_NEARHOMESCREENE0EVENTSERIALNO ( 0U )
+#define ZNHL_NEARHOMESCREENE1EVENTSERIALNO ( 1U )
+#define ZNHL_NEARHOMESCREENE2EVENTSERIALNO ( 2U )
+#define ZNHL_NEARHOMESCREENE3EVENTSERIALNO ( 3U )
+#define ZNHL_NEARHOMESCREENE4EVENTSERIALNO ( 4U )
+#define ZNHL_NEARHOMESCREENE5EVENTSERIALNO ( 5U )
+#define ZNHL_NEARHOMESCREENE6EVENTSERIALNO ( 6U )
+#define ZNHL_NEARHOMESCREENE7EVENTSERIALNO ( 7U )
+
+/*Extern function*/
+extern void stm_nhl_event_call( void );
+extern void stm_nhl_initialize( void );
+extern void ZNHL_NearHomescreenTerminate( void );
+
+#endif