add source for ces2019
[apps/agl-service-windowmanager-2017.git] / policy_manager / stm / zipc / StateTransitionor / RestrictionMode / ZREM_RestrictionMode.c
index 7fe5700..2ba6a87 100644 (file)
@@ -9,88 +9,45 @@
 static uint8_t ZREM_RestrictionModeState[ZREM_RESTRICTIONMODESTATENOMAX];
 
 static void ZREM_RestrictionModes0e1( void );
-static void ZREM_RestrictionModes0e2( void );
 static void ZREM_RestrictionModes1e0( void );
 static void ZREM_RestrictionModes0Event( void );
 static void ZREM_RestrictionModes1Event( void );
-static void ZREM_RestrictionModes2Event( void );
 
 /****************************************/
 /* Action function                      */
 /*   STM : RestrictionMode              */
-/*   State : restriction_mode_off( No 0 ) */
-/*   Event : evt_restriction_mode_1_on( No 1 ) */
+/*   State : restriction_mode_on( No 0 )*/
+/*   Event : evt_restriction_mode_off( No 1 ) */
 /****************************************/
 static void ZREM_RestrictionModes0e1( void )
 {
     ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES1;
-    stm_rem_start_activity_restriction_mode_1_on();
-}
-
-/****************************************/
-/* Action function                      */
-/*   STM : RestrictionMode              */
-/*   State : restriction_mode_off( No 0 ) */
-/*   Event : evt_restriction_mode_2_on( No 2 ) */
-/****************************************/
-static void ZREM_RestrictionModes0e2( void )
-{
-    ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES2;
-    stm_rem_start_activity_restriction_mode_2_on();
+    stm_rem_start_activity_restriction_mode_off();
 }
 
 /****************************************/
 /* Action function                      */
 /*   STM : RestrictionMode              */
-/*   State : restriction_mode_1_on( No 1 ) */
-/*   Event : evt_restriction_mode_off( No 0 ) */
+/*   State : restriction_mode_off( No 1 ) */
+/*   Event : evt_restriction_mode_on( No 0 ) */
 /****************************************/
 static void ZREM_RestrictionModes1e0( void )
 {
     ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES0;
-    stm_rem_start_activity_restriction_mode_off();
+    stm_rem_start_activity_restriction_mode_on();
 }
 
 /****************************************/
 /* Event appraisal function             */
 /*   STM : RestrictionMode              */
-/*   State : restriction_mode_off( No 0 ) */
+/*   State : restriction_mode_on( No 0 )*/
 /****************************************/
 static void ZREM_RestrictionModes0Event( void )
-{
-    /*evt_restriction_mode_1_on*/
-    if( g_stm_event == StmEvtNoRestrictionMode1On )
-    {
-        ZREM_RestrictionModes0e1();
-    }
-    /*evt_restriction_mode_2_on*/
-    else if( g_stm_event == StmEvtNoRestrictionMode2On )
-    {
-        ZREM_RestrictionModes0e2();
-    }
-    else
-    {
-        /*Else and default design have not done.*/
-        /*Please confirm the STM and design else and default.*/
-    }
-}
-
-/****************************************/
-/* Event appraisal function             */
-/*   STM : RestrictionMode              */
-/*   State : restriction_mode_1_on( No 1 ) */
-/****************************************/
-static void ZREM_RestrictionModes1Event( void )
 {
     /*evt_restriction_mode_off*/
     if( g_stm_event == StmEvtNoRestrictionModeOff )
     {
-        ZREM_RestrictionModes1e0();
-    }
-    /*evt_restriction_mode_2_on*/
-    else if( g_stm_event == StmEvtNoRestrictionMode2On )
-    {
-        ZREM_RestrictionModes0e2();
+        ZREM_RestrictionModes0e1();
     }
     else
     {
@@ -102,20 +59,15 @@ static void ZREM_RestrictionModes1Event( void )
 /****************************************/
 /* Event appraisal function             */
 /*   STM : RestrictionMode              */
-/*   State : restriction_mode_2_on( No 2 ) */
+/*   State : restriction_mode_off( No 1 ) */
 /****************************************/
-static void ZREM_RestrictionModes2Event( void )
+static void ZREM_RestrictionModes1Event( void )
 {
-    /*evt_restriction_mode_off*/
-    if( g_stm_event == StmEvtNoRestrictionModeOff )
+    /*evt_restriction_mode_on*/
+    if( g_stm_event == StmEvtNoRestrictionModeOn )
     {
         ZREM_RestrictionModes1e0();
     }
-    /*evt_restriction_mode_1_on*/
-    else if( g_stm_event == StmEvtNoRestrictionMode1On )
-    {
-        ZREM_RestrictionModes0e1();
-    }
     else
     {
         /*Else and default design have not done.*/
@@ -138,9 +90,6 @@ void stm_rem_event_call( void )
     case ZREM_RESTRICTIONMODES1:
         ZREM_RestrictionModes1Event();
         break;
-    case ZREM_RESTRICTIONMODES2:
-        ZREM_RestrictionModes2Event();
-        break;
     default:
         /*Not accessible to this else (default).*/
         break;
@@ -153,7 +102,7 @@ void stm_rem_event_call( void )
 /****************************************/
 void stm_rem_initialize( void )
 {
-    ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES0;
+    ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES1;
     stm_rem_start_activity_restriction_mode_off();
 }