add FleetProcess.sendWord() that takes a signal
[fleet.git] / src / edu / berkeley / fleet / api / FleetProcess.java
index 1db837f..c232405 100644 (file)
@@ -23,9 +23,21 @@ public abstract class FleetProcess {
     /** dispatch a word to a given destination; may be buffered */
     public abstract void sendWord(Destination d, BitVector word);
 
+    /** dispatch a word to a given destination; may be buffered */
+    public abstract void sendWord(Destination d, BitVector word, BitVector signal);
+
+    /** convenience method: sends the word to d's data destination */
+    public void sendWord(Dock d, BitVector word) { sendWord(d.getDataDestination(), word); }
+
     /** dispatch a token to a given destination; may be buffered */
     public abstract void sendToken(Destination d);
 
+    /** convenience method: sends a token to d's data destination */
+    public void sendToken(Dock d) { sendToken(d.getDataDestination()); }
+
+    /** convenience method: sends a token to d's instruction destination */
+    public void sendTorpedo(Dock d) { sendToken(d.getInstructionDestination()); }
+
     /** flush all instructions, words, and tokens dispatched so far */
     public abstract void flush();