Package ptolemy.domains.tcs.kernel
Class TCSReceiver
- java.lang.Object
-
- ptolemy.actor.AbstractReceiver
-
- ptolemy.domains.de.kernel.DEReceiver
-
- ptolemy.domains.tcs.kernel.TCSReceiver
-
- All Implemented Interfaces:
Receiver
public class TCSReceiver extends DEReceiver
A receiver for modeling train control systems. This receiver checks the containing actor, and if it can reject inputs, then uses it to determine whether to accept a token.- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Marjan Sirjani and Edward A. Lee
-
-
Field Summary
-
Fields inherited from class ptolemy.domains.de.kernel.DEReceiver
_directorVersion, _tokens
-
-
Constructor Summary
Constructors Constructor Description TCSReceiver()
Construct an empty DEReceiver with no container.TCSReceiver(IOPort container)
Construct an empty DEReceiver with the specified container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
put(Token token)
Put a token into this receiver and post a trigger event to the director.-
Methods inherited from class ptolemy.domains.de.kernel.DEReceiver
clear, elementList, get, hasRoom, hasRoom, hasToken, hasToken
-
Methods inherited from class ptolemy.actor.AbstractReceiver
getArray, getContainer, getCurrentTime, getModelTime, isKnown, putArray, putArrayToAll, putToAll, reset, setContainer, toString
-
-
-
-
Constructor Detail
-
TCSReceiver
public TCSReceiver()
Construct an empty DEReceiver with no container.
-
TCSReceiver
public TCSReceiver(IOPort container) throws IllegalActionException
Construct an empty DEReceiver with the specified container.- Parameters:
container
- The container.- Throws:
IllegalActionException
- If the container does not accept this receiver.
-
-
Method Detail
-
put
public void put(Token token) throws IllegalActionException, NoRoomException
Put a token into this receiver and post a trigger event to the director. The director will be responsible to dequeue the trigger event at the correct timestamp and microstep and invoke the corresponding actor whose input port contains this receiver. This receiver may contain more than one events.- Specified by:
put
in interfaceReceiver
- Overrides:
put
in classDEReceiver
- Parameters:
token
- The token to be put, or null to put no token.- Throws:
IllegalActionException
- If cannot get the director or if the current microstep is zero.NoRoomException
- Not thrown in this class.
-
-