2 * Copyright (c) 2007, Vanderbilt University
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation for any purpose, without fee, and without written agreement is
7 * hereby granted, provided that the above copyright notice, the following
8 * two paragraphs and the author appear in all copies of this software.
10 * IN NO EVENT SHALL THE VANDERBILT UNIVERSITY BE LIABLE TO ANY PARTY FOR
11 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
12 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE VANDERBILT
13 * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 * THE VANDERBILT UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
16 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
17 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
18 * ON AN "AS IS" BASIS, AND THE VANDERBILT UNIVERSITY HAS NO OBLIGATION TO
19 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
21 * Author: Miklos Maroti
29 * Starts the transmission of the given message. This command must not
30 * be called while another send is in progress (so one must wait for the
31 * sendDone event). Returns EBUSY if a reception is in progress or for
32 * some other reason the request cannot be temporarily satisfied (e.g.
33 * the SPI bus access could not be acquired). In this case the send
34 * command could be retried from a tasklet. Returns SUCCESS if the
35 * transmission could be started. In this case sendDone will be fired.
37 tasklet_async command error_t send(message_t* msg);
40 * Signals the completion of the send command, exactly once for each
41 * successfull send command. If the returned error code is SUCCESS, then
42 * the message was sent (may not have been acknowledged), otherwise
43 * the message was not transmitted over the air.
45 tasklet_async event void sendDone(error_t error);
48 * This event is fired when the component is most likely able to accept
49 * a send request. If the send command has returned with a failure, then
50 * this event will be called at least once in the near future.
52 tasklet_async event void ready();