A Discrete-Event Network Simulator
API
Configuration Store/Load

Store and load simulation attribute configuration. More...

Classes

class  ns3::AttributeDefaultIterator
 Iterator to iterate on the default values of attributes of an ns3::Object. More...
 
class  ns3::AttributeIterator
 Iterator to iterate on the values of attributes of an ns3::Object. More...
 
class  ns3::ConfigStore
 Introspection did not find any typical Config paths. More...
 
class  ns3::FileConfig
 base class for ConfigStore classes using files More...
 
class  ns3::GtkConfigStore
 A class that provides a GTK-based front end to ns3::ConfigStore. More...
 
class  ns3::ModelCreator
 ModelCreator class. More...
 
struct  ns3::ModelNode
 A class used in the implementation of the GtkConfigStore. More...
 
struct  ns3::ModelTypeid
 A class used in the implementation of the GtkConfigStore. More...
 
class  ns3::ModelTypeidCreator
 ModelTypeIdCreator class. More...
 
class  ns3::NoneFileConfig
 A dummy class (does nothing) More...
 
class  ns3::RawTextConfigLoad
 A class to enable loading of configuration store from a raw text file. More...
 
class  ns3::RawTextConfigSave
 A class to enable saving of configuration store in a raw text file. More...
 
class  ns3::XmlConfigLoad
 A class to enable loading of configuration store from an XML file. More...
 
class  ns3::XmlConfigSave
 A class to enable saving of configuration store in an XML file. More...
 

Enumerations

enum  {
  ns3::ModelNode::NODE_ATTRIBUTE, ns3::ModelNode::NODE_POINTER, ns3::ModelNode::NODE_VECTOR, ns3::ModelNode::NODE_VECTOR_ITEM,
  ns3::ModelNode::NODE_OBJECT
}
 
enum  { ns3::ModelTypeid::NODE_ATTRIBUTE, ns3::ModelTypeid::NODE_TYPEID }
 
enum  ns3::ConfigStore::FileFormat { ns3::ConfigStore::XML, ns3::ConfigStore::RAW_TEXT }
 store format More...
 
enum  ns3::ConfigStore::Mode { ns3::ConfigStore::LOAD, ns3::ConfigStore::SAVE, ns3::ConfigStore::NONE }
 for ConfigStore operation More...
 
std::ostream & ns3::operator<< (std::ostream &os, ConfigStore::Mode &mode)
 
std::ostream & ns3::operator<< (std::ostream &os, ConfigStore::FileFormat &format)
 

Detailed Description

Store and load simulation attribute configuration.

ns-3 Objects and their attribute values (default, and per-instance values) are stored in a specialized internal database. The config-store module permits these values to be imported and exported to formats of different types (e.g. XML files, raw text files, or a GTK-based UI).

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.

Enumeration Type Documentation

anonymous enum
Enumerator
NODE_ATTRIBUTE 
NODE_POINTER 
NODE_VECTOR 
NODE_VECTOR_ITEM 
NODE_OBJECT 

Definition at line 42 of file model-node-creator.h.

anonymous enum
Enumerator
NODE_ATTRIBUTE 
NODE_TYPEID 

Definition at line 41 of file model-typeid-creator.h.

store format

for ConfigStore operation

file format

Enumerator
XML 
RAW_TEXT 

Definition at line 76 of file config-store.h.

for ConfigStore operation

store / load mode

Enumerator
LOAD 
SAVE 
NONE 

Definition at line 66 of file config-store.h.

Function Documentation

std::ostream & ns3::operator<< ( std::ostream &  os,
ConfigStore::Mode mode 
)
std::ostream & ns3::operator<< ( std::ostream &  os,
ConfigStore::FileFormat format 
)

Definition at line 192 of file config-store.cc.

References ns3::ConfigStore::RAW_TEXT, and ns3::ConfigStore::XML.