Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

smac.h File Reference

#include "mac.h"
#include "mac-802_11.h"
#include "cmu-trace.h"
#include "random.h"
#include "timer-handler.h"

Include dependency graph for smac.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

struct  hdr_smac
struct  NeighbList
struct  SchedTable
class  SMAC
struct  smac_control_frame
struct  smac_sync_frame
class  SmacCounterTimer
class  SmacCsTimer
class  SmacGeneTimer
class  SmacNavTimer
class  SmacNeighNavTimer
class  SmacRecvTimer
class  SmacSendTimer
class  SmacTimer

Defines

#define SMAC_MAX_NUM_NEIGHBORS   20
#define SMAC_MAX_NUM_SCHEDULES   4
#define SMAC_DUTY_CYCLE   10
#define SMAC_RETRY_LIMIT   5
#define SMAC_EXTEND_LIMIT   5
#define SYNC_CW   31
#define DATA_CW   63
#define SYNCPERIOD   10
#define SYNCPKTTIME   3
#define CLOCKRES   1
#define BANDWIDTH   20
#define PRE_PKT_BYTES   5
#define ENCODE_RATIO   2
#define PROC_DELAY   1
#define CLKTICK2SEC(x)   ((x) * (CLOCKRES / 1.0e3))
#define SEC2CLKTICK(x)   ((x) / (CLOCKRES / 1.0e3))
#define SLEEP   0
#define IDLE   1
#define CR_SENSE   2
#define WAIT_CTS   3
#define WAIT_DATA   4
#define WAIT_ACK   5
#define WAIT_NEXTFRAG   6
#define BCASTSYNC   0
#define BCASTDATA   1
#define UNICAST   2
#define DATA_PKT   0
#define RTS_PKT   1
#define CTS_PKT   2
#define ACK_PKT   3
#define SYNC_PKT   4
#define RADIO_SLP   0
#define RADIO_IDLE   1
#define RADIO_RX   2
#define RADIO_TX   3
#define SIZEOF_SMAC_DATAPKT   50
#define SIZEOF_SMAC_CTRLPKT   10
#define SIZEOF_SMAC_SYNCPKT   9


Define Documentation

#define ACK_PKT   3
 

Definition at line 151 of file smac.h.

Referenced by SMAC::discard(), SMAC::handleRecvTimer(), SMAC::handleSendTimer(), SMAC::sendACK(), and SMAC::txtime().

#define BANDWIDTH   20
 

Definition at line 116 of file smac.h.

Referenced by SMAC::SMAC().

#define BCASTDATA   1
 

Definition at line 144 of file smac.h.

Referenced by SMAC::checkToSend(), SMAC::handleCounterTimer(), SMAC::handleCsTimer(), and SMAC::sentDATA().

#define BCASTSYNC   0
 

Definition at line 143 of file smac.h.

Referenced by SMAC::handleCounterTimer(), and SMAC::handleCsTimer().

#define CLKTICK2SEC  )     ((x) * (CLOCKRES / 1.0e3))
 

Definition at line 126 of file smac.h.

Referenced by SMAC::capture(), SMAC::checkToSend(), SMAC::handleCounterTimer(), SMAC::handleRecvTimer(), SMAC::handleSYNC(), SmacCounterTimer::sched(), SMAC::sendSYNC(), SMAC::setMySched(), SMAC::SMAC(), and SMAC::txtime().

#define CLOCKRES   1
 

Definition at line 115 of file smac.h.

Referenced by SMAC::SMAC().

#define CR_SENSE   2
 

Definition at line 134 of file smac.h.

Referenced by SMAC::checkToSend(), SMAC::handleACK(), SMAC::handleCounterTimer(), SMAC::handleCTS(), SMAC::handleDATA(), SMAC::handleRecvTimer(), SMAC::handleRTS(), and SMAC::recv().

#define CTS_PKT   2
 

Definition at line 150 of file smac.h.

Referenced by SMAC::discard(), SMAC::handleRecvTimer(), SMAC::handleSendTimer(), SMAC::sendCTS(), and SMAC::txtime().

#define DATA_CW   63
 

Definition at line 99 of file smac.h.

Referenced by SMAC::checkToSend(), SMAC::handleCounterTimer(), and SMAC::SMAC().

#define DATA_PKT   0
 

Definition at line 148 of file smac.h.

Referenced by SMAC::bcastMsg(), SMAC::discard(), SMAC::handleRecvTimer(), SMAC::handleSendTimer(), SMAC::txtime(), and SMAC::unicastMsg().

#define ENCODE_RATIO   2
 

Definition at line 119 of file smac.h.

Referenced by SMAC::SMAC().

#define IDLE   1
 

Definition at line 132 of file smac.h.

#define PRE_PKT_BYTES   5
 

Definition at line 118 of file smac.h.

Referenced by SMAC::SMAC().

#define PROC_DELAY   1
 

