Hi,
After a lot of struggle, I was able to set the value for this interface from
metadata

  command void putOnAirTo(int dest,
                          message_t* msg,
                          bool ack,
                          sim_time_t endTime,
                          double gain,
                          double reverseGain);

Now, Can anyone tell me the minm and maxm values of gain ? I guess max is 0
and minimum should be -ve. I don't have exact values.

Any help appreciated.


Thanks,
Vijayant



On Dec 3, 2007 12:42 PM, Philip Levis <[EMAIL PROTECTED]> wrote:

>
> On Dec 2, 2007, at 3:47 PM, Vijayant Bhatnagar wrote:
>
> > Hi Kevin,
> > I would like to thank you for your reply. We are indeed using
> > TOSSIM. Right now I am trying to get the latest source code from
> > CVS and then try to run my code.
> >
> > Do you think that we will not be able to change TX_POWER even after
> > getting the latest source code ? Any help by others is
> > appreciated ! Actually, changing TX_POWER is very important for our
> > research. If this thing doesn't work, it will be very difficult for
> > us to prove our algorithm. So, we have to get this working at any
> > cost!
> >
> > Any help appreciated in this regards.
> >
>
> TOSSIM currently doesn't supporting changing TX power, but its
> implementation is such that adding such support would not be too
> hard. The call you care about is in TossimPacketModelC.nc:
>
>     call GainRadioModel.putOnAirTo(destNode, sending, metadata->ack,
> evt->time,
> 0.0, 0.0);
>
> The signature is this:
>
>   command void putOnAirTo(int dest,
>                           message_t* msg,
>                           bool ack,
>                           sim_time_t endTime,
>                           double gain,
>                           double reverseGain);
>
> Basically, the final two parameters, both of which are 0.0, are there
> to incorporate TX power control. It assumes 0.0 is the max power. If
> you want the node to transmit at a lower power, then you change the
> first parameter. The second parameter is the receiver's transmit
> power, which matters for acknowledgement transmissions.
>
> So if you put a metadatafield in the message_t that held the transmit
> power level and could be set by an interface, then pulled that out
> just before this call in order to change the gain, that would work.
> I'd add some noise or non-linearity in there because TX power control
> is rarely a simple and crisp curve. But you can refer to chip data
> sheets to see what their curves look like.
>
> Phil
>
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to