[Tinyos-2-commits]
CVS: tinyos-2.x/apps/BaseStation BaseStationC.nc, 1.4,
1.5 BaseStationP.nc, 1.4, 1.5
Phil Levis
scipio at users.sourceforge.net
Wed Feb 7 17:00:28 PST 2007
Update of /cvsroot/tinyos/tinyos-2.x/apps/BaseStation
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30461
Modified Files:
BaseStationC.nc BaseStationP.nc
Log Message:
Correctly snoop packets.
Index: BaseStationC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/BaseStation/BaseStationC.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** BaseStationC.nc 12 Dec 2006 18:22:48 -0000 1.4
--- BaseStationC.nc 8 Feb 2007 01:00:25 -0000 1.5
***************
*** 83,86 ****
--- 83,87 ----
BaseStationP.RadioSend -> Radio;
BaseStationP.RadioReceive -> Radio.Receive;
+ BaseStationP.RadioSnoop -> Radio.Snoop;
BaseStationP.RadioPacket -> Radio;
BaseStationP.RadioAMPacket -> Radio;
Index: BaseStationP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/BaseStation/BaseStationP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** BaseStationP.nc 12 Dec 2006 18:22:48 -0000 1.4
--- BaseStationP.nc 8 Feb 2007 01:00:26 -0000 1.5
***************
*** 60,63 ****
--- 60,64 ----
interface AMSend as RadioSend[am_id_t id];
interface Receive as RadioReceive[am_id_t id];
+ interface Receive as RadioSnoop[am_id_t id];
interface Packet as RadioPacket;
interface AMPacket as RadioAMPacket;
***************
*** 130,136 ****
--- 131,150 ----
uint8_t count = 0;
+
+ message_t* receive(message_t* msg, void* payload, uint8_t len);
+
+ event message_t *RadioSnoop.receive[am_id_t id](message_t *msg,
+ void *payload,
+ uint8_t len) {
+ return receive(msg, payload, len);
+ }
+
event message_t *RadioReceive.receive[am_id_t id](message_t *msg,
void *payload,
uint8_t len) {
+ return receive(msg, payload, len);
+ }
+
+ message_t* receive(message_t *msg, void *payload, uint8_t len) {
message_t *ret = msg;
More information about the Tinyos-2-commits
mailing list