NetworkRouteVisualizationExample.ned 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package inet.examples.visualization.networkroute;
  2. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  3. import inet.node.dymo.DYMORouter;
  4. import inet.node.ethernet.Eth100M;
  5. import inet.node.inet.Router;
  6. import inet.node.inet.StandardHost;
  7. import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
  8. import inet.visualizer.integrated.IntegratedVisualizer;
  9. network StaticNetworkRouteVisualizationExample
  10. {
  11. parameters:
  12. @display("bgb=1000,1000");
  13. @figure[description](type=text; pos=30,30; font=Arial,24; text="Demonstrates how to display static routes in a wired network.\nSource node continuously pings destination node.\nRoute is eventually displayed as a polyline.");
  14. submodules:
  15. visualizer: IntegratedVisualizer {
  16. parameters:
  17. @display("p=900,50");
  18. }
  19. configurator: IPv4NetworkConfigurator {
  20. parameters:
  21. @display("p=900,150");
  22. }
  23. source: StandardHost {
  24. parameters:
  25. @display("p=100,900");
  26. }
  27. destination: StandardHost {
  28. parameters:
  29. @display("p=900,100");
  30. }
  31. node[8]: Router;
  32. connections:
  33. source.ethg++ <--> Eth100M <--> node[0].ethg++;
  34. node[0].ethg++ <--> Eth100M <--> node[1].ethg++;
  35. node[0].ethg++ <--> Eth100M <--> node[2].ethg++;
  36. node[1].ethg++ <--> Eth100M <--> node[3].ethg++;
  37. node[1].ethg++ <--> Eth100M <--> node[4].ethg++;
  38. node[4].ethg++ <--> Eth100M <--> node[5].ethg++;
  39. node[4].ethg++ <--> Eth100M <--> node[6].ethg++;
  40. node[5].ethg++ <--> Eth100M <--> node[7].ethg++;
  41. node[5].ethg++ <--> Eth100M <--> destination.ethg++;
  42. }
  43. network DynamicNetworkRouteVisualizationExample
  44. {
  45. parameters:
  46. @display("bgb=1000,1000");
  47. @figure[description](type=text; pos=30,30; font=Arial,24; text="Demonstrates how to display dynamically changing routes in a wireless network.\nSource node continuously pings destination node.\nRoute is eventually displayed as a polyline, and it changes as nodes move around.");
  48. submodules:
  49. visualizer: IntegratedVisualizer {
  50. parameters:
  51. @display("p=900,50");
  52. }
  53. configurator: IPv4NetworkConfigurator {
  54. parameters:
  55. @display("p=900,150");
  56. }
  57. radioMedium: Ieee80211ScalarRadioMedium {
  58. parameters:
  59. @display("p=900,250");
  60. }
  61. source: DYMORouter {
  62. parameters:
  63. @display("p=100,900");
  64. }
  65. destination: DYMORouter {
  66. parameters:
  67. @display("p=900,100");
  68. }
  69. node[20]: DYMORouter {
  70. parameters:
  71. @display("r=,,#707070");
  72. }
  73. }