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

#include <uwPosBasedRt.h>

Inheritance diagram for UwPosBasedRt:
Collaboration diagram for UwPosBasedRt:

Public Member Functions

 UwPosBasedRt ()
 
virtual ~UwPosBasedRt ()
 

Protected Member Functions

virtual int command (int, const char *const *)
 
virtual void recv (Packet *p)
 
virtual void initPkt (Packet *p)
 
virtual void updatePosInfo (Packet *p)
 
virtual uint8_t findNextHop (const Packet *p)
 
virtual void addRoute (const uint8_t &dst, const uint8_t &next, const int toFixedNode)
 
virtual void setMaxTxRange (double newRange)
 

Private Member Functions

virtual double nodesDistance (Position &p1, Position &p2)
 

Private Attributes

uint8_t ipAddr
 
double timestamp
 
double ROV_speed
 
double maxTxRange
 
Position node_pos
 
std::map< uint8_t, uint8_t > static_routing
 
std::map< uint8_t, UwPosEstimationROV_routing
 
int debug_
 

Detailed Description

Definition at line 60 of file uwPosBasedRt.h.

Constructor & Destructor Documentation

◆ UwPosBasedRt()

UwPosBasedRt::UwPosBasedRt ( )

Constructor of UwPosBasedRt class.

Definition at line 63 of file uwPosBasedRt.cpp.

◆ ~UwPosBasedRt()

UwPosBasedRt::~UwPosBasedRt ( )
virtual

Destructor of UwPosBasedRt class.

Definition at line 86 of file uwPosBasedRt.cpp.

Member Function Documentation

◆ addRoute()

void UwPosBasedRt::addRoute ( const uint8_t &  dst,
const uint8_t &  next,
const int  toFixedNode 
)
protectedvirtual

Add new entry to the routing table.

Parameters
uint8_tAddress of the destination.
uint8_tAddress of the next hop.
intParameter to find if the dest address is a static node or a vehicle

Definition at line 386 of file uwPosBasedRt.cpp.

◆ command()

int UwPosBasedRt::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 92 of file uwPosBasedRt.cpp.

◆ findNextHop()

uint8_t UwPosBasedRt::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 325 of file uwPosBasedRt.cpp.

◆ initPkt()

void UwPosBasedRt::initPkt ( Packet *  p)
protectedvirtual

Initialize field of hdr_uwpos_based_rt

Parameters
Packet*Pointer to the packet will be received.

Definition at line 203 of file uwPosBasedRt.cpp.

◆ nodesDistance()

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

Compute absoulute distance between 2 nodes.

Parameters
Positionposition first node.
Positionposition second node.

Definition at line 374 of file uwPosBasedRt.cpp.

◆ recv()

void UwPosBasedRt::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 144 of file uwPosBasedRt.cpp.

◆ setMaxTxRange()

void UwPosBasedRt::setMaxTxRange ( double  newRange)
protectedvirtual

Set maximum transmission range.

Parameters
floatNew value for transmission range.

Definition at line 428 of file uwPosBasedRt.cpp.

◆ updatePosInfo()

void UwPosBasedRt::updatePosInfo ( Packet *  p)
protectedvirtual

update informations regardin position, if needed

Parameters
Packet*Pointer to the packet will be received.

Definition at line 252 of file uwPosBasedRt.cpp.

Member Data Documentation

◆ debug_

int UwPosBasedRt::debug_
private

Flag to enable or disable dirrefent levels of debug.

Definition at line 157 of file uwPosBasedRt.h.

◆ ipAddr

uint8_t UwPosBasedRt::ipAddr
private

Definition at line 142 of file uwPosBasedRt.h.

◆ maxTxRange

double UwPosBasedRt::maxTxRange
private

Maximum transmission range, in meters, for this node.

Definition at line 147 of file uwPosBasedRt.h.

◆ node_pos

Position UwPosBasedRt::node_pos
private

Position of this node.

Definition at line 150 of file uwPosBasedRt.h.

◆ ROV_routing

std::map<uint8_t,UwPosEstimation> UwPosBasedRt::ROV_routing
private

Rouitng table for ROV.

Definition at line 155 of file uwPosBasedRt.h.

◆ ROV_speed

double UwPosBasedRt::ROV_speed
private

Last known ROV speed.

Definition at line 146 of file uwPosBasedRt.h.

◆ static_routing

std::map<uint8_t, uint8_t> UwPosBasedRt::static_routing
private

Routing table: destination - next hop.

Definition at line 152 of file uwPosBasedRt.h.

◆ timestamp

double UwPosBasedRt::timestamp
private

Timestamp for the validity of last received ROV position.

Definition at line 144 of file uwPosBasedRt.h.


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