DESERT 4.0.0
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
34 * into a bit stream, and vice-versa.
35 */
36
37#ifndef PACKER_UWUFETCH_H
38#define PACKER_UWUFETCH_H
39
40#include "packer.h"
41#include "uwUFetch_cmn_hdr.h"
42#include <iostream>
43#include <mac.h>
44
181#endif
Definition packer_uwUFetch.h:49
size_t n_cbeacon_tx_Bits
Definition packer_uwUFetch.h:149
nbits_index
Definition packer_uwUFetch.h:107
@ N_PCK_AUV_WANT_RX
Definition packer_uwUFetch.h:133
@ T_BCK_MAX_RTS
Definition packer_uwUFetch.h:127
@ N_PCK_HN_WANT_RX
Definition packer_uwUFetch.h:123
@ NUM_DATA_PCKS_MAX_RX
Definition packer_uwUFetch.h:139
@ T_BCK_MIN_PROBE
Definition packer_uwUFetch.h:111
@ BACKOFF_TIME_RTS
Definition packer_uwUFetch.h:137
@ N_PCK_SENSOR_WANT_TX
Definition packer_uwUFetch.h:118
@ T_BCK_MIN_RTS
Definition packer_uwUFetch.h:130
@ N_CBEACON_TX
Definition packer_uwUFetch.h:114
@ T_BCK_CHOICE_SENSOR
Definition packer_uwUFetch.h:116
@ MAC_ADDR_SENSOR_POLLED
Definition packer_uwUFetch.h:120
@ MAC_ADDR_HN_CTSED
Definition packer_uwUFetch.h:141
@ NUM_DATA_PCKS
Definition packer_uwUFetch.h:135
@ MAX_CBEACON_TX_HN
Definition packer_uwUFetch.h:125
@ T_BCK_MAX_PROBE
Definition packer_uwUFetch.h:108
size_t num_DATA_pcks_Bits
Definition packer_uwUFetch.h:171
size_t mac_addr_sensor_polled_Bits
Definition packer_uwUFetch.h:157
size_t t_bck_min_rts_Bits
Definition packer_uwUFetch.h:167
size_t t_bck_min_probe_Bits
Definition packer_uwUFetch.h:147
size_t mac_addr_HN_ctsed_Bits
Definition packer_uwUFetch.h:178
void init()
Definition packer_uwUFetch.cc:110
size_t t_bck_max_probe_Bits
Definition packer_uwUFetch.h:145
size_t backoff_time_RTS_Bits
Definition packer_uwUFetch.h:173
size_t t_bck_choice_sensor_Bits
Definition packer_uwUFetch.h:151
size_t n_pck_sensor_want_tx_Bits
Definition packer_uwUFetch.h:154
size_t max_pck_want_rx_Bits
Definition packer_uwUFetch.h:169
size_t num_DATA_pcks_MAX_rx_Bits
Definition packer_uwUFetch.h:175
packer_uwUFetch()
Definition packer_uwUFetch.cc:54
void printMyHdrFields(Packet *)
Definition packer_uwUFetch.cc:522
size_t unpackMyHdr(unsigned char *, size_t, Packet *)
Definition packer_uwUFetch.cc:283
size_t max_cbeacon_tx_hn_Bits
Definition packer_uwUFetch.h:162
size_t t_bck_max_rts_Bits
Definition packer_uwUFetch.h:165
~packer_uwUFetch()
Definition packer_uwUFetch.cc:104
size_t n_pck_hn_want_tx_Bits
Definition packer_uwUFetch.h:160
void printMyHdrMap()
Definition packer_uwUFetch.cc:466
size_t packMyHdr(Packet *, unsigned char *, size_t)
Definition packer_uwUFetch.cc:144
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.