/*---------------------------------------------------------------------------* * xilrwp.d - LIBERO dialog data definitions for xilrwp.c. * * Generated by LIBERO 2.4 on 22 Jul, 2004, 16:52. * * 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 challenge_peer_event 0 #define exception_event 1 #define fatal_event 2 #define finished_event 3 #define lrwp_request_event 4 #define master_event 5 #define peer_event 6 #define peer_accepted_event 7 #define peer_closed_event 8 #define peer_job_completed_event 9 #define protocol_error_event 10 #define router_event 11 #define shutdown_event 12 #define sock_closed_event 13 #define sock_error_event 14 #define sock_input_ok_event 15 #define sock_write_ok_event 16 #define startup_error_event 17 #define wsx_request_event 18 #define _LR_STATE_after_init 0 #define _LR_STATE_master_input 1 #define _LR_STATE_peer_startup 2 #define _LR_STATE_peer_negotiation 3 #define _LR_STATE_receive_negotiation_response_size 4 #define _LR_STATE_receive_negotiation_response 5 #define _LR_STATE_waiting_for_request 6 #define _LR_STATE_waiting_for_peer_response 7 #define _LR_STATE_wait_for_peer_data_block 8 #define _LR_STATE_wait_for_router_request 9 #define _LR_STATE_defaults 10 #define _LR_defaults_state 10 /*- Function prototypes and macros ------------------------------------------*/ #ifndef MODULE #define MODULE static void /* Libero dialog modules */ #endif MODULE initialise_the_thread (THREAD *thread); MODULE open_master_socket (THREAD *thread); MODULE wait_for_socket_input (THREAD *thread); MODULE setup_router (THREAD *thread); MODULE accept_peer_connection (THREAD *thread); MODULE read_app_connection_request (THREAD *thread); MODULE terminate_the_thread (THREAD *thread); MODULE register_peer (THREAD *thread); MODULE send_peer_acknowledgement (THREAD *thread); MODULE send_peer_negotiation_challenge (THREAD *thread); MODULE signal_startup_error (THREAD *thread); MODULE signal_peer_closed (THREAD *thread); MODULE read_peer_data_size (THREAD *thread); MODULE send_error_reply (THREAD *thread); MODULE signal_socket_error (THREAD *thread); MODULE read_peer_data (THREAD *thread); MODULE check_peer_negotiation_response (THREAD *thread); MODULE send_request_data_to_peer (THREAD *thread); MODULE send_peer_data_to_xitami (THREAD *thread); MODULE cleanup_and_inform_router (THREAD *thread); MODULE find_available_peer (THREAD *thread); MODULE check_for_saved_requests (THREAD *thread); MODULE check_if_all_gone (THREAD *thread); MODULE shutdown_the_application (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 [11][19] = { { 0,0,0,0,0,1,2,0,0,0,0,9,0,0,0,0,0,0,0 }, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0 }, { 0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,3,0,0,0 }, { 4,0,0,0,0,0,0,6,0,0,0,0,0,3,0,0,0,3,0 }, { 0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,5,0,0,0 }, { 0,0,0,3,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0 }, { 0,0,0,0,7,0,0,0,0,0,0,0,0,6,6,6,0,6,0 }, { 0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,8,7,0,0 }, { 0,0,0,6,0,0,0,0,0,0,0,0,0,8,8,8,0,0,0 }, { 0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,9 }, { 0,10,10,0,0,0,0,0,0,0,10,0,10,10,10,0,0,0,0 } }; static word _LR_action [11][19] = { { 0,0,0,0,0,1,2,0,0,0,0,3,0,0,0,0,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,0,0,0,0,0,6,0,5,0,0,0 }, { 8,0,0,0,0,0,0,7,0,0,0,0,0,10,0,0,0,9,0 }, { 0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,11,0,0,0 }, { 0,0,0,15,0,0,0,0,0,0,0,0,0,12,13,14,0,0,0 }, { 0,0,0,0,16,0,0,0,0,0,0,0,0,10,17,10,0,9,0 }, { 0,0,0,0,0,0,0,0,0,0,0,0,0,19,13,11,18,0,0 }, { 0,0,0,20,0,0,0,0,0,0,0,0,0,19,13,14,0,0,0 }, { 0,0,0,0,0,0,0,0,23,22,0,0,0,0,0,0,0,0,21 }, { 0,6,24,0,0,0,0,0,0,0,6,0,6,25,25,0,0,0,0 } }; static word _LR_offset [] = { 0, 0, 3, 5, 7, 10, 12, 14, 18, 21, 24, 27, 30, 33, 38, 41, 43, 46, 50, 51, 55, 59, 61, 63, 65, 68 }; static word _LR_vector [] = { 0,1,_LR_STOP, 1,_LR_STOP, 2,_LR_STOP, 3,1,_LR_STOP, 4,_LR_STOP, 5,_LR_STOP, 6,7,1,_LR_STOP, 8,1,_LR_STOP, 9,5,_LR_STOP, 10,5,_LR_STOP, 11,1,_LR_STOP, 12,10,_LR_STOP, 12,13,10,5,_LR_STOP, 14,1,_LR_STOP, 15,_LR_STOP, 16,1,_LR_STOP, 13,10,5,_LR_STOP, _LR_STOP, 12,10,5,_LR_STOP, 17,18,1,_LR_STOP, 19,_LR_STOP, 20,_LR_STOP, 21,_LR_STOP, 22,5,_LR_STOP, 13,5,_LR_STOP }; static HOOK *_LR_module [23] = { open_master_socket, wait_for_socket_input, setup_router, accept_peer_connection, read_app_connection_request, terminate_the_thread, register_peer, send_peer_acknowledgement, send_peer_negotiation_challenge, signal_startup_error, signal_peer_closed, read_peer_data_size, send_error_reply, signal_socket_error, read_peer_data, check_peer_negotiation_response, send_request_data_to_peer, send_peer_data_to_xitami, cleanup_and_inform_router, find_available_peer, check_for_saved_requests, check_if_all_gone, shutdown_the_application }; #if (defined (DEBUG)) static char *_LR_mname [23] = { "Open-Master-Socket", "Wait-For-Socket-Input", "Setup-Router", "Accept-Peer-Connection", "Read-App-Connection-Request", "Terminate-The-Thread", "Register-Peer", "Send-Peer-Acknowledgement", "Send-Peer-Negotiation-Challenge", "Signal-Startup-Error", "Signal-Peer-Closed", "Read-Peer-Data-Size", "Send-Error-Reply", "Signal-Socket-Error", "Read-Peer-Data", "Check-Peer-Negotiation-Response", "Send-Request-Data-To-Peer", "Send-Peer-Data-To-Xitami", "Cleanup-And-Inform-Router", "Find-Available-Peer", "Check-For-Saved-Requests", "Check-If-All-Gone", "Shutdown-The-Application" }; static char *_LR_sname [11] = { "After-Init", "Master-Input", "Peer-Startup", "Peer-Negotiation", "Receive-Negotiation-Response-Size", "Receive-Negotiation-Response", "Waiting-For-Request", "Waiting-For-Peer-Response", "Wait-For-Peer-Data-Block", "Wait-For-Router-Request", "Defaults" }; static char *_LR_ename [19] = { "Challenge-Peer-Event", "Exception-Event", "Fatal-Event", "Finished-Event", "Lrwp-Request-Event", "Master-Event", "Peer-Event", "Peer-Accepted-Event", "Peer-Closed-Event", "Peer-Job-Completed-Event", "Protocol-Error-Event", "Router-Event", "Shutdown-Event", "Sock-Closed-Event", "Sock-Error-Event", "Sock-Input-Ok-Event", "Sock-Write-Ok-Event", "Startup-Error-Event", "Wsx-Request-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 [11] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }; static char *_LR_ename [19] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18" }; #endif