[Tinyos-devel] Reconfiguring an owned resource
Sandip Bapat
sandipbapat at yahoo.com
Thu Aug 14 14:43:53 PDT 2008
What is the proper method for a component to reconfigure a resource that it currently owns?
For instance, I have an app that wires to Msp430Uart0C, requests and is granted the Uart0 resource. Now it wants to interact with devices B and C using different Uart parameters like baud rate. The desired application sequence would be something like:
1. Request Uart0 resource
2. Resource granted
3. Send x bytes to device B using baud rate b1
4. Send y bytes to device C using baud rate b2
5. Release Uart0 resource
Two ways of doing this come to mind:
a. Release and re-request the resource while changing config params in between 3 and 4 (would like to avoid giving up the resource due to timing concerns)
b. The app can directly wire to the underlying Msp430UartP.nc component and call ResourceConfigure.unconfigure on it followed by ResourceConfigure.configure in between.
Will both work? Is there a better solution?
I know the rationale for Msp430Uart0C using the UartConfigure interface, but should it also provide something like ResourceConfigure?
Thanks,
Sandip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-devel/attachments/20080814/1d0e919e/attachment.htm
More information about the Tinyos-devel
mailing list