It's possible to provide/use commands directly, without them being part
of an interface, though I think it's a bit of a hack. You have just got
to get the wiring right.
> configuration MyApp {
> provides {
> command result_t txBytes(uint8_t *bytes, uint8_t numBytes);
> }
> }
Are you sure your app needs to provide the command? Usually, the top
level configuration neither provides nor uses anything.
To wire txBytes to your module:
> implementation {
> components Main, MyAppM, TimerC, LedsC, NoCRCPacket as NoPacket,
UART;
MyAppM.txBytes -> NoPacket.txBytes;
Should do the trick. Then inside the module:
> module MyAppM {
> provides {
> interface StdControl;
>
> }
> uses {
> interface Timer;
> interface Leds;
> interface StdControl as PhotoControl;
> interface SendUART;
>
> command result_t NoCRCPacket.txBytes(uint8_t *bytes, uint8_t
numBytes);
You shouldn't mention the NoCRCPacket here, just the command:
command result_t txBytes(uint8_t *bytes, uint8_t numBytes);
Then, call it as
call txBytes(...);
HTH,
Michiel
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help