#include <uan-channel.h>
Inheritance diagram for UanChannel:
Public Member Functions | |
UanChannel (void) | |
Construct a channel. | |
virtual int | command (int argc, const char *const *argv) |
Standard channel command method as in WirelessChannel. Except this also takes propagation command with argument of UanPropagation. | |
Protected Member Functions | |
virtual void | sendUp (Packet *p, Phy *txif) |
Sends packet *p from interface txif up to all nodes in nodeList. | |
virtual double | get_pdelay (Node *tnode, Node *rnode) |
Computes propagation delay between tnode and rnode. | |
void | debugf (char *fmt,...) |
Debug function to output information to stderr. Uses printf format specifications. | |
Protected Attributes | |
set< MobileNode * > | nodeList |
STL set of all nodes connected to this channel. | |
UanPropagation * | prop |
UAN Propagation model used by this channel. |
This is a simple channel class. It keeps a list of nodes using STL list, and computes propagation distance to nodes using 1500 m/s instead of the speed of light. The main departure with the standard NS2 channel class is that this node sets the RxPr member of txinfo before sending a packet up to the phy layer.
This class depends on a UanPropagation class being linked to it in the NS2 TCL
void UanChannel::sendUp | ( | Packet * | p, | |
Phy * | txif | |||
) | [protected, virtual] |
Sends packet *p from interface txif up to all nodes in nodeList.
p | Pointer to packet to send | |
txif | Pointer to sending UanPhy based interface |
Reimplemented in UanChannelBhp.
double UanChannel::get_pdelay | ( | Node * | tnode, | |
Node * | rnode | |||
) | [protected, virtual] |
Computes propagation delay between tnode and rnode.
tnode | Pointer to MobileNode class of transmitting node | |
rnode | Pointer to MobileNode class of receiving node |