38#ifndef UWUFETCH_CMN_HDR_H
39#define UWUFETCH_CMN_HDR_H
45#define HDR_TRIGGER_UFETCH(p) \
46 (hdr_TRIGGER_UFETCH::access( \
48#define HDR_RTS_UFETCH(p) \
49 (hdr_RTS_UFETCH::access(p))
50#define HDR_CTS_UFETCH(p) \
51 (hdr_CTS_UFETCH::access(p))
52#define HDR_BEACON_UFETCH(p) \
53 (hdr_BEACON_UFETCH::access( \
55#define HDR_PROBE_UFETCH(p) \
56 (hdr_PROBE_UFETCH::access( \
58#define HDR_POLL_UFETCH(p) \
59 (hdr_POLL_UFETCH::access(p))
61#define HDR_CBEACON_UFETCH(p) \
62 (hdr_CBEACON_UFETCH::access( \
Content header of BEACON packet.
static int offset_
Required by the PacketHeaderManager.
int t_max_bc_
maximum value in which the Node can choose his backoff time
static int & offset()
Reference to the offset variable.
int & t_max_bc()
Reference to t_max_bc_ variable.
int & num_Max_CBEACON_tx_by_HN()
Reference to num_Max_CBEACON_tx_by_HN_ variable.
int num_Max_CBEACON_tx_by_HN_
Maximum number of CBEACON that the HN can transmit after the BEACON packet.
int t_min_bc_
minimum value in which the Node can choose his backoff time
static hdr_BEACON_UFETCH * access(const Packet *p)
int & t_min_bc()
Reference to t_min_bc_ variable.
Content header of CBEACON packet.
static hdr_CBEACON_UFETCH * access(const Packet *p)
static int offset_
Required by the PacketHeaderManager.
int t_max_bc_
maximum value in which the Node can choose his backoff time
int num_Max_CBEACON_tx_by_HN_
Maximum number of CBEACON that the HN can transmit after the BEACON packet.
static int & offset()
Reference to the offset variable.
int & t_max_bc()
Reference to t_max_bc_ variable.
int & t_min_bc()
Reference to t_min_bc_ variable.
int & num_Max_CBEACON_tx_by_HN()
Reference to num_Max_CBEACON_tx_by_HN_ variable.
int t_min_bc_
minimum value in which the Node can choose his backoff time
Content header of CTS packet.
int mac_addr_HN_ctsed_
Mac address of the HN from which the AUV want to receive the DATA packets
static int & offset()
Reference to the offset variable.
int & mac_addr_HN_ctsed()
Reference to the mac_addr_HN_ctsed_ variable.
static int offset_
Required by the PacketHeaderManager.
int num_DATA_pcks_MAX_rx_
maximum number of packets that AUV want receive from HN
int & num_DATA_pcks_MAX_rx()
Reference to the num_DATA_pcks_MAX_rx_ variable.
static hdr_CTS_UFETCH * access(const Packet *p)
Content header of POLL packet.
static int & offset()
Reference to the offset variable.
int num_DATA_pcks_MAX_rx_
Maximum number of DATA packet that HN want to receive from the specific node that is being to poll.
static struct hdr_POLL_UFETCH * access(const Packet *p)
static int offset_
Required by the PacketHeaderManager.
int & mac_addr_Node_polled()
Reference to mac_addr_Node_polled_ variable.
int & num_DATA_pcks_MAX_rx()
Reference to num_DATA_pcks_MAX_rx variable.
int mac_addr_Node_polled_
Mac address of the NODE that the HN has polled and from which it want to receive a data packet.
Content header of PROBE packet.
int & n_DATA_pcks_Node_tx()
Reference to n_DATA_pcks_Node_tx_ variable.
int backoff_time_PROBE_
Backoff time chosen by the NODE for collision free.
static int offset_
Required by the PacketHeaderManager.
int & backoff_time_PROBE()
Reference to backoff_time_PROBE_ variable.
int n_DATA_pcks_Node_tx_
number of packets that Node have to transmit at HN
static hdr_PROBE_UFETCH * access(const Packet *p)
static int & offset()
Reference to the offset variable.
Content header of RTS packet.
static int & offset()
Reference to the offset variable.
static int offset_
Required by the PacketHeaderManager.
int & backoff_time_RTS()
Reference to the backoff_Time_RTS_ variable.
int num_DATA_pcks_
Number of packets that the HN want to transmit to the AUV.
int & num_DATA_pcks()
Reference to the num_Data_pcks_ variable.
int backoff_time_RTS_
Backoff time chosen by the HN for collision free.
static hdr_RTS_UFETCH * access(const Packet *p)
Content header of TRIGGER packet.
static int offset_
Required by the PacketHeaderManager.
int & t_min()
Reference to the t_min variable.
int & t_max()
Reference to the t_max variable.
int t_max_
maximum value in which the HN can choose his backoff time
int & max_pck_want_rx()
Reference to the max_pck_want_rx variable.
static int & offset()
Reference to the offset variable.
int t_min_
minimum value in which the HN can choose his backoff time
static hdr_TRIGGER_UFETCH * access(const Packet *p)
int max_pck_want_rx_
Maximum number of pck that AUV want receive from sink.
packet_t PT_POLL_UFETCH
POLL packet type.
packet_t PT_CBEACON_UFETCH
CBEACON packet type.
packet_t PT_CTS_UFETCH
CTS packet type.
packet_t PT_TRIGGER_UFETCH
TRIGGER packet type.
packet_t PT_BEACON_UFETCH
BEACON packet type.
static const int BIT_RATE_INSTANT
packet_t PT_PROBE_UFETCH
PROBE packet type.
static const int v_speed_sound
Underwater sound propagation speed.
static const int BIT_RATE_SERVICE
packet_t PT_RTS_UFETCH
RTS packet type.