[Tinyos-2-commits] [tinyos-main] r5716 committed - rfxlink: now we check the group id in isForMe

tinyos-main at googlecode.com tinyos-main at googlecode.com
Fri Sep 2 01:36:02 PDT 2011


Revision: 5716
Author:   mmaroti
Date:     Fri Sep  2 01:35:45 2011
Log:      rfxlink: now we check the group id in isForMe
http://code.google.com/p/tinyos-main/source/detail?r=5716

Modified:
  /trunk/tos/lib/rfxlink/layers/Ieee154PacketLayer.nc
  /trunk/tos/lib/rfxlink/layers/Ieee154PacketLayerP.nc

=======================================
--- /trunk/tos/lib/rfxlink/layers/Ieee154PacketLayer.nc	Tue Nov 16 15:15:37  
2010
+++ /trunk/tos/lib/rfxlink/layers/Ieee154PacketLayer.nc	Fri Sep  2 01:35:45  
2011
@@ -179,7 +179,8 @@

  	/**
  	 * Returns TRUE if the destionation of this message is either 0xFFFF
-	 * or is the local address of the node.
+	 * or is the local address of the node, and the pan address is the
+	 * local one.
  	 */
  	async command bool isForMe(message_t* msg);
  }
=======================================
--- /trunk/tos/lib/rfxlink/layers/Ieee154PacketLayerP.nc	Sun Jun 19  
12:48:09 2011
+++ /trunk/tos/lib/rfxlink/layers/Ieee154PacketLayerP.nc	Fri Sep  2  
01:35:45 2011
@@ -78,11 +78,6 @@
  	{
  		return ((void*)msg) + call SubPacket.headerLength(msg);
  	}
-
-	void* getPayload(message_t* msg)
-	{
-		return ((void*)msg) + call RadioPacket.headerLength(msg);
-	}

  	async command uint16_t Ieee154PacketLayer.getFCF(message_t* msg)
  	{
@@ -227,7 +222,8 @@
  	async command bool Ieee154PacketLayer.isForMe(message_t* msg)
  	{
  		ieee154_saddr_t addr = call Ieee154PacketLayer.getDestAddr(msg);
-		return addr == call Ieee154PacketLayer.localAddr() || addr ==  
IEEE154_BROADCAST_ADDR;
+		return (addr == call Ieee154PacketLayer.localAddr() || addr ==  
IEEE154_BROADCAST_ADDR)
+			&& call Ieee154PacketLayer.getDestPan(msg) == call  
Ieee154PacketLayer.localPan();
  	}

  	async event void ActiveMessageAddress.changed()


More information about the Tinyos-2-commits mailing list