blob: 2ba6a876b89518565c6d58c5dcc830c637d0c6d0 (
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
|
/************************************************************/
/* ZREM_RestrictionMode.c */
/* RestrictionMode State transition model source file */
/* ZIPC Designer Version 1.2.0 */
/************************************************************/
#include "../ZST_include.h"
/* State management variable */
static uint8_t ZREM_RestrictionModeState[ZREM_RESTRICTIONMODESTATENOMAX];
static void ZREM_RestrictionModes0e1( void );
static void ZREM_RestrictionModes1e0( void );
static void ZREM_RestrictionModes0Event( void );
static void ZREM_RestrictionModes1Event( void );
/****************************************/
/* Action function */
/* STM : RestrictionMode */
/* 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_off();
}
/****************************************/
/* Action function */
/* STM : RestrictionMode */
/* 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_on();
}
/****************************************/
/* Event appraisal function */
/* STM : RestrictionMode */
/* State : restriction_mode_on( No 0 )*/
/****************************************/
static void ZREM_RestrictionModes0Event( void )
{
/*evt_restriction_mode_off*/
if( g_stm_event == StmEvtNoRestrictionModeOff )
{
ZREM_RestrictionModes0e1();
}
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_off( No 1 ) */
/****************************************/
static void ZREM_RestrictionModes1Event( void )
{
/*evt_restriction_mode_on*/
if( g_stm_event == StmEvtNoRestrictionModeOn )
{
ZREM_RestrictionModes1e0();
}
else
{
/*Else and default design have not done.*/
/*Please confirm the STM and design else and default.*/
}
}
/****************************************/
/* Event call function */
/* STM : RestrictionMode */
/****************************************/
void stm_rem_event_call( void )
{
stm_rem_start_stm();
switch( ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] )
{
case ZREM_RESTRICTIONMODES0:
ZREM_RestrictionModes0Event();
break;
case ZREM_RESTRICTIONMODES1:
ZREM_RestrictionModes1Event();
break;
default:
/*Not accessible to this else (default).*/
break;
}
}
/****************************************/
/* Initial function */
/* STM : RestrictionMode */
/****************************************/
void stm_rem_initialize( void )
{
ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODES1;
stm_rem_start_activity_restriction_mode_off();
}
/****************************************/
/* Terminate function */
/* STM : RestrictionMode */
/****************************************/
void ZREM_RestrictionModeTerminate( void )
{
ZREM_RestrictionModeState[ZREM_RESTRICTIONMODE] = ( uint8_t )ZREM_RESTRICTIONMODETERMINATE;
}
|