[Tinyos-help] Re: question on simple_transmit from Rfm_model.c

Liu Haibin liu.haibin at gmail.com
Mon Jun 5 03:04:10 PDT 2006


For example, let's say we have 2 motes. Mote 0 is transmitting 0s all the
time, so transmitting[5] = 0, radio_active[0] = 0, and radio_active[1] = 0.

While mote 0 is transmitting 0s, the TOSH_rfm_rx_bit() in
TOS_SIGNAL_HANDLER(SIG_OUTPUT_COMPARE2B, ()) of mote 1 is called. And
because radio_active[1] == 0, TOSH_rfm_rx_bit() returns 0. After 12 bits, it
signal ChannelMon.idleDetect() to show the channel is free. But actually
mote 0 is using the channel and transmitting 0s.

Why is it so? Any help is appreciated.


Regards,
Haibin





On 6/2/06, Liu Haibin <liu.haibin at gmail.com> wrote:
>
> Hi,
>
> I have a question about the following code from Rfm_model.c. The parameter
> bit can be 1 or 0. When simple_trasmit is transmitting bit 1,
> transmitting[modeID] is set to 1, meaning it's transmitting. However, when
> simple_transmit is transmitting bit 0, transmitting[modeID] is set to 0,
> meaning it's not transmitting (actually it's transmitting bit 0). Why is it
> so? I must have the concept wrong. Could any help me on this?
>
> void simple_transmit(int moteID, char bit) {
>   int i;
>
>   transmitting[moteID] = bit;
>   for (i = 0; i < tos_state.num_nodes; i++) {
>     radio_active[i] += bit;
>   }
> }
>
>
> Regards,
> Haibin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20060605/157e2afc/attachment.html


More information about the Tinyos-help mailing list