DESERT 3.5.1
|
#include <uwsr.h>
Classes | |
class | AckTimer |
class | BackOffTimer |
class | ListenTimer |
class | UWSRTimer |
class | WaitTxTimer |
Public Member Functions | |
MMacUWSR () | |
virtual | ~MMacUWSR () |
virtual int | command (int argc, const char *const *argv) |
Protected Member Functions | |
virtual void | recvFromUpperLayers (Packet *p) |
virtual void | Mac2PhyStartTx (Packet *p) |
virtual void | Phy2MacEndTx (const Packet *p) |
virtual void | Phy2MacStartRx (const Packet *p) |
virtual void | Phy2MacEndRx (Packet *p) |
virtual double | computeTxTime (UWSR_PKT_TYPE type) |
virtual void | initPkt (Packet *p, UWSR_PKT_TYPE pkt_type, int dest_addr=0) |
virtual double | getBackoffTime () |
void | setBackoffCount () |
int | getBackoffCount () |
virtual void | statePreTxData () |
virtual void | txAck (int dest_addr) |
virtual void | stateIdle () |
virtual void | stateRxIdle () |
virtual void | stateTxData () |
virtual void | stateTxAck (int dest_addr) |
virtual void | stateBackoff () |
virtual void | stateRxBackoff () |
virtual void | stateWaitAck () |
virtual void | stateRxinPreTxData () |
virtual void | stateRxWaitAck () |
virtual void | stateListen () |
virtual void | stateRxListen () |
virtual void | stateCheckListenExpired () |
virtual void | stateCheckAckExpired () |
virtual void | stateCheckBackoffExpired () |
virtual void | stateCheckWaitTxExpired () |
virtual void | stateRxData (Packet *p) |
virtual void | stateRxAck (Packet *p) |
virtual void | stateRxPacketNotForMe (Packet *p) |
virtual void | printStateInfo (double delay=0) |
virtual void | initInfo () |
virtual void | refreshState (UWSR_STATUS state) |
virtual void | refreshReason (UWSR_REASON_STATUS reason) |
virtual void | exitBackoff () |
virtual double | getRTT () |
virtual void | updateLastDataIdRx (int id) |
virtual void | waitForUser () |
virtual int | getRemainingPkts () |
virtual void | incrUpperDataRx () |
virtual int | getPktSeqNum (Packet *p) |
virtual int | getMacAddress (Packet *p) |
bool | chkItemInmapTxRounds (int mac_addr, int seq_num) |
void | setCurrTxRounds (int mac_addr, int seq_num) |
void | incrCurrTxRounds (int mac_addr, int seq_num) |
int | getCurrTxRounds (int mac_addr, int seq_num) |
void | eraseItemFromTxRounds (int mac_addr, int seq_num) |
void | putPktInQueue (Packet *p) |
void | eraseItemFromPktQueue (int mac_addr, int seq_num) |
void | putAckTimerInMap (int mac_addr, int seq_num) |
void | eraseItemFrommapAckTimer (int mac_addr, int seq_num) |
void | putStartTxTimeInMap (int mac_addr, int seq_num, double start_tx_time) |
void | eraseItemFrommapCalcAck (int mac_addr, int seq_num) |
virtual int | checkAckTimer (CHECK_ACK_TIMER type) |
virtual void | eraseExpiredItemsFrommapAckandCalc () |
virtual bool | checkMultipleTx (int rcv_mac_addr) |
virtual int | getPktsCanSendIn1RTT (int mac_addr) |
virtual void | putRTTInMap (int mac_addr, double rtt) |
double | getRTTInMap (int mac_addr) |
void | incrPktsSentIn1RTT () |
void | rstPktsSentIn1RTT () |
int | getPktsSentIn1RTT () |
void | incrAcksRcvIn1RTT () |
void | rstAcksRcvIn1RTT () |
int | getAcksRcvIn1RTT () |
void | incrPktsLostCount () |
void | rstPktsLostCount () |
int | getPktsLostCount () |
virtual bool | prepBeforeTx (int mac_addr, int seq_num) |
virtual double | calcWaitTxTime (int mac_addr) |
void | updateTxStatus (macAddress mac_addr, int rcv_acks) |
virtual int | calWindowSize (macAddress mac_addr) |
void | calTotalPktsTx () |
double | getAvgPktsTxIn1RTT () |
Static Protected Attributes | |
static bool | initialized = false |
static const double | prop_speed = 1500.0 |
static map< UWSR_STATUS, string > | status_info |
static map< UWSR_REASON_STATUS, string > | reason_info |
static map< UWSR_PKT_TYPE, string > | pkt_type_info |
This is the base class of MMacUWSR protocol, which is a derived class of MMac.
|
protected |
|
protected |
|
protected |
Enumeration class which tells the nodes the reason why it is in this state.
First enumerator is given value 1.
|
protected |
Enumeration class of MMacUWSR status.
First enumerator is given value 1.
|
protected |
|
virtual |
|
protectedvirtual |
|
inlineprotected |
|
protectedvirtual |
|
protectedvirtual |
It checks whether any acknowledgement timer expire.
Since, in UWSR, we are transmitting multiple packet in a single RTT, we have to check AckTimer container whether any acknowledgement timer expire or not.
type | which is a CHECK_ACK_TIMER data type. |
|
protectedvirtual |
|
inlineprotected |
handling transmission round
It checks whether the same packet is transmitted before.
mac | address of the node |
sequence | number of the packet. |
|
virtual |
TCL command interpreter.
It implements the following OTcl methods:
argc | number of arguments in argv |
argv | array of strings which are the command parameters (Note that argv[0] is the name of the object) |
|
protectedvirtual |
|
protectedvirtual |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protectedvirtual |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protectedvirtual |
|
inlineprotected |
|
inlineprotectedvirtual |
|
protectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
This method, initialize the packet.
If the packet is received from the upper layer, it adds the header (if any). It also sets the fields of ACK packet.
Packet | pointer P. The packet can be Data packet or ACK packet. |
pkt_type | is an UWSR_PKT_TYPE. Packet can be either Data packet or ACK packet. |
dest_addr | is a integer data type. It is initialized as 0. |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
It checks how many times a packet is transmitted.
If it reaches the threshold of retransmission, the packet is deleted from the all containers.
mac | address of the node |
sequence | number of the packet. |
|
protectedvirtual |
|
inlineprotected |
|
inlineprotected |
|
protectedvirtual |
Put RTT of all the nodes which are whithin the transmission range of a node.
Whever a node receives a packet from another node, it put the RTT information of that node in a container.
mac | address of the node which transmits the packet |
RTT | of the sender and receiver. |
|
inlineprotected |
|
protectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotected |
How many acknowledgements receive for the transmitting packets in a single RTT.
It stores this information to calculte the next window size (i.e. number of packets can be exchanged between a sender-receiver pair.
mac | address of the receiving node. |
number | of receive acknowledgement packets in a single RTT |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
An object of the BackOffTimer class.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
An object of the ListenTimer class.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
An object of the WaitTxTimer class.
|
protected |
|
protected |