/*---------------------------------------------------------------------------*
 *  gggsl.d - LIBERO dialog data definitions for gggsl.c.                    *
 *  Generated by LIBERO 2.4 on 11 Oct, 2010, 17:16.                          *
 *  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 error_event                     0
#define execute_event                   1
#define fatal_event                     2
#define message_event                   3
#define ok_event                        4
#define shutdown_event                  5
#define _LR_STATE_starting              0
#define _LR_STATE_executing             1
#define _LR_STATE_defaults              2
#define _LR_defaults_state              2


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

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

MODULE initialise_the_thread        (THREAD *thread);
MODULE return_done                  (THREAD *thread);
MODULE terminate_the_thread         (THREAD *thread);
MODULE forward_message_as_call_message (THREAD *thread);
MODULE forward_message_as_call_error (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 [3][6] =
{
    { 0,1,0,0,0,0 },
    { 1,0,1,1,1,0 },
    { 0,0,0,0,0,2 }
};

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

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

static word _LR_offset [] =
{
    0,
    0,
    1,
    4,
    6,
    9
};

static word _LR_vector [] =
{
    _LR_STOP,
    0,1,_LR_STOP,
    2,_LR_STOP,
    3,1,_LR_STOP,
    1,_LR_STOP
};

static HOOK *_LR_module [4] = {
    return_done,
    terminate_the_thread,
    forward_message_as_call_message,
    forward_message_as_call_error
};

#if (defined (DEBUG))
static char *_LR_mname [4] =
{
     "Return-Done",
     "Terminate-The-Thread",
     "Forward-Message-As-Call-Message",
     "Forward-Message-As-Call-Error"
};

static char *_LR_sname [3] =
{
     "Starting",
     "Executing",
     "Defaults"
};

static char *_LR_ename [6] =
{
     "Error-Event",
     "Execute-Event",
     "Fatal-Event",
     "Message-Event",
     "Ok-Event",
     "Shutdown-Event"
};
#else
static char *_LR_mname [4] =
{
     "0",
     "1",
     "2",
     "3"
};

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

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