package pluginreceiver;
import pluginreceiver.model.XPlaneDataPacketDecoder;
import pluginreceiver.model.XPlaneSimDataRepository;
import pluginreceiver.model.XPlaneUDPReceiver;
import pluginreceiver.gui.*;
/**
*
* @author nicATC
*/
public class PluginReceiver {
private static final String RELEASE = "0.1";
private int port;
public IGUI gui;
/**
*
* @param panel the panel the Decoder should be attached on
* @param portNumber the Port the application should listen on
* @throws java.lang.Exception
*/
public PluginReceiver(PluginReceiverPanel panel, int portNumber) throws Exception {
this.port = portNumber;
XPlaneUDPReceiver udp_receiver = new XPlaneUDPReceiver(port);
XPlaneDataPacketDecoder decoder = new XPlaneDataPacketDecoder(panel);
udp_receiver.add_reception_observer(decoder);
XPlaneSimDataRepository.source_is_recording = false;
udp_receiver.start();
}
}