nodeNet
Interface NodeBehavior

All Known Subinterfaces:
CountingNodeBehavior

public abstract interface NodeBehavior

NodeBehavior is the interface you must implement in your code. It defines a single method, act.

Copyright (c) 1998 Massachusetts Institute of Technology


Method Summary
 void transmitPacket(InputChannelVector inputChannels, OutputChannelVector outputChannels)
          transmitPacket is the method you will write for this lab.
 

Method Detail

transmitPacket

public void transmitPacket(InputChannelVector inputChannels,
                           OutputChannelVector outputChannels)
transmitPacket is the method you will write for this lab. It has two arguments, one which is an InputChannelVector, and the other an OutputChannelVector, corresponding to the inputs and outputs available to you. Note that the elements passed exist, but are perhaps disabled, full, or empty. You will need to be aware of these conditions.

transmitPacket is called repeatedly by a Node from within a while (true) {} loop. You should deal with a single task on each iteration. Failure to return promptly will result in unpredictable behavior.