[ns] Timer on Mac class

2011-06-05 Thread Jose Aguiar Silva
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);

[ns] how to use MCPS_DATA_request?

2011-06-07 Thread Jose Aguiar Silva
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,

[ns] Can anybody use MCPS_DATA_request successfully?

2011-06-07 Thread Jose Aguiar Silva
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] TwoRayGround propagation loss path

2011-08-24 Thread Jose Aguiar Silva
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