[Tinyos-2-commits] CVS: tinyos-2.x/tos/interfaces AMPacket.nc,
1.1.2.9, 1.1.2.10
Phil Levis
scipio at users.sourceforge.net
Thu Aug 3 17:34:20 PDT 2006
Update of /cvsroot/tinyos/tinyos-2.x/tos/interfaces
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22519/tos/interfaces
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
AMPacket.nc
Log Message:
Include source addresses in AM.
Index: AMPacket.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/interfaces/AMPacket.nc,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -C2 -d -r1.1.2.9 -r1.1.2.10
*** AMPacket.nc 29 Jan 2006 18:07:19 -0000 1.1.2.9
--- AMPacket.nc 4 Aug 2006 00:34:18 -0000 1.1.2.10
***************
*** 31,35 ****
/**
* The Active Message accessors, which provide the AM local address and
! * functionality for querying packets. Also see the Packet interface.
*
* @author Philip Levis
--- 31,39 ----
/**
* The Active Message accessors, which provide the AM local address and
! * functionality for querying packets. Active Messages are a single-hop
! * communication protocol. Therefore, fields such as source and destination
! * represent the single-hop source and destination. Multihop sources and
! * destinations are defined by the corresponding multihop protocol (if any).
! * Also see the Packet interface.
*
* @author Philip Levis
***************
*** 54,58 ****
/**
! * Return the AM address of the destination field of an AM packet.
* If <tt>amsg</tt> is not an AM packet, the results of this command
* are undefined.
--- 58,62 ----
/**
! * 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.
***************
*** 64,67 ****
--- 68,81 ----
/**
+ * 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
+ * @return the source address of the packet.
+ */
+
+ command am_addr_t source(message_t* amsg);
+
+ /**
* Set the AM address of the destination field of the AM packet. As
* the AM address is set as part of sending with the AMSend
***************
*** 79,82 ****
--- 93,114 ----
/**
+ * Set the AM address of the source field of the AM packet. As
+ * the AM address is set as part of sending with the AMSend
+ * interface, this command is not used for sending packets. Rather,
+ * it is used when a component, such as a queue, needs to buffer a
+ * request to send. The component can save the source address
+ * and then recover it when actually sending. As an AM layer generally
+ * sets the source address to be the local address, this interface
+ * is not commonly used except when a system is bypassing the AM
+ * 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 addr the address
+ */
+
+ command void setSource(message_t* amsg, am_addr_t addr);
+
+ /**
* Return whether <tt>amsg</tt> is destined for this mote. This is
* partially a shortcut for testing whether the return value of
More information about the Tinyos-2-commits
mailing list