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 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
|
/*---------------------------------------------------------------------------*
* smtsock.d - LIBERO dialog data definitions for smtsock.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 activity_event 0
#define close_event 1
#define closed_event 2
#define connect_event 3
#define error_event 4
#define exception_event 5
#define fatal_event 6
#define finished_event 7
#define flush_event 8
#define incomplete_event 9
#define input_event 10
#define no_active_request_event 11
#define ok_event 12
#define output_event 13
#define read_event 14
#define readh_event 15
#define readr_event 16
#define readrh_event 17
#define shutdown_event 18
#define timeout_event 19
#define write_event 20
#define writeh_event 21
#define _LR_STATE_after_init 0
#define _LR_STATE_getting_event 1
#define _LR_STATE_socket_activity 2
#define _LR_STATE_after_activity 3
#define _LR_STATE_defaults 4
#define _LR_defaults_state 4
/*- Function prototypes and macros ------------------------------------------*/
#ifndef MODULE
#define MODULE static void /* Libero dialog modules */
#endif
MODULE initialise_the_thread (THREAD *thread);
MODULE schedule_non_blocking_select (THREAD *thread);
MODULE terminate_the_thread (THREAD *thread);
MODULE create_read_request (THREAD *thread);
MODULE create_huge_read_request (THREAD *thread);
MODULE create_read_repeat_request (THREAD *thread);
MODULE create_huge_read_repeat_request (THREAD *thread);
MODULE create_write_request (THREAD *thread);
MODULE create_huge_write_request (THREAD *thread);
MODULE create_input_request (THREAD *thread);
MODULE create_output_request (THREAD *thread);
MODULE create_connect_request (THREAD *thread);
MODULE create_close_request (THREAD *thread);
MODULE flush_socket_requests (THREAD *thread);
MODULE find_timed_out_request (THREAD *thread);
MODULE reply_timeout_to_request (THREAD *thread);
MODULE check_first_socket_activity (THREAD *thread);
MODULE generate_request_type_event (THREAD *thread);
MODULE write_data_to_socket (THREAD *thread);
MODULE reply_ok_to_request (THREAD *thread);
MODULE check_next_socket_activity (THREAD *thread);
MODULE read_data_from_socket (THREAD *thread);
MODULE close_the_socket (THREAD *thread);
MODULE confirm_socket_connected (THREAD *thread);
MODULE process_socket_exception (THREAD *thread);
MODULE reply_closed_to_all_requests (THREAD *thread);
MODULE reply_error_to_all_requests (THREAD *thread);
MODULE request_shutdown (THREAD *thread);
MODULE destroy_all_requests (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 [5][22] =
{
{ 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0 },
{ 2,1,0,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,0,1,1,1 },
{ 0,2,0,3,0,2,0,0,0,0,2,1,0,2,3,0,0,0,0,0,3,0 },
{ 0,0,2,0,2,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0 }
};
static word _LR_action [5][22] =
{
{ 0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0 },
{ 15,12,0,11,0,0,0,0,13,0,9,0,0,10,3,4,5,6,0,14,7,8 },
{ 0,19,0,20,0,21,0,0,0,0,17,1,0,17,18,0,0,0,0,0,16,0 },
{ 0,0,23,0,24,0,0,17,0,22,0,0,0,0,0,0,0,0,0,0,0,0 },
{ 0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0 }
};
#if (defined (SMT_PROFILE))
static word _LR_count [28];
static long _LR_time [28];
static word _LR_flow [5][22];
#endif
static word _LR_offset [] =
{
0,
0,
2,
4,
6,
8,
10,
12,
14,
16,
18,
20,
22,
24,
26,
29,
32,
34,
38,
40,
44,
46,
50,
53,
57,
61,
65
};
static word _LR_vector [] =
{
0,_LR_STOP,
1,_LR_STOP,
2,_LR_STOP,
3,_LR_STOP,
4,_LR_STOP,
5,_LR_STOP,
6,_LR_STOP,
7,_LR_STOP,
8,_LR_STOP,
9,_LR_STOP,
10,_LR_STOP,
11,_LR_STOP,
12,_LR_STOP,
13,14,_LR_STOP,
15,16,_LR_STOP,
17,_LR_STOP,
18,19,16,_LR_STOP,
20,_LR_STOP,
21,19,16,_LR_STOP,
22,_LR_STOP,
23,19,16,_LR_STOP,
19,16,_LR_STOP,
24,19,16,_LR_STOP,
25,19,16,_LR_STOP,
26,27,1,_LR_STOP,
27,1,_LR_STOP
};
static HOOK *_LR_module [28] = {
schedule_non_blocking_select,
terminate_the_thread,
create_read_request,
create_huge_read_request,
create_read_repeat_request,
create_huge_read_repeat_request,
create_write_request,
create_huge_write_request,
create_input_request,
create_output_request,
create_connect_request,
create_close_request,
flush_socket_requests,
find_timed_out_request,
reply_timeout_to_request,
check_first_socket_activity,
generate_request_type_event,
write_data_to_socket,
reply_ok_to_request,
check_next_socket_activity,
read_data_from_socket,
close_the_socket,
confirm_socket_connected,
process_socket_exception,
reply_closed_to_all_requests,
reply_error_to_all_requests,
request_shutdown,
destroy_all_requests
};
#if (defined (DEBUG))
static char *_LR_mname [28] =
{
"Schedule-Non-Blocking-Select",
"Terminate-The-Thread",
"Create-Read-Request",
"Create-Huge-Read-Request",
"Create-Read-Repeat-Request",
"Create-Huge-Read-Repeat-Request",
"Create-Write-Request",
"Create-Huge-Write-Request",
"Create-Input-Request",
"Create-Output-Request",
"Create-Connect-Request",
"Create-Close-Request",
"Flush-Socket-Requests",
"Find-Timed-Out-Request",
"Reply-Timeout-To-Request",
"Check-First-Socket-Activity",
"Generate-Request-Type-Event",
"Write-Data-To-Socket",
"Reply-Ok-To-Request",
"Check-Next-Socket-Activity",
"Read-Data-From-Socket",
"Close-The-Socket",
"Confirm-Socket-Connected",
"Process-Socket-Exception",
"Reply-Closed-To-All-Requests",
"Reply-Error-To-All-Requests",
"Request-Shutdown",
"Destroy-All-Requests"
};
static char *_LR_sname [5] =
{
"After-Init",
"Getting-Event",
"Socket-Activity",
"After-Activity",
"Defaults"
};
static char *_LR_ename [22] =
{
"Activity-Event",
"Close-Event",
"Closed-Event",
"Connect-Event",
"Error-Event",
"Exception-Event",
"Fatal-Event",
"Finished-Event",
"Flush-Event",
"Incomplete-Event",
"Input-Event",
"No-Active-Request-Event",
"Ok-Event",
"Output-Event",
"Read-Event",
"Readh-Event",
"Readr-Event",
"Readrh-Event",
"Shutdown-Event",
"Timeout-Event",
"Write-Event",
"Writeh-Event"
};
#else
static char *_LR_mname [28] =
{
"0",
"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"
};
static char *_LR_sname [5] =
{
"0",
"1",
"2",
"3",
"4"
};
static char *_LR_ename [22] =
{
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21"
};
#endif
|