[Tinyos-help] Re: Debbuging Interface
Darren BISHOP
d.bishop at cs.ucl.ac.uk
Fri Aug 18 04:55:22 PDT 2006
Nevermind,
I am exploring using function pointers; it compiles, I guess as they
aren't used in command/event signatures.
Also discovered the C attribute - I am hoping this will allow access to
the modules namespace. If anyone is curious, read the 'nesC 1.1 Language
Reference Manual', in particular nesC Applications and Miscellaneous
sections.
Best regards,
Darren
Darren BISHOP wrote:
> Hi All,
>
> Ted: Can you give details on your debugging interface?
>
> Phil: I have implemented a C function with declaration 'extern
> result_t lprintf(result_t *status, char *format, ...). The definition
> is included by a LoggingM component that sends to UART when on Tmote
> Sky or calls dbg when on TOSSIM.
>
> Is there anyway to access the UART i.e. send to it, from this C
> function. At some point I will be able to assert that no other
> component will be sending to UART other than through this 'interface';
> essentially I am trying to replicate dbg(...) when running on mote
> hardware.
>
> As it is, my implementation maintains a circular log-buffer which the
> LoggingM component must poll to learn when work needs to be done, that
> is, send to UART. What timer-rate do you think is reasonable in order
> to yield an acceptable trade-off (i.e. performance hit due to context
> switching vs. promptness of logging)? Should this be user-definable
> (perhaps in the form of a compile-time option) where only the user
> will really know how much (read: frequent) logging would be used, and
> also how dependent (pc-side) processes are on timelyness; what's your
> opinion?
>
> Best regards,
>
> Darren B
More information about the Tinyos-help
mailing list