Hi, Command is implemented by the interface you use, in other word, there's no need to write the program to realize it by yourself, just declear the interface and call it when you need. In contrast, you have to implement the regular function in your file.
Regards, Jennifer On Thu, Apr 3, 2008 at 3:06 PM, BEN LOLO ANAT <[EMAIL PROTECTED]> wrote: > > Thank you for your answer but I didn't understand yet what is the > different between using Command and using regular function, > when both of them are implemented in the file by me? Is there any > different from the microcontroller in that case? > > > > -----Original Message----- > *From:* shankar satish [mailto:[EMAIL PROTECTED] > *Sent:* Wednesday, April 02, 2008 1:42 PM > *To:* BEN LOLO ANAT > *Subject:* Re: [Tinyos-help] Command and Task > > Hi, > > A group of commands and events is called an interface. If a module > provides an interface, it must implement all the commands defined in the > interface. If some other module uses the interface, the corresponding > configuration file must "wire" the used interface to a module that actually > implements that interface. Whenever this module calls commands from the > interface, the code defined in the module to which the interface is "wired" > is run. In other words, the implementation of a command can be written in a > different module. > > A function is written as usual in C. > > Events are "signalled" by the the module that implements the interface. A > module that uses the interface must "handle" the events signaled. > > A task is a piece of code (usually some heavy computation) that is > "posted" in a que and executed whenever the microcontroller is free. A > function can return a value, but a task always returns a void. > > Hope that helps. > > -Regards, > Shankar. > > On Wed, Apr 2, 2008 at 9:10 AM, BEN LOLO ANAT <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > 1. What is the different between using Command and using regular > > function that is implemented in the file? > > > > 2. What can I call from an event? > > and what is the different between calling Command, calling Task or > > calling regular function from an event? > > > > Thanks, Anat > > > > > > > > > > > > > > > > This message (including any attachments) issued by RAFAEL- ADVANCED > > DEFENSE SYSTEMS LTD. (hereinafter "RAFAEL") contains confidential > > information intended for a specific individual and purpose, may constitute > > information that is privileged or confidential or otherwise protected from > > disclosure. If you are not the intended recipient, you should contact us > > immediately and thereafter delete this message from your system. You are > > hereby notified that any disclosure, copying, dissemination, distribution or > > forwarding of this message, or the taking of any action based on it, is > > strictly prohibited. If you have received this e-mail in error, please > > notify us immediately by e-mail mailto:[EMAIL PROTECTED] and > > completely delete or destroy any and all electronic or other copies of the > > original message and any attachments thereof. > > > > > > _______________________________________________ > > Tinyos-help mailing list > > [email protected] > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > > > > > > > > > This message (including any attachments) issued by RAFAEL- ADVANCED > DEFENSE SYSTEMS LTD. (hereinafter "RAFAEL") contains confidential > information intended for a specific individual and purpose, may constitute > information that is privileged or confidential or otherwise protected from > disclosure. If you are not the intended recipient, you should contact us > immediately and thereafter delete this message from your system. You are > hereby notified that any disclosure, copying, dissemination, distribution or > forwarding of this message, or the taking of any action based on it, is > strictly prohibited. If you have received this e-mail in error, please > notify us immediately by e-mail mailto:[EMAIL PROTECTED] and completely > delete or destroy any and all electronic or other copies of the original > message and any attachments thereof. > > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
