[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestNetwork
TestNetworkAppC.nc, 1.1.2.16, 1.1.2.17 TestNetworkC.nc,
1.1.2.19, 1.1.2.20
Rodrigo Fonseca
rfonseca76 at users.sourceforge.net
Fri Oct 27 11:06:58 PDT 2006
Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestNetwork
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31618
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
TestNetworkAppC.nc TestNetworkC.nc
Log Message:
Congestion notification between application and collection
Index: TestNetworkAppC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestNetwork/TestNetworkAppC.nc,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -C2 -d -r1.1.2.16 -r1.1.2.17
*** TestNetworkAppC.nc 27 Oct 2006 01:47:38 -0000 1.1.2.16
--- TestNetworkAppC.nc 27 Oct 2006 18:06:56 -0000 1.1.2.17
***************
*** 44,47 ****
--- 44,48 ----
TestNetworkC.CollectionPacket -> Collector;
TestNetworkC.CtpInfo -> Collector;
+ TestNetworkC.CtpCongestion -> Collector;
TestNetworkC.Random -> RandomC;
TestNetworkC.Pool -> PoolC;
Index: TestNetworkC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestNetwork/TestNetworkC.nc,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -C2 -d -r1.1.2.19 -r1.1.2.20
*** TestNetworkC.nc 27 Oct 2006 01:47:38 -0000 1.1.2.19
--- TestNetworkC.nc 27 Oct 2006 18:06:56 -0000 1.1.2.20
***************
*** 30,33 ****
--- 30,34 ----
uses interface CollectionPacket;
uses interface CtpInfo;
+ uses interface CtpCongestion;
uses interface Random;
uses interface Queue<message_t*>;
***************
*** 138,145 ****
dbg("TestNetworkC", "Received packet at %s from node %hhu.\n", sim_time_string(), call CollectionPacket.getOrigin(msg));
call Leds.led1Toggle();
! if (!call Pool.size() <= (TEST_NETWORK_QUEUE_SIZE < 4)? 1:3 &&
! !call CtpCongestion.isCongested()) {
! call CtpCongestion.setCongested(TRUE);
! call CtpCongestion.triggerImmediateRouteUpdate();
}
if (!call Pool.empty() && call Queue.size() < call Queue.maxSize()) {
--- 139,144 ----
dbg("TestNetworkC", "Received packet at %s from node %hhu.\n", sim_time_string(), call CollectionPacket.getOrigin(msg));
call Leds.led1Toggle();
! if (!call Pool.size() <= (TEST_NETWORK_QUEUE_SIZE < 4)? 1:3) {
! call CtpCongestion.setClientCongested(TRUE);
}
if (!call Pool.empty() && call Queue.size() < call Queue.maxSize()) {
***************
*** 181,188 ****
}
else {
! if (call CtpCongestion.isCongested()) {
! call CtpCongestion.setCongested(FALSE);
! call CtpInfo.triggerRouteUpdate();
! }
}
}
--- 180,184 ----
}
else {
! call CtpCongestion.setClientCongested(FALSE);
}
}
More information about the Tinyos-2-commits
mailing list