title: Omnetpp .ned file default value of parameter
body: <p>I'm trying to get familiar with Omnetpp, so I'm doing the TicToc example. But there I found a point I do not understand: Why does the default value of limit not work? Limit is always set to 5, only if I set it to an other value like I did it in Toc5.</p>
  
  <p>Here my log from Txc5::initialize</p>
  
  <pre><code>Initializing module Tictoc5, stage 0
  Tictoc5.tic: Initializing module Tictoc5.tic, stage 0
  Tictoc5.tic: limit is 10 
  Tictoc5.tic: tic's counter is set to 10
  Tictoc5.tic: Sending initial message
  Tictoc5.toc: Initializing module Tictoc5.toc, stage 0
  Tictoc5.toc: limit is 5 
  Tictoc5.toc: toc's counter is set to 5
  </code></pre>
  
  <p>Here you can see, tic's counter was set to 10, this is ok, but toc's counter is to 5.
  I do not understand why its not set to 20, like I have said in <code>int limit = default(20);</code></p>
  
  <p>I have tictoc5.ned:</p>
  
  <pre><code>simple Txc5
  {
  parameters:
      bool sendMsgOnInit = default(false);
      int limit = default(20);
      @display("i=block/routing");
  gates:
      input in;
      output out;
  }
  
  simple Tic5 extends Txc5
  {
  parameters:
      @display("i=,cyan");
      sendMsgOnInit = true;
      limit = 10;
  }
  
  simple Toc5 extends Txc5 
  {
  parameters:
      @display("i=,gold");
  }
  
  network Tictoc5 
  {
  submodules:
      tic: Tic5;
      toc: Toc5;
  
  connections:
      tic.out --&gt; {  delay = 100ms; } --&gt; toc.in;
      tic.in &lt;-- {  delay = 100ms; } &lt;-- toc.out;
  }
  </code></pre>
  
  <p>and I have txc5.cc</p>
  
  <pre><code>#include &lt;string.h&gt;
  #include &lt;omnetpp.h&gt;
  
  
  class Txc5 : public cSimpleModule
  {
  private:
      int counter;
  
    protected:
      virtual void initialize();
      virtual void handleMessage(cMessage *msg);
  };
  
  Define_Module(Txc5);
  
  void Txc5::initialize()
  {
      counter = par("limit");
      EV &lt;&lt; "limit is " &lt;&lt; (int)par("limit") &lt;&lt; " \n";
      EV &lt;&lt; getName() &lt;&lt; "'s counter is set to " &lt;&lt; counter &lt;&lt; "\n";
      if (par("sendMsgOnInit").boolValue() == true)
      {
          // The `ev' object works like `cout' in C++.
          EV &lt;&lt; "Sending initial message\n";
          cMessage *msg = new cMessage("tictocMsg");
          send(msg, "out");
      }
  }
  
  void Txc5::handleMessage(cMessage *msg)
  {
      counter--;
      if(counter == 0) {
          EV &lt;&lt; getName() &lt;&lt; "'s counter reached zero, deleting message \n";
  
      } else {
          EV &lt;&lt; getName() &lt;&lt; "'s counter is " &lt;&lt; counter &lt;&lt; "\n";
          EV &lt;&lt; "Received message `" &lt;&lt; msg-&gt;getName() &lt;&lt; "', sending it out again\n";
          send(msg, "out");
      }
  }
  </code></pre>