From e8d63150327a33f43f2047984615177fef85331e Mon Sep 17 00:00:00 2001 From: regehr Date: Wed, 4 Jun 2008 03:00:25 +0000 Subject: [PATCH] safe tinyos annotations (all in nesdoc comments) --- tos/interfaces/AMPacket.nc | 18 +++++++++--------- tos/interfaces/AMSend.nc | 10 +++++----- tos/interfaces/BlockRead.nc | 4 ++-- tos/interfaces/BlockWrite.nc | 4 ++-- tos/interfaces/ConfigStorage.nc | 8 ++++---- tos/interfaces/Crc.nc | 4 ++-- tos/interfaces/CsmaBackoff.nc | 2 ++ tos/interfaces/I2CPacket.nc | 8 ++++---- tos/interfaces/Intercept.nc | 4 ++-- tos/interfaces/InternalFlash.nc | 4 ++-- tos/interfaces/LinkPacketMetadata.nc | 2 +- tos/interfaces/LogRead.nc | 4 ++-- tos/interfaces/LogWrite.nc | 4 ++-- tos/interfaces/LowPowerListening.nc | 6 ++++-- tos/interfaces/Packet.nc | 10 +++++----- tos/interfaces/PacketAcknowledgements.nc | 6 +++--- tos/interfaces/PacketLink.nc | 5 ++++- tos/interfaces/Pool.nc | 3 ++- tos/interfaces/Queue.nc | 8 ++++---- tos/interfaces/RadioTimeStamping.nc | 1 + tos/interfaces/ReadRef.nc | 4 ++-- tos/interfaces/ReadStream.nc | 4 ++-- tos/interfaces/Receive.nc | 6 +++--- tos/interfaces/Send.nc | 10 +++++----- tos/interfaces/SendNotifier.nc | 2 +- tos/interfaces/SpiPacket.nc | 8 ++++---- tos/interfaces/UartByte.nc | 2 +- tos/interfaces/UartStream.nc | 8 ++++---- 28 files changed, 84 insertions(+), 75 deletions(-) diff --git a/tos/interfaces/AMPacket.nc b/tos/interfaces/AMPacket.nc index f403c21d..72fc2fb9 100644 --- a/tos/interfaces/AMPacket.nc +++ b/tos/interfaces/AMPacket.nc @@ -60,7 +60,7 @@ interface AMPacket { * Return the AM address of the destination of the AM packet. * If amsg 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 amsg 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 amsg 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 amsg 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 amsg 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 amsg 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 amsg 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); diff --git a/tos/interfaces/AMSend.nc b/tos/interfaces/AMSend.nc index 27c93d22..b2d07dfb 100644 --- a/tos/interfaces/AMSend.nc +++ b/tos/interfaces/AMSend.nc @@ -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 error 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); diff --git a/tos/interfaces/BlockRead.nc b/tos/interfaces/BlockRead.nc index 156fe544..4f72c998 100644 --- a/tos/interfaces/BlockRead.nc +++ b/tos/interfaces/BlockRead.nc @@ -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 *
  • 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 diff --git a/tos/interfaces/BlockWrite.nc b/tos/interfaces/BlockWrite.nc index a61e91a1..5ecd3d11 100644 --- a/tos/interfaces/BlockWrite.nc +++ b/tos/interfaces/BlockWrite.nc @@ -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 *
  • 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 diff --git a/tos/interfaces/ConfigStorage.nc b/tos/interfaces/ConfigStorage.nc index f73d01c1..a48cc7c0 100644 --- a/tos/interfaces/ConfigStorage.nc +++ b/tos/interfaces/ConfigStorage.nc @@ -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 *
  • 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 *
  • 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 diff --git a/tos/interfaces/Crc.nc b/tos/interfaces/Crc.nc index 39cd3352..e60b2e21 100644 --- a/tos/interfaces/Crc.nc +++ b/tos/interfaces/Crc.nc @@ -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. */ diff --git a/tos/interfaces/CsmaBackoff.nc b/tos/interfaces/CsmaBackoff.nc index ccd2aaaf..fa11e330 100644 --- a/tos/interfaces/CsmaBackoff.nc +++ b/tos/interfaces/CsmaBackoff.nc @@ -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); diff --git a/tos/interfaces/I2CPacket.nc b/tos/interfaces/I2CPacket.nc index 2736951d..12497502 100644 --- a/tos/interfaces/I2CPacket.nc +++ b/tos/interfaces/I2CPacket.nc @@ -58,7 +58,7 @@ interface I2CPacket { * 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 { * 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 { * * @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 { * * @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); diff --git a/tos/interfaces/Intercept.nc b/tos/interfaces/Intercept.nc index 0a18a105..0de35ba9 100644 --- a/tos/interfaces/Intercept.nc +++ b/tos/interfaces/Intercept.nc @@ -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. diff --git a/tos/interfaces/InternalFlash.nc b/tos/interfaces/InternalFlash.nc index 56a19360..4f689f91 100644 --- a/tos/interfaces/InternalFlash.nc +++ b/tos/interfaces/InternalFlash.nc @@ -39,7 +39,7 @@ interface InternalFlash { * return them in buf. * * @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 addr. * * @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. diff --git a/tos/interfaces/LinkPacketMetadata.nc b/tos/interfaces/LinkPacketMetadata.nc index 71227796..b3047853 100644 --- a/tos/interfaces/LinkPacketMetadata.nc +++ b/tos/interfaces/LinkPacketMetadata.nc @@ -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); diff --git a/tos/interfaces/LogRead.nc b/tos/interfaces/LogRead.nc index 4ee818af..3c100521 100644 --- a/tos/interfaces/LogRead.nc +++ b/tos/interfaces/LogRead.nc @@ -54,7 +54,7 @@ interface LogRead { * volume. On SUCCESS, the readDone 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 *
  • SUCCESS if the request was accepted, @@ -67,7 +67,7 @@ interface LogRead { * advanced by len 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 diff --git a/tos/interfaces/LogWrite.nc b/tos/interfaces/LogWrite.nc index ddeb976e..7a159151 100644 --- a/tos/interfaces/LogWrite.nc +++ b/tos/interfaces/LogWrite.nc @@ -44,7 +44,7 @@ interface LogWrite { * Append data to a given volume. On SUCCESS, the appendDone * 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 *
  • 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). diff --git a/tos/interfaces/LowPowerListening.nc b/tos/interfaces/LowPowerListening.nc index 0326907d..b5225c4f 100644 --- a/tos/interfaces/LowPowerListening.nc +++ b/tos/interfaces/LowPowerListening.nc @@ -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] */ diff --git a/tos/interfaces/Packet.nc b/tos/interfaces/Packet.nc index 47b0c626..e3722d1c 100644 --- a/tos/interfaces/Packet.nc +++ b/tos/interfaces/Packet.nc @@ -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 msg 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 len is too big */ command void* getPayload(message_t* msg, uint8_t len); diff --git a/tos/interfaces/PacketAcknowledgements.nc b/tos/interfaces/PacketAcknowledgements.nc index 09879090..1113497f 100644 --- a/tos/interfaces/PacketAcknowledgements.nc +++ b/tos/interfaces/PacketAcknowledgements.nc @@ -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. * */ diff --git a/tos/interfaces/PacketLink.nc b/tos/interfaces/PacketLink.nc index 0b8e54ae..dd8285b2 100644 --- a/tos/interfaces/PacketLink.nc +++ b/tos/interfaces/PacketLink.nc @@ -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); diff --git a/tos/interfaces/Pool.nc b/tos/interfaces/Pool.nc index db45aae1..938e1478 100644 --- a/tos/interfaces/Pool.nc +++ b/tos/interfaces/Pool.nc @@ -82,6 +82,7 @@ interface Pool { /** * 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 { /** * 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(); diff --git a/tos/interfaces/Queue.nc b/tos/interfaces/Queue.nc index 9f621df7..3bdcd429 100644 --- a/tos/interfaces/Queue.nc +++ b/tos/interfaces/Queue.nc @@ -68,7 +68,7 @@ interface Queue { * 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 { * 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 { * 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); } diff --git a/tos/interfaces/RadioTimeStamping.nc b/tos/interfaces/RadioTimeStamping.nc index 53b671e9..fe3536c4 100644 --- a/tos/interfaces/RadioTimeStamping.nc +++ b/tos/interfaces/RadioTimeStamping.nc @@ -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 ); diff --git a/tos/interfaces/ReadRef.nc b/tos/interfaces/ReadRef.nc index 744b5bc7..d383e046 100644 --- a/tos/interfaces/ReadRef.nc +++ b/tos/interfaces/ReadRef.nc @@ -51,7 +51,7 @@ interface ReadRef { /** * 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 { * 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 ); } diff --git a/tos/interfaces/ReadStream.nc b/tos/interfaces/ReadStream.nc index 0e30da48..856f44cb 100644 --- a/tos/interfaces/ReadStream.nc +++ b/tos/interfaces/ReadStream.nc @@ -60,7 +60,7 @@ interface ReadStream { * 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 { * 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, diff --git a/tos/interfaces/Receive.nc b/tos/interfaces/Receive.nc index d6a488cf..eebbac94 100644 --- a/tos/interfaces/Receive.nc +++ b/tos/interfaces/Receive.nc @@ -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. */ diff --git a/tos/interfaces/Send.nc b/tos/interfaces/Send.nc index a211460c..3a3834cf 100644 --- a/tos/interfaces/Send.nc +++ b/tos/interfaces/Send.nc @@ -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 error 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 cancel */ @@ -108,8 +108,8 @@ interface Send { * behaves identicallt to Packet.getPayload 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); diff --git a/tos/interfaces/SendNotifier.nc b/tos/interfaces/SendNotifier.nc index 06964ac5..c70a84ef 100644 --- a/tos/interfaces/SendNotifier.nc +++ b/tos/interfaces/SendNotifier.nc @@ -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); diff --git a/tos/interfaces/SpiPacket.nc b/tos/interfaces/SpiPacket.nc index 20c29f2a..32d2873c 100644 --- a/tos/interfaces/SpiPacket.nc +++ b/tos/interfaces/SpiPacket.nc @@ -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 diff --git a/tos/interfaces/UartByte.nc b/tos/interfaces/UartByte.nc index e534c23d..1d3ecd8f 100644 --- a/tos/interfaces/UartByte.nc +++ b/tos/interfaces/UartByte.nc @@ -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. */ diff --git a/tos/interfaces/UartStream.nc b/tos/interfaces/UartStream.nc index 6f4e320a..08a2567c 100644 --- a/tos/interfaces/UartStream.nc +++ b/tos/interfaces/UartStream.nc @@ -41,7 +41,7 @@ interface UartStream { * sendDone 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 { * receiveDone 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. */ -- 2.39.2