#include <uwPosBasedRt.h>
|
| 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) |
| |
◆ UwPosBasedRt()
| UwPosBasedRt::UwPosBasedRt |
( |
| ) |
|
◆ ~UwPosBasedRt()
| UwPosBasedRt::~UwPosBasedRt |
( |
| ) |
|
|
virtual |
◆ 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_t | Address of the destination. |
| uint8_t | Address of the next hop. |
| int | Parameter to find if the dest address is a static node or a vehicle |
References debug_, ipAddr, ROV_routing, and static_routing.
Referenced by command().
◆ command()
| int UwPosBasedRt::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
| |
|
protectedvirtual |
TCL command interpreter. It implements the following OTcl methods:
- Parameters
-
| 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). |
- Returns
- TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.
References addRoute(), ipAddr, node_pos, and setMaxTxRange().
◆ findNextHop()
| uint8_t UwPosBasedRt::findNextHop |
( |
const Packet * |
p | ) |
|
|
protectedvirtual |
◆ initPkt()
| void UwPosBasedRt::initPkt |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
Initialize field of hdr_uwpos_based_rt
- Parameters
-
| Packet* | Pointer to the packet will be received. |
References hdr_uwip::daddr(), debug_, hdr_uwpos_based_rt::IP_ROV(), ipAddr, ROV_routing, hdr_uwpos_based_rt::ROV_speed(), hdr_uwpos_based_rt::timestamp(), hdr_uwpos_based_rt::x_ROV(), hdr_uwpos_based_rt::x_waypoint(), hdr_uwpos_based_rt::y_ROV(), hdr_uwpos_based_rt::y_waypoint(), hdr_uwpos_based_rt::z_ROV(), and hdr_uwpos_based_rt::z_waypoint().
Referenced by recv().
◆ nodesDistance()
| double UwPosBasedRt::nodesDistance |
( |
Position & |
p1, |
|
|
Position & |
p2 |
|
) |
| |
|
privatevirtual |
Compute absoulute distance between 2 nodes
- Parameters
-
| Position | position first node. |
| Position | position second node. |
Referenced by findNextHop().
◆ recv()
| void UwPosBasedRt::recv |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
◆ setMaxTxRange()
| void UwPosBasedRt::setMaxTxRange |
( |
double |
newRange | ) |
|
|
protectedvirtual |
◆ updatePosInfo()
| void UwPosBasedRt::updatePosInfo |
( |
Packet * |
p | ) |
|
|
protectedvirtual |
update informations regardin position, if needed
- Parameters
-
| Packet* | Pointer to the packet will be received. |
References debug_, hdr_uwpos_based_rt::IP_ROV(), ipAddr, ROV_routing, hdr_uwpos_based_rt::ROV_speed(), hdr_uwpos_based_rt::timestamp(), hdr_uwpos_based_rt::x_ROV(), hdr_uwpos_based_rt::x_waypoint(), hdr_uwpos_based_rt::y_ROV(), hdr_uwpos_based_rt::y_waypoint(), hdr_uwpos_based_rt::z_ROV(), and hdr_uwpos_based_rt::z_waypoint().
Referenced by recv().
◆ debug_
◆ ipAddr
| uint8_t UwPosBasedRt::ipAddr |
|
private |
◆ maxTxRange
| double UwPosBasedRt::maxTxRange |
|
private |
◆ node_pos
| Position UwPosBasedRt::node_pos |
|
private |
◆ ROV_routing
◆ ROV_speed
| double UwPosBasedRt::ROV_speed |
|
private |
◆ static_routing
| std::map<uint8_t, uint8_t> UwPosBasedRt::static_routing |
|
private |
◆ timestamp
| double UwPosBasedRt::timestamp |
|
private |
Timestamp for the validity of last received ROV position.
The documentation for this class was generated from the following files: