On Feb 16, 2010, at 9:54 PM, Xiaohui Liu wrote:
> Hi all,
>
> What is a "client" in CTP? Is it possible that more than one clients reside
> on a single mote?
It's an instance of a CollectionSenderC.
>
> In "CtpP.nc", the size of the queue of packets to send is defined as:
> QUEUE_SIZE = CLIENT_COUNT + FORWARD_COUNT,
>
> and in "CtpForwardingEngineP.nc"
> command error_t Send.send[uint8_t client](message_t* msg, uint8_t len) {
> ......
> qe = clientPtrs[client];
> qe->msg = msg;
> qe->client = client;
> qe->retries = MAX_RETRIES;
> dbg("Forwarder", "%s: queue entry for %hhu is %hhu deep\n", __FUNCTION__,
> client, call SendQueue.size());
> if (call SendQueue.enqueue(qe) == SUCCESS) {
> if (radioOn && !call RetxmitTimer.isRunning()) {
> post sendTask();
> }
> clientPtrs[client] = NULL;
> return SUCCESS;
> }
> .......
>
> both of which mean there is at most one packet from a client pending to be
> sent in the sending queue. Why isn't it possible that more than one packets,
> say two, from the same client are waiting in the queue and eventually
> transmitted in FIFO order? Thanks.
CTP itself only gives you a one-deep queue. You can put a deeper queue on top
of that if you want. It give you only a one-deep queue to bound memory use.
Phil_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help