Definition at line 120 of file smac.h.

Referenced by SMAC::SMAC().

#define RADIO_IDLE   1
 

Definition at line 157 of file smac.h.

Referenced by SMAC::checkToSend(), SMAC::chkRadio(), SMAC::handleCounterTimer(), SMAC::handleRecvTimer(), SMAC::handleSendTimer(), SMAC::SMAC(), and SMAC::wakeup().

#define RADIO_RX   2
 

Definition at line 158 of file smac.h.

Referenced by SMAC::handleCounterTimer(), and SMAC::recv().

#define RADIO_SLP   0
 

Definition at line 156 of file smac.h.

Referenced by SMAC::checkToSend(), SMAC::chkRadio(), SMAC::handleCounterTimer(), SMAC::handleRecvTimer(), SMAC::recv(), SMAC::sleep(), and SMAC::wakeup().

#define RADIO_TX   3
 

Definition at line 159 of file smac.h.

Referenced by SMAC::handleRecvTimer(), SMAC::recv(), and SMAC::transmit().

#define RTS_PKT   1
 

Definition at line 149 of file smac.h.

Referenced by SMAC::discard(), SMAC::handleRecvTimer(), SMAC::handleSendTimer(), SMAC::sendRTS(), and SMAC::txtime().

#define SEC2CLKTICK  )     ((x) / (CLOCKRES / 1.0e3))
 

Definition at line 127 of file smac.h.

Referenced by SMAC::SMAC().

#define SIZEOF_SMAC_CTRLPKT   10
 

Definition at line 202 of file smac.h.

Referenced by SMAC::sendACK(), SMAC::sendCTS(), SMAC::sendRTS(), and SMAC::SMAC().

#define SIZEOF_SMAC_DATAPKT   50
 

Definition at line 201 of file smac.h.

Referenced by SMAC::bcastMsg(), SMAC::SMAC(), and SMAC::unicastMsg().

#define SIZEOF_SMAC_SYNCPKT   9
 

Definition at line 203 of file smac.h.

Referenced by SMAC::sendSYNC(), and SMAC::SMAC().

#define SLEEP   0
 

Definition at line 131 of file smac.h.

Referenced by SMAC::checkToSend(), SMAC::handleCounterTimer(), SMAC::handleNavTimer(), SMAC::handleRecvTimer(), and SMAC::sleep().

#define SMAC_DUTY_CYCLE   10
 

Definition at line 78 of file smac.h.

Referenced by SMAC::SMAC().

#define SMAC_EXTEND_LIMIT   5
 

Definition at line 86 of file smac.h.

Referenced by SMAC::handleGeneTimer().

#define SMAC_MAX_NUM_NEIGHBORS   20
 

Definition at line 70 of file smac.h.

#define SMAC_MAX_NUM_SCHEDULES   4
 

Definition at line 74 of file smac.h.

Referenced by SMAC::handleSYNC(), SMAC::SMAC(), and SMAC::~SMAC().

#define SMAC_RETRY_LIMIT   5
 

Definition at line 82 of file smac.h.

Referenced by SMAC::handleGeneTimer().

#define SYNC_CW   31
 

Definition at line 98 of file smac.h.

Referenced by SMAC::handleCounterTimer(), and SMAC::SMAC().

#define SYNC_PKT   4
 

Definition at line 152 of file smac.h.

Referenced by SMAC::discard(), SMAC::handleRecvTimer(), SMAC::handleSendTimer(), SMAC::sendSYNC(), and SMAC::txtime().

#define SYNCPERIOD   10
 

Definition at line 100 of file smac.h.

Referenced by SMAC::sentSYNC(), and SMAC::SMAC().

#define SYNCPKTTIME   3
 

Definition at line 101 of file smac.h.

Referenced by SMAC::sendSYNC(), and SMAC::txtime().

#define UNICAST   2
 

Definition at line 145 of file smac.h.

Referenced by SMAC::checkToSend(), LandmarkAgent::command(), SMAC::handleCounterTimer(), SMAC::handleCsTimer(), and LandmarkAgent::periodic_callback().

#define WAIT_ACK   5
 

Definition at line 138 of file smac.h.

Referenced by SMAC::handleACK(), SMAC::handleCTS(), and SMAC::handleGeneTimer().

#define WAIT_CTS   3
 

Definition at line 136 of file smac.h.

Referenced by SMAC::handleCTS(), SMAC::handleGeneTimer(), and SMAC::startUcast().

#define WAIT_DATA   4
 

Definition at line 137 of file smac.h.

Referenced by SMAC::checkToSend(), SMAC::handleCounterTimer(), SMAC::handleDATA(), SMAC::handleNeighNavTimer(), and SMAC::handleRTS().

#define WAIT_NEXTFRAG   6
 

Definition at line 139 of file smac.h.


Generated on Tue Apr 20 12:29:02 2004 for NS2.26SourcesOriginal by doxygen 1.3.3