DESERT 4.0.0
packer_uwUFetch Class Reference

#include <packer_uwUFetch.h>

Inheritance diagram for packer_uwUFetch:
Inheritance graph
Collaboration diagram for packer_uwUFetch:
Collaboration graph

Public Member Functions

 packer_uwUFetch ()
 
 ~packer_uwUFetch ()
 
- Public Member Functions inherited from packer
 packer (bool)
 
 ~packer ()
 
int command (int, const char *const *)
 
size_t getPayloadBytesLength ()
 
size_t getHdrBytesLength ()
 
size_t getPayloadBinLength ()
 
size_t getHdrBinLength ()
 
std::string packPayload (Packet *)
 
std::string packHdr (Packet *)
 
Packet * unpackPayload (Packet *)
 
Packet * unpackHdr (Packet *)
 
void printMap ()
 

Private Types

enum  nbits_index {
  T_BCK_MAX_PROBE , T_BCK_MIN_PROBE , N_CBEACON_TX , T_BCK_CHOICE_SENSOR ,
  N_PCK_SENSOR_WANT_TX , MAC_ADDR_SENSOR_POLLED , N_PCK_HN_WANT_RX , MAX_CBEACON_TX_HN ,
  T_BCK_MAX_RTS , T_BCK_MIN_RTS , N_PCK_AUV_WANT_RX , NUM_DATA_PCKS ,
  BACKOFF_TIME_RTS , NUM_DATA_PCKS_MAX_RX , MAC_ADDR_HN_CTSED
}
 

Private Member Functions

void init ()
 
size_t packMyHdr (Packet *, unsigned char *, size_t)
 
size_t unpackMyHdr (unsigned char *, size_t, Packet *)
 
void printMyHdrMap ()
 
void printMyHdrFields (Packet *)
 

Private Attributes

size_t t_bck_max_probe_Bits
 
size_t t_bck_min_probe_Bits
 
size_t n_cbeacon_tx_Bits
 
size_t t_bck_choice_sensor_Bits
 
size_t n_pck_sensor_want_tx_Bits
 
size_t mac_addr_sensor_polled_Bits
 
size_t n_pck_hn_want_tx_Bits
 
size_t max_cbeacon_tx_hn_Bits
 
size_t t_bck_max_rts_Bits
 
size_t t_bck_min_rts_Bits
 
size_t max_pck_want_rx_Bits
 
size_t num_DATA_pcks_Bits
 
size_t backoff_time_RTS_Bits
 
size_t num_DATA_pcks_MAX_rx_Bits
 
size_t mac_addr_HN_ctsed_Bits
 

Additional Inherited Members

- Static Public Member Functions inherited from packer
template<typename T >
static T restoreSignedValue (T _header_field, const uint32_t &_num_compressed_bits)
 
static std::string hexdump_nice (std::string)
 
static std::string hexdump_nice (const char *, size_t)
 
static std::string hexdump (std::string)
 
static std::string hex_bytes (float)
 
static std::string hex_bytes (double)
 
static std::string hex_bytes (const char &, const uint32_t &)
 
static std::string hex_bytes (const int8_t &, const uint32_t &)
 
static std::string hex_bytes (const int16_t &, const uint32_t &)
 
static std::string hex_bytes (const int32_t &, const uint32_t &)
 
static std::string hex_bytes (const int64_t &, const uint32_t &)
 
static std::string hex_bytes (const uint8_t &, const uint32_t &)
 
static std::string hex_bytes (const uint16_t &, const uint32_t &)
 
static std::string hex_bytes (const uint32_t &, const uint32_t &)
 
static std::string hex_bytes (const uint64_t &, const uint32_t &)
 
static std::string hexdump (const char *, size_t)
 
static std::string bindump (std::string)
 
static std::string bindump (const char *, size_t)
 
- Protected Member Functions inherited from packer
virtual void printMyHdrField (Packet *, int)
 
size_t getMyHdrBinLength ()
 
size_t get (unsigned char *buffer, size_t offset, void *val, size_t h)
 
size_t put (unsigned char *buffer, size_t offset, void *val, size_t h)
 
- Protected Attributes inherited from packer
std::vector< size_t > n_bits
 
int debug_
 

Detailed Description

Class to map a ns2 mac header into a bit stream, and vice-versa.

Member Enumeration Documentation

◆ nbits_index

Enumerator
T_BCK_MAX_PROBE 

Upper bound of the time interval from which the sensor node choice the backoff time before to transmit probe

T_BCK_MIN_PROBE 

Lower bound of the time interval from which the sensor node choice the backoff time before to transmit probe

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

N_PCK_SENSOR_WANT_TX 

Number of the packets that the sensor node would like to transmit to the head node

MAC_ADDR_SENSOR_POLLED 

Mac address of the sensor node from which the head node want to receive the data packet

N_PCK_HN_WANT_RX 

Maximum number of data packet that the head node want to receive from the sensor node polled

MAX_CBEACON_TX_HN 

Maximum number of CBEACON that the head node can transmit

T_BCK_MAX_RTS 

Upper bound of the time interval from which the sensor node choice the backoff time before to transmit rts

