Hi David,

On Wed, Jul 29, 2009 at 1:33 AM, David Li<[email protected]> wrote:
> Hi Miklos,
>
> You probably misunderstood my question.
>
> I have already set the value myself in HplRF230.h on the sender.  The
> question really is if there is an interface for me to read the preset value.
> The purpose is to then send the tx power value to the base station for
> display - I already know how to do the send part but don't know where to
> retrieve the power value.

If you have set it there by defining the RF230_DEF_RFPOWER value, then
you can use that macro in other parts of your code. That is a constant
you can always refer to.

> Right now the value doesn't seem be set in the message when I call
> PacketTransmitPower.get(&msg). Do you know why?

When the message is transmitted then the following logic is used to
get the TX_POWER value: if PacketTransmitPower is not set, then the
RF230_DEF_RFPOWER is used for the transmission, otherwise the one
defined by PacketTransmitPower is used. So your previous code is
correct. Note however, that the PacketTransmitPower value is not set
by default.

Miklos

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to