|
DESERT 4.0.0
|
#include <uwal.h>


Public Member Functions | |
| Uwal () | |
| ~Uwal () | |
| virtual int | recvSyncClMsg (ClMessage *m) |
| virtual void | recv (Packet *) |
| virtual int | command (int, const char *const *) |
| size_t | getPSDU () |
Protected Member Functions | |
| void | ALqueueManager () |
| void | initializeHdr (Packet *, unsigned int) |
| void | fragmentPkt (Packet *) |
| void | reassembleFrames (Packet *) |
| void | checkRxFrameSet () |
| virtual void | startTx (Packet *) |
| virtual void | endTx (Packet *) |
| virtual void | startRx (Packet *) |
| virtual void | endRx (Packet *) |
| virtual double | getTxDuration (Packet *) |
| virtual int | getModulationType (Packet *) |
| virtual bool | isInPERList (int mac_addr) |
| virtual double | getPERfromID (int mac_addr) |
Protected Attributes | |
| int | nodeID |
| unsigned int | pkt_counter |
| packer * | pPacker |
| size_t | PSDU |
| string | dummyStr |
| int | debug_ |
| std::queue< Packet * > | sendDownPkts |
| std::queue< Packet * > | sendDownFrames |
| std::queue< Packet * > | sendUpFrames |
| std::queue< Packet * > | sendUpPkts |
| list< PERListElement > | PERList |
| std::map< RxFrameSetKey, RxFrameSet > | sendUpFrameSet |
Private Attributes | |
| TxFrameTimer | InterframeTmr |
| double | interframe_period |
| double | frame_set_validity |
| int | frame_padding |
| int | force_endTx_ |
| bool | has_tap_clmsg |
Friends | |
| class | TxFrameTimer |
The main class implementing the module used to implement the adaptation layer between ns2/NS-Miracle and binary data packets.
| Uwal::Uwal | ( | ) |
Class constructor.
References debug_, dummyStr, force_endTx_, frame_padding, frame_set_validity, interframe_period, nodeID, and PSDU.
| Uwal::~Uwal | ( | ) |
Class destructor.
References InterframeTmr.
|
protected |
Method responsible to manage the queueing system of Adaptation Layer
References ALqueueManager(), checkRxFrameSet(), endRx(), fragmentPkt(), reassembleFrames(), sendDownFrames, sendDownPkts, sendUpFrames, sendUpPkts, startRx(), and startTx().
Referenced by ALqueueManager(), TxFrameTimer::expire(), and recv().

|
protected |
Method responsible to check for errors the received frames
References hdr_uwal::binHdrLength(), hdr_uwal::binPkt(), hdr_uwal::binPktLength(), debug_, frame_set_validity, getPERfromID(), initializeHdr(), isInPERList(), nodeID, pPacker, sendUpFrameSet, sendUpPkts, hdr_uwal::srcID(), and packer::unpackPayload().
Referenced by ALqueueManager().

|
virtual |
Method to map tcl commands into c++ methods.
| argc | number of arguments in argv |
| argv | array of arguments where argv[3] is the tcl command name and argv[4, 5, ...] are the parameters for the corresponding c++ method. |
References dummyStr, PERListElement::node_ID, PERListElement::per, PERList, pPacker, and PSDU.
|
protectedvirtual |
Method to end a packet reception.
| p | pointer to the last received packet. |
Referenced by ALqueueManager().
|
protectedvirtual |
Method to end a packet transmission. This method is also in charge to send a cross layer message Phy2MacEndTx(p) to notify the above layers of the simulator about the end of a transmission, see http://telecom.dei.unipd.it/ns/miracle/doxygen/classMPhy.html#c8c2f52d3833fed8ac736aca0ee52c98.
| p | pointer to the last transmitted packet. |
Referenced by startTx().
|
protected |
Method responsible to fragment the packet
| Pointer | to the packet that are going to be fragmented |
References hdr_uwal::binHdrLength(), hdr_uwal::binPkt(), hdr_uwal::binPktLength(), debug_, frame_padding, hdr_uwal::framePayloadOffset(), packer::getHdrBytesLength(), packer::hexdump(), initializeHdr(), hdr_uwal::Mbit(), packer::packHdr(), hdr_uwal::pktID(), pPacker, PSDU, and sendDownFrames.
Referenced by ALqueueManager().

