Update of /cvsroot/javanetsim/javaNetSim/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7620/core
Modified Files:
PC.java ProtocolStack.java Simulation.java
Log Message:
Index: ProtocolStack.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/ProtocolStack.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ProtocolStack.java 8 Nov 2005 15:35:29 -0000 1.1
--- ProtocolStack.java 19 Nov 2005 14:26:02 -0000 1.2
***************
*** 65,68 ****
--- 65,70 ----
public static final int IBM_SNA = 2;
public static final int APPLETALK = 3;
+
+ public static int UIDGen;
/**
* Future use. All protocol stacks regardless of type must implement
Index: PC.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/PC.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PC.java 19 Nov 2005 13:13:58 -0000 1.3
--- PC.java 19 Nov 2005 14:26:02 -0000 1.4
***************
*** 40,43 ****
--- 40,44 ----
class PC extends ApplicationLayerDevice {
+
/**
* Constructs a PC with the specified name.
***************
*** 49,54 ****
super(inName,7);
! Echo echoServer = new Echo(NodeProtocolStack, 7, 1);
! Echo echoClient = new Echo(NodeProtocolStack, 0, 0);
addApp(echoServer, 7);
--- 50,55 ----
super(inName,7);
! Echo echoServer = new Echo(NodeProtocolStack, 7, 1, core.ProtocolStack.UIDGen++);
! Echo echoClient = new Echo(NodeProtocolStack, 0, 0, core.ProtocolStack.UIDGen++);
addApp(echoServer, 7);
Index: Simulation.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/Simulation.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Simulation.java 8 Nov 2005 20:58:14 -0000 1.2
--- Simulation.java 19 Nov 2005 14:26:02 -0000 1.3
***************
*** 226,229 ****
--- 226,235 ----
}
+ //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! comment && doc this
+
+ public Node getNode(String inNodeName) throws InvalidNodeNameException{
+ return (Node)nodeTable.get(inNodeName);
+ }
+
/**
* This method is called from the TEXTUI or GUI. If inNodeName is an instance of Node pass it up the
|