Class Track

    • Field Detail

      • input

        public TypedIOPort input
        The input, which is a multiport.
      • northOutput

        public TypedIOPort northOutput
        The north output.
      • eastOutput

        public TypedIOPort eastOutput
        The east output.
      • southOutput

        public TypedIOPort southOutput
        The south output.
      • trackId

        public Parameter trackId
        The trackId. The initial default is an integer with a value of -1.
      • neighbors

        public Parameter neighbors
        The neighbors. The initial value is an array with values {-1, -1, -1}.
      • stormy

        public Parameter stormy
        A boolean indicating if it is stormy.
    • Method Detail

      • reject

        public boolean reject​(Token token,
                              IOPort port)
        Return true if the token cannot be accepted at the specified port.
        Specified by:
        reject in interface Rejecting
        Parameters:
        token - The token that may be rejected.
        port - The port.
        Returns:
        True to reject the token.
      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        If the specified attribute is stormy and there is an open file being written, then close that file. The new file will be opened or created when it is next written to.
        Overrides:
        attributeChanged in class TrackWriter
        Parameters:
        attribute - The attribute that has changed.
        Throws:
        IllegalActionException - If the specified attribute is fileName and the previously opened file cannot be closed.
      • initialize

        public void initialize()
                        throws IllegalActionException
        Initialize this actor. Derived classes override this method to perform actions that should occur once at the beginning of an execution, but after type resolution. Derived classes can produce output data and schedule events.
        Specified by:
        initialize in interface Initializable
        Overrides:
        initialize in class TrackWriter
        Throws:
        IllegalActionException - If a derived class throws it.
      • _setIcon

        protected void _setIcon​(int id)
                         throws IllegalActionException
        Set the visual indication of the icon for the specified ID.
        Parameters:
        id - The aircraft ID or -1 to indicate no aircraft.
        Throws:
        IllegalActionException