FPGA-Fleet updates
[fleet.git] / src / edu / berkeley / fleet / slipway / SlipwayShip.java
index dc64dda..22ad930 100644 (file)
@@ -10,8 +10,13 @@ public class SlipwayShip extends Ship {
     /** You should instantiate a bunch of Inboxes and Outboxes in your constructor */
     public SlipwayShip(Slipway fleet, String name, String type, ShipDescription sd) {
         this.fleet = fleet; this.type = type;
-        for(BenkoBoxDescription sdbb : sd)
-            new SlipwayBenkoBox(sdbb.isInbox(), this, sdbb.getName());
+        for(BenkoBoxDescription sdbb : sd) {
+            SlipwayBenkoBox sbb = new SlipwayBenkoBox(sdbb.isInbox(), this, sdbb.getName());
+            for(String port : sdbb) {
+                if (port.equals("")) continue;
+                sbb.addDestination(port);
+            }
+        }
         if        (type.equals("Debug")) {
             new SlipwayBenkoBox(false, this, "out", true);