X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Finterfaces%2FAMPacket.nc;h=af0d5fa12e83ceea3f1da601ee0e271cabbf8576;hb=857a829a9dd7830efbf85b39aae30698c1059adb;hp=05140a768eeecc3b5b1d18605e6058c3c9b8a432;hpb=1a329382c4f4556fd52d85f4e3f4a67e54911682;p=tinyos-2.x.git diff --git a/tos/interfaces/AMPacket.nc b/tos/interfaces/AMPacket.nc index 05140a76..af0d5fa1 100644 --- a/tos/interfaces/AMPacket.nc +++ b/tos/interfaces/AMPacket.nc @@ -1,5 +1,5 @@ // $Id$ -/* tab:4 +/* * "Copyright (c) 2004-5 The Regents of the University of California. * All rights reserved. * @@ -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,10 +144,42 @@ 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 */ command void setType(message_t* amsg, am_id_t t); + /** + * Get the AM group of the AM packet. The AM group is a logical + * identifier that distinguishes sets of nodes which may share + * a physical communication medium but wish to not communicate. + * The AM group logically separates the sets of nodes. When + * a node sends a packet, it fills in its AM group, and typically + * nodes only receive packets whose AM group field matches their + * own. + * + * @param 'message_t* ONE amsg' the packet + * @return the AM group of this packet + */ + + command am_group_t group(message_t* amsg); + + /** + * Set the AM group field of a packet. Note that most data link + * stacks will set this field automatically on a send request, which + * may overwrite changes made with this command. + * + * @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); + + /** + * Provides the current AM group of this communication interface. + * + * @return The AM group. + */ + + command am_group_t localGroup(); }