39#ifndef UW_POS_BASED_RT_H
40#define UW_POS_BASED_RT_H
42#define DROP_NEXT_HOP_NOT_FOUND \
44#define DROP_IP_NOT_SET \
47#define pi (4 * atan(1.0))
84 virtual int command(
int,
const char *
const *);
91 virtual void recv(Packet* p);
98 virtual void initPkt(Packet* p);
123 const uint8_t &dst,
const uint8_t &next,
const int toFixedNode);
virtual int command(int, const char *const *)
TCL command interpreter.
double ROV_speed
Last known ROV speed.
virtual ~UwPosBasedRt()
Destructor of UwPosBasedRt class.
virtual void recv(Packet *p)
Performs the reception of packets from upper and lower layers.
virtual void setMaxTxRange(double newRange)
Set maximum transmission range.
virtual void addRoute(const uint8_t &dst, const uint8_t &next, const int toFixedNode)
Add new entry to the routing table.
double maxTxRange
Maximum transmission range, in meters, for this node.
std::map< uint8_t, uint8_t > static_routing
Routing table: destination - next hop.
virtual uint8_t findNextHop(const Packet *p)
Find next hop of a packet passed as input.
virtual void updatePosInfo(Packet *p)
update informations regardin position, if needed
double timestamp
Timestamp for the validity of last received ROV position.
Position node_pos
Position of this node.
UwPosBasedRt()
Constructor of UwPosBasedRt class.
int debug_
Flag to enable or disable dirrefent levels of debug.
std::map< uint8_t, UwPosEstimation > ROV_routing
Rouitng table for ROV.
virtual void initPkt(Packet *p)
Initialize field of hdr_uwpos_based_rt
virtual double nodesDistance(Position &p1, Position &p2)
Compute absoulute distance between 2 nodes.
Provides the header description for UwPosBasedRt packets.
Estimate position given initial point, end point and time.
Provides the UWIP packets header description. Definition of the class that define the network layer.
Provides the definition of the class UWSMPosition.