HOWTO use the ConfigStore

From Nsnam
Revision as of 17:05, 20 August 2009 by Nicolabaldo (Talk | contribs) (New page: ==File-based ConfigStore== You need your simulation program to be written like this: <pre> int main (...) { CommandLine cmd; cmd.Parse (...); ConfigStore config; config.ConfigureE...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

File-based ConfigStore

You need your simulation program to be written like this:

int main (...)
{
  CommandLine cmd;
  cmd.Parse (...);

  ConfigStore config;
  config.ConfigureEarly ();

  ... topology creation

  config.ConfigureLate ();

  Simulator::Run ();
}

then run your simulation program with the following parameters to save a plain text file (in this example, config.txt):

./waf --run "scratch/myprogram --ns3::ConfigStore::Mode=Save --ns3::ConfigStore::Filename=config.txt"


GtkConfigStore

You need your simulation program to be written like this:

int main (...)
{

  ... topology creation

  GtkConfigStore configstore;  
  configstore.ConfigureAttributes();

  Simulator::Run ();
}

Then before the simulation runs a window will pop up allowing you to browse Object attributes and to save/load the configuration.