/** * */ package org.josast.SIDS.app; import java.util.GregorianCalendar; import org.apache.log4j.BasicConfigurator; import org.josast.SIDS.HttpPostSIDS; import org.josast.SIDS.SIDSData; import org.josast.SIDS.Station; /** * @author chris * */ public class TestSIDS { private TestSIDS() { //This prevents the default parameter-less constructor from being used elsewhere in the code. } /** * @param args */ public static void main(String[] args) { BasicConfigurator.configure(); String url = "https://db.satnogs.org/api/telemetry/"; // String url = "http://127.0.0.1:9000/echoPost"; // String url = "https://amsat.electrolab.fr/SIDS"; HttpPostSIDS client = new HttpPostSIDS(url); SIDSData sids = new SIDSData(); sids.setStation(new Station()); sids.setNoradID(99999); sids.setTelemetryData(GregorianCalendar.getInstance().getTime(), "A0AEA682A864E0A0AEA682A8646103F024000040EF07006402660217000045"); System.out.println(sids.toStringBasic()); int result = client.SendSIDSBasic(sids); System.out.println("resutats = " + result); System.out.println("resutats = " + client.getResult()); } }