DESERT 3.5.1
Loading...
Searching...
No Matches
packer_uwUFetch.h
Go to the documentation of this file.
1//
2// Copyright (c) 2013 Regents of the SIGNET lab, University of Padova.
3// All rights reserved.
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions
7// are met:
8// 1. Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// 2. Redistributions in binary form must reproduce the above copyright
11// notice, this list of conditions and the following disclaimer in the
12// documentation and/or other materials provided with the distribution.
13// 3. Neither the name of the University of Padova (SIGNET lab) nor the
14// names of its contributors may be used to endorse or promote products
15// derived from this software without specific prior written permission.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28/*
29 * @file packer_uwUFetch.h
30 * @author Loris Brolo
31 * \version 1.0.0
32 *
33 * \brief Header of the class responsible to map the ns2 packet of uwUFecth into a bit stream, and vice-versa.
34 */
35
36#ifndef PACKER_UWUFETCH_H
37#define PACKER_UWUFETCH_H
38
39#include "packer.h"
40#include "uwUFetch_cmn_hdr.h"
41#include <mac.h>
42#include <iostream>
43
139#endif
140
Class to map a ns2 mac header into a bit stream, and vice-versa.
size_t n_cbeacon_tx_Bits
number of bits used for n_cbeacon_tx_ field on BEACON header
@ N_PCK_AUV_WANT_RX
Maximum number of packets that AUV want receive from the HN.
@ T_BCK_MAX_RTS
Upper bound of the time interval from which the sensor node choice the backoff time before to transmi...
@ N_PCK_HN_WANT_RX
Maximum number of data packet that the head node want to receive from the sensor node polled.
@ NUM_DATA_PCKS_MAX_RX
Exact number of DATA packets that AUV want to receive from the HN.
@ T_BCK_MIN_PROBE
Lower bound of the time interval from which the sensor node choice the backoff time before to transmi...
@ BACKOFF_TIME_RTS
Backoff time choice by the HN before to transmit a RTS packet.
@ N_PCK_SENSOR_WANT_TX
Number of the packets that the sensor node would like to transmit to the head node.
@ T_BCK_MIN_RTS
Lower bound of the time interval from which the sensor node choice the backoff time before to transmi...
@ N_CBEACON_TX
Maximum number of CBEACON that the head node can transmit.
@ T_BCK_CHOICE_SENSOR
Backoff time choose by the sensor node before to transmit the probe packet.
@ MAC_ADDR_SENSOR_POLLED
Mac address of the sensor node from which the head node want to receive the data packet.
@ MAC_ADDR_HN_CTSED
MAC address of the HN from which AUV want to receive DATA packet.
@ NUM_DATA_PCKS
Number of DATA packets that HN would like to transmit to the AUV.
@ MAX_CBEACON_TX_HN
Maximum number of CBEACON that the head node can transmit.
@ T_BCK_MAX_PROBE
Upper bound of the time interval from which the sensor node choice the backoff time before to transmi...
size_t num_DATA_pcks_Bits
number of bits used for num_DATA_pcks_ field on TRIGGER header
size_t mac_addr_sensor_polled_Bits
number of bits used for mac_addr_sensor_polled_ field on POLL header
size_t t_bck_min_rts_Bits
number of bits used for t_bck_min_rts_ field on CBEACON header
size_t t_bck_min_probe_Bits
number of bits used for t_bck_min_probe_ field on BEACON header
size_t mac_addr_HN_ctsed_Bits
number of bits used for mac_addr_HN_ctsed_ field on CTS header
void init()
Init the packer for uwUFetch prototocol.
size_t t_bck_max_probe_Bits
number of bits used for t_bck_max_probe_ field on BEACON header
size_t backoff_time_RTS_Bits
number of bits used for backoff_time_RTS_ field on TRIGGER header
size_t t_bck_choice_sensor_Bits
number of bits used for t_bck_choice_sensor_ field on PROBE header
size_t n_pck_sensor_want_tx_Bits
number of bits used for n_pck_sensor_want_tx_ field on PROBE header
size_t max_pck_want_rx_Bits
number of bits used for max_pck_want_rx_ field on TRIGGER header
size_t num_DATA_pcks_MAX_rx_Bits
number of bits used for num_DATA_pcks_MAX_rx_ field on RTSheader
packer_uwUFetch()
Constructor packer_uwUFetch class.
void printMyHdrFields(Packet *)
Method used for debug purposes.
size_t unpackMyHdr(unsigned char *, size_t, Packet *)
Method responsible to take the informations from the received buffer and store it into the headers of...
size_t max_cbeacon_tx_hn_Bits
number of bits used for max_cbeacon_tx_hn_ field on CBEACON header
size_t t_bck_max_rts_Bits
number of bits used for t_bck_max_rts_ field on CBEACON header
~packer_uwUFetch()
Destructor packer_uwUFetch class.
size_t n_pck_hn_want_tx_Bits
number of bits used for n_pck_hn_want_tx_ field on POLL header
void printMyHdrMap()
Method used for debug purposes.
size_t packMyHdr(Packet *, unsigned char *, size_t)
Method to transform the headers of UFetch protocol into a stream of bits.
Class exploited by the Uwal module to map an NS-Miracle packet into a bit stream, and vice-versa.
Definition packer.h:57
Header of the class responsible to map an NS-Miracle packet into a bit stream, and vice-versa.
Common structures and variables in the protocol.