There is some kind of weirdness with include in NESC
which I never exactly remember. But in general it
seems that one needs to use:
includes file; // note without the ".h" !!??
outside of the module/implementation braces, and
#include "file.h"
inside the braces. Or at least those are the examples
I can find in my old T1 tree just now...
I would also review your header file for mistakes.
MS
Fernando Gielow wrote:
> Here is the beginning of my Module file:
>
> #include <Timer.h>
> #include "FloodingMsgC.h"
>
> module FloodingC {
> uses interface Boot;
> uses interface Leds;
> uses interface Timer<TMilli> as Timer;
> uses interface Packet;
> uses interface AMPacket;
> uses interface AMSend;
> uses interface Receive;
> uses interface SplitControl as AMControl;
> uses interface Random;
> }
>
> Which causes tons of errors:
> /home/fernando/workspace/Flooding/src/FloodingC.nc:4: syntax error
> before `module'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:6: syntax error
> before `interface'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:7: syntax error
> before `interface'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:8: syntax error
> before `interface'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:9: syntax error
> before `interface'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:10: syntax error
> before `interface'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:11: syntax error
> before `interface'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:12: syntax error
> before `interface'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:13: syntax error
> before `interface'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:15: syntax error
> before `{'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:19: syntax error
> before `void'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:23: syntax error
> before `void'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:26: syntax error
> before `void'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:30: syntax error
> before `void'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:33: syntax error
> before `message_t'
> /home/fernando/workspace/Flooding/src/FloodingC.nc:37: syntax error
> before `void'
>
>
> However, if I just cut out the '#include "FloodingMsgC.h"', it works
> perfectly. Can someone tell me why is that? It makes no sense at all to
> me...
>
>
> Thanks in advance,
> Fernando.
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help