/**
	establishSession_priv.h

	This file automatically generated by FSMLang
*/

#ifndef _ESTABLISHSESSION_PRIV_H_
#define _ESTABLISHSESSION_PRIV_H_

#include "hsmCommunicator_submach.h"
#include "hsmCommunicator.h"

#ifdef ESTABLISH_SESSION_DEBUG
#include <stdio.h>
#include <stdlib.h>
#endif

/*
	sub-machine events are included in the top-level machine event enumeration.
	These macros set the appropriate names for events from THIS machine
	and those from the PARENT machine.

	They may be turned off as needed.
*/
#ifndef NO_EVENT_CONVENIENCE_MACROS
#undef UFMN
#define UFMN(A) hsmCommunicator_establishSession_##A
#undef THIS
#define THIS(A) hsmCommunicator_establishSession_##A
#undef PARENT
#define PARENT(A) hsmCommunicator_##A
#endif

#ifdef ESTABLISH_SESSION_DEBUG
extern char *ESTABLISH_SESSION_EVENT_NAMES[];
extern char *ESTABLISH_SESSION_STATE_NAMES[];
#endif

typedef enum {
	establishSession_IDLE
	, establishSession_AWAITING_RESPONSE
	, establishSession_numStates
}  ESTABLISH_SESSION_STATE;

typedef struct _establishSession_struct_ ESTABLISH_SESSION, *pESTABLISH_SESSION;
#undef FSM_TYPE_PTR
#define FSM_TYPE_PTR pESTABLISH_SESSION
extern ESTABLISH_SESSION establishSession;

extern pESTABLISH_SESSION pestablishSession;

typedef HSM_COMMUNICATOR_EVENT (*ESTABLISH_SESSION_ACTION_FN)(FSM_TYPE_PTR);

typedef HSM_COMMUNICATOR_EVENT (*ESTABLISH_SESSION_FSM)(FSM_TYPE_PTR,HSM_COMMUNICATOR_EVENT);

typedef ACTION_RETURN_TYPE (*ESTABLISH_SESSION_STATE_FN)(pESTABLISH_SESSION,HSM_COMMUNICATOR_EVENT);

static const ESTABLISH_SESSION_STATE_FN establishSession_state_fn_array[establishSession_numStates];

struct _establishSession_struct_ {
	ESTABLISH_SESSION_STATE           state;
	HSM_COMMUNICATOR_EVENT            event;
	ESTABLISH_SESSION_STATE_FN  const (*statesArray)[establishSession_numStates];
	ESTABLISH_SESSION_FSM             fsm;
};


ACTION_RETURN_TYPE hsmCommunicator_establishSession_sendStep0Message(FSM_TYPE_PTR);
ACTION_RETURN_TYPE hsmCommunicator_establishSession_sendStep1Message(FSM_TYPE_PTR);
ACTION_RETURN_TYPE hsmCommunicator_establishSession_notifyParent(FSM_TYPE_PTR);


#endif