44 : TclClass(
"NS2/MAC/UW-CSMA-CA/Packer")
85 cout <<
"\033[1;37;45m (TX) UWCSMA-CA::RTS packer hdr \033[0m"
97 cout <<
"\033[1;37;45m (TX) UWCSMA-CA::CTS packer hdr \033[0m"
119 cout <<
"\033[1;37;45m (RX) UWCSMA-CA::CTS packer hdr \033[0m"
131 cout <<
"\033[1;37;45m (RX) UWCSMA-CA::CTS packer hdr \033[0m"
142 hdr_cmn *ch = HDR_CMN(p);
147 cout <<
"\033[1;37;41m 1st field \033[0m, txTime_: "
152 cout <<
"\033[1;37;41m 1st field \033[0m, txTime_: "
160 cout <<
"\033[1;37;45m Packer Name \033[0m: UW-CSMA-CA \n";
161 cout <<
"\033[1;37;45m Field: txTime \033[0m:" <<
txtime_Bits <<
" bits\n";
TclObject * create(int, const char *const *)
Class to map a UwCsma-Ca header into a bit stream, and vice-versa.
size_t packMyHdr(Packet *, unsigned char *, size_t)
Method to transform the headers of UwCsma-Ca into a stream of bits.
void printMyHdrFields(Packet *)
Method used for debug purposes.
packerUwCsmaCa()
Class constructor.
size_t unpackMyHdr(unsigned char *, size_t, Packet *)
Method responsible to take the informations from the received buffer and store it into the headers of...
void printMyHdrMap()
Method used for debug purposes.
void init()
Init the Packer.
Class exploited by the Uwal module to map an NS-Miracle packet into a bit stream, and vice-versa.
std::vector< size_t > n_bits
Vector of elements containing the indication of the number of bits to consider for each header field.
size_t put(unsigned char *buffer, size_t offset, void *val, size_t h)
Method used to map in a certain number of bits, contained in a buffer of chars, a given variable.
size_t get(unsigned char *buffer, size_t offset, void *val, size_t h)
Method used to retrieve a given variable from a certain number of bits contained in a buffer of chars...
int debug_
Flag to enable debug messages.
packerUwCsmaCaTcl class_module_packerUWCsmaCa
Header of the class responsible to map the ns2 packet of UwCsma-Ca.
Provides the headers of ctrl packets of uw-csma-ca module.
#define CA_CTS_HDR_ACCESS(p)
#define CA_RTS_HDR_ACCESS(p)