1 package edu.berkeley.fleet.interpreter;
2 import edu.berkeley.fleet.api.*;
4 public class DataOutbox extends Outbox {
6 public DataOutbox(InterpreterShip ship, String name) { super(ship, name); }
7 public DataOutbox(InterpreterShip ship, String name, boolean special) {
8 super(ship, name); this.special = special; }
9 public DataOutbox(InterpreterShip ship, String name, boolean special, boolean ihorn) {
10 super(ship, name); this.special = special; this.ihorn = ihorn; }
11 public DataOutbox(InterpreterShip ship, String name, boolean special, boolean ihorn, boolean dhorn) {
12 super(ship, name); this.special = special; this.ihorn = ihorn; this.dhorn = dhorn; }
14 private Interpreter getInterpreter() { return ((InterpreterShip)getShip()).getInterpreter(); }
15 public void addDataFromShip(int data) {
16 addItemFromShip(data);
19 public boolean readyForDataFromShip() {
20 return super.readyForItemFromShip();
23 protected void send(InterpreterBenkoBox port, int data) {
24 getInterpreter().sendData(this, data, port);