[ns] Help with Radio states of 802.15.4 implementation (Ankur Garg)
ankur garg
ankurgarg.ism at gmail.com
Thu Jun 12 19:22:33 PDT 2008
Hi!,
I am working on the 802.15.4. I am tweaking up things to implement a new
protocol. Can any body tell me why a transition of radio state TX_ON to
RX_ON is not done immediately. this has been done using a turn
_around_state with a delay of turn_around and two times a confirmation goes:
1. from this plme_set_trx_state_confirmation with state as p_SUCCESS
2. when the TRXhandler is called it confirms the state as TX_ON/RX_ON.
Is this because of RFC of 802.15.4 or just done for simulation or a
limitation of radio that it takes a turnaorund time for switching.
I am also posting here the code section from file wpan/phy802_15_4.cc
--------------------------------------------------
CODE
-------------------------------------------------
{
t_status = p_SUCCESS;
if (((state == p_RX_ON)&&(trx_state == p_TX_ON))
||((state == p_TX_ON)&&(trx_state == p_RX_ON)))
{
trx_state_turnaround = state;
delay = true;
}
else
trx_state = state;
}
//we need to delay <aTurnaroundTime> symbols if Tx2Rx or Rx2Tx
if (delay)
{
trx_state = p_TRX_OFF; //should be disabled immediately
(further transmission/reception will not succeed)
TRXH.start(aTurnaroundTime/getRate('s'));
}
else
mac->PLME_SET_TRX_STATE_confirm(t_status);
More information about the Ns-users
mailing list