On Feb 16, 2010, at 6:55 PM, Xiaohui Liu wrote:

> Hello everyone,
> 
> I was looking at CTP code and find the following in configuration "CtpP.nc":
> 
> 127: components LinkEstimatorP as Estimator; 
> 
> 134: components new CtpRoutingEngineP(TREE_ROUTING_TABLE_SIZE, 128, 512000) 
> as Router;
> 135:
> 136: StdControl = Router;
> 137: StdControl = Estimator;
> 
> 
> What do line 136 and 137 mean? Thanks.

It's a shortcut. If the component only has one matching instance of the 
interface, it automatically wires to that instance. So these lines are 
effectively

StdControl = Router.StdControl;
StdControl = Estimator.StdControl;

I'd suggest reading the TinyOS tutorials and TinyOS programming manual (page 
56) or the first half of TinyOS Programming (page 45). You can download both 
from docs.tinyos.net.

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

Reply via email to