Class LinkVisualizer

    • Field Detail

      • channelName

        public StringParameter channelName
        The name of the channel. The default name is "AtomicWirelessChannel".
      • sleepTime

        public Parameter sleepTime
        The amount of time to sleep in milliseconds between drawing the line and then removing the line. The initial default value is an IntToken with a value of 500, meaning sleep for 500 ms.
      • _isOff

        protected java.lang.Boolean _isOff
        Status of line that visualizes the radio link. Initialized to true.
    • Method Detail

      • channelNotify

        public void channelNotify​(RecordToken properties,
                                  Token token,
                                  WirelessIOPort sender,
                                  WirelessIOPort destination)
        Visualize a line between the sender and destination containers by starting a thread that will create and remove the line after some amount of time.
        Specified by:
        channelNotify in interface ChannelListener
        Parameters:
        properties - The properties of this transmission.
        token - The token of this transmission, which can be processed here.
        sender - The sending port.
        destination - The receiving port.
      • _drawLine

        protected void _drawLine​(WirelessIOPort sender,
                                 WirelessIOPort destination,
                                 java.lang.String lineName)
        Draw a line from the sender container to the destination container with name lineName.
        Parameters:
        sender - The sender port.
        destination - The destination port.
        lineName - The name of the line attribute to create.
      • _removeLine

        protected void _removeLine​(java.lang.String lineName)
        Remove the line previously created with name lineName.
        Parameters:
        lineName - Name of line previously created.