Class 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
    • 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 interface Receiver
        Overrides:
        put in class DEReceiver
        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.