T_BCK_MIN_RTS 

Lower bound of the time interval from which the sensor node choice the backoff time before to transmit rts

N_PCK_AUV_WANT_RX 

Maximum number of packets that AUV want receive from the HN

NUM_DATA_PCKS 

Number of DATA packets that HN would like to transmit to the AUV

BACKOFF_TIME_RTS 

Backoff time choice by the HN before to transmit a RTS packet

NUM_DATA_PCKS_MAX_RX 

Exact number of DATA packets that AUV want to receive from the HN

MAC_ADDR_HN_CTSED 

MAC address of the HN from which AUV want to receive DATA packet

Constructor & Destructor Documentation

◆ packer_uwUFetch()

◆ ~packer_uwUFetch()

packer_uwUFetch::~packer_uwUFetch ( )

Destructor packer_uwUFetch class

Member Function Documentation

◆ init()

◆ packMyHdr()

size_t packer_uwUFetch::packMyHdr ( Packet *  p,
unsigned char *  buf,
size_t  offset 
)
privatevirtual

◆ printMyHdrFields()

◆ printMyHdrMap()

void packer_uwUFetch::printMyHdrMap ( )
privatevirtual

◆ unpackMyHdr()

size_t packer_uwUFetch::unpackMyHdr ( unsigned char *  buf,
size_t  offset,
Packet *  p 
)
privatevirtual

Member Data Documentation

◆ backoff_time_RTS_Bits

size_t packer_uwUFetch::backoff_time_RTS_Bits
private

number of bits used for backoff_time_RTS_ field on TRIGGER header

Referenced by init(), and packer_uwUFetch().

◆ mac_addr_HN_ctsed_Bits

size_t packer_uwUFetch::mac_addr_HN_ctsed_Bits
private

number of bits used for mac_addr_HN_ctsed_ field on CTS header

Referenced by init(), and packer_uwUFetch().

◆ mac_addr_sensor_polled_Bits

size_t packer_uwUFetch::mac_addr_sensor_polled_Bits
private

number of bits used for mac_addr_sensor_polled_ field on POLL header

Referenced by init(), and packer_uwUFetch().

◆ max_cbeacon_tx_hn_Bits

size_t packer_uwUFetch::max_cbeacon_tx_hn_Bits
private

number of bits used for max_cbeacon_tx_hn_ field on CBEACON header

Referenced by init(), and packer_uwUFetch().

◆ max_pck_want_rx_Bits

size_t packer_uwUFetch::max_pck_want_rx_Bits
private

number of bits used for max_pck_want_rx_ field on TRIGGER header

Referenced by init(), and packer_uwUFetch().

◆ n_cbeacon_tx_Bits

size_t packer_uwUFetch::n_cbeacon_tx_Bits
private

number of bits used for n_cbeacon_tx_ field on BEACON header

Referenced by init(), and packer_uwUFetch().

◆ n_pck_hn_want_tx_Bits

size_t packer_uwUFetch::n_pck_hn_want_tx_Bits
private

number of bits used for n_pck_hn_want_tx_ field on POLL header

Referenced by init(), and packer_uwUFetch().

◆ n_pck_sensor_want_tx_Bits

size_t packer_uwUFetch::n_pck_sensor_want_tx_Bits
private

number of bits used for n_pck_sensor_want_tx_ field on PROBE header

Referenced by init(), and packer_uwUFetch().

◆ num_DATA_pcks_Bits

size_t packer_uwUFetch::num_DATA_pcks_Bits
private

number of bits used for num_DATA_pcks_ field on TRIGGER header

Referenced by init(), and packer_uwUFetch().

◆ num_DATA_pcks_MAX_rx_Bits

size_t packer_uwUFetch::num_DATA_pcks_MAX_rx_Bits
private

number of bits used for num_DATA_pcks_MAX_rx_ field on RTSheader

Referenced by init(), and packer_uwUFetch().

◆ t_bck_choice_sensor_Bits

size_t packer_uwUFetch::t_bck_choice_sensor_Bits
private

number of bits used for t_bck_choice_sensor_ field on PROBE header

Referenced by init(), and packer_uwUFetch().

◆ t_bck_max_probe_Bits

size_t packer_uwUFetch::t_bck_max_probe_Bits
private

number of bits used for t_bck_max_probe_ field on BEACON header

Referenced by init(), and packer_uwUFetch().

◆ t_bck_max_rts_Bits

size_t packer_uwUFetch::t_bck_max_rts_Bits
private

number of bits used for t_bck_max_rts_ field on CBEACON header

Referenced by init(), and packer_uwUFetch().

◆ t_bck_min_probe_Bits

size_t packer_uwUFetch::t_bck_min_probe_Bits
private

number of bits used for t_bck_min_probe_ field on BEACON header

Referenced by init(), and packer_uwUFetch().

◆ t_bck_min_rts_Bits

size_t packer_uwUFetch::t_bck_min_rts_Bits
private

number of bits used for t_bck_min_rts_ field on CBEACON header

Referenced by init(), and packer_uwUFetch().


The documentation for this class was generated from the following files: