HiddenNodeShowcase.ned 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //
  2. // Copyright (C) 2005 Andras Varga
  3. //
  4. // This program is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU General Public License
  6. // as published by the Free Software Foundation; either version 2
  7. // of the License, or (at your option) any later version.
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License
  15. // along with this program; if not, write to the Free Software
  16. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. //
  18. package inet.showcases.wireless.hiddennode;
  19. import inet.common.figures.DelegateSignalConfigurator;
  20. import inet.environment.common.PhysicalEnvironment;
  21. import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
  22. import inet.node.inet.WirelessHost;
  23. import inet.physicallayer.idealradio.IdealRadioMedium;
  24. import inet.visualizer.integrated.IntegratedCanvasVisualizer;
  25. network HiddenNodeShowcase
  26. {
  27. parameters:
  28. @display("b=297,203;bgb=736.6,557.784");
  29. @figure[rcvdPkText](type=indicatorText; pos=420,20; anchor=w; font=,20; textFormat="packets received: %g"; initialValue=0);
  30. @statistic[rcvdPk](source=hostB.udp.rcvdPk; record=figure(count); targetFigure=rcvdPkText);
  31. submodules:
  32. hostA: WirelessHost {
  33. @display("p=300,272");
  34. }
  35. hostB: WirelessHost {
  36. @display("p=450,100");
  37. }
  38. hostC: WirelessHost {
  39. @display("p=600,272");
  40. }
  41. radioMedium: IdealRadioMedium {
  42. @display("p=100,100");
  43. }
  44. configurator: IPv4NetworkConfigurator {
  45. @display("p=100,200");
  46. }
  47. visualizer: IntegratedCanvasVisualizer {
  48. @display("p=100,300");
  49. }
  50. physicalEnvironment: PhysicalEnvironment {
  51. @display("p=100,400");
  52. }
  53. }