Public Member Functions | Static Public Member Functions

ns3::ConfigStore Class Reference

Store and load simulation attribute configuration. More...

#include <config-store.h>

Inheritance diagram for ns3::ConfigStore:
Inheritance graph
[legend]
Collaboration diagram for ns3::ConfigStore:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual TypeId GetInstanceTypeId (void) const
void Configure (void)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::ConfigStore.

Detailed Description

Store and load simulation attribute configuration.

While it is possible to generate a sample config file and lightly edit it to change a couple of values, there are cases where this process will not work because the same value on the same object can appear multiple times in the same automatically-generated configuration file under different configuration paths.

As such, the best way to use this class is to use it to generate an initial configuration file, extract from that configuration file only the strictly necessary elements, and move these minimal elements to a new configuration file which can then safely be edited. Another option is to use the ns3::GtkConfigStore class which will allow you to edit the parameters and will generate configuration files where all the instances of the same parameter are changed.


Member Function Documentation

void ns3::ConfigStore::Configure ( void   ) 

Depending on which attribute was set:

  • Store simulation configuration in file and exit
  • Load simulation configuration from file and proceed.
virtual TypeId ns3::ConfigStore::GetInstanceTypeId ( void   )  const [virtual]
Returns:
the TypeId associated to the most-derived type of this instance.

This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.

Implements ns3::ObjectBase.

static TypeId ns3::ConfigStore::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::ConfigStore.

Attributes defined for this type:

  • LoadFilename: The file where the configuration should be loaded from.
    • Set with class: StringValue
    • Underlying type: std::string
    • Initial value:
    • Flags: construct write read
  • StoreFilename: The file where the configuration should be stored to.
    • Set with class: StringValue
    • Underlying type: std::string
    • Initial value:
    • Flags: construct write read

No TraceSources defined for this type.

Reimplemented from ns3::ObjectBase.


The documentation for this class was generated from the following files: