Dear All
I need to call variable on the mac_802.11.cc in recvdata class to my tcl
script to use it on my simulation what shall I do? This is the function I
talk about and the variables index_ and ch->qlength_ are the variables I
want to recall them on my tcl script on a variable to use there real time
variables on my simulation
void
Mac802_11::recvDATA(Packet *p)
{
struct hdr_mac802_11 *dh = HDR_MAC802_11(p);
u_int32_t dst, src, size;
struct hdr_cmn *ch = HDR_CMN(p);
dst = ETHER_ADDR(dh->dh_ra);
src = ETHER_ADDR(dh->dh_ta);
size = ch->size();
/*
* Adjust the MAC packet size - ie; strip
* off the mac header
*/
ch->size() -= phymib_.getHdrLen11();
ch->num_forwards() += 1;
//to write to a file
Tcl& tcl = Tcl::instance();
char wrk[100];
if(index_ != 120 || ch->qlength_ / 50.0 <= 0.92) {
sprintf(wrk, "puts \"node=%d Q length=%d \" \n", index_,
ch->qlength_);
tcl.eval(wrk);