package cz.vutbr.feec.sim.ha;

import cz.vutbr.feec.packets.ttp.FTDPacket;
import cz.vutbr.feec.packets.ttp.FTIPacket;
import cz.vutbr.feec.packets.ttp.FTSPacket;
import cz.vutbr.feec.simlib.net.*;

public interface IHostState {
	
	FTDPacket getFTDpacket();
	FTIPacket getFTIpacket();
	FTSPacket getFTSpacket();
	
	void setFTDpacket(int version, int packetType, long fbTreeID, int length, long FTport, 
			int height, int status, int reserved, long fbGroupSize, long reserved2 );
	
	void setFTIpacket(int version, int packetType, long fbTreeID, int length, 
			long FTport, int infoStat, int param);
	
	
	int getStatusOfFT();
	
	void setStatusOfFT(int stat);
	
	int getHeightoTree();

	InetAddress getSendIPAddr();
	InetAddress getUnicastAddr();
	InetAddress getMulticastAddr();
	
	int getNumofR();
	
	long getPortInOfNextFT();
	long getPortOut();
	long getPortIn();
	long getPortMulticast();
	
	int getIntervalToSend();
	
	int getID();
	
	boolean readyToSendFTI();
	boolean readyToSendFTD();
	boolean readyToSendFTS();
	
	void statOfSendFTI(boolean status);
	void statOfSendFTD(boolean status);
	void statOfSendFTS(boolean status);
	
	int getNumberOfFTIsent();
	int getNumberOfFTDsent();
	int getNumberOfFTSsent();
	
	int getNumberOfFTIreceived();
	int getNumberOfFTDreceived();
	int getNumberOfFTSreceived();
	
	void clearNumberofFTIsend();
	void clearNumberofFTDsend();
	void clearNumberofFTSsend();
	
	void clearNumberofFTIreceived();
	void clearNumberofFTDreceived();
	void clearNumberofFTSreceived();
	
	void addFTIsend();
	void addFTDsend();
	void addFTSsend();
	
	void addFTIreceived();
	void addFTDreceived();
	void addFTSreceived();
	
	boolean isActive();
	
	void setActive(int act);
	void setID(int id);
	void setIntervalToSend(int time);
	void receiveMessage();
	void sendMessage();
	void setMulticastAddr(InetAddress addr);
	void setUnicastAddr(InetAddress addr);
	void setSendIPAddr(InetAddress addr);
	void setHeightoTree(int height);
	void setNumofR(int N);
	void setPortInOfNextFT(long port);
	void setPortOut(long port);
	void setPortIn(long port);
	void setPortMulticast(long port);
	
}
