A Discrete-Event Network Simulator
API
Environment Variables
+ Collaboration diagram for Environment Variables:

Files

file  environment-variable.cc
 Class EnvironmentVariable implementation.
 
file  environment-variable.h
 Class Environment declaration.
 

Classes

class  ns3::EnvironmentVariable
 Hold key,value dictionaries for environment variables. More...
 

Macros

#define NS_LOCAL_LOG(msg)
 File-local logging macro for environment-variable.cc Our usual Logging doesn't work here because these functions get called during static initialization of Logging itself. More...
 

Variables

const char * NS_ATTRIBUTE_DEFAULT = "name=value[;...]"
 Initialize an ns3::Attribute. More...
 
const char * NS_COMMANDLINE_INTROSPECTION = "path"
 Write the ns3::CommandLine::Usage message, in Doxygen format, to the referenced location. More...
 
const char * NS_GLOBAL_VALUE = "name=value[;...]"
 Initialize a ns3::GlobalValue. More...
 
const char * NS_LOG = "component=option[|option...][:...]"
 Control which logging components are enabled. More...
 
const char * TMP = "path"
 Where to make temporary directories. More...
 
const char * TEMP = "path"
 Where to make temporary directories. More...
 

Detailed Description

Macro Definition Documentation

◆ NS_LOCAL_LOG

#define NS_LOCAL_LOG (   msg)

File-local logging macro for environment-variable.cc Our usual Logging doesn't work here because these functions get called during static initialization of Logging itself.

Parameters
msgThe message stream to log

Definition at line 129 of file environment-variable.cc.

Variable Documentation

◆ NS_ATTRIBUTE_DEFAULT

const char* NS_ATTRIBUTE_DEFAULT = "name=value[;...]"

Initialize an ns3::Attribute.

Sets a new default value for an Attribute. This is invoked if the ns3::Object being constructed has an Attribute matching name, and that Attribute didn't appear in the ns3::AttributeConstructionList argument to ns3::ObjectBase::ConstructSelf. The ns3::AttributeConstructionList is typically createad by an ns3::ObjectFactory and populated by ns3::ObjectFactory::Set.

All objects with an Attribute matching name will be matched, so name collisions could wreak havoc.

Parameters
name The name of the Attribute to set.
value The value to set the Attribute to.
; Multiple name=value pairs should be delimited by ';'

Referenced by ns3::ObjectBase::ConstructSelf.

Definition at line 64 of file environment-variables.h.

◆ NS_COMMANDLINE_INTROSPECTION

const char* NS_COMMANDLINE_INTROSPECTION = "path"

Write the ns3::CommandLine::Usage message, in Doxygen format, to the referenced location.

Set the directory where ns3::CommandLine instances should write their Usage message, used when building documentation.

This is used primarily by the documentation builds, which execute each registered example to gather their ns3::CommandLine::Usage information. This wouldn't normally be useful to users.

Parameters
path The directory where ns3::CommandLine should write its Usage message.

Referenced by ns3::CommandLine::PrintDoxygenUsage.

Definition at line 92 of file environment-variables.h.

◆ NS_GLOBAL_VALUE

const char* NS_GLOBAL_VALUE = "name=value[;...]"

Initialize a ns3::GlobalValue.

Initialize the ns3::GlobalValue name from value.

This overrides the initial value set in the corresponding ns3::GlobalValue constructor.

Parameters
name The name of the ns3::GlobalValue to set.
value The value to set the ns3::GlobalValue to.
; Multiple name=value pairs should be delimited by ';'

Referenced by ns3::GlobalValue::InitializeFromEnv.

Definition at line 125 of file environment-variables.h.

◆ NS_LOG

const char* NS_LOG = "component=option[|option...][:...]"

Control which logging components are enabled.

Enable logging from specific components, with specified options. See the Logging module, or the Logging chapter in the manual for details on what symbols can be used for specifying log level and prefix options.

Parameters
component The logging component to enable.
option Log level and or prefix to enable. Multiple options should be delimited with '|'
: Multiple logging components can be enabled simultaneously, delimited by ':'

Referenced by ns3::PrintList, ns3::LogComponent::EnvVarCheck and ns3::CheckEnvironmentVariables(), all in log.cc.

Definition at line 159 of file environment-variables.h.

Referenced by ns3::UplinkSchedulerMBQoS::UplinkSchedWindowTimer().

◆ TEMP

const char* TEMP = "path"

Where to make temporary directories.

The absolute path where ns-3 should make temporary directories.

See ns3::SystemPath::MakeTemporaryDirectoryName for details on how this environment variable is used to create a temporary directory, and how that directory will be named.

Parameters
path The absolute path in which to create the temporary directory.

Referenced by ns3::SystemPath::MakeTemporaryDirectoryName.

Definition at line 188 of file environment-variables.h.

◆ TMP

const char* TMP = "path"

Where to make temporary directories.

The absolute path where ns-3 should make temporary directories.

See ns3::SystemPath::MakeTemporaryDirectoryName for details on how this environment variable is used to create a temporary directory, and how that directory will be named.

Parameters
path The absolute path in which to create the temporary directory.

Referenced by ns3::SystemPath::MakeTemporaryDirectoryName.

Definition at line 187 of file environment-variables.h.