/**
sendMessage_priv.h
This file automatically generated by FSMLang
*/
#ifndef _SENDMESSAGE_PRIV_H_
#define _SENDMESSAGE_PRIV_H_
#include "hsmCommunicator_submach.h"
#include "hsmCommunicator.h"
#ifdef SEND_MESSAGE_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_sendMessage_##A
#undef THIS
#define THIS(A) hsmCommunicator_sendMessage_##A
#undef PARENT
#define PARENT(A) hsmCommunicator_##A
#endif
#undef STATE
#define STATE(A) sendMessage_##A
#ifdef HSM_COMMUNICATOR_SEND_MESSAGE_DEBUG
extern char *SEND_MESSAGE_EVENT_NAMES[];
extern char *SEND_MESSAGE_STATE_NAMES[];
#endif
typedef enum {
sendMessage_UNINITIALIZED
, sendMessage_IDLE
, sendMessage_AWAITING_ACK
, sendMessage_numStates
} SEND_MESSAGE_STATE;
typedef struct _sendMessage_data_struct_ SEND_MESSAGE_DATA, *pSEND_MESSAGE_DATA;
typedef struct _sendMessage_struct_ SEND_MESSAGE, *pSEND_MESSAGE;
#undef FSM_TYPE_PTR
#define FSM_TYPE_PTR pSEND_MESSAGE
extern SEND_MESSAGE sendMessage;
extern pSEND_MESSAGE psendMessage;
typedef HSM_COMMUNICATOR_EVENT_ENUM (*SEND_MESSAGE_ACTION_FN)(FSM_TYPE_PTR);
typedef HSM_COMMUNICATOR_EVENT_ENUM (*SEND_MESSAGE_FSM)(FSM_TYPE_PTR,HSM_COMMUNICATOR_EVENT_ENUM);
struct _sendMessage_data_struct_ {
msg_e_t current_msg;
queue_str_t * pqueue;
};
typedef ACTION_RETURN_TYPE (*SEND_MESSAGE_STATE_FN)(pSEND_MESSAGE,HSM_COMMUNICATOR_EVENT_ENUM);
static const SEND_MESSAGE_STATE_FN sendMessage_state_fn_array[sendMessage_numStates];
struct _sendMessage_struct_ {
SEND_MESSAGE_DATA data;
SEND_MESSAGE_STATE state;
HSM_COMMUNICATOR_EVENT_ENUM event;
SEND_MESSAGE_STATE_FN const (*statesArray)[sendMessage_numStates];
SEND_MESSAGE_FSM fsm;
};
ACTION_RETURN_TYPE hsmCommunicator_sendMessage_sendMessage(FSM_TYPE_PTR);
ACTION_RETURN_TYPE hsmCommunicator_sendMessage_checkQueue(FSM_TYPE_PTR);
ACTION_RETURN_TYPE hsmCommunicator_sendMessage_parseMessage(FSM_TYPE_PTR);
void hsmCommunicator_sendMessage_init_data(pHSM_COMMUNICATOR_DATA);
void hsmCommunicator_sendMessage_copy_current_message(pHSM_COMMUNICATOR_DATA);
#endif