#include <iostream>
#include <string>
using namespace std;

#include "CPFcpp.hpp"
#include "BuoyancyEngine.hpp"

class Recovery : public StateBase
{
public: 
	Recovery(string stateid, int32_t timeout = 0);

	void doStateEntryActions();
	StateNames doStateActions();
	StateNames checkEvents();
	void doStateExit(bool timeout);
	
private:
	enum SubStates
	{
		getPosition,
		getPositionWFR,
		sendSBD,
		sendSBD_WFR		
	};
	
	BuoyancyEngine BEngine;
	
	RecoveryStateConfig StateConfig;
	
	//TODO this should probably be in StateBase class along with some kind of SubStates placeholder
	SubStates currentSubState = getPosition;
	StateNames nextState = recovery;
};