Class MetroIIPtidesPort

    • Field Detail

      • actuateAtEventTimestamp

        public Parameter actuateAtEventTimestamp
        Actuate at event timestamp parameter that defaults to the boolean value TRUE. If this parameter is set to FALSE, an actuator can produce outputs as soon as they are available.
      • deviceDelay

        public Parameter deviceDelay
        Device delay parameter that defaults to the double value 0.0.
      • deviceDelayBound

        public Parameter deviceDelayBound
        Device delay bound parameter that defaults to the double value 0.0.
      • isNetworkPort

        public Parameter isNetworkPort
        Flag that is true if the port is a network receiver or transmitter. The flag defaults to false.
      • networkDelayBound

        public Parameter networkDelayBound
        Network delay bound parameter that defaults to the double value 0.0.
      • platformDelayBound

        public Parameter platformDelayBound
        Platform delay bound parameter that defaults to the double value 0.0.
      • sourcePlatformDelayBound

        public Parameter sourcePlatformDelayBound
        Source platform delay bound parameter that defaults to the double value 0.0.
    • Method Detail

      • actuateAtEventTimestamp

        public boolean actuateAtEventTimestamp()
        Return true if actuation should happen at event timestamp and false if actuation can happen sooner.
        Returns:
        whether actuation should be done at the event timestamp.
      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        React to a change in an attribute. This method is called by a contained attribute when its value changes. This overrides the base class so that if the attribute is an instance of TypeAttribute, then it sets the type of the port.
        Overrides:
        attributeChanged in class TypedIOPort
        Parameters:
        attribute - The attribute that changed.
        Throws:
        IllegalActionException - If the change is not acceptable to this container.
      • getTimeStampForToken

        public java.lang.Object[] getTimeStampForToken​(Token t)
        Return the timestamp and sourceTimestamp for a specific token.
        Parameters:
        t - The token.
        Returns:
        The timestamp.
      • getMicrostepForToken

        public int getMicrostepForToken​(Token t)
        Get the microstep of the event that contained the token.
        Parameters:
        t - The token.
        Returns:
        The microstep.
      • isActuatorPort

        public boolean isActuatorPort()
        Returns true if this object is actuator port.
        Returns:
        true if port is an actuator port.
      • isSensorPort

        public boolean isSensorPort()
        Returns true if this object is sensor port.
        Returns:
        true if this object is sensor port.
      • isNetworkReceiverPort

        public boolean isNetworkReceiverPort()
        Returns true if this object is network receiver port.
        Returns:
        true if this object is network receiver port.
      • isNetworkTransmitterPort

        public boolean isNetworkTransmitterPort()
        Returns true if this object is network transmitter port.
        Returns:
        true if this object is network transmitter port.
      • setInput

        public void setInput​(boolean isInput)
                      throws IllegalActionException
        Description copied from class: MirrorPort
        Override the base class to also set the associated port, if there is one.
        Overrides:
        setInput in class MirrorPort
        Parameters:
        isInput - True to make this an input port.
        Throws:
        IllegalActionException - If changing the port status is not permitted.
      • setOutput

        public void setOutput​(boolean isInput)
                       throws IllegalActionException
        Description copied from class: MirrorPort
        Override the base class to also set the associated port, if there is one.
        Overrides:
        setOutput in class MirrorPort
        Parameters:
        isInput - True to make this an output port.
        Throws:
        IllegalActionException - If changing the port status is not permitted.
      • send

        public void send​(int channelIndex,
                         Token token)
                  throws IllegalActionException,
                         NoRoomException
        Save token and remember timestamp of the token. Then call send of super class.
        Overrides:
        send in class TypedIOPort
        Parameters:
        channelIndex - The index of the channel, from 0 to width-1.
        token - The token to send, or null to send no token.
        Throws:
        IllegalActionException - If the token to be sent cannot be converted to the type of this port, or if the token is null.
        NoRoomException - If there is no room in the receiver.