/**
 * @file fsm.h
 *
 * @brief This file contains function prototypes and data definitions that
 * helps to state machine state change
*/
#ifndef FSM_H_
#define FSM_H_

#include "tc_tm_sample.h"

// state of FIle transfer
typedef enum
{
	FT_Inactive,
	FT_Init,
    FT_Idle_State,
	FT_Waitfor_FTSR,
	FT_Send_Upload_Request,
	FT_Wait_for_2sec,
	FT_Segmentation,
	FT_Sequence_Transmission,
	FT_Receive_Sequence,
	FT_Report_Sequence_loss,
	FT_Report_Head_Change,
	FT_Suspended,
	FT_Resumed,

    Input_State,
    Send_Upload_Request_State,
    Send_Download_Request_State,
    Waitfor_Upload_ack_State,
    Waitfor_Download_ack_State,
    Send_Download_ack_State,
    Segmentation_State,
	Send_Dwnld_Response_State,
	Read_Upload_Status_State,
	Decode_ftci_frame,
	Process_ftds_frame,
	Process_ftsr_frame,
	Transfer_Cancel_State,
	Sender_Head_Change_Request = 18
} eSystemState;


void ft_fsm_change_state(eSystemState set);
eSystemState ft_fsm_read_state();
void print_current_fsmstate(void);

#endif /* FSM_H_ */
