Hi,
not really, you just need to use the interface CC2420Packet, that is
provided by
component CC2420PacketC.
uses {
interface Receive as BeaconReceive;
interface CC2420Packet as RadioPacket;
}
Then, when you receive the message (in my example is a struct of type
BeaconMsg)
event message_t * BeaconReceive.receive(message_t *msg, void *payload,
uint8_t len){
BeaconMsg * pointerBeacon;
int8_t rssi;
if ( len == sizeBeacon ) {
pointerBeacon = (BeaconMsg*) payload;
rssi = call RadioPacket.getRssi(msg);
}
}
Cheers!
Sergio
On Mon, Jan 10, 2011 at 6:06 AM, SHIVASANKAR GANESAN <[email protected]>wrote:
> Hi
>
> Do we need to include any header file for using RSSI_VAL register.
>
> I want to read RSSI Value.
>
> when I am using below given line.
>
> *power=RSSI_VAL-45;//for RSSI reading,here RSSI_OFFSET is -45dBm.*
>
> It is giving error as
>
> *`RSSI_VAL' undeclared (first use in this function).*
>
> *With regards*
> *Sivasankar*
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help