0

I know that in the ned file, the following line can display a circle representing the transmission range of the vehicle.

@display("p=1025,1025;is=s;r=300");

How can I disable/enable this code from the cc file? Or is there another way to do it from the source code?

Fady Samann
  • 115
  • 7

1 Answers1

0

In C++ code of your module use the following commands:

  • to show a range:

    getDisplayString().setTagArg("r", 0, 300);
    
  • to disable showing a range:

    getDisplayString().removeTag("r");
    

References:

  1. OMNeT++ Simulation Manual - Changing Display Strings at Runtime
  2. OMNeT++ Simulation Manual - Appendix G: Display String Tags
Jerzy D.
  • 6,707
  • 2
  • 16
  • 22