Slight change from previous email! Hi again and thanks, I now have a clearer picture of the problem.
But PLease can I have your advice, I really need to get this working . I've followed the steps very closely, and have narrowed down the location of problem to instruction 7. " mac/wireless-phy.h: change enum ChannelStatus {IDLE, RECV, SEND}; to enum ChannelStatus {IDLE, RECVING, SENDING}; mac/wireless-phy.cc: replace all occurences of RECV and SEND (by RECVING and SENDING). " After successfully doing ./configure successfully doing Make Clean successfully doing Make Depend I Run 'Make' and I get the error mac/wireless-phy.cc: In wireless function 'virtual void WirelessPhy::sendDown(Packet*)': mac/wireless-phy.cc:302: error: 'class Channel' has no member named 'RECVING' make: *** [mac/wireless-phy.o] Error 1 If I replace the RECVING with RECV I get the similar error: mac/wireless-phy.cc: In wireless function 'virtual void WirelessPhy::sendDown(Packet*)': mac/wireless-phy.cc:302: error: 'class Channel' has no member named 'RECV' make: *** [mac/wireless-phy.o] Error 1 There are no solutions to this on the web Here is the sendDown method WirelessPhy::sendDown(Packet *p) { /* * Sanity Check */ assert(initialized()); if (em()) { //node is off here... if (Is_node_on() != true ) { Packet::free(p); return; } if(Is_node_on() == true && Is_sleeping() == true){ em()-> DecrSleepEnergy(NOW-update_energy_time_, P_sleep_); update_energy_time_ = NOW; } } /* * Decrease node's energy */ if(em()) { if (em()->energy() > 0) { double txtime = hdr_cmn::access(p)->txtime(); double start_time = MAX(channel_idle_time_, NOW); double end_time = MAX(channel_idle_time_, NOW+txtime); double actual_txtime = end_time-start_time; if (start_time > update_energy_time_) { em()->DecrIdleEnergy(start_time - update_energy_time_, P_idle_); update_energy_time_ = start_time; } /* It turns out that MAC sends packet even though, it's receiving some packets. if (txtime-actual_txtime > 0.000001) { fprintf(stderr,"Something may be wrong at MAC\n"); fprintf(stderr,"act_tx = %lf, tx = %lf\n", actual_txtime, txtime); } */ // Sanity check double temp = MAX(NOW,last_send_time_); /* if (NOW < last_send_time_) { fprintf(stderr,"Argggg !! Overlapping transmission. NOW %lf last %lf temp %lf\n", NOW, last_send_time_, temp); } */ double begin_adjust_time = MIN(channel_idle_time_, temp); double finish_adjust_time = MIN(channel_idle_time_, NOW+txtime); double gap_adjust_time = finish_adjust_time - begin_adjust_time; if (gap_adjust_time < 0.0) { fprintf(stderr,"What the heck ! negative gap time.\n"); } if ((gap_adjust_time > 0.0) && (status_ == RECV)) { em()->DecrTxEnergy(gap_adjust_time, Pt_consume_-Pr_consume_); } em()->DecrTxEnergy(actual_txtime,Pt_consume_); // if (end_time > channel_idle_time_) { // status_ = SENDING; // } // status_ = IDLE; last_send_time_ = NOW+txtime; channel_idle_time_ = end_time; update_energy_time_ = end_time; if (em()->energy() <= 0) { em()->setenergy(0); ((MobileNode*)node())->log_energy(0); } } else { // log node energy if (em()->energy() > 0) { ((MobileNode *)node_)->log_energy(1); } // Packet::free(p); return; } } /* * Stamp the packet with the interface arguments */ p->txinfo_.stamp((MobileNode*)node(), ant_->copy(), Pt_, lambda_); // Send the packet channel_->RECV(p, this); } Sincere Thanks and Regards, Michael, university DCU. Dublin On 6/12/07, Sim Tec <[EMAIL PROTECTED]> wrote: > > Hi again and thanks, I now have a clearer picture of the problem. > > PLease can I have your advice, I really need to get this working > I've followed the steps very closely, and have narrowed down the location > of problem to instruction 7. > " > mac/wireless-phy.h: > change > enum ChannelStatus {IDLE, RECV, SEND}; > to > enum ChannelStatus {IDLE, RECVING, SENDING}; > mac/wireless-phy.cc: > replace all occurences of RECV and SEND (by RECVING and SENDING). > " > > After successfully doing ./configure > successfully doing Make Clean > successfully doing Make Depend > I Run 'Make' and I get the error > mac/wireless-phy.cc: In wireless function 'virtual void > WirelessPhy::sendDown(Packet*)': > mac/wireless-phy.cc:302: error: 'class Channel' has no member named > 'RECVING' > make: *** > > If I replace the RECVING with RECV I get the similar error: > mac/wireless-phy.cc: In wireless function 'virtual void > WirelessPhy::sendDown(Packet*)': > mac/wireless-phy.cc:302: error: 'class Channel' has no member named > 'RECV' > make: *** > > There are no solutions to this on the web > > Here is the sendDown method > > > WirelessPhy::sendDown(Packet *p) > { > /* > * Sanity Check > */ > assert(initialized()); > > if (em()) { > //node is off here... > if (Is_node_on() != true ) { > Packet::free(p); > return; > } > if(Is_node_on() == true && Is_sleeping() == true){ > em()-> DecrSleepEnergy(NOW-update_energy_time_, > P_sleep_); > update_energy_time_ = NOW; > > } > > } > /* > * Decrease node's energy > */ > if(em()) { > if (em()->energy() > 0) { > > double txtime = hdr_cmn::access(p)->txtime(); > double start_time = MAX(channel_idle_time_, NOW); > double end_time = MAX(channel_idle_time_, NOW+txtime); > double actual_txtime = end_time-start_time; > > if (start_time > update_energy_time_) { > em()->DecrIdleEnergy(start_time - > update_energy_time_, P_idle_); > update_energy_time_ = start_time; > } > > /* It turns out that MAC sends packet even though, it's > receiving some packets. > > if (txtime-actual_txtime > 0.000001) { > fprintf(stderr,"Something may be wrong at MAC\n"); > fprintf(stderr,"act_tx = %lf, tx = %lf\n", actual_txtime, txtime); > } > */ > > // Sanity check > double temp = MAX(NOW,last_send_time_); > > /* > if (NOW < last_send_time_) { > fprintf(stderr,"Argggg !! Overlapping transmission. NOW %lf last %lf > temp %lf\n", NOW, last_send_time_, temp); > } > */ > > double begin_adjust_time = MIN(channel_idle_time_, temp); > double finish_adjust_time = MIN(channel_idle_time_, NOW+txtime); > double gap_adjust_time = finish_adjust_time - begin_adjust_time; > if (gap_adjust_time < 0.0) { > fprintf(stderr,"What the heck ! negative gap time.\n"); > } > > if ((gap_adjust_time > 0.0) && (status_ == RECV)) { > em()->DecrTxEnergy(gap_adjust_time, > Pt_consume_-Pr_consume_); > } > > em()->DecrTxEnergy(actual_txtime,Pt_consume_); > // if (end_time > channel_idle_time_) { > // status_ = SENDING; > // } > // > status_ = IDLE; > > last_send_time_ = NOW+txtime; > channel_idle_time_ = end_time; > update_energy_time_ = end_time; > > if (em()->energy() <= 0) { > em()->setenergy(0); > ((MobileNode*)node())->log_energy(0); > } > > } else { > > // log node energy > if (em()->energy() > 0) { > ((MobileNode *)node_)->log_energy(1); > } > // > Packet::free(p); > return; > } > } > > /* > * Stamp the packet with the interface arguments > */ > p->txinfo_.stamp((MobileNode*)node(), ant_->copy(), Pt_, lambda_); > > // Send the packet > channel_->RECV(p, this); > } > > Sincere Thanks and Regards, > Michael, university DCU. Dublin > > > > On 6/12/07, H i l A l <[EMAIL PROTECTED]> wrote: > > > > hi there, > > i'm using this patch, and when i installed it i just followed the 10 > > indicated steps and it worked properly. The first time i tried to do this i > > got some problems and it didn't work, but it was something that i missed... > > as for me, i'm not using ns-2.30, it's ns-allinone-2.28 that i'm using. > > my problems were after i implemented an admission control algorithm, i > > couldn't include any header file to the application(including the header > > files i've never changed), donnow why, i tried to avoid the problem...until > > now i'm in a deep shit... > > hope it will work for u 2 ... > > good luck > > > > *Sim Tec <[EMAIL PROTECTED]>* wrote: > > > > > > Sincerely thanks for the responce Sven. > > > > > > I still have the same error. > > I set up the tcl/lan/ns-mac.tcl as follows: > > > > if [TclObject is-class Mac/802_11e] { > > Mac/802_11e set delay_ 64us > > Mac/802_11e set ifs_ 16us > > Mac/802_11e set slotTime_ 16us > > Mac/802_11e set cwmin_ 16 > > Mac/802_11e set cwmax_ 1024 > > Mac/802_11e set rtxLimit_ 16 > > Mac/802_11e set bssId_ -1 > > Mac/802_11e set sifs_ 8us > > Mac/802_11e set pifs_ 12us > > Mac/802_11e set difs_ 16us > > Mac/802_11e set rtxAckLimit_ 1 > > Mac/802_11e set rtxRtsLimit_ 3 > > Mac/802_11e set basicRate_ 1Mb ;# set this to 0 if want to use > > bandwidth_ > > for > > Mac/802_11e set dataRate_ 1Mb ;# both control and data pkts > > Mac/802_11e set cfb_ 0 ;# disables CFB > > } > > > > > > > > Should I follow these steps, step 7 seems to be very problematic > > > > 7. mac/wireless-phy.h: > > change > > enum ChannelStatus {IDLE, RECV, SEND}; > > to > > enum ChannelStatus {IDLE, RECVING, SENDING}; > > mac/wireless-phy.cc: > > replace all occurences of RECV and SEND (by RECVING and SENDING). > > > > 8. common/packet.h: > > add > > #define HDR_MAC802_11E(p) ((hdr_mac802_11e *)hdr_mac::access(p)) > > > > 9. run ./configure; make clean; make depend; make in your ns directory > > > > 10. happy simulating :o) (e.g with the example script > > ../ns-x/mac/802.11e/multi_udpflows.tcl) > > > > > > Sincere thanks and regards. > > > > > > > > > > > > > > > > > > > > > > On 6/11/07, Sven Wiethoelter wrote: > > > > > > On Jun 11, 2007, at 8:05 AM, Sim Tec wrote: > > > > > > > > > > > > > > Hello I am simulating with 802.11e and would love to use TKN > > > > > > > > I have the exact same problem that many people have had, but there > > > > is no > > > > solution posted for it. > > > > > > > Hi, the solution is always the same: Check your changes in the tcl > > > files ;-) (see further below) > > > > > > > > > > -In return, here is the Best website for NS-2 that I have found > > > > on the > > > > Internet. It is a very recent website also. > > > > http://academic.csuohio.edu/yuc/mobile07/ > > > > > > > > i am trying to apply the 802.11e patch for EDCA from TKN Berlin > > named > > > > 'EDCA_ns-2_28-v1-0-1.tgz' on ns-2.30. > > > > i have followed all the steps > > > > given in the README, but in vein..i am getting error when i run the > > > > sample tcl script named "edca_multi_udpflows.tcl" provided in the > > > > package. I tried another wireless scripts using the command "set val > > > > (mac) Mac/802_11e" to get the following error ---> > > > > > > > > invalid command name "Mac/802_11e" > > > > while executing > > > > "Mac/802_11e create _o54 " > > > > invoked from within > > > > "catch "$className create $o $args" msg" > > > > invoked from within > > > > "if [catch "$className create $o $args" msg] { > > > > if [string match "__FAILED_SHADOW_OBJECT_" $msg] { > > > > delete $o > > > > return "" > > > > } > > > > global errorInfo > > > > error "class $..." > > > > (procedure "new" line 3) > > > > invoked from within > > > > "new $mactype" > > > > (procedure "_o44" line 10) > > > > (Node/MobileNode add-interface line 10) > > > > invoked from within > > > > "$node add-interface $chan $propInstance_ $llType_ $macType_ > > > > $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ $inerrProc_ > > > > $outerrProc_ $FECProc_" > > > > (procedure "_o3" line 66) > > > > (Simulator create-wireless-node line 66) > > > > invoked from within > > > > "_o3 create-wireless-node 1.0.0" > > > > ("eval" body line 1) > > > > invoked from within > > > > "eval $self create-wireless-node $args" > > > > (procedure "_o3" line 14) > > > > (Simulator node line 14) > > > > invoked from within > > > > "$ns node 1.0.0" > > > > invoked from within > > > > "set BS(0) [$ns node 1.0.0]" > > > > (file "edca_multi_udpflows.tcl" line 92) > > > > > > > > initially I thought that i might have made mistake in make & the > > > > object file for mac-802_11e may not have been created, but when i > > > > checked the mac directory the object files corresponding to all the > > > > .cc scripts in the patch were present.. > > > > > > > This relates to C++ stuff only. Tcl code is not compiled by "make". > > > Thus, a successful "make" is not an indication that the Tcl stuff is > > > correct, too. > > > > > > > > > > what shall i do? > > > > > > > Check all your tcl settings. > > > > > > I guess that step 6 of the readme has not been applied properly: > > > > > > 6. add to tcl/lan/ns- mac.tcl: > > > if [TclObject is-class Mac/802_11e] { > > > ... > > > copy settings of MAC/802.11 > > > (which are contained in this file) into this section > > > and at an "e" at the end of the "Mac/802_11" terms > > > ... > > > Mac/802_11e set cfb_ 0 ;# disables CFB > > > } > > > > > > Best regards, > > > Sven > > > > > > > > > > please someone > > > > help.." > > > > > > > > Can you please tell me how you overcame this, as I have the exact > > same > > > > problem. > > > > > > > > > > > > > > > > > > > > Enjoy, and regards from Ireland. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user > > panel<http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7+>and > > lay it on us. > > > > >