update to AM15
[fleet.git] / src / edu / berkeley / fleet / Port.java
index b8dcabd..5a6bad3 100644 (file)
@@ -12,16 +12,22 @@ public abstract class Port {
         ship.addPort(name, this);
     }
 
+    protected boolean special = false;
+    protected boolean noInbox = false;
+    protected boolean noChannelDef = false;
     void service() { }
+    public boolean special() { return special; }
+    public boolean noInbox() { return noInbox; }
+    public boolean noChannelDef() { return noChannelDef; }
         
     /** adds one token to the port from the switch fabric side */
-    void addTokenFromFabric() { throw new RuntimeException("this should never happen!"); }
+    void addTokenFromFabric() { /*throw new RuntimeException("this should never happen!");*/ addDataFromFabric(0); }
         
     /** adds the included datum to the port from the switch fabric  side */
     void addDataFromFabric(int datum)  { throw new RuntimeException("this should never happen!"); }
 
     /** adds one token to the port from the ship side */
-    public void addTokenFromShip() { throw new RuntimeException("this should never happen!"); }
+    public void addTokenFromShip() { /*throw new RuntimeException("this should never happen!");*/ addDataFromShip(0); }
         
     /** adds the included datum to the port from the switch fabric side */
     public void addDataFromShip(int datum) { throw new RuntimeException("this should never happen!"); }