Phil,

Thank you for your comments.
why do you want them in a separate file?
My subroutines consist of more than 70 separate files. Each file had macro definitions and some files had constants declared outside of function. That's the motivation to compile each file separately, though I've modified all these files to be included under the "implementation" block as you described.

Best regards,

Tomo

Tomonori NAGAYAMA



Philip Levis wrote:
On Mar 7, 2006, at 11:24 PM, Tomonori NAGAYAMA wrote:

Hi,

I'm using c-written subroutines for programs on TinyOS. Subroutine definition files (xxx.c) are combined to .nc files using "#include" and "includes". So far this approach has been working, but I couldn't find supporting document for this approach. Is there any drawback of using c-written subroutines on TinyOS?

A couple of disadvantages:

1) You don't get the sync/async concurrency analysis (it's implicit, rather than explicit)
2) It probably won't work with TOSSIM

You can always just put C functions inside a component: why do you want them in a separate file? E.g.:

module X {..}
implementation {
  bool z = 0;

  bool y() {
    z = !z;
    return z;
  }

}

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

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

Reply via email to