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");
|