public class JavaGUIAdapter extends java.lang.Object implements GUIClientInterface
GUIClientInterface
for full descriptions of these routines.Constructor and Description |
---|
JavaGUIAdapter() |
Modifier and Type | Method and Description |
---|---|
short[] |
getDefaultAddrs()
An array of addresses to use for the "send" buttons in the GUI.
|
int |
initializeLinkLayer(short MACaddr)
Create an instance of the 802.11~ layer.
|
byte[] |
pollForStreamOutput()
This routine pulls text from the stream to which the 802.11~ layer is writing
and returns any new text as an array of bytes.
|
byte[] |
pollForStreamOutput2() |
int |
sendCommand(int command,
int value)
The GUI calls this when the user asks to pass command info to the 802.11~ layer.
|
int |
sendOutgoingData(short dest,
byte[] payload)
Wrapper around the 802.11~ layer's send routine.
|
byte[] |
watchForIncomingData()
This method calls the 802.11~ layer's recv() method, which should block until
data arrives.
|
public short[] getDefaultAddrs()
getDefaultAddrs
in interface GUIClientInterface
public int initializeLinkLayer(short MACaddr)
initializeLinkLayer
in interface GUIClientInterface
MACaddr
- The MAC address passed to the 802.11~ constructor.public byte[] watchForIncomingData()
watchForIncomingData
in interface GUIClientInterface
public int sendOutgoingData(short dest, byte[] payload)
sendOutgoingData
in interface GUIClientInterface
dest
- The destination MAC addresspayload
- The data to sendsend()
method.public byte[] pollForStreamOutput()
pollForStreamOutput
in interface GUIClientInterface
public byte[] pollForStreamOutput2()
public int sendCommand(int command, int value)
sendCommand
in interface GUIClientInterface
command
- Specifies the command to sendvalue
- The value passed with the commandcommand()
method.