OpenCores
URL https://opencores.org/ocsvn/fpga-cf/fpga-cf/trunk

Subversion Repositories fpga-cf

[/] [fpga-cf/] [trunk/] [java/] [src/] [edu/] [byu/] [cc/] [plieber/] [fpgaenet/] [modmod/] [ConnectionWidget.java] - Diff between revs 2 and 7

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 7
Line 43... Line 43...
        private void fillWidgets() {
        private void fillWidgets() {
                if (fcpprotocol != null) {
                if (fcpprotocol != null) {
                        spnSourcePort.setValue(fcpprotocol.getSourceUDPPort());
                        spnSourcePort.setValue(fcpprotocol.getSourceUDPPort());
                        spnDestPort.setValue(fcpprotocol.getDestUDPPort());
                        spnDestPort.setValue(fcpprotocol.getDestUDPPort());
                        if (fcpprotocol.getDestIPAddress() != null)
                        if (fcpprotocol.getDestIPAddress() != null)
                                txtFPGAIP.setText(fcpprotocol.getDestIPAddress().toString());
                                txtFPGAIP.setText(fcpprotocol.getDestIPAddress().getHostAddress());
                        else
                        else
                                txtFPGAIP.setText("10.0.1.42");
                                txtFPGAIP.setText("10.0.1.42");
                        textStatus.setText(fcpprotocol.isConnected() ? "Connected" : "Not Connected");
                        textStatus.setText(fcpprotocol.isConnected() ? "Connected" : "Not Connected");
                } else {
                } else {
                        textStatus.setText("Not Connected");
                        textStatus.setText("Not Connected");
Line 119... Line 119...
                if (fcpprotocol == null) {
                if (fcpprotocol == null) {
                        this.textStatus.setText("Not Connected");
                        this.textStatus.setText("Not Connected");
                }
                }
                else {
                else {
                        try {
                        try {
 
                                //if (fcpprotocol.isConnected()) fcpprotocol.disconnect();
                                fcpprotocol.connect(InetAddress.getByName(this.txtFPGAIP.text()), spnDestPort.value());
                                fcpprotocol.connect(InetAddress.getByName(this.txtFPGAIP.text()), spnDestPort.value());
                                while (!fcpprotocol.isConnected());
                                while (!fcpprotocol.isConnected());
                                this.textStatus.setText("Connected!");
                                this.textStatus.setText("Connected!");
                        } catch (UnknownHostException e) {
                        } catch (UnknownHostException e) {
                                this.textStatus.setText("Not Connected");
                                this.textStatus.setText("Not Connected");

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.