On Thu, 2006-05-04 at 12:41 -0700, David Moss wrote:
> Yes, they use the same location.  Parameterized interfaces help solve this
> problem by allowing you to handle multiple clients and create an array of
> variables, one for each client, by using the unique("<interface_name>") and
> uniqueCount("<interface_name") nesC commands.  
> 
> Just make sure if you're going to implement the parameterized interface to a
> component, that you also implement default events for your component's
> interface, or you'll get compile errors.

That is correct. nesC 1.2 introduces generic components (which TinyOS
2.0 uses heavily). They look like this:

components new Queue(message_t*, 8) as SendQueue;
components new Queue(message_t*, 8) as ForwardQueue;

Components that are not generic are singletons. These both refer to the
same component, Queue, the same functions, the same variables, etc.:

component Queue as SendQueue;
component Queue as ForwardQueue;

Phil

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

Reply via email to