40#ifndef UWPOLLING_CMN_HDR_H
41#define UWPOLLING_CMN_HDR_H
50 (hdr_PROBE::access(p))
51#define HDR_TRIGGER(p) \
52 (hdr_TRIGGER::access(p))
56#define HDR_AUV_MULE(p) \
57 (hdr_AUV_MULE::access(p))
59#define HDR_ACK_SINK(p) \
60 (hdr_ACK_SINK::access(p))
61#define HDR_PROBE_SINK(p) \
62 (hdr_PROBE_SINK::access(p))
368 std::vector<uint16_t> &
Single location of the POLL vector.
double t_wait_
Time that a node has to wait before being polled.
Header of the ACK sent by the SINK.
static int offset_
Required by the PacketHeaderManager.
static struct hdr_ACK_SINK * access(const Packet *p)
static int & offset()
Reference to the offset variable.
std::vector< uint16_t > & id_ack()
Reference to the id_ack_ variable.
std::vector< uint16_t > id_ack_
ACK is the id of the wrong packets.
Header of the data sent from AUV MULE to SINK.
uint16_t pkt_uid_
unique ID of the transmitted packet by the AUV node
uint16_t & last_pkt_uid()
Reference to the last_pkt_uid_ variable.
static int offset_
ID of the last packet transmitted in the round.
static int & offset()
Reference to the offset variable.
static struct hdr_AUV_MULE * access(const Packet *p)
uint16_t & pkt_uid()
Reference to the pkt_uid_ variable.
Header of the POLL message.
int id_
ID of the POLLED node.
int & ID()
Reference to the id_ variable.
uint16_t POLL_time_
Time needed by the AUV to poll all the nodes.
static struct hdr_POLL * access(const Packet *p)
static int & offset()
Reference to the offset variable.
uint & POLL_uid()
Reference to the POLL_uid_ variable.
uint POLL_uid_
POLL packet unique ID.
static int offset_
Required by the PacketHeaderManager.
Header of the PROBE message.
uint id_sink_
ID of the sink.
uint16_t & id_ack()
Reference to id_ack_ variable.
uint & PROBE_uid()
Reference to PROBE_uid_ variable.
static struct hdr_PROBE_SINK * access(const Packet *p)
static int offset_
Required by the PacketHeaderManager.
uint16_t id_ack_
ID used for ack purpose.
uint & id_sink()
Reference to id_sink variable.
uint PROBE_uid_
Unique ID of the PROBE packet.
static int & offset()
Reference to the offset variable.
Header of the PROBE message.
uint PROBE_uid_
Unique ID of the PROBE packet.
static int offset_
Required by the PacketHeaderManager.
static int & offset()
Reference to the offset variable.
uint & id_node()
Reference to id_node variable.
uint16_t & ts()
Reference to timestamp variable.
uint & PROBE_uid()
Reference to PROBE_uid_ variable.
uint16_t ts_
Timestamp of the most recent data packet.
static struct hdr_PROBE * access(const Packet *p)
int & n_pkts()
Reference to backoff_time variable.
uint id_node_
ID of the node.
int n_pkts_
Number of packets that the node wish to transmit to the AUV.
Header of the TRIGGER message.
uint TRIGGER_uid_
TRIGGER packet unique ID.
uint16_t t_in_
Minimum value in which the node can choose his backoff time.
static int & offset()
Reference to the offset variable.
static int offset_
Required by the PacketHeaderManager.
static struct hdr_TRIGGER * access(const Packet *p)
uint16_t t_fin_
Maximum value in which the node can choose his backoff time.
uint & TRIGGER_uid()
Reference to the TRIGGER_uid variable.
uint16_t & t_in()
Reference to the t_in variable.
uint16_t & t_fin()
Reference to the t_fin variable.
static const double MIN_T_POLL
Minimum duration of the POLL timer.
static const int prop_speed
Typical underwater sound propagation speed.
static const int MAX_POLLED_NODE
Maximum number of node to POLL.
struct POLL_ID id_poll
Single location of the POLL vector.
static const int MAX_BUFFER_SIZE
Maximum size of the queue in number of packets.
static const double MIN_T_DATA
Minimum duration of the DATA timer.