ns2 Network Simulator      C++ Class Hierarchy of version ns-snapshot-20040722
Home |  Source Code |  Manual |  FAQ |  Mailing List Archive |  Search |  Download | 

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

SMAC Class Reference

#include <smac.h>

Inheritance diagram for SMAC:

Mac BiConnector NsObject TclObject Handler List of all members.

Public Member Functions

 SMAC (void)
 ~SMAC ()
void recv (Packet *p, Handler *h)

Protected Member Functions

void handleGeneTimer ()
void handleRecvTimer ()
void handleSendTimer ()
void handleNavTimer ()
void handleNeighNavTimer ()
void handleCsTimer ()
void handleCounterTimer (int i)
int command (int argc, const char *const *argv)
virtual int initialized ()

Protected Attributes

double slotTime_
double slotTime_sec_
double difs_
double sifs_
double eifs_
double guardTime_
double byte_tx_time_
double dutyCycle_

Private Member Functions

void setMySched (Packet *syncpkt)
void sleep ()
void wakeup ()
void rxMsgDone (Packet *p)
void handleRTS (Packet *p)
void handleCTS (Packet *p)
void handleDATA (Packet *p)
void handleACK (Packet *p)
void handleSYNC (Packet *p)
int checkToSend ()
bool chkRadio ()
void transmit (Packet *p)
bool sendMsg (Packet *p, Handler *h)
bool bcastMsg (Packet *p)
bool unicastMsg (int n, Packet *p)
void txMsgDone ()
int startBcast ()
int startUcast ()
bool sendRTS ()
bool sendCTS (double duration)
bool sendDATA ()
bool sendACK (double duration)
bool sendSYNC ()
void sentRTS (Packet *p)
void sentCTS (Packet *p)
void sentDATA (Packet *p)
void sentACK (Packet *p)
void sentSYNC (Packet *p)
void collision (Packet *p)
void capture (Packet *p)
double txtime (Packet *p)
void updateNav (double duration)
void updateNeighNav (double duration)
void mac_log (Packet *p)
void discard (Packet *p, const char *why)
int drop_RTS (Packet *p, const char *why)
int drop_CTS (Packet *p, const char *why)
int drop_DATA (Packet *p, const char *why)
int drop_SYNC (Packet *p, const char *why)
int hdr_dst (char *hdr, int dst=-2)
int hdr_src (char *hdr, int src=-2)
int hdr_type (char *hdr, u_int16_t type=0)

Private Attributes

int state_
int radioState_
int tx_active_
int mac_collision_
int sendAddr_
int recvAddr_
double nav_
double neighNav_
SmacNavTimer mhNav_
SmacNeighNavTimer mhNeighNav_
SmacSendTimer mhSend_
SmacRecvTimer mhRecv_
SmacGeneTimer mhGene_
SmacCsTimer mhCS_
SmacCounterTimermhCounter_ [SMAC_MAX_NUM_SCHEDULES]
int numRetry_
int numExtend_
int lastRxFrag_
int howToSend_
double durSyncPkt_
double durDataPkt_
double durCtrlPkt_
double timeWaitCtrl_
SchedTable schedTab_ [SMAC_MAX_NUM_SCHEDULES]
NeighbList neighbList_ [SMAC_MAX_NUM_NEIGHBORS]
int mySyncNode_
int currSched_
int numSched_
int numNeighb_
int numBcast_
int txData_
int syncFlag_
int selfConfigFlag_
double startTime_
double syncTime_
double dataTime_
double listenTime_
double sleepTime_
double cycleTime_
int searchNeighb_
int schedListen_
int numSync_


class SmacGeneTimer
class SmacRecvTimer
class SmacSendTimer
class SmacNavTimer
class SmacNeighNavTimer
class SmacCsTimer
class SmacCounterTimer

Constructor & Destructor Documentation

SMAC::SMAC void   

SMAC::~SMAC   [inline]

Member Function Documentation

bool SMAC::bcastMsg Packet   p [private]

void SMAC::capture Packet   p [private]

int SMAC::checkToSend   [private]

bool SMAC::chkRadio   [private]

void SMAC::collision Packet   p [private]

int SMAC::command int    argc,
const char *const *    argv
[protected, virtual]

Reimplemented from Mac.

void SMAC::discard Packet   p,
const char *    why

int SMAC::drop_CTS Packet   p,
const char *    why

int SMAC::drop_DATA Packet   p,
const char *    why

int SMAC::drop_RTS Packet   p,
const char *    why

int SMAC::drop_SYNC Packet   p,
const char *    why

void SMAC::handleACK Packet   p [private]

void SMAC::handleCounterTimer int    i [protected]

void SMAC::handleCsTimer   [protected]

void SMAC::handleCTS Packet   p [private]

void SMAC::handleDATA Packet   p [private]

void SMAC::handleGeneTimer   [protected]

void SMAC::handleNavTimer   [protected]

void SMAC::handleNeighNavTimer   [protected]

void SMAC::handleRecvTimer   [protected]

void SMAC::handleRTS Packet   p [private]

