doc updates to ships
[fleet.git] / src / edu / berkeley / fleet / interpreter / Inbox.java
index a1e4769..b2dcc81 100644 (file)
@@ -4,7 +4,7 @@ import edu.berkeley.fleet.api.*;
 import java.util.*;
 
 /** this is a generic inbox which stores <32-bit items (tokens or data) */
-public class Inbox extends InstructionBenkoBox {
+public class Inbox extends InstructionPump {
 
     public boolean dataReadyForShip()            { return itemReadyForShip; }
     public Packet removePacketForShip()          { remove(); return register; }
@@ -13,7 +13,7 @@ public class Inbox extends InstructionBenkoBox {
 
     // private data //////////////////////////////////////////////////////////////////////////////
 
-    private Packet register = null;
+    private Packet register = new Packet(null, null, 0, null);
 
     /** data which has arrived from the switch fabric but not been acted on */
     private Queue<Packet> itemsFromFabric = new LinkedList<Packet>();
@@ -72,12 +72,12 @@ public class Inbox extends InstructionBenkoBox {
 
             // and make note of the fact that we need to send an ack (if requested)
             if (instruction.tokenOut)
-                bufferedAck = new Packet(getInterpreter(), this, 0, (InterpreterBenkoBox)instruction.dest);
+                bufferedAck = new Packet(getInterpreter(), this, 0, (InterpreterDestination)instruction.dest);
 
         } else if (instruction.tokenOut) {
 
             // if dataOut is not set, we can send the data immediately
-            new Packet(getInterpreter(), this, 0, (InterpreterBenkoBox)instruction.dest).send();
+            new Packet(getInterpreter(), this, 0, (InterpreterDestination)instruction.dest).send();
         }
         return true;
     }