[Tinyos-2-commits] CVS: tinyos-2.x/tos/interfaces AMPacket.nc, 1.4,
1.5
Phil Levis
scipio at users.sourceforge.net
Wed Jun 20 16:49:04 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/tos/interfaces
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21302/interfaces
Modified Files:
AMPacket.nc
Log Message:
Added AM group.
Index: AMPacket.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/interfaces/AMPacket.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AMPacket.nc 12 Dec 2006 18:23:14 -0000 1.4
--- AMPacket.nc 20 Jun 2007 23:49:02 -0000 1.5
***************
*** 151,153 ****
--- 151,185 ----
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 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 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();
}
More information about the Tinyos-2-commits
mailing list