[ns] TwoRayGround propagation loss path
Hello all, I have a doubt related to TwoRayGround propagation loss path in ns2. Could you help me? I suppose the packets are lost as the distance increases, for example, with the radio range of 100 m, when the distance between two nodes are 90 m, 30% of the packets are dropped. Is it a expected behavior? Is there some way to do that? I mean, the drop criterion based on distance? How can I do this be behavior? Thanks in advance. Rodrigo
[ns] how to use MCPS_DATA_request?
hello all, I am trying to broadcast a 802.15.4 MAC packet in p802_15_4mac.cc file. My code is: packet = Packet::alloc(); FrameCtrl frmCtrl; UINT_8 txop = 0; hdr_cmn *ch = HDR_CMN(packet); ch-direction() == hdr_cmn::DOWN; MCPS_DATA_request(index_,0, index_,defFrmCtrl_AddrMode16,0,p802_15_4macDA(packet),ch-size(),packet,0,txop); index_ is the srcAddress, inherited from MAC class. The problem is : [wpan/p802_15_4mac.cc::checkTaskOverflow][1.223884](node 76) task overflow: MCPS-DATA.request How can I send a mac message? I am in peer-to-peer 802.15.4 mode. Thanks in advance.
[ns] Can anybody use MCPS_DATA_request successfully?
Hello all, Have anybody ever successfully used this primitive?! It's a couple of weeks that I'm trying to transfer my own data packet using that but not a packet leaves my nodes! Please help me
[ns] Timer on Mac class
Hi all, I am trying to implement in ns2 a period timer in Mac class level. However, it is generating a infinite loop. Please, see my implementation: //.h class MyTimer : public Mac802_15_4Timer { public: MyTimer(MacClass *a) : Mac802_15_4Timer() {a_=a;} virtual voidhandle(Event *e); protected: MacClass *a_; }; //.cc void MyTimer::handle(Event *e) { a_-Test(); } void MacClass::Test() {o myTimer-start(0.5); // periodic timer 0.5 seconds } How can I use the stop method of Timer function to implement periodic event in MAC layer? I did the same procedure on Routing layer and it is possible! What is wrong? Thanks in advance. Jose Aguiar