renamed main Java class of Cooja from GUI to Cooja.
se.sics.cooja.GUI -> se.sics.cooja.Cooja this commit does not contain any functional changes, but may require external scripts to be updated such as Makefiles.
This commit is contained in:
parent
f13af20f12
commit
625537158f
80 changed files with 499 additions and 499 deletions
|
@ -49,7 +49,7 @@ import org.apache.log4j.Logger;
|
|||
import org.jdom.Element;
|
||||
|
||||
import se.sics.cooja.ClassDescription;
|
||||
import se.sics.cooja.GUI;
|
||||
import se.sics.cooja.Cooja;
|
||||
import se.sics.cooja.Mote;
|
||||
import se.sics.cooja.MotePlugin;
|
||||
import se.sics.cooja.PluginType;
|
||||
|
@ -86,12 +86,12 @@ public class SerialSocketClient extends VisPlugin implements MotePlugin {
|
|||
|
||||
private Mote mote;
|
||||
|
||||
public SerialSocketClient(Mote mote, Simulation simulation, final GUI gui) {
|
||||
public SerialSocketClient(Mote mote, Simulation simulation, final Cooja gui) {
|
||||
super("Serial Socket (CLIENT) (" + mote + ")", gui, false);
|
||||
this.mote = mote;
|
||||
|
||||
/* GUI components */
|
||||
if (GUI.isVisualized()) {
|
||||
if (Cooja.isVisualized()) {
|
||||
Box northBox = Box.createHorizontalBox();
|
||||
northBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
statusLabel = configureLabel(northBox, "", "");
|
||||
|
@ -134,7 +134,7 @@ public class SerialSocketClient extends VisPlugin implements MotePlugin {
|
|||
out.write(serialPort.getLastSerialData());
|
||||
out.flush();
|
||||
outBytes++;
|
||||
if (GUI.isVisualized()) {
|
||||
if (Cooja.isVisualized()) {
|
||||
outLabel.setText(outBytes + " bytes");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
@ -165,7 +165,7 @@ public class SerialSocketClient extends VisPlugin implements MotePlugin {
|
|||
serialPort.writeByte(data[i]);
|
||||
}
|
||||
inBytes += numRead;
|
||||
if (GUI.isVisualized()) {
|
||||
if (Cooja.isVisualized()) {
|
||||
inLabel.setText(inBytes + " bytes");
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -53,7 +53,7 @@ import org.apache.log4j.Logger;
|
|||
import org.jdom.Element;
|
||||
|
||||
import se.sics.cooja.ClassDescription;
|
||||
import se.sics.cooja.GUI;
|
||||
import se.sics.cooja.Cooja;
|
||||
import se.sics.cooja.Mote;
|
||||
import se.sics.cooja.MotePlugin;
|
||||
import se.sics.cooja.PluginType;
|
||||
|
@ -90,7 +90,7 @@ public class SerialSocketServer extends VisPlugin implements MotePlugin {
|
|||
|
||||
private Mote mote;
|
||||
|
||||
public SerialSocketServer(Mote mote, Simulation simulation, final GUI gui) {
|
||||
public SerialSocketServer(Mote mote, Simulation simulation, final Cooja gui) {
|
||||
super("Serial Socket (SERVER) (" + mote + ")", gui, false);
|
||||
this.mote = mote;
|
||||
|
||||
|
@ -99,7 +99,7 @@ public class SerialSocketServer extends VisPlugin implements MotePlugin {
|
|||
LISTEN_PORT = 60000 + mote.getID();
|
||||
|
||||
/* GUI components */
|
||||
if (GUI.isVisualized()) {
|
||||
if (Cooja.isVisualized()) {
|
||||
Box northBox = Box.createHorizontalBox();
|
||||
northBox.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
statusLabel = configureLabel(northBox, "", "");
|
||||
|
@ -122,7 +122,7 @@ public class SerialSocketServer extends VisPlugin implements MotePlugin {
|
|||
|
||||
try {
|
||||
logger.info("Listening on port: " + LISTEN_PORT);
|
||||
if (GUI.isVisualized()) {
|
||||
if (Cooja.isVisualized()) {
|
||||
statusLabel.setText("Listening on port: " + LISTEN_PORT);
|
||||
}
|
||||
server = new ServerSocket(LISTEN_PORT);
|
||||
|
@ -136,7 +136,7 @@ public class SerialSocketServer extends VisPlugin implements MotePlugin {
|
|||
out.flush();
|
||||
|
||||
startSocketReadThread(in);
|
||||
if (GUI.isVisualized()) {
|
||||
if (Cooja.isVisualized()) {
|
||||
statusLabel.setText("Client connected: " + client.getInetAddress());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
@ -247,7 +247,7 @@ public class SerialSocketServer extends VisPlugin implements MotePlugin {
|
|||
} catch (IOException e) {
|
||||
}
|
||||
|
||||
if (GUI.isVisualized()) {
|
||||
if (Cooja.isVisualized()) {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
statusLabel.setText("Listening on port: " + LISTEN_PORT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue