DESERT 3.5.1
|
#include <packer_uwUFetch.h>
Public Member Functions | |
packer_uwUFetch () | |
~packer_uwUFetch () | |
![]() | |
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 = 0 , 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 | |
![]() | |
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) |
![]() | |
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) |
![]() | |
std::vector< size_t > | n_bits |
int | debug_ |
Class to map a ns2 mac header into a bit stream, and vice-versa.
Definition at line 47 of file packer_uwUFetch.h.
|
private |
Definition at line 104 of file packer_uwUFetch.h.
packer_uwUFetch::packer_uwUFetch | ( | ) |
Constructor packer_uwUFetch class.
Definition at line 49 of file packer_uwUFetch.cc.
packer_uwUFetch::~packer_uwUFetch | ( | ) |
Destructor packer_uwUFetch class.
Definition at line 97 of file packer_uwUFetch.cc.
|
privatevirtual |
Init the packer for uwUFetch prototocol.
Reimplemented from packer.
Definition at line 101 of file packer_uwUFetch.cc.
|
privatevirtual |
Method to transform the headers of UFetch protocol into a stream of bits.
Pointer | to the packet to serialize |
Pointer | to the buffer |
Offset | from the begin of the buffer |
Reimplemented from packer.
Definition at line 132 of file packer_uwUFetch.cc.
|
privatevirtual |
Method used for debug purposes.
It prints the value of the headers of a packet
Pointer | of the packet Index bits |
Reimplemented from packer.
Definition at line 378 of file packer_uwUFetch.cc.
|
privatevirtual |
Method used for debug purposes.
It prints the number of bits for each header serialized
Reimplemented from packer.
Definition at line 342 of file packer_uwUFetch.cc.
|
privatevirtual |
Method responsible to take the informations from the received buffer and store it into the headers of the packet.
Pointer | to the buffer received |
Offset | from the begin of the buffer |
Pointer | to the new packet |
Reimplemented from packer.
Definition at line 224 of file packer_uwUFetch.cc.
|
private |
number of bits used for backoff_time_RTS_ field on TRIGGER header
Definition at line 134 of file packer_uwUFetch.h.
|
private |
number of bits used for mac_addr_HN_ctsed_ field on CTS header
Definition at line 136 of file packer_uwUFetch.h.
|
private |
number of bits used for mac_addr_sensor_polled_ field on POLL header
Definition at line 127 of file packer_uwUFetch.h.
|
private |
number of bits used for max_cbeacon_tx_hn_ field on CBEACON header
Definition at line 129 of file packer_uwUFetch.h.
|
private |
number of bits used for max_pck_want_rx_ field on TRIGGER header
Definition at line 132 of file packer_uwUFetch.h.
|
private |
number of bits used for n_cbeacon_tx_ field on BEACON header
Definition at line 124 of file packer_uwUFetch.h.
|
private |
number of bits used for n_pck_hn_want_tx_ field on POLL header
Definition at line 128 of file packer_uwUFetch.h.
|
private |
number of bits used for n_pck_sensor_want_tx_ field on PROBE header
Definition at line 126 of file packer_uwUFetch.h.
|
private |
number of bits used for num_DATA_pcks_ field on TRIGGER header
Definition at line 133 of file packer_uwUFetch.h.
|
private |
number of bits used for num_DATA_pcks_MAX_rx_ field on RTSheader
Definition at line 135 of file packer_uwUFetch.h.
|
private |
number of bits used for t_bck_choice_sensor_ field on PROBE header
Definition at line 125 of file packer_uwUFetch.h.
|
private |
number of bits used for t_bck_max_probe_ field on BEACON header
Definition at line 122 of file packer_uwUFetch.h.
|
private |
number of bits used for t_bck_max_rts_ field on CBEACON header
Definition at line 130 of file packer_uwUFetch.h.
|
private |
number of bits used for t_bck_min_probe_ field on BEACON header
Definition at line 123 of file packer_uwUFetch.h.
|
private |
number of bits used for t_bck_min_rts_ field on CBEACON header
Definition at line 131 of file packer_uwUFetch.h.