|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.emulator.wlandev.WLANDevice
public abstract class WLANDevice
Field Summary | |
---|---|
protected int |
channel
desired channel |
private static long |
cmdDelayMillis
|
protected DaemonCommunicator |
dComm
the dComm on the remote node |
protected String |
devName
device name |
protected EmuNode |
emuNode
emuNode on which the device resides |
protected String |
essid
desired essid |
protected byte[] |
ip
desired device IP |
protected gmj.net.PhysicalAddress |
mac
node's mac address |
protected static HashMap |
macToEmuNodeMap
maps mac addresses for node's wireless devices to the node's emuNode object |
protected static long |
MSG_TIMEOUT_MILLIS
|
protected String |
prefix
|
protected double |
txRateMbps
desired tx rate |
protected boolean |
useSudo
|
Constructor Summary | |
---|---|
protected |
WLANDevice(EmuNode emuNode,
DaemonCommunicator dComm,
String devName,
byte[] ip,
String essid,
int channel)
|
protected |
WLANDevice(EmuNode emuNode,
DaemonCommunicator dComm,
String devName,
byte[] ip,
String essid,
int channel,
boolean useSudo)
Construct a WLANDevice. |
Method Summary | |
---|---|
abstract void |
adHocMode(String essid,
int channel)
Sets the device into ad hoc mode with the given essid and channel. |
abstract void |
apMode(String essid,
int channel)
Sets the device into AP mode with the given essid and channel. |
abstract void |
create()
Creates the device. |
abstract void |
destroy()
Destroys the device. |
void |
determineMAC()
Query the device to determine the mac. |
abstract gmj.net.PhysicalAddress |
getBSSID()
Get the BSSID reported by iwconfig. |
String |
getDevName()
get the name of the wireless device |
static EmuNode |
getEmuNodeFromMAC(gmj.net.PhysicalAddress nodeMAC)
finds the emuNode object corresponding to the given mac address |
byte[] |
getIP()
Get the desired ip address of the wireless device. |
gmj.net.PhysicalAddress |
getMAC()
Return the mac of the device. |
abstract int |
getSignalLevel()
Get the current signal level reported by iwconfig. |
void |
ifconfig()
Set the actual device ip address to the desired ip using ifconfig. |
ArrayList |
ifconfigToArrayList()
Runs ifconfig and stores the results in an ArrayList. |
void |
iwconfig(String essid,
int channel)
Runs iwconfig on the device to set the essid and channel. |
void |
iwconfig(String essid,
int channel,
double txRateMbps)
Runs iwconfig on the device to set the essid, channel, and txRateMbps. |
ArrayList |
iwconfigToArrayList()
Runs iwconfig and stores the results in an ArrayList. |
abstract void |
managedMode(String essid,
int channel)
Sets the device into managed mode with the given essid and channel. |
void |
setTxRate(double txRateMbps)
Runs iwconfig on the device to set the txRateMbps. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DaemonCommunicator dComm
protected String devName
protected gmj.net.PhysicalAddress mac
protected byte[] ip
protected EmuNode emuNode
protected String essid
protected int channel
protected double txRateMbps
protected String prefix
protected boolean useSudo
protected static HashMap macToEmuNodeMap
protected static final long MSG_TIMEOUT_MILLIS
private static final long cmdDelayMillis
Constructor Detail |
---|
protected WLANDevice(EmuNode emuNode, DaemonCommunicator dComm, String devName, byte[] ip, String essid, int channel, boolean useSudo)
emuNode
- dComm
- devName
- ip
- essid
- channel
- protected WLANDevice(EmuNode emuNode, DaemonCommunicator dComm, String devName, byte[] ip, String essid, int channel)
Method Detail |
---|
public static EmuNode getEmuNodeFromMAC(gmj.net.PhysicalAddress nodeMAC)
nodeMAC
- mac address of node
public String getDevName()
public byte[] getIP()
public void ifconfig()
public void iwconfig(String essid, int channel)
essid
- the essid to setchannel
- the channel to setpublic void iwconfig(String essid, int channel, double txRateMbps)
essid
- the essid to setchannel
- the channel to settxRateMbps
- the transmit rate in Mbpspublic void setTxRate(double txRateMbps)
txRateMbps
- the transmit rate in Mbpspublic void determineMAC()
public ArrayList ifconfigToArrayList()
public ArrayList iwconfigToArrayList()
public gmj.net.PhysicalAddress getMAC()
public abstract void apMode(String essid, int channel)
essid
- the new essidchannel
- the new channelpublic abstract void managedMode(String essid, int channel)
essid
- the new essidchannel
- the channel to begin searching onpublic abstract void adHocMode(String essid, int channel)
essid
- the new essidchannel
- the new channelpublic abstract void create()
public abstract void destroy()
public abstract gmj.net.PhysicalAddress getBSSID()
public abstract int getSignalLevel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |