[Tinyos-help] [nesC] fan-out warnings
Philip Levis
pal at cs.stanford.edu
Sun Nov 25 18:44:35 PST 2007
On Nov 22, 2007, at 8:29 AM, Wouter Horré wrote:
> Hi,
>
> I have a wiring situation that looks like the folowing (simplified):
>
> generic component A generic component A
> (instance 1) (instance 2)
> | | interface I1<uint16_t>
> +---> component B <-------+
> | interface I2
> +--> configuration C
> (contains component D providing I2)
>
> Compiling this results in the following warnings:
> nesc1: warning: calls to I2.method1 in B fan out, but there is no
> combine
> function specified for the return type
> ...
>
> The generated app.c contains:
>
> inline static void *B$I2$method1(message_t *arg_0xb78dd4e8, uint8_t
> arg_0xb78dd670){
> #line 17
> void *result;
> #line 17
>
> #line 17
> result = D$I2$method1(arg_0xb78dd4e8, arg_0xb78dd670);
> #line 17
> result = D$I2$method1(arg_0xb78dd4e8, arg_0xb78dd670);
> #line 17
>
> #line 17
> return result;
> #line 17
> }
>
> Why does nesC complain about a fan-out of interface I2? I believe
> this should
> not happen and the generated app.c seems to support this believe
> (the 2
> so-called fan-out calls are identical).
>
> Making component B generic makes the warnings dissappear, but it
> duplicates
> the code of component B, which is not desired.
>
> Should I just ignore these warnings or is this a bug that is solved
> in a more
> recent nesC compiler? I am using nesc 1.2.8a.
>
Are your component A's wiring B to C? If they are, then each time you
instantiate an A, you wire B to C again.
Phil
More information about the Tinyos-help
mailing list