[Tinyos-help] 'static ' keyword in generic module

Philip Levis pal at cs.stanford.edu
Fri Sep 14 10:36:47 PDT 2007


On Sep 14, 2007, at 12:25 AM, Daniel Widyanto wrote:

>
> Hi all,
>
> I want to know whether 'static' keyword inside the generic
> module behaves similar to Java's static ?
>
> So, if I have two instance of the same generic module,
> can they refer to the same static variable ?
> Or they will have their own copy ?

static operates as it does in C.

All component variables are private. So two instances of a generic  
component cannot refer to the same static variable.

Phil


More information about the Tinyos-help mailing list