ptolemy.distributed.domains.sdf.kernel
Class DistributedSDFReceiver

java.lang.Object
  extended by ptolemy.actor.AbstractReceiver
      extended by ptolemy.domains.sdf.kernel.SDFReceiver
          extended by ptolemy.distributed.domains.sdf.kernel.DistributedSDFReceiver
All Implemented Interfaces:
Receiver

public class DistributedSDFReceiver
extends SDFReceiver

The DistributedSDFReceiver class extends SDFReceiver with an unique ID. This is useful in order to unambiguously identify receivers in a distributed environment.

Since:
Ptolemy II 5.1
Version:
$Id: DistributedSDFReceiver.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Daniel Lazaro Cuadrado (kapokasa@kom.aau.dk)
See Also:
SDFReceiver
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (kapokasa)

Field Summary
private  java.lang.Integer ID
          ID of the receiver.
private static java.lang.Integer lastID
          Static member that contains the next ID value to be assigned to the next receiver constructed.
private  boolean VERBOSE
          Enables debugging messages.
 
Fields inherited from class ptolemy.domains.sdf.kernel.SDFReceiver
_waitingTokens, INFINITE_CAPACITY
 
Constructor Summary
DistributedSDFReceiver()
          Construct an empty receiver with no container and unique ID.
DistributedSDFReceiver(int size)
          Construct an empty receiver with no container, given size and unique ID.
DistributedSDFReceiver(java.lang.Integer newID)
          Construct an empty receiver with no container and a given ID.
DistributedSDFReceiver(IOPort container)
          Construct an empty receiver with the specified container and unique ID.
DistributedSDFReceiver(IOPort container, int size)
          Construct an empty receiver with the specified container, size and unique ID.
 
Method Summary
 java.lang.Integer getID()
          Return the ID of the receiver.
private  void init()
          Initialize the receiver with an ID of value lastID. lastID is increased by 1.
 
Methods inherited from class ptolemy.domains.sdf.kernel.SDFReceiver
clear, elementList, get, get, getArray, getCapacity, getHistoryCapacity, hasRoom, hasRoom, hasToken, hasToken, historyElements, historySize, put, setCapacity, setHistoryCapacity, size
 
Methods inherited from class ptolemy.actor.AbstractReceiver
getContainer, getCurrentTime, getModelTime, isKnown, putArray, putArrayToAll, putToAll, reset, setContainer, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERBOSE

private boolean VERBOSE
Enables debugging messages.


lastID

private static java.lang.Integer lastID
Static member that contains the next ID value to be assigned to the next receiver constructed.


ID

private java.lang.Integer ID
ID of the receiver.

Constructor Detail

DistributedSDFReceiver

public DistributedSDFReceiver()
Construct an empty receiver with no container and unique ID.


DistributedSDFReceiver

public DistributedSDFReceiver(int size)
Construct an empty receiver with no container, given size and unique ID.

Parameters:
size - The size of the queue in the receiver.

DistributedSDFReceiver

public DistributedSDFReceiver(IOPort container)
                       throws IllegalActionException
Construct an empty receiver with the specified container and unique ID.

Parameters:
container - The container of the receiver.
Throws:
IllegalActionException - If the container does not accept this receiver.

DistributedSDFReceiver

public DistributedSDFReceiver(IOPort container,
                              int size)
                       throws IllegalActionException
Construct an empty receiver with the specified container, size and unique ID.

Parameters:
container - The container of the receiver.
size - The size of the queue in the receiver.
Throws:
IllegalActionException - If the container does not accept this receiver.

DistributedSDFReceiver

public DistributedSDFReceiver(java.lang.Integer newID)
Construct an empty receiver with no container and a given ID.

Parameters:
newID - The new ID for the Receiver.
Method Detail

getID

public java.lang.Integer getID()
Return the ID of the receiver.

Returns:
The ID of the Receiver.

init

private void init()
Initialize the receiver with an ID of value lastID. lastID is increased by 1.