[Ns-bugs] [Bug 565] New: contrib/stats data output filename interface

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Sat May 9 07:26:55 PDT 2009


http://www.nsnam.org/bugzilla/show_bug.cgi?id=565

           Summary: contrib/stats data output filename interface
           Product: ns-3
           Version: ns-3-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P5
         Component: general
        AssignedTo: ns-bugs at isi.edu
        ReportedBy: tommaso.pecorella at unifi.it
   Estimated Hours: 0.0


Created an attachment (id=437)
 --> (http://www.nsnam.org/bugzilla/attachment.cgi?id=437)
patch to src/contrib/stats to have consistent file naming functions

Hi,

I'm not totally happy with contrib/stats functions to set the output file name.

OmnetDataOutput class have a void SetFilePrefix(const std::string prefix), and
it allows to set a filename prefix (the real file name is prefix.sca).

SqliteDataOutput class uses a void SetDBFile(const std::string file), allowing
to set a filename regardless of the "extension" (it's not an extension, I
know). The SQLite convention is to end the filename in .db anyway.

If you want to do multiple batch runs with this method, you'll be forced to do
strange things in the main code, like "if the output is OmnetDataOutput, change
the prefix, either add a ".db" at end and change the filename. Horrible.

Thus, I moved the SetFilePrefix method to the DataOutputInterface and changed
slightly both classes to use it.

I did it in a qwick and dirty way tho, so double check it.

Cheers


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Ns-bugs mailing list