|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.net.Module
drcl.inet.mac.Mac_802_11
This class implements IEEE802.11 protocol. Part of this class is ported from ns-2.1b7a implementation.
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
static java.lang.String |
EVENT_LINK_BROKEN
The event type of the link broken event. |
static int |
MAC_ACK
ACK sent |
static int |
MAC_ATIM
Inside ATIM window |
static int |
MAC_BEACON
Beacon transmitted |
static long |
MAC_BROADCAST
Broadcast mac address. |
static int |
MAC_COLL
Collision state |
static int |
MAC_CTS
CTS sent |
static int |
MAC_IDLE
Idle state |
static int |
MAC_POLLING
Polling state |
static int |
MAC_RECV
Recving state |
static int |
MAC_RTS
RTS sent |
static int |
MAC_SEND
Transmitting state |
static java.lang.String[] |
MAC_STATE
Broadcast mac address. |
boolean |
MAC_TRACE_ALL_ENABLED
Flag to enable and disable tracing all events. |
boolean |
MAC_TRACE_CW_ENABLED
Flag to enable and disable tracing changes of CW. |
boolean |
MAC_TRACE_EVENT_ENABLED
Flag to enable and disable tracing certain special events. |
boolean |
MAC_TRACE_PACKET_ENABLED
Flag to enable and disable tracing packet arriving and departal events. |
boolean |
MAC_TRACE_TIMER_ENABLED
Flag to enable and disable tracing timer events. |
static int |
MF_ACK
Acknowledgement |
static int |
MF_BEASON
beaconing |
static int |
MF_CF_END
contention free period end |
static int |
MF_CONTROL
used as mask for control frame |
static int |
MF_CTS
Clear to send |
static int |
MF_DATA
Used as a mask for data frame |
static int |
MF_DATA_ACK
Ack for data frame |
static int |
MF_POLL
Polling |
static int |
MF_RTS
Request to send |
static int |
MF_SLOTS
Announce slot open for contension |
static int |
PSM_PWR_AWAKE
PSM enabled but not in power saving |
static int |
PSM_PWR_SAVE
PSM enabled and in power saving |
| Fields inherited from class drcl.net.Module |
downPort, PortGroup_DOWN, PortGroup_UP, upPort |
| Constructor Summary | |
Mac_802_11()
|
|
| Method Summary | |
double |
bandwidth()
Gets the channel bandwidth. |
void |
disable_MAC_TRACE_ALL()
Turns off the MAC_TRACE_ALL_ENABLED flag. |
void |
disable_MAC_TRACE_CW()
Turns off the MAC_TRACE_CW_ENABLED flag. |
void |
disable_MAC_TRACE_EVENT()
Turns off the MAC_TRACE_EVENT_ENABLED flag. |
void |
disable_MAC_TRACE_PACKET()
Turns off the MAC_TRACE_PACKET_ENABLED flag. |
void |
disable_MAC_TRACE_TIMER()
Turns off the MAC_TRACE_TIMER_ENABLED flag. |
void |
disable_PSM()
Disable PSM mode |
void |
enable_MAC_TRACE_ALL()
Turns on the MAC_TRACE_ALL_ENABLED flag. |
void |
enable_MAC_TRACE_CW()
Turns on the MAC_TRACE_CW_ENABLED flag. |
void |
enable_MAC_TRACE_EVENT()
Turns on the MAC_TRACE_EVENT_ENABLED flag. |
void |
enable_MAC_TRACE_PACKET()
Turns on the MAC_TRACE_PACKET_ENABLED flag. |
void |
enable_MAC_TRACE_TIMER()
Turns on the MAC_TRACE_TIMER_ENABLED flag. |
void |
enable_PSM()
Enable PSM mode and set psm_mode_ to PSM_PWR_SAVE |
long |
getMacAddress()
Get the Mac address |
void |
set_MAC_PSM(boolean b_)
Set PSM mode |
void |
set_MAC_TRACE_ALL_ENABLED(boolean b_)
Sets the MAC_TRACE_ALL_ENABLED flag. |
void |
set_MAC_TRACE_CW_ENABLED(boolean b_)
Sets the MAC_TRACE_CW_ENABLED flag. |
void |
set_MAC_TRACE_EVENT_ENABLED(boolean b_)
Sets the MAC_TRACE_EVENT_ENABLED flag. |
void |
set_MAC_TRACE_PACKET_ENABLED(boolean b_)
Sets the MAC_TRACE_PACKET_ENABLED flag. |
void |
set_MAC_TRACE_TIMER_ENABLED(boolean b_)
Sets the MAC_TRACE_TIMER_ENABLED flag. |
void |
setATIMWindow(double atim_)
Set the size of ATIM window |
void |
setBandwidth(double bw_)
Sets the channel bandwidth and calculates all related variables. |
void |
setBeaconInterval(double beacon_)
Set the length of beacon interval |
void |
setMacAddress(long addr_)
Set the MAC address |
void |
setMalicious(boolean b_)
Sets the is_malicious flag. |
void |
setRTSThreshold(int rstthreshold_)
Set the RTS threshold (size of packet to transmit RTS) |
void |
setSeed(long seed)
Set the random number generator seed. |
| Methods inherited from class drcl.net.Module |
cancelTimeout, duplicate, setTimeout, setTimeoutAt |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public boolean MAC_TRACE_ALL_ENABLED
public boolean MAC_TRACE_PACKET_ENABLED
public boolean MAC_TRACE_CW_ENABLED
public boolean MAC_TRACE_EVENT_ENABLED
public boolean MAC_TRACE_TIMER_ENABLED
public static final java.lang.String EVENT_LINK_BROKEN
public static final long MAC_BROADCAST
public static final java.lang.String[] MAC_STATE
public static final int MAC_IDLE
public static final int MAC_POLLING
public static final int MAC_RECV
public static final int MAC_SEND
public static final int MAC_RTS
public static final int MAC_CTS
public static final int MAC_ACK
public static final int MAC_COLL
public static final int MAC_BEACON
public static final int MAC_ATIM
public static final int MF_BEASON
public static final int MF_CONTROL
public static final int MF_SLOTS
public static final int MF_RTS
public static final int MF_CTS
public static final int MF_ACK
public static final int MF_CF_END
public static final int MF_POLL
public static final int MF_DATA
public static final int MF_DATA_ACK
public static final int PSM_PWR_SAVE
public static final int PSM_PWR_AWAKE
| Constructor Detail |
public Mac_802_11()
| Method Detail |
public void set_MAC_TRACE_ALL_ENABLED(boolean b_)
public void set_MAC_TRACE_PACKET_ENABLED(boolean b_)
public void set_MAC_TRACE_CW_ENABLED(boolean b_)
public void set_MAC_TRACE_EVENT_ENABLED(boolean b_)
public void set_MAC_TRACE_TIMER_ENABLED(boolean b_)
public void set_MAC_PSM(boolean b_)
public void enable_PSM()
public void disable_PSM()
public void setMalicious(boolean b_)
public void enable_MAC_TRACE_ALL()
public void enable_MAC_TRACE_PACKET()
public void enable_MAC_TRACE_CW()
public void enable_MAC_TRACE_EVENT()
public void enable_MAC_TRACE_TIMER()
public void disable_MAC_TRACE_ALL()
public void disable_MAC_TRACE_PACKET()
public void disable_MAC_TRACE_CW()
public void disable_MAC_TRACE_EVENT()
public void disable_MAC_TRACE_TIMER()
public void setRTSThreshold(int rstthreshold_)
public void setBeaconInterval(double beacon_)
public void setATIMWindow(double atim_)
public void setBandwidth(double bw_)
bw_ - channel bandwidth (bps)public double bandwidth()
public void setMacAddress(long addr_)
addr_ - the MAC addresspublic long getMacAddress()
public void setSeed(long seed)
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||