simpleCommunicator_priv.hΒΆ

Generated using fsm -te simpleCommunicator.fsm

/**
        simpleCommunicator_priv.h

        This file automatically generated by FSMLang
*/

#ifndef _SIMPLECOMMUNICATOR_PRIV_H_
#define _SIMPLECOMMUNICATOR_PRIV_H_

#include "simpleCommunicator.h"

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


#ifdef SIMPLE_COMMUNICATOR_DEBUG
extern char *SIMPLE_COMMUNICATOR_EVENT_NAMES[];
extern char *SIMPLE_COMMUNICATOR_STATE_NAMES[];
#endif

typedef enum {
    simpleCommunicator_IDLE
    , simpleCommunicator_AWAITING_ACK
}  SIMPLE_COMMUNICATOR_STATE;

typedef struct _simpleCommunicator_struct_ SIMPLE_COMMUNICATOR;
#undef FSM_TYPE_PTR
#define FSM_TYPE_PTR pSIMPLE_COMMUNICATOR
extern SIMPLE_COMMUNICATOR simpleCommunicator;

typedef SIMPLE_COMMUNICATOR_EVENT (*SIMPLE_COMMUNICATOR_ACTION_FN)(FSM_TYPE_PTR);

typedef void (*SIMPLE_COMMUNICATOR_FSM)(FSM_TYPE_PTR,SIMPLE_COMMUNICATOR_EVENT);

void simpleCommunicatorFSM(FSM_TYPE_PTR,SIMPLE_COMMUNICATOR_EVENT);

#define simpleCommunicator_numMachineEvents 2
struct _simpleCommunicator_struct_ {
    SIMPLE_COMMUNICATOR_STATE         state;
    SIMPLE_COMMUNICATOR_EVENT         event;
    SIMPLE_COMMUNICATOR_ACTION_FN const (*eventsArray)[simpleCommunicator_numMachineEvents];
    SIMPLE_COMMUNICATOR_FSM           fsm;
};

ACTION_RETURN_TYPE simpleCommunicator_sendMessage(FSM_TYPE_PTR);
ACTION_RETURN_TYPE simpleCommunicator_queueMessage(FSM_TYPE_PTR);
ACTION_RETURN_TYPE simpleCommunicator_checkQueue(FSM_TYPE_PTR);



#endif