File: smtxlog.d

package info (click to toggle)
generator-scripting-language 4.1.5-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,424 kB
  • sloc: ansic: 106,060; cpp: 2,232; pascal: 762; sh: 535; xml: 424; makefile: 194
file content (300 lines) | stat: -rw-r--r-- 7,464 bytes parent folder | download | duplicates (3)
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
/*---------------------------------------------------------------------------*
 *  smtxlog.d - LIBERO dialog data definitions for smtxlog.c.                *
 *  Generated by LIBERO 2.4 on 11 Oct, 2010, 17:15.                          *
 *  Schema file used: smtschm.c.                                             *
 *---------------------------------------------------------------------------*/

/*- Symbolic constants and event numbers ------------------------------------*/

#define _LR_STOP                        0xFFFFL
#define _LR_NULL_EVENT                  -2
#define _LR_NULL_STATE                  -1
#define terminate_event                 -1
#define clear_event                     0
#define close_event                     1
#define concat_old_event                2
#define cycle_event                     3
#define cycle_now_event                 4
#define delete_old_event                5
#define error_event                     6
#define exception_event                 7
#define log_event                       8
#define move_old_event                  9
#define ok_event                        10
#define open_event                      11
#define process_old_event               12
#define put_event                       13
#define rename_old_event                14
#define shutdown_event                  15
#define timer_event                     16
#define _LR_STATE_after_init            0
#define _LR_STATE_before_opening        1
#define _LR_STATE_cycle_before_open     2
#define _LR_STATE_cycle_while_closed    3
#define _LR_STATE_logfile_open          4
#define _LR_STATE_defaults              5
#define _LR_defaults_state              5


/*- Function prototypes and macros ------------------------------------------*/

#ifndef MODULE
#define MODULE  static void             /*  Libero dialog modules            */
#endif

MODULE initialise_the_thread        (THREAD *thread);
MODULE create_event_queue           (THREAD *thread);
MODULE terminate_the_thread         (THREAD *thread);
MODULE get_logfile_parameters       (THREAD *thread);
MODULE build_log_filename           (THREAD *thread);
MODULE check_if_cycle_before_open   (THREAD *thread);
MODULE open_logfile_append          (THREAD *thread);
MODULE recalculate_cycle_timer      (THREAD *thread);
MODULE check_queued_events_if_any   (THREAD *thread);
MODULE check_cycle_method           (THREAD *thread);
MODULE delete_old_logfile           (THREAD *thread);
MODULE rename_old_logfile           (THREAD *thread);
MODULE open_logfile_create          (THREAD *thread);
MODULE move_old_logfile             (THREAD *thread);
MODULE concat_old_logfile           (THREAD *thread);
MODULE process_old_logfile          (THREAD *thread);
MODULE get_log_request_arguments    (THREAD *thread);
MODULE write_request_log_entry      (THREAD *thread);
MODULE free_log_request_arguments   (THREAD *thread);
MODULE write_plain_log_entry        (THREAD *thread);
MODULE close_logfile                (THREAD *thread);
MODULE flush_event_queue            (THREAD *thread);
MODULE check_if_cycle_while_open    (THREAD *thread);
MODULE destroy_event_queue          (THREAD *thread);

#define the_next_event              _the_next_event
#define the_exception_event         _the_exception_event
#define the_external_event          _the_external_event
#define exception_raised            _exception_raised
#define io_completed                _io_completed


/*- Static areas shared by all threads --------------------------------------*/

static word _LR_nextst [6][17] =
{
    { 0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0 },
    { 1,0,0,3,2,0,0,0,0,0,0,4,0,0,0,0,0 },
    { 0,0,4,0,0,4,0,0,0,4,0,0,4,0,4,0,0 },
    { 0,0,1,0,0,1,0,0,0,1,0,0,1,0,1,0,0 },
    { 4,1,0,2,2,0,0,0,4,0,0,0,0,4,0,0,4 },
    { 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 }
};

static word _LR_action [6][17] =
{
    { 0,0,0,0,0,0,2,0,0,0,1,0,0,0,0,0,0 },
    { 5,0,0,4,4,0,0,0,0,0,0,3,0,0,0,0,0 },
    { 0,0,9,0,0,7,0,0,0,8,0,0,10,0,6,0,0 },
    { 0,0,13,0,0,5,0,0,0,12,0,0,14,0,11,0,0 },
    { 18,19,0,17,17,0,0,0,15,0,0,0,0,16,0,0,20 },
    { 22,22,22,22,22,22,22,21,22,22,22,22,22,22,22,21,22 }
};

