Hi ,

I'm working with tinyos2.1. I have found two types of  writing a call
to a command.
For example,  the command prototype is:

 command error_t Sender.generateConfig(uint8_t lvl, long  snd_time,
       DATA_Packet_t *packet,Sender_Config_t *p )


To call this command, I found two manners:
the first manner is:


1) if((call Sender.generateConfig(0,(call Timer.getNow())/4,&pCDM,&sndcon)))

    {

       // rest of code


    }
2 ) the second manner to call this command is:
               error_t er;
                er = call Sender.generateConfig(0,(call
Timer.getNow())/4,&pCDM,&sndcon)
                 if (er == SUCCESS)
                     {

                     // rest of code

                   }

I have found the two manners of writing a call to a command. Is there
a difference between them? Is the first one  correct?

Thanks,

-- 
Wafa Ben Jaballah
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to