class <Mac/Csma> MacCsma : public Mac


Inheritance:


Public Methods

virtual void endofContention(Packet* p)
MacCsma()
virtual void resume(Packet* p = 0)
virtual void send(Packet* p)

Protected Fields

int csense_
carrier sense or not
int cw_
current contention window
int cwmax_
maximum contention window (backoff range)
int cwmin_
minimum contention window for 1st backoff
Event eEoc_
event at the end-of-contention
MacHandlerEoc hEoc_
handle end-of-contention
double ifs_
interframe spacing
int rtx_
number of retransmission attempt
int rtxLimit_
maximum number of retransmission attempt
double slotTime_
duration of contention slot in seconds
double txstart_
when the transmission starts

Protected Methods

virtual void backoff(Handler* h, Packet* p, double delay=0)

Inherited from Mac:

Public Fields

Mac instvar mclass_

Public Methods

inline int addr()
inline double bandwidth()
Mac instproc classify-macs {peerinfo}
virtual inline int hdr_dst(char* hdr, int dst = -2)
virtual inline int hdr_src(char* hdr, int src = -2)
virtual inline int hdr_type(char *hdr, u_int16_t type = 0)
virtual void installTap(Tap *t)
virtual void recv(Packet* p, Handler* h)
virtual void sendDown(Packet* p)
virtual void sendUp(Packet *p)
inline MacState state()
inline MacState state(int m)
inline double txtime(Packet* p)
inline double txtime(int bytes)

Protected Fields

double bandwidth_
Handler* callback_
Channel* channel_
double delay_
MacHandlerResume hRes_
MacHandlerSend hSend_
int index_
Event intr_
LL* ll_
Phy* netif_
int off_mac_
Packet* pktRx_
Packet* pktTx_
MacState state_
Tap* tap_

Protected Methods

int command(int argc, const char*const* argv)
virtual int initialized()

Private Fields

NsObject* logtarget_

Private Methods

void mac_log(Packet *p)

Inherited from BiConnector:

Public Methods

NsObject* downtarget()
virtual void drop(Packet* p)
inline NsObject* uptarget()

Protected Fields

NsObject* downtarget_
NsObject* drop_
NsObject* uptarget_

Protected Methods

virtual void drop(Packet* p, const char *s)

Inherited from NsObject:

Public Methods

virtual void debug(const char *fmt, ...)
virtual int delay_bind_dispatch(const char *varName, const char *localName, TclObject *tracer)
virtual void delay_bind_init_all()
int isdebug()

Protected Fields

int debug_
int off_cmn_
int off_flags_

Protected Methods

void handle(Event*)
virtual void reset()

Inherited from Handler:


Documentation

MacCsma()

virtual void send(Packet* p)

virtual void resume(Packet* p = 0)

virtual void endofContention(Packet* p)

virtual void backoff(Handler* h, Packet* p, double delay=0)

double txstart_
when the transmission starts

double ifs_
interframe spacing

double slotTime_
duration of contention slot in seconds

int cw_
current contention window

int cwmin_
minimum contention window for 1st backoff

int cwmax_
maximum contention window (backoff range)

int rtx_
number of retransmission attempt

int rtxLimit_
maximum number of retransmission attempt

int csense_
carrier sense or not

Event eEoc_
event at the end-of-contention

MacHandlerEoc hEoc_
handle end-of-contention


Direct child classes:
MacCsmaCd
MacCsmaCa

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

Adapted for the NS documentation page

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de