#if (defined (SMT_PROFILE))
static word _LR_count [23];
static long _LR_time  [23];
static word _LR_flow  [6][17];
#endif

static word _LR_offset [] =
{
    0,
    0,
    2,
    4,
    11,
    13,
    15,
    20,
    24,
    29,
    34,
    39,
    41,
    43,
    46,
    48,
    53,
    56,
    59,
    63,
    66,
    70,
    73
};

static word _LR_vector [] =
{
    0,_LR_STOP,
    1,_LR_STOP,
    2,3,4,5,6,7,_LR_STOP,
    8,_LR_STOP,
    9,_LR_STOP,
    10,5,6,7,_LR_STOP,
    11,6,7,_LR_STOP,
    12,5,6,7,_LR_STOP,
    13,5,6,7,_LR_STOP,
    14,11,6,7,_LR_STOP,
    10,_LR_STOP,
    12,_LR_STOP,
    13,9,_LR_STOP,
    14,_LR_STOP,
    15,16,17,7,_LR_STOP,
    18,7,_LR_STOP,
    19,8,_LR_STOP,
    19,11,7,_LR_STOP,
    19,20,_LR_STOP,
    21,6,7,_LR_STOP,
    22,1,_LR_STOP,
    _LR_STOP
};

static HOOK *_LR_module [23] = {
    create_event_queue,
    terminate_the_thread,
    get_logfile_parameters,
    build_log_filename,
    check_if_cycle_before_open,
    open_logfile_append,
    recalculate_cycle_timer,
    check_queued_events_if_any,
    check_cycle_method,
    delete_old_logfile,
    rename_old_logfile,
    open_logfile_create,
    move_old_logfile,
    concat_old_logfile,
    process_old_logfile,
    get_log_request_arguments,
    write_request_log_entry,
    free_log_request_arguments,
    write_plain_log_entry,
    close_logfile,
    flush_event_queue,
    check_if_cycle_while_open,
    destroy_event_queue
};

#if (defined (DEBUG))
static char *_LR_mname [23] =
{
     "Create-Event-Queue",
     "Terminate-The-Thread",
     "Get-Logfile-Parameters",
     "Build-Log-Filename",
     "Check-If-Cycle-Before-Open",
     "Open-Logfile-Append",
     "Recalculate-Cycle-Timer",
     "Check-Queued-Events-If-Any",
     "Check-Cycle-Method",
     "Delete-Old-Logfile",
     "Rename-Old-Logfile",
     "Open-Logfile-Create",
     "Move-Old-Logfile",
     "Concat-Old-Logfile",
     "Process-Old-Logfile",
     "Get-Log-Request-Arguments",
     "Write-Request-Log-Entry",
     "Free-Log-Request-Arguments",
     "Write-Plain-Log-Entry",
     "Close-Logfile",
     "Flush-Event-Queue",
     "Check-If-Cycle-While-Open",
     "Destroy-Event-Queue"
};

static char *_LR_sname [6] =
{
     "After-Init",
     "Before-Opening",
     "Cycle-Before-Open",
     "Cycle-While-Closed",
     "Logfile-Open",
     "Defaults"
};

static char *_LR_ename [17] =
{
     "Clear-Event",
     "Close-Event",
     "Concat-Old-Event",
     "Cycle-Event",
     "Cycle-Now-Event",
     "Delete-Old-Event",
     "Error-Event",
     "Exception-Event",
     "Log-Event",
     "Move-Old-Event",
     "Ok-Event",
     "Open-Event",
     "Process-Old-Event",
     "Put-Event",
     "Rename-Old-Event",
     "Shutdown-Event",
     "Timer-Event"
};
#else
static char *_LR_mname [23] =
{
     "0",
     "1",
     "2",
     "3",
     "4",
     "5",
     "6",
     "7",
     "8",
     "9",
     "10",
     "11",
     "12",
     "13",
     "14",
     "15",
     "16",
     "17",
     "18",
     "19",
     "20",
     "21",
     "22"
};

static char *_LR_sname [6] =
{
     "0",
     "1",
     "2",
     "3",
     "4",
     "5"
};

static char *_LR_ename [17] =
{
     "0",
     "1",
     "2",
     "3",
     "4",
     "5",
     "6",
     "7",
     "8",
     "9",
     "10",
     "11",
     "12",
     "13",
     "14",
     "15",
     "16"
};
#endif