|
inlineprotectedvirtual |
Unused method at the moment. To be implemented because defined as virtual in MPhy.
|
protectedvirtual |
Method to search for the PER associated with a particular MAC address
| mac_addr | Addr of the node for which search the related Packet Error Rate |
References PERList.
Referenced by checkRxFrameSet().
|
inline |
References PSDU.
|
inlineprotectedvirtual |
Unused method at the moment. To be implemented because defined as virtual in MPhy.
|
protected |
Method responsible to initialize the headers of the packet
| Pointer | to the packet |
| ID | of the packet |
References hdr_uwal::binHdrLength(), hdr_uwal::binPkt(), hdr_uwal::binPktLength(), hdr_uwal::dummyStr(), dummyStr, hdr_uwal::framePayloadOffset(), hdr_uwal::Mbit(), nodeID, hdr_uwal::pktID(), and hdr_uwal::srcID().
Referenced by checkRxFrameSet(), fragmentPkt(), recv(), and recvSyncClMsg().

|
protectedvirtual |
Method to search a MAC address in the PER List
| mac_addr | Address to search |
References PERList.
Referenced by checkRxFrameSet().
|
protected |
Method responsible to reassemble the various fragments in a unique packets
| pointer | to the original Packet |
References hdr_uwal::binHdrLength(), hdr_uwal::binPkt(), hdr_uwal::binPktLength(), debug_, hdr_uwal::framePayloadOffset(), hdr_uwal::Mbit(), nodeID, hdr_uwal::pktID(), pPacker, PSDU, sendUpFrameSet, sendUpPkts, RxFrameSet::setError(), hdr_uwal::srcID(), and RxFrameSet::UpdateRxFrameSet().
Referenced by ALqueueManager().

|
virtual |
Method to handle the reception of packets arriving from the upper layers of the network simulator.
| p | pointer to the packet that has been received from the simulator's upper layers. |
References ALqueueManager(), debug_, has_tap_clmsg, initializeHdr(), nodeID, packer::packHdr(), packer::packPayload(), pkt_counter, pPacker, sendDownPkts, sendUpFrames, and packer::unpackHdr().

|
virtual |
Method to handle the reception of a synchronous crosslayer message
| m | pointer to the crosslayer message. |
References debug_, force_endTx_, has_tap_clmsg, initializeHdr(), hdr_uwal::Mbit(), nodeID, packer::packHdr(), packer::packPayload(), pkt_counter, and pPacker.

|
protectedvirtual |
Method to start a packet reception. This method is also in charge to send a cross layer message Phy2MacStartRx(p) to notify the above layers of the simulator about the start of a reception, see http://telecom.dei.unipd.it/ns/miracle/doxygen/classMPhy.html#a15cc91b98013e1c631ad85072867ab6.
| p | pointer to the last received packet. |
Referenced by ALqueueManager().
|
protectedvirtual |
Method to start the packet transmission.
| p | pointer to the packet to be transmitted. |
References endTx(), force_endTx_, interframe_period, InterframeTmr, and hdr_uwal::Mbit().
Referenced by ALqueueManager().

|
friend |
Friend class used to implement the timer handler.
|
protected |
String containing dummy characters to be used as padding chars if necessary. Flag to enable debug mode (i.e., printing of debug messages) if set to 1.
Referenced by checkRxFrameSet(), fragmentPkt(), reassembleFrames(), recv(), recvSyncClMsg(), and Uwal().
|
protected |
Referenced by command(), initializeHdr(), and Uwal().
|
private |
0 not force, otherwise force endTx
Referenced by recvSyncClMsg(), startTx(), and Uwal().
|
private |
Flag to determine if perfoming bit padding up to PSDU size.
Referenced by fragmentPkt(), and Uwal().
|
private |
Time of validity of a frame set
Referenced by checkRxFrameSet(), and Uwal().
|
private |
True if received a ClMessage from uwTAP.
Referenced by recv(), and recvSyncClMsg().
|
private |
|
private |
Object of the class TxFrameTimer
|
protected |
Node ID
Referenced by checkRxFrameSet(), initializeHdr(), reassembleFrames(), recv(), recvSyncClMsg(), and Uwal().
|
protected |
PER list (couple of ID of the node and Packet Error Rate associated )
Referenced by command(), getPERfromID(), and isInPERList().
|
protected |
Counter for the pktID to set in TX.
Referenced by recv(), and recvSyncClMsg().
|
protected |
Pointer to the packer of the protocol headers
Referenced by checkRxFrameSet(), command(), fragmentPkt(), reassembleFrames(), recv(), and recvSyncClMsg().
|
protected |
size of the PSDU
Referenced by command(), fragmentPkt(), getPSDU(), reassembleFrames(), and Uwal().
|
protected |
queue of the frames to send down
Referenced by ALqueueManager(), and fragmentPkt().
|
protected |
queue of the packet to send down to the modem
Referenced by ALqueueManager(), and recv().
|
protected |
queue of the frames to send up to the upper protocols
Referenced by ALqueueManager(), and recv().
|
protected |
map of the frames to send up
Referenced by checkRxFrameSet(), and reassembleFrames().
|
protected |
queue of the packets to send up to the upper protocols
Referenced by ALqueueManager(), checkRxFrameSet(), and reassembleFrames().