aboutsummaryrefslogtreecommitdiffstats
path: root/policy_manager/stm/zipc/StateTransitionor/hud/layer/apps/Zhud_apps_hud_apps.c
blob: 52744cdc88f678b581e6a47283b5168be48d7fe9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
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;
}