From 2cb774905738fabc442a29bd546962d1f38c68cd Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Thu, 2 Jul 2009 15:32:37 +0200 Subject: [PATCH] document how a GlobalValue can be set from the command-line and with an environment variable --- src/core/global-value.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/global-value.h b/src/core/global-value.h index fb957621e..a40d2244f 100644 --- a/src/core/global-value.h +++ b/src/core/global-value.h @@ -35,6 +35,14 @@ namespace ns3 { * * Instances of this class are expected to be allocated as static * global variables and should be used to store configurable global state. + * GlobalValues can be set directly by calling ns3::GlobalValue::SetValue + * but they can also be set through the NS_GLOBAL_VALUE environment variable. + * For example, NS_GLOBAL_VALUE='Name=Value;OtherName=OtherValue;' would set + * global values Name and OtherName to Value and OtherValue respectively. + * + * Users of the ns3::CommandLine class also get the ability to set global + * values through commandline arguments to their program: --Name=Value will + * set global value Name to Value. */ class GlobalValue {