DESERT 3.5.1
Loading...
Searching...
No Matches
UwPosBasedRtROV Class Reference

#include <uwPosBasedRtROV.h>

Inheritance diagram for UwPosBasedRtROV:
Collaboration diagram for UwPosBasedRtROV:

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
 
UWSMPositionROV_pos
 
std::list< pair_posIPlist_posIP
 
int debug_
 

Detailed Description

Definition at line 59 of file uwPosBasedRtROV.h.

Member Typedef Documentation

◆ pair_posIP

typedef std::pair<Position,uint8_t> UwPosBasedRtROV::pair_posIP
private

Definition at line 132 of file uwPosBasedRtROV.h.

Constructor & Destructor Documentation

◆ UwPosBasedRtROV()

UwPosBasedRtROV::UwPosBasedRtROV ( )

Constructor of UwPosBasedRtROV class.

Definition at line 62 of file uwPosBasedRtROV.cpp.

◆ ~UwPosBasedRtROV()

UwPosBasedRtROV::~UwPosBasedRtROV ( )
virtual

Destructor of UwPosBasedRtROV class.

Definition at line 77 of file uwPosBasedRtROV.cpp.

Member Function Documentation

◆ command()

int UwPosBasedRtROV::command ( int  argc,
const char *const *  argv 
)
protectedvirtual

TCL command interpreter.

It implements the following OTcl methods:

Parameters
argcNumber of arguments in argv.
argvArray of strings which are the command parameters (Note that argv[0] is the name of the object).
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.

Definition at line 83 of file uwPosBasedRtROV.cpp.

◆ findNextHop()

uint8_t UwPosBasedRtROV::findNextHop ( const Packet *  p)
protectedvirtual

Find next hop of a packet passed as input.

Parameters
Packet*Pointer to the packet will be received.

Definition at line 227 of file uwPosBasedRtROV.cpp.

◆ initPkt()

void UwPosBasedRtROV::initPkt ( Packet *  p)
protectedvirtual

Initialize field of hdr_uwpos_based_rt

Parameters
Packet*Pointer to the packet will be received.

Definition at line 190 of file uwPosBasedRtROV.cpp.

◆ nodesDistance()

double UwPosBasedRtROV::nodesDistance ( Position &  p1,
Position &  p2 
)
privatevirtual

Compute absoulute distance between 2 nodes.

Parameters
Positionposition first node.
Positionposition second node.

Definition at line 258 of file uwPosBasedRtROV.cpp.

◆ recv()

void UwPosBasedRtROV::recv ( Packet *  p)
protectedvirtual

Performs the reception of packets from upper and lower layers.

Parameters
Packet*Pointer to the packet will be received.

Definition at line 138 of file uwPosBasedRtROV.cpp.

◆ setMaxTxRange()

void UwPosBasedRtROV::setMaxTxRange ( double  newRange)
protectedvirtual

Set maximum transmission range.

Parameters
floatNew value for transmission range.

Definition at line 271 of file uwPosBasedRtROV.cpp.

Member Data Documentation

◆ debug_

int UwPosBasedRtROV::debug_
private

Flag to enable or disable dirrefent levels of debug.

Definition at line 136 of file uwPosBasedRtROV.h.

◆ ipAddr

uint8_t UwPosBasedRtROV::ipAddr
private

Definition at line 124 of file uwPosBasedRtROV.h.

◆ list_posIP

std::list<pair_posIP> UwPosBasedRtROV::list_posIP
private

List with position of all the other nodes with its IP.

Definition at line 133 of file uwPosBasedRtROV.h.

◆ maxTxRange

double UwPosBasedRtROV::maxTxRange
private

Maximum transmission range, in meters, for this node.

Definition at line 126 of file uwPosBasedRtROV.h.

◆ ROV_pos

UWSMPosition* UwPosBasedRtROV::ROV_pos
private

Pointer to ROV position.

Give ROV position via TCL command.

Definition at line 129 of file uwPosBasedRtROV.h.


The documentation for this class was generated from the following files: