Bug 270

Summary: Simulator::RunOneEvent
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: coreAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: pre-release   
Hardware: All   
OS: All   
Attachments: patch
new patch

Description Gustavo J. A. M. Carneiro 2008-08-05 10:50:24 UTC
Please make Simulator::ProcessOneEvent available as public API.
Comment 1 Gustavo J. A. M. Carneiro 2008-08-05 10:50:54 UTC
Created attachment 219 [details]
patch
Comment 2 Mathieu Lacage 2008-08-05 11:20:33 UTC
Please, rename the public API to RunOne to outline the relationship with Simulator::Run better.
Comment 3 Gustavo J. A. M. Carneiro 2008-08-05 12:00:52 UTC
(In reply to comment #2)
> Please, rename the public API to RunOne to outline the relationship with
> Simulator::Run better.
> 

OK.

After filing this bug I discovered a potential solution that may allow me to do my viz thing without this API, so I put this on hold until it is sorted out.
Comment 4 Craig Dowell 2008-08-05 12:46:27 UTC
(In reply to comment #2)
> Please, rename the public API to RunOne to outline the relationship with
> Simulator::Run better.

I still think RunOne is a poor name.  RunOne?  RunOne what?  ProcessOneEvent was fine.  How about RunOneEvent or RunFirstEvent?

Please don't take the private member method ProcessOneEvent and just make it public and callable by anyone.  The multithreaded and real time schedulers re-implement ProcessOneEvent treating it as a private method.  This is not going to work.  If you are going to add a new bit of public API, please do that and define a new method.

Comment 5 Mathieu Lacage 2008-08-05 12:50:45 UTC
(In reply to comment #4)

> I still think RunOne is a poor name.  RunOne?  RunOne what?  ProcessOneEvent
> was fine.  How about RunOneEvent or RunFirstEvent?

RunOneEvent would be fine with me.

> 
> Please don't take the private member method ProcessOneEvent and just make it
> public and callable by anyone.  The multithreaded and real time schedulers
> re-implement ProcessOneEvent treating it as a private method.  This is not
> going to work.  If you are going to add a new bit of public API, please do that
> and define a new method.

agreed.

Comment 6 Gustavo J. A. M. Carneiro 2008-08-06 05:59:56 UTC
I think I am going to need this after all.
Comment 7 Gustavo J. A. M. Carneiro 2008-08-06 06:02:53 UTC
Created attachment 220 [details]
new patch

I think this is what is wanted.  OK to commit?
Comment 8 Mathieu Lacage 2008-08-06 11:06:34 UTC
ok for me.
Comment 9 Gustavo J. A. M. Carneiro 2008-08-06 12:42:20 UTC
changeset:   3515:88e9cee20461