On Nov 13, 2007, at 10:52 AM, Michael Schippling wrote:

My personal belief is that it is like "call" in that no direct return
value is available to the user. My further belief is that the signaled
code is run asynch, so the signaler does not block waiting for it.

I could be wrong (probably) so I hope someone who actually knows will help

Events can have return values:

interface CsmaBackoff
{
  /**
* Return initial backoff time before attempting to send message m. The
   * units are radio dependent.
   * @return Initial backoff time
   */
  async event uint16_t initial(message_t* m);

  /**
* Return backoff time after message m could not be send due to congestion.
   * The units are raio dependent.
   * @return Backoff time after congestion
   */
  async event uint16_t congestion(message_t* m);
}

Not all events are async:

interface Read<val_t> {
  /**
   * Initiates a read of the value.
   *
   * @return SUCCESS if a readDone() event will eventually come back.
   */
  command error_t read();

  /**
   * Signals the completion of the read().
   *
   * @param result SUCCESS if the read() was successful
   * @param val the value that has been read
   */
  event void readDone( error_t result, val_t val );
}

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

Reply via email to