]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
safe tinyos annotations (all in nesdoc comments)
authorregehr <regehr>
Wed, 4 Jun 2008 03:00:25 +0000 (03:00 +0000)
committerregehr <regehr>
Wed, 4 Jun 2008 03:00:25 +0000 (03:00 +0000)
28 files changed:
tos/interfaces/AMPacket.nc
tos/interfaces/AMSend.nc
tos/interfaces/BlockRead.nc
tos/interfaces/BlockWrite.nc
tos/interfaces/ConfigStorage.nc
tos/interfaces/Crc.nc
tos/interfaces/CsmaBackoff.nc
tos/interfaces/I2CPacket.nc
tos/interfaces/Intercept.nc
tos/interfaces/InternalFlash.nc
tos/interfaces/LinkPacketMetadata.nc
tos/interfaces/LogRead.nc
tos/interfaces/LogWrite.nc
tos/interfaces/LowPowerListening.nc
tos/interfaces/Packet.nc
tos/interfaces/PacketAcknowledgements.nc
tos/interfaces/PacketLink.nc
tos/interfaces/Pool.nc
tos/interfaces/Queue.nc
tos/interfaces/RadioTimeStamping.nc
tos/interfaces/ReadRef.nc
tos/interfaces/ReadStream.nc
tos/interfaces/Receive.nc
tos/interfaces/Send.nc
tos/interfaces/SendNotifier.nc
tos/interfaces/SpiPacket.nc
tos/interfaces/UartByte.nc
tos/interfaces/UartStream.nc

