DESERT 3.5.1
|
#include <packer-uwranging-tdoa.h>
Public Member Functions | |
packer_uwRangingTDOA () | |
virtual | ~packer_uwRangingTDOA ()=default |
![]() | |
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 { SOURCE_PKT_ID_FIELD = 0 , SOURCE_NODE_ID_FIELD , TIMES_SIZE_FIELD , LAST_ELEM } |
Private Member Functions | |
virtual void | init () override |
virtual size_t | packMyHdr (Packet *p, unsigned char *buffer, size_t offset) override |
virtual size_t | unpackMyHdr (unsigned char *buffer, size_t offset, Packet *p) override |
virtual void | printMyHdrMap () override |
virtual void | printMyHdrFields (Packet *) override |
Private Attributes | |
size_t | source_pkt_id_Bits |
size_t | source_node_id_Bits |
size_t | times_size_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 uwRangingTDOA header into a bit stream, and vice-versa.
Definition at line 45 of file packer-uwranging-tdoa.h.
|
private |
Index bits.
Enumerator | |
---|---|
SOURCE_PKT_ID_FIELD | ID of the ranging packet. |
SOURCE_NODE_ID_FIELD | ID of the node. |
TIMES_SIZE_FIELD | Size of the payload. |
LAST_ELEM |
Definition at line 105 of file packer-uwranging-tdoa.h.
packer_uwRangingTDOA::packer_uwRangingTDOA | ( | ) |
Constructor packer_uwRangingTDOA class.
Definition at line 57 of file packer-uwranging-tdoa.cc.
|
virtualdefault |
Destructor packer_uwRangingTDOA class.
|
overrideprivatevirtual |
Init the packer for uwRangingTDOA prototocol.
Reimplemented from packer.
Definition at line 71 of file packer-uwranging-tdoa.cc.
|
overrideprivatevirtual |
Method to transform the headers of uwRangingTDOA 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 86 of file packer-uwranging-tdoa.cc.
|
overrideprivatevirtual |
Method used for debug purposes.
It prints the value of the headers of a packet
Pointer | of the packet |
Reimplemented from packer.
Definition at line 170 of file packer-uwranging-tdoa.cc.
|
overrideprivatevirtual |
Method used for debug purposes.
It prints the number of bits for each header serialized
Reimplemented from packer.
Definition at line 156 of file packer-uwranging-tdoa.cc.
|
overrideprivatevirtual |
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 120 of file packer-uwranging-tdoa.cc.
|
private |
Bit length of the source_node_id to be put in the header stream of bits.
Definition at line 113 of file packer-uwranging-tdoa.h.
|
private |
Bit length of the source_pkt_id field to be put in the header stream of bits.
Definition at line 112 of file packer-uwranging-tdoa.h.
|
private |
Bit length of the times_size_field to be put in the header stream of bits.
Definition at line 114 of file packer-uwranging-tdoa.h.