As a general case you look in your application's config files "components" section to see what the component might be called, in this case "LedsC". This may be hampered by one or more remappings using "as" and other features of the nesc config. Then you do a file find in all the "tos" directory trees that you may be using -- the main tinyos.*/tos tree and any contrib trees that you have -- for that name. Sometimes you will get lucky and find the actual code. Sometimes it becomes a rathole of de-references to other components and files.
Often you can do a "make <platform> docs" in your app directory and then find a nice graphvized diagram of the module structure of the application -- usually hidden in some other "doc" directory, look carefully at the output of the make -- from which, after a period of study, you can extract the base component file names. On further down-drilling one may discover the actual full path, obfuscated into a Java like x.y.z.file.nc format, on the pages generated for each component. MS Razvan Musaloiu-E. wrote: > Hi! > > On Fri, 6 Mar 2009, Anthony L wrote: > >> Hi, >> >> Im currently studying the language and layout of nesC. Im working with >> the MSP430 MCU. Can anyone tell me where the code for commands provided >> by interfaces is written? > > The code can be in a bunch of places: tos/system, tos/platforms/telosb, > tos/platforms/telosa, tos/chips/cc2420, etc. All the places where nesC > looks for components for telosb are declared in > tos/platforms/telosb/.platform. > >> For example: >> Say if i wanted to look at the actual code which led0Toggle () runs, where >> can I find it? >> The Leds interface defines all the commands but no actual code (which makes >> sense for abstraction) >> However, I cant find this code in the MSP430 chip directory either. >> > > The Leds interface (to which led0Toggle belongs to) is provided by > LedsC.nc and NoLedsC.nc from tos/system. > > All the best! > Razvan ME > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Platform: WinXP/Cygwin TinyOS version: 1.x, Boomerang Programmer: MIB510 Device(s): Mica2, MicaZ, Tmote Sensor board: homebrew _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