void SMAC::handleSendTimer   [protected]

void SMAC::handleSYNC Packet   p [private]

int SMAC::hdr_dst char *    hdr,
int    dst = -2
[inline, private, virtual]

Reimplemented from Mac.

int SMAC::hdr_src char *    hdr,
int    src = -2
[inline, private, virtual]

Reimplemented from Mac.

int SMAC::hdr_type char *    hdr,
u_int16_t    type = 0
[inline, private, virtual]

Reimplemented from Mac.

virtual int SMAC::initialized   [inline, protected, virtual]

Reimplemented from Mac.

void SMAC::mac_log Packet   p [inline, private]

Reimplemented from Mac.

void SMAC::recv Packet   p,
Handler   h

Reimplemented from Mac.

void SMAC::rxMsgDone Packet   p [private]

bool SMAC::sendACK double    duration [private]

bool SMAC::sendCTS double    duration [private]

bool SMAC::sendDATA   [private]

bool SMAC::sendMsg Packet   p,
Handler   h

bool SMAC::sendRTS   [private]

bool SMAC::sendSYNC   [private]

void SMAC::sentACK Packet   p [private]

void SMAC::sentCTS Packet   p [private]

void SMAC::sentDATA Packet   p [private]

void SMAC::sentRTS Packet   p [private]

void SMAC::sentSYNC Packet   p [private]

void SMAC::setMySched Packet   syncpkt [private]

void SMAC::sleep   [private]

int SMAC::startBcast   [private]

int SMAC::startUcast   [private]

void SMAC::transmit Packet   p [private]

void SMAC::txMsgDone   [private]

double SMAC::txtime Packet   p [private]

Reimplemented from Mac.

bool SMAC::unicastMsg int    n,
Packet   p

void SMAC::updateNav double    duration [private]

void SMAC::updateNeighNav double    duration [private]

void SMAC::wakeup   [private]

Friends And Related Function Documentation

friend class SmacCounterTimer [friend]

friend class SmacCsTimer [friend]

friend class SmacGeneTimer [friend]

friend class SmacNavTimer [friend]

friend class SmacNeighNavTimer [friend]

friend class SmacRecvTimer [friend]

friend class SmacSendTimer [friend]

Member Data Documentation

double SMAC::byte_tx_time_ [protected]

int SMAC::currSched_ [private]

double SMAC::cycleTime_ [private]

Packet* SMAC::dataPkt_ [private]

double SMAC::dataTime_ [private]

double SMAC::difs_ [protected]

double SMAC::durCtrlPkt_ [private]

double SMAC::durDataPkt_ [private]

double SMAC::durSyncPkt_ [private]

double SMAC::dutyCycle_ [protected]

double SMAC::eifs_ [protected]

double SMAC::guardTime_ [protected]

int SMAC::howToSend_ [private]

int SMAC::lastRxFrag_ [private]

double SMAC::listenTime_ [private]

NsObject* SMAC::logtarget_ [private]

Reimplemented from Mac.

int SMAC::mac_collision_ [private]

SmacCounterTimer* SMAC::mhCounter_[SMAC_MAX_NUM_SCHEDULES] [private]

SmacCsTimer SMAC::mhCS_ [private]

SmacGeneTimer SMAC::mhGene_ [private]

SmacNavTimer SMAC::mhNav_ [private]

SmacNeighNavTimer SMAC::mhNeighNav_ [private]

SmacRecvTimer SMAC::mhRecv_ [private]

SmacSendTimer SMAC::mhSend_ [private]

int SMAC::mySyncNode_ [private]

double SMAC::nav_ [private]

struct NeighbList SMAC::neighbList_[SMAC_MAX_NUM_NEIGHBORS] [private]

double SMAC::neighNav_ [private]

int SMAC::numBcast_ [private]

int SMAC::numExtend_ [private]

int SMAC::numNeighb_ [private]

int SMAC::numRetry_ [private]

int SMAC::numSched_ [private]

int SMAC::numSync_ [private]

Packet* SMAC::pktRx_ [private]

Reimplemented from Mac.

Packet* SMAC::pktTx_ [private]

Reimplemented from Mac.

int SMAC::radioState_ [private]

int SMAC::recvAddr_ [private]

int SMAC::schedListen_ [private]

struct SchedTable SMAC::schedTab_[SMAC_MAX_NUM_SCHEDULES] [private]

int SMAC::searchNeighb_ [private]

int SMAC::selfConfigFlag_ [private]

int SMAC::sendAddr_ [private]

double SMAC::sifs_ [protected]

double SMAC::sleepTime_ [private]

double SMAC::slotTime_ [protected]

double SMAC::slotTime_sec_ [protected]

double SMAC::startTime_ [private]

int SMAC::state_ [private]

Reimplemented from Mac.

int SMAC::syncFlag_ [private]

double SMAC::syncTime_ [private]

double SMAC::timeWaitCtrl_ [private]

int SMAC::tx_active_ [private]

int SMAC::txData_ [private]

The documentation for this class was generated from the following files:
This document is generated by doxygen.