internetCloud_4.test 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. %description:
  2. Testing InternetCloud datarate
  3. %#--------------------------------------------------------------------------------------------------------------
  4. %file: test.ned
  5. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  6. import inet.node.inet.StandardHost;
  7. import inet.node.internetcloud.InternetCloud;
  8. import ned.DatarateChannel;
  9. network CloudAndHosts
  10. {
  11. parameters:
  12. int numSenders;
  13. types:
  14. channel C extends DatarateChannel
  15. {
  16. delay = 10ms;
  17. datarate = 5Mbps;
  18. }
  19. submodules:
  20. configurator: IPv4NetworkConfigurator {
  21. parameters:
  22. @display("p=61,163");
  23. }
  24. sender[numSenders]: StandardHost;
  25. recip: StandardHost;
  26. internet: InternetCloud;
  27. connections:
  28. recip.pppg++ <--> C <--> internet.pppg++;
  29. for i=0..numSenders-1 {
  30. sender[i].pppg++ <--> C <--> internet.pppg++;
  31. }
  32. }
  33. %#--------------------------------------------------------------------------------------------------------------
  34. %inifile: omnetpp.ini
  35. [General]
  36. network = CloudAndHosts
  37. tkenv-plugin-path = ../../../etc/plugins
  38. ned-path = .;../../../../src;../../lib
  39. #omnetpp 5.0 - 5.1 compatibility:
  40. eventlog-file = "${resultdir}/${configname}-${runnumber}.elog"
  41. output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
  42. output-vector-file = "${resultdir}/${configname}-${runnumber}.vec"
  43. snapshot-file = "${resultdir}/${configname}-${runnumber}.sna"
  44. *.sender[*].numPingApps = 1
  45. *.sender[*].pingApp[0].destAddr = "recip"
  46. *.sender[*].pingApp[0].startTime = 10s
  47. *.sender[*].pingApp[0].stopTime = 10.5s
  48. *.sender[*].pingApp[0].sendInterval = 1s
  49. *.sender[*].pingApp[0].printPing = true
  50. **.internet.networkLayer.delayer.typename = "MatrixCloudDelayer"
  51. **.internet.networkLayer.delayer.config = xmldoc("internetCloud.xml")
  52. **.numSenders = 10
  53. %#--------------------------------------------------------------------------------------------------------------
  54. %file: internetCloud.xml
  55. <internetCloud symmetric="true">
  56. <parameters name="good">
  57. <traffic src="sender[0]" dest="recip" delay="100ms" datarate="1000bps" drop="false" />
  58. <traffic src="sender[1]" dest="recip" delay="100ms" datarate="1200bps" drop="false" />
  59. <traffic src="sender[2]" dest="recip" delay="100ms" datarate="1400bps" drop="false" />
  60. <traffic src="sender[3]" dest="recip" delay="100ms" datarate="1600bps" drop="false" />
  61. <traffic src="sender[4]" dest="recip" delay="100ms" datarate="1800bps" drop="false" />
  62. <traffic src="sender[5]" dest="recip" delay="100ms" datarate="2000bps" drop="false" />
  63. <traffic src="sender[6]" dest="recip" delay="100ms" datarate="2200bps" drop="false" />
  64. <traffic src="sender[7]" dest="recip" delay="100ms" datarate="2400bps" drop="false" />
  65. <traffic src="sender[8]" dest="recip" delay="100ms" datarate="2600bps" drop="false" />
  66. <traffic src="sender[9]" dest="recip" delay="100ms" datarate="2800bps" drop="false" />
  67. <!--
  68. <traffic src="**" dest="**" delay="10ms+truncnormal(100ms,20ms)" datarate="uniform(100kbps,500kbps)" drop="uniform(0.01, 0.05)" />
  69. -->
  70. </parameters>
  71. </internetCloud>
  72. %#--------------------------------------------------------------------------------------------------------------
  73. %#--------------------------------------------------------------------------------------------------------------
  74. %contains-regex: stdout
  75. [^C].*
  76. CloudAndHosts\.sender\[9\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  77. CloudAndHosts\.sender\[8\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  78. CloudAndHosts\.sender\[7\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  79. CloudAndHosts\.sender\[6\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  80. CloudAndHosts\.sender\[5\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  81. CloudAndHosts\.sender\[4\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  82. CloudAndHosts\.sender\[3\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  83. CloudAndHosts\.sender\[2\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  84. CloudAndHosts\.sender\[1\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  85. CloudAndHosts\.sender\[0\]\.pingApp\[0\]: reply of 60 bytes from 10\.0\.0.\d+ icmp_seq=0 ttl=\d+ time=.*
  86. [^C].*
  87. %#--------------------------------------------------------------------------------------------------------------
  88. %not-contains: stdout
  89. undisposed object:
  90. %not-contains: stdout
  91. -- check module destructor
  92. %#--------------------------------------------------------------------------------------------------------------