Yes p_msg is the pointer to the message you want to send and yes you have
to call set power for each packet.
But if you want the same power for all packets then you can set it in the
make file using CFLAGS += -DCC2420_DEF_RFPOWER= <value>



> I found the command was defined like this, CC2420Packet.setPower(
> message_t*
> p_msg, uint8_t power )
>
> Is the parameter p_msg the message I want to send, and dose that mean I
> must
> call setPower() every time I want to send a message?
>
> 2011/3/14 崔晓宗 <[email protected]>
>
>> Thank you for your answers.
>>
>>
>> 2011/3/11 Breno Guimarães <[email protected]>
>>
>>> In that case you should look the CC2420 interfaces
>>> tos/chips/cc2420/
>>>
>>> There you will find the CC2420Packet implementation, with the setPower
>>> command. That will allow you to change the transmission power. That
>>> command
>>> accepts values from 0 to 31.
>>>
>>> Let me know if you have further questions
>>>
>>> Good luck,
>>>
>>> Breno Guimaraes
>>>
>>> 2011/3/11 崔晓宗 <[email protected]>
>>>
>>>> Micaz
>>>>
>>>> 2011/3/11 Breno Guimarães <[email protected]>
>>>>
>>>> Hi,
>>>>>
>>>>> Which mote are you using?
>>>>>
>>>>> Breno Guimaraes
>>>>>
>>>>> 2011/3/11 崔晓宗 <[email protected]>
>>>>>
>>>>>> I am using TinyOS 2.x, and I want to control the distance of
>>>>>> communication to save power. Please someone help me.
>>>>>> Thanks in advance.
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Xiaozong Cui
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Xiaozong Cui
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> [email protected]
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>>
>>
>> --
>> Regards,
>> Xiaozong Cui
>>
>>
>
>
> --
> Regards,
> Xiaozong Cui
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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

Reply via email to