Hi everybody!
I'm using a new MAC protocol for wireless nodes, in ns2.28 .
I need the transmission time information to decrease node's energy, at
wireless-phy.cc.
For this reason in MAC I set the txtime_ variable of the common header, before
sending down the MAC control packets to PHY.
struct hdr_cmn *ch = HDR_CMN(p);
ch->txtime()=tx_time(p);
But when I control the value of the txtime of the common header in
wireless-phy.cc, for my MAC control packets it is always 0.0!
(then the energy doesn't decrease, after the MAC control epoch! )
Why??????
perhaps the value is negligible??? Could be negligible 0.00008 seconds ????
Which is the correct point to set the txtime_?? And is there any?
The only thing I do before sending down a packet to PHY, after setting txtime,
is to print on screen the value of txtime!
Am I wrong?
At the receiver the packets arrive with the correct delay ( txtime +
propagation delay)...
There is another strange thing, that I couldn't explain: the MAC trace writes
only when a MAC control packet is sent, but not when it is received!
When MAC-trace is called, precisely?
Could somebody give me a hint, please? I'm very new to ns...
Thank you!
Annalisa
Thank you!