|
DESERT 4.0.0
|
#include <uwPosBasedRtROV.h>


Public Member Functions | |
| UwPosBasedRtROV () | |
| virtual | ~UwPosBasedRtROV () |
Protected Member Functions | |
| virtual int | command (int, const char *const *) |
| virtual void | recv (Packet *p) |
| virtual void | initPkt (Packet *p) |
| virtual uint8_t | findNextHop (const Packet *p) |
| virtual void | setMaxTxRange (double newRange) |
Private Types | |
| typedef std::pair< Position, uint8_t > | pair_posIP |
Private Member Functions | |
| virtual double | nodesDistance (Position &p1, Position &p2) |
Private Attributes | |
| uint8_t | ipAddr |
| double | maxTxRange |
| UWSMPosition * | ROV_pos |
| std::list< pair_posIP > | list_posIP |
| int | debug_ |
|
private |
| UwPosBasedRtROV::UwPosBasedRtROV | ( | ) |
Constructor of UwPosBasedRtROV class
References debug_, and maxTxRange.
|
virtual |
Destructor of UwPosBasedRtROV class
|
protectedvirtual |
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). |
References UWSMPosition::getX(), UWSMPosition::getY(), UWSMPosition::getZ(), ipAddr, list_posIP, ROV_pos, and setMaxTxRange().

|
protectedvirtual |
Find next hop of a packet passed as input
| Packet* | Pointer to the packet will be received. |
References debug_, ipAddr, list_posIP, maxTxRange, nodesDistance(), and ROV_pos.
Referenced by recv().

|
protectedvirtual |
Initialize field of hdr_uwpos_based_rt
| Packet* | Pointer to the packet will be received. |
References debug_, UWSMPosition::getSpeed(), UWSMPosition::getX(), UWSMPosition::getXdest(), UWSMPosition::getY(), UWSMPosition::getYdest(), UWSMPosition::getZ(), UWSMPosition::getZdest(), ipAddr, and ROV_pos.
Referenced by recv().

|
privatevirtual |
Compute absoulute distance between 2 nodes
| Position | position first node. |
| Position | position second node. |
Referenced by findNextHop().
|
protectedvirtual |
Performs the reception of packets from upper and lower layers.
| Packet* | Pointer to the packet will be received. |
References hdr_uwip::daddr(), debug_, findNextHop(), initPkt(), and ipAddr.

|
protectedvirtual |
Set maximum transmission range
| float | New value for transmission range. |
References debug_, ipAddr, and maxTxRange.
Referenced by command().
|
private |
Flag to enable or disable dirrefent levels of debug.
Referenced by findNextHop(), initPkt(), recv(), setMaxTxRange(), and UwPosBasedRtROV().
|
private |
Referenced by command(), findNextHop(), initPkt(), recv(), and setMaxTxRange().
|
private |
List with position of all the other nodes with its IP.
Referenced by command(), and findNextHop().
|
private |
Maximum transmission range, in meters, for this node.
Referenced by findNextHop(), setMaxTxRange(), and UwPosBasedRtROV().
|
private |
Pointer to ROV position. Give ROV position via TCL command.
Referenced by command(), findNextHop(), and initPkt().