public interface GUIClientInterface
Dot11Interface
for those), but have been designed for compatibility with either a C++
or Java-based implementation. If you choose to write your project in Java,
you should use the JavaGUIAdapter
class to implement this
interface. It wraps some code around the basic 802.11~ functionality to
support the routines in the interface. (Use CppGUIAdapter
if you're
implementing your project in C++.)Modifier and Type | Method and Description |
---|---|
short[] |
getDefaultAddrs()
Returns an array of MAC addresses that will be assigned to buttons in the GUI client.
|
int |
initializeLinkLayer(short MACaddr)
Create an instance of the 802.11~ layer and set up the output streams.
|
byte[] |
pollForStreamOutput()
Called periodically by the GUI client to see if the 802.11~ layer has produced any
output that should be displayed in the client's text window.
|
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)
Called by the GUI client when data is to be sent.
|
byte[] |
watchForIncomingData()
This is a wrapper around the 802.11~ recv() that watches for incoming packets, then
prepends the srcAddr to the incoming data and returns it as a byte array.
|
short[] getDefaultAddrs()
int initializeLinkLayer(short MACaddr)
MACaddr
- The 802.11~ MAC address of this host.byte[] watchForIncomingData()
int sendOutgoingData(short dest, byte[] payload)
dest
- MAC address of destination machinepayload
- Data to be sentbyte[] pollForStreamOutput()
int sendCommand(int command, int value)
command
- Specifies the command to sendvalue
- The value passed with the command