TinyOS uses nesC to compile multiple components into a single file. By putting
components Main, TimerC; Main.StdControl -> TimerC.StdControl into your configuration means that when Main executes its StdControl function, it will execute TimerC's StdControl functions too. Basically "Main" is the same as your "main()" function in a traditional C program. Many TinyOS components use the StdControl interface to be initialized, started, or stopped. By "wiring" a component to main (as shown above), Main will initialize the component when it initializes, start it when Main starts, and stop it when Main stops. Does that make sense? More information about such usage is in the TinyOS tutorials in tinyos-1.x/doc/tutorial -Joe -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cute Snoopy Sent: Wednesday, January 05, 2005 8:20 PM To: [email protected] Subject: [Tinyos-users] StdControl.init Hello I want to know about this function "StdControl.init();" In platform "msp430" In main() (in file MainM.nc) , it calls StdControl.init(); but i see this function in many files in the platform ( ADCM.nc , InternalTempM.nc , InternalVoltageM.nc , MSP430ADC12M.nc , MSP430ClockM.nc and TimerM.nc ) How do you know it calls this function from which file? After I run "make telos" I open build/telos/app.c , I know it calls from TimerM.nc . Why does it call the function from this file? Thank a lot. Duang __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Tinyos-users mailing list [email protected] http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
