Update of /cvsroot/javanetsim/javaNetSim/core
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20741/core
Modified Files:
EthernetLink.java FalseRandom.java
Log Message:
Index: EthernetLink.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/EthernetLink.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** EthernetLink.java 3 Sep 2006 13:49:15 -0000 1.9
--- EthernetLink.java 9 Sep 2006 13:43:58 -0000 1.10
***************
*** 86,94 ****
if (!temp.getSourceName().equals(inSourceName))
{
! /*if( ((sievingCoefficient)/100)>Math.random())
temp.receivePacket(inPacket);
! else throw new LowLinkException("Packet lost due to physical link problems!");
! */
! int cat = FalseRandom.Kotochigov();
System.out.println("Cat runs across the blackboard and generates... " + cat + "!");
--- 86,94 ----
if (!temp.getSourceName().equals(inSourceName))
{
! if( ((sievingCoefficient)/100)>Math.random())
temp.receivePacket(inPacket);
! else throw new LowLinkException("(***) Packet lost due to physical link problems!");
!
! /*int cat = FalseRandom.Kotochigov();
System.out.println("Cat runs across the blackboard and generates... " + cat + "!");
***************
*** 96,100 ****
if(cat==1)
temp.receivePacket(inPacket);
! else throw new LowLinkException("(***) Packet lost due to physical link problems!");
}
}
--- 96,100 ----
if(cat==1)
temp.receivePacket(inPacket);
! else throw new LowLinkException("(***) Packet lost due to physical link problems!");*/
}
}
Index: FalseRandom.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/FalseRandom.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** FalseRandom.java 8 Sep 2006 18:40:30 -0000 1.18
--- FalseRandom.java 9 Sep 2006 13:43:58 -0000 1.19
***************
*** 10,13 ****
--- 10,15 ----
//int sequence[] = {1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+ //int sequence[] = {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+ int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
//int sequence[] = {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
***************
*** 17,25 ****
//int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
! int sequence[] = {1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0};
//int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
//int sequence[] = {1};
if(count >= sequence.length) count = 0;
--- 19,32 ----
//int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
! //int sequence[] = {1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0};
//int sequence[] = {1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+
//int sequence[] = {1};
+
+
+ //int sequence[] = {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
+
if(count >= sequence.length) count = 0;
|