diff --git a/doc/manual/source/attributes.rst b/doc/manual/source/attributes.rst index febff5343..2bd40e7b7 100644 --- a/doc/manual/source/attributes.rst +++ b/doc/manual/source/attributes.rst @@ -27,29 +27,29 @@ In the course of this chapter we will discuss the various ways to set or modify the values used by |ns3| model objects. In increasing order of specificity, these are: -+---------------------------------------+-------------------------------------+ -| Method | Scope | -+=======================================+=====================================+ -| Default Attribute values set when | Affect all instances of the class. | -| Attributes are defined in | | -| :cpp:func:`GetTypeId ()`. | | -+---------------------------------------+-------------------------------------+ -| | :cpp:class:`CommandLine` | Affect all future instances. | -| | :cpp:func:`Config::SetDefault()` | | -| | :cpp:class:`ConfigStore` | | -+---------------------------------------+-------------------------------------+ -| :cpp:class:`ObjectFactory` | Affects all instances created with | -| | the factory. | -+---------------------------------------+-------------------------------------+ -| Helper methods with (string/ | Affects all instances created by | -| AttributeValue) parameter pairs | the helper. | -+---------------------------------------+-------------------------------------+ -| | :cpp:func:`MyClass::SetX ()` | Alters this particular instance. | -| | :cpp:func:`Object::SetAttribute ()` | Generally this is the only form | -| | :cpp:func:`Config::Set()` | which can be scheduled to alter | -| | an instance once the simulation | -| | is running. | -+---------------------------------------+-------------------------------------+ ++-----------------------------------+-------------------------------------+----------------------------------+ +| Method | Scope | | ++===================================+=====================================+==================================+ +| Default Attribute values set when | Affect all instances of the class. | | +| Attributes are defined in | | | +| :cpp:func:`GetTypeId ()`. | | | ++-----------------------------------+-------------------------------------+----------------------------------+ +| | :cpp:class:`CommandLine` | Affect all future instances. | +| | :cpp:func:`Config::SetDefault()` | | +| | :cpp:class:`ConfigStore` | | ++-----------------------------------+-------------------------------------+----------------------------------+ +| :cpp:class:`ObjectFactory` | Affects all instances created with | | +| | the factory. | | ++-----------------------------------+-------------------------------------+----------------------------------+ +| Helper methods with (string/ | Affects all instances created by | | +| AttributeValue) parameter pairs | the helper. | | ++-----------------------------------+-------------------------------------+----------------------------------+ +| | :cpp:func:`MyClass::SetX ()` | Alters this particular instance. | +| | :cpp:func:`Object::SetAttribute ()` | Generally this is the only form | +| | :cpp:func:`Config::Set()` | which can be scheduled to alter | +| | an instance once the simulation | | +| | is running. | | ++-----------------------------------+-------------------------------------+----------------------------------+ By "specificity" we mean that methods in later rows in the table override the values set by, and typically affect fewer instances than, @@ -575,7 +575,9 @@ Config Namespace Path An alternative way to get at the attribute is to use the configuration namespace. Here, this attribute resides on a known path in this namespace; this approach is useful if one doesn't have access to the underlying pointers and -would like to configure a specific attribute with a single statement.:: +would like to configure a specific attribute with a single statement. + +:: Config::Set ("/NodeList/0/DeviceList/0/TxQueue/MaxSize", StringValue ("25p")); @@ -603,9 +605,9 @@ devices (which in this simple example has the same effect as the previous << limit.Get ()); If you run this program from the command line, you should see the following -output corresponding to the steps we took above:: +output corresponding to the steps we took above: -.. sourcecode:: text +.. sourcecode:: bash $ ./waf --run main-attribute-value 1. dtq limit: 80p diff --git a/doc/manual/source/python.rst b/doc/manual/source/python.rst index de1ce4bb6..cd91baca1 100644 --- a/doc/manual/source/python.rst +++ b/doc/manual/source/python.rst @@ -291,7 +291,7 @@ Installing other prerequisites ``cxxfilt`` is a new requirement, typically installed using ``pip``; e.g. -:: +.. sourcecode:: bash sudo pip install cxxfilt @@ -300,7 +300,7 @@ See also the wiki for installation notes for your system. Set up a ``bake`` build environment ################################### -Try the following commands:: +Try the following commands: .. sourcecode:: bash @@ -314,20 +314,20 @@ Try the following commands:: Configure ######### -Perform a configuration at the bake level:: +Perform a configuration at the bake level: .. sourcecode:: bash $ ./bake.py configure -e ns-3-dev -e pygccxml-1.9.1 The output of ``bake show`` should show something like this: -:: + .. sourcecode:: bash $ ./bake.py show -Should say:: +Should say: .. sourcecode:: text @@ -344,7 +344,7 @@ Should say:: Download ######## -Try the following command:: +Try the following command: .. sourcecode:: bash @@ -366,9 +366,9 @@ Try the following command:: Build ##### -Try the following commands:: +Try the following commands: -.. sourcecode:: text +.. sourcecode:: bash $ mkdir -p build/lib $ ./bake.py build @@ -378,16 +378,12 @@ It should fail on the |ns3| bindings complilation. The output of './waf configure' can be inspected to see if Python API scanning support is enabled: -:: - .. sourcecode:: text Python API Scanning Support : enabled It may say something like this, if the support is not active: -:: - .. sourcecode:: text Python API Scanning Support : not enabled (Missing 'pygccxml' Python module) @@ -418,8 +414,6 @@ Rescanning a module To re-scan a module: -:: - .. sourcecode:: bash $ cd source/ns-3-dev @@ -427,7 +421,7 @@ To re-scan a module: To re-scan all modules: -:: +.. sourcecode:: bash $ cd source/ns-3-dev $ ./waf --apiscan=all