1 package edu.berkeley.fleet.interpreter;
2 import edu.berkeley.fleet.api.*;
5 abstract class InterpreterDestination extends Destination {
7 public InterpreterDestination(InterpreterDock d) {
9 synchronized(d.getInterpreter()) {
10 this.serialNumber = d.getInterpreter().maxAllocatedDestinationSerialNumber++;
14 /** adds the included datum to the port from the switch fabric side */
15 public abstract void addDataFromFabric(Packet packet);
16 public abstract String toString();
19 * The Fleet instruction encoding mechanism assumes that each
20 * source->dest path can be turned into a bitstring, and that the
21 * bitstring gives sufficient information to route the packet.
22 * Therefore, the interpreter assigns a "serial number" to every
23 * InterpreterDestination in a fleet and uses the serial number
24 * of the destination as the path.
26 private int serialNumber;
27 int getSerialNumber() { return serialNumber; }