index f403c21d18b84a5b28fa7ace4d5243b351a4ecc7..72fc2fb9b2e0d26a7c2e2bddd8aface4f0f18745 100644 (file)
@@ -60,7 +60,7 @@ interface AMPacket {
    * Return the AM address of the destination of the AM packet.
    * If <tt>amsg</tt> is not an AM packet, the results of this command
    * are undefined.
-   * @param amsg    the packet
+   * @param 'message_t* ONE amsg'    the packet
    * @return        the destination address of the packet.
    */
   
@@ -70,7 +70,7 @@ interface AMPacket {
    * Return the AM address of the source of the AM packet.
    * If <tt>amsg</tt> is not an AM packet, the results of this command
    * are undefined.
-   * @param amsg  the packet
+   * @param 'message_t* ONE amsg'  the packet
    * @return      the source address of the packet.
    */
    
@@ -85,7 +85,7 @@ interface AMPacket {
    * and then recover it when actually sending. If <tt>amsg</tt> is
    * not an AM packet, the results of this command are undefined.
    *
-   * @param  amsg   the packet
+   * @param  'message_t* ONE amsg'   the packet
    * @param  addr   the address
    */
 
@@ -103,7 +103,7 @@ interface AMPacket {
    * layer (e.g., a protocol bridge). If <tt>amsg</tt> is
    * not an AM packet, the results of this command are undefined.
    *
-   * @param  amsg   the packet
+   * @param  'message_t* ONE amsg'   the packet
    * @param  addr   the address
    */
 
@@ -119,7 +119,7 @@ interface AMPacket {
    * the mote's local address. If <tt>amsg</tt> is not an AM packet,
    * the results of this command are undefined.
    *
-   * @param  amsg   the packet
+   * @param  'message_t* ONE amsg'   the packet
    * @return        whether the packet is addressed to this AM stack
    */
   command bool isForMe(message_t* amsg);
@@ -129,7 +129,7 @@ interface AMPacket {
    * If <tt>amsg</tt> is not an AM packet, the results of this command
    * are undefined.
    *
-   * @param  amsg   the packet
+   * @param  'message_t* ONE amsg'   the packet
    * @return        the AM type
    */
   
@@ -144,7 +144,7 @@ interface AMPacket {
    * sending. If <tt>amsg</tt> is not an AM packet, the results of
    * this command are undefined.
    * 
-   * @param  amsg    the packet
+   * @param  'message_t* ONE amsg'    the packet
    * @param  t       the AM type
    */
   
@@ -159,7 +159,7 @@ interface AMPacket {
    * nodes only receive packets whose AM group field matches their
    * own.
    *
-   * @param amsg the packet
+   * @param 'message_t* ONE amsg' the packet
    * @return the AM group of this packet
    */
   
@@ -170,7 +170,7 @@ interface AMPacket {
    * stacks will set this field automatically on a send request, which
    * may overwrite changes made with this command.
    *
-   * @param amsg the packet
+   * @param 'message_t* ONE amsg' the packet
    * @param group the packet's new AM group value
    */
   command void setGroup(message_t* amsg, am_group_t grp);
index 27c93d226ed7e23ec0efa4a8b83fd29e62464669..b2d07dfb4004685f16097792150b4598d50a6e42 100644 (file)
@@ -57,7 +57,7 @@ interface AMSend {
     * will signal sendDone with error code.
     *
     * @param addr   address to which to send the packet
-    * @param msg    the packet
+    * @param 'message_t* ONE msg'    the packet
     * @param len    the length of the data in the packet payload
     * @return       SUCCESS if the request to send succeeded and a
     *               sendDone will be signaled later, EBUSY if the
@@ -78,7 +78,7 @@ interface AMSend {
     * A successful call to cancel must always result in a 
     * sendFailed event, and never a sendSucceeded event.
     * 
-    * @param  msg     the packet whose transmission should be cancelled.
+    * @param  'message_t* ONE msg'    the packet whose transmission should be cancelled.
     * @return SUCCESS if the transmission was cancelled, FAIL otherwise.
     * @see    sendDone
     */
@@ -89,7 +89,7 @@ interface AMSend {
     * the message buffer sent, and <tt>error</tt> indicates whether
     * the send was successful.
     *
-    * @param  msg   the packet which was submitted as a send request
+    * @param  'message_t* ONE msg'   the packet which was submitted as a send request
     * @param  error SUCCESS if it was sent successfully, FAIL if it was not,
     *               ECANCEL if it was cancelled
     * @see send
@@ -118,8 +118,8 @@ interface AMSend {
     * (minus the length parameter) and is included in this interface
     * as a convenience.
     *
-    * @param  msg    the packet
-    * @return        the payload of the packet
+    * @param  'message_t* ONE msg'    the packet
+    * @return 'void* COUNT(len)'      the payload of the packet
     */
   command void* getPayload(message_t* msg, uint8_t len);
 
index 156fe544cac78944f76ad53e806249178d049d08..4f72c9981e1d1f904192c1ffbe407e5909231210 100644 (file)
@@ -46,7 +46,7 @@ interface BlockRead {
    * operation.
    * 
    * @param addr starting address to begin reading.
-   * @param buf buffer to place read data.
+   * @param 'void* COUNT(len) buf' buffer to place read data.
    * @param len number of bytes to read.
    * @return 
    *   <li>SUCCESS if the request was accepted, 
@@ -59,7 +59,7 @@ interface BlockRead {
    * Signals the completion of a read operation.
    *
    * @param addr starting address of read.
-   * @param buf buffer where read data was placed.
+   * @param 'void* COUNT(len) buf' buffer where read data was placed.
    * @param len number of bytes read.
    * @param error SUCCESS if the operation was successful, FAIL if
    *   it failed
index a61e91a1213232df543f4e95916e98f3ca14709e..5ecd3d11dbc0ae07ae50a1a5669b472299215d1f 100644 (file)
@@ -48,7 +48,7 @@ interface BlockWrite {
    * Between two erases, no byte may be written more than once.
    * 
    * @param addr starting address to begin write.
-   * @param buf buffer to write data from.
+   * @param 'void* COUNT(len) buf' buffer to write data from.
    * @param len number of bytes to write.
    * @return 
    *   <li>SUCCESS if the request was accepted, 
@@ -63,7 +63,7 @@ interface BlockWrite {
    * been completed.
    *
    * @param addr starting address of write.
-   * @param buf buffer that written data was read from.
+   * @param 'void* COUNT(len) buf' buffer that written data was read from.
    * @param len number of bytes written.
    * @param error SUCCESS if the operation was successful, FAIL if
    *   it failed
index f73d01c121d3530d65412df2bf0d5ab690e944f4..a48cc7c0721cdd7d61ede08eb16394312fe0830d 100644 (file)
@@ -56,7 +56,7 @@ interface ConfigStorage {
    * as of the last commit operation.
    * 
    * @param addr starting address to begin reading.
-   * @param buf buffer to place read data.
+   * @param 'void* COUNT(len) buf' buffer to place read data.
    * @param len number of bytes to read.
    * @return 
    *   <li>SUCCESS if the request was accepted, 
@@ -72,7 +72,7 @@ interface ConfigStorage {
    * Signals the completion of a read operation.
    *
    * @param addr starting address of read.
-   * @param buf buffer where read data was placed.
+   * @param 'void* COUNT(len) buf' buffer where read data was placed.
    * @param len number of bytes read.
    * @param error SUCCESS if the operation was successful, FAIL if
    *   it failed
@@ -86,7 +86,7 @@ interface ConfigStorage {
    * operation.
    * 
    * @param addr starting address to begin write.
-   * @param buf buffer to write data from.
+   * @param 'void* COUNT(len) buf' buffer to write data from.
    * @param len number of bytes to write.
    * @return 
    *   <li>SUCCESS if the request was accepted, 
@@ -102,7 +102,7 @@ interface ConfigStorage {
    * been completed.
    *
    * @param addr starting address of write.
-   * @param buf buffer that written data was read from.
+   * @param 'void* COUNT(len) buf' buffer that written data was read from.
    * @param len number of bytes written.
    * @param error SUCCESS if the operation was successful, FAIL if
    *   it failed
index 39cd3352bc0dc03a005607055d6a4d28c998efef..e60b2e2145ff970a0968ee804319f6c2063b8409 100644 (file)
@@ -35,7 +35,7 @@ interface Crc {
   /**
    * Compute the CRC-16 value of a byte array.
    *
-   * @param   buf A pointer to the buffer over which to compute CRC.
+   * @param   'void* COUNT(len) buf' A pointer to the buffer over which to compute CRC.
    * @param   len The length of the buffer over which to compute CRC.
    * @return  The CRC-16 value.
    */
@@ -46,7 +46,7 @@ interface Crc {
    * of discontinuous data.
    * 
    * @param startCrc An initial CRC value to begin with
-   * @param buf A pointer to a buffer of data
+   * @param 'void* COUNT(len) buf' A pointer to a buffer of data
    * @param len The length of the buffer
    * @return The CRC-16 value.
    */
index ccd2aaaf773c8e0131c08844b430d92c4cd87e2a..fa11e3306b65ffb2a8a4f9144f6636b52ef8ed27 100644 (file)
@@ -31,6 +31,7 @@ interface CsmaBackoff
   /**
    * Return initial backoff time before attempting to send message m. The
    * units are radio dependent.
+   * @param 'message_t* ONE m'
    * @return Initial backoff time
    */
   async event uint16_t initial(message_t* m);
@@ -38,6 +39,7 @@ interface CsmaBackoff
   /**
    * Return backoff time after message m could not be send due to congestion.
    * The units are raio dependent.
+   * @param 'message_t* ONE m'
    * @return Backoff time after congestion
    */
   async event uint16_t congestion(message_t* m);
index 2736951da57b6d44344c9384129cdc04fd368533..12497502a41936ff8d0329a8acdb9200d3744cd4 100644 (file)
@@ -58,7 +58,7 @@ interface I2CPacket<addr_size> {
    *                   flag cannot be used with the I2C_STOP flag.
    * @param addr The slave device address. Only used if I2C_START is set.
    * @param length Length, in bytes, to be read
-   * @param data A point to a data buffer to read into
+   * @param 'uint8_t* COUNT(length) data' A point to a data buffer to read into
    *
    * @return SUCCESS if bus available and request accepted. 
    */
@@ -74,7 +74,7 @@ interface I2CPacket<addr_size> {
    *                   packet if set.
    * @param addr The slave device address. Only used if I2C_START is set.
    * @param length Length, in bytes, to be read
-   * @param data A point to a data buffer to read into
+   * @param 'uint8_t* COUNT(length) data' A point to a data buffer to read into
    *
    * @return SUCCESS if bus available and request accepted. 
    */
@@ -85,7 +85,7 @@ interface I2CPacket<addr_size> {
    *
    * @param addr The slave device address
    * @param length Length, in bytes, read
-   * @param data Pointer to the received data buffer
+   * @param 'uint8_t* COUNT(length) data' Pointer to the received data buffer
    * @param success SUCCESS if transfer completed without error.
    */
   async event void readDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data);
@@ -95,7 +95,7 @@ interface I2CPacket<addr_size> {
    *
    * @param addr The slave device address
    * @param length Length, in bytes, written
-   * @param data Pointer to the data buffer written
+   * @param 'uint8_t* COUNT(length) data' Pointer to the data buffer written
    * @param success SUCCESS if transfer completed without error.
    */
   async event void writeDone(error_t error, uint16_t addr, uint8_t length, uint8_t* data);
index 0a18a105e94f3d510bcb73553981b1281022fd9e..0de35ba938ef37a327a8dbccca031183100abf25 100644 (file)
@@ -17,9 +17,9 @@ interface Intercept {
    * Signals that a message has been received, which is supposed to be
    * forwarded to another destination. 
    *
-   * @param msg The complete message received.
+   * @param 'message_t* ONE msg' The complete message received.
    *
-   * @param payload The payload portion of the packet for this
+   * @param 'void* COUNT(len) payload' The payload portion of the packet for this
    * protocol layer.
    *
    * @param len The length of the payload buffer.
index 56a1936052a2bf07cda03966101176a2e5b97369..4f689f91ba87ba6e177f80702786a450233d4f1e 100644 (file)
@@ -39,7 +39,7 @@ interface InternalFlash {
    * return them in <code>buf</code>.
    *
    * @param   addr A pointer to the starting address from which to read.
-   * @param   buf  A pointer to the buffer into which read bytes are
+   * @param   'void* COUNT(size) buf'  A pointer to the buffer into which read bytes are
    *               placed.
    * @param   size The number of bytes to read.
    * @return  SUCCESS if the bytes were successfully read.
@@ -52,7 +52,7 @@ interface InternalFlash {
    * flash starting at <code>addr</code>.
    *
    * @param   addr A pointer to the starting address to which to write.
-   * @param   buf  A pointer to the buffer from which bytes are read.
+   * @param   'void* COUNT(size) buf'  A pointer to the buffer from which bytes are read.
    * @param   size The number of bytes to write.
    * @return  SUCCESS if the bytes were successfully written.
    *          FAIL if the call could not be completed.
index 71227796a22b471013d819f5be3c8fcbc1dffdb7..b304785396701cd724bb48f0584c6a79c2e5f520 100644 (file)
@@ -41,7 +41,7 @@ interface LinkPacketMetadata {
    * A good rule of thumb for "high quality" is that the channel quality
    * would enable MTU packets to have a reception rate of 90% or greater.
    *
-   * @param msg A received packet during which the channel was measured.
+   * @param 'message_t* ONE msg' A received packet during which the channel was measured.
    * @return Whether the channel had high quality.
    */
   async command bool highChannelQuality(message_t* msg);
index 4ee818af02e952851b9f8f481cf5ee952495e3cd..3c100521bba6bc8bece373e3766030e064c6e537 100644 (file)
@@ -54,7 +54,7 @@ interface LogRead {
    * volume. On SUCCESS, the <code>readDone</code> event will signal
    * completion of the operation.
    * 
-   * @param buf buffer to place read data.
+   * @param 'void* COUNT(len) buf' buffer to place read data.
    * @param len number of bytes to read.
    * @return 
    *   <li>SUCCESS if the request was accepted, 
@@ -67,7 +67,7 @@ interface LogRead {
    * advanced by <code>len</code> bytes.
    *
    * @param addr starting address of read.
-   * @param buf buffer where read data was placed.
+   * @param 'void* COUNT(len) buf' buffer where read data was placed.
    * @param len number of bytes read - this may be less than requested
    *    (even equal to 0) if the end of the log was reached
    * @param error SUCCESS if read was possible, FAIL otherwise
index ddeb976e6781804dbe43942f35200d58b5636b73..7a15915193a75db63a7b0c9955444316246ddcef 100644 (file)
@@ -44,7 +44,7 @@ interface LogWrite {
    * Append data to a given volume. On SUCCESS, the <code>appendDone</code> 
    * event will signal completion of the operation.
    * 
-   * @param buf buffer to write data from.
+   * @param 'void* COUNT(len) buf' buffer to write data from.
    * @param len number of bytes to write.
    * @return 
    *   <li>SUCCESS if the request was accepted, 
@@ -58,7 +58,7 @@ interface LogWrite {
    * guaranteed to survive a power-cycle unless a commit operation has
    * been completed.
    *
-   * @param buf buffer that written data was read from.
+   * @param 'void* COUNT(len) buf' buffer that written data was read from.
    * @param len number of bytes actually written (valid even in case of error)
    * @param records_lost TRUE if this append destroyed some old records from
    *   the beginning of the log (only possible for circular logs).
index 0326907dfb125a91d96ac0851add46a1726ae85d..b5225c4fe10c9e6333244aafa78aa435d93411d7 100644 (file)
@@ -84,12 +84,13 @@ interface LowPowerListening {
   /**
    * Configure this outgoing message so it can be transmitted to a neighbor mote
    * with the specified Rx sleep interval.
-   * @param msg Pointer to the message that will be sent
+   * @param 'message_t* ONE msg' Pointer to the message that will be sent
    * @param sleepInterval The receiving node's sleep interval, in [ms]
    */
   command void setRxSleepInterval(message_t *msg, uint16_t sleepIntervalMs);
   
   /**
+   * @param 'message_t* ONE msg'
    * @return the destination node's sleep interval configured in this message
    */
   command uint16_t getRxSleepInterval(message_t *msg);
@@ -99,13 +100,14 @@ interface LowPowerListening {
    * with the specified Rx duty cycle rate.
    * Duty cycle is in units of [percentage*100], i.e. 0.25% duty cycle = 25.
    * 
-   * @param msg Pointer to the message that will be sent
+   * @param 'message_t* ONE msg' Pointer to the message that will be sent
    * @param dutyCycle The duty cycle of the receiving mote, in units of 
    *     [percentage*100]
    */
   command void setRxDutyCycle(message_t *msg, uint16_t dutyCycle);
   
   /**
+   * @param 'message_t* ONE msg'
    * @return the destination node's duty cycle configured in this message
    *     in units of [percentage*100]
    */
index 47b0c6268bfa81b43f73b2d55599475fe9b08c75..e3722d1ce4a4d3465d7c920608804c0e12ed922a 100644 (file)
@@ -48,7 +48,7 @@ interface Packet {
     * Clear out this packet.  Note that this is a deep operation and
     * total operation: calling clear() on any layer will completely
     * clear the packet for reuse.
-    * @param  msg    the packet to clear
+    * @param  'message_t* ONE msg'    the packet to clear
     */
 
   command void clear(message_t* msg);
@@ -60,7 +60,7 @@ interface Packet {
     * sized data regions, then payloadLength() will always return
     * the same value as maxPayloadLength(). 
     *
-    * @param  msg    the packet to examine
+    * @param  'message_t* ONE msg'    the packet to examine
     * @return        the length of its current payload
     */
 
@@ -76,7 +76,7 @@ interface Packet {
     * specified in the request and later recover it when actually
     * sending.
     *
-    * @param msg   the packet
+    * @param 'message_t* ONE msg'   the packet
     * @param len   the value to set its length field to
     */
 
@@ -107,9 +107,9 @@ interface Packet {
    * a given <tt>msg</tt> this command will always return the same
    * pointer or NULL.
    *
-   * @param msg   the packet 
+   * @param 'message_t* ONE msg'   the packet 
    * @param len   the length of payload required
-   * @return      a pointer to the packet's data payload for this layer
+   * @return 'void* COUNT_NOK(len)'     a pointer to the packet's data payload for this layer
    *              or NULL if <tt>len</tt> is too big
    */
   command void* getPayload(message_t* msg, uint8_t len);
index 098790905a95a5ad13a4dd7cf4a402f0ed781b0e..1113497f916bdea2273bd73de6e77ad30d80c616 100644 (file)
@@ -39,7 +39,7 @@ interface PacketAcknowledgements {
    * ack was received through the wasAcked() command as soon as a send operation
    * completes.
    *
-   * @param msg - A message which should be acknowledged when transmitted.
+   * @param 'message_t* ONE msg' - A message which should be acknowledged when transmitted.
    * @return SUCCESS if acknowledgements are enabled, EBUSY
    * if the communication layer cannot enable them at this time, FAIL
    * if it does not support them.
@@ -51,7 +51,7 @@ interface PacketAcknowledgements {
    * Tell a protocol that when it sends this packet, it should not use
    * synchronous acknowledgments.
    *
-   * @param msg - A message which should not be acknowledged when transmitted.
+   * @param 'message_t* ONE msg' - A message which should not be acknowledged when transmitted.
    * @return SUCCESS if acknowledgements are disabled, EBUSY
    * if the communication layer cannot disable them at this time, FAIL
    * if it cannot support unacknowledged communication.
@@ -66,7 +66,7 @@ interface PacketAcknowledgements {
    * layer does not support acknowledgements, this command must return always
    * return FALSE.
    *
-   * @param msg - A transmitted message.
+   * @param 'message_t* ONE msg' - A transmitted message.
    * @return Whether the packet was acknowledged.
    *
    */
index 0b8e54ae1e2230c4287e9accfac477df086a748f..dd8285b2c62a9007090ab0cd1d318133f8c04769 100644 (file)
@@ -39,7 +39,7 @@ interface PacketLink {
   /**
    * Set the maximum number of times attempt message delivery
    * Default is 0
-   * @param msg
+   * @param 'message_t* ONE msg'
    * @param maxRetries the maximum number of attempts to deliver
    *     the message
    */
@@ -53,16 +53,19 @@ interface PacketLink {
   command void setRetryDelay(message_t *msg, uint16_t retryDelay);
 
   /** 
+   * @param 'message_t* ONE msg'
    * @return the maximum number of retry attempts for this message
    */
   command uint16_t getRetries(message_t *msg);
 
   /**
+   * @param 'message_t* ONE msg'
    * @return the delay between retry attempts in ms for this message
    */
   command uint16_t getRetryDelay(message_t *msg);
 
   /**
+   * @param 'message_t* ONE msg'
    * @return TRUE if the message was delivered.
    */
   command bool wasDelivered(message_t *msg);
index db45aae199b7735125091b2e7d0a6c4918ba69d6..938e147859a1956543cd80da81671ca9b068a432 100644 (file)
@@ -82,6 +82,7 @@ interface Pool<t> {
   /**
     * Deallocate an object, putting it back into the pool.
     *
+    * @param 't* ONE newVal'
     * @return SUCCESS if the entry was put in successfully, FAIL
     * if the pool is full.
     */
@@ -90,7 +91,7 @@ interface Pool<t> {
   /**
     * Allocate an element from the pool.
     *
-    * @return A pointer if the pool is not empty, NULL if
+    * @return 't* ONE_NOK' A pointer if the pool is not empty, NULL if
     * the pool is empty.
     */
   command t* get();
index 9f621df7d70eb4fa39376a10ac6d7e25a5a95934..3bdcd429110d1b7789c2171effba9854347f870f 100644 (file)
@@ -68,7 +68,7 @@ interface Queue<t> {
    * Get the head of the queue without removing it. If the queue
    * is empty, the return value is undefined.
    *
-   * @return The head of the queue.
+   * @return 't ONE' The head of the queue.
    */
   command t head();
   
@@ -76,14 +76,14 @@ interface Queue<t> {
    * Remove the head of the queue. If the queue is empty, the return
    * value is undefined.
    *
-   * @return The head of the queue.
+   * @return 't ONE' The head of the queue.
    */
   command t dequeue();
 
   /**
    * Enqueue an element to the tail of the queue.
    *
-   * @param newVal - the element to enqueue
+   * @param 't ONE newVal' - the element to enqueue
    * @return SUCCESS if the element was enqueued successfully, FAIL
    *                 if it was not enqueued.
    */
@@ -96,7 +96,7 @@ interface Queue<t> {
    * the return value is undefined.
    *
    * @param index - the index of the element to return
-   * @return the requested element in the queue.
+   * @return 't ONE' the requested element in the queue.
    */
   command t element(uint8_t idx);
 }
index 53b671e9acdf63d0835d1c222887d3a1c491a801..fe3536c4359de5294b639d739a5327888777b7d0 100644 (file)
@@ -35,6 +35,7 @@ interface RadioTimeStamping
   /** 
    * Provides the time at which start of frame delimiter has been
    * transmitted: units are in terms of a 32kHz clock.
+   * @param 'message_t* ONE p_msg'
    */
   async event void transmittedSFD( uint16_t time, message_t* p_msg );
   
index 744b5bc73f68cfbd8ce8f606d24f175502ab7a7f..d383e04687bdd3bd79b2607e6dc23b96075dd752 100644 (file)
@@ -51,7 +51,7 @@ interface ReadRef<val_t> {
   /**
    * Initiates a read of the value.
    * 
-   * @param val a pointer to space that will be filled by the value
+   * @param 'val_t* ONE val' a pointer to space that will be filled by the value
    *
    * @return SUCCESS if a readDone() event will eventually come back.
    */
@@ -62,7 +62,7 @@ interface ReadRef<val_t> {
    * be the same as the original pointer passed to read().
    *
    * @param result SUCCESS if the read() was successful
-   * @param val a pointer to the value that has been read
+   * @param 'val_t* ONE val' a pointer to the value that has been read
    */
   event void readDone( error_t result, val_t* val );
 }
index 0e30da48d4fc209516f720531022af7117fd9330..856f44cbf23a6e0e4430950ace4e04c94403620c 100644 (file)
@@ -60,7 +60,7 @@ interface ReadStream<val_t> {
    * should be placed into the buffer. Make sure your count doesn't
    * overrun the buffer.
    *
-   * @param buf a pointer to the buffer
+   * @param 'val_t* COUNT(count) buf' a pointer to the buffer
    * @param count the number of values the buffer should hold
    *
    * @return SUCCESS if the post was successful
@@ -83,7 +83,7 @@ interface ReadStream<val_t> {
    * SUCCESS, and the buffer will be filled with zeroes.
    *
    * @param result SUCCESS if the buffer was filled without errors
-   * @param buf a pointer to the buffer that has been filled
+   * @param 'val_t* COUNT(count) buf' a pointer to the buffer that has been filled
    * @param count the number of values actually read
    */
   event void bufferDone(error_t result, 
index d6a488cf6ed32c1d2a019f083b23d1ec7ca64f54..eebbac9476ac2d32399d26551f23cea37b5980f9 100644 (file)
@@ -57,10 +57,10 @@ interface Receive {
    * the component's data. This would cause the mote to possibly
    * instead send a packet it most recently received.
    *
-   * @param  msg      the receied packet
-   * @param  payload  a pointer to the packet's payload
+   * @param  'message_t* ONE msg'        the receied packet
+   * @param  'void* COUNT(len) payload'  a pointer to the packet's payload
    * @param  len      the length of the data region pointed to by payload
-   * @return          a packet buffer for the stack to use for the next
+   * @return 'message_t* ONE'              a packet buffer for the stack to use for the next
    *                  received packet.
    */
   
index a211460c298a68550af4b06d5bcab4b4f6e6aaef..3a3834cfab97f5fcf7c113e53cdef30d89433c53 100644 (file)
@@ -53,7 +53,7 @@ interface Send {
     * cannot satisfy; in this case, it will signal sendDone with an
     * appropriate error code.
     *
-    * @param   msg     the packet to send
+    * @param   'message_t* ONE msg'     the packet to send
     * @param   len     the length of the packet payload
     * @return          SUCCESS if the request was accepted and will issue
     *                  a sendDone event, EBUSY if the component cannot accept
@@ -71,7 +71,7 @@ interface Send {
     * handling much of the logic; in this case, a component
     * should be conservative and return an appropriate error code.
     *
-    * @param   msg    the packet whose transmission should be cancelled
+    * @param   'message_t* ONE msg'    the packet whose transmission should be cancelled
     * @return         SUCCESS if the packet was successfully cancelled, FAIL
     *                 otherwise
     */
@@ -82,7 +82,7 @@ interface Send {
     * is the sent buffer, and <tt>error</tt> indicates whether the
     * send was succesful, and if not, the cause of the failure.
     * 
-    * @param msg   the message which was requested to send
+    * @param 'message_t* ONE msg'   the message which was requested to send
     * @param error SUCCESS if it was transmitted successfully, FAIL if
     *              it was not, ECANCEL if it was cancelled via <tt>cancel</tt>
     */ 
@@ -108,8 +108,8 @@ interface Send {
     * behaves identicallt to <tt>Packet.getPayload</tt> and is
     * included in this interface as a convenience.
     *
-    * @param   msg    the packet
-    * @return         a pointer to the packet's payload
+    * @param   'message_t* ONE msg'    the packet
+    * @return  'void* COUNT_NOK(len)'  a pointer to the packet's payload
     */
   command void* getPayload(message_t* msg, uint8_t len);
 
index 06964ac5e36e9cd24e020de203726d687821a84e..c70a84ef79c69dfad9c09bf7e62819254b41017c 100644 (file)
@@ -54,7 +54,7 @@ interface SendNotifier {
    * and the message will be sent.
    * 
    * @param dest The destination address of the messsage
-   * @param msg The message about to be transmitted
+   * @param 'message_t* ONE msg' The message about to be transmitted
    */
   event void aboutToSend(am_addr_t dest, message_t *msg);
   
index 20c29f2a9ded256426cb304256caccd142e2385f..32d2873cd8fd1522f16f2817f8bec67ebe3e063b 100644 (file)
@@ -45,9 +45,9 @@ interface SpiPacket {
   /**
    * Send a message over the SPI bus.
    *
-   * @param txBuf A pointer to the buffer to send over the bus. If this
+   * @param 'uint8_t* COUNT_NOK(len) txBuf' A pointer to the buffer to send over the bus. If this
    *              parameter is NULL, then the SPI will send zeroes.
-   * @param rxBuf A pointer to the buffer where received data should
+   * @param 'uint8_t* COUNT_NOK(len) rxBuf' A pointer to the buffer where received data should
    *              be stored. If this parameter is NULL, then the SPI will
    *              discard incoming bytes.
    * @param len   Length of the message.  Note that non-NULL rxBuf and txBuf
@@ -61,8 +61,8 @@ interface SpiPacket {
   /**
    * Notification that the send command has completed.
    *
-   * @param txBuf The buffer used for transmission
-   * @param rxBuf The buffer used for reception
+   * @param 'uint8_t* COUNT(len) txBuf' The buffer used for transmission
+   * @param 'uint8_t* COUNT(len) rxBuf' The buffer used for reception
    * @param len    The request length of the transfer, but not necessarily
    *               the number of bytes that were actually transferred
    * @param error  SUCCESS if the operation completed successfully, FAIL
index e534c23d96981bd5050d9346d7ce4fd4483fa9dd..1d3ecd8f135dcd4b16c2c2d2e5dad6b6cd6185d3 100644 (file)
@@ -49,7 +49,7 @@ interface UartByte {
    * Receive a single uart byte. The call blocks until a byte is
    * received.
    *
-   * @param byte Where to place received byte.
+   * @param 'uint8_t* ONE byte' Where to place received byte.
    * @param timeout How long in byte times to wait.
    * @return SUCCESS if a byte was received, FAIL if timed out.
    */
index 6f4e320a267a7384e361d1e990e3b8e4e7cc9cb9..08a2567c369f0a8310c637fded666bf8fc8fd95e 100644 (file)
@@ -41,7 +41,7 @@ interface UartStream {
    * <code>sendDone</code> will be signalled when transmission is
    * complete.
    *
-   * @param buf Buffer for bytes to send.
+   * @param 'uint8_t* COUNT(len) buf' Buffer for bytes to send.
    * @param len Number of bytes to send.
    * @return SUCCESS if request was accepted, FAIL otherwise.
    */
@@ -50,7 +50,7 @@ interface UartStream {
   /**
    * Signal completion of sending a stream.
    *
-   * @param buf Bytes sent.
+   * @param 'uint8_t* COUNT(len) buf' Bytes sent.
    * @param len Number of bytes sent.
    * @param error SUCCESS if the transmission was successful, FAIL otherwise.
    */
@@ -83,7 +83,7 @@ interface UartStream {
    * <code>receiveDone</code> will be signalled when reception is
    * complete.
    *
-   * @param buf Buffer for received bytes.
+   * @param 'uint8_t* COUNT(len) buf' Buffer for received bytes.
    * @param len Number of bytes to receive.
    * @return SUCCESS if request was accepted, FAIL otherwise.
    */
@@ -92,7 +92,7 @@ interface UartStream {
   /**
    * Signal completion of receiving a stream.
    *
-   * @param buf Buffer for bytes received.
+   * @param 'uint8_t* COUNT(len) buf' Buffer for bytes received.
    * @param len Number of bytes received.
    * @param error SUCCESS if the reception was successful, FAIL otherwise.
    */