establishSession_priv.hΒΆ

/**
        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_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
#undef STATE
#define STATE(A) establishSession_##A

#ifdef HSM_COMMUNICATOR_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_data_struct_ ESTABLISH_SESSION_DATA, *pESTABLISH_SESSION_DATA;
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_ENUM (*ESTABLISH_SESSION_ACTION_FN)(FSM_TYPE_PTR);

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

struct _establishSession_data_struct_ {
        msg_e_t current_msg;
};

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

static const ESTABLISH_SESSION_STATE_FN establishSession_state_fn_array[establishSession_numStates];

struct _establishSession_struct_ {
        ESTABLISH_SESSION_DATA             data;
        ESTABLISH_SESSION_STATE            state;
        HSM_COMMUNICATOR_EVENT_ENUM        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);
ACTION_RETURN_TYPE hsmCommunicator_establishSession_parseMessage(FSM_TYPE_PTR);

void hsmCommunicator_establishSession_copy_current_message(pHSM_COMMUNICATOR_DATA);

#endif