/**
 * @file fsm.c
 *
 * @brief This file contains functions that provides demonstration of
 *        usage of state machine state change APIs
 *
 * The functions provided in the file provides demonstration on
 * usage of state machine state change APIs
 */
#include "fsm.h"
#include "stdio.h"

eSystemState eState = FT_Init;

void ft_fsm_change_state(eSystemState set)
{
	eState = set;
}

eSystemState ft_fsm_read_state()
{
	return eState;
}



void print_current_fsmstate(void)
{
	switch (eState)
	{

		case FT_Init:
			printf("FSM : FT_Init\n");
			break;

		case FT_Idle_State:
			printf("FSM : FT_Idle_State\n");

			break;

		case FT_Send_Upload_Request:
			printf("FSM : FT_Send_Upload_Request\n");
			break;

		case FT_Segmentation:
			printf("FSM : FT_Segmentation\n");
			break;

		case FT_Sequence_Transmission:
			printf("FSM : FT_Sequence_Transmission\n");
			break;

		case FT_Waitfor_FTSR:
			printf("FSM : FT_Waitfor_FTSR\n");
			break;

		case FT_Suspended:
			printf("FSM : FT_Suspended\n");
		break;

		case FT_Resumed:
			printf("FSM : FT_Resumed\n");
			break;

		default:
			break;
	}
}
