public class SwitchDisplay extends java.lang.Object implements SwitchListener
Constructor and Description |
---|
SwitchDisplay(Switch sw)
Create the GUI.
|
Modifier and Type | Method and Description |
---|---|
void |
launchThreadToUpdateLights(int ptNum,
SwitchLightPanel panel)
Launch a thread that, every millisecond, checks the state of the
"wire" on this port to see if it is "high" or "low".
|
void |
macTableChanged(Switch sw)
This callback is called whenever the underlying Switch object
changes its mac<-->port table.
|
void |
portAttached(Switch sw,
SwitchPort pt,
SwitchLightPanel panel)
When a port is attached, launch a thread to monitor the state of the
wire this port is connectd to.
|
public SwitchDisplay(Switch sw)
public void launchThreadToUpdateLights(int ptNum, SwitchLightPanel panel)
public void portAttached(Switch sw, SwitchPort pt, SwitchLightPanel panel)
portAttached
in interface SwitchListener
public void macTableChanged(Switch sw)
macTableChanged
in interface SwitchListener