Re: ns3-click packet processing delay
Lalith Suresh <[email protected]> Mon, 12 Nov 2012 14:58:12 +0100
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAOj7qWY6owNq6Z_de+pz0Cy+3kPBys2BjG3gQtGQ0sqABd8mWg@mail.gmail.com> |
Hi again, On Fri, Nov 9, 2012 at 1:41 PM, <[email protected]> wrote: >> ns-3 has no notion of processing delay as of now. > > Thanks Lalith for the information. > My problem is that an element with the following code (for testing purposes) influences my simulation results. If I comment the lines for scheduling, the simulation results are ok. > How can the following code influence the simulation result? The only thing the code does is configuring the scheduler for the next event. But the code does not produce packets for the simulation. > Could someone explanin me how a code that only schedules itself can influence the simulation? > > > int Foo::initialize( ErrorHandler * ) > { > _timer.initialize( this ); > uint32_t start = ( random() % _period ); > _timer.schedule_after_msec( start ); > return 0; > } > > void Foo::run_timer(Timer *) > { > int period = ( int ) ( _period * .95 + ( random() % ( _period / 10 ) ) ); > _timer.reschedule_after_msec( period ); > } The above snippet of code can end up changing the sequence of events that arrive at ns-3's scheduler. What I meant when I said that ns-3 does not model processing delay, is that every packet is processed by an ns-3 node in 0.0 nanoseconds in simulation time. > _______________________________________________ > click mailing list > [email protected] > https://amsterdam.lcs.mit.edu/mailman/listinfo/click -- Lalith Suresh www.lalith.in