package org.josast.EntrysatDecoder;


import org.josast.SIDS.HttpPostSIDS;
import org.josast.SIDS.SIDSData;
import org.josast.SIDS.Station;

/**
 * 
 * @author christophe
 *
 */
public class SendSIDS {
	
	SIDSData sids = new SIDSData();
	HttpPostSIDS client;
	
	public  SendSIDS ( Station station, int norad, String url)
	{
		sids.setStation(station);
		sids.setNoradID(norad);
		client = new HttpPostSIDS(url);
		
		
	}
	
	public int Send(EntryFrame data)
	{
		//BasicConfigurator.configure();

		sids.setTelemetryData(data.getTime(),data.getFrame().toString());
		System.out.println(sids.toStringBasic());
		int result = client.SendSIDSBasic(sids);
		return result;

	}

}
