37#ifndef PACKER_UWAPPLICATION_H
38#define PACKER_UWAPPLICATION_H
79 size_t packMyHdr(Packet* p,
unsigned char* buffer,
size_t offset);
90 size_t unpackMyHdr(
unsigned char* buffer,
size_t offset, Packet* p);
Class to map a ns2 mac header into a bit stream, and vice-versa.
void printMyHdrMap()
Method used for debug purposes.
size_t unpackMyHdr(unsigned char *buffer, size_t offset, Packet *p)
Method responsible to take the informations from the received buffer and store it into the headers of...
void init()
Init the packer for uwApplication prototocol.
size_t sn_field_Bits
Bit length of the sn_ field to be put in the header stream of bits.
size_t rfft_field_Bits
Bit length of the rfft_field to be put in the header stream of bits.
void printMyHdrFields(Packet *)
Method used for debug purposes.
size_t rfftvalid_field_Bits
Bit length of the rfftvalid_field to be put in the header stream of bits.
@ PRIORITY_FIELD
Priority flag: 1 means high priority, 0 normal priority.
@ SN_FIELD
Serial number of the packet.
@ RFFT_FIELD
Forward Trip Time of the packet.
@ RFFTVALID_FIELD
Flag used to set the validity of the fft field.
@ PAYLOAD_SIZE_FIELD
Message payload.
packer_uwApplication()
Constructor packer_uwApplication class.
size_t packMyHdr(Packet *p, unsigned char *buffer, size_t offset)
Method to transform the headers of uwApplication protocol into a stream of bits.
~packer_uwApplication()
Destructor packer_uwApplication class.
size_t payload_size_field_Bits
Bit length of the payloadmsg_field to be put in the header stream of bits.
size_t priority_filed_Bits
Bit length of the priority_field to be put in the header stream of bits.
Class exploited by the Uwal module to map an NS-Miracle packet into a bit stream, and vice-versa.
Header of the class responsible to map an NS-Miracle packet into a bit stream, and vice-versa.