[Tinyos-devel] ctp vs other radio clients
Branislav Kusy
kusy at stanford.edu
Sat Dec 6 10:41:06 PST 2008
i did wire directly to ActiveMessageC. i'll try with AMSenderC on
monday. pretty sure this was the problem.
brano
Philip Levis wrote:
> Well, wiring directly to ActiveMessageC would definitely be a problem!
> Regardless, it looks like ctp needs to handle busy better. I'll look
> deeper.
>
>
> Phil
>
> On Dec 6, 2008, at 9:18 AM, "Geoffrey Werner-Allen"
> <werner at eecs.harvard.edu <mailto:werner at eecs.harvard.edu>> wrote:
>
>> Doesn't the queue only get put on the path if the component wires to
>> AMSenderC? What happens if, as Brany asked, something like FTSP wires
>> straight down to (essentially) CC2420ActiveMessageC.nc (which it does
>> through TimeSyncC.nc)? Anything sent below the queue won't get
>> properly serialized, right? This could cause an unexpected EBUSY
>> return in AMQueueImplP.nc if the stack is busy with somthing inserted
>> below the queue.
>>
>> Best,
>>
>> -gwa-
>>
>> geoffrey werner-allen :: 617.694.7261 ::
>> <http://www.eecs.harvard.edu/~werner>www.eecs.harvard.edu/~werner
>> <http://www.eecs.harvard.edu/~werner>
>>
>>
>> On Sat, Dec 6, 2008 at 12:15 PM, Philip Levis <
>> <mailto:pal at cs.stanford.edu>pal at cs.stanford.edu
>> <mailto:pal at cs.stanford.edu>> wrote:
>>
>>
>> On Dec 6, 2008, at 9:05 AM, Geoffrey Werner-Allen wrote:
>>
>> I'm pretty sure there IS one SendState and this was my concern
>> exactly, although Om states it more clearly.
>>
>> Best,
>>
>>
>> There is only one instance of StateC, but why does this matter?
>> Let's look at the queue code:
>>
>>
>> if (current >= numClients) { // queue empty
>> error_t err;
>> am_id_t amId = call AMPacket.type(msg);
>> am_addr_t dest = call AMPacket.destination(msg);
>>
>> dbg("AMQueue", "%s: request to send from %hhu (%p):
>> queue empty\n", __FUNCTION__, clientId, msg);
>> current = clientId;
>>
>> err = call AMSend.send[amId](dest, msg, len);
>> if (err != SUCCESS) {
>> dbg("AMQueue", "%s: underlying send failed.\n",
>> __FUNCTION__);
>> current = numClients;
>> queue[clientId].msg = NULL;
>>
>> }
>> return err;
>> }
>> else {
>> dbg("AMQueue", "AMQueue: request to send from %hhu
>> (%p): queue not empty\n", clientId, msg);
>> }
>> return SUCCESS;
>>
>> AMQueueImplP (of which there is a single instance, it uses
>> uniqueCount() to scale its state) only calls the lower AMSend if
>> the queue is empty. If the queue is not empty, this means there is
>> an outstanding send, so it waits for the underlying sendDone.
>>
>> Phil
>>
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
More information about the Tinyos-devel
mailing list