diff --git a/.hgignore b/.hgignore index 6558f24eb..ba9effb2d 100644 --- a/.hgignore +++ b/.hgignore @@ -17,6 +17,8 @@ ^doc/manual/build ^doc/tutorial/build ^doc/testing/build +^doc/models/build +^doc/models/source-temp ^doc/manual/figures/.*eps ^doc/manual/figures/.*pdf ^doc/manual/figures/.*png diff --git a/.hgtags b/.hgtags index 1829d3e0f..f72791391 100644 --- a/.hgtags +++ b/.hgtags @@ -54,3 +54,5 @@ fb5ad9c7755aa6ea871e76d322fd4c43a5b1047d ns-3.9-RC1 def4153e27cd744f117acf8c509979617850da83 ns-3.9-RC3 8ddf25211f8995cde73baa8b8a419711ed451b85 ns-3.9 63a8a4ed4054f1e1cd1756045abba657f6fd884c ns-3.10 +440bbee145f096193abcdd67fe6c16de62935d89 ns-3.11-RC1 +0a7a16b599e86ca7884e5b5772bf7c5cfe146603 ns-3.11-RC2 diff --git a/CHANGES.html b/CHANGES.html index cec78f518..de2073243 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -83,6 +83,16 @@ objects. The implementation of int64x64_t is based on the previously-exis

Changes to existing API:

Changed behavior:

diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 12e3e0ce6..1507d1fef 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -25,53 +25,79 @@ New user-visible features - int64x64_t is a new type which allows portable and easy to write arithmetic calculations that require a high degree of fractional precision. + - interface to the Click Modular Router and an Ipv4ClickRouting + class to allow a node to use Click for external routing + + - interface to an OpenFlow software implementation distribution to allow the + simulation of OpenFlow switches in ns-3 + Bugs fixed ---------- The following lists many of the bugs fixed or small feature additions since ns-3.10, in many cases referencing the Bugzilla bug number. - - Bug 1019: common --> node --> common circular dependency - - Fixed UanPhyGen::IsStateBusy method bug - - bugfix: CsmaNetDevice ErrorModel not discarding packet (reported by - - Bug 1048: MatrixPropagationLossModel API changed from Ptr to - - Bug 1049 - Issues with OLSR HNA messages sent by multiple gateways - - Bug 1052 - olsr::RoutingProtocol::LinkTupleUpdated incorrect - - bug 1062: fix portability issue with rescale-pdf.sh - - Bug 1064: Correct Friis propagation loss equation + - bugfix: CsmaNetDevice ErrorModel not discarding packet - bugfix: do not call RouteOutput() twice - Workaround gccxml bug scanning Seconds(0) as default value - Copy a bug fix from ns3modulescan.py into ns3modulescan-modular.py - - Bug 1070: csma/ipv6 examples duplicate NS_LOG_COMPONENT_DEFINE - Modular Python bindings work (many bug fixes, more modules tested) - - bug 1072: crash upon call to Packet::AddAtEnd of fragmented packets - - Bug 1040 - Olsr and multiple interfaces - - Bug 1075 - Python examples fail when static built is enabled - - Bug 1076 - Waf gives an error if you enable only a single module - Modular bindings: bug fixes, more verbose scanning - - bug 1078: PacketTagList::Add performs NS_ASSERT counting one byte - ./waf --apiscan: fix bug in detection of whether the per-module - - Bug 1081 - wutils.py refers to the old directory for visualizer - - Bug 1083 - scratch doesn't work when only some modules are enabled - Remove the 'Modules to build' debug print - - updated doxygen for Object::Dispose (bug 1086) - - fixed ActiveProbing for StaWifiMac (bug 1060) - - bug 1094: Object::GetObject upon dlopen - - fixed Bug 1066 - Set Radiotap modulation type flags correctly - - fixed Bug 1090 - WifiMacQueue is not accessible through the - - fix Bug 1069 - ApWifiMac unduly calls RegularWifiMac::Receive and - - revised fix for bug 1069 - - bug 1046: Check AODV LocalDeliver callback before using it - - fix small bugs - - work around pybindgen bug - - bugs fixed - - Bug 1088 - Code in scratch directory assumes all modules are enabled - - testcase for bug 1072 - - bug 1072: crash upon call to Packet::AddAtEnd of fragmented packets - - Bug 1106: Remove CanvasLocation dependencies - CsmaNetDevice ReceiveErrorModel was not dropping the packet - - bug 1038 - Time::Get*Seconds () return signed integer while actually returning unsigned + - bug 445 - Is the class name Scalar in nstime.h appropriate? + - bug 699 - TestCase::DoRun probably should not return a bool + - bug 957 - Issue with test.py + - bug 1017 - node --> internet-stack --> node + - bug 1018 - mobility --> helper --> mobility circular dependency + - bug 1019 - common --> node --> common circular dependency + - bug 1038 - Time::Get*Seconds () return signed integer while actually returning unsigned. + - bug 1040 - Olsr and multiple interfaces + - bug 1042 - AODV RERR implosion (missing RERR_RATELIMIT) - bug 1044 - Seconds (1e-9) creates Time that is not IsPositive () + - bug 1047 - Multicast routes on nodes with >16 interfaces + - bug 1048 - suggested MatrixPropagationLossModel::SetLoss() API change + - bug 1049 - Issues with OLSR HNA messages sent by multiple gateways + - bug 1052 - olsr::RoutingProtocol::LinkTupleUpdated incorrect detection of asymetric link with multiple interface nodes + - bug 1054 - ipv6 InternetStackHelper EnablePcapIpv6All() broken + - bug 1056 - CSMA: padding not handled correctly for LLC encapsulation + - bug 1058 - InternetStackHelper pitfall: calling Install before adding routing protocols + - bug 1060 - Setting NqStaWifiMac Active Probing true, crashes simulation + - bug 1061 - Title level inconsistent in click.rst + - bug 1062 - rescale-pdf not working + - bug 1064 - Correct Friis propagation loss equation in spectrum module + - bug 1066 - Set Radiotap modulation type flags correctly + - bug 1069 - ApWifiMac unduly calls RegularWifiMac::Receive and crashes + - bug 1070 - csma/ipv6 examples duplicate NS_LOG_COMPONENT_DEFINE + - bug 1072 - crash upon call to Packet::AddAtEnd of fragmented packets + - bug 1075 - Python examples fail when static built is enabled + - bug 1076 - Waf gives an error if you enable only a single module + - bug 1078 - PacketTagList::Add performs NS_ASSERT counting one byte too few + - bug 1079 - MPI code doesn't compile + - bug 1081 - wutils.py refers to the old directory for visualizer module + - bug 1083 - scratch doesn't work when only some modules are enabled + - bug 1085 - Build failed: list index out of range + - bug 1086 - sanity check for not calling Object::Dispose () twice + - bug 1087 - Call MPI_Finalize to exit MPI environment + - bug 1088 - Code in scratch directory assumes all modules are enabled + - bug 1089 - lwip build issue + - bug 1090 - WifiMacQueue is not accessible through the attribute path + - bug 1092 - Problem building FreeBSD stack with g++ 4.5.2 (Ubuntu) + - bug 1094 - Object::GetObject upon dlopen + - bug 1097 - AODV routing entry set to be VALID mistakenly. + - bug 1098 - when to show users which modules are enabled? + - bug 1103 - Useless assignment in omnet-data-output.cc + - bug 1105 - Move topology helpers into separate per-device modules + - bug 1106 - Remove "CanvasLocation" dependencies in p2p helpers + - bug 1108 - test.py -e option needs repair + - bug 1110 - Sort alphabetically and display "Modules built" in columns + - bug 1117 - bindings failures on selected platforms + - bug 1122 - spectrum-value test should check tolerance on a per-value basis + - bug 1125 - ./waf --enable-modules fails + - bug 1131 - Bug in Ipv4L3Protocol::RemoveAddress() + - bug 1133 - DSDV: Possible bug in settling time calc + - bug 1142 - Wrong 802.11p Slot time Known issues ------------ diff --git a/doc/WifiArchitecture.png b/doc/WifiArchitecture.png deleted file mode 100644 index c30ab6124..000000000 Binary files a/doc/WifiArchitecture.png and /dev/null differ diff --git a/doc/WimaxArchitecture.png b/doc/WimaxArchitecture.png deleted file mode 100644 index 9600639f4..000000000 Binary files a/doc/WimaxArchitecture.png and /dev/null differ diff --git a/doc/build.txt b/doc/build.txt index 2db77ebe0..15b398b44 100644 --- a/doc/build.txt +++ b/doc/build.txt @@ -76,7 +76,7 @@ with --enable-gcov) === Extending ns-3 === To add new modules: - 1. Create the module directory under src (or src/devices, or whatever); + 1. Create the module directory under src; 2. Add the source files to it; 3. Add a 'wscript' describing it; 4. Add the module subdirectory name to the all_modules list in src/wscript. diff --git a/doc/doxygen.conf b/doc/doxygen.conf index b5a2e58d1..2e971f095 100644 --- a/doc/doxygen.conf +++ b/doc/doxygen.conf @@ -603,13 +603,13 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = src/routing/olsr/olsr-state.h \ - src/routing/olsr/olsr-repositories.h \ - src/simulator/high-precision.h \ - src/simulator/high-precision-128.h \ - src/simulator/high-precision-double.h \ - src/tools/visualizer/model/visual-simulator-impl.h \ - src/tools/visualizer/model/pyviz.h +EXCLUDE = src/olsr/model/olsr-state.h \ + src/olsr/model/olsr-repositories.h \ + src/core/model/high-precision.h \ + src/core/model/high-precision-128.h \ + src/core/model/high-precision-double.h \ + src/visualizer/model/visual-simulator-impl.h \ + src/visualizer/model/pyviz.h # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded diff --git a/doc/main.h b/doc/main.h index 7616ea517..eeb6e4331 100644 --- a/doc/main.h +++ b/doc/main.h @@ -34,24 +34,46 @@ * * \section module-sec Module overview * - * The ns-3 library is split across multiple modules: - * - core: located in src/core and contains a number of facilities which - * do not depend on any other module. Some of these facilities are - * OS-dependent. - * - simulator: located in src/simulator and contains event scheduling - * facilities. - * - common: located in src/common and contains facilities specific - * to network simulations but shared by pretty much every model - * of a network component. - * - node: located in src/node. Defines the abstract interfaces which - * must be implemented by every node and more specifically, by - * IPv4 and IPv6 nodes. - * - devices: located in src/devices. Contains a set of MAC-level models - * - InternetStack: located in src/internet-stack. Contains TCP/IP models. - * - Applications: located in src/applications - * - Routing: located in src/routing; routing protocols. - * - Mobility: located in src/mobility; Mobility models for nodes - * - Helper: located in src/helper; Helper API for the simulator + * The ns-3 library is split across many modules: + * - aodv + * - applications + * - bridge + * - click + * - config-store + * - core + * - csma + * - csma-layout + * - dsdv + * - emu + * - energy + * - flow-monitor + * - internet + * - lte + * - mesh + * - mobility + * - mpi + * - netanim + * - network + * - nix-vector-routing + * - ns3tcp + * - ns3wifi + * - olsr + * - openflow + * - point-to-point + * - point-to-point-layout + * - propagation + * - spectrum + * - stats + * - tap-bridge + * - template + * - test + * - tools + * - topology-read + * - uan + * - virtual-net-device + * - visualizer + * - wifi + * - wimax * * More detail can be found in the Modules * tab. diff --git a/doc/manual/Makefile b/doc/manual/Makefile index da91ff3ac..c4b063e25 100644 --- a/doc/manual/Makefile +++ b/doc/manual/Makefile @@ -6,45 +6,10 @@ FIGURES = figures VPATH = $(FIGURES) IMAGES_EPS = \ - $(FIGURES)/internet-node-send.eps \ - $(FIGURES)/internet-node-recv.eps \ - $(FIGURES)/packet.eps \ - $(FIGURES)/node.eps \ - $(FIGURES)/buffer.eps \ - $(FIGURES)/sockets-overview.eps \ $(FIGURES)/software-organization.eps \ - $(FIGURES)/routing.eps \ - $(FIGURES)/routing-specialization.eps \ - $(FIGURES)/testbed.eps \ - $(FIGURES)/emulated-channel.eps \ - $(FIGURES)/snir.eps \ - $(FIGURES)/WifiArchitecture.eps \ - $(FIGURES)/WimaxArchitecture.eps \ - $(FIGURES)/auvmobility-classes.eps \ - $(FIGURES)/ff-mac-saps.eps \ - $(FIGURES)/ff-example.eps \ - $(FIGURES)/lte-enb-architecture.eps \ - $(FIGURES)/lte-ue-architecture.eps \ -# missing figure -# $(FIGURES)/lte-transmission.eps -$(FIGURES)/node.pdf_width = 5in -$(FIGURES)/testbed.pdf_width = 5in -$(FIGURES)/emulated-channel.pdf_width = 6in -$(FIGURES)/internet-node-send.pdf_width = 5in -$(FIGURES)/internet-node-recv.pdf_width = 5in $(FIGURES)/software-organization.pdf_width = 5in -$(FIGURES)/packet.pdf_width = 4in -$(FIGURES)/buffer.pdf_width = 15cm -$(FIGURES)/routing.pdf_width = 6in -$(FIGURES)/routing-specialization.pdf_width = 5in -$(FIGURES)/sockets-overview.pdf_width = 10cm -$(FIGURES)/snir.pdf_width = 3in -$(FIGURES)/lte-transmission.pdf_width = 3in -$(FIGURES)/auvmobility-classes.pdf_width = 10cm -$(FIGURES)/lte-enb-architecture.pdf_width = 10cm - IMAGES_PNG = ${IMAGES_EPS:.eps=.png} IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf} @@ -88,7 +53,7 @@ help: @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: - -rm -rf $(BUILDDIR)/* + -rm -rf $(BUILDDIR) -rm -rf $(IMAGES) frag: pickle diff --git a/doc/manual/figures/WifiArchitecture.dia b/doc/manual/figures/WifiArchitecture.dia deleted file mode 100644 index 71deb6830..000000000 Binary files a/doc/manual/figures/WifiArchitecture.dia and /dev/null differ diff --git a/doc/manual/figures/WimaxArchitecture.dia b/doc/manual/figures/WimaxArchitecture.dia deleted file mode 100644 index d68d960fe..000000000 Binary files a/doc/manual/figures/WimaxArchitecture.dia and /dev/null differ diff --git a/doc/manual/source/attributes.rst b/doc/manual/source/attributes.rst index eafea19ba..3ce1c11ad 100644 --- a/doc/manual/source/attributes.rst +++ b/doc/manual/source/attributes.rst @@ -575,7 +575,7 @@ From the perspective of the user who writes a new class in the system and wants to hook it in to the attribute system, there is mainly the matter of writing the conversions to/from strings and attribute values. Most of this can be copy/pasted with macro-ized code. For instance, consider class declaration for -Rectangle in the ``src/mobility/`` directory: +Rectangle in the ``src/mobility/model`` directory: Header file +++++++++++ @@ -641,14 +641,14 @@ ConfigStore *********** **Feedback requested:** This is an experimental feature of |ns3|. It is found -in ``src/contrib`` and not in the main tree. If you like this feature and +in ``src/config-store``. If you like this feature and would like to provide feedback on it, please email us. -Values for |ns3| attributes can be stored in an ASCII or XML text file and -loaded into a future simulation. This feature is known as the |ns3| -ConfigStore. The ConfigStore code is in ``src/contrib/``. It is not yet -main-tree code, because we are seeking some user feedback and experience with -this. +Values for |ns3| attributes can be stored in an ASCII or XML text file +and loaded into a future simulation. This feature is known as the +|ns3| ConfigStore. The ConfigStore code is in ``src/config-store/model``. +It is still considered as unstable code, because we are seeking some +user feedback and experience with this. We can explore this system by using an example. Copy the ``csma-bridge.cc`` file to the scratch directory::: diff --git a/doc/manual/source/conf.py b/doc/manual/source/conf.py index 874cbec1f..00d857170 100644 --- a/doc/manual/source/conf.py +++ b/doc/manual/source/conf.py @@ -178,7 +178,7 @@ htmlhelp_basename = 'ns-3doc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'ns-3.tex', u'ns-3 Manual', + ('index', 'ns-3-manual.tex', u'ns-3 Manual', u'ns-3 project', 'manual'), ] @@ -211,6 +211,6 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'ns-3', u'ns-3 Documentation', + ('index', 'ns-3-manual', u'ns-3 Manual', [u'ns-3 project'], 1) ] diff --git a/doc/manual/source/core.rst b/doc/manual/source/core.rst deleted file mode 100644 index 94127b8d7..000000000 --- a/doc/manual/source/core.rst +++ /dev/null @@ -1,17 +0,0 @@ -Core ----- - -.. toctree:: - - random-variables - callbacks - object-model - attributes - object-names - logging - tracing - realtime - distributed - packets - helpers - python diff --git a/doc/manual/source/emulation.rst b/doc/manual/source/emulation.rst deleted file mode 100644 index 2187b4295..000000000 --- a/doc/manual/source/emulation.rst +++ /dev/null @@ -1,8 +0,0 @@ -Emulation ---------- - -.. toctree:: - - emulation-overview - emu - tap diff --git a/doc/manual/source/enable-modules.rst b/doc/manual/source/enable-modules.rst new file mode 100644 index 000000000..5e63438a8 --- /dev/null +++ b/doc/manual/source/enable-modules.rst @@ -0,0 +1,137 @@ +.. include:: replace.txt + +Enabling Subsets of |ns3| Modules +--------------------------------- + +As with most software projects, |ns3| is ever growing larger in terms of number of modules, lines of code, and memory footprint. Users, however, may only use a few of those modules at a time. For this reason, users may want to explicitly enable only the subset of the possible |ns3| modules that they actually need for their research. + +This chapter discusses how to enable only the |ns3| modules that you are intersted in using. + +How to enable a subset of |ns3|'s modules +***************************************** + +If shared libraries are being built, then enabling a module will cause at least one library to be built: :: + + libns3-modulename.so. + +If the module has a test library and test libraries are being built, then :: + + libns3-modulename-test.so + +will be built, too. Other modules that the module depends on and their test libraries will also be built. + +By default, all modules are built in |ns3|. There are two ways to enable a subset of these modules: + +#. Using waf's --enable-modules option +#. Using the |ns3| configuration file + +Enable modules using waf's --enable-modules option +++++++++++++++++++++++++++++++++++++++++++++++++++ + +To enable only the core module with example and tests, for example, +try these commands: :: + + ./waf clean + ./waf configure --enable-examples --enable-tests --enable-modules=core + ./waf build + cd build/debug/ + ls + +and the following libraries should be present: :: + + bindings libns3-core.so ns3 scratch utils + examples libns3-core-test.so samples src + +Note the ``./waf clean`` step is done here only to make it more obvious which module libraries were built. You don't have to do ``./waf clean`` in order to enable subsets of modules. + +Running test.py will cause only those tests that depend on module core to be run: :: + + 24 of 24 tests passed (24 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) + +Repeat the above steps for the "network" module instead of the "core" module, and the following will be built, since network depends on core: :: + + bindings libns3-core.so libns3-network.so ns3 scratch utils + examples libns3-core-test.so libns3-network-test.so samples src + +Running test.py will cause those tests that depend on only the core and network modules to be run: :: + + 31 of 31 tests passed (31 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) + +Enable modules using the |ns3| configuration file ++++++++++++++++++++++++++++++++++++++++++++++++++ + +A configuration file, .ns3rc, has been added to |ns3| that allows users to specify which modules are to be included in the build. + +When enabling a subset of |ns3| modules, the precedence rules are as follows: + +#. the --enable-modules configure string overrides any .ns3rc file +#. the .ns3rc file in the top level |ns3| directory is next consulted, if present +#. the system searches for ~/.ns3rc if the above two are unspecified + +If none of the above limits the modules to be built, all modules that waf knows about will be built. + +The maintained version of the .ns3rc file in the |ns3| source code repository resides in the ``utils`` directory. The reason for this is if it were in the top-level directory of the repository, it would be prone to accidental checkins from maintainers that enable the modules they want to use. Therefore, users need to manually copy the .ns3rc from the ``utils`` directory to their preferred place (top level directory or their home directory) to enable persistent modular build configuration. + +Assuming that you are in the top level |ns3| directory, you can get a copy of the .ns3rc file that is in the ``utils`` directory as follows: :: + + cp utils/.ns3rc . + +The .ns3rc file should now be in your top level |ns3| directory, and it contains the following: :: + + #! /usr/bin/env python + + # A list of the modules that will be enabled when ns-3 is run. + # Modules that depend on the listed modules will be enabled also. + # + # All modules can be enabled by choosing 'all_modules'. + modules_enabled = ['all_modules'] + + # Set this equal to true if you want examples to be run. + examples_enabled = False + + # Set this equal to true if you want tests to be run. + tests_enabled = False + +Use your favorite editor to modify the .ns3rc file to only enable the core module with examples and tests like this: :: + + #! /usr/bin/env python + + # A list of the modules that will be enabled when ns-3 is run. + # Modules that depend on the listed modules will be enabled also. + # + # All modules can be enabled by choosing 'all_modules'. + modules_enabled = ['core'] + + # Set this equal to true if you want examples to be run. + examples_enabled = True + + # Set this equal to true if you want tests to be run. + tests_enabled = True + +Only the core module will be enabled now if you try these commands: :: + + ./waf clean + ./waf configure + ./waf build + cd build/debug/ + ls + +and the following libraries should be present: :: + + bindings libns3-core.so ns3 scratch utils + examples libns3-core-test.so samples src + +Note the ``./waf clean`` step is done here only to make it more obvious which module libraries were built. You don't have to do ``./waf clean`` in order to enable subsets of modules. + +Running test.py will cause only those tests that depend on module core to be run: :: + + 24 of 24 tests passed (24 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) + +Repeat the above steps for the "network" module instead of the "core" module, and the following will be built, since network depends on core: :: + + bindings libns3-core.so libns3-network.so ns3 scratch utils + examples libns3-core-test.so libns3-network-test.so samples src + +Running test.py will cause those tests that depend on only the core and network modules to be run: :: + + 31 of 31 tests passed (31 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) diff --git a/doc/manual/source/enable-tests.rst b/doc/manual/source/enable-tests.rst new file mode 100644 index 000000000..ba44dde55 --- /dev/null +++ b/doc/manual/source/enable-tests.rst @@ -0,0 +1,141 @@ +.. include:: replace.txt + +Enabling/disabling |ns3| Tests and Examples +------------------------------------------- + +The |ns3| distribution includes many examples and tests that are used to validate the |ns3| system. Users, however, may not always want these examples and tests to be run for their installation of |ns3|. + +This chapter discusses how to build |ns3| with or without its examples and tests. + +How to enable/disable examples and tests in |ns3| +************************************************* + +There are 3 ways to enable/disable examples and tests in |ns3|: + +#. Using build.py when |ns3| is built for the first time +#. Using waf once |ns3| has been built +#. Using the |ns3| configuration file once |ns3| has been built + +Enable/disable examples and tests using build.py +++++++++++++++++++++++++++++++++++++++++++++++++ + +You can use build.py to enable/disable examples and tests when |ns3| is built for the first time. + +By default, examples and tests are not built in |ns3|. + +From the ns-3-allinone directory, you can build |ns3| without any +examples or tests simply by doing: :: + + ./build.py + +Running test.py in the top level |ns3| directory now will cause no examples or tests to be run: :: + + 0 of 0 tests passed (0 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) + +If you would like build |ns3| with examples and tests, then do the following from the ns-3-allinone directory: :: + + ./build.py --enable-examples --enable-tests + +Running test.py in the top level |ns3| directory will cause all of the examples and tests to be run: :: + + 170 of 170 tests passed (170 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) + +Enable/disable examples and tests using waf ++++++++++++++++++++++++++++++++++++++++++++ + +You can use waf to enable/disable examples and tests once |ns3| has been built. + +By default, examples and tests are not built in |ns3|. + +From the top level |ns3| directory, you can build |ns3| without any +examples or tests simply by doing: :: + + ./waf configure + ./waf build + +Running test.py now will cause no examples or tests to be run: :: + + 0 of 0 tests passed (0 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) + +If you would like build |ns3| with examples and tests, then do the following from the top level |ns3| directory: :: + + ./waf configure --enable-examples --enable-tests + ./waf build + +Running test.py will cause all of the examples and tests to be run: :: + + 170 of 170 tests passed (170 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) + +Enable/disable examples and tests using the |ns3| configuration file +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +A configuration file, .ns3rc, has been added to |ns3| that allows users to specify whether examples and tests should be built or not. You can use this file to enable/disable examples and tests once |ns3| has been built. + +When enabling disabling examples and tests, the precedence rules are as follows: + +#. the --enable-examples/--disable-examples configure strings override any .ns3rc file +#. the --enable-tests/--disable-tests configure strings override any .ns3rc file +#. the .ns3rc file in the top level |ns3| directory is next consulted, if present +#. the system searches for ~/.ns3rc if the .ns3rc file was not found in the previous step + +If none of the above exists, then examples and tests will not be built. + +The maintained version of the .ns3rc file in the |ns3| source code repository resides in the ``utils`` directory. The reason for this is if it were in the top-level directory of the repository, it would be prone to accidental checkins from maintainers that enable the modules they want to use. Therefore, users need to manually copy the .ns3rc from the ``utils`` directory to their preferred place (top level directory or their home directory) to enable persistent enabling of examples and tests. + +Assuming that you are in the top level |ns3| directory, you can get a copy of the .ns3rc file that is in the ``utils`` directory as follows: :: + + cp utils/.ns3rc . + +The .ns3rc file should now be in your top level |ns3| directory, and it contains the following: :: + + #! /usr/bin/env python + + # A list of the modules that will be enabled when ns-3 is run. + # Modules that depend on the listed modules will be enabled also. + # + # All modules can be enabled by choosing 'all_modules'. + modules_enabled = ['all_modules'] + + # Set this equal to true if you want examples to be run. + examples_enabled = False + + # Set this equal to true if you want tests to be run. + tests_enabled = False + +From the top level |ns3| directory, you can build |ns3| without any +examples or tests simply by doing: :: + + ./waf configure + ./waf build + +Running test.py now will cause no examples or tests to be run: :: + + 0 of 0 tests passed (0 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) + +If you would like build |ns3| with examples and tests, use your +favorite editor to change the values in the .ns3rc file for +examples_enabled and tests_enabled file to be True: :: + + #! /usr/bin/env python + + # A list of the modules that will be enabled when ns-3 is run. + # Modules that depend on the listed modules will be enabled also. + # + # All modules can be enabled by choosing 'all_modules'. + modules_enabled = ['all_modules'] + + # Set this equal to true if you want examples to be run. + examples_enabled = True + + # Set this equal to true if you want tests to be run. + tests_enabled = True + +From the top level |ns3| directory, you can build |ns3| with examples +and tests simply by doing: :: + + ./waf configure + ./waf build + +Running test.py will cause all of the examples and tests to be run: :: + + 170 of 170 tests passed (170 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors) diff --git a/doc/manual/source/flow-monitor.rst b/doc/manual/source/flow-monitor.rst deleted file mode 100644 index a3832ee9d..000000000 --- a/doc/manual/source/flow-monitor.rst +++ /dev/null @@ -1,8 +0,0 @@ -Flow Monitor ------------- - -*Placeholder chapter* - -This feature was added as contributed code (``src/contrib``) in *ns-3.6* and to -the main distribution for *ns-3.7*. A paper on this feature is published in the -proceedings of NSTools: ``_. diff --git a/doc/testing/source/how-to-write-tests.rst b/doc/manual/source/how-to-write-tests.rst similarity index 96% rename from doc/testing/source/how-to-write-tests.rst rename to doc/manual/source/how-to-write-tests.rst index 9280a5371..3920c4fce 100644 --- a/doc/testing/source/how-to-write-tests.rst +++ b/doc/manual/source/how-to-write-tests.rst @@ -31,7 +31,7 @@ TestSuite), these things need to be decided up front: separately in src/test/ directory). You will have to edit the wscript file in that directory to compile your new code, if it is a new file. -See the file ``src/test/sample-test-suite.cc`` and corresponding +See the file ``src/template/test/sample-test-suite.cc`` and corresponding wscript file in that directory for a simple example, and see the directories under ``src/test`` for more complicated examples. diff --git a/doc/manual/source/index.rst b/doc/manual/source/index.rst index 92dc3354e..aa235cfb4 100644 --- a/doc/manual/source/index.rst +++ b/doc/manual/source/index.rst @@ -1,15 +1,16 @@ .. only:: html or latex -Welcome to ns-3's manual! -========================= +ns-3 Manual +=========== -This is the *ns-3 manual*. Primary documentation for the ns-3 project is -available in four forms: +This is the *ns-3 Manual*. Primary documentation for the ns-3 project is +available in five forms: * `ns-3 Doxygen `_: Documentation of the public APIs of the simulator * `Tutorial `_ -* `Reference Manual `_: *(this document)* -* `ns-3 wiki `_ +* `Manual `_: *(this document)* +* `Model Library `_ +* `ns-3 wiki `_ This document is written in `reStructuredText `_ for `Sphinx `_ and is maintained in the ``doc/manual`` directory of ns-3's source code. @@ -18,9 +19,15 @@ This document is written in `reStructuredText /build/debug/utils/test-runner --basedir=`pwd` [Thread debugging using libthread_db enabled] - assert failed. file=../src/core/type-id.cc, line=138, cond="uid <= m_information.size () && uid != 0" + assert failed. file=../src/core/model/type-id.cc, line=138, cond="uid <= m_information.size () && uid != 0" ... Here is another example of how to use valgrind to debug a memory problem diff --git a/doc/testing/source/overview.rst b/doc/manual/source/test-overview.rst similarity index 100% rename from doc/testing/source/overview.rst rename to doc/manual/source/test-overview.rst diff --git a/doc/manual/source/tests.rst b/doc/manual/source/tests.rst new file mode 100644 index 000000000..43f502cc4 --- /dev/null +++ b/doc/manual/source/tests.rst @@ -0,0 +1,9 @@ +Tests +----- + +.. toctree:: + + test-overview + test-background + test-framework + how-to-write-tests diff --git a/doc/manual/source/tracing.rst b/doc/manual/source/tracing.rst index d1f4ef6c5..9f138bfb2 100644 --- a/doc/manual/source/tracing.rst +++ b/doc/manual/source/tracing.rst @@ -365,7 +365,7 @@ Pcap Tracing Device Helpers The goal of these helpers is to make it easy to add a consistent pcap trace facility to an |ns3| device. We want all of the various flavors of pcap tracing to work the same across all devices, so the methods of these helpers are -inherited by device helpers. Take a look at ``src/helper/trace-helper.h`` if you +inherited by device helpers. Take a look at ``src/network/helper/trace-helper.h`` if you want to follow the discussion while looking at real code. The class ``PcapHelperForDevice`` is a ``mixin`` provides the high level @@ -515,7 +515,7 @@ Ascii Tracing Device Helpers ++++++++++++++++++++++++++++ The behavior of the ascii trace helper ``mixin`` is substantially similar to -the pcap version. Take a look at ``src/helper/trace-helper.h`` if you want to +the pcap version. Take a look at ``src/network/helper/trace-helper.h`` if you want to follow the discussion while looking at real code. The class ``AsciiTraceHelperForDevice`` adds the high level functionality for @@ -721,7 +721,7 @@ Pcap Tracing Protocol Helpers The goal of these ``mixins`` is to make it easy to add a consistent pcap trace facility to protocols. We want all of the various flavors of pcap tracing to work the same across all protocols, so the methods of these helpers are -inherited by stack helpers. Take a look at ``src/helper/trace-helper.h`` if you +inherited by stack helpers. Take a look at ``src/network/helper/trace-helper.h`` if you want to follow the discussion while looking at real code. In this section we will be illustrating the methods as applied to the protocol @@ -858,7 +858,7 @@ Ascii Tracing Protocol Helpers ++++++++++++++++++++++++++++++ The behavior of the ascii trace helpers is substantially similar to the pcap -case. Take a look at ``src/helper/trace-helper.h`` if you want to follow the +case. Take a look at ``src/network/helper/trace-helper.h`` if you want to follow the discussion while looking at real code. In this section we will be illustrating the methods as applied to the protocol diff --git a/doc/testing/Makefile b/doc/models/Makefile similarity index 53% rename from doc/testing/Makefile rename to doc/models/Makefile index 215b27606..3354b136f 100644 --- a/doc/testing/Makefile +++ b/doc/models/Makefile @@ -2,10 +2,115 @@ EPSTOPDF = epstopdf DIA = dia CONVERT = convert -FIGURES = figures -VPATH = $(FIGURES) +SRC = ../../src +# Temporary source directory, for build +SOURCETEMP = source-temp +FIGURES = $(SOURCETEMP)/figures +# list all model library .rst files that need to be copied to $SOURCETEMP +SOURCES = \ + source/conf.py \ + source/_static \ + source/index.rst \ + source/replace.txt \ + source/organization.rst \ + source/internet-models.rst \ + source/network.rst \ + source/devices.rst \ + source/routing.rst \ + source/emulation-overview.rst \ + source/support.rst \ + $(SRC)/applications/doc/applications.rst \ + $(SRC)/bridge/doc/bridge.rst \ + $(SRC)/click/doc/click.rst \ + $(SRC)/csma/doc/csma.rst \ + $(SRC)/mpi/doc/distributed.rst \ + $(SRC)/energy/doc/energy.rst \ + $(SRC)/emu/doc/emu.rst \ + $(SRC)/tap-bridge/doc/tap.rst \ + $(SRC)/mesh/doc/mesh.rst \ + $(SRC)/lte/doc/lte.rst \ + $(SRC)/lte/doc/lte-user.rst \ + $(SRC)/lte/doc/lte-design.rst \ + $(SRC)/lte/doc/lte-testing.rst \ + $(SRC)/propagation/doc/propagation.rst \ + $(SRC)/network/doc/network-overview.rst \ + $(SRC)/network/doc/packets.rst \ + $(SRC)/network/doc/sockets-api.rst \ + $(SRC)/network/doc/simple.rst \ + $(SRC)/internet/doc/internet-stack.rst \ + $(SRC)/internet/doc/ipv4.rst \ + $(SRC)/internet/doc/ipv6.rst \ + $(SRC)/internet/doc/routing-overview.rst \ + $(SRC)/internet/doc/tcp.rst \ + $(SRC)/openflow/doc/openflow-switch.rst \ + $(SRC)/point-to-point/doc/point-to-point.rst \ + $(SRC)/wifi/doc/wifi.rst \ + $(SRC)/wimax/doc/wimax.rst \ + $(SRC)/uan/doc/uan.rst \ + $(SRC)/stats/doc/statistics.rst \ + $(SRC)/netanim/doc/animation.rst \ + $(SRC)/flow-monitor/doc/flow-monitor.rst \ + +# list all model library figure files that need to be copied to +# $SOURCETEMP/figures. Either a .dia or both a .pdf and .png +SOURCEFIGS = \ + figures/testbed.dia \ + figures/emulated-channel.dia \ + $(SRC)/network/doc/packet.dia \ + $(SRC)/network/doc/node.dia \ + $(SRC)/network/doc/buffer.dia \ + $(SRC)/network/doc/sockets-overview.dia \ + $(SRC)/internet/doc/internet-node-send.dia \ + $(SRC)/internet/doc/internet-node-recv.dia \ + $(SRC)/internet/doc/routing.dia \ + $(SRC)/internet/doc/routing-specialization.dia \ + $(SRC)/wifi/doc/WifiArchitecture.dia \ + $(SRC)/wifi/doc/snir.dia \ + $(SRC)/wimax/doc/WimaxArchitecture.dia \ + $(SRC)/lte/doc/ff-mac-saps.dia \ + $(SRC)/lte/doc/ff-example.dia \ + $(SRC)/lte/doc/lte-enb-architecture.dia \ + $(SRC)/lte/doc/lte-ue-architecture.dia \ + $(SRC)/uan/doc/auvmobility-classes.dia \ + $(SRC)/netanim/doc/animation-dumbbell.png \ + $(SRC)/netanim/doc/animation-dumbbell.pdf \ + +# specify figures for build process (all dia figures) IMAGES_EPS = \ + $(FIGURES)/testbed.eps \ + $(FIGURES)/emulated-channel.eps \ + $(FIGURES)/packet.eps \ + $(FIGURES)/node.eps \ + $(FIGURES)/buffer.eps \ + $(FIGURES)/sockets-overview.eps \ + $(FIGURES)/internet-node-send.eps \ + $(FIGURES)/internet-node-recv.eps \ + $(FIGURES)/routing.eps \ + $(FIGURES)/routing-specialization.eps \ + $(FIGURES)/WifiArchitecture.eps \ + $(FIGURES)/snir.eps \ + $(FIGURES)/WimaxArchitecture.eps \ + $(FIGURES)/ff-mac-saps.eps \ + $(FIGURES)/ff-example.eps \ + $(FIGURES)/lte-enb-architecture.eps \ + $(FIGURES)/lte-ue-architecture.eps \ + $(FIGURES)/auvmobility-classes.eps \ + +# rescale figures as necessary +$(FIGURES)/testbed.pdf_width = 5in +$(FIGURES)/emulated-channel.pdf_width = 6in +$(FIGURES)/node.pdf_width = 5in +$(FIGURES)/packet.pdf_width = 4in +$(FIGURES)/buffer.pdf_width = 15cm +$(FIGURES)/sockets-overview.pdf_width = 10cm +$(FIGURES)/internet-node-send.pdf_width = 5in +$(FIGURES)/internet-node-recv.pdf_width = 5in +$(FIGURES)/routing.pdf_width = 6in +$(FIGURES)/routing-specialization.pdf_width = 5in +$(FIGURES)/snir.pdf_width = 3in +$(FIGURES)/lte-transmission.pdf_width = 3in +$(FIGURES)/auvmobility-classes.pdf_width = 10cm IMAGES_PNG = ${IMAGES_EPS:.eps=.png} IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf} @@ -16,7 +121,6 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) %.png : %.dia; $(DIA) -t png $< -e $@ %.pdf : %.eps; $(EPSTOPDF) $< -o=$@; if test x$($@_width) != x; then TMPFILE=`mktemp`; ./rescale-pdf.sh $($@_width) $@ $${TMPFILE} && mv $${TMPFILE} $@; fi - # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build @@ -26,7 +130,7 @@ BUILDDIR = build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCETEMP) .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest @@ -49,47 +153,54 @@ help: @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" +copy-sources: $(SOURCES) + @rm -rf $(SOURCETEMP) + @mkdir -p $(SOURCETEMP) + @mkdir -p $(FIGURES) + @cp -r $(SOURCES) $(SOURCETEMP) + @cp -r $(SOURCEFIGS) $(FIGURES) + clean: -rm -rf $(BUILDDIR)/* - -rm -rf $(IMAGES) + -rm -rf $(SOURCETEMP) frag: pickle @if test ! -d $(BUILDDIR)/frag; then mkdir $(BUILDDIR)/frag; fi pushd $(BUILDDIR)/frag && ../../pickle-to-xml.py ../pickle/index.fpickle > navigation.xml && popd cp -r $(BUILDDIR)/pickle/_images $(BUILDDIR)/frag -html: $(IMAGES) +html: copy-sources $(IMAGES) $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." -dirhtml: $(IMAGES) +dirhtml: copy-sources $(IMAGES) $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." -singlehtml: $(IMAGES) +singlehtml: copy-sources $(IMAGES) $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." -pickle: $(IMAGES) +pickle: copy-sources $(IMAGES) $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." -json: $(IMAGES) +json: copy-sources $(IMAGES) $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." -htmlhelp: $(IMAGES) +htmlhelp: copy-sources $(IMAGES) $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." -qthelp: $(IMAGES) +qthelp: copy-sources $(IMAGES) $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ @@ -98,7 +209,7 @@ qthelp: $(IMAGES) @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ns-3.qhc" -devhelp: $(IMAGES) +devhelp: copy-sources $(IMAGES) $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @@ -107,46 +218,46 @@ devhelp: $(IMAGES) @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ns-3" @echo "# devhelp" -epub: $(IMAGES) +epub: copy-sources $(IMAGES) $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." -latex: $(IMAGES) +latex: copy-sources $(IMAGES) $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." -latexpdf: $(IMAGES) +latexpdf: copy-sources $(IMAGES) $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." make -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." -text: $(IMAGES) +text: copy-sources $(IMAGES) $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." -man: $(IMAGES) +man: copy-sources $(IMAGES) $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." -changes: $(IMAGES) +changes: copy-sources $(IMAGES) $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." -linkcheck: $(IMAGEs) +linkcheck: copy-sources $(IMAGEs) $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." -doctest: $(IMAGES) +doctest: copy-sources $(IMAGES) $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." diff --git a/doc/manual/figures/emulated-channel.dia b/doc/models/figures/emulated-channel.dia similarity index 100% rename from doc/manual/figures/emulated-channel.dia rename to doc/models/figures/emulated-channel.dia diff --git a/doc/manual/figures/testbed.dia b/doc/models/figures/testbed.dia similarity index 100% rename from doc/manual/figures/testbed.dia rename to doc/models/figures/testbed.dia diff --git a/doc/models/rescale-pdf.sh b/doc/models/rescale-pdf.sh new file mode 100755 index 000000000..748d998ab --- /dev/null +++ b/doc/models/rescale-pdf.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +TMPFILE=`mktemp` + +echo "\documentclass{book} +\usepackage{pdfpages} +\begin{document} +\includepdf[width=${1},fitpaper]{${2}} +\end{document}" >${TMPFILE}.tex +pdflatex -output-directory /tmp ${TMPFILE}.tex >/dev/null 2>/dev/null +cp ${TMPFILE}.pdf ${3} + diff --git a/doc/models/source/README b/doc/models/source/README new file mode 100644 index 000000000..a19caf16e --- /dev/null +++ b/doc/models/source/README @@ -0,0 +1,2 @@ +This directory stores .rst files that are used to build the model library +documentation but that are not stored with a particular module. diff --git a/doc/testing/source/_static/.hidden b/doc/models/source/_static/.hidden similarity index 100% rename from doc/testing/source/_static/.hidden rename to doc/models/source/_static/.hidden diff --git a/doc/testing/source/conf.py b/doc/models/source/conf.py similarity index 97% rename from doc/testing/source/conf.py rename to doc/models/source/conf.py index 0521b3ce5..23a7278ce 100644 --- a/doc/testing/source/conf.py +++ b/doc/models/source/conf.py @@ -41,16 +41,16 @@ master_doc = 'index' # General information about the project. project = u'ns-3' -copyright = u'2010, ns-3 project' +copyright = u'2011, ns-3 project' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = 'ns-3.10' +version = 'ns-3.11' # The full version, including alpha/beta/rc tags. -release = 'ns-3.10' +release = 'ns-3.11' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -178,7 +178,7 @@ htmlhelp_basename = 'ns-3doc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'ns-3.tex', u'ns-3 Testing and Validation', + ('index', 'ns-3-model-library.tex', u'ns-3 Model Library', u'ns-3 project', 'manual'), ] @@ -211,6 +211,6 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'ns-3', u'ns-3 Documentation', + ('index', 'ns-3-model-library', u'ns-3 Model Library', [u'ns-3 project'], 1) ] diff --git a/doc/models/source/devices.rst b/doc/models/source/devices.rst new file mode 100644 index 000000000..249603c2e --- /dev/null +++ b/doc/models/source/devices.rst @@ -0,0 +1,14 @@ +Devices and Channels +-------------------- + +.. toctree:: + + bridge + csma + lte + point-to-point + mesh + wifi + wimax + simple + uan diff --git a/doc/manual/source/emulation-overview.rst b/doc/models/source/emulation-overview.rst similarity index 99% rename from doc/manual/source/emulation-overview.rst rename to doc/models/source/emulation-overview.rst index 3effd4a4c..f418abda3 100644 --- a/doc/manual/source/emulation-overview.rst +++ b/doc/models/source/emulation-overview.rst @@ -69,3 +69,8 @@ channel. We expect the typical use case for this environment will be to analyze the behavior of native applications and protocol suites in the presence of large simulated |ns3| networks. + +.. toctree:: + + emu + tap diff --git a/doc/models/source/index.rst b/doc/models/source/index.rst new file mode 100644 index 000000000..36b28e678 --- /dev/null +++ b/doc/models/source/index.rst @@ -0,0 +1,31 @@ +.. only:: html or latex + +ns-3 Model Library +================== + +This is the *ns-3 Model Library* documentation. Primary documentation for the ns-3 project is +available in five forms: + +* `ns-3 Doxygen `_: Documentation of the public APIs of the simulator +* `Tutorial `_ +* `Manual `_ +* `Model Library `_: *(this document)* +* `ns-3 wiki `_ + +This document is written in `reStructuredText `_ for `Sphinx `_ and is maintained in the +``doc/models`` directory of ns-3's source code. + +.. toctree:: + :maxdepth: 2 + + organization + network + devices + propagation + energy + internet-models + routing + distributed + emulation-overview + applications + support diff --git a/doc/manual/source/internet-models.rst b/doc/models/source/internet-models.rst similarity index 71% rename from doc/manual/source/internet-models.rst rename to doc/models/source/internet-models.rst index cca4c0317..4a68131b6 100644 --- a/doc/manual/source/internet-models.rst +++ b/doc/models/source/internet-models.rst @@ -3,10 +3,8 @@ Internet Models .. toctree:: - sockets-api internet-stack ipv4 ipv6 - routing - click + routing-overview tcp diff --git a/doc/models/source/network.rst b/doc/models/source/network.rst new file mode 100644 index 000000000..6f3373a97 --- /dev/null +++ b/doc/models/source/network.rst @@ -0,0 +1,9 @@ +Network Module +-------------- + +.. toctree:: + + packets + network-overview + sockets-api + simple diff --git a/doc/models/source/organization.rst b/doc/models/source/organization.rst new file mode 100644 index 000000000..c6cfddf5a --- /dev/null +++ b/doc/models/source/organization.rst @@ -0,0 +1,52 @@ +.. include:: replace.txt + +Organization +------------ + +This manual compiles documentation for |ns3| models and supporting +software that enable users to construct network simulations. +It is important to distinguish between **modules** and **models**: + +* |ns3| software is organized into separate *modules* that are each + built as a separate software library. Individual ns-3 programs can link + the modules (libraries) they need to conduct their simulation. + +* |ns3| *models* are abstract representations of real-world objects, + protocols, devices, etc. + +An |ns3| module may consist of more than one model (for instance, the +:mod:`internet` model contains models for both TCP and UDP). In general, +ns-3 models do not span multiple software modules, however. + +This manual provides documentation about the models of |ns3|. It +complements two other sources of documentation concerning models: + +* the model APIs are documented, from a programming perspective, using + `Doxygen `_. Doxygen for ns-3 models is available + `on the project web server `_. + +* the |ns3| core is documented in the developer's manual. |ns3| models make + use of the facilities of the core, such as attributes, default values, + random numbers, test frameworks, etc. Consult the + `main web site `_ to find copies of the manual. + +Finally, additional documentation about various aspects of |ns3| may +exist on the `project wiki `_). + +We organize this model library documentation loosely as follows. +We start with the models found in the ``src/network`` module, as this +module contains some fundamental models for the simulator. +The packet model, models for different address formats, and abstract +base classes for objects such as nodes, net devices, channels, sockets, and +applications are discussed here. + +We next group documentation under the following major headings: + +* Devices and Channels +* Emulation +* Internet Models +* Applications +* Support + +A sample outline of how to write model library documentation can be +found in :mod:`src/template/doc`. diff --git a/doc/testing/source/replace.txt b/doc/models/source/replace.txt similarity index 100% rename from doc/testing/source/replace.txt rename to doc/models/source/replace.txt diff --git a/doc/models/source/routing.rst b/doc/models/source/routing.rst new file mode 100644 index 000000000..b9eb41d0f --- /dev/null +++ b/doc/models/source/routing.rst @@ -0,0 +1,7 @@ +Routing and Switching +--------------------- + +.. toctree:: + + click + openflow-switch diff --git a/doc/models/source/support.rst b/doc/models/source/support.rst new file mode 100644 index 000000000..367c193b3 --- /dev/null +++ b/doc/models/source/support.rst @@ -0,0 +1,8 @@ +Support +------- + +.. toctree:: + + flow-monitor + animation + statistics diff --git a/doc/modules b/doc/modules index c3c419094..f58e8f671 100644 --- a/doc/modules +++ b/doc/modules @@ -1,15 +1,22 @@ /** * @anchor modules_anchor * - * @defgroup simulator Simulator - * The "simulator" module contains: + * @defgroup constructs C++ Constructs Used by All Modules + * \brief These are C++ constructs defined by the modules. + * + * @defgroup constants Constants + * @brief Constants you can change + * + * @defgroup utils Utils + * @brief The utils directory is for various programs and scripts related + * to code coverage, test suites, style checking, and benchmarking. + * + * @defgroup core Core + * \brief The "core" module contains: * - a time management class to hold a time and convert between various time units: ns3::Time * - a scheduler base class used to implement new simulation event schedulers: * ns3::Scheduler and ns3::SchedulerFactory * - a simulator class used to create, schedule and cancel events: ns3::Simulator - * - * @defgroup core Core - * \brief The "core" module contains: * - a Functor class: ns3::Callback * - an os-independent interface to get access to the elapsed wall clock time: ns3::SystemWallClockMs * - a class to register regression tests with the test manager: ns3::Test and ns3::TestManager @@ -23,15 +30,12 @@ * - a configuration class used to set and control all attributes and trace sources * in a simulation: ns3::Config. * - * @defgroup common Common - * The "common" module contains: + * @defgroup network Network + * The "network" module contains: * - a packet class to create and manipulate simulation packets: * ns3::Packet, ns3::Header, and ns3::Trailer. This packet class * also supports per-packet ns3::Tag which are globs of data * which can be attached to any packet. - * - * @defgroup node Node - * The "node" module contains: * - a ns3::Node base class which should be subclassed by any new type of * network Node. * - models which abstract the MAC-layer from the IP layer protocols: @@ -39,31 +43,15 @@ * - models which abstract the application-layer API: ns3::Application, * ns3::Socket, ns3::SocketFactory, and, ns3::Udp * - * - * @defgroup devices Devices - * - * @defgroup internetStack InternetStack + * @defgroup internet Internet * - * The "internet-stack" module contains: + * The "internet" module contains: * - an Ipv4 stack * - an Ipv6 stack * - an ARP module * - a UDP and a TCP implementation * - * @defgroup routing Routing - * - * @defgroup helper Helpers - * * @defgroup applications Applications * * @defgroup mobility Mobility - * - * @defgroup constants Constants - * @brief Constants you can change - * - * @defgroup utils Utils - * @brief The utils directory is for various programs and scripts related - * to code coverage, test suites, style checking, and benchmarking. - * - * @defgroup contrib Contrib */ diff --git a/doc/testing/pickle-to-xml.py b/doc/testing/pickle-to-xml.py deleted file mode 100755 index be3126cf6..000000000 --- a/doc/testing/pickle-to-xml.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/python - - -# output xml format: -# -# zzzlllfile.frag -# ... -# - -import pickle -import os -import codecs - -def dump_pickles(out, dirname, filename, path): - f = open(os.path.join(dirname, filename), 'r') - data = pickle.load(f) - fragment_file = codecs.open(data['current_page_name'] + '.frag', mode='w', encoding='utf-8') - fragment_file.write(data['body']) - fragment_file.close() - out.write(' \n' % path) - out.write(' %s.frag\n' % data['current_page_name']) - if data['prev'] is not None: - out.write(' %s\n' % - (os.path.normpath(os.path.join(path, data['prev']['link'])), - data['prev']['title'])) - if data['next'] is not None: - out.write(' %s\n' % - (os.path.normpath(os.path.join(path, data['next']['link'])), - data['next']['title'])) - out.write(' \n') - f.close() - if data['next'] is not None: - next_path = os.path.normpath(os.path.join(path, data['next']['link'])) - next_filename = os.path.basename(next_path) + '.fpickle' - dump_pickles(out, dirname, next_filename, next_path) - return - -import sys - -sys.stdout.write('\n') -dump_pickles(sys.stdout, os.path.dirname(sys.argv[1]), os.path.basename(sys.argv[1]), '/') -sys.stdout.write('') diff --git a/doc/testing/source/index.rst b/doc/testing/source/index.rst deleted file mode 100644 index 2a9c64011..000000000 --- a/doc/testing/source/index.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. only:: html or latex - -Welcome to ns-3's testing and validation documentation! -======================================================= - -This is the *ns-3 testing manual*. Primary documentation for the ns-3 project is -available in four forms: - -* `ns-3 Doxygen `_: Documentation of the public APIs of the simulator -* `Tutorial `_ -* `Reference Manual `_ -* `ns-3 wiki `_ - -This document is written in `reStructuredText `_ for `Sphinx `_ and is maintained in the -``doc/testing`` directory of ns-3's source code. - -.. toctree:: - :maxdepth: 2 - - overview - background - testing-framework - how-to-write-tests diff --git a/doc/tutorial/source/building-topologies.rst b/doc/tutorial/source/building-topologies.rst index 71b8d4275..3c4666f99 100644 --- a/doc/tutorial/source/building-topologies.rst +++ b/doc/tutorial/source/building-topologies.rst @@ -38,9 +38,12 @@ The actual code begins by loading module include files just as was done in the :: #include "ns3/core-module.h" - #include "ns3/simulator-module.h" - #include "ns3/node-module.h" - #include "ns3/helper-module.h" + #include "ns3/network-module.h" + #include "ns3/csma-module.h" + #include "ns3/internet-module.h" + #include "ns3/point-to-point-module.h" + #include "ns3/applications-module.h" + #include "ns3/ipv4-global-routing-helper.h" One thing that can be surprisingly useful is a small bit of ASCII art that shows a cartoon of the network topology constructed in the example. You will @@ -805,11 +808,12 @@ to the Wifi module and the mobility module which we will discuss below. :: #include "ns3/core-module.h" -#include "ns3/simulator-module.h" -#include "ns3/node-module.h" -#include "ns3/helper-module.h" -#include "ns3/wifi-module.h" -#include "ns3/mobility-module.h" +#include "ns3/network-module.h" +#include "ns3/csma-module.h" +#include "ns3/internet-module.h" +#include "ns3/point-to-point-module.h" +#include "ns3/applications-module.h" +#include "ns3/ipv4-global-routing-helper.h" The network topology illustration follows: diff --git a/doc/tutorial/source/conceptual-overview.rst b/doc/tutorial/source/conceptual-overview.rst index a1cb165c6..06ee0f4a3 100644 --- a/doc/tutorial/source/conceptual-overview.rst +++ b/doc/tutorial/source/conceptual-overview.rst @@ -220,9 +220,10 @@ The code proper starts with a number of include statements. :: #include "ns3/core-module.h" - #include "ns3/simulator-module.h" - #include "ns3/node-module.h" - #include "ns3/helper-module.h" + #include "ns3/network-module.h" + #include "ns3/internet-module.h" + #include "ns3/point-to-point-module.h" + #include "ns3/applications-module.h" To help our high-level script users deal with the large number of include files present in the system, we group includes according to relatively large @@ -835,5 +836,5 @@ you will find (as of this writing) is ``abort.h``. If you click on the contains useful macros for exiting scripts if abnormal conditions are detected. The source code for the helpers we have used in this chapter can be found in the -``src/helper`` directory. Feel free to poke around in the directory tree to +``src/applications/helper`` directory. Feel free to poke around in the directory tree to get a feel for what is there and the style of |ns3| programs. diff --git a/doc/tutorial/source/conf.py b/doc/tutorial/source/conf.py index 41c66bd6e..7c0a9a952 100644 --- a/doc/tutorial/source/conf.py +++ b/doc/tutorial/source/conf.py @@ -178,7 +178,7 @@ htmlhelp_basename = 'ns-3doc' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'ns-3.tex', u'ns-3 Tutorial', + ('index', 'ns-3-tutorial.tex', u'ns-3 Tutorial', u'ns-3 project', 'manual'), ] @@ -211,6 +211,6 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'ns-3', u'ns-3 Tutorial', + ('index', 'ns-3-tutorial', u'ns-3 Tutorial', [u'ns-3 project'], 1) ] diff --git a/doc/tutorial/source/introduction.rst b/doc/tutorial/source/introduction.rst index 1b489a01a..2094ffef4 100644 --- a/doc/tutorial/source/introduction.rst +++ b/doc/tutorial/source/introduction.rst @@ -96,7 +96,6 @@ contribute to |ns3| like they have for ns-2: `_ page, similar to ns-2's popular Contributed Code `page `_; -* ``src/contrib`` directory (we will host your contributed code); * Open `bug tracker `_; * |ns3| developers will gladly help potential contributors to get diff --git a/doc/tutorial/source/tracing.rst b/doc/tutorial/source/tracing.rst index fa1d52400..92e3e43db 100644 --- a/doc/tutorial/source/tracing.rst +++ b/doc/tutorial/source/tracing.rst @@ -556,7 +556,7 @@ are familiar with ``GetObject``, we have asked the system to do the following: We are now at the last Object in the path, so we turn our attention to the Attributes of that Object. The ``MobilityModel`` class defines an Attribute called "CourseChange". You can see this by looking at the source code in -``src/mobility/mobility-model.cc`` and searching for "CourseChange" in your +``src/mobility/model/mobility-model.cc`` and searching for "CourseChange" in your favorite editor. You should find, :: @@ -931,7 +931,7 @@ by looking at the includes in ``mobility-model.h`` and noticing the include of ``traced-callback.h`` and inferring that this must be the file you want. -In either case, the next step is to take a look at ``src/core/traced-callback.h`` +In either case, the next step is to take a look at ``src/core/model/traced-callback.h`` in your favorite editor to see what is happening. You will see a comment at the top of the file that should be comforting: @@ -1091,7 +1091,7 @@ Earlier in this section, we presented a simple piece of code that used a ``TracedValue`` to demonstrate the basics of the tracing code. We just glossed over the way to find the return type and formal arguments for the ``TracedValue``. Rather than go through the whole exercise, we -will just point you at the correct file, ``src/core/traced-value.h`` and +will just point you at the correct file, ``src/core/model/traced-value.h`` and to the important piece of code: :: @@ -1178,8 +1178,8 @@ through the list, you will eventually find: CongestionWindow: The TCP connection's congestion window It turns out that the |ns3| TCP implementation lives (mostly) in the -file ``src/internet-stack/tcp-socket-base.cc`` while congestion control -variants are in files such as ``src/internet-stack/tcp-newreno.cc``. +file ``src/internet/model/tcp-socket-base.cc`` while congestion control +variants are in files such as ``src/internet/model/tcp-newreno.cc``. If you don't know this a priori, you can use the recursive grep trick: :: @@ -1188,7 +1188,7 @@ If you don't know this a priori, you can use the recursive grep trick: You will find page after page of instances of tcp pointing you to that file. -If you open ``src/internet-stack/tcp-newreno.cc`` in your favorite +If you open ``src/internet/model/tcp-newreno.cc`` in your favorite editor, you will see right up at the top of the file, the following declarations: :: @@ -1207,7 +1207,7 @@ editor, you will see right up at the top of the file, the following declarations } This should tell you to look for the declaration of ``m_cWnd`` in the header -file ``src/internet-stack/tcp-newreno.h``. If you open this file in your +file ``src/internet/model/tcp-newreno.h``. If you open this file in your favorite editor, you will find: :: @@ -1339,10 +1339,10 @@ favorite editor. You should see some familiar looking code: #include #include "ns3/core-module.h" - #include "ns3/common-module.h" - #include "ns3/simulator-module.h" - #include "ns3/node-module.h" - #include "ns3/helper-module.h" + #include "ns3/network-module.h" + #include "ns3/internet-module.h" + #include "ns3/point-to-point-module.h" + #include "ns3/applications-module.h" using namespace ns3; @@ -1424,7 +1424,7 @@ we put together to allow the ``Socket`` to be created at configuration time. }; You can see that this class inherits from the |ns3| ``Application`` -class. Take a look at ``src/node/application.h`` if you are interested in +class. Take a look at ``src/network/model/application.h`` if you are interested in what is inherited. The ``MyApp`` class is obligated to override the ``StartApplication`` and ``StopApplication`` methods. These methods are automatically called when ``MyApp`` is required to start and stop sending @@ -1451,7 +1451,7 @@ This is done as the result of the following (hopefully) familar lines of an apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); -The application container code (see ``src/helper/application-container.h`` if +The application container code (see ``src/network/helper/application-container.h`` if you are interested) loops through its contained applications and calls, :: @@ -1482,7 +1482,7 @@ ignore the implementation details of how your ``Application`` is "automagically" called by the simulator at the correct time. But since we have already ventured deep into |ns3| already, let's go for it. -If you look at ``src/node/application.cc`` you will find that the +If you look at ``src/network/model/application.cc`` you will find that the ``SetStartTime`` method of an ``Application`` just sets the member variable ``m_startTime`` and the ``SetStopTime`` method just sets ``m_stopTime``. From there, without some hints, the trail will probably @@ -1492,7 +1492,7 @@ The key to picking up the trail again is to know that there is a global list of all of the nodes in the system. Whenever you create a node in a simulation, a pointer to that node is added to the global ``NodeList``. -Take a look at ``src/node/node-list.cc`` and search for +Take a look at ``src/network/model/node-list.cc`` and search for ``NodeList::Add``. The public static implementation calls into a private implementation called ``NodeListPriv::Add``. This is a relatively common idom in |ns3|. So, take a look at ``NodeListPriv::Add``. There @@ -1512,13 +1512,13 @@ to start doing something. So, ``NodeList::Add`` indirectly schedules a call to ``Node::Start`` at time zero to advise a new node that the simulation has started. If you -look in ``src/node/node.h`` you will, however, not find a method called +look in ``src/network/model/node.h`` you will, however, not find a method called ``Node::Start``. It turns out that the ``Start`` method is inherited from class ``Object``. All objects in the system can be notified when the simulation starts, and objects of class ``Node`` are just one kind of those objects. -Take a look at ``src/core/object.cc`` next and search for ``Object::Start``. +Take a look at ``src/core/model/object.cc`` next and search for ``Object::Start``. This code is not as straightforward as you might have expected since |ns3| ``Objects`` support aggregation. The code in ``Object::Start`` then loops through all of the objects that have been @@ -1530,7 +1530,7 @@ something like ``MethodName`` for the public API and ``DoMethodName`` for the private API. This tells us that we should look for a ``Node::DoStart`` method in -``src/node/node.cc`` for the method that will continue our trail. If you +``src/network/model/node.cc`` for the method that will continue our trail. If you locate the code, you will find a method that loops through all of the devices in the node and then all of the applications in the node calling ``device->Start`` and ``application->Start`` respectively. @@ -1538,7 +1538,7 @@ in the node and then all of the applications in the node calling You may already know that classes ``Device`` and ``Application`` both inherit from class ``Object`` and so the next step will be to look at what happens when ``Application::DoStart`` is called. Take a look at -``src/node/application.cc`` and you will find: +``src/network/model/application.cc`` and you will find: :: @@ -1766,9 +1766,9 @@ add an error model to this code also, so we wanted to demonstrate this working. This trace sink will be connected to the "PhyRxDrop" trace source of the point-to-point NetDevice. This trace source fires when a packet is dropped by the physical layer of a ``NetDevice``. If you take a small detour to the -source (``src/devices/point-to-point/point-to-point-net-device.cc``) you will +source (``src/point-to-point/model/point-to-point-net-device.cc``) you will see that this trace source refers to ``PointToPointNetDevice::m_phyRxDropTrace``. -If you then look in ``src/devices/point-to-point/point-to-point-net-device.h`` +If you then look in ``src/point-to-point/model/point-to-point-net-device.h`` for this member variable, you will find that it is declared as a ``TracedCallback >``. This should tell you that the callback target should be a function that returns void and takes a single @@ -2138,7 +2138,7 @@ is going to contain packets prefixed with point to point headers. This is true since the packets are coming from our point-to-point device driver. Other common data link types are DLT_EN10MB (10 MB Ethernet) appropriate for csma devices and DLT_IEEE802_11 (IEEE 802.11) appropriate for wifi devices. These -are defined in ``src/helper/trace-helper.h"`` if you are interested in seeing +are defined in ``src/network/helper/trace-helper.h"`` if you are interested in seeing the list. The entries in the list match those in ``bpf.h`` but we duplicate them to avoid a pcap source dependence. @@ -2161,7 +2161,7 @@ pointer to a reference counted object that is a very lightweight thing. Remember to always look at the object you are referencing before making any assumptions about the "powers" that object may have. -For example, take a look at ``src/common/pcap-file-object.h`` in the +For example, take a look at ``src/network/model/pcap-file-object.h`` in the distribution and notice, :: @@ -2169,7 +2169,7 @@ distribution and notice, class PcapFileWrapper : public Object that class ``PcapFileWrapper`` is an |ns3| Object by virtue of -its inheritance. Then look at ``src/common/output-stream-wrapper.h`` and +its inheritance. Then look at ``src/network/model/output-stream-wrapper.h`` and notice, :: @@ -2327,7 +2327,7 @@ The goal of these helpers is to make it easy to add a consistent pcap trace facility to an |ns3| device. We want all of the various flavors of pcap tracing to work the same across all devices, so the methods of these helpers are inherited by device helpers. Take a look at -``src/helper/trace-helper.h`` if you want to follow the discussion while +``src/network/helper/trace-helper.h`` if you want to follow the discussion while looking at real code. The class ``PcapHelperForDevice`` is a ``mixin`` provides the high level @@ -2500,7 +2500,7 @@ Ascii Tracing Device Helpers ++++++++++++++++++++++++++++ The behavior of the ascii trace helper ``mixin`` is substantially similar to -the pcap version. Take a look at ``src/helper/trace-helper.h`` if you want to +the pcap version. Take a look at ``src/network/helper/trace-helper.h`` if you want to follow the discussion while looking at real code. The class ``AsciiTraceHelperForDevice`` adds the high level functionality for @@ -2743,7 +2743,7 @@ Pcap Tracing Protocol Helpers The goal of these ``mixins`` is to make it easy to add a consistent pcap trace facility to protocols. We want all of the various flavors of pcap tracing to work the same across all protocols, so the methods of these helpers are -inherited by stack helpers. Take a look at ``src/helper/trace-helper.h`` +inherited by stack helpers. Take a look at ``src/network/helper/trace-helper.h`` if you want to follow the discussion while looking at real code. In this section we will be illustrating the methods as applied to the protocol @@ -2909,7 +2909,7 @@ Ascii Tracing Protocol Helpers ++++++++++++++++++++++++++++++ The behavior of the ascii trace helpers is substantially similar to the pcap -case. Take a look at ``src/helper/trace-helper.h`` if you want to +case. Take a look at ``src/network/helper/trace-helper.h`` if you want to follow the discussion while looking at real code. In this section we will be illustrating the methods as applied to the protocol diff --git a/doc/tutorial/source/tweaking.rst b/doc/tutorial/source/tweaking.rst index 499636895..bccb884b2 100644 --- a/doc/tutorial/source/tweaking.rst +++ b/doc/tutorial/source/tweaking.rst @@ -408,7 +408,7 @@ in the following code, :: - int + int main (int argc, char *argv[]) { ... diff --git a/examples/energy/energy-model-example.cc b/examples/energy/energy-model-example.cc index bb262c765..5730b0726 100644 --- a/examples/energy/energy-model-example.cc +++ b/examples/energy/energy-model-example.cc @@ -51,8 +51,11 @@ ReceivePacket (Ptr socket) { InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (from); NS_LOG_UNCOND ("--\nReceived one packet! Socket: "<< iaddr.GetIpv4 () - << " port: " << iaddr.GetPort () << " at time = " << + << " port: " << iaddr.GetPort () << " at time = " << Simulator::Now ().GetSeconds () << "\n--"); + //cast iaddr to void, to suppress 'iaddr' set but not used compiler warning + //in optimized builds + (void) iaddr; } } } @@ -68,13 +71,13 @@ ReceivePacket (Ptr socket) */ static void GenerateTraffic (Ptr socket, uint32_t pktSize, Ptr n, - uint32_t pktCount, Time pktInterval) + uint32_t pktCount, Time pktInterval) { if (pktCount > 0) { socket->Send (Create (pktSize)); Simulator::Schedule (pktInterval, &GenerateTraffic, socket, pktSize, n, - pktCount - 1, pktInterval); + pktCount - 1, pktInterval); } else { diff --git a/examples/error-model/simple-error-model.cc b/examples/error-model/simple-error-model.cc index 4ba61d96e..3f5afaf3b 100644 --- a/examples/error-model/simple-error-model.cc +++ b/examples/error-model/simple-error-model.cc @@ -59,7 +59,7 @@ main (int argc, char *argv[]) // Set a few attributes Config::SetDefault ("ns3::RateErrorModel::ErrorRate", DoubleValue (0.01)); Config::SetDefault ("ns3::RateErrorModel::ErrorUnit", StringValue ("EU_PKT")); - + Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210)); Config::SetDefault ("ns3::OnOffApplication::DataRate", DataRateValue (DataRate ("448kb/s"))); @@ -93,13 +93,13 @@ main (int argc, char *argv[]) p2p.SetDeviceAttribute ("DataRate", DataRateValue (DataRate (1500000))); p2p.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (10))); NetDeviceContainer d3d2 = p2p.Install (n3n2); - - // Later, we add IP addresses. + + // Later, we add IP addresses. NS_LOG_INFO ("Assign IP Addresses."); Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.0"); ipv4.Assign (d0d2); - + ipv4.SetBase ("10.1.2.0", "255.255.255.0"); Ipv4InterfaceContainer i1i2 = ipv4.Assign (d1d2); @@ -115,7 +115,7 @@ main (int argc, char *argv[]) uint16_t port = 9; // Discard port (RFC 863) OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (i3i2.GetAddress (1), port))); + Address (InetSocketAddress (i3i2.GetAddress (1), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable(1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable(0))); @@ -125,7 +125,7 @@ main (int argc, char *argv[]) // Create an optional packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (c.Get (2)); apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); @@ -150,7 +150,7 @@ main (int argc, char *argv[]) // Create an ErrorModel based on the implementation (constructor) // specified by the default classId Ptr em = CreateObjectWithAttributes ("RanVar", RandomVariableValue (UniformVariable (0.0, 1.0)), - "ErrorRate", DoubleValue (0.001)); + "ErrorRate", DoubleValue (0.001)); d3d2.Get (0)->SetAttribute ("ReceiveErrorModel", PointerValue (em)); // Now, let's use the ListErrorModel and explicitly force a loss @@ -168,7 +168,7 @@ main (int argc, char *argv[]) p2p.EnablePcapAll ("simple-error-model"); NS_LOG_INFO ("Run Simulation."); - Simulator::Run (); + Simulator::Run (); Simulator::Destroy (); NS_LOG_INFO ("Done."); } diff --git a/examples/ipv6/fragmentation-ipv6.cc b/examples/ipv6/fragmentation-ipv6.cc index ad448efee..b80fc449e 100644 --- a/examples/ipv6/fragmentation-ipv6.cc +++ b/examples/ipv6/fragmentation-ipv6.cc @@ -82,10 +82,10 @@ public: { route = routing->GetRoute (i); std::cout << route.GetDest () << "\t" - << route.GetGateway () << "\t" - << route.GetInterface () << "\t" - << route.GetPrefixToUse () << "\t" - << std::endl; + << route.GetGateway () << "\t" + << route.GetInterface () << "\t" + << route.GetPrefixToUse () << "\t" + << std::endl; } } }; diff --git a/examples/ipv6/icmpv6-redirect.cc b/examples/ipv6/icmpv6-redirect.cc index b8ea39190..7d9aaf4f5 100644 --- a/examples/ipv6/icmpv6-redirect.cc +++ b/examples/ipv6/icmpv6-redirect.cc @@ -82,10 +82,10 @@ public: { route = routing->GetRoute (i); std::cout << route.GetDest () << "\t" - << route.GetGateway () << "\t" - << route.GetInterface () << "\t" - << route.GetPrefixToUse () << "\t" - << std::endl; + << route.GetGateway () << "\t" + << route.GetInterface () << "\t" + << route.GetPrefixToUse () << "\t" + << std::endl; } } diff --git a/examples/ipv6/loose-routing-ipv6.cc b/examples/ipv6/loose-routing-ipv6.cc index 9b636fdaa..0e1c79cf6 100644 --- a/examples/ipv6/loose-routing-ipv6.cc +++ b/examples/ipv6/loose-routing-ipv6.cc @@ -33,8 +33,8 @@ // // +------------+ | | | // // | Host 1 |--| | +------------+ | // // [------------] |---| Router 3 |---| -// // [------------] -// // +// // [------------] +// // // // // // - Tracing of queues and packet receptions to file "loose-routing-ipv6.tr" diff --git a/examples/ipv6/ping6.cc b/examples/ipv6/ping6.cc index 91c967772..7e3425b17 100644 --- a/examples/ipv6/ping6.cc +++ b/examples/ipv6/ping6.cc @@ -20,7 +20,7 @@ // Network topology // -// n0 n1 +// n0 n1 // | | // ================= // LAN diff --git a/examples/ipv6/radvd-two-prefix.cc b/examples/ipv6/radvd-two-prefix.cc index 42bf13ce8..669c37835 100644 --- a/examples/ipv6/radvd-two-prefix.cc +++ b/examples/ipv6/radvd-two-prefix.cc @@ -89,10 +89,10 @@ public: { route = routing->GetRoute (i); std::cout << route.GetDest () << "\t" - << route.GetGateway () << "\t" - << route.GetInterface () << "\t" - << route.GetPrefixToUse () << "\t" - << std::endl; + << route.GetGateway () << "\t" + << route.GetInterface () << "\t" + << route.GetPrefixToUse () << "\t" + << std::endl; } } }; diff --git a/examples/matrix-topology/matrix-topology.cc b/examples/matrix-topology/matrix-topology.cc index d61b03c2d..d82a2bf31 100644 --- a/examples/matrix-topology/matrix-topology.cc +++ b/examples/matrix-topology/matrix-topology.cc @@ -278,7 +278,7 @@ int main (int argc, char *argv[]) bool animEnabled = false; AnimationInterface anim; if (anim.SetServerPort (9) && anim.SetOutputFile (anim_name.c_str ())) - { + { NS_LOG_INFO ("Animation Interface Enabled."); animEnabled = true; anim.StartAnimation (); diff --git a/examples/realtime/realtime-udp-echo.cc b/examples/realtime/realtime-udp-echo.cc index d47aeab91..08ac9be61 100644 --- a/examples/realtime/realtime-udp-echo.cc +++ b/examples/realtime/realtime-udp-echo.cc @@ -50,7 +50,7 @@ main (int argc, char *argv[]) // that. // GlobalValue::Bind ("SimulatorImplementationType", - StringValue ("ns3::RealtimeSimulatorImpl")); + StringValue ("ns3::RealtimeSimulatorImpl")); // // Explicitly create the nodes required by the topology (shown above). diff --git a/examples/routing/dynamic-global-routing.cc b/examples/routing/dynamic-global-routing.cc index 23fbea7ba..84d560ec7 100644 --- a/examples/routing/dynamic-global-routing.cc +++ b/examples/routing/dynamic-global-routing.cc @@ -50,7 +50,7 @@ // keeps the point-to-point link "up" from n1's perspective). Traffic will // flow through the path n1-n2-n5-n6 // At time 8s, bring the interface back up. Path n1-n6 is restored -// At time 10s, stop the first flow. +// At time 10s, stop the first flow. // At time 11s, start a new flow, but to n6's other IP address (the one // on the n1/n6 p2p link) // At time 12s, bring the n1 interface down between n1 and n6. Packets @@ -58,7 +58,7 @@ // At time 14s, re-enable the n1/n6 interface to up. This will change // routing back to n1-n6 since the interface up notification will cause // a new local interface route, at higher priority than global routing -// At time 16s, stop the second flow. +// At time 16s, stop the second flow. // - Tracing of queues and packet receptions to file "dynamic-global-routing.tr" @@ -122,8 +122,8 @@ main (int argc, char *argv[]) csma.SetChannelAttribute ("DataRate", StringValue ("5Mbps")); csma.SetChannelAttribute ("Delay", StringValue ("2ms")); NetDeviceContainer d2345 = csma.Install (n2345); - - // Later, we add IP addresses. + + // Later, we add IP addresses. NS_LOG_INFO ("Assign IP Addresses."); Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.0"); @@ -163,7 +163,7 @@ main (int argc, char *argv[]) // Create a second OnOff application to send UDP datagrams of size // 210 bytes at a rate of 448 Kb/s OnOffHelper onoff2 ("ns3::UdpSocketFactory", - InetSocketAddress (i1i6.GetAddress (1), port)); + InetSocketAddress (i1i6.GetAddress (1), port)); onoff2.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff2.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff2.SetAttribute ("DataRate", StringValue ("2kbps")); @@ -175,13 +175,13 @@ main (int argc, char *argv[]) // Create an optional packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (c.Get (6)); apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); PacketSinkHelper sink2 ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps2 = sink2.Install (c.Get (6)); apps2.Start (Seconds (11.0)); apps2.Stop (Seconds (16.0)); diff --git a/examples/routing/global-injection-slash32.cc b/examples/routing/global-injection-slash32.cc index 3f0764065..87e8e0174 100644 --- a/examples/routing/global-injection-slash32.cc +++ b/examples/routing/global-injection-slash32.cc @@ -69,7 +69,7 @@ main (int argc, char *argv[]) Ipv4ListRoutingHelper staticonly; Ipv4ListRoutingHelper staticRouting; staticonly.Add(staticRouting, 0); - internet.SetRoutingHelper(staticonly); + internet.SetRoutingHelper(staticonly); // has effect on the next Install () internet.Install(NodeContainer(nC)); // We create the channels first without any IP addressing information @@ -79,7 +79,7 @@ main (int argc, char *argv[]) NetDeviceContainer dAdB = p2p.Install (nAnB); NetDeviceContainer dBdC = p2p.Install (nBnC);; - + Ptr deviceA = CreateObject (); deviceA->SetAddress (Mac48Address::Allocate ()); nA->AddDevice (deviceA); @@ -88,7 +88,7 @@ main (int argc, char *argv[]) deviceC->SetAddress (Mac48Address::Allocate ()); nC->AddDevice (deviceC); - // Later, we add IP addresses. + // Later, we add IP addresses. Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.252"); Ipv4InterfaceContainer iAiB = ipv4.Assign (dAdB); @@ -99,10 +99,10 @@ main (int argc, char *argv[]) Ptr ipv4A = nA->GetObject (); Ptr ipv4B = nB->GetObject (); Ptr ipv4C = nC->GetObject (); - + int32_t ifIndexA = ipv4A->AddInterface (deviceA); int32_t ifIndexC = ipv4C->AddInterface (deviceC); - + Ipv4InterfaceAddress ifInAddrA = Ipv4InterfaceAddress (Ipv4Address ("172.16.1.1"), Ipv4Mask ("255.255.255.255")); ipv4A->AddAddress (ifIndexA, ifInAddrA); ipv4A->SetMetric (ifIndexA, 1); @@ -115,7 +115,7 @@ main (int argc, char *argv[]) // Create router nodes, initialize routing database and set up the routing // tables in the nodes. - + // Populate routing tables for nodes nA and nB Ipv4GlobalRoutingHelper::PopulateRoutingTables (); // Inject global routes from Node B, including transit network... @@ -123,19 +123,19 @@ main (int argc, char *argv[]) globalRouterB->InjectRoute ("10.1.1.4", "255.255.255.252"); // ...and the host in network "C" globalRouterB->InjectRoute ("192.168.1.1", "255.255.255.255"); - + Ipv4GlobalRoutingHelper::RecomputeRoutingTables(); // In addition, nB needs a static route to nC so it knows what to do with stuff // going to 192.168.1.1 Ipv4StaticRoutingHelper ipv4RoutingHelper; Ptr staticRoutingB = ipv4RoutingHelper.GetStaticRouting(ipv4B); staticRoutingB->AddHostRouteTo (Ipv4Address ("192.168.1.1"), Ipv4Address ("10.1.1.6"),2); - + // Create the OnOff application to send UDP datagrams of size // 210 bytes at a rate of 448 Kb/s uint16_t port = 9; // Discard port (RFC 863) OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (ifInAddrC.GetLocal(), port))); + Address (InetSocketAddress (ifInAddrC.GetLocal(), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000))); @@ -145,7 +145,7 @@ main (int argc, char *argv[]) // Create a packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (nC); apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); diff --git a/examples/routing/global-routing-slash32.cc b/examples/routing/global-routing-slash32.cc index 7b7b90cea..c237dfe4f 100644 --- a/examples/routing/global-routing-slash32.cc +++ b/examples/routing/global-routing-slash32.cc @@ -65,7 +65,7 @@ main (int argc, char *argv[]) NetDeviceContainer dAdB = p2p.Install (nAnB); NetDeviceContainer dBdC = p2p.Install (nBnC);; - + Ptr deviceA = CreateObject (); deviceA->SetAddress (Mac48Address::Allocate ()); nA->AddDevice (deviceA); @@ -74,7 +74,7 @@ main (int argc, char *argv[]) deviceC->SetAddress (Mac48Address::Allocate ()); nC->AddDevice (deviceC); - // Later, we add IP addresses. + // Later, we add IP addresses. Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.252"); Ipv4InterfaceContainer iAiB = ipv4.Assign (dAdB); @@ -84,10 +84,10 @@ main (int argc, char *argv[]) Ptr ipv4A = nA->GetObject (); Ptr ipv4C = nC->GetObject (); - + int32_t ifIndexA = ipv4A->AddInterface (deviceA); int32_t ifIndexC = ipv4C->AddInterface (deviceC); - + Ipv4InterfaceAddress ifInAddrA = Ipv4InterfaceAddress (Ipv4Address ("172.16.1.1"), Ipv4Mask ("255.255.255.255")); ipv4A->AddAddress (ifIndexA, ifInAddrA); ipv4A->SetMetric (ifIndexA, 1); @@ -106,7 +106,7 @@ main (int argc, char *argv[]) // 210 bytes at a rate of 448 Kb/s uint16_t port = 9; // Discard port (RFC 863) OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (ifInAddrC.GetLocal(), port))); + Address (InetSocketAddress (ifInAddrC.GetLocal(), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000))); @@ -116,7 +116,7 @@ main (int argc, char *argv[]) // Create a packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (nC); apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); diff --git a/examples/routing/mixed-global-routing.cc b/examples/routing/mixed-global-routing.cc index 02f7bb50f..99cf8e35a 100644 --- a/examples/routing/mixed-global-routing.cc +++ b/examples/routing/mixed-global-routing.cc @@ -87,8 +87,8 @@ main (int argc, char *argv[]) csma.SetChannelAttribute ("DataRate", StringValue ("5Mbps")); csma.SetChannelAttribute ("Delay", StringValue ("2ms")); NetDeviceContainer d2345 = csma.Install (n2345); - - // Later, we add IP addresses. + + // Later, we add IP addresses. NS_LOG_INFO ("Assign IP Addresses."); Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.0"); diff --git a/examples/routing/simple-alternate-routing.cc b/examples/routing/simple-alternate-routing.cc index 19b68add8..2c0b185e3 100644 --- a/examples/routing/simple-alternate-routing.cc +++ b/examples/routing/simple-alternate-routing.cc @@ -109,17 +109,17 @@ main (int argc, char *argv[]) InternetStackHelper internet; internet.Install (c); - + // Later, we add IP addresses. The middle two octets correspond to - // the channel number. + // the channel number. NS_LOG_INFO ("Assign IP Addresses."); Ipv4AddressHelper ipv4; ipv4.SetBase ("10.0.0.0", "255.255.255.0"); ipv4.Assign (d0d2); - + ipv4.SetBase ("10.1.1.0", "255.255.255.0"); Ipv4InterfaceContainer i1i2 = ipv4.Assign (d1d2); - + ipv4.SetBase ("10.2.2.0", "255.255.255.0"); ipv4.Assign (d3d2); @@ -139,7 +139,7 @@ main (int argc, char *argv[]) // Create a flow from n3 to n1, starting at time 1.1 seconds OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (i1i2.GetAddress (0), port))); + Address (InetSocketAddress (i1i2.GetAddress (0), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); @@ -149,7 +149,7 @@ main (int argc, char *argv[]) // Create a packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (c.Get (1)); apps.Start (Seconds (1.1)); apps.Stop (Seconds (10.0)); diff --git a/examples/routing/simple-global-routing.cc b/examples/routing/simple-global-routing.cc index 664f1400c..915e60f30 100644 --- a/examples/routing/simple-global-routing.cc +++ b/examples/routing/simple-global-routing.cc @@ -64,7 +64,7 @@ main (int argc, char *argv[]) Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210)); Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s")); - //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30); + //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30); // Allow the user to override any of the defaults and the above // DefaultValue::Bind ()s at run-time, via command-line arguments @@ -93,12 +93,12 @@ main (int argc, char *argv[]) NetDeviceContainer d0d2 = p2p.Install (n0n2); NetDeviceContainer d1d2 = p2p.Install (n1n2); - + p2p.SetDeviceAttribute ("DataRate", StringValue ("1500kbps")); p2p.SetChannelAttribute ("Delay", StringValue ("10ms")); NetDeviceContainer d3d2 = p2p.Install (n3n2); - - // Later, we add IP addresses. + + // Later, we add IP addresses. NS_LOG_INFO ("Assign IP Addresses."); Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.0"); @@ -106,7 +106,7 @@ main (int argc, char *argv[]) ipv4.SetBase ("10.1.2.0", "255.255.255.0"); Ipv4InterfaceContainer i1i2 = ipv4.Assign (d1d2); - + ipv4.SetBase ("10.1.3.0", "255.255.255.0"); Ipv4InterfaceContainer i3i2 = ipv4.Assign (d3d2); @@ -119,7 +119,7 @@ main (int argc, char *argv[]) NS_LOG_INFO ("Create Applications."); uint16_t port = 9; // Discard port (RFC 863) OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (i3i2.GetAddress (0), port))); + Address (InetSocketAddress (i3i2.GetAddress (0), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); ApplicationContainer apps = onoff.Install (c.Get (0)); @@ -128,14 +128,14 @@ main (int argc, char *argv[]) // Create a packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (c.Get (3)); apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); // Create a similar flow from n3 to n1, starting at time 1.1 seconds onoff.SetAttribute ("Remote", - AddressValue (InetSocketAddress (i1i2.GetAddress (0), port))); + AddressValue (InetSocketAddress (i1i2.GetAddress (0), port))); apps = onoff.Install (c.Get (3)); apps.Start (Seconds (1.1)); apps.Stop (Seconds (10.0)); @@ -155,7 +155,7 @@ main (int argc, char *argv[]) { FlowMonitorHelper flowmonHelper; flowmon = flowmonHelper.InstallAll (); - } + } NS_LOG_INFO ("Run Simulation."); Simulator::Stop (Seconds (11)); diff --git a/examples/routing/simple-routing-ping6.cc b/examples/routing/simple-routing-ping6.cc index ed338253b..0a707fe1c 100644 --- a/examples/routing/simple-routing-ping6.cc +++ b/examples/routing/simple-routing-ping6.cc @@ -83,10 +83,10 @@ public: { route = routing->GetRoute (i); std::cout << route.GetDest () << "\t" - << route.GetGateway () << "\t" - << route.GetInterface () << "\t" - << route.GetPrefixToUse () << "\t" - << std::endl; + << route.GetGateway () << "\t" + << route.GetInterface () << "\t" + << route.GetPrefixToUse () << "\t" + << std::endl; } } }; diff --git a/examples/routing/static-routing-slash32.cc b/examples/routing/static-routing-slash32.cc index 13455432f..d78d2ddf4 100644 --- a/examples/routing/static-routing-slash32.cc +++ b/examples/routing/static-routing-slash32.cc @@ -65,7 +65,7 @@ main (int argc, char *argv[]) NetDeviceContainer dAdB = p2p.Install (nAnB); NetDeviceContainer dBdC = p2p.Install (nBnC);; - + Ptr deviceA = CreateObject (); deviceA->SetAddress (Mac48Address::Allocate ()); nA->AddDevice (deviceA); @@ -74,7 +74,7 @@ main (int argc, char *argv[]) deviceC->SetAddress (Mac48Address::Allocate ()); nC->AddDevice (deviceC); - // Later, we add IP addresses. + // Later, we add IP addresses. Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.252"); Ipv4InterfaceContainer iAiB = ipv4.Assign (dAdB); @@ -85,10 +85,10 @@ main (int argc, char *argv[]) Ptr ipv4A = nA->GetObject (); Ptr ipv4B = nB->GetObject (); Ptr ipv4C = nC->GetObject (); - + int32_t ifIndexA = ipv4A->AddInterface (deviceA); int32_t ifIndexC = ipv4C->AddInterface (deviceC); - + Ipv4InterfaceAddress ifInAddrA = Ipv4InterfaceAddress (Ipv4Address ("172.16.1.1"), Ipv4Mask ("/32")); ipv4A->AddAddress (ifIndexA, ifInAddrA); ipv4A->SetMetric (ifIndexA, 1); @@ -111,7 +111,7 @@ main (int argc, char *argv[]) // 210 bytes at a rate of 448 Kb/s uint16_t port = 9; // Discard port (RFC 863) OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (ifInAddrC.GetLocal (), port))); + Address (InetSocketAddress (ifInAddrC.GetLocal (), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000))); @@ -121,7 +121,7 @@ main (int argc, char *argv[]) // Create a packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (nC); apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); diff --git a/examples/socket/socket-bound-static-routing.cc b/examples/socket/socket-bound-static-routing.cc index 037a38e02..9226402c8 100644 --- a/examples/socket/socket-bound-static-routing.cc +++ b/examples/socket/socket-bound-static-routing.cc @@ -22,7 +22,7 @@ | 10.20.1.0/24 DSTRTR 10.10.1.0/24 / \ 10.10.2.0/24 - / \ + / \ Rtr1 Rtr2 10.1.1.0/24 | | 10.1.2.0/24 | / @@ -65,7 +65,7 @@ main (int argc, char *argv[]) Ptr nRtr1 = CreateObject (); Ptr nRtr2 = CreateObject (); Ptr nDstRtr = CreateObject (); - + NodeContainer c = NodeContainer (nSrc, nDst, nRtr1, nRtr2, nDstRtr); InternetStackHelper internet; @@ -77,7 +77,7 @@ main (int argc, char *argv[]) NodeContainer nRtr1nDstRtr = NodeContainer (nRtr1, nDstRtr); NodeContainer nRtr2nDstRtr = NodeContainer (nRtr2, nDstRtr); NodeContainer nDstRtrnDst = NodeContainer (nDstRtr, nDst); - + // We create the channels first without any IP addressing information PointToPointHelper p2p; p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); @@ -87,11 +87,11 @@ main (int argc, char *argv[]) NetDeviceContainer dRtr1dDstRtr = p2p.Install (nRtr1nDstRtr); NetDeviceContainer dRtr2dDstRtr = p2p.Install (nRtr2nDstRtr); NetDeviceContainer dDstRtrdDst = p2p.Install (nDstRtrnDst); - + Ptr SrcToRtr1=dSrcdRtr1.Get (0); Ptr SrcToRtr2=dSrcdRtr2.Get (0); - - // Later, we add IP addresses. + + // Later, we add IP addresses. Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.0"); Ipv4InterfaceContainer iSrciRtr1 = ipv4.Assign (dSrcdRtr1); @@ -109,7 +109,7 @@ main (int argc, char *argv[]) Ptr ipv4Rtr2 = nRtr2->GetObject (); Ptr ipv4DstRtr = nDstRtr->GetObject (); Ptr ipv4Dst = nDst->GetObject (); - + Ipv4StaticRoutingHelper ipv4RoutingHelper; Ptr staticRoutingSrc = ipv4RoutingHelper.GetStaticRouting (ipv4Src); Ptr staticRoutingRtr1 = ipv4RoutingHelper.GetStaticRouting (ipv4Rtr1); @@ -120,33 +120,31 @@ main (int argc, char *argv[]) // Create static routes from Src to Dst staticRoutingRtr1->AddHostRouteTo (Ipv4Address ("10.20.1.2"), Ipv4Address ("10.10.1.2"), 2); staticRoutingRtr2->AddHostRouteTo (Ipv4Address ("10.20.1.2"), Ipv4Address ("10.10.2.2"), 2); - + // Two routes to same destination - setting separate metrics. // You can switch these to see how traffic gets diverted via different routes staticRoutingSrc->AddHostRouteTo (Ipv4Address ("10.20.1.2"), Ipv4Address ("10.1.1.2"), 1,5); staticRoutingSrc->AddHostRouteTo (Ipv4Address ("10.20.1.2"), Ipv4Address ("10.1.2.2"), 2,10); - + // Creating static routes from DST to Source pointing to Rtr1 VIA Rtr2(!) staticRoutingDst->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.20.1.1"), 1); staticRoutingDstRtr->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.10.2.1"), 2); staticRoutingRtr2->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.1.2.1"), 1); - - Ipv4InterfaceAddress ifInAddrSrc=ipv4Src->GetAddress (1,0); - + // There are no apps that can utilize the Socket Option so doing the work directly.. // Taken from tcp-large-transfer example Ptr srcSocket = Socket::CreateSocket (nSrc, TypeId::LookupByName ("ns3::UdpSocketFactory")); srcSocket->Bind (); srcSocket->SetRecvCallback (MakeCallback (&srcSocketRecv)); - + Ptr dstSocket = Socket::CreateSocket (nDst, TypeId::LookupByName ("ns3::UdpSocketFactory")); uint16_t dstport = 12345; Ipv4Address dstaddr ("10.20.1.2"); InetSocketAddress dst = InetSocketAddress (dstaddr, dstport); dstSocket->Bind (dst); dstSocket->SetRecvCallback (MakeCallback (&dstSocketRecv)); - + AsciiTraceHelper ascii; p2p.EnableAsciiAll (ascii.CreateFileStream ("socket-bound-static-routing.tr")); p2p.EnablePcapAll ("socket-bound-static-routing"); @@ -195,13 +193,12 @@ srcSocketRecv (Ptr socket) Ptr packet = socket->RecvFrom (from); packet->RemoveAllPacketTags (); packet->RemoveAllByteTags (); - InetSocketAddress address = InetSocketAddress::ConvertFrom (from); - NS_LOG_INFO ("Source Received " << packet->GetSize () << " bytes from " << address.GetIpv4()); + NS_LOG_INFO ("Source Received " << packet->GetSize () << " bytes from " << InetSocketAddress::ConvertFrom (from).GetIpv4()); if (socket->GetBoundNetDevice ()) { NS_LOG_INFO ("Socket was bound"); } - else + else { NS_LOG_INFO ("Socket was not bound"); } diff --git a/examples/socket/socket-bound-tcp-static-routing.cc b/examples/socket/socket-bound-tcp-static-routing.cc index 2d588314b..95baaaa11 100644 --- a/examples/socket/socket-bound-tcp-static-routing.cc +++ b/examples/socket/socket-bound-tcp-static-routing.cc @@ -22,7 +22,7 @@ | 10.20.1.0/24 DSTRTR 10.10.1.0/24 / \ 10.10.2.0/24 - / \ + / \ Rtr1 Rtr2 10.1.1.0/24 | | 10.1.2.0/24 | / @@ -75,7 +75,7 @@ main (int argc, char *argv[]) Ptr nRtr1 = CreateObject (); Ptr nRtr2 = CreateObject (); Ptr nDstRtr = CreateObject (); - + NodeContainer c = NodeContainer (nSrc, nDst, nRtr1, nRtr2, nDstRtr); InternetStackHelper internet; @@ -87,7 +87,7 @@ main (int argc, char *argv[]) NodeContainer nRtr1nDstRtr = NodeContainer (nRtr1, nDstRtr); NodeContainer nRtr2nDstRtr = NodeContainer (nRtr2, nDstRtr); NodeContainer nDstRtrnDst = NodeContainer (nDstRtr, nDst); - + // We create the channels first without any IP addressing information PointToPointHelper p2p; p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); @@ -97,11 +97,11 @@ main (int argc, char *argv[]) NetDeviceContainer dRtr1dDstRtr = p2p.Install (nRtr1nDstRtr); NetDeviceContainer dRtr2dDstRtr = p2p.Install (nRtr2nDstRtr); NetDeviceContainer dDstRtrdDst = p2p.Install (nDstRtrnDst); - + Ptr SrcToRtr1=dSrcdRtr1.Get (0); Ptr SrcToRtr2=dSrcdRtr2.Get (0); - - // Later, we add IP addresses. + + // Later, we add IP addresses. Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.0"); Ipv4InterfaceContainer iSrciRtr1 = ipv4.Assign (dSrcdRtr1); @@ -119,7 +119,7 @@ main (int argc, char *argv[]) Ptr ipv4Rtr2 = nRtr2->GetObject (); Ptr ipv4DstRtr = nDstRtr->GetObject (); Ptr ipv4Dst = nDst->GetObject (); - + Ipv4StaticRoutingHelper ipv4RoutingHelper; Ptr staticRoutingSrc = ipv4RoutingHelper.GetStaticRouting (ipv4Src); Ptr staticRoutingRtr1 = ipv4RoutingHelper.GetStaticRouting (ipv4Rtr1); @@ -130,23 +130,21 @@ main (int argc, char *argv[]) // Create static routes from Src to Dst staticRoutingRtr1->AddHostRouteTo (Ipv4Address ("10.20.1.2"), Ipv4Address ("10.10.1.2"), 2); staticRoutingRtr2->AddHostRouteTo (Ipv4Address ("10.20.1.2"), Ipv4Address ("10.10.2.2"), 2); - + // Two routes to same destination - setting separate metrics. // You can switch these to see how traffic gets diverted via different routes staticRoutingSrc->AddHostRouteTo (Ipv4Address ("10.20.1.2"), Ipv4Address ("10.1.1.2"), 1,5); staticRoutingSrc->AddHostRouteTo (Ipv4Address ("10.20.1.2"), Ipv4Address ("10.1.2.2"), 2,10); - + // Creating static routes from DST to Source pointing to Rtr1 VIA Rtr2(!) staticRoutingDst->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.20.1.1"), 1); staticRoutingDstRtr->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.10.2.1"), 2); staticRoutingRtr2->AddHostRouteTo (Ipv4Address ("10.1.1.1"), Ipv4Address ("10.1.2.1"), 1); - + staticRoutingDst->AddHostRouteTo (Ipv4Address ("10.1.2.1"), Ipv4Address ("10.20.1.1"), 1); staticRoutingDstRtr->AddHostRouteTo (Ipv4Address ("10.1.2.1"), Ipv4Address ("10.10.2.1"), 2); staticRoutingRtr2->AddHostRouteTo (Ipv4Address ("10.1.2.1"), Ipv4Address ("10.1.2.1"), 1); - Ipv4InterfaceAddress ifInAddrSrc=ipv4Src->GetAddress (1,0); - // There are no apps that can utilize the Socket Option so doing the work directly.. // Taken from tcp-large-transfer example @@ -155,15 +153,15 @@ main (int argc, char *argv[]) Ptr srcSocket3 = Socket::CreateSocket (nSrc, TypeId::LookupByName ("ns3::TcpSocketFactory")); Ptr srcSocket4 = Socket::CreateSocket (nSrc, TypeId::LookupByName ("ns3::TcpSocketFactory")); - + uint16_t dstport = 12345; Ipv4Address dstaddr ("10.20.1.2"); - + PacketSinkHelper sink ("ns3::TcpSocketFactory", InetSocketAddress (Ipv4Address::GetAny(), dstport)); ApplicationContainer apps = sink.Install (nDst); apps.Start (Seconds (0.0)); apps.Stop (Seconds (10.0)); - + AsciiTraceHelper ascii; p2p.EnableAsciiAll (ascii.CreateFileStream ("socket-bound-tcp-static-routing.tr")); p2p.EnablePcapAll ("socket-bound-tcp-static-routing"); @@ -204,7 +202,7 @@ void StartFlow(Ptr localSocket, NS_LOG_INFO ("Starting flow at time " << Simulator::Now ().GetSeconds ()); currentTxBytes = 0; localSocket->Bind (); - localSocket->Connect (InetSocketAddress (servAddress, servPort));//connect + localSocket->Connect (InetSocketAddress (servAddress, servPort)); //connect // tell the tcp implementation to call WriteUntilBufferFull again // if we blocked and new tx buffer space becomes available diff --git a/examples/stats/wifi-example-apps.cc b/examples/stats/wifi-example-apps.cc index c52830824..98f284ca9 100644 --- a/examples/stats/wifi-example-apps.cc +++ b/examples/stats/wifi-example-apps.cc @@ -67,7 +67,7 @@ Sender::GetTypeId(void) MakeRandomVariableChecker()) .AddTraceSource ("Tx", "A new packet is created and is sent", MakeTraceSourceAccessor (&Sender::m_txTrace)) - ; + ; return tid; } @@ -99,10 +99,10 @@ void Sender::StartApplication() if (m_socket == 0) { Ptr socketFactory = GetNode()->GetObject - (UdpSocketFactory::GetTypeId()); + (UdpSocketFactory::GetTypeId()); m_socket = socketFactory->CreateSocket (); m_socket->Bind (); - } + } m_count = 0; @@ -118,7 +118,7 @@ void Sender::StopApplication() Simulator::Cancel(m_sendEvent); // end Sender::StopApplication } - + void Sender::SendPacket() { // NS_LOG_FUNCTION_NOARGS (); @@ -139,9 +139,9 @@ void Sender::SendPacket() m_txTrace(packet); if (++m_count < m_numPkts) { - m_sendEvent = Simulator::Schedule(Seconds(m_interval.GetValue()), - &Sender::SendPacket, this); - } + m_sendEvent = Simulator::Schedule(Seconds(m_interval.GetValue()), + &Sender::SendPacket, this); + } // end Sender::SendPacket } @@ -162,7 +162,7 @@ Receiver::GetTypeId(void) UintegerValue(1603), MakeUintegerAccessor(&Receiver::m_port), MakeUintegerChecker()) - ; + ; return tid; } @@ -196,12 +196,12 @@ Receiver::StartApplication() if (m_socket == 0) { Ptr socketFactory = GetNode()->GetObject - (UdpSocketFactory::GetTypeId()); + (UdpSocketFactory::GetTypeId()); m_socket = socketFactory->CreateSocket(); InetSocketAddress local = InetSocketAddress(Ipv4Address::GetAny(), m_port); m_socket->Bind(local); - } + } m_socket->SetRecvCallback(MakeCallback(&Receiver::Receive, this)); @@ -215,7 +215,7 @@ Receiver::StopApplication() if (m_socket != 0) { m_socket->SetRecvCallback(MakeNullCallback > ()); - } + } // end Receiver::StopApplication } @@ -241,30 +241,29 @@ Receiver::Receive(Ptr socket) Ptr packet; Address from; while (packet = socket->RecvFrom(from)) { - if (InetSocketAddress::IsMatchingType (from)) { - InetSocketAddress address = InetSocketAddress::ConvertFrom (from); - NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " << - address.GetIpv4()); + if (InetSocketAddress::IsMatchingType (from)) { + NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " << + InetSocketAddress::ConvertFrom (from).GetIpv4()); + } + + TimestampTag timestamp; + // Should never not be found since the sender is adding it, but + // you never know. + if (packet->FindFirstMatchingByteTag(timestamp)) { + Time tx = timestamp.GetTimestamp(); + + if (m_delay != 0) { + m_delay->Update(Simulator::Now() - tx); + } + } + + if (m_calc != 0) { + m_calc->Update(); + } + + // end receiving packets } - TimestampTag timestamp; - // Should never not be found since the sender is adding it, but - // you never know. - if (packet->FindFirstMatchingByteTag(timestamp)) { - Time tx = timestamp.GetTimestamp(); - - if (m_delay != 0) { - m_delay->Update(Simulator::Now() - tx); - } - } - - if (m_calc != 0) { - m_calc->Update(); - } - - // end receiving packets - } - // end Receiver::Receive } @@ -285,7 +284,7 @@ TimestampTag::GetTypeId(void) EmptyAttributeValue(), MakeTimeAccessor(&TimestampTag::GetTimestamp), MakeTimeChecker()) - ; + ; return tid; } TypeId diff --git a/examples/stats/wifi-example-apps.h b/examples/stats/wifi-example-apps.h index 8dc70c600..564a952a8 100644 --- a/examples/stats/wifi-example-apps.h +++ b/examples/stats/wifi-example-apps.h @@ -37,7 +37,7 @@ using namespace ns3; //---------------------------------------------------------------------- //------------------------------------------------------ -class Sender: public Application { +class Sender : public Application { public: static TypeId GetTypeId(void); Sender(); @@ -72,7 +72,7 @@ private: //------------------------------------------------------ -class Receiver: public Application { +class Receiver : public Application { public: static TypeId GetTypeId(void); Receiver(); @@ -112,7 +112,7 @@ public: virtual uint32_t GetSerializedSize (void) const; virtual void Serialize (TagBuffer i) const; virtual void Deserialize (TagBuffer i); - + // these are our accessors to our tag structure void SetTimestamp(Time time); Time GetTimestamp(void) const; diff --git a/examples/stats/wifi-example-sim.cc b/examples/stats/wifi-example-sim.cc index 48f0f7239..aad5709d2 100644 --- a/examples/stats/wifi-example-sim.cc +++ b/examples/stats/wifi-example-sim.cc @@ -99,21 +99,21 @@ int main(int argc, char *argv[]) { cmd.Parse (argc, argv); if (format != "omnet" && format != "db") { - NS_LOG_ERROR("Unknown output format '" << format << "'"); - return -1; - } + NS_LOG_ERROR("Unknown output format '" << format << "'"); + return -1; + } #ifndef STATS_HAS_SQLITE3 if (format == "db") { NS_LOG_ERROR("sqlite support not compiled in."); return -1; - } + } #endif { - stringstream sstr(""); - sstr << distance; - input = sstr.str(); + stringstream sstr(""); + sstr << distance; + input = sstr.str(); } @@ -163,12 +163,12 @@ int main(int argc, char *argv[]) { //-- Create a custom traffic source and sink //-------------------------------------------- NS_LOG_INFO ("Create traffic source & sink."); - Ptr appSource = NodeList::GetNode(0); + Ptr appSource = NodeList::GetNode(0); Ptr sender = CreateObject(); appSource->AddApplication(sender); sender->SetStartTime(Seconds(1)); - Ptr appSink = NodeList::GetNode(1); + Ptr appSink = NodeList::GetNode(1); Ptr receiver = CreateObject(); appSink->AddApplication(receiver); receiver->SetStartTime(Seconds(0)); @@ -231,7 +231,7 @@ int main(int argc, char *argv[]) { appTx->SetContext("node[0]"); Config::Connect("/NodeList/0/ApplicationList/*/$Sender/Tx", MakeCallback(&PacketCounterCalculator::PacketUpdate, - appTx)); + appTx)); data.AddDataCalculator(appTx); // Here a counter for received packets is directly manipulated by @@ -271,8 +271,8 @@ int main(int argc, char *argv[]) { appTxPkts->SetContext("node[0]"); Config::Connect("/NodeList/0/ApplicationList/*/$Sender/Tx", MakeCallback - (&PacketSizeMinMaxAvgTotalCalculator::PacketUpdate, - appTxPkts)); + (&PacketSizeMinMaxAvgTotalCalculator::PacketUpdate, + appTxPkts)); data.AddDataCalculator(appTxPkts); @@ -294,7 +294,7 @@ int main(int argc, char *argv[]) { //-- Run the simulation //-------------------------------------------- NS_LOG_INFO("Run Simulation."); - Simulator::Run(); + Simulator::Run(); Simulator::Destroy(); @@ -307,16 +307,16 @@ int main(int argc, char *argv[]) { // Pick an output writer based in the requested format. Ptr output = 0; if (format == "omnet") { - NS_LOG_INFO("Creating omnet formatted data output."); - output = CreateObject(); - } else if (format == "db") { + NS_LOG_INFO("Creating omnet formatted data output."); + output = CreateObject(); + } else if (format == "db") { #ifdef STATS_HAS_SQLITE3 NS_LOG_INFO("Creating sqlite formatted data output."); output = CreateObject(); #endif - } else { - NS_LOG_ERROR("Unknown output format " << format); - } + } else { + NS_LOG_ERROR("Unknown output format " << format); + } // Finally, have that writer interrogate the DataCollector and save // the results. diff --git a/examples/tcp/star.cc b/examples/tcp/star.cc index a167e0de3..b85bb15a5 100644 --- a/examples/tcp/star.cc +++ b/examples/tcp/star.cc @@ -75,7 +75,7 @@ main (int argc, char *argv[]) NS_LOG_INFO ("Create applications."); // - // Create a packet sink on the star "hub" to receive packets. + // Create a packet sink on the star "hub" to receive packets. // uint16_t port = 50000; Address hubLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port)); @@ -98,7 +98,7 @@ main (int argc, char *argv[]) AddressValue remoteAddress (InetSocketAddress (star.GetHubIpv4Address (i), port)); onOffHelper.SetAttribute ("Remote", remoteAddress); spokeApps.Add (onOffHelper.Install (star.GetSpokeNode (i))); - } + } spokeApps.Start (Seconds (1.0)); spokeApps.Stop (Seconds (10.0)); diff --git a/examples/tcp/tcp-large-transfer.cc b/examples/tcp/tcp-large-transfer.cc index ff5e76a2f..37e7030dc 100644 --- a/examples/tcp/tcp-large-transfer.cc +++ b/examples/tcp/tcp-large-transfer.cc @@ -152,7 +152,7 @@ int main (int argc, char *argv[]) // Create and bind the socket... Ptr localSocket = - Socket::CreateSocket (n0n1.Get (0), TcpSocketFactory::GetTypeId ()); + Socket::CreateSocket (n0n1.Get (0), TcpSocketFactory::GetTypeId ()); localSocket->Bind (); // Trace changes to the congestion window @@ -191,7 +191,7 @@ void StartFlow(Ptr localSocket, uint16_t servPort) { NS_LOG_LOGIC("Starting flow at time " << Simulator::Now ().GetSeconds ()); - localSocket->Connect (InetSocketAddress (servAddress, servPort));//connect + localSocket->Connect (InetSocketAddress (servAddress, servPort)); //connect // tell the tcp implementation to call WriteUntilBufferFull again // if we blocked and new tx buffer space becomes available diff --git a/examples/tcp/tcp-nsc-lfn.cc b/examples/tcp/tcp-nsc-lfn.cc index 54d54ecc4..453994c62 100644 --- a/examples/tcp/tcp-nsc-lfn.cc +++ b/examples/tcp/tcp-nsc-lfn.cc @@ -103,9 +103,9 @@ int main (int argc, char *argv[]) DoubleValue rate(errRate); RandomVariableValue u01(UniformVariable (0.0, 1.0)); Ptr em1 = - CreateObjectWithAttributes ("RanVar", u01, "ErrorRate", rate); + CreateObjectWithAttributes ("RanVar", u01, "ErrorRate", rate); Ptr em2 = - CreateObjectWithAttributes ("RanVar", u01, "ErrorRate", rate); + CreateObjectWithAttributes ("RanVar", u01, "ErrorRate", rate); // This enables the specified errRate on both link endpoints. p2pInterfaces.Get(0)->SetAttribute("ReceiveErrorModel", PointerValue (em1)); @@ -122,7 +122,7 @@ int main (int argc, char *argv[]) // This sets up two TCP flows, one from A -> B, one from B -> A. for (int i = 0, j = 1; i < 2; j--, i++) - { + { Address remoteAddress(InetSocketAddress(ipv4Interfaces.GetAddress (i), servPort)); OnOffHelper clientHelper ("ns3::TcpSocketFactory", remoteAddress); clientHelper.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); diff --git a/examples/tcp/tcp-nsc-zoo.cc b/examples/tcp/tcp-nsc-zoo.cc index b9d4cb35a..2fef085a3 100644 --- a/examples/tcp/tcp-nsc-zoo.cc +++ b/examples/tcp/tcp-nsc-zoo.cc @@ -57,8 +57,8 @@ int main(int argc, char *argv[]) if (MaxNodes < 2) { - std::cerr << "--nodes: must be >= 2" << std::endl; - return 1; + std::cerr << "--nodes: must be >= 2" << std::endl; + return 1; } csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate(100 * 1000 * 1000))); csma.SetChannelAttribute ("Delay", TimeValue (MicroSeconds (200))); @@ -86,13 +86,13 @@ int main(int argc, char *argv[]) { // the next statement doesn't change anything for the nodes 0, 1, and 2; since they // already have a stack assigned. - internetStack.SetTcp ("ns3::NscTcpL4Protocol","Library",StringValue("liblinux2.6.18.so")); - // this switches node 3 to NSCs Linux 2.6.18 stack. + internetStack.SetTcp ("ns3::NscTcpL4Protocol","Library",StringValue("liblinux2.6.26.so")); + // this switches node 3 to NSCs Linux 2.6.26 stack. internetStack.Install (n.Get(3)); // and then agains disables sack/timestamps/wscale on node 3. - Config::Set ("/NodeList/3/$ns3::Ns3NscStack/net.ipv4.tcp_sack", StringValue ("0")); - Config::Set ("/NodeList/3/$ns3::Ns3NscStack/net.ipv4.tcp_timestamps", StringValue ("0")); - Config::Set ("/NodeList/3/$ns3::Ns3NscStack/net.ipv4.tcp_window_scaling", StringValue ("0")); + Config::Set ("/NodeList/3/$ns3::Ns3NscStack/net.ipv4.tcp_sack", StringValue ("0")); + Config::Set ("/NodeList/3/$ns3::Ns3NscStack/net.ipv4.tcp_timestamps", StringValue ("0")); + Config::Set ("/NodeList/3/$ns3::Ns3NscStack/net.ipv4.tcp_window_scaling", StringValue ("0")); } // the freebsd stack is not yet built by default, so its commented out for now. // internetStack.SetNscStack ("libfreebsd5.so"); @@ -115,24 +115,24 @@ int main(int argc, char *argv[]) sinkApp.Stop (Seconds (30.0)); // This tells every node on the network to start a flow to all other nodes on the network ... - for (unsigned int i = 0 ; i < MaxNodes;i++) + for (unsigned int i = 0 ; i < MaxNodes; i++) { - for (unsigned int j = 0 ; j < MaxNodes;j++) + for (unsigned int j = 0 ; j < MaxNodes; j++) { if (i == j) { // ...but we don't want a node to talk to itself. - continue; + continue; } Address remoteAddress(InetSocketAddress(ipv4Interfaces.GetAddress (j), servPort)); OnOffHelper clientHelper ("ns3::TcpSocketFactory", remoteAddress); clientHelper.SetAttribute - ("OnTime", RandomVariableValue (ConstantVariable (1))); + ("OnTime", RandomVariableValue (ConstantVariable (1))); clientHelper.SetAttribute - ("OffTime", RandomVariableValue (ConstantVariable (0))); + ("OffTime", RandomVariableValue (ConstantVariable (0))); ApplicationContainer clientApp = clientHelper.Install(n.Get(i)); clientApp.Start (Seconds (j)); /* delay startup depending on node number */ clientApp.Stop (Seconds (j + runtime)); - } + } } csma.EnablePcapAll ("tcp-nsc-zoo", false); diff --git a/examples/tcp/tcp-star-server.cc b/examples/tcp/tcp-star-server.cc index 8ffff68d6..879d28da1 100644 --- a/examples/tcp/tcp-star-server.cc +++ b/examples/tcp/tcp-star-server.cc @@ -22,7 +22,7 @@ \ | / \|/ n1---n0---n5 - /|\ + /| \ / | \ n8 n7 n6 */ @@ -96,9 +96,9 @@ main (int argc, char *argv[]) //Collect an adjacency list of nodes for the p2p topology std::vector nodeAdjacencyList(N-1); for(uint32_t i=0; i deviceAdjacencyList(N-1); for(uint32_t i=0; i interfaceAdjacencyList(N-1); for(uint32_t i=0; i socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate); private: - virtual void StartApplication (void); + virtual void StartApplication (void); virtual void StopApplication (void); void ScheduleTx (void); @@ -186,8 +186,8 @@ main (int argc, char *argv[]) devices = pointToPoint.Install (nodes); Ptr em = CreateObjectWithAttributes ( - "RanVar", RandomVariableValue (UniformVariable (0., 1.)), - "ErrorRate", DoubleValue (0.00001)); + "RanVar", RandomVariableValue (UniformVariable (0., 1.)), + "ErrorRate", DoubleValue (0.00001)); devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em)); InternetStackHelper stack; diff --git a/examples/tutorial/first.cc b/examples/tutorial/first.cc index 8e8479c54..cb1481028 100644 --- a/examples/tutorial/first.cc +++ b/examples/tutorial/first.cc @@ -24,7 +24,7 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("FirstScriptExample"); - int +int main (int argc, char *argv[]) { LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_INFO); diff --git a/examples/tutorial/fourth.cc b/examples/tutorial/fourth.cc index 800ae9e48..f1284ce6f 100644 --- a/examples/tutorial/fourth.cc +++ b/examples/tutorial/fourth.cc @@ -20,7 +20,7 @@ #include "ns3/trace-source-accessor.h" #include - + using namespace ns3; class MyObject : public Object @@ -34,10 +34,10 @@ public: .AddTraceSource ("MyInteger", "An integer value to trace.", MakeTraceSourceAccessor (&MyObject::m_myInt)) - ; + ; return tid; } - + MyObject () {} TracedValue m_myInt; }; diff --git a/examples/tutorial/hello-simulator.cc b/examples/tutorial/hello-simulator.cc index 37f99ccd5..70a43a62f 100644 --- a/examples/tutorial/hello-simulator.cc +++ b/examples/tutorial/hello-simulator.cc @@ -20,7 +20,7 @@ NS_LOG_COMPONENT_DEFINE ("HelloSimulator"); using namespace ns3; - int +int main (int argc, char *argv[]) { NS_LOG_UNCOND ("Hello Simulator"); diff --git a/examples/tutorial/sixth.cc b/examples/tutorial/sixth.cc index 70c00a4b0..c0822b83d 100644 --- a/examples/tutorial/sixth.cc +++ b/examples/tutorial/sixth.cc @@ -69,7 +69,7 @@ public: void Setup (Ptr socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate); private: - virtual void StartApplication (void); + virtual void StartApplication (void); virtual void StopApplication (void); void ScheduleTx (void); @@ -188,8 +188,8 @@ main (int argc, char *argv[]) devices = pointToPoint.Install (nodes); Ptr em = CreateObjectWithAttributes ( - "RanVar", RandomVariableValue (UniformVariable (0., 1.)), - "ErrorRate", DoubleValue (0.00001)); + "RanVar", RandomVariableValue (UniformVariable (0., 1.)), + "ErrorRate", DoubleValue (0.00001)); devices.Get (1)->SetAttribute ("ReceiveErrorModel", PointerValue (em)); InternetStackHelper stack; diff --git a/examples/udp/udp-echo.cc b/examples/udp/udp-echo.cc index fd6b07837..8e0c071f7 100644 --- a/examples/udp/udp-echo.cc +++ b/examples/udp/udp-echo.cc @@ -115,7 +115,7 @@ main (int argc, char *argv[]) client.SetFill(apps.Get (0), 0xa5, 1024); - uint8_t fill[] = {0, 1, 2, 3, 4, 5, 6}; + uint8_t fill[] = { 0, 1, 2, 3, 4, 5, 6}; client.SetFill(apps.Get (0), fill, sizeof(fill), 1024); #endif diff --git a/examples/wireless/mixed-wireless.cc b/examples/wireless/mixed-wireless.cc index 87b417503..1c7acdc20 100644 --- a/examples/wireless/mixed-wireless.cc +++ b/examples/wireless/mixed-wireless.cc @@ -162,7 +162,7 @@ main (int argc, char *argv[]) // Add the IPv4 protocol stack to the nodes in our container // InternetStackHelper internet; - internet.SetRoutingHelper (olsr); + internet.SetRoutingHelper (olsr); // has effect on the next Install () internet.Install (backbone); // re-initialize for non-olsr routing. diff --git a/examples/wireless/mixed-wireless.py b/examples/wireless/mixed-wireless.py index d5bf3db12..0e889b08f 100644 --- a/examples/wireless/mixed-wireless.py +++ b/examples/wireless/mixed-wireless.py @@ -135,7 +135,7 @@ def main(argv): print "Enabling OLSR routing on all backbone nodes" internet = ns.internet.InternetStackHelper() olsr = ns.olsr.OlsrHelper() - internet.SetRoutingHelper(olsr); + internet.SetRoutingHelper(olsr); # has effect on the next Install () internet.Install(backbone); # re-initialize for non-olsr routing. internet.Reset() diff --git a/examples/wireless/multirate.cc b/examples/wireless/multirate.cc index 58b0c4534..e2a4e2020 100644 --- a/examples/wireless/multirate.cc +++ b/examples/wireless/multirate.cc @@ -334,6 +334,11 @@ Experiment::ApplicationSetup (Ptr client, Ptr server, double start, << " position (" << clientPos.x << "," << clientPos.y << "," << clientPos.z << ")" << "\n"); + //cast serverPos,clientPos,iaddrClient to void, to suppress variable set but not + //used compiler warning in optimized builds + (void) serverPos; + (void) clientPos; + (void) ipv4AddrClient; // Equipping the source node with OnOff Application used for sending OnOffHelper onoff ("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address("10.0.0.1"), port))); @@ -383,7 +388,7 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy, if (enableRouting) { - internet.SetRoutingHelper(list); + internet.SetRoutingHelper(list); // has effect on the next Install () } internet.Install (c); diff --git a/examples/wireless/ofdm-validation.cc b/examples/wireless/ofdm-validation.cc index 87959faa4..9cc417ddb 100644 --- a/examples/wireless/ofdm-validation.cc +++ b/examples/wireless/ofdm-validation.cc @@ -84,7 +84,7 @@ set style line 5 linewidth 5\n\ set style line 6 linewidth 5\n\ set style line 7 linewidth 5\n\ set style line 8 linewidth 5\n\ -set style increment user"); +set style increment user" ); yansplot.GenerateOutput (yansfile); yansfile.close (); @@ -100,7 +100,7 @@ set style line 5 linewidth 5\n\ set style line 6 linewidth 5\n\ set style line 7 linewidth 5\n\ set style line 8 linewidth 5\n\ -set style increment user"); +set style increment user" ); nistplot.GenerateOutput (nistfile); nistfile.close (); diff --git a/examples/wireless/wifi-adhoc.cc b/examples/wireless/wifi-adhoc.cc index 22be0208c..1caf2d906 100644 --- a/examples/wireless/wifi-adhoc.cc +++ b/examples/wireless/wifi-adhoc.cc @@ -50,7 +50,8 @@ private: }; Experiment::Experiment () -{} +{ +} Experiment::Experiment (std::string name) : m_output (name) diff --git a/examples/wireless/wifi-clear-channel-cmu.cc b/examples/wireless/wifi-clear-channel-cmu.cc index 8cf20b26e..881572bdc 100644 --- a/examples/wireless/wifi-clear-channel-cmu.cc +++ b/examples/wireless/wifi-clear-channel-cmu.cc @@ -47,14 +47,15 @@ private: Vector GetPosition (Ptr node); Ptr SetupPacketReceive (Ptr node); void GenerateTraffic (Ptr socket, uint32_t pktSize, - uint32_t pktCount, Time pktInterval ); + uint32_t pktCount, Time pktInterval ); uint32_t m_pktsTotal; Gnuplot2dDataset m_output; }; Experiment::Experiment () -{} +{ +} Experiment::Experiment (std::string name) : m_output (name) @@ -82,7 +83,7 @@ Experiment::ReceivePacket (Ptr socket) Ptr packet; while (packet = socket->Recv ()) { - m_pktsTotal ++; + m_pktsTotal++; } } @@ -179,46 +180,46 @@ int main (int argc, char *argv[]) cmd.Parse (argc, argv); Gnuplot gnuplot = Gnuplot ("clear-channel.eps"); - + for (uint32_t i = 0; i < modes.size(); i++) - { - std::cout << modes[i] << std::endl; - Gnuplot2dDataset dataset (modes[i]); + { + std::cout << modes[i] << std::endl; + Gnuplot2dDataset dataset (modes[i]); - for (double rss = -102.0; rss <= -80.0; rss += 0.5) - { - Experiment experiment; - dataset.SetStyle (Gnuplot2dDataset::LINES); + for (double rss = -102.0; rss <= -80.0; rss += 0.5) + { + Experiment experiment; + dataset.SetStyle (Gnuplot2dDataset::LINES); - WifiHelper wifi; - wifi.SetStandard (WIFI_PHY_STANDARD_80211b); - NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); - Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", - StringValue (modes[i])); - wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", - "DataMode",StringValue(modes[i]), - "ControlMode",StringValue(modes[i])); - wifiMac.SetType ("ns3::AdhocWifiMac"); + WifiHelper wifi; + wifi.SetStandard (WIFI_PHY_STANDARD_80211b); + NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); + Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", + StringValue (modes[i])); + wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", + "DataMode",StringValue(modes[i]), + "ControlMode",StringValue(modes[i])); + wifiMac.SetType ("ns3::AdhocWifiMac"); - YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); - YansWifiChannelHelper wifiChannel ; - wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); - wifiChannel.AddPropagationLoss ("ns3::FixedRssLossModel","Rss",DoubleValue(rss)); + YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); + YansWifiChannelHelper wifiChannel ; + wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); + wifiChannel.AddPropagationLoss ("ns3::FixedRssLossModel","Rss",DoubleValue(rss)); - NS_LOG_DEBUG (modes[i]); - experiment = Experiment (modes[i]); - wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-110.0) ); - wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0) ); - wifiPhy.Set ("TxPowerStart", DoubleValue (15.0) ); - wifiPhy.Set ("RxGain", DoubleValue (0) ); - wifiPhy.Set ("RxNoiseFigure", DoubleValue (7) ); - uint32_t pktsRecvd = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel); - dataset.Add (rss, pktsRecvd); - } + NS_LOG_DEBUG (modes[i]); + experiment = Experiment (modes[i]); + wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (-110.0) ); + wifiPhy.Set ("CcaMode1Threshold", DoubleValue (-110.0) ); + wifiPhy.Set ("TxPowerStart", DoubleValue (15.0) ); + wifiPhy.Set ("RxGain", DoubleValue (0) ); + wifiPhy.Set ("RxNoiseFigure", DoubleValue (7) ); + uint32_t pktsRecvd = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel); + dataset.Add (rss, pktsRecvd); + } - gnuplot.AddDataset (dataset); - } + gnuplot.AddDataset (dataset); + } gnuplot.SetTerminal ("postscript eps color enh \"Times-BoldItalic\""); gnuplot.SetLegend ("RSS(dBm)", "Number of packets received"); gnuplot.SetExtra ("set xrange [-102:-83]"); diff --git a/examples/wireless/wifi-hidden-terminal.cc b/examples/wireless/wifi-hidden-terminal.cc index 6de5f68f5..56d6ee490 100644 --- a/examples/wireless/wifi-hidden-terminal.cc +++ b/examples/wireless/wifi-hidden-terminal.cc @@ -46,17 +46,17 @@ void experiment (bool enableCtsRts) // 0. Enable or disable CTS/RTS UintegerValue ctsThr = (enableCtsRts ? UintegerValue (100) : UintegerValue (2200)); Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", ctsThr); - + // 1. Create 3 nodes NodeContainer nodes; nodes.Create (3); - + // 2. Place nodes somehow, this is required by every wireless simulation for (size_t i = 0; i < 3; ++i) { nodes.Get(i)->AggregateObject (CreateObject ()); } - + // 3. Create propagation loss matrix Ptr lossModel = CreateObject (); lossModel->SetDefaultLoss (200); // set default loss to 200 dB (no link) @@ -67,7 +67,7 @@ void experiment (bool enableCtsRts) Ptr wifiChannel = CreateObject (); wifiChannel->SetPropagationLossModel (lossModel); wifiChannel->SetPropagationDelayModel (CreateObject ()); - + // 5. Install wireless devices WifiHelper wifi; wifi.SetStandard (WIFI_PHY_STANDARD_80211b); @@ -94,7 +94,7 @@ void experiment (bool enableCtsRts) Ipv4AddressHelper ipv4; ipv4.SetBase ("10.0.0.0", "255.0.0.0"); ipv4.Assign (devices); - + // 7. Install applications: two CBR streams each saturating the channel ApplicationContainer cbrApps; uint16_t cbrPort = 12345; @@ -120,7 +120,7 @@ void experiment (bool enableCtsRts) // we also use separate UDP applications that will send a single // packet before the CBR flows start. // This is a workround for the lack of perfect ARP, see Bug 187 - // http://www.nsnam.org/bugzilla/show_bug.cgi?id=187 + // http://www.nsnam.org/bugzilla/show_bug.cgi?id=187 uint16_t echoPort = 9; UdpEchoClientHelper echoClientHelper (Ipv4Address ("10.0.0.2"), echoPort); @@ -128,24 +128,24 @@ void experiment (bool enableCtsRts) echoClientHelper.SetAttribute ("Interval", TimeValue (Seconds (0.1))); echoClientHelper.SetAttribute ("PacketSize", UintegerValue (10)); ApplicationContainer pingApps; - + // again using different start times to workaround Bug 388 and Bug 912 echoClientHelper.SetAttribute ("StartTime", TimeValue (Seconds (0.001))); pingApps.Add (echoClientHelper.Install (nodes.Get (0))); echoClientHelper.SetAttribute ("StartTime", TimeValue (Seconds (0.006))); - pingApps.Add (echoClientHelper.Install (nodes.Get (2))); + pingApps.Add (echoClientHelper.Install (nodes.Get (2))); + - // 8. Install FlowMonitor on all nodes FlowMonitorHelper flowmon; Ptr monitor = flowmon.InstallAll(); - + // 9. Run simulation for 10 seconds Simulator::Stop (Seconds (10)); Simulator::Run (); - + // 10. Print per flow statistics monitor->CheckForLostPackets (); Ptr classifier = DynamicCast (flowmon.GetClassifier ()); @@ -161,7 +161,7 @@ void experiment (bool enableCtsRts) std::cout << " Throughput: " << i->second.rxBytes * 8.0 / 10.0 / 1024 / 1024 << " Mbps\n"; } } - + // 11. Cleanup Simulator::Destroy (); } @@ -173,6 +173,6 @@ int main (int argc, char **argv) std::cout << "------------------------------------------------\n"; std::cout << "Hidden station experiment with RTS/CTS enabled:\n"; experiment (true); - + return 0; } diff --git a/examples/wireless/wifi-simple-adhoc-grid.cc b/examples/wireless/wifi-simple-adhoc-grid.cc index 7b13aae8c..4357a2051 100644 --- a/examples/wireless/wifi-simple-adhoc-grid.cc +++ b/examples/wireless/wifi-simple-adhoc-grid.cc @@ -21,7 +21,7 @@ // This program configures a grid (default 5x5) of nodes on an // 802.11b physical layer, with // 802.11b NICs in adhoc mode, and by default, sends one packet of 1000 -// (application) bytes to node 1. +// (application) bytes to node 1. // // The default layout is like this, on a 2-D grid. // @@ -134,7 +134,7 @@ int main (int argc, char *argv[]) cmd.AddValue ("numNodes", "number of nodes", numNodes); cmd.AddValue ("sinkNode", "Receiver node number", sinkNode); cmd.AddValue ("sourceNode", "Sender node number", sourceNode); - + cmd.Parse (argc, argv); // Convert to time object Time interPacketInterval = Seconds (interval); @@ -173,19 +173,19 @@ int main (int argc, char *argv[]) wifi.SetStandard (WIFI_PHY_STANDARD_80211b); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode",StringValue(phyMode), - "ControlMode",StringValue(phyMode)); + "ControlMode",StringValue(phyMode)); // Set it to adhoc mode wifiMac.SetType ("ns3::AdhocWifiMac"); NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c); MobilityHelper mobility; mobility.SetPositionAllocator ("ns3::GridPositionAllocator", - "MinX", DoubleValue (0.0), - "MinY", DoubleValue (0.0), - "DeltaX", DoubleValue (distance), - "DeltaY", DoubleValue (distance), - "GridWidth", UintegerValue (5), - "LayoutType", StringValue ("RowFirst")); + "MinX", DoubleValue (0.0), + "MinY", DoubleValue (0.0), + "DeltaX", DoubleValue (distance), + "DeltaY", DoubleValue (distance), + "GridWidth", UintegerValue (5), + "LayoutType", StringValue ("RowFirst")); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (c); @@ -198,7 +198,7 @@ int main (int argc, char *argv[]) list.Add (olsr, 10); InternetStackHelper internet; - internet.SetRoutingHelper (list); + internet.SetRoutingHelper (list); // has effect on the next Install () internet.Install (c); Ipv4AddressHelper ipv4; @@ -227,7 +227,7 @@ int main (int argc, char *argv[]) // To do-- enable an IP-level trace that shows forwarding events only } - + // Give OLSR time to converge-- 30 seconds perhaps Simulator::Schedule (Seconds (30.0), &GenerateTraffic, source, packetSize, numPackets, interPacketInterval); diff --git a/examples/wireless/wifi-simple-adhoc.cc b/examples/wireless/wifi-simple-adhoc.cc index e61ada48f..fb124351b 100644 --- a/examples/wireless/wifi-simple-adhoc.cc +++ b/examples/wireless/wifi-simple-adhoc.cc @@ -79,7 +79,7 @@ static void GenerateTraffic (Ptr socket, uint32_t pktSize, { socket->Send (Create (pktSize)); Simulator::Schedule (pktInterval, &GenerateTraffic, - socket, pktSize,pktCount-1, pktInterval); + socket, pktSize,pktCount-1, pktInterval); } else { @@ -105,7 +105,7 @@ int main (int argc, char *argv[]) cmd.AddValue ("numPackets", "number of packets generated", numPackets); cmd.AddValue ("interval", "interval (seconds) between packets", interval); cmd.AddValue ("verbose", "turn on all WifiNetDevice log components", verbose); - + cmd.Parse (argc, argv); // Convert to time object Time interPacketInterval = Seconds (interval); @@ -147,7 +147,7 @@ int main (int argc, char *argv[]) NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode",StringValue(phyMode), - "ControlMode",StringValue(phyMode)); + "ControlMode",StringValue(phyMode)); // Set it to adhoc mode wifiMac.SetType ("ns3::AdhocWifiMac"); NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c); diff --git a/examples/wireless/wifi-simple-interference.cc b/examples/wireless/wifi-simple-interference.cc index cc949b94b..acdc55f31 100644 --- a/examples/wireless/wifi-simple-interference.cc +++ b/examples/wireless/wifi-simple-interference.cc @@ -102,6 +102,9 @@ void ReceivePacket (Ptr socket) socket->GetSockName (addr); InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (addr); NS_LOG_UNCOND ("Received one packet! Socket: " << iaddr.GetIpv4 () << " port: " << iaddr.GetPort ()); + //cast iaddr to void, to suppress iaddr set but not used compiler warning + //in optimized builds + (void) iaddr; } static void GenerateTraffic (Ptr socket, uint32_t pktSize, @@ -149,7 +152,7 @@ int main (int argc, char *argv[]) cmd.AddValue ("PpacketSize", "size of application packet sent", PpacketSize); cmd.AddValue ("IpacketSize", "size of interfering packet sent", IpacketSize); cmd.AddValue ("verbose", "turn on all WifiNetDevice log components", verbose); - + cmd.Parse (argc, argv); // Convert to time object Time interPacketInterval = Seconds (interval); @@ -190,7 +193,7 @@ int main (int argc, char *argv[]) NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode",StringValue(phyMode), - "ControlMode",StringValue(phyMode)); + "ControlMode",StringValue(phyMode)); // Set it to adhoc mode wifiMac.SetType ("ns3::AdhocWifiMac"); NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c.Get (0)); @@ -241,7 +244,7 @@ int main (int argc, char *argv[]) // Tracing wifiPhy.EnablePcap ("wifi-simple-interference", devices.Get (0)); - + // Output what we are doing NS_LOG_UNCOND ("Primary packet RSS=" << Prss << " dBm and interferer RSS=" << Irss << " dBm at time offset=" << delta << " ms"); diff --git a/examples/wireless/wscript b/examples/wireless/wscript index 773b253bb..80c476077 100644 --- a/examples/wireless/wscript +++ b/examples/wireless/wscript @@ -34,7 +34,7 @@ def build(bld): obj = bld.create_ns3_program('wifi-simple-adhoc-grid', ['internet', 'mobility', 'wifi', 'olsr', 'config-store', 'tools', 'point-to-point']) obj.source = 'wifi-simple-adhoc-grid.cc' - obj = bld.create_ns3_program('wifi-simple-infra', ['internet', 'mobility', 'wifi']) + obj = bld.create_ns3_program('wifi-simple-infra', ['internet', 'mobility', 'wifi','config-store']) obj.source = 'wifi-simple-infra.cc' obj = bld.create_ns3_program('wifi-simple-interference', ['internet', 'mobility', 'wifi', 'config-store', 'tools']) diff --git a/src/aodv/doc/aodv.h b/src/aodv/doc/aodv.h index 58095d4c8..37853a9ca 100644 --- a/src/aodv/doc/aodv.h +++ b/src/aodv/doc/aodv.h @@ -30,8 +30,7 @@ #define AODV_H /** - * \ingroup routing - * \defgroup aodv AODV + * \defgroup aodv AODV Routing * * This model implements the base specification of the Ad hoc on demand distance vector (AODV) * protocol. Implementation is based on RFC3561. diff --git a/src/aodv/examples/aodv.cc b/src/aodv/examples/aodv.cc index b41e6d98e..0fcd5ec63 100644 --- a/src/aodv/examples/aodv.cc +++ b/src/aodv/examples/aodv.cc @@ -52,7 +52,7 @@ public: void Run (); /// Report results void Report (std::ostream & os); - + private: ///\name parameters //\{ @@ -67,14 +67,14 @@ private: /// Print routes if true bool printRoutes; //\} - + ///\name network //\{ NodeContainer nodes; NetDeviceContainer devices; Ipv4InterfaceContainer interfaces; //\} - + private: void CreateNodes (); void CreateDevices (); @@ -85,9 +85,9 @@ private: int main (int argc, char **argv) { AodvExample test; - if (! test.Configure(argc, argv)) + if (!test.Configure(argc, argv)) NS_FATAL_ERROR ("Configuration failed. Aborted."); - + test.Run (); test.Report (std::cout); return 0; @@ -108,16 +108,16 @@ AodvExample::Configure (int argc, char **argv) { // Enable AODV logs by default. Comment this if too noisy // LogComponentEnable("AodvRoutingProtocol", LOG_LEVEL_ALL); - + SeedManager::SetSeed(12345); CommandLine cmd; - + cmd.AddValue ("pcap", "Write PCAP traces.", pcap); cmd.AddValue ("printRoutes", "Print routing table dumps.", printRoutes); cmd.AddValue ("size", "Number of nodes.", size); cmd.AddValue ("time", "Simulation time, s.", totalTime); cmd.AddValue ("step", "Grid step, m", step); - + cmd.Parse (argc, argv); return true; } @@ -130,9 +130,9 @@ AodvExample::Run () CreateDevices (); InstallInternetStack (); InstallApplications (); - + std::cout << "Starting simulation for " << totalTime << " s ...\n"; - + Simulator::Stop (Seconds (totalTime)); Simulator::Run (); Simulator::Destroy (); @@ -150,20 +150,20 @@ AodvExample::CreateNodes () nodes.Create (size); // Name nodes for (uint32_t i = 0; i < size; ++i) - { - std::ostringstream os; - os << "node-" << i; - Names::Add (os.str (), nodes.Get (i)); - } + { + std::ostringstream os; + os << "node-" << i; + Names::Add (os.str (), nodes.Get (i)); + } // Create static grid MobilityHelper mobility; mobility.SetPositionAllocator ("ns3::GridPositionAllocator", - "MinX", DoubleValue (0.0), - "MinY", DoubleValue (0.0), - "DeltaX", DoubleValue (step), - "DeltaY", DoubleValue (0), - "GridWidth", UintegerValue (size), - "LayoutType", StringValue ("RowFirst")); + "MinX", DoubleValue (0.0), + "MinY", DoubleValue (0.0), + "DeltaX", DoubleValue (step), + "DeltaY", DoubleValue (0), + "GridWidth", UintegerValue (size), + "LayoutType", StringValue ("RowFirst")); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (nodes); } @@ -179,7 +179,7 @@ AodvExample::CreateDevices () WifiHelper wifi = WifiHelper::Default (); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue ("OfdmRate6Mbps"), "RtsCtsThreshold", UintegerValue (0)); devices = wifi.Install (wifiPhy, wifiMac, nodes); - + if (pcap) { wifiPhy.EnablePcapAll (std::string ("aodv")); @@ -192,7 +192,7 @@ AodvExample::InstallInternetStack () AodvHelper aodv; // you can configure AODV attributes here using aodv.Set(name, value) InternetStackHelper stack; - stack.SetRoutingHelper (aodv); + stack.SetRoutingHelper (aodv); // has effect on the next Install () stack.Install (nodes); Ipv4AddressHelper address; address.SetBase ("10.0.0.0", "255.0.0.0"); @@ -210,11 +210,11 @@ AodvExample::InstallApplications () { V4PingHelper ping (interfaces.GetAddress (size - 1)); ping.SetAttribute ("Verbose", BooleanValue (true)); - + ApplicationContainer p = ping.Install (nodes.Get (0)); p.Start (Seconds (0)); p.Stop (Seconds (totalTime) - Seconds(0.001)); - + // move node away Ptr node = nodes.Get (size/2); Ptr mob = node->GetObject (); diff --git a/src/aodv/helper/aodv-helper.h b/src/aodv/helper/aodv-helper.h index 3a9e663b0..c5cf9d16d 100644 --- a/src/aodv/helper/aodv-helper.h +++ b/src/aodv/helper/aodv-helper.h @@ -61,7 +61,7 @@ public: * This method controls the attributes of ns3::aodv::RoutingProtocol */ void Set (std::string name, const AttributeValue &value); - + private: ObjectFactory m_agentFactory; }; diff --git a/src/aodv/model/aodv-id-cache.cc b/src/aodv/model/aodv-id-cache.cc index 8924e84b6..fae34e976 100644 --- a/src/aodv/model/aodv-id-cache.cc +++ b/src/aodv/model/aodv-id-cache.cc @@ -37,19 +37,19 @@ IdCache::IsDuplicate (Ipv4Address addr, uint32_t id) { Purge (); for (std::vector::const_iterator i = m_idCache.begin (); - i != m_idCache.end (); ++i) + i != m_idCache.end (); ++i) if (i->m_context == addr && i->m_id == id) return true; struct UniqueId uniqueId = - { addr, id, m_lifetime + Simulator::Now () }; - m_idCache.push_back (uniqueId); + { addr, id, m_lifetime + Simulator::Now () }; + m_idCache.push_back (uniqueId); return false; } void IdCache::Purge () { m_idCache.erase (remove_if (m_idCache.begin (), m_idCache.end (), - IsExpired ()), m_idCache.end ()); + IsExpired ()), m_idCache.end ()); } uint32_t @@ -59,4 +59,5 @@ IdCache::GetSize () return m_idCache.size (); } -}} +} +} diff --git a/src/aodv/model/aodv-id-cache.h b/src/aodv/model/aodv-id-cache.h index 5330af007..0471d7dfe 100644 --- a/src/aodv/model/aodv-id-cache.h +++ b/src/aodv/model/aodv-id-cache.h @@ -46,7 +46,7 @@ class IdCache { public: /// c-tor - IdCache (Time lifetime): m_lifetime (lifetime) {} + IdCache (Time lifetime) : m_lifetime (lifetime) {} /// Check that entry (addr, id) exists in cache. Add entry, if it doesn't exist. bool IsDuplicate (Ipv4Address addr, uint32_t id); /// Remove all expired entries diff --git a/src/aodv/model/aodv-neighbor.cc b/src/aodv/model/aodv-neighbor.cc index 0816bb82b..a9320b907 100644 --- a/src/aodv/model/aodv-neighbor.cc +++ b/src/aodv/model/aodv-neighbor.cc @@ -41,7 +41,7 @@ Neighbors::Neighbors (Time delay) : { m_ntimer.SetDelay(delay); m_ntimer.SetFunction(&Neighbors::Purge, this); - m_txErrorCallback = MakeCallback (& Neighbors::ProcessTxError, this); + m_txErrorCallback = MakeCallback (&Neighbors::ProcessTxError, this); } bool @@ -49,7 +49,7 @@ Neighbors::IsNeighbor (Ipv4Address addr) { Purge (); for (std::vector::const_iterator i = m_nb.begin (); - i != m_nb.end (); ++i) + i != m_nb.end (); ++i) { if (i->m_neighborAddress == addr) return true; @@ -62,7 +62,7 @@ Neighbors::GetExpireTime (Ipv4Address addr) { Purge (); for (std::vector::const_iterator i = m_nb.begin (); i - != m_nb.end (); ++i) + != m_nb.end (); ++i) { if (i->m_neighborAddress == addr) return (i->m_expireTime - Simulator::Now ()); @@ -77,7 +77,7 @@ Neighbors::Update (Ipv4Address addr, Time expire) if (i->m_neighborAddress == addr) { i->m_expireTime - = std::max (expire + Simulator::Now (), i->m_expireTime); + = std::max (expire + Simulator::Now (), i->m_expireTime); if (i->m_hardwareAddress == Mac48Address ()) i->m_hardwareAddress = LookupMacAddress (i->m_neighborAddress); return; @@ -144,7 +144,7 @@ Neighbors::LookupMacAddress (Ipv4Address addr) { Mac48Address hwaddr; for (std::vector >::const_iterator i = m_arp.begin (); - i != m_arp.end (); ++i) + i != m_arp.end (); ++i) { ArpCache::Entry * entry = (*i)->Lookup (addr); if (entry != 0 && entry->IsAlive () && !entry->IsExpired ()) diff --git a/src/aodv/model/aodv-neighbor.h b/src/aodv/model/aodv-neighbor.h index 7709ffc68..28748cc6a 100644 --- a/src/aodv/model/aodv-neighbor.h +++ b/src/aodv/model/aodv-neighbor.h @@ -58,7 +58,7 @@ public: Mac48Address m_hardwareAddress; Time m_expireTime; bool close; - + Neighbor (Ipv4Address ip, Mac48Address mac, Time t) : m_neighborAddress (ip), m_hardwareAddress (mac), m_expireTime (t), close (false) @@ -77,7 +77,7 @@ public: void ScheduleTimer (); /// Remove all entries void Clear () { m_nb.clear (); } - + /// Add ARP cache to be used to allow layer 2 notifications processing void AddArpCache (Ptr); /// Don't use given ARP cache any more (interface is down) @@ -101,7 +101,7 @@ private: std::vector m_nb; /// list of ARP cached to be used for layer 2 notifications processing std::vector > m_arp; - + /// Find MAC address by IP using list of ARP caches Mac48Address LookupMacAddress (Ipv4Address); /// Process layer 2 TX error notification diff --git a/src/aodv/model/aodv-packet.cc b/src/aodv/model/aodv-packet.cc index d67cff599..d752d3b1f 100644 --- a/src/aodv/model/aodv-packet.cc +++ b/src/aodv/model/aodv-packet.cc @@ -45,9 +45,9 @@ TypeId TypeHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::aodv::TypeHeader") - .SetParent
() - .AddConstructor () - ; + .SetParent
() + .AddConstructor () + ; return tid; } @@ -141,8 +141,8 @@ operator<< (std::ostream & os, TypeHeader const & h) //----------------------------------------------------------------------------- RreqHeader::RreqHeader (uint8_t flags, uint8_t reserved, uint8_t hopCount, uint32_t requestID, Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin, uint32_t originSeqNo) : - m_flags (flags), m_reserved (reserved), m_hopCount (hopCount), m_requestID (requestID), m_dst(dst), - m_dstSeqNo (dstSeqNo), m_origin(origin), m_originSeqNo (originSeqNo) + m_flags (flags), m_reserved (reserved), m_hopCount (hopCount), m_requestID (requestID), m_dst(dst), + m_dstSeqNo (dstSeqNo), m_origin(origin), m_originSeqNo (originSeqNo) { } @@ -152,9 +152,9 @@ TypeId RreqHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::aodv::RreqHeader") - .SetParent
() - .AddConstructor () - ; + .SetParent
() + .AddConstructor () + ; return tid; } @@ -205,11 +205,11 @@ void RreqHeader::Print (std::ostream &os) const { os << "RREQ ID " << m_requestID << " destination: ipv4 " << m_dst - << " sequence number " << m_dstSeqNo << " source: ipv4 " - << m_origin << " sequence number " << m_originSeqNo - << " flags:" << " Gratuitous RREP " << (*this).GetGratiousRrep () - << " Destination only " << (*this).GetDestinationOnly () - << " Unknown sequence number " << (*this).GetUnknownSeqno (); + << " sequence number " << m_dstSeqNo << " source: ipv4 " + << m_origin << " sequence number " << m_originSeqNo + << " flags:" << " Gratuitous RREP " << (*this).GetGratiousRrep () + << " Destination only " << (*this).GetDestinationOnly () + << " Unknown sequence number " << (*this).GetUnknownSeqno (); } std::ostream & @@ -279,8 +279,8 @@ RreqHeader::operator== (RreqHeader const & o) const RrepHeader::RrepHeader (uint8_t prefixSize, uint8_t hopCount, Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin, Time lifeTime) : - m_flags (0), m_prefixSize (prefixSize), m_hopCount (hopCount), - m_dst (dst), m_dstSeqNo (dstSeqNo), m_origin (origin) + m_flags (0), m_prefixSize (prefixSize), m_hopCount (hopCount), + m_dst (dst), m_dstSeqNo (dstSeqNo), m_origin (origin) { m_lifeTime = uint32_t (lifeTime.GetMilliSeconds ()); } @@ -291,9 +291,9 @@ TypeId RrepHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::aodv::RrepHeader") - .SetParent
() - .AddConstructor () - ; + .SetParent
() + .AddConstructor () + ; return tid; } @@ -348,7 +348,7 @@ RrepHeader::Print (std::ostream &os) const os << " prefix size " << m_prefixSize; } os << " source ipv4 " << m_origin << " lifetime " << m_lifeTime - << " acknowledgment required flag " << (*this).GetAckRequired (); + << " acknowledgment required flag " << (*this).GetAckRequired (); } void @@ -432,9 +432,9 @@ TypeId RrepAckHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::aodv::RrepAckHeader") - .SetParent
() - .AddConstructor () - ; + .SetParent
() + .AddConstructor () + ; return tid; } @@ -498,9 +498,9 @@ TypeId RerrHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::aodv::RerrHeader") - .SetParent
() - .AddConstructor () - ; + .SetParent
() + .AddConstructor () + ; return tid; } diff --git a/src/aodv/model/aodv-packet.h b/src/aodv/model/aodv-packet.h index 73ef4fa9c..5cc181a6a 100644 --- a/src/aodv/model/aodv-packet.h +++ b/src/aodv/model/aodv-packet.h @@ -104,9 +104,9 @@ class RreqHeader : public Header public: /// c-tor RreqHeader (uint8_t flags = 0, uint8_t reserved = 0, uint8_t hopCount = 0, - uint32_t requestID = 0, Ipv4Address dst = Ipv4Address (), - uint32_t dstSeqNo = 0, Ipv4Address origin = Ipv4Address (), - uint32_t originSeqNo = 0); + uint32_t requestID = 0, Ipv4Address dst = Ipv4Address (), + uint32_t dstSeqNo = 0, Ipv4Address origin = Ipv4Address (), + uint32_t originSeqNo = 0); ///\name Header serialization/deserialization //\{ @@ -182,8 +182,8 @@ class RrepHeader : public Header public: /// c-tor RrepHeader (uint8_t prefixSize = 0, uint8_t hopCount = 0, Ipv4Address dst = - Ipv4Address (), uint32_t dstSeqNo = 0, Ipv4Address origin = - Ipv4Address (), Time lifetime = MilliSeconds (0)); + Ipv4Address (), uint32_t dstSeqNo = 0, Ipv4Address origin = + Ipv4Address (), Time lifetime = MilliSeconds (0)); ///\name Header serialization/deserialization //\{ static TypeId GetTypeId (); @@ -221,12 +221,12 @@ public: bool operator== (RrepHeader const & o) const; private: - uint8_t m_flags; ///< A - acknowledgment required flag - uint8_t m_prefixSize; ///< Prefix Size - uint8_t m_hopCount; ///< Hop Count + uint8_t m_flags; ///< A - acknowledgment required flag + uint8_t m_prefixSize; ///< Prefix Size + uint8_t m_hopCount; ///< Hop Count Ipv4Address m_dst; ///< Destination IP Address uint32_t m_dstSeqNo; ///< Destination Sequence Number - Ipv4Address m_origin; ///< Source IP Address + Ipv4Address m_origin; ///< Source IP Address uint32_t m_lifeTime; ///< Lifetime (in milliseconds) }; diff --git a/src/aodv/model/aodv-routing-protocol.cc b/src/aodv/model/aodv-routing-protocol.cc index 106f81205..87b6500aa 100644 --- a/src/aodv/model/aodv-routing-protocol.cc +++ b/src/aodv/model/aodv-routing-protocol.cc @@ -57,7 +57,7 @@ struct DeferredRouteOutputTag : public Tag { /// Positive if output device is fixed in RouteOutput int32_t oif; - + DeferredRouteOutputTag (int32_t o = -1) : Tag(), oif (o) {} static TypeId GetTypeId () @@ -65,27 +65,27 @@ struct DeferredRouteOutputTag : public Tag static TypeId tid = TypeId ("ns3::aodv::DeferredRouteOutputTag").SetParent (); return tid; } - + TypeId GetInstanceTypeId () const { return GetTypeId (); } - + uint32_t GetSerializedSize () const { return sizeof(int32_t); } - + void Serialize (TagBuffer i) const { i.WriteU32 (oif); } - + void Deserialize (TagBuffer i) { oif = i.ReadU32 (); } - + void Print (std::ostream &os) const { os << "DeferredRouteOutputTag: output interface = " << oif; @@ -96,6 +96,7 @@ struct DeferredRouteOutputTag : public Tag RoutingProtocol::RoutingProtocol () : RreqRetries (2), RreqRateLimit (10), + RerrRateLimit (10), ActiveRouteTimeout (Seconds (3)), NetDiameter (35), NodeTraversalTime (MilliSeconds (40)), @@ -121,8 +122,10 @@ RoutingProtocol::RoutingProtocol () : m_dpd (PathDiscoveryTime), m_nb(HelloInterval), m_rreqCount (0), + m_rerrCount (0), m_htimer (Timer::CANCEL_ON_DESTROY), - m_rreqRateLimitTimer (Timer::CANCEL_ON_DESTROY) + m_rreqRateLimitTimer (Timer::CANCEL_ON_DESTROY), + m_rerrRateLimitTimer (Timer::CANCEL_ON_DESTROY) { if (EnableHello) { @@ -134,98 +137,102 @@ TypeId RoutingProtocol::GetTypeId (void) { static TypeId tid = TypeId ("ns3::aodv::RoutingProtocol") - .SetParent () - .AddConstructor () - .AddAttribute ("HelloInterval", "HELLO messages emission interval.", - TimeValue (Seconds (1)), - MakeTimeAccessor (&RoutingProtocol::HelloInterval), - MakeTimeChecker ()) - .AddAttribute ("RreqRetries", "Maximum number of retransmissions of RREQ to discover a route", - UintegerValue (2), - MakeUintegerAccessor (&RoutingProtocol::RreqRetries), - MakeUintegerChecker ()) - .AddAttribute ("RreqRateLimit", "Maximum number of RREQ per second.", - UintegerValue (10), - MakeUintegerAccessor (&RoutingProtocol::RreqRateLimit), - MakeUintegerChecker ()) - .AddAttribute ("NodeTraversalTime", "Conservative estimate of the average one hop traversal time for packets and should include " - "queuing delays, interrupt processing times and transfer times.", - TimeValue (MilliSeconds (40)), - MakeTimeAccessor (&RoutingProtocol::NodeTraversalTime), - MakeTimeChecker ()) - .AddAttribute ("NextHopWait", "Period of our waiting for the neighbour's RREP_ACK = 10 ms + NodeTraversalTime", - TimeValue (MilliSeconds (50)), - MakeTimeAccessor (&RoutingProtocol::NextHopWait), - MakeTimeChecker ()) - .AddAttribute ("ActiveRouteTimeout", "Period of time during which the route is considered to be valid", - TimeValue (Seconds (3)), - MakeTimeAccessor (&RoutingProtocol::ActiveRouteTimeout), - MakeTimeChecker ()) - .AddAttribute ("MyRouteTimeout", "Value of lifetime field in RREP generating by this node = 2 * max(ActiveRouteTimeout, PathDiscoveryTime)", - TimeValue (Seconds (11.2)), - MakeTimeAccessor (&RoutingProtocol::MyRouteTimeout), - MakeTimeChecker ()) - .AddAttribute ("BlackListTimeout", "Time for which the node is put into the blacklist = RreqRetries * NetTraversalTime", - TimeValue (Seconds (5.6)), - MakeTimeAccessor (&RoutingProtocol::BlackListTimeout), - MakeTimeChecker ()) - .AddAttribute ("DeletePeriod", "DeletePeriod is intended to provide an upper bound on the time for which an upstream node A " - "can have a neighbor B as an active next hop for destination D, while B has invalidated the route to D." - " = 5 * max (HelloInterval, ActiveRouteTimeout)", - TimeValue (Seconds (15)), - MakeTimeAccessor (&RoutingProtocol::DeletePeriod), - MakeTimeChecker ()) - .AddAttribute ("TimeoutBuffer", "Its purpose is to provide a buffer for the timeout so that if the RREP is delayed" - " due to congestion, a timeout is less likely to occur while the RREP is still en route back to the source.", - UintegerValue (2), - MakeUintegerAccessor (&RoutingProtocol::TimeoutBuffer), - MakeUintegerChecker ()) - .AddAttribute ("NetDiameter", "Net diameter measures the maximum possible number of hops between two nodes in the network", - UintegerValue (35), - MakeUintegerAccessor (&RoutingProtocol::NetDiameter), - MakeUintegerChecker ()) - .AddAttribute ("NetTraversalTime", "Estimate of the average net traversal time = 2 * NodeTraversalTime * NetDiameter", - TimeValue (Seconds (2.8)), - MakeTimeAccessor (&RoutingProtocol::NetTraversalTime), - MakeTimeChecker ()) - .AddAttribute ("PathDiscoveryTime", "Estimate of maximum time needed to find route in network = 2 * NetTraversalTime", - TimeValue (Seconds (5.6)), - MakeTimeAccessor (&RoutingProtocol::PathDiscoveryTime), - MakeTimeChecker ()) - .AddAttribute ("MaxQueueLen", "Maximum number of packets that we allow a routing protocol to buffer.", - UintegerValue (64), - MakeUintegerAccessor (&RoutingProtocol::SetMaxQueueLen, - &RoutingProtocol::GetMaxQueueLen), - MakeUintegerChecker ()) - .AddAttribute ("MaxQueueTime", "Maximum time packets can be queued (in seconds)", - TimeValue (Seconds (30)), - MakeTimeAccessor (&RoutingProtocol::SetMaxQueueTime, - &RoutingProtocol::GetMaxQueueTime), - MakeTimeChecker ()) - .AddAttribute ("AllowedHelloLoss", "Number of hello messages which may be loss for valid link.", - UintegerValue (2), - MakeUintegerAccessor (&RoutingProtocol::AllowedHelloLoss), - MakeUintegerChecker ()) - .AddAttribute ("GratuitousReply", "Indicates whether a gratuitous RREP should be unicast to the node originated route discovery.", - BooleanValue (true), - MakeBooleanAccessor (&RoutingProtocol::SetGratuitousReplyFlag, - &RoutingProtocol::GetGratuitousReplyFlag), - MakeBooleanChecker ()) - .AddAttribute ("DestinationOnly", "Indicates only the destination may respond to this RREQ.", - BooleanValue (false), - MakeBooleanAccessor (&RoutingProtocol::SetDesinationOnlyFlag, - &RoutingProtocol::GetDesinationOnlyFlag), - MakeBooleanChecker ()) - .AddAttribute ("EnableHello", "Indicates whether a hello messages enable.", - BooleanValue (true), - MakeBooleanAccessor (&RoutingProtocol::SetHelloEnable, - &RoutingProtocol::GetHelloEnable), - MakeBooleanChecker ()) - .AddAttribute ("EnableBroadcast", "Indicates whether a broadcast data packets forwarding enable.", - BooleanValue (true), - MakeBooleanAccessor (&RoutingProtocol::SetBroadcastEnable, - &RoutingProtocol::GetBroadcastEnable), - MakeBooleanChecker ()) + .SetParent () + .AddConstructor () + .AddAttribute ("HelloInterval", "HELLO messages emission interval.", + TimeValue (Seconds (1)), + MakeTimeAccessor (&RoutingProtocol::HelloInterval), + MakeTimeChecker ()) + .AddAttribute ("RreqRetries", "Maximum number of retransmissions of RREQ to discover a route", + UintegerValue (2), + MakeUintegerAccessor (&RoutingProtocol::RreqRetries), + MakeUintegerChecker ()) + .AddAttribute ("RreqRateLimit", "Maximum number of RREQ per second.", + UintegerValue (10), + MakeUintegerAccessor (&RoutingProtocol::RreqRateLimit), + MakeUintegerChecker ()) + .AddAttribute ("RerrRateLimit", "Maximum number of RERR per second.", + UintegerValue (10), + MakeUintegerAccessor (&RoutingProtocol::RerrRateLimit), + MakeUintegerChecker ()) + .AddAttribute ("NodeTraversalTime", "Conservative estimate of the average one hop traversal time for packets and should include " + "queuing delays, interrupt processing times and transfer times.", + TimeValue (MilliSeconds (40)), + MakeTimeAccessor (&RoutingProtocol::NodeTraversalTime), + MakeTimeChecker ()) + .AddAttribute ("NextHopWait", "Period of our waiting for the neighbour's RREP_ACK = 10 ms + NodeTraversalTime", + TimeValue (MilliSeconds (50)), + MakeTimeAccessor (&RoutingProtocol::NextHopWait), + MakeTimeChecker ()) + .AddAttribute ("ActiveRouteTimeout", "Period of time during which the route is considered to be valid", + TimeValue (Seconds (3)), + MakeTimeAccessor (&RoutingProtocol::ActiveRouteTimeout), + MakeTimeChecker ()) + .AddAttribute ("MyRouteTimeout", "Value of lifetime field in RREP generating by this node = 2 * max(ActiveRouteTimeout, PathDiscoveryTime)", + TimeValue (Seconds (11.2)), + MakeTimeAccessor (&RoutingProtocol::MyRouteTimeout), + MakeTimeChecker ()) + .AddAttribute ("BlackListTimeout", "Time for which the node is put into the blacklist = RreqRetries * NetTraversalTime", + TimeValue (Seconds (5.6)), + MakeTimeAccessor (&RoutingProtocol::BlackListTimeout), + MakeTimeChecker ()) + .AddAttribute ("DeletePeriod", "DeletePeriod is intended to provide an upper bound on the time for which an upstream node A " + "can have a neighbor B as an active next hop for destination D, while B has invalidated the route to D." + " = 5 * max (HelloInterval, ActiveRouteTimeout)", + TimeValue (Seconds (15)), + MakeTimeAccessor (&RoutingProtocol::DeletePeriod), + MakeTimeChecker ()) + .AddAttribute ("TimeoutBuffer", "Its purpose is to provide a buffer for the timeout so that if the RREP is delayed" + " due to congestion, a timeout is less likely to occur while the RREP is still en route back to the source.", + UintegerValue (2), + MakeUintegerAccessor (&RoutingProtocol::TimeoutBuffer), + MakeUintegerChecker ()) + .AddAttribute ("NetDiameter", "Net diameter measures the maximum possible number of hops between two nodes in the network", + UintegerValue (35), + MakeUintegerAccessor (&RoutingProtocol::NetDiameter), + MakeUintegerChecker ()) + .AddAttribute ("NetTraversalTime", "Estimate of the average net traversal time = 2 * NodeTraversalTime * NetDiameter", + TimeValue (Seconds (2.8)), + MakeTimeAccessor (&RoutingProtocol::NetTraversalTime), + MakeTimeChecker ()) + .AddAttribute ("PathDiscoveryTime", "Estimate of maximum time needed to find route in network = 2 * NetTraversalTime", + TimeValue (Seconds (5.6)), + MakeTimeAccessor (&RoutingProtocol::PathDiscoveryTime), + MakeTimeChecker ()) + .AddAttribute ("MaxQueueLen", "Maximum number of packets that we allow a routing protocol to buffer.", + UintegerValue (64), + MakeUintegerAccessor (&RoutingProtocol::SetMaxQueueLen, + &RoutingProtocol::GetMaxQueueLen), + MakeUintegerChecker ()) + .AddAttribute ("MaxQueueTime", "Maximum time packets can be queued (in seconds)", + TimeValue (Seconds (30)), + MakeTimeAccessor (&RoutingProtocol::SetMaxQueueTime, + &RoutingProtocol::GetMaxQueueTime), + MakeTimeChecker ()) + .AddAttribute ("AllowedHelloLoss", "Number of hello messages which may be loss for valid link.", + UintegerValue (2), + MakeUintegerAccessor (&RoutingProtocol::AllowedHelloLoss), + MakeUintegerChecker ()) + .AddAttribute ("GratuitousReply", "Indicates whether a gratuitous RREP should be unicast to the node originated route discovery.", + BooleanValue (true), + MakeBooleanAccessor (&RoutingProtocol::SetGratuitousReplyFlag, + &RoutingProtocol::GetGratuitousReplyFlag), + MakeBooleanChecker ()) + .AddAttribute ("DestinationOnly", "Indicates only the destination may respond to this RREQ.", + BooleanValue (false), + MakeBooleanAccessor (&RoutingProtocol::SetDesinationOnlyFlag, + &RoutingProtocol::GetDesinationOnlyFlag), + MakeBooleanChecker ()) + .AddAttribute ("EnableHello", "Indicates whether a hello messages enable.", + BooleanValue (true), + MakeBooleanAccessor (&RoutingProtocol::SetHelloEnable, + &RoutingProtocol::GetHelloEnable), + MakeBooleanChecker ()) + .AddAttribute ("EnableBroadcast", "Indicates whether a broadcast data packets forwarding enable.", + BooleanValue (true), + MakeBooleanAccessor (&RoutingProtocol::SetBroadcastEnable, + &RoutingProtocol::GetBroadcastEnable), + MakeBooleanChecker ()) ; return tid; } @@ -233,8 +240,8 @@ RoutingProtocol::GetTypeId (void) void RoutingProtocol::SetMaxQueueLen (uint32_t len) { - MaxQueueLen = len; - m_queue.SetMaxQueueLen (len); + MaxQueueLen = len; + m_queue.SetMaxQueueLen (len); } void RoutingProtocol::SetMaxQueueTime (Time t) @@ -251,8 +258,8 @@ void RoutingProtocol::DoDispose () { m_ipv4 = 0; - for (std::map , Ipv4InterfaceAddress>::iterator iter = - m_socketAddresses.begin (); iter != m_socketAddresses.end (); iter++) + for (std::map, Ipv4InterfaceAddress>::iterator iter = + m_socketAddresses.begin (); iter != m_socketAddresses.end (); iter++) { iter->first->Close (); } @@ -276,16 +283,21 @@ RoutingProtocol::Start () m_nb.ScheduleTimer (); } m_rreqRateLimitTimer.SetFunction (&RoutingProtocol::RreqRateLimitTimerExpire, - this); + this); m_rreqRateLimitTimer.Schedule (Seconds (1)); + + m_rerrRateLimitTimer.SetFunction (&RoutingProtocol::RerrRateLimitTimerExpire, + this); + m_rerrRateLimitTimer.Schedule (Seconds (1)); + } Ptr RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, - Ptr oif, Socket::SocketErrno &sockerr) + Ptr oif, Socket::SocketErrno &sockerr) { - NS_LOG_FUNCTION (this << header << (oif? oif->GetIfIndex () : 0)); - if (! p) + NS_LOG_FUNCTION (this << header << (oif ? oif->GetIfIndex () : 0)); + if (!p) { return LoopbackRoute (header, oif); // later } @@ -321,7 +333,7 @@ RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, // routed to loopback, received from loopback and passed to RouteInput (see below) uint32_t iif = (oif ? m_ipv4->GetInterfaceForDevice (oif) : -1); DeferredRouteOutputTag tag (iif); - if (! p->PeekPacketTag (tag)) + if (!p->PeekPacketTag (tag)) { p->AddPacketTag (tag); } @@ -330,7 +342,7 @@ RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, void RoutingProtocol::DeferredRouteOutput (Ptr p, const Ipv4Header & header, - UnicastForwardCallback ucb, ErrorCallback ecb) + UnicastForwardCallback ucb, ErrorCallback ecb) { NS_LOG_FUNCTION (this << p << header); NS_ASSERT (p != 0 && p != Ptr ()); @@ -352,8 +364,8 @@ RoutingProtocol::DeferredRouteOutput (Ptr p, const Ipv4Header & he bool RoutingProtocol::RouteInput (Ptr p, const Ipv4Header &header, - Ptr idev, UnicastForwardCallback ucb, - MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) + Ptr idev, UnicastForwardCallback ucb, + MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) { NS_LOG_FUNCTION (this << p->GetUid() << header.GetDestination() << idev->GetAddress()); if (m_socketAddresses.empty ()) @@ -369,7 +381,7 @@ RoutingProtocol::RouteInput (Ptr p, const Ipv4Header &header, Ipv4Address dst = header.GetDestination (); Ipv4Address origin = header.GetSource (); - + // Deferred route request if (idev == m_lo) { @@ -380,7 +392,7 @@ RoutingProtocol::RouteInput (Ptr p, const Ipv4Header &header, return true; } } - + // Duplicate of own packet if (IsMyOwnAddress (origin)) return true; @@ -392,8 +404,8 @@ RoutingProtocol::RouteInput (Ptr p, const Ipv4Header &header, } // Broadcast local delivery/forwarding - for (std::map , Ipv4InterfaceAddress>::const_iterator j = - m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) + for (std::map, Ipv4InterfaceAddress>::const_iterator j = + m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) { Ipv4InterfaceAddress iface = j->second; if (m_ipv4->GetInterfaceForAddress (iface.GetLocal ()) == iif) @@ -442,7 +454,7 @@ RoutingProtocol::RouteInput (Ptr p, const Ipv4Header &header, return true; } } - + // Unicast local delivery if (m_ipv4->IsDestinationAddress (dst, iif)) { @@ -472,7 +484,7 @@ RoutingProtocol::RouteInput (Ptr p, const Ipv4Header &header, bool RoutingProtocol::Forwarding (Ptr p, const Ipv4Header & header, - UnicastForwardCallback ucb, ErrorCallback ecb) + UnicastForwardCallback ucb, ErrorCallback ecb) { NS_LOG_FUNCTION (this); Ipv4Address dst = header.GetDestination (); @@ -531,7 +543,7 @@ RoutingProtocol::SetIpv4 (Ptr ipv4) { NS_ASSERT (ipv4 != 0); NS_ASSERT (m_ipv4 == 0); - + if (EnableHello) { m_htimer.SetFunction (&RoutingProtocol::HelloTimerExpire, this); @@ -539,18 +551,18 @@ RoutingProtocol::SetIpv4 (Ptr ipv4) } m_ipv4 = ipv4; - + // Create lo route. It is asserted that the only one interface up for now is loopback NS_ASSERT (m_ipv4->GetNInterfaces () == 1 && m_ipv4->GetAddress (0, 0).GetLocal () == Ipv4Address ("127.0.0.1")); m_lo = m_ipv4->GetNetDevice (0); NS_ASSERT (m_lo != 0); // Remember lo route - RoutingTableEntry rt (/*device=*/m_lo, /*dst=*/Ipv4Address::GetLoopback (), /*know seqno=*/true, /*seqno=*/0, - /*iface=*/Ipv4InterfaceAddress (Ipv4Address::GetLoopback (), Ipv4Mask ("255.0.0.0")), - /*hops=*/1, /*next hop=*/Ipv4Address::GetLoopback (), - /*lifetime=*/Simulator::GetMaximumSimulationTime ()); + RoutingTableEntry rt (/*device=*/ m_lo, /*dst=*/ Ipv4Address::GetLoopback (), /*know seqno=*/ true, /*seqno=*/ 0, + /*iface=*/ Ipv4InterfaceAddress (Ipv4Address::GetLoopback (), Ipv4Mask ("255.0.0.0")), + /*hops=*/ 1, /*next hop=*/ Ipv4Address::GetLoopback (), + /*lifetime=*/ Simulator::GetMaximumSimulationTime ()); m_routingTable.AddRoute (rt); - + Simulator::ScheduleNow (&RoutingProtocol::Start, this); } @@ -569,7 +581,7 @@ RoutingProtocol::NotifyInterfaceUp (uint32_t i) // Create a socket to listen only on this interface Ptr socket = Socket::CreateSocket (GetObject (), - UdpSocketFactory::GetTypeId ()); + UdpSocketFactory::GetTypeId ()); NS_ASSERT (socket != 0); socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this)); socket->BindToNetDevice (l3->GetNetDevice (i)); @@ -580,10 +592,10 @@ RoutingProtocol::NotifyInterfaceUp (uint32_t i) // Add local broadcast record to the routing table Ptr dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (iface.GetLocal ())); - RoutingTableEntry rt (/*device=*/dev, /*dst=*/iface.GetBroadcast (), /*know seqno=*/true, /*seqno=*/0, /*iface=*/iface, - /*hops=*/1, /*next hop=*/iface.GetBroadcast (), /*lifetime=*/Simulator::GetMaximumSimulationTime ()); + RoutingTableEntry rt (/*device=*/ dev, /*dst=*/ iface.GetBroadcast (), /*know seqno=*/ true, /*seqno=*/ 0, /*iface=*/ iface, + /*hops=*/ 1, /*next hop=*/ iface.GetBroadcast (), /*lifetime=*/ Simulator::GetMaximumSimulationTime ()); m_routingTable.AddRoute (rt); - + // Allow neighbor manager use this interface for layer 2 feedback if possible Ptr wifi = dev->GetObject (); if (wifi == 0) @@ -591,7 +603,7 @@ RoutingProtocol::NotifyInterfaceUp (uint32_t i) Ptr mac = wifi->GetMac (); if (mac == 0) return; - + mac->TraceConnectWithoutContext ("TxErrHeader", m_nb.GetTxErrorCallback ()); m_nb.AddArpCache (l3->GetInterface (i)->GetArpCache ()); } @@ -611,11 +623,11 @@ RoutingProtocol::NotifyInterfaceDown (uint32_t i) if (mac != 0) { mac->TraceDisconnectWithoutContext ("TxErrHeader", - m_nb.GetTxErrorCallback ()); + m_nb.GetTxErrorCallback ()); m_nb.DelArpCache (l3->GetInterface (i)->GetArpCache ()); } } - + // Close socket Ptr socket = FindSocketWithInterfaceAddress (m_ipv4->GetAddress (i, 0)); NS_ASSERT (socket); @@ -649,7 +661,7 @@ RoutingProtocol::NotifyAddAddress (uint32_t i, Ipv4InterfaceAddress address) return; // Create a socket to listen only on this interface Ptr socket = Socket::CreateSocket (GetObject (), - UdpSocketFactory::GetTypeId ()); + UdpSocketFactory::GetTypeId ()); NS_ASSERT (socket != 0); socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv,this)); socket->BindToNetDevice (l3->GetNetDevice (i)); @@ -661,9 +673,9 @@ RoutingProtocol::NotifyAddAddress (uint32_t i, Ipv4InterfaceAddress address) // Add local broadcast record to the routing table Ptr dev = m_ipv4->GetNetDevice ( m_ipv4->GetInterfaceForAddress (iface.GetLocal ())); - RoutingTableEntry rt (/*device=*/dev, /*dst=*/iface.GetBroadcast (), /*know seqno=*/true, - /*seqno=*/0, /*iface=*/iface, /*hops=*/1, - /*next hop=*/iface.GetBroadcast (), /*lifetime=*/Simulator::GetMaximumSimulationTime ()); + RoutingTableEntry rt (/*device=*/ dev, /*dst=*/ iface.GetBroadcast (), /*know seqno=*/ true, + /*seqno=*/ 0, /*iface=*/ iface, /*hops=*/ 1, + /*next hop=*/ iface.GetBroadcast (), /*lifetime=*/ Simulator::GetMaximumSimulationTime ()); m_routingTable.AddRoute (rt); } } @@ -688,7 +700,7 @@ RoutingProtocol::NotifyRemoveAddress (uint32_t i, Ipv4InterfaceAddress address) Ipv4InterfaceAddress iface = l3->GetAddress (i, 0); // Create a socket to listen only on this interface Ptr socket = Socket::CreateSocket (GetObject (), - UdpSocketFactory::GetTypeId ()); + UdpSocketFactory::GetTypeId ()); NS_ASSERT (socket != 0); socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this)); // Bind to any IP address so that broadcasts can be received @@ -698,8 +710,8 @@ RoutingProtocol::NotifyRemoveAddress (uint32_t i, Ipv4InterfaceAddress address) // Add local broadcast record to the routing table Ptr dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (iface.GetLocal ())); - RoutingTableEntry rt (/*device=*/dev, /*dst=*/iface.GetBroadcast (), /*know seqno=*/true, /*seqno=*/0, /*iface=*/iface, - /*hops=*/1, /*next hop=*/iface.GetBroadcast (), /*lifetime=*/Simulator::GetMaximumSimulationTime ()); + RoutingTableEntry rt (/*device=*/ dev, /*dst=*/ iface.GetBroadcast (), /*know seqno=*/ true, /*seqno=*/ 0, /*iface=*/ iface, + /*hops=*/ 1, /*next hop=*/ iface.GetBroadcast (), /*lifetime=*/ Simulator::GetMaximumSimulationTime ()); m_routingTable.AddRoute (rt); } if (m_socketAddresses.empty ()) @@ -721,8 +733,8 @@ bool RoutingProtocol::IsMyOwnAddress (Ipv4Address src) { NS_LOG_FUNCTION (this << src); - for (std::map , Ipv4InterfaceAddress>::const_iterator j = - m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) + for (std::map, Ipv4InterfaceAddress>::const_iterator j = + m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) { Ipv4InterfaceAddress iface = j->second; if (src == iface.GetLocal ()) @@ -756,7 +768,7 @@ RoutingProtocol::LoopbackRoute (const Ipv4Header & hdr, Ptr oif) cons // If RouteOutput() caller specified an outgoing interface, that // further constrains the selection of source address // - std::map , Ipv4InterfaceAddress>::const_iterator j = m_socketAddresses.begin (); + std::map, Ipv4InterfaceAddress>::const_iterator j = m_socketAddresses.begin (); if (oif) { // Iterate to find an address on the oif device @@ -789,7 +801,7 @@ RoutingProtocol::SendRequest (Ipv4Address dst) if (m_rreqCount == RreqRateLimit) { Simulator::Schedule (m_rreqRateLimitTimer.GetDelayLeft () + MicroSeconds (100), - &RoutingProtocol::SendRequest, this, dst); + &RoutingProtocol::SendRequest, this, dst); return; } else @@ -813,9 +825,9 @@ RoutingProtocol::SendRequest (Ipv4Address dst) { rreqHeader.SetUnknownSeqno (true); Ptr dev = 0; - RoutingTableEntry newEntry (/*device=*/dev, /*dst=*/dst, /*validSeqNo=*/false, /*seqno=*/0, - /*iface=*/Ipv4InterfaceAddress(),/*hop=*/0, - /*nextHop=*/Ipv4Address(), /*lifeTime=*/Seconds(0)); + RoutingTableEntry newEntry (/*device=*/ dev, /*dst=*/ dst, /*validSeqNo=*/ false, /*seqno=*/ 0, + /*iface=*/ Ipv4InterfaceAddress(),/*hop=*/ 0, + /*nextHop=*/ Ipv4Address(), /*lifeTime=*/ Seconds(0)); newEntry.SetFlag (IN_SEARCH); m_routingTable.AddRoute (newEntry); } @@ -832,8 +844,8 @@ RoutingProtocol::SendRequest (Ipv4Address dst) rreqHeader.SetHopCount (0); // Send RREQ as subnet directed broadcast from each interface used by aodv - for (std::map , Ipv4InterfaceAddress>::const_iterator j = - m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) + for (std::map, Ipv4InterfaceAddress>::const_iterator j = + m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) { Ptr socket = j->first; Ipv4InterfaceAddress iface = j->second; @@ -935,11 +947,14 @@ RoutingProtocol::UpdateRouteLifeTime (Ipv4Address addr, Time lifetime) RoutingTableEntry rt; if (m_routingTable.LookupRoute (addr, rt)) { - rt.SetFlag (VALID); - rt.SetRreqCnt (0); - rt.SetLifeTime (std::max (lifetime, rt.GetLifeTime ())); - m_routingTable.Update (rt); - return true; + if (rt.GetFlag () == VALID) + { + NS_LOG_DEBUG ("Updating VALID route"); + rt.SetRreqCnt (0); + rt.SetLifeTime (std::max (lifetime, rt.GetLifeTime ())); + m_routingTable.Update (rt); + return true; + } } return false; } @@ -952,9 +967,9 @@ RoutingProtocol::UpdateRouteToNeighbor (Ipv4Address sender, Ipv4Address receiver if (!m_routingTable.LookupRoute (sender, toNeighbor)) { Ptr dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver)); - RoutingTableEntry newEntry (/*device=*/dev, /*dst=*/sender, /*know seqno=*/false, /*seqno=*/0, - /*iface=*/m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0), - /*hops=*/1, /*next hop=*/sender, /*lifetime=*/ActiveRouteTimeout); + RoutingTableEntry newEntry (/*device=*/ dev, /*dst=*/ sender, /*know seqno=*/ false, /*seqno=*/ 0, + /*iface=*/ m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0), + /*hops=*/ 1, /*next hop=*/ sender, /*lifetime=*/ ActiveRouteTimeout); m_routingTable.AddRoute (newEntry); } else @@ -966,9 +981,9 @@ RoutingProtocol::UpdateRouteToNeighbor (Ipv4Address sender, Ipv4Address receiver } else { - RoutingTableEntry newEntry (/*device=*/dev, /*dst=*/sender, /*know seqno=*/false, /*seqno=*/0, - /*iface=*/m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0), - /*hops=*/1, /*next hop=*/sender, /*lifetime=*/std::max (ActiveRouteTimeout, toNeighbor.GetLifeTime ())); + RoutingTableEntry newEntry (/*device=*/ dev, /*dst=*/ sender, /*know seqno=*/ false, /*seqno=*/ 0, + /*iface=*/ m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0), + /*hops=*/ 1, /*next hop=*/ sender, /*lifetime=*/ std::max (ActiveRouteTimeout, toNeighbor.GetLifeTime ())); m_routingTable.Update (newEntry); } } @@ -1020,9 +1035,9 @@ RoutingProtocol::RecvRequest (Ptr p, Ipv4Address receiver, Ipv4Address s if (!m_routingTable.LookupRoute (origin, toOrigin)) { Ptr dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver)); - RoutingTableEntry newEntry (/*device=*/dev, /*dst=*/origin, /*validSeno=*/true, /*seqNo=*/rreqHeader.GetOriginSeqno (), - /*iface=*/m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0), /*hops=*/hop, - /*nextHop*/src, /*timeLife=*/Time ((2 * NetTraversalTime - 2 * hop * NodeTraversalTime))); + RoutingTableEntry newEntry (/*device=*/ dev, /*dst=*/ origin, /*validSeno=*/ true, /*seqNo=*/ rreqHeader.GetOriginSeqno (), + /*iface=*/ m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0), /*hops=*/ hop, + /*nextHop*/ src, /*timeLife=*/ Time ((2 * NetTraversalTime - 2 * hop * NodeTraversalTime))); m_routingTable.AddRoute (newEntry); } else @@ -1089,8 +1104,8 @@ RoutingProtocol::RecvRequest (Ptr p, Ipv4Address receiver, Ipv4Address s } } - for (std::map , Ipv4InterfaceAddress>::const_iterator j = - m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) + for (std::map, Ipv4InterfaceAddress>::const_iterator j = + m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) { Ptr socket = j->first; Ipv4InterfaceAddress iface = j->second; @@ -1128,8 +1143,8 @@ RoutingProtocol::SendReply (RreqHeader const & rreqHeader, RoutingTableEntry con */ if (!rreqHeader.GetUnknownSeqno () && (rreqHeader.GetDstSeqno () == m_seqNo + 1)) m_seqNo++; - RrepHeader rrepHeader ( /*prefixSize=*/0, /*hops=*/0, /*dst=*/rreqHeader.GetDst (), - /*dstSeqNo=*/m_seqNo, /*origin=*/toOrigin.GetDestination (), /*lifeTime=*/MyRouteTimeout); + RrepHeader rrepHeader ( /*prefixSize=*/ 0, /*hops=*/ 0, /*dst=*/ rreqHeader.GetDst (), + /*dstSeqNo=*/ m_seqNo, /*origin=*/ toOrigin.GetDestination (), /*lifeTime=*/ MyRouteTimeout); Ptr packet = Create (); packet->AddHeader (rrepHeader); TypeHeader tHeader (AODVTYPE_RREP); @@ -1143,8 +1158,8 @@ void RoutingProtocol::SendReplyByIntermediateNode (RoutingTableEntry & toDst, RoutingTableEntry & toOrigin, bool gratRep) { NS_LOG_FUNCTION (this); - RrepHeader rrepHeader (/*prefix size=*/0, /*hops=*/toDst.GetHop (), /*dst=*/toDst.GetDestination (), /*dst seqno=*/toDst.GetSeqNo (), - /*origin=*/toOrigin.GetDestination (), /*lifetime=*/toDst.GetLifeTime ()); + RrepHeader rrepHeader (/*prefix size=*/ 0, /*hops=*/ toDst.GetHop (), /*dst=*/ toDst.GetDestination (), /*dst seqno=*/ toDst.GetSeqNo (), + /*origin=*/ toOrigin.GetDestination (), /*lifetime=*/ toDst.GetLifeTime ()); /* If the node we received a RREQ for is a neighbor we are * probably facing a unidirectional link... Better request a RREP-ack */ @@ -1173,9 +1188,9 @@ RoutingProtocol::SendReplyByIntermediateNode (RoutingTableEntry & toDst, Routing // Generating gratuitous RREPs if (gratRep) { - RrepHeader gratRepHeader (/*prefix size=*/0, /*hops=*/toOrigin.GetHop (), /*dst=*/toOrigin.GetDestination (), - /*dst seqno=*/toOrigin.GetSeqNo (), /*origin=*/toDst.GetDestination (), - /*lifetime=*/toOrigin.GetLifeTime ()); + RrepHeader gratRepHeader (/*prefix size=*/ 0, /*hops=*/ toOrigin.GetHop (), /*dst=*/ toOrigin.GetDestination (), + /*dst seqno=*/ toOrigin.GetSeqNo (), /*origin=*/ toDst.GetDestination (), + /*lifetime=*/ toOrigin.GetLifeTime ()); Ptr packetToDst = Create (); packetToDst->AddHeader (gratRepHeader); TypeHeader type (AODVTYPE_RREP); @@ -1233,9 +1248,9 @@ RoutingProtocol::RecvReply (Ptr p, Ipv4Address receiver, Ipv4Address sen * - and the destination sequence number is the Destination Sequence Number in the RREP message. */ Ptr dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver)); - RoutingTableEntry newEntry (/*device=*/dev, /*dst=*/dst, /*validSeqNo=*/true, /*seqno=*/rrepHeader.GetDstSeqno (), - /*iface=*/m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0),/*hop=*/hop, - /*nextHop=*/sender, /*lifeTime=*/rrepHeader.GetLifeTime ()); + RoutingTableEntry newEntry (/*device=*/ dev, /*dst=*/ dst, /*validSeqNo=*/ true, /*seqno=*/ rrepHeader.GetDstSeqno (), + /*iface=*/ m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0),/*hop=*/ hop, + /*nextHop=*/ sender, /*lifeTime=*/ rrepHeader.GetLifeTime ()); RoutingTableEntry toDst; if (m_routingTable.LookupRoute (dst, toDst)) { @@ -1293,7 +1308,7 @@ RoutingProtocol::RecvReply (Ptr p, Ipv4Address receiver, Ipv4Address sen } RoutingTableEntry toOrigin; - if (! m_routingTable.LookupRoute (rrepHeader.GetOrigin (), toOrigin) || toOrigin.GetFlag () == IN_SEARCH) + if (!m_routingTable.LookupRoute (rrepHeader.GetOrigin (), toOrigin) || toOrigin.GetFlag () == IN_SEARCH) { return; // Impossible! drop. } @@ -1319,7 +1334,7 @@ RoutingProtocol::RecvReply (Ptr p, Ipv4Address receiver, Ipv4Address sen toNextHopToOrigin.InsertPrecursor (toDst.GetNextHop ()); m_routingTable.Update (toNextHopToOrigin); } - + Ptr packet = Create (); packet->AddHeader (rrepHeader); TypeHeader tHeader (AODVTYPE_RREP); @@ -1355,9 +1370,9 @@ RoutingProtocol::ProcessHello (RrepHeader const & rrepHeader, Ipv4Address receiv if (!m_routingTable.LookupRoute (rrepHeader.GetDst (), toNeighbor)) { Ptr dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver)); - RoutingTableEntry newEntry (/*device=*/dev, /*dst=*/rrepHeader.GetDst (), /*validSeqNo=*/true, /*seqno=*/rrepHeader.GetDstSeqno (), - /*iface=*/m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0), - /*hop=*/1, /*nextHop=*/rrepHeader.GetDst (), /*lifeTime=*/rrepHeader.GetLifeTime ()); + RoutingTableEntry newEntry (/*device=*/ dev, /*dst=*/ rrepHeader.GetDst (), /*validSeqNo=*/ true, /*seqno=*/ rrepHeader.GetDstSeqno (), + /*iface=*/ m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0), + /*hop=*/ 1, /*nextHop=*/ rrepHeader.GetDst (), /*lifeTime=*/ rrepHeader.GetLifeTime ()); m_routingTable.AddRoute (newEntry); } else @@ -1393,7 +1408,7 @@ RoutingProtocol::RecvError (Ptr p, Ipv4Address src ) else { for (std::map::const_iterator i = - dstWithNextHopSrc.begin (); i != dstWithNextHopSrc.end (); ++i) + dstWithNextHopSrc.begin (); i != dstWithNextHopSrc.end (); ++i) { if (i->first == un.first) { @@ -1405,7 +1420,7 @@ RoutingProtocol::RecvError (Ptr p, Ipv4Address src ) std::vector precursors; for (std::map::const_iterator i = unreachable.begin (); - i != unreachable.end ();) + i != unreachable.end ();) { if (!rerrHeader.AddUnDestination (i->first, i->second)) { @@ -1493,6 +1508,14 @@ RoutingProtocol::RreqRateLimitTimerExpire () m_rreqRateLimitTimer.Schedule (Seconds (1)); } +void +RoutingProtocol::RerrRateLimitTimerExpire () +{ + NS_LOG_FUNCTION (this); + m_rerrCount = 0; + m_rerrRateLimitTimer.Schedule (Seconds (1)); +} + void RoutingProtocol::AckTimerExpire (Ipv4Address neighbor, Time blacklistTimeout) { @@ -1510,12 +1533,12 @@ RoutingProtocol::SendHello () * Hop Count 0 * Lifetime AllowedHelloLoss * HelloInterval */ - for (std::map , Ipv4InterfaceAddress>::const_iterator j = m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) + for (std::map, Ipv4InterfaceAddress>::const_iterator j = m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) { Ptr socket = j->first; Ipv4InterfaceAddress iface = j->second; - RrepHeader helloHeader (/*prefix size=*/0, /*hops=*/0, /*dst=*/iface.GetLocal (), /*dst seqno=*/m_seqNo, - /*origin=*/iface.GetLocal (),/*lifetime=*/Time (AllowedHelloLoss * HelloInterval)); + RrepHeader helloHeader (/*prefix size=*/ 0, /*hops=*/ 0, /*dst=*/ iface.GetLocal (), /*dst seqno=*/ m_seqNo, + /*origin=*/ iface.GetLocal (),/*lifetime=*/ Time (AllowedHelloLoss * HelloInterval)); Ptr packet = Create (); packet->AddHeader (helloHeader); TypeHeader tHeader (AODVTYPE_RREP); @@ -1573,7 +1596,7 @@ RoutingProtocol::SendRerrWhenBreaksLinkToNextHop (Ipv4Address nextHop) rerrHeader.AddUnDestination (nextHop, toNextHop.GetSeqNo ()); m_routingTable.GetListOfDestinationWithNextHop (nextHop, unreachable); for (std::map::const_iterator i = unreachable.begin (); i - != unreachable.end ();) + != unreachable.end ();) { if (!rerrHeader.AddUnDestination (i->first, i->second)) { @@ -1607,9 +1630,20 @@ RoutingProtocol::SendRerrWhenBreaksLinkToNextHop (Ipv4Address nextHop) void RoutingProtocol::SendRerrWhenNoRouteToForward (Ipv4Address dst, - uint32_t dstSeqNo, Ipv4Address origin) + uint32_t dstSeqNo, Ipv4Address origin) { NS_LOG_FUNCTION (this); + // A node SHOULD NOT originate more than RERR_RATELIMIT RERR messages per second. + if (m_rerrCount == RerrRateLimit) + { + // Just make sure that the RerrRateLimit timer is running and will expire + NS_ASSERT (m_rerrRateLimitTimer.IsRunning ()); + // discard the packet and return + NS_LOG_LOGIC ("RerrRateLimit reached at " << Simulator::Now ().GetSeconds () << " with timer delay left " + << m_rerrRateLimitTimer.GetDelayLeft ().GetSeconds () + << "; suppressing RERR"); + return; + } RerrHeader rerrHeader; rerrHeader.AddUnDestination (dst, dstSeqNo); RoutingTableEntry toOrigin; @@ -1623,11 +1657,11 @@ RoutingProtocol::SendRerrWhenNoRouteToForward (Ipv4Address dst, NS_ASSERT (socket); NS_LOG_LOGIC ("Unicast RERR to the source of the data transmission"); socket->SendTo (packet, 0, InetSocketAddress (toOrigin.GetNextHop (), AODV_PORT)); - } + } else { - for (std::map , Ipv4InterfaceAddress>::const_iterator i = - m_socketAddresses.begin (); i != m_socketAddresses.end (); ++i) + for (std::map, Ipv4InterfaceAddress>::const_iterator i = + m_socketAddresses.begin (); i != m_socketAddresses.end (); ++i) { Ptr socket = i->first; Ipv4InterfaceAddress iface = i->second; @@ -1658,6 +1692,17 @@ RoutingProtocol::SendRerrMessage (Ptr packet, std::vector p NS_LOG_LOGIC ("No precursors"); return; } + // A node SHOULD NOT originate more than RERR_RATELIMIT RERR messages per second. + if (m_rerrCount == RerrRateLimit) + { + // Just make sure that the RerrRateLimit timer is running and will expire + NS_ASSERT (m_rerrRateLimitTimer.IsRunning ()); + // discard the packet and return + NS_LOG_LOGIC ("RerrRateLimit reached at " << Simulator::Now ().GetSeconds () << " with timer delay left " + << m_rerrRateLimitTimer.GetDelayLeft ().GetSeconds () + << "; suppressing RERR"); + return; + } // If there is only one precursor, RERR SHOULD be unicast toward that precursor if (precursors.size () == 1) { @@ -1668,6 +1713,7 @@ RoutingProtocol::SendRerrMessage (Ptr packet, std::vector p NS_ASSERT (socket); NS_LOG_LOGIC ("one precursor => unicast RERR to " << toPrecursor.GetDestination() << " from " << toPrecursor.GetInterface ().GetLocal ()); socket->SendTo (packet, 0, InetSocketAddress (precursors.front (), AODV_PORT)); + m_rerrCount++; } return; } @@ -1680,7 +1726,7 @@ RoutingProtocol::SendRerrMessage (Ptr packet, std::vector p if (m_routingTable.LookupValidRoute (*i, toPrecursor) && std::find (ifaces.begin (), ifaces.end (), toPrecursor.GetInterface ()) == ifaces.end ()) { - ifaces.push_back (toPrecursor.GetInterface ()); + ifaces.push_back (toPrecursor.GetInterface ()); } } @@ -1700,6 +1746,7 @@ RoutingProtocol::SendRerrMessage (Ptr packet, std::vector p destination = i->GetBroadcast (); } socket->SendTo (packet, 0, InetSocketAddress (destination, AODV_PORT)); + m_rerrCount++; } } @@ -1707,8 +1754,8 @@ Ptr RoutingProtocol::FindSocketWithInterfaceAddress (Ipv4InterfaceAddress addr ) const { NS_LOG_FUNCTION (this << addr); - for (std::map , Ipv4InterfaceAddress>::const_iterator j = - m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) + for (std::map, Ipv4InterfaceAddress>::const_iterator j = + m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) { Ptr socket = j->first; Ipv4InterfaceAddress iface = j->second; diff --git a/src/aodv/model/aodv-routing-protocol.h b/src/aodv/model/aodv-routing-protocol.h index 9f1b63570..f9ba43a08 100644 --- a/src/aodv/model/aodv-routing-protocol.h +++ b/src/aodv/model/aodv-routing-protocol.h @@ -64,8 +64,8 @@ public: //\{ Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb); virtual void NotifyInterfaceUp (uint32_t interface); virtual void NotifyInterfaceDown (uint32_t interface); virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); @@ -73,7 +73,7 @@ public: virtual void SetIpv4 (Ptr ipv4); virtual void PrintRoutingTable (Ptr stream) const; //\} - + ///\name Handle protocol parameters //\{ Time GetMaxQueueTime () const { return MaxQueueTime; } @@ -94,6 +94,7 @@ private: //\{ uint32_t RreqRetries; ///< Maximum number of retransmissions of RREQ with TTL = NetDiameter to discover a route uint16_t RreqRateLimit; ///< Maximum number of RREQ per second. + uint16_t RerrRateLimit; ///< Maximum number of REER per second. Time ActiveRouteTimeout; ///< Period of time during which the route is considered to be valid. uint32_t NetDiameter; ///< Net diameter measures the maximum possible number of hops between two nodes in the network /** @@ -136,7 +137,7 @@ private: std::map< Ptr, Ipv4InterfaceAddress > m_socketAddresses; /// Loopback device used to defer RREQ until packet will be fully formed Ptr m_lo; - + /// Routing table RoutingTable m_routingTable; /// A "drop-front" queue used by the routing layer to buffer packets to which it does not have a route. @@ -153,6 +154,8 @@ private: Neighbors m_nb; /// Number of RREQs used for RREQ rate control uint16_t m_rreqCount; + /// Number of RERRs used for RERR rate control + uint16_t m_rerrCount; private: /// Start protocol operation @@ -187,7 +190,7 @@ private: void ProcessHello (RrepHeader const & rrepHeader, Ipv4Address receiverIfaceAddr); /// Create loopback route for given header Ptr LoopbackRoute (const Ipv4Header & header, Ptr oif) const; - + ///\name Receive control packets //\{ /// Receive and process control packet @@ -195,13 +198,13 @@ private: /// Receive RREQ void RecvRequest (Ptr p, Ipv4Address receiver, Ipv4Address src); /// Receive RREP - void RecvReply (Ptr p, Ipv4Address my ,Ipv4Address src); + void RecvReply (Ptr p, Ipv4Address my,Ipv4Address src); /// Receive RREP_ACK void RecvReplyAck (Ipv4Address neighbor); /// Receive RERR from node with address src void RecvError (Ptr p, Ipv4Address src); //\} - + ///\name Send //\{ /// Forward packet from route request queue @@ -232,7 +235,7 @@ private: */ void SendRerrWhenNoRouteToForward (Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin); //\} - + /// Hello timer Timer m_htimer; /// Schedule next send of hello message @@ -241,6 +244,10 @@ private: Timer m_rreqRateLimitTimer; /// Reset RREQ count and schedule RREQ rate limit timer with delay 1 sec. void RreqRateLimitTimerExpire (); + /// RERR rate limit timer + Timer m_rerrRateLimitTimer; + /// Reset RERR count and schedule RERR rate limit timer with delay 1 sec. + void RerrRateLimitTimerExpire (); /// Map IP address + RREQ timer. std::map m_addressReqTimer; /// Handle route discovery process diff --git a/src/aodv/model/aodv-rqueue.cc b/src/aodv/model/aodv-rqueue.cc index bc3c742b3..dd8b1ae25 100644 --- a/src/aodv/model/aodv-rqueue.cc +++ b/src/aodv/model/aodv-rqueue.cc @@ -50,7 +50,7 @@ RequestQueue::Enqueue (QueueEntry & entry) { Purge (); for (std::vector::const_iterator i = m_queue.begin (); i - != m_queue.end (); ++i) + != m_queue.end (); ++i) { if ((i->GetPacket ()->GetUid () == entry.GetPacket ()->GetUid ()) && (i->GetIpv4Header ().GetDestination () @@ -73,7 +73,7 @@ RequestQueue::DropPacketWithDst (Ipv4Address dst) NS_LOG_FUNCTION (this << dst); Purge (); for (std::vector::iterator i = m_queue.begin (); i - != m_queue.end (); ++i) + != m_queue.end (); ++i) { if (IsEqual (*i, dst)) { @@ -81,7 +81,7 @@ RequestQueue::DropPacketWithDst (Ipv4Address dst) } } m_queue.erase (std::remove_if (m_queue.begin (), m_queue.end (), - std::bind2nd (std::ptr_fun (RequestQueue::IsEqual), dst)), m_queue.end ()); + std::bind2nd (std::ptr_fun (RequestQueue::IsEqual), dst)), m_queue.end ()); } bool @@ -104,7 +104,7 @@ bool RequestQueue::Find (Ipv4Address dst) { for (std::vector::const_iterator i = m_queue.begin (); i - != m_queue.end (); ++i) + != m_queue.end (); ++i) { if (i->GetIpv4Header ().GetDestination () == dst) return true; @@ -126,7 +126,7 @@ RequestQueue::Purge () { IsExpired pred; for (std::vector::iterator i = m_queue.begin (); i - != m_queue.end (); ++i) + != m_queue.end (); ++i) { if (pred (*i)) { @@ -134,7 +134,7 @@ RequestQueue::Purge () } } m_queue.erase (std::remove_if (m_queue.begin (), m_queue.end (), pred), - m_queue.end ()); + m_queue.end ()); } void @@ -142,7 +142,7 @@ RequestQueue::Drop (QueueEntry en, std::string reason) { NS_LOG_LOGIC (reason << en.GetPacket ()->GetUid () << " " << en.GetIpv4Header ().GetDestination ()); en.GetErrorCallback () (en.GetPacket (), en.GetIpv4Header (), - Socket::ERROR_NOROUTETOHOST); + Socket::ERROR_NOROUTETOHOST); return; } diff --git a/src/aodv/model/aodv-rqueue.h b/src/aodv/model/aodv-rqueue.h index 645168268..a7e165a04 100644 --- a/src/aodv/model/aodv-rqueue.h +++ b/src/aodv/model/aodv-rqueue.h @@ -49,8 +49,8 @@ public: QueueEntry (Ptr pa = 0, Ipv4Header const & h = Ipv4Header (), UnicastForwardCallback ucb = UnicastForwardCallback (), ErrorCallback ecb = ErrorCallback (), Time exp = Simulator::Now ()) : - m_packet (pa), m_header (h), m_ucb (ucb), m_ecb (ecb), - m_expire (exp + Simulator::Now ()) + m_packet (pa), m_header (h), m_ucb (ucb), m_ecb (ecb), + m_expire (exp + Simulator::Now ()) {} /** @@ -132,6 +132,7 @@ private: }; -}} +} +} #endif /* AODV_RQUEUE_H */ diff --git a/src/aodv/model/aodv-rtable.cc b/src/aodv/model/aodv-rtable.cc index f4a96d677..a10e0ca5b 100644 --- a/src/aodv/model/aodv-rtable.cc +++ b/src/aodv/model/aodv-rtable.cc @@ -45,10 +45,10 @@ namespace aodv RoutingTableEntry::RoutingTableEntry (Ptr dev, Ipv4Address dst, bool vSeqNo, uint32_t seqNo, Ipv4InterfaceAddress iface, uint16_t hops, Ipv4Address nextHop, Time lifetime) : - m_ackTimer (Timer::CANCEL_ON_DESTROY), - m_validSeqNo (vSeqNo), m_seqNo (seqNo), m_hops (hops), - m_lifeTime (lifetime + Simulator::Now ()), m_iface (iface), m_flag (VALID), - m_reqCount (0), m_blackListState (false), m_blackListTimeout (Simulator::Now ()) + m_ackTimer (Timer::CANCEL_ON_DESTROY), + m_validSeqNo (vSeqNo), m_seqNo (seqNo), m_hops (hops), + m_lifeTime (lifetime + Simulator::Now ()), m_iface (iface), m_flag (VALID), + m_reqCount (0), m_blackListState (false), m_blackListTimeout (Simulator::Now ()) { m_ipv4Route = Create (); m_ipv4Route->SetDestination (dst); @@ -79,7 +79,7 @@ RoutingTableEntry::LookupPrecursor (Ipv4Address id) { NS_LOG_FUNCTION (this << id); for (std::vector::const_iterator i = m_precursorList.begin (); i - != m_precursorList.end (); ++i) + != m_precursorList.end (); ++i) { if (*i == id) { @@ -96,7 +96,7 @@ RoutingTableEntry::DeletePrecursor (Ipv4Address id) { NS_LOG_FUNCTION (this << id); std::vector::iterator i = std::remove (m_precursorList.begin (), - m_precursorList.end (), id); + m_precursorList.end (), id); if (i == m_precursorList.end ()) { NS_LOG_LOGIC ("Precursor " << id << " not found"); @@ -130,11 +130,11 @@ RoutingTableEntry::GetPrecursors (std::vector & prec) const if (IsPrecursorListEmpty ()) return; for (std::vector::const_iterator i = m_precursorList.begin (); i - != m_precursorList.end (); ++i) + != m_precursorList.end (); ++i) { bool result = true; for (std::vector::const_iterator j = prec.begin (); j - != prec.end (); ++j) + != prec.end (); ++j) { if (*j == *i) result = false; @@ -181,8 +181,8 @@ RoutingTableEntry::Print (Ptr stream) const } *os << "\t"; *os << std::setiosflags (std::ios::fixed) << - std::setiosflags (std::ios::left) << std::setprecision (2) << - std::setw (14) << (m_lifeTime - Simulator::Now ()).GetSeconds (); + std::setiosflags (std::ios::left) << std::setprecision (2) << + std::setw (14) << (m_lifeTime - Simulator::Now ()).GetSeconds (); *os << "\t" << m_hops << "\n"; } @@ -206,12 +206,12 @@ RoutingTable::LookupRoute (Ipv4Address id, RoutingTableEntry & rt) return false; } std::map::const_iterator i = - m_ipv4AddressEntry.find (id); + m_ipv4AddressEntry.find (id); if (i == m_ipv4AddressEntry.end ()) - { - NS_LOG_LOGIC ("Route to " << id << " not found"); - return false; - } + { + NS_LOG_LOGIC ("Route to " << id << " not found"); + return false; + } rt = i->second; NS_LOG_LOGIC ("Route to " << id << " found"); return true; @@ -221,7 +221,7 @@ bool RoutingTable::LookupValidRoute (Ipv4Address id, RoutingTableEntry & rt) { NS_LOG_FUNCTION (this << id); - if (! LookupRoute (id, rt)) + if (!LookupRoute (id, rt)) { NS_LOG_LOGIC ("Route to " << id << " not found"); return false; @@ -252,7 +252,7 @@ RoutingTable::AddRoute (RoutingTableEntry & rt) if (rt.GetFlag () != IN_SEARCH) rt.SetRreqCnt (0); std::pair::iterator, bool> result = - m_ipv4AddressEntry.insert (std::make_pair (rt.GetDestination (), rt)); + m_ipv4AddressEntry.insert (std::make_pair (rt.GetDestination (), rt)); return result.second; } @@ -261,7 +261,7 @@ RoutingTable::Update (RoutingTableEntry & rt) { NS_LOG_FUNCTION (this); std::map::iterator i = - m_ipv4AddressEntry.find (rt.GetDestination ()); + m_ipv4AddressEntry.find (rt.GetDestination ()); if (i == m_ipv4AddressEntry.end ()) { NS_LOG_LOGIC ("Route update to " << rt.GetDestination () << " fails; not found"); @@ -281,7 +281,7 @@ RoutingTable::SetEntryState (Ipv4Address id, RouteFlags state) { NS_LOG_FUNCTION (this); std::map::iterator i = - m_ipv4AddressEntry.find (id); + m_ipv4AddressEntry.find (id); if (i == m_ipv4AddressEntry.end ()) { NS_LOG_LOGIC ("Route set entry state to " << id << " fails; not found"); @@ -300,7 +300,7 @@ RoutingTable::GetListOfDestinationWithNextHop (Ipv4Address nextHop, std::map::const_iterator i = - m_ipv4AddressEntry.begin (); i != m_ipv4AddressEntry.end (); ++i) + m_ipv4AddressEntry.begin (); i != m_ipv4AddressEntry.end (); ++i) { if (i->second.GetNextHop () == nextHop) { @@ -316,10 +316,10 @@ RoutingTable::InvalidateRoutesWithDst (const std::map & u NS_LOG_FUNCTION (this); Purge (); for (std::map::iterator i = - m_ipv4AddressEntry.begin (); i != m_ipv4AddressEntry.end (); ++i) + m_ipv4AddressEntry.begin (); i != m_ipv4AddressEntry.end (); ++i) { for (std::map::const_iterator j = - unreachable.begin (); j != unreachable.end (); ++j) + unreachable.begin (); j != unreachable.end (); ++j) { if ((i->first == j->first) && (i->second.GetFlag () == VALID)) { @@ -337,7 +337,7 @@ RoutingTable::DeleteAllRoutesFromInterface (Ipv4InterfaceAddress iface) if (m_ipv4AddressEntry.empty ()) return; for (std::map::iterator i = - m_ipv4AddressEntry.begin (); i != m_ipv4AddressEntry.end ();) + m_ipv4AddressEntry.begin (); i != m_ipv4AddressEntry.end ();) { if (i->second.GetInterface () == iface) { @@ -357,7 +357,7 @@ RoutingTable::Purge () if (m_ipv4AddressEntry.empty ()) return; for (std::map::iterator i = - m_ipv4AddressEntry.begin (); i != m_ipv4AddressEntry.end ();) + m_ipv4AddressEntry.begin (); i != m_ipv4AddressEntry.end ();) { if (i->second.GetLifeTime () < Seconds (0)) { @@ -390,7 +390,7 @@ RoutingTable::Purge (std::map &table) const if (table.empty ()) return; for (std::map::iterator i = - table.begin (); i != table.end ();) + table.begin (); i != table.end ();) { if (i->second.GetLifeTime () < Seconds (0)) { @@ -421,7 +421,7 @@ RoutingTable::MarkLinkAsUnidirectional (Ipv4Address neighbor, Time blacklistTime { NS_LOG_FUNCTION (this << neighbor << blacklistTimeout.GetSeconds ()); std::map::iterator i = - m_ipv4AddressEntry.find (neighbor); + m_ipv4AddressEntry.find (neighbor); if (i == m_ipv4AddressEntry.end ()) { NS_LOG_LOGIC ("Mark link unidirectional to " << neighbor << " fails; not found"); @@ -440,9 +440,9 @@ RoutingTable::Print (Ptr stream) const std::map table = m_ipv4AddressEntry; Purge (table); *stream->GetStream () << "\nAODV Routing table\n" - << "Destination\tGateway\t\tInterface\tFlag\tExpire\t\tHops\n"; + << "Destination\tGateway\t\tInterface\tFlag\tExpire\t\tHops\n"; for (std::map::const_iterator i = - table.begin (); i != table.end (); ++i) + table.begin (); i != table.end (); ++i) { i->second.Print (stream); } diff --git a/src/aodv/model/aodv-rtable.h b/src/aodv/model/aodv-rtable.h index c2899d681..89b0251a3 100644 --- a/src/aodv/model/aodv-rtable.h +++ b/src/aodv/model/aodv-rtable.h @@ -61,11 +61,11 @@ class RoutingTableEntry public: /// c-to RoutingTableEntry (Ptr dev = 0,Ipv4Address dst = Ipv4Address(), bool vSeqNo = false, uint32_t m_seqNo = 0, - Ipv4InterfaceAddress iface = Ipv4InterfaceAddress(), uint16_t hops = 0, - Ipv4Address nextHop = Ipv4Address(), Time lifetime = Simulator::Now()); + Ipv4InterfaceAddress iface = Ipv4InterfaceAddress(), uint16_t hops = 0, + Ipv4Address nextHop = Ipv4Address(), Time lifetime = Simulator::Now()); ~RoutingTableEntry (); - + ///\name Precursors management //\{ /** @@ -104,7 +104,7 @@ public: ///\name Fields //\{ Ipv4Address GetDestination () const { return m_ipv4Route->GetDestination(); } - Ptr GetRoute () const { return m_ipv4Route; } + Ptr GetRoute () const { return m_ipv4Route; } void SetRoute (Ptr r) { m_ipv4Route = r; } void SetNextHop (Ipv4Address nextHop) { m_ipv4Route->SetGateway(nextHop); } Ipv4Address GetNextHop () const { return m_ipv4Route->GetGateway(); } @@ -117,7 +117,7 @@ public: void SetSeqNo (uint32_t sn) { m_seqNo = sn; } uint32_t GetSeqNo () const { return m_seqNo; } void SetHop (uint16_t hop) { m_hops = hop; } - uint16_t GetHop () const {return m_hops; } + uint16_t GetHop () const { return m_hops; } void SetLifeTime (Time lt) { m_lifeTime = lt + Simulator::Now(); } Time GetLifeTime () const { return m_lifeTime - Simulator::Now(); } void SetFlag (RouteFlags flag) { m_flag = flag; } @@ -253,6 +253,7 @@ private: void Purge (std::map &table) const; }; -}} +} +} #endif /* AODV_RTABLE_H */ diff --git a/src/aodv/test/aodv-id-cache-test-suite.cc b/src/aodv/test/aodv-id-cache-test-suite.cc index 8c2bbd719..b0fd2da15 100644 --- a/src/aodv/test/aodv-id-cache-test-suite.cc +++ b/src/aodv/test/aodv-id-cache-test-suite.cc @@ -99,4 +99,5 @@ public: } } g_idCacheTestSuite; -}} +} +} diff --git a/src/aodv/test/aodv-regression.cc b/src/aodv/test/aodv-regression.cc index f97b84403..ee620dd1c 100644 --- a/src/aodv/test/aodv-regression.cc +++ b/src/aodv/test/aodv-regression.cc @@ -94,10 +94,10 @@ ChainRegressionTest::DoRun () { SeedManager::SetSeed(12345); Config::SetDefault ("ns3::ArpCache::AliveTimeout", TimeValue (m_arpAliveTimeout)); - + CreateNodes (); CreateDevices (); - + // At m_time / 3 move central node away and see what will happen Ptr node = m_nodes->Get (m_size / 2); Ptr mob = node->GetObject (); @@ -106,9 +106,9 @@ ChainRegressionTest::DoRun () Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - + if (!WRITE_VECTORS) CheckResults (); - + delete m_nodes, m_nodes = 0; } @@ -119,12 +119,12 @@ ChainRegressionTest::CreateNodes () m_nodes->Create (m_size); MobilityHelper mobility; mobility.SetPositionAllocator ("ns3::GridPositionAllocator", - "MinX", DoubleValue (0.0), - "MinY", DoubleValue (0.0), - "DeltaX", DoubleValue (m_step), - "DeltaY", DoubleValue (0), - "GridWidth", UintegerValue (m_size), - "LayoutType", StringValue ("RowFirst")); + "MinX", DoubleValue (0.0), + "MinY", DoubleValue (0.0), + "DeltaX", DoubleValue (m_step), + "DeltaY", DoubleValue (0), + "GridWidth", UintegerValue (m_size), + "LayoutType", StringValue ("RowFirst")); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (*m_nodes); } @@ -138,12 +138,12 @@ ChainRegressionTest::CreateDevices () YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); wifiPhy.SetChannel (wifiChannel.Create ()); - // This test suite output was originally based on YansErrorRateModel + // This test suite output was originally based on YansErrorRateModel wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); WifiHelper wifi = WifiHelper::Default (); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue ("OfdmRate6Mbps"), "RtsCtsThreshold", StringValue ("2200")); NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, *m_nodes); - + // 2. Setup TCP/IP & AODV AodvHelper aodv; // Use default parameters here InternetStackHelper internetStack; @@ -152,14 +152,14 @@ ChainRegressionTest::CreateDevices () Ipv4AddressHelper address; address.SetBase ("10.1.1.0", "255.255.255.0"); Ipv4InterfaceContainer interfaces = address.Assign (devices); - + // 3. Setup ping V4PingHelper ping (interfaces.GetAddress (m_size - 1)); ping.SetAttribute ("Verbose", BooleanValue (false)); // don't need verbose ping in regression test ApplicationContainer p = ping.Install (m_nodes->Get (0)); p.Start (Seconds (0)); p.Stop (m_time); - + // 4. write PCAP std::string prefix = (WRITE_VECTORS ? NS_TEST_SOURCEDIR : GetTempDir ()) + m_prefix; wifiPhy.EnablePcapAll (prefix); @@ -174,11 +174,11 @@ ChainRegressionTest::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << m_prefix << "-" << i << "-0.pcap"; os2 << GetTempDir () << m_prefix << "-" << i << "-0.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/aodv/test/aodv-regression.h b/src/aodv/test/aodv-regression.h index 63dad5330..09f615f05 100644 --- a/src/aodv/test/aodv-regression.h +++ b/src/aodv/test/aodv-regression.h @@ -163,12 +163,12 @@ public: * \param arpAliveTimeout ARP alive timeout, this is used to check that ARP and routing do not interfere */ ChainRegressionTest (const char * const prefix, Time time = Seconds (10), uint32_t size = 5, Time arpAliveTimeout = Seconds (120)); - ~ChainRegressionTest (); - + ~ChainRegressionTest (); + private: /// XXX It is important to have pointers here NodeContainer * m_nodes; - + /// PCAP file names prefix const std::string m_prefix; /// Total simulation time @@ -179,7 +179,7 @@ private: const double m_step; /// ARP alive timeout const Time m_arpAliveTimeout; - + /// Create test topology void CreateNodes (); /// Create devices, install TCP/IP stack and applications diff --git a/src/aodv/test/aodv-test-suite.cc b/src/aodv/test/aodv-test-suite.cc index 68cfe0b5d..997382836 100644 --- a/src/aodv/test/aodv-test-suite.cc +++ b/src/aodv/test/aodv-test-suite.cc @@ -93,7 +93,7 @@ NeighborTest::DoRun () Simulator::Schedule (Seconds (30), &NeighborTest::CheckTimeout3, this); Simulator::Run (); Simulator::Destroy (); - } +} //----------------------------------------------------------------------------- struct TypeHeaderTest : public TestCase { @@ -123,8 +123,8 @@ struct RreqHeaderTest : public TestCase } virtual void DoRun () { - RreqHeader h (/*flags*/0, /*reserved*/0, /*hopCount*/6, /*requestID*/1, /*dst*/Ipv4Address ("1.2.3.4"), - /*dstSeqNo*/40, /*origin*/Ipv4Address ("4.3.2.1"), /*originSeqNo*/10); + RreqHeader h (/*flags*/ 0, /*reserved*/ 0, /*hopCount*/ 6, /*requestID*/ 1, /*dst*/ Ipv4Address ("1.2.3.4"), + /*dstSeqNo*/ 40, /*origin*/ Ipv4Address ("4.3.2.1"), /*originSeqNo*/ 10); NS_TEST_EXPECT_MSG_EQ (h.GetGratiousRrep (), false, "trivial"); NS_TEST_EXPECT_MSG_EQ (h.GetDestinationOnly (), false, "trivial"); NS_TEST_EXPECT_MSG_EQ (h.GetHopCount (), 6, "trivial"); @@ -159,7 +159,7 @@ struct RreqHeaderTest : public TestCase uint32_t bytes = p->RemoveHeader (h2); NS_TEST_EXPECT_MSG_EQ (bytes, 23, "RREP is 23 bytes long"); NS_TEST_EXPECT_MSG_EQ (h, h2, "Round trip serialization works"); - + } }; //----------------------------------------------------------------------------- @@ -169,8 +169,8 @@ struct RrepHeaderTest : public TestCase RrepHeaderTest () : TestCase ("AODV RREP") {} virtual void DoRun () { - RrepHeader h (/*prefixSize*/0, /*hopCount*/12, /*dst*/Ipv4Address ("1.2.3.4"), /*dstSeqNo*/2, - /*origin*/Ipv4Address ("4.3.2.1"), /*lifetime*/Seconds (3)); + RrepHeader h (/*prefixSize*/ 0, /*hopCount*/ 12, /*dst*/ Ipv4Address ("1.2.3.4"), /*dstSeqNo*/ 2, + /*origin*/ Ipv4Address ("4.3.2.1"), /*lifetime*/ Seconds (3)); NS_TEST_EXPECT_MSG_EQ (h.GetPrefixSize (), 0, "trivial"); NS_TEST_EXPECT_MSG_EQ (h.GetHopCount (), 12, "trivial"); NS_TEST_EXPECT_MSG_EQ (h.GetDst (), Ipv4Address ("1.2.3.4"), "trivial"); @@ -396,8 +396,8 @@ struct AodvRtableEntryTest : public TestCase { Ptr dev; Ipv4InterfaceAddress iface; - RoutingTableEntry rt (/*output device*/dev, /*dst*/Ipv4Address("1.2.3.4"), /*validSeqNo*/true, /*seqNo*/10, - /*interface*/iface, /*hop*/5, /*next hop*/Ipv4Address("3.3.3.3"), /*lifetime*/Seconds(10)); + RoutingTableEntry rt (/*output device*/ dev, /*dst*/ Ipv4Address("1.2.3.4"), /*validSeqNo*/ true, /*seqNo*/ 10, + /*interface*/ iface, /*hop*/ 5, /*next hop*/ Ipv4Address("3.3.3.3"), /*lifetime*/ Seconds(10)); NS_TEST_EXPECT_MSG_EQ (rt.GetOutputDevice (), dev, "trivial"); NS_TEST_EXPECT_MSG_EQ (rt.GetDestination (), Ipv4Address ("1.2.3.4"), "trivial"); NS_TEST_EXPECT_MSG_EQ (rt.GetValidSeqNo (), true, "trivial"); @@ -479,12 +479,12 @@ struct AodvRtableTest : public TestCase NS_TEST_EXPECT_MSG_EQ (rtable.GetBadLinkLifetime (), Seconds (1), "trivial"); Ptr dev; Ipv4InterfaceAddress iface; - RoutingTableEntry rt (/*output device*/dev, /*dst*/Ipv4Address("1.2.3.4"), /*validSeqNo*/true, /*seqNo*/10, - /*interface*/iface, /*hop*/5, /*next hop*/Ipv4Address("1.1.1.1"), /*lifetime*/Seconds(10)); + RoutingTableEntry rt (/*output device*/ dev, /*dst*/ Ipv4Address("1.2.3.4"), /*validSeqNo*/ true, /*seqNo*/ 10, + /*interface*/ iface, /*hop*/ 5, /*next hop*/ Ipv4Address("1.1.1.1"), /*lifetime*/ Seconds(10)); NS_TEST_EXPECT_MSG_EQ (rtable.AddRoute (rt), true, "trivial"); NS_TEST_EXPECT_MSG_EQ (rtable.AddRoute (rt), false, "trivial"); - RoutingTableEntry rt2 (/*output device*/dev, /*dst*/Ipv4Address("4.3.2.1"), /*validSeqNo*/false, /*seqNo*/0, - /*interface*/iface, /*hop*/15, /*next hop*/Ipv4Address("1.1.1.1"), /*lifetime*/Seconds(1)); + RoutingTableEntry rt2 (/*output device*/ dev, /*dst*/ Ipv4Address("4.3.2.1"), /*validSeqNo*/ false, /*seqNo*/ 0, + /*interface*/ iface, /*hop*/ 15, /*next hop*/ Ipv4Address("1.1.1.1"), /*lifetime*/ Seconds(1)); NS_TEST_EXPECT_MSG_EQ (rtable.AddRoute (rt2), true, "trivial"); NS_TEST_EXPECT_MSG_EQ (rtable.LookupRoute (rt2.GetDestination (), rt), true, "trivial"); NS_TEST_EXPECT_MSG_EQ (rt2.GetDestination (), rt.GetDestination (), "trivial"); @@ -497,8 +497,8 @@ struct AodvRtableTest : public TestCase NS_TEST_EXPECT_MSG_EQ (rtable.SetEntryState (Ipv4Address ("10.0.0.1"), INVALID), false, "trivial"); NS_TEST_EXPECT_MSG_EQ (rtable.SetEntryState (Ipv4Address ("1.2.3.4"), IN_SEARCH), true, "trivial"); NS_TEST_EXPECT_MSG_EQ (rtable.DeleteRoute (Ipv4Address ("5.5.5.5")), false, "trivial"); - RoutingTableEntry rt4 (/*output device*/dev, /*dst*/Ipv4Address ("5.5.5.5"), /*validSeqNo*/false, /*seqNo*/0, - /*interface*/iface, /*hop*/15, /*next hop*/Ipv4Address ("1.1.1.1"), /*lifetime*/Seconds (-10)); + RoutingTableEntry rt4 (/*output device*/ dev, /*dst*/ Ipv4Address ("5.5.5.5"), /*validSeqNo*/ false, /*seqNo*/ 0, + /*interface*/ iface, /*hop*/ 15, /*next hop*/ Ipv4Address ("1.1.1.1"), /*lifetime*/ Seconds (-10)); NS_TEST_EXPECT_MSG_EQ (rtable.AddRoute (rt4), true, "trivial"); NS_TEST_EXPECT_MSG_EQ (rtable.SetEntryState (Ipv4Address ("5.5.5.5"), INVALID), true, "trivial"); NS_TEST_EXPECT_MSG_EQ (rtable.LookupRoute (Ipv4Address ("5.5.5.5"), rt), false, "trivial"); @@ -538,4 +538,5 @@ public: } } g_aodvTestSuite; -}} +} +} diff --git a/src/aodv/test/bug-772.cc b/src/aodv/test/bug-772.cc index f63271162..de274b81d 100644 --- a/src/aodv/test/bug-772.cc +++ b/src/aodv/test/bug-772.cc @@ -74,16 +74,16 @@ void Bug772ChainTest::DoRun () { SeedManager::SetSeed(12345); - + CreateNodes (); CreateDevices (); - + Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - + if (!WRITE_VECTORS) CheckResults (); - + delete m_nodes, m_nodes = 0; } @@ -94,12 +94,12 @@ Bug772ChainTest::CreateNodes () m_nodes->Create (m_size); MobilityHelper mobility; mobility.SetPositionAllocator ("ns3::GridPositionAllocator", - "MinX", DoubleValue (0.0), - "MinY", DoubleValue (0.0), - "DeltaX", DoubleValue (m_step), - "DeltaY", DoubleValue (0), - "GridWidth", UintegerValue (m_size), - "LayoutType", StringValue ("RowFirst")); + "MinX", DoubleValue (0.0), + "MinY", DoubleValue (0.0), + "DeltaX", DoubleValue (m_step), + "DeltaY", DoubleValue (0), + "GridWidth", UintegerValue (m_size), + "LayoutType", StringValue ("RowFirst")); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (*m_nodes); } @@ -111,14 +111,14 @@ Bug772ChainTest::CreateDevices () NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); wifiMac.SetType ("ns3::AdhocWifiMac"); YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); - // This test suite output was originally based on YansErrorRateModel - wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); + // This test suite output was originally based on YansErrorRateModel + wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); wifiPhy.SetChannel (wifiChannel.Create ()); WifiHelper wifi = WifiHelper::Default (); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue ("OfdmRate6Mbps"), "RtsCtsThreshold", StringValue ("2200")); NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, *m_nodes); - + // 2. Setup TCP/IP & AODV AodvHelper aodv; // Use default parameters here InternetStackHelper internetStack; @@ -127,7 +127,7 @@ Bug772ChainTest::CreateDevices () Ipv4AddressHelper address; address.SetBase ("10.1.1.0", "255.255.255.0"); Ipv4InterfaceContainer interfaces = address.Assign (devices); - + // 3. Setup UDP source and sink uint16_t port = 9; // Discard port (RFC 863) OnOffHelper onoff (m_proto, Address (InetSocketAddress (interfaces.GetAddress (m_size-1), port))); @@ -141,7 +141,7 @@ Bug772ChainTest::CreateDevices () PacketSinkHelper sink (m_proto, Address (InetSocketAddress (Ipv4Address::GetAny (), port))); app = sink.Install (m_nodes->Get (m_size - 1)); app.Start (Seconds (0.0)); - + // 4. write PCAP on the first and last nodes only std::string prefix = (WRITE_VECTORS ? NS_TEST_SOURCEDIR : GetTempDir ()) + m_prefix; wifiPhy.EnablePcap (prefix, devices.Get (0)); @@ -157,11 +157,11 @@ Bug772ChainTest::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << m_prefix << "-" << i << "-0.pcap"; os2 << GetTempDir () << m_prefix << "-" << i << "-0.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/aodv/test/bug-772.h b/src/aodv/test/bug-772.h index 9fd8b0c2f..f98993ecc 100644 --- a/src/aodv/test/bug-772.h +++ b/src/aodv/test/bug-772.h @@ -47,12 +47,12 @@ public: * \param time Simulation time */ Bug772ChainTest (const char * const prefix, const char * const proto, Time time, uint32_t size); - ~Bug772ChainTest (); - + ~Bug772ChainTest (); + private: /// XXX It is important to have pointers here NodeContainer * m_nodes; - + /// PCAP file names prefix const std::string m_prefix; /// Socket factory TID @@ -63,7 +63,7 @@ private: const uint32_t m_size; /// Chain step, meters const double m_step; - + /// Create test topology void CreateNodes (); /// Create devices, install TCP/IP stack and applications diff --git a/src/aodv/test/loopback.cc b/src/aodv/test/loopback.cc index 85176d42a..b07755890 100644 --- a/src/aodv/test/loopback.cc +++ b/src/aodv/test/loopback.cc @@ -51,7 +51,7 @@ static uint32_t g_count (0); static void PingRtt (std::string context, Time rtt) { - g_count ++; + g_count++; } void @@ -80,7 +80,7 @@ LoopbackTestCase::DoRun () Ipv4AddressHelper address; address.SetBase ("10.1.1.0", "255.255.255.0"); Ipv4InterfaceContainer interfaces = address.Assign (devices); - + // Setup ping Ptr ping = CreateObject (); ping->SetAttribute ("Remote", Ipv4AddressValue (Ipv4Address::GetLoopback ())); @@ -89,12 +89,12 @@ LoopbackTestCase::DoRun () ping->SetStopTime (Seconds (4)); Names::Add ("ping", ping); Config::Connect ("/Names/ping/Rtt", MakeCallback (&PingRtt)); - + // Run Simulator::Stop (Seconds (5)); Simulator::Run (); Simulator::Destroy (); - + // Check that 4 packets delivered NS_TEST_ASSERT_MSG_EQ (g_count, 4, "Exactly 4 ping replies must be delivered."); } diff --git a/doc/manual/source/applications.rst b/src/applications/doc/applications.rst similarity index 100% rename from doc/manual/source/applications.rst rename to src/applications/doc/applications.rst diff --git a/src/applications/helper/ping6-helper.cc b/src/applications/helper/ping6-helper.cc index 84467f0c4..895073ebd 100644 --- a/src/applications/helper/ping6-helper.cc +++ b/src/applications/helper/ping6-helper.cc @@ -61,7 +61,7 @@ ApplicationContainer Ping6Helper::Install (NodeContainer c) node->AddApplication (client); apps.Add (client); } - return apps; + return apps; } void Ping6Helper::SetIfIndex (uint32_t ifIndex) diff --git a/src/applications/helper/ping6-helper.h b/src/applications/helper/ping6-helper.h index 499de18a3..c71080e7a 100644 --- a/src/applications/helper/ping6-helper.h +++ b/src/applications/helper/ping6-helper.h @@ -101,7 +101,7 @@ private: Ipv6Address m_remoteIp; /** - * \brief Out interface index. + * \brief Out interface index. */ uint32_t m_ifIndex; diff --git a/src/applications/helper/udp-client-server-helper.cc b/src/applications/helper/udp-client-server-helper.cc index 58897da70..822b1fd7d 100644 --- a/src/applications/helper/udp-client-server-helper.cc +++ b/src/applications/helper/udp-client-server-helper.cc @@ -27,7 +27,8 @@ namespace ns3 { UdpServerHelper::UdpServerHelper () -{} +{ +} UdpServerHelper::UdpServerHelper (uint16_t port) { @@ -64,7 +65,8 @@ UdpServerHelper::GetServer (void) } UdpClientHelper::UdpClientHelper () -{} +{ +} UdpClientHelper::UdpClientHelper (Ipv4Address address, uint16_t port) { @@ -94,7 +96,8 @@ UdpClientHelper::Install (NodeContainer c) } UdpTraceClientHelper::UdpTraceClientHelper () -{} +{ +} UdpTraceClientHelper::UdpTraceClientHelper (Ipv4Address address, uint16_t port, std::string filename) { diff --git a/src/applications/helper/udp-client-server-helper.h b/src/applications/helper/udp-client-server-helper.h index e14463ff4..e65832e09 100644 --- a/src/applications/helper/udp-client-server-helper.h +++ b/src/applications/helper/udp-client-server-helper.h @@ -28,35 +28,35 @@ #include "ns3/udp-server.h" #include "ns3/udp-client.h" namespace ns3 { - /** - * \brief Create a server application which waits for input udp packets - * and uses the information carried into their payload to compute - * delay and to determine if some packets are lost. - */ +/** + * \brief Create a server application which waits for input udp packets + * and uses the information carried into their payload to compute + * delay and to determine if some packets are lost. + */ class UdpServerHelper { public: - /** - * Create UdpServerHelper which will make life easier for people trying - * to set up simulations with udp-client-server application. - * - */ + /** + * Create UdpServerHelper which will make life easier for people trying + * to set up simulations with udp-client-server application. + * + */ UdpServerHelper (); - /** - * Create UdpServerHelper which will make life easier for people trying - * to set up simulations with udp-client-server application. - * - * \param port The port the server will wait on for incoming packets - */ + /** + * Create UdpServerHelper which will make life easier for people trying + * to set up simulations with udp-client-server application. + * + * \param port The port the server will wait on for incoming packets + */ UdpServerHelper (uint16_t port); - /** - * Record an attribute to be set in each Application after it is is created. - * - * \param name the name of the attribute to set - * \param value the value of the attribute to set - */ + /** + * Record an attribute to be set in each Application after it is is created. + * + * \param name the name of the attribute to set + * \param value the value of the attribute to set + */ void SetAttribute (std::string name, const AttributeValue &value); /** @@ -91,13 +91,13 @@ public: */ UdpClientHelper (); - /** - * Create UdpClientHelper which will make life easier for people trying - * to set up simulations with udp-client-server. - * - * \param ip The IP address of the remote udp server - * \param port The port number of the remote udp server - */ + /** + * Create UdpClientHelper which will make life easier for people trying + * to set up simulations with udp-client-server. + * + * \param ip The IP address of the remote udp server + * \param port The port number of the remote udp server + */ UdpClientHelper (Ipv4Address ip, uint16_t port); @@ -121,16 +121,16 @@ public: private: ObjectFactory m_factory; }; - /** - * Create udpTraceClient application which sends udp packets based on a trace - * file of an MPEG4 stream. Trace files could be downloaded form : - * http://www.tkn.tu-berlin.de/research/trace/ltvt.html (the 2 first lines of - * the file should be removed) - * A valid trace file is a file with 4 columns: - * -1- the first one represents the frame index - * -2- the second one indicates the type of the frame: I, P or B - * -3- the third one indicates the time on which the frame was generated by the encoder - * -4- the fourth one indicates the frame size in byte +/** + * Create udpTraceClient application which sends udp packets based on a trace + * file of an MPEG4 stream. Trace files could be downloaded form : + * http://www.tkn.tu-berlin.de/research/trace/ltvt.html (the 2 first lines of + * the file should be removed) + * A valid trace file is a file with 4 columns: + * -1- the first one represents the frame index + * -2- the second one indicates the type of the frame: I, P or B + * -3- the third one indicates the time on which the frame was generated by the encoder + * -4- the fourth one indicates the frame size in byte */ class UdpTraceClientHelper { diff --git a/src/applications/helper/udp-echo-helper.cc b/src/applications/helper/udp-echo-helper.cc index 0a83768b9..e4d471848 100644 --- a/src/applications/helper/udp-echo-helper.cc +++ b/src/applications/helper/udp-echo-helper.cc @@ -69,7 +69,7 @@ UdpEchoServerHelper::InstallPriv (Ptr node) const { Ptr app = m_factory.Create (); node->AddApplication (app); - + return app; } @@ -136,7 +136,7 @@ UdpEchoClientHelper::InstallPriv (Ptr node) const { Ptr app = m_factory.Create (); node->AddApplication (app); - + return app; } diff --git a/src/applications/model/onoff-application.cc b/src/applications/model/onoff-application.cc index 457ccc1f5..69aa76d14 100644 --- a/src/applications/model/onoff-application.cc +++ b/src/applications/model/onoff-application.cc @@ -84,7 +84,7 @@ OnOffApplication::GetTypeId (void) MakeTypeIdChecker ()) .AddTraceSource ("Tx", "A new packet is created and is sent", MakeTraceSourceAccessor (&OnOffApplication::m_txTrace)) - ; + ; return tid; } @@ -207,7 +207,7 @@ void OnOffApplication::ScheduleNextTx() uint32_t bits = m_pktSize * 8 - m_residualBits; NS_LOG_LOGIC ("bits = " << bits); Time nextTime(Seconds (bits / - static_cast(m_cbrRate.GetBitRate()))); // Time till next packet + static_cast(m_cbrRate.GetBitRate()))); // Time till next packet NS_LOG_LOGIC ("nextTime = " << nextTime); m_sendEvent = Simulator::Schedule(nextTime, &OnOffApplication::SendPacket, this); @@ -236,7 +236,7 @@ void OnOffApplication::ScheduleStopEvent() m_startStopEvent = Simulator::Schedule(onInterval, &OnOffApplication::StopSending, this); } - + void OnOffApplication::SendPacket() { NS_LOG_FUNCTION_NOARGS (); @@ -258,7 +258,7 @@ void OnOffApplication::ConnectionSucceeded(Ptr) m_connected = true; ScheduleStartEvent(); } - + void OnOffApplication::ConnectionFailed(Ptr) { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/applications/model/onoff-application.h b/src/applications/model/onoff-application.h index 6858b0de2..3df52593b 100644 --- a/src/applications/model/onoff-application.h +++ b/src/applications/model/onoff-application.h @@ -51,39 +51,39 @@ class Socket; * During the "On" state, cbr traffic is generated. This cbr traffic is * characterized by the specified "data rate" and "packet size". */ - /** - * \ingroup onoff - * - * \brief Generate traffic to a single destination according to an - * OnOff pattern. - * - * This traffic generator follows an On/Off pattern: after - * Application::StartApplication - * is called, "On" and "Off" states alternate. The duration of each of - * these states is determined with the onTime and the offTime random - * variables. During the "Off" state, no traffic is generated. - * During the "On" state, cbr traffic is generated. This cbr traffic is - * characterized by the specified "data rate" and "packet size". - * - * Note: When an application is started, the first packet transmission - * occurs _after_ a delay equal to (packet size/bit rate). Note also, - * when an application transitions into an off state in between packet - * transmissions, the remaining time until when the next transmission - * would have occurred is cached and is used when the application starts - * up again. Example: packet size = 1000 bits, bit rate = 500 bits/sec. - * If the application is started at time 3 seconds, the first packet - * transmission will be scheduled for time 5 seconds (3 + 1000/500) - * and subsequent transmissions at 2 second intervals. If the above - * application were instead stopped at time 4 seconds, and restarted at - * time 5.5 seconds, then the first packet would be sent at time 6.5 seconds, - * because when it was stopped at 4 seconds, there was only 1 second remaining - * until the originally scheduled transmission, and this time remaining - * information is cached and used to schedule the next transmission - * upon restarting. - * - * If the underlying socket type supports broadcast, this application - * will automatically enable the SetAllowBroadcast(true) socket option. - */ +/** +* \ingroup onoff +* +* \brief Generate traffic to a single destination according to an +* OnOff pattern. +* +* This traffic generator follows an On/Off pattern: after +* Application::StartApplication +* is called, "On" and "Off" states alternate. The duration of each of +* these states is determined with the onTime and the offTime random +* variables. During the "Off" state, no traffic is generated. +* During the "On" state, cbr traffic is generated. This cbr traffic is +* characterized by the specified "data rate" and "packet size". +* +* Note: When an application is started, the first packet transmission +* occurs _after_ a delay equal to (packet size/bit rate). Note also, +* when an application transitions into an off state in between packet +* transmissions, the remaining time until when the next transmission +* would have occurred is cached and is used when the application starts +* up again. Example: packet size = 1000 bits, bit rate = 500 bits/sec. +* If the application is started at time 3 seconds, the first packet +* transmission will be scheduled for time 5 seconds (3 + 1000/500) +* and subsequent transmissions at 2 second intervals. If the above +* application were instead stopped at time 4 seconds, and restarted at +* time 5.5 seconds, then the first packet would be sent at time 6.5 seconds, +* because when it was stopped at 4 seconds, there was only 1 second remaining +* until the originally scheduled transmission, and this time remaining +* information is cached and used to schedule the next transmission +* upon restarting. +* +* If the underlying socket type supports broadcast, this application +* will automatically enable the SetAllowBroadcast(true) socket option. +*/ class OnOffApplication : public Application { public: @@ -138,7 +138,7 @@ private: DataRate m_cbrRate; // Rate that data is generated uint32_t m_pktSize; // Size of packets uint32_t m_residualBits; // Number of generated, but not sent, bits - Time m_lastStartTime;// Time last packet sent + Time m_lastStartTime; // Time last packet sent uint32_t m_maxBytes; // Limit total number of bytes sent uint32_t m_totBytes; // Total bytes sent so far EventId m_startStopEvent; // Event id for next start or stop event @@ -146,7 +146,7 @@ private: bool m_sending; // True if currently in sending state TypeId m_tid; TracedCallback > m_txTrace; - + private: void ScheduleNextTx(); void ScheduleStartEvent(); diff --git a/src/applications/model/packet-loss-counter.cc b/src/applications/model/packet-loss-counter.cc index 6cf95d534..9983d6566 100644 --- a/src/applications/model/packet-loss-counter.cc +++ b/src/applications/model/packet-loss-counter.cc @@ -103,7 +103,7 @@ PacketLossCounter::SetBit(uint32_t seqNum, bool val) void PacketLossCounter::NotifyReceived (uint32_t seqNum) { - for (uint32_t i=m_lastMaxSeqNum+1; i<=seqNum;i++) + for (uint32_t i=m_lastMaxSeqNum+1; i<=seqNum; i++) { if (GetBit(i)!=1) { diff --git a/src/applications/model/packet-sink.cc b/src/applications/model/packet-sink.cc index c0b1bfb70..0e966768c 100644 --- a/src/applications/model/packet-sink.cc +++ b/src/applications/model/packet-sink.cc @@ -54,7 +54,7 @@ PacketSink::GetTypeId (void) MakeTypeIdChecker ()) .AddTraceSource ("Rx", "A packet has been received", MakeTraceSourceAccessor (&PacketSink::m_rxTrace)) - ; + ; return tid; } @@ -74,7 +74,7 @@ uint32_t PacketSink::GetTotalRx() const { return m_totalRx; } - + Ptr PacketSink::GetListeningSocket (void) const { @@ -128,22 +128,22 @@ void PacketSink::StartApplication() // Called at time specified by Start m_socket->SetRecvCallback (MakeCallback(&PacketSink::HandleRead, this)); m_socket->SetAcceptCallback ( - MakeNullCallback, const Address &> (), - MakeCallback(&PacketSink::HandleAccept, this)); + MakeNullCallback, const Address &> (), + MakeCallback(&PacketSink::HandleAccept, this)); m_socket->SetCloseCallbacks ( - MakeCallback(&PacketSink::HandlePeerClose, this), - MakeCallback(&PacketSink::HandlePeerError, this)); + MakeCallback(&PacketSink::HandlePeerClose, this), + MakeCallback(&PacketSink::HandlePeerError, this)); } void PacketSink::StopApplication() // Called at time specified by Stop { NS_LOG_FUNCTION (this); while(!m_socketList.empty()) //these are accepted sockets, close them - { - Ptr acceptedSocket = m_socketList.front(); - m_socketList.pop_front(); - acceptedSocket->Close(); - } + { + Ptr acceptedSocket = m_socketList.front(); + m_socketList.pop_front(); + acceptedSocket->Close(); + } if (m_socket) { m_socket->Close (); @@ -160,16 +160,19 @@ void PacketSink::HandleRead (Ptr socket) { if (packet->GetSize() == 0) { //EOF - break; + break; } if (InetSocketAddress::IsMatchingType (from)) { - InetSocketAddress address = InetSocketAddress::ConvertFrom (from); m_totalRx += packet->GetSize(); + InetSocketAddress address = InetSocketAddress::ConvertFrom (from); NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " << address.GetIpv4() << " [" << address << "]" - << " total Rx " << m_totalRx); - } + << " total Rx " << m_totalRx); + //cast address to void , to suppress 'address' set but not used + //compiler warning in optimized builds + (void) address; + } m_rxTrace (packet, from); } } diff --git a/src/applications/model/packet-sink.h b/src/applications/model/packet-sink.h index f5a890579..78c7b23f5 100644 --- a/src/applications/model/packet-sink.h +++ b/src/applications/model/packet-sink.h @@ -99,7 +99,7 @@ private: void HandleAccept (Ptr, const Address& from); void HandlePeerClose(Ptr); void HandlePeerError(Ptr); - + // In the case of TCP, each socket accept returns a new socket, so the // listening socket is stored seperately from the accepted sockets Ptr m_socket; // Listening socket @@ -109,7 +109,7 @@ private: uint32_t m_totalRx; // Total bytes received TypeId m_tid; // Protocol TypeId TracedCallback, const Address &> m_rxTrace; - + }; } // namespace ns3 diff --git a/src/applications/model/ping6.cc b/src/applications/model/ping6.cc index 156910382..2e71ac131 100644 --- a/src/applications/model/ping6.cc +++ b/src/applications/model/ping6.cc @@ -72,7 +72,7 @@ TypeId Ping6::GetTypeId () UintegerValue (100), MakeUintegerAccessor (&Ping6::m_size), MakeUintegerChecker()) - ; + ; return tid; } diff --git a/src/applications/model/radvd-interface.cc b/src/applications/model/radvd-interface.cc index b5009ecea..506569a31 100644 --- a/src/applications/model/radvd-interface.cc +++ b/src/applications/model/radvd-interface.cc @@ -29,7 +29,7 @@ RadvdInterface::RadvdInterface (uint32_t interface) /* initialize default value as specified in radvd.conf manpage */ m_sendAdvert = true; m_maxRtrAdvInterval = 600000; - m_minRtrAdvInterval = (uint32_t)(double)(0.33 * m_maxRtrAdvInterval); + m_minRtrAdvInterval = (uint32_t)(double) (0.33 * m_maxRtrAdvInterval); m_minDelayBetweenRAs = 3000; m_managedFlag = false; m_otherConfigFlag = false; @@ -77,9 +77,9 @@ RadvdInterface::~RadvdInterface () { /* clear prefixes */ for (RadvdPrefixListI it = m_prefixes.begin () ; it != m_prefixes.end () ; ++it) - { - (*it) = 0; - } + { + (*it) = 0; + } m_prefixes.clear (); } diff --git a/src/applications/model/radvd-interface.h b/src/applications/model/radvd-interface.h index 3bf4ee95f..521fa3a4b 100644 --- a/src/applications/model/radvd-interface.h +++ b/src/applications/model/radvd-interface.h @@ -62,7 +62,7 @@ public: uint32_t GetInterface () const; /** - * \brief Get list of prefixes advertised for this interface. + * \brief Get list of prefixes advertised for this interface. * \return list of IPv6 prefixes */ std::list > GetPrefixes () const; diff --git a/src/applications/model/radvd-prefix.cc b/src/applications/model/radvd-prefix.cc index 3ed9442e1..2a8da80b6 100644 --- a/src/applications/model/radvd-prefix.cc +++ b/src/applications/model/radvd-prefix.cc @@ -25,12 +25,12 @@ namespace ns3 RadvdPrefix::RadvdPrefix (Ipv6Address network, uint8_t prefixLength, uint32_t preferredLifeTime, uint32_t validLifeTime, bool onLinkFlag, bool autonomousFlag, bool routerAddrFlag) : m_network (network), - m_prefixLength (prefixLength), - m_preferredLifeTime (preferredLifeTime), - m_validLifeTime (validLifeTime), - m_onLinkFlag (onLinkFlag), - m_autonomousFlag (autonomousFlag), - m_routerAddrFlag (routerAddrFlag) + m_prefixLength (prefixLength), + m_preferredLifeTime (preferredLifeTime), + m_validLifeTime (validLifeTime), + m_onLinkFlag (onLinkFlag), + m_autonomousFlag (autonomousFlag), + m_routerAddrFlag (routerAddrFlag) { } diff --git a/src/applications/model/radvd.cc b/src/applications/model/radvd.cc index 1dcf7e191..a55c682c2 100644 --- a/src/applications/model/radvd.cc +++ b/src/applications/model/radvd.cc @@ -48,7 +48,7 @@ TypeId Radvd::GetTypeId () static TypeId tid = TypeId ("ns3::Radvd") .SetParent () .AddConstructor () - ; + ; return tid; } diff --git a/src/applications/model/seq-ts-header.cc b/src/applications/model/seq-ts-header.cc index bb7b6ce0d..9161ae0d1 100644 --- a/src/applications/model/seq-ts-header.cc +++ b/src/applications/model/seq-ts-header.cc @@ -33,45 +33,46 @@ NS_OBJECT_ENSURE_REGISTERED (SeqTsHeader); SeqTsHeader::SeqTsHeader () : m_seq (0), m_ts (Simulator::Now ().GetTimeStep ()) -{} +{ +} -void +void SeqTsHeader::SetSeq (uint32_t seq) { m_seq = seq; } -uint32_t +uint32_t SeqTsHeader::GetSeq (void) const { return m_seq; } -Time +Time SeqTsHeader::GetTs (void) const { return TimeStep (m_ts); } -TypeId +TypeId SeqTsHeader::GetTypeId (void) { static TypeId tid = TypeId ("ns3::SeqTsHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } -TypeId +TypeId SeqTsHeader::GetInstanceTypeId (void) const { return GetTypeId (); } -void +void SeqTsHeader::Print (std::ostream &os) const { os << "(seq=" << m_seq << " time=" << TimeStep (m_ts).GetSeconds () << ")"; } -uint32_t +uint32_t SeqTsHeader::GetSerializedSize (void) const { return 4+8; diff --git a/src/applications/model/seq-ts-header.h b/src/applications/model/seq-ts-header.h index f734f0f80..b24301ce6 100644 --- a/src/applications/model/seq-ts-header.h +++ b/src/applications/model/seq-ts-header.h @@ -51,7 +51,7 @@ public: Time GetTs (void) const; static TypeId GetTypeId (void); - private: +private: virtual TypeId GetInstanceTypeId (void) const; virtual void Print (std::ostream &os) const; virtual uint32_t GetSerializedSize (void) const; diff --git a/src/applications/model/udp-client.cc b/src/applications/model/udp-client.cc index 465f564a0..c9d27bea7 100644 --- a/src/applications/model/udp-client.cc +++ b/src/applications/model/udp-client.cc @@ -53,11 +53,11 @@ UdpClient::GetTypeId (void) MakeTimeAccessor (&UdpClient::m_interval), MakeTimeChecker ()) .AddAttribute ( - "RemoteAddress", - "The destination Ipv4Address of the outbound packets", - Ipv4AddressValue (), - MakeIpv4AddressAccessor (&UdpClient::m_peerAddress), - MakeIpv4AddressChecker ()) + "RemoteAddress", + "The destination Ipv4Address of the outbound packets", + Ipv4AddressValue (), + MakeIpv4AddressAccessor (&UdpClient::m_peerAddress), + MakeIpv4AddressChecker ()) .AddAttribute ("RemotePort", "The destination port of the outbound packets", UintegerValue (100), MakeUintegerAccessor (&UdpClient::m_peerPort), @@ -67,7 +67,7 @@ UdpClient::GetTypeId (void) UintegerValue (1024), MakeUintegerAccessor (&UdpClient::m_size), MakeUintegerChecker (12,1500)) - ; + ; return tid; } @@ -135,15 +135,15 @@ UdpClient::Send (void) if ((m_socket->Send (p)) >= 0) { ++m_sent; - NS_LOG_INFO ("TraceDelay TX " << m_size << " bytes to " - << m_peerAddress << " Uid: " << p->GetUid () - << " Time: " << (Simulator::Now ()).GetSeconds ()); + NS_LOG_INFO ("TraceDelay TX " << m_size << " bytes to " + << m_peerAddress << " Uid: " << p->GetUid () + << " Time: " << (Simulator::Now ()).GetSeconds ()); } else { NS_LOG_INFO ("Error while sending " << m_size << " bytes to " - << m_peerAddress); + << m_peerAddress); } if (m_sent < m_count) diff --git a/src/applications/model/udp-echo-client.cc b/src/applications/model/udp-echo-client.cc index 57097a6c9..34f0e7d56 100644 --- a/src/applications/model/udp-echo-client.cc +++ b/src/applications/model/udp-echo-client.cc @@ -65,7 +65,7 @@ UdpEchoClient::GetTypeId (void) MakeUintegerChecker ()) .AddTraceSource ("Tx", "A new packet is created and is sent", MakeTraceSourceAccessor (&UdpEchoClient::m_txTrace)) - ; + ; return tid; } @@ -299,9 +299,8 @@ UdpEchoClient::HandleRead (Ptr socket) { if (InetSocketAddress::IsMatchingType (from)) { - InetSocketAddress address = InetSocketAddress::ConvertFrom (from); NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " << - address.GetIpv4()); + InetSocketAddress::ConvertFrom (from).GetIpv4()); } } } diff --git a/src/applications/model/udp-echo-server.cc b/src/applications/model/udp-echo-server.cc index 56ca1d253..a55214bbf 100644 --- a/src/applications/model/udp-echo-server.cc +++ b/src/applications/model/udp-echo-server.cc @@ -45,7 +45,7 @@ UdpEchoServer::GetTypeId (void) UintegerValue (9), MakeUintegerAccessor (&UdpEchoServer::m_port), MakeUintegerChecker ()) - ; + ; return tid; } @@ -117,9 +117,8 @@ UdpEchoServer::HandleRead (Ptr socket) { if (InetSocketAddress::IsMatchingType (from)) { - InetSocketAddress address = InetSocketAddress::ConvertFrom (from); NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " << - address.GetIpv4()); + InetSocketAddress::ConvertFrom (from).GetIpv4()); packet->RemoveAllPacketTags (); packet->RemoveAllByteTags (); diff --git a/src/applications/model/udp-server.cc b/src/applications/model/udp-server.cc index f2e5c08c6..ae42cd8a4 100644 --- a/src/applications/model/udp-server.cc +++ b/src/applications/model/udp-server.cc @@ -56,12 +56,12 @@ UdpServer::GetTypeId (void) MakeUintegerAccessor (&UdpServer::GetPacketWindowSize, &UdpServer::SetPacketWindowSize), MakeUintegerChecker (8,256)) - ; + ; return tid; } UdpServer::UdpServer () - : m_lossCounter (0) + : m_lossCounter (0) { NS_LOG_FUNCTION (this); m_received=0; @@ -146,7 +146,6 @@ UdpServer::HandleRead (Ptr socket) { SeqTsHeader seqTs; packet->RemoveHeader (seqTs); - Time delay = Simulator::Now () - seqTs.GetTs (); uint32_t currentSequenceNumber = seqTs.GetSeq (); NS_LOG_INFO ("TraceDelay: RX " << packet->GetSize () << " bytes from "<< InetSocketAddress::ConvertFrom(from).GetIpv4 () << @@ -154,7 +153,7 @@ UdpServer::HandleRead (Ptr socket) " Uid: " << packet->GetUid () << " TXtime: " << seqTs.GetTs () << " RXtime: " << Simulator::Now () << - " Delay: " << delay) ; + " Delay: " << Simulator::Now () - seqTs.GetTs ()) ; m_lossCounter.NotifyReceived (currentSequenceNumber); m_received++; diff --git a/src/applications/model/udp-trace-client.cc b/src/applications/model/udp-trace-client.cc index 7e74bdf63..9cac87a8a 100644 --- a/src/applications/model/udp-trace-client.cc +++ b/src/applications/model/udp-trace-client.cc @@ -40,16 +40,16 @@ NS_LOG_COMPONENT_DEFINE ("UdpTraceClient"); NS_OBJECT_ENSURE_REGISTERED (UdpTraceClient); struct UdpTraceClient::TraceEntry UdpTraceClient::g_defaultEntries[] = { - {0, 534, 'I'}, - {40, 1542, 'P'}, - {120, 134, 'B'}, - {80, 390, 'B'}, - {240, 765, 'P'}, - {160, 407, 'B'}, - {200, 504, 'B'}, - {360, 903, 'P'}, - {280, 421, 'B'}, - {320, 587, 'B'} + { 0, 534, 'I'}, + { 40, 1542, 'P'}, + { 120, 134, 'B'}, + { 80, 390, 'B'}, + { 240, 765, 'P'}, + { 160, 407, 'B'}, + { 200, 504, 'B'}, + { 360, 903, 'P'}, + { 280, 421, 'B'}, + { 320, 587, 'B'} }; TypeId @@ -79,7 +79,7 @@ UdpTraceClient::GetTypeId (void) MakeStringAccessor (&UdpTraceClient::SetTraceFile), MakeStringChecker ()) - ; + ; return tid; } @@ -93,7 +93,7 @@ UdpTraceClient::UdpTraceClient () } UdpTraceClient::UdpTraceClient (Ipv4Address ip, uint16_t port, - char *traceFile) + char *traceFile) { NS_LOG_FUNCTION (this); m_sent = 0; @@ -259,12 +259,12 @@ UdpTraceClient::SendPacket (uint32_t size) { ++m_sent; NS_LOG_INFO ("Sent " << size << " bytes to " - << m_peerAddress); + << m_peerAddress); } else { NS_LOG_INFO ("Error while sending " << size << " bytes to " - << m_peerAddress); + << m_peerAddress); } } diff --git a/src/applications/model/v4ping.cc b/src/applications/model/v4ping.cc index 95a1aee85..fbfc3700a 100644 --- a/src/applications/model/v4ping.cc +++ b/src/applications/model/v4ping.cc @@ -37,10 +37,10 @@ V4Ping::GetTypeId (void) .SetParent () .AddConstructor () .AddAttribute ("Remote", - "The address of the machine we want to ping.", - Ipv4AddressValue (), - MakeIpv4AddressAccessor (&V4Ping::m_remote), - MakeIpv4AddressChecker ()) + "The address of the machine we want to ping.", + Ipv4AddressValue (), + MakeIpv4AddressAccessor (&V4Ping::m_remote), + MakeIpv4AddressChecker ()) .AddAttribute ("Verbose", "Produce usual output.", BooleanValue (false), @@ -55,9 +55,9 @@ V4Ping::GetTypeId (void) MakeUintegerAccessor (&V4Ping::m_size), MakeUintegerChecker (16)) .AddTraceSource ("Rtt", - "The rtt calculated by the ping.", - MakeTraceSourceAccessor (&V4Ping::m_traceRtt)); - ; + "The rtt calculated by the ping.", + MakeTraceSourceAccessor (&V4Ping::m_traceRtt)); + ; return tid; } @@ -71,7 +71,8 @@ V4Ping::V4Ping () { } V4Ping::~V4Ping () -{} +{ +} void V4Ping::DoDispose (void) @@ -88,9 +89,9 @@ V4Ping::GetApplicationId (void) const for (uint32_t i = 0; i < node->GetNApplications (); ++i) { if (node->GetApplication (i) == this) - { - return i; - } + { + return i; + } } NS_ASSERT_MSG (false, "forgot to add application to node"); return 0; // quiet compiler @@ -115,46 +116,46 @@ V4Ping::Receive (Ptr socket) Icmpv4Header icmp; p->RemoveHeader (icmp); if (icmp.GetType () == Icmpv4Header::ECHO_REPLY) - { - Icmpv4Echo echo; - p->RemoveHeader (echo); - std::map::iterator i = m_sent.find(echo.GetSequenceNumber()); + { + Icmpv4Echo echo; + p->RemoveHeader (echo); + std::map::iterator i = m_sent.find(echo.GetSequenceNumber()); - if (i != m_sent.end () && echo.GetIdentifier () == 0) - { + if (i != m_sent.end () && echo.GetIdentifier () == 0) + { uint32_t buf[m_size / 4]; - uint32_t dataSize = echo.GetDataSize (); + uint32_t dataSize = echo.GetDataSize (); uint32_t nodeId; uint32_t appId; - if (dataSize == sizeof(buf)) - { + if (dataSize == sizeof(buf)) + { echo.GetData ((uint8_t *)buf); Read32 ((const uint8_t *) &buf[0], nodeId); Read32 ((const uint8_t *) &buf[1], appId); - if (nodeId == GetNode ()->GetId () && - appId == GetApplicationId ()) - { - Time sendTime = i->second; - NS_ASSERT (Simulator::Now () >= sendTime); - Time delta = Simulator::Now () - sendTime; - - m_sent.erase (i); - m_avgRtt.Update (delta.GetMilliSeconds()); - m_recv++; - m_traceRtt (delta); - - if (m_verbose) - { - std::cout << recvSize << " bytes from " << realFrom.GetIpv4() << ":" + if (nodeId == GetNode ()->GetId () && + appId == GetApplicationId ()) + { + Time sendTime = i->second; + NS_ASSERT (Simulator::Now () >= sendTime); + Time delta = Simulator::Now () - sendTime; + + m_sent.erase (i); + m_avgRtt.Update (delta.GetMilliSeconds()); + m_recv++; + m_traceRtt (delta); + + if (m_verbose) + { + std::cout << recvSize << " bytes from " << realFrom.GetIpv4() << ":" << " icmp_seq=" << echo.GetSequenceNumber () << " ttl=" << (unsigned)ipv4.GetTtl () << " time=" << delta.GetMilliSeconds() << " ms\n"; - } - } - } - } - } + } + } + } + } + } } } @@ -195,7 +196,7 @@ V4Ping::Send () uint8_t data[m_size]; for (uint32_t i = 0; i < m_size; ++i) data[i] = 0; NS_ASSERT (m_size >= 16); - + uint32_t tmp = GetNode ()->GetId (); Write32 (&data[0 * sizeof(uint32_t)], tmp); @@ -215,20 +216,20 @@ V4Ping::Send () p->AddHeader (header); m_sent.insert (std::make_pair (m_seq - 1, Simulator::Now())); m_socket->Send (p, 0); - m_next = Simulator::Schedule (m_interval, & V4Ping::Send, this); + m_next = Simulator::Schedule (m_interval, &V4Ping::Send, this); } void V4Ping::StartApplication (void) { NS_LOG_FUNCTION (this); - + m_started = Simulator::Now (); if (m_verbose) { std::cout << "PING " << m_remote << " 56(84) bytes of data.\n"; } - + m_socket = Socket::CreateSocket (GetNode (), TypeId::LookupByName ("ns3::Ipv4RawSocketFactory")); NS_ASSERT (m_socket != 0); m_socket->SetAttribute ("Protocol", UintegerValue (1)); // icmp @@ -240,7 +241,10 @@ V4Ping::StartApplication (void) InetSocketAddress dst = InetSocketAddress (m_remote, 0); status = m_socket->Connect (dst); NS_ASSERT (status != -1); - + //cast status to void, to suppress 'status' set but not used compiler warning + //in optimized builds + (void) status; + Send (); } void @@ -249,20 +253,20 @@ V4Ping::StopApplication (void) NS_LOG_FUNCTION (this); m_next.Cancel(); m_socket->Close (); - + if (m_verbose) { std::ostringstream os; os.precision (4); os << "--- " << m_remote << " ping statistics ---\n" - << m_seq << " packets transmitted, " << m_recv << " received, " - << ((m_seq - m_recv) * 100 / m_seq) << "% packet loss, " - << "time " << (Simulator::Now () - m_started).GetMilliSeconds () << "ms\n"; - + << m_seq << " packets transmitted, " << m_recv << " received, " + << ((m_seq - m_recv) * 100 / m_seq) << "% packet loss, " + << "time " << (Simulator::Now () - m_started).GetMilliSeconds () << "ms\n"; + if (m_avgRtt.Count () > 0) os << "rtt min/avg/max/mdev = " << m_avgRtt.Min() << "/" << m_avgRtt.Avg() << "/" - << m_avgRtt.Max() << "/" << m_avgRtt.Stddev() - << " ms\n"; + << m_avgRtt.Max() << "/" << m_avgRtt.Stddev() + << " ms\n"; std::cout << os.str(); } } diff --git a/src/applications/test/udp-client-server-test.cc b/src/applications/test/udp-client-server-test.cc index a04f4e9bb..3123c8d45 100644 --- a/src/applications/test/udp-client-server-test.cc +++ b/src/applications/test/udp-client-server-test.cc @@ -41,7 +41,7 @@ using namespace ns3; * correctly received by an udpServer application */ -class UdpClientServerTestCase: public TestCase +class UdpClientServerTestCase : public TestCase { public: UdpClientServerTestCase (); @@ -115,7 +115,7 @@ void UdpClientServerTestCase::DoRun (void) * correctly received by an udpServer application */ -class UdpTraceClientServerTestCase: public TestCase +class UdpTraceClientServerTestCase : public TestCase { public: UdpTraceClientServerTestCase (); @@ -184,7 +184,7 @@ void UdpTraceClientServerTestCase::DoRun (void) * Test that all the PacketLossCounter class checks loss correctly in different cases */ -class PacketLossCounterTestCase: public TestCase +class PacketLossCounterTestCase : public TestCase { public: PacketLossCounterTestCase (); @@ -208,20 +208,20 @@ void PacketLossCounterTestCase::DoRun (void) { PacketLossCounter lossCounter(32); lossCounter.NotifyReceived(32); //out of order - for (uint32_t i=0;i<64;i++) + for (uint32_t i=0; i<64; i++) { lossCounter.NotifyReceived(i); } NS_TEST_ASSERT_MSG_EQ (lossCounter.GetLost(), 0, "Check that 0 packets are lost"); - for (uint32_t i=65;i<128;i++) // drop (1) seqNum 64 + for (uint32_t i=65; i<128; i++) // drop (1) seqNum 64 { lossCounter.NotifyReceived(i); } NS_TEST_ASSERT_MSG_EQ (lossCounter.GetLost(), 1, "Check that 1 packet is lost"); - for (uint32_t i=134;i<200;i++) // drop seqNum 128,129,130,131,132,133 + for (uint32_t i=134; i<200; i++) // drop seqNum 128,129,130,131,132,133 { lossCounter.NotifyReceived(i); } @@ -236,7 +236,7 @@ void PacketLossCounterTestCase::DoRun (void) lossCounter.NotifyReceived(202); lossCounter.NotifyReceived(203); lossCounter.NotifyReceived(204); - for (uint32_t i=205;i<250;i++) + for (uint32_t i=205; i<250; i++) { lossCounter.NotifyReceived(i); } @@ -248,13 +248,13 @@ void PacketLossCounterTestCase::DoRun (void) lossCounter.NotifyReceived(252); lossCounter.NotifyReceived(253); lossCounter.NotifyReceived(254); - for (uint32_t i=256;i<300;i++) + for (uint32_t i=256; i<300; i++) { lossCounter.NotifyReceived(i); } NS_TEST_ASSERT_MSG_EQ (lossCounter.GetLost(), 9, "Check that 9 (6+1+2) packet are lost"); } -class UdpClientServerTestSuite: public TestSuite +class UdpClientServerTestSuite : public TestSuite { public: UdpClientServerTestSuite (); diff --git a/doc/manual/source/bridge.rst b/src/bridge/doc/bridge.rst similarity index 100% rename from doc/manual/source/bridge.rst rename to src/bridge/doc/bridge.rst diff --git a/src/bridge/examples/csma-bridge-one-hop.cc b/src/bridge/examples/csma-bridge-one-hop.cc index c4cb1a70a..3dc41437a 100644 --- a/src/bridge/examples/csma-bridge-one-hop.cc +++ b/src/bridge/examples/csma-bridge-one-hop.cc @@ -23,7 +23,7 @@ // | | | The bridge node talks over three CSMA channels // | | | // CSMA CSMA CSMA to three other CSMA net devices -// ---- ---- ---- +// ---- ---- ---- // n0 n1 n2 Node two acts as a router and talks to another // ---- bridge that connects the remaining nodes. // CSMA @@ -44,9 +44,9 @@ // n0 n1 (n0 = 10.1.1.2) // | | (n1 = 10.1.1.3) Note odd addressing // ----------- (n2 = 10.1.1.1) -// | bridge1 | <- n5 +// | bridge1 | <- n5 // ----------- -// | +// | // router <- n2 // | // ----------- diff --git a/src/bridge/examples/csma-bridge.cc b/src/bridge/examples/csma-bridge.cc index f779f1ecf..5cd76a9a6 100644 --- a/src/bridge/examples/csma-bridge.cc +++ b/src/bridge/examples/csma-bridge.cc @@ -16,13 +16,13 @@ // Network topology // -// n0 n1 +// n0 n1 // | | // ---------- // | Switch | // ---------- // | | -// n2 n3 +// n2 n3 // // // - CBR/UDP flows from n0 to n1 and from n3 to n0 diff --git a/src/bridge/model/bridge-channel.cc b/src/bridge/model/bridge-channel.cc index 7029c5251..a1a1b97a5 100644 --- a/src/bridge/model/bridge-channel.cc +++ b/src/bridge/model/bridge-channel.cc @@ -31,7 +31,7 @@ BridgeChannel::GetTypeId (void) static TypeId tid = TypeId ("ns3::BridgeChannel") .SetParent () .AddConstructor () - ; + ; return tid; } diff --git a/src/bridge/model/bridge-net-device.cc b/src/bridge/model/bridge-net-device.cc index 410645ad3..715e20ee1 100644 --- a/src/bridge/model/bridge-net-device.cc +++ b/src/bridge/model/bridge-net-device.cc @@ -41,7 +41,7 @@ BridgeNetDevice::GetTypeId (void) UintegerValue (1500), MakeUintegerAccessor (&BridgeNetDevice::SetMtu, &BridgeNetDevice::GetMtu), - MakeUintegerChecker ()) + MakeUintegerChecker ()) .AddAttribute ("EnableLearning", "Enable the learning mode of the Learning Bridge", BooleanValue (true), @@ -52,7 +52,7 @@ BridgeNetDevice::GetTypeId (void) TimeValue (Seconds (30)), MakeTimeAccessor (&BridgeNetDevice::m_expirationTime), MakeTimeChecker ()) - ; + ; return tid; } @@ -70,7 +70,7 @@ BridgeNetDevice::~BridgeNetDevice() NS_LOG_FUNCTION_NOARGS (); } - void +void BridgeNetDevice::DoDispose () { NS_LOG_FUNCTION_NOARGS (); @@ -133,8 +133,8 @@ BridgeNetDevice::ForwardUnicast (Ptr incomingPort, Ptr { NS_LOG_FUNCTION_NOARGS (); NS_LOG_DEBUG ("LearningBridgeForward (incomingPort=" << incomingPort->GetInstanceTypeId ().GetName () - << ", packet=" << packet << ", protocol="< outPort = GetLearnedState (dst); @@ -153,9 +153,9 @@ BridgeNetDevice::ForwardUnicast (Ptr incomingPort, Ptr if (port != incomingPort) { NS_LOG_LOGIC ("LearningBridgeForward (" << src << " => " << dst << "): " - << incomingPort->GetInstanceTypeId ().GetName () - << " --> " << port->GetInstanceTypeId ().GetName () - << " (UID " << packet->GetUid () << ")."); + << incomingPort->GetInstanceTypeId ().GetName () + << " --> " << port->GetInstanceTypeId ().GetName () + << " (UID " << packet->GetUid () << ")."); port->SendFrom (packet->Copy (), src, dst, protocol); } } @@ -164,24 +164,24 @@ BridgeNetDevice::ForwardUnicast (Ptr incomingPort, Ptr void BridgeNetDevice::ForwardBroadcast (Ptr incomingPort, Ptr packet, - uint16_t protocol, Mac48Address src, Mac48Address dst) + uint16_t protocol, Mac48Address src, Mac48Address dst) { NS_LOG_FUNCTION_NOARGS (); NS_LOG_DEBUG ("LearningBridgeForward (incomingPort=" << incomingPort->GetInstanceTypeId ().GetName () - << ", packet=" << packet << ", protocol="< >::iterator iter = m_ports.begin (); - iter != m_ports.end (); iter++) + iter != m_ports.end (); iter++) { Ptr port = *iter; if (port != incomingPort) { NS_LOG_LOGIC ("LearningBridgeForward (" << src << " => " << dst << "): " - << incomingPort->GetInstanceTypeId ().GetName () - << " --> " << port->GetInstanceTypeId ().GetName () - << " (UID " << packet->GetUid () << ")."); + << incomingPort->GetInstanceTypeId ().GetName () + << " --> " << port->GetInstanceTypeId ().GetName () + << " (UID " << packet->GetUid () << ")."); port->SendFrom (packet->Copy (), src, dst, protocol); } } @@ -351,9 +351,9 @@ BridgeNetDevice::IsMulticast (void) const Address BridgeNetDevice::GetMulticast (Ipv4Address multicastGroup) const { - NS_LOG_FUNCTION (this << multicastGroup); - Mac48Address multicast = Mac48Address::GetMulticast (multicastGroup); - return multicast; + NS_LOG_FUNCTION (this << multicastGroup); + Mac48Address multicast = Mac48Address::GetMulticast (multicastGroup); + return multicast; } diff --git a/src/bridge/model/bridge-net-device.h b/src/bridge/model/bridge-net-device.h index 0db239f5e..e880d1a88 100644 --- a/src/bridge/model/bridge-net-device.h +++ b/src/bridge/model/bridge-net-device.h @@ -31,8 +31,7 @@ namespace ns3 { class Node; /** - * \ingroup devices - * \defgroup bridge Bridge + * \defgroup bridge Bridge Device * * \brief a virtual net device that bridges multiple LAN segments * diff --git a/src/click/doc/click.h b/src/click/doc/click.h index c21230de3..6448b83ec 100644 --- a/src/click/doc/click.h +++ b/src/click/doc/click.h @@ -19,8 +19,7 @@ */ /** -* \ingroup routing -* \defgroup click Click +* \defgroup click Click Routing * * \section model Model * diff --git a/doc/manual/source/click.rst b/src/click/doc/click.rst similarity index 97% rename from doc/manual/source/click.rst rename to src/click/doc/click.rst index 809a27e50..3c691507d 100644 --- a/doc/manual/source/click.rst +++ b/src/click/doc/click.rst @@ -1,5 +1,5 @@ Click Modular Router Integration ----------------------- +-------------------------------- Click is a software architecture for building configurable routers. By using different combinations of packet processing units called elements, @@ -75,7 +75,7 @@ configure ns-3 with Click Integration support:: $: ./waf configure --enable-examples --enable-tests --with-nsclick=/path/to/click/source -If it says 'enabled' beside 'NS-3 Click Integration Support', then you're good to go. +If it says 'enabled' beside 'NS-3 Click Integration Support', then you're good to go. Note: If running modular ns-3, the minimum set of modules required to run all ns-3-click examples is wifi, csma and config-store. Next, try running one of the examples:: diff --git a/src/config-store/model/attribute-iterator.h b/src/config-store/model/attribute-iterator.h index 4b34ec984..fb8914d94 100644 --- a/src/config-store/model/attribute-iterator.h +++ b/src/config-store/model/attribute-iterator.h @@ -28,7 +28,11 @@ namespace ns3 { class ObjectVectorValue; class ObjectMapValue; -// This class is used internally by ConfigStore and GtkConfigStore. +/** + * \ingroup configstore + * + * This class is used internally by ConfigStore and GtkConfigStore. + */ class AttributeIterator { public: diff --git a/src/config-store/model/config-store.cc b/src/config-store/model/config-store.cc index 3c47b217f..de0d6e020 100644 --- a/src/config-store/model/config-store.cc +++ b/src/config-store/model/config-store.cc @@ -30,24 +30,24 @@ ConfigStore::GetTypeId (void) static TypeId tid = TypeId ("ns3::ConfigStore") .SetParent () .AddAttribute ("Mode", - "Configuration mode", - EnumValue (ConfigStore::NONE), - MakeEnumAccessor (&ConfigStore::SetMode), - MakeEnumChecker (ConfigStore::NONE, "None", - ConfigStore::LOAD, "Load", - ConfigStore::SAVE, "Save")) + "Configuration mode", + EnumValue (ConfigStore::NONE), + MakeEnumAccessor (&ConfigStore::SetMode), + MakeEnumChecker (ConfigStore::NONE, "None", + ConfigStore::LOAD, "Load", + ConfigStore::SAVE, "Save")) .AddAttribute ("Filename", - "The file where the configuration should be saved to or loaded from.", - StringValue (""), - MakeStringAccessor (&ConfigStore::SetFilename), - MakeStringChecker ()) + "The file where the configuration should be saved to or loaded from.", + StringValue (""), + MakeStringAccessor (&ConfigStore::SetFilename), + MakeStringChecker ()) .AddAttribute ("FileFormat", - "Type of file format", - EnumValue (ConfigStore::RAW_TEXT), - MakeEnumAccessor (&ConfigStore::SetFileFormat), - MakeEnumChecker (ConfigStore::RAW_TEXT, "RawText", - ConfigStore::XML, "Xml")) - ; + "Type of file format", + EnumValue (ConfigStore::RAW_TEXT), + MakeEnumAccessor (&ConfigStore::SetFileFormat), + MakeEnumChecker (ConfigStore::RAW_TEXT, "RawText", + ConfigStore::XML, "Xml")) + ; return tid; } TypeId @@ -65,34 +65,34 @@ ConfigStore::ConfigStore () if (m_fileFormat == ConfigStore::XML) { if (m_mode == ConfigStore::SAVE) - { - m_file = new XmlConfigSave (); - } + { + m_file = new XmlConfigSave (); + } else if (m_mode == ConfigStore::LOAD) - { - m_file = new XmlConfigLoad (); - } + { + m_file = new XmlConfigLoad (); + } else - { - m_file = new NoneFileConfig (); - } + { + m_file = new NoneFileConfig (); + } } else #endif /* HAVE_LIBXML2 */ if (m_fileFormat == ConfigStore::RAW_TEXT) { if (m_mode == ConfigStore::SAVE) - { - m_file = new RawTextConfigSave (); - } + { + m_file = new RawTextConfigSave (); + } else if (m_mode == ConfigStore::LOAD) - { - m_file = new RawTextConfigLoad (); - } + { + m_file = new RawTextConfigLoad (); + } else - { - m_file = new NoneFileConfig (); - } + { + m_file = new NoneFileConfig (); + } } m_file->SetFilename (m_filename); } diff --git a/src/config-store/model/config-store.h b/src/config-store/model/config-store.h index 9ad53552b..ff92da8cf 100644 --- a/src/config-store/model/config-store.h +++ b/src/config-store/model/config-store.h @@ -7,6 +7,8 @@ namespace ns3 { /** + * \defgroup configstore Config-Store + * * \brief Store and load simulation attribute configuration * * While it is possible to generate a sample config file and lightly @@ -24,6 +26,11 @@ namespace ns3 { * configuration files where all the instances of the same parameter * are changed. */ + +/** + * \ingroup configstore + * + */ class ConfigStore : public ObjectBase { public: diff --git a/src/config-store/model/display-functions.cc b/src/config-store/model/display-functions.cc index 0a1051125..b6943de20 100644 --- a/src/config-store/model/display-functions.cc +++ b/src/config-store/model/display-functions.cc @@ -590,5 +590,5 @@ clean_model_callback_config_default (GtkTreeModel *model, GtkTreePath *path, } -}//end ns3 namespace +} //end ns3 namespace diff --git a/src/config-store/model/display-functions.h b/src/config-store/model/display-functions.h index bb89f6b8a..41d1c260b 100644 --- a/src/config-store/model/display-functions.h +++ b/src/config-store/model/display-functions.h @@ -145,6 +145,6 @@ create_view_config_default (GtkTreeStore *model); gboolean clean_model_callback_config_default (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); -}//end namespace ns3 +} //end namespace ns3 #endif diff --git a/src/config-store/model/file-config.cc b/src/config-store/model/file-config.cc index 64d43d60d..dc6547739 100644 --- a/src/config-store/model/file-config.cc +++ b/src/config-store/model/file-config.cc @@ -3,12 +3,15 @@ namespace ns3 { FileConfig::~FileConfig () -{} +{ +} NoneFileConfig::NoneFileConfig () -{} +{ +} NoneFileConfig::~NoneFileConfig () -{} +{ +} void NoneFileConfig::SetFilename (std::string filename) {} @@ -18,7 +21,7 @@ NoneFileConfig::Default (void) void NoneFileConfig::Global (void) {} -void +void NoneFileConfig::Attributes (void) {} diff --git a/src/config-store/model/file-config.h b/src/config-store/model/file-config.h index 589153f9c..c6c658d9e 100644 --- a/src/config-store/model/file-config.h +++ b/src/config-store/model/file-config.h @@ -5,6 +5,10 @@ namespace ns3 { +/** + * \ingroup configstore + * + */ class FileConfig { public: @@ -15,6 +19,10 @@ public: virtual void Attributes (void) = 0; }; +/** + * \ingroup configstore + * + */ class NoneFileConfig : public FileConfig { public: diff --git a/src/config-store/model/gtk-config-store.h b/src/config-store/model/gtk-config-store.h index 5aa902ab3..37105e4cc 100644 --- a/src/config-store/model/gtk-config-store.h +++ b/src/config-store/model/gtk-config-store.h @@ -23,7 +23,9 @@ namespace ns3 { /** + * \ingroup configstore * \brief A class that provides a GTK-based front end to ns3::ConfigStore + * */ class GtkConfigStore { diff --git a/src/config-store/model/model-node-creator.cc b/src/config-store/model/model-node-creator.cc index cac0cb065..5315f3414 100644 --- a/src/config-store/model/model-node-creator.cc +++ b/src/config-store/model/model-node-creator.cc @@ -32,7 +32,7 @@ ModelCreator::Build (GtkTreeStore *treestore) //this function will go through all the objects and call on them //DoStartVisitObject, DoIterate and DoEndVisitObject Iterate (); - //NS_ASSERT (m_iters.size () == 1); + NS_ASSERT (m_iters.size () == 1); } @@ -116,8 +116,8 @@ ModelCreator::DoStartVisitArrayItem (const ObjectVectorValue &vector, uint32_t i node->index = index; gtk_tree_store_append (m_treestore, current, parent); gtk_tree_store_set (m_treestore, current, - COL_NODE, node, - -1); + COL_NODE, node, + -1); m_iters.push_back (current); } void @@ -125,7 +125,7 @@ ModelCreator::DoEndVisitArrayItem (void) { GtkTreeIter *iter = m_iters.back (); g_free (iter); - m_iters.pop_back (); + m_iters.pop_back (); } void @@ -165,4 +165,4 @@ ModelCreator::DoEndVisitMapItem (void) m_iters.pop_back (); } -}//end namespace ns3 +} //end namespace ns3 diff --git a/src/config-store/model/model-node-creator.h b/src/config-store/model/model-node-creator.h index de0160b84..6b5ea693a 100644 --- a/src/config-store/model/model-node-creator.h +++ b/src/config-store/model/model-node-creator.h @@ -47,6 +47,10 @@ struct ModelNode Ptr object; uint32_t index; }; +/** + * \ingroup configstore + * + */ class ModelCreator : public AttributeIterator { public: diff --git a/src/config-store/model/model-typeid-creator.cc b/src/config-store/model/model-typeid-creator.cc index e6a2478ca..84e892024 100644 --- a/src/config-store/model/model-typeid-creator.cc +++ b/src/config-store/model/model-typeid-creator.cc @@ -78,4 +78,4 @@ ModelTypeidCreator::EndVisitTypeId (void) { Remove (); } -}//end namespace ns3 +} //end namespace ns3 diff --git a/src/config-store/model/raw-text-config.cc b/src/config-store/model/raw-text-config.cc index b83c95fef..5c0109699 100644 --- a/src/config-store/model/raw-text-config.cc +++ b/src/config-store/model/raw-text-config.cc @@ -12,7 +12,8 @@ namespace ns3 { RawTextConfigSave::RawTextConfigSave () : m_os (0) -{} +{ +} RawTextConfigSave::~RawTextConfigSave () { if (m_os != 0) @@ -33,11 +34,11 @@ RawTextConfigSave::Default (void) { class RawTextDefaultIterator : public AttributeDefaultIterator { - public: +public: RawTextDefaultIterator (std::ostream *os) { m_os = os; } - private: +private: virtual void StartVisitTypeId (std::string name) { m_typeId = name; } @@ -66,10 +67,10 @@ RawTextConfigSave::Attributes (void) { class RawTextAttributeIterator : public AttributeIterator { - public: +public: RawTextAttributeIterator (std::ostream *os) : m_os (os) {} - private: +private: virtual void DoVisitAttribute (Ptr object, std::string name) { StringValue str; object->GetAttribute (name, str); @@ -84,7 +85,8 @@ RawTextConfigSave::Attributes (void) RawTextConfigLoad::RawTextConfigLoad () : m_is (0) -{} +{ +} RawTextConfigLoad::~RawTextConfigLoad () { if (m_is != 0) @@ -121,9 +123,9 @@ RawTextConfigLoad::Default (void) NS_LOG_DEBUG ("type=" << type << ", name=" << name << ", value=" << value); value = Strip (value); if (type == "default") - { - Config::SetDefault (name, StringValue (value)); - } + { + Config::SetDefault (name, StringValue (value)); + } *m_is >> type >> name >> value; } } @@ -138,9 +140,9 @@ RawTextConfigLoad::Global (void) NS_LOG_DEBUG ("type=" << type << ", name=" << name << ", value=" << value); value = Strip (value); if (type == "global") - { - Config::SetGlobal (name, StringValue (value)); - } + { + Config::SetGlobal (name, StringValue (value)); + } *m_is >> type >> name >> value; } } @@ -155,9 +157,9 @@ RawTextConfigLoad::Attributes (void) NS_LOG_DEBUG ("type=" << type << ", path=" << path << ", value=" << value); value = Strip (value); if (type == "value") - { - Config::Set (path, StringValue (value)); - } + { + Config::Set (path, StringValue (value)); + } *m_is >> type >> path >> value; } } diff --git a/src/config-store/model/raw-text-config.h b/src/config-store/model/raw-text-config.h index 7244c7801..e1b8259ab 100644 --- a/src/config-store/model/raw-text-config.h +++ b/src/config-store/model/raw-text-config.h @@ -7,6 +7,10 @@ namespace ns3 { +/** + * \ingroup configstore + * + */ class RawTextConfigSave : public FileConfig { public: @@ -20,6 +24,10 @@ private: std::ofstream *m_os; }; +/** + * \ingroup configstore + * + */ class RawTextConfigLoad : public FileConfig { public: diff --git a/src/config-store/model/xml-config.cc b/src/config-store/model/xml-config.cc index 5551c909b..833fc0d86 100644 --- a/src/config-store/model/xml-config.cc +++ b/src/config-store/model/xml-config.cc @@ -82,39 +82,39 @@ XmlConfigSave::Default (void) { class XmlDefaultIterator : public AttributeDefaultIterator { - public: +public: XmlDefaultIterator (xmlTextWriterPtr writer) { m_writer = writer; } - private: +private: virtual void StartVisitTypeId (std::string name) { m_typeid = name; } virtual void DoVisitAttribute (std::string name, std::string defaultValue) { int rc; rc = xmlTextWriterStartElement(m_writer, BAD_CAST "default"); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); - } - std::string fullname = m_typeid + "::" + name; - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "name", - BAD_CAST fullname.c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", - BAD_CAST defaultValue.c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); + } + std::string fullname = m_typeid + "::" + name; + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "name", + BAD_CAST fullname.c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", + BAD_CAST defaultValue.c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } rc = xmlTextWriterEndElement(m_writer); if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); - } + { + NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); + } } xmlTextWriterPtr m_writer; std::string m_typeid; @@ -128,36 +128,36 @@ XmlConfigSave::Attributes (void) { class XmlTextAttributeIterator : public AttributeIterator { - public: +public: XmlTextAttributeIterator (xmlTextWriterPtr writer) : m_writer (writer) {} - private: +private: virtual void DoVisitAttribute (Ptr object, std::string name) { StringValue str; object->GetAttribute (name, str); int rc; rc = xmlTextWriterStartElement(m_writer, BAD_CAST "value"); if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); - } + { + NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); + } rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "path", - BAD_CAST GetCurrentPath ().c_str ()); + BAD_CAST GetCurrentPath ().c_str ()); if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", - BAD_CAST str.Get ().c_str ()); + BAD_CAST str.Get ().c_str ()); if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } rc = xmlTextWriterEndElement(m_writer); if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); - } + { + NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); + } } xmlTextWriterPtr m_writer; }; @@ -176,27 +176,27 @@ XmlConfigSave::Global (void) (*i)->GetValue (value); rc = xmlTextWriterStartElement(m_writer, BAD_CAST "global"); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); - } - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "name", - BAD_CAST (*i)->GetName ().c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", - BAD_CAST value.Get ().c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); + } + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "name", + BAD_CAST (*i)->GetName ().c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", + BAD_CAST value.Get ().c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } rc = xmlTextWriterEndElement(m_writer); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); - } + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); + } } } @@ -229,26 +229,26 @@ XmlConfigLoad::Default (void) { const xmlChar *type = xmlTextReaderConstName(reader); if (type == 0) - { - NS_FATAL_ERROR ("Invalid value"); - } + { + NS_FATAL_ERROR ("Invalid value"); + } if (std::string ((char*)type) == "default") - { - xmlChar *name = xmlTextReaderGetAttribute (reader, BAD_CAST "name"); - if (name == 0) - { - NS_FATAL_ERROR ("Error getting attribute 'name'"); - } - xmlChar *value = xmlTextReaderGetAttribute (reader, BAD_CAST "value"); - if (value == 0) - { - NS_FATAL_ERROR ("Error getting attribute 'value'"); - } - NS_LOG_DEBUG ("default="<<(char*)name<<", value=" < object, TypeId typeId, const AttributeList &attributes) { @@ -17,46 +17,46 @@ void PythonCompleteConstruct (Ptr object, TypeId typeId, const Attribute class PythonEventImpl : public ns3::EventImpl { private: - PyObject *m_callback; - PyObject *m_args; + PyObject *m_callback; + PyObject *m_args; public: - PythonEventImpl (PyObject *callback, PyObject *args) - { - m_callback = callback; - Py_INCREF(m_callback); - m_args = args; - Py_INCREF(m_args); - } - virtual ~PythonEventImpl () - { - PyGILState_STATE __py_gil_state; - __py_gil_state = (PyEval_ThreadsInitialized() ? PyGILState_Ensure() : (PyGILState_STATE) 0); + PythonEventImpl (PyObject *callback, PyObject *args) + { + m_callback = callback; + Py_INCREF(m_callback); + m_args = args; + Py_INCREF(m_args); + } + virtual ~PythonEventImpl () + { + PyGILState_STATE __py_gil_state; + __py_gil_state = (PyEval_ThreadsInitialized() ? PyGILState_Ensure() : (PyGILState_STATE) 0); - Py_DECREF(m_callback); - Py_DECREF(m_args); + Py_DECREF(m_callback); + Py_DECREF(m_args); - if (PyEval_ThreadsInitialized()) - PyGILState_Release(__py_gil_state); - } - virtual void Notify () - { - PyGILState_STATE __py_gil_state; - __py_gil_state = (PyEval_ThreadsInitialized() ? PyGILState_Ensure() : (PyGILState_STATE) 0); - - PyObject *retval = PyObject_CallObject(m_callback, m_args); - if (retval) { - if (retval != Py_None) { - PyErr_SetString(PyExc_TypeError, "event callback should return None"); - PyErr_Print(); - } - Py_DECREF(retval); - } else { - PyErr_Print(); - } + if (PyEval_ThreadsInitialized()) + PyGILState_Release(__py_gil_state); + } + virtual void Notify () + { + PyGILState_STATE __py_gil_state; + __py_gil_state = (PyEval_ThreadsInitialized() ? PyGILState_Ensure() : (PyGILState_STATE) 0); - if (PyEval_ThreadsInitialized()) - PyGILState_Release(__py_gil_state); - } + PyObject *retval = PyObject_CallObject(m_callback, m_args); + if (retval) { + if (retval != Py_None) { + PyErr_SetString(PyExc_TypeError, "event callback should return None"); + PyErr_Print(); + } + Py_DECREF(retval); + } else { + PyErr_Print(); + } + + if (PyEval_ThreadsInitialized()) + PyGILState_Release(__py_gil_state); + } }; @@ -64,48 +64,48 @@ PyObject * _wrap_Simulator_Schedule(PyNs3Simulator *PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs, PyObject **return_exception) { - PyObject *exc_type, *traceback; - PyObject *py_time; - PyObject *py_callback; - PyObject *user_args; - ns3::Ptr py_event_impl; - PyNs3EventId *py_EventId; + PyObject *exc_type, *traceback; + PyObject *py_time; + PyObject *py_callback; + PyObject *user_args; + ns3::Ptr py_event_impl; + PyNs3EventId *py_EventId; - if (kwargs && PyObject_Length(kwargs) > 0) { - PyErr_SetString(PyExc_TypeError, "keyword arguments not supported"); - goto error; + if (kwargs && PyObject_Length(kwargs) > 0) { + PyErr_SetString(PyExc_TypeError, "keyword arguments not supported"); + goto error; } - if (PyTuple_GET_SIZE(args) < 2) { - PyErr_SetString(PyExc_TypeError, "ns3.Simulator.Schedule needs at least 2 arguments"); - goto error; + if (PyTuple_GET_SIZE(args) < 2) { + PyErr_SetString(PyExc_TypeError, "ns3.Simulator.Schedule needs at least 2 arguments"); + goto error; } - py_time = PyTuple_GET_ITEM(args, 0); - py_callback = PyTuple_GET_ITEM(args, 1); + py_time = PyTuple_GET_ITEM(args, 0); + py_callback = PyTuple_GET_ITEM(args, 1); - if (!PyObject_IsInstance(py_time, (PyObject*) &PyNs3Time_Type)) { - PyErr_SetString(PyExc_TypeError, "Parameter 1 should be a ns3.Time instance"); - goto error; + if (!PyObject_IsInstance(py_time, (PyObject*) &PyNs3Time_Type)) { + PyErr_SetString(PyExc_TypeError, "Parameter 1 should be a ns3.Time instance"); + goto error; } - if (!PyCallable_Check(py_callback)) { - PyErr_SetString(PyExc_TypeError, "Parameter 2 should be callable"); - goto error; + if (!PyCallable_Check(py_callback)) { + PyErr_SetString(PyExc_TypeError, "Parameter 2 should be callable"); + goto error; } - user_args = PyTuple_GetSlice(args, 2, PyTuple_GET_SIZE(args)); - py_event_impl = ns3::Create(py_callback, user_args); - Py_DECREF(user_args); + user_args = PyTuple_GetSlice(args, 2, PyTuple_GET_SIZE(args)); + py_event_impl = ns3::Create(py_callback, user_args); + Py_DECREF(user_args); - py_EventId = PyObject_New(PyNs3EventId, &PyNs3EventId_Type); - py_EventId->obj = new ns3::EventId( - ns3::Simulator::Schedule(*((PyNs3Time *) py_time)->obj, py_event_impl)); - py_EventId->flags = PYBINDGEN_WRAPPER_FLAG_NONE; - return (PyObject *) py_EventId; + py_EventId = PyObject_New(PyNs3EventId, &PyNs3EventId_Type); + py_EventId->obj = new ns3::EventId( + ns3::Simulator::Schedule(*((PyNs3Time *) py_time)->obj, py_event_impl)); + py_EventId->flags = PYBINDGEN_WRAPPER_FLAG_NONE; + return (PyObject *) py_EventId; error: - PyErr_Fetch(&exc_type, return_exception, &traceback); - Py_XDECREF(exc_type); - Py_XDECREF(traceback); - return NULL; + PyErr_Fetch(&exc_type, return_exception, &traceback); + Py_XDECREF(exc_type); + Py_XDECREF(traceback); + return NULL; } @@ -113,41 +113,41 @@ PyObject * _wrap_Simulator_ScheduleNow(PyNs3Simulator *PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs, PyObject **return_exception) { - PyObject *exc_type, *traceback; - PyObject *py_callback; - PyObject *user_args; - ns3::Ptr py_event_impl; - PyNs3EventId *py_EventId; + PyObject *exc_type, *traceback; + PyObject *py_callback; + PyObject *user_args; + ns3::Ptr py_event_impl; + PyNs3EventId *py_EventId; - if (kwargs && PyObject_Length(kwargs) > 0) { - PyErr_SetString(PyExc_TypeError, "keyword arguments not supported"); - goto error; + if (kwargs && PyObject_Length(kwargs) > 0) { + PyErr_SetString(PyExc_TypeError, "keyword arguments not supported"); + goto error; } - if (PyTuple_GET_SIZE(args) < 1) { - PyErr_SetString(PyExc_TypeError, "ns3.Simulator.Schedule needs at least 1 argument"); - goto error; + if (PyTuple_GET_SIZE(args) < 1) { + PyErr_SetString(PyExc_TypeError, "ns3.Simulator.Schedule needs at least 1 argument"); + goto error; } - py_callback = PyTuple_GET_ITEM(args, 0); + py_callback = PyTuple_GET_ITEM(args, 0); - if (!PyCallable_Check(py_callback)) { - PyErr_SetString(PyExc_TypeError, "Parameter 2 should be callable"); - goto error; + if (!PyCallable_Check(py_callback)) { + PyErr_SetString(PyExc_TypeError, "Parameter 2 should be callable"); + goto error; } - user_args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args)); - py_event_impl = ns3::Create(py_callback, user_args); - Py_DECREF(user_args); + user_args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args)); + py_event_impl = ns3::Create(py_callback, user_args); + Py_DECREF(user_args); - py_EventId = PyObject_New(PyNs3EventId, &PyNs3EventId_Type); - py_EventId->obj = new ns3::EventId(ns3::Simulator::ScheduleNow(py_event_impl)); - py_EventId->flags = PYBINDGEN_WRAPPER_FLAG_NONE; - return (PyObject *) py_EventId; + py_EventId = PyObject_New(PyNs3EventId, &PyNs3EventId_Type); + py_EventId->obj = new ns3::EventId(ns3::Simulator::ScheduleNow(py_event_impl)); + py_EventId->flags = PYBINDGEN_WRAPPER_FLAG_NONE; + return (PyObject *) py_EventId; error: - PyErr_Fetch(&exc_type, return_exception, &traceback); - Py_XDECREF(exc_type); - Py_XDECREF(traceback); - return NULL; + PyErr_Fetch(&exc_type, return_exception, &traceback); + Py_XDECREF(exc_type); + Py_XDECREF(traceback); + return NULL; } @@ -155,41 +155,41 @@ PyObject * _wrap_Simulator_ScheduleDestroy(PyNs3Simulator *PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs, PyObject **return_exception) { - PyObject *exc_type, *traceback; - PyObject *py_callback; - PyObject *user_args; - ns3::Ptr py_event_impl; - PyNs3EventId *py_EventId; + PyObject *exc_type, *traceback; + PyObject *py_callback; + PyObject *user_args; + ns3::Ptr py_event_impl; + PyNs3EventId *py_EventId; - if (kwargs && PyObject_Length(kwargs) > 0) { - PyErr_SetString(PyExc_TypeError, "keyword arguments not supported"); - goto error; + if (kwargs && PyObject_Length(kwargs) > 0) { + PyErr_SetString(PyExc_TypeError, "keyword arguments not supported"); + goto error; } - if (PyTuple_GET_SIZE(args) < 1) { - PyErr_SetString(PyExc_TypeError, "ns3.Simulator.Schedule needs at least 1 argument"); - goto error; + if (PyTuple_GET_SIZE(args) < 1) { + PyErr_SetString(PyExc_TypeError, "ns3.Simulator.Schedule needs at least 1 argument"); + goto error; } - py_callback = PyTuple_GET_ITEM(args, 0); + py_callback = PyTuple_GET_ITEM(args, 0); - if (!PyCallable_Check(py_callback)) { - PyErr_SetString(PyExc_TypeError, "Parameter 2 should be callable"); - goto error; + if (!PyCallable_Check(py_callback)) { + PyErr_SetString(PyExc_TypeError, "Parameter 2 should be callable"); + goto error; } - user_args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args)); - py_event_impl = ns3::Create(py_callback, user_args); - Py_DECREF(user_args); + user_args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args)); + py_event_impl = ns3::Create(py_callback, user_args); + Py_DECREF(user_args); - py_EventId = PyObject_New(PyNs3EventId, &PyNs3EventId_Type); - py_EventId->obj = new ns3::EventId(ns3::Simulator::ScheduleDestroy(py_event_impl)); - py_EventId->flags = PYBINDGEN_WRAPPER_FLAG_NONE; - return (PyObject *) py_EventId; + py_EventId = PyObject_New(PyNs3EventId, &PyNs3EventId_Type); + py_EventId->obj = new ns3::EventId(ns3::Simulator::ScheduleDestroy(py_event_impl)); + py_EventId->flags = PYBINDGEN_WRAPPER_FLAG_NONE; + return (PyObject *) py_EventId; error: - PyErr_Fetch(&exc_type, return_exception, &traceback); - Py_XDECREF(exc_type); - Py_XDECREF(traceback); - return NULL; + PyErr_Fetch(&exc_type, return_exception, &traceback); + Py_XDECREF(exc_type); + Py_XDECREF(traceback); + return NULL; } @@ -197,89 +197,89 @@ PyObject * _wrap_TypeId_LookupByNameFailSafe(PyNs3TypeId *PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs, PyObject **return_exception) { - bool ok; - const char *name; - Py_ssize_t name_len; - ns3::TypeId tid; - PyNs3TypeId *py_tid; - const char *keywords[] = {"name", NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "s#", (char **) keywords, &name, &name_len)) { - PyObject *exc_type, *traceback; - PyErr_Fetch(&exc_type, return_exception, &traceback); - Py_XDECREF(exc_type); - Py_XDECREF(traceback); - return NULL; + bool ok; + const char *name; + Py_ssize_t name_len; + ns3::TypeId tid; + PyNs3TypeId *py_tid; + const char *keywords[] = { "name", NULL}; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "s#", (char **) keywords, &name, &name_len)) { + PyObject *exc_type, *traceback; + PyErr_Fetch(&exc_type, return_exception, &traceback); + Py_XDECREF(exc_type); + Py_XDECREF(traceback); + return NULL; } - ok = ns3::TypeId::LookupByNameFailSafe(std::string(name, name_len), &tid); - if (!ok) + ok = ns3::TypeId::LookupByNameFailSafe(std::string(name, name_len), &tid); + if (!ok) { - PyErr_Format(PyExc_KeyError, "The ns3 type with name `%s' is not registered", name); - return NULL; + PyErr_Format(PyExc_KeyError, "The ns3 type with name `%s' is not registered", name); + return NULL; } - py_tid = PyObject_New(PyNs3TypeId, &PyNs3TypeId_Type); - py_tid->obj = new ns3::TypeId (tid); - PyNs3TypeId_wrapper_registry[(void *) py_tid->obj] = (PyObject *) py_tid; - - return (PyObject *) py_tid; + py_tid = PyObject_New(PyNs3TypeId, &PyNs3TypeId_Type); + py_tid->obj = new ns3::TypeId (tid); + PyNs3TypeId_wrapper_registry[(void *) py_tid->obj] = (PyObject *) py_tid; + + return (PyObject *) py_tid; } class CommandLinePythonValueSetter : public ns3::RefCountBase { - PyObject *m_namespace; - std::string m_variable; + PyObject *m_namespace; + std::string m_variable; public: - CommandLinePythonValueSetter (PyObject *ns, std::string const &variable) { - Py_INCREF(ns); - m_namespace = ns; - m_variable = variable; - } - bool Parse (std::string value) { - PyObject *pyvalue = PyString_FromStringAndSize (value.data(), value.size()); - PyObject_SetAttrString (m_namespace, (char *) m_variable.c_str(), pyvalue); - if (PyErr_Occurred()) { - PyErr_Print(); - return false; - } - return true; - } - virtual ~CommandLinePythonValueSetter () { - Py_DECREF (m_namespace); - m_namespace = NULL; - } - + CommandLinePythonValueSetter (PyObject *ns, std::string const &variable) { + Py_INCREF(ns); + m_namespace = ns; + m_variable = variable; + } + bool Parse (std::string value) { + PyObject *pyvalue = PyString_FromStringAndSize (value.data(), value.size()); + PyObject_SetAttrString (m_namespace, (char *) m_variable.c_str(), pyvalue); + if (PyErr_Occurred()) { + PyErr_Print(); + return false; + } + return true; + } + virtual ~CommandLinePythonValueSetter () { + Py_DECREF (m_namespace); + m_namespace = NULL; + } + }; PyObject * _wrap_CommandLine_AddValue(PyNs3CommandLine *self, PyObject *args, PyObject *kwargs, PyObject **return_exception) { - const char *name, *help, *variable = NULL; - PyObject *py_namespace = NULL; - const char *keywords[] = {"name", "help", "variable", "namespace", NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "ss|sO", (char **) keywords, &name, &help, &variable, &py_namespace)) { - PyObject *exc_type, *traceback; - PyErr_Fetch(&exc_type, return_exception, &traceback); - Py_XDECREF(exc_type); - Py_XDECREF(traceback); - return NULL; - } - - if (variable == NULL) { - variable = name; - } - if (py_namespace == NULL) { - py_namespace = (PyObject *) self; + const char *name, *help, *variable = NULL; + PyObject *py_namespace = NULL; + const char *keywords[] = { "name", "help", "variable", "namespace", NULL}; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "ss|sO", (char **) keywords, &name, &help, &variable, &py_namespace)) { + PyObject *exc_type, *traceback; + PyErr_Fetch(&exc_type, return_exception, &traceback); + Py_XDECREF(exc_type); + Py_XDECREF(traceback); + return NULL; } - ns3::Ptr setter = ns3::Create (py_namespace, variable); - self->obj->AddValue (name, help, ns3::MakeCallback (&CommandLinePythonValueSetter::Parse, setter)); + if (variable == NULL) { + variable = name; + } + if (py_namespace == NULL) { + py_namespace = (PyObject *) self; + } - Py_INCREF(Py_None); - return Py_None; + ns3::Ptr setter = ns3::Create (py_namespace, variable); + self->obj->AddValue (name, help, ns3::MakeCallback (&CommandLinePythonValueSetter::Parse, setter)); + + Py_INCREF(Py_None); + return Py_None; } @@ -287,53 +287,53 @@ PyObject * _wrap_Simulator_Run(PyNs3Simulator *PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs, PyObject **return_exception) { - const char *keywords[] = {"signal_check_frequency", NULL}; - int signal_check_frequency; + const char *keywords[] = { "signal_check_frequency", NULL}; + int signal_check_frequency; - ns3::Ptr defaultSim = - ns3::DynamicCast (ns3::Simulator::GetImplementation ()); - if (defaultSim) { - signal_check_frequency = 100; + ns3::Ptr defaultSim = + ns3::DynamicCast (ns3::Simulator::GetImplementation ()); + if (defaultSim) { + signal_check_frequency = 100; } else { - signal_check_frequency = -1; - } - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "|i", (char **) keywords, &signal_check_frequency)) { - PyObject *exc_type, *traceback; - PyErr_Fetch(&exc_type, return_exception, &traceback); - Py_XDECREF(exc_type); - Py_XDECREF(traceback); - return NULL; + signal_check_frequency = -1; } - PyThreadState *py_thread_state = NULL; + if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "|i", (char **) keywords, &signal_check_frequency)) { + PyObject *exc_type, *traceback; + PyErr_Fetch(&exc_type, return_exception, &traceback); + Py_XDECREF(exc_type); + Py_XDECREF(traceback); + return NULL; + } - if (signal_check_frequency == -1) + PyThreadState *py_thread_state = NULL; + + if (signal_check_frequency == -1) { - if (PyEval_ThreadsInitialized ()) - py_thread_state = PyEval_SaveThread(); - ns3::Simulator::Run(); - if (py_thread_state) - PyEval_RestoreThread(py_thread_state); + if (PyEval_ThreadsInitialized ()) + py_thread_state = PyEval_SaveThread(); + ns3::Simulator::Run(); + if (py_thread_state) + PyEval_RestoreThread(py_thread_state); } else { - while (!ns3::Simulator::IsFinished()) - { - if (PyEval_ThreadsInitialized()) - py_thread_state = PyEval_SaveThread(); + while (!ns3::Simulator::IsFinished()) + { + if (PyEval_ThreadsInitialized()) + py_thread_state = PyEval_SaveThread(); - for (int n = signal_check_frequency; n > 0 && !ns3::Simulator::IsFinished(); --n) - { - ns3::Simulator::RunOneEvent(); + for (int n = signal_check_frequency; n > 0 && !ns3::Simulator::IsFinished(); --n) + { + ns3::Simulator::RunOneEvent(); } - - if (py_thread_state) - PyEval_RestoreThread(py_thread_state); - PyErr_CheckSignals(); - if (PyErr_Occurred()) - return NULL; + + if (py_thread_state) + PyEval_RestoreThread(py_thread_state); + PyErr_CheckSignals(); + if (PyErr_Occurred()) + return NULL; } } - Py_INCREF(Py_None); - return Py_None; + Py_INCREF(Py_None); + return Py_None; } diff --git a/src/core/bindings/scan-header.h b/src/core/bindings/scan-header.h index af0937136..f8295599c 100644 --- a/src/core/bindings/scan-header.h +++ b/src/core/bindings/scan-header.h @@ -7,26 +7,26 @@ using namespace ns3; namespace { - static inline Ptr - __dummy_function_to_force_template_instantiation (Ptr obj, TypeId typeId) - { - return obj->GetObject (typeId); - } - - - static inline void - __dummy_function_to_force_template_instantiation_v2 () - { - Time t1, t2, t3; - t1 = t2 + t3; - t1 = t2 - t3; - t1 < t2; - t1 <= t2; - t1 == t2; - t1 != t2; - t1 >= t2; - t1 > t2; - } - +static inline Ptr +__dummy_function_to_force_template_instantiation (Ptr obj, TypeId typeId) +{ + return obj->GetObject (typeId); +} + + +static inline void +__dummy_function_to_force_template_instantiation_v2 () +{ + Time t1, t2, t3; + t1 = t2 + t3; + t1 = t2 - t3; + t1 < t2; + t1 <= t2; + t1 == t2; + t1 != t2; + t1 >= t2; + t1 > t2; +} + } diff --git a/src/core/examples/main-callback.cc b/src/core/examples/main-callback.cc index 8e9dd8966..713bdd63f 100644 --- a/src/core/examples/main-callback.cc +++ b/src/core/examples/main-callback.cc @@ -15,8 +15,8 @@ CbOne (double a, double b) class MyCb { public: int CbTwo (double a) { - std::cout << "invoke cbTwo a=" << a << std::endl; - return -5; + std::cout << "invoke cbTwo a=" << a << std::endl; + return -5; } }; @@ -34,6 +34,9 @@ int main (int argc, char *argv[]) // invoke cbOne function through callback instance double retOne; retOne = one (10.0, 20.0); + // cast retOne to void, to suppress variable ‘retOne’ set but + // not used compiler warning + (void) retOne; // return type: int // first arg type: double @@ -45,8 +48,10 @@ int main (int argc, char *argv[]) NS_ASSERT (!two.IsNull ()); // invoke MyCb::cbTwo through callback instance int retTwo; - retTwo = two (10.0); - + retTwo = two (10.0); + // cast retTwo to void, to suppress variable ‘retTwo’ set but + // not used compiler warning + (void) retTwo; two = MakeNullCallback (); // invoking a null callback is just like // invoking a null function pointer: diff --git a/src/core/examples/main-test-sync.cc b/src/core/examples/main-test-sync.cc index b1e8fcc07..dac2c8418 100644 --- a/src/core/examples/main-test-sync.cc +++ b/src/core/examples/main-test-sync.cc @@ -24,7 +24,7 @@ inserted_function (void) { NS_ASSERT (gFirstRun); NS_LOG_UNCOND ("inserted_function() called at " << - Simulator::Now ().GetSeconds () << " s"); + Simulator::Now ().GetSeconds () << " s"); } void @@ -32,14 +32,14 @@ background_function (void) { NS_ASSERT (gFirstRun); NS_LOG_UNCOND ("background_function() called at " << - Simulator::Now ().GetSeconds () << " s"); + Simulator::Now ().GetSeconds () << " s"); } void first_function (void) { NS_LOG_UNCOND ("first_function() called at " << - Simulator::Now ().GetSeconds () << " s"); + Simulator::Now ().GetSeconds () << " s"); gFirstRun = true; } @@ -90,7 +90,7 @@ void test (void) { GlobalValue::Bind ("SimulatorImplementationType", - StringValue ("ns3::RealtimeSimulatorImpl")); + StringValue ("ns3::RealtimeSimulatorImpl")); FakeNetDevice fnd; @@ -108,11 +108,11 @@ test (void) } Ptr st3 = Create ( - MakeCallback (&FakeNetDevice::Doit3, &fnd)); + MakeCallback (&FakeNetDevice::Doit3, &fnd)); st3->Start (); Ptr st4 = Create ( - MakeCallback (&FakeNetDevice::Doit4, &fnd)); + MakeCallback (&FakeNetDevice::Doit4, &fnd)); st4->Start (); Simulator::Stop (Seconds (15.0)); diff --git a/src/core/examples/sample-random-variable.cc b/src/core/examples/sample-random-variable.cc index f388e5dfd..a213e0e5a 100644 --- a/src/core/examples/sample-random-variable.cc +++ b/src/core/examples/sample-random-variable.cc @@ -31,7 +31,7 @@ using namespace std; * pseudo-random number generator, this program should always output the * same number. Likewise, ns-3 simulations using random variables will * behave deterministically unless the user changes the RunNumber or the - * Seed. + * Seed. * * There are three primary mechanisms to change the seed or run numbers * from their default integer value of 1 @@ -59,5 +59,5 @@ int main (int argc, char *argv[]) UniformVariable uv; cout << uv.GetValue () << endl; - + } diff --git a/src/core/examples/sample-simulator.cc b/src/core/examples/sample-simulator.cc index c46755679..ed2e3fd93 100644 --- a/src/core/examples/sample-simulator.cc +++ b/src/core/examples/sample-simulator.cc @@ -84,7 +84,7 @@ int main (int argc, char *argv[]) EventId id = Simulator::Schedule (Seconds (30.0), &CancelledEvent); Simulator::Cancel (id); - + Simulator::Run (); Simulator::Destroy (); diff --git a/src/core/model/abort.h b/src/core/model/abort.h index ab1d9acbd..7061ef971 100644 --- a/src/core/model/abort.h +++ b/src/core/model/abort.h @@ -42,9 +42,9 @@ */ #define NS_ABORT_MSG(msg) \ do { \ - std::cerr << "aborted. "; \ - NS_FATAL_ERROR (msg); \ - } while (false) + std::cerr << "aborted. "; \ + NS_FATAL_ERROR (msg); \ + } while (false) /** @@ -68,12 +68,12 @@ */ #define NS_ABORT_IF(cond) \ do { \ - if (cond) \ - { \ - std::cerr << "aborted. cond=\"" << #cond << ", "; \ - NS_FATAL_ERROR_NO_MSG (); \ - } \ - } while (false) + if (cond) \ + { \ + std::cerr << "aborted. cond=\"" << # cond << ", "; \ + NS_FATAL_ERROR_NO_MSG (); \ + } \ + } while (false) /** * \ingroup debugging @@ -97,12 +97,12 @@ */ #define NS_ABORT_MSG_IF(cond, msg) \ do { \ - if (cond) \ - { \ - std::cerr << "aborted. cond=\"" << #cond << "\", "; \ - NS_FATAL_ERROR (msg); \ - } \ - } while (false) + if (cond) \ + { \ + std::cerr << "aborted. cond=\"" << # cond << "\", "; \ + NS_FATAL_ERROR (msg); \ + } \ + } while (false) /** * \ingroup debugging @@ -114,7 +114,7 @@ * * \see NS_ABORT_IF */ -#define NS_ABORT_UNLESS(cond) \ +#define NS_ABORT_UNLESS(cond) \ NS_ABORT_IF(!(cond)) /** @@ -128,7 +128,7 @@ * * \see NS_ABORT_MSG_IF */ -#define NS_ABORT_MSG_UNLESS(cond, msg) \ +#define NS_ABORT_MSG_UNLESS(cond, msg) \ NS_ABORT_MSG_IF(!(cond),msg) #endif /* NS3_ABORT_H */ diff --git a/src/core/model/assert.h b/src/core/model/assert.h index d1252808a..12f7ec0f5 100644 --- a/src/core/model/assert.h +++ b/src/core/model/assert.h @@ -28,7 +28,7 @@ #include "fatal-error.h" /** - * \ingroup core + * \ingroup constructs * \defgroup debugging Debugging */ /** @@ -67,7 +67,7 @@ if (!(condition)) \ { \ std::cerr << "assert failed. cond=\"" << \ - #condition << "\", "; \ + # condition << "\", "; \ NS_FATAL_ERROR_NO_MSG(); \ } \ } \ @@ -89,7 +89,7 @@ if (!(condition)) \ { \ std::cerr << "assert failed. cond=\"" << \ - #condition << "\", "; \ + # condition << "\", "; \ NS_FATAL_ERROR (message); \ } \ } \ diff --git a/src/core/model/attribute-accessor-helper.h b/src/core/model/attribute-accessor-helper.h index cee4bae86..2f0d75b1c 100644 --- a/src/core/model/attribute-accessor-helper.h +++ b/src/core/model/attribute-accessor-helper.h @@ -64,12 +64,12 @@ public: const U *value = dynamic_cast (&val); if (value == 0) { - return false; + return false; } T *obj = dynamic_cast (object); if (obj == 0) { - return false; + return false; } return DoSet (obj, value); } @@ -78,12 +78,12 @@ public: U *value = dynamic_cast (&val); if (value == 0) { - return false; + return false; } const T *obj = dynamic_cast (object); if (obj == 0) { - return false; + return false; } return DoGet (obj, value); } @@ -98,200 +98,200 @@ Ptr DoMakeAccessorHelperOne (U T::*memberVariable) { class MemberVariable : public AccessorHelper - { - public: - MemberVariable (U T::*memberVariable) - : AccessorHelper (), - m_memberVariable (memberVariable) - {} - private: - virtual bool DoSet (T *object, const V *v) const { - typename AccessorTrait::Result tmp; - bool ok = v->GetAccessor (tmp); - if (!ok) - { - return false; - } - (object->*m_memberVariable) = tmp; - return true; - } - virtual bool DoGet (const T *object, V *v) const { - v->Set (object->*m_memberVariable); - return true; - } - virtual bool HasGetter (void) const { - return true; - } - virtual bool HasSetter (void) const { - return true; - } - - U T::*m_memberVariable; - }; + { +public: + MemberVariable (U T::*memberVariable) + : AccessorHelper (), + m_memberVariable (memberVariable) + {} +private: + virtual bool DoSet (T *object, const V *v) const { + typename AccessorTrait::Result tmp; + bool ok = v->GetAccessor (tmp); + if (!ok) + { + return false; + } + (object->*m_memberVariable) = tmp; + return true; + } + virtual bool DoGet (const T *object, V *v) const { + v->Set (object->*m_memberVariable); + return true; + } + virtual bool HasGetter (void) const { + return true; + } + virtual bool HasSetter (void) const { + return true; + } + + U T::*m_memberVariable; + }; return Ptr (new MemberVariable (memberVariable), false); } template Ptr -DoMakeAccessorHelperOne (U (T::*getter) (void) const) +DoMakeAccessorHelperOne (U (T::*getter)(void) const) { class MemberMethod : public AccessorHelper - { - public: - MemberMethod (U (T::*getter) (void) const) - : AccessorHelper (), - m_getter (getter) - {} - private: - virtual bool DoSet (T *object, const V *v) const { - return false; - } - virtual bool DoGet (const T *object, V *v) const { - v->Set ((object->*m_getter) ()); - return true; - } - virtual bool HasGetter (void) const { - return true; - } - virtual bool HasSetter (void) const { - return false; - } - U (T::*m_getter) (void) const; - }; + { +public: + MemberMethod (U (T::*getter)(void) const) + : AccessorHelper (), + m_getter (getter) + {} +private: + virtual bool DoSet (T *object, const V *v) const { + return false; + } + virtual bool DoGet (const T *object, V *v) const { + v->Set ((object->*m_getter)()); + return true; + } + virtual bool HasGetter (void) const { + return true; + } + virtual bool HasSetter (void) const { + return false; + } + U (T::*m_getter)(void) const; + }; return Ptr (new MemberMethod (getter), false); } template Ptr -DoMakeAccessorHelperOne (void (T::*setter) (U)) +DoMakeAccessorHelperOne (void (T::*setter)(U)) { class MemberMethod : public AccessorHelper - { - public: - MemberMethod (void (T::*setter) (U)) - : AccessorHelper (), - m_setter (setter) - {} - private: - virtual bool DoSet (T *object, const V *v) const { - typename AccessorTrait::Result tmp; - bool ok = v->GetAccessor (tmp); - if (!ok) - { - return false; - } - (object->*m_setter) (tmp); - return true; - } - virtual bool DoGet (const T *object, V *v) const { - return false; - } - virtual bool HasGetter (void) const { - return false; - } - virtual bool HasSetter (void) const { - return true; - } - void (T::*m_setter) (U); - }; + { +public: + MemberMethod (void (T::*setter)(U)) + : AccessorHelper (), + m_setter (setter) + {} +private: + virtual bool DoSet (T *object, const V *v) const { + typename AccessorTrait::Result tmp; + bool ok = v->GetAccessor (tmp); + if (!ok) + { + return false; + } + (object->*m_setter)(tmp); + return true; + } + virtual bool DoGet (const T *object, V *v) const { + return false; + } + virtual bool HasGetter (void) const { + return false; + } + virtual bool HasSetter (void) const { + return true; + } + void (T::*m_setter)(U); + }; return Ptr (new MemberMethod (setter), false); } template Ptr -DoMakeAccessorHelperTwo (void (T::*setter) (U), - V (T::*getter) (void) const) +DoMakeAccessorHelperTwo (void (T::*setter)(U), + V (T::*getter)(void) const) { class MemberMethod : public AccessorHelper - { - public: - MemberMethod (void (T::*setter) (U), - V (T::*getter) (void) const) - : AccessorHelper (), - m_setter (setter), - m_getter (getter) - {} - private: - virtual bool DoSet (T *object, const W *v) const { - typename AccessorTrait::Result tmp; - bool ok = v->GetAccessor (tmp); - if (!ok) - { - return false; - } - (object->*m_setter) (tmp); - return true; - } - virtual bool DoGet (const T *object, W *v) const { - v->Set ((object->*m_getter) ()); - return true; - } - virtual bool HasGetter (void) const { - return true; - } - virtual bool HasSetter (void) const { - return true; - } - void (T::*m_setter) (U); - V (T::*m_getter) (void) const; - }; + { +public: + MemberMethod (void (T::*setter)(U), + V (T::*getter)(void) const) + : AccessorHelper (), + m_setter (setter), + m_getter (getter) + {} +private: + virtual bool DoSet (T *object, const W *v) const { + typename AccessorTrait::Result tmp; + bool ok = v->GetAccessor (tmp); + if (!ok) + { + return false; + } + (object->*m_setter)(tmp); + return true; + } + virtual bool DoGet (const T *object, W *v) const { + v->Set ((object->*m_getter)()); + return true; + } + virtual bool HasGetter (void) const { + return true; + } + virtual bool HasSetter (void) const { + return true; + } + void (T::*m_setter)(U); + V (T::*m_getter)(void) const; + }; return Ptr (new MemberMethod (setter, getter), false); } template Ptr -DoMakeAccessorHelperTwo (V (T::*getter) (void) const, - void (T::*setter) (U)) +DoMakeAccessorHelperTwo (V (T::*getter)(void) const, + void (T::*setter)(U)) { return DoMakeAccessorHelperTwo (setter, getter); } template Ptr -DoMakeAccessorHelperTwo (bool (T::*setter) (U), - V (T::*getter) (void) const) +DoMakeAccessorHelperTwo (bool (T::*setter)(U), + V (T::*getter)(void) const) { class MemberMethod : public AccessorHelper - { - public: - MemberMethod (bool (T::*setter) (U), - V (T::*getter) (void) const) - : AccessorHelper (), - m_setter (setter), - m_getter (getter) - {} - private: - virtual bool DoSet (T *object, const W *v) const { - typename AccessorTrait::Result tmp; - bool ok = v->GetAccessor (tmp); - if (!ok) - { - return false; - } - ok = (object->*m_setter) (tmp); - return ok; - } - virtual bool DoGet (const T *object, W *v) const { - v->Set ((object->*m_getter) ()); - return true; - } - virtual bool HasGetter (void) const { - return true; - } - virtual bool HasSetter (void) const { - return true; - } - bool (T::*m_setter) (U); - V (T::*m_getter) (void) const; - }; + { +public: + MemberMethod (bool (T::*setter)(U), + V (T::*getter)(void) const) + : AccessorHelper (), + m_setter (setter), + m_getter (getter) + {} +private: + virtual bool DoSet (T *object, const W *v) const { + typename AccessorTrait::Result tmp; + bool ok = v->GetAccessor (tmp); + if (!ok) + { + return false; + } + ok = (object->*m_setter)(tmp); + return ok; + } + virtual bool DoGet (const T *object, W *v) const { + v->Set ((object->*m_getter)()); + return true; + } + virtual bool HasGetter (void) const { + return true; + } + virtual bool HasSetter (void) const { + return true; + } + bool (T::*m_setter)(U); + V (T::*m_getter)(void) const; + }; return Ptr (new MemberMethod (setter, getter), false); } template Ptr -DoMakeAccessorHelperTwo (bool (T::*getter) (void) const, - void (T::*setter) (U)) +DoMakeAccessorHelperTwo (bool (T::*getter)(void) const, + void (T::*setter)(U)) { return DoMakeAccessorHelperTwo (setter, getter); } diff --git a/src/core/model/attribute-helper.h b/src/core/model/attribute-helper.h index 8c3def036..1309f43b6 100644 --- a/src/core/model/attribute-helper.h +++ b/src/core/model/attribute-helper.h @@ -97,26 +97,26 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * use the template functions defined here. This macro is implemented * through the helper templates functions ns3::MakeAccessorHelper<>. */ -#define ATTRIBUTE_ACCESSOR_DEFINE(type) \ - template \ - Ptr Make##type##Accessor (T1 a1) \ - { \ - return MakeAccessorHelper (a1); \ - } \ - template \ - Ptr Make##type##Accessor (T1 a1, T2 a2) \ - { \ - return MakeAccessorHelper (a1, a2); \ +#define ATTRIBUTE_ACCESSOR_DEFINE(type) \ + template \ + Ptr Make ## type ## Accessor (T1 a1) \ + { \ + return MakeAccessorHelper (a1); \ + } \ + template \ + Ptr Make ## type ## Accessor (T1 a1, T2 a2) \ + { \ + return MakeAccessorHelper (a1, a2); \ } #define ATTRIBUTE_VALUE_DEFINE_WITH_NAME(type,name) \ - class name##Value : public AttributeValue \ - { \ - public: \ - name##Value (); \ - name##Value (const type &value); \ - void Set (const type &value); \ - type Get (void) const; \ + class name ## Value : public AttributeValue \ + { \ +public: \ + name ## Value (); \ + name ## Value (const type &value); \ + void Set (const type &value); \ + type Get (void) const; \ template \ bool GetAccessor (T &value) const { \ value = T (m_value); \ @@ -125,8 +125,8 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) virtual Ptr Copy (void) const; \ virtual std::string SerializeToString (Ptr checker) const; \ virtual bool DeserializeFromString (std::string value, Ptr checker); \ - private: \ - type m_value; \ +private: \ + type m_value; \ }; @@ -137,7 +137,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * This macro defines the class XXXValue associated to class XXX. * This macro is typically invoked in a class header. */ -#define ATTRIBUTE_VALUE_DEFINE(type) \ +#define ATTRIBUTE_VALUE_DEFINE(type) \ ATTRIBUTE_VALUE_DEFINE_WITH_NAME (type,type) @@ -159,38 +159,38 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * MakeXXXChecker function. * Typically invoked from xxx.h. */ -#define ATTRIBUTE_CHECKER_DEFINE(type) \ - class type##Checker : public AttributeChecker {}; \ - Ptr Make##type##Checker (void); \ +#define ATTRIBUTE_CHECKER_DEFINE(type) \ + class type ## Checker : public AttributeChecker {}; \ + Ptr Make ## type ## Checker (void); \ #define ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type,name) \ - name##Value::name##Value () \ - : m_value () {} \ - name##Value::name##Value (const type &value) \ - : m_value (value) {} \ - void name##Value::Set (const type &v) { \ - m_value = v; \ - } \ - type name##Value::Get (void) const { \ - return m_value; \ - } \ - Ptr \ - name##Value::Copy (void) const { \ - return ns3::Create (*this); \ + name ## Value::name ## Value () \ + : m_value () {} \ + name ## Value::name ## Value (const type &value) \ + : m_value (value) {} \ + void name ## Value::Set (const type &v) { \ + m_value = v; \ } \ - std::string \ - name##Value::SerializeToString (Ptr checker) const { \ - std::ostringstream oss; \ - oss << m_value; \ - return oss.str (); \ - } \ - bool \ - name##Value::DeserializeFromString (std::string value, Ptr checker) { \ - std::istringstream iss; \ - iss.str (value); \ - iss >> m_value; \ - return !iss.bad () && !iss.fail (); \ + type name ## Value::Get (void) const { \ + return m_value; \ + } \ + Ptr \ + name ## Value::Copy (void) const { \ + return ns3::Create (*this); \ + } \ + std::string \ + name ## Value::SerializeToString (Ptr checker) const { \ + std::ostringstream oss; \ + oss << m_value; \ + return oss.str (); \ + } \ + bool \ + name ## Value::DeserializeFromString (std::string value, Ptr checker) { \ + std::istringstream iss; \ + iss.str (value); \ + iss >> m_value; \ + return !iss.bad () && !iss.fail (); \ } /** @@ -202,7 +202,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * methods). * Typically invoked from xxx.cc. */ -#define ATTRIBUTE_VALUE_IMPLEMENT(type) \ +#define ATTRIBUTE_VALUE_IMPLEMENT(type) \ ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type,type) @@ -213,17 +213,17 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * This macro implements the MakeXXXChecker function. * Typically invoked from xxx.cc. */ -#define ATTRIBUTE_CHECKER_IMPLEMENT(type) \ - Ptr Make##type##Checker (void) \ - { \ - return MakeSimpleAttributeChecker (#type "Value", #type); \ - } \ +#define ATTRIBUTE_CHECKER_IMPLEMENT(type) \ + Ptr Make ## type ## Checker (void) \ + { \ + return MakeSimpleAttributeChecker (# type "Value", # type); \ + } \ #define ATTRIBUTE_CHECKER_IMPLEMENT_WITH_NAME(type,name) \ - Ptr Make##type##Checker (void) \ - { \ - return MakeSimpleAttributeChecker (#type "Value", name); \ - } \ + Ptr Make ## type ## Checker (void) \ + { \ + return MakeSimpleAttributeChecker (# type "Value", name); \ + } \ /** * \ingroup AttributeHelper @@ -232,9 +232,9 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * This macro should be invoked outside of the class * declaration in its public header. */ -#define ATTRIBUTE_HELPER_HEADER(type) \ - ATTRIBUTE_VALUE_DEFINE (type); \ - ATTRIBUTE_ACCESSOR_DEFINE (type); \ +#define ATTRIBUTE_HELPER_HEADER(type) \ + ATTRIBUTE_VALUE_DEFINE (type); \ + ATTRIBUTE_ACCESSOR_DEFINE (type); \ ATTRIBUTE_CHECKER_DEFINE (type); /** @@ -244,7 +244,7 @@ MakeSimpleAttributeChecker (std::string name, std::string underlying) * This macro should be invoked from the class implementation file. */ #define ATTRIBUTE_HELPER_CPP(type) \ - ATTRIBUTE_CHECKER_IMPLEMENT (type); \ + ATTRIBUTE_CHECKER_IMPLEMENT (type); \ ATTRIBUTE_VALUE_IMPLEMENT (type); diff --git a/src/core/model/attribute-list.cc b/src/core/model/attribute-list.cc index b9db658a1..251ccdba8 100644 --- a/src/core/model/attribute-list.cc +++ b/src/core/model/attribute-list.cc @@ -28,7 +28,8 @@ namespace ns3 { *********************************************************************/ AttributeList::AttributeList () -{} +{ +} AttributeList::AttributeList (const AttributeList &o) { @@ -198,7 +199,7 @@ AttributeList::SerializeToString (void) const { oss << "|"; } - } + } return oss.str (); } bool @@ -258,7 +259,8 @@ AttributeList::DeserializeFromString (std::string str) } UnsafeAttributeList::UnsafeAttributeList () -{} +{ +} UnsafeAttributeList::UnsafeAttributeList (const UnsafeAttributeList &o) { for (uint32_t i = 0; i < o.m_attributes.size (); ++i) diff --git a/src/core/model/attribute-list.h b/src/core/model/attribute-list.h index a346a57be..00ee0b3e0 100644 --- a/src/core/model/attribute-list.h +++ b/src/core/model/attribute-list.h @@ -115,7 +115,7 @@ public: UnsafeAttributeList (const UnsafeAttributeList &o); UnsafeAttributeList &operator = (const UnsafeAttributeList &o); ~UnsafeAttributeList (); - + void Set (std::string name, const AttributeValue ¶m); AttributeList GetSafe (std::string name) const; diff --git a/src/core/model/attribute.cc b/src/core/model/attribute.cc index ac0590c95..f5626fee8 100644 --- a/src/core/model/attribute.cc +++ b/src/core/model/attribute.cc @@ -27,34 +27,41 @@ NS_LOG_COMPONENT_DEFINE ("AttributeValue"); namespace ns3 { AttributeValue::AttributeValue () -{} +{ +} AttributeValue::~AttributeValue () -{} +{ +} AttributeAccessor::AttributeAccessor () -{} +{ +} AttributeAccessor::~AttributeAccessor () -{} +{ +} AttributeChecker::AttributeChecker () -{} +{ +} AttributeChecker::~AttributeChecker () -{} +{ +} EmptyAttributeValue::EmptyAttributeValue () -{} -Ptr +{ +} +Ptr EmptyAttributeValue::Copy (void) const { return Create (); } -std::string +std::string EmptyAttributeValue::SerializeToString (Ptr checker) const { return ""; } -bool +bool EmptyAttributeValue::DeserializeFromString (std::string value, Ptr checker) { return true; diff --git a/src/core/model/boolean.cc b/src/core/model/boolean.cc index 1f2a8848f..c603a8dba 100644 --- a/src/core/model/boolean.cc +++ b/src/core/model/boolean.cc @@ -24,16 +24,18 @@ namespace ns3 { BooleanValue::BooleanValue () : m_value (false) -{} +{ +} BooleanValue::BooleanValue (bool value) : m_value (value) -{} -void +{ +} +void BooleanValue::Set (bool value) { m_value = value; } -bool +bool BooleanValue::Get (void) const { return m_value; @@ -93,7 +95,7 @@ BooleanValue::DeserializeFromString (std::string value, Ptr bool GetAccessor (T &v) const; - + operator bool () const; virtual Ptr Copy (void) const; diff --git a/src/core/model/breakpoint.cc b/src/core/model/breakpoint.cc index 521628cab..511526710 100644 --- a/src/core/model/breakpoint.cc +++ b/src/core/model/breakpoint.cc @@ -54,4 +54,4 @@ BreakpointFallback (void) #endif // HAVE_SIGNAL_H -}//namespace ns3 +} //namespace ns3 diff --git a/src/core/model/breakpoint.h b/src/core/model/breakpoint.h index 32b343d98..8354a9040 100644 --- a/src/core/model/breakpoint.h +++ b/src/core/model/breakpoint.h @@ -45,14 +45,14 @@ namespace ns3 { */ #if (defined (__i386__) || defined (__amd64__) || defined (__x86_64__)) && defined (__GNUC__) && __GNUC__ >= 2 # define NS_BREAKPOINT() \ - do{ __asm__ __volatile__ ("int $03"); }while(false) + do { __asm__ __volatile__ ("int $03"); }while(false) #elif defined (_MSC_VER) && defined (_M_IX86) # define NS_BREAKPOINT() \ - do{ __asm int 3h }while(false) + do { __asm int 3h }while(false) #elif defined (__alpha__) && !defined(__osf__) && defined (__GNUC__) && __GNUC__ >= 2 # define NS_BREAKPOINT() \ - do{ __asm__ __volatile__ ("bpt"); }while(false) -#else /* !__i386__ && !__alpha__ */ + do { __asm__ __volatile__ ("bpt"); }while(false) +#else /* !__i386__ && !__alpha__ */ # define NS_BREAKPOINT() ns3::BreakpointFallback () #endif @@ -69,7 +69,7 @@ namespace ns3 { void BreakpointFallback (void); -}//namespace ns3 +} //namespace ns3 #endif /* BREAKPOINT_H */ diff --git a/src/core/model/cairo-wideint-private.h b/src/core/model/cairo-wideint-private.h index 5b407ef14..ccb8e85de 100644 --- a/src/core/model/cairo-wideint-private.h +++ b/src/core/model/cairo-wideint-private.h @@ -52,25 +52,25 @@ #elif HAVE_SYS_INT_TYPES_H # include #elif defined(_MSC_VER) - typedef __int8 int8_t; - typedef unsigned __int8 uint8_t; - typedef __int16 int16_t; - typedef unsigned __int16 uint16_t; - typedef __int32 int32_t; - typedef unsigned __int32 uint32_t; - typedef __int64 int64_t; - typedef unsigned __int64 uint64_t; +typedef __int8 int8_t; +typedef unsigned __int8 uint8_t; +typedef __int16 int16_t; +typedef unsigned __int16 uint16_t; +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; # ifndef HAVE_UINT64_T # define HAVE_UINT64_T 1 # endif # ifndef INT16_MIN -# define INT16_MIN (-32767-1) +# define INT16_MIN (-32767-1) # endif # ifndef INT16_MAX -# define INT16_MAX (32767) +# define INT16_MAX (32767) # endif # ifndef UINT16_MAX -# define UINT16_MAX (65535) +# define UINT16_MAX (65535) # endif #else #error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.) @@ -91,94 +91,94 @@ extern "C" { #if !HAVE_UINT64_T typedef struct _cairo_uint64 { - uint32_t lo, hi; + uint32_t lo, hi; } cairo_uint64_t, cairo_int64_t; -cairo_uint64_t I _cairo_uint32_to_uint64 (uint32_t i); -#define _cairo_uint64_to_uint32(a) ((a).lo) -cairo_uint64_t I _cairo_uint64_add (cairo_uint64_t a, cairo_uint64_t b); -cairo_uint64_t I _cairo_uint64_sub (cairo_uint64_t a, cairo_uint64_t b); -cairo_uint64_t I _cairo_uint64_mul (cairo_uint64_t a, cairo_uint64_t b); -cairo_uint64_t I _cairo_uint32x32_64_mul (uint32_t a, uint32_t b); -cairo_uint64_t I _cairo_uint64_lsl (cairo_uint64_t a, int shift); -cairo_uint64_t I _cairo_uint64_rsl (cairo_uint64_t a, int shift); -cairo_uint64_t I _cairo_uint64_rsa (cairo_uint64_t a, int shift); -int I _cairo_uint64_lt (cairo_uint64_t a, cairo_uint64_t b); -int I _cairo_uint64_eq (cairo_uint64_t a, cairo_uint64_t b); -cairo_uint64_t I _cairo_uint64_negate (cairo_uint64_t a); -#define _cairo_uint64_negative(a) (((int32_t) ((a).hi)) < 0) -cairo_uint64_t I _cairo_uint64_not (cairo_uint64_t a); +cairo_uint64_t I _cairo_uint32_to_uint64 (uint32_t i); +#define _cairo_uint64_to_uint32(a) ((a).lo) +cairo_uint64_t I _cairo_uint64_add (cairo_uint64_t a, cairo_uint64_t b); +cairo_uint64_t I _cairo_uint64_sub (cairo_uint64_t a, cairo_uint64_t b); +cairo_uint64_t I _cairo_uint64_mul (cairo_uint64_t a, cairo_uint64_t b); +cairo_uint64_t I _cairo_uint32x32_64_mul (uint32_t a, uint32_t b); +cairo_uint64_t I _cairo_uint64_lsl (cairo_uint64_t a, int shift); +cairo_uint64_t I _cairo_uint64_rsl (cairo_uint64_t a, int shift); +cairo_uint64_t I _cairo_uint64_rsa (cairo_uint64_t a, int shift); +int I _cairo_uint64_lt (cairo_uint64_t a, cairo_uint64_t b); +int I _cairo_uint64_eq (cairo_uint64_t a, cairo_uint64_t b); +cairo_uint64_t I _cairo_uint64_negate (cairo_uint64_t a); +#define _cairo_uint64_negative(a) (((int32_t)((a).hi)) < 0) +cairo_uint64_t I _cairo_uint64_not (cairo_uint64_t a); -#define _cairo_uint64_to_int64(i) (i) -#define _cairo_int64_to_uint64(i) (i) +#define _cairo_uint64_to_int64(i) (i) +#define _cairo_int64_to_uint64(i) (i) -cairo_int64_t I _cairo_int32_to_int64(int32_t i); -#define _cairo_int64_to_int32(a) ((int32_t) _cairo_uint64_to_uint32(a)) -#define _cairo_int64_add(a,b) _cairo_uint64_add (a,b) -#define _cairo_int64_sub(a,b) _cairo_uint64_sub (a,b) -#define _cairo_int64_mul(a,b) _cairo_uint64_mul (a,b) -cairo_int64_t I _cairo_int32x32_64_mul (int32_t a, int32_t b); -int I _cairo_int64_lt (cairo_uint64_t a, cairo_uint64_t b); -#define _cairo_int64_eq(a,b) _cairo_uint64_eq (a,b) -#define _cairo_int64_lsl(a,b) _cairo_uint64_lsl (a,b) -#define _cairo_int64_rsl(a,b) _cairo_uint64_rsl (a,b) -#define _cairo_int64_rsa(a,b) _cairo_uint64_rsa (a,b) -#define _cairo_int64_negate(a) _cairo_uint64_negate(a) -#define _cairo_int64_negative(a) (((int32_t) ((a).hi)) < 0) -#define _cairo_int64_not(a) _cairo_uint64_not(a) +cairo_int64_t I _cairo_int32_to_int64(int32_t i); +#define _cairo_int64_to_int32(a) ((int32_t) _cairo_uint64_to_uint32(a)) +#define _cairo_int64_add(a,b) _cairo_uint64_add (a,b) +#define _cairo_int64_sub(a,b) _cairo_uint64_sub (a,b) +#define _cairo_int64_mul(a,b) _cairo_uint64_mul (a,b) +cairo_int64_t I _cairo_int32x32_64_mul (int32_t a, int32_t b); +int I _cairo_int64_lt (cairo_uint64_t a, cairo_uint64_t b); +#define _cairo_int64_eq(a,b) _cairo_uint64_eq (a,b) +#define _cairo_int64_lsl(a,b) _cairo_uint64_lsl (a,b) +#define _cairo_int64_rsl(a,b) _cairo_uint64_rsl (a,b) +#define _cairo_int64_rsa(a,b) _cairo_uint64_rsa (a,b) +#define _cairo_int64_negate(a) _cairo_uint64_negate(a) +#define _cairo_int64_negative(a) (((int32_t)((a).hi)) < 0) +#define _cairo_int64_not(a) _cairo_uint64_not(a) #else typedef uint64_t cairo_uint64_t; -typedef int64_t cairo_int64_t; +typedef int64_t cairo_int64_t; -#define _cairo_uint32_to_uint64(i) ((uint64_t) (i)) -#define _cairo_uint64_to_uint32(i) ((uint32_t) (i)) -#define _cairo_uint64_add(a,b) ((a) + (b)) -#define _cairo_uint64_sub(a,b) ((a) - (b)) -#define _cairo_uint64_mul(a,b) ((a) * (b)) -#define _cairo_uint32x32_64_mul(a,b) ((uint64_t) (a) * (b)) -#define _cairo_uint64_lsl(a,b) ((a) << (b)) -#define _cairo_uint64_rsl(a,b) ((uint64_t) (a) >> (b)) -#define _cairo_uint64_rsa(a,b) ((uint64_t) ((int64_t) (a) >> (b))) -#define _cairo_uint64_lt(a,b) ((a) < (b)) -#define _cairo_uint64_eq(a,b) ((a) == (b)) -#define _cairo_uint64_negate(a) ((uint64_t) -((int64_t) (a))) -#define _cairo_uint64_negative(a) ((int64_t) (a) < 0) -#define _cairo_uint64_not(a) (~(a)) +#define _cairo_uint32_to_uint64(i) ((uint64_t)(i)) +#define _cairo_uint64_to_uint32(i) ((uint32_t)(i)) +#define _cairo_uint64_add(a,b) ((a) + (b)) +#define _cairo_uint64_sub(a,b) ((a) - (b)) +#define _cairo_uint64_mul(a,b) ((a) * (b)) +#define _cairo_uint32x32_64_mul(a,b) ((uint64_t)(a) * (b)) +#define _cairo_uint64_lsl(a,b) ((a) << (b)) +#define _cairo_uint64_rsl(a,b) ((uint64_t)(a) >> (b)) +#define _cairo_uint64_rsa(a,b) ((uint64_t)((int64_t)(a) >> (b))) +#define _cairo_uint64_lt(a,b) ((a) < (b)) +#define _cairo_uint64_eq(a,b) ((a) == (b)) +#define _cairo_uint64_negate(a) ((uint64_t) -((int64_t)(a))) +#define _cairo_uint64_negative(a) ((int64_t)(a) < 0) +#define _cairo_uint64_not(a) (~(a)) -#define _cairo_uint64_to_int64(i) ((int64_t) (i)) -#define _cairo_int64_to_uint64(i) ((uint64_t) (i)) +#define _cairo_uint64_to_int64(i) ((int64_t)(i)) +#define _cairo_int64_to_uint64(i) ((uint64_t)(i)) -#define _cairo_int32_to_int64(i) ((int64_t) (i)) -#define _cairo_int64_to_int32(i) ((int32_t) (i)) -#define _cairo_int64_add(a,b) ((a) + (b)) -#define _cairo_int64_sub(a,b) ((a) - (b)) -#define _cairo_int64_mul(a,b) ((a) * (b)) -#define _cairo_int32x32_64_mul(a,b) ((int64_t) (a) * (b)) -#define _cairo_int64_lt(a,b) ((a) < (b)) -#define _cairo_int64_eq(a,b) ((a) == (b)) -#define _cairo_int64_lsl(a,b) ((a) << (b)) -#define _cairo_int64_rsl(a,b) ((int64_t) ((uint64_t) (a) >> (b))) -#define _cairo_int64_rsa(a,b) ((int64_t) (a) >> (b)) -#define _cairo_int64_negate(a) (-(a)) -#define _cairo_int64_negative(a) ((a) < 0) -#define _cairo_int64_not(a) (~(a)) +#define _cairo_int32_to_int64(i) ((int64_t)(i)) +#define _cairo_int64_to_int32(i) ((int32_t)(i)) +#define _cairo_int64_add(a,b) ((a) + (b)) +#define _cairo_int64_sub(a,b) ((a) - (b)) +#define _cairo_int64_mul(a,b) ((a) * (b)) +#define _cairo_int32x32_64_mul(a,b) ((int64_t)(a) * (b)) +#define _cairo_int64_lt(a,b) ((a) < (b)) +#define _cairo_int64_eq(a,b) ((a) == (b)) +#define _cairo_int64_lsl(a,b) ((a) << (b)) +#define _cairo_int64_rsl(a,b) ((int64_t)((uint64_t)(a) >> (b))) +#define _cairo_int64_rsa(a,b) ((int64_t)(a) >> (b)) +#define _cairo_int64_negate(a) (-(a)) +#define _cairo_int64_negative(a) ((a) < 0) +#define _cairo_int64_not(a) (~(a)) #endif /* * 64-bit comparisions derived from lt or eq */ -#define _cairo_uint64_le(a,b) (!_cairo_uint64_gt(a,b)) -#define _cairo_uint64_ne(a,b) (!_cairo_uint64_eq(a,b)) -#define _cairo_uint64_ge(a,b) (!_cairo_uint64_lt(a,b)) -#define _cairo_uint64_gt(a,b) _cairo_uint64_lt(b,a) +#define _cairo_uint64_le(a,b) (!_cairo_uint64_gt(a,b)) +#define _cairo_uint64_ne(a,b) (!_cairo_uint64_eq(a,b)) +#define _cairo_uint64_ge(a,b) (!_cairo_uint64_lt(a,b)) +#define _cairo_uint64_gt(a,b) _cairo_uint64_lt(b,a) -#define _cairo_int64_le(a,b) (!_cairo_int64_gt(a,b)) -#define _cairo_int64_ne(a,b) (!_cairo_int64_eq(a,b)) -#define _cairo_int64_ge(a,b) (!_cairo_int64_lt(a,b)) -#define _cairo_int64_gt(a,b) _cairo_int64_lt(b,a) +#define _cairo_int64_le(a,b) (!_cairo_int64_gt(a,b)) +#define _cairo_int64_ne(a,b) (!_cairo_int64_eq(a,b)) +#define _cairo_int64_ge(a,b) (!_cairo_int64_lt(a,b)) +#define _cairo_int64_gt(a,b) _cairo_int64_lt(b,a) /* * As the C implementation always computes both, create @@ -186,13 +186,13 @@ typedef int64_t cairo_int64_t; */ typedef struct _cairo_uquorem64 { - cairo_uint64_t quo; - cairo_uint64_t rem; + cairo_uint64_t quo; + cairo_uint64_t rem; } cairo_uquorem64_t; typedef struct _cairo_quorem64 { - cairo_int64_t quo; - cairo_int64_t rem; + cairo_int64_t quo; + cairo_int64_t rem; } cairo_quorem64_t; cairo_uquorem64_t I @@ -210,98 +210,98 @@ _cairo_int64_divrem (cairo_int64_t num, cairo_int64_t den); #if !HAVE_UINT128_T typedef struct cairo_uint128 { - cairo_uint64_t lo, hi; + cairo_uint64_t lo, hi; } cairo_uint128_t, cairo_int128_t; -cairo_uint128_t I _cairo_uint32_to_uint128 (uint32_t i); -cairo_uint128_t I _cairo_uint64_to_uint128 (cairo_uint64_t i); -#define _cairo_uint128_to_uint64(a) ((a).lo) -#define _cairo_uint128_to_uint32(a) _cairo_uint64_to_uint32(_cairo_uint128_to_uint64(a)) -cairo_uint128_t I _cairo_uint128_add (cairo_uint128_t a, cairo_uint128_t b); -cairo_uint128_t I _cairo_uint128_sub (cairo_uint128_t a, cairo_uint128_t b); -cairo_uint128_t I _cairo_uint128_mul (cairo_uint128_t a, cairo_uint128_t b); -cairo_uint128_t I _cairo_uint64x64_128_mul (cairo_uint64_t a, cairo_uint64_t b); -cairo_uint128_t I _cairo_uint128_lsl (cairo_uint128_t a, int shift); -cairo_uint128_t I _cairo_uint128_rsl (cairo_uint128_t a, int shift); -cairo_uint128_t I _cairo_uint128_rsa (cairo_uint128_t a, int shift); -int I _cairo_uint128_lt (cairo_uint128_t a, cairo_uint128_t b); -int I _cairo_uint128_eq (cairo_uint128_t a, cairo_uint128_t b); -cairo_uint128_t I _cairo_uint128_negate (cairo_uint128_t a); -#define _cairo_uint128_negative(a) (_cairo_uint64_negative(a.hi)) -cairo_uint128_t I _cairo_uint128_not (cairo_uint128_t a); +cairo_uint128_t I _cairo_uint32_to_uint128 (uint32_t i); +cairo_uint128_t I _cairo_uint64_to_uint128 (cairo_uint64_t i); +#define _cairo_uint128_to_uint64(a) ((a).lo) +#define _cairo_uint128_to_uint32(a) _cairo_uint64_to_uint32(_cairo_uint128_to_uint64(a)) +cairo_uint128_t I _cairo_uint128_add (cairo_uint128_t a, cairo_uint128_t b); +cairo_uint128_t I _cairo_uint128_sub (cairo_uint128_t a, cairo_uint128_t b); +cairo_uint128_t I _cairo_uint128_mul (cairo_uint128_t a, cairo_uint128_t b); +cairo_uint128_t I _cairo_uint64x64_128_mul (cairo_uint64_t a, cairo_uint64_t b); +cairo_uint128_t I _cairo_uint128_lsl (cairo_uint128_t a, int shift); +cairo_uint128_t I _cairo_uint128_rsl (cairo_uint128_t a, int shift); +cairo_uint128_t I _cairo_uint128_rsa (cairo_uint128_t a, int shift); +int I _cairo_uint128_lt (cairo_uint128_t a, cairo_uint128_t b); +int I _cairo_uint128_eq (cairo_uint128_t a, cairo_uint128_t b); +cairo_uint128_t I _cairo_uint128_negate (cairo_uint128_t a); +#define _cairo_uint128_negative(a) (_cairo_uint64_negative(a.hi)) +cairo_uint128_t I _cairo_uint128_not (cairo_uint128_t a); -#define _cairo_uint128_to_int128(i) (i) -#define _cairo_int128_to_uint128(i) (i) +#define _cairo_uint128_to_int128(i) (i) +#define _cairo_int128_to_uint128(i) (i) -cairo_int128_t I _cairo_int32_to_int128 (int32_t i); -cairo_int128_t I _cairo_int64_to_int128 (cairo_int64_t i); -#define _cairo_int128_to_int64(a) ((cairo_int64_t) (a).lo) -#define _cairo_int128_to_int32(a) _cairo_int64_to_int32(_cairo_int128_to_int64(a)) -#define _cairo_int128_add(a,b) _cairo_uint128_add(a,b) -#define _cairo_int128_sub(a,b) _cairo_uint128_sub(a,b) -#define _cairo_int128_mul(a,b) _cairo_uint128_mul(a,b) +cairo_int128_t I _cairo_int32_to_int128 (int32_t i); +cairo_int128_t I _cairo_int64_to_int128 (cairo_int64_t i); +#define _cairo_int128_to_int64(a) ((cairo_int64_t)(a).lo) +#define _cairo_int128_to_int32(a) _cairo_int64_to_int32(_cairo_int128_to_int64(a)) +#define _cairo_int128_add(a,b) _cairo_uint128_add(a,b) +#define _cairo_int128_sub(a,b) _cairo_uint128_sub(a,b) +#define _cairo_int128_mul(a,b) _cairo_uint128_mul(a,b) cairo_int128_t I _cairo_int64x64_128_mul (cairo_int64_t a, cairo_int64_t b); -#define _cairo_int128_lsl(a,b) _cairo_uint128_lsl(a,b) -#define _cairo_int128_rsl(a,b) _cairo_uint128_rsl(a,b) -#define _cairo_int128_rsa(a,b) _cairo_uint128_rsa(a,b) -int I _cairo_int128_lt (cairo_int128_t a, cairo_int128_t b); -#define _cairo_int128_eq(a,b) _cairo_uint128_eq (a,b) -#define _cairo_int128_negate(a) _cairo_uint128_negate(a) -#define _cairo_int128_negative(a) (_cairo_uint128_negative(a)) -#define _cairo_int128_not(a) _cairo_uint128_not(a) +#define _cairo_int128_lsl(a,b) _cairo_uint128_lsl(a,b) +#define _cairo_int128_rsl(a,b) _cairo_uint128_rsl(a,b) +#define _cairo_int128_rsa(a,b) _cairo_uint128_rsa(a,b) +int I _cairo_int128_lt (cairo_int128_t a, cairo_int128_t b); +#define _cairo_int128_eq(a,b) _cairo_uint128_eq (a,b) +#define _cairo_int128_negate(a) _cairo_uint128_negate(a) +#define _cairo_int128_negative(a) (_cairo_uint128_negative(a)) +#define _cairo_int128_not(a) _cairo_uint128_not(a) -#else /* !HAVE_UINT128_T */ +#else /* !HAVE_UINT128_T */ -typedef uint128_t cairo_uint128_t; -typedef int128_t cairo_int128_t; +typedef uint128_t cairo_uint128_t; +typedef int128_t cairo_int128_t; -#define _cairo_uint32_to_uint128(i) ((uint128_t) (i)) -#define _cairo_uint64_to_uint128(i) ((uint128_t) (i)) -#define _cairo_uint128_to_uint64(i) ((uint64_t) (i)) -#define _cairo_uint128_to_uint32(i) ((uint32_t) (i)) -#define _cairo_uint128_add(a,b) ((a) + (b)) -#define _cairo_uint128_sub(a,b) ((a) - (b)) -#define _cairo_uint128_mul(a,b) ((a) * (b)) -#define _cairo_uint64x64_128_mul(a,b) ((uint128_t) (a) * (b)) -#define _cairo_uint128_lsl(a,b) ((a) << (b)) -#define _cairo_uint128_rsl(a,b) ((uint128_t) (a) >> (b)) -#define _cairo_uint128_rsa(a,b) ((uint128_t) ((int128_t) (a) >> (b))) -#define _cairo_uint128_lt(a,b) ((a) < (b)) -#define _cairo_uint128_eq(a,b) ((a) == (b)) -#define _cairo_uint128_negate(a) ((uint128_t) -((int128_t) (a))) -#define _cairo_uint128_negative(a) ((int128_t) (a) < 0) -#define _cairo_uint128_not(a) (~(a)) +#define _cairo_uint32_to_uint128(i) ((uint128_t)(i)) +#define _cairo_uint64_to_uint128(i) ((uint128_t)(i)) +#define _cairo_uint128_to_uint64(i) ((uint64_t)(i)) +#define _cairo_uint128_to_uint32(i) ((uint32_t)(i)) +#define _cairo_uint128_add(a,b) ((a) + (b)) +#define _cairo_uint128_sub(a,b) ((a) - (b)) +#define _cairo_uint128_mul(a,b) ((a) * (b)) +#define _cairo_uint64x64_128_mul(a,b) ((uint128_t)(a) * (b)) +#define _cairo_uint128_lsl(a,b) ((a) << (b)) +#define _cairo_uint128_rsl(a,b) ((uint128_t)(a) >> (b)) +#define _cairo_uint128_rsa(a,b) ((uint128_t)((int128_t)(a) >> (b))) +#define _cairo_uint128_lt(a,b) ((a) < (b)) +#define _cairo_uint128_eq(a,b) ((a) == (b)) +#define _cairo_uint128_negate(a) ((uint128_t) -((int128_t)(a))) +#define _cairo_uint128_negative(a) ((int128_t)(a) < 0) +#define _cairo_uint128_not(a) (~(a)) -#define _cairo_uint128_to_int128(i) ((int128_t) (i)) -#define _cairo_int128_to_uint128(i) ((uint128_t) (i)) +#define _cairo_uint128_to_int128(i) ((int128_t)(i)) +#define _cairo_int128_to_uint128(i) ((uint128_t)(i)) -#define _cairo_int32_to_int128(i) ((int128_t) (i)) -#define _cairo_int64_to_int128(i) ((int128_t) (i)) -#define _cairo_int128_to_int64(i) ((int64_t) (i)) -#define _cairo_int128_to_int32(i) ((int32_t) (i)) -#define _cairo_int128_add(a,b) ((a) + (b)) -#define _cairo_int128_sub(a,b) ((a) - (b)) -#define _cairo_int128_mul(a,b) ((a) * (b)) -#define _cairo_int64x64_128_mul(a,b) ((int128_t) (a) * (b)) -#define _cairo_int128_lt(a,b) ((a) < (b)) -#define _cairo_int128_eq(a,b) ((a) == (b)) -#define _cairo_int128_lsl(a,b) ((a) << (b)) -#define _cairo_int128_rsl(a,b) ((int128_t) ((uint128_t) (a) >> (b))) -#define _cairo_int128_rsa(a,b) ((int128_t) (a) >> (b)) -#define _cairo_int128_negate(a) (-(a)) -#define _cairo_int128_negative(a) ((a) < 0) -#define _cairo_int128_not(a) (~(a)) +#define _cairo_int32_to_int128(i) ((int128_t)(i)) +#define _cairo_int64_to_int128(i) ((int128_t)(i)) +#define _cairo_int128_to_int64(i) ((int64_t)(i)) +#define _cairo_int128_to_int32(i) ((int32_t)(i)) +#define _cairo_int128_add(a,b) ((a) + (b)) +#define _cairo_int128_sub(a,b) ((a) - (b)) +#define _cairo_int128_mul(a,b) ((a) * (b)) +#define _cairo_int64x64_128_mul(a,b) ((int128_t)(a) * (b)) +#define _cairo_int128_lt(a,b) ((a) < (b)) +#define _cairo_int128_eq(a,b) ((a) == (b)) +#define _cairo_int128_lsl(a,b) ((a) << (b)) +#define _cairo_int128_rsl(a,b) ((int128_t)((uint128_t)(a) >> (b))) +#define _cairo_int128_rsa(a,b) ((int128_t)(a) >> (b)) +#define _cairo_int128_negate(a) (-(a)) +#define _cairo_int128_negative(a) ((a) < 0) +#define _cairo_int128_not(a) (~(a)) -#endif /* HAVE_UINT128_T */ +#endif /* HAVE_UINT128_T */ typedef struct _cairo_uquorem128 { - cairo_uint128_t quo; - cairo_uint128_t rem; + cairo_uint128_t quo; + cairo_uint128_t rem; } cairo_uquorem128_t; typedef struct _cairo_quorem128 { - cairo_int128_t quo; - cairo_int128_t rem; + cairo_int128_t quo; + cairo_int128_t rem; } cairo_quorem128_t; cairo_uquorem128_t I @@ -312,21 +312,21 @@ _cairo_int128_divrem (cairo_int128_t num, cairo_int128_t den); cairo_uquorem64_t I _cairo_uint_96by64_32x64_divrem (cairo_uint128_t num, - cairo_uint64_t den); + cairo_uint64_t den); cairo_quorem64_t I _cairo_int_96by64_32x64_divrem (cairo_int128_t num, - cairo_int64_t den); + cairo_int64_t den); -#define _cairo_uint128_le(a,b) (!_cairo_uint128_gt(a,b)) -#define _cairo_uint128_ne(a,b) (!_cairo_uint128_eq(a,b)) -#define _cairo_uint128_ge(a,b) (!_cairo_uint128_lt(a,b)) -#define _cairo_uint128_gt(a,b) _cairo_uint128_lt(b,a) +#define _cairo_uint128_le(a,b) (!_cairo_uint128_gt(a,b)) +#define _cairo_uint128_ne(a,b) (!_cairo_uint128_eq(a,b)) +#define _cairo_uint128_ge(a,b) (!_cairo_uint128_lt(a,b)) +#define _cairo_uint128_gt(a,b) _cairo_uint128_lt(b,a) -#define _cairo_int128_le(a,b) (!_cairo_int128_gt(a,b)) -#define _cairo_int128_ne(a,b) (!_cairo_int128_eq(a,b)) -#define _cairo_int128_ge(a,b) (!_cairo_int128_lt(a,b)) -#define _cairo_int128_gt(a,b) _cairo_int128_lt(b,a) +#define _cairo_int128_le(a,b) (!_cairo_int128_gt(a,b)) +#define _cairo_int128_ne(a,b) (!_cairo_int128_eq(a,b)) +#define _cairo_int128_ge(a,b) (!_cairo_int128_lt(a,b)) +#define _cairo_int128_gt(a,b) _cairo_int128_lt(b,a) #undef I diff --git a/src/core/model/calendar-scheduler.cc b/src/core/model/calendar-scheduler.cc index e304bf007..10977f9e6 100644 --- a/src/core/model/calendar-scheduler.cc +++ b/src/core/model/calendar-scheduler.cc @@ -125,7 +125,7 @@ CalendarScheduler::PeekNext (void) const NS_ASSERT (!IsEmpty ()); uint32_t i = m_lastBucket; uint64_t bucketTop = m_bucketTop; - Scheduler::Event minEvent = {0, {~0, ~0}}; + Scheduler::Event minEvent = { 0, { ~0, ~0}}; do { if (!m_buckets[i].empty ()) @@ -154,7 +154,7 @@ CalendarScheduler::DoRemoveNext (void) { uint32_t i = m_lastBucket; uint64_t bucketTop = m_bucketTop; - Scheduler::Event minEvent = {0, {~0, ~0}}; + Scheduler::Event minEvent = { 0, { ~0, ~0}}; do { if (!m_buckets[i].empty ()) diff --git a/src/core/model/callback.cc b/src/core/model/callback.cc index db358a223..30ed261c3 100644 --- a/src/core/model/callback.cc +++ b/src/core/model/callback.cc @@ -4,30 +4,33 @@ namespace ns3 { CallbackValue::CallbackValue () : m_value () -{} +{ +} CallbackValue::CallbackValue (const CallbackBase &base) : m_value (base) -{} +{ +} CallbackValue::~CallbackValue () -{} -void +{ +} +void CallbackValue::Set (CallbackBase base) { m_value = base; } -Ptr +Ptr CallbackValue::Copy (void) const { return Create (m_value); } -std::string +std::string CallbackValue::SerializeToString (Ptr checker) const { std::ostringstream oss; oss << PeekPointer (m_value.GetImpl ()); return oss.str (); } -bool +bool CallbackValue::DeserializeFromString (std::string value, Ptr checker) { return false; @@ -48,36 +51,36 @@ namespace ns3 { std::string CallbackBase::Demangle(const std::string& mangled) { - int status; - char* demangled = abi::__cxa_demangle(mangled.c_str(), - NULL, NULL, &status); + int status; + char* demangled = abi::__cxa_demangle(mangled.c_str(), + NULL, NULL, &status); - std::string ret; - if (status == 0) { - NS_ASSERT(demangled); - ret = demangled; + std::string ret; + if (status == 0) { + NS_ASSERT(demangled); + ret = demangled; } - else if (status == -1) { - NS_LOG_UNCOND("Callback demangling failed: Memory allocation failure occured."); - ret = mangled; + else if (status == -1) { + NS_LOG_UNCOND("Callback demangling failed: Memory allocation failure occured."); + ret = mangled; } - else if (status == -2) { - NS_LOG_UNCOND("Callback demangling failed: Mangled name is not a valid under the C++ ABI mangling rules."); - ret = mangled; + else if (status == -2) { + NS_LOG_UNCOND("Callback demangling failed: Mangled name is not a valid under the C++ ABI mangling rules."); + ret = mangled; } - else if (status == -3) { - NS_LOG_UNCOND("Callback demangling failed: One of the arguments is invalid."); - ret = mangled; + else if (status == -3) { + NS_LOG_UNCOND("Callback demangling failed: One of the arguments is invalid."); + ret = mangled; } - else { - NS_LOG_UNCOND("Callback demangling failed: status " << status); - ret = mangled; + else { + NS_LOG_UNCOND("Callback demangling failed: status " << status); + ret = mangled; } - if (demangled) { - free(demangled); + if (demangled) { + free(demangled); } - return ret; + return ret; } } // namespace ns3 @@ -87,7 +90,7 @@ CallbackBase::Demangle(const std::string& mangled) std::string ns3::CallbackBase::Demangle(const std::string& mangled) { - return mangled; + return mangled; } #endif diff --git a/src/core/model/callback.h b/src/core/model/callback.h index bebf4ae8f..1c339374b 100644 --- a/src/core/model/callback.h +++ b/src/core/model/callback.h @@ -217,34 +217,34 @@ public: : m_objPtr (objPtr), m_memPtr (mem_ptr) {} virtual ~MemPtrCallbackImpl () {} R operator() (void) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(); } R operator() (T1 a1) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (a1); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1); } R operator() (T1 a1,T2 a2) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (a1, a2); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2); } R operator() (T1 a1,T2 a2,T3 a3) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (a1, a2, a3); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3); } R operator() (T1 a1,T2 a2,T3 a3,T4 a4) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (a1, a2, a3, a4); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4); } R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (a1, a2, a3, a4, a5); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5); } R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (a1, a2, a3, a4, a5, a6); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6); } R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (a1, a2, a3, a4, a5, a6, a7); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7); } R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (a1, a2, a3, a4, a5, a6, a7, a8); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7, a8); } R operator() (T1 a1,T2 a2,T3 a3,T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9) { - return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr) (a1, a2, a3, a4, a5, a6, a7, a8, a9); + return ((CallbackTraits::GetReference (m_objPtr)).*m_memPtr)(a1, a2, a3, a4, a5, a6, a7, a8, a9); } virtual bool IsEqual (Ptr other) const { MemPtrCallbackImpl const *otherDerived = @@ -323,7 +323,7 @@ private: class CallbackBase { public: CallbackBase () : m_impl () {} - Ptr GetImpl (void) const {return m_impl;} + Ptr GetImpl (void) const { return m_impl;} protected: CallbackBase (Ptr impl) : m_impl (impl) {} Ptr m_impl; @@ -390,48 +390,48 @@ public: Callback Bind (T a) { Ptr > impl = Ptr > ( - new BoundFunctorCallbackImpl< - Callback, - R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*this, a), false); + new BoundFunctorCallbackImpl< + Callback, + R,T1,T2,T3,T4,T5,T6,T7,T8,T9> (*this, a), false); return Callback (impl); } bool IsNull (void) const { - return (DoPeekImpl () == 0)?true:false; + return (DoPeekImpl () == 0) ? true : false; } void Nullify (void) { m_impl = 0; } R operator() (void) const { - return (*(DoPeekImpl ())) (); + return (*(DoPeekImpl ()))(); } R operator() (T1 a1) const { - return (*(DoPeekImpl ())) (a1); + return (*(DoPeekImpl ()))(a1); } R operator() (T1 a1, T2 a2) const { - return (*(DoPeekImpl ())) (a1,a2); + return (*(DoPeekImpl ()))(a1,a2); } R operator() (T1 a1, T2 a2, T3 a3) const { - return (*(DoPeekImpl ())) (a1,a2,a3); + return (*(DoPeekImpl ()))(a1,a2,a3); } R operator() (T1 a1, T2 a2, T3 a3, T4 a4) const { - return (*(DoPeekImpl ())) (a1,a2,a3,a4); + return (*(DoPeekImpl ()))(a1,a2,a3,a4); } R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5) const { - return (*(DoPeekImpl ())) (a1,a2,a3,a4,a5); + return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5); } R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6) const { - return (*(DoPeekImpl ())) (a1,a2,a3,a4,a5,a6); + return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6); } R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7) const { - return (*(DoPeekImpl ())) (a1,a2,a3,a4,a5,a6,a7); + return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7); } R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8) const { - return (*(DoPeekImpl ())) (a1,a2,a3,a4,a5,a6,a7,a8); + return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8); } R operator() (T1 a1, T2 a2, T3 a3, T4 a4,T5 a5,T6 a6,T7 a7,T8 a8, T9 a9) const { - return (*(DoPeekImpl ())) (a1,a2,a3,a4,a5,a6,a7,a8,a9); + return (*(DoPeekImpl ()))(a1,a2,a3,a4,a5,a6,a7,a8,a9); } bool IsEqual (const CallbackBase &other) const { @@ -499,11 +499,11 @@ bool operator != (Callback a, Callback -Callback MakeCallback (R (T::*memPtr) (void), OBJ objPtr) { +Callback MakeCallback (R (T::*memPtr)(void), OBJ objPtr) { return Callback (objPtr, memPtr); } template -Callback MakeCallback (R (T::*mem_ptr) () const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)() const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } /** @@ -515,11 +515,11 @@ Callback MakeCallback (R (T::*mem_ptr) () const, OBJ objPtr) { * and potentially return a value. */ template -Callback MakeCallback (R (T::*mem_ptr) (T1), OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1), OBJ objPtr) { return Callback (objPtr, mem_ptr); } template -Callback MakeCallback (R (T::*mem_ptr) (T1) const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1) const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } /** @@ -531,11 +531,11 @@ Callback MakeCallback (R (T::*mem_ptr) (T1) const, OBJ objPtr) { * and potentially return a value. */ template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2), OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2), OBJ objPtr) { return Callback (objPtr, mem_ptr); } template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2) const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2) const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } /** @@ -547,11 +547,11 @@ Callback MakeCallback (R (T::*mem_ptr) (T1,T2) const, OBJ objPtr) { * and potentially return a value. */ template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3), OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3), OBJ objPtr) { return Callback (objPtr, mem_ptr); } template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3) const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3) const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } /** @@ -563,11 +563,11 @@ Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3) const, OBJ objPtr) * and potentially return a value. */ template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4), OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4), OBJ objPtr) { return Callback (objPtr, mem_ptr); } template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4) const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4) const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } /** @@ -579,11 +579,11 @@ Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4) const, OBJ o * and potentially return a value. */ template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5), OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5), OBJ objPtr) { return Callback (objPtr, mem_ptr); } template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5) const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5) const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } /** @@ -595,11 +595,11 @@ Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5) const, * and potentially return a value. */ template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T6), OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6), OBJ objPtr) { return Callback (objPtr, mem_ptr); } template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T6) const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6) const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } @@ -612,11 +612,11 @@ Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T6) * and potentially return a value. */ template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T6,T7), OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7), OBJ objPtr) { return Callback (objPtr, mem_ptr); } template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T6,T7) const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7) const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } @@ -630,11 +630,11 @@ Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T * and potentially return a value. */ template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T6,T7,T8), OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8), OBJ objPtr) { return Callback (objPtr, mem_ptr); } template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T6,T7,T8) const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8) const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } @@ -647,11 +647,11 @@ Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T * and potentially return a value. */ template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T6,T7,T8,T9), OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8,T9), OBJ objPtr) { return Callback (objPtr, mem_ptr); } template -Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T4,T5,T6,T7,T8,T9) const, OBJ objPtr) { +Callback MakeCallback (R (T::*mem_ptr)(T1,T2,T3,T4,T5,T6,T7,T8,T9) const, OBJ objPtr) { return Callback (objPtr, mem_ptr); } @@ -663,7 +663,7 @@ Callback MakeCallback (R (T::*mem_ptr) (T1,T2,T3,T * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) ()) { +Callback MakeCallback (R (*fnPtr)()) { return Callback (fnPtr, true, true); } /** @@ -674,7 +674,7 @@ Callback MakeCallback (R (*fnPtr) ()) { * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) (T1)) { +Callback MakeCallback (R (*fnPtr)(T1)) { return Callback (fnPtr, true, true); } /** @@ -685,7 +685,7 @@ Callback MakeCallback (R (*fnPtr) (T1)) { * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) (T1,T2)) { +Callback MakeCallback (R (*fnPtr)(T1,T2)) { return Callback (fnPtr, true, true); } /** @@ -696,7 +696,7 @@ Callback MakeCallback (R (*fnPtr) (T1,T2)) { * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) (T1,T2,T3)) { +Callback MakeCallback (R (*fnPtr)(T1,T2,T3)) { return Callback (fnPtr, true, true); } /** @@ -707,7 +707,7 @@ Callback MakeCallback (R (*fnPtr) (T1,T2,T3)) { * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4)) { +Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4)) { return Callback (fnPtr, true, true); } /** @@ -718,7 +718,7 @@ Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4)) { * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4,T5)) { +Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5)) { return Callback (fnPtr, true, true); } /** @@ -729,7 +729,7 @@ Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4,T5)) { * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4,T5,T6)) { +Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6)) { return Callback (fnPtr, true, true); } @@ -741,7 +741,7 @@ Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4,T5,T6)) { * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4,T5,T6,T7)) { +Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7)) { return Callback (fnPtr, true, true); } @@ -753,7 +753,7 @@ Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4,T5,T6,T7) * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4,T5,T6,T7,T8)) { +Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8)) { return Callback (fnPtr, true, true); } @@ -765,7 +765,7 @@ Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4,T5,T6, * and potentially return a value. */ template -Callback MakeCallback (R (*fnPtr) (T1,T2,T3,T4,T5,T6,T7,T8,T9)) { +Callback MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T6,T7,T8,T9)) { return Callback (fnPtr, true, true); } @@ -892,7 +892,7 @@ Callback MakeNullCallback (void) { */ template -Callback MakeBoundCallback (R (*fnPtr) (TX), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX), ARG a) { Ptr > impl = Create >(fnPtr, a); return Callback (impl); @@ -900,56 +900,56 @@ Callback MakeBoundCallback (R (*fnPtr) (TX), ARG a) { template -Callback MakeBoundCallback (R (*fnPtr) (TX,T1), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1), ARG a) { Ptr > impl = Create > (fnPtr, a); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr) (TX,T1,T2), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2), ARG a) { Ptr > impl = Create > (fnPtr, a); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr) (TX,T1,T2,T3), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3), ARG a) { Ptr > impl = Create > (fnPtr, a); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr) (TX,T1,T2,T3,T4), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4), ARG a) { Ptr > impl = Create > (fnPtr, a); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr) (TX,T1,T2,T3,T4,T5), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5), ARG a) { Ptr > impl = Create > (fnPtr, a); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr) (TX,T1,T2,T3,T4,T5,T6), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6), ARG a) { Ptr > impl = Create > (fnPtr, a); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr) (TX,T1,T2,T3,T4,T5,T6,T7), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7), ARG a) { Ptr > impl = Create > (fnPtr, a); return Callback (impl); } template -Callback MakeBoundCallback (R (*fnPtr) (TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a) { +Callback MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4,T5,T6,T7,T8), ARG a) { Ptr > impl = Create > (fnPtr, a); return Callback (impl); diff --git a/src/core/model/command-line.cc b/src/core/model/command-line.cc index e6fc00cb0..aab4966fe 100644 --- a/src/core/model/command-line.cc +++ b/src/core/model/command-line.cc @@ -31,7 +31,8 @@ NS_LOG_COMPONENT_DEFINE ("CommandLine"); namespace ns3 { CommandLine::CommandLine () -{} +{ +} CommandLine::CommandLine (const CommandLine &cmd) { Copy (cmd); @@ -67,9 +68,10 @@ CommandLine::Clear (void) } CommandLine::Item::~Item () -{} +{ +} -void +void CommandLine::Parse (int iargc, char *argv[]) const { int argc = iargc; @@ -79,28 +81,28 @@ CommandLine::Parse (int iargc, char *argv[]) const std::string param = *argv; std::string::size_type cur = param.find ("--"); if (cur == 0) - { - param = param.substr (2, param.size () - 2); - } + { + param = param.substr (2, param.size () - 2); + } else - { - cur = param.find ("-"); - if (cur == 0) - { - param = param.substr (1, param.size () - 1); - } - else - { - // invalid argument. ignore. - continue; - } - } + { + cur = param.find ("-"); + if (cur == 0) + { + param = param.substr (1, param.size () - 1); + } + else + { + // invalid argument. ignore. + continue; + } + } cur = param.find ("="); std::string name, value; if (cur == std::string::npos) { - name = param; - value = ""; + name = param; + value = ""; } else { @@ -116,7 +118,7 @@ CommandLine::PrintHelp (void) const { std::cout << "--PrintHelp: Print this help message." << std::endl; std::cout << "--PrintGroups: Print the list of groups." << std::endl; - std::cout << "--PrintTypeIds: Print all TypeIds." << std::endl; + std::cout << "--PrintTypeIds: Print all TypeIds." << std::endl; std::cout << "--PrintGroup=[group]: Print all TypeIds of group." << std::endl; std::cout << "--PrintAttributes=[typeid]: Print all attributes of typeid." << std::endl; std::cout << "--PrintGlobals: Print the list of globals." << std::endl; @@ -124,9 +126,9 @@ CommandLine::PrintHelp (void) const { std::cout << "User Arguments:" << std::endl; for (Items::const_iterator i = m_items.begin (); i != m_items.end (); ++i) - { - std::cout << " --" << (*i)->m_name << ": " << (*i)->m_help << std::endl; - } + { + std::cout << " --" << (*i)->m_name << ": " << (*i)->m_help << std::endl; + } } } @@ -140,7 +142,7 @@ CommandLine::PrintGlobals (void) const StringValue v; (*i)->GetValue (v); std::cout << v.Get () << "]: " - << (*i)->GetHelp () << std::endl; + << (*i)->GetHelp () << std::endl; } } @@ -158,7 +160,7 @@ CommandLine::PrintAttributes (std::string type) const Ptr checker = tid.GetAttributeChecker (i); Ptr initial = tid.GetAttributeInitialValue (i); std::cout << initial->SerializeToString (checker) << "]: " - << tid.GetAttributeHelp (i) << std::endl; + << tid.GetAttributeHelp (i) << std::endl; } } @@ -170,9 +172,9 @@ CommandLine::PrintGroup (std::string group) const { TypeId tid = TypeId::GetRegistered (i); if (tid.GetGroupName () == group) - { - std::cout << " --PrintAttributes=" <::const_iterator j = groups.begin (); j != groups.end (); ++j) - { - if (*j == group) - { - found = true; - break; - } - } + { + if (*j == group) + { + found = true; + break; + } + } if (!found) - { - groups.push_back (group); - } + { + groups.push_back (group); + } } for (std::list::const_iterator k = groups.begin (); k != groups.end (); ++k) { diff --git a/src/core/model/command-line.h b/src/core/model/command-line.h index aa371a3c2..012c4b272 100644 --- a/src/core/model/command-line.h +++ b/src/core/model/command-line.h @@ -58,8 +58,8 @@ public: */ template void AddValue (const std::string &name, - const std::string &help, - T &value); + const std::string &help, + T &value); /** @@ -69,7 +69,7 @@ public: * and collect the value. This normally used by language bindings. */ void AddValue (const std::string &name, - const std::string &help, + const std::string &help, Callback callback); /** @@ -85,7 +85,7 @@ public: private: class Item { - public: +public: std::string m_name; std::string m_help; virtual ~Item (); @@ -94,13 +94,13 @@ private: template class UserItem : public Item { - public: +public: virtual bool Parse (std::string value); T *m_valuePtr; }; class CallbackItem : public Item { - public: +public: virtual bool Parse (std::string value); Callback m_callback; }; @@ -126,8 +126,8 @@ namespace ns3 { template void CommandLine::AddValue (const std::string &name, - const std::string &help, - T &value) + const std::string &help, + T &value) { UserItem *item = new UserItem (); item->m_name = name; diff --git a/src/core/model/config.cc b/src/core/model/config.cc index a54b51100..0d7ba6826 100644 --- a/src/core/model/config.cc +++ b/src/core/model/config.cc @@ -36,46 +36,48 @@ namespace ns3 { namespace Config { MatchContainer::MatchContainer () -{} -MatchContainer::MatchContainer (const std::vector > &objects, +{ +} +MatchContainer::MatchContainer (const std::vector > &objects, const std::vector &contexts, std::string path) : m_objects (objects), m_contexts (contexts), m_path (path) -{} -MatchContainer::Iterator +{ +} +MatchContainer::Iterator MatchContainer::Begin (void) const { return m_objects.begin (); } -MatchContainer::Iterator +MatchContainer::Iterator MatchContainer::End (void) const { return m_objects.end (); } -uint32_t +uint32_t MatchContainer::GetN (void) const { return m_objects.size (); } -Ptr +Ptr MatchContainer::Get (uint32_t i) const { return m_objects[i]; } -std::string +std::string MatchContainer::GetMatchedPath (uint32_t i) const { return m_contexts[i]; } -std::string +std::string MatchContainer::GetPath (void) const { return m_path; } -void +void MatchContainer::Set (std::string name, const AttributeValue &value) { for (Iterator tmp = Begin (); tmp != End (); ++tmp) @@ -140,8 +142,9 @@ private: ArrayMatcher::ArrayMatcher (std::string element) : m_element (element) -{} -bool +{ +} +bool ArrayMatcher::Matches (uint32_t i) const { if (m_element == "*") @@ -157,16 +160,16 @@ ArrayMatcher::Matches (uint32_t i) const std::string right = m_element.substr (tmp+1, m_element.size () - (tmp + 1)); ArrayMatcher matcher = ArrayMatcher (left); if (matcher.Matches (i)) - { - NS_LOG_DEBUG ("Array "<= min && i <= max) + StringToUint32 (upperBound, &max) && + i >= min && i <= max) { - NS_LOG_DEBUG ("Array "< root) { NS_LOG_FUNCTION (path << root); - std::string::size_type tmp; - tmp = path.find ("/"); - NS_ASSERT (tmp == 0); + NS_ASSERT ((path.find ("/")) == 0); std::string::size_type next = path.find ("/", 1); if (next == std::string::npos) @@ -365,10 +367,10 @@ Resolver::DoResolve (std::string path, Ptr root) TypeId tid = TypeId::LookupByName (tidString); Ptr object = root->GetObject (tid); if (object == 0) - { - NS_LOG_DEBUG ("GetObject ("< object = ptr.Get (); + if (object == 0) + { + NS_LOG_ERROR ("Requested object name=\""< (PeekPointer (info.checker)); if (vectorChecker != 0) - { - NS_LOG_DEBUG ("GetAttribute(vector)="< GetRootNamespaceObject (uint32_t i) const; - + private: void ParsePath (std::string path, std::string *root, std::string *leaf) const; typedef std::vector > Roots; @@ -567,7 +567,7 @@ ConfigImpl::LookupMatches (std::string path) NS_LOG_FUNCTION (path); class LookupMatchesResolver : public Resolver { - public: +public: LookupMatchesResolver (std::string path) : Resolver (path) {} @@ -605,10 +605,10 @@ ConfigImpl::UnregisterRootNamespaceObject (Ptr obj) for (std::vector >::iterator i = m_roots.begin (); i != m_roots.end (); i++) { if (*i == obj) - { - m_roots.erase (i); - return; - } + { + m_roots.erase (i); + return; + } } } diff --git a/src/core/model/config.h b/src/core/model/config.h index 54e095024..6fbb5f614 100644 --- a/src/core/model/config.h +++ b/src/core/model/config.h @@ -182,7 +182,7 @@ public: * * Connect the specified sink to all the objects stored in this * container. - * \sa ns3::Config::ConnectWithoutContext + * \sa ns3::Config::ConnectWithoutContext */ void ConnectWithoutContext (std::string name, const CallbackBase &cb); /** diff --git a/src/core/model/default-simulator-impl.cc b/src/core/model/default-simulator-impl.cc index c17042098..3f0db0066 100644 --- a/src/core/model/default-simulator-impl.cc +++ b/src/core/model/default-simulator-impl.cc @@ -42,7 +42,7 @@ DefaultSimulatorImpl::GetTypeId (void) static TypeId tid = TypeId ("ns3::DefaultSimulatorImpl") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -62,9 +62,10 @@ DefaultSimulatorImpl::DefaultSimulatorImpl () } DefaultSimulatorImpl::~DefaultSimulatorImpl () -{} +{ +} -void +void DefaultSimulatorImpl::DoDispose (void) { while (!m_events->IsEmpty ()) @@ -272,7 +273,7 @@ DefaultSimulatorImpl::Remove (const EventId &id) m_destroyEvents.erase (i); break; } - } + } return; } if (IsExpired (id)) @@ -318,7 +319,7 @@ DefaultSimulatorImpl::IsExpired (const EventId &ev) const { return false; } - } + } return true; } if (ev.PeekEventImpl () == 0 || diff --git a/src/core/model/double.cc b/src/core/model/double.cc index 5daf62718..d599f5ca0 100644 --- a/src/core/model/double.cc +++ b/src/core/model/double.cc @@ -38,9 +38,9 @@ Ptr MakeDoubleChecker (double min, double max, std::stri virtual bool Check (const AttributeValue &value) const { const DoubleValue *v = dynamic_cast (&value); if (v == 0) - { - return false; - } + { + return false; + } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } virtual std::string GetValueTypeName (void) const { diff --git a/src/core/model/enum.cc b/src/core/model/enum.cc index 0d156dbf1..8012b95b3 100644 --- a/src/core/model/enum.cc +++ b/src/core/model/enum.cc @@ -25,16 +25,18 @@ namespace ns3 { EnumValue::EnumValue () : m_v () -{} +{ +} EnumValue::EnumValue (int v) : m_v (v) -{} -void +{ +} +void EnumValue::Set (int v) { m_v = v; } -int +int EnumValue::Get (void) const { return m_v; @@ -52,11 +54,11 @@ EnumValue::SerializeToString (Ptr checker) const for (EnumChecker::ValueSet::const_iterator i = p->m_valueSet.begin (); i != p->m_valueSet.end (); i++) { if (i->first == m_v) - { - return i->second; - } + { + return i->second; + } } - + NS_FATAL_ERROR ("The user has set an invalid C++ value in this Enum"); // quiet compiler. return ""; @@ -69,28 +71,29 @@ EnumValue::DeserializeFromString (std::string value, Ptr for (EnumChecker::ValueSet::const_iterator i = p->m_valueSet.begin (); i != p->m_valueSet.end (); i++) { if (i->second == value) - { - m_v = i->first; - return true; - } + { + m_v = i->first; + return true; + } } return false; } EnumChecker::EnumChecker () -{} +{ +} -void +void EnumChecker::AddDefault (int v, std::string name) { m_valueSet.push_front (std::make_pair (v, name)); } -void +void EnumChecker::Add (int v, std::string name) { m_valueSet.push_back (std::make_pair (v, name)); } -bool +bool EnumChecker::Check (const AttributeValue &value) const { const EnumValue *p = dynamic_cast (&value); @@ -101,9 +104,9 @@ EnumChecker::Check (const AttributeValue &value) const for (ValueSet::const_iterator i = m_valueSet.begin (); i != m_valueSet.end (); i++) { if (i->first == p->Get ()) - { - return true; - } + { + return true; + } } return false; } @@ -235,52 +238,52 @@ MakeEnumChecker (int v1, std::string n1, checker->Add (v12, n12); if (n13 == "") { - return checker; + return checker; } checker->Add (v13, n13); if (n14 == "") - { - return checker; - } + { + return checker; + } checker->Add (v14, n14); if (n15 == "") { - return checker; + return checker; } checker->Add (v15, n15); if (n16 == "") { - return checker; + return checker; } checker->Add (v16, n16); if (n17 == "") { - return checker; + return checker; } checker->Add (v17, n17); if (n18 == "") { - return checker; + return checker; } checker->Add (v18, n18); if (n19 == "") { - return checker; + return checker; } checker->Add (v19, n19); if (n20 == "") { - return checker; + return checker; } checker->Add (v20, n20); if (n21 == "") { - return checker; + return checker; } checker->Add (v21, n21); if (n22 == "") { - return checker; + return checker; } checker->Add (v22, n22); return checker; diff --git a/src/core/model/enum.h b/src/core/model/enum.h index e34693b43..d8e40c2f2 100644 --- a/src/core/model/enum.h +++ b/src/core/model/enum.h @@ -87,17 +87,17 @@ template Ptr MakeEnumAccessor (T1 a1, T2 a2); Ptr MakeEnumChecker (int v1, std::string n1, - int v2 = 0, std::string n2 = "", - int v3 = 0, std::string n3 = "", - int v4 = 0, std::string n4 = "", - int v5 = 0, std::string n5 = "", - int v6 = 0, std::string n6 = "", - int v7 = 0, std::string n7 = "", - int v8 = 0, std::string n8 = "", - int v9 = 0, std::string n9 = "", - int v10 = 0, std::string n10 = "", - int v11 = 0, std::string n11 = "", - int v12 = 0, std::string n12 = "", + int v2 = 0, std::string n2 = "", + int v3 = 0, std::string n3 = "", + int v4 = 0, std::string n4 = "", + int v5 = 0, std::string n5 = "", + int v6 = 0, std::string n6 = "", + int v7 = 0, std::string n7 = "", + int v8 = 0, std::string n8 = "", + int v9 = 0, std::string n9 = "", + int v10 = 0, std::string n10 = "", + int v11 = 0, std::string n11 = "", + int v12 = 0, std::string n12 = "", int v13 = 0, std::string n13 = "", int v14 = 0, std::string n14 = "", int v15 = 0, std::string n15 = "", diff --git a/src/core/model/event-id.cc b/src/core/model/event-id.cc index a8258cfd6..d0a8436f5 100644 --- a/src/core/model/event-id.cc +++ b/src/core/model/event-id.cc @@ -28,25 +28,27 @@ EventId::EventId () m_ts (0), m_context (0), m_uid (0) -{} - +{ +} + EventId::EventId (const Ptr &impl, uint64_t ts, uint32_t context, uint32_t uid) : m_eventImpl (impl), m_ts (ts), m_context (context), m_uid (uid) -{} -void +{ +} +void EventId::Cancel (void) { Simulator::Cancel (*this); } -bool +bool EventId::IsExpired (void) const { return Simulator::IsExpired (*this); } -bool +bool EventId::IsRunning (void) const { return !IsExpired (); diff --git a/src/core/model/event-id.h b/src/core/model/event-id.h index a28acbba6..97b9f18bb 100644 --- a/src/core/model/event-id.h +++ b/src/core/model/event-id.h @@ -29,7 +29,7 @@ namespace ns3 { class EventImpl; /** - * \ingroup simulator + * \ingroup core * \brief an identifier for simulation events. * * Each EventId identifies a unique event scheduled with one diff --git a/src/core/model/event-impl.cc b/src/core/model/event-impl.cc index 42c6deb02..5f386d874 100644 --- a/src/core/model/event-impl.cc +++ b/src/core/model/event-impl.cc @@ -23,28 +23,30 @@ namespace ns3 { EventImpl::~EventImpl () -{} +{ +} EventImpl::EventImpl () : m_cancel (false) -{} +{ +} -void +void EventImpl::Invoke (void) { - if (!m_cancel) + if (!m_cancel) { Notify (); } } -void +void EventImpl::Cancel (void) { m_cancel = true; } -bool +bool EventImpl::IsCancelled (void) { return m_cancel; diff --git a/src/core/model/event-impl.h b/src/core/model/event-impl.h index 0bdb4a007..a8faa0676 100644 --- a/src/core/model/event-impl.h +++ b/src/core/model/event-impl.h @@ -26,7 +26,7 @@ namespace ns3 { /** - * \ingroup simulator + * \ingroup core * \brief a simulation event * * Each subclass of this base class represents a simulation event. The diff --git a/src/core/model/fatal-error.h b/src/core/model/fatal-error.h index 7e52ce009..296e12b34 100644 --- a/src/core/model/fatal-error.h +++ b/src/core/model/fatal-error.h @@ -45,7 +45,7 @@ do \ { \ std::cerr << "file=" << __FILE__ << ", line=" << \ - __LINE__ << std::endl; \ + __LINE__ << std::endl; \ ::ns3::FatalImpl::FlushStreams (); \ std::terminate (); \ } \ diff --git a/src/core/model/fatal-impl.cc b/src/core/model/fatal-impl.cc index 9ee654a57..40ea58f01 100644 --- a/src/core/model/fatal-impl.cc +++ b/src/core/model/fatal-impl.cc @@ -45,29 +45,29 @@ namespace FatalImpl { /* File-scope */ namespace { - std::list **PeekStreamList (void) - { - static std::list *streams = 0; - return &streams; - } - std::list *GetStreamList (void) +std::list **PeekStreamList (void) +{ + static std::list *streams = 0; + return &streams; +} +std::list *GetStreamList (void) +{ + std::list **pstreams = PeekStreamList (); + if (*pstreams == 0) + { + *pstreams = new std::list (); + } + return *pstreams; +} +struct destructor +{ + ~destructor () { std::list **pstreams = PeekStreamList (); - if (*pstreams == 0) - { - *pstreams = new std::list (); - } - return *pstreams; + delete *pstreams; + *pstreams = 0; } - struct destructor - { - ~destructor () - { - std::list **pstreams = PeekStreamList (); - delete *pstreams; - *pstreams = 0; - } - }; +}; } void @@ -94,13 +94,13 @@ UnregisterStream (std::ostream* stream) namespace { - /* Overrides normal SIGSEGV handler once the - * HandleTerminate function is run. */ - void sigHandler(int sig) - { - FlushStreams (); - std::abort (); - } +/* Overrides normal SIGSEGV handler once the + * HandleTerminate function is run. */ +void sigHandler(int sig) +{ + FlushStreams (); + std::abort (); +} } void diff --git a/src/core/model/global-value.cc b/src/core/model/global-value.cc index 3e17328c9..57ff88dee 100644 --- a/src/core/model/global-value.cc +++ b/src/core/model/global-value.cc @@ -31,8 +31,8 @@ namespace ns3 { GlobalValue::GlobalValue (std::string name, std::string help, - const AttributeValue &initialValue, - Ptr checker) + const AttributeValue &initialValue, + Ptr checker) : m_name (name), m_help (help), m_initialValue (initialValue.Copy ()), @@ -107,7 +107,7 @@ GlobalValue::GetChecker (void) const { return m_checker; } - + bool GlobalValue::SetValue (const AttributeValue &value) { @@ -144,13 +144,13 @@ GlobalValue::Bind (std::string name, const AttributeValue &value) for (Iterator i = Begin (); i != End (); i++) { if ((*i)->GetName () == name) - { - if (!(*i)->SetValue (value)) - { - NS_FATAL_ERROR ("Invalid new value for global value: "<SetValue (value)) + { + NS_FATAL_ERROR ("Invalid new value for global value: "<GetName () == name) - { - return (*i)->SetValue (value); - } + { + return (*i)->SetValue (value); + } } return false; } @@ -183,10 +183,10 @@ GlobalValue::GetValueByNameFailSafe (std::string name, AttributeValue &value) for (GlobalValue::Iterator gvit = GlobalValue::Begin (); gvit != GlobalValue::End (); ++gvit) { if ((*gvit)->GetName () == name) - { - (*gvit)->GetValue (value); - return true; - } + { + (*gvit)->GetValue (value); + return true; + } } return false; // not found } @@ -194,7 +194,7 @@ GlobalValue::GetValueByNameFailSafe (std::string name, AttributeValue &value) void GlobalValue::GetValueByName (std::string name, AttributeValue &value) { - if (! GetValueByNameFailSafe (name, value)) + if (!GetValueByNameFailSafe (name, value)) { NS_FATAL_ERROR ("Could not find GlobalValue named \"" << name << "\""); } diff --git a/src/core/model/global-value.h b/src/core/model/global-value.h index 942de8e56..359ed3251 100644 --- a/src/core/model/global-value.h +++ b/src/core/model/global-value.h @@ -95,7 +95,7 @@ public: * This method cannot fail. It will crash if the input is not valid. */ static void Bind (std::string name, const AttributeValue &value); - + /** * \param name the name of the global value * \param value the value to set in the requested global value. @@ -136,7 +136,7 @@ public: * */ static void GetValueByName (std::string name, AttributeValue &value); - + private: friend class GlobalValueTestCase; diff --git a/src/core/model/heap-scheduler.cc b/src/core/model/heap-scheduler.cc index 19d39872f..71e6e492c 100644 --- a/src/core/model/heap-scheduler.cc +++ b/src/core/model/heap-scheduler.cc @@ -46,7 +46,7 @@ HeapScheduler::HeapScheduler () // we purposedly waste an item at the start of // the array to make sure the indexes in the // array start at one. - Scheduler::Event empty = {0,{0,0}}; + Scheduler::Event empty = { 0,{ 0,0}}; m_heap.push_back (empty); } diff --git a/src/core/model/int-to-type.h b/src/core/model/int-to-type.h index 612820cf9..54343a86d 100644 --- a/src/core/model/int-to-type.h +++ b/src/core/model/int-to-type.h @@ -11,7 +11,7 @@ namespace ns3 { template struct IntToType { - enum v_e {value = v}; + enum v_e { value = v}; }; } // namespace ns3 diff --git a/src/core/model/int64x64-128.cc b/src/core/model/int64x64-128.cc index fe4194b76..75f33fca8 100644 --- a/src/core/model/int64x64-128.cc +++ b/src/core/model/int64x64-128.cc @@ -4,13 +4,13 @@ namespace ns3 { -#define OUTPUT_SIGN(sa,sb,ua,ub) \ - ({bool negA, negB; \ - negA = sa < 0; \ - negB = sb < 0; \ - ua = negA?-sa:sa; \ - ub = negB?-sb:sb; \ - (negA && !negB) || (!negA && negB);}) +#define OUTPUT_SIGN(sa,sb,ua,ub) \ + ({ bool negA, negB; \ + negA = sa < 0; \ + negB = sb < 0; \ + ua = negA ? -sa : sa; \ + ub = negB ? -sb : sb; \ + (negA && !negB) || (!negA && negB);}) #define MASK_LO ((((int128_t)1)<<64)-1) @@ -54,7 +54,7 @@ int64x64_t::Umul (uint128_t a, uint128_t b) result |= ((hiPart & MASK_LO) << 64) + (midPart & MASK_HI); // if the high part is not zero, put a warning NS_ABORT_MSG_IF ((hiPart & MASK_HI) != 0, - "High precision 128 bits multiplication error: multiplication overflow."); + "High precision 128 bits multiplication error: multiplication overflow."); return result; } void @@ -62,9 +62,9 @@ int64x64_t::Div (int64x64_t const &o) { bool negResult; uint128_t a, b; - negResult = OUTPUT_SIGN (_v, o._v, a, b); + negResult = OUTPUT_SIGN (_v, o._v, a, b); int128_t result = Divu (a, b); - result = negResult ? -result:result; + result = negResult ? -result : result; _v = result; } @@ -96,10 +96,10 @@ void int64x64_t::MulByInvert (const int64x64_t &o) { bool negResult = _v < 0; - uint128_t a = negResult?-_v:_v; + uint128_t a = negResult ? -_v : _v; uint128_t result = UmulByInvert (a, o._v); - _v = negResult?-result:result; + _v = negResult ? -result : result; } uint128_t int64x64_t::UmulByInvert (uint128_t a, uint128_t b) diff --git a/src/core/model/int64x64-128.h b/src/core/model/int64x64-128.h index cae689ef1..d1a60c605 100644 --- a/src/core/model/int64x64-128.h +++ b/src/core/model/int64x64-128.h @@ -6,7 +6,7 @@ #include #include -#if defined(HAVE___UINT128_T) and !defined(HAVE_UINT128_T) +#if defined(HAVE___UINT128_T)and !defined(HAVE_UINT128_T) typedef __uint128_t uint128_t; typedef __int128_t int128_t; #endif @@ -25,13 +25,13 @@ public: inline int64x64_t (double value) { bool is_negative = value < 0; - value = is_negative?-value:value; + value = is_negative ? -value : value; double hi = floor (value); double lo = (value - hi) * HP128_MAX_64; _v = (int128_t)hi; _v <<= 64; _v += (int128_t)lo; - _v = is_negative?-_v:_v; + _v = is_negative ? -_v : _v; } inline int64x64_t (int v) : _v (v) @@ -66,24 +66,24 @@ public: explicit inline int64x64_t (int64_t hi, uint64_t lo) { bool is_negative = hi<0; - _v = is_negative?-hi:hi; + _v = is_negative ? -hi : hi; _v <<= 64; _v += lo; - _v = is_negative?-_v:_v; + _v = is_negative ? -_v : _v; } inline int64x64_t (const int64x64_t &o) : _v (o._v) {} inline int64x64_t &operator = (const int64x64_t &o) - { - _v = o._v; - return *this; - } + { + _v = o._v; + return *this; + } inline double GetDouble (void) const { bool is_negative = _v < 0; - uint128_t value = is_negative ? -_v:_v; + uint128_t value = is_negative ? -_v : _v; uint64_t hi = value >> 64; uint64_t lo = value; double flo = lo; @@ -96,15 +96,15 @@ public: inline int64_t GetHigh (void) const { bool negative = _v < 0; - int128_t v = negative?-_v:_v; + int128_t v = negative ? -_v : _v; v >>= 64; int64_t retval = v; - return negative?-retval:retval; + return negative ? -retval : retval; } inline uint64_t GetLow (void) const { bool negative = _v < 0; - int128_t v = negative?-_v:_v; + int128_t v = negative ? -_v : _v; int128_t low = v & HP128_MASK_LO; uint64_t retval = low; return retval; diff --git a/src/core/model/int64x64-cairo.cc b/src/core/model/int64x64-cairo.cc index 9baaffe59..e45365d99 100644 --- a/src/core/model/int64x64-cairo.cc +++ b/src/core/model/int64x64-cairo.cc @@ -27,14 +27,14 @@ namespace ns3 { #define OUTPUT_SIGN(sa,sb,ua,ub) \ - ({bool negA, negB; \ - negA = _cairo_int128_negative (sa); \ - negB = _cairo_int128_negative (sb); \ - ua = _cairo_int128_to_uint128 (sa); \ - ub = _cairo_int128_to_uint128 (sb); \ - ua = negA ? _cairo_uint128_negate (ua) : ua; \ - ub = negB ? _cairo_uint128_negate (ub) : ub; \ - (negA && !negB) || (!negA && negB);}) + ({ bool negA, negB; \ + negA = _cairo_int128_negative (sa); \ + negB = _cairo_int128_negative (sb); \ + ua = _cairo_int128_to_uint128 (sa); \ + ub = _cairo_int128_to_uint128 (sb); \ + ua = negA ? _cairo_uint128_negate (ua) : ua; \ + ub = negB ? _cairo_uint128_negate (ub) : ub; \ + (negA && !negB) || (!negA && negB);}) void int64x64_t::Mul (int64x64_t const &o) @@ -114,10 +114,10 @@ void int64x64_t::MulByInvert (const int64x64_t &o) { bool negResult = _cairo_int128_negative (_v); - cairo_uint128_t a = negResult?_cairo_int128_negate(_v):_v; + cairo_uint128_t a = negResult ? _cairo_int128_negate(_v) : _v; cairo_uint128_t result = UmulByInvert (a, o._v); - _v = negResult?_cairo_int128_negate(result):result; + _v = negResult ? _cairo_int128_negate(result) : result; } cairo_uint128_t int64x64_t::UmulByInvert (cairo_uint128_t a, cairo_uint128_t b) @@ -126,7 +126,7 @@ int64x64_t::UmulByInvert (cairo_uint128_t a, cairo_uint128_t b) cairo_uint128_t hi, mid; hi = _cairo_uint64x64_128_mul (a.hi, b.hi); mid = _cairo_uint128_add (_cairo_uint64x64_128_mul (a.hi, b.lo), - _cairo_uint64x64_128_mul (a.lo, b.hi)); + _cairo_uint64x64_128_mul (a.lo, b.hi)); mid.lo = mid.hi; mid.hi = 0; result = _cairo_uint128_add (hi,mid); @@ -147,7 +147,7 @@ int64x64_t::Invert (uint64_t v) tmp.MulByInvert (result); if (tmp.GetHigh () != 1) { - cairo_uint128_t one = {1, 0}; + cairo_uint128_t one = { 1, 0}; result._v = _cairo_uint128_add (result._v, one); } return result; diff --git a/src/core/model/int64x64-cairo.h b/src/core/model/int64x64-cairo.h index 94ac692c8..4af474b2b 100644 --- a/src/core/model/int64x64-cairo.h +++ b/src/core/model/int64x64-cairo.h @@ -26,7 +26,7 @@ public: #define HPCAIRO_MAX_64 18446744073709551615.0 double fhi = floor (value); int64_t hi = lround(fhi); - uint64_t lo = (uint64_t) ((value - fhi) * HPCAIRO_MAX_64); + uint64_t lo = (uint64_t)((value - fhi) * HPCAIRO_MAX_64); _v.hi = hi; _v.lo = lo; #undef HPCAIRO_MAX_64 @@ -70,10 +70,10 @@ public: inline int64x64_t (const int64x64_t &o) : _v (o._v) {} inline int64x64_t &operator = (const int64x64_t &o) - { - _v = o._v; - return *this; - } + { + _v = o._v; + return *this; + } inline double GetDouble (void) const { @@ -84,7 +84,7 @@ public: flo /= HPCAIRO_MAX_64; double retval = value.hi; retval += flo; - retval = is_negative ? -retval: retval; + retval = is_negative ? -retval : retval; return retval; #undef HPCAIRO_MAX_64 } @@ -131,7 +131,7 @@ private: _v.hi = ~_v.hi; if (++_v.lo == 0) { - ++_v.hi; + ++_v.hi; } } inline int Compare (const int64x64_t &o) const @@ -139,8 +139,8 @@ private: int status; int64x64_t tmp = *this; tmp -= o; - status = (((int64_t)(tmp)._v.hi) < 0)?-1: - (((tmp)._v.hi == 0 && (tmp)._v.lo == 0))?0:1; + status = (((int64_t)(tmp)._v.hi) < 0) ? -1 : + (((tmp)._v.hi == 0 && (tmp)._v.lo == 0)) ? 0 : 1; return status; } cairo_int128_t _v; @@ -153,7 +153,7 @@ inline bool operator == (const int64x64_t &lhs, const int64x64_t &rhs) inline bool operator != (const int64x64_t &lhs, const int64x64_t &rhs) { - return ! (lhs == rhs); + return !(lhs == rhs); } inline bool operator < (const int64x64_t &lhs, const int64x64_t &rhs) @@ -246,7 +246,7 @@ inline int64x64_t operator - (const int64x64_t &lhs) inline int64x64_t operator ! (const int64x64_t &lhs) { - return (lhs._v.hi == 0 && lhs._v.lo == 0)?int64x64_t (1, 0):int64x64_t (); + return (lhs._v.hi == 0 && lhs._v.lo == 0) ? int64x64_t (1, 0) : int64x64_t (); } } // namespace ns3 diff --git a/src/core/model/int64x64-double.h b/src/core/model/int64x64-double.h index 678c982f1..82d26c7eb 100644 --- a/src/core/model/int64x64-double.h +++ b/src/core/model/int64x64-double.h @@ -27,15 +27,15 @@ public: inline int64x64_t (unsigned long long int v) : _v (v) {} inline int64x64_t (int64_t hi, uint64_t lo) - : _v (hi) {/* XXX */} + : _v (hi) { /* XXX */} inline int64x64_t (const int64x64_t &o) : _v (o._v) {} inline int64x64_t &operator = (const int64x64_t &o) - { - _v = o._v; - return *this; - } + { + _v = o._v; + return *this; + } inline double GetDouble (void) const { diff --git a/src/core/model/int64x64.cc b/src/core/model/int64x64.cc index bd7881533..b90becbc1 100644 --- a/src/core/model/int64x64.cc +++ b/src/core/model/int64x64.cc @@ -31,7 +31,7 @@ static uint64_t PowerOfTen (uint8_t n) std::ostream &operator << (std::ostream &os, const int64x64_t &value) { int64_t hi = value.GetHigh (); - os << ((hi<0)?"-":"+") << ((hi<0)?-hi:hi) << "."; + os << ((hi<0) ? "-" : "+") << ((hi<0) ? -hi : hi) << "."; uint64_t low = value.GetLow (); uint8_t msd = MostSignificantDigit (~((uint64_t)0)); do @@ -80,13 +80,13 @@ std::istream &operator >> (std::istream &is, int64x64_t &value) { next = str.find ("+", cur); if (next != std::string::npos) - { - next++; - } + { + next++; + } else - { - next = cur; - } + { + next = cur; + } negative = false; } cur = next; @@ -103,7 +103,7 @@ std::istream &operator >> (std::istream &is, int64x64_t &value) hi = ReadDigits (str.substr (cur, str.size ()-cur)); lo = 0; } - hi = negative?-hi:hi; + hi = negative ? -hi : hi; value = int64x64_t (hi, lo); return is; } diff --git a/src/core/model/int64x64.h b/src/core/model/int64x64.h index 58cc46507..aecdfdcca 100644 --- a/src/core/model/int64x64.h +++ b/src/core/model/int64x64.h @@ -15,57 +15,57 @@ namespace ns3 { -#define INT64X64_OP_ARITH_TYPE(op,type) \ +#define INT64X64_OP_ARITH_TYPE(op,type) \ inline int64x64_t operator op (const int64x64_t &lhs, const type rhs) \ - { \ - int64x64_t tmp = lhs; \ - tmp op##= int64x64_t (rhs); \ - return tmp; \ - } \ + { \ + int64x64_t tmp = lhs; \ + tmp op ##= int64x64_t (rhs); \ + return tmp; \ + } \ inline int64x64_t operator op (const type lhs, const int64x64_t &rhs) \ - { \ - int64x64_t tmp = int64x64_t (lhs); \ - tmp op##= rhs; \ - return tmp; \ + { \ + int64x64_t tmp = int64x64_t (lhs); \ + tmp op ##= rhs; \ + return tmp; \ } -#define INT64X64_OP_ARITH(op) \ +#define INT64X64_OP_ARITH(op) \ inline int64x64_t operator op (const int64x64_t &lhs, const int64x64_t &rhs) \ - { \ - int64x64_t tmp = lhs; \ - tmp op##= rhs; \ - return tmp; \ - } \ - INT64X64_OP_ARITH_TYPE(op,double) \ - INT64X64_OP_ARITH_TYPE(op,signed char) \ - INT64X64_OP_ARITH_TYPE(op,signed short) \ - INT64X64_OP_ARITH_TYPE(op,signed int) \ - INT64X64_OP_ARITH_TYPE(op,signed long int) \ - INT64X64_OP_ARITH_TYPE(op,signed long long int) \ - INT64X64_OP_ARITH_TYPE(op,unsigned char) \ - INT64X64_OP_ARITH_TYPE(op,unsigned short) \ - INT64X64_OP_ARITH_TYPE(op,unsigned int) \ - INT64X64_OP_ARITH_TYPE(op,unsigned long int) \ - INT64X64_OP_ARITH_TYPE(op,unsigned long long int) + { \ + int64x64_t tmp = lhs; \ + tmp op ##= rhs; \ + return tmp; \ + } \ + INT64X64_OP_ARITH_TYPE(op,double) \ + INT64X64_OP_ARITH_TYPE(op,signed char) \ + INT64X64_OP_ARITH_TYPE(op,signed short) \ + INT64X64_OP_ARITH_TYPE(op,signed int) \ + INT64X64_OP_ARITH_TYPE(op,signed long int) \ + INT64X64_OP_ARITH_TYPE(op,signed long long int) \ + INT64X64_OP_ARITH_TYPE(op,unsigned char) \ + INT64X64_OP_ARITH_TYPE(op,unsigned short) \ + INT64X64_OP_ARITH_TYPE(op,unsigned int) \ + INT64X64_OP_ARITH_TYPE(op,unsigned long int) \ + INT64X64_OP_ARITH_TYPE(op,unsigned long long int) -#define INT64X64_OP_CMP_TYPE(op,type) \ - inline bool operator op (const int64x64_t &lhs, const type &rhs) \ - { \ - return lhs op int64x64_t (rhs); \ - } \ - inline bool operator op (const type &lhs, const int64x64_t &rhs) \ - { \ - return int64x64_t (lhs) op rhs; \ +#define INT64X64_OP_CMP_TYPE(op,type) \ + inline bool operator op (const int64x64_t &lhs, const type &rhs) \ + { \ + return lhs op int64x64_t (rhs); \ + } \ + inline bool operator op (const type &lhs, const int64x64_t &rhs) \ + { \ + return int64x64_t (lhs) op rhs; \ } -#define INT64X64_OP_CMP(op) \ - INT64X64_OP_CMP_TYPE(op,double) \ - INT64X64_OP_CMP_TYPE(op,signed int) \ - INT64X64_OP_CMP_TYPE(op,signed long int) \ - INT64X64_OP_CMP_TYPE(op,signed long long int) \ - INT64X64_OP_CMP_TYPE(op,unsigned int) \ - INT64X64_OP_CMP_TYPE(op,unsigned long int) \ - INT64X64_OP_CMP_TYPE(op,unsigned long long int) +#define INT64X64_OP_CMP(op) \ + INT64X64_OP_CMP_TYPE(op,double) \ + INT64X64_OP_CMP_TYPE(op,signed int) \ + INT64X64_OP_CMP_TYPE(op,signed long int) \ + INT64X64_OP_CMP_TYPE(op,signed long long int) \ + INT64X64_OP_CMP_TYPE(op,unsigned int) \ + INT64X64_OP_CMP_TYPE(op,unsigned long int) \ + INT64X64_OP_CMP_TYPE(op,unsigned long long int) INT64X64_OP_ARITH(+) @@ -84,17 +84,17 @@ std::istream &operator >> (std::istream &is, int64x64_t &val); inline int64x64_t Abs (const int64x64_t &value) { - return (value < 0)?-value:value; + return (value < 0) ? -value : value; } inline int64x64_t Min (const int64x64_t &a, const int64x64_t &b) { - return (a < b)?a:b; + return (a < b) ? a : b; } inline int64x64_t Max (const int64x64_t &a, const int64x64_t &b) { - return (a > b)?a:b; + return (a > b) ? a : b; } } // namespace ns3 diff --git a/src/core/model/integer.cc b/src/core/model/integer.cc index d78a9eda9..946563559 100644 --- a/src/core/model/integer.cc +++ b/src/core/model/integer.cc @@ -39,9 +39,9 @@ MakeIntegerChecker (int64_t min, int64_t max, std::string name) virtual bool Check (const AttributeValue &value) const { const IntegerValue *v = dynamic_cast (&value); if (v == 0) - { - return false; - } + { + return false; + } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } virtual std::string GetValueTypeName (void) const { diff --git a/src/core/model/log.cc b/src/core/model/log.cc index 14ffbd883..828318396 100644 --- a/src/core/model/log.cc +++ b/src/core/model/log.cc @@ -76,7 +76,7 @@ PrintList::PrintList () } cur = next + 1; } -#endif +#endif } @@ -261,11 +261,11 @@ LogComponentEnable (char const *name, enum LogLevel level) i++) { if (i->first.compare (name) == 0) - { - i->second->Enable (level); - break; - } - } + { + i->second->Enable (level); + break; + } + } } void @@ -277,7 +277,7 @@ LogComponentEnableAll (enum LogLevel level) i++) { i->second->Enable (level); - } + } } void @@ -289,11 +289,11 @@ LogComponentDisable (char const *name, enum LogLevel level) i++) { if (i->first.compare (name) == 0) - { - i->second->Disable (level); - break; - } - } + { + i->second->Disable (level); + break; + } + } } void @@ -305,7 +305,7 @@ LogComponentDisableAll (enum LogLevel level) i++) { i->second->Disable (level); - } + } } void @@ -376,6 +376,7 @@ LogNodePrinter LogGetNodePrinter(void) ParameterLogger::ParameterLogger (std::ostream &os) : m_itemNumber (0), m_os (os) -{} +{ +} } // namespace ns3 diff --git a/src/core/model/log.h b/src/core/model/log.h index f544e86ab..fa381a49c 100644 --- a/src/core/model/log.h +++ b/src/core/model/log.h @@ -123,7 +123,7 @@ void LogComponentDisableAll (enum LogLevel level); * logging components to enable. For example (using bash syntax), * NS_LOG="OlsrAgent" would enable one component at all log levels. * NS_LOG="OlsrAgent:Ipv4L3Protocol" would enable two components, - * at all log levels, etc. + * at all log levels, etc. * NS_LOG="*" will enable all available log components at all levels. * * To control more selectively the log levels for each component, use @@ -156,7 +156,7 @@ void LogComponentDisableAll (enum LogLevel level); ns3::LogTimePrinter printer = ns3::LogGetTimePrinter (); \ if (printer != 0) \ { \ - (*printer) (std::clog); \ + (*printer)(std::clog); \ std::clog << " "; \ } \ } @@ -167,7 +167,7 @@ void LogComponentDisableAll (enum LogLevel level); ns3::LogNodePrinter printer = ns3::LogGetNodePrinter (); \ if (printer != 0) \ { \ - (*printer) (std::clog); \ + (*printer)(std::clog); \ std::clog << " "; \ } \ } @@ -176,7 +176,7 @@ void LogComponentDisableAll (enum LogLevel level); if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC)) \ { \ std::clog << g_log.Name () << ":" << \ - __FUNCTION__ << "(): "; \ + __FUNCTION__ << "(): "; \ } \ #ifndef NS_LOG_APPEND_CONTEXT @@ -349,8 +349,8 @@ namespace ns3 { */ void LogComponentPrintList (void); -typedef void (*LogTimePrinter) (std::ostream &os); -typedef void (*LogNodePrinter) (std::ostream &os); +typedef void (*LogTimePrinter)(std::ostream &os); +typedef void (*LogNodePrinter)(std::ostream &os); void LogSetTimePrinter (LogTimePrinter); LogTimePrinter LogGetTimePrinter(void); diff --git a/src/core/model/names.cc b/src/core/model/names.cc index 6fe99b6c9..ed901464c 100644 --- a/src/core/model/names.cc +++ b/src/core/model/names.cc @@ -35,7 +35,7 @@ public: NameNode (NameNode *parent, std::string name, Ptr object); NameNode &operator = (const NameNode &rhs); - ~NameNode (); + ~NameNode (); NameNode *m_parent; std::string m_name; @@ -178,7 +178,7 @@ NamesPriv::Add (std::string name, Ptr object) if (offset != 0) { // - // This must be a name that has the "/Names" namespace prefix omitted. + // This must be a name that has the "/Names" namespace prefix omitted. // Do some reasonableness checking on the rest of the name. // offset = name.find ("/"); @@ -190,7 +190,7 @@ NamesPriv::Add (std::string name, Ptr object) name = "/Names/" + name; } - + // // There must now be a fully qualified path in the string. All fully // qualified names begin with "/Names". We have to split off the final @@ -287,7 +287,7 @@ NamesPriv::Rename (std::string oldpath, std::string newname) if (offset != 0) { // - // This must be a name that has the "/Names" namespace prefix omitted. + // This must be a name that has the "/Names" namespace prefix omitted. // Do some reasonableness checking on the rest of the name. // offset = oldpath.find ("/"); @@ -299,7 +299,7 @@ NamesPriv::Rename (std::string oldpath, std::string newname) oldpath = "/Names/" + oldpath; } - + // // There must now be a fully qualified path in the oldpath string. All // fully qualified names begin with "/Names". We have to split off the final diff --git a/src/core/model/names.h b/src/core/model/names.h index 538d49eb4..ba7c153a1 100644 --- a/src/core/model/names.h +++ b/src/core/model/names.h @@ -456,6 +456,6 @@ Names::Find (Ptr context, std::string name) } } -}//namespace ns3 +} //namespace ns3 #endif /* OBJECT_NAMES_H */ diff --git a/src/core/model/nstime.h b/src/core/model/nstime.h index 50e46d901..61125d6d1 100644 --- a/src/core/model/nstime.h +++ b/src/core/model/nstime.h @@ -31,7 +31,7 @@ namespace ns3 { /** - * \ingroup simulator + * \ingroup core * \defgroup time Time */ /** @@ -153,15 +153,15 @@ public: * The unit to use to interpret a number representing time */ enum Unit - { - S = 0, - MS = 1, - US = 2, - NS = 3, - PS = 4, - FS = 5, - LAST = 6 - }; + { + S = 0, + MS = 1, + US = 2, + NS = 3, + PS = 4, + FS = 5, + LAST = 6 + }; inline Time &operator = (const Time &o) { @@ -252,7 +252,7 @@ public: inline int Compare (const Time &o) const { - return (m_data < o.m_data)?-1:(m_data == o.m_data)?0:1; + return (m_data < o.m_data) ? -1 : (m_data == o.m_data) ? 0 : 1; } /** @@ -544,7 +544,7 @@ inline Time &operator -= (Time &lhs, const Time &rhs) */ inline Time Abs (const Time &time) { - return Time ((time.m_data < 0)?-time.m_data:time.m_data); + return Time ((time.m_data < 0) ? -time.m_data : time.m_data); } /** * \anchor ns3-Time-Max @@ -555,7 +555,7 @@ inline Time Abs (const Time &time) */ inline Time Max (const Time &ta, const Time &tb) { - return Time ((ta.m_data < tb.m_data)?tb:ta); + return Time ((ta.m_data < tb.m_data) ? tb : ta); } /** * \anchor ns3-Time-Min @@ -566,7 +566,7 @@ inline Time Max (const Time &ta, const Time &tb) */ inline Time Min (const Time &ta, const Time &tb) { - return Time ((ta.m_data > tb.m_data)?tb:ta); + return Time ((ta.m_data > tb.m_data) ? tb : ta); } diff --git a/src/core/model/object-base.cc b/src/core/model/object-base.cc index c9f4ba8a8..a0ec39708 100644 --- a/src/core/model/object-base.cc +++ b/src/core/model/object-base.cc @@ -49,7 +49,8 @@ ObjectBase::GetTypeId (void) } ObjectBase::~ObjectBase () -{} +{ +} void ObjectBase::NotifyConstructionCompleted (void) @@ -61,106 +62,106 @@ ObjectBase::ConstructSelf (const AttributeList &attributes) // loop over the inheritance tree back to the Object base class. TypeId tid = GetInstanceTypeId (); do { - // loop over all attributes in object type - NS_LOG_DEBUG ("construct tid="<checker == checker) - { - // We have a matching attribute value. - if (DoSet (accessor, checker, *j->value)) - { - NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< - tid.GetAttributeName (i)<<"\""); - found = true; - break; - } - } - } - if (!found) - { - // is this attribute stored in the global instance ? - for (AttributeList::Attrs::const_iterator j = AttributeList::GetGlobal ()->m_attributes.begin (); - j != AttributeList::GetGlobal ()->m_attributes.end (); j++) - { - if (j->checker == checker) - { - // We have a matching attribute value. - if (DoSet (accessor, checker, *j->value)) - { - NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< - tid.GetAttributeName (i)<<"\" from global"); - found = true; - break; - } - } - } - } - if (!found) - { - // No matching attribute value so we try to look at the env var. + // loop over all attributes in object type + NS_LOG_DEBUG ("construct tid="<checker == checker) + { + // We have a matching attribute value. + if (DoSet (accessor, checker, *j->value)) + { + NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< + tid.GetAttributeName (i)<<"\""); + found = true; + break; + } + } + } + if (!found) + { + // is this attribute stored in the global instance ? + for (AttributeList::Attrs::const_iterator j = AttributeList::GetGlobal ()->m_attributes.begin (); + j != AttributeList::GetGlobal ()->m_attributes.end (); j++) + { + if (j->checker == checker) + { + // We have a matching attribute value. + if (DoSet (accessor, checker, *j->value)) + { + NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< + tid.GetAttributeName (i)<<"\" from global"); + found = true; + break; + } + } + } + } + if (!found) + { + // No matching attribute value so we try to look at the env var. #ifdef HAVE_GETENV - char *envVar = getenv ("NS_ATTRIBUTE_DEFAULT"); - if (envVar != 0) - { - std::string env = std::string (envVar); - std::string::size_type cur = 0; - std::string::size_type next = 0; - while (next != std::string::npos) - { - next = env.find (";", cur); - std::string tmp = std::string (env, cur, next-cur); - std::string::size_type equal = tmp.find ("="); - if (equal != std::string::npos) - { - std::string name = tmp.substr (0, equal); - std::string value = tmp.substr (equal+1, tmp.size () - equal - 1); - if (name == tid.GetAttributeFullName (i)) - { - if (DoSet (accessor, checker, StringValue (value))) - { - NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< - tid.GetAttributeName (i)<<"\" from env var"); - found = true; - break; - } - } - } - cur = next + 1; - } - } + char *envVar = getenv ("NS_ATTRIBUTE_DEFAULT"); + if (envVar != 0) + { + std::string env = std::string (envVar); + std::string::size_type cur = 0; + std::string::size_type next = 0; + while (next != std::string::npos) + { + next = env.find (";", cur); + std::string tmp = std::string (env, cur, next-cur); + std::string::size_type equal = tmp.find ("="); + if (equal != std::string::npos) + { + std::string name = tmp.substr (0, equal); + std::string value = tmp.substr (equal+1, tmp.size () - equal - 1); + if (name == tid.GetAttributeFullName (i)) + { + if (DoSet (accessor, checker, StringValue (value))) + { + NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< + tid.GetAttributeName (i)<<"\" from env var"); + found = true; + break; + } + } + } + cur = next + 1; + } + } #endif /* HAVE_GETENV */ - } - if (!found) - { - // No matching attribute value so we try to set the default value. - DoSet (accessor, checker, *initial); - NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< - tid.GetAttributeName (i)<<"\" from initial value."); - } - } - tid = tid.GetParent (); - } while (tid != ObjectBase::GetTypeId ()); + } + if (!found) + { + // No matching attribute value so we try to set the default value. + DoSet (accessor, checker, *initial); + NS_LOG_DEBUG ("construct \""<< tid.GetName ()<<"::"<< + tid.GetAttributeName (i)<<"\" from initial value."); + } + } + tid = tid.GetParent (); + } while (tid != ObjectBase::GetTypeId ()); NotifyConstructionCompleted (); } bool ObjectBase::DoSet (Ptr spec, - Ptr checker, + Ptr checker, const AttributeValue &value) { bool ok = checker->Check (value); diff --git a/src/core/model/object-base.h b/src/core/model/object-base.h index fa8d5ed41..811c9510c 100644 --- a/src/core/model/object-base.h +++ b/src/core/model/object-base.h @@ -29,13 +29,13 @@ * defines a new GetTypeId method. */ #define NS_OBJECT_ENSURE_REGISTERED(type) \ - static struct X##type##RegistrationClass \ + static struct X## type ## RegistrationClass \ { \ - X##type##RegistrationClass () { \ + X ## type ## RegistrationClass () { \ ns3::TypeId tid = type::GetTypeId (); \ tid.GetParent (); \ } \ -} x_##type##RegistrationVariable + } x_ ## type ## RegistrationVariable namespace ns3 { diff --git a/src/core/model/object-factory.cc b/src/core/model/object-factory.cc index 8c7f6158d..4cff279ec 100644 --- a/src/core/model/object-factory.cc +++ b/src/core/model/object-factory.cc @@ -23,24 +23,25 @@ namespace ns3 { ObjectFactory::ObjectFactory () -{} +{ +} -void +void ObjectFactory::SetTypeId (TypeId tid) { m_tid = tid; } -void +void ObjectFactory::SetTypeId (std::string tid) { m_tid = TypeId::LookupByName (tid); } -void +void ObjectFactory::SetTypeId (const char *tid) { m_tid = TypeId::LookupByName (tid); } -void +void ObjectFactory::Set (std::string name, const AttributeValue &value) { if (name == "") diff --git a/src/core/model/object-factory.h b/src/core/model/object-factory.h index d08977fd2..f3ce24be7 100644 --- a/src/core/model/object-factory.h +++ b/src/core/model/object-factory.h @@ -47,11 +47,11 @@ public: void SetTypeId (TypeId tid); /** * \param tid the TypeId of the object to instantiate. - */ + */ void SetTypeId (const char *tid); /** * \param tid the TypeId of the object to instantiate. - */ + */ void SetTypeId (std::string tid); /** * \param name the name of the attribute to set during object construction diff --git a/src/core/model/object-vector.cc b/src/core/model/object-vector.cc index 663b34dc4..b2693ac44 100644 --- a/src/core/model/object-vector.cc +++ b/src/core/model/object-vector.cc @@ -3,24 +3,25 @@ namespace ns3 { ObjectVectorValue::ObjectVectorValue () -{} +{ +} -ObjectVectorValue::Iterator +ObjectVectorValue::Iterator ObjectVectorValue::Begin (void) const { return m_objects.begin (); } -ObjectVectorValue::Iterator +ObjectVectorValue::Iterator ObjectVectorValue::End (void) const { return m_objects.end (); } -uint32_t +uint32_t ObjectVectorValue::GetN (void) const { return m_objects.size (); } -Ptr +Ptr ObjectVectorValue::Get (uint32_t i) const { return m_objects[i]; @@ -39,9 +40,9 @@ ObjectVectorValue::SerializeToString (Ptr checker) const { oss << m_objects[i]; if (i != m_objects.size () - 1) - { - oss << " "; - } + { + oss << " "; + } } return oss.str (); } diff --git a/src/core/model/object-vector.h b/src/core/model/object-vector.h index edf80e9fb..c41a546da 100644 --- a/src/core/model/object-vector.h +++ b/src/core/model/object-vector.h @@ -56,13 +56,13 @@ MakeObjectVectorAccessor (U T::*memberVector); template Ptr -MakeObjectVectorAccessor (Ptr (T::*get) (INDEX) const, - INDEX (T::*getN) (void) const); +MakeObjectVectorAccessor (Ptr (T::*get)(INDEX) const, + INDEX (T::*getN)(void) const); template Ptr -MakeObjectVectorAccessor (INDEX (T::*getN) (void) const, - Ptr (T::*get) (INDEX) const); +MakeObjectVectorAccessor (INDEX (T::*getN)(void) const, + Ptr (T::*get)(INDEX) const); class ObjectVectorChecker : public AttributeChecker { @@ -106,10 +106,10 @@ public: ObjectVectorValue *dst = dynamic_cast (&destination); if (src == 0 || dst == 0) { - return false; + return false; } *dst = *src; - return true; + return true; } }; @@ -137,9 +137,9 @@ MakeObjectVectorAccessor (U T::*memberVector) virtual bool DoGetN (const ObjectBase *object, uint32_t *n) const { const T *obj = dynamic_cast (object); if (obj == 0) - { - return false; - } + { + return false; + } *n = (obj->*m_memberVector).size (); return true; } @@ -149,13 +149,13 @@ MakeObjectVectorAccessor (U T::*memberVector) typename U::const_iterator end = (obj->*m_memberVector).end (); uint32_t k = 0; for (typename U::const_iterator j = begin; j != end; j++, k++) - { - if (k == i) - { - return *j; - break; - } - } + { + if (k == i) + { + return *j; + break; + } + } NS_ASSERT (false); // quiet compiler. return 0; @@ -168,26 +168,26 @@ MakeObjectVectorAccessor (U T::*memberVector) template Ptr -MakeObjectVectorAccessor (Ptr (T::*get) (INDEX) const, - INDEX (T::*getN) (void) const) +MakeObjectVectorAccessor (Ptr (T::*get)(INDEX) const, + INDEX (T::*getN)(void) const) { struct MemberGetters : public ObjectVectorAccessor { virtual bool DoGetN (const ObjectBase *object, uint32_t *n) const { const T *obj = dynamic_cast (object); if (obj == 0) - { - return false; - } - *n = (obj->*m_getN) (); + { + return false; + } + *n = (obj->*m_getN)(); return true; } virtual Ptr DoGet (const ObjectBase *object, uint32_t i) const { const T *obj = static_cast (object); - return (obj->*m_get) (i); + return (obj->*m_get)(i); } - Ptr (T::*m_get) (INDEX) const; - INDEX (T::*m_getN) (void) const; + Ptr (T::*m_get)(INDEX) const; + INDEX (T::*m_getN)(void) const; } *spec = new MemberGetters (); spec->m_get = get; spec->m_getN = getN; @@ -196,8 +196,8 @@ MakeObjectVectorAccessor (Ptr (T::*get) (INDEX) const, template Ptr -MakeObjectVectorAccessor (INDEX (T::*getN) (void) const, - Ptr (T::*get) (INDEX) const) +MakeObjectVectorAccessor (INDEX (T::*getN)(void) const, + Ptr (T::*get)(INDEX) const) { return MakeObjectVectorAccessor (get, getN); } diff --git a/src/core/model/object.cc b/src/core/model/object.cc index a8f01d890..e64f9d93d 100644 --- a/src/core/model/object.cc +++ b/src/core/model/object.cc @@ -43,14 +43,15 @@ NS_OBJECT_ENSURE_REGISTERED (Object); Object::AggregateIterator::AggregateIterator () : m_object (0), m_current (0) -{} +{ +} -bool +bool Object::AggregateIterator::HasNext (void) const { return m_current < m_object->m_aggregates->n; } -Ptr +Ptr Object::AggregateIterator::Next (void) { Object *object = m_object->m_aggregates->buffer[m_current]; @@ -60,21 +61,22 @@ Object::AggregateIterator::Next (void) Object::AggregateIterator::AggregateIterator (Ptr object) : m_object (object), m_current (0) -{} +{ +} -TypeId +TypeId Object::GetInstanceTypeId (void) const { return m_tid; } -TypeId +TypeId Object::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Object") .SetParent () - ; + ; return tid; } @@ -83,7 +85,7 @@ Object::Object () : m_tid (Object::GetTypeId ()), m_disposed (false), m_started (false), - m_aggregates ((struct Aggregates *)malloc (sizeof (struct Aggregates))), + m_aggregates ((struct Aggregates *) malloc (sizeof (struct Aggregates))), m_getObjectCount (0) { m_aggregates->n = 1; @@ -116,7 +118,7 @@ Object::Object (const Object &o) : m_tid (o.m_tid), m_disposed (false), m_started (false), - m_aggregates ((struct Aggregates *)malloc (sizeof (struct Aggregates))), + m_aggregates ((struct Aggregates *) malloc (sizeof (struct Aggregates))), m_getObjectCount (0) { m_aggregates->n = 1; @@ -172,7 +174,7 @@ Object::Start (void) * object at the end of the array. To be safe, we restart iteration over the * array whenever we call some user code, just in case. */ - restart: +restart: uint32_t n = m_aggregates->n; for (uint32_t i = 0; i < n; i++) { @@ -196,7 +198,7 @@ Object::Dispose (void) * So, to be safe, we restart the iteration over the array whenever we call some * user code. */ - restart: +restart: uint32_t n = m_aggregates->n; for (uint32_t i = 0; i < n; i++) { diff --git a/src/core/model/object.h b/src/core/model/object.h index 3b8333d10..f168872ed 100644 --- a/src/core/model/object.h +++ b/src/core/model/object.h @@ -76,7 +76,7 @@ public: */ class AggregateIterator { - public: +public: AggregateIterator (); /** @@ -89,7 +89,7 @@ public: * \returns the next aggregated object. */ Ptr Next (void); - private: +private: friend class Object; AggregateIterator (Ptr object); Ptr m_object; @@ -123,7 +123,7 @@ public: * * Note that you can call Dispose many times on the same object or * different objects aggregated together, and DoDispose will be - * called only once for each aggregated object. + * called only once for each aggregated object. * * This method is typically used to break reference cycles. */ @@ -164,13 +164,13 @@ public: void Start (void); protected: - /** - * This method is invoked whenever two sets of objects are aggregated together. - * It is invoked exactly once for each object in both sets. - * This method can be overriden by subclasses who wish to be notified of aggregation - * events. These subclasses must chain up to their base class NotifyNewAggregate method. - * It is safe to call GetObject and AggregateObject from within this method. - */ + /** + * This method is invoked whenever two sets of objects are aggregated together. + * It is invoked exactly once for each object in both sets. + * This method can be overriden by subclasses who wish to be notified of aggregation + * events. These subclasses must chain up to their base class NotifyNewAggregate method. + * It is safe to call GetObject and AggregateObject from within this method. + */ virtual void NotifyNewAggregate (void); /** * This method is called only once by Object::Start. If the user @@ -259,14 +259,14 @@ private: * keep track of the type of this object instance. */ void SetTypeId (TypeId tid); - /** - * \param attributes the attribute values used to initialize - * the member variables of this object's instance. - * - * Invoked from ns3::ObjectFactory::Create and ns3::CreateObject only. - * Initialize all the member variables which were - * registered with the associated TypeId. - */ + /** + * \param attributes the attribute values used to initialize + * the member variables of this object's instance. + * + * Invoked from ns3::ObjectFactory::Create and ns3::CreateObject only. + * Initialize all the member variables which were + * registered with the associated TypeId. + */ void Construct (const AttributeList &attributes); void UpdateSortedArray (struct Aggregates *aggregates, uint32_t i) const; @@ -359,15 +359,15 @@ Ptr CreateObjectWithAttributes (const AttributeList &attributes); template Ptr CreateObjectWithAttributes (std::string n1 = "", const AttributeValue & v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue & v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue & v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue & v4 = EmptyAttributeValue (), - std::string n5 = "", const AttributeValue & v5 = EmptyAttributeValue (), - std::string n6 = "", const AttributeValue & v6 = EmptyAttributeValue (), - std::string n7 = "", const AttributeValue & v7 = EmptyAttributeValue (), - std::string n8 = "", const AttributeValue & v8 = EmptyAttributeValue (), - std::string n9 = "", const AttributeValue & v9 = EmptyAttributeValue ()); - + std::string n2 = "", const AttributeValue & v2 = EmptyAttributeValue (), + std::string n3 = "", const AttributeValue & v3 = EmptyAttributeValue (), + std::string n4 = "", const AttributeValue & v4 = EmptyAttributeValue (), + std::string n5 = "", const AttributeValue & v5 = EmptyAttributeValue (), + std::string n6 = "", const AttributeValue & v6 = EmptyAttributeValue (), + std::string n7 = "", const AttributeValue & v7 = EmptyAttributeValue (), + std::string n8 = "", const AttributeValue & v8 = EmptyAttributeValue (), + std::string n9 = "", const AttributeValue & v9 = EmptyAttributeValue ()); + } // namespace ns3 @@ -449,20 +449,20 @@ Ptr CreateObjectWithAttributes (const AttributeList &attributes) Ptr p = Ptr (new T (), false); p->SetTypeId (T::GetTypeId ()); p->Object::Construct (attributes); - return p; + return p; } template Ptr -CreateObjectWithAttributes (std::string n1 , const AttributeValue & v1, - std::string n2 , const AttributeValue & v2, - std::string n3 , const AttributeValue & v3, - std::string n4 , const AttributeValue & v4, - std::string n5 , const AttributeValue & v5, - std::string n6 , const AttributeValue & v6, - std::string n7 , const AttributeValue & v7, - std::string n8 , const AttributeValue & v8, - std::string n9 , const AttributeValue & v9) +CreateObjectWithAttributes (std::string n1, const AttributeValue & v1, + std::string n2, const AttributeValue & v2, + std::string n3, const AttributeValue & v3, + std::string n4, const AttributeValue & v4, + std::string n5, const AttributeValue & v5, + std::string n6, const AttributeValue & v6, + std::string n7, const AttributeValue & v7, + std::string n8, const AttributeValue & v8, + std::string n9, const AttributeValue & v9) { AttributeList attributes; if (n1 == "") @@ -510,7 +510,7 @@ CreateObjectWithAttributes (std::string n1 , const AttributeValue & v1, goto end; } attributes.SetWithTid (T::GetTypeId (), n9, v9); - end: +end: return CreateObjectWithAttributes (attributes); } diff --git a/src/core/model/pointer.cc b/src/core/model/pointer.cc index f941d6089..c4f4607de 100644 --- a/src/core/model/pointer.cc +++ b/src/core/model/pointer.cc @@ -23,30 +23,32 @@ namespace ns3 { PointerValue::PointerValue () : m_value () -{} +{ +} PointerValue::PointerValue (Ptr object) : m_value (object) -{} +{ +} -void +void PointerValue::SetObject (Ptr object) { m_value = object; } -Ptr +Ptr PointerValue::GetObject (void) const { return m_value; } -Ptr +Ptr PointerValue::Copy (void) const { return Create (*this); } -std::string +std::string PointerValue::SerializeToString (Ptr checker) const { std::ostringstream oss; diff --git a/src/core/model/pointer.h b/src/core/model/pointer.h index 4b0e4d671..04657f2d0 100644 --- a/src/core/model/pointer.h +++ b/src/core/model/pointer.h @@ -87,16 +87,16 @@ class APointerChecker : public PointerChecker const PointerValue *value = dynamic_cast (&val); if (value == 0) { - return false; + return false; } if (value->GetObject () == 0) { - return true; + return true; } T *ptr = dynamic_cast (PeekPointer (value->GetObject ())); if (ptr == 0) { - return false; + return false; } return true; } diff --git a/src/core/model/ptr.h b/src/core/model/ptr.h index 0c6c25bac..8486629cd 100644 --- a/src/core/model/ptr.h +++ b/src/core/model/ptr.h @@ -61,7 +61,7 @@ class Ptr private: T *m_ptr; class Tester { - private: +private: void operator delete (void *); }; friend class Ptr; @@ -86,12 +86,12 @@ public: * same, so that object is deleted if no more references to it * remain. */ - Ptr (T *ptr); + Ptr (T *ptr); /** * \param ptr raw pointer to manage * \param ref if set to true, this method calls Ref, otherwise, * it does not call Ref. - * + * * Create a smart pointer which points to the object pointed to by * the input raw pointer ptr. */ @@ -223,9 +223,9 @@ struct EventMemberImplObjTraits > namespace ns3 { - /************************************************* - * friend non-member function implementations - ************************************************/ +/************************************************* + * friend non-member function implementations + ************************************************/ template Ptr Create (void) @@ -408,23 +408,24 @@ Ptr::Acquire (void) const if (m_ptr != 0) { m_ptr->Ref (); - } + } } template Ptr::Ptr () : m_ptr (0) -{} +{ +} template -Ptr::Ptr (T *ptr) +Ptr::Ptr (T *ptr) : m_ptr (ptr) { Acquire (); } template -Ptr::Ptr (T *ptr, bool ref) +Ptr::Ptr (T *ptr, bool ref) : m_ptr (ptr) { if (ref) diff --git a/src/core/model/realtime-simulator-impl.cc b/src/core/model/realtime-simulator-impl.cc index 9a9df2ee6..6acb7ddee 100644 --- a/src/core/model/realtime-simulator-impl.cc +++ b/src/core/model/realtime-simulator-impl.cc @@ -58,7 +58,7 @@ RealtimeSimulatorImpl::GetTypeId (void) TimeValue (Seconds (0.1)), MakeTimeAccessor (&RealtimeSimulatorImpl::m_hardLimit), MakeTimeChecker ()) - ; + ; return tid; } @@ -86,7 +86,8 @@ RealtimeSimulatorImpl::RealtimeSimulatorImpl () } RealtimeSimulatorImpl::~RealtimeSimulatorImpl () -{} +{ +} void RealtimeSimulatorImpl::DoDispose (void) @@ -155,7 +156,7 @@ RealtimeSimulatorImpl::ProcessOneEvent (void) NS_LOG_FUNCTION_NOARGS (); // // The idea here is to wait until the next event comes due. In the case of - // a realtime simulation, we want real time to be consumed between events. + // a realtime simulation, we want real time to be consumed between events. // It is the realtime synchronizer that causes real time to be consumed by // doing some kind of a wait. // @@ -205,7 +206,7 @@ RealtimeSimulatorImpl::ProcessOneEvent (void) // time so we need to be careful about that and not delay in that case. // NS_ASSERT_MSG (m_synchronizer->Realtime (), - "RealtimeSimulatorImpl::ProcessOneEvent (): Synchronizer reports not Realtime ()"); + "RealtimeSimulatorImpl::ProcessOneEvent (): Synchronizer reports not Realtime ()"); // // tsNow is set to the normalized current real time. When the simulation was @@ -234,7 +235,7 @@ RealtimeSimulatorImpl::ProcessOneEvent (void) { tsDelay = tsNext - tsNow; } - + // // We've figured out how long we need to delay in order to pace the // simulation time with the real time. We're going to sleep, but need @@ -274,7 +275,7 @@ RealtimeSimulatorImpl::ProcessOneEvent (void) // attempting to sleep until its due. If we've slept until the timestamp is due, // Synchronize returns true and we break out of the sync loop. If an external // event happens that requires a re-schedule, Synchronize returns false and - // we re-evaluate our timing by continuing in the loop. + // we re-evaluate our timing by continuing in the loop. // // It is expected that tsDelay become shorter as external events interrupt our // waits. @@ -313,7 +314,7 @@ RealtimeSimulatorImpl::ProcessOneEvent (void) // mess with us. // NS_ASSERT_MSG (m_events->IsEmpty () == false, - "RealtimeSimulatorImpl::ProcessOneEvent(): event queue is empty"); + "RealtimeSimulatorImpl::ProcessOneEvent(): event queue is empty"); next = m_events->RemoveNext (); m_unscheduledEvents--; @@ -400,7 +401,7 @@ RealtimeSimulatorImpl::NextTs (void) const { NS_LOG_FUNCTION_NOARGS (); NS_ASSERT_MSG (m_events->IsEmpty () == false, - "RealtimeSimulatorImpl::NextTs(): event queue is empty"); + "RealtimeSimulatorImpl::NextTs(): event queue is empty"); Scheduler::Event ev = m_events->PeekNext (); return ev.key.m_ts; } @@ -461,7 +462,7 @@ RealtimeSimulatorImpl::Run (void) CriticalSection cs (m_mutex); NS_ASSERT_MSG (m_events->IsEmpty () == false || m_unscheduledEvents == 0, - "RealtimeSimulatorImpl::Run(): Empty queue and unprocessed events"); + "RealtimeSimulatorImpl::Run(): Empty queue and unprocessed events"); } m_running = false; @@ -628,7 +629,7 @@ void RealtimeSimulatorImpl::ScheduleRealtimeWithContext (uint32_t context, Time const &time, EventImpl *impl) { NS_LOG_FUNCTION (context << time << impl); - + { CriticalSection cs (m_mutex); @@ -743,7 +744,7 @@ RealtimeSimulatorImpl::Remove (const EventId &id) m_destroyEvents.erase (i); break; } - } + } return; } if (IsExpired (id)) @@ -759,7 +760,7 @@ RealtimeSimulatorImpl::Remove (const EventId &id) event.key.m_ts = id.GetTs (); event.key.m_context = id.GetContext (); event.key.m_uid = id.GetUid (); - + m_events->Remove (event); m_unscheduledEvents--; event.impl->Cancel (); @@ -794,7 +795,7 @@ RealtimeSimulatorImpl::IsExpired (const EventId &ev) const { return false; } - } + } return true; } @@ -853,7 +854,7 @@ RealtimeSimulatorImpl::GetSynchronizationMode (void) const NS_LOG_FUNCTION_NOARGS (); return m_synchronizationMode; } - + void RealtimeSimulatorImpl::SetHardLimit (Time limit) { @@ -867,5 +868,5 @@ RealtimeSimulatorImpl::GetHardLimit (void) const NS_LOG_FUNCTION_NOARGS (); return m_hardLimit; } - + }; // namespace ns3 diff --git a/src/core/model/ref-count-base.cc b/src/core/model/ref-count-base.cc index c89cc6a83..162f2faf0 100644 --- a/src/core/model/ref-count-base.cc +++ b/src/core/model/ref-count-base.cc @@ -3,6 +3,7 @@ namespace ns3 { RefCountBase::~RefCountBase () -{} +{ +} } // namespace ns3 diff --git a/src/core/model/rng-stream.cc b/src/core/model/rng-stream.cc index efcd06f49..1ef525878 100644 --- a/src/core/model/rng-stream.cc +++ b/src/core/model/rng-stream.cc @@ -42,52 +42,52 @@ const double fact = 5.9604644775390625e-8; /* 1 / 2^24 */ // (in matrix form), raised to the powers -1, 1, 2^76, and 2^127, resp. const double InvA1[3][3] = { // Inverse of A1p0 - { 184888585.0, 0.0, 1945170933.0 }, - { 1.0, 0.0, 0.0 }, - { 0.0, 1.0, 0.0 } - }; + { 184888585.0, 0.0, 1945170933.0 }, + { 1.0, 0.0, 0.0 }, + { 0.0, 1.0, 0.0 } +}; const double InvA2[3][3] = { // Inverse of A2p0 - { 0.0, 360363334.0, 4225571728.0 }, - { 1.0, 0.0, 0.0 }, - { 0.0, 1.0, 0.0 } - }; + { 0.0, 360363334.0, 4225571728.0 }, + { 1.0, 0.0, 0.0 }, + { 0.0, 1.0, 0.0 } +}; const double A1p0[3][3] = { - { 0.0, 1.0, 0.0 }, - { 0.0, 0.0, 1.0 }, - { -810728.0, 1403580.0, 0.0 } - }; + { 0.0, 1.0, 0.0 }, + { 0.0, 0.0, 1.0 }, + { -810728.0, 1403580.0, 0.0 } +}; const double A2p0[3][3] = { - { 0.0, 1.0, 0.0 }, - { 0.0, 0.0, 1.0 }, - { -1370589.0, 0.0, 527612.0 } - }; + { 0.0, 1.0, 0.0 }, + { 0.0, 0.0, 1.0 }, + { -1370589.0, 0.0, 527612.0 } +}; const double A1p76[3][3] = { - { 82758667.0, 1871391091.0, 4127413238.0 }, - { 3672831523.0, 69195019.0, 1871391091.0 }, - { 3672091415.0, 3528743235.0, 69195019.0 } - }; + { 82758667.0, 1871391091.0, 4127413238.0 }, + { 3672831523.0, 69195019.0, 1871391091.0 }, + { 3672091415.0, 3528743235.0, 69195019.0 } +}; const double A2p76[3][3] = { - { 1511326704.0, 3759209742.0, 1610795712.0 }, - { 4292754251.0, 1511326704.0, 3889917532.0 }, - { 3859662829.0, 4292754251.0, 3708466080.0 } - }; + { 1511326704.0, 3759209742.0, 1610795712.0 }, + { 4292754251.0, 1511326704.0, 3889917532.0 }, + { 3859662829.0, 4292754251.0, 3708466080.0 } +}; const double A1p127[3][3] = { - { 2427906178.0, 3580155704.0, 949770784.0 }, - { 226153695.0, 1230515664.0, 3580155704.0 }, - { 1988835001.0, 986791581.0, 1230515664.0 } - }; + { 2427906178.0, 3580155704.0, 949770784.0 }, + { 226153695.0, 1230515664.0, 3580155704.0 }, + { 1988835001.0, 986791581.0, 1230515664.0 } +}; const double A2p127[3][3] = { - { 1464411153.0, 277697599.0, 1610723613.0 }, - { 32183930.0, 1464411153.0, 1022607788.0 }, - { 2824425944.0, 32183930.0, 2093834863.0 } - }; + { 1464411153.0, 277697599.0, 1610723613.0 }, + { 32183930.0, 1464411153.0, 1022607788.0 }, + { 2824425944.0, 32183930.0, 2093834863.0 } +}; @@ -96,21 +96,21 @@ const double A2p127[3][3] = { // double MultModM (double a, double s, double c, double m) { - double v; - int32_t a1; + double v; + int32_t a1; - v = a * s + c; + v = a * s + c; - if (v >= two53 || v <= -two53) { - a1 = static_cast (a / two17); a -= a1 * two17; - v = a1 * s; - a1 = static_cast (v / m); v -= a1 * m; - v = v * two17 + a * s + c; + if (v >= two53 || v <= -two53) { + a1 = static_cast (a / two17); a -= a1 * two17; + v = a1 * s; + a1 = static_cast (v / m); v -= a1 * m; + v = v * two17 + a * s + c; } - a1 = static_cast (v / m); - /* in case v < 0)*/ - if ((v -= a1 * m) < 0.0) return v += m; else return v; + a1 = static_cast (v / m); + /* in case v < 0)*/ + if ((v -= a1 * m) < 0.0) return v += m;else return v; } @@ -121,16 +121,16 @@ double MultModM (double a, double s, double c, double m) void MatVecModM (const double A[3][3], const double s[3], double v[3], double m) { - int i; - double x[3]; // Necessary if v = s + int i; + double x[3]; // Necessary if v = s - for (i = 0; i < 3; ++i) { - x[i] = MultModM (A[i][0], s[0], 0.0, m); - x[i] = MultModM (A[i][1], s[1], x[i], m); - x[i] = MultModM (A[i][2], s[2], x[i], m); + for (i = 0; i < 3; ++i) { + x[i] = MultModM (A[i][0], s[0], 0.0, m); + x[i] = MultModM (A[i][1], s[1], x[i], m); + x[i] = MultModM (A[i][2], s[2], x[i], m); } - for (i = 0; i < 3; ++i) - v[i] = x[i]; + for (i = 0; i < 3; ++i) + v[i] = x[i]; } @@ -141,19 +141,19 @@ void MatVecModM (const double A[3][3], const double s[3], double v[3], void MatMatModM (const double A[3][3], const double B[3][3], double C[3][3], double m) { - int i, j; - double V[3], W[3][3]; + int i, j; + double V[3], W[3][3]; - for (i = 0; i < 3; ++i) { - for (j = 0; j < 3; ++j) - V[j] = B[j][i]; - MatVecModM (A, V, V, m); - for (j = 0; j < 3; ++j) - W[j][i] = V[j]; + for (i = 0; i < 3; ++i) { + for (j = 0; j < 3; ++j) + V[j] = B[j][i]; + MatVecModM (A, V, V, m); + for (j = 0; j < 3; ++j) + W[j][i] = V[j]; } - for (i = 0; i < 3; ++i) - for (j = 0; j < 3; ++j) - C[i][j] = W[i][j]; + for (i = 0; i < 3; ++i) + for (j = 0; j < 3; ++j) + C[i][j] = W[i][j]; } @@ -162,17 +162,17 @@ void MatMatModM (const double A[3][3], const double B[3][3], // void MatTwoPowModM (const double A[3][3], double B[3][3], double m, int32_t e) { - int i, j; + int i, j; - /* initialize: B = A */ - if (A != B) { + /* initialize: B = A */ + if (A != B) { for (i = 0; i < 3; ++i) - for (j = 0; j < 3; ++j) - B[i][j] = A[i][j]; - } - /* Compute B = A^(2^e) mod m */ - for (i = 0; i < e; i++) - MatMatModM (B, B, B, m); + for (j = 0; j < 3; ++j) + B[i][j] = A[i][j]; + } + /* Compute B = A^(2^e) mod m */ + for (i = 0; i < e; i++) + MatMatModM (B, B, B, m); } @@ -181,23 +181,23 @@ void MatTwoPowModM (const double A[3][3], double B[3][3], double m, int32_t e) // void MatPowModM (const double A[3][3], double B[3][3], double m, int32_t n) { - int i, j; - double W[3][3]; + int i, j; + double W[3][3]; - /* initialize: W = A; B = I */ - for (i = 0; i < 3; ++i) - for (j = 0; j < 3; ++j) { - W[i][j] = A[i][j]; - B[i][j] = 0.0; - } - for (j = 0; j < 3; ++j) - B[j][j] = 1.0; + /* initialize: W = A; B = I */ + for (i = 0; i < 3; ++i) + for (j = 0; j < 3; ++j) { + W[i][j] = A[i][j]; + B[i][j] = 0.0; + } + for (j = 0; j < 3; ++j) + B[j][j] = 1.0; - /* Compute B = A^n mod m using the binary decomposition of n */ - while (n > 0) { - if (n % 2) MatMatModM (W, B, B, m); - MatMatModM (W, W, W, m); - n /= 2; + /* Compute B = A^n mod m using the binary decomposition of n */ + while (n > 0) { + if (n % 2) MatMatModM (W, B, B, m); + MatMatModM (W, W, W, m); + n /= 2; } } @@ -214,33 +214,33 @@ static ns3::GlobalValue g_rngRun ("RngRun", } // end of anonymous namespace -namespace ns3{ +namespace ns3 { //------------------------------------------------------------------------- // Generate the next random number. // double RngStream::U01 () { - int32_t k; - double p1, p2, u; + int32_t k; + double p1, p2, u; - /* Component 1 */ - p1 = a12 * Cg[1] - a13n * Cg[0]; - k = static_cast (p1 / m1); - p1 -= k * m1; - if (p1 < 0.0) p1 += m1; - Cg[0] = Cg[1]; Cg[1] = Cg[2]; Cg[2] = p1; + /* Component 1 */ + p1 = a12 * Cg[1] - a13n * Cg[0]; + k = static_cast (p1 / m1); + p1 -= k * m1; + if (p1 < 0.0) p1 += m1; + Cg[0] = Cg[1]; Cg[1] = Cg[2]; Cg[2] = p1; - /* Component 2 */ - p2 = a21 * Cg[5] - a23n * Cg[3]; - k = static_cast (p2 / m2); - p2 -= k * m2; - if (p2 < 0.0) p2 += m2; - Cg[3] = Cg[4]; Cg[4] = Cg[5]; Cg[5] = p2; + /* Component 2 */ + p2 = a21 * Cg[5] - a23n * Cg[3]; + k = static_cast (p2 / m2); + p2 -= k * m2; + if (p2 < 0.0) p2 += m2; + Cg[3] = Cg[4]; Cg[4] = Cg[5]; Cg[5] = p2; - /* Combination */ - u = ((p1 > p2) ? (p1 - p2) * norm : (p1 - p2 + m1) * norm); + /* Combination */ + u = ((p1 > p2) ? (p1 - p2) * norm : (p1 - p2 + m1) * norm); - return (anti == false) ? u : (1 - u); + return (anti == false) ? u : (1 - u); } @@ -249,15 +249,15 @@ double RngStream::U01 () // double RngStream::U01d () { - double u; - u = U01(); - if (anti) { - // Don't forget that U01() returns 1 - u in the antithetic case - u += (U01() - 1.0) * fact; - return (u < 0.0) ? u + 1.0 : u; + double u; + u = U01(); + if (anti) { + // Don't forget that U01() returns 1 - u in the antithetic case + u += (U01() - 1.0) * fact; + return (u < 0.0) ? u + 1.0 : u; } else { - u += U01() * fact; - return (u < 1.0) ? u : (u - 1.0); + u += U01() * fact; + return (u < 1.0) ? u : (u - 1.0); } } @@ -267,38 +267,38 @@ double RngStream::U01d () // bool RngStream::CheckSeed (const uint32_t seed[6]) { - int i; + int i; - for (i = 0; i < 3; ++i) { - if (seed[i] >= m1) { - cerr << "****************************************\n\n" - << "ERROR: Seed[" << i << "] >= 4294967087, Seed is not set." - << "\n\n****************************************\n\n"; - return (false); + for (i = 0; i < 3; ++i) { + if (seed[i] >= m1) { + cerr << "****************************************\n\n" + << "ERROR: Seed[" << i << "] >= 4294967087, Seed is not set." + << "\n\n****************************************\n\n"; + return (false); } } - for (i = 3; i < 6; ++i) { - if (seed[i] >= m2) { - cerr << "Seed[" << i << "] = " << seed[i] << endl; + for (i = 3; i < 6; ++i) { + if (seed[i] >= m2) { + cerr << "Seed[" << i << "] = " << seed[i] << endl; cerr << "*****************************************\n\n" << "ERROR: Seed[" << i << "] >= 4294944443, Seed is not set." << "\n\n*****************************************\n\n"; return (false); } } - if (seed[0] == 0 && seed[1] == 0 && seed[2] == 0) { - cerr << "****************************\n\n" - << "ERROR: First 3 seeds = 0.\n\n" - << "****************************\n\n"; - return (false); + if (seed[0] == 0 && seed[1] == 0 && seed[2] == 0) { + cerr << "****************************\n\n" + << "ERROR: First 3 seeds = 0.\n\n" + << "****************************\n\n"; + return (false); } - if (seed[3] == 0 && seed[4] == 0 && seed[5] == 0) { - cerr << "****************************\n\n" - << "ERROR: Last 3 seeds = 0.\n\n" - << "****************************\n\n"; - return (false); + if (seed[3] == 0 && seed[4] == 0 && seed[5] == 0) { + cerr << "****************************\n\n" + << "ERROR: Last 3 seeds = 0.\n\n" + << "****************************\n\n"; + return (false); } - return true; + return true; } uint32_t @@ -340,7 +340,7 @@ double RngStream::nextSeed[6] = RngStream::RngStream () { uint32_t run = EnsureGlobalInitialized (); - + anti = false; incPrec = false; // Stream initialization moved to separate method. @@ -354,12 +354,12 @@ RngStream::RngStream(const RngStream& r) anti = r.anti; incPrec = r.incPrec; for (int i = 0; i < 6; ++i) { - Cg[i] = r.Cg[i]; - Bg[i] = r.Bg[i]; - Ig[i] = r.Ig[i]; - } + Cg[i] = r.Cg[i]; + Bg[i] = r.Bg[i]; + Ig[i] = r.Ig[i]; + } } - + void RngStream::InitializeStream() { // Moved from the RngStream constructor above to allow seeding @@ -373,8 +373,8 @@ void RngStream::InitializeStream() will be the seed of the next declared RngStream. */ for (int i = 0; i < 6; ++i) { - Bg[i] = Cg[i] = Ig[i] = nextSeed[i]; - } + Bg[i] = Cg[i] = Ig[i] = nextSeed[i]; + } MatVecModM (A1p127, nextSeed, nextSeed, m1); MatVecModM (A2p127, &nextSeed[3], &nextSeed[3], m2); @@ -417,10 +417,10 @@ void RngStream::ResetNextSubstream () void RngStream::ResetNthSubstream (uint32_t N) { if(N==0) return; - for(uint32_t i=0;i 0) { - MatTwoPowModM (A1p0, B1, m1, e); - MatTwoPowModM (A2p0, B2, m2, e); + if (e > 0) { + MatTwoPowModM (A1p0, B1, m1, e); + MatTwoPowModM (A2p0, B2, m2, e); } else if (e < 0) { - MatTwoPowModM (InvA1, B1, m1, -e); - MatTwoPowModM (InvA2, B2, m2, -e); + MatTwoPowModM (InvA1, B1, m1, -e); + MatTwoPowModM (InvA2, B2, m2, -e); } - if (c >= 0) { - MatPowModM (A1p0, C1, m1, c); - MatPowModM (A2p0, C2, m2, c); + if (c >= 0) { + MatPowModM (A1p0, C1, m1, c); + MatPowModM (A2p0, C2, m2, c); } else { - MatPowModM (InvA1, C1, m1, -c); - MatPowModM (InvA2, C2, m2, -c); + MatPowModM (InvA1, C1, m1, -c); + MatPowModM (InvA2, C2, m2, -c); } - if (e) { - MatMatModM (B1, C1, C1, m1); - MatMatModM (B2, C2, C2, m2); + if (e) { + MatMatModM (B1, C1, C1, m1); + MatMatModM (B2, C2, C2, m2); } - MatVecModM (C1, Cg, Cg, m1); - MatVecModM (C2, &Cg[3], &Cg[3], m2); + MatVecModM (C1, Cg, Cg, m1); + MatVecModM (C2, &Cg[3], &Cg[3], m2); } //------------------------------------------------------------------------- void RngStream::GetState (uint32_t seed[6]) const { - for (int i = 0; i < 6; ++i) - seed[i] = static_cast (Cg[i]); + for (int i = 0; i < 6; ++i) + seed[i] = static_cast (Cg[i]); } //------------------------------------------------------------------------- void RngStream::IncreasedPrecis (bool incp) { - incPrec = incp; + incPrec = incp; } //------------------------------------------------------------------------- void RngStream::SetAntithetic (bool a) { - anti = a; + anti = a; } @@ -547,10 +547,10 @@ void RngStream::SetAntithetic (bool a) // double RngStream::RandU01 () { - if (incPrec) - return U01d(); - else - return U01(); + if (incPrec) + return U01d(); + else + return U01(); } @@ -559,7 +559,7 @@ double RngStream::RandU01 () // int32_t RngStream::RandInt (int32_t low, int32_t high) { - return low + static_cast ((high - low + 1) * RandU01 ()); + return low + static_cast ((high - low + 1) * RandU01 ()); }; } //namespace ns3 diff --git a/src/core/model/rng-stream.h b/src/core/model/rng-stream.h index 19f6a787f..f698db9fc 100644 --- a/src/core/model/rng-stream.h +++ b/src/core/model/rng-stream.h @@ -33,7 +33,7 @@ namespace ns3 { * This class is the combined multiple-recursive random number * generator called MRG32k3a. The ns3::RandomVariableBase class * holds a static instance of this class. The details of this - * class are explained in: + * class are explained in: * http://www.iro.umontreal.ca/~lecuyer/myftp/papers/streams00.pdf */ class RngStream { diff --git a/src/core/model/scheduler.h b/src/core/model/scheduler.h index 96a0e8696..a78c070e1 100644 --- a/src/core/model/scheduler.h +++ b/src/core/model/scheduler.h @@ -29,7 +29,7 @@ namespace ns3 { class EventImpl; /** - * \ingroup simulator + * \ingroup core * \defgroup scheduler Scheduler */ /** diff --git a/src/core/model/simple-ref-count.h b/src/core/model/simple-ref-count.h index 8de374613..ed0d42488 100644 --- a/src/core/model/simple-ref-count.h +++ b/src/core/model/simple-ref-count.h @@ -97,7 +97,7 @@ public: } /** - * Get the reference count of the object. + * Get the reference count of the object. * Normally not needed; for language bindings. */ inline uint32_t GetReferenceCount (void) const diff --git a/src/core/model/simulation-singleton.h b/src/core/model/simulation-singleton.h index 8aa69a66f..8269e780f 100644 --- a/src/core/model/simulation-singleton.h +++ b/src/core/model/simulation-singleton.h @@ -45,7 +45,7 @@ private: static void DeleteObject (void); }; -}//namespace ns3 +} //namespace ns3 #include "simulator.h" diff --git a/src/core/model/simulator-impl.cc b/src/core/model/simulator-impl.cc index f65ccfd19..85db1c4ef 100644 --- a/src/core/model/simulator-impl.cc +++ b/src/core/model/simulator-impl.cc @@ -7,7 +7,7 @@ SimulatorImpl::GetTypeId (void) { static TypeId tid = TypeId ("ns3::SimulatorImpl") .SetParent () - ; + ; return tid; } diff --git a/src/core/model/simulator.cc b/src/core/model/simulator.cc index e517efaa0..729dc52a7 100644 --- a/src/core/model/simulator.cc +++ b/src/core/model/simulator.cc @@ -42,14 +42,14 @@ NS_LOG_COMPONENT_DEFINE ("Simulator"); namespace ns3 { GlobalValue g_simTypeImpl = GlobalValue ("SimulatorImplementationType", - "The object class to use as the simulator implementation", - StringValue ("ns3::DefaultSimulatorImpl"), - MakeStringChecker ()); + "The object class to use as the simulator implementation", + StringValue ("ns3::DefaultSimulatorImpl"), + MakeStringChecker ()); GlobalValue g_schedTypeImpl = GlobalValue ("SchedulerType", - "The object class to use as the scheduler implementation", - TypeIdValue (MapScheduler::GetTypeId ()), - MakeTypeIdChecker ()); + "The object class to use as the scheduler implementation", + TypeIdValue (MapScheduler::GetTypeId ()), + MakeTypeIdChecker ()); static void TimePrinter (std::ostream &os) @@ -87,7 +87,7 @@ static SimulatorImpl * GetImpl (void) { ObjectFactory factory; StringValue s; - + g_simTypeImpl.GetValue (s); factory.SetTypeId (s.Get ()); *pimpl = GetPointer (factory.Create ()); @@ -242,28 +242,28 @@ Simulator::DoScheduleDestroy (EventImpl *impl) EventId -Simulator::Schedule (Time const &time, void (*f) (void)) +Simulator::Schedule (Time const &time, void (*f)(void)) { NS_LOG_FUNCTION (time << f); return DoSchedule (time, MakeEvent (f)); } void -Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f) (void)) +Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f)(void)) { NS_LOG_FUNCTION (time << context << f); return ScheduleWithContext (context, time, MakeEvent (f)); } EventId -Simulator::ScheduleNow (void (*f) (void)) +Simulator::ScheduleNow (void (*f)(void)) { NS_LOG_FUNCTION (f); return DoScheduleNow (MakeEvent (f)); } EventId -Simulator::ScheduleDestroy (void (*f) (void)) +Simulator::ScheduleDestroy (void (*f)(void)) { NS_LOG_FUNCTION (f); return DoScheduleDestroy (MakeEvent (f)); diff --git a/src/core/model/simulator.h b/src/core/model/simulator.h index a9a4dc5fb..c0d008d6d 100644 --- a/src/core/model/simulator.h +++ b/src/core/model/simulator.h @@ -38,7 +38,7 @@ class SimulatorImpl; class Scheduler; /** - * \ingroup simulator + * \ingroup core * * \brief Control the scheduling of simulation events. * @@ -146,7 +146,7 @@ public: * parameter * * When the event expires (when it becomes due to be run), the - * input method will be invoked on the input object. + * input method will be invoked on the input object. * * @param time the relative expiration time of the event. * @param mem_ptr member method pointer to invoke @@ -224,7 +224,7 @@ public: * @param f the function to invoke * @returns an id for the scheduled event. */ - static EventId Schedule (Time const &time, void (*f) (void)); + static EventId Schedule (Time const &time, void (*f)(void)); /** * @param time the relative expiration time of the event. @@ -233,7 +233,7 @@ public: * @returns an id for the scheduled event. */ template - static EventId Schedule (Time const &time, void (*f) (U1), T1 a1); + static EventId Schedule (Time const &time, void (*f)(U1), T1 a1); /** * @param time the relative expiration time of the event. @@ -243,7 +243,7 @@ public: * @returns an id for the scheduled event. */ template - static EventId Schedule (Time const &time, void (*f) (U1,U2), T1 a1, T2 a2); + static EventId Schedule (Time const &time, void (*f)(U1,U2), T1 a1, T2 a2); /** * @param time the relative expiration time of the event. @@ -254,7 +254,7 @@ public: * @returns an id for the scheduled event. */ template - static EventId Schedule (Time const &time, void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3); + static EventId Schedule (Time const &time, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3); /** * @param time the relative expiration time of the event. @@ -267,7 +267,7 @@ public: */ template - static EventId Schedule (Time const &time, void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); + static EventId Schedule (Time const &time, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); /** * @param time the relative expiration time of the event. @@ -281,7 +281,7 @@ public: */ template - static EventId Schedule (Time const &time, void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); + static EventId Schedule (Time const &time, void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); /** * Schedule an event with the given context. @@ -357,13 +357,13 @@ public: template static void ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, - T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); + T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); /** * @param time the relative expiration time of the event. * @param context user-specified context parameter * @param f the function to invoke */ - static void ScheduleWithContext (uint32_t context, Time const &time, void (*f) (void)); + static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(void)); /** * @param time the relative expiration time of the event. @@ -372,7 +372,7 @@ public: * @param a1 the first argument to pass to the function to invoke */ template - static void ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1), T1 a1); + static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1), T1 a1); /** * @param time the relative expiration time of the event. @@ -382,7 +382,7 @@ public: * @param a2 the second argument to pass to the function to invoke */ template - static void ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1,U2), T1 a1, T2 a2); + static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2), T1 a1, T2 a2); /** * @param time the relative expiration time of the event. @@ -393,7 +393,7 @@ public: * @param a3 the third argument to pass to the function to invoke */ template - static void ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3); + static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3); /** * @param time the relative expiration time of the event. @@ -406,7 +406,7 @@ public: */ template - static void ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); + static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); /** * @param time the relative expiration time of the event. @@ -420,7 +420,7 @@ public: */ template - static void ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); + static void ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); /** * Schedule an event to expire Now. All events scheduled to @@ -491,7 +491,7 @@ public: /** * @param f the function to invoke */ - static EventId ScheduleNow (void (*f) (void)); + static EventId ScheduleNow (void (*f)(void)); /** * @param f the function to invoke @@ -499,7 +499,7 @@ public: */ template - static EventId ScheduleNow (void (*f) (U1), T1 a1); + static EventId ScheduleNow (void (*f)(U1), T1 a1); /** * @param f the function to invoke @@ -508,7 +508,7 @@ public: */ template - static EventId ScheduleNow (void (*f) (U1,U2), T1 a1, T2 a2); + static EventId ScheduleNow (void (*f)(U1,U2), T1 a1, T2 a2); /** * @param f the function to invoke @@ -518,7 +518,7 @@ public: */ template - static EventId ScheduleNow (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3); + static EventId ScheduleNow (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3); /** * @param f the function to invoke @@ -529,7 +529,7 @@ public: */ template - static EventId ScheduleNow (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); + static EventId ScheduleNow (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); /** * @param f the function to invoke @@ -541,7 +541,7 @@ public: */ template - static EventId ScheduleNow (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); + static EventId ScheduleNow (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); /** * Schedule an event to expire at Destroy time. All events @@ -613,7 +613,7 @@ public: /** * @param f the function to invoke */ - static EventId ScheduleDestroy (void (*f) (void)); + static EventId ScheduleDestroy (void (*f)(void)); /** * @param f the function to invoke @@ -621,7 +621,7 @@ public: */ template - static EventId ScheduleDestroy (void (*f) (U1), T1 a1); + static EventId ScheduleDestroy (void (*f)(U1), T1 a1); /** * @param f the function to invoke @@ -630,7 +630,7 @@ public: */ template - static EventId ScheduleDestroy (void (*f) (U1,U2), T1 a1, T2 a2); + static EventId ScheduleDestroy (void (*f)(U1,U2), T1 a1, T2 a2); /** * @param f the function to invoke @@ -640,7 +640,7 @@ public: */ template - static EventId ScheduleDestroy (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3); + static EventId ScheduleDestroy (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3); /** * @param f the function to invoke @@ -651,7 +651,7 @@ public: */ template - static EventId ScheduleDestroy (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); + static EventId ScheduleDestroy (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4); /** * @param f the function to invoke @@ -663,7 +663,7 @@ public: */ template - static EventId ScheduleDestroy (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); + static EventId ScheduleDestroy (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5); /** * Remove an event from the event list. @@ -740,7 +740,7 @@ public: * This method will be typically used by language bindings * to delegate events to their own subclass of the EventImpl base class. */ - static EventId Schedule (Time const &time, const Ptr &event); + static EventId Schedule (Time const &time, const Ptr &event); /** * \param time delay until the event expires @@ -780,7 +780,7 @@ private: Simulator (); ~Simulator (); - static EventId DoSchedule (Time const &time, EventImpl *event); + static EventId DoSchedule (Time const &time, EventImpl *event); static EventId DoScheduleNow (EventImpl *event); static EventId DoScheduleDestroy (EventImpl *event); }; @@ -846,35 +846,35 @@ EventId Simulator::Schedule (Time const &time, MEM mem_ptr, OBJ obj, } template -EventId Simulator::Schedule (Time const &time, void (*f) (U1), T1 a1) +EventId Simulator::Schedule (Time const &time, void (*f)(U1), T1 a1) { return DoSchedule (time, MakeEvent (f, a1)); } template -EventId Simulator::Schedule (Time const &time, void (*f) (U1,U2), T1 a1, T2 a2) +EventId Simulator::Schedule (Time const &time, void (*f)(U1,U2), T1 a1, T2 a2) { return DoSchedule (time, MakeEvent (f, a1, a2)); } template -EventId Simulator::Schedule (Time const &time, void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) +EventId Simulator::Schedule (Time const &time, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) { return DoSchedule (time, MakeEvent (f, a1, a2, a3)); } template -EventId Simulator::Schedule (Time const &time, void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) +EventId Simulator::Schedule (Time const &time, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) { return DoSchedule (time, MakeEvent (f, a1, a2, a3, a4)); } template -EventId Simulator::Schedule (Time const &time, void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) +EventId Simulator::Schedule (Time const &time, void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { return DoSchedule (time, MakeEvent (f, a1, a2, a3, a4, a5)); } @@ -920,41 +920,41 @@ void Simulator::ScheduleWithContext (uint32_t context, Time const &time, MEM mem template void Simulator::ScheduleWithContext (uint32_t context, Time const &time, MEM mem_ptr, OBJ obj, - T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) + T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { return ScheduleWithContext (context, time, MakeEvent (mem_ptr, obj, a1, a2, a3, a4, a5)); } template -void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1), T1 a1) +void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1), T1 a1) { return ScheduleWithContext (context, time, MakeEvent (f, a1)); } template -void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1,U2), T1 a1, T2 a2) +void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2), T1 a1, T2 a2) { return ScheduleWithContext (context, time, MakeEvent (f, a1, a2)); } template -void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) +void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) { return ScheduleWithContext (context, time, MakeEvent (f, a1, a2, a3)); } template -void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) +void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) { return ScheduleWithContext (context, time, MakeEvent (f, a1, a2, a3, a4)); } template -void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) +void Simulator::ScheduleWithContext (uint32_t context, Time const &time, void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { return ScheduleWithContext (context, time, MakeEvent (f, a1, a2, a3, a4, a5)); } @@ -1014,7 +1014,7 @@ Simulator::ScheduleNow (MEM mem_ptr, OBJ obj, template EventId -Simulator::ScheduleNow (void (*f) (U1), T1 a1) +Simulator::ScheduleNow (void (*f)(U1), T1 a1) { return DoScheduleNow (MakeEvent (f, a1)); } @@ -1022,7 +1022,7 @@ Simulator::ScheduleNow (void (*f) (U1), T1 a1) template EventId -Simulator::ScheduleNow (void (*f) (U1,U2), T1 a1, T2 a2) +Simulator::ScheduleNow (void (*f)(U1,U2), T1 a1, T2 a2) { return DoScheduleNow (MakeEvent (f, a1, a2)); } @@ -1030,7 +1030,7 @@ Simulator::ScheduleNow (void (*f) (U1,U2), T1 a1, T2 a2) template EventId -Simulator::ScheduleNow (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) +Simulator::ScheduleNow (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) { return DoScheduleNow (MakeEvent (f, a1, a2, a3)); } @@ -1038,7 +1038,7 @@ Simulator::ScheduleNow (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) template EventId -Simulator::ScheduleNow (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) +Simulator::ScheduleNow (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) { return DoScheduleNow (MakeEvent (f, a1, a2, a3, a4)); } @@ -1046,7 +1046,7 @@ Simulator::ScheduleNow (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) template EventId -Simulator::ScheduleNow (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) +Simulator::ScheduleNow (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { return DoScheduleNow (MakeEvent (f, a1, a2, a3, a4, a5)); } @@ -1105,7 +1105,7 @@ Simulator::ScheduleDestroy (MEM mem_ptr, OBJ obj, template EventId -Simulator::ScheduleDestroy (void (*f) (U1), T1 a1) +Simulator::ScheduleDestroy (void (*f)(U1), T1 a1) { return DoScheduleDestroy (MakeEvent (f, a1)); } @@ -1113,7 +1113,7 @@ Simulator::ScheduleDestroy (void (*f) (U1), T1 a1) template EventId -Simulator::ScheduleDestroy (void (*f) (U1,U2), T1 a1, T2 a2) +Simulator::ScheduleDestroy (void (*f)(U1,U2), T1 a1, T2 a2) { return DoScheduleDestroy (MakeEvent (f, a1, a2)); } @@ -1121,7 +1121,7 @@ Simulator::ScheduleDestroy (void (*f) (U1,U2), T1 a1, T2 a2) template EventId -Simulator::ScheduleDestroy (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) +Simulator::ScheduleDestroy (void (*f)(U1,U2,U3), T1 a1, T2 a2, T3 a3) { return DoScheduleDestroy (MakeEvent (f, a1, a2, a3)); } @@ -1129,7 +1129,7 @@ Simulator::ScheduleDestroy (void (*f) (U1,U2,U3), T1 a1, T2 a2, T3 a3) template EventId -Simulator::ScheduleDestroy (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) +Simulator::ScheduleDestroy (void (*f)(U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) { return DoScheduleDestroy (MakeEvent (f, a1, a2, a3, a4)); } @@ -1137,7 +1137,7 @@ Simulator::ScheduleDestroy (void (*f) (U1,U2,U3,U4), T1 a1, T2 a2, T3 a3, T4 a4) template EventId -Simulator::ScheduleDestroy (void (*f) (U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) +Simulator::ScheduleDestroy (void (*f)(U1,U2,U3,U4,U5), T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { return DoScheduleDestroy (MakeEvent (f, a1, a2, a3, a4, a5)); } diff --git a/src/core/model/synchronizer.cc b/src/core/model/synchronizer.cc index a28758191..f272b5604 100644 --- a/src/core/model/synchronizer.cc +++ b/src/core/model/synchronizer.cc @@ -27,7 +27,7 @@ Synchronizer::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Synchronizer") .SetParent () - ; + ; return tid; } @@ -40,32 +40,32 @@ Synchronizer::~Synchronizer () { } - bool +bool Synchronizer::Realtime (void) { return DoRealtime (); } - uint64_t +uint64_t Synchronizer::GetCurrentRealtime (void) { return NanosecondToTimeStep (DoGetCurrentRealtime ()); } - void +void Synchronizer::SetOrigin (uint64_t ts) { m_simOriginNano = TimeStepToNanosecond (ts); DoSetOrigin (m_simOriginNano); } - uint64_t +uint64_t Synchronizer::GetOrigin (void) { return NanosecondToTimeStep (m_simOriginNano); } - int64_t +int64_t Synchronizer::GetDrift (uint64_t ts) { int64_t tDrift = DoGetDrift (TimeStepToNanosecond (ts)); @@ -75,47 +75,47 @@ Synchronizer::GetDrift (uint64_t ts) return -NanosecondToTimeStep (-tDrift); } else { return NanosecondToTimeStep (tDrift); - } + } } - bool +bool Synchronizer::Synchronize (uint64_t tsCurrent, uint64_t tsDelay) { return DoSynchronize (TimeStepToNanosecond (tsCurrent), - TimeStepToNanosecond (tsDelay)); + TimeStepToNanosecond (tsDelay)); } - void +void Synchronizer::Signal (void) { DoSignal (); } - void +void Synchronizer::SetCondition (bool cond) { DoSetCondition (cond); } - void +void Synchronizer::EventStart (void) { DoEventStart (); } - uint64_t +uint64_t Synchronizer::EventEnd (void) { return NanosecondToTimeStep (DoEventEnd ()); } - uint64_t +uint64_t Synchronizer::TimeStepToNanosecond (uint64_t ts) { return TimeStep (ts).GetNanoSeconds (); } - uint64_t +uint64_t Synchronizer::NanosecondToTimeStep (uint64_t ns) { return NanoSeconds (ns).GetTimeStep (); diff --git a/src/core/model/system-condition.h b/src/core/model/system-condition.h index 82e6c3fd6..2cfbe83c2 100644 --- a/src/core/model/system-condition.h +++ b/src/core/model/system-condition.h @@ -85,7 +85,7 @@ public: void Broadcast (void); /** - * Wait, possibly forever, for the condition to be true. + * Wait, possibly forever, for the condition to be true. */ void Wait (void); @@ -98,7 +98,7 @@ public: private: - SystemConditionPrivate * m_priv; + SystemConditionPrivate * m_priv; }; } //namespace ns3 diff --git a/src/core/model/system-mutex.h b/src/core/model/system-mutex.h index 95dbe484f..7fc298c40 100644 --- a/src/core/model/system-mutex.h +++ b/src/core/model/system-mutex.h @@ -64,7 +64,7 @@ public: void Unlock (); private: - SystemMutexPrivate * m_priv; + SystemMutexPrivate * m_priv; }; /** diff --git a/src/core/model/system-thread.h b/src/core/model/system-thread.h index ff7dbba14..55038017c 100644 --- a/src/core/model/system-thread.h +++ b/src/core/model/system-thread.h @@ -154,7 +154,7 @@ public: * * It is often the case that we want a thread to be off doing work until such * time as its job is done. We then want the thread to exit itself. This - * method allows a thread to query whether or not it should be running. + * method allows a thread to query whether or not it should be running. * Typically, the worker thread is running in a forever-loop, and will need to * "break" out of that loop to exit -- thus the name. * diff --git a/src/core/model/test.cc b/src/core/model/test.cc index 56b0e90d4..d863812bb 100644 --- a/src/core/model/test.cc +++ b/src/core/model/test.cc @@ -36,7 +36,7 @@ std::string ReplaceXmlSpecialCharacters (std::string xml) { std::string specials = "<>&\"'"; - std::string replacements[] = {"<", ">", "&", "'", """}; + std::string replacements[] = { "<", ">", "&", "'", """}; std::string result; std::size_t index, length = xml.length (); @@ -385,8 +385,8 @@ TestCase::DoReportEnd (void) const double MS_PER_SEC = 1000.; *m_ofs << " " << "real " << m_msClock.GetElapsedReal () / MS_PER_SEC - << " user " << m_msClock.GetElapsedUser () / MS_PER_SEC - << " system " << m_msClock.GetElapsedSystem () / MS_PER_SEC + << " user " << m_msClock.GetElapsedUser () / MS_PER_SEC + << " system " << m_msClock.GetElapsedSystem () / MS_PER_SEC << "" << std::endl; *m_ofs << " " << std::endl; @@ -604,7 +604,7 @@ void TestSuite::DoReportStart (void) { m_msClock.Start (); - + if (m_ofs == 0) { return; @@ -637,7 +637,7 @@ void TestSuite::DoReportEnd (void) { m_msClock.End (); - + if (m_ofs == 0) { return; @@ -649,8 +649,8 @@ TestSuite::DoReportEnd (void) const double MS_PER_SEC = 1000.; *m_ofs << " " << "real " << m_msClock.GetElapsedReal () / MS_PER_SEC - << " user " << m_msClock.GetElapsedUser () / MS_PER_SEC - << " system " << m_msClock.GetElapsedSystem () / MS_PER_SEC + << " user " << m_msClock.GetElapsedUser () / MS_PER_SEC + << " system " << m_msClock.GetElapsedSystem () / MS_PER_SEC << "" << std::endl; *m_ofs << "" << std::endl; diff --git a/src/core/model/test.h b/src/core/model/test.h index d719b4b98..098b51136 100644 --- a/src/core/model/test.h +++ b/src/core/model/test.h @@ -60,23 +60,23 @@ extern bool gBreakOnFailure; */ #define NS_TEST_ASSERT_MSG_EQ_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) == (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) == " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - if (!ContinueOnFailure ()) \ - { \ - return; \ - } \ - } \ - } while (false) + if (!((actual) == (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReportTestFailure (std::string (# actual) + " (actual) == " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + if (!ContinueOnFailure ()) \ + { \ + return; \ + } \ + } \ + } while (false) /** * \brief Test that an actual and expected (limit) value are equal and report @@ -112,23 +112,23 @@ extern bool gBreakOnFailure; */ #define NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) == (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) == " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - if (!ContinueOnFailure ()) \ - { \ - return true; \ - } \ - } \ - } while (false) + if (!((actual) == (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReportTestFailure (std::string (# actual) + " (actual) == " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + if (!ContinueOnFailure ()) \ + { \ + return true; \ + } \ + } \ + } while (false) /** * \brief Test that an actual and expected (limit) value are equal and report @@ -170,19 +170,19 @@ extern bool gBreakOnFailure; */ #define NS_TEST_EXPECT_MSG_EQ_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) == (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) == " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - } \ - } while (false) + if (!((actual) == (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReportTestFailure (std::string (# actual) + " (actual) == " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + } \ + } while (false) /** * \brief Test that an actual and expected (limit) value are equal and report @@ -223,25 +223,25 @@ extern bool gBreakOnFailure; */ #define NS_TEST_ASSERT_MSG_EQ_TOL_INTERNAL(actual, limit, tol, msg, file, line) \ do { \ - if ((actual) > (limit) + (tol) || (actual) < (limit) - (tol)) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit << " +- " << tol; \ - std::ostringstream condStream; \ - condStream << #actual << " (actual) < " << #limit << " (limit) + " << #tol << " (tol) && " << \ - #actual << " (actual) > " << #limit << " (limit) - " << #tol << " (tol)"; \ - ReportTestFailure (condStream.str (), actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - if (!ContinueOnFailure ()) \ - { \ - return; \ - } \ - } \ - } while (false) + if ((actual) > (limit) + (tol) || (actual) < (limit) - (tol)) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit << " +- " << tol; \ + std::ostringstream condStream; \ + condStream << # actual << " (actual) < " << # limit << " (limit) + " << # tol << " (tol) && " << \ + # actual << " (actual) > " << # limit << " (limit) - " << # tol << " (tol)"; \ + ReportTestFailure (condStream.str (), actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + if (!ContinueOnFailure ()) \ + { \ + return; \ + } \ + } \ + } while (false) /** * \brief Test that actual and expected (limit) values are equal to plus or minus @@ -299,25 +299,25 @@ extern bool gBreakOnFailure; */ #define NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL_INTERNAL(actual, limit, tol, msg, file, line) \ do { \ - if ((actual) > (limit) + (tol) || (actual) < (limit) - (tol)) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit << " +- " << tol; \ - std::ostringstream condStream; \ - condStream << #actual << " (actual) < " << #limit << " (limit) + " << #tol << " (tol) && " << \ - #actual << " (actual) > " << #limit << " (limit) - " << #tol << " (tol)"; \ - ReportTestFailure (condStream.str (), actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - if (!ContinueOnFailure ()) \ - { \ - return true; \ - } \ - } \ - } while (false) + if ((actual) > (limit) + (tol) || (actual) < (limit) - (tol)) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit << " +- " << tol; \ + std::ostringstream condStream; \ + condStream << # actual << " (actual) < " << # limit << " (limit) + " << # tol << " (tol) && " << \ + # actual << " (actual) > " << # limit << " (limit) - " << # tol << " (tol)"; \ + ReportTestFailure (condStream.str (), actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + if (!ContinueOnFailure ()) \ + { \ + return true; \ + } \ + } \ + } while (false) /** * \brief Test that actual and expected (limit) values are equal to plus or minus @@ -381,21 +381,21 @@ extern bool gBreakOnFailure; */ #define NS_TEST_EXPECT_MSG_EQ_TOL_INTERNAL(actual, limit, tol, msg, file, line) \ do { \ - if ((actual) > (limit) + (tol) || (actual) < (limit) - (tol)) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit << " +- " << tol; \ - std::ostringstream condStream; \ - condStream << #actual << " (actual) < " << #limit << " (limit) + " << #tol << " (tol) && " << \ - #actual << " (actual) > " << #limit << " (limit) - " << #tol << " (tol)"; \ - ReportTestFailure (condStream.str (), actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - } \ - } while (false) + if ((actual) > (limit) + (tol) || (actual) < (limit) - (tol)) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit << " +- " << tol; \ + std::ostringstream condStream; \ + condStream << # actual << " (actual) < " << # limit << " (limit) + " << # tol << " (tol) && " << \ + # actual << " (actual) > " << # limit << " (limit) - " << # tol << " (tol)"; \ + ReportTestFailure (condStream.str (), actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + } \ + } while (false) /** * \brief Test that actual and expected (limit) values are equal to plus or minus @@ -457,23 +457,23 @@ extern bool gBreakOnFailure; */ #define NS_TEST_ASSERT_MSG_NE_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) != (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) != " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - if (!ContinueOnFailure ()) \ - { \ - return; \ - } \ - } \ - } while (false) + if (!((actual) != (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReportTestFailure (std::string (# actual) + " (actual) != " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + if (!ContinueOnFailure ()) \ + { \ + return; \ + } \ + } \ + } while (false) /** * \brief Test that an actual and expected (limit) value are equal and report @@ -508,23 +508,23 @@ extern bool gBreakOnFailure; */ #define NS_TEST_ASSERT_MSG_NE_RETURNS_BOOL_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) != (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) != " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - if (!ContinueOnFailure ()) \ - { \ - return true; \ - } \ - } \ - } while (false) + if (!((actual) != (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReportTestFailure (std::string (# actual) + " (actual) != " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + if (!ContinueOnFailure ()) \ + { \ + return true; \ + } \ + } \ + } while (false) /** * \brief Test that an actual and expected (limit) value are equal and report @@ -565,19 +565,19 @@ extern bool gBreakOnFailure; */ #define NS_TEST_EXPECT_MSG_NE_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) != (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) != " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - } \ - } while (false) + if (!((actual) != (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReportTestFailure (std::string (# actual) + " (actual) != " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + } \ + } while (false) /** * \brief Test that an actual and expected (limit) value are equal and report @@ -616,23 +616,23 @@ extern bool gBreakOnFailure; */ #define NS_TEST_ASSERT_MSG_LT_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) < (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) < " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - if (!ContinueOnFailure ()) \ - { \ - return; \ - } \ - } \ - } while (false) + if (!((actual) < (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReportTestFailure (std::string (# actual) + " (actual) < " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + if (!ContinueOnFailure ()) \ + { \ + return; \ + } \ + } \ + } while (false) /** * \brief Test that an actual value is less than a limit and report and abort @@ -660,19 +660,19 @@ extern bool gBreakOnFailure; */ #define NS_TEST_EXPECT_MSG_LT_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) < (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) < " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - } \ - } while (false) + if (!((actual) < (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReportTestFailure (std::string (# actual) + " (actual) < " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + } \ + } while (false) /** * \brief Test that an actual value is less than a limit and report if not. @@ -700,23 +700,23 @@ extern bool gBreakOnFailure; */ #define NS_TEST_ASSERT_MSG_GT_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) > (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReportTestFailure (std::string (#actual) + " (actual) > " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - if (!ContinueOnFailure ()) \ - { \ - return; \ - } \ - } \ - } while (false) + if (!((actual) > (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReportTestFailure (std::string (# actual) + " (actual) > " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + if (!ContinueOnFailure ()) \ + { \ + return; \ + } \ + } \ + } while (false) /** * \brief Test that an actual value is greater than a limit and report and abort @@ -744,19 +744,19 @@ extern bool gBreakOnFailure; */ #define NS_TEST_EXPECT_MSG_GT_INTERNAL(actual, limit, msg, file, line) \ do { \ - if (!((actual) > (limit))) \ - { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream limitStream; \ - limitStream << limit; \ - ReporTesttFailure (std::string (#actual) + " (actual) > " + std::string (#limit) + " (limit)", \ - actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ - } \ - } while (false) + if (!((actual) > (limit))) \ + { \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream limitStream; \ + limitStream << limit; \ + ReporTesttFailure (std::string (# actual) + " (actual) > " + std::string (# limit) + " (limit)", \ + actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ + } \ + } while (false) /** * \brief Test that an actual value is greater than a limit and report if not. @@ -795,7 +795,7 @@ namespace ns3 { * \param epsilon The second of double precision floating point numberss to compare * \returns Returns true if the doubles are equal to a precision defined by epsilon */ - bool TestDoubleIsEqual (const double a, const double b, const double epsilon = std::numeric_limits::epsilon ()); +bool TestDoubleIsEqual (const double a, const double b, const double epsilon = std::numeric_limits::epsilon ()); /** * \brief A single test case. @@ -843,7 +843,7 @@ public: /** * \brief Get the name of this test case. */ - std::string GetName (void); + std::string GetName (void); /** * \brief Set the base directory of the ns-3 distribution. @@ -962,7 +962,7 @@ public: * report the details. */ void ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, - std::string file, int32_t line); + std::string file, int32_t line); /** * \brief Issue a test report than the test case has completed its run. @@ -993,7 +993,7 @@ protected: * \brief Implementation of reporting method for failure of the test case. */ virtual void DoReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, - std::string file, int32_t line); + std::string file, int32_t line); /** * \internal @@ -1133,7 +1133,7 @@ public: /** * \brief Get the name of this test suite. */ - std::string GetName (void); + std::string GetName (void); /** * \brief Set the base directory of the ns-3 distribution. @@ -1275,7 +1275,7 @@ private: std::ofstream *m_ofs; bool m_error; TestType m_type; - + typedef std::vector TestCaseVector_t; TestCaseVector_t m_tests; }; diff --git a/src/core/model/time.cc b/src/core/model/time.cc index d598018ec..ddf6008ff 100644 --- a/src/core/model/time.cc +++ b/src/core/model/time.cc @@ -84,7 +84,7 @@ Time::Time (const std::string& s) struct Time::Resolution Time::GetNsResolution (void) -{ +{ struct Resolution resolution; SetResolution (Time::NS, &resolution); return resolution; @@ -97,7 +97,7 @@ Time::SetResolution (enum Unit resolution) void Time::SetResolution (enum Unit unit, struct Resolution *resolution) { - int8_t power [LAST] = {15, 12, 9, 6, 3, 0}; + int8_t power [LAST] = { 15, 12, 9, 6, 3, 0}; for (int i = 0; i < Time::LAST; i++) { int shift = power[i] - power[(int)unit]; @@ -105,27 +105,27 @@ Time::SetResolution (enum Unit unit, struct Resolution *resolution) struct Information *info = &resolution->info[i]; info->factor = factor; if (shift == 0) - { - info->timeFrom = int64x64_t (1); - info->timeTo = int64x64_t (1); - info->toMul = true; - info->fromMul = true; - } + { + info->timeFrom = int64x64_t (1); + info->timeTo = int64x64_t (1); + info->toMul = true; + info->fromMul = true; + } else if (shift > 0) - { - info->timeFrom = int64x64_t (factor); - info->timeTo = int64x64_t::Invert (factor); - info->toMul = false; - info->fromMul = true; - } + { + info->timeFrom = int64x64_t (factor); + info->timeTo = int64x64_t::Invert (factor); + info->toMul = false; + info->fromMul = true; + } else - { - NS_ASSERT (shift < 0); - info->timeFrom = int64x64_t::Invert (factor); - info->timeTo = int64x64_t (factor); - info->toMul = true; - info->fromMul = false; - } + { + NS_ASSERT (shift < 0); + info->timeFrom = int64x64_t::Invert (factor); + info->timeTo = int64x64_t (factor); + info->toMul = true; + info->fromMul = false; + } } resolution->unit = unit; } diff --git a/src/core/model/timer.h b/src/core/model/timer.h index b23e7c73e..f4cb21e84 100644 --- a/src/core/model/timer.h +++ b/src/core/model/timer.h @@ -30,7 +30,7 @@ namespace ns3 { class TimerImpl; /** - * \ingroup simulator + * \ingroup core * * \brief a simple Timer class * diff --git a/src/core/model/trace-source-accessor.cc b/src/core/model/trace-source-accessor.cc index 7ffe93415..68a93c5ff 100644 --- a/src/core/model/trace-source-accessor.cc +++ b/src/core/model/trace-source-accessor.cc @@ -22,8 +22,10 @@ namespace ns3 { TraceSourceAccessor::TraceSourceAccessor () -{} +{ +} TraceSourceAccessor::~TraceSourceAccessor () -{} +{ +} } // namespace ns3 diff --git a/src/core/model/trace-source-accessor.h b/src/core/model/trace-source-accessor.h index b86224e26..9da846e07 100644 --- a/src/core/model/trace-source-accessor.h +++ b/src/core/model/trace-source-accessor.h @@ -92,38 +92,38 @@ DoMakeTraceSourceAccessor (SOURCE T::*a) virtual bool ConnectWithoutContext (ObjectBase *obj, const CallbackBase &cb) const { T *p = dynamic_cast (obj); if (p == 0) - { - return false; - } + { + return false; + } (p->*m_source).ConnectWithoutContext (cb); return true; } virtual bool Connect (ObjectBase *obj, std::string context, const CallbackBase &cb) const { T *p = dynamic_cast (obj); if (p == 0) - { - return false; - } + { + return false; + } (p->*m_source).Connect (cb, context); return true; } virtual bool DisconnectWithoutContext (ObjectBase *obj, const CallbackBase &cb) const { T *p = dynamic_cast (obj); if (p == 0) - { - return false; - } + { + return false; + } (p->*m_source).DisconnectWithoutContext (cb); - return true; + return true; } virtual bool Disconnect (ObjectBase *obj, std::string context, const CallbackBase &cb) const { T *p = dynamic_cast (obj); if (p == 0) - { - return false; - } + { + return false; + } (p->*m_source).Disconnect (cb, context); - return true; + return true; } SOURCE T::*m_source; } *accessor = new Accessor (); diff --git a/src/core/model/traced-callback.h b/src/core/model/traced-callback.h index 3610b595a..ddf16bc29 100644 --- a/src/core/model/traced-callback.h +++ b/src/core/model/traced-callback.h @@ -88,7 +88,7 @@ public: void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7) const; void operator() (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8) const; -private: +private: typedef std::list > CallbackList; CallbackList m_callbackList; }; @@ -105,23 +105,24 @@ template TracedCallback::TracedCallback () : m_callbackList () -{} -template -void +void TracedCallback::ConnectWithoutContext (const CallbackBase & callback) { Callback cb; cb.Assign (callback); m_callbackList.push_back (cb); } -template -void +void TracedCallback::Connect (const CallbackBase & callback, std::string path) { Callback cb; @@ -140,13 +141,13 @@ TracedCallback::DisconnectWithoutContext (const Callbac i != m_callbackList.end (); /* empty */) { if ((*i).IsEqual (callback)) - { - i = m_callbackList.erase (i); - } + { + i = m_callbackList.erase (i); + } else - { - i++; - } + { + i++; + } } } template::operator() (void) const for (typename CallbackList::const_iterator i = m_callbackList.begin (); i != m_callbackList.end (); i++) { - (*i) (); + (*i)(); } } template::operator() (T1 a1) const for (typename CallbackList::const_iterator i = m_callbackList.begin (); i != m_callbackList.end (); i++) { - (*i) (a1); + (*i)(a1); } } template::operator() (T1 a1, T2 a2) const for (typename CallbackList::const_iterator i = m_callbackList.begin (); i != m_callbackList.end (); i++) { - (*i) (a1, a2); + (*i)(a1, a2); } } template::operator() (T1 a1, T2 a2, T3 a3) const for (typename CallbackList::const_iterator i = m_callbackList.begin (); i != m_callbackList.end (); i++) { - (*i) (a1, a2, a3); + (*i)(a1, a2, a3); } } template::operator() (T1 a1, T2 a2, T3 a3, T4 a4) for (typename CallbackList::const_iterator i = m_callbackList.begin (); i != m_callbackList.end (); i++) { - (*i) (a1, a2, a3, a4); + (*i)(a1, a2, a3, a4); } } template::operator() (T1 a1, T2 a2, T3 a3, T4 a4, for (typename CallbackList::const_iterator i = m_callbackList.begin (); i != m_callbackList.end (); i++) { - (*i) (a1, a2, a3, a4, a5); + (*i)(a1, a2, a3, a4, a5); } } template::operator() (T1 a1, T2 a2, T3 a3, T4 a4, for (typename CallbackList::const_iterator i = m_callbackList.begin (); i != m_callbackList.end (); i++) { - (*i) (a1, a2, a3, a4, a5, a6); + (*i)(a1, a2, a3, a4, a5, a6); } } template::operator() (T1 a1, T2 a2, T3 a3, T4 a4, for (typename CallbackList::const_iterator i = m_callbackList.begin (); i != m_callbackList.end (); i++) { - (*i) (a1, a2, a3, a4, a5, a6, a7); + (*i)(a1, a2, a3, a4, a5, a6, a7); } } template::operator() (T1 a1, T2 a2, T3 a3, T4 a4, for (typename CallbackList::const_iterator i = m_callbackList.begin (); i != m_callbackList.end (); i++) { - (*i) (a1, a2, a3, a4, a5, a6, a7, a8); + (*i)(a1, a2, a3, a4, a5, a6, a7, a8); } } -}//namespace ns3 +} //namespace ns3 #endif /* TRACED_CALLBACK_H */ diff --git a/src/core/model/traced-value.h b/src/core/model/traced-value.h index d2e465846..05ea39cf3 100644 --- a/src/core/model/traced-value.h +++ b/src/core/model/traced-value.h @@ -90,8 +90,8 @@ public: void Set (const T &v) { if (m_v != v) { - m_cb (m_v, v); - m_v = v; + m_cb (m_v, v); + m_v = v; } } T Get (void) const { diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc index dcab76ecb..d52b803a6 100644 --- a/src/core/model/type-id.cc +++ b/src/core/model/type-id.cc @@ -105,9 +105,10 @@ private: }; IidManager::IidManager () -{} +{ +} -uint16_t +uint16_t IidManager::AllocateUid (std::string name) { uint16_t j = 1; @@ -433,8 +434,9 @@ TypeId::TypeId (const char *name) TypeId::TypeId (uint16_t tid) : m_tid (tid) -{} -TypeId +{ +} +TypeId TypeId::LookupByName (std::string name) { uint16_t uid = Singleton::Get ()->GetUid (name); @@ -488,21 +490,21 @@ TypeId::LookupAttributeByName (std::string name, struct TypeId::AttributeInfo *i TypeId tid; TypeId nextTid = *this; do { - tid = nextTid; - for (uint32_t i = 0; i < tid.GetAttributeN (); i++) - { - std::string paramName = tid.GetAttributeName (i); - if (paramName == name) - { - info->accessor = tid.GetAttributeAccessor (i); - info->flags = tid.GetAttributeFlags (i); - info->initialValue = tid.GetAttributeInitialValue (i); - info->checker = tid.GetAttributeChecker (i); - return true; - } - } - nextTid = tid.GetParent (); - } while (nextTid != tid); + tid = nextTid; + for (uint32_t i = 0; i < tid.GetAttributeN (); i++) + { + std::string paramName = tid.GetAttributeName (i); + if (paramName == name) + { + info->accessor = tid.GetAttributeAccessor (i); + info->flags = tid.GetAttributeFlags (i); + info->initialValue = tid.GetAttributeInitialValue (i); + info->checker = tid.GetAttributeChecker (i); + return true; + } + } + nextTid = tid.GetParent (); + } while (nextTid != tid); return false; } @@ -699,17 +701,17 @@ TypeId::LookupTraceSourceByName (std::string name) const TypeId tid; TypeId nextTid = *this; do { - tid = nextTid; - for (uint32_t i = 0; i < tid.GetTraceSourceN (); i++) - { - std::string srcName = tid.GetTraceSourceName (i); - if (srcName == name) - { - return tid.GetTraceSourceAccessor (i); - } - } - nextTid = tid.GetParent (); - } while (nextTid != tid); + tid = nextTid; + for (uint32_t i = 0; i < tid.GetTraceSourceN (); i++) + { + std::string srcName = tid.GetTraceSourceName (i); + if (srcName == name) + { + return tid.GetTraceSourceAccessor (i); + } + } + nextTid = tid.GetParent (); + } while (nextTid != tid); return 0; } diff --git a/src/core/model/type-id.h b/src/core/model/type-id.h index 94d75a4e3..bdd0a2aab 100644 --- a/src/core/model/type-id.h +++ b/src/core/model/type-id.h @@ -365,7 +365,7 @@ private: explicit TypeId (uint16_t tid); void DoAddConstructor (Callback callback); - + uint16_t m_tid; }; @@ -388,16 +388,19 @@ ATTRIBUTE_HELPER_HEADER (TypeId); namespace ns3 { TypeId::TypeId () - : m_tid (0) {} + : m_tid (0) { +} TypeId::TypeId (const TypeId &o) - : m_tid (o.m_tid) {} + : m_tid (o.m_tid) { +} TypeId &TypeId::operator = (const TypeId &o) { m_tid = o.m_tid; return *this; } TypeId::~TypeId () -{} +{ +} inline bool operator == (TypeId a, TypeId b) { return a.m_tid == b.m_tid; diff --git a/src/core/model/type-name.cc b/src/core/model/type-name.cc index bf5f6f9de..aad188bd4 100644 --- a/src/core/model/type-name.cc +++ b/src/core/model/type-name.cc @@ -4,13 +4,13 @@ namespace ns3 { -#define DEF_TYPE(x) \ - template <> \ - std::string TypeNameGet (void) \ - { \ - return #x; \ +#define DEF_TYPE(x) \ + template <> \ + std::string TypeNameGet (void) \ + { \ + return # x; \ } - + DEF_TYPE (uint8_t); DEF_TYPE (uint16_t); DEF_TYPE (uint32_t); @@ -23,4 +23,4 @@ DEF_TYPE (float); DEF_TYPE (double); -}//namespace ns3 +} //namespace ns3 diff --git a/src/core/model/type-name.h b/src/core/model/type-name.h index 22ed0244f..9971abc4b 100644 --- a/src/core/model/type-name.h +++ b/src/core/model/type-name.h @@ -14,10 +14,10 @@ std::string TypeNameGet (void) return "unknown"; } -#define DEF_TYPE(x) \ - template <> \ - std::string TypeNameGet (void) - +#define DEF_TYPE(x) \ + template <> \ + std::string TypeNameGet (void) + DEF_TYPE (uint8_t); DEF_TYPE (uint16_t); DEF_TYPE (uint32_t); @@ -31,6 +31,6 @@ DEF_TYPE (double); #undef DEF_TYPE -}//namespace ns3 +} //namespace ns3 #endif /* TYPE_NAME_H */ diff --git a/src/core/model/type-traits.h b/src/core/model/type-traits.h index 54c550e10..d3d00dc96 100644 --- a/src/core/model/type-traits.h +++ b/src/core/model/type-traits.h @@ -16,48 +16,48 @@ private: }; template struct ReferenceTraits { - enum {IsReference = 0}; + enum { IsReference = 0}; typedef U ReferencedType; }; template struct ReferenceTraits { - enum {IsReference = 1}; + enum { IsReference = 1}; typedef U ReferencedType; }; template struct PointerTraits { - enum {IsPointer = 0}; + enum { IsPointer = 0}; typedef U PointeeType; }; template struct PointerTraits { - enum {IsPointer = 1}; + enum { IsPointer = 1}; typedef U PointeeType; }; template struct FunctionPtrTraits { - enum {IsFunctionPointer = 0}; + enum { IsFunctionPointer = 0}; }; template struct FunctionPtrTraits { - enum {IsFunctionPointer = 1}; - enum {nArgs = 0}; + enum { IsFunctionPointer = 1}; + enum { nArgs = 0}; typedef U ReturnType; }; template struct FunctionPtrTraits { - enum {IsFunctionPointer = 1}; - enum {nArgs = 1}; + enum { IsFunctionPointer = 1}; + enum { nArgs = 1}; typedef U ReturnType; typedef V1 Arg1Type; }; template struct FunctionPtrTraits { - enum {IsFunctionPointer = 1}; - enum {nArgs = 2}; + enum { IsFunctionPointer = 1}; + enum { nArgs = 2}; typedef U ReturnType; typedef V1 Arg1Type; typedef V2 Arg2Type; @@ -66,8 +66,8 @@ private: typename V3> struct FunctionPtrTraits { - enum {IsFunctionPointer = 1}; - enum {nArgs = 3}; + enum { IsFunctionPointer = 1}; + enum { nArgs = 3}; typedef U ReturnType; typedef V1 Arg1Type; typedef V2 Arg2Type; @@ -77,8 +77,8 @@ private: typename V3, typename V4> struct FunctionPtrTraits { - enum {IsFunctionPointer = 1}; - enum {nArgs = 4}; + enum { IsFunctionPointer = 1}; + enum { nArgs = 4}; typedef U ReturnType; typedef V1 Arg1Type; typedef V2 Arg2Type; @@ -90,8 +90,8 @@ private: typename V5> struct FunctionPtrTraits { - enum {IsFunctionPointer = 1}; - enum {nArgs = 5}; + enum { IsFunctionPointer = 1}; + enum { nArgs = 5}; typedef U ReturnType; typedef V1 Arg1Type; typedef V2 Arg2Type; @@ -104,8 +104,8 @@ private: typename V5, typename V6> struct FunctionPtrTraits { - enum {IsFunctionPointer = 1}; - enum {nArgs = 6}; + enum { IsFunctionPointer = 1}; + enum { nArgs = 6}; typedef U ReturnType; typedef V1 Arg1Type; typedef V2 Arg2Type; @@ -116,52 +116,52 @@ private: }; template struct PtrToMemberTraits { - enum {IsPointerToMember = 0}; + enum { IsPointerToMember = 0}; }; template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 0}; + enum { IsPointerToMember = 1}; + enum { nArgs = 0}; typedef U ReturnType; }; template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 0}; + enum { IsPointerToMember = 1}; + enum { nArgs = 0}; typedef U ReturnType; }; template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 1}; + enum { IsPointerToMember = 1}; + enum { nArgs = 1}; typedef U ReturnType; typedef W1 Arg1Type; }; template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 1}; + enum { IsPointerToMember = 1}; + enum { nArgs = 1}; typedef U ReturnType; typedef W1 Arg1Type; }; template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 2}; + enum { IsPointerToMember = 1}; + enum { nArgs = 2}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; }; template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 2}; + enum { IsPointerToMember = 1}; + enum { nArgs = 2}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; @@ -169,10 +169,10 @@ private: template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 3}; + enum { IsPointerToMember = 1}; + enum { nArgs = 3}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; @@ -181,10 +181,10 @@ private: template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 3}; + enum { IsPointerToMember = 1}; + enum { nArgs = 3}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; @@ -193,10 +193,10 @@ private: template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 4}; + enum { IsPointerToMember = 1}; + enum { nArgs = 4}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; @@ -206,10 +206,10 @@ private: template - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 4}; + enum { IsPointerToMember = 1}; + enum { nArgs = 4}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; @@ -220,10 +220,10 @@ private: typename W1, typename W2, typename W3, typename W4, typename W5> - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 5}; + enum { IsPointerToMember = 1}; + enum { nArgs = 5}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; @@ -235,10 +235,10 @@ private: typename W1, typename W2, typename W3, typename W4, typename W5> - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 5}; + enum { IsPointerToMember = 1}; + enum { nArgs = 5}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; @@ -250,10 +250,10 @@ private: typename W1, typename W2, typename W3, typename W4, typename W5, typename W6> - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 6}; + enum { IsPointerToMember = 1}; + enum { nArgs = 6}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; @@ -266,10 +266,10 @@ private: typename W1, typename W2, typename W3, typename W4, typename W5, typename W6> - struct PtrToMemberTraits + struct PtrToMemberTraits { - enum {IsPointerToMember = 1}; - enum {nArgs = 6}; + enum { IsPointerToMember = 1}; + enum { nArgs = 6}; typedef U ReturnType; typedef W1 Arg1Type; typedef W2 Arg2Type; @@ -283,10 +283,10 @@ public: typedef typename UnConst::Result NonConstType; typedef typename ReferenceTraits::ReferencedType ReferencedType; typedef typename PointerTraits::PointeeType PointeeType; - enum {IsPointerToMember = PtrToMemberTraits::IsPointerToMember}; - enum {IsPointer = PointerTraits::IsPointer}; - enum {IsReference = ReferenceTraits::IsReference}; - enum {IsFunctionPointer = FunctionPtrTraits::IsFunctionPointer}; + enum { IsPointerToMember = PtrToMemberTraits::IsPointerToMember}; + enum { IsPointer = PointerTraits::IsPointer}; + enum { IsReference = ReferenceTraits::IsReference}; + enum { IsFunctionPointer = FunctionPtrTraits::IsFunctionPointer}; typedef PtrToMemberTraits PointerToMemberTraits; typedef FunctionPtrTraits FunctionPointerTraits; }; diff --git a/src/core/model/uinteger.cc b/src/core/model/uinteger.cc index fd43ca990..86eba69a4 100644 --- a/src/core/model/uinteger.cc +++ b/src/core/model/uinteger.cc @@ -38,9 +38,9 @@ Ptr MakeUintegerChecker (uint64_t min, uint64_t max, std virtual bool Check (const AttributeValue &value) const { const UintegerValue *v = dynamic_cast (&value); if (v == 0) - { - return false; - } + { + return false; + } return v->Get () >= m_minValue && v->Get () <= m_maxValue; } virtual std::string GetValueTypeName (void) const { diff --git a/src/core/model/unix-fd-reader.cc b/src/core/model/unix-fd-reader.cc index a62fa9d10..f992b2ebc 100644 --- a/src/core/model/unix-fd-reader.cc +++ b/src/core/model/unix-fd-reader.cc @@ -82,7 +82,7 @@ void FdReader::Start (int fd, Callback readCallback) // scheduling a "destroy time" method to make sure the thread exits before // proceeding. // - if (! m_destroyEvent.IsRunning ()) + if (!m_destroyEvent.IsRunning ()) { // hold a reference to ensure that this object is not // deallocated before the destroy-time event fires @@ -162,7 +162,7 @@ void FdReader::Run (void) if (r == -1 && errno != EINTR) { NS_FATAL_ERROR ("select() failed: " << strerror (errno)); - } + } if (FD_ISSET (m_evpipe[0], &readfds)) { @@ -187,7 +187,7 @@ void FdReader::Run (void) NS_LOG_WARN ("read() failed: " << strerror (errno)); break; } - } + } if (m_stop) { diff --git a/src/core/model/unix-fd-reader.h b/src/core/model/unix-fd-reader.h index e3ec33960..4f86b1fde 100644 --- a/src/core/model/unix-fd-reader.h +++ b/src/core/model/unix-fd-reader.h @@ -110,4 +110,4 @@ private: } // namespace ns3 -#endif // UNIX_FD_READER_H +#endif // UNIX_FD_READER_H diff --git a/src/core/model/unix-system-condition.cc b/src/core/model/unix-system-condition.cc index 133dc18ed..70ace4583 100644 --- a/src/core/model/unix-system-condition.cc +++ b/src/core/model/unix-system-condition.cc @@ -27,7 +27,7 @@ NS_LOG_COMPONENT_DEFINE ("SystemCondition"); namespace ns3 { -class SystemConditionPrivate { +class SystemConditionPrivate { public: static const uint64_t NS_PER_SEC = (uint64_t)1000000000; @@ -71,7 +71,7 @@ SystemConditionPrivate::SystemConditionPrivate () pthread_condattr_setpshared (&cAttr, PTHREAD_PROCESS_PRIVATE); pthread_cond_init (&m_cond, &cAttr); } - + SystemConditionPrivate::~SystemConditionPrivate() { NS_LOG_FUNCTION_NOARGS (); @@ -79,21 +79,21 @@ SystemConditionPrivate::~SystemConditionPrivate() pthread_cond_destroy (&m_cond); } - void +void SystemConditionPrivate::SetCondition (bool condition) { NS_LOG_FUNCTION_NOARGS (); m_condition = condition; } - bool +bool SystemConditionPrivate::GetCondition (void) { NS_LOG_FUNCTION_NOARGS (); return m_condition; } - void +void SystemConditionPrivate::Signal (void) { NS_LOG_FUNCTION_NOARGS (); @@ -103,7 +103,7 @@ SystemConditionPrivate::Signal (void) pthread_mutex_unlock (&m_mutex); } - void +void SystemConditionPrivate::Broadcast (void) { NS_LOG_FUNCTION_NOARGS (); @@ -113,7 +113,7 @@ SystemConditionPrivate::Broadcast (void) pthread_mutex_unlock (&m_mutex); } - void +void SystemConditionPrivate::Wait (void) { NS_LOG_FUNCTION_NOARGS (); @@ -127,7 +127,7 @@ SystemConditionPrivate::Wait (void) pthread_mutex_unlock (&m_mutex); } - bool +bool SystemConditionPrivate::TimedWait (uint64_t ns) { NS_LOG_FUNCTION_NOARGS (); @@ -156,7 +156,7 @@ SystemConditionPrivate::TimedWait (uint64_t ns) if (rc == ETIMEDOUT) { pthread_mutex_unlock (&m_mutex); - return true; + return true; } } pthread_mutex_unlock (&m_mutex); @@ -175,46 +175,46 @@ SystemCondition::~SystemCondition () delete m_priv; } - void +void SystemCondition::SetCondition (bool condition) { NS_LOG_FUNCTION_NOARGS (); m_priv->SetCondition (condition); } - bool +bool SystemCondition::GetCondition (void) { NS_LOG_FUNCTION_NOARGS (); return m_priv->GetCondition (); } - void +void SystemCondition::Signal (void) { NS_LOG_FUNCTION_NOARGS (); m_priv->Signal (); } - void +void SystemCondition::Broadcast (void) { NS_LOG_FUNCTION_NOARGS (); m_priv->Broadcast (); -} +} - void +void SystemCondition::Wait (void) { NS_LOG_FUNCTION_NOARGS (); m_priv->Wait (); -} +} - bool +bool SystemCondition::TimedWait (uint64_t ns) { NS_LOG_FUNCTION_NOARGS (); return m_priv->TimedWait (ns); -} +} } // namespace ns3 diff --git a/src/core/model/unix-system-mutex.cc b/src/core/model/unix-system-mutex.cc index 9a01a3a33..e088b4a47 100644 --- a/src/core/model/unix-system-mutex.cc +++ b/src/core/model/unix-system-mutex.cc @@ -29,7 +29,7 @@ NS_LOG_COMPONENT_DEFINE ("SystemMutex"); namespace ns3 { -class SystemMutexPrivate { +class SystemMutexPrivate { public: SystemMutexPrivate (); ~SystemMutexPrivate (); @@ -62,14 +62,14 @@ SystemMutexPrivate::SystemMutexPrivate () #endif pthread_mutex_init (&m_mutex, &attr); } - + SystemMutexPrivate::~SystemMutexPrivate() { NS_LOG_FUNCTION_NOARGS (); pthread_mutex_destroy (&m_mutex); } - void +void SystemMutexPrivate::Lock (void) { NS_LOG_FUNCTION_NOARGS (); @@ -78,12 +78,12 @@ SystemMutexPrivate::Lock (void) if (rc != 0) { NS_FATAL_ERROR ("SystemMutexPrivate::Lock()" - "pthread_mutex_lock failed: " << rc << " = \"" << - strerror(rc) << "\""); + "pthread_mutex_lock failed: " << rc << " = \"" << + strerror(rc) << "\""); } } - void +void SystemMutexPrivate::Unlock (void) { NS_LOG_FUNCTION_NOARGS (); @@ -92,8 +92,8 @@ SystemMutexPrivate::Unlock (void) if (rc != 0) { NS_FATAL_ERROR ("SystemMutexPrivate::Unlock()" - "pthread_mutex_unlock failed: " << rc << " = \"" << - strerror(rc) << "\""); + "pthread_mutex_unlock failed: " << rc << " = \"" << + strerror(rc) << "\""); } } @@ -109,19 +109,19 @@ SystemMutex::~SystemMutex() delete m_priv; } - void +void SystemMutex::Lock() { NS_LOG_FUNCTION_NOARGS (); m_priv->Lock (); } - void +void SystemMutex::Unlock() { NS_LOG_FUNCTION_NOARGS (); m_priv->Unlock (); -} +} CriticalSection::CriticalSection (SystemMutex &mutex) : m_mutex(mutex) diff --git a/src/core/model/unix-system-thread.cc b/src/core/model/unix-system-thread.cc index ce2906b02..e792125f5 100644 --- a/src/core/model/unix-system-thread.cc +++ b/src/core/model/unix-system-thread.cc @@ -74,22 +74,22 @@ SystemThreadImpl::SystemThreadImpl (Callback callback) sigaction (SIGALRM, &act, 0); } - void +void SystemThreadImpl::Start (void) { NS_LOG_FUNCTION_NOARGS (); int rc = pthread_create (&m_thread, NULL, &SystemThreadImpl::DoRun, - (void *)this); + (void *)this); if (rc) { NS_FATAL_ERROR ("pthread_create failed: " << rc << "=\"" << - strerror(rc) << "\"."); + strerror(rc) << "\"."); } } - void +void SystemThreadImpl::Join (void) { NS_LOG_FUNCTION_NOARGS (); @@ -99,11 +99,11 @@ SystemThreadImpl::Join (void) if (rc) { NS_FATAL_ERROR ("pthread_join failed: " << rc << "=\"" << - strerror(rc) << "\"."); + strerror(rc) << "\"."); } } - void +void SystemThreadImpl::Shutdown (void) { NS_LOG_FUNCTION_NOARGS (); @@ -115,7 +115,7 @@ SystemThreadImpl::Shutdown (void) pthread_kill (m_thread, SIGALRM); } - bool +bool SystemThreadImpl::Break (void) { NS_LOG_FUNCTION_NOARGS (); @@ -123,7 +123,7 @@ SystemThreadImpl::Break (void) return m_break; } - void * +void * SystemThreadImpl::DoRun (void *arg) { NS_LOG_FUNCTION_NOARGS (); @@ -145,39 +145,39 @@ SystemThread::SystemThread (Callback callback) { NS_LOG_FUNCTION_NOARGS (); } - + SystemThread::~SystemThread() { NS_LOG_FUNCTION_NOARGS (); delete m_impl; } - - void + +void SystemThread::Start (void) { NS_LOG_FUNCTION_NOARGS (); m_impl->Start (); } - - void + +void SystemThread::Join (void) { NS_LOG_FUNCTION_NOARGS (); m_impl->Join (); -} +} - void +void SystemThread::Shutdown (void) { NS_LOG_FUNCTION_NOARGS (); m_impl->Shutdown (); -} +} - bool +bool SystemThread::Break (void) { NS_LOG_FUNCTION_NOARGS (); return m_impl->Break (); -} +} } // namespace ns3 diff --git a/src/core/model/unix-system-wall-clock-ms.cc b/src/core/model/unix-system-wall-clock-ms.cc index 78c83b566..c4f6cc938 100644 --- a/src/core/model/unix-system-wall-clock-ms.cc +++ b/src/core/model/unix-system-wall-clock-ms.cc @@ -117,10 +117,11 @@ SystemWallClockMsPrivate::GetElapsedSystem (void) const { return m_elapsedSystem; } - + SystemWallClockMs::SystemWallClockMs () : m_priv (new SystemWallClockMsPrivate ()) -{} +{ +} SystemWallClockMs::~SystemWallClockMs () { diff --git a/src/core/model/vector.cc b/src/core/model/vector.cc index 03e96ce42..feb218e09 100644 --- a/src/core/model/vector.cc +++ b/src/core/model/vector.cc @@ -26,7 +26,7 @@ namespace ns3 { ATTRIBUTE_HELPER_CPP (Vector3D); ATTRIBUTE_HELPER_CPP (Vector2D); - // compatibility for mobility code +// compatibility for mobility code Ptr MakeVectorChecker (void) { return MakeVector3DChecker (); @@ -37,25 +37,29 @@ Vector3D::Vector3D (double _x, double _y, double _z) : x (_x), y (_y), z (_z) -{} +{ +} Vector3D::Vector3D () : x (0.0), y (0.0), z (0.0) -{} +{ +} Vector2D::Vector2D (double _x, double _y) : x (_x), y (_y) -{} +{ +} Vector2D::Vector2D () : x (0.0), y (0.0) -{} +{ +} -double +double CalculateDistance (const Vector3D &a, const Vector3D &b) { double dx = b.x - a.x; diff --git a/src/core/model/wall-clock-synchronizer.cc b/src/core/model/wall-clock-synchronizer.cc index 301a68652..205421108 100644 --- a/src/core/model/wall-clock-synchronizer.cc +++ b/src/core/model/wall-clock-synchronizer.cc @@ -73,21 +73,21 @@ WallClockSynchronizer::~WallClockSynchronizer () NS_LOG_FUNCTION_NOARGS (); } - bool +bool WallClockSynchronizer::DoRealtime (void) { NS_LOG_FUNCTION_NOARGS (); return true; } - uint64_t +uint64_t WallClockSynchronizer::DoGetCurrentRealtime (void) { NS_LOG_FUNCTION_NOARGS (); return GetNormalizedRealtime (); } - void +void WallClockSynchronizer::DoSetOrigin (uint64_t ns) { NS_LOG_FUNCTION_NOARGS (); @@ -103,7 +103,7 @@ WallClockSynchronizer::DoSetOrigin (uint64_t ns) NS_LOG_INFO ("origin = " << m_realtimeOriginNano); } - int64_t +int64_t WallClockSynchronizer::DoGetDrift (uint64_t ns) { NS_LOG_FUNCTION_NOARGS (); @@ -143,7 +143,7 @@ WallClockSynchronizer::DoGetDrift (uint64_t ns) } } - bool +bool WallClockSynchronizer::DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay) { NS_LOG_FUNCTION_NOARGS (); @@ -209,7 +209,7 @@ WallClockSynchronizer::DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay) { NS_LOG_INFO ("SleepWait for " << numberJiffies * m_jiffy << " ns"); NS_LOG_INFO ("SleepWait until " << nsCurrent + numberJiffies * m_jiffy - << " ns"); + << " ns"); // // SleepWait is interruptible. If it returns true it meant that the sleep // went until the end. If it returns false, it means that the sleep was @@ -261,7 +261,7 @@ WallClockSynchronizer::DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay) return SpinWait (nsCurrent + nsDelay); } - void +void WallClockSynchronizer::DoSignal (void) { NS_LOG_FUNCTION_NOARGS (); @@ -270,28 +270,28 @@ WallClockSynchronizer::DoSignal (void) m_condition.Signal (); } - void +void WallClockSynchronizer::DoSetCondition (bool cond) { NS_LOG_FUNCTION_NOARGS (); m_condition.SetCondition (cond); } - void +void WallClockSynchronizer::DoEventStart (void) { NS_LOG_FUNCTION_NOARGS (); m_nsEventStart = GetNormalizedRealtime (); } - uint64_t +uint64_t WallClockSynchronizer::DoEventEnd (void) { NS_LOG_FUNCTION_NOARGS (); return GetNormalizedRealtime () - m_nsEventStart; } - bool +bool WallClockSynchronizer::SpinWait (uint64_t ns) { NS_LOG_FUNCTION_NOARGS (); @@ -319,7 +319,7 @@ WallClockSynchronizer::SpinWait (uint64_t ns) return true; } - bool +bool WallClockSynchronizer::SleepWait (uint64_t ns) { NS_LOG_FUNCTION_NOARGS (); @@ -345,7 +345,7 @@ WallClockSynchronizer::SleepWait (uint64_t ns) return m_condition.TimedWait (ns); } - uint64_t +uint64_t WallClockSynchronizer::DriftCorrect (uint64_t nsNow, uint64_t nsDelay) { int64_t drift = DoGetDrift (nsNow); @@ -375,7 +375,7 @@ WallClockSynchronizer::DriftCorrect (uint64_t nsNow, uint64_t nsDelay) } } - uint64_t +uint64_t WallClockSynchronizer::GetRealtime (void) { struct timeval tvNow; @@ -383,13 +383,13 @@ WallClockSynchronizer::GetRealtime (void) return TimevalToNs (&tvNow); } - uint64_t +uint64_t WallClockSynchronizer::GetNormalizedRealtime (void) { return GetRealtime () - m_realtimeOriginNano; } - void +void WallClockSynchronizer::NsToTimeval (int64_t ns, struct timeval *tv) { NS_ASSERT ((ns % US_PER_NS) == 0); @@ -397,7 +397,7 @@ WallClockSynchronizer::NsToTimeval (int64_t ns, struct timeval *tv) tv->tv_usec = (ns % NS_PER_SEC) / US_PER_NS; } - uint64_t +uint64_t WallClockSynchronizer::TimevalToNs (struct timeval *tv) { uint64_t nsResult = tv->tv_sec * NS_PER_SEC + tv->tv_usec * US_PER_NS; @@ -405,7 +405,7 @@ WallClockSynchronizer::TimevalToNs (struct timeval *tv) return nsResult; } - void +void WallClockSynchronizer::TimevalAdd ( struct timeval *tv1, struct timeval *tv2, diff --git a/src/core/model/wall-clock-synchronizer.h b/src/core/model/wall-clock-synchronizer.h index b0784568d..015123ecc 100644 --- a/src/core/model/wall-clock-synchronizer.h +++ b/src/core/model/wall-clock-synchronizer.h @@ -37,7 +37,7 @@ namespace ns3 { * The simulation clock is maintained as a 64-bit integer in a unit specified * by the user through the TimeStepPrecision::Set function. This means that * it is not possible to specify event expiration times with anything better - * than this user-specified accuracy. + * than this user-specified accuracy. * * There are a couple of more issues at this level. Posix clocks provide * access to several clocks we could use as a wall clock. We don't care about diff --git a/src/core/model/watchdog.cc b/src/core/model/watchdog.cc index 703f7279a..ac91f321e 100644 --- a/src/core/model/watchdog.cc +++ b/src/core/model/watchdog.cc @@ -25,14 +25,15 @@ Watchdog::Watchdog () : m_impl (0), m_event (), m_end (MicroSeconds (0)) -{} +{ +} Watchdog::~Watchdog () { delete m_impl; } -void +void Watchdog::Ping (Time delay) { Time end = Simulator::Now () + delay; diff --git a/src/core/model/watchdog.h b/src/core/model/watchdog.h index e7e80087c..114d991dd 100644 --- a/src/core/model/watchdog.h +++ b/src/core/model/watchdog.h @@ -28,7 +28,7 @@ namespace ns3 { class TimerImpl; /** - * \ingroup simulator + * \ingroup core * \brief a very simple watchdog * * If you don't ping the watchdog sufficiently often, it triggers its diff --git a/src/core/model/win32-system-wall-clock-ms.cc b/src/core/model/win32-system-wall-clock-ms.cc index 25046dbea..812c882b5 100644 --- a/src/core/model/win32-system-wall-clock-ms.cc +++ b/src/core/model/win32-system-wall-clock-ms.cc @@ -110,10 +110,11 @@ SystemWallClockMsPrivate::GetElapsedSystem (void) const { return m_elapsedSystem; } - + SystemWallClockMs::SystemWallClockMs () : m_priv (new SystemWallClockMsPrivate ()) -{} +{ +} SystemWallClockMs::~SystemWallClockMs () { diff --git a/src/core/test/attribute-test-suite.cc b/src/core/test/attribute-test-suite.cc index 3e3ca564f..600888d5a 100644 --- a/src/core/test/attribute-test-suite.cc +++ b/src/core/test/attribute-test-suite.cc @@ -61,7 +61,7 @@ public: static TypeId GetTypeId (void) { static TypeId tid = TypeId ("ns3::Derived") .SetParent () - ; + ; return tid; } }; @@ -79,89 +79,89 @@ public: .SetParent () .HideFromDocumentation () .AddAttribute ("TestBoolName", "help text", - BooleanValue (false), - MakeBooleanAccessor (&AttributeObjectTest::m_boolTest), - MakeBooleanChecker ()) + BooleanValue (false), + MakeBooleanAccessor (&AttributeObjectTest::m_boolTest), + MakeBooleanChecker ()) .AddAttribute ("TestBoolA", "help text", - BooleanValue (false), - MakeBooleanAccessor (&AttributeObjectTest::DoSetTestB, - &AttributeObjectTest::DoGetTestB), - MakeBooleanChecker ()) + BooleanValue (false), + MakeBooleanAccessor (&AttributeObjectTest::DoSetTestB, + &AttributeObjectTest::DoGetTestB), + MakeBooleanChecker ()) .AddAttribute ("TestInt16", "help text", - IntegerValue (-2), - MakeIntegerAccessor (&AttributeObjectTest::m_int16), - MakeIntegerChecker ()) + IntegerValue (-2), + MakeIntegerAccessor (&AttributeObjectTest::m_int16), + MakeIntegerChecker ()) .AddAttribute ("TestInt16WithBounds", "help text", - IntegerValue (-2), - MakeIntegerAccessor (&AttributeObjectTest::m_int16WithBounds), - MakeIntegerChecker (-5, 10)) + IntegerValue (-2), + MakeIntegerAccessor (&AttributeObjectTest::m_int16WithBounds), + MakeIntegerChecker (-5, 10)) .AddAttribute ("TestInt16SetGet", "help text", - IntegerValue (6), - MakeIntegerAccessor (&AttributeObjectTest::DoSetInt16, - &AttributeObjectTest::DoGetInt16), - MakeIntegerChecker ()) + IntegerValue (6), + MakeIntegerAccessor (&AttributeObjectTest::DoSetInt16, + &AttributeObjectTest::DoGetInt16), + MakeIntegerChecker ()) .AddAttribute ("TestUint8", "help text", - UintegerValue (1), - MakeUintegerAccessor (&AttributeObjectTest::m_uint8), - MakeUintegerChecker ()) + UintegerValue (1), + MakeUintegerAccessor (&AttributeObjectTest::m_uint8), + MakeUintegerChecker ()) .AddAttribute ("TestEnum", "help text", - EnumValue (TEST_A), - MakeEnumAccessor (&AttributeObjectTest::m_enum), - MakeEnumChecker (TEST_A, "TestA", - TEST_B, "TestB", - TEST_C, "TestC")) + EnumValue (TEST_A), + MakeEnumAccessor (&AttributeObjectTest::m_enum), + MakeEnumChecker (TEST_A, "TestA", + TEST_B, "TestB", + TEST_C, "TestC")) .AddAttribute ("TestRandom", "help text", - RandomVariableValue (ConstantVariable (1.0)), - MakeRandomVariableAccessor (&AttributeObjectTest::m_random), - MakeRandomVariableChecker ()) + RandomVariableValue (ConstantVariable (1.0)), + MakeRandomVariableAccessor (&AttributeObjectTest::m_random), + MakeRandomVariableChecker ()) .AddAttribute ("TestFloat", "help text", - DoubleValue (-1.1), - MakeDoubleAccessor (&AttributeObjectTest::m_float), - MakeDoubleChecker ()) + DoubleValue (-1.1), + MakeDoubleAccessor (&AttributeObjectTest::m_float), + MakeDoubleChecker ()) .AddAttribute ("TestVector1", "help text", - ObjectVectorValue (), - MakeObjectVectorAccessor (&AttributeObjectTest::m_vector1), - MakeObjectVectorChecker ()) + ObjectVectorValue (), + MakeObjectVectorAccessor (&AttributeObjectTest::m_vector1), + MakeObjectVectorChecker ()) .AddAttribute ("TestVector2", "help text", - ObjectVectorValue (), - MakeObjectVectorAccessor (&AttributeObjectTest::DoGetVectorN, - &AttributeObjectTest::DoGetVector), - MakeObjectVectorChecker ()) + ObjectVectorValue (), + MakeObjectVectorAccessor (&AttributeObjectTest::DoGetVectorN, + &AttributeObjectTest::DoGetVector), + MakeObjectVectorChecker ()) .AddAttribute ("IntegerTraceSource1", "help text", - IntegerValue (-2), - MakeIntegerAccessor (&AttributeObjectTest::m_intSrc1), - MakeIntegerChecker ()) + IntegerValue (-2), + MakeIntegerAccessor (&AttributeObjectTest::m_intSrc1), + MakeIntegerChecker ()) .AddAttribute ("IntegerTraceSource2", "help text", - IntegerValue (-2), - MakeIntegerAccessor (&AttributeObjectTest::DoSetIntSrc, - &AttributeObjectTest::DoGetIntSrc), - MakeIntegerChecker ()) + IntegerValue (-2), + MakeIntegerAccessor (&AttributeObjectTest::DoSetIntSrc, + &AttributeObjectTest::DoGetIntSrc), + MakeIntegerChecker ()) .AddAttribute ("UIntegerTraceSource", "help text", - UintegerValue (2), - MakeUintegerAccessor (&AttributeObjectTest::m_uintSrc), - MakeIntegerChecker ()) + UintegerValue (2), + MakeUintegerAccessor (&AttributeObjectTest::m_uintSrc), + MakeIntegerChecker ()) .AddAttribute ("DoubleTraceSource", "help text", - DoubleValue (2), - MakeDoubleAccessor (&AttributeObjectTest::m_doubleSrc), - MakeDoubleChecker ()) + DoubleValue (2), + MakeDoubleAccessor (&AttributeObjectTest::m_doubleSrc), + MakeDoubleChecker ()) .AddAttribute ("BoolTraceSource", "help text", BooleanValue (false), - MakeBooleanAccessor (&AttributeObjectTest::m_boolSrc), - MakeBooleanChecker ()) + MakeBooleanAccessor (&AttributeObjectTest::m_boolSrc), + MakeBooleanChecker ()) .AddAttribute ("EnumTraceSource", "help text", EnumValue (false), - MakeEnumAccessor (&AttributeObjectTest::m_enumSrc), - MakeEnumChecker (TEST_A, "TestA")) + MakeEnumAccessor (&AttributeObjectTest::m_enumSrc), + MakeEnumChecker (TEST_A, "TestA")) .AddAttribute ("ValueClassSource", "help text", - ValueClassTestValue (ValueClassTest ()), - MakeValueClassTestAccessor (&AttributeObjectTest::m_valueSrc), - MakeValueClassTestChecker ()) + ValueClassTestValue (ValueClassTest ()), + MakeValueClassTestAccessor (&AttributeObjectTest::m_valueSrc), + MakeValueClassTestChecker ()) .AddTraceSource ("Source1", "help test", - MakeTraceSourceAccessor (&AttributeObjectTest::m_intSrc1)) + MakeTraceSourceAccessor (&AttributeObjectTest::m_intSrc1)) .AddTraceSource ("Source2", "help text", - MakeTraceSourceAccessor (&AttributeObjectTest::m_cb)) + MakeTraceSourceAccessor (&AttributeObjectTest::m_cb)) .AddTraceSource ("ValueSource", "help text", - MakeTraceSourceAccessor (&AttributeObjectTest::m_valueSrc)) + MakeTraceSourceAccessor (&AttributeObjectTest::m_valueSrc)) .AddAttribute ("Pointer", "help text", PointerValue (), MakePointerAccessor (&AttributeObjectTest::m_ptr), @@ -170,14 +170,14 @@ public: CallbackValue (), MakeCallbackAccessor (&AttributeObjectTest::m_cbValue), MakeCallbackChecker ()) - ; - + ; + return tid; } - void AddToVector1 (void) {m_vector1.push_back (CreateObject ());} - void AddToVector2 (void) {m_vector2.push_back (CreateObject ());} - void InvokeCb (double a, int b, float c) {m_cb (a,b,c);} + void AddToVector1 (void) { m_vector1.push_back (CreateObject ());} + void AddToVector2 (void) { m_vector2.push_back (CreateObject ());} + void InvokeCb (double a, int b, float c) { m_cb (a,b,c);} void InvokeCbValue (int8_t a) { @@ -187,14 +187,14 @@ public: } private: - void DoSetTestB (bool v) {m_boolTestA = v;} - bool DoGetTestB (void) const {return m_boolTestA;} - int16_t DoGetInt16 (void) const {return m_int16SetGet;} - void DoSetInt16 (int16_t v) {m_int16SetGet = v;} - uint32_t DoGetVectorN (void) const {return m_vector2.size ();} - Ptr DoGetVector (uint32_t i) const {return m_vector2[i];} - bool DoSetIntSrc (int8_t v) {m_intSrc2 = v; return true;} - int8_t DoGetIntSrc (void) const {return m_intSrc2;} + void DoSetTestB (bool v) { m_boolTestA = v;} + bool DoGetTestB (void) const { return m_boolTestA;} + int16_t DoGetInt16 (void) const { return m_int16SetGet;} + void DoSetInt16 (int16_t v) { m_int16SetGet = v;} + uint32_t DoGetVectorN (void) const { return m_vector2.size ();} + Ptr DoGetVector (uint32_t i) const { return m_vector2[i];} + bool DoSetIntSrc (int8_t v) { m_intSrc2 = v; return true;} + int8_t DoGetIntSrc (void) const { return m_intSrc2;} bool m_boolTestA; bool m_boolTest; @@ -836,7 +836,7 @@ public: private: virtual void DoRun (void); - void NotifySource1 (int8_t old, int8_t n) {m_got1 = n;} + void NotifySource1 (int8_t old, int8_t n) { m_got1 = n;} int64_t m_got1; }; @@ -908,7 +908,7 @@ public: private: virtual void DoRun (void); - void NotifySource2 (double a, int b, float c) {m_got2 = a;} + void NotifySource2 (double a, int b, float c) { m_got2 = a;} double m_got2; }; @@ -982,7 +982,7 @@ public: private: virtual void DoRun (void); - void NotifySource2 (double a, int b, float c) {m_got2 = a;} + void NotifySource2 (double a, int b, float c) { m_got2 = a;} double m_got2; }; @@ -1078,7 +1078,7 @@ private: Callback m_cbValue; - void NotifyCallbackValue (int8_t a) {m_gotCbValue = a;} + void NotifyCallbackValue (int8_t a) { m_gotCbValue = a;} int16_t m_gotCbValue; }; @@ -1136,7 +1136,7 @@ CallbackValueTestCase::DoRun (void) // p->InvokeCbValue (3); NS_TEST_ASSERT_MSG_EQ (m_gotCbValue, 2, "Callback Attribute set to null callback unexpectedly fired"); - } +} // =========================================================================== // The Test Suite that glues all of the Test Cases together. diff --git a/src/core/test/callback-test-suite.cc b/src/core/test/callback-test-suite.cc index dbb7c9e10..ad82cbe91 100644 --- a/src/core/test/callback-test-suite.cc +++ b/src/core/test/callback-test-suite.cc @@ -31,10 +31,10 @@ public: BasicCallbackTestCase (); virtual ~BasicCallbackTestCase () {} - void Target1 (void) {m_test1 = true;} - int Target2 (void) {m_test2 = true; return 2;} - void Target3 (double a) {m_test3 = true;} - int Target4 (double a, int b) {m_test4 = true; return 4;} + void Target1 (void) { m_test1 = true;} + int Target2 (void) { m_test2 = true; return 2;} + void Target3 (double a) { m_test3 = true;} + int Target4 (double a, int b) { m_test4 = true; return 4;} private: virtual void DoRun (void); @@ -135,7 +135,7 @@ BasicCallbackTestCase::DoRun (void) // // Make sure we can declare and compile a Callback pointing to a non-member - // function that returns void, takes one integer argument and execute it. + // function that returns void, takes one integer argument and execute it. // We also need to provide two dummy arguments to the constructor here. // Callback target6 = Callback (&BasicCallbackTarget6, true, true); @@ -144,7 +144,7 @@ BasicCallbackTestCase::DoRun (void) // // Make sure we can declare and compile a Callback pointing to a non-member - // function that returns int, takes one integer argument and execute it. + // function that returns int, takes one integer argument and execute it. // We also need to provide two dummy arguments to the constructor here. // Callback target7 = Callback (&BasicCallbackTarget7, true, true); @@ -161,10 +161,10 @@ public: MakeCallbackTestCase (); virtual ~MakeCallbackTestCase () {} - void Target1 (void) {m_test1 = true;} - int Target2 (void) {m_test2 = true; return 2;} - void Target3 (double a) {m_test3 = true;} - int Target4 (double a, int b) {m_test4 = true; return 4;} + void Target1 (void) { m_test1 = true;} + int Target2 (void) { m_test2 = true; return 2;} + void Target3 (double a) { m_test3 = true;} + int Target4 (double a, int b) { m_test4 = true; return 4;} private: virtual void DoRun (void); @@ -263,7 +263,7 @@ MakeCallbackTestCase::DoRun (void) // // Make sure we can declare and compile a Callback pointing to a non-member - // function that returns void, takes one integer argument and execute it. + // function that returns void, takes one integer argument and execute it. // This uses a higher level call than in the basic tests so we do not need to // include any dummy arguments here. // @@ -273,7 +273,7 @@ MakeCallbackTestCase::DoRun (void) // // Make sure we can declare and compile a Callback pointing to a non-member - // function that returns int, takes one integer argument and execute it. + // function that returns int, takes one integer argument and execute it. // This uses a higher level call than in the basic tests so we do not need to // include any dummy arguments here. // @@ -387,7 +387,7 @@ public: NullifyCallbackTestCase (); virtual ~NullifyCallbackTestCase () {} - void Target1 (void) {m_test1 = true;} + void Target1 (void) { m_test1 = true;} private: virtual void DoRun (void); @@ -435,7 +435,7 @@ public: MakeCallbackTemplatesTestCase (); virtual ~MakeCallbackTemplatesTestCase () {} - void Target1 (void) {m_test1 = true;} + void Target1 (void) { m_test1 = true;} private: virtual void DoRun (void); diff --git a/src/core/test/config-test-suite.cc b/src/core/test/config-test-suite.cc index 56a65293f..625343c1b 100644 --- a/src/core/test/config-test-suite.cc +++ b/src/core/test/config-test-suite.cc @@ -69,36 +69,36 @@ ConfigTestObject::GetTypeId (void) static TypeId tid = TypeId ("ConfigTestObject") .SetParent () .AddAttribute ("NodesA", "", - ObjectVectorValue (), - MakeObjectVectorAccessor (&ConfigTestObject::m_nodesA), - MakeObjectVectorChecker ()) + ObjectVectorValue (), + MakeObjectVectorAccessor (&ConfigTestObject::m_nodesA), + MakeObjectVectorChecker ()) .AddAttribute ("NodesB", "", - ObjectVectorValue (), - MakeObjectVectorAccessor (&ConfigTestObject::m_nodesB), - MakeObjectVectorChecker ()) + ObjectVectorValue (), + MakeObjectVectorAccessor (&ConfigTestObject::m_nodesB), + MakeObjectVectorChecker ()) .AddAttribute ("NodeA", "", PointerValue (), - MakePointerAccessor (&ConfigTestObject::m_nodeA), - MakePointerChecker ()) + MakePointerAccessor (&ConfigTestObject::m_nodeA), + MakePointerChecker ()) .AddAttribute ("NodeB", "", PointerValue (), - MakePointerAccessor (&ConfigTestObject::m_nodeB), - MakePointerChecker ()) + MakePointerAccessor (&ConfigTestObject::m_nodeB), + MakePointerChecker ()) .AddAttribute ("A", "", - IntegerValue (10), - MakeIntegerAccessor (&ConfigTestObject::m_a), - MakeIntegerChecker ()) + IntegerValue (10), + MakeIntegerAccessor (&ConfigTestObject::m_a), + MakeIntegerChecker ()) .AddAttribute ("B", "", - IntegerValue (9), - MakeIntegerAccessor (&ConfigTestObject::m_b), - MakeIntegerChecker ()) + IntegerValue (9), + MakeIntegerAccessor (&ConfigTestObject::m_b), + MakeIntegerChecker ()) .AddAttribute ("Source", "XX", - IntegerValue (-1), - MakeIntegerAccessor (&ConfigTestObject::m_trace), - MakeIntegerChecker ()) + IntegerValue (-1), + MakeIntegerAccessor (&ConfigTestObject::m_trace), + MakeIntegerChecker ()) .AddTraceSource ("Source", "XX", - MakeTraceSourceAccessor (&ConfigTestObject::m_trace)) - ; + MakeTraceSourceAccessor (&ConfigTestObject::m_trace)) + ; return tid; } @@ -457,8 +457,8 @@ public: ObjectVectorTraceConfigTestCase (); virtual ~ObjectVectorTraceConfigTestCase () {} - void Trace (int16_t oldValue, int16_t newValue) {m_newValue = newValue;} - void TraceWithPath (std::string path, int16_t old, int16_t newValue) {m_newValue = newValue; m_path = path;} + void Trace (int16_t oldValue, int16_t newValue) { m_newValue = newValue;} + void TraceWithPath (std::string path, int16_t old, int16_t newValue) { m_newValue = newValue; m_path = path;} private: virtual void DoRun (void); diff --git a/src/core/test/examples-to-run.py b/src/core/test/examples-to-run.py index 23cf2c0f7..f21a72f9d 100644 --- a/src/core/test/examples-to-run.py +++ b/src/core/test/examples-to-run.py @@ -12,7 +12,7 @@ cpp_examples = [ ("main-callback", "True", "True"), ("sample-simulator", "True", "True"), ("main-ptr", "True", "True"), - ("main-random-variable", "True", "True"), + ("main-random-variable", "True", "False"), ("sample-random-variable", "True", "True"), ] diff --git a/src/core/test/global-value-test-suite.cc b/src/core/test/global-value-test-suite.cc index 0aaa31311..23c6b5127 100644 --- a/src/core/test/global-value-test-suite.cc +++ b/src/core/test/global-value-test-suite.cc @@ -49,8 +49,8 @@ GlobalValueTestCase::DoRun (void) // keep it hidden from the documentation. // GlobalValue uint = GlobalValue ("TestUint", "help text", - UintegerValue (10), - MakeUintegerChecker ()); + UintegerValue (10), + MakeUintegerChecker ()); // // Make sure we can get at the value and that it was initialized correctly. @@ -66,8 +66,8 @@ GlobalValueTestCase::DoRun (void) for (GlobalValue::Vector::iterator i = vector->begin (); i != vector->end (); ++i) { if ((*i) == &uint) - { - vector->erase (i); + { + vector->erase (i); break; } } diff --git a/src/core/test/int64x64-test-suite.cc b/src/core/test/int64x64-test-suite.cc index 836be9f2b..8bfacb4ca 100644 --- a/src/core/test/int64x64-test-suite.cc +++ b/src/core/test/int64x64-test-suite.cc @@ -17,9 +17,9 @@ Int64x64FracTestCase::CheckFrac (int64_t hi, uint64_t lo) { int64x64_t tmp = int64x64_t (hi,lo); NS_TEST_EXPECT_MSG_EQ (tmp.GetHigh (), hi, - "High part does not match"); + "High part does not match"); NS_TEST_EXPECT_MSG_EQ (tmp.GetLow (), lo, - "Low part does not match"); + "Low part does not match"); } Int64x64FracTestCase::Int64x64FracTestCase () @@ -273,25 +273,26 @@ Int64x64InvertTestCase::DoRun (void) { #define TEST(factor) \ do { \ - int64x64_t a; \ - a = int64x64_t::Invert (factor); \ - int64x64_t b = V (factor); \ - b.MulByInvert (a); \ - NS_TEST_ASSERT_MSG_EQ (b.GetHigh (), 1, \ - "x * 1/x should be 1 for x=" << factor); \ - int64x64_t c = V (1); \ - c.MulByInvert (a); \ - NS_TEST_ASSERT_MSG_EQ (c.GetHigh (), 0, \ - "1 * 1/x should be 0 for x=" << factor); \ - int64x64_t d = V (1); \ - d /= (V(factor)); \ - NS_TEST_ASSERT_MSG_EQ (d.GetDouble (), c.GetDouble (), \ - "1 * 1/x should be equal to 1/x for x=" << factor); \ - int64x64_t e = V (-factor); \ - e.MulByInvert (a); \ - NS_TEST_ASSERT_MSG_EQ (e.GetHigh (), -1, \ - "-x * 1/x should be -1 for x=" << factor); \ - } while(false) + int64x64_t a; \ + a = int64x64_t::Invert (factor); \ + int64x64_t b = V (factor); \ + b.MulByInvert (a); \ + NS_TEST_ASSERT_MSG_EQ (b.GetHigh (), 1, \ + "x * 1/x should be 1 for x=" << factor); \ + int64x64_t c = V (1); \ + c.MulByInvert (a); \ + NS_TEST_ASSERT_MSG_EQ (c.GetHigh (), 0, \ + "1 * 1/x should be 0 for x=" << factor); \ + int64x64_t d = V (1); \ + d /= (V(factor)); \ + NS_TEST_ASSERT_MSG_EQ (d.GetDouble (), c.GetDouble (), \ + "1 * 1/x should be equal to 1/x for x=" << factor); \ + int64x64_t e = V (-factor); \ + e.MulByInvert (a); \ + NS_TEST_ASSERT_MSG_EQ (e.GetHigh (), -1, \ + "-x * 1/x should be -1 for x=" << factor); \ + } \ + while(false) TEST(2); TEST(3); TEST(4); diff --git a/src/core/test/names-test-suite.cc b/src/core/test/names-test-suite.cc index 942e1ef36..07767e399 100644 --- a/src/core/test/names-test-suite.cc +++ b/src/core/test/names-test-suite.cc @@ -903,20 +903,20 @@ AlternateFindTestCase::DoRun (void) foundTestObject = Names::Find ("Test Object"); NS_TEST_ASSERT_MSG_EQ (foundTestObject, testObject, - "Could not find a previously named TestObject via GetObject"); + "Could not find a previously named TestObject via GetObject"); foundAlternateTestObject = Names::Find ("Alternate Test Object"); NS_TEST_ASSERT_MSG_EQ (foundAlternateTestObject, alternateTestObject, - "Could not find a previously named AlternateTestObject via GetObject"); + "Could not find a previously named AlternateTestObject via GetObject"); foundAlternateTestObject = Names::Find ("Test Object"); NS_TEST_ASSERT_MSG_EQ (foundAlternateTestObject, 0, - "Unexpectedly able to GetObject on a TestObject"); + "Unexpectedly able to GetObject on a TestObject"); foundTestObject = Names::Find ("Alternate Test Object"); NS_TEST_ASSERT_MSG_EQ (foundTestObject, 0, - "Unexpectedly able to GetObject on an AlternateTestObject"); + "Unexpectedly able to GetObject on an AlternateTestObject"); } class NamesTestSuite : public TestSuite diff --git a/src/core/test/ptr-test-suite.cc b/src/core/test/ptr-test-suite.cc index 99967b4ec..f85831a61 100644 --- a/src/core/test/ptr-test-suite.cc +++ b/src/core/test/ptr-test-suite.cc @@ -62,15 +62,17 @@ private: Base::Base () : m_count (1) -{} +{ +} Base::~Base () -{} -void +{ +} +void Base::Ref (void) const { m_count++; } -void +void Base::Unref (void) const { m_count--; @@ -82,7 +84,8 @@ Base::Unref (void) const NoCount::NoCount (PtrTestCase *test) : m_test (test) -{} +{ +} NoCount::~NoCount () { m_test->DestroyNotify (); @@ -95,19 +98,20 @@ NoCount::Nothing () const PtrTestCase::PtrTestCase (void) : TestCase ("Sanity checking of Ptr<>") -{} -void +{ +} +void PtrTestCase::DestroyNotify (void) { m_nDestroyed++; } -Ptr +Ptr PtrTestCase::CallTest (Ptr p) { return p; } -Ptr const +Ptr const PtrTestCase::CallTestConst (Ptr const p) { return p; @@ -263,7 +267,7 @@ static class PtrTestSuite : public TestSuite { public: PtrTestSuite () - : TestSuite ("ptr", UNIT) + : TestSuite ("ptr", UNIT) { AddTestCase (new PtrTestCase ()); } diff --git a/src/core/test/rng-test-suite.cc b/src/core/test/rng-test-suite.cc index ea859bb31..eb1b3b6a4 100644 --- a/src/core/test/rng-test-suite.cc +++ b/src/core/test/rng-test-suite.cc @@ -31,7 +31,7 @@ FillHistoRangeUniformly (double *array, uint32_t n, double start, double end) { double increment = (end - start) / (n - 1.); double d = start; - + for (uint32_t i = 0; i < n; ++i) { array[i] = d; @@ -98,7 +98,7 @@ RngUniformTestCase::ChiSquaredTest (UniformVariable &u) { chiSquared += tmp[i]; } - + return chiSquared; } @@ -195,7 +195,7 @@ RngNormalTestCase::ChiSquaredTest (NormalVariable &n) { chiSquared += tmp[i]; } - + return chiSquared; } @@ -291,7 +291,7 @@ RngExponentialTestCase::ChiSquaredTest (ExponentialVariable &e) { chiSquared += tmp[i]; } - + return chiSquared; } @@ -388,7 +388,7 @@ RngParetoTestCase::ChiSquaredTest (ParetoVariable &p) { chiSquared += tmp[i]; } - + return chiSquared; } diff --git a/src/test/sample-test-suite.cc b/src/core/test/sample-test-suite.cc similarity index 97% rename from src/test/sample-test-suite.cc rename to src/core/test/sample-test-suite.cc index c10f2bf3f..45e1be737 100644 --- a/src/test/sample-test-suite.cc +++ b/src/core/test/sample-test-suite.cc @@ -7,7 +7,7 @@ // to use the using directive to access the ns3 namespace directly using namespace ns3; -// This is an example TestCase. +// This is an example TestCase. class SampleTestCase1 : public TestCase { public: diff --git a/src/core/test/simulator-test-suite.cc b/src/core/test/simulator-test-suite.cc index 285c1eba0..0206c6477 100644 --- a/src/core/test/simulator-test-suite.cc +++ b/src/core/test/simulator-test-suite.cc @@ -53,13 +53,14 @@ SimulatorEventsTestCase::SimulatorEventsTestCase (ObjectFactory schedulerFactory : TestCase ("Check that basic event handling is working with " + schedulerFactory.GetTypeId ().GetName ()), m_schedulerFactory (schedulerFactory) -{} +{ +} uint64_t SimulatorEventsTestCase::NowUs (void) { uint64_t ns = Now ().GetNanoSeconds (); return ns / 1000; -} +} void SimulatorEventsTestCase::A (int a) @@ -249,7 +250,8 @@ static void cber5 (const int &, const int &, const int &, const int &, const int SimulatorTemplateTestCase::SimulatorTemplateTestCase () : TestCase ("Check that all templates are instanciated correctly. This is a compilation test, it cannot fail at runtime.") -{} +{ +} void SimulatorTemplateTestCase::DoRun (void) { diff --git a/src/core/test/time-test-suite.cc b/src/core/test/time-test-suite.cc index 6f2503c87..e31030c7d 100644 --- a/src/core/test/time-test-suite.cc +++ b/src/core/test/time-test-suite.cc @@ -39,7 +39,8 @@ private: TimeSimpleTestCase::TimeSimpleTestCase (enum Time::Unit resolution) : TestCase ("Sanity check of common time operations"), m_resolution (resolution) -{} +{ +} void TimeSimpleTestCase::DoSetup (void) diff --git a/src/core/test/type-traits-test-suite.cc b/src/core/test/type-traits-test-suite.cc index 66e02225f..f2b220ee4 100644 --- a/src/core/test/type-traits-test-suite.cc +++ b/src/core/test/type-traits-test-suite.cc @@ -39,12 +39,12 @@ TypeTraitsTestCase::TypeTraitsTestCase (void) void TypeTraitsTestCase::DoRun (void) { - NS_TEST_ASSERT_MSG_EQ (TypeTraits::IsPointerToMember, 1, "Check"); - NS_TEST_ASSERT_MSG_EQ (TypeTraits::IsPointerToMember, 1, "Check"); - NS_TEST_ASSERT_MSG_EQ (TypeTraits::IsPointerToMember, 1, "Check"); - NS_TEST_ASSERT_MSG_EQ (TypeTraits::IsPointerToMember, 1, "Check"); - NS_TEST_ASSERT_MSG_EQ (TypeTraits::PointerToMemberTraits::nArgs, 0, "Check"); - NS_TEST_ASSERT_MSG_EQ (TypeTraits::PointerToMemberTraits::nArgs, 1, "Check"); + NS_TEST_ASSERT_MSG_EQ (TypeTraits::IsPointerToMember, 1, "Check"); + NS_TEST_ASSERT_MSG_EQ (TypeTraits::IsPointerToMember, 1, "Check"); + NS_TEST_ASSERT_MSG_EQ (TypeTraits::IsPointerToMember, 1, "Check"); + NS_TEST_ASSERT_MSG_EQ (TypeTraits::IsPointerToMember, 1, "Check"); + NS_TEST_ASSERT_MSG_EQ (TypeTraits::PointerToMemberTraits::nArgs, 0, "Check"); + NS_TEST_ASSERT_MSG_EQ (TypeTraits::PointerToMemberTraits::nArgs, 1, "Check"); } class TypeTraitsTestSuite : public TestSuite diff --git a/src/core/test/watchdog-test-suite.cc b/src/core/test/watchdog-test-suite.cc index b781da7d2..36e1f6007 100644 --- a/src/core/test/watchdog-test-suite.cc +++ b/src/core/test/watchdog-test-suite.cc @@ -35,7 +35,8 @@ public: WatchdogTestCase::WatchdogTestCase() : TestCase ("Check that we can keepalive a watchdog") -{} +{ +} void WatchdogTestCase::Expire (Time expected) diff --git a/src/core/wscript b/src/core/wscript index a90ca45f6..62aa512e5 100644 --- a/src/core/wscript +++ b/src/core/wscript @@ -159,6 +159,7 @@ def build(bld): 'test/object-test-suite.cc', 'test/ptr-test-suite.cc', 'test/random-variable-test-suite.cc', + 'test/sample-test-suite.cc', 'test/simulator-test-suite.cc', 'test/time-test-suite.cc', 'test/timer-test-suite.cc', diff --git a/src/csma-layout/examples/csma-star.cc b/src/csma-layout/examples/csma-star.cc index d2788645a..1b0e6a280 100644 --- a/src/csma-layout/examples/csma-star.cc +++ b/src/csma-layout/examples/csma-star.cc @@ -112,21 +112,21 @@ main (int argc, char *argv[]) // Ipv4AddressHelper address; for(uint32_t i = 0; i < star.SpokeCount (); ++i) - { - std::ostringstream subnet; - subnet << "10.1." << i << ".0"; - NS_LOG_INFO ("Assign IP Addresses for CSMA subnet " << subnet.str ()); - address.SetBase (subnet.str ().c_str (), "255.255.255.0", "0.0.0.3"); + { + std::ostringstream subnet; + subnet << "10.1." << i << ".0"; + NS_LOG_INFO ("Assign IP Addresses for CSMA subnet " << subnet.str ()); + address.SetBase (subnet.str ().c_str (), "255.255.255.0", "0.0.0.3"); - for (uint32_t j = 0; j < nFill; ++j) - { - address.Assign (fillDevices.Get (i * nFill + j)); - } - } + for (uint32_t j = 0; j < nFill; ++j) + { + address.Assign (fillDevices.Get (i * nFill + j)); + } + } NS_LOG_INFO ("Create applications."); // - // Create a packet sink on the star "hub" to receive packets. + // Create a packet sink on the star "hub" to receive packets. // uint16_t port = 50000; Address hubLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port)); diff --git a/src/csma-layout/model/csma-star-helper.cc b/src/csma-layout/model/csma-star-helper.cc index 723dbb9e6..b4089f3a1 100644 --- a/src/csma-layout/model/csma-star-helper.cc +++ b/src/csma-layout/model/csma-star-helper.cc @@ -27,7 +27,7 @@ NS_LOG_COMPONENT_DEFINE("CsmaStarHelper"); namespace ns3 { - + CsmaStarHelper::CsmaStarHelper (uint32_t numSpokes, CsmaHelper csmaHelper) { @@ -44,15 +44,16 @@ CsmaStarHelper::CsmaStarHelper (uint32_t numSpokes, } CsmaStarHelper::~CsmaStarHelper () -{} +{ +} -Ptr +Ptr CsmaStarHelper::GetHub () const { return m_hub.Get (0); } -Ptr +Ptr CsmaStarHelper::GetSpokeNode (uint32_t i) const { return m_spokes.Get (i); @@ -61,7 +62,7 @@ CsmaStarHelper::GetSpokeNode (uint32_t i) const NetDeviceContainer CsmaStarHelper::GetHubDevices () const { - return m_spokeDevices; + return m_hubDevices; } NetDeviceContainer @@ -82,7 +83,7 @@ CsmaStarHelper::GetSpokeIpv4Address (uint32_t i) const return m_spokeInterfaces.GetAddress (i); } -uint32_t +uint32_t CsmaStarHelper::SpokeCount () const { return m_spokes.GetN (); diff --git a/src/csma-layout/model/csma-star-helper.h b/src/csma-layout/model/csma-star-helper.h index bd72d53d7..172d884ed 100644 --- a/src/csma-layout/model/csma-star-helper.h +++ b/src/csma-layout/model/csma-star-helper.h @@ -27,8 +27,15 @@ #include "ipv4-interface-container.h" namespace ns3 { - + /** + * \defgroup csmalayout CSMA Layout Helpers + * + */ + +/** + * \ingroup csmalayout + * * \brief A helper to make it easier to create a star topology * with Csma links */ diff --git a/src/csma/doc/csma.h b/src/csma/doc/csma.h index f56fba0b7..cf07a78c5 100644 --- a/src/csma/doc/csma.h +++ b/src/csma/doc/csma.h @@ -1,6 +1,5 @@ /** - * \ingroup devices - * \defgroup CsmaModel CSMA Model + * \defgroup CsmaModel CSMA Device * * \section CsmaModelOverview CSMA Model Overview * diff --git a/doc/manual/source/csma.rst b/src/csma/doc/csma.rst similarity index 100% rename from doc/manual/source/csma.rst rename to src/csma/doc/csma.rst diff --git a/src/csma/examples/csma-broadcast.cc b/src/csma/examples/csma-broadcast.cc index 1534bd2dc..42aef40a2 100644 --- a/src/csma/examples/csma-broadcast.cc +++ b/src/csma/examples/csma-broadcast.cc @@ -20,8 +20,8 @@ // Network topology // ============== // | | -// n0 n1 n2 -// | | +// n0 n1 n2 +// | | // ========== // // n0 originates UDP broadcast to 255.255.255.255/discard port, which @@ -91,7 +91,7 @@ main (int argc, char *argv[]) // 512 bytes (default) at a rate of 500 Kb/s (default) from n0 NS_LOG_INFO ("Create Applications."); OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address ("255.255.255.255"), port))); + Address (InetSocketAddress (Ipv4Address ("255.255.255.255"), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); @@ -99,10 +99,10 @@ main (int argc, char *argv[]) // Start the application app.Start (Seconds (1.0)); app.Stop (Seconds (10.0)); - + // Create an optional packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); app = sink.Install (c0.Get (1)); app.Add (sink.Install (c1.Get (1))); app.Start (Seconds (1.0)); @@ -121,7 +121,7 @@ main (int argc, char *argv[]) csma.EnablePcapAll ("csma-broadcast", false); NS_LOG_INFO ("Run Simulation."); - Simulator::Run (); + Simulator::Run (); Simulator::Destroy (); NS_LOG_INFO ("Done."); } diff --git a/src/csma/examples/csma-multicast.cc b/src/csma/examples/csma-multicast.cc index cca50c2a3..9f11636fb 100644 --- a/src/csma/examples/csma-multicast.cc +++ b/src/csma/examples/csma-multicast.cc @@ -52,10 +52,10 @@ main (int argc, char *argv[]) // LogComponentEnable ("CsmaMulticastExample", LOG_LEVEL_INFO); // - // Set up default values for the simulation. + // Set up default values for the simulation. // // Select DIX/Ethernet II-style encapsulation (no LLC/Snap header) - Config::SetDefault ("ns3::CsmaNetDevice::EncapsulationMode", StringValue ("Dix")); + Config::SetDefault ("ns3::CsmaNetDevice::EncapsulationMode", StringValue ("Dix")); // Allow the user to override any of the defaults at // run-time, via command-line arguments @@ -68,7 +68,7 @@ main (int argc, char *argv[]) // We will later want two subcontainers of these nodes, for the two LANs NodeContainer c0 = NodeContainer (c.Get (0), c.Get (1), c.Get (2)); NodeContainer c1 = NodeContainer (c.Get (2), c.Get (3), c.Get (4)); - + NS_LOG_INFO ("Build Topology."); CsmaHelper csma; csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000))); @@ -95,7 +95,7 @@ main (int argc, char *argv[]) // source is at node zero, which we assigned the IP address of 10.1.1.1 // earlier. We need to define a multicast group to send packets to. This // can be any multicast address from 224.0.0.0 through 239.255.255.255 - // (avoiding the reserved routing protocol addresses). + // (avoiding the reserved routing protocol addresses). // Ipv4Address multicastSource ("10.1.1.1"); @@ -115,8 +115,8 @@ main (int argc, char *argv[]) outputDevices.Add (nd1.Get (0)); // (we only need one NetDevice here) multicast.AddMulticastRoute (multicastRouter, multicastSource, - multicastGroup, inputIf, outputDevices); - + multicastGroup, inputIf, outputDevices); + // 2) Set up a default multicast route on the sender n0 Ptr sender = c.Get (0); Ptr senderIf = nd0.Get(0); @@ -133,7 +133,7 @@ main (int argc, char *argv[]) // Configure a multicast packet generator that generates a packet // every few seconds OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (multicastGroup, multicastPort))); + Address (InetSocketAddress (multicastGroup, multicastPort))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff.SetAttribute ("DataRate", DataRateValue (DataRate ("255b/s"))); diff --git a/src/csma/examples/csma-one-subnet.cc b/src/csma/examples/csma-one-subnet.cc index 9afeea3a4..55efcc6f5 100644 --- a/src/csma/examples/csma-one-subnet.cc +++ b/src/csma/examples/csma-one-subnet.cc @@ -99,7 +99,7 @@ main (int argc, char *argv[]) // Create an optional packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); app = sink.Install (nodes.Get (1)); app.Start (Seconds (0.0)); diff --git a/src/csma/examples/csma-packet-socket.cc b/src/csma/examples/csma-packet-socket.cc index 9a25829c4..2e8b4ba76 100644 --- a/src/csma/examples/csma-packet-socket.cc +++ b/src/csma/examples/csma-packet-socket.cc @@ -72,8 +72,8 @@ main (int argc, char *argv[]) // create the shared medium used by all csma devices. NS_LOG_INFO ("Create channels."); Ptr channel = CreateObjectWithAttributes ( - "DataRate", DataRateValue (DataRate(5000000)), - "Delay", TimeValue (MilliSeconds(2))); + "DataRate", DataRateValue (DataRate(5000000)), + "Delay", TimeValue (MilliSeconds(2))); // use a helper function to connect our nodes to the shared channel. NS_LOG_INFO ("Build Topology."); diff --git a/src/csma/examples/csma-ping.cc b/src/csma/examples/csma-ping.cc index e6fc626e4..154c1b983 100644 --- a/src/csma/examples/csma-ping.cc +++ b/src/csma/examples/csma-ping.cc @@ -121,7 +121,7 @@ main (int argc, char *argv[]) MakeCallback (&PingRtt)); Packet::EnablePrinting (); - + NS_LOG_INFO ("Run Simulation."); Simulator::Run (); diff --git a/src/csma/examples/csma-raw-ip-socket.cc b/src/csma/examples/csma-raw-ip-socket.cc index 6b708aec6..900e18561 100644 --- a/src/csma/examples/csma-raw-ip-socket.cc +++ b/src/csma/examples/csma-raw-ip-socket.cc @@ -111,7 +111,7 @@ main (int argc, char *argv[]) MakeCallback (&SinkRx)); Packet::EnablePrinting (); - + NS_LOG_INFO ("Run Simulation."); Simulator::Run (); diff --git a/src/csma/helper/csma-star-helper.cc b/src/csma/helper/csma-star-helper.cc deleted file mode 100644 index ba212350b..000000000 --- a/src/csma/helper/csma-star-helper.cc +++ /dev/null @@ -1,110 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -// ns3 includes -#include "ns3/animation-interface.h" -#include "ns3/csma-star-helper.h" - -#include "ns3/node-list.h" -#include "ns3/point-to-point-net-device.h" -#include "ns3/vector.h" - -NS_LOG_COMPONENT_DEFINE("CsmaStarHelper"); - -namespace ns3 { - -CsmaStarHelper::CsmaStarHelper (uint32_t numSpokes, - CsmaHelper csmaHelper) -{ - m_hub.Create (1); - m_spokes.Create (numSpokes); - - for (uint32_t i = 0; i < m_spokes.GetN (); ++i) - { - NodeContainer nodes (m_hub.Get (0), m_spokes.Get (i)); - NetDeviceContainer nd = csmaHelper.Install (nodes); - m_hubDevices.Add (nd.Get (0)); - m_spokeDevices.Add (nd.Get (1)); - } -} - -CsmaStarHelper::~CsmaStarHelper () -{} - -Ptr -CsmaStarHelper::GetHub () const -{ - return m_hub.Get (0); -} - -Ptr -CsmaStarHelper::GetSpokeNode (uint32_t i) const -{ - return m_spokes.Get (i); -} - -NetDeviceContainer -CsmaStarHelper::GetHubDevices () const -{ - return m_spokeDevices; -} - -NetDeviceContainer -CsmaStarHelper::GetSpokeDevices () const -{ - return m_spokeDevices; -} - -Ipv4Address -CsmaStarHelper::GetHubIpv4Address (uint32_t i) const -{ - return m_hubInterfaces.GetAddress (i); -} - -Ipv4Address -CsmaStarHelper::GetSpokeIpv4Address (uint32_t i) const -{ - return m_spokeInterfaces.GetAddress (i); -} - -uint32_t -CsmaStarHelper::SpokeCount () const -{ - return m_spokes.GetN (); -} - -void -CsmaStarHelper::InstallStack (InternetStackHelper stack) -{ - stack.Install (m_hub); - stack.Install (m_spokes); -} - -void -CsmaStarHelper::AssignIpv4Addresses (Ipv4AddressHelper address) -{ - for (uint32_t i = 0; i < m_spokes.GetN (); ++i) - { - m_hubInterfaces.Add (address.Assign (m_hubDevices.Get (i))); - m_spokeInterfaces.Add (address.Assign (m_spokeDevices.Get (i))); - address.NewNetwork (); - } -} - -} // namespace ns3 diff --git a/src/csma/helper/csma-star-helper.h b/src/csma/helper/csma-star-helper.h deleted file mode 100644 index dd07d0fb1..000000000 --- a/src/csma/helper/csma-star-helper.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -// Define an object to create a dumbbell topology. - -#ifndef CSMA_STAR_HELPER_H -#define CSMA_STAR_HELPER_H - -#include - -#include "csma-helper.h" -#include "ipv4-address-helper.h" -#include "internet-stack-helper.h" -#include "ipv4-interface-container.h" - -namespace ns3 { - -/** - * \brief A helper to make it easier to create a star topology - * with Csma links - */ -class CsmaStarHelper -{ -public: - /** - * Create a CsmaStarHelper in order to easily create - * star topologies using Csma links - * - * \param numSpokes the number of links attached to - * the hub node, creating a total of - * numSpokes + 1 nodes - * - * \param csmaHelper the link helper for Csma links, - * used to link nodes together - */ - CsmaStarHelper (uint32_t numSpokes, - CsmaHelper csmaHelper); - - ~CsmaStarHelper (); - -public: - /** - * \returns a node pointer to the hub node in the - * star, i.e., the center node - */ - Ptr GetHub () const; - - /** - * \param i an index into the spokes of the star - * - * \returns a node pointer to the node at the indexed spoke - */ - Ptr GetSpokeNode (uint32_t i) const; - - /** - * \returns the net-device container which contains all of - * the devices on the hub node - */ - NetDeviceContainer GetHubDevices () const; - - /** - * \returns the net-device container which contains all of - * the spoke node devices - */ - NetDeviceContainer GetSpokeDevices () const; - - /** - * \param i index into the hub interfaces - * - * \returns Ipv4Address according to indexed hub interface - */ - Ipv4Address GetHubIpv4Address (uint32_t i) const; - - /** - * \param i index into the spoke interfaces - * - * \returns Ipv4Address according to indexed spoke interface - */ - Ipv4Address GetSpokeIpv4Address (uint32_t i) const; - - /** - * \returns the total number of spokes in the star - */ - uint32_t SpokeCount () const; - - /** - * \param stack an InternetStackHelper which is used to install - * on every node in the star - */ - void InstallStack (InternetStackHelper stack); - - /** - * \param address an Ipv4AddressHelper which is used to install - * Ipv4 addresses on all the node interfaces in - * the star - */ - void AssignIpv4Addresses (Ipv4AddressHelper address); - -private: - NodeContainer m_hub; - NetDeviceContainer m_hubDevices; - NodeContainer m_spokes; - NetDeviceContainer m_spokeDevices; - Ipv4InterfaceContainer m_hubInterfaces; - Ipv4InterfaceContainer m_spokeInterfaces; -}; - -} // namespace ns3 - -#endif /* CSMA_STAR_HELPER_H */ diff --git a/src/csma/model/backoff.cc b/src/csma/model/backoff.cc index a8b80426d..00939bf48 100644 --- a/src/csma/model/backoff.cc +++ b/src/csma/model/backoff.cc @@ -41,7 +41,7 @@ Backoff::Backoff(Time slotTime, uint32_t minSlots, uint32_t maxSlots, uint32_t c m_ceiling = ceiling; m_maxRetries = maxRetries; m_rng = UniformVariable (); -} +} Time Backoff::GetBackoffTime (void) diff --git a/src/csma/model/backoff.h b/src/csma/model/backoff.h index 9e216952c..88528142a 100644 --- a/src/csma/model/backoff.h +++ b/src/csma/model/backoff.h @@ -28,11 +28,11 @@ Transmi */ namespace ns3 { - /** - * \brief The backoff class is used for calculating backoff times - * when many net devices can write to the same channel - * - */ +/** + * \brief The backoff class is used for calculating backoff times + * when many net devices can write to the same channel + * + */ class Backoff { public: diff --git a/src/csma/model/csma-channel.cc b/src/csma/model/csma-channel.cc index c5a4d97cc..b59359036 100644 --- a/src/csma/model/csma-channel.cc +++ b/src/csma/model/csma-channel.cc @@ -30,7 +30,7 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (CsmaChannel); - TypeId +TypeId CsmaChannel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::CsmaChannel") @@ -45,32 +45,32 @@ CsmaChannel::GetTypeId (void) TimeValue (Seconds (0)), MakeTimeAccessor (&CsmaChannel::m_delay), MakeTimeChecker ()) - ; + ; return tid; } CsmaChannel::CsmaChannel () -: - Channel () + : + Channel () { NS_LOG_FUNCTION_NOARGS (); m_state = IDLE; m_deviceList.clear(); } - int32_t +int32_t CsmaChannel::Attach (Ptr device) { NS_LOG_FUNCTION (this << device); NS_ASSERT (device != 0); CsmaDeviceRec rec (device); - + m_deviceList.push_back (rec); return (m_deviceList.size () - 1); } - bool +bool CsmaChannel::Reattach (Ptr device) { NS_LOG_FUNCTION (this << device); @@ -95,7 +95,7 @@ CsmaChannel::Reattach (Ptr device) return false; } - bool +bool CsmaChannel::Reattach (uint32_t deviceId) { NS_LOG_FUNCTION (this << deviceId); @@ -116,7 +116,7 @@ CsmaChannel::Reattach (uint32_t deviceId) } } - bool +bool CsmaChannel::Detach (uint32_t deviceId) { NS_LOG_FUNCTION (this << deviceId); @@ -144,7 +144,7 @@ CsmaChannel::Detach (uint32_t deviceId) } } - bool +bool CsmaChannel::Detach (Ptr device) { NS_LOG_FUNCTION (this << device); @@ -162,7 +162,7 @@ CsmaChannel::Detach (Ptr device) return false; } - bool +bool CsmaChannel::TransmitStart (Ptr p, uint32_t srcId) { NS_LOG_FUNCTION (this << p << srcId); @@ -187,13 +187,13 @@ CsmaChannel::TransmitStart (Ptr p, uint32_t srcId) return true; } - bool +bool CsmaChannel::IsActive(uint32_t deviceId) { return (m_deviceList[deviceId].active); } - bool +bool CsmaChannel::TransmitEnd() { NS_LOG_FUNCTION (this << m_currentPkt << m_currentSrc); @@ -214,7 +214,7 @@ CsmaChannel::TransmitEnd() NS_LOG_LOGIC ("Receive"); - + std::vector::iterator it; uint32_t devId = 0; for (it = m_deviceList.begin (); it < m_deviceList.end(); it++) @@ -236,7 +236,7 @@ CsmaChannel::TransmitEnd() return retVal; } - void +void CsmaChannel::PropagationCompleteEvent() { NS_LOG_FUNCTION (this << m_currentPkt); @@ -246,7 +246,7 @@ CsmaChannel::PropagationCompleteEvent() m_state = IDLE; } - uint32_t +uint32_t CsmaChannel::GetNumActDevices (void) { int numActDevices = 0; @@ -261,20 +261,20 @@ CsmaChannel::GetNumActDevices (void) return numActDevices; } - uint32_t +uint32_t CsmaChannel::GetNDevices (void) const { return (m_deviceList.size ()); } - Ptr +Ptr CsmaChannel::GetCsmaDevice (uint32_t i) const { Ptr netDevice = m_deviceList[i].devicePtr; return netDevice; } - int32_t +int32_t CsmaChannel::GetDeviceNum (Ptr device) { std::vector::iterator it; @@ -297,7 +297,7 @@ CsmaChannel::GetDeviceNum (Ptr device) return -1; } - bool +bool CsmaChannel::IsBusy (void) { if (m_state == IDLE) @@ -310,25 +310,25 @@ CsmaChannel::IsBusy (void) } } - DataRate +DataRate CsmaChannel::GetDataRate (void) { return m_bps; } - Time +Time CsmaChannel::GetDelay (void) { return m_delay; } - WireState +WireState CsmaChannel::GetState (void) { return m_state; } - Ptr +Ptr CsmaChannel::GetDevice (uint32_t i) const { return GetCsmaDevice (i); @@ -345,7 +345,7 @@ CsmaDeviceRec::CsmaDeviceRec (Ptr device) active = true; } - bool +bool CsmaDeviceRec::IsActive () { return active; diff --git a/src/csma/model/csma-channel.h b/src/csma/model/csma-channel.h index d59ff96f3..2c5131063 100644 --- a/src/csma/model/csma-channel.h +++ b/src/csma/model/csma-channel.h @@ -50,18 +50,18 @@ public: * \return If the net device pointed to by the devicePtr is active * and ready to RX/TX. */ - bool IsActive(); + bool IsActive(); }; /** * Current state of the channel */ enum WireState - { - IDLE, /**< Channel is IDLE, no packet is being transmitted */ - TRANSMITTING, /**< Channel is BUSY, a packet is being written by a net device */ - PROPAGATING /**< Channel is BUSY, packet is propagating to all attached net devices */ - }; +{ + IDLE, /**< Channel is IDLE, no packet is being transmitted */ + TRANSMITTING, /**< Channel is BUSY, a packet is being written by a net device */ + PROPAGATING /**< Channel is BUSY, packet is propagating to all attached net devices */ +}; /** * \brief Csma Channel. @@ -210,7 +210,7 @@ public: * free. */ bool IsBusy (); - + /** * \brief Indicates if a net device is currently attached or * detached from the channel. diff --git a/src/csma/model/csma-net-device.cc b/src/csma/model/csma-net-device.cc index f5d018ef8..3c26414aa 100644 --- a/src/csma/model/csma-net-device.cc +++ b/src/csma/model/csma-net-device.cc @@ -39,7 +39,7 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (CsmaNetDevice); - TypeId +TypeId CsmaNetDevice::GetTypeId (void) { static TypeId tid = TypeId ("ns3::CsmaNetDevice") @@ -148,12 +148,12 @@ CsmaNetDevice::GetTypeId (void) .AddTraceSource ("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device", MakeTraceSourceAccessor (&CsmaNetDevice::m_promiscSnifferTrace)) - ; + ; return tid; } CsmaNetDevice::CsmaNetDevice () - : m_linkUp (false) + : m_linkUp (false) { NS_LOG_FUNCTION (this); m_txMachineState = READY; @@ -180,7 +180,7 @@ CsmaNetDevice::~CsmaNetDevice() m_queue = 0; } - void +void CsmaNetDevice::DoDispose () { NS_LOG_FUNCTION_NOARGS (); @@ -189,7 +189,7 @@ CsmaNetDevice::DoDispose () NetDevice::DoDispose (); } - void +void CsmaNetDevice::SetEncapsulationMode (enum EncapsulationMode mode) { NS_LOG_FUNCTION (mode); @@ -200,13 +200,13 @@ CsmaNetDevice::SetEncapsulationMode (enum EncapsulationMode mode) NS_LOG_LOGIC ("m_mtu = " << m_mtu); } - CsmaNetDevice::EncapsulationMode +CsmaNetDevice::EncapsulationMode CsmaNetDevice::GetEncapsulationMode (void) { NS_LOG_FUNCTION_NOARGS (); return m_encapMode; } - + bool CsmaNetDevice::SetMtu (uint16_t mtu) { @@ -219,7 +219,7 @@ CsmaNetDevice::SetMtu (uint16_t mtu) return true; } - uint16_t +uint16_t CsmaNetDevice::GetMtu (void) const { NS_LOG_FUNCTION_NOARGS (); @@ -227,42 +227,42 @@ CsmaNetDevice::GetMtu (void) const } - void +void CsmaNetDevice::SetSendEnable (bool sendEnable) { NS_LOG_FUNCTION (sendEnable); m_sendEnable = sendEnable; } - void +void CsmaNetDevice::SetReceiveEnable (bool receiveEnable) { NS_LOG_FUNCTION (receiveEnable); m_receiveEnable = receiveEnable; } - bool +bool CsmaNetDevice::IsSendEnabled (void) { NS_LOG_FUNCTION_NOARGS (); return m_sendEnable; } - bool +bool CsmaNetDevice::IsReceiveEnabled (void) { NS_LOG_FUNCTION_NOARGS (); return m_receiveEnable; } - void +void CsmaNetDevice::SetInterframeGap (Time t) { NS_LOG_FUNCTION (t); m_tInterframeGap = t; } - void +void CsmaNetDevice::SetBackoffParams (Time slotTime, uint32_t minSlots, uint32_t maxSlots, uint32_t ceiling, uint32_t maxRetries) { NS_LOG_FUNCTION (slotTime << minSlots << maxSlots << ceiling << maxRetries); @@ -273,7 +273,7 @@ CsmaNetDevice::SetBackoffParams (Time slotTime, uint32_t minSlots, uint32_t maxS m_backoff.m_maxRetries = maxRetries; } - void +void CsmaNetDevice::AddHeader (Ptr p, Mac48Address source, Mac48Address dest, uint16_t protocolNumber) { NS_LOG_FUNCTION (p << source << dest << protocolNumber); @@ -321,6 +321,13 @@ CsmaNetDevice::AddHeader (Ptr p, Mac48Address source, Mac48Address de llc.SetType (protocolNumber); p->AddHeader (llc); + // + // This corresponds to the length interpretation of the lengthType + // field but with an LLC/SNAP header added to the payload as in + // IEEE 802.2 + // + lengthType = p->GetSize (); + // // All Ethernet frames must carry a minimum payload of 46 bytes. The // LLC SNAP header counts as part of this payload. We need to padd out @@ -335,14 +342,9 @@ CsmaNetDevice::AddHeader (Ptr p, Mac48Address source, Mac48Address de p->AddAtEnd (padd); } - // - // This corresponds to the length interpretation of the lengthType field, - // but with an LLC/SNAP header added to the payload as in IEEE 802.2 - // - lengthType = p->GetSize (); - NS_ASSERT_MSG (lengthType <= GetMtu (), - "CsmaNetDevice::AddHeader(): 802.3 Length/Type field with LLC/SNAP: " - "length interpretation must not exceed device frame size minus overhead"); + NS_ASSERT_MSG (p->GetSize () <= GetMtu (), + "CsmaNetDevice::AddHeader(): 802.3 Length/Type field with LLC/SNAP: " + "length interpretation must not exceed device frame size minus overhead"); } break; case ILLEGAL: @@ -364,7 +366,7 @@ CsmaNetDevice::AddHeader (Ptr p, Mac48Address source, Mac48Address de } #if 0 - bool +bool CsmaNetDevice::ProcessHeader (Ptr p, uint16_t & param) { NS_LOG_FUNCTION (p << param); @@ -402,7 +404,7 @@ CsmaNetDevice::ProcessHeader (Ptr p, uint16_t & param) } #endif - void +void CsmaNetDevice::TransmitStart (void) { NS_LOG_FUNCTION_NOARGS (); @@ -495,7 +497,7 @@ CsmaNetDevice::TransmitStart (void) } } - void +void CsmaNetDevice::TransmitAbort (void) { NS_LOG_FUNCTION_NOARGS (); @@ -539,7 +541,7 @@ CsmaNetDevice::TransmitAbort (void) } } - void +void CsmaNetDevice::TransmitCompleteEvent (void) { NS_LOG_FUNCTION_NOARGS (); @@ -571,7 +573,7 @@ CsmaNetDevice::TransmitCompleteEvent (void) Simulator::Schedule (m_tInterframeGap, &CsmaNetDevice::TransmitReadyEvent, this); } - void +void CsmaNetDevice::TransmitReadyEvent (void) { NS_LOG_FUNCTION_NOARGS (); @@ -607,7 +609,7 @@ CsmaNetDevice::TransmitReadyEvent (void) } } - bool +bool CsmaNetDevice::Attach (Ptr ch) { NS_LOG_FUNCTION (this << &ch); @@ -633,21 +635,21 @@ CsmaNetDevice::Attach (Ptr ch) return true; } - void +void CsmaNetDevice::SetQueue (Ptr q) { NS_LOG_FUNCTION (q); m_queue = q; } - void +void CsmaNetDevice::SetReceiveErrorModel (Ptr em) { NS_LOG_FUNCTION (em); m_receiveErrorModel = em; } - void +void CsmaNetDevice::Receive (Ptr packet, Ptr senderDevice) { NS_LOG_FUNCTION (packet << senderDevice); @@ -721,6 +723,14 @@ CsmaNetDevice::Receive (Ptr packet, Ptr senderDevice) // if (header.GetLengthType () <= 1500) { + NS_ASSERT (packet->GetSize () >= header.GetLengthType ()); + uint32_t padlen = packet->GetSize () - header.GetLengthType (); + NS_ASSERT (padlen <= 46); + if (padlen > 0) + { + packet->RemoveAtEnd (padlen); + } + LlcSnapHeader llc; packet->RemoveHeader (llc); protocol = llc.GetType (); @@ -741,7 +751,7 @@ CsmaNetDevice::Receive (Ptr packet, Ptr senderDevice) } else if (header.GetDestination ().IsGroup ()) { - packetType = PACKET_MULTICAST; + packetType = PACKET_MULTICAST; } else if (header.GetDestination () == m_address) { @@ -777,14 +787,14 @@ CsmaNetDevice::Receive (Ptr packet, Ptr senderDevice) } } - Ptr +Ptr CsmaNetDevice::GetQueue (void) const { NS_LOG_FUNCTION_NOARGS (); return m_queue; } - void +void CsmaNetDevice::NotifyLinkUp (void) { NS_LOG_FUNCTION_NOARGS (); @@ -792,77 +802,77 @@ CsmaNetDevice::NotifyLinkUp (void) m_linkChangeCallbacks (); } - void +void CsmaNetDevice::SetIfIndex (const uint32_t index) { NS_LOG_FUNCTION (index); m_ifIndex = index; } - uint32_t +uint32_t CsmaNetDevice::GetIfIndex (void) const { NS_LOG_FUNCTION_NOARGS (); return m_ifIndex; } - Ptr +Ptr CsmaNetDevice::GetChannel (void) const { NS_LOG_FUNCTION_NOARGS (); return m_channel; } - void +void CsmaNetDevice::SetAddress (Address address) { NS_LOG_FUNCTION_NOARGS (); m_address = Mac48Address::ConvertFrom (address); } - Address +Address CsmaNetDevice::GetAddress (void) const { NS_LOG_FUNCTION_NOARGS (); return m_address; } - bool +bool CsmaNetDevice::IsLinkUp (void) const { NS_LOG_FUNCTION_NOARGS (); return m_linkUp; } - void +void CsmaNetDevice::AddLinkChangeCallback (Callback callback) { NS_LOG_FUNCTION (&callback); m_linkChangeCallbacks.ConnectWithoutContext (callback); } - bool +bool CsmaNetDevice::IsBroadcast (void) const { NS_LOG_FUNCTION_NOARGS (); return true; } - Address +Address CsmaNetDevice::GetBroadcast (void) const { NS_LOG_FUNCTION_NOARGS (); return Mac48Address ("ff:ff:ff:ff:ff:ff"); } - bool +bool CsmaNetDevice::IsMulticast (void) const { NS_LOG_FUNCTION_NOARGS (); return true; } - Address +Address CsmaNetDevice::GetMulticast (Ipv4Address multicastGroup) const { NS_LOG_FUNCTION (multicastGroup); @@ -879,28 +889,28 @@ CsmaNetDevice::GetMulticast (Ipv4Address multicastGroup) const return ad; } - bool +bool CsmaNetDevice::IsPointToPoint (void) const { NS_LOG_FUNCTION_NOARGS (); return false; } - bool +bool CsmaNetDevice::IsBridge (void) const { NS_LOG_FUNCTION_NOARGS (); return false; } - bool +bool CsmaNetDevice::Send (Ptr packet,const Address& dest, uint16_t protocolNumber) { NS_LOG_FUNCTION (packet << dest << protocolNumber); return SendFrom (packet, m_address, dest, protocolNumber); } - bool +bool CsmaNetDevice::SendFrom (Ptr packet, const Address& src, const Address& dest, uint16_t protocolNumber) { NS_LOG_FUNCTION (packet << src << dest << protocolNumber); @@ -953,14 +963,14 @@ CsmaNetDevice::SendFrom (Ptr packet, const Address& src, const Address& return true; } - Ptr +Ptr CsmaNetDevice::GetNode (void) const { NS_LOG_FUNCTION_NOARGS (); return m_node; } - void +void CsmaNetDevice::SetNode (Ptr node) { NS_LOG_FUNCTION (node); @@ -968,14 +978,14 @@ CsmaNetDevice::SetNode (Ptr node) m_node = node; } - bool +bool CsmaNetDevice::NeedsArp (void) const { NS_LOG_FUNCTION_NOARGS (); return true; } - void +void CsmaNetDevice::SetReceiveCallback (NetDevice::ReceiveCallback cb) { NS_LOG_FUNCTION (&cb); @@ -990,14 +1000,14 @@ Address CsmaNetDevice::GetMulticast (Ipv6Address addr) const return ad; } - void +void CsmaNetDevice::SetPromiscReceiveCallback (NetDevice::PromiscReceiveCallback cb) { NS_LOG_FUNCTION (&cb); m_promiscRxCallback = cb; } - bool +bool CsmaNetDevice::SupportsSendFrom () const { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/csma/model/csma-net-device.h b/src/csma/model/csma-net-device.h index af16ceb38..a2ccdf5ab 100644 --- a/src/csma/model/csma-net-device.h +++ b/src/csma/model/csma-net-device.h @@ -60,7 +60,7 @@ public: enum EncapsulationMode { ILLEGAL, /**< Encapsulation mode not set */ DIX, /**< DIX II / Ethernet II packet */ - LLC, /**< 802.2 LLC/SNAP Packet*/ + LLC, /**< 802.2 LLC/SNAP Packet*/ }; /** @@ -98,7 +98,7 @@ public: * \param ceiling Cap on the exponential function when calculating max slots */ void SetBackoffParams (Time slotTime, uint32_t minSlots, uint32_t maxSlots, - uint32_t maxRetries, uint32_t ceiling); + uint32_t maxRetries, uint32_t ceiling); /** * Attach the device to a channel. @@ -116,7 +116,7 @@ public: * * The CsmaNetDevice "owns" a queue. This queue may be set by higher * level topology objects to implement a particular queueing method such as - * DropTail or RED. + * DropTail or RED. * * \see Queue * \see DropTailQueue @@ -259,7 +259,7 @@ public: * \return true if successfull, false otherwise (drop, ...) */ virtual bool Send (Ptr packet, const Address& dest, - uint16_t protocolNumber); + uint16_t protocolNumber); /** * Start sending a packet down the channel, with MAC spoofing @@ -445,19 +445,19 @@ private: * Enumeration of the states of the transmit machine of the net device. */ enum TxMachineState - { - READY, /**< The transmitter is ready to begin transmission of a packet */ - BUSY, /**< The transmitter is busy transmitting a packet */ - GAP, /**< The transmitter is in the interframe gap time */ - BACKOFF /**< The transmitter is waiting for the channel to be free */ - }; + { + READY, /**< The transmitter is ready to begin transmission of a packet */ + BUSY, /**< The transmitter is busy transmitting a packet */ + GAP, /**< The transmitter is in the interframe gap time */ + BACKOFF /**< The transmitter is waiting for the channel to be free */ + }; /** * The state of the Net Device transmit state machine. * \see TxMachineState */ TxMachineState m_txMachineState; - + /** * The type of packet that should be created by the AddHeader * function and that should be processed by the ProcessHeader diff --git a/src/csma/test/examples-to-run.py b/src/csma/test/examples-to-run.py index 2984380da..909251f3c 100644 --- a/src/csma/test/examples-to-run.py +++ b/src/csma/test/examples-to-run.py @@ -14,7 +14,6 @@ cpp_examples = [ ("csma-packet-socket", "True", "True"), ("csma-ping", "True", "True"), ("csma-raw-ip-socket", "True", "True"), - ("csma-star", "True", "True"), ] # A list of Python examples to run in order to ensure that they remain diff --git a/src/dsdv/doc/dsdv.h b/src/dsdv/doc/dsdv.h index eb236400e..f5dd5d848 100644 --- a/src/dsdv/doc/dsdv.h +++ b/src/dsdv/doc/dsdv.h @@ -33,8 +33,7 @@ #define DSDV_H_ /** - * \ingroup routing - * \defgroup dsdv + * \defgroup dsdv DSDV Routing * * \brief Destination-Sequenced Distance Vector (DSDV) routing protocol is a pro-active, table-driven routing protocol * for MANETs developed by Charles E. Perkins and Pravin Bhagwat in 1994. It uses the hop count as metric in route diff --git a/src/dsdv/examples/dsdv-manet.cc b/src/dsdv/examples/dsdv-manet.cc index 2079c4343..574a53f2f 100644 --- a/src/dsdv/examples/dsdv-manet.cc +++ b/src/dsdv/examples/dsdv-manet.cc @@ -285,7 +285,7 @@ DsdvManetExample::InstallInternetStack (std::string tr_name) dsdv.Set ("PeriodicUpdateInterval", TimeValue (Seconds (m_periodicUpdateInterval))); dsdv.Set ("SettlingTime", TimeValue (Seconds (m_settlingTime))); InternetStackHelper stack; - stack.SetRoutingHelper (dsdv); + stack.SetRoutingHelper (dsdv); // has effect on the next Install () stack.Install (nodes); Ipv4AddressHelper address; address.SetBase ("10.1.1.0", "255.255.255.0"); diff --git a/src/dsdv/model/dsdv-packet.h b/src/dsdv/model/dsdv-packet.h index e0255935d..bb3e2e7e8 100644 --- a/src/dsdv/model/dsdv-packet.h +++ b/src/dsdv/model/dsdv-packet.h @@ -51,6 +51,7 @@ namespace dsdv { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * \endverbatim */ class DsdvHeader : public Header diff --git a/src/dsdv/model/dsdv-routing-protocol.cc b/src/dsdv/model/dsdv-routing-protocol.cc index 01765ef7d..aa5d424b5 100644 --- a/src/dsdv/model/dsdv-routing-protocol.cc +++ b/src/dsdv/model/dsdv-routing-protocol.cc @@ -1138,8 +1138,8 @@ RoutingProtocol::GetSettlingTime (Ipv4Address address) { NS_LOG_DEBUG ("Route SettlingTime: " << mainrt.GetSettlingTime ().GetSeconds () << " and LifeTime:" << mainrt.GetLifeTime ().GetSeconds ()); - weightedTime = Time ((m_weightedFactor * mainrt.GetSettlingTime () + 1.0 - m_weightedFactor) - * mainrt.GetLifeTime ()); + weightedTime = Time (m_weightedFactor * mainrt.GetSettlingTime ().GetSeconds() + (1.0 - m_weightedFactor) + * mainrt.GetLifeTime ().GetSeconds()); NS_LOG_DEBUG ("Calculated weightedTime:" << weightedTime.GetSeconds ()); return weightedTime; } diff --git a/src/emu/doc/emu.h b/src/emu/doc/emu.h index 35e0f8235..d25ef078b 100644 --- a/src/emu/doc/emu.h +++ b/src/emu/doc/emu.h @@ -1,6 +1,5 @@ /** - * \ingroup devices - * \defgroup EmuModel Emulated Net Device Model + * \defgroup EmuModel Emulated Device * * \section EmuModelOverview Emulated Net Device Model Overview * diff --git a/doc/manual/source/emu.rst b/src/emu/doc/emu.rst similarity index 98% rename from doc/manual/source/emu.rst rename to src/emu/doc/emu.rst index ff91d3605..48285bea8 100644 --- a/doc/manual/source/emu.rst +++ b/src/emu/doc/emu.rst @@ -141,8 +141,8 @@ to these other net devices::: EmuHelper::EnablePcapAll ("emu-udp-echo-client"); -To see an example of a client script using the ``Emu`` net device, see -``examples/emu-udp-echo-client.cc`` and ``examples/emu-udp-echo-server.cc`` +For examples that use the ``Emu`` net device, see +``src/emu/examples/emu-udp-echo.cc`` and ``src/emu/examples/emu-ping.cc`` in the repository ``_. Implementation diff --git a/src/emu/examples/emu-udp-echo.cc b/src/emu/examples/emu-udp-echo.cc index 4e3dd398f..71cfce218 100644 --- a/src/emu/examples/emu-udp-echo.cc +++ b/src/emu/examples/emu-udp-echo.cc @@ -32,7 +32,7 @@ // We don't assume any special configuration and all of the ns-3 emulated net // devices will actually talk to the same underlying OS device. We rely on // the fact that the OS will deliver copies of our packets to the other ns-3 -// net devices since we operate in promiscuous mode. +// net devices since we operate in promiscuous mode. // // Packets will be sent out over the device, but we use MAC spoofing. The // MAC addresses will be generated using the Organizationally Unique Identifier @@ -90,7 +90,7 @@ main (int argc, char *argv[]) cmd.Parse (argc, argv); GlobalValue::Bind ("SimulatorImplementationType", - StringValue ("ns3::RealtimeSimulatorImpl")); + StringValue ("ns3::RealtimeSimulatorImpl")); // // need at least two nodes @@ -113,7 +113,7 @@ main (int argc, char *argv[]) NS_LOG_INFO ("Create channels."); EmuHelper emu; emu.SetAttribute ("DeviceName", StringValue (deviceName)); - emu.SetAttribute ("EncapsulationMode", StringValue (encapMode)); + emu.SetAttribute ("EncapsulationMode", StringValue (encapMode)); NetDeviceContainer d = emu.Install (n); diff --git a/src/emu/helper/emu-helper.h b/src/emu/helper/emu-helper.h index 2dec42569..7f0dd4f6f 100644 --- a/src/emu/helper/emu-helper.h +++ b/src/emu/helper/emu-helper.h @@ -43,7 +43,7 @@ class Packet; * encapsulates a general attribute or a set of functionality that * may be of interest to many other classes. */ - class EmuHelper : public PcapHelperForDevice, public AsciiTraceHelperForDevice +class EmuHelper : public PcapHelperForDevice, public AsciiTraceHelperForDevice { public: /* @@ -67,10 +67,10 @@ public: * EmuNetDevice created through EmuHelper::Install. */ void SetQueue (std::string type, - std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue ()); + std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), + std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), + std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), + std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue ()); /** * \param n1 the name of the attribute to set diff --git a/src/emu/model/emu-encode-decode.cc b/src/emu/model/emu-encode-decode.cc index f61c50d03..d558f88d6 100644 --- a/src/emu/model/emu-encode-decode.cc +++ b/src/emu/model/emu-encode-decode.cc @@ -33,7 +33,7 @@ namespace ns3 { * \param len The length of the input buffer. * \returns A string containing a hex representation of the data in buffer. */ - std::string +std::string EmuBufferToString (uint8_t *buffer, uint32_t len) { std::ostringstream oss; @@ -63,7 +63,7 @@ EmuBufferToString (uint8_t *buffer, uint32_t len) * \param len The length of the data that is valid in the buffer. * \returns True indicates a successful conversion. */ - bool +bool EmuStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len) { // @@ -94,7 +94,7 @@ EmuStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len) { return false; } - + // // And then read in the real bits and convert them. // diff --git a/src/emu/model/emu-encode-decode.h b/src/emu/model/emu-encode-decode.h index 1d03f74e5..f41012344 100644 --- a/src/emu/model/emu-encode-decode.h +++ b/src/emu/model/emu-encode-decode.h @@ -23,8 +23,8 @@ namespace ns3 { - std::string EmuBufferToString (uint8_t *buffer, uint32_t len); - bool EmuStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len); +std::string EmuBufferToString (uint8_t *buffer, uint32_t len); +bool EmuStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len); } // namespace ns3 diff --git a/src/emu/model/emu-net-device.cc b/src/emu/model/emu-net-device.cc index f49bde6e7..de59412d5 100644 --- a/src/emu/model/emu-net-device.cc +++ b/src/emu/model/emu-net-device.cc @@ -67,7 +67,7 @@ EmuNetDevice::GetTypeId (void) .AddAttribute ("Mtu", "The MAC-level Maximum Transmission Unit", UintegerValue (0), // arbitrary un-used value because no setter MakeUintegerAccessor (&EmuNetDevice::GetMtu), - MakeUintegerChecker ()) + MakeUintegerChecker ()) .AddAttribute ("Address", "The ns-3 MAC address of this (virtual) device.", Mac48AddressValue (Mac48Address ("ff:ff:ff:ff:ff:ff")), @@ -180,21 +180,21 @@ EmuNetDevice::GetTypeId (void) .AddTraceSource ("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device", MakeTraceSourceAccessor (&EmuNetDevice::m_promiscSnifferTrace)) - ; + ; return tid; } EmuNetDevice::EmuNetDevice () -: - m_startEvent (), - m_stopEvent (), - m_sock (-1), - m_readThread (0), - m_ifIndex (std::numeric_limits::max ()), // absurdly large value - m_sll_ifindex (-1), - m_isBroadcast (true), - m_isMulticast (false), - m_pendingReadCount (0) + : + m_startEvent (), + m_stopEvent (), + m_sock (-1), + m_readThread (0), + m_ifIndex (std::numeric_limits::max ()), // absurdly large value + m_sll_ifindex (-1), + m_isBroadcast (true), + m_isMulticast (false), + m_pendingReadCount (0) { NS_LOG_FUNCTION (this); m_packetBuffer = new uint8_t[65536]; @@ -246,7 +246,7 @@ EmuNetDevice::Start (Time tStart) m_startEvent = Simulator::Schedule (tStart, &EmuNetDevice::StartDevice, this); } - void +void EmuNetDevice::Stop (Time tStop) { NS_LOG_FUNCTION (tStop); @@ -257,7 +257,7 @@ EmuNetDevice::Stop (Time tStop) m_startEvent = Simulator::Schedule (tStop, &EmuNetDevice::StopDevice, this); } - void +void EmuNetDevice::StartDevice (void) { NS_LOG_FUNCTION_NOARGS (); @@ -349,7 +349,7 @@ EmuNetDevice::StartDevice (void) { NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): Can't get interface flags"); } - + // // This device only works if the underlying interface is up in promiscuous // mode. We could have turned it on in the socket creator, but the situation @@ -477,9 +477,9 @@ EmuNetDevice::CreateSocket (void) // Execute the socket creation process image. // status = ::execlp ("emu-sock-creator", - "emu-sock-creator", // argv[0] (filename) - oss.str ().c_str (), // argv[1] (-pcmsg_level == SOL_SOCKET && - cmsg->cmsg_type == SCM_RIGHTS) - { + { + if (cmsg->cmsg_level == SOL_SOCKET && + cmsg->cmsg_type == SCM_RIGHTS) + { // // This is the type of message we want. Check to see if the magic // number is correct and then pull out the socket we care about if @@ -605,10 +605,10 @@ EmuNetDevice::CreateSocket (void) } else { - NS_LOG_INFO ("Got SCM_RIGHTS, but with bad magic " << magic); + NS_LOG_INFO ("Got SCM_RIGHTS, but with bad magic " << magic); } - } - } + } + } NS_FATAL_ERROR ("Did not get the raw socket from the socket creator"); } } @@ -672,7 +672,7 @@ EmuNetDevice::ForwardUp (uint8_t *buf, uint32_t len) NS_LOG_LOGIC ("Pkt destination is " << header.GetDestination ()); uint16_t protocol; - + switch (m_encapMode) { case LLC: @@ -721,7 +721,7 @@ EmuNetDevice::ForwardUp (uint8_t *buf, uint32_t len) } else if (header.GetDestination ().IsGroup ()) { - packetType = NS3_PACKET_MULTICAST; + packetType = NS3_PACKET_MULTICAST; } else if (header.GetDestination () == m_address) { @@ -778,9 +778,9 @@ EmuNetDevice::ReadThread (void) // Too many pending reads at the same time leads to excessive memory allocations. This counter prevents it. // bool skip = false; - + { - CriticalSection cs (m_pendingReadMutex); + CriticalSection cs (m_pendingReadMutex); //std::cerr << std::endl << "EmuNetDevice read thread: m_pendingReadCount is " << m_pendingReadCount << std::endl; if (m_pendingReadCount >= m_maxPendingReads) { @@ -792,8 +792,8 @@ EmuNetDevice::ReadThread (void) } } - if (skip) - { + if (skip) + { struct timespec time = { 0, 100000000L }; // 100 ms nanosleep (&time, NULL); continue; @@ -889,15 +889,15 @@ EmuNetDevice::SendFrom (Ptr packet, const Address &src, const Address &d header.SetLengthType (packet->GetSize ()); } break; - + case DIX: header.SetLengthType (protocolNumber); break; - + default: NS_FATAL_ERROR ("invalid encapsulation mode"); } - + packet->AddHeader (header); // @@ -1054,7 +1054,7 @@ EmuNetDevice::IsMulticast (void) const return m_isMulticast; } - Address +Address EmuNetDevice::GetMulticast (Ipv4Address multicastGroup) const { NS_LOG_FUNCTION (multicastGroup); @@ -1100,7 +1100,7 @@ EmuNetDevice::SetPromiscReceiveCallback (PromiscReceiveCallback cb) m_promiscRxCallback = cb; } - bool +bool EmuNetDevice::SupportsSendFrom () const { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/emu/model/emu-net-device.h b/src/emu/model/emu-net-device.h index c43d432a9..f329894a6 100644 --- a/src/emu/model/emu-net-device.h +++ b/src/emu/model/emu-net-device.h @@ -54,7 +54,7 @@ public: enum EncapsulationMode { ILLEGAL, /**< Encapsulation mode not set */ DIX, /**< DIX II / Ethernet II packet */ - LLC, /**< 802.2 LLC/SNAP Packet*/ + LLC, /**< 802.2 LLC/SNAP Packet*/ }; /** @@ -72,7 +72,7 @@ public: virtual ~EmuNetDevice (); /** - * Set the Data Rate used for transmission of packets. + * Set the Data Rate used for transmission of packets. * * @see Attach () * @param bps the data rate at which this object operates @@ -97,7 +97,7 @@ public: * Attach a queue to the EmuNetDevice. * * The EmuNetDevice "owns" a queue that implements a queueing - * method such as DropTail or RED. + * method such as DropTail or RED. * * @see Queue * @see DropTailQueue diff --git a/src/emu/model/emu-sock-creator.cc b/src/emu/model/emu-sock-creator.cc index 21850e400..b24f5d39d 100644 --- a/src/emu/model/emu-sock-creator.cc +++ b/src/emu/model/emu-sock-creator.cc @@ -67,7 +67,7 @@ static int gVerbose = 0; * to send the created socket back to. * \param fd The socket we're going to send. */ - static void +static void SendSocket (const char *path, int fd) { // @@ -77,7 +77,7 @@ SendSocket (const char *path, int fd) LOG ("Create Unix socket"); int sock = socket (PF_UNIX, SOCK_DGRAM, 0); ABORT_IF (sock == -1, "Unable to open socket", 1); - + // // We have this string called path, which is really a hex representation // of the endpoint that the net device created. It used a forward encoding @@ -179,7 +179,7 @@ SendSocket (const char *path, int fd) // Finally, we get a pointer to the start of the ancillary data array and // put our file descriptor in. // - int *fdptr = (int*) (CMSG_DATA(cmsg)); + int *fdptr = (int*)(CMSG_DATA(cmsg)); *fdptr = fd; // // @@ -191,7 +191,7 @@ SendSocket (const char *path, int fd) LOG ("sendmsg complete"); } - int +int main (int argc, char *argv[]) { int c; diff --git a/doc/manual/source/energy.rst b/src/energy/doc/energy.rst similarity index 97% rename from doc/manual/source/energy.rst rename to src/energy/doc/energy.rst index 1a5721f4c..6411f6e4e 100644 --- a/doc/manual/source/energy.rst +++ b/src/energy/doc/energy.rst @@ -7,13 +7,13 @@ Energy consumption is a key issue for wireless devices, and wireless network res Model Description ================= -The source code for the Energy Framework is currently at: ``src/contrib/energy``. +The source code for the Energy Framework is currently at: ``src/energy``. Design ****** The ns-3 Energy Framework is composed of 2 parts: Energy Source and Device Energy Model. -The framework will be implemented into the ``src/contrib/energy/models`` folder. +The framework will be implemented into the ``src/energy/models`` folder. Energy Source ############# @@ -59,7 +59,7 @@ References Usage ===== -The main way that ns-3 users will typically interact with the Energy Framework is through the helper API and through the publicly visible attributes of the framework. The helper API is defined in ``src/contrib/energy/helper/*.h``. +The main way that ns-3 users will typically interact with the Energy Framework is through the helper API and through the publicly visible attributes of the framework. The helper API is defined in ``src/energy/helper/*.h``. In order to use the energy framework, the user must install an Energy Source for the node of interest and the corresponding Device Energy Model for the network devices. Energy Source (objects) are aggregated onto each node by the Energy Source Helper. In order to allow multiple energy sources per node, we aggregate an Energy Source Container rather than directly aggregating a source object. @@ -69,7 +69,9 @@ The Energy Source object also keeps a list of Device Energy Model objects using Examples ******** -The example ``examples/energy/`` contain some basic code that shows how to set up the framework. +The example directories, ``src/examples/energy`` and +``examples/energy``, contain some basic code that shows how to set up +the framework. Helpers ******* diff --git a/src/energy/helper/basic-energy-source-helper.h b/src/energy/helper/basic-energy-source-helper.h index 715d9b31c..bfad9807b 100644 --- a/src/energy/helper/basic-energy-source-helper.h +++ b/src/energy/helper/basic-energy-source-helper.h @@ -27,7 +27,9 @@ namespace ns3 { /** + * \ingroup energy * \brief Creates a BasicEnergySource object. + * */ class BasicEnergySourceHelper : public EnergySourceHelper { diff --git a/src/energy/helper/energy-model-helper.h b/src/energy/helper/energy-model-helper.h index 100ee27f6..ff98839f7 100644 --- a/src/energy/helper/energy-model-helper.h +++ b/src/energy/helper/energy-model-helper.h @@ -35,10 +35,12 @@ namespace ns3 { /** + * \ingroup energy * \brief Creates EnergySource objects. * * This class creates and installs an energy source onto network nodes. Only a * single source can exist on a network node. + * */ class EnergySourceHelper { @@ -101,6 +103,7 @@ private: /** + * \ingroup energy * \brief Creates DeviceEnergyModel objects. * * This class helps to create and install DeviceEnergyModel onto NetDevice. A @@ -108,6 +111,7 @@ private: * Note that DeviceEnergyModel objects are *not* aggregated onto the node. They * can be accessed through the EnergySource object, which *is* aggregated onto * the node. + * */ class DeviceEnergyModelHelper { diff --git a/src/energy/helper/energy-source-container.h b/src/energy/helper/energy-source-container.h index c92d465d1..a658a3890 100644 --- a/src/energy/helper/energy-source-container.h +++ b/src/energy/helper/energy-source-container.h @@ -31,6 +31,7 @@ namespace ns3 { /** + * \ingroup energy * \brief Holds a vector of ns3::EnergySource pointers. * * EnergySourceHelper returns a list of EnergySource pointers installed onto a @@ -38,6 +39,7 @@ namespace ns3 { * energy consumption on a node easily. * * \see NetDeviceContainer + * */ class EnergySourceContainer : public Object { diff --git a/src/energy/helper/rv-battery-model-helper.h b/src/energy/helper/rv-battery-model-helper.h index a9497ce49..f2783f3e8 100644 --- a/src/energy/helper/rv-battery-model-helper.h +++ b/src/energy/helper/rv-battery-model-helper.h @@ -27,7 +27,9 @@ namespace ns3 { /** + * \ingroup energy * \brief Creates a RvBatteryModel object. + * */ class RvBatteryModelHelper : public EnergySourceHelper { diff --git a/src/energy/helper/wifi-radio-energy-model-helper.h b/src/energy/helper/wifi-radio-energy-model-helper.h index 0446907b6..10c0b91de 100644 --- a/src/energy/helper/wifi-radio-energy-model-helper.h +++ b/src/energy/helper/wifi-radio-energy-model-helper.h @@ -27,9 +27,11 @@ namespace ns3 { /** + * \ingroup energy * \brief Assign WifiRadioEnergyModel to wifi devices. * * This installer installs WifiRadioEnergyModel for only WifiNetDevice objects. + * */ class WifiRadioEnergyModelHelper : public DeviceEnergyModelHelper { diff --git a/src/energy/model/basic-energy-source.h b/src/energy/model/basic-energy-source.h index 53dd605dd..93efac27d 100644 --- a/src/energy/model/basic-energy-source.h +++ b/src/energy/model/basic-energy-source.h @@ -29,8 +29,10 @@ namespace ns3 { /** + * \ingroup energy * BasicEnergySource decreases/increases remaining energy stored in itself in * linearly. + * */ class BasicEnergySource : public EnergySource { diff --git a/src/energy/model/device-energy-model-container.h b/src/energy/model/device-energy-model-container.h index 3286721ac..0307eb5a2 100644 --- a/src/energy/model/device-energy-model-container.h +++ b/src/energy/model/device-energy-model-container.h @@ -30,6 +30,7 @@ namespace ns3 { /** + * \ingroup energy * \brief Holds a vector of ns3::DeviceEnergyModel pointers. * * DeviceEnergyModelContainer returns a list of DeviceEnergyModel pointers @@ -37,6 +38,7 @@ namespace ns3 { * objects to obtain total device energy consumption on a node easily. * * \see NetDeviceContainer + * */ class DeviceEnergyModelContainer { diff --git a/src/energy/model/device-energy-model.h b/src/energy/model/device-energy-model.h index 4db80fa99..96b7e0c37 100644 --- a/src/energy/model/device-energy-model.h +++ b/src/energy/model/device-energy-model.h @@ -31,12 +31,14 @@ namespace ns3 { class EnergySource; /** + * \ingroup energy * \brief Base class for device energy models. * * A device energy model should represent the energy consumption behavior of a * specific device. It will update remaining energy stored in the EnergySource * object installed on node. When energy is depleted, each DeviceEnergyModel * object installed on the same node will be informed by the EnergySource. + * */ class DeviceEnergyModel : public Object { diff --git a/src/energy/model/energy-source.h b/src/energy/model/energy-source.h index dc015c56f..4be75b927 100644 --- a/src/energy/model/energy-source.h +++ b/src/energy/model/energy-source.h @@ -30,6 +30,13 @@ namespace ns3 { /** + * \defgroup energy Energy Models + * + */ + +/** + * \ingroup energy + * * \brief Energy source base class. * * This is the base class for energy sources. Energy sources keep track of diff --git a/src/energy/model/li-ion-energy-source.h b/src/energy/model/li-ion-energy-source.h index a5fda2a62..8a48aec5b 100644 --- a/src/energy/model/li-ion-energy-source.h +++ b/src/energy/model/li-ion-energy-source.h @@ -29,6 +29,7 @@ namespace ns3 { /** + * \ingroup energy * \brief Model a generic Lithium Ion Battery basing on [1][2]. * * The model can be fitted to any type of Li-Ion Battery, simply changing the @@ -66,6 +67,7 @@ namespace ns3 { * [1] C. M. Shepherd, "Design of Primary and Secondary Cells - Part 3. Battery discharge equation," U.S. Naval Research Laboratory, 1963 * [2] Tremblay, O.; Dessaint, L.-A.; Dekkiche, A.-I., "A Generic Battery Model for the Dynamic Simulation of Hybrid Electric Vehicles," Ecole de Technologie Superieure, Universite du Quebec, 2007 * [3] http://www.panasonic.com/industrial/includes/pdf/Panasonic_LiIon_CGR18650DA.pdf + * */ class LiIonEnergySource : public EnergySource { diff --git a/src/energy/model/rv-battery-model.cc b/src/energy/model/rv-battery-model.cc index 10e141873..8c5111a23 100644 --- a/src/energy/model/rv-battery-model.cc +++ b/src/energy/model/rv-battery-model.cc @@ -329,7 +329,7 @@ RvBatteryModel::Discharge (double load, Time t) { // constant load calculatedAlpha = m_load[0] * RvModelAFunction (t, t, Seconds(0.0), - m_beta); + m_beta); } else { @@ -359,7 +359,7 @@ RvBatteryModel::RvModelAFunction (Time t, Time sk, Time sk_1, double beta) for (int m = 1; m <= m_numOfTerms; m++) { double square = beta * beta * m * m; - sum += (exp (- square * (firstDelta)) - exp (- square * (secondDelta))) / square; + sum += (exp (-square * (firstDelta)) - exp (-square * (secondDelta))) / square; } return delta + 2 * sum; } diff --git a/src/energy/model/rv-battery-model.h b/src/energy/model/rv-battery-model.h index a62aa71a5..a9f0249ac 100644 --- a/src/energy/model/rv-battery-model.h +++ b/src/energy/model/rv-battery-model.h @@ -29,6 +29,7 @@ namespace ns3 { /** + * \ingroup energy * \brief Rakhmatov Vrudhula non-linear battery model. * * This (energy source) model implements an analytical non-linear battery model. @@ -44,6 +45,7 @@ namespace ns3 { * "Simulation of Mobile Wireless Networks with Accurate Modeling of non-linear * battery effects". The real-time algorithm is modified by the authors of this * code for improved accuracy and reduced computation (sampling) overhead. + * */ class RvBatteryModel : public EnergySource { diff --git a/src/energy/model/simple-device-energy-model.h b/src/energy/model/simple-device-energy-model.h index 5961925b9..04587333d 100644 --- a/src/energy/model/simple-device-energy-model.h +++ b/src/energy/model/simple-device-energy-model.h @@ -14,10 +14,12 @@ namespace ns3 { /** + * \ingroup energy * * A simple device energy model where current drain can be set by the user. * * It is supposed to be used as a testing model for energy sources. + * */ class SimpleDeviceEnergyModel : public DeviceEnergyModel { diff --git a/src/energy/model/wifi-radio-energy-model.cc b/src/energy/model/wifi-radio-energy-model.cc index 7114a5471..05f5b7045 100644 --- a/src/energy/model/wifi-radio-energy-model.cc +++ b/src/energy/model/wifi-radio-energy-model.cc @@ -179,7 +179,7 @@ WifiRadioEnergyModel::GetCurrentState (void) const void WifiRadioEnergyModel::SetEnergyDepletionCallback ( - WifiRadioEnergyDepletionCallback callback) + WifiRadioEnergyDepletionCallback callback) { NS_LOG_FUNCTION (this); if (callback.IsNull ()) diff --git a/src/energy/model/wifi-radio-energy-model.h b/src/energy/model/wifi-radio-energy-model.h index 67f60612e..0733b6291 100644 --- a/src/energy/model/wifi-radio-energy-model.h +++ b/src/energy/model/wifi-radio-energy-model.h @@ -30,8 +30,10 @@ namespace ns3 { /** + * \ingroup energy * A WifiPhy listener class for notifying the WifiRadioEnergyModel of Wifi radio * state change. + * */ class WifiRadioEnergyModelPhyListener : public WifiPhyListener { @@ -118,6 +120,7 @@ private: // -------------------------------------------------------------------------- // /** + * \ingroup energy * \brief A WiFi radio energy model. * * 4 states are defined for the radio: TX, RX, IDLE, SLEEP. Default state is @@ -138,6 +141,7 @@ private: * Default values for power consumption are based on CC2420 radio chip, with * supply voltage as 2.5V and currents as 17.4 mA (TX), 18.8 mA (RX), 20 uA * (sleep) and 426 uA (idle). + * */ class WifiRadioEnergyModel : public DeviceEnergyModel { diff --git a/src/energy/test/basic-energy-model-test.cc b/src/energy/test/basic-energy-model-test.cc index 845dde073..d3e967a2c 100644 --- a/src/energy/test/basic-energy-model-test.cc +++ b/src/energy/test/basic-energy-model-test.cc @@ -121,7 +121,7 @@ BasicEnergyUpdateTest::StateSwitchTest (WifiPhy::State state) NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (false, (models.GetN () == 0), "Model list is empty!"); // get pointer Ptr devModel = - DynamicCast (models.Get (0)); + DynamicCast (models.Get (0)); // check pointer NS_TEST_ASSERT_MSG_NE_RETURNS_BOOL (0, devModel, "NULL pointer to device model!"); @@ -191,7 +191,7 @@ BasicEnergyUpdateTest::StateSwitchTest (WifiPhy::State state) NS_LOG_DEBUG ("Difference is " << estRemainingEnergy - remainingEnergy); // check remaining energy NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL (remainingEnergy, estRemainingEnergy, m_tolerance, - "Incorrect remaining energy!"); + "Incorrect remaining energy!"); // obtain radio state WifiPhy::State endState = devModel->GetCurrentState (); diff --git a/src/energy/test/rv-battery-model-test.cc b/src/energy/test/rv-battery-model-test.cc index 04f28f78b..8746be652 100644 --- a/src/energy/test/rv-battery-model-test.cc +++ b/src/energy/test/rv-battery-model-test.cc @@ -780,91 +780,91 @@ BatteryLifetimeTest::VariableLoadTest (std::vector loads, NS_ASSERT (loads.size () == timeStamps.size ()); // create single node - NodeContainer c; - c.Create (1); + NodeContainer c; + c.Create (1); - std::string phyMode ("DsssRate1Mbps"); + std::string phyMode ("DsssRate1Mbps"); - // disable fragmentation for frames below 2200 bytes - Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", - StringValue ("2200")); - // turn off RTS/CTS for frames below 2200 bytes - Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", - StringValue ("2200")); - // Fix non-unicast data rate to be the same as that of unicast - Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", - StringValue (phyMode)); + // disable fragmentation for frames below 2200 bytes + Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", + StringValue ("2200")); + // turn off RTS/CTS for frames below 2200 bytes + Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", + StringValue ("2200")); + // Fix non-unicast data rate to be the same as that of unicast + Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", + StringValue (phyMode)); - // install YansWifiPhy - WifiHelper wifi; - wifi.SetStandard (WIFI_PHY_STANDARD_80211b); + // install YansWifiPhy + WifiHelper wifi; + wifi.SetStandard (WIFI_PHY_STANDARD_80211b); - YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); - /* - * This is one parameter that matters when using FixedRssLossModel, set it to - * zero; otherwise, gain will be added. - */ - wifiPhy.Set ("RxGain", DoubleValue (0)); - // ns-3 supports RadioTap and Prism tracing extensions for 802.11b - wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO); + YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); + /* + * This is one parameter that matters when using FixedRssLossModel, set it to + * zero; otherwise, gain will be added. + */ + wifiPhy.Set ("RxGain", DoubleValue (0)); + // ns-3 supports RadioTap and Prism tracing extensions for 802.11b + wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO); - YansWifiChannelHelper wifiChannel ; - wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); - wifiPhy.SetChannel (wifiChannel.Create ()); + YansWifiChannelHelper wifiChannel ; + wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); + wifiPhy.SetChannel (wifiChannel.Create ()); - // Add a non-QoS upper MAC, and disable rate control - NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); - wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", - "DataMode", StringValue(phyMode), - "ControlMode", StringValue(phyMode)); - // Set it to ad-hoc mode - wifiMac.SetType ("ns3::AdhocWifiMac"); - NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c); + // Add a non-QoS upper MAC, and disable rate control + NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); + wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", + "DataMode", StringValue(phyMode), + "ControlMode", StringValue(phyMode)); + // Set it to ad-hoc mode + wifiMac.SetType ("ns3::AdhocWifiMac"); + NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c); - // Create and install battery model and device models - // RV battery model - RvBatteryModelHelper rvModelHelper; - // Set alpha & beta values - rvModelHelper.Set ("RvBatteryModelAlphaValue", DoubleValue (m_alpha)); - rvModelHelper.Set ("RvBatteryModelBetaValue", DoubleValue (m_beta)); - // install source - EnergySourceContainer sources = rvModelHelper.Install (c); - // device energy model - WifiRadioEnergyModelHelper radioEnergyHelper; - // set VariableLoadTestIDLE current, which will be the constant load - radioEnergyHelper.Set ("IdleCurrentA", DoubleValue (loads[0])); - // install on node - DeviceEnergyModelContainer deviceModels = radioEnergyHelper.Install (devices, sources); + // Create and install battery model and device models + // RV battery model + RvBatteryModelHelper rvModelHelper; + // Set alpha & beta values + rvModelHelper.Set ("RvBatteryModelAlphaValue", DoubleValue (m_alpha)); + rvModelHelper.Set ("RvBatteryModelBetaValue", DoubleValue (m_beta)); + // install source + EnergySourceContainer sources = rvModelHelper.Install (c); + // device energy model + WifiRadioEnergyModelHelper radioEnergyHelper; + // set VariableLoadTestIDLE current, which will be the constant load + radioEnergyHelper.Set ("IdleCurrentA", DoubleValue (loads[0])); + // install on node + DeviceEnergyModelContainer deviceModels = radioEnergyHelper.Install (devices, sources); - Ptr wifiDevicePtr = DynamicCast (deviceModels.Get (0)); - // schedule load change events - for (uint32_t i = 1; i < loads.size (); i++) - { - Simulator::Schedule (timeStamps[i], &WifiRadioEnergyModel::SetIdleCurrentA, - wifiDevicePtr, loads[i]); - } + Ptr wifiDevicePtr = DynamicCast (deviceModels.Get (0)); + // schedule load change events + for (uint32_t i = 1; i < loads.size (); i++) + { + Simulator::Schedule (timeStamps[i], &WifiRadioEnergyModel::SetIdleCurrentA, + wifiDevicePtr, loads[i]); + } - // run simulation - Simulator::Stop (Seconds (70000.0)); - Simulator::Run (); + // run simulation + Simulator::Stop (Seconds (70000.0)); + Simulator::Run (); - Time actualLifetime; - Ptr srcPtr = DynamicCast (sources.Get (0)); - actualLifetime = srcPtr->GetLifetime (); + Time actualLifetime; + Ptr srcPtr = DynamicCast (sources.Get (0)); + actualLifetime = srcPtr->GetLifetime (); - NS_LOG_DEBUG ("Expected lifetime = " << expLifetime.GetSeconds () << "s"); - NS_LOG_DEBUG ("Actual lifetime = " << actualLifetime.GetSeconds () << "s"); - NS_LOG_DEBUG ("Difference = " << expLifetime.GetSeconds () - actualLifetime.GetSeconds () << "s"); + NS_LOG_DEBUG ("Expected lifetime = " << expLifetime.GetSeconds () << "s"); + NS_LOG_DEBUG ("Actual lifetime = " << actualLifetime.GetSeconds () << "s"); + NS_LOG_DEBUG ("Difference = " << expLifetime.GetSeconds () - actualLifetime.GetSeconds () << "s"); - //NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (actualLifetime, expLifetime, "Incorrect lifetime!"); - NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL (actualLifetime.GetSeconds (), expLifetime.GetSeconds (), - 120, // error tolerance = 120s - "Incorrect lifetime!"); + //NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (actualLifetime, expLifetime, "Incorrect lifetime!"); + NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL (actualLifetime.GetSeconds (), expLifetime.GetSeconds (), + 120, // error tolerance = 120s + "Incorrect lifetime!"); - Simulator::Destroy (); + Simulator::Destroy (); - return false; // error free + return false; // error free } // -------------------------------------------------------------------------- // diff --git a/src/flow-monitor/doc/flow-monitor.rst b/src/flow-monitor/doc/flow-monitor.rst new file mode 100644 index 000000000..0616cc15f --- /dev/null +++ b/src/flow-monitor/doc/flow-monitor.rst @@ -0,0 +1,9 @@ +Flow Monitor +------------ + +*Placeholder chapter* + +This feature was added as contributed code (``src/contrib``) in +*ns-3.6* and to the main distribution (``src/flow-monitor``) for +*ns-3.7*. A paper on this feature is published in the proceedings of +NSTools: ``_. diff --git a/src/flow-monitor/helper/flow-monitor-helper.cc b/src/flow-monitor/helper/flow-monitor-helper.cc index 72c2bc0d0..e19837b24 100644 --- a/src/flow-monitor/helper/flow-monitor-helper.cc +++ b/src/flow-monitor/helper/flow-monitor-helper.cc @@ -46,7 +46,7 @@ Ptr FlowMonitorHelper::GetMonitor () { if (!m_flowMonitor) - { + { m_flowMonitor = m_monitorFactory.Create (); m_flowClassifier = Create (); m_flowMonitor->SetFlowClassifier (m_flowClassifier); @@ -59,7 +59,7 @@ Ptr FlowMonitorHelper::GetClassifier () { if (!m_flowClassifier) - { + { m_flowClassifier = Create (); } return m_flowClassifier; @@ -103,7 +103,7 @@ FlowMonitorHelper::InstallAll () Install (node); } } - return m_flowMonitor; + return m_flowMonitor; } diff --git a/src/flow-monitor/helper/flow-monitor-helper.h b/src/flow-monitor/helper/flow-monitor-helper.h index 3539ec421..f22d9f7ac 100644 --- a/src/flow-monitor/helper/flow-monitor-helper.h +++ b/src/flow-monitor/helper/flow-monitor-helper.h @@ -29,7 +29,7 @@ namespace ns3 { class AttributeValue; -class Ipv4FlowClassifier; +class Ipv4FlowClassifier; /// \brief Helper to enable IPv4 flow monitoring on a set of Nodes class FlowMonitorHelper @@ -38,7 +38,7 @@ public: /// \brief Construct a FlowMonitorHelper class which makes it easier to /// configure and use the FlowMonitor FlowMonitorHelper (); - + /// \brief Set an attribute for the to-be-created FlowMonitor object void SetMonitorAttribute (std::string n1, const AttributeValue &v1); @@ -56,7 +56,7 @@ public: /// \brief Retrieve the FlowClassifier object created by the Install* methods Ptr GetClassifier (); - + private: ObjectFactory m_monitorFactory; Ptr m_flowMonitor; diff --git a/src/flow-monitor/model/flow-classifier.cc b/src/flow-monitor/model/flow-classifier.cc index 287e5bfbe..8123835c0 100644 --- a/src/flow-monitor/model/flow-classifier.cc +++ b/src/flow-monitor/model/flow-classifier.cc @@ -24,12 +24,13 @@ namespace ns3 { FlowClassifier::FlowClassifier () : - m_lastNewFlowId (0) + m_lastNewFlowId (0) { } FlowClassifier::~FlowClassifier () -{} +{ +} FlowId FlowClassifier::GetNewFlowId () diff --git a/src/flow-monitor/model/flow-monitor.cc b/src/flow-monitor/model/flow-monitor.cc index 45f14e0b0..328dfd274 100644 --- a/src/flow-monitor/model/flow-monitor.cc +++ b/src/flow-monitor/model/flow-monitor.cc @@ -34,7 +34,7 @@ namespace ns3 { NS_LOG_COMPONENT_DEFINE ("FlowMonitor"); NS_OBJECT_ENSURE_REGISTERED (FlowMonitor); - + TypeId FlowMonitor::GetTypeId (void) @@ -58,7 +58,7 @@ FlowMonitor::GetTypeId (void) .AddAttribute ("JitterBinWidth", ("The width used in the jitter histogram."), DoubleValue (0.001), MakeDoubleAccessor (&FlowMonitor::m_jitterBinWidth), - MakeDoubleChecker ()) + MakeDoubleChecker ()) .AddAttribute ("PacketSizeBinWidth", ("The width used in the packetSize histogram."), DoubleValue (20), MakeDoubleAccessor (&FlowMonitor::m_packetSizeBinWidth), @@ -71,7 +71,7 @@ FlowMonitor::GetTypeId (void) TimeValue (Seconds (0.5)), MakeTimeAccessor (&FlowMonitor::m_flowInterruptionsMinTime), MakeTimeChecker ()) - ; + ; return tid; } @@ -82,9 +82,9 @@ FlowMonitor::GetInstanceTypeId (void) const } FlowMonitor::FlowMonitor () - : m_enabled (false) + : m_enabled (false) { - // m_histogramBinWidth=DEFAULT_BIN_WIDTH; + // m_histogramBinWidth=DEFAULT_BIN_WIDTH; } @@ -131,7 +131,7 @@ FlowMonitor::ReportFirstTx (Ptr probe, uint32_t flowId, uint32_t pack tracked.lastSeenTime = tracked.firstSeenTime; tracked.timesForwarded = 0; NS_LOG_DEBUG ("ReportFirstTx: adding tracked packet (flowId=" << flowId << ", packetId=" << packetId - << ")."); + << ")."); probe->AddPacketStats (flowId, packetSize, Seconds (0)); @@ -158,7 +158,7 @@ FlowMonitor::ReportForwarding (Ptr probe, uint32_t flowId, uint32_t p if (tracked == m_trackedPackets.end ()) { NS_LOG_WARN ("Received packet forward report (flowId=" << flowId << ", packetId=" << packetId - << ") but not known to be transmitted."); + << ") but not known to be transmitted."); return; } @@ -181,7 +181,7 @@ FlowMonitor::ReportLastRx (Ptr probe, uint32_t flowId, uint32_t packe if (tracked == m_trackedPackets.end ()) { NS_LOG_WARN ("Received packet last-tx report (flowId=" << flowId << ", packetId=" << packetId - << ") but not known to be transmitted."); + << ") but not known to be transmitted."); return; } @@ -196,18 +196,18 @@ FlowMonitor::ReportLastRx (Ptr probe, uint32_t flowId, uint32_t packe { Time jitter = stats.lastDelay - delay; if (jitter > Seconds (0)) - { - stats.jitterSum += jitter; - stats.jitterHistogram.AddValue (jitter.GetSeconds ()); - } + { + stats.jitterSum += jitter; + stats.jitterHistogram.AddValue (jitter.GetSeconds ()); + } else - { - stats.jitterSum -= jitter; - stats.jitterHistogram.AddValue (-jitter.GetSeconds()); - } + { + stats.jitterSum -= jitter; + stats.jitterHistogram.AddValue (-jitter.GetSeconds()); + } } stats.lastDelay = delay; - + stats.rxBytes += packetSize; stats.packetSizeHistogram.AddValue ((double) packetSize); stats.rxPackets++; @@ -277,7 +277,7 @@ void FlowMonitor::CheckForLostPackets (Time maxDelay) { Time now = Simulator::Now (); - + for (TrackedPacketMap::iterator iter = m_trackedPackets.begin (); iter != m_trackedPackets.end (); ) { @@ -285,7 +285,7 @@ FlowMonitor::CheckForLostPackets (Time maxDelay) { // packet is considered lost, add it to the loss statistics std::map::iterator - flow = m_flowStats.find (iter->first.first); + flow = m_flowStats.find (iter->first.first); NS_ASSERT (flow != m_flowStats.end ()); flow->second.lostPackets++; @@ -387,7 +387,7 @@ void FlowMonitor::SerializeToXmlStream (std::ostream &os, int indent, bool enableHistograms, bool enableProbes) { CheckForLostPackets (); - + INDENT(indent); os << "\n"; indent += 2; INDENT(indent); os << "\n"; @@ -395,24 +395,24 @@ FlowMonitor::SerializeToXmlStream (std::ostream &os, int indent, bool enableHist for (std::map::const_iterator flowI = m_flowStats.begin (); flowI != m_flowStats.end (); flowI++) { - + INDENT(indent); -#define ATTRIB(name) << " "#name"=\"" << flowI->second.name << "\"" +#define ATTRIB(name) << " " # name "=\"" << flowI->second.name << "\"" os << "first << "\"" - ATTRIB(timeFirstTxPacket) - ATTRIB(timeFirstRxPacket) - ATTRIB(timeLastTxPacket) - ATTRIB(timeLastRxPacket) - ATTRIB(delaySum) - ATTRIB(jitterSum) - ATTRIB(lastDelay) - ATTRIB(txBytes) - ATTRIB(rxBytes) - ATTRIB(txPackets) - ATTRIB(rxPackets) - ATTRIB(lostPackets) - ATTRIB(timesForwarded) - << ">\n"; + ATTRIB(timeFirstTxPacket) + ATTRIB(timeFirstRxPacket) + ATTRIB(timeLastTxPacket) + ATTRIB(timeLastRxPacket) + ATTRIB(delaySum) + ATTRIB(jitterSum) + ATTRIB(lastDelay) + ATTRIB(txBytes) + ATTRIB(rxBytes) + ATTRIB(txPackets) + ATTRIB(rxPackets) + ATTRIB(lostPackets) + ATTRIB(timesForwarded) + << ">\n"; #undef ATTRIB @@ -462,7 +462,7 @@ FlowMonitor::SerializeToXmlStream (std::ostream &os, int indent, bool enableHist indent -= 2; INDENT(indent); os << "\n"; } - + std::string FlowMonitor::SerializeToXmlString (int indent, bool enableHistograms, bool enableProbes) diff --git a/src/flow-monitor/model/flow-monitor.h b/src/flow-monitor/model/flow-monitor.h index f79559de0..64877ff79 100644 --- a/src/flow-monitor/model/flow-monitor.h +++ b/src/flow-monitor/model/flow-monitor.h @@ -54,7 +54,7 @@ public: /// was received by an end node, i.e. the time when the flow /// reception starts Time timeFirstRxPacket; - + /// Contains the absolute time when the last packet in the flow /// was transmitted, i.e. the time when the flow transmission /// ends @@ -133,7 +133,7 @@ public: /// Set the FlowClassifier to be used by the flow monitor. void SetFlowClassifier (Ptr classifier); - + /// Set the time, counting from the current time, from which to start monitoring flows void Start (const Time &time); /// Set the time, counting from the current time, from which to stop monitoring flows @@ -171,7 +171,7 @@ public: /// Check right now for packets that appear to be lost, considering /// packets as lost if not seen in the network for a time larger /// than maxDelay - void CheckForLostPackets (Time maxDelay); + void CheckForLostPackets (Time maxDelay); // --- methods to get the results --- /// Retrieve all collected the flow statistics. Note, if the diff --git a/src/flow-monitor/model/flow-probe.cc b/src/flow-monitor/model/flow-probe.cc index e58058942..d059aec14 100644 --- a/src/flow-monitor/model/flow-probe.cc +++ b/src/flow-monitor/model/flow-probe.cc @@ -28,7 +28,7 @@ FlowProbe::~FlowProbe () { } - + FlowProbe::FlowProbe (Ptr flowMonitor) : m_flowMonitor (flowMonitor) { @@ -72,7 +72,7 @@ FlowProbe::SerializeToXmlStream (std::ostream &os, int indent, uint32_t index) c INDENT(indent); os << "\n"; indent += 2; - + for (Stats::const_iterator iter = m_stats.begin (); iter != m_stats.end (); iter++) { INDENT(indent); diff --git a/src/flow-monitor/model/flow-probe.h b/src/flow-monitor/model/flow-probe.h index 87d8db4a2..f317da6a2 100644 --- a/src/flow-monitor/model/flow-probe.h +++ b/src/flow-monitor/model/flow-probe.h @@ -31,7 +31,7 @@ namespace ns3 { class FlowMonitor; - + /// The FlowProbe class is responsible for listening for packet events /// in a specific point of the simulated space, report those events to /// the global FlowMonitor, and collect its own flow statistics @@ -41,11 +41,11 @@ class FlowProbe : public SimpleRefCount private: FlowProbe (FlowProbe const &); FlowProbe& operator= (FlowProbe const &); - + protected: - + FlowProbe (Ptr flowMonitor); - + public: virtual ~FlowProbe (); @@ -65,9 +65,9 @@ public: /// Number of packets seen of this flow uint32_t packets; }; - + typedef std::map Stats; - + void AddPacketStats (FlowId flowId, uint32_t packetSize, Time delayFromFirstProbe); void AddPacketDropStats (FlowId flowId, uint32_t packetSize, uint32_t reasonCode); diff --git a/src/flow-monitor/model/histogram.cc b/src/flow-monitor/model/histogram.cc index 86e25d6c8..0927c1025 100644 --- a/src/flow-monitor/model/histogram.cc +++ b/src/flow-monitor/model/histogram.cc @@ -23,7 +23,7 @@ #include "ns3/simulator.h" #include "ns3/log.h" -#define DEFAULT_BIN_WIDTH 1 +#define DEFAULT_BIN_WIDTH 1 // #define RESERVED_BINS_INC 10 @@ -42,7 +42,7 @@ Histogram::GetNBins () const { return m_histogram.size (); } - + double Histogram::GetBinStart (uint32_t index) { @@ -74,22 +74,22 @@ Histogram::GetBinCount (uint32_t index) NS_ASSERT (index < m_histogram.size ()); return m_histogram[index]; } - + void Histogram::AddValue (double value) { uint32_t index = (uint32_t)floor (value/m_binWidth); - + //check if we need to resize the vector NS_LOG_DEBUG ("AddValue: index=" << index << ", m_histogram.size()=" << m_histogram.size ()); - + if (index >= m_histogram.size ()) { m_histogram.resize (index + 1, 0); } m_histogram[index]++; } - + Histogram::Histogram (double binWidth) { m_binWidth = binWidth; @@ -105,12 +105,12 @@ void Histogram::SerializeToXmlStream (std::ostream &os, int indent, std::string elementName) const { #define INDENT(level) for (int __xpto = 0; __xpto < level; __xpto++) os << ' '; - + INDENT(indent); os << "<" << elementName // << " binWidth=\"" << m_binWidth << "\"" << " nBins=\"" << m_histogram.size () << "\"" << " >\n"; indent += 2; - + #if 1 // two alternative forms of representing bin data, one more verbose than the other one for (uint32_t index = 0; index < m_histogram.size (); index++) { diff --git a/src/flow-monitor/model/histogram.h b/src/flow-monitor/model/histogram.h index 6772e1675..935376b7a 100644 --- a/src/flow-monitor/model/histogram.h +++ b/src/flow-monitor/model/histogram.h @@ -42,10 +42,10 @@ public: double GetBinWidth (uint32_t index) const; void SetDefaultBinWidth (double binWidth); uint32_t GetBinCount (uint32_t index); - + // Method for adding values void AddValue (double value); - + void SerializeToXmlStream (std::ostream &os, int indent, std::string elementName) const; diff --git a/src/flow-monitor/model/ipv4-flow-classifier.cc b/src/flow-monitor/model/ipv4-flow-classifier.cc index e0692bf21..7f40a862c 100644 --- a/src/flow-monitor/model/ipv4-flow-classifier.cc +++ b/src/flow-monitor/model/ipv4-flow-classifier.cc @@ -61,7 +61,7 @@ bool operator < (const Ipv4FlowClassifier::FiveTuple &t1, { return false; } - + if (t1.sourcePort < t2.sourcePort) { return true; @@ -137,11 +137,11 @@ Ipv4FlowClassifier::Classify (const Ipv4Header &ipHeader, Ptr ipPa default: return false; } - + // try to insert the tuple, but check if it already exists std::pair::iterator, bool> insert = m_flowMap.insert (std::pair (tuple, 0)); - + // if the insertion succeeded, we need to assign this tuple a new flow identifier if (insert.second) { @@ -159,7 +159,7 @@ Ipv4FlowClassifier::FiveTuple Ipv4FlowClassifier::FindFlow (FlowId flowId) const { for (std::map::const_iterator - iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++) + iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++) { if (iter->second == flowId) { @@ -168,7 +168,7 @@ Ipv4FlowClassifier::FindFlow (FlowId flowId) const } NS_FATAL_ERROR ("Could not find the flow with ID " << flowId); FiveTuple retval = { Ipv4Address::GetZero (), Ipv4Address::GetZero (), 0, 0, 0 }; - return retval; + return retval; } void @@ -180,7 +180,7 @@ Ipv4FlowClassifier::SerializeToXmlStream (std::ostream &os, int indent) const indent += 2; for (std::map::const_iterator - iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++) + iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++) { INDENT(indent); os << "second << "\"" @@ -194,7 +194,7 @@ Ipv4FlowClassifier::SerializeToXmlStream (std::ostream &os, int indent) const indent -= 2; INDENT(indent); os << "\n"; - + #undef INDENT } diff --git a/src/flow-monitor/model/ipv4-flow-classifier.h b/src/flow-monitor/model/ipv4-flow-classifier.h index 5dca4c59e..cea7f8343 100644 --- a/src/flow-monitor/model/ipv4-flow-classifier.h +++ b/src/flow-monitor/model/ipv4-flow-classifier.h @@ -64,13 +64,13 @@ public: private: std::map m_flowMap; - + }; bool operator < (const Ipv4FlowClassifier::FiveTuple &t1, const Ipv4FlowClassifier::FiveTuple &t2); bool operator == (const Ipv4FlowClassifier::FiveTuple &t1, const Ipv4FlowClassifier::FiveTuple &t2); - + } // namespace ns3 diff --git a/src/flow-monitor/model/ipv4-flow-probe.cc b/src/flow-monitor/model/ipv4-flow-probe.cc index 2e50a13d4..d12b8d502 100644 --- a/src/flow-monitor/model/ipv4-flow-probe.cc +++ b/src/flow-monitor/model/ipv4-flow-probe.cc @@ -34,9 +34,9 @@ using namespace std; NS_LOG_COMPONENT_DEFINE ("Ipv4FlowProbe"); - ////////////////////////////////////// - // Ipv4FlowProbeTag class implementation // - ////////////////////////////////////// +////////////////////////////////////// +// Ipv4FlowProbeTag class implementation // +////////////////////////////////////// class Ipv4FlowProbeTag : public Tag { @@ -59,7 +59,7 @@ private: uint32_t m_flowId; uint32_t m_packetId; uint32_t m_packetSize; - + }; TypeId @@ -68,7 +68,7 @@ Ipv4FlowProbeTag::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv4FlowProbeTag") .SetParent () .AddConstructor () - ; + ; return tid; } TypeId @@ -104,11 +104,13 @@ Ipv4FlowProbeTag::Print (std::ostream &os) const } Ipv4FlowProbeTag::Ipv4FlowProbeTag () : Tag () -{} +{ +} Ipv4FlowProbeTag::Ipv4FlowProbeTag (uint32_t flowId, uint32_t packetId, uint32_t packetSize) : Tag (), m_flowId (flowId), m_packetId (packetId), m_packetSize (packetSize) -{} +{ +} void Ipv4FlowProbeTag::SetFlowId (uint32_t id) @@ -129,7 +131,7 @@ uint32_t Ipv4FlowProbeTag::GetFlowId (void) const { return m_flowId; -} +} uint32_t Ipv4FlowProbeTag::GetPacketId (void) const { @@ -141,9 +143,9 @@ Ipv4FlowProbeTag::GetPacketSize (void) const return m_packetSize; } - //////////////////////////////////////// - // Ipv4FlowProbe class implementation // - //////////////////////////////////////// +//////////////////////////////////////// +// Ipv4FlowProbe class implementation // +//////////////////////////////////////// Ipv4FlowProbe::Ipv4FlowProbe (Ptr monitor, Ptr classifier, @@ -192,12 +194,12 @@ Ipv4FlowProbe::SendOutgoingLogger (const Ipv4Header &ipHeader, Ptr { FlowId flowId; FlowPacketId packetId; - + if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId)) { uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ()); NS_LOG_DEBUG ("ReportFirstTx ("<ReportFirstTx (this, flowId, packetId, size); // tag the packet with the flow id and packet id, so that the packet can be identified even @@ -212,7 +214,7 @@ Ipv4FlowProbe::ForwardLogger (const Ipv4Header &ipHeader, Ptr ipPa { FlowId flowId; FlowPacketId packetId; - + if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId)) { uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ()); @@ -224,10 +226,10 @@ Ipv4FlowProbe::ForwardLogger (const Ipv4Header &ipHeader, Ptr ipPa void Ipv4FlowProbe::ForwardUpLogger (const Ipv4Header &ipHeader, Ptr ipPayload, uint32_t interface) -{ +{ FlowId flowId; FlowPacketId packetId; - + if (m_classifier->Classify (ipHeader, ipPayload, &flowId, &packetId)) { // remove the tags that are added by Ipv4FlowProbe::SendOutgoingLogger () @@ -251,7 +253,7 @@ Ipv4FlowProbe::DropLogger (const Ipv4Header &ipHeader, Ptr ipPaylo { case Ipv4L3Protocol::DROP_NO_ROUTE: break; - + case Ipv4L3Protocol::DROP_TTL_EXPIRED: case Ipv4L3Protocol::DROP_BAD_CHECKSUM: Ipv4Address addri = m_ipv4->GetAddress (ifIndex); @@ -277,8 +279,8 @@ Ipv4FlowProbe::DropLogger (const Ipv4Header &ipHeader, Ptr ipPaylo uint32_t size = (ipPayload->GetSize () + ipHeader.GetSerializedSize ()); NS_LOG_DEBUG ("Drop ("< ipPayload) bool tagFound; tagFound = ConstCast (ipPayload)->RemovePacketTag (fTag); NS_ASSERT_MSG (tagFound, "FlowProbeTag is missing"); - + // cast tagFound to void, to suppress 'tagFound' set but not used compiler + // warning in optimized builds + (void) tagFound; FlowId flowId = fTag.GetFlowId (); FlowPacketId packetId = fTag.GetPacketId (); uint32_t size = fTag.GetPacketSize (); NS_LOG_DEBUG ("Drop ("<ReportDrop (this, flowId, packetId, size, DROP_QUEUE); } diff --git a/src/flow-monitor/model/ipv4-flow-probe.h b/src/flow-monitor/model/ipv4-flow-probe.h index fd8ceffe0..e48d9ca87 100644 --- a/src/flow-monitor/model/ipv4-flow-probe.h +++ b/src/flow-monitor/model/ipv4-flow-probe.h @@ -38,34 +38,34 @@ class Node; /// Ipv4L3Protocol interface of the node. class Ipv4FlowProbe : public FlowProbe { - + public: Ipv4FlowProbe (Ptr monitor, Ptr classifier, Ptr node); virtual ~Ipv4FlowProbe (); /// \brief enumeration of possible reasons why a packet may be dropped enum DropReason - { - /// Packet dropped due to missing route to the destination - DROP_NO_ROUTE = 0, + { + /// Packet dropped due to missing route to the destination + DROP_NO_ROUTE = 0, - /// Packet dropped due to TTL decremented to zero during IPv4 forwarding - DROP_TTL_EXPIRE, + /// Packet dropped due to TTL decremented to zero during IPv4 forwarding + DROP_TTL_EXPIRE, - /// Packet dropped due to invalid checksum in the IPv4 header - DROP_BAD_CHECKSUM, + /// Packet dropped due to invalid checksum in the IPv4 header + DROP_BAD_CHECKSUM, - /// Packet dropped due to queue overflow. Note: only works for - /// NetDevices that provide a TxQueue attribute of type Queue - /// with a Drop trace source. It currently works with Csma and - /// PointToPoint devices, but not with WiFi or WiMax. - DROP_QUEUE, + /// Packet dropped due to queue overflow. Note: only works for + /// NetDevices that provide a TxQueue attribute of type Queue + /// with a Drop trace source. It currently works with Csma and + /// PointToPoint devices, but not with WiFi or WiMax. + DROP_QUEUE, - DROP_INTERFACE_DOWN, /**< Interface is down so can not send packet */ - DROP_ROUTE_ERROR, /**< Route error */ - - DROP_INVALID_REASON, - }; + DROP_INTERFACE_DOWN, /**< Interface is down so can not send packet */ + DROP_ROUTE_ERROR, /**< Route error */ + + DROP_INVALID_REASON, + }; private: diff --git a/src/flow-monitor/test/histogram-test-suite.cc b/src/flow-monitor/test/histogram-test-suite.cc index f6e9cf1c1..eedfeb4e7 100644 --- a/src/flow-monitor/test/histogram-test-suite.cc +++ b/src/flow-monitor/test/histogram-test-suite.cc @@ -34,7 +34,8 @@ public: HistogramTestCase::HistogramTestCase () : ns3::TestCase ("Histogram") -{} +{ +} void @@ -47,19 +48,19 @@ HistogramTestCase::DoRun (void) { h0.AddValue (3.4); } - + for (int i=1; i <= 5; i++) - { + { h0.AddValue (3.6); } - + NS_TEST_EXPECT_MSG_EQ_TOL (h0.GetBinWidth (0), 3.5, 1e-6, ""); NS_TEST_EXPECT_MSG_EQ (h0.GetNBins (), 2, ""); NS_TEST_EXPECT_MSG_EQ_TOL (h0.GetBinStart (1), 3.5, 1e-6, ""); NS_TEST_EXPECT_MSG_EQ (h0.GetBinCount (0), 10, ""); NS_TEST_EXPECT_MSG_EQ (h0.GetBinCount (1), 5, ""); } - + { // Testing bin expansion h0.AddValue (74.3); diff --git a/doc/manual/figures/internet-node-recv.dia b/src/internet/doc/internet-node-recv.dia similarity index 100% rename from doc/manual/figures/internet-node-recv.dia rename to src/internet/doc/internet-node-recv.dia diff --git a/doc/manual/figures/internet-node-send.dia b/src/internet/doc/internet-node-send.dia similarity index 100% rename from doc/manual/figures/internet-node-send.dia rename to src/internet/doc/internet-node-send.dia diff --git a/doc/manual/source/internet-stack.rst b/src/internet/doc/internet-stack.rst similarity index 96% rename from doc/manual/source/internet-stack.rst rename to src/internet/doc/internet-stack.rst index 66dfb4e17..23582c735 100644 --- a/doc/manual/source/internet-stack.rst +++ b/src/internet/doc/internet-stack.rst @@ -9,7 +9,7 @@ Internet stack aggregation A bare class :cpp:class:`Node` is not very useful as-is; other objects must be aggregated to it to provide useful node functionality. -The |ns3| source code directory ``src/internet-stack`` provides implementation +The |ns3| source code directory ``src/internet`` provides implementation of TCP/IPv4- and IPv6-related components. These include IPv4, ARP, UDP, TCP, IPv6, Neighbor Discovery, and other related protocols. @@ -72,9 +72,8 @@ Layer-3 protocols At the lowest layer, sitting above the NetDevices, are the "layer 3" protocols, including IPv4, IPv6 (in the future), and ARP. The class :cpp:class:`Ipv4L3Protocol` is an implementation class whose public interface is -typically class :cpp:class:`Ipv4` (found in src/node directory), but the -Ipv4L3Protocol public API is also used internally in the src/internet-stack -directory at present. +typically class :cpp:class:`Ipv4`, but the +Ipv4L3Protocol public API is also used internally at present. In class Ipv4L3Protocol, one method described below is ``Receive ()``::: @@ -199,13 +198,13 @@ Ipv4-capable Node objects are not exposed at the simulator public API. This allows for different implementations; for instance, replacing the native |ns3| models with ported TCP/IP stack code. -The C++ public APIs of all of these objects is found in the ``src/node`` +The C++ public APIs of all of these objects is found in the ``src/network`` directory, including principally: +* ``address.h`` * ``socket.h`` -* ``tcp.h`` -* ``udp.h`` -* ``ipv4.h`` +* ``node.h`` +* ``packet.h`` These are typically base class objects that implement the default values used in the implementation, implement access methods to get/set state variables, host diff --git a/doc/manual/source/ipv4.rst b/src/internet/doc/ipv4.rst similarity index 100% rename from doc/manual/source/ipv4.rst rename to src/internet/doc/ipv4.rst diff --git a/doc/manual/source/ipv6.rst b/src/internet/doc/ipv6.rst similarity index 100% rename from doc/manual/source/ipv6.rst rename to src/internet/doc/ipv6.rst diff --git a/doc/manual/source/routing.rst b/src/internet/doc/routing-overview.rst similarity index 99% rename from doc/manual/source/routing.rst rename to src/internet/doc/routing-overview.rst index 22f1ea1b1..bf2921a61 100644 --- a/doc/manual/source/routing.rst +++ b/src/internet/doc/routing-overview.rst @@ -107,7 +107,7 @@ Global Unicast Routing API The public API is very minimal. User scripts include the following::: - #include "ns3/helper-module.h" + #include "ns3/internet-module.h" If the default InternetStackHelper is used, then an instance of global routing will be aggregated to each node. After IP addresses are configured, the @@ -267,7 +267,7 @@ Optimized Link State Routing (OLSR) +++++++++++++++++++++++++++++++++++ This IPv4 routing protocol was originally ported from the OLSR-UM implementation -for ns-2. The implementation is found in the src/routing/olsr directory, and an +for ns-2. The implementation is found in the src/olsr directory, and an example script is in examples/simple-point-to-point-olsr.cc. Typically, OLSR is enabled in a main program by use of an OlsrHelper class that diff --git a/doc/manual/figures/routing-specialization.dia b/src/internet/doc/routing-specialization.dia similarity index 100% rename from doc/manual/figures/routing-specialization.dia rename to src/internet/doc/routing-specialization.dia diff --git a/doc/manual/figures/routing.dia b/src/internet/doc/routing.dia similarity index 100% rename from doc/manual/figures/routing.dia rename to src/internet/doc/routing.dia diff --git a/doc/manual/source/tcp.rst b/src/internet/doc/tcp.rst similarity index 92% rename from doc/manual/source/tcp.rst rename to src/internet/doc/tcp.rst index 1360c9914..6e380145e 100644 --- a/doc/manual/source/tcp.rst +++ b/src/internet/doc/tcp.rst @@ -9,13 +9,13 @@ Generic support for TCP *********************** |ns3| was written to support multiple TCP implementations. The implementations -inherit from a few common header classes in the ``src/node`` directory, so that +inherit from a few common header classes in the ``src/network`` directory, so that user code can swap out implementations with minimal changes to the scripts. There are two important abstract base classes: * class :cpp:class:`TcpSocket`: This is defined in - ``src/node/tcp-socket.{cc,h}``. This class exists for hosting TcpSocket + ``src/internet/model/tcp-socket.{cc,h}``. This class exists for hosting TcpSocket attributes that can be reused across different implementations. For instance, the attribute ``InitialCwnd`` can be used for any of the implementations that derive from class :cpp:class:`TcpSocket`. @@ -42,18 +42,18 @@ connection setup and close logic. The implementation of TCP is contained in the following files::: - src/internet-stack/tcp-header.{cc,h} - src/internet-stack/tcp-l4-protocol.{cc,h} - src/internet-stack/tcp-socket-factory-impl.{cc,h} - src/internet-stack/tcp-socket-base.{cc,h} - src/internet-stack/tcp-tx-buffer.{cc,h} - src/internet-stack/tcp-rx-buffer.{cc,h} - src/internet-stack/tcp-rfc793.{cc,h} - src/internet-stack/tcp-tahoe.{cc,h} - src/internet-stack/tcp-reno.{cc,h} - src/internet-stack/tcp-newreno.{cc,h} - src/internet-stack/rtt-estimator.{cc,h} - src/common/sequence-number.{cc,h} + src/internet/model/tcp-header.{cc,h} + src/internet/model/tcp-l4-protocol.{cc,h} + src/internet/model/tcp-socket-factory-impl.{cc,h} + src/internet/model/tcp-socket-base.{cc,h} + src/internet/model/tcp-tx-buffer.{cc,h} + src/internet/model/tcp-rx-buffer.{cc,h} + src/internet/model/tcp-rfc793.{cc,h} + src/internet/model/tcp-tahoe.{cc,h} + src/internet/model/tcp-reno.{cc,h} + src/internet/model/tcp-newreno.{cc,h} + src/internet/model/rtt-estimator.{cc,h} + src/network/model/sequence-number.{cc,h} Different variants of TCP congestion control are supported by subclassing the common base class :cpp:class:`TcpSocketBase`. Several variants @@ -66,8 +66,8 @@ Usage In many cases, usage of TCP is set at the application layer by telling the |ns3| application which kind of socket factory to use. -Using the helper functions defined in ``src/helper``, here is how -one would create a TCP receiver::: +Using the helper functions defined in ``src/applications/helper`` and +``src/network/helper``, here is how one would create a TCP receiver::: // Create a packet sink on the star "hub" to receive these packets uint16_t port = 50000; @@ -195,7 +195,7 @@ There are a few example files. Try:: These examples will deposit some ``.pcap`` files in your directory, which can be examined by tcpdump or wireshark. -Let's look at the ``examples/tcp-nsc-zoo.cc`` file for some typical +Let's look at the ``examples/tcp/tcp-nsc-zoo.cc`` file for some typical usage. How does it differ from using native |ns3| TCP? There is one main configuration line, when using NSC and the |ns3| helper API, that needs to be set::: @@ -233,7 +233,7 @@ sockets, as described above and documented in `Doxygen `_ Additionally, NSC TCP exports a lot of configuration variables into the -|ns3| :ref:`Attributes` system, via a `sysctl `_-like interface. In the ``examples/tcp-nsc-zoo`` example, you +|ns3| :ref:`Attributes` system, via a `sysctl `_-like interface. In the ``examples/tcp/tcp-nsc-zoo`` example, you can see the following configuration::: @@ -288,7 +288,7 @@ The three main parts are: * :cpp:class:`ns3::NscTcpSocketFactoryImpl`: a factory to create new NSC sockets -``src/internet-stack/nsc-tcp-l4-protocol`` is the main class. Upon +``src/internet/model/nsc-tcp-l4-protocol`` is the main class. Upon Initialization, it loads an nsc network stack to use (via dlopen()). Each instance of this class may use a different stack. The stack (=shared library) to use is set using the SetNscLibrary() method (at this time its called indirectly @@ -309,7 +309,7 @@ This class calls ``ns3::NscTcpSocketImpl`` both from the nsc wakeup() callback and from the Receive path (to ensure that possibly queued data is scheduled for sending). -``src/internet-stack/nsc-tcp-socket-impl`` implements the nsc socket interface. +``src/internet/model/nsc-tcp-socket-impl`` implements the nsc socket interface. Each instance has its own nscTcpSocket. Data that is Send() will be handed to the nsc stack via m_nscTcpSocket->send_data(). (and not to nsc-tcp-l4, this is the major difference compared to |ns3| TCP). The class also queues up data that diff --git a/src/internet/helper/internet-stack-helper.cc b/src/internet/helper/internet-stack-helper.cc index 9f0432bb0..93c220bdb 100644 --- a/src/internet/helper/internet-stack-helper.cc +++ b/src/internet/helper/internet-stack-helper.cc @@ -20,7 +20,7 @@ */ /** - * \ingroup internetStack + * \ingroup internet * \defgroup internetStackModel Internet Stack Model * * \section internetStackTracingModel Tracing in the Internet Stack @@ -210,8 +210,8 @@ namespace ns3 { // bill. // typedef std::pair, uint32_t> InterfacePairIpv4; -typedef std::map > InterfaceFileMapIpv4; -typedef std::map > InterfaceStreamMapIpv4; +typedef std::map > InterfaceFileMapIpv4; +typedef std::map > InterfaceStreamMapIpv4; static InterfaceFileMapIpv4 g_interfaceFileMapIpv4; /**< A mapping of Ipv4/interface pairs to pcap files */ static InterfaceStreamMapIpv4 g_interfaceStreamMapIpv4; /**< A mapping of Ipv4/interface pairs to ascii streams */ @@ -225,9 +225,9 @@ static InterfaceStreamMapIpv6 g_interfaceStreamMapIpv6; /**< A mapping of Ipv6/i InternetStackHelper::InternetStackHelper () : m_routing (0), - m_routingv6 (0), - m_ipv4Enabled (true), - m_ipv6Enabled (true) + m_routingv6 (0), + m_ipv4Enabled (true), + m_ipv6Enabled (true) { Initialize (); } @@ -384,7 +384,7 @@ InternetStackHelper::Install (Ptr node) const "an InternetStack to a node with an existing Ipv6 object"); return; } - + CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv6L3Protocol"); CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv6L4Protocol"); /* TODO add UdpL4Protocol/TcpL4Protocol for IPv6 */ @@ -432,7 +432,7 @@ InternetStackHelper::PcapHooked (Ptr ipv4) { for ( InterfaceFileMapIpv4::const_iterator i = g_interfaceFileMapIpv4.begin (); i != g_interfaceFileMapIpv4.end (); - ++i) + ++i) { if ((*i).first.first == ipv4) { @@ -492,6 +492,9 @@ InternetStackHelper::EnablePcapIpv4Internal (std::string prefix, Ptr ipv4, result = ipv4L3Protocol->TraceConnectWithoutContext ("Rx", MakeCallback (&Ipv4L3ProtocolRxTxSink)); NS_ASSERT_MSG (result == true, "InternetStackHelper::EnablePcapIpv4Internal(): " "Unable to connect ipv4L3Protocol \"Rx\""); + // cast result to void, to suppress ‘result’ set but not used compiler-warning + // for optimized builds + (void) result; } g_interfaceFileMapIpv4[std::make_pair (ipv4, interface)] = file; @@ -524,7 +527,7 @@ InternetStackHelper::PcapHooked (Ptr ipv6) { for ( InterfaceFileMapIpv6::const_iterator i = g_interfaceFileMapIpv6.begin (); i != g_interfaceFileMapIpv6.end (); - ++i) + ++i) { if ((*i).first.first == ipv6) { @@ -584,6 +587,9 @@ InternetStackHelper::EnablePcapIpv6Internal (std::string prefix, Ptr ipv6, result = ipv6L3Protocol->TraceConnectWithoutContext ("Rx", MakeCallback (&Ipv6L3ProtocolRxTxSink)); NS_ASSERT_MSG (result == true, "InternetStackHelper::EnablePcapIpv6Internal(): " "Unable to connect ipv6L3Protocol \"Rx\""); + // cast found to void, to suppress ‘result’ set but not used compiler-warning + // for optimized builds + (void) result; } g_interfaceFileMapIpv6[std::make_pair (ipv6, interface)] = file; @@ -643,7 +649,7 @@ Ipv4L3ProtocolDropSinkWithContext ( p->AddHeader (header); #ifdef INTERFACE_CONTEXT *stream->GetStream () << "d " << Simulator::Now ().GetSeconds () << " " << context << "(" << interface << ") " - << *p << std::endl; + << *p << std::endl; #else *stream->GetStream () << "d " << Simulator::Now ().GetSeconds () << " " << context << " " << *p << std::endl; #endif @@ -654,7 +660,7 @@ InternetStackHelper::AsciiHooked (Ptr ipv4) { for ( InterfaceStreamMapIpv4::const_iterator i = g_interfaceStreamMapIpv4.begin (); i != g_interfaceStreamMapIpv4.end (); - ++i) + ++i) { if ((*i).first.first == ipv4) { @@ -728,7 +734,7 @@ InternetStackHelper::EnableAsciiIpv4Internal ( // Ptr arpL3Protocol = ipv4->GetObject (); asciiTraceHelper.HookDefaultDropSinkWithoutContext (arpL3Protocol, "Drop", theStream); - + // // The drop sink for the Ipv4L3Protocol uses a different signature than // the default sink, so we have to cook one up for ourselves. We can get @@ -737,7 +743,7 @@ InternetStackHelper::EnableAsciiIpv4Internal ( // Ptr ipv4L3Protocol = ipv4->GetObject (); bool __attribute__ ((unused)) result = ipv4L3Protocol->TraceConnectWithoutContext ("Drop", - MakeBoundCallback (&Ipv4L3ProtocolDropSinkWithoutContext, theStream)); + MakeBoundCallback (&Ipv4L3ProtocolDropSinkWithoutContext, theStream)); NS_ASSERT_MSG (result == true, "InternetStackHelper::EanableAsciiIpv4Internal(): " "Unable to connect ipv4L3Protocol \"Drop\""); } @@ -771,7 +777,7 @@ InternetStackHelper::EnableAsciiIpv4Internal ( // oss << "/NodeList/" << node->GetId () << "/$ns3::ArpL3Protocol/Drop"; Config::Connect (oss.str (), MakeBoundCallback (&AsciiTraceHelper::DefaultDropSinkWithContext, stream)); - + // // This has all kinds of parameters coming with, so we have to cook up our // own sink. @@ -838,7 +844,7 @@ Ipv6L3ProtocolDropSinkWithContext ( p->AddHeader (header); #ifdef INTERFACE_CONTEXT *stream->GetStream () << "d " << Simulator::Now ().GetSeconds () << " " << context << "(" << interface << ") " - << *p << std::endl; + << *p << std::endl; #else *stream->GetStream () << "d " << Simulator::Now ().GetSeconds () << " " << context << " " << *p << std::endl; #endif @@ -849,7 +855,7 @@ InternetStackHelper::AsciiHooked (Ptr ipv6) { for ( InterfaceStreamMapIpv6::const_iterator i = g_interfaceStreamMapIpv6.begin (); i != g_interfaceStreamMapIpv6.end (); - ++i) + ++i) { if ((*i).first.first == ipv6) { @@ -924,7 +930,7 @@ InternetStackHelper::EnableAsciiIpv6Internal ( // Ptr ipv6L3Protocol = ipv6->GetObject (); bool __attribute__ ((unused)) result = ipv6L3Protocol->TraceConnectWithoutContext ("Drop", - MakeBoundCallback (&Ipv6L3ProtocolDropSinkWithoutContext, theStream)); + MakeBoundCallback (&Ipv6L3ProtocolDropSinkWithoutContext, theStream)); NS_ASSERT_MSG (result == true, "InternetStackHelper::EnableAsciiIpv6Internal(): " "Unable to connect ipv6L3Protocol \"Drop\""); } @@ -949,7 +955,7 @@ InternetStackHelper::EnableAsciiIpv6Internal ( { Ptr node = ipv6->GetObject (); std::ostringstream oss; - + oss << "/NodeList/" << node->GetId () << "/$ns3::Ipv6L3Protocol/Drop"; Config::Connect (oss.str (), MakeBoundCallback (&Ipv6L3ProtocolDropSinkWithContext, stream)); } diff --git a/src/internet/helper/internet-stack-helper.h b/src/internet/helper/internet-stack-helper.h index cda63d29a..4a43e650b 100644 --- a/src/internet/helper/internet-stack-helper.h +++ b/src/internet/helper/internet-stack-helper.h @@ -53,7 +53,7 @@ class Ipv6RoutingHelper; * may be of interest to many other classes. */ class InternetStackHelper : public PcapHelperForIpv4, public PcapHelperForIpv6, - public AsciiTraceHelperForIpv4, public AsciiTraceHelperForIpv6 + public AsciiTraceHelperForIpv4, public AsciiTraceHelperForIpv6 { public: /** @@ -89,7 +89,7 @@ public: * ns3::Ipv4::SetRoutingProtocol. */ void SetRoutingHelper (const Ipv4RoutingHelper &routing); - + /** * \brief Set IPv6 routing helper. * \param routing IPv6 routing helper @@ -131,7 +131,7 @@ public: void InstallAll (void) const; /** - * \brief set the Tcp stack which will not need any other parameter. + * \brief set the Tcp stack which will not need any other parameter. * * This function sets up the tcp stack to the given TypeId. It should not be * used for NSC stack setup because the nsc stack needs the Library attribute @@ -142,7 +142,7 @@ public: * \param tid the type id, typically it is set to "ns3::TcpL4Protocol" */ void SetTcp(std::string tid); - + /** * \brief This function is used to setup the Network Simulation Cradle stack with library value. * @@ -231,7 +231,7 @@ private: void Initialize (void); ObjectFactory m_tcpFactory; const Ipv4RoutingHelper *m_routing; - + /** * \internal * \brief IPv6 routing helper. diff --git a/src/internet/helper/internet-trace-helper.cc b/src/internet/helper/internet-trace-helper.cc index 2d1ea0195..0e5ec7b74 100644 --- a/src/internet/helper/internet-trace-helper.cc +++ b/src/internet/helper/internet-trace-helper.cc @@ -93,7 +93,7 @@ PcapHelperForIpv4::EnablePcapIpv4 (std::string prefix, uint32_t nodeid, uint32_t { continue; } - + Ptr ipv4 = node->GetObject (); if (ipv4) { @@ -356,7 +356,7 @@ PcapHelperForIpv6::EnablePcapIpv6 (std::string prefix, uint32_t nodeid, uint32_t { continue; } - + Ptr ipv6 = node->GetObject (); if (ipv6) { diff --git a/src/internet/helper/ipv4-address-helper.cc b/src/internet/helper/ipv4-address-helper.cc index d319bee16..de273203b 100644 --- a/src/internet/helper/ipv4-address-helper.cc +++ b/src/internet/helper/ipv4-address-helper.cc @@ -55,8 +55,8 @@ Ipv4AddressHelper::Ipv4AddressHelper ( NS_LOG_FUNCTION_NOARGS (); SetBase (network, mask, address); } - - void + +void Ipv4AddressHelper::SetBase ( const Ipv4Address network, const Ipv4Mask mask, @@ -72,7 +72,7 @@ Ipv4AddressHelper::SetBase ( // Some quick reasonableness testing. // NS_ASSERT_MSG((m_network & ~m_mask) == 0, - "Ipv4AddressHelper::SetBase(): Inconsistent network and mask"); + "Ipv4AddressHelper::SetBase(): Inconsistent network and mask"); // // Figure out how much to shift network numbers to get them aligned, and what @@ -82,7 +82,7 @@ Ipv4AddressHelper::SetBase ( m_max = (1 << m_shift) - 2; NS_ASSERT_MSG(m_shift <= 32, - "Ipv4AddressHelper::SetBase(): Unreasonable address length"); + "Ipv4AddressHelper::SetBase(): Unreasonable address length"); // // Shift the network down into the normalized position. @@ -94,7 +94,7 @@ Ipv4AddressHelper::SetBase ( NS_LOG_LOGIC ("m_address == " << m_address); } - Ipv4Address +Ipv4Address Ipv4AddressHelper::NewAddress (void) { // @@ -105,7 +105,7 @@ Ipv4AddressHelper::NewAddress (void) // This implies that this operation is a post-increment. // NS_ASSERT_MSG (m_address <= m_max, - "Ipv4AddressHelper::NewAddress(): Address overflow"); + "Ipv4AddressHelper::NewAddress(): Address overflow"); Ipv4Address addr ((m_network << m_shift) | m_address); ++m_address; @@ -118,7 +118,7 @@ Ipv4AddressHelper::NewAddress (void) return addr; } - Ipv4Address +Ipv4Address Ipv4AddressHelper::NewNetwork (void) { NS_LOG_FUNCTION_NOARGS (); @@ -133,37 +133,37 @@ Ipv4AddressHelper::Assign (const NetDeviceContainer &c) NS_LOG_FUNCTION_NOARGS (); Ipv4InterfaceContainer retval; for (uint32_t i = 0; i < c.GetN (); ++i) { - Ptr device = c.Get (i); + Ptr device = c.Get (i); - Ptr node = device->GetNode (); - NS_ASSERT_MSG (node, "Ipv4AddressHelper::Assign(): NetDevice is not not associated " - "with any node -> fail"); + Ptr node = device->GetNode (); + NS_ASSERT_MSG (node, "Ipv4AddressHelper::Assign(): NetDevice is not not associated " + "with any node -> fail"); - Ptr ipv4 = node->GetObject (); - NS_ASSERT_MSG (ipv4, "Ipv4AddressHelper::Assign(): NetDevice is associated" - " with a node without IPv4 stack installed -> fail " - "(maybe need to use InternetStackHelper?)"); + Ptr ipv4 = node->GetObject (); + NS_ASSERT_MSG (ipv4, "Ipv4AddressHelper::Assign(): NetDevice is associated" + " with a node without IPv4 stack installed -> fail " + "(maybe need to use InternetStackHelper?)"); - int32_t interface = ipv4->GetInterfaceForDevice (device); - if (interface == -1) - { - interface = ipv4->AddInterface (device); - } - NS_ASSERT_MSG (interface >= 0, "Ipv4AddressHelper::Assign(): " - "Interface index not found"); + int32_t interface = ipv4->GetInterfaceForDevice (device); + if (interface == -1) + { + interface = ipv4->AddInterface (device); + } + NS_ASSERT_MSG (interface >= 0, "Ipv4AddressHelper::Assign(): " + "Interface index not found"); - Ipv4InterfaceAddress ipv4Addr = Ipv4InterfaceAddress (NewAddress (), m_mask); - ipv4->AddAddress (interface, ipv4Addr); - ipv4->SetMetric (interface, 1); - ipv4->SetUp (interface); - retval.Add (ipv4, interface); - } + Ipv4InterfaceAddress ipv4Addr = Ipv4InterfaceAddress (NewAddress (), m_mask); + ipv4->AddAddress (interface, ipv4Addr); + ipv4->SetMetric (interface, 1); + ipv4->SetUp (interface); + retval.Add (ipv4, interface); + } return retval; } const uint32_t N_BITS = 32; - uint32_t +uint32_t Ipv4AddressHelper::NumAddressBits (uint32_t maskbits) const { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/internet/helper/ipv4-address-helper.h b/src/internet/helper/ipv4-address-helper.h index a2fcbd286..3892d636d 100644 --- a/src/internet/helper/ipv4-address-helper.h +++ b/src/internet/helper/ipv4-address-helper.h @@ -57,7 +57,7 @@ public: * in the constructor */ Ipv4AddressHelper (Ipv4Address network, Ipv4Mask mask, - Ipv4Address base = "0.0.0.1"); + Ipv4Address base = "0.0.0.1"); /** * @brief Set the base network number, network mask and base address. @@ -89,7 +89,7 @@ public: * @returns Nothing. */ void SetBase (Ipv4Address network, Ipv4Mask mask, - Ipv4Address base = "0.0.0.1"); + Ipv4Address base = "0.0.0.1"); /** * @brief Increment the network number and reset the IP address counter to diff --git a/src/internet/helper/ipv4-global-routing-helper.cc b/src/internet/helper/ipv4-global-routing-helper.cc index db491a953..1aa64d332 100644 --- a/src/internet/helper/ipv4-global-routing-helper.cc +++ b/src/internet/helper/ipv4-global-routing-helper.cc @@ -28,23 +28,24 @@ NS_LOG_COMPONENT_DEFINE("GlobalRoutingHelper"); namespace ns3 { Ipv4GlobalRoutingHelper::Ipv4GlobalRoutingHelper () -{} +{ +} Ipv4GlobalRoutingHelper::Ipv4GlobalRoutingHelper (const Ipv4GlobalRoutingHelper &o) { } -Ipv4GlobalRoutingHelper* -Ipv4GlobalRoutingHelper::Copy (void) const +Ipv4GlobalRoutingHelper* +Ipv4GlobalRoutingHelper::Copy (void) const { - return new Ipv4GlobalRoutingHelper (*this); + return new Ipv4GlobalRoutingHelper (*this); } -Ptr +Ptr Ipv4GlobalRoutingHelper::Create (Ptr node) const { - NS_LOG_LOGIC ("Adding GlobalRouter interface to node " << - node->GetId ()); + NS_LOG_LOGIC ("Adding GlobalRouter interface to node " << + node->GetId ()); Ptr globalRouter = CreateObject (); node->AggregateObject (globalRouter); diff --git a/src/internet/helper/ipv4-global-routing-helper.h b/src/internet/helper/ipv4-global-routing-helper.h index 4d50b8ef0..6c7cbfc93 100644 --- a/src/internet/helper/ipv4-global-routing-helper.h +++ b/src/internet/helper/ipv4-global-routing-helper.h @@ -73,7 +73,7 @@ public: /** * \brief Remove all routes that were previously installed in a prior call * to either PopulateRoutingTables() or RecomputeRoutingTables(), and - * add a new set of routes. + * add a new set of routes. * * This method does not change the set of nodes * over which GlobalRouting is being used, but it will dynamically update diff --git a/src/internet/helper/ipv4-interface-container.cc b/src/internet/helper/ipv4-interface-container.cc index b12b05713..8df525cc0 100644 --- a/src/internet/helper/ipv4-interface-container.cc +++ b/src/internet/helper/ipv4-interface-container.cc @@ -5,36 +5,37 @@ namespace ns3 { Ipv4InterfaceContainer::Ipv4InterfaceContainer () -{} +{ +} -void +void Ipv4InterfaceContainer::Add (Ipv4InterfaceContainer other) { - for (InterfaceVector::const_iterator i = other.m_interfaces.begin (); i != other.m_interfaces.end (); i++) + for (InterfaceVector::const_iterator i = other.m_interfaces.begin (); i != other.m_interfaces.end (); i++) { m_interfaces.push_back (*i); } } -Ipv4InterfaceContainer::Iterator +Ipv4InterfaceContainer::Iterator Ipv4InterfaceContainer::Begin (void) const { return m_interfaces.begin (); } -Ipv4InterfaceContainer::Iterator +Ipv4InterfaceContainer::Iterator Ipv4InterfaceContainer::End (void) const { return m_interfaces.end (); } -uint32_t +uint32_t Ipv4InterfaceContainer::GetN (void) const { return m_interfaces.size (); } -Ipv4Address +Ipv4Address Ipv4InterfaceContainer::GetAddress (uint32_t i, uint32_t j) const { Ptr ipv4 = m_interfaces[i].first; @@ -55,9 +56,9 @@ Ipv4InterfaceContainer::Add (Ptr ipv4, uint32_t interface) m_interfaces.push_back (std::make_pair (ipv4, interface)); } void Ipv4InterfaceContainer::Add (std::pair, uint32_t> a) - { - Add (a.first, a.second); - } +{ + Add (a.first, a.second); +} void Ipv4InterfaceContainer::Add (std::string ipv4Name, uint32_t interface) { @@ -65,11 +66,11 @@ Ipv4InterfaceContainer::Add (std::string ipv4Name, uint32_t interface) m_interfaces.push_back (std::make_pair (ipv4, interface)); } - std::pair, uint32_t> +std::pair, uint32_t> Ipv4InterfaceContainer::Get(uint32_t i) const - { - return m_interfaces[i]; - } - +{ + return m_interfaces[i]; +} + } // namespace ns3 diff --git a/src/internet/helper/ipv4-interface-container.h b/src/internet/helper/ipv4-interface-container.h index 02716bc5a..78c765c34 100644 --- a/src/internet/helper/ipv4-interface-container.h +++ b/src/internet/helper/ipv4-interface-container.h @@ -169,8 +169,8 @@ public: */ std::pair, uint32_t> Get (uint32_t i) const; - private: - +private: + typedef std::vector,uint32_t> > InterfaceVector; InterfaceVector m_interfaces; }; diff --git a/src/internet/helper/ipv4-list-routing-helper.cc b/src/internet/helper/ipv4-list-routing-helper.cc index 71b2f351c..420062861 100644 --- a/src/internet/helper/ipv4-list-routing-helper.cc +++ b/src/internet/helper/ipv4-list-routing-helper.cc @@ -24,7 +24,8 @@ namespace ns3 { Ipv4ListRoutingHelper::Ipv4ListRoutingHelper() -{} +{ +} Ipv4ListRoutingHelper::~Ipv4ListRoutingHelper() { diff --git a/src/internet/helper/ipv4-static-routing-helper.cc b/src/internet/helper/ipv4-static-routing-helper.cc index e5daf5e7f..6c985675a 100644 --- a/src/internet/helper/ipv4-static-routing-helper.cc +++ b/src/internet/helper/ipv4-static-routing-helper.cc @@ -34,19 +34,20 @@ NS_LOG_COMPONENT_DEFINE("Ipv4StaticRoutingHelper"); namespace ns3 { Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper() -{} +{ +} Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper (const Ipv4StaticRoutingHelper &o) { } -Ipv4StaticRoutingHelper* -Ipv4StaticRoutingHelper::Copy (void) const +Ipv4StaticRoutingHelper* +Ipv4StaticRoutingHelper::Copy (void) const { - return new Ipv4StaticRoutingHelper (*this); + return new Ipv4StaticRoutingHelper (*this); } -Ptr +Ptr Ipv4StaticRoutingHelper::Create (Ptr node) const { return CreateObject (); @@ -83,11 +84,11 @@ Ipv4StaticRoutingHelper::GetStaticRouting (Ptr ipv4) const return 0; } -void +void Ipv4StaticRoutingHelper::AddMulticastRoute ( Ptr n, Ipv4Address source, - Ipv4Address group, + Ipv4Address group, Ptr input, NetDeviceContainer output) { @@ -101,31 +102,31 @@ Ipv4StaticRoutingHelper::AddMulticastRoute ( Ptr nd = *i; int32_t interface = ipv4->GetInterfaceForDevice (nd); NS_ASSERT_MSG(interface >= 0, - "Ipv4StaticRoutingHelper::AddMulticastRoute(): " - "Expected an interface associated with the device nd"); + "Ipv4StaticRoutingHelper::AddMulticastRoute(): " + "Expected an interface associated with the device nd"); outputInterfaces.push_back(interface); } int32_t inputInterface = ipv4->GetInterfaceForDevice (input); NS_ASSERT_MSG(inputInterface >= 0, - "Ipv4StaticRoutingHelper::AddMulticastRoute(): " - "Expected an interface associated with the device input"); + "Ipv4StaticRoutingHelper::AddMulticastRoute(): " + "Expected an interface associated with the device input"); Ipv4StaticRoutingHelper helper; Ptr ipv4StaticRouting = helper.GetStaticRouting (ipv4); if (!ipv4StaticRouting) { - NS_ASSERT_MSG (ipv4StaticRouting, - "Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(): " - "Expected an Ipv4StaticRouting associated with this node"); + NS_ASSERT_MSG (ipv4StaticRouting, + "Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(): " + "Expected an Ipv4StaticRouting associated with this node"); } ipv4StaticRouting->AddMulticastRoute (source, group, inputInterface, outputInterfaces); } -void +void Ipv4StaticRoutingHelper::AddMulticastRoute ( Ptr n, Ipv4Address source, - Ipv4Address group, + Ipv4Address group, std::string inputName, NetDeviceContainer output) { @@ -133,11 +134,11 @@ Ipv4StaticRoutingHelper::AddMulticastRoute ( AddMulticastRoute (n, source, group, input, output); } -void +void Ipv4StaticRoutingHelper::AddMulticastRoute ( std::string nName, Ipv4Address source, - Ipv4Address group, + Ipv4Address group, Ptr input, NetDeviceContainer output) { @@ -145,11 +146,11 @@ Ipv4StaticRoutingHelper::AddMulticastRoute ( AddMulticastRoute (n, source, group, input, output); } -void +void Ipv4StaticRoutingHelper::AddMulticastRoute ( std::string nName, Ipv4Address source, - Ipv4Address group, + Ipv4Address group, std::string inputName, NetDeviceContainer output) { @@ -166,15 +167,15 @@ Ipv4StaticRoutingHelper::SetDefaultMulticastRoute ( Ptr ipv4 = n->GetObject (); int32_t interfaceSrc = ipv4->GetInterfaceForDevice (nd); NS_ASSERT_MSG(interfaceSrc >= 0, - "Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(): " - "Expected an interface associated with the device"); + "Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(): " + "Expected an interface associated with the device"); Ipv4StaticRoutingHelper helper; Ptr ipv4StaticRouting = helper.GetStaticRouting (ipv4); if (!ipv4StaticRouting) { NS_ASSERT_MSG (ipv4StaticRouting, - "Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(): " - "Expected an Ipv4StaticRouting associated with this node"); + "Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(): " + "Expected an Ipv4StaticRouting associated with this node"); } ipv4StaticRouting->SetDefaultMulticastRoute (interfaceSrc); } diff --git a/src/internet/helper/ipv4-static-routing-helper.h b/src/internet/helper/ipv4-static-routing-helper.h index 63502d942..75204baab 100644 --- a/src/internet/helper/ipv4-static-routing-helper.h +++ b/src/internet/helper/ipv4-static-routing-helper.h @@ -82,31 +82,31 @@ public: * \brief Add a multicast route to a node and net device using explicit * Ptr and Ptr */ - void AddMulticastRoute (Ptr n, Ipv4Address source, Ipv4Address group, - Ptr input, NetDeviceContainer output); + void AddMulticastRoute (Ptr n, Ipv4Address source, Ipv4Address group, + Ptr input, NetDeviceContainer output); /** * \brief Add a multicast route to a node and device using a name string * previously associated to the node using the Object Name Service and a * Ptr */ - void AddMulticastRoute (std::string n, Ipv4Address source, Ipv4Address group, - Ptr input, NetDeviceContainer output); + void AddMulticastRoute (std::string n, Ipv4Address source, Ipv4Address group, + Ptr input, NetDeviceContainer output); /** * \brief Add a multicast route to a node and device using a Ptr and a * name string previously associated to the device using the Object Name Service. */ - void AddMulticastRoute (Ptr n, Ipv4Address source, Ipv4Address group, - std::string inputName, NetDeviceContainer output); + void AddMulticastRoute (Ptr n, Ipv4Address source, Ipv4Address group, + std::string inputName, NetDeviceContainer output); /** * \brief Add a multicast route to a node and device using name strings * previously associated to both the node and device using the Object Name * Service. */ - void AddMulticastRoute (std::string nName, Ipv4Address source, Ipv4Address group, - std::string inputName, NetDeviceContainer output); + void AddMulticastRoute (std::string nName, Ipv4Address source, Ipv4Address group, + std::string inputName, NetDeviceContainer output); /** * \brief Add a default route to the static routing protocol to forward diff --git a/src/internet/helper/ipv6-list-routing-helper.cc b/src/internet/helper/ipv6-list-routing-helper.cc index 8479bfcac..cffbef295 100644 --- a/src/internet/helper/ipv6-list-routing-helper.cc +++ b/src/internet/helper/ipv6-list-routing-helper.cc @@ -26,7 +26,8 @@ namespace ns3 { Ipv6ListRoutingHelper::Ipv6ListRoutingHelper () -{} +{ +} Ipv6ListRoutingHelper::~Ipv6ListRoutingHelper() { diff --git a/src/internet/helper/ipv6-routing-helper.cc b/src/internet/helper/ipv6-routing-helper.cc index 200b5fde9..09bf7edff 100644 --- a/src/internet/helper/ipv6-routing-helper.cc +++ b/src/internet/helper/ipv6-routing-helper.cc @@ -23,6 +23,7 @@ namespace ns3 { Ipv6RoutingHelper::~Ipv6RoutingHelper () -{} +{ +} } // namespace ns3 diff --git a/src/internet/helper/ipv6-static-routing-helper.cc b/src/internet/helper/ipv6-static-routing-helper.cc index f155fa55d..c375318c3 100644 --- a/src/internet/helper/ipv6-static-routing-helper.cc +++ b/src/internet/helper/ipv6-static-routing-helper.cc @@ -36,19 +36,20 @@ NS_LOG_COMPONENT_DEFINE ("Ipv6StaticRoutingHelper"); namespace ns3 { Ipv6StaticRoutingHelper::Ipv6StaticRoutingHelper () -{} +{ +} Ipv6StaticRoutingHelper::Ipv6StaticRoutingHelper (const Ipv6StaticRoutingHelper &o) { } -Ipv6StaticRoutingHelper* -Ipv6StaticRoutingHelper::Copy (void) const +Ipv6StaticRoutingHelper* +Ipv6StaticRoutingHelper::Copy (void) const { - return new Ipv6StaticRoutingHelper (*this); + return new Ipv6StaticRoutingHelper (*this); } -Ptr +Ptr Ipv6StaticRoutingHelper::Create (Ptr node) const { return CreateObject (); @@ -84,11 +85,11 @@ Ipv6StaticRoutingHelper::GetStaticRouting (Ptr ipv6) const return 0; } -void +void Ipv6StaticRoutingHelper::AddMulticastRoute ( Ptr n, Ipv6Address source, - Ipv6Address group, + Ipv6Address group, Ptr input, NetDeviceContainer output) { @@ -102,31 +103,31 @@ Ipv6StaticRoutingHelper::AddMulticastRoute ( Ptr nd = *i; int32_t interface = ipv6->GetInterfaceForDevice (nd); NS_ASSERT_MSG (interface >= 0, - "Ipv6StaticRoutingHelper::AddMulticastRoute (): " - "Expected an interface associated with the device nd"); + "Ipv6StaticRoutingHelper::AddMulticastRoute (): " + "Expected an interface associated with the device nd"); outputInterfaces.push_back (interface); } int32_t inputInterface = ipv6->GetInterfaceForDevice (input); NS_ASSERT_MSG (inputInterface >= 0, - "Ipv6StaticRoutingHelper::AddMulticastRoute (): " - "Expected an interface associated with the device input"); + "Ipv6StaticRoutingHelper::AddMulticastRoute (): " + "Expected an interface associated with the device input"); Ipv6StaticRoutingHelper helper; Ptr ipv6StaticRouting = helper.GetStaticRouting (ipv6); if (!ipv6StaticRouting) { - NS_ASSERT_MSG (ipv6StaticRouting, - "Ipv6StaticRoutingHelper::SetDefaultMulticastRoute (): " - "Expected an Ipv6StaticRouting associated with this node"); + NS_ASSERT_MSG (ipv6StaticRouting, + "Ipv6StaticRoutingHelper::SetDefaultMulticastRoute (): " + "Expected an Ipv6StaticRouting associated with this node"); } ipv6StaticRouting->AddMulticastRoute (source, group, inputInterface, outputInterfaces); } -void +void Ipv6StaticRoutingHelper::AddMulticastRoute ( Ptr n, Ipv6Address source, - Ipv6Address group, + Ipv6Address group, std::string inputName, NetDeviceContainer output) { @@ -134,11 +135,11 @@ Ipv6StaticRoutingHelper::AddMulticastRoute ( AddMulticastRoute (n, source, group, input, output); } -void +void Ipv6StaticRoutingHelper::AddMulticastRoute ( std::string nName, Ipv6Address source, - Ipv6Address group, + Ipv6Address group, Ptr input, NetDeviceContainer output) { @@ -146,11 +147,11 @@ Ipv6StaticRoutingHelper::AddMulticastRoute ( AddMulticastRoute (n, source, group, input, output); } -void +void Ipv6StaticRoutingHelper::AddMulticastRoute ( std::string nName, Ipv6Address source, - Ipv6Address group, + Ipv6Address group, std::string inputName, NetDeviceContainer output) { @@ -168,15 +169,15 @@ Ipv6StaticRoutingHelper::SetDefaultMulticastRoute ( Ptr ipv6 = n->GetObject (); int32_t interfaceSrc = ipv6->GetInterfaceForDevice (nd); NS_ASSERT_MSG (interfaceSrc >= 0, - "Ipv6StaticRoutingHelper::SetDefaultMulticastRoute (): " - "Expected an interface associated with the device"); + "Ipv6StaticRoutingHelper::SetDefaultMulticastRoute (): " + "Expected an interface associated with the device"); Ipv6StaticRoutingHelper helper; Ptr ipv6StaticRouting = helper.GetStaticRouting (ipv6); if (!ipv6StaticRouting) { NS_ASSERT_MSG (ipv6StaticRouting, - "Ipv6StaticRoutingHelper::SetDefaultMulticastRoute (): " - "Expected an Ipv6StaticRouting associated with this node"); + "Ipv6StaticRoutingHelper::SetDefaultMulticastRoute (): " + "Expected an Ipv6StaticRouting associated with this node"); } ipv6StaticRouting->SetDefaultMulticastRoute (interfaceSrc); } diff --git a/src/internet/helper/ipv6-static-routing-helper.h b/src/internet/helper/ipv6-static-routing-helper.h index d1d470bdf..bee0eb191 100644 --- a/src/internet/helper/ipv6-static-routing-helper.h +++ b/src/internet/helper/ipv6-static-routing-helper.h @@ -80,31 +80,31 @@ public: * \brief Add a multicast route to a node and net device using explicit * Ptr and Ptr */ - void AddMulticastRoute (Ptr n, Ipv6Address source, Ipv6Address group, - Ptr input, NetDeviceContainer output); + void AddMulticastRoute (Ptr n, Ipv6Address source, Ipv6Address group, + Ptr input, NetDeviceContainer output); /** * \brief Add a multicast route to a node and device using a name string * previously associated to the node using the Object Name Service and a * Ptr */ - void AddMulticastRoute (std::string n, Ipv6Address source, Ipv6Address group, - Ptr input, NetDeviceContainer output); + void AddMulticastRoute (std::string n, Ipv6Address source, Ipv6Address group, + Ptr input, NetDeviceContainer output); /** * \brief Add a multicast route to a node and device using a Ptr and a * name string previously associated to the device using the Object Name Service. */ - void AddMulticastRoute (Ptr n, Ipv6Address source, Ipv6Address group, - std::string inputName, NetDeviceContainer output); + void AddMulticastRoute (Ptr n, Ipv6Address source, Ipv6Address group, + std::string inputName, NetDeviceContainer output); /** * \brief Add a multicast route to a node and device using name strings * previously associated to both the node and device using the Object Name * Service. */ - void AddMulticastRoute (std::string nName, Ipv6Address source, Ipv6Address group, - std::string inputName, NetDeviceContainer output); + void AddMulticastRoute (std::string nName, Ipv6Address source, Ipv6Address group, + std::string inputName, NetDeviceContainer output); #if 0 /** diff --git a/src/internet/model/arp-cache.cc b/src/internet/model/arp-cache.cc index d72ff5c08..b84401208 100644 --- a/src/internet/model/arp-cache.cc +++ b/src/internet/model/arp-cache.cc @@ -51,12 +51,12 @@ ArpCache::GetTypeId (void) MakeTimeAccessor (&ArpCache::m_deadTimeout), MakeTimeChecker ()) .AddAttribute ("WaitReplyTimeout", - "When this timeout expires, the cache entries will be scanned and entries in WaitReply state will resend ArpRequest unless MaxRetries has been exceeded, in which case the entry is marked dead", + "When this timeout expires, the cache entries will be scanned and entries in WaitReply state will resend ArpRequest unless MaxRetries has been exceeded, in which case the entry is marked dead", TimeValue (Seconds (1)), MakeTimeAccessor (&ArpCache::m_waitReplyTimeout), MakeTimeChecker ()) - .AddAttribute ("MaxRetries", - "Number of retransmissions of ArpRequest before marking dead", + .AddAttribute ("MaxRetries", + "Number of retransmissions of ArpRequest before marking dead", UintegerValue (3), MakeUintegerAccessor (&ArpCache::m_maxRetries), MakeUintegerChecker ()) @@ -65,10 +65,10 @@ ArpCache::GetTypeId (void) UintegerValue (3), MakeUintegerAccessor (&ArpCache::m_pendingQueueSize), MakeUintegerChecker ()) - .AddTraceSource ("Drop", + .AddTraceSource ("Drop", "Packet dropped due to ArpCache entry in WaitReply expiring.", MakeTraceSourceAccessor (&ArpCache::m_dropTrace)) - ; + ; return tid; } @@ -155,7 +155,7 @@ ArpCache::GetWaitReplyTimeout (void) const void ArpCache::SetArpRequestCallback (Callback, - Ipv4Address> arpRequestCallback) + Ipv4Address> arpRequestCallback) { NS_LOG_FUNCTION (this); m_arpRequestCallback = arpRequestCallback; @@ -184,13 +184,13 @@ ArpCache::HandleWaitReplyTimeout (void) { entry = (*i).second; if (entry != 0 && entry->IsWaitReply ()) - { + { if (entry->GetRetries () < m_maxRetries) { NS_LOG_LOGIC ("node="<< m_device->GetNode ()->GetId () << - ", ArpWaitTimeout for " << entry->GetIpv4Address () << - " expired -- retransmitting arp request since retries = " << - entry->GetRetries ()); + ", ArpWaitTimeout for " << entry->GetIpv4Address () << + " expired -- retransmitting arp request since retries = " << + entry->GetRetries ()); m_arpRequestCallback (this, entry->GetIpv4Address ()); restartWaitReplyTimer = true; entry->IncrementRetries (); @@ -198,9 +198,9 @@ ArpCache::HandleWaitReplyTimeout (void) else { NS_LOG_LOGIC ("node="<GetNode ()->GetId () << - ", wait reply for " << entry->GetIpv4Address () << - " expired -- drop since max retries exceeded: " << - entry->GetRetries ()); + ", wait reply for " << entry->GetIpv4Address () << + " expired -- drop since max retries exceeded: " << + entry->GetRetries ()); entry->MarkDead (); entry->ClearRetries (); Ptr pending = entry->DequeuePending(); @@ -210,14 +210,14 @@ ArpCache::HandleWaitReplyTimeout (void) pending = entry->DequeuePending(); } } - } + } } if (restartWaitReplyTimer) { NS_LOG_LOGIC ("Restarting WaitReplyTimer at " << Simulator::Now ().GetSeconds ()); m_waitReplyTimer = Simulator::Schedule (m_waitReplyTimeout, - &ArpCache::HandleWaitReplyTimeout, this); + &ArpCache::HandleWaitReplyTimeout, this); } } @@ -255,7 +255,7 @@ ArpCache::Add (Ipv4Address to) NS_ASSERT (m_arpCache.find (to) == m_arpCache.end ()); ArpCache::Entry *entry = new ArpCache::Entry (this); - m_arpCache[to] = entry; + m_arpCache[to] = entry; entry->SetIpv4Address (to); return entry; } @@ -272,17 +272,17 @@ ArpCache::Entry::Entry (ArpCache *arp) bool ArpCache::Entry::IsDead (void) { - return (m_state == DEAD)?true:false; + return (m_state == DEAD) ? true : false; } bool ArpCache::Entry::IsAlive (void) { - return (m_state == ALIVE)?true:false; + return (m_state == ALIVE) ? true : false; } bool ArpCache::Entry::IsWaitReply (void) { - return (m_state == WAIT_REPLY)?true:false; + return (m_state == WAIT_REPLY) ? true : false; } @@ -354,17 +354,17 @@ Time ArpCache::Entry::GetTimeout (void) const { switch (m_state) { - case ArpCache::Entry::WAIT_REPLY: - return m_arp->GetWaitReplyTimeout (); - case ArpCache::Entry::DEAD: - return m_arp->GetDeadTimeout (); - case ArpCache::Entry::ALIVE: - return m_arp->GetAliveTimeout (); - default: - NS_ASSERT (false); - return Seconds (0); - /* NOTREACHED */ - } + case ArpCache::Entry::WAIT_REPLY: + return m_arp->GetWaitReplyTimeout (); + case ArpCache::Entry::DEAD: + return m_arp->GetDeadTimeout (); + case ArpCache::Entry::ALIVE: + return m_arp->GetAliveTimeout (); + default: + NS_ASSERT (false); + return Seconds (0); + /* NOTREACHED */ + } } bool ArpCache::Entry::IsExpired (void) const diff --git a/src/internet/model/arp-cache.h b/src/internet/model/arp-cache.h index 757ea4df2..07664f568 100644 --- a/src/internet/model/arp-cache.h +++ b/src/internet/model/arp-cache.h @@ -51,7 +51,7 @@ class ArpCache : public Object private: ArpCache (ArpCache const &); ArpCache& operator= (ArpCache const &); - + public: static TypeId GetTypeId (void); class Entry; @@ -71,7 +71,7 @@ public: * \return the Ipv4Interface that this ARP cache is associated with */ Ptr GetInterface (void) const; - + void SetAliveTimeout (Time aliveTimeout); void SetDeadTimeout (Time deadTimeout); void SetWaitReplyTimeout (Time waitReplyTimeout); @@ -87,7 +87,7 @@ public: * \param arpRequestCallback Callback for transmitting an Arp request. */ void SetArpRequestCallback (Callback, - Ipv4Address> arpRequestCallback); + Ipv4Address> arpRequestCallback); /** * This method will schedule a timeout at WaitReplyTimeout interval * in the future, unless a timer is already running for the cache, @@ -114,13 +114,13 @@ public: * \brief A record that that holds information about an ArpCache entry */ class Entry { - public: +public: /** * \brief Constructor * \param arp The ArpCache this entry belongs to */ Entry (ArpCache *arp); - + /** * \brief Changes the state of this entry to dead */ @@ -150,7 +150,7 @@ public: * \return True if the state of this entry is wait_reply; false otherwise. */ bool IsWaitReply (void); - + /** * \return The MacAddress of this entry */ @@ -189,7 +189,7 @@ public: */ void ClearRetries (void); - private: +private: enum ArpCacheEntryState_e { ALIVE, WAIT_REPLY, diff --git a/src/internet/model/arp-header.cc b/src/internet/model/arp-header.cc index 653f2b5ed..11f4d7cd2 100644 --- a/src/internet/model/arp-header.cc +++ b/src/internet/model/arp-header.cc @@ -53,12 +53,12 @@ ArpHeader::SetReply (Address sourceHardwareAddress, bool ArpHeader::IsRequest (void) const { - return (m_type == ARP_TYPE_REQUEST)?true:false; + return (m_type == ARP_TYPE_REQUEST) ? true : false; } bool ArpHeader::IsReply (void) const { - return (m_type == ARP_TYPE_REPLY)?true:false; + return (m_type == ARP_TYPE_REPLY) ? true : false; } Address ArpHeader::GetSourceHardwareAddress (void) @@ -88,7 +88,7 @@ ArpHeader::GetTypeId (void) static TypeId tid = TypeId ("ns3::ArpHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } TypeId @@ -105,7 +105,7 @@ ArpHeader::Print (std::ostream &os) const << "source mac: " << m_macSource << " " << "source ipv4: " << m_ipv4Source << " " << "dest ipv4: " << m_ipv4Dest - ; + ; } else { @@ -115,7 +115,7 @@ ArpHeader::Print (std::ostream &os) const << "source ipv4: " << m_ipv4Source << " " << "dest mac: " << m_macDest << " " << "dest ipv4: " < device) for (CacheList::const_iterator i = m_cacheList.begin (); i != m_cacheList.end (); i++) { if ((*i)->GetDevice () == device) - { - return *i; - } + { + return *i; + } } NS_ASSERT (false); // quiet compiler @@ -163,10 +163,10 @@ ArpL3Protocol::Receive(Ptr device, Ptr p, uint16_t prot NS_LOG_LOGIC ("ARP: Cannot remove ARP header"); return; } - NS_LOG_LOGIC ("ARP: received "<< (arp.IsRequest ()? "request" : "reply") << - " node="<GetId ()<<", got request from " << - arp.GetSourceIpv4Address () << " for address " << - arp.GetDestinationIpv4Address () << "; we have addresses: "); + NS_LOG_LOGIC ("ARP: received "<< (arp.IsRequest () ? "request" : "reply") << + " node="<GetId ()<<", got request from " << + arp.GetSourceIpv4Address () << " for address " << + arp.GetDestinationIpv4Address () << "; we have addresses: "); for (uint32_t i = 0; i < cache->GetInterface ()->GetNAddresses (); i++) { NS_LOG_LOGIC (cache->GetInterface ()->GetAddress (i).GetLocal () << ", "); @@ -180,18 +180,18 @@ ArpL3Protocol::Receive(Ptr device, Ptr p, uint16_t prot for (uint32_t i = 0; i < cache->GetInterface ()->GetNAddresses (); i++) { if (arp.IsRequest () && arp.GetDestinationIpv4Address () == - cache->GetInterface ()->GetAddress (i).GetLocal ()) + cache->GetInterface ()->GetAddress (i).GetLocal ()) { found = true; NS_LOG_LOGIC ("node="<GetId () <<", got request from " << - arp.GetSourceIpv4Address () << " -- send reply"); + arp.GetSourceIpv4Address () << " -- send reply"); SendArpReply (cache, arp.GetDestinationIpv4Address (), arp.GetSourceIpv4Address (), - arp.GetSourceHardwareAddress ()); + arp.GetSourceHardwareAddress ()); break; } else if (arp.IsReply () && - arp.GetDestinationIpv4Address ().IsEqual (cache->GetInterface ()->GetAddress (i).GetLocal ()) && - arp.GetDestinationHardwareAddress () == device->GetAddress ()) + arp.GetDestinationIpv4Address ().IsEqual (cache->GetInterface ()->GetAddress (i).GetLocal ()) && + arp.GetDestinationHardwareAddress () == device->GetAddress ()) { found = true; Ipv4Address from = arp.GetSourceIpv4Address (); @@ -201,15 +201,15 @@ ArpL3Protocol::Receive(Ptr device, Ptr p, uint16_t prot if (entry->IsWaitReply ()) { NS_LOG_LOGIC ("node="<< m_node->GetId () << - ", got reply from " << arp.GetSourceIpv4Address () - << " for waiting entry -- flush"); + ", got reply from " << arp.GetSourceIpv4Address () + << " for waiting entry -- flush"); Address from_mac = arp.GetSourceHardwareAddress (); entry->MarkAlive (from_mac); Ptr pending = entry->DequeuePending(); while (pending != 0) { cache->GetInterface ()->Send (pending, - arp.GetSourceIpv4Address ()); + arp.GetSourceIpv4Address ()); pending = entry->DequeuePending(); } } @@ -218,8 +218,8 @@ ArpL3Protocol::Receive(Ptr device, Ptr p, uint16_t prot // ignore this reply which might well be an attempt // at poisening my arp cache. NS_LOG_LOGIC("node="<GetId ()<<", got reply from " << - arp.GetSourceIpv4Address () << - " for non-waiting entry -- drop"); + arp.GetSourceIpv4Address () << + " for non-waiting entry -- drop"); m_dropTrace (packet); } } @@ -234,8 +234,8 @@ ArpL3Protocol::Receive(Ptr device, Ptr p, uint16_t prot if (found == false) { NS_LOG_LOGIC ("node="<GetId ()<<", got request from " << - arp.GetSourceIpv4Address () << " for unknown address " << - arp.GetDestinationIpv4Address () << " -- drop"); + arp.GetSourceIpv4Address () << " for unknown address " << + arp.GetDestinationIpv4Address () << " -- drop"); } } @@ -254,14 +254,14 @@ ArpL3Protocol::Lookup (Ptr packet, Ipv4Address destination, if (entry->IsDead ()) { NS_LOG_LOGIC ("node="<GetId ()<< - ", dead entry for " << destination << " expired -- send arp request"); + ", dead entry for " << destination << " expired -- send arp request"); entry->MarkWaitReply (packet); SendArpRequest (cache, destination); } else if (entry->IsAlive ()) { NS_LOG_LOGIC ("node="<GetId ()<< - ", alive entry for " << destination << " expired -- send arp request"); + ", alive entry for " << destination << " expired -- send arp request"); entry->MarkWaitReply (packet); SendArpRequest (cache, destination); } @@ -282,7 +282,7 @@ ArpL3Protocol::Lookup (Ptr packet, Ipv4Address destination, { NS_LOG_LOGIC ("node="<GetId ()<< ", alive entry for " << destination << " valid -- send"); - *hardwareDestination = entry->GetMacAddress (); + *hardwareDestination = entry->GetMacAddress (); return true; } else if (entry->IsWaitReply ()) @@ -300,7 +300,7 @@ ArpL3Protocol::Lookup (Ptr packet, Ipv4Address destination, { // This is our first attempt to transmit data to this destination. NS_LOG_LOGIC ("node="<GetId ()<< - ", no entry for " << destination << " -- send arp request"); + ", no entry for " << destination << " -- send arp request"); entry = cache->Add (destination); entry->MarkWaitReply (packet); SendArpRequest (cache, destination); @@ -322,8 +322,8 @@ ArpL3Protocol::SendArpRequest (Ptr cache, Ipv4Address to) Ptr packet = Create (); Ipv4Address source = ipv4->SelectSourceAddress (device, to, Ipv4InterfaceAddress::GLOBAL); NS_LOG_LOGIC ("ARP: sending request from node "<GetId ()<< - " || src: " << device->GetAddress () << " / " << source << - " || dst: " << device->GetBroadcast () << " / " << to); + " || src: " << device->GetAddress () << " / " << source << + " || dst: " << device->GetBroadcast () << " / " << to); arp.SetRequest (device->GetAddress (), source, device->GetBroadcast (), to); packet->AddHeader (arp); cache->GetDevice ()->Send (packet, device->GetBroadcast (), PROT_NUMBER); @@ -335,13 +335,13 @@ ArpL3Protocol::SendArpReply (Ptr cache, Ipv4Address myIp, Ipv4Ad NS_LOG_FUNCTION (this << cache << toIp << toMac); ArpHeader arp; NS_LOG_LOGIC ("ARP: sending reply from node "<GetId ()<< - "|| src: " << cache->GetDevice ()->GetAddress () << - " / " << myIp << - " || dst: " << toMac << " / " << toIp); + "|| src: " << cache->GetDevice ()->GetAddress () << + " / " << myIp << + " || dst: " << toMac << " / " << toIp); arp.SetReply (cache->GetDevice ()->GetAddress (), myIp, toMac, toIp); Ptr packet = Create (); packet->AddHeader (arp); cache->GetDevice ()->Send (packet, toMac, PROT_NUMBER); } -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/arp-l3-protocol.h b/src/internet/model/arp-l3-protocol.h index 314d9ddee..0353b5b9d 100644 --- a/src/internet/model/arp-l3-protocol.h +++ b/src/internet/model/arp-l3-protocol.h @@ -36,7 +36,7 @@ class Packet; class Ipv4Interface; /** - * \ingroup internetStack + * \ingroup internet * \defgroup arp Arp * * This is an overview of Arp capabilities (write me). @@ -73,9 +73,9 @@ public: * \return */ bool Lookup (Ptr p, Ipv4Address destination, - Ptr device, + Ptr device, Ptr cache, - Address *hardwareDestination); + Address *hardwareDestination); protected: virtual void DoDispose (void); /* @@ -95,7 +95,7 @@ private: TracedCallback > m_dropTrace; }; -}//namespace ns3 +} //namespace ns3 #endif /* ARP_L3_PROTOCOL_H */ diff --git a/src/internet/model/candidate-queue.cc b/src/internet/model/candidate-queue.cc index 95ac63372..8d256c21b 100644 --- a/src/internet/model/candidate-queue.cc +++ b/src/internet/model/candidate-queue.cc @@ -70,7 +70,7 @@ CandidateQueue::~CandidateQueue() Clear (); } - void +void CandidateQueue::Clear (void) { NS_LOG_FUNCTION_NOARGS (); @@ -82,19 +82,19 @@ CandidateQueue::Clear (void) } } - void +void CandidateQueue::Push (SPFVertex *vNew) { NS_LOG_FUNCTION (this << vNew); CandidateList_t::iterator i = std::upper_bound ( - m_candidates.begin (), m_candidates.end (), vNew, - &CandidateQueue::CompareSPFVertex - ); + m_candidates.begin (), m_candidates.end (), vNew, + &CandidateQueue::CompareSPFVertex + ); m_candidates.insert (i, vNew); } - SPFVertex * +SPFVertex * CandidateQueue::Pop (void) { NS_LOG_FUNCTION_NOARGS (); @@ -108,7 +108,7 @@ CandidateQueue::Pop (void) return v; } - SPFVertex * +SPFVertex * CandidateQueue::Top (void) const { NS_LOG_FUNCTION_NOARGS (); @@ -120,21 +120,21 @@ CandidateQueue::Top (void) const return m_candidates.front (); } - bool +bool CandidateQueue::Empty (void) const { NS_LOG_FUNCTION_NOARGS (); return m_candidates.empty (); } - uint32_t +uint32_t CandidateQueue::Size (void) const { NS_LOG_FUNCTION_NOARGS (); return m_candidates.size (); } - SPFVertex * +SPFVertex * CandidateQueue::Find (const Ipv4Address addr) const { NS_LOG_FUNCTION_NOARGS (); @@ -152,7 +152,7 @@ CandidateQueue::Find (const Ipv4Address addr) const return 0; } - void +void CandidateQueue::Reorder (void) { NS_LOG_FUNCTION_NOARGS (); @@ -176,7 +176,7 @@ CandidateQueue::CompareSPFVertex (const SPFVertex* v1, const SPFVertex* v2) bool result = false; if (v1->GetDistanceFromRoot () < v2->GetDistanceFromRoot ()) - { + { result = true; } else if (v1->GetDistanceFromRoot () == v2->GetDistanceFromRoot ()) diff --git a/src/internet/model/candidate-queue.h b/src/internet/model/candidate-queue.h index f1835b48e..d3486d757 100644 --- a/src/internet/model/candidate-queue.h +++ b/src/internet/model/candidate-queue.h @@ -29,12 +29,12 @@ namespace ns3 { class SPFVertex; -/** +/** * \brief A Candidate Queue used in static routing. * * The CandidateQueue is used in the OSPF shortest path computations. It * is a priority queue used to store candidates for the shortest path to a - * given network. + * given network. * * The queue holds Shortest Path First Vertex pointers and orders them * according to the lowest value of the field m_distanceFromRoot. Remaining @@ -50,7 +50,7 @@ class CandidateQueue { public: /** - * @brief Create an empty SPF Candidate Queue. + * @brief Create an empty SPF Candidate Queue. * @internal * * @see SPFVertex @@ -105,7 +105,7 @@ public: /** * @brief Return the Shortest Path First Vertex pointer at the top of the - * queue. + * queue. * @internal * * This method does not pop the SPFVertex* off of the queue, it simply @@ -147,7 +147,7 @@ public: SPFVertex* Find (const Ipv4Address addr) const; /** - * @brief Reorders the Candidate Queue according to the priority scheme. + * @brief Reorders the Candidate Queue according to the priority scheme. * @internal * * On completion, the top of the queue will hold the Shortest Path First diff --git a/src/internet/model/global-route-manager-impl.cc b/src/internet/model/global-route-manager-impl.cc index 4bb163f0b..a7a77610f 100644 --- a/src/internet/model/global-route-manager-impl.cc +++ b/src/internet/model/global-route-manager-impl.cc @@ -119,15 +119,15 @@ SPFVertex::SPFVertex (GlobalRoutingLSA* lsa) : SPFVertex::~SPFVertex () { NS_LOG_FUNCTION (m_vertexId); - + NS_LOG_LOGIC ("Children vertices - " << m_children); NS_LOG_LOGIC ("Parent verteices - " << m_parents); // find this node from all its parents and remove the entry of this node // from all its parents for (ListOfSPFVertex_t::iterator piter = m_parents.begin (); - piter != m_parents.end (); - piter++) + piter != m_parents.end (); + piter++) { // remove the current vertex from its parent's children list. Check // if the size of the list is reduced, or the child<->parent relation @@ -167,63 +167,63 @@ SPFVertex::~SPFVertex () NS_LOG_LOGIC ("Vertex-" << m_vertexId << " completed deleted"); } - void +void SPFVertex::SetVertexType (SPFVertex::VertexType type) { NS_LOG_FUNCTION (type); m_vertexType = type; } - SPFVertex::VertexType +SPFVertex::VertexType SPFVertex::GetVertexType (void) const { NS_LOG_FUNCTION_NOARGS (); return m_vertexType; } - void +void SPFVertex::SetVertexId (Ipv4Address id) { NS_LOG_FUNCTION (id); m_vertexId = id; } - Ipv4Address +Ipv4Address SPFVertex::GetVertexId (void) const { NS_LOG_FUNCTION_NOARGS (); return m_vertexId; } - void +void SPFVertex::SetLSA (GlobalRoutingLSA* lsa) { NS_LOG_FUNCTION (lsa); m_lsa = lsa; } - GlobalRoutingLSA* +GlobalRoutingLSA* SPFVertex::GetLSA (void) const { NS_LOG_FUNCTION_NOARGS (); return m_lsa; } - void +void SPFVertex::SetDistanceFromRoot (uint32_t distance) { NS_LOG_FUNCTION (distance); m_distanceFromRoot = distance; } - uint32_t +uint32_t SPFVertex::GetDistanceFromRoot (void) const { NS_LOG_FUNCTION_NOARGS (); return m_distanceFromRoot; } - void +void SPFVertex::SetParent (SPFVertex* parent) { NS_LOG_FUNCTION (parent); @@ -233,7 +233,7 @@ SPFVertex::SetParent (SPFVertex* parent) m_parents.push_back (parent); } - SPFVertex* +SPFVertex* SPFVertex::GetParent (uint32_t i) const { NS_LOG_FUNCTION_NOARGS (); @@ -260,7 +260,7 @@ SPFVertex::MergeParent (const SPFVertex* v) NS_LOG_LOGIC ("Before merge, list of parents = " << m_parents); // combine the two lists first, and then remove any duplicated after m_parents.insert (m_parents.end (), - v->m_parents.begin (), v->m_parents.end ()); + v->m_parents.begin (), v->m_parents.end ()); // remove duplication m_parents.sort (); m_parents.unique (); @@ -271,7 +271,7 @@ void SPFVertex::SetRootExitDirection (Ipv4Address nextHop, int32_t id) { NS_LOG_FUNCTION (nextHop << id); - + // always maintain only one root's exit m_ecmpRootExits.clear (); m_ecmpRootExits.push_back (NodeExit_t (nextHop, id)); @@ -296,7 +296,7 @@ SPFVertex::GetRootExitDirection (uint32_t i) const NS_ASSERT_MSG (i < m_ecmpRootExits.size (), "Index out-of-range when accessing SPFVertex::m_ecmpRootExits!"); CIter_t iter = m_ecmpRootExits.begin (); - while (i-- > 0) {iter++;} + while (i-- > 0) { iter++;} return *iter; } @@ -320,7 +320,7 @@ SPFVertex::MergeRootExitDirections (const SPFVertex* vertex) // Append the external list into 'this' and remove duplication afterward const ListOfNodeExit_t& extList = vertex->m_ecmpRootExits; m_ecmpRootExits.insert (m_ecmpRootExits.end (), - extList.begin(), extList.end ()); + extList.begin(), extList.end ()); m_ecmpRootExits.sort (); m_ecmpRootExits.unique (); } @@ -338,7 +338,7 @@ SPFVertex::InheritAllRootExitDirections (const SPFVertex* vertex) } m_ecmpRootExits.clear (); m_ecmpRootExits.insert (m_ecmpRootExits.end (), - vertex->m_ecmpRootExits.begin (), vertex->m_ecmpRootExits.end ()); + vertex->m_ecmpRootExits.begin (), vertex->m_ecmpRootExits.end ()); } uint32_t @@ -355,7 +355,7 @@ SPFVertex::GetNChildren (void) const return m_children.size (); } - SPFVertex* +SPFVertex* SPFVertex::GetChild (uint32_t n) const { NS_LOG_FUNCTION (n); @@ -374,7 +374,7 @@ SPFVertex::GetChild (uint32_t n) const return 0; } - uint32_t +uint32_t SPFVertex::AddChild (SPFVertex* child) { NS_LOG_FUNCTION (child); @@ -411,9 +411,9 @@ SPFVertex::ClearVertexProcessed (void) // --------------------------------------------------------------------------- GlobalRouteManagerLSDB::GlobalRouteManagerLSDB () -: - m_database (), - m_extdatabase () + : + m_database (), + m_extdatabase () { NS_LOG_FUNCTION_NOARGS (); } @@ -438,7 +438,7 @@ GlobalRouteManagerLSDB::~GlobalRouteManagerLSDB () m_database.clear (); } - void +void GlobalRouteManagerLSDB::Initialize () { NS_LOG_FUNCTION_NOARGS (); @@ -450,7 +450,7 @@ GlobalRouteManagerLSDB::Initialize () } } - void +void GlobalRouteManagerLSDB::Insert (Ipv4Address addr, GlobalRoutingLSA* lsa) { NS_LOG_FUNCTION (addr << lsa); @@ -464,19 +464,19 @@ GlobalRouteManagerLSDB::Insert (Ipv4Address addr, GlobalRoutingLSA* lsa) } } - GlobalRoutingLSA* +GlobalRoutingLSA* GlobalRouteManagerLSDB::GetExtLSA (uint32_t index) const { return m_extdatabase.at (index); } - uint32_t +uint32_t GlobalRouteManagerLSDB::GetNumExtLSAs () const { return m_extdatabase.size (); } - GlobalRoutingLSA* +GlobalRoutingLSA* GlobalRouteManagerLSDB::GetLSA (Ipv4Address addr) const { NS_LOG_FUNCTION (addr); @@ -485,16 +485,16 @@ GlobalRouteManagerLSDB::GetLSA (Ipv4Address addr) const // LSDBMap_t::const_iterator i; for (i= m_database.begin (); i!= m_database.end (); i++) - { - if (i->first == addr) { - return i->second; + if (i->first == addr) + { + return i->second; + } } - } return 0; } - GlobalRoutingLSA* +GlobalRoutingLSA* GlobalRouteManagerLSDB::GetLSAByLinkData (Ipv4Address addr) const { NS_LOG_FUNCTION (addr); @@ -526,8 +526,8 @@ GlobalRouteManagerLSDB::GetLSAByLinkData (Ipv4Address addr) const // --------------------------------------------------------------------------- GlobalRouteManagerImpl::GlobalRouteManagerImpl () -: - m_spfroot (0) + : + m_spfroot (0) { NS_LOG_FUNCTION_NOARGS (); m_lsdb = new GlobalRouteManagerLSDB (); @@ -542,7 +542,7 @@ GlobalRouteManagerImpl::~GlobalRouteManagerImpl () } } - void +void GlobalRouteManagerImpl::DebugUseLsdb (GlobalRouteManagerLSDB* lsdb) { NS_LOG_FUNCTION (lsdb); @@ -553,7 +553,7 @@ GlobalRouteManagerImpl::DebugUseLsdb (GlobalRouteManagerLSDB* lsdb) m_lsdb = lsdb; } - void +void GlobalRouteManagerImpl::DeleteGlobalRoutes () { NS_LOG_FUNCTION_NOARGS (); @@ -576,7 +576,7 @@ GlobalRouteManagerImpl::DeleteGlobalRoutes () for (j = 0; j < nRoutes; j++) { NS_LOG_LOGIC ("Deleting global route " << j << " from node " << node->GetId ()); - gr->RemoveRoute (0); + gr->RemoveRoute (0); } NS_LOG_LOGIC ("Deleted " << j << " global routes from node "<< node->GetId ()); } @@ -597,7 +597,7 @@ GlobalRouteManagerImpl::DeleteGlobalRoutes () // add them to the Link State DataBase (LSDB) from which the routes will // ultimately be computed. // - void +void GlobalRouteManagerImpl::BuildGlobalRoutingDatabase () { NS_LOG_FUNCTION_NOARGS (); @@ -611,7 +611,7 @@ GlobalRouteManagerImpl::BuildGlobalRoutingDatabase () Ptr node = *i; Ptr rtr = node->GetObject (); -// +// // Ignore nodes that aren't participating in routing. // if (!rtr) @@ -665,8 +665,8 @@ GlobalRouteManagerImpl::BuildGlobalRoutingDatabase () // leaves are added to the tree by considering the links to stub // networks. // -// The area's link state database is represented as a directed graph. -// The graph's vertices are routers, transit networks and stub networks. +// The area's link state database is represented as a directed graph. +// The graph's vertices are routers, transit networks and stub networks. // // The first stage of the procedure (i.e., the Dijkstra algorithm) // can now be summarized as follows. At each iteration of the @@ -680,7 +680,7 @@ GlobalRouteManagerImpl::BuildGlobalRoutingDatabase () // algorithm then iterates again. It terminates when the candidate // list becomes empty. // - void +void GlobalRouteManagerImpl::InitializeRoutes () { NS_LOG_FUNCTION_NOARGS (); @@ -704,7 +704,7 @@ GlobalRouteManagerImpl::InitializeRoutes () { continue; } - + // // if the node has a global router interface, then run the global routing // algorithms. @@ -730,7 +730,7 @@ GlobalRouteManagerImpl::InitializeRoutes () // vertices not already on the list. If a lower-cost path is found to a // vertex already on the candidate list, store the new (lower) cost. // - void +void GlobalRouteManagerImpl::SPFNext (SPFVertex* v, CandidateQueue& candidate) { NS_LOG_FUNCTION (v << &candidate); @@ -759,8 +759,8 @@ GlobalRouteManagerImpl::SPFNext (SPFVertex* v, CandidateQueue& candidate) if (v->GetVertexType () == SPFVertex::VertexRouter) { NS_LOG_LOGIC ("Examining link " << i << " of " << - v->GetVertexId () << "'s " << - v->GetLSA ()->GetNLinkRecords () << " link records"); + v->GetVertexId () << "'s " << + v->GetLSA ()->GetNLinkRecords () << " link records"); // // (a) If this is a link to a stub network, examine the next link in V's LSA. // Links to stub networks will be considered in the second stage of the @@ -786,15 +786,15 @@ GlobalRouteManagerImpl::SPFNext (SPFVertex* v, CandidateQueue& candidate) w_lsa = m_lsdb->GetLSA (l->GetLinkId ()); NS_ASSERT (w_lsa); NS_LOG_LOGIC ("Found a P2P record from " << - v->GetVertexId () << " to " << w_lsa->GetLinkStateId ()); + v->GetVertexId () << " to " << w_lsa->GetLinkStateId ()); } else if (l->GetLinkType () == - GlobalRoutingLinkRecord::TransitNetwork) + GlobalRoutingLinkRecord::TransitNetwork) { w_lsa = m_lsdb->GetLSA (l->GetLinkId ()); NS_ASSERT (w_lsa); NS_LOG_LOGIC ("Found a Transit record from " << - v->GetVertexId () << " to " << w_lsa->GetLinkStateId ()); + v->GetVertexId () << " to " << w_lsa->GetLinkStateId ()); } else { @@ -805,13 +805,13 @@ GlobalRouteManagerImpl::SPFNext (SPFVertex* v, CandidateQueue& candidate) if (v->GetVertexType () == SPFVertex::VertexNetwork) { w_lsa = m_lsdb->GetLSAByLinkData - (v->GetLSA ()->GetAttachedRouter (i)); + (v->GetLSA ()->GetAttachedRouter (i)); if (!w_lsa) { continue; } NS_LOG_LOGIC ("Found a Network LSA from " << - v->GetVertexId () << " to " << w_lsa->GetLinkStateId ()); + v->GetVertexId () << " to " << w_lsa->GetLinkStateId ()); } // Note: w_lsa at this point may be either RouterLSA or NetworkLSA @@ -825,14 +825,14 @@ GlobalRouteManagerImpl::SPFNext (SPFVertex* v, CandidateQueue& candidate) if (w_lsa->GetStatus () == GlobalRoutingLSA::LSA_SPF_IN_SPFTREE) { NS_LOG_LOGIC ("Skipping -> LSA "<< - w_lsa->GetLinkStateId () << " already in SPF tree"); + w_lsa->GetLinkStateId () << " already in SPF tree"); continue; } // // (d) Calculate the link state cost D of the resulting path from the root to // vertex W. D is equal to the sum of the link state cost of the (already // calculated) shortest path to vertex V and the advertised cost of the link -// between vertices V and W. +// between vertices V and W. // if (v->GetLSA ()->GetLSType () == GlobalRoutingLSA::RouterLSA) { @@ -865,9 +865,9 @@ GlobalRouteManagerImpl::SPFNext (SPFVertex* v, CandidateQueue& candidate) // candidate.Push (w); NS_LOG_LOGIC ("Pushing " << - w->GetVertexId () << ", parent vertexId: " << - v->GetVertexId () << ", distance: " << - w->GetDistanceFromRoot ()); + w->GetVertexId () << ", parent vertexId: " << + v->GetVertexId () << ", distance: " << + w->GetDistanceFromRoot ()); } else NS_ASSERT_MSG (0, "SPFNexthopCalculation never " @@ -900,7 +900,7 @@ GlobalRouteManagerImpl::SPFNext (SPFVertex* v, CandidateQueue& candidate) else if (cw->GetDistanceFromRoot () == distance) { // -// This path is one with an equal cost. +// This path is one with an equal cost. // NS_LOG_LOGIC ("Equal cost multiple paths found."); @@ -947,13 +947,13 @@ GlobalRouteManagerImpl::SPFNext (SPFVertex* v, CandidateQueue& candidate) // candidate.Reorder (); } - } // new lower cost path found + } // new lower cost path found } // end W is already on the candidate list } // end loop over the links in V's LSA } // -// This method is derived from quagga ospf_nexthop_calculation() 16.1.1. +// This method is derived from quagga ospf_nexthop_calculation() 16.1.1. // // Calculate nexthop from root through V (parent) to vertex W (destination) // with given distance from root->W. @@ -961,8 +961,8 @@ GlobalRouteManagerImpl::SPFNext (SPFVertex* v, CandidateQueue& candidate) // As appropriate, set w's parent, distance, and nexthop information // // For now, this is greatly simplified from the quagga code -// - int +// +int GlobalRouteManagerImpl::SPFNexthopCalculation ( SPFVertex* v, SPFVertex* w, @@ -1053,10 +1053,10 @@ GlobalRouteManagerImpl::SPFNexthopCalculation ( w->SetDistanceFromRoot (distance); w->SetParent (v); NS_LOG_LOGIC ("Next hop from " << - v->GetVertexId () << " to " << w->GetVertexId () << - " goes through next hop " << nextHop << - " via outgoing interface " << outIf << - " with distance " << distance); + v->GetVertexId () << " to " << w->GetVertexId () << + " goes through next hop " << nextHop << + " via outgoing interface " << outIf << + " with distance " << distance); } // end W is a router vertes else { @@ -1066,16 +1066,16 @@ GlobalRouteManagerImpl::SPFNexthopCalculation ( NS_ASSERT (w_lsa->GetLSType () == GlobalRoutingLSA::NetworkLSA); // Find outgoing interface ID for this network uint32_t outIf = FindOutgoingInterfaceId (w_lsa->GetLinkStateId (), - w_lsa->GetNetworkLSANetworkMask () ); + w_lsa->GetNetworkLSANetworkMask () ); // Set the next hop to 0.0.0.0 meaning "not exist" Ipv4Address nextHop = Ipv4Address::GetZero (); w->SetRootExitDirection (nextHop, outIf); w->SetDistanceFromRoot (distance); w->SetParent (v); NS_LOG_LOGIC ("Next hop from " << - v->GetVertexId () << " to network " << w->GetVertexId () << - " via outgoing interface " << outIf << - " with distance " << distance); + v->GetVertexId () << " to network " << w->GetVertexId () << + " via outgoing interface " << outIf << + " with distance " << distance); return 1; } } // end v is the root @@ -1098,13 +1098,13 @@ GlobalRouteManagerImpl::SPFNexthopCalculation ( * use can then be derived from the next hop IP address (or * it can be inherited from the parent network). */ - Ipv4Address nextHop = linkRemote->GetLinkData (); - uint32_t outIf = v->GetRootExitDirection ().second; - w->SetRootExitDirection (nextHop, outIf); - NS_LOG_LOGIC ("Next hop from " << - v->GetVertexId () << " to " << w->GetVertexId () << - " goes through next hop " << nextHop << - " via outgoing interface " << outIf); + Ipv4Address nextHop = linkRemote->GetLinkData (); + uint32_t outIf = v->GetRootExitDirection ().second; + w->SetRootExitDirection (nextHop, outIf); + NS_LOG_LOGIC ("Next hop from " << + v->GetVertexId () << " to " << w->GetVertexId () << + " goes through next hop " << nextHop << + " via outgoing interface " << outIf); } } else @@ -1122,7 +1122,7 @@ GlobalRouteManagerImpl::SPFNexthopCalculation ( // root on the path toward . // // Above, when we were considering the root node, we calculated the next hop -// address and outgoing interface required to get off of the root network. +// address and outgoing interface required to get off of the root network. // At this point, we are further away from the root network along one of the // (shortest) paths. So the next hop and outoing interface remain the same // (are inherited). @@ -1150,7 +1150,7 @@ GlobalRouteManagerImpl::SPFNexthopCalculation ( // to . If prev_link is not NULL, we return a Global Router Link Record // representing a possible *second* link from to . // - GlobalRoutingLinkRecord* +GlobalRoutingLinkRecord* GlobalRouteManagerImpl::SPFGetNextLink ( SPFVertex* v, SPFVertex* w, @@ -1170,7 +1170,7 @@ GlobalRouteManagerImpl::SPFGetNextLink ( skip = false; found_prev_link = true; } -// +// // Iterate through the Global Router Link Records advertised by the vertex // looking for records representing the point-to-point links off of this // vertex. @@ -1194,9 +1194,9 @@ GlobalRouteManagerImpl::SPFGetNextLink ( found_prev_link = true; continue; } - + NS_LOG_LOGIC ("Found matching link l: linkId = " << - l->GetLinkId () << " linkData = " << l->GetLinkData ()); + l->GetLinkId () << " linkData = " << l->GetLinkData ()); // // If skip is false, don't (not too surprisingly) skip the link found -- it's // the one we're interested in. That's either because we didn't pass in a @@ -1204,31 +1204,31 @@ GlobalRouteManagerImpl::SPFGetNextLink ( // skipped a previous link and moved forward to the next (which is then the // one we want). // - if (skip == false) - { - NS_LOG_LOGIC ("Returning the found link"); - return l; - } - else - { + if (skip == false) + { + NS_LOG_LOGIC ("Returning the found link"); + return l; + } + else + { // // Skip is true and we've found a link from to . We want the next one. // Setting skip to false gets us the next point-to-point global router link // record in the LSA from . // - NS_LOG_LOGIC ("Skipping the found link"); - skip = false; - continue; - } - } + NS_LOG_LOGIC ("Skipping the found link"); + skip = false; + continue; + } + } } return 0; } - + // // Used for unit tests. // - void +void GlobalRouteManagerImpl::DebugSPFCalculate (Ipv4Address root) { NS_LOG_FUNCTION (root); @@ -1323,7 +1323,7 @@ GlobalRouteManagerImpl::CheckForStubNode (Ipv4Address root) } // quagga ospf_spf_calculate - void +void GlobalRouteManagerImpl::SPFCalculate (Ipv4Address root) { NS_LOG_FUNCTION (this << root); @@ -1470,7 +1470,7 @@ GlobalRouteManagerImpl::SPFCalculate (Ipv4Address root) } // end for loop -// Second stage of SPF calculation procedure +// Second stage of SPF calculation procedure SPFProcessStubs (m_spfroot); for (uint32_t i = 0; i < m_lsdb->GetNumExtLSAs (); i++) { @@ -1494,9 +1494,9 @@ GlobalRouteManagerImpl::ProcessASExternals (SPFVertex* v, GlobalRoutingLSA* extl { NS_LOG_FUNCTION_NOARGS (); NS_LOG_LOGIC ("Processing external for destination " << - extlsa->GetLinkStateId () << - ", for router " << v->GetVertexId () << - ", advertised by " << extlsa->GetAdvertisingRouter ()); + extlsa->GetLinkStateId () << + ", for router " << v->GetVertexId () << + ", advertised by " << extlsa->GetAdvertisingRouter ()); if (v->GetVertexType () == SPFVertex::VertexRouter) { GlobalRoutingLSA *rlsa = v->GetLSA (); @@ -1540,7 +1540,7 @@ GlobalRouteManagerImpl::SPFAddASExternal (GlobalRoutingLSA *extlsa, SPFVertex *v } NS_LOG_LOGIC ("External is on remote host: " << extlsa->GetAdvertisingRouter () << "; installing"); - + Ipv4Address routerId = m_spfroot->GetVertexId (); NS_LOG_LOGIC ("Vertex ID = " << routerId); @@ -1583,7 +1583,7 @@ GlobalRouteManagerImpl::SPFAddASExternal (GlobalRoutingLSA *extlsa, SPFVertex *v // Ptr ipv4 = node->GetObject (); NS_ASSERT_MSG (ipv4, - "GlobalRouteManagerImpl::SPFIntraAddRouter (): " + "GlobalRouteManagerImpl::SPFIntraAddRouter (): " "QI for interface failed"); // // Get the Global Router Link State Advertisement from the vertex we're @@ -1592,7 +1592,7 @@ GlobalRouteManagerImpl::SPFAddASExternal (GlobalRoutingLSA *extlsa, SPFVertex *v // to be interested in the records corresponding to point-to-point links. // NS_ASSERT_MSG (v->GetLSA (), - "GlobalRouteManagerImpl::SPFIntraAddRouter (): " + "GlobalRouteManagerImpl::SPFIntraAddRouter (): " "Expected valid LSA in SPFVertex* v"); Ipv4Mask tempmask = extlsa->GetNetworkLSANetworkMask (); Ipv4Address tempip = extlsa->GetLinkStateId (); @@ -1629,16 +1629,16 @@ GlobalRouteManagerImpl::SPFAddASExternal (GlobalRoutingLSA *extlsa, SPFVertex *v { gr->AddASExternalRouteTo (tempip, tempmask, nextHop, outIf); NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << - " add external network route to " << tempip << - " using next hop " << nextHop << - " via interface " << outIf); + " add external network route to " << tempip << + " using next hop " << nextHop << + " via interface " << outIf); } else { NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << - " NOT able to add network route to " << tempip << - " using next hop " << nextHop << - " since outgoing interface id is negative"); + " NOT able to add network route to " << tempip << + " using next hop " << nextHop << + " since outgoing interface id is negative"); } } return; @@ -1662,8 +1662,8 @@ GlobalRouteManagerImpl::SPFProcessStubs (SPFVertex* v) for (uint32_t i = 0; i < rlsa->GetNLinkRecords (); i++) { NS_LOG_LOGIC ("Examining link " << i << " of " << - v->GetVertexId () << "'s " << - v->GetLSA ()->GetNLinkRecords () << " link records"); + v->GetVertexId () << "'s " << + v->GetLSA ()->GetNLinkRecords () << " link records"); GlobalRoutingLinkRecord *l = v->GetLSA ()->GetLinkRecord (i); if (l->GetLinkType () == GlobalRoutingLinkRecord::StubNetwork) { @@ -1673,14 +1673,14 @@ GlobalRouteManagerImpl::SPFProcessStubs (SPFVertex* v) } } } - for (uint32_t i = 0; i < v->GetNChildren (); i++) - { - if (!v->GetChild (i)->IsVertexProcessed ()) - { - SPFProcessStubs (v->GetChild (i)); - v->GetChild (i)->SetVertexProcessed (true); - } - } + for (uint32_t i = 0; i < v->GetNChildren (); i++) + { + if (!v->GetChild (i)->IsVertexProcessed ()) + { + SPFProcessStubs (v->GetChild (i)); + v->GetChild (i)->SetVertexProcessed (true); + } + } } // RFC2328 16.1. second stage. @@ -1690,7 +1690,7 @@ GlobalRouteManagerImpl::SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex* NS_LOG_FUNCTION_NOARGS (); NS_ASSERT_MSG (m_spfroot, - "GlobalRouteManagerImpl::SPFIntraAddStub (): Root pointer not set"); + "GlobalRouteManagerImpl::SPFIntraAddStub (): Root pointer not set"); // XXX simplifed logic for the moment. There are two cases to consider: // 1) the stub network is on this router; do nothing for now @@ -1702,7 +1702,7 @@ GlobalRouteManagerImpl::SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex* NS_LOG_LOGIC ("Stub is on local host: " << v->GetVertexId () << "; returning"); return; } - NS_LOG_LOGIC ("Stub is on remote host: " << v->GetVertexId () << "; installing"); + NS_LOG_LOGIC ("Stub is on remote host: " << v->GetVertexId () << "; installing"); // // The root of the Shortest Path First tree is the router to which we are // going to write the actual routing table entries. The vertex corresponding @@ -1734,7 +1734,7 @@ GlobalRouteManagerImpl::SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex* if (rtr == 0) { NS_LOG_LOGIC ("No GlobalRouter interface on node " << - node->GetId ()); + node->GetId ()); continue; } // @@ -1754,8 +1754,8 @@ GlobalRouteManagerImpl::SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex* // Ptr ipv4 = node->GetObject (); NS_ASSERT_MSG (ipv4, - "GlobalRouteManagerImpl::SPFIntraAddRouter (): " - "QI for interface failed"); + "GlobalRouteManagerImpl::SPFIntraAddRouter (): " + "QI for interface failed"); // // Get the Global Router Link State Advertisement from the vertex we're // adding the routes to. The LSA will have a number of attached Global Router @@ -1763,8 +1763,8 @@ GlobalRouteManagerImpl::SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex* // to be interested in the records corresponding to point-to-point links. // NS_ASSERT_MSG (v->GetLSA (), - "GlobalRouteManagerImpl::SPFIntraAddRouter (): " - "Expected valid LSA in SPFVertex* v"); + "GlobalRouteManagerImpl::SPFIntraAddRouter (): " + "Expected valid LSA in SPFVertex* v"); Ipv4Mask tempmask (l->GetLinkData ().Get ()); Ipv4Address tempip = l->GetLinkId (); tempip = tempip.CombineMask (tempmask); @@ -1781,7 +1781,7 @@ GlobalRouteManagerImpl::SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex* // Similarly, the vertex has an m_rootOif (outbound interface index) to // which the packets should be send for forwarding. // - + Ptr router = node->GetObject (); if (router == 0) { @@ -1800,16 +1800,16 @@ GlobalRouteManagerImpl::SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex* { gr->AddNetworkRouteTo (tempip, tempmask, nextHop, outIf); NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << - " add network route to " << tempip << - " using next hop " << nextHop << - " via interface " << outIf); + " add network route to " << tempip << + " using next hop " << nextHop << + " via interface " << outIf); } else { NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << - " NOT able to add network route to " << tempip << - " using next hop " << nextHop << - " since outgoing interface id is negative"); + " NOT able to add network route to " << tempip << + " using next hop " << nextHop << + " since outgoing interface id is negative"); } } return; @@ -1829,7 +1829,7 @@ GlobalRouteManagerImpl::FindOutgoingInterfaceId (Ipv4Address a, Ipv4Mask amask) { NS_LOG_FUNCTION (a << amask); // -// We have an IP address and a vertex ID of the root of the SPF tree. +// We have an IP address and a vertex ID of the root of the SPF tree. // The question is what interface index does this address correspond to. // The answer is a little complicated since we have to find a pointer to // the node corresponding to the vertex ID, find the Ipv4 interface on that @@ -1869,8 +1869,8 @@ GlobalRouteManagerImpl::FindOutgoingInterfaceId (Ipv4Address a, Ipv4Mask amask) // Ptr ipv4 = node->GetObject (); NS_ASSERT_MSG (ipv4, - "GlobalRouteManagerImpl::FindOutgoingInterfaceId (): " - "GetObject for interface failed"); + "GlobalRouteManagerImpl::FindOutgoingInterfaceId (): " + "GetObject for interface failed"); // // Look through the interfaces on this node for one that has the IP address // we're looking for. If we find one, return the corresponding interface @@ -1882,7 +1882,7 @@ GlobalRouteManagerImpl::FindOutgoingInterfaceId (Ipv4Address a, Ipv4Mask amask) if (interface < 0) { NS_FATAL_ERROR ("GlobalRouteManagerImpl::FindOutgoingInterfaceId(): " - "Expected an interface associated with address a:" << a); + "Expected an interface associated with address a:" << a); } #endif return interface; @@ -1911,13 +1911,13 @@ GlobalRouteManagerImpl::FindOutgoingInterfaceId (Ipv4Address a, Ipv4Mask amask) // a destination IP address, reachable from the root, to which we add a host // route. // - void +void GlobalRouteManagerImpl::SPFIntraAddRouter (SPFVertex* v) { NS_LOG_FUNCTION (v); NS_ASSERT_MSG (m_spfroot, - "GlobalRouteManagerImpl::SPFIntraAddRouter (): Root pointer not set"); + "GlobalRouteManagerImpl::SPFIntraAddRouter (): Root pointer not set"); // // The root of the Shortest Path First tree is the router to which we are // going to write the actual routing table entries. The vertex corresponding @@ -1949,7 +1949,7 @@ GlobalRouteManagerImpl::SPFIntraAddRouter (SPFVertex* v) if (rtr == 0) { NS_LOG_LOGIC ("No GlobalRouter interface on node " << - node->GetId ()); + node->GetId ()); continue; } // @@ -1969,8 +1969,8 @@ GlobalRouteManagerImpl::SPFIntraAddRouter (SPFVertex* v) // Ptr ipv4 = node->GetObject (); NS_ASSERT_MSG (ipv4, - "GlobalRouteManagerImpl::SPFIntraAddRouter (): " - "GetObject for interface failed"); + "GlobalRouteManagerImpl::SPFIntraAddRouter (): " + "GetObject for interface failed"); // // Get the Global Router Link State Advertisement from the vertex we're // adding the routes to. The LSA will have a number of attached Global Router @@ -1979,8 +1979,8 @@ GlobalRouteManagerImpl::SPFIntraAddRouter (SPFVertex* v) // GlobalRoutingLSA *lsa = v->GetLSA (); NS_ASSERT_MSG (lsa, - "GlobalRouteManagerImpl::SPFIntraAddRouter (): " - "Expected valid LSA in SPFVertex* v"); + "GlobalRouteManagerImpl::SPFIntraAddRouter (): " + "Expected valid LSA in SPFVertex* v"); uint32_t nLinkRecords = lsa->GetNLinkRecords (); // @@ -1992,7 +1992,7 @@ GlobalRouteManagerImpl::SPFIntraAddRouter (SPFVertex* v) // the vertex . // NS_LOG_LOGIC (" Node " << node->GetId () << - " found " << nLinkRecords << " link records in LSA " << lsa << "with LinkStateId "<< lsa->GetLinkStateId ()); + " found " << nLinkRecords << " link records in LSA " << lsa << "with LinkStateId "<< lsa->GetLinkStateId ()); for (uint32_t j = 0; j < nLinkRecords; ++j) { // @@ -2027,27 +2027,27 @@ GlobalRouteManagerImpl::SPFIntraAddRouter (SPFVertex* v) // and add host route for each of the exit direction toward // the vertex 'v' for (uint32_t i = 0; i < v->GetNRootExitDirections (); i++) - { - SPFVertex::NodeExit_t exit = v->GetRootExitDirection (i); - Ipv4Address nextHop = exit.first; - int32_t outIf = exit.second; - if (outIf >= 0) - { - gr->AddHostRouteTo (lr->GetLinkData (), nextHop, - outIf); - NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << - " adding host route to " << lr->GetLinkData () << - " using next hop " << nextHop << - " and outgoing interface " << outIf); - } - else - { - NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << - " NOT able to add host route to " << lr->GetLinkData () << - " using next hop " << nextHop << - " since outgoing interface id is negative " << outIf); - } - } // for all routes from the root the vertex 'v' + { + SPFVertex::NodeExit_t exit = v->GetRootExitDirection (i); + Ipv4Address nextHop = exit.first; + int32_t outIf = exit.second; + if (outIf >= 0) + { + gr->AddHostRouteTo (lr->GetLinkData (), nextHop, + outIf); + NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << + " adding host route to " << lr->GetLinkData () << + " using next hop " << nextHop << + " and outgoing interface " << outIf); + } + else + { + NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << + " NOT able to add host route to " << lr->GetLinkData () << + " using next hop " << nextHop << + " since outgoing interface id is negative " << outIf); + } + } // for all routes from the root the vertex 'v' } // // Done adding the routes for the selected node. @@ -2056,13 +2056,13 @@ GlobalRouteManagerImpl::SPFIntraAddRouter (SPFVertex* v) } } } - void +void GlobalRouteManagerImpl::SPFIntraAddTransit (SPFVertex* v) { NS_LOG_FUNCTION (v); NS_ASSERT_MSG (m_spfroot, - "GlobalRouteManagerImpl::SPFIntraAddTransit (): Root pointer not set"); + "GlobalRouteManagerImpl::SPFIntraAddTransit (): Root pointer not set"); // // The root of the Shortest Path First tree is the router to which we are // going to write the actual routing table entries. The vertex corresponding @@ -2094,7 +2094,7 @@ GlobalRouteManagerImpl::SPFIntraAddTransit (SPFVertex* v) if (rtr == 0) { NS_LOG_LOGIC ("No GlobalRouter interface on node " << - node->GetId ()); + node->GetId ()); continue; } // @@ -2114,8 +2114,8 @@ GlobalRouteManagerImpl::SPFIntraAddTransit (SPFVertex* v) // Ptr ipv4 = node->GetObject (); NS_ASSERT_MSG (ipv4, - "GlobalRouteManagerImpl::SPFIntraAddTransit (): " - "GetObject for interface failed"); + "GlobalRouteManagerImpl::SPFIntraAddTransit (): " + "GetObject for interface failed"); // // Get the Global Router Link State Advertisement from the vertex we're // adding the routes to. The LSA will have a number of attached Global Router @@ -2124,8 +2124,8 @@ GlobalRouteManagerImpl::SPFIntraAddTransit (SPFVertex* v) // GlobalRoutingLSA *lsa = v->GetLSA (); NS_ASSERT_MSG (lsa, - "GlobalRouteManagerImpl::SPFIntraAddTransit (): " - "Expected valid LSA in SPFVertex* v"); + "GlobalRouteManagerImpl::SPFIntraAddTransit (): " + "Expected valid LSA in SPFVertex* v"); Ipv4Mask tempmask = lsa->GetNetworkLSANetworkMask (); Ipv4Address tempip = lsa->GetLinkStateId (); tempip = tempip.CombineMask (tempmask); @@ -2140,26 +2140,26 @@ GlobalRouteManagerImpl::SPFIntraAddTransit (SPFVertex* v) // and add host route for each of the exit direction toward // the vertex 'v' for (uint32_t i = 0; i < v->GetNRootExitDirections (); i++) - { - SPFVertex::NodeExit_t exit = v->GetRootExitDirection (i); - Ipv4Address nextHop = exit.first; - int32_t outIf = exit.second; + { + SPFVertex::NodeExit_t exit = v->GetRootExitDirection (i); + Ipv4Address nextHop = exit.first; + int32_t outIf = exit.second; - if (outIf >= 0) - { - gr->AddNetworkRouteTo (tempip, tempmask, nextHop, outIf); - NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << - " add network route to " << tempip << - " using next hop " << nextHop << - " via interface " << outIf); - } - else - { - NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << - " NOT able to add network route to " << tempip << - " using next hop " << nextHop << - " since outgoing interface id is negative " << outIf); - } + if (outIf >= 0) + { + gr->AddNetworkRouteTo (tempip, tempmask, nextHop, outIf); + NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << + " add network route to " << tempip << + " using next hop " << nextHop << + " via interface " << outIf); + } + else + { + NS_LOG_LOGIC ("(Route " << i << ") Node " << node->GetId () << + " NOT able to add network route to " << tempip << + " using next hop " << nextHop << + " since outgoing interface id is negative " << outIf); + } } } } @@ -2174,7 +2174,7 @@ GlobalRouteManagerImpl::SPFIntraAddTransit (SPFVertex* v) // Given a pointer to a vertex, it links back to the vertex's parent that it // already has set and adds itself to that vertex's list of children. // - void +void GlobalRouteManagerImpl::SPFVertexAddParent (SPFVertex* v) { NS_LOG_FUNCTION (v); diff --git a/src/internet/model/global-route-manager-impl.h b/src/internet/model/global-route-manager-impl.h index 31c2e9476..1ea6114b4 100644 --- a/src/internet/model/global-route-manager-impl.h +++ b/src/internet/model/global-route-manager-impl.h @@ -342,14 +342,14 @@ public: * forwarding packets to the host or network represented by "this" SPFVertex. */ void SetRootExitDirection (SPFVertex::NodeExit_t exit); - /** - * \brief Obtain a pair indicating the exit direction from the root - * - * \param i An index to a pair - * \return A pair of next-hop-IP and outgoing-interface-index for - * indicating an exit direction from the root. It is 0 if the index 'i' - * is out-of-range - */ + /** + * \brief Obtain a pair indicating the exit direction from the root + * + * \param i An index to a pair + * \return A pair of next-hop-IP and outgoing-interface-index for + * indicating an exit direction from the root. It is 0 if the index 'i' + * is out-of-range + */ NodeExit_t GetRootExitDirection (uint32_t i) const; /** * \brief Obtain a pair indicating the exit direction from the root @@ -533,9 +533,9 @@ public: * @returns value of underlying flag */ bool IsVertexProcessed (void) const; - + void ClearVertexProcessed (void); - + private: VertexType m_vertexType; Ipv4Address m_vertexId; @@ -663,10 +663,10 @@ public: * @see SPFVertex */ void Initialize (); - + GlobalRoutingLSA* GetExtLSA (uint32_t index) const; uint32_t GetNumExtLSAs () const; - + private: typedef std::map LSDBMap_t; @@ -674,7 +674,7 @@ private: LSDBMap_t m_database; std::vector m_extdatabase; - + /** * @brief GlobalRouteManagerLSDB copy construction is disallowed. There's no * need for it and a compiler provided shallow copy would be wrong. @@ -764,16 +764,16 @@ private: void ProcessASExternals (SPFVertex* v, GlobalRoutingLSA* extlsa); void SPFNext (SPFVertex*, CandidateQueue&); int SPFNexthopCalculation (SPFVertex* v, SPFVertex* w, - GlobalRoutingLinkRecord* l, uint32_t distance); + GlobalRoutingLinkRecord* l, uint32_t distance); void SPFVertexAddParent (SPFVertex* v); GlobalRoutingLinkRecord* SPFGetNextLink (SPFVertex* v, SPFVertex* w, - GlobalRoutingLinkRecord* prev_link); + GlobalRoutingLinkRecord* prev_link); void SPFIntraAddRouter (SPFVertex* v); void SPFIntraAddTransit (SPFVertex* v); void SPFIntraAddStub (GlobalRoutingLinkRecord *l, SPFVertex* v); void SPFAddASExternal (GlobalRoutingLSA *extlsa, SPFVertex *v); int32_t FindOutgoingInterfaceId (Ipv4Address a, - Ipv4Mask amask = Ipv4Mask("255.255.255.255")); + Ipv4Mask amask = Ipv4Mask("255.255.255.255")); }; } // namespace ns3 diff --git a/src/internet/model/global-route-manager.cc b/src/internet/model/global-route-manager.cc index 6e2282fb4..448ad9ff8 100644 --- a/src/internet/model/global-route-manager.cc +++ b/src/internet/model/global-route-manager.cc @@ -32,28 +32,28 @@ namespace ns3 { // // --------------------------------------------------------------------------- - void +void GlobalRouteManager::DeleteGlobalRoutes () { SimulationSingleton::Get ()-> - DeleteGlobalRoutes (); + DeleteGlobalRoutes (); } - void +void GlobalRouteManager::BuildGlobalRoutingDatabase (void) { SimulationSingleton::Get ()-> - BuildGlobalRoutingDatabase (); + BuildGlobalRoutingDatabase (); } - void +void GlobalRouteManager::InitializeRoutes (void) { SimulationSingleton::Get ()-> - InitializeRoutes (); + InitializeRoutes (); } - uint32_t +uint32_t GlobalRouteManager::AllocateRouterId (void) { static uint32_t routerId = 0; diff --git a/src/internet/model/global-router-interface.cc b/src/internet/model/global-router-interface.cc index 4626b53a5..cc770b4d4 100644 --- a/src/internet/model/global-router-interface.cc +++ b/src/internet/model/global-router-interface.cc @@ -42,11 +42,11 @@ namespace ns3 { // --------------------------------------------------------------------------- GlobalRoutingLinkRecord::GlobalRoutingLinkRecord () -: - m_linkId ("0.0.0.0"), - m_linkData ("0.0.0.0"), - m_linkType (Unknown), - m_metric (0) + : + m_linkId ("0.0.0.0"), + m_linkData ("0.0.0.0"), + m_linkType (Unknown), + m_metric (0) { NS_LOG_FUNCTION_NOARGS (); } @@ -56,11 +56,11 @@ GlobalRoutingLinkRecord::GlobalRoutingLinkRecord ( Ipv4Address linkId, Ipv4Address linkData, uint16_t metric) -: - m_linkId (linkId), - m_linkData (linkData), - m_linkType (linkType), - m_metric (metric) + : + m_linkId (linkId), + m_linkData (linkData), + m_linkType (linkType), + m_metric (metric) { NS_LOG_FUNCTION (this << linkType << linkId << linkData << metric); } @@ -70,42 +70,42 @@ GlobalRoutingLinkRecord::~GlobalRoutingLinkRecord () NS_LOG_FUNCTION_NOARGS (); } - Ipv4Address +Ipv4Address GlobalRoutingLinkRecord::GetLinkId (void) const { NS_LOG_FUNCTION_NOARGS (); return m_linkId; } - void +void GlobalRoutingLinkRecord::SetLinkId (Ipv4Address addr) { NS_LOG_FUNCTION_NOARGS (); m_linkId = addr; } - Ipv4Address +Ipv4Address GlobalRoutingLinkRecord::GetLinkData (void) const { NS_LOG_FUNCTION_NOARGS (); return m_linkData; } - void +void GlobalRoutingLinkRecord::SetLinkData (Ipv4Address addr) { NS_LOG_FUNCTION_NOARGS (); m_linkData = addr; } - GlobalRoutingLinkRecord::LinkType +GlobalRoutingLinkRecord::LinkType GlobalRoutingLinkRecord::GetLinkType (void) const { NS_LOG_FUNCTION_NOARGS (); return m_linkType; } - void +void GlobalRoutingLinkRecord::SetLinkType ( GlobalRoutingLinkRecord::LinkType linkType) { @@ -113,14 +113,14 @@ GlobalRoutingLinkRecord::SetLinkType ( m_linkType = linkType; } - uint16_t +uint16_t GlobalRoutingLinkRecord::GetMetric (void) const { NS_LOG_FUNCTION_NOARGS (); return m_metric; } - void +void GlobalRoutingLinkRecord::SetMetric (uint16_t metric) { NS_LOG_FUNCTION_NOARGS (); @@ -135,14 +135,14 @@ GlobalRoutingLinkRecord::SetMetric (uint16_t metric) GlobalRoutingLSA::GlobalRoutingLSA() : - m_lsType (GlobalRoutingLSA::Unknown), - m_linkStateId("0.0.0.0"), - m_advertisingRtr("0.0.0.0"), - m_linkRecords(), - m_networkLSANetworkMask("0.0.0.0"), - m_attachedRouters(), - m_status(GlobalRoutingLSA::LSA_SPF_NOT_EXPLORED), - m_node_id(0) + m_lsType (GlobalRoutingLSA::Unknown), + m_linkStateId("0.0.0.0"), + m_advertisingRtr("0.0.0.0"), + m_linkRecords(), + m_networkLSANetworkMask("0.0.0.0"), + m_attachedRouters(), + m_status(GlobalRoutingLSA::LSA_SPF_NOT_EXPLORED), + m_node_id(0) { NS_LOG_FUNCTION_NOARGS (); } @@ -151,15 +151,15 @@ GlobalRoutingLSA::GlobalRoutingLSA ( GlobalRoutingLSA::SPFStatus status, Ipv4Address linkStateId, Ipv4Address advertisingRtr) -: - m_lsType (GlobalRoutingLSA::Unknown), - m_linkStateId(linkStateId), - m_advertisingRtr(advertisingRtr), - m_linkRecords(), - m_networkLSANetworkMask("0.0.0.0"), - m_attachedRouters(), - m_status(status), - m_node_id(0) + : + m_lsType (GlobalRoutingLSA::Unknown), + m_linkStateId(linkStateId), + m_advertisingRtr(advertisingRtr), + m_linkRecords(), + m_networkLSANetworkMask("0.0.0.0"), + m_attachedRouters(), + m_status(status), + m_node_id(0) { NS_LOG_FUNCTION (this << status << linkStateId << advertisingRtr); } @@ -173,11 +173,11 @@ GlobalRoutingLSA::GlobalRoutingLSA (GlobalRoutingLSA& lsa) { NS_LOG_FUNCTION_NOARGS (); NS_ASSERT_MSG(IsEmpty(), - "GlobalRoutingLSA::GlobalRoutingLSA (): Non-empty LSA in constructor"); + "GlobalRoutingLSA::GlobalRoutingLSA (): Non-empty LSA in constructor"); CopyLinkRecords (lsa); } - GlobalRoutingLSA& +GlobalRoutingLSA& GlobalRoutingLSA::operator= (const GlobalRoutingLSA& lsa) { NS_LOG_FUNCTION_NOARGS (); @@ -193,7 +193,7 @@ GlobalRoutingLSA::operator= (const GlobalRoutingLSA& lsa) return *this; } - void +void GlobalRoutingLSA::CopyLinkRecords (const GlobalRoutingLSA& lsa) { NS_LOG_FUNCTION_NOARGS (); @@ -213,7 +213,7 @@ GlobalRoutingLSA::CopyLinkRecords (const GlobalRoutingLSA& lsa) pDst = 0; } - m_attachedRouters = lsa.m_attachedRouters; + m_attachedRouters = lsa.m_attachedRouters; } GlobalRoutingLSA::~GlobalRoutingLSA() @@ -222,7 +222,7 @@ GlobalRoutingLSA::~GlobalRoutingLSA() ClearLinkRecords (); } - void +void GlobalRoutingLSA::ClearLinkRecords(void) { NS_LOG_FUNCTION_NOARGS (); @@ -242,7 +242,7 @@ GlobalRoutingLSA::ClearLinkRecords(void) m_linkRecords.clear(); } - uint32_t +uint32_t GlobalRoutingLSA::AddLinkRecord (GlobalRoutingLinkRecord* lr) { NS_LOG_FUNCTION_NOARGS (); @@ -250,14 +250,14 @@ GlobalRoutingLSA::AddLinkRecord (GlobalRoutingLinkRecord* lr) return m_linkRecords.size (); } - uint32_t +uint32_t GlobalRoutingLSA::GetNLinkRecords (void) const { NS_LOG_FUNCTION_NOARGS (); return m_linkRecords.size (); } - GlobalRoutingLinkRecord * +GlobalRoutingLinkRecord * GlobalRoutingLSA::GetLinkRecord (uint32_t n) const { NS_LOG_FUNCTION_NOARGS (); @@ -275,77 +275,77 @@ GlobalRoutingLSA::GetLinkRecord (uint32_t n) const return 0; } - bool +bool GlobalRoutingLSA::IsEmpty (void) const { NS_LOG_FUNCTION_NOARGS (); return m_linkRecords.size () == 0; } - GlobalRoutingLSA::LSType +GlobalRoutingLSA::LSType GlobalRoutingLSA::GetLSType (void) const { NS_LOG_FUNCTION_NOARGS (); return m_lsType; } - void +void GlobalRoutingLSA::SetLSType (GlobalRoutingLSA::LSType typ) { NS_LOG_FUNCTION_NOARGS (); m_lsType = typ; } - Ipv4Address +Ipv4Address GlobalRoutingLSA::GetLinkStateId (void) const { NS_LOG_FUNCTION_NOARGS (); return m_linkStateId; } - void +void GlobalRoutingLSA::SetLinkStateId (Ipv4Address addr) { NS_LOG_FUNCTION_NOARGS (); m_linkStateId = addr; } - Ipv4Address +Ipv4Address GlobalRoutingLSA::GetAdvertisingRouter (void) const { NS_LOG_FUNCTION_NOARGS (); return m_advertisingRtr; } - void +void GlobalRoutingLSA::SetAdvertisingRouter (Ipv4Address addr) { NS_LOG_FUNCTION_NOARGS (); m_advertisingRtr = addr; } - void +void GlobalRoutingLSA::SetNetworkLSANetworkMask (Ipv4Mask mask) { NS_LOG_FUNCTION_NOARGS (); m_networkLSANetworkMask = mask; } - Ipv4Mask +Ipv4Mask GlobalRoutingLSA::GetNetworkLSANetworkMask (void) const { NS_LOG_FUNCTION_NOARGS (); return m_networkLSANetworkMask; } - GlobalRoutingLSA::SPFStatus +GlobalRoutingLSA::SPFStatus GlobalRoutingLSA::GetStatus (void) const { NS_LOG_FUNCTION_NOARGS (); return m_status; } - uint32_t +uint32_t GlobalRoutingLSA::AddAttachedRouter (Ipv4Address addr) { NS_LOG_FUNCTION_NOARGS (); @@ -353,14 +353,14 @@ GlobalRoutingLSA::AddAttachedRouter (Ipv4Address addr) return m_attachedRouters.size (); } - uint32_t +uint32_t GlobalRoutingLSA::GetNAttachedRouters (void) const { NS_LOG_FUNCTION_NOARGS (); return m_attachedRouters.size (); } - Ipv4Address +Ipv4Address GlobalRoutingLSA::GetAttachedRouter (uint32_t n) const { NS_LOG_FUNCTION_NOARGS (); @@ -378,28 +378,28 @@ GlobalRoutingLSA::GetAttachedRouter (uint32_t n) const return Ipv4Address("0.0.0.0"); } - void +void GlobalRoutingLSA::SetStatus (GlobalRoutingLSA::SPFStatus status) { NS_LOG_FUNCTION_NOARGS (); m_status = status; } - Ptr +Ptr GlobalRoutingLSA::GetNode (void) const { NS_LOG_FUNCTION_NOARGS (); return NodeList::GetNode (m_node_id); } - void +void GlobalRoutingLSA::SetNode (Ptr node) { NS_LOG_FUNCTION (node); m_node_id = node->GetId (); } - void +void GlobalRoutingLSA::Print (std::ostream &os) const { os << std::endl; @@ -543,15 +543,15 @@ GlobalRouter::DoDispose () NS_LOG_FUNCTION_NOARGS (); m_routingProtocol = 0; for (InjectedRoutesI k = m_injectedRoutes.begin (); - k != m_injectedRoutes.end (); - k = m_injectedRoutes.erase (k)) + k != m_injectedRoutes.end (); + k = m_injectedRoutes.erase (k)) { delete (*k); } Object::DoDispose (); } - void +void GlobalRouter::ClearLSAs () { NS_LOG_FUNCTION_NOARGS (); @@ -571,7 +571,7 @@ GlobalRouter::ClearLSAs () m_LSAs.clear(); } - Ipv4Address +Ipv4Address GlobalRouter::GetRouterId (void) const { NS_LOG_FUNCTION_NOARGS (); @@ -642,7 +642,8 @@ GlobalRouter::DiscoverLSAs () // if (NetDeviceIsBridged (ndLocal)) { - uint32_t interfaceBridge; + // Initialize to value out of bounds to silence compiler + uint32_t interfaceBridge = ipv4Local->GetNInterfaces () + 1; bool rc = FindInterfaceForDevice(node, ndLocal, interfaceBridge); NS_ABORT_MSG_IF (rc, "GlobalRouter::DiscoverLSAs(): Bridge ports must not have an IPv4 interface index"); } @@ -731,7 +732,7 @@ GlobalRouter::DiscoverLSAs () return m_LSAs.size (); } - void +void GlobalRouter::ProcessBroadcastLink (Ptr nd, GlobalRoutingLSA *pLSA, NetDeviceContainer &c) { NS_LOG_FUNCTION (nd << pLSA << &c); @@ -746,7 +747,7 @@ GlobalRouter::ProcessBroadcastLink (Ptr nd, GlobalRoutingLSA *pLSA, N } } - void +void GlobalRouter::ProcessSingleBroadcastLink (Ptr nd, GlobalRoutingLSA *pLSA, NetDeviceContainer &c) { NS_LOG_FUNCTION (nd << pLSA << &c); @@ -763,13 +764,14 @@ GlobalRouter::ProcessSingleBroadcastLink (Ptr nd, GlobalRoutingLSA *p // Ptr node = nd->GetNode (); - uint32_t interfaceLocal; - bool rc = FindInterfaceForDevice(node, nd, interfaceLocal); - NS_ABORT_MSG_IF (rc == false, "GlobalRouter::ProcessSingleBroadcastLink(): No interface index associated with device"); - Ptr ipv4Local = node->GetObject (); NS_ABORT_MSG_UNLESS (ipv4Local, "GlobalRouter::ProcessSingleBroadcastLink (): GetObject for interface failed"); + // Initialize to value out of bounds to silence compiler + uint32_t interfaceLocal = ipv4Local->GetNInterfaces () + 1; + bool rc = FindInterfaceForDevice(node, nd, interfaceLocal); + NS_ABORT_MSG_IF (rc == false, "GlobalRouter::ProcessSingleBroadcastLink(): No interface index associated with device"); + if (ipv4Local->GetNAddresses (interfaceLocal) > 1) { NS_LOG_WARN ("Warning, interface has multiple IP addresses; using only the primary one"); @@ -843,7 +845,7 @@ GlobalRouter::ProcessSingleBroadcastLink (Ptr nd, GlobalRoutingLSA *p NS_LOG_LOGIC ("Node " << node->GetId () << " elected a designated router"); } plr->SetLinkId (desigRtr); - + // // OSPF says that the Link Data is this router's own IP address. // @@ -854,7 +856,7 @@ GlobalRouter::ProcessSingleBroadcastLink (Ptr nd, GlobalRoutingLSA *p } } - void +void GlobalRouter::ProcessBridgedBroadcastLink (Ptr nd, GlobalRoutingLSA *pLSA, NetDeviceContainer &c) { NS_LOG_FUNCTION (nd << pLSA << &c); @@ -882,14 +884,14 @@ GlobalRouter::ProcessBridgedBroadcastLink (Ptr nd, GlobalRoutingLSA * // associated to them. // Ptr node = nd->GetNode (); - - uint32_t interfaceLocal; - bool rc = FindInterfaceForDevice(node, nd, interfaceLocal); - NS_ABORT_MSG_IF (rc == false, "GlobalRouter::ProcessBridgedBroadcastLink(): No interface index associated with device"); - Ptr ipv4Local = node->GetObject (); NS_ABORT_MSG_UNLESS (ipv4Local, "GlobalRouter::ProcessBridgedBroadcastLink (): GetObject for interface failed"); + // Initialize to value out of bounds to silence compiler + uint32_t interfaceLocal = ipv4Local->GetNInterfaces () + 1; + bool rc = FindInterfaceForDevice(node, nd, interfaceLocal); + NS_ABORT_MSG_IF (rc == false, "GlobalRouter::ProcessBridgedBroadcastLink(): No interface index associated with device"); + if (ipv4Local->GetNAddresses (interfaceLocal) > 1) { NS_LOG_WARN ("Warning, interface has multiple IP addresses; using only the primary one"); @@ -1003,7 +1005,7 @@ GlobalRouter::ProcessBridgedBroadcastLink (Ptr nd, GlobalRoutingLSA * NS_LOG_LOGIC ("Node " << node->GetId () << " elected a designated router"); } plr->SetLinkId (desigRtr); - + // // OSPF says that the Link Data is this router's own IP address. // @@ -1015,7 +1017,7 @@ GlobalRouter::ProcessBridgedBroadcastLink (Ptr nd, GlobalRoutingLSA * #endif } - void +void GlobalRouter::ProcessPointToPointLink (Ptr ndLocal, GlobalRoutingLSA *pLSA) { NS_LOG_FUNCTION (ndLocal << pLSA); @@ -1029,26 +1031,25 @@ GlobalRouter::ProcessPointToPointLink (Ptr ndLocal, GlobalRoutingLSA // Ptr nodeLocal = ndLocal->GetNode (); - uint32_t interfaceLocal; - bool rc = FindInterfaceForDevice(nodeLocal, ndLocal, interfaceLocal); - NS_ABORT_MSG_IF (rc == false, "GlobalRouter::ProcessPointToPointLink (): No interface index associated with device"); - Ptr ipv4Local = nodeLocal->GetObject (); NS_ABORT_MSG_UNLESS (ipv4Local, "GlobalRouter::ProcessPointToPointLink (): GetObject for interface failed"); + uint32_t interfaceLocal = ipv4Local->GetNInterfaces () + 1; + bool rc = FindInterfaceForDevice(nodeLocal, ndLocal, interfaceLocal); + NS_ABORT_MSG_IF (rc == false, "GlobalRouter::ProcessPointToPointLink (): No interface index associated with device"); + if (ipv4Local->GetNAddresses (interfaceLocal) > 1) { NS_LOG_WARN ("Warning, interface has multiple IP addresses; using only the primary one"); } Ipv4Address addrLocal = ipv4Local->GetAddress (interfaceLocal, 0).GetLocal (); - Ipv4Mask maskLocal = ipv4Local->GetAddress (interfaceLocal, 0).GetMask (); NS_LOG_LOGIC ("Working with local address " << addrLocal); uint16_t metricLocal = ipv4Local->GetMetric (interfaceLocal); // // Now, we're going to walk over to the remote net device on the other end of // the point-to-point channel we know we have. This is where our adjacent - // router (to use OSPF lingo) is running. + // router (to use OSPF lingo) is running. // Ptr ch = ndLocal->GetChannel(); @@ -1090,7 +1091,7 @@ GlobalRouter::ProcessPointToPointLink (Ptr ndLocal, GlobalRoutingLSA // Now, just like we did above, we need to get the IP interface index for the // net device on the other end of the point-to-point channel. // - uint32_t interfaceRemote; + uint32_t interfaceRemote = ipv4Remote->GetNInterfaces () + 1; rc = FindInterfaceForDevice(nodeRemote, ndRemote, interfaceRemote); NS_ABORT_MSG_IF (rc == false, "GlobalRouter::ProcessPointToPointLinks(): No interface index associated with remote device"); @@ -1137,13 +1138,13 @@ GlobalRouter::ProcessPointToPointLink (Ptr ndLocal, GlobalRoutingLSA plr = 0; } - void +void GlobalRouter::BuildNetworkLSAs (NetDeviceContainer c) { NS_LOG_FUNCTION (&c); uint32_t nDesignatedRouters = c.GetN (); - + for (uint32_t i = 0; i < nDesignatedRouters; ++i) { // @@ -1153,13 +1154,13 @@ GlobalRouter::BuildNetworkLSAs (NetDeviceContainer c) Ptr ndLocal = c.Get (i); Ptr node = ndLocal->GetNode (); - uint32_t interfaceLocal; - bool rc = FindInterfaceForDevice(node, ndLocal, interfaceLocal); - NS_ABORT_MSG_IF (rc == false, "GlobalRouter::BuildNetworkLSAs (): No interface index associated with device"); - Ptr ipv4Local = node->GetObject (); NS_ABORT_MSG_UNLESS (ipv4Local, "GlobalRouter::ProcessPointToPointLink (): GetObject for interface failed"); + uint32_t interfaceLocal = ipv4Local->GetNInterfaces () + 1; + bool rc = FindInterfaceForDevice(node, ndLocal, interfaceLocal); + NS_ABORT_MSG_IF (rc == false, "GlobalRouter::BuildNetworkLSAs (): No interface index associated with device"); + if (ipv4Local->GetNAddresses (interfaceLocal) > 1) { NS_LOG_WARN ("Warning, interface has multiple IP addresses; using only the primary one"); @@ -1180,12 +1181,12 @@ GlobalRouter::BuildNetworkLSAs (NetDeviceContainer c) // // Build a list of AttachedRouters by walking the devices in the channel // and, if we find a node with a GlobalRouter interface and an IPv4 - // interface associated with that device, we call it an attached router. + // interface associated with that device, we call it an attached router. // Ptr ch = ndLocal->GetChannel(); uint32_t nDevices = ch->GetNDevices(); NS_ASSERT (nDevices); - + for (uint32_t i = 0; i < nDevices; i++) { Ptr tempNd = ch->GetDevice (i); @@ -1206,7 +1207,7 @@ GlobalRouter::BuildNetworkLSAs (NetDeviceContainer c) // Does the attached node have an ipv4 interface for the device we're probing? // If not, it can't play router. // - uint32_t tempInterface; + uint32_t tempInterface = 0; if (FindInterfaceForDevice (tempNode, tempNd, tempInterface)) { Ptr tempIpv4 = tempNode->GetObject (); @@ -1237,7 +1238,7 @@ GlobalRouter::BuildNetworkLSAs (NetDeviceContainer c) // will be us). Of these, the router with the lowest IP address on the net device // connecting to the channel becomes the designated router for the link. // - Ipv4Address +Ipv4Address GlobalRouter::FindDesignatedRouterForLink (Ptr ndLocal, bool allowRecursion) const { NS_LOG_FUNCTION (ndLocal << allowRecursion); @@ -1290,7 +1291,8 @@ GlobalRouter::FindDesignatedRouterForLink (Ptr ndLocal, bool allowRec Ptr ipv4 = nodeOther->GetObject (); if (rtr && ipv4) { - uint32_t interfaceOther; + // Initialize to value out of bounds to silence compiler + uint32_t interfaceOther = ipv4->GetNInterfaces () + 1; if (FindInterfaceForDevice(nodeOther, bnd, interfaceOther)) { NS_LOG_LOGIC ("Found router on bridge net device " << bnd); @@ -1343,7 +1345,8 @@ GlobalRouter::FindDesignatedRouterForLink (Ptr ndLocal, bool allowRec Ptr ipv4 = nodeOther->GetObject (); if (rtr && ipv4) { - uint32_t interfaceOther; + // Initialize to value out of bounds to silence compiler + uint32_t interfaceOther = ipv4->GetNInterfaces () + 1; if (FindInterfaceForDevice(nodeOther, ndOther, interfaceOther)) { if (!ipv4->IsUp (interfaceOther)) @@ -1372,7 +1375,7 @@ GlobalRouter::FindDesignatedRouterForLink (Ptr ndLocal, bool allowRec // that has a GlobalRouter interface aggregated. Life gets more complicated // when there is a bridged net device on the other side. // - bool +bool GlobalRouter::AnotherRouterOnLink (Ptr nd, bool allowRecursion) const { NS_LOG_FUNCTION (nd << allowRecursion); @@ -1463,7 +1466,7 @@ GlobalRouter::AnotherRouterOnLink (Ptr nd, bool allowRecursion) const return false; } - uint32_t +uint32_t GlobalRouter::GetNumLSAs (void) const { NS_LOG_FUNCTION_NOARGS (); @@ -1473,7 +1476,7 @@ GlobalRouter::GetNumLSAs (void) const // // Get the nth link state advertisement from this router. // - bool +bool GlobalRouter::GetLSA (uint32_t n, GlobalRoutingLSA &lsa) const { NS_LOG_FUNCTION_NOARGS (); @@ -1508,8 +1511,8 @@ GlobalRouter::InjectRoute (Ipv4Address network, Ipv4Mask networkMask) // Interface number does not matter here, using 1. // *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, - networkMask, - 1); + networkMask, + 1); m_injectedRoutes.push_back (route); } @@ -1530,7 +1533,7 @@ GlobalRouter::GetInjectedRoute (uint32_t index) } tmp++; } - } + } NS_ASSERT (false); // quiet compiler. return 0; @@ -1583,7 +1586,7 @@ GlobalRouter::WithdrawRoute (Ipv4Address network, Ipv4Mask networkMask) // Link through the given channel and find the net device that's on the // other end. This only makes sense with a point-to-point channel. // - Ptr +Ptr GlobalRouter::GetAdjacent (Ptr nd, Ptr ch) const { NS_LOG_FUNCTION_NOARGS (); @@ -1609,7 +1612,7 @@ GlobalRouter::GetAdjacent (Ptr nd, Ptr ch) const else { NS_ASSERT_MSG(false, - "GlobalRouter::GetAdjacent (): Wrong or confused channel?"); + "GlobalRouter::GetAdjacent (): Wrong or confused channel?"); return 0; } } @@ -1621,7 +1624,7 @@ GlobalRouter::GetAdjacent (Ptr nd, Ptr ch) const // an IPv4 at all. If the node does have a stack, but the net device in question // is bridged, there will not be an interface associated directly with the device. // - bool +bool GlobalRouter::FindInterfaceForDevice (Ptr node, Ptr nd, uint32_t &index) const { NS_LOG_FUNCTION_NOARGS (); @@ -1651,7 +1654,7 @@ GlobalRouter::FindInterfaceForDevice (Ptr node, Ptr nd, uint32_ // // Decide whether or not a given net device is being bridged by a BridgeNetDevice. // - Ptr +Ptr GlobalRouter::NetDeviceIsBridged (Ptr nd) const { NS_LOG_FUNCTION (nd); diff --git a/src/internet/model/global-router-interface.h b/src/internet/model/global-router-interface.h index 58f847b89..75224f115 100644 --- a/src/internet/model/global-router-interface.h +++ b/src/internet/model/global-router-interface.h @@ -209,21 +209,21 @@ private: * * For Type 3 link (Stub), set m_linkId to neighbor's IP address */ - Ipv4Address m_linkId; + Ipv4Address m_linkId; /** * m_linkId and m_linkData are defined by OSPF to have different meanings * depending on the type of link a given link records represents. They work * together. * - * For Type 1 link (PointToPoint), set m_linkData to local IP address + * For Type 1 link (PointToPoint), set m_linkData to local IP address * * For Type 3 link (Stub), set m_linkData to mask */ Ipv4Address m_linkData; // for links to RouterLSA, /** - * The type of the Global Routing Link Record. Defined in the OSPF spec. + * The type of the Global Routing Link Record. Defined in the OSPF spec. * We currently only use PointToPoint and StubNetwork types. */ LinkType m_linkType; @@ -237,10 +237,10 @@ private: * of two hops relate to the cost of sending a packet); rather you should * use something like delay. */ - uint16_t m_metric; + uint16_t m_metric; }; -/** +/** * @brief a Link State Advertisement (LSA) for a router, used in global * routing. * @@ -269,12 +269,12 @@ public: * Link State Advertisements. */ enum SPFStatus { - LSA_SPF_NOT_EXPLORED = 0, /**< New vertex not yet considered */ - LSA_SPF_CANDIDATE, /**< Vertex is in the SPF candidate queue */ - LSA_SPF_IN_SPFTREE /**< Vertex is in the SPF tree */ + LSA_SPF_NOT_EXPLORED = 0, /**< New vertex not yet considered */ + LSA_SPF_CANDIDATE, /**< Vertex is in the SPF candidate queue */ + LSA_SPF_IN_SPFTREE /**< Vertex is in the SPF tree */ }; /** - * @brief Create a blank Global Routing Link State Advertisement. + * @brief Create a blank Global Routing Link State Advertisement. * * On completion Ipv4Address variables initialized to 0.0.0.0 and the * list of Link State Records is empty. @@ -282,7 +282,7 @@ public: GlobalRoutingLSA(); /** - * @brief Create an initialized Global Routing Link State Advertisement. + * @brief Create an initialized Global Routing Link State Advertisement. * * On completion the list of Link State Records is empty. * @@ -291,7 +291,7 @@ public: * @param advertisingRtr The Ipv4Address for the advertising router field. */ GlobalRoutingLSA(SPFStatus status, Ipv4Address linkStateId, - Ipv4Address advertisingRtr); + Ipv4Address advertisingRtr); /** * @brief Copy constructor for a Global Routing Link State Advertisement. @@ -326,7 +326,7 @@ public: /** * @brief Copy any Global Routing Link Records in a given Global Routing Link - * State Advertisement to the current LSA. + * State Advertisement to the current LSA. * * Existing Link Records are not deleted -- this is a concatenation of Link * Records. @@ -647,7 +647,7 @@ public: * * You must call GlobalRouter::GetNumLSAs before calling this method in * order to discover the adjacent routers and build the advertisements. - * GetNumLSAs will return the number of LSAs this router advertises. + * GetNumLSAs will return the number of LSAs this router advertises. * The parameter n (requested LSA number) must be in the range 0 to * GetNumLSAs() - 1. * @@ -690,7 +690,7 @@ public: * index i to have their index decremented. For instance, it is possible to * remove N injected routes by calling RemoveInjectedRoute (0) N times. * - * @param i The index (into the injected routing list) of the route to remove. + * @param i The index (into the injected routing list) of the route to remove. * * @see GlobalRouter::WithdrawRoute () */ diff --git a/src/internet/model/global-routing.h b/src/internet/model/global-routing.h index 7cfc37273..8ea92155f 100644 --- a/src/internet/model/global-routing.h +++ b/src/internet/model/global-routing.h @@ -18,7 +18,7 @@ */ /** - * \ingroup routing + * \ingroup internet * \defgroup globalrouting Global Routing * * \section model Model @@ -50,11 +50,11 @@ * Users must include ns3/global-route-manager.h header file. After the * IPv4 topology has been built and addresses assigned, users call * ns3::GlobalRouteManager::PopulateRoutingTables (), prior to the - * ns3::Simulator::Run() call. + * ns3::Simulator::Run() call. * * There are two attributes of Ipv4GlobalRouting that govern behavior. * - Ipv4GlobalRouting::RandomEcmpRouting - * - Ipv4GlobalRouting::RespondToInterfaceEvents + * - Ipv4GlobalRouting::RespondToInterfaceEvents * * \section impl Implementation * @@ -75,7 +75,7 @@ * The format of the data exported conforms to the OSPFv2 standard * (http://www.ietf.org/rfc/rfc2328.txt). In particular, the * information is exported in the form of ns3::GlobalLSA objects that - * semantically match the Link State Advertisements of OSPF. + * semantically match the Link State Advertisements of OSPF. * * By using a standard data format for reporting topology, existing * OSPF route computation code can be reused, and that is what is done diff --git a/src/internet/model/icmpv4-l4-protocol.cc b/src/internet/model/icmpv4-l4-protocol.cc index 8657cda85..e9272a2f9 100644 --- a/src/internet/model/icmpv4-l4-protocol.cc +++ b/src/internet/model/icmpv4-l4-protocol.cc @@ -15,7 +15,7 @@ NS_LOG_COMPONENT_DEFINE ("Icmpv4L4Protocol"); NS_OBJECT_ENSURE_REGISTERED (Icmpv4L4Protocol); - // see rfc 792 +// see rfc 792 const uint8_t Icmpv4L4Protocol::PROT_NUMBER = 1; TypeId @@ -24,19 +24,20 @@ Icmpv4L4Protocol::GetTypeId (void) static TypeId tid = TypeId ("ns3::Icmpv4L4Protocol") .SetParent () .AddConstructor () - ; + ; return tid; } Icmpv4L4Protocol::Icmpv4L4Protocol () : m_node (0) -{} +{ +} Icmpv4L4Protocol::~Icmpv4L4Protocol () { NS_ASSERT (m_node == 0); } -void +void Icmpv4L4Protocol::SetNode (Ptr node) { m_node = node; @@ -54,17 +55,17 @@ Icmpv4L4Protocol::NotifyNewAggregate () { Ptr node = this->GetObject (); if (node != 0) - { - Ptr ipv4 = this->GetObject (); - if (ipv4 != 0) - { - this->SetNode (node); - ipv4->Insert (this); - Ptr rawFactory = CreateObject (); - ipv4->AggregateObject (rawFactory); + { + Ptr ipv4 = this->GetObject (); + if (ipv4 != 0) + { + this->SetNode (node); + ipv4->Insert (this); + Ptr rawFactory = CreateObject (); + ipv4->AggregateObject (rawFactory); this->SetDownTarget (MakeCallback(&Ipv4L3Protocol::Send, ipv4)); - } - } + } + } } Object::NotifyNewAggregate (); } @@ -95,8 +96,8 @@ Icmpv4L4Protocol::SendMessage (Ptr packet, Ipv4Address dest, uint8_t typ if (route != 0) { NS_LOG_LOGIC ("Route exists"); - Ipv4Address source = route->GetSource (); - SendMessage (packet, source, dest, type, code, route); + Ipv4Address source = route->GetSource (); + SendMessage (packet, source, dest, type, code, route); } else { @@ -120,22 +121,22 @@ Icmpv4L4Protocol::SendMessage (Ptr packet, Ipv4Address source, Ipv4Addre } void Icmpv4L4Protocol::SendDestUnreachFragNeeded (Ipv4Header header, - Ptr orgData, - uint16_t nextHopMtu) + Ptr orgData, + uint16_t nextHopMtu) { NS_LOG_FUNCTION (this << header << *orgData << nextHopMtu); SendDestUnreach (header, orgData, Icmpv4DestinationUnreachable::FRAG_NEEDED, nextHopMtu); } void Icmpv4L4Protocol::SendDestUnreachPort (Ipv4Header header, - Ptr orgData) + Ptr orgData) { NS_LOG_FUNCTION (this << header << *orgData); SendDestUnreach (header, orgData, Icmpv4DestinationUnreachable::PORT_UNREACHABLE, 0); } void Icmpv4L4Protocol::SendDestUnreach (Ipv4Header header, Ptr orgData, - uint8_t code, uint16_t nextHopMtu) + uint8_t code, uint16_t nextHopMtu) { NS_LOG_FUNCTION (this << header << *orgData << (uint32_t) code << nextHopMtu); Ptr p = Create (); @@ -161,9 +162,9 @@ Icmpv4L4Protocol::SendTimeExceededTtl (Ipv4Header header, Ptr orgD void Icmpv4L4Protocol::HandleEcho (Ptr p, - Icmpv4Header header, - Ipv4Address source, - Ipv4Address destination) + Icmpv4Header header, + Ipv4Address source, + Ipv4Address destination) { NS_LOG_FUNCTION (this << p << header << source << destination); @@ -175,22 +176,22 @@ Icmpv4L4Protocol::HandleEcho (Ptr p, } void Icmpv4L4Protocol::Forward (Ipv4Address source, Icmpv4Header icmp, - uint32_t info, Ipv4Header ipHeader, - const uint8_t payload[8]) + uint32_t info, Ipv4Header ipHeader, + const uint8_t payload[8]) { Ptr ipv4 = m_node->GetObject (); Ptr l4 = ipv4->GetProtocol (ipHeader.GetProtocol ()); if (l4 != 0) { l4->ReceiveIcmp (source, ipHeader.GetTtl (), icmp.GetType (), icmp.GetCode (), - info, ipHeader.GetSource (), ipHeader.GetDestination (), payload); + info, ipHeader.GetSource (), ipHeader.GetDestination (), payload); } } void Icmpv4L4Protocol::HandleDestUnreach (Ptr p, - Icmpv4Header icmp, - Ipv4Address source, - Ipv4Address destination) + Icmpv4Header icmp, + Ipv4Address source, + Ipv4Address destination) { NS_LOG_FUNCTION (this << p << icmp << source << destination); @@ -203,9 +204,9 @@ Icmpv4L4Protocol::HandleDestUnreach (Ptr p, } void Icmpv4L4Protocol::HandleTimeExceeded (Ptr p, - Icmpv4Header icmp, - Ipv4Address source, - Ipv4Address destination) + Icmpv4Header icmp, + Ipv4Address source, + Ipv4Address destination) { NS_LOG_FUNCTION (this << p << icmp << source << destination); @@ -221,26 +222,26 @@ Icmpv4L4Protocol::HandleTimeExceeded (Ptr p, enum Ipv4L4Protocol::RxStatus Icmpv4L4Protocol::Receive(Ptr p, Ipv4Header const &header, - Ptr incomingInterface) + Ptr incomingInterface) { NS_LOG_FUNCTION (this << p << header << incomingInterface); Icmpv4Header icmp; p->RemoveHeader (icmp); switch (icmp.GetType ()) { - case Icmpv4Header::ECHO: - HandleEcho (p, icmp, header.GetSource (), header.GetDestination ()); - break; - case Icmpv4Header::DEST_UNREACH: - HandleDestUnreach (p, icmp, header.GetSource (), header.GetDestination ()); - break; - case Icmpv4Header::TIME_EXCEEDED: - HandleTimeExceeded (p, icmp, header.GetSource (), header.GetDestination ()); - break; - default: - NS_LOG_DEBUG (icmp << " " << *p); - break; - } + case Icmpv4Header::ECHO: + HandleEcho (p, icmp, header.GetSource (), header.GetDestination ()); + break; + case Icmpv4Header::DEST_UNREACH: + HandleDestUnreach (p, icmp, header.GetSource (), header.GetDestination ()); + break; + case Icmpv4Header::TIME_EXCEEDED: + HandleTimeExceeded (p, icmp, header.GetSource (), header.GetDestination ()); + break; + default: + NS_LOG_DEBUG (icmp << " " << *p); + break; + } return Ipv4L4Protocol::RX_OK; } void diff --git a/src/internet/model/icmpv4-l4-protocol.h b/src/internet/model/icmpv4-l4-protocol.h index 0d42e6363..9571cd7f2 100644 --- a/src/internet/model/icmpv4-l4-protocol.h +++ b/src/internet/model/icmpv4-l4-protocol.h @@ -26,7 +26,7 @@ public: virtual int GetProtocolNumber (void) const; virtual enum Ipv4L4Protocol::RxStatus Receive(Ptr p, Ipv4Header const &header, - Ptr incomingInterface); + Ptr incomingInterface); void SendDestUnreachFragNeeded (Ipv4Header header, Ptr orgData, uint16_t nextHopMtu); void SendTimeExceededTtl (Ipv4Header header, Ptr orgData); @@ -44,24 +44,24 @@ protected: virtual void NotifyNewAggregate (); private: void HandleEcho (Ptr p, - Icmpv4Header header, - Ipv4Address source, - Ipv4Address destination); + Icmpv4Header header, + Ipv4Address source, + Ipv4Address destination); void HandleDestUnreach (Ptr p, - Icmpv4Header header, - Ipv4Address source, - Ipv4Address destination); + Icmpv4Header header, + Ipv4Address source, + Ipv4Address destination); void HandleTimeExceeded (Ptr p, - Icmpv4Header icmp, - Ipv4Address source, - Ipv4Address destination); + Icmpv4Header icmp, + Ipv4Address source, + Ipv4Address destination); void SendDestUnreach (Ipv4Header header, Ptr orgData, - uint8_t code, uint16_t nextHopMtu); + uint8_t code, uint16_t nextHopMtu); void SendMessage (Ptr packet, Ipv4Address dest, uint8_t type, uint8_t code); void SendMessage (Ptr packet, Ipv4Address source, Ipv4Address dest, uint8_t type, uint8_t code, Ptr route); void Forward (Ipv4Address source, Icmpv4Header icmp, - uint32_t info, Ipv4Header ipHeader, - const uint8_t payload[8]); + uint32_t info, Ipv4Header ipHeader, + const uint8_t payload[8]); virtual void DoDispose (void); diff --git a/src/internet/model/icmpv4.cc b/src/internet/model/icmpv4.cc index 3b437520d..1d69d65ca 100644 --- a/src/internet/model/icmpv4.cc +++ b/src/internet/model/icmpv4.cc @@ -35,32 +35,34 @@ Icmpv4Header::GetTypeId (void) static TypeId tid = TypeId ("ns3::Icmpv4Header") .SetParent
() .AddConstructor () - ; + ; return tid; } Icmpv4Header::Icmpv4Header () : m_type (0), m_code (0), m_calcChecksum (false) -{} +{ +} Icmpv4Header::~Icmpv4Header () -{} -void +{ +} +void Icmpv4Header::EnableChecksum (void) { m_calcChecksum = true; } -TypeId +TypeId Icmpv4Header::GetInstanceTypeId (void) const { return GetTypeId (); } -uint32_t +uint32_t Icmpv4Header::GetSerializedSize (void) const { return 4; } -void +void Icmpv4Header::Serialize (Buffer::Iterator start) const { Buffer::Iterator i = start; @@ -75,7 +77,7 @@ Icmpv4Header::Serialize (Buffer::Iterator start) const i.Next (2); i.WriteU16 (checksum); } - + } uint32_t Icmpv4Header::Deserialize (Buffer::Iterator start) @@ -174,7 +176,7 @@ Icmpv4Echo::GetTypeId (void) static TypeId tid = TypeId ("ns3::Icmpv4Echo") .SetParent
() .AddConstructor () - ; + ; return tid; } Icmpv4Echo::Icmpv4Echo () @@ -246,7 +248,7 @@ Icmpv4DestinationUnreachable::GetTypeId (void) static TypeId tid = TypeId ("ns3::Icmpv4DestinationUnreachable") .SetParent
() .AddConstructor () - ; + ; return tid; } Icmpv4DestinationUnreachable::Icmpv4DestinationUnreachable () @@ -293,18 +295,19 @@ Icmpv4DestinationUnreachable::GetHeader (void) const Icmpv4DestinationUnreachable::~Icmpv4DestinationUnreachable () -{} -TypeId +{ +} +TypeId Icmpv4DestinationUnreachable::GetInstanceTypeId (void) const { return GetTypeId (); } -uint32_t +uint32_t Icmpv4DestinationUnreachable::GetSerializedSize (void) const { return 4 + m_header.GetSerializedSize () + 8; } -void +void Icmpv4DestinationUnreachable::Serialize (Buffer::Iterator start) const { start.WriteU16 (0); @@ -314,7 +317,7 @@ Icmpv4DestinationUnreachable::Serialize (Buffer::Iterator start) const start.Next (size); start.Write (m_data, 8); } - + uint32_t Icmpv4DestinationUnreachable::Deserialize (Buffer::Iterator start) { @@ -338,9 +341,9 @@ Icmpv4DestinationUnreachable::Print (std::ostream &os) const { os << (uint32_t) m_data[i]; if (i != 8) - { - os << " "; - } + { + os << " "; + } } } @@ -356,7 +359,7 @@ Icmpv4TimeExceeded::GetTypeId (void) static TypeId tid = TypeId ("ns3::Icmpv4TimeExceeded") .SetParent
() .AddConstructor () - ; + ; return tid; } Icmpv4TimeExceeded::Icmpv4TimeExceeded () @@ -393,18 +396,19 @@ Icmpv4TimeExceeded::GetHeader (void) const Icmpv4TimeExceeded::~Icmpv4TimeExceeded () -{} -TypeId +{ +} +TypeId Icmpv4TimeExceeded::GetInstanceTypeId (void) const { return GetTypeId (); } -uint32_t +uint32_t Icmpv4TimeExceeded::GetSerializedSize (void) const { return 4 + m_header.GetSerializedSize () + 8; } -void +void Icmpv4TimeExceeded::Serialize (Buffer::Iterator start) const { start.WriteU32 (0); @@ -413,7 +417,7 @@ Icmpv4TimeExceeded::Serialize (Buffer::Iterator start) const start.Next (size); start.Write (m_data, 8); } - + uint32_t Icmpv4TimeExceeded::Deserialize (Buffer::Iterator start) { @@ -436,9 +440,9 @@ Icmpv4TimeExceeded::Print (std::ostream &os) const { os << (uint32_t) m_data[i]; if (i != 8) - { - os << " "; - } + { + os << " "; + } } } diff --git a/src/internet/model/icmpv6-header.cc b/src/internet/model/icmpv6-header.cc index 54ab4b126..d5afb1885 100644 --- a/src/internet/model/icmpv6-header.cc +++ b/src/internet/model/icmpv6-header.cc @@ -38,7 +38,7 @@ TypeId Icmpv6Header::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6Header") .SetParent
() .AddConstructor () - ; + ; return tid; } @@ -49,9 +49,9 @@ TypeId Icmpv6Header::GetInstanceTypeId () const Icmpv6Header::Icmpv6Header () : m_calcChecksum (true), - m_checksum (0), - m_type (0), - m_code (0) + m_checksum (0), + m_type (0), + m_code (0) { } @@ -172,7 +172,7 @@ TypeId Icmpv6NS::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6NS") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -275,7 +275,7 @@ TypeId Icmpv6NA::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6NA") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -441,7 +441,7 @@ TypeId Icmpv6RA::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6RA") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -637,7 +637,7 @@ TypeId Icmpv6RS::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6RS") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -719,7 +719,7 @@ TypeId Icmpv6Redirection::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6Redirection") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -730,8 +730,8 @@ TypeId Icmpv6Redirection::GetInstanceTypeId () const Icmpv6Redirection::Icmpv6Redirection () : m_target (Ipv6Address ("")), - m_destination (Ipv6Address ("")), - m_reserved (0) + m_destination (Ipv6Address ("")), + m_reserved (0) { SetType (ICMPV6_ND_REDIRECTION); SetCode (0); @@ -836,7 +836,7 @@ TypeId Icmpv6Echo::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6Echo") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -890,8 +890,8 @@ void Icmpv6Echo::SetSeq (uint16_t seq) void Icmpv6Echo::Print (std::ostream& os) const { os << "( type = " << (GetType () == 128 ? "128 (Request)" : "129 (Reply)") << - " code = " << (uint32_t)GetCode () << - " checksum = " << (uint32_t)GetChecksum () << ")"; + " code = " << (uint32_t)GetCode () << + " checksum = " << (uint32_t)GetChecksum () << ")"; } uint32_t Icmpv6Echo::GetSerializedSize () const @@ -941,7 +941,7 @@ TypeId Icmpv6DestinationUnreachable::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6DestinationUnreachable") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -1028,7 +1028,7 @@ TypeId Icmpv6TooBig::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6TooBig") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -1039,7 +1039,7 @@ TypeId Icmpv6TooBig::GetInstanceTypeId () const Icmpv6TooBig::Icmpv6TooBig () : m_packet (0), - m_mtu (0) + m_mtu (0) { SetType (ICMPV6_ERROR_PACKET_TOO_BIG); } @@ -1126,7 +1126,7 @@ TypeId Icmpv6TimeExceeded::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6TimeExceeded") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -1213,7 +1213,7 @@ TypeId Icmpv6ParameterError::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6ParameterError") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -1224,7 +1224,7 @@ TypeId Icmpv6ParameterError::GetInstanceTypeId () const Icmpv6ParameterError::Icmpv6ParameterError () : m_packet (0), - m_ptr (0) + m_ptr (0) { SetType (ICMPV6_ERROR_PARAMETER_ERROR); } @@ -1311,7 +1311,7 @@ TypeId Icmpv6OptionHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6OptionHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } @@ -1382,7 +1382,7 @@ TypeId Icmpv6OptionMtu::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6OptionMtu") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -1466,7 +1466,7 @@ TypeId Icmpv6OptionPrefixInformation::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6OptionPrefixInformation") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -1619,7 +1619,7 @@ TypeId Icmpv6OptionLinkLayerAddress::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6OptionLinkLayerAddress") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -1706,7 +1706,7 @@ TypeId Icmpv6OptionRedirected::GetTypeId () static TypeId tid = TypeId ("ns3::Icmpv6OptionRedirected") .SetParent () .AddConstructor () - ; + ; return tid; } diff --git a/src/internet/model/icmpv6-l4-protocol.cc b/src/internet/model/icmpv6-l4-protocol.cc index 47f6b1689..3f059b9a5 100644 --- a/src/internet/model/icmpv6-l4-protocol.cc +++ b/src/internet/model/icmpv6-l4-protocol.cc @@ -72,7 +72,7 @@ TypeId Icmpv6L4Protocol::GetTypeId () BooleanValue (true), MakeBooleanAccessor (&Icmpv6L4Protocol::m_alwaysDad), MakeBooleanChecker ()) - ; + ; return tid; } @@ -127,7 +127,7 @@ void Icmpv6L4Protocol::SetNode (Ptr node) { NS_LOG_FUNCTION (this << node); m_node = node; -} +} uint16_t Icmpv6L4Protocol::GetStaticProtocolNumber () { @@ -167,7 +167,7 @@ void Icmpv6L4Protocol::DoDAD (Ipv6Address target, Ptr interface) /* TODO : disable multicast loopback to prevent NS probing to be received by the sender */ - Ptr p = ForgeNS ("::" ,Ipv6Address::MakeSolicitedAddress (target), target, interface->GetDevice ()->GetAddress ()); + Ptr p = ForgeNS ("::",Ipv6Address::MakeSolicitedAddress (target), target, interface->GetDevice ()->GetAddress ()); /* update last packet UID */ interface->SetNsDadUid (target, p->GetUid ()); @@ -284,7 +284,7 @@ void Icmpv6L4Protocol::HandleRA (Ptr packet, Ipv6Address const &src, Ipv /* take in account the first LLA option */ if (!hasLla) { - p->RemoveHeader (llaHdr); + p->RemoveHeader (llaHdr); ReceiveLLA (llaHdr, src, dst, interface); hasLla = true; } @@ -311,9 +311,9 @@ void Icmpv6L4Protocol::ReceiveLLA (Icmpv6OptionLinkLayerAddress lla, Ipv6Address entry = cache->Add (src); entry->SetRouter (true); entry->SetMacAddress (lla.GetAddress ()); - entry->MarkReachable (); - entry->StartReachableTimer (); - } + entry->MarkReachable (); + entry->StartReachableTimer (); + } else { std::list > waiting; @@ -338,7 +338,7 @@ void Icmpv6L4Protocol::ReceiveLLA (Icmpv6OptionLinkLayerAddress lla, Ipv6Address entry->SetMacAddress (lla.GetAddress ()); entry->MarkStale (); entry->SetRouter (true); - } + } else { if (!entry->IsReachable ()) @@ -355,7 +355,7 @@ void Icmpv6L4Protocol::ReceiveLLA (Icmpv6OptionLinkLayerAddress lla, Ipv6Address } entry->StopReachableTimer (); entry->StartReachableTimer (); - } + } } } } @@ -904,7 +904,7 @@ void Icmpv6L4Protocol::SendErrorTooBig (Ptr malformedPacket, Ipv6Address NS_LOG_LOGIC ("Send Too Big ( to " << dst << " )"); /* 48 = sizeof IPv6 header + sizeof ICMPv6 error header */ - if (malformedPacketSize <= 1280 - 48) + if (malformedPacketSize <= 1280 - 48) { header.SetPacket (malformedPacket); } diff --git a/src/internet/model/ipv4-address-generator.cc b/src/internet/model/ipv4-address-generator.cc index 827475038..c6dbfa858 100644 --- a/src/internet/model/ipv4-address-generator.cc +++ b/src/internet/model/ipv4-address-generator.cc @@ -34,7 +34,7 @@ public: virtual ~Ipv4AddressGeneratorImpl (); void Init (const Ipv4Address net, const Ipv4Mask mask, - const Ipv4Address addr); + const Ipv4Address addr); Ipv4Address GetNetwork (const Ipv4Mask mask) const; Ipv4Address NextNetwork (const Ipv4Mask mask); @@ -55,7 +55,7 @@ private: class NetworkState { - public: +public: uint32_t mask; uint32_t shift; uint32_t network; @@ -67,7 +67,7 @@ private: class Entry { - public: +public: uint32_t addrLow; uint32_t addrHigh; }; @@ -83,7 +83,7 @@ Ipv4AddressGeneratorImpl::Ipv4AddressGeneratorImpl () Reset (); } - void +void Ipv4AddressGeneratorImpl::Reset (void) { NS_LOG_FUNCTION_NOARGS (); @@ -127,7 +127,7 @@ Ipv4AddressGeneratorImpl::~Ipv4AddressGeneratorImpl () NS_LOG_FUNCTION_NOARGS (); } - void +void Ipv4AddressGeneratorImpl::Init ( const Ipv4Address net, const Ipv4Mask mask, @@ -161,7 +161,7 @@ Ipv4AddressGeneratorImpl::Init ( return; } - Ipv4Address +Ipv4Address Ipv4AddressGeneratorImpl::GetNetwork ( const Ipv4Mask mask) const { @@ -171,7 +171,7 @@ Ipv4AddressGeneratorImpl::GetNetwork ( return Ipv4Address (m_netTable[index].network << m_netTable[index].shift); } - Ipv4Address +Ipv4Address Ipv4AddressGeneratorImpl::NextNetwork ( const Ipv4Mask mask) { @@ -190,7 +190,7 @@ Ipv4AddressGeneratorImpl::NextNetwork ( return Ipv4Address (m_netTable[index].network << m_netTable[index].shift); } - void +void Ipv4AddressGeneratorImpl::InitAddress ( const Ipv4Address addr, const Ipv4Mask mask) @@ -204,7 +204,7 @@ Ipv4AddressGeneratorImpl::InitAddress ( m_netTable[index].addr = addrBits; } - Ipv4Address +Ipv4Address Ipv4AddressGeneratorImpl::GetAddress ( const Ipv4Mask mask) const { @@ -213,11 +213,11 @@ Ipv4AddressGeneratorImpl::GetAddress ( uint32_t index = MaskToIndex (mask); return Ipv4Address ( - (m_netTable[index].network << m_netTable[index].shift) | - m_netTable[index].addr); + (m_netTable[index].network << m_netTable[index].shift) | + m_netTable[index].addr); } - Ipv4Address +Ipv4Address Ipv4AddressGeneratorImpl::NextAddress (const Ipv4Mask mask) { NS_LOG_FUNCTION_NOARGS (); @@ -234,8 +234,8 @@ Ipv4AddressGeneratorImpl::NextAddress (const Ipv4Mask mask) "Ipv4AddressGeneratorImpl::NextAddress(): Address overflow"); Ipv4Address addr = Ipv4Address ( - (m_netTable[index].network << m_netTable[index].shift) | - m_netTable[index].addr); + (m_netTable[index].network << m_netTable[index].shift) | + m_netTable[index].addr); ++m_netTable[index].addr; // @@ -246,7 +246,7 @@ Ipv4AddressGeneratorImpl::NextAddress (const Ipv4Mask mask) return addr; } - bool +bool Ipv4AddressGeneratorImpl::AddAllocated (const Ipv4Address address) { NS_LOG_FUNCTION_NOARGS (); @@ -260,7 +260,7 @@ Ipv4AddressGeneratorImpl::AddAllocated (const Ipv4Address address) for (i = m_entries.begin (); i != m_entries.end (); ++i) { NS_LOG_LOGIC ("examine entry: " << Ipv4Address ((*i).addrLow) << - " to " << Ipv4Address ((*i).addrHigh)); + " to " << Ipv4Address ((*i).addrHigh)); // // First things first. Is there an address collision -- that is, does the // new address fall in a previously allocated block of addresses. @@ -273,7 +273,7 @@ Ipv4AddressGeneratorImpl::AddAllocated (const Ipv4Address address) NS_FATAL_ERROR ("Ipv4AddressGeneratorImpl::Add(): Address Collision: " << Ipv4Address (addr)); } return false; - } + } // // If the new address is less than the lowest address in the current block, // and can't be merged into to the current block, then insert it as a new @@ -300,7 +300,7 @@ Ipv4AddressGeneratorImpl::AddAllocated (const Ipv4Address address) if (addr == (*j).addrLow) { NS_LOG_LOGIC ("Ipv4AddressGeneratorImpl::Add(): " - "Address Collision: " << Ipv4Address (addr)); + "Address Collision: " << Ipv4Address (addr)); if (!m_test) { NS_FATAL_ERROR ("Ipv4AddressGeneratorImpl::Add(): Address Collision: " << Ipv4Address (addr)); @@ -308,7 +308,7 @@ Ipv4AddressGeneratorImpl::AddAllocated (const Ipv4Address address) return false; } } - + NS_LOG_LOGIC ("New addrHigh = " << Ipv4Address (addr)); (*i).addrHigh = addr; return true; @@ -334,14 +334,14 @@ Ipv4AddressGeneratorImpl::AddAllocated (const Ipv4Address address) return true; } - void +void Ipv4AddressGeneratorImpl::TestMode (void) { NS_LOG_FUNCTION_NOARGS (); m_test = true; } - uint32_t +uint32_t Ipv4AddressGeneratorImpl::MaskToIndex (Ipv4Mask mask) const { // @@ -371,7 +371,7 @@ Ipv4AddressGeneratorImpl::MaskToIndex (Ipv4Mask mask) const return 0; } - void +void Ipv4AddressGenerator::Init ( const Ipv4Address net, const Ipv4Mask mask, @@ -380,28 +380,28 @@ Ipv4AddressGenerator::Init ( NS_LOG_FUNCTION_NOARGS (); SimulationSingleton::Get () - ->Init (net, mask, addr); + ->Init (net, mask, addr); } - Ipv4Address +Ipv4Address Ipv4AddressGenerator::NextNetwork (const Ipv4Mask mask) { NS_LOG_FUNCTION_NOARGS (); return SimulationSingleton::Get () - ->NextNetwork (mask); + ->NextNetwork (mask); } - Ipv4Address +Ipv4Address Ipv4AddressGenerator::GetNetwork (const Ipv4Mask mask) { NS_LOG_FUNCTION_NOARGS (); return SimulationSingleton::Get () - ->GetNetwork (mask); + ->GetNetwork (mask); } - void +void Ipv4AddressGenerator::InitAddress ( const Ipv4Address addr, const Ipv4Mask mask) @@ -409,52 +409,52 @@ Ipv4AddressGenerator::InitAddress ( NS_LOG_FUNCTION_NOARGS (); SimulationSingleton::Get () - ->InitAddress (addr, mask); + ->InitAddress (addr, mask); } - Ipv4Address +Ipv4Address Ipv4AddressGenerator::GetAddress (const Ipv4Mask mask) { NS_LOG_FUNCTION_NOARGS (); return SimulationSingleton::Get () - ->GetAddress (mask); + ->GetAddress (mask); } - Ipv4Address +Ipv4Address Ipv4AddressGenerator::NextAddress (const Ipv4Mask mask) { NS_LOG_FUNCTION_NOARGS (); return SimulationSingleton::Get () - ->NextAddress (mask); + ->NextAddress (mask); } - void +void Ipv4AddressGenerator::Reset (void) { NS_LOG_FUNCTION_NOARGS (); return SimulationSingleton::Get () - ->Reset (); + ->Reset (); } - bool +bool Ipv4AddressGenerator::AddAllocated (const Ipv4Address addr) { NS_LOG_FUNCTION_NOARGS (); return SimulationSingleton::Get () - ->AddAllocated (addr); + ->AddAllocated (addr); } - void - Ipv4AddressGenerator::TestMode (void) +void +Ipv4AddressGenerator::TestMode (void) { NS_LOG_FUNCTION_NOARGS (); SimulationSingleton::Get () - ->TestMode (); + ->TestMode (); } } // namespace ns3 diff --git a/src/internet/model/ipv4-address-generator.h b/src/internet/model/ipv4-address-generator.h index da23abae5..50e1cb0ad 100644 --- a/src/internet/model/ipv4-address-generator.h +++ b/src/internet/model/ipv4-address-generator.h @@ -32,7 +32,7 @@ namespace ns3 { class Ipv4AddressGenerator { public: static void Init (const Ipv4Address net, const Ipv4Mask mask, - const Ipv4Address addr = "0.0.0.1"); + const Ipv4Address addr = "0.0.0.1"); static Ipv4Address NextNetwork (const Ipv4Mask mask); static Ipv4Address GetNetwork (const Ipv4Mask mask); diff --git a/src/internet/model/ipv4-end-point-demux.cc b/src/internet/model/ipv4-end-point-demux.cc index 075c6740b..99a94bb66 100644 --- a/src/internet/model/ipv4-end-point-demux.cc +++ b/src/internet/model/ipv4-end-point-demux.cc @@ -22,7 +22,7 @@ #include "ipv4-end-point.h" #include "ns3/log.h" -namespace ns3{ +namespace ns3 { NS_LOG_COMPONENT_DEFINE ("Ipv4EndPointDemux"); @@ -129,7 +129,7 @@ Ipv4EndPointDemux::Allocate (Ipv4Address address, uint16_t port) Ipv4EndPoint * Ipv4EndPointDemux::Allocate (Ipv4Address localAddress, uint16_t localPort, - Ipv4Address peerAddress, uint16_t peerPort) + Ipv4Address peerAddress, uint16_t peerPort) { NS_LOG_FUNCTION (this << localAddress << localPort << peerAddress << peerPort); for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) @@ -178,7 +178,7 @@ Ipv4EndPointDemux::GetAllEndPoints (void) EndPoints ret; for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) - { + { Ipv4EndPoint* endP = *i; ret.push_back(endP); } @@ -201,22 +201,22 @@ Ipv4EndPointDemux::Lookup (Ipv4Address daddr, uint16_t dport, EndPoints retval2; // Matches exact on local port/adder, wildcards on others EndPoints retval3; // Matches all but local address EndPoints retval4; // Exact match on all 4 - + NS_LOG_FUNCTION (this << daddr << dport << saddr << sport << incomingInterface); NS_LOG_DEBUG ("Looking up endpoint for destination address " << daddr); for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) { Ipv4EndPoint* endP = *i; NS_LOG_DEBUG ("Looking at endpoint dport=" << endP->GetLocalPort () - << " daddr=" << endP->GetLocalAddress () - << " sport=" << endP->GetPeerPort () - << " saddr=" << endP->GetPeerAddress ()); + << " daddr=" << endP->GetLocalAddress () + << " sport=" << endP->GetPeerPort () + << " saddr=" << endP->GetPeerAddress ()); if (endP->GetLocalPort () != dport) { NS_LOG_LOGIC ("Skipping endpoint " << &endP - << " because endpoint dport " - << endP->GetLocalPort () - << " does not match packet dport " << dport); + << " because endpoint dport " + << endP->GetLocalPort () + << " does not match packet dport " << dport); continue; } if (endP->GetBoundNetDevice ()) @@ -224,9 +224,9 @@ Ipv4EndPointDemux::Lookup (Ipv4Address daddr, uint16_t dport, if (endP->GetBoundNetDevice () != incomingInterface->GetDevice ()) { NS_LOG_LOGIC ("Skipping endpoint " << &endP - << " because endpoint is bound to specific device and" - << endP->GetBoundNetDevice () - << " does not match packet device " << incomingInterface->GetDevice ()); + << " because endpoint is bound to specific device and" + << endP->GetBoundNetDevice () + << " does not match packet device " << incomingInterface->GetDevice ()); continue; } } @@ -236,7 +236,7 @@ Ipv4EndPointDemux::Lookup (Ipv4Address daddr, uint16_t dport, { Ipv4InterfaceAddress addr = incomingInterface->GetAddress (i); if (addr.GetLocal ().CombineMask (addr.GetMask ()) == daddr.CombineMask (addr.GetMask ()) && - daddr.IsSubnetDirectedBroadcast (addr.GetMask ())) + daddr.IsSubnetDirectedBroadcast (addr.GetMask ())) { subnetDirected = true; incomingInterfaceAddr = addr.GetLocal (); @@ -272,7 +272,7 @@ Ipv4EndPointDemux::Lookup (Ipv4Address daddr, uint16_t dport, continue; if (!(remoteAddressMatchesExact || remoteAddressMatchesWildCard)) continue; - + // Now figure out which return list to add this one to if (localAddressMatchesWildCard && remotePeerMatchesWildCard && @@ -282,7 +282,7 @@ Ipv4EndPointDemux::Lookup (Ipv4Address daddr, uint16_t dport, } if ((localAddressMatchesExact || (isBroadcast && localAddressMatchesWildCard))&& remotePeerMatchesWildCard && - remoteAddressMatchesWildCard) + remoteAddressMatchesWildCard) { // Only local port and local address matches exactly retval2.push_back(endP); } @@ -333,11 +333,11 @@ Ipv4EndPointDemux::SimpleLookup (Ipv4Address daddr, uint32_t tmp = 0; if ((*i)->GetLocalAddress () == Ipv4Address::GetAny ()) { - tmp ++; + tmp++; } if ((*i)->GetPeerAddress () == Ipv4Address::GetAny ()) { - tmp ++; + tmp++; } if (tmp < genericity) { @@ -364,7 +364,7 @@ Ipv4EndPointDemux::AllocateEphemeralPort (void) { return port; } - } while (port != m_ephemeral); + } while (port != m_ephemeral); return 0; } diff --git a/src/internet/model/ipv4-end-point-demux.h b/src/internet/model/ipv4-end-point-demux.h index 02a225799..3fe4bd006 100644 --- a/src/internet/model/ipv4-end-point-demux.h +++ b/src/internet/model/ipv4-end-point-demux.h @@ -73,7 +73,7 @@ public: void DeAllocate (Ipv4EndPoint *endPoint); - private: +private: uint16_t AllocateEphemeralPort (void); uint16_t m_ephemeral; diff --git a/src/internet/model/ipv4-end-point.cc b/src/internet/model/ipv4-end-point.cc index 267ae7ee3..f8797802a 100644 --- a/src/internet/model/ipv4-end-point.cc +++ b/src/internet/model/ipv4-end-point.cc @@ -32,7 +32,8 @@ Ipv4EndPoint::Ipv4EndPoint (Ipv4Address address, uint16_t port) m_localPort (port), m_peerAddr (Ipv4Address::GetAny ()), m_peerPort (0) -{} +{ +} Ipv4EndPoint::~Ipv4EndPoint () { if (!m_destroyCallback.IsNull ()) @@ -85,7 +86,7 @@ Ipv4EndPoint::BindToNetDevice (Ptr netdevice) Ptr Ipv4EndPoint::GetBoundNetDevice (void) { - return m_boundnetdevice; + return m_boundnetdevice; } void diff --git a/src/internet/model/ipv4-end-point.h b/src/internet/model/ipv4-end-point.h index 4d134320c..d4c5c5306 100644 --- a/src/internet/model/ipv4-end-point.h +++ b/src/internet/model/ipv4-end-point.h @@ -56,7 +56,7 @@ public: uint16_t GetPeerPort (void); void SetPeer (Ipv4Address address, uint16_t port); - + void BindToNetDevice (Ptr netdevice); Ptr GetBoundNetDevice (void); diff --git a/src/internet/model/ipv4-global-routing.cc b/src/internet/model/ipv4-global-routing.cc index 5b4a85af4..d300ecb1e 100644 --- a/src/internet/model/ipv4-global-routing.cc +++ b/src/internet/model/ipv4-global-routing.cc @@ -51,13 +51,13 @@ Ipv4GlobalRouting::GetTypeId (void) BooleanValue(false), MakeBooleanAccessor (&Ipv4GlobalRouting::m_respondToInterfaceEvents), MakeBooleanChecker ()) - ; + ; return tid; } Ipv4GlobalRouting::Ipv4GlobalRouting () -: m_randomEcmpRouting (false), - m_respondToInterfaceEvents (false) + : m_randomEcmpRouting (false), + m_respondToInterfaceEvents (false) { NS_LOG_FUNCTION_NOARGS (); } @@ -97,9 +97,9 @@ Ipv4GlobalRouting::AddNetworkRouteTo (Ipv4Address network, NS_LOG_FUNCTION (network << networkMask << nextHop << interface); Ipv4RoutingTableEntry *route = new Ipv4RoutingTableEntry (); *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, - networkMask, - nextHop, - interface); + networkMask, + nextHop, + interface); m_networkRoutes.push_back (route); } @@ -111,8 +111,8 @@ Ipv4GlobalRouting::AddNetworkRouteTo (Ipv4Address network, NS_LOG_FUNCTION (network << networkMask << interface); Ipv4RoutingTableEntry *route = new Ipv4RoutingTableEntry (); *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, - networkMask, - interface); + networkMask, + interface); m_networkRoutes.push_back (route); } @@ -125,9 +125,9 @@ Ipv4GlobalRouting::AddASExternalRouteTo (Ipv4Address network, NS_LOG_FUNCTION (network << networkMask << nextHop); Ipv4RoutingTableEntry *route = new Ipv4RoutingTableEntry (); *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, - networkMask, - nextHop, - interface); + networkMask, + nextHop, + interface); m_ASexternalRoutes.push_back (route); } @@ -275,8 +275,8 @@ Ipv4GlobalRouting::GetRoute (uint32_t index) const if (index < m_networkRoutes.size()) { for (NetworkRoutesCI j = m_networkRoutes.begin (); - j != m_networkRoutes.end (); - j++) + j != m_networkRoutes.end (); + j++) { if (tmp == index) { @@ -290,13 +290,13 @@ Ipv4GlobalRouting::GetRoute (uint32_t index) const for (ASExternalRoutesCI k = m_ASexternalRoutes.begin (); k != m_ASexternalRoutes.end (); k++) - { - if (tmp == index) { - return *k; + if (tmp == index) + { + return *k; + } + tmp++; } - tmp++; - } NS_ASSERT (false); // quiet compiler. return 0; @@ -342,17 +342,17 @@ Ipv4GlobalRouting::RemoveRoute (uint32_t index) index -= m_networkRoutes.size (); tmp = 0; for (ASExternalRoutesI k = m_ASexternalRoutes.begin (); - k != m_ASexternalRoutes.end (); - k++) + k != m_ASexternalRoutes.end (); + k++) { if (tmp == index) - { - NS_LOG_LOGIC ("Removing route " << index << "; size = " << m_ASexternalRoutes.size()); - delete *k; - m_ASexternalRoutes.erase (k); - NS_LOG_LOGIC ("Done removing network route " << index << "; network route remaining size = " << m_networkRoutes.size()); - return; - } + { + NS_LOG_LOGIC ("Removing route " << index << "; size = " << m_ASexternalRoutes.size()); + delete *k; + m_ASexternalRoutes.erase (k); + NS_LOG_LOGIC ("Done removing network route " << index << "; network route remaining size = " << m_networkRoutes.size()); + return; + } tmp++; } NS_ASSERT (false); @@ -375,8 +375,8 @@ Ipv4GlobalRouting::DoDispose (void) delete (*j); } for (ASExternalRoutesI l = m_ASexternalRoutes.begin (); - l != m_ASexternalRoutes.end (); - l = m_ASexternalRoutes.erase (l)) + l != m_ASexternalRoutes.end (); + l = m_ASexternalRoutes.erase (l)) { delete (*l); } @@ -433,7 +433,7 @@ Ipv4GlobalRouting::PrintRoutingTable(Ptr stream) const Ptr Ipv4GlobalRouting::RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) -{ +{ // // First, see if this is a multicast packet we have a route for. If we @@ -462,7 +462,7 @@ Ipv4GlobalRouting::RouteOutput (Ptr p, const Ipv4Header &header, Ptr p, const Ipv4Header &header, Ptr idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) + LocalDeliverCallback lcb, ErrorCallback ecb) { NS_LOG_FUNCTION (this << p << header << header.GetSource () << header.GetDestination () << idev); @@ -597,4 +597,4 @@ Ipv4GlobalRouting::SetIpv4 (Ptr ipv4) } -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/ipv4-global-routing.h b/src/internet/model/ipv4-global-routing.h index 060aadaab..77dcd0474 100644 --- a/src/internet/model/ipv4-global-routing.h +++ b/src/internet/model/ipv4-global-routing.h @@ -85,8 +85,8 @@ public: virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb); virtual void NotifyInterfaceUp (uint32_t interface); virtual void NotifyInterfaceDown (uint32_t interface); virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); @@ -237,7 +237,7 @@ private: HostRoutes m_hostRoutes; NetworkRoutes m_networkRoutes; ASExternalRoutes m_ASexternalRoutes; // External routes imported - + Ptr m_ipv4; }; diff --git a/src/internet/model/ipv4-header.cc b/src/internet/model/ipv4-header.cc index 393921c4d..9ac20b492 100644 --- a/src/internet/model/ipv4-header.cc +++ b/src/internet/model/ipv4-header.cc @@ -40,31 +40,32 @@ Ipv4Header::Ipv4Header () m_fragmentOffset (0), m_checksum(0), m_goodChecksum (true) -{} +{ +} -void +void Ipv4Header::EnableChecksum (void) { m_calcChecksum = true; } -void +void Ipv4Header::SetPayloadSize (uint16_t size) { m_payloadSize = size; } -uint16_t +uint16_t Ipv4Header::GetPayloadSize (void) const { return m_payloadSize; } -uint16_t +uint16_t Ipv4Header::GetIdentification (void) const { return m_identification; } -void +void Ipv4Header::SetIdentification (uint16_t identification) { m_identification = identification; @@ -137,7 +138,7 @@ Ipv4Header::GetTtl (void) const { return m_ttl; } - + uint8_t Ipv4Header::GetProtocol (void) const { @@ -184,7 +185,7 @@ Ipv4Header::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv4Header") .SetParent
() .AddConstructor () - ; + ; return tid; } TypeId @@ -227,7 +228,7 @@ Ipv4Header::Print (std::ostream &os) const << "length: " << (m_payloadSize + 5 * 4) << " " << m_source << " > " << m_destination - ; + ; } uint32_t Ipv4Header::GetSerializedSize (void) const @@ -239,7 +240,7 @@ void Ipv4Header::Serialize (Buffer::Iterator start) const { Buffer::Iterator i = start; - + uint8_t verIhl = (4 << 4) | (5); i.WriteU8 (verIhl); i.WriteU8 (m_tos); diff --git a/src/internet/model/ipv4-header.h b/src/internet/model/ipv4-header.h index a64be7dec..6b949cff7 100644 --- a/src/internet/model/ipv4-header.h +++ b/src/internet/model/ipv4-header.h @@ -107,7 +107,7 @@ public: bool IsLastFragment (void) const; /** * \returns true if this is this packet can be fragmented. - */ + */ bool IsDontFragment (void) const; /** * \returns the offset of this fragment. @@ -129,7 +129,7 @@ public: * \returns the destination address of this packet */ Ipv4Address GetDestination (void) const; - + /** * \returns true if the ipv4 checksum is correct, false otherwise. * diff --git a/src/internet/model/ipv4-interface-address.cc b/src/internet/model/ipv4-interface-address.cc index e2cf0bc7d..a328aa14e 100644 --- a/src/internet/model/ipv4-interface-address.cc +++ b/src/internet/model/ipv4-interface-address.cc @@ -133,8 +133,8 @@ Ipv4InterfaceAddress::SetPrimary (void) std::ostream& operator<< (std::ostream& os, const Ipv4InterfaceAddress &addr) { os << "m_local=" << addr.GetLocal () << "; m_mask=" << - addr.GetMask () << "; m_broadcast=" << addr.GetBroadcast () << "; m_scope=" << addr.GetScope() << - "; m_secondary=" << addr.IsSecondary (); + addr.GetMask () << "; m_broadcast=" << addr.GetBroadcast () << "; m_scope=" << addr.GetScope() << + "; m_secondary=" << addr.IsSecondary (); return os; } diff --git a/src/internet/model/ipv4-interface-address.h b/src/internet/model/ipv4-interface-address.h index 7b51e170f..52117f7bb 100644 --- a/src/internet/model/ipv4-interface-address.h +++ b/src/internet/model/ipv4-interface-address.h @@ -62,11 +62,11 @@ public: void SetScope (Ipv4InterfaceAddress::InterfaceAddressScope_e scope); Ipv4InterfaceAddress::InterfaceAddressScope_e GetScope (void) const; - + bool IsSecondary (void) const; void SetSecondary (void); void SetPrimary (void); - + private: Ipv4Address m_local; // Interface address @@ -75,7 +75,7 @@ private: Ipv4Mask m_mask; // Network mask Ipv4Address m_broadcast; // Broadcast address - InterfaceAddressScope_e m_scope; + InterfaceAddressScope_e m_scope; bool m_secondary; // For use in multihoming friend bool operator == (Ipv4InterfaceAddress const &a, Ipv4InterfaceAddress const &b); @@ -87,12 +87,12 @@ std::ostream& operator<< (std::ostream& os, const Ipv4InterfaceAddress &addr); inline bool operator == (const Ipv4InterfaceAddress &a, const Ipv4InterfaceAddress &b) { return (a.m_local == b.m_local && a.m_mask == b.m_mask && - a.m_broadcast == b.m_broadcast && a.m_scope == b.m_scope && a.m_secondary == b.m_secondary); + a.m_broadcast == b.m_broadcast && a.m_scope == b.m_scope && a.m_secondary == b.m_secondary); } inline bool operator != (const Ipv4InterfaceAddress &a, const Ipv4InterfaceAddress &b) { return (a.m_local != b.m_local || a.m_mask != b.m_mask || - a.m_broadcast != b.m_broadcast || a.m_scope != b.m_scope || a.m_secondary != b.m_secondary); + a.m_broadcast != b.m_broadcast || a.m_scope != b.m_scope || a.m_secondary != b.m_secondary); } diff --git a/src/internet/model/ipv4-interface.cc b/src/internet/model/ipv4-interface.cc index c64a47832..9dc53ed12 100644 --- a/src/internet/model/ipv4-interface.cc +++ b/src/internet/model/ipv4-interface.cc @@ -47,8 +47,8 @@ Ipv4Interface::GetTypeId (void) MakePointerAccessor (&Ipv4Interface::SetArpCache, &Ipv4Interface::GetArpCache), MakePointerChecker ()) - ; - ; + ; + ; return tid; } @@ -213,7 +213,7 @@ Ipv4Interface::Send (Ptr p, Ipv4Address dest) if (dest == (*i).GetLocal ()) { Ptr ipv4 = m_node->GetObject (); - + ipv4->Receive (m_device, p, Ipv4L3Protocol::PROT_NUMBER, m_device->GetBroadcast (), m_device->GetBroadcast (), @@ -238,8 +238,8 @@ Ipv4Interface::Send (Ptr p, Ipv4Address dest) { NS_LOG_LOGIC ("IsMulticast"); NS_ASSERT_MSG(m_device->IsMulticast (), - "ArpIpv4Interface::SendTo (): Sending multicast packet over " - "non-multicast device"); + "ArpIpv4Interface::SendTo (): Sending multicast packet over " + "non-multicast device"); hardwareDestination = m_device->GetMulticast(dest); found = true; @@ -266,8 +266,8 @@ Ipv4Interface::Send (Ptr p, Ipv4Address dest) if (found) { NS_LOG_LOGIC ("Address Resolved. Send."); - m_device ->Send (p, hardwareDestination, - Ipv4L3Protocol::PROT_NUMBER); + m_device->Send (p, hardwareDestination, + Ipv4L3Protocol::PROT_NUMBER); } } else @@ -332,7 +332,8 @@ Ipv4Interface::RemoveAddress (uint32_t index) m_ifaddrs.erase (i); return addr; } - ++tmp; + ++tmp; + ++i; } NS_ASSERT_MSG (false, "Address " << index << " not found"); Ipv4InterfaceAddress addr; diff --git a/src/internet/model/ipv4-interface.h b/src/internet/model/ipv4-interface.h index 671d58f07..7e9e1646c 100644 --- a/src/internet/model/ipv4-interface.h +++ b/src/internet/model/ipv4-interface.h @@ -66,7 +66,7 @@ public: * \return ARP cache used by this interface */ Ptr GetArpCache () const; - + /** * \param metric configured routing metric (cost) of this interface * @@ -114,7 +114,7 @@ public: * \returns true if this interface is enabled for IP forwarding of input datagrams */ bool IsForwarding (void) const; - + /** * \param val Whether to enable or disable IP forwarding for input datagrams */ diff --git a/src/internet/model/ipv4-l3-protocol.cc b/src/internet/model/ipv4-l3-protocol.cc index eefcbb5b1..92d6c1e5c 100644 --- a/src/internet/model/ipv4-l3-protocol.cc +++ b/src/internet/model/ipv4-l3-protocol.cc @@ -60,7 +60,7 @@ Ipv4L3Protocol::GetTypeId (void) MakeUintegerAccessor (&Ipv4L3Protocol::m_defaultTtl), MakeUintegerChecker ()) .AddTraceSource ("Tx", "Send ipv4 packet to outgoing interface.", - MakeTraceSourceAccessor (&Ipv4L3Protocol::m_txTrace)) + MakeTraceSourceAccessor (&Ipv4L3Protocol::m_txTrace)) .AddTraceSource ("Rx", "Receive ipv4 packet from incoming interface.", MakeTraceSourceAccessor (&Ipv4L3Protocol::m_rxTrace)) .AddTraceSource ("Drop", "Drop ipv4 packet", @@ -77,7 +77,7 @@ Ipv4L3Protocol::GetTypeId (void) .AddTraceSource ("LocalDeliver", "An IPv4 packet was received by/for this node, and it is being forward up the stack", MakeTraceSourceAccessor (&Ipv4L3Protocol::m_localDeliverTrace)) - ; + ; return tid; } @@ -103,9 +103,9 @@ Ipv4L3Protocol::GetProtocol(int protocolNumber) const for (L4List_t::const_iterator i = m_protocols.begin(); i != m_protocols.end(); ++i) { if ((*i)->GetProtocolNumber () == protocolNumber) - { - return *i; - } + { + return *i; + } } return 0; } @@ -242,7 +242,7 @@ Ipv4L3Protocol::SetDefaultTtl (uint8_t ttl) { m_defaultTtl = ttl; } - + uint32_t Ipv4L3Protocol::AddInterface (Ptr device) { @@ -416,7 +416,7 @@ Ipv4L3Protocol::Receive( Ptr device, Ptr p, uint16_t pr NS_LOG_FUNCTION (this << &device << p << protocol << from); NS_LOG_LOGIC ("Packet from " << from << " received on node " << - m_node->GetId ()); + m_node->GetId ()); uint32_t interface = 0; Ptr packet = p->Copy (); @@ -473,12 +473,12 @@ Ipv4L3Protocol::Receive( Ptr device, Ptr p, uint16_t pr } NS_ASSERT_MSG (m_routingProtocol != 0, "Need a routing protocol object to process packets"); - if (! m_routingProtocol->RouteInput (packet, ipHeader, device, - MakeCallback (&Ipv4L3Protocol::IpForward, this), - MakeCallback (&Ipv4L3Protocol::IpMulticastForward, this), - MakeCallback (&Ipv4L3Protocol::LocalDeliver, this), - MakeCallback (&Ipv4L3Protocol::RouteInputError, this) - )) + if (!m_routingProtocol->RouteInput (packet, ipHeader, device, + MakeCallback (&Ipv4L3Protocol::IpForward, this), + MakeCallback (&Ipv4L3Protocol::IpMulticastForward, this), + MakeCallback (&Ipv4L3Protocol::LocalDeliver, this), + MakeCallback (&Ipv4L3Protocol::RouteInputError, this) + )) { NS_LOG_WARN ("No route found for forwarding packet. Drop."); m_dropTrace (ipHeader, packet, DROP_NO_ROUTE, m_node->GetObject (), interface); @@ -509,8 +509,8 @@ Ipv4L3Protocol::IsUnicast (Ipv4Address ad, Ipv4Mask interfaceMask) const void Ipv4L3Protocol::SendWithHeader (Ptr packet, - Ipv4Header ipHeader, - Ptr route) + Ipv4Header ipHeader, + Ptr route) { NS_LOG_FUNCTION (this << packet << ipHeader << route); SendRealOut (route, packet, ipHeader); @@ -518,10 +518,10 @@ Ipv4L3Protocol::SendWithHeader (Ptr packet, void Ipv4L3Protocol::Send (Ptr packet, - Ipv4Address source, - Ipv4Address destination, - uint8_t protocol, - Ptr route) + Ipv4Address source, + Ipv4Address destination, + uint8_t protocol, + Ptr route) { NS_LOG_FUNCTION (this << packet << source << destination << uint32_t(protocol) << route); @@ -541,7 +541,7 @@ Ipv4L3Protocol::Send (Ptr packet, // 3) packet is not broadcast, and is passed in with a route entry // 4) packet is not broadcast, and is passed in with a route entry but route->GetGateway is not set (e.g., on-demand) // 5) packet is not broadcast, and route is NULL (e.g., a raw socket call, or ICMP) - + // 1) packet is destined to limited broadcast address or link-local multicast address if (destination.IsBroadcast () || destination.IsLocalMulticast ()) { @@ -567,7 +567,7 @@ Ipv4L3Protocol::Send (Ptr packet, // 2) check: packet is destined to a subnet-directed broadcast address uint32_t ifaceIndex = 0; for (Ipv4InterfaceList::iterator ifaceIter = m_interfaces.begin (); - ifaceIter != m_interfaces.end (); ifaceIter++, ifaceIndex++) + ifaceIter != m_interfaces.end (); ifaceIter++, ifaceIndex++) { Ptr outInterface = *ifaceIter; for (uint32_t j = 0; j < GetNAddresses (ifaceIndex); j++) @@ -575,7 +575,7 @@ Ipv4L3Protocol::Send (Ptr packet, Ipv4InterfaceAddress ifAddr = GetAddress (ifaceIndex, j); NS_LOG_LOGIC ("Testing address " << ifAddr.GetLocal () << " with mask " << ifAddr.GetMask ()); if (destination.IsSubnetDirectedBroadcast (ifAddr.GetMask ()) && - destination.CombineMask (ifAddr.GetMask ()) == ifAddr.GetLocal ().CombineMask (ifAddr.GetMask ()) ) + destination.CombineMask (ifAddr.GetMask ()) == ifAddr.GetLocal ().CombineMask (ifAddr.GetMask ()) ) { NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 2: subnet directed bcast to " << ifAddr.GetLocal ()); ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment); @@ -606,7 +606,7 @@ Ipv4L3Protocol::Send (Ptr packet, // This could arise because the synchronous RouteOutput() call // returned to the transport protocol with a source address but // there was no next hop available yet (since a route may need - // to be queried). + // to be queried). NS_FATAL_ERROR ("Ipv4L3Protocol::Send case 4: This case not yet implemented"); } // 5) packet is not broadcast, and route is NULL (e.g., a raw socket call) @@ -641,12 +641,12 @@ Ipv4L3Protocol::Send (Ptr packet, // and whether that deviates from Linux Ipv4Header Ipv4L3Protocol::BuildHeader ( - Ipv4Address source, - Ipv4Address destination, - uint8_t protocol, - uint16_t payloadSize, - uint8_t ttl, - bool mayFragment) + Ipv4Address source, + Ipv4Address destination, + uint8_t protocol, + uint16_t payloadSize, + uint8_t ttl, + bool mayFragment) { NS_LOG_FUNCTION (this << source << destination << (uint16_t)protocol << payloadSize << (uint16_t)ttl << mayFragment); Ipv4Header ipHeader; @@ -659,14 +659,14 @@ Ipv4L3Protocol::BuildHeader ( { ipHeader.SetMayFragment (); ipHeader.SetIdentification (m_identification); - m_identification ++; + m_identification++; } else { ipHeader.SetDontFragment (); // TBD: set to zero here; will cause traces to change ipHeader.SetIdentification (m_identification); - m_identification ++; + m_identification++; } if (Node::ChecksumEnabled ()) { @@ -696,9 +696,9 @@ Ipv4L3Protocol::SendRealOut (Ptr route, NS_LOG_LOGIC ("Send via NetDevice ifIndex " << outDev->GetIfIndex () << " ipv4InterfaceIndex " << interface); NS_ASSERT_MSG (packet->GetSize () <= outInterface->GetDevice ()->GetMtu (), - "Packet size " << packet->GetSize () << " exceeds device MTU " - << outInterface->GetDevice ()->GetMtu () - << " for IPv4; fragmentation not supported"); + "Packet size " << packet->GetSize () << " exceeds device MTU " + << outInterface->GetDevice ()->GetMtu () + << " for IPv4; fragmentation not supported"); if (!route->GetGateway ().IsEqual (Ipv4Address ("0.0.0.0"))) { if (outInterface->IsUp ()) @@ -739,30 +739,32 @@ Ipv4L3Protocol::IpMulticastForward (Ptr mrtentry, PtrGetId ()); - // The output interfaces we could forward this onto are encoded - // in the OutputTtl of the Ipv4MulticastRoute - for (uint32_t i = 0; i < Ipv4MulticastRoute::MAX_INTERFACES; i++) + + std::map ttlMap = mrtentry->GetOutputTtlMap(); + std::map::iterator mapIter; + + for (mapIter = ttlMap.begin(); mapIter != ttlMap.end(); mapIter++) { - if (mrtentry->GetOutputTtl (i) < Ipv4MulticastRoute::MAX_TTL) + uint32_t interfaceId = mapIter->first; + //uint32_t outputTtl = mapIter->second; // Unused for now + + Ptr packet = p->Copy (); + Ipv4Header h = header; + h.SetTtl (header.GetTtl () - 1); + if (h.GetTtl () == 0) { - Ptr packet = p->Copy (); - Ipv4Header h = header; - h.SetTtl (header.GetTtl () - 1); - if (h.GetTtl () == 0) - { - NS_LOG_WARN ("TTL exceeded. Drop."); - m_dropTrace (header, packet, DROP_TTL_EXPIRED, m_node->GetObject (), i); - return; - } - NS_LOG_LOGIC ("Forward multicast via interface " << i); - Ptr rtentry = Create (); - rtentry->SetSource (h.GetSource ()); - rtentry->SetDestination (h.GetDestination ()); - rtentry->SetGateway (Ipv4Address::GetAny ()); - rtentry->SetOutputDevice (GetNetDevice (i)); - SendRealOut (rtentry, packet, h); - continue; + NS_LOG_WARN ("TTL exceeded. Drop."); + m_dropTrace (header, packet, DROP_TTL_EXPIRED, m_node->GetObject (), interfaceId); + return; } + NS_LOG_LOGIC ("Forward multicast via interface " << interfaceId); + Ptr rtentry = Create (); + rtentry->SetSource (h.GetSource ()); + rtentry->SetDestination (h.GetDestination ()); + rtentry->SetGateway (Ipv4Address::GetAny ()); + rtentry->SetOutputDevice (GetNetDevice (interfaceId)); + SendRealOut (rtentry, packet, h); + continue; } } @@ -781,8 +783,8 @@ Ipv4L3Protocol::IpForward (Ptr rtentry, Ptr p, const Ip { // Do not reply to ICMP or to multicast/broadcast IP address if (ipHeader.GetProtocol () != Icmpv4L4Protocol::PROT_NUMBER && - ipHeader.GetDestination ().IsBroadcast () == false && - ipHeader.GetDestination ().IsMulticast () == false) + ipHeader.GetDestination ().IsBroadcast () == false && + ipHeader.GetDestination ().IsMulticast () == false) { Ptr icmp = GetIcmp (); icmp->SendTimeExceededTtl (ipHeader, packet); @@ -812,34 +814,34 @@ Ipv4L3Protocol::LocalDeliver (Ptr packet, Ipv4Header const&ip, uin enum Ipv4L4Protocol::RxStatus status = protocol->Receive (p, ip, GetInterface (iif)); switch (status) { - case Ipv4L4Protocol::RX_OK: + case Ipv4L4Protocol::RX_OK: // fall through - case Ipv4L4Protocol::RX_ENDPOINT_CLOSED: + case Ipv4L4Protocol::RX_ENDPOINT_CLOSED: // fall through - case Ipv4L4Protocol::RX_CSUM_FAILED: - break; - case Ipv4L4Protocol::RX_ENDPOINT_UNREACH: - if (ip.GetDestination ().IsBroadcast () == true || - ip.GetDestination ().IsMulticast () == true) - { - break; // Do not reply to broadcast or multicast - } - // Another case to suppress ICMP is a subnet-directed broadcast - bool subnetDirected = false; - for (uint32_t i = 0; i < GetNAddresses (iif); i++) - { - Ipv4InterfaceAddress addr = GetAddress (iif, i); - if (addr.GetLocal ().CombineMask (addr.GetMask ()) == ip.GetDestination().CombineMask (addr.GetMask ()) && - ip.GetDestination ().IsSubnetDirectedBroadcast (addr.GetMask ())) - { - subnetDirected = true; - } - } - if (subnetDirected == false) - { - GetIcmp ()->SendDestUnreachPort (ip, copy); - } - } + case Ipv4L4Protocol::RX_CSUM_FAILED: + break; + case Ipv4L4Protocol::RX_ENDPOINT_UNREACH: + if (ip.GetDestination ().IsBroadcast () == true || + ip.GetDestination ().IsMulticast () == true) + { + break; // Do not reply to broadcast or multicast + } + // Another case to suppress ICMP is a subnet-directed broadcast + bool subnetDirected = false; + for (uint32_t i = 0; i < GetNAddresses (iif); i++) + { + Ipv4InterfaceAddress addr = GetAddress (iif, i); + if (addr.GetLocal ().CombineMask (addr.GetMask ()) == ip.GetDestination().CombineMask (addr.GetMask ()) && + ip.GetDestination ().IsSubnetDirectedBroadcast (addr.GetMask ())) + { + subnetDirected = true; + } + } + if (subnetDirected == false) + { + GetIcmp ()->SendDestUnreachPort (ip, copy); + } + } } } @@ -889,7 +891,7 @@ Ipv4L3Protocol::RemoveAddress (uint32_t i, uint32_t addressIndex) Ipv4Address Ipv4L3Protocol::SelectSourceAddress (Ptr device, - Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope) + Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope) { NS_LOG_FUNCTION (this << device << dst << scope); Ipv4Address addr ("0.0.0.0"); @@ -905,7 +907,7 @@ Ipv4L3Protocol::SelectSourceAddress (Ptr device, iaddr = GetAddress (i, j); if (iaddr.IsSecondary ()) continue; if (iaddr.GetScope () > scope) continue; - if (dst.CombineMask (iaddr.GetMask ()) == iaddr.GetLocal ().CombineMask (iaddr.GetMask ()) ) + if (dst.CombineMask (iaddr.GetMask ()) == iaddr.GetLocal ().CombineMask (iaddr.GetMask ()) ) { return iaddr.GetLocal (); } @@ -936,8 +938,8 @@ Ipv4L3Protocol::SelectSourceAddress (Ptr device, } } NS_LOG_WARN ("Could not find source address for " << dst << " and scope " - << scope << ", returning 0"); - return addr; + << scope << ", returning 0"); + return addr; } void @@ -1015,7 +1017,7 @@ Ipv4L3Protocol::SetForwarding (uint32_t i, bool val) Ptr Ipv4L3Protocol::GetNetDevice (uint32_t i) { - return GetInterface (i)-> GetDevice (); + return GetInterface (i)->GetDevice (); } void @@ -1055,4 +1057,4 @@ Ipv4L3Protocol::RouteInputError (Ptr p, const Ipv4Header & ipHeade m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, m_node->GetObject (), 0); } -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/ipv4-l3-protocol.h b/src/internet/model/ipv4-l3-protocol.h index c91a78ed8..6add4354b 100644 --- a/src/internet/model/ipv4-l3-protocol.h +++ b/src/internet/model/ipv4-l3-protocol.h @@ -78,13 +78,13 @@ public: * \brief Reason why a packet has been dropped. */ enum DropReason - { - DROP_TTL_EXPIRED = 1, /**< Packet TTL has expired */ - DROP_NO_ROUTE, /**< No route to host */ - DROP_BAD_CHECKSUM, /**< Bad checksum */ - DROP_INTERFACE_DOWN, /**< Interface is down so can not send packet */ - DROP_ROUTE_ERROR, /**< Route error */ - }; + { + DROP_TTL_EXPIRED = 1, /**< Packet TTL has expired */ + DROP_NO_ROUTE, /**< No route to host */ + DROP_BAD_CHECKSUM, /**< Bad checksum */ + DROP_INTERFACE_DOWN, /**< Interface is down so can not send packet */ + DROP_ROUTE_ERROR, /**< Route error */ + }; void SetNode (Ptr node); @@ -160,7 +160,7 @@ public: * down the stack to the MAC and PHY layers. */ void Send (Ptr packet, Ipv4Address source, - Ipv4Address destination, uint8_t protocol, Ptr route); + Ipv4Address destination, uint8_t protocol, Ptr route); /** * \param packet packet to send * \param ipHeader IP Header @@ -185,7 +185,7 @@ public: uint32_t GetNAddresses (uint32_t interface) const; bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex); Ipv4Address SelectSourceAddress (Ptr device, - Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope); + Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope); void SetMetric (uint32_t i, uint16_t metric); @@ -219,12 +219,12 @@ private: virtual bool GetWeakEsModel (void) const; Ipv4Header BuildHeader ( - Ipv4Address source, - Ipv4Address destination, - uint8_t protocol, - uint16_t payloadSize, - uint8_t ttl, - bool mayFragment); + Ipv4Address source, + Ipv4Address destination, + uint8_t protocol, + uint16_t payloadSize, + uint8_t ttl, + bool mayFragment); void SendRealOut (Ptr route, diff --git a/src/internet/model/ipv4-l4-protocol.cc b/src/internet/model/ipv4-l4-protocol.cc index 628f451fe..a51e16c68 100644 --- a/src/internet/model/ipv4-l4-protocol.cc +++ b/src/internet/model/ipv4-l4-protocol.cc @@ -37,18 +37,19 @@ Ipv4L4Protocol::GetTypeId (void) UintegerValue (0), MakeUintegerAccessor (&Ipv4L4Protocol::GetProtocolNumber), MakeUintegerChecker ()) - ; + ; return tid; } Ipv4L4Protocol::~Ipv4L4Protocol () -{} +{ +} -void +void Ipv4L4Protocol::ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv4Address payloadSource,Ipv4Address payloadDestination, const uint8_t payload[8]) {} -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/ipv4-l4-protocol.h b/src/internet/model/ipv4-l4-protocol.h index 0a6cbcb56..b2cde5efc 100644 --- a/src/internet/model/ipv4-l4-protocol.h +++ b/src/internet/model/ipv4-l4-protocol.h @@ -40,7 +40,7 @@ class Ipv4Route; * * This is an abstract base class for layer four protocols which use IPv4 as * the network layer. - */ + */ class Ipv4L4Protocol : public Object { public: @@ -92,19 +92,19 @@ public: const uint8_t payload[8]); typedef Callback, Ipv4Address, Ipv4Address, uint8_t, Ptr > DownTargetCallback; - /** - * This method allows a caller to set the current down target callback - * set for this L4 protocol - * - * \param cb current Callback for the L4 protocol - */ + /** + * This method allows a caller to set the current down target callback + * set for this L4 protocol + * + * \param cb current Callback for the L4 protocol + */ virtual void SetDownTarget (DownTargetCallback cb) = 0; - /** - * This method allows a caller to get the current down target callback - * set for this L4 protocol, for - * - * \return current Callback for the L4 protocol - */ + /** + * This method allows a caller to get the current down target callback + * set for this L4 protocol, for + * + * \return current Callback for the L4 protocol + */ virtual DownTargetCallback GetDownTarget (void) const = 0; }; diff --git a/src/internet/model/ipv4-list-routing.cc b/src/internet/model/ipv4-list-routing.cc index 39c76c77c..151de9b45 100644 --- a/src/internet/model/ipv4-list-routing.cc +++ b/src/internet/model/ipv4-list-routing.cc @@ -36,13 +36,13 @@ Ipv4ListRouting::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv4ListRouting") .SetParent () .AddConstructor () - ; + ; return tid; } Ipv4ListRouting::Ipv4ListRouting () - : m_ipv4 (0) + : m_ipv4 (0) { NS_LOG_FUNCTION_NOARGS (); } @@ -72,14 +72,14 @@ void Ipv4ListRouting::PrintRoutingTable (Ptr stream) const { *stream->GetStream () << "Node: " << m_ipv4->GetObject ()->GetId () - << " Time: " << Simulator::Now().GetSeconds () << "s " - << "Ipv4ListRouting table" << std::endl; + << " Time: " << Simulator::Now().GetSeconds () << "s " + << "Ipv4ListRouting table" << std::endl; for (Ipv4RoutingProtocolList::const_iterator i = m_routingProtocols.begin (); - i != m_routingProtocols.end (); i++) - { - *stream->GetStream () << " Priority: " << (*i).first << " Protocol: " << (*i).second->GetInstanceTypeId () << std::endl; - (*i).second->PrintRoutingTable (stream); - } + i != m_routingProtocols.end (); i++) + { + *stream->GetStream () << " Priority: " << (*i).first << " Protocol: " << (*i).second->GetInstanceTypeId () << std::endl; + (*i).second->PrintRoutingTable (stream); + } *stream->GetStream () << std::endl; } @@ -179,7 +179,7 @@ Ipv4ListRouting::RouteInput (Ptr p, const Ipv4Header &header, Ptr< return true; } } - // No routing protocol has found a route. + // No routing protocol has found a route. return retVal; } @@ -193,7 +193,7 @@ Ipv4ListRouting::NotifyInterfaceUp (uint32_t interface) rprotoIter++) { (*rprotoIter).second->NotifyInterfaceUp (interface); - } + } } void Ipv4ListRouting::NotifyInterfaceDown (uint32_t interface) @@ -205,7 +205,7 @@ Ipv4ListRouting::NotifyInterfaceDown (uint32_t interface) rprotoIter++) { (*rprotoIter).second->NotifyInterfaceDown (interface); - } + } } void Ipv4ListRouting::NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) @@ -217,7 +217,7 @@ Ipv4ListRouting::NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress addr rprotoIter++) { (*rprotoIter).second->NotifyAddAddress (interface, address); - } + } } void Ipv4ListRouting::NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) @@ -229,7 +229,7 @@ Ipv4ListRouting::NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress a rprotoIter++) { (*rprotoIter).second->NotifyRemoveAddress (interface, address); - } + } } void Ipv4ListRouting::SetIpv4 (Ptr ipv4) @@ -242,7 +242,7 @@ Ipv4ListRouting::SetIpv4 (Ptr ipv4) rprotoIter++) { (*rprotoIter).second->SetIpv4 (ipv4); - } + } m_ipv4 = ipv4; } diff --git a/src/internet/model/ipv4-list-routing.h b/src/internet/model/ipv4-list-routing.h index 0c890169d..0387b9724 100644 --- a/src/internet/model/ipv4-list-routing.h +++ b/src/internet/model/ipv4-list-routing.h @@ -26,7 +26,7 @@ namespace ns3 { /** - * \ingroup routing + * \ingroup internet * \defgroup ipv4ListRouting Ipv4 List Routing */ /** @@ -47,15 +47,15 @@ class Ipv4ListRouting : public Ipv4RoutingProtocol public: static TypeId GetTypeId (void); - Ipv4ListRouting (); - virtual ~Ipv4ListRouting (); + Ipv4ListRouting (); + virtual ~Ipv4ListRouting (); /** * \brief Register a new routing protocol to be used in this IPv4 stack * * \param routingProtocol new routing protocol implementation object * \param priority priority to give to this routing protocol. - * Values may range between -32768 and +32767. + * Values may range between -32768 and +32767. */ virtual void AddRoutingProtocol (Ptr routingProtocol, int16_t priority); /** diff --git a/src/internet/model/ipv4-packet-info-tag.cc b/src/internet/model/ipv4-packet-info-tag.cc index 74ad0ae6d..2bb04efa2 100644 --- a/src/internet/model/ipv4-packet-info-tag.cc +++ b/src/internet/model/ipv4-packet-info-tag.cc @@ -25,7 +25,7 @@ namespace ns3 { -Ipv4PacketInfoTag::Ipv4PacketInfoTag () +Ipv4PacketInfoTag::Ipv4PacketInfoTag () : m_addr (Ipv4Address ()), m_spec_dst (Ipv4Address ()), m_ifindex (0), @@ -89,7 +89,7 @@ Ipv4PacketInfoTag::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv4PacketInfoTag") .SetParent () .AddConstructor () - ; + ; return tid; } TypeId @@ -102,8 +102,8 @@ uint32_t Ipv4PacketInfoTag::GetSerializedSize (void) const { return 4 + 4 - + sizeof (uint32_t) - + sizeof (uint8_t); + + sizeof (uint32_t) + + sizeof (uint8_t); } void Ipv4PacketInfoTag::Serialize (TagBuffer i) const @@ -136,5 +136,5 @@ Ipv4PacketInfoTag::Print (std::ostream &os) const os << ", TTL:" << (uint32_t) m_ttl; os << "] "; } -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/ipv4-packet-info-tag.h b/src/internet/model/ipv4-packet-info-tag.h index 645526856..50f288683 100644 --- a/src/internet/model/ipv4-packet-info-tag.h +++ b/src/internet/model/ipv4-packet-info-tag.h @@ -60,7 +60,7 @@ public: // Implemented, but not used in the stack yet uint8_t GetTtl (void) const; - static TypeId GetTypeId (void); + static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; virtual uint32_t GetSerializedSize (void) const; virtual void Serialize (TagBuffer i) const; diff --git a/src/internet/model/ipv4-raw-socket-factory.cc b/src/internet/model/ipv4-raw-socket-factory.cc index 433b1313c..83d3b461d 100644 --- a/src/internet/model/ipv4-raw-socket-factory.cc +++ b/src/internet/model/ipv4-raw-socket-factory.cc @@ -28,7 +28,7 @@ TypeId Ipv4RawSocketFactory::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Ipv4RawSocketFactory") .SetParent () - ; + ; return tid; } diff --git a/src/internet/model/ipv4-raw-socket-impl.cc b/src/internet/model/ipv4-raw-socket-impl.cc index f1edbe343..955ba6290 100644 --- a/src/internet/model/ipv4-raw-socket-impl.cc +++ b/src/internet/model/ipv4-raw-socket-impl.cc @@ -23,14 +23,14 @@ Ipv4RawSocketImpl::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv4RawSocketImpl") .SetParent () .AddAttribute ("Protocol", "Protocol number to match.", - UintegerValue (0), - MakeUintegerAccessor (&Ipv4RawSocketImpl::m_protocol), - MakeUintegerChecker ()) + UintegerValue (0), + MakeUintegerAccessor (&Ipv4RawSocketImpl::m_protocol), + MakeUintegerChecker ()) .AddAttribute ("IcmpFilter", - "Any icmp header whose type field matches a bit in this filter is dropped.", - UintegerValue (0), - MakeUintegerAccessor (&Ipv4RawSocketImpl::m_icmpFilter), - MakeUintegerChecker ()) + "Any icmp header whose type field matches a bit in this filter is dropped.", + UintegerValue (0), + MakeUintegerAccessor (&Ipv4RawSocketImpl::m_icmpFilter), + MakeUintegerChecker ()) // // from raw (7), linux, returned length of Send/Recv should be // @@ -40,11 +40,11 @@ Ipv4RawSocketImpl::GetTypeId (void) // Recv(Ipv4)| hdr + payload | hdr+payload | // ----------+---------------+-------------+- .AddAttribute ("IpHeaderInclude", - "Include IP Header information (a.k.a setsockopt (IP_HDRINCL)).", - BooleanValue (false), - MakeBooleanAccessor (&Ipv4RawSocketImpl::m_iphdrincl), - MakeBooleanChecker ()) - ; + "Include IP Header information (a.k.a setsockopt (IP_HDRINCL)).", + BooleanValue (false), + MakeBooleanAccessor (&Ipv4RawSocketImpl::m_iphdrincl), + MakeBooleanChecker ()) + ; return tid; } @@ -179,7 +179,7 @@ Ipv4RawSocketImpl::Send (Ptr p, uint32_t flags) } int Ipv4RawSocketImpl::SendTo (Ptr p, uint32_t flags, - const Address &toAddress) + const Address &toAddress) { NS_LOG_FUNCTION (this << p << flags << toAddress); if (!InetSocketAddress::IsMatchingType (toAddress)) @@ -209,7 +209,7 @@ Ipv4RawSocketImpl::SendTo (Ptr p, uint32_t flags, dst = header.GetDestination (); src = header.GetSource (); } - SocketErrno errno_ = ERROR_NOTERROR;//do not use errno as it is the standard C last error number + SocketErrno errno_ = ERROR_NOTERROR; //do not use errno as it is the standard C last error number Ptr route; Ptr oif = m_boundnetdevice; //specify non-zero if bound to a source address if (!oif && src != Ipv4Address::GetAny ()) @@ -264,8 +264,8 @@ Ipv4RawSocketImpl::Recv (uint32_t maxSize, uint32_t flags) return RecvFrom (maxSize, flags, tmp); } Ptr -Ipv4RawSocketImpl::RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress) +Ipv4RawSocketImpl::RecvFrom (uint32_t maxSize, uint32_t flags, + Address &fromAddress) { NS_LOG_FUNCTION (this << maxSize << flags << fromAddress); if (m_recv.empty ()) @@ -319,17 +319,17 @@ Ipv4RawSocketImpl::ForwardUp (Ptr p, Ipv4Header ipHeader, PtrAddPacketTag (tag); } if (m_protocol == 1) - { - Icmpv4Header icmpHeader; - copy->PeekHeader (icmpHeader); - uint8_t type = icmpHeader.GetType (); - if (type < 32 && - ((1 << type) & m_icmpFilter)) - { - // filter out icmp packet. - return false; - } - } + { + Icmpv4Header icmpHeader; + copy->PeekHeader (icmpHeader); + uint8_t type = icmpHeader.GetType (); + if (type < 32 && + ((1 << type) & m_icmpFilter)) + { + // filter out icmp packet. + return false; + } + } copy->AddHeader (ipHeader); struct Data data; data.packet = copy; diff --git a/src/internet/model/ipv4-raw-socket-impl.h b/src/internet/model/ipv4-raw-socket-impl.h index 6f49ae345..6a8493d4c 100644 --- a/src/internet/model/ipv4-raw-socket-impl.h +++ b/src/internet/model/ipv4-raw-socket-impl.h @@ -36,11 +36,11 @@ public: virtual uint32_t GetTxAvailable (void) const; virtual int Send (Ptr p, uint32_t flags); virtual int SendTo (Ptr p, uint32_t flags, - const Address &toAddress); + const Address &toAddress); virtual uint32_t GetRxAvailable (void) const; virtual Ptr Recv (uint32_t maxSize, uint32_t flags); - virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress); + virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, + Address &fromAddress); void SetProtocol (uint16_t protocol); bool ForwardUp (Ptr p, Ipv4Header ipHeader, Ptr incomingInterface); diff --git a/src/internet/model/ipv4-route.cc b/src/internet/model/ipv4-route.cc index a58d0c9f7..7a6c0c867 100644 --- a/src/internet/model/ipv4-route.cc +++ b/src/internet/model/ipv4-route.cc @@ -24,51 +24,52 @@ namespace ns3 { Ipv4Route::Ipv4Route () -{} +{ +} -void +void Ipv4Route::SetDestination (Ipv4Address dest) { m_dest = dest; } -Ipv4Address +Ipv4Address Ipv4Route::GetDestination (void) const { return m_dest; } -void +void Ipv4Route::SetSource (Ipv4Address src) { m_source = src; } -Ipv4Address +Ipv4Address Ipv4Route::GetSource (void) const { return m_source; } -void +void Ipv4Route::SetGateway (Ipv4Address gw) { m_gateway = gw; } -Ipv4Address +Ipv4Address Ipv4Route::GetGateway (void) const { return m_gateway; } -void +void Ipv4Route::SetOutputDevice (Ptr outputDevice) { m_outputDevice = outputDevice; } -Ptr +Ptr Ipv4Route::GetOutputDevice (void) const { return m_outputDevice; @@ -76,18 +77,13 @@ Ipv4Route::GetOutputDevice (void) const std::ostream& operator<< (std::ostream& os, Ipv4Route const& route) { - os << "source=" << route.GetSource () << " dest="<< route.GetDestination () <<" gw=" << route.GetGateway (); - return os; + os << "source=" << route.GetSource () << " dest="<< route.GetDestination () <<" gw=" << route.GetGateway (); + return os; } Ipv4MulticastRoute::Ipv4MulticastRoute () { - uint32_t initial_ttl = MAX_TTL; - // Initialize array to MAX_TTL, which means that all interfaces are "off" - for (uint32_t i = 0; i < MAX_INTERFACES; i++) - { - m_ttls.push_back(initial_ttl); - } + m_ttls.clear(); } void @@ -129,13 +125,36 @@ Ipv4MulticastRoute::GetParent (void) const void Ipv4MulticastRoute::SetOutputTtl (uint32_t oif, uint32_t ttl) { - m_ttls[oif] = ttl; + if (ttl >= MAX_TTL) + { + // This TTL value effectively disables the interface + std::map::iterator iter; + iter = m_ttls.find(oif); + if (iter != m_ttls.end()) + { + m_ttls.erase(iter); + } + } + else + { + m_ttls[oif] = ttl; + } } uint32_t -Ipv4MulticastRoute::GetOutputTtl (uint32_t oif) const +Ipv4MulticastRoute::GetOutputTtl (uint32_t oif) { - return m_ttls[oif]; + // We keep this interface around for compatibility (for now) + std::map::const_iterator iter = m_ttls.find(oif); + if (iter == m_ttls.end()) + return((uint32_t)MAX_TTL); + return(iter->second); } -}//namespace ns3 +std::map +Ipv4MulticastRoute::GetOutputTtlMap() const +{ + return(m_ttls); +} + +} //namespace ns3 diff --git a/src/internet/model/ipv4-route.h b/src/internet/model/ipv4-route.h index 6a59d62d1..954040837 100644 --- a/src/internet/model/ipv4-route.h +++ b/src/internet/model/ipv4-route.h @@ -20,11 +20,12 @@ #define IPV4_ROUTE_H #include -#include +#include #include #include "ns3/simple-ref-count.h" #include "ns3/ipv4-address.h" +#include "ns3/deprecated.h" namespace ns3 { @@ -126,7 +127,7 @@ public: * \return Ipv4Address of the origin address */ Ipv4Address GetOrigin (void) const; - + /** * \param iif Parent (input interface) for this route */ @@ -145,8 +146,13 @@ public: * \param oif outgoing interface * \return TTL for this route */ - uint32_t GetOutputTtl (uint32_t oif) const; - + uint32_t GetOutputTtl (uint32_t oif) NS_DEPRECATED; + + /** + * \return map of output interface Ids and TTLs for this route + */ + std::map GetOutputTtlMap() const; + static const uint32_t MAX_INTERFACES = 16; // Maximum number of multicast interfaces on a router static const uint32_t MAX_TTL = 255; // Maximum time-to-live (TTL) @@ -154,9 +160,9 @@ private: Ipv4Address m_group; // Group Ipv4Address m_origin; // Source of packet uint32_t m_parent; // Source interface - std::vector m_ttls; + std::map m_ttls; }; -}//namespace ns3 +} //namespace ns3 #endif /* IPV4_ROUTE_H */ diff --git a/src/internet/model/ipv4-routing-protocol.cc b/src/internet/model/ipv4-routing-protocol.cc index d983e0284..f90f7f923 100644 --- a/src/internet/model/ipv4-routing-protocol.cc +++ b/src/internet/model/ipv4-routing-protocol.cc @@ -28,8 +28,8 @@ TypeId Ipv4RoutingProtocol::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Ipv4RoutingProtocol") .SetParent () - ; + ; return tid; } -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/ipv4-routing-protocol.h b/src/internet/model/ipv4-routing-protocol.h index 00dfa1d29..5bda83460 100644 --- a/src/internet/model/ipv4-routing-protocol.h +++ b/src/internet/model/ipv4-routing-protocol.h @@ -34,7 +34,7 @@ class Ipv4Route; class NetDevice; /** - * \ingroup node + * \ingroup internet * \defgroup ipv4Routing Ipv4RoutingProtocol */ /** @@ -56,7 +56,7 @@ public: typedef Callback, Ptr, const Ipv4Header &> MulticastForwardCallback; typedef Callback, const Ipv4Header &, uint32_t > LocalDeliverCallback; typedef Callback, const Ipv4Header &, Socket::SocketErrno > ErrorCallback; - + /** * \brief Query routing cache for an existing route, for an outbound packet * @@ -74,7 +74,7 @@ public: * \returns a code that indicates what happened in the lookup */ virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) = 0; - + /** * \brief Route an input packet (to be forwarded or locally delivered) * @@ -97,8 +97,8 @@ public: * forwarding or delivering the packet, false otherwise */ virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) = 0; + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) = 0; /** * \param interface the index of the interface we are being notified about diff --git a/src/internet/model/ipv4-routing-table-entry.cc b/src/internet/model/ipv4-routing-table-entry.cc index 17b511eb8..a2abcfde6 100644 --- a/src/internet/model/ipv4-routing-table-entry.cc +++ b/src/internet/model/ipv4-routing-table-entry.cc @@ -28,112 +28,119 @@ namespace ns3 { *****************************************************/ Ipv4RoutingTableEntry::Ipv4RoutingTableEntry () -{} +{ +} Ipv4RoutingTableEntry::Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const &route) : m_dest (route.m_dest), m_destNetworkMask (route.m_destNetworkMask), m_gateway (route.m_gateway), m_interface (route.m_interface) -{} +{ +} Ipv4RoutingTableEntry::Ipv4RoutingTableEntry (Ipv4RoutingTableEntry const *route) : m_dest (route->m_dest), m_destNetworkMask (route->m_destNetworkMask), m_gateway (route->m_gateway), m_interface (route->m_interface) -{} +{ +} Ipv4RoutingTableEntry::Ipv4RoutingTableEntry (Ipv4Address dest, - Ipv4Address gateway, - uint32_t interface) + Ipv4Address gateway, + uint32_t interface) : m_dest (dest), m_destNetworkMask (Ipv4Mask::GetOnes ()), m_gateway (gateway), m_interface (interface) -{} +{ +} Ipv4RoutingTableEntry::Ipv4RoutingTableEntry (Ipv4Address dest, - uint32_t interface) + uint32_t interface) : m_dest (dest), m_destNetworkMask (Ipv4Mask::GetOnes ()), m_gateway (Ipv4Address::GetZero ()), m_interface (interface) -{} +{ +} Ipv4RoutingTableEntry::Ipv4RoutingTableEntry (Ipv4Address network, - Ipv4Mask networkMask, - Ipv4Address gateway, - uint32_t interface) + Ipv4Mask networkMask, + Ipv4Address gateway, + uint32_t interface) : m_dest (network), m_destNetworkMask (networkMask), m_gateway (gateway), m_interface (interface) -{} +{ +} Ipv4RoutingTableEntry::Ipv4RoutingTableEntry (Ipv4Address network, - Ipv4Mask networkMask, - uint32_t interface) + Ipv4Mask networkMask, + uint32_t interface) : m_dest (network), m_destNetworkMask (networkMask), m_gateway (Ipv4Address::GetZero ()), m_interface (interface) -{} +{ +} -bool +bool Ipv4RoutingTableEntry::IsHost (void) const { - if (m_destNetworkMask.IsEqual (Ipv4Mask::GetOnes ())) + if (m_destNetworkMask.IsEqual (Ipv4Mask::GetOnes ())) { return true; - } - else + } + else { return false; } } -Ipv4Address +Ipv4Address Ipv4RoutingTableEntry::GetDest (void) const { return m_dest; } -bool +bool Ipv4RoutingTableEntry::IsNetwork (void) const { return !IsHost (); } -bool +bool Ipv4RoutingTableEntry::IsDefault (void) const { - if (m_dest.IsEqual (Ipv4Address::GetZero ())) + if (m_dest.IsEqual (Ipv4Address::GetZero ())) { return true; - } - else + } + else { return false; } } -Ipv4Address +Ipv4Address Ipv4RoutingTableEntry::GetDestNetwork (void) const { return m_dest; } -Ipv4Mask +Ipv4Mask Ipv4RoutingTableEntry::GetDestNetworkMask (void) const { return m_destNetworkMask; } -bool +bool Ipv4RoutingTableEntry::IsGateway (void) const { - if (m_gateway.IsEqual (Ipv4Address::GetZero ())) + if (m_gateway.IsEqual (Ipv4Address::GetZero ())) { return false; - } - else + } + else { return true; } } -Ipv4Address +Ipv4Address Ipv4RoutingTableEntry::GetGateway (void) const { return m_gateway; @@ -146,37 +153,37 @@ Ipv4RoutingTableEntry::GetInterface (void) const Ipv4RoutingTableEntry Ipv4RoutingTableEntry::CreateHostRouteTo (Ipv4Address dest, - Ipv4Address nextHop, - uint32_t interface) + Ipv4Address nextHop, + uint32_t interface) { return Ipv4RoutingTableEntry (dest, nextHop, interface); } Ipv4RoutingTableEntry Ipv4RoutingTableEntry::CreateHostRouteTo (Ipv4Address dest, - uint32_t interface) + uint32_t interface) { return Ipv4RoutingTableEntry (dest, interface); } Ipv4RoutingTableEntry Ipv4RoutingTableEntry::CreateNetworkRouteTo (Ipv4Address network, - Ipv4Mask networkMask, - Ipv4Address nextHop, - uint32_t interface) + Ipv4Mask networkMask, + Ipv4Address nextHop, + uint32_t interface) { return Ipv4RoutingTableEntry (network, networkMask, - nextHop, interface); + nextHop, interface); } Ipv4RoutingTableEntry Ipv4RoutingTableEntry::CreateNetworkRouteTo (Ipv4Address network, - Ipv4Mask networkMask, - uint32_t interface) + Ipv4Mask networkMask, + uint32_t interface) { return Ipv4RoutingTableEntry (network, networkMask, - interface); + interface); } Ipv4RoutingTableEntry Ipv4RoutingTableEntry::CreateDefaultRoute (Ipv4Address nextHop, - uint32_t interface) + uint32_t interface) { return Ipv4RoutingTableEntry (Ipv4Address::GetZero (), nextHop, interface); } @@ -194,13 +201,13 @@ std::ostream& operator<< (std::ostream& os, Ipv4RoutingTableEntry const& route) if (route.IsGateway ()) { os << "host="<< route.GetDest () << - ", out=" << route.GetInterface () << - ", next hop=" << route.GetGateway (); + ", out=" << route.GetInterface () << + ", next hop=" << route.GetGateway (); } else { os << "host="<< route.GetDest () << - ", out=" << route.GetInterface (); + ", out=" << route.GetInterface (); } } else if (route.IsNetwork ()) @@ -208,15 +215,15 @@ std::ostream& operator<< (std::ostream& os, Ipv4RoutingTableEntry const& route) if (route.IsGateway ()) { os << "network=" << route.GetDestNetwork () << - ", mask=" << route.GetDestNetworkMask () << - ",out=" << route.GetInterface () << - ", next hop=" << route.GetGateway (); + ", mask=" << route.GetDestNetworkMask () << + ",out=" << route.GetInterface () << + ", next hop=" << route.GetGateway (); } else { os << "network=" << route.GetDestNetwork () << - ", mask=" << route.GetDestNetworkMask () << - ",out=" << route.GetInterface (); + ", mask=" << route.GetDestNetworkMask () << + ",out=" << route.GetInterface (); } } else @@ -235,20 +242,20 @@ Ipv4MulticastRoutingTableEntry::Ipv4MulticastRoutingTableEntry () } Ipv4MulticastRoutingTableEntry::Ipv4MulticastRoutingTableEntry (Ipv4MulticastRoutingTableEntry const &route) -: - m_origin (route.m_origin), - m_group (route.m_group), - m_inputInterface (route.m_inputInterface), - m_outputInterfaces (route.m_outputInterfaces) + : + m_origin (route.m_origin), + m_group (route.m_group), + m_inputInterface (route.m_inputInterface), + m_outputInterfaces (route.m_outputInterfaces) { } Ipv4MulticastRoutingTableEntry::Ipv4MulticastRoutingTableEntry (Ipv4MulticastRoutingTableEntry const *route) -: - m_origin (route->m_origin), - m_group (route->m_group), - m_inputInterface (route->m_inputInterface), - m_outputInterfaces (route->m_outputInterfaces) + : + m_origin (route->m_origin), + m_group (route->m_group), + m_inputInterface (route->m_inputInterface), + m_outputInterfaces (route->m_outputInterfaces) { } @@ -292,7 +299,7 @@ uint32_t Ipv4MulticastRoutingTableEntry::GetOutputInterface (uint32_t n) const { NS_ASSERT_MSG(n < m_outputInterfaces.size (), - "Ipv4MulticastRoutingTableEntry::GetOutputInterface (): index out of bounds"); + "Ipv4MulticastRoutingTableEntry::GetOutputInterface (): index out of bounds"); return m_outputInterfaces[n]; } @@ -317,9 +324,9 @@ std::ostream& operator<< (std::ostream& os, Ipv4MulticastRoutingTableEntry const& route) { os << "origin=" << route.GetOrigin () << - ", group=" << route.GetGroup () << - ", input interface=" << route.GetInputInterface () << - ", output interfaces="; + ", group=" << route.GetGroup () << + ", input interface=" << route.GetInputInterface () << + ", output interfaces="; for (uint32_t i = 0; i < route.GetNOutputInterfaces (); ++i) { @@ -330,4 +337,4 @@ operator<< (std::ostream& os, Ipv4MulticastRoutingTableEntry const& route) return os; } -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/ipv4-routing-table-entry.h b/src/internet/model/ipv4-routing-table-entry.h index 81999adb2..9c280ef12 100644 --- a/src/internet/model/ipv4-routing-table-entry.h +++ b/src/internet/model/ipv4-routing-table-entry.h @@ -29,7 +29,7 @@ namespace ns3 { /** - * \ingroup routing + * \ingroup internet * * A record of an IPv4 routing table entry for Ipv4GlobalRouting and * Ipv4StaticRouting. This is not a reference counted object. @@ -95,15 +95,15 @@ public: * \param interface Outgoing interface */ static Ipv4RoutingTableEntry CreateHostRouteTo (Ipv4Address dest, - Ipv4Address nextHop, - uint32_t interface); + Ipv4Address nextHop, + uint32_t interface); /** * \return An Ipv4RoutingTableEntry object corresponding to the input parameters. * \param dest Ipv4Address of the destination * \param interface Outgoing interface */ static Ipv4RoutingTableEntry CreateHostRouteTo (Ipv4Address dest, - uint32_t interface); + uint32_t interface); /** * \return An Ipv4RoutingTableEntry object corresponding to the input parameters. * \param network Ipv4Address of the destination network @@ -112,9 +112,9 @@ public: * \param interface Outgoing interface */ static Ipv4RoutingTableEntry CreateNetworkRouteTo (Ipv4Address network, - Ipv4Mask networkMask, - Ipv4Address nextHop, - uint32_t interface); + Ipv4Mask networkMask, + Ipv4Address nextHop, + uint32_t interface); /** * \return An Ipv4RoutingTableEntry object corresponding to the input parameters. * \param network Ipv4Address of the destination network @@ -122,8 +122,8 @@ public: * \param interface Outgoing interface */ static Ipv4RoutingTableEntry CreateNetworkRouteTo (Ipv4Address network, - Ipv4Mask networkMask, - uint32_t interface); + Ipv4Mask networkMask, + uint32_t interface); /** * \return An Ipv4RoutingTableEntry object corresponding to the input * parameters. This route is distinguished; it will match any @@ -132,21 +132,21 @@ public: * \param interface Outgoing interface */ static Ipv4RoutingTableEntry CreateDefaultRoute (Ipv4Address nextHop, - uint32_t interface); - + uint32_t interface); + private: Ipv4RoutingTableEntry (Ipv4Address network, - Ipv4Mask mask, - Ipv4Address gateway, - uint32_t interface); + Ipv4Mask mask, + Ipv4Address gateway, + uint32_t interface); Ipv4RoutingTableEntry (Ipv4Address dest, - Ipv4Mask mask, - uint32_t interface); + Ipv4Mask mask, + uint32_t interface); Ipv4RoutingTableEntry (Ipv4Address dest, - Ipv4Address gateway, - uint32_t interface); + Ipv4Address gateway, + uint32_t interface); Ipv4RoutingTableEntry (Ipv4Address dest, - uint32_t interface); + uint32_t interface); Ipv4Address m_dest; Ipv4Mask m_destNetworkMask; @@ -157,7 +157,7 @@ private: std::ostream& operator<< (std::ostream& os, Ipv4RoutingTableEntry const& route); /** - * \ingroup routing + * \ingroup internet * * \brief A record of an IPv4 multicast route for Ipv4GlobalRouting and Ipv4StaticRouting */ @@ -211,12 +211,12 @@ public: * \param outputInterfaces vector of output interfaces to copy and forward the datagram to */ static Ipv4MulticastRoutingTableEntry CreateMulticastRoute (Ipv4Address origin, - Ipv4Address group, uint32_t inputInterface, - std::vector outputInterfaces); + Ipv4Address group, uint32_t inputInterface, + std::vector outputInterfaces); private: Ipv4MulticastRoutingTableEntry (Ipv4Address origin, Ipv4Address group, - uint32_t inputInterface, std::vector outputInterfaces); + uint32_t inputInterface, std::vector outputInterfaces); Ipv4Address m_origin; Ipv4Address m_group; @@ -226,6 +226,6 @@ private: std::ostream& operator<< (std::ostream& os, Ipv4MulticastRoutingTableEntry const& route); -}//namespace ns3 +} //namespace ns3 #endif /* IPV4_ROUTING_TABLE_ENTRY_H */ diff --git a/src/internet/model/ipv4-static-routing.cc b/src/internet/model/ipv4-static-routing.cc index e3f865966..e71845485 100644 --- a/src/internet/model/ipv4-static-routing.cc +++ b/src/internet/model/ipv4-static-routing.cc @@ -19,9 +19,9 @@ // Gustavo Carneiro #define NS_LOG_APPEND_CONTEXT \ - if (m_ipv4 && m_ipv4->GetObject ()) { \ + if (m_ipv4 && m_ipv4->GetObject ()) { \ std::clog << Simulator::Now ().GetSeconds () \ - << " [node " << m_ipv4->GetObject ()->GetId () << "] "; } + << " [node " << m_ipv4->GetObject ()->GetId () << "] "; } #include #include "ns3/log.h" @@ -48,12 +48,12 @@ Ipv4StaticRouting::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv4StaticRouting") .SetParent () .AddConstructor () - ; + ; return tid; } Ipv4StaticRouting::Ipv4StaticRouting () -: m_ipv4 (0) + : m_ipv4 (0) { NS_LOG_FUNCTION (this); } @@ -68,9 +68,9 @@ Ipv4StaticRouting::AddNetworkRouteTo (Ipv4Address network, NS_LOG_FUNCTION (this << network << " " << networkMask << " " << nextHop << " " << interface << " " << metric); Ipv4RoutingTableEntry *route = new Ipv4RoutingTableEntry (); *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, - networkMask, - nextHop, - interface); + networkMask, + nextHop, + interface); m_networkRoutes.push_back (make_pair(route,metric)); } @@ -83,16 +83,16 @@ Ipv4StaticRouting::AddNetworkRouteTo (Ipv4Address network, NS_LOG_FUNCTION (this << network << " " << networkMask << " " << interface << " " << metric); Ipv4RoutingTableEntry *route = new Ipv4RoutingTableEntry (); *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, - networkMask, - interface); + networkMask, + interface); m_networkRoutes.push_back (make_pair (route,metric)); } void Ipv4StaticRouting::AddHostRouteTo (Ipv4Address dest, - Ipv4Address nextHop, - uint32_t interface, - uint32_t metric) + Ipv4Address nextHop, + uint32_t interface, + uint32_t metric) { NS_LOG_FUNCTION (this << dest << " " << nextHop << " " << interface << " " << metric); AddNetworkRouteTo (dest, Ipv4Mask::GetOnes (), nextHop, interface, metric); @@ -100,8 +100,8 @@ Ipv4StaticRouting::AddHostRouteTo (Ipv4Address dest, void Ipv4StaticRouting::AddHostRouteTo (Ipv4Address dest, - uint32_t interface, - uint32_t metric) + uint32_t interface, + uint32_t metric) { NS_LOG_FUNCTION (this << dest << " " << interface << " " << metric); AddNetworkRouteTo (dest, Ipv4Mask::GetOnes (), interface, metric); @@ -125,7 +125,7 @@ Ipv4StaticRouting::AddMulticastRoute(Ipv4Address origin, NS_LOG_FUNCTION (this << origin << " " << group << " " << inputInterface); Ipv4MulticastRoutingTableEntry *route = new Ipv4MulticastRoutingTableEntry (); *route = Ipv4MulticastRoutingTableEntry::CreateMulticastRoute (origin, group, - inputInterface, outputInterfaces); + inputInterface, outputInterfaces); m_multicastRoutes.push_back (route); } @@ -140,8 +140,8 @@ Ipv4StaticRouting::SetDefaultMulticastRoute(uint32_t outputInterface) Ipv4Address network = Ipv4Address ("224.0.0.0"); Ipv4Mask networkMask = Ipv4Mask ("240.0.0.0"); *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, - networkMask, - outputInterface); + networkMask, + outputInterface); m_networkRoutes.push_back (make_pair(route,0)); } @@ -157,7 +157,7 @@ Ipv4StaticRouting::GetMulticastRoute (uint32_t index) const { NS_LOG_FUNCTION (this << index); NS_ASSERT_MSG(index < m_multicastRoutes.size (), - "Ipv4StaticRouting::GetMulticastRoute (): Index out of range"); + "Ipv4StaticRouting::GetMulticastRoute (): Index out of range"); if (index < m_multicastRoutes.size ()) { @@ -316,7 +316,7 @@ Ipv4StaticRouting::LookupStatic ( // a match. // // The first case is the restrictive case where the origin, group and index -// matches. +// matches. // if (origin == route->GetOrigin () && group == route->GetGroup ()) { @@ -367,21 +367,21 @@ Ipv4StaticRouting::GetDefaultRoute () i != m_networkRoutes.end (); i++) { - Ipv4RoutingTableEntry *j = i->first; - uint32_t metric = i->second; - Ipv4Mask mask = (j)->GetDestNetworkMask (); - uint16_t masklen = mask.GetPrefixLength (); - if (masklen != 0) - { - continue; - } - if (metric > shortest_metric) - { - continue; - } - shortest_metric = metric; - result = j; - } + Ipv4RoutingTableEntry *j = i->first; + uint32_t metric = i->second; + Ipv4Mask mask = (j)->GetDestNetworkMask (); + uint16_t masklen = mask.GetPrefixLength (); + if (masklen != 0) + { + continue; + } + if (metric > shortest_metric) + { + continue; + } + shortest_metric = metric; + result = j; + } if (result) { return result; @@ -400,13 +400,13 @@ Ipv4StaticRouting::GetRoute (uint32_t index) const for (NetworkRoutesCI j = m_networkRoutes.begin (); j != m_networkRoutes.end (); j++) + { + if (tmp == index) { - if (tmp == index) - { return j->first; - } - tmp++; } + tmp++; + } NS_ASSERT (false); // quiet compiler. return 0; @@ -483,8 +483,8 @@ Ipv4StaticRouting::RouteOutput (Ptr p, const Ipv4Header &header, Ptr p, const Ipv4Header &ipHeader, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) { NS_LOG_FUNCTION (this << p << ipHeader << ipHeader.GetSource () << ipHeader.GetDestination () << idev); @@ -499,7 +499,7 @@ Ipv4StaticRouting::RouteInput (Ptr p, const Ipv4Header &ipHeader, { NS_LOG_LOGIC ("Multicast destination"); Ptr mrtentry = LookupStatic(ipHeader.GetSource (), - ipHeader.GetDestination (), m_ipv4->GetInterfaceForDevice (idev)); + ipHeader.GetDestination (), m_ipv4->GetInterfaceForDevice (idev)); if (mrtentry) { @@ -521,12 +521,12 @@ Ipv4StaticRouting::RouteInput (Ptr p, const Ipv4Header &ipHeader, } NS_LOG_LOGIC ("Unicast destination"); - // TODO: Configurable option to enable RFC 1222 Strong End System Model - // Right now, we will be permissive and allow a source to send us - // a packet to one of our other interface addresses; that is, the - // destination unicast address does not match one of the iif addresses, - // but we check our other interfaces. This could be an option - // (to remove the outer loop immediately below and just check iif). + // TODO: Configurable option to enable RFC 1222 Strong End System Model + // Right now, we will be permissive and allow a source to send us + // a packet to one of our other interface addresses; that is, the + // destination unicast address does not match one of the iif addresses, + // but we check our other interfaces. This could be an option + // (to remove the outer loop immediately below and just check iif). for (uint32_t j = 0; j < m_ipv4->GetNInterfaces (); j++) { for (uint32_t i = 0; i < m_ipv4->GetNAddresses (j); i++) @@ -775,4 +775,4 @@ Ipv4StaticRouting::SourceAddressSelection (uint32_t interfaceIdx, Ipv4Address de return candidate; } -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/ipv4-static-routing.h b/src/internet/model/ipv4-static-routing.h index 8b2960eb7..e74b2ed09 100644 --- a/src/internet/model/ipv4-static-routing.h +++ b/src/internet/model/ipv4-static-routing.h @@ -44,7 +44,7 @@ class Ipv4MulticastRoutingTableEntry; class Node; /** - * \ingroup routing + * \ingroup internet * \defgroup ipv4StaticRouting Ipv4StaticRouting */ /** @@ -53,7 +53,7 @@ class Node; * \brief Static routing protocol for IP version 4 stacks. * * This class provides a basic set of methods for inserting static - * unicast and multicast routes into the Ipv4 routing system. + * unicast and multicast routes into the Ipv4 routing system. * This particular protocol is designed to be inserted into an * Ipv4ListRouting protocol but can be used also as a standalone * protocol. @@ -77,8 +77,8 @@ public: virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb); virtual void NotifyInterfaceUp (uint32_t interface); virtual void NotifyInterfaceDown (uint32_t interface); @@ -195,9 +195,9 @@ public: * \brief Get a route from the static unicast routing table. * * Externally, the unicast static routing table appears simply as a table with - * n entries. + * n entries. * - * \param i The index (into the routing table) of the route to retrieve. + * \param i The index (into the routing table) of the route to retrieve. * \return If route is set, a pointer to that Ipv4RoutingTableEntry is returned, otherwise * a zero pointer is returned. * @@ -209,19 +209,19 @@ public: /** * \brief Get a metric for route from the static unicast routing table. * - * \param index The index (into the routing table) of the route to retrieve. + * \param index The index (into the routing table) of the route to retrieve. * \return If route is set, the metric is returned. If not, an infinity metric (0xffffffff) is returned * */ uint32_t GetMetric (uint32_t index); - + /** * \brief Remove a route from the static unicast routing table. * * Externally, the unicast static routing table appears simply as a table with - * n entries. + * n entries. * - * \param i The index (into the routing table) of the route to remove. + * \param i The index (into the routing table) of the route to remove. * * \see Ipv4RoutingTableEntry * \see Ipv4StaticRouting::GetRoute @@ -315,10 +315,10 @@ public: * \brief Get a route from the static multicast routing table. * * Externally, the multicast static routing table appears simply as a table - * with n entries. + * with n entries. * * \param i The index (into the routing table) of the multicast route to - * retrieve. + * retrieve. * \return If route \e i is set, a pointer to that Ipv4MulticastRoutingTableEntry is * returned, otherwise a zero pointer is returned. * @@ -331,7 +331,7 @@ public: * \brief Remove a route from the static multicast routing table. * * Externally, the multicast static routing table appears simply as a table - * with n entries. + * with n entries. * This method causes the multicast routing table to be searched for the first * route that matches the parameters and removes it. * @@ -360,10 +360,10 @@ public: * \brief Remove a route from the static multicast routing table. * * Externally, the multicast static routing table appears simply as a table - * with n entries. + * with n entries. * * \param index The index (into the multicast routing table) of the route to - * remove. + * remove. * * \see Ipv4RoutingTableEntry * \see Ipv4StaticRouting::GetRoute @@ -382,10 +382,10 @@ private: typedef std::list MulticastRoutes; typedef std::list::const_iterator MulticastRoutesCI; typedef std::list::iterator MulticastRoutesI; - + Ptr LookupStatic (Ipv4Address dest, Ptr oif = 0); Ptr LookupStatic (Ipv4Address origin, Ipv4Address group, - uint32_t interface); + uint32_t interface); Ipv4Address SourceAddressSelection (uint32_t interface, Ipv4Address dest); diff --git a/src/internet/model/ipv4.cc b/src/internet/model/ipv4.cc index 8ab83de4f..4a9ced18d 100644 --- a/src/internet/model/ipv4.cc +++ b/src/internet/model/ipv4.cc @@ -50,14 +50,16 @@ Ipv4::GetTypeId (void) &UdpSocket::GetMtuDiscover), MakeBooleanChecker ()) #endif - ; + ; return tid; } Ipv4::Ipv4 () -{} +{ +} Ipv4::~Ipv4 () -{} +{ +} } // namespace ns3 diff --git a/src/internet/model/ipv4.h b/src/internet/model/ipv4.h index 549c88727..b8fe9bcfb 100644 --- a/src/internet/model/ipv4.h +++ b/src/internet/model/ipv4.h @@ -37,7 +37,7 @@ class Packet; class Ipv4RoutingProtocol; /** - * \ingroup node + * \ingroup internet * \defgroup ipv4 Ipv4 */ /** @@ -45,7 +45,7 @@ class Ipv4RoutingProtocol; * \brief Access to the Ipv4 forwarding table, interfaces, and configuration * * This class defines the API to manipulate the following aspects of - * the Ipv4 implementation: + * the Ipv4 implementation: * -# set/get an Ipv4RoutingProtocol * -# register a NetDevice for use by the Ipv4 layer (basically, to * create Ipv4-related state such as addressing and neighbor cache that @@ -81,7 +81,7 @@ public: /** * \brief Register a new routing protocol to be used by this Ipv4 stack - * + * * This call will replace any routing protocol that has been previously * registered. If you want to add multiple routing protocols, you must * add them to a Ipv4ListRoutingProtocol directly. @@ -111,7 +111,7 @@ public: /** * \returns the number of interfaces added by the user. */ - virtual uint32_t GetNInterfaces (void) const = 0; + virtual uint32_t GetNInterfaces (void) const = 0; /** * \brief Return the interface number of the interface that has been @@ -121,7 +121,7 @@ public: * \returns The interface number of the Ipv4 interface with the given * address or -1 if not found. * - * Each IP interface has one or more IP addresses associated with it. + * Each IP interface has one or more IP addresses associated with it. * This method searches the list of interfaces for one that holds a * particular address. This call takes an IP address as a parameter and * returns the interface number of the first interface that has been assigned @@ -141,7 +141,7 @@ public: * down the stack to the MAC and PHY layers. */ virtual void Send (Ptr packet, Ipv4Address source, - Ipv4Address destination, uint8_t protocol, Ptr route) = 0; + Ipv4Address destination, uint8_t protocol, Ptr route) = 0; /** * \param protocol a pointer to the protocol to add to this L4 Demux. @@ -182,14 +182,14 @@ public: * \returns The interface number of the Ipv4 interface with the given * address or -1 if not found. * - * Each IP interface has one or more IP addresses associated with it. + * Each IP interface has one or more IP addresses associated with it. * This method searches the list of interfaces for the first one found * that holds an address that is included within the prefix * formed by the input address and mask parameters. The value -1 is * returned if no match is found. */ virtual int32_t GetInterfaceForPrefix (Ipv4Address address, - Ipv4Mask mask) const = 0; + Ipv4Mask mask) const = 0; /** * \param interface The interface number of an Ipv4 interface. @@ -230,7 +230,7 @@ public: * Remove the address at addressIndex on named interface. The addressIndex * for all higher indices will decrement by one after this method is called; * so, for example, to remove 5 addresses from an interface i, one could - * call RemoveAddress (i, 0); 5 times. + * call RemoveAddress (i, 0); 5 times. * * \param interface Interface number of an Ipv4 interface * \param addressIndex index of Ipv4InterfaceAddress to remove @@ -253,7 +253,7 @@ public: * return a primary address that is configured on that device, and whose * subnet matches that of dst and whose scope is less than or equal to * the requested scope. If a primary address does not match the - * subnet of dst but otherwise matches the scope, it is returned. + * subnet of dst but otherwise matches the scope, it is returned. * If no such address on the device is found, the other devices are * searched in order of their interface index, but not considering dst * as a factor in the search. Because a loopback interface is typically @@ -274,7 +274,7 @@ public: * \returns the first primary Ipv4Address that meets the search criteria */ virtual Ipv4Address SelectSourceAddress (Ptr device, - Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope) = 0; + Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope) = 0; /** * \param interface The interface number of an Ipv4 interface diff --git a/src/internet/model/ipv6-autoconfigured-prefix.cc b/src/internet/model/ipv6-autoconfigured-prefix.cc index fa2e389ff..e17789276 100644 --- a/src/internet/model/ipv6-autoconfigured-prefix.cc +++ b/src/internet/model/ipv6-autoconfigured-prefix.cc @@ -38,7 +38,7 @@ Ipv6AutoconfiguredPrefix::Ipv6AutoconfiguredPrefix (Ptr node, uint32_t int m_validLifeTime = validLifeTime; m_preferredLifeTime = preferredLifeTime; m_id = m_prefixId; - m_prefixId ++; + m_prefixId++; m_preferred = false; m_valid = false; m_prefix = prefix; diff --git a/src/internet/model/ipv6-autoconfigured-prefix.h b/src/internet/model/ipv6-autoconfigured-prefix.h index f69a10ca6..186d5fb34 100644 --- a/src/internet/model/ipv6-autoconfigured-prefix.h +++ b/src/internet/model/ipv6-autoconfigured-prefix.h @@ -114,7 +114,7 @@ public: /** * \brief Test if the prefix is valid. * \return true if prefix is in valid state, false otherwise - */ + */ bool IsValid () const; /** diff --git a/src/internet/model/ipv6-end-point-demux.cc b/src/internet/model/ipv6-end-point-demux.cc index c579e48c0..f25c816b4 100644 --- a/src/internet/model/ipv6-end-point-demux.cc +++ b/src/internet/model/ipv6-end-point-demux.cc @@ -182,15 +182,15 @@ Ipv6EndPointDemux::EndPoints Ipv6EndPointDemux::Lookup (Ipv6Address daddr, uint1 { Ipv6EndPoint* endP = *i; NS_LOG_DEBUG ("Looking at endpoint dport=" << endP->GetLocalPort () - << " daddr=" << endP->GetLocalAddress () - << " sport=" << endP->GetPeerPort () - << " saddr=" << endP->GetPeerAddress ()); + << " daddr=" << endP->GetLocalAddress () + << " sport=" << endP->GetPeerPort () + << " saddr=" << endP->GetPeerAddress ()); if (endP->GetLocalPort () != dport) { NS_LOG_LOGIC ("Skipping endpoint " << &endP - << " because endpoint dport " - << endP->GetLocalPort () - << " does not match packet dport " << dport); + << " because endpoint dport " + << endP->GetLocalPort () + << " does not match packet dport " << dport); continue; } @@ -273,12 +273,12 @@ Ipv6EndPoint* Ipv6EndPointDemux::SimpleLookup (Ipv6Address dst, uint16_t dport, if ((*i)->GetLocalAddress () == Ipv6Address::GetAny ()) { - tmp ++; + tmp++; } if ((*i)->GetPeerAddress () == Ipv6Address::GetAny ()) { - tmp ++; + tmp++; } if (tmp < genericity) diff --git a/src/internet/model/ipv6-end-point.cc b/src/internet/model/ipv6-end-point.cc index aed517411..db6fb418b 100644 --- a/src/internet/model/ipv6-end-point.cc +++ b/src/internet/model/ipv6-end-point.cc @@ -31,18 +31,18 @@ NS_LOG_COMPONENT_DEFINE ("Ipv6EndPoint"); Ipv6EndPoint::Ipv6EndPoint (Ipv6Address addr, uint16_t port) : m_localAddr (addr), - m_localPort (port), - m_peerAddr (Ipv6Address::GetAny ()), - m_peerPort (0) + m_localPort (port), + m_peerAddr (Ipv6Address::GetAny ()), + m_peerPort (0) { } Ipv6EndPoint::~Ipv6EndPoint () { if (!m_destroyCallback.IsNull ()) - { - m_destroyCallback (); - } + { + m_destroyCallback (); + } } Ipv6Address Ipv6EndPoint::GetLocalAddress () @@ -99,19 +99,19 @@ void Ipv6EndPoint::SetDestroyCallback (Callback callback) void Ipv6EndPoint::ForwardUp (Ptr p, Ipv6Address addr, uint16_t port) { if (!m_rxCallback.IsNull ()) - { - m_rxCallback (p, addr, port); - } + { + m_rxCallback (p, addr, port); + } } void Ipv6EndPoint::ForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, uint8_t code, uint32_t info) { if (!m_icmpCallback.IsNull ()) - { - Simulator::ScheduleNow (&Ipv6EndPoint::DoForwardIcmp, this, - src, ttl, type, code, info); - } + { + Simulator::ScheduleNow (&Ipv6EndPoint::DoForwardIcmp, this, + src, ttl, type, code, info); + } } void Ipv6EndPoint::DoForwardUp (Ptr p, Ipv6Address saddr, uint16_t sport) diff --git a/src/internet/model/ipv6-end-point.h b/src/internet/model/ipv6-end-point.h index 148d8ab15..688009ee9 100644 --- a/src/internet/model/ipv6-end-point.h +++ b/src/internet/model/ipv6-end-point.h @@ -38,154 +38,154 @@ class Packet; */ class Ipv6EndPoint { - public: - /** - * \brief Constructor. - * \param addr the IPv6 address - * \param port the port - */ - Ipv6EndPoint (Ipv6Address addr, uint16_t port); +public: + /** + * \brief Constructor. + * \param addr the IPv6 address + * \param port the port + */ + Ipv6EndPoint (Ipv6Address addr, uint16_t port); - /** - * \brief Destructor. - */ - ~Ipv6EndPoint (); + /** + * \brief Destructor. + */ + ~Ipv6EndPoint (); - /** - * \brief Get the local address. - * \return the local address - */ - Ipv6Address GetLocalAddress (); + /** + * \brief Get the local address. + * \return the local address + */ + Ipv6Address GetLocalAddress (); - /** - * \brief Set the local address. - * \param addr the address to set - */ - void SetLocalAddress (Ipv6Address addr); + /** + * \brief Set the local address. + * \param addr the address to set + */ + void SetLocalAddress (Ipv6Address addr); - /** - * \brief Get the local port. - * \return the local port - */ - uint16_t GetLocalPort (); + /** + * \brief Get the local port. + * \return the local port + */ + uint16_t GetLocalPort (); - /** - * \brief Set the local port. - * \param port the port to set - */ - void SetLocalPort (uint16_t port); + /** + * \brief Set the local port. + * \param port the port to set + */ + void SetLocalPort (uint16_t port); - /** - * \brief Get the peer address. - * \return the peer address - */ - Ipv6Address GetPeerAddress (); + /** + * \brief Get the peer address. + * \return the peer address + */ + Ipv6Address GetPeerAddress (); - /** - * \brief Get the peer port. - * \return the peer port - */ - uint16_t GetPeerPort (); + /** + * \brief Get the peer port. + * \return the peer port + */ + uint16_t GetPeerPort (); - /** - * \brief Set the peer informations (address and port). - * \param addr peer address - * \param port peer port - */ - void SetPeer (Ipv6Address addr, uint16_t port); + /** + * \brief Set the peer informations (address and port). + * \param addr peer address + * \param port peer port + */ + void SetPeer (Ipv6Address addr, uint16_t port); - /** - * \brief Set the reception callback. - * \param callback callback function - */ - void SetRxCallback (Callback, Ipv6Address, uint16_t> callback); - - /** - * \brief Set the ICMP callback. - * \param callback callback function - */ - void SetIcmpCallback (Callback callback); + /** + * \brief Set the reception callback. + * \param callback callback function + */ + void SetRxCallback (Callback, Ipv6Address, uint16_t> callback); - /** - * \brief Set the default destroy callback. - * \param callback callback function - */ - void SetDestroyCallback (Callback callback); + /** + * \brief Set the ICMP callback. + * \param callback callback function + */ + void SetIcmpCallback (Callback callback); - /** - * \brief Forward the packet to the upper level. - * \param p the packet - * \param addr source address - * \param port source port - */ - void ForwardUp (Ptr p, Ipv6Address addr, uint16_t port); + /** + * \brief Set the default destroy callback. + * \param callback callback function + */ + void SetDestroyCallback (Callback callback); - /** - * \brief Function called from an L4Protocol implementation - * to notify an endpoint of an icmp message reception. - * \param src source IPv6 address - * \param ttl time-to-live - * \param type ICMPv6 type - * \param code ICMPv6 code - * \param info ICMPv6 info - */ - void ForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, + /** + * \brief Forward the packet to the upper level. + * \param p the packet + * \param addr source address + * \param port source port + */ + void ForwardUp (Ptr p, Ipv6Address addr, uint16_t port); + + /** + * \brief Function called from an L4Protocol implementation + * to notify an endpoint of an icmp message reception. + * \param src source IPv6 address + * \param ttl time-to-live + * \param type ICMPv6 type + * \param code ICMPv6 code + * \param info ICMPv6 info + */ + void ForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, + uint8_t code, uint32_t info); + +private: + /** + * \brief ForwardUp wrapper. + * \param p packet + * \param saddr source IPv6 address + * \param sport source port + */ + void DoForwardUp (Ptr p, Ipv6Address saddr, uint16_t sport); + + /** + * \brief ForwardIcmp wrapper. + * \param src source IPv6 address + * \param ttl time-to-live + * \param type ICMPv6 type + * \param code ICMPv6 code + * \param info ICMPv6 info + */ + void DoForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, uint8_t code, uint32_t info); - private: - /** - * \brief ForwardUp wrapper. - * \param p packet - * \param saddr source IPv6 address - * \param sport source port - */ - void DoForwardUp (Ptr p, Ipv6Address saddr, uint16_t sport); + /** + * \brief The local address. + */ + Ipv6Address m_localAddr; - /** - * \brief ForwardIcmp wrapper. - * \param src source IPv6 address - * \param ttl time-to-live - * \param type ICMPv6 type - * \param code ICMPv6 code - * \param info ICMPv6 info - */ - void DoForwardIcmp (Ipv6Address src, uint8_t ttl, uint8_t type, - uint8_t code, uint32_t info); + /** + * \brief The local port. + */ + uint16_t m_localPort; - /** - * \brief The local address. - */ - Ipv6Address m_localAddr; + /** + * \brief The peer address. + */ + Ipv6Address m_peerAddr; - /** - * \brief The local port. - */ - uint16_t m_localPort; + /** + * \brief The peer port. + */ + uint16_t m_peerPort; - /** - * \brief The peer address. - */ - Ipv6Address m_peerAddr; + /** + * \brief The RX callback. + */ + Callback, Ipv6Address, uint16_t> m_rxCallback; - /** - * \brief The peer port. - */ - uint16_t m_peerPort; + /** + * \brief The ICMPv6 callback. + */ + Callback m_icmpCallback; - /** - * \brief The RX callback. - */ - Callback, Ipv6Address, uint16_t> m_rxCallback; - - /** - * \brief The ICMPv6 callback. - */ - Callback m_icmpCallback; - - /** - * \brief The destroy callback. - */ - Callback m_destroyCallback; + /** + * \brief The destroy callback. + */ + Callback m_destroyCallback; }; } /* namespace ns3 */ diff --git a/src/internet/model/ipv6-extension-demux.cc b/src/internet/model/ipv6-extension-demux.cc index ab694ecf6..d02455cde 100644 --- a/src/internet/model/ipv6-extension-demux.cc +++ b/src/internet/model/ipv6-extension-demux.cc @@ -38,7 +38,7 @@ TypeId Ipv6ExtensionDemux::GetTypeId () ObjectVectorValue (), MakeObjectVectorAccessor (&Ipv6ExtensionDemux::m_extensions), MakeObjectVectorChecker ()) - ; + ; return tid; } diff --git a/src/internet/model/ipv6-extension-demux.h b/src/internet/model/ipv6-extension-demux.h index 344e6164d..bce769d9a 100644 --- a/src/internet/model/ipv6-extension-demux.h +++ b/src/internet/model/ipv6-extension-demux.h @@ -79,7 +79,7 @@ public: */ void Remove (Ptr extension); -protected: +protected: /** * \brief Dispose object. */ diff --git a/src/internet/model/ipv6-extension-header.cc b/src/internet/model/ipv6-extension-header.cc index e39972f5f..cecb426ce 100644 --- a/src/internet/model/ipv6-extension-header.cc +++ b/src/internet/model/ipv6-extension-header.cc @@ -35,7 +35,7 @@ TypeId Ipv6ExtensionHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionHeader") .AddConstructor () .SetParent
() - ; + ; return tid; } @@ -46,8 +46,8 @@ TypeId Ipv6ExtensionHeader::GetInstanceTypeId () const Ipv6ExtensionHeader::Ipv6ExtensionHeader () : m_nextHeader (0), - m_length (0), - m_data (0) + m_length (0), + m_data (0) { } @@ -122,7 +122,7 @@ uint32_t Ipv6ExtensionHeader::Deserialize (Buffer::Iterator start) OptionField::OptionField (uint32_t optionsOffset) : m_optionData (0), - m_optionsOffset (optionsOffset) + m_optionsOffset (optionsOffset) { } @@ -132,21 +132,21 @@ OptionField::~OptionField () uint32_t OptionField::GetSerializedSize () const { - return m_optionData.GetSize () + CalculatePad ((Ipv6OptionHeader::Alignment) {8,0}); + return m_optionData.GetSize () + CalculatePad ((Ipv6OptionHeader::Alignment) { 8,0}); } void OptionField::Serialize (Buffer::Iterator start) const { start.Write (m_optionData.Begin (), m_optionData.End ()); - uint32_t fill = CalculatePad ((Ipv6OptionHeader::Alignment) {8,0}); + uint32_t fill = CalculatePad ((Ipv6OptionHeader::Alignment) { 8,0}); NS_LOG_LOGIC ("fill with " << fill << " bytes padding"); switch (fill) { case 0: return; case 1: Ipv6OptionPad1Header ().Serialize (start); - return; + return; default: Ipv6OptionPadnHeader (fill).Serialize (start); - return; + return; } } @@ -170,9 +170,9 @@ void OptionField::AddOption (Ipv6OptionHeader const& option) { case 0: break; //no padding needed case 1: AddOption (Ipv6OptionPad1Header ()); - break; + break; default: AddOption (Ipv6OptionPadnHeader (pad)); - break; + break; } m_optionData.AddAtEnd (option.GetSerializedSize ()); @@ -204,7 +204,7 @@ TypeId Ipv6ExtensionHopByHopHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionHopByHopHeader") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -214,7 +214,7 @@ TypeId Ipv6ExtensionHopByHopHeader::GetInstanceTypeId () const } Ipv6ExtensionHopByHopHeader::Ipv6ExtensionHopByHopHeader () -: OptionField (2) + : OptionField (2) { } @@ -259,7 +259,7 @@ TypeId Ipv6ExtensionDestinationHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionDestinationHeader") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -269,7 +269,7 @@ TypeId Ipv6ExtensionDestinationHeader::GetInstanceTypeId () const } Ipv6ExtensionDestinationHeader::Ipv6ExtensionDestinationHeader () -: OptionField (2) + : OptionField (2) { } @@ -315,7 +315,7 @@ TypeId Ipv6ExtensionFragmentHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionFragmentHeader") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -326,7 +326,7 @@ TypeId Ipv6ExtensionFragmentHeader::GetInstanceTypeId () const Ipv6ExtensionFragmentHeader::Ipv6ExtensionFragmentHeader () : m_offset (0), - m_identification (0) + m_identification (0) { } @@ -369,7 +369,7 @@ uint32_t Ipv6ExtensionFragmentHeader::GetIdentification () const void Ipv6ExtensionFragmentHeader::Print (std::ostream &os) const { os << "( nextHeader = " << (uint32_t)GetNextHeader () << " length = " << (uint32_t)GetLength () - << " offset = " << (uint32_t)GetOffset () << " MF = " << (uint32_t)GetMoreFragment () << " identification = " << (uint32_t)m_identification << " )"; + << " offset = " << (uint32_t)GetOffset () << " MF = " << (uint32_t)GetMoreFragment () << " identification = " << (uint32_t)m_identification << " )"; } uint32_t Ipv6ExtensionFragmentHeader::GetSerializedSize () const @@ -406,7 +406,7 @@ TypeId Ipv6ExtensionRoutingHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionRoutingHeader") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -417,7 +417,7 @@ TypeId Ipv6ExtensionRoutingHeader::GetInstanceTypeId () const Ipv6ExtensionRoutingHeader::Ipv6ExtensionRoutingHeader () : m_typeRouting (0), - m_segmentsLeft (0) + m_segmentsLeft (0) { } @@ -448,7 +448,7 @@ uint8_t Ipv6ExtensionRoutingHeader::GetSegmentsLeft () const void Ipv6ExtensionRoutingHeader::Print (std::ostream &os) const { os << "( nextHeader = " << (uint32_t)GetNextHeader () << " length = " << (uint32_t)GetLength () - << " typeRouting = " << (uint32_t)m_typeRouting << " segmentsLeft = " << (uint32_t)m_segmentsLeft << " )"; + << " typeRouting = " << (uint32_t)m_typeRouting << " segmentsLeft = " << (uint32_t)m_segmentsLeft << " )"; } uint32_t Ipv6ExtensionRoutingHeader::GetSerializedSize () const @@ -485,7 +485,7 @@ TypeId Ipv6ExtensionLooseRoutingHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionLooseRoutingHeader") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -532,7 +532,7 @@ Ipv6Address Ipv6ExtensionLooseRoutingHeader::GetRouterAddress (uint8_t index) co void Ipv6ExtensionLooseRoutingHeader::Print (std::ostream &os) const { os << "( nextHeader = " << (uint32_t)GetNextHeader () << " length = " << (uint32_t)GetLength () - << " typeRouting = " << (uint32_t)GetTypeRouting () << " segmentsLeft = " << (uint32_t)GetSegmentsLeft () << " "; + << " typeRouting = " << (uint32_t)GetTypeRouting () << " segmentsLeft = " << (uint32_t)GetSegmentsLeft () << " "; for (std::vector::const_iterator it = m_routersAddress.begin (); it != m_routersAddress.end (); it++) { @@ -592,7 +592,7 @@ TypeId Ipv6ExtensionESPHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionESPHeader") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -638,7 +638,7 @@ TypeId Ipv6ExtensionAHHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionAHHeader") .AddConstructor () .SetParent () - ; + ; return tid; } diff --git a/src/internet/model/ipv6-extension.cc b/src/internet/model/ipv6-extension.cc index 438eb678e..02b6e2bf2 100644 --- a/src/internet/model/ipv6-extension.cc +++ b/src/internet/model/ipv6-extension.cc @@ -58,7 +58,7 @@ TypeId Ipv6Extension::GetTypeId () MakeUintegerChecker ()) .AddTraceSource ("Drop", "Drop ipv6 packet", MakeTraceSourceAccessor (&Ipv6Extension::m_dropTrace)) - ; + ; return tid; } @@ -177,7 +177,7 @@ TypeId Ipv6ExtensionHopByHop::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionHopByHop") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -229,7 +229,7 @@ TypeId Ipv6ExtensionDestination::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionDestination") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -281,7 +281,7 @@ TypeId Ipv6ExtensionFragment::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionFragment") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -616,7 +616,7 @@ TypeId Ipv6ExtensionRouting::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionRouting") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -704,7 +704,7 @@ TypeId Ipv6ExtensionRoutingDemux::GetTypeId () ObjectVectorValue (), MakeObjectVectorAccessor (&Ipv6ExtensionRoutingDemux::m_extensionsRouting), MakeObjectVectorChecker ()) - ; + ; return tid; } @@ -763,7 +763,7 @@ TypeId Ipv6ExtensionLooseRouting::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionLooseRouting") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -916,7 +916,7 @@ TypeId Ipv6ExtensionESP::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionESP") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -954,7 +954,7 @@ TypeId Ipv6ExtensionAH::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6ExtensionAH") .SetParent () .AddConstructor () - ; + ; return tid; } diff --git a/src/internet/model/ipv6-extension.h b/src/internet/model/ipv6-extension.h index f0b8107b8..3d2d8e4dc 100644 --- a/src/internet/model/ipv6-extension.h +++ b/src/internet/model/ipv6-extension.h @@ -226,10 +226,10 @@ public: */ static const uint8_t EXT_NUMBER = 44; - /** - * \brief Get the type identificator. - * \return type identificator - */ + /** + * \brief Get the type identificator. + * \return type identificator + */ static TypeId GetTypeId (); /** @@ -282,7 +282,7 @@ private: */ class Fragments : public SimpleRefCount { - public: +public: /** * \brief Constructor. */ @@ -319,7 +319,7 @@ private: */ Ptr GetPacket () const; - private: +private: /** * \brief If other fragments will be sent. */ @@ -377,7 +377,7 @@ public: /** * \brief Destructor. */ - ~Ipv6ExtensionRouting (); + ~Ipv6ExtensionRouting (); /** * \brief Get the extension number. @@ -454,7 +454,7 @@ public: */ void Remove (Ptr extensionRouting); -protected: +protected: /** * \brief Dispose this object. */ diff --git a/src/internet/model/ipv6-header.cc b/src/internet/model/ipv6-header.cc index cd2190c46..d23ffcfdf 100644 --- a/src/internet/model/ipv6-header.cc +++ b/src/internet/model/ipv6-header.cc @@ -33,11 +33,11 @@ NS_OBJECT_ENSURE_REGISTERED (Ipv6Header); Ipv6Header::Ipv6Header () : m_version (6), - m_trafficClass (0), - m_flowLabel (1), - m_payloadLength (0), - m_nextHeader (0), - m_hopLimit (0) + m_trafficClass (0), + m_flowLabel (1), + m_payloadLength (0), + m_nextHeader (0), + m_hopLimit (0) { SetSourceAddress (Ipv6Address ("::")); SetDestinationAddress (Ipv6Address ("::")); @@ -118,7 +118,7 @@ TypeId Ipv6Header::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv6Header") .SetParent
() .AddConstructor () - ; + ; return tid; } @@ -130,14 +130,14 @@ TypeId Ipv6Header::GetInstanceTypeId (void) const void Ipv6Header::Print (std::ostream& os) const { os << "(" - "Version " << m_version << " " - << "Traffic class 0x" << std::hex << m_trafficClass << std::dec << " " - << "Flow Label 0x" << std::hex << m_flowLabel << std::dec << " " - << "Payload Length " << m_payloadLength << " " - << "Next Header " << std::dec << (uint32_t) m_nextHeader << " " - << "Hop Limit " << std::dec << (uint32_t)m_hopLimit << " )" - << m_sourceAddress << " > " << m_destinationAddress - ; + "Version " << m_version << " " + << "Traffic class 0x" << std::hex << m_trafficClass << std::dec << " " + << "Flow Label 0x" << std::hex << m_flowLabel << std::dec << " " + << "Payload Length " << m_payloadLength << " " + << "Next Header " << std::dec << (uint32_t) m_nextHeader << " " + << "Hop Limit " << std::dec << (uint32_t)m_hopLimit << " )" + << m_sourceAddress << " > " << m_destinationAddress + ; } uint32_t Ipv6Header::GetSerializedSize () const diff --git a/src/internet/model/ipv6-interface-address.cc b/src/internet/model/ipv6-interface-address.cc index 22f1d298c..ef7c7b062 100644 --- a/src/internet/model/ipv6-interface-address.cc +++ b/src/internet/model/ipv6-interface-address.cc @@ -32,10 +32,10 @@ NS_LOG_COMPONENT_DEFINE ("Ipv6InterfaceAddress"); Ipv6InterfaceAddress::Ipv6InterfaceAddress () : m_address (Ipv6Address ()), - m_prefix (Ipv6Prefix ()), - m_state (TENTATIVE_OPTIMISTIC), - m_scope (HOST), - m_nsDadUid (0) + m_prefix (Ipv6Prefix ()), + m_state (TENTATIVE_OPTIMISTIC), + m_scope (HOST), + m_nsDadUid (0) { NS_LOG_FUNCTION (this); } @@ -60,11 +60,12 @@ Ipv6InterfaceAddress::Ipv6InterfaceAddress (Ipv6Address address, Ipv6Prefix pref Ipv6InterfaceAddress::Ipv6InterfaceAddress (const Ipv6InterfaceAddress& o) : m_address (o.m_address), - m_prefix (o.m_prefix), - m_state (o.m_state), - m_scope (o.m_scope), - m_nsDadUid (o.m_nsDadUid) -{} + m_prefix (o.m_prefix), + m_state (o.m_state), + m_scope (o.m_scope), + m_nsDadUid (o.m_nsDadUid) +{ +} Ipv6InterfaceAddress::~Ipv6InterfaceAddress () { @@ -133,7 +134,7 @@ Ipv6InterfaceAddress::Scope_e Ipv6InterfaceAddress::GetScope () const std::ostream& operator<< (std::ostream& os, const Ipv6InterfaceAddress &addr) { os << "address=" << addr.GetAddress () << "; prefix=" << - addr.GetPrefix () << "; scope=" << addr.GetScope (); + addr.GetPrefix () << "; scope=" << addr.GetScope (); return os; } diff --git a/src/internet/model/ipv6-interface.cc b/src/internet/model/ipv6-interface.cc index b21a026ca..d8e726637 100644 --- a/src/internet/model/ipv6-interface.cc +++ b/src/internet/model/ipv6-interface.cc @@ -38,20 +38,20 @@ TypeId Ipv6Interface::GetTypeId () { static TypeId tid = TypeId ("ns3::Ipv6Interface") .SetParent () - ; + ; return tid; } Ipv6Interface::Ipv6Interface () : m_ifup (false), - m_forwarding (true), - m_metric (1), - m_node (0), - m_device (0), - m_curHopLimit (0), - m_baseReachableTime (0), - m_reachableTime (0), - m_retransTimer (0) + m_forwarding (true), + m_metric (1), + m_node (0), + m_device (0), + m_curHopLimit (0), + m_baseReachableTime (0), + m_reachableTime (0), + m_retransTimer (0) { NS_LOG_FUNCTION (this); } @@ -330,7 +330,7 @@ void Ipv6Interface::Send (Ptr p, Ipv6Address dest) m_device->GetBroadcast (), m_device->GetBroadcast (), NetDevice::PACKET_HOST // note: linux uses PACKET_LOOPBACK here - ); + ); return; } } @@ -362,7 +362,7 @@ void Ipv6Interface::Send (Ptr p, Ipv6Address dest) if (found) { NS_LOG_LOGIC ("Address Resolved. Send."); - m_device ->Send (p, hardwareDestination, Ipv6L3Protocol::PROT_NUMBER); + m_device->Send (p, hardwareDestination, Ipv6L3Protocol::PROT_NUMBER); } } else diff --git a/src/internet/model/ipv6-l3-protocol.cc b/src/internet/model/ipv6-l3-protocol.cc index 0286b1489..3b936a3c2 100644 --- a/src/internet/model/ipv6-l3-protocol.cc +++ b/src/internet/model/ipv6-l3-protocol.cc @@ -70,7 +70,7 @@ TypeId Ipv6L3Protocol::GetTypeId () MakeTraceSourceAccessor (&Ipv6L3Protocol::m_rxTrace)) .AddTraceSource ("Drop", "Drop IPv6 packet", MakeTraceSourceAccessor (&Ipv6L3Protocol::m_dropTrace)) - ; + ; return tid; } @@ -657,7 +657,7 @@ void Ipv6L3Protocol::Send (Ptr packet, Ipv6Address source, Ipv6Address d else { NS_LOG_WARN ("No route to host, drop!"); - m_dropTrace (hdr, packet, DROP_NO_ROUTE, GetInterfaceForDevice(oif)); + m_dropTrace (hdr, packet, DROP_NO_ROUTE, m_node->GetObject (), GetInterfaceForDevice(oif)); } } @@ -677,7 +677,7 @@ void Ipv6L3Protocol::Receive (Ptr device, Ptr p, uint16 { if (ipv6Interface->IsUp ()) { - m_rxTrace (packet, interface); + m_rxTrace (packet, m_node->GetObject (), interface); break; } else @@ -685,7 +685,7 @@ void Ipv6L3Protocol::Receive (Ptr device, Ptr p, uint16 NS_LOG_LOGIC ("Dropping received packet-- interface is down"); Ipv6Header hdr; packet->RemoveHeader (hdr); - m_dropTrace (hdr, packet, DROP_INTERFACE_DOWN, interface); + m_dropTrace (hdr, packet, DROP_INTERFACE_DOWN, m_node->GetObject (), interface); return; } } @@ -728,14 +728,14 @@ void Ipv6L3Protocol::Receive (Ptr device, Ptr p, uint16 } } - if (! m_routingProtocol->RouteInput (packet, hdr, device, - MakeCallback (&Ipv6L3Protocol::IpForward, this), - MakeCallback (&Ipv6L3Protocol::IpMulticastForward, this), - MakeCallback (&Ipv6L3Protocol::LocalDeliver, this), - MakeCallback (&Ipv6L3Protocol::RouteInputError, this))) + if (!m_routingProtocol->RouteInput (packet, hdr, device, + MakeCallback (&Ipv6L3Protocol::IpForward, this), + MakeCallback (&Ipv6L3Protocol::IpMulticastForward, this), + MakeCallback (&Ipv6L3Protocol::LocalDeliver, this), + MakeCallback (&Ipv6L3Protocol::RouteInputError, this))) { NS_LOG_WARN ("No route found for forwarding packet. Drop."); - m_dropTrace (hdr, packet, DROP_NO_ROUTE, interface); + m_dropTrace (hdr, packet, DROP_NO_ROUTE, m_node->GetObject (), interface); } } @@ -789,21 +789,21 @@ void Ipv6L3Protocol::SendRealOut (Ptr route, Ptr packet, Ipv6 /* IPv6 header is already added in fragments */ for (std::list >::const_iterator it = fragments.begin (); it != fragments.end (); it++) { - m_txTrace (*it, interface); + m_txTrace (*it, m_node->GetObject (), interface); outInterface->Send (*it, route->GetGateway ()); } } else { packet->AddHeader (ipHeader); - m_txTrace (packet, interface); + m_txTrace (packet, m_node->GetObject (), interface); outInterface->Send (packet, route->GetGateway ()); } } else { NS_LOG_LOGIC ("Dropping-- outgoing interface is down: " << route->GetGateway ()); - m_dropTrace (ipHeader, packet, DROP_INTERFACE_DOWN, interface); + m_dropTrace (ipHeader, packet, DROP_INTERFACE_DOWN, m_node->GetObject (), interface); } } else @@ -819,21 +819,21 @@ void Ipv6L3Protocol::SendRealOut (Ptr route, Ptr packet, Ipv6 /* IPv6 header is already added in fragments */ for (std::list >::const_iterator it = fragments.begin (); it != fragments.end (); it++) { - m_txTrace (*it, interface); + m_txTrace (*it, m_node->GetObject (), interface); outInterface->Send (*it, ipHeader.GetDestinationAddress ()); } } else { packet->AddHeader (ipHeader); - m_txTrace (packet, interface); + m_txTrace (packet, m_node->GetObject (), interface); outInterface->Send (packet, ipHeader.GetDestinationAddress ()); } } else { NS_LOG_LOGIC ("Dropping-- outgoing interface is down: " << ipHeader.GetDestinationAddress ()); - m_dropTrace (ipHeader, packet, DROP_INTERFACE_DOWN, interface); + m_dropTrace (ipHeader, packet, DROP_INTERFACE_DOWN, m_node->GetObject (), interface); } } } @@ -857,7 +857,7 @@ void Ipv6L3Protocol::IpForward (Ptr rtentry, Ptr p, con if (ipHeader.GetHopLimit () == 0) { NS_LOG_WARN ("TTL exceeded. Drop."); - m_dropTrace (ipHeader, packet, DROP_TTL_EXPIRED, 0); + m_dropTrace (ipHeader, packet, DROP_TTL_EXPIRED, m_node->GetObject (), 0); // Do not reply to ICMPv6 or to multicast IPv6 address if (ipHeader.GetNextHeader () != Icmpv6L4Protocol::PROT_NUMBER && ipHeader.GetDestinationAddress ().IsMulticast () == false) @@ -910,31 +910,30 @@ void Ipv6L3Protocol::IpMulticastForward (Ptr mrtentry, PtrGetId ()); - // The output interfaces we could forward this onto are encoded - // in the OutputTtl of the Ipv6MulticastRoute - for (uint32_t i = 0 ; i < Ipv6MulticastRoute::MAX_INTERFACES ; i++) - { - if (mrtentry->GetOutputTtl (i) < Ipv6MulticastRoute::MAX_TTL) - { - Ptr packet = p->Copy (); - Ipv6Header h = header; - h.SetHopLimit (header.GetHopLimit () - 1); - if (h.GetHopLimit () == 0) - { - NS_LOG_WARN ("TTL exceeded. Drop."); - m_dropTrace (header, packet, DROP_TTL_EXPIRED, i); - return; - } + std::map ttlMap = mrtentry->GetOutputTtlMap(); + std::map::iterator mapIter; - NS_LOG_LOGIC ("Forward multicast via interface " << i); - Ptr rtentry = Create (); - rtentry->SetSource (h.GetSourceAddress ()); - rtentry->SetDestination (h.GetDestinationAddress ()); - rtentry->SetGateway (Ipv6Address::GetAny ()); - rtentry->SetOutputDevice (GetNetDevice (i)); - SendRealOut (rtentry, packet, h); - continue; + for (mapIter = ttlMap.begin(); mapIter != ttlMap.end(); mapIter++) + { + uint32_t interfaceId = mapIter->first; + //uint32_t outputTtl = mapIter->second; // Unused for now + Ptr packet = p->Copy (); + Ipv6Header h = header; + h.SetHopLimit (header.GetHopLimit () - 1); + if (h.GetHopLimit () == 0) + { + NS_LOG_WARN ("TTL exceeded. Drop."); + m_dropTrace (header, packet, DROP_TTL_EXPIRED, m_node->GetObject (), interfaceId); + return; } + NS_LOG_LOGIC ("Forward multicast via interface " << interfaceId); + Ptr rtentry = Create (); + rtentry->SetSource (h.GetSourceAddress ()); + rtentry->SetDestination (h.GetDestinationAddress ()); + rtentry->SetGateway (Ipv6Address::GetAny ()); + rtentry->SetOutputDevice (GetNetDevice (interfaceId)); + SendRealOut (rtentry, packet, h); + continue; } } @@ -993,7 +992,7 @@ void Ipv6L3Protocol::LocalDeliver (Ptr packet, Ipv6Header const& i { GetIcmpv6 ()->SendErrorParameterError (malformedPacket, dst, Icmpv6Header::ICMPV6_UNKNOWN_NEXT_HEADER, ip.GetSerializedSize () + nextHeaderPosition); } - m_dropTrace (ip, p, DROP_UNKNOWN_PROTOCOL, iif); + m_dropTrace (ip, p, DROP_UNKNOWN_PROTOCOL, m_node->GetObject (), iif); break; } else @@ -1023,14 +1022,14 @@ void Ipv6L3Protocol::LocalDeliver (Ptr packet, Ipv6Header const& i } } } - } while (ipv6Extension); + } while (ipv6Extension); } void Ipv6L3Protocol::RouteInputError (Ptr p, const Ipv6Header& ipHeader, Socket::SocketErrno sockErrno) { NS_LOG_FUNCTION (this << p << ipHeader << sockErrno); NS_LOG_LOGIC ("Route input failure-- dropping packet to " << ipHeader << " with errno " << sockErrno); - m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, 0); + m_dropTrace (ipHeader, p, DROP_ROUTE_ERROR, m_node->GetObject (), 0); } Ipv6Header Ipv6L3Protocol::BuildHeader (Ipv6Address src, Ipv6Address dst, uint8_t protocol, uint16_t payloadSize, uint8_t ttl) diff --git a/src/internet/model/ipv6-l3-protocol.h b/src/internet/model/ipv6-l3-protocol.h index 5d3521d71..c0f49edf4 100644 --- a/src/internet/model/ipv6-l3-protocol.h +++ b/src/internet/model/ipv6-l3-protocol.h @@ -368,17 +368,17 @@ private: /** * \brief Callback to trace TX (transmission) packets. */ - TracedCallback, uint32_t> m_txTrace; + TracedCallback, Ptr, uint32_t> m_txTrace; /** * \brief Callback to trace RX (reception) packets. */ - TracedCallback, uint32_t> m_rxTrace; + TracedCallback, Ptr, uint32_t> m_rxTrace; /** * \brief Callback to trace drop packets. */ - TracedCallback, DropReason, uint32_t> m_dropTrace; + TracedCallback, DropReason, Ptr, uint32_t> m_dropTrace; /** * \brief Copy constructor. diff --git a/src/internet/model/ipv6-l4-protocol.cc b/src/internet/model/ipv6-l4-protocol.cc index 430166e77..86deb8cea 100644 --- a/src/internet/model/ipv6-l4-protocol.cc +++ b/src/internet/model/ipv6-l4-protocol.cc @@ -32,10 +32,10 @@ TypeId Ipv6L4Protocol::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6L4Protocol") .SetParent () .AddAttribute ("ProtocolNumber", "The IPv6 protocol number.", - UintegerValue (0), - MakeUintegerAccessor (&Ipv6L4Protocol::GetProtocolNumber), - MakeUintegerChecker ()) - ; + UintegerValue (0), + MakeUintegerAccessor (&Ipv6L4Protocol::GetProtocolNumber), + MakeUintegerChecker ()) + ; return tid; } diff --git a/src/internet/model/ipv6-list-routing.cc b/src/internet/model/ipv6-list-routing.cc index 77b12bce5..5127ed560 100644 --- a/src/internet/model/ipv6-list-routing.cc +++ b/src/internet/model/ipv6-list-routing.cc @@ -36,7 +36,7 @@ Ipv6ListRouting::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv6ListRouting") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -116,16 +116,16 @@ Ipv6ListRouting::RouteInput (Ptr p, const Ipv6Header &header, Ptr< #ifdef NOTYET if (m_ipv6->MulticastCheckGroup (iif, dst)) #endif - if (true) - { - NS_LOG_LOGIC ("Multicast packet for me-- local deliver"); - Ptr packetCopy = p->Copy (); - // Here may want to disable lcb callback in recursive RouteInput - // call below - lcb (packetCopy, header, iif); - // Fall through-- we may also need to forward this - retVal = true; - } + if (true) + { + NS_LOG_LOGIC ("Multicast packet for me-- local deliver"); + Ptr packetCopy = p->Copy (); + // Here may want to disable lcb callback in recursive RouteInput + // call below + lcb (packetCopy, header, iif); + // Fall through-- we may also need to forward this + retVal = true; + } /* do not forward link-local multicast address */ if (dst == Ipv6Address::GetAllNodesMulticast () || dst == Ipv6Address::GetAllRoutersMulticast () || dst == Ipv6Address::GetAllHostsMulticast ()) @@ -134,7 +134,7 @@ Ipv6ListRouting::RouteInput (Ptr p, const Ipv6Header &header, Ptr< } for (Ipv6RoutingProtocolList::const_iterator rprotoIter = - m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { NS_LOG_LOGIC ("Multicast packet for me-- trying to forward"); @@ -183,7 +183,7 @@ Ipv6ListRouting::RouteInput (Ptr p, const Ipv6Header &header, Ptr< } // Next, try to find a route for (Ipv6RoutingProtocolList::const_iterator rprotoIter = - m_routingProtocols.begin (); + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { @@ -192,7 +192,7 @@ Ipv6ListRouting::RouteInput (Ptr p, const Ipv6Header &header, Ptr< return true; } } - // No routing protocol has found a route. + // No routing protocol has found a route. return retVal; } @@ -201,55 +201,55 @@ Ipv6ListRouting::NotifyInterfaceUp (uint32_t interface) { NS_LOG_FUNCTION (this << interface); for (Ipv6RoutingProtocolList::const_iterator rprotoIter = - m_routingProtocols.begin (); + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { (*rprotoIter).second->NotifyInterfaceUp (interface); - } + } } void Ipv6ListRouting::NotifyInterfaceDown (uint32_t interface) { NS_LOG_FUNCTION (this << interface); for (Ipv6RoutingProtocolList::const_iterator rprotoIter = - m_routingProtocols.begin (); + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { (*rprotoIter).second->NotifyInterfaceDown (interface); - } + } } void Ipv6ListRouting::NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) { NS_LOG_FUNCTION (this << interface << address); for (Ipv6RoutingProtocolList::const_iterator rprotoIter = - m_routingProtocols.begin (); + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { (*rprotoIter).second->NotifyAddAddress (interface, address); - } + } } void Ipv6ListRouting::NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) { NS_LOG_FUNCTION (this << interface << address); for (Ipv6RoutingProtocolList::const_iterator rprotoIter = - m_routingProtocols.begin (); + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { (*rprotoIter).second->NotifyRemoveAddress (interface, address); - } + } } void Ipv6ListRouting::NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) { NS_LOG_FUNCTION (this << dst << mask << nextHop << interface); for (Ipv6RoutingProtocolList::const_iterator rprotoIter = - m_routingProtocols.begin (); + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { @@ -261,7 +261,7 @@ void Ipv6ListRouting::NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6A { NS_LOG_FUNCTION (this << dst << mask << nextHop << interface); for (Ipv6RoutingProtocolList::const_iterator rprotoIter = - m_routingProtocols.begin (); + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { @@ -275,12 +275,12 @@ Ipv6ListRouting::SetIpv6 (Ptr ipv6) NS_LOG_FUNCTION (this << ipv6); NS_ASSERT (m_ipv6 == 0); for (Ipv6RoutingProtocolList::const_iterator rprotoIter = - m_routingProtocols.begin (); + m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { (*rprotoIter).second->SetIpv6 (ipv6); - } + } m_ipv6 = ipv6; } diff --git a/src/internet/model/ipv6-list-routing.h b/src/internet/model/ipv6-list-routing.h index d2fe0373a..bdeff3777 100644 --- a/src/internet/model/ipv6-list-routing.h +++ b/src/internet/model/ipv6-list-routing.h @@ -25,7 +25,7 @@ namespace ns3 { /** - * \ingroup routing + * \ingroup internet * \defgroup ipv6ListRouting Ipv6 List Routing */ @@ -56,18 +56,18 @@ public: /** * \brief Constructor. */ - Ipv6ListRouting (); + Ipv6ListRouting (); /** * \brief Destructor. */ - virtual ~Ipv6ListRouting (); + virtual ~Ipv6ListRouting (); /** * \brief Register a new routing protocol to be used in this IPv4 stack * \param routingProtocol new routing protocol implementation object * \param priority priority to give to this routing protocol. - * Values may range between -32768 and +32767. + * Values may range between -32768 and +32767. */ virtual void AddRoutingProtocol (Ptr routingProtocol, int16_t priority); diff --git a/src/internet/model/ipv6-option-demux.cc b/src/internet/model/ipv6-option-demux.cc index 254793ad6..e40f6b4dd 100644 --- a/src/internet/model/ipv6-option-demux.cc +++ b/src/internet/model/ipv6-option-demux.cc @@ -38,7 +38,7 @@ TypeId Ipv6OptionDemux::GetTypeId () ObjectVectorValue (), MakeObjectVectorAccessor (&Ipv6OptionDemux::m_options), MakeObjectVectorChecker ()) - ; + ; return tid; } diff --git a/src/internet/model/ipv6-option-header.cc b/src/internet/model/ipv6-option-header.cc index 681606eec..594f7add1 100644 --- a/src/internet/model/ipv6-option-header.cc +++ b/src/internet/model/ipv6-option-header.cc @@ -35,7 +35,7 @@ TypeId Ipv6OptionHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6OptionHeader") .AddConstructor () .SetParent
() - ; + ; return tid; } @@ -46,7 +46,7 @@ TypeId Ipv6OptionHeader::GetInstanceTypeId () const Ipv6OptionHeader::Ipv6OptionHeader () : m_type (0), - m_length (0) + m_length (0) { } @@ -113,7 +113,7 @@ uint32_t Ipv6OptionHeader::Deserialize (Buffer::Iterator start) Ipv6OptionHeader::Alignment Ipv6OptionHeader::GetAlignment () const { - return (Alignment){1,0}; + return (Alignment){ 1,0}; } NS_OBJECT_ENSURE_REGISTERED (Ipv6OptionPad1Header); @@ -123,7 +123,7 @@ TypeId Ipv6OptionPad1Header::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6OptionPad1Header") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -174,7 +174,7 @@ TypeId Ipv6OptionPadnHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6OptionPadnHeader") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -234,7 +234,7 @@ TypeId Ipv6OptionJumbogramHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6OptionJumbogramHeader") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -295,7 +295,7 @@ uint32_t Ipv6OptionJumbogramHeader::Deserialize (Buffer::Iterator start) Ipv6OptionHeader::Alignment Ipv6OptionJumbogramHeader::GetAlignment () const { - return (Alignment){4,2}; //4n+2 + return (Alignment){ 4,2}; //4n+2 } NS_OBJECT_ENSURE_REGISTERED (Ipv6OptionRouterAlertHeader); @@ -305,7 +305,7 @@ TypeId Ipv6OptionRouterAlertHeader::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6OptionRouterAlertHeader") .AddConstructor () .SetParent () - ; + ; return tid; } @@ -336,7 +336,7 @@ uint16_t Ipv6OptionRouterAlertHeader::GetValue () const void Ipv6OptionRouterAlertHeader::Print (std::ostream &os) const { - os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLength () << " value = " << (uint32_t)m_value << " )"; + os << "( type = " << (uint32_t)GetType () << " length = " << (uint32_t)GetLength () << " value = " << (uint32_t)m_value << " )"; } uint32_t Ipv6OptionRouterAlertHeader::GetSerializedSize () const @@ -366,7 +366,7 @@ uint32_t Ipv6OptionRouterAlertHeader::Deserialize (Buffer::Iterator start) Ipv6OptionHeader::Alignment Ipv6OptionRouterAlertHeader::GetAlignment () const { - return (Alignment){2,0}; //2n+0 + return (Alignment){ 2,0}; //2n+0 } } /* namespace ns3 */ diff --git a/src/internet/model/ipv6-option-header.h b/src/internet/model/ipv6-option-header.h index 02b8f72b6..faa97c9a0 100644 --- a/src/internet/model/ipv6-option-header.h +++ b/src/internet/model/ipv6-option-header.h @@ -34,117 +34,117 @@ namespace ns3 */ class Ipv6OptionHeader : public Header { - public: +public: - /** - * \struct Alignment - * \brief represents the alignment requirements of an option header - * - * Represented as factor*n+offset (eg. 8n+2) See RFC 2460. - * No alignment is represented as 1n+0. - */ - struct Alignment - { - uint8_t factor; /**< Factor */ - uint8_t offset; /**< Offset */ - }; + /** + * \struct Alignment + * \brief represents the alignment requirements of an option header + * + * Represented as factor*n+offset (eg. 8n+2) See RFC 2460. + * No alignment is represented as 1n+0. + */ + struct Alignment + { + uint8_t factor; /**< Factor */ + uint8_t offset; /**< Offset */ + }; - /** - * \brief Get the type identificator. - * \return type identificator - */ - static TypeId GetTypeId (); + /** + * \brief Get the type identificator. + * \return type identificator + */ + static TypeId GetTypeId (); - /** - * \brief Get the instance type ID. - * \return instance type ID - */ - virtual TypeId GetInstanceTypeId () const; + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; - /** - * \brief Constructor. - */ - Ipv6OptionHeader (); + /** + * \brief Constructor. + */ + Ipv6OptionHeader (); - /** - * \brief Destructor. - */ - virtual ~Ipv6OptionHeader (); + /** + * \brief Destructor. + */ + virtual ~Ipv6OptionHeader (); - /** - * \brief Set the type of the option. - * \param type the type of the option - */ - void SetType (uint8_t type); + /** + * \brief Set the type of the option. + * \param type the type of the option + */ + void SetType (uint8_t type); - /** - * \brief Get the type of the option. - * \return the type of the option - */ - uint8_t GetType () const; + /** + * \brief Get the type of the option. + * \return the type of the option + */ + uint8_t GetType () const; - /** - * \brief Set the option length. - * \param length the option length - */ - void SetLength (uint8_t length); + /** + * \brief Set the option length. + * \param length the option length + */ + void SetLength (uint8_t length); - /** - * \brief Get the option length. - * \return the option length - */ - uint8_t GetLength () const; + /** + * \brief Get the option length. + * \return the option length + */ + uint8_t GetLength () const; - /** - * \brief Print some informations about the packet. - * \param os output stream - * \return info about this packet - */ - virtual void Print (std::ostream &os) const; + /** + * \brief Print some informations about the packet. + * \param os output stream + * \return info about this packet + */ + virtual void Print (std::ostream &os) const; - /** - * \brief Get the serialized size of the packet. - * \return size - */ - virtual uint32_t GetSerializedSize () const; + /** + * \brief Get the serialized size of the packet. + * \return size + */ + virtual uint32_t GetSerializedSize () const; - /** - * \brief Serialize the packet. - * \param start Buffer iterator - */ - virtual void Serialize (Buffer::Iterator start) const; + /** + * \brief Serialize the packet. + * \param start Buffer iterator + */ + virtual void Serialize (Buffer::Iterator start) const; - /** - * \brief Deserialize the packet. - * \param start Buffer iterator - * \return size of the packet - */ - virtual uint32_t Deserialize (Buffer::Iterator start); + /** + * \brief Deserialize the packet. + * \param start Buffer iterator + * \return size of the packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); - /** - * \brief Get the Alignment requirement of this option header - * \return The required alignment - * - * Subclasses should only implement this method, if special alignment is - * required. Default is no alignment (1n+0). - */ - virtual Alignment GetAlignment () const; + /** + * \brief Get the Alignment requirement of this option header + * \return The required alignment + * + * Subclasses should only implement this method, if special alignment is + * required. Default is no alignment (1n+0). + */ + virtual Alignment GetAlignment () const; - private: - /** - * \brief The type of the option. - */ - uint8_t m_type; +private: + /** + * \brief The type of the option. + */ + uint8_t m_type; - /** - * \brief The option length. - */ - uint8_t m_length; + /** + * \brief The option length. + */ + uint8_t m_length; - /** - * \brief The anonymous data of this option - */ - Buffer m_data; + /** + * \brief The anonymous data of this option + */ + Buffer m_data; }; /** @@ -153,54 +153,54 @@ class Ipv6OptionHeader : public Header */ class Ipv6OptionPad1Header : public Ipv6OptionHeader { - public: - /** - * \brief Get the type identificator. - * \return type identificator - */ - static TypeId GetTypeId (); +public: + /** + * \brief Get the type identificator. + * \return type identificator + */ + static TypeId GetTypeId (); - /** - * \brief Get the instance type ID. - * \return instance type ID - */ - virtual TypeId GetInstanceTypeId () const; + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; - /** - * \brief Constructor. - */ - Ipv6OptionPad1Header (); + /** + * \brief Constructor. + */ + Ipv6OptionPad1Header (); - /** - * \brief Destructor. - */ - virtual ~Ipv6OptionPad1Header (); + /** + * \brief Destructor. + */ + virtual ~Ipv6OptionPad1Header (); - /** - * \brief Print some informations about the packet. - * \param os output stream - * \return info about this packet - */ - virtual void Print (std::ostream &os) const; + /** + * \brief Print some informations about the packet. + * \param os output stream + * \return info about this packet + */ + virtual void Print (std::ostream &os) const; - /** - * \brief Get the serialized size of the packet. - * \return size - */ - virtual uint32_t GetSerializedSize () const; + /** + * \brief Get the serialized size of the packet. + * \return size + */ + virtual uint32_t GetSerializedSize () const; - /** - * \brief Serialize the packet. - * \param start Buffer iterator - */ - virtual void Serialize (Buffer::Iterator start) const; + /** + * \brief Serialize the packet. + * \param start Buffer iterator + */ + virtual void Serialize (Buffer::Iterator start) const; - /** - * \brief Deserialize the packet. - * \param start Buffer iterator - * \return size of the packet - */ - virtual uint32_t Deserialize (Buffer::Iterator start); + /** + * \brief Deserialize the packet. + * \param start Buffer iterator + * \return size of the packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); }; /** @@ -209,55 +209,55 @@ class Ipv6OptionPad1Header : public Ipv6OptionHeader */ class Ipv6OptionPadnHeader : public Ipv6OptionHeader { - public: - /** - * \brief Get the type identificator. - * \return type identificator - */ - static TypeId GetTypeId (); +public: + /** + * \brief Get the type identificator. + * \return type identificator + */ + static TypeId GetTypeId (); - /** - * \brief Get the instance type ID. - * \return instance type ID - */ - virtual TypeId GetInstanceTypeId () const; + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; - /** - * \brief Constructor. - * \param pad Number of bytes to pad (>=2) - */ - Ipv6OptionPadnHeader (uint32_t pad = 2); + /** + * \brief Constructor. + * \param pad Number of bytes to pad (>=2) + */ + Ipv6OptionPadnHeader (uint32_t pad = 2); - /** - * \brief Destructor. - */ - virtual ~Ipv6OptionPadnHeader (); + /** + * \brief Destructor. + */ + virtual ~Ipv6OptionPadnHeader (); - /** - * \brief Print some informations about the packet. - * \param os output stream - * \return info about this packet - */ - virtual void Print (std::ostream &os) const; + /** + * \brief Print some informations about the packet. + * \param os output stream + * \return info about this packet + */ + virtual void Print (std::ostream &os) const; - /** - * \brief Get the serialized size of the packet. - * \return size - */ - virtual uint32_t GetSerializedSize () const; + /** + * \brief Get the serialized size of the packet. + * \return size + */ + virtual uint32_t GetSerializedSize () const; - /** - * \brief Serialize the packet. - * \param start Buffer iterator - */ - virtual void Serialize (Buffer::Iterator start) const; + /** + * \brief Serialize the packet. + * \param start Buffer iterator + */ + virtual void Serialize (Buffer::Iterator start) const; - /** - * \brief Deserialize the packet. - * \param start Buffer iterator - * \return size of the packet - */ - virtual uint32_t Deserialize (Buffer::Iterator start); + /** + * \brief Deserialize the packet. + * \param start Buffer iterator + * \return size of the packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); }; /** @@ -266,78 +266,78 @@ class Ipv6OptionPadnHeader : public Ipv6OptionHeader */ class Ipv6OptionJumbogramHeader : public Ipv6OptionHeader { - public: - /** - * \brief Get the type identificator. - * \return type identificator - */ - static TypeId GetTypeId (); +public: + /** + * \brief Get the type identificator. + * \return type identificator + */ + static TypeId GetTypeId (); - /** - * \brief Get the instance type ID. - * \return instance type ID - */ - virtual TypeId GetInstanceTypeId () const; + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; - /** - * \brief Constructor. - */ - Ipv6OptionJumbogramHeader (); + /** + * \brief Constructor. + */ + Ipv6OptionJumbogramHeader (); - /** - * \brief Destructor. - */ - virtual ~Ipv6OptionJumbogramHeader (); + /** + * \brief Destructor. + */ + virtual ~Ipv6OptionJumbogramHeader (); - /** - * \brief Set the data length. - * \param dataLength the data length - */ - void SetDataLength (uint32_t dataLength); + /** + * \brief Set the data length. + * \param dataLength the data length + */ + void SetDataLength (uint32_t dataLength); - /** - * \brief Get the data length. - * \return the data length - */ - uint32_t GetDataLength () const; + /** + * \brief Get the data length. + * \return the data length + */ + uint32_t GetDataLength () const; - /** - * \brief Print some informations about the packet. - * \param os output stream - * \return info about this packet - */ - virtual void Print (std::ostream &os) const; + /** + * \brief Print some informations about the packet. + * \param os output stream + * \return info about this packet + */ + virtual void Print (std::ostream &os) const; - /** - * \brief Get the serialized size of the packet. - * \return size - */ - virtual uint32_t GetSerializedSize () const; + /** + * \brief Get the serialized size of the packet. + * \return size + */ + virtual uint32_t GetSerializedSize () const; - /** - * \brief Serialize the packet. - * \param start Buffer iterator - */ - virtual void Serialize (Buffer::Iterator start) const; + /** + * \brief Serialize the packet. + * \param start Buffer iterator + */ + virtual void Serialize (Buffer::Iterator start) const; - /** - * \brief Deserialize the packet. - * \param start Buffer iterator - * \return size of the packet - */ - virtual uint32_t Deserialize (Buffer::Iterator start); + /** + * \brief Deserialize the packet. + * \param start Buffer iterator + * \return size of the packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); - /** - * \brief Get the Alignment requirement of this option header - * \return The required alignment - */ - virtual Alignment GetAlignment () const; + /** + * \brief Get the Alignment requirement of this option header + * \return The required alignment + */ + virtual Alignment GetAlignment () const; - private: - /** - * \brief The data length. - */ - uint32_t m_dataLength; +private: + /** + * \brief The data length. + */ + uint32_t m_dataLength; }; /** @@ -346,77 +346,77 @@ class Ipv6OptionJumbogramHeader : public Ipv6OptionHeader */ class Ipv6OptionRouterAlertHeader : public Ipv6OptionHeader { - public: - /** - * \brief Get the type identificator. - * \return type identificator - */ - static TypeId GetTypeId (); +public: + /** + * \brief Get the type identificator. + * \return type identificator + */ + static TypeId GetTypeId (); - /** - * \brief Get the instance type ID. - * \return instance type ID - */ - virtual TypeId GetInstanceTypeId () const; + /** + * \brief Get the instance type ID. + * \return instance type ID + */ + virtual TypeId GetInstanceTypeId () const; - /** - * \brief Constructor. - */ - Ipv6OptionRouterAlertHeader (); + /** + * \brief Constructor. + */ + Ipv6OptionRouterAlertHeader (); - /** - * \brief Destructor. - */ - virtual ~Ipv6OptionRouterAlertHeader (); + /** + * \brief Destructor. + */ + virtual ~Ipv6OptionRouterAlertHeader (); - /** - * \brief Set the field "value". - */ - void SetValue (uint16_t value); + /** + * \brief Set the field "value". + */ + void SetValue (uint16_t value); - /** - * \brief Get the field "value". - * \return the field "value" - */ - uint16_t GetValue () const; + /** + * \brief Get the field "value". + * \return the field "value" + */ + uint16_t GetValue () const; - /** - * \brief Print some informations about the packet. - * \param os output stream - * \return info about this packet - */ - virtual void Print (std::ostream &os) const; + /** + * \brief Print some informations about the packet. + * \param os output stream + * \return info about this packet + */ + virtual void Print (std::ostream &os) const; - /** - * \brief Get the serialized size of the packet. - * \return size - */ - virtual uint32_t GetSerializedSize () const; + /** + * \brief Get the serialized size of the packet. + * \return size + */ + virtual uint32_t GetSerializedSize () const; - /** - * \brief Serialize the packet. - * \param start Buffer iterator - */ - virtual void Serialize (Buffer::Iterator start) const; + /** + * \brief Serialize the packet. + * \param start Buffer iterator + */ + virtual void Serialize (Buffer::Iterator start) const; - /** - * \brief Deserialize the packet. - * \param start Buffer iterator - * \return size of the packet - */ - virtual uint32_t Deserialize (Buffer::Iterator start); + /** + * \brief Deserialize the packet. + * \param start Buffer iterator + * \return size of the packet + */ + virtual uint32_t Deserialize (Buffer::Iterator start); - /** - * \brief Get the Alignment requirement of this option header - * \return The required alignment - */ - virtual Alignment GetAlignment () const; + /** + * \brief Get the Alignment requirement of this option header + * \return The required alignment + */ + virtual Alignment GetAlignment () const; - private: - /** - * \brief The value. - */ - uint16_t m_value; +private: + /** + * \brief The value. + */ + uint16_t m_value; }; } // namespace ns3 diff --git a/src/internet/model/ipv6-option.cc b/src/internet/model/ipv6-option.cc index 8a6914e05..7656aedcb 100644 --- a/src/internet/model/ipv6-option.cc +++ b/src/internet/model/ipv6-option.cc @@ -39,7 +39,7 @@ TypeId Ipv6Option::GetTypeId () UintegerValue (0), MakeUintegerAccessor (&Ipv6Option::GetOptionNumber), MakeUintegerChecker ()) - ; + ; return tid; } @@ -62,7 +62,7 @@ TypeId Ipv6OptionPad1::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6OptionPad1") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -106,7 +106,7 @@ TypeId Ipv6OptionPadn::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6OptionPadn") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -150,7 +150,7 @@ TypeId Ipv6OptionJumbogram::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6OptionJumbogram") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -194,7 +194,7 @@ TypeId Ipv6OptionRouterAlert::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6OptionRouterAlert") .SetParent () .AddConstructor () - ; + ; return tid; } diff --git a/src/internet/model/ipv6-packet-info-tag.cc b/src/internet/model/ipv6-packet-info-tag.cc index 5c1ad1597..11a378a82 100644 --- a/src/internet/model/ipv6-packet-info-tag.cc +++ b/src/internet/model/ipv6-packet-info-tag.cc @@ -25,7 +25,7 @@ namespace ns3 { -Ipv6PacketInfoTag::Ipv6PacketInfoTag () +Ipv6PacketInfoTag::Ipv6PacketInfoTag () : m_addr (Ipv6Address ()), m_ifindex (0), m_hoplimit (0), @@ -88,7 +88,7 @@ Ipv6PacketInfoTag::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv6PacketInfoTag") .SetParent () .AddConstructor () - ; + ; return tid; } TypeId @@ -101,9 +101,9 @@ uint32_t Ipv6PacketInfoTag::GetSerializedSize (void) const { return 16 - + sizeof (uint8_t) - + sizeof (uint8_t) - + sizeof (uint8_t); + + sizeof (uint8_t) + + sizeof (uint8_t) + + sizeof (uint8_t); } void Ipv6PacketInfoTag::Serialize (TagBuffer i) const @@ -134,5 +134,5 @@ Ipv6PacketInfoTag::Print (std::ostream &os) const os << ", TClass:" << (uint32_t) m_tclass; os << "] "; } -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/ipv6-packet-info-tag.h b/src/internet/model/ipv6-packet-info-tag.h index 996b146a5..099afed3f 100644 --- a/src/internet/model/ipv6-packet-info-tag.h +++ b/src/internet/model/ipv6-packet-info-tag.h @@ -61,7 +61,7 @@ public: // Implemented, but not used in the stack yet uint8_t GetTrafficClass (void) const; - static TypeId GetTypeId (void); + static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; virtual uint32_t GetSerializedSize (void) const; virtual void Serialize (TagBuffer i) const; diff --git a/src/internet/model/ipv6-raw-socket-factory.cc b/src/internet/model/ipv6-raw-socket-factory.cc index 529ba6088..cc0e9d85c 100644 --- a/src/internet/model/ipv6-raw-socket-factory.cc +++ b/src/internet/model/ipv6-raw-socket-factory.cc @@ -30,7 +30,7 @@ TypeId Ipv6RawSocketFactory::GetTypeId () { static TypeId tid = TypeId ("ns3::Ipv6RawSocketFactory") .SetParent () - ; + ; return tid; } diff --git a/src/internet/model/ipv6-raw-socket-impl.cc b/src/internet/model/ipv6-raw-socket-impl.cc index 727486818..fa9c4a081 100644 --- a/src/internet/model/ipv6-raw-socket-impl.cc +++ b/src/internet/model/ipv6-raw-socket-impl.cc @@ -53,7 +53,7 @@ TypeId Ipv6RawSocketImpl::GetTypeId () UintegerValue (0), MakeUintegerAccessor (&Ipv6RawSocketImpl::m_icmpFilter), MakeUintegerChecker ()) - ; + ; return tid; } diff --git a/src/internet/model/ipv6-raw-socket-impl.h b/src/internet/model/ipv6-raw-socket-impl.h index 7b2dc889f..cd279109a 100644 --- a/src/internet/model/ipv6-raw-socket-impl.h +++ b/src/internet/model/ipv6-raw-socket-impl.h @@ -201,11 +201,11 @@ private: * \brief IPv6 raw data and additionnal information. */ struct Data - { - Ptr packet; /**< Packet data */ - Ipv6Address fromIp; /**< Source address */ - uint16_t fromProtocol; /**< Protocol used */ - }; + { + Ptr packet; /**< Packet data */ + Ipv6Address fromIp; /**< Source address */ + uint16_t fromProtocol; /**< Protocol used */ + }; /** * \brief Dispose object. diff --git a/src/internet/model/ipv6-route.cc b/src/internet/model/ipv6-route.cc index c865276dc..b39235761 100644 --- a/src/internet/model/ipv6-route.cc +++ b/src/internet/model/ipv6-route.cc @@ -82,13 +82,7 @@ std::ostream& operator<< (std::ostream& os, Ipv6Route const& route) Ipv6MulticastRoute::Ipv6MulticastRoute () { - uint32_t initial_ttl = MAX_TTL; - - /* Initialize array to MAX_TTL, which means that all interfaces are "off" */ - for (uint32_t i = 0; i < MAX_INTERFACES; i++) - { - m_ttls.push_back (initial_ttl); - } + m_ttls.clear(); } Ipv6MulticastRoute::~Ipv6MulticastRoute () @@ -127,12 +121,34 @@ uint32_t Ipv6MulticastRoute::GetParent () const void Ipv6MulticastRoute::SetOutputTtl (uint32_t oif, uint32_t ttl) { - m_ttls[oif] = ttl; + if (ttl >= MAX_TTL) + { + // This TTL value effectively disables the interface + std::map::iterator iter; + iter = m_ttls.find(oif); + if (iter != m_ttls.end()) + { + m_ttls.erase(iter); + } + } + else + { + m_ttls[oif] = ttl; + } } -uint32_t Ipv6MulticastRoute::GetOutputTtl (uint32_t oif) const +uint32_t Ipv6MulticastRoute::GetOutputTtl (uint32_t oif) { - return m_ttls[oif]; + // We keep this interface around for compatibility (for now) + std::map::const_iterator iter = m_ttls.find(oif); + if (iter == m_ttls.end()) + return((uint32_t)MAX_TTL); + return(iter->second); +} + +std::map Ipv6MulticastRoute::GetOutputTtlMap() const +{ + return(m_ttls); } std::ostream& operator<< (std::ostream& os, Ipv6MulticastRoute const& route) diff --git a/src/internet/model/ipv6-route.h b/src/internet/model/ipv6-route.h index b90cc673f..24997078b 100644 --- a/src/internet/model/ipv6-route.h +++ b/src/internet/model/ipv6-route.h @@ -22,12 +22,13 @@ #define IPV6_ROUTE_H #include -#include +#include #include #include "ns3/simple-ref-count.h" #include "ns3/ipv6-address.h" +#include "ns3/deprecated.h" namespace ns3 { @@ -200,7 +201,12 @@ public: * \param oif outgoing interface * \return TTL for this route */ - uint32_t GetOutputTtl (uint32_t oif) const; + uint32_t GetOutputTtl (uint32_t oif) NS_DEPRECATED; + + /** + * \return map of output interface Ids and TTLs for this route + */ + std::map GetOutputTtlMap() const; private: /** @@ -221,7 +227,7 @@ private: /** * \brief TTLs. */ - std::vector m_ttls; + std::map m_ttls; }; std::ostream& operator<< (std::ostream& os, Ipv6MulticastRoute const& route); diff --git a/src/internet/model/ipv6-routing-protocol.cc b/src/internet/model/ipv6-routing-protocol.cc index fa33d406f..e4d0a21d0 100644 --- a/src/internet/model/ipv6-routing-protocol.cc +++ b/src/internet/model/ipv6-routing-protocol.cc @@ -32,7 +32,7 @@ TypeId Ipv6RoutingProtocol::GetTypeId () { static TypeId tid = TypeId ("ns3::Ipv6RoutingProtocol") .SetParent () - ; + ; return tid; } diff --git a/src/internet/model/ipv6-routing-protocol.h b/src/internet/model/ipv6-routing-protocol.h index 0dbf188c1..90b32f2f3 100644 --- a/src/internet/model/ipv6-routing-protocol.h +++ b/src/internet/model/ipv6-routing-protocol.h @@ -37,7 +37,7 @@ class Ipv6Route; class NetDevice; /** - * \ingroup node + * \ingroup internet * \defgroup ipv6Routing Ipv6RoutingProtocol */ diff --git a/src/internet/model/ipv6-routing-table-entry.cc b/src/internet/model/ipv6-routing-table-entry.cc index ad0b1a486..9479bf383 100644 --- a/src/internet/model/ipv6-routing-table-entry.cc +++ b/src/internet/model/ipv6-routing-table-entry.cc @@ -31,74 +31,74 @@ Ipv6RoutingTableEntry::Ipv6RoutingTableEntry () Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6RoutingTableEntry const& route) : m_dest (route.m_dest), - m_destNetworkPrefix (route.m_destNetworkPrefix), - m_gateway (route.m_gateway), - m_interface (route.m_interface), - m_prefixToUse (route.m_prefixToUse) + m_destNetworkPrefix (route.m_destNetworkPrefix), + m_gateway (route.m_gateway), + m_interface (route.m_interface), + m_prefixToUse (route.m_prefixToUse) { } Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6RoutingTableEntry const* route) : m_dest (route->m_dest), - m_destNetworkPrefix (route->m_destNetworkPrefix), - m_gateway (route->m_gateway), - m_interface (route->m_interface), - m_prefixToUse (route->m_prefixToUse) + m_destNetworkPrefix (route->m_destNetworkPrefix), + m_gateway (route->m_gateway), + m_interface (route->m_interface), + m_prefixToUse (route->m_prefixToUse) { } Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address dest, Ipv6Address gateway, uint32_t interface) : m_dest (dest), - m_destNetworkPrefix (Ipv6Prefix::GetZero ()), - m_gateway (gateway), - m_interface (interface), - m_prefixToUse (Ipv6Address ("::")) + m_destNetworkPrefix (Ipv6Prefix::GetZero ()), + m_gateway (gateway), + m_interface (interface), + m_prefixToUse (Ipv6Address ("::")) { } Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address dest, uint32_t interface) : m_dest (dest), - m_destNetworkPrefix (Ipv6Prefix::GetOnes ()), - m_gateway (Ipv6Address::GetZero ()), - m_interface (interface), - m_prefixToUse (Ipv6Address ("::")) + m_destNetworkPrefix (Ipv6Prefix::GetOnes ()), + m_gateway (Ipv6Address::GetZero ()), + m_interface (interface), + m_prefixToUse (Ipv6Address ("::")) { } Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address gateway, uint32_t interface, Ipv6Address prefixToUse) : m_dest (network), - m_destNetworkPrefix (networkPrefix), - m_gateway (gateway), - m_interface (interface), - m_prefixToUse (prefixToUse) + m_destNetworkPrefix (networkPrefix), + m_gateway (gateway), + m_interface (interface), + m_prefixToUse (prefixToUse) { } Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address gateway, uint32_t interface) : m_dest (network), - m_destNetworkPrefix (networkPrefix), - m_gateway (gateway), - m_interface (interface), - m_prefixToUse (Ipv6Address::GetZero ()) + m_destNetworkPrefix (networkPrefix), + m_gateway (gateway), + m_interface (interface), + m_prefixToUse (Ipv6Address::GetZero ()) { } Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface, Ipv6Address prefixToUse) : m_dest (network), - m_destNetworkPrefix (networkPrefix), - m_gateway (Ipv6Address::GetZero ()), - m_interface (interface), - m_prefixToUse (prefixToUse) + m_destNetworkPrefix (networkPrefix), + m_gateway (Ipv6Address::GetZero ()), + m_interface (interface), + m_prefixToUse (prefixToUse) { } Ipv6RoutingTableEntry::Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface) : m_dest (network), - m_destNetworkPrefix (networkPrefix), - m_gateway (Ipv6Address::GetZero ()), - m_interface (interface), - m_prefixToUse (Ipv6Address ("::")) + m_destNetworkPrefix (networkPrefix), + m_gateway (Ipv6Address::GetZero ()), + m_interface (interface), + m_prefixToUse (Ipv6Address ("::")) { } @@ -215,13 +215,13 @@ std::ostream& operator<< (std::ostream& os, Ipv6RoutingTableEntry const& route) if (route.IsGateway ()) { os << "host ="<< route.GetDest () << - ", out =" << route.GetInterface () << - ", next hop =" << route.GetGateway (); + ", out =" << route.GetInterface () << + ", next hop =" << route.GetGateway (); } else { os << "host =" << route.GetDest () << - ", out =" << route.GetInterface (); + ", out =" << route.GetInterface (); } } else if (route.IsNetwork ()) @@ -229,15 +229,15 @@ std::ostream& operator<< (std::ostream& os, Ipv6RoutingTableEntry const& route) if (route.IsGateway ()) { os << "network =" << route.GetDestNetwork () << - ", mask =" << route.GetDestNetworkPrefix () << - ",out =" << route.GetInterface () << - ", next hop =" << route.GetGateway (); + ", mask =" << route.GetDestNetworkPrefix () << + ",out =" << route.GetInterface () << + ", next hop =" << route.GetGateway (); } else { os << "network =" << route.GetDestNetwork () << - ", mask =" << route.GetDestNetworkPrefix () << - ",out =" << route.GetInterface (); + ", mask =" << route.GetDestNetworkPrefix () << + ",out =" << route.GetInterface (); } } else @@ -253,25 +253,25 @@ Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry () Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry (Ipv6MulticastRoutingTableEntry const & route) : m_origin (route.m_origin), - m_group (route.m_group), - m_inputInterface (route.m_inputInterface), - m_outputInterfaces (route.m_outputInterfaces) + m_group (route.m_group), + m_inputInterface (route.m_inputInterface), + m_outputInterfaces (route.m_outputInterfaces) { } Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry (Ipv6MulticastRoutingTableEntry const* route) : m_origin (route->m_origin), - m_group (route->m_group), - m_inputInterface (route->m_inputInterface), - m_outputInterfaces (route->m_outputInterfaces) + m_group (route->m_group), + m_inputInterface (route->m_inputInterface), + m_outputInterfaces (route->m_outputInterfaces) { } Ipv6MulticastRoutingTableEntry::Ipv6MulticastRoutingTableEntry (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector outputInterfaces) : m_origin (origin), - m_group (group), - m_inputInterface (inputInterface), - m_outputInterfaces (outputInterfaces) + m_group (group), + m_inputInterface (inputInterface), + m_outputInterfaces (outputInterfaces) { } @@ -315,9 +315,9 @@ Ipv6MulticastRoutingTableEntry Ipv6MulticastRoutingTableEntry::CreateMulticastRo std::ostream& operator<< (std::ostream& os, Ipv6MulticastRoutingTableEntry const& route) { os << "origin =" << route.GetOrigin () << - ", group =" << route.GetGroup () << - ", input interface =" << route.GetInputInterface () << - ", output interfaces ="; + ", group =" << route.GetGroup () << + ", input interface =" << route.GetInputInterface () << + ", output interfaces ="; for (uint32_t i = 0; i < route.GetNOutputInterfaces (); ++i) { diff --git a/src/internet/model/ipv6-routing-table-entry.h b/src/internet/model/ipv6-routing-table-entry.h index 8b87b9e4b..2a7fbfeec 100644 --- a/src/internet/model/ipv6-routing-table-entry.h +++ b/src/internet/model/ipv6-routing-table-entry.h @@ -208,7 +208,7 @@ private: * \param interface the interface index * \param prefixToUse prefix to use */ - Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix prefix, Ipv6Address gateway, uint32_t interface, Ipv6Address prefixToUse); + Ipv6RoutingTableEntry (Ipv6Address network, Ipv6Prefix prefix, Ipv6Address gateway, uint32_t interface, Ipv6Address prefixToUse); /** * \brief Constructor. diff --git a/src/internet/model/ipv6-static-routing.cc b/src/internet/model/ipv6-static-routing.cc index 6a9aeb7f9..188c9c119 100644 --- a/src/internet/model/ipv6-static-routing.cc +++ b/src/internet/model/ipv6-static-routing.cc @@ -37,7 +37,7 @@ TypeId Ipv6StaticRouting::GetTypeId () static TypeId tid = TypeId ("ns3::Ipv6StaticRouting") .SetParent () .AddConstructor () - ; + ; return tid; } diff --git a/src/internet/model/ipv6-static-routing.h b/src/internet/model/ipv6-static-routing.h index 1b6df0c65..f6355d8fe 100644 --- a/src/internet/model/ipv6-static-routing.h +++ b/src/internet/model/ipv6-static-routing.h @@ -43,7 +43,7 @@ class Ipv6RoutingTableEntry; class Ipv6MulticastRoutingTableEntry; /** - * \ingroup routing + * \ingroup internet * \defgroup ipv6StaticRouting Ipv6StaticRouting */ /** @@ -152,7 +152,7 @@ public: /** * \brief Get a metric for route from the static unicast routing table. - * \param index The index (into the routing table) of the route to retrieve. + * \param index The index (into the routing table) of the route to retrieve. * \return If route is set, the metric is returned. If not, an infinity metric (0xffffffff) is returned */ uint32_t GetMetric (uint32_t index); diff --git a/src/internet/model/ipv6.cc b/src/internet/model/ipv6.cc index b8d7266c3..91465ca19 100644 --- a/src/internet/model/ipv6.cc +++ b/src/internet/model/ipv6.cc @@ -47,15 +47,17 @@ TypeId Ipv6::GetTypeId (void) &UdpSocket::GetMtuDiscover), MakeBooleanChecker ()) #endif - ; + ; return tid; } Ipv6::Ipv6 () -{} +{ +} Ipv6::~Ipv6 () -{} +{ +} } /* namespace ns3 */ diff --git a/src/internet/model/ipv6.h b/src/internet/model/ipv6.h index 6d97b673a..9c66b08a0 100644 --- a/src/internet/model/ipv6.h +++ b/src/internet/model/ipv6.h @@ -40,7 +40,7 @@ class Packet; class Ipv6RoutingProtocol; /** - * \ingroup node + * \ingroup internet * \defgroup ipv6 Ipv6 */ @@ -49,7 +49,7 @@ class Ipv6RoutingProtocol; * \brief Access to the IPv6 forwarding table, interfaces, and configuration * * This class defines the API to manipulate the following aspects of - * the IPv6 implementation: + * the IPv6 implementation: * -# set/get an Ipv6RoutingProtocol * -# register a NetDevice for use by the IPv6 layer (basically, to * create IPv6-related state such as addressing and neighbor cache that @@ -80,7 +80,7 @@ class Ipv6 : public Object { public: static TypeId GetTypeId (void); - + /** * \brief Constructor. */ @@ -93,7 +93,7 @@ public: /** * \brief Register a new routing protocol to be used by this IPv6 stack - * + * * This call will replace any routing protocol that has been previously * registered. If you want to add multiple routing protocols, you must * add them to a Ipv6ListRoutingProtocol directly. @@ -125,7 +125,7 @@ public: * \brief Get number of interfaces. * \returns the number of interfaces added by the user. */ - virtual uint32_t GetNInterfaces (void) const = 0; + virtual uint32_t GetNInterfaces (void) const = 0; /** * \brief Return the interface number of the interface that has been @@ -135,7 +135,7 @@ public: * \returns The interface number of the IPv6 interface with the given * address or -1 if not found. * - * Each IP interface has one or more IP addresses associated with it. + * Each IP interface has one or more IP addresses associated with it. * This method searches the list of interfaces for one that holds a * particular address. This call takes an IP address as a parameter and * returns the interface number of the first interface that has been assigned @@ -153,14 +153,14 @@ public: * \returns The interface number of the IPv6 interface with the given * address or -1 if not found. * - * Each IP interface has one or more IP addresses associated with it. + * Each IP interface has one or more IP addresses associated with it. * This method searches the list of interfaces for the first one found * that holds an address that is included within the prefix * formed by the input address and mask parameters. The value -1 is * returned if no match is found. */ virtual int32_t GetInterfaceForPrefix (Ipv6Address address, - Ipv6Prefix mask) const = 0; + Ipv6Prefix mask) const = 0; /** * \brief Get the NetDevice of the specified interface number. @@ -209,7 +209,7 @@ public: * Remove the address at addressIndex on named interface. The addressIndex * for all higher indices will decrement by one after this method is called; * so, for example, to remove 5 addresses from an interface i, one could - * call RemoveAddress (i, 0); 5 times. + * call RemoveAddress (i, 0); 5 times. * * \param interface Interface number of an IPv6 interface * \param addressIndex index of Ipv6InterfaceAddress to remove diff --git a/src/internet/model/loopback-net-device.cc b/src/internet/model/loopback-net-device.cc index 644ab6810..b68577528 100644 --- a/src/internet/model/loopback-net-device.cc +++ b/src/internet/model/loopback-net-device.cc @@ -36,7 +36,7 @@ LoopbackNetDevice::GetTypeId (void) static TypeId tid = TypeId ("ns3::LoopbackNetDevice") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -160,7 +160,7 @@ LoopbackNetDevice::GetMulticast (Ipv4Address multicastGroup) const Address LoopbackNetDevice::GetMulticast (Ipv6Address addr) const { - return Mac48Address::GetMulticast (addr); + return Mac48Address::GetMulticast (addr); } bool diff --git a/src/internet/model/ndisc-cache.cc b/src/internet/model/ndisc-cache.cc index ff9889be9..474e2b1de 100644 --- a/src/internet/model/ndisc-cache.cc +++ b/src/internet/model/ndisc-cache.cc @@ -43,7 +43,7 @@ TypeId NdiscCache::GetTypeId () UintegerValue (DEFAULT_UNRES_QLEN), MakeUintegerAccessor (&NdiscCache::m_unresQlen), MakeUintegerChecker ()) - ; + ; return tid; } @@ -151,14 +151,14 @@ uint32_t NdiscCache::GetUnresQlen () NdiscCache::Entry::Entry (NdiscCache* nd) : m_ndCache (nd), - m_waiting (), - m_router (false), - m_reachableTimer (Timer::CANCEL_ON_DESTROY), - m_retransTimer(Timer::CANCEL_ON_DESTROY), - m_probeTimer(Timer::CANCEL_ON_DESTROY), - m_delayTimer(Timer::CANCEL_ON_DESTROY), - m_lastReachabilityConfirmation(Seconds (0.0)), - m_nsRetransmit (0) + m_waiting (), + m_router (false), + m_reachableTimer (Timer::CANCEL_ON_DESTROY), + m_retransTimer(Timer::CANCEL_ON_DESTROY), + m_probeTimer(Timer::CANCEL_ON_DESTROY), + m_delayTimer(Timer::CANCEL_ON_DESTROY), + m_lastReachabilityConfirmation(Seconds (0.0)), + m_nsRetransmit (0) { NS_LOG_FUNCTION_NOARGS (); } diff --git a/src/internet/model/ndisc-cache.h b/src/internet/model/ndisc-cache.h index d2d19fd3f..1bc906346 100644 --- a/src/internet/model/ndisc-cache.h +++ b/src/internet/model/ndisc-cache.h @@ -130,7 +130,7 @@ public: */ class Entry { - public: +public: /** * \brief Constructor. * \param nd The NdiscCache this entry belongs to. @@ -337,7 +337,7 @@ public: */ void SetIpv6Address (Ipv6Address ipv6Address); - private: +private: /** * \brief The IPv6 address. */ diff --git a/src/internet/model/nsc-sysctl.cc b/src/internet/model/nsc-sysctl.cc index 1280c2a1a..26ad1fac5 100644 --- a/src/internet/model/nsc-sysctl.cc +++ b/src/internet/model/nsc-sysctl.cc @@ -25,14 +25,14 @@ namespace ns3 { class NscStackStringAccessor : public AttributeAccessor { - public: +public: NscStackStringAccessor (std::string name) : m_name (name) {} virtual bool Set (ObjectBase * object, const AttributeValue &val) const; virtual bool Get (const ObjectBase * object, AttributeValue &val) const; virtual bool HasGetter (void) const; virtual bool HasSetter (void) const; - private: +private: std::string m_name; }; @@ -106,7 +106,7 @@ Ns3NscStack::GetInstanceTypeId (void) const tid = TypeId (name.c_str ()); tid.SetParent (); char buf[256]; - for (int i=0; m_stack->sysctl_getnum(i, buf, sizeof(buf)) > 0 ;i++) + for (int i=0; m_stack->sysctl_getnum(i, buf, sizeof(buf)) > 0 ; i++) { char value[256]; if (m_stack->sysctl_get (buf, value, sizeof(value)) > 0) @@ -148,7 +148,7 @@ TypeId Ns3NscStack::Ns3NscStack::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Ns3NscStack") - .SetParent () + .SetParent () ; return tid; } diff --git a/src/internet/model/nsc-sysctl.h b/src/internet/model/nsc-sysctl.h index 3c2691967..854393dd5 100644 --- a/src/internet/model/nsc-sysctl.h +++ b/src/internet/model/nsc-sysctl.h @@ -33,7 +33,7 @@ class Ns3NscStack : public Object public: static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; - void SetStack (INetStack *stack) {m_stack = stack;} + void SetStack (INetStack *stack) { m_stack = stack;} private: friend class NscStackStringAccessor; diff --git a/src/internet/model/nsc-tcp-l4-protocol.cc b/src/internet/model/nsc-tcp-l4-protocol.cc index 8f3e25f4c..7e9560365 100644 --- a/src/internet/model/nsc-tcp-l4-protocol.cc +++ b/src/internet/model/nsc-tcp-l4-protocol.cc @@ -68,19 +68,20 @@ private: NscInterfaceImpl::NscInterfaceImpl (Ptr prot) : m_prot (prot) -{} +{ +} -void +void NscInterfaceImpl::send_callback(const void *data, int datalen) { m_prot->send_callback (data, datalen); } -void +void NscInterfaceImpl::wakeup() { m_prot->wakeup (); } -void +void NscInterfaceImpl::gettime(unsigned int *sec, unsigned int *usec) { m_prot->gettime (sec,usec); @@ -107,13 +108,13 @@ NscTcpL4Protocol::GetTypeId (void) StringValue("liblinux2.6.26.so"), MakeStringAccessor (&NscTcpL4Protocol::GetNscLibrary,&NscTcpL4Protocol::SetNscLibrary), MakeStringChecker ()) - ; + ; return tid; } int external_rand() { - return 1; // TODO + return 1; // TODO } NscTcpL4Protocol::NscTcpL4Protocol () @@ -134,7 +135,7 @@ NscTcpL4Protocol::~NscTcpL4Protocol () void NscTcpL4Protocol::SetNscLibrary(const std::string &soname) -{ +{ if (soname!="") { m_nscLibrary = soname; @@ -286,7 +287,7 @@ NscTcpL4Protocol::Allocate (Ipv4Address address, uint16_t port) Ipv4EndPoint * NscTcpL4Protocol::Allocate (Ipv4Address localAddress, uint16_t localPort, - Ipv4Address peerAddress, uint16_t peerPort) + Ipv4Address peerAddress, uint16_t peerPort) { NS_LOG_FUNCTION (this << localAddress << localPort << peerAddress << peerPort); return m_endPoints->Allocate (localAddress, localPort, @@ -302,8 +303,8 @@ NscTcpL4Protocol::DeAllocate (Ipv4EndPoint *endPoint) Ipv4L4Protocol::RxStatus NscTcpL4Protocol::Receive (Ptr packet, - Ipv4Header const &header, - Ptr incomingInterface) + Ipv4Header const &header, + Ptr incomingInterface) { NS_LOG_FUNCTION (this << packet << header << incomingInterface); Ipv4Header ipHeader; @@ -384,9 +385,9 @@ void NscTcpL4Protocol::wakeup() Ipv4EndPointDemux::EndPoints endPoints = m_endPoints->GetAllEndPoints (); for (Ipv4EndPointDemux::EndPointsI endPoint = endPoints.begin (); endPoint != endPoints.end (); endPoint++) { - // NSC HACK: (ab)use TcpSocket::ForwardUp for signalling - (*endPoint)->ForwardUp (NULL, Ipv4Header(), 0, 0); - } + // NSC HACK: (ab)use TcpSocket::ForwardUp for signalling + (*endPoint)->ForwardUp (NULL, Ipv4Header(), 0, 0); + } } void NscTcpL4Protocol::gettime(unsigned int* sec, unsigned int* usec) @@ -432,27 +433,27 @@ void NscTcpL4Protocol::AddInterface(void) m_nscStack->if_attach(addrCStr, maskCStr, mtu); if (i == 1) - { - // We need to come up with a default gateway here. Can't guarantee this to be - // correct really... + { + // We need to come up with a default gateway here. Can't guarantee this to be + // correct really... - uint8_t addrBytes[4]; - addr.Serialize(addrBytes); + uint8_t addrBytes[4]; + addr.Serialize(addrBytes); - // XXX: this is all a bit of a horrible hack - // - // Just increment the last octet, this gives a decent chance of this being - // 'enough'. - // - // All we need is another address on the same network as the interface. This - // will force the stack to output the packet out of the network interface. - addrBytes[3]++; - addr.Deserialize(addrBytes); - addrOss.str(""); - addr.Print(addrOss); - m_nscStack->add_default_gateway(addrOss.str().c_str()); - } - } + // XXX: this is all a bit of a horrible hack + // + // Just increment the last octet, this gives a decent chance of this being + // 'enough'. + // + // All we need is another address on the same network as the interface. This + // will force the stack to output the packet out of the network interface. + addrBytes[3]++; + addr.Deserialize(addrBytes); + addrOss.str(""); + addr.Print(addrOss); + m_nscStack->add_default_gateway(addrOss.str().c_str()); + } + } } void diff --git a/src/internet/model/nsc-tcp-socket-factory-impl.cc b/src/internet/model/nsc-tcp-socket-factory-impl.cc index 6847a3576..759ae58ef 100644 --- a/src/internet/model/nsc-tcp-socket-factory-impl.cc +++ b/src/internet/model/nsc-tcp-socket-factory-impl.cc @@ -22,13 +22,14 @@ namespace ns3 { NscTcpSocketFactoryImpl::NscTcpSocketFactoryImpl () : m_tcp (0) -{} +{ +} NscTcpSocketFactoryImpl::~NscTcpSocketFactoryImpl () { NS_ASSERT (m_tcp == 0); } -void +void NscTcpSocketFactoryImpl::SetTcp (Ptr tcp) { m_tcp = tcp; diff --git a/src/internet/model/nsc-tcp-socket-factory-impl.h b/src/internet/model/nsc-tcp-socket-factory-impl.h index f64b074e7..a00075394 100644 --- a/src/internet/model/nsc-tcp-socket-factory-impl.h +++ b/src/internet/model/nsc-tcp-socket-factory-impl.h @@ -24,7 +24,7 @@ namespace ns3 { class NscTcpL4Protocol; /** - * \ingroup internetStack + * \ingroup internet * \defgroup nsctcp NscTcp * * An alternate implementation of TCP for ns-3 is provided by the diff --git a/src/internet/model/nsc-tcp-socket-impl.cc b/src/internet/model/nsc-tcp-socket-impl.cc index c8eba7da8..d982b8b00 100644 --- a/src/internet/model/nsc-tcp-socket-impl.cc +++ b/src/internet/model/nsc-tcp-socket-impl.cc @@ -58,7 +58,7 @@ NscTcpSocketImpl::GetTypeId () .AddTraceSource ("CongestionWindow", "The TCP connection's congestion window", MakeTraceSourceAccessor (&NscTcpSocketImpl::m_cWnd)) - ; + ; return tid; } @@ -321,32 +321,32 @@ NscTcpSocketImpl::Send (const Ptr p, uint32_t flags) NS_ASSERT (p->GetSize () > 0); if (m_state == ESTABLISHED || m_state == SYN_SENT || m_state == CLOSE_WAIT) - { - if (p->GetSize () > GetTxAvailable ()) { - m_errno = ERROR_MSGSIZE; + if (p->GetSize () > GetTxAvailable ()) + { + m_errno = ERROR_MSGSIZE; + return -1; + } + + uint32_t sent = p->GetSize (); + if (m_state == ESTABLISHED) + { + m_txBuffer.push(p); + m_txBufferSize += sent; + SendPendingData(); + } + else + { // SYN_SET -- Queue Data + m_txBuffer.push(p); + m_txBufferSize += sent; + } + return sent; + } + else + { + m_errno = ERROR_NOTCONN; return -1; } - - uint32_t sent = p->GetSize (); - if (m_state == ESTABLISHED) - { - m_txBuffer.push(p); - m_txBufferSize += sent; - SendPendingData(); - } - else - { // SYN_SET -- Queue Data - m_txBuffer.push(p); - m_txBufferSize += sent; - } - return sent; - } - else - { - m_errno = ERROR_NOTCONN; - return -1; - } } int @@ -393,24 +393,24 @@ void NscTcpSocketImpl::NSCWakeup () { switch (m_state) { - case SYN_SENT: + case SYN_SENT: if (!m_nscTcpSocket->is_connected()) - break; + break; m_state = ESTABLISHED; Simulator::ScheduleNow(&NscTcpSocketImpl::ConnectionSucceeded, this); - // fall through to schedule read/write events - case ESTABLISHED: + // fall through to schedule read/write events + case ESTABLISHED: if (!m_txBuffer.empty ()) - Simulator::ScheduleNow(&NscTcpSocketImpl::SendPendingData, this); + Simulator::ScheduleNow(&NscTcpSocketImpl::SendPendingData, this); Simulator::ScheduleNow(&NscTcpSocketImpl::ReadPendingData, this); break; - case LISTEN: + case LISTEN: Simulator::ScheduleNow(&NscTcpSocketImpl::Accept, this); break; - case CLOSED: break; - default: + case CLOSED: break; + default: NS_LOG_DEBUG (this << " invalid state: " << m_state); - } + } } Ptr @@ -438,7 +438,7 @@ NscTcpSocketImpl::Recv (uint32_t maxSize, uint32_t flags) Ptr NscTcpSocketImpl::RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress) + Address &fromAddress) { NS_LOG_FUNCTION (this << maxSize << flags); Ptr packet = Recv (maxSize, flags); @@ -488,10 +488,10 @@ void NscTcpSocketImpl::CompleteFork(void) size_t sin_len = sizeof(sin); if (0 == m_nscTcpSocket->getpeername((struct sockaddr*) &sin, &sin_len)) { - m_remotePort = ntohs(sin.sin_port); - m_remoteAddress = m_remoteAddress.Deserialize((const uint8_t*) &sin.sin_addr); - m_peerAddress = InetSocketAddress(m_remoteAddress, m_remotePort); - } + m_remotePort = ntohs(sin.sin_port); + m_remoteAddress = m_remoteAddress.Deserialize((const uint8_t*) &sin.sin_addr); + m_peerAddress = InetSocketAddress(m_remoteAddress, m_remotePort); + } m_endPoint = m_tcp->Allocate (); @@ -505,8 +505,8 @@ void NscTcpSocketImpl::CompleteFork(void) m_localAddress = m_localAddress.Deserialize((const uint8_t*) &sin.sin_addr); NS_LOG_LOGIC ("NscTcpSocketImpl " << this << " accepted connection from " - << m_remoteAddress << ":" << m_remotePort - << " to " << m_localAddress << ":" << m_localPort); + << m_remoteAddress << ":" << m_remotePort + << " to " << m_localAddress << ":" << m_localPort); //equivalent to FinishBind m_endPoint->SetRxCallback (MakeCallback (&NscTcpSocketImpl::ForwardUp, Ptr(this))); m_endPoint->SetDestroyCallback (MakeCallback (&NscTcpSocketImpl::Destroy, Ptr(this))); @@ -521,13 +521,13 @@ void NscTcpSocketImpl::ConnectionSucceeded() struct sockaddr_in sin; size_t sin_len = sizeof(sin); if (0 == m_nscTcpSocket->getsockname((struct sockaddr *) &sin, &sin_len)) { - m_localAddress = m_localAddress.Deserialize((const uint8_t*)&sin.sin_addr); - m_localPort = ntohs(sin.sin_port); - } + m_localAddress = m_localAddress.Deserialize((const uint8_t*)&sin.sin_addr); + m_localPort = ntohs(sin.sin_port); + } NS_LOG_LOGIC ("NscTcpSocketImpl " << this << " connected to " - << m_remoteAddress << ":" << m_remotePort - << " from " << m_localAddress << ":" << m_localPort); + << m_remoteAddress << ":" << m_remotePort + << " from " << m_localAddress << ":" << m_localPort); NotifyConnectionSucceeded(); } @@ -585,13 +585,13 @@ bool NscTcpSocketImpl::ReadPendingData (void) m_errno = GetNativeNs3Errno(err); switch (m_errno) { - case ERROR_NOTERROR: break; // some data was sent - case ERROR_AGAIN: return false; - default: - NS_LOG_WARN ("Error (" << err << ") " << - "during read_data, ns-3 errno set to" << m_errno); - m_state = CLOSED; - return false; + case ERROR_NOTERROR: break; // some data was sent + case ERROR_AGAIN: return false; + default: + NS_LOG_WARN ("Error (" << err << ") " << + "during read_data, ns-3 errno set to" << m_errno); + m_state = CLOSED; + return false; } Ptr p = Create (buffer, len); @@ -621,45 +621,45 @@ bool NscTcpSocketImpl::SendPendingData (void) size_t size, written = 0; do { - NS_ASSERT (!m_txBuffer.empty ()); - Ptr &p = m_txBuffer.front (); - size = p->GetSize (); - NS_ASSERT (size > 0); + NS_ASSERT (!m_txBuffer.empty ()); + Ptr &p = m_txBuffer.front (); + size = p->GetSize (); + NS_ASSERT (size > 0); - m_errno = ERROR_NOTERROR; + m_errno = ERROR_NOTERROR; - uint8_t *buf = new uint8_t[size]; - p->CopyData (buf, size); - ret = m_nscTcpSocket->send_data((const char *)buf, size); - delete[] buf; + uint8_t *buf = new uint8_t[size]; + p->CopyData (buf, size); + ret = m_nscTcpSocket->send_data((const char *)buf, size); + delete[] buf; - if (ret <= 0) - { - break; - } - written += ret; + if (ret <= 0) + { + break; + } + written += ret; - NS_ASSERT (m_txBufferSize >= (size_t)ret); - m_txBufferSize -= ret; + NS_ASSERT (m_txBufferSize >= (size_t)ret); + m_txBufferSize -= ret; - if ((size_t)ret < size) - { - p->RemoveAtStart(ret); - break; - } + if ((size_t)ret < size) + { + p->RemoveAtStart(ret); + break; + } - m_txBuffer.pop (); + m_txBuffer.pop (); - if (m_txBuffer.empty ()) - { - if (m_closeOnEmpty) - { - m_nscTcpSocket->disconnect(); - m_state = CLOSED; - } - break; - } - } while ((size_t) ret == size); + if (m_txBuffer.empty ()) + { + if (m_closeOnEmpty) + { + m_nscTcpSocket->disconnect(); + m_state = CLOSED; + } + break; + } + } while ((size_t) ret == size); if (written > 0) { @@ -813,29 +813,29 @@ NscTcpSocketImpl::GetNativeNs3Errno(int error) const if (error >= 0) { - return ERROR_NOTERROR; + return ERROR_NOTERROR; } err = (enum nsc_errno) error; switch (err) { - case NSC_EADDRINUSE: // fallthrough - case NSC_EADDRNOTAVAIL: return ERROR_AFNOSUPPORT; - case NSC_EINPROGRESS: // Altough nsc sockets are nonblocking, we pretend they're not. - case NSC_EAGAIN: return ERROR_AGAIN; - case NSC_EISCONN: // fallthrough - case NSC_EALREADY: return ERROR_ISCONN; - case NSC_ECONNREFUSED: return ERROR_NOROUTETOHOST; // XXX, better mapping? - case NSC_ECONNRESET: // for no, all of these fall through - case NSC_EHOSTDOWN: - case NSC_ENETUNREACH: - case NSC_EHOSTUNREACH: return ERROR_NOROUTETOHOST; - case NSC_EMSGSIZE: return ERROR_MSGSIZE; - case NSC_ENOTCONN: return ERROR_NOTCONN; - case NSC_ESHUTDOWN: return ERROR_SHUTDOWN; - case NSC_ETIMEDOUT: return ERROR_NOTCONN; // XXX - this mapping isn't correct - case NSC_ENOTDIR: // used by eg. sysctl(2). Shouldn't happen normally, - // but is triggered by e.g. show_config(). - case NSC_EUNKNOWN: return ERROR_INVAL; // Catches stacks that 'return -1' without real mapping + case NSC_EADDRINUSE: // fallthrough + case NSC_EADDRNOTAVAIL: return ERROR_AFNOSUPPORT; + case NSC_EINPROGRESS: // Altough nsc sockets are nonblocking, we pretend they're not. + case NSC_EAGAIN: return ERROR_AGAIN; + case NSC_EISCONN: // fallthrough + case NSC_EALREADY: return ERROR_ISCONN; + case NSC_ECONNREFUSED: return ERROR_NOROUTETOHOST; // XXX, better mapping? + case NSC_ECONNRESET: // for no, all of these fall through + case NSC_EHOSTDOWN: + case NSC_ENETUNREACH: + case NSC_EHOSTUNREACH: return ERROR_NOROUTETOHOST; + case NSC_EMSGSIZE: return ERROR_MSGSIZE; + case NSC_ENOTCONN: return ERROR_NOTCONN; + case NSC_ESHUTDOWN: return ERROR_SHUTDOWN; + case NSC_ETIMEDOUT: return ERROR_NOTCONN; // XXX - this mapping isn't correct + case NSC_ENOTDIR: // used by eg. sysctl(2). Shouldn't happen normally, + // but is triggered by e.g. show_config(). + case NSC_EUNKNOWN: return ERROR_INVAL; // Catches stacks that 'return -1' without real mapping } NS_ASSERT_MSG(0, "Unknown NSC error"); return ERROR_INVAL; @@ -857,4 +857,4 @@ NscTcpSocketImpl::GetAllowBroadcast () const return false; } -}//namespace ns3 +} //namespace ns3 diff --git a/src/internet/model/nsc-tcp-socket-impl.h b/src/internet/model/nsc-tcp-socket-impl.h index fb47b1f4c..64a08dee3 100644 --- a/src/internet/model/nsc-tcp-socket-impl.h +++ b/src/internet/model/nsc-tcp-socket-impl.h @@ -44,7 +44,7 @@ class TcpHeader; * \ingroup socket * \ingroup nsctcp * - * \brief Socket logic for the NSC TCP sockets. + * \brief Socket logic for the NSC TCP sockets. * * Most of the TCP internal * logic is handled by the NSC tcp library itself; this class maps ns3::Socket @@ -80,7 +80,7 @@ public: virtual uint32_t GetRxAvailable (void) const; virtual Ptr Recv (uint32_t maxSize, uint32_t flags); virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress); + Address &fromAddress); virtual int GetSockName (Address &address) const; virtual bool SetAllowBroadcast (bool allowBroadcast); virtual bool GetAllowBroadcast () const; @@ -145,7 +145,7 @@ private: bool m_shutdownSend; bool m_shutdownRecv; bool m_connected; - + //manage the state information TracedValue m_state; bool m_closeOnEmpty; @@ -180,6 +180,6 @@ private: uint32_t m_rcvBufSize; // maximum receive socket buffer size }; -}//namespace ns3 +} //namespace ns3 #endif /* NSC_TCP_SOCKET_IMPL_H */ diff --git a/src/internet/model/pending-data.cc b/src/internet/model/pending-data.cc index 485682567..429f16621 100644 --- a/src/internet/model/pending-data.cc +++ b/src/internet/model/pending-data.cc @@ -38,7 +38,7 @@ namespace ns3 { PendingData::PendingData () : size (0), data (0), - msgSize (0), responseSize (0) + msgSize (0), responseSize (0) { NS_LOG_FUNCTION (this); } @@ -102,13 +102,13 @@ void PendingData::Add (uint32_t s, const uint8_t* d) { NS_LOG_FUNCTION (this << s); if (d == 0) - { - data.push_back(Create (d,s)); - } + { + data.push_back(Create (d,s)); + } else - { - data.push_back(Create (s)); - } + { + data.push_back(Create (s)); + } size += s; } @@ -161,7 +161,7 @@ Ptr PendingData::CopyFromOffset (uint32_t s, uint32_t o) std::vector >::size_type end = 0; Ptr outPacket; Ptr endFragment; - for (std::vector >::size_type i=0;i >::size_type i=0; iGetSize(); if (!beginFound) @@ -169,13 +169,13 @@ Ptr PendingData::CopyFromOffset (uint32_t s, uint32_t o) if (count > o) { if (count >= o + s1) //then just copy within this packet - { - Ptr toFragment = data[i]; - uint32_t packetStart = count - toFragment->GetSize(); - uint32_t packetOffset = o - packetStart; - outPacket = toFragment->CreateFragment (packetOffset, s1); - return outPacket; - } + { + Ptr toFragment = data[i]; + uint32_t packetStart = count - toFragment->GetSize(); + uint32_t packetOffset = o - packetStart; + outPacket = toFragment->CreateFragment (packetOffset, s1); + return outPacket; + } begin = i; beginFound = true; Ptr toFragment = data[begin]; @@ -198,7 +198,7 @@ Ptr PendingData::CopyFromOffset (uint32_t s, uint32_t o) } } } - for (std::vector >::size_type i=begin+1;i >::size_type i=begin+1; iAddAtEnd (data[i]); } @@ -252,4 +252,4 @@ PendingData::RemoveToSeq (const SequenceNumber32& seqFront, const SequenceNumber return current; } -}//namepsace ns3 +} //namepsace ns3 diff --git a/src/internet/model/pending-data.h b/src/internet/model/pending-data.h index 1834e6352..e1cac260e 100644 --- a/src/internet/model/pending-data.h +++ b/src/internet/model/pending-data.h @@ -50,8 +50,8 @@ public: // Serialization uint8_t* Serialize (uint8_t*, uint32_t&); // Serialize to a buffer uint8_t* Construct (uint8_t*, uint32_t&); // Construct from buffer - virtual void Clear ();// Remove all associated data - virtual void Add (uint32_t s, const uint8_t* d = 0);// Add some data to end + virtual void Clear (); // Remove all associated data + virtual void Add (uint32_t s, const uint8_t* d = 0); // Add some data to end virtual void Add (Ptr p); /** * This method returns the number of bytes in the PendingData buffer @@ -110,9 +110,9 @@ public: std::vector > data; // Corresponding data (may be null) // The next two fields allow simulated applications to exchange some info uint32_t msgSize; // Total size of message - uint32_t responseSize;// Size of response requested + uint32_t responseSize; // Size of response requested }; -}//namepsace ns3 +} //namepsace ns3 #endif diff --git a/src/internet/model/rtt-estimator.cc b/src/internet/model/rtt-estimator.cc index 57af9915f..f2bbc7cd9 100644 --- a/src/internet/model/rtt-estimator.cc +++ b/src/internet/model/rtt-estimator.cc @@ -31,7 +31,7 @@ #include "ns3/simulator.h" #include "ns3/double.h" -namespace ns3{ +namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (RttEstimator); @@ -58,7 +58,7 @@ RttEstimator::GetTypeId (void) MakeTimeAccessor (&RttEstimator::SetMinRto, &RttEstimator::GetMinRto), MakeTimeChecker ()) - ; + ; return tid; } @@ -87,18 +87,18 @@ RttEstimator::GetEstimate (void) const //RttHistory methods RttHistory::RttHistory (SequenceNumber32 s, uint32_t c, Time t) : seq (s), count (c), time (t), retx (false) - { - } +{ +} RttHistory::RttHistory (const RttHistory& h) : seq (h.seq), count (h.count), time (h.time), retx (h.retx) - { - } +{ +} // Base class methods RttEstimator::RttEstimator () : next (1), history (), - nSamples (0), multiplier (1.0) + nSamples (0), multiplier (1.0) { //note next=1 everywhere since first segment will have sequence 1 } @@ -108,7 +108,8 @@ RttEstimator::RttEstimator(const RttEstimator& c) m_maxMultiplier (c.m_maxMultiplier), est(c.est), minrto(c.minrto), nSamples(c.nSamples), multiplier(c.multiplier) -{} +{ +} RttEstimator::~RttEstimator () { @@ -207,7 +208,7 @@ RttMeanDeviation::GetTypeId (void) DoubleValue (0.1), MakeDoubleAccessor (&RttMeanDeviation::gain), MakeDoubleChecker ()) - ; + ; return tid; } @@ -240,7 +241,7 @@ void RttMeanDeviation::Measurement (Time m) Time RttMeanDeviation::RetransmitTimeout () { - // If not enough samples, justjust return 2 times estimate + // If not enough samples, justjust return 2 times estimate //if (nSamples < 2) return est * 2; int64x64_t retval; if (variance < est / 4.0) @@ -265,4 +266,4 @@ void RttMeanDeviation::Reset () variance = 0; RttEstimator::Reset (); } -}//namepsace ns3 +} //namepsace ns3 diff --git a/src/internet/model/rtt-estimator.h b/src/internet/model/rtt-estimator.h index 16feb7b85..858767310 100644 --- a/src/internet/model/rtt-estimator.h +++ b/src/internet/model/rtt-estimator.h @@ -81,18 +81,18 @@ private: public: int64x64_t est; // Current estimate int64x64_t minrto; // minimum value of the timeout - uint32_t nSamples;// Number of samples + uint32_t nSamples; // Number of samples double multiplier; // RTO Multiplier }; // The "Mean-Deviation" estimator, as discussed by Van Jacobson // "Congestion Avoidance and Control", SIGCOMM 88, Appendix A - //Doc:Class Class {\tt RttMeanDeviation} implements the "Mean--Deviation" estimator - //Doc:Class as described by Van Jacobson - //Doc:Class "Congestion Avoidance and Control", SIGCOMM 88, Appendix A +//Doc:Class Class {\tt RttMeanDeviation} implements the "Mean--Deviation" estimator +//Doc:Class as described by Van Jacobson +//Doc:Class "Congestion Avoidance and Control", SIGCOMM 88, Appendix A class RttMeanDeviation : public RttEstimator { -public : +public: static TypeId GetTypeId (void); RttMeanDeviation (); @@ -100,8 +100,8 @@ public : //Doc:Method RttMeanDeviation (const RttMeanDeviation&); // Copy constructor - //Doc:Desc Copy constructor. - //Doc:Arg1 {\tt RttMeanDeviation} object to copy. + //Doc:Desc Copy constructor. + //Doc:Arg1 {\tt RttMeanDeviation} object to copy. void Measurement (Time); Time RetransmitTimeout (); @@ -113,7 +113,7 @@ public: double gain; // Filter gain int64x64_t variance; // Current variance }; -}//namespace ns3 +} //namespace ns3 #endif diff --git a/src/internet/model/sim_errno.h b/src/internet/model/sim_errno.h index 7c7443d26..d130dbcc0 100644 --- a/src/internet/model/sim_errno.h +++ b/src/internet/model/sim_errno.h @@ -13,23 +13,23 @@ // the nsc_errno numbers below, accept() will return 0 on success or // one of the nsc_errno numbers below, etc. enum nsc_errno { - NSC_EUNKNOWN = -1, - NSC_EADDRINUSE = -10, - NSC_EADDRNOTAVAIL = -11, - NSC_EAGAIN = -12, - NSC_EALREADY = -25, - NSC_ECONNREFUSED = -32, - NSC_ECONNRESET = -33, - NSC_EHOSTDOWN = -50, - NSC_EHOSTUNREACH = -51, - NSC_EINPROGRESS = -60, - NSC_EISCONN = -61, - NSC_EMSGSIZE = -70, - NSC_ENETUNREACH = -82, - NSC_ENOTCONN = -86, - NSC_ENOTDIR = -87, // used by sysctl(2) - NSC_ESHUTDOWN = -130, - NSC_ETIMEDOUT = -140, + NSC_EUNKNOWN = -1, + NSC_EADDRINUSE = -10, + NSC_EADDRNOTAVAIL = -11, + NSC_EAGAIN = -12, + NSC_EALREADY = -25, + NSC_ECONNREFUSED = -32, + NSC_ECONNRESET = -33, + NSC_EHOSTDOWN = -50, + NSC_EHOSTUNREACH = -51, + NSC_EINPROGRESS = -60, + NSC_EISCONN = -61, + NSC_EMSGSIZE = -70, + NSC_ENETUNREACH = -82, + NSC_ENOTCONN = -86, + NSC_ENOTDIR = -87, // used by sysctl(2) + NSC_ESHUTDOWN = -130, + NSC_ETIMEDOUT = -140, }; #endif diff --git a/src/internet/model/sim_interface.h b/src/internet/model/sim_interface.h index c290235eb..75d41dd88 100644 --- a/src/internet/model/sim_interface.h +++ b/src/internet/model/sim_interface.h @@ -24,177 +24,177 @@ struct INetStack { - virtual ~INetStack() {} + virtual ~INetStack() {} - virtual void init(int hz) = 0; - - virtual void if_receive_packet(int if_id, const void *data, int datalen) = 0; - - virtual void if_send_packet(const void *data, int datalen) = 0; - virtual void if_send_finish(int if_id) = 0; + virtual void init(int hz) = 0; - virtual void if_attach(const char *addr, const char *mask, int mtu) = 0; - virtual void add_default_gateway(const char *addr) = 0; + virtual void if_receive_packet(int if_id, const void *data, int datalen) = 0; - /** Purely for debugging/diagnostic purposes. This returns the internal id - * of the stack instance. - */ - virtual int get_id() = 0; + virtual void if_send_packet(const void *data, int datalen) = 0; + virtual void if_send_finish(int if_id) = 0; - /** Should return a short one-word name of the stack. Eg. Linux 2.4.x -> - * linux24, FreeBSD 5.x -> freebsd5. This can be used to identify output - * from a stack, for example a packet trace file. */ - virtual const char *get_name() = 0; + virtual void if_attach(const char *addr, const char *mask, int mtu) = 0; + virtual void add_default_gateway(const char *addr) = 0; - /** This is used so the simulator can call the stack timer_interrupt function - * the correct amount of times per second. For example, lwip has a hz of 10, - * which it returns here to say that it's timer_interrupt should be called - * 10 times a second. FreeBSD uses 100, as does Linux 2.4, while Linux 2.6 - * uses 1000. (This is often configurable in the kernel in question, also.) - */ - virtual int get_hz() = 0; + /** Purely for debugging/diagnostic purposes. This returns the internal id + * of the stack instance. + */ + virtual int get_id() = 0; - virtual void timer_interrupt() = 0; - virtual void increment_ticks() = 0; + /** Should return a short one-word name of the stack. Eg. Linux 2.4.x -> + * linux24, FreeBSD 5.x -> freebsd5. This can be used to identify output + * from a stack, for example a packet trace file. */ + virtual const char *get_name() = 0; - virtual void buffer_size(int size) = 0; - - virtual struct INetDatagramSocket *new_udp_socket() { return NULL; } - virtual struct INetStreamSocket *new_tcp_socket() { return NULL; } - virtual struct INetStreamSocket *new_sctp_socket() { return NULL; } + /** This is used so the simulator can call the stack timer_interrupt function + * the correct amount of times per second. For example, lwip has a hz of 10, + * which it returns here to say that it's timer_interrupt should be called + * 10 times a second. FreeBSD uses 100, as does Linux 2.4, while Linux 2.6 + * uses 1000. (This is often configurable in the kernel in question, also.) + */ + virtual int get_hz() = 0; - // The following I've made optional to implement for now. Eases - // integration of new features. - virtual int sysctl(const char *sysctl_name, void *oldval, size_t *oldlenp, - void *newval, size_t newlen) - { - return -1; - } + virtual void timer_interrupt() = 0; + virtual void increment_ticks() = 0; - // alternate, simpler interface. the stack cradle code is expected - // to convert the string-value to something that the stack can handle. - // The idea here is that this is a front-end to the sysctl(2) call, - // much like the sysctl(8) program. - virtual int sysctl_set(const char *name, const char *value) - { - return -1; - } + virtual void buffer_size(int size) = 0; - // same as above, cradle code is expected to convert the sysctl value - // into a string. - // returns length of the string in value, i.e. retval > len: 'output truncated'. - virtual int sysctl_get(const char *name, char *value, size_t len) - { - return -1; - } + virtual struct INetDatagramSocket *new_udp_socket() { return NULL; } + virtual struct INetStreamSocket *new_tcp_socket() { return NULL; } + virtual struct INetStreamSocket *new_sctp_socket() { return NULL; } - // this tells the cradle code to put the name of sysctl number 'idx' - // into name[]. - // The idea is that this can be used to get a list of all available sysctls: - // char buf[256] - // for (i=0; sysctl_getnum(i, buf, sizeof(buf)) > 0 ;i++) - // puts(buf); - // returns -1 if idx is out of range and the length of the sysctl name otherwise. - virtual int sysctl_getnum(size_t idx, char *name, size_t len) - { - return -1; - } + // The following I've made optional to implement for now. Eases + // integration of new features. + virtual int sysctl(const char *sysctl_name, void *oldval, size_t *oldlenp, + void *newval, size_t newlen) + { + return -1; + } - virtual void show_config() - { - ; - } + // alternate, simpler interface. the stack cradle code is expected + // to convert the string-value to something that the stack can handle. + // The idea here is that this is a front-end to the sysctl(2) call, + // much like the sysctl(8) program. + virtual int sysctl_set(const char *name, const char *value) + { + return -1; + } - /* Optional functions used to get and set variables for this stack */ - virtual bool get_var(const char *var, char *result, int result_len) - { - return false; - } - - virtual bool set_var(const char *var, const char *val) - { - return false; - } + // same as above, cradle code is expected to convert the sysctl value + // into a string. + // returns length of the string in value, i.e. retval > len: 'output truncated'. + virtual int sysctl_get(const char *name, char *value, size_t len) + { + return -1; + } - /** The level of debugging or diagnostic information to print out. This - * normally means kernel messages printed out during initialisation but - * may also include extra debugging messages that are part of NSC. */ - virtual void set_diagnostic(int level) {} + // this tells the cradle code to put the name of sysctl number 'idx' + // into name[]. + // The idea is that this can be used to get a list of all available sysctls: + // char buf[256] + // for (i=0; sysctl_getnum(i, buf, sizeof(buf)) > 0 ;i++) + // puts(buf); + // returns -1 if idx is out of range and the length of the sysctl name otherwise. + virtual int sysctl_getnum(size_t idx, char *name, size_t len) + { + return -1; + } - /** Simple interface to support sending any textual command to a stack - * - * @returns 0 on success - */ - virtual int cmd(const char *) - { - return 1; - } + virtual void show_config() + { + ; + } + + /* Optional functions used to get and set variables for this stack */ + virtual bool get_var(const char *var, char *result, int result_len) + { + return false; + } + + virtual bool set_var(const char *var, const char *val) + { + return false; + } + + /** The level of debugging or diagnostic information to print out. This + * normally means kernel messages printed out during initialisation but + * may also include extra debugging messages that are part of NSC. */ + virtual void set_diagnostic(int level) {} + + /** Simple interface to support sending any textual command to a stack + * + * @returns 0 on success + */ + virtual int cmd(const char *) + { + return 1; + } }; struct INetStreamSocket { - virtual ~INetStreamSocket() {} + virtual ~INetStreamSocket() {} - virtual void connect(const char *, int) = 0; - virtual void disconnect() = 0; - virtual void listen(int) = 0; - virtual int accept(INetStreamSocket **) = 0; - virtual int send_data(const void *data, int datalen) = 0; - virtual int read_data(void *buf, int *buflen) = 0; - /* We need to pass the option name in as a string here. The reason for - * this is that different operating systems you compile on will have - * different numbers defined for the constants SO_SNDBUF and so on. */ - virtual int setsockopt(char *optname, void *val, size_t valsize) = 0; - virtual void print_state(FILE *) = 0; - virtual bool is_connected() = 0; - virtual bool is_listening() = 0; + virtual void connect(const char *, int) = 0; + virtual void disconnect() = 0; + virtual void listen(int) = 0; + virtual int accept(INetStreamSocket **) = 0; + virtual int send_data(const void *data, int datalen) = 0; + virtual int read_data(void *buf, int *buflen) = 0; + /* We need to pass the option name in as a string here. The reason for + * this is that different operating systems you compile on will have + * different numbers defined for the constants SO_SNDBUF and so on. */ + virtual int setsockopt(char *optname, void *val, size_t valsize) = 0; + virtual void print_state(FILE *) = 0; + virtual bool is_connected() = 0; + virtual bool is_listening() = 0; - virtual int getpeername(struct sockaddr *sa, size_t *salen) { - return -1; - } - virtual int getsockname(struct sockaddr *sa, size_t *salen) { - return -1; - } - /* Optional functions used to get and set variables for this TCP - * connection. */ - virtual bool get_var(const char *var, char *result, int result_len) - { - return false; - } - - virtual bool set_var(const char *var, const char *val) - { - return false; - } + virtual int getpeername(struct sockaddr *sa, size_t *salen) { + return -1; + } + virtual int getsockname(struct sockaddr *sa, size_t *salen) { + return -1; + } + /* Optional functions used to get and set variables for this TCP + * connection. */ + virtual bool get_var(const char *var, char *result, int result_len) + { + return false; + } + + virtual bool set_var(const char *var, const char *val) + { + return false; + } }; struct INetDatagramSocket { - virtual ~INetDatagramSocket() {} + virtual ~INetDatagramSocket() {} - virtual void set_destination(const char *, int) = 0; - virtual void send_data(const void *data, int datalen) = 0; + virtual void set_destination(const char *, int) = 0; + virtual void send_data(const void *data, int datalen) = 0; }; struct ISendCallback { - virtual ~ISendCallback() {} + virtual ~ISendCallback() {} - virtual void send_callback(const void *data, int datalen) = 0; + virtual void send_callback(const void *data, int datalen) = 0; }; struct IInterruptCallback { - virtual ~IInterruptCallback() {} + virtual ~IInterruptCallback() {} - virtual void wakeup() = 0; - virtual void gettime(unsigned int *, unsigned int *) = 0; + virtual void wakeup() = 0; + virtual void gettime(unsigned int *, unsigned int *) = 0; }; typedef int (*FRandom)(); typedef INetStack *(*FCreateStack)(ISendCallback *, IInterruptCallback *, - FRandom); + FRandom); -#define CREATE_STACK_FUNC(a,b,c) extern "C" INetStack *nsc_create_stack(\ - ISendCallback *a, IInterruptCallback *b, FRandom c) +#define CREATE_STACK_FUNC(a,b,c) extern "C" INetStack *nsc_create_stack( \ + ISendCallback *a, IInterruptCallback *b, FRandom c) #endif diff --git a/src/internet/model/tcp-header.cc b/src/internet/model/tcp-header.cc index 3c6f287c2..e2670f0b0 100644 --- a/src/internet/model/tcp-header.cc +++ b/src/internet/model/tcp-header.cc @@ -39,10 +39,12 @@ TcpHeader::TcpHeader () m_urgentPointer (0), m_calcChecksum(false), m_goodChecksum(true) -{} +{ +} TcpHeader::~TcpHeader () -{} +{ +} void TcpHeader::EnableChecksums (void) @@ -157,7 +159,7 @@ TcpHeader::GetTypeId (void) static TypeId tid = TypeId ("ns3::TcpHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } TypeId @@ -169,34 +171,34 @@ void TcpHeader::Print (std::ostream &os) const { os << m_sourcePort << " > " << m_destinationPort; if(m_flags!=0) - { - os<<" ["; - if((m_flags & FIN) != 0) { - os<<" FIN "; + os<<" ["; + if((m_flags & FIN) != 0) + { + os<<" FIN "; + } + if((m_flags & SYN) != 0) + { + os<<" SYN "; + } + if((m_flags & RST) != 0) + { + os<<" RST "; + } + if((m_flags & PSH) != 0) + { + os<<" PSH "; + } + if((m_flags & ACK) != 0) + { + os<<" ACK "; + } + if((m_flags & URG) != 0) + { + os<<" URG "; + } + os<<"]"; } - if((m_flags & SYN) != 0) - { - os<<" SYN "; - } - if((m_flags & RST) != 0) - { - os<<" RST "; - } - if((m_flags & PSH) != 0) - { - os<<" PSH "; - } - if((m_flags & ACK) != 0) - { - os<<" ACK "; - } - if((m_flags & URG) != 0) - { - os<<" URG "; - } - os<<"]"; - } os<<" Seq="<GetSize()); + << " receiving seq " << tcpHeader.GetSequenceNumber() + << " ack " << tcpHeader.GetAckNumber() + << " flags "<< std::hex << (int)tcpHeader.GetFlags() << std::dec + << " data size " << packet->GetSize()); if(!tcpHeader.IsChecksumOk ()) - { - NS_LOG_INFO("Bad checksum, dropping packet!"); - return Ipv4L4Protocol::RX_CSUM_FAILED; - } + { + NS_LOG_INFO("Bad checksum, dropping packet!"); + return Ipv4L4Protocol::RX_CSUM_FAILED; + } NS_LOG_LOGIC ("TcpL4Protocol "<Lookup (ipHeader.GetDestination (), tcpHeader.GetDestinationPort (), ipHeader.GetSource (), tcpHeader.GetSourcePort (),incomingInterface); if (endPoints.empty ()) - { - NS_LOG_LOGIC (" No endpoints matched on TcpL4Protocol "< rstPacket = Create (); - TcpHeader header; - if (tcpHeader.GetFlags () & TcpHeader::ACK) - { - // ACK bit was set - header.SetFlags (TcpHeader::RST); - header.SetSequenceNumber (header.GetAckNumber ()); - } - else - { - header.SetFlags (TcpHeader::RST | TcpHeader::ACK); - header.SetSequenceNumber (SequenceNumber32 (0)); - header.SetAckNumber (header.GetSequenceNumber () + SequenceNumber32 (1)); - } - header.SetSourcePort (tcpHeader.GetDestinationPort ()); - header.SetDestinationPort (tcpHeader.GetSourcePort ()); - SendPacket (rstPacket, header, ipHeader.GetDestination (), ipHeader.GetSource ()); - return Ipv4L4Protocol::RX_ENDPOINT_CLOSED; - } - else - { - return Ipv4L4Protocol::RX_ENDPOINT_CLOSED; - } - } - NS_ASSERT_MSG (endPoints.size() == 1 , "Demux returned more than one endpoint"); + if (!(tcpHeader.GetFlags () & TcpHeader::RST)) + { + // build a RST packet and send + Ptr rstPacket = Create (); + TcpHeader header; + if (tcpHeader.GetFlags () & TcpHeader::ACK) + { + // ACK bit was set + header.SetFlags (TcpHeader::RST); + header.SetSequenceNumber (header.GetAckNumber ()); + } + else + { + header.SetFlags (TcpHeader::RST | TcpHeader::ACK); + header.SetSequenceNumber (SequenceNumber32 (0)); + header.SetAckNumber (header.GetSequenceNumber () + SequenceNumber32 (1)); + } + header.SetSourcePort (tcpHeader.GetDestinationPort ()); + header.SetDestinationPort (tcpHeader.GetSourcePort ()); + SendPacket (rstPacket, header, ipHeader.GetDestination (), ipHeader.GetSource ()); + return Ipv4L4Protocol::RX_ENDPOINT_CLOSED; + } + else + { + return Ipv4L4Protocol::RX_ENDPOINT_CLOSED; + } + } + NS_ASSERT_MSG (endPoints.size() == 1, "Demux returned more than one endpoint"); NS_LOG_LOGIC ("TcpL4Protocol "<ForwardUp (packet, ipHeader, tcpHeader.GetSourcePort (), incomingInterface); @@ -300,8 +300,8 @@ TcpL4Protocol::Receive (Ptr packet, void TcpL4Protocol::Send (Ptr packet, - Ipv4Address saddr, Ipv4Address daddr, - uint16_t sport, uint16_t dport, Ptr oif) + Ipv4Address saddr, Ipv4Address daddr, + uint16_t sport, uint16_t dport, Ptr oif) { NS_LOG_FUNCTION (this << packet << saddr << daddr << sport << dport << oif); @@ -309,12 +309,12 @@ TcpL4Protocol::Send (Ptr packet, tcpHeader.SetDestinationPort (dport); tcpHeader.SetSourcePort (sport); if(Node::ChecksumEnabled ()) - { - tcpHeader.EnableChecksums(); - } + { + tcpHeader.EnableChecksums(); + } tcpHeader.InitializeChecksum (saddr, - daddr, - PROT_NUMBER); + daddr, + PROT_NUMBER); tcpHeader.SetFlags (TcpHeader::ACK); tcpHeader.SetAckNumber (SequenceNumber32 (0)); @@ -344,13 +344,13 @@ TcpL4Protocol::Send (Ptr packet, void TcpL4Protocol::SendPacket (Ptr packet, const TcpHeader &outgoing, - Ipv4Address saddr, Ipv4Address daddr, Ptr oif) + Ipv4Address saddr, Ipv4Address daddr, Ptr oif) { NS_LOG_LOGIC("TcpL4Protocol " << this - << " sending seq " << outgoing.GetSequenceNumber() - << " ack " << outgoing.GetAckNumber() - << " flags " << std::hex << (int)outgoing.GetFlags() << std::dec - << " data size " << packet->GetSize()); + << " sending seq " << outgoing.GetSequenceNumber() + << " ack " << outgoing.GetAckNumber() + << " flags " << std::hex << (int)outgoing.GetFlags() << std::dec + << " data size " << packet->GetSize()); NS_LOG_FUNCTION (this << packet << saddr << daddr << oif); // XXX outgoingHeader cannot be logged @@ -358,9 +358,9 @@ TcpL4Protocol::SendPacket (Ptr packet, const TcpHeader &outgoing, outgoingHeader.SetLength (5); //header length in units of 32bit words /* outgoingHeader.SetUrgentPointer (0); //XXX */ if(Node::ChecksumEnabled ()) - { - outgoingHeader.EnableChecksums(); - } + { + outgoingHeader.EnableChecksums(); + } outgoingHeader.InitializeChecksum(saddr, daddr, PROT_NUMBER); packet->AddHeader (outgoingHeader); diff --git a/src/internet/model/tcp-l4-protocol.h b/src/internet/model/tcp-l4-protocol.h index bd650bd8c..67adbf212 100644 --- a/src/internet/model/tcp-l4-protocol.h +++ b/src/internet/model/tcp-l4-protocol.h @@ -122,7 +122,7 @@ private: private: friend class TcpSocketBase; void SendPacket (Ptr, const TcpHeader &, - Ipv4Address, Ipv4Address, Ptr oif = 0); + Ipv4Address, Ipv4Address, Ptr oif = 0); TcpL4Protocol (const TcpL4Protocol &o); TcpL4Protocol &operator = (const TcpL4Protocol &o); diff --git a/src/internet/model/tcp-newreno.cc b/src/internet/model/tcp-newreno.cc index ef44b673c..ebd38cadb 100644 --- a/src/internet/model/tcp-newreno.cc +++ b/src/internet/model/tcp-newreno.cc @@ -147,14 +147,14 @@ TcpNewReno::NewAck (const SequenceNumber32& seq) void TcpNewReno::DupAck (const TcpHeader& t, uint32_t count) { - if (count == 3 && ! m_inFastRec) + if (count == 3 && !m_inFastRec) { // triple duplicate ack triggers fast retransmit (RFC2582 sec.3 bullet #1) m_ssThresh = std::max (2 * m_segmentSize, BytesInFlight () / 2); m_cWnd = m_ssThresh + 3 * m_segmentSize; m_recover = m_highTxMark; m_inFastRec = true; NS_LOG_INFO ("Triple dupack. Enter fast recovery mode. Reset cwnd to " << m_cWnd << - ", ssthresh to " << m_ssThresh << " at fast recovery seqnum " << m_recover); + ", ssthresh to " << m_ssThresh << " at fast recovery seqnum " << m_recover); DoRetransmit (); } else if (m_inFastRec) @@ -185,7 +185,7 @@ TcpNewReno::Retransmit (void) m_cWnd = m_segmentSize; m_nextTxSequence = m_txBuffer.HeadSequence (); // Restart from highest Ack NS_LOG_INFO ("RTO. Reset cwnd to " << m_cWnd << - ", ssthresh to " << m_ssThresh << ", restart from seqnum " << m_nextTxSequence); + ", ssthresh to " << m_ssThresh << ", restart from seqnum " << m_nextTxSequence); m_rtt->IncreaseMultiplier (); // Double the next RTO DoRetransmit (); // Retransmit the packet } diff --git a/src/internet/model/tcp-newreno.h b/src/internet/model/tcp-newreno.h index f19750bda..bcb3fc86b 100644 --- a/src/internet/model/tcp-newreno.h +++ b/src/internet/model/tcp-newreno.h @@ -45,8 +45,8 @@ public: virtual ~TcpNewReno (void); // From TcpSocketBase - virtual int Connect (const Address &address); - virtual int Listen (void); + virtual int Connect (const Address &address); + virtual int Listen (void); protected: virtual uint32_t Window (void); // Return the max possible number of unacked bytes diff --git a/src/internet/model/tcp-reno.cc b/src/internet/model/tcp-reno.cc index ddf4e563a..559364b79 100644 --- a/src/internet/model/tcp-reno.cc +++ b/src/internet/model/tcp-reno.cc @@ -141,7 +141,7 @@ void TcpReno::DupAck (const TcpHeader& t, uint32_t count) { NS_LOG_FUNCTION (this << "t " << count); - if (count == 3 && ! m_inFastRec) + if (count == 3 && !m_inFastRec) { // triple duplicate ack triggers fast retransmit (RFC2581, sec.3.2) m_ssThresh = std::max (2 * m_segmentSize, BytesInFlight () / 2); m_cWnd = m_ssThresh + 3 * m_segmentSize; @@ -176,7 +176,7 @@ void TcpReno::Retransmit (void) m_cWnd = m_segmentSize; m_nextTxSequence = m_txBuffer.HeadSequence (); // Restart from highest Ack NS_LOG_INFO ("RTO. Reset cwnd to " << m_cWnd << - ", ssthresh to " << m_ssThresh << ", restart from seqnum " << m_nextTxSequence); + ", ssthresh to " << m_ssThresh << ", restart from seqnum " << m_nextTxSequence); m_rtt->IncreaseMultiplier (); // Double the next RTO DoRetransmit (); // Retransmit the packet } diff --git a/src/internet/model/tcp-reno.h b/src/internet/model/tcp-reno.h index 0612edbd9..91eaf76e9 100644 --- a/src/internet/model/tcp-reno.h +++ b/src/internet/model/tcp-reno.h @@ -47,8 +47,8 @@ public: virtual ~TcpReno (void); // From TcpSocketBase - virtual int Connect (const Address &address); - virtual int Listen (void); + virtual int Connect (const Address &address); + virtual int Listen (void); protected: virtual uint32_t Window (void); // Return the max possible number of unacked bytes diff --git a/src/internet/model/tcp-rx-buffer.cc b/src/internet/model/tcp-rx-buffer.cc index fdd703abc..8a2a5e350 100644 --- a/src/internet/model/tcp-rx-buffer.cc +++ b/src/internet/model/tcp-rx-buffer.cc @@ -142,7 +142,7 @@ TcpRxBuffer::Add (Ptr p, TcpHeader const& tcph) SequenceNumber32 headSeq = tcph.GetSequenceNumber (); SequenceNumber32 tailSeq = headSeq + SequenceNumber32 (pktSize); NS_LOG_LOGIC ("Add pkt " << p << " len=" << pktSize << " seq=" << headSeq - << ", when NextRxSeq=" << m_nextRxSeq << ", buffsize=" << m_size); + << ", when NextRxSeq=" << m_nextRxSeq << ", buffsize=" << m_size); // Trim packet to fit Rx window specification if (headSeq < m_nextRxSeq) headSeq = m_nextRxSeq; @@ -257,7 +257,7 @@ TcpRxBuffer::Extract (uint32_t maxSize) return 0; } NS_LOG_LOGIC ("Extracted " << outPkt->GetSize( ) << " bytes, bufsize=" << m_size - << ", num pkts in buffer=" << m_data.size ()); + << ", num pkts in buffer=" << m_data.size ()); return outPkt; } diff --git a/src/internet/model/tcp-rx-buffer.h b/src/internet/model/tcp-rx-buffer.h index 5c6efcd5b..ee30df7f1 100644 --- a/src/internet/model/tcp-rx-buffer.h +++ b/src/internet/model/tcp-rx-buffer.h @@ -81,9 +81,9 @@ public: uint32_t m_maxBuffer; //< Upper bound of the number of data bytes in buffer (RCV.WND) uint32_t m_availBytes; //< Number of bytes available to read, i.e. contiguous block at head std::map > m_data; - //< Corresponding data (may be null) + //< Corresponding data (may be null) }; -}//namepsace ns3 +} //namepsace ns3 #endif /* __TCP_RX_BUFFER_H__ */ diff --git a/src/internet/model/tcp-socket-base.cc b/src/internet/model/tcp-socket-base.cc index b949a32db..351558c0c 100644 --- a/src/internet/model/tcp-socket-base.cc +++ b/src/internet/model/tcp-socket-base.cc @@ -416,6 +416,9 @@ TcpSocketBase::RecvFrom (uint32_t maxSize, uint32_t flags, Address &fromAddress) bool found; found = packet->PeekPacketTag (tag); NS_ASSERT (found); + //cast found to void , to suppress 'found' set but not used compiler warning + //in optimized builds + (void) found; fromAddress = tag.GetAddress (); } return packet; @@ -580,7 +583,7 @@ TcpSocketBase::OutOfRange (SequenceNumber32 s) const // sequence number must equals to m_rxBuffer.NextRxSequence () return (m_rxBuffer.NextRxSequence () != s); }; - + // In all other cases, check if the sequence number is in range return (m_rxBuffer.MaxRxSequence () < s || m_rxBuffer.NextRxSequence () > s); } @@ -620,9 +623,9 @@ TcpSocketBase::ForwardUp (Ptr packet, Ipv4Header header, uint16_t port, if (OutOfRange (tcpHeader.GetSequenceNumber ())) { NS_LOG_LOGIC ("At state " << TcpStateName[m_state] << - " received packet of seq " << tcpHeader.GetSequenceNumber () << - " out of range [" << m_rxBuffer.NextRxSequence () << ":" << - m_rxBuffer.MaxRxSequence () << "]"); + " received packet of seq " << tcpHeader.GetSequenceNumber () << + " out of range [" << m_rxBuffer.NextRxSequence () << ":" << + m_rxBuffer.MaxRxSequence () << "]"); return; } @@ -1056,7 +1059,7 @@ TcpSocketBase::PeerClose (Ptr p, const TcpHeader& tcpHeader) ReceivedData (p, tcpHeader); } // Return if FIN is out of sequence, otherwise move to CLOSE_WAIT state by DoPeerClose - if (! m_rxBuffer.Finished ()) + if (!m_rxBuffer.Finished ()) { return; }; @@ -1422,7 +1425,7 @@ TcpSocketBase::ReceivedData (Ptr p, const TcpHeader& tcpHeader) else if (m_delAckEvent.IsExpired ()) { m_delAckEvent = Simulator::Schedule (m_delAckTimeout, - &TcpSocketBase::DelAckTimeout, this); + &TcpSocketBase::DelAckTimeout, this); } } // Notify app to receive if necessary @@ -1747,7 +1750,7 @@ bool TcpSocketBase::SetAllowBroadcast (bool allowBroadcast) { // Broadcast is not implemented. Return true only if allowBroadcast==false - return (! allowBroadcast); + return (!allowBroadcast); } bool diff --git a/src/internet/model/tcp-socket-base.h b/src/internet/model/tcp-socket-base.h index e9fb2a2ea..0d676dd59 100644 --- a/src/internet/model/tcp-socket-base.h +++ b/src/internet/model/tcp-socket-base.h @@ -77,7 +77,7 @@ public: // Necessary implementations of null functions from ns3::Socket virtual enum SocketErrno GetErrno (void) const; // returns m_errno - virtual enum SocketType GetSocketType (void) const;// returns socket type + virtual enum SocketType GetSocketType (void) const; // returns socket type virtual Ptr GetNode (void) const; // returns m_node virtual int Bind (void); // Bind a socket by setting up endpoint in TcpL4Protocol virtual int Bind (const Address &address); // ... endpoint of specific addr or port diff --git a/src/internet/model/tcp-socket-factory-impl.cc b/src/internet/model/tcp-socket-factory-impl.cc index ef806adf4..7cb8ed553 100644 --- a/src/internet/model/tcp-socket-factory-impl.cc +++ b/src/internet/model/tcp-socket-factory-impl.cc @@ -26,13 +26,14 @@ namespace ns3 { TcpSocketFactoryImpl::TcpSocketFactoryImpl () : m_tcp (0) -{} +{ +} TcpSocketFactoryImpl::~TcpSocketFactoryImpl () { NS_ASSERT (m_tcp == 0); } -void +void TcpSocketFactoryImpl::SetTcp (Ptr tcp) { m_tcp = tcp; diff --git a/src/internet/model/tcp-socket-factory-impl.h b/src/internet/model/tcp-socket-factory-impl.h index d0c2b3a11..e6c577dd5 100644 --- a/src/internet/model/tcp-socket-factory-impl.h +++ b/src/internet/model/tcp-socket-factory-impl.h @@ -28,10 +28,10 @@ namespace ns3 { class TcpL4Protocol; /** - * \ingroup internetStack + * \ingroup internet * \defgroup tcp Tcp * - * This class serves to create sockets of the TcpSocketBase type. + * This class serves to create sockets of the TcpSocketBase type. */ /** diff --git a/src/internet/model/tcp-socket.cc b/src/internet/model/tcp-socket.cc index fbf5dc69b..5ddccb873 100644 --- a/src/internet/model/tcp-socket.cc +++ b/src/internet/model/tcp-socket.cc @@ -32,7 +32,7 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (TcpSocket); -const char* const TcpSocket::TcpStateName[LAST_STATE] = {"CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD", "ESTABLISHED", "CLOSE_WAIT", "LAST_ACK", "FIN_WAIT_1", "FIN_WAIT_2", "CLOSING", "TIME_WAIT" }; +const char* const TcpSocket::TcpStateName[LAST_STATE] = { "CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD", "ESTABLISHED", "CLOSE_WAIT", "LAST_ACK", "FIN_WAIT_1", "FIN_WAIT_2", "CLOSING", "TIME_WAIT" }; TypeId TcpSocket::GetTypeId (void) @@ -99,7 +99,7 @@ TcpSocket::GetTypeId (void) MakeTimeAccessor (&TcpSocket::GetPersistTimeout, &TcpSocket::SetPersistTimeout), MakeTimeChecker ()) - ; + ; return tid; } diff --git a/src/internet/model/tcp-socket.h b/src/internet/model/tcp-socket.h index 50eff31f2..31f4e0409 100644 --- a/src/internet/model/tcp-socket.h +++ b/src/internet/model/tcp-socket.h @@ -48,7 +48,8 @@ typedef enum { FIN_WAIT_2, // 8 CLOSING, // 9 TIME_WAIT, // 10 - LAST_STATE } TcpStates_t; + LAST_STATE +} TcpStates_t; /** * \ingroup socket @@ -61,7 +62,7 @@ typedef enum { class TcpSocket : public Socket { public: - static TypeId GetTypeId (void); + static TypeId GetTypeId (void); TcpSocket (void); virtual ~TcpSocket (void); @@ -91,7 +92,7 @@ private: virtual uint32_t GetDelAckMaxCount (void) const = 0; virtual void SetPersistTimeout (Time timeout) = 0; virtual Time GetPersistTimeout (void) const = 0; - + }; } //namespace ns3 diff --git a/src/internet/model/tcp-tahoe.h b/src/internet/model/tcp-tahoe.h index a875f7bdb..dbd9d06c5 100644 --- a/src/internet/model/tcp-tahoe.h +++ b/src/internet/model/tcp-tahoe.h @@ -51,8 +51,8 @@ public: virtual ~TcpTahoe (void); // From TcpSocketBase - virtual int Connect (const Address &address); - virtual int Listen (void); + virtual int Connect (const Address &address); + virtual int Listen (void); protected: virtual uint32_t Window (void); // Return the max possible number of unacked bytes diff --git a/src/internet/model/tcp-tx-buffer.cc b/src/internet/model/tcp-tx-buffer.cc index 7ea1d308d..e56405116 100644 --- a/src/internet/model/tcp-tx-buffer.cc +++ b/src/internet/model/tcp-tx-buffer.cc @@ -74,7 +74,7 @@ TcpTxBuffer::TailSequence (void) const uint32_t TcpTxBuffer::Size (void) const { - return m_size; + return m_size; } uint32_t @@ -100,7 +100,7 @@ TcpTxBuffer::Add (Ptr p) { NS_LOG_FUNCTION (this << p); NS_LOG_LOGIC ("Packet of size " << p->GetSize () << " appending to window starting at " - << m_firstByteSeq << ", availSize="<< Available ()); + << m_firstByteSeq << ", availSize="<< Available ()); if (p->GetSize () <= Available ()) { if (p->GetSize () > 0) @@ -158,7 +158,7 @@ TcpTxBuffer::CopyFromSequence (uint32_t numBytes, const SequenceNumber32& seq) if (count + pktSize > offset) { NS_LOG_LOGIC ("First byte found in packet #" << pktCount << " at buffer offset " << count - << ", packet len=" << pktSize); + << ", packet len=" << pktSize); beginFound = true; uint32_t packetOffset = offset - count; uint32_t fragmentLength = count + pktSize - offset; @@ -176,7 +176,7 @@ TcpTxBuffer::CopyFromSequence (uint32_t numBytes, const SequenceNumber32& seq) else if (count + pktSize >= offset + s) { // Last packet fragment found NS_LOG_LOGIC ("Last byte found in packet #" << pktCount << " at buffer offset " << count - << ", packet len=" << pktSize); + << ", packet len=" << pktSize); uint32_t fragmentLength = offset + s - count; Ptr endFragment = (*i)->CreateFragment (0, fragmentLength); outPacket->AddAtEnd (endFragment); @@ -207,7 +207,7 @@ TcpTxBuffer::DiscardUpTo (const SequenceNumber32& seq) { NS_LOG_FUNCTION (this << seq); NS_LOG_LOGIC ("current data size=" << m_size << ", headSeq=" << m_firstByteSeq << ", maxBuffer=" << m_maxBuffer - << ", numPkts=" << m_data.size ()); + << ", numPkts=" << m_data.size ()); // Cases do not need to scan the buffer if (m_firstByteSeq >= seq) return; @@ -243,7 +243,7 @@ TcpTxBuffer::DiscardUpTo (const SequenceNumber32& seq) m_firstByteSeq = seq; } NS_LOG_LOGIC ("size=" << m_size << " headSeq=" << m_firstByteSeq << " maxBuffer=" << m_maxBuffer - <<" numPkts="<< m_data.size ()); + <<" numPkts="<< m_data.size ()); NS_ASSERT (m_firstByteSeq == seq); } diff --git a/src/internet/model/udp-header.cc b/src/internet/model/udp-header.cc index ce0af0766..95176dc71 100644 --- a/src/internet/model/udp-header.cc +++ b/src/internet/model/udp-header.cc @@ -35,7 +35,8 @@ UdpHeader::UdpHeader () m_payloadSize (0xfffd), m_calcChecksum(false), m_goodChecksum(true) -{} +{ +} UdpHeader::~UdpHeader () { m_sourcePort = 0xfffe; @@ -71,8 +72,8 @@ UdpHeader::GetDestinationPort (void) const } void UdpHeader::InitializeChecksum (Ipv4Address source, - Ipv4Address destination, - uint8_t protocol) + Ipv4Address destination, + uint8_t protocol) { m_source = source; m_destination = destination; @@ -110,7 +111,7 @@ UdpHeader::GetTypeId (void) static TypeId tid = TypeId ("ns3::UdpHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } TypeId @@ -124,7 +125,7 @@ UdpHeader::Print (std::ostream &os) const os << "length: " << m_payloadSize + GetSerializedSize () << " " << m_sourcePort << " > " << m_destinationPort - ; + ; } uint32_t @@ -164,13 +165,13 @@ UdpHeader::Deserialize (Buffer::Iterator start) i.Next (2); if(m_calcChecksum) - { + { uint16_t headerChecksum = CalculateHeaderChecksum (start.GetSize ()); i = start; uint16_t checksum = i.CalculateIpChecksum (start.GetSize (), headerChecksum); m_goodChecksum = (checksum == 0); - } + } return GetSerializedSize (); } diff --git a/src/internet/model/udp-l4-protocol.cc b/src/internet/model/udp-l4-protocol.cc index 1884be060..f971e5572 100644 --- a/src/internet/model/udp-l4-protocol.cc +++ b/src/internet/model/udp-l4-protocol.cc @@ -53,7 +53,7 @@ UdpL4Protocol::GetTypeId (void) ObjectVectorValue (), MakeObjectVectorAccessor (&UdpL4Protocol::m_sockets), MakeObjectVectorChecker ()) - ; + ; return tid; } @@ -81,7 +81,7 @@ UdpL4Protocol::SetNode (Ptr node) */ void UdpL4Protocol::NotifyNewAggregate () -{ +{ if (m_node == 0) { Ptr node = this->GetObject (); @@ -193,7 +193,7 @@ UdpL4Protocol::ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, const uint8_t payload[8]) { NS_LOG_FUNCTION (this << icmpSource << icmpTtl << icmpType << icmpCode << icmpInfo - << payloadSource << payloadDestination); + << payloadSource << payloadDestination); uint16_t src, dst; src = payload[0] << 8; src |= payload[1]; @@ -221,19 +221,19 @@ UdpL4Protocol::Receive(Ptr packet, NS_LOG_FUNCTION (this << packet << header); UdpHeader udpHeader; if(Node::ChecksumEnabled ()) - { - udpHeader.EnableChecksums(); - } + { + udpHeader.EnableChecksums(); + } udpHeader.InitializeChecksum (header.GetSource (), header.GetDestination (), PROT_NUMBER); packet->RemoveHeader (udpHeader); if(!udpHeader.IsChecksumOk ()) - { - NS_LOG_INFO("Bad checksum : dropping packet!"); - return Ipv4L4Protocol::RX_CSUM_FAILED; - } + { + NS_LOG_INFO("Bad checksum : dropping packet!"); + return Ipv4L4Protocol::RX_CSUM_FAILED; + } NS_LOG_DEBUG ("Looking up dst " << header.GetDestination () << " port " << udpHeader.GetDestinationPort ()); Ipv4EndPointDemux::EndPoints endPoints = @@ -262,12 +262,12 @@ UdpL4Protocol::Send (Ptr packet, UdpHeader udpHeader; if(Node::ChecksumEnabled ()) - { - udpHeader.EnableChecksums(); - udpHeader.InitializeChecksum (saddr, - daddr, - PROT_NUMBER); - } + { + udpHeader.EnableChecksums(); + udpHeader.InitializeChecksum (saddr, + daddr, + PROT_NUMBER); + } udpHeader.SetDestinationPort (dport); udpHeader.SetSourcePort (sport); @@ -285,12 +285,12 @@ UdpL4Protocol::Send (Ptr packet, UdpHeader udpHeader; if(Node::ChecksumEnabled ()) - { - udpHeader.EnableChecksums(); - udpHeader.InitializeChecksum (saddr, - daddr, - PROT_NUMBER); - } + { + udpHeader.EnableChecksums(); + udpHeader.InitializeChecksum (saddr, + daddr, + PROT_NUMBER); + } udpHeader.SetDestinationPort (dport); udpHeader.SetSourcePort (sport); diff --git a/src/internet/model/udp-socket-factory-impl.cc b/src/internet/model/udp-socket-factory-impl.cc index 3fd63d6cd..b609d9be7 100644 --- a/src/internet/model/udp-socket-factory-impl.cc +++ b/src/internet/model/udp-socket-factory-impl.cc @@ -26,13 +26,14 @@ namespace ns3 { UdpSocketFactoryImpl::UdpSocketFactoryImpl () : m_udp (0) -{} +{ +} UdpSocketFactoryImpl::~UdpSocketFactoryImpl () { NS_ASSERT (m_udp == 0); } -void +void UdpSocketFactoryImpl::SetUdp (Ptr udp) { m_udp = udp; diff --git a/src/internet/model/udp-socket-factory-impl.h b/src/internet/model/udp-socket-factory-impl.h index e05e6443c..998b42f62 100644 --- a/src/internet/model/udp-socket-factory-impl.h +++ b/src/internet/model/udp-socket-factory-impl.h @@ -28,7 +28,7 @@ namespace ns3 { class UdpL4Protocol; /** - * \ingroup internetStack + * \ingroup internet * \defgroup udp Udp * * This is an implementation of the User Datagram Protocol described in diff --git a/src/internet/model/udp-socket-factory.cc b/src/internet/model/udp-socket-factory.cc index d95b0068a..1d00324d9 100644 --- a/src/internet/model/udp-socket-factory.cc +++ b/src/internet/model/udp-socket-factory.cc @@ -28,7 +28,7 @@ TypeId UdpSocketFactory::GetTypeId (void) { static TypeId tid = TypeId ("ns3::UdpSocketFactory") .SetParent () - ; + ; return tid; } diff --git a/src/internet/model/udp-socket-impl.cc b/src/internet/model/udp-socket-impl.cc index d56c12599..8a5eb225a 100644 --- a/src/internet/model/udp-socket-impl.cc +++ b/src/internet/model/udp-socket-impl.cc @@ -52,7 +52,7 @@ UdpSocketImpl::GetTypeId (void) CallbackValue (), MakeCallbackAccessor (&UdpSocketImpl::m_icmpCallback), MakeCallbackChecker ()) - ; + ; return tid; } @@ -264,10 +264,10 @@ UdpSocketImpl::DoSend (Ptr p) if (m_endPoint == 0) { if (Bind () == -1) - { + { NS_ASSERT (m_endPoint == 0); - return -1; - } + return -1; + } NS_ASSERT (m_endPoint != 0); } if (m_shutdownSend) @@ -275,7 +275,7 @@ UdpSocketImpl::DoSend (Ptr p) m_errno = ERROR_SHUTDOWN; return -1; } - + return DoSendTo (p, m_defaultAddress, m_defaultPort); } @@ -311,10 +311,10 @@ UdpSocketImpl::DoSendTo (Ptr p, Ipv4Address dest, uint16_t port) if (m_endPoint == 0) { if (Bind () == -1) - { + { NS_ASSERT (m_endPoint == 0); - return -1; - } + return -1; + } NS_ASSERT (m_endPoint != 0); } if (m_shutdownSend) @@ -336,7 +336,7 @@ UdpSocketImpl::DoSendTo (Ptr p, Ipv4Address dest, uint16_t port) // The destination can be either multicast, unicast/anycast, or // either all-hosts broadcast or limited (subnet-directed) broadcast. // For the latter two broadcast types, the TTL will later be set to one - // irrespective of what is set in these socket options. So, this tagging + // irrespective of what is set in these socket options. So, this tagging // may end up setting the TTL of a limited broadcast packet to be // the same as a unicast, but it will be fixed further down the stack if (m_ipMulticastTtl != 0 && dest.IsMulticast ()) @@ -402,7 +402,7 @@ UdpSocketImpl::DoSendTo (Ptr p, Ipv4Address dest, uint16_t port) { // if the network mask is 255.255.255.255, do not convert dest NS_LOG_LOGIC ("Sending one copy from " << addri << " to " << dest - << " (mask is " << maski << ")"); + << " (mask is " << maski << ")"); m_udp->Send (p->Copy (), addri, dest, m_endPoint->GetLocalPort (), port); NotifyDataSent (p->GetSize ()); @@ -413,7 +413,7 @@ UdpSocketImpl::DoSendTo (Ptr p, Ipv4Address dest, uint16_t port) // Convert to subnet-directed broadcast Ipv4Address bcast = addri.GetSubnetDirectedBroadcast (maski); NS_LOG_LOGIC ("Sending one copy from " << addri << " to " << bcast - << " (mask is " << maski << ")"); + << " (mask is " << maski << ")"); m_udp->Send (p->Copy (), addri, bcast, m_endPoint->GetLocalPort (), port); NotifyDataSent (p->GetSize ()); @@ -458,7 +458,7 @@ UdpSocketImpl::DoSendTo (Ptr p, Ipv4Address dest, uint16_t port) } } } - + header.SetSource (route->GetSource ()); m_udp->Send (p->Copy (), header.GetSource (), header.GetDestination (), m_endPoint->GetLocalPort (), port, route); @@ -474,11 +474,11 @@ UdpSocketImpl::DoSendTo (Ptr p, Ipv4Address dest, uint16_t port) } } else - { + { NS_LOG_ERROR ("ERROR_NOROUTETOHOST"); m_errno = ERROR_NOROUTETOHOST; return -1; - } + } return 0; } @@ -537,7 +537,7 @@ UdpSocketImpl::Recv (uint32_t maxSize, uint32_t flags) Ptr UdpSocketImpl::RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress) + Address &fromAddress) { NS_LOG_FUNCTION (this << maxSize << flags); Ptr packet = Recv (maxSize, flags); @@ -547,6 +547,9 @@ UdpSocketImpl::RecvFrom (uint32_t maxSize, uint32_t flags, bool found; found = packet->PeekPacketTag (tag); NS_ASSERT (found); + //cast found to void, to suppress 'found' set but not used,compiler warning + //in optimized builds + (void) found; fromAddress = tag.GetAddress (); } return packet; @@ -605,10 +608,10 @@ UdpSocketImpl::BindToNetDevice (Ptr netdevice) if (m_endPoint == 0) { if (Bind () == -1) - { - NS_ASSERT (m_endPoint == 0); - return; - } + { + NS_ASSERT (m_endPoint == 0); + return; + } NS_ASSERT (m_endPoint != 0); } m_endPoint->BindToNetDevice (netdevice); diff --git a/src/internet/model/udp-socket-impl.h b/src/internet/model/udp-socket-impl.h index 27319d492..703b05bcb 100644 --- a/src/internet/model/udp-socket-impl.h +++ b/src/internet/model/udp-socket-impl.h @@ -75,7 +75,7 @@ public: virtual uint32_t GetRxAvailable (void) const; virtual Ptr Recv (uint32_t maxSize, uint32_t flags); virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress); + Address &fromAddress); virtual int GetSockName (Address &address) const; virtual int MulticastJoinGroup (uint32_t interfaceIndex, const Address &groupAddress); virtual int MulticastLeaveGroup (uint32_t interfaceIndex, const Address &groupAddress); @@ -124,10 +124,10 @@ private: bool m_shutdownRecv; bool m_connected; bool m_allowBroadcast; - + std::queue > m_deliveryQueue; uint32_t m_rxAvailable; - + // Socket attributes uint32_t m_rcvBufSize; uint8_t m_ipTtl; @@ -138,6 +138,6 @@ private: Callback m_icmpCallback; }; -}//namespace ns3 +} //namespace ns3 #endif /* UDP_SOCKET_IMPL_H */ diff --git a/src/internet/model/udp-socket.cc b/src/internet/model/udp-socket.cc index ee54dbbdf..f7918fd0a 100644 --- a/src/internet/model/udp-socket.cc +++ b/src/internet/model/udp-socket.cc @@ -59,20 +59,20 @@ UdpSocket::GetTypeId (void) "interface index for outgoing multicast on this socket; -1 indicates to use default interface", IntegerValue (-1), MakeIntegerAccessor (&UdpSocket::GetIpMulticastIf, - &UdpSocket::SetIpMulticastIf), + &UdpSocket::SetIpMulticastIf), MakeIntegerChecker ()) .AddAttribute ("IpMulticastLoop", "whether outgoing multicast sent also to loopback interface", BooleanValue (false), MakeBooleanAccessor (&UdpSocket::GetIpMulticastLoop, - &UdpSocket::SetIpMulticastLoop), + &UdpSocket::SetIpMulticastLoop), MakeBooleanChecker ()) .AddAttribute ("MtuDiscover", "If enabled, every outgoing ip packet will have the DF flag set.", BooleanValue (false), MakeBooleanAccessor (&UdpSocket::SetMtuDiscover, &UdpSocket::GetMtuDiscover), MakeBooleanChecker ()) - ; + ; return tid; } diff --git a/src/internet/model/udp-socket.h b/src/internet/model/udp-socket.h index c2f13929e..29661608d 100644 --- a/src/internet/model/udp-socket.h +++ b/src/internet/model/udp-socket.h @@ -46,7 +46,7 @@ class Packet; class UdpSocket : public Socket { public: - static TypeId GetTypeId (void); + static TypeId GetTypeId (void); UdpSocket (void); virtual ~UdpSocket (void); diff --git a/src/internet/test/global-route-manager-impl-test-suite.cc b/src/internet/test/global-route-manager-impl-test-suite.cc index bb44d231a..6b7343365 100644 --- a/src/internet/test/global-route-manager-impl-test-suite.cc +++ b/src/internet/test/global-route-manager-impl-test-suite.cc @@ -39,7 +39,8 @@ public: GlobalRouteManagerImplTestCase::GlobalRouteManagerImplTestCase() : TestCase("GlobalRouteManagerImplTestCase") -{} +{ +} void GlobalRouteManagerImplTestCase::DoRun(void) { @@ -52,12 +53,9 @@ GlobalRouteManagerImplTestCase::DoRun(void) candidate.Push (v); } - uint32_t lastDistance = 0; - for (int i = 0; i < 100; ++i) { SPFVertex *v = candidate.Pop (); - lastDistance = v->GetDistanceFromRoot (); delete v; v = 0; } @@ -79,16 +77,16 @@ GlobalRouteManagerImplTestCase::DoRun(void) // // Router 0 GlobalRoutingLinkRecord* lr0 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::PointToPoint, - "0.0.0.2", // router ID 0.0.0.2 - "10.1.1.1", // local ID - 1); // metric + GlobalRoutingLinkRecord::PointToPoint, + "0.0.0.2", // router ID 0.0.0.2 + "10.1.1.1", // local ID + 1); // metric GlobalRoutingLinkRecord* lr1 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::StubNetwork, - "10.1.1.1", - "255.255.255.252", - 1); + GlobalRoutingLinkRecord::StubNetwork, + "10.1.1.1", + "255.255.255.252", + 1); GlobalRoutingLSA* lsa0 = new GlobalRoutingLSA (); lsa0->SetLSType (GlobalRoutingLSA::RouterLSA); @@ -99,16 +97,16 @@ GlobalRouteManagerImplTestCase::DoRun(void) // Router 1 GlobalRoutingLinkRecord* lr2 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::PointToPoint, - "0.0.0.2", - "10.1.2.1", - 1); + GlobalRoutingLinkRecord::PointToPoint, + "0.0.0.2", + "10.1.2.1", + 1); GlobalRoutingLinkRecord* lr3 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::StubNetwork, - "10.1.2.1", - "255.255.255.252", - 1); + GlobalRoutingLinkRecord::StubNetwork, + "10.1.2.1", + "255.255.255.252", + 1); GlobalRoutingLSA* lsa1 = new GlobalRoutingLSA (); lsa1->SetLSType (GlobalRoutingLSA::RouterLSA); @@ -116,43 +114,43 @@ GlobalRouteManagerImplTestCase::DoRun(void) lsa1->SetAdvertisingRouter ("0.0.0.1"); lsa1->AddLinkRecord (lr2); lsa1->AddLinkRecord (lr3); - + // Router 2 GlobalRoutingLinkRecord* lr4 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::PointToPoint, - "0.0.0.0", - "10.1.1.2", - 1); + GlobalRoutingLinkRecord::PointToPoint, + "0.0.0.0", + "10.1.1.2", + 1); GlobalRoutingLinkRecord* lr5 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::StubNetwork, - "10.1.1.2", - "255.255.255.252", - 1); + GlobalRoutingLinkRecord::StubNetwork, + "10.1.1.2", + "255.255.255.252", + 1); GlobalRoutingLinkRecord* lr6 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::PointToPoint, - "0.0.0.1", - "10.1.2.2", - 1); + GlobalRoutingLinkRecord::PointToPoint, + "0.0.0.1", + "10.1.2.2", + 1); GlobalRoutingLinkRecord* lr7 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::StubNetwork, - "10.1.2.2", - "255.255.255.252", - 1); + GlobalRoutingLinkRecord::StubNetwork, + "10.1.2.2", + "255.255.255.252", + 1); GlobalRoutingLinkRecord* lr8 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::PointToPoint, - "0.0.0.3", - "10.1.3.2", - 1); + GlobalRoutingLinkRecord::PointToPoint, + "0.0.0.3", + "10.1.3.2", + 1); GlobalRoutingLinkRecord* lr9 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::StubNetwork, - "10.1.3.2", - "255.255.255.252", - 1); + GlobalRoutingLinkRecord::StubNetwork, + "10.1.3.2", + "255.255.255.252", + 1); GlobalRoutingLSA* lsa2 = new GlobalRoutingLSA (); lsa2->SetLSType (GlobalRoutingLSA::RouterLSA); @@ -167,16 +165,16 @@ GlobalRouteManagerImplTestCase::DoRun(void) // Router 3 GlobalRoutingLinkRecord* lr10 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::PointToPoint, - "0.0.0.2", - "10.1.2.1", - 1); + GlobalRoutingLinkRecord::PointToPoint, + "0.0.0.2", + "10.1.2.1", + 1); GlobalRoutingLinkRecord* lr11 = new GlobalRoutingLinkRecord ( - GlobalRoutingLinkRecord::StubNetwork, - "10.1.2.1", - "255.255.255.252", - 1); + GlobalRoutingLinkRecord::StubNetwork, + "10.1.2.1", + "255.255.255.252", + 1); GlobalRoutingLSA* lsa3 = new GlobalRoutingLSA (); lsa3->SetLSType (GlobalRoutingLSA::RouterLSA); diff --git a/src/internet/test/ipv4-address-generator-test-suite.cc b/src/internet/test/ipv4-address-generator-test-suite.cc index 5328a5692..0d6f83c91 100644 --- a/src/internet/test/ipv4-address-generator-test-suite.cc +++ b/src/internet/test/ipv4-address-generator-test-suite.cc @@ -32,32 +32,33 @@ public: NetworkNumberAllocatorTestCase::NetworkNumberAllocatorTestCase () : TestCase ("Make sure the network number allocator is working on some of network prefixes.") -{} -void +{ +} +void NetworkNumberAllocatorTestCase::DoTeardown (void) { Ipv4AddressGenerator::Reset (); } -void +void NetworkNumberAllocatorTestCase::DoRun (void) { Ipv4Address network; Ipv4AddressGenerator::Init (Ipv4Address ("1.0.0.0"), Ipv4Mask ("255.0.0.0"), - Ipv4Address ("0.0.0.0")); + Ipv4Address ("0.0.0.0")); network = Ipv4AddressGenerator::GetNetwork (Ipv4Mask ("255.0.0.0")); NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("1.0.0.0"), "XXX"); network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.0.0.0")); NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("2.0.0.0"), "XXX"); - Ipv4AddressGenerator::Init (Ipv4Address ("0.1.0.0"), - Ipv4Mask ("255.255.0.0"), Ipv4Address ("0.0.0.0")); + Ipv4AddressGenerator::Init (Ipv4Address ("0.1.0.0"), + Ipv4Mask ("255.255.0.0"), Ipv4Address ("0.0.0.0")); network = Ipv4AddressGenerator::GetNetwork (Ipv4Mask ("255.255.0.0")); NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.1.0.0"), "XXX"); network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.0.0")); NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.2.0.0"), "XXX"); Ipv4AddressGenerator::Init (Ipv4Address ("0.0.1.0"), - Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.0")); + Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.0")); network = Ipv4AddressGenerator::GetNetwork (Ipv4Mask ("255.255.255.0")); NS_TEST_EXPECT_MSG_EQ (network, Ipv4Address ("0.0.1.0"), "XXX"); network = Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.255.0")); @@ -82,7 +83,8 @@ private: AddressAllocatorTestCase::AddressAllocatorTestCase () : TestCase ("Sanity check on allocation of addresses") -{} +{ +} void AddressAllocatorTestCase::DoRun (void) @@ -90,21 +92,21 @@ AddressAllocatorTestCase::DoRun (void) Ipv4Address address; Ipv4AddressGenerator::Init (Ipv4Address ("1.0.0.0"), Ipv4Mask ("255.0.0.0"), - Ipv4Address ("0.0.0.3")); + Ipv4Address ("0.0.0.3")); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.0.0.0")); NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.3"), "XXX"); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.0.0.0")); NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("1.0.0.4"), "XXX"); Ipv4AddressGenerator::Init (Ipv4Address ("0.1.0.0"), - Ipv4Mask ("255.255.0.0"), Ipv4Address ("0.0.0.3")); + Ipv4Mask ("255.255.0.0"), Ipv4Address ("0.0.0.3")); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.0.0")); NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.3"), "XXX"); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.0.0")); NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.1.0.4"), "XXX"); Ipv4AddressGenerator::Init (Ipv4Address ("0.0.1.0"), - Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.3")); + Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.3")); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0")); NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.1.3"), "XXX"); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0")); @@ -129,9 +131,10 @@ public: NetworkAndAddressTestCase::NetworkAndAddressTestCase () : TestCase ("Make sure Network and address allocation play together.") -{} +{ +} -void +void NetworkAndAddressTestCase::DoTeardown (void) { Ipv4AddressGenerator::Reset (); @@ -145,7 +148,7 @@ NetworkAndAddressTestCase::DoRun (void) Ipv4Address network; Ipv4AddressGenerator::Init (Ipv4Address ("3.0.0.0"), Ipv4Mask ("255.0.0.0"), - Ipv4Address ("0.0.0.3")); + Ipv4Address ("0.0.0.3")); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.0.0.0")); NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("3.0.0.3"), "XXX"); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.0.0.0")); @@ -157,7 +160,7 @@ NetworkAndAddressTestCase::DoRun (void) NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("4.0.0.5"), "XXX"); Ipv4AddressGenerator::Init (Ipv4Address ("0.3.0.0"), - Ipv4Mask ("255.255.0.0"), Ipv4Address ("0.0.0.3")); + Ipv4Mask ("255.255.0.0"), Ipv4Address ("0.0.0.3")); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.0.0")); NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.3.0.3"), "XXX"); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.0.0")); @@ -169,7 +172,7 @@ NetworkAndAddressTestCase::DoRun (void) NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.4.0.5"), "XXX"); Ipv4AddressGenerator::Init (Ipv4Address ("0.0.3.0"), - Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.3")); + Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.3")); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0")); NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("0.0.3.3"), "XXX"); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0")); @@ -192,7 +195,8 @@ private: ExampleAddressGeneratorTestCase::ExampleAddressGeneratorTestCase () : TestCase ("A quick kindof-semi-almost-real example") -{} +{ +} void ExampleAddressGeneratorTestCase::DoTeardown (void) @@ -209,7 +213,7 @@ ExampleAddressGeneratorTestCase::DoRun (void) // allocating with ip address 0.0.0.3 out of that prefix. // Ipv4AddressGenerator::Init (Ipv4Address ("192.168.0.0"), - Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.3")); + Ipv4Mask ("255.255.255.0"), Ipv4Address ("0.0.0.3")); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0")); NS_TEST_EXPECT_MSG_EQ (address, Ipv4Address ("192.168.0.3"), "XXX"); address = Ipv4AddressGenerator::NextAddress (Ipv4Mask ("255.255.255.0")); @@ -223,7 +227,7 @@ ExampleAddressGeneratorTestCase::DoRun (void) // Ipv4AddressGenerator::NextNetwork (Ipv4Mask ("255.255.255.0")); Ipv4AddressGenerator::InitAddress (Ipv4Address ("0.0.0.3"), - Ipv4Mask ("255.255.255.0")); + Ipv4Mask ("255.255.255.0")); // // The first address we should get is the previous numbers ORed together, which // is 192.168.1.3, of course. @@ -243,7 +247,8 @@ private: AddressCollisionTestCase::AddressCollisionTestCase () : TestCase ("Make sure that the address collision logic works.") -{} +{ +} void AddressCollisionTestCase::DoTeardown (void) diff --git a/src/internet/test/ipv4-address-helper-test-suite.cc b/src/internet/test/ipv4-address-helper-test-suite.cc index 63ca1618f..55f370e3e 100644 --- a/src/internet/test/ipv4-address-helper-test-suite.cc +++ b/src/internet/test/ipv4-address-helper-test-suite.cc @@ -34,7 +34,8 @@ private: NetworkAllocatorHelperTestCase::NetworkAllocatorHelperTestCase () : TestCase ("Make sure the network allocator part is working on some common network prefixes.") -{} +{ +} void NetworkAllocatorHelperTestCase::DoTeardown (void) @@ -79,7 +80,8 @@ private: AddressAllocatorHelperTestCase::AddressAllocatorHelperTestCase () : TestCase ("Make sure the address allocator part is working") -{} +{ +} void AddressAllocatorHelperTestCase::DoTeardown (void) @@ -124,7 +126,8 @@ public: ResetAllocatorHelperTestCase::ResetAllocatorHelperTestCase () : TestCase ("Make sure the reset to base behavior is working") -{} +{ +} void ResetAllocatorHelperTestCase::DoRun (void) diff --git a/src/internet/test/ipv4-list-routing-test-suite.cc b/src/internet/test/ipv4-list-routing-test-suite.cc index 01005eef5..526780597 100644 --- a/src/internet/test/ipv4-list-routing-test-suite.cc +++ b/src/internet/test/ipv4-list-routing-test-suite.cc @@ -27,8 +27,8 @@ class Ipv4ARouting : public Ipv4RoutingProtocol { public: Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) { return false;} void NotifyInterfaceUp (uint32_t interface) {} void NotifyInterfaceDown (uint32_t interface) {} void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) {} @@ -41,8 +41,8 @@ class Ipv4BRouting : public Ipv4RoutingProtocol { public: Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) { return false;} void NotifyInterfaceUp (uint32_t interface) {} void NotifyInterfaceDown (uint32_t interface) {} void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) {} @@ -60,7 +60,8 @@ public: Ipv4ListRoutingNegativeTestCase::Ipv4ListRoutingNegativeTestCase() : TestCase("Check negative priorities") -{} +{ +} void Ipv4ListRoutingNegativeTestCase::DoRun (void) { @@ -87,14 +88,15 @@ public: Ipv4ListRoutingPositiveTestCase::Ipv4ListRoutingPositiveTestCase() : TestCase("Check positive priorities") -{} +{ +} void Ipv4ListRoutingPositiveTestCase::DoRun (void) { Ptr lr = CreateObject (); Ptr aRouting = CreateObject (); Ptr bRouting = CreateObject (); - // The Ipv4ARouting should be added with higher priority (larger integer + // The Ipv4ARouting should be added with higher priority (larger integer // value) and will be fetched first below lr->AddRoutingProtocol (aRouting, 10); lr->AddRoutingProtocol (bRouting, 5); diff --git a/src/internet/test/ipv4-packet-info-tag-test-suite.cc b/src/internet/test/ipv4-packet-info-tag-test-suite.cc index 8d86beb3b..19e3164fb 100644 --- a/src/internet/test/ipv4-packet-info-tag-test-suite.cc +++ b/src/internet/test/ipv4-packet-info-tag-test-suite.cc @@ -72,7 +72,7 @@ AddInternetStack (Ptr node) node->AggregateObject(udp); } -class Ipv4PacketInfoTagTest: public TestCase +class Ipv4PacketInfoTagTest : public TestCase { public: Ipv4PacketInfoTagTest (); @@ -84,7 +84,8 @@ private: Ipv4PacketInfoTagTest::Ipv4PacketInfoTagTest () : TestCase ("Ipv4PacketInfoTagTest") -{} +{ +} void Ipv4PacketInfoTagTest::RxCb (Ptr socket) diff --git a/src/internet/test/ipv4-raw-test.cc b/src/internet/test/ipv4-raw-test.cc index 39fd2bb3f..e6ca8dda0 100644 --- a/src/internet/test/ipv4-raw-test.cc +++ b/src/internet/test/ipv4-raw-test.cc @@ -69,7 +69,7 @@ AddInternetStack (Ptr node) } -class Ipv4RawSocketImplTest: public TestCase +class Ipv4RawSocketImplTest : public TestCase { Ptr m_receivedPacket; Ptr m_receivedPacket2; @@ -112,6 +112,9 @@ void Ipv4RawSocketImplTest::ReceivePkt (Ptr socket) NS_ASSERT (m_receivedPacket->GetSize () == 2); m_receivedPacket = socket->Recv (std::numeric_limits::max(), 0); NS_ASSERT (availableData == m_receivedPacket->GetSize ()); + //cast availableData to void, to suppress 'availableData' set but not used + //compiler warning + (void) availableData; } void Ipv4RawSocketImplTest::ReceivePkt2 (Ptr socket) @@ -122,6 +125,9 @@ void Ipv4RawSocketImplTest::ReceivePkt2 (Ptr socket) NS_ASSERT (m_receivedPacket2->GetSize () == 2); m_receivedPacket2 = socket->Recv (std::numeric_limits::max(), 0); NS_ASSERT (availableData == m_receivedPacket2->GetSize ()); + //cast availableData to void, to suppress 'availableData' set but not used + //compiler warning + (void) availableData; } void @@ -175,7 +181,7 @@ void Ipv4RawSocketImplTest::DoRun (void) { // Create topology - + // Receiver Node Ptr rxNode = CreateObject (); AddInternetStack (rxNode); @@ -201,7 +207,7 @@ Ipv4RawSocketImplTest::DoRun (void) ipv4->AddAddress (netdev_idx, ipv4Addr); ipv4->SetUp (netdev_idx); } - + // Sender Node Ptr txNode = CreateObject (); AddInternetStack (txNode); diff --git a/src/internet/test/ipv4-test.cc b/src/internet/test/ipv4-test.cc index ef25433c3..7e6a793c0 100644 --- a/src/internet/test/ipv4-test.cc +++ b/src/internet/test/ipv4-test.cc @@ -16,7 +16,7 @@ * */ /** - * This is the test code for ipv4-l3-protocol.cc + * This is the test code for ipv4-l3-protocol.cc */ #include "ns3/simulator.h" @@ -75,16 +75,16 @@ Ipv4L3ProtocolTestCase::DoRun (void) NS_TEST_ASSERT_MSG_EQ (index, 0, "No interface should be found??"); interface->SetUp (); Ipv4InterfaceAddress ifaceAddr1 = Ipv4InterfaceAddress ("192.168.0.1", - "255.255.255.0"); + "255.255.255.0"); interface->AddAddress (ifaceAddr1); Ipv4InterfaceAddress ifaceAddr2 = Ipv4InterfaceAddress ("192.168.0.2", - "255.255.255.0"); + "255.255.255.0"); interface->AddAddress (ifaceAddr2); Ipv4InterfaceAddress ifaceAddr3 = Ipv4InterfaceAddress ("10.30.0.1", - "255.255.255.0"); + "255.255.255.0"); interface->AddAddress (ifaceAddr3); Ipv4InterfaceAddress ifaceAddr4 = Ipv4InterfaceAddress ("250.0.0.1", - "255.255.255.0"); + "255.255.255.0"); interface->AddAddress (ifaceAddr4); uint32_t num = interface->GetNAddresses (); NS_TEST_ASSERT_MSG_EQ (num, 4, "Should find 4 interfaces??"); @@ -93,7 +93,7 @@ Ipv4L3ProtocolTestCase::DoRun (void) NS_TEST_ASSERT_MSG_EQ (num, 3, "Should find 3 interfaces??"); Ipv4InterfaceAddress output = interface->GetAddress (2); NS_TEST_ASSERT_MSG_EQ (ifaceAddr4, output, - "The addresses should be identical"); + "The addresses should be identical"); Simulator::Destroy (); } diff --git a/src/internet/test/ipv6-extension-header-test-suite.cc b/src/internet/test/ipv6-extension-header-test-suite.cc index 5236a5caa..01c107670 100644 --- a/src/internet/test/ipv6-extension-header-test-suite.cc +++ b/src/internet/test/ipv6-extension-header-test-suite.cc @@ -136,7 +136,7 @@ public: virtual Alignment GetAlignment() const { - return (Alignment){4,0}; + return (Alignment){ 4,0}; } }; diff --git a/src/internet/test/ipv6-list-routing-test-suite.cc b/src/internet/test/ipv6-list-routing-test-suite.cc index 5f24af5b0..37f0c7288 100644 --- a/src/internet/test/ipv6-list-routing-test-suite.cc +++ b/src/internet/test/ipv6-list-routing-test-suite.cc @@ -24,107 +24,109 @@ namespace ns3 { - class Ipv6ARouting : public Ipv6RoutingProtocol { - public: - Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} - bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} - void NotifyInterfaceUp (uint32_t interface) {} - void NotifyInterfaceDown (uint32_t interface) {} - void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {} - void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {} - void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address:: - GetZero ()) {} - void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) {} - void SetIpv6 (Ptr ipv6) {} - }; +class Ipv6ARouting : public Ipv6RoutingProtocol { +public: + Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} + bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) { return false;} + void NotifyInterfaceUp (uint32_t interface) {} + void NotifyInterfaceDown (uint32_t interface) {} + void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address:: + GetZero ()) {} + void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) {} + void SetIpv6 (Ptr ipv6) {} +}; - class Ipv6BRouting : public Ipv6RoutingProtocol { - public: - Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} - bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) {return false;} - void NotifyInterfaceUp (uint32_t interface) {} - void NotifyInterfaceDown (uint32_t interface) {} - void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {} - void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {} - void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address:: - GetZero ()) {} - void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) {} - void SetIpv6 (Ptr ipv6) {} - }; +class Ipv6BRouting : public Ipv6RoutingProtocol { +public: + Ptr RouteOutput (Ptr p, const Ipv6Header &header, Ptr oif, Socket::SocketErrno &sockerr) { return 0;} + bool RouteInput (Ptr p, const Ipv6Header &header, Ptr idev, + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) { return false;} + void NotifyInterfaceUp (uint32_t interface) {} + void NotifyInterfaceDown (uint32_t interface) {} + void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {} + void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address:: + GetZero ()) {} + void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse) {} + void SetIpv6 (Ptr ipv6) {} +}; - class Ipv6ListRoutingNegativeTestCase : public TestCase - { - public: - Ipv6ListRoutingNegativeTestCase(); - virtual void DoRun (void); - }; +class Ipv6ListRoutingNegativeTestCase : public TestCase +{ +public: + Ipv6ListRoutingNegativeTestCase(); + virtual void DoRun (void); +}; - Ipv6ListRoutingNegativeTestCase::Ipv6ListRoutingNegativeTestCase() - : TestCase("Check negative priorities") - {} - void - Ipv6ListRoutingNegativeTestCase::DoRun (void) - { - Ptr lr = CreateObject (); - Ptr aRouting = CreateObject (); - Ptr bRouting = CreateObject (); - // The Ipv6BRouting should be added with higher priority (larger integer value) - lr->AddRoutingProtocol (aRouting, -10); - lr->AddRoutingProtocol (bRouting, -5); - int16_t first = 3; - uint32_t num = lr->GetNRoutingProtocols (); - NS_TEST_ASSERT_MSG_EQ (num, 2, "XXX"); - Ptr firstRp = lr->GetRoutingProtocol (0, first); - NS_TEST_ASSERT_MSG_EQ (-5, first, "XXX"); - NS_TEST_ASSERT_MSG_EQ (firstRp, bRouting, "XXX"); - } +Ipv6ListRoutingNegativeTestCase::Ipv6ListRoutingNegativeTestCase() + : TestCase("Check negative priorities") +{ +} +void +Ipv6ListRoutingNegativeTestCase::DoRun (void) +{ + Ptr lr = CreateObject (); + Ptr aRouting = CreateObject (); + Ptr bRouting = CreateObject (); + // The Ipv6BRouting should be added with higher priority (larger integer value) + lr->AddRoutingProtocol (aRouting, -10); + lr->AddRoutingProtocol (bRouting, -5); + int16_t first = 3; + uint32_t num = lr->GetNRoutingProtocols (); + NS_TEST_ASSERT_MSG_EQ (num, 2, "XXX"); + Ptr firstRp = lr->GetRoutingProtocol (0, first); + NS_TEST_ASSERT_MSG_EQ (-5, first, "XXX"); + NS_TEST_ASSERT_MSG_EQ (firstRp, bRouting, "XXX"); +} - class Ipv6ListRoutingPositiveTestCase : public TestCase - { - public: - Ipv6ListRoutingPositiveTestCase(); - virtual void DoRun (void); - }; +class Ipv6ListRoutingPositiveTestCase : public TestCase +{ +public: + Ipv6ListRoutingPositiveTestCase(); + virtual void DoRun (void); +}; - Ipv6ListRoutingPositiveTestCase::Ipv6ListRoutingPositiveTestCase() - : TestCase("Check positive priorities") - {} - void - Ipv6ListRoutingPositiveTestCase::DoRun (void) - { - Ptr lr = CreateObject (); - Ptr aRouting = CreateObject (); - Ptr bRouting = CreateObject (); - // The Ipv6ARouting should be added with higher priority (larger integer - // value) and will be fetched first below - lr->AddRoutingProtocol (aRouting, 10); - lr->AddRoutingProtocol (bRouting, 5); - int16_t first = 3; - int16_t second = 3; - uint32_t num = lr->GetNRoutingProtocols (); - NS_TEST_ASSERT_MSG_EQ (num, 2, "XXX"); - Ptr firstRp = lr->GetRoutingProtocol (0, first); - NS_TEST_ASSERT_MSG_EQ (10, first, "XXX"); - NS_TEST_ASSERT_MSG_EQ (firstRp, aRouting, "XXX"); - Ptr secondRp = lr->GetRoutingProtocol (1, second); - NS_TEST_ASSERT_MSG_EQ (5, second, "XXX"); - NS_TEST_ASSERT_MSG_EQ (secondRp, bRouting, "XXX"); - } +Ipv6ListRoutingPositiveTestCase::Ipv6ListRoutingPositiveTestCase() + : TestCase("Check positive priorities") +{ +} +void +Ipv6ListRoutingPositiveTestCase::DoRun (void) +{ + Ptr lr = CreateObject (); + Ptr aRouting = CreateObject (); + Ptr bRouting = CreateObject (); + // The Ipv6ARouting should be added with higher priority (larger integer + // value) and will be fetched first below + lr->AddRoutingProtocol (aRouting, 10); + lr->AddRoutingProtocol (bRouting, 5); + int16_t first = 3; + int16_t second = 3; + uint32_t num = lr->GetNRoutingProtocols (); + NS_TEST_ASSERT_MSG_EQ (num, 2, "XXX"); + Ptr firstRp = lr->GetRoutingProtocol (0, first); + NS_TEST_ASSERT_MSG_EQ (10, first, "XXX"); + NS_TEST_ASSERT_MSG_EQ (firstRp, aRouting, "XXX"); + Ptr secondRp = lr->GetRoutingProtocol (1, second); + NS_TEST_ASSERT_MSG_EQ (5, second, "XXX"); + NS_TEST_ASSERT_MSG_EQ (secondRp, bRouting, "XXX"); +} - static class Ipv6ListRoutingTestSuite : public TestSuite - { - public: - Ipv6ListRoutingTestSuite() - : TestSuite("ipv6-list-routing", UNIT) - { - AddTestCase(new Ipv6ListRoutingPositiveTestCase()); - AddTestCase(new Ipv6ListRoutingNegativeTestCase()); - } +static class Ipv6ListRoutingTestSuite : public TestSuite +{ +public: + Ipv6ListRoutingTestSuite() + : TestSuite("ipv6-list-routing", UNIT) + { + AddTestCase(new Ipv6ListRoutingPositiveTestCase()); + AddTestCase(new Ipv6ListRoutingNegativeTestCase()); + } - } g_ipv6ListRoutingTestSuite; +} g_ipv6ListRoutingTestSuite; } // namespace ns3 diff --git a/src/internet/test/ipv6-packet-info-tag-test-suite.cc b/src/internet/test/ipv6-packet-info-tag-test-suite.cc index 447bf82bf..48e4ea4f6 100644 --- a/src/internet/test/ipv6-packet-info-tag-test-suite.cc +++ b/src/internet/test/ipv6-packet-info-tag-test-suite.cc @@ -68,7 +68,7 @@ AddInternetStack (Ptr node) ipv6->RegisterOptions (); } -class Ipv6PacketInfoTagTest: public TestCase +class Ipv6PacketInfoTagTest : public TestCase { public: Ipv6PacketInfoTagTest (); @@ -80,7 +80,8 @@ private: Ipv6PacketInfoTagTest::Ipv6PacketInfoTagTest () : TestCase ("Ipv6PacketInfoTagTest") -{} +{ +} void Ipv6PacketInfoTagTest::RxCb (Ptr socket) diff --git a/src/internet/test/ipv6-test.cc b/src/internet/test/ipv6-test.cc index 9b9073699..1fda695e9 100644 --- a/src/internet/test/ipv6-test.cc +++ b/src/internet/test/ipv6-test.cc @@ -93,11 +93,11 @@ Ipv6L3ProtocolTestCase::DoRun () Ipv6InterfaceAddress ifaceAddr = interface->GetLinkLocalAddress (); NS_TEST_ASSERT_MSG_EQ (ifaceAddr.GetAddress ().IsLinkLocal (), true, - "Should be link local??"); + "Should be link local??"); interface->SetUp (); NS_TEST_ASSERT_MSG_EQ (interface->GetNAddresses (), 1, - "interface has always a link-local address"); /* interface has always a link-local address */ + "interface has always a link-local address"); /* interface has always a link-local address */ interface2->SetUp (); @@ -124,10 +124,10 @@ Ipv6L3ProtocolTestCase::DoRun () Ipv6InterfaceAddress output = interface->GetAddress (1); NS_TEST_ASSERT_MSG_EQ (ifaceAddr1, output, - "Should be the interface address 1?"); + "Should be the interface address 1?"); index = ipv6->GetInterfaceForPrefix ("2001:1234:5678:9000::0", - Ipv6Prefix (64)); + Ipv6Prefix (64)); NS_TEST_ASSERT_MSG_EQ (index, 1, "We should get one address??"); /* link-local address is always index 0 */ index = ipv6->GetInterfaceForAddress ("2001:ffff:5678:9001::2"); @@ -136,7 +136,7 @@ Ipv6L3ProtocolTestCase::DoRun () index = ipv6->GetInterfaceForAddress ("2001:ffff:5678:9000::1"); /* address we just remove */ NS_TEST_ASSERT_MSG_EQ (index, (uint32_t) -1, "Address should not be found??"); Simulator::Destroy (); -}//end DoRun +} //end DoRun static class IPv6L3ProtocolTestSuite : public TestSuite { public: diff --git a/src/internet/test/tcp-test.cc b/src/internet/test/tcp-test.cc index 52aee17af..818c771d4 100644 --- a/src/internet/test/tcp-test.cc +++ b/src/internet/test/tcp-test.cc @@ -121,7 +121,8 @@ TcpTestCase::TcpTestCase (uint32_t totalStreamSize, m_sourceReadSize (sourceReadSize), m_serverWriteSize (serverWriteSize), m_serverReadSize (serverReadSize) -{} +{ +} void TcpTestCase::DoRun (void) @@ -330,16 +331,16 @@ static class TcpTestSuite : public TestSuite public: TcpTestSuite () : TestSuite ("tcp", UNIT) - { - // Arguments to these test cases are 1) totalStreamSize, - // 2) source write size, 3) source read size - // 4) server write size, and 5) server read size - // with units of bytes - AddTestCase (new TcpTestCase (13, 200, 200, 200, 200)); - AddTestCase (new TcpTestCase (13, 1, 1, 1, 1)); - AddTestCase (new TcpTestCase (100000, 100, 50, 100, 20)); - } - + { + // Arguments to these test cases are 1) totalStreamSize, + // 2) source write size, 3) source read size + // 4) server write size, and 5) server read size + // with units of bytes + AddTestCase (new TcpTestCase (13, 200, 200, 200, 200)); + AddTestCase (new TcpTestCase (13, 1, 1, 1, 1)); + AddTestCase (new TcpTestCase (100000, 100, 50, 100, 20)); + } + } g_tcpTestSuite; } // namespace ns3 diff --git a/src/internet/test/udp-test.cc b/src/internet/test/udp-test.cc index f1b8d9c3d..107053af7 100644 --- a/src/internet/test/udp-test.cc +++ b/src/internet/test/udp-test.cc @@ -73,7 +73,7 @@ AddInternetStack (Ptr node) } -class UdpSocketLoopbackTest: public TestCase +class UdpSocketLoopbackTest : public TestCase { public: UdpSocketLoopbackTest (); @@ -94,6 +94,9 @@ void UdpSocketLoopbackTest::ReceivePkt (Ptr socket) availableData = socket->GetRxAvailable (); m_receivedPacket = socket->Recv (std::numeric_limits::max(), 0); NS_ASSERT (availableData == m_receivedPacket->GetSize ()); + //cast availableData to void, to suppress 'availableData' set but not used + //compiler warning + (void) availableData; } void @@ -114,7 +117,7 @@ UdpSocketLoopbackTest::DoRun () NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 246, "first socket should not receive it (it is bound specifically to the second interface's address"); } -class UdpSocketImplTest: public TestCase +class UdpSocketImplTest : public TestCase { Ptr m_receivedPacket; Ptr m_receivedPacket2; @@ -152,6 +155,9 @@ void UdpSocketImplTest::ReceivePkt (Ptr socket) availableData = socket->GetRxAvailable (); m_receivedPacket = socket->Recv (std::numeric_limits::max(), 0); NS_ASSERT (availableData == m_receivedPacket->GetSize ()); + //cast availableData to void, to suppress 'availableData' set but not used + //compiler warning + (void) availableData; } void UdpSocketImplTest::ReceivePkt2 (Ptr socket) @@ -160,6 +166,9 @@ void UdpSocketImplTest::ReceivePkt2 (Ptr socket) availableData = socket->GetRxAvailable (); m_receivedPacket2 = socket->Recv (std::numeric_limits::max(), 0); NS_ASSERT (availableData == m_receivedPacket2->GetSize ()); + //cast availableData to void, to suppress 'availableData' set but not used + //compiler warning + (void) availableData; } void @@ -184,7 +193,7 @@ void UdpSocketImplTest::DoRun (void) { // Create topology - + // Receiver Node Ptr rxNode = CreateObject (); AddInternetStack (rxNode); @@ -210,7 +219,7 @@ UdpSocketImplTest::DoRun (void) ipv4->AddAddress (netdev_idx, ipv4Addr); ipv4->SetUp (netdev_idx); } - + // Sender Node Ptr txNode = CreateObject (); AddInternetStack (txNode); diff --git a/doc/manual/source/ff-api.rst b/src/lte/doc/ff-api.rst similarity index 100% rename from doc/manual/source/ff-api.rst rename to src/lte/doc/ff-api.rst diff --git a/doc/manual/figures/ff-example.dia b/src/lte/doc/ff-example.dia similarity index 100% rename from doc/manual/figures/ff-example.dia rename to src/lte/doc/ff-example.dia diff --git a/doc/manual/figures/ff-mac-saps.dia b/src/lte/doc/ff-mac-saps.dia similarity index 100% rename from doc/manual/figures/ff-mac-saps.dia rename to src/lte/doc/ff-mac-saps.dia diff --git a/doc/manual/source/lte-design.rst b/src/lte/doc/lte-design.rst similarity index 98% rename from doc/manual/source/lte-design.rst rename to src/lte/doc/lte-design.rst index 7c7c5e346..9308e3314 100644 --- a/doc/manual/source/lte-design.rst +++ b/src/lte/doc/lte-design.rst @@ -37,12 +37,12 @@ Module Architecture The overall architecture of the LTE module is represented in the following figures. -.. figure:: figures/lte-enb-architecture.png +.. figure:: figures/lte-enb-architecture.* :align: right The architecture of the LTE eNB -.. figure:: figures/lte-ue-architecture.png +.. figure:: figures/lte-ue-architecture.* :align: right The architecture of the LTE UE diff --git a/doc/manual/figures/lte-enb-architecture.dia b/src/lte/doc/lte-enb-architecture.dia similarity index 100% rename from doc/manual/figures/lte-enb-architecture.dia rename to src/lte/doc/lte-enb-architecture.dia diff --git a/doc/manual/source/lte-testing.rst b/src/lte/doc/lte-testing.rst similarity index 100% rename from doc/manual/source/lte-testing.rst rename to src/lte/doc/lte-testing.rst diff --git a/src/lte/doc/lte-transmission.pdf b/src/lte/doc/lte-transmission.pdf new file mode 100644 index 000000000..d8dcf800f Binary files /dev/null and b/src/lte/doc/lte-transmission.pdf differ diff --git a/src/lte/doc/lte-transmission.png b/src/lte/doc/lte-transmission.png new file mode 100644 index 000000000..e12b75f39 Binary files /dev/null and b/src/lte/doc/lte-transmission.png differ diff --git a/doc/manual/figures/lte-ue-architecture.dia b/src/lte/doc/lte-ue-architecture.dia similarity index 100% rename from doc/manual/figures/lte-ue-architecture.dia rename to src/lte/doc/lte-ue-architecture.dia diff --git a/doc/manual/source/lte-user.rst b/src/lte/doc/lte-user.rst similarity index 100% rename from doc/manual/source/lte-user.rst rename to src/lte/doc/lte-user.rst diff --git a/doc/manual/source/lte.rst b/src/lte/doc/lte.rst similarity index 94% rename from doc/manual/source/lte.rst rename to src/lte/doc/lte.rst index 75c3a11a7..c3be7a794 100644 --- a/doc/manual/source/lte.rst +++ b/src/lte/doc/lte.rst @@ -11,6 +11,7 @@ This chapter describes the ns-3 LTE module located in ``src/lte``. .. toctree:: lte-design + ff-api lte-user lte-testing diff --git a/src/lte/model/JakesTraces/multipath_v0_M10.h b/src/lte/model/JakesTraces/multipath_v0_M10.h index d7caef53e..6888a03ce 100644 --- a/src/lte/model/JakesTraces/multipath_v0_M10.h +++ b/src/lte/model/JakesTraces/multipath_v0_M10.h @@ -25,8 +25,8 @@ static double multipath_M10_v_0[3000] = { - 0.618319, 0.618318, 0.618316, 0.618314, 0.618312, 0.618309, 0.618305, 0.6183, 0.618295, 0.61829, 0.618284, 0.618277, 0.61827, 0.618262, 0.618253, 0.618244, 0.618234, 0.618224, 0.618213, 0.618202, 0.61819, 0.618177, 0.618164, 0.61815, 0.618136, 0.618121, 0.618106, 0.618089, 0.618073, 0.618056, 0.618038, 0.618019, 0.618, 0.617981, 0.61796, 0.61794, 0.617918, 0.617896, 0.617874, 0.61785, 0.617827, 0.617802, 0.617777, 0.617752, 0.617726, 0.617699, 0.617672, 0.617644, 0.617616, 0.617587, 0.617557, 0.617527, 0.617496, 0.617465, 0.617433, 0.6174, 0.617367, 0.617333, 0.617299, 0.617264, 0.617229, 0.617193, 0.617156, 0.617119, 0.617081, 0.617042, 0.617003, 0.616964, 0.616924, 0.616883, 0.616841, 0.616799, 0.616757, 0.616714, 0.61667, 0.616626, 0.616581, 0.616535, 0.616489, 0.616442, 0.616395, 0.616347, 0.616299, 0.61625, 0.6162, 0.61615, 0.616099, 0.616048, 0.615996, 0.615943, 0.61589, 0.615836, 0.615781, 0.615727, 0.615671, 0.615615, 0.615558, 0.615501, 0.615443, 0.615384, 0.615325, 0.615265, 0.615205, 0.615144, 0.615083, 0.61502, 0.614958, 0.614894, 0.614831, 0.614766, 0.614701, 0.614635, 0.614569, 0.614502, 0.614435, 0.614367, 0.614298, 0.614229, 0.614159, 0.614088, 0.614017, 0.613946, 0.613873, 0.6138, 0.613727, 0.613653, 0.613578, 0.613503, 0.613427, 0.613351, 0.613274, 0.613196, 0.613118, 0.613039, 0.61296, 0.612879, 0.612799, 0.612718, 0.612636, 0.612553, 0.61247, 0.612386, 0.612302, 0.612217, 0.612132, 0.612046, 0.611959, 0.611872, 0.611784, 0.611695, 0.611606, 0.611517, 0.611426, 0.611335, 0.611244, 0.611152, 0.611059, 0.610966, 0.610872, 0.610777, 0.610682, 0.610586, 0.61049, 0.610393, 0.610295, 0.610197, 0.610098, 0.609999, 0.609899, 0.609798, 0.609697, 0.609595, 0.609492, 0.609389, 0.609286, 0.609181, 0.609076, 0.608971, 0.608865, 0.608758, 0.608651, 0.608543, 0.608434, 0.608325, 0.608215, 0.608104, 0.607993, 0.607882, 0.607769, 0.607656, 0.607543, 0.607429, 0.607314, 0.607198, 0.607082, 0.606966, 0.606849, 0.606731, 0.606612, 0.606493, 0.606373, 0.606253, 0.606132, 0.60601, 0.605888, 0.605765, 0.605642, 0.605518, 0.605393, 0.605268, 0.605142, 0.605015, 0.604888, 0.60476, 0.604632, 0.604503, 0.604373, 0.604243, 0.604112, 0.60398, 0.603848, 0.603715, 0.603581, 0.603447, 0.603313, 0.603177, 0.603041, 0.602905, 0.602767, 0.602629, 0.602491, 0.602352, 0.602212, 0.602071, 0.60193, 0.601789, 0.601646, 0.601503, 0.60136, 0.601215, 0.601071, 0.600925, 0.600779, 0.600632, 0.600485, 0.600337, 0.600188, 0.600038, 0.599888, 0.599738, 0.599586, 0.599435, 0.599282, 0.599129, 0.598975, 0.59882, 0.598665, 0.598509, 0.598353, 0.598196, 0.598038, 0.59788, 0.597721, 0.597561, 0.597401, 0.59724, 0.597078, 0.596916, 0.596753, 0.596589, 0.596425, 0.59626, 0.596095, 0.595929, 0.595762, 0.595594, 0.595426, 0.595257, 0.595088, 0.594918, 0.594747, 0.594576, 0.594404, 0.594231, 0.594057, 0.593883, 0.593709, 0.593533, 0.593357, 0.59318, 0.593003, 0.592825, 0.592646, 0.592467, 0.592287, 0.592106, 0.591925, 0.591743, 0.59156, 0.591377, 0.591193, 0.591008, 0.590823, 0.590637, 0.59045, 0.590263, 0.590074, 0.589886, 0.589696, 0.589506, 0.589315, 0.589124, 0.588932, 0.588739, 0.588546, 0.588352, 0.588157, 0.587961, 0.587765, 0.587568, 0.587371, 0.587172, 0.586974, 0.586774, 0.586574, 0.586373, 0.586171, 0.585969, 0.585766, 0.585562, 0.585358, 0.585153, 0.584947, 0.58474, 0.584533, 0.584325, 0.584117, 0.583908, 0.583698, 0.583487, 0.583276, 0.583064, 0.582851, 0.582638, 0.582424, 0.582209, 0.581993, 0.581777, 0.58156, 0.581343, 0.581124, 0.580905, 0.580686, 0.580465, 0.580244, 0.580022, 0.5798, 0.579576, 0.579352, 0.579128, 0.578902, 0.578676, 0.57845, 0.578222, 0.577994, 0.577765, 0.577535, 0.577305, 0.577074, 0.576842, 0.576609, 0.576376, 0.576142, 0.575908, 0.575672, 0.575436, 0.575199, 0.574962, 0.574723, 0.574484, 0.574245, 0.574004, 0.573763, 0.573521, 0.573278, 0.573035, 0.572791, 0.572546, 0.5723, 0.572054, 0.571807, 0.571559, 0.571311, 0.571061, 0.570811, 0.570561, 0.570309, 0.570057, 0.569804, 0.56955, 0.569296, 0.569041, 0.568785, 0.568528, 0.56827, 0.568012, 0.567753, 0.567494, 0.567233, 0.566972, 0.56671, 0.566447, 0.566184, 0.56592, 0.565655, 0.565389, 0.565122, 0.564855, 0.564587, 0.564318, 0.564049, 0.563778, 0.563507, 0.563236, 0.562963, 0.56269, 0.562415, 0.56214, 0.561865, 0.561588, 0.561311, 0.561033, 0.560754, 0.560475, 0.560194, 0.559913, 0.559631, 0.559349, 0.559065, 0.558781, 0.558496, 0.55821, 0.557923, 0.557636, 0.557348, 0.557059, 0.556769, 0.556478, 0.556187, 0.555895, 0.555602, 0.555308, 0.555014, 0.554718, 0.554422, 0.554125, 0.553828, 0.553529, 0.55323, 0.552929, 0.552628, 0.552327, 0.552024, 0.551721, 0.551417, 0.551111, 0.550806, 0.550499, 0.550192, 0.549883, 0.549574, 0.549264, 0.548953, 0.548642, 0.548329, 0.548016, 0.547702, 0.547387, 0.547072, 0.546755, 0.546438, 0.546119, 0.5458, 0.54548, 0.54516, 0.544838, 0.544516, 0.544193, 0.543868, 0.543544, 0.543218, 0.542891, 0.542564, 0.542235, 0.541906, 0.541576, 0.541245, 0.540914, 0.540581, 0.540248, 0.539913, 0.539578, 0.539242, 0.538905, 0.538567, 0.538229, 0.537889, 0.537549, 0.537208, 0.536866, 0.536523, 0.536179, 0.535834, 0.535489, 0.535142, 0.534795, 0.534446, 0.534097, 0.533747, 0.533396, 0.533045, 0.532692, 0.532338, 0.531984, 0.531629, 0.531272, 0.530915, 0.530557, 0.530198, 0.529838, 0.529478, 0.529116, 0.528753, 0.52839, 0.528025, 0.52766, 0.527294, 0.526927, 0.526559, 0.52619, 0.52582, 0.525449, 0.525077, 0.524705, 0.524331, 0.523957, 0.523581, 0.523205, 0.522828, 0.522449, 0.52207, 0.52169, 0.521309, 0.520927, 0.520544, 0.52016, 0.519775, 0.51939, 0.519003, 0.518615, 0.518227, 0.517837, 0.517446, 0.517055, 0.516662, 0.516269, 0.515875, 0.515479, 0.515083, 0.514685, 0.514287, 0.513888, 0.513488, 0.513086, 0.512684, 0.512281, 0.511877, 0.511472, 0.511066, 0.510659, 0.51025, 0.509841, 0.509431, 0.50902, 0.508608, 0.508195, 0.507781, 0.507366, 0.506949, 0.506532, 0.506114, 0.505695, 0.505275, 0.504854, 0.504431, 0.504008, 0.503584, 0.503158, 0.502732, 0.502305, 0.501876, 0.501447, 0.501017, 0.500585, 0.500152, 0.499719, 0.499284, 0.498849, 0.498412, 0.497974, 0.497535, 0.497095, 0.496654, 0.496212, 0.495769, 0.495325, 0.49488, 0.494433, 0.493986, 0.493538, 0.493088, 0.492637, 0.492186, 0.491733, 0.491279, 0.490824, 0.490368, 0.489911, 0.489453, 0.488993, 0.488533, 0.488071, 0.487609, 0.487145, 0.48668, 0.486214, 0.485747, 0.485279, 0.484809, 0.484339, 0.483867, 0.483395, 0.482921, 0.482446, 0.48197, 0.481492, 0.481014, 0.480534, 0.480054, 0.479572, 0.479089, 0.478605, 0.478119, 0.477633, 0.477145, 0.476656, 0.476166, 0.475675, 0.475183, 0.474689, 0.474194, 0.473698, 0.473201, 0.472703, 0.472204, 0.471703, 0.471201, 0.470698, 0.470194, 0.469688, 0.469182, 0.468674, 0.468165, 0.467654, 0.467143, 0.46663, 0.466116, 0.465601, 0.465084, 0.464566, 0.464048, 0.463527, 0.463006, 0.462483, 0.461959, 0.461434, 0.460908, 0.46038, 0.459851, 0.459321, 0.458789, 0.458256, 0.457722, 0.457187, 0.45665, 0.456112, 0.455573, 0.455032, 0.45449, 0.453947, 0.453403, 0.452857, 0.45231, 0.451762, 0.451212, 0.450661, 0.450109, 0.449555, 0.449, 0.448444, 0.447886, 0.447327, 0.446766, 0.446205, 0.445642, 0.445077, 0.444511, 0.443944, 0.443375, 0.442806, 0.442234, 0.441662, 0.441087, 0.440512, 0.439935, 0.439357, 0.438777, 0.438196, 0.437614, 0.43703, 0.436444, 0.435858, 0.43527, 0.43468, 0.434089, 0.433496, 0.432903, 0.432307, 0.43171, 0.431112, 0.430512, 0.429911, 0.429309, 0.428705, 0.428099, 0.427492, 0.426883, 0.426273, 0.425662, 0.425049, 0.424434, 0.423818, 0.423201, 0.422582, 0.421961, 0.421339, 0.420715, 0.42009, 0.419464, 0.418835, 0.418206, 0.417574, 0.416941, 0.416307, 0.415671, 0.415033, 0.414394, 0.413753, 0.413111, 0.412467, 0.411822, 0.411174, 0.410526, 0.409875, 0.409223, 0.40857, 0.407915, 0.407258, 0.406599, 0.405939, 0.405278, 0.404614, 0.403949, 0.403282, 0.402614, 0.401944, 0.401272, 0.400599, 0.399924, 0.399247, 0.398568, 0.397888, 0.397206, 0.396523, 0.395837, 0.39515, 0.394461, 0.393771, 0.393079, 0.392385, 0.391689, 0.390991, 0.390292, 0.389591, 0.388888, 0.388183, 0.387477, 0.386769, 0.386058, 0.385347, 0.384633, 0.383917, 0.3832, 0.382481, 0.38176, 0.381037, 0.380312, 0.379586, 0.378857, 0.378127, 0.377395, 0.376661, 0.375925, 0.375187, 0.374447, 0.373705, 0.372962, 0.372216, 0.371468, 0.370719, 0.369968, 0.369214, 0.368459, 0.367702, 0.366942, 0.366181, 0.365418, 0.364653, 0.363886, 0.363116, 0.362345, 0.361572, 0.360796, 0.360019, 0.35924, 0.358458, 0.357675, 0.356889, 0.356101, 0.355311, 0.35452, 0.353726, 0.352929, 0.352131, 0.351331, 0.350528, 0.349724, 0.348917, 0.348108, 0.347297, 0.346483, 0.345668, 0.34485, 0.34403, 0.343208, 0.342384, 0.341557, 0.340728, 0.339897, 0.339064, 0.338229, 0.337391, 0.336551, 0.335708, 0.334863, 0.334016, 0.333167, 0.332315, 0.331461, 0.330605, 0.329746, 0.328885, 0.328021, 0.327155, 0.326287, 0.325416, 0.324543, 0.323668, 0.32279, 0.321909, 0.321026, 0.320141, 0.319253, 0.318363, 0.31747, 0.316574, 0.315677, 0.314776, 0.313873, 0.312968, 0.312059, 0.311149, 0.310236, 0.30932, 0.308401, 0.30748, 0.306556, 0.30563, 0.304701, 0.303769, 0.302835, 0.301898, 0.300958, 0.300015, 0.29907, 0.298122, 0.297171, 0.296218, 0.295262, 0.294302, 0.293341, 0.292376, 0.291408, 0.290438, 0.289465, 0.288488, 0.287509, 0.286528, 0.285543, 0.284555, 0.283564, 0.282571, 0.281574, 0.280575, 0.279572, 0.278566, 0.277558, 0.276546, 0.275531, 0.274514, 0.273493, 0.272469, 0.271442, 0.270412, 0.269378, 0.268342, 0.267302, 0.266259, 0.265213, 0.264164, 0.263111, 0.262056, 0.260996, 0.259934, 0.258869, 0.2578, 0.256727, 0.255652, 0.254573, 0.25349, 0.252404, 0.251315, 0.250222, 0.249126, 0.248027, 0.246924, 0.245817, 0.244707, 0.243593, 0.242476, 0.241355, 0.24023, 0.239102, 0.237971, 0.236835, 0.235696, 0.234553, 0.233407, 0.232256, 0.231102, 0.229944, 0.228783, 0.227617, 0.226448, 0.225275, 0.224098, 0.222917, 0.221732, 0.220543, 0.21935, 0.218153, 0.216952, 0.215747, 0.214538, 0.213325, 0.212108, 0.210886, 0.209661, 0.208431, 0.207197, 0.205959, 0.204716, 0.20347, 0.202219, 0.200963, 0.199703, 0.198439, 0.197171, 0.195898, 0.19462, 0.193338, 0.192051, 0.19076, 0.189465, 0.188164, 0.186859, 0.18555, 0.184235, 0.182916, 0.181593, 0.180264, 0.178931, 0.177592, 0.176249, 0.174901, 0.173548, 0.17219, 0.170827, 0.169459, 0.168086, 0.166708, 0.165325, 0.163936, 0.162543, 0.161144, 0.15974, 0.15833, 0.156915, 0.155495, 0.154069, 0.152638, 0.151202, 0.14976, 0.148312, 0.146859, 0.1454, 0.143936, 0.142465, 0.140989, 0.139507, 0.13802, 0.136526, 0.135027, 0.133521, 0.13201, 0.130493, 0.128969, 0.127439, 0.125903, 0.124361, 0.122813, 0.121258, 0.119697, 0.11813, 0.116556, 0.114976, 0.113389, 0.111795, 0.110195, 0.108588, 0.106974, 0.105354, 0.103727, 0.102093, 0.100451, 0.0988032, 0.0971479, 0.0954855, 0.093816, 0.0921392, 0.0904551, 0.0887637, 0.0870648, 0.0853585, 0.0836447, 0.0819232, 0.0801941, 0.0784573, 0.0767128, 0.0749603, 0.0732, 0.0714317, 0.0696554, 0.0678709, 0.0660783, 0.0642774, 0.0624683, 0.0606507, 0.0588247, 0.0569901, 0.055147, 0.0532952, 0.0514346, 0.0495652, 0.0476869, 0.0457996, 0.0439032, 0.0419977, 0.040083, 0.0381589, 0.0362255, 0.0342825, 0.03233, 0.0303679, 0.028396, 0.0264142, 0.0244226, 0.0224209, 0.0204091, 0.0183871, 0.0163548, 0.014312, 0.0122588, 0.0101949, 0.00812038, 0.00603501, 0.00393872, 0.00183139, -0.000287071, -0.00241679, -0.00455786, -0.00671042, -0.00887457, -0.0110504, -0.0132381, -0.0154378, -0.0176495, -0.0198734, -0.0221097, -0.0243584, -0.0266197, -0.0288937, -0.0311806, -0.0334805, -0.0357935, -0.0381198, -0.0404596, -0.0428129, -0.0451799, -0.0475609, -0.0499558, -0.052365, -0.0547884, -0.0572265, -0.0596792, -0.0621467, -0.0646293, -0.067127, -0.0696402, -0.0721689, -0.0747133, -0.0772737, -0.0798502, -0.082443, -0.0850524, -0.0876784, -0.0903214, -0.0929815, -0.0956589, -0.098354, -0.101067, -0.103798, -0.106547, -0.109314, -0.112101, -0.114906, -0.11773, -0.120574, -0.123438, -0.126322, -0.129225, -0.13215, -0.135095, -0.138062, -0.141049, -0.144059, -0.14709, -0.150144, -0.153221, -0.15632, -0.159443, -0.16259, -0.16576, -0.168955, -0.172174, -0.175419, -0.178689, -0.181985, -0.185307, -0.188656, -0.192032, -0.195435, -0.198867, -0.202327, -0.205816, -0.209334, -0.212882, -0.21646, -0.220069, -0.223709, -0.227382, -0.231086, -0.234824, -0.238595, -0.242401, -0.246241, -0.250117, -0.254029, -0.257977, -0.261963, -0.265987, -0.27005, -0.274152, -0.278295, -0.282479, -0.286705, -0.290973, -0.295285, -0.299641, -0.304043, -0.308491, -0.312987, -0.317531, -0.322124, -0.326767, -0.331462, -0.33621, -0.341011, -0.345867, -0.35078, -0.35575, -0.360779, -0.365868, -0.371019, -0.376233, -0.381512, -0.386857, -0.39227, -0.397753, -0.403308, -0.408936, -0.414639, -0.420419, -0.426279, -0.432221, -0.438247, -0.444359, -0.450559, -0.456851, -0.463238, -0.469721, -0.476304, -0.482989, -0.489781, -0.496683, -0.503698, -0.510829, -0.518081, -0.525459, -0.532965, -0.540605, -0.548384, -0.556307, -0.564378, -0.572605, -0.580992, -0.589546, -0.598274, -0.607183, -0.616281, -0.625575, -0.635075, -0.644789, -0.654728, -0.664902, -0.675322, -0.686001, -0.696951, -0.708186, -0.719723, -0.731577, -0.743766, -0.756309, -0.769229, -0.782547, -0.796289, -0.810484, -0.825161, -0.840354, -0.856102, -0.872445, -0.889431, -0.907112, -0.925547, -0.944803, -0.964956, -0.986094, -1.00832, -1.03175, -1.05652, -1.08279, -1.11076, -1.14066, -1.17278, -1.20747, -1.24518, -1.28649, -1.33216, -1.3832, -1.44107, -1.50786, -1.58684, -1.68346, -1.80795, -1.98317, -2.28168, -4.22375, -2.29164, -1.98805, -1.81108, -1.68569, -1.58849, -1.50911, -1.44201, -1.38389, -1.33263, -1.28679, -1.24532, -1.20745, -1.17263, -1.14038, -1.11036, -1.08228, -1.0559, -1.03103, -1.0075, -0.985176, -0.963943, -0.943697, -0.92435, -0.905826, -0.888057, -0.870985, -0.854556, -0.838724, -0.823447, -0.808688, -0.794412, -0.780588, -0.767189, -0.75419, -0.741567, -0.729299, -0.717366, -0.705752, -0.694438, -0.683411, -0.672655, -0.662158, -0.651908, -0.641893, -0.632102, -0.622526, -0.613156, -0.603983, -0.594999, -0.586195, -0.577566, -0.569104, -0.560803, -0.552657, -0.54466, -0.536807, -0.529092, -0.521512, -0.51406, -0.506734, -0.499529, -0.49244, -0.485465, -0.4786, -0.47184, -0.465184, -0.458627, -0.452168, -0.445803, -0.439529, -0.433344, -0.427245, -0.42123, -0.415297, -0.409443, -0.403667, -0.397967, -0.392339, -0.386784, -0.381298, -0.37588, -0.370528, -0.365241, -0.360018, -0.354856, -0.349755, -0.344712, -0.339727, -0.334798, -0.329924, -0.325105, -0.320337, -0.315621, -0.310956, -0.30634, -0.301772, -0.297252, -0.292777, -0.288349, -0.283964, -0.279624, -0.275326, -0.27107, -0.266855, -0.26268, -0.258545, -0.254449, -0.250391, -0.246371, -0.242387, -0.238439, -0.234526, -0.230649, -0.226805, -0.222995, -0.219219, -0.215474, -0.211762, -0.208081, -0.20443, -0.20081, -0.19722, -0.193659, -0.190127, -0.186624, -0.183148, -0.1797, -0.17628, -0.172885, -0.169517, -0.166175, -0.162859, -0.159567, -0.1563, -0.153058, -0.14984, -0.146645, -0.143473, -0.140325, -0.137199, -0.134095, -0.131014, -0.127954, -0.124916, -0.121898, -0.118902, -0.115926, -0.11297, -0.110035, -0.107119, -0.104222, -0.101345, -0.0984868, -0.0956473, -0.0928262, -0.0900234, -0.0872386, -0.0844715, -0.0817221, -0.0789899, -0.0762749, -0.0735769, -0.0708955, -0.0682307, -0.0655822, -0.0629497, -0.0603333, -0.0577325, -0.0551473, -0.0525775, -0.0500229, -0.0474833, -0.0449585, -0.0424485, -0.0399529, -0.0374717, -0.0350047, -0.0325517, -0.0301125, -0.0276871, -0.0252753, -0.0228769, -0.0204917, -0.0181197, -0.0157607, -0.0134146, -0.0110811, -0.00876027, -0.00645187, -0.00415579, -0.00187192, 0.000399889, 0.00265975, 0.00490778, 0.00714411, 0.00936886, 0.0115821, 0.013784, 0.0159747, 0.0181543, 0.0203228, 0.0224804, 0.0246272, 0.0267633, 0.0288888, 0.0310037, 0.0331083, 0.0352026, 0.0372867, 0.0393607, 0.0414247, 0.0434787, 0.0455229, 0.0475574, 0.0495822, 0.0515975, 0.0536033, 0.0555997, 0.0575868, 0.0595647, 0.0615334, 0.0634931, 0.0654438, 0.0673857, 0.0693187, 0.0712429, 0.0731585, 0.0750655, 0.076964, 0.078854, 0.0807356, 0.082609, 0.0844741, 0.086331, 0.0881799, 0.0900207, 0.0918536, 0.0936785, 0.0954957, 0.097305, 0.0991067, 0.100901, 0.102687, 0.104466, 0.106238, 0.108002, 0.109758, 0.111508, 0.11325, 0.114985, 0.116713, 0.118434, 0.120148, 0.121855, 0.123555, 0.125248, 0.126934, 0.128614, 0.130287, 0.131953, 0.133613, 0.135266, 0.136913, 0.138553, 0.140187, 0.141814, 0.143436, 0.145051, 0.146659, 0.148262, 0.149858, 0.151449, 0.153033, 0.154611, 0.156184, 0.15775, 0.159311, 0.160866, 0.162415, 0.163958, 0.165496, 0.167028, 0.168554, 0.170075, 0.17159, 0.173099, 0.174604, 0.176102, 0.177596, 0.179084, 0.180566, 0.182044, 0.183516, 0.184983, 0.186444, 0.187901, 0.189352, 0.190799, 0.19224, 0.193676, 0.195107, 0.196534, 0.197955, 0.199371, 0.200783, 0.20219, 0.203592, 0.204989, 0.206381, 0.207769, 0.209152, 0.210531, 0.211904, 0.213274, 0.214638, 0.215998, 0.217354, 0.218705, 0.220052, 0.221394, 0.222732, 0.224065, 0.225394, 0.226719, 0.228039, 0.229355, 0.230667, 0.231975, 0.233279, 0.234578, 0.235873, 0.237164, 0.238451, 0.239734, 0.241013, 0.242287, 0.243558, 0.244825, 0.246088, 0.247346, 0.248601, 0.249852, 0.251099, 0.252343, 0.253582, 0.254818, 0.25605, 0.257278, 0.258502, 0.259723, 0.26094, 0.262153, 0.263362, 0.264568, 0.265771, 0.266969, 0.268164, 0.269356, 0.270544, 0.271728, 0.272909, 0.274086, 0.27526, 0.276431, 0.277598, 0.278761, 0.279921, 0.281078, 0.282232, 0.283382, 0.284529, 0.285672, 0.286812, 0.287949, 0.289082, 0.290213, 0.29134, 0.292464, 0.293584, 0.294702, 0.295816, 0.296927, 0.298035, 0.29914, 0.300242, 0.30134, 0.302436, 0.303529, 0.304618, 0.305704, 0.306788, 0.307868, 0.308946, 0.31002, 0.311092, 0.31216, 0.313226, 0.314289, 0.315348, 0.316405, 0.317459, 0.31851, 0.319559, 0.320604, 0.321647, 0.322687, 0.323724, 0.324758, 0.325789, 0.326818, 0.327844, 0.328867, 0.329888, 0.330906, 0.331921, 0.332933, 0.333943, 0.33495, 0.335954, 0.336956, 0.337955, 0.338952, 0.339946, 0.340937, 0.341926, 0.342912, 0.343896, 0.344877, 0.345855, 0.346831, 0.347805, 0.348776, 0.349745, 0.350711, 0.351674, 0.352635, 0.353594, 0.35455, 0.355504, 0.356455, 0.357404, 0.358351, 0.359295, 0.360237, 0.361177, 0.362114, 0.363048, 0.363981, 0.364911, 0.365839, 0.366764, 0.367687, 0.368608, 0.369527, 0.370443, 0.371357, 0.372269, 0.373179, 0.374086, 0.374991, 0.375894, 0.376795, 0.377693, 0.378589, 0.379483, 0.380375, 0.381265, 0.382153, 0.383038, 0.383922, 0.384803, 0.385682, 0.386559, 0.387434, 0.388306, 0.389177, 0.390046, 0.390912, 0.391777, 0.392639, 0.393499, 0.394358, 0.395214, 0.396068, 0.39692, 0.397771, 0.398619, 0.399465, 0.400309, 0.401152, 0.401992, 0.40283, 0.403666, 0.404501, 0.405333, 0.406164, 0.406992, 0.407819, 0.408644, 0.409467, 0.410288, 0.411107, 0.411924, 0.412739, 0.413553, 0.414364, 0.415174, 0.415982, 0.416788, 0.417592, 0.418394, 0.419194, 0.419993, 0.42079, 0.421585, 0.422378, 0.42317, 0.423959, 0.424747, 0.425533, 0.426317, 0.4271, 0.427881, 0.42866, 0.429437, 0.430213, 0.430986, 0.431759, 0.432529, 0.433298, 0.434064, 0.43483, 0.435593, 0.436355, 0.437115, 0.437874, 0.43863, 0.439385, 0.440139, 0.440891, 0.441641, 0.442389, 0.443136, 0.443881, 0.444625, 0.445367, 0.446107, 0.446846, 0.447583, 0.448318, 0.449052, 0.449785, 0.450515, 0.451244, 0.451972, 0.452698, 0.453422, 0.454145, 0.454866, 0.455586, 0.456304, 0.457021, 0.457736, 0.458449, 0.459161, 0.459872, 0.460581, 0.461288, 0.461994, 0.462699, 0.463402, 0.464103, 0.464803, 0.465501, 0.466198, 0.466894, 0.467588, 0.46828, 0.468971, 0.469661, 0.470349, 0.471036, 0.471721, 0.472405, 0.473087, 0.473768, 0.474448, 0.475126, 0.475802, 0.476478, 0.477151, 0.477824, 0.478495, 0.479164, 0.479833, 0.4805, 0.481165, 0.481829, 0.482492, 0.483153, 0.483813, 0.484471, 0.485129, 0.485784, 0.486439, 0.487092, 0.487744, 0.488394, 0.489043, 0.489691, 0.490337, 0.490982, 0.491626, 0.492269, 0.49291, 0.493549, 0.494188, 0.494825, 0.495461, 0.496096, 0.496729, 0.497361, 0.497992, 0.498621, 0.499249, 0.499876, 0.500501, 0.501126, 0.501749, 0.502371, 0.502991, 0.50361, 0.504228, 0.504845, 0.505461, 0.506075, 0.506688, 0.5073, 0.50791, 0.508519, 0.509128, 0.509734, 0.51034, 0.510944, 0.511548, 0.51215, 0.51275, 0.51335, 0.513948, 0.514546, 0.515142, 0.515736, 0.51633, 0.516922, 0.517514, 0.518104, 0.518693, 0.51928, 0.519867, 0.520452, 0.521036, 0.52162, 0.522201, 0.522782, 0.523362, 0.52394, 0.524517, 0.525094, 0.525669, 0.526242, 0.526815, 0.527387, 0.527957, 0.528527, 0.529095, 0.529662, 0.530228, 0.530793, 0.531357, 0.531919, 0.532481, 0.533041, 0.5336, 0.534159, 0.534716, 0.535272, 0.535827, 0.536381, 0.536933, 0.537485, 0.538036, 0.538585, 0.539134, 0.539681, 0.540227, 0.540773, 0.541317, 0.54186, 0.542402, 0.542943, 0.543483, 0.544022, 0.54456, 0.545097, 0.545632, 0.546167, 0.546701, 0.547233, 0.547765, 0.548295, 0.548825, 0.549354, 0.549881, 0.550407, 0.550933, 0.551457, 0.551981, 0.552503, 0.553025, 0.553545, 0.554064, 0.554583, 0.5551, 0.555616, 0.556132, 0.556646, 0.557159, 0.557672, 0.558183, 0.558694, 0.559203, 0.559712, 0.560219, 0.560725, 0.561231, 0.561736, 0.562239, 0.562742, 0.563243, 0.563744, 0.564244, 0.564742, 0.56524, 0.565737, 0.566233, 0.566728, 0.567222, 0.567715, 0.568207, 0.568698, 0.569188, 0.569677, 0.570166, 0.570653, 0.57114, 0.571625, 0.57211, 0.572593, 0.573076, 0.573558, 0.574039, 0.574519, 0.574998, 0.575476, 0.575953, 0.576429, 0.576905, 0.577379, 0.577853, 0.578326, 0.578797, 0.579268, 0.579738, 0.580207, 0.580675, 0.581143, 0.581609, 0.582075, 0.582539, 0.583003, 0.583466, 0.583928, 0.584389, 0.584849, 0.585308, 0.585767, 0.586224, 0.586681, 0.587137, 0.587592, 0.588046, 0.588499, 0.588952, 0.589403, 0.589854, 0.590303, 0.590752, 0.5912, 0.591648, 0.592094, 0.59254, 0.592984, 0.593428, 0.593871, 0.594313, 0.594754, 0.595195, 0.595635, 0.596073, 0.596511, 0.596948, 0.597385, 0.59782, 0.598255, 0.598688, 0.599121, 0.599554, 0.599985, 0.600415, 0.600845, 0.601274, 0.601702, 0.602129, 0.602556, 0.602981, 0.603406, 0.60383, 0.604253, 0.604676, 0.605097, 0.605518, 0.605938, 0.606357, 0.606775, 0.607193, 0.60761, 0.608026, 0.608441, 0.608855, 0.609269, 0.609682, 0.610094, 0.610505, 0.610915, 0.611325, 0.611734, 0.612142, 0.612549, 0.612956, 0.613362, 0.613767, 0.614171, 0.614574, 0.614977, 0.615379, 0.61578, 0.616181, 0.61658, 0.616979, 0.617377, 0.617774, 0.618171, 0.618567, 0.618962, 0.619356, 0.61975, 0.620143, 0.620535, 0.620926, 0.621316, 0.621706, 0.622095, 0.622484, 0.622871, 0.623258, 0.623644, 0.624029, 0.624414, 0.624798, 0.625181, 0.625563, 0.625945, 0.626326, 0.626706, 0.627086, 0.627464, 0.627842, 0.62822, 0.628596, 0.628972, 0.629347, 0.629722, 0.630095, 0.630468, 0.63084, 0.631212, 0.631583, 0.631953, 0.632322, 0.632691, 0.633059, 0.633426, 0.633792, 0.634158, 0.634523, 0.634888, 0.635251, 0.635614, 0.635977, 0.636338, 0.636699, 0.637059, 0.637419, 0.637778, 0.638136, 0.638493, 0.63885, 0.639206, 0.639561, 0.639916, 0.64027, 0.640623, 0.640976, 0.641328, 0.641679, 0.642029, 0.642379, 0.642728, 0.643077, 0.643424, 0.643772, 0.644118, 0.644464, 0.644809, 0.645153, 0.645497, 0.64584, 0.646182, 0.646524, 0.646865, 0.647206, 0.647545, 0.647884, 0.648223, 0.64856, 0.648897, 0.649234, 0.64957, 0.649905, 0.650239, 0.650573, 0.650906, 0.651238, 0.65157, 0.651901, 0.652232, 0.652561, 0.652891, 0.653219, 0.653547, 0.653874, 0.654201, 0.654527, 0.654852, 0.655177, 0.655501, 0.655824, 0.656147, 0.656469, 0.65679, 0.657111, 0.657431, 0.65775, 0.658069, 0.658387, 0.658705, 0.659022, 0.659338, 0.659654, 0.659969, 0.660283, 0.660597, 0.66091, 0.661223, 0.661535, 0.661846, 0.662157, 0.662467, 0.662776, 0.663085, 0.663393, 0.663701, 0.664007, 0.664314, 0.664619, 0.664924, 0.665229, 0.665533, 0.665836, 0.666139, 0.66644, 0.666742, 0.667043, 0.667343, 0.667642, 0.667941, 0.668239, 0.668537, 0.668834, 0.669131, 0.669427, 0.669722, 0.670016, 0.67031, 0.670604, 0.670897, 0.671189, 0.671481, 0.671772, 0.672062, 0.672352, 0.672641, 0.67293, 0.673218, 0.673505, 0.673792, 0.674079, 0.674364, 0.674649, 0.674934, 0.675218, 0.675501, 0.675784, 0.676066, 0.676347, 0.676628, 0.676909, 0.677189, 0.677468, 0.677746, 0.678024, 0.678302, 0.678579, 0.678855, 0.679131, 0.679406, 0.67968, 0.679954, 0.680228, 0.6805, 0.680773, 0.681044, 0.681315, 0.681586, 0.681856, 0.682125, 0.682394, 0.682662, 0.68293, 0.683197, 0.683463, 0.683729, 0.683995, 0.684259, 0.684524, 0.684787, 0.68505, 0.685313, 0.685575, 0.685836, 0.686097, 0.686357, 0.686617, 0.686876, 0.687135, 0.687393, 0.68765, 0.687907, 0.688164, 0.688419, 0.688675, 0.688929, 0.689183, 0.689437, 0.68969, 0.689942, 0.690194, 0.690446, 0.690697, 0.690947, 0.691196, 0.691446, 0.691694, 0.691942, 0.69219, 0.692437, 0.692683, 0.692929, 0.693174, 0.693419, 0.693663, 0.693907, 0.69415, 0.694393, 0.694635, 0.694876, 0.695117, 0.695358, 0.695597, 0.695837, 0.696076, 0.696314, 0.696552, 0.696789, 0.697025, 0.697262, 0.697497, 0.697732, 0.697967, 0.698201, 0.698434, 0.698667, 0.698899, 0.699131, 0.699363, 0.699593, 0.699824, 0.700053, 0.700282, 0.700511, 0.700739, 0.700967, 0.701194, 0.701421, 0.701647, 0.701872, 0.702097, 0.702322, 0.702545, 0.702769, 0.702992, 0.703214, 0.703436, 0.703657, 0.703878, 0.704098, 0.704318, 0.704537, 0.704756, 0.704974, 0.705192, 0.705409, 0.705626, 0.705842, 0.706057, 0.706273, 0.706487, 0.706701, 0.706915, 0.707128, 0.70734, 0.707552, 0.707764, 0.707975, 0.708185, 0.708395, 0.708605, 0.708814, 0.709022, 0.70923, 0.709438, 0.709645, 0.709851, 0.710057, 0.710262, 0.710467, 0.710672, 0.710875, 0.711079, 0.711282, 0.711484, 0.711686, 0.711887, 0.712088, 0.712289, 0.712488, 0.712688, 0.712887, 0.713085, 0.713283, 0.71348, 0.713677, 0.713873, 0.714069, 0.714265, 0.71446, 0.714654, 0.714848, 0.715041, 0.715234, 0.715426, 0.715618, 0.71581, 0.716001, 0.716191, 0.716381, 0.716571, 0.716759, 0.716948, 0.717136, 0.717323, 0.71751, 0.717697, 0.717883, 0.718068, 0.718253, 0.718438, 0.718622, 0.718806, 0.718989, 0.719171, 0.719353, 0.719535, 0.719716, 0.719897, 0.720077, 0.720257, 0.720436, 0.720614, 0.720793, 0.72097, 0.721148, 0.721324, 0.721501, 0.721677, 0.721852, 0.722027, 0.722201, 0.722375, 0.722549, 0.722721, 0.722894, 0.723066, 0.723237, 0.723408, 0.723579, 0.723749, 0.723919, 0.724088, 0.724256, 0.724425, 0.724592, 0.72476, 0.724926, 0.725093, 0.725258, 0.725424, 0.725589, 0.725753, 0.725917, 0.72608, 0.726243, 0.726406, 0.726568, 0.726729, 0.726891, 0.727051, 0.727211, 0.727371, 0.72753, 0.727689, 0.727847, 0.728005, 0.728162, 0.728319, 0.728476, 0.728632, 0.728787, 0.728942, 0.729097, 0.729251, 0.729404, 0.729558, 0.72971, 0.729862, 0.730014, 0.730166, 0.730316, 0.730467, 0.730617, 0.730766, 0.730915, 0.731064, 0.731212, 0.731359, 0.731506, 0.731653, 0.731799, 0.731945, 0.732091, 0.732235, 0.73238, 0.732524, 0.732667, 0.73281, 0.732953, 0.733095, 0.733237, 0.733378, 0.733518, 0.733659, 0.733799, 0.733938, 0.734077, 0.734215, 0.734353, 0.734491, 0.734628, 0.734765, 0.734901, 0.735037, 0.735172, 0.735307, 0.735441, 0.735575, 0.735709, 0.735842, 0.735974, 0.736106, 0.736238, 0.736369, 0.7365, 0.73663, 0.73676, 0.73689, 0.737019, 0.737147, 0.737275, 0.737403, 0.73753, 0.737657, 0.737783, 0.737909, 0.738035, 0.738159, 0.738284, 0.738408, 0.738532, 0.738655, 0.738778, 0.7389, 0.739022, 0.739143, 0.739264, 0.739385, 0.739505, 0.739624, 0.739744, 0.739862, 0.739981, 0.740098, 0.740216, 0.740333, 0.740449, 0.740565, 0.740681, 0.740796, 0.740911, 0.741025, 0.741139, 0.741253, 0.741366, 0.741478, 0.741591, 0.741702, 0.741813, 0.741924, 0.742035, 0.742145, 0.742254, 0.742363, 0.742472, 0.74258, 0.742688, 0.742795, 0.742902, 0.743008, 0.743114, 0.74322, 0.743325, 0.74343, 0.743534, 0.743638, 0.743741, 0.743844, 0.743947, 0.744049, 0.744151, 0.744252, 0.744353, 0.744453, 0.744553, 0.744652, 0.744751, 0.74485, 0.744948, 0.745046, 0.745143, 0.74524, 0.745337, 0.745433, 0.745528, 0.745624, 0.745718, 0.745813, 0.745907, 0.746, 0.746093, 0.746186, 0.746278, 0.74637, 0.746461, 0.746552, 0.746642, 0.746732, 0.746822, 0.746911, 0.747, 0.747088, 0.747176, 0.747263, 0.74735, 0.747437, 0.747523, 0.747609, 0.747694, 0.747779, 0.747864, 0.747948, 0.748031, 0.748115, 0.748197, 0.74828, 0.748362, 0.748443, 0.748524, 0.748605, 0.748685, 0.748765, 0.748844, 0.748923, 0.749002, 0.74908, 0.749157, 0.749235, 0.749312, 0.749388, 0.749464, 0.749539, 0.749615, 0.749689, 0.749764, 0.749838, 0.749911, 0.749984, 0.750057, 0.750129, 0.750201, 0.750272, 0.750343, 0.750413, 0.750483, 0.750553, 0.750622, 0.750691, 0.75076, 0.750828, 0.750895, 0.750962, 0.751029, 0.751095, 0.751161, 0.751227, 0.751292, 0.751356, 0.751421, 0.751484, 0.751548, 0.751611, 0.751673, 0.751735, 0.751797, 0.751858, 0.751919, 0.75198, 0.75204, 0.752099, 0.752158, 0.752217, 0.752276, 0.752334, 0.752391, 0.752448, 0.752505, 0.752561, 0.752617, 0.752672, 0.752728, 0.752782, 0.752836, 0.75289, 0.752944, 0.752996, 0.753049, 0.753101, 0.753153, 0.753204, 0.753255, 0.753305, 0.753356, 0.753405, 0.753454, 0.753503, 0.753552, 0.7536, 0.753647, 0.753694, 0.753741, 0.753787, 0.753833, 0.753879, 0.753924, 0.753969, 0.754013, 0.754057, 0.7541, 0.754143, 0.754186, 0.754228, 0.75427, 0.754311, 0.754352, 0.754393, 0.754433, 0.754473, 0.754512, 0.754551, 0.754589, 0.754627, 0.754665, 0.754702, 0.754739, 0.754776, 0.754812, 0.754847, 0.754882, 0.754917, 0.754952, 0.754986, 0.755019, 0.755052, 0.755085, 0.755117, 0.755149, 0.755181, 0.755212, 0.755243, 0.755273, 0.755303, 0.755332, 0.755361, 0.75539, 0.755418, 0.755446, 0.755474, 0.755501, 0.755527, 0.755553, 0.755579, 0.755604, 0.755629, 0.755654, 0.755678, 0.755702, 0.755725, 0.755748, 0.755771, 0.755793, 0.755814, 0.755836, 0.755857, 0.755877, 0.755897, 0.755917, 0.755936, 0.755955, 0.755973, 0.755991, 0.756009, 0.756026, 0.756043, 0.756059, 0.756075, 0.756091, 0.756106, 0.756121, 0.756135, 0.756149, 0.756163, 0.756176, 0.756189, 0.756201, 0.756213, 0.756224, 0.756236, 0.756246, 0.756257, 0.756266, 0.756276, 0.756285, 0.756294, 0.756302, 0.75631, 0.756317, 0.756324, 0.756331, 0.756337, 0.756343, 0.756348, 0.756353, 0.756358, 0.756362, 0.756366, 0.756369, 0.756372, 0.756375, 0.756377, 0.756379, 0.75638, 0.756381, 0.756382, 0.756382, 0.756381, 0.756381, 0.75638, 0.756378, 0.756376, 0.756374, 0.756371, 0.756368, 0.756365, 0.756361, 0.756356, 0.756352, 0.756347, 0.756341, 0.756335, 0.756329, 0.756322, 0.756315, 0.756307, 0.756299, 0.756291, 0.756282, 0.756273, 0.756263, 0.756253, 0.756243, 0.756232, 0.756221, 0.756209, 0.756197, 0.756185 - }; + 0.618319, 0.618318, 0.618316, 0.618314, 0.618312, 0.618309, 0.618305, 0.6183, 0.618295, 0.61829, 0.618284, 0.618277, 0.61827, 0.618262, 0.618253, 0.618244, 0.618234, 0.618224, 0.618213, 0.618202, 0.61819, 0.618177, 0.618164, 0.61815, 0.618136, 0.618121, 0.618106, 0.618089, 0.618073, 0.618056, 0.618038, 0.618019, 0.618, 0.617981, 0.61796, 0.61794, 0.617918, 0.617896, 0.617874, 0.61785, 0.617827, 0.617802, 0.617777, 0.617752, 0.617726, 0.617699, 0.617672, 0.617644, 0.617616, 0.617587, 0.617557, 0.617527, 0.617496, 0.617465, 0.617433, 0.6174, 0.617367, 0.617333, 0.617299, 0.617264, 0.617229, 0.617193, 0.617156, 0.617119, 0.617081, 0.617042, 0.617003, 0.616964, 0.616924, 0.616883, 0.616841, 0.616799, 0.616757, 0.616714, 0.61667, 0.616626, 0.616581, 0.616535, 0.616489, 0.616442, 0.616395, 0.616347, 0.616299, 0.61625, 0.6162, 0.61615, 0.616099, 0.616048, 0.615996, 0.615943, 0.61589, 0.615836, 0.615781, 0.615727, 0.615671, 0.615615, 0.615558, 0.615501, 0.615443, 0.615384, 0.615325, 0.615265, 0.615205, 0.615144, 0.615083, 0.61502, 0.614958, 0.614894, 0.614831, 0.614766, 0.614701, 0.614635, 0.614569, 0.614502, 0.614435, 0.614367, 0.614298, 0.614229, 0.614159, 0.614088, 0.614017, 0.613946, 0.613873, 0.6138, 0.613727, 0.613653, 0.613578, 0.613503, 0.613427, 0.613351, 0.613274, 0.613196, 0.613118, 0.613039, 0.61296, 0.612879, 0.612799, 0.612718, 0.612636, 0.612553, 0.61247, 0.612386, 0.612302, 0.612217, 0.612132, 0.612046, 0.611959, 0.611872, 0.611784, 0.611695, 0.611606, 0.611517, 0.611426, 0.611335, 0.611244, 0.611152, 0.611059, 0.610966, 0.610872, 0.610777, 0.610682, 0.610586, 0.61049, 0.610393, 0.610295, 0.610197, 0.610098, 0.609999, 0.609899, 0.609798, 0.609697, 0.609595, 0.609492, 0.609389, 0.609286, 0.609181, 0.609076, 0.608971, 0.608865, 0.608758, 0.608651, 0.608543, 0.608434, 0.608325, 0.608215, 0.608104, 0.607993, 0.607882, 0.607769, 0.607656, 0.607543, 0.607429, 0.607314, 0.607198, 0.607082, 0.606966, 0.606849, 0.606731, 0.606612, 0.606493, 0.606373, 0.606253, 0.606132, 0.60601, 0.605888, 0.605765, 0.605642, 0.605518, 0.605393, 0.605268, 0.605142, 0.605015, 0.604888, 0.60476, 0.604632, 0.604503, 0.604373, 0.604243, 0.604112, 0.60398, 0.603848, 0.603715, 0.603581, 0.603447, 0.603313, 0.603177, 0.603041, 0.602905, 0.602767, 0.602629, 0.602491, 0.602352, 0.602212, 0.602071, 0.60193, 0.601789, 0.601646, 0.601503, 0.60136, 0.601215, 0.601071, 0.600925, 0.600779, 0.600632, 0.600485, 0.600337, 0.600188, 0.600038, 0.599888, 0.599738, 0.599586, 0.599435, 0.599282, 0.599129, 0.598975, 0.59882, 0.598665, 0.598509, 0.598353, 0.598196, 0.598038, 0.59788, 0.597721, 0.597561, 0.597401, 0.59724, 0.597078, 0.596916, 0.596753, 0.596589, 0.596425, 0.59626, 0.596095, 0.595929, 0.595762, 0.595594, 0.595426, 0.595257, 0.595088, 0.594918, 0.594747, 0.594576, 0.594404, 0.594231, 0.594057, 0.593883, 0.593709, 0.593533, 0.593357, 0.59318, 0.593003, 0.592825, 0.592646, 0.592467, 0.592287, 0.592106, 0.591925, 0.591743, 0.59156, 0.591377, 0.591193, 0.591008, 0.590823, 0.590637, 0.59045, 0.590263, 0.590074, 0.589886, 0.589696, 0.589506, 0.589315, 0.589124, 0.588932, 0.588739, 0.588546, 0.588352, 0.588157, 0.587961, 0.587765, 0.587568, 0.587371, 0.587172, 0.586974, 0.586774, 0.586574, 0.586373, 0.586171, 0.585969, 0.585766, 0.585562, 0.585358, 0.585153, 0.584947, 0.58474, 0.584533, 0.584325, 0.584117, 0.583908, 0.583698, 0.583487, 0.583276, 0.583064, 0.582851, 0.582638, 0.582424, 0.582209, 0.581993, 0.581777, 0.58156, 0.581343, 0.581124, 0.580905, 0.580686, 0.580465, 0.580244, 0.580022, 0.5798, 0.579576, 0.579352, 0.579128, 0.578902, 0.578676, 0.57845, 0.578222, 0.577994, 0.577765, 0.577535, 0.577305, 0.577074, 0.576842, 0.576609, 0.576376, 0.576142, 0.575908, 0.575672, 0.575436, 0.575199, 0.574962, 0.574723, 0.574484, 0.574245, 0.574004, 0.573763, 0.573521, 0.573278, 0.573035, 0.572791, 0.572546, 0.5723, 0.572054, 0.571807, 0.571559, 0.571311, 0.571061, 0.570811, 0.570561, 0.570309, 0.570057, 0.569804, 0.56955, 0.569296, 0.569041, 0.568785, 0.568528, 0.56827, 0.568012, 0.567753, 0.567494, 0.567233, 0.566972, 0.56671, 0.566447, 0.566184, 0.56592, 0.565655, 0.565389, 0.565122, 0.564855, 0.564587, 0.564318, 0.564049, 0.563778, 0.563507, 0.563236, 0.562963, 0.56269, 0.562415, 0.56214, 0.561865, 0.561588, 0.561311, 0.561033, 0.560754, 0.560475, 0.560194, 0.559913, 0.559631, 0.559349, 0.559065, 0.558781, 0.558496, 0.55821, 0.557923, 0.557636, 0.557348, 0.557059, 0.556769, 0.556478, 0.556187, 0.555895, 0.555602, 0.555308, 0.555014, 0.554718, 0.554422, 0.554125, 0.553828, 0.553529, 0.55323, 0.552929, 0.552628, 0.552327, 0.552024, 0.551721, 0.551417, 0.551111, 0.550806, 0.550499, 0.550192, 0.549883, 0.549574, 0.549264, 0.548953, 0.548642, 0.548329, 0.548016, 0.547702, 0.547387, 0.547072, 0.546755, 0.546438, 0.546119, 0.5458, 0.54548, 0.54516, 0.544838, 0.544516, 0.544193, 0.543868, 0.543544, 0.543218, 0.542891, 0.542564, 0.542235, 0.541906, 0.541576, 0.541245, 0.540914, 0.540581, 0.540248, 0.539913, 0.539578, 0.539242, 0.538905, 0.538567, 0.538229, 0.537889, 0.537549, 0.537208, 0.536866, 0.536523, 0.536179, 0.535834, 0.535489, 0.535142, 0.534795, 0.534446, 0.534097, 0.533747, 0.533396, 0.533045, 0.532692, 0.532338, 0.531984, 0.531629, 0.531272, 0.530915, 0.530557, 0.530198, 0.529838, 0.529478, 0.529116, 0.528753, 0.52839, 0.528025, 0.52766, 0.527294, 0.526927, 0.526559, 0.52619, 0.52582, 0.525449, 0.525077, 0.524705, 0.524331, 0.523957, 0.523581, 0.523205, 0.522828, 0.522449, 0.52207, 0.52169, 0.521309, 0.520927, 0.520544, 0.52016, 0.519775, 0.51939, 0.519003, 0.518615, 0.518227, 0.517837, 0.517446, 0.517055, 0.516662, 0.516269, 0.515875, 0.515479, 0.515083, 0.514685, 0.514287, 0.513888, 0.513488, 0.513086, 0.512684, 0.512281, 0.511877, 0.511472, 0.511066, 0.510659, 0.51025, 0.509841, 0.509431, 0.50902, 0.508608, 0.508195, 0.507781, 0.507366, 0.506949, 0.506532, 0.506114, 0.505695, 0.505275, 0.504854, 0.504431, 0.504008, 0.503584, 0.503158, 0.502732, 0.502305, 0.501876, 0.501447, 0.501017, 0.500585, 0.500152, 0.499719, 0.499284, 0.498849, 0.498412, 0.497974, 0.497535, 0.497095, 0.496654, 0.496212, 0.495769, 0.495325, 0.49488, 0.494433, 0.493986, 0.493538, 0.493088, 0.492637, 0.492186, 0.491733, 0.491279, 0.490824, 0.490368, 0.489911, 0.489453, 0.488993, 0.488533, 0.488071, 0.487609, 0.487145, 0.48668, 0.486214, 0.485747, 0.485279, 0.484809, 0.484339, 0.483867, 0.483395, 0.482921, 0.482446, 0.48197, 0.481492, 0.481014, 0.480534, 0.480054, 0.479572, 0.479089, 0.478605, 0.478119, 0.477633, 0.477145, 0.476656, 0.476166, 0.475675, 0.475183, 0.474689, 0.474194, 0.473698, 0.473201, 0.472703, 0.472204, 0.471703, 0.471201, 0.470698, 0.470194, 0.469688, 0.469182, 0.468674, 0.468165, 0.467654, 0.467143, 0.46663, 0.466116, 0.465601, 0.465084, 0.464566, 0.464048, 0.463527, 0.463006, 0.462483, 0.461959, 0.461434, 0.460908, 0.46038, 0.459851, 0.459321, 0.458789, 0.458256, 0.457722, 0.457187, 0.45665, 0.456112, 0.455573, 0.455032, 0.45449, 0.453947, 0.453403, 0.452857, 0.45231, 0.451762, 0.451212, 0.450661, 0.450109, 0.449555, 0.449, 0.448444, 0.447886, 0.447327, 0.446766, 0.446205, 0.445642, 0.445077, 0.444511, 0.443944, 0.443375, 0.442806, 0.442234, 0.441662, 0.441087, 0.440512, 0.439935, 0.439357, 0.438777, 0.438196, 0.437614, 0.43703, 0.436444, 0.435858, 0.43527, 0.43468, 0.434089, 0.433496, 0.432903, 0.432307, 0.43171, 0.431112, 0.430512, 0.429911, 0.429309, 0.428705, 0.428099, 0.427492, 0.426883, 0.426273, 0.425662, 0.425049, 0.424434, 0.423818, 0.423201, 0.422582, 0.421961, 0.421339, 0.420715, 0.42009, 0.419464, 0.418835, 0.418206, 0.417574, 0.416941, 0.416307, 0.415671, 0.415033, 0.414394, 0.413753, 0.413111, 0.412467, 0.411822, 0.411174, 0.410526, 0.409875, 0.409223, 0.40857, 0.407915, 0.407258, 0.406599, 0.405939, 0.405278, 0.404614, 0.403949, 0.403282, 0.402614, 0.401944, 0.401272, 0.400599, 0.399924, 0.399247, 0.398568, 0.397888, 0.397206, 0.396523, 0.395837, 0.39515, 0.394461, 0.393771, 0.393079, 0.392385, 0.391689, 0.390991, 0.390292, 0.389591, 0.388888, 0.388183, 0.387477, 0.386769, 0.386058, 0.385347, 0.384633, 0.383917, 0.3832, 0.382481, 0.38176, 0.381037, 0.380312, 0.379586, 0.378857, 0.378127, 0.377395, 0.376661, 0.375925, 0.375187, 0.374447, 0.373705, 0.372962, 0.372216, 0.371468, 0.370719, 0.369968, 0.369214, 0.368459, 0.367702, 0.366942, 0.366181, 0.365418, 0.364653, 0.363886, 0.363116, 0.362345, 0.361572, 0.360796, 0.360019, 0.35924, 0.358458, 0.357675, 0.356889, 0.356101, 0.355311, 0.35452, 0.353726, 0.352929, 0.352131, 0.351331, 0.350528, 0.349724, 0.348917, 0.348108, 0.347297, 0.346483, 0.345668, 0.34485, 0.34403, 0.343208, 0.342384, 0.341557, 0.340728, 0.339897, 0.339064, 0.338229, 0.337391, 0.336551, 0.335708, 0.334863, 0.334016, 0.333167, 0.332315, 0.331461, 0.330605, 0.329746, 0.328885, 0.328021, 0.327155, 0.326287, 0.325416, 0.324543, 0.323668, 0.32279, 0.321909, 0.321026, 0.320141, 0.319253, 0.318363, 0.31747, 0.316574, 0.315677, 0.314776, 0.313873, 0.312968, 0.312059, 0.311149, 0.310236, 0.30932, 0.308401, 0.30748, 0.306556, 0.30563, 0.304701, 0.303769, 0.302835, 0.301898, 0.300958, 0.300015, 0.29907, 0.298122, 0.297171, 0.296218, 0.295262, 0.294302, 0.293341, 0.292376, 0.291408, 0.290438, 0.289465, 0.288488, 0.287509, 0.286528, 0.285543, 0.284555, 0.283564, 0.282571, 0.281574, 0.280575, 0.279572, 0.278566, 0.277558, 0.276546, 0.275531, 0.274514, 0.273493, 0.272469, 0.271442, 0.270412, 0.269378, 0.268342, 0.267302, 0.266259, 0.265213, 0.264164, 0.263111, 0.262056, 0.260996, 0.259934, 0.258869, 0.2578, 0.256727, 0.255652, 0.254573, 0.25349, 0.252404, 0.251315, 0.250222, 0.249126, 0.248027, 0.246924, 0.245817, 0.244707, 0.243593, 0.242476, 0.241355, 0.24023, 0.239102, 0.237971, 0.236835, 0.235696, 0.234553, 0.233407, 0.232256, 0.231102, 0.229944, 0.228783, 0.227617, 0.226448, 0.225275, 0.224098, 0.222917, 0.221732, 0.220543, 0.21935, 0.218153, 0.216952, 0.215747, 0.214538, 0.213325, 0.212108, 0.210886, 0.209661, 0.208431, 0.207197, 0.205959, 0.204716, 0.20347, 0.202219, 0.200963, 0.199703, 0.198439, 0.197171, 0.195898, 0.19462, 0.193338, 0.192051, 0.19076, 0.189465, 0.188164, 0.186859, 0.18555, 0.184235, 0.182916, 0.181593, 0.180264, 0.178931, 0.177592, 0.176249, 0.174901, 0.173548, 0.17219, 0.170827, 0.169459, 0.168086, 0.166708, 0.165325, 0.163936, 0.162543, 0.161144, 0.15974, 0.15833, 0.156915, 0.155495, 0.154069, 0.152638, 0.151202, 0.14976, 0.148312, 0.146859, 0.1454, 0.143936, 0.142465, 0.140989, 0.139507, 0.13802, 0.136526, 0.135027, 0.133521, 0.13201, 0.130493, 0.128969, 0.127439, 0.125903, 0.124361, 0.122813, 0.121258, 0.119697, 0.11813, 0.116556, 0.114976, 0.113389, 0.111795, 0.110195, 0.108588, 0.106974, 0.105354, 0.103727, 0.102093, 0.100451, 0.0988032, 0.0971479, 0.0954855, 0.093816, 0.0921392, 0.0904551, 0.0887637, 0.0870648, 0.0853585, 0.0836447, 0.0819232, 0.0801941, 0.0784573, 0.0767128, 0.0749603, 0.0732, 0.0714317, 0.0696554, 0.0678709, 0.0660783, 0.0642774, 0.0624683, 0.0606507, 0.0588247, 0.0569901, 0.055147, 0.0532952, 0.0514346, 0.0495652, 0.0476869, 0.0457996, 0.0439032, 0.0419977, 0.040083, 0.0381589, 0.0362255, 0.0342825, 0.03233, 0.0303679, 0.028396, 0.0264142, 0.0244226, 0.0224209, 0.0204091, 0.0183871, 0.0163548, 0.014312, 0.0122588, 0.0101949, 0.00812038, 0.00603501, 0.00393872, 0.00183139, -0.000287071, -0.00241679, -0.00455786, -0.00671042, -0.00887457, -0.0110504, -0.0132381, -0.0154378, -0.0176495, -0.0198734, -0.0221097, -0.0243584, -0.0266197, -0.0288937, -0.0311806, -0.0334805, -0.0357935, -0.0381198, -0.0404596, -0.0428129, -0.0451799, -0.0475609, -0.0499558, -0.052365, -0.0547884, -0.0572265, -0.0596792, -0.0621467, -0.0646293, -0.067127, -0.0696402, -0.0721689, -0.0747133, -0.0772737, -0.0798502, -0.082443, -0.0850524, -0.0876784, -0.0903214, -0.0929815, -0.0956589, -0.098354, -0.101067, -0.103798, -0.106547, -0.109314, -0.112101, -0.114906, -0.11773, -0.120574, -0.123438, -0.126322, -0.129225, -0.13215, -0.135095, -0.138062, -0.141049, -0.144059, -0.14709, -0.150144, -0.153221, -0.15632, -0.159443, -0.16259, -0.16576, -0.168955, -0.172174, -0.175419, -0.178689, -0.181985, -0.185307, -0.188656, -0.192032, -0.195435, -0.198867, -0.202327, -0.205816, -0.209334, -0.212882, -0.21646, -0.220069, -0.223709, -0.227382, -0.231086, -0.234824, -0.238595, -0.242401, -0.246241, -0.250117, -0.254029, -0.257977, -0.261963, -0.265987, -0.27005, -0.274152, -0.278295, -0.282479, -0.286705, -0.290973, -0.295285, -0.299641, -0.304043, -0.308491, -0.312987, -0.317531, -0.322124, -0.326767, -0.331462, -0.33621, -0.341011, -0.345867, -0.35078, -0.35575, -0.360779, -0.365868, -0.371019, -0.376233, -0.381512, -0.386857, -0.39227, -0.397753, -0.403308, -0.408936, -0.414639, -0.420419, -0.426279, -0.432221, -0.438247, -0.444359, -0.450559, -0.456851, -0.463238, -0.469721, -0.476304, -0.482989, -0.489781, -0.496683, -0.503698, -0.510829, -0.518081, -0.525459, -0.532965, -0.540605, -0.548384, -0.556307, -0.564378, -0.572605, -0.580992, -0.589546, -0.598274, -0.607183, -0.616281, -0.625575, -0.635075, -0.644789, -0.654728, -0.664902, -0.675322, -0.686001, -0.696951, -0.708186, -0.719723, -0.731577, -0.743766, -0.756309, -0.769229, -0.782547, -0.796289, -0.810484, -0.825161, -0.840354, -0.856102, -0.872445, -0.889431, -0.907112, -0.925547, -0.944803, -0.964956, -0.986094, -1.00832, -1.03175, -1.05652, -1.08279, -1.11076, -1.14066, -1.17278, -1.20747, -1.24518, -1.28649, -1.33216, -1.3832, -1.44107, -1.50786, -1.58684, -1.68346, -1.80795, -1.98317, -2.28168, -4.22375, -2.29164, -1.98805, -1.81108, -1.68569, -1.58849, -1.50911, -1.44201, -1.38389, -1.33263, -1.28679, -1.24532, -1.20745, -1.17263, -1.14038, -1.11036, -1.08228, -1.0559, -1.03103, -1.0075, -0.985176, -0.963943, -0.943697, -0.92435, -0.905826, -0.888057, -0.870985, -0.854556, -0.838724, -0.823447, -0.808688, -0.794412, -0.780588, -0.767189, -0.75419, -0.741567, -0.729299, -0.717366, -0.705752, -0.694438, -0.683411, -0.672655, -0.662158, -0.651908, -0.641893, -0.632102, -0.622526, -0.613156, -0.603983, -0.594999, -0.586195, -0.577566, -0.569104, -0.560803, -0.552657, -0.54466, -0.536807, -0.529092, -0.521512, -0.51406, -0.506734, -0.499529, -0.49244, -0.485465, -0.4786, -0.47184, -0.465184, -0.458627, -0.452168, -0.445803, -0.439529, -0.433344, -0.427245, -0.42123, -0.415297, -0.409443, -0.403667, -0.397967, -0.392339, -0.386784, -0.381298, -0.37588, -0.370528, -0.365241, -0.360018, -0.354856, -0.349755, -0.344712, -0.339727, -0.334798, -0.329924, -0.325105, -0.320337, -0.315621, -0.310956, -0.30634, -0.301772, -0.297252, -0.292777, -0.288349, -0.283964, -0.279624, -0.275326, -0.27107, -0.266855, -0.26268, -0.258545, -0.254449, -0.250391, -0.246371, -0.242387, -0.238439, -0.234526, -0.230649, -0.226805, -0.222995, -0.219219, -0.215474, -0.211762, -0.208081, -0.20443, -0.20081, -0.19722, -0.193659, -0.190127, -0.186624, -0.183148, -0.1797, -0.17628, -0.172885, -0.169517, -0.166175, -0.162859, -0.159567, -0.1563, -0.153058, -0.14984, -0.146645, -0.143473, -0.140325, -0.137199, -0.134095, -0.131014, -0.127954, -0.124916, -0.121898, -0.118902, -0.115926, -0.11297, -0.110035, -0.107119, -0.104222, -0.101345, -0.0984868, -0.0956473, -0.0928262, -0.0900234, -0.0872386, -0.0844715, -0.0817221, -0.0789899, -0.0762749, -0.0735769, -0.0708955, -0.0682307, -0.0655822, -0.0629497, -0.0603333, -0.0577325, -0.0551473, -0.0525775, -0.0500229, -0.0474833, -0.0449585, -0.0424485, -0.0399529, -0.0374717, -0.0350047, -0.0325517, -0.0301125, -0.0276871, -0.0252753, -0.0228769, -0.0204917, -0.0181197, -0.0157607, -0.0134146, -0.0110811, -0.00876027, -0.00645187, -0.00415579, -0.00187192, 0.000399889, 0.00265975, 0.00490778, 0.00714411, 0.00936886, 0.0115821, 0.013784, 0.0159747, 0.0181543, 0.0203228, 0.0224804, 0.0246272, 0.0267633, 0.0288888, 0.0310037, 0.0331083, 0.0352026, 0.0372867, 0.0393607, 0.0414247, 0.0434787, 0.0455229, 0.0475574, 0.0495822, 0.0515975, 0.0536033, 0.0555997, 0.0575868, 0.0595647, 0.0615334, 0.0634931, 0.0654438, 0.0673857, 0.0693187, 0.0712429, 0.0731585, 0.0750655, 0.076964, 0.078854, 0.0807356, 0.082609, 0.0844741, 0.086331, 0.0881799, 0.0900207, 0.0918536, 0.0936785, 0.0954957, 0.097305, 0.0991067, 0.100901, 0.102687, 0.104466, 0.106238, 0.108002, 0.109758, 0.111508, 0.11325, 0.114985, 0.116713, 0.118434, 0.120148, 0.121855, 0.123555, 0.125248, 0.126934, 0.128614, 0.130287, 0.131953, 0.133613, 0.135266, 0.136913, 0.138553, 0.140187, 0.141814, 0.143436, 0.145051, 0.146659, 0.148262, 0.149858, 0.151449, 0.153033, 0.154611, 0.156184, 0.15775, 0.159311, 0.160866, 0.162415, 0.163958, 0.165496, 0.167028, 0.168554, 0.170075, 0.17159, 0.173099, 0.174604, 0.176102, 0.177596, 0.179084, 0.180566, 0.182044, 0.183516, 0.184983, 0.186444, 0.187901, 0.189352, 0.190799, 0.19224, 0.193676, 0.195107, 0.196534, 0.197955, 0.199371, 0.200783, 0.20219, 0.203592, 0.204989, 0.206381, 0.207769, 0.209152, 0.210531, 0.211904, 0.213274, 0.214638, 0.215998, 0.217354, 0.218705, 0.220052, 0.221394, 0.222732, 0.224065, 0.225394, 0.226719, 0.228039, 0.229355, 0.230667, 0.231975, 0.233279, 0.234578, 0.235873, 0.237164, 0.238451, 0.239734, 0.241013, 0.242287, 0.243558, 0.244825, 0.246088, 0.247346, 0.248601, 0.249852, 0.251099, 0.252343, 0.253582, 0.254818, 0.25605, 0.257278, 0.258502, 0.259723, 0.26094, 0.262153, 0.263362, 0.264568, 0.265771, 0.266969, 0.268164, 0.269356, 0.270544, 0.271728, 0.272909, 0.274086, 0.27526, 0.276431, 0.277598, 0.278761, 0.279921, 0.281078, 0.282232, 0.283382, 0.284529, 0.285672, 0.286812, 0.287949, 0.289082, 0.290213, 0.29134, 0.292464, 0.293584, 0.294702, 0.295816, 0.296927, 0.298035, 0.29914, 0.300242, 0.30134, 0.302436, 0.303529, 0.304618, 0.305704, 0.306788, 0.307868, 0.308946, 0.31002, 0.311092, 0.31216, 0.313226, 0.314289, 0.315348, 0.316405, 0.317459, 0.31851, 0.319559, 0.320604, 0.321647, 0.322687, 0.323724, 0.324758, 0.325789, 0.326818, 0.327844, 0.328867, 0.329888, 0.330906, 0.331921, 0.332933, 0.333943, 0.33495, 0.335954, 0.336956, 0.337955, 0.338952, 0.339946, 0.340937, 0.341926, 0.342912, 0.343896, 0.344877, 0.345855, 0.346831, 0.347805, 0.348776, 0.349745, 0.350711, 0.351674, 0.352635, 0.353594, 0.35455, 0.355504, 0.356455, 0.357404, 0.358351, 0.359295, 0.360237, 0.361177, 0.362114, 0.363048, 0.363981, 0.364911, 0.365839, 0.366764, 0.367687, 0.368608, 0.369527, 0.370443, 0.371357, 0.372269, 0.373179, 0.374086, 0.374991, 0.375894, 0.376795, 0.377693, 0.378589, 0.379483, 0.380375, 0.381265, 0.382153, 0.383038, 0.383922, 0.384803, 0.385682, 0.386559, 0.387434, 0.388306, 0.389177, 0.390046, 0.390912, 0.391777, 0.392639, 0.393499, 0.394358, 0.395214, 0.396068, 0.39692, 0.397771, 0.398619, 0.399465, 0.400309, 0.401152, 0.401992, 0.40283, 0.403666, 0.404501, 0.405333, 0.406164, 0.406992, 0.407819, 0.408644, 0.409467, 0.410288, 0.411107, 0.411924, 0.412739, 0.413553, 0.414364, 0.415174, 0.415982, 0.416788, 0.417592, 0.418394, 0.419194, 0.419993, 0.42079, 0.421585, 0.422378, 0.42317, 0.423959, 0.424747, 0.425533, 0.426317, 0.4271, 0.427881, 0.42866, 0.429437, 0.430213, 0.430986, 0.431759, 0.432529, 0.433298, 0.434064, 0.43483, 0.435593, 0.436355, 0.437115, 0.437874, 0.43863, 0.439385, 0.440139, 0.440891, 0.441641, 0.442389, 0.443136, 0.443881, 0.444625, 0.445367, 0.446107, 0.446846, 0.447583, 0.448318, 0.449052, 0.449785, 0.450515, 0.451244, 0.451972, 0.452698, 0.453422, 0.454145, 0.454866, 0.455586, 0.456304, 0.457021, 0.457736, 0.458449, 0.459161, 0.459872, 0.460581, 0.461288, 0.461994, 0.462699, 0.463402, 0.464103, 0.464803, 0.465501, 0.466198, 0.466894, 0.467588, 0.46828, 0.468971, 0.469661, 0.470349, 0.471036, 0.471721, 0.472405, 0.473087, 0.473768, 0.474448, 0.475126, 0.475802, 0.476478, 0.477151, 0.477824, 0.478495, 0.479164, 0.479833, 0.4805, 0.481165, 0.481829, 0.482492, 0.483153, 0.483813, 0.484471, 0.485129, 0.485784, 0.486439, 0.487092, 0.487744, 0.488394, 0.489043, 0.489691, 0.490337, 0.490982, 0.491626, 0.492269, 0.49291, 0.493549, 0.494188, 0.494825, 0.495461, 0.496096, 0.496729, 0.497361, 0.497992, 0.498621, 0.499249, 0.499876, 0.500501, 0.501126, 0.501749, 0.502371, 0.502991, 0.50361, 0.504228, 0.504845, 0.505461, 0.506075, 0.506688, 0.5073, 0.50791, 0.508519, 0.509128, 0.509734, 0.51034, 0.510944, 0.511548, 0.51215, 0.51275, 0.51335, 0.513948, 0.514546, 0.515142, 0.515736, 0.51633, 0.516922, 0.517514, 0.518104, 0.518693, 0.51928, 0.519867, 0.520452, 0.521036, 0.52162, 0.522201, 0.522782, 0.523362, 0.52394, 0.524517, 0.525094, 0.525669, 0.526242, 0.526815, 0.527387, 0.527957, 0.528527, 0.529095, 0.529662, 0.530228, 0.530793, 0.531357, 0.531919, 0.532481, 0.533041, 0.5336, 0.534159, 0.534716, 0.535272, 0.535827, 0.536381, 0.536933, 0.537485, 0.538036, 0.538585, 0.539134, 0.539681, 0.540227, 0.540773, 0.541317, 0.54186, 0.542402, 0.542943, 0.543483, 0.544022, 0.54456, 0.545097, 0.545632, 0.546167, 0.546701, 0.547233, 0.547765, 0.548295, 0.548825, 0.549354, 0.549881, 0.550407, 0.550933, 0.551457, 0.551981, 0.552503, 0.553025, 0.553545, 0.554064, 0.554583, 0.5551, 0.555616, 0.556132, 0.556646, 0.557159, 0.557672, 0.558183, 0.558694, 0.559203, 0.559712, 0.560219, 0.560725, 0.561231, 0.561736, 0.562239, 0.562742, 0.563243, 0.563744, 0.564244, 0.564742, 0.56524, 0.565737, 0.566233, 0.566728, 0.567222, 0.567715, 0.568207, 0.568698, 0.569188, 0.569677, 0.570166, 0.570653, 0.57114, 0.571625, 0.57211, 0.572593, 0.573076, 0.573558, 0.574039, 0.574519, 0.574998, 0.575476, 0.575953, 0.576429, 0.576905, 0.577379, 0.577853, 0.578326, 0.578797, 0.579268, 0.579738, 0.580207, 0.580675, 0.581143, 0.581609, 0.582075, 0.582539, 0.583003, 0.583466, 0.583928, 0.584389, 0.584849, 0.585308, 0.585767, 0.586224, 0.586681, 0.587137, 0.587592, 0.588046, 0.588499, 0.588952, 0.589403, 0.589854, 0.590303, 0.590752, 0.5912, 0.591648, 0.592094, 0.59254, 0.592984, 0.593428, 0.593871, 0.594313, 0.594754, 0.595195, 0.595635, 0.596073, 0.596511, 0.596948, 0.597385, 0.59782, 0.598255, 0.598688, 0.599121, 0.599554, 0.599985, 0.600415, 0.600845, 0.601274, 0.601702, 0.602129, 0.602556, 0.602981, 0.603406, 0.60383, 0.604253, 0.604676, 0.605097, 0.605518, 0.605938, 0.606357, 0.606775, 0.607193, 0.60761, 0.608026, 0.608441, 0.608855, 0.609269, 0.609682, 0.610094, 0.610505, 0.610915, 0.611325, 0.611734, 0.612142, 0.612549, 0.612956, 0.613362, 0.613767, 0.614171, 0.614574, 0.614977, 0.615379, 0.61578, 0.616181, 0.61658, 0.616979, 0.617377, 0.617774, 0.618171, 0.618567, 0.618962, 0.619356, 0.61975, 0.620143, 0.620535, 0.620926, 0.621316, 0.621706, 0.622095, 0.622484, 0.622871, 0.623258, 0.623644, 0.624029, 0.624414, 0.624798, 0.625181, 0.625563, 0.625945, 0.626326, 0.626706, 0.627086, 0.627464, 0.627842, 0.62822, 0.628596, 0.628972, 0.629347, 0.629722, 0.630095, 0.630468, 0.63084, 0.631212, 0.631583, 0.631953, 0.632322, 0.632691, 0.633059, 0.633426, 0.633792, 0.634158, 0.634523, 0.634888, 0.635251, 0.635614, 0.635977, 0.636338, 0.636699, 0.637059, 0.637419, 0.637778, 0.638136, 0.638493, 0.63885, 0.639206, 0.639561, 0.639916, 0.64027, 0.640623, 0.640976, 0.641328, 0.641679, 0.642029, 0.642379, 0.642728, 0.643077, 0.643424, 0.643772, 0.644118, 0.644464, 0.644809, 0.645153, 0.645497, 0.64584, 0.646182, 0.646524, 0.646865, 0.647206, 0.647545, 0.647884, 0.648223, 0.64856, 0.648897, 0.649234, 0.64957, 0.649905, 0.650239, 0.650573, 0.650906, 0.651238, 0.65157, 0.651901, 0.652232, 0.652561, 0.652891, 0.653219, 0.653547, 0.653874, 0.654201, 0.654527, 0.654852, 0.655177, 0.655501, 0.655824, 0.656147, 0.656469, 0.65679, 0.657111, 0.657431, 0.65775, 0.658069, 0.658387, 0.658705, 0.659022, 0.659338, 0.659654, 0.659969, 0.660283, 0.660597, 0.66091, 0.661223, 0.661535, 0.661846, 0.662157, 0.662467, 0.662776, 0.663085, 0.663393, 0.663701, 0.664007, 0.664314, 0.664619, 0.664924, 0.665229, 0.665533, 0.665836, 0.666139, 0.66644, 0.666742, 0.667043, 0.667343, 0.667642, 0.667941, 0.668239, 0.668537, 0.668834, 0.669131, 0.669427, 0.669722, 0.670016, 0.67031, 0.670604, 0.670897, 0.671189, 0.671481, 0.671772, 0.672062, 0.672352, 0.672641, 0.67293, 0.673218, 0.673505, 0.673792, 0.674079, 0.674364, 0.674649, 0.674934, 0.675218, 0.675501, 0.675784, 0.676066, 0.676347, 0.676628, 0.676909, 0.677189, 0.677468, 0.677746, 0.678024, 0.678302, 0.678579, 0.678855, 0.679131, 0.679406, 0.67968, 0.679954, 0.680228, 0.6805, 0.680773, 0.681044, 0.681315, 0.681586, 0.681856, 0.682125, 0.682394, 0.682662, 0.68293, 0.683197, 0.683463, 0.683729, 0.683995, 0.684259, 0.684524, 0.684787, 0.68505, 0.685313, 0.685575, 0.685836, 0.686097, 0.686357, 0.686617, 0.686876, 0.687135, 0.687393, 0.68765, 0.687907, 0.688164, 0.688419, 0.688675, 0.688929, 0.689183, 0.689437, 0.68969, 0.689942, 0.690194, 0.690446, 0.690697, 0.690947, 0.691196, 0.691446, 0.691694, 0.691942, 0.69219, 0.692437, 0.692683, 0.692929, 0.693174, 0.693419, 0.693663, 0.693907, 0.69415, 0.694393, 0.694635, 0.694876, 0.695117, 0.695358, 0.695597, 0.695837, 0.696076, 0.696314, 0.696552, 0.696789, 0.697025, 0.697262, 0.697497, 0.697732, 0.697967, 0.698201, 0.698434, 0.698667, 0.698899, 0.699131, 0.699363, 0.699593, 0.699824, 0.700053, 0.700282, 0.700511, 0.700739, 0.700967, 0.701194, 0.701421, 0.701647, 0.701872, 0.702097, 0.702322, 0.702545, 0.702769, 0.702992, 0.703214, 0.703436, 0.703657, 0.703878, 0.704098, 0.704318, 0.704537, 0.704756, 0.704974, 0.705192, 0.705409, 0.705626, 0.705842, 0.706057, 0.706273, 0.706487, 0.706701, 0.706915, 0.707128, 0.70734, 0.707552, 0.707764, 0.707975, 0.708185, 0.708395, 0.708605, 0.708814, 0.709022, 0.70923, 0.709438, 0.709645, 0.709851, 0.710057, 0.710262, 0.710467, 0.710672, 0.710875, 0.711079, 0.711282, 0.711484, 0.711686, 0.711887, 0.712088, 0.712289, 0.712488, 0.712688, 0.712887, 0.713085, 0.713283, 0.71348, 0.713677, 0.713873, 0.714069, 0.714265, 0.71446, 0.714654, 0.714848, 0.715041, 0.715234, 0.715426, 0.715618, 0.71581, 0.716001, 0.716191, 0.716381, 0.716571, 0.716759, 0.716948, 0.717136, 0.717323, 0.71751, 0.717697, 0.717883, 0.718068, 0.718253, 0.718438, 0.718622, 0.718806, 0.718989, 0.719171, 0.719353, 0.719535, 0.719716, 0.719897, 0.720077, 0.720257, 0.720436, 0.720614, 0.720793, 0.72097, 0.721148, 0.721324, 0.721501, 0.721677, 0.721852, 0.722027, 0.722201, 0.722375, 0.722549, 0.722721, 0.722894, 0.723066, 0.723237, 0.723408, 0.723579, 0.723749, 0.723919, 0.724088, 0.724256, 0.724425, 0.724592, 0.72476, 0.724926, 0.725093, 0.725258, 0.725424, 0.725589, 0.725753, 0.725917, 0.72608, 0.726243, 0.726406, 0.726568, 0.726729, 0.726891, 0.727051, 0.727211, 0.727371, 0.72753, 0.727689, 0.727847, 0.728005, 0.728162, 0.728319, 0.728476, 0.728632, 0.728787, 0.728942, 0.729097, 0.729251, 0.729404, 0.729558, 0.72971, 0.729862, 0.730014, 0.730166, 0.730316, 0.730467, 0.730617, 0.730766, 0.730915, 0.731064, 0.731212, 0.731359, 0.731506, 0.731653, 0.731799, 0.731945, 0.732091, 0.732235, 0.73238, 0.732524, 0.732667, 0.73281, 0.732953, 0.733095, 0.733237, 0.733378, 0.733518, 0.733659, 0.733799, 0.733938, 0.734077, 0.734215, 0.734353, 0.734491, 0.734628, 0.734765, 0.734901, 0.735037, 0.735172, 0.735307, 0.735441, 0.735575, 0.735709, 0.735842, 0.735974, 0.736106, 0.736238, 0.736369, 0.7365, 0.73663, 0.73676, 0.73689, 0.737019, 0.737147, 0.737275, 0.737403, 0.73753, 0.737657, 0.737783, 0.737909, 0.738035, 0.738159, 0.738284, 0.738408, 0.738532, 0.738655, 0.738778, 0.7389, 0.739022, 0.739143, 0.739264, 0.739385, 0.739505, 0.739624, 0.739744, 0.739862, 0.739981, 0.740098, 0.740216, 0.740333, 0.740449, 0.740565, 0.740681, 0.740796, 0.740911, 0.741025, 0.741139, 0.741253, 0.741366, 0.741478, 0.741591, 0.741702, 0.741813, 0.741924, 0.742035, 0.742145, 0.742254, 0.742363, 0.742472, 0.74258, 0.742688, 0.742795, 0.742902, 0.743008, 0.743114, 0.74322, 0.743325, 0.74343, 0.743534, 0.743638, 0.743741, 0.743844, 0.743947, 0.744049, 0.744151, 0.744252, 0.744353, 0.744453, 0.744553, 0.744652, 0.744751, 0.74485, 0.744948, 0.745046, 0.745143, 0.74524, 0.745337, 0.745433, 0.745528, 0.745624, 0.745718, 0.745813, 0.745907, 0.746, 0.746093, 0.746186, 0.746278, 0.74637, 0.746461, 0.746552, 0.746642, 0.746732, 0.746822, 0.746911, 0.747, 0.747088, 0.747176, 0.747263, 0.74735, 0.747437, 0.747523, 0.747609, 0.747694, 0.747779, 0.747864, 0.747948, 0.748031, 0.748115, 0.748197, 0.74828, 0.748362, 0.748443, 0.748524, 0.748605, 0.748685, 0.748765, 0.748844, 0.748923, 0.749002, 0.74908, 0.749157, 0.749235, 0.749312, 0.749388, 0.749464, 0.749539, 0.749615, 0.749689, 0.749764, 0.749838, 0.749911, 0.749984, 0.750057, 0.750129, 0.750201, 0.750272, 0.750343, 0.750413, 0.750483, 0.750553, 0.750622, 0.750691, 0.75076, 0.750828, 0.750895, 0.750962, 0.751029, 0.751095, 0.751161, 0.751227, 0.751292, 0.751356, 0.751421, 0.751484, 0.751548, 0.751611, 0.751673, 0.751735, 0.751797, 0.751858, 0.751919, 0.75198, 0.75204, 0.752099, 0.752158, 0.752217, 0.752276, 0.752334, 0.752391, 0.752448, 0.752505, 0.752561, 0.752617, 0.752672, 0.752728, 0.752782, 0.752836, 0.75289, 0.752944, 0.752996, 0.753049, 0.753101, 0.753153, 0.753204, 0.753255, 0.753305, 0.753356, 0.753405, 0.753454, 0.753503, 0.753552, 0.7536, 0.753647, 0.753694, 0.753741, 0.753787, 0.753833, 0.753879, 0.753924, 0.753969, 0.754013, 0.754057, 0.7541, 0.754143, 0.754186, 0.754228, 0.75427, 0.754311, 0.754352, 0.754393, 0.754433, 0.754473, 0.754512, 0.754551, 0.754589, 0.754627, 0.754665, 0.754702, 0.754739, 0.754776, 0.754812, 0.754847, 0.754882, 0.754917, 0.754952, 0.754986, 0.755019, 0.755052, 0.755085, 0.755117, 0.755149, 0.755181, 0.755212, 0.755243, 0.755273, 0.755303, 0.755332, 0.755361, 0.75539, 0.755418, 0.755446, 0.755474, 0.755501, 0.755527, 0.755553, 0.755579, 0.755604, 0.755629, 0.755654, 0.755678, 0.755702, 0.755725, 0.755748, 0.755771, 0.755793, 0.755814, 0.755836, 0.755857, 0.755877, 0.755897, 0.755917, 0.755936, 0.755955, 0.755973, 0.755991, 0.756009, 0.756026, 0.756043, 0.756059, 0.756075, 0.756091, 0.756106, 0.756121, 0.756135, 0.756149, 0.756163, 0.756176, 0.756189, 0.756201, 0.756213, 0.756224, 0.756236, 0.756246, 0.756257, 0.756266, 0.756276, 0.756285, 0.756294, 0.756302, 0.75631, 0.756317, 0.756324, 0.756331, 0.756337, 0.756343, 0.756348, 0.756353, 0.756358, 0.756362, 0.756366, 0.756369, 0.756372, 0.756375, 0.756377, 0.756379, 0.75638, 0.756381, 0.756382, 0.756382, 0.756381, 0.756381, 0.75638, 0.756378, 0.756376, 0.756374, 0.756371, 0.756368, 0.756365, 0.756361, 0.756356, 0.756352, 0.756347, 0.756341, 0.756335, 0.756329, 0.756322, 0.756315, 0.756307, 0.756299, 0.756291, 0.756282, 0.756273, 0.756263, 0.756253, 0.756243, 0.756232, 0.756221, 0.756209, 0.756197, 0.756185 +}; #endif /* MULTIPATH_V0_M10_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v0_M12.h b/src/lte/model/JakesTraces/multipath_v0_M12.h index 47c8bd62e..166bad657 100644 --- a/src/lte/model/JakesTraces/multipath_v0_M12.h +++ b/src/lte/model/JakesTraces/multipath_v0_M12.h @@ -24,8 +24,8 @@ #define MULTIPATH_V0_M11_H_ static double multipath_M12_v_0[3000] = { - 0.656205, 0.656205, 0.656203, 0.656201, 0.656199, 0.656195, 0.656192, 0.656187, 0.656182, 0.656177, 0.656171, 0.656164, 0.656157, 0.656149, 0.656141, 0.656132, 0.656123, 0.656112, 0.656102, 0.656091, 0.656079, 0.656066, 0.656053, 0.65604, 0.656026, 0.656011, 0.655996, 0.65598, 0.655964, 0.655947, 0.655929, 0.655911, 0.655892, 0.655873, 0.655853, 0.655832, 0.655811, 0.65579, 0.655768, 0.655745, 0.655722, 0.655698, 0.655673, 0.655648, 0.655622, 0.655596, 0.655569, 0.655542, 0.655514, 0.655485, 0.655456, 0.655427, 0.655396, 0.655366, 0.655334, 0.655302, 0.65527, 0.655236, 0.655203, 0.655168, 0.655133, 0.655098, 0.655062, 0.655025, 0.654988, 0.65495, 0.654912, 0.654873, 0.654833, 0.654793, 0.654752, 0.654711, 0.654669, 0.654627, 0.654584, 0.65454, 0.654496, 0.654451, 0.654406, 0.65436, 0.654314, 0.654267, 0.654219, 0.654171, 0.654122, 0.654072, 0.654022, 0.653972, 0.653921, 0.653869, 0.653817, 0.653764, 0.65371, 0.653656, 0.653602, 0.653546, 0.65349, 0.653434, 0.653377, 0.653319, 0.653261, 0.653203, 0.653143, 0.653083, 0.653023, 0.652962, 0.6529, 0.652838, 0.652775, 0.652712, 0.652648, 0.652583, 0.652518, 0.652452, 0.652386, 0.652319, 0.652251, 0.652183, 0.652114, 0.652045, 0.651975, 0.651905, 0.651834, 0.651762, 0.65169, 0.651617, 0.651544, 0.65147, 0.651395, 0.65132, 0.651244, 0.651168, 0.651091, 0.651013, 0.650935, 0.650857, 0.650777, 0.650697, 0.650617, 0.650536, 0.650454, 0.650372, 0.650289, 0.650205, 0.650121, 0.650037, 0.649952, 0.649866, 0.649779, 0.649692, 0.649605, 0.649516, 0.649428, 0.649338, 0.649248, 0.649158, 0.649067, 0.648975, 0.648882, 0.648789, 0.648696, 0.648602, 0.648507, 0.648412, 0.648316, 0.648219, 0.648122, 0.648024, 0.647926, 0.647827, 0.647727, 0.647627, 0.647526, 0.647425, 0.647323, 0.64722, 0.647117, 0.647013, 0.646909, 0.646804, 0.646699, 0.646592, 0.646486, 0.646378, 0.64627, 0.646162, 0.646052, 0.645943, 0.645832, 0.645721, 0.64561, 0.645497, 0.645384, 0.645271, 0.645157, 0.645042, 0.644927, 0.644811, 0.644695, 0.644578, 0.64446, 0.644342, 0.644223, 0.644103, 0.643983, 0.643862, 0.643741, 0.643619, 0.643496, 0.643373, 0.643249, 0.643125, 0.643, 0.642874, 0.642748, 0.642621, 0.642493, 0.642365, 0.642236, 0.642107, 0.641977, 0.641847, 0.641715, 0.641583, 0.641451, 0.641318, 0.641184, 0.64105, 0.640915, 0.640779, 0.640643, 0.640507, 0.640369, 0.640231, 0.640092, 0.639953, 0.639813, 0.639673, 0.639532, 0.63939, 0.639247, 0.639104, 0.638961, 0.638816, 0.638671, 0.638526, 0.63838, 0.638233, 0.638085, 0.637937, 0.637789, 0.637639, 0.637489, 0.637339, 0.637188, 0.637036, 0.636883, 0.63673, 0.636576, 0.636422, 0.636267, 0.636111, 0.635955, 0.635798, 0.635641, 0.635482, 0.635324, 0.635164, 0.635004, 0.634843, 0.634682, 0.63452, 0.634357, 0.634194, 0.63403, 0.633865, 0.6337, 0.633534, 0.633368, 0.633201, 0.633033, 0.632864, 0.632695, 0.632525, 0.632355, 0.632184, 0.632012, 0.63184, 0.631667, 0.631493, 0.631319, 0.631144, 0.630969, 0.630792, 0.630615, 0.630438, 0.63026, 0.630081, 0.629901, 0.629721, 0.62954, 0.629359, 0.629177, 0.628994, 0.62881, 0.628626, 0.628442, 0.628256, 0.62807, 0.627883, 0.627696, 0.627508, 0.627319, 0.62713, 0.62694, 0.626749, 0.626557, 0.626365, 0.626173, 0.625979, 0.625785, 0.625591, 0.625395, 0.625199, 0.625002, 0.624805, 0.624607, 0.624408, 0.624209, 0.624008, 0.623808, 0.623606, 0.623404, 0.623201, 0.622998, 0.622794, 0.622589, 0.622383, 0.622177, 0.62197, 0.621763, 0.621554, 0.621346, 0.621136, 0.620926, 0.620715, 0.620503, 0.620291, 0.620078, 0.619864, 0.619649, 0.619434, 0.619219, 0.619002, 0.618785, 0.618567, 0.618348, 0.618129, 0.617909, 0.617689, 0.617467, 0.617245, 0.617023, 0.616799, 0.616575, 0.61635, 0.616125, 0.615898, 0.615671, 0.615444, 0.615216, 0.614986, 0.614757, 0.614526, 0.614295, 0.614063, 0.613831, 0.613597, 0.613363, 0.613129, 0.612893, 0.612657, 0.61242, 0.612183, 0.611945, 0.611706, 0.611466, 0.611225, 0.610984, 0.610742, 0.6105, 0.610257, 0.610013, 0.609768, 0.609522, 0.609276, 0.609029, 0.608782, 0.608533, 0.608284, 0.608034, 0.607784, 0.607533, 0.607281, 0.607028, 0.606774, 0.60652, 0.606265, 0.60601, 0.605753, 0.605496, 0.605238, 0.60498, 0.60472, 0.60446, 0.604199, 0.603938, 0.603675, 0.603412, 0.603148, 0.602884, 0.602618, 0.602352, 0.602086, 0.601818, 0.60155, 0.601281, 0.601011, 0.60074, 0.600469, 0.600197, 0.599924, 0.59965, 0.599376, 0.599101, 0.598825, 0.598548, 0.598271, 0.597993, 0.597714, 0.597434, 0.597153, 0.596872, 0.59659, 0.596307, 0.596024, 0.595739, 0.595454, 0.595168, 0.594882, 0.594594, 0.594306, 0.594017, 0.593727, 0.593437, 0.593145, 0.592853, 0.59256, 0.592267, 0.591972, 0.591677, 0.591381, 0.591084, 0.590786, 0.590488, 0.590189, 0.589888, 0.589588, 0.589286, 0.588984, 0.58868, 0.588376, 0.588071, 0.587766, 0.587459, 0.587152, 0.586844, 0.586535, 0.586226, 0.585915, 0.585604, 0.585292, 0.584979, 0.584665, 0.58435, 0.584035, 0.583719, 0.583402, 0.583084, 0.582765, 0.582446, 0.582125, 0.581804, 0.581482, 0.581159, 0.580836, 0.580511, 0.580186, 0.57986, 0.579533, 0.579205, 0.578876, 0.578547, 0.578217, 0.577885, 0.577553, 0.577221, 0.576887, 0.576552, 0.576217, 0.575881, 0.575543, 0.575205, 0.574867, 0.574527, 0.574186, 0.573845, 0.573503, 0.57316, 0.572816, 0.572471, 0.572125, 0.571778, 0.571431, 0.571083, 0.570733, 0.570383, 0.570032, 0.56968, 0.569328, 0.568974, 0.56862, 0.568264, 0.567908, 0.567551, 0.567193, 0.566834, 0.566474, 0.566113, 0.565752, 0.565389, 0.565026, 0.564662, 0.564296, 0.56393, 0.563563, 0.563195, 0.562827, 0.562457, 0.562086, 0.561715, 0.561342, 0.560969, 0.560595, 0.560219, 0.559843, 0.559466, 0.559088, 0.558709, 0.558329, 0.557949, 0.557567, 0.557184, 0.556801, 0.556416, 0.556031, 0.555645, 0.555257, 0.554869, 0.55448, 0.55409, 0.553699, 0.553307, 0.552914, 0.55252, 0.552125, 0.551729, 0.551332, 0.550934, 0.550536, 0.550136, 0.549735, 0.549334, 0.548931, 0.548527, 0.548123, 0.547717, 0.547311, 0.546903, 0.546495, 0.546085, 0.545675, 0.545263, 0.544851, 0.544438, 0.544023, 0.543608, 0.543191, 0.542774, 0.542356, 0.541936, 0.541516, 0.541094, 0.540672, 0.540248, 0.539824, 0.539399, 0.538972, 0.538545, 0.538116, 0.537686, 0.537256, 0.536824, 0.536392, 0.535958, 0.535523, 0.535088, 0.534651, 0.534213, 0.533774, 0.533334, 0.532893, 0.532451, 0.532008, 0.531564, 0.531119, 0.530672, 0.530225, 0.529777, 0.529327, 0.528877, 0.528425, 0.527973, 0.527519, 0.527064, 0.526608, 0.526151, 0.525693, 0.525234, 0.524774, 0.524312, 0.52385, 0.523387, 0.522922, 0.522456, 0.521989, 0.521521, 0.521052, 0.520582, 0.520111, 0.519639, 0.519165, 0.51869, 0.518215, 0.517738, 0.51726, 0.516781, 0.5163, 0.515819, 0.515336, 0.514853, 0.514368, 0.513882, 0.513395, 0.512906, 0.512417, 0.511926, 0.511434, 0.510941, 0.510447, 0.509952, 0.509455, 0.508958, 0.508459, 0.507959, 0.507458, 0.506955, 0.506452, 0.505947, 0.505441, 0.504934, 0.504426, 0.503916, 0.503405, 0.502893, 0.50238, 0.501866, 0.50135, 0.500833, 0.500315, 0.499796, 0.499275, 0.498753, 0.49823, 0.497706, 0.49718, 0.496654, 0.496126, 0.495596, 0.495066, 0.494534, 0.494001, 0.493467, 0.492931, 0.492394, 0.491856, 0.491317, 0.490776, 0.490234, 0.489691, 0.489146, 0.4886, 0.488053, 0.487504, 0.486955, 0.486403, 0.485851, 0.485297, 0.484742, 0.484186, 0.483628, 0.483069, 0.482509, 0.481947, 0.481384, 0.480819, 0.480254, 0.479686, 0.479118, 0.478548, 0.477977, 0.477404, 0.47683, 0.476255, 0.475678, 0.4751, 0.474521, 0.47394, 0.473358, 0.472774, 0.472189, 0.471602, 0.471014, 0.470425, 0.469834, 0.469242, 0.468649, 0.468054, 0.467457, 0.466859, 0.46626, 0.465659, 0.465057, 0.464453, 0.463848, 0.463241, 0.462633, 0.462024, 0.461413, 0.4608, 0.460186, 0.45957, 0.458953, 0.458335, 0.457715, 0.457093, 0.45647, 0.455846, 0.45522, 0.454592, 0.453963, 0.453332, 0.4527, 0.452066, 0.451431, 0.450794, 0.450156, 0.449516, 0.448874, 0.448231, 0.447586, 0.44694, 0.446292, 0.445643, 0.444991, 0.444339, 0.443684, 0.443029, 0.442371, 0.441712, 0.441051, 0.440389, 0.439725, 0.439059, 0.438391, 0.437722, 0.437052, 0.436379, 0.435705, 0.43503, 0.434352, 0.433673, 0.432993, 0.43231, 0.431626, 0.43094, 0.430252, 0.429563, 0.428872, 0.428179, 0.427485, 0.426789, 0.426091, 0.425391, 0.424689, 0.423986, 0.423281, 0.422574, 0.421865, 0.421155, 0.420443, 0.419729, 0.419013, 0.418295, 0.417576, 0.416854, 0.416131, 0.415406, 0.414679, 0.413951, 0.41322, 0.412488, 0.411753, 0.411017, 0.410279, 0.409539, 0.408797, 0.408054, 0.407308, 0.40656, 0.405811, 0.405059, 0.404306, 0.403551, 0.402793, 0.402034, 0.401273, 0.400509, 0.399744, 0.398977, 0.398208, 0.397437, 0.396663, 0.395888, 0.395111, 0.394332, 0.39355, 0.392767, 0.391981, 0.391194, 0.390404, 0.389612, 0.388819, 0.388023, 0.387225, 0.386425, 0.385623, 0.384818, 0.384012, 0.383203, 0.382392, 0.381579, 0.380764, 0.379947, 0.379127, 0.378306, 0.377482, 0.376656, 0.375827, 0.374997, 0.374164, 0.373329, 0.372491, 0.371652, 0.37081, 0.369966, 0.369119, 0.36827, 0.367419, 0.366566, 0.36571, 0.364852, 0.363992, 0.363129, 0.362264, 0.361396, 0.360526, 0.359654, 0.358779, 0.357902, 0.357022, 0.35614, 0.355256, 0.354369, 0.353479, 0.352588, 0.351693, 0.350796, 0.349897, 0.348995, 0.34809, 0.347183, 0.346274, 0.345361, 0.344447, 0.343529, 0.342609, 0.341687, 0.340762, 0.339834, 0.338903, 0.33797, 0.337034, 0.336096, 0.335155, 0.334211, 0.333264, 0.332315, 0.331363, 0.330408, 0.32945, 0.32849, 0.327526, 0.32656, 0.325592, 0.32462, 0.323645, 0.322668, 0.321688, 0.320705, 0.319718, 0.318729, 0.317738, 0.316743, 0.315745, 0.314744, 0.31374, 0.312734, 0.311724, 0.310711, 0.309695, 0.308676, 0.307654, 0.306629, 0.305601, 0.30457, 0.303535, 0.302498, 0.301457, 0.300413, 0.299366, 0.298316, 0.297262, 0.296205, 0.295145, 0.294082, 0.293016, 0.291946, 0.290872, 0.289796, 0.288716, 0.287633, 0.286546, 0.285456, 0.284362, 0.283265, 0.282165, 0.281061, 0.279953, 0.278842, 0.277728, 0.27661, 0.275488, 0.274363, 0.273234, 0.272102, 0.270965, 0.269826, 0.268682, 0.267535, 0.266384, 0.265229, 0.264071, 0.262909, 0.261742, 0.260573, 0.259399, 0.258221, 0.25704, 0.255854, 0.254665, 0.253471, 0.252274, 0.251072, 0.249867, 0.248658, 0.247444, 0.246226, 0.245005, 0.243779, 0.242548, 0.241314, 0.240076, 0.238833, 0.237586, 0.236334, 0.235079, 0.233819, 0.232554, 0.231285, 0.230012, 0.228734, 0.227452, 0.226165, 0.224874, 0.223578, 0.222278, 0.220973, 0.219663, 0.218349, 0.21703, 0.215706, 0.214377, 0.213044, 0.211706, 0.210363, 0.209015, 0.207662, 0.206304, 0.204941, 0.203574, 0.202201, 0.200823, 0.19944, 0.198052, 0.196658, 0.19526, 0.193856, 0.192447, 0.191032, 0.189612, 0.188187, 0.186757, 0.18532, 0.183879, 0.182432, 0.180979, 0.179521, 0.178057, 0.176587, 0.175112, 0.173631, 0.172144, 0.170651, 0.169152, 0.167647, 0.166137, 0.16462, 0.163097, 0.161568, 0.160033, 0.158492, 0.156945, 0.155391, 0.153831, 0.152265, 0.150692, 0.149113, 0.147527, 0.145934, 0.144335, 0.14273, 0.141117, 0.139498, 0.137872, 0.136239, 0.134599, 0.132953, 0.131299, 0.129638, 0.12797, 0.126294, 0.124612, 0.122922, 0.121225, 0.11952, 0.117808, 0.116088, 0.114361, 0.112626, 0.110883, 0.109133, 0.107374, 0.105608, 0.103834, 0.102051, 0.100261, 0.098462, 0.096655, 0.0948397, 0.0930159, 0.0911837, 0.0893428, 0.0874934, 0.0856353, 0.0837683, 0.0818925, 0.0800078, 0.078114, 0.0762112, 0.0742992, 0.0723779, 0.0704472, 0.0685071, 0.0665576, 0.0645984, 0.0626295, 0.0606508, 0.0586622, 0.0566637, 0.0546552, 0.0526364, 0.0506075, 0.0485681, 0.0465183, 0.044458, 0.042387, 0.0403053, 0.0382127, 0.0361092, 0.0339945, 0.0318687, 0.0297316, 0.0275831, 0.025423, 0.0232513, 0.0210678, 0.0188725, 0.0166652, 0.0144457, 0.0122139, 0.00996983, 0.0077132, 0.00544393, 0.00316187, 0.000866888, -0.00144115, -0.00376238, -0.00609696, -0.00844503, -0.0108067, -0.0131822, -0.0155717, -0.0179752, -0.020393, -0.0228252, -0.0252721, -0.0277336, -0.0302101, -0.0327017, -0.0352085, -0.0377308, -0.0402688, -0.0428226, -0.0453923, -0.0479783, -0.0505807, -0.0531997, -0.0558355, -0.0584883, -0.0611583, -0.0638458, -0.0665509, -0.0692739, -0.0720151, -0.0747746, -0.0775526, -0.0803495, -0.0831655, -0.0860007, -0.0888556, -0.0917303, -0.0946252, -0.0975404, -0.100476, -0.103433, -0.106411, -0.109411, -0.112432, -0.115476, -0.118542, -0.121631, -0.124742, -0.127878, -0.131037, -0.13422, -0.137428, -0.140661, -0.143919, -0.147203, -0.150512, -0.153848, -0.157211, -0.160601, -0.164019, -0.167466, -0.17094, -0.174444, -0.177977, -0.181541, -0.185135, -0.18876, -0.192416, -0.196105, -0.199826, -0.203581, -0.207369, -0.211192, -0.21505, -0.218944, -0.222874, -0.226841, -0.230845, -0.234888, -0.238971, -0.243093, -0.247255, -0.25146, -0.255706, -0.259996, -0.264329, -0.268708, -0.273132, -0.277603, -0.282121, -0.286689, -0.291306, -0.295974, -0.300694, -0.305467, -0.310294, -0.315177, -0.320116, -0.325114, -0.330171, -0.335289, -0.34047, -0.345714, -0.351024, -0.356401, -0.361846, -0.367362, -0.372951, -0.378613, -0.384352, -0.390169, -0.396067, -0.402047, -0.408112, -0.414264, -0.420507, -0.426842, -0.433272, -0.4398, -0.446429, -0.453163, -0.460005, -0.466957, -0.474024, -0.48121, -0.488518, -0.495953, -0.503519, -0.511222, -0.519064, -0.527053, -0.535194, -0.543491, -0.551952, -0.560583, -0.569391, -0.578384, -0.587568, -0.596953, -0.606546, -0.616359, -0.626401, -0.636682, -0.647215, -0.658012, -0.669087, -0.680453, -0.692128, -0.704127, -0.71647, -0.729176, -0.742268, -0.755769, -0.769706, -0.784108, -0.799008, -0.814439, -0.830442, -0.84706, -0.864343, -0.882346, -0.901131, -0.920768, -0.94134, -0.962939, -0.985673, -1.00967, -1.03507, -1.06205, -1.09083, -1.12166, -1.15485, -1.1908, -1.22999, -1.27309, -1.32095, -1.37475, -1.43618, -1.50777, -1.59354, -1.70056, -1.84291, -2.05612, -2.49254, -2.62808, -2.10088, -1.86965, -1.71954, -1.60819, -1.51963, -1.44609, -1.38321, -1.32829, -1.27953, -1.2357, -1.19588, -1.1594, -1.12574, -1.0945, -1.06536, -1.03804, -1.01234, -0.988073, -0.965086, -0.943253, -0.922462, -0.902618, -0.883639, -0.865453, -0.847996, -0.831211, -0.815049, -0.799465, -0.784419, -0.769876, -0.755802, -0.742168, -0.728948, -0.716116, -0.703652, -0.691534, -0.679744, -0.668264, -0.657079, -0.646173, -0.635533, -0.625147, -0.615002, -0.605088, -0.595394, -0.585911, -0.576629, -0.567541, -0.558638, -0.549913, -0.54136, -0.53297, -0.524739, -0.516661, -0.508729, -0.500938, -0.493285, -0.485763, -0.478369, -0.471097, -0.463945, -0.456908, -0.449983, -0.443166, -0.436454, -0.429844, -0.423332, -0.416915, -0.410592, -0.404359, -0.398214, -0.392154, -0.386177, -0.380281, -0.374463, -0.368722, -0.363055, -0.357461, -0.351938, -0.346484, -0.341097, -0.335776, -0.330519, -0.325324, -0.320191, -0.315117, -0.310102, -0.305144, -0.300241, -0.295393, -0.290598, -0.285855, -0.281163, -0.276521, -0.271928, -0.267383, -0.262885, -0.258433, -0.254025, -0.249662, -0.245342, -0.241064, -0.236828, -0.232633, -0.228478, -0.224362, -0.220284, -0.216244, -0.212242, -0.208276, -0.204345, -0.20045, -0.196589, -0.192762, -0.188969, -0.185208, -0.18148, -0.177783, -0.174117, -0.170482, -0.166877, -0.163302, -0.159756, -0.156238, -0.152749, -0.149287, -0.145853, -0.142446, -0.139065, -0.13571, -0.132381, -0.129078, -0.125799, -0.122545, -0.119315, -0.116108, -0.112926, -0.109766, -0.10663, -0.103515, -0.100423, -0.0973533, -0.0943048, -0.0912775, -0.0882713, -0.0852857, -0.0823205, -0.0793756, -0.0764504, -0.0735449, -0.0706588, -0.0677917, -0.0649435, -0.062114, -0.0593028, -0.0565097, -0.0537346, -0.0509771, -0.0482371, -0.0455144, -0.0428087, -0.0401198, -0.0374476, -0.0347918, -0.0321522, -0.0295287, -0.0269209, -0.0243289, -0.0217523, -0.019191, -0.0166449, -0.0141136, -0.0115972, -0.00909533, -0.00660792, -0.00413478, -0.00167576, 0.000769298, 0.00320055, 0.00561815, 0.00802225, 0.010413, 0.0127905, 0.015155, 0.0175065, 0.0198452, 0.0221713, 0.0244848, 0.026786, 0.0290749, 0.0313516, 0.0336163, 0.0358691, 0.0381102, 0.0403396, 0.0425575, 0.0447639, 0.0469591, 0.049143, 0.0513159, 0.0534778, 0.0556288, 0.0577691, 0.0598987, 0.0620178, 0.0641264, 0.0662246, 0.0683126, 0.0703904, 0.0724582, 0.074516, 0.0765639, 0.078602, 0.0806304, 0.0826493, 0.0846586, 0.0866584, 0.0886489, 0.0906302, 0.0926022, 0.0945652, 0.0965191, 0.0984642, 0.1004, 0.102328, 0.104246, 0.106156, 0.108058, 0.109951, 0.111835, 0.113711, 0.115579, 0.117439, 0.119291, 0.121134, 0.12297, 0.124797, 0.126617, 0.128429, 0.130233, 0.13203, 0.133819, 0.1356, 0.137374, 0.13914, 0.140899, 0.142651, 0.144396, 0.146133, 0.147863, 0.149586, 0.151302, 0.153011, 0.154713, 0.156409, 0.158097, 0.159779, 0.161454, 0.163122, 0.164784, 0.166439, 0.168087, 0.169729, 0.171365, 0.172994, 0.174617, 0.176234, 0.177844, 0.179449, 0.181047, 0.182639, 0.184225, 0.185805, 0.187379, 0.188947, 0.190509, 0.192065, 0.193616, 0.195161, 0.1967, 0.198233, 0.199761, 0.201283, 0.202799, 0.20431, 0.205816, 0.207316, 0.208811, 0.2103, 0.211784, 0.213262, 0.214736, 0.216204, 0.217667, 0.219124, 0.220577, 0.222024, 0.223467, 0.224904, 0.226336, 0.227764, 0.229186, 0.230604, 0.232016, 0.233424, 0.234827, 0.236225, 0.237619, 0.239007, 0.240391, 0.241771, 0.243145, 0.244515, 0.245881, 0.247242, 0.248598, 0.24995, 0.251297, 0.25264, 0.253979, 0.255313, 0.256643, 0.257968, 0.259289, 0.260606, 0.261919, 0.263227, 0.264531, 0.265831, 0.267127, 0.268419, 0.269706, 0.27099, 0.272269, 0.273545, 0.274816, 0.276083, 0.277346, 0.278606, 0.279861, 0.281113, 0.28236, 0.283604, 0.284844, 0.28608, 0.287313, 0.288541, 0.289766, 0.290987, 0.292204, 0.293418, 0.294628, 0.295834, 0.297037, 0.298236, 0.299431, 0.300623, 0.301811, 0.302996, 0.304177, 0.305355, 0.306529, 0.3077, 0.308867, 0.310031, 0.311191, 0.312348, 0.313502, 0.314652, 0.315799, 0.316943, 0.318083, 0.31922, 0.320354, 0.321485, 0.322612, 0.323736, 0.324857, 0.325974, 0.327089, 0.3282, 0.329308, 0.330413, 0.331515, 0.332614, 0.333709, 0.334802, 0.335892, 0.336978, 0.338062, 0.339142, 0.34022, 0.341294, 0.342366, 0.343434, 0.3445, 0.345563, 0.346622, 0.347679, 0.348733, 0.349784, 0.350833, 0.351878, 0.352921, 0.353961, 0.354998, 0.356032, 0.357063, 0.358092, 0.359118, 0.360141, 0.361161, 0.362179, 0.363194, 0.364206, 0.365216, 0.366223, 0.367227, 0.368229, 0.369228, 0.370225, 0.371218, 0.37221, 0.373198, 0.374184, 0.375168, 0.376149, 0.377127, 0.378103, 0.379076, 0.380047, 0.381016, 0.381981, 0.382945, 0.383906, 0.384864, 0.38582, 0.386774, 0.387725, 0.388674, 0.38962, 0.390564, 0.391506, 0.392445, 0.393382, 0.394316, 0.395249, 0.396179, 0.397106, 0.398031, 0.398954, 0.399875, 0.400793, 0.401709, 0.402623, 0.403534, 0.404444, 0.405351, 0.406256, 0.407158, 0.408058, 0.408957, 0.409853, 0.410746, 0.411638, 0.412528, 0.413415, 0.4143, 0.415183, 0.416064, 0.416943, 0.417819, 0.418694, 0.419566, 0.420436, 0.421305, 0.422171, 0.423035, 0.423897, 0.424757, 0.425615, 0.426471, 0.427325, 0.428176, 0.429026, 0.429874, 0.43072, 0.431564, 0.432406, 0.433245, 0.434083, 0.434919, 0.435753, 0.436585, 0.437415, 0.438244, 0.43907, 0.439894, 0.440717, 0.441537, 0.442356, 0.443172, 0.443987, 0.4448, 0.445611, 0.446421, 0.447228, 0.448033, 0.448837, 0.449639, 0.450439, 0.451237, 0.452033, 0.452828, 0.453621, 0.454412, 0.455201, 0.455988, 0.456774, 0.457558, 0.45834, 0.45912, 0.459899, 0.460675, 0.46145, 0.462224, 0.462995, 0.463765, 0.464533, 0.4653, 0.466064, 0.466827, 0.467589, 0.468348, 0.469106, 0.469863, 0.470617, 0.47137, 0.472121, 0.472871, 0.473619, 0.474365, 0.47511, 0.475853, 0.476594, 0.477334, 0.478072, 0.478809, 0.479544, 0.480277, 0.481009, 0.481739, 0.482467, 0.483194, 0.48392, 0.484644, 0.485366, 0.486087, 0.486806, 0.487523, 0.488239, 0.488954, 0.489667, 0.490378, 0.491088, 0.491797, 0.492503, 0.493209, 0.493913, 0.494615, 0.495316, 0.496015, 0.496713, 0.497409, 0.498104, 0.498798, 0.49949, 0.50018, 0.500869, 0.501557, 0.502243, 0.502927, 0.503611, 0.504292, 0.504973, 0.505652, 0.506329, 0.507005, 0.50768, 0.508353, 0.509025, 0.509695, 0.510364, 0.511032, 0.511698, 0.512363, 0.513026, 0.513688, 0.514349, 0.515008, 0.515666, 0.516323, 0.516978, 0.517632, 0.518284, 0.518935, 0.519585, 0.520233, 0.52088, 0.521526, 0.522171, 0.522814, 0.523456, 0.524096, 0.524735, 0.525373, 0.52601, 0.526645, 0.527279, 0.527911, 0.528543, 0.529173, 0.529802, 0.530429, 0.531055, 0.53168, 0.532304, 0.532926, 0.533547, 0.534167, 0.534786, 0.535403, 0.536019, 0.536634, 0.537248, 0.53786, 0.538471, 0.539081, 0.53969, 0.540297, 0.540903, 0.541508, 0.542112, 0.542714, 0.543316, 0.543916, 0.544515, 0.545113, 0.545709, 0.546304, 0.546899, 0.547491, 0.548083, 0.548674, 0.549263, 0.549851, 0.550438, 0.551024, 0.551609, 0.552193, 0.552775, 0.553356, 0.553936, 0.554515, 0.555093, 0.555669, 0.556245, 0.556819, 0.557392, 0.557964, 0.558535, 0.559105, 0.559674, 0.560241, 0.560808, 0.561373, 0.561937, 0.5625, 0.563062, 0.563623, 0.564183, 0.564741, 0.565299, 0.565855, 0.566411, 0.566965, 0.567518, 0.56807, 0.568621, 0.569171, 0.56972, 0.570268, 0.570815, 0.57136, 0.571905, 0.572448, 0.572991, 0.573532, 0.574072, 0.574612, 0.57515, 0.575687, 0.576223, 0.576758, 0.577292, 0.577825, 0.578357, 0.578888, 0.579418, 0.579947, 0.580474, 0.581001, 0.581527, 0.582052, 0.582575, 0.583098, 0.58362, 0.58414, 0.58466, 0.585179, 0.585696, 0.586213, 0.586729, 0.587243, 0.587757, 0.58827, 0.588781, 0.589292, 0.589802, 0.590311, 0.590818, 0.591325, 0.591831, 0.592336, 0.59284, 0.593342, 0.593844, 0.594345, 0.594845, 0.595344, 0.595842, 0.596339, 0.596835, 0.597331, 0.597825, 0.598318, 0.59881, 0.599302, 0.599792, 0.600282, 0.60077, 0.601258, 0.601744, 0.60223, 0.602715, 0.603199, 0.603682, 0.604164, 0.604645, 0.605125, 0.605604, 0.606083, 0.60656, 0.607037, 0.607512, 0.607987, 0.608461, 0.608933, 0.609405, 0.609877, 0.610347, 0.610816, 0.611284, 0.611752, 0.612218, 0.612684, 0.613149, 0.613613, 0.614076, 0.614538, 0.614999, 0.615459, 0.615919, 0.616378, 0.616835, 0.617292, 0.617748, 0.618203, 0.618658, 0.619111, 0.619563, 0.620015, 0.620466, 0.620916, 0.621365, 0.621813, 0.62226, 0.622707, 0.623153, 0.623597, 0.624041, 0.624485, 0.624927, 0.625368, 0.625809, 0.626249, 0.626687, 0.627125, 0.627563, 0.627999, 0.628435, 0.628869, 0.629303, 0.629736, 0.630169, 0.6306, 0.631031, 0.631461, 0.631889, 0.632318, 0.632745, 0.633171, 0.633597, 0.634022, 0.634446, 0.634869, 0.635292, 0.635714, 0.636134, 0.636554, 0.636974, 0.637392, 0.63781, 0.638227, 0.638643, 0.639058, 0.639473, 0.639886, 0.640299, 0.640711, 0.641123, 0.641533, 0.641943, 0.642352, 0.64276, 0.643167, 0.643574, 0.64398, 0.644385, 0.644789, 0.645193, 0.645596, 0.645998, 0.646399, 0.646799, 0.647199, 0.647598, 0.647996, 0.648393, 0.64879, 0.649186, 0.649581, 0.649975, 0.650369, 0.650762, 0.651154, 0.651545, 0.651936, 0.652326, 0.652715, 0.653103, 0.653491, 0.653878, 0.654264, 0.654649, 0.655034, 0.655418, 0.655801, 0.656183, 0.656565, 0.656946, 0.657326, 0.657706, 0.658085, 0.658463, 0.65884, 0.659216, 0.659592, 0.659967, 0.660342, 0.660716, 0.661089, 0.661461, 0.661832, 0.662203, 0.662573, 0.662943, 0.663311, 0.663679, 0.664047, 0.664413, 0.664779, 0.665144, 0.665508, 0.665872, 0.666235, 0.666598, 0.666959, 0.66732, 0.66768, 0.66804, 0.668399, 0.668757, 0.669114, 0.669471, 0.669827, 0.670182, 0.670537, 0.670891, 0.671244, 0.671597, 0.671948, 0.6723, 0.67265, 0.673, 0.673349, 0.673698, 0.674045, 0.674393, 0.674739, 0.675085, 0.67543, 0.675774, 0.676118, 0.676461, 0.676803, 0.677145, 0.677486, 0.677827, 0.678166, 0.678505, 0.678844, 0.679181, 0.679518, 0.679855, 0.680191, 0.680526, 0.68086, 0.681194, 0.681527, 0.681859, 0.682191, 0.682522, 0.682853, 0.683182, 0.683512, 0.68384, 0.684168, 0.684495, 0.684822, 0.685148, 0.685473, 0.685797, 0.686121, 0.686445, 0.686767, 0.687089, 0.687411, 0.687732, 0.688052, 0.688371, 0.68869, 0.689008, 0.689326, 0.689643, 0.689959, 0.690275, 0.69059, 0.690904, 0.691218, 0.691531, 0.691843, 0.692155, 0.692466, 0.692777, 0.693087, 0.693396, 0.693705, 0.694013, 0.694321, 0.694628, 0.694934, 0.69524, 0.695545, 0.695849, 0.696153, 0.696456, 0.696759, 0.697061, 0.697362, 0.697663, 0.697963, 0.698262, 0.698561, 0.698859, 0.699157, 0.699454, 0.69975, 0.700046, 0.700342, 0.700636, 0.70093, 0.701224, 0.701516, 0.701809, 0.7021, 0.702391, 0.702682, 0.702971, 0.703261, 0.703549, 0.703837, 0.704125, 0.704412, 0.704698, 0.704983, 0.705269, 0.705553, 0.705837, 0.70612, 0.706403, 0.706685, 0.706966, 0.707247, 0.707528, 0.707807, 0.708087, 0.708365, 0.708643, 0.708921, 0.709197, 0.709474, 0.709749, 0.710024, 0.710299, 0.710573, 0.710846, 0.711119, 0.711391, 0.711663, 0.711934, 0.712204, 0.712474, 0.712743, 0.713012, 0.71328, 0.713548, 0.713815, 0.714081, 0.714347, 0.714613, 0.714877, 0.715142, 0.715405, 0.715668, 0.715931, 0.716193, 0.716454, 0.716715, 0.716975, 0.717235, 0.717494, 0.717752, 0.71801, 0.718268, 0.718525, 0.718781, 0.719037, 0.719292, 0.719547, 0.719801, 0.720054, 0.720307, 0.72056, 0.720812, 0.721063, 0.721314, 0.721564, 0.721814, 0.722063, 0.722311, 0.722559, 0.722807, 0.723054, 0.7233, 0.723546, 0.723791, 0.724036, 0.72428, 0.724524, 0.724767, 0.725009, 0.725251, 0.725493, 0.725734, 0.725974, 0.726214, 0.726453, 0.726692, 0.72693, 0.727168, 0.727405, 0.727642, 0.727878, 0.728113, 0.728348, 0.728583, 0.728817, 0.72905, 0.729283, 0.729515, 0.729747, 0.729978, 0.730209, 0.730439, 0.730669, 0.730898, 0.731127, 0.731355, 0.731583, 0.73181, 0.732036, 0.732262, 0.732488, 0.732713, 0.732937, 0.733161, 0.733384, 0.733607, 0.73383, 0.734051, 0.734273, 0.734493, 0.734714, 0.734933, 0.735153, 0.735371, 0.735589, 0.735807, 0.736024, 0.736241, 0.736457, 0.736673, 0.736888, 0.737102, 0.737316, 0.73753, 0.737743, 0.737955, 0.738167, 0.738379, 0.73859, 0.7388, 0.73901, 0.73922, 0.739429, 0.739637, 0.739845, 0.740052, 0.740259, 0.740466, 0.740672, 0.740877, 0.741082, 0.741286, 0.74149, 0.741693, 0.741896, 0.742099, 0.7423, 0.742502, 0.742703, 0.742903, 0.743103, 0.743302, 0.743501, 0.743699, 0.743897, 0.744095, 0.744291, 0.744488, 0.744684, 0.744879, 0.745074, 0.745268, 0.745462, 0.745655, 0.745848, 0.746041, 0.746233, 0.746424, 0.746615, 0.746805, 0.746995, 0.747185, 0.747374, 0.747562, 0.74775, 0.747938, 0.748125, 0.748311, 0.748497, 0.748683, 0.748868, 0.749052, 0.749236, 0.74942, 0.749603, 0.749785, 0.749967, 0.750149, 0.75033, 0.750511, 0.750691, 0.750871, 0.75105, 0.751229, 0.751407, 0.751585, 0.751762, 0.751939, 0.752115, 0.752291, 0.752466, 0.752641, 0.752815, 0.752989, 0.753163, 0.753336, 0.753508, 0.75368, 0.753852, 0.754023, 0.754193, 0.754363, 0.754533, 0.754702, 0.754871, 0.755039, 0.755207, 0.755374, 0.755541, 0.755707, 0.755873, 0.756038, 0.756203, 0.756367, 0.756531, 0.756695, 0.756858, 0.75702, 0.757182, 0.757344, 0.757505, 0.757666, 0.757826, 0.757986, 0.758145, 0.758304, 0.758462, 0.75862, 0.758777, 0.758934, 0.75909, 0.759246, 0.759402, 0.759557, 0.759712, 0.759866, 0.760019, 0.760173, 0.760325, 0.760477, 0.760629, 0.760781, 0.760931, 0.761082, 0.761232, 0.761381, 0.76153, 0.761679, 0.761827, 0.761975, 0.762122, 0.762269, 0.762415, 0.762561, 0.762706, 0.762851, 0.762995, 0.763139, 0.763283, 0.763426, 0.763569, 0.763711, 0.763852, 0.763994, 0.764134, 0.764275, 0.764415, 0.764554, 0.764693, 0.764832, 0.76497, 0.765107, 0.765244, 0.765381, 0.765517, 0.765653, 0.765789, 0.765923, 0.766058, 0.766192, 0.766325, 0.766458, 0.766591, 0.766723, 0.766855, 0.766986, 0.767117, 0.767248, 0.767378, 0.767507, 0.767636, 0.767765, 0.767893, 0.768021, 0.768148, 0.768275, 0.768401, 0.768527, 0.768652, 0.768777, 0.768902, 0.769026, 0.76915, 0.769273, 0.769396, 0.769518, 0.76964, 0.769762, 0.769883, 0.770003, 0.770124, 0.770243, 0.770362, 0.770481, 0.7706, 0.770718, 0.770835, 0.770952, 0.771069, 0.771185, 0.771301, 0.771416, 0.771531, 0.771645, 0.771759, 0.771873, 0.771986, 0.772099, 0.772211, 0.772323, 0.772434, 0.772545, 0.772655, 0.772765, 0.772875, 0.772984, 0.773093, 0.773201, 0.773309, 0.773416, 0.773523, 0.77363, 0.773736, 0.773842, 0.773947, 0.774052, 0.774156, 0.77426, 0.774364, 0.774467, 0.774569, 0.774671, 0.774773, 0.774875, 0.774976, 0.775076, 0.775176, 0.775276, 0.775375, 0.775474, 0.775572, 0.77567, 0.775767, 0.775864, 0.775961, 0.776057, 0.776153, 0.776248, 0.776343, 0.776437, 0.776531, 0.776625, 0.776718, 0.776811, 0.776903, 0.776995, 0.777086, 0.777177, 0.777268, 0.777358, 0.777448, 0.777537, 0.777626, 0.777715, 0.777803, 0.77789, 0.777977, 0.778064, 0.77815, 0.778236, 0.778322, 0.778407, 0.778491, 0.778576, 0.778659, 0.778743, 0.778826, 0.778908, 0.77899, 0.779072, 0.779153, 0.779234, 0.779314, 0.779394, 0.779474, 0.779553, 0.779631, 0.77971, 0.779788, 0.779865, 0.779942, 0.780019, 0.780095, 0.78017, 0.780246, 0.780321, 0.780395, 0.780469, 0.780543, 0.780616, 0.780689, 0.780761, 0.780833, 0.780904, 0.780976, 0.781046, 0.781117, 0.781186, 0.781256, 0.781325, 0.781393, 0.781462, 0.781529, 0.781597, 0.781663, 0.78173, 0.781796, 0.781862, 0.781927, 0.781992, 0.782056, 0.78212, 0.782184, 0.782247, 0.78231, 0.782372, 0.782434, 0.782495, 0.782556, 0.782617, 0.782677, 0.782737, 0.782796, 0.782855, 0.782914, 0.782972, 0.78303, 0.783087, 0.783144, 0.783201, 0.783257, 0.783312, 0.783368, 0.783422, 0.783477, 0.783531, 0.783584, 0.783638, 0.78369, 0.783743, 0.783795, 0.783846, 0.783897, 0.783948, 0.783998, 0.784048, 0.784097, 0.784147, 0.784195, 0.784243, 0.784291, 0.784339, 0.784386, 0.784432, 0.784478, 0.784524, 0.784569, 0.784614, 0.784659, 0.784703, 0.784747, 0.78479, 0.784833, 0.784875, 0.784917, 0.784959, 0.785, 0.785041, 0.785081, 0.785121, 0.785161, 0.7852, 0.785239, 0.785277, 0.785315, 0.785352, 0.78539, 0.785426, 0.785463, 0.785498, 0.785534, 0.785569, 0.785604, 0.785638, 0.785672, 0.785705, 0.785738, 0.785771, 0.785803, 0.785835, 0.785866, 0.785897, 0.785928, 0.785958, 0.785988, 0.786017, 0.786046, 0.786074, 0.786102, 0.78613, 0.786157, 0.786184, 0.786211, 0.786237, 0.786263, 0.786288, 0.786313, 0.786337, 0.786361, 0.786385, 0.786408, 0.786431, 0.786453, 0.786475, 0.786497, 0.786518, 0.786539, 0.786559, 0.786579, 0.786599, 0.786618, 0.786637, 0.786655, 0.786673, 0.78669, 0.786707, 0.786724, 0.78674, 0.786756, 0.786772, 0.786787, 0.786802, 0.786816, 0.78683, 0.786843, 0.786856, 0.786869, 0.786881, 0.786893, 0.786904, 0.786916, 0.786926, 0.786936, 0.786946, 0.786956, 0.786965, 0.786973, 0.786981, 0.786989, 0.786997, 0.787004, 0.78701, 0.787016, 0.787022, 0.787027, 0.787032, 0.787037, 0.787041, 0.787045, 0.787048, 0.787051, 0.787054, 0.787056, 0.787057, 0.787059, 0.78706, 0.78706, 0.78706, 0.78706, 0.787059, 0.787058, 0.787057, 0.787055, 0.787052, 0.78705, 0.787047, 0.787043, 0.787039, 0.787035, 0.78703, 0.787025, 0.787019, 0.787013, 0.787007, 0.787, 0.786993, 0.786985 - }; + 0.656205, 0.656205, 0.656203, 0.656201, 0.656199, 0.656195, 0.656192, 0.656187, 0.656182, 0.656177, 0.656171, 0.656164, 0.656157, 0.656149, 0.656141, 0.656132, 0.656123, 0.656112, 0.656102, 0.656091, 0.656079, 0.656066, 0.656053, 0.65604, 0.656026, 0.656011, 0.655996, 0.65598, 0.655964, 0.655947, 0.655929, 0.655911, 0.655892, 0.655873, 0.655853, 0.655832, 0.655811, 0.65579, 0.655768, 0.655745, 0.655722, 0.655698, 0.655673, 0.655648, 0.655622, 0.655596, 0.655569, 0.655542, 0.655514, 0.655485, 0.655456, 0.655427, 0.655396, 0.655366, 0.655334, 0.655302, 0.65527, 0.655236, 0.655203, 0.655168, 0.655133, 0.655098, 0.655062, 0.655025, 0.654988, 0.65495, 0.654912, 0.654873, 0.654833, 0.654793, 0.654752, 0.654711, 0.654669, 0.654627, 0.654584, 0.65454, 0.654496, 0.654451, 0.654406, 0.65436, 0.654314, 0.654267, 0.654219, 0.654171, 0.654122, 0.654072, 0.654022, 0.653972, 0.653921, 0.653869, 0.653817, 0.653764, 0.65371, 0.653656, 0.653602, 0.653546, 0.65349, 0.653434, 0.653377, 0.653319, 0.653261, 0.653203, 0.653143, 0.653083, 0.653023, 0.652962, 0.6529, 0.652838, 0.652775, 0.652712, 0.652648, 0.652583, 0.652518, 0.652452, 0.652386, 0.652319, 0.652251, 0.652183, 0.652114, 0.652045, 0.651975, 0.651905, 0.651834, 0.651762, 0.65169, 0.651617, 0.651544, 0.65147, 0.651395, 0.65132, 0.651244, 0.651168, 0.651091, 0.651013, 0.650935, 0.650857, 0.650777, 0.650697, 0.650617, 0.650536, 0.650454, 0.650372, 0.650289, 0.650205, 0.650121, 0.650037, 0.649952, 0.649866, 0.649779, 0.649692, 0.649605, 0.649516, 0.649428, 0.649338, 0.649248, 0.649158, 0.649067, 0.648975, 0.648882, 0.648789, 0.648696, 0.648602, 0.648507, 0.648412, 0.648316, 0.648219, 0.648122, 0.648024, 0.647926, 0.647827, 0.647727, 0.647627, 0.647526, 0.647425, 0.647323, 0.64722, 0.647117, 0.647013, 0.646909, 0.646804, 0.646699, 0.646592, 0.646486, 0.646378, 0.64627, 0.646162, 0.646052, 0.645943, 0.645832, 0.645721, 0.64561, 0.645497, 0.645384, 0.645271, 0.645157, 0.645042, 0.644927, 0.644811, 0.644695, 0.644578, 0.64446, 0.644342, 0.644223, 0.644103, 0.643983, 0.643862, 0.643741, 0.643619, 0.643496, 0.643373, 0.643249, 0.643125, 0.643, 0.642874, 0.642748, 0.642621, 0.642493, 0.642365, 0.642236, 0.642107, 0.641977, 0.641847, 0.641715, 0.641583, 0.641451, 0.641318, 0.641184, 0.64105, 0.640915, 0.640779, 0.640643, 0.640507, 0.640369, 0.640231, 0.640092, 0.639953, 0.639813, 0.639673, 0.639532, 0.63939, 0.639247, 0.639104, 0.638961, 0.638816, 0.638671, 0.638526, 0.63838, 0.638233, 0.638085, 0.637937, 0.637789, 0.637639, 0.637489, 0.637339, 0.637188, 0.637036, 0.636883, 0.63673, 0.636576, 0.636422, 0.636267, 0.636111, 0.635955, 0.635798, 0.635641, 0.635482, 0.635324, 0.635164, 0.635004, 0.634843, 0.634682, 0.63452, 0.634357, 0.634194, 0.63403, 0.633865, 0.6337, 0.633534, 0.633368, 0.633201, 0.633033, 0.632864, 0.632695, 0.632525, 0.632355, 0.632184, 0.632012, 0.63184, 0.631667, 0.631493, 0.631319, 0.631144, 0.630969, 0.630792, 0.630615, 0.630438, 0.63026, 0.630081, 0.629901, 0.629721, 0.62954, 0.629359, 0.629177, 0.628994, 0.62881, 0.628626, 0.628442, 0.628256, 0.62807, 0.627883, 0.627696, 0.627508, 0.627319, 0.62713, 0.62694, 0.626749, 0.626557, 0.626365, 0.626173, 0.625979, 0.625785, 0.625591, 0.625395, 0.625199, 0.625002, 0.624805, 0.624607, 0.624408, 0.624209, 0.624008, 0.623808, 0.623606, 0.623404, 0.623201, 0.622998, 0.622794, 0.622589, 0.622383, 0.622177, 0.62197, 0.621763, 0.621554, 0.621346, 0.621136, 0.620926, 0.620715, 0.620503, 0.620291, 0.620078, 0.619864, 0.619649, 0.619434, 0.619219, 0.619002, 0.618785, 0.618567, 0.618348, 0.618129, 0.617909, 0.617689, 0.617467, 0.617245, 0.617023, 0.616799, 0.616575, 0.61635, 0.616125, 0.615898, 0.615671, 0.615444, 0.615216, 0.614986, 0.614757, 0.614526, 0.614295, 0.614063, 0.613831, 0.613597, 0.613363, 0.613129, 0.612893, 0.612657, 0.61242, 0.612183, 0.611945, 0.611706, 0.611466, 0.611225, 0.610984, 0.610742, 0.6105, 0.610257, 0.610013, 0.609768, 0.609522, 0.609276, 0.609029, 0.608782, 0.608533, 0.608284, 0.608034, 0.607784, 0.607533, 0.607281, 0.607028, 0.606774, 0.60652, 0.606265, 0.60601, 0.605753, 0.605496, 0.605238, 0.60498, 0.60472, 0.60446, 0.604199, 0.603938, 0.603675, 0.603412, 0.603148, 0.602884, 0.602618, 0.602352, 0.602086, 0.601818, 0.60155, 0.601281, 0.601011, 0.60074, 0.600469, 0.600197, 0.599924, 0.59965, 0.599376, 0.599101, 0.598825, 0.598548, 0.598271, 0.597993, 0.597714, 0.597434, 0.597153, 0.596872, 0.59659, 0.596307, 0.596024, 0.595739, 0.595454, 0.595168, 0.594882, 0.594594, 0.594306, 0.594017, 0.593727, 0.593437, 0.593145, 0.592853, 0.59256, 0.592267, 0.591972, 0.591677, 0.591381, 0.591084, 0.590786, 0.590488, 0.590189, 0.589888, 0.589588, 0.589286, 0.588984, 0.58868, 0.588376, 0.588071, 0.587766, 0.587459, 0.587152, 0.586844, 0.586535, 0.586226, 0.585915, 0.585604, 0.585292, 0.584979, 0.584665, 0.58435, 0.584035, 0.583719, 0.583402, 0.583084, 0.582765, 0.582446, 0.582125, 0.581804, 0.581482, 0.581159, 0.580836, 0.580511, 0.580186, 0.57986, 0.579533, 0.579205, 0.578876, 0.578547, 0.578217, 0.577885, 0.577553, 0.577221, 0.576887, 0.576552, 0.576217, 0.575881, 0.575543, 0.575205, 0.574867, 0.574527, 0.574186, 0.573845, 0.573503, 0.57316, 0.572816, 0.572471, 0.572125, 0.571778, 0.571431, 0.571083, 0.570733, 0.570383, 0.570032, 0.56968, 0.569328, 0.568974, 0.56862, 0.568264, 0.567908, 0.567551, 0.567193, 0.566834, 0.566474, 0.566113, 0.565752, 0.565389, 0.565026, 0.564662, 0.564296, 0.56393, 0.563563, 0.563195, 0.562827, 0.562457, 0.562086, 0.561715, 0.561342, 0.560969, 0.560595, 0.560219, 0.559843, 0.559466, 0.559088, 0.558709, 0.558329, 0.557949, 0.557567, 0.557184, 0.556801, 0.556416, 0.556031, 0.555645, 0.555257, 0.554869, 0.55448, 0.55409, 0.553699, 0.553307, 0.552914, 0.55252, 0.552125, 0.551729, 0.551332, 0.550934, 0.550536, 0.550136, 0.549735, 0.549334, 0.548931, 0.548527, 0.548123, 0.547717, 0.547311, 0.546903, 0.546495, 0.546085, 0.545675, 0.545263, 0.544851, 0.544438, 0.544023, 0.543608, 0.543191, 0.542774, 0.542356, 0.541936, 0.541516, 0.541094, 0.540672, 0.540248, 0.539824, 0.539399, 0.538972, 0.538545, 0.538116, 0.537686, 0.537256, 0.536824, 0.536392, 0.535958, 0.535523, 0.535088, 0.534651, 0.534213, 0.533774, 0.533334, 0.532893, 0.532451, 0.532008, 0.531564, 0.531119, 0.530672, 0.530225, 0.529777, 0.529327, 0.528877, 0.528425, 0.527973, 0.527519, 0.527064, 0.526608, 0.526151, 0.525693, 0.525234, 0.524774, 0.524312, 0.52385, 0.523387, 0.522922, 0.522456, 0.521989, 0.521521, 0.521052, 0.520582, 0.520111, 0.519639, 0.519165, 0.51869, 0.518215, 0.517738, 0.51726, 0.516781, 0.5163, 0.515819, 0.515336, 0.514853, 0.514368, 0.513882, 0.513395, 0.512906, 0.512417, 0.511926, 0.511434, 0.510941, 0.510447, 0.509952, 0.509455, 0.508958, 0.508459, 0.507959, 0.507458, 0.506955, 0.506452, 0.505947, 0.505441, 0.504934, 0.504426, 0.503916, 0.503405, 0.502893, 0.50238, 0.501866, 0.50135, 0.500833, 0.500315, 0.499796, 0.499275, 0.498753, 0.49823, 0.497706, 0.49718, 0.496654, 0.496126, 0.495596, 0.495066, 0.494534, 0.494001, 0.493467, 0.492931, 0.492394, 0.491856, 0.491317, 0.490776, 0.490234, 0.489691, 0.489146, 0.4886, 0.488053, 0.487504, 0.486955, 0.486403, 0.485851, 0.485297, 0.484742, 0.484186, 0.483628, 0.483069, 0.482509, 0.481947, 0.481384, 0.480819, 0.480254, 0.479686, 0.479118, 0.478548, 0.477977, 0.477404, 0.47683, 0.476255, 0.475678, 0.4751, 0.474521, 0.47394, 0.473358, 0.472774, 0.472189, 0.471602, 0.471014, 0.470425, 0.469834, 0.469242, 0.468649, 0.468054, 0.467457, 0.466859, 0.46626, 0.465659, 0.465057, 0.464453, 0.463848, 0.463241, 0.462633, 0.462024, 0.461413, 0.4608, 0.460186, 0.45957, 0.458953, 0.458335, 0.457715, 0.457093, 0.45647, 0.455846, 0.45522, 0.454592, 0.453963, 0.453332, 0.4527, 0.452066, 0.451431, 0.450794, 0.450156, 0.449516, 0.448874, 0.448231, 0.447586, 0.44694, 0.446292, 0.445643, 0.444991, 0.444339, 0.443684, 0.443029, 0.442371, 0.441712, 0.441051, 0.440389, 0.439725, 0.439059, 0.438391, 0.437722, 0.437052, 0.436379, 0.435705, 0.43503, 0.434352, 0.433673, 0.432993, 0.43231, 0.431626, 0.43094, 0.430252, 0.429563, 0.428872, 0.428179, 0.427485, 0.426789, 0.426091, 0.425391, 0.424689, 0.423986, 0.423281, 0.422574, 0.421865, 0.421155, 0.420443, 0.419729, 0.419013, 0.418295, 0.417576, 0.416854, 0.416131, 0.415406, 0.414679, 0.413951, 0.41322, 0.412488, 0.411753, 0.411017, 0.410279, 0.409539, 0.408797, 0.408054, 0.407308, 0.40656, 0.405811, 0.405059, 0.404306, 0.403551, 0.402793, 0.402034, 0.401273, 0.400509, 0.399744, 0.398977, 0.398208, 0.397437, 0.396663, 0.395888, 0.395111, 0.394332, 0.39355, 0.392767, 0.391981, 0.391194, 0.390404, 0.389612, 0.388819, 0.388023, 0.387225, 0.386425, 0.385623, 0.384818, 0.384012, 0.383203, 0.382392, 0.381579, 0.380764, 0.379947, 0.379127, 0.378306, 0.377482, 0.376656, 0.375827, 0.374997, 0.374164, 0.373329, 0.372491, 0.371652, 0.37081, 0.369966, 0.369119, 0.36827, 0.367419, 0.366566, 0.36571, 0.364852, 0.363992, 0.363129, 0.362264, 0.361396, 0.360526, 0.359654, 0.358779, 0.357902, 0.357022, 0.35614, 0.355256, 0.354369, 0.353479, 0.352588, 0.351693, 0.350796, 0.349897, 0.348995, 0.34809, 0.347183, 0.346274, 0.345361, 0.344447, 0.343529, 0.342609, 0.341687, 0.340762, 0.339834, 0.338903, 0.33797, 0.337034, 0.336096, 0.335155, 0.334211, 0.333264, 0.332315, 0.331363, 0.330408, 0.32945, 0.32849, 0.327526, 0.32656, 0.325592, 0.32462, 0.323645, 0.322668, 0.321688, 0.320705, 0.319718, 0.318729, 0.317738, 0.316743, 0.315745, 0.314744, 0.31374, 0.312734, 0.311724, 0.310711, 0.309695, 0.308676, 0.307654, 0.306629, 0.305601, 0.30457, 0.303535, 0.302498, 0.301457, 0.300413, 0.299366, 0.298316, 0.297262, 0.296205, 0.295145, 0.294082, 0.293016, 0.291946, 0.290872, 0.289796, 0.288716, 0.287633, 0.286546, 0.285456, 0.284362, 0.283265, 0.282165, 0.281061, 0.279953, 0.278842, 0.277728, 0.27661, 0.275488, 0.274363, 0.273234, 0.272102, 0.270965, 0.269826, 0.268682, 0.267535, 0.266384, 0.265229, 0.264071, 0.262909, 0.261742, 0.260573, 0.259399, 0.258221, 0.25704, 0.255854, 0.254665, 0.253471, 0.252274, 0.251072, 0.249867, 0.248658, 0.247444, 0.246226, 0.245005, 0.243779, 0.242548, 0.241314, 0.240076, 0.238833, 0.237586, 0.236334, 0.235079, 0.233819, 0.232554, 0.231285, 0.230012, 0.228734, 0.227452, 0.226165, 0.224874, 0.223578, 0.222278, 0.220973, 0.219663, 0.218349, 0.21703, 0.215706, 0.214377, 0.213044, 0.211706, 0.210363, 0.209015, 0.207662, 0.206304, 0.204941, 0.203574, 0.202201, 0.200823, 0.19944, 0.198052, 0.196658, 0.19526, 0.193856, 0.192447, 0.191032, 0.189612, 0.188187, 0.186757, 0.18532, 0.183879, 0.182432, 0.180979, 0.179521, 0.178057, 0.176587, 0.175112, 0.173631, 0.172144, 0.170651, 0.169152, 0.167647, 0.166137, 0.16462, 0.163097, 0.161568, 0.160033, 0.158492, 0.156945, 0.155391, 0.153831, 0.152265, 0.150692, 0.149113, 0.147527, 0.145934, 0.144335, 0.14273, 0.141117, 0.139498, 0.137872, 0.136239, 0.134599, 0.132953, 0.131299, 0.129638, 0.12797, 0.126294, 0.124612, 0.122922, 0.121225, 0.11952, 0.117808, 0.116088, 0.114361, 0.112626, 0.110883, 0.109133, 0.107374, 0.105608, 0.103834, 0.102051, 0.100261, 0.098462, 0.096655, 0.0948397, 0.0930159, 0.0911837, 0.0893428, 0.0874934, 0.0856353, 0.0837683, 0.0818925, 0.0800078, 0.078114, 0.0762112, 0.0742992, 0.0723779, 0.0704472, 0.0685071, 0.0665576, 0.0645984, 0.0626295, 0.0606508, 0.0586622, 0.0566637, 0.0546552, 0.0526364, 0.0506075, 0.0485681, 0.0465183, 0.044458, 0.042387, 0.0403053, 0.0382127, 0.0361092, 0.0339945, 0.0318687, 0.0297316, 0.0275831, 0.025423, 0.0232513, 0.0210678, 0.0188725, 0.0166652, 0.0144457, 0.0122139, 0.00996983, 0.0077132, 0.00544393, 0.00316187, 0.000866888, -0.00144115, -0.00376238, -0.00609696, -0.00844503, -0.0108067, -0.0131822, -0.0155717, -0.0179752, -0.020393, -0.0228252, -0.0252721, -0.0277336, -0.0302101, -0.0327017, -0.0352085, -0.0377308, -0.0402688, -0.0428226, -0.0453923, -0.0479783, -0.0505807, -0.0531997, -0.0558355, -0.0584883, -0.0611583, -0.0638458, -0.0665509, -0.0692739, -0.0720151, -0.0747746, -0.0775526, -0.0803495, -0.0831655, -0.0860007, -0.0888556, -0.0917303, -0.0946252, -0.0975404, -0.100476, -0.103433, -0.106411, -0.109411, -0.112432, -0.115476, -0.118542, -0.121631, -0.124742, -0.127878, -0.131037, -0.13422, -0.137428, -0.140661, -0.143919, -0.147203, -0.150512, -0.153848, -0.157211, -0.160601, -0.164019, -0.167466, -0.17094, -0.174444, -0.177977, -0.181541, -0.185135, -0.18876, -0.192416, -0.196105, -0.199826, -0.203581, -0.207369, -0.211192, -0.21505, -0.218944, -0.222874, -0.226841, -0.230845, -0.234888, -0.238971, -0.243093, -0.247255, -0.25146, -0.255706, -0.259996, -0.264329, -0.268708, -0.273132, -0.277603, -0.282121, -0.286689, -0.291306, -0.295974, -0.300694, -0.305467, -0.310294, -0.315177, -0.320116, -0.325114, -0.330171, -0.335289, -0.34047, -0.345714, -0.351024, -0.356401, -0.361846, -0.367362, -0.372951, -0.378613, -0.384352, -0.390169, -0.396067, -0.402047, -0.408112, -0.414264, -0.420507, -0.426842, -0.433272, -0.4398, -0.446429, -0.453163, -0.460005, -0.466957, -0.474024, -0.48121, -0.488518, -0.495953, -0.503519, -0.511222, -0.519064, -0.527053, -0.535194, -0.543491, -0.551952, -0.560583, -0.569391, -0.578384, -0.587568, -0.596953, -0.606546, -0.616359, -0.626401, -0.636682, -0.647215, -0.658012, -0.669087, -0.680453, -0.692128, -0.704127, -0.71647, -0.729176, -0.742268, -0.755769, -0.769706, -0.784108, -0.799008, -0.814439, -0.830442, -0.84706, -0.864343, -0.882346, -0.901131, -0.920768, -0.94134, -0.962939, -0.985673, -1.00967, -1.03507, -1.06205, -1.09083, -1.12166, -1.15485, -1.1908, -1.22999, -1.27309, -1.32095, -1.37475, -1.43618, -1.50777, -1.59354, -1.70056, -1.84291, -2.05612, -2.49254, -2.62808, -2.10088, -1.86965, -1.71954, -1.60819, -1.51963, -1.44609, -1.38321, -1.32829, -1.27953, -1.2357, -1.19588, -1.1594, -1.12574, -1.0945, -1.06536, -1.03804, -1.01234, -0.988073, -0.965086, -0.943253, -0.922462, -0.902618, -0.883639, -0.865453, -0.847996, -0.831211, -0.815049, -0.799465, -0.784419, -0.769876, -0.755802, -0.742168, -0.728948, -0.716116, -0.703652, -0.691534, -0.679744, -0.668264, -0.657079, -0.646173, -0.635533, -0.625147, -0.615002, -0.605088, -0.595394, -0.585911, -0.576629, -0.567541, -0.558638, -0.549913, -0.54136, -0.53297, -0.524739, -0.516661, -0.508729, -0.500938, -0.493285, -0.485763, -0.478369, -0.471097, -0.463945, -0.456908, -0.449983, -0.443166, -0.436454, -0.429844, -0.423332, -0.416915, -0.410592, -0.404359, -0.398214, -0.392154, -0.386177, -0.380281, -0.374463, -0.368722, -0.363055, -0.357461, -0.351938, -0.346484, -0.341097, -0.335776, -0.330519, -0.325324, -0.320191, -0.315117, -0.310102, -0.305144, -0.300241, -0.295393, -0.290598, -0.285855, -0.281163, -0.276521, -0.271928, -0.267383, -0.262885, -0.258433, -0.254025, -0.249662, -0.245342, -0.241064, -0.236828, -0.232633, -0.228478, -0.224362, -0.220284, -0.216244, -0.212242, -0.208276, -0.204345, -0.20045, -0.196589, -0.192762, -0.188969, -0.185208, -0.18148, -0.177783, -0.174117, -0.170482, -0.166877, -0.163302, -0.159756, -0.156238, -0.152749, -0.149287, -0.145853, -0.142446, -0.139065, -0.13571, -0.132381, -0.129078, -0.125799, -0.122545, -0.119315, -0.116108, -0.112926, -0.109766, -0.10663, -0.103515, -0.100423, -0.0973533, -0.0943048, -0.0912775, -0.0882713, -0.0852857, -0.0823205, -0.0793756, -0.0764504, -0.0735449, -0.0706588, -0.0677917, -0.0649435, -0.062114, -0.0593028, -0.0565097, -0.0537346, -0.0509771, -0.0482371, -0.0455144, -0.0428087, -0.0401198, -0.0374476, -0.0347918, -0.0321522, -0.0295287, -0.0269209, -0.0243289, -0.0217523, -0.019191, -0.0166449, -0.0141136, -0.0115972, -0.00909533, -0.00660792, -0.00413478, -0.00167576, 0.000769298, 0.00320055, 0.00561815, 0.00802225, 0.010413, 0.0127905, 0.015155, 0.0175065, 0.0198452, 0.0221713, 0.0244848, 0.026786, 0.0290749, 0.0313516, 0.0336163, 0.0358691, 0.0381102, 0.0403396, 0.0425575, 0.0447639, 0.0469591, 0.049143, 0.0513159, 0.0534778, 0.0556288, 0.0577691, 0.0598987, 0.0620178, 0.0641264, 0.0662246, 0.0683126, 0.0703904, 0.0724582, 0.074516, 0.0765639, 0.078602, 0.0806304, 0.0826493, 0.0846586, 0.0866584, 0.0886489, 0.0906302, 0.0926022, 0.0945652, 0.0965191, 0.0984642, 0.1004, 0.102328, 0.104246, 0.106156, 0.108058, 0.109951, 0.111835, 0.113711, 0.115579, 0.117439, 0.119291, 0.121134, 0.12297, 0.124797, 0.126617, 0.128429, 0.130233, 0.13203, 0.133819, 0.1356, 0.137374, 0.13914, 0.140899, 0.142651, 0.144396, 0.146133, 0.147863, 0.149586, 0.151302, 0.153011, 0.154713, 0.156409, 0.158097, 0.159779, 0.161454, 0.163122, 0.164784, 0.166439, 0.168087, 0.169729, 0.171365, 0.172994, 0.174617, 0.176234, 0.177844, 0.179449, 0.181047, 0.182639, 0.184225, 0.185805, 0.187379, 0.188947, 0.190509, 0.192065, 0.193616, 0.195161, 0.1967, 0.198233, 0.199761, 0.201283, 0.202799, 0.20431, 0.205816, 0.207316, 0.208811, 0.2103, 0.211784, 0.213262, 0.214736, 0.216204, 0.217667, 0.219124, 0.220577, 0.222024, 0.223467, 0.224904, 0.226336, 0.227764, 0.229186, 0.230604, 0.232016, 0.233424, 0.234827, 0.236225, 0.237619, 0.239007, 0.240391, 0.241771, 0.243145, 0.244515, 0.245881, 0.247242, 0.248598, 0.24995, 0.251297, 0.25264, 0.253979, 0.255313, 0.256643, 0.257968, 0.259289, 0.260606, 0.261919, 0.263227, 0.264531, 0.265831, 0.267127, 0.268419, 0.269706, 0.27099, 0.272269, 0.273545, 0.274816, 0.276083, 0.277346, 0.278606, 0.279861, 0.281113, 0.28236, 0.283604, 0.284844, 0.28608, 0.287313, 0.288541, 0.289766, 0.290987, 0.292204, 0.293418, 0.294628, 0.295834, 0.297037, 0.298236, 0.299431, 0.300623, 0.301811, 0.302996, 0.304177, 0.305355, 0.306529, 0.3077, 0.308867, 0.310031, 0.311191, 0.312348, 0.313502, 0.314652, 0.315799, 0.316943, 0.318083, 0.31922, 0.320354, 0.321485, 0.322612, 0.323736, 0.324857, 0.325974, 0.327089, 0.3282, 0.329308, 0.330413, 0.331515, 0.332614, 0.333709, 0.334802, 0.335892, 0.336978, 0.338062, 0.339142, 0.34022, 0.341294, 0.342366, 0.343434, 0.3445, 0.345563, 0.346622, 0.347679, 0.348733, 0.349784, 0.350833, 0.351878, 0.352921, 0.353961, 0.354998, 0.356032, 0.357063, 0.358092, 0.359118, 0.360141, 0.361161, 0.362179, 0.363194, 0.364206, 0.365216, 0.366223, 0.367227, 0.368229, 0.369228, 0.370225, 0.371218, 0.37221, 0.373198, 0.374184, 0.375168, 0.376149, 0.377127, 0.378103, 0.379076, 0.380047, 0.381016, 0.381981, 0.382945, 0.383906, 0.384864, 0.38582, 0.386774, 0.387725, 0.388674, 0.38962, 0.390564, 0.391506, 0.392445, 0.393382, 0.394316, 0.395249, 0.396179, 0.397106, 0.398031, 0.398954, 0.399875, 0.400793, 0.401709, 0.402623, 0.403534, 0.404444, 0.405351, 0.406256, 0.407158, 0.408058, 0.408957, 0.409853, 0.410746, 0.411638, 0.412528, 0.413415, 0.4143, 0.415183, 0.416064, 0.416943, 0.417819, 0.418694, 0.419566, 0.420436, 0.421305, 0.422171, 0.423035, 0.423897, 0.424757, 0.425615, 0.426471, 0.427325, 0.428176, 0.429026, 0.429874, 0.43072, 0.431564, 0.432406, 0.433245, 0.434083, 0.434919, 0.435753, 0.436585, 0.437415, 0.438244, 0.43907, 0.439894, 0.440717, 0.441537, 0.442356, 0.443172, 0.443987, 0.4448, 0.445611, 0.446421, 0.447228, 0.448033, 0.448837, 0.449639, 0.450439, 0.451237, 0.452033, 0.452828, 0.453621, 0.454412, 0.455201, 0.455988, 0.456774, 0.457558, 0.45834, 0.45912, 0.459899, 0.460675, 0.46145, 0.462224, 0.462995, 0.463765, 0.464533, 0.4653, 0.466064, 0.466827, 0.467589, 0.468348, 0.469106, 0.469863, 0.470617, 0.47137, 0.472121, 0.472871, 0.473619, 0.474365, 0.47511, 0.475853, 0.476594, 0.477334, 0.478072, 0.478809, 0.479544, 0.480277, 0.481009, 0.481739, 0.482467, 0.483194, 0.48392, 0.484644, 0.485366, 0.486087, 0.486806, 0.487523, 0.488239, 0.488954, 0.489667, 0.490378, 0.491088, 0.491797, 0.492503, 0.493209, 0.493913, 0.494615, 0.495316, 0.496015, 0.496713, 0.497409, 0.498104, 0.498798, 0.49949, 0.50018, 0.500869, 0.501557, 0.502243, 0.502927, 0.503611, 0.504292, 0.504973, 0.505652, 0.506329, 0.507005, 0.50768, 0.508353, 0.509025, 0.509695, 0.510364, 0.511032, 0.511698, 0.512363, 0.513026, 0.513688, 0.514349, 0.515008, 0.515666, 0.516323, 0.516978, 0.517632, 0.518284, 0.518935, 0.519585, 0.520233, 0.52088, 0.521526, 0.522171, 0.522814, 0.523456, 0.524096, 0.524735, 0.525373, 0.52601, 0.526645, 0.527279, 0.527911, 0.528543, 0.529173, 0.529802, 0.530429, 0.531055, 0.53168, 0.532304, 0.532926, 0.533547, 0.534167, 0.534786, 0.535403, 0.536019, 0.536634, 0.537248, 0.53786, 0.538471, 0.539081, 0.53969, 0.540297, 0.540903, 0.541508, 0.542112, 0.542714, 0.543316, 0.543916, 0.544515, 0.545113, 0.545709, 0.546304, 0.546899, 0.547491, 0.548083, 0.548674, 0.549263, 0.549851, 0.550438, 0.551024, 0.551609, 0.552193, 0.552775, 0.553356, 0.553936, 0.554515, 0.555093, 0.555669, 0.556245, 0.556819, 0.557392, 0.557964, 0.558535, 0.559105, 0.559674, 0.560241, 0.560808, 0.561373, 0.561937, 0.5625, 0.563062, 0.563623, 0.564183, 0.564741, 0.565299, 0.565855, 0.566411, 0.566965, 0.567518, 0.56807, 0.568621, 0.569171, 0.56972, 0.570268, 0.570815, 0.57136, 0.571905, 0.572448, 0.572991, 0.573532, 0.574072, 0.574612, 0.57515, 0.575687, 0.576223, 0.576758, 0.577292, 0.577825, 0.578357, 0.578888, 0.579418, 0.579947, 0.580474, 0.581001, 0.581527, 0.582052, 0.582575, 0.583098, 0.58362, 0.58414, 0.58466, 0.585179, 0.585696, 0.586213, 0.586729, 0.587243, 0.587757, 0.58827, 0.588781, 0.589292, 0.589802, 0.590311, 0.590818, 0.591325, 0.591831, 0.592336, 0.59284, 0.593342, 0.593844, 0.594345, 0.594845, 0.595344, 0.595842, 0.596339, 0.596835, 0.597331, 0.597825, 0.598318, 0.59881, 0.599302, 0.599792, 0.600282, 0.60077, 0.601258, 0.601744, 0.60223, 0.602715, 0.603199, 0.603682, 0.604164, 0.604645, 0.605125, 0.605604, 0.606083, 0.60656, 0.607037, 0.607512, 0.607987, 0.608461, 0.608933, 0.609405, 0.609877, 0.610347, 0.610816, 0.611284, 0.611752, 0.612218, 0.612684, 0.613149, 0.613613, 0.614076, 0.614538, 0.614999, 0.615459, 0.615919, 0.616378, 0.616835, 0.617292, 0.617748, 0.618203, 0.618658, 0.619111, 0.619563, 0.620015, 0.620466, 0.620916, 0.621365, 0.621813, 0.62226, 0.622707, 0.623153, 0.623597, 0.624041, 0.624485, 0.624927, 0.625368, 0.625809, 0.626249, 0.626687, 0.627125, 0.627563, 0.627999, 0.628435, 0.628869, 0.629303, 0.629736, 0.630169, 0.6306, 0.631031, 0.631461, 0.631889, 0.632318, 0.632745, 0.633171, 0.633597, 0.634022, 0.634446, 0.634869, 0.635292, 0.635714, 0.636134, 0.636554, 0.636974, 0.637392, 0.63781, 0.638227, 0.638643, 0.639058, 0.639473, 0.639886, 0.640299, 0.640711, 0.641123, 0.641533, 0.641943, 0.642352, 0.64276, 0.643167, 0.643574, 0.64398, 0.644385, 0.644789, 0.645193, 0.645596, 0.645998, 0.646399, 0.646799, 0.647199, 0.647598, 0.647996, 0.648393, 0.64879, 0.649186, 0.649581, 0.649975, 0.650369, 0.650762, 0.651154, 0.651545, 0.651936, 0.652326, 0.652715, 0.653103, 0.653491, 0.653878, 0.654264, 0.654649, 0.655034, 0.655418, 0.655801, 0.656183, 0.656565, 0.656946, 0.657326, 0.657706, 0.658085, 0.658463, 0.65884, 0.659216, 0.659592, 0.659967, 0.660342, 0.660716, 0.661089, 0.661461, 0.661832, 0.662203, 0.662573, 0.662943, 0.663311, 0.663679, 0.664047, 0.664413, 0.664779, 0.665144, 0.665508, 0.665872, 0.666235, 0.666598, 0.666959, 0.66732, 0.66768, 0.66804, 0.668399, 0.668757, 0.669114, 0.669471, 0.669827, 0.670182, 0.670537, 0.670891, 0.671244, 0.671597, 0.671948, 0.6723, 0.67265, 0.673, 0.673349, 0.673698, 0.674045, 0.674393, 0.674739, 0.675085, 0.67543, 0.675774, 0.676118, 0.676461, 0.676803, 0.677145, 0.677486, 0.677827, 0.678166, 0.678505, 0.678844, 0.679181, 0.679518, 0.679855, 0.680191, 0.680526, 0.68086, 0.681194, 0.681527, 0.681859, 0.682191, 0.682522, 0.682853, 0.683182, 0.683512, 0.68384, 0.684168, 0.684495, 0.684822, 0.685148, 0.685473, 0.685797, 0.686121, 0.686445, 0.686767, 0.687089, 0.687411, 0.687732, 0.688052, 0.688371, 0.68869, 0.689008, 0.689326, 0.689643, 0.689959, 0.690275, 0.69059, 0.690904, 0.691218, 0.691531, 0.691843, 0.692155, 0.692466, 0.692777, 0.693087, 0.693396, 0.693705, 0.694013, 0.694321, 0.694628, 0.694934, 0.69524, 0.695545, 0.695849, 0.696153, 0.696456, 0.696759, 0.697061, 0.697362, 0.697663, 0.697963, 0.698262, 0.698561, 0.698859, 0.699157, 0.699454, 0.69975, 0.700046, 0.700342, 0.700636, 0.70093, 0.701224, 0.701516, 0.701809, 0.7021, 0.702391, 0.702682, 0.702971, 0.703261, 0.703549, 0.703837, 0.704125, 0.704412, 0.704698, 0.704983, 0.705269, 0.705553, 0.705837, 0.70612, 0.706403, 0.706685, 0.706966, 0.707247, 0.707528, 0.707807, 0.708087, 0.708365, 0.708643, 0.708921, 0.709197, 0.709474, 0.709749, 0.710024, 0.710299, 0.710573, 0.710846, 0.711119, 0.711391, 0.711663, 0.711934, 0.712204, 0.712474, 0.712743, 0.713012, 0.71328, 0.713548, 0.713815, 0.714081, 0.714347, 0.714613, 0.714877, 0.715142, 0.715405, 0.715668, 0.715931, 0.716193, 0.716454, 0.716715, 0.716975, 0.717235, 0.717494, 0.717752, 0.71801, 0.718268, 0.718525, 0.718781, 0.719037, 0.719292, 0.719547, 0.719801, 0.720054, 0.720307, 0.72056, 0.720812, 0.721063, 0.721314, 0.721564, 0.721814, 0.722063, 0.722311, 0.722559, 0.722807, 0.723054, 0.7233, 0.723546, 0.723791, 0.724036, 0.72428, 0.724524, 0.724767, 0.725009, 0.725251, 0.725493, 0.725734, 0.725974, 0.726214, 0.726453, 0.726692, 0.72693, 0.727168, 0.727405, 0.727642, 0.727878, 0.728113, 0.728348, 0.728583, 0.728817, 0.72905, 0.729283, 0.729515, 0.729747, 0.729978, 0.730209, 0.730439, 0.730669, 0.730898, 0.731127, 0.731355, 0.731583, 0.73181, 0.732036, 0.732262, 0.732488, 0.732713, 0.732937, 0.733161, 0.733384, 0.733607, 0.73383, 0.734051, 0.734273, 0.734493, 0.734714, 0.734933, 0.735153, 0.735371, 0.735589, 0.735807, 0.736024, 0.736241, 0.736457, 0.736673, 0.736888, 0.737102, 0.737316, 0.73753, 0.737743, 0.737955, 0.738167, 0.738379, 0.73859, 0.7388, 0.73901, 0.73922, 0.739429, 0.739637, 0.739845, 0.740052, 0.740259, 0.740466, 0.740672, 0.740877, 0.741082, 0.741286, 0.74149, 0.741693, 0.741896, 0.742099, 0.7423, 0.742502, 0.742703, 0.742903, 0.743103, 0.743302, 0.743501, 0.743699, 0.743897, 0.744095, 0.744291, 0.744488, 0.744684, 0.744879, 0.745074, 0.745268, 0.745462, 0.745655, 0.745848, 0.746041, 0.746233, 0.746424, 0.746615, 0.746805, 0.746995, 0.747185, 0.747374, 0.747562, 0.74775, 0.747938, 0.748125, 0.748311, 0.748497, 0.748683, 0.748868, 0.749052, 0.749236, 0.74942, 0.749603, 0.749785, 0.749967, 0.750149, 0.75033, 0.750511, 0.750691, 0.750871, 0.75105, 0.751229, 0.751407, 0.751585, 0.751762, 0.751939, 0.752115, 0.752291, 0.752466, 0.752641, 0.752815, 0.752989, 0.753163, 0.753336, 0.753508, 0.75368, 0.753852, 0.754023, 0.754193, 0.754363, 0.754533, 0.754702, 0.754871, 0.755039, 0.755207, 0.755374, 0.755541, 0.755707, 0.755873, 0.756038, 0.756203, 0.756367, 0.756531, 0.756695, 0.756858, 0.75702, 0.757182, 0.757344, 0.757505, 0.757666, 0.757826, 0.757986, 0.758145, 0.758304, 0.758462, 0.75862, 0.758777, 0.758934, 0.75909, 0.759246, 0.759402, 0.759557, 0.759712, 0.759866, 0.760019, 0.760173, 0.760325, 0.760477, 0.760629, 0.760781, 0.760931, 0.761082, 0.761232, 0.761381, 0.76153, 0.761679, 0.761827, 0.761975, 0.762122, 0.762269, 0.762415, 0.762561, 0.762706, 0.762851, 0.762995, 0.763139, 0.763283, 0.763426, 0.763569, 0.763711, 0.763852, 0.763994, 0.764134, 0.764275, 0.764415, 0.764554, 0.764693, 0.764832, 0.76497, 0.765107, 0.765244, 0.765381, 0.765517, 0.765653, 0.765789, 0.765923, 0.766058, 0.766192, 0.766325, 0.766458, 0.766591, 0.766723, 0.766855, 0.766986, 0.767117, 0.767248, 0.767378, 0.767507, 0.767636, 0.767765, 0.767893, 0.768021, 0.768148, 0.768275, 0.768401, 0.768527, 0.768652, 0.768777, 0.768902, 0.769026, 0.76915, 0.769273, 0.769396, 0.769518, 0.76964, 0.769762, 0.769883, 0.770003, 0.770124, 0.770243, 0.770362, 0.770481, 0.7706, 0.770718, 0.770835, 0.770952, 0.771069, 0.771185, 0.771301, 0.771416, 0.771531, 0.771645, 0.771759, 0.771873, 0.771986, 0.772099, 0.772211, 0.772323, 0.772434, 0.772545, 0.772655, 0.772765, 0.772875, 0.772984, 0.773093, 0.773201, 0.773309, 0.773416, 0.773523, 0.77363, 0.773736, 0.773842, 0.773947, 0.774052, 0.774156, 0.77426, 0.774364, 0.774467, 0.774569, 0.774671, 0.774773, 0.774875, 0.774976, 0.775076, 0.775176, 0.775276, 0.775375, 0.775474, 0.775572, 0.77567, 0.775767, 0.775864, 0.775961, 0.776057, 0.776153, 0.776248, 0.776343, 0.776437, 0.776531, 0.776625, 0.776718, 0.776811, 0.776903, 0.776995, 0.777086, 0.777177, 0.777268, 0.777358, 0.777448, 0.777537, 0.777626, 0.777715, 0.777803, 0.77789, 0.777977, 0.778064, 0.77815, 0.778236, 0.778322, 0.778407, 0.778491, 0.778576, 0.778659, 0.778743, 0.778826, 0.778908, 0.77899, 0.779072, 0.779153, 0.779234, 0.779314, 0.779394, 0.779474, 0.779553, 0.779631, 0.77971, 0.779788, 0.779865, 0.779942, 0.780019, 0.780095, 0.78017, 0.780246, 0.780321, 0.780395, 0.780469, 0.780543, 0.780616, 0.780689, 0.780761, 0.780833, 0.780904, 0.780976, 0.781046, 0.781117, 0.781186, 0.781256, 0.781325, 0.781393, 0.781462, 0.781529, 0.781597, 0.781663, 0.78173, 0.781796, 0.781862, 0.781927, 0.781992, 0.782056, 0.78212, 0.782184, 0.782247, 0.78231, 0.782372, 0.782434, 0.782495, 0.782556, 0.782617, 0.782677, 0.782737, 0.782796, 0.782855, 0.782914, 0.782972, 0.78303, 0.783087, 0.783144, 0.783201, 0.783257, 0.783312, 0.783368, 0.783422, 0.783477, 0.783531, 0.783584, 0.783638, 0.78369, 0.783743, 0.783795, 0.783846, 0.783897, 0.783948, 0.783998, 0.784048, 0.784097, 0.784147, 0.784195, 0.784243, 0.784291, 0.784339, 0.784386, 0.784432, 0.784478, 0.784524, 0.784569, 0.784614, 0.784659, 0.784703, 0.784747, 0.78479, 0.784833, 0.784875, 0.784917, 0.784959, 0.785, 0.785041, 0.785081, 0.785121, 0.785161, 0.7852, 0.785239, 0.785277, 0.785315, 0.785352, 0.78539, 0.785426, 0.785463, 0.785498, 0.785534, 0.785569, 0.785604, 0.785638, 0.785672, 0.785705, 0.785738, 0.785771, 0.785803, 0.785835, 0.785866, 0.785897, 0.785928, 0.785958, 0.785988, 0.786017, 0.786046, 0.786074, 0.786102, 0.78613, 0.786157, 0.786184, 0.786211, 0.786237, 0.786263, 0.786288, 0.786313, 0.786337, 0.786361, 0.786385, 0.786408, 0.786431, 0.786453, 0.786475, 0.786497, 0.786518, 0.786539, 0.786559, 0.786579, 0.786599, 0.786618, 0.786637, 0.786655, 0.786673, 0.78669, 0.786707, 0.786724, 0.78674, 0.786756, 0.786772, 0.786787, 0.786802, 0.786816, 0.78683, 0.786843, 0.786856, 0.786869, 0.786881, 0.786893, 0.786904, 0.786916, 0.786926, 0.786936, 0.786946, 0.786956, 0.786965, 0.786973, 0.786981, 0.786989, 0.786997, 0.787004, 0.78701, 0.787016, 0.787022, 0.787027, 0.787032, 0.787037, 0.787041, 0.787045, 0.787048, 0.787051, 0.787054, 0.787056, 0.787057, 0.787059, 0.78706, 0.78706, 0.78706, 0.78706, 0.787059, 0.787058, 0.787057, 0.787055, 0.787052, 0.78705, 0.787047, 0.787043, 0.787039, 0.787035, 0.78703, 0.787025, 0.787019, 0.787013, 0.787007, 0.787, 0.786993, 0.786985 +}; #endif /* MULTIPATH_V0_M12_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v0_M6.h b/src/lte/model/JakesTraces/multipath_v0_M6.h index e28fe116b..300ca96b9 100644 --- a/src/lte/model/JakesTraces/multipath_v0_M6.h +++ b/src/lte/model/JakesTraces/multipath_v0_M6.h @@ -24,8 +24,8 @@ #define MULTIPATH_V0_M6_H_ static double multipath_M6_v_0[3000] = { - 0.51223, 0.512229, 0.512228, 0.512225, 0.512223, 0.512219, 0.512215, 0.51221, 0.512205, 0.512199, 0.512193, 0.512185, 0.512178, 0.512169, 0.51216, 0.51215, 0.51214, 0.512129, 0.512118, 0.512106, 0.512093, 0.512079, 0.512065, 0.512051, 0.512035, 0.51202, 0.512003, 0.511986, 0.511968, 0.51195, 0.511931, 0.511911, 0.511891, 0.51187, 0.511848, 0.511826, 0.511803, 0.51178, 0.511756, 0.511731, 0.511706, 0.51168, 0.511654, 0.511626, 0.511599, 0.51157, 0.511541, 0.511512, 0.511481, 0.51145, 0.511419, 0.511387, 0.511354, 0.511321, 0.511286, 0.511252, 0.511217, 0.511181, 0.511144, 0.511107, 0.511069, 0.511031, 0.510992, 0.510952, 0.510912, 0.510871, 0.510829, 0.510787, 0.510744, 0.510701, 0.510657, 0.510612, 0.510567, 0.510521, 0.510474, 0.510427, 0.510379, 0.510331, 0.510281, 0.510232, 0.510181, 0.51013, 0.510079, 0.510026, 0.509974, 0.50992, 0.509866, 0.509811, 0.509756, 0.5097, 0.509643, 0.509586, 0.509528, 0.509469, 0.50941, 0.50935, 0.50929, 0.509229, 0.509167, 0.509105, 0.509042, 0.508978, 0.508914, 0.508849, 0.508783, 0.508717, 0.50865, 0.508583, 0.508515, 0.508446, 0.508377, 0.508307, 0.508236, 0.508165, 0.508093, 0.50802, 0.507947, 0.507874, 0.507799, 0.507724, 0.507648, 0.507572, 0.507495, 0.507417, 0.507339, 0.50726, 0.507181, 0.5071, 0.50702, 0.506938, 0.506856, 0.506773, 0.50669, 0.506606, 0.506521, 0.506436, 0.50635, 0.506263, 0.506176, 0.506088, 0.506, 0.505911, 0.505821, 0.50573, 0.505639, 0.505548, 0.505455, 0.505362, 0.505269, 0.505174, 0.505079, 0.504984, 0.504887, 0.50479, 0.504693, 0.504595, 0.504496, 0.504396, 0.504296, 0.504195, 0.504094, 0.503992, 0.503889, 0.503786, 0.503682, 0.503577, 0.503472, 0.503366, 0.503259, 0.503152, 0.503044, 0.502935, 0.502826, 0.502716, 0.502605, 0.502494, 0.502382, 0.50227, 0.502157, 0.502043, 0.501928, 0.501813, 0.501697, 0.501581, 0.501464, 0.501346, 0.501228, 0.501108, 0.500989, 0.500868, 0.500747, 0.500625, 0.500503, 0.50038, 0.500256, 0.500132, 0.500007, 0.499881, 0.499755, 0.499628, 0.4995, 0.499372, 0.499243, 0.499113, 0.498983, 0.498852, 0.49872, 0.498587, 0.498454, 0.498321, 0.498186, 0.498051, 0.497916, 0.497779, 0.497642, 0.497505, 0.497366, 0.497227, 0.497087, 0.496947, 0.496806, 0.496664, 0.496522, 0.496379, 0.496235, 0.49609, 0.495945, 0.495799, 0.495653, 0.495506, 0.495358, 0.495209, 0.49506, 0.49491, 0.49476, 0.494609, 0.494457, 0.494304, 0.494151, 0.493997, 0.493842, 0.493687, 0.493531, 0.493374, 0.493217, 0.493059, 0.4929, 0.492741, 0.49258, 0.49242, 0.492258, 0.492096, 0.491933, 0.491769, 0.491605, 0.49144, 0.491275, 0.491108, 0.490941, 0.490773, 0.490605, 0.490436, 0.490266, 0.490096, 0.489924, 0.489752, 0.48958, 0.489407, 0.489233, 0.489058, 0.488882, 0.488706, 0.48853, 0.488352, 0.488174, 0.487995, 0.487815, 0.487635, 0.487454, 0.487272, 0.48709, 0.486907, 0.486723, 0.486538, 0.486353, 0.486167, 0.48598, 0.485793, 0.485605, 0.485416, 0.485227, 0.485036, 0.484845, 0.484654, 0.484461, 0.484268, 0.484074, 0.48388, 0.483685, 0.483489, 0.483292, 0.483094, 0.482896, 0.482697, 0.482498, 0.482297, 0.482096, 0.481895, 0.481692, 0.481489, 0.481285, 0.48108, 0.480875, 0.480669, 0.480462, 0.480254, 0.480046, 0.479837, 0.479627, 0.479417, 0.479205, 0.478993, 0.478781, 0.478567, 0.478353, 0.478138, 0.477922, 0.477706, 0.477489, 0.477271, 0.477052, 0.476833, 0.476613, 0.476392, 0.47617, 0.475948, 0.475725, 0.475501, 0.475276, 0.475051, 0.474825, 0.474598, 0.47437, 0.474142, 0.473913, 0.473683, 0.473452, 0.473221, 0.472989, 0.472756, 0.472522, 0.472288, 0.472053, 0.471817, 0.47158, 0.471342, 0.471104, 0.470865, 0.470625, 0.470385, 0.470144, 0.469901, 0.469659, 0.469415, 0.469171, 0.468925, 0.468679, 0.468433, 0.468185, 0.467937, 0.467688, 0.467438, 0.467187, 0.466936, 0.466684, 0.466431, 0.466177, 0.465923, 0.465667, 0.465411, 0.465154, 0.464897, 0.464638, 0.464379, 0.464119, 0.463858, 0.463596, 0.463334, 0.463071, 0.462807, 0.462542, 0.462276, 0.46201, 0.461743, 0.461475, 0.461206, 0.460936, 0.460666, 0.460395, 0.460122, 0.45985, 0.459576, 0.459301, 0.459026, 0.45875, 0.458473, 0.458195, 0.457917, 0.457637, 0.457357, 0.457076, 0.456794, 0.456512, 0.456228, 0.455944, 0.455659, 0.455373, 0.455086, 0.454799, 0.45451, 0.454221, 0.453931, 0.45364, 0.453348, 0.453055, 0.452762, 0.452468, 0.452173, 0.451877, 0.45158, 0.451282, 0.450984, 0.450684, 0.450384, 0.450083, 0.449781, 0.449478, 0.449175, 0.44887, 0.448565, 0.448259, 0.447952, 0.447644, 0.447335, 0.447026, 0.446715, 0.446404, 0.446092, 0.445779, 0.445465, 0.44515, 0.444834, 0.444518, 0.4442, 0.443882, 0.443563, 0.443243, 0.442922, 0.4426, 0.442277, 0.441954, 0.441629, 0.441304, 0.440978, 0.440651, 0.440323, 0.439994, 0.439664, 0.439333, 0.439002, 0.438669, 0.438336, 0.438001, 0.437666, 0.43733, 0.436993, 0.436655, 0.436316, 0.435977, 0.435636, 0.435295, 0.434952, 0.434609, 0.434264, 0.433919, 0.433573, 0.433226, 0.432878, 0.432529, 0.432179, 0.431828, 0.431477, 0.431124, 0.430771, 0.430416, 0.430061, 0.429704, 0.429347, 0.428989, 0.42863, 0.428269, 0.427908, 0.427546, 0.427183, 0.426819, 0.426454, 0.426089, 0.425722, 0.425354, 0.424985, 0.424616, 0.424245, 0.423873, 0.423501, 0.423127, 0.422753, 0.422377, 0.422001, 0.421623, 0.421245, 0.420865, 0.420485, 0.420104, 0.419721, 0.419338, 0.418954, 0.418568, 0.418182, 0.417795, 0.417406, 0.417017, 0.416627, 0.416235, 0.415843, 0.41545, 0.415055, 0.41466, 0.414264, 0.413866, 0.413468, 0.413068, 0.412668, 0.412266, 0.411864, 0.41146, 0.411056, 0.41065, 0.410244, 0.409836, 0.409427, 0.409018, 0.408607, 0.408195, 0.407782, 0.407368, 0.406954, 0.406538, 0.40612, 0.405702, 0.405283, 0.404863, 0.404442, 0.404019, 0.403596, 0.403171, 0.402746, 0.402319, 0.401892, 0.401463, 0.401033, 0.400602, 0.40017, 0.399737, 0.399303, 0.398867, 0.398431, 0.397993, 0.397555, 0.397115, 0.396674, 0.396232, 0.395789, 0.395345, 0.3949, 0.394454, 0.394006, 0.393558, 0.393108, 0.392657, 0.392205, 0.391752, 0.391298, 0.390842, 0.390386, 0.389928, 0.389469, 0.389009, 0.388548, 0.388086, 0.387623, 0.387158, 0.386692, 0.386226, 0.385758, 0.385288, 0.384818, 0.384346, 0.383874, 0.3834, 0.382925, 0.382448, 0.381971, 0.381492, 0.381012, 0.380531, 0.380049, 0.379566, 0.379081, 0.378595, 0.378108, 0.37762, 0.377131, 0.37664, 0.376148, 0.375655, 0.37516, 0.374665, 0.374168, 0.37367, 0.373171, 0.37267, 0.372168, 0.371665, 0.371161, 0.370656, 0.370149, 0.369641, 0.369131, 0.368621, 0.368109, 0.367596, 0.367081, 0.366566, 0.366049, 0.365531, 0.365011, 0.36449, 0.363968, 0.363445, 0.36292, 0.362394, 0.361867, 0.361338, 0.360808, 0.360277, 0.359744, 0.35921, 0.358675, 0.358138, 0.3576, 0.357061, 0.35652, 0.355979, 0.355435, 0.354891, 0.354345, 0.353797, 0.353248, 0.352698, 0.352147, 0.351594, 0.35104, 0.350484, 0.349927, 0.349369, 0.348809, 0.348248, 0.347685, 0.347121, 0.346556, 0.345989, 0.345421, 0.344851, 0.34428, 0.343707, 0.343133, 0.342558, 0.341981, 0.341403, 0.340823, 0.340242, 0.339659, 0.339075, 0.33849, 0.337903, 0.337314, 0.336724, 0.336133, 0.33554, 0.334945, 0.334349, 0.333752, 0.333153, 0.332552, 0.33195, 0.331347, 0.330742, 0.330135, 0.329527, 0.328918, 0.328306, 0.327694, 0.32708, 0.326464, 0.325846, 0.325227, 0.324607, 0.323985, 0.323361, 0.322736, 0.322109, 0.321481, 0.320851, 0.320219, 0.319586, 0.318951, 0.318315, 0.317677, 0.317037, 0.316396, 0.315753, 0.315108, 0.314462, 0.313814, 0.313164, 0.312513, 0.31186, 0.311206, 0.310549, 0.309891, 0.309232, 0.30857, 0.307907, 0.307243, 0.306576, 0.305908, 0.305238, 0.304567, 0.303893, 0.303218, 0.302541, 0.301863, 0.301182, 0.3005, 0.299816, 0.299131, 0.298443, 0.297754, 0.297063, 0.29637, 0.295676, 0.294979, 0.294281, 0.293581, 0.292879, 0.292175, 0.29147, 0.290763, 0.290053, 0.289342, 0.288629, 0.287914, 0.287198, 0.286479, 0.285758, 0.285036, 0.284312, 0.283585, 0.282857, 0.282127, 0.281395, 0.280661, 0.279925, 0.279187, 0.278448, 0.277706, 0.276962, 0.276216, 0.275469, 0.274719, 0.273967, 0.273213, 0.272458, 0.2717, 0.27094, 0.270178, 0.269414, 0.268648, 0.26788, 0.26711, 0.266338, 0.265564, 0.264788, 0.264009, 0.263229, 0.262446, 0.261661, 0.260874, 0.260085, 0.259294, 0.2585, 0.257705, 0.256907, 0.256107, 0.255305, 0.254501, 0.253694, 0.252886, 0.252075, 0.251261, 0.250446, 0.249628, 0.248808, 0.247986, 0.247162, 0.246335, 0.245506, 0.244674, 0.243841, 0.243005, 0.242166, 0.241326, 0.240482, 0.239637, 0.238789, 0.237939, 0.237086, 0.236232, 0.235374, 0.234514, 0.233652, 0.232787, 0.23192, 0.231051, 0.230179, 0.229304, 0.228427, 0.227547, 0.226665, 0.225781, 0.224894, 0.224004, 0.223112, 0.222217, 0.22132, 0.22042, 0.219517, 0.218612, 0.217704, 0.216794, 0.21588, 0.214965, 0.214046, 0.213125, 0.212201, 0.211275, 0.210346, 0.209414, 0.208479, 0.207542, 0.206601, 0.205658, 0.204712, 0.203764, 0.202812, 0.201858, 0.200901, 0.199941, 0.198978, 0.198013, 0.197044, 0.196072, 0.195098, 0.194121, 0.19314, 0.192157, 0.191171, 0.190181, 0.189189, 0.188194, 0.187195, 0.186194, 0.18519, 0.184182, 0.183171, 0.182158, 0.181141, 0.180121, 0.179098, 0.178071, 0.177042, 0.176009, 0.174973, 0.173934, 0.172891, 0.171846, 0.170797, 0.169744, 0.168689, 0.16763, 0.166567, 0.165502, 0.164433, 0.16336, 0.162284, 0.161205, 0.160122, 0.159036, 0.157946, 0.156853, 0.155756, 0.154656, 0.153552, 0.152445, 0.151334, 0.150219, 0.1491, 0.147978, 0.146853, 0.145723, 0.14459, 0.143454, 0.142313, 0.141169, 0.14002, 0.138868, 0.137712, 0.136553, 0.135389, 0.134222, 0.13305, 0.131875, 0.130695, 0.129512, 0.128325, 0.127133, 0.125938, 0.124738, 0.123535, 0.122327, 0.121115, 0.119899, 0.118678, 0.117454, 0.116225, 0.114992, 0.113754, 0.112512, 0.111266, 0.110016, 0.108761, 0.107501, 0.106238, 0.104969, 0.103696, 0.102419, 0.101137, 0.0998506, 0.0985594, 0.0972635, 0.095963, 0.0946578, 0.0933478, 0.092033, 0.0907135, 0.0893891, 0.0880598, 0.0867257, 0.0853866, 0.0840426, 0.0826935, 0.0813395, 0.0799804, 0.0786162, 0.0772469, 0.0758724, 0.0744928, 0.0731079, 0.0717178, 0.0703224, 0.0689217, 0.0675156, 0.0661041, 0.0646872, 0.0632648, 0.0618369, 0.0604034, 0.0589644, 0.0575198, 0.0560695, 0.0546135, 0.0531518, 0.0516843, 0.0502109, 0.0487318, 0.0472467, 0.0457557, 0.0442587, 0.0427557, 0.0412466, 0.0397314, 0.03821, 0.0366825, 0.0351487, 0.0336086, 0.0320622, 0.0305093, 0.0289501, 0.0273844, 0.0258122, 0.0242334, 0.0226479, 0.0210558, 0.019457, 0.0178514, 0.0162389, 0.0146196, 0.0129934, 0.0113602, 0.00971992, 0.00807257, 0.00641807, 0.00475636, 0.00308739, 0.00141111, -0.000272556, -0.00196365, -0.00366225, -0.0053684, -0.00708216, -0.00880361, -0.0105328, -0.0122698, -0.0140146, -0.0157674, -0.0175282, -0.0192971, -0.0210741, -0.0228593, -0.0246527, -0.0264546, -0.0282648, -0.0300835, -0.0319107, -0.0337466, -0.0355913, -0.0374446, -0.0393069, -0.0411781, -0.0430583, -0.0449476, -0.0468461, -0.0487538, -0.0506709, -0.0525974, -0.0545334, -0.0564791, -0.0584344, -0.0603995, -0.0623745, -0.0643594, -0.0663544, -0.0683596, -0.070375, -0.0724007, -0.0744369, -0.0764836, -0.078541, -0.0806091, -0.0826881, -0.0847781, -0.0868791, -0.0889913, -0.0911148, -0.0932497, -0.0953961, -0.0975541, -0.0997239, -0.101906, -0.104099, -0.106305, -0.108523, -0.110754, -0.112996, -0.115252, -0.11752, -0.119802, -0.122096, -0.124403, -0.126724, -0.129059, -0.131406, -0.133768, -0.136144, -0.138534, -0.140938, -0.143356, -0.145789, -0.148237, -0.150699, -0.153177, -0.15567, -0.158178, -0.160702, -0.163242, -0.165798, -0.16837, -0.170958, -0.173563, -0.176185, -0.178824, -0.18148, -0.184153, -0.186844, -0.189553, -0.19228, -0.195025, -0.197789, -0.200572, -0.203374, -0.206195, -0.209035, -0.211896, -0.214776, -0.217677, -0.220598, -0.223541, -0.226504, -0.229489, -0.232496, -0.235525, -0.238577, -0.241651, -0.244748, -0.247869, -0.251013, -0.254182, -0.257375, -0.260593, -0.263836, -0.267105, -0.270399, -0.273721, -0.277068, -0.280444, -0.283846, -0.287277, -0.290737, -0.294225, -0.297743, -0.301291, -0.30487, -0.308479, -0.31212, -0.315793, -0.319499, -0.323237, -0.32701, -0.330817, -0.334659, -0.338537, -0.34245, -0.346401, -0.350389, -0.354416, -0.358482, -0.362587, -0.366734, -0.370921, -0.375151, -0.379423, -0.38374, -0.388101, -0.392508, -0.396961, -0.401462, -0.406012, -0.410611, -0.415261, -0.419963, -0.424718, -0.429527, -0.434391, -0.439312, -0.444291, -0.44933, -0.454429, -0.45959, -0.464814, -0.470104, -0.475461, -0.480887, -0.486382, -0.49195, -0.497592, -0.50331, -0.509106, -0.514981, -0.52094, -0.526982, -0.533112, -0.539332, -0.545644, -0.55205, -0.558554, -0.56516, -0.571869, -0.578685, -0.585612, -0.592653, -0.599812, -0.607093, -0.614501, -0.622039, -0.629712, -0.637526, -0.645484, -0.653594, -0.66186, -0.670289, -0.678886, -0.68766, -0.696617, -0.705765, -0.715113, -0.724668, -0.734441, -0.744442, -0.754681, -0.76517, -0.775921, -0.786948, -0.798265, -0.809888, -0.821834, -0.83412, -0.846768, -0.859798, -0.873234, -0.887102, -0.901432, -0.916255, -0.931604, -0.94752, -0.964046, -0.98123, -0.999125, -1.01779, -1.03731, -1.05774, -1.07919, -1.10176, -1.12558, -1.15078, -1.17754, -1.20606, -1.2366, -1.26945, -1.305, -1.34374, -1.38628, -1.43345, -1.48639, -1.54671, -1.61679, -1.70042, -1.80411, -1.94063, -2.1409, -2.52388, -2.90512, -2.26104, -2.01228, -1.85509, -1.73989, -1.64892, -1.57373, -1.50964, -1.4538, -1.40432, -1.35989, -1.31958, -1.28269, -1.24869, -1.21715, -1.18774, -1.16019, -1.13428, -1.10983, -1.08667, -1.06469, -1.04376, -1.02378, -1.00469, -0.986393, -0.968834, -0.951955, -0.935705, -0.920039, -0.904915, -0.890299, -0.876155, -0.862456, -0.849173, -0.836283, -0.823762, -0.81159, -0.799748, -0.788219, -0.776986, -0.766035, -0.755351, -0.744923, -0.734737, -0.724784, -0.715052, -0.705531, -0.696214, -0.687091, -0.678155, -0.669397, -0.660812, -0.652391, -0.64413, -0.636022, -0.628061, -0.620243, -0.612561, -0.605013, -0.597592, -0.590295, -0.583118, -0.576056, -0.569106, -0.562266, -0.55553, -0.548896, -0.542362, -0.535923, -0.529578, -0.523324, -0.517157, -0.511076, -0.505079, -0.499162, -0.493324, -0.487563, -0.481877, -0.476264, -0.470722, -0.465249, -0.459843, -0.454504, -0.449229, -0.444016, -0.438865, -0.433774, -0.428741, -0.423765, -0.418845, -0.41398, -0.409169, -0.404409, -0.399701, -0.395043, -0.390434, -0.385872, -0.381358, -0.37689, -0.372467, -0.368089, -0.363753, -0.35946, -0.355209, -0.350999, -0.346829, -0.342698, -0.338605, -0.334551, -0.330534, -0.326553, -0.322608, -0.318699, -0.314824, -0.310983, -0.307175, -0.303401, -0.299658, -0.295948, -0.292268, -0.28862, -0.285001, -0.281412, -0.277853, -0.274322, -0.270819, -0.267344, -0.263897, -0.260476, -0.257082, -0.253715, -0.250373, -0.247056, -0.243765, -0.240498, -0.237255, -0.234036, -0.230841, -0.227669, -0.224519, -0.221393, -0.218288, -0.215206, -0.212145, -0.209105, -0.206087, -0.203089, -0.200112, -0.197155, -0.194217, -0.1913, -0.188402, -0.185523, -0.182662, -0.179821, -0.176998, -0.174193, -0.171406, -0.168637, -0.165885, -0.163151, -0.160433, -0.157733, -0.155049, -0.152382, -0.149731, -0.147096, -0.144476, -0.141873, -0.139285, -0.136712, -0.134155, -0.131612, -0.129085, -0.126571, -0.124073, -0.121588, -0.119118, -0.116662, -0.11422, -0.111791, -0.109376, -0.106974, -0.104585, -0.10221, -0.0998475, -0.0974978, -0.0951608, -0.0928363, -0.0905243, -0.0882246, -0.085937, -0.0836615, -0.0813978, -0.079146, -0.0769058, -0.0746772, -0.0724601, -0.0702543, -0.0680596, -0.0658761, -0.0637036, -0.061542, -0.0593911, -0.0572509, -0.0551213, -0.0530022, -0.0508935, -0.048795, -0.0467067, -0.0446285, -0.0425603, -0.0405019, -0.0384534, -0.0364146, -0.0343854, -0.0323658, -0.0303556, -0.0283548, -0.0263632, -0.0243809, -0.0224077, -0.0204435, -0.0184883, -0.0165419, -0.0146044, -0.0126755, -0.0107554, -0.00884378, -0.00694068, -0.00504602, -0.00315971, -0.00128169, 0.000588112, 0.00244977, 0.00430334, 0.0061489, 0.00798652, 0.00981625, 0.0116382, 0.0134523, 0.0152588, 0.0170577, 0.0188489, 0.0206327, 0.022409, 0.024178, 0.0259396, 0.0276939, 0.0294411, 0.031181, 0.0329139, 0.0346397, 0.0363586, 0.0380705, 0.0397755, 0.0414737, 0.0431651, 0.0448497, 0.0465277, 0.0481991, 0.0498639, 0.0515221, 0.0531739, 0.0548193, 0.0564582, 0.0580908, 0.0597172, 0.0613372, 0.0629511, 0.0645588, 0.0661604, 0.067756, 0.0693455, 0.070929, 0.0725066, 0.0740783, 0.0756441, 0.0772041, 0.0787584, 0.0803069, 0.0818497, 0.0833868, 0.0849184, 0.0864443, 0.0879647, 0.0894797, 0.0909891, 0.0924931, 0.0939917, 0.095485, 0.0969729, 0.0984556, 0.099933, 0.101405, 0.102872, 0.104334, 0.105791, 0.107242, 0.108689, 0.110131, 0.111567, 0.112999, 0.114426, 0.115847, 0.117264, 0.118677, 0.120084, 0.121487, 0.122884, 0.124278, 0.125666, 0.12705, 0.128429, 0.129804, 0.131174, 0.132539, 0.1339, 0.135257, 0.136609, 0.137956, 0.1393, 0.140638, 0.141973, 0.143303, 0.144629, 0.145951, 0.147268, 0.148581, 0.14989, 0.151195, 0.152495, 0.153792, 0.155084, 0.156373, 0.157657, 0.158937, 0.160213, 0.161486, 0.162754, 0.164018, 0.165279, 0.166535, 0.167788, 0.169037, 0.170281, 0.171523, 0.17276, 0.173994, 0.175223, 0.17645, 0.177672, 0.178891, 0.180106, 0.181317, 0.182525, 0.183729, 0.18493, 0.186127, 0.18732, 0.18851, 0.189696, 0.190879, 0.192059, 0.193235, 0.194407, 0.195576, 0.196742, 0.197905, 0.199063, 0.200219, 0.201371, 0.20252, 0.203666, 0.204808, 0.205947, 0.207083, 0.208216, 0.209345, 0.210471, 0.211594, 0.212714, 0.213831, 0.214945, 0.216055, 0.217162, 0.218266, 0.219368, 0.220466, 0.221561, 0.222653, 0.223742, 0.224828, 0.225911, 0.226991, 0.228068, 0.229142, 0.230213, 0.231281, 0.232346, 0.233409, 0.234468, 0.235525, 0.236579, 0.23763, 0.238678, 0.239723, 0.240766, 0.241806, 0.242843, 0.243877, 0.244909, 0.245937, 0.246963, 0.247987, 0.249007, 0.250025, 0.251041, 0.252053, 0.253063, 0.254071, 0.255075, 0.256077, 0.257077, 0.258074, 0.259068, 0.26006, 0.261049, 0.262036, 0.26302, 0.264001, 0.26498, 0.265957, 0.266931, 0.267902, 0.268872, 0.269838, 0.270802, 0.271764, 0.272723, 0.27368, 0.274635, 0.275587, 0.276537, 0.277484, 0.278429, 0.279372, 0.280312, 0.28125, 0.282185, 0.283119, 0.28405, 0.284978, 0.285905, 0.286829, 0.287751, 0.28867, 0.289588, 0.290503, 0.291415, 0.292326, 0.293234, 0.294141, 0.295045, 0.295946, 0.296846, 0.297743, 0.298639, 0.299532, 0.300423, 0.301311, 0.302198, 0.303083, 0.303965, 0.304845, 0.305724, 0.3066, 0.307474, 0.308346, 0.309216, 0.310084, 0.310949, 0.311813, 0.312675, 0.313535, 0.314392, 0.315248, 0.316102, 0.316953, 0.317803, 0.318651, 0.319496, 0.32034, 0.321182, 0.322022, 0.32286, 0.323696, 0.32453, 0.325362, 0.326192, 0.32702, 0.327846, 0.328671, 0.329494, 0.330314, 0.331133, 0.33195, 0.332765, 0.333578, 0.33439, 0.335199, 0.336007, 0.336813, 0.337617, 0.338419, 0.339219, 0.340018, 0.340815, 0.34161, 0.342403, 0.343195, 0.343984, 0.344772, 0.345558, 0.346343, 0.347125, 0.347906, 0.348685, 0.349463, 0.350239, 0.351013, 0.351785, 0.352555, 0.353324, 0.354092, 0.354857, 0.355621, 0.356383, 0.357143, 0.357902, 0.358659, 0.359415, 0.360169, 0.360921, 0.361671, 0.36242, 0.363167, 0.363913, 0.364657, 0.365399, 0.36614, 0.366879, 0.367617, 0.368353, 0.369087, 0.36982, 0.370552, 0.371281, 0.372009, 0.372736, 0.373461, 0.374184, 0.374906, 0.375627, 0.376345, 0.377063, 0.377778, 0.378493, 0.379205, 0.379917, 0.380626, 0.381334, 0.382041, 0.382746, 0.38345, 0.384152, 0.384853, 0.385552, 0.38625, 0.386946, 0.387641, 0.388334, 0.389026, 0.389717, 0.390406, 0.391093, 0.39178, 0.392464, 0.393148, 0.393829, 0.39451, 0.395189, 0.395867, 0.396543, 0.397218, 0.397891, 0.398563, 0.399234, 0.399903, 0.400571, 0.401237, 0.401902, 0.402566, 0.403228, 0.403889, 0.404549, 0.405207, 0.405864, 0.40652, 0.407174, 0.407827, 0.408478, 0.409129, 0.409778, 0.410425, 0.411071, 0.411716, 0.41236, 0.413002, 0.413643, 0.414283, 0.414921, 0.415558, 0.416194, 0.416829, 0.417462, 0.418094, 0.418725, 0.419354, 0.419982, 0.420609, 0.421235, 0.421859, 0.422482, 0.423104, 0.423725, 0.424344, 0.424962, 0.425579, 0.426194, 0.426809, 0.427422, 0.428034, 0.428645, 0.429254, 0.429862, 0.430469, 0.431075, 0.43168, 0.432283, 0.432886, 0.433487, 0.434086, 0.434685, 0.435283, 0.435879, 0.436474, 0.437068, 0.437661, 0.438252, 0.438842, 0.439432, 0.44002, 0.440607, 0.441192, 0.441777, 0.44236, 0.442943, 0.443524, 0.444104, 0.444683, 0.44526, 0.445837, 0.446412, 0.446987, 0.44756, 0.448132, 0.448703, 0.449273, 0.449841, 0.450409, 0.450976, 0.451541, 0.452105, 0.452668, 0.45323, 0.453791, 0.454351, 0.45491, 0.455468, 0.456024, 0.45658, 0.457134, 0.457688, 0.45824, 0.458791, 0.459341, 0.459891, 0.460439, 0.460986, 0.461531, 0.462076, 0.46262, 0.463163, 0.463705, 0.464245, 0.464785, 0.465323, 0.465861, 0.466397, 0.466933, 0.467467, 0.468001, 0.468533, 0.469064, 0.469594, 0.470124, 0.470652, 0.471179, 0.471705, 0.472231, 0.472755, 0.473278, 0.4738, 0.474321, 0.474842, 0.475361, 0.475879, 0.476396, 0.476912, 0.477428, 0.477942, 0.478455, 0.478967, 0.479479, 0.479989, 0.480498, 0.481007, 0.481514, 0.48202, 0.482526, 0.48303, 0.483534, 0.484036, 0.484538, 0.485039, 0.485538, 0.486037, 0.486535, 0.487032, 0.487528, 0.488022, 0.488516, 0.489009, 0.489502, 0.489993, 0.490483, 0.490972, 0.491461, 0.491948, 0.492435, 0.49292, 0.493405, 0.493889, 0.494372, 0.494853, 0.495334, 0.495815, 0.496294, 0.496772, 0.497249, 0.497726, 0.498201, 0.498676, 0.49915, 0.499623, 0.500094, 0.500566, 0.501036, 0.501505, 0.501973, 0.502441, 0.502907, 0.503373, 0.503838, 0.504302, 0.504765, 0.505227, 0.505689, 0.506149, 0.506609, 0.507067, 0.507525, 0.507982, 0.508438, 0.508893, 0.509348, 0.509801, 0.510254, 0.510706, 0.511157, 0.511607, 0.512056, 0.512505, 0.512952, 0.513399, 0.513845, 0.51429, 0.514734, 0.515177, 0.51562, 0.516061, 0.516502, 0.516942, 0.517381, 0.51782, 0.518257, 0.518694, 0.51913, 0.519565, 0.519999, 0.520432, 0.520865, 0.521297, 0.521728, 0.522158, 0.522587, 0.523015, 0.523443, 0.52387, 0.524296, 0.524721, 0.525146, 0.525569, 0.525992, 0.526414, 0.526836, 0.527256, 0.527676, 0.528094, 0.528513, 0.52893, 0.529346, 0.529762, 0.530177, 0.530591, 0.531004, 0.531417, 0.531829, 0.53224, 0.53265, 0.533059, 0.533468, 0.533876, 0.534283, 0.534689, 0.535095, 0.5355, 0.535904, 0.536307, 0.536709, 0.537111, 0.537512, 0.537912, 0.538312, 0.53871, 0.539108, 0.539506, 0.539902, 0.540298, 0.540693, 0.541087, 0.54148, 0.541873, 0.542265, 0.542656, 0.543046, 0.543436, 0.543825, 0.544213, 0.544601, 0.544987, 0.545373, 0.545759, 0.546143, 0.546527, 0.54691, 0.547292, 0.547674, 0.548055, 0.548435, 0.548814, 0.549193, 0.549571, 0.549948, 0.550325, 0.5507, 0.551075, 0.55145, 0.551823, 0.552196, 0.552569, 0.55294, 0.553311, 0.553681, 0.55405, 0.554419, 0.554787, 0.555154, 0.555521, 0.555886, 0.556252, 0.556616, 0.55698, 0.557343, 0.557705, 0.558067, 0.558428, 0.558788, 0.559147, 0.559506, 0.559864, 0.560222, 0.560579, 0.560935, 0.56129, 0.561645, 0.561999, 0.562352, 0.562705, 0.563057, 0.563408, 0.563759, 0.564108, 0.564458, 0.564806, 0.565154, 0.565501, 0.565848, 0.566194, 0.566539, 0.566883, 0.567227, 0.56757, 0.567913, 0.568255, 0.568596, 0.568936, 0.569276, 0.569615, 0.569954, 0.570292, 0.570629, 0.570966, 0.571301, 0.571637, 0.571971, 0.572305, 0.572638, 0.572971, 0.573303, 0.573634, 0.573965, 0.574295, 0.574624, 0.574953, 0.575281, 0.575608, 0.575935, 0.576261, 0.576586, 0.576911, 0.577235, 0.577559, 0.577882, 0.578204, 0.578526, 0.578847, 0.579167, 0.579487, 0.579806, 0.580124, 0.580442, 0.580759, 0.581076, 0.581391, 0.581707, 0.582021, 0.582335, 0.582649, 0.582961, 0.583274, 0.583585, 0.583896, 0.584206, 0.584516, 0.584825, 0.585133, 0.585441, 0.585748, 0.586055, 0.586361, 0.586666, 0.58697, 0.587275, 0.587578, 0.587881, 0.588183, 0.588485, 0.588786, 0.589086, 0.589386, 0.589685, 0.589984, 0.590281, 0.590579, 0.590876, 0.591172, 0.591467, 0.591762, 0.592056, 0.59235, 0.592643, 0.592936, 0.593228, 0.593519, 0.59381, 0.5941, 0.594389, 0.594678, 0.594967, 0.595254, 0.595542, 0.595828, 0.596114, 0.596399, 0.596684, 0.596968, 0.597252, 0.597535, 0.597817, 0.598099, 0.59838, 0.598661, 0.598941, 0.599221, 0.5995, 0.599778, 0.600056, 0.600333, 0.600609, 0.600885, 0.601161, 0.601436, 0.60171, 0.601984, 0.602257, 0.602529, 0.602801, 0.603073, 0.603343, 0.603614, 0.603883, 0.604152, 0.604421, 0.604689, 0.604956, 0.605223, 0.605489, 0.605755, 0.60602, 0.606285, 0.606549, 0.606812, 0.607075, 0.607337, 0.607599, 0.60786, 0.608121, 0.608381, 0.60864, 0.608899, 0.609157, 0.609415, 0.609672, 0.609929, 0.610185, 0.610441, 0.610696, 0.61095, 0.611204, 0.611457, 0.61171, 0.611962, 0.612214, 0.612465, 0.612716, 0.612966, 0.613215, 0.613464, 0.613712, 0.61396, 0.614208, 0.614454, 0.614701, 0.614946, 0.615191, 0.615436, 0.61568, 0.615923, 0.616166, 0.616409, 0.61665, 0.616892, 0.617132, 0.617373, 0.617612, 0.617851, 0.61809, 0.618328, 0.618566, 0.618803, 0.619039, 0.619275, 0.61951, 0.619745, 0.619979, 0.620213, 0.620446, 0.620679, 0.620911, 0.621143, 0.621374, 0.621605, 0.621835, 0.622064, 0.622293, 0.622522, 0.62275, 0.622977, 0.623204, 0.62343, 0.623656, 0.623881, 0.624106, 0.62433, 0.624554, 0.624777, 0.625, 0.625222, 0.625444, 0.625665, 0.625885, 0.626105, 0.626325, 0.626544, 0.626763, 0.626981, 0.627198, 0.627415, 0.627631, 0.627847, 0.628063, 0.628278, 0.628492, 0.628706, 0.628919, 0.629132, 0.629344, 0.629556, 0.629768, 0.629978, 0.630189, 0.630398, 0.630608, 0.630816, 0.631025, 0.631232, 0.63144, 0.631646, 0.631853, 0.632058, 0.632263, 0.632468, 0.632672, 0.632876, 0.633079, 0.633282, 0.633484, 0.633686, 0.633887, 0.634088, 0.634288, 0.634487, 0.634686, 0.634885, 0.635083, 0.635281, 0.635478, 0.635675, 0.635871, 0.636067, 0.636262, 0.636456, 0.636651, 0.636844, 0.637037, 0.63723, 0.637422, 0.637614, 0.637805, 0.637996, 0.638186, 0.638376, 0.638565, 0.638754, 0.638942, 0.63913, 0.639317, 0.639504, 0.63969, 0.639876, 0.640061, 0.640246, 0.64043, 0.640614, 0.640797, 0.64098, 0.641162, 0.641344, 0.641526, 0.641707, 0.641887, 0.642067, 0.642246, 0.642425, 0.642604, 0.642782, 0.642959, 0.643136, 0.643313, 0.643489, 0.643665, 0.64384, 0.644014, 0.644188, 0.644362, 0.644535, 0.644708, 0.64488, 0.645052, 0.645223, 0.645394, 0.645564, 0.645734, 0.645903, 0.646072, 0.646241, 0.646409, 0.646576, 0.646743, 0.646909, 0.647075, 0.647241, 0.647406, 0.647571, 0.647735, 0.647898, 0.648062, 0.648224, 0.648387, 0.648548, 0.64871, 0.64887, 0.649031, 0.649191, 0.64935, 0.649509, 0.649667, 0.649825, 0.649983, 0.65014, 0.650297, 0.650453, 0.650608, 0.650764, 0.650918, 0.651073, 0.651226, 0.65138, 0.651532, 0.651685, 0.651837, 0.651988, 0.652139, 0.65229, 0.65244, 0.652589, 0.652739, 0.652887, 0.653036, 0.653183, 0.653331, 0.653477, 0.653624, 0.65377, 0.653915, 0.65406, 0.654205, 0.654349, 0.654492, 0.654635, 0.654778, 0.65492, 0.655062, 0.655204, 0.655344, 0.655485, 0.655625, 0.655764, 0.655903, 0.656042, 0.65618, 0.656318, 0.656455, 0.656592, 0.656728, 0.656864, 0.656999, 0.657134, 0.657268, 0.657402, 0.657536, 0.657669, 0.657802, 0.657934, 0.658066, 0.658197, 0.658328, 0.658458, 0.658588, 0.658718, 0.658847, 0.658976, 0.659104, 0.659231, 0.659359, 0.659485, 0.659612, 0.659738, 0.659863, 0.659988, 0.660113, 0.660237, 0.66036, 0.660484, 0.660606, 0.660729, 0.660851, 0.660972, 0.661093, 0.661214, 0.661334, 0.661453, 0.661573, 0.661691, 0.66181, 0.661928, 0.662045, 0.662162, 0.662278, 0.662395, 0.66251, 0.662625, 0.66274, 0.662854, 0.662968, 0.663082, 0.663195, 0.663307, 0.663419, 0.663531, 0.663642, 0.663753, 0.663863, 0.663973, 0.664083, 0.664192, 0.6643, 0.664409, 0.664516, 0.664624, 0.66473, 0.664837, 0.664943, 0.665048, 0.665153, 0.665258, 0.665362, 0.665466, 0.665569, 0.665672, 0.665775, 0.665877, 0.665978, 0.666079, 0.66618, 0.66628, 0.66638, 0.66648, 0.666578, 0.666677, 0.666775, 0.666873, 0.66697, 0.667067, 0.667163, 0.667259, 0.667355, 0.66745, 0.667544, 0.667638, 0.667732, 0.667825, 0.667918, 0.668011, 0.668103, 0.668194, 0.668286, 0.668376, 0.668467, 0.668556, 0.668646, 0.668735, 0.668823, 0.668912, 0.668999, 0.669087, 0.669173, 0.66926, 0.669346, 0.669431, 0.669517, 0.669601, 0.669686, 0.669769, 0.669853, 0.669936, 0.670018, 0.670101, 0.670182, 0.670264, 0.670344, 0.670425, 0.670505, 0.670584, 0.670663, 0.670742, 0.67082, 0.670898, 0.670976, 0.671053, 0.671129, 0.671206, 0.671281, 0.671357, 0.671431, 0.671506, 0.67158, 0.671653, 0.671727, 0.671799, 0.671872, 0.671944, 0.672015, 0.672086, 0.672157, 0.672227, 0.672297, 0.672366, 0.672435, 0.672504, 0.672572, 0.672639, 0.672707, 0.672773, 0.67284, 0.672906, 0.672971, 0.673036, 0.673101, 0.673165, 0.673229, 0.673293, 0.673356, 0.673418, 0.673481, 0.673542, 0.673604, 0.673665, 0.673725, 0.673785, 0.673845, 0.673904, 0.673963, 0.674021, 0.674079, 0.674137, 0.674194, 0.674251, 0.674307, 0.674363, 0.674418, 0.674473, 0.674528, 0.674582, 0.674636, 0.674689, 0.674742, 0.674795, 0.674847, 0.674898, 0.67495, 0.675001, 0.675051, 0.675101, 0.675151, 0.6752, 0.675249, 0.675297, 0.675345, 0.675392, 0.675439, 0.675486, 0.675532, 0.675578, 0.675624, 0.675669, 0.675713, 0.675757, 0.675801, 0.675844, 0.675887, 0.67593, 0.675972, 0.676014, 0.676055, 0.676096, 0.676136, 0.676176, 0.676216, 0.676255, 0.676294, 0.676332, 0.67637, 0.676407, 0.676445, 0.676481, 0.676517, 0.676553, 0.676589, 0.676624, 0.676658, 0.676693, 0.676726, 0.67676, 0.676793, 0.676825, 0.676857, 0.676889, 0.67692, 0.676951, 0.676982, 0.677012, 0.677041, 0.677071, 0.677099, 0.677128, 0.677156, 0.677183, 0.677211, 0.677237, 0.677264, 0.67729, 0.677315, 0.67734, 0.677365, 0.677389, 0.677413, 0.677436, 0.67746, 0.677482, 0.677504, 0.677526, 0.677548, 0.677568, 0.677589, 0.677609, 0.677629, 0.677648, 0.677667, 0.677686, 0.677704, 0.677721, 0.677739, 0.677756, 0.677772, 0.677788, 0.677804, 0.677819, 0.677834, 0.677848, 0.677862, 0.677876, 0.677889, 0.677901, 0.677914, 0.677926, 0.677937, 0.677948, 0.677959, 0.677969, 0.677979, 0.677988, 0.677997, 0.678006, 0.678014, 0.678022, 0.67803, 0.678036, 0.678043, 0.678049, 0.678055, 0.67806, 0.678065, 0.67807, 0.678074, 0.678078, 0.678081, 0.678084, 0.678086, 0.678088, 0.67809, 0.678091, 0.678092, 0.678092, 0.678092, 0.678092, 0.678091, 0.67809, 0.678088, 0.678086, 0.678084, 0.678081, 0.678078, 0.678074, 0.67807, 0.678065, 0.67806, 0.678055, 0.678049, 0.678043, 0.678036, 0.678029, 0.678022, 0.678014, 0.678006, 0.677997, 0.677988, 0.677979, 0.677969, 0.677959, 0.677948, 0.677937, 0.677926, 0.677914, 0.677901, 0.677889, 0.677876, 0.677862, 0.677848, 0.677834, 0.677819, 0.677804, 0.677788, 0.677772, 0.677756, 0.677739, 0.677722, 0.677704, 0.677686, 0.677668, 0.677649, 0.67763, 0.67761, 0.67759, 0.677569, 0.677548, 0.677527, 0.677505, 0.677483, 0.677461, 0.677438, 0.677414, 0.67739, 0.677366, 0.677342, 0.677317, 0.677291, 0.677265, 0.677239, 0.677212, 0.677185, 0.677158, 0.67713, 0.677102, 0.677073, 0.677044, 0.677014, 0.676984 - }; + 0.51223, 0.512229, 0.512228, 0.512225, 0.512223, 0.512219, 0.512215, 0.51221, 0.512205, 0.512199, 0.512193, 0.512185, 0.512178, 0.512169, 0.51216, 0.51215, 0.51214, 0.512129, 0.512118, 0.512106, 0.512093, 0.512079, 0.512065, 0.512051, 0.512035, 0.51202, 0.512003, 0.511986, 0.511968, 0.51195, 0.511931, 0.511911, 0.511891, 0.51187, 0.511848, 0.511826, 0.511803, 0.51178, 0.511756, 0.511731, 0.511706, 0.51168, 0.511654, 0.511626, 0.511599, 0.51157, 0.511541, 0.511512, 0.511481, 0.51145, 0.511419, 0.511387, 0.511354, 0.511321, 0.511286, 0.511252, 0.511217, 0.511181, 0.511144, 0.511107, 0.511069, 0.511031, 0.510992, 0.510952, 0.510912, 0.510871, 0.510829, 0.510787, 0.510744, 0.510701, 0.510657, 0.510612, 0.510567, 0.510521, 0.510474, 0.510427, 0.510379, 0.510331, 0.510281, 0.510232, 0.510181, 0.51013, 0.510079, 0.510026, 0.509974, 0.50992, 0.509866, 0.509811, 0.509756, 0.5097, 0.509643, 0.509586, 0.509528, 0.509469, 0.50941, 0.50935, 0.50929, 0.509229, 0.509167, 0.509105, 0.509042, 0.508978, 0.508914, 0.508849, 0.508783, 0.508717, 0.50865, 0.508583, 0.508515, 0.508446, 0.508377, 0.508307, 0.508236, 0.508165, 0.508093, 0.50802, 0.507947, 0.507874, 0.507799, 0.507724, 0.507648, 0.507572, 0.507495, 0.507417, 0.507339, 0.50726, 0.507181, 0.5071, 0.50702, 0.506938, 0.506856, 0.506773, 0.50669, 0.506606, 0.506521, 0.506436, 0.50635, 0.506263, 0.506176, 0.506088, 0.506, 0.505911, 0.505821, 0.50573, 0.505639, 0.505548, 0.505455, 0.505362, 0.505269, 0.505174, 0.505079, 0.504984, 0.504887, 0.50479, 0.504693, 0.504595, 0.504496, 0.504396, 0.504296, 0.504195, 0.504094, 0.503992, 0.503889, 0.503786, 0.503682, 0.503577, 0.503472, 0.503366, 0.503259, 0.503152, 0.503044, 0.502935, 0.502826, 0.502716, 0.502605, 0.502494, 0.502382, 0.50227, 0.502157, 0.502043, 0.501928, 0.501813, 0.501697, 0.501581, 0.501464, 0.501346, 0.501228, 0.501108, 0.500989, 0.500868, 0.500747, 0.500625, 0.500503, 0.50038, 0.500256, 0.500132, 0.500007, 0.499881, 0.499755, 0.499628, 0.4995, 0.499372, 0.499243, 0.499113, 0.498983, 0.498852, 0.49872, 0.498587, 0.498454, 0.498321, 0.498186, 0.498051, 0.497916, 0.497779, 0.497642, 0.497505, 0.497366, 0.497227, 0.497087, 0.496947, 0.496806, 0.496664, 0.496522, 0.496379, 0.496235, 0.49609, 0.495945, 0.495799, 0.495653, 0.495506, 0.495358, 0.495209, 0.49506, 0.49491, 0.49476, 0.494609, 0.494457, 0.494304, 0.494151, 0.493997, 0.493842, 0.493687, 0.493531, 0.493374, 0.493217, 0.493059, 0.4929, 0.492741, 0.49258, 0.49242, 0.492258, 0.492096, 0.491933, 0.491769, 0.491605, 0.49144, 0.491275, 0.491108, 0.490941, 0.490773, 0.490605, 0.490436, 0.490266, 0.490096, 0.489924, 0.489752, 0.48958, 0.489407, 0.489233, 0.489058, 0.488882, 0.488706, 0.48853, 0.488352, 0.488174, 0.487995, 0.487815, 0.487635, 0.487454, 0.487272, 0.48709, 0.486907, 0.486723, 0.486538, 0.486353, 0.486167, 0.48598, 0.485793, 0.485605, 0.485416, 0.485227, 0.485036, 0.484845, 0.484654, 0.484461, 0.484268, 0.484074, 0.48388, 0.483685, 0.483489, 0.483292, 0.483094, 0.482896, 0.482697, 0.482498, 0.482297, 0.482096, 0.481895, 0.481692, 0.481489, 0.481285, 0.48108, 0.480875, 0.480669, 0.480462, 0.480254, 0.480046, 0.479837, 0.479627, 0.479417, 0.479205, 0.478993, 0.478781, 0.478567, 0.478353, 0.478138, 0.477922, 0.477706, 0.477489, 0.477271, 0.477052, 0.476833, 0.476613, 0.476392, 0.47617, 0.475948, 0.475725, 0.475501, 0.475276, 0.475051, 0.474825, 0.474598, 0.47437, 0.474142, 0.473913, 0.473683, 0.473452, 0.473221, 0.472989, 0.472756, 0.472522, 0.472288, 0.472053, 0.471817, 0.47158, 0.471342, 0.471104, 0.470865, 0.470625, 0.470385, 0.470144, 0.469901, 0.469659, 0.469415, 0.469171, 0.468925, 0.468679, 0.468433, 0.468185, 0.467937, 0.467688, 0.467438, 0.467187, 0.466936, 0.466684, 0.466431, 0.466177, 0.465923, 0.465667, 0.465411, 0.465154, 0.464897, 0.464638, 0.464379, 0.464119, 0.463858, 0.463596, 0.463334, 0.463071, 0.462807, 0.462542, 0.462276, 0.46201, 0.461743, 0.461475, 0.461206, 0.460936, 0.460666, 0.460395, 0.460122, 0.45985, 0.459576, 0.459301, 0.459026, 0.45875, 0.458473, 0.458195, 0.457917, 0.457637, 0.457357, 0.457076, 0.456794, 0.456512, 0.456228, 0.455944, 0.455659, 0.455373, 0.455086, 0.454799, 0.45451, 0.454221, 0.453931, 0.45364, 0.453348, 0.453055, 0.452762, 0.452468, 0.452173, 0.451877, 0.45158, 0.451282, 0.450984, 0.450684, 0.450384, 0.450083, 0.449781, 0.449478, 0.449175, 0.44887, 0.448565, 0.448259, 0.447952, 0.447644, 0.447335, 0.447026, 0.446715, 0.446404, 0.446092, 0.445779, 0.445465, 0.44515, 0.444834, 0.444518, 0.4442, 0.443882, 0.443563, 0.443243, 0.442922, 0.4426, 0.442277, 0.441954, 0.441629, 0.441304, 0.440978, 0.440651, 0.440323, 0.439994, 0.439664, 0.439333, 0.439002, 0.438669, 0.438336, 0.438001, 0.437666, 0.43733, 0.436993, 0.436655, 0.436316, 0.435977, 0.435636, 0.435295, 0.434952, 0.434609, 0.434264, 0.433919, 0.433573, 0.433226, 0.432878, 0.432529, 0.432179, 0.431828, 0.431477, 0.431124, 0.430771, 0.430416, 0.430061, 0.429704, 0.429347, 0.428989, 0.42863, 0.428269, 0.427908, 0.427546, 0.427183, 0.426819, 0.426454, 0.426089, 0.425722, 0.425354, 0.424985, 0.424616, 0.424245, 0.423873, 0.423501, 0.423127, 0.422753, 0.422377, 0.422001, 0.421623, 0.421245, 0.420865, 0.420485, 0.420104, 0.419721, 0.419338, 0.418954, 0.418568, 0.418182, 0.417795, 0.417406, 0.417017, 0.416627, 0.416235, 0.415843, 0.41545, 0.415055, 0.41466, 0.414264, 0.413866, 0.413468, 0.413068, 0.412668, 0.412266, 0.411864, 0.41146, 0.411056, 0.41065, 0.410244, 0.409836, 0.409427, 0.409018, 0.408607, 0.408195, 0.407782, 0.407368, 0.406954, 0.406538, 0.40612, 0.405702, 0.405283, 0.404863, 0.404442, 0.404019, 0.403596, 0.403171, 0.402746, 0.402319, 0.401892, 0.401463, 0.401033, 0.400602, 0.40017, 0.399737, 0.399303, 0.398867, 0.398431, 0.397993, 0.397555, 0.397115, 0.396674, 0.396232, 0.395789, 0.395345, 0.3949, 0.394454, 0.394006, 0.393558, 0.393108, 0.392657, 0.392205, 0.391752, 0.391298, 0.390842, 0.390386, 0.389928, 0.389469, 0.389009, 0.388548, 0.388086, 0.387623, 0.387158, 0.386692, 0.386226, 0.385758, 0.385288, 0.384818, 0.384346, 0.383874, 0.3834, 0.382925, 0.382448, 0.381971, 0.381492, 0.381012, 0.380531, 0.380049, 0.379566, 0.379081, 0.378595, 0.378108, 0.37762, 0.377131, 0.37664, 0.376148, 0.375655, 0.37516, 0.374665, 0.374168, 0.37367, 0.373171, 0.37267, 0.372168, 0.371665, 0.371161, 0.370656, 0.370149, 0.369641, 0.369131, 0.368621, 0.368109, 0.367596, 0.367081, 0.366566, 0.366049, 0.365531, 0.365011, 0.36449, 0.363968, 0.363445, 0.36292, 0.362394, 0.361867, 0.361338, 0.360808, 0.360277, 0.359744, 0.35921, 0.358675, 0.358138, 0.3576, 0.357061, 0.35652, 0.355979, 0.355435, 0.354891, 0.354345, 0.353797, 0.353248, 0.352698, 0.352147, 0.351594, 0.35104, 0.350484, 0.349927, 0.349369, 0.348809, 0.348248, 0.347685, 0.347121, 0.346556, 0.345989, 0.345421, 0.344851, 0.34428, 0.343707, 0.343133, 0.342558, 0.341981, 0.341403, 0.340823, 0.340242, 0.339659, 0.339075, 0.33849, 0.337903, 0.337314, 0.336724, 0.336133, 0.33554, 0.334945, 0.334349, 0.333752, 0.333153, 0.332552, 0.33195, 0.331347, 0.330742, 0.330135, 0.329527, 0.328918, 0.328306, 0.327694, 0.32708, 0.326464, 0.325846, 0.325227, 0.324607, 0.323985, 0.323361, 0.322736, 0.322109, 0.321481, 0.320851, 0.320219, 0.319586, 0.318951, 0.318315, 0.317677, 0.317037, 0.316396, 0.315753, 0.315108, 0.314462, 0.313814, 0.313164, 0.312513, 0.31186, 0.311206, 0.310549, 0.309891, 0.309232, 0.30857, 0.307907, 0.307243, 0.306576, 0.305908, 0.305238, 0.304567, 0.303893, 0.303218, 0.302541, 0.301863, 0.301182, 0.3005, 0.299816, 0.299131, 0.298443, 0.297754, 0.297063, 0.29637, 0.295676, 0.294979, 0.294281, 0.293581, 0.292879, 0.292175, 0.29147, 0.290763, 0.290053, 0.289342, 0.288629, 0.287914, 0.287198, 0.286479, 0.285758, 0.285036, 0.284312, 0.283585, 0.282857, 0.282127, 0.281395, 0.280661, 0.279925, 0.279187, 0.278448, 0.277706, 0.276962, 0.276216, 0.275469, 0.274719, 0.273967, 0.273213, 0.272458, 0.2717, 0.27094, 0.270178, 0.269414, 0.268648, 0.26788, 0.26711, 0.266338, 0.265564, 0.264788, 0.264009, 0.263229, 0.262446, 0.261661, 0.260874, 0.260085, 0.259294, 0.2585, 0.257705, 0.256907, 0.256107, 0.255305, 0.254501, 0.253694, 0.252886, 0.252075, 0.251261, 0.250446, 0.249628, 0.248808, 0.247986, 0.247162, 0.246335, 0.245506, 0.244674, 0.243841, 0.243005, 0.242166, 0.241326, 0.240482, 0.239637, 0.238789, 0.237939, 0.237086, 0.236232, 0.235374, 0.234514, 0.233652, 0.232787, 0.23192, 0.231051, 0.230179, 0.229304, 0.228427, 0.227547, 0.226665, 0.225781, 0.224894, 0.224004, 0.223112, 0.222217, 0.22132, 0.22042, 0.219517, 0.218612, 0.217704, 0.216794, 0.21588, 0.214965, 0.214046, 0.213125, 0.212201, 0.211275, 0.210346, 0.209414, 0.208479, 0.207542, 0.206601, 0.205658, 0.204712, 0.203764, 0.202812, 0.201858, 0.200901, 0.199941, 0.198978, 0.198013, 0.197044, 0.196072, 0.195098, 0.194121, 0.19314, 0.192157, 0.191171, 0.190181, 0.189189, 0.188194, 0.187195, 0.186194, 0.18519, 0.184182, 0.183171, 0.182158, 0.181141, 0.180121, 0.179098, 0.178071, 0.177042, 0.176009, 0.174973, 0.173934, 0.172891, 0.171846, 0.170797, 0.169744, 0.168689, 0.16763, 0.166567, 0.165502, 0.164433, 0.16336, 0.162284, 0.161205, 0.160122, 0.159036, 0.157946, 0.156853, 0.155756, 0.154656, 0.153552, 0.152445, 0.151334, 0.150219, 0.1491, 0.147978, 0.146853, 0.145723, 0.14459, 0.143454, 0.142313, 0.141169, 0.14002, 0.138868, 0.137712, 0.136553, 0.135389, 0.134222, 0.13305, 0.131875, 0.130695, 0.129512, 0.128325, 0.127133, 0.125938, 0.124738, 0.123535, 0.122327, 0.121115, 0.119899, 0.118678, 0.117454, 0.116225, 0.114992, 0.113754, 0.112512, 0.111266, 0.110016, 0.108761, 0.107501, 0.106238, 0.104969, 0.103696, 0.102419, 0.101137, 0.0998506, 0.0985594, 0.0972635, 0.095963, 0.0946578, 0.0933478, 0.092033, 0.0907135, 0.0893891, 0.0880598, 0.0867257, 0.0853866, 0.0840426, 0.0826935, 0.0813395, 0.0799804, 0.0786162, 0.0772469, 0.0758724, 0.0744928, 0.0731079, 0.0717178, 0.0703224, 0.0689217, 0.0675156, 0.0661041, 0.0646872, 0.0632648, 0.0618369, 0.0604034, 0.0589644, 0.0575198, 0.0560695, 0.0546135, 0.0531518, 0.0516843, 0.0502109, 0.0487318, 0.0472467, 0.0457557, 0.0442587, 0.0427557, 0.0412466, 0.0397314, 0.03821, 0.0366825, 0.0351487, 0.0336086, 0.0320622, 0.0305093, 0.0289501, 0.0273844, 0.0258122, 0.0242334, 0.0226479, 0.0210558, 0.019457, 0.0178514, 0.0162389, 0.0146196, 0.0129934, 0.0113602, 0.00971992, 0.00807257, 0.00641807, 0.00475636, 0.00308739, 0.00141111, -0.000272556, -0.00196365, -0.00366225, -0.0053684, -0.00708216, -0.00880361, -0.0105328, -0.0122698, -0.0140146, -0.0157674, -0.0175282, -0.0192971, -0.0210741, -0.0228593, -0.0246527, -0.0264546, -0.0282648, -0.0300835, -0.0319107, -0.0337466, -0.0355913, -0.0374446, -0.0393069, -0.0411781, -0.0430583, -0.0449476, -0.0468461, -0.0487538, -0.0506709, -0.0525974, -0.0545334, -0.0564791, -0.0584344, -0.0603995, -0.0623745, -0.0643594, -0.0663544, -0.0683596, -0.070375, -0.0724007, -0.0744369, -0.0764836, -0.078541, -0.0806091, -0.0826881, -0.0847781, -0.0868791, -0.0889913, -0.0911148, -0.0932497, -0.0953961, -0.0975541, -0.0997239, -0.101906, -0.104099, -0.106305, -0.108523, -0.110754, -0.112996, -0.115252, -0.11752, -0.119802, -0.122096, -0.124403, -0.126724, -0.129059, -0.131406, -0.133768, -0.136144, -0.138534, -0.140938, -0.143356, -0.145789, -0.148237, -0.150699, -0.153177, -0.15567, -0.158178, -0.160702, -0.163242, -0.165798, -0.16837, -0.170958, -0.173563, -0.176185, -0.178824, -0.18148, -0.184153, -0.186844, -0.189553, -0.19228, -0.195025, -0.197789, -0.200572, -0.203374, -0.206195, -0.209035, -0.211896, -0.214776, -0.217677, -0.220598, -0.223541, -0.226504, -0.229489, -0.232496, -0.235525, -0.238577, -0.241651, -0.244748, -0.247869, -0.251013, -0.254182, -0.257375, -0.260593, -0.263836, -0.267105, -0.270399, -0.273721, -0.277068, -0.280444, -0.283846, -0.287277, -0.290737, -0.294225, -0.297743, -0.301291, -0.30487, -0.308479, -0.31212, -0.315793, -0.319499, -0.323237, -0.32701, -0.330817, -0.334659, -0.338537, -0.34245, -0.346401, -0.350389, -0.354416, -0.358482, -0.362587, -0.366734, -0.370921, -0.375151, -0.379423, -0.38374, -0.388101, -0.392508, -0.396961, -0.401462, -0.406012, -0.410611, -0.415261, -0.419963, -0.424718, -0.429527, -0.434391, -0.439312, -0.444291, -0.44933, -0.454429, -0.45959, -0.464814, -0.470104, -0.475461, -0.480887, -0.486382, -0.49195, -0.497592, -0.50331, -0.509106, -0.514981, -0.52094, -0.526982, -0.533112, -0.539332, -0.545644, -0.55205, -0.558554, -0.56516, -0.571869, -0.578685, -0.585612, -0.592653, -0.599812, -0.607093, -0.614501, -0.622039, -0.629712, -0.637526, -0.645484, -0.653594, -0.66186, -0.670289, -0.678886, -0.68766, -0.696617, -0.705765, -0.715113, -0.724668, -0.734441, -0.744442, -0.754681, -0.76517, -0.775921, -0.786948, -0.798265, -0.809888, -0.821834, -0.83412, -0.846768, -0.859798, -0.873234, -0.887102, -0.901432, -0.916255, -0.931604, -0.94752, -0.964046, -0.98123, -0.999125, -1.01779, -1.03731, -1.05774, -1.07919, -1.10176, -1.12558, -1.15078, -1.17754, -1.20606, -1.2366, -1.26945, -1.305, -1.34374, -1.38628, -1.43345, -1.48639, -1.54671, -1.61679, -1.70042, -1.80411, -1.94063, -2.1409, -2.52388, -2.90512, -2.26104, -2.01228, -1.85509, -1.73989, -1.64892, -1.57373, -1.50964, -1.4538, -1.40432, -1.35989, -1.31958, -1.28269, -1.24869, -1.21715, -1.18774, -1.16019, -1.13428, -1.10983, -1.08667, -1.06469, -1.04376, -1.02378, -1.00469, -0.986393, -0.968834, -0.951955, -0.935705, -0.920039, -0.904915, -0.890299, -0.876155, -0.862456, -0.849173, -0.836283, -0.823762, -0.81159, -0.799748, -0.788219, -0.776986, -0.766035, -0.755351, -0.744923, -0.734737, -0.724784, -0.715052, -0.705531, -0.696214, -0.687091, -0.678155, -0.669397, -0.660812, -0.652391, -0.64413, -0.636022, -0.628061, -0.620243, -0.612561, -0.605013, -0.597592, -0.590295, -0.583118, -0.576056, -0.569106, -0.562266, -0.55553, -0.548896, -0.542362, -0.535923, -0.529578, -0.523324, -0.517157, -0.511076, -0.505079, -0.499162, -0.493324, -0.487563, -0.481877, -0.476264, -0.470722, -0.465249, -0.459843, -0.454504, -0.449229, -0.444016, -0.438865, -0.433774, -0.428741, -0.423765, -0.418845, -0.41398, -0.409169, -0.404409, -0.399701, -0.395043, -0.390434, -0.385872, -0.381358, -0.37689, -0.372467, -0.368089, -0.363753, -0.35946, -0.355209, -0.350999, -0.346829, -0.342698, -0.338605, -0.334551, -0.330534, -0.326553, -0.322608, -0.318699, -0.314824, -0.310983, -0.307175, -0.303401, -0.299658, -0.295948, -0.292268, -0.28862, -0.285001, -0.281412, -0.277853, -0.274322, -0.270819, -0.267344, -0.263897, -0.260476, -0.257082, -0.253715, -0.250373, -0.247056, -0.243765, -0.240498, -0.237255, -0.234036, -0.230841, -0.227669, -0.224519, -0.221393, -0.218288, -0.215206, -0.212145, -0.209105, -0.206087, -0.203089, -0.200112, -0.197155, -0.194217, -0.1913, -0.188402, -0.185523, -0.182662, -0.179821, -0.176998, -0.174193, -0.171406, -0.168637, -0.165885, -0.163151, -0.160433, -0.157733, -0.155049, -0.152382, -0.149731, -0.147096, -0.144476, -0.141873, -0.139285, -0.136712, -0.134155, -0.131612, -0.129085, -0.126571, -0.124073, -0.121588, -0.119118, -0.116662, -0.11422, -0.111791, -0.109376, -0.106974, -0.104585, -0.10221, -0.0998475, -0.0974978, -0.0951608, -0.0928363, -0.0905243, -0.0882246, -0.085937, -0.0836615, -0.0813978, -0.079146, -0.0769058, -0.0746772, -0.0724601, -0.0702543, -0.0680596, -0.0658761, -0.0637036, -0.061542, -0.0593911, -0.0572509, -0.0551213, -0.0530022, -0.0508935, -0.048795, -0.0467067, -0.0446285, -0.0425603, -0.0405019, -0.0384534, -0.0364146, -0.0343854, -0.0323658, -0.0303556, -0.0283548, -0.0263632, -0.0243809, -0.0224077, -0.0204435, -0.0184883, -0.0165419, -0.0146044, -0.0126755, -0.0107554, -0.00884378, -0.00694068, -0.00504602, -0.00315971, -0.00128169, 0.000588112, 0.00244977, 0.00430334, 0.0061489, 0.00798652, 0.00981625, 0.0116382, 0.0134523, 0.0152588, 0.0170577, 0.0188489, 0.0206327, 0.022409, 0.024178, 0.0259396, 0.0276939, 0.0294411, 0.031181, 0.0329139, 0.0346397, 0.0363586, 0.0380705, 0.0397755, 0.0414737, 0.0431651, 0.0448497, 0.0465277, 0.0481991, 0.0498639, 0.0515221, 0.0531739, 0.0548193, 0.0564582, 0.0580908, 0.0597172, 0.0613372, 0.0629511, 0.0645588, 0.0661604, 0.067756, 0.0693455, 0.070929, 0.0725066, 0.0740783, 0.0756441, 0.0772041, 0.0787584, 0.0803069, 0.0818497, 0.0833868, 0.0849184, 0.0864443, 0.0879647, 0.0894797, 0.0909891, 0.0924931, 0.0939917, 0.095485, 0.0969729, 0.0984556, 0.099933, 0.101405, 0.102872, 0.104334, 0.105791, 0.107242, 0.108689, 0.110131, 0.111567, 0.112999, 0.114426, 0.115847, 0.117264, 0.118677, 0.120084, 0.121487, 0.122884, 0.124278, 0.125666, 0.12705, 0.128429, 0.129804, 0.131174, 0.132539, 0.1339, 0.135257, 0.136609, 0.137956, 0.1393, 0.140638, 0.141973, 0.143303, 0.144629, 0.145951, 0.147268, 0.148581, 0.14989, 0.151195, 0.152495, 0.153792, 0.155084, 0.156373, 0.157657, 0.158937, 0.160213, 0.161486, 0.162754, 0.164018, 0.165279, 0.166535, 0.167788, 0.169037, 0.170281, 0.171523, 0.17276, 0.173994, 0.175223, 0.17645, 0.177672, 0.178891, 0.180106, 0.181317, 0.182525, 0.183729, 0.18493, 0.186127, 0.18732, 0.18851, 0.189696, 0.190879, 0.192059, 0.193235, 0.194407, 0.195576, 0.196742, 0.197905, 0.199063, 0.200219, 0.201371, 0.20252, 0.203666, 0.204808, 0.205947, 0.207083, 0.208216, 0.209345, 0.210471, 0.211594, 0.212714, 0.213831, 0.214945, 0.216055, 0.217162, 0.218266, 0.219368, 0.220466, 0.221561, 0.222653, 0.223742, 0.224828, 0.225911, 0.226991, 0.228068, 0.229142, 0.230213, 0.231281, 0.232346, 0.233409, 0.234468, 0.235525, 0.236579, 0.23763, 0.238678, 0.239723, 0.240766, 0.241806, 0.242843, 0.243877, 0.244909, 0.245937, 0.246963, 0.247987, 0.249007, 0.250025, 0.251041, 0.252053, 0.253063, 0.254071, 0.255075, 0.256077, 0.257077, 0.258074, 0.259068, 0.26006, 0.261049, 0.262036, 0.26302, 0.264001, 0.26498, 0.265957, 0.266931, 0.267902, 0.268872, 0.269838, 0.270802, 0.271764, 0.272723, 0.27368, 0.274635, 0.275587, 0.276537, 0.277484, 0.278429, 0.279372, 0.280312, 0.28125, 0.282185, 0.283119, 0.28405, 0.284978, 0.285905, 0.286829, 0.287751, 0.28867, 0.289588, 0.290503, 0.291415, 0.292326, 0.293234, 0.294141, 0.295045, 0.295946, 0.296846, 0.297743, 0.298639, 0.299532, 0.300423, 0.301311, 0.302198, 0.303083, 0.303965, 0.304845, 0.305724, 0.3066, 0.307474, 0.308346, 0.309216, 0.310084, 0.310949, 0.311813, 0.312675, 0.313535, 0.314392, 0.315248, 0.316102, 0.316953, 0.317803, 0.318651, 0.319496, 0.32034, 0.321182, 0.322022, 0.32286, 0.323696, 0.32453, 0.325362, 0.326192, 0.32702, 0.327846, 0.328671, 0.329494, 0.330314, 0.331133, 0.33195, 0.332765, 0.333578, 0.33439, 0.335199, 0.336007, 0.336813, 0.337617, 0.338419, 0.339219, 0.340018, 0.340815, 0.34161, 0.342403, 0.343195, 0.343984, 0.344772, 0.345558, 0.346343, 0.347125, 0.347906, 0.348685, 0.349463, 0.350239, 0.351013, 0.351785, 0.352555, 0.353324, 0.354092, 0.354857, 0.355621, 0.356383, 0.357143, 0.357902, 0.358659, 0.359415, 0.360169, 0.360921, 0.361671, 0.36242, 0.363167, 0.363913, 0.364657, 0.365399, 0.36614, 0.366879, 0.367617, 0.368353, 0.369087, 0.36982, 0.370552, 0.371281, 0.372009, 0.372736, 0.373461, 0.374184, 0.374906, 0.375627, 0.376345, 0.377063, 0.377778, 0.378493, 0.379205, 0.379917, 0.380626, 0.381334, 0.382041, 0.382746, 0.38345, 0.384152, 0.384853, 0.385552, 0.38625, 0.386946, 0.387641, 0.388334, 0.389026, 0.389717, 0.390406, 0.391093, 0.39178, 0.392464, 0.393148, 0.393829, 0.39451, 0.395189, 0.395867, 0.396543, 0.397218, 0.397891, 0.398563, 0.399234, 0.399903, 0.400571, 0.401237, 0.401902, 0.402566, 0.403228, 0.403889, 0.404549, 0.405207, 0.405864, 0.40652, 0.407174, 0.407827, 0.408478, 0.409129, 0.409778, 0.410425, 0.411071, 0.411716, 0.41236, 0.413002, 0.413643, 0.414283, 0.414921, 0.415558, 0.416194, 0.416829, 0.417462, 0.418094, 0.418725, 0.419354, 0.419982, 0.420609, 0.421235, 0.421859, 0.422482, 0.423104, 0.423725, 0.424344, 0.424962, 0.425579, 0.426194, 0.426809, 0.427422, 0.428034, 0.428645, 0.429254, 0.429862, 0.430469, 0.431075, 0.43168, 0.432283, 0.432886, 0.433487, 0.434086, 0.434685, 0.435283, 0.435879, 0.436474, 0.437068, 0.437661, 0.438252, 0.438842, 0.439432, 0.44002, 0.440607, 0.441192, 0.441777, 0.44236, 0.442943, 0.443524, 0.444104, 0.444683, 0.44526, 0.445837, 0.446412, 0.446987, 0.44756, 0.448132, 0.448703, 0.449273, 0.449841, 0.450409, 0.450976, 0.451541, 0.452105, 0.452668, 0.45323, 0.453791, 0.454351, 0.45491, 0.455468, 0.456024, 0.45658, 0.457134, 0.457688, 0.45824, 0.458791, 0.459341, 0.459891, 0.460439, 0.460986, 0.461531, 0.462076, 0.46262, 0.463163, 0.463705, 0.464245, 0.464785, 0.465323, 0.465861, 0.466397, 0.466933, 0.467467, 0.468001, 0.468533, 0.469064, 0.469594, 0.470124, 0.470652, 0.471179, 0.471705, 0.472231, 0.472755, 0.473278, 0.4738, 0.474321, 0.474842, 0.475361, 0.475879, 0.476396, 0.476912, 0.477428, 0.477942, 0.478455, 0.478967, 0.479479, 0.479989, 0.480498, 0.481007, 0.481514, 0.48202, 0.482526, 0.48303, 0.483534, 0.484036, 0.484538, 0.485039, 0.485538, 0.486037, 0.486535, 0.487032, 0.487528, 0.488022, 0.488516, 0.489009, 0.489502, 0.489993, 0.490483, 0.490972, 0.491461, 0.491948, 0.492435, 0.49292, 0.493405, 0.493889, 0.494372, 0.494853, 0.495334, 0.495815, 0.496294, 0.496772, 0.497249, 0.497726, 0.498201, 0.498676, 0.49915, 0.499623, 0.500094, 0.500566, 0.501036, 0.501505, 0.501973, 0.502441, 0.502907, 0.503373, 0.503838, 0.504302, 0.504765, 0.505227, 0.505689, 0.506149, 0.506609, 0.507067, 0.507525, 0.507982, 0.508438, 0.508893, 0.509348, 0.509801, 0.510254, 0.510706, 0.511157, 0.511607, 0.512056, 0.512505, 0.512952, 0.513399, 0.513845, 0.51429, 0.514734, 0.515177, 0.51562, 0.516061, 0.516502, 0.516942, 0.517381, 0.51782, 0.518257, 0.518694, 0.51913, 0.519565, 0.519999, 0.520432, 0.520865, 0.521297, 0.521728, 0.522158, 0.522587, 0.523015, 0.523443, 0.52387, 0.524296, 0.524721, 0.525146, 0.525569, 0.525992, 0.526414, 0.526836, 0.527256, 0.527676, 0.528094, 0.528513, 0.52893, 0.529346, 0.529762, 0.530177, 0.530591, 0.531004, 0.531417, 0.531829, 0.53224, 0.53265, 0.533059, 0.533468, 0.533876, 0.534283, 0.534689, 0.535095, 0.5355, 0.535904, 0.536307, 0.536709, 0.537111, 0.537512, 0.537912, 0.538312, 0.53871, 0.539108, 0.539506, 0.539902, 0.540298, 0.540693, 0.541087, 0.54148, 0.541873, 0.542265, 0.542656, 0.543046, 0.543436, 0.543825, 0.544213, 0.544601, 0.544987, 0.545373, 0.545759, 0.546143, 0.546527, 0.54691, 0.547292, 0.547674, 0.548055, 0.548435, 0.548814, 0.549193, 0.549571, 0.549948, 0.550325, 0.5507, 0.551075, 0.55145, 0.551823, 0.552196, 0.552569, 0.55294, 0.553311, 0.553681, 0.55405, 0.554419, 0.554787, 0.555154, 0.555521, 0.555886, 0.556252, 0.556616, 0.55698, 0.557343, 0.557705, 0.558067, 0.558428, 0.558788, 0.559147, 0.559506, 0.559864, 0.560222, 0.560579, 0.560935, 0.56129, 0.561645, 0.561999, 0.562352, 0.562705, 0.563057, 0.563408, 0.563759, 0.564108, 0.564458, 0.564806, 0.565154, 0.565501, 0.565848, 0.566194, 0.566539, 0.566883, 0.567227, 0.56757, 0.567913, 0.568255, 0.568596, 0.568936, 0.569276, 0.569615, 0.569954, 0.570292, 0.570629, 0.570966, 0.571301, 0.571637, 0.571971, 0.572305, 0.572638, 0.572971, 0.573303, 0.573634, 0.573965, 0.574295, 0.574624, 0.574953, 0.575281, 0.575608, 0.575935, 0.576261, 0.576586, 0.576911, 0.577235, 0.577559, 0.577882, 0.578204, 0.578526, 0.578847, 0.579167, 0.579487, 0.579806, 0.580124, 0.580442, 0.580759, 0.581076, 0.581391, 0.581707, 0.582021, 0.582335, 0.582649, 0.582961, 0.583274, 0.583585, 0.583896, 0.584206, 0.584516, 0.584825, 0.585133, 0.585441, 0.585748, 0.586055, 0.586361, 0.586666, 0.58697, 0.587275, 0.587578, 0.587881, 0.588183, 0.588485, 0.588786, 0.589086, 0.589386, 0.589685, 0.589984, 0.590281, 0.590579, 0.590876, 0.591172, 0.591467, 0.591762, 0.592056, 0.59235, 0.592643, 0.592936, 0.593228, 0.593519, 0.59381, 0.5941, 0.594389, 0.594678, 0.594967, 0.595254, 0.595542, 0.595828, 0.596114, 0.596399, 0.596684, 0.596968, 0.597252, 0.597535, 0.597817, 0.598099, 0.59838, 0.598661, 0.598941, 0.599221, 0.5995, 0.599778, 0.600056, 0.600333, 0.600609, 0.600885, 0.601161, 0.601436, 0.60171, 0.601984, 0.602257, 0.602529, 0.602801, 0.603073, 0.603343, 0.603614, 0.603883, 0.604152, 0.604421, 0.604689, 0.604956, 0.605223, 0.605489, 0.605755, 0.60602, 0.606285, 0.606549, 0.606812, 0.607075, 0.607337, 0.607599, 0.60786, 0.608121, 0.608381, 0.60864, 0.608899, 0.609157, 0.609415, 0.609672, 0.609929, 0.610185, 0.610441, 0.610696, 0.61095, 0.611204, 0.611457, 0.61171, 0.611962, 0.612214, 0.612465, 0.612716, 0.612966, 0.613215, 0.613464, 0.613712, 0.61396, 0.614208, 0.614454, 0.614701, 0.614946, 0.615191, 0.615436, 0.61568, 0.615923, 0.616166, 0.616409, 0.61665, 0.616892, 0.617132, 0.617373, 0.617612, 0.617851, 0.61809, 0.618328, 0.618566, 0.618803, 0.619039, 0.619275, 0.61951, 0.619745, 0.619979, 0.620213, 0.620446, 0.620679, 0.620911, 0.621143, 0.621374, 0.621605, 0.621835, 0.622064, 0.622293, 0.622522, 0.62275, 0.622977, 0.623204, 0.62343, 0.623656, 0.623881, 0.624106, 0.62433, 0.624554, 0.624777, 0.625, 0.625222, 0.625444, 0.625665, 0.625885, 0.626105, 0.626325, 0.626544, 0.626763, 0.626981, 0.627198, 0.627415, 0.627631, 0.627847, 0.628063, 0.628278, 0.628492, 0.628706, 0.628919, 0.629132, 0.629344, 0.629556, 0.629768, 0.629978, 0.630189, 0.630398, 0.630608, 0.630816, 0.631025, 0.631232, 0.63144, 0.631646, 0.631853, 0.632058, 0.632263, 0.632468, 0.632672, 0.632876, 0.633079, 0.633282, 0.633484, 0.633686, 0.633887, 0.634088, 0.634288, 0.634487, 0.634686, 0.634885, 0.635083, 0.635281, 0.635478, 0.635675, 0.635871, 0.636067, 0.636262, 0.636456, 0.636651, 0.636844, 0.637037, 0.63723, 0.637422, 0.637614, 0.637805, 0.637996, 0.638186, 0.638376, 0.638565, 0.638754, 0.638942, 0.63913, 0.639317, 0.639504, 0.63969, 0.639876, 0.640061, 0.640246, 0.64043, 0.640614, 0.640797, 0.64098, 0.641162, 0.641344, 0.641526, 0.641707, 0.641887, 0.642067, 0.642246, 0.642425, 0.642604, 0.642782, 0.642959, 0.643136, 0.643313, 0.643489, 0.643665, 0.64384, 0.644014, 0.644188, 0.644362, 0.644535, 0.644708, 0.64488, 0.645052, 0.645223, 0.645394, 0.645564, 0.645734, 0.645903, 0.646072, 0.646241, 0.646409, 0.646576, 0.646743, 0.646909, 0.647075, 0.647241, 0.647406, 0.647571, 0.647735, 0.647898, 0.648062, 0.648224, 0.648387, 0.648548, 0.64871, 0.64887, 0.649031, 0.649191, 0.64935, 0.649509, 0.649667, 0.649825, 0.649983, 0.65014, 0.650297, 0.650453, 0.650608, 0.650764, 0.650918, 0.651073, 0.651226, 0.65138, 0.651532, 0.651685, 0.651837, 0.651988, 0.652139, 0.65229, 0.65244, 0.652589, 0.652739, 0.652887, 0.653036, 0.653183, 0.653331, 0.653477, 0.653624, 0.65377, 0.653915, 0.65406, 0.654205, 0.654349, 0.654492, 0.654635, 0.654778, 0.65492, 0.655062, 0.655204, 0.655344, 0.655485, 0.655625, 0.655764, 0.655903, 0.656042, 0.65618, 0.656318, 0.656455, 0.656592, 0.656728, 0.656864, 0.656999, 0.657134, 0.657268, 0.657402, 0.657536, 0.657669, 0.657802, 0.657934, 0.658066, 0.658197, 0.658328, 0.658458, 0.658588, 0.658718, 0.658847, 0.658976, 0.659104, 0.659231, 0.659359, 0.659485, 0.659612, 0.659738, 0.659863, 0.659988, 0.660113, 0.660237, 0.66036, 0.660484, 0.660606, 0.660729, 0.660851, 0.660972, 0.661093, 0.661214, 0.661334, 0.661453, 0.661573, 0.661691, 0.66181, 0.661928, 0.662045, 0.662162, 0.662278, 0.662395, 0.66251, 0.662625, 0.66274, 0.662854, 0.662968, 0.663082, 0.663195, 0.663307, 0.663419, 0.663531, 0.663642, 0.663753, 0.663863, 0.663973, 0.664083, 0.664192, 0.6643, 0.664409, 0.664516, 0.664624, 0.66473, 0.664837, 0.664943, 0.665048, 0.665153, 0.665258, 0.665362, 0.665466, 0.665569, 0.665672, 0.665775, 0.665877, 0.665978, 0.666079, 0.66618, 0.66628, 0.66638, 0.66648, 0.666578, 0.666677, 0.666775, 0.666873, 0.66697, 0.667067, 0.667163, 0.667259, 0.667355, 0.66745, 0.667544, 0.667638, 0.667732, 0.667825, 0.667918, 0.668011, 0.668103, 0.668194, 0.668286, 0.668376, 0.668467, 0.668556, 0.668646, 0.668735, 0.668823, 0.668912, 0.668999, 0.669087, 0.669173, 0.66926, 0.669346, 0.669431, 0.669517, 0.669601, 0.669686, 0.669769, 0.669853, 0.669936, 0.670018, 0.670101, 0.670182, 0.670264, 0.670344, 0.670425, 0.670505, 0.670584, 0.670663, 0.670742, 0.67082, 0.670898, 0.670976, 0.671053, 0.671129, 0.671206, 0.671281, 0.671357, 0.671431, 0.671506, 0.67158, 0.671653, 0.671727, 0.671799, 0.671872, 0.671944, 0.672015, 0.672086, 0.672157, 0.672227, 0.672297, 0.672366, 0.672435, 0.672504, 0.672572, 0.672639, 0.672707, 0.672773, 0.67284, 0.672906, 0.672971, 0.673036, 0.673101, 0.673165, 0.673229, 0.673293, 0.673356, 0.673418, 0.673481, 0.673542, 0.673604, 0.673665, 0.673725, 0.673785, 0.673845, 0.673904, 0.673963, 0.674021, 0.674079, 0.674137, 0.674194, 0.674251, 0.674307, 0.674363, 0.674418, 0.674473, 0.674528, 0.674582, 0.674636, 0.674689, 0.674742, 0.674795, 0.674847, 0.674898, 0.67495, 0.675001, 0.675051, 0.675101, 0.675151, 0.6752, 0.675249, 0.675297, 0.675345, 0.675392, 0.675439, 0.675486, 0.675532, 0.675578, 0.675624, 0.675669, 0.675713, 0.675757, 0.675801, 0.675844, 0.675887, 0.67593, 0.675972, 0.676014, 0.676055, 0.676096, 0.676136, 0.676176, 0.676216, 0.676255, 0.676294, 0.676332, 0.67637, 0.676407, 0.676445, 0.676481, 0.676517, 0.676553, 0.676589, 0.676624, 0.676658, 0.676693, 0.676726, 0.67676, 0.676793, 0.676825, 0.676857, 0.676889, 0.67692, 0.676951, 0.676982, 0.677012, 0.677041, 0.677071, 0.677099, 0.677128, 0.677156, 0.677183, 0.677211, 0.677237, 0.677264, 0.67729, 0.677315, 0.67734, 0.677365, 0.677389, 0.677413, 0.677436, 0.67746, 0.677482, 0.677504, 0.677526, 0.677548, 0.677568, 0.677589, 0.677609, 0.677629, 0.677648, 0.677667, 0.677686, 0.677704, 0.677721, 0.677739, 0.677756, 0.677772, 0.677788, 0.677804, 0.677819, 0.677834, 0.677848, 0.677862, 0.677876, 0.677889, 0.677901, 0.677914, 0.677926, 0.677937, 0.677948, 0.677959, 0.677969, 0.677979, 0.677988, 0.677997, 0.678006, 0.678014, 0.678022, 0.67803, 0.678036, 0.678043, 0.678049, 0.678055, 0.67806, 0.678065, 0.67807, 0.678074, 0.678078, 0.678081, 0.678084, 0.678086, 0.678088, 0.67809, 0.678091, 0.678092, 0.678092, 0.678092, 0.678092, 0.678091, 0.67809, 0.678088, 0.678086, 0.678084, 0.678081, 0.678078, 0.678074, 0.67807, 0.678065, 0.67806, 0.678055, 0.678049, 0.678043, 0.678036, 0.678029, 0.678022, 0.678014, 0.678006, 0.677997, 0.677988, 0.677979, 0.677969, 0.677959, 0.677948, 0.677937, 0.677926, 0.677914, 0.677901, 0.677889, 0.677876, 0.677862, 0.677848, 0.677834, 0.677819, 0.677804, 0.677788, 0.677772, 0.677756, 0.677739, 0.677722, 0.677704, 0.677686, 0.677668, 0.677649, 0.67763, 0.67761, 0.67759, 0.677569, 0.677548, 0.677527, 0.677505, 0.677483, 0.677461, 0.677438, 0.677414, 0.67739, 0.677366, 0.677342, 0.677317, 0.677291, 0.677265, 0.677239, 0.677212, 0.677185, 0.677158, 0.67713, 0.677102, 0.677073, 0.677044, 0.677014, 0.676984 +}; #endif /* MULTIPATH_V0_M6_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v0_M8.h b/src/lte/model/JakesTraces/multipath_v0_M8.h index d56d83623..4042155e7 100644 --- a/src/lte/model/JakesTraces/multipath_v0_M8.h +++ b/src/lte/model/JakesTraces/multipath_v0_M8.h @@ -24,8 +24,8 @@ #define MULTIPATH_V0_M8_H_ static double multipath_M8_v_0[3000] = { - 0.572043, 0.572042, 0.572041, 0.572039, 0.572036, 0.572033, 0.572029, 0.572024, 0.572019, 0.572013, 0.572007, 0.572, 0.571993, 0.571985, 0.571976, 0.571967, 0.571957, 0.571946, 0.571935, 0.571923, 0.571911, 0.571898, 0.571885, 0.571871, 0.571856, 0.571841, 0.571825, 0.571808, 0.571791, 0.571773, 0.571755, 0.571736, 0.571717, 0.571697, 0.571676, 0.571655, 0.571633, 0.57161, 0.571587, 0.571563, 0.571539, 0.571514, 0.571489, 0.571462, 0.571436, 0.571408, 0.57138, 0.571352, 0.571323, 0.571293, 0.571263, 0.571232, 0.5712, 0.571168, 0.571135, 0.571102, 0.571068, 0.571033, 0.570998, 0.570963, 0.570926, 0.570889, 0.570852, 0.570814, 0.570775, 0.570735, 0.570695, 0.570655, 0.570614, 0.570572, 0.570529, 0.570486, 0.570443, 0.570399, 0.570354, 0.570308, 0.570262, 0.570216, 0.570168, 0.570121, 0.570072, 0.570023, 0.569973, 0.569923, 0.569872, 0.569821, 0.569769, 0.569716, 0.569663, 0.569609, 0.569554, 0.569499, 0.569443, 0.569387, 0.56933, 0.569273, 0.569214, 0.569156, 0.569096, 0.569036, 0.568976, 0.568915, 0.568853, 0.56879, 0.568727, 0.568664, 0.568599, 0.568534, 0.568469, 0.568403, 0.568336, 0.568269, 0.568201, 0.568132, 0.568063, 0.567994, 0.567923, 0.567852, 0.567781, 0.567708, 0.567636, 0.567562, 0.567488, 0.567414, 0.567338, 0.567262, 0.567186, 0.567109, 0.567031, 0.566953, 0.566874, 0.566794, 0.566714, 0.566633, 0.566552, 0.56647, 0.566387, 0.566304, 0.56622, 0.566135, 0.56605, 0.565964, 0.565878, 0.565791, 0.565704, 0.565615, 0.565526, 0.565437, 0.565347, 0.565256, 0.565165, 0.565073, 0.56498, 0.564887, 0.564793, 0.564699, 0.564604, 0.564508, 0.564412, 0.564315, 0.564218, 0.564119, 0.564021, 0.563921, 0.563821, 0.563721, 0.563619, 0.563517, 0.563415, 0.563312, 0.563208, 0.563103, 0.562998, 0.562893, 0.562786, 0.562679, 0.562572, 0.562464, 0.562355, 0.562245, 0.562135, 0.562025, 0.561913, 0.561801, 0.561689, 0.561576, 0.561462, 0.561347, 0.561232, 0.561116, 0.561, 0.560883, 0.560765, 0.560647, 0.560528, 0.560409, 0.560288, 0.560167, 0.560046, 0.559924, 0.559801, 0.559678, 0.559554, 0.559429, 0.559304, 0.559178, 0.559051, 0.558924, 0.558796, 0.558668, 0.558539, 0.558409, 0.558278, 0.558147, 0.558016, 0.557883, 0.55775, 0.557617, 0.557482, 0.557347, 0.557212, 0.557076, 0.556939, 0.556801, 0.556663, 0.556524, 0.556385, 0.556245, 0.556104, 0.555963, 0.555821, 0.555678, 0.555535, 0.555391, 0.555246, 0.555101, 0.554955, 0.554808, 0.554661, 0.554513, 0.554364, 0.554215, 0.554065, 0.553915, 0.553763, 0.553612, 0.553459, 0.553306, 0.553152, 0.552998, 0.552842, 0.552687, 0.55253, 0.552373, 0.552215, 0.552057, 0.551898, 0.551738, 0.551577, 0.551416, 0.551255, 0.551092, 0.550929, 0.550765, 0.550601, 0.550436, 0.55027, 0.550104, 0.549936, 0.549769, 0.5496, 0.549431, 0.549261, 0.549091, 0.54892, 0.548748, 0.548576, 0.548402, 0.548229, 0.548054, 0.547879, 0.547703, 0.547527, 0.547349, 0.547171, 0.546993, 0.546814, 0.546634, 0.546453, 0.546272, 0.54609, 0.545907, 0.545724, 0.54554, 0.545355, 0.54517, 0.544984, 0.544797, 0.54461, 0.544421, 0.544233, 0.544043, 0.543853, 0.543662, 0.54347, 0.543278, 0.543085, 0.542892, 0.542697, 0.542502, 0.542307, 0.54211, 0.541913, 0.541715, 0.541517, 0.541317, 0.541118, 0.540917, 0.540716, 0.540514, 0.540311, 0.540107, 0.539903, 0.539699, 0.539493, 0.539287, 0.53908, 0.538872, 0.538664, 0.538455, 0.538245, 0.538035, 0.537823, 0.537611, 0.537399, 0.537186, 0.536972, 0.536757, 0.536541, 0.536325, 0.536108, 0.535891, 0.535672, 0.535453, 0.535234, 0.535013, 0.534792, 0.53457, 0.534347, 0.534124, 0.5339, 0.533675, 0.533449, 0.533223, 0.532996, 0.532768, 0.53254, 0.532311, 0.532081, 0.53185, 0.531619, 0.531387, 0.531154, 0.53092, 0.530686, 0.530451, 0.530215, 0.529979, 0.529741, 0.529503, 0.529265, 0.529025, 0.528785, 0.528544, 0.528302, 0.52806, 0.527817, 0.527573, 0.527328, 0.527082, 0.526836, 0.526589, 0.526342, 0.526093, 0.525844, 0.525594, 0.525343, 0.525092, 0.52484, 0.524587, 0.524333, 0.524078, 0.523823, 0.523567, 0.52331, 0.523053, 0.522794, 0.522535, 0.522275, 0.522015, 0.521753, 0.521491, 0.521228, 0.520965, 0.5207, 0.520435, 0.520169, 0.519902, 0.519635, 0.519366, 0.519097, 0.518827, 0.518557, 0.518285, 0.518013, 0.51774, 0.517466, 0.517191, 0.516916, 0.51664, 0.516363, 0.516085, 0.515807, 0.515527, 0.515247, 0.514966, 0.514684, 0.514402, 0.514119, 0.513834, 0.51355, 0.513264, 0.512977, 0.51269, 0.512402, 0.512113, 0.511823, 0.511533, 0.511241, 0.510949, 0.510656, 0.510362, 0.510068, 0.509772, 0.509476, 0.509179, 0.508881, 0.508582, 0.508283, 0.507983, 0.507681, 0.507379, 0.507077, 0.506773, 0.506468, 0.506163, 0.505857, 0.50555, 0.505242, 0.504934, 0.504624, 0.504314, 0.504003, 0.503691, 0.503378, 0.503064, 0.50275, 0.502434, 0.502118, 0.501801, 0.501483, 0.501165, 0.500845, 0.500525, 0.500203, 0.499881, 0.499558, 0.499234, 0.49891, 0.498584, 0.498257, 0.49793, 0.497602, 0.497273, 0.496943, 0.496612, 0.496281, 0.495948, 0.495615, 0.49528, 0.494945, 0.494609, 0.494272, 0.493934, 0.493596, 0.493256, 0.492916, 0.492574, 0.492232, 0.491889, 0.491545, 0.4912, 0.490854, 0.490508, 0.49016, 0.489812, 0.489462, 0.489112, 0.488761, 0.488409, 0.488056, 0.487702, 0.487347, 0.486991, 0.486635, 0.486277, 0.485919, 0.485559, 0.485199, 0.484838, 0.484476, 0.484113, 0.483749, 0.483384, 0.483018, 0.482651, 0.482283, 0.481915, 0.481545, 0.481175, 0.480803, 0.480431, 0.480058, 0.479683, 0.479308, 0.478932, 0.478555, 0.478177, 0.477798, 0.477418, 0.477037, 0.476655, 0.476272, 0.475888, 0.475503, 0.475118, 0.474731, 0.474343, 0.473954, 0.473565, 0.473174, 0.472783, 0.47239, 0.471997, 0.471602, 0.471206, 0.47081, 0.470412, 0.470014, 0.469615, 0.469214, 0.468813, 0.46841, 0.468007, 0.467602, 0.467197, 0.46679, 0.466383, 0.465974, 0.465565, 0.465154, 0.464743, 0.46433, 0.463917, 0.463502, 0.463087, 0.46267, 0.462252, 0.461834, 0.461414, 0.460993, 0.460571, 0.460149, 0.459725, 0.4593, 0.458874, 0.458447, 0.458019, 0.45759, 0.457159, 0.456728, 0.456296, 0.455863, 0.455428, 0.454993, 0.454556, 0.454119, 0.45368, 0.45324, 0.452799, 0.452358, 0.451915, 0.45147, 0.451025, 0.450579, 0.450132, 0.449683, 0.449234, 0.448783, 0.448332, 0.447879, 0.447425, 0.44697, 0.446514, 0.446056, 0.445598, 0.445138, 0.444678, 0.444216, 0.443753, 0.443289, 0.442824, 0.442358, 0.441891, 0.441422, 0.440952, 0.440482, 0.44001, 0.439537, 0.439062, 0.438587, 0.43811, 0.437633, 0.437154, 0.436674, 0.436193, 0.43571, 0.435227, 0.434742, 0.434256, 0.433769, 0.433281, 0.432791, 0.432301, 0.431809, 0.431316, 0.430822, 0.430326, 0.42983, 0.429332, 0.428833, 0.428332, 0.427831, 0.427328, 0.426824, 0.426319, 0.425813, 0.425305, 0.424796, 0.424286, 0.423775, 0.423263, 0.422749, 0.422234, 0.421717, 0.4212, 0.420681, 0.420161, 0.41964, 0.419117, 0.418593, 0.418068, 0.417542, 0.417014, 0.416485, 0.415955, 0.415423, 0.41489, 0.414356, 0.413821, 0.413284, 0.412746, 0.412207, 0.411666, 0.411124, 0.410581, 0.410036, 0.40949, 0.408943, 0.408394, 0.407844, 0.407293, 0.40674, 0.406186, 0.405631, 0.405074, 0.404516, 0.403957, 0.403396, 0.402834, 0.40227, 0.401705, 0.401139, 0.400571, 0.400002, 0.399431, 0.398859, 0.398286, 0.397711, 0.397135, 0.396558, 0.395979, 0.395399, 0.394817, 0.394234, 0.393649, 0.393063, 0.392475, 0.391886, 0.391296, 0.390704, 0.390111, 0.389516, 0.38892, 0.388322, 0.387723, 0.387122, 0.38652, 0.385916, 0.385311, 0.384704, 0.384096, 0.383486, 0.382875, 0.382263, 0.381648, 0.381033, 0.380415, 0.379797, 0.379176, 0.378554, 0.377931, 0.377306, 0.376679, 0.376051, 0.375422, 0.37479, 0.374158, 0.373523, 0.372887, 0.37225, 0.371611, 0.37097, 0.370328, 0.369684, 0.369038, 0.368391, 0.367742, 0.367092, 0.36644, 0.365786, 0.36513, 0.364473, 0.363815, 0.363154, 0.362492, 0.361829, 0.361163, 0.360496, 0.359828, 0.359157, 0.358485, 0.357811, 0.357136, 0.356459, 0.35578, 0.355099, 0.354417, 0.353732, 0.353047, 0.352359, 0.351669, 0.350978, 0.350285, 0.349591, 0.348894, 0.348196, 0.347496, 0.346794, 0.34609, 0.345385, 0.344678, 0.343969, 0.343258, 0.342545, 0.34183, 0.341114, 0.340396, 0.339676, 0.338954, 0.33823, 0.337504, 0.336776, 0.336047, 0.335315, 0.334582, 0.333847, 0.333109, 0.33237, 0.331629, 0.330886, 0.330141, 0.329395, 0.328646, 0.327895, 0.327142, 0.326387, 0.325631, 0.324872, 0.324111, 0.323349, 0.322584, 0.321817, 0.321048, 0.320277, 0.319504, 0.318729, 0.317952, 0.317173, 0.316392, 0.315609, 0.314824, 0.314036, 0.313246, 0.312455, 0.311661, 0.310865, 0.310067, 0.309267, 0.308464, 0.30766, 0.306853, 0.306044, 0.305233, 0.30442, 0.303604, 0.302786, 0.301966, 0.301144, 0.30032, 0.299493, 0.298664, 0.297833, 0.296999, 0.296164, 0.295326, 0.294485, 0.293642, 0.292797, 0.29195, 0.2911, 0.290248, 0.289394, 0.288537, 0.287678, 0.286816, 0.285952, 0.285086, 0.284217, 0.283346, 0.282472, 0.281596, 0.280717, 0.279836, 0.278952, 0.278066, 0.277178, 0.276287, 0.275393, 0.274497, 0.273598, 0.272697, 0.271793, 0.270886, 0.269977, 0.269066, 0.268151, 0.267235, 0.266315, 0.265393, 0.264468, 0.26354, 0.26261, 0.261677, 0.260742, 0.259803, 0.258862, 0.257919, 0.256972, 0.256023, 0.25507, 0.254116, 0.253158, 0.252197, 0.251234, 0.250268, 0.249298, 0.248326, 0.247352, 0.246374, 0.245393, 0.24441, 0.243423, 0.242433, 0.241441, 0.240445, 0.239447, 0.238446, 0.237441, 0.236433, 0.235423, 0.234409, 0.233392, 0.232372, 0.231349, 0.230323, 0.229294, 0.228262, 0.227226, 0.226187, 0.225145, 0.2241, 0.223051, 0.222, 0.220945, 0.219886, 0.218825, 0.21776, 0.216692, 0.21562, 0.214545, 0.213466, 0.212385, 0.211299, 0.210211, 0.209119, 0.208023, 0.206924, 0.205821, 0.204715, 0.203605, 0.202492, 0.201375, 0.200254, 0.19913, 0.198002, 0.196871, 0.195736, 0.194597, 0.193454, 0.192308, 0.191158, 0.190004, 0.188846, 0.187685, 0.186519, 0.18535, 0.184177, 0.182999, 0.181818, 0.180633, 0.179444, 0.178251, 0.177054, 0.175853, 0.174648, 0.173439, 0.172225, 0.171008, 0.169786, 0.16856, 0.16733, 0.166096, 0.164857, 0.163614, 0.162367, 0.161115, 0.159859, 0.158599, 0.157334, 0.156065, 0.154791, 0.153513, 0.15223, 0.150943, 0.149651, 0.148354, 0.147053, 0.145747, 0.144436, 0.143121, 0.141801, 0.140476, 0.139147, 0.137812, 0.136473, 0.135128, 0.133779, 0.132425, 0.131066, 0.129701, 0.128332, 0.126958, 0.125578, 0.124193, 0.122803, 0.121408, 0.120007, 0.118602, 0.117191, 0.115774, 0.114352, 0.112925, 0.111492, 0.110053, 0.108609, 0.10716, 0.105704, 0.104243, 0.102777, 0.101304, 0.0998262, 0.0983422, 0.0968522, 0.0953564, 0.0938546, 0.0923467, 0.0908328, 0.0893129, 0.0877867, 0.0862544, 0.0847159, 0.0831711, 0.08162, 0.0800625, 0.0784986, 0.0769282, 0.0753513, 0.0737679, 0.0721779, 0.0705812, 0.0689778, 0.0673676, 0.0657507, 0.0641269, 0.0624961, 0.0608584, 0.0592137, 0.0575619, 0.055903, 0.0542369, 0.0525636, 0.0508829, 0.0491949, 0.0474995, 0.0457966, 0.0440861, 0.0423681, 0.0406424, 0.038909, 0.0371678, 0.0354188, 0.0336618, 0.0318969, 0.0301239, 0.0283428, 0.0265536, 0.0247561, 0.0229502, 0.021136, 0.0193133, 0.0174821, 0.0156422, 0.0137937, 0.0119364, 0.0100703, 0.00819531, 0.00631129, 0.0044182, 0.00251595, 0.000604468, -0.00131633, -0.00324654, -0.00518623, -0.0071355, -0.00909443, -0.0110631, -0.0130416, -0.0150301, -0.0170286, -0.0190372, -0.0210561, -0.0230852, -0.0251248, -0.0271749, -0.0292356, -0.031307, -0.0333892, -0.0354824, -0.0375866, -0.039702, -0.0418286, -0.0439666, -0.046116, -0.0482771, -0.0504499, -0.0526346, -0.0548312, -0.0570398, -0.0592607, -0.061494, -0.0637397, -0.065998, -0.068269, -0.0705529, -0.0728499, -0.0751599, -0.0774833, -0.0798201, -0.0821705, -0.0845346, -0.0869126, -0.0893047, -0.0917109, -0.0941316, -0.0965667, -0.0990165, -0.101481, -0.103961, -0.106456, -0.108966, -0.111492, -0.114034, -0.116591, -0.119165, -0.121755, -0.124362, -0.126985, -0.129625, -0.132283, -0.134958, -0.13765, -0.14036, -0.143088, -0.145835, -0.1486, -0.151383, -0.154186, -0.157008, -0.159849, -0.162711, -0.165592, -0.168493, -0.171415, -0.174358, -0.177322, -0.180307, -0.183314, -0.186344, -0.189395, -0.192469, -0.195566, -0.198687, -0.201831, -0.204999, -0.208192, -0.211409, -0.214651, -0.217919, -0.221213, -0.224533, -0.22788, -0.231254, -0.234655, -0.238085, -0.241542, -0.245029, -0.248545, -0.252091, -0.255668, -0.259275, -0.262913, -0.266584, -0.270287, -0.274023, -0.277792, -0.281596, -0.285435, -0.289309, -0.293219, -0.297166, -0.301151, -0.305173, -0.309234, -0.313335, -0.317477, -0.321659, -0.325884, -0.330151, -0.334462, -0.338817, -0.343218, -0.347665, -0.352159, -0.356702, -0.361295, -0.365937, -0.370631, -0.375378, -0.380179, -0.385035, -0.389947, -0.394916, -0.399945, -0.405034, -0.410184, -0.415398, -0.420677, -0.426023, -0.431436, -0.436919, -0.442474, -0.448102, -0.453806, -0.459587, -0.465448, -0.471391, -0.477417, -0.48353, -0.489732, -0.496026, -0.502413, -0.508898, -0.515483, -0.522171, -0.528965, -0.535869, -0.542886, -0.55002, -0.557276, -0.564656, -0.572166, -0.57981, -0.587593, -0.595519, -0.603595, -0.611827, -0.620219, -0.628778, -0.637512, -0.646427, -0.655532, -0.664833, -0.67434, -0.684063, -0.69401, -0.704193, -0.714622, -0.725311, -0.736272, -0.747519, -0.759068, -0.770936, -0.783139, -0.795698, -0.808634, -0.82197, -0.835732, -0.849947, -0.864646, -0.879864, -0.895637, -0.912009, -0.929026, -0.946741, -0.965213, -0.984509, -1.00471, -1.0259, -1.04818, -1.07167, -1.0965, -1.12285, -1.15091, -1.18092, -1.21316, -1.24799, -1.28587, -1.32738, -1.37328, -1.42464, -1.4829, -1.55022, -1.62993, -1.72767, -1.85402, -2.03299, -2.34284, -3.72775, -2.30836, -2.01564, -1.84233, -1.71877, -1.62267, -1.54402, -1.47744, -1.41972, -1.36877, -1.32316, -1.28189, -1.24419, -1.20951, -1.17738, -1.14746, -1.11947, -1.09317, -1.06836, -1.0449, -1.02263, -1.00145, -0.981244, -0.961938, -0.943451, -0.925716, -0.908675, -0.892275, -0.876469, -0.861216, -0.846479, -0.832224, -0.818419, -0.805038, -0.792056, -0.779448, -0.767195, -0.755276, -0.743674, -0.732372, -0.721356, -0.710611, -0.700123, -0.689882, -0.679876, -0.670094, -0.660526, -0.651163, -0.641996, -0.633018, -0.624221, -0.615597, -0.607141, -0.598845, -0.590703, -0.58271, -0.574861, -0.567151, -0.559574, -0.552126, -0.544803, -0.537601, -0.530515, -0.523542, -0.516679, -0.509922, -0.503268, -0.496713, -0.490256, -0.483892, -0.47762, -0.471436, -0.465339, -0.459325, -0.453393, -0.447541, -0.441765, -0.436065, -0.430439, -0.424884, -0.419398, -0.413981, -0.40863, -0.403343, -0.39812, -0.392958, -0.387857, -0.382814, -0.377829, -0.3729, -0.368026, -0.363206, -0.358438, -0.353722, -0.349056, -0.344439, -0.339871, -0.33535, -0.330875, -0.326446, -0.322061, -0.317719, -0.313421, -0.309164, -0.304948, -0.300772, -0.296637, -0.292539, -0.28848, -0.284459, -0.280474, -0.276525, -0.272611, -0.268732, -0.264888, -0.261076, -0.257298, -0.253553, -0.249839, -0.246156, -0.242505, -0.238883, -0.235292, -0.23173, -0.228196, -0.224691, -0.221214, -0.217765, -0.214342, -0.210946, -0.207577, -0.204233, -0.200915, -0.197622, -0.194353, -0.191109, -0.187889, -0.184693, -0.181519, -0.178369, -0.175242, -0.172136, -0.169053, -0.165991, -0.162951, -0.159932, -0.156934, -0.153956, -0.150999, -0.148061, -0.145143, -0.142245, -0.139366, -0.136506, -0.133664, -0.130841, -0.128036, -0.12525, -0.122481, -0.119729, -0.116995, -0.114278, -0.111578, -0.108895, -0.106228, -0.103577, -0.100943, -0.0983243, -0.0957216, -0.0931343, -0.0905625, -0.0880058, -0.0854641, -0.0829373, -0.0804251, -0.0779274, -0.0754441, -0.072975, -0.0705199, -0.0680786, -0.0656511, -0.0632371, -0.0608366, -0.0584493, -0.0560752, -0.053714, -0.0513657, -0.0490301, -0.0467071, -0.0443965, -0.0420983, -0.0398122, -0.0375383, -0.0352762, -0.033026, -0.0307875, -0.0285605, -0.026345, -0.0241409, -0.021948, -0.0197663, -0.0175955, -0.0154357, -0.0132867, -0.0111484, -0.00902067, -0.00690345, -0.00479662, -0.00270009, -0.000613762, 0.00146246, 0.00352868, 0.00558497, 0.00763145, 0.00966818, 0.0116953, 0.0137128, 0.0157209, 0.0177195, 0.0197089, 0.0216891, 0.0236601, 0.0256221, 0.0275751, 0.0295192, 0.0314544, 0.033381, 0.0352988, 0.0372081, 0.0391089, 0.0410012, 0.0428852, 0.0447608, 0.0466282, 0.0484875, 0.0503386, 0.0521817, 0.0540169, 0.0558442, 0.0576636, 0.0594753, 0.0612793, 0.0630756, 0.0648644, 0.0666456, 0.0684194, 0.0701857, 0.0719448, 0.0736965, 0.0754411, 0.0771784, 0.0789087, 0.0806319, 0.0823481, 0.0840573, 0.0857597, 0.0874552, 0.0891439, 0.0908259, 0.0925012, 0.0941698, 0.0958319, 0.0974874, 0.0991364, 0.100779, 0.102415, 0.104045, 0.105669, 0.107286, 0.108897, 0.110502, 0.112101, 0.113693, 0.11528, 0.116861, 0.118436, 0.120004, 0.121567, 0.123124, 0.124676, 0.126221, 0.127761, 0.129296, 0.130824, 0.132347, 0.133865, 0.135377, 0.136883, 0.138384, 0.13988, 0.14137, 0.142855, 0.144335, 0.145809, 0.147279, 0.148743, 0.150202, 0.151655, 0.153104, 0.154548, 0.155986, 0.15742, 0.158848, 0.160272, 0.161691, 0.163105, 0.164514, 0.165918, 0.167318, 0.168713, 0.170103, 0.171488, 0.172869, 0.174245, 0.175617, 0.176984, 0.178346, 0.179704, 0.181057, 0.182406, 0.183751, 0.185091, 0.186427, 0.187758, 0.189085, 0.190408, 0.191726, 0.193041, 0.194351, 0.195656, 0.196958, 0.198255, 0.199549, 0.200838, 0.202123, 0.203404, 0.204681, 0.205954, 0.207224, 0.208489, 0.20975, 0.211007, 0.21226, 0.21351, 0.214756, 0.215997, 0.217235, 0.218469, 0.2197, 0.220926, 0.222149, 0.223369, 0.224584, 0.225796, 0.227004, 0.228209, 0.22941, 0.230607, 0.231801, 0.232991, 0.234178, 0.235361, 0.236541, 0.237717, 0.23889, 0.240059, 0.241225, 0.242387, 0.243546, 0.244702, 0.245855, 0.247004, 0.248149, 0.249292, 0.250431, 0.251567, 0.252699, 0.253829, 0.254955, 0.256078, 0.257198, 0.258314, 0.259428, 0.260538, 0.261645, 0.262749, 0.26385, 0.264948, 0.266043, 0.267134, 0.268223, 0.269309, 0.270392, 0.271471, 0.272548, 0.273622, 0.274693, 0.27576, 0.276825, 0.277887, 0.278947, 0.280003, 0.281056, 0.282107, 0.283155, 0.2842, 0.285242, 0.286281, 0.287317, 0.288351, 0.289382, 0.29041, 0.291436, 0.292459, 0.293479, 0.294496, 0.295511, 0.296523, 0.297532, 0.298539, 0.299543, 0.300544, 0.301543, 0.302539, 0.303533, 0.304524, 0.305512, 0.306498, 0.307481, 0.308462, 0.309441, 0.310416, 0.31139, 0.31236, 0.313329, 0.314295, 0.315258, 0.316219, 0.317177, 0.318133, 0.319087, 0.320038, 0.320987, 0.321933, 0.322877, 0.323819, 0.324758, 0.325695, 0.32663, 0.327562, 0.328492, 0.32942, 0.330345, 0.331269, 0.332189, 0.333108, 0.334024, 0.334938, 0.33585, 0.33676, 0.337667, 0.338572, 0.339475, 0.340375, 0.341274, 0.34217, 0.343064, 0.343956, 0.344846, 0.345734, 0.346619, 0.347503, 0.348384, 0.349263, 0.35014, 0.351015, 0.351888, 0.352759, 0.353628, 0.354494, 0.355359, 0.356221, 0.357082, 0.35794, 0.358797, 0.359651, 0.360504, 0.361354, 0.362202, 0.363049, 0.363893, 0.364736, 0.365576, 0.366415, 0.367251, 0.368086, 0.368918, 0.369749, 0.370578, 0.371405, 0.37223, 0.373053, 0.373874, 0.374694, 0.375511, 0.376327, 0.37714, 0.377952, 0.378762, 0.37957, 0.380376, 0.381181, 0.381983, 0.382784, 0.383583, 0.38438, 0.385176, 0.385969, 0.386761, 0.387551, 0.388339, 0.389126, 0.38991, 0.390693, 0.391474, 0.392254, 0.393032, 0.393807, 0.394582, 0.395354, 0.396125, 0.396894, 0.397661, 0.398427, 0.399191, 0.399953, 0.400714, 0.401473, 0.40223, 0.402985, 0.403739, 0.404492, 0.405242, 0.405991, 0.406738, 0.407484, 0.408228, 0.40897, 0.409711, 0.41045, 0.411188, 0.411924, 0.412658, 0.413391, 0.414122, 0.414852, 0.41558, 0.416307, 0.417031, 0.417755, 0.418477, 0.419197, 0.419915, 0.420633, 0.421348, 0.422062, 0.422775, 0.423486, 0.424195, 0.424903, 0.42561, 0.426315, 0.427018, 0.42772, 0.428421, 0.42912, 0.429817, 0.430513, 0.431208, 0.431901, 0.432593, 0.433283, 0.433972, 0.434659, 0.435345, 0.436029, 0.436712, 0.437394, 0.438074, 0.438753, 0.43943, 0.440106, 0.44078, 0.441453, 0.442125, 0.442795, 0.443464, 0.444132, 0.444798, 0.445462, 0.446126, 0.446788, 0.447448, 0.448107, 0.448765, 0.449422, 0.450077, 0.450731, 0.451383, 0.452034, 0.452684, 0.453332, 0.453979, 0.454625, 0.45527, 0.455913, 0.456554, 0.457195, 0.457834, 0.458472, 0.459109, 0.459744, 0.460378, 0.461011, 0.461642, 0.462272, 0.462901, 0.463528, 0.464155, 0.46478, 0.465404, 0.466026, 0.466647, 0.467267, 0.467886, 0.468503, 0.46912, 0.469735, 0.470348, 0.470961, 0.471572, 0.472182, 0.472791, 0.473399, 0.474005, 0.47461, 0.475214, 0.475817, 0.476419, 0.477019, 0.477618, 0.478216, 0.478813, 0.479408, 0.480003, 0.480596, 0.481188, 0.481779, 0.482369, 0.482957, 0.483544, 0.48413, 0.484715, 0.485299, 0.485882, 0.486464, 0.487044, 0.487623, 0.488201, 0.488778, 0.489354, 0.489929, 0.490502, 0.491075, 0.491646, 0.492216, 0.492785, 0.493353, 0.49392, 0.494485, 0.49505, 0.495613, 0.496176, 0.496737, 0.497297, 0.497856, 0.498414, 0.498971, 0.499527, 0.500081, 0.500635, 0.501188, 0.501739, 0.502289, 0.502839, 0.503387, 0.503934, 0.50448, 0.505025, 0.505569, 0.506112, 0.506654, 0.507195, 0.507734, 0.508273, 0.508811, 0.509347, 0.509883, 0.510417, 0.510951, 0.511483, 0.512015, 0.512545, 0.513074, 0.513603, 0.51413, 0.514656, 0.515182, 0.515706, 0.516229, 0.516751, 0.517273, 0.517793, 0.518312, 0.51883, 0.519348, 0.519864, 0.520379, 0.520893, 0.521407, 0.521919, 0.52243, 0.52294, 0.52345, 0.523958, 0.524465, 0.524972, 0.525477, 0.525982, 0.526485, 0.526988, 0.527489, 0.52799, 0.528489, 0.528988, 0.529486, 0.529983, 0.530478, 0.530973, 0.531467, 0.53196, 0.532452, 0.532943, 0.533433, 0.533922, 0.534411, 0.534898, 0.535384, 0.53587, 0.536354, 0.536838, 0.537321, 0.537803, 0.538283, 0.538763, 0.539242, 0.539721, 0.540198, 0.540674, 0.541149, 0.541624, 0.542097, 0.54257, 0.543042, 0.543513, 0.543983, 0.544452, 0.54492, 0.545387, 0.545854, 0.546319, 0.546784, 0.547248, 0.54771, 0.548172, 0.548633, 0.549094, 0.549553, 0.550012, 0.550469, 0.550926, 0.551382, 0.551837, 0.552291, 0.552744, 0.553197, 0.553648, 0.554099, 0.554549, 0.554998, 0.555446, 0.555893, 0.556339, 0.556785, 0.55723, 0.557674, 0.558117, 0.558559, 0.559, 0.559441, 0.55988, 0.560319, 0.560757, 0.561194, 0.561631, 0.562066, 0.562501, 0.562935, 0.563368, 0.5638, 0.564232, 0.564662, 0.565092, 0.565521, 0.565949, 0.566376, 0.566803, 0.567229, 0.567654, 0.568078, 0.568501, 0.568923, 0.569345, 0.569766, 0.570186, 0.570605, 0.571024, 0.571441, 0.571858, 0.572274, 0.57269, 0.573104, 0.573518, 0.573931, 0.574343, 0.574754, 0.575165, 0.575575, 0.575984, 0.576392, 0.5768, 0.577206, 0.577612, 0.578017, 0.578422, 0.578825, 0.579228, 0.57963, 0.580032, 0.580432, 0.580832, 0.581231, 0.581629, 0.582027, 0.582423, 0.582819, 0.583215, 0.583609, 0.584003, 0.584396, 0.584788, 0.585179, 0.58557, 0.58596, 0.586349, 0.586738, 0.587126, 0.587513, 0.587899, 0.588284, 0.588669, 0.589053, 0.589436, 0.589819, 0.590201, 0.590582, 0.590962, 0.591342, 0.591721, 0.592099, 0.592477, 0.592853, 0.593229, 0.593605, 0.593979, 0.594353, 0.594726, 0.595099, 0.59547, 0.595841, 0.596212, 0.596581, 0.59695, 0.597318, 0.597686, 0.598052, 0.598418, 0.598784, 0.599148, 0.599512, 0.599875, 0.600238, 0.6006, 0.600961, 0.601321, 0.601681, 0.60204, 0.602398, 0.602756, 0.603113, 0.603469, 0.603824, 0.604179, 0.604533, 0.604887, 0.60524, 0.605592, 0.605943, 0.606294, 0.606644, 0.606993, 0.607342, 0.60769, 0.608037, 0.608384, 0.60873, 0.609075, 0.60942, 0.609764, 0.610107, 0.61045, 0.610792, 0.611133, 0.611474, 0.611814, 0.612153, 0.612491, 0.612829, 0.613167, 0.613503, 0.613839, 0.614175, 0.614509, 0.614843, 0.615176, 0.615509, 0.615841, 0.616173, 0.616503, 0.616833, 0.617163, 0.617491, 0.61782, 0.618147, 0.618474, 0.6188, 0.619125, 0.61945, 0.619775, 0.620098, 0.620421, 0.620743, 0.621065, 0.621386, 0.621706, 0.622026, 0.622345, 0.622664, 0.622982, 0.623299, 0.623615, 0.623931, 0.624246, 0.624561, 0.624875, 0.625189, 0.625501, 0.625814, 0.626125, 0.626436, 0.626746, 0.627056, 0.627365, 0.627673, 0.627981, 0.628288, 0.628595, 0.628901, 0.629206, 0.629511, 0.629815, 0.630118, 0.630421, 0.630723, 0.631025, 0.631326, 0.631626, 0.631926, 0.632225, 0.632524, 0.632822, 0.633119, 0.633416, 0.633712, 0.634007, 0.634302, 0.634597, 0.63489, 0.635183, 0.635476, 0.635768, 0.636059, 0.63635, 0.63664, 0.636929, 0.637218, 0.637507, 0.637794, 0.638082, 0.638368, 0.638654, 0.638939, 0.639224, 0.639508, 0.639792, 0.640075, 0.640357, 0.640639, 0.64092, 0.641201, 0.641481, 0.64176, 0.642039, 0.642318, 0.642595, 0.642872, 0.643149, 0.643425, 0.6437, 0.643975, 0.644249, 0.644523, 0.644796, 0.645068, 0.64534, 0.645612, 0.645882, 0.646153, 0.646422, 0.646691, 0.64696, 0.647228, 0.647495, 0.647762, 0.648028, 0.648294, 0.648559, 0.648823, 0.649087, 0.64935, 0.649613, 0.649875, 0.650137, 0.650398, 0.650659, 0.650919, 0.651178, 0.651437, 0.651695, 0.651953, 0.65221, 0.652467, 0.652723, 0.652978, 0.653233, 0.653488, 0.653741, 0.653995, 0.654247, 0.6545, 0.654751, 0.655002, 0.655253, 0.655503, 0.655752, 0.656001, 0.656249, 0.656497, 0.656744, 0.656991, 0.657237, 0.657483, 0.657728, 0.657972, 0.658216, 0.658459, 0.658702, 0.658944, 0.659186, 0.659427, 0.659668, 0.659908, 0.660148, 0.660387, 0.660625, 0.660863, 0.661101, 0.661338, 0.661574, 0.66181, 0.662045, 0.66228, 0.662514, 0.662748, 0.662981, 0.663214, 0.663446, 0.663677, 0.663908, 0.664139, 0.664369, 0.664598, 0.664827, 0.665056, 0.665283, 0.665511, 0.665738, 0.665964, 0.66619, 0.666415, 0.66664, 0.666864, 0.667087, 0.667311, 0.667533, 0.667755, 0.667977, 0.668198, 0.668418, 0.668638, 0.668858, 0.669077, 0.669295, 0.669513, 0.669731, 0.669947, 0.670164, 0.67038, 0.670595, 0.67081, 0.671024, 0.671238, 0.671451, 0.671664, 0.671876, 0.672088, 0.672299, 0.67251, 0.67272, 0.67293, 0.673139, 0.673348, 0.673556, 0.673763, 0.673971, 0.674177, 0.674383, 0.674589, 0.674794, 0.674999, 0.675203, 0.675407, 0.67561, 0.675812, 0.676014, 0.676216, 0.676417, 0.676618, 0.676818, 0.677017, 0.677216, 0.677415, 0.677613, 0.677811, 0.678008, 0.678204, 0.6784, 0.678596, 0.678791, 0.678986, 0.67918, 0.679373, 0.679566, 0.679759, 0.679951, 0.680143, 0.680334, 0.680525, 0.680715, 0.680904, 0.681093, 0.681282, 0.68147, 0.681658, 0.681845, 0.682032, 0.682218, 0.682404, 0.682589, 0.682774, 0.682958, 0.683142, 0.683325, 0.683508, 0.68369, 0.683872, 0.684053, 0.684234, 0.684415, 0.684594, 0.684774, 0.684953, 0.685131, 0.685309, 0.685487, 0.685664, 0.68584, 0.686016, 0.686192, 0.686367, 0.686541, 0.686715, 0.686889, 0.687062, 0.687235, 0.687407, 0.687579, 0.68775, 0.687921, 0.688091, 0.688261, 0.68843, 0.688599, 0.688767, 0.688935, 0.689102, 0.689269, 0.689436, 0.689602, 0.689767, 0.689932, 0.690097, 0.690261, 0.690425, 0.690588, 0.69075, 0.690913, 0.691074, 0.691236, 0.691396, 0.691557, 0.691717, 0.691876, 0.692035, 0.692193, 0.692351, 0.692509, 0.692666, 0.692822, 0.692978, 0.693134, 0.693289, 0.693444, 0.693598, 0.693752, 0.693905, 0.694058, 0.694211, 0.694362, 0.694514, 0.694665, 0.694815, 0.694966, 0.695115, 0.695264, 0.695413, 0.695561, 0.695709, 0.695856, 0.696003, 0.696149, 0.696295, 0.696441, 0.696586, 0.69673, 0.696874, 0.697018, 0.697161, 0.697304, 0.697446, 0.697588, 0.697729, 0.69787, 0.698011, 0.698151, 0.69829, 0.698429, 0.698568, 0.698706, 0.698843, 0.698981, 0.699117, 0.699254, 0.69939, 0.699525, 0.69966, 0.699795, 0.699929, 0.700062, 0.700195, 0.700328, 0.70046, 0.700592, 0.700723, 0.700854, 0.700985, 0.701115, 0.701244, 0.701373, 0.701502, 0.70163, 0.701758, 0.701885, 0.702012, 0.702139, 0.702265, 0.70239, 0.702515, 0.70264, 0.702764, 0.702888, 0.703011, 0.703134, 0.703256, 0.703378, 0.7035, 0.703621, 0.703741, 0.703861, 0.703981, 0.7041, 0.704219, 0.704338, 0.704456, 0.704573, 0.70469, 0.704807, 0.704923, 0.705039, 0.705154, 0.705269, 0.705383, 0.705497, 0.705611, 0.705724, 0.705836, 0.705949, 0.70606, 0.706172, 0.706283, 0.706393, 0.706503, 0.706613, 0.706722, 0.70683, 0.706939, 0.707046, 0.707154, 0.707261, 0.707367, 0.707473, 0.707579, 0.707684, 0.707789, 0.707893, 0.707997, 0.7081, 0.708203, 0.708306, 0.708408, 0.70851, 0.708611, 0.708712, 0.708812, 0.708912, 0.709012, 0.709111, 0.70921, 0.709308, 0.709406, 0.709503, 0.7096, 0.709696, 0.709793, 0.709888, 0.709983, 0.710078, 0.710172, 0.710266, 0.71036, 0.710453, 0.710546, 0.710638, 0.710729, 0.710821, 0.710912, 0.711002, 0.711092, 0.711182, 0.711271, 0.71136, 0.711448, 0.711536, 0.711623, 0.71171, 0.711797, 0.711883, 0.711969, 0.712054, 0.712139, 0.712224, 0.712308, 0.712391, 0.712474, 0.712557, 0.71264, 0.712721, 0.712803, 0.712884, 0.712965, 0.713045, 0.713125, 0.713204, 0.713283, 0.713361, 0.713439, 0.713517, 0.713594, 0.713671, 0.713747, 0.713823, 0.713899, 0.713974, 0.714049, 0.714123, 0.714197, 0.71427, 0.714343, 0.714416, 0.714488, 0.71456, 0.714631, 0.714702, 0.714772, 0.714842, 0.714912, 0.714981, 0.71505, 0.715118, 0.715186, 0.715254, 0.715321, 0.715387, 0.715454, 0.715519, 0.715585, 0.71565, 0.715714, 0.715778, 0.715842, 0.715905, 0.715968, 0.716031, 0.716093, 0.716154, 0.716216, 0.716276, 0.716337, 0.716397, 0.716456, 0.716515, 0.716574, 0.716632, 0.71669, 0.716748, 0.716805, 0.716861, 0.716917, 0.716973, 0.717029, 0.717083, 0.717138, 0.717192, 0.717246, 0.717299, 0.717352, 0.717404, 0.717456, 0.717508, 0.717559, 0.71761, 0.71766, 0.71771, 0.71776, 0.717809, 0.717857, 0.717906, 0.717954, 0.718001, 0.718048, 0.718095, 0.718141, 0.718187, 0.718232, 0.718277, 0.718322, 0.718366, 0.718409, 0.718453, 0.718496, 0.718538, 0.71858, 0.718622, 0.718663, 0.718704, 0.718744, 0.718784, 0.718824, 0.718863, 0.718902, 0.71894, 0.718978, 0.719015, 0.719052, 0.719089, 0.719125, 0.719161, 0.719197, 0.719232, 0.719266, 0.719301, 0.719334, 0.719368, 0.719401, 0.719433, 0.719465, 0.719497, 0.719528, 0.719559, 0.71959, 0.71962, 0.71965, 0.719679, 0.719708, 0.719736, 0.719764, 0.719792, 0.719819, 0.719846, 0.719872, 0.719898, 0.719924, 0.719949, 0.719974, 0.719998, 0.720022, 0.720046, 0.720069, 0.720091, 0.720114, 0.720135, 0.720157, 0.720178, 0.720199, 0.720219, 0.720239, 0.720258, 0.720277, 0.720296, 0.720314, 0.720332, 0.720349, 0.720366, 0.720383, 0.720399, 0.720414, 0.72043, 0.720445, 0.720459, 0.720473, 0.720487, 0.7205, 0.720513, 0.720526, 0.720538, 0.720549, 0.720561, 0.720571, 0.720582, 0.720592, 0.720601, 0.720611, 0.720619, 0.720628, 0.720636, 0.720643, 0.72065, 0.720657, 0.720664, 0.720669, 0.720675, 0.72068, 0.720685, 0.720689, 0.720693, 0.720696, 0.7207, 0.720702, 0.720704, 0.720706, 0.720708, 0.720709, 0.720709, 0.72071, 0.720709, 0.720709, 0.720708, 0.720706, 0.720705, 0.720702, 0.7207, 0.720697, 0.720693, 0.720689, 0.720685, 0.72068, 0.720675, 0.72067, 0.720664, 0.720658, 0.720651, 0.720644, 0.720636, 0.720628, 0.72062, 0.720611, 0.720602, 0.720593, 0.720583, 0.720572, 0.720561, 0.72055, 0.720539, 0.720527, 0.720514, 0.720501, 0.720488, 0.720475, 0.720461, 0.720446, 0.720431, 0.720416, 0.7204, 0.720384, 0.720368, 0.720351, 0.720334, 0.720316, 0.720298, 0.720279, 0.72026, 0.720241 - }; + 0.572043, 0.572042, 0.572041, 0.572039, 0.572036, 0.572033, 0.572029, 0.572024, 0.572019, 0.572013, 0.572007, 0.572, 0.571993, 0.571985, 0.571976, 0.571967, 0.571957, 0.571946, 0.571935, 0.571923, 0.571911, 0.571898, 0.571885, 0.571871, 0.571856, 0.571841, 0.571825, 0.571808, 0.571791, 0.571773, 0.571755, 0.571736, 0.571717, 0.571697, 0.571676, 0.571655, 0.571633, 0.57161, 0.571587, 0.571563, 0.571539, 0.571514, 0.571489, 0.571462, 0.571436, 0.571408, 0.57138, 0.571352, 0.571323, 0.571293, 0.571263, 0.571232, 0.5712, 0.571168, 0.571135, 0.571102, 0.571068, 0.571033, 0.570998, 0.570963, 0.570926, 0.570889, 0.570852, 0.570814, 0.570775, 0.570735, 0.570695, 0.570655, 0.570614, 0.570572, 0.570529, 0.570486, 0.570443, 0.570399, 0.570354, 0.570308, 0.570262, 0.570216, 0.570168, 0.570121, 0.570072, 0.570023, 0.569973, 0.569923, 0.569872, 0.569821, 0.569769, 0.569716, 0.569663, 0.569609, 0.569554, 0.569499, 0.569443, 0.569387, 0.56933, 0.569273, 0.569214, 0.569156, 0.569096, 0.569036, 0.568976, 0.568915, 0.568853, 0.56879, 0.568727, 0.568664, 0.568599, 0.568534, 0.568469, 0.568403, 0.568336, 0.568269, 0.568201, 0.568132, 0.568063, 0.567994, 0.567923, 0.567852, 0.567781, 0.567708, 0.567636, 0.567562, 0.567488, 0.567414, 0.567338, 0.567262, 0.567186, 0.567109, 0.567031, 0.566953, 0.566874, 0.566794, 0.566714, 0.566633, 0.566552, 0.56647, 0.566387, 0.566304, 0.56622, 0.566135, 0.56605, 0.565964, 0.565878, 0.565791, 0.565704, 0.565615, 0.565526, 0.565437, 0.565347, 0.565256, 0.565165, 0.565073, 0.56498, 0.564887, 0.564793, 0.564699, 0.564604, 0.564508, 0.564412, 0.564315, 0.564218, 0.564119, 0.564021, 0.563921, 0.563821, 0.563721, 0.563619, 0.563517, 0.563415, 0.563312, 0.563208, 0.563103, 0.562998, 0.562893, 0.562786, 0.562679, 0.562572, 0.562464, 0.562355, 0.562245, 0.562135, 0.562025, 0.561913, 0.561801, 0.561689, 0.561576, 0.561462, 0.561347, 0.561232, 0.561116, 0.561, 0.560883, 0.560765, 0.560647, 0.560528, 0.560409, 0.560288, 0.560167, 0.560046, 0.559924, 0.559801, 0.559678, 0.559554, 0.559429, 0.559304, 0.559178, 0.559051, 0.558924, 0.558796, 0.558668, 0.558539, 0.558409, 0.558278, 0.558147, 0.558016, 0.557883, 0.55775, 0.557617, 0.557482, 0.557347, 0.557212, 0.557076, 0.556939, 0.556801, 0.556663, 0.556524, 0.556385, 0.556245, 0.556104, 0.555963, 0.555821, 0.555678, 0.555535, 0.555391, 0.555246, 0.555101, 0.554955, 0.554808, 0.554661, 0.554513, 0.554364, 0.554215, 0.554065, 0.553915, 0.553763, 0.553612, 0.553459, 0.553306, 0.553152, 0.552998, 0.552842, 0.552687, 0.55253, 0.552373, 0.552215, 0.552057, 0.551898, 0.551738, 0.551577, 0.551416, 0.551255, 0.551092, 0.550929, 0.550765, 0.550601, 0.550436, 0.55027, 0.550104, 0.549936, 0.549769, 0.5496, 0.549431, 0.549261, 0.549091, 0.54892, 0.548748, 0.548576, 0.548402, 0.548229, 0.548054, 0.547879, 0.547703, 0.547527, 0.547349, 0.547171, 0.546993, 0.546814, 0.546634, 0.546453, 0.546272, 0.54609, 0.545907, 0.545724, 0.54554, 0.545355, 0.54517, 0.544984, 0.544797, 0.54461, 0.544421, 0.544233, 0.544043, 0.543853, 0.543662, 0.54347, 0.543278, 0.543085, 0.542892, 0.542697, 0.542502, 0.542307, 0.54211, 0.541913, 0.541715, 0.541517, 0.541317, 0.541118, 0.540917, 0.540716, 0.540514, 0.540311, 0.540107, 0.539903, 0.539699, 0.539493, 0.539287, 0.53908, 0.538872, 0.538664, 0.538455, 0.538245, 0.538035, 0.537823, 0.537611, 0.537399, 0.537186, 0.536972, 0.536757, 0.536541, 0.536325, 0.536108, 0.535891, 0.535672, 0.535453, 0.535234, 0.535013, 0.534792, 0.53457, 0.534347, 0.534124, 0.5339, 0.533675, 0.533449, 0.533223, 0.532996, 0.532768, 0.53254, 0.532311, 0.532081, 0.53185, 0.531619, 0.531387, 0.531154, 0.53092, 0.530686, 0.530451, 0.530215, 0.529979, 0.529741, 0.529503, 0.529265, 0.529025, 0.528785, 0.528544, 0.528302, 0.52806, 0.527817, 0.527573, 0.527328, 0.527082, 0.526836, 0.526589, 0.526342, 0.526093, 0.525844, 0.525594, 0.525343, 0.525092, 0.52484, 0.524587, 0.524333, 0.524078, 0.523823, 0.523567, 0.52331, 0.523053, 0.522794, 0.522535, 0.522275, 0.522015, 0.521753, 0.521491, 0.521228, 0.520965, 0.5207, 0.520435, 0.520169, 0.519902, 0.519635, 0.519366, 0.519097, 0.518827, 0.518557, 0.518285, 0.518013, 0.51774, 0.517466, 0.517191, 0.516916, 0.51664, 0.516363, 0.516085, 0.515807, 0.515527, 0.515247, 0.514966, 0.514684, 0.514402, 0.514119, 0.513834, 0.51355, 0.513264, 0.512977, 0.51269, 0.512402, 0.512113, 0.511823, 0.511533, 0.511241, 0.510949, 0.510656, 0.510362, 0.510068, 0.509772, 0.509476, 0.509179, 0.508881, 0.508582, 0.508283, 0.507983, 0.507681, 0.507379, 0.507077, 0.506773, 0.506468, 0.506163, 0.505857, 0.50555, 0.505242, 0.504934, 0.504624, 0.504314, 0.504003, 0.503691, 0.503378, 0.503064, 0.50275, 0.502434, 0.502118, 0.501801, 0.501483, 0.501165, 0.500845, 0.500525, 0.500203, 0.499881, 0.499558, 0.499234, 0.49891, 0.498584, 0.498257, 0.49793, 0.497602, 0.497273, 0.496943, 0.496612, 0.496281, 0.495948, 0.495615, 0.49528, 0.494945, 0.494609, 0.494272, 0.493934, 0.493596, 0.493256, 0.492916, 0.492574, 0.492232, 0.491889, 0.491545, 0.4912, 0.490854, 0.490508, 0.49016, 0.489812, 0.489462, 0.489112, 0.488761, 0.488409, 0.488056, 0.487702, 0.487347, 0.486991, 0.486635, 0.486277, 0.485919, 0.485559, 0.485199, 0.484838, 0.484476, 0.484113, 0.483749, 0.483384, 0.483018, 0.482651, 0.482283, 0.481915, 0.481545, 0.481175, 0.480803, 0.480431, 0.480058, 0.479683, 0.479308, 0.478932, 0.478555, 0.478177, 0.477798, 0.477418, 0.477037, 0.476655, 0.476272, 0.475888, 0.475503, 0.475118, 0.474731, 0.474343, 0.473954, 0.473565, 0.473174, 0.472783, 0.47239, 0.471997, 0.471602, 0.471206, 0.47081, 0.470412, 0.470014, 0.469615, 0.469214, 0.468813, 0.46841, 0.468007, 0.467602, 0.467197, 0.46679, 0.466383, 0.465974, 0.465565, 0.465154, 0.464743, 0.46433, 0.463917, 0.463502, 0.463087, 0.46267, 0.462252, 0.461834, 0.461414, 0.460993, 0.460571, 0.460149, 0.459725, 0.4593, 0.458874, 0.458447, 0.458019, 0.45759, 0.457159, 0.456728, 0.456296, 0.455863, 0.455428, 0.454993, 0.454556, 0.454119, 0.45368, 0.45324, 0.452799, 0.452358, 0.451915, 0.45147, 0.451025, 0.450579, 0.450132, 0.449683, 0.449234, 0.448783, 0.448332, 0.447879, 0.447425, 0.44697, 0.446514, 0.446056, 0.445598, 0.445138, 0.444678, 0.444216, 0.443753, 0.443289, 0.442824, 0.442358, 0.441891, 0.441422, 0.440952, 0.440482, 0.44001, 0.439537, 0.439062, 0.438587, 0.43811, 0.437633, 0.437154, 0.436674, 0.436193, 0.43571, 0.435227, 0.434742, 0.434256, 0.433769, 0.433281, 0.432791, 0.432301, 0.431809, 0.431316, 0.430822, 0.430326, 0.42983, 0.429332, 0.428833, 0.428332, 0.427831, 0.427328, 0.426824, 0.426319, 0.425813, 0.425305, 0.424796, 0.424286, 0.423775, 0.423263, 0.422749, 0.422234, 0.421717, 0.4212, 0.420681, 0.420161, 0.41964, 0.419117, 0.418593, 0.418068, 0.417542, 0.417014, 0.416485, 0.415955, 0.415423, 0.41489, 0.414356, 0.413821, 0.413284, 0.412746, 0.412207, 0.411666, 0.411124, 0.410581, 0.410036, 0.40949, 0.408943, 0.408394, 0.407844, 0.407293, 0.40674, 0.406186, 0.405631, 0.405074, 0.404516, 0.403957, 0.403396, 0.402834, 0.40227, 0.401705, 0.401139, 0.400571, 0.400002, 0.399431, 0.398859, 0.398286, 0.397711, 0.397135, 0.396558, 0.395979, 0.395399, 0.394817, 0.394234, 0.393649, 0.393063, 0.392475, 0.391886, 0.391296, 0.390704, 0.390111, 0.389516, 0.38892, 0.388322, 0.387723, 0.387122, 0.38652, 0.385916, 0.385311, 0.384704, 0.384096, 0.383486, 0.382875, 0.382263, 0.381648, 0.381033, 0.380415, 0.379797, 0.379176, 0.378554, 0.377931, 0.377306, 0.376679, 0.376051, 0.375422, 0.37479, 0.374158, 0.373523, 0.372887, 0.37225, 0.371611, 0.37097, 0.370328, 0.369684, 0.369038, 0.368391, 0.367742, 0.367092, 0.36644, 0.365786, 0.36513, 0.364473, 0.363815, 0.363154, 0.362492, 0.361829, 0.361163, 0.360496, 0.359828, 0.359157, 0.358485, 0.357811, 0.357136, 0.356459, 0.35578, 0.355099, 0.354417, 0.353732, 0.353047, 0.352359, 0.351669, 0.350978, 0.350285, 0.349591, 0.348894, 0.348196, 0.347496, 0.346794, 0.34609, 0.345385, 0.344678, 0.343969, 0.343258, 0.342545, 0.34183, 0.341114, 0.340396, 0.339676, 0.338954, 0.33823, 0.337504, 0.336776, 0.336047, 0.335315, 0.334582, 0.333847, 0.333109, 0.33237, 0.331629, 0.330886, 0.330141, 0.329395, 0.328646, 0.327895, 0.327142, 0.326387, 0.325631, 0.324872, 0.324111, 0.323349, 0.322584, 0.321817, 0.321048, 0.320277, 0.319504, 0.318729, 0.317952, 0.317173, 0.316392, 0.315609, 0.314824, 0.314036, 0.313246, 0.312455, 0.311661, 0.310865, 0.310067, 0.309267, 0.308464, 0.30766, 0.306853, 0.306044, 0.305233, 0.30442, 0.303604, 0.302786, 0.301966, 0.301144, 0.30032, 0.299493, 0.298664, 0.297833, 0.296999, 0.296164, 0.295326, 0.294485, 0.293642, 0.292797, 0.29195, 0.2911, 0.290248, 0.289394, 0.288537, 0.287678, 0.286816, 0.285952, 0.285086, 0.284217, 0.283346, 0.282472, 0.281596, 0.280717, 0.279836, 0.278952, 0.278066, 0.277178, 0.276287, 0.275393, 0.274497, 0.273598, 0.272697, 0.271793, 0.270886, 0.269977, 0.269066, 0.268151, 0.267235, 0.266315, 0.265393, 0.264468, 0.26354, 0.26261, 0.261677, 0.260742, 0.259803, 0.258862, 0.257919, 0.256972, 0.256023, 0.25507, 0.254116, 0.253158, 0.252197, 0.251234, 0.250268, 0.249298, 0.248326, 0.247352, 0.246374, 0.245393, 0.24441, 0.243423, 0.242433, 0.241441, 0.240445, 0.239447, 0.238446, 0.237441, 0.236433, 0.235423, 0.234409, 0.233392, 0.232372, 0.231349, 0.230323, 0.229294, 0.228262, 0.227226, 0.226187, 0.225145, 0.2241, 0.223051, 0.222, 0.220945, 0.219886, 0.218825, 0.21776, 0.216692, 0.21562, 0.214545, 0.213466, 0.212385, 0.211299, 0.210211, 0.209119, 0.208023, 0.206924, 0.205821, 0.204715, 0.203605, 0.202492, 0.201375, 0.200254, 0.19913, 0.198002, 0.196871, 0.195736, 0.194597, 0.193454, 0.192308, 0.191158, 0.190004, 0.188846, 0.187685, 0.186519, 0.18535, 0.184177, 0.182999, 0.181818, 0.180633, 0.179444, 0.178251, 0.177054, 0.175853, 0.174648, 0.173439, 0.172225, 0.171008, 0.169786, 0.16856, 0.16733, 0.166096, 0.164857, 0.163614, 0.162367, 0.161115, 0.159859, 0.158599, 0.157334, 0.156065, 0.154791, 0.153513, 0.15223, 0.150943, 0.149651, 0.148354, 0.147053, 0.145747, 0.144436, 0.143121, 0.141801, 0.140476, 0.139147, 0.137812, 0.136473, 0.135128, 0.133779, 0.132425, 0.131066, 0.129701, 0.128332, 0.126958, 0.125578, 0.124193, 0.122803, 0.121408, 0.120007, 0.118602, 0.117191, 0.115774, 0.114352, 0.112925, 0.111492, 0.110053, 0.108609, 0.10716, 0.105704, 0.104243, 0.102777, 0.101304, 0.0998262, 0.0983422, 0.0968522, 0.0953564, 0.0938546, 0.0923467, 0.0908328, 0.0893129, 0.0877867, 0.0862544, 0.0847159, 0.0831711, 0.08162, 0.0800625, 0.0784986, 0.0769282, 0.0753513, 0.0737679, 0.0721779, 0.0705812, 0.0689778, 0.0673676, 0.0657507, 0.0641269, 0.0624961, 0.0608584, 0.0592137, 0.0575619, 0.055903, 0.0542369, 0.0525636, 0.0508829, 0.0491949, 0.0474995, 0.0457966, 0.0440861, 0.0423681, 0.0406424, 0.038909, 0.0371678, 0.0354188, 0.0336618, 0.0318969, 0.0301239, 0.0283428, 0.0265536, 0.0247561, 0.0229502, 0.021136, 0.0193133, 0.0174821, 0.0156422, 0.0137937, 0.0119364, 0.0100703, 0.00819531, 0.00631129, 0.0044182, 0.00251595, 0.000604468, -0.00131633, -0.00324654, -0.00518623, -0.0071355, -0.00909443, -0.0110631, -0.0130416, -0.0150301, -0.0170286, -0.0190372, -0.0210561, -0.0230852, -0.0251248, -0.0271749, -0.0292356, -0.031307, -0.0333892, -0.0354824, -0.0375866, -0.039702, -0.0418286, -0.0439666, -0.046116, -0.0482771, -0.0504499, -0.0526346, -0.0548312, -0.0570398, -0.0592607, -0.061494, -0.0637397, -0.065998, -0.068269, -0.0705529, -0.0728499, -0.0751599, -0.0774833, -0.0798201, -0.0821705, -0.0845346, -0.0869126, -0.0893047, -0.0917109, -0.0941316, -0.0965667, -0.0990165, -0.101481, -0.103961, -0.106456, -0.108966, -0.111492, -0.114034, -0.116591, -0.119165, -0.121755, -0.124362, -0.126985, -0.129625, -0.132283, -0.134958, -0.13765, -0.14036, -0.143088, -0.145835, -0.1486, -0.151383, -0.154186, -0.157008, -0.159849, -0.162711, -0.165592, -0.168493, -0.171415, -0.174358, -0.177322, -0.180307, -0.183314, -0.186344, -0.189395, -0.192469, -0.195566, -0.198687, -0.201831, -0.204999, -0.208192, -0.211409, -0.214651, -0.217919, -0.221213, -0.224533, -0.22788, -0.231254, -0.234655, -0.238085, -0.241542, -0.245029, -0.248545, -0.252091, -0.255668, -0.259275, -0.262913, -0.266584, -0.270287, -0.274023, -0.277792, -0.281596, -0.285435, -0.289309, -0.293219, -0.297166, -0.301151, -0.305173, -0.309234, -0.313335, -0.317477, -0.321659, -0.325884, -0.330151, -0.334462, -0.338817, -0.343218, -0.347665, -0.352159, -0.356702, -0.361295, -0.365937, -0.370631, -0.375378, -0.380179, -0.385035, -0.389947, -0.394916, -0.399945, -0.405034, -0.410184, -0.415398, -0.420677, -0.426023, -0.431436, -0.436919, -0.442474, -0.448102, -0.453806, -0.459587, -0.465448, -0.471391, -0.477417, -0.48353, -0.489732, -0.496026, -0.502413, -0.508898, -0.515483, -0.522171, -0.528965, -0.535869, -0.542886, -0.55002, -0.557276, -0.564656, -0.572166, -0.57981, -0.587593, -0.595519, -0.603595, -0.611827, -0.620219, -0.628778, -0.637512, -0.646427, -0.655532, -0.664833, -0.67434, -0.684063, -0.69401, -0.704193, -0.714622, -0.725311, -0.736272, -0.747519, -0.759068, -0.770936, -0.783139, -0.795698, -0.808634, -0.82197, -0.835732, -0.849947, -0.864646, -0.879864, -0.895637, -0.912009, -0.929026, -0.946741, -0.965213, -0.984509, -1.00471, -1.0259, -1.04818, -1.07167, -1.0965, -1.12285, -1.15091, -1.18092, -1.21316, -1.24799, -1.28587, -1.32738, -1.37328, -1.42464, -1.4829, -1.55022, -1.62993, -1.72767, -1.85402, -2.03299, -2.34284, -3.72775, -2.30836, -2.01564, -1.84233, -1.71877, -1.62267, -1.54402, -1.47744, -1.41972, -1.36877, -1.32316, -1.28189, -1.24419, -1.20951, -1.17738, -1.14746, -1.11947, -1.09317, -1.06836, -1.0449, -1.02263, -1.00145, -0.981244, -0.961938, -0.943451, -0.925716, -0.908675, -0.892275, -0.876469, -0.861216, -0.846479, -0.832224, -0.818419, -0.805038, -0.792056, -0.779448, -0.767195, -0.755276, -0.743674, -0.732372, -0.721356, -0.710611, -0.700123, -0.689882, -0.679876, -0.670094, -0.660526, -0.651163, -0.641996, -0.633018, -0.624221, -0.615597, -0.607141, -0.598845, -0.590703, -0.58271, -0.574861, -0.567151, -0.559574, -0.552126, -0.544803, -0.537601, -0.530515, -0.523542, -0.516679, -0.509922, -0.503268, -0.496713, -0.490256, -0.483892, -0.47762, -0.471436, -0.465339, -0.459325, -0.453393, -0.447541, -0.441765, -0.436065, -0.430439, -0.424884, -0.419398, -0.413981, -0.40863, -0.403343, -0.39812, -0.392958, -0.387857, -0.382814, -0.377829, -0.3729, -0.368026, -0.363206, -0.358438, -0.353722, -0.349056, -0.344439, -0.339871, -0.33535, -0.330875, -0.326446, -0.322061, -0.317719, -0.313421, -0.309164, -0.304948, -0.300772, -0.296637, -0.292539, -0.28848, -0.284459, -0.280474, -0.276525, -0.272611, -0.268732, -0.264888, -0.261076, -0.257298, -0.253553, -0.249839, -0.246156, -0.242505, -0.238883, -0.235292, -0.23173, -0.228196, -0.224691, -0.221214, -0.217765, -0.214342, -0.210946, -0.207577, -0.204233, -0.200915, -0.197622, -0.194353, -0.191109, -0.187889, -0.184693, -0.181519, -0.178369, -0.175242, -0.172136, -0.169053, -0.165991, -0.162951, -0.159932, -0.156934, -0.153956, -0.150999, -0.148061, -0.145143, -0.142245, -0.139366, -0.136506, -0.133664, -0.130841, -0.128036, -0.12525, -0.122481, -0.119729, -0.116995, -0.114278, -0.111578, -0.108895, -0.106228, -0.103577, -0.100943, -0.0983243, -0.0957216, -0.0931343, -0.0905625, -0.0880058, -0.0854641, -0.0829373, -0.0804251, -0.0779274, -0.0754441, -0.072975, -0.0705199, -0.0680786, -0.0656511, -0.0632371, -0.0608366, -0.0584493, -0.0560752, -0.053714, -0.0513657, -0.0490301, -0.0467071, -0.0443965, -0.0420983, -0.0398122, -0.0375383, -0.0352762, -0.033026, -0.0307875, -0.0285605, -0.026345, -0.0241409, -0.021948, -0.0197663, -0.0175955, -0.0154357, -0.0132867, -0.0111484, -0.00902067, -0.00690345, -0.00479662, -0.00270009, -0.000613762, 0.00146246, 0.00352868, 0.00558497, 0.00763145, 0.00966818, 0.0116953, 0.0137128, 0.0157209, 0.0177195, 0.0197089, 0.0216891, 0.0236601, 0.0256221, 0.0275751, 0.0295192, 0.0314544, 0.033381, 0.0352988, 0.0372081, 0.0391089, 0.0410012, 0.0428852, 0.0447608, 0.0466282, 0.0484875, 0.0503386, 0.0521817, 0.0540169, 0.0558442, 0.0576636, 0.0594753, 0.0612793, 0.0630756, 0.0648644, 0.0666456, 0.0684194, 0.0701857, 0.0719448, 0.0736965, 0.0754411, 0.0771784, 0.0789087, 0.0806319, 0.0823481, 0.0840573, 0.0857597, 0.0874552, 0.0891439, 0.0908259, 0.0925012, 0.0941698, 0.0958319, 0.0974874, 0.0991364, 0.100779, 0.102415, 0.104045, 0.105669, 0.107286, 0.108897, 0.110502, 0.112101, 0.113693, 0.11528, 0.116861, 0.118436, 0.120004, 0.121567, 0.123124, 0.124676, 0.126221, 0.127761, 0.129296, 0.130824, 0.132347, 0.133865, 0.135377, 0.136883, 0.138384, 0.13988, 0.14137, 0.142855, 0.144335, 0.145809, 0.147279, 0.148743, 0.150202, 0.151655, 0.153104, 0.154548, 0.155986, 0.15742, 0.158848, 0.160272, 0.161691, 0.163105, 0.164514, 0.165918, 0.167318, 0.168713, 0.170103, 0.171488, 0.172869, 0.174245, 0.175617, 0.176984, 0.178346, 0.179704, 0.181057, 0.182406, 0.183751, 0.185091, 0.186427, 0.187758, 0.189085, 0.190408, 0.191726, 0.193041, 0.194351, 0.195656, 0.196958, 0.198255, 0.199549, 0.200838, 0.202123, 0.203404, 0.204681, 0.205954, 0.207224, 0.208489, 0.20975, 0.211007, 0.21226, 0.21351, 0.214756, 0.215997, 0.217235, 0.218469, 0.2197, 0.220926, 0.222149, 0.223369, 0.224584, 0.225796, 0.227004, 0.228209, 0.22941, 0.230607, 0.231801, 0.232991, 0.234178, 0.235361, 0.236541, 0.237717, 0.23889, 0.240059, 0.241225, 0.242387, 0.243546, 0.244702, 0.245855, 0.247004, 0.248149, 0.249292, 0.250431, 0.251567, 0.252699, 0.253829, 0.254955, 0.256078, 0.257198, 0.258314, 0.259428, 0.260538, 0.261645, 0.262749, 0.26385, 0.264948, 0.266043, 0.267134, 0.268223, 0.269309, 0.270392, 0.271471, 0.272548, 0.273622, 0.274693, 0.27576, 0.276825, 0.277887, 0.278947, 0.280003, 0.281056, 0.282107, 0.283155, 0.2842, 0.285242, 0.286281, 0.287317, 0.288351, 0.289382, 0.29041, 0.291436, 0.292459, 0.293479, 0.294496, 0.295511, 0.296523, 0.297532, 0.298539, 0.299543, 0.300544, 0.301543, 0.302539, 0.303533, 0.304524, 0.305512, 0.306498, 0.307481, 0.308462, 0.309441, 0.310416, 0.31139, 0.31236, 0.313329, 0.314295, 0.315258, 0.316219, 0.317177, 0.318133, 0.319087, 0.320038, 0.320987, 0.321933, 0.322877, 0.323819, 0.324758, 0.325695, 0.32663, 0.327562, 0.328492, 0.32942, 0.330345, 0.331269, 0.332189, 0.333108, 0.334024, 0.334938, 0.33585, 0.33676, 0.337667, 0.338572, 0.339475, 0.340375, 0.341274, 0.34217, 0.343064, 0.343956, 0.344846, 0.345734, 0.346619, 0.347503, 0.348384, 0.349263, 0.35014, 0.351015, 0.351888, 0.352759, 0.353628, 0.354494, 0.355359, 0.356221, 0.357082, 0.35794, 0.358797, 0.359651, 0.360504, 0.361354, 0.362202, 0.363049, 0.363893, 0.364736, 0.365576, 0.366415, 0.367251, 0.368086, 0.368918, 0.369749, 0.370578, 0.371405, 0.37223, 0.373053, 0.373874, 0.374694, 0.375511, 0.376327, 0.37714, 0.377952, 0.378762, 0.37957, 0.380376, 0.381181, 0.381983, 0.382784, 0.383583, 0.38438, 0.385176, 0.385969, 0.386761, 0.387551, 0.388339, 0.389126, 0.38991, 0.390693, 0.391474, 0.392254, 0.393032, 0.393807, 0.394582, 0.395354, 0.396125, 0.396894, 0.397661, 0.398427, 0.399191, 0.399953, 0.400714, 0.401473, 0.40223, 0.402985, 0.403739, 0.404492, 0.405242, 0.405991, 0.406738, 0.407484, 0.408228, 0.40897, 0.409711, 0.41045, 0.411188, 0.411924, 0.412658, 0.413391, 0.414122, 0.414852, 0.41558, 0.416307, 0.417031, 0.417755, 0.418477, 0.419197, 0.419915, 0.420633, 0.421348, 0.422062, 0.422775, 0.423486, 0.424195, 0.424903, 0.42561, 0.426315, 0.427018, 0.42772, 0.428421, 0.42912, 0.429817, 0.430513, 0.431208, 0.431901, 0.432593, 0.433283, 0.433972, 0.434659, 0.435345, 0.436029, 0.436712, 0.437394, 0.438074, 0.438753, 0.43943, 0.440106, 0.44078, 0.441453, 0.442125, 0.442795, 0.443464, 0.444132, 0.444798, 0.445462, 0.446126, 0.446788, 0.447448, 0.448107, 0.448765, 0.449422, 0.450077, 0.450731, 0.451383, 0.452034, 0.452684, 0.453332, 0.453979, 0.454625, 0.45527, 0.455913, 0.456554, 0.457195, 0.457834, 0.458472, 0.459109, 0.459744, 0.460378, 0.461011, 0.461642, 0.462272, 0.462901, 0.463528, 0.464155, 0.46478, 0.465404, 0.466026, 0.466647, 0.467267, 0.467886, 0.468503, 0.46912, 0.469735, 0.470348, 0.470961, 0.471572, 0.472182, 0.472791, 0.473399, 0.474005, 0.47461, 0.475214, 0.475817, 0.476419, 0.477019, 0.477618, 0.478216, 0.478813, 0.479408, 0.480003, 0.480596, 0.481188, 0.481779, 0.482369, 0.482957, 0.483544, 0.48413, 0.484715, 0.485299, 0.485882, 0.486464, 0.487044, 0.487623, 0.488201, 0.488778, 0.489354, 0.489929, 0.490502, 0.491075, 0.491646, 0.492216, 0.492785, 0.493353, 0.49392, 0.494485, 0.49505, 0.495613, 0.496176, 0.496737, 0.497297, 0.497856, 0.498414, 0.498971, 0.499527, 0.500081, 0.500635, 0.501188, 0.501739, 0.502289, 0.502839, 0.503387, 0.503934, 0.50448, 0.505025, 0.505569, 0.506112, 0.506654, 0.507195, 0.507734, 0.508273, 0.508811, 0.509347, 0.509883, 0.510417, 0.510951, 0.511483, 0.512015, 0.512545, 0.513074, 0.513603, 0.51413, 0.514656, 0.515182, 0.515706, 0.516229, 0.516751, 0.517273, 0.517793, 0.518312, 0.51883, 0.519348, 0.519864, 0.520379, 0.520893, 0.521407, 0.521919, 0.52243, 0.52294, 0.52345, 0.523958, 0.524465, 0.524972, 0.525477, 0.525982, 0.526485, 0.526988, 0.527489, 0.52799, 0.528489, 0.528988, 0.529486, 0.529983, 0.530478, 0.530973, 0.531467, 0.53196, 0.532452, 0.532943, 0.533433, 0.533922, 0.534411, 0.534898, 0.535384, 0.53587, 0.536354, 0.536838, 0.537321, 0.537803, 0.538283, 0.538763, 0.539242, 0.539721, 0.540198, 0.540674, 0.541149, 0.541624, 0.542097, 0.54257, 0.543042, 0.543513, 0.543983, 0.544452, 0.54492, 0.545387, 0.545854, 0.546319, 0.546784, 0.547248, 0.54771, 0.548172, 0.548633, 0.549094, 0.549553, 0.550012, 0.550469, 0.550926, 0.551382, 0.551837, 0.552291, 0.552744, 0.553197, 0.553648, 0.554099, 0.554549, 0.554998, 0.555446, 0.555893, 0.556339, 0.556785, 0.55723, 0.557674, 0.558117, 0.558559, 0.559, 0.559441, 0.55988, 0.560319, 0.560757, 0.561194, 0.561631, 0.562066, 0.562501, 0.562935, 0.563368, 0.5638, 0.564232, 0.564662, 0.565092, 0.565521, 0.565949, 0.566376, 0.566803, 0.567229, 0.567654, 0.568078, 0.568501, 0.568923, 0.569345, 0.569766, 0.570186, 0.570605, 0.571024, 0.571441, 0.571858, 0.572274, 0.57269, 0.573104, 0.573518, 0.573931, 0.574343, 0.574754, 0.575165, 0.575575, 0.575984, 0.576392, 0.5768, 0.577206, 0.577612, 0.578017, 0.578422, 0.578825, 0.579228, 0.57963, 0.580032, 0.580432, 0.580832, 0.581231, 0.581629, 0.582027, 0.582423, 0.582819, 0.583215, 0.583609, 0.584003, 0.584396, 0.584788, 0.585179, 0.58557, 0.58596, 0.586349, 0.586738, 0.587126, 0.587513, 0.587899, 0.588284, 0.588669, 0.589053, 0.589436, 0.589819, 0.590201, 0.590582, 0.590962, 0.591342, 0.591721, 0.592099, 0.592477, 0.592853, 0.593229, 0.593605, 0.593979, 0.594353, 0.594726, 0.595099, 0.59547, 0.595841, 0.596212, 0.596581, 0.59695, 0.597318, 0.597686, 0.598052, 0.598418, 0.598784, 0.599148, 0.599512, 0.599875, 0.600238, 0.6006, 0.600961, 0.601321, 0.601681, 0.60204, 0.602398, 0.602756, 0.603113, 0.603469, 0.603824, 0.604179, 0.604533, 0.604887, 0.60524, 0.605592, 0.605943, 0.606294, 0.606644, 0.606993, 0.607342, 0.60769, 0.608037, 0.608384, 0.60873, 0.609075, 0.60942, 0.609764, 0.610107, 0.61045, 0.610792, 0.611133, 0.611474, 0.611814, 0.612153, 0.612491, 0.612829, 0.613167, 0.613503, 0.613839, 0.614175, 0.614509, 0.614843, 0.615176, 0.615509, 0.615841, 0.616173, 0.616503, 0.616833, 0.617163, 0.617491, 0.61782, 0.618147, 0.618474, 0.6188, 0.619125, 0.61945, 0.619775, 0.620098, 0.620421, 0.620743, 0.621065, 0.621386, 0.621706, 0.622026, 0.622345, 0.622664, 0.622982, 0.623299, 0.623615, 0.623931, 0.624246, 0.624561, 0.624875, 0.625189, 0.625501, 0.625814, 0.626125, 0.626436, 0.626746, 0.627056, 0.627365, 0.627673, 0.627981, 0.628288, 0.628595, 0.628901, 0.629206, 0.629511, 0.629815, 0.630118, 0.630421, 0.630723, 0.631025, 0.631326, 0.631626, 0.631926, 0.632225, 0.632524, 0.632822, 0.633119, 0.633416, 0.633712, 0.634007, 0.634302, 0.634597, 0.63489, 0.635183, 0.635476, 0.635768, 0.636059, 0.63635, 0.63664, 0.636929, 0.637218, 0.637507, 0.637794, 0.638082, 0.638368, 0.638654, 0.638939, 0.639224, 0.639508, 0.639792, 0.640075, 0.640357, 0.640639, 0.64092, 0.641201, 0.641481, 0.64176, 0.642039, 0.642318, 0.642595, 0.642872, 0.643149, 0.643425, 0.6437, 0.643975, 0.644249, 0.644523, 0.644796, 0.645068, 0.64534, 0.645612, 0.645882, 0.646153, 0.646422, 0.646691, 0.64696, 0.647228, 0.647495, 0.647762, 0.648028, 0.648294, 0.648559, 0.648823, 0.649087, 0.64935, 0.649613, 0.649875, 0.650137, 0.650398, 0.650659, 0.650919, 0.651178, 0.651437, 0.651695, 0.651953, 0.65221, 0.652467, 0.652723, 0.652978, 0.653233, 0.653488, 0.653741, 0.653995, 0.654247, 0.6545, 0.654751, 0.655002, 0.655253, 0.655503, 0.655752, 0.656001, 0.656249, 0.656497, 0.656744, 0.656991, 0.657237, 0.657483, 0.657728, 0.657972, 0.658216, 0.658459, 0.658702, 0.658944, 0.659186, 0.659427, 0.659668, 0.659908, 0.660148, 0.660387, 0.660625, 0.660863, 0.661101, 0.661338, 0.661574, 0.66181, 0.662045, 0.66228, 0.662514, 0.662748, 0.662981, 0.663214, 0.663446, 0.663677, 0.663908, 0.664139, 0.664369, 0.664598, 0.664827, 0.665056, 0.665283, 0.665511, 0.665738, 0.665964, 0.66619, 0.666415, 0.66664, 0.666864, 0.667087, 0.667311, 0.667533, 0.667755, 0.667977, 0.668198, 0.668418, 0.668638, 0.668858, 0.669077, 0.669295, 0.669513, 0.669731, 0.669947, 0.670164, 0.67038, 0.670595, 0.67081, 0.671024, 0.671238, 0.671451, 0.671664, 0.671876, 0.672088, 0.672299, 0.67251, 0.67272, 0.67293, 0.673139, 0.673348, 0.673556, 0.673763, 0.673971, 0.674177, 0.674383, 0.674589, 0.674794, 0.674999, 0.675203, 0.675407, 0.67561, 0.675812, 0.676014, 0.676216, 0.676417, 0.676618, 0.676818, 0.677017, 0.677216, 0.677415, 0.677613, 0.677811, 0.678008, 0.678204, 0.6784, 0.678596, 0.678791, 0.678986, 0.67918, 0.679373, 0.679566, 0.679759, 0.679951, 0.680143, 0.680334, 0.680525, 0.680715, 0.680904, 0.681093, 0.681282, 0.68147, 0.681658, 0.681845, 0.682032, 0.682218, 0.682404, 0.682589, 0.682774, 0.682958, 0.683142, 0.683325, 0.683508, 0.68369, 0.683872, 0.684053, 0.684234, 0.684415, 0.684594, 0.684774, 0.684953, 0.685131, 0.685309, 0.685487, 0.685664, 0.68584, 0.686016, 0.686192, 0.686367, 0.686541, 0.686715, 0.686889, 0.687062, 0.687235, 0.687407, 0.687579, 0.68775, 0.687921, 0.688091, 0.688261, 0.68843, 0.688599, 0.688767, 0.688935, 0.689102, 0.689269, 0.689436, 0.689602, 0.689767, 0.689932, 0.690097, 0.690261, 0.690425, 0.690588, 0.69075, 0.690913, 0.691074, 0.691236, 0.691396, 0.691557, 0.691717, 0.691876, 0.692035, 0.692193, 0.692351, 0.692509, 0.692666, 0.692822, 0.692978, 0.693134, 0.693289, 0.693444, 0.693598, 0.693752, 0.693905, 0.694058, 0.694211, 0.694362, 0.694514, 0.694665, 0.694815, 0.694966, 0.695115, 0.695264, 0.695413, 0.695561, 0.695709, 0.695856, 0.696003, 0.696149, 0.696295, 0.696441, 0.696586, 0.69673, 0.696874, 0.697018, 0.697161, 0.697304, 0.697446, 0.697588, 0.697729, 0.69787, 0.698011, 0.698151, 0.69829, 0.698429, 0.698568, 0.698706, 0.698843, 0.698981, 0.699117, 0.699254, 0.69939, 0.699525, 0.69966, 0.699795, 0.699929, 0.700062, 0.700195, 0.700328, 0.70046, 0.700592, 0.700723, 0.700854, 0.700985, 0.701115, 0.701244, 0.701373, 0.701502, 0.70163, 0.701758, 0.701885, 0.702012, 0.702139, 0.702265, 0.70239, 0.702515, 0.70264, 0.702764, 0.702888, 0.703011, 0.703134, 0.703256, 0.703378, 0.7035, 0.703621, 0.703741, 0.703861, 0.703981, 0.7041, 0.704219, 0.704338, 0.704456, 0.704573, 0.70469, 0.704807, 0.704923, 0.705039, 0.705154, 0.705269, 0.705383, 0.705497, 0.705611, 0.705724, 0.705836, 0.705949, 0.70606, 0.706172, 0.706283, 0.706393, 0.706503, 0.706613, 0.706722, 0.70683, 0.706939, 0.707046, 0.707154, 0.707261, 0.707367, 0.707473, 0.707579, 0.707684, 0.707789, 0.707893, 0.707997, 0.7081, 0.708203, 0.708306, 0.708408, 0.70851, 0.708611, 0.708712, 0.708812, 0.708912, 0.709012, 0.709111, 0.70921, 0.709308, 0.709406, 0.709503, 0.7096, 0.709696, 0.709793, 0.709888, 0.709983, 0.710078, 0.710172, 0.710266, 0.71036, 0.710453, 0.710546, 0.710638, 0.710729, 0.710821, 0.710912, 0.711002, 0.711092, 0.711182, 0.711271, 0.71136, 0.711448, 0.711536, 0.711623, 0.71171, 0.711797, 0.711883, 0.711969, 0.712054, 0.712139, 0.712224, 0.712308, 0.712391, 0.712474, 0.712557, 0.71264, 0.712721, 0.712803, 0.712884, 0.712965, 0.713045, 0.713125, 0.713204, 0.713283, 0.713361, 0.713439, 0.713517, 0.713594, 0.713671, 0.713747, 0.713823, 0.713899, 0.713974, 0.714049, 0.714123, 0.714197, 0.71427, 0.714343, 0.714416, 0.714488, 0.71456, 0.714631, 0.714702, 0.714772, 0.714842, 0.714912, 0.714981, 0.71505, 0.715118, 0.715186, 0.715254, 0.715321, 0.715387, 0.715454, 0.715519, 0.715585, 0.71565, 0.715714, 0.715778, 0.715842, 0.715905, 0.715968, 0.716031, 0.716093, 0.716154, 0.716216, 0.716276, 0.716337, 0.716397, 0.716456, 0.716515, 0.716574, 0.716632, 0.71669, 0.716748, 0.716805, 0.716861, 0.716917, 0.716973, 0.717029, 0.717083, 0.717138, 0.717192, 0.717246, 0.717299, 0.717352, 0.717404, 0.717456, 0.717508, 0.717559, 0.71761, 0.71766, 0.71771, 0.71776, 0.717809, 0.717857, 0.717906, 0.717954, 0.718001, 0.718048, 0.718095, 0.718141, 0.718187, 0.718232, 0.718277, 0.718322, 0.718366, 0.718409, 0.718453, 0.718496, 0.718538, 0.71858, 0.718622, 0.718663, 0.718704, 0.718744, 0.718784, 0.718824, 0.718863, 0.718902, 0.71894, 0.718978, 0.719015, 0.719052, 0.719089, 0.719125, 0.719161, 0.719197, 0.719232, 0.719266, 0.719301, 0.719334, 0.719368, 0.719401, 0.719433, 0.719465, 0.719497, 0.719528, 0.719559, 0.71959, 0.71962, 0.71965, 0.719679, 0.719708, 0.719736, 0.719764, 0.719792, 0.719819, 0.719846, 0.719872, 0.719898, 0.719924, 0.719949, 0.719974, 0.719998, 0.720022, 0.720046, 0.720069, 0.720091, 0.720114, 0.720135, 0.720157, 0.720178, 0.720199, 0.720219, 0.720239, 0.720258, 0.720277, 0.720296, 0.720314, 0.720332, 0.720349, 0.720366, 0.720383, 0.720399, 0.720414, 0.72043, 0.720445, 0.720459, 0.720473, 0.720487, 0.7205, 0.720513, 0.720526, 0.720538, 0.720549, 0.720561, 0.720571, 0.720582, 0.720592, 0.720601, 0.720611, 0.720619, 0.720628, 0.720636, 0.720643, 0.72065, 0.720657, 0.720664, 0.720669, 0.720675, 0.72068, 0.720685, 0.720689, 0.720693, 0.720696, 0.7207, 0.720702, 0.720704, 0.720706, 0.720708, 0.720709, 0.720709, 0.72071, 0.720709, 0.720709, 0.720708, 0.720706, 0.720705, 0.720702, 0.7207, 0.720697, 0.720693, 0.720689, 0.720685, 0.72068, 0.720675, 0.72067, 0.720664, 0.720658, 0.720651, 0.720644, 0.720636, 0.720628, 0.72062, 0.720611, 0.720602, 0.720593, 0.720583, 0.720572, 0.720561, 0.72055, 0.720539, 0.720527, 0.720514, 0.720501, 0.720488, 0.720475, 0.720461, 0.720446, 0.720431, 0.720416, 0.7204, 0.720384, 0.720368, 0.720351, 0.720334, 0.720316, 0.720298, 0.720279, 0.72026, 0.720241 +}; #endif /* MULTIPATH_V0_M8_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v120_M10.h b/src/lte/model/JakesTraces/multipath_v120_M10.h index 4758ab8b2..eb5ec14d8 100644 --- a/src/lte/model/JakesTraces/multipath_v120_M10.h +++ b/src/lte/model/JakesTraces/multipath_v120_M10.h @@ -24,8 +24,8 @@ #define MULTIPATH_V120_M10_H_ static double multipath_M10_v_120[3000] = { - 0.854016, 0.993546, 1.11318, 0.20929, 0.813349, 0.289519, 0.7206, 0.546443, 0.493812, 0.562575, 0.286327, 0.600864, -0.298311, 0.574984, -0.210588, 0.522904, 0.190621, 0.441125, 0.387692, 0.234765, 0.421269, 0.0684186, 0.533258, -0.166778, 0.303785, -0.609869, 0.613708, 0.549625, -0.366913, 0.279913, -1.45569, -1.16559, 0.499606, 0.612354, 0.0734493, 0.885585, 0.893465, 0.247981, 0.563929, 0.657943, 0.459478, -0.130061, 0.385538, 0.72592, 0.547064, 0.516247, 0.877602, 0.451872, 0.766059, 0.856782, -0.0571848, 0.893865, 0.681705, 0.534266, 0.748482, -0.286467, 0.797611, 0.678178, -0.110495, 0.496402, -0.0641248, 0.215095, 0.034023, 0.131887, 0.425742, 0.0710901, 0.414818, 0.77919, 0.750907, -0.0401172, 0.5933, 0.627309, 0.0381589, -0.350286, -0.0904366, -0.438209, 0.573362, 0.757867, -0.852928, 0.896629, 0.882396, 0.270252, 0.945529, 0.636917, 0.727624, 0.89422, 0.246031, 0.48804, 0.0432302, 0.331186, -0.0692771, 0.204347, -0.646393, 0.506737, -0.26241, 0.732532, 0.669993, 0.653655, 1.02998, 0.703696, 0.713486, 0.807355, 0.172699, 0.738174, 0.00900457, 0.91711, 0.683531, 0.746749, 0.981347, 0.442267, 0.748697, 0.816295, 0.302932, 0.0455617, 0.075203, 0.0466316, 0.0930287, -0.160116, 0.583653, 0.621224, -0.0554653, 0.314528, 0.276219, -0.152521, -0.100658, -0.433885, 0.372802, 0.619712, 0.0553921, 0.549429, 0.377843, 0.68311, 0.927148, 0.249331, 0.928307, 0.999056, 0.0644923, 0.83845, 0.73912, 0.042262, 0.519712, -0.624782, 0.4059, -0.35116, 0.655401, 0.625239, -0.438849, 0.35811, 0.271555, -0.432491, -0.066015, 0.394232, 0.599672, 0.430303, 0.312165, 0.78398, 0.644958, 0.345835, 0.862093, 0.751067, -0.290537, 0.625065, 0.260688, 0.47557, 0.585814, -0.284549, 0.68984, 0.626006, -1.62491, 0.357671, -0.126065, -0.401936, 0.293606, 0.6089, -0.50854, 0.852016, 0.956999, 0.203707, 0.853638, 0.821884, 0.30645, 0.871511, 0.508081, 0.582822, 0.588044, 0.36006, 0.716529, -0.255772, 0.71368, 0.621158, 0.379769, 0.847775, 0.749401, -0.174554, 0.54104, 0.689698, 0.533131, -0.633553, 0.519052, 0.376241, 0.310638, 0.663318, 0.162927, 0.608066, 0.713243, -0.358272, 0.675506, 0.743179, 0.481469, -0.143753, -0.106909, 0.410256, 0.531638, -0.0324429, 0.531491, 0.681785, 0.205878, 0.332952, 0.370004, -0.722385, -0.169901, -0.594775, 0.141911, 0.57913, 0.541914, -0.11822, 0.63861, 0.497581, -0.599299, -0.449098, 0.409989, 0.419453, 0.369501, 0.794894, 0.440731, 0.696953, 0.876691, 0.182411, 0.732099, 0.613098, 0.627773, 0.970709, 0.636859, 0.764724, 0.999052, 0.563722, 0.785099, 0.956997, 0.509564, 0.580487, 0.667356, -0.403648, 0.385706, 0.103133, -1.36517, 0.280877, 0.564012, -0.1628, 0.700166, 0.814303, 0.258044, 0.475954, 0.366394, 0.0116578, -0.0604135, 0.388014, 0.425835, 0.315041, 0.753825, 0.513455, 0.117073, 0.164386, 0.289126, 0.385718, 0.124825, 0.520239, -0.833683, 0.47947, -0.0718252, 0.462251, -0.0667595, 0.744527, 0.831375, -0.121631, 0.914666, 0.773574, 0.528245, 0.933019, 0.65873, 0.48412, 0.845168, 0.784145, 0.412803, 0.304084, 0.753141, 0.671429, 0.041504, 0.73144, 0.441646, 0.407346, 0.249898, 0.692977, 0.865854, -0.5734, 0.870213, 0.697184, 0.600919, 0.806054, -0.0457529, 0.804872, 0.130985, 0.836436, 0.788484, 0.323337, 0.743796, -0.949686, 0.70471, 0.0582618, 0.745514, 0.643382, 0.521674, 0.79559, -0.725013, 0.876276, 0.831256, -1.46226, 0.667607, 0.653002, 0.413006, -0.401406, 0.540008, 0.870879, 0.808875, -0.49131, 0.78609, 0.665446, 0.187287, 0.652266, 0.138259, 0.458778, 0.460304, -0.0441013, 0.621556, 0.605328, -0.0679361, 0.427608, 0.530718, -0.517716, 0.506532, 0.344404, 0.477567, 0.754181, 0.121036, 0.682401, 0.588096, 0.57313, 0.891757, 0.361856, 0.754657, 0.775288, -0.229421, 0.645089, 0.303278, -1.14323, 0.527082, 0.792943, 0.167988, 0.849154, 0.946467, 0.124207, 0.813536, 0.822644, 0.150616, 0.335035, 0.30572, -0.178297, -0.0811871, 0.430482, 0.420994, 0.210219, 0.799435, 0.661348, 0.44358, 0.797256, -0.201129, 0.81911, 0.725489, 0.361385, 0.711675, -1.04926, 0.656241, 0.16211, 0.538415, 0.256843, 0.600649, 0.712545, -0.0206035, 0.0235428, 0.0990901, -0.139008, 0.745207, 0.924702, -1.78652, 1.05668, 1.02959, 0.255024, 0.987849, 0.576824, 0.727371, 0.580511, 0.661968, 0.749573, 0.376377, 0.773145, 0.239933, 0.963112, 0.612277, 0.85737, 0.926533, 0.397738, 1.01847, 0.682635, 0.774345, 0.879025, -0.232657, 0.849725, 0.728776, -0.525003, 0.241502, 0.0844462, 0.0843273, 0.15951, -0.36139, -0.35806, -0.671322, -1.15557, 0.555908, 0.816953, 0.47205, 0.740392, 0.978714, 0.626248, 0.587683, 0.749233, -0.0525426, 0.500605, 0.468495, 0.158754, 0.057823, -0.746556, 0.375994, 0.468879, -0.0454764, 0.695019, 0.557173, 0.170414, 0.517123, -0.496691, 0.575308, 0.391909, -0.120096, 0.0912305, -1.54322, 0.0632694, 0.557163, 0.331098, 0.578509, 0.879, 0.620884, 0.424873, 0.7452, 0.483165, -1.36443, -0.622636, 0.28447, 0.260859, -0.349434, 0.438488, 0.455393, -0.68379, 0.689846, 0.817054, 0.183494, 0.81377, 0.903293, -0.13664, 1.01498, 0.943892, 0.389461, 0.962864, 0.527708, 0.78021, 0.783514, 0.316661, 0.787332, 0.118751, 0.572132, 0.225686, 0.337508, -0.4088, 0.781266, 0.648061, 0.690778, 1.01871, 0.709201, 0.529924, 0.642958, -0.220846, 0.325042, 0.231021, 0.476783, 0.291796, 0.785051, 0.444021, 0.527686, 0.548088, 0.230174, 0.57421, -1.19209, 0.406028, 0.122907, 0.757224, 0.424879, 0.717024, 0.88484, 0.0991959, 0.784909, 0.782183, -1.0086, 0.623639, 0.489784, -0.0617728, 0.56103, 0.494651, 0.0106223, 0.826064, 0.941823, 0.534747, 0.733595, 0.938621, 0.45882, 0.68115, 0.742897, -0.422924, 0.332851, 0.0806206, 0.618069, -0.00151829, 0.63225, 0.578506, 0.39902, 0.803745, 0.452716, 0.501212, 0.624927, -0.446673, 0.320315, -1.00135, 0.361342, -0.258272, 0.558595, 0.658153, -0.509108, 0.672716, 0.715831, 0.090981, 0.332665, 0.0256895, 0.452572, 0.655663, 0.205398, 0.492135, 0.70286, 0.453084, 0.0804718, 0.646473, 0.757862, 0.637141, -0.627067, 0.749283, 0.808609, -0.531872, 0.855052, 0.859739, -0.158859, 0.854623, 0.640231, 0.507596, 0.693873, 0.0497417, 0.738992, 0.0250381, 0.79888, 0.773193, 0.384123, 0.9201, 0.71252, 0.161839, 0.426347, 0.135046, 0.524471, -0.640098, 0.49932, 0.346906, -0.0170459, 0.266377, -0.444414, -1.20691, 0.325593, 0.572304, 0.390173, -0.0474332, 0.582128, 0.643012, 0.226463, 0.536039, 0.843719, 0.640636, 0.537838, 0.944105, 0.726165, 0.55044, 0.905266, 0.582138, 0.49963, 0.70861, 0.3071, -0.678955, 0.0532102, 0.458085, 0.279091, -0.36474, 0.159375, 0.111037, 0.156523, 0.0638661, 0.0213221, 0.564279, 0.511946, -0.808087, 0.3145, -0.490765, 0.551012, 0.362135, 0.47652, 0.779113, 0.408724, 0.589682, 0.80167, 0.39397, 0.492548, 0.680939, 0.317648, -0.0159533, 0.114082, -0.522151, -0.129666, 0.27081, -1.01527, 0.752707, 0.950282, 0.601555, 0.767821, 0.99574, 0.46576, 0.836646, 0.868453, 0.151539, 0.855736, 0.249128, 0.874361, 0.907871, -0.284809, 0.835319, 0.576911, 0.402346, 0.476863, 0.141722, 0.461079, -0.339659, 0.464568, 0.0414557, 0.0702232, -0.349946, -0.50184, 0.360717, 0.669762, 0.103302, 0.707418, 0.726243, 0.423174, 0.976976, 0.831772, 0.205661, 0.764346, 0.542064, -0.179183, -0.16128, -1.17935, 0.587364, 0.780975, 0.358381, 0.521946, 0.557555, -0.0229764, 0.496934, -0.918863, 0.473785, 0.28367, -0.368198, -0.564302, -0.577025, 0.319487, 0.605362, -0.986933, 0.820393, 0.81609, 0.24579, 0.859023, 0.181251, 0.886646, 0.842563, 0.477457, 0.876698, -0.268706, 0.989335, 0.792186, 0.812491, 1.08037, 0.57315, 0.88379, 0.988095, 0.5438, 0.224372, 0.311942, 0.181625, 0.394584, 0.350581, -0.144387, 0.468882, 0.11592, 0.27208, 0.360062, -0.839878, 0.291392, 0.129452, -0.39743, 0.29446, 0.500638, 0.501819, -0.0247867, 0.304968, 0.358061, -0.126235, 0.52474, 0.403963, -1.17069, -0.040805, -0.102592, 0.223139, 0.385277, -0.842077, 0.586407, 0.656588, 0.00154569, 0.0849921, 0.019524, 0.394701, 0.403903, 0.953648, 0.803219, 0.713778, 1.08063, 0.691898, 0.884505, 1.00931, -0.0404298, 0.848488, 0.625453, 0.570487, 0.798024, 0.408039, -0.151301, -0.172297, -0.336558, 0.120647, -0.408581, 0.418846, 0.508259, -0.327565, 0.549864, 0.229633, 0.238451, 0.154628, -0.200251, 0.127112, 0.759628, 0.642507, 0.600522, 0.966059, 0.610015, 0.632113, 0.627386, 0.404047, 0.580423, 0.550112, 0.889328, -0.568245, 0.996777, 0.946698, 0.263234, 0.868737, 0.232869, 0.715344, 0.583776, 0.0571404, -0.0550246, 0.383315, -0.367777, 0.720987, 0.621575, 0.702448, 0.981735, 0.0337758, 0.996183, 0.881053, 0.772002, 1.10652, 0.624785, 0.900932, 0.951364, -0.126126, 0.548716, -0.538035, 0.552967, -1.09511, 0.729016, 0.64113, 0.230565, 0.747579, 0.648281, 0.23278, -0.553627, -0.2861, 0.104126, -0.129168, -0.0161997, 0.173587, -0.648037, -0.540068, 0.000131378, 0.0324753, 0.265996, 0.565743, -1.03224, 0.781512, 0.768971, 0.187954, 0.848755, 0.526056, 0.665798, 0.79839, -0.334607, 0.856509, 0.826894, 0.0361677, 0.551958, 0.690264, 0.595508, -0.0678071, 0.607464, 0.859135, 0.692273, -0.117425, 0.527934, -0.143818, 0.335329, -0.158666, 0.398865, 0.303916, 0.285849, 0.593148, 0.156377, 0.313758, 0.425572, -0.124118, 0.124932, 0.438803, 0.493702, 0.0563424, 0.430445, 0.641868, 0.130081, 0.405269, 0.175046, 0.507695, 0.632528, -0.303472, 0.620083, 0.0841833, 0.507603, 0.105847, 0.598009, 0.281388, 0.90794, 1.09911, 0.385386, 1.07324, 1.09957, -0.016151, 1.05508, 0.827806, 0.627748, 0.807129, -0.112241, 0.716101, 0.0960932, 0.541358, 0.214701, 0.468606, 0.456758, 0.00188511, 0.361066, -0.562568, -0.596024, 0.536362, 0.60933, -0.0857844, 0.720365, 0.435529, 0.55063, 0.692401, -1.02409, 0.586655, -0.052441, 0.676669, 0.776185, 0.348617, 0.199348, 0.459425, 0.503571, 0.505406, 0.0291767, 0.509025, 0.764344, 0.563037, 0.0214237, 0.576244, 0.488725, -0.0728187, 0.172886, 0.542236, 0.538779, -0.43912, 0.745977, 0.801184, -0.0742379, 0.673204, 0.529753, 0.469493, 0.738995, -0.462181, 0.758417, 0.623102, 0.578779, 0.937414, 0.670858, 0.470621, 0.711464, -0.750314, 0.674732, 0.456082, 0.57592, 0.849432, 0.432995, 0.688137, 0.893257, 0.579941, 0.316032, 0.6129, 0.37667, -0.100626, -0.20783, -0.314307, 0.483215, 0.508102, 0.190307, 0.845427, 0.79866, -0.246764, 0.761277, 0.57923, 0.201543, 0.518459, -0.0558072, -0.703641, 0.319927, 0.528099, -0.143267, 0.298149, -0.485124, 0.437129, -0.03035, 0.675801, 0.779112, -0.273136, 0.859623, 0.738096, 0.302866, 0.680428, -0.406205, 0.715123, 0.251147, 0.774273, 0.893162, 0.0304596, 0.807908, 0.809375, -0.417963, 0.835403, 0.871103, 0.39456, 0.564935, 0.80083, 0.53891, 0.382894, 0.775241, 0.635601, -0.422521, 0.0286564, -0.447423, -0.12394, 0.189827, 0.494714, -0.0139456, 0.347089, 0.244044, 0.208013, 0.34574, 0.305124, 0.760705, 0.527585, 0.488866, 0.801136, 0.528048, 0.0978565, 0.335477, -0.551486, 0.265525, -0.179381, -0.0198072, -0.380161, 0.255579, 0.5025, 0.331726, -0.212626, 0.470925, 0.45865, -1.18937, 0.611174, 0.791236, 0.636328, -0.0804286, 0.778674, 0.855067, 0.423285, 0.633716, 0.857372, 0.43253, 0.641717, 0.733024, 0.155325, 0.875226, 0.621508, 0.716654, 0.953214, 0.43837, 0.650827, 0.489081, 0.535925, 0.622312, 0.366792, 0.75468, -0.29683, 0.909317, 0.77707, 0.536274, 0.865932, 0.0119295, 0.77146, 0.63128, 0.236415, 0.352647, 0.445058, 0.634364, 0.146615, 0.849101, 0.732437, 0.00192852, 0.692816, 0.661218, 0.481978, 0.0136639, 0.457427, 0.790783, 0.577194, 0.484741, 0.743007, -0.131325, 0.903594, 0.791214, 0.452915, 0.879292, 0.454726, 0.612346, 0.706628, 0.22589, -2.00451, -0.296616, -0.185262, 0.446391, 0.0809097, 0.566523, 0.703503, -0.665943, 0.617548, 0.296477, 0.355082, -0.252071, 0.708397, 0.674327, 0.589374, 0.998967, 0.687747, 0.705414, 0.872475, 0.156963, 0.365409, 0.168763, 0.719898, 0.135305, 0.725, 0.663127, 0.518488, 0.881269, 0.359121, 0.746609, 0.760756, 0.246815, 0.89541, 0.778228, 0.0666801, 0.803189, 0.716048, -0.0911379, 0.790764, 0.760849, -0.41009, 0.795655, 0.763212, -0.763912, 0.580055, 0.416127, -1.01448, -0.129286, 0.406555, -0.132011, 0.590789, 0.753945, 0.448546, -1.06377, -0.796551, -0.403806, 0.36773, 0.616859, -1.0569, 0.78915, 0.765605, 0.196921, 0.78318, 0.117571, 0.759007, 0.697167, 0.278719, 0.657735, -1.19038, 0.508114, -0.70805, 0.605802, -0.0768844, 0.704636, 0.565186, 0.657129, 0.906662, 0.00709912, 0.905609, 0.907648, -1.74131, 0.819217, 0.843306, 0.627667, 0.163129, 0.25134, 0.631155, 0.387991, 0.418994, 0.592418, 0.050644, 0.664843, -0.209879, 0.923363, 0.807211, 0.664306, 0.996524, 0.195355, 0.954902, 0.845549, 0.635498, 0.943852, 0.0793695, 0.785078, 0.465237, 0.599655, 0.491282, 0.514941, 0.568536, 0.480618, 0.746087, 0.120836, 0.866337, 0.31174, 0.938247, 1.0289, 0.289527, 0.755873, 0.655085, -0.499334, -0.259725, 0.338977, 0.143972, 0.859701, 0.792611, 0.330285, 0.859521, 0.40562, 0.690628, 0.680219, 0.300428, 0.749409, 0.209946, 0.586182, 0.571678, 0.00301989, 0.627676, 0.454367, 0.0634921, 0.607564, 0.522428, 0.00132708, 0.73621, 0.702111, -0.205629, 0.685112, 0.122854, 0.8129, 0.926235, -0.0567331, 0.886331, 0.882385, -0.390936, 0.673934, 0.586023, 0.260736, 0.401958, 0.436791, 0.0912652, 0.767963, 0.683042, 0.108011, 0.71504, 0.460619, 0.23437, 0.50904, 0.181838, -0.537746, 0.0149679, 0.134039, -0.106998, 0.101021, 0.42431, -0.00538352, 0.229936, -0.121128, 0.567515, 0.7541, 0.254406, 0.506497, 0.482994, 0.00765643, 0.38104, -0.184141, 0.477319, -0.00249011, 0.385984, 0.537053, 0.47749, 0.472307, -0.0453997, 0.716616, 0.986349, 0.662232, 0.849671, 1.06678, 0.409403, 0.960615, 0.938559, 0.322894, 0.889226, 0.150741, 0.785991, 0.545499, 0.613523, 0.583713, 0.67685, 0.946729, 0.304149, 0.780709, 0.613241, 0.605926, 0.767555, 0.107749, 0.842406, 0.531807, 0.609235, 0.776023, 0.257323, 0.152981, -0.360684, 0.0279631, -0.596286, 0.41218, 0.478299, 0.263942, -0.353758, 0.224195, 0.650149, 0.665131, -0.352957, 0.841821, 0.878593, -0.0948757, 0.786582, 0.762314, -0.111912, 0.799535, 0.793173, 0.355822, 0.164972, 0.47077, 0.339384, -0.980384, 0.318232, 0.185953, 0.0811468, 0.408643, -1.67767, 0.588286, 0.632128, -0.271197, 0.461337, 0.395264, -0.598756, -0.555229, 0.398254, 0.449018, -0.111389, 0.676292, 0.63542, -0.370379, 0.655395, 0.611654, -0.134479, -0.0344882, -0.153212, 0.355869, -0.389535, 0.451993, 0.283435, 0.61504, 0.921984, 0.570552, 0.82219, 1.04605, 0.557778, 0.89129, 1.00263, 0.180643, 0.810679, 0.66056, 0.466646, 0.732985, -0.33764, 0.64997, 0.58362, -0.11456, -0.847396, -0.169895, 0.149913, 0.646409, 0.481913, 0.424152, 0.7686, 0.460747, 0.107769, -0.285481, 0.487715, 0.428607, 0.336004, 0.634809, -0.571451, 0.772825, 0.703681, 0.132205, 0.741784, 0.553264, -0.324056, 0.272436, 0.140591, 0.322237, 0.536001, 0.315161, 0.354268, 0.73687, 0.619266, -0.683098, 0.526773, 0.42198, -0.0205789, 0.58912, 0.450355, 0.318149, 0.778539, 0.548455, 0.654856, 1.00634, 0.824787, 0.414371, 0.877818, 0.521676, 0.59631, 0.733462, -0.240572, 0.516443, 0.172657, 0.378772, 0.378635, 0.20957, 0.629895, 0.282512, 0.487368, 0.748119, 0.53584, 0.0638383, 0.638043, 0.636525, 0.357097, -0.50903, -0.0738895, 0.258538, 0.392401, 0.128918, 0.238397, 0.582415, 0.309624, 0.231419, 0.315953, 0.381503, 0.798008, 0.60758, 0.313499, 0.694362, 0.369349, -0.0162735, 0.0876863, -0.0270065, 0.453315, 0.536715, 0.17517, 0.878002, 0.733887, 0.679691, 1.02956, 0.590995, 0.860652, 0.917141, 0.0208174, 0.796934, -0.298213, 0.950289, 0.747269, 0.788813, 1.03353, 0.401919, 0.882097, 0.901397, 0.0611732, 0.400479, -0.587234, 0.314134, 0.049424, -1.03896, 0.0150003, -0.0845768, 0.366481, 0.614975, -0.158268, 0.626852, 0.626287, -0.741923, 0.427979, 0.0687478, -1.15181, 0.179767, 0.0679663, 0.531838, 0.787242, -0.222683, 0.925136, 0.980396, -0.113725, 0.853388, 0.728298, 0.140815, 0.50162, -0.405536, 0.16772, 0.41616, 0.743851, 0.46058, 0.0164515, -0.0319276, -0.0788926, -0.114853, 0.56751, 0.242897, 0.606214, 0.707402, 0.183139, 0.843703, 0.427722, 0.811164, 0.904777, -0.158754, 0.942335, 0.804322, 0.43379, 0.867464, 0.522166, 0.549167, 0.797226, 0.609231, -0.390127, 0.300481, 0.420182, 0.306373, -0.0289476, -0.436807, 0.400555, 0.730747, 0.788623, 0.29539, 0.659096, 0.801681, -0.10716, 0.70268, 0.491004, 0.590919, 0.739636, 0.140162, 0.857516, 0.535315, 0.678258, 0.770093, 0.0398613, 0.75402, 0.212535, 0.648623, 0.614383, -0.229433, 0.292608, -0.135363, 0.211924, -0.327816, -0.848759, 0.579719, 0.617773, 0.468224, 0.950347, 0.556414, 0.940643, 1.1193, 0.635311, 0.814396, 0.871662, 0.0615323, 0.269064, -0.27849, 0.160436, 0.255466, 0.554088, -0.388065, 0.439706, -0.00289459, 0.337792, 0.00156248, 0.399434, 0.326372, 0.18326, 0.209644, 0.447424, 0.629585, -0.172902, 0.642742, -2.48898, 0.804216, 0.60148, 0.684882, 0.830132, 0.334899, 0.957759, 0.521706, 0.810474, 0.664688, 0.866846, 1.06629, -1.54439, 1.13334, 1.077, 0.28315, 1.02505, 0.806706, 0.124286, 0.450114, -0.306178, -0.0160766, 0.465741, -0.0170627, 0.51876, 0.455872, 0.450001, 0.763403, 0.216445, 0.55945, 0.415356, 0.418502, 0.624143, -0.402438, 0.443542, 0.0567748, 0.329108, 0.390122, -0.292091, -1.04782, 0.100237, 0.326298, 0.100349, -0.433058, 0.309749, 0.55008, 0.549269, -0.124648, 0.47249, 0.60098, 0.303127, -0.33503, -0.193724, -0.149829, 0.702538, 0.85016, 0.176519, 0.856643, 0.907199, 0.152562, 1.01504, 0.890871, 0.45134, 0.92279, 0.514101, 0.671384, 0.784175, 0.134007, 0.382572, 0.247408, -0.0768465, 0.392406, 0.420804, 0.122099, 0.175947, 0.585601, 0.472857, -0.657352, 0.154741, -0.257633, 0.132356, 0.317231, 0.742538, 0.480104, 0.562952, 0.821271, 0.499563, -0.104169, -0.560743, 0.0958218, 0.0616143, 0.635938, 0.158709, 0.76794, 0.894358, -0.0919341, 0.809405, 0.681636, 0.379004, 0.711513, 0.239025, -0.35243, 0.248879, 0.361138, 0.42595, 0.799524, 0.158984, 0.795522, 0.681942, 0.738174, 1.01198, 0.0931464, 1.03961, 1.02003, 0.286219, 1.01569, 0.762651, 0.478424, 0.547193, 0.500973, 0.776446, -0.292584, 0.755534, 0.678501, 0.158198, 0.749007, 0.665749, 0.0841452, 0.174356, 0.427625, 0.325833, -0.39059, 0.526008, 0.59261, 0.147782, 0.215652, 0.456611, 0.415132, 0.308103, -0.119821, 0.211295, 0.494882, 0.145088, 0.313832, 0.443534, -0.16654, 0.604947, 0.379899, 0.515451, 0.858892, 0.746446, -0.693279, 0.617173, 0.664927, 0.257683, 0.27791, 0.60761, 0.53243, -0.0750667, 0.0552866, -0.0881976, -0.112036, 0.0671868, -0.48063, 0.219818, -0.225788, 0.344564, 0.536656, -0.225788, 0.671894, 0.860031, 0.514762, 0.661467, 0.93354, 0.604236, 0.644316, 0.856492, 0.184526, 0.669848, 0.471181, 0.638669, 0.863632, 0.331454, 0.570229, 0.44557, 0.233829, 0.180704, 0.512339, 0.571233, 0.56113, 0.9974, 0.749701, 0.722783, 0.983519, 0.430403, 0.775844, 0.77877, -0.227489, 0.636091, 0.281898, 0.0118515, -1.30225, 0.385221, 0.238218, 0.0830453, 0.419751, 0.271067, 0.0154469, -0.626875, 0.375924, 0.75666, 0.731697, -0.766823, 0.670891, 0.544753, 0.326892, 0.707215, 0.262678, 0.548707, 0.668678, -0.513231, 0.708438, 0.822223, 0.492026, 0.414678, 0.775647, 0.64092, -0.334271, 0.582122, 0.451702, -0.345378, 0.312326, 0.126913, 0.00827967, 0.314738, 0.232976, 0.26324, 0.7162, 0.551373, 0.377164, 0.805475, 0.651418, -0.976921, 0.185002, 0.00740345, 0.460002, -0.213115, 0.540372, 0.627865, -1.02368, 0.69755, 0.744755, -0.126328, 0.626865, 0.534658, 0.420009, 0.804647, 0.290974, 0.818108, 0.954335, 0.225332, 0.851605, 0.863542, -0.551865, 0.774225, 0.639619, -0.898687, 0.0228782, -0.188993, 0.386915, 0.603401, -1.10749, 0.853924, 0.935262, 0.191163, 0.712205, 0.508868, 0.448449, 0.430768, 0.538254, 0.711317, 0.262263, 0.901057, 0.619136, 0.610484, 0.676272, 0.374459, 0.736516, -0.0165417, 0.871499, 0.616823, 0.610548, 0.712432, 0.26846, 0.761135, -0.287663, 0.772018, 0.578786, 0.61892, 0.864805, 0.343299, 0.629162, 0.715687, 0.0593482, 0.582906, 0.859137, 0.853077, 0.212236, 0.818581, 0.975578, 0.437271, 0.808947, 0.867393, -0.819274, 0.642426, -0.481298, 0.703396, 0.439278, 0.62755, 0.765236, -0.506925, 0.545213, -0.451582, 0.579712, 0.261464, 0.508618, 0.52982, 0.162633, 0.57195, -0.340611, 0.376663, -0.878386, 0.592872, 0.428856, 0.270769, 0.432458, 0.209156, 0.704444, 0.527287, -0.352457, 0.290271, 0.263668, 0.441344, 0.514411, -0.775342, 0.783654, 0.905265, 0.455891, 0.687225, 0.903045, 0.654046, 0.200941, 0.689027, 0.454217, 0.407718, 0.76221, 0.395337, 0.663479, 0.839978, -0.417343, 0.881818, 0.823185, 0.343233, 0.830297, -0.26315, 0.877352, 0.762665, 0.490735, 0.774813, 0.087639, 0.869075, 0.500158, 0.731386, 0.803248, -0.536836, 0.612463, 0.0215156, 0.0833259, 0.422866, 0.781129, 0.0336778, 0.88927, 0.9638, 0.230358, 0.686799, 0.599062, -0.451039, -1.40763, -0.155024, 0.317275, 0.69075, 0.193539, 0.692816, 0.668417, 0.575955, 0.967067, 0.586816, 0.720585, 0.773382, 0.20439, 0.793347, 0.42095, 0.390653, 0.3963, -0.566408, -0.114456, 0.250659, 0.0351164, 0.680256, 0.454427, 0.456299, 0.55338, 0.264501, 0.533489, 0.621125, 1.0351, 0.663846, 0.956601, 1.10485, 0.152204, 0.999343, 0.885296, 0.368785, 0.684377, 0.292282, 0.753041, -0.662546, 0.700151, -0.0974457, 0.844308, 0.793271, 0.472907, 0.913737, 0.44548, 0.733835, 0.773754, -0.275439, 0.710747, 0.530834, 0.0469496, 0.566952, 0.540835, 0.12916, 0.33667, 0.721888, 0.693311, 0.0090553, 0.375363, 0.312093, -1.14631, -0.612691, 0.319375, 0.239046, 0.260436, 0.702564, 0.682153, 0.286594, 0.074906, 0.518327, 0.514067, -0.605443, 0.732187, 0.804129, -0.656497, 0.851772, 0.824605, 0.142621, 0.848113, 0.553294, 0.534872, 0.640955, -0.0978226, 0.565988, -0.333946, 0.49873, 0.263854, 0.0195223, -0.355426, 0.662963, 0.634568, 0.276784, 0.847263, 0.716078, 0.0529732, 0.741542, 0.740344, 0.490075, -0.485475, 0.248812, 0.237663, -0.138693, 0.366727, -1.88641, 0.524997, 0.207235, 0.651485, 0.786573, 0.0951894, 0.962429, 0.805592, 0.684077, 1.01819, 0.539706, 0.814516, 0.861271, -0.594272, 0.539461, -0.885006, 0.487281, 0.0486109, 0.115049, -0.124781, 0.484443, -0.183082, 0.816731, 0.680381, 0.701186, 1.04933, 0.774399, 0.544588, 0.735365, -1.32499, 0.409952, 0.126305, 0.608523, -0.380882, 0.791474, 0.621937, 0.570371, 0.84387, 0.182076, 0.678676, 0.571478, 0.289467, 0.565577, -0.422067, 0.534488, -0.522654, 0.730321, 0.802596, 0.0145819, 0.697234, 0.753535, -0.1129, 0.657425, 0.698658, -0.490213, 0.625627, 0.477064, 0.558489, 0.940861, 0.789372, 0.347285, 0.915187, 0.80927, -0.710558, 0.677162, 0.618814, 0.00619396, 0.0423347, 0.194529, 0.201151, 0.178993, -0.168645, -0.0839002, 0.250679, 0.0724031, -0.157747, 0.404259, 0.482001, 0.280596, -0.682417, -0.146596, -0.137364, -0.0641936, 0.131215, -0.0846131, 0.184724, 0.581959, 0.530807, -0.138322, -0.0913759, -0.47673, 0.208337, -0.446101, 0.315732, 0.403391, 0.0598187, -0.251824, -0.184104, 0.198917, 0.742048, 0.697382, 0.478022, 1.03175, 0.886282, 0.662229, 1.07388, 0.685729, 0.899095, 1.03982, 0.284483, 0.798117, 0.586694, 0.531831, 0.613568, 0.33602, 0.735449, -0.275939, 0.777951, 0.780722, -0.0272334, 0.300516, -0.395053, 0.108149, -0.616904, 0.409122, 0.351899, -1.03631, -0.0664151, -0.763345, -1.52937, 0.0174861, 0.244484, -0.0993075, 0.0684564, 0.449765, 0.532343, 0.373607, -0.279777, 0.553548, 0.558429, -0.357534, 0.723166, 0.791251, 0.313122, 0.541932, 0.77359, 0.565299, 0.193432, 0.789152, 0.822884, 0.384375, 0.450431, 0.596443, -0.608239, 0.489638, 0.075508, 0.587702, 0.732448, -0.0556138, 0.659326, 0.676215, -0.982874, 0.544862, 0.390408, -0.0578881, 0.286117, -0.228511, 0.587635, 0.624304, -0.19119, 0.582768, 0.654627, -1.41831, 0.732135, 0.740182, -0.682792, 0.598247, 0.377485, 0.149079, 0.153959, 0.0357882, -0.275858, 0.816302, 0.897405, -0.0471787, 1.04756, 0.994976, 0.296818, 0.981674, 0.611267, 0.746419, 0.77544, 0.319845, 0.795252, 0.135916, 0.636248, 0.52223, -0.516254, -0.272055, 0.554419, 0.224394, 0.592814, 0.635145, 0.364395, 0.808245, 0.177005, 0.707048, 0.454777, 0.726464, 0.833305, 0.195535, 0.906576, 0.465643, 0.870396, 0.979997, 0.146, 0.821439, 0.840588, 0.450144, -0.511528, -0.1642, 0.440981, 0.629354, 0.282998, 0.38729, 0.57406, 0.147605, -0.572814, -0.194383, 0.0700988, -0.805646, -0.699731, 0.405044, 0.531722, 0.124321, 0.79939, 0.501217, 0.778623, 0.972343, 0.210711, 0.873314, 0.777586, 0.543719, 0.898829, 0.343719, 0.66263, 0.527778, 0.395228, 0.537804, 0.306888, 0.810458, 0.661401, -0.13529, 0.633744, 0.686779, 0.530456, -0.76935, 0.698252, 0.854391, 0.567698, 0.359392, 0.656881, 0.148536, 0.411307, 0.501524, 0.0205157, -0.0353649, 0.213126, 0.0666118, -0.0788108, 0.544522, 0.579351, -0.398863, 0.47727, 0.319895, 0.168219, 0.345415, -0.278432, 0.192333, 0.0157271, 0.220917, 0.539791, 0.897454, 0.49906, 0.842506, 0.970936, -0.478199, 0.891736, 0.613742, 0.654109, 0.545056, 0.838135, 1.04177, -0.0501907, 1.04544, 0.971138, 0.512351, 1.01397, 0.688796, 0.527403, 0.622298, -1.16571, 0.288745, 0.0602895, 0.277895, 0.484503, -3.91414, 0.719376, 0.691796, 0.283215, 0.780947, 0.0932365, 0.769897, 0.747791, -0.188631, 0.53442, -0.348155, -0.0175797, 0.419317, 0.629161, 0.216642, 0.935874, 0.843601, 0.0933334, 0.700049, -0.0126666, 0.385058, -0.157629, 0.622917, -0.251451, 0.78212, 0.771341, -0.0819454, 0.632018, -0.294588, 0.464178, -1.45144, 0.533665, -0.904205, 0.721153, 0.388545, 0.846596, 0.98422, -0.642219, 1.01116, 0.819354, 0.79429, 1.04545, 0.249029, 0.968478, 0.927672, 0.287727, 0.958206, 0.838671, -0.0182244, 0.265743, 0.165126, 0.109877, 0.287448, 0.196258, -0.442655, 0.406806, 0.572661, 0.507904, -0.126036, 0.366922, 0.500006, -0.0943129, 0.227858, 0.0112103, 0.151773, 0.206852, -0.237625, -0.0667541, 0.365473, 0.63374, 0.00333867, 0.612309, 0.631714, -0.169402, 0.621204, 0.383453, -0.100184, -0.127446, 0.122096, 0.248583, 0.0793715, 0.366447, 0.513792, -0.27233, 0.855804, 0.893592, 0.0636822, 1.03432, 0.994077, -0.36403, 0.894523, 0.720444, 0.149453, 0.492874, -0.444344, 0.424579, 0.0587191, -0.0719514, -0.22253, -0.199615, 0.105957, 0.246981, 0.253719, -0.381971, 0.5806, 0.551493, 0.291087, 0.822318, 0.616246, 0.359808, 0.537177, 0.334867, 0.74488, -0.0964381, 0.737833, 0.588982, 0.476819, 0.639296, 0.247267, 0.673755, 0.352606, 1.00552, 0.793521, 0.83156, 1.12171, 0.750811, 0.763296, 0.894544, 0.0453521, 0.595288, 0.446272, -0.230121, 0.0955645, 0.180382, 0.191712, 0.600402, 0.00243457, 0.627021, 0.651977, -0.330938, 0.467831, 0.0754771, 0.770666, 0.555625, 0.566707, 0.8317, 0.280069, 0.657991, 0.684392, -0.471769, 0.567904, 0.0454736, 0.585905, 0.697847, -0.165421, 0.688484, 0.822114, 0.556589, -0.0615333, 0.476293, 0.351663, -0.068161, -0.68268, -0.0978784, 0.485639, 0.643217, 0.247263, 0.559198, 0.779216, 0.223856, 0.753741, 0.922844, 0.560313, 0.520076, 0.735191, 0.214982, 0.463508, 0.49989, -0.24593, 0.557293, 0.338116, 0.413501, 0.752131, 0.521141, 0.367219, 0.727679, 0.450384, 0.120586, 0.118801, 0.426619, 0.663572, -0.021046, 0.630132, 0.687629, -0.177147, 0.503394, 0.565089, 0.42542, 0.27546, -0.858195, 0.568085, 0.64992, -0.0420214, 0.889407, 0.878631, -0.443113, 0.835873, 0.687797, 0.0916855, 0.44501, -0.291393, 0.115921, 0.451849, 0.704079, -0.526157, 0.756895, 0.632563, 0.427707, 0.661491, 0.377836, 0.950645, 0.725242, 0.676219, 0.949737, 0.427835, 0.728569, 0.752416, -0.524377, 0.557753, -0.595003, 0.672871, 0.669664, -0.385794, 0.680261, 0.57018, 0.26581, 0.813297, 0.745468, -0.255227, 0.807263, 0.822655, 0.12008, 0.638421, 0.756354, 0.475389, -0.336335, 0.402044, 0.516571, 0.469261, 0.119467, -0.259671, -0.198465, 0.0568206, 0.322361, -0.429157, 0.34973, 0.416007, -0.293162, 0.205574, 0.38025, 0.434001, 0.447397, 0.118082, 0.2233, 0.49591, -0.0547481, 0.429516, 0.520671, -0.197587, 0.205711, 0.0443435, -0.826619, -0.495959, 0.2056, 0.102152, -0.0766751, 0.442674, 0.508574, 0.233246, 0.373273, 0.878936, 0.937848, 0.25236, 0.899692, 0.975702, -0.786968, 0.978537, 0.810839, 0.696804, 0.960572, -0.89212, 0.990166, 0.878327, 0.385947, 0.766777, -0.446397, 0.673275, -2.0742, 0.747006, 0.302095, 0.792325, 0.808184, 0.39698, 0.915013, 0.512739, 0.653279, 0.650176, 0.0662017, 0.420487, 0.133031, 0.391665, 0.459204, 0.864967, 0.62996, 0.308757, 0.561635, 0.0239794, -0.177237, 0.463853, 0.183047, 0.677896, 0.903952, 0.415928, 0.716714, 0.725409, 0.314594, 0.842211, 0.546478, 0.504673, 0.746107, 0.432656, 0.129466, 0.592396, 0.625491, 0.0765294, 0.632719, 0.837421, 0.343454, 0.732396, 0.817145, -0.321248, 0.818732, 0.636012, 0.172974, 0.148176, 0.605734, 0.707263, 0.282948, 0.918628, 0.72225, 0.524418, 0.845729, 0.498284, -0.0760657, -0.505709, 0.4441, 0.0466801, 0.469129, 0.553001, -0.690546, 0.542447, 0.409392, -0.0117511, 0.526764, 0.432011, -0.327103, 0.582038, 0.586778, -0.0527241, 0.803577, 0.771488, 0.041352, 0.827566, 0.588878, 0.614625, 0.893884, 0.611302, 0.0963935, 0.468308, 0.432149, 0.519858, 0.371418, 0.427873, 0.8584, 0.683863, 0.26504, 0.522565, 0.334771, 0.686399, 0.202088, 0.936898, 0.664019, 0.823984, 0.983889, -0.404936, 0.981415, 0.730801, 0.728227, 0.845524, 0.234255, 0.852307, 0.296777, 0.633972, 0.190765, 0.725068, 0.681536, 0.4139, 0.728062, -0.0194996, 0.83883, 0.566986, 0.630192, 0.83664, 0.376873, 0.459239, 0.721174, 0.789924, 0.718592, -0.651145, 0.871601, 0.903575, -0.773552, 0.857051, 0.588815, 0.655297, 0.734267, 0.378877, 0.834138, -0.115824, 0.852827, 0.747124, 0.402634, 0.722795, -0.591068, 0.691996, 0.415661, 0.0821709, -2.20664, 0.449897, -0.173166, 0.594517, 0.453598, 0.559399, 0.753021, -0.0582211, 0.834145, 0.428926, 0.842197, 0.979725, 0.346308, 0.713826, 0.693269, 0.0641337, 0.00285839, 0.481811, -0.0986111, 0.718686, 0.845731, -0.145274, 0.843109, 0.865725, -0.185573, 0.698501, 0.583063, 0.266195, 0.745427, 0.575096, 0.116768, 0.613616, 0.134978, 0.596795, 0.706521, -0.42325, 0.794054, 0.658519, 0.532482, 0.895763, 0.513935, 0.591306, 0.597287, 0.408443, 0.781885, 0.198468, 0.692383, 0.777808, 0.388369, -0.57725, 0.0580107, 0.490602, 0.716114, 0.422682, 0.65037, 0.933144, 0.649651, 0.446505, 0.664953, -0.257759, 0.403795, 0.144669, -0.956495, 0.236137, 0.427426, -0.229189, 0.639095, 0.420307, 0.479949, 0.699353, -0.0357752, 0.459478, -0.0284435, 0.540043, 0.584095, -1.61986, 0.47304, 0.441625, 0.276579, 0.231029, -0.406898, 0.303387, 0.31146, -0.0228032, 0.292798, 0.273758, 0.659873, -0.01266, 1.00766, 1.00983, 0.270764, 1.09551, 0.915594, 0.741546, 1.06481, 0.589643, 0.765978, 0.736611, 0.179625, 0.563252, -0.149485, 0.42734, 0.313399, 0.801231, 0.471928, 0.596387, 0.713743, -1.03552, 0.554566, -0.448122, 0.66661, 0.645981, -0.410322, 0.562904, 0.412621, -0.831664, -0.157465, -0.0624215, 0.336261, 0.555404, 0.465622, -0.3476, 0.120935, 0.0937935, -0.144758, 0.00296298, 0.0144968, -0.0420831, 0.596249, 0.66495, -0.0890847, 0.678412, 0.795985, -0.0831262, 0.844755, 0.955306, 0.367066, 0.822991, 0.943666, 0.416325, 0.618714, 0.611709 - }; + 0.854016, 0.993546, 1.11318, 0.20929, 0.813349, 0.289519, 0.7206, 0.546443, 0.493812, 0.562575, 0.286327, 0.600864, -0.298311, 0.574984, -0.210588, 0.522904, 0.190621, 0.441125, 0.387692, 0.234765, 0.421269, 0.0684186, 0.533258, -0.166778, 0.303785, -0.609869, 0.613708, 0.549625, -0.366913, 0.279913, -1.45569, -1.16559, 0.499606, 0.612354, 0.0734493, 0.885585, 0.893465, 0.247981, 0.563929, 0.657943, 0.459478, -0.130061, 0.385538, 0.72592, 0.547064, 0.516247, 0.877602, 0.451872, 0.766059, 0.856782, -0.0571848, 0.893865, 0.681705, 0.534266, 0.748482, -0.286467, 0.797611, 0.678178, -0.110495, 0.496402, -0.0641248, 0.215095, 0.034023, 0.131887, 0.425742, 0.0710901, 0.414818, 0.77919, 0.750907, -0.0401172, 0.5933, 0.627309, 0.0381589, -0.350286, -0.0904366, -0.438209, 0.573362, 0.757867, -0.852928, 0.896629, 0.882396, 0.270252, 0.945529, 0.636917, 0.727624, 0.89422, 0.246031, 0.48804, 0.0432302, 0.331186, -0.0692771, 0.204347, -0.646393, 0.506737, -0.26241, 0.732532, 0.669993, 0.653655, 1.02998, 0.703696, 0.713486, 0.807355, 0.172699, 0.738174, 0.00900457, 0.91711, 0.683531, 0.746749, 0.981347, 0.442267, 0.748697, 0.816295, 0.302932, 0.0455617, 0.075203, 0.0466316, 0.0930287, -0.160116, 0.583653, 0.621224, -0.0554653, 0.314528, 0.276219, -0.152521, -0.100658, -0.433885, 0.372802, 0.619712, 0.0553921, 0.549429, 0.377843, 0.68311, 0.927148, 0.249331, 0.928307, 0.999056, 0.0644923, 0.83845, 0.73912, 0.042262, 0.519712, -0.624782, 0.4059, -0.35116, 0.655401, 0.625239, -0.438849, 0.35811, 0.271555, -0.432491, -0.066015, 0.394232, 0.599672, 0.430303, 0.312165, 0.78398, 0.644958, 0.345835, 0.862093, 0.751067, -0.290537, 0.625065, 0.260688, 0.47557, 0.585814, -0.284549, 0.68984, 0.626006, -1.62491, 0.357671, -0.126065, -0.401936, 0.293606, 0.6089, -0.50854, 0.852016, 0.956999, 0.203707, 0.853638, 0.821884, 0.30645, 0.871511, 0.508081, 0.582822, 0.588044, 0.36006, 0.716529, -0.255772, 0.71368, 0.621158, 0.379769, 0.847775, 0.749401, -0.174554, 0.54104, 0.689698, 0.533131, -0.633553, 0.519052, 0.376241, 0.310638, 0.663318, 0.162927, 0.608066, 0.713243, -0.358272, 0.675506, 0.743179, 0.481469, -0.143753, -0.106909, 0.410256, 0.531638, -0.0324429, 0.531491, 0.681785, 0.205878, 0.332952, 0.370004, -0.722385, -0.169901, -0.594775, 0.141911, 0.57913, 0.541914, -0.11822, 0.63861, 0.497581, -0.599299, -0.449098, 0.409989, 0.419453, 0.369501, 0.794894, 0.440731, 0.696953, 0.876691, 0.182411, 0.732099, 0.613098, 0.627773, 0.970709, 0.636859, 0.764724, 0.999052, 0.563722, 0.785099, 0.956997, 0.509564, 0.580487, 0.667356, -0.403648, 0.385706, 0.103133, -1.36517, 0.280877, 0.564012, -0.1628, 0.700166, 0.814303, 0.258044, 0.475954, 0.366394, 0.0116578, -0.0604135, 0.388014, 0.425835, 0.315041, 0.753825, 0.513455, 0.117073, 0.164386, 0.289126, 0.385718, 0.124825, 0.520239, -0.833683, 0.47947, -0.0718252, 0.462251, -0.0667595, 0.744527, 0.831375, -0.121631, 0.914666, 0.773574, 0.528245, 0.933019, 0.65873, 0.48412, 0.845168, 0.784145, 0.412803, 0.304084, 0.753141, 0.671429, 0.041504, 0.73144, 0.441646, 0.407346, 0.249898, 0.692977, 0.865854, -0.5734, 0.870213, 0.697184, 0.600919, 0.806054, -0.0457529, 0.804872, 0.130985, 0.836436, 0.788484, 0.323337, 0.743796, -0.949686, 0.70471, 0.0582618, 0.745514, 0.643382, 0.521674, 0.79559, -0.725013, 0.876276, 0.831256, -1.46226, 0.667607, 0.653002, 0.413006, -0.401406, 0.540008, 0.870879, 0.808875, -0.49131, 0.78609, 0.665446, 0.187287, 0.652266, 0.138259, 0.458778, 0.460304, -0.0441013, 0.621556, 0.605328, -0.0679361, 0.427608, 0.530718, -0.517716, 0.506532, 0.344404, 0.477567, 0.754181, 0.121036, 0.682401, 0.588096, 0.57313, 0.891757, 0.361856, 0.754657, 0.775288, -0.229421, 0.645089, 0.303278, -1.14323, 0.527082, 0.792943, 0.167988, 0.849154, 0.946467, 0.124207, 0.813536, 0.822644, 0.150616, 0.335035, 0.30572, -0.178297, -0.0811871, 0.430482, 0.420994, 0.210219, 0.799435, 0.661348, 0.44358, 0.797256, -0.201129, 0.81911, 0.725489, 0.361385, 0.711675, -1.04926, 0.656241, 0.16211, 0.538415, 0.256843, 0.600649, 0.712545, -0.0206035, 0.0235428, 0.0990901, -0.139008, 0.745207, 0.924702, -1.78652, 1.05668, 1.02959, 0.255024, 0.987849, 0.576824, 0.727371, 0.580511, 0.661968, 0.749573, 0.376377, 0.773145, 0.239933, 0.963112, 0.612277, 0.85737, 0.926533, 0.397738, 1.01847, 0.682635, 0.774345, 0.879025, -0.232657, 0.849725, 0.728776, -0.525003, 0.241502, 0.0844462, 0.0843273, 0.15951, -0.36139, -0.35806, -0.671322, -1.15557, 0.555908, 0.816953, 0.47205, 0.740392, 0.978714, 0.626248, 0.587683, 0.749233, -0.0525426, 0.500605, 0.468495, 0.158754, 0.057823, -0.746556, 0.375994, 0.468879, -0.0454764, 0.695019, 0.557173, 0.170414, 0.517123, -0.496691, 0.575308, 0.391909, -0.120096, 0.0912305, -1.54322, 0.0632694, 0.557163, 0.331098, 0.578509, 0.879, 0.620884, 0.424873, 0.7452, 0.483165, -1.36443, -0.622636, 0.28447, 0.260859, -0.349434, 0.438488, 0.455393, -0.68379, 0.689846, 0.817054, 0.183494, 0.81377, 0.903293, -0.13664, 1.01498, 0.943892, 0.389461, 0.962864, 0.527708, 0.78021, 0.783514, 0.316661, 0.787332, 0.118751, 0.572132, 0.225686, 0.337508, -0.4088, 0.781266, 0.648061, 0.690778, 1.01871, 0.709201, 0.529924, 0.642958, -0.220846, 0.325042, 0.231021, 0.476783, 0.291796, 0.785051, 0.444021, 0.527686, 0.548088, 0.230174, 0.57421, -1.19209, 0.406028, 0.122907, 0.757224, 0.424879, 0.717024, 0.88484, 0.0991959, 0.784909, 0.782183, -1.0086, 0.623639, 0.489784, -0.0617728, 0.56103, 0.494651, 0.0106223, 0.826064, 0.941823, 0.534747, 0.733595, 0.938621, 0.45882, 0.68115, 0.742897, -0.422924, 0.332851, 0.0806206, 0.618069, -0.00151829, 0.63225, 0.578506, 0.39902, 0.803745, 0.452716, 0.501212, 0.624927, -0.446673, 0.320315, -1.00135, 0.361342, -0.258272, 0.558595, 0.658153, -0.509108, 0.672716, 0.715831, 0.090981, 0.332665, 0.0256895, 0.452572, 0.655663, 0.205398, 0.492135, 0.70286, 0.453084, 0.0804718, 0.646473, 0.757862, 0.637141, -0.627067, 0.749283, 0.808609, -0.531872, 0.855052, 0.859739, -0.158859, 0.854623, 0.640231, 0.507596, 0.693873, 0.0497417, 0.738992, 0.0250381, 0.79888, 0.773193, 0.384123, 0.9201, 0.71252, 0.161839, 0.426347, 0.135046, 0.524471, -0.640098, 0.49932, 0.346906, -0.0170459, 0.266377, -0.444414, -1.20691, 0.325593, 0.572304, 0.390173, -0.0474332, 0.582128, 0.643012, 0.226463, 0.536039, 0.843719, 0.640636, 0.537838, 0.944105, 0.726165, 0.55044, 0.905266, 0.582138, 0.49963, 0.70861, 0.3071, -0.678955, 0.0532102, 0.458085, 0.279091, -0.36474, 0.159375, 0.111037, 0.156523, 0.0638661, 0.0213221, 0.564279, 0.511946, -0.808087, 0.3145, -0.490765, 0.551012, 0.362135, 0.47652, 0.779113, 0.408724, 0.589682, 0.80167, 0.39397, 0.492548, 0.680939, 0.317648, -0.0159533, 0.114082, -0.522151, -0.129666, 0.27081, -1.01527, 0.752707, 0.950282, 0.601555, 0.767821, 0.99574, 0.46576, 0.836646, 0.868453, 0.151539, 0.855736, 0.249128, 0.874361, 0.907871, -0.284809, 0.835319, 0.576911, 0.402346, 0.476863, 0.141722, 0.461079, -0.339659, 0.464568, 0.0414557, 0.0702232, -0.349946, -0.50184, 0.360717, 0.669762, 0.103302, 0.707418, 0.726243, 0.423174, 0.976976, 0.831772, 0.205661, 0.764346, 0.542064, -0.179183, -0.16128, -1.17935, 0.587364, 0.780975, 0.358381, 0.521946, 0.557555, -0.0229764, 0.496934, -0.918863, 0.473785, 0.28367, -0.368198, -0.564302, -0.577025, 0.319487, 0.605362, -0.986933, 0.820393, 0.81609, 0.24579, 0.859023, 0.181251, 0.886646, 0.842563, 0.477457, 0.876698, -0.268706, 0.989335, 0.792186, 0.812491, 1.08037, 0.57315, 0.88379, 0.988095, 0.5438, 0.224372, 0.311942, 0.181625, 0.394584, 0.350581, -0.144387, 0.468882, 0.11592, 0.27208, 0.360062, -0.839878, 0.291392, 0.129452, -0.39743, 0.29446, 0.500638, 0.501819, -0.0247867, 0.304968, 0.358061, -0.126235, 0.52474, 0.403963, -1.17069, -0.040805, -0.102592, 0.223139, 0.385277, -0.842077, 0.586407, 0.656588, 0.00154569, 0.0849921, 0.019524, 0.394701, 0.403903, 0.953648, 0.803219, 0.713778, 1.08063, 0.691898, 0.884505, 1.00931, -0.0404298, 0.848488, 0.625453, 0.570487, 0.798024, 0.408039, -0.151301, -0.172297, -0.336558, 0.120647, -0.408581, 0.418846, 0.508259, -0.327565, 0.549864, 0.229633, 0.238451, 0.154628, -0.200251, 0.127112, 0.759628, 0.642507, 0.600522, 0.966059, 0.610015, 0.632113, 0.627386, 0.404047, 0.580423, 0.550112, 0.889328, -0.568245, 0.996777, 0.946698, 0.263234, 0.868737, 0.232869, 0.715344, 0.583776, 0.0571404, -0.0550246, 0.383315, -0.367777, 0.720987, 0.621575, 0.702448, 0.981735, 0.0337758, 0.996183, 0.881053, 0.772002, 1.10652, 0.624785, 0.900932, 0.951364, -0.126126, 0.548716, -0.538035, 0.552967, -1.09511, 0.729016, 0.64113, 0.230565, 0.747579, 0.648281, 0.23278, -0.553627, -0.2861, 0.104126, -0.129168, -0.0161997, 0.173587, -0.648037, -0.540068, 0.000131378, 0.0324753, 0.265996, 0.565743, -1.03224, 0.781512, 0.768971, 0.187954, 0.848755, 0.526056, 0.665798, 0.79839, -0.334607, 0.856509, 0.826894, 0.0361677, 0.551958, 0.690264, 0.595508, -0.0678071, 0.607464, 0.859135, 0.692273, -0.117425, 0.527934, -0.143818, 0.335329, -0.158666, 0.398865, 0.303916, 0.285849, 0.593148, 0.156377, 0.313758, 0.425572, -0.124118, 0.124932, 0.438803, 0.493702, 0.0563424, 0.430445, 0.641868, 0.130081, 0.405269, 0.175046, 0.507695, 0.632528, -0.303472, 0.620083, 0.0841833, 0.507603, 0.105847, 0.598009, 0.281388, 0.90794, 1.09911, 0.385386, 1.07324, 1.09957, -0.016151, 1.05508, 0.827806, 0.627748, 0.807129, -0.112241, 0.716101, 0.0960932, 0.541358, 0.214701, 0.468606, 0.456758, 0.00188511, 0.361066, -0.562568, -0.596024, 0.536362, 0.60933, -0.0857844, 0.720365, 0.435529, 0.55063, 0.692401, -1.02409, 0.586655, -0.052441, 0.676669, 0.776185, 0.348617, 0.199348, 0.459425, 0.503571, 0.505406, 0.0291767, 0.509025, 0.764344, 0.563037, 0.0214237, 0.576244, 0.488725, -0.0728187, 0.172886, 0.542236, 0.538779, -0.43912, 0.745977, 0.801184, -0.0742379, 0.673204, 0.529753, 0.469493, 0.738995, -0.462181, 0.758417, 0.623102, 0.578779, 0.937414, 0.670858, 0.470621, 0.711464, -0.750314, 0.674732, 0.456082, 0.57592, 0.849432, 0.432995, 0.688137, 0.893257, 0.579941, 0.316032, 0.6129, 0.37667, -0.100626, -0.20783, -0.314307, 0.483215, 0.508102, 0.190307, 0.845427, 0.79866, -0.246764, 0.761277, 0.57923, 0.201543, 0.518459, -0.0558072, -0.703641, 0.319927, 0.528099, -0.143267, 0.298149, -0.485124, 0.437129, -0.03035, 0.675801, 0.779112, -0.273136, 0.859623, 0.738096, 0.302866, 0.680428, -0.406205, 0.715123, 0.251147, 0.774273, 0.893162, 0.0304596, 0.807908, 0.809375, -0.417963, 0.835403, 0.871103, 0.39456, 0.564935, 0.80083, 0.53891, 0.382894, 0.775241, 0.635601, -0.422521, 0.0286564, -0.447423, -0.12394, 0.189827, 0.494714, -0.0139456, 0.347089, 0.244044, 0.208013, 0.34574, 0.305124, 0.760705, 0.527585, 0.488866, 0.801136, 0.528048, 0.0978565, 0.335477, -0.551486, 0.265525, -0.179381, -0.0198072, -0.380161, 0.255579, 0.5025, 0.331726, -0.212626, 0.470925, 0.45865, -1.18937, 0.611174, 0.791236, 0.636328, -0.0804286, 0.778674, 0.855067, 0.423285, 0.633716, 0.857372, 0.43253, 0.641717, 0.733024, 0.155325, 0.875226, 0.621508, 0.716654, 0.953214, 0.43837, 0.650827, 0.489081, 0.535925, 0.622312, 0.366792, 0.75468, -0.29683, 0.909317, 0.77707, 0.536274, 0.865932, 0.0119295, 0.77146, 0.63128, 0.236415, 0.352647, 0.445058, 0.634364, 0.146615, 0.849101, 0.732437, 0.00192852, 0.692816, 0.661218, 0.481978, 0.0136639, 0.457427, 0.790783, 0.577194, 0.484741, 0.743007, -0.131325, 0.903594, 0.791214, 0.452915, 0.879292, 0.454726, 0.612346, 0.706628, 0.22589, -2.00451, -0.296616, -0.185262, 0.446391, 0.0809097, 0.566523, 0.703503, -0.665943, 0.617548, 0.296477, 0.355082, -0.252071, 0.708397, 0.674327, 0.589374, 0.998967, 0.687747, 0.705414, 0.872475, 0.156963, 0.365409, 0.168763, 0.719898, 0.135305, 0.725, 0.663127, 0.518488, 0.881269, 0.359121, 0.746609, 0.760756, 0.246815, 0.89541, 0.778228, 0.0666801, 0.803189, 0.716048, -0.0911379, 0.790764, 0.760849, -0.41009, 0.795655, 0.763212, -0.763912, 0.580055, 0.416127, -1.01448, -0.129286, 0.406555, -0.132011, 0.590789, 0.753945, 0.448546, -1.06377, -0.796551, -0.403806, 0.36773, 0.616859, -1.0569, 0.78915, 0.765605, 0.196921, 0.78318, 0.117571, 0.759007, 0.697167, 0.278719, 0.657735, -1.19038, 0.508114, -0.70805, 0.605802, -0.0768844, 0.704636, 0.565186, 0.657129, 0.906662, 0.00709912, 0.905609, 0.907648, -1.74131, 0.819217, 0.843306, 0.627667, 0.163129, 0.25134, 0.631155, 0.387991, 0.418994, 0.592418, 0.050644, 0.664843, -0.209879, 0.923363, 0.807211, 0.664306, 0.996524, 0.195355, 0.954902, 0.845549, 0.635498, 0.943852, 0.0793695, 0.785078, 0.465237, 0.599655, 0.491282, 0.514941, 0.568536, 0.480618, 0.746087, 0.120836, 0.866337, 0.31174, 0.938247, 1.0289, 0.289527, 0.755873, 0.655085, -0.499334, -0.259725, 0.338977, 0.143972, 0.859701, 0.792611, 0.330285, 0.859521, 0.40562, 0.690628, 0.680219, 0.300428, 0.749409, 0.209946, 0.586182, 0.571678, 0.00301989, 0.627676, 0.454367, 0.0634921, 0.607564, 0.522428, 0.00132708, 0.73621, 0.702111, -0.205629, 0.685112, 0.122854, 0.8129, 0.926235, -0.0567331, 0.886331, 0.882385, -0.390936, 0.673934, 0.586023, 0.260736, 0.401958, 0.436791, 0.0912652, 0.767963, 0.683042, 0.108011, 0.71504, 0.460619, 0.23437, 0.50904, 0.181838, -0.537746, 0.0149679, 0.134039, -0.106998, 0.101021, 0.42431, -0.00538352, 0.229936, -0.121128, 0.567515, 0.7541, 0.254406, 0.506497, 0.482994, 0.00765643, 0.38104, -0.184141, 0.477319, -0.00249011, 0.385984, 0.537053, 0.47749, 0.472307, -0.0453997, 0.716616, 0.986349, 0.662232, 0.849671, 1.06678, 0.409403, 0.960615, 0.938559, 0.322894, 0.889226, 0.150741, 0.785991, 0.545499, 0.613523, 0.583713, 0.67685, 0.946729, 0.304149, 0.780709, 0.613241, 0.605926, 0.767555, 0.107749, 0.842406, 0.531807, 0.609235, 0.776023, 0.257323, 0.152981, -0.360684, 0.0279631, -0.596286, 0.41218, 0.478299, 0.263942, -0.353758, 0.224195, 0.650149, 0.665131, -0.352957, 0.841821, 0.878593, -0.0948757, 0.786582, 0.762314, -0.111912, 0.799535, 0.793173, 0.355822, 0.164972, 0.47077, 0.339384, -0.980384, 0.318232, 0.185953, 0.0811468, 0.408643, -1.67767, 0.588286, 0.632128, -0.271197, 0.461337, 0.395264, -0.598756, -0.555229, 0.398254, 0.449018, -0.111389, 0.676292, 0.63542, -0.370379, 0.655395, 0.611654, -0.134479, -0.0344882, -0.153212, 0.355869, -0.389535, 0.451993, 0.283435, 0.61504, 0.921984, 0.570552, 0.82219, 1.04605, 0.557778, 0.89129, 1.00263, 0.180643, 0.810679, 0.66056, 0.466646, 0.732985, -0.33764, 0.64997, 0.58362, -0.11456, -0.847396, -0.169895, 0.149913, 0.646409, 0.481913, 0.424152, 0.7686, 0.460747, 0.107769, -0.285481, 0.487715, 0.428607, 0.336004, 0.634809, -0.571451, 0.772825, 0.703681, 0.132205, 0.741784, 0.553264, -0.324056, 0.272436, 0.140591, 0.322237, 0.536001, 0.315161, 0.354268, 0.73687, 0.619266, -0.683098, 0.526773, 0.42198, -0.0205789, 0.58912, 0.450355, 0.318149, 0.778539, 0.548455, 0.654856, 1.00634, 0.824787, 0.414371, 0.877818, 0.521676, 0.59631, 0.733462, -0.240572, 0.516443, 0.172657, 0.378772, 0.378635, 0.20957, 0.629895, 0.282512, 0.487368, 0.748119, 0.53584, 0.0638383, 0.638043, 0.636525, 0.357097, -0.50903, -0.0738895, 0.258538, 0.392401, 0.128918, 0.238397, 0.582415, 0.309624, 0.231419, 0.315953, 0.381503, 0.798008, 0.60758, 0.313499, 0.694362, 0.369349, -0.0162735, 0.0876863, -0.0270065, 0.453315, 0.536715, 0.17517, 0.878002, 0.733887, 0.679691, 1.02956, 0.590995, 0.860652, 0.917141, 0.0208174, 0.796934, -0.298213, 0.950289, 0.747269, 0.788813, 1.03353, 0.401919, 0.882097, 0.901397, 0.0611732, 0.400479, -0.587234, 0.314134, 0.049424, -1.03896, 0.0150003, -0.0845768, 0.366481, 0.614975, -0.158268, 0.626852, 0.626287, -0.741923, 0.427979, 0.0687478, -1.15181, 0.179767, 0.0679663, 0.531838, 0.787242, -0.222683, 0.925136, 0.980396, -0.113725, 0.853388, 0.728298, 0.140815, 0.50162, -0.405536, 0.16772, 0.41616, 0.743851, 0.46058, 0.0164515, -0.0319276, -0.0788926, -0.114853, 0.56751, 0.242897, 0.606214, 0.707402, 0.183139, 0.843703, 0.427722, 0.811164, 0.904777, -0.158754, 0.942335, 0.804322, 0.43379, 0.867464, 0.522166, 0.549167, 0.797226, 0.609231, -0.390127, 0.300481, 0.420182, 0.306373, -0.0289476, -0.436807, 0.400555, 0.730747, 0.788623, 0.29539, 0.659096, 0.801681, -0.10716, 0.70268, 0.491004, 0.590919, 0.739636, 0.140162, 0.857516, 0.535315, 0.678258, 0.770093, 0.0398613, 0.75402, 0.212535, 0.648623, 0.614383, -0.229433, 0.292608, -0.135363, 0.211924, -0.327816, -0.848759, 0.579719, 0.617773, 0.468224, 0.950347, 0.556414, 0.940643, 1.1193, 0.635311, 0.814396, 0.871662, 0.0615323, 0.269064, -0.27849, 0.160436, 0.255466, 0.554088, -0.388065, 0.439706, -0.00289459, 0.337792, 0.00156248, 0.399434, 0.326372, 0.18326, 0.209644, 0.447424, 0.629585, -0.172902, 0.642742, -2.48898, 0.804216, 0.60148, 0.684882, 0.830132, 0.334899, 0.957759, 0.521706, 0.810474, 0.664688, 0.866846, 1.06629, -1.54439, 1.13334, 1.077, 0.28315, 1.02505, 0.806706, 0.124286, 0.450114, -0.306178, -0.0160766, 0.465741, -0.0170627, 0.51876, 0.455872, 0.450001, 0.763403, 0.216445, 0.55945, 0.415356, 0.418502, 0.624143, -0.402438, 0.443542, 0.0567748, 0.329108, 0.390122, -0.292091, -1.04782, 0.100237, 0.326298, 0.100349, -0.433058, 0.309749, 0.55008, 0.549269, -0.124648, 0.47249, 0.60098, 0.303127, -0.33503, -0.193724, -0.149829, 0.702538, 0.85016, 0.176519, 0.856643, 0.907199, 0.152562, 1.01504, 0.890871, 0.45134, 0.92279, 0.514101, 0.671384, 0.784175, 0.134007, 0.382572, 0.247408, -0.0768465, 0.392406, 0.420804, 0.122099, 0.175947, 0.585601, 0.472857, -0.657352, 0.154741, -0.257633, 0.132356, 0.317231, 0.742538, 0.480104, 0.562952, 0.821271, 0.499563, -0.104169, -0.560743, 0.0958218, 0.0616143, 0.635938, 0.158709, 0.76794, 0.894358, -0.0919341, 0.809405, 0.681636, 0.379004, 0.711513, 0.239025, -0.35243, 0.248879, 0.361138, 0.42595, 0.799524, 0.158984, 0.795522, 0.681942, 0.738174, 1.01198, 0.0931464, 1.03961, 1.02003, 0.286219, 1.01569, 0.762651, 0.478424, 0.547193, 0.500973, 0.776446, -0.292584, 0.755534, 0.678501, 0.158198, 0.749007, 0.665749, 0.0841452, 0.174356, 0.427625, 0.325833, -0.39059, 0.526008, 0.59261, 0.147782, 0.215652, 0.456611, 0.415132, 0.308103, -0.119821, 0.211295, 0.494882, 0.145088, 0.313832, 0.443534, -0.16654, 0.604947, 0.379899, 0.515451, 0.858892, 0.746446, -0.693279, 0.617173, 0.664927, 0.257683, 0.27791, 0.60761, 0.53243, -0.0750667, 0.0552866, -0.0881976, -0.112036, 0.0671868, -0.48063, 0.219818, -0.225788, 0.344564, 0.536656, -0.225788, 0.671894, 0.860031, 0.514762, 0.661467, 0.93354, 0.604236, 0.644316, 0.856492, 0.184526, 0.669848, 0.471181, 0.638669, 0.863632, 0.331454, 0.570229, 0.44557, 0.233829, 0.180704, 0.512339, 0.571233, 0.56113, 0.9974, 0.749701, 0.722783, 0.983519, 0.430403, 0.775844, 0.77877, -0.227489, 0.636091, 0.281898, 0.0118515, -1.30225, 0.385221, 0.238218, 0.0830453, 0.419751, 0.271067, 0.0154469, -0.626875, 0.375924, 0.75666, 0.731697, -0.766823, 0.670891, 0.544753, 0.326892, 0.707215, 0.262678, 0.548707, 0.668678, -0.513231, 0.708438, 0.822223, 0.492026, 0.414678, 0.775647, 0.64092, -0.334271, 0.582122, 0.451702, -0.345378, 0.312326, 0.126913, 0.00827967, 0.314738, 0.232976, 0.26324, 0.7162, 0.551373, 0.377164, 0.805475, 0.651418, -0.976921, 0.185002, 0.00740345, 0.460002, -0.213115, 0.540372, 0.627865, -1.02368, 0.69755, 0.744755, -0.126328, 0.626865, 0.534658, 0.420009, 0.804647, 0.290974, 0.818108, 0.954335, 0.225332, 0.851605, 0.863542, -0.551865, 0.774225, 0.639619, -0.898687, 0.0228782, -0.188993, 0.386915, 0.603401, -1.10749, 0.853924, 0.935262, 0.191163, 0.712205, 0.508868, 0.448449, 0.430768, 0.538254, 0.711317, 0.262263, 0.901057, 0.619136, 0.610484, 0.676272, 0.374459, 0.736516, -0.0165417, 0.871499, 0.616823, 0.610548, 0.712432, 0.26846, 0.761135, -0.287663, 0.772018, 0.578786, 0.61892, 0.864805, 0.343299, 0.629162, 0.715687, 0.0593482, 0.582906, 0.859137, 0.853077, 0.212236, 0.818581, 0.975578, 0.437271, 0.808947, 0.867393, -0.819274, 0.642426, -0.481298, 0.703396, 0.439278, 0.62755, 0.765236, -0.506925, 0.545213, -0.451582, 0.579712, 0.261464, 0.508618, 0.52982, 0.162633, 0.57195, -0.340611, 0.376663, -0.878386, 0.592872, 0.428856, 0.270769, 0.432458, 0.209156, 0.704444, 0.527287, -0.352457, 0.290271, 0.263668, 0.441344, 0.514411, -0.775342, 0.783654, 0.905265, 0.455891, 0.687225, 0.903045, 0.654046, 0.200941, 0.689027, 0.454217, 0.407718, 0.76221, 0.395337, 0.663479, 0.839978, -0.417343, 0.881818, 0.823185, 0.343233, 0.830297, -0.26315, 0.877352, 0.762665, 0.490735, 0.774813, 0.087639, 0.869075, 0.500158, 0.731386, 0.803248, -0.536836, 0.612463, 0.0215156, 0.0833259, 0.422866, 0.781129, 0.0336778, 0.88927, 0.9638, 0.230358, 0.686799, 0.599062, -0.451039, -1.40763, -0.155024, 0.317275, 0.69075, 0.193539, 0.692816, 0.668417, 0.575955, 0.967067, 0.586816, 0.720585, 0.773382, 0.20439, 0.793347, 0.42095, 0.390653, 0.3963, -0.566408, -0.114456, 0.250659, 0.0351164, 0.680256, 0.454427, 0.456299, 0.55338, 0.264501, 0.533489, 0.621125, 1.0351, 0.663846, 0.956601, 1.10485, 0.152204, 0.999343, 0.885296, 0.368785, 0.684377, 0.292282, 0.753041, -0.662546, 0.700151, -0.0974457, 0.844308, 0.793271, 0.472907, 0.913737, 0.44548, 0.733835, 0.773754, -0.275439, 0.710747, 0.530834, 0.0469496, 0.566952, 0.540835, 0.12916, 0.33667, 0.721888, 0.693311, 0.0090553, 0.375363, 0.312093, -1.14631, -0.612691, 0.319375, 0.239046, 0.260436, 0.702564, 0.682153, 0.286594, 0.074906, 0.518327, 0.514067, -0.605443, 0.732187, 0.804129, -0.656497, 0.851772, 0.824605, 0.142621, 0.848113, 0.553294, 0.534872, 0.640955, -0.0978226, 0.565988, -0.333946, 0.49873, 0.263854, 0.0195223, -0.355426, 0.662963, 0.634568, 0.276784, 0.847263, 0.716078, 0.0529732, 0.741542, 0.740344, 0.490075, -0.485475, 0.248812, 0.237663, -0.138693, 0.366727, -1.88641, 0.524997, 0.207235, 0.651485, 0.786573, 0.0951894, 0.962429, 0.805592, 0.684077, 1.01819, 0.539706, 0.814516, 0.861271, -0.594272, 0.539461, -0.885006, 0.487281, 0.0486109, 0.115049, -0.124781, 0.484443, -0.183082, 0.816731, 0.680381, 0.701186, 1.04933, 0.774399, 0.544588, 0.735365, -1.32499, 0.409952, 0.126305, 0.608523, -0.380882, 0.791474, 0.621937, 0.570371, 0.84387, 0.182076, 0.678676, 0.571478, 0.289467, 0.565577, -0.422067, 0.534488, -0.522654, 0.730321, 0.802596, 0.0145819, 0.697234, 0.753535, -0.1129, 0.657425, 0.698658, -0.490213, 0.625627, 0.477064, 0.558489, 0.940861, 0.789372, 0.347285, 0.915187, 0.80927, -0.710558, 0.677162, 0.618814, 0.00619396, 0.0423347, 0.194529, 0.201151, 0.178993, -0.168645, -0.0839002, 0.250679, 0.0724031, -0.157747, 0.404259, 0.482001, 0.280596, -0.682417, -0.146596, -0.137364, -0.0641936, 0.131215, -0.0846131, 0.184724, 0.581959, 0.530807, -0.138322, -0.0913759, -0.47673, 0.208337, -0.446101, 0.315732, 0.403391, 0.0598187, -0.251824, -0.184104, 0.198917, 0.742048, 0.697382, 0.478022, 1.03175, 0.886282, 0.662229, 1.07388, 0.685729, 0.899095, 1.03982, 0.284483, 0.798117, 0.586694, 0.531831, 0.613568, 0.33602, 0.735449, -0.275939, 0.777951, 0.780722, -0.0272334, 0.300516, -0.395053, 0.108149, -0.616904, 0.409122, 0.351899, -1.03631, -0.0664151, -0.763345, -1.52937, 0.0174861, 0.244484, -0.0993075, 0.0684564, 0.449765, 0.532343, 0.373607, -0.279777, 0.553548, 0.558429, -0.357534, 0.723166, 0.791251, 0.313122, 0.541932, 0.77359, 0.565299, 0.193432, 0.789152, 0.822884, 0.384375, 0.450431, 0.596443, -0.608239, 0.489638, 0.075508, 0.587702, 0.732448, -0.0556138, 0.659326, 0.676215, -0.982874, 0.544862, 0.390408, -0.0578881, 0.286117, -0.228511, 0.587635, 0.624304, -0.19119, 0.582768, 0.654627, -1.41831, 0.732135, 0.740182, -0.682792, 0.598247, 0.377485, 0.149079, 0.153959, 0.0357882, -0.275858, 0.816302, 0.897405, -0.0471787, 1.04756, 0.994976, 0.296818, 0.981674, 0.611267, 0.746419, 0.77544, 0.319845, 0.795252, 0.135916, 0.636248, 0.52223, -0.516254, -0.272055, 0.554419, 0.224394, 0.592814, 0.635145, 0.364395, 0.808245, 0.177005, 0.707048, 0.454777, 0.726464, 0.833305, 0.195535, 0.906576, 0.465643, 0.870396, 0.979997, 0.146, 0.821439, 0.840588, 0.450144, -0.511528, -0.1642, 0.440981, 0.629354, 0.282998, 0.38729, 0.57406, 0.147605, -0.572814, -0.194383, 0.0700988, -0.805646, -0.699731, 0.405044, 0.531722, 0.124321, 0.79939, 0.501217, 0.778623, 0.972343, 0.210711, 0.873314, 0.777586, 0.543719, 0.898829, 0.343719, 0.66263, 0.527778, 0.395228, 0.537804, 0.306888, 0.810458, 0.661401, -0.13529, 0.633744, 0.686779, 0.530456, -0.76935, 0.698252, 0.854391, 0.567698, 0.359392, 0.656881, 0.148536, 0.411307, 0.501524, 0.0205157, -0.0353649, 0.213126, 0.0666118, -0.0788108, 0.544522, 0.579351, -0.398863, 0.47727, 0.319895, 0.168219, 0.345415, -0.278432, 0.192333, 0.0157271, 0.220917, 0.539791, 0.897454, 0.49906, 0.842506, 0.970936, -0.478199, 0.891736, 0.613742, 0.654109, 0.545056, 0.838135, 1.04177, -0.0501907, 1.04544, 0.971138, 0.512351, 1.01397, 0.688796, 0.527403, 0.622298, -1.16571, 0.288745, 0.0602895, 0.277895, 0.484503, -3.91414, 0.719376, 0.691796, 0.283215, 0.780947, 0.0932365, 0.769897, 0.747791, -0.188631, 0.53442, -0.348155, -0.0175797, 0.419317, 0.629161, 0.216642, 0.935874, 0.843601, 0.0933334, 0.700049, -0.0126666, 0.385058, -0.157629, 0.622917, -0.251451, 0.78212, 0.771341, -0.0819454, 0.632018, -0.294588, 0.464178, -1.45144, 0.533665, -0.904205, 0.721153, 0.388545, 0.846596, 0.98422, -0.642219, 1.01116, 0.819354, 0.79429, 1.04545, 0.249029, 0.968478, 0.927672, 0.287727, 0.958206, 0.838671, -0.0182244, 0.265743, 0.165126, 0.109877, 0.287448, 0.196258, -0.442655, 0.406806, 0.572661, 0.507904, -0.126036, 0.366922, 0.500006, -0.0943129, 0.227858, 0.0112103, 0.151773, 0.206852, -0.237625, -0.0667541, 0.365473, 0.63374, 0.00333867, 0.612309, 0.631714, -0.169402, 0.621204, 0.383453, -0.100184, -0.127446, 0.122096, 0.248583, 0.0793715, 0.366447, 0.513792, -0.27233, 0.855804, 0.893592, 0.0636822, 1.03432, 0.994077, -0.36403, 0.894523, 0.720444, 0.149453, 0.492874, -0.444344, 0.424579, 0.0587191, -0.0719514, -0.22253, -0.199615, 0.105957, 0.246981, 0.253719, -0.381971, 0.5806, 0.551493, 0.291087, 0.822318, 0.616246, 0.359808, 0.537177, 0.334867, 0.74488, -0.0964381, 0.737833, 0.588982, 0.476819, 0.639296, 0.247267, 0.673755, 0.352606, 1.00552, 0.793521, 0.83156, 1.12171, 0.750811, 0.763296, 0.894544, 0.0453521, 0.595288, 0.446272, -0.230121, 0.0955645, 0.180382, 0.191712, 0.600402, 0.00243457, 0.627021, 0.651977, -0.330938, 0.467831, 0.0754771, 0.770666, 0.555625, 0.566707, 0.8317, 0.280069, 0.657991, 0.684392, -0.471769, 0.567904, 0.0454736, 0.585905, 0.697847, -0.165421, 0.688484, 0.822114, 0.556589, -0.0615333, 0.476293, 0.351663, -0.068161, -0.68268, -0.0978784, 0.485639, 0.643217, 0.247263, 0.559198, 0.779216, 0.223856, 0.753741, 0.922844, 0.560313, 0.520076, 0.735191, 0.214982, 0.463508, 0.49989, -0.24593, 0.557293, 0.338116, 0.413501, 0.752131, 0.521141, 0.367219, 0.727679, 0.450384, 0.120586, 0.118801, 0.426619, 0.663572, -0.021046, 0.630132, 0.687629, -0.177147, 0.503394, 0.565089, 0.42542, 0.27546, -0.858195, 0.568085, 0.64992, -0.0420214, 0.889407, 0.878631, -0.443113, 0.835873, 0.687797, 0.0916855, 0.44501, -0.291393, 0.115921, 0.451849, 0.704079, -0.526157, 0.756895, 0.632563, 0.427707, 0.661491, 0.377836, 0.950645, 0.725242, 0.676219, 0.949737, 0.427835, 0.728569, 0.752416, -0.524377, 0.557753, -0.595003, 0.672871, 0.669664, -0.385794, 0.680261, 0.57018, 0.26581, 0.813297, 0.745468, -0.255227, 0.807263, 0.822655, 0.12008, 0.638421, 0.756354, 0.475389, -0.336335, 0.402044, 0.516571, 0.469261, 0.119467, -0.259671, -0.198465, 0.0568206, 0.322361, -0.429157, 0.34973, 0.416007, -0.293162, 0.205574, 0.38025, 0.434001, 0.447397, 0.118082, 0.2233, 0.49591, -0.0547481, 0.429516, 0.520671, -0.197587, 0.205711, 0.0443435, -0.826619, -0.495959, 0.2056, 0.102152, -0.0766751, 0.442674, 0.508574, 0.233246, 0.373273, 0.878936, 0.937848, 0.25236, 0.899692, 0.975702, -0.786968, 0.978537, 0.810839, 0.696804, 0.960572, -0.89212, 0.990166, 0.878327, 0.385947, 0.766777, -0.446397, 0.673275, -2.0742, 0.747006, 0.302095, 0.792325, 0.808184, 0.39698, 0.915013, 0.512739, 0.653279, 0.650176, 0.0662017, 0.420487, 0.133031, 0.391665, 0.459204, 0.864967, 0.62996, 0.308757, 0.561635, 0.0239794, -0.177237, 0.463853, 0.183047, 0.677896, 0.903952, 0.415928, 0.716714, 0.725409, 0.314594, 0.842211, 0.546478, 0.504673, 0.746107, 0.432656, 0.129466, 0.592396, 0.625491, 0.0765294, 0.632719, 0.837421, 0.343454, 0.732396, 0.817145, -0.321248, 0.818732, 0.636012, 0.172974, 0.148176, 0.605734, 0.707263, 0.282948, 0.918628, 0.72225, 0.524418, 0.845729, 0.498284, -0.0760657, -0.505709, 0.4441, 0.0466801, 0.469129, 0.553001, -0.690546, 0.542447, 0.409392, -0.0117511, 0.526764, 0.432011, -0.327103, 0.582038, 0.586778, -0.0527241, 0.803577, 0.771488, 0.041352, 0.827566, 0.588878, 0.614625, 0.893884, 0.611302, 0.0963935, 0.468308, 0.432149, 0.519858, 0.371418, 0.427873, 0.8584, 0.683863, 0.26504, 0.522565, 0.334771, 0.686399, 0.202088, 0.936898, 0.664019, 0.823984, 0.983889, -0.404936, 0.981415, 0.730801, 0.728227, 0.845524, 0.234255, 0.852307, 0.296777, 0.633972, 0.190765, 0.725068, 0.681536, 0.4139, 0.728062, -0.0194996, 0.83883, 0.566986, 0.630192, 0.83664, 0.376873, 0.459239, 0.721174, 0.789924, 0.718592, -0.651145, 0.871601, 0.903575, -0.773552, 0.857051, 0.588815, 0.655297, 0.734267, 0.378877, 0.834138, -0.115824, 0.852827, 0.747124, 0.402634, 0.722795, -0.591068, 0.691996, 0.415661, 0.0821709, -2.20664, 0.449897, -0.173166, 0.594517, 0.453598, 0.559399, 0.753021, -0.0582211, 0.834145, 0.428926, 0.842197, 0.979725, 0.346308, 0.713826, 0.693269, 0.0641337, 0.00285839, 0.481811, -0.0986111, 0.718686, 0.845731, -0.145274, 0.843109, 0.865725, -0.185573, 0.698501, 0.583063, 0.266195, 0.745427, 0.575096, 0.116768, 0.613616, 0.134978, 0.596795, 0.706521, -0.42325, 0.794054, 0.658519, 0.532482, 0.895763, 0.513935, 0.591306, 0.597287, 0.408443, 0.781885, 0.198468, 0.692383, 0.777808, 0.388369, -0.57725, 0.0580107, 0.490602, 0.716114, 0.422682, 0.65037, 0.933144, 0.649651, 0.446505, 0.664953, -0.257759, 0.403795, 0.144669, -0.956495, 0.236137, 0.427426, -0.229189, 0.639095, 0.420307, 0.479949, 0.699353, -0.0357752, 0.459478, -0.0284435, 0.540043, 0.584095, -1.61986, 0.47304, 0.441625, 0.276579, 0.231029, -0.406898, 0.303387, 0.31146, -0.0228032, 0.292798, 0.273758, 0.659873, -0.01266, 1.00766, 1.00983, 0.270764, 1.09551, 0.915594, 0.741546, 1.06481, 0.589643, 0.765978, 0.736611, 0.179625, 0.563252, -0.149485, 0.42734, 0.313399, 0.801231, 0.471928, 0.596387, 0.713743, -1.03552, 0.554566, -0.448122, 0.66661, 0.645981, -0.410322, 0.562904, 0.412621, -0.831664, -0.157465, -0.0624215, 0.336261, 0.555404, 0.465622, -0.3476, 0.120935, 0.0937935, -0.144758, 0.00296298, 0.0144968, -0.0420831, 0.596249, 0.66495, -0.0890847, 0.678412, 0.795985, -0.0831262, 0.844755, 0.955306, 0.367066, 0.822991, 0.943666, 0.416325, 0.618714, 0.611709 +}; #endif /* MULTIPATH_V120_M10_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v120_M12.h b/src/lte/model/JakesTraces/multipath_v120_M12.h index 34bfe66d9..e661b0ba1 100644 --- a/src/lte/model/JakesTraces/multipath_v120_M12.h +++ b/src/lte/model/JakesTraces/multipath_v120_M12.h @@ -24,8 +24,8 @@ #define MULTIPATH_V120_M12_H_ static double multipath_M12_v_120[3000] = { - 0.900037, 1.01321, 1.14434, 0.306727, 0.833073, 0.352759, 0.735386, 0.590035, 0.486874, 0.590626, 0.265093, 0.624232, -0.53797, 0.58245, -0.107659, 0.53018, 0.254254, 0.420463, 0.400476, 0.231527, 0.460029, -0.0929907, 0.495742, -0.458222, 0.436854, -0.0156622, 0.427327, 0.352146, 0.0935294, 0.224347, 0.294472, 0.606845, 0.205447, -0.0122183, -0.444279, 0.382255, -0.760633, 0.646949, 0.697753, -0.583435, 0.629255, 0.687186, 0.589307, 0.559063, 0.218743, 0.576521, 0.888888, 0.611568, 0.665307, 0.935216, 0.521594, 0.668967, 0.813774, 0.241442, 0.510184, 0.610397, 0.233785, 0.153256, 0.566421, 0.498129, -0.0252944, 0.684202, 0.474951, 0.569455, 0.839859, 0.231806, 0.721868, 0.604182, 0.637516, 0.919935, 0.335497, 0.760355, 0.695878, 0.358098, 0.684098, -0.0782545, 0.768703, 0.363499, 0.75513, 0.918731, 0.536538, 0.284987, 0.408263, -0.0358162, 0.136654, 0.49424, 0.339237, 0.310805, 0.740997, 0.645627, -0.235767, 0.722907, 0.751896, 0.0710797, 0.630257, 0.742266, 0.134913, 0.574328, 0.667768, 0.17401, 0.0955982, 0.0741191, -0.572461, -1.32144, 0.0744848, 0.611235, 0.668982, -0.610343, 0.778145, 0.663508, 0.512892, 0.853782, -0.011633, 0.85552, 0.736163, 0.687832, 1.02768, 0.701348, 0.576482, 0.697911, -1.23568, 0.234641, 0.298526, 0.625598, -0.116473, 0.56292, 0.567411, 0.0956476, -0.396526, -0.688094, 0.555013, 0.800919, 0.348555, 0.788969, 0.912597, -1.59167, 0.917495, 0.798258, 0.278331, 0.613494, 0.203346, 0.677815, -0.521763, 0.712773, -0.122625, 0.864193, 0.794502, 0.638281, 1.02016, 0.540995, 0.890221, 0.973673, 0.0979334, 0.686038, 0.341191, 0.533562, 0.606824, -1.08383, 0.490525, 0.552766, 0.485141, 0.229511, 0.239856, 0.72671, 0.685008, -1.68627, 0.624088, 0.588423, 0.0235835, -0.514601, -2.15744, -0.58297, 0.0601998, -0.121601, -0.0885952, 0.203368, 0.211629, 0.43574, 0.584731, 0.072521, 0.677809, 0.832431, -0.572056, 0.915877, 0.883939, 0.365987, 0.972658, 0.660788, 0.758157, 0.944331, 0.419298, 0.467099, 0.117078, 0.358884, -0.355739, 0.669332, 0.704171, -0.298846, 0.660865, 0.329222, 0.390779, 0.364881, 0.333531, 0.656154, 0.170425, 0.556232, 0.766385, 0.613862, -0.570748, 0.548395, 0.707959, 0.389648, 0.532723, 0.867643, 0.704419, 0.116039, 0.677136, 0.300478, 0.391613, 0.392274, 0.194569, 0.535403, -0.70226, 0.703606, 0.680614, -0.202362, 0.671343, 0.381901, 0.55254, 0.797667, 0.432743, 0.501274, 0.760141, 0.605643, 0.0547859, -0.097331, 0.396391, 0.615122, 0.520143, 0.0236257, 0.70149, 0.542209, 0.328393, 0.616149, 0.0792774, 0.862423, 0.721784, 0.530121, 0.896937, 0.390687, 0.756175, 0.813307, -0.151106, 0.373873, -0.108361, 0.481343, 0.154935, 0.844845, 0.63449, 0.722038, 1.00767, 0.618911, 0.710549, 0.813443, -0.445335, 0.768963, 0.583143, 0.270224, 0.623577, 0.311756, -0.329467, -0.362736, 0.0683089, 0.29044, -0.226192, 0.409947, 0.718493, 0.595528, 0.315963, 0.902897, 0.871222, -0.46191, 0.757097, 0.640927, 0.249685, 0.694013, 0.340912, 0.26775, 0.34419, -0.329418, 0.403048, 0.421488, 0.236617, -0.970445, 0.478393, 0.667402, 0.281616, 0.596891, 0.858176, 0.648046, 0.00964542, 0.557602, 0.375328, -0.206324, -0.804862, -0.426803, 0.150714, -0.0920029, 0.327988, 0.605341, 0.255804, 0.387997, 0.600252, 0.294383, -0.724845, -0.149612, 0.224964, 0.617027, 0.689696, 0.135608, 0.489247, 0.486654, -0.133245, 0.346217, -0.158167, 0.376572, 0.23174, 0.827254, 0.641789, 0.629744, 0.928572, 0.321452, 0.857538, 0.869631, 0.228592, 0.896489, 0.409083, 0.894841, 1.0064, -0.0134096, 0.972767, 0.995562, 0.144782, 0.772945, 0.721165, -0.654146, 0.525735, 0.307758, -0.961103, -0.579785, -1.26018, 0.202276, 0.465654, -0.324084, 0.680034, 0.856809, 0.549684, 0.345965, 0.601364, 0.138709, -0.135562, -0.879403, -0.133896, 0.263519, 0.665656, 0.47306, 0.283719, 0.602457, 0.045768, 0.301525, 0.0552519, 0.00869427, -0.461627, 0.592426, 0.588113, -0.0911098, 0.628431, 0.367804, 0.0657695, -0.223476, 0.456352, 0.531016, -0.566645, 0.516694, 0.393853, -0.324402, -1.38238, -0.145586, 0.553888, 0.674427, -1.65966, 0.79417, 0.647599, 0.761312, 1.09039, 0.746698, 0.886194, 1.08536, 0.542486, 0.846212, 0.901392, 0.177497, 0.405383, -0.112962, 0.194291, -0.565689, 0.352392, 0.323476, -0.340763, 0.433875, 0.533067, 0.407489, -1.81432, 0.501818, 0.587778, 0.0331714, 0.137315, -0.536817, 0.526565, 0.283021, 0.548427, 0.7339, -0.546492, 0.695161, 0.452618, 0.465806, 0.414136, 0.630554, 0.863685, 0.0166143, 0.777397, 0.550243, 0.678431, 0.829019, -0.505351, 0.785833, 0.520753, 0.344191, 0.344812, -0.219097, 0.205741, 0.836287, 0.688521, 0.757125, 1.08236, 0.640512, 0.96185, 1.08754, 0.342449, 0.877881, 0.814862, -0.451518, 0.411976, 0.0164704, 0.545651, 0.180947, 0.108298, 0.261021, 0.217284, 0.295174, -0.200444, 0.479191, 0.679081, 0.203703, 0.382939, 0.0608012, 0.589867, 0.69476, -0.33313, 0.722915, 0.454915, 0.527248, 0.678226, -0.675183, 0.643465, 0.365775, 0.450581, 0.660855, 0.2809, -0.0546033, -0.038923, -0.910493, -0.350539, 0.352126, 0.393028, -0.258389, 0.688721, 0.775089, -0.0606614, 0.861866, 1.02624, 0.669169, 0.725214, 0.958843, 0.54658, 0.573499, 0.642698, -1.21838, 0.284426, 0.00449943, 0.525928, 0.230536, -0.885871, 0.200162, 0.517936, -1.79404, 0.711147, 0.608332, 0.509325, 0.836569, 0.0499625, 0.796868, 0.661961, 0.623931, 0.906555, 0.296291, 0.723145, 0.625748, 0.374155, 0.667687, -2.20875, 0.667217, 0.538688, 0.0995054, 0.600693, 0.466922, -0.474937, 0.613265, 0.804061, 0.645942, 0.181827, 0.796356, 0.70466, -0.701605, 0.361413, 0.179971, 0.335464, 0.734994, 0.741954, -0.0505629, 0.846032, 0.627348, 0.660101, 0.883767, -0.179722, 0.844947, 0.736493, 0.369637, 0.788293, 0.475597, -0.0319664, 0.0985001, -0.337977, -0.0715855, -1.32777, 0.460525, 0.499705, 0.339717, 0.839827, 0.516463, 0.708094, 0.826193, 0.0455009, 0.865581, 0.54475, 0.557661, 0.432076, 0.633289, 0.729031, 0.387472, 0.901367, 0.511945, 0.657369, 0.706306, -0.00314824, 0.274746, 0.824462, 0.640772, 0.817157, 1.0855, 0.456594, 1.01613, 1.00133, 0.452142, 1.00026, 0.385173, 0.886389, 0.784579, 0.473408, 0.696403, 0.330574, 0.769672, -0.335024, 0.875053, 0.651134, 0.645593, 0.824455, -0.450107, 0.826926, 0.669786, 0.250776, 0.648294, 0.204096, 0.396232, 0.639167, 0.524073, -0.465493, 0.687785, 0.759666, -0.41224, 0.819528, 0.877225, 0.275112, 0.40785, -0.213697, 0.464639, -0.0767452, 0.709449, 0.815168, -0.243917, 0.777855, 0.802535, 0.278666, 0.233844, 0.413927, 0.373773, 0.0418677, 0.333091, 0.685188, 0.405316, 0.575686, 0.842192, 0.466054, 0.52479, 0.648328, -0.475102, 0.459117, 0.344675, -0.156115, -0.0573011, -0.0782064, 0.0275383, 0.324252, -0.519012, 0.507532, 0.290533, 0.323941, 0.442826, 0.220077, 0.741943, 0.614475, -0.548117, -0.0282131, -0.392649, 0.377087, 0.761131, 0.633924, 0.515428, 0.959685, 0.77975, 0.365137, 0.772094, 0.213798, 0.534943, 0.363741, 0.440445, 0.640587, -0.733022, 0.646123, 0.537882, 0.416656, 0.864042, 0.706208, 0.427382, 0.910514, 0.679607, 0.669745, 0.995986, 0.663752, 0.715593, 0.901829, 0.0770647, 0.763539, 0.679941, -0.191944, 0.227944, 0.352478, 0.574057, -1.2064, 0.464531, -0.789454, 0.460034, -0.234961, 0.824868, 0.727452, 0.610158, 1.01136, 0.75423, 0.466016, 0.68898, -0.0830544, -0.405612, 0.498102, 0.579029, 0.29838, 0.806834, 0.315639, 0.765266, 0.815736, -0.550354, 0.655688, 0.0287408, 0.520057, 0.195383, 0.423338, 0.237073, 0.514153, 0.651914, -1.12168, 0.502751, 0.0101815, 0.317821, 0.145715, -1.10566, 0.439589, 0.754737, 0.186704, 0.866128, 0.973768, -0.532647, 0.95735, 0.814512, 0.614246, 0.90415, -0.566594, 0.987517, 0.908208, 0.37995, 0.984242, 0.868227, -0.258683, 0.551372, 0.533696, 0.193765, -0.480795, 0.287013, 0.413795, 0.286821, -0.042846, -0.706073, -0.0315191, 0.386213, 0.283575, 0.271064, 0.726895, 0.563244, 0.262672, 0.623501, -0.466672, 0.628734, 0.51534, 0.0573839, 0.284421, 0.25208, 0.49745, 0.195006, 0.807873, 0.622403, 0.461529, 0.792947, 0.473077, -0.118643, -0.893869, 0.19723, -0.200327, 0.657032, 0.603387, -0.0932819, 0.455472, 0.0614011, 0.699017, 0.229803, 0.755296, 0.857815, -0.226496, 0.971826, 0.9576, -2.11959, 0.904716, 0.865214, -0.960596, 0.806685, 0.814698, 0.308097, 0.337857, 0.466695, -0.1241, 0.223283, 0.347427, -0.0339047, -0.223809, -0.0194791, -0.405821, -0.549974, 0.0967503, 0.302587, -0.23901, 0.473305, 0.742037, 0.574926, 0.193692, 0.739084, 0.63178, -0.606469, 0.0288756, 0.204023, 0.511726, -1.02988, 0.675458, 0.580739, 0.395742, 0.779123, 0.280498, 0.586554, 0.406085, 0.641903, 0.820087, -0.555572, 0.883634, 0.728319, 0.623488, 0.970212, 0.682827, 0.387683, 0.638283, 0.282437, -0.144808, 0.00516922, 0.0480647, 0.675477, 0.555944, 0.54764, 0.92101, 0.534415, 0.815224, 0.99229, 0.452622, 0.750768, 0.805973, 0.0484763, 0.249207, -0.0013738, 0.644678, 0.491985, 0.26183, 0.709594, 0.571186, -0.103007, 0.652184, 0.647495, -0.0175388, 0.363934, 0.236384, 0.281301, 0.555496, -0.299534, 0.547753, 0.42456, 0.425816, 0.75833, 0.427687, 0.348789, 0.465527, -1.08469, -0.164016, 0.302861, 0.497328, -0.188894, 0.717171, 0.638765, 0.149729, 0.731897, 0.528081, 0.274766, 0.698875, 0.56916, -0.121836, 0.767959, 0.922403, 0.72693, 0.339608, 0.894113, 0.77185, 0.116626, 0.745859, 0.454809, 0.247668, 0.183848, 0.436377, 0.648039, 0.0178002, 0.453997, 0.402549, -0.321434, 0.264288, 0.0214082, -0.0128206, 0.319669, 0.185938, 0.192726, 0.55098, 0.170421, 0.28462, 0.223149, 0.291114, 0.49782, 0.0685681, 0.785234, 0.663154, 0.4477, 0.889242, 0.624901, 0.554854, 0.78605, -0.617852, 0.837262, 0.839065, -0.215506, 0.591877, 0.371179, -0.241765, -0.0259127, 0.635331, 0.291196, 0.813709, 1.04947, 0.660371, 0.849064, 1.00905, 0.171822, 0.896663, 0.835614, 0.186518, 0.750781, 0.0994767, 0.625134, 0.549319, 0.0602592, 0.544678, 0.363981, -0.0414673, -0.606917, 0.218762, 0.601277, 0.453726, 0.276814, 0.643936, 0.0727796, 0.452138, 0.01025, 0.658146, 0.749413, -1.14963, 0.651394, 0.267477, 0.569479, 0.611863, -0.0396916, 0.630526, 0.403436, -0.294824, 0.187914, 0.42998, 0.746069, 0.774609, -1.095, 0.885599, 0.890627, -0.484238, 0.850728, 0.736416, -0.401759, 0.387237, -0.439702, -1.23894, 0.404016, 0.49496, -0.182756, 0.596024, 0.316892, 0.316109, 0.39511, 0.013641, 0.498476, 0.0168471, 0.414834, 0.648731, 0.618332, 0.325291, 0.210616, 0.661617, 0.391972, 0.599653, 0.826091, -0.365038, 0.89247, 0.802755, 0.628644, 1.00894, 0.537889, 0.788285, 0.654103, 0.768416, 0.959354, -0.052526, 1.0472, 0.902274, 0.609804, 0.98831, 0.63625, 0.37195, 0.419947, -0.0859994, 0.463304, 0.713432, -0.066272, 0.832089, 0.878488, -0.359592, 0.84926, 0.648897, 0.351671, 0.51005, 0.277886, 0.708715, 0.410269, -0.0229632, -0.0686956, -0.229608, -0.290732, 0.415277, 0.177654, 0.346511, 0.574827, 0.117654, 0.163302, 0.0251581, 0.142753, 0.457456, 0.407631, 0.0850518, 0.0298301, 0.579641, 0.642538, -0.0160899, 0.581233, 0.689241, 0.122556, 0.363947, 0.335255, -2.81416, -1.23844, 0.350781, 0.496363, -0.613485, 0.627512, 0.775267, 0.404136, 0.638616, 0.977686, 0.884462, -0.0950474, 0.904313, 0.769441, 0.551123, 0.94426, 0.463357, 0.828593, 0.882507, 0.0339229, 0.883194, 0.634558, 0.376022, 0.363215, 0.494986, 0.624452, 0.123683, 0.683716, -0.19346, 0.6635, 0.34434, 0.687797, 0.787421, -0.0871196, 0.834625, 0.669173, 0.190634, 0.592672, 0.307577, 0.0282273, 0.305572, -0.0515745, 0.482413, 0.673751, 0.0643184, 0.559139, 0.662485, 0.429962, 0.267549, 0.319322, -0.446253, 0.475778, 0.597565, 0.116963, 0.176682, 0.311082, 0.30717, 0.410224, 0.0721767, 0.442936, 0.58562, 0.318431, 0.944472, 0.767999, 0.751144, 1.06853, 0.58909, 0.905294, 0.940696, 0.227063, 0.92815, 0.532243, 0.700845, 0.745157, -0.602989, 0.519386, 0.230621, 0.0582367, 0.478628, 0.272417, 0.546583, 0.766437, -0.358562, 0.786428, 0.738363, -0.387628, -0.660931, 0.53252, 0.339761, 0.754949, 0.967903, 0.109559, 0.951303, 0.890207, 0.356221, 0.773372, 0.225359, 0.893162, 0.316425, 0.856486, 0.747981, 0.681619, 0.918834, -0.0909059, 0.984593, 0.77815, 0.639355, 0.869527, 0.107696, 0.530761, 0.0540102, 0.1843, 0.0742208, 0.638988, 0.109816, 0.631385, 0.52157, 0.589494, 0.853118, 0.0590765, 0.801838, 0.716379, 0.541185, 0.979109, 0.82321, 0.185401, 0.87461, 0.864535, 0.335355, 0.59676, 0.813708, 0.581742, -0.220857, 0.13892, 0.210421, 0.424775, 0.142593, 0.730338, 0.452587, 0.573536, 0.730998, -0.223415, 0.792825, 0.595004, 0.443247, 0.698189, 0.00710515, 0.387489, 0.0543208, 0.0412086, -0.393754, 0.550226, 0.512985, -0.379147, 0.433547, 0.144748, 0.000474572, 0.322377, 0.395029, 0.410377, -0.0253694, 0.308362, 0.408712, 0.0229924, 0.603534, -0.0847718, 0.752801, 0.806416, 0.188813, 0.997312, 0.973245, 0.0108977, 0.783175, 0.808227, 0.448452, -0.642637, 0.276952, 0.458049, 0.300605, 0.112706, 0.588508, 0.351365, 0.294758, 0.551127, -0.102437, 0.377891, 0.34069, -1.47984, -0.277801, 0.150503, 0.487432, 0.353602, -0.333743, 0.455612, 0.424679, -0.0427493, 0.72766, 0.75735, -0.599039, 0.751557, 0.67732, 0.278636, 0.713431, -0.505893, 0.725144, 0.361338, 0.802285, 0.929355, -0.18063, 0.79895, 0.486976, 0.584534, 0.299838, 0.857963, 0.970107, 0.184266, 1.09539, 0.953684, 0.666059, 1.06056, 0.692524, 0.656744, 0.757843, -0.120705, 0.324111, 0.24606, 0.429985, 0.651778, 0.321605, 0.574443, 0.718613, -0.1663, 0.788579, 0.545468, 0.472268, 0.537722, 0.383607, 0.701801, -0.54248, 0.783888, 0.606155, 0.46517, 0.761622, 0.42682, -0.821007, -0.183886, 0.0554102, 0.240587, 0.623014, 0.334099, 0.093694, -0.390883, 0.489799, 0.360903, 0.579916, 0.865723, 0.407278, 0.740112, 0.878873, 0.387647, 0.42314, 0.416982, -2.59438, -0.0351187, -0.220034, 0.245073, 0.564531, 0.469992, -0.0304901, 0.633885, 0.569338, -0.358815, 0.681549, 0.771206, 0.338867, 0.625692, 0.877722, 0.52655, 0.707181, 0.937529, 0.479805, 0.678213, 0.667777, 0.437819, 0.805203, -1.33572, 0.94806, 0.928213, -0.0389012, 0.887147, 0.670378, 0.356434, 0.553623, -0.0451058, 0.517619, -0.693647, 0.666397, 0.641976, -0.115062, 0.089269, -0.27906, -0.851098, 0.034001, -0.272951, 0.452793, 0.724383, 0.413098, 0.551748, 0.811615, 0.406008, 0.620337, 0.819879, 0.437801, 0.430844, 0.632094, 0.239141, 0.0845517, 0.338211, 0.356854, 0.4483, 0.357354, 0.0957684, 0.763412, 0.813245, 0.253024, 0.562339, 0.622394, -0.513611, 0.367682, -0.272242, 0.404147, 0.351729, 0.12159, 0.63312, 0.640258, 0.395134, -2.03581, 0.394431, 0.52841, -0.171821, 0.593465, 0.689299, -1.1843, 0.667319, 0.359604, 0.654491, 0.755039, 0.291085, 0.929967, 0.582078, 0.872427, 1.03255, 0.105808, 0.965683, 0.899814, 0.380678, 0.923495, 0.620501, 0.446812, 0.638802, 0.340274, 0.344772, 0.590734, 0.253459, 0.634835, 0.874598, 0.523151, 0.550897, 0.762483, 0.416549, -0.269082, -0.918315, 0.269913, 0.3413, -0.116999, -0.185349, 0.110075, 0.110863, -0.397995, 0.136551, 0.424276, 0.318901, -0.731737, 0.13577, 0.274401, 0.194702, -0.91056, 0.387677, 0.596929, 0.268387, 0.379122, 0.566851, -1.36188, 0.55537, 0.207662, 0.574668, 0.681004, -0.273669, 0.675469, -0.00235673, 0.810531, 0.856547, 0.141061, 0.994374, 0.931759, 0.0346852, 0.959951, 0.9587, 0.525855, 0.312712, 0.589569, 0.391857, -0.351113, 0.407368, 0.283226, -0.0791642, 0.357704, -0.669023, 0.466415, 0.468268, -0.525335, 0.401896, 0.0586402, 0.0796663, -0.0291051, -0.0462003, -0.409887, 0.43503, 0.58353, -1.67849, 0.7138, 0.736459, -0.606086, 0.63546, 0.466538, 0.386893, 0.712597, 0.345915, 0.389859, 0.526129, -0.43586, 0.233762, -0.968698, 0.286412, -0.708989, 0.730027, 0.867743, 0.483471, 0.50809, 0.71409, 0.427188, -0.332724, -0.662522, 0.140585, 0.721654, 0.773533, -0.188093, 0.919171, 0.820466, 0.605194, 1.02105, 0.576273, 0.894436, 0.953975, 0.269485, 1.0094, 0.72505, 0.765821, 0.958211, 0.370262, 0.575218, 0.347035, 0.294513, 0.230123, 0.17074, 0.192883, 0.189134, 0.391092, -0.442164, 0.369474, -0.336058, 0.378197, 0.46942, 0.415162, 0.526447, 0.453415, 0.226833, 0.819828, 0.733799, 0.108656, 0.733281, 0.435927, 0.0434535, -0.488384, 0.589678, 0.286469, 0.685251, 0.854719, -0.164858, 0.842641, 0.816397, -0.329956, 0.717001, 0.575948, -0.437808, -0.0898419, -0.201221, -0.250568, -0.0861025, 0.566398, 0.588565, 0.0685273, 0.805381, 0.660524, 0.474107, 0.859808, 0.554424, 0.36064, 0.486939, -0.231161, 0.496048, 0.474829, 0.403998, 0.208183, 0.351897, 0.83408, 0.743639, 0.357339, 0.889782, 0.617698, 0.428812, 0.387028, 0.565116, 0.631669, 0.608816, 0.992617, 0.479993, 0.943136, 0.995318, 0.047157, 0.972072, 0.699437, 0.556006, 0.530109, 0.605956, 0.783807, 0.0589337, 0.854989, 0.496594, 0.71753, 0.806913, -0.257954, 0.763841, 0.446106, 0.609201, 0.8371, 0.594837, -0.192866, 0.503769, 0.463454, -0.419237, 0.422518, 0.486667, -0.2354, 0.691777, 0.656943, 0.0887255, 0.834215, 0.833506, 0.225416, 0.578224, 0.77174, 0.633286, -0.352772, 0.513728, 0.616149, 0.155199, 0.299122, 0.422175, 0.00794205, -0.136138, 0.427923, 0.507184, -0.83555, 0.614709, 0.580213, -0.484983, 0.516237, 0.426936, 0.0124559, -0.179814, -0.359462, -0.280812, -1.58126, 0.470602, 0.644497, -0.317211, 0.716075, 0.710752, -0.0476969, 0.653877, -0.0471822, 0.553238, 0.0371084, 0.699774, 0.691398, 0.306135, 0.733312, -0.831491, 0.756622, 0.0303724, 0.939164, 0.960455, 0.415508, 1.09266, 0.891933, 0.740755, 1.08467, 0.826767, 0.34261, 0.735299, 0.50918, -0.292178, -0.0455994, 0.25188, 0.252987, -0.206715, -0.439386, 0.37366, 0.56169, -0.057104, 0.514642, 0.464799, 0.256672, 0.59465, -1.52587, 0.649209, 0.488279, 0.191801, 0.427556, -0.489983, -0.362585, 0.561923, 0.516702, 0.466313, 0.843155, 0.337447, 0.705333, 0.569674, 0.681711, 0.880857, -0.445107, 0.906115, 0.65896, 0.685073, 0.853567, 0.0519972, 0.362637, 0.15708, 0.55725, 0.386394, 0.941641, 0.623435, 0.876498, 1.07862, 0.634478, 0.677538, 0.713814, -0.401493, 0.0671702, -0.456836, -0.310474, 0.425107, -0.550762, 0.711602, 0.660004, 0.574896, 0.944422, 0.382618, 0.840033, 0.734276, 0.695175, 0.919252, 0.254313, 1.07584, 0.887809, 0.726881, 1.0001, 0.163922, 0.86679, 0.72069, 0.410279, 0.642414, 0.0171852, 0.696035, 0.430246, 0.0770644, 0.245834, -0.220673, -0.00702861, 0.171829, 0.0420208, 0.730654, 0.808744, 0.40449, 0.461001, 0.760802, 0.694688, 0.160933, 0.455869, 0.701655, 0.45186, 0.272341, 0.596777, 0.0803728, 0.41239, 0.466739, -0.15404, -0.458387, -0.710208, 0.293192, 0.702472, 0.634902, 0.170421, 0.752779, 0.357923, 0.639851, 0.689341, 0.188305, 0.734049, -0.319447, 0.839569, 0.814999, 0.151022, 0.838179, 0.578494, 0.466352, 0.721347, 0.363781, -0.0900804, -0.127805, 0.0976086, 0.412648, 0.258527, 0.167972, 0.759627, 0.829258, 0.128892, 0.833214, 0.969302, 0.471705, 0.727083, 0.824055, 0.0305217, 0.558093, 0.420888, -0.132785, 0.262696, 0.111269, 0.332031, 0.556234, 0.33695, 0.312602, 0.664974, 0.424444, 0.197552, 0.613213, 0.564391, 0.16386, 0.0294463, 0.373831, -0.00843144, 0.311788, 0.463032, -0.896896, 0.469496, -0.211895, 0.67709, 0.757033, -1.11352, 0.723391, 0.615403, -0.579157, -0.130902, 0.333483, 0.164634, 0.596566, 0.801807, 0.098384, 0.645602, 0.433455, 0.388298, 0.0230213, 0.78743, 0.849419, 0.42542, 1.01948, 0.567875, 1.018, 1.11186, -0.237256, 1.11906, 0.970214, 0.665535, 1.04274, 0.678697, 0.459233, 0.429037, 0.0365747, -0.14508, 0.366972, 0.183517, 0.466352, 0.656024, 0.0852531, 0.249911, -0.071172, -0.163399, -0.0553581, 0.494475, 0.291981, 0.0174008, 0.129439, -0.335263, -0.300706, 0.646241, 0.693145, 0.0795104, 0.882177, 0.810597, -0.354436, 0.609203, -0.0812083, 0.50606, 0.307475, 0.273842, 0.356847, 0.125584, 0.561697, 0.222884, 0.226929, 0.408761, -0.0993895, 0.216976, 0.565301, 0.646722, 0.356497, 0.423847, 0.791348, 0.594006, 0.441686, 0.867448, 0.740488, -0.270767, 0.718723, 0.755047, 0.441482, 0.0989585, 0.588873, 0.477919, -0.117739, 0.485872, -0.541288, 0.666193, 0.658897, 0.367599, 0.936859, 0.825829, 0.0318896, 0.70305, 0.126435, 0.523927, 0.251423, 0.515623, 0.53803, 0.425303, 0.83884, 0.465822, 0.660845, 0.771473, -0.141149, 0.841411, 0.7242, 0.156143, 0.666336, 0.0974628, 0.476689, 0.302216, 0.384786, 0.528536, 0.146965, 0.772733, 0.547302, 0.622878, 0.943107, 0.696758, 0.498752, 0.87935, 0.732786, -0.303587, 0.441599, 0.58248, 0.571342, 0.338735, -0.185507, 0.272834, -0.0599555, 0.656319, 0.510592, 0.503431, 0.859996, 0.485542, 0.708401, 0.892528, 0.417356, 0.516389, 0.52162, -0.377173, 0.318855, -0.0493348, -0.24798, 0.275082, 0.164409, 0.212229, 0.511189, -0.156397, 0.369628, 0.135784, 0.193822, 0.0286449, 0.352744, 0.295205, 0.548504, 0.829635, 0.150848, 0.854027, 0.912254, -0.471073, 0.806188, 0.690744, -0.716106, -0.202514, 0.686184, 0.629044, 0.48823, 0.917248, 0.591649, 0.707349, 0.888546, 0.117832, 0.746637, 0.650655, 0.461566, 0.890047, 0.690084, 0.38313, 0.832629, 0.627484, 0.405823, 0.837876, 0.651901, 0.336316, 0.793801, 0.587913, 0.170162, 0.575975, 0.219007, -0.03178, 0.0538611, -0.21654, 0.162503, 0.30086, -0.551001, 0.550268, 0.520487, -0.0953331, 0.599721, 0.497705, 0.134995, 0.392356, 0.6306, 0.1981, 0.693605, 0.897152, 0.46037, 0.688699, 0.845081, 0.388805, 0.312544, 0.200369, 0.130939, 0.278791, -0.899555, 0.0569811, -0.731546, 0.109334, -0.930357, 0.22615, 0.128465, -0.000518765, 0.388354, -0.00733138, 0.340539, 0.597118, 0.357632, 0.257849, 0.676369, 0.527396, 0.239213, 0.773914, 0.677613, 0.0852657, 0.790014, 0.667227, 0.415898, 0.951743, 0.914712, -0.0149537, 0.770042, 0.786287, -0.103466, 0.487513, 0.0424721, 0.437774, 0.13307, 0.71817, 0.933714, 0.457747, 0.79264, 0.89299, -0.420404, 0.788738, 0.5862, 0.420252, 0.571059, -0.0144206, 0.475361, 0.0526526, 0.635399, -0.254381, 0.678163, 0.433857, 0.668446, 0.798945, 0.0948472, 0.885065, 0.560642, 0.73989, 0.870039, -0.199312, 0.633021, -0.00303808, 0.618986, 0.505848, 0.0277437, -0.095528, 0.519689, 0.453552, 0.632574, 0.953279, 0.551599, 0.834105, 1.03527, 0.734417, 0.337061, 0.703942, 0.548515, 0.00531227, 0.050781, 0.357927, 0.0129192, 0.268414, 0.349099, 0.180795, 0.621216, -0.438248, 0.786856, 0.770148, 0.363027, 0.910317, 0.542343, 0.756588, 0.870808, -0.843411, 0.761023, 0.480862, 0.544596, 0.734944, 0.375434, -0.939099, -1.14337, -0.587802, 0.131944, -0.21278, 0.290596, 0.304105, 0.266352, 0.641421, 0.029442, 0.652834, 0.751937, 0.384335, -0.44207, -0.196341, 0.162926, 0.819441, 0.872392, -0.338317, 0.970336, 0.903313, 0.333063, 0.918946, 0.585854, 0.493184, 0.452924, 0.319386, 0.395991, 0.332653, 0.536171, 0.199149, 0.713216, 0.156193, 0.563118, 0.152831, 0.730992, 0.787536, 0.0849264, 0.795336, 0.140061, 0.809937, 0.745386, 0.560095, 0.952582, 0.5146, 0.800371, 0.92348, 0.23039, 0.67197, 0.552374, 0.426814, 0.790293, 0.430504, 0.658855, 0.935338, 0.734902, 0.344232, 0.860663, 0.744176, -1.9595, 0.542569, 0.492483, 0.303341, 0.335236, 0.111861, 0.353806, 0.698146, 0.386477, 0.555186, 0.803371, 0.497754, 0.127715, 0.287375, -0.412859, 0.202227, 0.0179836, -0.0551998, -0.0307029, -0.0606961, 0.512894, 0.321975, 0.394571, 0.649676, -0.186793, 0.521786, -0.13728, 0.73127, 0.752559, 0.212409, 0.861198, 0.632656, 0.307294, 0.418794, 0.262788, 0.476783, 0.162208, 0.658831, 0.236849, 0.340946, 0.224957, -1.09827, 0.408044, 0.798115, 0.425699, 0.847398, 1.01563, -0.139176, 1.06209, 1.07237, -0.257826, 0.907399, 0.734971, 0.315339, 0.633022, -0.0724804, 0.231863, -0.114423, -0.331207, -1.28279, -0.791254, -0.0487308, 0.199737, 0.110247, 0.192028, 0.310299, -0.918213, 0.649287, 0.726868, -0.748282, 0.651872, 0.174794, 0.70378, 0.634532, 0.664502, 0.96949, 0.229567, 0.953532, 0.931206, 0.196118, 0.812035, -1.03469, 0.812675, 0.414867, 0.754926, 0.726634, 0.556862, 0.936301, 0.603802, 0.318894, 0.314828, -0.70553, 0.462208, 0.764204, -0.166786, 0.941002, 0.969935, 0.211048, 1.01529, 0.721913, 0.814989, 0.979875, 0.141818, 0.774514, 0.668536, -0.364792, -0.235188, 0.396334, -0.626198, 0.584113, 0.462104, 0.315256, 0.477335, 0.258825, 0.610346, 0.144724, 0.87416, 0.70406, 0.446087, 0.706134, -0.261644, 0.666908, -0.0549895, 0.622196, 0.186788, 0.782636, 0.887525, -0.516416, 0.85259, 0.784047, -0.287612, 0.59457, 0.22116, -0.019721, -0.360071, 0.559983, 0.57347, -0.452557, 0.691835, 0.721621, -0.435186, 0.732553, 0.739947, 0.232334, 0.965814, 0.906499, 0.257744, 0.995523, 0.872955, 0.245948, 0.8381, 0.596753, -0.228921, -0.268828, 0.2741, 0.190723, -0.127872, -0.271808, 0.274574, 0.206016, 0.305424, 0.487743, 0.241849, 0.824255, 0.642342, 0.488827, 0.827239, 0.463234, 0.363328, 0.42516, -1.18625, -0.878633, 0.487323, 0.591723, -0.342977, 0.561852, 0.64304, 0.336419, -0.521942, 0.210987, 0.207776, -1.54332, 0.39099, 0.476533, -0.495369, 0.443915, 0.430342, -0.763285, 0.0285067, -0.247984, 0.249363, 0.726246, 0.781117, -0.565298, 0.840269, 0.839481, -0.0441318, 0.881112, 0.780949, -0.123787, 0.669964, 0.436086, 0.141555, 0.527446, 0.324831, 0.146244, 0.680599, 0.621524, 0.319717, 0.943346, 0.880277, 0.25408, 0.958372, 0.776611, 0.354027, 0.598683, 0.326813, 0.728454, -0.537017, 0.814405, 0.525476, 0.709841, 0.809115, 0.119814, 0.812416, 0.20042, 0.749909, 0.668799, 0.134701, 0.167639, 0.686971, 0.793395, 0.377603, 1.00276, 0.732558, 0.797652, 1.00083, 0.361358, 0.715043, 0.53667, 0.275239, 0.108297, 0.539457, 0.501668, 0.515004, 0.828581, 0.279136, 0.656936, 0.584638, 0.339337, 0.642244, -0.195313, 0.822493, 0.829558, 0.122412, 0.642816, 0.808444, 0.597188, 0.204236, 0.805228, 0.75958, -0.32052, 0.757014, 0.541758, 0.591535, 0.873588, 0.500264, 0.467401, 0.50255, 0.115715, 0.488353, -0.182652, 0.646885, 0.419928, 0.471522, 0.780016, 0.566934, 0.0886217, 0.657174, 0.651778, 0.204235, 0.366328, 0.670498, 0.558172, -0.662081, 0.35549, 0.35986, 0.192813, 0.265675, 0.322672, -0.170327, 0.0704755, -0.0886836, 0.0481683, -0.0414454, 0.371172, 0.623502, -0.19149, 0.736899, 0.856261, 0.393338, 0.499834, 0.57895, -1.17206, 0.471119, 0.4478, 0.117194, -0.633036, 0.0970817, 0.540909, 0.570622, -0.426384, 0.773579, 0.825773, -0.152948, 0.785098, 0.795529, -0.870019, 0.715687, 0.486839, 0.419621, 0.542745, 0.342812, 0.803737, 0.179007, 0.919713, 1.05156, 0.426714, 0.90874, 0.950242, -1.4282, 0.82737, 0.567622, 0.523663, 0.628837, 0.201095, 0.76751, 0.576102, -0.690036, -0.258745, 0.0391756, -1.20995, 0.442533, 0.35053, 0.335194, 0.655428, 0.0750825, 0.548451, 0.559763, -0.620527, 0.440407, 0.343216, 0.178151, 0.202754, -0.311095, 0.694515, 0.78186, -1.43819, 0.879658, 0.859024, 0.0912101, 0.899828, 0.777228, -1.55573, 0.250127, -0.020799, 0.213261, 0.295431, 0.660109, 0.305869, 0.378186, 0.545137, 0.295845, 0.269493, 0.491477, 0.250615, 0.356666, 0.567945, -0.45378, 0.671899, 0.438204, 0.573019, 0.79401, -0.0836878, 0.792581, 0.804312, -0.311786, 0.806903, 0.694501, 0.281469, 0.82458, 0.651222, 0.36597, 0.837129, 0.677066, 0.183382, 0.71866, 0.462062, 0.282998, 0.553202, 0.243983, 0.0252281, 0.504973, 0.551534, 0.2279, 0.906044, 0.849855, 0.284047, 0.975599, 0.872599, -0.370207, 0.611565, -0.496976, 0.602484, 0.366136, 0.458552, 0.654869, -0.046467, 0.464156, 0.424645, -0.965285, 0.177581, -0.192356, -0.262265, -0.0485695, -0.0401779, -0.118263, -0.569501, 0.270458, 0.327467, -1.02648, 0.347758, 0.254064, 0.200864, 0.644706, 0.499112, 0.154125, 0.647712, 0.292428, 0.61635, 0.86444, 0.526809, 0.648751, 0.923533, 0.660029, 0.482764, 0.882637, 0.826835, 0.471341, -0.346557, 0.422146, 0.537107, 0.345731, -0.472187, 0.212033, -0.288603, -0.224651, -0.211989, 0.334631, -0.19737, 0.398117, 0.312593, 0.383981, 0.63164, -0.224717, 0.784802, 0.561668, 0.629908, 0.784911, 0.285323, 0.946546, 0.614832, 0.792802, 0.860635, 0.484113, 1.01065, 0.596699, 0.849623, 0.878036, 0.390908, 0.921696, 0.369587, 0.790746, 0.713537, 0.536998, 0.926407, 0.739157, -0.40602, 0.311811, 0.579966, 0.799217, 0.72719, 0.229974, 0.935423, 0.854055, 0.091111, 0.818128, 0.565347, 0.311889, 0.531786, -0.16713, 0.11624, 0.0770472, 0.0578669, 0.151954, -0.543978, 0.124618, -0.468912, 0.422422, 0.467698, -0.166342, 0.455562, -0.490261, 0.634886, 0.393708, 0.497113, 0.612423, 0.160217, 0.722985, 0.196753, 0.581811, 0.303903, 0.706002, 0.861196, 0.0656406, 0.703761, 0.614549, -0.564574, -0.310727, 0.469268, 0.483731, 0.318451, 0.804424, 0.700298, -0.405739, 0.495445, 0.692367, 0.723488, 0.30163, 0.691639, 0.930563, 0.361272, 0.931763, 1.0355, -0.0509966, 0.957943, 0.816398, 0.63016, 0.93959, 0.306537, 0.715827, 0.532997, 0.46621, 0.579934, 0.0121693, 0.482776, 0.0187528, 0.66888, 0.37534, 0.254026, 0.0816674, 0.452062, 0.520982, 0.190408, 0.755723, 0.609985, -0.181234, 0.438739, 0.110062, -0.716522, 0.23359, 0.535464, 0.295292, 0.386114, 0.778918, 0.720533, -0.337666, 0.6182, 0.631194, -0.715214, 0.521199, 0.449622, -0.223996, -0.0440885, 0.451035, 0.100433, 0.619985, 0.789162, -0.444502, 0.945573, 0.901736, 0.389049, 0.98949, 0.665825, 0.807216, 0.99614, 0.478078, 0.656489, 0.674907, -0.304604, 0.1629, -0.546644, -0.1248, 0.0443376, 0.333503, 0.312852, 0.30072, 0.835665, 0.735928, 0.378752, 0.878891, 0.59991, 0.349022, 0.225955, 0.590724, 0.634475, 0.448645, 0.870354, 0.30042, 0.827231, 0.868813, -0.385358, 0.58539, 0.0452777, 0.235282, -0.111619, 0.538987, -0.643561, 0.808381, 0.778117, 0.109817, 0.770536, 0.379689, 0.536716, 0.622194, -0.0375518, -0.0276902, -0.0165913, 0.404475, 0.675585, 0.442572, 0.502366, 0.799185, 0.444162, 0.369646, 0.435047, -0.431386, 0.137209, -0.196256, 0.322638, 0.349273, 0.522925, 0.605952, -0.684443, 0.8754, 0.90429, 0.345844, 1.08083, 0.919163, 0.680783, 0.992606, -0.218615, 0.937735, 0.618493, 0.843295, 0.86036, 0.681124, 1.08671, 0.64983, 0.880372, 0.916739, -0.0164046, 0.771301, 0.168804, 0.504686, 0.114276, 0.195841, 0.0871393, 0.709079, 0.269311, 0.778115, 0.8943, -0.00393635, 0.732119, 0.637447, -0.348942, -0.088924, 0.533031, 0.246654, 0.469344, 0.507561, 0.295933, 0.647819, -0.363798, 0.7462, 0.374258, 0.778413, 0.931606, 0.272283, 0.750423, 0.770695, -0.0569689, 0.444356, 0.52122, 0.525832, 0.497876, -0.393697, 0.581646, 0.672924, -0.110968, 0.484152, 0.295143, 0.292704, 0.48715, -1.16922, 0.429133, 0.2187, 0.151748, 0.374323, -0.710696, 0.553348, 0.570244, 0.021721, 0.87946, 0.971063, 0.469389, 0.81017, 0.954055, 0.239297, 0.817937, 0.776359, 0.214996, 0.713906, -0.802922, 0.799967, 0.637765, 0.426367, 0.670316, -0.512248, 0.592028, -0.15054, 0.540916, -0.0380807, 0.75071, 0.811211, -0.0163209, 0.917438, 0.867353, -0.480095, 0.689351, 0.659564, 0.106416, 0.193409, 0.453512, 0.339821, -0.306532, 0.494692, 0.399792, 0.10524, 0.620463, 0.534258, 0.066689, -0.137161, 0.174638, -0.289761, 0.336014, 0.524914, 0.218411, -0.0781965, 0.385675, 0.575909, 0.654978, 0.317157, 0.543741, 0.808627, 0.290724, 0.746737, 0.827331, -0.631188, 0.783983, 0.494666, 0.621829, 0.758559, -0.568501, 0.77171, 0.723361, 0.0731463, 0.162501, 0.412537, 0.592167, 0.53784, -0.00475155 - }; + 0.900037, 1.01321, 1.14434, 0.306727, 0.833073, 0.352759, 0.735386, 0.590035, 0.486874, 0.590626, 0.265093, 0.624232, -0.53797, 0.58245, -0.107659, 0.53018, 0.254254, 0.420463, 0.400476, 0.231527, 0.460029, -0.0929907, 0.495742, -0.458222, 0.436854, -0.0156622, 0.427327, 0.352146, 0.0935294, 0.224347, 0.294472, 0.606845, 0.205447, -0.0122183, -0.444279, 0.382255, -0.760633, 0.646949, 0.697753, -0.583435, 0.629255, 0.687186, 0.589307, 0.559063, 0.218743, 0.576521, 0.888888, 0.611568, 0.665307, 0.935216, 0.521594, 0.668967, 0.813774, 0.241442, 0.510184, 0.610397, 0.233785, 0.153256, 0.566421, 0.498129, -0.0252944, 0.684202, 0.474951, 0.569455, 0.839859, 0.231806, 0.721868, 0.604182, 0.637516, 0.919935, 0.335497, 0.760355, 0.695878, 0.358098, 0.684098, -0.0782545, 0.768703, 0.363499, 0.75513, 0.918731, 0.536538, 0.284987, 0.408263, -0.0358162, 0.136654, 0.49424, 0.339237, 0.310805, 0.740997, 0.645627, -0.235767, 0.722907, 0.751896, 0.0710797, 0.630257, 0.742266, 0.134913, 0.574328, 0.667768, 0.17401, 0.0955982, 0.0741191, -0.572461, -1.32144, 0.0744848, 0.611235, 0.668982, -0.610343, 0.778145, 0.663508, 0.512892, 0.853782, -0.011633, 0.85552, 0.736163, 0.687832, 1.02768, 0.701348, 0.576482, 0.697911, -1.23568, 0.234641, 0.298526, 0.625598, -0.116473, 0.56292, 0.567411, 0.0956476, -0.396526, -0.688094, 0.555013, 0.800919, 0.348555, 0.788969, 0.912597, -1.59167, 0.917495, 0.798258, 0.278331, 0.613494, 0.203346, 0.677815, -0.521763, 0.712773, -0.122625, 0.864193, 0.794502, 0.638281, 1.02016, 0.540995, 0.890221, 0.973673, 0.0979334, 0.686038, 0.341191, 0.533562, 0.606824, -1.08383, 0.490525, 0.552766, 0.485141, 0.229511, 0.239856, 0.72671, 0.685008, -1.68627, 0.624088, 0.588423, 0.0235835, -0.514601, -2.15744, -0.58297, 0.0601998, -0.121601, -0.0885952, 0.203368, 0.211629, 0.43574, 0.584731, 0.072521, 0.677809, 0.832431, -0.572056, 0.915877, 0.883939, 0.365987, 0.972658, 0.660788, 0.758157, 0.944331, 0.419298, 0.467099, 0.117078, 0.358884, -0.355739, 0.669332, 0.704171, -0.298846, 0.660865, 0.329222, 0.390779, 0.364881, 0.333531, 0.656154, 0.170425, 0.556232, 0.766385, 0.613862, -0.570748, 0.548395, 0.707959, 0.389648, 0.532723, 0.867643, 0.704419, 0.116039, 0.677136, 0.300478, 0.391613, 0.392274, 0.194569, 0.535403, -0.70226, 0.703606, 0.680614, -0.202362, 0.671343, 0.381901, 0.55254, 0.797667, 0.432743, 0.501274, 0.760141, 0.605643, 0.0547859, -0.097331, 0.396391, 0.615122, 0.520143, 0.0236257, 0.70149, 0.542209, 0.328393, 0.616149, 0.0792774, 0.862423, 0.721784, 0.530121, 0.896937, 0.390687, 0.756175, 0.813307, -0.151106, 0.373873, -0.108361, 0.481343, 0.154935, 0.844845, 0.63449, 0.722038, 1.00767, 0.618911, 0.710549, 0.813443, -0.445335, 0.768963, 0.583143, 0.270224, 0.623577, 0.311756, -0.329467, -0.362736, 0.0683089, 0.29044, -0.226192, 0.409947, 0.718493, 0.595528, 0.315963, 0.902897, 0.871222, -0.46191, 0.757097, 0.640927, 0.249685, 0.694013, 0.340912, 0.26775, 0.34419, -0.329418, 0.403048, 0.421488, 0.236617, -0.970445, 0.478393, 0.667402, 0.281616, 0.596891, 0.858176, 0.648046, 0.00964542, 0.557602, 0.375328, -0.206324, -0.804862, -0.426803, 0.150714, -0.0920029, 0.327988, 0.605341, 0.255804, 0.387997, 0.600252, 0.294383, -0.724845, -0.149612, 0.224964, 0.617027, 0.689696, 0.135608, 0.489247, 0.486654, -0.133245, 0.346217, -0.158167, 0.376572, 0.23174, 0.827254, 0.641789, 0.629744, 0.928572, 0.321452, 0.857538, 0.869631, 0.228592, 0.896489, 0.409083, 0.894841, 1.0064, -0.0134096, 0.972767, 0.995562, 0.144782, 0.772945, 0.721165, -0.654146, 0.525735, 0.307758, -0.961103, -0.579785, -1.26018, 0.202276, 0.465654, -0.324084, 0.680034, 0.856809, 0.549684, 0.345965, 0.601364, 0.138709, -0.135562, -0.879403, -0.133896, 0.263519, 0.665656, 0.47306, 0.283719, 0.602457, 0.045768, 0.301525, 0.0552519, 0.00869427, -0.461627, 0.592426, 0.588113, -0.0911098, 0.628431, 0.367804, 0.0657695, -0.223476, 0.456352, 0.531016, -0.566645, 0.516694, 0.393853, -0.324402, -1.38238, -0.145586, 0.553888, 0.674427, -1.65966, 0.79417, 0.647599, 0.761312, 1.09039, 0.746698, 0.886194, 1.08536, 0.542486, 0.846212, 0.901392, 0.177497, 0.405383, -0.112962, 0.194291, -0.565689, 0.352392, 0.323476, -0.340763, 0.433875, 0.533067, 0.407489, -1.81432, 0.501818, 0.587778, 0.0331714, 0.137315, -0.536817, 0.526565, 0.283021, 0.548427, 0.7339, -0.546492, 0.695161, 0.452618, 0.465806, 0.414136, 0.630554, 0.863685, 0.0166143, 0.777397, 0.550243, 0.678431, 0.829019, -0.505351, 0.785833, 0.520753, 0.344191, 0.344812, -0.219097, 0.205741, 0.836287, 0.688521, 0.757125, 1.08236, 0.640512, 0.96185, 1.08754, 0.342449, 0.877881, 0.814862, -0.451518, 0.411976, 0.0164704, 0.545651, 0.180947, 0.108298, 0.261021, 0.217284, 0.295174, -0.200444, 0.479191, 0.679081, 0.203703, 0.382939, 0.0608012, 0.589867, 0.69476, -0.33313, 0.722915, 0.454915, 0.527248, 0.678226, -0.675183, 0.643465, 0.365775, 0.450581, 0.660855, 0.2809, -0.0546033, -0.038923, -0.910493, -0.350539, 0.352126, 0.393028, -0.258389, 0.688721, 0.775089, -0.0606614, 0.861866, 1.02624, 0.669169, 0.725214, 0.958843, 0.54658, 0.573499, 0.642698, -1.21838, 0.284426, 0.00449943, 0.525928, 0.230536, -0.885871, 0.200162, 0.517936, -1.79404, 0.711147, 0.608332, 0.509325, 0.836569, 0.0499625, 0.796868, 0.661961, 0.623931, 0.906555, 0.296291, 0.723145, 0.625748, 0.374155, 0.667687, -2.20875, 0.667217, 0.538688, 0.0995054, 0.600693, 0.466922, -0.474937, 0.613265, 0.804061, 0.645942, 0.181827, 0.796356, 0.70466, -0.701605, 0.361413, 0.179971, 0.335464, 0.734994, 0.741954, -0.0505629, 0.846032, 0.627348, 0.660101, 0.883767, -0.179722, 0.844947, 0.736493, 0.369637, 0.788293, 0.475597, -0.0319664, 0.0985001, -0.337977, -0.0715855, -1.32777, 0.460525, 0.499705, 0.339717, 0.839827, 0.516463, 0.708094, 0.826193, 0.0455009, 0.865581, 0.54475, 0.557661, 0.432076, 0.633289, 0.729031, 0.387472, 0.901367, 0.511945, 0.657369, 0.706306, -0.00314824, 0.274746, 0.824462, 0.640772, 0.817157, 1.0855, 0.456594, 1.01613, 1.00133, 0.452142, 1.00026, 0.385173, 0.886389, 0.784579, 0.473408, 0.696403, 0.330574, 0.769672, -0.335024, 0.875053, 0.651134, 0.645593, 0.824455, -0.450107, 0.826926, 0.669786, 0.250776, 0.648294, 0.204096, 0.396232, 0.639167, 0.524073, -0.465493, 0.687785, 0.759666, -0.41224, 0.819528, 0.877225, 0.275112, 0.40785, -0.213697, 0.464639, -0.0767452, 0.709449, 0.815168, -0.243917, 0.777855, 0.802535, 0.278666, 0.233844, 0.413927, 0.373773, 0.0418677, 0.333091, 0.685188, 0.405316, 0.575686, 0.842192, 0.466054, 0.52479, 0.648328, -0.475102, 0.459117, 0.344675, -0.156115, -0.0573011, -0.0782064, 0.0275383, 0.324252, -0.519012, 0.507532, 0.290533, 0.323941, 0.442826, 0.220077, 0.741943, 0.614475, -0.548117, -0.0282131, -0.392649, 0.377087, 0.761131, 0.633924, 0.515428, 0.959685, 0.77975, 0.365137, 0.772094, 0.213798, 0.534943, 0.363741, 0.440445, 0.640587, -0.733022, 0.646123, 0.537882, 0.416656, 0.864042, 0.706208, 0.427382, 0.910514, 0.679607, 0.669745, 0.995986, 0.663752, 0.715593, 0.901829, 0.0770647, 0.763539, 0.679941, -0.191944, 0.227944, 0.352478, 0.574057, -1.2064, 0.464531, -0.789454, 0.460034, -0.234961, 0.824868, 0.727452, 0.610158, 1.01136, 0.75423, 0.466016, 0.68898, -0.0830544, -0.405612, 0.498102, 0.579029, 0.29838, 0.806834, 0.315639, 0.765266, 0.815736, -0.550354, 0.655688, 0.0287408, 0.520057, 0.195383, 0.423338, 0.237073, 0.514153, 0.651914, -1.12168, 0.502751, 0.0101815, 0.317821, 0.145715, -1.10566, 0.439589, 0.754737, 0.186704, 0.866128, 0.973768, -0.532647, 0.95735, 0.814512, 0.614246, 0.90415, -0.566594, 0.987517, 0.908208, 0.37995, 0.984242, 0.868227, -0.258683, 0.551372, 0.533696, 0.193765, -0.480795, 0.287013, 0.413795, 0.286821, -0.042846, -0.706073, -0.0315191, 0.386213, 0.283575, 0.271064, 0.726895, 0.563244, 0.262672, 0.623501, -0.466672, 0.628734, 0.51534, 0.0573839, 0.284421, 0.25208, 0.49745, 0.195006, 0.807873, 0.622403, 0.461529, 0.792947, 0.473077, -0.118643, -0.893869, 0.19723, -0.200327, 0.657032, 0.603387, -0.0932819, 0.455472, 0.0614011, 0.699017, 0.229803, 0.755296, 0.857815, -0.226496, 0.971826, 0.9576, -2.11959, 0.904716, 0.865214, -0.960596, 0.806685, 0.814698, 0.308097, 0.337857, 0.466695, -0.1241, 0.223283, 0.347427, -0.0339047, -0.223809, -0.0194791, -0.405821, -0.549974, 0.0967503, 0.302587, -0.23901, 0.473305, 0.742037, 0.574926, 0.193692, 0.739084, 0.63178, -0.606469, 0.0288756, 0.204023, 0.511726, -1.02988, 0.675458, 0.580739, 0.395742, 0.779123, 0.280498, 0.586554, 0.406085, 0.641903, 0.820087, -0.555572, 0.883634, 0.728319, 0.623488, 0.970212, 0.682827, 0.387683, 0.638283, 0.282437, -0.144808, 0.00516922, 0.0480647, 0.675477, 0.555944, 0.54764, 0.92101, 0.534415, 0.815224, 0.99229, 0.452622, 0.750768, 0.805973, 0.0484763, 0.249207, -0.0013738, 0.644678, 0.491985, 0.26183, 0.709594, 0.571186, -0.103007, 0.652184, 0.647495, -0.0175388, 0.363934, 0.236384, 0.281301, 0.555496, -0.299534, 0.547753, 0.42456, 0.425816, 0.75833, 0.427687, 0.348789, 0.465527, -1.08469, -0.164016, 0.302861, 0.497328, -0.188894, 0.717171, 0.638765, 0.149729, 0.731897, 0.528081, 0.274766, 0.698875, 0.56916, -0.121836, 0.767959, 0.922403, 0.72693, 0.339608, 0.894113, 0.77185, 0.116626, 0.745859, 0.454809, 0.247668, 0.183848, 0.436377, 0.648039, 0.0178002, 0.453997, 0.402549, -0.321434, 0.264288, 0.0214082, -0.0128206, 0.319669, 0.185938, 0.192726, 0.55098, 0.170421, 0.28462, 0.223149, 0.291114, 0.49782, 0.0685681, 0.785234, 0.663154, 0.4477, 0.889242, 0.624901, 0.554854, 0.78605, -0.617852, 0.837262, 0.839065, -0.215506, 0.591877, 0.371179, -0.241765, -0.0259127, 0.635331, 0.291196, 0.813709, 1.04947, 0.660371, 0.849064, 1.00905, 0.171822, 0.896663, 0.835614, 0.186518, 0.750781, 0.0994767, 0.625134, 0.549319, 0.0602592, 0.544678, 0.363981, -0.0414673, -0.606917, 0.218762, 0.601277, 0.453726, 0.276814, 0.643936, 0.0727796, 0.452138, 0.01025, 0.658146, 0.749413, -1.14963, 0.651394, 0.267477, 0.569479, 0.611863, -0.0396916, 0.630526, 0.403436, -0.294824, 0.187914, 0.42998, 0.746069, 0.774609, -1.095, 0.885599, 0.890627, -0.484238, 0.850728, 0.736416, -0.401759, 0.387237, -0.439702, -1.23894, 0.404016, 0.49496, -0.182756, 0.596024, 0.316892, 0.316109, 0.39511, 0.013641, 0.498476, 0.0168471, 0.414834, 0.648731, 0.618332, 0.325291, 0.210616, 0.661617, 0.391972, 0.599653, 0.826091, -0.365038, 0.89247, 0.802755, 0.628644, 1.00894, 0.537889, 0.788285, 0.654103, 0.768416, 0.959354, -0.052526, 1.0472, 0.902274, 0.609804, 0.98831, 0.63625, 0.37195, 0.419947, -0.0859994, 0.463304, 0.713432, -0.066272, 0.832089, 0.878488, -0.359592, 0.84926, 0.648897, 0.351671, 0.51005, 0.277886, 0.708715, 0.410269, -0.0229632, -0.0686956, -0.229608, -0.290732, 0.415277, 0.177654, 0.346511, 0.574827, 0.117654, 0.163302, 0.0251581, 0.142753, 0.457456, 0.407631, 0.0850518, 0.0298301, 0.579641, 0.642538, -0.0160899, 0.581233, 0.689241, 0.122556, 0.363947, 0.335255, -2.81416, -1.23844, 0.350781, 0.496363, -0.613485, 0.627512, 0.775267, 0.404136, 0.638616, 0.977686, 0.884462, -0.0950474, 0.904313, 0.769441, 0.551123, 0.94426, 0.463357, 0.828593, 0.882507, 0.0339229, 0.883194, 0.634558, 0.376022, 0.363215, 0.494986, 0.624452, 0.123683, 0.683716, -0.19346, 0.6635, 0.34434, 0.687797, 0.787421, -0.0871196, 0.834625, 0.669173, 0.190634, 0.592672, 0.307577, 0.0282273, 0.305572, -0.0515745, 0.482413, 0.673751, 0.0643184, 0.559139, 0.662485, 0.429962, 0.267549, 0.319322, -0.446253, 0.475778, 0.597565, 0.116963, 0.176682, 0.311082, 0.30717, 0.410224, 0.0721767, 0.442936, 0.58562, 0.318431, 0.944472, 0.767999, 0.751144, 1.06853, 0.58909, 0.905294, 0.940696, 0.227063, 0.92815, 0.532243, 0.700845, 0.745157, -0.602989, 0.519386, 0.230621, 0.0582367, 0.478628, 0.272417, 0.546583, 0.766437, -0.358562, 0.786428, 0.738363, -0.387628, -0.660931, 0.53252, 0.339761, 0.754949, 0.967903, 0.109559, 0.951303, 0.890207, 0.356221, 0.773372, 0.225359, 0.893162, 0.316425, 0.856486, 0.747981, 0.681619, 0.918834, -0.0909059, 0.984593, 0.77815, 0.639355, 0.869527, 0.107696, 0.530761, 0.0540102, 0.1843, 0.0742208, 0.638988, 0.109816, 0.631385, 0.52157, 0.589494, 0.853118, 0.0590765, 0.801838, 0.716379, 0.541185, 0.979109, 0.82321, 0.185401, 0.87461, 0.864535, 0.335355, 0.59676, 0.813708, 0.581742, -0.220857, 0.13892, 0.210421, 0.424775, 0.142593, 0.730338, 0.452587, 0.573536, 0.730998, -0.223415, 0.792825, 0.595004, 0.443247, 0.698189, 0.00710515, 0.387489, 0.0543208, 0.0412086, -0.393754, 0.550226, 0.512985, -0.379147, 0.433547, 0.144748, 0.000474572, 0.322377, 0.395029, 0.410377, -0.0253694, 0.308362, 0.408712, 0.0229924, 0.603534, -0.0847718, 0.752801, 0.806416, 0.188813, 0.997312, 0.973245, 0.0108977, 0.783175, 0.808227, 0.448452, -0.642637, 0.276952, 0.458049, 0.300605, 0.112706, 0.588508, 0.351365, 0.294758, 0.551127, -0.102437, 0.377891, 0.34069, -1.47984, -0.277801, 0.150503, 0.487432, 0.353602, -0.333743, 0.455612, 0.424679, -0.0427493, 0.72766, 0.75735, -0.599039, 0.751557, 0.67732, 0.278636, 0.713431, -0.505893, 0.725144, 0.361338, 0.802285, 0.929355, -0.18063, 0.79895, 0.486976, 0.584534, 0.299838, 0.857963, 0.970107, 0.184266, 1.09539, 0.953684, 0.666059, 1.06056, 0.692524, 0.656744, 0.757843, -0.120705, 0.324111, 0.24606, 0.429985, 0.651778, 0.321605, 0.574443, 0.718613, -0.1663, 0.788579, 0.545468, 0.472268, 0.537722, 0.383607, 0.701801, -0.54248, 0.783888, 0.606155, 0.46517, 0.761622, 0.42682, -0.821007, -0.183886, 0.0554102, 0.240587, 0.623014, 0.334099, 0.093694, -0.390883, 0.489799, 0.360903, 0.579916, 0.865723, 0.407278, 0.740112, 0.878873, 0.387647, 0.42314, 0.416982, -2.59438, -0.0351187, -0.220034, 0.245073, 0.564531, 0.469992, -0.0304901, 0.633885, 0.569338, -0.358815, 0.681549, 0.771206, 0.338867, 0.625692, 0.877722, 0.52655, 0.707181, 0.937529, 0.479805, 0.678213, 0.667777, 0.437819, 0.805203, -1.33572, 0.94806, 0.928213, -0.0389012, 0.887147, 0.670378, 0.356434, 0.553623, -0.0451058, 0.517619, -0.693647, 0.666397, 0.641976, -0.115062, 0.089269, -0.27906, -0.851098, 0.034001, -0.272951, 0.452793, 0.724383, 0.413098, 0.551748, 0.811615, 0.406008, 0.620337, 0.819879, 0.437801, 0.430844, 0.632094, 0.239141, 0.0845517, 0.338211, 0.356854, 0.4483, 0.357354, 0.0957684, 0.763412, 0.813245, 0.253024, 0.562339, 0.622394, -0.513611, 0.367682, -0.272242, 0.404147, 0.351729, 0.12159, 0.63312, 0.640258, 0.395134, -2.03581, 0.394431, 0.52841, -0.171821, 0.593465, 0.689299, -1.1843, 0.667319, 0.359604, 0.654491, 0.755039, 0.291085, 0.929967, 0.582078, 0.872427, 1.03255, 0.105808, 0.965683, 0.899814, 0.380678, 0.923495, 0.620501, 0.446812, 0.638802, 0.340274, 0.344772, 0.590734, 0.253459, 0.634835, 0.874598, 0.523151, 0.550897, 0.762483, 0.416549, -0.269082, -0.918315, 0.269913, 0.3413, -0.116999, -0.185349, 0.110075, 0.110863, -0.397995, 0.136551, 0.424276, 0.318901, -0.731737, 0.13577, 0.274401, 0.194702, -0.91056, 0.387677, 0.596929, 0.268387, 0.379122, 0.566851, -1.36188, 0.55537, 0.207662, 0.574668, 0.681004, -0.273669, 0.675469, -0.00235673, 0.810531, 0.856547, 0.141061, 0.994374, 0.931759, 0.0346852, 0.959951, 0.9587, 0.525855, 0.312712, 0.589569, 0.391857, -0.351113, 0.407368, 0.283226, -0.0791642, 0.357704, -0.669023, 0.466415, 0.468268, -0.525335, 0.401896, 0.0586402, 0.0796663, -0.0291051, -0.0462003, -0.409887, 0.43503, 0.58353, -1.67849, 0.7138, 0.736459, -0.606086, 0.63546, 0.466538, 0.386893, 0.712597, 0.345915, 0.389859, 0.526129, -0.43586, 0.233762, -0.968698, 0.286412, -0.708989, 0.730027, 0.867743, 0.483471, 0.50809, 0.71409, 0.427188, -0.332724, -0.662522, 0.140585, 0.721654, 0.773533, -0.188093, 0.919171, 0.820466, 0.605194, 1.02105, 0.576273, 0.894436, 0.953975, 0.269485, 1.0094, 0.72505, 0.765821, 0.958211, 0.370262, 0.575218, 0.347035, 0.294513, 0.230123, 0.17074, 0.192883, 0.189134, 0.391092, -0.442164, 0.369474, -0.336058, 0.378197, 0.46942, 0.415162, 0.526447, 0.453415, 0.226833, 0.819828, 0.733799, 0.108656, 0.733281, 0.435927, 0.0434535, -0.488384, 0.589678, 0.286469, 0.685251, 0.854719, -0.164858, 0.842641, 0.816397, -0.329956, 0.717001, 0.575948, -0.437808, -0.0898419, -0.201221, -0.250568, -0.0861025, 0.566398, 0.588565, 0.0685273, 0.805381, 0.660524, 0.474107, 0.859808, 0.554424, 0.36064, 0.486939, -0.231161, 0.496048, 0.474829, 0.403998, 0.208183, 0.351897, 0.83408, 0.743639, 0.357339, 0.889782, 0.617698, 0.428812, 0.387028, 0.565116, 0.631669, 0.608816, 0.992617, 0.479993, 0.943136, 0.995318, 0.047157, 0.972072, 0.699437, 0.556006, 0.530109, 0.605956, 0.783807, 0.0589337, 0.854989, 0.496594, 0.71753, 0.806913, -0.257954, 0.763841, 0.446106, 0.609201, 0.8371, 0.594837, -0.192866, 0.503769, 0.463454, -0.419237, 0.422518, 0.486667, -0.2354, 0.691777, 0.656943, 0.0887255, 0.834215, 0.833506, 0.225416, 0.578224, 0.77174, 0.633286, -0.352772, 0.513728, 0.616149, 0.155199, 0.299122, 0.422175, 0.00794205, -0.136138, 0.427923, 0.507184, -0.83555, 0.614709, 0.580213, -0.484983, 0.516237, 0.426936, 0.0124559, -0.179814, -0.359462, -0.280812, -1.58126, 0.470602, 0.644497, -0.317211, 0.716075, 0.710752, -0.0476969, 0.653877, -0.0471822, 0.553238, 0.0371084, 0.699774, 0.691398, 0.306135, 0.733312, -0.831491, 0.756622, 0.0303724, 0.939164, 0.960455, 0.415508, 1.09266, 0.891933, 0.740755, 1.08467, 0.826767, 0.34261, 0.735299, 0.50918, -0.292178, -0.0455994, 0.25188, 0.252987, -0.206715, -0.439386, 0.37366, 0.56169, -0.057104, 0.514642, 0.464799, 0.256672, 0.59465, -1.52587, 0.649209, 0.488279, 0.191801, 0.427556, -0.489983, -0.362585, 0.561923, 0.516702, 0.466313, 0.843155, 0.337447, 0.705333, 0.569674, 0.681711, 0.880857, -0.445107, 0.906115, 0.65896, 0.685073, 0.853567, 0.0519972, 0.362637, 0.15708, 0.55725, 0.386394, 0.941641, 0.623435, 0.876498, 1.07862, 0.634478, 0.677538, 0.713814, -0.401493, 0.0671702, -0.456836, -0.310474, 0.425107, -0.550762, 0.711602, 0.660004, 0.574896, 0.944422, 0.382618, 0.840033, 0.734276, 0.695175, 0.919252, 0.254313, 1.07584, 0.887809, 0.726881, 1.0001, 0.163922, 0.86679, 0.72069, 0.410279, 0.642414, 0.0171852, 0.696035, 0.430246, 0.0770644, 0.245834, -0.220673, -0.00702861, 0.171829, 0.0420208, 0.730654, 0.808744, 0.40449, 0.461001, 0.760802, 0.694688, 0.160933, 0.455869, 0.701655, 0.45186, 0.272341, 0.596777, 0.0803728, 0.41239, 0.466739, -0.15404, -0.458387, -0.710208, 0.293192, 0.702472, 0.634902, 0.170421, 0.752779, 0.357923, 0.639851, 0.689341, 0.188305, 0.734049, -0.319447, 0.839569, 0.814999, 0.151022, 0.838179, 0.578494, 0.466352, 0.721347, 0.363781, -0.0900804, -0.127805, 0.0976086, 0.412648, 0.258527, 0.167972, 0.759627, 0.829258, 0.128892, 0.833214, 0.969302, 0.471705, 0.727083, 0.824055, 0.0305217, 0.558093, 0.420888, -0.132785, 0.262696, 0.111269, 0.332031, 0.556234, 0.33695, 0.312602, 0.664974, 0.424444, 0.197552, 0.613213, 0.564391, 0.16386, 0.0294463, 0.373831, -0.00843144, 0.311788, 0.463032, -0.896896, 0.469496, -0.211895, 0.67709, 0.757033, -1.11352, 0.723391, 0.615403, -0.579157, -0.130902, 0.333483, 0.164634, 0.596566, 0.801807, 0.098384, 0.645602, 0.433455, 0.388298, 0.0230213, 0.78743, 0.849419, 0.42542, 1.01948, 0.567875, 1.018, 1.11186, -0.237256, 1.11906, 0.970214, 0.665535, 1.04274, 0.678697, 0.459233, 0.429037, 0.0365747, -0.14508, 0.366972, 0.183517, 0.466352, 0.656024, 0.0852531, 0.249911, -0.071172, -0.163399, -0.0553581, 0.494475, 0.291981, 0.0174008, 0.129439, -0.335263, -0.300706, 0.646241, 0.693145, 0.0795104, 0.882177, 0.810597, -0.354436, 0.609203, -0.0812083, 0.50606, 0.307475, 0.273842, 0.356847, 0.125584, 0.561697, 0.222884, 0.226929, 0.408761, -0.0993895, 0.216976, 0.565301, 0.646722, 0.356497, 0.423847, 0.791348, 0.594006, 0.441686, 0.867448, 0.740488, -0.270767, 0.718723, 0.755047, 0.441482, 0.0989585, 0.588873, 0.477919, -0.117739, 0.485872, -0.541288, 0.666193, 0.658897, 0.367599, 0.936859, 0.825829, 0.0318896, 0.70305, 0.126435, 0.523927, 0.251423, 0.515623, 0.53803, 0.425303, 0.83884, 0.465822, 0.660845, 0.771473, -0.141149, 0.841411, 0.7242, 0.156143, 0.666336, 0.0974628, 0.476689, 0.302216, 0.384786, 0.528536, 0.146965, 0.772733, 0.547302, 0.622878, 0.943107, 0.696758, 0.498752, 0.87935, 0.732786, -0.303587, 0.441599, 0.58248, 0.571342, 0.338735, -0.185507, 0.272834, -0.0599555, 0.656319, 0.510592, 0.503431, 0.859996, 0.485542, 0.708401, 0.892528, 0.417356, 0.516389, 0.52162, -0.377173, 0.318855, -0.0493348, -0.24798, 0.275082, 0.164409, 0.212229, 0.511189, -0.156397, 0.369628, 0.135784, 0.193822, 0.0286449, 0.352744, 0.295205, 0.548504, 0.829635, 0.150848, 0.854027, 0.912254, -0.471073, 0.806188, 0.690744, -0.716106, -0.202514, 0.686184, 0.629044, 0.48823, 0.917248, 0.591649, 0.707349, 0.888546, 0.117832, 0.746637, 0.650655, 0.461566, 0.890047, 0.690084, 0.38313, 0.832629, 0.627484, 0.405823, 0.837876, 0.651901, 0.336316, 0.793801, 0.587913, 0.170162, 0.575975, 0.219007, -0.03178, 0.0538611, -0.21654, 0.162503, 0.30086, -0.551001, 0.550268, 0.520487, -0.0953331, 0.599721, 0.497705, 0.134995, 0.392356, 0.6306, 0.1981, 0.693605, 0.897152, 0.46037, 0.688699, 0.845081, 0.388805, 0.312544, 0.200369, 0.130939, 0.278791, -0.899555, 0.0569811, -0.731546, 0.109334, -0.930357, 0.22615, 0.128465, -0.000518765, 0.388354, -0.00733138, 0.340539, 0.597118, 0.357632, 0.257849, 0.676369, 0.527396, 0.239213, 0.773914, 0.677613, 0.0852657, 0.790014, 0.667227, 0.415898, 0.951743, 0.914712, -0.0149537, 0.770042, 0.786287, -0.103466, 0.487513, 0.0424721, 0.437774, 0.13307, 0.71817, 0.933714, 0.457747, 0.79264, 0.89299, -0.420404, 0.788738, 0.5862, 0.420252, 0.571059, -0.0144206, 0.475361, 0.0526526, 0.635399, -0.254381, 0.678163, 0.433857, 0.668446, 0.798945, 0.0948472, 0.885065, 0.560642, 0.73989, 0.870039, -0.199312, 0.633021, -0.00303808, 0.618986, 0.505848, 0.0277437, -0.095528, 0.519689, 0.453552, 0.632574, 0.953279, 0.551599, 0.834105, 1.03527, 0.734417, 0.337061, 0.703942, 0.548515, 0.00531227, 0.050781, 0.357927, 0.0129192, 0.268414, 0.349099, 0.180795, 0.621216, -0.438248, 0.786856, 0.770148, 0.363027, 0.910317, 0.542343, 0.756588, 0.870808, -0.843411, 0.761023, 0.480862, 0.544596, 0.734944, 0.375434, -0.939099, -1.14337, -0.587802, 0.131944, -0.21278, 0.290596, 0.304105, 0.266352, 0.641421, 0.029442, 0.652834, 0.751937, 0.384335, -0.44207, -0.196341, 0.162926, 0.819441, 0.872392, -0.338317, 0.970336, 0.903313, 0.333063, 0.918946, 0.585854, 0.493184, 0.452924, 0.319386, 0.395991, 0.332653, 0.536171, 0.199149, 0.713216, 0.156193, 0.563118, 0.152831, 0.730992, 0.787536, 0.0849264, 0.795336, 0.140061, 0.809937, 0.745386, 0.560095, 0.952582, 0.5146, 0.800371, 0.92348, 0.23039, 0.67197, 0.552374, 0.426814, 0.790293, 0.430504, 0.658855, 0.935338, 0.734902, 0.344232, 0.860663, 0.744176, -1.9595, 0.542569, 0.492483, 0.303341, 0.335236, 0.111861, 0.353806, 0.698146, 0.386477, 0.555186, 0.803371, 0.497754, 0.127715, 0.287375, -0.412859, 0.202227, 0.0179836, -0.0551998, -0.0307029, -0.0606961, 0.512894, 0.321975, 0.394571, 0.649676, -0.186793, 0.521786, -0.13728, 0.73127, 0.752559, 0.212409, 0.861198, 0.632656, 0.307294, 0.418794, 0.262788, 0.476783, 0.162208, 0.658831, 0.236849, 0.340946, 0.224957, -1.09827, 0.408044, 0.798115, 0.425699, 0.847398, 1.01563, -0.139176, 1.06209, 1.07237, -0.257826, 0.907399, 0.734971, 0.315339, 0.633022, -0.0724804, 0.231863, -0.114423, -0.331207, -1.28279, -0.791254, -0.0487308, 0.199737, 0.110247, 0.192028, 0.310299, -0.918213, 0.649287, 0.726868, -0.748282, 0.651872, 0.174794, 0.70378, 0.634532, 0.664502, 0.96949, 0.229567, 0.953532, 0.931206, 0.196118, 0.812035, -1.03469, 0.812675, 0.414867, 0.754926, 0.726634, 0.556862, 0.936301, 0.603802, 0.318894, 0.314828, -0.70553, 0.462208, 0.764204, -0.166786, 0.941002, 0.969935, 0.211048, 1.01529, 0.721913, 0.814989, 0.979875, 0.141818, 0.774514, 0.668536, -0.364792, -0.235188, 0.396334, -0.626198, 0.584113, 0.462104, 0.315256, 0.477335, 0.258825, 0.610346, 0.144724, 0.87416, 0.70406, 0.446087, 0.706134, -0.261644, 0.666908, -0.0549895, 0.622196, 0.186788, 0.782636, 0.887525, -0.516416, 0.85259, 0.784047, -0.287612, 0.59457, 0.22116, -0.019721, -0.360071, 0.559983, 0.57347, -0.452557, 0.691835, 0.721621, -0.435186, 0.732553, 0.739947, 0.232334, 0.965814, 0.906499, 0.257744, 0.995523, 0.872955, 0.245948, 0.8381, 0.596753, -0.228921, -0.268828, 0.2741, 0.190723, -0.127872, -0.271808, 0.274574, 0.206016, 0.305424, 0.487743, 0.241849, 0.824255, 0.642342, 0.488827, 0.827239, 0.463234, 0.363328, 0.42516, -1.18625, -0.878633, 0.487323, 0.591723, -0.342977, 0.561852, 0.64304, 0.336419, -0.521942, 0.210987, 0.207776, -1.54332, 0.39099, 0.476533, -0.495369, 0.443915, 0.430342, -0.763285, 0.0285067, -0.247984, 0.249363, 0.726246, 0.781117, -0.565298, 0.840269, 0.839481, -0.0441318, 0.881112, 0.780949, -0.123787, 0.669964, 0.436086, 0.141555, 0.527446, 0.324831, 0.146244, 0.680599, 0.621524, 0.319717, 0.943346, 0.880277, 0.25408, 0.958372, 0.776611, 0.354027, 0.598683, 0.326813, 0.728454, -0.537017, 0.814405, 0.525476, 0.709841, 0.809115, 0.119814, 0.812416, 0.20042, 0.749909, 0.668799, 0.134701, 0.167639, 0.686971, 0.793395, 0.377603, 1.00276, 0.732558, 0.797652, 1.00083, 0.361358, 0.715043, 0.53667, 0.275239, 0.108297, 0.539457, 0.501668, 0.515004, 0.828581, 0.279136, 0.656936, 0.584638, 0.339337, 0.642244, -0.195313, 0.822493, 0.829558, 0.122412, 0.642816, 0.808444, 0.597188, 0.204236, 0.805228, 0.75958, -0.32052, 0.757014, 0.541758, 0.591535, 0.873588, 0.500264, 0.467401, 0.50255, 0.115715, 0.488353, -0.182652, 0.646885, 0.419928, 0.471522, 0.780016, 0.566934, 0.0886217, 0.657174, 0.651778, 0.204235, 0.366328, 0.670498, 0.558172, -0.662081, 0.35549, 0.35986, 0.192813, 0.265675, 0.322672, -0.170327, 0.0704755, -0.0886836, 0.0481683, -0.0414454, 0.371172, 0.623502, -0.19149, 0.736899, 0.856261, 0.393338, 0.499834, 0.57895, -1.17206, 0.471119, 0.4478, 0.117194, -0.633036, 0.0970817, 0.540909, 0.570622, -0.426384, 0.773579, 0.825773, -0.152948, 0.785098, 0.795529, -0.870019, 0.715687, 0.486839, 0.419621, 0.542745, 0.342812, 0.803737, 0.179007, 0.919713, 1.05156, 0.426714, 0.90874, 0.950242, -1.4282, 0.82737, 0.567622, 0.523663, 0.628837, 0.201095, 0.76751, 0.576102, -0.690036, -0.258745, 0.0391756, -1.20995, 0.442533, 0.35053, 0.335194, 0.655428, 0.0750825, 0.548451, 0.559763, -0.620527, 0.440407, 0.343216, 0.178151, 0.202754, -0.311095, 0.694515, 0.78186, -1.43819, 0.879658, 0.859024, 0.0912101, 0.899828, 0.777228, -1.55573, 0.250127, -0.020799, 0.213261, 0.295431, 0.660109, 0.305869, 0.378186, 0.545137, 0.295845, 0.269493, 0.491477, 0.250615, 0.356666, 0.567945, -0.45378, 0.671899, 0.438204, 0.573019, 0.79401, -0.0836878, 0.792581, 0.804312, -0.311786, 0.806903, 0.694501, 0.281469, 0.82458, 0.651222, 0.36597, 0.837129, 0.677066, 0.183382, 0.71866, 0.462062, 0.282998, 0.553202, 0.243983, 0.0252281, 0.504973, 0.551534, 0.2279, 0.906044, 0.849855, 0.284047, 0.975599, 0.872599, -0.370207, 0.611565, -0.496976, 0.602484, 0.366136, 0.458552, 0.654869, -0.046467, 0.464156, 0.424645, -0.965285, 0.177581, -0.192356, -0.262265, -0.0485695, -0.0401779, -0.118263, -0.569501, 0.270458, 0.327467, -1.02648, 0.347758, 0.254064, 0.200864, 0.644706, 0.499112, 0.154125, 0.647712, 0.292428, 0.61635, 0.86444, 0.526809, 0.648751, 0.923533, 0.660029, 0.482764, 0.882637, 0.826835, 0.471341, -0.346557, 0.422146, 0.537107, 0.345731, -0.472187, 0.212033, -0.288603, -0.224651, -0.211989, 0.334631, -0.19737, 0.398117, 0.312593, 0.383981, 0.63164, -0.224717, 0.784802, 0.561668, 0.629908, 0.784911, 0.285323, 0.946546, 0.614832, 0.792802, 0.860635, 0.484113, 1.01065, 0.596699, 0.849623, 0.878036, 0.390908, 0.921696, 0.369587, 0.790746, 0.713537, 0.536998, 0.926407, 0.739157, -0.40602, 0.311811, 0.579966, 0.799217, 0.72719, 0.229974, 0.935423, 0.854055, 0.091111, 0.818128, 0.565347, 0.311889, 0.531786, -0.16713, 0.11624, 0.0770472, 0.0578669, 0.151954, -0.543978, 0.124618, -0.468912, 0.422422, 0.467698, -0.166342, 0.455562, -0.490261, 0.634886, 0.393708, 0.497113, 0.612423, 0.160217, 0.722985, 0.196753, 0.581811, 0.303903, 0.706002, 0.861196, 0.0656406, 0.703761, 0.614549, -0.564574, -0.310727, 0.469268, 0.483731, 0.318451, 0.804424, 0.700298, -0.405739, 0.495445, 0.692367, 0.723488, 0.30163, 0.691639, 0.930563, 0.361272, 0.931763, 1.0355, -0.0509966, 0.957943, 0.816398, 0.63016, 0.93959, 0.306537, 0.715827, 0.532997, 0.46621, 0.579934, 0.0121693, 0.482776, 0.0187528, 0.66888, 0.37534, 0.254026, 0.0816674, 0.452062, 0.520982, 0.190408, 0.755723, 0.609985, -0.181234, 0.438739, 0.110062, -0.716522, 0.23359, 0.535464, 0.295292, 0.386114, 0.778918, 0.720533, -0.337666, 0.6182, 0.631194, -0.715214, 0.521199, 0.449622, -0.223996, -0.0440885, 0.451035, 0.100433, 0.619985, 0.789162, -0.444502, 0.945573, 0.901736, 0.389049, 0.98949, 0.665825, 0.807216, 0.99614, 0.478078, 0.656489, 0.674907, -0.304604, 0.1629, -0.546644, -0.1248, 0.0443376, 0.333503, 0.312852, 0.30072, 0.835665, 0.735928, 0.378752, 0.878891, 0.59991, 0.349022, 0.225955, 0.590724, 0.634475, 0.448645, 0.870354, 0.30042, 0.827231, 0.868813, -0.385358, 0.58539, 0.0452777, 0.235282, -0.111619, 0.538987, -0.643561, 0.808381, 0.778117, 0.109817, 0.770536, 0.379689, 0.536716, 0.622194, -0.0375518, -0.0276902, -0.0165913, 0.404475, 0.675585, 0.442572, 0.502366, 0.799185, 0.444162, 0.369646, 0.435047, -0.431386, 0.137209, -0.196256, 0.322638, 0.349273, 0.522925, 0.605952, -0.684443, 0.8754, 0.90429, 0.345844, 1.08083, 0.919163, 0.680783, 0.992606, -0.218615, 0.937735, 0.618493, 0.843295, 0.86036, 0.681124, 1.08671, 0.64983, 0.880372, 0.916739, -0.0164046, 0.771301, 0.168804, 0.504686, 0.114276, 0.195841, 0.0871393, 0.709079, 0.269311, 0.778115, 0.8943, -0.00393635, 0.732119, 0.637447, -0.348942, -0.088924, 0.533031, 0.246654, 0.469344, 0.507561, 0.295933, 0.647819, -0.363798, 0.7462, 0.374258, 0.778413, 0.931606, 0.272283, 0.750423, 0.770695, -0.0569689, 0.444356, 0.52122, 0.525832, 0.497876, -0.393697, 0.581646, 0.672924, -0.110968, 0.484152, 0.295143, 0.292704, 0.48715, -1.16922, 0.429133, 0.2187, 0.151748, 0.374323, -0.710696, 0.553348, 0.570244, 0.021721, 0.87946, 0.971063, 0.469389, 0.81017, 0.954055, 0.239297, 0.817937, 0.776359, 0.214996, 0.713906, -0.802922, 0.799967, 0.637765, 0.426367, 0.670316, -0.512248, 0.592028, -0.15054, 0.540916, -0.0380807, 0.75071, 0.811211, -0.0163209, 0.917438, 0.867353, -0.480095, 0.689351, 0.659564, 0.106416, 0.193409, 0.453512, 0.339821, -0.306532, 0.494692, 0.399792, 0.10524, 0.620463, 0.534258, 0.066689, -0.137161, 0.174638, -0.289761, 0.336014, 0.524914, 0.218411, -0.0781965, 0.385675, 0.575909, 0.654978, 0.317157, 0.543741, 0.808627, 0.290724, 0.746737, 0.827331, -0.631188, 0.783983, 0.494666, 0.621829, 0.758559, -0.568501, 0.77171, 0.723361, 0.0731463, 0.162501, 0.412537, 0.592167, 0.53784, -0.00475155 +}; #endif /* MULTIPATH_V120_M12_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v120_M6.h b/src/lte/model/JakesTraces/multipath_v120_M6.h index a4c80edd4..15b4ded32 100644 --- a/src/lte/model/JakesTraces/multipath_v120_M6.h +++ b/src/lte/model/JakesTraces/multipath_v120_M6.h @@ -24,8 +24,8 @@ #define MULTIPATH_V120_M6_H_ static double multipath_M6_v_120[3000] = { - 0.714949, 0.951788, 1.03258, -0.264461, 0.773594, 0.087873, 0.689937, 0.412287, 0.534571, 0.508458, 0.318557, 0.514549, 0.185614, 0.650382, 0.152264, 0.206577, -0.0752595, 0.630915, 0.232411, 0.652501, 0.757331, -1.84126, 0.745318, 0.749299, 0.406161, -0.590362, 0.24843, 0.627197, 0.561609, 0.280949, 0.801749, 0.381142, 0.798029, 0.915394, -0.403829, 0.80297, 0.408834, 0.755338, 0.749657, 0.507717, 0.906417, 0.209184, 0.881856, 0.905243, -0.0787691, 0.573369, 0.291409, -1.16869, 0.272366, 0.526006, -0.802188, 0.658759, 0.430174, 0.633957, 0.886595, 0.48245, 0.608569, 0.751796, 0.0586362, 0.537583, 0.559538, -0.181543, 0.118636, -1.72014, 0.480706, 0.595706, -0.566717, 0.741443, 0.863559, 0.337851, 0.688943, 0.772979, -0.678972, 0.792725, 0.741723, -0.695925, 0.485671, 0.318308, -0.461439, -0.764598, -0.36273, 0.465957, 0.64865, 0.305411, 0.346938, 0.543578, 0.0718224, -0.255732, -0.0351218, 0.489783, 0.361936, 0.0119309, 0.502519, 0.232963, 0.353079, 0.721244, 0.611824, 0.150211, 0.820699, 0.723887, 0.4556, 0.980136, 0.824632, 0.459735, 0.897198, 0.526377, 0.458688, 0.221056, 0.625353, 0.682684, 0.160291, 0.719873, -0.0611519, 0.691396, 0.545766, 0.322354, 0.40887, 0.401109, 0.587328, 0.295325, 0.771583, -0.875408, 0.93311, 0.876312, 0.529322, 1.04176, 0.848597, 0.249073, 0.683192, 0.167537, 0.161921, 0.0859662, -0.0745666, 0.153848, -0.278869, 0.179598, -0.149061, 0.463029, 0.522005, 0.246625, 0.719286, -0.27002, 0.831045, 0.749611, 0.595434, 0.987551, 0.691487, 0.384728, 0.396993, 0.186614, -0.376099, 0.656718, 0.497414, 0.751402, 0.971331, -0.129554, 0.966333, 0.796964, 0.763662, 0.987998, -0.907226, 0.945801, 0.665702, 0.733396, 0.768022, 0.606007, 1.01123, 0.689442, 0.605321, 0.776157, 0.279191, -0.0539593, 0.0145994, 0.375495, 0.645995, 0.391273, 0.48956, 0.717541, -0.107519, 0.615807, 0.491308, 0.146762, 0.465154, 0.0856006, 0.0667651, 0.519771, 0.465709, -0.0147226, 0.451968, -0.99543, 0.364672, 0.0191759, 0.680191, -0.0983725, 0.893765, 0.946702, 0.146364, 1.03277, 0.858541, 0.650865, 0.961686, 0.269571, 0.835, 0.82532, -0.134489, 0.240045, -0.0745957, 0.333947, -0.103414, 0.543206, 0.258576, 0.251024, 0.427391, -0.0117196, -0.616652, 0.134444, 0.178163, 0.00543924, 0.594987, 0.595814, -0.197307, 0.486005, 0.543361, -0.230964, 0.788464, 0.872763, 0.267856, 0.773649, 0.886916, 0.162868, 0.738345, 0.723415, -0.393616, 0.521566, -1.14818, 0.56991, 0.298352, 0.511469, 0.73068, 0.386214, 0.107241, 0.276174, -0.709545, 0.138326, 0.373677, 0.476356, 0.321285, 0.00954958, 0.613257, 0.600552, -0.252103, 0.510149, 0.684117, 0.555855, -1.80969, 0.627152, 0.740344, 0.241943, 0.508059, 0.440857, 0.520556, 0.823027, 0.166591, 0.767451, 0.653805, 0.672154, 0.950041, 0.0510874, 0.95411, 0.907404, 0.369957, 0.933575, 0.633375, 0.344531, 0.367081, -0.359028, 0.179055, 0.777654, 0.654169, 0.454086, 0.774564, -1.95174, 0.818822, 0.649018, 0.453198, 0.679084, -0.47925, 0.591236, -0.0590648, 0.535605, 0.425394, 0.132573, 0.506519, 0.367472, 0.0830878, -0.0411644, 0.747388, 0.930925, 0.552624, 0.777489, 0.927402, -0.72447, 0.94274, 0.758112, 0.611435, 0.818233, -0.169223, 0.737692, -0.418407, 0.761086, 0.378787, 0.755746, 0.759895, 0.423494, 0.840098, 0.176238, 0.530951, 0.148128, 0.928792, 0.690538, 0.832074, 1.03063, -0.110156, 1.00475, 0.909237, 0.450704, 0.917094, 0.541955, 0.455448, 0.525872, -0.159862, -1.11016, -0.747907, 0.147533, 0.497914, 0.316206, -0.666168, 0.164828, 0.586095, 0.25197, 0.615256, 0.788229, -0.133833, 0.727797, 0.656024, -0.0834081, 0.475803, -0.0647922, -0.940027, 0.352088, 0.233158, 0.545716, 0.778905, -0.360283, 0.974359, 0.961169, -0.174297, 0.870128, 0.483496, 0.690901, 0.664892, 0.50247, 0.846684, 0.133905, 0.794493, 0.79187, -0.187659, 0.763766, 0.658114, -2.27961, 0.448176, 0.392547, -0.457243, 0.344397, 0.622168, 0.642942, 0.382257, -0.205161, 0.478469, 0.558969, 0.30295, 0.0719217, 0.537954, 0.342171, 0.187615, 0.491043, -0.900186, 0.506419, 0.121735, 0.630157, 0.76936, -0.484674, 0.747379, 0.561137, 0.654499, 0.959354, 0.676226, 0.535875, 0.85198, 0.641222, -0.464836, 0.471166, 0.467758, 0.128123, -0.132617, 0.272863, 0.0728552, -1.92181, -0.42033, 0.260174, 0.232148, -0.81319, -0.17426, 0.168025, 0.48674, 0.147371, -0.0454053, -0.749496, 0.124325, 0.15253, 0.811419, 0.720213, 0.628204, 1.04691, 0.712053, 0.88553, 1.05849, 0.28102, 0.872988, 0.657633, 0.695036, 0.850224, -0.879971, 0.646978, -0.481387, 0.684709, 0.411231, 0.544183, 0.65617, -0.30232, 0.0670856, 0.0986875, 0.14406, 0.515226, 0.76293, -0.290909, 0.847332, 0.876044, 0.0558837, 0.549742, 0.371428, -0.30622, 0.101021, 0.275016, 0.547662, 0.355897, 0.547315, 0.854439, 0.371624, 0.72263, 0.66796, 0.567127, 0.830509, 0.158459, 0.970614, 0.603473, 0.948439, 1.08511, 0.248469, 0.890519, 0.683791, 0.553944, 0.648682, 0.124567, 0.419012, 0.414641, 0.606317, 0.498225, 0.955653, 0.573016, 0.818039, 0.909173, -0.279137, 0.838356, 0.520475, 0.473291, 0.314847, 0.619956, 0.805024, 0.267884, 0.51176, 0.596806, 0.243924, -0.257925, 0.439219, 0.58693, -0.0489864, 0.725691, 0.887223, 0.254037, 0.800733, 0.83, -0.298796, 0.751463, 0.50292, -0.0607049, -0.255039, 0.647277, 0.504307, 0.400111, 0.653427, -0.760871, 0.512077, -0.52047, 0.589291, 0.262516, 0.582075, 0.568861, 0.55712, 0.916577, 0.448197, 0.827565, 0.930712, -0.493378, 0.924613, 0.94363, 0.343381, 0.544357, 0.574803, -0.235095, 0.20159, -0.107182, 0.170324, 0.359894, -0.314225, 0.265561, 0.190332, 0.152303, 0.537868, 0.280467, 0.0645881, 0.291889, -0.513223, -0.065748, -0.0723143, 0.337636, 0.703384, 0.691935, 0.0189301, 0.887325, 0.851643, -0.141659, 0.82558, 0.616467, 0.462265, 0.751374, 0.287946, 0.38199, 0.369455, -0.0845961, 0.449637, 0.288841, -0.493335, 0.234461, -0.2507, 0.485308, 0.770438, 0.562677, 0.505563, 0.899869, 0.71098, 0.243556, 0.659384, 0.147503, 0.207662, -0.287703, -0.186247, 0.350042, 0.69719, 0.108884, 0.732122, 0.692976, 0.585417, 0.968511, 0.517674, 0.773349, 0.712768, 0.601646, 0.842768, 0.317288, 1.0401, 0.844549, 0.689305, 0.978983, 0.431964, 0.705187, 0.710834, 0.068806, -1.1518, -0.0423339, -0.163943, 0.454299, -0.386682, 0.688177, 0.738598, -0.861578, 0.653744, 0.410316, -0.0742933, -0.360312, 0.571909, 0.395172, 0.354594, 0.533734, -0.711256, 0.307574, -0.346788, -0.0335158, 0.62764, 0.869422, -0.114452, 0.946046, 0.859928, 0.745157, 1.10814, 0.601625, 0.98519, 1.02899, -0.75132, 0.81479, -0.0491672, 0.763478, 0.407888, 0.70787, 0.698724, 0.413543, 0.802912, 0.304118, 0.331511, -0.558183, 0.57759, -0.00957408, 0.661751, 0.582906, 0.50225, 0.820602, 0.10533, 0.799384, 0.878267, 0.435207, 0.314946, 0.574603, 0.52711, 0.0933885, 0.435488, 0.727875, 0.449832, 0.36399, 0.449762, 0.403895, 0.754042, -0.171707, 0.80632, 0.72888, 0.471039, 0.849449, 0.0363041, 0.847997, 0.853437, -0.249595, 0.539048, 0.257221, -1.35648, 0.196861, 0.302497, 0.399238, 0.863412, 0.715796, 0.374001, 0.804407, 0.37552, 0.57351, 0.609144, 0.0763632, 0.700262, 0.490595, 0.167635, 0.455699, -0.242208, 0.680567, 0.662476, -0.0943233, 0.799129, 0.750385, 0.169185, 0.903913, 0.857798, -0.312504, 0.650203, 0.53738, -1.04391, -0.268127, -0.0441175, -0.200196, 0.055299, -0.308836, 0.472761, 0.642047, -0.00989853, 0.479237, 0.351803, 0.224269, 0.416742, -0.115106, 0.465009, -0.586395, 0.724989, 0.772627, 0.00772416, 0.675257, 0.826577, 0.603522, 0.0775704, 0.706501, 0.585721, 0.371977, 0.868048, 0.695489, 0.415789, 0.778973, 0.0795035, 0.659926, 0.479155, 0.45048, 0.492865, 0.536274, 0.849048, 0.247234, 0.724516, 0.681461, -0.274202, -0.0194797, 0.596639, 0.638283, 0.492563, 0.895778, -0.011385, 0.985804, 0.962758, 0.439104, 1.02628, 0.681224, 0.768744, 0.893582, 0.106382, 0.478954, -0.135238, 0.252659, -0.534434, 0.517815, 0.451819, 0.0343981, 0.153345, 0.18603, 0.242026, 0.666554, 0.0662541, 0.768447, 0.835646, -0.385535, 0.807263, 0.553858, 0.46527, 0.595944, -0.350026, -0.768997, 0.510382, 0.189625, 0.79349, 0.979093, 0.248773, 0.873504, 0.709909, 0.727535, 0.906406, 0.175144, 0.958942, 0.445482, 0.950049, 0.96658, 0.37162, 0.997923, 0.616004, 0.771522, 0.860866, -0.0894897, 0.536971, 0.391183, 0.289127, 0.62864, 0.625061, -0.0497414, 0.720285, 0.475235, 0.415006, 0.60611, -0.184813, 0.208709, -2.00334, 0.258023, -0.0687295, -0.14665, -0.394335, -0.692848, -0.175252, -0.0735222, 0.168808, 0.387048, 0.375145, 0.947489, 0.877842, 0.420818, 1.01527, 0.783382, 0.674583, 0.93811, 0.373957, 0.631519, 0.46425, 0.391504, 0.506037, 0.0116606, 0.508508, -0.363839, 0.386888, -0.0514629, 0.424766, 0.534201, 0.174665, -0.162034, 0.287438, 0.296058, 0.0843841, 0.677595, 0.621278, 0.0163942, 0.806652, 0.823932, -0.00803188, 0.750484, 0.818033, -0.160932, 0.74416, 0.680126, 0.334023, 0.835132, 0.59135, 0.281172, 0.391246, 0.37879, 0.691263, -0.0930822, 0.676542, 0.677128, -0.949525, 0.562609, 0.510131, 0.24815, 0.10115, -0.718, 0.535391, 0.688039, 0.194985, 0.516127, 0.579186, -0.159253, 0.700445, 0.708648, 0.307635, 0.0825121, 0.493065, 0.473523, -0.495125, 0.453489, 0.402279, 0.145024, 0.477576, 0.22017, 0.832728, 0.534179, 0.824307, 1.03452, 0.422581, 0.889962, 0.839941, 0.520214, 0.944582, 0.545756, 0.498807, 0.313007, 0.332703, -0.543961, 0.720666, 0.612667, 0.649365, 0.937877, 0.29476, 0.802808, 0.684952, 0.469791, 0.628209, 0.517704, 0.919164, 0.497092, 0.699017, 0.72832, 0.116674, 0.754813, 0.584828, -0.965253, 0.307326, 0.565249, 0.653353, 0.00577398, 0.761963, 0.897081, 0.0545956, 0.827626, 0.759882, 0.162609, 0.531827, 0.432581, 0.823308, 0.160134, 0.727086, 0.519657, 0.623596, 0.733005, 0.086645, 0.676573, -0.664389, 0.6561, -0.447748, 0.861694, 0.555639, 0.901502, 1.0484, -0.580818, 1.09663, 1.01886, 0.219147, 0.877901, 0.255196, 0.70357, 0.569081, 0.246813, 0.443801, -0.179133, 0.353236, -0.573986, 0.100016, -0.271925, -0.540204, 0.153059, -0.142216, 0.441313, 0.631589, -0.740058, 0.752474, 0.826798, 0.444878, -0.0963832, 0.193683, 0.269684, 0.401994, -0.213015, 0.601321, 0.732214, -0.894894, 0.81718, 0.704582, 0.474918, 0.830947, 0.0633459, 0.761041, 0.623263, 0.511673, 0.730789, 0.207347, 0.952741, 0.875841, -0.162069, 0.799986, 0.681111, -2.86859, 0.437207, 0.399379, 0.114437, -0.896167, 0.0894284, 0.366136, 0.303766, -1.29013, 0.344239, 0.434928, -0.395099, 0.528227, 0.711822, 0.4502, 0.0227827, 0.187793, 0.280925, 0.557908, -0.133365, 0.822774, 0.746069, 0.472997, 0.957902, 0.688351, 0.677389, 0.926613, 0.462893, 0.600098, 0.660454, -0.425519, 0.424364, 0.454511, 0.432823, 0.468298, 0.217573, 0.00500981, 0.33339, -0.0373231, -1.48304, 0.0212153, 0.184524, -0.222729, 0.465807, 0.318585, -0.08792, 0.336413, 0.23709, 0.290405, 0.355482, -0.365961, 0.648408, 0.460359, 0.747156, 1.04528, 0.660724, 0.892124, 1.03383, -0.00557509, 0.898871, 0.630246, 0.708276, 0.753213, 0.488684, 0.872962, -0.149959, 0.862035, 0.743281, 0.266602, 0.539254, 0.187384, 0.567517, -0.550607, 0.373095, 0.408274, 0.844418, 0.339368, 0.862072, 0.962878, 0.079844, 0.79761, 0.726861, -1.62996, 0.351144, 0.153602, 0.182655, 0.329266, -0.39115, 0.207344, -0.27896, 0.662349, 0.527281, 0.49056, 0.710111, 0.296425, 0.933662, 0.551347, 0.911189, 1.04119, -0.0223509, 0.931701, 0.782219, 0.354664, 0.584601, -0.0231343, 0.134656, 0.678112, 0.845533, -0.694216, 0.853558, 0.489082, 0.819634, 0.891844, 0.127389, 0.886227, 0.447865, 0.70676, 0.601908, 0.629754, 0.882703, 0.163502, 0.784884, 0.807719, -0.0944798, 0.62475, 0.757494, 0.671354, 0.23138, 0.390216, 0.630933, 0.00152739, 0.601279, 0.639467, -0.44744, 0.576329, 0.302552, -0.0544955, -1.09722, 0.437947, 0.233293, 0.368063, 0.530124, -0.836757, 0.447942, 0.0414041, -0.237228, 0.408528, 0.822586, 0.596917, 0.661595, 0.939596, 0.394683, 0.834326, 0.89663, -0.575975, 0.885802, 0.817784, -0.706593, 0.649216, 0.458355, -0.028577, 0.360341, -0.18534, -0.0225696, -0.894837, 0.505175, 0.687672, 0.435282, 0.193495, 0.577411, 0.351761, -0.558871, -0.0954942, -0.612649, -0.0325234, 0.204387, -0.000858347, 0.735509, 0.72543, 0.212663, 0.904179, 0.723056, 0.627482, 0.971782, 0.666461, 0.445971, 0.547838, 0.180051, 0.586072, -1.3908, 0.64922, 0.602133, -1.50561, 0.44472, 0.394923, -0.340608, 0.342536, 0.640701, 0.548266, 0.0546029, 0.723083, 0.55115, 0.431766, 0.801958, 0.605659, -0.446979, -0.924585, -0.623511, 0.381777, 0.704833, 0.313418, 0.618221, 0.65354, 0.408834, 0.833128, 0.0180676, 0.822088, 0.587599, 0.819407, 0.972019, -0.048815, 1.01586, 0.725631, 0.902587, 1.08335, 0.449805, 0.825257, 0.768735, -0.815183, -0.214394, 0.377495, 0.146675, 0.514401, 0.560491, 0.307225, 0.741375, 0.221321, 0.521394, 0.267505, 0.5022, 0.553518, -0.0596471, 0.417985, 0.0519418, 0.640703, 0.402869, -0.0327928, 0.235412, 0.311222, 0.675702, 0.738715, -0.0664532, 0.943166, 0.839441, 0.664189, 1.05684, 0.621848, 0.850893, 0.842167, 0.537837, 0.932334, 0.227476, 0.76271, 0.409626, 0.749867, 0.751978, 0.443071, 0.875925, 0.485303, 0.336873, -0.377378, 0.515802, -0.304903, 0.760012, 0.70243, 0.582218, 0.989286, 0.697797, 0.623997, 0.825776, 0.0297122, 0.668413, 0.684621, 0.154888, 0.190168, 0.474857, 0.478698, 0.117779, -0.121963, -0.661141, 0.422611, 0.471084, 0.241181, 0.781151, 0.48824, 0.696146, 0.929742, 0.525724, 0.558623, 0.633746, -1.63204, 0.369352, -0.0802781, -1.69749, 0.195906, 0.112709, 0.522319, 0.854701, 0.615587, 0.501362, 0.784802, 0.191193, 0.599529, 0.551972, 0.0566971, 0.469497, -0.0177145, 0.755515, 0.70996, -0.101573, 0.785663, 0.72142, 0.013377, 0.794162, 0.649937, 0.450705, 0.901217, 0.750656, -0.0433691, 0.620147, 0.306881, -0.181532, -0.852011, -0.0807373, 0.179274, 0.676782, 0.549152, 0.15005, 0.535417, -1.27997, 0.487981, -0.775154, 0.674474, 0.578289, 0.393017, 0.710133, -0.473092, 0.858873, 0.82693, -0.259989, 0.798156, 0.735422, -0.31587, 0.597384, 0.76107, 0.643466, -0.846319, 0.593133, 0.535191, 0.0358035, 0.509788, -0.211872, 0.70479, 0.484364, 0.473173, 0.582813, 0.376366, 0.822143, 0.393433, 0.607436, 0.572773, 0.16916, 0.368618, 0.282188, 0.279041, 0.7437, 0.984416, 0.131305, 1.03206, 1.02832, 0.281053, 1.00412, 0.543429, 0.878706, 0.89255, 0.130104, 0.765493, -0.407073, 0.721263, 0.443541, 0.481836, 0.544256, -0.209023, 0.414121, 0.173623, 0.274121, 0.568424, 0.164642, 0.713512, 0.914633, 0.462325, 0.626248, 0.64387, -0.0629591, 0.527691, 0.106535, -0.502918, 0.369742, 0.269494, 0.501034, 0.734568, -0.275479, 0.875551, 0.700008, 0.597577, 0.776101, 0.374239, 0.899344, -0.448655, 1.0524, 1.02355, 0.389679, 1.03763, 0.687088, 0.771743, 0.871113, -0.214081, 0.506704, -0.42076, 0.253746, 0.0114533, 0.498783, -0.152652, 0.763288, 0.641462, 0.34238, 0.74188, 0.404212, -0.0385467, -0.637816, 0.510949, 0.464685, -0.206492, 0.49555, 0.398259, -2.79214, 0.455633, 0.677617, 0.52657, 0.307848, 0.822737, 0.616712, 0.626296, 0.94814, 0.560706, 0.740316, 0.899395, 0.377452, 0.376336, -0.274578, 0.524518, 0.372233, 0.356776, 0.577315, -0.578367, 0.49623, 0.391172, -0.901458, -1.38277, 0.0372799, -0.740143, 0.379578, 0.41806, 0.0125721, 0.66164, 0.504109, 0.463888, 0.912274, 0.860691, -0.336249, 0.783927, 0.78261, -0.604031, 0.750365, 0.593023, 0.339857, 0.624848, -0.110229, 0.760641, 0.515704, 0.584499, 0.786166, -0.155495, 0.677181, 0.502536, 0.393232, 0.678828, 0.439589, 0.164445, 0.372027, 0.0318112, 0.583274, 0.806088, 0.217, 0.762613, 0.847548, 0.0370927, 0.625654, 0.516215, -0.120632, 0.335204, -0.352248, 0.0908928, 0.237586, 0.278105, 0.117587, -0.354946, -0.143782, 0.440386, 0.776716, 0.366114, 0.811362, 0.97893, 0.0765281, 0.963739, 0.944545, -0.00684113, 0.825166, 0.352993, 0.507761, -0.116819, 0.657151, 0.442083, 0.5797, 0.576043, 0.654531, 0.950372, 0.305673, 0.821907, 0.66001, 0.643072, 0.764787, 0.486565, 0.940871, 0.227627, 0.959505, 0.966974, -0.0518266, 0.917521, 0.770999, -1.94649, 0.28695, -0.0283327, -0.165068, -1.00736, 0.537479, 0.744499, 0.256413, 0.621873, 0.646934, 0.0106997, 0.549162, -0.205231, 0.609798, -0.90817, 0.7719, 0.666585, 0.409116, 0.752497, 0.243584, -0.00985711, 0.371665, 0.675807, -0.227058, 0.8434, 0.498883, 0.898559, 1.03374, -0.630812, 1.06159, 0.927747, 0.615041, 0.975431, 0.376319, 0.714424, 0.479152, 0.553922, 0.573657, 0.423649, 0.814372, 0.570097, -0.263319, 0.103557, -0.62878, -0.235021, -0.0832775, 0.168243, 0.593852, 0.355041, 0.413147, 0.711284, 0.442006, 0.174883, 0.587523, 0.576381, 0.27011, 0.260351, 0.74679, 0.739881, -0.17622, 0.536998, 0.138675, 0.597762, 0.642189, 0.229108, 0.781337, 0.293073, 0.749731, 0.808135, 0.0216142, 0.876126, 0.725902, 0.345395, 0.800729, 0.584701, -0.0204798, 0.550254, 0.580177, 0.534316, 0.403347, -0.297496, 0.245755, 0.373189, -0.144274, 0.214832, 0.390182, -0.11304, 0.272294, 0.385254, -0.7159, 0.44765, 0.0995882, 0.513743, 0.63123, 0.0884368, 0.827767, 0.545462, 0.82294, 1.07433, 0.715544, 0.754421, 0.91925, 0.176692, 0.655947, 0.488542, 0.0906465, 0.17524, 0.0414237, -0.0138096, 0.282969, 0.379303, -0.14027, 0.394553, -1.18047, 0.406725, 0.141028, -0.0719916, -0.165857, 0.6617, 0.699965, -0.243827, 0.578794, 0.628683, 0.362411, -0.738178, 0.412144, 0.717485, 0.538104, 0.561928, 0.92758, 0.544535, 0.796055, 0.893623, 0.196811, 0.96844, 0.689706, 0.647815, 0.64582, 0.683464, 0.946067, -0.173007, 0.934133, 0.819984, 0.364835, 0.704019, -1.17515, 0.395391, 0.327355, 0.668223, 0.231397, 0.944158, 0.715309, 0.736031, 0.93279, -0.577856, 0.963376, 0.867885, -0.129836, 0.613934, 0.0302645, 0.0723308, -0.238165, 0.333387, -0.0616117, -0.477378, -0.542769, -0.361637, 0.545808, 0.541305, 0.475923, 0.947547, 0.709729, 0.679959, 0.896831, -0.976425, 0.916068, 0.790138, 0.154137, 0.526291, -0.194697, 0.0498846, 0.623712, 0.780112, -0.0239837, 0.892039, 0.628229, 0.695575, 0.810643, 0.170504, 0.787554, -0.393997, 0.951175, 0.825953, 0.580144, 0.925145, 0.132628, 0.883281, 0.880518, -1.47531, 0.770705, 0.746778, 0.348388, -0.231002, 0.400049, 0.522691, 0.236811, 0.185976, 0.490331, 0.224376, -0.723323, 0.0300645, 0.37944, 0.122952, -0.0598664, -0.0540478, 0.00835992, 0.168346, -0.91599, -0.173487, -0.164791, -0.570846, 0.562978, 0.779352, 0.129473, 0.831086, 0.927871, -0.296565, 0.928495, 0.935078, -0.00884992, 0.671872, 0.444208, 0.396862, 0.610524, -0.0447598, 0.382463, 0.340233, -0.290876, 0.317425, -0.300021, 0.435011, 0.613814, 0.249022, 0.343107, 0.579985, 0.248912, 0.0389112, 0.351658, 0.43965, 0.624865, 0.644025, -0.860928, 0.762946, 0.767279, 0.221679, 0.899735, 0.633046, 0.719547, 0.926273, 0.179354, 0.749826, 0.541894, 0.580171, 0.717528, 0.0241307, 0.759719, 0.372703, 0.644373, 0.821427, 0.568134, -0.379452, 0.116338, 0.474223, 0.585917, 0.0737784, 0.545519, 0.643738, -0.511507, 0.685761, 0.590588, -1.40346, 0.143717, -0.580296, -0.178221, 0.331129, -0.667761, 0.658339, 0.729171, -0.950752, 0.536156, -0.113669, 0.779558, 0.278317, 0.918702, 0.994353, 0.21205, 1.0688, 0.807062, 0.872676, 1.06279, 0.235813, 0.871912, 0.670276, 0.484017, 0.565852, 0.103158, 0.109355, 0.676483, 0.827086, -0.747625, 0.775918, 0.536781, 0.41206, 0.328652, 0.566474, 0.688803, 0.0896268, 0.765197, 0.352786, 0.637853, 0.745497, 0.188408, 0.227186, 0.327775, 0.319895, 0.0409469, 0.529882, 0.913562, 0.760421, 0.580845, 0.979211, 0.599323, 0.700819, 0.678749, 0.561886, 0.84117, -0.556018, 0.857547, 0.516336, 0.76698, 0.85372, -0.489968, 0.695425, -0.0275084, 0.590286, 0.259535, 0.365666, -0.983559, 0.796328, 0.72026, 0.653865, 1.05028, 0.77505, 0.677145, 0.903808, 0.203548, 0.694633, 0.636504, -0.436512, 0.375284, -0.478337, 0.349334, 0.437977, 0.134017, -0.110295, 0.317736, -0.204367, 0.495987, 0.687194, -0.00334468, 0.74144, 0.879925, 0.476836, 0.433456, 0.58319, 0.146971, -0.818893, -0.512814, 0.254369, 0.616963, 0.510695, 0.164855, 0.634316, -0.00424182, 0.65533, 0.686242, -0.294659, 0.651866, 0.359024, 0.346086, 0.340782, 0.456679, 0.822034, 0.607781, 0.452251, 0.86059, 0.675566, 0.40968, 0.894223, 0.784585, -0.249291, 0.688645, 0.426048, 0.365964, 0.546646, -0.477325, 0.253792, -0.913136, 0.0812496, 0.229223, 0.722387, 0.546277, 0.317666, 0.579286, -0.304534, 0.543531, -0.628949, 0.689915, 0.214588, 0.850949, 0.976031, -0.00780897, 0.919646, 0.860551, 0.230095, 0.841778, 0.545348, 0.410385, 0.671462, 0.532689, 0.303104, -0.251549, 0.233298, 0.406988, -0.808494, 0.360009, -0.0721096, 0.300696, -0.421631, 0.690336, 0.78039, -1.68105, 0.765448, 0.609526, 0.187794, 0.388217, 0.0963738, 0.282954, 0.229353, 0.206404, 0.714341, 0.948719, 0.00509596, 1.01001, 0.96947, 0.577407, 1.0775, 0.688949, 0.797883, 0.747843, 0.655533, 0.900412, -0.146356, 0.950323, 0.750306, 0.501008, 0.707141, -0.398936, 0.58572, 0.246506, -0.704727, 0.375977, 0.449797, 0.349151, 0.817921, 0.462602, 0.715731, 0.890688, 0.435976, 0.373686, 0.379081, -0.0754351, 0.211948, 0.356302, -0.798837, 0.323817, -0.139231, 0.656684, 0.365967, 0.572356, 0.58133, 0.591931, 0.912498, -0.101799, 0.975144, 0.89269, 0.689634, 1.09653, 0.759063, 0.742871, 0.873843, 0.0416449, 0.320167, 0.178323, 0.586977, -1.18811, 0.603556, 0.0278929, 0.679282, 0.670861, 0.113273, 0.64969, -0.151686, 0.580589, 0.387524, 0.356339, 0.485687, 0.168887, 0.740106, 0.605669, 0.207691, 0.816155, 0.854143, 0.472078, 0.497023, 0.78243, 0.41049, 0.612377, 0.816146, 0.295696, 0.578274, 0.567877, 0.0609732, 0.553863, -0.109419, 0.3429, -0.228521, 0.478527, 0.474821, -0.0533846, 0.572676, 0.504115, 0.284675, 0.333238, 0.261299, 0.0943808, 0.64831, 0.505649, 0.365171, 0.808914, 0.659064, 0.190383, 0.764942, 0.616428, 0.267282, 0.798881, 0.662918, 0.22912, 0.769446, 0.539766, 0.26161, 0.351938, 0.526886, 0.847606, 0.370942, 0.764292, 0.849994, -0.876959, 0.807101, 0.662345, -0.0275962, 0.332087, -0.276906, -0.26032, 0.431407, 0.398293, 0.512669, 0.819765, -0.0692859, 0.909288, 0.953845, -0.0194278, 0.723971, 0.449359, 0.446413, 0.474238, 0.175658, 0.532956, -0.403636, 0.478796, 0.521569, 0.263308, -1.50423, 0.425319, 0.67803, 0.345112, 0.636899, 0.83406, -1.3636, 0.953466, 0.95053, -1.27942, 0.762794, 0.363036, 0.443807, -0.0925364, 0.597082, 0.276838, 0.722257, 0.797027, 0.166085, 0.814186, 0.0372, 0.782191, 0.445, 0.832083, 0.88622, 0.424148, 0.963671, 0.100696, 1.04194, 1.03409, 0.205397, 1.01035, 0.786114, 0.397437, 0.666187, 0.158534, -0.491684, 0.264435, -0.0497155, 0.402651, 0.464712, -0.22261, 0.302372, 0.160151, 0.615922, 0.108612, 0.416178, -0.0995463, 0.647796, 0.695818, -0.361791, 0.633713, 0.395073, -0.796443, -0.148548, 0.0176046, 0.558519, 0.892411, 0.462023, 0.889103, 1.02287, -0.0591644, 0.938055, 0.719655, 0.777573, 0.971735, 0.0416855, 0.794876, 0.435904, 0.710869, 0.725158, 0.344418, 0.827973, 0.468168, 0.475234, 0.609766, 0.237345, -0.115848, -0.0539677, 0.147097, 0.713644, 0.731816, -0.145501, 0.583212, 0.522779, 0.0384614, 0.661634, 0.631233, -0.0149059, 0.443959, 0.62741, 0.294528, 0.326838, 0.543364, -0.489967, 0.481054, 0.0791528, 0.600683, 0.678551, 0.269746, 0.945004, 0.876768, -0.180737, 0.797556, 0.584455, 0.347447, 0.677747, 0.419042, -0.628983, 0.14448, 0.261229, 0.349645, 0.150638, 0.0308156, 0.50019, 0.431742, -0.864379, 0.355423, 0.465533, 0.292228, -0.117403, -0.0423912, 0.381061, 0.434707, -0.315672, 0.682415, 0.626593, 0.433394, 0.923394, 0.647626, 0.776306, 1.01277, 0.421369, 0.884512, 0.909604, -0.381606, 0.782296, 0.490895, 0.101543, -0.260588, 0.690427, 0.576988, 0.288292, 0.600694, -1.45289, 0.465105, -0.647823, 0.47085, -0.294178, 0.612961, 0.470289, 0.543592, 0.805832, 0.170392, 0.692383, 0.723742, -0.311603, 0.577919, 0.728099, 0.72606, 0.486344, 0.334709, 0.780743, 0.474371, 0.620623, 0.750077, 0.131631, 0.829999, 0.285865, 0.81729, 0.755142, 0.627413, 0.95661, 0.193108, 0.874484, 0.732418, 0.596164, 0.849127, 0.226196, 0.126829, 0.482001, 0.740272, 0.203604, 0.992618, 0.798698, 0.768242, 1.01861, 0.157957, 0.920165, 0.78027, 0.527735, 0.781088, -0.37857, 0.740386, 0.431854, 0.349521, 0.306626, 0.244758, 0.553961, 0.475894, 0.414577, 0.113634, 0.508135, 0.862151, 0.637118, 0.606771, 0.897358, 0.383074, 0.676423, 0.657265, -0.206261, 0.278468, 0.222352, 0.418221, 0.152178, 0.490136, 0.347294, 0.868985, 0.594765, 0.598246, 0.689426, 0.3212, 0.726143, 0.210958, 0.960996, 0.713978, 0.816226, 1.03905, 0.364843, 0.918938, 0.938882, -0.146447, 0.673978, 0.449224, 0.175723, 0.46778, 0.338926, 0.274891, 0.230325, -0.80557, 0.256809, 0.347084, 0.124164, -0.118519, -0.207603, -0.714502, 0.157621, 0.227964, -0.133548, -0.353406, 0.252373, 0.568429, 0.6475, 0.133793, 0.593886, 0.711016, -0.105293, 0.892914, 0.85034, 0.171605, 0.921187, 0.793868, 0.0355211, 0.661731, 0.226733, 0.320186, 0.230131, 0.122027, 0.366537, -0.789752, 0.545945, 0.66711, 0.436875, -0.177467, 0.446645, 0.249174, 0.122893, 0.503218, 0.307805, -0.43193, 0.239039, 0.398968, 0.570086, 0.5182, 0.102498, 0.828152, 0.762612, 0.406039, 0.953452, 0.723155, 0.551467, 0.719182, 0.397051, 0.907633, 0.436431, 0.813653, 0.827342, 0.352571, 0.891759, 0.431407, 0.741353, 0.818726, 0.15647, 0.285746, 0.11948, 0.113217, 0.481425, 0.233867, 0.605046, 0.883745, 0.596123, 0.400594, 0.574623, -0.777948, 0.384547, -0.359322, 0.13342, -0.715595, -0.19759, 0.11638, 0.398163, -1.40377, 0.286278, 0.0595673, 0.680131, 0.0347199, 0.848423, 0.852183, 0.643916, 1.14169, 0.910894, 0.777241, 1.02215, 0.117184, 0.848741, 0.527203, 0.67454, 0.629838, 0.445302, 0.597976, 0.483978, 0.833781, -0.0779951, 0.773654, 0.51698, 0.622189, 0.672181, 0.283909, 0.614306, 0.462477, 0.964123, 0.698884, 0.698345, 0.940917, 0.536672, 0.45037, 0.592133, 0.247582, -0.577273, 0.402436, 0.673624, 0.510709, 0.383413, 0.756186, 0.147763, 0.72019, 0.698078, 0.160694, 0.571303, 0.36602, 0.881827, 0.508184, 0.766778, 0.890851, 0.0905971, 0.564113, 0.101806, 0.316704, -0.87892, 0.523799, -1.25006, 0.832212, 0.794506, 0.476803, 0.959897, 0.527438, 0.863662, 0.985485, 0.289501, 0.709057, 0.568572, 0.25235, 0.449484, 0.197106, 0.712511, 0.562424, -0.036186, 0.604755, 0.52378, -0.451383, 0.627113, 0.699658, 0.21529, 0.438846, 0.564918, -0.313125, 0.479175, 0.569918, 0.401604, 0.133673, -0.452593, 0.542073, 0.738502, 0.471552, 0.348853, 0.599821, -0.829761, 0.57642, 0.330522, 0.411436, 0.499266, 0.297679, 0.796406, 0.583458, 0.419203, 0.745838, 0.259389, 0.645736, 0.834648, 0.498043, 0.544991, 0.879972, 0.754731, -0.727606, 0.615851, 0.41888, 0.102901, 0.31743, -0.388751, 0.0648908, 0.277198, 0.613284, 0.139293, 0.421703, 0.231432, 0.451031, 0.536092, 0.161469, 0.605709, -0.182504, 0.738416, 0.00812543, 0.946832, 1.01785, -0.455228, 1.03042, 0.904408, 0.5234, 0.946007, 0.576166, 0.405185, 0.309692, 0.247544, 0.299576, -0.220766, -0.0738265, 0.0745445, 0.00975712, 0.185665, 0.291881, -0.373551, -0.295998, 0.54817, 0.753827, 0.0345199, 0.723617, 0.72461, -0.431299, 0.588919, 0.409154, 0.215937, 0.537615, 0.410023, 0.562274, 0.868656, 0.0744162, 0.912685, 0.84679, 0.671412, 1.05432, 0.565605, 0.847151, 0.725738, 0.749024, 0.942201, 0.0651597, 0.998363, 0.71572, 0.788875, 0.958476, 0.34187, 0.473054, -0.0472786, 0.123204, 0.280599, 0.686762, -0.0966843, 0.73644, 0.61349, 0.61433, 0.924502, 0.551009, 0.515064, 0.598243, -0.560277, 0.124916, -0.880259, -1.02825, 0.233524, 0.259694, -0.311349, 0.0552857, 0.481285, -0.0987135, 0.759962, 0.907824, -0.111488, 0.911539, 0.813074, 0.656314, 1.03402, 0.662625, 0.709218, 0.78454, -0.484618, 0.526436, -1.03083, 0.33189, 0.307145, 0.784901, 0.464502, 0.573194, 0.684642, -1.00644, 0.416845, 0.14025, 0.734059, 0.415095, 0.581176, 0.694982, 0.0575445, 0.846278, 0.753346, 0.116566, 0.819012, 0.731822, -0.131194, 0.80162, 0.828191, 0.257788, 0.568669, 0.667456, 0.0601601, 0.176779, -0.60002, 0.532833, 0.456216, 0.0166007, 0.463574, -0.555909, 0.473472, 0.420587, -1.30322, -0.0568032, -1.29968, -0.375723, 0.283334, -0.0771702, 0.561388, 0.805146, 0.426979, 0.677376, 0.924399, 0.692193, 0.16716, 0.653572, 0.360651, 0.315583, 0.627224, 0.353731, 0.257507, 0.52332, -1.72326, 0.636899, 0.544553, 0.396594, 0.76514, -0.0331221, 0.826624, 0.836577, 0.133473, 0.900248, 0.765723, -1.17493, 0.00409274, 0.183936, -0.302362, 0.606353, 0.587137, 0.537609, 0.92301, 0.453479, 0.815847, 0.838156, 0.351205, 0.900633, 0.434603, 0.711316, 0.647976, 0.42106, 0.689241, 0.0397088, 0.851028, 0.785562, -0.0321724, 0.388472, 0.511629, 0.513131, 0.104205, 0.56198, 0.830461, 0.449558, 0.661882, 0.777828, -0.435781, 0.730055, 0.384937, 0.456987, 0.340248, 0.296487, -0.0539173, 0.720591, 0.82437, -1.2821, 0.70458, 0.04982, 0.673584, 0.209472, 0.816625, 0.764419, 0.75407, 1.09162, 0.528357, 1.01406, 1.02904, 0.320083, 1.01934, 0.658425, 0.751942, 0.840778, 0.0375218, 0.0656604, 0.343412, 0.533609, -0.104156, 0.606534, 0.201887, 0.305227, 0.0694922, 0.146684, -0.921517, 0.612555, 0.561112, 0.294693, 0.745365, 0.457303, 0.212582, 0.371924, -0.401557, -0.193799, 0.213972, 0.675755, 0.806076, 0.11998, 0.84989, 0.918801, -0.360872, 0.917091, 0.700617, 0.608634, 0.753876, 0.338683, 0.869764, 0.245141, 0.85799, 0.869926, -0.197241, 0.75172, 0.304448, 0.584287, 0.654383, 0.18973, -0.326281, 0.0912504, -0.371388, 0.63859, 0.699219, -0.870147, 0.776908, 0.786298, -0.144334, 0.629631, 0.643275, -0.0623259, 0.299209, 0.102084, 0.325964, 0.634884, 0.370445, 0.304871, 0.519093, -0.00575512, 0.772789, 0.645406, 0.498765, 0.915139, 0.660463, 0.559805, 0.864596, 0.581979, 0.131636, 0.487089, 0.364903, 0.332985, 0.350799, -0.180145, 0.163029, 0.018714, 0.247541, 0.519998, 0.205238, 0.0042249, 0.188811, -0.543722, -0.313433, -0.866489, 0.0893891, 0.195753, -0.692002, 0.464992, 0.715082, 0.386937, 0.71717, 1.01477, 0.766599, 0.656174, 0.93705, 0.154657, 0.880397, 0.826897, 0.28555, 0.775579, -0.0552025, 0.620516, 0.054791, 0.669109, 0.533723, 0.541658, 0.753004, -0.848759, 0.638242, 0.222293, 0.296567, 0.124294, 0.872068, 0.765776, 0.551897, 0.945055, 0.467802, 0.79078, 0.860256, -0.225818, 0.665187, 0.602036, 0.0946038, -0.456133, 0.285609, 0.54917, 0.282416, 0.459575, 0.681678, -0.116936, 0.450806, -0.0210972, 0.86976, 0.758982, 0.608269, 0.967049, 0.408655, 0.829221, 0.790982, 0.264403, 0.687079, -1.17176, 0.411679, 0.317133, 0.718002, 0.00488928, 0.940961, 0.690731, 0.883866, 1.09454, 0.470199, 0.871279, 0.694908, 0.696516, 0.831964, 0.301275, 0.916544, 0.515369, 0.729944, 0.800263, -1.01062, 0.632975, 0.516083, -0.00437051, -1.172, 0.165843, 0.549969, 0.287769, 0.613259, 0.905111, 0.66348, 0.295687, 0.591341, -0.0424304, -0.14856, 0.0533341, 0.221976, 0.150102, 0.506038, -1.62626, 0.55356, 0.162245, 0.495276, 0.302031, 0.635494, 0.774496, 0.0830072, 0.873868, 0.406758, 0.938289, 1.0653, 0.2762, 0.944912, 0.933436, -0.843751, 0.703547, 0.421184, 0.137566, 0.122958, -0.0708744, -0.117809, 0.132811 - }; + 0.714949, 0.951788, 1.03258, -0.264461, 0.773594, 0.087873, 0.689937, 0.412287, 0.534571, 0.508458, 0.318557, 0.514549, 0.185614, 0.650382, 0.152264, 0.206577, -0.0752595, 0.630915, 0.232411, 0.652501, 0.757331, -1.84126, 0.745318, 0.749299, 0.406161, -0.590362, 0.24843, 0.627197, 0.561609, 0.280949, 0.801749, 0.381142, 0.798029, 0.915394, -0.403829, 0.80297, 0.408834, 0.755338, 0.749657, 0.507717, 0.906417, 0.209184, 0.881856, 0.905243, -0.0787691, 0.573369, 0.291409, -1.16869, 0.272366, 0.526006, -0.802188, 0.658759, 0.430174, 0.633957, 0.886595, 0.48245, 0.608569, 0.751796, 0.0586362, 0.537583, 0.559538, -0.181543, 0.118636, -1.72014, 0.480706, 0.595706, -0.566717, 0.741443, 0.863559, 0.337851, 0.688943, 0.772979, -0.678972, 0.792725, 0.741723, -0.695925, 0.485671, 0.318308, -0.461439, -0.764598, -0.36273, 0.465957, 0.64865, 0.305411, 0.346938, 0.543578, 0.0718224, -0.255732, -0.0351218, 0.489783, 0.361936, 0.0119309, 0.502519, 0.232963, 0.353079, 0.721244, 0.611824, 0.150211, 0.820699, 0.723887, 0.4556, 0.980136, 0.824632, 0.459735, 0.897198, 0.526377, 0.458688, 0.221056, 0.625353, 0.682684, 0.160291, 0.719873, -0.0611519, 0.691396, 0.545766, 0.322354, 0.40887, 0.401109, 0.587328, 0.295325, 0.771583, -0.875408, 0.93311, 0.876312, 0.529322, 1.04176, 0.848597, 0.249073, 0.683192, 0.167537, 0.161921, 0.0859662, -0.0745666, 0.153848, -0.278869, 0.179598, -0.149061, 0.463029, 0.522005, 0.246625, 0.719286, -0.27002, 0.831045, 0.749611, 0.595434, 0.987551, 0.691487, 0.384728, 0.396993, 0.186614, -0.376099, 0.656718, 0.497414, 0.751402, 0.971331, -0.129554, 0.966333, 0.796964, 0.763662, 0.987998, -0.907226, 0.945801, 0.665702, 0.733396, 0.768022, 0.606007, 1.01123, 0.689442, 0.605321, 0.776157, 0.279191, -0.0539593, 0.0145994, 0.375495, 0.645995, 0.391273, 0.48956, 0.717541, -0.107519, 0.615807, 0.491308, 0.146762, 0.465154, 0.0856006, 0.0667651, 0.519771, 0.465709, -0.0147226, 0.451968, -0.99543, 0.364672, 0.0191759, 0.680191, -0.0983725, 0.893765, 0.946702, 0.146364, 1.03277, 0.858541, 0.650865, 0.961686, 0.269571, 0.835, 0.82532, -0.134489, 0.240045, -0.0745957, 0.333947, -0.103414, 0.543206, 0.258576, 0.251024, 0.427391, -0.0117196, -0.616652, 0.134444, 0.178163, 0.00543924, 0.594987, 0.595814, -0.197307, 0.486005, 0.543361, -0.230964, 0.788464, 0.872763, 0.267856, 0.773649, 0.886916, 0.162868, 0.738345, 0.723415, -0.393616, 0.521566, -1.14818, 0.56991, 0.298352, 0.511469, 0.73068, 0.386214, 0.107241, 0.276174, -0.709545, 0.138326, 0.373677, 0.476356, 0.321285, 0.00954958, 0.613257, 0.600552, -0.252103, 0.510149, 0.684117, 0.555855, -1.80969, 0.627152, 0.740344, 0.241943, 0.508059, 0.440857, 0.520556, 0.823027, 0.166591, 0.767451, 0.653805, 0.672154, 0.950041, 0.0510874, 0.95411, 0.907404, 0.369957, 0.933575, 0.633375, 0.344531, 0.367081, -0.359028, 0.179055, 0.777654, 0.654169, 0.454086, 0.774564, -1.95174, 0.818822, 0.649018, 0.453198, 0.679084, -0.47925, 0.591236, -0.0590648, 0.535605, 0.425394, 0.132573, 0.506519, 0.367472, 0.0830878, -0.0411644, 0.747388, 0.930925, 0.552624, 0.777489, 0.927402, -0.72447, 0.94274, 0.758112, 0.611435, 0.818233, -0.169223, 0.737692, -0.418407, 0.761086, 0.378787, 0.755746, 0.759895, 0.423494, 0.840098, 0.176238, 0.530951, 0.148128, 0.928792, 0.690538, 0.832074, 1.03063, -0.110156, 1.00475, 0.909237, 0.450704, 0.917094, 0.541955, 0.455448, 0.525872, -0.159862, -1.11016, -0.747907, 0.147533, 0.497914, 0.316206, -0.666168, 0.164828, 0.586095, 0.25197, 0.615256, 0.788229, -0.133833, 0.727797, 0.656024, -0.0834081, 0.475803, -0.0647922, -0.940027, 0.352088, 0.233158, 0.545716, 0.778905, -0.360283, 0.974359, 0.961169, -0.174297, 0.870128, 0.483496, 0.690901, 0.664892, 0.50247, 0.846684, 0.133905, 0.794493, 0.79187, -0.187659, 0.763766, 0.658114, -2.27961, 0.448176, 0.392547, -0.457243, 0.344397, 0.622168, 0.642942, 0.382257, -0.205161, 0.478469, 0.558969, 0.30295, 0.0719217, 0.537954, 0.342171, 0.187615, 0.491043, -0.900186, 0.506419, 0.121735, 0.630157, 0.76936, -0.484674, 0.747379, 0.561137, 0.654499, 0.959354, 0.676226, 0.535875, 0.85198, 0.641222, -0.464836, 0.471166, 0.467758, 0.128123, -0.132617, 0.272863, 0.0728552, -1.92181, -0.42033, 0.260174, 0.232148, -0.81319, -0.17426, 0.168025, 0.48674, 0.147371, -0.0454053, -0.749496, 0.124325, 0.15253, 0.811419, 0.720213, 0.628204, 1.04691, 0.712053, 0.88553, 1.05849, 0.28102, 0.872988, 0.657633, 0.695036, 0.850224, -0.879971, 0.646978, -0.481387, 0.684709, 0.411231, 0.544183, 0.65617, -0.30232, 0.0670856, 0.0986875, 0.14406, 0.515226, 0.76293, -0.290909, 0.847332, 0.876044, 0.0558837, 0.549742, 0.371428, -0.30622, 0.101021, 0.275016, 0.547662, 0.355897, 0.547315, 0.854439, 0.371624, 0.72263, 0.66796, 0.567127, 0.830509, 0.158459, 0.970614, 0.603473, 0.948439, 1.08511, 0.248469, 0.890519, 0.683791, 0.553944, 0.648682, 0.124567, 0.419012, 0.414641, 0.606317, 0.498225, 0.955653, 0.573016, 0.818039, 0.909173, -0.279137, 0.838356, 0.520475, 0.473291, 0.314847, 0.619956, 0.805024, 0.267884, 0.51176, 0.596806, 0.243924, -0.257925, 0.439219, 0.58693, -0.0489864, 0.725691, 0.887223, 0.254037, 0.800733, 0.83, -0.298796, 0.751463, 0.50292, -0.0607049, -0.255039, 0.647277, 0.504307, 0.400111, 0.653427, -0.760871, 0.512077, -0.52047, 0.589291, 0.262516, 0.582075, 0.568861, 0.55712, 0.916577, 0.448197, 0.827565, 0.930712, -0.493378, 0.924613, 0.94363, 0.343381, 0.544357, 0.574803, -0.235095, 0.20159, -0.107182, 0.170324, 0.359894, -0.314225, 0.265561, 0.190332, 0.152303, 0.537868, 0.280467, 0.0645881, 0.291889, -0.513223, -0.065748, -0.0723143, 0.337636, 0.703384, 0.691935, 0.0189301, 0.887325, 0.851643, -0.141659, 0.82558, 0.616467, 0.462265, 0.751374, 0.287946, 0.38199, 0.369455, -0.0845961, 0.449637, 0.288841, -0.493335, 0.234461, -0.2507, 0.485308, 0.770438, 0.562677, 0.505563, 0.899869, 0.71098, 0.243556, 0.659384, 0.147503, 0.207662, -0.287703, -0.186247, 0.350042, 0.69719, 0.108884, 0.732122, 0.692976, 0.585417, 0.968511, 0.517674, 0.773349, 0.712768, 0.601646, 0.842768, 0.317288, 1.0401, 0.844549, 0.689305, 0.978983, 0.431964, 0.705187, 0.710834, 0.068806, -1.1518, -0.0423339, -0.163943, 0.454299, -0.386682, 0.688177, 0.738598, -0.861578, 0.653744, 0.410316, -0.0742933, -0.360312, 0.571909, 0.395172, 0.354594, 0.533734, -0.711256, 0.307574, -0.346788, -0.0335158, 0.62764, 0.869422, -0.114452, 0.946046, 0.859928, 0.745157, 1.10814, 0.601625, 0.98519, 1.02899, -0.75132, 0.81479, -0.0491672, 0.763478, 0.407888, 0.70787, 0.698724, 0.413543, 0.802912, 0.304118, 0.331511, -0.558183, 0.57759, -0.00957408, 0.661751, 0.582906, 0.50225, 0.820602, 0.10533, 0.799384, 0.878267, 0.435207, 0.314946, 0.574603, 0.52711, 0.0933885, 0.435488, 0.727875, 0.449832, 0.36399, 0.449762, 0.403895, 0.754042, -0.171707, 0.80632, 0.72888, 0.471039, 0.849449, 0.0363041, 0.847997, 0.853437, -0.249595, 0.539048, 0.257221, -1.35648, 0.196861, 0.302497, 0.399238, 0.863412, 0.715796, 0.374001, 0.804407, 0.37552, 0.57351, 0.609144, 0.0763632, 0.700262, 0.490595, 0.167635, 0.455699, -0.242208, 0.680567, 0.662476, -0.0943233, 0.799129, 0.750385, 0.169185, 0.903913, 0.857798, -0.312504, 0.650203, 0.53738, -1.04391, -0.268127, -0.0441175, -0.200196, 0.055299, -0.308836, 0.472761, 0.642047, -0.00989853, 0.479237, 0.351803, 0.224269, 0.416742, -0.115106, 0.465009, -0.586395, 0.724989, 0.772627, 0.00772416, 0.675257, 0.826577, 0.603522, 0.0775704, 0.706501, 0.585721, 0.371977, 0.868048, 0.695489, 0.415789, 0.778973, 0.0795035, 0.659926, 0.479155, 0.45048, 0.492865, 0.536274, 0.849048, 0.247234, 0.724516, 0.681461, -0.274202, -0.0194797, 0.596639, 0.638283, 0.492563, 0.895778, -0.011385, 0.985804, 0.962758, 0.439104, 1.02628, 0.681224, 0.768744, 0.893582, 0.106382, 0.478954, -0.135238, 0.252659, -0.534434, 0.517815, 0.451819, 0.0343981, 0.153345, 0.18603, 0.242026, 0.666554, 0.0662541, 0.768447, 0.835646, -0.385535, 0.807263, 0.553858, 0.46527, 0.595944, -0.350026, -0.768997, 0.510382, 0.189625, 0.79349, 0.979093, 0.248773, 0.873504, 0.709909, 0.727535, 0.906406, 0.175144, 0.958942, 0.445482, 0.950049, 0.96658, 0.37162, 0.997923, 0.616004, 0.771522, 0.860866, -0.0894897, 0.536971, 0.391183, 0.289127, 0.62864, 0.625061, -0.0497414, 0.720285, 0.475235, 0.415006, 0.60611, -0.184813, 0.208709, -2.00334, 0.258023, -0.0687295, -0.14665, -0.394335, -0.692848, -0.175252, -0.0735222, 0.168808, 0.387048, 0.375145, 0.947489, 0.877842, 0.420818, 1.01527, 0.783382, 0.674583, 0.93811, 0.373957, 0.631519, 0.46425, 0.391504, 0.506037, 0.0116606, 0.508508, -0.363839, 0.386888, -0.0514629, 0.424766, 0.534201, 0.174665, -0.162034, 0.287438, 0.296058, 0.0843841, 0.677595, 0.621278, 0.0163942, 0.806652, 0.823932, -0.00803188, 0.750484, 0.818033, -0.160932, 0.74416, 0.680126, 0.334023, 0.835132, 0.59135, 0.281172, 0.391246, 0.37879, 0.691263, -0.0930822, 0.676542, 0.677128, -0.949525, 0.562609, 0.510131, 0.24815, 0.10115, -0.718, 0.535391, 0.688039, 0.194985, 0.516127, 0.579186, -0.159253, 0.700445, 0.708648, 0.307635, 0.0825121, 0.493065, 0.473523, -0.495125, 0.453489, 0.402279, 0.145024, 0.477576, 0.22017, 0.832728, 0.534179, 0.824307, 1.03452, 0.422581, 0.889962, 0.839941, 0.520214, 0.944582, 0.545756, 0.498807, 0.313007, 0.332703, -0.543961, 0.720666, 0.612667, 0.649365, 0.937877, 0.29476, 0.802808, 0.684952, 0.469791, 0.628209, 0.517704, 0.919164, 0.497092, 0.699017, 0.72832, 0.116674, 0.754813, 0.584828, -0.965253, 0.307326, 0.565249, 0.653353, 0.00577398, 0.761963, 0.897081, 0.0545956, 0.827626, 0.759882, 0.162609, 0.531827, 0.432581, 0.823308, 0.160134, 0.727086, 0.519657, 0.623596, 0.733005, 0.086645, 0.676573, -0.664389, 0.6561, -0.447748, 0.861694, 0.555639, 0.901502, 1.0484, -0.580818, 1.09663, 1.01886, 0.219147, 0.877901, 0.255196, 0.70357, 0.569081, 0.246813, 0.443801, -0.179133, 0.353236, -0.573986, 0.100016, -0.271925, -0.540204, 0.153059, -0.142216, 0.441313, 0.631589, -0.740058, 0.752474, 0.826798, 0.444878, -0.0963832, 0.193683, 0.269684, 0.401994, -0.213015, 0.601321, 0.732214, -0.894894, 0.81718, 0.704582, 0.474918, 0.830947, 0.0633459, 0.761041, 0.623263, 0.511673, 0.730789, 0.207347, 0.952741, 0.875841, -0.162069, 0.799986, 0.681111, -2.86859, 0.437207, 0.399379, 0.114437, -0.896167, 0.0894284, 0.366136, 0.303766, -1.29013, 0.344239, 0.434928, -0.395099, 0.528227, 0.711822, 0.4502, 0.0227827, 0.187793, 0.280925, 0.557908, -0.133365, 0.822774, 0.746069, 0.472997, 0.957902, 0.688351, 0.677389, 0.926613, 0.462893, 0.600098, 0.660454, -0.425519, 0.424364, 0.454511, 0.432823, 0.468298, 0.217573, 0.00500981, 0.33339, -0.0373231, -1.48304, 0.0212153, 0.184524, -0.222729, 0.465807, 0.318585, -0.08792, 0.336413, 0.23709, 0.290405, 0.355482, -0.365961, 0.648408, 0.460359, 0.747156, 1.04528, 0.660724, 0.892124, 1.03383, -0.00557509, 0.898871, 0.630246, 0.708276, 0.753213, 0.488684, 0.872962, -0.149959, 0.862035, 0.743281, 0.266602, 0.539254, 0.187384, 0.567517, -0.550607, 0.373095, 0.408274, 0.844418, 0.339368, 0.862072, 0.962878, 0.079844, 0.79761, 0.726861, -1.62996, 0.351144, 0.153602, 0.182655, 0.329266, -0.39115, 0.207344, -0.27896, 0.662349, 0.527281, 0.49056, 0.710111, 0.296425, 0.933662, 0.551347, 0.911189, 1.04119, -0.0223509, 0.931701, 0.782219, 0.354664, 0.584601, -0.0231343, 0.134656, 0.678112, 0.845533, -0.694216, 0.853558, 0.489082, 0.819634, 0.891844, 0.127389, 0.886227, 0.447865, 0.70676, 0.601908, 0.629754, 0.882703, 0.163502, 0.784884, 0.807719, -0.0944798, 0.62475, 0.757494, 0.671354, 0.23138, 0.390216, 0.630933, 0.00152739, 0.601279, 0.639467, -0.44744, 0.576329, 0.302552, -0.0544955, -1.09722, 0.437947, 0.233293, 0.368063, 0.530124, -0.836757, 0.447942, 0.0414041, -0.237228, 0.408528, 0.822586, 0.596917, 0.661595, 0.939596, 0.394683, 0.834326, 0.89663, -0.575975, 0.885802, 0.817784, -0.706593, 0.649216, 0.458355, -0.028577, 0.360341, -0.18534, -0.0225696, -0.894837, 0.505175, 0.687672, 0.435282, 0.193495, 0.577411, 0.351761, -0.558871, -0.0954942, -0.612649, -0.0325234, 0.204387, -0.000858347, 0.735509, 0.72543, 0.212663, 0.904179, 0.723056, 0.627482, 0.971782, 0.666461, 0.445971, 0.547838, 0.180051, 0.586072, -1.3908, 0.64922, 0.602133, -1.50561, 0.44472, 0.394923, -0.340608, 0.342536, 0.640701, 0.548266, 0.0546029, 0.723083, 0.55115, 0.431766, 0.801958, 0.605659, -0.446979, -0.924585, -0.623511, 0.381777, 0.704833, 0.313418, 0.618221, 0.65354, 0.408834, 0.833128, 0.0180676, 0.822088, 0.587599, 0.819407, 0.972019, -0.048815, 1.01586, 0.725631, 0.902587, 1.08335, 0.449805, 0.825257, 0.768735, -0.815183, -0.214394, 0.377495, 0.146675, 0.514401, 0.560491, 0.307225, 0.741375, 0.221321, 0.521394, 0.267505, 0.5022, 0.553518, -0.0596471, 0.417985, 0.0519418, 0.640703, 0.402869, -0.0327928, 0.235412, 0.311222, 0.675702, 0.738715, -0.0664532, 0.943166, 0.839441, 0.664189, 1.05684, 0.621848, 0.850893, 0.842167, 0.537837, 0.932334, 0.227476, 0.76271, 0.409626, 0.749867, 0.751978, 0.443071, 0.875925, 0.485303, 0.336873, -0.377378, 0.515802, -0.304903, 0.760012, 0.70243, 0.582218, 0.989286, 0.697797, 0.623997, 0.825776, 0.0297122, 0.668413, 0.684621, 0.154888, 0.190168, 0.474857, 0.478698, 0.117779, -0.121963, -0.661141, 0.422611, 0.471084, 0.241181, 0.781151, 0.48824, 0.696146, 0.929742, 0.525724, 0.558623, 0.633746, -1.63204, 0.369352, -0.0802781, -1.69749, 0.195906, 0.112709, 0.522319, 0.854701, 0.615587, 0.501362, 0.784802, 0.191193, 0.599529, 0.551972, 0.0566971, 0.469497, -0.0177145, 0.755515, 0.70996, -0.101573, 0.785663, 0.72142, 0.013377, 0.794162, 0.649937, 0.450705, 0.901217, 0.750656, -0.0433691, 0.620147, 0.306881, -0.181532, -0.852011, -0.0807373, 0.179274, 0.676782, 0.549152, 0.15005, 0.535417, -1.27997, 0.487981, -0.775154, 0.674474, 0.578289, 0.393017, 0.710133, -0.473092, 0.858873, 0.82693, -0.259989, 0.798156, 0.735422, -0.31587, 0.597384, 0.76107, 0.643466, -0.846319, 0.593133, 0.535191, 0.0358035, 0.509788, -0.211872, 0.70479, 0.484364, 0.473173, 0.582813, 0.376366, 0.822143, 0.393433, 0.607436, 0.572773, 0.16916, 0.368618, 0.282188, 0.279041, 0.7437, 0.984416, 0.131305, 1.03206, 1.02832, 0.281053, 1.00412, 0.543429, 0.878706, 0.89255, 0.130104, 0.765493, -0.407073, 0.721263, 0.443541, 0.481836, 0.544256, -0.209023, 0.414121, 0.173623, 0.274121, 0.568424, 0.164642, 0.713512, 0.914633, 0.462325, 0.626248, 0.64387, -0.0629591, 0.527691, 0.106535, -0.502918, 0.369742, 0.269494, 0.501034, 0.734568, -0.275479, 0.875551, 0.700008, 0.597577, 0.776101, 0.374239, 0.899344, -0.448655, 1.0524, 1.02355, 0.389679, 1.03763, 0.687088, 0.771743, 0.871113, -0.214081, 0.506704, -0.42076, 0.253746, 0.0114533, 0.498783, -0.152652, 0.763288, 0.641462, 0.34238, 0.74188, 0.404212, -0.0385467, -0.637816, 0.510949, 0.464685, -0.206492, 0.49555, 0.398259, -2.79214, 0.455633, 0.677617, 0.52657, 0.307848, 0.822737, 0.616712, 0.626296, 0.94814, 0.560706, 0.740316, 0.899395, 0.377452, 0.376336, -0.274578, 0.524518, 0.372233, 0.356776, 0.577315, -0.578367, 0.49623, 0.391172, -0.901458, -1.38277, 0.0372799, -0.740143, 0.379578, 0.41806, 0.0125721, 0.66164, 0.504109, 0.463888, 0.912274, 0.860691, -0.336249, 0.783927, 0.78261, -0.604031, 0.750365, 0.593023, 0.339857, 0.624848, -0.110229, 0.760641, 0.515704, 0.584499, 0.786166, -0.155495, 0.677181, 0.502536, 0.393232, 0.678828, 0.439589, 0.164445, 0.372027, 0.0318112, 0.583274, 0.806088, 0.217, 0.762613, 0.847548, 0.0370927, 0.625654, 0.516215, -0.120632, 0.335204, -0.352248, 0.0908928, 0.237586, 0.278105, 0.117587, -0.354946, -0.143782, 0.440386, 0.776716, 0.366114, 0.811362, 0.97893, 0.0765281, 0.963739, 0.944545, -0.00684113, 0.825166, 0.352993, 0.507761, -0.116819, 0.657151, 0.442083, 0.5797, 0.576043, 0.654531, 0.950372, 0.305673, 0.821907, 0.66001, 0.643072, 0.764787, 0.486565, 0.940871, 0.227627, 0.959505, 0.966974, -0.0518266, 0.917521, 0.770999, -1.94649, 0.28695, -0.0283327, -0.165068, -1.00736, 0.537479, 0.744499, 0.256413, 0.621873, 0.646934, 0.0106997, 0.549162, -0.205231, 0.609798, -0.90817, 0.7719, 0.666585, 0.409116, 0.752497, 0.243584, -0.00985711, 0.371665, 0.675807, -0.227058, 0.8434, 0.498883, 0.898559, 1.03374, -0.630812, 1.06159, 0.927747, 0.615041, 0.975431, 0.376319, 0.714424, 0.479152, 0.553922, 0.573657, 0.423649, 0.814372, 0.570097, -0.263319, 0.103557, -0.62878, -0.235021, -0.0832775, 0.168243, 0.593852, 0.355041, 0.413147, 0.711284, 0.442006, 0.174883, 0.587523, 0.576381, 0.27011, 0.260351, 0.74679, 0.739881, -0.17622, 0.536998, 0.138675, 0.597762, 0.642189, 0.229108, 0.781337, 0.293073, 0.749731, 0.808135, 0.0216142, 0.876126, 0.725902, 0.345395, 0.800729, 0.584701, -0.0204798, 0.550254, 0.580177, 0.534316, 0.403347, -0.297496, 0.245755, 0.373189, -0.144274, 0.214832, 0.390182, -0.11304, 0.272294, 0.385254, -0.7159, 0.44765, 0.0995882, 0.513743, 0.63123, 0.0884368, 0.827767, 0.545462, 0.82294, 1.07433, 0.715544, 0.754421, 0.91925, 0.176692, 0.655947, 0.488542, 0.0906465, 0.17524, 0.0414237, -0.0138096, 0.282969, 0.379303, -0.14027, 0.394553, -1.18047, 0.406725, 0.141028, -0.0719916, -0.165857, 0.6617, 0.699965, -0.243827, 0.578794, 0.628683, 0.362411, -0.738178, 0.412144, 0.717485, 0.538104, 0.561928, 0.92758, 0.544535, 0.796055, 0.893623, 0.196811, 0.96844, 0.689706, 0.647815, 0.64582, 0.683464, 0.946067, -0.173007, 0.934133, 0.819984, 0.364835, 0.704019, -1.17515, 0.395391, 0.327355, 0.668223, 0.231397, 0.944158, 0.715309, 0.736031, 0.93279, -0.577856, 0.963376, 0.867885, -0.129836, 0.613934, 0.0302645, 0.0723308, -0.238165, 0.333387, -0.0616117, -0.477378, -0.542769, -0.361637, 0.545808, 0.541305, 0.475923, 0.947547, 0.709729, 0.679959, 0.896831, -0.976425, 0.916068, 0.790138, 0.154137, 0.526291, -0.194697, 0.0498846, 0.623712, 0.780112, -0.0239837, 0.892039, 0.628229, 0.695575, 0.810643, 0.170504, 0.787554, -0.393997, 0.951175, 0.825953, 0.580144, 0.925145, 0.132628, 0.883281, 0.880518, -1.47531, 0.770705, 0.746778, 0.348388, -0.231002, 0.400049, 0.522691, 0.236811, 0.185976, 0.490331, 0.224376, -0.723323, 0.0300645, 0.37944, 0.122952, -0.0598664, -0.0540478, 0.00835992, 0.168346, -0.91599, -0.173487, -0.164791, -0.570846, 0.562978, 0.779352, 0.129473, 0.831086, 0.927871, -0.296565, 0.928495, 0.935078, -0.00884992, 0.671872, 0.444208, 0.396862, 0.610524, -0.0447598, 0.382463, 0.340233, -0.290876, 0.317425, -0.300021, 0.435011, 0.613814, 0.249022, 0.343107, 0.579985, 0.248912, 0.0389112, 0.351658, 0.43965, 0.624865, 0.644025, -0.860928, 0.762946, 0.767279, 0.221679, 0.899735, 0.633046, 0.719547, 0.926273, 0.179354, 0.749826, 0.541894, 0.580171, 0.717528, 0.0241307, 0.759719, 0.372703, 0.644373, 0.821427, 0.568134, -0.379452, 0.116338, 0.474223, 0.585917, 0.0737784, 0.545519, 0.643738, -0.511507, 0.685761, 0.590588, -1.40346, 0.143717, -0.580296, -0.178221, 0.331129, -0.667761, 0.658339, 0.729171, -0.950752, 0.536156, -0.113669, 0.779558, 0.278317, 0.918702, 0.994353, 0.21205, 1.0688, 0.807062, 0.872676, 1.06279, 0.235813, 0.871912, 0.670276, 0.484017, 0.565852, 0.103158, 0.109355, 0.676483, 0.827086, -0.747625, 0.775918, 0.536781, 0.41206, 0.328652, 0.566474, 0.688803, 0.0896268, 0.765197, 0.352786, 0.637853, 0.745497, 0.188408, 0.227186, 0.327775, 0.319895, 0.0409469, 0.529882, 0.913562, 0.760421, 0.580845, 0.979211, 0.599323, 0.700819, 0.678749, 0.561886, 0.84117, -0.556018, 0.857547, 0.516336, 0.76698, 0.85372, -0.489968, 0.695425, -0.0275084, 0.590286, 0.259535, 0.365666, -0.983559, 0.796328, 0.72026, 0.653865, 1.05028, 0.77505, 0.677145, 0.903808, 0.203548, 0.694633, 0.636504, -0.436512, 0.375284, -0.478337, 0.349334, 0.437977, 0.134017, -0.110295, 0.317736, -0.204367, 0.495987, 0.687194, -0.00334468, 0.74144, 0.879925, 0.476836, 0.433456, 0.58319, 0.146971, -0.818893, -0.512814, 0.254369, 0.616963, 0.510695, 0.164855, 0.634316, -0.00424182, 0.65533, 0.686242, -0.294659, 0.651866, 0.359024, 0.346086, 0.340782, 0.456679, 0.822034, 0.607781, 0.452251, 0.86059, 0.675566, 0.40968, 0.894223, 0.784585, -0.249291, 0.688645, 0.426048, 0.365964, 0.546646, -0.477325, 0.253792, -0.913136, 0.0812496, 0.229223, 0.722387, 0.546277, 0.317666, 0.579286, -0.304534, 0.543531, -0.628949, 0.689915, 0.214588, 0.850949, 0.976031, -0.00780897, 0.919646, 0.860551, 0.230095, 0.841778, 0.545348, 0.410385, 0.671462, 0.532689, 0.303104, -0.251549, 0.233298, 0.406988, -0.808494, 0.360009, -0.0721096, 0.300696, -0.421631, 0.690336, 0.78039, -1.68105, 0.765448, 0.609526, 0.187794, 0.388217, 0.0963738, 0.282954, 0.229353, 0.206404, 0.714341, 0.948719, 0.00509596, 1.01001, 0.96947, 0.577407, 1.0775, 0.688949, 0.797883, 0.747843, 0.655533, 0.900412, -0.146356, 0.950323, 0.750306, 0.501008, 0.707141, -0.398936, 0.58572, 0.246506, -0.704727, 0.375977, 0.449797, 0.349151, 0.817921, 0.462602, 0.715731, 0.890688, 0.435976, 0.373686, 0.379081, -0.0754351, 0.211948, 0.356302, -0.798837, 0.323817, -0.139231, 0.656684, 0.365967, 0.572356, 0.58133, 0.591931, 0.912498, -0.101799, 0.975144, 0.89269, 0.689634, 1.09653, 0.759063, 0.742871, 0.873843, 0.0416449, 0.320167, 0.178323, 0.586977, -1.18811, 0.603556, 0.0278929, 0.679282, 0.670861, 0.113273, 0.64969, -0.151686, 0.580589, 0.387524, 0.356339, 0.485687, 0.168887, 0.740106, 0.605669, 0.207691, 0.816155, 0.854143, 0.472078, 0.497023, 0.78243, 0.41049, 0.612377, 0.816146, 0.295696, 0.578274, 0.567877, 0.0609732, 0.553863, -0.109419, 0.3429, -0.228521, 0.478527, 0.474821, -0.0533846, 0.572676, 0.504115, 0.284675, 0.333238, 0.261299, 0.0943808, 0.64831, 0.505649, 0.365171, 0.808914, 0.659064, 0.190383, 0.764942, 0.616428, 0.267282, 0.798881, 0.662918, 0.22912, 0.769446, 0.539766, 0.26161, 0.351938, 0.526886, 0.847606, 0.370942, 0.764292, 0.849994, -0.876959, 0.807101, 0.662345, -0.0275962, 0.332087, -0.276906, -0.26032, 0.431407, 0.398293, 0.512669, 0.819765, -0.0692859, 0.909288, 0.953845, -0.0194278, 0.723971, 0.449359, 0.446413, 0.474238, 0.175658, 0.532956, -0.403636, 0.478796, 0.521569, 0.263308, -1.50423, 0.425319, 0.67803, 0.345112, 0.636899, 0.83406, -1.3636, 0.953466, 0.95053, -1.27942, 0.762794, 0.363036, 0.443807, -0.0925364, 0.597082, 0.276838, 0.722257, 0.797027, 0.166085, 0.814186, 0.0372, 0.782191, 0.445, 0.832083, 0.88622, 0.424148, 0.963671, 0.100696, 1.04194, 1.03409, 0.205397, 1.01035, 0.786114, 0.397437, 0.666187, 0.158534, -0.491684, 0.264435, -0.0497155, 0.402651, 0.464712, -0.22261, 0.302372, 0.160151, 0.615922, 0.108612, 0.416178, -0.0995463, 0.647796, 0.695818, -0.361791, 0.633713, 0.395073, -0.796443, -0.148548, 0.0176046, 0.558519, 0.892411, 0.462023, 0.889103, 1.02287, -0.0591644, 0.938055, 0.719655, 0.777573, 0.971735, 0.0416855, 0.794876, 0.435904, 0.710869, 0.725158, 0.344418, 0.827973, 0.468168, 0.475234, 0.609766, 0.237345, -0.115848, -0.0539677, 0.147097, 0.713644, 0.731816, -0.145501, 0.583212, 0.522779, 0.0384614, 0.661634, 0.631233, -0.0149059, 0.443959, 0.62741, 0.294528, 0.326838, 0.543364, -0.489967, 0.481054, 0.0791528, 0.600683, 0.678551, 0.269746, 0.945004, 0.876768, -0.180737, 0.797556, 0.584455, 0.347447, 0.677747, 0.419042, -0.628983, 0.14448, 0.261229, 0.349645, 0.150638, 0.0308156, 0.50019, 0.431742, -0.864379, 0.355423, 0.465533, 0.292228, -0.117403, -0.0423912, 0.381061, 0.434707, -0.315672, 0.682415, 0.626593, 0.433394, 0.923394, 0.647626, 0.776306, 1.01277, 0.421369, 0.884512, 0.909604, -0.381606, 0.782296, 0.490895, 0.101543, -0.260588, 0.690427, 0.576988, 0.288292, 0.600694, -1.45289, 0.465105, -0.647823, 0.47085, -0.294178, 0.612961, 0.470289, 0.543592, 0.805832, 0.170392, 0.692383, 0.723742, -0.311603, 0.577919, 0.728099, 0.72606, 0.486344, 0.334709, 0.780743, 0.474371, 0.620623, 0.750077, 0.131631, 0.829999, 0.285865, 0.81729, 0.755142, 0.627413, 0.95661, 0.193108, 0.874484, 0.732418, 0.596164, 0.849127, 0.226196, 0.126829, 0.482001, 0.740272, 0.203604, 0.992618, 0.798698, 0.768242, 1.01861, 0.157957, 0.920165, 0.78027, 0.527735, 0.781088, -0.37857, 0.740386, 0.431854, 0.349521, 0.306626, 0.244758, 0.553961, 0.475894, 0.414577, 0.113634, 0.508135, 0.862151, 0.637118, 0.606771, 0.897358, 0.383074, 0.676423, 0.657265, -0.206261, 0.278468, 0.222352, 0.418221, 0.152178, 0.490136, 0.347294, 0.868985, 0.594765, 0.598246, 0.689426, 0.3212, 0.726143, 0.210958, 0.960996, 0.713978, 0.816226, 1.03905, 0.364843, 0.918938, 0.938882, -0.146447, 0.673978, 0.449224, 0.175723, 0.46778, 0.338926, 0.274891, 0.230325, -0.80557, 0.256809, 0.347084, 0.124164, -0.118519, -0.207603, -0.714502, 0.157621, 0.227964, -0.133548, -0.353406, 0.252373, 0.568429, 0.6475, 0.133793, 0.593886, 0.711016, -0.105293, 0.892914, 0.85034, 0.171605, 0.921187, 0.793868, 0.0355211, 0.661731, 0.226733, 0.320186, 0.230131, 0.122027, 0.366537, -0.789752, 0.545945, 0.66711, 0.436875, -0.177467, 0.446645, 0.249174, 0.122893, 0.503218, 0.307805, -0.43193, 0.239039, 0.398968, 0.570086, 0.5182, 0.102498, 0.828152, 0.762612, 0.406039, 0.953452, 0.723155, 0.551467, 0.719182, 0.397051, 0.907633, 0.436431, 0.813653, 0.827342, 0.352571, 0.891759, 0.431407, 0.741353, 0.818726, 0.15647, 0.285746, 0.11948, 0.113217, 0.481425, 0.233867, 0.605046, 0.883745, 0.596123, 0.400594, 0.574623, -0.777948, 0.384547, -0.359322, 0.13342, -0.715595, -0.19759, 0.11638, 0.398163, -1.40377, 0.286278, 0.0595673, 0.680131, 0.0347199, 0.848423, 0.852183, 0.643916, 1.14169, 0.910894, 0.777241, 1.02215, 0.117184, 0.848741, 0.527203, 0.67454, 0.629838, 0.445302, 0.597976, 0.483978, 0.833781, -0.0779951, 0.773654, 0.51698, 0.622189, 0.672181, 0.283909, 0.614306, 0.462477, 0.964123, 0.698884, 0.698345, 0.940917, 0.536672, 0.45037, 0.592133, 0.247582, -0.577273, 0.402436, 0.673624, 0.510709, 0.383413, 0.756186, 0.147763, 0.72019, 0.698078, 0.160694, 0.571303, 0.36602, 0.881827, 0.508184, 0.766778, 0.890851, 0.0905971, 0.564113, 0.101806, 0.316704, -0.87892, 0.523799, -1.25006, 0.832212, 0.794506, 0.476803, 0.959897, 0.527438, 0.863662, 0.985485, 0.289501, 0.709057, 0.568572, 0.25235, 0.449484, 0.197106, 0.712511, 0.562424, -0.036186, 0.604755, 0.52378, -0.451383, 0.627113, 0.699658, 0.21529, 0.438846, 0.564918, -0.313125, 0.479175, 0.569918, 0.401604, 0.133673, -0.452593, 0.542073, 0.738502, 0.471552, 0.348853, 0.599821, -0.829761, 0.57642, 0.330522, 0.411436, 0.499266, 0.297679, 0.796406, 0.583458, 0.419203, 0.745838, 0.259389, 0.645736, 0.834648, 0.498043, 0.544991, 0.879972, 0.754731, -0.727606, 0.615851, 0.41888, 0.102901, 0.31743, -0.388751, 0.0648908, 0.277198, 0.613284, 0.139293, 0.421703, 0.231432, 0.451031, 0.536092, 0.161469, 0.605709, -0.182504, 0.738416, 0.00812543, 0.946832, 1.01785, -0.455228, 1.03042, 0.904408, 0.5234, 0.946007, 0.576166, 0.405185, 0.309692, 0.247544, 0.299576, -0.220766, -0.0738265, 0.0745445, 0.00975712, 0.185665, 0.291881, -0.373551, -0.295998, 0.54817, 0.753827, 0.0345199, 0.723617, 0.72461, -0.431299, 0.588919, 0.409154, 0.215937, 0.537615, 0.410023, 0.562274, 0.868656, 0.0744162, 0.912685, 0.84679, 0.671412, 1.05432, 0.565605, 0.847151, 0.725738, 0.749024, 0.942201, 0.0651597, 0.998363, 0.71572, 0.788875, 0.958476, 0.34187, 0.473054, -0.0472786, 0.123204, 0.280599, 0.686762, -0.0966843, 0.73644, 0.61349, 0.61433, 0.924502, 0.551009, 0.515064, 0.598243, -0.560277, 0.124916, -0.880259, -1.02825, 0.233524, 0.259694, -0.311349, 0.0552857, 0.481285, -0.0987135, 0.759962, 0.907824, -0.111488, 0.911539, 0.813074, 0.656314, 1.03402, 0.662625, 0.709218, 0.78454, -0.484618, 0.526436, -1.03083, 0.33189, 0.307145, 0.784901, 0.464502, 0.573194, 0.684642, -1.00644, 0.416845, 0.14025, 0.734059, 0.415095, 0.581176, 0.694982, 0.0575445, 0.846278, 0.753346, 0.116566, 0.819012, 0.731822, -0.131194, 0.80162, 0.828191, 0.257788, 0.568669, 0.667456, 0.0601601, 0.176779, -0.60002, 0.532833, 0.456216, 0.0166007, 0.463574, -0.555909, 0.473472, 0.420587, -1.30322, -0.0568032, -1.29968, -0.375723, 0.283334, -0.0771702, 0.561388, 0.805146, 0.426979, 0.677376, 0.924399, 0.692193, 0.16716, 0.653572, 0.360651, 0.315583, 0.627224, 0.353731, 0.257507, 0.52332, -1.72326, 0.636899, 0.544553, 0.396594, 0.76514, -0.0331221, 0.826624, 0.836577, 0.133473, 0.900248, 0.765723, -1.17493, 0.00409274, 0.183936, -0.302362, 0.606353, 0.587137, 0.537609, 0.92301, 0.453479, 0.815847, 0.838156, 0.351205, 0.900633, 0.434603, 0.711316, 0.647976, 0.42106, 0.689241, 0.0397088, 0.851028, 0.785562, -0.0321724, 0.388472, 0.511629, 0.513131, 0.104205, 0.56198, 0.830461, 0.449558, 0.661882, 0.777828, -0.435781, 0.730055, 0.384937, 0.456987, 0.340248, 0.296487, -0.0539173, 0.720591, 0.82437, -1.2821, 0.70458, 0.04982, 0.673584, 0.209472, 0.816625, 0.764419, 0.75407, 1.09162, 0.528357, 1.01406, 1.02904, 0.320083, 1.01934, 0.658425, 0.751942, 0.840778, 0.0375218, 0.0656604, 0.343412, 0.533609, -0.104156, 0.606534, 0.201887, 0.305227, 0.0694922, 0.146684, -0.921517, 0.612555, 0.561112, 0.294693, 0.745365, 0.457303, 0.212582, 0.371924, -0.401557, -0.193799, 0.213972, 0.675755, 0.806076, 0.11998, 0.84989, 0.918801, -0.360872, 0.917091, 0.700617, 0.608634, 0.753876, 0.338683, 0.869764, 0.245141, 0.85799, 0.869926, -0.197241, 0.75172, 0.304448, 0.584287, 0.654383, 0.18973, -0.326281, 0.0912504, -0.371388, 0.63859, 0.699219, -0.870147, 0.776908, 0.786298, -0.144334, 0.629631, 0.643275, -0.0623259, 0.299209, 0.102084, 0.325964, 0.634884, 0.370445, 0.304871, 0.519093, -0.00575512, 0.772789, 0.645406, 0.498765, 0.915139, 0.660463, 0.559805, 0.864596, 0.581979, 0.131636, 0.487089, 0.364903, 0.332985, 0.350799, -0.180145, 0.163029, 0.018714, 0.247541, 0.519998, 0.205238, 0.0042249, 0.188811, -0.543722, -0.313433, -0.866489, 0.0893891, 0.195753, -0.692002, 0.464992, 0.715082, 0.386937, 0.71717, 1.01477, 0.766599, 0.656174, 0.93705, 0.154657, 0.880397, 0.826897, 0.28555, 0.775579, -0.0552025, 0.620516, 0.054791, 0.669109, 0.533723, 0.541658, 0.753004, -0.848759, 0.638242, 0.222293, 0.296567, 0.124294, 0.872068, 0.765776, 0.551897, 0.945055, 0.467802, 0.79078, 0.860256, -0.225818, 0.665187, 0.602036, 0.0946038, -0.456133, 0.285609, 0.54917, 0.282416, 0.459575, 0.681678, -0.116936, 0.450806, -0.0210972, 0.86976, 0.758982, 0.608269, 0.967049, 0.408655, 0.829221, 0.790982, 0.264403, 0.687079, -1.17176, 0.411679, 0.317133, 0.718002, 0.00488928, 0.940961, 0.690731, 0.883866, 1.09454, 0.470199, 0.871279, 0.694908, 0.696516, 0.831964, 0.301275, 0.916544, 0.515369, 0.729944, 0.800263, -1.01062, 0.632975, 0.516083, -0.00437051, -1.172, 0.165843, 0.549969, 0.287769, 0.613259, 0.905111, 0.66348, 0.295687, 0.591341, -0.0424304, -0.14856, 0.0533341, 0.221976, 0.150102, 0.506038, -1.62626, 0.55356, 0.162245, 0.495276, 0.302031, 0.635494, 0.774496, 0.0830072, 0.873868, 0.406758, 0.938289, 1.0653, 0.2762, 0.944912, 0.933436, -0.843751, 0.703547, 0.421184, 0.137566, 0.122958, -0.0708744, -0.117809, 0.132811 +}; #endif /* MULTIPATH_V120_M6_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v120_M8.h b/src/lte/model/JakesTraces/multipath_v120_M8.h index 40fc54776..1bf4a711b 100644 --- a/src/lte/model/JakesTraces/multipath_v120_M8.h +++ b/src/lte/model/JakesTraces/multipath_v120_M8.h @@ -23,8 +23,8 @@ #define MULTIPATH_V120_M8_H_ static double multipath_M8_v_120[3000] = { - 0.795473, 0.972849, 1.07672, 0.0568964, 0.792985, 0.205874, 0.705567, 0.491031, 0.507141, 0.532529, 0.309806, 0.572354, -0.0991353, 0.575392, -0.304082, 0.50318, 0.0391823, 0.510708, 0.460578, -0.0294507, 0.0884835, 0.464007, 0.672531, -0.130066, 0.569366, 0.518827, -0.365837, -0.68221, -1.21776, 0.515545, 0.870805, 0.725791, 0.516013, 0.947683, 0.650808, 0.648243, 0.860896, 0.265716, 0.622869, 0.659744, -0.0496158, 0.299959, 0.336946, -0.53946, 0.426813, 0.665693, 0.453011, 0.253862, 0.569747, -1.75195, 0.606089, 0.172911, 0.687525, 0.706617, 0.517643, 1.0028, 0.787654, 0.51791, 0.793942, 0.0452117, 0.342491, 0.0924926, 0.591805, 0.0261381, 0.86273, 0.60729, 0.803682, 1.01061, 0.304643, 0.866393, 0.756261, 0.568085, 0.902244, 0.448773, 0.560316, 0.600576, -0.1363, -0.189791, -0.279525, 0.324729, 0.609983, 0.418013, 0.00109498, 0.202943, 0.0697743, 0.146329, 0.525746, 0.821069, 0.289588, 0.807566, 0.899508, -1.53664, 0.906226, 0.869314, -0.444392, 0.601352, 0.306823, 0.192444, 0.275229, -1.39533, -0.457893, -0.04243, -0.0212602, 0.0268324, 0.349671, -0.701037, 0.673837, 0.809717, 0.390074, 0.639192, 0.87033, 0.547089, 0.466869, 0.65478, -0.880247, 0.629248, 0.266404, 0.575497, 0.593482, 0.496632, 0.948801, 0.739299, 0.550506, 0.891825, 0.510113, 0.557074, 0.715521, 0.259283, 0.0963212, 0.192291, -0.206238, -0.220262, 0.427443, 0.630762, 0.362229, 0.474202, 0.809676, 0.632777, -0.149106, 0.47385, 0.188831, -1.0758, -0.480845, -0.684069, 0.468306, 0.669181, 0.350257, 0.284355, 0.440238, -1.13763, 0.233979, -0.394353, 0.403633, -0.619848, 0.660502, 0.753259, -0.0771909, 0.673444, 0.657885, 0.0978312, 0.77498, 0.555775, 0.627699, 0.977513, 0.774379, 0.541819, 0.956494, 0.6852, 0.612752, 0.889224, 0.526291, 0.260028, 0.07401, 0.350711, 0.137025, 0.535501, 0.660599, -0.0866018, 0.764162, 0.573648, 0.221889, 0.334204, 0.356586, 0.550785, 0.156076, 0.745237, 0.399557, 0.496773, 0.439463, 0.493981, 0.756013, 0.130587, 0.558575, 0.506178, -1.35537, 0.0840673, 0.189631, 0.641904, 0.802335, 0.058402, 0.911319, 0.990308, -0.441947, 1.02451, 0.912979, 0.443972, 0.854972, -0.802627, 0.822428, 0.463363, 0.76099, 0.851616, -0.746722, 0.65732, 0.102254, 0.58715, 0.532495, -0.073784, 0.387311, -0.446845, 0.0937605, -0.0966128, -0.0244458, 0.415514, 0.463975, -0.615899, 0.453403, 0.543264, 0.309538, -0.456298, 0.580616, 0.835913, 0.70525, 0.426494, 0.964779, 0.808989, 0.457768, 0.839737, -0.209958, 0.845243, 0.738745, 0.382852, 0.737357, -0.288429, 0.618079, 0.376761, 0.12705, -0.18889, 0.380271, 0.308204, -0.0655833, -0.0581144, 0.178205, -0.460858, 0.626891, 0.594168, 0.631692, 1.01791, 0.66961, 0.84846, 1.00964, 0.369929, 0.607096, -0.090782, 0.615821, -0.048096, 0.741088, 0.502291, 0.800376, 0.931397, 0.168949, 0.996431, 0.593036, 0.944451, 1.02154, -0.00411738, 0.986996, 0.681198, 0.703851, 0.780121, 0.0665906, 0.670139, -3.01492, 0.702537, 0.534264, 0.284595, 0.685984, 0.677043, 0.597809, 0.237365, 0.489327, 0.808981, 0.495109, 0.634834, 0.854162, 0.350708, 0.541807, 0.485031, 0.0836082, 0.427459, -0.199301, -0.6218, 0.0837791, -0.0239749, 0.365658, 0.573573, -1.21203, 0.684389, 0.638816, -0.18355, 0.613779, 0.538442, 0.269531, 0.253777, 0.212156, -1.88876, 0.100023, -0.0843845, -0.104868, 0.322038, 0.054084, 0.633778, 0.92033, 0.529751, 0.843204, 0.988686, -2.07796, 1.01619, 0.886157, 0.649402, 0.997455, 0.380489, 0.830763, 0.751327, 0.309745, 0.661608, -0.340352, 0.0623111, 0.563923, 0.847193, 0.326829, 0.744955, 0.785774, -0.601377, 0.629498, 0.233034, 0.16462, -0.37909, 0.608462, 0.497079, 0.228012, 0.626341, 0.309661, 0.0545433, 0.305251, 0.230884, 0.196172, -0.895795, 0.505062, 0.665654, -0.0800244, 0.65911, 0.611902, 0.51997, 0.97802, 0.831471, 0.384315, 0.926229, 0.759088, 0.181606, 0.740095, 0.545228, -0.457531, 0.0467664, 0.122342, 0.442337, -0.536453, 0.571911, 0.621561, -0.717698, 0.652676, 0.547292, 0.116449, 0.574731, 0.132739, 0.0976403, -0.327082, 0.582115, 0.466818, 0.214112, 0.455732, 0.314938, 0.794701, 0.356824, 0.802062, 0.94273, 0.0419479, 0.914951, 0.965125, 0.351425, 0.635155, 0.703601, 0.310548, -0.265075, 0.188317, 0.189225, -0.297783, 0.0509446, 0.146972, -0.577115, 0.0393648, 0.145319, 0.679424, 0.620989, -0.231899, 0.586157, 0.19821, 0.480766, 0.576109, -0.52211, 0.609699, 0.514867, -0.114436, 0.588207, 0.607886, 0.367016, -0.774408, 0.281377, 0.55019, 0.582484, 0.270538, 0.282594, 0.706761, 0.632527, 0.114117, 0.859302, 0.846632, -0.987939, 0.752128, 0.451079, 0.706481, 0.849682, -0.283247, 0.900634, 0.695938, 0.659158, 0.880396, -0.477998, 0.807604, 0.465912, 0.755365, 0.865136, -0.740791, 0.777394, 0.678524, -0.112646, -1.56618, -0.319069, 0.353989, 0.709086, 0.200981, 0.804804, 0.955249, 0.431768, 0.632381, 0.568813, 0.081002, 0.319436, 0.0896407, 0.249987, 0.272222, 0.4739, 0.150951, 0.62615, -0.221986, 0.849205, 0.701138, 0.598027, 0.893349, 0.197361, 0.711076, 0.374285, 0.737613, 0.799814, 0.243742, 0.897604, 0.592339, 0.72737, 0.979064, 0.749875, 0.0585756, 0.720669, 0.716242, 0.25912, 0.434577, 0.667582, 0.267471, 0.372276, 0.394133, 0.144388, 0.524937, -0.214884, 0.32492, -0.310282, 0.262693, -0.0619616, 0.765315, 0.676842, 0.437305, 0.82719, 0.102285, 0.778883, 0.694771, 0.252773, 0.475536, 0.541842, 0.848714, -0.0979529, 0.883922, 0.862197, -0.256088, 0.741626, 0.583983, 0.110903, 0.114743, -1.11764, 0.639562, 0.697504, 0.280838, 0.894079, 0.417457, 0.941516, 1.02978, -0.391462, 0.993654, 0.712726, 0.776593, 0.880554, -0.0514673, 0.7002, 0.234296, 0.904733, 0.460878, 0.857639, 0.910753, -0.190953, 0.795799, 0.350793, 0.448334, -0.858737, 0.735372, 0.578852, 0.63277, 0.9119, 0.473743, 0.60808, 0.662983, -0.427558, 0.641784, 0.647132, 0.30352, 0.120857, 0.619848, 0.536958, 0.349553, 0.894758, 0.793182, 0.298432, 0.878293, 0.658296, 0.281387, 0.53494, -2.18159, 0.151955, 0.229238, 0.619761, 0.253461, 0.394591, 0.587196, 0.417723, 0.232908, 0.0230616, 0.0294786, 0.448376, -0.224543, 0.59546, 0.669471, -1.09503, 0.557786, 0.168611, 0.431334, 0.42588, -0.505732, -0.495336, 0.347146, -0.240929, 0.770996, 0.88372, 0.102986, 1.06397, 0.978736, 0.544148, 1.05696, 0.714516, 0.698569, 0.681938, 0.618919, 0.902036, 0.0363543, 0.81521, 0.66489, 0.518993, 0.815115, 0.378838, 0.333931, 0.305203, -0.744157, -0.247179, -1.02903, 0.0023867, 0.216078, -0.150924, 0.60779, 0.542308, 0.183069, 0.754702, 0.668445, -1.0316, 0.559729, 0.682293, 0.646097, 0.447052, -0.395105, 0.5417, 0.516821, -0.271977, 0.611216, 0.549802, -0.789155, 0.407802, -0.0050087, 0.377387, 0.507532, -2.09526, 0.599601, 0.588567, -0.0501034, 0.701533, 0.479442, 0.534933, 0.785397, -0.342851, 0.861983, 0.832765, 0.446483, 1.03771, 0.928477, -0.147737, 0.762511, 0.481071, 0.0377071, -0.057179, -0.0846982, 0.0246056, 0.662155, 0.559031, 0.313361, 0.73081, 0.307376, 0.514259, 0.544386, -0.00205932, 0.578626, 0.20028, 0.326367, 0.45148, -0.184004, 0.13144, 0.238912, 0.100968, -0.0748691, -0.0179252, 0.330602, 0.574429, 0.50377, 0.0531897, 0.781083, 0.764937, -0.149289, 0.875365, 0.883331, 0.0561433, 0.733052, 0.795688, 0.261754, 0.468962, 0.592297, -0.0253964, 0.399482, 0.433911, -0.356859, 0.466426, 0.10431, 0.408641, 0.535046, -0.317742, 0.0215226, 0.349464, 0.755776, 0.453047, 0.616751, 0.786677, -0.499853, 0.686828, 0.314589, 0.541589, 0.227905, 0.778299, 0.861723, 0.414725, 1.07245, 0.880984, 0.736126, 1.04823, 0.56671, 0.775743, 0.805458, -0.508221, 0.400732, -0.888724, 0.23071, -0.0464701, 0.16706, 0.62919, 0.586146, 0.274373, 0.790991, 0.452681, 0.548319, 0.585048, 0.165758, 0.48853, 0.36102, 0.792748, 0.148268, 0.811333, 0.841393, -1.4035, 0.671897, 0.365514, 0.0248286, -0.685588, 0.357405, -0.0524141, 0.810932, 0.798911, -0.298023, 0.73813, 0.411662, 0.593635, 0.779277, 0.289432, 0.546662, 0.76202, 0.564092, 0.191193, 0.806611, 0.785856, -0.518746, 0.805533, 0.6879, 0.302432, 0.636564, 0.14636, 0.795392, 0.217924, 0.838353, 0.83778, 0.446354, 0.986834, 0.755423, 0.297911, 0.430935, 0.260771, 0.329813, 0.412059, 0.545271, 0.354735, 0.755793, -1.00065, 0.851099, 0.683745, 0.65561, 0.918293, 0.322927, 0.672649, 0.629431, -0.0697081, 0.116578, 0.444471, 0.032146, 0.827006, 0.642133, 0.720694, 0.977939, 0.348213, 0.754633, 0.322684, 0.870228, 0.863962, 0.624987, 1.05886, 0.587664, 0.9229, 0.955038, 0.204512, 0.927421, 0.560535, 0.652687, 0.731159, -0.439419, 0.422587, 0.263821, 0.204795, 0.486069, 0.352426, 0.298848, 0.684808, 0.390398, 0.402504, 0.719956, 0.677582, 0.464186, -0.574736, 0.469084, 0.610557, 0.0239547, 0.4528, 0.334258, 0.360295, 0.546212, 0.11542, 0.747197, 0.40534, 0.634782, 0.755272, -0.984177, 0.686834, 0.370546, 0.548191, 0.73045, 0.353288, 0.112165, 0.447711, 0.468821, 0.0226375, 0.609911, 0.942587, 0.804452, 0.436839, 0.946854, 0.697153, 0.47772, 0.640953, 0.0403645, 0.547411, 0.133226, 0.739683, 0.14385, 0.737561, 0.671214, 0.430617, 0.724112, 0.10051, 0.863877, 0.558789, 0.654545, 0.707873, 0.419705, 0.85617, 0.277042, 0.729322, 0.577478, 0.694593, 0.966137, 0.525598, 0.779525, 0.963928, 0.660716, 0.32524, 0.746918, 0.682985, 0.137296, 0.38953, 0.605986, 0.334139, 0.030182, 0.294367, -0.504418, 0.434036, 0.371951, -0.992259, 0.0257867, -1.1318, 0.141837, 0.199539, -0.143933, -0.802687, -0.162355, 0.243968, 0.278842, -0.91909, 0.427933, 0.601438, 0.386449, -0.433648, 0.268495, 0.303936, 0.418382, 0.486615, -0.675303, 0.758602, 0.92655, 0.445017, 0.803958, 0.906794, -0.219956, 0.969807, 0.859269, 0.436202, 0.883459, 0.260515, 0.799873, 0.804871, -0.432714, 0.652204, 0.291991, 0.225607, -0.133308, 0.450635, 0.5421, -0.531024, 0.460699, 0.524223, 0.290317, -0.771251, 0.297974, 0.617356, 0.651082, 0.307485, 0.144729, 0.487246, 0.329864, -0.415188, 0.490798, 0.649329, 0.46667, 0.0307675, 0.601541, 0.387197, 0.339572, 0.655189, 0.204402, 0.546944, 0.75038, 0.497246, 0.0917764, 0.619056, 0.603753, 0.000788777, 0.432728, 0.566423, -0.0310765, 0.179861, -0.0482441, 0.757225, 0.706532, 0.464003, 0.954832, 0.610526, 0.854271, 1.03117, 0.354956, 0.839473, 0.739848, 0.359735, 0.621164, 0.190707, 0.667608, -1.34013, 0.635593, -0.74889, 0.80687, 0.609879, 0.759804, 0.979422, 0.0644231, 0.953909, 0.943832, -0.171555, 0.576825, -0.0331355, 0.316155, -0.516775, 0.31811, -0.347008, 0.390571, 0.328212, -0.553493, -0.00947686, 0.352668, -0.0162983, 0.816419, 0.781491, 0.349447, 0.919133, 0.566688, 0.767608, 0.889353, -1.09496, 0.843245, 0.674326, 0.377172, 0.754915, 0.597163, 0.299857, 0.186029, -2.0374, 0.463354, 0.546632, -0.387846, 0.463657, 0.509939, 0.251926, -0.144154, -0.192762, 0.466165, 0.54639, -0.230484, 0.339834, -0.467021, 0.511909, 0.196147, 0.666227, 0.758968, 0.361307, 0.973395, 0.66925, 0.808954, 0.905746, 0.525313, 1.1043, 0.857489, 0.77156, 1.00461, 0.39682, 0.671256, 0.552754, -0.848425, 0.13908, 0.516148, -0.116878, 0.83453, 0.751537, 0.287568, 0.714856, -0.94112, 0.628405, -0.31133, 0.707563, 0.422956, 0.701665, 0.811452, -0.615267, 0.639285, -0.289361, 0.797435, 0.53357, 0.568081, 0.596305, 0.396774, 0.629951, 0.419532, 0.870005, -0.0663181, 0.976382, 0.951679, 0.507318, 1.09537, 0.924572, 0.417815, 0.895388, 0.622578, 0.137351, 0.483027, 0.231638, -0.434149, -1.4552, -0.265469, 0.342529, 0.529522, 0.245234, 0.211764, 0.383866, -0.169449, 0.472308, -0.371607, 0.558252, 0.474791, 0.254418, 0.603301, -0.0173795, 0.349865, 0.116036, -0.512394, 0.333857, 0.746097, 0.458976, 0.702398, 0.936443, 0.43627, 0.774843, 0.901127, 0.510254, 0.00721503, 0.126318, -0.251894, -0.287704, -0.106881, 0.50235, 0.34509, 0.506795, 0.798608, 0.117546, 0.7917, 0.754336, 0.448479, 0.874614, 0.221382, 0.77363, 0.55225, 0.779094, 0.955301, -0.358233, 0.944027, 0.856329, 0.310188, 0.849627, 0.620899, -0.275552, 0.167404, 0.475954, -0.760982, 0.703597, 0.656184, 0.226447, 0.775155, 0.469441, 0.550827, 0.77055, 0.278112, 0.547178, 0.672735, -0.0258339, 0.581689, 0.720352, 0.390473, 0.195021, 0.469582, -0.0342854, 0.170712, 0.105877, -0.162408, -0.0310079, 0.283673, 0.712897, 0.712055, 0.106614, 0.567925, 0.789532, 0.616174, 0.0859149, 0.746931, 0.662319, 0.0964795, 0.766735, 0.603244, 0.257267, 0.630139, -0.147079, 0.54359, 0.468336, -0.619436, -0.344162, 0.310551, 0.196077, 0.485034, 0.703708, -0.290629, 0.903673, 0.894653, -1.23798, 0.755151, 0.439075, 0.466085, 0.354165, 0.594093, 0.804727, -0.154146, 0.813573, 0.815301, -0.258954, 0.835323, 0.802342, -0.179622, 0.625404, 0.622625, -1.04157, 0.651214, 0.687187, -0.0533212, 0.536558, 0.570522, -2.03416, 0.559496, 0.628726, 0.451951, 0.127457, -0.471759, 0.446207, 0.635476, 0.439775, -0.196003, 0.341585, 0.00334443, -1.08898, -0.225252, -0.0996369, 0.150741, 0.559655, 0.40707, -0.340924, 0.131594, -1.25033, -0.647714, 0.0863843, -0.868316, 0.622449, 0.726831, -0.0664545, 0.855741, 0.514466, 0.904689, 1.0652, -0.272661, 1.10088, 1.06346, 0.171669, 0.971924, 0.587894, 0.644881, 0.525765, 0.512765, 0.542543, 0.554238, 0.85181, 0.267851, 0.62048, 0.442807, 0.35858, 0.406992, 0.138776, 0.260085, 0.435419, 0.704623, 0.0687801, 0.516366, 0.304505, 0.357262, 0.453239, -0.184277, 0.46801, 0.374243, 0.358477, 0.497393, -0.188471, 0.74603, 0.899919, 0.00867975, 0.938103, 0.987464, 0.0545995, 0.796257, 0.656133, 0.265025, 0.609085, 0.0249516, 0.164966, -0.338169, 0.214294, 0.376961, 0.31951, -0.0292101, 0.22837, 0.589551, 0.324447, 0.384205, 0.495541, 0.393204, 0.851326, 0.494527, 0.728654, 0.855611, -0.600835, 0.728523, 0.459382, 0.0480022, 0.217517, 0.815229, 0.451254, 0.87706, 1.00076, 0.0434099, 1.08851, 0.94293, 0.620092, 0.9558, -0.0220902, 0.829601, 0.513479, 0.691823, 0.765511, -1.15415, 0.391276, -0.106515, 0.394507, -0.0765389, 0.483888, -0.719441, 0.516845, -0.382103, 0.531888, -0.662229, 0.901948, 0.890705, 0.443224, 1.03256, 0.753078, 0.757701, 0.957627, 0.390876, 0.488102, 0.0852637, 0.216723, 0.0942058, 0.745837, 0.537077, 0.498339, 0.679016, 0.0386949, 0.788875, 0.52763, 0.530491, 0.746515, 0.129665, 0.566965, 0.678264, 0.391832, -0.653792, 0.114506, -0.705631, 0.28256, 0.288387, 0.222492, 0.693879, 0.293102, 0.776321, 0.971292, 0.356542, 0.918321, 1.0126, 0.367231, 0.701413, 0.593476, 0.109528, 0.392252, -0.654725, -0.117249, 0.224625, 0.26132, 0.230964, 0.478556, 0.179221, 0.801415, 0.656118, 0.212051, 0.612333, 0.00418432, 0.18522, -1.81872, 0.139333, 0.128368, 0.630992, 0.280308, 0.520624, 0.63583, -0.0991293, -0.55858, 0.539843, 0.680991, 0.216417, 0.948659, 0.778235, 0.729863, 1.05438, 0.617168, 0.843444, 0.902745, 0.205062, 0.965789, 0.797252, 0.341564, 0.774543, 0.434432, 0.170511, 0.290563, -0.446305, -0.621864, 0.177418, 0.122748, 0.126503, 0.624446, 0.649227, 0.2635, 0.0808855, 0.339199, 0.0631333, -0.580876, -0.195417, -0.181609, 0.195253, 0.656401, 0.635654, -2.27528, 0.603992, 0.480548, 0.27038, 0.688386, 0.434547, 0.291981, 0.652494, 0.512495, -0.64186, 0.569109, 0.684068, 0.191524, 0.691377, 0.942082, 0.702393, 0.485543, 0.819255, 0.305163, 0.573532, 0.430959, 0.457113, 0.56311, 0.449252, 0.907431, 0.664704, 0.526343, 0.767866, -0.0720513, 0.591611, 0.397437, 0.202064, 0.324841, -0.243051, 0.0862653, 0.163312, 0.467427, -0.616717, 0.494172, 0.284078, 0.54242, 0.861081, 0.68213, 0.349247, 0.884289, 0.810164, -0.260031, 0.849514, 0.8517, 0.113328, 0.540666, 0.323985, 0.383683, 0.505975, 0.0270058, 0.643888, 0.332812, 0.401798, 0.541147, -0.785323, 0.42233, 0.367519, 0.0184781, -0.165865, -1.34215, 0.0863887, -0.522737, 0.558885, 0.737249, -0.196438, 0.813908, 0.836849, -0.162164, 0.841932, 0.720198, -0.34749, -0.704374, 0.399995, -1.09337, 0.804722, 0.803617, 0.425938, 0.963938, 0.515008, 0.887326, 0.923642, 0.342257, 0.936119, 0.168387, 0.953192, 0.896365, 0.443369, 0.895097, 0.102155, 0.81167, 0.6718, 0.467054, 0.757469, 0.142874, 0.531304, 0.64918, 0.595372, 0.510293, -2.335, 0.73699, 0.85954, 0.2994, 0.666933, 0.700017, -2.10742, 0.490835, 0.217348, -0.492667, 0.294354, 0.453551, -0.911014, 0.464588, -0.221685, 0.587978, 0.534213, 0.304782, 0.682987, 0.0112526, 0.59268, 0.566019, -0.903356, -0.105039, 0.192251, 0.406737, -0.499486, 0.360638, 0.526278, 0.587259, 0.502059, 0.120121, 0.865446, 0.827347, 0.50361, 1.08005, 0.907644, 0.658039, 0.989438, 0.150389, 0.896602, 0.709713, 0.642896, 0.774246, 0.321174, 0.818514, -0.121428, 0.722263, -0.00835645, 0.870505, 0.803742, 0.581317, 0.957903, 0.469723, 0.631085, 0.314347, 0.654854, 0.580453, 0.573073, 0.815567, -1.31865, 0.853889, 0.79521, -0.163406, 0.270302, 0.14084, 0.384215, 0.565991, -1.06979, 0.828069, 0.838641, 0.222615, 0.914919, 0.514259, 0.850573, 0.949893, -0.607875, 0.925986, 0.803892, -0.0632458, 0.482778, -0.178287, 0.443941, -1.1176, 0.49562, 0.247125, 0.326956, 0.615438, 0.517974, 0.150851, -0.209389, 0.403124, 0.464017, -0.0490166, 0.210535, 0.367066, 0.293987, 0.375613, 0.342339, 0.0331822, 0.701196, 0.554737, 0.513538, 0.818668, -1.70869, 0.977725, 0.970407, 0.158822, 0.992707, 0.782164, 0.580159, 0.86068, 0.381052, 0.250542, -1.42007, 0.42653, -0.0865955, 0.455277, 0.440213, -0.446002, 0.210632, -0.131652, 0.224484, 0.630703, 0.490622, 0.497185, 0.862076, 0.527888, 0.570909, 0.649103, 0.258585, 0.785303, 0.473882, 0.346754, 0.387323, -0.186502, -0.131438, 0.299622, 0.0318283, 0.687837, 0.905064, 0.339873, 0.856465, 0.952983, -0.027479, 0.86624, 0.835111, -0.731086, 0.636211, 0.130362, 0.537455, 0.468023, 0.455466, 0.854612, 0.676497, 0.279195, 0.739114, 0.345945, 0.582561, 0.744181, 0.0891246, 0.570608, 0.565441, -0.247978, 0.581208, 0.541305, 0.20761, -0.49324, 0.0841982, 0.550238, 0.60153, -0.966931, 0.722697, 0.8031, 0.255989, 0.524279, 0.645091, 0.400062, 0.101845, 0.0550648, -0.610986, -0.015697, -0.736081, 0.272404, 0.178385, 0.220065, 0.432635, 0.10473, 0.72846, 0.478505, 0.54522, 0.700629, 0.183866, 0.876523, 0.602168, 0.744976, 0.96256, 0.302915, 0.879959, 0.954604, 0.272777, 0.736491, 0.832027, 0.559815, -0.20912, -0.4854, -0.438887, -0.162661, 0.0184416, -0.257632, -0.0108987, 0.375703, 0.278776, -0.313241, 0.303298, -0.918619, 0.517761, 0.521605, 0.0267606, 0.642325, 0.256217, 0.524617, 0.552568, 0.236187, 0.664225, -0.853997, 0.758811, 0.611012, 0.623155, 0.973095, 0.786474, -0.137629, 0.625539, 0.593806, 0.430422, -0.535005, 0.619615, 0.821609, 0.364222, 0.703871, 0.757645, 0.316917, 0.888457, 0.451822, 0.773489, 0.774847, 0.400352, 0.817692, -0.589615, 0.802308, 0.438563, 0.741226, 0.717291, 0.6157, 0.972333, 0.563389, 0.575948, 0.374496, 0.552882, 0.411891, 0.71701, 0.885682, -0.145794, 0.999484, 0.92953, 0.107038, 0.870991, 0.669585, 0.113671, 0.593466, 0.466403, -0.165957, 0.317673, 0.612945, 0.384582, 0.419597, 0.705126, -0.159968, 0.758902, 0.787296, -0.197762, 0.408043, -0.380286, 0.551041, -0.116752, 0.65265, 0.664965, -0.221948, 0.643443, 0.546449, 0.20853, 0.159557, -0.450986, 0.521719, 0.715065, 0.0857414, 0.652151, 0.666292, -0.33, 0.557781, 0.274713, -0.897991, 0.177166, 0.286988, 0.173442, 0.497853, 0.407118, 0.968993, 0.753269, 0.826974, 1.08477, 0.407906, 0.983688, 0.917119, 0.51925, 0.866021, 0.270427, 0.9906, 0.566374, 0.924991, 0.995132, -0.416479, 0.893779, 0.616318, 0.428736, 0.474229, -0.52538, -0.108178, 0.673218, 0.553261, 0.4084, 0.659609, 0.0908095, 0.818466, 0.551508, 0.569514, 0.761739, 0.202032, 0.283915, 0.245378, 0.29632, 0.636949, 0.590028, 0.323006, 0.864636, 0.658226, 0.461732, 0.707238, -0.634943, 0.665702, 0.220272, 0.578048, 0.489873, 0.549108, 0.888854, 0.657227, 0.309089, 0.715802, 0.469232, 0.226345, 0.661337, 0.506392, 0.260359, 0.768925, 0.577205, 0.543989, 0.91107, 0.664347, 0.440841, 0.728671, 0.302365, -0.433853, 0.241997, 0.475203, 0.132254, 0.784378, 0.484384, 0.739248, 0.930232, 0.31308, 0.663833, 0.377094, 0.640555, 0.669037, 0.399161, 0.834885, 0.323059, 0.701314, 0.717684, -0.267447, 0.586104, 0.131724, 0.363122, 0.464091, 0.212708, -0.530683, 0.365844, 0.784464, 0.793931, -0.477303, 0.892657, 0.847352, 0.312206, 0.958356, 0.810078, 0.0258656, 0.564742, -0.987342, 0.456022, -1.76878, 0.593131, 0.446065, 0.316414, 0.619953, 0.0789103, 0.338904, 0.132356, 0.31382, 0.471325, -0.81352, 0.530731, 0.452709, -0.509555, 0.116907, 0.226998, 0.661612, 0.349868, 0.616247, 0.834637, -0.0667014, 0.931334, 1.02983, 0.388133, 0.874909, 0.940644, 0.18001, 0.674028, 0.594295, -0.57381, 0.189032, -0.362846, 0.193824, -0.322187, -0.436876, -1.12184, -0.560155, 0.331995, 0.45299, -0.106565, 0.0253304, -0.435524, 0.439768, 0.189158, 0.386851, 0.517482, 0.0852556, 0.756843, 0.662164, -0.66083, 0.443646, 0.288705, 0.225533, 0.491498, 0.295013, 0.56102, 0.903911, 0.663521, 0.604594, 0.914913, 0.529357, 0.622567, 0.736226, -0.265797, 0.810238, 0.775772, -0.599883, 0.644548, 0.554163, 0.107813, 0.672185, 0.472675, 0.186514, 0.443622, 0.109476, 0.711453, 0.388912, 0.679222, 0.885327, 0.345233, 0.708024, 0.781672, 0.193436, 0.0384621, -1.07228, -0.669176, 0.632755, 0.791823, 0.023138, 0.742785, 0.638457, 0.555156, 0.88306, 0.409578, 0.631792, 0.622356, -0.0344621, 0.517447, 0.204622, -0.0270409, 0.356374, -0.184782, 0.658233, 0.779622, -0.72789, 0.802308, 0.54771, 0.592032, 0.584622, 0.66189, 0.903678, 0.147445, 1.09955, 1.0064, 0.527111, 1.02777, 0.560817, 0.817247, 0.831026, -0.324019, 0.553692, -0.891045, 0.426532, -0.884277, 0.398487, -0.270427, 0.644724, 0.365636, 0.57973, 0.781717, 0.292152, 0.493127, 0.644791, 0.453355, -0.118055, 0.240218, 0.621469, 0.598218, -0.117476, 0.0170755, 0.14681, 0.572591, -0.383165, 0.73504, 0.688424, 0.517541, 0.955389, 0.649015, 0.673166, 0.849502, 0.010274, 0.65375, 0.548738, -0.48426, 0.29395, 0.321377, 0.438726, 0.185953, 0.536532, 0.844839, 0.43965, 0.766639, 0.923587, 0.38112, 0.429219, -2.51392, 0.620577, -0.0185096, 0.766348, 0.691532, 0.604306, 0.917955, 0.150549, 0.790267, 0.470395, 0.739805, 0.688325, 0.703533, 0.958378, -0.631618, 1.00743, 0.78177, 0.834083, 1.022, -0.788055, 0.991018, 0.817363, 0.644364, 0.977884, 0.747956, -0.317852, 0.015514, 0.262913, 0.567561, 0.472914, 0.272951, 0.728771, 0.433432, 0.324428, 0.340058, 0.207628, 0.349362, 0.304464, 0.66189, 0.04383, 0.562151, 0.493606, 0.0832108, 0.443796, -0.634325, 0.143568, -0.221667, 0.419122, 0.159732, -0.517134, 0.09564, 0.638874, 0.588153, 0.0250701, 0.749503, 0.735636, -0.000233573, 0.63083, 0.846612, 0.690984, 0.230371, 0.880481, 0.796485, 0.227725, 0.8454, 0.459908, 0.705782, 0.753679, 0.321497, 0.843829, 0.168447, 0.849607, 0.841673, 0.00484551, 0.698591, -0.558358, 0.80528, 0.635608, 0.413485, 0.683066, 0.0174803, 0.155784, -0.165414, 0.253638, 0.373573, 0.81856, 0.553925, 0.655054, 0.922311, 0.598771, 0.440882, 0.690357, 0.413655, -1.22165, 0.221813, 0.499433, 0.54757, -0.00141343, 0.354481, 0.173526, 0.527993, 0.779181, 0.296337, 0.648945, 0.733415, -1.81108, 0.642155, 0.33531, 0.500744, 0.590397, 0.199652, 0.818832, 0.65161, 0.50776, 0.929714, 0.7701, 0.222742, 0.804142, 0.629376, 0.00448651, 0.542196, 0.354725, 0.141141, 0.459875, 0.538085, -1.27805, 0.598803, 0.423348, 0.514797, 0.759596, -0.57147, 0.833828, 0.785218, 0.299758, 0.871047, 0.606213, 0.44056, 0.630523, -0.52491, 0.32861, -0.382079, 0.569394, 0.478864, -0.237163, 0.478523, 0.454604, 0.00955897, 0.344196, 0.788774, 0.858458, 0.369406, 0.704739, 0.85092, 0.100195, 0.725578, 0.673772, 0.183709, 0.706166, 0.346395, 0.349799, 0.452528, -0.203518, -0.694571, -0.196642, -1.12782, 0.468606, 0.645214, 0.299285, 0.316828, 0.562383, 0.197218, 0.24793, 0.543925, 0.436207, -0.0307804, -0.285757, 0.322606, 0.448212, -0.176573, 0.796786, 0.834747, -0.146462, 0.946604, 0.85343, 0.533806, 0.994928, 0.589501, 0.828641, 0.916173, -0.240524, 0.887026, 0.720849, -0.0543239, 0.270655, -0.0165121, -0.28359, 0.470017, 0.354246, 0.589239, 0.867255, 0.483285, 0.461588, 0.39972, 0.183382, -0.0697146, 0.637771, 0.71348, 0.124311, 0.814673, 0.509741, 0.493911, 0.509747, 0.154854, 0.254452, 0.501999, 0.643065, 0.255495, 0.772903, -0.484791, 0.975097, 0.874387, 0.683992, 1.05972, 0.495382, 0.988597, 1.05898, 0.232223, 0.804573, 0.709318, -0.848751, -0.059576, 0.0991299, 0.163702, -0.112658, 0.325402, 0.215486, 0.000996298, -0.840883, 0.328519, 0.605922, 0.361513, 0.247035, 0.432057, -0.0199723, 0.584044, 0.266745, 0.135691, -0.262087, 0.358584, 0.126047, 0.36972, 0.186404, 0.675554, 0.864065, -1.47096, 0.986242, 0.976949, -0.415585, 0.891578, 0.744828, -0.380119, 0.327946, -0.157868, 0.10978, 0.469643, 0.10164, 0.301356, -0.11248, 0.606054, 0.617068, 0.388533, 0.779397, -0.311123, 0.942148, 0.776579, 0.712384, 0.944876, -0.0769525, 1.00456, 0.733728, 0.838277, 1.00642, 0.189224, 0.73216, 0.363631, 0.401261, -0.182577, 0.816293, 0.534226, 0.859135, 1.05464, 0.449863, 0.863409, 0.815707, 0.351488, 0.828791, 0.439355, 0.369522, 0.329293, -0.0143337, 0.320364, 0.0975967, -0.129833, -1.34105, 0.296387, 0.482314, -0.199674, 0.374991, -0.0344425, 0.567405, 0.626645, 0.281624, 0.880964, 0.704469, 0.537429, 0.938774, 0.795979, -0.28048, 0.44176, 0.456878, 0.224541, -0.525535, 0.448861, 0.569704, 0.192294, 0.118608, 0.208944, -1.85551, -0.384663, -0.163871, -0.207524, -0.173176, -0.821982, 0.528163, 0.580065, 0.148016, 0.802467, 0.557106, 0.602085, 0.784562, -1.01305, 0.66435, -0.120472, 0.965008, 0.883287, 0.618486, 1.06867, 0.725, 0.843075, 1.02061, 0.478837, 0.669712, 0.670575, -0.194367, -0.14109, -0.251728, -0.331996, -0.00849738, -0.497083, 0.372843, 0.437772, -0.144923, 0.575266, 0.37985, 0.172084, 0.524969, 0.390914, 0.239517, 0.36168, 0.292199, -0.323032, 0.424016, 0.318839, -0.734022, 0.137508, 0.0495302, 0.131543, 0.37782, 0.244166, 0.303032, 0.782236, 0.749359, -0.712233, 0.791278, 0.774072, -0.0432153, 0.860316, 0.758023, 0.388035, 0.893774, 0.547906, 0.775822, 0.987285, 0.581833, 0.580545, 0.622376, 0.00239465, 0.467555, 0.0736187, 0.638097, -0.128776, 0.71434, 0.711613, -0.0590967, 0.696662, 0.477238, -0.580939, -0.355709, 0.421454, -0.0771867, 0.590465, 0.686585, -0.699678, 0.733173, 0.685353, -0.828076, 0.433971, 0.13568, 0.231903, 0.58119, 0.618354, 0.312358, 0.41677, 0.817933, 0.691286, 0.341696, 0.878143, 0.702995, 0.358707, 0.773525, 0.454973, 0.156564, 0.050452, 0.359668, 0.500414, -0.65408, 0.597591, 0.58996, -1.41932, 0.629408, 0.747987, 0.465486, 0.152002, 0.488588, -0.766243, 0.572611, 0.535403, -0.0471432, 0.552491, 0.204369, -0.0474611, -0.413011, 0.364419, -0.102988, 0.797179, 0.678863, 0.72034, 1.08405, 0.764926, 0.839246, 1.01285, 0.0302327, 0.86921, 0.642527, 0.554572, 0.574138, 0.587344, 0.884681, 0.399561, 0.560007, 0.474765, -0.00105185, 0.0948162, 0.0641197, -0.286119, 0.336344, -0.183012, 0.647311, 0.654849, 0.483677, 0.920262, 0.396352, 0.905438, 0.986347, -0.0356663, 0.787256, 0.573359, 0.14722, -0.160995, 0.411518, -0.770621, 0.858406, 0.901305, -0.474078, 0.854859, 0.571031, 0.627911, 0.717831, 0.191267, 0.78353, 0.412117, 0.51794, 0.595592, -0.77972, 0.508805, 0.40847, -1.06817, 0.261222, 0.262939, 0.00929437, 0.718524, 0.748387, -0.0665386, 0.919684, 0.853619, 0.469331, 1.02782, 0.871539, 0.0989943, 0.634542, -0.203079, 0.106513, 0.312632, 0.590067, -0.299468, 0.693552, 0.279843, 0.668925, 0.678473, 0.291356, 0.72356, -0.655579, 0.734706, 0.542154, 0.311262, 0.334073, 0.399475, 0.526045, 0.168998, 0.603947, -1.11831, 0.62519, 0.344383, -0.0150544, 0.324914, 0.845168, 0.447819, 0.953443, 1.11287, 0.194653, 1.07302, 1.00155, 0.5958, 1.05042, 0.55119, 0.816772, 0.722769, 0.539031, 0.793331, -0.314403, 0.554054, -0.7401, 0.611891, 0.297392, 0.488263, 0.504083, 0.227723, 0.66641, 0.434188, -0.793384, -0.402263, 0.0168025, -0.0278613, 0.577604, 0.600845, 0.212152, -0.0906561, 0.408059, 0.581357, 0.439934, 0.325407, 0.850595, 0.768024, 0.182045, 0.832247, 0.552502, 0.60881, 0.836221, 0.367124, 0.508765, 0.588459, -0.287891, 0.430629, 0.593218, 0.527415, -0.013398, 0.376962, 0.560866, 0.135664, -0.0561589, -0.0486793, 0.615405, 0.377366, 0.630537, 0.865577, 0.168969, 0.83033, 0.861257, -0.336005, 0.571852, -0.143725, 0.438487, -0.655971, 0.571386, 0.000451238, 0.782277, 0.833393, 0.168557, 0.907243, 0.533376, 0.839592, 0.967227, -0.479695, 0.956208, 0.933098, -0.0816959, 0.64217, 0.490451, -0.610596, -0.0221408, -0.532927, -0.264227, -0.107068, 0.356195, 0.476617, 0.417813, -0.209552, 0.387127, 0.58765, 0.146297, 0.520407, 0.752591, 0.50255, 0.176713, 0.572221, 0.268006, 0.186468, 0.4395, -0.169824, 0.413462, 0.615394, 0.473848, -0.197903, 0.0707275, 0.368249, 0.502445, 0.384116, 0.171197, 0.805605, 0.834206, -0.0958479, 0.752763, 0.681734, 0.35813, 0.781343, 0.100097, 0.704588, 0.490013, 0.731962, 0.930557, -0.0822983, 0.929974, 0.894525, 0.105806, 0.828677, 0.377604, 0.694433, 0.783594, 0.0626888, 0.479689, 0.503756, 0.251932, -0.184644, 0.187102, 0.68246, 0.753217, 0.294572, 0.470965, 0.63048, 0.229664, 0.0626687, 0.350406, 0.396425, 0.374783, -0.111135, 0.266526, 0.430468, -0.0975825, -0.146733, -0.0392139, 0.529871, 0.385619, 0.181319, 0.530293, -0.175231, 0.475739, 0.456939, -0.181446, 0.498124, 0.234532, 0.402082, 0.793281, 0.778236, -0.208538, 0.817648, 0.926904, 0.178431, 0.896519, 0.960396, -0.10966, 0.825742, 0.662229, 0.324634, 0.39592, 0.585149, 0.797726, -1.07901, 0.791826, 0.438823, 0.705088, 0.710697, 0.450056, 0.806901, -0.406802, 0.888225, 0.685096, 0.539604, 0.639091, 0.504478, 0.842132, -0.507197, 0.885292, 0.775514, 0.434928, 0.854502, 0.585959, -0.148613, 0.362758, 0.578618, 0.799822, 0.676971, 0.447428, 0.913782, 0.539155, 0.777738, 0.866352, 0.0718221, 0.86004, 0.342712, 0.81143, 0.823858, -0.106604, 0.650245, -1.41808, 0.664593, 0.297426, 0.56925, 0.632392, -0.695476, 0.490845, 0.2513, -2.06902, -0.821421, -0.501274, 0.493717, 0.718206, 0.543424, -0.309178, 0.5081, 0.590444, 0.48352, -0.56559, 0.739679, 0.863229, 0.179351, 0.808466, 0.775952, 0.566983, 1.00606, 0.607038, 0.847473, 0.933586, -0.284883, 0.839474, 0.404552, 0.649797, 0.527017, 0.467871, 0.560383, 0.425746, 0.813849, 0.481224, 0.134193, -0.149488, -0.0732168, 0.368774, 0.770264, 0.238598, 0.863104, 0.971749, 0.0712898, 0.798631, 0.566059, 0.521652, 0.57526, 0.203461, 0.454321, 0.274477, 0.511757, 0.479807, 0.869596, 0.0411297, 0.930047, 0.84917, 0.716564, 1.09464, 0.721536, 0.788598, 0.849726, 0.153776, 0.766144, -0.417834, 0.772827, 0.553514, 0.646563, 0.917133, 0.659607, 0.155891, 0.641674, 0.57513, 0.076304, 0.29694, 0.562677, 0.225529, 0.403959, 0.638304, 0.242495, 0.226198, 0.270422, -0.522727, 0.157383, 0.15782, 0.404592, 0.576787, 0.154156, 0.608966, 0.811115, 0.292669, 0.674177, 0.789807, 0.328813, 0.021766, -1.08049, 0.183809, -0.922165, 0.396109, 0.436387, -0.0274332, -0.48027, -0.00524186, 0.332226, 0.289782, 0.320357, 0.826417, 0.693832, 0.503927, 0.891708, 0.208735, 0.925892, 0.958017 - }; + 0.795473, 0.972849, 1.07672, 0.0568964, 0.792985, 0.205874, 0.705567, 0.491031, 0.507141, 0.532529, 0.309806, 0.572354, -0.0991353, 0.575392, -0.304082, 0.50318, 0.0391823, 0.510708, 0.460578, -0.0294507, 0.0884835, 0.464007, 0.672531, -0.130066, 0.569366, 0.518827, -0.365837, -0.68221, -1.21776, 0.515545, 0.870805, 0.725791, 0.516013, 0.947683, 0.650808, 0.648243, 0.860896, 0.265716, 0.622869, 0.659744, -0.0496158, 0.299959, 0.336946, -0.53946, 0.426813, 0.665693, 0.453011, 0.253862, 0.569747, -1.75195, 0.606089, 0.172911, 0.687525, 0.706617, 0.517643, 1.0028, 0.787654, 0.51791, 0.793942, 0.0452117, 0.342491, 0.0924926, 0.591805, 0.0261381, 0.86273, 0.60729, 0.803682, 1.01061, 0.304643, 0.866393, 0.756261, 0.568085, 0.902244, 0.448773, 0.560316, 0.600576, -0.1363, -0.189791, -0.279525, 0.324729, 0.609983, 0.418013, 0.00109498, 0.202943, 0.0697743, 0.146329, 0.525746, 0.821069, 0.289588, 0.807566, 0.899508, -1.53664, 0.906226, 0.869314, -0.444392, 0.601352, 0.306823, 0.192444, 0.275229, -1.39533, -0.457893, -0.04243, -0.0212602, 0.0268324, 0.349671, -0.701037, 0.673837, 0.809717, 0.390074, 0.639192, 0.87033, 0.547089, 0.466869, 0.65478, -0.880247, 0.629248, 0.266404, 0.575497, 0.593482, 0.496632, 0.948801, 0.739299, 0.550506, 0.891825, 0.510113, 0.557074, 0.715521, 0.259283, 0.0963212, 0.192291, -0.206238, -0.220262, 0.427443, 0.630762, 0.362229, 0.474202, 0.809676, 0.632777, -0.149106, 0.47385, 0.188831, -1.0758, -0.480845, -0.684069, 0.468306, 0.669181, 0.350257, 0.284355, 0.440238, -1.13763, 0.233979, -0.394353, 0.403633, -0.619848, 0.660502, 0.753259, -0.0771909, 0.673444, 0.657885, 0.0978312, 0.77498, 0.555775, 0.627699, 0.977513, 0.774379, 0.541819, 0.956494, 0.6852, 0.612752, 0.889224, 0.526291, 0.260028, 0.07401, 0.350711, 0.137025, 0.535501, 0.660599, -0.0866018, 0.764162, 0.573648, 0.221889, 0.334204, 0.356586, 0.550785, 0.156076, 0.745237, 0.399557, 0.496773, 0.439463, 0.493981, 0.756013, 0.130587, 0.558575, 0.506178, -1.35537, 0.0840673, 0.189631, 0.641904, 0.802335, 0.058402, 0.911319, 0.990308, -0.441947, 1.02451, 0.912979, 0.443972, 0.854972, -0.802627, 0.822428, 0.463363, 0.76099, 0.851616, -0.746722, 0.65732, 0.102254, 0.58715, 0.532495, -0.073784, 0.387311, -0.446845, 0.0937605, -0.0966128, -0.0244458, 0.415514, 0.463975, -0.615899, 0.453403, 0.543264, 0.309538, -0.456298, 0.580616, 0.835913, 0.70525, 0.426494, 0.964779, 0.808989, 0.457768, 0.839737, -0.209958, 0.845243, 0.738745, 0.382852, 0.737357, -0.288429, 0.618079, 0.376761, 0.12705, -0.18889, 0.380271, 0.308204, -0.0655833, -0.0581144, 0.178205, -0.460858, 0.626891, 0.594168, 0.631692, 1.01791, 0.66961, 0.84846, 1.00964, 0.369929, 0.607096, -0.090782, 0.615821, -0.048096, 0.741088, 0.502291, 0.800376, 0.931397, 0.168949, 0.996431, 0.593036, 0.944451, 1.02154, -0.00411738, 0.986996, 0.681198, 0.703851, 0.780121, 0.0665906, 0.670139, -3.01492, 0.702537, 0.534264, 0.284595, 0.685984, 0.677043, 0.597809, 0.237365, 0.489327, 0.808981, 0.495109, 0.634834, 0.854162, 0.350708, 0.541807, 0.485031, 0.0836082, 0.427459, -0.199301, -0.6218, 0.0837791, -0.0239749, 0.365658, 0.573573, -1.21203, 0.684389, 0.638816, -0.18355, 0.613779, 0.538442, 0.269531, 0.253777, 0.212156, -1.88876, 0.100023, -0.0843845, -0.104868, 0.322038, 0.054084, 0.633778, 0.92033, 0.529751, 0.843204, 0.988686, -2.07796, 1.01619, 0.886157, 0.649402, 0.997455, 0.380489, 0.830763, 0.751327, 0.309745, 0.661608, -0.340352, 0.0623111, 0.563923, 0.847193, 0.326829, 0.744955, 0.785774, -0.601377, 0.629498, 0.233034, 0.16462, -0.37909, 0.608462, 0.497079, 0.228012, 0.626341, 0.309661, 0.0545433, 0.305251, 0.230884, 0.196172, -0.895795, 0.505062, 0.665654, -0.0800244, 0.65911, 0.611902, 0.51997, 0.97802, 0.831471, 0.384315, 0.926229, 0.759088, 0.181606, 0.740095, 0.545228, -0.457531, 0.0467664, 0.122342, 0.442337, -0.536453, 0.571911, 0.621561, -0.717698, 0.652676, 0.547292, 0.116449, 0.574731, 0.132739, 0.0976403, -0.327082, 0.582115, 0.466818, 0.214112, 0.455732, 0.314938, 0.794701, 0.356824, 0.802062, 0.94273, 0.0419479, 0.914951, 0.965125, 0.351425, 0.635155, 0.703601, 0.310548, -0.265075, 0.188317, 0.189225, -0.297783, 0.0509446, 0.146972, -0.577115, 0.0393648, 0.145319, 0.679424, 0.620989, -0.231899, 0.586157, 0.19821, 0.480766, 0.576109, -0.52211, 0.609699, 0.514867, -0.114436, 0.588207, 0.607886, 0.367016, -0.774408, 0.281377, 0.55019, 0.582484, 0.270538, 0.282594, 0.706761, 0.632527, 0.114117, 0.859302, 0.846632, -0.987939, 0.752128, 0.451079, 0.706481, 0.849682, -0.283247, 0.900634, 0.695938, 0.659158, 0.880396, -0.477998, 0.807604, 0.465912, 0.755365, 0.865136, -0.740791, 0.777394, 0.678524, -0.112646, -1.56618, -0.319069, 0.353989, 0.709086, 0.200981, 0.804804, 0.955249, 0.431768, 0.632381, 0.568813, 0.081002, 0.319436, 0.0896407, 0.249987, 0.272222, 0.4739, 0.150951, 0.62615, -0.221986, 0.849205, 0.701138, 0.598027, 0.893349, 0.197361, 0.711076, 0.374285, 0.737613, 0.799814, 0.243742, 0.897604, 0.592339, 0.72737, 0.979064, 0.749875, 0.0585756, 0.720669, 0.716242, 0.25912, 0.434577, 0.667582, 0.267471, 0.372276, 0.394133, 0.144388, 0.524937, -0.214884, 0.32492, -0.310282, 0.262693, -0.0619616, 0.765315, 0.676842, 0.437305, 0.82719, 0.102285, 0.778883, 0.694771, 0.252773, 0.475536, 0.541842, 0.848714, -0.0979529, 0.883922, 0.862197, -0.256088, 0.741626, 0.583983, 0.110903, 0.114743, -1.11764, 0.639562, 0.697504, 0.280838, 0.894079, 0.417457, 0.941516, 1.02978, -0.391462, 0.993654, 0.712726, 0.776593, 0.880554, -0.0514673, 0.7002, 0.234296, 0.904733, 0.460878, 0.857639, 0.910753, -0.190953, 0.795799, 0.350793, 0.448334, -0.858737, 0.735372, 0.578852, 0.63277, 0.9119, 0.473743, 0.60808, 0.662983, -0.427558, 0.641784, 0.647132, 0.30352, 0.120857, 0.619848, 0.536958, 0.349553, 0.894758, 0.793182, 0.298432, 0.878293, 0.658296, 0.281387, 0.53494, -2.18159, 0.151955, 0.229238, 0.619761, 0.253461, 0.394591, 0.587196, 0.417723, 0.232908, 0.0230616, 0.0294786, 0.448376, -0.224543, 0.59546, 0.669471, -1.09503, 0.557786, 0.168611, 0.431334, 0.42588, -0.505732, -0.495336, 0.347146, -0.240929, 0.770996, 0.88372, 0.102986, 1.06397, 0.978736, 0.544148, 1.05696, 0.714516, 0.698569, 0.681938, 0.618919, 0.902036, 0.0363543, 0.81521, 0.66489, 0.518993, 0.815115, 0.378838, 0.333931, 0.305203, -0.744157, -0.247179, -1.02903, 0.0023867, 0.216078, -0.150924, 0.60779, 0.542308, 0.183069, 0.754702, 0.668445, -1.0316, 0.559729, 0.682293, 0.646097, 0.447052, -0.395105, 0.5417, 0.516821, -0.271977, 0.611216, 0.549802, -0.789155, 0.407802, -0.0050087, 0.377387, 0.507532, -2.09526, 0.599601, 0.588567, -0.0501034, 0.701533, 0.479442, 0.534933, 0.785397, -0.342851, 0.861983, 0.832765, 0.446483, 1.03771, 0.928477, -0.147737, 0.762511, 0.481071, 0.0377071, -0.057179, -0.0846982, 0.0246056, 0.662155, 0.559031, 0.313361, 0.73081, 0.307376, 0.514259, 0.544386, -0.00205932, 0.578626, 0.20028, 0.326367, 0.45148, -0.184004, 0.13144, 0.238912, 0.100968, -0.0748691, -0.0179252, 0.330602, 0.574429, 0.50377, 0.0531897, 0.781083, 0.764937, -0.149289, 0.875365, 0.883331, 0.0561433, 0.733052, 0.795688, 0.261754, 0.468962, 0.592297, -0.0253964, 0.399482, 0.433911, -0.356859, 0.466426, 0.10431, 0.408641, 0.535046, -0.317742, 0.0215226, 0.349464, 0.755776, 0.453047, 0.616751, 0.786677, -0.499853, 0.686828, 0.314589, 0.541589, 0.227905, 0.778299, 0.861723, 0.414725, 1.07245, 0.880984, 0.736126, 1.04823, 0.56671, 0.775743, 0.805458, -0.508221, 0.400732, -0.888724, 0.23071, -0.0464701, 0.16706, 0.62919, 0.586146, 0.274373, 0.790991, 0.452681, 0.548319, 0.585048, 0.165758, 0.48853, 0.36102, 0.792748, 0.148268, 0.811333, 0.841393, -1.4035, 0.671897, 0.365514, 0.0248286, -0.685588, 0.357405, -0.0524141, 0.810932, 0.798911, -0.298023, 0.73813, 0.411662, 0.593635, 0.779277, 0.289432, 0.546662, 0.76202, 0.564092, 0.191193, 0.806611, 0.785856, -0.518746, 0.805533, 0.6879, 0.302432, 0.636564, 0.14636, 0.795392, 0.217924, 0.838353, 0.83778, 0.446354, 0.986834, 0.755423, 0.297911, 0.430935, 0.260771, 0.329813, 0.412059, 0.545271, 0.354735, 0.755793, -1.00065, 0.851099, 0.683745, 0.65561, 0.918293, 0.322927, 0.672649, 0.629431, -0.0697081, 0.116578, 0.444471, 0.032146, 0.827006, 0.642133, 0.720694, 0.977939, 0.348213, 0.754633, 0.322684, 0.870228, 0.863962, 0.624987, 1.05886, 0.587664, 0.9229, 0.955038, 0.204512, 0.927421, 0.560535, 0.652687, 0.731159, -0.439419, 0.422587, 0.263821, 0.204795, 0.486069, 0.352426, 0.298848, 0.684808, 0.390398, 0.402504, 0.719956, 0.677582, 0.464186, -0.574736, 0.469084, 0.610557, 0.0239547, 0.4528, 0.334258, 0.360295, 0.546212, 0.11542, 0.747197, 0.40534, 0.634782, 0.755272, -0.984177, 0.686834, 0.370546, 0.548191, 0.73045, 0.353288, 0.112165, 0.447711, 0.468821, 0.0226375, 0.609911, 0.942587, 0.804452, 0.436839, 0.946854, 0.697153, 0.47772, 0.640953, 0.0403645, 0.547411, 0.133226, 0.739683, 0.14385, 0.737561, 0.671214, 0.430617, 0.724112, 0.10051, 0.863877, 0.558789, 0.654545, 0.707873, 0.419705, 0.85617, 0.277042, 0.729322, 0.577478, 0.694593, 0.966137, 0.525598, 0.779525, 0.963928, 0.660716, 0.32524, 0.746918, 0.682985, 0.137296, 0.38953, 0.605986, 0.334139, 0.030182, 0.294367, -0.504418, 0.434036, 0.371951, -0.992259, 0.0257867, -1.1318, 0.141837, 0.199539, -0.143933, -0.802687, -0.162355, 0.243968, 0.278842, -0.91909, 0.427933, 0.601438, 0.386449, -0.433648, 0.268495, 0.303936, 0.418382, 0.486615, -0.675303, 0.758602, 0.92655, 0.445017, 0.803958, 0.906794, -0.219956, 0.969807, 0.859269, 0.436202, 0.883459, 0.260515, 0.799873, 0.804871, -0.432714, 0.652204, 0.291991, 0.225607, -0.133308, 0.450635, 0.5421, -0.531024, 0.460699, 0.524223, 0.290317, -0.771251, 0.297974, 0.617356, 0.651082, 0.307485, 0.144729, 0.487246, 0.329864, -0.415188, 0.490798, 0.649329, 0.46667, 0.0307675, 0.601541, 0.387197, 0.339572, 0.655189, 0.204402, 0.546944, 0.75038, 0.497246, 0.0917764, 0.619056, 0.603753, 0.000788777, 0.432728, 0.566423, -0.0310765, 0.179861, -0.0482441, 0.757225, 0.706532, 0.464003, 0.954832, 0.610526, 0.854271, 1.03117, 0.354956, 0.839473, 0.739848, 0.359735, 0.621164, 0.190707, 0.667608, -1.34013, 0.635593, -0.74889, 0.80687, 0.609879, 0.759804, 0.979422, 0.0644231, 0.953909, 0.943832, -0.171555, 0.576825, -0.0331355, 0.316155, -0.516775, 0.31811, -0.347008, 0.390571, 0.328212, -0.553493, -0.00947686, 0.352668, -0.0162983, 0.816419, 0.781491, 0.349447, 0.919133, 0.566688, 0.767608, 0.889353, -1.09496, 0.843245, 0.674326, 0.377172, 0.754915, 0.597163, 0.299857, 0.186029, -2.0374, 0.463354, 0.546632, -0.387846, 0.463657, 0.509939, 0.251926, -0.144154, -0.192762, 0.466165, 0.54639, -0.230484, 0.339834, -0.467021, 0.511909, 0.196147, 0.666227, 0.758968, 0.361307, 0.973395, 0.66925, 0.808954, 0.905746, 0.525313, 1.1043, 0.857489, 0.77156, 1.00461, 0.39682, 0.671256, 0.552754, -0.848425, 0.13908, 0.516148, -0.116878, 0.83453, 0.751537, 0.287568, 0.714856, -0.94112, 0.628405, -0.31133, 0.707563, 0.422956, 0.701665, 0.811452, -0.615267, 0.639285, -0.289361, 0.797435, 0.53357, 0.568081, 0.596305, 0.396774, 0.629951, 0.419532, 0.870005, -0.0663181, 0.976382, 0.951679, 0.507318, 1.09537, 0.924572, 0.417815, 0.895388, 0.622578, 0.137351, 0.483027, 0.231638, -0.434149, -1.4552, -0.265469, 0.342529, 0.529522, 0.245234, 0.211764, 0.383866, -0.169449, 0.472308, -0.371607, 0.558252, 0.474791, 0.254418, 0.603301, -0.0173795, 0.349865, 0.116036, -0.512394, 0.333857, 0.746097, 0.458976, 0.702398, 0.936443, 0.43627, 0.774843, 0.901127, 0.510254, 0.00721503, 0.126318, -0.251894, -0.287704, -0.106881, 0.50235, 0.34509, 0.506795, 0.798608, 0.117546, 0.7917, 0.754336, 0.448479, 0.874614, 0.221382, 0.77363, 0.55225, 0.779094, 0.955301, -0.358233, 0.944027, 0.856329, 0.310188, 0.849627, 0.620899, -0.275552, 0.167404, 0.475954, -0.760982, 0.703597, 0.656184, 0.226447, 0.775155, 0.469441, 0.550827, 0.77055, 0.278112, 0.547178, 0.672735, -0.0258339, 0.581689, 0.720352, 0.390473, 0.195021, 0.469582, -0.0342854, 0.170712, 0.105877, -0.162408, -0.0310079, 0.283673, 0.712897, 0.712055, 0.106614, 0.567925, 0.789532, 0.616174, 0.0859149, 0.746931, 0.662319, 0.0964795, 0.766735, 0.603244, 0.257267, 0.630139, -0.147079, 0.54359, 0.468336, -0.619436, -0.344162, 0.310551, 0.196077, 0.485034, 0.703708, -0.290629, 0.903673, 0.894653, -1.23798, 0.755151, 0.439075, 0.466085, 0.354165, 0.594093, 0.804727, -0.154146, 0.813573, 0.815301, -0.258954, 0.835323, 0.802342, -0.179622, 0.625404, 0.622625, -1.04157, 0.651214, 0.687187, -0.0533212, 0.536558, 0.570522, -2.03416, 0.559496, 0.628726, 0.451951, 0.127457, -0.471759, 0.446207, 0.635476, 0.439775, -0.196003, 0.341585, 0.00334443, -1.08898, -0.225252, -0.0996369, 0.150741, 0.559655, 0.40707, -0.340924, 0.131594, -1.25033, -0.647714, 0.0863843, -0.868316, 0.622449, 0.726831, -0.0664545, 0.855741, 0.514466, 0.904689, 1.0652, -0.272661, 1.10088, 1.06346, 0.171669, 0.971924, 0.587894, 0.644881, 0.525765, 0.512765, 0.542543, 0.554238, 0.85181, 0.267851, 0.62048, 0.442807, 0.35858, 0.406992, 0.138776, 0.260085, 0.435419, 0.704623, 0.0687801, 0.516366, 0.304505, 0.357262, 0.453239, -0.184277, 0.46801, 0.374243, 0.358477, 0.497393, -0.188471, 0.74603, 0.899919, 0.00867975, 0.938103, 0.987464, 0.0545995, 0.796257, 0.656133, 0.265025, 0.609085, 0.0249516, 0.164966, -0.338169, 0.214294, 0.376961, 0.31951, -0.0292101, 0.22837, 0.589551, 0.324447, 0.384205, 0.495541, 0.393204, 0.851326, 0.494527, 0.728654, 0.855611, -0.600835, 0.728523, 0.459382, 0.0480022, 0.217517, 0.815229, 0.451254, 0.87706, 1.00076, 0.0434099, 1.08851, 0.94293, 0.620092, 0.9558, -0.0220902, 0.829601, 0.513479, 0.691823, 0.765511, -1.15415, 0.391276, -0.106515, 0.394507, -0.0765389, 0.483888, -0.719441, 0.516845, -0.382103, 0.531888, -0.662229, 0.901948, 0.890705, 0.443224, 1.03256, 0.753078, 0.757701, 0.957627, 0.390876, 0.488102, 0.0852637, 0.216723, 0.0942058, 0.745837, 0.537077, 0.498339, 0.679016, 0.0386949, 0.788875, 0.52763, 0.530491, 0.746515, 0.129665, 0.566965, 0.678264, 0.391832, -0.653792, 0.114506, -0.705631, 0.28256, 0.288387, 0.222492, 0.693879, 0.293102, 0.776321, 0.971292, 0.356542, 0.918321, 1.0126, 0.367231, 0.701413, 0.593476, 0.109528, 0.392252, -0.654725, -0.117249, 0.224625, 0.26132, 0.230964, 0.478556, 0.179221, 0.801415, 0.656118, 0.212051, 0.612333, 0.00418432, 0.18522, -1.81872, 0.139333, 0.128368, 0.630992, 0.280308, 0.520624, 0.63583, -0.0991293, -0.55858, 0.539843, 0.680991, 0.216417, 0.948659, 0.778235, 0.729863, 1.05438, 0.617168, 0.843444, 0.902745, 0.205062, 0.965789, 0.797252, 0.341564, 0.774543, 0.434432, 0.170511, 0.290563, -0.446305, -0.621864, 0.177418, 0.122748, 0.126503, 0.624446, 0.649227, 0.2635, 0.0808855, 0.339199, 0.0631333, -0.580876, -0.195417, -0.181609, 0.195253, 0.656401, 0.635654, -2.27528, 0.603992, 0.480548, 0.27038, 0.688386, 0.434547, 0.291981, 0.652494, 0.512495, -0.64186, 0.569109, 0.684068, 0.191524, 0.691377, 0.942082, 0.702393, 0.485543, 0.819255, 0.305163, 0.573532, 0.430959, 0.457113, 0.56311, 0.449252, 0.907431, 0.664704, 0.526343, 0.767866, -0.0720513, 0.591611, 0.397437, 0.202064, 0.324841, -0.243051, 0.0862653, 0.163312, 0.467427, -0.616717, 0.494172, 0.284078, 0.54242, 0.861081, 0.68213, 0.349247, 0.884289, 0.810164, -0.260031, 0.849514, 0.8517, 0.113328, 0.540666, 0.323985, 0.383683, 0.505975, 0.0270058, 0.643888, 0.332812, 0.401798, 0.541147, -0.785323, 0.42233, 0.367519, 0.0184781, -0.165865, -1.34215, 0.0863887, -0.522737, 0.558885, 0.737249, -0.196438, 0.813908, 0.836849, -0.162164, 0.841932, 0.720198, -0.34749, -0.704374, 0.399995, -1.09337, 0.804722, 0.803617, 0.425938, 0.963938, 0.515008, 0.887326, 0.923642, 0.342257, 0.936119, 0.168387, 0.953192, 0.896365, 0.443369, 0.895097, 0.102155, 0.81167, 0.6718, 0.467054, 0.757469, 0.142874, 0.531304, 0.64918, 0.595372, 0.510293, -2.335, 0.73699, 0.85954, 0.2994, 0.666933, 0.700017, -2.10742, 0.490835, 0.217348, -0.492667, 0.294354, 0.453551, -0.911014, 0.464588, -0.221685, 0.587978, 0.534213, 0.304782, 0.682987, 0.0112526, 0.59268, 0.566019, -0.903356, -0.105039, 0.192251, 0.406737, -0.499486, 0.360638, 0.526278, 0.587259, 0.502059, 0.120121, 0.865446, 0.827347, 0.50361, 1.08005, 0.907644, 0.658039, 0.989438, 0.150389, 0.896602, 0.709713, 0.642896, 0.774246, 0.321174, 0.818514, -0.121428, 0.722263, -0.00835645, 0.870505, 0.803742, 0.581317, 0.957903, 0.469723, 0.631085, 0.314347, 0.654854, 0.580453, 0.573073, 0.815567, -1.31865, 0.853889, 0.79521, -0.163406, 0.270302, 0.14084, 0.384215, 0.565991, -1.06979, 0.828069, 0.838641, 0.222615, 0.914919, 0.514259, 0.850573, 0.949893, -0.607875, 0.925986, 0.803892, -0.0632458, 0.482778, -0.178287, 0.443941, -1.1176, 0.49562, 0.247125, 0.326956, 0.615438, 0.517974, 0.150851, -0.209389, 0.403124, 0.464017, -0.0490166, 0.210535, 0.367066, 0.293987, 0.375613, 0.342339, 0.0331822, 0.701196, 0.554737, 0.513538, 0.818668, -1.70869, 0.977725, 0.970407, 0.158822, 0.992707, 0.782164, 0.580159, 0.86068, 0.381052, 0.250542, -1.42007, 0.42653, -0.0865955, 0.455277, 0.440213, -0.446002, 0.210632, -0.131652, 0.224484, 0.630703, 0.490622, 0.497185, 0.862076, 0.527888, 0.570909, 0.649103, 0.258585, 0.785303, 0.473882, 0.346754, 0.387323, -0.186502, -0.131438, 0.299622, 0.0318283, 0.687837, 0.905064, 0.339873, 0.856465, 0.952983, -0.027479, 0.86624, 0.835111, -0.731086, 0.636211, 0.130362, 0.537455, 0.468023, 0.455466, 0.854612, 0.676497, 0.279195, 0.739114, 0.345945, 0.582561, 0.744181, 0.0891246, 0.570608, 0.565441, -0.247978, 0.581208, 0.541305, 0.20761, -0.49324, 0.0841982, 0.550238, 0.60153, -0.966931, 0.722697, 0.8031, 0.255989, 0.524279, 0.645091, 0.400062, 0.101845, 0.0550648, -0.610986, -0.015697, -0.736081, 0.272404, 0.178385, 0.220065, 0.432635, 0.10473, 0.72846, 0.478505, 0.54522, 0.700629, 0.183866, 0.876523, 0.602168, 0.744976, 0.96256, 0.302915, 0.879959, 0.954604, 0.272777, 0.736491, 0.832027, 0.559815, -0.20912, -0.4854, -0.438887, -0.162661, 0.0184416, -0.257632, -0.0108987, 0.375703, 0.278776, -0.313241, 0.303298, -0.918619, 0.517761, 0.521605, 0.0267606, 0.642325, 0.256217, 0.524617, 0.552568, 0.236187, 0.664225, -0.853997, 0.758811, 0.611012, 0.623155, 0.973095, 0.786474, -0.137629, 0.625539, 0.593806, 0.430422, -0.535005, 0.619615, 0.821609, 0.364222, 0.703871, 0.757645, 0.316917, 0.888457, 0.451822, 0.773489, 0.774847, 0.400352, 0.817692, -0.589615, 0.802308, 0.438563, 0.741226, 0.717291, 0.6157, 0.972333, 0.563389, 0.575948, 0.374496, 0.552882, 0.411891, 0.71701, 0.885682, -0.145794, 0.999484, 0.92953, 0.107038, 0.870991, 0.669585, 0.113671, 0.593466, 0.466403, -0.165957, 0.317673, 0.612945, 0.384582, 0.419597, 0.705126, -0.159968, 0.758902, 0.787296, -0.197762, 0.408043, -0.380286, 0.551041, -0.116752, 0.65265, 0.664965, -0.221948, 0.643443, 0.546449, 0.20853, 0.159557, -0.450986, 0.521719, 0.715065, 0.0857414, 0.652151, 0.666292, -0.33, 0.557781, 0.274713, -0.897991, 0.177166, 0.286988, 0.173442, 0.497853, 0.407118, 0.968993, 0.753269, 0.826974, 1.08477, 0.407906, 0.983688, 0.917119, 0.51925, 0.866021, 0.270427, 0.9906, 0.566374, 0.924991, 0.995132, -0.416479, 0.893779, 0.616318, 0.428736, 0.474229, -0.52538, -0.108178, 0.673218, 0.553261, 0.4084, 0.659609, 0.0908095, 0.818466, 0.551508, 0.569514, 0.761739, 0.202032, 0.283915, 0.245378, 0.29632, 0.636949, 0.590028, 0.323006, 0.864636, 0.658226, 0.461732, 0.707238, -0.634943, 0.665702, 0.220272, 0.578048, 0.489873, 0.549108, 0.888854, 0.657227, 0.309089, 0.715802, 0.469232, 0.226345, 0.661337, 0.506392, 0.260359, 0.768925, 0.577205, 0.543989, 0.91107, 0.664347, 0.440841, 0.728671, 0.302365, -0.433853, 0.241997, 0.475203, 0.132254, 0.784378, 0.484384, 0.739248, 0.930232, 0.31308, 0.663833, 0.377094, 0.640555, 0.669037, 0.399161, 0.834885, 0.323059, 0.701314, 0.717684, -0.267447, 0.586104, 0.131724, 0.363122, 0.464091, 0.212708, -0.530683, 0.365844, 0.784464, 0.793931, -0.477303, 0.892657, 0.847352, 0.312206, 0.958356, 0.810078, 0.0258656, 0.564742, -0.987342, 0.456022, -1.76878, 0.593131, 0.446065, 0.316414, 0.619953, 0.0789103, 0.338904, 0.132356, 0.31382, 0.471325, -0.81352, 0.530731, 0.452709, -0.509555, 0.116907, 0.226998, 0.661612, 0.349868, 0.616247, 0.834637, -0.0667014, 0.931334, 1.02983, 0.388133, 0.874909, 0.940644, 0.18001, 0.674028, 0.594295, -0.57381, 0.189032, -0.362846, 0.193824, -0.322187, -0.436876, -1.12184, -0.560155, 0.331995, 0.45299, -0.106565, 0.0253304, -0.435524, 0.439768, 0.189158, 0.386851, 0.517482, 0.0852556, 0.756843, 0.662164, -0.66083, 0.443646, 0.288705, 0.225533, 0.491498, 0.295013, 0.56102, 0.903911, 0.663521, 0.604594, 0.914913, 0.529357, 0.622567, 0.736226, -0.265797, 0.810238, 0.775772, -0.599883, 0.644548, 0.554163, 0.107813, 0.672185, 0.472675, 0.186514, 0.443622, 0.109476, 0.711453, 0.388912, 0.679222, 0.885327, 0.345233, 0.708024, 0.781672, 0.193436, 0.0384621, -1.07228, -0.669176, 0.632755, 0.791823, 0.023138, 0.742785, 0.638457, 0.555156, 0.88306, 0.409578, 0.631792, 0.622356, -0.0344621, 0.517447, 0.204622, -0.0270409, 0.356374, -0.184782, 0.658233, 0.779622, -0.72789, 0.802308, 0.54771, 0.592032, 0.584622, 0.66189, 0.903678, 0.147445, 1.09955, 1.0064, 0.527111, 1.02777, 0.560817, 0.817247, 0.831026, -0.324019, 0.553692, -0.891045, 0.426532, -0.884277, 0.398487, -0.270427, 0.644724, 0.365636, 0.57973, 0.781717, 0.292152, 0.493127, 0.644791, 0.453355, -0.118055, 0.240218, 0.621469, 0.598218, -0.117476, 0.0170755, 0.14681, 0.572591, -0.383165, 0.73504, 0.688424, 0.517541, 0.955389, 0.649015, 0.673166, 0.849502, 0.010274, 0.65375, 0.548738, -0.48426, 0.29395, 0.321377, 0.438726, 0.185953, 0.536532, 0.844839, 0.43965, 0.766639, 0.923587, 0.38112, 0.429219, -2.51392, 0.620577, -0.0185096, 0.766348, 0.691532, 0.604306, 0.917955, 0.150549, 0.790267, 0.470395, 0.739805, 0.688325, 0.703533, 0.958378, -0.631618, 1.00743, 0.78177, 0.834083, 1.022, -0.788055, 0.991018, 0.817363, 0.644364, 0.977884, 0.747956, -0.317852, 0.015514, 0.262913, 0.567561, 0.472914, 0.272951, 0.728771, 0.433432, 0.324428, 0.340058, 0.207628, 0.349362, 0.304464, 0.66189, 0.04383, 0.562151, 0.493606, 0.0832108, 0.443796, -0.634325, 0.143568, -0.221667, 0.419122, 0.159732, -0.517134, 0.09564, 0.638874, 0.588153, 0.0250701, 0.749503, 0.735636, -0.000233573, 0.63083, 0.846612, 0.690984, 0.230371, 0.880481, 0.796485, 0.227725, 0.8454, 0.459908, 0.705782, 0.753679, 0.321497, 0.843829, 0.168447, 0.849607, 0.841673, 0.00484551, 0.698591, -0.558358, 0.80528, 0.635608, 0.413485, 0.683066, 0.0174803, 0.155784, -0.165414, 0.253638, 0.373573, 0.81856, 0.553925, 0.655054, 0.922311, 0.598771, 0.440882, 0.690357, 0.413655, -1.22165, 0.221813, 0.499433, 0.54757, -0.00141343, 0.354481, 0.173526, 0.527993, 0.779181, 0.296337, 0.648945, 0.733415, -1.81108, 0.642155, 0.33531, 0.500744, 0.590397, 0.199652, 0.818832, 0.65161, 0.50776, 0.929714, 0.7701, 0.222742, 0.804142, 0.629376, 0.00448651, 0.542196, 0.354725, 0.141141, 0.459875, 0.538085, -1.27805, 0.598803, 0.423348, 0.514797, 0.759596, -0.57147, 0.833828, 0.785218, 0.299758, 0.871047, 0.606213, 0.44056, 0.630523, -0.52491, 0.32861, -0.382079, 0.569394, 0.478864, -0.237163, 0.478523, 0.454604, 0.00955897, 0.344196, 0.788774, 0.858458, 0.369406, 0.704739, 0.85092, 0.100195, 0.725578, 0.673772, 0.183709, 0.706166, 0.346395, 0.349799, 0.452528, -0.203518, -0.694571, -0.196642, -1.12782, 0.468606, 0.645214, 0.299285, 0.316828, 0.562383, 0.197218, 0.24793, 0.543925, 0.436207, -0.0307804, -0.285757, 0.322606, 0.448212, -0.176573, 0.796786, 0.834747, -0.146462, 0.946604, 0.85343, 0.533806, 0.994928, 0.589501, 0.828641, 0.916173, -0.240524, 0.887026, 0.720849, -0.0543239, 0.270655, -0.0165121, -0.28359, 0.470017, 0.354246, 0.589239, 0.867255, 0.483285, 0.461588, 0.39972, 0.183382, -0.0697146, 0.637771, 0.71348, 0.124311, 0.814673, 0.509741, 0.493911, 0.509747, 0.154854, 0.254452, 0.501999, 0.643065, 0.255495, 0.772903, -0.484791, 0.975097, 0.874387, 0.683992, 1.05972, 0.495382, 0.988597, 1.05898, 0.232223, 0.804573, 0.709318, -0.848751, -0.059576, 0.0991299, 0.163702, -0.112658, 0.325402, 0.215486, 0.000996298, -0.840883, 0.328519, 0.605922, 0.361513, 0.247035, 0.432057, -0.0199723, 0.584044, 0.266745, 0.135691, -0.262087, 0.358584, 0.126047, 0.36972, 0.186404, 0.675554, 0.864065, -1.47096, 0.986242, 0.976949, -0.415585, 0.891578, 0.744828, -0.380119, 0.327946, -0.157868, 0.10978, 0.469643, 0.10164, 0.301356, -0.11248, 0.606054, 0.617068, 0.388533, 0.779397, -0.311123, 0.942148, 0.776579, 0.712384, 0.944876, -0.0769525, 1.00456, 0.733728, 0.838277, 1.00642, 0.189224, 0.73216, 0.363631, 0.401261, -0.182577, 0.816293, 0.534226, 0.859135, 1.05464, 0.449863, 0.863409, 0.815707, 0.351488, 0.828791, 0.439355, 0.369522, 0.329293, -0.0143337, 0.320364, 0.0975967, -0.129833, -1.34105, 0.296387, 0.482314, -0.199674, 0.374991, -0.0344425, 0.567405, 0.626645, 0.281624, 0.880964, 0.704469, 0.537429, 0.938774, 0.795979, -0.28048, 0.44176, 0.456878, 0.224541, -0.525535, 0.448861, 0.569704, 0.192294, 0.118608, 0.208944, -1.85551, -0.384663, -0.163871, -0.207524, -0.173176, -0.821982, 0.528163, 0.580065, 0.148016, 0.802467, 0.557106, 0.602085, 0.784562, -1.01305, 0.66435, -0.120472, 0.965008, 0.883287, 0.618486, 1.06867, 0.725, 0.843075, 1.02061, 0.478837, 0.669712, 0.670575, -0.194367, -0.14109, -0.251728, -0.331996, -0.00849738, -0.497083, 0.372843, 0.437772, -0.144923, 0.575266, 0.37985, 0.172084, 0.524969, 0.390914, 0.239517, 0.36168, 0.292199, -0.323032, 0.424016, 0.318839, -0.734022, 0.137508, 0.0495302, 0.131543, 0.37782, 0.244166, 0.303032, 0.782236, 0.749359, -0.712233, 0.791278, 0.774072, -0.0432153, 0.860316, 0.758023, 0.388035, 0.893774, 0.547906, 0.775822, 0.987285, 0.581833, 0.580545, 0.622376, 0.00239465, 0.467555, 0.0736187, 0.638097, -0.128776, 0.71434, 0.711613, -0.0590967, 0.696662, 0.477238, -0.580939, -0.355709, 0.421454, -0.0771867, 0.590465, 0.686585, -0.699678, 0.733173, 0.685353, -0.828076, 0.433971, 0.13568, 0.231903, 0.58119, 0.618354, 0.312358, 0.41677, 0.817933, 0.691286, 0.341696, 0.878143, 0.702995, 0.358707, 0.773525, 0.454973, 0.156564, 0.050452, 0.359668, 0.500414, -0.65408, 0.597591, 0.58996, -1.41932, 0.629408, 0.747987, 0.465486, 0.152002, 0.488588, -0.766243, 0.572611, 0.535403, -0.0471432, 0.552491, 0.204369, -0.0474611, -0.413011, 0.364419, -0.102988, 0.797179, 0.678863, 0.72034, 1.08405, 0.764926, 0.839246, 1.01285, 0.0302327, 0.86921, 0.642527, 0.554572, 0.574138, 0.587344, 0.884681, 0.399561, 0.560007, 0.474765, -0.00105185, 0.0948162, 0.0641197, -0.286119, 0.336344, -0.183012, 0.647311, 0.654849, 0.483677, 0.920262, 0.396352, 0.905438, 0.986347, -0.0356663, 0.787256, 0.573359, 0.14722, -0.160995, 0.411518, -0.770621, 0.858406, 0.901305, -0.474078, 0.854859, 0.571031, 0.627911, 0.717831, 0.191267, 0.78353, 0.412117, 0.51794, 0.595592, -0.77972, 0.508805, 0.40847, -1.06817, 0.261222, 0.262939, 0.00929437, 0.718524, 0.748387, -0.0665386, 0.919684, 0.853619, 0.469331, 1.02782, 0.871539, 0.0989943, 0.634542, -0.203079, 0.106513, 0.312632, 0.590067, -0.299468, 0.693552, 0.279843, 0.668925, 0.678473, 0.291356, 0.72356, -0.655579, 0.734706, 0.542154, 0.311262, 0.334073, 0.399475, 0.526045, 0.168998, 0.603947, -1.11831, 0.62519, 0.344383, -0.0150544, 0.324914, 0.845168, 0.447819, 0.953443, 1.11287, 0.194653, 1.07302, 1.00155, 0.5958, 1.05042, 0.55119, 0.816772, 0.722769, 0.539031, 0.793331, -0.314403, 0.554054, -0.7401, 0.611891, 0.297392, 0.488263, 0.504083, 0.227723, 0.66641, 0.434188, -0.793384, -0.402263, 0.0168025, -0.0278613, 0.577604, 0.600845, 0.212152, -0.0906561, 0.408059, 0.581357, 0.439934, 0.325407, 0.850595, 0.768024, 0.182045, 0.832247, 0.552502, 0.60881, 0.836221, 0.367124, 0.508765, 0.588459, -0.287891, 0.430629, 0.593218, 0.527415, -0.013398, 0.376962, 0.560866, 0.135664, -0.0561589, -0.0486793, 0.615405, 0.377366, 0.630537, 0.865577, 0.168969, 0.83033, 0.861257, -0.336005, 0.571852, -0.143725, 0.438487, -0.655971, 0.571386, 0.000451238, 0.782277, 0.833393, 0.168557, 0.907243, 0.533376, 0.839592, 0.967227, -0.479695, 0.956208, 0.933098, -0.0816959, 0.64217, 0.490451, -0.610596, -0.0221408, -0.532927, -0.264227, -0.107068, 0.356195, 0.476617, 0.417813, -0.209552, 0.387127, 0.58765, 0.146297, 0.520407, 0.752591, 0.50255, 0.176713, 0.572221, 0.268006, 0.186468, 0.4395, -0.169824, 0.413462, 0.615394, 0.473848, -0.197903, 0.0707275, 0.368249, 0.502445, 0.384116, 0.171197, 0.805605, 0.834206, -0.0958479, 0.752763, 0.681734, 0.35813, 0.781343, 0.100097, 0.704588, 0.490013, 0.731962, 0.930557, -0.0822983, 0.929974, 0.894525, 0.105806, 0.828677, 0.377604, 0.694433, 0.783594, 0.0626888, 0.479689, 0.503756, 0.251932, -0.184644, 0.187102, 0.68246, 0.753217, 0.294572, 0.470965, 0.63048, 0.229664, 0.0626687, 0.350406, 0.396425, 0.374783, -0.111135, 0.266526, 0.430468, -0.0975825, -0.146733, -0.0392139, 0.529871, 0.385619, 0.181319, 0.530293, -0.175231, 0.475739, 0.456939, -0.181446, 0.498124, 0.234532, 0.402082, 0.793281, 0.778236, -0.208538, 0.817648, 0.926904, 0.178431, 0.896519, 0.960396, -0.10966, 0.825742, 0.662229, 0.324634, 0.39592, 0.585149, 0.797726, -1.07901, 0.791826, 0.438823, 0.705088, 0.710697, 0.450056, 0.806901, -0.406802, 0.888225, 0.685096, 0.539604, 0.639091, 0.504478, 0.842132, -0.507197, 0.885292, 0.775514, 0.434928, 0.854502, 0.585959, -0.148613, 0.362758, 0.578618, 0.799822, 0.676971, 0.447428, 0.913782, 0.539155, 0.777738, 0.866352, 0.0718221, 0.86004, 0.342712, 0.81143, 0.823858, -0.106604, 0.650245, -1.41808, 0.664593, 0.297426, 0.56925, 0.632392, -0.695476, 0.490845, 0.2513, -2.06902, -0.821421, -0.501274, 0.493717, 0.718206, 0.543424, -0.309178, 0.5081, 0.590444, 0.48352, -0.56559, 0.739679, 0.863229, 0.179351, 0.808466, 0.775952, 0.566983, 1.00606, 0.607038, 0.847473, 0.933586, -0.284883, 0.839474, 0.404552, 0.649797, 0.527017, 0.467871, 0.560383, 0.425746, 0.813849, 0.481224, 0.134193, -0.149488, -0.0732168, 0.368774, 0.770264, 0.238598, 0.863104, 0.971749, 0.0712898, 0.798631, 0.566059, 0.521652, 0.57526, 0.203461, 0.454321, 0.274477, 0.511757, 0.479807, 0.869596, 0.0411297, 0.930047, 0.84917, 0.716564, 1.09464, 0.721536, 0.788598, 0.849726, 0.153776, 0.766144, -0.417834, 0.772827, 0.553514, 0.646563, 0.917133, 0.659607, 0.155891, 0.641674, 0.57513, 0.076304, 0.29694, 0.562677, 0.225529, 0.403959, 0.638304, 0.242495, 0.226198, 0.270422, -0.522727, 0.157383, 0.15782, 0.404592, 0.576787, 0.154156, 0.608966, 0.811115, 0.292669, 0.674177, 0.789807, 0.328813, 0.021766, -1.08049, 0.183809, -0.922165, 0.396109, 0.436387, -0.0274332, -0.48027, -0.00524186, 0.332226, 0.289782, 0.320357, 0.826417, 0.693832, 0.503927, 0.891708, 0.208735, 0.925892, 0.958017 +}; #endif /* MULTIPATH_V120_M8_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v30_M10.h b/src/lte/model/JakesTraces/multipath_v30_M10.h index 74102d6b9..2aadbeef3 100644 --- a/src/lte/model/JakesTraces/multipath_v30_M10.h +++ b/src/lte/model/JakesTraces/multipath_v30_M10.h @@ -23,8 +23,8 @@ #define MULTIPATH_V30_M10_H_ static double multipath_M10_v_30[3000] = { - 1.08872, 1.02776, 0.911288, 0.697174, 0.157452, 0.332127, 0.736656, 0.913191, 1.00548, 1.04635, 1.04688, 1.00936, 0.929495, 0.792641, 0.554533, -0.0326824, 0.176025, 0.53964, 0.680857, 0.732331, 0.721307, 0.649297, 0.494959, 0.162251, -0.467763, 0.30844, 0.535401, 0.641113, 0.679176, 0.663495, 0.59226, 0.445497, 0.14398, -0.994694, 0.17944, 0.426885, 0.538178, 0.576631, 0.557292, 0.476481, 0.306, -0.0863809, -0.335999, 0.220474, 0.420966, 0.514805, 0.543954, 0.518374, 0.432182, 0.254805, -0.158264, -0.330489, 0.188944, 0.38196, 0.471329, 0.496376, 0.465804, 0.371838, 0.177842, -0.312295, -0.240498, 0.190079, 0.365066, 0.445542, 0.464048, 0.426821, 0.32347, 0.10946, -0.499404, -0.164935, 0.20232, 0.362142, 0.435695, 0.450289, 0.410793, 0.306686, 0.0951413, -0.481442, -0.218689, 0.15929, 0.318822, 0.388948, 0.397145, 0.34629, 0.219253, -0.0573613, -1.57807, -0.0258081, 0.246014, 0.378264, 0.439699, 0.449124, 0.409852, 0.313717, 0.130727, -0.268778, -0.563772, -0.00953234, 0.171794, 0.237107, 0.22174, 0.116136, -0.164408, -0.886373, 0.0193766, 0.291915, 0.441734, 0.528375, 0.570951, 0.576686, 0.547028, 0.478632, 0.36107, 0.16662, -0.207542, -0.820844, -0.117091, 0.063878, 0.115932, 0.082747, -0.0428514, -0.339724, -1.2645, -0.267951, -0.0398562, 0.0421682, 0.0263866, -0.108051, -0.564402, -0.390655, 0.0717636, 0.289871, 0.416974, 0.487134, 0.510914, 0.488193, 0.40752, 0.229677, -0.254108, -0.109709, 0.341354, 0.553303, 0.681115, 0.760286, 0.804247, 0.818795, 0.80589, 0.764643, 0.690812, 0.57415, 0.388901, 0.0435252, -0.751592, 0.118239, 0.349794, 0.464467, 0.522651, 0.54485, 0.540779, 0.516138, 0.474915, 0.420288, 0.354803, 0.279867, 0.194362, 0.0917775, -0.0465148, -0.276969, -0.996575, -0.396204, -0.00795666, 0.210886, 0.361197, 0.469231, 0.544848, 0.591836, 0.610641, 0.598743, 0.549315, 0.446238, 0.243722, -0.317806, -0.032397, 0.372664, 0.566062, 0.67843, 0.740798, 0.763675, 0.749121, 0.692532, 0.578526, 0.359489, -0.258753, 0.102958, 0.47717, 0.651618, 0.746116, 0.789662, 0.791321, 0.750926, 0.658933, 0.485021, 0.100753, -0.184131, 0.400032, 0.616823, 0.731019, 0.787722, 0.80122, 0.774904, 0.70451, 0.57407, 0.33236, -0.373326, 0.0997598, 0.436607, 0.586816, 0.6575, 0.67444, 0.643392, 0.557609, 0.388698, 0.0127155, -0.299933, 0.300873, 0.52208, 0.640501, 0.702939, 0.725181, 0.712959, 0.66662, 0.581387, 0.443705, 0.215187, -0.287868, -0.302771, 0.119056, 0.273852, 0.334229, 0.333813, 0.278883, 0.158509, -0.0745336, -0.746368, -0.322918, 0.0237768, 0.179136, 0.255829, 0.281938, 0.266251, 0.208203, 0.0970093, -0.102663, -0.560683, -0.601532, -0.12711, 0.0710656, 0.180773, 0.240578, 0.263583, 0.253394, 0.206955, 0.111651, -0.0709211, -0.532139, -0.451824, 0.027354, 0.25734, 0.405796, 0.509648, 0.582803, 0.631516, 0.658549, 0.664561, 0.648467, 0.607099, 0.533847, 0.414593, 0.21276, -0.233516, -0.323571, 0.167071, 0.366926, 0.475562, 0.532707, 0.552223, 0.539249, 0.494345, 0.414167, 0.289772, 0.099803, -0.220807, -1.31468, -0.461219, -0.2608, -0.256909, -0.418404, -1.10209, -0.540191, -0.191855, -0.0430759, 0.00251323, -0.049736, -0.268798, -1.32714, -0.0837375, 0.236251, 0.422604, 0.542091, 0.615361, 0.649867, 0.646365, 0.599201, 0.490946, 0.265727, -0.519754, 0.147152, 0.494459, 0.671453, 0.775222, 0.83173, 0.850034, 0.831685, 0.771969, 0.655796, 0.4372, -0.154648, 0.145606, 0.52728, 0.701051, 0.793389, 0.834269, 0.833068, 0.789798, 0.695135, 0.519343, 0.137823, -0.181511, 0.414935, 0.630916, 0.743429, 0.798863, 0.812394, 0.788797, 0.726706, 0.61771, 0.438348, 0.1071, -1.04938, 0.0886269, 0.307277, 0.387054, 0.387991, 0.318427, 0.155638, -0.222839, -0.533928, 0.0491148, 0.249472, 0.339041, 0.361514, 0.327176, 0.230219, 0.040706, -0.37745, -0.637919, -0.126276, 0.021049, 0.0347241, -0.0788426, -0.483294, -0.434747, 0.0637654, 0.285128, 0.407862, 0.468211, 0.475688, 0.426062, 0.295061, -0.0191258, -0.54493, 0.210364, 0.463193, 0.599364, 0.671203, 0.693639, 0.66793, 0.582935, 0.398734, -0.102504, 0.0666914, 0.502395, 0.70375, 0.819792, 0.884451, 0.90957, 0.898511, 0.848847, 0.750463, 0.574796, 0.2101, -0.24646, 0.41471, 0.63112, 0.735934, 0.77793, 0.770598, 0.7138, 0.593797, 0.36186, -0.308092, 0.111832, 0.455256, 0.602931, 0.665407, 0.666616, 0.606585, 0.461393, 0.120046, -0.290278, 0.380302, 0.616908, 0.743245, 0.808625, 0.828149, 0.804889, 0.732856, 0.590237, 0.297055, -0.831705, 0.360801, 0.629618, 0.768556, 0.843483, 0.874286, 0.86772, 0.823749, 0.735479, 0.582495, 0.295985, -1.16826, 0.239894, 0.517629, 0.652025, 0.720232, 0.745022, 0.735171, 0.693512, 0.618911, 0.505719, 0.339848, 0.0827565, -0.446867, -0.505235, -0.112798, 0.00877293, 0.0361813, 0.00713566, -0.062698, -0.160563, -0.266007, -0.343492, -0.355646, -0.301237, -0.217057, -0.140185, -0.0931086, -0.0914419, -0.157591, -0.356626, -1.42339, -0.305041, 0.050813, 0.254502, 0.389415, 0.480407, 0.537903, 0.566692, 0.568528, 0.542873, 0.486609, 0.392438, 0.243714, -0.00638205, -0.626309, -0.367357, -0.0184136, 0.119404, 0.172992, 0.171846, 0.124775, 0.0314329, -0.116698, -0.342604, -0.715674, -1.87356, -1.18355, -1.3324, -1.30782, -0.733118, -0.503491, -0.413108, -0.445614, -0.701975, -0.974846, -0.262879, 0.0369595, 0.225787, 0.353552, 0.437695, 0.485274, 0.498069, 0.473413, 0.402141, 0.259685, -0.041095, -0.920434, 0.0675066, 0.326456, 0.457087, 0.518809, 0.526446, 0.477741, 0.349984, 0.0469308, -0.556459, 0.257975, 0.523565, 0.672442, 0.760292, 0.80463, 0.811071, 0.778399, 0.697435, 0.540973, 0.203073, -0.299482, 0.421833, 0.666312, 0.800459, 0.876738, 0.91221, 0.912962, 0.879313, 0.806055, 0.678189, 0.451387, -0.122041, 0.10348, 0.487526, 0.654159, 0.738247, 0.771181, 0.76322, 0.715721, 0.622483, 0.463793, 0.173589, -1.05372, 0.0646297, 0.330393, 0.442413, 0.478661, 0.457571, 0.377924, 0.217305, -0.120147, -0.772101, 0.00737007, 0.226323, 0.320415, 0.340938, 0.295797, 0.166021, -0.144996, -0.713986, 0.0675963, 0.32451, 0.466736, 0.549717, 0.591902, 0.60074, 0.578548, 0.52386, 0.430494, 0.282809, 0.0357447, -0.563457, -0.343711, 0.0175537, 0.163497, 0.2272, 0.24004, 0.212682, 0.147374, 0.039809, -0.124974, -0.394494, -1.07615, -0.717701, -0.377144, -0.215909, -0.111074, -0.0271089, 0.0513622, 0.130248, 0.209691, 0.286775, 0.357628, 0.418597, 0.466582, 0.498852, 0.512596, 0.504232, 0.468207, 0.394339, 0.259914, -0.00688523, -1.72174, 0.00638717, 0.310287, 0.475034, 0.575544, 0.63391, 0.658348, 0.650839, 0.608537, 0.521684, 0.363777, 0.0362165, -0.5814, 0.214656, 0.468796, 0.610273, 0.694999, 0.741313, 0.756522, 0.742848, 0.698823, 0.618436, 0.486709, 0.261447, -0.276482, -0.142027, 0.261937, 0.432582, 0.51806, 0.550957, 0.540951, 0.487327, 0.378324, 0.175262, -0.320308, -0.241865, 0.193427, 0.379679, 0.477998, 0.522937, 0.525168, 0.48512, 0.39337, 0.218996, -0.172297, -0.407865, 0.159416, 0.379462, 0.500899, 0.568238, 0.596686, 0.591834, 0.554148, 0.479362, 0.355479, 0.149966, -0.272202, -0.545095, -0.0120837, 0.167788, 0.242443, 0.253225, 0.209662, 0.105829, -0.0870405, -0.493344, -0.858307, -0.311345, -0.174495, -0.191579, -0.398777, -1.33721, -0.188935, 0.125535, 0.306012, 0.417625, 0.480111, 0.499314, 0.472476, 0.384925, 0.187606, -0.448274, 0.0193243, 0.407524, 0.60707, 0.730943, 0.808419, 0.850611, 0.861638, 0.841407, 0.785538, 0.682264, 0.50001, 0.109864, -0.182809, 0.398809, 0.612583, 0.724017, 0.777912, 0.788012, 0.756708, 0.677508, 0.527959, 0.225891, -0.811029, 0.294083, 0.555555, 0.688964, 0.758463, 0.783254, 0.769388, 0.715711, 0.612967, 0.433903, 0.0735443, -0.474041, 0.228758, 0.440464, 0.535119, 0.562474, 0.533615, 0.441273, 0.247598, -0.26053, -0.118197, 0.305692, 0.490872, 0.588089, 0.630551, 0.628265, 0.580697, 0.476083, 0.275113, -0.22855, -0.118296, 0.310355, 0.496083, 0.594642, 0.640183, 0.643606, 0.606015, 0.519624, 0.358738, 0.0229391, -0.556875, 0.20493, 0.450389, 0.584821, 0.663475, 0.705027, 0.717507, 0.704311, 0.665944, 0.600137, 0.500447, 0.351332, 0.10816, -0.480053, -0.248004, 0.137165, 0.31494, 0.420297, 0.486509, 0.526797, 0.547353, 0.550976, 0.538308, 0.508136, 0.457051, 0.378117, 0.256855, 0.0564421, -0.383642, -0.47774, 0.0236294, 0.232235, 0.349543, 0.414618, 0.439973, 0.42828, 0.375069, 0.264805, 0.0489812, -0.579769, -0.18041, 0.196336, 0.378298, 0.482345, 0.537434, 0.553299, 0.531367, 0.465986, 0.339039, 0.0912876, -0.808044, -0.0176011, 0.304712, 0.465713, 0.555859, 0.599895, 0.606387, 0.576479, 0.504763, 0.374246, 0.130764, -0.633586, -0.0452115, 0.293324, 0.460152, 0.556986, 0.611957, 0.636823, 0.637509, 0.617316, 0.578198, 0.52138, 0.447708, 0.357883, 0.252558, 0.132161, -0.00408083, -0.161236, -0.358271, -0.670401, -2.07372, -0.603577, -0.282252, -0.0809483, 0.0654451, 0.175433, 0.255908, 0.309326, 0.33559, 0.332153, 0.292727, 0.202936, 0.0237186, -0.432715, -0.374638, 0.100564, 0.318135, 0.449171, 0.530815, 0.576732, 0.592575, 0.579941, 0.537285, 0.4591, 0.332219, 0.121589, -0.325291, -0.482021, 0.00830817, 0.189021, 0.273093, 0.300756, 0.284719, 0.227488, 0.124115, -0.0419143, -0.321592, -1.04814, -0.671529, -0.392124, -0.318345, -0.347061, -0.467172, -0.711034, -1.24825, -1.56643, -1.76024, -0.951792, -0.433045, -0.128642, 0.0814184, 0.233195, 0.342478, 0.417124, 0.460846, 0.474464, 0.455891, 0.398704, 0.287202, 0.0763324, -0.486954, -0.229445, 0.168715, 0.352358, 0.454679, 0.507412, 0.521846, 0.501443, 0.444649, 0.344086, 0.180672, -0.103663, -0.96601, -0.352002, -0.0926117, -0.0260547, -0.0790983, -0.301121, -1.84422, -0.193077, 0.112736, 0.276324, 0.367886, 0.407063, 0.397753, 0.33211, 0.179595, -0.197993, -0.383752, 0.185628, 0.417727, 0.550312, 0.626583, 0.66068, 0.65641, 0.610562, 0.5099, 0.3137, -0.19239, -0.045961, 0.386379, 0.582945, 0.695069, 0.756941, 0.780513, 0.769303, 0.72122, 0.62698, 0.460745, 0.127382, -0.570318, 0.253888, 0.490664, 0.607446, 0.659667, 0.662182, 0.614803, 0.501997, 0.265433, -0.643814, 0.18559, 0.516848, 0.68872, 0.791034, 0.848939, 0.871836, 0.862415, 0.818515, 0.731525, 0.578151, 0.277405, -0.848915, 0.335478, 0.604275, 0.745441, 0.824723, 0.862076, 0.864509, 0.832582, 0.76083, 0.632996, 0.399042, -0.269832, 0.164714, 0.523539, 0.695127, 0.792295, 0.844052, 0.861207, 0.847488, 0.802213, 0.719899, 0.586129, 0.360082, -0.164742, -0.0777917, 0.333252, 0.502029, 0.584639, 0.615221, 0.604871, 0.555412, 0.461241, 0.304142, 0.0248685, -0.898954, -0.159014, 0.123218, 0.238351, 0.275397, 0.255938, 0.182627, 0.0439081, -0.201575, -0.771408, -0.705373, -0.387627, -0.367578, -0.616042, -0.866941, -0.178671, 0.105172, 0.276451, 0.384648, 0.446541, 0.467711, 0.446765, 0.373568, 0.216917, -0.157655, -0.376413, 0.205788, 0.440401, 0.575925, 0.657028, 0.699158, 0.708253, 0.685354, 0.627284, 0.524559, 0.352611, 0.0259042, -0.944605, 0.0660541, 0.30037, 0.405349, 0.441806, 0.425504, 0.356262, 0.218196, -0.0476202, -0.989668, -0.20315, 0.0786893, 0.188569, 0.209561, 0.152411, -0.0125358, -0.478471, -0.383044, 0.0677674, 0.26261, 0.36289, 0.401717, 0.386103, 0.307146, 0.125151, -0.388551, -0.179893, 0.248053, 0.448523, 0.564843, 0.630567, 0.657927, 0.651262, 0.610222, 0.52963, 0.395771, 0.170871, -0.319208, -0.384872, 0.0413005, 0.180402, 0.210154, 0.153246, -0.0202786, -0.545641, -0.305988, 0.106849, 0.293538, 0.391682, 0.432505, 0.424691, 0.365429, 0.236993, -0.0245916, -1.16515, -0.0968709, 0.192128, 0.324129, 0.378552, 0.373948, 0.308534, 0.157403, -0.191967, -0.599452, 0.0556071, 0.279412, 0.389815, 0.434118, 0.4242, 0.356306, 0.205777, -0.132, -0.64325, 0.0675024, 0.292508, 0.397223, 0.429469, 0.396414, 0.279128, -0.0167993, -0.615476, 0.201993, 0.469164, 0.618404, 0.705483, 0.74788, 0.751, 0.713063, 0.623386, 0.449587, 0.0501488, -0.136127, 0.411247, 0.628321, 0.747499, 0.811468, 0.834314, 0.820058, 0.766142, 0.661198, 0.471499, 0.0466163, -0.0964925, 0.418221, 0.622776, 0.733029, 0.79051, 0.809564, 0.79526, 0.747369, 0.660104, 0.517106, 0.268229, -0.4187, 0.011263, 0.358437, 0.521912, 0.614936, 0.667948, 0.693856, 0.699423, 0.688587, 0.663603, 0.625363, 0.57322, 0.504307, 0.411874, 0.280749, 0.0704769, -0.411796, -0.35031, 0.114962, 0.331985, 0.467397, 0.556866, 0.612961, 0.640336, 0.639524, 0.607544, 0.536323, 0.406339, 0.157846, -0.725964, 0.0418147, 0.364948, 0.52495, 0.612712, 0.652559, 0.652302, 0.611804, 0.523102, 0.362488, 0.0455201, -0.9521, 0.0868856, 0.319365, 0.414411, 0.428095, 0.363355, 0.178071, -0.458761, 0.0220849, 0.405604, 0.598206, 0.711758, 0.774893, 0.797564, 0.781626, 0.722239, 0.60339, 0.374822, -0.297582, 0.147652, 0.500461, 0.662686, 0.744918, 0.773917, 0.756604, 0.688823, 0.550517, 0.267791, -1.44814, 0.281734, 0.554038, 0.687007, 0.750289, 0.76282, 0.727933, 0.637367, 0.460501, 0.0616542, -0.17197, 0.37785, 0.579729, 0.677068, 0.711349, 0.692562, 0.615241, 0.450358, 0.0645406, -0.168586, 0.397236, 0.61245, 0.725051, 0.778541, 0.78626, 0.750154, 0.66275, 0.498581, 0.158812, -0.462222, 0.304316, 0.530528, 0.637038, 0.676939, 0.663964, 0.596282, 0.454165, 0.160032, -1.07816, 0.193126, 0.448773, 0.56692, 0.612169, 0.599779, 0.525936, 0.361537, -0.0332349, -0.21869, 0.326011, 0.536902, 0.645936, 0.694757, 0.695338, 0.647238, 0.536981, 0.317211, -0.318964, 0.0706981, 0.434399, 0.600319, 0.684718, 0.715357, 0.699532, 0.633229, 0.496166, 0.212159, -1.14396, 0.257731, 0.534765, 0.679048, 0.759508, 0.79727, 0.800431, 0.771191, 0.70729, 0.60041, 0.428517, 0.117375, -1.80538, 0.0779569, 0.334261, 0.456327, 0.5168, 0.538797, 0.532978, 0.505571, 0.461075, 0.403366, 0.336003, 0.26173, 0.180922, 0.0885871, -0.0315967, -0.226809, -0.742402, -0.474354, -0.0128021, 0.235866, 0.408382, 0.536873, 0.633642, 0.704372, 0.75175, 0.776677, 0.778595, 0.755266, 0.701829, 0.608189, 0.450611, 0.150839, -1.22842, 0.171899, 0.439363, 0.574163, 0.644339, 0.669737, 0.656437, 0.602958, 0.499011, 0.313586, -0.0842483, -0.360869, 0.205851, 0.412917, 0.518505, 0.567171, 0.573046, 0.539431, 0.461929, 0.324171, 0.0730511, -0.680399, -0.140301, 0.18579, 0.333624, 0.405728, 0.428165, 0.408574, 0.344931, 0.223186, -0.00408614, -0.643146, -0.253194, 0.117308, 0.296473, 0.402395, 0.465614, 0.49819, 0.505384, 0.488838, 0.447291, 0.375799, 0.262443, 0.0761592, -0.306924, -0.639711, -0.0283279, 0.20108, 0.331297, 0.409047, 0.44971, 0.45854, 0.435314, 0.374438, 0.2607, 0.0500954, -0.497408, -0.279591, 0.125323, 0.308168, 0.406384, 0.450566, 0.44881, 0.397632, 0.277941, 0.0197345, -1.77073, 0.0418719, 0.342933, 0.502043, 0.593468, 0.638514, 0.643942, 0.608835, 0.52382, 0.360631, 0.00677748, -0.425848, 0.241046, 0.469164, 0.586319, 0.640987, 0.646544, 0.602575, 0.49437, 0.268433, -0.494122, 0.126679, 0.471605, 0.642457, 0.738686, 0.786548, 0.794953, 0.764929, 0.690467, 0.552795, 0.29016, -0.707025, 0.183191, 0.484384, 0.627457, 0.698197, 0.719573, 0.698058, 0.630969, 0.503822, 0.269239, -0.370408, -0.0183848, 0.334174, 0.486359, 0.556963, 0.574785, 0.548977, 0.480125, 0.361641, 0.175357, -0.129327, -0.815722, -0.751566, -0.722634, -0.882078, -0.122645, 0.205724, 0.411599, 0.54985, 0.640619, 0.69259, 0.708623, 0.686886, 0.619055, 0.481917, 0.193533, -0.859045, 0.283385, 0.559375, 0.707395, 0.792448, 0.834465, 0.840609, 0.811762, 0.74314, 0.620281, 0.400254, -0.150623, 0.0388022, 0.437758, 0.613397, 0.707209, 0.752404, 0.761155, 0.737947, 0.682839, 0.591534, 0.45238, 0.234091, -0.190643, -0.532031, 0.0187806, 0.19791, 0.276593, 0.302057, 0.291666, 0.254077, 0.194683, 0.117456, 0.0252335, -0.0815875, -0.209135, -0.381555, -0.694522, -1.36627, -0.473789, -0.166204, 0.0302853, 0.17059, 0.271439, 0.338888, 0.374135, 0.374541, 0.331988, 0.225828, -0.0105836, -1.20225, -0.00190887, 0.324867, 0.503185, 0.613186, 0.677892, 0.705608, 0.697936, 0.650978, 0.552251, 0.366084, -0.0699777, -0.145151, 0.347968, 0.548424, 0.653354, 0.700842, 0.701825, 0.655465, 0.548254, 0.333581, -0.28275, 0.0819072, 0.45619, 0.630054, 0.723323, 0.765153, 0.764877, 0.722863, 0.63092, 0.463375, 0.122599, -0.527441, 0.253018, 0.47708, 0.579978, 0.614989, 0.595039, 0.516074, 0.351079, -0.0214126, -0.354818, 0.249033, 0.461464, 0.565333, 0.606068, 0.596145, 0.534478, 0.405203, 0.150839, -0.734818, -0.000361685, 0.298844, 0.426149, 0.469885, 0.447674, 0.350832, 0.125354, -0.736411, 0.0325518, 0.36283, 0.526789, 0.616632, 0.657717, 0.659155, 0.622975, 0.545832, 0.416819, 0.206909, -0.192195, -0.766378, -0.134198, -0.00541242, -0.0369901, -0.251172, -2.15131, -0.171445, 0.116956, 0.250578, 0.295164, 0.25632, 0.0927461, -0.534727, -0.0169259, 0.38054, 0.587742, 0.715155, 0.791296, 0.826085, 0.821228, 0.771371, 0.658769, 0.425098, -0.438777, 0.329627, 0.663734, 0.833888, 0.931975, 0.983055, 0.99588, 0.971856, 0.906164, 0.783597, 0.557954, -0.0437126, 0.253934, 0.625948, 0.789831, 0.871098, 0.899126, 0.882383, 0.819099, 0.695576, 0.466563, -0.137316, 0.142626, 0.504206, 0.652483, 0.712365, 0.710124, 0.64712, 0.502273, 0.181535, -0.475755, 0.333113, 0.57022, 0.684656, 0.730893, 0.72291, 0.658626, 0.516995, 0.212815, -0.673914, 0.305405, 0.552784, 0.669339, 0.713926, 0.699899, 0.621059, 0.440821, -0.045008, 0.076467, 0.517171, 0.712025, 0.817241, 0.86676, 0.870854, 0.829209, 0.730489, 0.536968, 0.0582741, 0.10938, 0.555591, 0.743304, 0.839515, 0.878897, 0.871115, 0.813987, 0.690874, 0.442025, -0.510692, 0.346889, 0.660483, 0.814303, 0.896027, 0.929535, 0.922453, 0.874248, 0.775734, 0.598666, 0.229818, -0.206855, 0.441402, 0.65607, 0.76087, 0.804473, 0.801056, 0.752045, 0.647661, 0.453793, 0.00870997, -0.0731362, 0.411592, 0.605968, 0.70792, 0.757427, 0.768729, 0.747378, 0.6944, 0.607001, 0.476939, 0.283775, -0.0365783, -1.14775, -0.244074, -0.00698695, 0.0720399, 0.0769747, 0.0320055, -0.0515061, -0.16256, -0.280229, -0.364487, -0.371822, -0.302711, -0.200344, -0.102943, -0.0289431, 0.0145453, 0.0240158, -0.00458581, -0.0791155, -0.217442, -0.470926, -1.16411, -0.791768, -0.500627, -0.432664, -0.503973, -0.800178, -1.17983, -0.502105, -0.274642, -0.182529, -0.195368, -0.362175, -1.54736, -0.242345, 0.124431, 0.339942, 0.485089, 0.584211, 0.647161, 0.677671, 0.675457, 0.635812, 0.545988, 0.370531, -0.0504983, -0.124932, 0.388251, 0.607869, 0.735499, 0.811387, 0.849748, 0.855987, 0.830788, 0.770561, 0.664988, 0.48687, 0.135219, -0.47053, 0.278881, 0.504646, 0.615953, 0.666859, 0.674006, 0.642076, 0.568368, 0.440408, 0.220097, -0.280818, -0.263274, 0.16408, 0.333273, 0.414604, 0.445361, 0.439772, 0.404804, 0.344885, 0.264395, 0.170062, 0.0737505, -0.00623938, -0.0508334, -0.0539629, -0.0291799, 0.000588839, 0.0144635, -0.00523958, -0.0805022, -0.262032, -0.845698, -0.451092, -0.0482064, 0.151773, 0.268426, 0.330337, 0.34558, 0.311539, 0.211692, -0.0124715, -0.899804, -0.0765318, 0.263241, 0.441287, 0.547974, 0.608516, 0.632315, 0.622066, 0.575674, 0.484818, 0.327392, 0.029488, -2.21764, -0.00152794, 0.256, 0.370602, 0.411603, 0.395098, 0.317461, 0.14948, -0.250318, -0.425847, 0.113606, 0.324905, 0.437065, 0.492651, 0.505887, 0.481135, 0.416673, 0.30348, 0.116397, -0.235034, -1.07728, -0.206499, -0.00707033, 0.0601677, 0.0498756, -0.0290931, -0.192163, -0.508027, -1.9749, -0.718719, -0.613814, -0.933021, -0.717526, -0.182733, 0.0889921, 0.26329, 0.378829, 0.450162, 0.482692, 0.476029, 0.423072, 0.302657, 0.0414818, -1.98701, 0.0921946, 0.393453, 0.557941, 0.657969, 0.715446, 0.738895, 0.730967, 0.690143, 0.609715, 0.472257, 0.22496, -0.502379, 0.00646398, 0.343621, 0.501309, 0.585445, 0.624003, 0.627618, 0.600253, 0.541995, 0.449317, 0.313233, 0.112412, -0.218248, -1.32665, -0.473424, -0.279707, -0.282032, -0.455301, -1.31503, -0.475576, -0.128223, 0.0525193, 0.15873, 0.216715, 0.236498, 0.220902, 0.167105, 0.0638572, -0.122233, -0.5407, -0.678757, -0.151606, 0.0677667, 0.196571, 0.276846, 0.323399, 0.341833, 0.332736, 0.291993, 0.207784, 0.0478328, -0.322209, -0.53979, 0.0598944, 0.313836, 0.472905, 0.581886, 0.656418, 0.702971, 0.723748, 0.718031, 0.681915, 0.606115, 0.468221, 0.195496, -1.91577, 0.20901, 0.504159, 0.660398, 0.750818, 0.79634, 0.803504, 0.771206, 0.689791, 0.530125, 0.173721, -0.18627, 0.457024, 0.695306, 0.829051, 0.906531, 0.943674, 0.94597, 0.913157, 0.839064, 0.706316, 0.461203, -0.284842, 0.260139, 0.592688, 0.746307, 0.823299, 0.849343, 0.831549, 0.767046, 0.639992, 0.396681, -0.370853, 0.211037, 0.538654, 0.689174, 0.762444, 0.783541, 0.758929, 0.684399, 0.540267, 0.255011, -2.20587, 0.235063, 0.504739, 0.631953, 0.688789, 0.694857, 0.654117, 0.55967, 0.385485, 0.0274024, -0.523398, 0.177948, 0.38406, 0.4699, 0.484337, 0.436391, 0.313305, 0.0550711, -0.988551, -0.0509296, 0.229277, 0.341163, 0.361895, 0.297458, 0.101287, -0.674335, 0.021493, 0.375533, 0.555606, 0.658056, 0.708115, 0.713104, 0.670506, 0.564939, 0.343542, -0.391407, 0.194413, 0.54688, 0.722825, 0.824461, 0.879019, 0.896531, 0.879969, 0.82741, 0.730727, 0.568237, 0.267924, -1.70398, 0.211062, 0.467635, 0.579945, 0.620044, 0.606283, 0.539874, 0.406927, 0.155756, -0.593439, -0.0825716, 0.226099, 0.345613, 0.375372, 0.332717, 0.202992, -0.0996668, -0.878326, 0.0216508, 0.261865, 0.370184, 0.401348, 0.363374, 0.234964, -0.0972045, -0.453114, 0.207692, 0.453827, 0.591422, 0.669359, 0.703637, 0.699406, 0.655387, 0.562786, 0.396226, 0.0621388, -0.671846, 0.165956, 0.393205, 0.495967, 0.529357, 0.506265, 0.421536, 0.243893, -0.180259, -0.294214, 0.207715, 0.4028, 0.498255, 0.532955, 0.517471, 0.449555, 0.311606, 0.0397742, -1.09543, -0.0629757, 0.208333, 0.316016, 0.335049, 0.272175, 0.0863072, -0.557757, -0.0696073, 0.308643, 0.495786, 0.602542, 0.656827, 0.667395, 0.633622, 0.5446, 0.364751, -0.0768875, -0.0982891, 0.386973, 0.594154, 0.709759, 0.772059, 0.794032, 0.779355, 0.725457, 0.621327, 0.434817, 0.0281367, -0.197022, 0.349775, 0.557014, 0.665784, 0.719594, 0.732878, 0.710051, 0.649296, 0.541061, 0.35777, -0.00773577, -0.521191, 0.166703, 0.386115, 0.496276, 0.549243, 0.561944, 0.540286, 0.48413, 0.386978, 0.22967, -0.0513096, -1.1513, -0.150841, 0.146805, 0.297904, 0.386613, 0.43747, 0.460124, 0.457934, 0.43003, 0.37068, 0.264939, 0.070262, -0.436516, -0.246976, 0.200845, 0.423853, 0.568946, 0.670183, 0.740418, 0.785241, 0.806771, 0.80482, 0.776905, 0.717151, 0.612699, 0.430708, 0.0369951, -0.211767, 0.359972, 0.581396, 0.704524, 0.773757, 0.803893, 0.799853, 0.760888, 0.680118, 0.53844, 0.274728, -0.687714, 0.15642, 0.461846, 0.608948, 0.685517, 0.715711, 0.707874, 0.663184, 0.576821, 0.43425, 0.193363, -0.362983, -0.266744, 0.100656, 0.218799, 0.228243, 0.13963, -0.114874, -1.21896, -0.00119914, 0.284026, 0.434534, 0.516269, 0.54839, 0.535669, 0.473322, 0.341475, 0.068573, -2.37037, 0.0735144, 0.355924, 0.496064, 0.566006, 0.58521, 0.557149, 0.473412, 0.302236, -0.102336, -0.25422, 0.280286, 0.495579, 0.613938, 0.677263, 0.699569, 0.685051, 0.631644, 0.529317, 0.349114, -0.0244035, -0.440588, 0.19612, 0.410602, 0.517251, 0.564617, 0.567735, 0.530175, 0.447659, 0.304143, 0.0485239, -0.665314, -0.225681, 0.0903854, 0.213046, 0.247432, 0.213023, 0.0994104, -0.158563, -1.75251, -0.163145, 0.124498, 0.264206, 0.330065, 0.340815, 0.297067, 0.181767, -0.0737981, -1.83439, -0.0505439, 0.25147, 0.411798, 0.505341, 0.554083, 0.565764, 0.541196, 0.474752, 0.349129, 0.109104, -0.674103, -0.0444326, 0.294607, 0.463766, 0.561958, 0.616079, 0.636435, 0.626775, 0.586822, 0.512153, 0.391243, 0.193825, -0.198637, -0.606006, 0.00267765, 0.198916, 0.284947, 0.30548, 0.269045, 0.163812, -0.0657574, -0.934113, -0.151594, 0.185877, 0.361504, 0.467467, 0.529681, 0.558243, 0.55683, 0.525058, 0.458149, 0.343402, 0.145845, -0.289971, -0.408432, 0.0964228, 0.302084, 0.417037, 0.48248, 0.513248, 0.515501, 0.491096, 0.438528, 0.351877, 0.216108, -0.0124081, -0.575523, -0.354954, 0.0509557, 0.24645, 0.37048, 0.457245, 0.520618, 0.567446, 0.601311, 0.623902, 0.635588, 0.635641, 0.62222, 0.592063, 0.539618, 0.454744, 0.315559, 0.0562021, -1.03199, 0.00810318, 0.329212, 0.502348, 0.610259, 0.676456, 0.709678, 0.712378, 0.682574, 0.612626, 0.48271, 0.229862, -0.782471, 0.160539, 0.479099, 0.644057, 0.740754, 0.793133, 0.809797, 0.792535, 0.73772, 0.633534, 0.446649, 0.0331682, -0.151329, 0.381132, 0.587849, 0.696982, 0.750398, 0.761417, 0.732913, 0.660115, 0.526141, 0.276468, -0.501286, 0.0820057, 0.402734, 0.545852, 0.609856, 0.618147, 0.573872, 0.46451, 0.240821, -0.445491, 0.0343802, 0.384505, 0.546287, 0.627562, 0.654289, 0.632273, 0.554691, 0.392779, 0.0200374, -0.265625, 0.330269, 0.554053, 0.674029, 0.735516, 0.752627, 0.728148, 0.656212, 0.515901, 0.232423, -1.36745, 0.258376, 0.537034, 0.680611, 0.759521, 0.794944, 0.794681, 0.760342, 0.688568, 0.568672, 0.371795, -0.0129365, -0.508746, 0.136341, 0.325404, 0.397237, 0.397426, 0.331587, 0.177543, -0.177069, -0.574211, 0.0712522, 0.293521, 0.40534, 0.455008, 0.456856, 0.412684, 0.31361, 0.128713, -0.278058, -0.516739, 0.0257321, 0.221812, 0.314628, 0.346368, 0.328572, 0.259531, 0.122162, -0.146654, -1.2688, -0.234609, 0.0538075, 0.188586, 0.252115, 0.267527, 0.24277, 0.178868, 0.0713473, -0.091936, -0.339971, -0.761379, -2.77325, -1.38387, -1.19544, -0.514723, -0.179919, 0.0385839, 0.192422, 0.302499, 0.37927, 0.428419, 0.45294, 0.453908, 0.430587, 0.379846, 0.294293, 0.156483, -0.085266, -0.781276, -0.298667, 0.0616343, 0.244629, 0.359941, 0.436815, 0.486997, 0.51579, 0.525206, 0.514926, 0.48221, 0.420678, 0.316352, 0.132892, -0.289521, -0.366876, 0.154483, 0.384554, 0.525932, 0.618792, 0.677345, 0.707192, 0.709596, 0.682336, 0.618474, 0.501079, 0.280664, -0.353764, 0.0533594, 0.431607, 0.61829, 0.729919, 0.796031, 0.827591, 0.828418, 0.797933, 0.730829, 0.613082, 0.405174, -0.0872905, -0.0289314, 0.411984, 0.601535, 0.704875, 0.757831, 0.772836, 0.753702, 0.698725, 0.599444, 0.432463, 0.11583, -0.975031, 0.149799, 0.400092, 0.522769, 0.582938, 0.600641, 0.583377, 0.532936, 0.446868, 0.31735, 0.125619, -0.181985, -0.948827, -0.600008, -0.388761, -0.443901, -0.890558, -0.615827, -0.156847, 0.0694921, 0.207295, 0.292095, 0.337949, 0.351157, 0.334006, 0.285763, 0.20217, 0.0727192, -0.129219, -0.499788, -1.22122, -0.443279, -0.243817, -0.161585, -0.137869, -0.150854, -0.186848, -0.232366, -0.271536, -0.288771, -0.276652, -0.241349, -0.198366, -0.164576, -0.155159, -0.186801, -0.289329, -0.561404, -1.15697, -0.294276, 0.0064247, 0.19133, 0.317587, 0.404359, 0.459919, 0.487886, 0.489109, 0.462034, 0.401964, 0.298359, 0.125585, -0.204655, -1.10248, -0.151133, 0.0771361, 0.174121, 0.195911, 0.150509, 0.0165315, -0.318598, -0.687898, -0.0242458, 0.220556, 0.356616, 0.432547, 0.463465, 0.452726, 0.395029, 0.270566, 0.00932175, -1.71249, 0.0256464, 0.327892, 0.489687, 0.586165, 0.639578, 0.658216, 0.64403, 0.593963, 0.497607, 0.326217, -0.0328295, -0.467842, 0.20044, 0.433862, 0.561408, 0.633376, 0.666411, 0.666618, 0.63463, 0.566031, 0.44792, 0.243741, -0.216271, -0.264757, 0.208747, 0.404576, 0.511645, 0.568935, 0.590433, 0.581675, 0.543847, 0.474568, 0.366587, 0.202286, -0.0699974, -0.79053, -0.375319, -0.0653882, 0.0542004, 0.0921466, 0.0738845, 0.00469567, -0.121905, -0.329593, -0.698283, -2.61317, -0.98056, -1.06801, -1.24078, -0.5117, -0.199937, -0.00991958, 0.109594, 0.175013, 0.188927, 0.141152, -0.00782001, -0.47976, -0.259822, 0.208133, 0.445951, 0.600921, 0.707673, 0.779447, 0.821976, 0.837175, 0.824067, 0.778222, 0.688947, 0.529164, 0.200154, -0.425943, 0.370899, 0.620871, 0.756201, 0.832228, 0.866213, 0.863625, 0.823258, 0.736307, 0.577229, 0.251041, -0.436814, 0.39445, 0.640858, 0.769311, 0.83647, 0.859582, 0.843527, 0.785652, 0.673442, 0.468669, -0.0170872, 0.0143438, 0.454447, 0.633703, 0.720643, 0.749322, 0.72785, 0.650336, 0.488585, 0.117388, -0.176649, 0.42408, 0.649723, 0.772163, 0.837461, 0.860648, 0.84621, 0.792034, 0.687627, 0.502232, 0.107992, -0.195883, 0.380439, 0.585821, 0.687652, 0.73092, 0.729445, 0.685724, 0.593554, 0.431587, 0.124239, -1.44983, 0.0983837, 0.343226, 0.447074, 0.476855, 0.447783, 0.354986, 0.165482, -0.291373, -0.326458, 0.13527, 0.315363, 0.398038, 0.419086, 0.386841, 0.29481, 0.112181, -0.305375, -0.484161, 0.0318384, 0.221243, 0.307725, 0.331307, 0.302169, 0.216419, 0.0511747, -0.284939, -1.05061, -0.208365, 0.00248521, 0.0818079, 0.0826881, 0.0125068, -0.149102, -0.501119, -1.12337, -0.416168, -0.267593, -0.305342, -0.644368, -0.594175, -0.0426702, 0.219459, 0.383069, 0.488447, 0.549992, 0.57261, 0.555152, 0.489109, 0.349543, 0.0440129, -0.67827, 0.201362, 0.461699, 0.600652, 0.675802, 0.704028, 0.688894, 0.624377, 0.48787, 0.194394, -0.708409, 0.312543, 0.585005, 0.733481, 0.820737, 0.866636, 0.87894, 0.859897, 0.807694, 0.715304, 0.564779, 0.301638, -0.472938, 0.0744401, 0.389088, 0.527197, 0.590432, 0.605474, 0.581792, 0.521771, 0.422958, 0.277101, 0.0644919, -0.270624, -1.08588, -0.761211, -0.630584, -0.867058, -1.21192, -0.549754, -0.350125, -0.315744, -0.469774, -1.87869, -0.244909, 0.111264, 0.3259, 0.471475, 0.571259, 0.63525, 0.66784, 0.670024, 0.639678, 0.570201, 0.445497, 0.219305, -0.37448, -0.0971185, 0.277134, 0.440064, 0.519261, 0.544048, 0.522297, 0.450752, 0.311473, 0.040699, -1.08639, -0.0526333, 0.23031, 0.356655, 0.406756, 0.400081, 0.336864, 0.198489, -0.0912373, -1.38325, -0.0567647, 0.205556, 0.332347, 0.391036, 0.401304, 0.369036, 0.292501, 0.161301, -0.054421, -0.471151, -0.950409, -0.381917, -0.265164, -0.303772, -0.515324, -1.68221, -0.540444, -0.261929, -0.162911, -0.183434, -0.372685, -2.32488, -0.225146, 0.108345, 0.296786, 0.412725, 0.477254, 0.496443, 0.467175, 0.373357, 0.159655, -0.623848, 0.0636041, 0.41703, 0.599771, 0.708348, 0.76863, 0.789569, 0.772492, 0.71215, 0.591981, 0.360069, -0.34356, 0.154031, 0.499038, 0.658379, 0.737906, 0.76302, 0.739059, 0.658441, 0.490169, 0.0921439, -0.0835066, 0.459681, 0.673969, 0.788601, 0.845477, 0.857623, 0.827087, 0.746992, 0.593997, 0.281747, -0.613481, 0.364406, 0.610263, 0.727318, 0.774938, 0.76767, 0.702501, 0.554271, 0.211703, -0.203203, 0.469648, 0.707403, 0.835551, 0.903647, 0.92713, 0.909762, 0.847183, 0.722449, 0.479203, -0.345443, 0.337502, 0.665061, 0.8244, 0.910755, 0.949596, 0.949507, 0.911231, 0.828256, 0.680326, 0.398413, -1.1066, 0.356995, 0.640109, 0.780984, 0.856479, 0.889473, 0.88899, 0.858279, 0.796932, 0.700732, 0.559019, 0.344674, -0.0408774, -0.731661, 0.00640107, 0.19173, 0.259878, 0.267406, 0.234379, 0.172699, 0.095166, 0.0212812, -0.022187, -0.0143581, 0.0412078, 0.120797, 0.20062, 0.265863, 0.308722, 0.324424, 0.3081, 0.251685, 0.137729, -0.0838375, -0.730862, -0.316881, 0.0462268, 0.214709, 0.302705, 0.337925, 0.328275, 0.271487, 0.152628, -0.0790269, -0.779114, -0.28954, 0.0562546, 0.217151, 0.300773, 0.334605, 0.327781, 0.281125, 0.187832, 0.0265024, -0.277785, -1.93036, -0.296447, -0.0396987, 0.0811892, 0.136694, 0.147826, 0.12193, 0.0594432, -0.0462085, -0.215946, -0.525188, -1.94202, -0.509638, -0.22902, -0.0680628, 0.0445771, 0.131929, 0.203801, 0.264438, 0.315182, 0.355726, 0.384787, 0.400417, 0.400021, 0.38005 - }; + 1.08872, 1.02776, 0.911288, 0.697174, 0.157452, 0.332127, 0.736656, 0.913191, 1.00548, 1.04635, 1.04688, 1.00936, 0.929495, 0.792641, 0.554533, -0.0326824, 0.176025, 0.53964, 0.680857, 0.732331, 0.721307, 0.649297, 0.494959, 0.162251, -0.467763, 0.30844, 0.535401, 0.641113, 0.679176, 0.663495, 0.59226, 0.445497, 0.14398, -0.994694, 0.17944, 0.426885, 0.538178, 0.576631, 0.557292, 0.476481, 0.306, -0.0863809, -0.335999, 0.220474, 0.420966, 0.514805, 0.543954, 0.518374, 0.432182, 0.254805, -0.158264, -0.330489, 0.188944, 0.38196, 0.471329, 0.496376, 0.465804, 0.371838, 0.177842, -0.312295, -0.240498, 0.190079, 0.365066, 0.445542, 0.464048, 0.426821, 0.32347, 0.10946, -0.499404, -0.164935, 0.20232, 0.362142, 0.435695, 0.450289, 0.410793, 0.306686, 0.0951413, -0.481442, -0.218689, 0.15929, 0.318822, 0.388948, 0.397145, 0.34629, 0.219253, -0.0573613, -1.57807, -0.0258081, 0.246014, 0.378264, 0.439699, 0.449124, 0.409852, 0.313717, 0.130727, -0.268778, -0.563772, -0.00953234, 0.171794, 0.237107, 0.22174, 0.116136, -0.164408, -0.886373, 0.0193766, 0.291915, 0.441734, 0.528375, 0.570951, 0.576686, 0.547028, 0.478632, 0.36107, 0.16662, -0.207542, -0.820844, -0.117091, 0.063878, 0.115932, 0.082747, -0.0428514, -0.339724, -1.2645, -0.267951, -0.0398562, 0.0421682, 0.0263866, -0.108051, -0.564402, -0.390655, 0.0717636, 0.289871, 0.416974, 0.487134, 0.510914, 0.488193, 0.40752, 0.229677, -0.254108, -0.109709, 0.341354, 0.553303, 0.681115, 0.760286, 0.804247, 0.818795, 0.80589, 0.764643, 0.690812, 0.57415, 0.388901, 0.0435252, -0.751592, 0.118239, 0.349794, 0.464467, 0.522651, 0.54485, 0.540779, 0.516138, 0.474915, 0.420288, 0.354803, 0.279867, 0.194362, 0.0917775, -0.0465148, -0.276969, -0.996575, -0.396204, -0.00795666, 0.210886, 0.361197, 0.469231, 0.544848, 0.591836, 0.610641, 0.598743, 0.549315, 0.446238, 0.243722, -0.317806, -0.032397, 0.372664, 0.566062, 0.67843, 0.740798, 0.763675, 0.749121, 0.692532, 0.578526, 0.359489, -0.258753, 0.102958, 0.47717, 0.651618, 0.746116, 0.789662, 0.791321, 0.750926, 0.658933, 0.485021, 0.100753, -0.184131, 0.400032, 0.616823, 0.731019, 0.787722, 0.80122, 0.774904, 0.70451, 0.57407, 0.33236, -0.373326, 0.0997598, 0.436607, 0.586816, 0.6575, 0.67444, 0.643392, 0.557609, 0.388698, 0.0127155, -0.299933, 0.300873, 0.52208, 0.640501, 0.702939, 0.725181, 0.712959, 0.66662, 0.581387, 0.443705, 0.215187, -0.287868, -0.302771, 0.119056, 0.273852, 0.334229, 0.333813, 0.278883, 0.158509, -0.0745336, -0.746368, -0.322918, 0.0237768, 0.179136, 0.255829, 0.281938, 0.266251, 0.208203, 0.0970093, -0.102663, -0.560683, -0.601532, -0.12711, 0.0710656, 0.180773, 0.240578, 0.263583, 0.253394, 0.206955, 0.111651, -0.0709211, -0.532139, -0.451824, 0.027354, 0.25734, 0.405796, 0.509648, 0.582803, 0.631516, 0.658549, 0.664561, 0.648467, 0.607099, 0.533847, 0.414593, 0.21276, -0.233516, -0.323571, 0.167071, 0.366926, 0.475562, 0.532707, 0.552223, 0.539249, 0.494345, 0.414167, 0.289772, 0.099803, -0.220807, -1.31468, -0.461219, -0.2608, -0.256909, -0.418404, -1.10209, -0.540191, -0.191855, -0.0430759, 0.00251323, -0.049736, -0.268798, -1.32714, -0.0837375, 0.236251, 0.422604, 0.542091, 0.615361, 0.649867, 0.646365, 0.599201, 0.490946, 0.265727, -0.519754, 0.147152, 0.494459, 0.671453, 0.775222, 0.83173, 0.850034, 0.831685, 0.771969, 0.655796, 0.4372, -0.154648, 0.145606, 0.52728, 0.701051, 0.793389, 0.834269, 0.833068, 0.789798, 0.695135, 0.519343, 0.137823, -0.181511, 0.414935, 0.630916, 0.743429, 0.798863, 0.812394, 0.788797, 0.726706, 0.61771, 0.438348, 0.1071, -1.04938, 0.0886269, 0.307277, 0.387054, 0.387991, 0.318427, 0.155638, -0.222839, -0.533928, 0.0491148, 0.249472, 0.339041, 0.361514, 0.327176, 0.230219, 0.040706, -0.37745, -0.637919, -0.126276, 0.021049, 0.0347241, -0.0788426, -0.483294, -0.434747, 0.0637654, 0.285128, 0.407862, 0.468211, 0.475688, 0.426062, 0.295061, -0.0191258, -0.54493, 0.210364, 0.463193, 0.599364, 0.671203, 0.693639, 0.66793, 0.582935, 0.398734, -0.102504, 0.0666914, 0.502395, 0.70375, 0.819792, 0.884451, 0.90957, 0.898511, 0.848847, 0.750463, 0.574796, 0.2101, -0.24646, 0.41471, 0.63112, 0.735934, 0.77793, 0.770598, 0.7138, 0.593797, 0.36186, -0.308092, 0.111832, 0.455256, 0.602931, 0.665407, 0.666616, 0.606585, 0.461393, 0.120046, -0.290278, 0.380302, 0.616908, 0.743245, 0.808625, 0.828149, 0.804889, 0.732856, 0.590237, 0.297055, -0.831705, 0.360801, 0.629618, 0.768556, 0.843483, 0.874286, 0.86772, 0.823749, 0.735479, 0.582495, 0.295985, -1.16826, 0.239894, 0.517629, 0.652025, 0.720232, 0.745022, 0.735171, 0.693512, 0.618911, 0.505719, 0.339848, 0.0827565, -0.446867, -0.505235, -0.112798, 0.00877293, 0.0361813, 0.00713566, -0.062698, -0.160563, -0.266007, -0.343492, -0.355646, -0.301237, -0.217057, -0.140185, -0.0931086, -0.0914419, -0.157591, -0.356626, -1.42339, -0.305041, 0.050813, 0.254502, 0.389415, 0.480407, 0.537903, 0.566692, 0.568528, 0.542873, 0.486609, 0.392438, 0.243714, -0.00638205, -0.626309, -0.367357, -0.0184136, 0.119404, 0.172992, 0.171846, 0.124775, 0.0314329, -0.116698, -0.342604, -0.715674, -1.87356, -1.18355, -1.3324, -1.30782, -0.733118, -0.503491, -0.413108, -0.445614, -0.701975, -0.974846, -0.262879, 0.0369595, 0.225787, 0.353552, 0.437695, 0.485274, 0.498069, 0.473413, 0.402141, 0.259685, -0.041095, -0.920434, 0.0675066, 0.326456, 0.457087, 0.518809, 0.526446, 0.477741, 0.349984, 0.0469308, -0.556459, 0.257975, 0.523565, 0.672442, 0.760292, 0.80463, 0.811071, 0.778399, 0.697435, 0.540973, 0.203073, -0.299482, 0.421833, 0.666312, 0.800459, 0.876738, 0.91221, 0.912962, 0.879313, 0.806055, 0.678189, 0.451387, -0.122041, 0.10348, 0.487526, 0.654159, 0.738247, 0.771181, 0.76322, 0.715721, 0.622483, 0.463793, 0.173589, -1.05372, 0.0646297, 0.330393, 0.442413, 0.478661, 0.457571, 0.377924, 0.217305, -0.120147, -0.772101, 0.00737007, 0.226323, 0.320415, 0.340938, 0.295797, 0.166021, -0.144996, -0.713986, 0.0675963, 0.32451, 0.466736, 0.549717, 0.591902, 0.60074, 0.578548, 0.52386, 0.430494, 0.282809, 0.0357447, -0.563457, -0.343711, 0.0175537, 0.163497, 0.2272, 0.24004, 0.212682, 0.147374, 0.039809, -0.124974, -0.394494, -1.07615, -0.717701, -0.377144, -0.215909, -0.111074, -0.0271089, 0.0513622, 0.130248, 0.209691, 0.286775, 0.357628, 0.418597, 0.466582, 0.498852, 0.512596, 0.504232, 0.468207, 0.394339, 0.259914, -0.00688523, -1.72174, 0.00638717, 0.310287, 0.475034, 0.575544, 0.63391, 0.658348, 0.650839, 0.608537, 0.521684, 0.363777, 0.0362165, -0.5814, 0.214656, 0.468796, 0.610273, 0.694999, 0.741313, 0.756522, 0.742848, 0.698823, 0.618436, 0.486709, 0.261447, -0.276482, -0.142027, 0.261937, 0.432582, 0.51806, 0.550957, 0.540951, 0.487327, 0.378324, 0.175262, -0.320308, -0.241865, 0.193427, 0.379679, 0.477998, 0.522937, 0.525168, 0.48512, 0.39337, 0.218996, -0.172297, -0.407865, 0.159416, 0.379462, 0.500899, 0.568238, 0.596686, 0.591834, 0.554148, 0.479362, 0.355479, 0.149966, -0.272202, -0.545095, -0.0120837, 0.167788, 0.242443, 0.253225, 0.209662, 0.105829, -0.0870405, -0.493344, -0.858307, -0.311345, -0.174495, -0.191579, -0.398777, -1.33721, -0.188935, 0.125535, 0.306012, 0.417625, 0.480111, 0.499314, 0.472476, 0.384925, 0.187606, -0.448274, 0.0193243, 0.407524, 0.60707, 0.730943, 0.808419, 0.850611, 0.861638, 0.841407, 0.785538, 0.682264, 0.50001, 0.109864, -0.182809, 0.398809, 0.612583, 0.724017, 0.777912, 0.788012, 0.756708, 0.677508, 0.527959, 0.225891, -0.811029, 0.294083, 0.555555, 0.688964, 0.758463, 0.783254, 0.769388, 0.715711, 0.612967, 0.433903, 0.0735443, -0.474041, 0.228758, 0.440464, 0.535119, 0.562474, 0.533615, 0.441273, 0.247598, -0.26053, -0.118197, 0.305692, 0.490872, 0.588089, 0.630551, 0.628265, 0.580697, 0.476083, 0.275113, -0.22855, -0.118296, 0.310355, 0.496083, 0.594642, 0.640183, 0.643606, 0.606015, 0.519624, 0.358738, 0.0229391, -0.556875, 0.20493, 0.450389, 0.584821, 0.663475, 0.705027, 0.717507, 0.704311, 0.665944, 0.600137, 0.500447, 0.351332, 0.10816, -0.480053, -0.248004, 0.137165, 0.31494, 0.420297, 0.486509, 0.526797, 0.547353, 0.550976, 0.538308, 0.508136, 0.457051, 0.378117, 0.256855, 0.0564421, -0.383642, -0.47774, 0.0236294, 0.232235, 0.349543, 0.414618, 0.439973, 0.42828, 0.375069, 0.264805, 0.0489812, -0.579769, -0.18041, 0.196336, 0.378298, 0.482345, 0.537434, 0.553299, 0.531367, 0.465986, 0.339039, 0.0912876, -0.808044, -0.0176011, 0.304712, 0.465713, 0.555859, 0.599895, 0.606387, 0.576479, 0.504763, 0.374246, 0.130764, -0.633586, -0.0452115, 0.293324, 0.460152, 0.556986, 0.611957, 0.636823, 0.637509, 0.617316, 0.578198, 0.52138, 0.447708, 0.357883, 0.252558, 0.132161, -0.00408083, -0.161236, -0.358271, -0.670401, -2.07372, -0.603577, -0.282252, -0.0809483, 0.0654451, 0.175433, 0.255908, 0.309326, 0.33559, 0.332153, 0.292727, 0.202936, 0.0237186, -0.432715, -0.374638, 0.100564, 0.318135, 0.449171, 0.530815, 0.576732, 0.592575, 0.579941, 0.537285, 0.4591, 0.332219, 0.121589, -0.325291, -0.482021, 0.00830817, 0.189021, 0.273093, 0.300756, 0.284719, 0.227488, 0.124115, -0.0419143, -0.321592, -1.04814, -0.671529, -0.392124, -0.318345, -0.347061, -0.467172, -0.711034, -1.24825, -1.56643, -1.76024, -0.951792, -0.433045, -0.128642, 0.0814184, 0.233195, 0.342478, 0.417124, 0.460846, 0.474464, 0.455891, 0.398704, 0.287202, 0.0763324, -0.486954, -0.229445, 0.168715, 0.352358, 0.454679, 0.507412, 0.521846, 0.501443, 0.444649, 0.344086, 0.180672, -0.103663, -0.96601, -0.352002, -0.0926117, -0.0260547, -0.0790983, -0.301121, -1.84422, -0.193077, 0.112736, 0.276324, 0.367886, 0.407063, 0.397753, 0.33211, 0.179595, -0.197993, -0.383752, 0.185628, 0.417727, 0.550312, 0.626583, 0.66068, 0.65641, 0.610562, 0.5099, 0.3137, -0.19239, -0.045961, 0.386379, 0.582945, 0.695069, 0.756941, 0.780513, 0.769303, 0.72122, 0.62698, 0.460745, 0.127382, -0.570318, 0.253888, 0.490664, 0.607446, 0.659667, 0.662182, 0.614803, 0.501997, 0.265433, -0.643814, 0.18559, 0.516848, 0.68872, 0.791034, 0.848939, 0.871836, 0.862415, 0.818515, 0.731525, 0.578151, 0.277405, -0.848915, 0.335478, 0.604275, 0.745441, 0.824723, 0.862076, 0.864509, 0.832582, 0.76083, 0.632996, 0.399042, -0.269832, 0.164714, 0.523539, 0.695127, 0.792295, 0.844052, 0.861207, 0.847488, 0.802213, 0.719899, 0.586129, 0.360082, -0.164742, -0.0777917, 0.333252, 0.502029, 0.584639, 0.615221, 0.604871, 0.555412, 0.461241, 0.304142, 0.0248685, -0.898954, -0.159014, 0.123218, 0.238351, 0.275397, 0.255938, 0.182627, 0.0439081, -0.201575, -0.771408, -0.705373, -0.387627, -0.367578, -0.616042, -0.866941, -0.178671, 0.105172, 0.276451, 0.384648, 0.446541, 0.467711, 0.446765, 0.373568, 0.216917, -0.157655, -0.376413, 0.205788, 0.440401, 0.575925, 0.657028, 0.699158, 0.708253, 0.685354, 0.627284, 0.524559, 0.352611, 0.0259042, -0.944605, 0.0660541, 0.30037, 0.405349, 0.441806, 0.425504, 0.356262, 0.218196, -0.0476202, -0.989668, -0.20315, 0.0786893, 0.188569, 0.209561, 0.152411, -0.0125358, -0.478471, -0.383044, 0.0677674, 0.26261, 0.36289, 0.401717, 0.386103, 0.307146, 0.125151, -0.388551, -0.179893, 0.248053, 0.448523, 0.564843, 0.630567, 0.657927, 0.651262, 0.610222, 0.52963, 0.395771, 0.170871, -0.319208, -0.384872, 0.0413005, 0.180402, 0.210154, 0.153246, -0.0202786, -0.545641, -0.305988, 0.106849, 0.293538, 0.391682, 0.432505, 0.424691, 0.365429, 0.236993, -0.0245916, -1.16515, -0.0968709, 0.192128, 0.324129, 0.378552, 0.373948, 0.308534, 0.157403, -0.191967, -0.599452, 0.0556071, 0.279412, 0.389815, 0.434118, 0.4242, 0.356306, 0.205777, -0.132, -0.64325, 0.0675024, 0.292508, 0.397223, 0.429469, 0.396414, 0.279128, -0.0167993, -0.615476, 0.201993, 0.469164, 0.618404, 0.705483, 0.74788, 0.751, 0.713063, 0.623386, 0.449587, 0.0501488, -0.136127, 0.411247, 0.628321, 0.747499, 0.811468, 0.834314, 0.820058, 0.766142, 0.661198, 0.471499, 0.0466163, -0.0964925, 0.418221, 0.622776, 0.733029, 0.79051, 0.809564, 0.79526, 0.747369, 0.660104, 0.517106, 0.268229, -0.4187, 0.011263, 0.358437, 0.521912, 0.614936, 0.667948, 0.693856, 0.699423, 0.688587, 0.663603, 0.625363, 0.57322, 0.504307, 0.411874, 0.280749, 0.0704769, -0.411796, -0.35031, 0.114962, 0.331985, 0.467397, 0.556866, 0.612961, 0.640336, 0.639524, 0.607544, 0.536323, 0.406339, 0.157846, -0.725964, 0.0418147, 0.364948, 0.52495, 0.612712, 0.652559, 0.652302, 0.611804, 0.523102, 0.362488, 0.0455201, -0.9521, 0.0868856, 0.319365, 0.414411, 0.428095, 0.363355, 0.178071, -0.458761, 0.0220849, 0.405604, 0.598206, 0.711758, 0.774893, 0.797564, 0.781626, 0.722239, 0.60339, 0.374822, -0.297582, 0.147652, 0.500461, 0.662686, 0.744918, 0.773917, 0.756604, 0.688823, 0.550517, 0.267791, -1.44814, 0.281734, 0.554038, 0.687007, 0.750289, 0.76282, 0.727933, 0.637367, 0.460501, 0.0616542, -0.17197, 0.37785, 0.579729, 0.677068, 0.711349, 0.692562, 0.615241, 0.450358, 0.0645406, -0.168586, 0.397236, 0.61245, 0.725051, 0.778541, 0.78626, 0.750154, 0.66275, 0.498581, 0.158812, -0.462222, 0.304316, 0.530528, 0.637038, 0.676939, 0.663964, 0.596282, 0.454165, 0.160032, -1.07816, 0.193126, 0.448773, 0.56692, 0.612169, 0.599779, 0.525936, 0.361537, -0.0332349, -0.21869, 0.326011, 0.536902, 0.645936, 0.694757, 0.695338, 0.647238, 0.536981, 0.317211, -0.318964, 0.0706981, 0.434399, 0.600319, 0.684718, 0.715357, 0.699532, 0.633229, 0.496166, 0.212159, -1.14396, 0.257731, 0.534765, 0.679048, 0.759508, 0.79727, 0.800431, 0.771191, 0.70729, 0.60041, 0.428517, 0.117375, -1.80538, 0.0779569, 0.334261, 0.456327, 0.5168, 0.538797, 0.532978, 0.505571, 0.461075, 0.403366, 0.336003, 0.26173, 0.180922, 0.0885871, -0.0315967, -0.226809, -0.742402, -0.474354, -0.0128021, 0.235866, 0.408382, 0.536873, 0.633642, 0.704372, 0.75175, 0.776677, 0.778595, 0.755266, 0.701829, 0.608189, 0.450611, 0.150839, -1.22842, 0.171899, 0.439363, 0.574163, 0.644339, 0.669737, 0.656437, 0.602958, 0.499011, 0.313586, -0.0842483, -0.360869, 0.205851, 0.412917, 0.518505, 0.567171, 0.573046, 0.539431, 0.461929, 0.324171, 0.0730511, -0.680399, -0.140301, 0.18579, 0.333624, 0.405728, 0.428165, 0.408574, 0.344931, 0.223186, -0.00408614, -0.643146, -0.253194, 0.117308, 0.296473, 0.402395, 0.465614, 0.49819, 0.505384, 0.488838, 0.447291, 0.375799, 0.262443, 0.0761592, -0.306924, -0.639711, -0.0283279, 0.20108, 0.331297, 0.409047, 0.44971, 0.45854, 0.435314, 0.374438, 0.2607, 0.0500954, -0.497408, -0.279591, 0.125323, 0.308168, 0.406384, 0.450566, 0.44881, 0.397632, 0.277941, 0.0197345, -1.77073, 0.0418719, 0.342933, 0.502043, 0.593468, 0.638514, 0.643942, 0.608835, 0.52382, 0.360631, 0.00677748, -0.425848, 0.241046, 0.469164, 0.586319, 0.640987, 0.646544, 0.602575, 0.49437, 0.268433, -0.494122, 0.126679, 0.471605, 0.642457, 0.738686, 0.786548, 0.794953, 0.764929, 0.690467, 0.552795, 0.29016, -0.707025, 0.183191, 0.484384, 0.627457, 0.698197, 0.719573, 0.698058, 0.630969, 0.503822, 0.269239, -0.370408, -0.0183848, 0.334174, 0.486359, 0.556963, 0.574785, 0.548977, 0.480125, 0.361641, 0.175357, -0.129327, -0.815722, -0.751566, -0.722634, -0.882078, -0.122645, 0.205724, 0.411599, 0.54985, 0.640619, 0.69259, 0.708623, 0.686886, 0.619055, 0.481917, 0.193533, -0.859045, 0.283385, 0.559375, 0.707395, 0.792448, 0.834465, 0.840609, 0.811762, 0.74314, 0.620281, 0.400254, -0.150623, 0.0388022, 0.437758, 0.613397, 0.707209, 0.752404, 0.761155, 0.737947, 0.682839, 0.591534, 0.45238, 0.234091, -0.190643, -0.532031, 0.0187806, 0.19791, 0.276593, 0.302057, 0.291666, 0.254077, 0.194683, 0.117456, 0.0252335, -0.0815875, -0.209135, -0.381555, -0.694522, -1.36627, -0.473789, -0.166204, 0.0302853, 0.17059, 0.271439, 0.338888, 0.374135, 0.374541, 0.331988, 0.225828, -0.0105836, -1.20225, -0.00190887, 0.324867, 0.503185, 0.613186, 0.677892, 0.705608, 0.697936, 0.650978, 0.552251, 0.366084, -0.0699777, -0.145151, 0.347968, 0.548424, 0.653354, 0.700842, 0.701825, 0.655465, 0.548254, 0.333581, -0.28275, 0.0819072, 0.45619, 0.630054, 0.723323, 0.765153, 0.764877, 0.722863, 0.63092, 0.463375, 0.122599, -0.527441, 0.253018, 0.47708, 0.579978, 0.614989, 0.595039, 0.516074, 0.351079, -0.0214126, -0.354818, 0.249033, 0.461464, 0.565333, 0.606068, 0.596145, 0.534478, 0.405203, 0.150839, -0.734818, -0.000361685, 0.298844, 0.426149, 0.469885, 0.447674, 0.350832, 0.125354, -0.736411, 0.0325518, 0.36283, 0.526789, 0.616632, 0.657717, 0.659155, 0.622975, 0.545832, 0.416819, 0.206909, -0.192195, -0.766378, -0.134198, -0.00541242, -0.0369901, -0.251172, -2.15131, -0.171445, 0.116956, 0.250578, 0.295164, 0.25632, 0.0927461, -0.534727, -0.0169259, 0.38054, 0.587742, 0.715155, 0.791296, 0.826085, 0.821228, 0.771371, 0.658769, 0.425098, -0.438777, 0.329627, 0.663734, 0.833888, 0.931975, 0.983055, 0.99588, 0.971856, 0.906164, 0.783597, 0.557954, -0.0437126, 0.253934, 0.625948, 0.789831, 0.871098, 0.899126, 0.882383, 0.819099, 0.695576, 0.466563, -0.137316, 0.142626, 0.504206, 0.652483, 0.712365, 0.710124, 0.64712, 0.502273, 0.181535, -0.475755, 0.333113, 0.57022, 0.684656, 0.730893, 0.72291, 0.658626, 0.516995, 0.212815, -0.673914, 0.305405, 0.552784, 0.669339, 0.713926, 0.699899, 0.621059, 0.440821, -0.045008, 0.076467, 0.517171, 0.712025, 0.817241, 0.86676, 0.870854, 0.829209, 0.730489, 0.536968, 0.0582741, 0.10938, 0.555591, 0.743304, 0.839515, 0.878897, 0.871115, 0.813987, 0.690874, 0.442025, -0.510692, 0.346889, 0.660483, 0.814303, 0.896027, 0.929535, 0.922453, 0.874248, 0.775734, 0.598666, 0.229818, -0.206855, 0.441402, 0.65607, 0.76087, 0.804473, 0.801056, 0.752045, 0.647661, 0.453793, 0.00870997, -0.0731362, 0.411592, 0.605968, 0.70792, 0.757427, 0.768729, 0.747378, 0.6944, 0.607001, 0.476939, 0.283775, -0.0365783, -1.14775, -0.244074, -0.00698695, 0.0720399, 0.0769747, 0.0320055, -0.0515061, -0.16256, -0.280229, -0.364487, -0.371822, -0.302711, -0.200344, -0.102943, -0.0289431, 0.0145453, 0.0240158, -0.00458581, -0.0791155, -0.217442, -0.470926, -1.16411, -0.791768, -0.500627, -0.432664, -0.503973, -0.800178, -1.17983, -0.502105, -0.274642, -0.182529, -0.195368, -0.362175, -1.54736, -0.242345, 0.124431, 0.339942, 0.485089, 0.584211, 0.647161, 0.677671, 0.675457, 0.635812, 0.545988, 0.370531, -0.0504983, -0.124932, 0.388251, 0.607869, 0.735499, 0.811387, 0.849748, 0.855987, 0.830788, 0.770561, 0.664988, 0.48687, 0.135219, -0.47053, 0.278881, 0.504646, 0.615953, 0.666859, 0.674006, 0.642076, 0.568368, 0.440408, 0.220097, -0.280818, -0.263274, 0.16408, 0.333273, 0.414604, 0.445361, 0.439772, 0.404804, 0.344885, 0.264395, 0.170062, 0.0737505, -0.00623938, -0.0508334, -0.0539629, -0.0291799, 0.000588839, 0.0144635, -0.00523958, -0.0805022, -0.262032, -0.845698, -0.451092, -0.0482064, 0.151773, 0.268426, 0.330337, 0.34558, 0.311539, 0.211692, -0.0124715, -0.899804, -0.0765318, 0.263241, 0.441287, 0.547974, 0.608516, 0.632315, 0.622066, 0.575674, 0.484818, 0.327392, 0.029488, -2.21764, -0.00152794, 0.256, 0.370602, 0.411603, 0.395098, 0.317461, 0.14948, -0.250318, -0.425847, 0.113606, 0.324905, 0.437065, 0.492651, 0.505887, 0.481135, 0.416673, 0.30348, 0.116397, -0.235034, -1.07728, -0.206499, -0.00707033, 0.0601677, 0.0498756, -0.0290931, -0.192163, -0.508027, -1.9749, -0.718719, -0.613814, -0.933021, -0.717526, -0.182733, 0.0889921, 0.26329, 0.378829, 0.450162, 0.482692, 0.476029, 0.423072, 0.302657, 0.0414818, -1.98701, 0.0921946, 0.393453, 0.557941, 0.657969, 0.715446, 0.738895, 0.730967, 0.690143, 0.609715, 0.472257, 0.22496, -0.502379, 0.00646398, 0.343621, 0.501309, 0.585445, 0.624003, 0.627618, 0.600253, 0.541995, 0.449317, 0.313233, 0.112412, -0.218248, -1.32665, -0.473424, -0.279707, -0.282032, -0.455301, -1.31503, -0.475576, -0.128223, 0.0525193, 0.15873, 0.216715, 0.236498, 0.220902, 0.167105, 0.0638572, -0.122233, -0.5407, -0.678757, -0.151606, 0.0677667, 0.196571, 0.276846, 0.323399, 0.341833, 0.332736, 0.291993, 0.207784, 0.0478328, -0.322209, -0.53979, 0.0598944, 0.313836, 0.472905, 0.581886, 0.656418, 0.702971, 0.723748, 0.718031, 0.681915, 0.606115, 0.468221, 0.195496, -1.91577, 0.20901, 0.504159, 0.660398, 0.750818, 0.79634, 0.803504, 0.771206, 0.689791, 0.530125, 0.173721, -0.18627, 0.457024, 0.695306, 0.829051, 0.906531, 0.943674, 0.94597, 0.913157, 0.839064, 0.706316, 0.461203, -0.284842, 0.260139, 0.592688, 0.746307, 0.823299, 0.849343, 0.831549, 0.767046, 0.639992, 0.396681, -0.370853, 0.211037, 0.538654, 0.689174, 0.762444, 0.783541, 0.758929, 0.684399, 0.540267, 0.255011, -2.20587, 0.235063, 0.504739, 0.631953, 0.688789, 0.694857, 0.654117, 0.55967, 0.385485, 0.0274024, -0.523398, 0.177948, 0.38406, 0.4699, 0.484337, 0.436391, 0.313305, 0.0550711, -0.988551, -0.0509296, 0.229277, 0.341163, 0.361895, 0.297458, 0.101287, -0.674335, 0.021493, 0.375533, 0.555606, 0.658056, 0.708115, 0.713104, 0.670506, 0.564939, 0.343542, -0.391407, 0.194413, 0.54688, 0.722825, 0.824461, 0.879019, 0.896531, 0.879969, 0.82741, 0.730727, 0.568237, 0.267924, -1.70398, 0.211062, 0.467635, 0.579945, 0.620044, 0.606283, 0.539874, 0.406927, 0.155756, -0.593439, -0.0825716, 0.226099, 0.345613, 0.375372, 0.332717, 0.202992, -0.0996668, -0.878326, 0.0216508, 0.261865, 0.370184, 0.401348, 0.363374, 0.234964, -0.0972045, -0.453114, 0.207692, 0.453827, 0.591422, 0.669359, 0.703637, 0.699406, 0.655387, 0.562786, 0.396226, 0.0621388, -0.671846, 0.165956, 0.393205, 0.495967, 0.529357, 0.506265, 0.421536, 0.243893, -0.180259, -0.294214, 0.207715, 0.4028, 0.498255, 0.532955, 0.517471, 0.449555, 0.311606, 0.0397742, -1.09543, -0.0629757, 0.208333, 0.316016, 0.335049, 0.272175, 0.0863072, -0.557757, -0.0696073, 0.308643, 0.495786, 0.602542, 0.656827, 0.667395, 0.633622, 0.5446, 0.364751, -0.0768875, -0.0982891, 0.386973, 0.594154, 0.709759, 0.772059, 0.794032, 0.779355, 0.725457, 0.621327, 0.434817, 0.0281367, -0.197022, 0.349775, 0.557014, 0.665784, 0.719594, 0.732878, 0.710051, 0.649296, 0.541061, 0.35777, -0.00773577, -0.521191, 0.166703, 0.386115, 0.496276, 0.549243, 0.561944, 0.540286, 0.48413, 0.386978, 0.22967, -0.0513096, -1.1513, -0.150841, 0.146805, 0.297904, 0.386613, 0.43747, 0.460124, 0.457934, 0.43003, 0.37068, 0.264939, 0.070262, -0.436516, -0.246976, 0.200845, 0.423853, 0.568946, 0.670183, 0.740418, 0.785241, 0.806771, 0.80482, 0.776905, 0.717151, 0.612699, 0.430708, 0.0369951, -0.211767, 0.359972, 0.581396, 0.704524, 0.773757, 0.803893, 0.799853, 0.760888, 0.680118, 0.53844, 0.274728, -0.687714, 0.15642, 0.461846, 0.608948, 0.685517, 0.715711, 0.707874, 0.663184, 0.576821, 0.43425, 0.193363, -0.362983, -0.266744, 0.100656, 0.218799, 0.228243, 0.13963, -0.114874, -1.21896, -0.00119914, 0.284026, 0.434534, 0.516269, 0.54839, 0.535669, 0.473322, 0.341475, 0.068573, -2.37037, 0.0735144, 0.355924, 0.496064, 0.566006, 0.58521, 0.557149, 0.473412, 0.302236, -0.102336, -0.25422, 0.280286, 0.495579, 0.613938, 0.677263, 0.699569, 0.685051, 0.631644, 0.529317, 0.349114, -0.0244035, -0.440588, 0.19612, 0.410602, 0.517251, 0.564617, 0.567735, 0.530175, 0.447659, 0.304143, 0.0485239, -0.665314, -0.225681, 0.0903854, 0.213046, 0.247432, 0.213023, 0.0994104, -0.158563, -1.75251, -0.163145, 0.124498, 0.264206, 0.330065, 0.340815, 0.297067, 0.181767, -0.0737981, -1.83439, -0.0505439, 0.25147, 0.411798, 0.505341, 0.554083, 0.565764, 0.541196, 0.474752, 0.349129, 0.109104, -0.674103, -0.0444326, 0.294607, 0.463766, 0.561958, 0.616079, 0.636435, 0.626775, 0.586822, 0.512153, 0.391243, 0.193825, -0.198637, -0.606006, 0.00267765, 0.198916, 0.284947, 0.30548, 0.269045, 0.163812, -0.0657574, -0.934113, -0.151594, 0.185877, 0.361504, 0.467467, 0.529681, 0.558243, 0.55683, 0.525058, 0.458149, 0.343402, 0.145845, -0.289971, -0.408432, 0.0964228, 0.302084, 0.417037, 0.48248, 0.513248, 0.515501, 0.491096, 0.438528, 0.351877, 0.216108, -0.0124081, -0.575523, -0.354954, 0.0509557, 0.24645, 0.37048, 0.457245, 0.520618, 0.567446, 0.601311, 0.623902, 0.635588, 0.635641, 0.62222, 0.592063, 0.539618, 0.454744, 0.315559, 0.0562021, -1.03199, 0.00810318, 0.329212, 0.502348, 0.610259, 0.676456, 0.709678, 0.712378, 0.682574, 0.612626, 0.48271, 0.229862, -0.782471, 0.160539, 0.479099, 0.644057, 0.740754, 0.793133, 0.809797, 0.792535, 0.73772, 0.633534, 0.446649, 0.0331682, -0.151329, 0.381132, 0.587849, 0.696982, 0.750398, 0.761417, 0.732913, 0.660115, 0.526141, 0.276468, -0.501286, 0.0820057, 0.402734, 0.545852, 0.609856, 0.618147, 0.573872, 0.46451, 0.240821, -0.445491, 0.0343802, 0.384505, 0.546287, 0.627562, 0.654289, 0.632273, 0.554691, 0.392779, 0.0200374, -0.265625, 0.330269, 0.554053, 0.674029, 0.735516, 0.752627, 0.728148, 0.656212, 0.515901, 0.232423, -1.36745, 0.258376, 0.537034, 0.680611, 0.759521, 0.794944, 0.794681, 0.760342, 0.688568, 0.568672, 0.371795, -0.0129365, -0.508746, 0.136341, 0.325404, 0.397237, 0.397426, 0.331587, 0.177543, -0.177069, -0.574211, 0.0712522, 0.293521, 0.40534, 0.455008, 0.456856, 0.412684, 0.31361, 0.128713, -0.278058, -0.516739, 0.0257321, 0.221812, 0.314628, 0.346368, 0.328572, 0.259531, 0.122162, -0.146654, -1.2688, -0.234609, 0.0538075, 0.188586, 0.252115, 0.267527, 0.24277, 0.178868, 0.0713473, -0.091936, -0.339971, -0.761379, -2.77325, -1.38387, -1.19544, -0.514723, -0.179919, 0.0385839, 0.192422, 0.302499, 0.37927, 0.428419, 0.45294, 0.453908, 0.430587, 0.379846, 0.294293, 0.156483, -0.085266, -0.781276, -0.298667, 0.0616343, 0.244629, 0.359941, 0.436815, 0.486997, 0.51579, 0.525206, 0.514926, 0.48221, 0.420678, 0.316352, 0.132892, -0.289521, -0.366876, 0.154483, 0.384554, 0.525932, 0.618792, 0.677345, 0.707192, 0.709596, 0.682336, 0.618474, 0.501079, 0.280664, -0.353764, 0.0533594, 0.431607, 0.61829, 0.729919, 0.796031, 0.827591, 0.828418, 0.797933, 0.730829, 0.613082, 0.405174, -0.0872905, -0.0289314, 0.411984, 0.601535, 0.704875, 0.757831, 0.772836, 0.753702, 0.698725, 0.599444, 0.432463, 0.11583, -0.975031, 0.149799, 0.400092, 0.522769, 0.582938, 0.600641, 0.583377, 0.532936, 0.446868, 0.31735, 0.125619, -0.181985, -0.948827, -0.600008, -0.388761, -0.443901, -0.890558, -0.615827, -0.156847, 0.0694921, 0.207295, 0.292095, 0.337949, 0.351157, 0.334006, 0.285763, 0.20217, 0.0727192, -0.129219, -0.499788, -1.22122, -0.443279, -0.243817, -0.161585, -0.137869, -0.150854, -0.186848, -0.232366, -0.271536, -0.288771, -0.276652, -0.241349, -0.198366, -0.164576, -0.155159, -0.186801, -0.289329, -0.561404, -1.15697, -0.294276, 0.0064247, 0.19133, 0.317587, 0.404359, 0.459919, 0.487886, 0.489109, 0.462034, 0.401964, 0.298359, 0.125585, -0.204655, -1.10248, -0.151133, 0.0771361, 0.174121, 0.195911, 0.150509, 0.0165315, -0.318598, -0.687898, -0.0242458, 0.220556, 0.356616, 0.432547, 0.463465, 0.452726, 0.395029, 0.270566, 0.00932175, -1.71249, 0.0256464, 0.327892, 0.489687, 0.586165, 0.639578, 0.658216, 0.64403, 0.593963, 0.497607, 0.326217, -0.0328295, -0.467842, 0.20044, 0.433862, 0.561408, 0.633376, 0.666411, 0.666618, 0.63463, 0.566031, 0.44792, 0.243741, -0.216271, -0.264757, 0.208747, 0.404576, 0.511645, 0.568935, 0.590433, 0.581675, 0.543847, 0.474568, 0.366587, 0.202286, -0.0699974, -0.79053, -0.375319, -0.0653882, 0.0542004, 0.0921466, 0.0738845, 0.00469567, -0.121905, -0.329593, -0.698283, -2.61317, -0.98056, -1.06801, -1.24078, -0.5117, -0.199937, -0.00991958, 0.109594, 0.175013, 0.188927, 0.141152, -0.00782001, -0.47976, -0.259822, 0.208133, 0.445951, 0.600921, 0.707673, 0.779447, 0.821976, 0.837175, 0.824067, 0.778222, 0.688947, 0.529164, 0.200154, -0.425943, 0.370899, 0.620871, 0.756201, 0.832228, 0.866213, 0.863625, 0.823258, 0.736307, 0.577229, 0.251041, -0.436814, 0.39445, 0.640858, 0.769311, 0.83647, 0.859582, 0.843527, 0.785652, 0.673442, 0.468669, -0.0170872, 0.0143438, 0.454447, 0.633703, 0.720643, 0.749322, 0.72785, 0.650336, 0.488585, 0.117388, -0.176649, 0.42408, 0.649723, 0.772163, 0.837461, 0.860648, 0.84621, 0.792034, 0.687627, 0.502232, 0.107992, -0.195883, 0.380439, 0.585821, 0.687652, 0.73092, 0.729445, 0.685724, 0.593554, 0.431587, 0.124239, -1.44983, 0.0983837, 0.343226, 0.447074, 0.476855, 0.447783, 0.354986, 0.165482, -0.291373, -0.326458, 0.13527, 0.315363, 0.398038, 0.419086, 0.386841, 0.29481, 0.112181, -0.305375, -0.484161, 0.0318384, 0.221243, 0.307725, 0.331307, 0.302169, 0.216419, 0.0511747, -0.284939, -1.05061, -0.208365, 0.00248521, 0.0818079, 0.0826881, 0.0125068, -0.149102, -0.501119, -1.12337, -0.416168, -0.267593, -0.305342, -0.644368, -0.594175, -0.0426702, 0.219459, 0.383069, 0.488447, 0.549992, 0.57261, 0.555152, 0.489109, 0.349543, 0.0440129, -0.67827, 0.201362, 0.461699, 0.600652, 0.675802, 0.704028, 0.688894, 0.624377, 0.48787, 0.194394, -0.708409, 0.312543, 0.585005, 0.733481, 0.820737, 0.866636, 0.87894, 0.859897, 0.807694, 0.715304, 0.564779, 0.301638, -0.472938, 0.0744401, 0.389088, 0.527197, 0.590432, 0.605474, 0.581792, 0.521771, 0.422958, 0.277101, 0.0644919, -0.270624, -1.08588, -0.761211, -0.630584, -0.867058, -1.21192, -0.549754, -0.350125, -0.315744, -0.469774, -1.87869, -0.244909, 0.111264, 0.3259, 0.471475, 0.571259, 0.63525, 0.66784, 0.670024, 0.639678, 0.570201, 0.445497, 0.219305, -0.37448, -0.0971185, 0.277134, 0.440064, 0.519261, 0.544048, 0.522297, 0.450752, 0.311473, 0.040699, -1.08639, -0.0526333, 0.23031, 0.356655, 0.406756, 0.400081, 0.336864, 0.198489, -0.0912373, -1.38325, -0.0567647, 0.205556, 0.332347, 0.391036, 0.401304, 0.369036, 0.292501, 0.161301, -0.054421, -0.471151, -0.950409, -0.381917, -0.265164, -0.303772, -0.515324, -1.68221, -0.540444, -0.261929, -0.162911, -0.183434, -0.372685, -2.32488, -0.225146, 0.108345, 0.296786, 0.412725, 0.477254, 0.496443, 0.467175, 0.373357, 0.159655, -0.623848, 0.0636041, 0.41703, 0.599771, 0.708348, 0.76863, 0.789569, 0.772492, 0.71215, 0.591981, 0.360069, -0.34356, 0.154031, 0.499038, 0.658379, 0.737906, 0.76302, 0.739059, 0.658441, 0.490169, 0.0921439, -0.0835066, 0.459681, 0.673969, 0.788601, 0.845477, 0.857623, 0.827087, 0.746992, 0.593997, 0.281747, -0.613481, 0.364406, 0.610263, 0.727318, 0.774938, 0.76767, 0.702501, 0.554271, 0.211703, -0.203203, 0.469648, 0.707403, 0.835551, 0.903647, 0.92713, 0.909762, 0.847183, 0.722449, 0.479203, -0.345443, 0.337502, 0.665061, 0.8244, 0.910755, 0.949596, 0.949507, 0.911231, 0.828256, 0.680326, 0.398413, -1.1066, 0.356995, 0.640109, 0.780984, 0.856479, 0.889473, 0.88899, 0.858279, 0.796932, 0.700732, 0.559019, 0.344674, -0.0408774, -0.731661, 0.00640107, 0.19173, 0.259878, 0.267406, 0.234379, 0.172699, 0.095166, 0.0212812, -0.022187, -0.0143581, 0.0412078, 0.120797, 0.20062, 0.265863, 0.308722, 0.324424, 0.3081, 0.251685, 0.137729, -0.0838375, -0.730862, -0.316881, 0.0462268, 0.214709, 0.302705, 0.337925, 0.328275, 0.271487, 0.152628, -0.0790269, -0.779114, -0.28954, 0.0562546, 0.217151, 0.300773, 0.334605, 0.327781, 0.281125, 0.187832, 0.0265024, -0.277785, -1.93036, -0.296447, -0.0396987, 0.0811892, 0.136694, 0.147826, 0.12193, 0.0594432, -0.0462085, -0.215946, -0.525188, -1.94202, -0.509638, -0.22902, -0.0680628, 0.0445771, 0.131929, 0.203801, 0.264438, 0.315182, 0.355726, 0.384787, 0.400417, 0.400021, 0.38005 +}; #endif /* MULTIPATH_V30_M10_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v30_M12.h b/src/lte/model/JakesTraces/multipath_v30_M12.h index 5e3ed90aa..1b5debb9a 100644 --- a/src/lte/model/JakesTraces/multipath_v30_M12.h +++ b/src/lte/model/JakesTraces/multipath_v30_M12.h @@ -24,8 +24,8 @@ #define MULTIPATH_V30_M12_H_ static double multipath_M12_v_30[3000] = { - 1.12499, 1.06523, 0.951479, 0.744409, 0.245507, 0.319233, 0.751385, 0.934464, 1.03007, 1.07334, 1.07607, 1.04101, 0.964413, 0.832851, 0.606495, 0.0851642, 0.140231, 0.544606, 0.696209, 0.753447, 0.747157, 0.680502, 0.534742, 0.22669, -0.696856, 0.301278, 0.544691, 0.657752, 0.701063, 0.690437, 0.625488, 0.489136, 0.215602, -1.09289, 0.149758, 0.424757, 0.546734, 0.59208, 0.578865, 0.50533, 0.347162, -0.00390638, -0.467953, 0.205608, 0.423544, 0.52603, 0.561732, 0.542794, 0.465389, 0.304193, -0.0502566, -0.507843, 0.158935, 0.374294, 0.474132, 0.506478, 0.482651, 0.396942, 0.217705, -0.209915, -0.320224, 0.17598, 0.366133, 0.45521, 0.480933, 0.451735, 0.360112, 0.170939, -0.297079, -0.283659, 0.166508, 0.34673, 0.430604, 0.452346, 0.419098, 0.322008, 0.122064, -0.398725, -0.250378, 0.158639, 0.328658, 0.406681, 0.423386, 0.384245, 0.277949, 0.0569093, -0.606945, -0.172557, 0.177834, 0.333283, 0.404805, 0.418128, 0.377544, 0.272024, 0.0573736, -0.540476, -0.234383, 0.135073, 0.292758, 0.362332, 0.370564, 0.320256, 0.194664, -0.0771846, -2.25189, -0.0651418, 0.210999, 0.344276, 0.405605, 0.413982, 0.372274, 0.270816, 0.0740189, -0.392903, -0.422124, 0.0268193, 0.194259, 0.258821, 0.250763, 0.16553, -0.0474389, -0.844847, -0.14809, 0.195462, 0.367816, 0.465185, 0.513832, 0.523408, 0.496548, 0.430897, 0.317697, 0.134311, -0.192773, -2.20536, -0.332084, -0.143951, -0.14008, -0.30925, -1.26405, -0.284406, 0.0596895, 0.239618, 0.341669, 0.389291, 0.388605, 0.3348, 0.205718, -0.0848421, -0.931354, 0.0498912, 0.320158, 0.465734, 0.547972, 0.585808, 0.585615, 0.547023, 0.462495, 0.309664, 0.00958832, -1.21411, 0.0480325, 0.314128, 0.451463, 0.528311, 0.566962, 0.577919, 0.567613, 0.541214, 0.504084, 0.462598, 0.424169, 0.395968, 0.38234, 0.382469, 0.390297, 0.396565, 0.390788, 0.361208, 0.291354, 0.147239, -0.197743, -0.483392, 0.15581, 0.414201, 0.570726, 0.67233, 0.735044, 0.765106, 0.763838, 0.728441, 0.650095, 0.505842, 0.217543, -1.10335, 0.26573, 0.544, 0.690786, 0.774266, 0.815025, 0.820489, 0.791783, 0.724561, 0.605503, 0.396046, -0.0922129, -0.0613341, 0.381335, 0.566693, 0.664735, 0.711991, 0.721229, 0.69658, 0.636788, 0.534243, 0.367812, 0.0663892, -1.78899, 0.0128274, 0.280496, 0.41044, 0.477913, 0.505954, 0.504198, 0.476811, 0.424654, 0.345323, 0.231144, 0.0618211, -0.230124, -1.58165, -0.28155, 0.0209184, 0.188279, 0.29866, 0.374687, 0.424911, 0.452221, 0.456252, 0.433732, 0.377195, 0.270099, 0.0669753, -0.481421, -0.225944, 0.186593, 0.383054, 0.497781, 0.561958, 0.585685, 0.570109, 0.508572, 0.379876, 0.110116, -1.75203, 0.149169, 0.441151, 0.595859, 0.684455, 0.727721, 0.732457, 0.698232, 0.617091, 0.465502, 0.159322, -0.822777, 0.231009, 0.48489, 0.608973, 0.664767, 0.668201, 0.618894, 0.499629, 0.243504, -1.17055, 0.238244, 0.539886, 0.696092, 0.784024, 0.825911, 0.829348, 0.794761, 0.715756, 0.573125, 0.303908, -0.741675, 0.196933, 0.488685, 0.622895, 0.682915, 0.689908, 0.647178, 0.54459, 0.343675, -0.16032, -0.0587856, 0.365064, 0.542445, 0.629186, 0.658133, 0.637518, 0.562535, 0.409003, 0.0783132, -0.523084, 0.247028, 0.483396, 0.601539, 0.654944, 0.658358, 0.612098, 0.502256, 0.277601, -0.440324, 0.105536, 0.457712, 0.631115, 0.730679, 0.784449, 0.80323, 0.791138, 0.748331, 0.671114, 0.549578, 0.358462, 0.00902381, -0.876717, 0.0377841, 0.253606, 0.344649, 0.371055, 0.350837, 0.28966, 0.187193, 0.0388642, -0.16237, -0.414083, -0.638469, -0.615091, -0.376726, -0.133435, 0.0580962, 0.199763, 0.299555, 0.363123, 0.393054, 0.388687, 0.34484, 0.247245, 0.0540272, -0.45822, -0.274432, 0.159215, 0.365087, 0.490095, 0.568655, 0.61385, 0.631253, 0.622561, 0.586396, 0.517444, 0.402671, 0.206786, -0.227063, -0.332559, 0.177042, 0.391516, 0.517303, 0.595373, 0.640487, 0.658805, 0.652303, 0.619896, 0.556894, 0.452044, 0.276635, -0.077608, -0.571129, 0.13203, 0.371915, 0.505198, 0.583759, 0.624663, 0.634357, 0.614081, 0.560763, 0.464998, 0.302256, -0.0135089, -0.941599, 0.0664791, 0.323677, 0.458329, 0.5331, 0.567765, 0.570111, 0.54261, 0.484085, 0.389154, 0.244632, 0.0153476, -0.451481, -0.628876, -0.16178, -0.00634277, 0.0496369, 0.0455289, -0.00718808, -0.107936, -0.265103, -0.503007, -0.902469, -2.39103, -1.15516, -1.07161, -1.12589, -1.11905, -0.892374, -0.57203, -0.282058, -0.0444311, 0.146395, 0.298227, 0.416998, 0.506614, 0.569261, 0.605565, 0.61444, 0.592383, 0.531513, 0.413576, 0.184773, -0.534357, 0.00887284, 0.359673, 0.530077, 0.623651, 0.66635, 0.665495, 0.618566, 0.510582, 0.291266, -0.384874, 0.0958208, 0.456523, 0.630193, 0.725843, 0.770747, 0.773279, 0.732616, 0.637949, 0.454851, 0.024232, -0.0648114, 0.434124, 0.635798, 0.741394, 0.789533, 0.791402, 0.746399, 0.641394, 0.430938, -0.164707, 0.168493, 0.553597, 0.734981, 0.836875, 0.889844, 0.904832, 0.885011, 0.828235, 0.725471, 0.551974, 0.219222, -0.646621, 0.281013, 0.512094, 0.617821, 0.657729, 0.64857, 0.593089, 0.483476, 0.292354, -0.0900524, -0.594448, 0.0469218, 0.22288, 0.271685, 0.230744, 0.0799381, -0.349434, -0.337985, 0.145345, 0.351516, 0.462197, 0.514758, 0.520819, 0.481141, 0.3861, 0.203141, -0.2158, -0.368886, 0.14835, 0.3496, 0.454008, 0.503587, 0.513129, 0.488539, 0.431469, 0.340685, 0.212245, 0.0390005, -0.189854, -0.48412, -0.807764, -0.935407, -0.767941, -0.582025, -0.492259, -0.546253, -1.0255, -0.551709, -0.0734124, 0.195406, 0.378731, 0.5091, 0.599632, 0.656101, 0.680179, 0.66998, 0.618621, 0.508458, 0.285772, -0.436824, 0.128238, 0.483447, 0.660224, 0.761623, 0.814341, 0.827273, 0.801205, 0.729504, 0.591511, 0.316371, -1.48778, 0.30676, 0.592619, 0.736756, 0.813411, 0.843958, 0.835385, 0.787374, 0.692182, 0.527072, 0.212743, -1.04855, 0.208285, 0.445281, 0.543021, 0.564186, 0.520053, 0.39619, 0.118762, -1.21145, 0.165375, 0.433933, 0.563869, 0.621903, 0.625378, 0.574862, 0.454892, 0.206393, -0.739415, 0.0977441, 0.400532, 0.536742, 0.591492, 0.582706, 0.504051, 0.312212, -0.287172, 0.0993196, 0.487986, 0.675585, 0.781768, 0.835845, 0.847227, 0.816176, 0.733886, 0.572133, 0.216023, -0.184445, 0.46859, 0.698637, 0.820567, 0.88304, 0.901104, 0.878168, 0.809318, 0.676226, 0.41655, -0.619607, 0.331172, 0.636015, 0.786171, 0.866479, 0.900681, 0.897053, 0.85672, 0.774596, 0.635021, 0.390351, -0.250324, 0.0748664, 0.421056, 0.564121, 0.623707, 0.627033, 0.579421, 0.471897, 0.267669, -0.225855, -0.17394, 0.258182, 0.435361, 0.522883, 0.556191, 0.546761, 0.496332, 0.398409, 0.231215, -0.0838782, -1.31594, -0.0745548, 0.177138, 0.301316, 0.366913, 0.397186, 0.403873, 0.394789, 0.376252, 0.353748, 0.331594, 0.31204, 0.294381, 0.27461, 0.245525, 0.196278, 0.109109, -0.0550426, -0.456655, -0.523279, 0.0164722, 0.260654, 0.413776, 0.516424, 0.58325, 0.620465, 0.630254, 0.611952, 0.561693, 0.470101, 0.314136, 0.0171048, -1.49362, 0.0301446, 0.30095, 0.438984, 0.514196, 0.548053, 0.54916, 0.520754, 0.462804, 0.372193, 0.241261, 0.0526269, -0.241997, -0.91907, -0.699688, -0.422103, -0.371757, -0.438566, -0.632818, -1.1399, -1.11889, -0.74951, -0.678145, -0.791637, -1.42042, -0.84488, -0.452285, -0.253255, -0.140265, -0.0858819, -0.0825413, -0.134292, -0.262684, -0.552653, -1.42878, -0.428134, -0.158935, -0.0139378, 0.0704976, 0.116354, 0.135111, 0.135352, 0.125861, 0.116961, 0.119796, 0.142954, 0.188259, 0.24992, 0.318092, 0.383097, 0.437356, 0.475215, 0.491853, 0.481783, 0.436516, 0.339087, 0.143701, -0.402398, -0.130714, 0.284538, 0.48468, 0.602841, 0.670208, 0.697039, 0.684732, 0.627075, 0.504001, 0.246805, -1.19978, 0.249555, 0.555536, 0.71783, 0.813201, 0.863883, 0.877689, 0.855578, 0.792403, 0.672442, 0.44768, -0.179669, 0.186134, 0.555081, 0.725785, 0.817223, 0.85836, 0.858431, 0.8177, 0.727721, 0.561844, 0.215753, -0.318017, 0.403732, 0.636804, 0.757915, 0.819887, 0.839597, 0.822679, 0.768591, 0.670338, 0.50826, 0.219018, -0.845377, 0.0672065, 0.333511, 0.438241, 0.462525, 0.422968, 0.311936, 0.083042, -0.594834, -0.165408, 0.16815, 0.302499, 0.344499, 0.311878, 0.186859, -0.139684, -0.525244, 0.151617, 0.399083, 0.536576, 0.613848, 0.647006, 0.640995, 0.593894, 0.495129, 0.313153, -0.0863776, -0.335636, 0.220504, 0.425476, 0.528128, 0.571655, 0.568866, 0.520733, 0.417522, 0.226359, -0.201871, -0.359778, 0.145304, 0.333183, 0.41988, 0.443988, 0.413885, 0.321295, 0.127629, -0.384673, -0.225106, 0.198619, 0.387915, 0.491528, 0.543148, 0.554108, 0.526651, 0.455692, 0.323649, 0.0721191, -0.817323, -0.0463258, 0.278078, 0.44353, 0.542429, 0.601387, 0.631665, 0.638817, 0.625574, 0.592806, 0.539645, 0.46287, 0.354941, 0.197968, -0.0617099, -0.809507, -0.265541, 0.0825748, 0.26222, 0.377092, 0.454707, 0.505565, 0.533776, 0.540046, 0.522372, 0.475326, 0.386961, 0.227525, -0.115883, -0.538885, 0.152118, 0.407594, 0.55909, 0.657339, 0.719635, 0.753271, 0.761107, 0.743201, 0.6969, 0.615519, 0.483776, 0.259857, -0.267967, -0.160227, 0.249578, 0.420055, 0.503619, 0.533066, 0.517628, 0.455413, 0.331484, 0.0946277, -0.618539, -0.117787, 0.221935, 0.377492, 0.45455, 0.479107, 0.457836, 0.386445, 0.244695, -0.0419115, -1.66148, -0.02928, 0.239127, 0.368178, 0.426252, 0.430624, 0.381013, 0.25903, -0.00943195, -1.4859, 0.0514641, 0.342346, 0.498737, 0.590515, 0.638757, 0.651114, 0.6288, 0.567428, 0.453382, 0.246863, -0.252406, -0.170343, 0.263192, 0.449342, 0.548299, 0.594586, 0.599061, 0.562635, 0.477122, 0.315745, -0.0279348, -0.523565, 0.187743, 0.428951, 0.561183, 0.636798, 0.673064, 0.676476, 0.648096, 0.584221, 0.473594, 0.285187, -0.108411, -0.413376, 0.171635, 0.388283, 0.506668, 0.573703, 0.606201, 0.611846, 0.594476, 0.555914, 0.496671, 0.416159, 0.312519, 0.18185, 0.0159024, -0.20572, -0.553826, -2.62751, -0.616359, -0.333223, -0.15791, -0.0195451, 0.100203, 0.205912, 0.297689, 0.374347, 0.434423, 0.476307, 0.497995, 0.496547, 0.467068, 0.400386, 0.276305, 0.034417, -0.852084, -0.0601338, 0.27234, 0.443756, 0.544689, 0.599858, 0.617897, 0.600256, 0.542443, 0.43038, 0.222655, -0.295973, -0.162113, 0.254269, 0.431724, 0.519643, 0.549175, 0.526495, 0.442163, 0.255925, -0.263664, -0.0487671, 0.376528, 0.5763, 0.692369, 0.757682, 0.783702, 0.77343, 0.723811, 0.623182, 0.43763, 0.0169528, -0.126099, 0.39136, 0.596203, 0.704415, 0.756565, 0.765283, 0.732445, 0.651037, 0.497379, 0.182862, -0.637423, 0.291694, 0.544315, 0.674842, 0.743591, 0.769358, 0.758813, 0.712573, 0.625856, 0.485, 0.251813, -0.251658, -0.309939, 0.0995507, 0.223416, 0.232549, 0.140975, -0.11865, -1.21352, -0.0175502, 0.256341, 0.392078, 0.453342, 0.455177, 0.392959, 0.233937, -0.193509, -0.189461, 0.304354, 0.520946, 0.644236, 0.711921, 0.736159, 0.718941, 0.653801, 0.518669, 0.233273, -0.876249, 0.316294, 0.59465, 0.74406, 0.830446, 0.874007, 0.882091, 0.855843, 0.791015, 0.674583, 0.469173, -0.0021969, -0.0207424, 0.436353, 0.622165, 0.717004, 0.75777, 0.75611, 0.71353, 0.622881, 0.460539, 0.138765, -0.716387, 0.224012, 0.468913, 0.590687, 0.649881, 0.66482, 0.641052, 0.576724, 0.460905, 0.260439, -0.171819, -0.346635, 0.162758, 0.355024, 0.451677, 0.494703, 0.498494, 0.468083, 0.403232, 0.298364, 0.138233, -0.121326, -0.721024, -0.557228, -0.212258, -0.0958615, -0.0750198, -0.128671, -0.274841, -0.631621, -0.937487, -0.317162, -0.0794272, 0.0568694, 0.139471, 0.18473, 0.198707, 0.181764, 0.128512, 0.0230107, -0.183565, -0.801458, -0.376375, 0.0234984, 0.234664, 0.373907, 0.471095, 0.537754, 0.578717, 0.595337, 0.58628, 0.546935, 0.466691, 0.31928, 0.0113921, -0.707158, 0.179533, 0.452693, 0.610234, 0.710933, 0.773935, 0.807126, 0.813504, 0.79296, 0.742265, 0.653273, 0.506488, 0.242411, -0.648644, 0.093968, 0.40444, 0.552018, 0.627997, 0.656638, 0.645444, 0.593478, 0.490566, 0.305159, -0.098925, -0.333211, 0.218413, 0.426997, 0.537013, 0.592433, 0.608089, 0.589057, 0.534877, 0.439309, 0.285115, 0.0196601, -0.722361, -0.247266, 0.0639501, 0.189637, 0.233962, 0.220431, 0.150333, 0.00456207, -0.299446, -1.23052, -0.207878, 0.0553762, 0.197082, 0.281878, 0.331756, 0.35733, 0.364889, 0.358676, 0.3417, 0.315897, 0.281914, 0.238586, 0.182054, 0.103965, -0.013453, -0.216996, -0.755293, -0.491783, -0.057918, 0.164166, 0.309662, 0.410559, 0.478714, 0.518884, 0.532135, 0.516532, 0.466143, 0.366936, 0.180724, -0.272507, -0.254139, 0.225811, 0.440793, 0.569127, 0.648833, 0.693916, 0.710323, 0.700063, 0.662294, 0.592913, 0.482107, 0.30567, -0.0188509, -1.11559, 0.00329169, 0.249397, 0.369273, 0.428389, 0.447444, 0.435089, 0.39512, 0.328783, 0.235622, 0.113774, -0.0399538, -0.229917, -0.46057, -0.73193, -1.02614, -1.29766, -1.58105, -2.17929, -1.14275, -0.733047, -0.457459, -0.256352, -0.108077, -0.00241288, 0.0653126, 0.0957698, 0.0851032, 0.0213583, -0.129886, -0.524041, -0.601615, -0.062724, 0.174304, 0.317297, 0.407254, 0.458673, 0.4771, 0.463274, 0.413532, 0.31717, 0.145423, -0.213183, -0.665226, 0.00789771, 0.237854, 0.36053, 0.426855, 0.453984, 0.44886, 0.413721, 0.347561, 0.245767, 0.0974678, -0.124221, -0.514749, -1.28198, -0.514264, -0.340214, -0.281721, -0.271617, -0.27273, -0.251174, -0.184114, -0.0745629, 0.055645, 0.185367, 0.302183, 0.400526, 0.478323, 0.534827, 0.569461, 0.581147, 0.567687, 0.52481, 0.444032, 0.306489, 0.0571572, -0.701122, -0.144338, 0.18325, 0.332295, 0.403529, 0.421599, 0.39198, 0.308257, 0.144158, -0.208006, -0.696114, -0.0106505, 0.20858, 0.31209, 0.34889, 0.330971, 0.254182, 0.0925797, -0.265556, -0.70567, -0.0558905, 0.147808, 0.22813, 0.224311, 0.125222, -0.170194, -0.60125, 0.134029, 0.406145, 0.566229, 0.66648, 0.724197, 0.745685, 0.731367, 0.675915, 0.563602, 0.346644, -0.269371, 0.095496, 0.472745, 0.650689, 0.749208, 0.797473, 0.804877, 0.771916, 0.690655, 0.536043, 0.213344, -0.470261, 0.36244, 0.610684, 0.740583, 0.808736, 0.83225, 0.81567, 0.75552, 0.636947, 0.41239, -0.216121, 0.149371, 0.516014, 0.683649, 0.770813, 0.805802, 0.796526, 0.74031, 0.620855, 0.381266, -0.467247, 0.263793, 0.594566, 0.760477, 0.854924, 0.903323, 0.914635, 0.890465, 0.826259, 0.707308, 0.488916, -0.0851154, 0.17736, 0.56981, 0.750976, 0.852997, 0.907758, 0.926934, 0.914596, 0.870178, 0.788111, 0.65347, 0.423101, -0.135518, 0.0405494, 0.432077, 0.599625, 0.684947, 0.720741, 0.718252, 0.680309, 0.60372, 0.47672, 0.265369, -0.180091, -0.351323, 0.142552, 0.323274, 0.407949, 0.437714, 0.426239, 0.377611, 0.29012, 0.155454, -0.0482004, -0.390422, -1.78393, -0.611759, -0.438918, -0.45493, -0.634478, -1.31243, -0.824217, -0.50426, -0.402442, -0.43819, -0.694048, -1.05188, -0.313194, -0.0224335, 0.153693, 0.266747, 0.33372, 0.360067, 0.34405, 0.274659, 0.117591, -0.285955, -0.346182, 0.183614, 0.419397, 0.56374, 0.657493, 0.715627, 0.744652, 0.74708, 0.722716, 0.668564, 0.577231, 0.431524, 0.182024, -0.476971, -0.116235, 0.228019, 0.375932, 0.444316, 0.461389, 0.43566, 0.366333, 0.242912, 0.0328924, -0.404516, -0.64435, -0.143527, 0.0152901, 0.0634668, 0.0366399, -0.0666948, -0.286673, -0.88454, -0.637653, -0.303455, -0.212359, -0.267456, -0.579001, -0.689286, -0.0826343, 0.188545, 0.357988, 0.470483, 0.542354, 0.580557, 0.587383, 0.56155, 0.49728, 0.379902, 0.167913, -0.351943, -0.228322, 0.187812, 0.365287, 0.455792, 0.492655, 0.486277, 0.437294, 0.337399, 0.16022, -0.195947, -0.791191, -0.0643068, 0.143553, 0.230108, 0.245475, 0.199238, 0.0796845, -0.168638, -1.04407, -0.321922, -0.0272453, 0.0888513, 0.110773, 0.0444419, -0.162981, -1.17378, -0.162343, 0.17467, 0.354364, 0.461704, 0.520823, 0.540271, 0.521266, 0.458466, 0.334965, 0.0970563, -0.651278, -0.0860149, 0.250228, 0.408473, 0.490485, 0.522492, 0.512858, 0.461511, 0.360088, 0.183233, -0.163003, -0.907716, -0.0893725, 0.11598, 0.189299, 0.179233, 0.0821992, -0.168642, -1.84947, -0.105147, 0.188131, 0.3416, 0.426271, 0.46298, 0.4583, 0.410947, 0.310438, 0.124361, -0.289884, -0.483049, 0.0458175, 0.245933, 0.347428, 0.392998, 0.397184, 0.365153, 0.297087, 0.188778, 0.0295273, -0.206221, -0.600071, -2.10599, -0.846237, -0.786653, -0.989527, -2.13672, -1.18307, -1.22023, -1.15529, -0.451493, -0.099336, 0.137847, 0.309393, 0.434638, 0.522748, 0.577958, 0.601193, 0.590078, 0.537205, 0.423884, 0.192373, -0.630195, 0.0800682, 0.417724, 0.586663, 0.680537, 0.723355, 0.721201, 0.669532, 0.547772, 0.279467, -1.05015, 0.358927, 0.652784, 0.814232, 0.912006, 0.967066, 0.987262, 0.974352, 0.925198, 0.829412, 0.65854, 0.302331, -0.162927, 0.518572, 0.749516, 0.872023, 0.936856, 0.960303, 0.947595, 0.897592, 0.801888, 0.63628, 0.31328, -0.561586, 0.392718, 0.638994, 0.762813, 0.825516, 0.846289, 0.832211, 0.784555, 0.699797, 0.567235, 0.358349, -0.0349277, -0.580206, 0.0720919, 0.248726, 0.306021, 0.290457, 0.207788, 0.0360817, -0.334238, -0.789398, -0.152165, 0.0393214, 0.11037, 0.104239, 0.0214676, -0.179517, -0.808424, -0.392835, -0.0204939, 0.15592, 0.252867, 0.300057, 0.30829, 0.280586, 0.214209, 0.0980789, -0.100644, -0.52795, -0.699175, -0.176491, 0.0336538, 0.155748, 0.234153, 0.286096, 0.320188, 0.341119, 0.351194, 0.350878, 0.338936, 0.312272, 0.265246, 0.187622, 0.0579667, -0.185783, -1.08998, -0.264354, 0.0747302, 0.256409, 0.370152, 0.440822, 0.477862, 0.484539, 0.460315, 0.40073, 0.294705, 0.114185, -0.243449, -0.845351, -0.117559, 0.0859971, 0.163278, 0.159315, 0.070108, -0.168662, -2.21175, -0.11727, 0.186733, 0.345727, 0.432864, 0.468195, 0.45583, 0.388505, 0.238027, -0.116154, -0.445892, 0.184306, 0.418829, 0.546728, 0.614844, 0.63765, 0.618074, 0.550393, 0.414144, 0.137175, -2.77473, 0.138199, 0.417431, 0.554879, 0.622429, 0.639757, 0.611075, 0.530122, 0.372939, 0.0476727, -0.70542, 0.153236, 0.382667, 0.483514, 0.50928, 0.46777, 0.338378, 0.0140868, -0.413707, 0.284347, 0.533324, 0.670927, 0.747837, 0.780182, 0.772656, 0.722772, 0.618599, 0.424032, -0.0305253, -0.0785151, 0.390965, 0.57661, 0.66566, 0.69398, 0.669637, 0.585407, 0.407782, -0.0300891, -0.0697755, 0.416343, 0.618261, 0.726057, 0.777935, 0.7861, 0.75255, 0.670965, 0.520059, 0.224534, -1.35863, 0.223493, 0.483973, 0.606109, 0.658767, 0.660781, 0.615665, 0.515923, 0.333924, -0.0441783, -0.483089, 0.144939, 0.339188, 0.417799, 0.42666, 0.375064, 0.253536, 0.0190282, -0.583722, -0.375675, -0.0576053, 0.00372204, -0.114593, -0.811746, -0.10824, 0.285724, 0.499649, 0.633892, 0.715915, 0.755543, 0.754475, 0.707163, 0.59499, 0.355136, -0.680969, 0.314359, 0.6376, 0.806827, 0.906309, 0.959763, 0.975518, 0.954755, 0.892389, 0.772521, 0.545967, -0.104118, 0.30695, 0.67055, 0.842069, 0.936478, 0.982727, 0.990982, 0.963629, 0.897198, 0.779553, 0.575646, 0.127004, 0.0142105, 0.49831, 0.68487, 0.776967, 0.814186, 0.809406, 0.765645, 0.678929, 0.534932, 0.290231, -0.292992, -0.124579, 0.233811, 0.362449, 0.396916, 0.362044, 0.251572, 0.0139488, -0.813594, -0.131383, 0.187417, 0.334944, 0.406388, 0.427088, 0.405208, 0.340512, 0.224119, 0.0284832, -0.355561, -0.860371, -0.210125, -0.0168891, 0.0659178, 0.0911913, 0.079097, 0.0423475, -0.00621841, -0.0504435, -0.0726019, -0.0618112, -0.0220131, 0.0311973, 0.0803593, 0.111324, 0.112163, 0.0682248, -0.0501494, -0.348176, -0.843224, -0.071089, 0.207357, 0.373279, 0.48033, 0.546373, 0.578541, 0.578914, 0.545788, 0.472674, 0.343426, 0.111745, -0.486014, -0.226604, 0.135416, 0.279328, 0.330043, 0.309369, 0.205778, -0.0560982, -1.14912, 0.0586008, 0.34766, 0.504938, 0.596521, 0.642454, 0.649516, 0.617509, 0.538985, 0.391777, 0.0984386, -1.26099, 0.125197, 0.390283, 0.519722, 0.580626, 0.591202, 0.554136, 0.459857, 0.273157, -0.179094, -0.196948, 0.275788, 0.472634, 0.577079, 0.626595, 0.633196, 0.598842, 0.517272, 0.367439, 0.0752084, -1.72157, 0.0702194, 0.33655, 0.464314, 0.52361, 0.533763, 0.498782, 0.411944, 0.247432, -0.0992905, -0.621643, 0.0932022, 0.325801, 0.44739, 0.510922, 0.533835, 0.522739, 0.478886, 0.399033, 0.273257, 0.0754171, -0.288977, -1.04081, -0.23728, -0.0362034, 0.0422777, 0.0538477, 0.0134088, -0.0785541, -0.234047, -0.491693, -1.02881, -1.1724, -0.871808, -1.02714, -1.26079, -0.522194, -0.207404, -0.00746693, 0.130739, 0.226697, 0.28916, 0.321777, 0.324634, 0.293898, 0.218914, 0.0711704, -0.259579, -0.696058, 0.0159206, 0.280784, 0.44078, 0.547342, 0.617847, 0.65939, 0.674317, 0.661624, 0.616406, 0.526574, 0.360262, -0.0126215, -0.273841, 0.328466, 0.570554, 0.71523, 0.808374, 0.865976, 0.894645, 0.896571, 0.870816, 0.812849, 0.711694, 0.53942, 0.192369, -0.365234, 0.372379, 0.610351, 0.737462, 0.807181, 0.836695, 0.832081, 0.793645, 0.716252, 0.585263, 0.358044, -0.192538, -0.0341938, 0.359163, 0.523413, 0.602507, 0.62877, 0.612346, 0.553904, 0.445592, 0.262979, -0.0830638, -0.952553, -0.0571654, 0.143241, 0.206157, 0.181086, 0.0594502, -0.256595, -0.747108, -0.0193042, 0.225784, 0.355747, 0.423402, 0.445873, 0.429093, 0.373087, 0.27243, 0.112975, -0.141688, -0.634418, -1.00821, -0.661887, -0.976468, -0.643921, -0.133167, 0.130184, 0.296063, 0.401513, 0.460303, 0.476671, 0.44786, 0.360942, 0.175184, -0.326286, -0.165603, 0.26674, 0.461666, 0.56821, 0.618979, 0.623256, 0.579122, 0.471216, 0.245884, -0.511405, 0.100806, 0.445435, 0.614495, 0.707586, 0.750486, 0.75113, 0.708526, 0.611796, 0.426518, -0.00598214, -0.10026, 0.396416, 0.594684, 0.696273, 0.73969, 0.735812, 0.683345, 0.567298, 0.334629, -0.419015, 0.167304, 0.506253, 0.66854, 0.754992, 0.791726, 0.787016, 0.740497, 0.642812, 0.464782, 0.0866165, -0.282443, 0.330539, 0.54172, 0.645542, 0.688659, 0.684681, 0.634733, 0.528753, 0.332182, -0.11875, -0.196598, 0.278029, 0.461946, 0.549375, 0.577677, 0.556684, 0.483014, 0.335622, 0.0321508, -0.958872, 0.105286, 0.362581, 0.49244, 0.558514, 0.580125, 0.563603, 0.508201, 0.405295, 0.228913, -0.120525, -0.732287, 0.0259446, 0.258205, 0.379438, 0.445555, 0.475586, 0.477846, 0.455917, 0.410227, 0.337746, 0.229438, 0.0610231, -0.254918, -1.1105, -0.130358, 0.153318, 0.324563, 0.44467, 0.533121, 0.597933, 0.642534, 0.667975, 0.673687, 0.657504, 0.615021, 0.537624, 0.406465, 0.167131, -0.564533, -0.0173123, 0.330934, 0.502904, 0.602421, 0.656922, 0.67668, 0.66523, 0.621951, 0.541817, 0.411967, 0.19777, -0.250507, -0.430273, 0.0585048, 0.23087, 0.304686, 0.321107, 0.294403, 0.231098, 0.137021, 0.0252626, -0.0705264, -0.093145, -0.0127356, 0.13094, 0.284366, 0.420375, 0.530406, 0.612875, 0.667821, 0.694823, 0.691883, 0.654019, 0.569945, 0.411025, 0.0692287, -0.419101, 0.288965, 0.527591, 0.654154, 0.719512, 0.738733, 0.714363, 0.639166, 0.487618, 0.159299, -0.416216, 0.348887, 0.593982, 0.724042, 0.793041, 0.817608, 0.802307, 0.74405, 0.629204, 0.41513, -0.133253, 0.063887, 0.46272, 0.636802, 0.726159, 0.76264, 0.756147, 0.706823, 0.605206, 0.420764, 0.0228498, -0.254406, 0.310788, 0.516043, 0.61976, 0.666958, 0.672588, 0.641545, 0.572911, 0.45943, 0.281119, -0.0264408, -1.15705, -0.201583, 0.0449726, 0.133355, 0.145648, 0.104008, 0.0158842, -0.115538, -0.282387, -0.451109, -0.535401, -0.469881, -0.322573, -0.180071, -0.0768107, -0.0232908, -0.0287066, -0.116935, -0.380733, -1.02421, -0.138692, 0.150051, 0.315384, 0.41439, 0.464065, 0.468111, 0.420519, 0.298341, 0.0141606, -0.801125, 0.170121, 0.447221, 0.59982, 0.688462, 0.73149, 0.734417, 0.695244, 0.602619, 0.421922, -0.00528921, -0.0964519, 0.406224, 0.610279, 0.718166, 0.768842, 0.773998, 0.73413, 0.639097, 0.455025, 0.02489, -0.0771459, 0.42206, 0.620401, 0.72194, 0.765819, 0.763824, 0.716624, 0.614621, 0.426197, 0.0134568, -0.221205, 0.309559, 0.494048, 0.570147, 0.575824, 0.513745, 0.356905, -0.0373931, -0.19142, 0.346328, 0.558664, 0.669312, 0.719076, 0.719432, 0.669071, 0.552161, 0.311219, -0.566953, 0.197206, 0.517531, 0.671988, 0.751612, 0.780386, 0.765093, 0.703048, 0.579295, 0.344039, -0.339005, 0.10318, 0.446159, 0.598849, 0.671925, 0.693109, 0.671492, 0.608112, 0.497659, 0.325609, 0.0554884, -0.44271, -1.07109, -0.90837, -0.578525, 0.0145379, 0.31922, 0.514628, 0.644684, 0.726508, 0.766953, 0.766617, 0.719361, 0.605849, 0.36063, -0.813994, 0.341556, 0.655618, 0.819173, 0.912625, 0.958487, 0.963905, 0.928048, 0.841317, 0.674239, 0.305443, -0.0364448, 0.58183, 0.805899, 0.924429, 0.984245, 0.999949, 0.974848, 0.904199, 0.77052, 0.5159, -0.356473, 0.369114, 0.679691, 0.823039, 0.890792, 0.906281, 0.8748, 0.790231, 0.627464, 0.285694, -0.294684, 0.448995, 0.676091, 0.785999, 0.831482, 0.827366, 0.774693, 0.662053, 0.449272, -0.0806524, 0.0514055, 0.452299, 0.613358, 0.682096, 0.688555, 0.636695, 0.510985, 0.245132, -1.1899, 0.212096, 0.493879, 0.625334, 0.681433, 0.680386, 0.621275, 0.482477, 0.171435, -0.511583, 0.330607, 0.581271, 0.710956, 0.776363, 0.79426, 0.768247, 0.692463, 0.544922, 0.244429, -0.830736, 0.302918, 0.561146, 0.688603, 0.749422, 0.761793, 0.729514, 0.64618, 0.487516, 0.158901, -0.523161, 0.297143, 0.537567, 0.659715, 0.720334, 0.737003, 0.715151, 0.653136, 0.540793, 0.347783, -0.0520088, -0.3765, 0.19896, 0.398754, 0.495544, 0.53514, 0.532103, 0.489984, 0.404492, 0.258904, -0.00294155, -0.849722, -0.167058, 0.154115, 0.3144, 0.410351, 0.469785, 0.504663, 0.520956, 0.521512, 0.506964, 0.475818, 0.423829, 0.342033, 0.210531, -0.0285221, -0.820072, -0.152655, 0.200566, 0.38819, 0.50685, 0.582408, 0.624307, 0.635322, 0.613741, 0.552369, 0.43254, 0.196322, -0.635531, 0.08575, 0.426111, 0.60212, 0.708187, 0.770438, 0.799032, 0.79787, 0.767187, 0.703808, 0.59941, 0.434052, 0.147079, -0.790401, -0.0513323, 0.218227, 0.315415, 0.323792, 0.253023, 0.069423, -0.461417, -0.237269, 0.169241, 0.347461, 0.434894, 0.460821, 0.429573, 0.326882, 0.0916143, -0.972469, 0.0616995, 0.383155, 0.550798, 0.64819, 0.699032, 0.711689, 0.687341, 0.620776, 0.495578, 0.260075, -0.445376, 0.0528198, 0.401461, 0.568708, 0.662249, 0.710587, 0.724774, 0.709243, 0.664701, 0.588516, 0.473138, 0.300014, 0.0124802, -0.838649, -0.218051, 0.076287, 0.206327, 0.270983, 0.299715, 0.306817, 0.301437, 0.290188, 0.277453, 0.264867, 0.250811, 0.230324, 0.195033, 0.131714, 0.0156098, -0.222566, -1.37374, -0.211679, 0.124525, 0.313012, 0.434348, 0.5116, 0.553276, 0.561505, 0.533582, 0.460002, 0.315001, 0.00426828, -0.685468, 0.172171, 0.434966, 0.580351, 0.666033, 0.710405, 0.720249, 0.696609, 0.635538, 0.525144, 0.332406, -0.0835065, -0.295905, 0.237309, 0.436987, 0.537839, 0.582323, 0.583924, 0.545579, 0.462528, 0.317739, 0.0556713, -0.762004, -0.142056, 0.166764, 0.303955, 0.367193, 0.382906, 0.361131, 0.305693, 0.217345, 0.0954263, -0.0595577, -0.238314, -0.402804, -0.47251, -0.406882, -0.274295, -0.146215, -0.0507774, 0.00418962, 0.0145191, -0.0282509, -0.147356, -0.427137, -1.35669, -0.307838, -0.0400623, 0.09428, 0.15534, 0.156821, 0.0926599, -0.0738542, -0.549806, -0.403479, 0.0483007, 0.256992, 0.377297, 0.443674, 0.467685, 0.451742, 0.391153, 0.269743, 0.0363084, -0.658283, -0.187902, 0.152949, 0.303681, 0.370771, 0.37762, 0.324366, 0.187962, -0.137017, -0.6021, 0.114967, 0.367151, 0.509226, 0.593703, 0.638447, 0.650958, 0.63409, 0.587709, 0.508753, 0.389811, 0.214237, -0.0632844, -0.682394, -0.555558, -0.247147, -0.182476, -0.236313, -0.409707, -0.815335, -1.27657, -0.805081, -0.996861, -0.824947, -0.221408, 0.0889518, 0.295627, 0.441803, 0.544536, 0.611677, 0.646379, 0.648286, 0.612908, 0.528154, 0.360836, -0.0313897, -0.205977, 0.350145, 0.578094, 0.709634, 0.787837, 0.827603, 0.834482, 0.809023, 0.747136, 0.637129, 0.447143, 0.0455306, -0.232479, 0.331085, 0.535709, 0.638805, 0.684619, 0.686911, 0.648404, 0.563567, 0.413083, 0.131229, -1.08229, 0.0387084, 0.314062, 0.43631, 0.4838, 0.475389, 0.410601, 0.268896, -0.0362023, -0.864382, 0.0799114, 0.335895, 0.467662, 0.535397, 0.556942, 0.5368, 0.470661, 0.340743, 0.0860366, -0.898493, -0.0048225, 0.306995, 0.46207, 0.546796, 0.584746, 0.583275, 0.541316, 0.448224, 0.270423, -0.144953, -0.257261, 0.267362, 0.488676, 0.61809, 0.69691, 0.739676, 0.751926, 0.734382, 0.683399, 0.588396, 0.421192, 0.0744683, -0.422668, 0.289488, 0.532408, 0.667021, 0.745204, 0.783583, 0.787682, 0.756867, 0.683907, 0.548203, 0.281017, -1.13604, 0.265192, 0.566763, 0.725892, 0.819862, 0.871277, 0.888559, 0.873852, 0.824586, 0.731715, 0.571178, 0.258904, -0.742461, 0.321399, 0.576364, 0.704556, 0.769012, 0.7882, 0.767127, 0.70258, 0.580061, 0.353202, -0.259929, 0.0623044, 0.431519, 0.59716, 0.682557, 0.717656, 0.712588, 0.669229, 0.582992, 0.439175, 0.194344, -0.384292, -0.238779, 0.113928, 0.226728, 0.231748, 0.138044, -0.125247, -1.10478, -0.00133133, 0.27507, 0.418934, 0.494224, 0.519709, 0.500164, 0.431241, 0.29483, 0.0289027, -0.996413, -0.0895057, 0.19385, 0.312526, 0.347676, 0.314251, 0.19915, -0.0701393, -1.48579, -0.0233117, 0.246698, 0.37322, 0.421383, 0.403399, 0.30558, 0.0554522, -1.33212, 0.149397, 0.448877, 0.611791, 0.707265, 0.755701, 0.763521, 0.72937, 0.642703, 0.470893, 0.0694687, -0.0946784, 0.446774, 0.66503, 0.786436, 0.853414, 0.880413, 0.872359, 0.828684, 0.742958, 0.597398, 0.336885, -0.45379, 0.124828, 0.436578, 0.572247, 0.630892, 0.637638, 0.599589, 0.514581, 0.369768, 0.126166, -0.402578, -0.451295, -0.0888497, -0.0298355, -0.152808, -0.779179, -0.226713, 0.164187, 0.361609, 0.474274, 0.529782, 0.535862, 0.488939, 0.369187, 0.101564, -1.34747, 0.161703, 0.447643, 0.59644, 0.676907, 0.708635, 0.696594, 0.636427, 0.509625, 0.251403, -0.916742, 0.202018, 0.503291, 0.653507, 0.733476, 0.765787, 0.757664, 0.708495, 0.609366, 0.433411, 0.0771539, -0.488839, 0.226681, 0.439513, 0.534175, 0.561254, 0.532621, 0.442847, 0.260929, -0.162881, -0.305551, 0.198734, 0.387887, 0.475159, 0.4992, 0.469014, 0.378229, 0.195845, -0.22376, -0.397584, 0.111839, 0.293844, 0.367873, 0.369318, 0.297581, 0.114409, -0.432782, -0.151343, 0.255202, 0.445117, 0.550737, 0.603623, 0.61452, 0.585517, 0.511773, 0.377085, 0.130559, -0.569991, -0.129198, 0.197785, 0.332237, 0.381668, 0.369461, 0.295566, 0.136712, -0.212334, -0.713378, -0.0234439, 0.192492, 0.291574, 0.324201, 0.304606, 0.234052, 0.103605, -0.113254, -0.502483, -2.21676, -0.934442, -1.53187, -0.356811, 0.0348123, 0.276724, 0.44125, 0.553394, 0.623906, 0.656793, 0.651081, 0.599466, 0.481003, 0.224408, -1.68864, 0.256263, 0.560094, 0.722983, 0.818969, 0.869662, 0.882485, 0.857869, 0.789576, 0.658872, 0.404795, -0.551835, 0.303624, 0.615341, 0.767603, 0.847678, 0.878924, 0.868121, 0.813074, 0.70046, 0.487324, -0.0675293, 0.149572, 0.545012, 0.718342, 0.806486, 0.840266, 0.828168, 0.767373, 0.640432, 0.384634, -0.692057, 0.319172, 0.626146, 0.780244, 0.864907, 0.903591, 0.904341, 0.867832, 0.787835, 0.645162, 0.375998, -0.72189, 0.293037, 0.592695, 0.742114, 0.824943, 0.865498, 0.873445, 0.852524, 0.80288, 0.721119, 0.598157, 0.411116, 0.0830834, -1.40143, 0.0424569, 0.286183, 0.399894, 0.453905, 0.470673, 0.460287, 0.428126, 0.37729, 0.309435, 0.224817, 0.12159, -0.00628979, -0.175101, -0.435426, -1.12587, -0.667824, -0.295758, -0.0979757, 0.0352146, 0.131729, 0.202329, 0.251995, 0.283289, 0.297627, 0.295838, 0.27847, 0.245989, 0.198966, 0.138309, 0.0655237, -0.0170243, -0.10611, -0.198398, -0.292652, -0.393976, -0.521484 - }; + 1.12499, 1.06523, 0.951479, 0.744409, 0.245507, 0.319233, 0.751385, 0.934464, 1.03007, 1.07334, 1.07607, 1.04101, 0.964413, 0.832851, 0.606495, 0.0851642, 0.140231, 0.544606, 0.696209, 0.753447, 0.747157, 0.680502, 0.534742, 0.22669, -0.696856, 0.301278, 0.544691, 0.657752, 0.701063, 0.690437, 0.625488, 0.489136, 0.215602, -1.09289, 0.149758, 0.424757, 0.546734, 0.59208, 0.578865, 0.50533, 0.347162, -0.00390638, -0.467953, 0.205608, 0.423544, 0.52603, 0.561732, 0.542794, 0.465389, 0.304193, -0.0502566, -0.507843, 0.158935, 0.374294, 0.474132, 0.506478, 0.482651, 0.396942, 0.217705, -0.209915, -0.320224, 0.17598, 0.366133, 0.45521, 0.480933, 0.451735, 0.360112, 0.170939, -0.297079, -0.283659, 0.166508, 0.34673, 0.430604, 0.452346, 0.419098, 0.322008, 0.122064, -0.398725, -0.250378, 0.158639, 0.328658, 0.406681, 0.423386, 0.384245, 0.277949, 0.0569093, -0.606945, -0.172557, 0.177834, 0.333283, 0.404805, 0.418128, 0.377544, 0.272024, 0.0573736, -0.540476, -0.234383, 0.135073, 0.292758, 0.362332, 0.370564, 0.320256, 0.194664, -0.0771846, -2.25189, -0.0651418, 0.210999, 0.344276, 0.405605, 0.413982, 0.372274, 0.270816, 0.0740189, -0.392903, -0.422124, 0.0268193, 0.194259, 0.258821, 0.250763, 0.16553, -0.0474389, -0.844847, -0.14809, 0.195462, 0.367816, 0.465185, 0.513832, 0.523408, 0.496548, 0.430897, 0.317697, 0.134311, -0.192773, -2.20536, -0.332084, -0.143951, -0.14008, -0.30925, -1.26405, -0.284406, 0.0596895, 0.239618, 0.341669, 0.389291, 0.388605, 0.3348, 0.205718, -0.0848421, -0.931354, 0.0498912, 0.320158, 0.465734, 0.547972, 0.585808, 0.585615, 0.547023, 0.462495, 0.309664, 0.00958832, -1.21411, 0.0480325, 0.314128, 0.451463, 0.528311, 0.566962, 0.577919, 0.567613, 0.541214, 0.504084, 0.462598, 0.424169, 0.395968, 0.38234, 0.382469, 0.390297, 0.396565, 0.390788, 0.361208, 0.291354, 0.147239, -0.197743, -0.483392, 0.15581, 0.414201, 0.570726, 0.67233, 0.735044, 0.765106, 0.763838, 0.728441, 0.650095, 0.505842, 0.217543, -1.10335, 0.26573, 0.544, 0.690786, 0.774266, 0.815025, 0.820489, 0.791783, 0.724561, 0.605503, 0.396046, -0.0922129, -0.0613341, 0.381335, 0.566693, 0.664735, 0.711991, 0.721229, 0.69658, 0.636788, 0.534243, 0.367812, 0.0663892, -1.78899, 0.0128274, 0.280496, 0.41044, 0.477913, 0.505954, 0.504198, 0.476811, 0.424654, 0.345323, 0.231144, 0.0618211, -0.230124, -1.58165, -0.28155, 0.0209184, 0.188279, 0.29866, 0.374687, 0.424911, 0.452221, 0.456252, 0.433732, 0.377195, 0.270099, 0.0669753, -0.481421, -0.225944, 0.186593, 0.383054, 0.497781, 0.561958, 0.585685, 0.570109, 0.508572, 0.379876, 0.110116, -1.75203, 0.149169, 0.441151, 0.595859, 0.684455, 0.727721, 0.732457, 0.698232, 0.617091, 0.465502, 0.159322, -0.822777, 0.231009, 0.48489, 0.608973, 0.664767, 0.668201, 0.618894, 0.499629, 0.243504, -1.17055, 0.238244, 0.539886, 0.696092, 0.784024, 0.825911, 0.829348, 0.794761, 0.715756, 0.573125, 0.303908, -0.741675, 0.196933, 0.488685, 0.622895, 0.682915, 0.689908, 0.647178, 0.54459, 0.343675, -0.16032, -0.0587856, 0.365064, 0.542445, 0.629186, 0.658133, 0.637518, 0.562535, 0.409003, 0.0783132, -0.523084, 0.247028, 0.483396, 0.601539, 0.654944, 0.658358, 0.612098, 0.502256, 0.277601, -0.440324, 0.105536, 0.457712, 0.631115, 0.730679, 0.784449, 0.80323, 0.791138, 0.748331, 0.671114, 0.549578, 0.358462, 0.00902381, -0.876717, 0.0377841, 0.253606, 0.344649, 0.371055, 0.350837, 0.28966, 0.187193, 0.0388642, -0.16237, -0.414083, -0.638469, -0.615091, -0.376726, -0.133435, 0.0580962, 0.199763, 0.299555, 0.363123, 0.393054, 0.388687, 0.34484, 0.247245, 0.0540272, -0.45822, -0.274432, 0.159215, 0.365087, 0.490095, 0.568655, 0.61385, 0.631253, 0.622561, 0.586396, 0.517444, 0.402671, 0.206786, -0.227063, -0.332559, 0.177042, 0.391516, 0.517303, 0.595373, 0.640487, 0.658805, 0.652303, 0.619896, 0.556894, 0.452044, 0.276635, -0.077608, -0.571129, 0.13203, 0.371915, 0.505198, 0.583759, 0.624663, 0.634357, 0.614081, 0.560763, 0.464998, 0.302256, -0.0135089, -0.941599, 0.0664791, 0.323677, 0.458329, 0.5331, 0.567765, 0.570111, 0.54261, 0.484085, 0.389154, 0.244632, 0.0153476, -0.451481, -0.628876, -0.16178, -0.00634277, 0.0496369, 0.0455289, -0.00718808, -0.107936, -0.265103, -0.503007, -0.902469, -2.39103, -1.15516, -1.07161, -1.12589, -1.11905, -0.892374, -0.57203, -0.282058, -0.0444311, 0.146395, 0.298227, 0.416998, 0.506614, 0.569261, 0.605565, 0.61444, 0.592383, 0.531513, 0.413576, 0.184773, -0.534357, 0.00887284, 0.359673, 0.530077, 0.623651, 0.66635, 0.665495, 0.618566, 0.510582, 0.291266, -0.384874, 0.0958208, 0.456523, 0.630193, 0.725843, 0.770747, 0.773279, 0.732616, 0.637949, 0.454851, 0.024232, -0.0648114, 0.434124, 0.635798, 0.741394, 0.789533, 0.791402, 0.746399, 0.641394, 0.430938, -0.164707, 0.168493, 0.553597, 0.734981, 0.836875, 0.889844, 0.904832, 0.885011, 0.828235, 0.725471, 0.551974, 0.219222, -0.646621, 0.281013, 0.512094, 0.617821, 0.657729, 0.64857, 0.593089, 0.483476, 0.292354, -0.0900524, -0.594448, 0.0469218, 0.22288, 0.271685, 0.230744, 0.0799381, -0.349434, -0.337985, 0.145345, 0.351516, 0.462197, 0.514758, 0.520819, 0.481141, 0.3861, 0.203141, -0.2158, -0.368886, 0.14835, 0.3496, 0.454008, 0.503587, 0.513129, 0.488539, 0.431469, 0.340685, 0.212245, 0.0390005, -0.189854, -0.48412, -0.807764, -0.935407, -0.767941, -0.582025, -0.492259, -0.546253, -1.0255, -0.551709, -0.0734124, 0.195406, 0.378731, 0.5091, 0.599632, 0.656101, 0.680179, 0.66998, 0.618621, 0.508458, 0.285772, -0.436824, 0.128238, 0.483447, 0.660224, 0.761623, 0.814341, 0.827273, 0.801205, 0.729504, 0.591511, 0.316371, -1.48778, 0.30676, 0.592619, 0.736756, 0.813411, 0.843958, 0.835385, 0.787374, 0.692182, 0.527072, 0.212743, -1.04855, 0.208285, 0.445281, 0.543021, 0.564186, 0.520053, 0.39619, 0.118762, -1.21145, 0.165375, 0.433933, 0.563869, 0.621903, 0.625378, 0.574862, 0.454892, 0.206393, -0.739415, 0.0977441, 0.400532, 0.536742, 0.591492, 0.582706, 0.504051, 0.312212, -0.287172, 0.0993196, 0.487986, 0.675585, 0.781768, 0.835845, 0.847227, 0.816176, 0.733886, 0.572133, 0.216023, -0.184445, 0.46859, 0.698637, 0.820567, 0.88304, 0.901104, 0.878168, 0.809318, 0.676226, 0.41655, -0.619607, 0.331172, 0.636015, 0.786171, 0.866479, 0.900681, 0.897053, 0.85672, 0.774596, 0.635021, 0.390351, -0.250324, 0.0748664, 0.421056, 0.564121, 0.623707, 0.627033, 0.579421, 0.471897, 0.267669, -0.225855, -0.17394, 0.258182, 0.435361, 0.522883, 0.556191, 0.546761, 0.496332, 0.398409, 0.231215, -0.0838782, -1.31594, -0.0745548, 0.177138, 0.301316, 0.366913, 0.397186, 0.403873, 0.394789, 0.376252, 0.353748, 0.331594, 0.31204, 0.294381, 0.27461, 0.245525, 0.196278, 0.109109, -0.0550426, -0.456655, -0.523279, 0.0164722, 0.260654, 0.413776, 0.516424, 0.58325, 0.620465, 0.630254, 0.611952, 0.561693, 0.470101, 0.314136, 0.0171048, -1.49362, 0.0301446, 0.30095, 0.438984, 0.514196, 0.548053, 0.54916, 0.520754, 0.462804, 0.372193, 0.241261, 0.0526269, -0.241997, -0.91907, -0.699688, -0.422103, -0.371757, -0.438566, -0.632818, -1.1399, -1.11889, -0.74951, -0.678145, -0.791637, -1.42042, -0.84488, -0.452285, -0.253255, -0.140265, -0.0858819, -0.0825413, -0.134292, -0.262684, -0.552653, -1.42878, -0.428134, -0.158935, -0.0139378, 0.0704976, 0.116354, 0.135111, 0.135352, 0.125861, 0.116961, 0.119796, 0.142954, 0.188259, 0.24992, 0.318092, 0.383097, 0.437356, 0.475215, 0.491853, 0.481783, 0.436516, 0.339087, 0.143701, -0.402398, -0.130714, 0.284538, 0.48468, 0.602841, 0.670208, 0.697039, 0.684732, 0.627075, 0.504001, 0.246805, -1.19978, 0.249555, 0.555536, 0.71783, 0.813201, 0.863883, 0.877689, 0.855578, 0.792403, 0.672442, 0.44768, -0.179669, 0.186134, 0.555081, 0.725785, 0.817223, 0.85836, 0.858431, 0.8177, 0.727721, 0.561844, 0.215753, -0.318017, 0.403732, 0.636804, 0.757915, 0.819887, 0.839597, 0.822679, 0.768591, 0.670338, 0.50826, 0.219018, -0.845377, 0.0672065, 0.333511, 0.438241, 0.462525, 0.422968, 0.311936, 0.083042, -0.594834, -0.165408, 0.16815, 0.302499, 0.344499, 0.311878, 0.186859, -0.139684, -0.525244, 0.151617, 0.399083, 0.536576, 0.613848, 0.647006, 0.640995, 0.593894, 0.495129, 0.313153, -0.0863776, -0.335636, 0.220504, 0.425476, 0.528128, 0.571655, 0.568866, 0.520733, 0.417522, 0.226359, -0.201871, -0.359778, 0.145304, 0.333183, 0.41988, 0.443988, 0.413885, 0.321295, 0.127629, -0.384673, -0.225106, 0.198619, 0.387915, 0.491528, 0.543148, 0.554108, 0.526651, 0.455692, 0.323649, 0.0721191, -0.817323, -0.0463258, 0.278078, 0.44353, 0.542429, 0.601387, 0.631665, 0.638817, 0.625574, 0.592806, 0.539645, 0.46287, 0.354941, 0.197968, -0.0617099, -0.809507, -0.265541, 0.0825748, 0.26222, 0.377092, 0.454707, 0.505565, 0.533776, 0.540046, 0.522372, 0.475326, 0.386961, 0.227525, -0.115883, -0.538885, 0.152118, 0.407594, 0.55909, 0.657339, 0.719635, 0.753271, 0.761107, 0.743201, 0.6969, 0.615519, 0.483776, 0.259857, -0.267967, -0.160227, 0.249578, 0.420055, 0.503619, 0.533066, 0.517628, 0.455413, 0.331484, 0.0946277, -0.618539, -0.117787, 0.221935, 0.377492, 0.45455, 0.479107, 0.457836, 0.386445, 0.244695, -0.0419115, -1.66148, -0.02928, 0.239127, 0.368178, 0.426252, 0.430624, 0.381013, 0.25903, -0.00943195, -1.4859, 0.0514641, 0.342346, 0.498737, 0.590515, 0.638757, 0.651114, 0.6288, 0.567428, 0.453382, 0.246863, -0.252406, -0.170343, 0.263192, 0.449342, 0.548299, 0.594586, 0.599061, 0.562635, 0.477122, 0.315745, -0.0279348, -0.523565, 0.187743, 0.428951, 0.561183, 0.636798, 0.673064, 0.676476, 0.648096, 0.584221, 0.473594, 0.285187, -0.108411, -0.413376, 0.171635, 0.388283, 0.506668, 0.573703, 0.606201, 0.611846, 0.594476, 0.555914, 0.496671, 0.416159, 0.312519, 0.18185, 0.0159024, -0.20572, -0.553826, -2.62751, -0.616359, -0.333223, -0.15791, -0.0195451, 0.100203, 0.205912, 0.297689, 0.374347, 0.434423, 0.476307, 0.497995, 0.496547, 0.467068, 0.400386, 0.276305, 0.034417, -0.852084, -0.0601338, 0.27234, 0.443756, 0.544689, 0.599858, 0.617897, 0.600256, 0.542443, 0.43038, 0.222655, -0.295973, -0.162113, 0.254269, 0.431724, 0.519643, 0.549175, 0.526495, 0.442163, 0.255925, -0.263664, -0.0487671, 0.376528, 0.5763, 0.692369, 0.757682, 0.783702, 0.77343, 0.723811, 0.623182, 0.43763, 0.0169528, -0.126099, 0.39136, 0.596203, 0.704415, 0.756565, 0.765283, 0.732445, 0.651037, 0.497379, 0.182862, -0.637423, 0.291694, 0.544315, 0.674842, 0.743591, 0.769358, 0.758813, 0.712573, 0.625856, 0.485, 0.251813, -0.251658, -0.309939, 0.0995507, 0.223416, 0.232549, 0.140975, -0.11865, -1.21352, -0.0175502, 0.256341, 0.392078, 0.453342, 0.455177, 0.392959, 0.233937, -0.193509, -0.189461, 0.304354, 0.520946, 0.644236, 0.711921, 0.736159, 0.718941, 0.653801, 0.518669, 0.233273, -0.876249, 0.316294, 0.59465, 0.74406, 0.830446, 0.874007, 0.882091, 0.855843, 0.791015, 0.674583, 0.469173, -0.0021969, -0.0207424, 0.436353, 0.622165, 0.717004, 0.75777, 0.75611, 0.71353, 0.622881, 0.460539, 0.138765, -0.716387, 0.224012, 0.468913, 0.590687, 0.649881, 0.66482, 0.641052, 0.576724, 0.460905, 0.260439, -0.171819, -0.346635, 0.162758, 0.355024, 0.451677, 0.494703, 0.498494, 0.468083, 0.403232, 0.298364, 0.138233, -0.121326, -0.721024, -0.557228, -0.212258, -0.0958615, -0.0750198, -0.128671, -0.274841, -0.631621, -0.937487, -0.317162, -0.0794272, 0.0568694, 0.139471, 0.18473, 0.198707, 0.181764, 0.128512, 0.0230107, -0.183565, -0.801458, -0.376375, 0.0234984, 0.234664, 0.373907, 0.471095, 0.537754, 0.578717, 0.595337, 0.58628, 0.546935, 0.466691, 0.31928, 0.0113921, -0.707158, 0.179533, 0.452693, 0.610234, 0.710933, 0.773935, 0.807126, 0.813504, 0.79296, 0.742265, 0.653273, 0.506488, 0.242411, -0.648644, 0.093968, 0.40444, 0.552018, 0.627997, 0.656638, 0.645444, 0.593478, 0.490566, 0.305159, -0.098925, -0.333211, 0.218413, 0.426997, 0.537013, 0.592433, 0.608089, 0.589057, 0.534877, 0.439309, 0.285115, 0.0196601, -0.722361, -0.247266, 0.0639501, 0.189637, 0.233962, 0.220431, 0.150333, 0.00456207, -0.299446, -1.23052, -0.207878, 0.0553762, 0.197082, 0.281878, 0.331756, 0.35733, 0.364889, 0.358676, 0.3417, 0.315897, 0.281914, 0.238586, 0.182054, 0.103965, -0.013453, -0.216996, -0.755293, -0.491783, -0.057918, 0.164166, 0.309662, 0.410559, 0.478714, 0.518884, 0.532135, 0.516532, 0.466143, 0.366936, 0.180724, -0.272507, -0.254139, 0.225811, 0.440793, 0.569127, 0.648833, 0.693916, 0.710323, 0.700063, 0.662294, 0.592913, 0.482107, 0.30567, -0.0188509, -1.11559, 0.00329169, 0.249397, 0.369273, 0.428389, 0.447444, 0.435089, 0.39512, 0.328783, 0.235622, 0.113774, -0.0399538, -0.229917, -0.46057, -0.73193, -1.02614, -1.29766, -1.58105, -2.17929, -1.14275, -0.733047, -0.457459, -0.256352, -0.108077, -0.00241288, 0.0653126, 0.0957698, 0.0851032, 0.0213583, -0.129886, -0.524041, -0.601615, -0.062724, 0.174304, 0.317297, 0.407254, 0.458673, 0.4771, 0.463274, 0.413532, 0.31717, 0.145423, -0.213183, -0.665226, 0.00789771, 0.237854, 0.36053, 0.426855, 0.453984, 0.44886, 0.413721, 0.347561, 0.245767, 0.0974678, -0.124221, -0.514749, -1.28198, -0.514264, -0.340214, -0.281721, -0.271617, -0.27273, -0.251174, -0.184114, -0.0745629, 0.055645, 0.185367, 0.302183, 0.400526, 0.478323, 0.534827, 0.569461, 0.581147, 0.567687, 0.52481, 0.444032, 0.306489, 0.0571572, -0.701122, -0.144338, 0.18325, 0.332295, 0.403529, 0.421599, 0.39198, 0.308257, 0.144158, -0.208006, -0.696114, -0.0106505, 0.20858, 0.31209, 0.34889, 0.330971, 0.254182, 0.0925797, -0.265556, -0.70567, -0.0558905, 0.147808, 0.22813, 0.224311, 0.125222, -0.170194, -0.60125, 0.134029, 0.406145, 0.566229, 0.66648, 0.724197, 0.745685, 0.731367, 0.675915, 0.563602, 0.346644, -0.269371, 0.095496, 0.472745, 0.650689, 0.749208, 0.797473, 0.804877, 0.771916, 0.690655, 0.536043, 0.213344, -0.470261, 0.36244, 0.610684, 0.740583, 0.808736, 0.83225, 0.81567, 0.75552, 0.636947, 0.41239, -0.216121, 0.149371, 0.516014, 0.683649, 0.770813, 0.805802, 0.796526, 0.74031, 0.620855, 0.381266, -0.467247, 0.263793, 0.594566, 0.760477, 0.854924, 0.903323, 0.914635, 0.890465, 0.826259, 0.707308, 0.488916, -0.0851154, 0.17736, 0.56981, 0.750976, 0.852997, 0.907758, 0.926934, 0.914596, 0.870178, 0.788111, 0.65347, 0.423101, -0.135518, 0.0405494, 0.432077, 0.599625, 0.684947, 0.720741, 0.718252, 0.680309, 0.60372, 0.47672, 0.265369, -0.180091, -0.351323, 0.142552, 0.323274, 0.407949, 0.437714, 0.426239, 0.377611, 0.29012, 0.155454, -0.0482004, -0.390422, -1.78393, -0.611759, -0.438918, -0.45493, -0.634478, -1.31243, -0.824217, -0.50426, -0.402442, -0.43819, -0.694048, -1.05188, -0.313194, -0.0224335, 0.153693, 0.266747, 0.33372, 0.360067, 0.34405, 0.274659, 0.117591, -0.285955, -0.346182, 0.183614, 0.419397, 0.56374, 0.657493, 0.715627, 0.744652, 0.74708, 0.722716, 0.668564, 0.577231, 0.431524, 0.182024, -0.476971, -0.116235, 0.228019, 0.375932, 0.444316, 0.461389, 0.43566, 0.366333, 0.242912, 0.0328924, -0.404516, -0.64435, -0.143527, 0.0152901, 0.0634668, 0.0366399, -0.0666948, -0.286673, -0.88454, -0.637653, -0.303455, -0.212359, -0.267456, -0.579001, -0.689286, -0.0826343, 0.188545, 0.357988, 0.470483, 0.542354, 0.580557, 0.587383, 0.56155, 0.49728, 0.379902, 0.167913, -0.351943, -0.228322, 0.187812, 0.365287, 0.455792, 0.492655, 0.486277, 0.437294, 0.337399, 0.16022, -0.195947, -0.791191, -0.0643068, 0.143553, 0.230108, 0.245475, 0.199238, 0.0796845, -0.168638, -1.04407, -0.321922, -0.0272453, 0.0888513, 0.110773, 0.0444419, -0.162981, -1.17378, -0.162343, 0.17467, 0.354364, 0.461704, 0.520823, 0.540271, 0.521266, 0.458466, 0.334965, 0.0970563, -0.651278, -0.0860149, 0.250228, 0.408473, 0.490485, 0.522492, 0.512858, 0.461511, 0.360088, 0.183233, -0.163003, -0.907716, -0.0893725, 0.11598, 0.189299, 0.179233, 0.0821992, -0.168642, -1.84947, -0.105147, 0.188131, 0.3416, 0.426271, 0.46298, 0.4583, 0.410947, 0.310438, 0.124361, -0.289884, -0.483049, 0.0458175, 0.245933, 0.347428, 0.392998, 0.397184, 0.365153, 0.297087, 0.188778, 0.0295273, -0.206221, -0.600071, -2.10599, -0.846237, -0.786653, -0.989527, -2.13672, -1.18307, -1.22023, -1.15529, -0.451493, -0.099336, 0.137847, 0.309393, 0.434638, 0.522748, 0.577958, 0.601193, 0.590078, 0.537205, 0.423884, 0.192373, -0.630195, 0.0800682, 0.417724, 0.586663, 0.680537, 0.723355, 0.721201, 0.669532, 0.547772, 0.279467, -1.05015, 0.358927, 0.652784, 0.814232, 0.912006, 0.967066, 0.987262, 0.974352, 0.925198, 0.829412, 0.65854, 0.302331, -0.162927, 0.518572, 0.749516, 0.872023, 0.936856, 0.960303, 0.947595, 0.897592, 0.801888, 0.63628, 0.31328, -0.561586, 0.392718, 0.638994, 0.762813, 0.825516, 0.846289, 0.832211, 0.784555, 0.699797, 0.567235, 0.358349, -0.0349277, -0.580206, 0.0720919, 0.248726, 0.306021, 0.290457, 0.207788, 0.0360817, -0.334238, -0.789398, -0.152165, 0.0393214, 0.11037, 0.104239, 0.0214676, -0.179517, -0.808424, -0.392835, -0.0204939, 0.15592, 0.252867, 0.300057, 0.30829, 0.280586, 0.214209, 0.0980789, -0.100644, -0.52795, -0.699175, -0.176491, 0.0336538, 0.155748, 0.234153, 0.286096, 0.320188, 0.341119, 0.351194, 0.350878, 0.338936, 0.312272, 0.265246, 0.187622, 0.0579667, -0.185783, -1.08998, -0.264354, 0.0747302, 0.256409, 0.370152, 0.440822, 0.477862, 0.484539, 0.460315, 0.40073, 0.294705, 0.114185, -0.243449, -0.845351, -0.117559, 0.0859971, 0.163278, 0.159315, 0.070108, -0.168662, -2.21175, -0.11727, 0.186733, 0.345727, 0.432864, 0.468195, 0.45583, 0.388505, 0.238027, -0.116154, -0.445892, 0.184306, 0.418829, 0.546728, 0.614844, 0.63765, 0.618074, 0.550393, 0.414144, 0.137175, -2.77473, 0.138199, 0.417431, 0.554879, 0.622429, 0.639757, 0.611075, 0.530122, 0.372939, 0.0476727, -0.70542, 0.153236, 0.382667, 0.483514, 0.50928, 0.46777, 0.338378, 0.0140868, -0.413707, 0.284347, 0.533324, 0.670927, 0.747837, 0.780182, 0.772656, 0.722772, 0.618599, 0.424032, -0.0305253, -0.0785151, 0.390965, 0.57661, 0.66566, 0.69398, 0.669637, 0.585407, 0.407782, -0.0300891, -0.0697755, 0.416343, 0.618261, 0.726057, 0.777935, 0.7861, 0.75255, 0.670965, 0.520059, 0.224534, -1.35863, 0.223493, 0.483973, 0.606109, 0.658767, 0.660781, 0.615665, 0.515923, 0.333924, -0.0441783, -0.483089, 0.144939, 0.339188, 0.417799, 0.42666, 0.375064, 0.253536, 0.0190282, -0.583722, -0.375675, -0.0576053, 0.00372204, -0.114593, -0.811746, -0.10824, 0.285724, 0.499649, 0.633892, 0.715915, 0.755543, 0.754475, 0.707163, 0.59499, 0.355136, -0.680969, 0.314359, 0.6376, 0.806827, 0.906309, 0.959763, 0.975518, 0.954755, 0.892389, 0.772521, 0.545967, -0.104118, 0.30695, 0.67055, 0.842069, 0.936478, 0.982727, 0.990982, 0.963629, 0.897198, 0.779553, 0.575646, 0.127004, 0.0142105, 0.49831, 0.68487, 0.776967, 0.814186, 0.809406, 0.765645, 0.678929, 0.534932, 0.290231, -0.292992, -0.124579, 0.233811, 0.362449, 0.396916, 0.362044, 0.251572, 0.0139488, -0.813594, -0.131383, 0.187417, 0.334944, 0.406388, 0.427088, 0.405208, 0.340512, 0.224119, 0.0284832, -0.355561, -0.860371, -0.210125, -0.0168891, 0.0659178, 0.0911913, 0.079097, 0.0423475, -0.00621841, -0.0504435, -0.0726019, -0.0618112, -0.0220131, 0.0311973, 0.0803593, 0.111324, 0.112163, 0.0682248, -0.0501494, -0.348176, -0.843224, -0.071089, 0.207357, 0.373279, 0.48033, 0.546373, 0.578541, 0.578914, 0.545788, 0.472674, 0.343426, 0.111745, -0.486014, -0.226604, 0.135416, 0.279328, 0.330043, 0.309369, 0.205778, -0.0560982, -1.14912, 0.0586008, 0.34766, 0.504938, 0.596521, 0.642454, 0.649516, 0.617509, 0.538985, 0.391777, 0.0984386, -1.26099, 0.125197, 0.390283, 0.519722, 0.580626, 0.591202, 0.554136, 0.459857, 0.273157, -0.179094, -0.196948, 0.275788, 0.472634, 0.577079, 0.626595, 0.633196, 0.598842, 0.517272, 0.367439, 0.0752084, -1.72157, 0.0702194, 0.33655, 0.464314, 0.52361, 0.533763, 0.498782, 0.411944, 0.247432, -0.0992905, -0.621643, 0.0932022, 0.325801, 0.44739, 0.510922, 0.533835, 0.522739, 0.478886, 0.399033, 0.273257, 0.0754171, -0.288977, -1.04081, -0.23728, -0.0362034, 0.0422777, 0.0538477, 0.0134088, -0.0785541, -0.234047, -0.491693, -1.02881, -1.1724, -0.871808, -1.02714, -1.26079, -0.522194, -0.207404, -0.00746693, 0.130739, 0.226697, 0.28916, 0.321777, 0.324634, 0.293898, 0.218914, 0.0711704, -0.259579, -0.696058, 0.0159206, 0.280784, 0.44078, 0.547342, 0.617847, 0.65939, 0.674317, 0.661624, 0.616406, 0.526574, 0.360262, -0.0126215, -0.273841, 0.328466, 0.570554, 0.71523, 0.808374, 0.865976, 0.894645, 0.896571, 0.870816, 0.812849, 0.711694, 0.53942, 0.192369, -0.365234, 0.372379, 0.610351, 0.737462, 0.807181, 0.836695, 0.832081, 0.793645, 0.716252, 0.585263, 0.358044, -0.192538, -0.0341938, 0.359163, 0.523413, 0.602507, 0.62877, 0.612346, 0.553904, 0.445592, 0.262979, -0.0830638, -0.952553, -0.0571654, 0.143241, 0.206157, 0.181086, 0.0594502, -0.256595, -0.747108, -0.0193042, 0.225784, 0.355747, 0.423402, 0.445873, 0.429093, 0.373087, 0.27243, 0.112975, -0.141688, -0.634418, -1.00821, -0.661887, -0.976468, -0.643921, -0.133167, 0.130184, 0.296063, 0.401513, 0.460303, 0.476671, 0.44786, 0.360942, 0.175184, -0.326286, -0.165603, 0.26674, 0.461666, 0.56821, 0.618979, 0.623256, 0.579122, 0.471216, 0.245884, -0.511405, 0.100806, 0.445435, 0.614495, 0.707586, 0.750486, 0.75113, 0.708526, 0.611796, 0.426518, -0.00598214, -0.10026, 0.396416, 0.594684, 0.696273, 0.73969, 0.735812, 0.683345, 0.567298, 0.334629, -0.419015, 0.167304, 0.506253, 0.66854, 0.754992, 0.791726, 0.787016, 0.740497, 0.642812, 0.464782, 0.0866165, -0.282443, 0.330539, 0.54172, 0.645542, 0.688659, 0.684681, 0.634733, 0.528753, 0.332182, -0.11875, -0.196598, 0.278029, 0.461946, 0.549375, 0.577677, 0.556684, 0.483014, 0.335622, 0.0321508, -0.958872, 0.105286, 0.362581, 0.49244, 0.558514, 0.580125, 0.563603, 0.508201, 0.405295, 0.228913, -0.120525, -0.732287, 0.0259446, 0.258205, 0.379438, 0.445555, 0.475586, 0.477846, 0.455917, 0.410227, 0.337746, 0.229438, 0.0610231, -0.254918, -1.1105, -0.130358, 0.153318, 0.324563, 0.44467, 0.533121, 0.597933, 0.642534, 0.667975, 0.673687, 0.657504, 0.615021, 0.537624, 0.406465, 0.167131, -0.564533, -0.0173123, 0.330934, 0.502904, 0.602421, 0.656922, 0.67668, 0.66523, 0.621951, 0.541817, 0.411967, 0.19777, -0.250507, -0.430273, 0.0585048, 0.23087, 0.304686, 0.321107, 0.294403, 0.231098, 0.137021, 0.0252626, -0.0705264, -0.093145, -0.0127356, 0.13094, 0.284366, 0.420375, 0.530406, 0.612875, 0.667821, 0.694823, 0.691883, 0.654019, 0.569945, 0.411025, 0.0692287, -0.419101, 0.288965, 0.527591, 0.654154, 0.719512, 0.738733, 0.714363, 0.639166, 0.487618, 0.159299, -0.416216, 0.348887, 0.593982, 0.724042, 0.793041, 0.817608, 0.802307, 0.74405, 0.629204, 0.41513, -0.133253, 0.063887, 0.46272, 0.636802, 0.726159, 0.76264, 0.756147, 0.706823, 0.605206, 0.420764, 0.0228498, -0.254406, 0.310788, 0.516043, 0.61976, 0.666958, 0.672588, 0.641545, 0.572911, 0.45943, 0.281119, -0.0264408, -1.15705, -0.201583, 0.0449726, 0.133355, 0.145648, 0.104008, 0.0158842, -0.115538, -0.282387, -0.451109, -0.535401, -0.469881, -0.322573, -0.180071, -0.0768107, -0.0232908, -0.0287066, -0.116935, -0.380733, -1.02421, -0.138692, 0.150051, 0.315384, 0.41439, 0.464065, 0.468111, 0.420519, 0.298341, 0.0141606, -0.801125, 0.170121, 0.447221, 0.59982, 0.688462, 0.73149, 0.734417, 0.695244, 0.602619, 0.421922, -0.00528921, -0.0964519, 0.406224, 0.610279, 0.718166, 0.768842, 0.773998, 0.73413, 0.639097, 0.455025, 0.02489, -0.0771459, 0.42206, 0.620401, 0.72194, 0.765819, 0.763824, 0.716624, 0.614621, 0.426197, 0.0134568, -0.221205, 0.309559, 0.494048, 0.570147, 0.575824, 0.513745, 0.356905, -0.0373931, -0.19142, 0.346328, 0.558664, 0.669312, 0.719076, 0.719432, 0.669071, 0.552161, 0.311219, -0.566953, 0.197206, 0.517531, 0.671988, 0.751612, 0.780386, 0.765093, 0.703048, 0.579295, 0.344039, -0.339005, 0.10318, 0.446159, 0.598849, 0.671925, 0.693109, 0.671492, 0.608112, 0.497659, 0.325609, 0.0554884, -0.44271, -1.07109, -0.90837, -0.578525, 0.0145379, 0.31922, 0.514628, 0.644684, 0.726508, 0.766953, 0.766617, 0.719361, 0.605849, 0.36063, -0.813994, 0.341556, 0.655618, 0.819173, 0.912625, 0.958487, 0.963905, 0.928048, 0.841317, 0.674239, 0.305443, -0.0364448, 0.58183, 0.805899, 0.924429, 0.984245, 0.999949, 0.974848, 0.904199, 0.77052, 0.5159, -0.356473, 0.369114, 0.679691, 0.823039, 0.890792, 0.906281, 0.8748, 0.790231, 0.627464, 0.285694, -0.294684, 0.448995, 0.676091, 0.785999, 0.831482, 0.827366, 0.774693, 0.662053, 0.449272, -0.0806524, 0.0514055, 0.452299, 0.613358, 0.682096, 0.688555, 0.636695, 0.510985, 0.245132, -1.1899, 0.212096, 0.493879, 0.625334, 0.681433, 0.680386, 0.621275, 0.482477, 0.171435, -0.511583, 0.330607, 0.581271, 0.710956, 0.776363, 0.79426, 0.768247, 0.692463, 0.544922, 0.244429, -0.830736, 0.302918, 0.561146, 0.688603, 0.749422, 0.761793, 0.729514, 0.64618, 0.487516, 0.158901, -0.523161, 0.297143, 0.537567, 0.659715, 0.720334, 0.737003, 0.715151, 0.653136, 0.540793, 0.347783, -0.0520088, -0.3765, 0.19896, 0.398754, 0.495544, 0.53514, 0.532103, 0.489984, 0.404492, 0.258904, -0.00294155, -0.849722, -0.167058, 0.154115, 0.3144, 0.410351, 0.469785, 0.504663, 0.520956, 0.521512, 0.506964, 0.475818, 0.423829, 0.342033, 0.210531, -0.0285221, -0.820072, -0.152655, 0.200566, 0.38819, 0.50685, 0.582408, 0.624307, 0.635322, 0.613741, 0.552369, 0.43254, 0.196322, -0.635531, 0.08575, 0.426111, 0.60212, 0.708187, 0.770438, 0.799032, 0.79787, 0.767187, 0.703808, 0.59941, 0.434052, 0.147079, -0.790401, -0.0513323, 0.218227, 0.315415, 0.323792, 0.253023, 0.069423, -0.461417, -0.237269, 0.169241, 0.347461, 0.434894, 0.460821, 0.429573, 0.326882, 0.0916143, -0.972469, 0.0616995, 0.383155, 0.550798, 0.64819, 0.699032, 0.711689, 0.687341, 0.620776, 0.495578, 0.260075, -0.445376, 0.0528198, 0.401461, 0.568708, 0.662249, 0.710587, 0.724774, 0.709243, 0.664701, 0.588516, 0.473138, 0.300014, 0.0124802, -0.838649, -0.218051, 0.076287, 0.206327, 0.270983, 0.299715, 0.306817, 0.301437, 0.290188, 0.277453, 0.264867, 0.250811, 0.230324, 0.195033, 0.131714, 0.0156098, -0.222566, -1.37374, -0.211679, 0.124525, 0.313012, 0.434348, 0.5116, 0.553276, 0.561505, 0.533582, 0.460002, 0.315001, 0.00426828, -0.685468, 0.172171, 0.434966, 0.580351, 0.666033, 0.710405, 0.720249, 0.696609, 0.635538, 0.525144, 0.332406, -0.0835065, -0.295905, 0.237309, 0.436987, 0.537839, 0.582323, 0.583924, 0.545579, 0.462528, 0.317739, 0.0556713, -0.762004, -0.142056, 0.166764, 0.303955, 0.367193, 0.382906, 0.361131, 0.305693, 0.217345, 0.0954263, -0.0595577, -0.238314, -0.402804, -0.47251, -0.406882, -0.274295, -0.146215, -0.0507774, 0.00418962, 0.0145191, -0.0282509, -0.147356, -0.427137, -1.35669, -0.307838, -0.0400623, 0.09428, 0.15534, 0.156821, 0.0926599, -0.0738542, -0.549806, -0.403479, 0.0483007, 0.256992, 0.377297, 0.443674, 0.467685, 0.451742, 0.391153, 0.269743, 0.0363084, -0.658283, -0.187902, 0.152949, 0.303681, 0.370771, 0.37762, 0.324366, 0.187962, -0.137017, -0.6021, 0.114967, 0.367151, 0.509226, 0.593703, 0.638447, 0.650958, 0.63409, 0.587709, 0.508753, 0.389811, 0.214237, -0.0632844, -0.682394, -0.555558, -0.247147, -0.182476, -0.236313, -0.409707, -0.815335, -1.27657, -0.805081, -0.996861, -0.824947, -0.221408, 0.0889518, 0.295627, 0.441803, 0.544536, 0.611677, 0.646379, 0.648286, 0.612908, 0.528154, 0.360836, -0.0313897, -0.205977, 0.350145, 0.578094, 0.709634, 0.787837, 0.827603, 0.834482, 0.809023, 0.747136, 0.637129, 0.447143, 0.0455306, -0.232479, 0.331085, 0.535709, 0.638805, 0.684619, 0.686911, 0.648404, 0.563567, 0.413083, 0.131229, -1.08229, 0.0387084, 0.314062, 0.43631, 0.4838, 0.475389, 0.410601, 0.268896, -0.0362023, -0.864382, 0.0799114, 0.335895, 0.467662, 0.535397, 0.556942, 0.5368, 0.470661, 0.340743, 0.0860366, -0.898493, -0.0048225, 0.306995, 0.46207, 0.546796, 0.584746, 0.583275, 0.541316, 0.448224, 0.270423, -0.144953, -0.257261, 0.267362, 0.488676, 0.61809, 0.69691, 0.739676, 0.751926, 0.734382, 0.683399, 0.588396, 0.421192, 0.0744683, -0.422668, 0.289488, 0.532408, 0.667021, 0.745204, 0.783583, 0.787682, 0.756867, 0.683907, 0.548203, 0.281017, -1.13604, 0.265192, 0.566763, 0.725892, 0.819862, 0.871277, 0.888559, 0.873852, 0.824586, 0.731715, 0.571178, 0.258904, -0.742461, 0.321399, 0.576364, 0.704556, 0.769012, 0.7882, 0.767127, 0.70258, 0.580061, 0.353202, -0.259929, 0.0623044, 0.431519, 0.59716, 0.682557, 0.717656, 0.712588, 0.669229, 0.582992, 0.439175, 0.194344, -0.384292, -0.238779, 0.113928, 0.226728, 0.231748, 0.138044, -0.125247, -1.10478, -0.00133133, 0.27507, 0.418934, 0.494224, 0.519709, 0.500164, 0.431241, 0.29483, 0.0289027, -0.996413, -0.0895057, 0.19385, 0.312526, 0.347676, 0.314251, 0.19915, -0.0701393, -1.48579, -0.0233117, 0.246698, 0.37322, 0.421383, 0.403399, 0.30558, 0.0554522, -1.33212, 0.149397, 0.448877, 0.611791, 0.707265, 0.755701, 0.763521, 0.72937, 0.642703, 0.470893, 0.0694687, -0.0946784, 0.446774, 0.66503, 0.786436, 0.853414, 0.880413, 0.872359, 0.828684, 0.742958, 0.597398, 0.336885, -0.45379, 0.124828, 0.436578, 0.572247, 0.630892, 0.637638, 0.599589, 0.514581, 0.369768, 0.126166, -0.402578, -0.451295, -0.0888497, -0.0298355, -0.152808, -0.779179, -0.226713, 0.164187, 0.361609, 0.474274, 0.529782, 0.535862, 0.488939, 0.369187, 0.101564, -1.34747, 0.161703, 0.447643, 0.59644, 0.676907, 0.708635, 0.696594, 0.636427, 0.509625, 0.251403, -0.916742, 0.202018, 0.503291, 0.653507, 0.733476, 0.765787, 0.757664, 0.708495, 0.609366, 0.433411, 0.0771539, -0.488839, 0.226681, 0.439513, 0.534175, 0.561254, 0.532621, 0.442847, 0.260929, -0.162881, -0.305551, 0.198734, 0.387887, 0.475159, 0.4992, 0.469014, 0.378229, 0.195845, -0.22376, -0.397584, 0.111839, 0.293844, 0.367873, 0.369318, 0.297581, 0.114409, -0.432782, -0.151343, 0.255202, 0.445117, 0.550737, 0.603623, 0.61452, 0.585517, 0.511773, 0.377085, 0.130559, -0.569991, -0.129198, 0.197785, 0.332237, 0.381668, 0.369461, 0.295566, 0.136712, -0.212334, -0.713378, -0.0234439, 0.192492, 0.291574, 0.324201, 0.304606, 0.234052, 0.103605, -0.113254, -0.502483, -2.21676, -0.934442, -1.53187, -0.356811, 0.0348123, 0.276724, 0.44125, 0.553394, 0.623906, 0.656793, 0.651081, 0.599466, 0.481003, 0.224408, -1.68864, 0.256263, 0.560094, 0.722983, 0.818969, 0.869662, 0.882485, 0.857869, 0.789576, 0.658872, 0.404795, -0.551835, 0.303624, 0.615341, 0.767603, 0.847678, 0.878924, 0.868121, 0.813074, 0.70046, 0.487324, -0.0675293, 0.149572, 0.545012, 0.718342, 0.806486, 0.840266, 0.828168, 0.767373, 0.640432, 0.384634, -0.692057, 0.319172, 0.626146, 0.780244, 0.864907, 0.903591, 0.904341, 0.867832, 0.787835, 0.645162, 0.375998, -0.72189, 0.293037, 0.592695, 0.742114, 0.824943, 0.865498, 0.873445, 0.852524, 0.80288, 0.721119, 0.598157, 0.411116, 0.0830834, -1.40143, 0.0424569, 0.286183, 0.399894, 0.453905, 0.470673, 0.460287, 0.428126, 0.37729, 0.309435, 0.224817, 0.12159, -0.00628979, -0.175101, -0.435426, -1.12587, -0.667824, -0.295758, -0.0979757, 0.0352146, 0.131729, 0.202329, 0.251995, 0.283289, 0.297627, 0.295838, 0.27847, 0.245989, 0.198966, 0.138309, 0.0655237, -0.0170243, -0.10611, -0.198398, -0.292652, -0.393976, -0.521484 +}; #endif /* MULTIPATH_V30_M12_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v30_M6.h b/src/lte/model/JakesTraces/multipath_v30_M6.h index 5de753845..bd41cb880 100644 --- a/src/lte/model/JakesTraces/multipath_v30_M6.h +++ b/src/lte/model/JakesTraces/multipath_v30_M6.h @@ -23,8 +23,8 @@ #define MULTIPATH_V30_M6_H_ static double multipath_M6_v_30[3000] = { - 0.988866, 0.923321, 0.796169, 0.552812, -0.228667, 0.380953, 0.710421, 0.866311, 0.947623, 0.980376, 0.973251, 0.926985, 0.835106, 0.677813, 0.389346, -0.810871, 0.277113, 0.543406, 0.654344, 0.687975, 0.661841, 0.572249, 0.38824, -0.0459764, -0.153662, 0.33524, 0.520558, 0.605334, 0.62718, 0.594652, 0.500673, 0.311747, -0.138819, -0.195277, 0.273593, 0.454454, 0.536435, 0.555405, 0.518897, 0.418083, 0.213557, -0.317297, -0.158101, 0.242449, 0.406203, 0.477194, 0.484791, 0.432084, 0.300955, 0.0115596, -1.02152, 0.0909369, 0.352873, 0.48311, 0.545638, 0.559061, 0.52816, 0.44906, 0.305682, 0.0464828, -0.676684, -0.248297, 0.044895, 0.130277, 0.0983698, -0.0795419, -0.859831, -0.130451, 0.227692, 0.412075, 0.518453, 0.572519, 0.582442, 0.547394, 0.456365, 0.273652, -0.172291, -0.195781, 0.283082, 0.483232, 0.590239, 0.641723, 0.649597, 0.615475, 0.532126, 0.375237, 0.0522372, -0.671081, 0.184882, 0.433566, 0.564925, 0.637945, 0.672335, 0.676843, 0.655821, 0.611441, 0.544599, 0.455332, 0.342939, 0.205765, 0.0400004, -0.164992, -0.447342, -1.05874, -0.787393, -0.362521, -0.120762, 0.0607629, 0.206808, 0.324609, 0.416572, 0.483268, 0.524041, 0.536739, 0.516699, 0.454101, 0.325605, 0.0541063, -1.40419, 0.115043, 0.404999, 0.559302, 0.646613, 0.686474, 0.684017, 0.635468, 0.524227, 0.294458, -0.507368, 0.172121, 0.512419, 0.683106, 0.78027, 0.829613, 0.83996, 0.812532, 0.741982, 0.611669, 0.369707, -0.34111, 0.139418, 0.473117, 0.619256, 0.683341, 0.689327, 0.639279, 0.516641, 0.253138, -1.43029, 0.251579, 0.540928, 0.685434, 0.75944, 0.783389, 0.762063, 0.689974, 0.544898, 0.24314, -0.718698, 0.325822, 0.583122, 0.711735, 0.77378, 0.786684, 0.75332, 0.665256, 0.491599, 0.0941435, -0.11275, 0.438658, 0.652879, 0.76836, 0.82864, 0.848476, 0.83292, 0.781483, 0.687825, 0.534401, 0.267195, -0.505602, 0.0203608, 0.325702, 0.450426, 0.496001, 0.487462, 0.431128, 0.323124, 0.146531, -0.151593, -0.9114, -0.579143, -0.395513, -0.552422, -1.1123, -0.214036, 0.0918722, 0.267565, 0.372576, 0.425845, 0.432834, 0.389966, 0.280073, 0.0431401, -0.900978, -0.0315463, 0.289353, 0.44848, 0.532689, 0.564457, 0.548566, 0.477835, 0.323347, -0.0419001, -0.313525, 0.290713, 0.526518, 0.6611, 0.740722, 0.781272, 0.788849, 0.764501, 0.704842, 0.599639, 0.421551, 0.068048, -0.511078, 0.223545, 0.450018, 0.56357, 0.617642, 0.628775, 0.601621, 0.533386, 0.411235, 0.195415, -0.319365, -0.224608, 0.196829, 0.376882, 0.472743, 0.519675, 0.530425, 0.509625, 0.457221, 0.368453, 0.230383, 0.00738835, -0.459064, -0.593805, -0.128711, 0.0347655, 0.0974129, 0.0928215, 0.0202096, -0.157409, -0.675055, -0.43369, -0.00110718, 0.210814, 0.341869, 0.425199, 0.472892, 0.489109, 0.473096, 0.418616, 0.308685, 0.091529, -0.58704, -0.0782956, 0.295791, 0.489085, 0.61006, 0.687247, 0.731628, 0.747528, 0.735505, 0.6927, 0.611166, 0.471478, 0.213859, -0.68221, 0.0842244, 0.400826, 0.555633, 0.639315, 0.676135, 0.67376, 0.631626, 0.540461, 0.371687, 0.00946485, -0.384845, 0.262816, 0.494344, 0.621281, 0.693063, 0.726475, 0.728234, 0.700243, 0.640793, 0.543596, 0.393174, 0.14571, -0.434874, -0.268156, 0.0999249, 0.243545, 0.302501, 0.308737, 0.272743, 0.196422, 0.0753765, -0.103756, -0.376891, -0.893055, -1.19187, -0.818492, -0.828139, -1.07822, -2.47068, -1.16719, -1.16227, -1.56694, -0.622445, -0.246471, -0.00202911, 0.173116, 0.301622, 0.394227, 0.456477, 0.49097, 0.498105, 0.475976, 0.419268, 0.315758, 0.13377, -0.254593, -0.55597, 0.0305629, 0.246093, 0.36001, 0.418233, 0.436116, 0.419085, 0.367283, 0.275947, 0.132326, -0.0973357, -0.550746, -0.855804, -0.379286, -0.27998, -0.344373, -0.673791, -0.776708, -0.193392, 0.0623266, 0.217637, 0.316811, 0.376052, 0.40224, 0.397554, 0.360462, 0.284558, 0.153326, -0.0823866, -0.73301, -0.344469, 0.0149308, 0.181291, 0.270715, 0.311762, 0.313443, 0.275533, 0.188104, 0.0188928, -0.376836, -0.526133, 0.0291174, 0.267586, 0.41492, 0.514167, 0.58085, 0.621673, 0.639248, 0.633494, 0.601658, 0.536951, 0.423931, 0.220262, -0.29132, -0.137888, 0.296154, 0.498173, 0.618056, 0.689597, 0.724529, 0.726255, 0.692672, 0.61467, 0.467092, 0.158606, -0.598178, 0.305852, 0.571772, 0.71901, 0.806796, 0.853857, 0.867112, 0.847729, 0.791993, 0.688595, 0.506555, 0.119856, -0.196342, 0.395546, 0.610211, 0.722077, 0.777031, 0.789773, 0.764371, 0.69813, 0.579527, 0.375085, -0.0602425, -0.264431, 0.235953, 0.405031, 0.465665, 0.452215, 0.360812, 0.139897, -0.69843, 0.0423793, 0.375347, 0.53924, 0.627049, 0.663323, 0.655198, 0.600376, 0.48468, 0.26131, -0.360356, -0.0170412, 0.345034, 0.502468, 0.574647, 0.588232, 0.547209, 0.438861, 0.211296, -0.538578, 0.0477759, 0.386494, 0.546847, 0.629609, 0.66061, 0.647538, 0.588823, 0.472214, 0.258796, -0.247594, -0.19995, 0.212851, 0.36575, 0.418144, 0.397066, 0.294633, 0.0482991, -1.31677, 0.0401084, 0.335496, 0.478842, 0.54609, 0.556002, 0.508486, 0.384189, 0.102937, -0.93628, 0.196461, 0.466938, 0.604737, 0.673208, 0.689321, 0.654189, 0.554285, 0.338777, -0.365306, 0.176041, 0.53387, 0.709968, 0.809356, 0.859087, 0.868044, 0.836654, 0.757142, 0.605022, 0.288495, -0.452395, 0.424595, 0.678722, 0.813938, 0.889122, 0.923107, 0.923075, 0.890673, 0.823145, 0.71149, 0.532211, 0.204837, -1.00171, 0.192998, 0.426609, 0.527578, 0.561098, 0.545281, 0.483566, 0.368874, 0.175222, -0.201045, -0.774008, -0.0852366, 0.109032, 0.188734, 0.207699, 0.18493, 0.130847, 0.0554264, -0.0262751, -0.0906781, -0.111992, -0.0816489, -0.0169373, 0.0556801, 0.116312, 0.153217, 0.158548, 0.123729, 0.0332856, -0.152866, -0.627338, -0.571464, -0.129341, 0.0479974, 0.123354, 0.124104, 0.0420744, -0.187784, -1.95511, -0.127877, 0.184855, 0.351328, 0.445627, 0.488229, 0.483858, 0.426653, 0.292946, -0.00949194, -0.718271, 0.153935, 0.412879, 0.549072, 0.619407, 0.639846, 0.612117, 0.525674, 0.342633, -0.133671, -0.0452387, 0.404874, 0.602897, 0.710979, 0.76372, 0.771589, 0.734435, 0.641231, 0.455222, -0.00578268, 0.019732, 0.485133, 0.685907, 0.797068, 0.855781, 0.875039, 0.859148, 0.807188, 0.712499, 0.557255, 0.287291, -0.484731, 0.0241008, 0.318784, 0.425935, 0.443609, 0.388322, 0.243934, -0.0821577, -0.741384, 0.0475199, 0.262636, 0.345293, 0.342695, 0.250641, 0.000144689, -1.38829, 0.0802109, 0.365883, 0.509492, 0.578009, 0.587519, 0.53475, 0.391193, 0.0190996, -0.157859, 0.412331, 0.645356, 0.777623, 0.852183, 0.883007, 0.873552, 0.819836, 0.706589, 0.485226, -0.155899, 0.244431, 0.608422, 0.776367, 0.863565, 0.897761, 0.886612, 0.827206, 0.70284, 0.455311, -0.435688, 0.334092, 0.649412, 0.799559, 0.874814, 0.898574, 0.876665, 0.80431, 0.660573, 0.367875, -0.911702, 0.403429, 0.66702, 0.795734, 0.856186, 0.866854, 0.831237, 0.74194, 0.571533, 0.206694, -0.221324, 0.424799, 0.637849, 0.738211, 0.772946, 0.753201, 0.673319, 0.501854, 0.0844976, -0.0146419, 0.497956, 0.708454, 0.823914, 0.885016, 0.90574, 0.890711, 0.838913, 0.742902, 0.581885, 0.286667, -1.1983, 0.211666, 0.47728, 0.597755, 0.649446, 0.654055, 0.618632, 0.542888, 0.419222, 0.225536, -0.113787, -1.80446, -0.213402, -0.00391323, 0.064896, 0.0648506, 0.0221239, -0.0418574, -0.0961144, -0.100704, -0.0353212, 0.0788597, 0.205672, 0.321164, 0.414668, 0.482147, 0.521619, 0.530706, 0.504718, 0.433449, 0.291655, -0.00933235, -0.842856, 0.116865, 0.381123, 0.52147, 0.598363, 0.630081, 0.622148, 0.572736, 0.471073, 0.284793, -0.126384, -0.337568, 0.197061, 0.395704, 0.493192, 0.531362, 0.522432, 0.466678, 0.352828, 0.14256, -0.36113, -0.300064, 0.122019, 0.291706, 0.371347, 0.396223, 0.378477, 0.322036, 0.226666, 0.0900369, -0.0877367, -0.285815, -0.414309, -0.3517, -0.159524, 0.0391227, 0.201753, 0.323932, 0.408818, 0.459343, 0.47651, 0.458628, 0.399784, 0.285231, 0.0733975, -0.448158, -0.335368, 0.0702806, 0.230329, 0.294422, 0.290685, 0.217737, 0.0423897, -0.421262, -0.373623, 0.0770283, 0.261102, 0.346011, 0.363085, 0.313735, 0.171909, -0.193711, -0.415697, 0.16566, 0.391438, 0.510697, 0.565593, 0.56629, 0.50707, 0.357313, -0.0299727, -0.152427, 0.39495, 0.625877, 0.759444, 0.837287, 0.873285, 0.871385, 0.828925, 0.734251, 0.552602, 0.125342, 0.0366663, 0.541807, 0.750352, 0.864974, 0.925444, 0.944957, 0.927014, 0.868489, 0.756956, 0.555367, 0.0868299, 0.0709546, 0.529379, 0.715882, 0.810565, 0.850096, 0.845673, 0.797857, 0.697148, 0.512149, 0.104953, -0.116693, 0.426879, 0.631794, 0.737908, 0.788805, 0.799222, 0.774229, 0.713488, 0.611222, 0.451873, 0.190791, -0.413967, -0.256543, 0.0744218, 0.168663, 0.152493, 0.0288863, -0.305567, -0.691416, -0.0365982, 0.190049, 0.302207, 0.347586, 0.338663, 0.272519, 0.126289, -0.195779, -0.832164, -0.0334424, 0.207272, 0.328238, 0.384548, 0.392213, 0.353807, 0.261187, 0.0850868, -0.300248, -0.60895, -0.0227939, 0.187682, 0.294461, 0.343715, 0.350799, 0.32098, 0.254051, 0.144592, -0.0214414, -0.281008, -0.788874, -1.04159, -0.672017, -0.704123, -1.23498, -0.753515, -0.332731, -0.120019, 0.00341224, 0.067296, 0.079922, 0.0370335, -0.0851075, -0.386191, -0.923822, -0.136207, 0.139076, 0.30283, 0.41039, 0.480665, 0.521946, 0.537935, 0.529577, 0.495377, 0.430575, 0.324139, 0.148225, -0.200198, -0.767686, -0.0237697, 0.21669, 0.347146, 0.42095, 0.454659, 0.453044, 0.413653, 0.32464, 0.150104, -0.278842, -0.298323, 0.208709, 0.438834, 0.581762, 0.6768, 0.73833, 0.77248, 0.781405, 0.764474, 0.717996, 0.633147, 0.488778, 0.218053, -0.987817, 0.163772, 0.464874, 0.619356, 0.707473, 0.752102, 0.761365, 0.736643, 0.673711, 0.559396, 0.355689, -0.120184, -0.109043, 0.344868, 0.53492, 0.635932, 0.684574, 0.693094, 0.664523, 0.595413, 0.473016, 0.259813, -0.223244, -0.243965, 0.197054, 0.365816, 0.439229, 0.451427, 0.40891, 0.301147, 0.0826847, -0.543966, -0.177074, 0.186476, 0.348526, 0.427023, 0.4492, 0.420601, 0.332577, 0.148991, -0.318528, -0.260666, 0.199295, 0.40269, 0.51884, 0.584848, 0.614424, 0.613212, 0.582704, 0.521069, 0.422107, 0.270775, 0.0250607, -0.531252, -0.43077, -0.0496304, 0.0944848, 0.151211, 0.152902, 0.108299, 0.0141644, -0.149179, -0.45778, -1.76728, -0.439695, -0.170387, -0.0230833, 0.073453, 0.143536, 0.19883, 0.24555, 0.286695, 0.323026, 0.353737, 0.376974, 0.3902, 0.39029, 0.373304, 0.333714, 0.262457, 0.141381, -0.0789088, -0.694321, -0.323017, 0.0630381, 0.253975, 0.370212, 0.442206, 0.481718, 0.493703, 0.479507, 0.43754, 0.362323, 0.240593, 0.0362227, -0.415381, -0.484792, 0.00478426, 0.213508, 0.337393, 0.417143, 0.468277, 0.49817, 0.510516, 0.506807, 0.486745, 0.448035, 0.385379, 0.28757, 0.127776, -0.18773, -0.914459, -0.0254546, 0.249963, 0.411874, 0.5187, 0.589213, 0.630985, 0.646773, 0.636331, 0.596476, 0.519517, 0.387733, 0.150175, -0.518648, -0.100966, 0.248357, 0.404203, 0.477628, 0.49331, 0.453391, 0.341036, 0.0863006, -2.28329, 0.126295, 0.427474, 0.587886, 0.680698, 0.727143, 0.734121, 0.701052, 0.619377, 0.463457, 0.136953, -0.524807, 0.286388, 0.526855, 0.646814, 0.700771, 0.702972, 0.652144, 0.5298, 0.263871, -1.73787, 0.29988, 0.590402, 0.741883, 0.825816, 0.862781, 0.858917, 0.812196, 0.710441, 0.515427, 0.0357375, 0.0919224, 0.540353, 0.732974, 0.836641, 0.886974, 0.895607, 0.864646, 0.788592, 0.648938, 0.38402, -0.61918, 0.273915, 0.573075, 0.714781, 0.784993, 0.807222, 0.789012, 0.73002, 0.62188, 0.439561, 0.0908449, -0.691064, 0.149999, 0.35896, 0.441097, 0.452023, 0.404731, 0.294872, 0.0960808, -0.30001, -0.869957, -0.261986, -0.183717, -0.374101, -0.858772, -0.0137708, 0.294334, 0.479053, 0.597884, 0.670314, 0.704055, 0.700813, 0.657037, 0.560866, 0.378352, -0.0401424, -0.187871, 0.328455, 0.528311, 0.628158, 0.667393, 0.656174, 0.59082, 0.448909, 0.140216, -0.609065, 0.279149, 0.533388, 0.6656, 0.734344, 0.757376, 0.739772, 0.678916, 0.562105, 0.350167, -0.15477, -0.0931506, 0.327722, 0.495336, 0.570491, 0.585999, 0.549023, 0.451917, 0.260922, -0.190655, -0.248092, 0.221556, 0.40403, 0.488869, 0.512449, 0.483331, 0.395251, 0.217882, -0.190304, -0.378987, 0.152185, 0.353022, 0.453252, 0.494811, 0.490671, 0.442693, 0.343447, 0.167611, -0.183348, -0.815564, -0.0574306, 0.162543, 0.267253, 0.312979, 0.319204, 0.29545, 0.248025, 0.182859, 0.107136, 0.0297102, -0.0410456, -0.102861, -0.166559, -0.263669, -0.480971, -2.04343, -0.293733, 0.0727712, 0.305051, 0.473501, 0.600055, 0.694155, 0.760288, 0.800268, 0.813887, 0.798723, 0.748903, 0.651307, 0.471781, 0.0656192, -0.10915, 0.429989, 0.643586, 0.758936, 0.817505, 0.832025, 0.804218, 0.72662, 0.574142, 0.250298, -0.39618, 0.412277, 0.658545, 0.787014, 0.853361, 0.874478, 0.854842, 0.791003, 0.668365, 0.440717, -0.169517, 0.136557, 0.50106, 0.657407, 0.729008, 0.743788, 0.707608, 0.612623, 0.426244, -0.00583808, -0.128137, 0.365569, 0.551121, 0.634769, 0.653469, 0.613747, 0.502896, 0.264676, -0.620186, 0.153081, 0.469437, 0.618058, 0.688741, 0.703754, 0.666363, 0.565167, 0.355816, -0.236349, 0.0790784, 0.457491, 0.626417, 0.710239, 0.73746, 0.714733, 0.63582, 0.473143, 0.107792, -0.249996, 0.372175, 0.591376, 0.702102, 0.751186, 0.752509, 0.707766, 0.608475, 0.426061, 0.0438773, -0.374365, 0.235891, 0.41847, 0.476926, 0.446313, 0.305239, -0.122393, -0.066587, 0.419687, 0.637818, 0.762536, 0.830744, 0.854443, 0.83552, 0.767264, 0.62684, 0.329979, -0.614007, 0.427533, 0.691791, 0.828638, 0.900444, 0.925459, 0.90832, 0.844863, 0.717738, 0.468033, -0.438424, 0.353189, 0.669707, 0.824014, 0.906228, 0.940808, 0.935842, 0.891555, 0.800485, 0.639801, 0.327842, -0.757799, 0.367481, 0.618402, 0.740216, 0.797635, 0.809978, 0.783366, 0.716744, 0.601078, 0.409781, 0.0416835, -0.573681, 0.149751, 0.351817, 0.436623, 0.457334, 0.429439, 0.355664, 0.229388, 0.0280923, -0.327815, -1.64595, -0.438142, -0.268873, -0.255589, -0.34622, -0.556227, -1.00907, -1.52267, -1.23528, -1.36846, -0.553672, -0.19746, 0.0294787, 0.185475, 0.292598, 0.36129, 0.396731, 0.40101, 0.373846, 0.312484, 0.210717, 0.0561646, -0.177543, -0.560916, -1.5029, -1.66038, -0.873368, -0.311314, 0.000849268, 0.206745, 0.34791, 0.441644, 0.495624, 0.512005, 0.487935, 0.412809, 0.256225, -0.107297, -0.403262, 0.208271, 0.440725, 0.568969, 0.638969, 0.665327, 0.651689, 0.594151, 0.477518, 0.253386, -0.387861, 0.00619613, 0.36989, 0.538234, 0.627564, 0.666747, 0.665471, 0.625131, 0.540109, 0.392605, 0.125388, -0.731541, -0.0646857, 0.232675, 0.359225, 0.408707, 0.405201, 0.355401, 0.257165, 0.0990721, -0.149082, -0.587185, -1.6323, -1.03457, -1.21082, -0.384697, -0.0450158, 0.159959, 0.289145, 0.362716, 0.386953, 0.358503, 0.259297, 0.0231891, -1.26263, 0.0372819, 0.353348, 0.519593, 0.613916, 0.657549, 0.655628, 0.602894, 0.477274, 0.194817, -0.726693, 0.324578, 0.605501, 0.761012, 0.854297, 0.905126, 0.920925, 0.903259, 0.848895, 0.747477, 0.571001, 0.21295, -0.311645, 0.38763, 0.607194, 0.712838, 0.755189, 0.748105, 0.691401, 0.570758, 0.334505, -0.397152, 0.135955, 0.470987, 0.623773, 0.697407, 0.717056, 0.688279, 0.604209, 0.43633, 0.0604513, -0.252102, 0.346218, 0.563535, 0.675613, 0.728051, 0.734556, 0.696863, 0.606484, 0.434094, 0.0548493, -0.256875, 0.340046, 0.558536, 0.673776, 0.731951, 0.747965, 0.725976, 0.663107, 0.546782, 0.33852, -0.1542, -0.103376, 0.335867, 0.52274, 0.623886, 0.675923, 0.692282, 0.67834, 0.635197, 0.560287, 0.445716, 0.271535, -0.0255723, -1.09996, -0.174516, 0.102732, 0.22916, 0.290053, 0.31004, 0.298765, 0.259525, 0.191102, 0.0863541, -0.0750315, -0.362216, -1.92681, -0.380022, -0.0731267, 0.102748, 0.224317, 0.314882, 0.384305, 0.437378, 0.476531, 0.502926, 0.516951, 0.518435, 0.506702, 0.480478, 0.437626, 0.374533, 0.284711, 0.155059, -0.0471287, -0.454566, -0.723851, -0.152514, 0.07076, 0.202323, 0.287918, 0.343908, 0.377528, 0.39196, 0.387954, 0.364228, 0.317043, 0.238493, 0.111162, -0.113669, -0.726382, -0.371493, 0.0143587, 0.203554, 0.317311, 0.385447, 0.418577, 0.41983, 0.38742, 0.313564, 0.17774, -0.086351, -1.27309, -0.136801, 0.164551, 0.316263, 0.398299, 0.432547, 0.425227, 0.373857, 0.265, 0.0560702, -0.487048, -0.291484, 0.107958, 0.278603, 0.359141, 0.377949, 0.337378, 0.217686, -0.0695655, -0.80851, 0.107306, 0.382921, 0.537316, 0.629925, 0.67949, 0.692671, 0.6699, 0.605642, 0.483586, 0.253733, -0.410048, 0.017383, 0.373255, 0.53744, 0.622055, 0.654039, 0.640219, 0.575983, 0.439539, 0.147021, -0.780998, 0.260369, 0.53448, 0.684592, 0.774082, 0.823071, 0.839565, 0.826124, 0.781423, 0.69937, 0.564335, 0.330853, -0.260956, -0.00155576, 0.377538, 0.547871, 0.640577, 0.687743, 0.701622, 0.687318, 0.646142, 0.576261, 0.471574, 0.317111, 0.0703383, -0.495048, -0.348762, 0.0401754, 0.206789, 0.297004, 0.345595, 0.366273, 0.365457, 0.345999, 0.308307, 0.250357, 0.166654, 0.0448989, -0.145847, -0.525253, -0.904101, -0.270592, -0.0380582, 0.0944537, 0.175168, 0.2204, 0.236826, 0.226897, 0.190516, 0.125417, 0.0267166, -0.114573, -0.315303, -0.610325, -1.08248, -1.7452, -1.21026, -0.675951, -0.347263, -0.125452, 0.0302933, 0.13883, 0.209668, 0.247447, 0.253601, 0.226654, 0.161275, 0.0447781, -0.155735, -0.573146, -0.875578, -0.345705, -0.191819, -0.168444, -0.263204, -0.598911, -0.757899, -0.162059, 0.0907256, 0.241188, 0.334027, 0.384993, 0.400254, 0.380993, 0.324144, 0.22048, 0.0466323, -0.274625, -1.88389, -0.34465, -0.13581, -0.087816, -0.154227, -0.392483, -1.64518, -0.291622, -0.0112562, 0.121762, 0.169335, 0.137211, -0.0113695, -0.542166, -0.187773, 0.2444, 0.46592, 0.604656, 0.692011, 0.739241, 0.74947, 0.719936, 0.639558, 0.476135, 0.0915699, -0.109506, 0.457701, 0.685458, 0.814043, 0.88672, 0.917576, 0.9104, 0.862068, 0.759752, 0.564522, 0.0809273, 0.154464, 0.601318, 0.796701, 0.904565, 0.960462, 0.976476, 0.955783, 0.895362, 0.783578, 0.58678, 0.157687, -0.0182635, 0.490946, 0.679049, 0.766727, 0.793508, 0.769187, 0.689102, 0.527757, 0.17683, -0.291557, 0.38991, 0.61548, 0.729067, 0.781026, 0.786582, 0.748799, 0.661792, 0.504517, 0.202369, -1.53262, 0.173497, 0.420538, 0.523727, 0.549789, 0.511698, 0.397905, 0.147269, -0.994904, 0.0957423, 0.394022, 0.537411, 0.606723, 0.623381, 0.591894, 0.505187, 0.335364, -0.0361343, -0.405932, 0.212381, 0.425563, 0.530433, 0.574259, 0.571538, 0.52523, 0.429985, 0.267218, -0.0238206, -0.99316, -0.238482, 0.00421937, 0.0611186, -0.000504023, -0.228015, -2.44656, -0.177188, 0.114499, 0.254417, 0.313128, 0.305054, 0.219663, -0.00266749, -1.06832, -0.01259, 0.313114, 0.482653, 0.578765, 0.624054, 0.62479, 0.577633, 0.465733, 0.23049, -0.664275, 0.145113, 0.476095, 0.645927, 0.74527, 0.799601, 0.818745, 0.806149, 0.761185, 0.67879, 0.545868, 0.326702, -0.137868, -0.266192, 0.19966, 0.36643, 0.436229, 0.447588, 0.411663, 0.328153, 0.185325, -0.0557194, -0.594982, -0.556676, -0.172204, -0.037936, 0.00910565, 0.00984117, -0.0119087, -0.0321623, -0.0256215, 0.0227348, 0.106662, 0.20606, 0.301923, 0.382126, 0.439774, 0.470114, 0.467803, 0.423652, 0.317137, 0.0848761, -0.916537, 0.0512405, 0.382407, 0.557699, 0.662096, 0.71924, 0.737179, 0.716581, 0.651299, 0.52267, 0.270098, -0.670106, 0.160526, 0.469005, 0.614181, 0.682922, 0.696549, 0.657401, 0.552187, 0.329362, -0.39931, 0.162824, 0.507839, 0.671529, 0.755935, 0.786152, 0.767868, 0.694619, 0.539283, 0.187259, -0.207438, 0.44512, 0.674279, 0.79317, 0.849529, 0.856739, 0.814668, 0.709396, 0.490667, -0.198631, 0.307729, 0.666489, 0.841271, 0.939683, 0.989557, 1.00068, 0.975172, 0.909134, 0.789477, 0.577874, 0.0880886, 0.102213, 0.537737, 0.709895, 0.789456, 0.811091, 0.783863, 0.704231, 0.551842, 0.249771, -1.0808, 0.25676, 0.505981, 0.617297, 0.656734, 0.641031, 0.569875, 0.425836, 0.141806, -1.26768, 0.0611422, 0.316275, 0.413231, 0.4221, 0.348525, 0.150752, -0.509304, -0.0311892, 0.328513, 0.493655, 0.572492, 0.589061, 0.543893, 0.414303, 0.0960162, -0.379201, 0.347819, 0.600676, 0.740423, 0.819078, 0.853085, 0.847255, 0.799143, 0.696754, 0.503475, 0.044299, 0.0266489, 0.492865, 0.684278, 0.782784, 0.825183, 0.822567, 0.775159, 0.672565, 0.480283, 0.0363799, -0.0461349, 0.437538, 0.628694, 0.724589, 0.76388, 0.758559, 0.710034, 0.61067, 0.435446, 0.0898485, -0.632061, 0.176257, 0.386698, 0.469154, 0.474841, 0.408465, 0.239417, -0.216513, -0.159307, 0.305724, 0.510181, 0.624818, 0.686717, 0.70912, 0.696646, 0.648718, 0.559024, 0.409986, 0.146786, -0.645165, -0.0668152, 0.247561, 0.389325, 0.459136, 0.484564, 0.476718, 0.44058, 0.377914, 0.287903, 0.166195, 0.000789214, -0.244439, -0.7533, -0.736251, -0.279809, -0.0629302, 0.0853486, 0.20011, 0.292324, 0.36514, 0.418471, 0.450458, 0.45757, 0.433556, 0.366181, 0.226099, -0.0957382, -0.552566, 0.175318, 0.440749, 0.597551, 0.697582, 0.758046, 0.785596, 0.781755, 0.743908, 0.663595, 0.519007, 0.238123, -1.72598, 0.226092, 0.508444, 0.649974, 0.724074, 0.751545, 0.738528, 0.683003, 0.572971, 0.371131, -0.104456, -0.0974157, 0.353141, 0.537646, 0.631307, 0.670745, 0.668054, 0.626031, 0.540917, 0.399685, 0.165275, -0.329744, -0.45297, -0.0453902, 0.047721, -0.00850893, -0.283457, -0.706755, 0.0298706, 0.297578, 0.44878, 0.535923, 0.575892, 0.573689, 0.526677, 0.421824, 0.218075, -0.303666, -0.153605, 0.259133, 0.435313, 0.522479, 0.552601, 0.534085, 0.46328, 0.32017, 0.0301457, -1.56684, 0.0319664, 0.290454, 0.406624, 0.447487, 0.427808, 0.341257, 0.149089, -0.376943, -0.184091, 0.225684, 0.403698, 0.491631, 0.519977, 0.495092, 0.408392, 0.22312, -0.254438, -0.182761, 0.261249, 0.448119, 0.540866, 0.572199, 0.548175, 0.45754, 0.251544, -0.423118, 0.0872097, 0.456224, 0.640273, 0.747597, 0.806202, 0.825918, 0.808759, 0.750428, 0.636488, 0.422994, -0.137469, 0.100968, 0.497999, 0.677922, 0.77579, 0.82319, 0.830592, 0.799582, 0.72419, 0.584844, 0.314785, -0.972843, 0.272091, 0.569862, 0.723128, 0.81143, 0.858353, 0.873359, 0.860154, 0.818946, 0.746541, 0.634396, 0.461394, 0.159813, -1.15269, 0.0563586, 0.32461, 0.447651, 0.504312, 0.517068, 0.493628, 0.434628, 0.334175, 0.174516, -0.100817, -0.942748, -0.31077, -0.0113103, 0.118225, 0.172883, 0.176121, 0.132321, 0.0325468, -0.158478, -0.617829, -0.615521, -0.14528, 0.0569064, 0.170454, 0.232876, 0.256999, 0.246606, 0.199614, 0.106553, -0.0590324, -0.395549, -1.03251, -0.246425, -0.0108896, 0.10597, 0.157483, 0.157037, 0.101782, -0.0314497, -0.340368, -0.922864, -0.124561, 0.140739, 0.292241, 0.385671, 0.439525, 0.461371, 0.453839, 0.416191, 0.343959, 0.22614, 0.0347562, -0.333408, -0.927399, -0.212677, -0.00879309, 0.0772938, 0.0968169, 0.0624763, -0.0289648, -0.200756, -0.548644, -1.22193, -0.447018, -0.237753, -0.150442, -0.128447, -0.151499, -0.205539, -0.269704, -0.306314, -0.271541, -0.15861, -0.00499166, 0.151383, 0.291437, 0.408645, 0.501589, 0.570276, 0.614585, 0.63346, 0.624109, 0.580481, 0.489265, 0.315629, -0.0911773, -0.21801, 0.317005, 0.541709, 0.672538, 0.751059, 0.791697, 0.799742, 0.7755, 0.714511, 0.604251, 0.410044, -0.0209533, -0.156182, 0.350928, 0.550845, 0.655641, 0.705697, 0.713945, 0.68307, 0.608041, 0.47116, 0.213859, -0.680464, 0.0781701, 0.391323, 0.542197, 0.622301, 0.656822, 0.654905, 0.618776, 0.545442, 0.4245, 0.22739, -0.156247, -0.652422, -0.00166789, 0.194551, 0.277661, 0.295951, 0.260864, 0.166871, -0.0174504, -0.447401, -0.548831, -0.045222, 0.161198, 0.276338, 0.341617, 0.372292, 0.375024, 0.352296, 0.303544, 0.224649, 0.105108, -0.0822255, -0.437444, -1.06028, -0.297483, -0.0646835, 0.0554508, 0.115865, 0.130545, 0.098674, 0.00399541, -0.213537, -1.1479, -0.228504, 0.127144, 0.328314, 0.4627, 0.555406, 0.616448, 0.649909, 0.656475, 0.633823, 0.575358, 0.46544, 0.260048, -0.279452, -0.0575856, 0.358287, 0.554388, 0.67005, 0.738133, 0.770692, 0.772183, 0.742724, 0.678246, 0.567798, 0.382716, 0.0141179, -0.489215, 0.187625, 0.40041, 0.501179, 0.540193, 0.53205, 0.478685, 0.371787, 0.183079, -0.20294, -0.633059, -0.0183665, 0.169374, 0.241622, 0.243477, 0.183522, 0.0509932, -0.201063, -0.870655, -0.576703, -0.31179, -0.322867, -0.693084, -0.496614, 0.0169285, 0.273879, 0.436279, 0.541501, 0.603339, 0.626643, 0.610525, 0.547273, 0.414571, 0.134561, -1.17529, 0.190757, 0.467505, 0.608505, 0.680496, 0.701513, 0.673957, 0.587505, 0.404106, -0.0761311, 0.0261113, 0.474345, 0.674182, 0.785687, 0.843777, 0.859987, 0.836525, 0.768254, 0.637826, 0.389071, -0.426056, 0.222011, 0.539782, 0.684199, 0.750215, 0.760715, 0.718839, 0.61248, 0.394432, -0.249909, 0.15855, 0.518943, 0.682336, 0.762651, 0.786287, 0.758155, 0.668449, 0.477135, -0.0426165, 0.150616, 0.571927, 0.764369, 0.871948, 0.927764, 0.943097, 0.920482, 0.855794, 0.734532, 0.512178, -0.0658445, 0.183705, 0.566527, 0.734539, 0.819831, 0.853289, 0.844747, 0.794771, 0.695209, 0.520079, 0.168855, -0.431922, 0.312261, 0.535404, 0.644103, 0.692955, 0.699702, 0.67112, 0.608895, 0.511117, 0.371934, 0.179242, -0.0922168, -0.504768, -1.29207, -1.86624, -0.804197, -0.384658, -0.156408, -0.0318609, 0.0154625, -0.0132541, -0.147609, -0.558003, -0.538887, -0.0392796, 0.178462, 0.29685, 0.351753, 0.351422, 0.288472, 0.127745, -0.315245, -0.254735, 0.224568, 0.441286, 0.567499, 0.640109, 0.671953, 0.666972, 0.623335, 0.531967, 0.367294, 0.0351153, -0.68069, 0.152554, 0.38656, 0.499521, 0.548084, 0.548847, 0.505436, 0.41267, 0.251757, -0.0394645, -1.058, -0.234629, 0.00475699, 0.0586556, -0.0134721, -0.290557, -0.786123, -0.0150641, 0.251781, 0.399778, 0.48288, 0.518112, 0.510284, 0.456282, 0.341862, 0.121517, -0.474912, -0.184898, 0.184268, 0.340593, 0.409307, 0.417789, 0.370068, 0.25318, 0.0144203, -0.761435, -0.169239, 0.148498, 0.284543, 0.336108, 0.324688, 0.249245, 0.0853354, -0.275204, -0.770876, -0.118356, 0.0541983, 0.0779811, -0.0438779, -0.59729, -0.149728, 0.275131, 0.497162, 0.635939, 0.721927, 0.766085, 0.771138, 0.733408, 0.639325, 0.447511, -0.0620493, 0.105254, 0.533152, 0.726637, 0.833244, 0.885666, 0.893757, 0.857026, 0.764091, 0.577331, 0.107509, 0.162593, 0.619638, 0.818675, 0.928193, 0.984005, 0.997756, 0.971448, 0.899256, 0.761634, 0.4919, -0.783066, 0.441555, 0.733126, 0.876664, 0.95101, 0.978337, 0.965715, 0.912483, 0.809787, 0.631162, 0.27597, -0.337996, 0.401699, 0.612393, 0.702359, 0.722642, 0.683775, 0.576135, 0.352205, -0.328118, 0.131511, 0.477539, 0.632141, 0.704301, 0.719824, 0.683768, 0.587293, 0.394595, -0.076582, -0.0616199, 0.387354, 0.568064, 0.653624, 0.678459, 0.650291, 0.561759, 0.37918, -0.0655985, -0.104549, 0.373518, 0.568745, 0.669714, 0.714551, 0.715625, 0.675429, 0.589004, 0.43951, 0.173796, -0.583421, -0.0994852, 0.192149, 0.288542, 0.284579, 0.183406, -0.0899001, -0.988724, 0.0364314, 0.300947, 0.432423, 0.49164, 0.49393, 0.437077, 0.297555, -0.0269043, -0.549406, 0.188524, 0.430886, 0.556851, 0.618379, 0.630256, 0.593582, 0.496879, 0.29909, -0.229382, -0.0346593, 0.378979, 0.564499, 0.664385, 0.710967, 0.71438, 0.674926, 0.583213, 0.408473, 0.0171351, -0.224055, 0.343959, 0.563256, 0.684382, 0.752515, 0.783693, 0.784762, 0.758288, 0.703923, 0.618179, 0.492314, 0.304809, -0.0144559, -1.63537, -0.113828, 0.142418, 0.262853, 0.325539, 0.355671, 0.365243, 0.361017, 0.346676, 0.323238, 0.288805, 0.237754, 0.158505, 0.0258007, -0.237985, -1.96092, -0.159187, 0.15794, 0.342638, 0.465573, 0.548091, 0.598658, 0.620421, 0.613263, 0.573858, 0.493855, 0.353319, 0.0912646, -0.838622, -0.0437034, 0.256609, 0.391024, 0.445999, 0.440372, 0.370304, 0.20263, -0.239767, -0.218575, 0.259624, 0.466539, 0.580024, 0.636514, 0.646894, 0.610903, 0.516736, 0.324401, -0.180148, -0.0339269, 0.395772, 0.587413, 0.691842, 0.742429, 0.749619, 0.713945, 0.626539, 0.458633, 0.091703, -0.278599, 0.349187, 0.570257, 0.683554, 0.736067, 0.741458, 0.700729, 0.603289, 0.412251, -0.0583082, -0.0202735, 0.436379, 0.632887, 0.740828, 0.797102, 0.814786, 0.798447, 0.747687, 0.656936, 0.511187, 0.267267, -0.305043, -0.158387, 0.209551, 0.346205, 0.392773, 0.379065, 0.310785, 0.178935, -0.052075, -0.553415, -0.657745, -0.266705, -0.191297, -0.282159, -0.686571, -0.609418, -0.124653, 0.0844785, 0.189145, 0.22116, 0.18007, 0.0299124, -0.457376, -0.218111, 0.233148, 0.45691, 0.596345, 0.685436, 0.736941, 0.755856, 0.742763, 0.694054, 0.599353, 0.431129, 0.0859785, -0.471558, 0.263976, 0.497953, 0.61887, 0.679743, 0.696903, 0.67476, 0.610125, 0.489267, 0.269398, -0.285631, -0.0905685, 0.30253, 0.471347, 0.555172, 0.585306, 0.57067, 0.509291, 0.38603, 0.148416, -0.594308, -0.0363597, 0.303354, 0.466235, 0.55524, 0.597557, 0.602954, 0.573839, 0.507101, 0.391685, 0.196509, -0.206139, -0.522704, 0.0467209, 0.242743, 0.333025, 0.360418, 0.334159, 0.245685, 0.0537508, -0.492389, -0.21826, 0.197364, 0.399999, 0.52361, 0.600708, 0.643504, 0.656716, 0.640796, 0.592138, 0.500626, 0.339839, 0.0133817, -0.651041, 0.173052, 0.427369, 0.567085, 0.648751, 0.6902, 0.697585, 0.670913, 0.604082, 0.479491, 0.241802, -0.535256, 0.0936812, 0.437826, 0.612456, 0.716767, 0.777771, 0.805958, 0.805413, 0.776501, 0.716107, 0.615792, 0.454771, 0.167095, -1.01084, 0.0647859, 0.345513, 0.476979, 0.540422, 0.558875, 0.540538, 0.486997, 0.394715, 0.252844, 0.0329058, -0.370041, -0.993229, -0.336476, -0.200343, -0.211213, -0.354997, -0.805198, -0.739604, -0.290007, -0.10896, -0.0304159, -0.0232319, -0.0869713, -0.251615, -0.678798, -0.740793, -0.25798, -0.0758563, -0.00455519, -0.0171495, -0.133654, -0.501406, -0.569185, -0.0138548, 0.233945, 0.385171, 0.48168, 0.538543, 0.561833, 0.552946, 0.509341, 0.422865, 0.272746, -0.00762009, -1.21945, -0.095806, 0.181593, 0.305448, 0.353771, 0.344941, 0.277547, 0.128378, -0.203941, -0.748094, -0.0104619, 0.224615, 0.343009, 0.396903, 0.401011, 0.356261, 0.250872, 0.0430375, -0.503085, -0.301151, 0.0951947, 0.263808, 0.342696, 0.360672, 0.32116, 0.207475, -0.0530582, -1.60149, 0.0159889, 0.314377, 0.478387, 0.578984, 0.638155, 0.664812, 0.66225, 0.630043, 0.563618, 0.450858, 0.258639, -0.155104, -0.348908, 0.193106, 0.410871, 0.537088, 0.615728, 0.662915, 0.686001, 0.688408, 0.671173, 0.633279, 0.571128, 0.476632, 0.331159, 0.0798371, -0.674093, -0.107646, 0.236636, 0.409282, 0.512028, 0.571374, 0.59651, 0.58928, 0.54589, 0.4541, 0.279271, -0.132363, -0.239422, 0.28918, 0.514357, 0.646974, 0.728065, 0.771955, 0.783998, 0.764766, 0.7105, 0.610595, 0.437177, 0.0858622, -0.466572, 0.256371, 0.48253, 0.594144, 0.64286, 0.643072, 0.595468, 0.488038, 0.278527, -0.273292, -0.0570727, 0.338687, 0.510818, 0.596368, 0.625917, 0.60744, 0.537062, 0.394499, 0.104179, -1.36753, 0.116698, 0.375805, 0.493762, 0.536544, 0.518221, 0.430868, 0.229309, -0.399995, 0.0236032, 0.399153, 0.579065, 0.678542, 0.726158, 0.731064, 0.69339, 0.604282, 0.435645, 0.0740338, -0.351628, 0.301078, 0.521693, 0.632377, 0.682074, 0.685732, 0.646595, 0.559713, 0.407483, 0.133262, -0.706154, -0.107235, 0.161187, 0.236317, 0.195539, 0.00343923, -0.935105, -0.00578265, 0.33244, 0.506537, 0.603296, 0.645833, 0.639753, 0.579365, 0.44022, 0.124044, -0.471672, 0.31618, 0.565229, 0.695335, 0.760245, 0.774855, 0.739724, 0.641607, 0.432153, -0.216137, 0.234196, 0.606204, 0.787556, 0.890959, 0.94494, 0.959295, 0.935728, 0.869227, 0.743457, 0.506956, -0.194705, 0.288655 - }; + 0.988866, 0.923321, 0.796169, 0.552812, -0.228667, 0.380953, 0.710421, 0.866311, 0.947623, 0.980376, 0.973251, 0.926985, 0.835106, 0.677813, 0.389346, -0.810871, 0.277113, 0.543406, 0.654344, 0.687975, 0.661841, 0.572249, 0.38824, -0.0459764, -0.153662, 0.33524, 0.520558, 0.605334, 0.62718, 0.594652, 0.500673, 0.311747, -0.138819, -0.195277, 0.273593, 0.454454, 0.536435, 0.555405, 0.518897, 0.418083, 0.213557, -0.317297, -0.158101, 0.242449, 0.406203, 0.477194, 0.484791, 0.432084, 0.300955, 0.0115596, -1.02152, 0.0909369, 0.352873, 0.48311, 0.545638, 0.559061, 0.52816, 0.44906, 0.305682, 0.0464828, -0.676684, -0.248297, 0.044895, 0.130277, 0.0983698, -0.0795419, -0.859831, -0.130451, 0.227692, 0.412075, 0.518453, 0.572519, 0.582442, 0.547394, 0.456365, 0.273652, -0.172291, -0.195781, 0.283082, 0.483232, 0.590239, 0.641723, 0.649597, 0.615475, 0.532126, 0.375237, 0.0522372, -0.671081, 0.184882, 0.433566, 0.564925, 0.637945, 0.672335, 0.676843, 0.655821, 0.611441, 0.544599, 0.455332, 0.342939, 0.205765, 0.0400004, -0.164992, -0.447342, -1.05874, -0.787393, -0.362521, -0.120762, 0.0607629, 0.206808, 0.324609, 0.416572, 0.483268, 0.524041, 0.536739, 0.516699, 0.454101, 0.325605, 0.0541063, -1.40419, 0.115043, 0.404999, 0.559302, 0.646613, 0.686474, 0.684017, 0.635468, 0.524227, 0.294458, -0.507368, 0.172121, 0.512419, 0.683106, 0.78027, 0.829613, 0.83996, 0.812532, 0.741982, 0.611669, 0.369707, -0.34111, 0.139418, 0.473117, 0.619256, 0.683341, 0.689327, 0.639279, 0.516641, 0.253138, -1.43029, 0.251579, 0.540928, 0.685434, 0.75944, 0.783389, 0.762063, 0.689974, 0.544898, 0.24314, -0.718698, 0.325822, 0.583122, 0.711735, 0.77378, 0.786684, 0.75332, 0.665256, 0.491599, 0.0941435, -0.11275, 0.438658, 0.652879, 0.76836, 0.82864, 0.848476, 0.83292, 0.781483, 0.687825, 0.534401, 0.267195, -0.505602, 0.0203608, 0.325702, 0.450426, 0.496001, 0.487462, 0.431128, 0.323124, 0.146531, -0.151593, -0.9114, -0.579143, -0.395513, -0.552422, -1.1123, -0.214036, 0.0918722, 0.267565, 0.372576, 0.425845, 0.432834, 0.389966, 0.280073, 0.0431401, -0.900978, -0.0315463, 0.289353, 0.44848, 0.532689, 0.564457, 0.548566, 0.477835, 0.323347, -0.0419001, -0.313525, 0.290713, 0.526518, 0.6611, 0.740722, 0.781272, 0.788849, 0.764501, 0.704842, 0.599639, 0.421551, 0.068048, -0.511078, 0.223545, 0.450018, 0.56357, 0.617642, 0.628775, 0.601621, 0.533386, 0.411235, 0.195415, -0.319365, -0.224608, 0.196829, 0.376882, 0.472743, 0.519675, 0.530425, 0.509625, 0.457221, 0.368453, 0.230383, 0.00738835, -0.459064, -0.593805, -0.128711, 0.0347655, 0.0974129, 0.0928215, 0.0202096, -0.157409, -0.675055, -0.43369, -0.00110718, 0.210814, 0.341869, 0.425199, 0.472892, 0.489109, 0.473096, 0.418616, 0.308685, 0.091529, -0.58704, -0.0782956, 0.295791, 0.489085, 0.61006, 0.687247, 0.731628, 0.747528, 0.735505, 0.6927, 0.611166, 0.471478, 0.213859, -0.68221, 0.0842244, 0.400826, 0.555633, 0.639315, 0.676135, 0.67376, 0.631626, 0.540461, 0.371687, 0.00946485, -0.384845, 0.262816, 0.494344, 0.621281, 0.693063, 0.726475, 0.728234, 0.700243, 0.640793, 0.543596, 0.393174, 0.14571, -0.434874, -0.268156, 0.0999249, 0.243545, 0.302501, 0.308737, 0.272743, 0.196422, 0.0753765, -0.103756, -0.376891, -0.893055, -1.19187, -0.818492, -0.828139, -1.07822, -2.47068, -1.16719, -1.16227, -1.56694, -0.622445, -0.246471, -0.00202911, 0.173116, 0.301622, 0.394227, 0.456477, 0.49097, 0.498105, 0.475976, 0.419268, 0.315758, 0.13377, -0.254593, -0.55597, 0.0305629, 0.246093, 0.36001, 0.418233, 0.436116, 0.419085, 0.367283, 0.275947, 0.132326, -0.0973357, -0.550746, -0.855804, -0.379286, -0.27998, -0.344373, -0.673791, -0.776708, -0.193392, 0.0623266, 0.217637, 0.316811, 0.376052, 0.40224, 0.397554, 0.360462, 0.284558, 0.153326, -0.0823866, -0.73301, -0.344469, 0.0149308, 0.181291, 0.270715, 0.311762, 0.313443, 0.275533, 0.188104, 0.0188928, -0.376836, -0.526133, 0.0291174, 0.267586, 0.41492, 0.514167, 0.58085, 0.621673, 0.639248, 0.633494, 0.601658, 0.536951, 0.423931, 0.220262, -0.29132, -0.137888, 0.296154, 0.498173, 0.618056, 0.689597, 0.724529, 0.726255, 0.692672, 0.61467, 0.467092, 0.158606, -0.598178, 0.305852, 0.571772, 0.71901, 0.806796, 0.853857, 0.867112, 0.847729, 0.791993, 0.688595, 0.506555, 0.119856, -0.196342, 0.395546, 0.610211, 0.722077, 0.777031, 0.789773, 0.764371, 0.69813, 0.579527, 0.375085, -0.0602425, -0.264431, 0.235953, 0.405031, 0.465665, 0.452215, 0.360812, 0.139897, -0.69843, 0.0423793, 0.375347, 0.53924, 0.627049, 0.663323, 0.655198, 0.600376, 0.48468, 0.26131, -0.360356, -0.0170412, 0.345034, 0.502468, 0.574647, 0.588232, 0.547209, 0.438861, 0.211296, -0.538578, 0.0477759, 0.386494, 0.546847, 0.629609, 0.66061, 0.647538, 0.588823, 0.472214, 0.258796, -0.247594, -0.19995, 0.212851, 0.36575, 0.418144, 0.397066, 0.294633, 0.0482991, -1.31677, 0.0401084, 0.335496, 0.478842, 0.54609, 0.556002, 0.508486, 0.384189, 0.102937, -0.93628, 0.196461, 0.466938, 0.604737, 0.673208, 0.689321, 0.654189, 0.554285, 0.338777, -0.365306, 0.176041, 0.53387, 0.709968, 0.809356, 0.859087, 0.868044, 0.836654, 0.757142, 0.605022, 0.288495, -0.452395, 0.424595, 0.678722, 0.813938, 0.889122, 0.923107, 0.923075, 0.890673, 0.823145, 0.71149, 0.532211, 0.204837, -1.00171, 0.192998, 0.426609, 0.527578, 0.561098, 0.545281, 0.483566, 0.368874, 0.175222, -0.201045, -0.774008, -0.0852366, 0.109032, 0.188734, 0.207699, 0.18493, 0.130847, 0.0554264, -0.0262751, -0.0906781, -0.111992, -0.0816489, -0.0169373, 0.0556801, 0.116312, 0.153217, 0.158548, 0.123729, 0.0332856, -0.152866, -0.627338, -0.571464, -0.129341, 0.0479974, 0.123354, 0.124104, 0.0420744, -0.187784, -1.95511, -0.127877, 0.184855, 0.351328, 0.445627, 0.488229, 0.483858, 0.426653, 0.292946, -0.00949194, -0.718271, 0.153935, 0.412879, 0.549072, 0.619407, 0.639846, 0.612117, 0.525674, 0.342633, -0.133671, -0.0452387, 0.404874, 0.602897, 0.710979, 0.76372, 0.771589, 0.734435, 0.641231, 0.455222, -0.00578268, 0.019732, 0.485133, 0.685907, 0.797068, 0.855781, 0.875039, 0.859148, 0.807188, 0.712499, 0.557255, 0.287291, -0.484731, 0.0241008, 0.318784, 0.425935, 0.443609, 0.388322, 0.243934, -0.0821577, -0.741384, 0.0475199, 0.262636, 0.345293, 0.342695, 0.250641, 0.000144689, -1.38829, 0.0802109, 0.365883, 0.509492, 0.578009, 0.587519, 0.53475, 0.391193, 0.0190996, -0.157859, 0.412331, 0.645356, 0.777623, 0.852183, 0.883007, 0.873552, 0.819836, 0.706589, 0.485226, -0.155899, 0.244431, 0.608422, 0.776367, 0.863565, 0.897761, 0.886612, 0.827206, 0.70284, 0.455311, -0.435688, 0.334092, 0.649412, 0.799559, 0.874814, 0.898574, 0.876665, 0.80431, 0.660573, 0.367875, -0.911702, 0.403429, 0.66702, 0.795734, 0.856186, 0.866854, 0.831237, 0.74194, 0.571533, 0.206694, -0.221324, 0.424799, 0.637849, 0.738211, 0.772946, 0.753201, 0.673319, 0.501854, 0.0844976, -0.0146419, 0.497956, 0.708454, 0.823914, 0.885016, 0.90574, 0.890711, 0.838913, 0.742902, 0.581885, 0.286667, -1.1983, 0.211666, 0.47728, 0.597755, 0.649446, 0.654055, 0.618632, 0.542888, 0.419222, 0.225536, -0.113787, -1.80446, -0.213402, -0.00391323, 0.064896, 0.0648506, 0.0221239, -0.0418574, -0.0961144, -0.100704, -0.0353212, 0.0788597, 0.205672, 0.321164, 0.414668, 0.482147, 0.521619, 0.530706, 0.504718, 0.433449, 0.291655, -0.00933235, -0.842856, 0.116865, 0.381123, 0.52147, 0.598363, 0.630081, 0.622148, 0.572736, 0.471073, 0.284793, -0.126384, -0.337568, 0.197061, 0.395704, 0.493192, 0.531362, 0.522432, 0.466678, 0.352828, 0.14256, -0.36113, -0.300064, 0.122019, 0.291706, 0.371347, 0.396223, 0.378477, 0.322036, 0.226666, 0.0900369, -0.0877367, -0.285815, -0.414309, -0.3517, -0.159524, 0.0391227, 0.201753, 0.323932, 0.408818, 0.459343, 0.47651, 0.458628, 0.399784, 0.285231, 0.0733975, -0.448158, -0.335368, 0.0702806, 0.230329, 0.294422, 0.290685, 0.217737, 0.0423897, -0.421262, -0.373623, 0.0770283, 0.261102, 0.346011, 0.363085, 0.313735, 0.171909, -0.193711, -0.415697, 0.16566, 0.391438, 0.510697, 0.565593, 0.56629, 0.50707, 0.357313, -0.0299727, -0.152427, 0.39495, 0.625877, 0.759444, 0.837287, 0.873285, 0.871385, 0.828925, 0.734251, 0.552602, 0.125342, 0.0366663, 0.541807, 0.750352, 0.864974, 0.925444, 0.944957, 0.927014, 0.868489, 0.756956, 0.555367, 0.0868299, 0.0709546, 0.529379, 0.715882, 0.810565, 0.850096, 0.845673, 0.797857, 0.697148, 0.512149, 0.104953, -0.116693, 0.426879, 0.631794, 0.737908, 0.788805, 0.799222, 0.774229, 0.713488, 0.611222, 0.451873, 0.190791, -0.413967, -0.256543, 0.0744218, 0.168663, 0.152493, 0.0288863, -0.305567, -0.691416, -0.0365982, 0.190049, 0.302207, 0.347586, 0.338663, 0.272519, 0.126289, -0.195779, -0.832164, -0.0334424, 0.207272, 0.328238, 0.384548, 0.392213, 0.353807, 0.261187, 0.0850868, -0.300248, -0.60895, -0.0227939, 0.187682, 0.294461, 0.343715, 0.350799, 0.32098, 0.254051, 0.144592, -0.0214414, -0.281008, -0.788874, -1.04159, -0.672017, -0.704123, -1.23498, -0.753515, -0.332731, -0.120019, 0.00341224, 0.067296, 0.079922, 0.0370335, -0.0851075, -0.386191, -0.923822, -0.136207, 0.139076, 0.30283, 0.41039, 0.480665, 0.521946, 0.537935, 0.529577, 0.495377, 0.430575, 0.324139, 0.148225, -0.200198, -0.767686, -0.0237697, 0.21669, 0.347146, 0.42095, 0.454659, 0.453044, 0.413653, 0.32464, 0.150104, -0.278842, -0.298323, 0.208709, 0.438834, 0.581762, 0.6768, 0.73833, 0.77248, 0.781405, 0.764474, 0.717996, 0.633147, 0.488778, 0.218053, -0.987817, 0.163772, 0.464874, 0.619356, 0.707473, 0.752102, 0.761365, 0.736643, 0.673711, 0.559396, 0.355689, -0.120184, -0.109043, 0.344868, 0.53492, 0.635932, 0.684574, 0.693094, 0.664523, 0.595413, 0.473016, 0.259813, -0.223244, -0.243965, 0.197054, 0.365816, 0.439229, 0.451427, 0.40891, 0.301147, 0.0826847, -0.543966, -0.177074, 0.186476, 0.348526, 0.427023, 0.4492, 0.420601, 0.332577, 0.148991, -0.318528, -0.260666, 0.199295, 0.40269, 0.51884, 0.584848, 0.614424, 0.613212, 0.582704, 0.521069, 0.422107, 0.270775, 0.0250607, -0.531252, -0.43077, -0.0496304, 0.0944848, 0.151211, 0.152902, 0.108299, 0.0141644, -0.149179, -0.45778, -1.76728, -0.439695, -0.170387, -0.0230833, 0.073453, 0.143536, 0.19883, 0.24555, 0.286695, 0.323026, 0.353737, 0.376974, 0.3902, 0.39029, 0.373304, 0.333714, 0.262457, 0.141381, -0.0789088, -0.694321, -0.323017, 0.0630381, 0.253975, 0.370212, 0.442206, 0.481718, 0.493703, 0.479507, 0.43754, 0.362323, 0.240593, 0.0362227, -0.415381, -0.484792, 0.00478426, 0.213508, 0.337393, 0.417143, 0.468277, 0.49817, 0.510516, 0.506807, 0.486745, 0.448035, 0.385379, 0.28757, 0.127776, -0.18773, -0.914459, -0.0254546, 0.249963, 0.411874, 0.5187, 0.589213, 0.630985, 0.646773, 0.636331, 0.596476, 0.519517, 0.387733, 0.150175, -0.518648, -0.100966, 0.248357, 0.404203, 0.477628, 0.49331, 0.453391, 0.341036, 0.0863006, -2.28329, 0.126295, 0.427474, 0.587886, 0.680698, 0.727143, 0.734121, 0.701052, 0.619377, 0.463457, 0.136953, -0.524807, 0.286388, 0.526855, 0.646814, 0.700771, 0.702972, 0.652144, 0.5298, 0.263871, -1.73787, 0.29988, 0.590402, 0.741883, 0.825816, 0.862781, 0.858917, 0.812196, 0.710441, 0.515427, 0.0357375, 0.0919224, 0.540353, 0.732974, 0.836641, 0.886974, 0.895607, 0.864646, 0.788592, 0.648938, 0.38402, -0.61918, 0.273915, 0.573075, 0.714781, 0.784993, 0.807222, 0.789012, 0.73002, 0.62188, 0.439561, 0.0908449, -0.691064, 0.149999, 0.35896, 0.441097, 0.452023, 0.404731, 0.294872, 0.0960808, -0.30001, -0.869957, -0.261986, -0.183717, -0.374101, -0.858772, -0.0137708, 0.294334, 0.479053, 0.597884, 0.670314, 0.704055, 0.700813, 0.657037, 0.560866, 0.378352, -0.0401424, -0.187871, 0.328455, 0.528311, 0.628158, 0.667393, 0.656174, 0.59082, 0.448909, 0.140216, -0.609065, 0.279149, 0.533388, 0.6656, 0.734344, 0.757376, 0.739772, 0.678916, 0.562105, 0.350167, -0.15477, -0.0931506, 0.327722, 0.495336, 0.570491, 0.585999, 0.549023, 0.451917, 0.260922, -0.190655, -0.248092, 0.221556, 0.40403, 0.488869, 0.512449, 0.483331, 0.395251, 0.217882, -0.190304, -0.378987, 0.152185, 0.353022, 0.453252, 0.494811, 0.490671, 0.442693, 0.343447, 0.167611, -0.183348, -0.815564, -0.0574306, 0.162543, 0.267253, 0.312979, 0.319204, 0.29545, 0.248025, 0.182859, 0.107136, 0.0297102, -0.0410456, -0.102861, -0.166559, -0.263669, -0.480971, -2.04343, -0.293733, 0.0727712, 0.305051, 0.473501, 0.600055, 0.694155, 0.760288, 0.800268, 0.813887, 0.798723, 0.748903, 0.651307, 0.471781, 0.0656192, -0.10915, 0.429989, 0.643586, 0.758936, 0.817505, 0.832025, 0.804218, 0.72662, 0.574142, 0.250298, -0.39618, 0.412277, 0.658545, 0.787014, 0.853361, 0.874478, 0.854842, 0.791003, 0.668365, 0.440717, -0.169517, 0.136557, 0.50106, 0.657407, 0.729008, 0.743788, 0.707608, 0.612623, 0.426244, -0.00583808, -0.128137, 0.365569, 0.551121, 0.634769, 0.653469, 0.613747, 0.502896, 0.264676, -0.620186, 0.153081, 0.469437, 0.618058, 0.688741, 0.703754, 0.666363, 0.565167, 0.355816, -0.236349, 0.0790784, 0.457491, 0.626417, 0.710239, 0.73746, 0.714733, 0.63582, 0.473143, 0.107792, -0.249996, 0.372175, 0.591376, 0.702102, 0.751186, 0.752509, 0.707766, 0.608475, 0.426061, 0.0438773, -0.374365, 0.235891, 0.41847, 0.476926, 0.446313, 0.305239, -0.122393, -0.066587, 0.419687, 0.637818, 0.762536, 0.830744, 0.854443, 0.83552, 0.767264, 0.62684, 0.329979, -0.614007, 0.427533, 0.691791, 0.828638, 0.900444, 0.925459, 0.90832, 0.844863, 0.717738, 0.468033, -0.438424, 0.353189, 0.669707, 0.824014, 0.906228, 0.940808, 0.935842, 0.891555, 0.800485, 0.639801, 0.327842, -0.757799, 0.367481, 0.618402, 0.740216, 0.797635, 0.809978, 0.783366, 0.716744, 0.601078, 0.409781, 0.0416835, -0.573681, 0.149751, 0.351817, 0.436623, 0.457334, 0.429439, 0.355664, 0.229388, 0.0280923, -0.327815, -1.64595, -0.438142, -0.268873, -0.255589, -0.34622, -0.556227, -1.00907, -1.52267, -1.23528, -1.36846, -0.553672, -0.19746, 0.0294787, 0.185475, 0.292598, 0.36129, 0.396731, 0.40101, 0.373846, 0.312484, 0.210717, 0.0561646, -0.177543, -0.560916, -1.5029, -1.66038, -0.873368, -0.311314, 0.000849268, 0.206745, 0.34791, 0.441644, 0.495624, 0.512005, 0.487935, 0.412809, 0.256225, -0.107297, -0.403262, 0.208271, 0.440725, 0.568969, 0.638969, 0.665327, 0.651689, 0.594151, 0.477518, 0.253386, -0.387861, 0.00619613, 0.36989, 0.538234, 0.627564, 0.666747, 0.665471, 0.625131, 0.540109, 0.392605, 0.125388, -0.731541, -0.0646857, 0.232675, 0.359225, 0.408707, 0.405201, 0.355401, 0.257165, 0.0990721, -0.149082, -0.587185, -1.6323, -1.03457, -1.21082, -0.384697, -0.0450158, 0.159959, 0.289145, 0.362716, 0.386953, 0.358503, 0.259297, 0.0231891, -1.26263, 0.0372819, 0.353348, 0.519593, 0.613916, 0.657549, 0.655628, 0.602894, 0.477274, 0.194817, -0.726693, 0.324578, 0.605501, 0.761012, 0.854297, 0.905126, 0.920925, 0.903259, 0.848895, 0.747477, 0.571001, 0.21295, -0.311645, 0.38763, 0.607194, 0.712838, 0.755189, 0.748105, 0.691401, 0.570758, 0.334505, -0.397152, 0.135955, 0.470987, 0.623773, 0.697407, 0.717056, 0.688279, 0.604209, 0.43633, 0.0604513, -0.252102, 0.346218, 0.563535, 0.675613, 0.728051, 0.734556, 0.696863, 0.606484, 0.434094, 0.0548493, -0.256875, 0.340046, 0.558536, 0.673776, 0.731951, 0.747965, 0.725976, 0.663107, 0.546782, 0.33852, -0.1542, -0.103376, 0.335867, 0.52274, 0.623886, 0.675923, 0.692282, 0.67834, 0.635197, 0.560287, 0.445716, 0.271535, -0.0255723, -1.09996, -0.174516, 0.102732, 0.22916, 0.290053, 0.31004, 0.298765, 0.259525, 0.191102, 0.0863541, -0.0750315, -0.362216, -1.92681, -0.380022, -0.0731267, 0.102748, 0.224317, 0.314882, 0.384305, 0.437378, 0.476531, 0.502926, 0.516951, 0.518435, 0.506702, 0.480478, 0.437626, 0.374533, 0.284711, 0.155059, -0.0471287, -0.454566, -0.723851, -0.152514, 0.07076, 0.202323, 0.287918, 0.343908, 0.377528, 0.39196, 0.387954, 0.364228, 0.317043, 0.238493, 0.111162, -0.113669, -0.726382, -0.371493, 0.0143587, 0.203554, 0.317311, 0.385447, 0.418577, 0.41983, 0.38742, 0.313564, 0.17774, -0.086351, -1.27309, -0.136801, 0.164551, 0.316263, 0.398299, 0.432547, 0.425227, 0.373857, 0.265, 0.0560702, -0.487048, -0.291484, 0.107958, 0.278603, 0.359141, 0.377949, 0.337378, 0.217686, -0.0695655, -0.80851, 0.107306, 0.382921, 0.537316, 0.629925, 0.67949, 0.692671, 0.6699, 0.605642, 0.483586, 0.253733, -0.410048, 0.017383, 0.373255, 0.53744, 0.622055, 0.654039, 0.640219, 0.575983, 0.439539, 0.147021, -0.780998, 0.260369, 0.53448, 0.684592, 0.774082, 0.823071, 0.839565, 0.826124, 0.781423, 0.69937, 0.564335, 0.330853, -0.260956, -0.00155576, 0.377538, 0.547871, 0.640577, 0.687743, 0.701622, 0.687318, 0.646142, 0.576261, 0.471574, 0.317111, 0.0703383, -0.495048, -0.348762, 0.0401754, 0.206789, 0.297004, 0.345595, 0.366273, 0.365457, 0.345999, 0.308307, 0.250357, 0.166654, 0.0448989, -0.145847, -0.525253, -0.904101, -0.270592, -0.0380582, 0.0944537, 0.175168, 0.2204, 0.236826, 0.226897, 0.190516, 0.125417, 0.0267166, -0.114573, -0.315303, -0.610325, -1.08248, -1.7452, -1.21026, -0.675951, -0.347263, -0.125452, 0.0302933, 0.13883, 0.209668, 0.247447, 0.253601, 0.226654, 0.161275, 0.0447781, -0.155735, -0.573146, -0.875578, -0.345705, -0.191819, -0.168444, -0.263204, -0.598911, -0.757899, -0.162059, 0.0907256, 0.241188, 0.334027, 0.384993, 0.400254, 0.380993, 0.324144, 0.22048, 0.0466323, -0.274625, -1.88389, -0.34465, -0.13581, -0.087816, -0.154227, -0.392483, -1.64518, -0.291622, -0.0112562, 0.121762, 0.169335, 0.137211, -0.0113695, -0.542166, -0.187773, 0.2444, 0.46592, 0.604656, 0.692011, 0.739241, 0.74947, 0.719936, 0.639558, 0.476135, 0.0915699, -0.109506, 0.457701, 0.685458, 0.814043, 0.88672, 0.917576, 0.9104, 0.862068, 0.759752, 0.564522, 0.0809273, 0.154464, 0.601318, 0.796701, 0.904565, 0.960462, 0.976476, 0.955783, 0.895362, 0.783578, 0.58678, 0.157687, -0.0182635, 0.490946, 0.679049, 0.766727, 0.793508, 0.769187, 0.689102, 0.527757, 0.17683, -0.291557, 0.38991, 0.61548, 0.729067, 0.781026, 0.786582, 0.748799, 0.661792, 0.504517, 0.202369, -1.53262, 0.173497, 0.420538, 0.523727, 0.549789, 0.511698, 0.397905, 0.147269, -0.994904, 0.0957423, 0.394022, 0.537411, 0.606723, 0.623381, 0.591894, 0.505187, 0.335364, -0.0361343, -0.405932, 0.212381, 0.425563, 0.530433, 0.574259, 0.571538, 0.52523, 0.429985, 0.267218, -0.0238206, -0.99316, -0.238482, 0.00421937, 0.0611186, -0.000504023, -0.228015, -2.44656, -0.177188, 0.114499, 0.254417, 0.313128, 0.305054, 0.219663, -0.00266749, -1.06832, -0.01259, 0.313114, 0.482653, 0.578765, 0.624054, 0.62479, 0.577633, 0.465733, 0.23049, -0.664275, 0.145113, 0.476095, 0.645927, 0.74527, 0.799601, 0.818745, 0.806149, 0.761185, 0.67879, 0.545868, 0.326702, -0.137868, -0.266192, 0.19966, 0.36643, 0.436229, 0.447588, 0.411663, 0.328153, 0.185325, -0.0557194, -0.594982, -0.556676, -0.172204, -0.037936, 0.00910565, 0.00984117, -0.0119087, -0.0321623, -0.0256215, 0.0227348, 0.106662, 0.20606, 0.301923, 0.382126, 0.439774, 0.470114, 0.467803, 0.423652, 0.317137, 0.0848761, -0.916537, 0.0512405, 0.382407, 0.557699, 0.662096, 0.71924, 0.737179, 0.716581, 0.651299, 0.52267, 0.270098, -0.670106, 0.160526, 0.469005, 0.614181, 0.682922, 0.696549, 0.657401, 0.552187, 0.329362, -0.39931, 0.162824, 0.507839, 0.671529, 0.755935, 0.786152, 0.767868, 0.694619, 0.539283, 0.187259, -0.207438, 0.44512, 0.674279, 0.79317, 0.849529, 0.856739, 0.814668, 0.709396, 0.490667, -0.198631, 0.307729, 0.666489, 0.841271, 0.939683, 0.989557, 1.00068, 0.975172, 0.909134, 0.789477, 0.577874, 0.0880886, 0.102213, 0.537737, 0.709895, 0.789456, 0.811091, 0.783863, 0.704231, 0.551842, 0.249771, -1.0808, 0.25676, 0.505981, 0.617297, 0.656734, 0.641031, 0.569875, 0.425836, 0.141806, -1.26768, 0.0611422, 0.316275, 0.413231, 0.4221, 0.348525, 0.150752, -0.509304, -0.0311892, 0.328513, 0.493655, 0.572492, 0.589061, 0.543893, 0.414303, 0.0960162, -0.379201, 0.347819, 0.600676, 0.740423, 0.819078, 0.853085, 0.847255, 0.799143, 0.696754, 0.503475, 0.044299, 0.0266489, 0.492865, 0.684278, 0.782784, 0.825183, 0.822567, 0.775159, 0.672565, 0.480283, 0.0363799, -0.0461349, 0.437538, 0.628694, 0.724589, 0.76388, 0.758559, 0.710034, 0.61067, 0.435446, 0.0898485, -0.632061, 0.176257, 0.386698, 0.469154, 0.474841, 0.408465, 0.239417, -0.216513, -0.159307, 0.305724, 0.510181, 0.624818, 0.686717, 0.70912, 0.696646, 0.648718, 0.559024, 0.409986, 0.146786, -0.645165, -0.0668152, 0.247561, 0.389325, 0.459136, 0.484564, 0.476718, 0.44058, 0.377914, 0.287903, 0.166195, 0.000789214, -0.244439, -0.7533, -0.736251, -0.279809, -0.0629302, 0.0853486, 0.20011, 0.292324, 0.36514, 0.418471, 0.450458, 0.45757, 0.433556, 0.366181, 0.226099, -0.0957382, -0.552566, 0.175318, 0.440749, 0.597551, 0.697582, 0.758046, 0.785596, 0.781755, 0.743908, 0.663595, 0.519007, 0.238123, -1.72598, 0.226092, 0.508444, 0.649974, 0.724074, 0.751545, 0.738528, 0.683003, 0.572971, 0.371131, -0.104456, -0.0974157, 0.353141, 0.537646, 0.631307, 0.670745, 0.668054, 0.626031, 0.540917, 0.399685, 0.165275, -0.329744, -0.45297, -0.0453902, 0.047721, -0.00850893, -0.283457, -0.706755, 0.0298706, 0.297578, 0.44878, 0.535923, 0.575892, 0.573689, 0.526677, 0.421824, 0.218075, -0.303666, -0.153605, 0.259133, 0.435313, 0.522479, 0.552601, 0.534085, 0.46328, 0.32017, 0.0301457, -1.56684, 0.0319664, 0.290454, 0.406624, 0.447487, 0.427808, 0.341257, 0.149089, -0.376943, -0.184091, 0.225684, 0.403698, 0.491631, 0.519977, 0.495092, 0.408392, 0.22312, -0.254438, -0.182761, 0.261249, 0.448119, 0.540866, 0.572199, 0.548175, 0.45754, 0.251544, -0.423118, 0.0872097, 0.456224, 0.640273, 0.747597, 0.806202, 0.825918, 0.808759, 0.750428, 0.636488, 0.422994, -0.137469, 0.100968, 0.497999, 0.677922, 0.77579, 0.82319, 0.830592, 0.799582, 0.72419, 0.584844, 0.314785, -0.972843, 0.272091, 0.569862, 0.723128, 0.81143, 0.858353, 0.873359, 0.860154, 0.818946, 0.746541, 0.634396, 0.461394, 0.159813, -1.15269, 0.0563586, 0.32461, 0.447651, 0.504312, 0.517068, 0.493628, 0.434628, 0.334175, 0.174516, -0.100817, -0.942748, -0.31077, -0.0113103, 0.118225, 0.172883, 0.176121, 0.132321, 0.0325468, -0.158478, -0.617829, -0.615521, -0.14528, 0.0569064, 0.170454, 0.232876, 0.256999, 0.246606, 0.199614, 0.106553, -0.0590324, -0.395549, -1.03251, -0.246425, -0.0108896, 0.10597, 0.157483, 0.157037, 0.101782, -0.0314497, -0.340368, -0.922864, -0.124561, 0.140739, 0.292241, 0.385671, 0.439525, 0.461371, 0.453839, 0.416191, 0.343959, 0.22614, 0.0347562, -0.333408, -0.927399, -0.212677, -0.00879309, 0.0772938, 0.0968169, 0.0624763, -0.0289648, -0.200756, -0.548644, -1.22193, -0.447018, -0.237753, -0.150442, -0.128447, -0.151499, -0.205539, -0.269704, -0.306314, -0.271541, -0.15861, -0.00499166, 0.151383, 0.291437, 0.408645, 0.501589, 0.570276, 0.614585, 0.63346, 0.624109, 0.580481, 0.489265, 0.315629, -0.0911773, -0.21801, 0.317005, 0.541709, 0.672538, 0.751059, 0.791697, 0.799742, 0.7755, 0.714511, 0.604251, 0.410044, -0.0209533, -0.156182, 0.350928, 0.550845, 0.655641, 0.705697, 0.713945, 0.68307, 0.608041, 0.47116, 0.213859, -0.680464, 0.0781701, 0.391323, 0.542197, 0.622301, 0.656822, 0.654905, 0.618776, 0.545442, 0.4245, 0.22739, -0.156247, -0.652422, -0.00166789, 0.194551, 0.277661, 0.295951, 0.260864, 0.166871, -0.0174504, -0.447401, -0.548831, -0.045222, 0.161198, 0.276338, 0.341617, 0.372292, 0.375024, 0.352296, 0.303544, 0.224649, 0.105108, -0.0822255, -0.437444, -1.06028, -0.297483, -0.0646835, 0.0554508, 0.115865, 0.130545, 0.098674, 0.00399541, -0.213537, -1.1479, -0.228504, 0.127144, 0.328314, 0.4627, 0.555406, 0.616448, 0.649909, 0.656475, 0.633823, 0.575358, 0.46544, 0.260048, -0.279452, -0.0575856, 0.358287, 0.554388, 0.67005, 0.738133, 0.770692, 0.772183, 0.742724, 0.678246, 0.567798, 0.382716, 0.0141179, -0.489215, 0.187625, 0.40041, 0.501179, 0.540193, 0.53205, 0.478685, 0.371787, 0.183079, -0.20294, -0.633059, -0.0183665, 0.169374, 0.241622, 0.243477, 0.183522, 0.0509932, -0.201063, -0.870655, -0.576703, -0.31179, -0.322867, -0.693084, -0.496614, 0.0169285, 0.273879, 0.436279, 0.541501, 0.603339, 0.626643, 0.610525, 0.547273, 0.414571, 0.134561, -1.17529, 0.190757, 0.467505, 0.608505, 0.680496, 0.701513, 0.673957, 0.587505, 0.404106, -0.0761311, 0.0261113, 0.474345, 0.674182, 0.785687, 0.843777, 0.859987, 0.836525, 0.768254, 0.637826, 0.389071, -0.426056, 0.222011, 0.539782, 0.684199, 0.750215, 0.760715, 0.718839, 0.61248, 0.394432, -0.249909, 0.15855, 0.518943, 0.682336, 0.762651, 0.786287, 0.758155, 0.668449, 0.477135, -0.0426165, 0.150616, 0.571927, 0.764369, 0.871948, 0.927764, 0.943097, 0.920482, 0.855794, 0.734532, 0.512178, -0.0658445, 0.183705, 0.566527, 0.734539, 0.819831, 0.853289, 0.844747, 0.794771, 0.695209, 0.520079, 0.168855, -0.431922, 0.312261, 0.535404, 0.644103, 0.692955, 0.699702, 0.67112, 0.608895, 0.511117, 0.371934, 0.179242, -0.0922168, -0.504768, -1.29207, -1.86624, -0.804197, -0.384658, -0.156408, -0.0318609, 0.0154625, -0.0132541, -0.147609, -0.558003, -0.538887, -0.0392796, 0.178462, 0.29685, 0.351753, 0.351422, 0.288472, 0.127745, -0.315245, -0.254735, 0.224568, 0.441286, 0.567499, 0.640109, 0.671953, 0.666972, 0.623335, 0.531967, 0.367294, 0.0351153, -0.68069, 0.152554, 0.38656, 0.499521, 0.548084, 0.548847, 0.505436, 0.41267, 0.251757, -0.0394645, -1.058, -0.234629, 0.00475699, 0.0586556, -0.0134721, -0.290557, -0.786123, -0.0150641, 0.251781, 0.399778, 0.48288, 0.518112, 0.510284, 0.456282, 0.341862, 0.121517, -0.474912, -0.184898, 0.184268, 0.340593, 0.409307, 0.417789, 0.370068, 0.25318, 0.0144203, -0.761435, -0.169239, 0.148498, 0.284543, 0.336108, 0.324688, 0.249245, 0.0853354, -0.275204, -0.770876, -0.118356, 0.0541983, 0.0779811, -0.0438779, -0.59729, -0.149728, 0.275131, 0.497162, 0.635939, 0.721927, 0.766085, 0.771138, 0.733408, 0.639325, 0.447511, -0.0620493, 0.105254, 0.533152, 0.726637, 0.833244, 0.885666, 0.893757, 0.857026, 0.764091, 0.577331, 0.107509, 0.162593, 0.619638, 0.818675, 0.928193, 0.984005, 0.997756, 0.971448, 0.899256, 0.761634, 0.4919, -0.783066, 0.441555, 0.733126, 0.876664, 0.95101, 0.978337, 0.965715, 0.912483, 0.809787, 0.631162, 0.27597, -0.337996, 0.401699, 0.612393, 0.702359, 0.722642, 0.683775, 0.576135, 0.352205, -0.328118, 0.131511, 0.477539, 0.632141, 0.704301, 0.719824, 0.683768, 0.587293, 0.394595, -0.076582, -0.0616199, 0.387354, 0.568064, 0.653624, 0.678459, 0.650291, 0.561759, 0.37918, -0.0655985, -0.104549, 0.373518, 0.568745, 0.669714, 0.714551, 0.715625, 0.675429, 0.589004, 0.43951, 0.173796, -0.583421, -0.0994852, 0.192149, 0.288542, 0.284579, 0.183406, -0.0899001, -0.988724, 0.0364314, 0.300947, 0.432423, 0.49164, 0.49393, 0.437077, 0.297555, -0.0269043, -0.549406, 0.188524, 0.430886, 0.556851, 0.618379, 0.630256, 0.593582, 0.496879, 0.29909, -0.229382, -0.0346593, 0.378979, 0.564499, 0.664385, 0.710967, 0.71438, 0.674926, 0.583213, 0.408473, 0.0171351, -0.224055, 0.343959, 0.563256, 0.684382, 0.752515, 0.783693, 0.784762, 0.758288, 0.703923, 0.618179, 0.492314, 0.304809, -0.0144559, -1.63537, -0.113828, 0.142418, 0.262853, 0.325539, 0.355671, 0.365243, 0.361017, 0.346676, 0.323238, 0.288805, 0.237754, 0.158505, 0.0258007, -0.237985, -1.96092, -0.159187, 0.15794, 0.342638, 0.465573, 0.548091, 0.598658, 0.620421, 0.613263, 0.573858, 0.493855, 0.353319, 0.0912646, -0.838622, -0.0437034, 0.256609, 0.391024, 0.445999, 0.440372, 0.370304, 0.20263, -0.239767, -0.218575, 0.259624, 0.466539, 0.580024, 0.636514, 0.646894, 0.610903, 0.516736, 0.324401, -0.180148, -0.0339269, 0.395772, 0.587413, 0.691842, 0.742429, 0.749619, 0.713945, 0.626539, 0.458633, 0.091703, -0.278599, 0.349187, 0.570257, 0.683554, 0.736067, 0.741458, 0.700729, 0.603289, 0.412251, -0.0583082, -0.0202735, 0.436379, 0.632887, 0.740828, 0.797102, 0.814786, 0.798447, 0.747687, 0.656936, 0.511187, 0.267267, -0.305043, -0.158387, 0.209551, 0.346205, 0.392773, 0.379065, 0.310785, 0.178935, -0.052075, -0.553415, -0.657745, -0.266705, -0.191297, -0.282159, -0.686571, -0.609418, -0.124653, 0.0844785, 0.189145, 0.22116, 0.18007, 0.0299124, -0.457376, -0.218111, 0.233148, 0.45691, 0.596345, 0.685436, 0.736941, 0.755856, 0.742763, 0.694054, 0.599353, 0.431129, 0.0859785, -0.471558, 0.263976, 0.497953, 0.61887, 0.679743, 0.696903, 0.67476, 0.610125, 0.489267, 0.269398, -0.285631, -0.0905685, 0.30253, 0.471347, 0.555172, 0.585306, 0.57067, 0.509291, 0.38603, 0.148416, -0.594308, -0.0363597, 0.303354, 0.466235, 0.55524, 0.597557, 0.602954, 0.573839, 0.507101, 0.391685, 0.196509, -0.206139, -0.522704, 0.0467209, 0.242743, 0.333025, 0.360418, 0.334159, 0.245685, 0.0537508, -0.492389, -0.21826, 0.197364, 0.399999, 0.52361, 0.600708, 0.643504, 0.656716, 0.640796, 0.592138, 0.500626, 0.339839, 0.0133817, -0.651041, 0.173052, 0.427369, 0.567085, 0.648751, 0.6902, 0.697585, 0.670913, 0.604082, 0.479491, 0.241802, -0.535256, 0.0936812, 0.437826, 0.612456, 0.716767, 0.777771, 0.805958, 0.805413, 0.776501, 0.716107, 0.615792, 0.454771, 0.167095, -1.01084, 0.0647859, 0.345513, 0.476979, 0.540422, 0.558875, 0.540538, 0.486997, 0.394715, 0.252844, 0.0329058, -0.370041, -0.993229, -0.336476, -0.200343, -0.211213, -0.354997, -0.805198, -0.739604, -0.290007, -0.10896, -0.0304159, -0.0232319, -0.0869713, -0.251615, -0.678798, -0.740793, -0.25798, -0.0758563, -0.00455519, -0.0171495, -0.133654, -0.501406, -0.569185, -0.0138548, 0.233945, 0.385171, 0.48168, 0.538543, 0.561833, 0.552946, 0.509341, 0.422865, 0.272746, -0.00762009, -1.21945, -0.095806, 0.181593, 0.305448, 0.353771, 0.344941, 0.277547, 0.128378, -0.203941, -0.748094, -0.0104619, 0.224615, 0.343009, 0.396903, 0.401011, 0.356261, 0.250872, 0.0430375, -0.503085, -0.301151, 0.0951947, 0.263808, 0.342696, 0.360672, 0.32116, 0.207475, -0.0530582, -1.60149, 0.0159889, 0.314377, 0.478387, 0.578984, 0.638155, 0.664812, 0.66225, 0.630043, 0.563618, 0.450858, 0.258639, -0.155104, -0.348908, 0.193106, 0.410871, 0.537088, 0.615728, 0.662915, 0.686001, 0.688408, 0.671173, 0.633279, 0.571128, 0.476632, 0.331159, 0.0798371, -0.674093, -0.107646, 0.236636, 0.409282, 0.512028, 0.571374, 0.59651, 0.58928, 0.54589, 0.4541, 0.279271, -0.132363, -0.239422, 0.28918, 0.514357, 0.646974, 0.728065, 0.771955, 0.783998, 0.764766, 0.7105, 0.610595, 0.437177, 0.0858622, -0.466572, 0.256371, 0.48253, 0.594144, 0.64286, 0.643072, 0.595468, 0.488038, 0.278527, -0.273292, -0.0570727, 0.338687, 0.510818, 0.596368, 0.625917, 0.60744, 0.537062, 0.394499, 0.104179, -1.36753, 0.116698, 0.375805, 0.493762, 0.536544, 0.518221, 0.430868, 0.229309, -0.399995, 0.0236032, 0.399153, 0.579065, 0.678542, 0.726158, 0.731064, 0.69339, 0.604282, 0.435645, 0.0740338, -0.351628, 0.301078, 0.521693, 0.632377, 0.682074, 0.685732, 0.646595, 0.559713, 0.407483, 0.133262, -0.706154, -0.107235, 0.161187, 0.236317, 0.195539, 0.00343923, -0.935105, -0.00578265, 0.33244, 0.506537, 0.603296, 0.645833, 0.639753, 0.579365, 0.44022, 0.124044, -0.471672, 0.31618, 0.565229, 0.695335, 0.760245, 0.774855, 0.739724, 0.641607, 0.432153, -0.216137, 0.234196, 0.606204, 0.787556, 0.890959, 0.94494, 0.959295, 0.935728, 0.869227, 0.743457, 0.506956, -0.194705, 0.288655 +}; #endif /* MULTIPATH_V30_M6_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v30_M8.h b/src/lte/model/JakesTraces/multipath_v30_M8.h index 7c62604de..8907bda94 100644 --- a/src/lte/model/JakesTraces/multipath_v30_M8.h +++ b/src/lte/model/JakesTraces/multipath_v30_M8.h @@ -24,8 +24,8 @@ #define MULTIPATH_V30_M8_H_ static double multipath_M8_v_30[3000] = { - 1.04482, 0.982109, 0.861595, 0.636734, 0.0246296, 0.351389, 0.722467, 0.890356, 0.978139, 1.01572, 1.01318, 0.972194, 0.887638, 0.742999, 0.486693, -0.232957, 0.220056, 0.538088, 0.666168, 0.710085, 0.692734, 0.613436, 0.447062, 0.0765056, -0.296194, 0.319524, 0.527253, 0.623775, 0.654991, 0.632462, 0.552359, 0.390086, 0.0415065, -0.486126, 0.217901, 0.434453, 0.532706, 0.562489, 0.535339, 0.445124, 0.258211, -0.197465, -0.224558, 0.237637, 0.419163, 0.502707, 0.523469, 0.488775, 0.389601, 0.185863, -0.352866, -0.165571, 0.232651, 0.399766, 0.476479, 0.492881, 0.454775, 0.352324, 0.144304, -0.409312, -0.196317, 0.19219, 0.353856, 0.424536, 0.43258, 0.380951, 0.252029, -0.0307029, -1.24992, 0.0247241, 0.291506, 0.422643, 0.484416, 0.495466, 0.45974, 0.371049, 0.206195, -0.121229, -1.0451, -0.0863822, 0.125371, 0.194441, 0.168724, 0.0290931, -0.406976, -0.318165, 0.160325, 0.378804, 0.50591, 0.578535, 0.609722, 0.603646, 0.558753, 0.466424, 0.302286, -0.0214681, -0.893836, 0.0513998, 0.289578, 0.402075, 0.449283, 0.449028, 0.406082, 0.317341, 0.169452, -0.0775576, -0.621528, -0.613438, -0.249892, -0.156263, -0.180086, -0.309061, -0.598841, -1.68104, -0.912981, -0.973858, -0.921271, -0.237625, 0.0999569, 0.325248, 0.487044, 0.60447, 0.686674, 0.738083, 0.760124, 0.751503, 0.707261, 0.615298, 0.443574, 0.0602464, -0.197465, 0.384873, 0.609643, 0.734183, 0.803371, 0.832065, 0.825007, 0.780897, 0.691378, 0.532706, 0.220266, -0.745729, 0.290361, 0.544745, 0.673559, 0.739724, 0.762336, 0.747675, 0.69517, 0.596909, 0.429608, 0.110003, -0.910743, 0.154009, 0.401522, 0.523148, 0.583032, 0.601118, 0.5849, 0.536005, 0.451263, 0.320278, 0.114429, -0.278605, -0.748165, -0.111683, 0.0910092, 0.190035, 0.236454, 0.24768, 0.230501, 0.185938, 0.109194, -0.0151753, -0.235398, -0.855357, -0.451024, -0.0510742, 0.161329, 0.303836, 0.406007, 0.479062, 0.527731, 0.553614, 0.556225, 0.533022, 0.478455, 0.380968, 0.212755, -0.125595, -0.762161, 0.0211622, 0.254433, 0.368104, 0.414991, 0.407759, 0.342091, 0.190451, -0.171736, -0.462898, 0.144362, 0.372582, 0.494347, 0.554558, 0.565944, 0.528261, 0.427957, 0.217008, -0.42194, 0.00117683, 0.370839, 0.54518, 0.637987, 0.676346, 0.666798, 0.60376, 0.462174, 0.139181, -0.381378, 0.365196, 0.618254, 0.758885, 0.840473, 0.880368, 0.884821, 0.854296, 0.783808, 0.658911, 0.437455, -0.102959, 0.0430813, 0.442059, 0.607878, 0.686736, 0.710903, 0.689909, 0.623001, 0.498774, 0.280916, -0.202015, -0.274696, 0.155218, 0.293398, 0.319012, 0.252552, 0.0540593, -0.662541, -0.0858982, 0.261996, 0.423715, 0.500066, 0.513543, 0.463293, 0.322972, -0.0351346, -0.283197, 0.316181, 0.550448, 0.67998, 0.749409, 0.77236, 0.750702, 0.676291, 0.520847, 0.166323, -0.192578, 0.448692, 0.683809, 0.812835, 0.883871, 0.91249, 0.903457, 0.85497, 0.757167, 0.581335, 0.213442, -0.215087, 0.431945, 0.648321, 0.754791, 0.799557, 0.796242, 0.745208, 0.633979, 0.418409, -0.166385, 0.120265, 0.503761, 0.677467, 0.770096, 0.812713, 0.81618, 0.78324, 0.710739, 0.587097, 0.379087, -0.0572925, -0.265155, 0.240919, 0.419751, 0.498997, 0.520186, 0.496151, 0.428951, 0.312224, 0.124998, -0.204839, -2.3369, -0.331162, -0.119408, -0.0580233, -0.07576, -0.15285, -0.278574, -0.427431, -0.520143, -0.453274, -0.264681, -0.0601832, 0.114889, 0.25283, 0.355638, 0.426303, 0.466712, 0.47708, 0.455407, 0.396169, 0.286583, 0.0932558, -0.322595, -0.561316, -0.0321929, 0.150043, 0.223431, 0.225637, 0.158918, -0.00444321, -0.410069, -0.560093, -0.0427762, 0.1481, 0.228043, 0.229562, 0.144058, -0.10399, -1.10596, 0.0508797, 0.351204, 0.52088, 0.625104, 0.683928, 0.704342, 0.68654, 0.623858, 0.496209, 0.235873, -1.10157, 0.217718, 0.520327, 0.677226, 0.766382, 0.810093, 0.815891, 0.784027, 0.707624, 0.565873, 0.287536, -1.63807, 0.280218, 0.56699, 0.714576, 0.797357, 0.837516, 0.843525, 0.817849, 0.75865, 0.658627, 0.498983, 0.221657, -0.650244, 0.0212674, 0.313417, 0.436598, 0.483468, 0.476843, 0.420604, 0.30503, 0.0924842, -0.414892, -0.350152, 0.0697601, 0.239264, 0.31981, 0.346518, 0.331158, 0.276567, 0.179404, 0.028102, -0.208375, -0.64785, -1.16151, -0.632808, -0.592463, -0.839735, -1.12456, -0.437637, -0.168528, -0.0153149, 0.0717178, 0.108312, 0.0975276, 0.0319787, -0.116031, -0.463427, -0.82617, -0.177279, 0.059935, 0.188512, 0.255632, 0.274626, 0.245365, 0.153781, -0.0515039, -0.751584, -0.178123, 0.197552, 0.396678, 0.524032, 0.607876, 0.659376, 0.683202, 0.68042, 0.648999, 0.582629, 0.466102, 0.256662, -0.271189, -0.0946308, 0.327117, 0.522688, 0.637716, 0.705949, 0.739767, 0.743853, 0.718606, 0.660455, 0.559594, 0.390955, 0.0667358, -0.820892, 0.141397, 0.386485, 0.507313, 0.564126, 0.573985, 0.539973, 0.454839, 0.292422, -0.0516751, -0.580423, 0.13892, 0.369854, 0.486361, 0.539804, 0.544577, 0.501364, 0.398034, 0.191674, -0.366124, -0.121251, 0.274069, 0.449614, 0.538672, 0.570555, 0.551281, 0.472124, 0.295976, -0.175564, -0.068629, 0.39004, 0.601246, 0.726363, 0.80132, 0.839159, 0.844724, 0.81817, 0.755017, 0.642812, 0.447169, 0.0173983, -0.131872, 0.378588, 0.578116, 0.682513, 0.732729, 0.742184, 0.714339, 0.645812, 0.523364, 0.306706, -0.213049, -0.106444, 0.310809, 0.488969, 0.582986, 0.627911, 0.636573, 0.613916, 0.560557, 0.473196, 0.34248, 0.144448, -0.203546, -1.30346, -0.226641, -0.00617977, 0.0885275, 0.123381, 0.120099, 0.0888097, 0.0351892, -0.0375969, -0.129206, -0.244964, -0.404978, -0.685103, -2.14441, -0.580679, -0.243402, -0.029111, 0.129448, 0.252093, 0.346741, 0.416855, 0.463655, 0.486741, 0.483966, 0.450506, 0.376156, 0.236529, -0.0508188, -1.11455, 0.0455098, 0.329638, 0.487864, 0.585758, 0.644006, 0.671082, 0.670313, 0.641857, 0.582831, 0.485739, 0.332835, 0.0721497, -0.643282, -0.198789, 0.126126, 0.265187, 0.327338, 0.340211, 0.313249, 0.248304, 0.141618, -0.0183156, -0.261418, -0.697678, -1.30709, -0.729282, -0.66801, -0.807604, -1.34301, -1.14699, -0.83307, -0.859243, -1.88233, -0.610144, -0.197026, 0.055102, 0.232079, 0.360987, 0.453933, 0.51708, 0.553492, 0.564152, 0.548148, 0.502181, 0.418851, 0.281438, 0.0429904, -0.566136, -0.291744, 0.0691625, 0.218956, 0.283257, 0.289617, 0.242581, 0.130782, -0.0916214, -0.72085, -0.363296, -0.00578761, 0.147875, 0.215106, 0.2215, 0.168997, 0.0390629, -0.247701, -1.3193, -0.172847, 0.0893742, 0.216463, 0.270722, 0.266193, 0.196564, 0.0234707, -0.479319, -0.267493, 0.171295, 0.3824, 0.510242, 0.58869, 0.630216, 0.639388, 0.616083, 0.555292, 0.443185, 0.240288, -0.248852, -0.181174, 0.262907, 0.456464, 0.563619, 0.619841, 0.637036, 0.617997, 0.558815, 0.445377, 0.234498, -0.313162, -0.0948368, 0.312009, 0.498901, 0.604284, 0.660252, 0.677511, 0.657916, 0.596056, 0.473977, 0.232539, -0.660324, 0.142167, 0.476297, 0.651605, 0.758933, 0.823765, 0.855941, 0.858978, 0.832399, 0.771461, 0.66382, 0.4762, 0.0676381, -0.135255, 0.409725, 0.623519, 0.74111, 0.805423, 0.830777, 0.821692, 0.776781, 0.687718, 0.531093, 0.22437, -0.824532, 0.286572, 0.548602, 0.684286, 0.758328, 0.79074, 0.789065, 0.755129, 0.686429, 0.574697, 0.399106, 0.0940954, -1.05377, -0.0735562, 0.168532, 0.244513, 0.226471, 0.11213, -0.182733, -0.879081, -0.0186239, 0.231728, 0.355525, 0.408594, 0.40456, 0.339244, 0.1837, -0.199865, -0.390689, 0.16791, 0.387865, 0.505651, 0.563509, 0.573884, 0.53714, 0.441811, 0.248245, -0.255767, -0.117299, 0.312104, 0.50244, 0.605826, 0.656181, 0.664778, 0.633807, 0.558383, 0.422159, 0.173856, -0.533348, -0.0848866, 0.238631, 0.369273, 0.412567, 0.38918, 0.292238, 0.0729314, -0.657229, -0.0942412, 0.245914, 0.402534, 0.476881, 0.492645, 0.452277, 0.340373, 0.0937559, -1.06568, 0.061152, 0.368315, 0.523047, 0.606113, 0.639858, 0.630899, 0.577211, 0.466174, 0.25781, -0.255398, -0.15367, 0.260754, 0.428679, 0.503552, 0.516071, 0.470164, 0.349523, 0.0831267, -1.8948, 0.115014, 0.401886, 0.549385, 0.629288, 0.662656, 0.656476, 0.610463, 0.51679, 0.352098, 0.0327288, -0.978748, 0.0728601, 0.312676, 0.422876, 0.466176, 0.460458, 0.409639, 0.308182, 0.135316, -0.182709, -2.13619, -0.255151, -0.0254322, 0.0622614, 0.0807982, 0.055938, 0.00723976, -0.0379876, -0.0420854, 0.0207986, 0.138111, 0.275561, 0.40686, 0.51935, 0.608222, 0.671659, 0.708277, 0.715613, 0.688513, 0.615747, 0.469112, 0.143244, -0.366791, 0.375041, 0.629829, 0.772863, 0.856796, 0.898358, 0.902926, 0.869375, 0.789167, 0.637572, 0.324051, -0.455097, 0.450276, 0.705577, 0.839736, 0.911931, 0.940281, 0.930485, 0.881281, 0.783459, 0.610071, 0.257973, -0.308633, 0.416298, 0.637069, 0.741549, 0.781386, 0.770341, 0.707453, 0.575935, 0.312944, -0.79167, 0.231704, 0.523768, 0.659831, 0.721254, 0.728633, 0.684493, 0.576596, 0.357879, -0.284349, 0.121276, 0.484966, 0.653505, 0.742419, 0.780381, 0.776784, 0.732361, 0.63987, 0.476611, 0.161514, -0.966753, 0.181203, 0.421592, 0.527834, 0.562964, 0.542206, 0.462598, 0.298468, -0.0652646, -0.455875, 0.178811, 0.397336, 0.507264, 0.556968, 0.561639, 0.525107, 0.443524, 0.301803, 0.0523708, -0.598663, -0.274988, 0.0584092, 0.186391, 0.226661, 0.204036, 0.118579, -0.054073, -0.427682, -0.839438, -0.215602, -0.0135381, 0.0780958, 0.108643, 0.0951446, 0.0457848, -0.0326713, -0.128495, -0.216155, -0.253301, -0.20898, -0.100554, 0.0295637, 0.151922, 0.25399, 0.331864, 0.384662, 0.411978, 0.412661, 0.383827, 0.319169, 0.204559, 0.00188484, -0.468503, -0.469382, -0.00780173, 0.188494, 0.29862, 0.361415, 0.392026, 0.398034, 0.383828, 0.352128, 0.304444, 0.240847, 0.158879, 0.0506483, -0.105817, -0.386657, -1.92625, -0.302027, 0.0253736, 0.229056, 0.377655, 0.491535, 0.57876, 0.642717, 0.684423, 0.703196, 0.696522, 0.659048, 0.579599, 0.431169, 0.117585, -0.548453, 0.294873, 0.559378, 0.708041, 0.797862, 0.847021, 0.862216, 0.844512, 0.790147, 0.687849, 0.506966, 0.124311, -0.219103, 0.382914, 0.594803, 0.700485, 0.745418, 0.742267, 0.690527, 0.576014, 0.34821, -0.351232, 0.14819, 0.4973, 0.661994, 0.74931, 0.786437, 0.782102, 0.736396, 0.640907, 0.469509, 0.122051, -0.487556, 0.263198, 0.484239, 0.586662, 0.623127, 0.607334, 0.537597, 0.394657, 0.103137, -1.30811, 0.121755, 0.383786, 0.509079, 0.565891, 0.573713, 0.53771, 0.454402, 0.308566, 0.0519414, -0.61425, -0.295765, 0.0137017, 0.106808, 0.0894609, -0.0441148, -0.444174, -0.496142, 0.0143821, 0.226189, 0.338202, 0.389695, 0.392855, 0.348829, 0.248863, 0.0640108, -0.324179, -0.730478, -0.136095, 0.0363917, 0.0824734, 0.0351041, -0.132465, -0.645181, -0.440157, -0.0314197, 0.137619, 0.204296, 0.190089, 0.0754974, -0.270313, -0.451495, 0.141589, 0.386475, 0.526751, 0.605703, 0.636376, 0.619743, 0.54538, 0.376852, -0.0683457, -0.0246537, 0.455005, 0.669936, 0.794565, 0.865803, 0.896181, 0.889048, 0.841345, 0.740946, 0.551879, 0.106195, 0.0593119, 0.542196, 0.742296, 0.85008, 0.904101, 0.917345, 0.893508, 0.830235, 0.717419, 0.526747, 0.149356, -0.366747, 0.293509, 0.483724, 0.553454, 0.547742, 0.469391, 0.286141, -0.193828, -0.127007, 0.3084, 0.483755, 0.561322, 0.572266, 0.518939, 0.378984, 0.0467153, -0.423792, 0.27598, 0.507953, 0.622433, 0.668111, 0.655829, 0.577835, 0.394087, -0.134164, 0.103604, 0.520771, 0.714325, 0.822241, 0.876322, 0.886603, 0.853424, 0.767676, 0.599897, 0.226997, -0.101011, 0.505199, 0.722849, 0.833428, 0.882248, 0.881816, 0.831154, 0.714566, 0.474664, -0.401212, 0.364857, 0.688837, 0.848081, 0.933973, 0.971033, 0.967044, 0.921434, 0.824735, 0.647618, 0.269529, -0.0910916, 0.519736, 0.7322, 0.837899, 0.883454, 0.882758, 0.83762, 0.739757, 0.560803, 0.183429, -0.210671, 0.409017, 0.615867, 0.713173, 0.747755, 0.73247, 0.666512, 0.534524, 0.280871, -0.556772, 0.109151, 0.416749, 0.551622, 0.607378, 0.606401, 0.550947, 0.426334, 0.173824, -0.783466, 0.0664527, 0.372278, 0.517194, 0.588875, 0.611025, 0.590809, 0.526572, 0.406015, 0.18929, -0.334579, -0.219412, 0.194862, 0.373315, 0.470556, 0.52333, 0.547193, 0.551145, 0.541797, 0.524819, 0.505222, 0.48688, 0.471651, 0.458638, 0.444041, 0.421459, 0.381867, 0.311832, 0.186105, -0.0683184, -1.61931, -0.0383299, 0.278776, 0.454492, 0.564287, 0.630105, 0.659826, 0.654852, 0.611186, 0.516252, 0.334052, -0.101316, -0.150943, 0.344565, 0.555177, 0.674286, 0.741108, 0.769327, 0.763757, 0.724144, 0.645061, 0.511712, 0.281479, -0.270823, -0.125358, 0.261891, 0.416333, 0.482019, 0.489602, 0.44562, 0.342245, 0.145925, -0.307272, -0.38363, 0.0863237, 0.26611, 0.34944, 0.37446, 0.352846, 0.285731, 0.165384, -0.0321869, -0.390963, -1.52761, -0.490117, -0.354193, -0.418784, -0.788689, -0.778147, -0.265482, -0.0492966, 0.0591395, 0.0944129, 0.0585161, -0.0773744, -0.473683, -0.501651, 0.0210874, 0.251881, 0.386588, 0.464572, 0.498903, 0.492682, 0.441591, 0.329536, 0.104308, -0.608401, -0.0726015, 0.279506, 0.450994, 0.546905, 0.5946, 0.603659, 0.575989, 0.507314, 0.383443, 0.161537, -0.393058, -0.202853, 0.192396, 0.36495, 0.45617, 0.499845, 0.509245, 0.490835, 0.448358, 0.384728, 0.303572, 0.211167, 0.118882, 0.0442455, 0.00569282, 0.00998831, 0.0459398, 0.0936953, 0.136218, 0.162477, 0.165504, 0.139575, 0.0773975, -0.0342657, -0.227286, -0.62576, -0.9895, -0.413346, -0.234137, -0.169902, -0.178318, -0.252329, -0.404212, -0.681297, -1.33727, -1.29211, -1.29004, -1.21814, -0.554093, -0.238234, -0.0413263, 0.08323, 0.150395, 0.160969, 0.100118, -0.0912716, -1.01737, -0.0673482, 0.297736, 0.504695, 0.641025, 0.731842, 0.786969, 0.809893, 0.799946, 0.751777, 0.651238, 0.458217, -0.02779, 0.0675119, 0.513735, 0.712322, 0.823518, 0.882041, 0.899158, 0.876666, 0.808567, 0.675039, 0.408369, -0.944031, 0.377635, 0.67255, 0.821103, 0.900796, 0.933332, 0.925236, 0.874761, 0.770263, 0.575434, 0.116599, 0.0923884, 0.560184, 0.752358, 0.852327, 0.897369, 0.899242, 0.859502, 0.771059, 0.610504, 0.291554, -0.611484, 0.363078, 0.605689, 0.721645, 0.77166, 0.772917, 0.72847, 0.630808, 0.452783, 0.083725, -0.383436, 0.271196, 0.477409, 0.570028, 0.597675, 0.573357, 0.495945, 0.349392, 0.0766759, -0.796378, -0.145628, 0.115835, 0.182961, 0.1239, -0.132291, -0.720546, 0.128974, 0.413516, 0.576897, 0.676501, 0.731015, 0.747249, 0.725716, 0.660731, 0.535163, 0.294928, -0.461815, 0.112342, 0.445804, 0.602056, 0.68203, 0.711574, 0.698469, 0.641379, 0.528584, 0.322733, -0.160096, -0.149561, 0.292103, 0.468792, 0.553459, 0.581892, 0.56498, 0.5032, 0.387448, 0.18891, -0.207578, -0.666024, -0.0657744, 0.0916685, 0.114392, 0.0237439, -0.271413, -0.715006, 0.0149956, 0.275588, 0.421589, 0.505419, 0.544128, 0.543264, 0.501516, 0.409325, 0.237983, -0.12854, -0.527243, 0.112264, 0.334425, 0.449966, 0.507912, 0.524423, 0.505148, 0.450014, 0.353213, 0.198292, -0.0647961, -0.762595, -0.367197, -0.0439044, 0.0898516, 0.14826, 0.162178, 0.145718, 0.108483, 0.0598301, 0.0105705, -0.0279293, -0.0478363, -0.0496947, -0.0431674, -0.0434212, -0.0686392, -0.144443, -0.330427, -1.04225, -0.388781, 0.00293349, 0.220468, 0.364388, 0.461956, 0.523729, 0.553695, 0.551832, 0.514018, 0.429126, 0.267642, -0.0856474, -0.48878, 0.171458, 0.406238, 0.532627, 0.59889, 0.619198, 0.595181, 0.517644, 0.354513, -0.0398773, -0.183276, 0.365198, 0.59551, 0.731159, 0.814775, 0.861462, 0.877284, 0.863718, 0.818499, 0.734169, 0.591882, 0.333386, -0.527196, 0.183596, 0.502489, 0.657785, 0.743106, 0.78402, 0.789843, 0.762958, 0.700598, 0.592754, 0.411808, 0.0521172, -0.479714, 0.227164, 0.454264, 0.57237, 0.634358, 0.657708, 0.64923, 0.610649, 0.5398, 0.429433, 0.261691, -0.0159849, -0.755193, -0.325593, -0.0306173, 0.0694305, 0.0751604, -0.00345605, -0.210718, -0.965174, -0.32862, 0.0214923, 0.195804, 0.293412, 0.340022, 0.343154, 0.300539, 0.197441, -0.0162193, -0.686474, -0.195906, 0.174558, 0.360397, 0.471206, 0.535381, 0.563272, 0.557906, 0.517222, 0.432567, 0.280402, -0.0214737, -1.08993, 0.0436564, 0.308462, 0.445236, 0.518484, 0.547358, 0.537734, 0.488086, 0.388215, 0.207619, -0.180632, -0.486701, 0.0980969, 0.309264, 0.416969, 0.466602, 0.472432, 0.437836, 0.358753, 0.220315, -0.0227269, -0.625885, -0.409488, -0.0689549, 0.0402852, 0.0374136, -0.0812522, -0.464343, -0.50423, 0.0267477, 0.259694, 0.395429, 0.474284, 0.510033, 0.506738, 0.462017, 0.364964, 0.183725, -0.216189, -0.470316, 0.0809688, 0.275936, 0.361644, 0.376512, 0.322506, 0.1693, -0.254643, -0.240913, 0.255902, 0.477166, 0.60593, 0.68017, 0.712652, 0.706577, 0.658203, 0.553307, 0.347634, -0.212504, 0.0527141, 0.454393, 0.64208, 0.748508, 0.805177, 0.822883, 0.803988, 0.744322, 0.629426, 0.414896, -0.153555, 0.106993, 0.503465, 0.687915, 0.793332, 0.851953, 0.875884, 0.869867, 0.834534, 0.766755, 0.657606, 0.484364, 0.170641, -1.36647, 0.151586, 0.408244, 0.533311, 0.597096, 0.621467, 0.615568, 0.583396, 0.526057, 0.442248, 0.32756, 0.171657, -0.0516766, -0.438407, -1.15482, -0.38484, -0.174953, -0.0704041, -0.0124101, 0.0192497, 0.0332475, 0.0327788, 0.0174096, -0.0165198, -0.0767348, -0.178697, -0.360272, -0.784002, -0.854347, -0.340471, -0.119164, 0.00912558, 0.0833273, 0.116074, 0.110404, 0.0627572, -0.0397561, -0.234699, -0.699149, -0.718917, -0.267016, -0.0970911, -0.03428, -0.0546702, -0.182961, -0.601469, -0.504567, -0.00367009, 0.237537, 0.389873, 0.491054, 0.555252, 0.58854, 0.592906, 0.567221, 0.50658, 0.399039, 0.213441, -0.174479, -0.514231, 0.0805355, 0.288405, 0.39013, 0.430586, 0.421673, 0.361233, 0.230278, -0.0440798, -1.83644, -0.0140423, 0.271369, 0.420009, 0.503144, 0.541921, 0.543704, 0.509023, 0.431928, 0.294459, 0.0389202, -0.819993, -0.10943, 0.208441, 0.361566, 0.443536, 0.479732, 0.479041, 0.442922, 0.36646, 0.233823, -0.00463243, -0.677125, -0.245658, 0.112222, 0.28521, 0.387061, 0.448019, 0.480624, 0.49118, 0.483125, 0.458256, 0.417173, 0.359279, 0.28236, 0.181388, 0.0452501, -0.154242, -0.52377, -1.0407, -0.329598, -0.0804553, 0.071211, 0.178444, 0.259472, 0.322447, 0.371441, 0.408502, 0.434506, 0.449517, 0.452904, 0.443273, 0.418186, 0.373494, 0.301733, 0.187733, -0.00761405, -0.465425, -0.445056, 0.0385326, 0.260918, 0.399565, 0.491964, 0.551583, 0.583726, 0.589523, 0.566715, 0.50845, 0.398197, 0.188319, -0.404998, -0.0546793, 0.342793, 0.540922, 0.663109, 0.740047, 0.783265, 0.797194, 0.782281, 0.735332, 0.647624, 0.497564, 0.215632, -1.21957, 0.166753, 0.448131, 0.583245, 0.647485, 0.66028, 0.623984, 0.527095, 0.326547, -0.233203, 0.041554, 0.442792, 0.62995, 0.734675, 0.78802, 0.800147, 0.772223, 0.697466, 0.554135, 0.265419, -1.13066, 0.297798, 0.568882, 0.704727, 0.773198, 0.793296, 0.769237, 0.695206, 0.548658, 0.24487, -0.682923, 0.335147, 0.592919, 0.723768, 0.789534, 0.808196, 0.784059, 0.712358, 0.574215, 0.304184, -0.899952, 0.235422, 0.522811, 0.658012, 0.720112, 0.729466, 0.68898, 0.587883, 0.385307, -0.149848, 0.0457365, 0.453952, 0.635245, 0.731398, 0.774815, 0.775977, 0.736004, 0.647646, 0.487405, 0.16856, -0.715856, 0.248179, 0.494395, 0.61671, 0.676805, 0.694095, 0.676025, 0.624652, 0.538291, 0.411084, 0.230058, -0.0352386, -0.486199, -1.36878, -0.751263, -0.976922, -0.945117, -0.399386, -0.18039, -0.0905087, -0.105079, -0.268902, -1.18714, -0.218361, 0.148041, 0.351509, 0.479518, 0.556778, 0.591854, 0.585373, 0.530085, 0.402811, 0.118229, -0.773321, 0.253807, 0.533966, 0.689743, 0.783844, 0.836104, 0.854249, 0.840473, 0.792863, 0.704206, 0.556123, 0.29259, -0.514303, 0.0839498, 0.390818, 0.522147, 0.57481, 0.572087, 0.517579, 0.40049, 0.17926, -0.383538, -0.192331, 0.185412, 0.334484, 0.391728, 0.385255, 0.317441, 0.169402, -0.140301, -1.15947, -0.104143, 0.122277, 0.205913, 0.201074, 0.103998, -0.159876, -1.15339, -0.0395843, 0.23523, 0.375165, 0.44308, 0.455412, 0.411893, 0.294861, 0.0345124, -1.94601, 0.0483118, 0.335689, 0.47698, 0.544149, 0.555041, 0.509118, 0.386466, 0.104448, -0.829662, 0.225137, 0.499378, 0.645253, 0.725397, 0.758267, 0.748746, 0.693085, 0.574989, 0.340119, -0.430487, 0.180946, 0.517091, 0.678489, 0.764261, 0.800137, 0.794151, 0.745663, 0.644845, 0.461235, 0.0672397, -0.24094, 0.331648, 0.529047, 0.617943, 0.640581, 0.605001, 0.499505, 0.270179, -0.548767, 0.148915, 0.481105, 0.643146, 0.729733, 0.765696, 0.758329, 0.70555, 0.593633, 0.377246, -0.216637, 0.0913697, 0.471798, 0.645043, 0.736891, 0.777328, 0.775786, 0.732263, 0.637165, 0.459391, 0.0632324, -0.163295, 0.397979, 0.617503, 0.740619, 0.812218, 0.84844, 0.856378, 0.838992, 0.796562, 0.7267, 0.622952, 0.469972, 0.224225, -0.351292, -0.166805, 0.220239, 0.391949, 0.489025, 0.545358, 0.574142, 0.581259, 0.56888, 0.536484, 0.480627, 0.393198, 0.255575, 0.0135825, -0.711306, -0.172432, 0.182375, 0.362104, 0.471055, 0.536504, 0.568493, 0.570318, 0.541073, 0.475315, 0.359297, 0.155449, -0.309821, -0.346444, 0.115346, 0.299127, 0.388468, 0.419228, 0.400462, 0.327943, 0.1789, -0.136985, -0.900506, -0.0175239, 0.225684, 0.344101, 0.395104, 0.394169, 0.341749, 0.224012, -0.00937938, -0.713663, -0.233182, 0.100348, 0.243218, 0.300648, 0.295565, 0.227549, 0.0726412, -0.277128, -0.750735, -0.0810328, 0.122391, 0.198015, 0.183739, 0.0604125, -0.334341, -0.324613, 0.195078, 0.43102, 0.57218, 0.657645, 0.700948, 0.706257, 0.671605, 0.587145, 0.424352, 0.070322, -0.358354, 0.306534, 0.534539, 0.651936, 0.707446, 0.715101, 0.676003, 0.579604, 0.389215, -0.0784932, -0.0541722, 0.402263, 0.593671, 0.693394, 0.737499, 0.73725, 0.69373, 0.599067, 0.427896, 0.0844091, -0.611747, 0.183226, 0.393384, 0.473854, 0.473211, 0.390428, 0.171917, -0.773637, 0.128199, 0.458462, 0.627582, 0.722849, 0.768171, 0.771026, 0.730277, 0.634877, 0.449675, 0.00897856, -0.0456158, 0.441281, 0.642197, 0.749955, 0.803339, 0.815269, 0.789108, 0.721579, 0.599925, 0.385915, -0.108367, -0.0871745, 0.345819, 0.519356, 0.603738, 0.635637, 0.628197, 0.586515, 0.511761, 0.402593, 0.256006, 0.0694307, -0.150343, -0.356546, -0.43389, -0.343556, -0.201915, -0.0925403, -0.0434335, -0.0752853, -0.249992, -1.30679, -0.168149, 0.194249, 0.400277, 0.532952, 0.616313, 0.659136, 0.663046, 0.623449, 0.525285, 0.322166, -0.263886, 0.0682948, 0.458126, 0.640852, 0.740332, 0.785435, 0.783847, 0.731919, 0.610275, 0.347348, -3.37803, 0.37861, 0.673702, 0.828926, 0.916998, 0.959097, 0.962204, 0.925992, 0.842541, 0.688209, 0.377795, -0.563607, 0.453678, 0.704989, 0.828591, 0.88597, 0.894343, 0.856497, 0.764084, 0.58693, 0.19328, -0.0688479, 0.495044, 0.701232, 0.803812, 0.846399, 0.841864, 0.791131, 0.684351, 0.488485, 0.0544046, -0.113474, 0.381378, 0.554554, 0.620414, 0.613158, 0.530307, 0.326809, -0.346533, 0.15414, 0.516318, 0.690161, 0.783847, 0.82445, 0.819843, 0.767855, 0.65377, 0.427611, -0.253665, 0.213547, 0.565546, 0.729374, 0.814466, 0.848167, 0.838864, 0.785733, 0.677969, 0.481257, 0.0378516, -0.0747741, 0.409942, 0.593582, 0.679057, 0.704641, 0.680621, 0.60451, 0.458307, 0.176561, -1.05955, 0.0767253, 0.339193, 0.44205, 0.459209, 0.399959, 0.234915, -0.221998, -0.155173, 0.304572, 0.502931, 0.607552, 0.6533, 0.649641, 0.593431, 0.46462, 0.185935, -1.0515, 0.254599, 0.534565, 0.682343, 0.765568, 0.804814, 0.807523, 0.774767, 0.701994, 0.575262, 0.353665, -0.173904, -0.0671591, 0.340421, 0.508142, 0.5889, 0.61615, 0.600148, 0.540925, 0.428199, 0.227889, -0.219936, -0.314284, 0.172542, 0.369099, 0.476531, 0.53621, 0.564036, 0.567828, 0.5519, 0.518573, 0.468569, 0.400707, 0.310697, 0.187874, 0.00445812, -0.342922, -0.901355, -0.141779, 0.120194, 0.276943, 0.381122, 0.449147, 0.486607, 0.49379, 0.466379, 0.392684, 0.241552, -0.112745, -0.399207, 0.228415, 0.479055, 0.628916, 0.72484, 0.78292, 0.809571, 0.806482, 0.771662, 0.698239, 0.569082, 0.333484, -0.339257, 0.0953972, 0.449381, 0.614767, 0.703605, 0.744184, 0.746239, 0.711662, 0.636155, 0.50572, 0.278931, -0.260044, -0.144253, 0.250911, 0.407051, 0.473358, 0.481323, 0.438122, 0.337294, 0.150302, -0.246649, -0.59329, -0.0229342, 0.155273, 0.215716, 0.195212, 0.0850396, -0.196357, -1.00243, -0.0455448, 0.222697, 0.364746, 0.441264, 0.470661, 0.45825, 0.401257, 0.285878, 0.0675748, -0.515679, -0.23891, 0.145694, 0.3208, 0.417013, 0.466956, 0.483894, 0.474679, 0.443686, 0.394601, 0.331663, 0.260754, 0.190096, 0.129517, 0.0871097, 0.0644121, 0.0542916, 0.0434862, 0.0159551, -0.0479478, -0.182459, -0.500441, -0.941278, -0.220503, 0.040511, 0.188398, 0.273149, 0.309274, 0.298352, 0.230675, 0.0720332, -0.340914, -0.380588, 0.1336, 0.358971, 0.491118, 0.569575, 0.608099, 0.611416, 0.578952, 0.504443, 0.370696, 0.125325, -0.592542, -0.108038, 0.221732, 0.364448, 0.425043, 0.427401, 0.373673, 0.247724, -0.0164452, -1.38948, -0.050071, 0.237618, 0.376602, 0.444132, 0.461761, 0.435829, 0.36446, 0.236354, 0.0183551, -0.428513, -0.715375, -0.241154, -0.143242, -0.214362, -0.571319, -0.600856, -0.0654068, 0.162624, 0.283468, 0.333759, 0.318379, 0.217704, -0.0637698, -0.629605, 0.190998, 0.47153, 0.634447, 0.735259, 0.791613, 0.809309, 0.787379, 0.717083, 0.572447, 0.25474, -0.346529, 0.449481, 0.705994, 0.847203, 0.928296, 0.96666, 0.967974, 0.931366, 0.848691, 0.696301, 0.389518, -0.566776, 0.470735, 0.729354, 0.861873, 0.93098, 0.955511, 0.94134, 0.887156, 0.783461, 0.602334, 0.234848, -0.262971, 0.407949, 0.615156, 0.706812, 0.730932, 0.697618, 0.597755, 0.386659, -0.232057, 0.140779, 0.512737, 0.68433, 0.774595, 0.812441, 0.806745, 0.756804, 0.651561, 0.455269, -0.00306164, -0.0432817, 0.423307, 0.609749, 0.701931, 0.736741, 0.72464, 0.664189, 0.54032, 0.299811, -0.465809, 0.121358, 0.453475, 0.610439, 0.693049, 0.728105, 0.725237, 0.686816, 0.6098, 0.483503, 0.278359, -0.122301, -0.558303, 0.0440026, 0.224602, 0.293051, 0.295434, 0.242566, 0.128915, -0.075201, -0.506574, -0.76301, -0.255123, -0.0950886, -0.0437214, -0.0604377, -0.135451, -0.271864, -0.483339, -0.790222, -1.12963, -1.05332, -0.678976, -0.374888, -0.159701, -0.0113836, 0.0839831, 0.132384, 0.132807, 0.0742832, -0.0798814, -0.514645, -0.446155, 0.0434203, 0.271218, 0.409703, 0.496114, 0.543802, 0.557576, 0.537225, 0.477231, 0.362137, 0.145811, -0.443337, -0.13561, 0.252902, 0.436339, 0.541805, 0.600669, 0.624727, 0.618507, 0.58235, 0.512539, 0.398656, 0.212994, -0.149879, -0.68418, 0.0241287, 0.25532, 0.381846, 0.458229, 0.504172, 0.52953, 0.54031, 0.540646, 0.533528, 0.520987, 0.50405, 0.482606, 0.455257, 0.419141, 0.369564, 0.298978, 0.193976, 0.0248457, -0.312064, -0.883028, -0.116, 0.139138, 0.284, 0.372393, 0.421464, 0.437249, 0.420084, 0.364948, 0.257465, 0.0557278, -0.461293, -0.294311, 0.133539, 0.331613, 0.447909, 0.516642, 0.550481, 0.554422, 0.529311, 0.472362, 0.375498, 0.218726, -0.0603134, -1.06199, -0.19972, 0.0882743, 0.216975, 0.271146, 0.271202, 0.218085, 0.0946797, -0.168285, -2.08066, -0.149741, 0.148528, 0.306915, 0.399716, 0.448751, 0.461679, 0.439271, 0.375937, 0.254639, 0.0216458, -0.718223, -0.144338, 0.205069, 0.37938, 0.480818, 0.536211, 0.554937, 0.538838, 0.48372, 0.375878, 0.174806, -0.32709, -0.210633, 0.22343, 0.416147, 0.522646, 0.576742, 0.588994, 0.560059, 0.481384, 0.3253, -0.0195383, -0.452073, 0.230487, 0.471868, 0.604788, 0.679211, 0.710809, 0.703809, 0.655003, 0.550778, 0.34882, -0.182069, 0.0165677, 0.432728, 0.623238, 0.730154, 0.785934, 0.801189, 0.777365, 0.708017, 0.572101, 0.295682, -1.50864, 0.327492, 0.61689, 0.771423, 0.86273, 0.912632, 0.929737, 0.91698, 0.873514, 0.794232, 0.66621, 0.454543, 0.00672748, -0.14982, 0.340159, 0.521119, 0.60584, 0.634466, 0.61951, 0.562995, 0.458702, 0.286114, -0.0248271, -1.63645, -0.132387, 0.103569, 0.187239, 0.189653, 0.123785, -0.0231247, -0.315053, -1.56277, -0.473977, -0.273132, -0.287251, -0.576228, -0.685312, -0.067861, 0.20735, 0.37817, 0.490046, 0.559425, 0.593025, 0.592429, 0.554736, 0.470271, 0.312798, -0.0147002, -0.666337, 0.141122, 0.385502, 0.512376, 0.577421, 0.597492, 0.576998, 0.512323, 0.388345, 0.156517, -0.495157, -0.103735, 0.250691, 0.409484, 0.48784, 0.513446, 0.493856, 0.425901, 0.292062, 0.0301706, -1.02186, -0.0576828, 0.242717, 0.38843, 0.463761, 0.492155, 0.481414, 0.431693, 0.335603, 0.170646, -0.142985, -1.33225, -0.125993, 0.123204, 0.241638, 0.295362, 0.303857, 0.273003, 0.200884, 0.0758769, -0.138351, -0.617581, -0.64445, -0.191197, -0.00575388, 0.0943524, 0.14867, 0.172814, 0.17479, 0.159429, 0.130006, 0.0889239, 0.038053, -0.0210578, -0.0869067, -0.157504, -0.229326, -0.295603, -0.3446, -0.360632, -0.331437, -0.257968, -0.154412, -0.0383169, 0.0769903, 0.183582, 0.277276, 0.355908, 0.418183, 0.46297, 0.488813, 0.493424, 0.47288, 0.419942, 0.31951, 0.131825, -0.332993, -0.272432, 0.197688, 0.412906, 0.542544, 0.623157, 0.667777, 0.681108, 0.663093, 0.608868, 0.505044, 0.313807, -0.145056, -0.129377, 0.345386, 0.556112, 0.680706, 0.757157, 0.799438, 0.813413, 0.800898, 0.760638, 0.687596, 0.569566, 0.374365, -0.0304661, -0.3014, 0.263855, 0.476498, 0.592574, 0.657417, 0.686817, 0.68716, 0.66024, 0.604302, 0.512966, 0.370358, 0.130655, -0.468507, -0.206027, 0.169579, 0.337942, 0.428818, 0.473324, 0.482321, 0.458609, 0.399221, 0.293132, 0.109077, -0.282592, -0.565184, 0.016294, 0.235565, 0.355418, 0.421016, 0.447143, 0.438359, 0.393099, 0.302614, 0.142385, -0.175302, -1.05044, -0.0895625, 0.157714, 0.278971, 0.333605, 0.337221, 0.289735, 0.175401, -0.06512, -1.01029, -0.143849, 0.177789, 0.339803, 0.430002, 0.472561, 0.475727, 0.440371, 0.360914, 0.220747, -0.0302795, -0.709073, -0.340442, -0.0280013, 0.0713271, 0.0554101, -0.0976446, -0.723703, -0.195899, 0.202569, 0.411321, 0.540896, 0.620362, 0.660477, 0.664421, 0.62995, 0.547517, 0.390289, 0.0567279, -0.517432, 0.239772, 0.479895, 0.604385, 0.666506, 0.681973, 0.653734, 0.575182, 0.422718, 0.107443, -0.708665, 0.211237, 0.456408, 0.575919, 0.62833, 0.629528, 0.580474, 0.468623, 0.248958, -0.352173, -0.0536343, 0.310676, 0.460745, 0.518482, 0.506347, 0.415771, 0.186452, -0.96593, 0.184113, 0.503762, 0.67055, 0.765211, 0.81003, 0.811314, 0.766095, 0.658802, 0.436795, -0.289773, 0.280524, 0.633996, 0.809641, 0.910423, 0.963362, 0.977909, 0.955865, 0.892803, 0.774204, 0.556154, -0.00732551, 0.22146, 0.613839, 0.787938, 0.879323, 0.919552, 0.918986, 0.87904, 0.793492, 0.642263, 0.356807, -1.09182, 0.298302, 0.574074, 0.704772, 0.767168, 0.783183, 0.760092, 0.697943, 0.589788, 0.415312, 0.107553, -1.16909, -0.035883, 0.205137, 0.288629, 0.289298, 0.219696, 0.0627025, -0.273722, -0.957986, -0.166804, 0.0450115, 0.131047, 0.146377, 0.106605, 0.0151058, -0.129414, -0.321621, -0.504967, -0.512087, -0.305925, -0.0579918, 0.151848, 0.314819, 0.4361, 0.520911, 0.572299, 0.590807, 0.573867, 0.513754, 0.390802, 0.142622, -0.848145, 0.0667533, 0.381388, 0.537998, 0.622097, 0.656676, 0.648328, 0.594632, 0.481781, 0.265068, -0.317278, -0.044148, 0.33604, 0.502298, 0.583419, 0.608731, 0.585706, 0.510002, 0.360394, 0.0570894, -1.09762, 0.0858198, 0.32939, 0.433688, 0.459603, 0.416355, 0.283241, -0.0505895, -0.437999, 0.230367, 0.470856, 0.600337, 0.667529, 0.686999, 0.660782, 0.580333, 0.41549, 0.0344731, -0.212635, 0.365481, 0.588079, 0.709542, 0.774649, 0.798317, 0.785386, 0.734735, 0.638463, 0.474379, 0.166623, -1.43247, 0.141923, 0.390607, 0.50036, 0.539597, 0.526421, 0.462999, 0.338731, 0.11578 - }; + 1.04482, 0.982109, 0.861595, 0.636734, 0.0246296, 0.351389, 0.722467, 0.890356, 0.978139, 1.01572, 1.01318, 0.972194, 0.887638, 0.742999, 0.486693, -0.232957, 0.220056, 0.538088, 0.666168, 0.710085, 0.692734, 0.613436, 0.447062, 0.0765056, -0.296194, 0.319524, 0.527253, 0.623775, 0.654991, 0.632462, 0.552359, 0.390086, 0.0415065, -0.486126, 0.217901, 0.434453, 0.532706, 0.562489, 0.535339, 0.445124, 0.258211, -0.197465, -0.224558, 0.237637, 0.419163, 0.502707, 0.523469, 0.488775, 0.389601, 0.185863, -0.352866, -0.165571, 0.232651, 0.399766, 0.476479, 0.492881, 0.454775, 0.352324, 0.144304, -0.409312, -0.196317, 0.19219, 0.353856, 0.424536, 0.43258, 0.380951, 0.252029, -0.0307029, -1.24992, 0.0247241, 0.291506, 0.422643, 0.484416, 0.495466, 0.45974, 0.371049, 0.206195, -0.121229, -1.0451, -0.0863822, 0.125371, 0.194441, 0.168724, 0.0290931, -0.406976, -0.318165, 0.160325, 0.378804, 0.50591, 0.578535, 0.609722, 0.603646, 0.558753, 0.466424, 0.302286, -0.0214681, -0.893836, 0.0513998, 0.289578, 0.402075, 0.449283, 0.449028, 0.406082, 0.317341, 0.169452, -0.0775576, -0.621528, -0.613438, -0.249892, -0.156263, -0.180086, -0.309061, -0.598841, -1.68104, -0.912981, -0.973858, -0.921271, -0.237625, 0.0999569, 0.325248, 0.487044, 0.60447, 0.686674, 0.738083, 0.760124, 0.751503, 0.707261, 0.615298, 0.443574, 0.0602464, -0.197465, 0.384873, 0.609643, 0.734183, 0.803371, 0.832065, 0.825007, 0.780897, 0.691378, 0.532706, 0.220266, -0.745729, 0.290361, 0.544745, 0.673559, 0.739724, 0.762336, 0.747675, 0.69517, 0.596909, 0.429608, 0.110003, -0.910743, 0.154009, 0.401522, 0.523148, 0.583032, 0.601118, 0.5849, 0.536005, 0.451263, 0.320278, 0.114429, -0.278605, -0.748165, -0.111683, 0.0910092, 0.190035, 0.236454, 0.24768, 0.230501, 0.185938, 0.109194, -0.0151753, -0.235398, -0.855357, -0.451024, -0.0510742, 0.161329, 0.303836, 0.406007, 0.479062, 0.527731, 0.553614, 0.556225, 0.533022, 0.478455, 0.380968, 0.212755, -0.125595, -0.762161, 0.0211622, 0.254433, 0.368104, 0.414991, 0.407759, 0.342091, 0.190451, -0.171736, -0.462898, 0.144362, 0.372582, 0.494347, 0.554558, 0.565944, 0.528261, 0.427957, 0.217008, -0.42194, 0.00117683, 0.370839, 0.54518, 0.637987, 0.676346, 0.666798, 0.60376, 0.462174, 0.139181, -0.381378, 0.365196, 0.618254, 0.758885, 0.840473, 0.880368, 0.884821, 0.854296, 0.783808, 0.658911, 0.437455, -0.102959, 0.0430813, 0.442059, 0.607878, 0.686736, 0.710903, 0.689909, 0.623001, 0.498774, 0.280916, -0.202015, -0.274696, 0.155218, 0.293398, 0.319012, 0.252552, 0.0540593, -0.662541, -0.0858982, 0.261996, 0.423715, 0.500066, 0.513543, 0.463293, 0.322972, -0.0351346, -0.283197, 0.316181, 0.550448, 0.67998, 0.749409, 0.77236, 0.750702, 0.676291, 0.520847, 0.166323, -0.192578, 0.448692, 0.683809, 0.812835, 0.883871, 0.91249, 0.903457, 0.85497, 0.757167, 0.581335, 0.213442, -0.215087, 0.431945, 0.648321, 0.754791, 0.799557, 0.796242, 0.745208, 0.633979, 0.418409, -0.166385, 0.120265, 0.503761, 0.677467, 0.770096, 0.812713, 0.81618, 0.78324, 0.710739, 0.587097, 0.379087, -0.0572925, -0.265155, 0.240919, 0.419751, 0.498997, 0.520186, 0.496151, 0.428951, 0.312224, 0.124998, -0.204839, -2.3369, -0.331162, -0.119408, -0.0580233, -0.07576, -0.15285, -0.278574, -0.427431, -0.520143, -0.453274, -0.264681, -0.0601832, 0.114889, 0.25283, 0.355638, 0.426303, 0.466712, 0.47708, 0.455407, 0.396169, 0.286583, 0.0932558, -0.322595, -0.561316, -0.0321929, 0.150043, 0.223431, 0.225637, 0.158918, -0.00444321, -0.410069, -0.560093, -0.0427762, 0.1481, 0.228043, 0.229562, 0.144058, -0.10399, -1.10596, 0.0508797, 0.351204, 0.52088, 0.625104, 0.683928, 0.704342, 0.68654, 0.623858, 0.496209, 0.235873, -1.10157, 0.217718, 0.520327, 0.677226, 0.766382, 0.810093, 0.815891, 0.784027, 0.707624, 0.565873, 0.287536, -1.63807, 0.280218, 0.56699, 0.714576, 0.797357, 0.837516, 0.843525, 0.817849, 0.75865, 0.658627, 0.498983, 0.221657, -0.650244, 0.0212674, 0.313417, 0.436598, 0.483468, 0.476843, 0.420604, 0.30503, 0.0924842, -0.414892, -0.350152, 0.0697601, 0.239264, 0.31981, 0.346518, 0.331158, 0.276567, 0.179404, 0.028102, -0.208375, -0.64785, -1.16151, -0.632808, -0.592463, -0.839735, -1.12456, -0.437637, -0.168528, -0.0153149, 0.0717178, 0.108312, 0.0975276, 0.0319787, -0.116031, -0.463427, -0.82617, -0.177279, 0.059935, 0.188512, 0.255632, 0.274626, 0.245365, 0.153781, -0.0515039, -0.751584, -0.178123, 0.197552, 0.396678, 0.524032, 0.607876, 0.659376, 0.683202, 0.68042, 0.648999, 0.582629, 0.466102, 0.256662, -0.271189, -0.0946308, 0.327117, 0.522688, 0.637716, 0.705949, 0.739767, 0.743853, 0.718606, 0.660455, 0.559594, 0.390955, 0.0667358, -0.820892, 0.141397, 0.386485, 0.507313, 0.564126, 0.573985, 0.539973, 0.454839, 0.292422, -0.0516751, -0.580423, 0.13892, 0.369854, 0.486361, 0.539804, 0.544577, 0.501364, 0.398034, 0.191674, -0.366124, -0.121251, 0.274069, 0.449614, 0.538672, 0.570555, 0.551281, 0.472124, 0.295976, -0.175564, -0.068629, 0.39004, 0.601246, 0.726363, 0.80132, 0.839159, 0.844724, 0.81817, 0.755017, 0.642812, 0.447169, 0.0173983, -0.131872, 0.378588, 0.578116, 0.682513, 0.732729, 0.742184, 0.714339, 0.645812, 0.523364, 0.306706, -0.213049, -0.106444, 0.310809, 0.488969, 0.582986, 0.627911, 0.636573, 0.613916, 0.560557, 0.473196, 0.34248, 0.144448, -0.203546, -1.30346, -0.226641, -0.00617977, 0.0885275, 0.123381, 0.120099, 0.0888097, 0.0351892, -0.0375969, -0.129206, -0.244964, -0.404978, -0.685103, -2.14441, -0.580679, -0.243402, -0.029111, 0.129448, 0.252093, 0.346741, 0.416855, 0.463655, 0.486741, 0.483966, 0.450506, 0.376156, 0.236529, -0.0508188, -1.11455, 0.0455098, 0.329638, 0.487864, 0.585758, 0.644006, 0.671082, 0.670313, 0.641857, 0.582831, 0.485739, 0.332835, 0.0721497, -0.643282, -0.198789, 0.126126, 0.265187, 0.327338, 0.340211, 0.313249, 0.248304, 0.141618, -0.0183156, -0.261418, -0.697678, -1.30709, -0.729282, -0.66801, -0.807604, -1.34301, -1.14699, -0.83307, -0.859243, -1.88233, -0.610144, -0.197026, 0.055102, 0.232079, 0.360987, 0.453933, 0.51708, 0.553492, 0.564152, 0.548148, 0.502181, 0.418851, 0.281438, 0.0429904, -0.566136, -0.291744, 0.0691625, 0.218956, 0.283257, 0.289617, 0.242581, 0.130782, -0.0916214, -0.72085, -0.363296, -0.00578761, 0.147875, 0.215106, 0.2215, 0.168997, 0.0390629, -0.247701, -1.3193, -0.172847, 0.0893742, 0.216463, 0.270722, 0.266193, 0.196564, 0.0234707, -0.479319, -0.267493, 0.171295, 0.3824, 0.510242, 0.58869, 0.630216, 0.639388, 0.616083, 0.555292, 0.443185, 0.240288, -0.248852, -0.181174, 0.262907, 0.456464, 0.563619, 0.619841, 0.637036, 0.617997, 0.558815, 0.445377, 0.234498, -0.313162, -0.0948368, 0.312009, 0.498901, 0.604284, 0.660252, 0.677511, 0.657916, 0.596056, 0.473977, 0.232539, -0.660324, 0.142167, 0.476297, 0.651605, 0.758933, 0.823765, 0.855941, 0.858978, 0.832399, 0.771461, 0.66382, 0.4762, 0.0676381, -0.135255, 0.409725, 0.623519, 0.74111, 0.805423, 0.830777, 0.821692, 0.776781, 0.687718, 0.531093, 0.22437, -0.824532, 0.286572, 0.548602, 0.684286, 0.758328, 0.79074, 0.789065, 0.755129, 0.686429, 0.574697, 0.399106, 0.0940954, -1.05377, -0.0735562, 0.168532, 0.244513, 0.226471, 0.11213, -0.182733, -0.879081, -0.0186239, 0.231728, 0.355525, 0.408594, 0.40456, 0.339244, 0.1837, -0.199865, -0.390689, 0.16791, 0.387865, 0.505651, 0.563509, 0.573884, 0.53714, 0.441811, 0.248245, -0.255767, -0.117299, 0.312104, 0.50244, 0.605826, 0.656181, 0.664778, 0.633807, 0.558383, 0.422159, 0.173856, -0.533348, -0.0848866, 0.238631, 0.369273, 0.412567, 0.38918, 0.292238, 0.0729314, -0.657229, -0.0942412, 0.245914, 0.402534, 0.476881, 0.492645, 0.452277, 0.340373, 0.0937559, -1.06568, 0.061152, 0.368315, 0.523047, 0.606113, 0.639858, 0.630899, 0.577211, 0.466174, 0.25781, -0.255398, -0.15367, 0.260754, 0.428679, 0.503552, 0.516071, 0.470164, 0.349523, 0.0831267, -1.8948, 0.115014, 0.401886, 0.549385, 0.629288, 0.662656, 0.656476, 0.610463, 0.51679, 0.352098, 0.0327288, -0.978748, 0.0728601, 0.312676, 0.422876, 0.466176, 0.460458, 0.409639, 0.308182, 0.135316, -0.182709, -2.13619, -0.255151, -0.0254322, 0.0622614, 0.0807982, 0.055938, 0.00723976, -0.0379876, -0.0420854, 0.0207986, 0.138111, 0.275561, 0.40686, 0.51935, 0.608222, 0.671659, 0.708277, 0.715613, 0.688513, 0.615747, 0.469112, 0.143244, -0.366791, 0.375041, 0.629829, 0.772863, 0.856796, 0.898358, 0.902926, 0.869375, 0.789167, 0.637572, 0.324051, -0.455097, 0.450276, 0.705577, 0.839736, 0.911931, 0.940281, 0.930485, 0.881281, 0.783459, 0.610071, 0.257973, -0.308633, 0.416298, 0.637069, 0.741549, 0.781386, 0.770341, 0.707453, 0.575935, 0.312944, -0.79167, 0.231704, 0.523768, 0.659831, 0.721254, 0.728633, 0.684493, 0.576596, 0.357879, -0.284349, 0.121276, 0.484966, 0.653505, 0.742419, 0.780381, 0.776784, 0.732361, 0.63987, 0.476611, 0.161514, -0.966753, 0.181203, 0.421592, 0.527834, 0.562964, 0.542206, 0.462598, 0.298468, -0.0652646, -0.455875, 0.178811, 0.397336, 0.507264, 0.556968, 0.561639, 0.525107, 0.443524, 0.301803, 0.0523708, -0.598663, -0.274988, 0.0584092, 0.186391, 0.226661, 0.204036, 0.118579, -0.054073, -0.427682, -0.839438, -0.215602, -0.0135381, 0.0780958, 0.108643, 0.0951446, 0.0457848, -0.0326713, -0.128495, -0.216155, -0.253301, -0.20898, -0.100554, 0.0295637, 0.151922, 0.25399, 0.331864, 0.384662, 0.411978, 0.412661, 0.383827, 0.319169, 0.204559, 0.00188484, -0.468503, -0.469382, -0.00780173, 0.188494, 0.29862, 0.361415, 0.392026, 0.398034, 0.383828, 0.352128, 0.304444, 0.240847, 0.158879, 0.0506483, -0.105817, -0.386657, -1.92625, -0.302027, 0.0253736, 0.229056, 0.377655, 0.491535, 0.57876, 0.642717, 0.684423, 0.703196, 0.696522, 0.659048, 0.579599, 0.431169, 0.117585, -0.548453, 0.294873, 0.559378, 0.708041, 0.797862, 0.847021, 0.862216, 0.844512, 0.790147, 0.687849, 0.506966, 0.124311, -0.219103, 0.382914, 0.594803, 0.700485, 0.745418, 0.742267, 0.690527, 0.576014, 0.34821, -0.351232, 0.14819, 0.4973, 0.661994, 0.74931, 0.786437, 0.782102, 0.736396, 0.640907, 0.469509, 0.122051, -0.487556, 0.263198, 0.484239, 0.586662, 0.623127, 0.607334, 0.537597, 0.394657, 0.103137, -1.30811, 0.121755, 0.383786, 0.509079, 0.565891, 0.573713, 0.53771, 0.454402, 0.308566, 0.0519414, -0.61425, -0.295765, 0.0137017, 0.106808, 0.0894609, -0.0441148, -0.444174, -0.496142, 0.0143821, 0.226189, 0.338202, 0.389695, 0.392855, 0.348829, 0.248863, 0.0640108, -0.324179, -0.730478, -0.136095, 0.0363917, 0.0824734, 0.0351041, -0.132465, -0.645181, -0.440157, -0.0314197, 0.137619, 0.204296, 0.190089, 0.0754974, -0.270313, -0.451495, 0.141589, 0.386475, 0.526751, 0.605703, 0.636376, 0.619743, 0.54538, 0.376852, -0.0683457, -0.0246537, 0.455005, 0.669936, 0.794565, 0.865803, 0.896181, 0.889048, 0.841345, 0.740946, 0.551879, 0.106195, 0.0593119, 0.542196, 0.742296, 0.85008, 0.904101, 0.917345, 0.893508, 0.830235, 0.717419, 0.526747, 0.149356, -0.366747, 0.293509, 0.483724, 0.553454, 0.547742, 0.469391, 0.286141, -0.193828, -0.127007, 0.3084, 0.483755, 0.561322, 0.572266, 0.518939, 0.378984, 0.0467153, -0.423792, 0.27598, 0.507953, 0.622433, 0.668111, 0.655829, 0.577835, 0.394087, -0.134164, 0.103604, 0.520771, 0.714325, 0.822241, 0.876322, 0.886603, 0.853424, 0.767676, 0.599897, 0.226997, -0.101011, 0.505199, 0.722849, 0.833428, 0.882248, 0.881816, 0.831154, 0.714566, 0.474664, -0.401212, 0.364857, 0.688837, 0.848081, 0.933973, 0.971033, 0.967044, 0.921434, 0.824735, 0.647618, 0.269529, -0.0910916, 0.519736, 0.7322, 0.837899, 0.883454, 0.882758, 0.83762, 0.739757, 0.560803, 0.183429, -0.210671, 0.409017, 0.615867, 0.713173, 0.747755, 0.73247, 0.666512, 0.534524, 0.280871, -0.556772, 0.109151, 0.416749, 0.551622, 0.607378, 0.606401, 0.550947, 0.426334, 0.173824, -0.783466, 0.0664527, 0.372278, 0.517194, 0.588875, 0.611025, 0.590809, 0.526572, 0.406015, 0.18929, -0.334579, -0.219412, 0.194862, 0.373315, 0.470556, 0.52333, 0.547193, 0.551145, 0.541797, 0.524819, 0.505222, 0.48688, 0.471651, 0.458638, 0.444041, 0.421459, 0.381867, 0.311832, 0.186105, -0.0683184, -1.61931, -0.0383299, 0.278776, 0.454492, 0.564287, 0.630105, 0.659826, 0.654852, 0.611186, 0.516252, 0.334052, -0.101316, -0.150943, 0.344565, 0.555177, 0.674286, 0.741108, 0.769327, 0.763757, 0.724144, 0.645061, 0.511712, 0.281479, -0.270823, -0.125358, 0.261891, 0.416333, 0.482019, 0.489602, 0.44562, 0.342245, 0.145925, -0.307272, -0.38363, 0.0863237, 0.26611, 0.34944, 0.37446, 0.352846, 0.285731, 0.165384, -0.0321869, -0.390963, -1.52761, -0.490117, -0.354193, -0.418784, -0.788689, -0.778147, -0.265482, -0.0492966, 0.0591395, 0.0944129, 0.0585161, -0.0773744, -0.473683, -0.501651, 0.0210874, 0.251881, 0.386588, 0.464572, 0.498903, 0.492682, 0.441591, 0.329536, 0.104308, -0.608401, -0.0726015, 0.279506, 0.450994, 0.546905, 0.5946, 0.603659, 0.575989, 0.507314, 0.383443, 0.161537, -0.393058, -0.202853, 0.192396, 0.36495, 0.45617, 0.499845, 0.509245, 0.490835, 0.448358, 0.384728, 0.303572, 0.211167, 0.118882, 0.0442455, 0.00569282, 0.00998831, 0.0459398, 0.0936953, 0.136218, 0.162477, 0.165504, 0.139575, 0.0773975, -0.0342657, -0.227286, -0.62576, -0.9895, -0.413346, -0.234137, -0.169902, -0.178318, -0.252329, -0.404212, -0.681297, -1.33727, -1.29211, -1.29004, -1.21814, -0.554093, -0.238234, -0.0413263, 0.08323, 0.150395, 0.160969, 0.100118, -0.0912716, -1.01737, -0.0673482, 0.297736, 0.504695, 0.641025, 0.731842, 0.786969, 0.809893, 0.799946, 0.751777, 0.651238, 0.458217, -0.02779, 0.0675119, 0.513735, 0.712322, 0.823518, 0.882041, 0.899158, 0.876666, 0.808567, 0.675039, 0.408369, -0.944031, 0.377635, 0.67255, 0.821103, 0.900796, 0.933332, 0.925236, 0.874761, 0.770263, 0.575434, 0.116599, 0.0923884, 0.560184, 0.752358, 0.852327, 0.897369, 0.899242, 0.859502, 0.771059, 0.610504, 0.291554, -0.611484, 0.363078, 0.605689, 0.721645, 0.77166, 0.772917, 0.72847, 0.630808, 0.452783, 0.083725, -0.383436, 0.271196, 0.477409, 0.570028, 0.597675, 0.573357, 0.495945, 0.349392, 0.0766759, -0.796378, -0.145628, 0.115835, 0.182961, 0.1239, -0.132291, -0.720546, 0.128974, 0.413516, 0.576897, 0.676501, 0.731015, 0.747249, 0.725716, 0.660731, 0.535163, 0.294928, -0.461815, 0.112342, 0.445804, 0.602056, 0.68203, 0.711574, 0.698469, 0.641379, 0.528584, 0.322733, -0.160096, -0.149561, 0.292103, 0.468792, 0.553459, 0.581892, 0.56498, 0.5032, 0.387448, 0.18891, -0.207578, -0.666024, -0.0657744, 0.0916685, 0.114392, 0.0237439, -0.271413, -0.715006, 0.0149956, 0.275588, 0.421589, 0.505419, 0.544128, 0.543264, 0.501516, 0.409325, 0.237983, -0.12854, -0.527243, 0.112264, 0.334425, 0.449966, 0.507912, 0.524423, 0.505148, 0.450014, 0.353213, 0.198292, -0.0647961, -0.762595, -0.367197, -0.0439044, 0.0898516, 0.14826, 0.162178, 0.145718, 0.108483, 0.0598301, 0.0105705, -0.0279293, -0.0478363, -0.0496947, -0.0431674, -0.0434212, -0.0686392, -0.144443, -0.330427, -1.04225, -0.388781, 0.00293349, 0.220468, 0.364388, 0.461956, 0.523729, 0.553695, 0.551832, 0.514018, 0.429126, 0.267642, -0.0856474, -0.48878, 0.171458, 0.406238, 0.532627, 0.59889, 0.619198, 0.595181, 0.517644, 0.354513, -0.0398773, -0.183276, 0.365198, 0.59551, 0.731159, 0.814775, 0.861462, 0.877284, 0.863718, 0.818499, 0.734169, 0.591882, 0.333386, -0.527196, 0.183596, 0.502489, 0.657785, 0.743106, 0.78402, 0.789843, 0.762958, 0.700598, 0.592754, 0.411808, 0.0521172, -0.479714, 0.227164, 0.454264, 0.57237, 0.634358, 0.657708, 0.64923, 0.610649, 0.5398, 0.429433, 0.261691, -0.0159849, -0.755193, -0.325593, -0.0306173, 0.0694305, 0.0751604, -0.00345605, -0.210718, -0.965174, -0.32862, 0.0214923, 0.195804, 0.293412, 0.340022, 0.343154, 0.300539, 0.197441, -0.0162193, -0.686474, -0.195906, 0.174558, 0.360397, 0.471206, 0.535381, 0.563272, 0.557906, 0.517222, 0.432567, 0.280402, -0.0214737, -1.08993, 0.0436564, 0.308462, 0.445236, 0.518484, 0.547358, 0.537734, 0.488086, 0.388215, 0.207619, -0.180632, -0.486701, 0.0980969, 0.309264, 0.416969, 0.466602, 0.472432, 0.437836, 0.358753, 0.220315, -0.0227269, -0.625885, -0.409488, -0.0689549, 0.0402852, 0.0374136, -0.0812522, -0.464343, -0.50423, 0.0267477, 0.259694, 0.395429, 0.474284, 0.510033, 0.506738, 0.462017, 0.364964, 0.183725, -0.216189, -0.470316, 0.0809688, 0.275936, 0.361644, 0.376512, 0.322506, 0.1693, -0.254643, -0.240913, 0.255902, 0.477166, 0.60593, 0.68017, 0.712652, 0.706577, 0.658203, 0.553307, 0.347634, -0.212504, 0.0527141, 0.454393, 0.64208, 0.748508, 0.805177, 0.822883, 0.803988, 0.744322, 0.629426, 0.414896, -0.153555, 0.106993, 0.503465, 0.687915, 0.793332, 0.851953, 0.875884, 0.869867, 0.834534, 0.766755, 0.657606, 0.484364, 0.170641, -1.36647, 0.151586, 0.408244, 0.533311, 0.597096, 0.621467, 0.615568, 0.583396, 0.526057, 0.442248, 0.32756, 0.171657, -0.0516766, -0.438407, -1.15482, -0.38484, -0.174953, -0.0704041, -0.0124101, 0.0192497, 0.0332475, 0.0327788, 0.0174096, -0.0165198, -0.0767348, -0.178697, -0.360272, -0.784002, -0.854347, -0.340471, -0.119164, 0.00912558, 0.0833273, 0.116074, 0.110404, 0.0627572, -0.0397561, -0.234699, -0.699149, -0.718917, -0.267016, -0.0970911, -0.03428, -0.0546702, -0.182961, -0.601469, -0.504567, -0.00367009, 0.237537, 0.389873, 0.491054, 0.555252, 0.58854, 0.592906, 0.567221, 0.50658, 0.399039, 0.213441, -0.174479, -0.514231, 0.0805355, 0.288405, 0.39013, 0.430586, 0.421673, 0.361233, 0.230278, -0.0440798, -1.83644, -0.0140423, 0.271369, 0.420009, 0.503144, 0.541921, 0.543704, 0.509023, 0.431928, 0.294459, 0.0389202, -0.819993, -0.10943, 0.208441, 0.361566, 0.443536, 0.479732, 0.479041, 0.442922, 0.36646, 0.233823, -0.00463243, -0.677125, -0.245658, 0.112222, 0.28521, 0.387061, 0.448019, 0.480624, 0.49118, 0.483125, 0.458256, 0.417173, 0.359279, 0.28236, 0.181388, 0.0452501, -0.154242, -0.52377, -1.0407, -0.329598, -0.0804553, 0.071211, 0.178444, 0.259472, 0.322447, 0.371441, 0.408502, 0.434506, 0.449517, 0.452904, 0.443273, 0.418186, 0.373494, 0.301733, 0.187733, -0.00761405, -0.465425, -0.445056, 0.0385326, 0.260918, 0.399565, 0.491964, 0.551583, 0.583726, 0.589523, 0.566715, 0.50845, 0.398197, 0.188319, -0.404998, -0.0546793, 0.342793, 0.540922, 0.663109, 0.740047, 0.783265, 0.797194, 0.782281, 0.735332, 0.647624, 0.497564, 0.215632, -1.21957, 0.166753, 0.448131, 0.583245, 0.647485, 0.66028, 0.623984, 0.527095, 0.326547, -0.233203, 0.041554, 0.442792, 0.62995, 0.734675, 0.78802, 0.800147, 0.772223, 0.697466, 0.554135, 0.265419, -1.13066, 0.297798, 0.568882, 0.704727, 0.773198, 0.793296, 0.769237, 0.695206, 0.548658, 0.24487, -0.682923, 0.335147, 0.592919, 0.723768, 0.789534, 0.808196, 0.784059, 0.712358, 0.574215, 0.304184, -0.899952, 0.235422, 0.522811, 0.658012, 0.720112, 0.729466, 0.68898, 0.587883, 0.385307, -0.149848, 0.0457365, 0.453952, 0.635245, 0.731398, 0.774815, 0.775977, 0.736004, 0.647646, 0.487405, 0.16856, -0.715856, 0.248179, 0.494395, 0.61671, 0.676805, 0.694095, 0.676025, 0.624652, 0.538291, 0.411084, 0.230058, -0.0352386, -0.486199, -1.36878, -0.751263, -0.976922, -0.945117, -0.399386, -0.18039, -0.0905087, -0.105079, -0.268902, -1.18714, -0.218361, 0.148041, 0.351509, 0.479518, 0.556778, 0.591854, 0.585373, 0.530085, 0.402811, 0.118229, -0.773321, 0.253807, 0.533966, 0.689743, 0.783844, 0.836104, 0.854249, 0.840473, 0.792863, 0.704206, 0.556123, 0.29259, -0.514303, 0.0839498, 0.390818, 0.522147, 0.57481, 0.572087, 0.517579, 0.40049, 0.17926, -0.383538, -0.192331, 0.185412, 0.334484, 0.391728, 0.385255, 0.317441, 0.169402, -0.140301, -1.15947, -0.104143, 0.122277, 0.205913, 0.201074, 0.103998, -0.159876, -1.15339, -0.0395843, 0.23523, 0.375165, 0.44308, 0.455412, 0.411893, 0.294861, 0.0345124, -1.94601, 0.0483118, 0.335689, 0.47698, 0.544149, 0.555041, 0.509118, 0.386466, 0.104448, -0.829662, 0.225137, 0.499378, 0.645253, 0.725397, 0.758267, 0.748746, 0.693085, 0.574989, 0.340119, -0.430487, 0.180946, 0.517091, 0.678489, 0.764261, 0.800137, 0.794151, 0.745663, 0.644845, 0.461235, 0.0672397, -0.24094, 0.331648, 0.529047, 0.617943, 0.640581, 0.605001, 0.499505, 0.270179, -0.548767, 0.148915, 0.481105, 0.643146, 0.729733, 0.765696, 0.758329, 0.70555, 0.593633, 0.377246, -0.216637, 0.0913697, 0.471798, 0.645043, 0.736891, 0.777328, 0.775786, 0.732263, 0.637165, 0.459391, 0.0632324, -0.163295, 0.397979, 0.617503, 0.740619, 0.812218, 0.84844, 0.856378, 0.838992, 0.796562, 0.7267, 0.622952, 0.469972, 0.224225, -0.351292, -0.166805, 0.220239, 0.391949, 0.489025, 0.545358, 0.574142, 0.581259, 0.56888, 0.536484, 0.480627, 0.393198, 0.255575, 0.0135825, -0.711306, -0.172432, 0.182375, 0.362104, 0.471055, 0.536504, 0.568493, 0.570318, 0.541073, 0.475315, 0.359297, 0.155449, -0.309821, -0.346444, 0.115346, 0.299127, 0.388468, 0.419228, 0.400462, 0.327943, 0.1789, -0.136985, -0.900506, -0.0175239, 0.225684, 0.344101, 0.395104, 0.394169, 0.341749, 0.224012, -0.00937938, -0.713663, -0.233182, 0.100348, 0.243218, 0.300648, 0.295565, 0.227549, 0.0726412, -0.277128, -0.750735, -0.0810328, 0.122391, 0.198015, 0.183739, 0.0604125, -0.334341, -0.324613, 0.195078, 0.43102, 0.57218, 0.657645, 0.700948, 0.706257, 0.671605, 0.587145, 0.424352, 0.070322, -0.358354, 0.306534, 0.534539, 0.651936, 0.707446, 0.715101, 0.676003, 0.579604, 0.389215, -0.0784932, -0.0541722, 0.402263, 0.593671, 0.693394, 0.737499, 0.73725, 0.69373, 0.599067, 0.427896, 0.0844091, -0.611747, 0.183226, 0.393384, 0.473854, 0.473211, 0.390428, 0.171917, -0.773637, 0.128199, 0.458462, 0.627582, 0.722849, 0.768171, 0.771026, 0.730277, 0.634877, 0.449675, 0.00897856, -0.0456158, 0.441281, 0.642197, 0.749955, 0.803339, 0.815269, 0.789108, 0.721579, 0.599925, 0.385915, -0.108367, -0.0871745, 0.345819, 0.519356, 0.603738, 0.635637, 0.628197, 0.586515, 0.511761, 0.402593, 0.256006, 0.0694307, -0.150343, -0.356546, -0.43389, -0.343556, -0.201915, -0.0925403, -0.0434335, -0.0752853, -0.249992, -1.30679, -0.168149, 0.194249, 0.400277, 0.532952, 0.616313, 0.659136, 0.663046, 0.623449, 0.525285, 0.322166, -0.263886, 0.0682948, 0.458126, 0.640852, 0.740332, 0.785435, 0.783847, 0.731919, 0.610275, 0.347348, -3.37803, 0.37861, 0.673702, 0.828926, 0.916998, 0.959097, 0.962204, 0.925992, 0.842541, 0.688209, 0.377795, -0.563607, 0.453678, 0.704989, 0.828591, 0.88597, 0.894343, 0.856497, 0.764084, 0.58693, 0.19328, -0.0688479, 0.495044, 0.701232, 0.803812, 0.846399, 0.841864, 0.791131, 0.684351, 0.488485, 0.0544046, -0.113474, 0.381378, 0.554554, 0.620414, 0.613158, 0.530307, 0.326809, -0.346533, 0.15414, 0.516318, 0.690161, 0.783847, 0.82445, 0.819843, 0.767855, 0.65377, 0.427611, -0.253665, 0.213547, 0.565546, 0.729374, 0.814466, 0.848167, 0.838864, 0.785733, 0.677969, 0.481257, 0.0378516, -0.0747741, 0.409942, 0.593582, 0.679057, 0.704641, 0.680621, 0.60451, 0.458307, 0.176561, -1.05955, 0.0767253, 0.339193, 0.44205, 0.459209, 0.399959, 0.234915, -0.221998, -0.155173, 0.304572, 0.502931, 0.607552, 0.6533, 0.649641, 0.593431, 0.46462, 0.185935, -1.0515, 0.254599, 0.534565, 0.682343, 0.765568, 0.804814, 0.807523, 0.774767, 0.701994, 0.575262, 0.353665, -0.173904, -0.0671591, 0.340421, 0.508142, 0.5889, 0.61615, 0.600148, 0.540925, 0.428199, 0.227889, -0.219936, -0.314284, 0.172542, 0.369099, 0.476531, 0.53621, 0.564036, 0.567828, 0.5519, 0.518573, 0.468569, 0.400707, 0.310697, 0.187874, 0.00445812, -0.342922, -0.901355, -0.141779, 0.120194, 0.276943, 0.381122, 0.449147, 0.486607, 0.49379, 0.466379, 0.392684, 0.241552, -0.112745, -0.399207, 0.228415, 0.479055, 0.628916, 0.72484, 0.78292, 0.809571, 0.806482, 0.771662, 0.698239, 0.569082, 0.333484, -0.339257, 0.0953972, 0.449381, 0.614767, 0.703605, 0.744184, 0.746239, 0.711662, 0.636155, 0.50572, 0.278931, -0.260044, -0.144253, 0.250911, 0.407051, 0.473358, 0.481323, 0.438122, 0.337294, 0.150302, -0.246649, -0.59329, -0.0229342, 0.155273, 0.215716, 0.195212, 0.0850396, -0.196357, -1.00243, -0.0455448, 0.222697, 0.364746, 0.441264, 0.470661, 0.45825, 0.401257, 0.285878, 0.0675748, -0.515679, -0.23891, 0.145694, 0.3208, 0.417013, 0.466956, 0.483894, 0.474679, 0.443686, 0.394601, 0.331663, 0.260754, 0.190096, 0.129517, 0.0871097, 0.0644121, 0.0542916, 0.0434862, 0.0159551, -0.0479478, -0.182459, -0.500441, -0.941278, -0.220503, 0.040511, 0.188398, 0.273149, 0.309274, 0.298352, 0.230675, 0.0720332, -0.340914, -0.380588, 0.1336, 0.358971, 0.491118, 0.569575, 0.608099, 0.611416, 0.578952, 0.504443, 0.370696, 0.125325, -0.592542, -0.108038, 0.221732, 0.364448, 0.425043, 0.427401, 0.373673, 0.247724, -0.0164452, -1.38948, -0.050071, 0.237618, 0.376602, 0.444132, 0.461761, 0.435829, 0.36446, 0.236354, 0.0183551, -0.428513, -0.715375, -0.241154, -0.143242, -0.214362, -0.571319, -0.600856, -0.0654068, 0.162624, 0.283468, 0.333759, 0.318379, 0.217704, -0.0637698, -0.629605, 0.190998, 0.47153, 0.634447, 0.735259, 0.791613, 0.809309, 0.787379, 0.717083, 0.572447, 0.25474, -0.346529, 0.449481, 0.705994, 0.847203, 0.928296, 0.96666, 0.967974, 0.931366, 0.848691, 0.696301, 0.389518, -0.566776, 0.470735, 0.729354, 0.861873, 0.93098, 0.955511, 0.94134, 0.887156, 0.783461, 0.602334, 0.234848, -0.262971, 0.407949, 0.615156, 0.706812, 0.730932, 0.697618, 0.597755, 0.386659, -0.232057, 0.140779, 0.512737, 0.68433, 0.774595, 0.812441, 0.806745, 0.756804, 0.651561, 0.455269, -0.00306164, -0.0432817, 0.423307, 0.609749, 0.701931, 0.736741, 0.72464, 0.664189, 0.54032, 0.299811, -0.465809, 0.121358, 0.453475, 0.610439, 0.693049, 0.728105, 0.725237, 0.686816, 0.6098, 0.483503, 0.278359, -0.122301, -0.558303, 0.0440026, 0.224602, 0.293051, 0.295434, 0.242566, 0.128915, -0.075201, -0.506574, -0.76301, -0.255123, -0.0950886, -0.0437214, -0.0604377, -0.135451, -0.271864, -0.483339, -0.790222, -1.12963, -1.05332, -0.678976, -0.374888, -0.159701, -0.0113836, 0.0839831, 0.132384, 0.132807, 0.0742832, -0.0798814, -0.514645, -0.446155, 0.0434203, 0.271218, 0.409703, 0.496114, 0.543802, 0.557576, 0.537225, 0.477231, 0.362137, 0.145811, -0.443337, -0.13561, 0.252902, 0.436339, 0.541805, 0.600669, 0.624727, 0.618507, 0.58235, 0.512539, 0.398656, 0.212994, -0.149879, -0.68418, 0.0241287, 0.25532, 0.381846, 0.458229, 0.504172, 0.52953, 0.54031, 0.540646, 0.533528, 0.520987, 0.50405, 0.482606, 0.455257, 0.419141, 0.369564, 0.298978, 0.193976, 0.0248457, -0.312064, -0.883028, -0.116, 0.139138, 0.284, 0.372393, 0.421464, 0.437249, 0.420084, 0.364948, 0.257465, 0.0557278, -0.461293, -0.294311, 0.133539, 0.331613, 0.447909, 0.516642, 0.550481, 0.554422, 0.529311, 0.472362, 0.375498, 0.218726, -0.0603134, -1.06199, -0.19972, 0.0882743, 0.216975, 0.271146, 0.271202, 0.218085, 0.0946797, -0.168285, -2.08066, -0.149741, 0.148528, 0.306915, 0.399716, 0.448751, 0.461679, 0.439271, 0.375937, 0.254639, 0.0216458, -0.718223, -0.144338, 0.205069, 0.37938, 0.480818, 0.536211, 0.554937, 0.538838, 0.48372, 0.375878, 0.174806, -0.32709, -0.210633, 0.22343, 0.416147, 0.522646, 0.576742, 0.588994, 0.560059, 0.481384, 0.3253, -0.0195383, -0.452073, 0.230487, 0.471868, 0.604788, 0.679211, 0.710809, 0.703809, 0.655003, 0.550778, 0.34882, -0.182069, 0.0165677, 0.432728, 0.623238, 0.730154, 0.785934, 0.801189, 0.777365, 0.708017, 0.572101, 0.295682, -1.50864, 0.327492, 0.61689, 0.771423, 0.86273, 0.912632, 0.929737, 0.91698, 0.873514, 0.794232, 0.66621, 0.454543, 0.00672748, -0.14982, 0.340159, 0.521119, 0.60584, 0.634466, 0.61951, 0.562995, 0.458702, 0.286114, -0.0248271, -1.63645, -0.132387, 0.103569, 0.187239, 0.189653, 0.123785, -0.0231247, -0.315053, -1.56277, -0.473977, -0.273132, -0.287251, -0.576228, -0.685312, -0.067861, 0.20735, 0.37817, 0.490046, 0.559425, 0.593025, 0.592429, 0.554736, 0.470271, 0.312798, -0.0147002, -0.666337, 0.141122, 0.385502, 0.512376, 0.577421, 0.597492, 0.576998, 0.512323, 0.388345, 0.156517, -0.495157, -0.103735, 0.250691, 0.409484, 0.48784, 0.513446, 0.493856, 0.425901, 0.292062, 0.0301706, -1.02186, -0.0576828, 0.242717, 0.38843, 0.463761, 0.492155, 0.481414, 0.431693, 0.335603, 0.170646, -0.142985, -1.33225, -0.125993, 0.123204, 0.241638, 0.295362, 0.303857, 0.273003, 0.200884, 0.0758769, -0.138351, -0.617581, -0.64445, -0.191197, -0.00575388, 0.0943524, 0.14867, 0.172814, 0.17479, 0.159429, 0.130006, 0.0889239, 0.038053, -0.0210578, -0.0869067, -0.157504, -0.229326, -0.295603, -0.3446, -0.360632, -0.331437, -0.257968, -0.154412, -0.0383169, 0.0769903, 0.183582, 0.277276, 0.355908, 0.418183, 0.46297, 0.488813, 0.493424, 0.47288, 0.419942, 0.31951, 0.131825, -0.332993, -0.272432, 0.197688, 0.412906, 0.542544, 0.623157, 0.667777, 0.681108, 0.663093, 0.608868, 0.505044, 0.313807, -0.145056, -0.129377, 0.345386, 0.556112, 0.680706, 0.757157, 0.799438, 0.813413, 0.800898, 0.760638, 0.687596, 0.569566, 0.374365, -0.0304661, -0.3014, 0.263855, 0.476498, 0.592574, 0.657417, 0.686817, 0.68716, 0.66024, 0.604302, 0.512966, 0.370358, 0.130655, -0.468507, -0.206027, 0.169579, 0.337942, 0.428818, 0.473324, 0.482321, 0.458609, 0.399221, 0.293132, 0.109077, -0.282592, -0.565184, 0.016294, 0.235565, 0.355418, 0.421016, 0.447143, 0.438359, 0.393099, 0.302614, 0.142385, -0.175302, -1.05044, -0.0895625, 0.157714, 0.278971, 0.333605, 0.337221, 0.289735, 0.175401, -0.06512, -1.01029, -0.143849, 0.177789, 0.339803, 0.430002, 0.472561, 0.475727, 0.440371, 0.360914, 0.220747, -0.0302795, -0.709073, -0.340442, -0.0280013, 0.0713271, 0.0554101, -0.0976446, -0.723703, -0.195899, 0.202569, 0.411321, 0.540896, 0.620362, 0.660477, 0.664421, 0.62995, 0.547517, 0.390289, 0.0567279, -0.517432, 0.239772, 0.479895, 0.604385, 0.666506, 0.681973, 0.653734, 0.575182, 0.422718, 0.107443, -0.708665, 0.211237, 0.456408, 0.575919, 0.62833, 0.629528, 0.580474, 0.468623, 0.248958, -0.352173, -0.0536343, 0.310676, 0.460745, 0.518482, 0.506347, 0.415771, 0.186452, -0.96593, 0.184113, 0.503762, 0.67055, 0.765211, 0.81003, 0.811314, 0.766095, 0.658802, 0.436795, -0.289773, 0.280524, 0.633996, 0.809641, 0.910423, 0.963362, 0.977909, 0.955865, 0.892803, 0.774204, 0.556154, -0.00732551, 0.22146, 0.613839, 0.787938, 0.879323, 0.919552, 0.918986, 0.87904, 0.793492, 0.642263, 0.356807, -1.09182, 0.298302, 0.574074, 0.704772, 0.767168, 0.783183, 0.760092, 0.697943, 0.589788, 0.415312, 0.107553, -1.16909, -0.035883, 0.205137, 0.288629, 0.289298, 0.219696, 0.0627025, -0.273722, -0.957986, -0.166804, 0.0450115, 0.131047, 0.146377, 0.106605, 0.0151058, -0.129414, -0.321621, -0.504967, -0.512087, -0.305925, -0.0579918, 0.151848, 0.314819, 0.4361, 0.520911, 0.572299, 0.590807, 0.573867, 0.513754, 0.390802, 0.142622, -0.848145, 0.0667533, 0.381388, 0.537998, 0.622097, 0.656676, 0.648328, 0.594632, 0.481781, 0.265068, -0.317278, -0.044148, 0.33604, 0.502298, 0.583419, 0.608731, 0.585706, 0.510002, 0.360394, 0.0570894, -1.09762, 0.0858198, 0.32939, 0.433688, 0.459603, 0.416355, 0.283241, -0.0505895, -0.437999, 0.230367, 0.470856, 0.600337, 0.667529, 0.686999, 0.660782, 0.580333, 0.41549, 0.0344731, -0.212635, 0.365481, 0.588079, 0.709542, 0.774649, 0.798317, 0.785386, 0.734735, 0.638463, 0.474379, 0.166623, -1.43247, 0.141923, 0.390607, 0.50036, 0.539597, 0.526421, 0.462999, 0.338731, 0.11578 +}; #endif /* MULTIPATH_V30_M8_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v3_M10.h b/src/lte/model/JakesTraces/multipath_v3_M10.h index e1d39d89e..e56003a06 100644 --- a/src/lte/model/JakesTraces/multipath_v3_M10.h +++ b/src/lte/model/JakesTraces/multipath_v3_M10.h @@ -23,8 +23,8 @@ #define MULTIPATH_V3_M10_H_ static double multipath_M10_v_3[3000] = { - 0.928494, 0.927872, 0.926834, 0.925379, 0.923503, 0.921203, 0.918475, 0.915312, 0.911709, 0.907659, 0.903153, 0.898182, 0.892735, 0.8868, 0.880364, 0.873412, 0.865927, 0.857891, 0.849284, 0.840082, 0.83026, 0.81979, 0.80864, 0.796774, 0.784152, 0.77073, 0.756458, 0.741277, 0.725122, 0.707918, 0.689581, 0.670009, 0.649088, 0.626681, 0.602628, 0.576736, 0.548773, 0.518454, 0.485428, 0.449249, 0.409345, 0.364962, 0.315083, 0.258279, 0.192463, 0.114404, 0.0187072, -0.1047, -0.278262, -0.57241, -2.08186, -0.600346, -0.292513, -0.114518, 0.0110118, 0.107908, 0.186704, 0.252995, 0.310111, 0.360195, 0.404707, 0.444688, 0.480904, 0.51394, 0.544245, 0.57218, 0.598031, 0.622034, 0.644385, 0.665246, 0.684755, 0.70303, 0.720171, 0.736266, 0.75139, 0.765609, 0.778983, 0.791562, 0.803393, 0.814515, 0.824966, 0.834778, 0.84398, 0.852599, 0.860657, 0.868178, 0.875179, 0.881679, 0.887693, 0.893236, 0.898321, 0.90296, 0.907162, 0.910939, 0.914297, 0.917246, 0.919792, 0.92194, 0.923697, 0.925066, 0.926052, 0.926658, 0.926887, 0.92674, 0.926219, 0.925325, 0.924057, 0.922417, 0.920402, 0.918011, 0.915243, 0.912094, 0.908561, 0.90464, 0.900326, 0.895615, 0.890499, 0.884973, 0.879028, 0.872656, 0.865847, 0.85859, 0.850874, 0.842687, 0.834012, 0.824836, 0.81514, 0.804905, 0.794111, 0.782733, 0.770746, 0.758121, 0.744825, 0.730825, 0.716078, 0.700542, 0.684165, 0.66689, 0.648654, 0.629382, 0.60899, 0.587381, 0.564442, 0.540039, 0.514017, 0.486189, 0.45633, 0.424167, 0.389361, 0.351486, 0.309997, 0.264181, 0.213077, 0.155352, 0.08907, 0.011277, -0.0828819, -0.202243, -0.365684, -0.627354, -1.36705, -0.830645, -0.473819, -0.282807, -0.152329, -0.0535971, 0.025501, 0.0912174, 0.147205, 0.195782, 0.238515, 0.27651, 0.310577, 0.341328, 0.369234, 0.394669, 0.41793, 0.439262, 0.458863, 0.476901, 0.493516, 0.508828, 0.522937, 0.535932, 0.547887, 0.558868, 0.568933, 0.578131, 0.586507, 0.594099, 0.600941, 0.607062, 0.61249, 0.617247, 0.621352, 0.624825, 0.627679, 0.629928, 0.631582, 0.632651, 0.633142, 0.63306, 0.632409, 0.631191, 0.629407, 0.627057, 0.624137, 0.620643, 0.61657, 0.61191, 0.606653, 0.60079, 0.594306, 0.587185, 0.579412, 0.570963, 0.561818, 0.551948, 0.541325, 0.529913, 0.517674, 0.504564, 0.490533, 0.475522, 0.459467, 0.442292, 0.423909, 0.404217, 0.383096, 0.360407, 0.335983, 0.309625, 0.281089, 0.250079, 0.216223, 0.179052, 0.137958, 0.0921362, 0.040488, -0.0185381, -0.0872387, -0.169224, -0.270657, -0.403433, -0.595643, -0.948305, -1.55131, -0.773849, -0.511629, -0.350109, -0.233397, -0.142207, -0.0675594, -0.00453697, 0.0498485, 0.0975486, 0.139909, 0.177895, 0.212225, 0.243447, 0.271986, 0.298184, 0.322314, 0.3446, 0.365228, 0.384355, 0.402112, 0.418611, 0.433948, 0.448207, 0.461461, 0.473771, 0.485193, 0.495777, 0.505564, 0.514593, 0.522897, 0.530506, 0.537447, 0.543743, 0.549414, 0.554479, 0.558955, 0.562855, 0.566192, 0.568977, 0.571218, 0.572923, 0.574099, 0.57475, 0.574881, 0.574492, 0.573586, 0.572162, 0.570218, 0.567753, 0.564762, 0.56124, 0.557181, 0.552575, 0.547415, 0.541689, 0.535384, 0.528485, 0.520976, 0.512838, 0.504049, 0.494586, 0.48442, 0.473522, 0.461856, 0.449385, 0.436063, 0.42184, 0.40666, 0.390458, 0.373159, 0.354676, 0.334911, 0.313746, 0.291046, 0.266647, 0.240355, 0.211936, 0.181102, 0.147496, 0.110666, 0.0700301, 0.0248223, -0.0259976, -0.0838897, -0.150996, -0.230645, -0.32843, -0.454879, -0.63381, -0.942526, -2.43369, -0.917278, -0.624145, -0.451721, -0.329512, -0.235062, -0.158295, -0.0938137, -0.0383872, 0.0100724, 0.0529924, 0.0913917, 0.126023, 0.157458, 0.186141, 0.212424, 0.236591, 0.258872, 0.27946, 0.298515, 0.316171, 0.332543, 0.34773, 0.361816, 0.374875, 0.38697, 0.398159, 0.408488, 0.418003, 0.42674, 0.434733, 0.442013, 0.448604, 0.45453, 0.459812, 0.464467, 0.468511, 0.471956, 0.474815, 0.477097, 0.478811, 0.479961, 0.480554, 0.480592, 0.480078, 0.479011, 0.477392, 0.475216, 0.472481, 0.46918, 0.465308, 0.460854, 0.455809, 0.450161, 0.443895, 0.436995, 0.429442, 0.421215, 0.412289, 0.402637, 0.392228, 0.381026, 0.368991, 0.356078, 0.342235, 0.327403, 0.311515, 0.294493, 0.276247, 0.256672, 0.235645, 0.213024, 0.188635, 0.162272, 0.133685, 0.102564, 0.0685251, 0.0310768, -0.0104171, -0.0568034, -0.109243, -0.169389, -0.239708, -0.324128, -0.429469, -0.569253, -0.776996, -1.18977, -1.42261, -0.854081, -0.616723, -0.464746, -0.352996, -0.264792, -0.1921, -0.130428, -0.0770098, -0.030018, 0.0118154, 0.0494072, 0.0834416, 0.114443, 0.14282, 0.168902, 0.192951, 0.215186, 0.235786, 0.254903, 0.272666, 0.289182, 0.304545, 0.318838, 0.332129, 0.344481, 0.355948, 0.366576, 0.376408, 0.38548, 0.393826, 0.401473, 0.408447, 0.414772, 0.420467, 0.42555, 0.430036, 0.433938, 0.437269, 0.440038, 0.442254, 0.443923, 0.44505, 0.44564, 0.445696, 0.445217, 0.444205, 0.442659, 0.440575, 0.437949, 0.434776, 0.431049, 0.42676, 0.421899, 0.416454, 0.410412, 0.403757, 0.396471, 0.388534, 0.379923, 0.370613, 0.360575, 0.349776, 0.338178, 0.32574, 0.312414, 0.298146, 0.282874, 0.266527, 0.249024, 0.23027, 0.210154, 0.188549, 0.165302, 0.14023, 0.113115, 0.0836886, 0.051621, 0.0164969, -0.0222143, -0.0652066, -0.113411, -0.168118, -0.231191, -0.305459, -0.395537, -0.509724, -0.665426, -0.910671, -1.52765, -1.19847, -0.806811, -0.604978, -0.468374, -0.365243, -0.282577, -0.21376, -0.154963, -0.103772, -0.0585644, -0.0181988, 0.0181593, 0.0511375, 0.0812202, 0.108789, 0.134148, 0.157547, 0.179191, 0.199248, 0.217864, 0.235158, 0.251236, 0.266187, 0.280087, 0.293005, 0.304999, 0.31612, 0.326414, 0.335921, 0.344676, 0.352711, 0.360053, 0.366727, 0.372753, 0.378152, 0.382939, 0.387129, 0.390736, 0.393769, 0.396237, 0.398149, 0.39951, 0.400324, 0.400595, 0.400325, 0.399513, 0.398158, 0.396259, 0.393812, 0.390811, 0.387249, 0.383119, 0.37841, 0.373111, 0.367209, 0.360687, 0.353528, 0.345712, 0.337216, 0.328013, 0.318075, 0.307368, 0.295856, 0.283494, 0.270236, 0.256025, 0.240801, 0.224489, 0.207008, 0.188261, 0.168136, 0.146502, 0.123203, 0.0980536, 0.0708284, 0.0412537, 0.00898989, -0.0263902, -0.0654343, -0.108861, -0.157637, -0.213111, -0.277236, -0.353006, -0.445349, -0.563272, -0.726129, -0.990121, -1.77634, -1.16297, -0.81266, -0.621906, -0.490399, -0.390167, -0.309351, -0.241803, -0.183919, -0.133408, -0.0887193, -0.0487561, -0.0127144, 0.0200132, 0.0498964, 0.077306, 0.10254, 0.125839, 0.147405, 0.167404, 0.185976, 0.203241, 0.2193, 0.234241, 0.24814, 0.261064, 0.27307, 0.28421, 0.294527, 0.304061, 0.312847, 0.320915, 0.328294, 0.335006, 0.341074, 0.346515, 0.351347, 0.355584, 0.359237, 0.362318, 0.364835, 0.366796, 0.368206, 0.36907, 0.369391, 0.36917, 0.368407, 0.367101, 0.36525, 0.36285, 0.359895, 0.356378, 0.352291, 0.347623, 0.342364, 0.336499, 0.330012, 0.322885, 0.315097, 0.306626, 0.297445, 0.287523, 0.276828, 0.26532, 0.252958, 0.23969, 0.225462, 0.21021, 0.193859, 0.176325, 0.15751, 0.1373, 0.115558, 0.0921262, 0.0668123, 0.0393855, 0.00956278, -0.0230069, -0.0587668, -0.0982868, -0.142317, -0.191873, -0.248375, -0.313901, -0.391664, -0.487025, -0.609973, -0.782713, -1.07451, -2.45403, -1.11275, -0.802399, -0.623734, -0.498014, -0.401143, -0.3225, -0.256453, -0.199655, -0.149952, -0.105878, -0.0663904, -0.0307185, 0.00172083, 0.0313801, 0.0586177, 0.0837218, 0.106928, 0.12843, 0.148391, 0.166948, 0.184217, 0.200298, 0.215277, 0.229228, 0.242218, 0.254302, 0.26553, 0.275947, 0.285592, 0.294499, 0.302698, 0.310216, 0.317078, 0.323304, 0.328914, 0.333923, 0.338346, 0.342196, 0.345484, 0.348218, 0.350406, 0.352055, 0.353169, 0.353752, 0.353805, 0.35333, 0.352327, 0.350792, 0.348725, 0.346119, 0.342971, 0.339271, 0.335012, 0.330184, 0.324774, 0.31877, 0.312154, 0.30491, 0.297017, 0.288452, 0.279189, 0.269199, 0.258448, 0.246901, 0.234514, 0.221241, 0.207025, 0.191807, 0.175514, 0.158065, 0.139366, 0.119306, 0.0977557, 0.0745636, 0.0495472, 0.0224872, -0.00688378, -0.0388962, -0.0739652, -0.112621, -0.155558, -0.203708, -0.258359, -0.321374, -0.395583, -0.485597, -0.599712, -0.755317, -1.00039, -1.61636, -1.28901, -0.896961, -0.695002, -0.558324, -0.455138, -0.372428, -0.303573, -0.244744, -0.193525, -0.148294, -0.107908, -0.0715334, -0.0385423, -0.00845057, 0.0191231, 0.0444841, 0.0678806, 0.089517, 0.109563, 0.128163, 0.145437, 0.161489, 0.176409, 0.190273, 0.203148, 0.215094, 0.22616, 0.236393, 0.245831, 0.25451, 0.262461, 0.26971, 0.276282, 0.282198, 0.287475, 0.292131, 0.296179, 0.299631, 0.302497, 0.304784, 0.306501, 0.307651, 0.308238, 0.308264, 0.30773, 0.306634, 0.304974, 0.302746, 0.299944, 0.296561, 0.292588, 0.288013, 0.282826, 0.27701, 0.270548, 0.263422, 0.255608, 0.247082, 0.237815, 0.227773, 0.216921, 0.205217, 0.192612, 0.179052, 0.164475, 0.14881, 0.131974, 0.113873, 0.0943935, 0.0734064, 0.0507565, 0.0262588, -0.000309782, -0.0292218, -0.0608149, -0.0955137, -0.133863, -0.176575, -0.224612, -0.279309, -0.342604, -0.41746, -0.508747, -0.625337, -0.786214, -1.04598, -1.79307, -1.23761, -0.879911, -0.686599, -0.553539, -0.452128, -0.370309, -0.301854, -0.243121, -0.191794, -0.146311, -0.105567, -0.0687526, -0.0352557, -0.00460357, 0.0235767, 0.0495847, 0.0736643, 0.0960168, 0.11681, 0.136186, 0.154264, 0.171149, 0.186927, 0.201677, 0.215466, 0.228352, 0.240388, 0.251619, 0.262085, 0.271823, 0.280865, 0.289238, 0.296969, 0.304081, 0.310593, 0.316523, 0.321888, 0.326702, 0.330977, 0.334724, 0.337953, 0.340672, 0.342889, 0.344608, 0.345836, 0.346574, 0.346827, 0.346595, 0.345879, 0.344678, 0.342991, 0.340815, 0.338147, 0.334982, 0.331314, 0.327137, 0.322441, 0.317217, 0.311454, 0.305141, 0.298262, 0.290802, 0.282743, 0.274065, 0.264746, 0.25476, 0.244079, 0.232672, 0.220503, 0.207533, 0.193716, 0.179003, 0.163334, 0.146645, 0.12886, 0.109893, 0.0896438, 0.0679951, 0.0448101, 0.0199264, -0.00685016, -0.0357542, -0.0670728, -0.101163, -0.138473, -0.179584, -0.225258, -0.276528, -0.334846, -0.402335, -0.482292, -0.580244, -0.706568, -0.884616, -1.18932, -3.16747, -1.18361, -0.88681, -0.713645, -0.591455, -0.497344, -0.421088, -0.357228, -0.302503, -0.254807, -0.212705, -0.175172, -0.141453, -0.110974, -0.0832904, -0.058051, -0.0349727, -0.0138251, 0.00558171, 0.0234059, 0.0397805, 0.0548178, 0.0686137, 0.0812499, 0.0927969, 0.103315, 0.112857, 0.121468, 0.129186, 0.136044, 0.142072, 0.147294, 0.151729, 0.155394, 0.158303, 0.160465, 0.161887, 0.162574, 0.162526, 0.161743, 0.16022, 0.157949, 0.15492, 0.151119, 0.14653, 0.141132, 0.1349, 0.127805, 0.119812, 0.110882, 0.100969, 0.0900197, 0.077971, 0.0647509, 0.0502752, 0.0344451, 0.0171446, -0.00176383, -0.0224442, -0.0450941, -0.0699533, -0.0973176, -0.127556, -0.161136, -0.198665, -0.240946, -0.289077, -0.34461, -0.409842, -0.488388, -0.586422, -0.715867, -0.904905, -1.25512, -1.8457, -1.07076, -0.805653, -0.640902, -0.52086, -0.426297, -0.348252, -0.281816, -0.224001, -0.17286, -0.127045, -0.08559, -0.0477768, -0.0130564, 0.0189993, 0.0487313, 0.0764152, 0.102277, 0.126505, 0.149256, 0.170663, 0.190842, 0.20989, 0.227893, 0.244924, 0.26105, 0.276328, 0.290808, 0.304537, 0.317554, 0.329897, 0.341597, 0.352685, 0.363187, 0.373128, 0.382528, 0.391408, 0.399787, 0.40768, 0.415104, 0.422071, 0.428595, 0.434687, 0.440358, 0.445617, 0.450474, 0.454935, 0.45901, 0.462703, 0.466022, 0.468972, 0.471557, 0.473782, 0.475652, 0.477168, 0.478334, 0.479153, 0.479627, 0.479757, 0.479544, 0.47899, 0.478094, 0.476856, 0.475277, 0.473356, 0.471091, 0.46848, 0.465522, 0.462214, 0.458554, 0.454538, 0.450162, 0.445423, 0.440315, 0.434833, 0.428971, 0.422724, 0.416083, 0.409042, 0.401591, 0.393722, 0.385425, 0.376689, 0.367501, 0.357849, 0.34772, 0.337096, 0.325962, 0.3143, 0.302088, 0.289306, 0.275929, 0.26193, 0.24728, 0.231947, 0.215895, 0.199083, 0.181467, 0.162998, 0.143619, 0.123266, 0.101868, 0.0793414, 0.0555924, 0.0305112, 0.00397053, -0.0241795, -0.0541166, -0.0860534, -0.120248, -0.157018, -0.196757, -0.23997, -0.287309, -0.33964, -0.398158, -0.46456, -0.541393, -0.632725, -0.745672, -0.894496, -1.1153, -1.56509, -1.68126, -1.17119, -0.948839, -0.806826, -0.703503, -0.623105, -0.557946, -0.503701, -0.457691, -0.418147, -0.383839, -0.353879, -0.327606, -0.304517, -0.284221, -0.266409, -0.250835, -0.2373, -0.225643, -0.215734, -0.207466, -0.200754, -0.19553, -0.19174, -0.189345, -0.188318, -0.188643, -0.190313, -0.193336, -0.197727, -0.203515, -0.210739, -0.219452, -0.229723, -0.241639, -0.255305, -0.270852, -0.288441, -0.308272, -0.330591, -0.355705, -0.384006, -0.415996, -0.452335, -0.493908, -0.54194, -0.598196, -0.66534, -0.747676, -0.852837, -0.99645, -1.21964, -1.72457, -1.62958, -1.17661, -0.956862, -0.809774, -0.698809, -0.609581, -0.534928, -0.470761, -0.414524, -0.36451, -0.319524, -0.278696, -0.241374, -0.207054, -0.175341, -0.145918, -0.118528, -0.0929592, -0.0690347, -0.046606, -0.0255467, -0.00574889, 0.0128807, 0.0304229, 0.0469482, 0.0625183, 0.0771877, 0.0910042, 0.104011, 0.116245, 0.12774, 0.138526, 0.14863, 0.158077, 0.166886, 0.175078, 0.182669, 0.189673, 0.196105, 0.201976, 0.207296, 0.212073, 0.216315, 0.220028, 0.223216, 0.225883, 0.228033, 0.229665, 0.23078, 0.231377, 0.231454, 0.231007, 0.230033, 0.228524, 0.226475, 0.223877, 0.220719, 0.21699, 0.212677, 0.207765, 0.202236, 0.196072, 0.18925, 0.181745, 0.17353, 0.164574, 0.154841, 0.144292, 0.132881, 0.120558, 0.107264, 0.0929328, 0.0774884, 0.0608425, 0.0428931, 0.0235207, 0.00258498, -0.020081, -0.0446772, -0.0714459, -0.100685, -0.132764, -0.168154, -0.207461, -0.251489, -0.301334, -0.358545, -0.425411, -0.505532, -0.605047, -0.735795, -0.925679, -1.27461, -1.89398, -1.10259, -0.83753, -0.673851, -0.555175, -0.462106, -0.385625, -0.320796, -0.264623, -0.215148, -0.171024, -0.131283, -0.0952062, -0.0622448, -0.0319716, -0.00404702, 0.0218032, 0.0458036, 0.0681401, 0.0889686, 0.10842, 0.126608, 0.143627, 0.15956, 0.174479, 0.188448, 0.201521, 0.213745, 0.225164, 0.235815, 0.245731, 0.25494, 0.263469, 0.271341, 0.278575, 0.285189, 0.291198, 0.296616, 0.301453, 0.305718, 0.309421, 0.312566, 0.315159, 0.317202, 0.318698, 0.319645, 0.320044, 0.319891, 0.319182, 0.317911, 0.316071, 0.313652, 0.310644, 0.307034, 0.302806, 0.297943, 0.292426, 0.286233, 0.279336, 0.271708, 0.263315, 0.25412, 0.244081, 0.233148, 0.221266, 0.208372, 0.194394, 0.179248, 0.162835, 0.145042, 0.125735, 0.104754, 0.0819103, 0.0569727, 0.0296595, -0.000379215, -0.0335854, -0.0705273, -0.111953, -0.158876, -0.212713, -0.275537, -0.35055, -0.443097, -0.56313, -0.73274, -1.02065, -2.34859, -1.05798, -0.74349, -0.561514, -0.432657, -0.332697, -0.250969, -0.181824, -0.121904, -0.0690507, -0.021793, 0.020916, 0.0598483, 0.0955894, 0.128594, 0.159223, 0.187766, 0.21446, 0.239502, 0.263057, 0.285262, 0.306238, 0.326085, 0.344892, 0.362736, 0.379685, 0.395798, 0.411127, 0.42572, 0.439618, 0.452859, 0.465476, 0.4775, 0.488958, 0.499876, 0.510277, 0.52018, 0.529604, 0.538568, 0.547087, 0.555175, 0.562846, 0.570112, 0.576984, 0.583472, 0.589587, 0.595337, 0.60073, 0.605773, 0.610474, 0.614838, 0.618871, 0.622579, 0.625966, 0.629037, 0.631795, 0.634243, 0.636386, 0.638226, 0.639764, 0.641004, 0.641947, 0.642594, 0.642946, 0.643004, 0.642768, 0.64224, 0.641417, 0.6403, 0.638888, 0.63718, 0.635175, 0.63287, 0.630263, 0.627352, 0.624135, 0.620607, 0.616765, 0.612605, 0.608122, 0.603312, 0.598169, 0.592687, 0.586859, 0.580679, 0.574138, 0.567228, 0.559939, 0.552262, 0.544185, 0.535697, 0.526783, 0.517431, 0.507624, 0.497346, 0.486577, 0.475297, 0.463484, 0.451113, 0.438156, 0.424584, 0.410362, 0.395454, 0.379817, 0.363405, 0.346166, 0.328039, 0.308957, 0.288843, 0.267609, 0.245151, 0.22135, 0.196067, 0.169135, 0.140356, 0.10949, 0.0762437, 0.0402508, 0.00104948, -0.0419562, -0.0895537, -0.142814, -0.203245, -0.273069, -0.355759, -0.457202, -0.588621, -0.77597, -1.10795, -1.97394, -1.00762, -0.733128, -0.568008, -0.450069, -0.358612, -0.284161, -0.22158, -0.167768, -0.12071, -0.0790233, -0.0417153, -0.00805153, 0.0225277, 0.0504585, 0.0760874, 0.099694, 0.121508, 0.141718, 0.160486, 0.177944, 0.19421, 0.209381, 0.223544, 0.236774, 0.249138, 0.260692, 0.271489, 0.281575, 0.29099, 0.299772, 0.307954, 0.315565, 0.322634, 0.329185, 0.33524, 0.340821, 0.345947, 0.350634, 0.354899, 0.358757, 0.362221, 0.365305, 0.36802, 0.370377, 0.372387, 0.374059, 0.375402, 0.376425, 0.377135, 0.37754, 0.377647, 0.377463, 0.376993, 0.376244, 0.375221, 0.37393, 0.372376, 0.370564, 0.368498, 0.366183, 0.363623, 0.360823, 0.357785, 0.354515, 0.351016, 0.347292, 0.343346, 0.339182, 0.334803, 0.330213, 0.325416, 0.320413, 0.31521, 0.309809, 0.304214, 0.298427, 0.292453, 0.286295, 0.279956, 0.27344, 0.26675, 0.259891, 0.252865, 0.245677, 0.23833, 0.230829, 0.223178, 0.215381, 0.207442, 0.199365, 0.191156, 0.182819, 0.174358, 0.165779, 0.157088, 0.148288, 0.139385, 0.130385, 0.121294, 0.112117, 0.102859, 0.0935271, 0.0841265, 0.0746634, 0.0651436, 0.0555731, 0.0459579, 0.0363039, 0.0266168, 0.0169023, 0.007166, -0.00258684, -0.0123511, -0.0221221, -0.0318953, -0.0416667, -0.0514327, -0.0611902, -0.0709369, -0.0806708, -0.0903908, -0.100097, -0.109789, -0.119469, -0.129139, -0.138804, -0.148466, -0.158134, -0.167813, -0.177514, -0.187245, -0.19702, -0.206851, -0.216754, -0.226748, -0.236851, -0.247085, -0.257475, -0.268048, -0.278833, -0.289864, -0.301177, -0.312813, -0.324816, -0.337236, -0.350128, -0.363552, -0.377579, -0.392285, -0.407757, -0.424093, -0.441409, -0.459833, -0.479518, -0.500643, -0.523419, -0.548101, -0.575, -0.604498, -0.637082, -0.673373, -0.714196, -0.760672, -0.814382, -0.877667, -0.954212, -1.05033, -1.17825, -1.36715, -1.72467, -2.22611, -1.50239, -1.23895, -1.07236, -0.949366, -0.851313, -0.769442, -0.698936, -0.636865, -0.581307, -0.530939, -0.484809, -0.442211, -0.402604, -0.365569, -0.33077, -0.297939, -0.266854, -0.237331, -0.209218, -0.182385, -0.156721, -0.132131, -0.108532, -0.0858528, -0.0640308, -0.0430104, -0.0227429, -0.00318466, 0.015703, 0.0339548, 0.051602, 0.0686726, 0.0851921, 0.101183, 0.116668, 0.131664, 0.146189, 0.160259, 0.173889, 0.187092, 0.19988, 0.212265, 0.224256, 0.235864, 0.247097, 0.257963, 0.268469, 0.278622, 0.288429, 0.297896, 0.307027, 0.315827, 0.3243, 0.332452, 0.340285, 0.347802, 0.355006, 0.361901, 0.368487, 0.374767, 0.380743, 0.386416, 0.391786, 0.396855, 0.401623, 0.40609, 0.410256, 0.41412, 0.417682, 0.42094, 0.423894, 0.426541, 0.42888, 0.430909, 0.432623, 0.434022, 0.435101, 0.435856, 0.436283, 0.436378, 0.436136, 0.435551, 0.434616, 0.433326, 0.431672, 0.429648, 0.427243, 0.42445, 0.421258, 0.417655, 0.413629, 0.409168, 0.404257, 0.398879, 0.393019, 0.386656, 0.379771, 0.37234, 0.364338, 0.355739, 0.346511, 0.33662, 0.326028, 0.314694, 0.302569, 0.289601, 0.275729, 0.260884, 0.244989, 0.227952, 0.20967, 0.190022, 0.168863, 0.146027, 0.121309, 0.0944644, 0.0651926, 0.0331188, -0.00223206, -0.0414738, -0.08542, -0.13518, -0.192326, -0.259183, -0.339417, -0.439307, -0.571021, -0.76354, -1.12331, -1.64476, -0.915885, -0.656062, -0.49381, -0.375432, -0.282154, -0.205179, -0.13967, -0.08268, -0.032282, 0.0128552, 0.0536892, 0.0909316, 0.125126, 0.156696, 0.18598, 0.213251, 0.238732, 0.262608, 0.285037, 0.306148, 0.326056, 0.344857, 0.362634, 0.379461, 0.395401, 0.410511, 0.424842, 0.438435, 0.451333, 0.463568, 0.475174, 0.486177, 0.496605, 0.506478, 0.51582, 0.524647, 0.532977, 0.540825, 0.548205, 0.55513, 0.561611, 0.567657, 0.573279, 0.578484, 0.583279, 0.58767, 0.591664, 0.595266, 0.598478, 0.601305, 0.603749, 0.605813, 0.607498, 0.608804, 0.609732, 0.610282, 0.610453, 0.610242, 0.609648, 0.608667, 0.607296, 0.605531, 0.603367, 0.600798, 0.597816, 0.594415, 0.590587, 0.586322, 0.581609, 0.576436, 0.570792, 0.564662, 0.558029, 0.550877, 0.543187, 0.534936, 0.526102, 0.516658, 0.506576, 0.495822, 0.484361, 0.472151, 0.459148, 0.4453, 0.430549, 0.414829, 0.398064, 0.380167, 0.361038, 0.34056, 0.318596, 0.294983, 0.269526, 0.241992, 0.212094, 0.179474, 0.143683, 0.104142, 0.0600882, 0.0104878, -0.0461095, -0.111829, -0.189968, -0.286058, -0.410482, -0.586622, -0.889548, -2.81597, -0.87847, -0.579702, -0.404334, -0.279836, -0.183335, -0.104617, -0.0382228, 0.0191079, 0.0694803, 0.114332, 0.154689, 0.191309, 0.224767, 0.25551, 0.283893, 0.3102, 0.334665, 0.357481, 0.37881, 0.398788, 0.417531, 0.435139, 0.451699, 0.467285, 0.481962, 0.49579, 0.508817, 0.52109, 0.532648, 0.543527, 0.553759, 0.563373, 0.572393, 0.580844, 0.588745, 0.596116, 0.602973, 0.609331, 0.615203, 0.620602, 0.625539, 0.630023, 0.634062, 0.637664, 0.640836, 0.643583, 0.64591, 0.64782, 0.649317, 0.650402, 0.651078, 0.651345, 0.651203, 0.650651, 0.649687, 0.64831, 0.646516, 0.644301, 0.64166, 0.638588, 0.635078, 0.631123, 0.626713, 0.621839, 0.616491, 0.610655, 0.604319, 0.597467, 0.590081, 0.582144, 0.573634, 0.564528, 0.554799, 0.54442, 0.533358, 0.521576, 0.509034, 0.495686, 0.481482, 0.466361, 0.450259, 0.433098, 0.414792, 0.395237, 0.374318, 0.351893, 0.3278, 0.30184, 0.273775, 0.243314, 0.210092, 0.173653, 0.133402, 0.0885582, 0.0380597, -0.0195892, -0.0865894, -0.166376, -0.264754, -0.392762, -0.57577, -0.899277, -1.86755, -0.814544, -0.533318, -0.364266, -0.243169, -0.148885, -0.0717858, -0.00666902, 0.0495992, 0.0990523, 0.143085, 0.182697, 0.218626, 0.251435, 0.281563, 0.309357, 0.335097, 0.359014, 0.381297, 0.402106, 0.421575, 0.439819, 0.456937, 0.473015, 0.488126, 0.502335, 0.515701, 0.528272, 0.540094, 0.551208, 0.561647, 0.571444, 0.580628, 0.589224, 0.597255, 0.604742, 0.611704, 0.618157, 0.624117, 0.629596, 0.634609, 0.639165, 0.643275, 0.646947, 0.650188, 0.653007, 0.655409, 0.657398, 0.65898, 0.660157, 0.660932, 0.661308, 0.661286, 0.660866, 0.660049, 0.658833, 0.657218, 0.6552, 0.652778, 0.649946, 0.646702, 0.64304, 0.638954, 0.634436, 0.629479, 0.624074, 0.618211, 0.611879, 0.605065, 0.597756, 0.589935, 0.581587, 0.572692, 0.563229, 0.553175, 0.542504, 0.531187, 0.519193, 0.506485, 0.493024, 0.478764, 0.463654, 0.447637, 0.430647, 0.412609, 0.393438, 0.373033, 0.35128, 0.328041, 0.303157, 0.276435, 0.247644, 0.2165, 0.182651, 0.145656, 0.104943, 0.0597638, 0.00910497, -0.0484517, -0.114978, -0.193676, -0.289884, -0.413542, -0.5867, -0.877884, -2.19251, -0.924361, -0.613073, -0.434623, -0.309372, -0.213052, -0.134985, -0.0695147, -0.0132827, 0.0358704, 0.0794149, 0.118397, 0.153588, 0.185572, 0.214803, 0.24164, 0.26637, 0.289231, 0.310416, 0.330089, 0.348386, 0.365425, 0.381306, 0.396114, 0.409926, 0.422806, 0.434811, 0.445992, 0.456394, 0.466055, 0.475012, 0.483294, 0.490929, 0.497942, 0.504355, 0.510188, 0.515457, 0.520177, 0.524364, 0.528027, 0.531178, 0.533825, 0.535976, 0.537637, 0.538813, 0.539508, 0.539725, 0.539464, 0.538728, 0.537515, 0.535823, 0.533649, 0.530991, 0.527841, 0.524195, 0.520045, 0.515381, 0.510193, 0.504469, 0.498195, 0.491356, 0.483935, 0.47591, 0.467261, 0.457962, 0.447985, 0.437299, 0.425867, 0.41365, 0.400603, 0.386673, 0.371802, 0.355924, 0.338961, 0.320826, 0.301414, 0.280607, 0.258261, 0.234211, 0.208253, 0.180143, 0.149581, 0.116194, 0.0795051, 0.0389012, -0.00643241, -0.0576077, -0.116199, -0.184541, -0.266313, -0.367823, -0.501316, -0.696021, -1.05994, -1.56259, -0.847739, -0.590713, -0.43045, -0.313829, -0.222213, -0.146853, -0.0829323, -0.0275157, 0.021319, 0.0648997, 0.104182, 0.139876, 0.172525, 0.202554, 0.230298, 0.256033, 0.279981, 0.302328, 0.323231, 0.342823, 0.361215, 0.378505, 0.394778, 0.410108, 0.424558, 0.438186, 0.451043, 0.463172, 0.474615, 0.485407, 0.495579, 0.505163, 0.514183, 0.522663, 0.530625, 0.538089, 0.545073, 0.551592, 0.557662, 0.563296, 0.568506, 0.573305, 0.577701, 0.581706, 0.585326, 0.588571, 0.591447, 0.59396, 0.596117, 0.597923, 0.599382, 0.600498, 0.601276, 0.601718, 0.601827, 0.601605, 0.601055, 0.600176, 0.598972, 0.597441, 0.595584, 0.593402, 0.590892, 0.588055, 0.584889, 0.581391, 0.57756, 0.573392, 0.568885, 0.564035, 0.558838, 0.553288, 0.547381, 0.541111, 0.534472, 0.527455, 0.520054, 0.512259, 0.504062, 0.495453, 0.486419, 0.476949, 0.46703, 0.456646, 0.445782, 0.43442, 0.422542, 0.410125, 0.397147, 0.383582, 0.369402, 0.354576, 0.339069, 0.322842, 0.305852, 0.288051, 0.269383, 0.249789, 0.229196, 0.207525, 0.184685, 0.160567, 0.135049, 0.107983, 0.0791958, 0.0484806, 0.0155851, -0.0197998, -0.05806, -0.0996852, -0.14531, -0.195777, -0.252242, -0.316346, -0.390535, -0.478696, -0.587563, -0.730438, -0.940073, -1.34802, -1.62544, -1.04176, -0.805487, -0.656323, -0.547921, -0.4633, -0.394315, -0.336425, -0.286838, -0.243714, -0.205779, -0.17211, -0.142023, -0.114992, -0.0906084, -0.0685453, -0.0485399, -0.0303768, -0.0138778, 0.00110565, 0.014699, 0.0270083, 0.0381242, 0.0481242, 0.0570749, 0.0650337, 0.0720501, 0.0781669, 0.0834206, 0.0878428, 0.0914603, 0.0942956, 0.0963676, 0.0976913, 0.0982788, 0.098139, 0.0972777, 0.0956979, 0.0933998, 0.0903808, 0.0866352, 0.0821546, 0.0769275, 0.070939, 0.0641707, 0.0566005, 0.0482021, 0.0389446, 0.0287918, 0.0177017, 0.00562562, -0.00749311, -0.0217201, -0.0371318, -0.0538174, -0.0718815, -0.0914473, -0.112661, -0.135699, -0.160771, -0.188137, -0.218116, -0.251109, -0.287629, -0.328346, -0.374155, -0.426295, -0.486544, -0.557588, -0.643763, -0.752771, -0.900408, -1.12842, -1.64525, -1.53063, -1.08698, -0.871434, -0.727656, -0.61963, -0.533118, -0.461017, -0.399266, -0.345323, -0.297493, -0.254587, -0.215739, -0.180298, -0.147765, -0.117745, -0.0899239, -0.0640442, -0.039895, -0.0173, 0.00388935, 0.0237993, 0.0425382, 0.0601996, 0.0768649, 0.0926053, 0.107483, 0.121555, 0.134868, 0.147468, 0.159394, 0.170681, 0.18136, 0.191461, 0.20101, 0.21003, 0.218543, 0.226569, 0.234126, 0.24123, 0.247896, 0.254139, 0.259972, 0.265405, 0.27045, 0.275116, 0.279413, 0.28335, 0.286933, 0.29017, 0.293068, 0.295632, 0.297868, 0.29978, 0.301374, 0.302653, 0.30362, 0.30428, 0.304634, 0.304685, 0.304435, 0.303886, 0.30304, 0.301896, 0.300456, 0.29872, 0.296689, 0.29436, 0.291735, 0.288811, 0.285587, 0.282062, 0.278234, 0.274098, 0.269654, 0.264896, 0.259822, 0.254426, 0.248705, 0.242652, 0.236263, 0.229529, 0.222444, 0.215, 0.207189, 0.199001, 0.190425, 0.181451, 0.172065, 0.162256, 0.152007, 0.141303, 0.130125, 0.118455, 0.106271, 0.0935485, 0.0802627, 0.0663841, 0.0518808, 0.0367171, 0.0208532, 0.00424441, -0.0131594, -0.0314149, -0.0505864, -0.0707473, -0.0919815, -0.114386, -0.138074, -0.163177, -0.189851, -0.218282, -0.248692, -0.281356, -0.31661, -0.354878, -0.396702, -0.442794, -0.494108, -0.551972, -0.618309, -0.696057, -0.790033, -0.908994, -1.0716, -1.33105, -2.04994, -1.54643, -1.18504, -0.992522, -0.861119, -0.761638, -0.681843, -0.615431, -0.558725, -0.509391, -0.465853, -0.427, -0.392018, -0.36029, -0.331343, -0.3048, -0.280361, -0.257781, -0.236858, -0.217423, -0.199333, -0.182467, -0.166722, -0.152008, -0.138247, -0.125372, -0.113323, -0.102048, -0.0914994, -0.0816369, -0.0724235, -0.0638264, -0.0558163, -0.048367, -0.0414548, -0.0350585, -0.0291592, -0.0237399, -0.0187851, -0.0142813, -0.0102163, -0.00657917, -0.00336038, -0.000551522, 0.0018547, 0.00386453, 0.00548324, 0.00671511, 0.00756353, 0.00803098, 0.00811908, 0.00782854, 0.00715926, 0.00611023, 0.00467958, 0.00286453, 0.000661386, -0.0019345, -0.00492876, -0.00832811, -0.0121403, -0.0163744, -0.0210406, -0.0261505, -0.0317171, -0.0377553, -0.0442814, -0.0513138, -0.0588732, -0.0669826, -0.0756675, -0.0849569, -0.0948829, -0.105482, -0.116794, -0.128865, -0.141748, -0.1555, -0.17019, -0.185895, -0.202703, -0.220717, -0.240058, -0.260867, -0.283313, -0.307597, -0.333962, -0.36271, -0.394213, -0.428945, -0.467519, -0.510747, -0.559736, -0.616055, -0.682027, -0.76131, -0.860169, -0.990744, -1.18191, -1.53952, -2.06798, -1.33277, -1.07115, -0.907374, -0.78751, -0.692732, -0.61422, -0.547129, -0.488508, -0.436425, -0.389548, -0.346917, -0.307821, -0.271713, -0.238169, -0.206851, -0.177485, -0.149846, -0.123749, -0.0990356, -0.0755747, -0.0532526, -0.0319718, -0.0116474, 0.00779413, 0.0264178, 0.0442807, 0.0614335, 0.0779214, 0.0937847, 0.10906, 0.123779, 0.137971, 0.151664, 0.164881, 0.177645, 0.189975, 0.20189, 0.213407, 0.22454, 0.235306, 0.245715, 0.255781, 0.265515, 0.274926, 0.284025, 0.29282, 0.301318, 0.309529, 0.317458, 0.325112, 0.332497, 0.339619, 0.346482, 0.353092, 0.359452, 0.365567, 0.37144, 0.377076, 0.382476, 0.387644, 0.392582, 0.397292, 0.401778, 0.40604, 0.41008, 0.4139, 0.417501, 0.420884, 0.42405, 0.426999, 0.429732, 0.43225, 0.434551, 0.436638, 0.438508, 0.440162, 0.441599, 0.442818, 0.443818, 0.444599, 0.445159, 0.445496, 0.445609, 0.445495, 0.445153, 0.444581, 0.443775, 0.442734, 0.441453, 0.43993, 0.438162, 0.436144, 0.433872, 0.431342, 0.42855, 0.425489, 0.422156, 0.418543, 0.414644, 0.410454, 0.405964, 0.401167, 0.396054, 0.390617, 0.384845, 0.378729, 0.372258, 0.365418, 0.358198, 0.350582, 0.342557, 0.334104, 0.325206, 0.315843, 0.305994, 0.295635, 0.28474, 0.273281, 0.261226, 0.24854, 0.235185, 0.221118, 0.206289, 0.190646, 0.174125, 0.156658, 0.138166, 0.118556, 0.0977222, 0.0755426, 0.051872, 0.0265388, -0.000662266, -0.02998, -0.0617197, -0.096262, -0.134089, -0.175827, -0.222303, -0.274652, -0.33448, -0.404177, -0.487524, -0.591036, -0.727466, -0.927721, -1.31063, -1.69352, -1.04906, -0.800686, -0.644046, -0.529536, -0.439367, -0.365094, -0.302041, -0.247345, -0.199122, -0.156073, -0.117257, -0.0819747, -0.0496925, -0.0199922, 0.00745929, 0.0329312, 0.0566444, 0.0787826, 0.0994997, 0.118926, 0.137173, 0.154337, 0.170501, 0.185738, 0.20011, 0.213674, 0.226479, 0.23857, 0.249985, 0.26076, 0.270926, 0.280511, 0.289542, 0.298041, 0.306028, 0.313524, 0.320545, 0.327107, 0.333224, 0.338909, 0.344173, 0.349029, 0.353484, 0.357549, 0.36123, 0.364536, 0.367473, 0.370046, 0.372261, 0.374122, 0.375634, 0.376799, 0.377622, 0.378103, 0.378246, 0.378052, 0.377521, 0.376656, 0.375454, 0.373918, 0.372045, 0.369835, 0.367286, 0.364396, 0.361163, 0.357584, 0.353656, 0.349374, 0.344734, 0.339731, 0.33436, 0.328615, 0.322489, 0.315974, 0.309062, 0.301745, 0.294013, 0.285855, 0.277259, 0.268213, 0.258703, 0.248713, 0.238229, 0.22723, 0.215698, 0.20361, 0.190943, 0.177671, 0.163764, 0.149191, 0.133915, 0.117897, 0.101093, 0.0834533, 0.0649214, 0.0454344, 0.0249203, 0.00329701, -0.0195301, -0.0436702, -0.069251, -0.0964225, -0.125363, -0.156285, -0.189448, -0.225171, -0.263852, -0.305996, -0.352263, -0.403528, -0.460998, -0.526395, -0.602304, -0.692871, -0.805377, -0.954511, -1.17792, -1.64549, -1.69447, -1.20722, -0.987691, -0.845805, -0.741691, -0.660053, -0.593383, -0.537434, -0.489567, -0.448034, -0.411617, -0.379431, -0.350818, -0.325273, -0.302402, -0.28189, -0.263486, -0.246984, -0.232212, -0.219032, -0.207324, -0.196991, -0.18795, -0.180131, -0.173474, -0.167933, -0.163465, -0.160039, -0.157628, -0.156212, -0.155776, -0.156313, -0.157817, -0.160291, -0.163742, -0.168181, -0.173625, -0.180099, -0.187631, -0.196258, -0.206025, -0.216984, -0.2292, -0.242747, -0.257715, -0.274209, -0.292356, -0.312306, -0.334243, -0.358387, -0.385012, -0.414456, -0.447148, -0.48364, -0.524658, -0.571182, -0.624581, -0.686849, -0.761049, -0.852251, -0.96978, -1.1339, -1.40487, -2.30418, -1.52752, -1.1904, -1.00239, -0.871434, -0.770966, -0.689574, -0.621293, -0.562611, -0.511284, -0.465793, -0.425061, -0.388296, -0.354901, -0.324413 - }; + 0.928494, 0.927872, 0.926834, 0.925379, 0.923503, 0.921203, 0.918475, 0.915312, 0.911709, 0.907659, 0.903153, 0.898182, 0.892735, 0.8868, 0.880364, 0.873412, 0.865927, 0.857891, 0.849284, 0.840082, 0.83026, 0.81979, 0.80864, 0.796774, 0.784152, 0.77073, 0.756458, 0.741277, 0.725122, 0.707918, 0.689581, 0.670009, 0.649088, 0.626681, 0.602628, 0.576736, 0.548773, 0.518454, 0.485428, 0.449249, 0.409345, 0.364962, 0.315083, 0.258279, 0.192463, 0.114404, 0.0187072, -0.1047, -0.278262, -0.57241, -2.08186, -0.600346, -0.292513, -0.114518, 0.0110118, 0.107908, 0.186704, 0.252995, 0.310111, 0.360195, 0.404707, 0.444688, 0.480904, 0.51394, 0.544245, 0.57218, 0.598031, 0.622034, 0.644385, 0.665246, 0.684755, 0.70303, 0.720171, 0.736266, 0.75139, 0.765609, 0.778983, 0.791562, 0.803393, 0.814515, 0.824966, 0.834778, 0.84398, 0.852599, 0.860657, 0.868178, 0.875179, 0.881679, 0.887693, 0.893236, 0.898321, 0.90296, 0.907162, 0.910939, 0.914297, 0.917246, 0.919792, 0.92194, 0.923697, 0.925066, 0.926052, 0.926658, 0.926887, 0.92674, 0.926219, 0.925325, 0.924057, 0.922417, 0.920402, 0.918011, 0.915243, 0.912094, 0.908561, 0.90464, 0.900326, 0.895615, 0.890499, 0.884973, 0.879028, 0.872656, 0.865847, 0.85859, 0.850874, 0.842687, 0.834012, 0.824836, 0.81514, 0.804905, 0.794111, 0.782733, 0.770746, 0.758121, 0.744825, 0.730825, 0.716078, 0.700542, 0.684165, 0.66689, 0.648654, 0.629382, 0.60899, 0.587381, 0.564442, 0.540039, 0.514017, 0.486189, 0.45633, 0.424167, 0.389361, 0.351486, 0.309997, 0.264181, 0.213077, 0.155352, 0.08907, 0.011277, -0.0828819, -0.202243, -0.365684, -0.627354, -1.36705, -0.830645, -0.473819, -0.282807, -0.152329, -0.0535971, 0.025501, 0.0912174, 0.147205, 0.195782, 0.238515, 0.27651, 0.310577, 0.341328, 0.369234, 0.394669, 0.41793, 0.439262, 0.458863, 0.476901, 0.493516, 0.508828, 0.522937, 0.535932, 0.547887, 0.558868, 0.568933, 0.578131, 0.586507, 0.594099, 0.600941, 0.607062, 0.61249, 0.617247, 0.621352, 0.624825, 0.627679, 0.629928, 0.631582, 0.632651, 0.633142, 0.63306, 0.632409, 0.631191, 0.629407, 0.627057, 0.624137, 0.620643, 0.61657, 0.61191, 0.606653, 0.60079, 0.594306, 0.587185, 0.579412, 0.570963, 0.561818, 0.551948, 0.541325, 0.529913, 0.517674, 0.504564, 0.490533, 0.475522, 0.459467, 0.442292, 0.423909, 0.404217, 0.383096, 0.360407, 0.335983, 0.309625, 0.281089, 0.250079, 0.216223, 0.179052, 0.137958, 0.0921362, 0.040488, -0.0185381, -0.0872387, -0.169224, -0.270657, -0.403433, -0.595643, -0.948305, -1.55131, -0.773849, -0.511629, -0.350109, -0.233397, -0.142207, -0.0675594, -0.00453697, 0.0498485, 0.0975486, 0.139909, 0.177895, 0.212225, 0.243447, 0.271986, 0.298184, 0.322314, 0.3446, 0.365228, 0.384355, 0.402112, 0.418611, 0.433948, 0.448207, 0.461461, 0.473771, 0.485193, 0.495777, 0.505564, 0.514593, 0.522897, 0.530506, 0.537447, 0.543743, 0.549414, 0.554479, 0.558955, 0.562855, 0.566192, 0.568977, 0.571218, 0.572923, 0.574099, 0.57475, 0.574881, 0.574492, 0.573586, 0.572162, 0.570218, 0.567753, 0.564762, 0.56124, 0.557181, 0.552575, 0.547415, 0.541689, 0.535384, 0.528485, 0.520976, 0.512838, 0.504049, 0.494586, 0.48442, 0.473522, 0.461856, 0.449385, 0.436063, 0.42184, 0.40666, 0.390458, 0.373159, 0.354676, 0.334911, 0.313746, 0.291046, 0.266647, 0.240355, 0.211936, 0.181102, 0.147496, 0.110666, 0.0700301, 0.0248223, -0.0259976, -0.0838897, -0.150996, -0.230645, -0.32843, -0.454879, -0.63381, -0.942526, -2.43369, -0.917278, -0.624145, -0.451721, -0.329512, -0.235062, -0.158295, -0.0938137, -0.0383872, 0.0100724, 0.0529924, 0.0913917, 0.126023, 0.157458, 0.186141, 0.212424, 0.236591, 0.258872, 0.27946, 0.298515, 0.316171, 0.332543, 0.34773, 0.361816, 0.374875, 0.38697, 0.398159, 0.408488, 0.418003, 0.42674, 0.434733, 0.442013, 0.448604, 0.45453, 0.459812, 0.464467, 0.468511, 0.471956, 0.474815, 0.477097, 0.478811, 0.479961, 0.480554, 0.480592, 0.480078, 0.479011, 0.477392, 0.475216, 0.472481, 0.46918, 0.465308, 0.460854, 0.455809, 0.450161, 0.443895, 0.436995, 0.429442, 0.421215, 0.412289, 0.402637, 0.392228, 0.381026, 0.368991, 0.356078, 0.342235, 0.327403, 0.311515, 0.294493, 0.276247, 0.256672, 0.235645, 0.213024, 0.188635, 0.162272, 0.133685, 0.102564, 0.0685251, 0.0310768, -0.0104171, -0.0568034, -0.109243, -0.169389, -0.239708, -0.324128, -0.429469, -0.569253, -0.776996, -1.18977, -1.42261, -0.854081, -0.616723, -0.464746, -0.352996, -0.264792, -0.1921, -0.130428, -0.0770098, -0.030018, 0.0118154, 0.0494072, 0.0834416, 0.114443, 0.14282, 0.168902, 0.192951, 0.215186, 0.235786, 0.254903, 0.272666, 0.289182, 0.304545, 0.318838, 0.332129, 0.344481, 0.355948, 0.366576, 0.376408, 0.38548, 0.393826, 0.401473, 0.408447, 0.414772, 0.420467, 0.42555, 0.430036, 0.433938, 0.437269, 0.440038, 0.442254, 0.443923, 0.44505, 0.44564, 0.445696, 0.445217, 0.444205, 0.442659, 0.440575, 0.437949, 0.434776, 0.431049, 0.42676, 0.421899, 0.416454, 0.410412, 0.403757, 0.396471, 0.388534, 0.379923, 0.370613, 0.360575, 0.349776, 0.338178, 0.32574, 0.312414, 0.298146, 0.282874, 0.266527, 0.249024, 0.23027, 0.210154, 0.188549, 0.165302, 0.14023, 0.113115, 0.0836886, 0.051621, 0.0164969, -0.0222143, -0.0652066, -0.113411, -0.168118, -0.231191, -0.305459, -0.395537, -0.509724, -0.665426, -0.910671, -1.52765, -1.19847, -0.806811, -0.604978, -0.468374, -0.365243, -0.282577, -0.21376, -0.154963, -0.103772, -0.0585644, -0.0181988, 0.0181593, 0.0511375, 0.0812202, 0.108789, 0.134148, 0.157547, 0.179191, 0.199248, 0.217864, 0.235158, 0.251236, 0.266187, 0.280087, 0.293005, 0.304999, 0.31612, 0.326414, 0.335921, 0.344676, 0.352711, 0.360053, 0.366727, 0.372753, 0.378152, 0.382939, 0.387129, 0.390736, 0.393769, 0.396237, 0.398149, 0.39951, 0.400324, 0.400595, 0.400325, 0.399513, 0.398158, 0.396259, 0.393812, 0.390811, 0.387249, 0.383119, 0.37841, 0.373111, 0.367209, 0.360687, 0.353528, 0.345712, 0.337216, 0.328013, 0.318075, 0.307368, 0.295856, 0.283494, 0.270236, 0.256025, 0.240801, 0.224489, 0.207008, 0.188261, 0.168136, 0.146502, 0.123203, 0.0980536, 0.0708284, 0.0412537, 0.00898989, -0.0263902, -0.0654343, -0.108861, -0.157637, -0.213111, -0.277236, -0.353006, -0.445349, -0.563272, -0.726129, -0.990121, -1.77634, -1.16297, -0.81266, -0.621906, -0.490399, -0.390167, -0.309351, -0.241803, -0.183919, -0.133408, -0.0887193, -0.0487561, -0.0127144, 0.0200132, 0.0498964, 0.077306, 0.10254, 0.125839, 0.147405, 0.167404, 0.185976, 0.203241, 0.2193, 0.234241, 0.24814, 0.261064, 0.27307, 0.28421, 0.294527, 0.304061, 0.312847, 0.320915, 0.328294, 0.335006, 0.341074, 0.346515, 0.351347, 0.355584, 0.359237, 0.362318, 0.364835, 0.366796, 0.368206, 0.36907, 0.369391, 0.36917, 0.368407, 0.367101, 0.36525, 0.36285, 0.359895, 0.356378, 0.352291, 0.347623, 0.342364, 0.336499, 0.330012, 0.322885, 0.315097, 0.306626, 0.297445, 0.287523, 0.276828, 0.26532, 0.252958, 0.23969, 0.225462, 0.21021, 0.193859, 0.176325, 0.15751, 0.1373, 0.115558, 0.0921262, 0.0668123, 0.0393855, 0.00956278, -0.0230069, -0.0587668, -0.0982868, -0.142317, -0.191873, -0.248375, -0.313901, -0.391664, -0.487025, -0.609973, -0.782713, -1.07451, -2.45403, -1.11275, -0.802399, -0.623734, -0.498014, -0.401143, -0.3225, -0.256453, -0.199655, -0.149952, -0.105878, -0.0663904, -0.0307185, 0.00172083, 0.0313801, 0.0586177, 0.0837218, 0.106928, 0.12843, 0.148391, 0.166948, 0.184217, 0.200298, 0.215277, 0.229228, 0.242218, 0.254302, 0.26553, 0.275947, 0.285592, 0.294499, 0.302698, 0.310216, 0.317078, 0.323304, 0.328914, 0.333923, 0.338346, 0.342196, 0.345484, 0.348218, 0.350406, 0.352055, 0.353169, 0.353752, 0.353805, 0.35333, 0.352327, 0.350792, 0.348725, 0.346119, 0.342971, 0.339271, 0.335012, 0.330184, 0.324774, 0.31877, 0.312154, 0.30491, 0.297017, 0.288452, 0.279189, 0.269199, 0.258448, 0.246901, 0.234514, 0.221241, 0.207025, 0.191807, 0.175514, 0.158065, 0.139366, 0.119306, 0.0977557, 0.0745636, 0.0495472, 0.0224872, -0.00688378, -0.0388962, -0.0739652, -0.112621, -0.155558, -0.203708, -0.258359, -0.321374, -0.395583, -0.485597, -0.599712, -0.755317, -1.00039, -1.61636, -1.28901, -0.896961, -0.695002, -0.558324, -0.455138, -0.372428, -0.303573, -0.244744, -0.193525, -0.148294, -0.107908, -0.0715334, -0.0385423, -0.00845057, 0.0191231, 0.0444841, 0.0678806, 0.089517, 0.109563, 0.128163, 0.145437, 0.161489, 0.176409, 0.190273, 0.203148, 0.215094, 0.22616, 0.236393, 0.245831, 0.25451, 0.262461, 0.26971, 0.276282, 0.282198, 0.287475, 0.292131, 0.296179, 0.299631, 0.302497, 0.304784, 0.306501, 0.307651, 0.308238, 0.308264, 0.30773, 0.306634, 0.304974, 0.302746, 0.299944, 0.296561, 0.292588, 0.288013, 0.282826, 0.27701, 0.270548, 0.263422, 0.255608, 0.247082, 0.237815, 0.227773, 0.216921, 0.205217, 0.192612, 0.179052, 0.164475, 0.14881, 0.131974, 0.113873, 0.0943935, 0.0734064, 0.0507565, 0.0262588, -0.000309782, -0.0292218, -0.0608149, -0.0955137, -0.133863, -0.176575, -0.224612, -0.279309, -0.342604, -0.41746, -0.508747, -0.625337, -0.786214, -1.04598, -1.79307, -1.23761, -0.879911, -0.686599, -0.553539, -0.452128, -0.370309, -0.301854, -0.243121, -0.191794, -0.146311, -0.105567, -0.0687526, -0.0352557, -0.00460357, 0.0235767, 0.0495847, 0.0736643, 0.0960168, 0.11681, 0.136186, 0.154264, 0.171149, 0.186927, 0.201677, 0.215466, 0.228352, 0.240388, 0.251619, 0.262085, 0.271823, 0.280865, 0.289238, 0.296969, 0.304081, 0.310593, 0.316523, 0.321888, 0.326702, 0.330977, 0.334724, 0.337953, 0.340672, 0.342889, 0.344608, 0.345836, 0.346574, 0.346827, 0.346595, 0.345879, 0.344678, 0.342991, 0.340815, 0.338147, 0.334982, 0.331314, 0.327137, 0.322441, 0.317217, 0.311454, 0.305141, 0.298262, 0.290802, 0.282743, 0.274065, 0.264746, 0.25476, 0.244079, 0.232672, 0.220503, 0.207533, 0.193716, 0.179003, 0.163334, 0.146645, 0.12886, 0.109893, 0.0896438, 0.0679951, 0.0448101, 0.0199264, -0.00685016, -0.0357542, -0.0670728, -0.101163, -0.138473, -0.179584, -0.225258, -0.276528, -0.334846, -0.402335, -0.482292, -0.580244, -0.706568, -0.884616, -1.18932, -3.16747, -1.18361, -0.88681, -0.713645, -0.591455, -0.497344, -0.421088, -0.357228, -0.302503, -0.254807, -0.212705, -0.175172, -0.141453, -0.110974, -0.0832904, -0.058051, -0.0349727, -0.0138251, 0.00558171, 0.0234059, 0.0397805, 0.0548178, 0.0686137, 0.0812499, 0.0927969, 0.103315, 0.112857, 0.121468, 0.129186, 0.136044, 0.142072, 0.147294, 0.151729, 0.155394, 0.158303, 0.160465, 0.161887, 0.162574, 0.162526, 0.161743, 0.16022, 0.157949, 0.15492, 0.151119, 0.14653, 0.141132, 0.1349, 0.127805, 0.119812, 0.110882, 0.100969, 0.0900197, 0.077971, 0.0647509, 0.0502752, 0.0344451, 0.0171446, -0.00176383, -0.0224442, -0.0450941, -0.0699533, -0.0973176, -0.127556, -0.161136, -0.198665, -0.240946, -0.289077, -0.34461, -0.409842, -0.488388, -0.586422, -0.715867, -0.904905, -1.25512, -1.8457, -1.07076, -0.805653, -0.640902, -0.52086, -0.426297, -0.348252, -0.281816, -0.224001, -0.17286, -0.127045, -0.08559, -0.0477768, -0.0130564, 0.0189993, 0.0487313, 0.0764152, 0.102277, 0.126505, 0.149256, 0.170663, 0.190842, 0.20989, 0.227893, 0.244924, 0.26105, 0.276328, 0.290808, 0.304537, 0.317554, 0.329897, 0.341597, 0.352685, 0.363187, 0.373128, 0.382528, 0.391408, 0.399787, 0.40768, 0.415104, 0.422071, 0.428595, 0.434687, 0.440358, 0.445617, 0.450474, 0.454935, 0.45901, 0.462703, 0.466022, 0.468972, 0.471557, 0.473782, 0.475652, 0.477168, 0.478334, 0.479153, 0.479627, 0.479757, 0.479544, 0.47899, 0.478094, 0.476856, 0.475277, 0.473356, 0.471091, 0.46848, 0.465522, 0.462214, 0.458554, 0.454538, 0.450162, 0.445423, 0.440315, 0.434833, 0.428971, 0.422724, 0.416083, 0.409042, 0.401591, 0.393722, 0.385425, 0.376689, 0.367501, 0.357849, 0.34772, 0.337096, 0.325962, 0.3143, 0.302088, 0.289306, 0.275929, 0.26193, 0.24728, 0.231947, 0.215895, 0.199083, 0.181467, 0.162998, 0.143619, 0.123266, 0.101868, 0.0793414, 0.0555924, 0.0305112, 0.00397053, -0.0241795, -0.0541166, -0.0860534, -0.120248, -0.157018, -0.196757, -0.23997, -0.287309, -0.33964, -0.398158, -0.46456, -0.541393, -0.632725, -0.745672, -0.894496, -1.1153, -1.56509, -1.68126, -1.17119, -0.948839, -0.806826, -0.703503, -0.623105, -0.557946, -0.503701, -0.457691, -0.418147, -0.383839, -0.353879, -0.327606, -0.304517, -0.284221, -0.266409, -0.250835, -0.2373, -0.225643, -0.215734, -0.207466, -0.200754, -0.19553, -0.19174, -0.189345, -0.188318, -0.188643, -0.190313, -0.193336, -0.197727, -0.203515, -0.210739, -0.219452, -0.229723, -0.241639, -0.255305, -0.270852, -0.288441, -0.308272, -0.330591, -0.355705, -0.384006, -0.415996, -0.452335, -0.493908, -0.54194, -0.598196, -0.66534, -0.747676, -0.852837, -0.99645, -1.21964, -1.72457, -1.62958, -1.17661, -0.956862, -0.809774, -0.698809, -0.609581, -0.534928, -0.470761, -0.414524, -0.36451, -0.319524, -0.278696, -0.241374, -0.207054, -0.175341, -0.145918, -0.118528, -0.0929592, -0.0690347, -0.046606, -0.0255467, -0.00574889, 0.0128807, 0.0304229, 0.0469482, 0.0625183, 0.0771877, 0.0910042, 0.104011, 0.116245, 0.12774, 0.138526, 0.14863, 0.158077, 0.166886, 0.175078, 0.182669, 0.189673, 0.196105, 0.201976, 0.207296, 0.212073, 0.216315, 0.220028, 0.223216, 0.225883, 0.228033, 0.229665, 0.23078, 0.231377, 0.231454, 0.231007, 0.230033, 0.228524, 0.226475, 0.223877, 0.220719, 0.21699, 0.212677, 0.207765, 0.202236, 0.196072, 0.18925, 0.181745, 0.17353, 0.164574, 0.154841, 0.144292, 0.132881, 0.120558, 0.107264, 0.0929328, 0.0774884, 0.0608425, 0.0428931, 0.0235207, 0.00258498, -0.020081, -0.0446772, -0.0714459, -0.100685, -0.132764, -0.168154, -0.207461, -0.251489, -0.301334, -0.358545, -0.425411, -0.505532, -0.605047, -0.735795, -0.925679, -1.27461, -1.89398, -1.10259, -0.83753, -0.673851, -0.555175, -0.462106, -0.385625, -0.320796, -0.264623, -0.215148, -0.171024, -0.131283, -0.0952062, -0.0622448, -0.0319716, -0.00404702, 0.0218032, 0.0458036, 0.0681401, 0.0889686, 0.10842, 0.126608, 0.143627, 0.15956, 0.174479, 0.188448, 0.201521, 0.213745, 0.225164, 0.235815, 0.245731, 0.25494, 0.263469, 0.271341, 0.278575, 0.285189, 0.291198, 0.296616, 0.301453, 0.305718, 0.309421, 0.312566, 0.315159, 0.317202, 0.318698, 0.319645, 0.320044, 0.319891, 0.319182, 0.317911, 0.316071, 0.313652, 0.310644, 0.307034, 0.302806, 0.297943, 0.292426, 0.286233, 0.279336, 0.271708, 0.263315, 0.25412, 0.244081, 0.233148, 0.221266, 0.208372, 0.194394, 0.179248, 0.162835, 0.145042, 0.125735, 0.104754, 0.0819103, 0.0569727, 0.0296595, -0.000379215, -0.0335854, -0.0705273, -0.111953, -0.158876, -0.212713, -0.275537, -0.35055, -0.443097, -0.56313, -0.73274, -1.02065, -2.34859, -1.05798, -0.74349, -0.561514, -0.432657, -0.332697, -0.250969, -0.181824, -0.121904, -0.0690507, -0.021793, 0.020916, 0.0598483, 0.0955894, 0.128594, 0.159223, 0.187766, 0.21446, 0.239502, 0.263057, 0.285262, 0.306238, 0.326085, 0.344892, 0.362736, 0.379685, 0.395798, 0.411127, 0.42572, 0.439618, 0.452859, 0.465476, 0.4775, 0.488958, 0.499876, 0.510277, 0.52018, 0.529604, 0.538568, 0.547087, 0.555175, 0.562846, 0.570112, 0.576984, 0.583472, 0.589587, 0.595337, 0.60073, 0.605773, 0.610474, 0.614838, 0.618871, 0.622579, 0.625966, 0.629037, 0.631795, 0.634243, 0.636386, 0.638226, 0.639764, 0.641004, 0.641947, 0.642594, 0.642946, 0.643004, 0.642768, 0.64224, 0.641417, 0.6403, 0.638888, 0.63718, 0.635175, 0.63287, 0.630263, 0.627352, 0.624135, 0.620607, 0.616765, 0.612605, 0.608122, 0.603312, 0.598169, 0.592687, 0.586859, 0.580679, 0.574138, 0.567228, 0.559939, 0.552262, 0.544185, 0.535697, 0.526783, 0.517431, 0.507624, 0.497346, 0.486577, 0.475297, 0.463484, 0.451113, 0.438156, 0.424584, 0.410362, 0.395454, 0.379817, 0.363405, 0.346166, 0.328039, 0.308957, 0.288843, 0.267609, 0.245151, 0.22135, 0.196067, 0.169135, 0.140356, 0.10949, 0.0762437, 0.0402508, 0.00104948, -0.0419562, -0.0895537, -0.142814, -0.203245, -0.273069, -0.355759, -0.457202, -0.588621, -0.77597, -1.10795, -1.97394, -1.00762, -0.733128, -0.568008, -0.450069, -0.358612, -0.284161, -0.22158, -0.167768, -0.12071, -0.0790233, -0.0417153, -0.00805153, 0.0225277, 0.0504585, 0.0760874, 0.099694, 0.121508, 0.141718, 0.160486, 0.177944, 0.19421, 0.209381, 0.223544, 0.236774, 0.249138, 0.260692, 0.271489, 0.281575, 0.29099, 0.299772, 0.307954, 0.315565, 0.322634, 0.329185, 0.33524, 0.340821, 0.345947, 0.350634, 0.354899, 0.358757, 0.362221, 0.365305, 0.36802, 0.370377, 0.372387, 0.374059, 0.375402, 0.376425, 0.377135, 0.37754, 0.377647, 0.377463, 0.376993, 0.376244, 0.375221, 0.37393, 0.372376, 0.370564, 0.368498, 0.366183, 0.363623, 0.360823, 0.357785, 0.354515, 0.351016, 0.347292, 0.343346, 0.339182, 0.334803, 0.330213, 0.325416, 0.320413, 0.31521, 0.309809, 0.304214, 0.298427, 0.292453, 0.286295, 0.279956, 0.27344, 0.26675, 0.259891, 0.252865, 0.245677, 0.23833, 0.230829, 0.223178, 0.215381, 0.207442, 0.199365, 0.191156, 0.182819, 0.174358, 0.165779, 0.157088, 0.148288, 0.139385, 0.130385, 0.121294, 0.112117, 0.102859, 0.0935271, 0.0841265, 0.0746634, 0.0651436, 0.0555731, 0.0459579, 0.0363039, 0.0266168, 0.0169023, 0.007166, -0.00258684, -0.0123511, -0.0221221, -0.0318953, -0.0416667, -0.0514327, -0.0611902, -0.0709369, -0.0806708, -0.0903908, -0.100097, -0.109789, -0.119469, -0.129139, -0.138804, -0.148466, -0.158134, -0.167813, -0.177514, -0.187245, -0.19702, -0.206851, -0.216754, -0.226748, -0.236851, -0.247085, -0.257475, -0.268048, -0.278833, -0.289864, -0.301177, -0.312813, -0.324816, -0.337236, -0.350128, -0.363552, -0.377579, -0.392285, -0.407757, -0.424093, -0.441409, -0.459833, -0.479518, -0.500643, -0.523419, -0.548101, -0.575, -0.604498, -0.637082, -0.673373, -0.714196, -0.760672, -0.814382, -0.877667, -0.954212, -1.05033, -1.17825, -1.36715, -1.72467, -2.22611, -1.50239, -1.23895, -1.07236, -0.949366, -0.851313, -0.769442, -0.698936, -0.636865, -0.581307, -0.530939, -0.484809, -0.442211, -0.402604, -0.365569, -0.33077, -0.297939, -0.266854, -0.237331, -0.209218, -0.182385, -0.156721, -0.132131, -0.108532, -0.0858528, -0.0640308, -0.0430104, -0.0227429, -0.00318466, 0.015703, 0.0339548, 0.051602, 0.0686726, 0.0851921, 0.101183, 0.116668, 0.131664, 0.146189, 0.160259, 0.173889, 0.187092, 0.19988, 0.212265, 0.224256, 0.235864, 0.247097, 0.257963, 0.268469, 0.278622, 0.288429, 0.297896, 0.307027, 0.315827, 0.3243, 0.332452, 0.340285, 0.347802, 0.355006, 0.361901, 0.368487, 0.374767, 0.380743, 0.386416, 0.391786, 0.396855, 0.401623, 0.40609, 0.410256, 0.41412, 0.417682, 0.42094, 0.423894, 0.426541, 0.42888, 0.430909, 0.432623, 0.434022, 0.435101, 0.435856, 0.436283, 0.436378, 0.436136, 0.435551, 0.434616, 0.433326, 0.431672, 0.429648, 0.427243, 0.42445, 0.421258, 0.417655, 0.413629, 0.409168, 0.404257, 0.398879, 0.393019, 0.386656, 0.379771, 0.37234, 0.364338, 0.355739, 0.346511, 0.33662, 0.326028, 0.314694, 0.302569, 0.289601, 0.275729, 0.260884, 0.244989, 0.227952, 0.20967, 0.190022, 0.168863, 0.146027, 0.121309, 0.0944644, 0.0651926, 0.0331188, -0.00223206, -0.0414738, -0.08542, -0.13518, -0.192326, -0.259183, -0.339417, -0.439307, -0.571021, -0.76354, -1.12331, -1.64476, -0.915885, -0.656062, -0.49381, -0.375432, -0.282154, -0.205179, -0.13967, -0.08268, -0.032282, 0.0128552, 0.0536892, 0.0909316, 0.125126, 0.156696, 0.18598, 0.213251, 0.238732, 0.262608, 0.285037, 0.306148, 0.326056, 0.344857, 0.362634, 0.379461, 0.395401, 0.410511, 0.424842, 0.438435, 0.451333, 0.463568, 0.475174, 0.486177, 0.496605, 0.506478, 0.51582, 0.524647, 0.532977, 0.540825, 0.548205, 0.55513, 0.561611, 0.567657, 0.573279, 0.578484, 0.583279, 0.58767, 0.591664, 0.595266, 0.598478, 0.601305, 0.603749, 0.605813, 0.607498, 0.608804, 0.609732, 0.610282, 0.610453, 0.610242, 0.609648, 0.608667, 0.607296, 0.605531, 0.603367, 0.600798, 0.597816, 0.594415, 0.590587, 0.586322, 0.581609, 0.576436, 0.570792, 0.564662, 0.558029, 0.550877, 0.543187, 0.534936, 0.526102, 0.516658, 0.506576, 0.495822, 0.484361, 0.472151, 0.459148, 0.4453, 0.430549, 0.414829, 0.398064, 0.380167, 0.361038, 0.34056, 0.318596, 0.294983, 0.269526, 0.241992, 0.212094, 0.179474, 0.143683, 0.104142, 0.0600882, 0.0104878, -0.0461095, -0.111829, -0.189968, -0.286058, -0.410482, -0.586622, -0.889548, -2.81597, -0.87847, -0.579702, -0.404334, -0.279836, -0.183335, -0.104617, -0.0382228, 0.0191079, 0.0694803, 0.114332, 0.154689, 0.191309, 0.224767, 0.25551, 0.283893, 0.3102, 0.334665, 0.357481, 0.37881, 0.398788, 0.417531, 0.435139, 0.451699, 0.467285, 0.481962, 0.49579, 0.508817, 0.52109, 0.532648, 0.543527, 0.553759, 0.563373, 0.572393, 0.580844, 0.588745, 0.596116, 0.602973, 0.609331, 0.615203, 0.620602, 0.625539, 0.630023, 0.634062, 0.637664, 0.640836, 0.643583, 0.64591, 0.64782, 0.649317, 0.650402, 0.651078, 0.651345, 0.651203, 0.650651, 0.649687, 0.64831, 0.646516, 0.644301, 0.64166, 0.638588, 0.635078, 0.631123, 0.626713, 0.621839, 0.616491, 0.610655, 0.604319, 0.597467, 0.590081, 0.582144, 0.573634, 0.564528, 0.554799, 0.54442, 0.533358, 0.521576, 0.509034, 0.495686, 0.481482, 0.466361, 0.450259, 0.433098, 0.414792, 0.395237, 0.374318, 0.351893, 0.3278, 0.30184, 0.273775, 0.243314, 0.210092, 0.173653, 0.133402, 0.0885582, 0.0380597, -0.0195892, -0.0865894, -0.166376, -0.264754, -0.392762, -0.57577, -0.899277, -1.86755, -0.814544, -0.533318, -0.364266, -0.243169, -0.148885, -0.0717858, -0.00666902, 0.0495992, 0.0990523, 0.143085, 0.182697, 0.218626, 0.251435, 0.281563, 0.309357, 0.335097, 0.359014, 0.381297, 0.402106, 0.421575, 0.439819, 0.456937, 0.473015, 0.488126, 0.502335, 0.515701, 0.528272, 0.540094, 0.551208, 0.561647, 0.571444, 0.580628, 0.589224, 0.597255, 0.604742, 0.611704, 0.618157, 0.624117, 0.629596, 0.634609, 0.639165, 0.643275, 0.646947, 0.650188, 0.653007, 0.655409, 0.657398, 0.65898, 0.660157, 0.660932, 0.661308, 0.661286, 0.660866, 0.660049, 0.658833, 0.657218, 0.6552, 0.652778, 0.649946, 0.646702, 0.64304, 0.638954, 0.634436, 0.629479, 0.624074, 0.618211, 0.611879, 0.605065, 0.597756, 0.589935, 0.581587, 0.572692, 0.563229, 0.553175, 0.542504, 0.531187, 0.519193, 0.506485, 0.493024, 0.478764, 0.463654, 0.447637, 0.430647, 0.412609, 0.393438, 0.373033, 0.35128, 0.328041, 0.303157, 0.276435, 0.247644, 0.2165, 0.182651, 0.145656, 0.104943, 0.0597638, 0.00910497, -0.0484517, -0.114978, -0.193676, -0.289884, -0.413542, -0.5867, -0.877884, -2.19251, -0.924361, -0.613073, -0.434623, -0.309372, -0.213052, -0.134985, -0.0695147, -0.0132827, 0.0358704, 0.0794149, 0.118397, 0.153588, 0.185572, 0.214803, 0.24164, 0.26637, 0.289231, 0.310416, 0.330089, 0.348386, 0.365425, 0.381306, 0.396114, 0.409926, 0.422806, 0.434811, 0.445992, 0.456394, 0.466055, 0.475012, 0.483294, 0.490929, 0.497942, 0.504355, 0.510188, 0.515457, 0.520177, 0.524364, 0.528027, 0.531178, 0.533825, 0.535976, 0.537637, 0.538813, 0.539508, 0.539725, 0.539464, 0.538728, 0.537515, 0.535823, 0.533649, 0.530991, 0.527841, 0.524195, 0.520045, 0.515381, 0.510193, 0.504469, 0.498195, 0.491356, 0.483935, 0.47591, 0.467261, 0.457962, 0.447985, 0.437299, 0.425867, 0.41365, 0.400603, 0.386673, 0.371802, 0.355924, 0.338961, 0.320826, 0.301414, 0.280607, 0.258261, 0.234211, 0.208253, 0.180143, 0.149581, 0.116194, 0.0795051, 0.0389012, -0.00643241, -0.0576077, -0.116199, -0.184541, -0.266313, -0.367823, -0.501316, -0.696021, -1.05994, -1.56259, -0.847739, -0.590713, -0.43045, -0.313829, -0.222213, -0.146853, -0.0829323, -0.0275157, 0.021319, 0.0648997, 0.104182, 0.139876, 0.172525, 0.202554, 0.230298, 0.256033, 0.279981, 0.302328, 0.323231, 0.342823, 0.361215, 0.378505, 0.394778, 0.410108, 0.424558, 0.438186, 0.451043, 0.463172, 0.474615, 0.485407, 0.495579, 0.505163, 0.514183, 0.522663, 0.530625, 0.538089, 0.545073, 0.551592, 0.557662, 0.563296, 0.568506, 0.573305, 0.577701, 0.581706, 0.585326, 0.588571, 0.591447, 0.59396, 0.596117, 0.597923, 0.599382, 0.600498, 0.601276, 0.601718, 0.601827, 0.601605, 0.601055, 0.600176, 0.598972, 0.597441, 0.595584, 0.593402, 0.590892, 0.588055, 0.584889, 0.581391, 0.57756, 0.573392, 0.568885, 0.564035, 0.558838, 0.553288, 0.547381, 0.541111, 0.534472, 0.527455, 0.520054, 0.512259, 0.504062, 0.495453, 0.486419, 0.476949, 0.46703, 0.456646, 0.445782, 0.43442, 0.422542, 0.410125, 0.397147, 0.383582, 0.369402, 0.354576, 0.339069, 0.322842, 0.305852, 0.288051, 0.269383, 0.249789, 0.229196, 0.207525, 0.184685, 0.160567, 0.135049, 0.107983, 0.0791958, 0.0484806, 0.0155851, -0.0197998, -0.05806, -0.0996852, -0.14531, -0.195777, -0.252242, -0.316346, -0.390535, -0.478696, -0.587563, -0.730438, -0.940073, -1.34802, -1.62544, -1.04176, -0.805487, -0.656323, -0.547921, -0.4633, -0.394315, -0.336425, -0.286838, -0.243714, -0.205779, -0.17211, -0.142023, -0.114992, -0.0906084, -0.0685453, -0.0485399, -0.0303768, -0.0138778, 0.00110565, 0.014699, 0.0270083, 0.0381242, 0.0481242, 0.0570749, 0.0650337, 0.0720501, 0.0781669, 0.0834206, 0.0878428, 0.0914603, 0.0942956, 0.0963676, 0.0976913, 0.0982788, 0.098139, 0.0972777, 0.0956979, 0.0933998, 0.0903808, 0.0866352, 0.0821546, 0.0769275, 0.070939, 0.0641707, 0.0566005, 0.0482021, 0.0389446, 0.0287918, 0.0177017, 0.00562562, -0.00749311, -0.0217201, -0.0371318, -0.0538174, -0.0718815, -0.0914473, -0.112661, -0.135699, -0.160771, -0.188137, -0.218116, -0.251109, -0.287629, -0.328346, -0.374155, -0.426295, -0.486544, -0.557588, -0.643763, -0.752771, -0.900408, -1.12842, -1.64525, -1.53063, -1.08698, -0.871434, -0.727656, -0.61963, -0.533118, -0.461017, -0.399266, -0.345323, -0.297493, -0.254587, -0.215739, -0.180298, -0.147765, -0.117745, -0.0899239, -0.0640442, -0.039895, -0.0173, 0.00388935, 0.0237993, 0.0425382, 0.0601996, 0.0768649, 0.0926053, 0.107483, 0.121555, 0.134868, 0.147468, 0.159394, 0.170681, 0.18136, 0.191461, 0.20101, 0.21003, 0.218543, 0.226569, 0.234126, 0.24123, 0.247896, 0.254139, 0.259972, 0.265405, 0.27045, 0.275116, 0.279413, 0.28335, 0.286933, 0.29017, 0.293068, 0.295632, 0.297868, 0.29978, 0.301374, 0.302653, 0.30362, 0.30428, 0.304634, 0.304685, 0.304435, 0.303886, 0.30304, 0.301896, 0.300456, 0.29872, 0.296689, 0.29436, 0.291735, 0.288811, 0.285587, 0.282062, 0.278234, 0.274098, 0.269654, 0.264896, 0.259822, 0.254426, 0.248705, 0.242652, 0.236263, 0.229529, 0.222444, 0.215, 0.207189, 0.199001, 0.190425, 0.181451, 0.172065, 0.162256, 0.152007, 0.141303, 0.130125, 0.118455, 0.106271, 0.0935485, 0.0802627, 0.0663841, 0.0518808, 0.0367171, 0.0208532, 0.00424441, -0.0131594, -0.0314149, -0.0505864, -0.0707473, -0.0919815, -0.114386, -0.138074, -0.163177, -0.189851, -0.218282, -0.248692, -0.281356, -0.31661, -0.354878, -0.396702, -0.442794, -0.494108, -0.551972, -0.618309, -0.696057, -0.790033, -0.908994, -1.0716, -1.33105, -2.04994, -1.54643, -1.18504, -0.992522, -0.861119, -0.761638, -0.681843, -0.615431, -0.558725, -0.509391, -0.465853, -0.427, -0.392018, -0.36029, -0.331343, -0.3048, -0.280361, -0.257781, -0.236858, -0.217423, -0.199333, -0.182467, -0.166722, -0.152008, -0.138247, -0.125372, -0.113323, -0.102048, -0.0914994, -0.0816369, -0.0724235, -0.0638264, -0.0558163, -0.048367, -0.0414548, -0.0350585, -0.0291592, -0.0237399, -0.0187851, -0.0142813, -0.0102163, -0.00657917, -0.00336038, -0.000551522, 0.0018547, 0.00386453, 0.00548324, 0.00671511, 0.00756353, 0.00803098, 0.00811908, 0.00782854, 0.00715926, 0.00611023, 0.00467958, 0.00286453, 0.000661386, -0.0019345, -0.00492876, -0.00832811, -0.0121403, -0.0163744, -0.0210406, -0.0261505, -0.0317171, -0.0377553, -0.0442814, -0.0513138, -0.0588732, -0.0669826, -0.0756675, -0.0849569, -0.0948829, -0.105482, -0.116794, -0.128865, -0.141748, -0.1555, -0.17019, -0.185895, -0.202703, -0.220717, -0.240058, -0.260867, -0.283313, -0.307597, -0.333962, -0.36271, -0.394213, -0.428945, -0.467519, -0.510747, -0.559736, -0.616055, -0.682027, -0.76131, -0.860169, -0.990744, -1.18191, -1.53952, -2.06798, -1.33277, -1.07115, -0.907374, -0.78751, -0.692732, -0.61422, -0.547129, -0.488508, -0.436425, -0.389548, -0.346917, -0.307821, -0.271713, -0.238169, -0.206851, -0.177485, -0.149846, -0.123749, -0.0990356, -0.0755747, -0.0532526, -0.0319718, -0.0116474, 0.00779413, 0.0264178, 0.0442807, 0.0614335, 0.0779214, 0.0937847, 0.10906, 0.123779, 0.137971, 0.151664, 0.164881, 0.177645, 0.189975, 0.20189, 0.213407, 0.22454, 0.235306, 0.245715, 0.255781, 0.265515, 0.274926, 0.284025, 0.29282, 0.301318, 0.309529, 0.317458, 0.325112, 0.332497, 0.339619, 0.346482, 0.353092, 0.359452, 0.365567, 0.37144, 0.377076, 0.382476, 0.387644, 0.392582, 0.397292, 0.401778, 0.40604, 0.41008, 0.4139, 0.417501, 0.420884, 0.42405, 0.426999, 0.429732, 0.43225, 0.434551, 0.436638, 0.438508, 0.440162, 0.441599, 0.442818, 0.443818, 0.444599, 0.445159, 0.445496, 0.445609, 0.445495, 0.445153, 0.444581, 0.443775, 0.442734, 0.441453, 0.43993, 0.438162, 0.436144, 0.433872, 0.431342, 0.42855, 0.425489, 0.422156, 0.418543, 0.414644, 0.410454, 0.405964, 0.401167, 0.396054, 0.390617, 0.384845, 0.378729, 0.372258, 0.365418, 0.358198, 0.350582, 0.342557, 0.334104, 0.325206, 0.315843, 0.305994, 0.295635, 0.28474, 0.273281, 0.261226, 0.24854, 0.235185, 0.221118, 0.206289, 0.190646, 0.174125, 0.156658, 0.138166, 0.118556, 0.0977222, 0.0755426, 0.051872, 0.0265388, -0.000662266, -0.02998, -0.0617197, -0.096262, -0.134089, -0.175827, -0.222303, -0.274652, -0.33448, -0.404177, -0.487524, -0.591036, -0.727466, -0.927721, -1.31063, -1.69352, -1.04906, -0.800686, -0.644046, -0.529536, -0.439367, -0.365094, -0.302041, -0.247345, -0.199122, -0.156073, -0.117257, -0.0819747, -0.0496925, -0.0199922, 0.00745929, 0.0329312, 0.0566444, 0.0787826, 0.0994997, 0.118926, 0.137173, 0.154337, 0.170501, 0.185738, 0.20011, 0.213674, 0.226479, 0.23857, 0.249985, 0.26076, 0.270926, 0.280511, 0.289542, 0.298041, 0.306028, 0.313524, 0.320545, 0.327107, 0.333224, 0.338909, 0.344173, 0.349029, 0.353484, 0.357549, 0.36123, 0.364536, 0.367473, 0.370046, 0.372261, 0.374122, 0.375634, 0.376799, 0.377622, 0.378103, 0.378246, 0.378052, 0.377521, 0.376656, 0.375454, 0.373918, 0.372045, 0.369835, 0.367286, 0.364396, 0.361163, 0.357584, 0.353656, 0.349374, 0.344734, 0.339731, 0.33436, 0.328615, 0.322489, 0.315974, 0.309062, 0.301745, 0.294013, 0.285855, 0.277259, 0.268213, 0.258703, 0.248713, 0.238229, 0.22723, 0.215698, 0.20361, 0.190943, 0.177671, 0.163764, 0.149191, 0.133915, 0.117897, 0.101093, 0.0834533, 0.0649214, 0.0454344, 0.0249203, 0.00329701, -0.0195301, -0.0436702, -0.069251, -0.0964225, -0.125363, -0.156285, -0.189448, -0.225171, -0.263852, -0.305996, -0.352263, -0.403528, -0.460998, -0.526395, -0.602304, -0.692871, -0.805377, -0.954511, -1.17792, -1.64549, -1.69447, -1.20722, -0.987691, -0.845805, -0.741691, -0.660053, -0.593383, -0.537434, -0.489567, -0.448034, -0.411617, -0.379431, -0.350818, -0.325273, -0.302402, -0.28189, -0.263486, -0.246984, -0.232212, -0.219032, -0.207324, -0.196991, -0.18795, -0.180131, -0.173474, -0.167933, -0.163465, -0.160039, -0.157628, -0.156212, -0.155776, -0.156313, -0.157817, -0.160291, -0.163742, -0.168181, -0.173625, -0.180099, -0.187631, -0.196258, -0.206025, -0.216984, -0.2292, -0.242747, -0.257715, -0.274209, -0.292356, -0.312306, -0.334243, -0.358387, -0.385012, -0.414456, -0.447148, -0.48364, -0.524658, -0.571182, -0.624581, -0.686849, -0.761049, -0.852251, -0.96978, -1.1339, -1.40487, -2.30418, -1.52752, -1.1904, -1.00239, -0.871434, -0.770966, -0.689574, -0.621293, -0.562611, -0.511284, -0.465793, -0.425061, -0.388296, -0.354901, -0.324413 +}; #endif /* MULTIPATH_V3_M10_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v3_M12.h b/src/lte/model/JakesTraces/multipath_v3_M12.h index 24bce0ed6..6984c7d13 100644 --- a/src/lte/model/JakesTraces/multipath_v3_M12.h +++ b/src/lte/model/JakesTraces/multipath_v3_M12.h @@ -24,8 +24,8 @@ #define MULTIPATH_V3_M12_H_ static double multipath_M12_v_3[3000] = { - 0.964901, 0.96429, 0.96327, 0.96184, 0.959996, 0.957736, 0.955055, 0.951948, 0.948409, 0.944431, 0.940006, 0.935125, 0.929777, 0.923952, 0.917637, 0.910816, 0.903476, 0.895597, 0.88716, 0.878145, 0.868525, 0.858275, 0.847364, 0.835759, 0.823421, 0.81031, 0.796377, 0.781568, 0.765822, 0.749069, 0.73123, 0.712211, 0.691907, 0.670191, 0.646916, 0.621908, 0.594954, 0.5658, 0.53413, 0.49955, 0.461558, 0.419503, 0.372514, 0.319396, 0.25844, 0.187086, 0.101229, -0.0063242, -0.150046, -0.366798, -0.819865, -0.896653, -0.392747, -0.166106, -0.0183232, 0.0913502, 0.178445, 0.250564, 0.312, 0.365417, 0.41258, 0.454722, 0.492736, 0.52729, 0.558898, 0.587962, 0.614804, 0.639685, 0.662818, 0.684383, 0.70453, 0.723385, 0.741058, 0.757643, 0.77322, 0.787861, 0.801628, 0.814576, 0.826754, 0.838204, 0.848966, 0.859074, 0.868558, 0.877447, 0.885765, 0.893535, 0.900777, 0.907511, 0.913751, 0.919515, 0.924815, 0.929664, 0.934073, 0.938053, 0.941611, 0.944757, 0.947498, 0.94984, 0.951789, 0.95335, 0.954527, 0.955324, 0.955743, 0.955788, 0.955459, 0.954759, 0.953687, 0.952244, 0.950429, 0.948242, 0.945679, 0.942739, 0.93942, 0.935717, 0.931626, 0.927143, 0.922262, 0.916976, 0.911279, 0.905162, 0.898617, 0.891633, 0.884201, 0.876307, 0.867938, 0.859081, 0.849718, 0.839832, 0.829403, 0.81841, 0.806828, 0.794631, 0.781789, 0.76827, 0.754037, 0.739049, 0.723259, 0.706617, 0.689063, 0.670531, 0.650945, 0.630217, 0.608247, 0.584917, 0.560089, 0.5336, 0.505256, 0.474821, 0.442007, 0.406456, 0.367719, 0.325214, 0.278178, 0.225574, 0.165949, 0.0971734, 0.0159406, -0.0832954, -0.210956, -0.390528, -0.697626, -2.47444, -0.688592, -0.394014, -0.222175, -0.101056, -0.00788877, 0.0675058, 0.13057, 0.184557, 0.231566, 0.273031, 0.309977, 0.343157, 0.373146, 0.400388, 0.425237, 0.447976, 0.468837, 0.488011, 0.505659, 0.521914, 0.536891, 0.550689, 0.563391, 0.575071, 0.585791, 0.595608, 0.60457, 0.612719, 0.620093, 0.626725, 0.632643, 0.637873, 0.642438, 0.646356, 0.649644, 0.652318, 0.654389, 0.655869, 0.656764, 0.657083, 0.656831, 0.65601, 0.654622, 0.652668, 0.650147, 0.647055, 0.643388, 0.63914, 0.634303, 0.628866, 0.622819, 0.616147, 0.608835, 0.600863, 0.592211, 0.582855, 0.572767, 0.561916, 0.550266, 0.537778, 0.524406, 0.510097, 0.494791, 0.478422, 0.460909, 0.442162, 0.422074, 0.400521, 0.377356, 0.352405, 0.325455, 0.296252, 0.26448, 0.229742, 0.191534, 0.149202, 0.101868, 0.0483298, -0.0131376, -0.0851226, -0.171779, -0.28041, -0.425767, -0.645727, -1.11222, -1.14742, -0.659418, -0.436335, -0.290478, -0.182222, -0.0963359, -0.0253332, 0.0350258, 0.087376, 0.133467, 0.174521, 0.211424, 0.24484, 0.275278, 0.303138, 0.328739, 0.35234, 0.374154, 0.394357, 0.413099, 0.430505, 0.446683, 0.461724, 0.47571, 0.488709, 0.500782, 0.511983, 0.522359, 0.531951, 0.540795, 0.548925, 0.556369, 0.563152, 0.569298, 0.574827, 0.579756, 0.584101, 0.587877, 0.591094, 0.593763, 0.595893, 0.597492, 0.598565, 0.599117, 0.599151, 0.59867, 0.597674, 0.596163, 0.594135, 0.591588, 0.588518, 0.584919, 0.580786, 0.576108, 0.570878, 0.565084, 0.558713, 0.55175, 0.544179, 0.535981, 0.527134, 0.517614, 0.507395, 0.496444, 0.484728, 0.472209, 0.458841, 0.444575, 0.429353, 0.413112, 0.395777, 0.377262, 0.357467, 0.336276, 0.313553, 0.289137, 0.262834, 0.23441, 0.203579, 0.169986, 0.133181, 0.0925868, 0.047441, -0.00328847, -0.0610497, -0.127965, -0.207326, -0.304652, -0.430305, -0.607587, -0.911194, -2.99011, -0.906057, -0.608111, -0.434091, -0.311102, -0.2162, -0.139146, -0.0744709, -0.0189098, 0.0296453, 0.0726333, 0.111081, 0.145745, 0.177202, 0.205898, 0.232187, 0.256354, 0.278631, 0.29921, 0.318253, 0.335894, 0.352249, 0.367416, 0.381481, 0.394517, 0.406589, 0.417751, 0.428054, 0.437541, 0.446249, 0.454213, 0.461462, 0.468022, 0.473916, 0.479165, 0.483786, 0.487795, 0.491206, 0.494029, 0.496274, 0.49795, 0.499062, 0.499616, 0.499615, 0.499059, 0.497951, 0.496288, 0.494069, 0.491288, 0.487942, 0.484022, 0.479519, 0.474424, 0.468724, 0.462404, 0.455447, 0.447836, 0.439548, 0.430558, 0.42084, 0.41036, 0.399084, 0.386972, 0.373976, 0.360045, 0.34512, 0.329131, 0.311999, 0.293635, 0.27393, 0.252763, 0.229984, 0.20542, 0.178861, 0.150051, 0.118675, 0.0843391, 0.0465405, 0.00462629, -0.0422748, -0.0953613, -0.156346, -0.227801, -0.313846, -0.421712, -0.565968, -0.783821, -1.24147, -1.30392, -0.80571, -0.580425, -0.433456, -0.32445, -0.23798, -0.166483, -0.105686, -0.0529357, -0.00647102, 0.0349357, 0.0721751, 0.105914, 0.136663, 0.164823, 0.190715, 0.214599, 0.236688, 0.257158, 0.276159, 0.293817, 0.310239, 0.325518, 0.339734, 0.352956, 0.365246, 0.376655, 0.387232, 0.397017, 0.406047, 0.414354, 0.421967, 0.428912, 0.43521, 0.440882, 0.445945, 0.450414, 0.454303, 0.457623, 0.460385, 0.462596, 0.464263, 0.465392, 0.465986, 0.466049, 0.465582, 0.464584, 0.463054, 0.460991, 0.45839, 0.455245, 0.451551, 0.447298, 0.442478, 0.437079, 0.431087, 0.424488, 0.417264, 0.409396, 0.400861, 0.391634, 0.381687, 0.370989, 0.359502, 0.347186, 0.333994, 0.319875, 0.304767, 0.288603, 0.271304, 0.252777, 0.232917, 0.211599, 0.188677, 0.163977, 0.137288, 0.108356, 0.076865, 0.0424233, 0.00452987, -0.0374662, -0.0844326, -0.137563, -0.19856, -0.269981, -0.355916, -0.463535, -0.607244, -0.823669, -1.27415, -1.36134, -0.854095, -0.627231, -0.479671, -0.370396, -0.283801, -0.212259, -0.151463, -0.0987439, -0.052332, -0.0109936, 0.0261656, 0.0598145, 0.0904662, 0.118523, 0.144306, 0.168074, 0.190043, 0.210389, 0.229262, 0.246787, 0.263072, 0.278209, 0.292279, 0.305351, 0.317486, 0.328735, 0.339147, 0.348763, 0.357617, 0.365744, 0.37317, 0.379922, 0.38602, 0.391485, 0.396334, 0.400581, 0.40424, 0.407321, 0.409834, 0.411787, 0.413186, 0.414035, 0.414337, 0.414095, 0.413309, 0.411978, 0.410099, 0.40767, 0.404684, 0.401136, 0.397016, 0.392315, 0.387022, 0.381122, 0.374601, 0.367439, 0.359618, 0.351113, 0.3419, 0.331947, 0.321222, 0.309687, 0.2973, 0.28401, 0.269764, 0.254497, 0.238137, 0.220601, 0.20179, 0.181591, 0.159872, 0.136475, 0.11121, 0.0838507, 0.0541182, 0.021667, -0.013938, -0.0532556, -0.0970201, -0.146223, -0.202247, -0.26711, -0.343912, -0.437795, -0.558246, -0.725998, -1.00339, -1.97815, -1.10748, -0.778731, -0.594346, -0.465878, -0.367419, -0.287761, -0.221023, -0.163736, -0.113679, -0.0693453, -0.029666, 0.00614549, 0.0386843, 0.0684114, 0.0956911, 0.120816, 0.144025, 0.165516, 0.185452, 0.203973, 0.221196, 0.237222, 0.252138, 0.266019, 0.278931, 0.290931, 0.30207, 0.312392, 0.321936, 0.330736, 0.338823, 0.346225, 0.352965, 0.359065, 0.364542, 0.369414, 0.373695, 0.377397, 0.380531, 0.383106, 0.385129, 0.386606, 0.387542, 0.38794, 0.387801, 0.387127, 0.385915, 0.384165, 0.381872, 0.379031, 0.375636, 0.371679, 0.367151, 0.362041, 0.356334, 0.350017, 0.343073, 0.335481, 0.32722, 0.318264, 0.308586, 0.298154, 0.286932, 0.274878, 0.261947, 0.248086, 0.233236, 0.217326, 0.20028, 0.182005, 0.162395, 0.141327, 0.118652, 0.0941979, 0.0677536, 0.039064, 0.00781504, -0.0263867, -0.064042, -0.105802, -0.152535, -0.205434, -0.266206, -0.337407, -0.423132, -0.530559, -0.674114, -0.8905, -1.34167, -1.42542, -0.919143, -0.692262, -0.544555, -0.435091, -0.348288, -0.276527, -0.215506, -0.162558, -0.115913, -0.0743396, -0.0369432, -0.00305536, 0.0278369, 0.0561356, 0.0821619, 0.106176, 0.128391, 0.148985, 0.168107, 0.185883, 0.202421, 0.217814, 0.23214, 0.245471, 0.257866, 0.269379, 0.280056, 0.289939, 0.299065, 0.307464, 0.315167, 0.322198, 0.328579, 0.334331, 0.33947, 0.344012, 0.34797, 0.351355, 0.354177, 0.356443, 0.358162, 0.359336, 0.359971, 0.360069, 0.359629, 0.358653, 0.357138, 0.355082, 0.35248, 0.349325, 0.345611, 0.34133, 0.336469, 0.331018, 0.324961, 0.318283, 0.310965, 0.302985, 0.294321, 0.284945, 0.274826, 0.26393, 0.252219, 0.239648, 0.226166, 0.211718, 0.196238, 0.17965, 0.161869, 0.142795, 0.122309, 0.100275, 0.0765282, 0.0508741, 0.0230751, -0.00715901, -0.0401896, -0.0764733, -0.116599, -0.161345, -0.211768, -0.269353, -0.336286, -0.415976, -0.514175, -0.641791, -0.823796, -1.14355, -2.19964, -1.07381, -0.789911, -0.620236, -0.499091, -0.405021, -0.32829, -0.263646, -0.207933, -0.159105, -0.115759, -0.0768919, -0.0417611, -0.00980245, 0.0194233, 0.0462643, 0.0710013, 0.0938639, 0.115042, 0.134694, 0.152955, 0.169938, 0.185741, 0.200449, 0.214134, 0.226861, 0.238684, 0.249654, 0.259813, 0.269199, 0.277846, 0.285783, 0.293038, 0.299632, 0.305587, 0.310921, 0.315649, 0.319785, 0.323341, 0.326328, 0.328752, 0.330622, 0.331943, 0.332718, 0.33295, 0.33264, 0.331788, 0.330392, 0.32845, 0.325957, 0.322907, 0.319292, 0.315105, 0.310333, 0.304966, 0.298987, 0.292382, 0.28513, 0.277211, 0.2686, 0.25927, 0.249189, 0.238323, 0.226633, 0.214072, 0.20059, 0.186128, 0.17062, 0.153989, 0.136145, 0.116987, 0.0963928, 0.0742209, 0.0503025, 0.0244348, -0.00362795, -0.034188, -0.0676224, -0.104409, -0.145168, -0.190721, -0.242191, -0.301171, -0.370025, -0.452488, -0.554983, -0.690037, -0.887801, -1.26216, -1.69589, -1.02273, -0.770821, -0.612864, -0.497748, -0.407317, -0.332995, -0.270046, -0.215574, -0.167681, -0.125053, -0.0867459, -0.0520546, -0.0204419, 0.00851203, 0.0351415, 0.0597165, 0.0824586, 0.103551, 0.123149, 0.141381, 0.158358, 0.174177, 0.188919, 0.202655, 0.215448, 0.227353, 0.238417, 0.248684, 0.25819, 0.266969, 0.275049, 0.282458, 0.289219, 0.295351, 0.300872, 0.305799, 0.310146, 0.313924, 0.317144, 0.319814, 0.321942, 0.323534, 0.324594, 0.325126, 0.32513, 0.324608, 0.323559, 0.321981, 0.319871, 0.317224, 0.314034, 0.310295, 0.305996, 0.301128, 0.295678, 0.289633, 0.282976, 0.275689, 0.267752, 0.259141, 0.24983, 0.23979, 0.228986, 0.217381, 0.204933, 0.191592, 0.177304, 0.162006, 0.145626, 0.12808, 0.109273, 0.0890916, 0.0674054, 0.0440584, 0.0188647, -0.00839983, -0.0380089, -0.0703016, -0.105704, -0.144763, -0.188196, -0.236966, -0.292417, -0.356495, -0.432181, -0.524379, -0.642036, -0.804344, -1.0668, -1.8357, -1.24845, -0.895274, -0.703735, -0.571879, -0.471463, -0.390544, -0.322936, -0.265022, -0.214498, -0.169811, -0.129859, -0.0938376, -0.0611367, -0.0312859, -0.00391395, 0.0212772, 0.0445302, 0.0660452, 0.0859888, 0.104502, 0.121703, 0.137694, 0.152563, 0.166386, 0.179229, 0.191149, 0.202198, 0.212418, 0.221851, 0.230529, 0.238484, 0.245742, 0.252327, 0.258261, 0.26356, 0.268241, 0.272319, 0.275804, 0.278706, 0.281035, 0.282795, 0.283993, 0.284632, 0.284714, 0.284239, 0.283206, 0.281614, 0.279457, 0.276732, 0.27343, 0.269542, 0.26506, 0.259969, 0.254256, 0.247905, 0.240896, 0.233207, 0.224814, 0.215689, 0.205801, 0.195113, 0.183585, 0.171171, 0.157818, 0.143466, 0.128047, 0.11148, 0.0936745, 0.0745231, 0.0539005, 0.0316588, 0.00762158, -0.0184234, -0.0467345, -0.0776305, -0.111511, -0.148884, -0.190414, -0.236985, -0.289821, -0.350669, -0.422165, -0.508547, -0.617302, -0.76366, -0.987247, -1.47576, -1.44105, -0.975067, -0.755614, -0.610762, -0.502636, -0.416483, -0.344999, -0.284031, -0.230988, -0.184147, -0.142303, -0.104579, -0.0703197, -0.0390193, -0.0102822, 0.0162085, 0.0407096, 0.0634327, 0.0845534, 0.10422, 0.122557, 0.139672, 0.155656, 0.170591, 0.184545, 0.197579, 0.209747, 0.221095, 0.231665, 0.241494, 0.250616, 0.259058, 0.266847, 0.274007, 0.280557, 0.286516, 0.291901, 0.296725, 0.301002, 0.304742, 0.307956, 0.31065, 0.312833, 0.314509, 0.315684, 0.31636, 0.31654, 0.316224, 0.315414, 0.314108, 0.312303, 0.309998, 0.307186, 0.303863, 0.300022, 0.295655, 0.290752, 0.285303, 0.279294, 0.272713, 0.265543, 0.257766, 0.249362, 0.240308, 0.230578, 0.220144, 0.208974, 0.197032, 0.184277, 0.170663, 0.156137, 0.140642, 0.124108, 0.106459, 0.0876049, 0.0674422, 0.0458498, 0.0226849, -0.00222166, -0.0290728, -0.0581146, -0.0896493, -0.124054, -0.161805, -0.203522, -0.250024, -0.302432, -0.36233, -0.432074, -0.515377, -0.618619, -0.754219, -0.951971, -1.32345, -1.78416, -1.09696, -0.84438, -0.686837, -0.572468, -0.482934, -0.409596, -0.347687, -0.294299, -0.247525, -0.206048, -0.16892, -0.135436, -0.105059, -0.0773685, -0.0520307, -0.0287765, -0.00738546, 0.0123247, 0.0305065, 0.0472886, 0.0627801, 0.0770744, 0.0902517, 0.102381, 0.113523, 0.12373, 0.133046, 0.141511, 0.14916, 0.156022, 0.162123, 0.167485, 0.172127, 0.176064, 0.179311, 0.181876, 0.183769, 0.184994, 0.185555, 0.185454, 0.184688, 0.183254, 0.181148, 0.17836, 0.17488, 0.170695, 0.165788, 0.160142, 0.153733, 0.146535, 0.138518, 0.129647, 0.119883, 0.109178, 0.0974808, 0.0847293, 0.0708532, 0.0557705, 0.0393857, 0.0215871, 0.00224293, -0.0188034, -0.0417395, -0.0667924, -0.0942404, -0.124429, -0.157794, -0.194897, -0.236474, -0.283524, -0.337438, -0.400251, -0.475095, -0.567176, -0.686127, -0.853106, -1.13243, -2.18771, -1.21214, -0.886905, -0.702021, -0.572127, -0.471876, -0.390241, -0.321416, -0.261969, -0.209696, -0.163104, -0.121128, -0.0829869, -0.0480869, -0.0159684, 0.0137328, 0.0413094, 0.0670007, 0.0910048, 0.113487, 0.134587, 0.154425, 0.173103, 0.190709, 0.20732, 0.223004, 0.237821, 0.251823, 0.265056, 0.277563, 0.289381, 0.300542, 0.311077, 0.321013, 0.330375, 0.339185, 0.347463, 0.355227, 0.362494, 0.369279, 0.375596, 0.381458, 0.386876, 0.39186, 0.396419, 0.400564, 0.4043, 0.407636, 0.410577, 0.41313, 0.415298, 0.417087, 0.418501, 0.419543, 0.420215, 0.42052, 0.420459, 0.420035, 0.419247, 0.418097, 0.416584, 0.414708, 0.412467, 0.409861, 0.406887, 0.403543, 0.399826, 0.395733, 0.39126, 0.386403, 0.381156, 0.375515, 0.369472, 0.363022, 0.356156, 0.348866, 0.341144, 0.332979, 0.324361, 0.315278, 0.305717, 0.295664, 0.285103, 0.274019, 0.262392, 0.250202, 0.237428, 0.224045, 0.210027, 0.195344, 0.179965, 0.163853, 0.146968, 0.129266, 0.110697, 0.091206, 0.0707289, 0.0491944, 0.0265208, 0.00261465, -0.0226323, -0.0493459, -0.0776736, -0.10779, -0.139904, -0.174268, -0.211191, -0.251059, -0.29436, -0.341723, -0.393987, -0.452292, -0.518258, -0.594291, -0.684199, -0.794546, -0.938202, -1.14644, -1.54054, -1.90766, -1.28324, -1.04427, -0.896286, -0.790384, -0.708954, -0.643626, -0.589765, -0.544538, -0.506089, -0.473138, -0.44477, -0.420311, -0.399251, -0.3812, -0.365857, -0.352984, -0.342398, -0.333957, -0.327551, -0.323103, -0.320558, -0.319887, -0.321081, -0.324154, -0.329142, -0.336104, -0.345127, -0.356326, -0.369853, -0.385906, -0.404734, -0.426659, -0.452099, -0.481597, -0.515881, -0.555942, -0.603178, -0.659641, -0.728511, -0.815101, -0.92931, -1.0931, -1.37461, -2.65065, -1.40717, -1.0866, -0.899649, -0.766193, -0.661868, -0.575959, -0.502792, -0.438994, -0.382396, -0.331521, -0.285314, -0.242998, -0.203982, -0.167809, -0.134113, -0.102601, -0.0730326, -0.0452082, -0.0189607, 0.00585141, 0.0293492, 0.0516368, 0.0728044, 0.0929311, 0.112086, 0.13033, 0.147718, 0.164297, 0.180111, 0.195198, 0.209593, 0.223328, 0.236431, 0.248928, 0.260841, 0.272193, 0.283003, 0.293288, 0.303065, 0.312348, 0.321151, 0.329485, 0.337363, 0.344795, 0.35179, 0.358355, 0.3645, 0.37023, 0.375553, 0.380473, 0.384995, 0.389124, 0.392863, 0.396215, 0.399184, 0.40177, 0.403976, 0.405802, 0.407248, 0.408316, 0.409003, 0.409309, 0.409232, 0.408769, 0.407918, 0.406676, 0.405038, 0.403, 0.400555, 0.397699, 0.394423, 0.390721, 0.386583, 0.382, 0.376962, 0.371456, 0.365469, 0.358988, 0.351996, 0.344477, 0.33641, 0.327774, 0.318547, 0.308701, 0.298208, 0.287035, 0.275147, 0.262504, 0.249059, 0.234762, 0.219556, 0.203375, 0.186144, 0.167777, 0.148175, 0.127222, 0.104782, 0.0806968, 0.0547734, 0.0267814, -0.00356155, -0.0366052, -0.0727903, -0.112684, -0.157029, -0.206834, -0.263506, -0.329097, -0.406778, -0.501822, -0.62402, -0.794985, -1.08115, -2.24948, -1.1453, -0.828125, -0.647345, -0.520614, -0.423151, -0.34411, -0.277765, -0.220721, -0.1708, -0.126519, -0.086825, -0.0509417, -0.0182814, 0.0116119, 0.0390988, 0.0644695, 0.0879607, 0.109768, 0.130055, 0.14896, 0.166599, 0.183074, 0.198471, 0.212865, 0.226322, 0.2389, 0.250649, 0.261614, 0.271834, 0.281346, 0.290179, 0.298362, 0.30592, 0.312874, 0.319246, 0.325051, 0.330306, 0.335025, 0.33922, 0.3429, 0.346077, 0.348756, 0.350946, 0.352651, 0.353876, 0.354624, 0.354897, 0.354696, 0.354021, 0.352872, 0.351245, 0.349139, 0.346548, 0.343468, 0.339892, 0.335811, 0.331217, 0.3261, 0.320446, 0.314243, 0.307474, 0.300123, 0.292169, 0.283591, 0.274363, 0.264457, 0.253842, 0.242484, 0.230341, 0.217369, 0.203518, 0.188729, 0.172936, 0.156063, 0.138023, 0.118715, 0.0980206, 0.0757998, 0.0518879, 0.0260868, -0.00184304, -0.0321958, -0.0653376, -0.101732, -0.141976, -0.186863, -0.237468, -0.295311, -0.362632, -0.442938, -0.542184, -0.671761, -0.858149, -1.193, -1.97811, -1.0695, -0.796175, -0.62989, -0.510163, -0.416674, -0.340075, -0.275287, -0.219239, -0.169932, -0.125992, -0.086432, -0.0505224, -0.0177059, 0.0124521, 0.0402965, 0.0661064, 0.0901103, 0.112498, 0.133428, 0.153036, 0.171436, 0.188728, 0.204998, 0.220321, 0.234762, 0.24838, 0.261227, 0.273347, 0.284784, 0.295572, 0.305746, 0.315336, 0.324369, 0.332869, 0.34086, 0.348362, 0.355394, 0.361973, 0.368116, 0.373837, 0.379151, 0.384069, 0.388603, 0.392765, 0.396564, 0.40001, 0.403112, 0.405878, 0.408316, 0.410434, 0.412237, 0.413732, 0.414926, 0.415824, 0.416432, 0.416754, 0.416796, 0.416563, 0.416058, 0.415285, 0.41425, 0.412956, 0.411406, 0.409605, 0.407556, 0.405262, 0.402726, 0.399953, 0.396946, 0.393707, 0.39024, 0.386548, 0.382635, 0.378504, 0.374158, 0.369601, 0.364837, 0.359869, 0.354701, 0.349337, 0.343781, 0.338037, 0.332111, 0.326006, 0.319728, 0.313282, 0.306674, 0.29991, 0.292996, 0.285938, 0.278744, 0.271421, 0.263977, 0.256421, 0.248762, 0.241008, 0.233171, 0.22526, 0.217288, 0.209265, 0.201205, 0.19312, 0.185024, 0.176932, 0.168858, 0.160819, 0.152831, 0.144911, 0.137076, 0.129345, 0.121735, 0.114267, 0.106958, 0.0998283, 0.0928978, 0.0861858, 0.0797117, 0.0734947, 0.0675535, 0.0619064, 0.0565708, 0.0515634, 0.0468997, 0.0425942, 0.0386597, 0.035108, 0.0319488, 0.0291904, 0.026839, 0.0248989, 0.0233725, 0.0222603, 0.0215603, 0.0212689, 0.0213804, 0.021887, 0.0227793, 0.0240459, 0.0256738, 0.0276488, 0.0299549, 0.0325752, 0.0354918, 0.0386855, 0.0421368, 0.0458255, 0.049731, 0.0538322, 0.0581081, 0.0625376, 0.0670997, 0.0717735, 0.0765384, 0.0813743, 0.0862613, 0.0911799, 0.0961114, 0.101037, 0.10594, 0.110802, 0.115606, 0.120338, 0.12498, 0.129518, 0.133937, 0.138223, 0.142364, 0.146344, 0.150152, 0.153776, 0.157202, 0.160419, 0.163416, 0.166181, 0.168703, 0.17097, 0.172971, 0.174696, 0.176132, 0.177268, 0.178093, 0.178595, 0.178761, 0.17858, 0.178037, 0.17712, 0.175813, 0.174103, 0.171973, 0.169405, 0.166383, 0.162887, 0.158895, 0.154386, 0.149336, 0.143716, 0.137499, 0.130653, 0.123142, 0.114928, 0.105967, 0.096211, 0.0856059, 0.0740905, 0.0615956, 0.048042, 0.0333391, 0.0173819, 4.83355e-05, -0.0188048, -0.0393474, -0.0617827, -0.0863567, -0.113371, -0.143202, -0.176327, -0.21336, -0.255119, -0.302718, -0.357736, -0.422513, -0.500737, -0.598734, -0.728797, -0.920296, -1.28213, -1.76978, -1.05823, -0.798315, -0.634696, -0.514584, -0.419419, -0.34048, -0.272964, -0.213943, -0.161497, -0.114302, -0.0714031, -0.0320914, 0.00417506, 0.0378198, 0.0691799, 0.0985279, 0.126087, 0.152044, 0.176554, 0.199749, 0.221742, 0.242631, 0.262499, 0.281419, 0.299458, 0.31667, 0.333108, 0.348815, 0.363831, 0.378192, 0.391932, 0.405077, 0.417656, 0.429691, 0.441204, 0.452215, 0.462742, 0.4728, 0.482405, 0.491571, 0.500309, 0.508631, 0.516547, 0.524067, 0.531199, 0.537951, 0.544331, 0.550344, 0.555996, 0.561293, 0.566239, 0.570839, 0.575095, 0.579011, 0.582589, 0.585832, 0.588742, 0.591319, 0.593564, 0.595478, 0.597061, 0.598313, 0.599231, 0.599816, 0.600064, 0.599975, 0.599544, 0.59877, 0.597648, 0.596174, 0.594343, 0.59215, 0.589589, 0.586652, 0.583333, 0.579624, 0.575515, 0.570996, 0.566057, 0.560686, 0.554869, 0.548592, 0.54184, 0.534595, 0.526838, 0.518547, 0.509701, 0.500274, 0.490236, 0.479557, 0.468202, 0.456131, 0.443301, 0.429663, 0.415162, 0.399733, 0.383307, 0.3658, 0.347118, 0.327151, 0.30577, 0.282824, 0.258134, 0.231482, 0.202604, 0.171177, 0.136791, 0.0989286, 0.0569108, 0.00983063, -0.0435648, -0.105076, -0.177426, -0.265021, -0.375707, -0.525663, -0.758093, -1.2967, -1.1311, -0.701844, -0.489984, -0.34813, -0.2414, -0.155878, -0.0845868, -0.023526, 0.0298121, 0.0771037, 0.119525, 0.157932, 0.19297, 0.225133, 0.254812, 0.282319, 0.307907, 0.331786, 0.354129, 0.375083, 0.394773, 0.413306, 0.430773, 0.447255, 0.462821, 0.477533, 0.491444, 0.504603, 0.517052, 0.52883, 0.53997, 0.550504, 0.560458, 0.569858, 0.578726, 0.587082, 0.594945, 0.602333, 0.609259, 0.615738, 0.621782, 0.627403, 0.632611, 0.637416, 0.641826, 0.645849, 0.649491, 0.652758, 0.655657, 0.658191, 0.660365, 0.662182, 0.663646, 0.664759, 0.665522, 0.665937, 0.666005, 0.665726, 0.6651, 0.664126, 0.662804, 0.66113, 0.659103, 0.65672, 0.653977, 0.650871, 0.647397, 0.64355, 0.639323, 0.63471, 0.629704, 0.624295, 0.618476, 0.612235, 0.605561, 0.598443, 0.590866, 0.582816, 0.574276, 0.565227, 0.555651, 0.545524, 0.534822, 0.523518, 0.511581, 0.49898, 0.485675, 0.471625, 0.456783, 0.441097, 0.424505, 0.40694, 0.388323, 0.368565, 0.347561, 0.325189, 0.301308, 0.275747, 0.248304, 0.218733, 0.186732, 0.151926, 0.113838, 0.0718509, 0.0251485, -0.0273851, -0.0873295, -0.157028, -0.240174, -0.343106, -0.478142, -0.674745, -1.04239, -1.5278, -0.825315, -0.570641, -0.411967, -0.296703, -0.206338, -0.132166, -0.0693938, -0.0150963, 0.0326427, 0.0751468, 0.113369, 0.148017, 0.179634, 0.208641, 0.235375, 0.260109, 0.283066, 0.30443, 0.324358, 0.342982, 0.360413, 0.376748, 0.392072, 0.406458, 0.41997, 0.432663, 0.444589, 0.455791, 0.46631, 0.47618, 0.485434, 0.494099, 0.502203, 0.509767, 0.516814, 0.523362, 0.529429, 0.53503, 0.54018, 0.544892, 0.549177, 0.553047, 0.556511, 0.559577, 0.562255, 0.56455, 0.56647, 0.56802, 0.569204, 0.570028, 0.570495, 0.570609, 0.570371, 0.569784, 0.56885, 0.56757, 0.565944, 0.563971, 0.561653, 0.558987, 0.555972, 0.552607, 0.548888, 0.544812, 0.540375, 0.535574, 0.530403, 0.524857, 0.518929, 0.512612, 0.505899, 0.498779, 0.491245, 0.483284, 0.474886, 0.466037, 0.456723, 0.446928, 0.436634, 0.425823, 0.414474, 0.402563, 0.390063, 0.376948, 0.363184, 0.348736, 0.333564, 0.317624, 0.300865, 0.283231, 0.264657, 0.245069, 0.224384, 0.202503, 0.179313, 0.15468, 0.128449, 0.100432, 0.0704027, 0.0380859, 0.00314054, -0.0348623, -0.0764726, -0.122411, -0.17365, -0.231541, -0.298047, -0.376179, -0.470895, -0.591268, -0.756846, -1.02467, -1.83432, -1.19115, -0.845934, -0.657848, -0.528442, -0.430058, -0.350934, -0.284961, -0.228555, -0.179433, -0.136051, -0.0973153, -0.0624235, -0.0307687, -0.00188133, 0.0246097, 0.0490027, 0.0715408, 0.0924253, 0.111824, 0.129879, 0.146711, 0.162425, 0.177109, 0.190842, 0.203692, 0.215721, 0.226981, 0.237519, 0.247379, 0.256599, 0.265211, 0.273248, 0.280737, 0.287704, 0.294172, 0.300161, 0.305692, 0.310781, 0.315445, 0.319698, 0.323555, 0.327028, 0.330129, 0.332868, 0.335256, 0.337301, 0.339012, 0.340397, 0.341464, 0.342218, 0.342667, 0.342816, 0.34267, 0.342234, 0.341513, 0.34051, 0.33923, 0.337676, 0.335852, 0.333759, 0.3314, 0.328778, 0.325894, 0.322751, 0.319348, 0.315689, 0.311772, 0.307599, 0.30317, 0.298486, 0.293545, 0.288347, 0.282891, 0.277176, 0.271201, 0.264964, 0.258462, 0.251693, 0.244654, 0.237342, 0.229754, 0.221884, 0.213729, 0.205284, 0.196542, 0.187497, 0.178143, 0.168473, 0.158476, 0.148146, 0.13747, 0.126439, 0.115041, 0.103262, 0.0910865, 0.0784998, 0.0654835, 0.0520181, 0.038082, 0.0236509, 0.00869845, -0.00680521, -0.0228932, -0.0396024, -0.0569746, -0.0750566, -0.0939014, -0.113569, -0.134128, -0.155658, -0.178249, -0.202007, -0.227056, -0.25354, -0.281633, -0.311544, -0.343525, -0.377887, -0.41502, -0.45542, -0.49973, -0.54881, -0.603838, -0.666495, -0.739299, -0.826272, -0.934433, -1.07781, -1.2917, -1.72663, -1.87403, -1.34384, -1.11317, -0.96406, -0.853844, -0.766479, -0.69417, -0.632534, -0.578861, -0.531356, -0.488771, -0.4502, -0.414966, -0.382552, -0.352551, -0.324637, -0.298547, -0.274064, -0.25101, -0.229231, -0.208601, -0.189009, -0.17036, -0.152572, -0.135575, -0.119304, -0.103706, -0.0887304, -0.0743345, -0.0604793, -0.0471303, -0.0342563, -0.0218295, -0.00982458, 0.00178105, 0.013008, 0.0238748, 0.0343985, 0.0445943, 0.0544761, 0.0640566, 0.0733472, 0.0823586, 0.0911, 0.0995802, 0.107807, 0.115788, 0.123528, 0.131035, 0.138313, 0.145366, 0.1522, 0.158818, 0.165223, 0.171417, 0.177405, 0.183187, 0.188766, 0.194142, 0.199319, 0.204295, 0.209072, 0.213651, 0.218031, 0.222213, 0.226195, 0.229979, 0.233562, 0.236943, 0.240122, 0.243098, 0.245867, 0.24843, 0.250783, 0.252924, 0.254851, 0.256561, 0.258051, 0.259318, 0.260358, 0.261168, 0.261744, 0.262082, 0.262177, 0.262024, 0.261619, 0.260955, 0.260027, 0.258829, 0.257354, 0.255596, 0.253545, 0.251196, 0.248539, 0.245564, 0.242262, 0.238623, 0.234635, 0.230286, 0.225563, 0.220452, 0.214938, 0.209003, 0.202631, 0.195802, 0.188495, 0.180686, 0.17235, 0.16346, 0.153986, 0.143892, 0.133142, 0.121695, 0.109504, 0.096516, 0.0826734, 0.0679094, 0.0521484, 0.0353036, 0.0172753, -0.00205254, -0.0228156, -0.0451741, -0.0693188, -0.09548, -0.123938, -0.155042, -0.189228, -0.227058, -0.269269, -0.316857, -0.37121, -0.434352, -0.509395, -0.601506, -0.720219, -0.886411, -1.16307, -2.16118, -1.25612, -0.92702, -0.740873, -0.610275, -0.509508, -0.427423, -0.358168, -0.298286, -0.245562, -0.198495, -0.156018, -0.117346, -0.0818858, -0.0491762, -0.0188537, 0.00937428, 0.0357464, 0.06046, 0.0836798, 0.105545, 0.126174, 0.145667, 0.164114, 0.181589, 0.198159, 0.213884, 0.228814, 0.242994, 0.256466, 0.269266, 0.281426, 0.292975, 0.303938, 0.31434, 0.324201, 0.333541, 0.342376, 0.350721, 0.358592, 0.365999, 0.372955, 0.379468, 0.38555, 0.391206, 0.396444, 0.40127, 0.40569, 0.409708, 0.413327, 0.41655, 0.419381, 0.421819, 0.423866, 0.425522, 0.426787, 0.427659, 0.428137, 0.428217, 0.427897, 0.427173, 0.426039, 0.424489, 0.422518, 0.420118, 0.417281, 0.413996, 0.410254, 0.406043, 0.401349, 0.396159, 0.390456, 0.384222, 0.377437, 0.37008, 0.362127, 0.353549, 0.344318, 0.334399, 0.323755, 0.312344, 0.300118, 0.287024, 0.273001, 0.257979, 0.241879, 0.22461, 0.206065, 0.18612, 0.16463, 0.141421, 0.116284, 0.088968, 0.0591614, 0.0264762, -0.00958095, -0.0496504, -0.0945842, -0.145551, -0.204217, -0.273069, -0.356072, -0.460126, -0.598954, -0.806764, -1.22579, -1.42175, -0.866959, -0.630065, -0.477024, -0.3637, -0.273672, -0.199002, -0.135243, -0.0796498, -0.0304104, 0.0137362, 0.0537021, 0.0901684, 0.123657, 0.154577, 0.183254, 0.209953, 0.234891, 0.258249, 0.280178, 0.300807, 0.320245, 0.338588, 0.355917, 0.372305, 0.387813, 0.402497, 0.416406, 0.429584, 0.442068, 0.453895, 0.465094, 0.475694, 0.485719, 0.495193, 0.504135, 0.512565, 0.520499, 0.527951, 0.534936, 0.541467, 0.547553, 0.553205, 0.558433, 0.563243, 0.567644, 0.571642, 0.575241, 0.578447, 0.581264, 0.583695, 0.585743, 0.58741, 0.588698, 0.589606, 0.590136, 0.590287, 0.590058, 0.589447, 0.588452, 0.587071, 0.585299, 0.583132, 0.580565, 0.577593, 0.574209, 0.570406, 0.566175, 0.561507, 0.556392, 0.550819, 0.544774, 0.538245, 0.531214, 0.523667, 0.515582, 0.506941, 0.497719, 0.487892, 0.477431, 0.466303, 0.454475, 0.441907, 0.428555, 0.414368, 0.399291, 0.383261, 0.366203, 0.348036, 0.328662, 0.30797, 0.285829, 0.262084, 0.236553, 0.209012, 0.179192, 0.14676, 0.111297, 0.0722687, 0.028974, -0.0195264, -0.0745358, -0.137937, -0.212594, -0.303188, -0.418166, -0.575328, -0.824319, -1.47008, -1.08644, -0.704412, -0.504902, -0.369229, -0.266506, -0.183988, -0.115162, -0.0562525, -0.00487022, 0.0405901, 0.08126, 0.117967, 0.151334, 0.181841, 0.209869, 0.23572, 0.25964, 0.281834, 0.302471, 0.321694, 0.339623, 0.356361, 0.371999, 0.386612, 0.400268, 0.413026, 0.424936, 0.436045, 0.446391, 0.456011, 0.464935, 0.473192, 0.480806, 0.487798, 0.494187, 0.499991, 0.505225, 0.5099, 0.514029, 0.51762, 0.520682, 0.523221, 0.525242, 0.526748, 0.527742, 0.528226, 0.528198, 0.527657, 0.526601, 0.525025, 0.522924, 0.52029, 0.517116, 0.513391, 0.509104, 0.504241, 0.498787, 0.492723, 0.48603, 0.478685, 0.470662, 0.461933, 0.452464, 0.442219, 0.431155, 0.419226, 0.406376, 0.392545, 0.377662, 0.361646, 0.344401, 0.325818, 0.305769, 0.284101, 0.260632, 0.235143, 0.207368, 0.176975, 0.143549, 0.106561, 0.0653149, 0.0188802, -0.0340352, -0.0952952, -0.167734, -0.255973, -0.368329, -0.522252, -0.76596, -1.38421, -1.04663, -0.654087, -0.450444, -0.311832, -0.206599, -0.121767, -0.050733, 0.0103262, 0.0638236, 0.11138, 0.154137, 0.192929, 0.228385, 0.260989, 0.291124, 0.319096, 0.345154, 0.369505, 0.39232, 0.413744, 0.4339, 0.452893, 0.470815, 0.487745, 0.503752, 0.518896, 0.533232, 0.546808, 0.559664, 0.571841, 0.583371, 0.594284, 0.60461, 0.614371, 0.623591, 0.63229, 0.640487, 0.648198, 0.655439, 0.662223, 0.668563, 0.67447, 0.679955, 0.685027, 0.689694, 0.693965, 0.697846, 0.701343, 0.704462, 0.707207, 0.709583, 0.711593, 0.71324, 0.714527, 0.715455, 0.716026, 0.71624, 0.716099, 0.715601, 0.714747, 0.713534, 0.711962, 0.710027, 0.707727, 0.70506, 0.70202, 0.698603, 0.694803, 0.690616, 0.686035, 0.681051, 0.675658, 0.669845, 0.663602, 0.65692, 0.649785, 0.642184, 0.634103, 0.625526, 0.616433, 0.606807, 0.596626, 0.585864, 0.574497, 0.562495, 0.549825, 0.536452, 0.522334, 0.507427, 0.491679, 0.475032, 0.457422, 0.438773, 0.419, 0.398003, 0.375668, 0.35186, 0.326418, 0.299154, 0.269838, 0.238191, 0.203865, 0.166425, 0.12531, 0.0797858, 0.0288607, -0.0288496, -0.09536, -0.17377, -0.269217, -0.391173, -0.560332, -0.838848, -1.80799, -0.947843, -0.619964, -0.436827, -0.309676, -0.212547, -0.134214, -0.068791, -0.0128052, 0.035965, 0.0790267, 0.117449, 0.152019, 0.183331, 0.211844, 0.237924, 0.261861, 0.283895, 0.304221, 0.323003, 0.340379, 0.356466, 0.371365, 0.38516, 0.397927, 0.40973, 0.420625, 0.430663, 0.439885, 0.448331, 0.456033, 0.463021, 0.469321, 0.474956, 0.479944, 0.484305, 0.488051, 0.491196, 0.493751, 0.495724, 0.497122, 0.49795, 0.498211, 0.497908, 0.497041, 0.495608, 0.493606, 0.491032, 0.487878, 0.484136, 0.479797, 0.474848, 0.469276, 0.463064, 0.456193, 0.448643, 0.440387, 0.431398, 0.421645, 0.41109, 0.399693, 0.387407, 0.374178, 0.359944, 0.344636, 0.328172, 0.310457, 0.291383, 0.270819, 0.248613, 0.224582, 0.198505, 0.170115, 0.139078, 0.104975, 0.0672713, 0.0252655, -0.0219849, -0.0757881, -0.138035, -0.211609, -0.301223, -0.4154, -0.572154, -0.822007, -1.48311, -1.06858, -0.690328, -0.490967, -0.354749, -0.251236, -0.167813, -0.0980209, -0.0381084, 0.0143, 0.0608024, 0.102527, 0.140297, 0.174737, 0.206325, 0.235441, 0.262388, 0.287413, 0.310722, 0.332484, 0.352842, 0.371919, 0.389819, 0.406632, 0.422436, 0.437301, 0.451286, 0.464443, 0.476821, 0.488459, 0.499396, 0.509665, 0.519295, 0.528313, 0.536743, 0.544606, 0.551921, 0.558706, 0.564977, 0.570748, 0.576031, 0.580837, 0.585177, 0.589059, 0.592492, 0.595482, 0.598035, 0.600155, 0.601848, 0.603116, 0.603962, 0.604387, 0.604393, 0.603979, 0.603146, 0.601891, 0.600212, 0.598107, 0.595572, 0.592602, 0.589191, 0.585334 - }; + 0.964901, 0.96429, 0.96327, 0.96184, 0.959996, 0.957736, 0.955055, 0.951948, 0.948409, 0.944431, 0.940006, 0.935125, 0.929777, 0.923952, 0.917637, 0.910816, 0.903476, 0.895597, 0.88716, 0.878145, 0.868525, 0.858275, 0.847364, 0.835759, 0.823421, 0.81031, 0.796377, 0.781568, 0.765822, 0.749069, 0.73123, 0.712211, 0.691907, 0.670191, 0.646916, 0.621908, 0.594954, 0.5658, 0.53413, 0.49955, 0.461558, 0.419503, 0.372514, 0.319396, 0.25844, 0.187086, 0.101229, -0.0063242, -0.150046, -0.366798, -0.819865, -0.896653, -0.392747, -0.166106, -0.0183232, 0.0913502, 0.178445, 0.250564, 0.312, 0.365417, 0.41258, 0.454722, 0.492736, 0.52729, 0.558898, 0.587962, 0.614804, 0.639685, 0.662818, 0.684383, 0.70453, 0.723385, 0.741058, 0.757643, 0.77322, 0.787861, 0.801628, 0.814576, 0.826754, 0.838204, 0.848966, 0.859074, 0.868558, 0.877447, 0.885765, 0.893535, 0.900777, 0.907511, 0.913751, 0.919515, 0.924815, 0.929664, 0.934073, 0.938053, 0.941611, 0.944757, 0.947498, 0.94984, 0.951789, 0.95335, 0.954527, 0.955324, 0.955743, 0.955788, 0.955459, 0.954759, 0.953687, 0.952244, 0.950429, 0.948242, 0.945679, 0.942739, 0.93942, 0.935717, 0.931626, 0.927143, 0.922262, 0.916976, 0.911279, 0.905162, 0.898617, 0.891633, 0.884201, 0.876307, 0.867938, 0.859081, 0.849718, 0.839832, 0.829403, 0.81841, 0.806828, 0.794631, 0.781789, 0.76827, 0.754037, 0.739049, 0.723259, 0.706617, 0.689063, 0.670531, 0.650945, 0.630217, 0.608247, 0.584917, 0.560089, 0.5336, 0.505256, 0.474821, 0.442007, 0.406456, 0.367719, 0.325214, 0.278178, 0.225574, 0.165949, 0.0971734, 0.0159406, -0.0832954, -0.210956, -0.390528, -0.697626, -2.47444, -0.688592, -0.394014, -0.222175, -0.101056, -0.00788877, 0.0675058, 0.13057, 0.184557, 0.231566, 0.273031, 0.309977, 0.343157, 0.373146, 0.400388, 0.425237, 0.447976, 0.468837, 0.488011, 0.505659, 0.521914, 0.536891, 0.550689, 0.563391, 0.575071, 0.585791, 0.595608, 0.60457, 0.612719, 0.620093, 0.626725, 0.632643, 0.637873, 0.642438, 0.646356, 0.649644, 0.652318, 0.654389, 0.655869, 0.656764, 0.657083, 0.656831, 0.65601, 0.654622, 0.652668, 0.650147, 0.647055, 0.643388, 0.63914, 0.634303, 0.628866, 0.622819, 0.616147, 0.608835, 0.600863, 0.592211, 0.582855, 0.572767, 0.561916, 0.550266, 0.537778, 0.524406, 0.510097, 0.494791, 0.478422, 0.460909, 0.442162, 0.422074, 0.400521, 0.377356, 0.352405, 0.325455, 0.296252, 0.26448, 0.229742, 0.191534, 0.149202, 0.101868, 0.0483298, -0.0131376, -0.0851226, -0.171779, -0.28041, -0.425767, -0.645727, -1.11222, -1.14742, -0.659418, -0.436335, -0.290478, -0.182222, -0.0963359, -0.0253332, 0.0350258, 0.087376, 0.133467, 0.174521, 0.211424, 0.24484, 0.275278, 0.303138, 0.328739, 0.35234, 0.374154, 0.394357, 0.413099, 0.430505, 0.446683, 0.461724, 0.47571, 0.488709, 0.500782, 0.511983, 0.522359, 0.531951, 0.540795, 0.548925, 0.556369, 0.563152, 0.569298, 0.574827, 0.579756, 0.584101, 0.587877, 0.591094, 0.593763, 0.595893, 0.597492, 0.598565, 0.599117, 0.599151, 0.59867, 0.597674, 0.596163, 0.594135, 0.591588, 0.588518, 0.584919, 0.580786, 0.576108, 0.570878, 0.565084, 0.558713, 0.55175, 0.544179, 0.535981, 0.527134, 0.517614, 0.507395, 0.496444, 0.484728, 0.472209, 0.458841, 0.444575, 0.429353, 0.413112, 0.395777, 0.377262, 0.357467, 0.336276, 0.313553, 0.289137, 0.262834, 0.23441, 0.203579, 0.169986, 0.133181, 0.0925868, 0.047441, -0.00328847, -0.0610497, -0.127965, -0.207326, -0.304652, -0.430305, -0.607587, -0.911194, -2.99011, -0.906057, -0.608111, -0.434091, -0.311102, -0.2162, -0.139146, -0.0744709, -0.0189098, 0.0296453, 0.0726333, 0.111081, 0.145745, 0.177202, 0.205898, 0.232187, 0.256354, 0.278631, 0.29921, 0.318253, 0.335894, 0.352249, 0.367416, 0.381481, 0.394517, 0.406589, 0.417751, 0.428054, 0.437541, 0.446249, 0.454213, 0.461462, 0.468022, 0.473916, 0.479165, 0.483786, 0.487795, 0.491206, 0.494029, 0.496274, 0.49795, 0.499062, 0.499616, 0.499615, 0.499059, 0.497951, 0.496288, 0.494069, 0.491288, 0.487942, 0.484022, 0.479519, 0.474424, 0.468724, 0.462404, 0.455447, 0.447836, 0.439548, 0.430558, 0.42084, 0.41036, 0.399084, 0.386972, 0.373976, 0.360045, 0.34512, 0.329131, 0.311999, 0.293635, 0.27393, 0.252763, 0.229984, 0.20542, 0.178861, 0.150051, 0.118675, 0.0843391, 0.0465405, 0.00462629, -0.0422748, -0.0953613, -0.156346, -0.227801, -0.313846, -0.421712, -0.565968, -0.783821, -1.24147, -1.30392, -0.80571, -0.580425, -0.433456, -0.32445, -0.23798, -0.166483, -0.105686, -0.0529357, -0.00647102, 0.0349357, 0.0721751, 0.105914, 0.136663, 0.164823, 0.190715, 0.214599, 0.236688, 0.257158, 0.276159, 0.293817, 0.310239, 0.325518, 0.339734, 0.352956, 0.365246, 0.376655, 0.387232, 0.397017, 0.406047, 0.414354, 0.421967, 0.428912, 0.43521, 0.440882, 0.445945, 0.450414, 0.454303, 0.457623, 0.460385, 0.462596, 0.464263, 0.465392, 0.465986, 0.466049, 0.465582, 0.464584, 0.463054, 0.460991, 0.45839, 0.455245, 0.451551, 0.447298, 0.442478, 0.437079, 0.431087, 0.424488, 0.417264, 0.409396, 0.400861, 0.391634, 0.381687, 0.370989, 0.359502, 0.347186, 0.333994, 0.319875, 0.304767, 0.288603, 0.271304, 0.252777, 0.232917, 0.211599, 0.188677, 0.163977, 0.137288, 0.108356, 0.076865, 0.0424233, 0.00452987, -0.0374662, -0.0844326, -0.137563, -0.19856, -0.269981, -0.355916, -0.463535, -0.607244, -0.823669, -1.27415, -1.36134, -0.854095, -0.627231, -0.479671, -0.370396, -0.283801, -0.212259, -0.151463, -0.0987439, -0.052332, -0.0109936, 0.0261656, 0.0598145, 0.0904662, 0.118523, 0.144306, 0.168074, 0.190043, 0.210389, 0.229262, 0.246787, 0.263072, 0.278209, 0.292279, 0.305351, 0.317486, 0.328735, 0.339147, 0.348763, 0.357617, 0.365744, 0.37317, 0.379922, 0.38602, 0.391485, 0.396334, 0.400581, 0.40424, 0.407321, 0.409834, 0.411787, 0.413186, 0.414035, 0.414337, 0.414095, 0.413309, 0.411978, 0.410099, 0.40767, 0.404684, 0.401136, 0.397016, 0.392315, 0.387022, 0.381122, 0.374601, 0.367439, 0.359618, 0.351113, 0.3419, 0.331947, 0.321222, 0.309687, 0.2973, 0.28401, 0.269764, 0.254497, 0.238137, 0.220601, 0.20179, 0.181591, 0.159872, 0.136475, 0.11121, 0.0838507, 0.0541182, 0.021667, -0.013938, -0.0532556, -0.0970201, -0.146223, -0.202247, -0.26711, -0.343912, -0.437795, -0.558246, -0.725998, -1.00339, -1.97815, -1.10748, -0.778731, -0.594346, -0.465878, -0.367419, -0.287761, -0.221023, -0.163736, -0.113679, -0.0693453, -0.029666, 0.00614549, 0.0386843, 0.0684114, 0.0956911, 0.120816, 0.144025, 0.165516, 0.185452, 0.203973, 0.221196, 0.237222, 0.252138, 0.266019, 0.278931, 0.290931, 0.30207, 0.312392, 0.321936, 0.330736, 0.338823, 0.346225, 0.352965, 0.359065, 0.364542, 0.369414, 0.373695, 0.377397, 0.380531, 0.383106, 0.385129, 0.386606, 0.387542, 0.38794, 0.387801, 0.387127, 0.385915, 0.384165, 0.381872, 0.379031, 0.375636, 0.371679, 0.367151, 0.362041, 0.356334, 0.350017, 0.343073, 0.335481, 0.32722, 0.318264, 0.308586, 0.298154, 0.286932, 0.274878, 0.261947, 0.248086, 0.233236, 0.217326, 0.20028, 0.182005, 0.162395, 0.141327, 0.118652, 0.0941979, 0.0677536, 0.039064, 0.00781504, -0.0263867, -0.064042, -0.105802, -0.152535, -0.205434, -0.266206, -0.337407, -0.423132, -0.530559, -0.674114, -0.8905, -1.34167, -1.42542, -0.919143, -0.692262, -0.544555, -0.435091, -0.348288, -0.276527, -0.215506, -0.162558, -0.115913, -0.0743396, -0.0369432, -0.00305536, 0.0278369, 0.0561356, 0.0821619, 0.106176, 0.128391, 0.148985, 0.168107, 0.185883, 0.202421, 0.217814, 0.23214, 0.245471, 0.257866, 0.269379, 0.280056, 0.289939, 0.299065, 0.307464, 0.315167, 0.322198, 0.328579, 0.334331, 0.33947, 0.344012, 0.34797, 0.351355, 0.354177, 0.356443, 0.358162, 0.359336, 0.359971, 0.360069, 0.359629, 0.358653, 0.357138, 0.355082, 0.35248, 0.349325, 0.345611, 0.34133, 0.336469, 0.331018, 0.324961, 0.318283, 0.310965, 0.302985, 0.294321, 0.284945, 0.274826, 0.26393, 0.252219, 0.239648, 0.226166, 0.211718, 0.196238, 0.17965, 0.161869, 0.142795, 0.122309, 0.100275, 0.0765282, 0.0508741, 0.0230751, -0.00715901, -0.0401896, -0.0764733, -0.116599, -0.161345, -0.211768, -0.269353, -0.336286, -0.415976, -0.514175, -0.641791, -0.823796, -1.14355, -2.19964, -1.07381, -0.789911, -0.620236, -0.499091, -0.405021, -0.32829, -0.263646, -0.207933, -0.159105, -0.115759, -0.0768919, -0.0417611, -0.00980245, 0.0194233, 0.0462643, 0.0710013, 0.0938639, 0.115042, 0.134694, 0.152955, 0.169938, 0.185741, 0.200449, 0.214134, 0.226861, 0.238684, 0.249654, 0.259813, 0.269199, 0.277846, 0.285783, 0.293038, 0.299632, 0.305587, 0.310921, 0.315649, 0.319785, 0.323341, 0.326328, 0.328752, 0.330622, 0.331943, 0.332718, 0.33295, 0.33264, 0.331788, 0.330392, 0.32845, 0.325957, 0.322907, 0.319292, 0.315105, 0.310333, 0.304966, 0.298987, 0.292382, 0.28513, 0.277211, 0.2686, 0.25927, 0.249189, 0.238323, 0.226633, 0.214072, 0.20059, 0.186128, 0.17062, 0.153989, 0.136145, 0.116987, 0.0963928, 0.0742209, 0.0503025, 0.0244348, -0.00362795, -0.034188, -0.0676224, -0.104409, -0.145168, -0.190721, -0.242191, -0.301171, -0.370025, -0.452488, -0.554983, -0.690037, -0.887801, -1.26216, -1.69589, -1.02273, -0.770821, -0.612864, -0.497748, -0.407317, -0.332995, -0.270046, -0.215574, -0.167681, -0.125053, -0.0867459, -0.0520546, -0.0204419, 0.00851203, 0.0351415, 0.0597165, 0.0824586, 0.103551, 0.123149, 0.141381, 0.158358, 0.174177, 0.188919, 0.202655, 0.215448, 0.227353, 0.238417, 0.248684, 0.25819, 0.266969, 0.275049, 0.282458, 0.289219, 0.295351, 0.300872, 0.305799, 0.310146, 0.313924, 0.317144, 0.319814, 0.321942, 0.323534, 0.324594, 0.325126, 0.32513, 0.324608, 0.323559, 0.321981, 0.319871, 0.317224, 0.314034, 0.310295, 0.305996, 0.301128, 0.295678, 0.289633, 0.282976, 0.275689, 0.267752, 0.259141, 0.24983, 0.23979, 0.228986, 0.217381, 0.204933, 0.191592, 0.177304, 0.162006, 0.145626, 0.12808, 0.109273, 0.0890916, 0.0674054, 0.0440584, 0.0188647, -0.00839983, -0.0380089, -0.0703016, -0.105704, -0.144763, -0.188196, -0.236966, -0.292417, -0.356495, -0.432181, -0.524379, -0.642036, -0.804344, -1.0668, -1.8357, -1.24845, -0.895274, -0.703735, -0.571879, -0.471463, -0.390544, -0.322936, -0.265022, -0.214498, -0.169811, -0.129859, -0.0938376, -0.0611367, -0.0312859, -0.00391395, 0.0212772, 0.0445302, 0.0660452, 0.0859888, 0.104502, 0.121703, 0.137694, 0.152563, 0.166386, 0.179229, 0.191149, 0.202198, 0.212418, 0.221851, 0.230529, 0.238484, 0.245742, 0.252327, 0.258261, 0.26356, 0.268241, 0.272319, 0.275804, 0.278706, 0.281035, 0.282795, 0.283993, 0.284632, 0.284714, 0.284239, 0.283206, 0.281614, 0.279457, 0.276732, 0.27343, 0.269542, 0.26506, 0.259969, 0.254256, 0.247905, 0.240896, 0.233207, 0.224814, 0.215689, 0.205801, 0.195113, 0.183585, 0.171171, 0.157818, 0.143466, 0.128047, 0.11148, 0.0936745, 0.0745231, 0.0539005, 0.0316588, 0.00762158, -0.0184234, -0.0467345, -0.0776305, -0.111511, -0.148884, -0.190414, -0.236985, -0.289821, -0.350669, -0.422165, -0.508547, -0.617302, -0.76366, -0.987247, -1.47576, -1.44105, -0.975067, -0.755614, -0.610762, -0.502636, -0.416483, -0.344999, -0.284031, -0.230988, -0.184147, -0.142303, -0.104579, -0.0703197, -0.0390193, -0.0102822, 0.0162085, 0.0407096, 0.0634327, 0.0845534, 0.10422, 0.122557, 0.139672, 0.155656, 0.170591, 0.184545, 0.197579, 0.209747, 0.221095, 0.231665, 0.241494, 0.250616, 0.259058, 0.266847, 0.274007, 0.280557, 0.286516, 0.291901, 0.296725, 0.301002, 0.304742, 0.307956, 0.31065, 0.312833, 0.314509, 0.315684, 0.31636, 0.31654, 0.316224, 0.315414, 0.314108, 0.312303, 0.309998, 0.307186, 0.303863, 0.300022, 0.295655, 0.290752, 0.285303, 0.279294, 0.272713, 0.265543, 0.257766, 0.249362, 0.240308, 0.230578, 0.220144, 0.208974, 0.197032, 0.184277, 0.170663, 0.156137, 0.140642, 0.124108, 0.106459, 0.0876049, 0.0674422, 0.0458498, 0.0226849, -0.00222166, -0.0290728, -0.0581146, -0.0896493, -0.124054, -0.161805, -0.203522, -0.250024, -0.302432, -0.36233, -0.432074, -0.515377, -0.618619, -0.754219, -0.951971, -1.32345, -1.78416, -1.09696, -0.84438, -0.686837, -0.572468, -0.482934, -0.409596, -0.347687, -0.294299, -0.247525, -0.206048, -0.16892, -0.135436, -0.105059, -0.0773685, -0.0520307, -0.0287765, -0.00738546, 0.0123247, 0.0305065, 0.0472886, 0.0627801, 0.0770744, 0.0902517, 0.102381, 0.113523, 0.12373, 0.133046, 0.141511, 0.14916, 0.156022, 0.162123, 0.167485, 0.172127, 0.176064, 0.179311, 0.181876, 0.183769, 0.184994, 0.185555, 0.185454, 0.184688, 0.183254, 0.181148, 0.17836, 0.17488, 0.170695, 0.165788, 0.160142, 0.153733, 0.146535, 0.138518, 0.129647, 0.119883, 0.109178, 0.0974808, 0.0847293, 0.0708532, 0.0557705, 0.0393857, 0.0215871, 0.00224293, -0.0188034, -0.0417395, -0.0667924, -0.0942404, -0.124429, -0.157794, -0.194897, -0.236474, -0.283524, -0.337438, -0.400251, -0.475095, -0.567176, -0.686127, -0.853106, -1.13243, -2.18771, -1.21214, -0.886905, -0.702021, -0.572127, -0.471876, -0.390241, -0.321416, -0.261969, -0.209696, -0.163104, -0.121128, -0.0829869, -0.0480869, -0.0159684, 0.0137328, 0.0413094, 0.0670007, 0.0910048, 0.113487, 0.134587, 0.154425, 0.173103, 0.190709, 0.20732, 0.223004, 0.237821, 0.251823, 0.265056, 0.277563, 0.289381, 0.300542, 0.311077, 0.321013, 0.330375, 0.339185, 0.347463, 0.355227, 0.362494, 0.369279, 0.375596, 0.381458, 0.386876, 0.39186, 0.396419, 0.400564, 0.4043, 0.407636, 0.410577, 0.41313, 0.415298, 0.417087, 0.418501, 0.419543, 0.420215, 0.42052, 0.420459, 0.420035, 0.419247, 0.418097, 0.416584, 0.414708, 0.412467, 0.409861, 0.406887, 0.403543, 0.399826, 0.395733, 0.39126, 0.386403, 0.381156, 0.375515, 0.369472, 0.363022, 0.356156, 0.348866, 0.341144, 0.332979, 0.324361, 0.315278, 0.305717, 0.295664, 0.285103, 0.274019, 0.262392, 0.250202, 0.237428, 0.224045, 0.210027, 0.195344, 0.179965, 0.163853, 0.146968, 0.129266, 0.110697, 0.091206, 0.0707289, 0.0491944, 0.0265208, 0.00261465, -0.0226323, -0.0493459, -0.0776736, -0.10779, -0.139904, -0.174268, -0.211191, -0.251059, -0.29436, -0.341723, -0.393987, -0.452292, -0.518258, -0.594291, -0.684199, -0.794546, -0.938202, -1.14644, -1.54054, -1.90766, -1.28324, -1.04427, -0.896286, -0.790384, -0.708954, -0.643626, -0.589765, -0.544538, -0.506089, -0.473138, -0.44477, -0.420311, -0.399251, -0.3812, -0.365857, -0.352984, -0.342398, -0.333957, -0.327551, -0.323103, -0.320558, -0.319887, -0.321081, -0.324154, -0.329142, -0.336104, -0.345127, -0.356326, -0.369853, -0.385906, -0.404734, -0.426659, -0.452099, -0.481597, -0.515881, -0.555942, -0.603178, -0.659641, -0.728511, -0.815101, -0.92931, -1.0931, -1.37461, -2.65065, -1.40717, -1.0866, -0.899649, -0.766193, -0.661868, -0.575959, -0.502792, -0.438994, -0.382396, -0.331521, -0.285314, -0.242998, -0.203982, -0.167809, -0.134113, -0.102601, -0.0730326, -0.0452082, -0.0189607, 0.00585141, 0.0293492, 0.0516368, 0.0728044, 0.0929311, 0.112086, 0.13033, 0.147718, 0.164297, 0.180111, 0.195198, 0.209593, 0.223328, 0.236431, 0.248928, 0.260841, 0.272193, 0.283003, 0.293288, 0.303065, 0.312348, 0.321151, 0.329485, 0.337363, 0.344795, 0.35179, 0.358355, 0.3645, 0.37023, 0.375553, 0.380473, 0.384995, 0.389124, 0.392863, 0.396215, 0.399184, 0.40177, 0.403976, 0.405802, 0.407248, 0.408316, 0.409003, 0.409309, 0.409232, 0.408769, 0.407918, 0.406676, 0.405038, 0.403, 0.400555, 0.397699, 0.394423, 0.390721, 0.386583, 0.382, 0.376962, 0.371456, 0.365469, 0.358988, 0.351996, 0.344477, 0.33641, 0.327774, 0.318547, 0.308701, 0.298208, 0.287035, 0.275147, 0.262504, 0.249059, 0.234762, 0.219556, 0.203375, 0.186144, 0.167777, 0.148175, 0.127222, 0.104782, 0.0806968, 0.0547734, 0.0267814, -0.00356155, -0.0366052, -0.0727903, -0.112684, -0.157029, -0.206834, -0.263506, -0.329097, -0.406778, -0.501822, -0.62402, -0.794985, -1.08115, -2.24948, -1.1453, -0.828125, -0.647345, -0.520614, -0.423151, -0.34411, -0.277765, -0.220721, -0.1708, -0.126519, -0.086825, -0.0509417, -0.0182814, 0.0116119, 0.0390988, 0.0644695, 0.0879607, 0.109768, 0.130055, 0.14896, 0.166599, 0.183074, 0.198471, 0.212865, 0.226322, 0.2389, 0.250649, 0.261614, 0.271834, 0.281346, 0.290179, 0.298362, 0.30592, 0.312874, 0.319246, 0.325051, 0.330306, 0.335025, 0.33922, 0.3429, 0.346077, 0.348756, 0.350946, 0.352651, 0.353876, 0.354624, 0.354897, 0.354696, 0.354021, 0.352872, 0.351245, 0.349139, 0.346548, 0.343468, 0.339892, 0.335811, 0.331217, 0.3261, 0.320446, 0.314243, 0.307474, 0.300123, 0.292169, 0.283591, 0.274363, 0.264457, 0.253842, 0.242484, 0.230341, 0.217369, 0.203518, 0.188729, 0.172936, 0.156063, 0.138023, 0.118715, 0.0980206, 0.0757998, 0.0518879, 0.0260868, -0.00184304, -0.0321958, -0.0653376, -0.101732, -0.141976, -0.186863, -0.237468, -0.295311, -0.362632, -0.442938, -0.542184, -0.671761, -0.858149, -1.193, -1.97811, -1.0695, -0.796175, -0.62989, -0.510163, -0.416674, -0.340075, -0.275287, -0.219239, -0.169932, -0.125992, -0.086432, -0.0505224, -0.0177059, 0.0124521, 0.0402965, 0.0661064, 0.0901103, 0.112498, 0.133428, 0.153036, 0.171436, 0.188728, 0.204998, 0.220321, 0.234762, 0.24838, 0.261227, 0.273347, 0.284784, 0.295572, 0.305746, 0.315336, 0.324369, 0.332869, 0.34086, 0.348362, 0.355394, 0.361973, 0.368116, 0.373837, 0.379151, 0.384069, 0.388603, 0.392765, 0.396564, 0.40001, 0.403112, 0.405878, 0.408316, 0.410434, 0.412237, 0.413732, 0.414926, 0.415824, 0.416432, 0.416754, 0.416796, 0.416563, 0.416058, 0.415285, 0.41425, 0.412956, 0.411406, 0.409605, 0.407556, 0.405262, 0.402726, 0.399953, 0.396946, 0.393707, 0.39024, 0.386548, 0.382635, 0.378504, 0.374158, 0.369601, 0.364837, 0.359869, 0.354701, 0.349337, 0.343781, 0.338037, 0.332111, 0.326006, 0.319728, 0.313282, 0.306674, 0.29991, 0.292996, 0.285938, 0.278744, 0.271421, 0.263977, 0.256421, 0.248762, 0.241008, 0.233171, 0.22526, 0.217288, 0.209265, 0.201205, 0.19312, 0.185024, 0.176932, 0.168858, 0.160819, 0.152831, 0.144911, 0.137076, 0.129345, 0.121735, 0.114267, 0.106958, 0.0998283, 0.0928978, 0.0861858, 0.0797117, 0.0734947, 0.0675535, 0.0619064, 0.0565708, 0.0515634, 0.0468997, 0.0425942, 0.0386597, 0.035108, 0.0319488, 0.0291904, 0.026839, 0.0248989, 0.0233725, 0.0222603, 0.0215603, 0.0212689, 0.0213804, 0.021887, 0.0227793, 0.0240459, 0.0256738, 0.0276488, 0.0299549, 0.0325752, 0.0354918, 0.0386855, 0.0421368, 0.0458255, 0.049731, 0.0538322, 0.0581081, 0.0625376, 0.0670997, 0.0717735, 0.0765384, 0.0813743, 0.0862613, 0.0911799, 0.0961114, 0.101037, 0.10594, 0.110802, 0.115606, 0.120338, 0.12498, 0.129518, 0.133937, 0.138223, 0.142364, 0.146344, 0.150152, 0.153776, 0.157202, 0.160419, 0.163416, 0.166181, 0.168703, 0.17097, 0.172971, 0.174696, 0.176132, 0.177268, 0.178093, 0.178595, 0.178761, 0.17858, 0.178037, 0.17712, 0.175813, 0.174103, 0.171973, 0.169405, 0.166383, 0.162887, 0.158895, 0.154386, 0.149336, 0.143716, 0.137499, 0.130653, 0.123142, 0.114928, 0.105967, 0.096211, 0.0856059, 0.0740905, 0.0615956, 0.048042, 0.0333391, 0.0173819, 4.83355e-05, -0.0188048, -0.0393474, -0.0617827, -0.0863567, -0.113371, -0.143202, -0.176327, -0.21336, -0.255119, -0.302718, -0.357736, -0.422513, -0.500737, -0.598734, -0.728797, -0.920296, -1.28213, -1.76978, -1.05823, -0.798315, -0.634696, -0.514584, -0.419419, -0.34048, -0.272964, -0.213943, -0.161497, -0.114302, -0.0714031, -0.0320914, 0.00417506, 0.0378198, 0.0691799, 0.0985279, 0.126087, 0.152044, 0.176554, 0.199749, 0.221742, 0.242631, 0.262499, 0.281419, 0.299458, 0.31667, 0.333108, 0.348815, 0.363831, 0.378192, 0.391932, 0.405077, 0.417656, 0.429691, 0.441204, 0.452215, 0.462742, 0.4728, 0.482405, 0.491571, 0.500309, 0.508631, 0.516547, 0.524067, 0.531199, 0.537951, 0.544331, 0.550344, 0.555996, 0.561293, 0.566239, 0.570839, 0.575095, 0.579011, 0.582589, 0.585832, 0.588742, 0.591319, 0.593564, 0.595478, 0.597061, 0.598313, 0.599231, 0.599816, 0.600064, 0.599975, 0.599544, 0.59877, 0.597648, 0.596174, 0.594343, 0.59215, 0.589589, 0.586652, 0.583333, 0.579624, 0.575515, 0.570996, 0.566057, 0.560686, 0.554869, 0.548592, 0.54184, 0.534595, 0.526838, 0.518547, 0.509701, 0.500274, 0.490236, 0.479557, 0.468202, 0.456131, 0.443301, 0.429663, 0.415162, 0.399733, 0.383307, 0.3658, 0.347118, 0.327151, 0.30577, 0.282824, 0.258134, 0.231482, 0.202604, 0.171177, 0.136791, 0.0989286, 0.0569108, 0.00983063, -0.0435648, -0.105076, -0.177426, -0.265021, -0.375707, -0.525663, -0.758093, -1.2967, -1.1311, -0.701844, -0.489984, -0.34813, -0.2414, -0.155878, -0.0845868, -0.023526, 0.0298121, 0.0771037, 0.119525, 0.157932, 0.19297, 0.225133, 0.254812, 0.282319, 0.307907, 0.331786, 0.354129, 0.375083, 0.394773, 0.413306, 0.430773, 0.447255, 0.462821, 0.477533, 0.491444, 0.504603, 0.517052, 0.52883, 0.53997, 0.550504, 0.560458, 0.569858, 0.578726, 0.587082, 0.594945, 0.602333, 0.609259, 0.615738, 0.621782, 0.627403, 0.632611, 0.637416, 0.641826, 0.645849, 0.649491, 0.652758, 0.655657, 0.658191, 0.660365, 0.662182, 0.663646, 0.664759, 0.665522, 0.665937, 0.666005, 0.665726, 0.6651, 0.664126, 0.662804, 0.66113, 0.659103, 0.65672, 0.653977, 0.650871, 0.647397, 0.64355, 0.639323, 0.63471, 0.629704, 0.624295, 0.618476, 0.612235, 0.605561, 0.598443, 0.590866, 0.582816, 0.574276, 0.565227, 0.555651, 0.545524, 0.534822, 0.523518, 0.511581, 0.49898, 0.485675, 0.471625, 0.456783, 0.441097, 0.424505, 0.40694, 0.388323, 0.368565, 0.347561, 0.325189, 0.301308, 0.275747, 0.248304, 0.218733, 0.186732, 0.151926, 0.113838, 0.0718509, 0.0251485, -0.0273851, -0.0873295, -0.157028, -0.240174, -0.343106, -0.478142, -0.674745, -1.04239, -1.5278, -0.825315, -0.570641, -0.411967, -0.296703, -0.206338, -0.132166, -0.0693938, -0.0150963, 0.0326427, 0.0751468, 0.113369, 0.148017, 0.179634, 0.208641, 0.235375, 0.260109, 0.283066, 0.30443, 0.324358, 0.342982, 0.360413, 0.376748, 0.392072, 0.406458, 0.41997, 0.432663, 0.444589, 0.455791, 0.46631, 0.47618, 0.485434, 0.494099, 0.502203, 0.509767, 0.516814, 0.523362, 0.529429, 0.53503, 0.54018, 0.544892, 0.549177, 0.553047, 0.556511, 0.559577, 0.562255, 0.56455, 0.56647, 0.56802, 0.569204, 0.570028, 0.570495, 0.570609, 0.570371, 0.569784, 0.56885, 0.56757, 0.565944, 0.563971, 0.561653, 0.558987, 0.555972, 0.552607, 0.548888, 0.544812, 0.540375, 0.535574, 0.530403, 0.524857, 0.518929, 0.512612, 0.505899, 0.498779, 0.491245, 0.483284, 0.474886, 0.466037, 0.456723, 0.446928, 0.436634, 0.425823, 0.414474, 0.402563, 0.390063, 0.376948, 0.363184, 0.348736, 0.333564, 0.317624, 0.300865, 0.283231, 0.264657, 0.245069, 0.224384, 0.202503, 0.179313, 0.15468, 0.128449, 0.100432, 0.0704027, 0.0380859, 0.00314054, -0.0348623, -0.0764726, -0.122411, -0.17365, -0.231541, -0.298047, -0.376179, -0.470895, -0.591268, -0.756846, -1.02467, -1.83432, -1.19115, -0.845934, -0.657848, -0.528442, -0.430058, -0.350934, -0.284961, -0.228555, -0.179433, -0.136051, -0.0973153, -0.0624235, -0.0307687, -0.00188133, 0.0246097, 0.0490027, 0.0715408, 0.0924253, 0.111824, 0.129879, 0.146711, 0.162425, 0.177109, 0.190842, 0.203692, 0.215721, 0.226981, 0.237519, 0.247379, 0.256599, 0.265211, 0.273248, 0.280737, 0.287704, 0.294172, 0.300161, 0.305692, 0.310781, 0.315445, 0.319698, 0.323555, 0.327028, 0.330129, 0.332868, 0.335256, 0.337301, 0.339012, 0.340397, 0.341464, 0.342218, 0.342667, 0.342816, 0.34267, 0.342234, 0.341513, 0.34051, 0.33923, 0.337676, 0.335852, 0.333759, 0.3314, 0.328778, 0.325894, 0.322751, 0.319348, 0.315689, 0.311772, 0.307599, 0.30317, 0.298486, 0.293545, 0.288347, 0.282891, 0.277176, 0.271201, 0.264964, 0.258462, 0.251693, 0.244654, 0.237342, 0.229754, 0.221884, 0.213729, 0.205284, 0.196542, 0.187497, 0.178143, 0.168473, 0.158476, 0.148146, 0.13747, 0.126439, 0.115041, 0.103262, 0.0910865, 0.0784998, 0.0654835, 0.0520181, 0.038082, 0.0236509, 0.00869845, -0.00680521, -0.0228932, -0.0396024, -0.0569746, -0.0750566, -0.0939014, -0.113569, -0.134128, -0.155658, -0.178249, -0.202007, -0.227056, -0.25354, -0.281633, -0.311544, -0.343525, -0.377887, -0.41502, -0.45542, -0.49973, -0.54881, -0.603838, -0.666495, -0.739299, -0.826272, -0.934433, -1.07781, -1.2917, -1.72663, -1.87403, -1.34384, -1.11317, -0.96406, -0.853844, -0.766479, -0.69417, -0.632534, -0.578861, -0.531356, -0.488771, -0.4502, -0.414966, -0.382552, -0.352551, -0.324637, -0.298547, -0.274064, -0.25101, -0.229231, -0.208601, -0.189009, -0.17036, -0.152572, -0.135575, -0.119304, -0.103706, -0.0887304, -0.0743345, -0.0604793, -0.0471303, -0.0342563, -0.0218295, -0.00982458, 0.00178105, 0.013008, 0.0238748, 0.0343985, 0.0445943, 0.0544761, 0.0640566, 0.0733472, 0.0823586, 0.0911, 0.0995802, 0.107807, 0.115788, 0.123528, 0.131035, 0.138313, 0.145366, 0.1522, 0.158818, 0.165223, 0.171417, 0.177405, 0.183187, 0.188766, 0.194142, 0.199319, 0.204295, 0.209072, 0.213651, 0.218031, 0.222213, 0.226195, 0.229979, 0.233562, 0.236943, 0.240122, 0.243098, 0.245867, 0.24843, 0.250783, 0.252924, 0.254851, 0.256561, 0.258051, 0.259318, 0.260358, 0.261168, 0.261744, 0.262082, 0.262177, 0.262024, 0.261619, 0.260955, 0.260027, 0.258829, 0.257354, 0.255596, 0.253545, 0.251196, 0.248539, 0.245564, 0.242262, 0.238623, 0.234635, 0.230286, 0.225563, 0.220452, 0.214938, 0.209003, 0.202631, 0.195802, 0.188495, 0.180686, 0.17235, 0.16346, 0.153986, 0.143892, 0.133142, 0.121695, 0.109504, 0.096516, 0.0826734, 0.0679094, 0.0521484, 0.0353036, 0.0172753, -0.00205254, -0.0228156, -0.0451741, -0.0693188, -0.09548, -0.123938, -0.155042, -0.189228, -0.227058, -0.269269, -0.316857, -0.37121, -0.434352, -0.509395, -0.601506, -0.720219, -0.886411, -1.16307, -2.16118, -1.25612, -0.92702, -0.740873, -0.610275, -0.509508, -0.427423, -0.358168, -0.298286, -0.245562, -0.198495, -0.156018, -0.117346, -0.0818858, -0.0491762, -0.0188537, 0.00937428, 0.0357464, 0.06046, 0.0836798, 0.105545, 0.126174, 0.145667, 0.164114, 0.181589, 0.198159, 0.213884, 0.228814, 0.242994, 0.256466, 0.269266, 0.281426, 0.292975, 0.303938, 0.31434, 0.324201, 0.333541, 0.342376, 0.350721, 0.358592, 0.365999, 0.372955, 0.379468, 0.38555, 0.391206, 0.396444, 0.40127, 0.40569, 0.409708, 0.413327, 0.41655, 0.419381, 0.421819, 0.423866, 0.425522, 0.426787, 0.427659, 0.428137, 0.428217, 0.427897, 0.427173, 0.426039, 0.424489, 0.422518, 0.420118, 0.417281, 0.413996, 0.410254, 0.406043, 0.401349, 0.396159, 0.390456, 0.384222, 0.377437, 0.37008, 0.362127, 0.353549, 0.344318, 0.334399, 0.323755, 0.312344, 0.300118, 0.287024, 0.273001, 0.257979, 0.241879, 0.22461, 0.206065, 0.18612, 0.16463, 0.141421, 0.116284, 0.088968, 0.0591614, 0.0264762, -0.00958095, -0.0496504, -0.0945842, -0.145551, -0.204217, -0.273069, -0.356072, -0.460126, -0.598954, -0.806764, -1.22579, -1.42175, -0.866959, -0.630065, -0.477024, -0.3637, -0.273672, -0.199002, -0.135243, -0.0796498, -0.0304104, 0.0137362, 0.0537021, 0.0901684, 0.123657, 0.154577, 0.183254, 0.209953, 0.234891, 0.258249, 0.280178, 0.300807, 0.320245, 0.338588, 0.355917, 0.372305, 0.387813, 0.402497, 0.416406, 0.429584, 0.442068, 0.453895, 0.465094, 0.475694, 0.485719, 0.495193, 0.504135, 0.512565, 0.520499, 0.527951, 0.534936, 0.541467, 0.547553, 0.553205, 0.558433, 0.563243, 0.567644, 0.571642, 0.575241, 0.578447, 0.581264, 0.583695, 0.585743, 0.58741, 0.588698, 0.589606, 0.590136, 0.590287, 0.590058, 0.589447, 0.588452, 0.587071, 0.585299, 0.583132, 0.580565, 0.577593, 0.574209, 0.570406, 0.566175, 0.561507, 0.556392, 0.550819, 0.544774, 0.538245, 0.531214, 0.523667, 0.515582, 0.506941, 0.497719, 0.487892, 0.477431, 0.466303, 0.454475, 0.441907, 0.428555, 0.414368, 0.399291, 0.383261, 0.366203, 0.348036, 0.328662, 0.30797, 0.285829, 0.262084, 0.236553, 0.209012, 0.179192, 0.14676, 0.111297, 0.0722687, 0.028974, -0.0195264, -0.0745358, -0.137937, -0.212594, -0.303188, -0.418166, -0.575328, -0.824319, -1.47008, -1.08644, -0.704412, -0.504902, -0.369229, -0.266506, -0.183988, -0.115162, -0.0562525, -0.00487022, 0.0405901, 0.08126, 0.117967, 0.151334, 0.181841, 0.209869, 0.23572, 0.25964, 0.281834, 0.302471, 0.321694, 0.339623, 0.356361, 0.371999, 0.386612, 0.400268, 0.413026, 0.424936, 0.436045, 0.446391, 0.456011, 0.464935, 0.473192, 0.480806, 0.487798, 0.494187, 0.499991, 0.505225, 0.5099, 0.514029, 0.51762, 0.520682, 0.523221, 0.525242, 0.526748, 0.527742, 0.528226, 0.528198, 0.527657, 0.526601, 0.525025, 0.522924, 0.52029, 0.517116, 0.513391, 0.509104, 0.504241, 0.498787, 0.492723, 0.48603, 0.478685, 0.470662, 0.461933, 0.452464, 0.442219, 0.431155, 0.419226, 0.406376, 0.392545, 0.377662, 0.361646, 0.344401, 0.325818, 0.305769, 0.284101, 0.260632, 0.235143, 0.207368, 0.176975, 0.143549, 0.106561, 0.0653149, 0.0188802, -0.0340352, -0.0952952, -0.167734, -0.255973, -0.368329, -0.522252, -0.76596, -1.38421, -1.04663, -0.654087, -0.450444, -0.311832, -0.206599, -0.121767, -0.050733, 0.0103262, 0.0638236, 0.11138, 0.154137, 0.192929, 0.228385, 0.260989, 0.291124, 0.319096, 0.345154, 0.369505, 0.39232, 0.413744, 0.4339, 0.452893, 0.470815, 0.487745, 0.503752, 0.518896, 0.533232, 0.546808, 0.559664, 0.571841, 0.583371, 0.594284, 0.60461, 0.614371, 0.623591, 0.63229, 0.640487, 0.648198, 0.655439, 0.662223, 0.668563, 0.67447, 0.679955, 0.685027, 0.689694, 0.693965, 0.697846, 0.701343, 0.704462, 0.707207, 0.709583, 0.711593, 0.71324, 0.714527, 0.715455, 0.716026, 0.71624, 0.716099, 0.715601, 0.714747, 0.713534, 0.711962, 0.710027, 0.707727, 0.70506, 0.70202, 0.698603, 0.694803, 0.690616, 0.686035, 0.681051, 0.675658, 0.669845, 0.663602, 0.65692, 0.649785, 0.642184, 0.634103, 0.625526, 0.616433, 0.606807, 0.596626, 0.585864, 0.574497, 0.562495, 0.549825, 0.536452, 0.522334, 0.507427, 0.491679, 0.475032, 0.457422, 0.438773, 0.419, 0.398003, 0.375668, 0.35186, 0.326418, 0.299154, 0.269838, 0.238191, 0.203865, 0.166425, 0.12531, 0.0797858, 0.0288607, -0.0288496, -0.09536, -0.17377, -0.269217, -0.391173, -0.560332, -0.838848, -1.80799, -0.947843, -0.619964, -0.436827, -0.309676, -0.212547, -0.134214, -0.068791, -0.0128052, 0.035965, 0.0790267, 0.117449, 0.152019, 0.183331, 0.211844, 0.237924, 0.261861, 0.283895, 0.304221, 0.323003, 0.340379, 0.356466, 0.371365, 0.38516, 0.397927, 0.40973, 0.420625, 0.430663, 0.439885, 0.448331, 0.456033, 0.463021, 0.469321, 0.474956, 0.479944, 0.484305, 0.488051, 0.491196, 0.493751, 0.495724, 0.497122, 0.49795, 0.498211, 0.497908, 0.497041, 0.495608, 0.493606, 0.491032, 0.487878, 0.484136, 0.479797, 0.474848, 0.469276, 0.463064, 0.456193, 0.448643, 0.440387, 0.431398, 0.421645, 0.41109, 0.399693, 0.387407, 0.374178, 0.359944, 0.344636, 0.328172, 0.310457, 0.291383, 0.270819, 0.248613, 0.224582, 0.198505, 0.170115, 0.139078, 0.104975, 0.0672713, 0.0252655, -0.0219849, -0.0757881, -0.138035, -0.211609, -0.301223, -0.4154, -0.572154, -0.822007, -1.48311, -1.06858, -0.690328, -0.490967, -0.354749, -0.251236, -0.167813, -0.0980209, -0.0381084, 0.0143, 0.0608024, 0.102527, 0.140297, 0.174737, 0.206325, 0.235441, 0.262388, 0.287413, 0.310722, 0.332484, 0.352842, 0.371919, 0.389819, 0.406632, 0.422436, 0.437301, 0.451286, 0.464443, 0.476821, 0.488459, 0.499396, 0.509665, 0.519295, 0.528313, 0.536743, 0.544606, 0.551921, 0.558706, 0.564977, 0.570748, 0.576031, 0.580837, 0.585177, 0.589059, 0.592492, 0.595482, 0.598035, 0.600155, 0.601848, 0.603116, 0.603962, 0.604387, 0.604393, 0.603979, 0.603146, 0.601891, 0.600212, 0.598107, 0.595572, 0.592602, 0.589191, 0.585334 +}; #endif /* MULTIPATH_V3_M12_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v3_M6.h b/src/lte/model/JakesTraces/multipath_v3_M6.h index 4f38c760b..72294e142 100644 --- a/src/lte/model/JakesTraces/multipath_v3_M6.h +++ b/src/lte/model/JakesTraces/multipath_v3_M6.h @@ -24,8 +24,8 @@ #define MULTIPATH_V3_M6_H_ static double multipath_M6_v_3[3000] = { - 0.828114, 0.827452, 0.826346, 0.824794, 0.822794, 0.820341, 0.81743, 0.814055, 0.810208, 0.805881, 0.801064, 0.795746, 0.789916, 0.783557, 0.776656, 0.769194, 0.761152, 0.752507, 0.743236, 0.733309, 0.722698, 0.711367, 0.699277, 0.686385, 0.672642, 0.657991, 0.642368, 0.625702, 0.607908, 0.588889, 0.568532, 0.546706, 0.523254, 0.497988, 0.470685, 0.441069, 0.4088, 0.37345, 0.33447, 0.291141, 0.242492, 0.187175, 0.123229, 0.0476552, -0.0444923, -0.162252, -0.325075, -0.58958, -1.38595, -0.756406, -0.407234, -0.216391, -0.084502, 0.0162451, 0.0976609, 0.165875, 0.22448, 0.275764, 0.321274, 0.362106, 0.399062, 0.432751, 0.463642, 0.492106, 0.518442, 0.542892, 0.565657, 0.586905, 0.606777, 0.625394, 0.642858, 0.659259, 0.674675, 0.689173, 0.702813, 0.715647, 0.727722, 0.739079, 0.749755, 0.759784, 0.769195, 0.778015, 0.786268, 0.793975, 0.801157, 0.807831, 0.814014, 0.819719, 0.82496, 0.829748, 0.834096, 0.838011, 0.841504, 0.844581, 0.84725, 0.849516, 0.851385, 0.852861, 0.853949, 0.854652, 0.854971, 0.854909, 0.854468, 0.853648, 0.852449, 0.850871, 0.848913, 0.846572, 0.843847, 0.840735, 0.837233, 0.833335, 0.829037, 0.824334, 0.819218, 0.813683, 0.807721, 0.801322, 0.794476, 0.787172, 0.779398, 0.77114, 0.762382, 0.753109, 0.743301, 0.732939, 0.721999, 0.710458, 0.698286, 0.685455, 0.671928, 0.657669, 0.642634, 0.626776, 0.610039, 0.592363, 0.573677, 0.553901, 0.532942, 0.510694, 0.487031, 0.461806, 0.434845, 0.405937, 0.374828, 0.341205, 0.304677, 0.264745, 0.220765, 0.171875, 0.116896, 0.0541437, -0.0189018, -0.106263, -0.214962, -0.359032, -0.573763, -1.00972, -1.15818, -0.629333, -0.400143, -0.252673, -0.144257, -0.0588585, 0.0113165, 0.0706481, 0.121845, 0.1667, 0.20646, 0.242027, 0.274077, 0.303125, 0.329578, 0.353757, 0.375924, 0.396294, 0.415044, 0.432323, 0.448259, 0.462957, 0.476511, 0.489, 0.500494, 0.511052, 0.520726, 0.529564, 0.537605, 0.544886, 0.551437, 0.557286, 0.562458, 0.566973, 0.57085, 0.574106, 0.576754, 0.578806, 0.580272, 0.58116, 0.581476, 0.581225, 0.58041, 0.579033, 0.577093, 0.574589, 0.571518, 0.567875, 0.563654, 0.558846, 0.553442, 0.54743, 0.540796, 0.533525, 0.525597, 0.516991, 0.507684, 0.497649, 0.486853, 0.475263, 0.462837, 0.449531, 0.435294, 0.420065, 0.403777, 0.386352, 0.367701, 0.347717, 0.326278, 0.30324, 0.278429, 0.251637, 0.222613, 0.191046, 0.156547, 0.118622, 0.0766289, 0.0297127, -0.0233003, -0.0840831, -0.155138, -0.240457, -0.346997, -0.488627, -0.700067, -1.12745, -1.30093, -0.759226, -0.526486, -0.376599, -0.266138, -0.178868, -0.10692, -0.0458798, 0.00698119, 0.053466, 0.0948289, 0.131978, 0.165591, 0.196187, 0.224174, 0.249876, 0.273557, 0.295431, 0.315678, 0.334449, 0.351871, 0.368052, 0.383086, 0.397054, 0.410025, 0.422061, 0.433215, 0.443534, 0.453061, 0.461832, 0.469879, 0.477232, 0.483915, 0.489952, 0.495362, 0.500163, 0.504371, 0.507998, 0.511057, 0.513557, 0.515506, 0.516912, 0.517781, 0.518115, 0.517917, 0.517189, 0.515932, 0.514143, 0.51182, 0.508959, 0.505556, 0.501602, 0.497091, 0.492012, 0.486353, 0.480102, 0.473243, 0.465759, 0.45763, 0.448834, 0.439345, 0.429135, 0.418172, 0.406419, 0.393834, 0.380373, 0.36598, 0.350597, 0.334153, 0.316569, 0.297752, 0.277596, 0.255975, 0.23274, 0.207716, 0.18069, 0.151402, 0.119536, 0.0846913, 0.0463597, 0.00387894, -0.0436356, -0.0974027, -0.159168, -0.231559, -0.318801, -0.428352, -0.575364, -0.799178, -1.28484, -1.26207, -0.793569, -0.574372, -0.430188, -0.322868, -0.237586, -0.167009, -0.106971, -0.0548761, -0.00899536, 0.0318782, 0.0686219, 0.101893, 0.132197, 0.159929, 0.185406, 0.208886, 0.23058, 0.250662, 0.269281, 0.286561, 0.302609, 0.317516, 0.331362, 0.344216, 0.356137, 0.367179, 0.377387, 0.386803, 0.395462, 0.403397, 0.410636, 0.417203, 0.423121, 0.428409, 0.433085, 0.437162, 0.440654, 0.443572, 0.445926, 0.447723, 0.448969, 0.44967, 0.449828, 0.449445, 0.448523, 0.44706, 0.445055, 0.442503, 0.439401, 0.435741, 0.431516, 0.426717, 0.421332, 0.415348, 0.40875, 0.401522, 0.393643, 0.385091, 0.375842, 0.365867, 0.355134, 0.343607, 0.331245, 0.318002, 0.303824, 0.288651, 0.272415, 0.255036, 0.236421, 0.216465, 0.195042, 0.172005, 0.147177, 0.120347, 0.0912574, 0.0595912, 0.024951, -0.0131693, -0.0554285, -0.102706, -0.156213, -0.217682, -0.28972, -0.376509, -0.485418, -0.631369, -0.852852, -1.3272, -1.33764, -0.858059, -0.636569, -0.491357, -0.383436, -0.297749, -0.226877, -0.16661, -0.114332, -0.0683013, -0.0273033, 0.00954443, 0.0429023, 0.0732777, 0.101068, 0.126592, 0.150107, 0.171824, 0.19192, 0.210541, 0.227813, 0.243843, 0.258722, 0.272528, 0.285332, 0.297192, 0.30816, 0.318284, 0.327603, 0.336152, 0.343964, 0.351065, 0.35748, 0.363231, 0.368335, 0.37281, 0.376669, 0.379923, 0.382583, 0.384658, 0.386153, 0.387073, 0.387421, 0.387199, 0.386407, 0.385044, 0.383106, 0.380589, 0.377486, 0.37379, 0.36949, 0.364575, 0.35903, 0.352841, 0.345987, 0.338449, 0.330201, 0.321216, 0.311464, 0.300907, 0.289507, 0.277216, 0.263983, 0.249748, 0.234441, 0.217984, 0.200285, 0.181237, 0.160715, 0.13857, 0.114626, 0.0886692, 0.0604418, 0.0296236, -0.00418591, -0.0414979, -0.0829785, -0.129518, -0.182344, -0.243219, -0.314795, -0.401351, -0.510454, -0.657548, -0.883055, -1.38223, -1.31729, -0.860435, -0.642767, -0.498597, -0.390778, -0.304757, -0.233309, -0.172316, -0.119207, -0.0722697, -0.0303054, 0.00755772, 0.0419735, 0.0734447, 0.102366, 0.129054, 0.153765, 0.17671, 0.198065, 0.217977, 0.236572, 0.253957, 0.270225, 0.285456, 0.29972, 0.313078, 0.325585, 0.337287, 0.348227, 0.358442, 0.367967, 0.376832, 0.385062, 0.392683, 0.399716, 0.40618, 0.412093, 0.41747, 0.422326, 0.426673, 0.430522, 0.433883, 0.436765, 0.439176, 0.441121, 0.442607, 0.443638, 0.444219, 0.444351, 0.444038, 0.44328, 0.442078, 0.440432, 0.43834, 0.435801, 0.432813, 0.42937, 0.42547, 0.421107, 0.416274, 0.410964, 0.40517, 0.398881, 0.392088, 0.384778, 0.376939, 0.368555, 0.359611, 0.350088, 0.339966, 0.329223, 0.317834, 0.305772, 0.293006, 0.279501, 0.265219, 0.250118, 0.234149, 0.217256, 0.19938, 0.180448, 0.16038, 0.139083, 0.11645, 0.0923539, 0.0666474, 0.0391547, 0.00966503, -0.0220775, -0.0563872, -0.093657, -0.134386, -0.179222, -0.229028, -0.284989, -0.348791, -0.422962, -0.511536, -0.62156, -0.767119, -0.983701, -1.42338, -1.56456, -1.04084, -0.813893, -0.668386, -0.5619, -0.478466, -0.410318, -0.353092, -0.304089, -0.261523, -0.224155, -0.191087, -0.161653, -0.13534, -0.111751, -0.0905707, -0.0715446, -0.0544664, -0.0391667, -0.0255057, -0.0133671, -0.00265431, 0.00671316, 0.014802, 0.0216673, 0.0273536, 0.0318966, 0.0353237, 0.0376549, 0.0389029, 0.0390738, 0.0381669, 0.036175, 0.0330839, 0.0288723, 0.0235113, 0.0169636, 0.00918257, 0.000110952, -0.0103205, -0.0221954, -0.035614, -0.0506971, -0.0675902, -0.0864699, -0.107551, -0.131101, -0.157449, -0.187015, -0.22034, -0.258133, -0.301353, -0.351337, -0.410027, -0.480399, -0.56735, -0.679822, -0.837003, -1.09438, -1.8581, -1.26613, -0.908002, -0.711572, -0.574867, -0.469637, -0.383934, -0.31157, -0.248924, -0.193691, -0.144311, -0.0996829, -0.0589965, -0.0216404, 0.012859, 0.0448758, 0.074711, 0.10261, 0.128775, 0.153377, 0.176559, 0.198442, 0.219131, 0.238718, 0.257281, 0.27489, 0.291604, 0.307478, 0.32256, 0.336893, 0.350514, 0.363458, 0.375755, 0.387434, 0.398519, 0.409033, 0.418997, 0.428429, 0.437347, 0.445766, 0.453699, 0.461161, 0.468161, 0.474712, 0.480822, 0.4865, 0.491753, 0.496589, 0.501014, 0.505033, 0.50865, 0.511871, 0.514697, 0.517133, 0.51918, 0.52084, 0.522114, 0.523002, 0.523504, 0.52362, 0.523349, 0.522687, 0.521634, 0.520186, 0.518339, 0.516088, 0.51343, 0.510357, 0.506863, 0.502941, 0.498582, 0.493777, 0.488516, 0.482787, 0.476577, 0.469872, 0.462657, 0.454915, 0.446626, 0.43777, 0.428324, 0.418261, 0.407552, 0.396167, 0.38407, 0.37122, 0.357574, 0.34308, 0.327682, 0.311315, 0.293906, 0.27537, 0.255608, 0.234507, 0.211935, 0.187732, 0.161712, 0.133648, 0.103263, 0.0702147, 0.0340734, -0.0057133, -0.0498694, -0.0993704, -0.155575, -0.220458, -0.297045, -0.39033, -0.509465, -0.674216, -0.942585, -1.77673, -1.09472, -0.751675, -0.563212, -0.43291, -0.333458, -0.253203, -0.186081, -0.128532, -0.0782855, -0.0338051, 0.00599701, 0.0419195, 0.0745657, 0.104403, 0.1318, 0.157052, 0.180402, 0.202048, 0.222157, 0.240868, 0.258301, 0.274557, 0.289724, 0.303879, 0.317087, 0.329408, 0.340891, 0.351582, 0.361522, 0.370744, 0.379282, 0.387162, 0.394409, 0.401046, 0.407092, 0.412564, 0.417479, 0.421849, 0.425686, 0.429001, 0.431802, 0.434098, 0.435894, 0.437195, 0.438004, 0.438325, 0.438159, 0.437506, 0.436366, 0.434735, 0.432612, 0.429992, 0.42687, 0.423238, 0.419089, 0.414413, 0.409199, 0.403435, 0.397105, 0.390194, 0.382682, 0.37455, 0.365773, 0.356326, 0.346178, 0.335295, 0.323641, 0.311172, 0.297841, 0.283591, 0.268361, 0.252079, 0.234661, 0.216013, 0.196024, 0.174561, 0.151471, 0.126569, 0.0996331, 0.0703902, 0.0385044, 0.00355265, -0.0350073, -0.0778858, -0.126038, -0.180794, -0.244077, -0.318828, -0.409876, -0.525996, -0.685905, -0.943064, -1.66463, -1.14942, -0.786471, -0.591572, -0.457648, -0.355619, -0.273283, -0.204348, -0.145144, -0.0933391, -0.0473603, -0.00609603, 0.0312683, 0.0653477, 0.0966179, 0.125454, 0.152158, 0.176976, 0.20011, 0.221731, 0.241981, 0.260983, 0.278841, 0.295645, 0.311475, 0.3264, 0.34048, 0.353769, 0.366315, 0.378161, 0.389345, 0.399901, 0.40986, 0.419251, 0.428098, 0.436426, 0.444255, 0.451604, 0.458492, 0.464934, 0.470945, 0.47654, 0.48173, 0.486528, 0.490943, 0.494987, 0.498669, 0.501996, 0.504977, 0.507618, 0.509928, 0.511912, 0.513576, 0.514925, 0.515964, 0.516698, 0.51713, 0.517266, 0.517108, 0.51666, 0.515925, 0.514905, 0.513603, 0.512021, 0.510161, 0.508025, 0.505615, 0.502931, 0.499975, 0.496748, 0.49325, 0.489483, 0.485446, 0.48114, 0.476564, 0.471719, 0.466604, 0.461219, 0.455563, 0.449636, 0.443435, 0.436961, 0.430211, 0.423185, 0.415881, 0.408296, 0.400429, 0.392277, 0.383838, 0.37511, 0.366089, 0.356773, 0.347159, 0.337243, 0.32702, 0.316489, 0.305643, 0.29448, 0.282994, 0.27118, 0.259033, 0.246547, 0.233717, 0.220537, 0.206999, 0.193096, 0.178822, 0.164168, 0.149126, 0.133687, 0.117841, 0.101578, 0.0848879, 0.0677587, 0.0501781, 0.0321331, 0.0136094, -0.00540808, -0.0249356, -0.0449908, -0.0655927, -0.0867618, -0.10852, -0.130893, -0.153906, -0.177589, -0.201973, -0.227094, -0.25299, -0.279707, -0.307291, -0.335798, -0.365289, -0.395835, -0.427515, -0.460421, -0.49466, -0.530358, -0.56766, -0.606743, -0.647817, -0.691138, -0.737026, -0.785879, -0.838207, -0.89468, -0.956193, -1.02399, -1.09986, -1.18652, -1.28837, -1.41327, -1.57749, -1.82455, -2.38215, -2.21708, -1.80413, -1.60583, -1.47681, -1.38244, -1.30882, -1.24898, -1.19889, -1.15601, -1.11863, -1.08552, -1.05579, -1.02875, -1.00387, -0.980711, -0.958931, -0.938235, -0.918384, -0.899172, -0.88043, -0.862011, -0.843795, -0.825679, -0.807581, -0.789431, -0.771176, -0.752774, -0.734197, -0.715424, -0.696444, -0.677254, -0.657859, -0.638267, -0.618494, -0.598557, -0.578476, -0.558277, -0.537982, -0.517619, -0.497214, -0.476794, -0.456383, -0.436008, -0.415693, -0.395461, -0.375336, -0.355336, -0.335482, -0.315793, -0.296284, -0.276971, -0.257868, -0.238987, -0.220341, -0.201939, -0.18379, -0.165903, -0.148285, -0.130941, -0.113879, -0.0971018, -0.0806142, -0.0644195, -0.0485207, -0.0329201, -0.0176197, -0.00262106, 0.0120747, 0.0264666, 0.0405541, 0.0543369, 0.0678148, 0.0809879, 0.0938563, 0.10642, 0.118681, 0.130638, 0.142292, 0.153643, 0.164694, 0.175443, 0.185892, 0.196041, 0.205892, 0.215444, 0.224697, 0.233654, 0.242313, 0.250675, 0.25874, 0.266509, 0.273981, 0.281157, 0.288035, 0.294616, 0.300899, 0.306883, 0.312568, 0.317953, 0.323035, 0.327815, 0.33229, 0.336458, 0.340318, 0.343867, 0.347103, 0.350023, 0.352624, 0.354903, 0.356855, 0.358477, 0.359764, 0.360712, 0.361316, 0.361569, 0.361466, 0.361, 0.360164, 0.358949, 0.357348, 0.355351, 0.352949, 0.350129, 0.346881, 0.343192, 0.339047, 0.334431, 0.329328, 0.32372, 0.317585, 0.310903, 0.30365, 0.295798, 0.287318, 0.278178, 0.268341, 0.257767, 0.246411, 0.234221, 0.221141, 0.207104, 0.192038, 0.175855, 0.158459, 0.139734, 0.119547, 0.0977391, 0.0741228, 0.0484704, 0.0205047, -0.0101176, -0.0438283, -0.0811811, -0.122902, -0.16997, -0.22375, -0.286223, -0.36043, -0.451396, -0.568334, -0.731199, -0.998811, -1.85382, -1.13642, -0.793771, -0.603587, -0.471096, -0.369271, -0.286549, -0.216903, -0.156789, -0.103948, -0.056849, -0.0144074, 0.0241733, 0.0594952, 0.0920244, 0.122129, 0.150105, 0.176194, 0.200594, 0.223473, 0.24497, 0.265205, 0.28428, 0.302282, 0.31929, 0.33537, 0.35058, 0.364973, 0.378594, 0.391483, 0.403678, 0.41521, 0.426108, 0.436398, 0.446103, 0.455245, 0.463841, 0.471909, 0.479463, 0.486517, 0.493084, 0.499173, 0.504794, 0.509956, 0.514666, 0.518929, 0.522751, 0.526137, 0.529089, 0.531611, 0.533704, 0.535368, 0.536605, 0.537413, 0.53779, 0.537735, 0.537243, 0.536312, 0.534935, 0.533106, 0.530819, 0.528066, 0.524837, 0.521121, 0.516907, 0.512182, 0.50693, 0.501135, 0.494779, 0.487841, 0.480298, 0.472124, 0.463291, 0.453767, 0.443515, 0.432497, 0.420665, 0.40797, 0.394353, 0.379747, 0.364077, 0.347255, 0.329181, 0.309736, 0.288782, 0.266154, 0.241656, 0.215051, 0.186046, 0.15428, 0.119294, 0.0804978, 0.0371111, -0.0119257, -0.0681038, -0.133618, -0.21189, -0.308703, -0.435037, -0.616086, -0.9364, -1.93996, -0.855155, -0.571183, -0.400266, -0.277539, -0.181723, -0.103144, -0.036575, 0.0211262, 0.0719995, 0.117444, 0.15846, 0.195789, 0.229995, 0.261517, 0.290703, 0.317835, 0.343143, 0.366816, 0.389017, 0.409878, 0.429516, 0.448029, 0.465504, 0.482015, 0.497628, 0.512399, 0.52638, 0.539617, 0.552148, 0.564011, 0.575237, 0.585855, 0.595892, 0.605371, 0.614313, 0.622738, 0.630663, 0.638103, 0.645074, 0.651587, 0.657655, 0.663289, 0.668497, 0.673289, 0.677672, 0.681653, 0.685239, 0.688434, 0.691243, 0.693671, 0.69572, 0.697394, 0.698694, 0.699621, 0.700178, 0.700364, 0.70018, 0.699624, 0.698695, 0.697391, 0.69571, 0.693649, 0.691204, 0.688371, 0.685144, 0.681519, 0.677488, 0.673044, 0.668179, 0.662885, 0.65715, 0.650965, 0.644316, 0.63719, 0.629573, 0.621447, 0.612796, 0.603598, 0.593832, 0.583473, 0.572495, 0.560868, 0.548557, 0.535526, 0.521733, 0.507132, 0.491669, 0.475285, 0.457913, 0.439473, 0.419878, 0.399024, 0.37679, 0.353036, 0.327594, 0.300264, 0.270804, 0.238916, 0.204232, 0.166284, 0.124468, 0.0779865, 0.0257525, -0.0337673, -0.102837, -0.185007, -0.286316, -0.418358, -0.60825, -0.951286, -1.65752, -0.809624, -0.542078, -0.378933, -0.261631, -0.170279, -0.0956856, -0.0328371, 0.0213016, 0.0687084, 0.110744, 0.148385, 0.182355, 0.213206, 0.241366, 0.267178, 0.290916, 0.312805, 0.333031, 0.35175, 0.369093, 0.385173, 0.400083, 0.413907, 0.426717, 0.438573, 0.449531, 0.459636, 0.468932, 0.477454, 0.485234, 0.4923, 0.498677, 0.504385, 0.509445, 0.513871, 0.517678, 0.520877, 0.523477, 0.525487, 0.526911, 0.527753, 0.528017, 0.527702, 0.526807, 0.52533, 0.523265, 0.520606, 0.517346, 0.513474, 0.508977, 0.503841, 0.498049, 0.491581, 0.484415, 0.476526, 0.467883, 0.458453, 0.448199, 0.437076, 0.425035, 0.412019, 0.397964, 0.382795, 0.366423, 0.34875, 0.329657, 0.309004, 0.286627, 0.262326, 0.235861, 0.206937, 0.175184, 0.140136, 0.101188, 0.0575419, 0.00810705, -0.0486558, -0.115022, -0.194564, -0.293369, -0.423146, -0.611388, -0.955584, -1.61678, -0.795954, -0.527973, -0.362906, -0.243262, -0.149391, -0.0721823, -0.00666045, 0.0501926, 0.100346, 0.145155, 0.185594, 0.222385, 0.25608, 0.287109, 0.315814, 0.34247, 0.367305, 0.390506, 0.41223, 0.43261, 0.451762, 0.469781, 0.486753, 0.502752, 0.517843, 0.532081, 0.545518, 0.558197, 0.570159, 0.58144, 0.592069, 0.602078, 0.611489, 0.620328, 0.628614, 0.636367, 0.643603, 0.650337, 0.656583, 0.662354, 0.667661, 0.672513, 0.67692, 0.680888, 0.684426, 0.687539, 0.690233, 0.69251, 0.694377, 0.695834, 0.696884, 0.697529, 0.697768, 0.697603, 0.697033, 0.696055, 0.694669, 0.69287, 0.690656, 0.688021, 0.684961, 0.68147, 0.677541, 0.673165, 0.668334, 0.663038, 0.657265, 0.651004, 0.644239, 0.636955, 0.629136, 0.620762, 0.611812, 0.602262, 0.592087, 0.581258, 0.569741, 0.557501, 0.544497, 0.530683, 0.516008, 0.500413, 0.483831, 0.466187, 0.447393, 0.427347, 0.405932, 0.383008, 0.358412, 0.331948, 0.303377, 0.27241, 0.238683, 0.201742, 0.160997, 0.115671, 0.0647093, 0.00662968, -0.0607486, -0.140822, -0.239322, -0.3671, -0.548966, -0.867387, -1.96616, -0.804374, -0.519403, -0.349508, -0.228348, -0.13433, -0.0576699, 0.00690187, 0.0625527, 0.111335, 0.154654, 0.193516, 0.228664, 0.260664, 0.289956, 0.316888, 0.341743, 0.364749, 0.386098, 0.405948, 0.424434, 0.44167, 0.457755, 0.472774, 0.486799, 0.499895, 0.512119, 0.52352, 0.534142, 0.544023, 0.553198, 0.561698, 0.569549, 0.576775, 0.583398, 0.589438, 0.59491, 0.59983, 0.604212, 0.608066, 0.611402, 0.61423, 0.616556, 0.618386, 0.619724, 0.620575, 0.620941, 0.620822, 0.620219, 0.61913, 0.617555, 0.615488, 0.612927, 0.609864, 0.606293, 0.602206, 0.597593, 0.592443, 0.586742, 0.580477, 0.573629, 0.566181, 0.558111, 0.549396, 0.540008, 0.529917, 0.51909, 0.507488, 0.495068, 0.481781, 0.46757, 0.452374, 0.436119, 0.41872, 0.400082, 0.380091, 0.358614, 0.335495, 0.310545, 0.283538, 0.254197, 0.22218, 0.187053, 0.148263, 0.105081, 0.0565265, 0.00122872, -0.0628036, -0.13863, -0.231308, -0.350136, -0.5153, -0.786677, -1.67521, -0.915491, -0.577988, -0.390371, -0.259881, -0.159843, -0.0788015, -0.0107765, 0.0477533, 0.0990365, 0.144597, 0.185515, 0.222585, 0.256408, 0.287449, 0.316075, 0.342582, 0.367212, 0.390163, 0.411604, 0.431673, 0.450491, 0.468161, 0.484772, 0.5004, 0.515113, 0.528972, 0.542028, 0.554327, 0.565912, 0.57682, 0.587083, 0.596731, 0.605791, 0.614289, 0.622244, 0.629678, 0.636608, 0.643051, 0.649021, 0.654532, 0.659595, 0.664223, 0.668425, 0.67221, 0.675585, 0.678559, 0.681138, 0.683328, 0.685132, 0.686557, 0.687606, 0.688281, 0.688585, 0.68852, 0.688088, 0.68729, 0.686125, 0.684593, 0.682694, 0.680427, 0.677788, 0.674777, 0.671389, 0.667621, 0.66347, 0.658928, 0.653992, 0.648655, 0.642909, 0.636746, 0.630159, 0.623136, 0.615666, 0.607739, 0.59934, 0.590455, 0.581068, 0.571161, 0.560715, 0.549708, 0.538115, 0.525912, 0.513068, 0.499551, 0.485324, 0.470348, 0.454576, 0.437956, 0.420432, 0.401937, 0.382395, 0.361721, 0.339814, 0.316558, 0.291817, 0.26543, 0.237205, 0.206909, 0.174259, 0.138903, 0.100397, 0.0581724, 0.0114784, -0.0406982, -0.0997759, -0.167827, -0.248053, -0.345795, -0.470991, -0.645694, -0.938436, -2.25515, -0.98796, -0.678248, -0.501369, -0.377693, -0.282952, -0.20647, -0.142591, -0.0879576, -0.0404093, 0.0015233, 0.0388864, 0.0724508, 0.102801, 0.130389, 0.155575, 0.178647, 0.199841, 0.219351, 0.237339, 0.253943, 0.26928, 0.283449, 0.296536, 0.308617, 0.319757, 0.330012, 0.339434, 0.348066, 0.355947, 0.363113, 0.369595, 0.375419, 0.380612, 0.385193, 0.389184, 0.392601, 0.39546, 0.397773, 0.399554, 0.400813, 0.401557, 0.401797, 0.401537, 0.400783, 0.399539, 0.397809, 0.395594, 0.392896, 0.389715, 0.38605, 0.381898, 0.377257, 0.372124, 0.366492, 0.360356, 0.353709, 0.346542, 0.338845, 0.330608, 0.321817, 0.312458, 0.302517, 0.291974, 0.28081, 0.269003, 0.256528, 0.243357, 0.229461, 0.214803, 0.199347, 0.183047, 0.165856, 0.147718, 0.12857, 0.10834, 0.0869473, 0.0642964, 0.0402777, 0.014763, -0.0123985, -0.0413864, -0.0724159, -0.105749, -0.141708, -0.180695, -0.223225, -0.269965, -0.321807, -0.37998, -0.446242, -0.523243, -0.615246, -0.729786, -0.882215, -1.11259, -1.61269, -1.56742, -1.11248, -0.900116, -0.761851, -0.660217, -0.580576, -0.515675, -0.461386, -0.415139, -0.375223, -0.340445, -0.309942, -0.283067, -0.259329, -0.238343, -0.219805, -0.203473, -0.189149, -0.176673, -0.165916, -0.15677, -0.149149, -0.142983, -0.138217, -0.134808, -0.132727, -0.131952, -0.132474, -0.134292, -0.137417, -0.141869, -0.147677, -0.154885, -0.163547, -0.173732, -0.185528, -0.19904, -0.214398, -0.231762, -0.251327, -0.273337, -0.298093, -0.325979, -0.357484, -0.393251, -0.43414, -0.481337, -0.53654, -0.602302, -0.682714, -0.784953, -0.923459, -1.13499, -1.58202, -1.65823, -1.14822, -0.916849, -0.764622, -0.650674, -0.55944, -0.483303, -0.417962, -0.360748, -0.309891, -0.264154, -0.222641, -0.184681, -0.149759, -0.11747, -0.0874901, -0.059557, -0.0334546, -0.00900289, 0.0139494, 0.0355309, 0.0558514, 0.0750059, 0.0930765, 0.110135, 0.126244, 0.14146, 0.155831, 0.1694, 0.182207, 0.194286, 0.205668, 0.21638, 0.226448, 0.235893, 0.244735, 0.252992, 0.260681, 0.267814, 0.274406, 0.280466, 0.286005, 0.291032, 0.295554, 0.299576, 0.303104, 0.306143, 0.308694, 0.310761, 0.312343, 0.313442, 0.314056, 0.314183, 0.313821, 0.312965, 0.311611, 0.309751, 0.307379, 0.304486, 0.301063, 0.297096, 0.292575, 0.287483, 0.281804, 0.275519, 0.268608, 0.261046, 0.252809, 0.243865, 0.234181, 0.223721, 0.212442, 0.200296, 0.187229, 0.173179, 0.158077, 0.14184, 0.124375, 0.105573, 0.0853071, 0.0634259, 0.0397501, 0.0140636, -0.0138966, -0.0444554, -0.07802, -0.11511, -0.156404, -0.20281, -0.255584, -0.316527, -0.388371, -0.475532, -0.585883, -0.735675, -0.968384, -1.5107, -1.33521, -0.908092, -0.69655, -0.554749, -0.448005, -0.362461, -0.291163, -0.230122, -0.176835, -0.129631, -0.0873343, -0.0490913, -0.0142594, 0.0176559, 0.0470436, 0.0742146, 0.0994218, 0.122873, 0.144742, 0.165174, 0.184293, 0.202204, 0.218998, 0.234754, 0.24954, 0.263417, 0.276437, 0.288645, 0.300085, 0.31079, 0.320795, 0.330127, 0.338811, 0.346871, 0.354327, 0.361195, 0.367492, 0.373232, 0.378426, 0.383085, 0.387217, 0.390831, 0.393932, 0.396524, 0.398611, 0.400197, 0.40128, 0.401862, 0.401941, 0.401514, 0.400577, 0.399126, 0.397154, 0.394653, 0.391613, 0.388024, 0.383872, 0.379145, 0.373824, 0.367891, 0.361325, 0.354101, 0.346194, 0.337572, 0.328201, 0.318043, 0.307052, 0.29518, 0.282369, 0.268554, 0.253661, 0.237604, 0.220283, 0.201581, 0.18136, 0.159459, 0.135683, 0.109794, 0.081504, 0.050453, 0.0161859, -0.0218842, -0.0645319, -0.112809, -0.168195, -0.232866, -0.310209, -0.405937, -0.53087, -0.709701, -1.02432, -2.15057, -0.959932, -0.671342, -0.498404, -0.374342, -0.277471, -0.197975, -0.130568, -0.0720766, -0.0204423, 0.0257441, 0.0674908, 0.105544, 0.14047, 0.172713, 0.202621, 0.230479, 0.256518, 0.28093, 0.303875, 0.325491, 0.345893, 0.365182, 0.383443, 0.400754, 0.417179, 0.432778, 0.447601, 0.461696, 0.475103, 0.487859, 0.499997, 0.511547, 0.522536, 0.532988, 0.542926, 0.552371, 0.56134, 0.56985, 0.577917, 0.585556, 0.592778, 0.599596, 0.606021, 0.612062, 0.61773, 0.623031, 0.627975, 0.632568, 0.636816, 0.640726, 0.644302, 0.64755, 0.650473, 0.653076, 0.655362, 0.657334, 0.658995, 0.660346, 0.66139, 0.662128, 0.662561, 0.66269, 0.662515, 0.662037, 0.661254, 0.660166, 0.658773, 0.657072, 0.655063, 0.652742, 0.650107, 0.647156, 0.643884, 0.640289, 0.636365, 0.632108, 0.627512, 0.622572, 0.617282, 0.611633, 0.605619, 0.599231, 0.59246, 0.585296, 0.577727, 0.569741, 0.561326, 0.552468, 0.543149, 0.533354, 0.523064, 0.512258, 0.500912, 0.489003, 0.476503, 0.463381, 0.449603, 0.435132, 0.419925, 0.403934, 0.387108, 0.369386, 0.350698, 0.330968, 0.310105, 0.288005, 0.264548, 0.239591, 0.212967, 0.184473, 0.153867, 0.120849, 0.0850466, 0.04599, 0.00307045, -0.0445173, -0.0978705, -0.158539, -0.228817, -0.312306, -0.415153, -0.549212, -0.742436, -1.09502, -1.7127, -0.927593, -0.665817, -0.505199, -0.389487, -0.299315, -0.225674, -0.163633, -0.110198, -0.0634145, -0.0219352, 0.0152076, 0.0487324, 0.0791869, 0.106999, 0.132507, 0.155987, 0.177662, 0.197719, 0.216314, 0.233579, 0.249626, 0.264552, 0.27844, 0.291362, 0.303383, 0.314557, 0.324934, 0.334556, 0.343464, 0.351689, 0.359264, 0.366214, 0.372565, 0.378337, 0.38355, 0.388221, 0.392366, 0.395997, 0.399127, 0.401766, 0.403924, 0.405607, 0.406823, 0.407577, 0.407874, 0.407716, 0.407106, 0.406045, 0.404533, 0.40257, 0.400154, 0.397282, 0.39395, 0.390153, 0.385885, 0.38114, 0.375907, 0.370179, 0.363942, 0.357186, 0.349894, 0.342051, 0.333639, 0.324637, 0.315022, 0.304767, 0.293845, 0.282223, 0.269864, 0.256726, 0.242764, 0.227924, 0.212147, 0.195363, 0.177494, 0.15845, 0.138124, 0.116393, 0.0931104, 0.0681041, 0.0411655, 0.0120418, -0.0195784, -0.0540842, -0.0919707, -0.133881, -0.180671, -0.233517, -0.294095, -0.364913, -0.449973, -0.556255, -0.697684, -0.909179, -1.33841, -1.50184, -0.963499, -0.730738, -0.580379, -0.469269, -0.381241, -0.308451, -0.246496, -0.192653, -0.145123, -0.102651, -0.0643317, -0.0294859, 0.00240638, 0.0317527, 0.0588786, 0.084048, 0.107478, 0.129349, 0.149813, 0.168998, 0.187016, 0.203961, 0.219916, 0.234952, 0.249134, 0.262517, 0.27515, 0.287079, 0.298342, 0.308974, 0.319008, 0.328473, 0.337393, 0.345794, 0.353696, 0.36112, 0.368082, 0.374598, 0.380685, 0.386356, 0.391622, 0.396495, 0.400987, 0.405105, 0.40886, 0.412259, 0.41531, 0.418019, 0.420392, 0.422434, 0.424152, 0.425548, 0.426627, 0.427394, 0.427849, 0.427997, 0.42784, 0.427379, 0.426615, 0.425551, 0.424186, 0.422521, 0.420556, 0.41829, 0.415723, 0.412852, 0.409678, 0.406198, 0.402408, 0.398308, 0.393892, 0.389159, 0.384102, 0.378719, 0.373003, 0.366949, 0.36055, 0.3538, 0.34669, 0.339213, 0.331359, 0.323119, 0.31448, 0.305431, 0.29596, 0.286051, 0.275689, 0.264856, 0.253535, 0.241704, 0.22934, 0.216419, 0.202911, 0.188788, 0.174014, 0.158552, 0.142359, 0.125388, 0.107584, 0.0888864, 0.0692271, 0.0485267, 0.0266942, 0.00362483, -0.020804, -0.0467363, -0.0743425, -0.103827, -0.135437, -0.169477, -0.206326, -0.246463, -0.290509, -0.33929, -0.39393, -0.456025, -0.527944, -0.613432, -0.718924, -0.856986, -1.05789, -1.43628, -1.86441, -1.19862, -0.949848, -0.794629, -0.682096, -0.594151, -0.522242, -0.461641, -0.409458, -0.363799, -0.323353, -0.287175, -0.254564, -0.224982, -0.19801, -0.173316, -0.150629, -0.12973, -0.110433, -0.0925877, -0.0760628, -0.0607482, -0.0465493, -0.033384, -0.0211816, -0.00988, 0.000574922, 0.0102308, 0.0191296, 0.0273082, 0.0347994, 0.0416322, 0.047832, 0.0534216, 0.0584207, 0.062847, 0.0667156, 0.0700399, 0.0728313, 0.0750995, 0.0768525, 0.0780968, 0.0788375, 0.0790781, 0.0788209, 0.0780667, 0.076815, 0.0750639, 0.0728102, 0.0700492, 0.0667748, 0.0629792, 0.0586532, 0.0537858, 0.0483641, 0.0423733, 0.0357964, 0.028614, 0.0208041, 0.0123418, 0.00319881, -0.00665676, -0.017261, -0.0286549, -0.040885, -0.054004, -0.0680723, -0.0831593, -0.0993446, -0.11672, -0.135394, -0.155492, -0.177162, -0.200581, -0.225964, -0.253571, -0.283721, -0.316816, -0.353371, -0.394054, -0.439758, -0.491718, -0.551704, -0.622387, -0.708076, -0.816405, -0.962998, -1.18894, -1.69603, -1.60499, -1.154, -0.93641, -0.791381, -0.68235, -0.594927, -0.521948, -0.459325, -0.404504, -0.355779, -0.311958, -0.272172, -0.23577, -0.20225, -0.171218, -0.142359, -0.115416, -0.0901787, -0.0664706, -0.0441439, -0.023073, -0.00315004, 0.0157178, 0.0336113, 0.0506009, 0.0667486, 0.082109, 0.0967305, 0.110656, 0.123925, 0.13657, 0.148624, 0.160115, 0.171066, 0.181502, 0.191442, 0.200906, 0.209911, 0.218472, 0.226603, 0.234318, 0.241626, 0.24854, 0.255069, 0.261222, 0.267005, 0.272427, 0.277494, 0.282211, 0.286583, 0.290615, 0.294311, 0.297672, 0.300703, 0.303405, 0.30578, 0.307829, 0.309552, 0.310949, 0.312021, 0.312765, 0.313181, 0.313267, 0.313019, 0.312435, 0.311512, 0.310244, 0.308628, 0.306657, 0.304325, 0.301626, 0.298551, 0.295093, 0.29124, 0.286984, 0.282313, 0.277213, 0.271671, 0.265672, 0.259198, 0.252231, 0.24475, 0.236732, 0.228153, 0.218984, 0.209195, 0.198752, 0.187614, 0.17574, 0.163082, 0.149583, 0.135183, 0.119811, 0.103385, 0.0858131, 0.0669861, 0.0467781, 0.02504, 0.00159487, -0.0237699, -0.0513126, -0.0813517, -0.114285, -0.150621, -0.191018, -0.236357, -0.287852, -0.347238, -0.417125, -0.501704, -0.608361, -0.75206, -0.971445, -1.44525, -1.44685, -0.966605, -0.742706, -0.59477, -0.483965, -0.39528, -0.321308, -0.257849, -0.202288, -0.152887, -0.10843, -0.0680358, -0.0310432, 0.00305595, 0.0346604, 0.064089, 0.0916006, 0.117408, 0.14169, 0.164594, 0.186248, 0.20676, 0.226224, 0.244721, 0.262323, 0.279091, 0.295081, 0.310342, 0.324918, 0.338847, 0.352164, 0.364901, 0.377086, 0.388745, 0.399901, 0.410576, 0.420788, 0.430556, 0.439895, 0.448821, 0.457346, 0.465484, 0.473245, 0.48064, 0.487678, 0.49437, 0.500721, 0.50674, 0.512434, 0.517809, 0.52287, 0.527623, 0.532072, 0.536221, 0.540075, 0.543636, 0.546908, 0.549893, 0.552593, 0.555011, 0.557148, 0.559004, 0.560582, 0.561881, 0.562903, 0.563646, 0.56411, 0.564295, 0.5642, 0.563823, 0.563163, 0.562217, 0.560984, 0.559461, 0.557644, 0.555531, 0.553116, 0.550397, 0.547368, 0.544023, 0.540358, 0.536366, 0.53204, 0.527373, 0.522357, 0.516982, 0.511239, 0.505119, 0.498608, 0.491696, 0.484368, 0.476611, 0.468407, 0.459739, 0.450589, 0.440936, 0.430755, 0.420022, 0.40871, 0.396786, 0.384217, 0.370964, 0.356985, 0.342231, 0.326649, 0.310179, 0.292749, 0.274283, 0.254687, 0.233858, 0.211673, 0.187986, 0.162628, 0.135394, 0.106036, 0.0742495, 0.0396548, 0.00177125, -0.0400239, -0.0865565, -0.138955, -0.198821, -0.26853, -0.351842, -0.455225, -0.59132, -0.790654, -1.16955, -1.57772, -0.919575, -0.669679, -0.512585, -0.39795, -0.307801, -0.23363, -0.170731, -0.116225, -0.068221, -0.0254121, 0.0131439, 0.0481483, 0.0801372, 0.109529, 0.136659, 0.161794, 0.185158, 0.206932, 0.227273, 0.246308, 0.264151, 0.280897, 0.296628, 0.311416, 0.325325, 0.33841, 0.35072, 0.362299, 0.373184, 0.383412, 0.393011, 0.40201, 0.410433, 0.418303, 0.42564, 0.432461, 0.438782, 0.444618, 0.449982, 0.454885, 0.459338, 0.463349, 0.466927, 0.470078, 0.472809, 0.475125, 0.477029, 0.478525, 0.479616, 0.480303, 0.480587, 0.480469, 0.479948, 0.479022, 0.477689, 0.475947, 0.473791, 0.471216, 0.468218, 0.464789, 0.460923, 0.45661, 0.45184, 0.446604, 0.440888, 0.434679, 0.427961, 0.420718, 0.41293, 0.404577, 0.395634, 0.386077, 0.375875, 0.364995, 0.353403, 0.341055, 0.327907, 0.313905, 0.298991, 0.283097, 0.266145, 0.248046, 0.228697, 0.207977, 0.185744, 0.161829, 0.136031, 0.108105, 0.0777495, 0.0445905, 0.00815291, -0.0321777, -0.0772158, -0.128073, -0.186324, -0.254302, -0.335684, -0.436774, -0.569808, -0.763977, -1.12705, -1.63211, -0.915011, -0.657292, -0.496434, -0.379234, -0.287034, -0.21108, -0.146551, -0.0905113, -0.041037, 0.00319986, 0.0431554, 0.0795403, 0.112898, 0.143652, 0.172141, 0.198637, 0.223365, 0.246511, 0.268231, 0.288657, 0.307903, 0.326066, 0.343231, 0.359472, 0.374853, 0.389431, 0.403258, 0.416378, 0.428832, 0.440656, 0.451882, 0.462539, 0.472656, 0.482255, 0.491358, 0.499987, 0.508158, 0.515889, 0.523195, 0.530091, 0.536588, 0.5427, 0.548437, 0.55381, 0.558827, 0.563497, 0.567828, 0.571827, 0.575502, 0.578858, 0.581901, 0.584636, 0.587068, 0.589201, 0.59104, 0.592587, 0.593847, 0.594821, 0.595513, 0.595925, 0.596059, 0.595915, 0.595497, 0.594805, 0.593839, 0.592601, 0.59109, 0.589307, 0.587252, 0.584923, 0.582321, 0.579444, 0.576291, 0.57286, 0.56915, 0.565158, 0.560883, 0.556321, 0.551469, 0.546324, 0.540883, 0.535141, 0.529093, 0.522736, 0.516063, 0.509069 - }; + 0.828114, 0.827452, 0.826346, 0.824794, 0.822794, 0.820341, 0.81743, 0.814055, 0.810208, 0.805881, 0.801064, 0.795746, 0.789916, 0.783557, 0.776656, 0.769194, 0.761152, 0.752507, 0.743236, 0.733309, 0.722698, 0.711367, 0.699277, 0.686385, 0.672642, 0.657991, 0.642368, 0.625702, 0.607908, 0.588889, 0.568532, 0.546706, 0.523254, 0.497988, 0.470685, 0.441069, 0.4088, 0.37345, 0.33447, 0.291141, 0.242492, 0.187175, 0.123229, 0.0476552, -0.0444923, -0.162252, -0.325075, -0.58958, -1.38595, -0.756406, -0.407234, -0.216391, -0.084502, 0.0162451, 0.0976609, 0.165875, 0.22448, 0.275764, 0.321274, 0.362106, 0.399062, 0.432751, 0.463642, 0.492106, 0.518442, 0.542892, 0.565657, 0.586905, 0.606777, 0.625394, 0.642858, 0.659259, 0.674675, 0.689173, 0.702813, 0.715647, 0.727722, 0.739079, 0.749755, 0.759784, 0.769195, 0.778015, 0.786268, 0.793975, 0.801157, 0.807831, 0.814014, 0.819719, 0.82496, 0.829748, 0.834096, 0.838011, 0.841504, 0.844581, 0.84725, 0.849516, 0.851385, 0.852861, 0.853949, 0.854652, 0.854971, 0.854909, 0.854468, 0.853648, 0.852449, 0.850871, 0.848913, 0.846572, 0.843847, 0.840735, 0.837233, 0.833335, 0.829037, 0.824334, 0.819218, 0.813683, 0.807721, 0.801322, 0.794476, 0.787172, 0.779398, 0.77114, 0.762382, 0.753109, 0.743301, 0.732939, 0.721999, 0.710458, 0.698286, 0.685455, 0.671928, 0.657669, 0.642634, 0.626776, 0.610039, 0.592363, 0.573677, 0.553901, 0.532942, 0.510694, 0.487031, 0.461806, 0.434845, 0.405937, 0.374828, 0.341205, 0.304677, 0.264745, 0.220765, 0.171875, 0.116896, 0.0541437, -0.0189018, -0.106263, -0.214962, -0.359032, -0.573763, -1.00972, -1.15818, -0.629333, -0.400143, -0.252673, -0.144257, -0.0588585, 0.0113165, 0.0706481, 0.121845, 0.1667, 0.20646, 0.242027, 0.274077, 0.303125, 0.329578, 0.353757, 0.375924, 0.396294, 0.415044, 0.432323, 0.448259, 0.462957, 0.476511, 0.489, 0.500494, 0.511052, 0.520726, 0.529564, 0.537605, 0.544886, 0.551437, 0.557286, 0.562458, 0.566973, 0.57085, 0.574106, 0.576754, 0.578806, 0.580272, 0.58116, 0.581476, 0.581225, 0.58041, 0.579033, 0.577093, 0.574589, 0.571518, 0.567875, 0.563654, 0.558846, 0.553442, 0.54743, 0.540796, 0.533525, 0.525597, 0.516991, 0.507684, 0.497649, 0.486853, 0.475263, 0.462837, 0.449531, 0.435294, 0.420065, 0.403777, 0.386352, 0.367701, 0.347717, 0.326278, 0.30324, 0.278429, 0.251637, 0.222613, 0.191046, 0.156547, 0.118622, 0.0766289, 0.0297127, -0.0233003, -0.0840831, -0.155138, -0.240457, -0.346997, -0.488627, -0.700067, -1.12745, -1.30093, -0.759226, -0.526486, -0.376599, -0.266138, -0.178868, -0.10692, -0.0458798, 0.00698119, 0.053466, 0.0948289, 0.131978, 0.165591, 0.196187, 0.224174, 0.249876, 0.273557, 0.295431, 0.315678, 0.334449, 0.351871, 0.368052, 0.383086, 0.397054, 0.410025, 0.422061, 0.433215, 0.443534, 0.453061, 0.461832, 0.469879, 0.477232, 0.483915, 0.489952, 0.495362, 0.500163, 0.504371, 0.507998, 0.511057, 0.513557, 0.515506, 0.516912, 0.517781, 0.518115, 0.517917, 0.517189, 0.515932, 0.514143, 0.51182, 0.508959, 0.505556, 0.501602, 0.497091, 0.492012, 0.486353, 0.480102, 0.473243, 0.465759, 0.45763, 0.448834, 0.439345, 0.429135, 0.418172, 0.406419, 0.393834, 0.380373, 0.36598, 0.350597, 0.334153, 0.316569, 0.297752, 0.277596, 0.255975, 0.23274, 0.207716, 0.18069, 0.151402, 0.119536, 0.0846913, 0.0463597, 0.00387894, -0.0436356, -0.0974027, -0.159168, -0.231559, -0.318801, -0.428352, -0.575364, -0.799178, -1.28484, -1.26207, -0.793569, -0.574372, -0.430188, -0.322868, -0.237586, -0.167009, -0.106971, -0.0548761, -0.00899536, 0.0318782, 0.0686219, 0.101893, 0.132197, 0.159929, 0.185406, 0.208886, 0.23058, 0.250662, 0.269281, 0.286561, 0.302609, 0.317516, 0.331362, 0.344216, 0.356137, 0.367179, 0.377387, 0.386803, 0.395462, 0.403397, 0.410636, 0.417203, 0.423121, 0.428409, 0.433085, 0.437162, 0.440654, 0.443572, 0.445926, 0.447723, 0.448969, 0.44967, 0.449828, 0.449445, 0.448523, 0.44706, 0.445055, 0.442503, 0.439401, 0.435741, 0.431516, 0.426717, 0.421332, 0.415348, 0.40875, 0.401522, 0.393643, 0.385091, 0.375842, 0.365867, 0.355134, 0.343607, 0.331245, 0.318002, 0.303824, 0.288651, 0.272415, 0.255036, 0.236421, 0.216465, 0.195042, 0.172005, 0.147177, 0.120347, 0.0912574, 0.0595912, 0.024951, -0.0131693, -0.0554285, -0.102706, -0.156213, -0.217682, -0.28972, -0.376509, -0.485418, -0.631369, -0.852852, -1.3272, -1.33764, -0.858059, -0.636569, -0.491357, -0.383436, -0.297749, -0.226877, -0.16661, -0.114332, -0.0683013, -0.0273033, 0.00954443, 0.0429023, 0.0732777, 0.101068, 0.126592, 0.150107, 0.171824, 0.19192, 0.210541, 0.227813, 0.243843, 0.258722, 0.272528, 0.285332, 0.297192, 0.30816, 0.318284, 0.327603, 0.336152, 0.343964, 0.351065, 0.35748, 0.363231, 0.368335, 0.37281, 0.376669, 0.379923, 0.382583, 0.384658, 0.386153, 0.387073, 0.387421, 0.387199, 0.386407, 0.385044, 0.383106, 0.380589, 0.377486, 0.37379, 0.36949, 0.364575, 0.35903, 0.352841, 0.345987, 0.338449, 0.330201, 0.321216, 0.311464, 0.300907, 0.289507, 0.277216, 0.263983, 0.249748, 0.234441, 0.217984, 0.200285, 0.181237, 0.160715, 0.13857, 0.114626, 0.0886692, 0.0604418, 0.0296236, -0.00418591, -0.0414979, -0.0829785, -0.129518, -0.182344, -0.243219, -0.314795, -0.401351, -0.510454, -0.657548, -0.883055, -1.38223, -1.31729, -0.860435, -0.642767, -0.498597, -0.390778, -0.304757, -0.233309, -0.172316, -0.119207, -0.0722697, -0.0303054, 0.00755772, 0.0419735, 0.0734447, 0.102366, 0.129054, 0.153765, 0.17671, 0.198065, 0.217977, 0.236572, 0.253957, 0.270225, 0.285456, 0.29972, 0.313078, 0.325585, 0.337287, 0.348227, 0.358442, 0.367967, 0.376832, 0.385062, 0.392683, 0.399716, 0.40618, 0.412093, 0.41747, 0.422326, 0.426673, 0.430522, 0.433883, 0.436765, 0.439176, 0.441121, 0.442607, 0.443638, 0.444219, 0.444351, 0.444038, 0.44328, 0.442078, 0.440432, 0.43834, 0.435801, 0.432813, 0.42937, 0.42547, 0.421107, 0.416274, 0.410964, 0.40517, 0.398881, 0.392088, 0.384778, 0.376939, 0.368555, 0.359611, 0.350088, 0.339966, 0.329223, 0.317834, 0.305772, 0.293006, 0.279501, 0.265219, 0.250118, 0.234149, 0.217256, 0.19938, 0.180448, 0.16038, 0.139083, 0.11645, 0.0923539, 0.0666474, 0.0391547, 0.00966503, -0.0220775, -0.0563872, -0.093657, -0.134386, -0.179222, -0.229028, -0.284989, -0.348791, -0.422962, -0.511536, -0.62156, -0.767119, -0.983701, -1.42338, -1.56456, -1.04084, -0.813893, -0.668386, -0.5619, -0.478466, -0.410318, -0.353092, -0.304089, -0.261523, -0.224155, -0.191087, -0.161653, -0.13534, -0.111751, -0.0905707, -0.0715446, -0.0544664, -0.0391667, -0.0255057, -0.0133671, -0.00265431, 0.00671316, 0.014802, 0.0216673, 0.0273536, 0.0318966, 0.0353237, 0.0376549, 0.0389029, 0.0390738, 0.0381669, 0.036175, 0.0330839, 0.0288723, 0.0235113, 0.0169636, 0.00918257, 0.000110952, -0.0103205, -0.0221954, -0.035614, -0.0506971, -0.0675902, -0.0864699, -0.107551, -0.131101, -0.157449, -0.187015, -0.22034, -0.258133, -0.301353, -0.351337, -0.410027, -0.480399, -0.56735, -0.679822, -0.837003, -1.09438, -1.8581, -1.26613, -0.908002, -0.711572, -0.574867, -0.469637, -0.383934, -0.31157, -0.248924, -0.193691, -0.144311, -0.0996829, -0.0589965, -0.0216404, 0.012859, 0.0448758, 0.074711, 0.10261, 0.128775, 0.153377, 0.176559, 0.198442, 0.219131, 0.238718, 0.257281, 0.27489, 0.291604, 0.307478, 0.32256, 0.336893, 0.350514, 0.363458, 0.375755, 0.387434, 0.398519, 0.409033, 0.418997, 0.428429, 0.437347, 0.445766, 0.453699, 0.461161, 0.468161, 0.474712, 0.480822, 0.4865, 0.491753, 0.496589, 0.501014, 0.505033, 0.50865, 0.511871, 0.514697, 0.517133, 0.51918, 0.52084, 0.522114, 0.523002, 0.523504, 0.52362, 0.523349, 0.522687, 0.521634, 0.520186, 0.518339, 0.516088, 0.51343, 0.510357, 0.506863, 0.502941, 0.498582, 0.493777, 0.488516, 0.482787, 0.476577, 0.469872, 0.462657, 0.454915, 0.446626, 0.43777, 0.428324, 0.418261, 0.407552, 0.396167, 0.38407, 0.37122, 0.357574, 0.34308, 0.327682, 0.311315, 0.293906, 0.27537, 0.255608, 0.234507, 0.211935, 0.187732, 0.161712, 0.133648, 0.103263, 0.0702147, 0.0340734, -0.0057133, -0.0498694, -0.0993704, -0.155575, -0.220458, -0.297045, -0.39033, -0.509465, -0.674216, -0.942585, -1.77673, -1.09472, -0.751675, -0.563212, -0.43291, -0.333458, -0.253203, -0.186081, -0.128532, -0.0782855, -0.0338051, 0.00599701, 0.0419195, 0.0745657, 0.104403, 0.1318, 0.157052, 0.180402, 0.202048, 0.222157, 0.240868, 0.258301, 0.274557, 0.289724, 0.303879, 0.317087, 0.329408, 0.340891, 0.351582, 0.361522, 0.370744, 0.379282, 0.387162, 0.394409, 0.401046, 0.407092, 0.412564, 0.417479, 0.421849, 0.425686, 0.429001, 0.431802, 0.434098, 0.435894, 0.437195, 0.438004, 0.438325, 0.438159, 0.437506, 0.436366, 0.434735, 0.432612, 0.429992, 0.42687, 0.423238, 0.419089, 0.414413, 0.409199, 0.403435, 0.397105, 0.390194, 0.382682, 0.37455, 0.365773, 0.356326, 0.346178, 0.335295, 0.323641, 0.311172, 0.297841, 0.283591, 0.268361, 0.252079, 0.234661, 0.216013, 0.196024, 0.174561, 0.151471, 0.126569, 0.0996331, 0.0703902, 0.0385044, 0.00355265, -0.0350073, -0.0778858, -0.126038, -0.180794, -0.244077, -0.318828, -0.409876, -0.525996, -0.685905, -0.943064, -1.66463, -1.14942, -0.786471, -0.591572, -0.457648, -0.355619, -0.273283, -0.204348, -0.145144, -0.0933391, -0.0473603, -0.00609603, 0.0312683, 0.0653477, 0.0966179, 0.125454, 0.152158, 0.176976, 0.20011, 0.221731, 0.241981, 0.260983, 0.278841, 0.295645, 0.311475, 0.3264, 0.34048, 0.353769, 0.366315, 0.378161, 0.389345, 0.399901, 0.40986, 0.419251, 0.428098, 0.436426, 0.444255, 0.451604, 0.458492, 0.464934, 0.470945, 0.47654, 0.48173, 0.486528, 0.490943, 0.494987, 0.498669, 0.501996, 0.504977, 0.507618, 0.509928, 0.511912, 0.513576, 0.514925, 0.515964, 0.516698, 0.51713, 0.517266, 0.517108, 0.51666, 0.515925, 0.514905, 0.513603, 0.512021, 0.510161, 0.508025, 0.505615, 0.502931, 0.499975, 0.496748, 0.49325, 0.489483, 0.485446, 0.48114, 0.476564, 0.471719, 0.466604, 0.461219, 0.455563, 0.449636, 0.443435, 0.436961, 0.430211, 0.423185, 0.415881, 0.408296, 0.400429, 0.392277, 0.383838, 0.37511, 0.366089, 0.356773, 0.347159, 0.337243, 0.32702, 0.316489, 0.305643, 0.29448, 0.282994, 0.27118, 0.259033, 0.246547, 0.233717, 0.220537, 0.206999, 0.193096, 0.178822, 0.164168, 0.149126, 0.133687, 0.117841, 0.101578, 0.0848879, 0.0677587, 0.0501781, 0.0321331, 0.0136094, -0.00540808, -0.0249356, -0.0449908, -0.0655927, -0.0867618, -0.10852, -0.130893, -0.153906, -0.177589, -0.201973, -0.227094, -0.25299, -0.279707, -0.307291, -0.335798, -0.365289, -0.395835, -0.427515, -0.460421, -0.49466, -0.530358, -0.56766, -0.606743, -0.647817, -0.691138, -0.737026, -0.785879, -0.838207, -0.89468, -0.956193, -1.02399, -1.09986, -1.18652, -1.28837, -1.41327, -1.57749, -1.82455, -2.38215, -2.21708, -1.80413, -1.60583, -1.47681, -1.38244, -1.30882, -1.24898, -1.19889, -1.15601, -1.11863, -1.08552, -1.05579, -1.02875, -1.00387, -0.980711, -0.958931, -0.938235, -0.918384, -0.899172, -0.88043, -0.862011, -0.843795, -0.825679, -0.807581, -0.789431, -0.771176, -0.752774, -0.734197, -0.715424, -0.696444, -0.677254, -0.657859, -0.638267, -0.618494, -0.598557, -0.578476, -0.558277, -0.537982, -0.517619, -0.497214, -0.476794, -0.456383, -0.436008, -0.415693, -0.395461, -0.375336, -0.355336, -0.335482, -0.315793, -0.296284, -0.276971, -0.257868, -0.238987, -0.220341, -0.201939, -0.18379, -0.165903, -0.148285, -0.130941, -0.113879, -0.0971018, -0.0806142, -0.0644195, -0.0485207, -0.0329201, -0.0176197, -0.00262106, 0.0120747, 0.0264666, 0.0405541, 0.0543369, 0.0678148, 0.0809879, 0.0938563, 0.10642, 0.118681, 0.130638, 0.142292, 0.153643, 0.164694, 0.175443, 0.185892, 0.196041, 0.205892, 0.215444, 0.224697, 0.233654, 0.242313, 0.250675, 0.25874, 0.266509, 0.273981, 0.281157, 0.288035, 0.294616, 0.300899, 0.306883, 0.312568, 0.317953, 0.323035, 0.327815, 0.33229, 0.336458, 0.340318, 0.343867, 0.347103, 0.350023, 0.352624, 0.354903, 0.356855, 0.358477, 0.359764, 0.360712, 0.361316, 0.361569, 0.361466, 0.361, 0.360164, 0.358949, 0.357348, 0.355351, 0.352949, 0.350129, 0.346881, 0.343192, 0.339047, 0.334431, 0.329328, 0.32372, 0.317585, 0.310903, 0.30365, 0.295798, 0.287318, 0.278178, 0.268341, 0.257767, 0.246411, 0.234221, 0.221141, 0.207104, 0.192038, 0.175855, 0.158459, 0.139734, 0.119547, 0.0977391, 0.0741228, 0.0484704, 0.0205047, -0.0101176, -0.0438283, -0.0811811, -0.122902, -0.16997, -0.22375, -0.286223, -0.36043, -0.451396, -0.568334, -0.731199, -0.998811, -1.85382, -1.13642, -0.793771, -0.603587, -0.471096, -0.369271, -0.286549, -0.216903, -0.156789, -0.103948, -0.056849, -0.0144074, 0.0241733, 0.0594952, 0.0920244, 0.122129, 0.150105, 0.176194, 0.200594, 0.223473, 0.24497, 0.265205, 0.28428, 0.302282, 0.31929, 0.33537, 0.35058, 0.364973, 0.378594, 0.391483, 0.403678, 0.41521, 0.426108, 0.436398, 0.446103, 0.455245, 0.463841, 0.471909, 0.479463, 0.486517, 0.493084, 0.499173, 0.504794, 0.509956, 0.514666, 0.518929, 0.522751, 0.526137, 0.529089, 0.531611, 0.533704, 0.535368, 0.536605, 0.537413, 0.53779, 0.537735, 0.537243, 0.536312, 0.534935, 0.533106, 0.530819, 0.528066, 0.524837, 0.521121, 0.516907, 0.512182, 0.50693, 0.501135, 0.494779, 0.487841, 0.480298, 0.472124, 0.463291, 0.453767, 0.443515, 0.432497, 0.420665, 0.40797, 0.394353, 0.379747, 0.364077, 0.347255, 0.329181, 0.309736, 0.288782, 0.266154, 0.241656, 0.215051, 0.186046, 0.15428, 0.119294, 0.0804978, 0.0371111, -0.0119257, -0.0681038, -0.133618, -0.21189, -0.308703, -0.435037, -0.616086, -0.9364, -1.93996, -0.855155, -0.571183, -0.400266, -0.277539, -0.181723, -0.103144, -0.036575, 0.0211262, 0.0719995, 0.117444, 0.15846, 0.195789, 0.229995, 0.261517, 0.290703, 0.317835, 0.343143, 0.366816, 0.389017, 0.409878, 0.429516, 0.448029, 0.465504, 0.482015, 0.497628, 0.512399, 0.52638, 0.539617, 0.552148, 0.564011, 0.575237, 0.585855, 0.595892, 0.605371, 0.614313, 0.622738, 0.630663, 0.638103, 0.645074, 0.651587, 0.657655, 0.663289, 0.668497, 0.673289, 0.677672, 0.681653, 0.685239, 0.688434, 0.691243, 0.693671, 0.69572, 0.697394, 0.698694, 0.699621, 0.700178, 0.700364, 0.70018, 0.699624, 0.698695, 0.697391, 0.69571, 0.693649, 0.691204, 0.688371, 0.685144, 0.681519, 0.677488, 0.673044, 0.668179, 0.662885, 0.65715, 0.650965, 0.644316, 0.63719, 0.629573, 0.621447, 0.612796, 0.603598, 0.593832, 0.583473, 0.572495, 0.560868, 0.548557, 0.535526, 0.521733, 0.507132, 0.491669, 0.475285, 0.457913, 0.439473, 0.419878, 0.399024, 0.37679, 0.353036, 0.327594, 0.300264, 0.270804, 0.238916, 0.204232, 0.166284, 0.124468, 0.0779865, 0.0257525, -0.0337673, -0.102837, -0.185007, -0.286316, -0.418358, -0.60825, -0.951286, -1.65752, -0.809624, -0.542078, -0.378933, -0.261631, -0.170279, -0.0956856, -0.0328371, 0.0213016, 0.0687084, 0.110744, 0.148385, 0.182355, 0.213206, 0.241366, 0.267178, 0.290916, 0.312805, 0.333031, 0.35175, 0.369093, 0.385173, 0.400083, 0.413907, 0.426717, 0.438573, 0.449531, 0.459636, 0.468932, 0.477454, 0.485234, 0.4923, 0.498677, 0.504385, 0.509445, 0.513871, 0.517678, 0.520877, 0.523477, 0.525487, 0.526911, 0.527753, 0.528017, 0.527702, 0.526807, 0.52533, 0.523265, 0.520606, 0.517346, 0.513474, 0.508977, 0.503841, 0.498049, 0.491581, 0.484415, 0.476526, 0.467883, 0.458453, 0.448199, 0.437076, 0.425035, 0.412019, 0.397964, 0.382795, 0.366423, 0.34875, 0.329657, 0.309004, 0.286627, 0.262326, 0.235861, 0.206937, 0.175184, 0.140136, 0.101188, 0.0575419, 0.00810705, -0.0486558, -0.115022, -0.194564, -0.293369, -0.423146, -0.611388, -0.955584, -1.61678, -0.795954, -0.527973, -0.362906, -0.243262, -0.149391, -0.0721823, -0.00666045, 0.0501926, 0.100346, 0.145155, 0.185594, 0.222385, 0.25608, 0.287109, 0.315814, 0.34247, 0.367305, 0.390506, 0.41223, 0.43261, 0.451762, 0.469781, 0.486753, 0.502752, 0.517843, 0.532081, 0.545518, 0.558197, 0.570159, 0.58144, 0.592069, 0.602078, 0.611489, 0.620328, 0.628614, 0.636367, 0.643603, 0.650337, 0.656583, 0.662354, 0.667661, 0.672513, 0.67692, 0.680888, 0.684426, 0.687539, 0.690233, 0.69251, 0.694377, 0.695834, 0.696884, 0.697529, 0.697768, 0.697603, 0.697033, 0.696055, 0.694669, 0.69287, 0.690656, 0.688021, 0.684961, 0.68147, 0.677541, 0.673165, 0.668334, 0.663038, 0.657265, 0.651004, 0.644239, 0.636955, 0.629136, 0.620762, 0.611812, 0.602262, 0.592087, 0.581258, 0.569741, 0.557501, 0.544497, 0.530683, 0.516008, 0.500413, 0.483831, 0.466187, 0.447393, 0.427347, 0.405932, 0.383008, 0.358412, 0.331948, 0.303377, 0.27241, 0.238683, 0.201742, 0.160997, 0.115671, 0.0647093, 0.00662968, -0.0607486, -0.140822, -0.239322, -0.3671, -0.548966, -0.867387, -1.96616, -0.804374, -0.519403, -0.349508, -0.228348, -0.13433, -0.0576699, 0.00690187, 0.0625527, 0.111335, 0.154654, 0.193516, 0.228664, 0.260664, 0.289956, 0.316888, 0.341743, 0.364749, 0.386098, 0.405948, 0.424434, 0.44167, 0.457755, 0.472774, 0.486799, 0.499895, 0.512119, 0.52352, 0.534142, 0.544023, 0.553198, 0.561698, 0.569549, 0.576775, 0.583398, 0.589438, 0.59491, 0.59983, 0.604212, 0.608066, 0.611402, 0.61423, 0.616556, 0.618386, 0.619724, 0.620575, 0.620941, 0.620822, 0.620219, 0.61913, 0.617555, 0.615488, 0.612927, 0.609864, 0.606293, 0.602206, 0.597593, 0.592443, 0.586742, 0.580477, 0.573629, 0.566181, 0.558111, 0.549396, 0.540008, 0.529917, 0.51909, 0.507488, 0.495068, 0.481781, 0.46757, 0.452374, 0.436119, 0.41872, 0.400082, 0.380091, 0.358614, 0.335495, 0.310545, 0.283538, 0.254197, 0.22218, 0.187053, 0.148263, 0.105081, 0.0565265, 0.00122872, -0.0628036, -0.13863, -0.231308, -0.350136, -0.5153, -0.786677, -1.67521, -0.915491, -0.577988, -0.390371, -0.259881, -0.159843, -0.0788015, -0.0107765, 0.0477533, 0.0990365, 0.144597, 0.185515, 0.222585, 0.256408, 0.287449, 0.316075, 0.342582, 0.367212, 0.390163, 0.411604, 0.431673, 0.450491, 0.468161, 0.484772, 0.5004, 0.515113, 0.528972, 0.542028, 0.554327, 0.565912, 0.57682, 0.587083, 0.596731, 0.605791, 0.614289, 0.622244, 0.629678, 0.636608, 0.643051, 0.649021, 0.654532, 0.659595, 0.664223, 0.668425, 0.67221, 0.675585, 0.678559, 0.681138, 0.683328, 0.685132, 0.686557, 0.687606, 0.688281, 0.688585, 0.68852, 0.688088, 0.68729, 0.686125, 0.684593, 0.682694, 0.680427, 0.677788, 0.674777, 0.671389, 0.667621, 0.66347, 0.658928, 0.653992, 0.648655, 0.642909, 0.636746, 0.630159, 0.623136, 0.615666, 0.607739, 0.59934, 0.590455, 0.581068, 0.571161, 0.560715, 0.549708, 0.538115, 0.525912, 0.513068, 0.499551, 0.485324, 0.470348, 0.454576, 0.437956, 0.420432, 0.401937, 0.382395, 0.361721, 0.339814, 0.316558, 0.291817, 0.26543, 0.237205, 0.206909, 0.174259, 0.138903, 0.100397, 0.0581724, 0.0114784, -0.0406982, -0.0997759, -0.167827, -0.248053, -0.345795, -0.470991, -0.645694, -0.938436, -2.25515, -0.98796, -0.678248, -0.501369, -0.377693, -0.282952, -0.20647, -0.142591, -0.0879576, -0.0404093, 0.0015233, 0.0388864, 0.0724508, 0.102801, 0.130389, 0.155575, 0.178647, 0.199841, 0.219351, 0.237339, 0.253943, 0.26928, 0.283449, 0.296536, 0.308617, 0.319757, 0.330012, 0.339434, 0.348066, 0.355947, 0.363113, 0.369595, 0.375419, 0.380612, 0.385193, 0.389184, 0.392601, 0.39546, 0.397773, 0.399554, 0.400813, 0.401557, 0.401797, 0.401537, 0.400783, 0.399539, 0.397809, 0.395594, 0.392896, 0.389715, 0.38605, 0.381898, 0.377257, 0.372124, 0.366492, 0.360356, 0.353709, 0.346542, 0.338845, 0.330608, 0.321817, 0.312458, 0.302517, 0.291974, 0.28081, 0.269003, 0.256528, 0.243357, 0.229461, 0.214803, 0.199347, 0.183047, 0.165856, 0.147718, 0.12857, 0.10834, 0.0869473, 0.0642964, 0.0402777, 0.014763, -0.0123985, -0.0413864, -0.0724159, -0.105749, -0.141708, -0.180695, -0.223225, -0.269965, -0.321807, -0.37998, -0.446242, -0.523243, -0.615246, -0.729786, -0.882215, -1.11259, -1.61269, -1.56742, -1.11248, -0.900116, -0.761851, -0.660217, -0.580576, -0.515675, -0.461386, -0.415139, -0.375223, -0.340445, -0.309942, -0.283067, -0.259329, -0.238343, -0.219805, -0.203473, -0.189149, -0.176673, -0.165916, -0.15677, -0.149149, -0.142983, -0.138217, -0.134808, -0.132727, -0.131952, -0.132474, -0.134292, -0.137417, -0.141869, -0.147677, -0.154885, -0.163547, -0.173732, -0.185528, -0.19904, -0.214398, -0.231762, -0.251327, -0.273337, -0.298093, -0.325979, -0.357484, -0.393251, -0.43414, -0.481337, -0.53654, -0.602302, -0.682714, -0.784953, -0.923459, -1.13499, -1.58202, -1.65823, -1.14822, -0.916849, -0.764622, -0.650674, -0.55944, -0.483303, -0.417962, -0.360748, -0.309891, -0.264154, -0.222641, -0.184681, -0.149759, -0.11747, -0.0874901, -0.059557, -0.0334546, -0.00900289, 0.0139494, 0.0355309, 0.0558514, 0.0750059, 0.0930765, 0.110135, 0.126244, 0.14146, 0.155831, 0.1694, 0.182207, 0.194286, 0.205668, 0.21638, 0.226448, 0.235893, 0.244735, 0.252992, 0.260681, 0.267814, 0.274406, 0.280466, 0.286005, 0.291032, 0.295554, 0.299576, 0.303104, 0.306143, 0.308694, 0.310761, 0.312343, 0.313442, 0.314056, 0.314183, 0.313821, 0.312965, 0.311611, 0.309751, 0.307379, 0.304486, 0.301063, 0.297096, 0.292575, 0.287483, 0.281804, 0.275519, 0.268608, 0.261046, 0.252809, 0.243865, 0.234181, 0.223721, 0.212442, 0.200296, 0.187229, 0.173179, 0.158077, 0.14184, 0.124375, 0.105573, 0.0853071, 0.0634259, 0.0397501, 0.0140636, -0.0138966, -0.0444554, -0.07802, -0.11511, -0.156404, -0.20281, -0.255584, -0.316527, -0.388371, -0.475532, -0.585883, -0.735675, -0.968384, -1.5107, -1.33521, -0.908092, -0.69655, -0.554749, -0.448005, -0.362461, -0.291163, -0.230122, -0.176835, -0.129631, -0.0873343, -0.0490913, -0.0142594, 0.0176559, 0.0470436, 0.0742146, 0.0994218, 0.122873, 0.144742, 0.165174, 0.184293, 0.202204, 0.218998, 0.234754, 0.24954, 0.263417, 0.276437, 0.288645, 0.300085, 0.31079, 0.320795, 0.330127, 0.338811, 0.346871, 0.354327, 0.361195, 0.367492, 0.373232, 0.378426, 0.383085, 0.387217, 0.390831, 0.393932, 0.396524, 0.398611, 0.400197, 0.40128, 0.401862, 0.401941, 0.401514, 0.400577, 0.399126, 0.397154, 0.394653, 0.391613, 0.388024, 0.383872, 0.379145, 0.373824, 0.367891, 0.361325, 0.354101, 0.346194, 0.337572, 0.328201, 0.318043, 0.307052, 0.29518, 0.282369, 0.268554, 0.253661, 0.237604, 0.220283, 0.201581, 0.18136, 0.159459, 0.135683, 0.109794, 0.081504, 0.050453, 0.0161859, -0.0218842, -0.0645319, -0.112809, -0.168195, -0.232866, -0.310209, -0.405937, -0.53087, -0.709701, -1.02432, -2.15057, -0.959932, -0.671342, -0.498404, -0.374342, -0.277471, -0.197975, -0.130568, -0.0720766, -0.0204423, 0.0257441, 0.0674908, 0.105544, 0.14047, 0.172713, 0.202621, 0.230479, 0.256518, 0.28093, 0.303875, 0.325491, 0.345893, 0.365182, 0.383443, 0.400754, 0.417179, 0.432778, 0.447601, 0.461696, 0.475103, 0.487859, 0.499997, 0.511547, 0.522536, 0.532988, 0.542926, 0.552371, 0.56134, 0.56985, 0.577917, 0.585556, 0.592778, 0.599596, 0.606021, 0.612062, 0.61773, 0.623031, 0.627975, 0.632568, 0.636816, 0.640726, 0.644302, 0.64755, 0.650473, 0.653076, 0.655362, 0.657334, 0.658995, 0.660346, 0.66139, 0.662128, 0.662561, 0.66269, 0.662515, 0.662037, 0.661254, 0.660166, 0.658773, 0.657072, 0.655063, 0.652742, 0.650107, 0.647156, 0.643884, 0.640289, 0.636365, 0.632108, 0.627512, 0.622572, 0.617282, 0.611633, 0.605619, 0.599231, 0.59246, 0.585296, 0.577727, 0.569741, 0.561326, 0.552468, 0.543149, 0.533354, 0.523064, 0.512258, 0.500912, 0.489003, 0.476503, 0.463381, 0.449603, 0.435132, 0.419925, 0.403934, 0.387108, 0.369386, 0.350698, 0.330968, 0.310105, 0.288005, 0.264548, 0.239591, 0.212967, 0.184473, 0.153867, 0.120849, 0.0850466, 0.04599, 0.00307045, -0.0445173, -0.0978705, -0.158539, -0.228817, -0.312306, -0.415153, -0.549212, -0.742436, -1.09502, -1.7127, -0.927593, -0.665817, -0.505199, -0.389487, -0.299315, -0.225674, -0.163633, -0.110198, -0.0634145, -0.0219352, 0.0152076, 0.0487324, 0.0791869, 0.106999, 0.132507, 0.155987, 0.177662, 0.197719, 0.216314, 0.233579, 0.249626, 0.264552, 0.27844, 0.291362, 0.303383, 0.314557, 0.324934, 0.334556, 0.343464, 0.351689, 0.359264, 0.366214, 0.372565, 0.378337, 0.38355, 0.388221, 0.392366, 0.395997, 0.399127, 0.401766, 0.403924, 0.405607, 0.406823, 0.407577, 0.407874, 0.407716, 0.407106, 0.406045, 0.404533, 0.40257, 0.400154, 0.397282, 0.39395, 0.390153, 0.385885, 0.38114, 0.375907, 0.370179, 0.363942, 0.357186, 0.349894, 0.342051, 0.333639, 0.324637, 0.315022, 0.304767, 0.293845, 0.282223, 0.269864, 0.256726, 0.242764, 0.227924, 0.212147, 0.195363, 0.177494, 0.15845, 0.138124, 0.116393, 0.0931104, 0.0681041, 0.0411655, 0.0120418, -0.0195784, -0.0540842, -0.0919707, -0.133881, -0.180671, -0.233517, -0.294095, -0.364913, -0.449973, -0.556255, -0.697684, -0.909179, -1.33841, -1.50184, -0.963499, -0.730738, -0.580379, -0.469269, -0.381241, -0.308451, -0.246496, -0.192653, -0.145123, -0.102651, -0.0643317, -0.0294859, 0.00240638, 0.0317527, 0.0588786, 0.084048, 0.107478, 0.129349, 0.149813, 0.168998, 0.187016, 0.203961, 0.219916, 0.234952, 0.249134, 0.262517, 0.27515, 0.287079, 0.298342, 0.308974, 0.319008, 0.328473, 0.337393, 0.345794, 0.353696, 0.36112, 0.368082, 0.374598, 0.380685, 0.386356, 0.391622, 0.396495, 0.400987, 0.405105, 0.40886, 0.412259, 0.41531, 0.418019, 0.420392, 0.422434, 0.424152, 0.425548, 0.426627, 0.427394, 0.427849, 0.427997, 0.42784, 0.427379, 0.426615, 0.425551, 0.424186, 0.422521, 0.420556, 0.41829, 0.415723, 0.412852, 0.409678, 0.406198, 0.402408, 0.398308, 0.393892, 0.389159, 0.384102, 0.378719, 0.373003, 0.366949, 0.36055, 0.3538, 0.34669, 0.339213, 0.331359, 0.323119, 0.31448, 0.305431, 0.29596, 0.286051, 0.275689, 0.264856, 0.253535, 0.241704, 0.22934, 0.216419, 0.202911, 0.188788, 0.174014, 0.158552, 0.142359, 0.125388, 0.107584, 0.0888864, 0.0692271, 0.0485267, 0.0266942, 0.00362483, -0.020804, -0.0467363, -0.0743425, -0.103827, -0.135437, -0.169477, -0.206326, -0.246463, -0.290509, -0.33929, -0.39393, -0.456025, -0.527944, -0.613432, -0.718924, -0.856986, -1.05789, -1.43628, -1.86441, -1.19862, -0.949848, -0.794629, -0.682096, -0.594151, -0.522242, -0.461641, -0.409458, -0.363799, -0.323353, -0.287175, -0.254564, -0.224982, -0.19801, -0.173316, -0.150629, -0.12973, -0.110433, -0.0925877, -0.0760628, -0.0607482, -0.0465493, -0.033384, -0.0211816, -0.00988, 0.000574922, 0.0102308, 0.0191296, 0.0273082, 0.0347994, 0.0416322, 0.047832, 0.0534216, 0.0584207, 0.062847, 0.0667156, 0.0700399, 0.0728313, 0.0750995, 0.0768525, 0.0780968, 0.0788375, 0.0790781, 0.0788209, 0.0780667, 0.076815, 0.0750639, 0.0728102, 0.0700492, 0.0667748, 0.0629792, 0.0586532, 0.0537858, 0.0483641, 0.0423733, 0.0357964, 0.028614, 0.0208041, 0.0123418, 0.00319881, -0.00665676, -0.017261, -0.0286549, -0.040885, -0.054004, -0.0680723, -0.0831593, -0.0993446, -0.11672, -0.135394, -0.155492, -0.177162, -0.200581, -0.225964, -0.253571, -0.283721, -0.316816, -0.353371, -0.394054, -0.439758, -0.491718, -0.551704, -0.622387, -0.708076, -0.816405, -0.962998, -1.18894, -1.69603, -1.60499, -1.154, -0.93641, -0.791381, -0.68235, -0.594927, -0.521948, -0.459325, -0.404504, -0.355779, -0.311958, -0.272172, -0.23577, -0.20225, -0.171218, -0.142359, -0.115416, -0.0901787, -0.0664706, -0.0441439, -0.023073, -0.00315004, 0.0157178, 0.0336113, 0.0506009, 0.0667486, 0.082109, 0.0967305, 0.110656, 0.123925, 0.13657, 0.148624, 0.160115, 0.171066, 0.181502, 0.191442, 0.200906, 0.209911, 0.218472, 0.226603, 0.234318, 0.241626, 0.24854, 0.255069, 0.261222, 0.267005, 0.272427, 0.277494, 0.282211, 0.286583, 0.290615, 0.294311, 0.297672, 0.300703, 0.303405, 0.30578, 0.307829, 0.309552, 0.310949, 0.312021, 0.312765, 0.313181, 0.313267, 0.313019, 0.312435, 0.311512, 0.310244, 0.308628, 0.306657, 0.304325, 0.301626, 0.298551, 0.295093, 0.29124, 0.286984, 0.282313, 0.277213, 0.271671, 0.265672, 0.259198, 0.252231, 0.24475, 0.236732, 0.228153, 0.218984, 0.209195, 0.198752, 0.187614, 0.17574, 0.163082, 0.149583, 0.135183, 0.119811, 0.103385, 0.0858131, 0.0669861, 0.0467781, 0.02504, 0.00159487, -0.0237699, -0.0513126, -0.0813517, -0.114285, -0.150621, -0.191018, -0.236357, -0.287852, -0.347238, -0.417125, -0.501704, -0.608361, -0.75206, -0.971445, -1.44525, -1.44685, -0.966605, -0.742706, -0.59477, -0.483965, -0.39528, -0.321308, -0.257849, -0.202288, -0.152887, -0.10843, -0.0680358, -0.0310432, 0.00305595, 0.0346604, 0.064089, 0.0916006, 0.117408, 0.14169, 0.164594, 0.186248, 0.20676, 0.226224, 0.244721, 0.262323, 0.279091, 0.295081, 0.310342, 0.324918, 0.338847, 0.352164, 0.364901, 0.377086, 0.388745, 0.399901, 0.410576, 0.420788, 0.430556, 0.439895, 0.448821, 0.457346, 0.465484, 0.473245, 0.48064, 0.487678, 0.49437, 0.500721, 0.50674, 0.512434, 0.517809, 0.52287, 0.527623, 0.532072, 0.536221, 0.540075, 0.543636, 0.546908, 0.549893, 0.552593, 0.555011, 0.557148, 0.559004, 0.560582, 0.561881, 0.562903, 0.563646, 0.56411, 0.564295, 0.5642, 0.563823, 0.563163, 0.562217, 0.560984, 0.559461, 0.557644, 0.555531, 0.553116, 0.550397, 0.547368, 0.544023, 0.540358, 0.536366, 0.53204, 0.527373, 0.522357, 0.516982, 0.511239, 0.505119, 0.498608, 0.491696, 0.484368, 0.476611, 0.468407, 0.459739, 0.450589, 0.440936, 0.430755, 0.420022, 0.40871, 0.396786, 0.384217, 0.370964, 0.356985, 0.342231, 0.326649, 0.310179, 0.292749, 0.274283, 0.254687, 0.233858, 0.211673, 0.187986, 0.162628, 0.135394, 0.106036, 0.0742495, 0.0396548, 0.00177125, -0.0400239, -0.0865565, -0.138955, -0.198821, -0.26853, -0.351842, -0.455225, -0.59132, -0.790654, -1.16955, -1.57772, -0.919575, -0.669679, -0.512585, -0.39795, -0.307801, -0.23363, -0.170731, -0.116225, -0.068221, -0.0254121, 0.0131439, 0.0481483, 0.0801372, 0.109529, 0.136659, 0.161794, 0.185158, 0.206932, 0.227273, 0.246308, 0.264151, 0.280897, 0.296628, 0.311416, 0.325325, 0.33841, 0.35072, 0.362299, 0.373184, 0.383412, 0.393011, 0.40201, 0.410433, 0.418303, 0.42564, 0.432461, 0.438782, 0.444618, 0.449982, 0.454885, 0.459338, 0.463349, 0.466927, 0.470078, 0.472809, 0.475125, 0.477029, 0.478525, 0.479616, 0.480303, 0.480587, 0.480469, 0.479948, 0.479022, 0.477689, 0.475947, 0.473791, 0.471216, 0.468218, 0.464789, 0.460923, 0.45661, 0.45184, 0.446604, 0.440888, 0.434679, 0.427961, 0.420718, 0.41293, 0.404577, 0.395634, 0.386077, 0.375875, 0.364995, 0.353403, 0.341055, 0.327907, 0.313905, 0.298991, 0.283097, 0.266145, 0.248046, 0.228697, 0.207977, 0.185744, 0.161829, 0.136031, 0.108105, 0.0777495, 0.0445905, 0.00815291, -0.0321777, -0.0772158, -0.128073, -0.186324, -0.254302, -0.335684, -0.436774, -0.569808, -0.763977, -1.12705, -1.63211, -0.915011, -0.657292, -0.496434, -0.379234, -0.287034, -0.21108, -0.146551, -0.0905113, -0.041037, 0.00319986, 0.0431554, 0.0795403, 0.112898, 0.143652, 0.172141, 0.198637, 0.223365, 0.246511, 0.268231, 0.288657, 0.307903, 0.326066, 0.343231, 0.359472, 0.374853, 0.389431, 0.403258, 0.416378, 0.428832, 0.440656, 0.451882, 0.462539, 0.472656, 0.482255, 0.491358, 0.499987, 0.508158, 0.515889, 0.523195, 0.530091, 0.536588, 0.5427, 0.548437, 0.55381, 0.558827, 0.563497, 0.567828, 0.571827, 0.575502, 0.578858, 0.581901, 0.584636, 0.587068, 0.589201, 0.59104, 0.592587, 0.593847, 0.594821, 0.595513, 0.595925, 0.596059, 0.595915, 0.595497, 0.594805, 0.593839, 0.592601, 0.59109, 0.589307, 0.587252, 0.584923, 0.582321, 0.579444, 0.576291, 0.57286, 0.56915, 0.565158, 0.560883, 0.556321, 0.551469, 0.546324, 0.540883, 0.535141, 0.529093, 0.522736, 0.516063, 0.509069 +}; #endif /* MULTIPATH_V3_M6_H_ */ diff --git a/src/lte/model/JakesTraces/multipath_v3_M8.h b/src/lte/model/JakesTraces/multipath_v3_M8.h index 9669703d0..9acb191fc 100644 --- a/src/lte/model/JakesTraces/multipath_v3_M8.h +++ b/src/lte/model/JakesTraces/multipath_v3_M8.h @@ -24,8 +24,8 @@ #define MULTIPATH_V3_M8_H_ static double multipath_M8_v_3[3000] = { - 0.884395, 0.883757, 0.882693, 0.881201, 0.879278, 0.876919, 0.874121, 0.870877, 0.867181, 0.863025, 0.8584, 0.853297, 0.847703, 0.841607, 0.834994, 0.827847, 0.82015, 0.811883, 0.803023, 0.793547, 0.783425, 0.772629, 0.761124, 0.74887, 0.735826, 0.721941, 0.707161, 0.691423, 0.674655, 0.656775, 0.637686, 0.617278, 0.595421, 0.571962, 0.546717, 0.519467, 0.489943, 0.457813, 0.42266, 0.383952, 0.340992, 0.292844, 0.238213, 0.175224, 0.101032, 0.0109893, -0.103278, -0.259372, -0.506126, -1.13684, -0.780123, -0.392947, -0.19183, -0.055209, 0.0482304, 0.131364, 0.200755, 0.260207, 0.312122, 0.358114, 0.39932, 0.436573, 0.470498, 0.501579, 0.530197, 0.556657, 0.581208, 0.604055, 0.62537, 0.645295, 0.663954, 0.681452, 0.697879, 0.713315, 0.727828, 0.741477, 0.754318, 0.766397, 0.777755, 0.788431, 0.798457, 0.807865, 0.816681, 0.824929, 0.832631, 0.839809, 0.846478, 0.852656, 0.858358, 0.863596, 0.868383, 0.87273, 0.876647, 0.880142, 0.883223, 0.885898, 0.888172, 0.890051, 0.891539, 0.892642, 0.893361, 0.8937, 0.893662, 0.893246, 0.892455, 0.891288, 0.889746, 0.887828, 0.885531, 0.882854, 0.879795, 0.87635, 0.872514, 0.868284, 0.863655, 0.858619, 0.85317, 0.847301, 0.841002, 0.834265, 0.827078, 0.81943, 0.811308, 0.802698, 0.793583, 0.783946, 0.773768, 0.763028, 0.751703, 0.739765, 0.727186, 0.713935, 0.699975, 0.685265, 0.669762, 0.653415, 0.636165, 0.617949, 0.598692, 0.578309, 0.556702, 0.533756, 0.509338, 0.48329, 0.455423, 0.42551, 0.393274, 0.358373, 0.320373, 0.278723, 0.232696, 0.181314, 0.123216, 0.0564223, -0.0221038, -0.117374, -0.238579, -0.405597, -0.67693, -1.52699, -0.827116, -0.487781, -0.301747, -0.173603, -0.0762108, 0.00202704, 0.0671513, 0.122711, 0.17097, 0.21346, 0.251265, 0.285183, 0.315816, 0.343628, 0.368988, 0.39219, 0.413474, 0.433039, 0.451049, 0.467644, 0.482942, 0.497042, 0.510033, 0.521988, 0.532973, 0.543044, 0.552252, 0.560639, 0.568245, 0.575103, 0.581242, 0.586689, 0.591466, 0.595594, 0.599089, 0.601968, 0.604242, 0.605923, 0.607019, 0.607538, 0.607485, 0.606864, 0.605677, 0.603925, 0.601607, 0.59872, 0.59526, 0.591222, 0.586598, 0.581378, 0.575552, 0.569107, 0.562027, 0.554295, 0.545889, 0.536788, 0.526964, 0.516388, 0.505026, 0.492839, 0.479784, 0.46581, 0.45086, 0.43487, 0.417764, 0.399455, 0.379842, 0.358809, 0.336215, 0.311895, 0.285654, 0.257249, 0.226388, 0.192705, 0.155735, 0.11488, 0.0693486, 0.0180617, -0.0405009, -0.108583, -0.189697, -0.28981, -0.42034, -0.607853, -0.944483, -1.71896, -0.819988, -0.548238, -0.383195, -0.264647, -0.172331, -0.0969221, -0.0333507, 0.021449, 0.0694724, 0.112091, 0.150289, 0.184795, 0.216164, 0.244829, 0.271135, 0.295357, 0.317723, 0.33842, 0.357607, 0.375416, 0.39196, 0.407336, 0.421629, 0.43491, 0.447243, 0.458684, 0.469282, 0.47908, 0.488115, 0.496423, 0.504032, 0.510969, 0.517257, 0.522918, 0.52797, 0.532428, 0.536308, 0.539621, 0.542379, 0.544589, 0.54626, 0.547398, 0.548008, 0.548092, 0.547653, 0.546693, 0.54521, 0.543203, 0.540669, 0.537604, 0.534002, 0.529857, 0.52516, 0.5199, 0.514068, 0.507648, 0.500626, 0.492984, 0.484702, 0.475759, 0.466128, 0.455782, 0.444689, 0.432812, 0.42011, 0.406537, 0.392041, 0.376561, 0.360029, 0.342366, 0.32348, 0.303267, 0.281602, 0.258339, 0.233303, 0.206287, 0.177035, 0.145235, 0.110495, 0.0723182, 0.0300569, -0.0171509, -0.0704896, -0.131649, -0.203162, -0.289072, -0.396452, -0.539462, -0.753844, -1.19375, -1.32009, -0.798067, -0.568824, -0.420467, -0.310907, -0.224258, -0.152782, -0.0921257, -0.0395928, 0.00660122, 0.0476993, 0.0846017, 0.117981, 0.148354, 0.176124, 0.201613, 0.225084, 0.24675, 0.26679, 0.285352, 0.302565, 0.318534, 0.333354, 0.347104, 0.359854, 0.371664, 0.382587, 0.39267, 0.401954, 0.410476, 0.418267, 0.425356, 0.431767, 0.437523, 0.442642, 0.447143, 0.451039, 0.454343, 0.457066, 0.459218, 0.460805, 0.461833, 0.462308, 0.462231, 0.461605, 0.460428, 0.458701, 0.45642, 0.45358, 0.450177, 0.446202, 0.441647, 0.436502, 0.430753, 0.424385, 0.417383, 0.409727, 0.401396, 0.392364, 0.382603, 0.372083, 0.360767, 0.348614, 0.335579, 0.321609, 0.306644, 0.290615, 0.273444, 0.255039, 0.235295, 0.214085, 0.191265, 0.166657, 0.140053, 0.111196, 0.0797702, 0.045381, 0.00752542, -0.0344511, -0.0814218, -0.134588, -0.195667, -0.267238, -0.353435, -0.46152, -0.60614, -0.824785, -1.28606, -1.33679, -0.842887, -0.618451, -0.471867, -0.363093, -0.276787, -0.205419, -0.14473, -0.0920738, -0.0456954, -0.0043694, 0.0327928, 0.0664562, 0.0971315, 0.125219, 0.151038, 0.174849, 0.196863, 0.217258, 0.236182, 0.253762, 0.270104, 0.285301, 0.299432, 0.312567, 0.324767, 0.336084, 0.346565, 0.356252, 0.365179, 0.37338, 0.380884, 0.387714, 0.393893, 0.399442, 0.404376, 0.408712, 0.412461, 0.415636, 0.418246, 0.420298, 0.4218, 0.422756, 0.423168, 0.423041, 0.422374, 0.421166, 0.419416, 0.417121, 0.414275, 0.410873, 0.406906, 0.402366, 0.397241, 0.391518, 0.385183, 0.378219, 0.370607, 0.362324, 0.353345, 0.343643, 0.333186, 0.321937, 0.309857, 0.2969, 0.283012, 0.268134, 0.252198, 0.235124, 0.216823, 0.197188, 0.176095, 0.153397, 0.128922, 0.102459, 0.0737539, 0.0424935, 0.00828566, -0.0293687, -0.0711184, -0.117828, -0.170687, -0.231391, -0.302484, -0.388035, -0.495161, -0.638146, -0.853166, -1.29788, -1.40436, -0.889433, -0.661013, -0.512687, -0.402902, -0.315914, -0.244039, -0.182946, -0.129953, -0.0832827, -0.0416963, -0.00429661, 0.0295875, 0.0604707, 0.0887564, 0.114766, 0.138762, 0.160957, 0.181529, 0.200628, 0.218381, 0.234895, 0.250264, 0.264567, 0.277874, 0.290246, 0.301736, 0.312392, 0.322254, 0.331359, 0.33974, 0.347426, 0.354441, 0.360808, 0.366548, 0.371676, 0.37621, 0.380162, 0.383543, 0.386364, 0.388633, 0.390357, 0.39154, 0.392187, 0.3923, 0.391881, 0.39093, 0.389445, 0.387423, 0.384862, 0.381754, 0.378094, 0.373874, 0.369083, 0.363709, 0.35774, 0.35116, 0.343951, 0.336094, 0.327566, 0.318342, 0.308392, 0.297684, 0.286183, 0.273846, 0.260625, 0.246469, 0.231316, 0.215096, 0.197728, 0.17912, 0.159164, 0.137734, 0.114678, 0.0898201, 0.0629447, 0.0337909, 0.00203634, -0.0327229, -0.0710022, -0.113473, -0.161036, -0.214929, -0.276934, -0.34974, -0.437688, -0.548483, -0.697933, -0.927821, -1.4469, -1.33296, -0.891471, -0.677855, -0.53599, -0.429888, -0.34532, -0.275188, -0.215433, -0.163518, -0.11775, -0.0769405, -0.0402272, -0.00696234, 0.0233526, 0.0511089, 0.0766195, 0.100138, 0.121875, 0.142001, 0.160665, 0.177989, 0.194078, 0.209024, 0.222905, 0.235788, 0.247733, 0.258792, 0.26901, 0.278428, 0.287081, 0.295001, 0.302214, 0.308744, 0.314614, 0.319841, 0.324442, 0.328431, 0.331819, 0.334617, 0.336833, 0.338473, 0.339542, 0.340045, 0.339981, 0.339353, 0.338158, 0.336394, 0.334056, 0.331138, 0.327634, 0.323533, 0.318825, 0.313495, 0.30753, 0.30091, 0.293617, 0.285626, 0.276911, 0.267443, 0.257187, 0.246106, 0.234155, 0.221285, 0.207438, 0.192551, 0.176548, 0.159342, 0.140834, 0.120905, 0.0994184, 0.0762087, 0.0510794, 0.023792, -0.00594627, -0.0384997, -0.0743297, -0.114032, -0.158393, -0.208484, -0.265816, -0.332613, -0.412355, -0.510941, -0.639627, -0.824472, -1.15476, -2.00138, -1.04541, -0.769068, -0.601668, -0.481374, -0.387564, -0.31079, -0.245924, -0.189874, -0.140628, -0.0968049, -0.0574141, -0.0217221, 0.0108294, 0.0406759, 0.0681627, 0.0935688, 0.117122, 0.139013, 0.159398, 0.178412, 0.196169, 0.212767, 0.228291, 0.242815, 0.256402, 0.269109, 0.280987, 0.292079, 0.302424, 0.312058, 0.321011, 0.329311, 0.336983, 0.344049, 0.350528, 0.35644, 0.361798, 0.366618, 0.370912, 0.374691, 0.377965, 0.380741, 0.383028, 0.384832, 0.386157, 0.387007, 0.387387, 0.387297, 0.386739, 0.385713, 0.384219, 0.382254, 0.379817, 0.376904, 0.373511, 0.369631, 0.365258, 0.360386, 0.355004, 0.349102, 0.34267, 0.335694, 0.328159, 0.32005, 0.311348, 0.302032, 0.292081, 0.281468, 0.270165, 0.25814, 0.245359, 0.231781, 0.217361, 0.202049, 0.185788, 0.168511, 0.150145, 0.130604, 0.109787, 0.0875811, 0.0638492, 0.0384315, 0.0111369, -0.0182654, -0.0500574, -0.0845886, -0.122299, -0.163754, -0.209697, -0.26113, -0.319456, -0.38672, -0.466074, -0.562759, -0.686484, -0.858629, -1.14452, -2.25343, -1.22344, -0.905535, -0.726103, -0.601258, -0.505929, -0.42918, -0.365247, -0.310718, -0.263406, -0.221826, -0.184922, -0.151919, -0.122231, -0.0954044, -0.0710806, -0.0489732, -0.0288492, -0.0105171, 0.0061817, 0.0213801, 0.0351899, 0.0477055, 0.0590071, 0.069163, 0.0782311, 0.0862607, 0.0932935, 0.0993644, 0.104502, 0.108731, 0.112069, 0.11453, 0.116124, 0.116857, 0.11673, 0.11574, 0.113881, 0.111142, 0.107507, 0.102956, 0.0974653, 0.0910027, 0.0835317, 0.0750085, 0.065381, 0.0545881, 0.0425579, 0.0292058, 0.0144317, -0.00188277, -0.0198787, -0.0397252, -0.0616272, -0.0858348, -0.112657, -0.142484, -0.175809, -0.213279, -0.255756, -0.304427, -0.360986, -0.427978, -0.509474, -0.612602, -0.751673, -0.962975, -1.40508, -1.50263, -0.985658, -0.753631, -0.601508, -0.487871, -0.397008, -0.321247, -0.256262, -0.199372, -0.148799, -0.103303, -0.0619859, -0.0241751, 0.0106461, 0.0428829, 0.0728592, 0.100838, 0.127036, 0.151632, 0.174779, 0.196606, 0.217222, 0.236724, 0.255193, 0.272702, 0.289315, 0.305088, 0.320069, 0.334305, 0.347835, 0.360693, 0.372913, 0.384523, 0.39555, 0.406016, 0.415944, 0.425353, 0.434262, 0.442686, 0.45064, 0.458139, 0.465194, 0.471817, 0.478018, 0.483808, 0.489193, 0.494183, 0.498785, 0.503005, 0.506848, 0.510321, 0.513428, 0.516173, 0.518559, 0.520591, 0.52227, 0.523598, 0.524579, 0.525212, 0.525498, 0.525439, 0.525034, 0.524282, 0.523184, 0.521737, 0.51994, 0.51779, 0.515286, 0.512424, 0.509199, 0.505609, 0.501649, 0.497312, 0.492594, 0.487487, 0.481985, 0.476079, 0.469761, 0.463021, 0.455849, 0.448232, 0.440159, 0.431615, 0.422586, 0.413054, 0.403001, 0.392407, 0.381251, 0.369506, 0.357148, 0.344145, 0.330465, 0.316071, 0.300921, 0.28497, 0.268165, 0.250448, 0.231753, 0.212002, 0.19111, 0.168975, 0.14548, 0.120489, 0.0938377, 0.065334, 0.0347435, 0.00178053, -0.0339092, -0.0727726, -0.115384, -0.1625, -0.215142, -0.274745, -0.343403, -0.424361, -0.523041, -0.649574, -0.826581, -1.12534, -2.76493, -1.15193, -0.84895, -0.674581, -0.552402, -0.458771, -0.383215, -0.320169, -0.266317, -0.219525, -0.178339, -0.141722, -0.108911, -0.0793271, -0.0525205, -0.028136, -0.00588811, 0.0144564, 0.0330897, 0.0501723, 0.0658393, 0.0802051, 0.0933678, 0.105411, 0.116409, 0.126423, 0.135508, 0.143713, 0.151079, 0.157643, 0.163437, 0.168489, 0.172823, 0.17646, 0.17942, 0.181716, 0.183362, 0.18437, 0.184748, 0.184502, 0.183637, 0.182156, 0.18006, 0.177348, 0.174018, 0.170065, 0.165482, 0.160261, 0.154391, 0.14786, 0.140652, 0.13275, 0.124133, 0.114778, 0.104657, 0.0937391, 0.0819897, 0.0693683, 0.055829, 0.0413193, 0.025779, 0.00913918, -0.00868, -0.0277709, -0.0482414, -0.070218, -0.0938502, -0.119317, -0.146832, -0.176659, -0.209122, -0.244625, -0.283689, -0.326989, -0.375432, -0.430269, -0.4933, -0.567245, -0.656509, -0.768931, -0.920676, -1.15489, -1.69469, -1.53311, -1.10551, -0.89578, -0.756196, -0.651835, -0.568772, -0.500026, -0.441595, -0.390971, -0.346477, -0.306939, -0.271499, -0.239515, -0.210492, -0.184042, -0.159854, -0.137676, -0.117299, -0.0985521, -0.0812898, -0.0653896, -0.0507468, -0.0372715, -0.0248861, -0.0135232, -0.00312432, 0.00636197, 0.0149806, 0.022771, 0.0297679, 0.0360018, 0.0414995, 0.0462845, 0.0503774, 0.0537961, 0.056556, 0.0586704, 0.0601505, 0.0610055, 0.061243, 0.0608686, 0.0598865, 0.0582993, 0.0561079, 0.0533118, 0.0499089, 0.0458957, 0.0412669, 0.0360159, 0.0301342, 0.0236116, 0.0164363, 0.00859413, 6.91624e-05, -0.00915696, -0.0191051, -0.0297987, -0.0412644, -0.0535321, -0.0666357, -0.080613, -0.0955071, -0.111366, -0.128246, -0.146208, -0.165324, -0.185676, -0.207358, -0.230479, -0.255166, -0.28157, -0.309867, -0.34027, -0.373037, -0.408485, -0.447008, -0.489106, -0.535429, -0.586836, -0.644509, -0.710125, -0.786191, -0.876698, -0.988591, -1.13569, -1.35252, -1.7836, -1.97371, -1.43444, -1.20807, -1.06531, -0.962453, -0.883225, -0.819752, -0.767635, -0.724173, -0.687594, -0.656684, -0.630578, -0.608648, -0.590433, -0.575592, -0.563875, -0.555106, -0.54917, -0.546006, -0.545601, -0.547991, -0.553264, -0.561565, -0.573104, -0.588175, -0.607174, -0.630644, -0.659319, -0.694228, -0.736839, -0.789339, -0.855172, -0.940197, -1.05562, -1.22741, -1.54441, -2.39025, -1.41334, -1.12473, -0.945621, -0.813925, -0.70895, -0.621216, -0.545578, -0.478926, -0.419237, -0.365117, -0.315568, -0.269845, -0.227382, -0.187735, -0.150551, -0.115544, -0.0824783, -0.0511592, -0.0214214, 0.00687498, 0.0338499, 0.059607, 0.0842365, 0.107817, 0.130419, 0.152104, 0.172926, 0.192934, 0.212173, 0.230681, 0.248495, 0.265648, 0.282168, 0.298082, 0.313415, 0.32819, 0.342426, 0.356144, 0.369359, 0.382089, 0.394348, 0.40615, 0.417506, 0.42843, 0.438932, 0.449021, 0.458707, 0.467998, 0.476902, 0.485427, 0.493579, 0.501364, 0.508787, 0.515855, 0.52257, 0.528939, 0.534964, 0.540648, 0.545996, 0.551009, 0.555689, 0.560038, 0.564059, 0.567751, 0.571116, 0.574154, 0.576865, 0.579249, 0.581305, 0.583032, 0.584429, 0.585494, 0.586224, 0.586616, 0.586669, 0.586378, 0.585739, 0.584748, 0.5834, 0.581689, 0.579609, 0.577153, 0.574313, 0.571082, 0.56745, 0.563407, 0.558943, 0.554045, 0.548701, 0.542895, 0.536614, 0.529838, 0.522551, 0.514729, 0.506352, 0.497393, 0.487825, 0.477617, 0.466733, 0.455137, 0.442784, 0.429626, 0.415609, 0.400671, 0.384742, 0.367742, 0.349576, 0.330139, 0.309304, 0.286924, 0.262823, 0.23679, 0.208571, 0.177849, 0.144231, 0.107216, 0.0661541, 0.0201767, -0.031908, -0.0918024, -0.162059, -0.246762, -0.353064, -0.495334, -0.710059, -1.15741, -1.24924, -0.738218, -0.509412, -0.360105, -0.249112, -0.160786, -0.087481, -0.0248831, 0.0296815, 0.0779856, 0.121265, 0.160415, 0.196105, 0.228852, 0.259056, 0.287042, 0.313069, 0.337354, 0.360073, 0.381379, 0.401398, 0.420239, 0.437996, 0.454751, 0.470575, 0.48553, 0.499671, 0.513047, 0.525701, 0.537672, 0.548994, 0.559698, 0.569812, 0.579362, 0.588369, 0.596855, 0.604838, 0.612334, 0.61936, 0.625928, 0.632052, 0.637743, 0.64301, 0.647864, 0.652312, 0.656362, 0.660021, 0.663294, 0.666187, 0.668704, 0.670849, 0.672625, 0.674034, 0.675079, 0.675761, 0.676081, 0.676039, 0.675635, 0.674868, 0.673736, 0.672238, 0.670371, 0.668131, 0.665516, 0.66252, 0.659138, 0.655364, 0.651192, 0.646615, 0.641623, 0.636208, 0.63036, 0.624066, 0.617314, 0.610091, 0.602381, 0.594167, 0.585431, 0.576152, 0.566307, 0.55587, 0.544815, 0.533109, 0.520718, 0.507603, 0.49372, 0.479021, 0.46345, 0.446945, 0.429433, 0.410833, 0.391049, 0.369972, 0.347474, 0.323402, 0.297575, 0.269778, 0.239745, 0.207151, 0.171586, 0.13253, 0.0893004, 0.0409873, -0.0136693, -0.0764807, -0.150188, -0.239233, -0.35154, -0.503495, -0.739099, -1.29087, -1.09864, -0.677502, -0.468449, -0.328519, -0.223408, -0.139367, -0.0694831, -0.00978798, 0.0422098, 0.0881767, 0.129283, 0.166381, 0.200112, 0.23097, 0.259342, 0.28554, 0.309818, 0.332382, 0.353407, 0.373038, 0.3914, 0.4086, 0.424728, 0.439864, 0.454079, 0.467432, 0.479978, 0.491764, 0.502833, 0.513223, 0.522966, 0.532094, 0.540634, 0.54861, 0.556045, 0.562958, 0.569367, 0.57529, 0.58074, 0.585731, 0.590276, 0.594384, 0.598067, 0.601333, 0.604189, 0.606643, 0.608701, 0.610368, 0.611649, 0.612548, 0.613068, 0.613212, 0.612983, 0.61238, 0.611406, 0.61006, 0.608341, 0.60625, 0.603784, 0.600941, 0.597718, 0.594111, 0.590117, 0.58573, 0.580945, 0.575754, 0.570152, 0.564128, 0.557675, 0.550783, 0.543438, 0.53563, 0.527344, 0.518565, 0.509275, 0.499456, 0.489088, 0.478146, 0.466605, 0.454438, 0.441612, 0.428092, 0.413838, 0.398806, 0.382947, 0.366203, 0.348511, 0.329796, 0.309976, 0.288952, 0.266612, 0.242822, 0.217428, 0.190242, 0.161039, 0.129546, 0.0954216, 0.05824, 0.017454, -0.0276532, -0.0780468, -0.13507, -0.200669, -0.277826, -0.371444, -0.490471, -0.654099, -0.91783, -1.68806, -1.1018, -0.749753, -0.559279, -0.428433, -0.328973, -0.248955, -0.182195, -0.125073, -0.0752874, -0.0312817, 0.00804459, 0.0434988, 0.0756906, 0.105092, 0.132075, 0.156938, 0.179927, 0.201242, 0.221051, 0.239497, 0.2567, 0.272763, 0.287777, 0.30182, 0.314959, 0.327254, 0.338758, 0.349519, 0.359577, 0.368971, 0.377734, 0.385896, 0.393485, 0.400524, 0.407036, 0.413042, 0.418559, 0.423604, 0.428193, 0.432339, 0.436055, 0.439352, 0.442241, 0.444731, 0.446831, 0.448549, 0.449891, 0.450863, 0.451473, 0.451724, 0.45162, 0.451167, 0.450367, 0.449223, 0.447737, 0.445911, 0.443747, 0.441245, 0.438406, 0.435229, 0.431714, 0.427861, 0.423667, 0.41913, 0.414249, 0.409019, 0.403439, 0.397503, 0.391206, 0.384545, 0.377512, 0.370101, 0.362305, 0.354116, 0.345525, 0.336522, 0.327095, 0.317234, 0.306925, 0.296154, 0.284904, 0.273159, 0.2609, 0.248104, 0.234749, 0.220809, 0.206256, 0.191057, 0.175177, 0.158577, 0.141212, 0.123032, 0.103981, 0.0839951, 0.0630005, 0.0409137, 0.0176378, -0.00693963, -0.0329504, -0.0605501, -0.0899242, -0.121296, -0.154938, -0.191188, -0.230468, -0.273322, -0.32046, -0.372837, -0.431781, -0.499215, -0.578077, -0.673186, -0.793304, -0.957098, -1.21783, -1.93901, -1.43487, -1.07493, -0.883686, -0.753535, -0.655304, -0.576763, -0.511611, -0.456171, -0.40811, -0.365853, -0.328286, -0.294596, -0.264165, -0.236519, -0.211281, -0.188151, -0.16688, -0.147268, -0.129143, -0.112362, -0.0968026, -0.0823609, -0.0689456, -0.0564776, -0.0448879, -0.0341153, -0.0241059, -0.0148116, -0.00618965, 0.00179854, 0.00918755, 0.0160086, 0.0222901, 0.0280576, 0.0333346, 0.0381423, 0.0425004, 0.0464266, 0.0499373, 0.0530477, 0.0557714, 0.0581214, 0.0601092, 0.0617457, 0.0630408, 0.0640037, 0.0646428, 0.0649659, 0.0649799, 0.0646915, 0.0641066, 0.0632304, 0.0620679, 0.0606234, 0.0589008, 0.0569034, 0.0546342, 0.0520956, 0.0492897, 0.046218, 0.0428817, 0.0392814, 0.0354173, 0.0312892, 0.0268962, 0.0222371, 0.0173101, 0.0121129, 0.0066426, 0.000895687, -0.00513199, -0.0114452, -0.0180496, -0.0249514, -0.0321578, -0.0396768, -0.0475175, -0.05569, -0.0642055, -0.0730766, -0.0823172, -0.0919428, -0.101971, -0.11242, -0.123312, -0.13467, -0.14652, -0.158893, -0.171821, -0.18534, -0.199493, -0.214327, -0.229893, -0.246252, -0.263473, -0.281634, -0.300826, -0.321154, -0.342741, -0.365732, -0.390299, -0.416647, -0.445027, -0.475748, -0.509192, -0.545849, -0.58635, -0.631537, -0.682562, -0.741063, -0.809479, -0.891689, -0.994409, -1.13089, -1.33375, -1.73346, -2.01242, -1.41789, -1.17402, -1.01745, -0.901572, -0.809357, -0.732634, -0.66685, -0.609205, -0.557856, -0.511523, -0.469283, -0.430446, -0.394485, -0.360989, -0.329627, -0.300136, -0.272295, -0.245924, -0.22087, -0.197006, -0.17422, -0.152419, -0.13152, -0.111452, -0.092152, -0.0735653, -0.0556429, -0.0383418, -0.0216232, -0.00545269, 0.0102007, 0.0253649, 0.040065, 0.0543238, 0.0681619, 0.081598, 0.0946493, 0.107331, 0.119658, 0.131643, 0.143298, 0.154634, 0.16566, 0.176386, 0.186821, 0.196972, 0.206847, 0.216452, 0.225793, 0.234875, 0.243705, 0.252286, 0.260623, 0.26872, 0.276581, 0.284209, 0.291607, 0.298778, 0.305724, 0.312448, 0.318952, 0.325238, 0.331307, 0.337162, 0.342802, 0.34823, 0.353446, 0.358451, 0.363246, 0.367832, 0.372207, 0.376374, 0.380332, 0.38408, 0.387619, 0.390948, 0.394066, 0.396974, 0.39967, 0.402153, 0.404423, 0.406478, 0.408317, 0.409938, 0.41134, 0.412522, 0.413481, 0.414214, 0.414721, 0.414999, 0.415044, 0.414855, 0.414428, 0.413761, 0.412849, 0.41169, 0.41028, 0.408613, 0.406688, 0.404497, 0.402038, 0.399304, 0.39629, 0.39299, 0.389398, 0.385507, 0.38131, 0.3768, 0.371967, 0.366804, 0.361301, 0.355449, 0.349236, 0.34265, 0.33568, 0.328312, 0.320531, 0.312322, 0.303669, 0.294552, 0.284951, 0.274845, 0.26421, 0.25302, 0.241247, 0.228857, 0.215818, 0.202089, 0.187628, 0.172386, 0.15631, 0.139338, 0.1214, 0.102418, 0.0823018, 0.0609459, 0.0382289, 0.014008, -0.0118855, -0.0396535, -0.0695402, -0.101844, -0.136938, -0.17529, -0.217509, -0.264398, -0.317048, -0.377003, -0.446544, -0.529245, -0.631203, -0.764141, -0.955592, -1.30327, -1.96354, -1.14857, -0.883893, -0.721983, -0.605459, -0.514697, -0.440597, -0.378191, -0.324464, -0.277453, -0.235803, -0.198546, -0.164962, -0.134502, -0.10674, -0.0813372, -0.0580213, -0.0365693, -0.0167973, 0.00144853, 0.0182973, 0.0338585, 0.0482257, 0.061479, 0.0736872, 0.08491, 0.0951988, 0.104598, 0.113147, 0.120878, 0.127821, 0.133999, 0.139433, 0.144142, 0.148139, 0.151435, 0.15404, 0.155958, 0.157194, 0.157748, 0.157618, 0.156801, 0.15529, 0.153075, 0.150144, 0.146482, 0.142071, 0.136889, 0.130911, 0.124106, 0.116441, 0.107874, 0.098361, 0.0878478, 0.0762731, 0.063566, 0.0496439, 0.0344103, 0.0177523, -0.0004635, -0.0203958, -0.0422348, -0.0662115, -0.0926087, -0.121779, -0.154166, -0.190344, -0.231069, -0.277364, -0.330666, -0.393078, -0.467861, -0.560472, -0.681128, -0.852708, -1.14778, -3.0963, -1.15108, -0.844572, -0.664829, -0.53682, -0.437173, -0.355505, -0.286286, -0.226217, -0.173175, -0.125706, -0.0827784, -0.043627, -0.00767275, 0.0255349, 0.0563528, 0.0850686, 0.111918, 0.137094, 0.160762, 0.183058, 0.2041, 0.223988, 0.242811, 0.260644, 0.277553, 0.293598, 0.308829, 0.323293, 0.33703, 0.350077, 0.362467, 0.374229, 0.385389, 0.395972, 0.405998, 0.415488, 0.424458, 0.432925, 0.440902, 0.448404, 0.455441, 0.462025, 0.468164, 0.473867, 0.479142, 0.483996, 0.488433, 0.492459, 0.496079, 0.499296, 0.502112, 0.504531, 0.506553, 0.508179, 0.50941, 0.510245, 0.510683, 0.510722, 0.510361, 0.509595, 0.508421, 0.506835, 0.50483, 0.502402, 0.499543, 0.496244, 0.492498, 0.488294, 0.483622, 0.478468, 0.472819, 0.466661, 0.459976, 0.452745, 0.444949, 0.436564, 0.427565, 0.417924, 0.40761, 0.396588, 0.384818, 0.372257, 0.358856, 0.344557, 0.329298, 0.313007, 0.295599, 0.27698, 0.257037, 0.235639, 0.212634, 0.187836, 0.161025, 0.13193, 0.100221, 0.0654767, 0.0271643, -0.015416, -0.0632025, -0.117497, -0.180179, -0.254111, -0.343962, -0.458162, -0.614461, -0.862297, -1.50361, -1.12625, -0.742359, -0.541879, -0.405407, -0.301949, -0.218727, -0.149216, -0.0896321, -0.0375839, 0.00853615, 0.0498611, 0.0872193, 0.121235, 0.152388, 0.18106, 0.207553, 0.232115, 0.254949, 0.276226, 0.296088, 0.314656, 0.332034, 0.348311, 0.363565, 0.377863, 0.391264, 0.403819, 0.415574, 0.426569, 0.43684, 0.446419, 0.455333, 0.463607, 0.471264, 0.478323, 0.484802, 0.490715, 0.496076, 0.500897, 0.505187, 0.508955, 0.512209, 0.514953, 0.517193, 0.518931, 0.52017, 0.52091, 0.521151, 0.520891, 0.520127, 0.518855, 0.51707, 0.514765, 0.511932, 0.50856, 0.50464, 0.500158, 0.495099, 0.489447, 0.483181, 0.476282, 0.468723, 0.460479, 0.451519, 0.441806, 0.431303, 0.419965, 0.407741, 0.394573, 0.380398, 0.365138, 0.348707, 0.331005, 0.311913, 0.291294, 0.268982, 0.244782, 0.218453, 0.189705, 0.158173, 0.123396, 0.0847794, 0.0415385, -0.00739564, -0.0635285, -0.129078, -0.207512, -0.304703, -0.431843, -0.614797, -0.941762, -1.81856, -0.836515, -0.557378, -0.38806, -0.266066, -0.170629, -0.0922505, -0.025782, 0.0318815, 0.0827577, 0.128232, 0.169299, 0.206692, 0.240972, 0.272575, 0.301849, 0.329073, 0.354476, 0.378248, 0.400548, 0.421512, 0.441254, 0.459873, 0.477454, 0.494073, 0.509794, 0.524676, 0.538768, 0.552117, 0.564762, 0.57674, 0.588083, 0.59882, 0.608977, 0.618578, 0.627644, 0.636195, 0.644248, 0.65182, 0.658924, 0.665575, 0.671783, 0.67756, 0.682915, 0.687858, 0.692396, 0.696537, 0.700286, 0.70365, 0.706633, 0.70924, 0.711474, 0.713338, 0.714836, 0.715968, 0.716736, 0.717141, 0.717184, 0.716863, 0.716179, 0.715129, 0.713713, 0.711926, 0.709768, 0.707232, 0.704317, 0.701016, 0.697323, 0.693233, 0.688739, 0.683832, 0.678504, 0.672744, 0.666543, 0.659887, 0.652764, 0.64516, 0.637058, 0.628441, 0.619289, 0.609581, 0.599293, 0.5884, 0.57687, 0.564673, 0.551773, 0.538128, 0.523694, 0.508419, 0.492245, 0.475108, 0.456931, 0.43763, 0.417105, 0.39524, 0.371899, 0.346923, 0.32012, 0.291261, 0.260062, 0.226174, 0.189157, 0.148447, 0.103299, 0.0527089, -0.00472624, -0.0710545, -0.149434, -0.245119, -0.367849, -0.539093, -0.82461, -1.95508, -0.896659, -0.578443, -0.397834, -0.271555, -0.174648, -0.0962102, -0.0304921, 0.025913, 0.0751906, 0.118827, 0.157877, 0.19312, 0.225143, 0.254405, 0.281266, 0.306017, 0.328895, 0.350097, 0.369785, 0.388098, 0.405154, 0.421053, 0.435882, 0.449718, 0.462625, 0.474661, 0.485878, 0.496321, 0.506029, 0.515038, 0.52338, 0.531083, 0.538172, 0.544669, 0.550596, 0.55597, 0.560807, 0.565121, 0.568927, 0.572234, 0.575053, 0.577393, 0.579261, 0.580664, 0.581607, 0.582095, 0.582132, 0.581719, 0.580859, 0.579553, 0.5778, 0.575599, 0.572949, 0.569847, 0.566289, 0.562271, 0.557787, 0.552831, 0.547395, 0.541471, 0.535048, 0.528116, 0.520661, 0.512669, 0.504125, 0.495011, 0.485308, 0.474993, 0.464042, 0.452428, 0.440121, 0.427086, 0.413286, 0.398678, 0.383214, 0.366838, 0.34949, 0.331099, 0.311584, 0.290852, 0.268794, 0.245285, 0.220174, 0.193285, 0.164406, 0.133277, 0.0995799, 0.0629171, 0.0227811, -0.0214878, -0.0707698, -0.126276, -0.18974, -0.263766, -0.352535, -0.463409, -0.611288, -0.834582, -1.30992, -1.32558, -0.846966, -0.627318, -0.484082, -0.37819, -0.294566, -0.225782, -0.167627, -0.117482, -0.0736087, -0.0347918, -0.000150494, 0.0309742, 0.0590879, 0.0845867, 0.107786, 0.128942, 0.148264, 0.165926, 0.182071, 0.196824, 0.210286, 0.222548, 0.233684, 0.24376, 0.252832, 0.260949, 0.268152, 0.274476, 0.279954, 0.28461, 0.288467, 0.291542, 0.293851, 0.295405, 0.296212, 0.296277, 0.295604, 0.29419, 0.292034, 0.289129, 0.285467, 0.281034, 0.275815, 0.269792, 0.262942, 0.255237, 0.246646, 0.237131, 0.22665, 0.215153, 0.202582, 0.18887, 0.173939, 0.157698, 0.140041, 0.120841, 0.0999498, 0.077188, 0.0523396, 0.0251409, -0.00473499, -0.0376989, -0.0742766, -0.115156, -0.161259, -0.213865, -0.274818, -0.346916, -0.434713, -0.546382, -0.698976, -0.939127, -1.53074, -1.24691, -0.844282, -0.638485, -0.499216, -0.393901, -0.309288, -0.238667, -0.178161, -0.12533, -0.0785381, -0.0366331, 0.00122519, 0.0356691, 0.0671859, 0.0961594, 0.122897, 0.147647, 0.170617, 0.191976, 0.21187, 0.23042, 0.24773, 0.263889, 0.278976, 0.293057, 0.306191, 0.318429, 0.329817, 0.340394, 0.350195, 0.359251, 0.367588, 0.375231, 0.3822, 0.388514, 0.394187, 0.399233, 0.403665, 0.407489, 0.410716, 0.413349, 0.415394, 0.416852, 0.417724, 0.41801, 0.417706, 0.416808, 0.415311, 0.413207, 0.410485, 0.407135, 0.403142, 0.39849, 0.393161, 0.387133, 0.38038, 0.372876, 0.364588, 0.35548, 0.34551, 0.334631, 0.322789, 0.309921, 0.295957, 0.280815, 0.264399, 0.246596, 0.227278, 0.206287, 0.183438, 0.158507, 0.131219, 0.101234, 0.0681234, 0.0313383, -0.00984301, -0.0563927, -0.109665, -0.171629, -0.2453, -0.335655, -0.451806, -0.613411, -0.878, -1.69645, -1.03022, -0.682732, -0.491092, -0.3579, -0.255677, -0.172716, -0.102931, -0.042748, 0.0101082, 0.0571784, 0.0995537, 0.138035, 0.173228, 0.2056, 0.235523, 0.263293, 0.289153, 0.313302, 0.335909, 0.357114, 0.377036, 0.39578, 0.413433, 0.430073, 0.445767, 0.460573, 0.474545, 0.487728, 0.500163, 0.511885, 0.522929, 0.533322, 0.543091, 0.552258, 0.560845, 0.56887, 0.576351, 0.583301, 0.589734, 0.595662, 0.601095, 0.606043, 0.610514, 0.614514, 0.618049, 0.621123, 0.623742, 0.625906, 0.62762, 0.628882, 0.629694, 0.630054, 0.629961, 0.629412, 0.628403, 0.626931, 0.624988, 0.622569, 0.619665, 0.616267, 0.612365, 0.607948, 0.603001, 0.597509, 0.591457, 0.584825, 0.577592, 0.569734, 0.561226, 0.552037, 0.542134, 0.531481, 0.520036, 0.50775, 0.494572, 0.48044, 0.465284, 0.449024, 0.431569, 0.412812, 0.392627, 0.370866, 0.347354, 0.32188, 0.294187, 0.263959, 0.2308, 0.194206, 0.153521, 0.10787, 0.0560496, -0.00366271, -0.0738528, -0.158669, -0.265401, -0.408772, -0.626542, -1.08966, -1.12755, -0.635927, -0.410515, -0.262479, -0.152072, -0.0640302, 0.00914662, 0.071704, 0.12628, 0.174628, 0.217969, 0.257193, 0.292963, 0.32579, 0.356075, 0.384138, 0.410238, 0.43459, 0.457371, 0.478731, 0.498797, 0.517677, 0.535465, 0.552243, 0.56808, 0.58304, 0.597177, 0.61054, 0.623171, 0.63511, 0.646391, 0.657044, 0.667097, 0.676576, 0.685503, 0.693898, 0.70178, 0.709165, 0.716069, 0.722506, 0.728487, 0.734024, 0.739126, 0.743804, 0.748065, 0.751916, 0.755363, 0.758413, 0.76107, 0.763339, 0.765222, 0.766723, 0.767844, 0.768586, 0.768951, 0.768938, 0.768548, 0.76778, 0.766632, 0.765102, 0.763188, 0.760886, 0.758193, 0.755103, 0.751611, 0.747711, 0.743396, 0.738658, 0.733488, 0.727877, 0.721813, 0.715285, 0.708279, 0.70078, 0.692772, 0.684237, 0.675156, 0.665505, 0.655262, 0.644397, 0.632883, 0.620684, 0.607764, 0.594081, 0.579588, 0.56423, 0.547949, 0.530675, 0.512329, 0.492822, 0.472049, 0.449887, 0.426194, 0.400797, 0.373494, 0.344037, 0.312122, 0.27737, 0.239301, 0.197293, 0.15052, 0.0978554, 0.0376997, -0.0323222, -0.115964, -0.219686, -0.35611, -0.555695, -0.934323, -1.34757, -0.687382, -0.437727, -0.281094, -0.167004, -0.0774531, -0.00392083, 0.0583049, 0.112106, 0.159374, 0.201416, 0.239176, 0.273355, 0.30449, 0.332998, 0.359214, 0.383408, 0.405799, 0.426572, 0.445879, 0.463852, 0.4806, 0.49622, 0.510793, 0.524391, 0.537076, 0.548904, 0.559922, 0.570173, 0.579695, 0.588521, 0.596682, 0.604204, 0.61111, 0.617421, 0.623157, 0.628333, 0.632964, 0.637063, 0.640642, 0.643709, 0.646274, 0.648344, 0.649923, 0.651017, 0.651629, 0.651762, 0.651416, 0.650591, 0.649286, 0.6475, 0.645229, 0.642468, 0.639212, 0.635453, 0.631184, 0.626395, 0.621075, 0.615211, 0.608788, 0.60179, 0.594199, 0.585993, 0.577148, 0.56764, 0.557437, 0.546507, 0.534812, 0.522309, 0.508951, 0.494682, 0.47944, 0.463155, 0.445743, 0.427111, 0.407148, 0.385724, 0.362686, 0.337851, 0.311001, 0.281865, 0.250113, 0.215328, 0.176975, 0.134359, 0.0865414, 0.0322239, -0.0304702, -0.104396, -0.194216, -0.308338, -0.464458, -0.711797, -1.34915, -0.979106, -0.593925, -0.39309, -0.256428, -0.152833, -0.0694907, 0.000138935, 0.059847, 0.112029, 0.158297, 0.199785, 0.237325, 0.27154, 0.302915, 0.33183, 0.358591, 0.383446, 0.406601, 0.428226, 0.448466, 0.467444, 0.485264, 0.502019, 0.517787, 0.532637, 0.546629, 0.559819, 0.572252, 0.583972, 0.595017, 0.60542, 0.615211, 0.62442, 0.63307, 0.641184, 0.648782, 0.655883, 0.662504, 0.668661, 0.674366, 0.679634, 0.684476, 0.688901, 0.692921, 0.696543, 0.699775, 0.702625, 0.705099, 0.707203, 0.708942, 0.710321, 0.711343, 0.712011, 0.71233, 0.712301, 0.711925, 0.711206, 0.710142, 0.708736, 0.706987, 0.704894, 0.702458, 0.699675, 0.696545, 0.693065, 0.689233, 0.685045, 0.680497, 0.675586, 0.670305, 0.664649, 0.658612, 0.652188, 0.645368, 0.638145, 0.630508, 0.622447, 0.613952, 0.60501, 0.595607, 0.58573, 0.57536, 0.564482, 0.553075, 0.541117, 0.528585, 0.515453, 0.501691, 0.487268, 0.472147, 0.456289, 0.439648, 0.422175, 0.403812, 0.384495, 0.364151, 0.342694, 0.320029, 0.296042, 0.270601, 0.243552, 0.214707, 0.183845, 0.150693, 0.114915, 0.0760904, 0.0336781, -0.0130276, -0.0649753, -0.123482, -0.190452, -0.26879, -0.363249, -0.482442, -0.644622, -0.901304, -1.58627, -1.14254, -0.774074, -0.58063, -0.449573, -0.350945, -0.272279, -0.207175, -0.151912, -0.104132, -0.0622469, -0.025136, 0.00802003, 0.037839, 0.0647977, 0.0892718, 0.111563, 0.131915, 0.15053, 0.167577, 0.183195, 0.197506, 0.210612 - }; + 0.884395, 0.883757, 0.882693, 0.881201, 0.879278, 0.876919, 0.874121, 0.870877, 0.867181, 0.863025, 0.8584, 0.853297, 0.847703, 0.841607, 0.834994, 0.827847, 0.82015, 0.811883, 0.803023, 0.793547, 0.783425, 0.772629, 0.761124, 0.74887, 0.735826, 0.721941, 0.707161, 0.691423, 0.674655, 0.656775, 0.637686, 0.617278, 0.595421, 0.571962, 0.546717, 0.519467, 0.489943, 0.457813, 0.42266, 0.383952, 0.340992, 0.292844, 0.238213, 0.175224, 0.101032, 0.0109893, -0.103278, -0.259372, -0.506126, -1.13684, -0.780123, -0.392947, -0.19183, -0.055209, 0.0482304, 0.131364, 0.200755, 0.260207, 0.312122, 0.358114, 0.39932, 0.436573, 0.470498, 0.501579, 0.530197, 0.556657, 0.581208, 0.604055, 0.62537, 0.645295, 0.663954, 0.681452, 0.697879, 0.713315, 0.727828, 0.741477, 0.754318, 0.766397, 0.777755, 0.788431, 0.798457, 0.807865, 0.816681, 0.824929, 0.832631, 0.839809, 0.846478, 0.852656, 0.858358, 0.863596, 0.868383, 0.87273, 0.876647, 0.880142, 0.883223, 0.885898, 0.888172, 0.890051, 0.891539, 0.892642, 0.893361, 0.8937, 0.893662, 0.893246, 0.892455, 0.891288, 0.889746, 0.887828, 0.885531, 0.882854, 0.879795, 0.87635, 0.872514, 0.868284, 0.863655, 0.858619, 0.85317, 0.847301, 0.841002, 0.834265, 0.827078, 0.81943, 0.811308, 0.802698, 0.793583, 0.783946, 0.773768, 0.763028, 0.751703, 0.739765, 0.727186, 0.713935, 0.699975, 0.685265, 0.669762, 0.653415, 0.636165, 0.617949, 0.598692, 0.578309, 0.556702, 0.533756, 0.509338, 0.48329, 0.455423, 0.42551, 0.393274, 0.358373, 0.320373, 0.278723, 0.232696, 0.181314, 0.123216, 0.0564223, -0.0221038, -0.117374, -0.238579, -0.405597, -0.67693, -1.52699, -0.827116, -0.487781, -0.301747, -0.173603, -0.0762108, 0.00202704, 0.0671513, 0.122711, 0.17097, 0.21346, 0.251265, 0.285183, 0.315816, 0.343628, 0.368988, 0.39219, 0.413474, 0.433039, 0.451049, 0.467644, 0.482942, 0.497042, 0.510033, 0.521988, 0.532973, 0.543044, 0.552252, 0.560639, 0.568245, 0.575103, 0.581242, 0.586689, 0.591466, 0.595594, 0.599089, 0.601968, 0.604242, 0.605923, 0.607019, 0.607538, 0.607485, 0.606864, 0.605677, 0.603925, 0.601607, 0.59872, 0.59526, 0.591222, 0.586598, 0.581378, 0.575552, 0.569107, 0.562027, 0.554295, 0.545889, 0.536788, 0.526964, 0.516388, 0.505026, 0.492839, 0.479784, 0.46581, 0.45086, 0.43487, 0.417764, 0.399455, 0.379842, 0.358809, 0.336215, 0.311895, 0.285654, 0.257249, 0.226388, 0.192705, 0.155735, 0.11488, 0.0693486, 0.0180617, -0.0405009, -0.108583, -0.189697, -0.28981, -0.42034, -0.607853, -0.944483, -1.71896, -0.819988, -0.548238, -0.383195, -0.264647, -0.172331, -0.0969221, -0.0333507, 0.021449, 0.0694724, 0.112091, 0.150289, 0.184795, 0.216164, 0.244829, 0.271135, 0.295357, 0.317723, 0.33842, 0.357607, 0.375416, 0.39196, 0.407336, 0.421629, 0.43491, 0.447243, 0.458684, 0.469282, 0.47908, 0.488115, 0.496423, 0.504032, 0.510969, 0.517257, 0.522918, 0.52797, 0.532428, 0.536308, 0.539621, 0.542379, 0.544589, 0.54626, 0.547398, 0.548008, 0.548092, 0.547653, 0.546693, 0.54521, 0.543203, 0.540669, 0.537604, 0.534002, 0.529857, 0.52516, 0.5199, 0.514068, 0.507648, 0.500626, 0.492984, 0.484702, 0.475759, 0.466128, 0.455782, 0.444689, 0.432812, 0.42011, 0.406537, 0.392041, 0.376561, 0.360029, 0.342366, 0.32348, 0.303267, 0.281602, 0.258339, 0.233303, 0.206287, 0.177035, 0.145235, 0.110495, 0.0723182, 0.0300569, -0.0171509, -0.0704896, -0.131649, -0.203162, -0.289072, -0.396452, -0.539462, -0.753844, -1.19375, -1.32009, -0.798067, -0.568824, -0.420467, -0.310907, -0.224258, -0.152782, -0.0921257, -0.0395928, 0.00660122, 0.0476993, 0.0846017, 0.117981, 0.148354, 0.176124, 0.201613, 0.225084, 0.24675, 0.26679, 0.285352, 0.302565, 0.318534, 0.333354, 0.347104, 0.359854, 0.371664, 0.382587, 0.39267, 0.401954, 0.410476, 0.418267, 0.425356, 0.431767, 0.437523, 0.442642, 0.447143, 0.451039, 0.454343, 0.457066, 0.459218, 0.460805, 0.461833, 0.462308, 0.462231, 0.461605, 0.460428, 0.458701, 0.45642, 0.45358, 0.450177, 0.446202, 0.441647, 0.436502, 0.430753, 0.424385, 0.417383, 0.409727, 0.401396, 0.392364, 0.382603, 0.372083, 0.360767, 0.348614, 0.335579, 0.321609, 0.306644, 0.290615, 0.273444, 0.255039, 0.235295, 0.214085, 0.191265, 0.166657, 0.140053, 0.111196, 0.0797702, 0.045381, 0.00752542, -0.0344511, -0.0814218, -0.134588, -0.195667, -0.267238, -0.353435, -0.46152, -0.60614, -0.824785, -1.28606, -1.33679, -0.842887, -0.618451, -0.471867, -0.363093, -0.276787, -0.205419, -0.14473, -0.0920738, -0.0456954, -0.0043694, 0.0327928, 0.0664562, 0.0971315, 0.125219, 0.151038, 0.174849, 0.196863, 0.217258, 0.236182, 0.253762, 0.270104, 0.285301, 0.299432, 0.312567, 0.324767, 0.336084, 0.346565, 0.356252, 0.365179, 0.37338, 0.380884, 0.387714, 0.393893, 0.399442, 0.404376, 0.408712, 0.412461, 0.415636, 0.418246, 0.420298, 0.4218, 0.422756, 0.423168, 0.423041, 0.422374, 0.421166, 0.419416, 0.417121, 0.414275, 0.410873, 0.406906, 0.402366, 0.397241, 0.391518, 0.385183, 0.378219, 0.370607, 0.362324, 0.353345, 0.343643, 0.333186, 0.321937, 0.309857, 0.2969, 0.283012, 0.268134, 0.252198, 0.235124, 0.216823, 0.197188, 0.176095, 0.153397, 0.128922, 0.102459, 0.0737539, 0.0424935, 0.00828566, -0.0293687, -0.0711184, -0.117828, -0.170687, -0.231391, -0.302484, -0.388035, -0.495161, -0.638146, -0.853166, -1.29788, -1.40436, -0.889433, -0.661013, -0.512687, -0.402902, -0.315914, -0.244039, -0.182946, -0.129953, -0.0832827, -0.0416963, -0.00429661, 0.0295875, 0.0604707, 0.0887564, 0.114766, 0.138762, 0.160957, 0.181529, 0.200628, 0.218381, 0.234895, 0.250264, 0.264567, 0.277874, 0.290246, 0.301736, 0.312392, 0.322254, 0.331359, 0.33974, 0.347426, 0.354441, 0.360808, 0.366548, 0.371676, 0.37621, 0.380162, 0.383543, 0.386364, 0.388633, 0.390357, 0.39154, 0.392187, 0.3923, 0.391881, 0.39093, 0.389445, 0.387423, 0.384862, 0.381754, 0.378094, 0.373874, 0.369083, 0.363709, 0.35774, 0.35116, 0.343951, 0.336094, 0.327566, 0.318342, 0.308392, 0.297684, 0.286183, 0.273846, 0.260625, 0.246469, 0.231316, 0.215096, 0.197728, 0.17912, 0.159164, 0.137734, 0.114678, 0.0898201, 0.0629447, 0.0337909, 0.00203634, -0.0327229, -0.0710022, -0.113473, -0.161036, -0.214929, -0.276934, -0.34974, -0.437688, -0.548483, -0.697933, -0.927821, -1.4469, -1.33296, -0.891471, -0.677855, -0.53599, -0.429888, -0.34532, -0.275188, -0.215433, -0.163518, -0.11775, -0.0769405, -0.0402272, -0.00696234, 0.0233526, 0.0511089, 0.0766195, 0.100138, 0.121875, 0.142001, 0.160665, 0.177989, 0.194078, 0.209024, 0.222905, 0.235788, 0.247733, 0.258792, 0.26901, 0.278428, 0.287081, 0.295001, 0.302214, 0.308744, 0.314614, 0.319841, 0.324442, 0.328431, 0.331819, 0.334617, 0.336833, 0.338473, 0.339542, 0.340045, 0.339981, 0.339353, 0.338158, 0.336394, 0.334056, 0.331138, 0.327634, 0.323533, 0.318825, 0.313495, 0.30753, 0.30091, 0.293617, 0.285626, 0.276911, 0.267443, 0.257187, 0.246106, 0.234155, 0.221285, 0.207438, 0.192551, 0.176548, 0.159342, 0.140834, 0.120905, 0.0994184, 0.0762087, 0.0510794, 0.023792, -0.00594627, -0.0384997, -0.0743297, -0.114032, -0.158393, -0.208484, -0.265816, -0.332613, -0.412355, -0.510941, -0.639627, -0.824472, -1.15476, -2.00138, -1.04541, -0.769068, -0.601668, -0.481374, -0.387564, -0.31079, -0.245924, -0.189874, -0.140628, -0.0968049, -0.0574141, -0.0217221, 0.0108294, 0.0406759, 0.0681627, 0.0935688, 0.117122, 0.139013, 0.159398, 0.178412, 0.196169, 0.212767, 0.228291, 0.242815, 0.256402, 0.269109, 0.280987, 0.292079, 0.302424, 0.312058, 0.321011, 0.329311, 0.336983, 0.344049, 0.350528, 0.35644, 0.361798, 0.366618, 0.370912, 0.374691, 0.377965, 0.380741, 0.383028, 0.384832, 0.386157, 0.387007, 0.387387, 0.387297, 0.386739, 0.385713, 0.384219, 0.382254, 0.379817, 0.376904, 0.373511, 0.369631, 0.365258, 0.360386, 0.355004, 0.349102, 0.34267, 0.335694, 0.328159, 0.32005, 0.311348, 0.302032, 0.292081, 0.281468, 0.270165, 0.25814, 0.245359, 0.231781, 0.217361, 0.202049, 0.185788, 0.168511, 0.150145, 0.130604, 0.109787, 0.0875811, 0.0638492, 0.0384315, 0.0111369, -0.0182654, -0.0500574, -0.0845886, -0.122299, -0.163754, -0.209697, -0.26113, -0.319456, -0.38672, -0.466074, -0.562759, -0.686484, -0.858629, -1.14452, -2.25343, -1.22344, -0.905535, -0.726103, -0.601258, -0.505929, -0.42918, -0.365247, -0.310718, -0.263406, -0.221826, -0.184922, -0.151919, -0.122231, -0.0954044, -0.0710806, -0.0489732, -0.0288492, -0.0105171, 0.0061817, 0.0213801, 0.0351899, 0.0477055, 0.0590071, 0.069163, 0.0782311, 0.0862607, 0.0932935, 0.0993644, 0.104502, 0.108731, 0.112069, 0.11453, 0.116124, 0.116857, 0.11673, 0.11574, 0.113881, 0.111142, 0.107507, 0.102956, 0.0974653, 0.0910027, 0.0835317, 0.0750085, 0.065381, 0.0545881, 0.0425579, 0.0292058, 0.0144317, -0.00188277, -0.0198787, -0.0397252, -0.0616272, -0.0858348, -0.112657, -0.142484, -0.175809, -0.213279, -0.255756, -0.304427, -0.360986, -0.427978, -0.509474, -0.612602, -0.751673, -0.962975, -1.40508, -1.50263, -0.985658, -0.753631, -0.601508, -0.487871, -0.397008, -0.321247, -0.256262, -0.199372, -0.148799, -0.103303, -0.0619859, -0.0241751, 0.0106461, 0.0428829, 0.0728592, 0.100838, 0.127036, 0.151632, 0.174779, 0.196606, 0.217222, 0.236724, 0.255193, 0.272702, 0.289315, 0.305088, 0.320069, 0.334305, 0.347835, 0.360693, 0.372913, 0.384523, 0.39555, 0.406016, 0.415944, 0.425353, 0.434262, 0.442686, 0.45064, 0.458139, 0.465194, 0.471817, 0.478018, 0.483808, 0.489193, 0.494183, 0.498785, 0.503005, 0.506848, 0.510321, 0.513428, 0.516173, 0.518559, 0.520591, 0.52227, 0.523598, 0.524579, 0.525212, 0.525498, 0.525439, 0.525034, 0.524282, 0.523184, 0.521737, 0.51994, 0.51779, 0.515286, 0.512424, 0.509199, 0.505609, 0.501649, 0.497312, 0.492594, 0.487487, 0.481985, 0.476079, 0.469761, 0.463021, 0.455849, 0.448232, 0.440159, 0.431615, 0.422586, 0.413054, 0.403001, 0.392407, 0.381251, 0.369506, 0.357148, 0.344145, 0.330465, 0.316071, 0.300921, 0.28497, 0.268165, 0.250448, 0.231753, 0.212002, 0.19111, 0.168975, 0.14548, 0.120489, 0.0938377, 0.065334, 0.0347435, 0.00178053, -0.0339092, -0.0727726, -0.115384, -0.1625, -0.215142, -0.274745, -0.343403, -0.424361, -0.523041, -0.649574, -0.826581, -1.12534, -2.76493, -1.15193, -0.84895, -0.674581, -0.552402, -0.458771, -0.383215, -0.320169, -0.266317, -0.219525, -0.178339, -0.141722, -0.108911, -0.0793271, -0.0525205, -0.028136, -0.00588811, 0.0144564, 0.0330897, 0.0501723, 0.0658393, 0.0802051, 0.0933678, 0.105411, 0.116409, 0.126423, 0.135508, 0.143713, 0.151079, 0.157643, 0.163437, 0.168489, 0.172823, 0.17646, 0.17942, 0.181716, 0.183362, 0.18437, 0.184748, 0.184502, 0.183637, 0.182156, 0.18006, 0.177348, 0.174018, 0.170065, 0.165482, 0.160261, 0.154391, 0.14786, 0.140652, 0.13275, 0.124133, 0.114778, 0.104657, 0.0937391, 0.0819897, 0.0693683, 0.055829, 0.0413193, 0.025779, 0.00913918, -0.00868, -0.0277709, -0.0482414, -0.070218, -0.0938502, -0.119317, -0.146832, -0.176659, -0.209122, -0.244625, -0.283689, -0.326989, -0.375432, -0.430269, -0.4933, -0.567245, -0.656509, -0.768931, -0.920676, -1.15489, -1.69469, -1.53311, -1.10551, -0.89578, -0.756196, -0.651835, -0.568772, -0.500026, -0.441595, -0.390971, -0.346477, -0.306939, -0.271499, -0.239515, -0.210492, -0.184042, -0.159854, -0.137676, -0.117299, -0.0985521, -0.0812898, -0.0653896, -0.0507468, -0.0372715, -0.0248861, -0.0135232, -0.00312432, 0.00636197, 0.0149806, 0.022771, 0.0297679, 0.0360018, 0.0414995, 0.0462845, 0.0503774, 0.0537961, 0.056556, 0.0586704, 0.0601505, 0.0610055, 0.061243, 0.0608686, 0.0598865, 0.0582993, 0.0561079, 0.0533118, 0.0499089, 0.0458957, 0.0412669, 0.0360159, 0.0301342, 0.0236116, 0.0164363, 0.00859413, 6.91624e-05, -0.00915696, -0.0191051, -0.0297987, -0.0412644, -0.0535321, -0.0666357, -0.080613, -0.0955071, -0.111366, -0.128246, -0.146208, -0.165324, -0.185676, -0.207358, -0.230479, -0.255166, -0.28157, -0.309867, -0.34027, -0.373037, -0.408485, -0.447008, -0.489106, -0.535429, -0.586836, -0.644509, -0.710125, -0.786191, -0.876698, -0.988591, -1.13569, -1.35252, -1.7836, -1.97371, -1.43444, -1.20807, -1.06531, -0.962453, -0.883225, -0.819752, -0.767635, -0.724173, -0.687594, -0.656684, -0.630578, -0.608648, -0.590433, -0.575592, -0.563875, -0.555106, -0.54917, -0.546006, -0.545601, -0.547991, -0.553264, -0.561565, -0.573104, -0.588175, -0.607174, -0.630644, -0.659319, -0.694228, -0.736839, -0.789339, -0.855172, -0.940197, -1.05562, -1.22741, -1.54441, -2.39025, -1.41334, -1.12473, -0.945621, -0.813925, -0.70895, -0.621216, -0.545578, -0.478926, -0.419237, -0.365117, -0.315568, -0.269845, -0.227382, -0.187735, -0.150551, -0.115544, -0.0824783, -0.0511592, -0.0214214, 0.00687498, 0.0338499, 0.059607, 0.0842365, 0.107817, 0.130419, 0.152104, 0.172926, 0.192934, 0.212173, 0.230681, 0.248495, 0.265648, 0.282168, 0.298082, 0.313415, 0.32819, 0.342426, 0.356144, 0.369359, 0.382089, 0.394348, 0.40615, 0.417506, 0.42843, 0.438932, 0.449021, 0.458707, 0.467998, 0.476902, 0.485427, 0.493579, 0.501364, 0.508787, 0.515855, 0.52257, 0.528939, 0.534964, 0.540648, 0.545996, 0.551009, 0.555689, 0.560038, 0.564059, 0.567751, 0.571116, 0.574154, 0.576865, 0.579249, 0.581305, 0.583032, 0.584429, 0.585494, 0.586224, 0.586616, 0.586669, 0.586378, 0.585739, 0.584748, 0.5834, 0.581689, 0.579609, 0.577153, 0.574313, 0.571082, 0.56745, 0.563407, 0.558943, 0.554045, 0.548701, 0.542895, 0.536614, 0.529838, 0.522551, 0.514729, 0.506352, 0.497393, 0.487825, 0.477617, 0.466733, 0.455137, 0.442784, 0.429626, 0.415609, 0.400671, 0.384742, 0.367742, 0.349576, 0.330139, 0.309304, 0.286924, 0.262823, 0.23679, 0.208571, 0.177849, 0.144231, 0.107216, 0.0661541, 0.0201767, -0.031908, -0.0918024, -0.162059, -0.246762, -0.353064, -0.495334, -0.710059, -1.15741, -1.24924, -0.738218, -0.509412, -0.360105, -0.249112, -0.160786, -0.087481, -0.0248831, 0.0296815, 0.0779856, 0.121265, 0.160415, 0.196105, 0.228852, 0.259056, 0.287042, 0.313069, 0.337354, 0.360073, 0.381379, 0.401398, 0.420239, 0.437996, 0.454751, 0.470575, 0.48553, 0.499671, 0.513047, 0.525701, 0.537672, 0.548994, 0.559698, 0.569812, 0.579362, 0.588369, 0.596855, 0.604838, 0.612334, 0.61936, 0.625928, 0.632052, 0.637743, 0.64301, 0.647864, 0.652312, 0.656362, 0.660021, 0.663294, 0.666187, 0.668704, 0.670849, 0.672625, 0.674034, 0.675079, 0.675761, 0.676081, 0.676039, 0.675635, 0.674868, 0.673736, 0.672238, 0.670371, 0.668131, 0.665516, 0.66252, 0.659138, 0.655364, 0.651192, 0.646615, 0.641623, 0.636208, 0.63036, 0.624066, 0.617314, 0.610091, 0.602381, 0.594167, 0.585431, 0.576152, 0.566307, 0.55587, 0.544815, 0.533109, 0.520718, 0.507603, 0.49372, 0.479021, 0.46345, 0.446945, 0.429433, 0.410833, 0.391049, 0.369972, 0.347474, 0.323402, 0.297575, 0.269778, 0.239745, 0.207151, 0.171586, 0.13253, 0.0893004, 0.0409873, -0.0136693, -0.0764807, -0.150188, -0.239233, -0.35154, -0.503495, -0.739099, -1.29087, -1.09864, -0.677502, -0.468449, -0.328519, -0.223408, -0.139367, -0.0694831, -0.00978798, 0.0422098, 0.0881767, 0.129283, 0.166381, 0.200112, 0.23097, 0.259342, 0.28554, 0.309818, 0.332382, 0.353407, 0.373038, 0.3914, 0.4086, 0.424728, 0.439864, 0.454079, 0.467432, 0.479978, 0.491764, 0.502833, 0.513223, 0.522966, 0.532094, 0.540634, 0.54861, 0.556045, 0.562958, 0.569367, 0.57529, 0.58074, 0.585731, 0.590276, 0.594384, 0.598067, 0.601333, 0.604189, 0.606643, 0.608701, 0.610368, 0.611649, 0.612548, 0.613068, 0.613212, 0.612983, 0.61238, 0.611406, 0.61006, 0.608341, 0.60625, 0.603784, 0.600941, 0.597718, 0.594111, 0.590117, 0.58573, 0.580945, 0.575754, 0.570152, 0.564128, 0.557675, 0.550783, 0.543438, 0.53563, 0.527344, 0.518565, 0.509275, 0.499456, 0.489088, 0.478146, 0.466605, 0.454438, 0.441612, 0.428092, 0.413838, 0.398806, 0.382947, 0.366203, 0.348511, 0.329796, 0.309976, 0.288952, 0.266612, 0.242822, 0.217428, 0.190242, 0.161039, 0.129546, 0.0954216, 0.05824, 0.017454, -0.0276532, -0.0780468, -0.13507, -0.200669, -0.277826, -0.371444, -0.490471, -0.654099, -0.91783, -1.68806, -1.1018, -0.749753, -0.559279, -0.428433, -0.328973, -0.248955, -0.182195, -0.125073, -0.0752874, -0.0312817, 0.00804459, 0.0434988, 0.0756906, 0.105092, 0.132075, 0.156938, 0.179927, 0.201242, 0.221051, 0.239497, 0.2567, 0.272763, 0.287777, 0.30182, 0.314959, 0.327254, 0.338758, 0.349519, 0.359577, 0.368971, 0.377734, 0.385896, 0.393485, 0.400524, 0.407036, 0.413042, 0.418559, 0.423604, 0.428193, 0.432339, 0.436055, 0.439352, 0.442241, 0.444731, 0.446831, 0.448549, 0.449891, 0.450863, 0.451473, 0.451724, 0.45162, 0.451167, 0.450367, 0.449223, 0.447737, 0.445911, 0.443747, 0.441245, 0.438406, 0.435229, 0.431714, 0.427861, 0.423667, 0.41913, 0.414249, 0.409019, 0.403439, 0.397503, 0.391206, 0.384545, 0.377512, 0.370101, 0.362305, 0.354116, 0.345525, 0.336522, 0.327095, 0.317234, 0.306925, 0.296154, 0.284904, 0.273159, 0.2609, 0.248104, 0.234749, 0.220809, 0.206256, 0.191057, 0.175177, 0.158577, 0.141212, 0.123032, 0.103981, 0.0839951, 0.0630005, 0.0409137, 0.0176378, -0.00693963, -0.0329504, -0.0605501, -0.0899242, -0.121296, -0.154938, -0.191188, -0.230468, -0.273322, -0.32046, -0.372837, -0.431781, -0.499215, -0.578077, -0.673186, -0.793304, -0.957098, -1.21783, -1.93901, -1.43487, -1.07493, -0.883686, -0.753535, -0.655304, -0.576763, -0.511611, -0.456171, -0.40811, -0.365853, -0.328286, -0.294596, -0.264165, -0.236519, -0.211281, -0.188151, -0.16688, -0.147268, -0.129143, -0.112362, -0.0968026, -0.0823609, -0.0689456, -0.0564776, -0.0448879, -0.0341153, -0.0241059, -0.0148116, -0.00618965, 0.00179854, 0.00918755, 0.0160086, 0.0222901, 0.0280576, 0.0333346, 0.0381423, 0.0425004, 0.0464266, 0.0499373, 0.0530477, 0.0557714, 0.0581214, 0.0601092, 0.0617457, 0.0630408, 0.0640037, 0.0646428, 0.0649659, 0.0649799, 0.0646915, 0.0641066, 0.0632304, 0.0620679, 0.0606234, 0.0589008, 0.0569034, 0.0546342, 0.0520956, 0.0492897, 0.046218, 0.0428817, 0.0392814, 0.0354173, 0.0312892, 0.0268962, 0.0222371, 0.0173101, 0.0121129, 0.0066426, 0.000895687, -0.00513199, -0.0114452, -0.0180496, -0.0249514, -0.0321578, -0.0396768, -0.0475175, -0.05569, -0.0642055, -0.0730766, -0.0823172, -0.0919428, -0.101971, -0.11242, -0.123312, -0.13467, -0.14652, -0.158893, -0.171821, -0.18534, -0.199493, -0.214327, -0.229893, -0.246252, -0.263473, -0.281634, -0.300826, -0.321154, -0.342741, -0.365732, -0.390299, -0.416647, -0.445027, -0.475748, -0.509192, -0.545849, -0.58635, -0.631537, -0.682562, -0.741063, -0.809479, -0.891689, -0.994409, -1.13089, -1.33375, -1.73346, -2.01242, -1.41789, -1.17402, -1.01745, -0.901572, -0.809357, -0.732634, -0.66685, -0.609205, -0.557856, -0.511523, -0.469283, -0.430446, -0.394485, -0.360989, -0.329627, -0.300136, -0.272295, -0.245924, -0.22087, -0.197006, -0.17422, -0.152419, -0.13152, -0.111452, -0.092152, -0.0735653, -0.0556429, -0.0383418, -0.0216232, -0.00545269, 0.0102007, 0.0253649, 0.040065, 0.0543238, 0.0681619, 0.081598, 0.0946493, 0.107331, 0.119658, 0.131643, 0.143298, 0.154634, 0.16566, 0.176386, 0.186821, 0.196972, 0.206847, 0.216452, 0.225793, 0.234875, 0.243705, 0.252286, 0.260623, 0.26872, 0.276581, 0.284209, 0.291607, 0.298778, 0.305724, 0.312448, 0.318952, 0.325238, 0.331307, 0.337162, 0.342802, 0.34823, 0.353446, 0.358451, 0.363246, 0.367832, 0.372207, 0.376374, 0.380332, 0.38408, 0.387619, 0.390948, 0.394066, 0.396974, 0.39967, 0.402153, 0.404423, 0.406478, 0.408317, 0.409938, 0.41134, 0.412522, 0.413481, 0.414214, 0.414721, 0.414999, 0.415044, 0.414855, 0.414428, 0.413761, 0.412849, 0.41169, 0.41028, 0.408613, 0.406688, 0.404497, 0.402038, 0.399304, 0.39629, 0.39299, 0.389398, 0.385507, 0.38131, 0.3768, 0.371967, 0.366804, 0.361301, 0.355449, 0.349236, 0.34265, 0.33568, 0.328312, 0.320531, 0.312322, 0.303669, 0.294552, 0.284951, 0.274845, 0.26421, 0.25302, 0.241247, 0.228857, 0.215818, 0.202089, 0.187628, 0.172386, 0.15631, 0.139338, 0.1214, 0.102418, 0.0823018, 0.0609459, 0.0382289, 0.014008, -0.0118855, -0.0396535, -0.0695402, -0.101844, -0.136938, -0.17529, -0.217509, -0.264398, -0.317048, -0.377003, -0.446544, -0.529245, -0.631203, -0.764141, -0.955592, -1.30327, -1.96354, -1.14857, -0.883893, -0.721983, -0.605459, -0.514697, -0.440597, -0.378191, -0.324464, -0.277453, -0.235803, -0.198546, -0.164962, -0.134502, -0.10674, -0.0813372, -0.0580213, -0.0365693, -0.0167973, 0.00144853, 0.0182973, 0.0338585, 0.0482257, 0.061479, 0.0736872, 0.08491, 0.0951988, 0.104598, 0.113147, 0.120878, 0.127821, 0.133999, 0.139433, 0.144142, 0.148139, 0.151435, 0.15404, 0.155958, 0.157194, 0.157748, 0.157618, 0.156801, 0.15529, 0.153075, 0.150144, 0.146482, 0.142071, 0.136889, 0.130911, 0.124106, 0.116441, 0.107874, 0.098361, 0.0878478, 0.0762731, 0.063566, 0.0496439, 0.0344103, 0.0177523, -0.0004635, -0.0203958, -0.0422348, -0.0662115, -0.0926087, -0.121779, -0.154166, -0.190344, -0.231069, -0.277364, -0.330666, -0.393078, -0.467861, -0.560472, -0.681128, -0.852708, -1.14778, -3.0963, -1.15108, -0.844572, -0.664829, -0.53682, -0.437173, -0.355505, -0.286286, -0.226217, -0.173175, -0.125706, -0.0827784, -0.043627, -0.00767275, 0.0255349, 0.0563528, 0.0850686, 0.111918, 0.137094, 0.160762, 0.183058, 0.2041, 0.223988, 0.242811, 0.260644, 0.277553, 0.293598, 0.308829, 0.323293, 0.33703, 0.350077, 0.362467, 0.374229, 0.385389, 0.395972, 0.405998, 0.415488, 0.424458, 0.432925, 0.440902, 0.448404, 0.455441, 0.462025, 0.468164, 0.473867, 0.479142, 0.483996, 0.488433, 0.492459, 0.496079, 0.499296, 0.502112, 0.504531, 0.506553, 0.508179, 0.50941, 0.510245, 0.510683, 0.510722, 0.510361, 0.509595, 0.508421, 0.506835, 0.50483, 0.502402, 0.499543, 0.496244, 0.492498, 0.488294, 0.483622, 0.478468, 0.472819, 0.466661, 0.459976, 0.452745, 0.444949, 0.436564, 0.427565, 0.417924, 0.40761, 0.396588, 0.384818, 0.372257, 0.358856, 0.344557, 0.329298, 0.313007, 0.295599, 0.27698, 0.257037, 0.235639, 0.212634, 0.187836, 0.161025, 0.13193, 0.100221, 0.0654767, 0.0271643, -0.015416, -0.0632025, -0.117497, -0.180179, -0.254111, -0.343962, -0.458162, -0.614461, -0.862297, -1.50361, -1.12625, -0.742359, -0.541879, -0.405407, -0.301949, -0.218727, -0.149216, -0.0896321, -0.0375839, 0.00853615, 0.0498611, 0.0872193, 0.121235, 0.152388, 0.18106, 0.207553, 0.232115, 0.254949, 0.276226, 0.296088, 0.314656, 0.332034, 0.348311, 0.363565, 0.377863, 0.391264, 0.403819, 0.415574, 0.426569, 0.43684, 0.446419, 0.455333, 0.463607, 0.471264, 0.478323, 0.484802, 0.490715, 0.496076, 0.500897, 0.505187, 0.508955, 0.512209, 0.514953, 0.517193, 0.518931, 0.52017, 0.52091, 0.521151, 0.520891, 0.520127, 0.518855, 0.51707, 0.514765, 0.511932, 0.50856, 0.50464, 0.500158, 0.495099, 0.489447, 0.483181, 0.476282, 0.468723, 0.460479, 0.451519, 0.441806, 0.431303, 0.419965, 0.407741, 0.394573, 0.380398, 0.365138, 0.348707, 0.331005, 0.311913, 0.291294, 0.268982, 0.244782, 0.218453, 0.189705, 0.158173, 0.123396, 0.0847794, 0.0415385, -0.00739564, -0.0635285, -0.129078, -0.207512, -0.304703, -0.431843, -0.614797, -0.941762, -1.81856, -0.836515, -0.557378, -0.38806, -0.266066, -0.170629, -0.0922505, -0.025782, 0.0318815, 0.0827577, 0.128232, 0.169299, 0.206692, 0.240972, 0.272575, 0.301849, 0.329073, 0.354476, 0.378248, 0.400548, 0.421512, 0.441254, 0.459873, 0.477454, 0.494073, 0.509794, 0.524676, 0.538768, 0.552117, 0.564762, 0.57674, 0.588083, 0.59882, 0.608977, 0.618578, 0.627644, 0.636195, 0.644248, 0.65182, 0.658924, 0.665575, 0.671783, 0.67756, 0.682915, 0.687858, 0.692396, 0.696537, 0.700286, 0.70365, 0.706633, 0.70924, 0.711474, 0.713338, 0.714836, 0.715968, 0.716736, 0.717141, 0.717184, 0.716863, 0.716179, 0.715129, 0.713713, 0.711926, 0.709768, 0.707232, 0.704317, 0.701016, 0.697323, 0.693233, 0.688739, 0.683832, 0.678504, 0.672744, 0.666543, 0.659887, 0.652764, 0.64516, 0.637058, 0.628441, 0.619289, 0.609581, 0.599293, 0.5884, 0.57687, 0.564673, 0.551773, 0.538128, 0.523694, 0.508419, 0.492245, 0.475108, 0.456931, 0.43763, 0.417105, 0.39524, 0.371899, 0.346923, 0.32012, 0.291261, 0.260062, 0.226174, 0.189157, 0.148447, 0.103299, 0.0527089, -0.00472624, -0.0710545, -0.149434, -0.245119, -0.367849, -0.539093, -0.82461, -1.95508, -0.896659, -0.578443, -0.397834, -0.271555, -0.174648, -0.0962102, -0.0304921, 0.025913, 0.0751906, 0.118827, 0.157877, 0.19312, 0.225143, 0.254405, 0.281266, 0.306017, 0.328895, 0.350097, 0.369785, 0.388098, 0.405154, 0.421053, 0.435882, 0.449718, 0.462625, 0.474661, 0.485878, 0.496321, 0.506029, 0.515038, 0.52338, 0.531083, 0.538172, 0.544669, 0.550596, 0.55597, 0.560807, 0.565121, 0.568927, 0.572234, 0.575053, 0.577393, 0.579261, 0.580664, 0.581607, 0.582095, 0.582132, 0.581719, 0.580859, 0.579553, 0.5778, 0.575599, 0.572949, 0.569847, 0.566289, 0.562271, 0.557787, 0.552831, 0.547395, 0.541471, 0.535048, 0.528116, 0.520661, 0.512669, 0.504125, 0.495011, 0.485308, 0.474993, 0.464042, 0.452428, 0.440121, 0.427086, 0.413286, 0.398678, 0.383214, 0.366838, 0.34949, 0.331099, 0.311584, 0.290852, 0.268794, 0.245285, 0.220174, 0.193285, 0.164406, 0.133277, 0.0995799, 0.0629171, 0.0227811, -0.0214878, -0.0707698, -0.126276, -0.18974, -0.263766, -0.352535, -0.463409, -0.611288, -0.834582, -1.30992, -1.32558, -0.846966, -0.627318, -0.484082, -0.37819, -0.294566, -0.225782, -0.167627, -0.117482, -0.0736087, -0.0347918, -0.000150494, 0.0309742, 0.0590879, 0.0845867, 0.107786, 0.128942, 0.148264, 0.165926, 0.182071, 0.196824, 0.210286, 0.222548, 0.233684, 0.24376, 0.252832, 0.260949, 0.268152, 0.274476, 0.279954, 0.28461, 0.288467, 0.291542, 0.293851, 0.295405, 0.296212, 0.296277, 0.295604, 0.29419, 0.292034, 0.289129, 0.285467, 0.281034, 0.275815, 0.269792, 0.262942, 0.255237, 0.246646, 0.237131, 0.22665, 0.215153, 0.202582, 0.18887, 0.173939, 0.157698, 0.140041, 0.120841, 0.0999498, 0.077188, 0.0523396, 0.0251409, -0.00473499, -0.0376989, -0.0742766, -0.115156, -0.161259, -0.213865, -0.274818, -0.346916, -0.434713, -0.546382, -0.698976, -0.939127, -1.53074, -1.24691, -0.844282, -0.638485, -0.499216, -0.393901, -0.309288, -0.238667, -0.178161, -0.12533, -0.0785381, -0.0366331, 0.00122519, 0.0356691, 0.0671859, 0.0961594, 0.122897, 0.147647, 0.170617, 0.191976, 0.21187, 0.23042, 0.24773, 0.263889, 0.278976, 0.293057, 0.306191, 0.318429, 0.329817, 0.340394, 0.350195, 0.359251, 0.367588, 0.375231, 0.3822, 0.388514, 0.394187, 0.399233, 0.403665, 0.407489, 0.410716, 0.413349, 0.415394, 0.416852, 0.417724, 0.41801, 0.417706, 0.416808, 0.415311, 0.413207, 0.410485, 0.407135, 0.403142, 0.39849, 0.393161, 0.387133, 0.38038, 0.372876, 0.364588, 0.35548, 0.34551, 0.334631, 0.322789, 0.309921, 0.295957, 0.280815, 0.264399, 0.246596, 0.227278, 0.206287, 0.183438, 0.158507, 0.131219, 0.101234, 0.0681234, 0.0313383, -0.00984301, -0.0563927, -0.109665, -0.171629, -0.2453, -0.335655, -0.451806, -0.613411, -0.878, -1.69645, -1.03022, -0.682732, -0.491092, -0.3579, -0.255677, -0.172716, -0.102931, -0.042748, 0.0101082, 0.0571784, 0.0995537, 0.138035, 0.173228, 0.2056, 0.235523, 0.263293, 0.289153, 0.313302, 0.335909, 0.357114, 0.377036, 0.39578, 0.413433, 0.430073, 0.445767, 0.460573, 0.474545, 0.487728, 0.500163, 0.511885, 0.522929, 0.533322, 0.543091, 0.552258, 0.560845, 0.56887, 0.576351, 0.583301, 0.589734, 0.595662, 0.601095, 0.606043, 0.610514, 0.614514, 0.618049, 0.621123, 0.623742, 0.625906, 0.62762, 0.628882, 0.629694, 0.630054, 0.629961, 0.629412, 0.628403, 0.626931, 0.624988, 0.622569, 0.619665, 0.616267, 0.612365, 0.607948, 0.603001, 0.597509, 0.591457, 0.584825, 0.577592, 0.569734, 0.561226, 0.552037, 0.542134, 0.531481, 0.520036, 0.50775, 0.494572, 0.48044, 0.465284, 0.449024, 0.431569, 0.412812, 0.392627, 0.370866, 0.347354, 0.32188, 0.294187, 0.263959, 0.2308, 0.194206, 0.153521, 0.10787, 0.0560496, -0.00366271, -0.0738528, -0.158669, -0.265401, -0.408772, -0.626542, -1.08966, -1.12755, -0.635927, -0.410515, -0.262479, -0.152072, -0.0640302, 0.00914662, 0.071704, 0.12628, 0.174628, 0.217969, 0.257193, 0.292963, 0.32579, 0.356075, 0.384138, 0.410238, 0.43459, 0.457371, 0.478731, 0.498797, 0.517677, 0.535465, 0.552243, 0.56808, 0.58304, 0.597177, 0.61054, 0.623171, 0.63511, 0.646391, 0.657044, 0.667097, 0.676576, 0.685503, 0.693898, 0.70178, 0.709165, 0.716069, 0.722506, 0.728487, 0.734024, 0.739126, 0.743804, 0.748065, 0.751916, 0.755363, 0.758413, 0.76107, 0.763339, 0.765222, 0.766723, 0.767844, 0.768586, 0.768951, 0.768938, 0.768548, 0.76778, 0.766632, 0.765102, 0.763188, 0.760886, 0.758193, 0.755103, 0.751611, 0.747711, 0.743396, 0.738658, 0.733488, 0.727877, 0.721813, 0.715285, 0.708279, 0.70078, 0.692772, 0.684237, 0.675156, 0.665505, 0.655262, 0.644397, 0.632883, 0.620684, 0.607764, 0.594081, 0.579588, 0.56423, 0.547949, 0.530675, 0.512329, 0.492822, 0.472049, 0.449887, 0.426194, 0.400797, 0.373494, 0.344037, 0.312122, 0.27737, 0.239301, 0.197293, 0.15052, 0.0978554, 0.0376997, -0.0323222, -0.115964, -0.219686, -0.35611, -0.555695, -0.934323, -1.34757, -0.687382, -0.437727, -0.281094, -0.167004, -0.0774531, -0.00392083, 0.0583049, 0.112106, 0.159374, 0.201416, 0.239176, 0.273355, 0.30449, 0.332998, 0.359214, 0.383408, 0.405799, 0.426572, 0.445879, 0.463852, 0.4806, 0.49622, 0.510793, 0.524391, 0.537076, 0.548904, 0.559922, 0.570173, 0.579695, 0.588521, 0.596682, 0.604204, 0.61111, 0.617421, 0.623157, 0.628333, 0.632964, 0.637063, 0.640642, 0.643709, 0.646274, 0.648344, 0.649923, 0.651017, 0.651629, 0.651762, 0.651416, 0.650591, 0.649286, 0.6475, 0.645229, 0.642468, 0.639212, 0.635453, 0.631184, 0.626395, 0.621075, 0.615211, 0.608788, 0.60179, 0.594199, 0.585993, 0.577148, 0.56764, 0.557437, 0.546507, 0.534812, 0.522309, 0.508951, 0.494682, 0.47944, 0.463155, 0.445743, 0.427111, 0.407148, 0.385724, 0.362686, 0.337851, 0.311001, 0.281865, 0.250113, 0.215328, 0.176975, 0.134359, 0.0865414, 0.0322239, -0.0304702, -0.104396, -0.194216, -0.308338, -0.464458, -0.711797, -1.34915, -0.979106, -0.593925, -0.39309, -0.256428, -0.152833, -0.0694907, 0.000138935, 0.059847, 0.112029, 0.158297, 0.199785, 0.237325, 0.27154, 0.302915, 0.33183, 0.358591, 0.383446, 0.406601, 0.428226, 0.448466, 0.467444, 0.485264, 0.502019, 0.517787, 0.532637, 0.546629, 0.559819, 0.572252, 0.583972, 0.595017, 0.60542, 0.615211, 0.62442, 0.63307, 0.641184, 0.648782, 0.655883, 0.662504, 0.668661, 0.674366, 0.679634, 0.684476, 0.688901, 0.692921, 0.696543, 0.699775, 0.702625, 0.705099, 0.707203, 0.708942, 0.710321, 0.711343, 0.712011, 0.71233, 0.712301, 0.711925, 0.711206, 0.710142, 0.708736, 0.706987, 0.704894, 0.702458, 0.699675, 0.696545, 0.693065, 0.689233, 0.685045, 0.680497, 0.675586, 0.670305, 0.664649, 0.658612, 0.652188, 0.645368, 0.638145, 0.630508, 0.622447, 0.613952, 0.60501, 0.595607, 0.58573, 0.57536, 0.564482, 0.553075, 0.541117, 0.528585, 0.515453, 0.501691, 0.487268, 0.472147, 0.456289, 0.439648, 0.422175, 0.403812, 0.384495, 0.364151, 0.342694, 0.320029, 0.296042, 0.270601, 0.243552, 0.214707, 0.183845, 0.150693, 0.114915, 0.0760904, 0.0336781, -0.0130276, -0.0649753, -0.123482, -0.190452, -0.26879, -0.363249, -0.482442, -0.644622, -0.901304, -1.58627, -1.14254, -0.774074, -0.58063, -0.449573, -0.350945, -0.272279, -0.207175, -0.151912, -0.104132, -0.0622469, -0.025136, 0.00802003, 0.037839, 0.0647977, 0.0892718, 0.111563, 0.131915, 0.15053, 0.167577, 0.183195, 0.197506, 0.210612 +}; #endif /* MULTIPATH_V3_M8_H_ */ diff --git a/src/lte/model/channel-realization.h b/src/lte/model/channel-realization.h index fd17e71a3..dc51780f6 100644 --- a/src/lte/model/channel-realization.h +++ b/src/lte/model/channel-realization.h @@ -34,6 +34,8 @@ namespace ns3 { /** + * \ingroup lte + * * \brief the ChannelRealization class implements a complete propagation model * used by the channel to compute the loss due to the propagation of the signal. * A ChannelRealization object is created for each couple of UE - eNB. diff --git a/src/lte/model/discrete-time-loss-model.h b/src/lte/model/discrete-time-loss-model.h index 0c08677f6..9d871309b 100644 --- a/src/lte/model/discrete-time-loss-model.h +++ b/src/lte/model/discrete-time-loss-model.h @@ -30,6 +30,8 @@ namespace ns3 { /** + * \ingroup lte + * * \brief The DiscreteTimeLossModel class offers a basic implementation * for all propagation loss models used for LTE networks */ diff --git a/src/lte/model/ideal-control-messages.h b/src/lte/model/ideal-control-messages.h index 0c5fc751c..3873eb62f 100644 --- a/src/lte/model/ideal-control-messages.h +++ b/src/lte/model/ideal-control-messages.h @@ -32,6 +32,8 @@ class LteNetDevice; /** + * \ingroup lte + * * The IdealControlMessage provides a basic implementations for * control messages (such as PDCCH allocation map, CQI feedbacks) * that are exchanged among eNodeB and UEs. @@ -39,6 +41,7 @@ class LteNetDevice; class IdealControlMessage : public SimpleRefCount { public: + /** * The type of the message */ @@ -112,6 +115,8 @@ namespace ns3 { class LteNetDevice; /** + * \ingroup lte + * * \brief The PdcchMapIdealControlMessage defines an ideal allocation map * for both UL and DL sends by the eNodeB to all UE, * using an ideal PDCCH control channel. @@ -127,11 +132,12 @@ class LteNetDevice; class PdcchMapIdealControlMessage : public IdealControlMessage { public: + PdcchMapIdealControlMessage (void); virtual ~PdcchMapIdealControlMessage (void); /** - * Direction for which the message is created + * Direction for which the message is created */ enum Direction { @@ -145,7 +151,7 @@ public: { /** the direction */ Direction m_direction; - /** the sub channel */ + /** the sub channel */ int m_idSubChannel; /** the ue that receive the mapping */ Ptr m_ue; @@ -199,12 +205,15 @@ namespace ns3 { class LteNetDevice; /** + * \ingroup lte + * * The CqiIdealControlMessage defines an ideal list of feedback about * the channel quality sent by the UE to the eNodeB. */ class CqiIdealControlMessage : public IdealControlMessage { public: + CqiIdealControlMessage (void); virtual ~CqiIdealControlMessage (void); @@ -214,7 +223,7 @@ public: struct CqiFeedback { /** the sub channel */ - int m_idSubChannel; + int m_idSubChannel; /** the cqi feedback */ double m_cqi; }; diff --git a/src/lte/model/jakes-fading-loss-model.h b/src/lte/model/jakes-fading-loss-model.h index bfb948748..075c541e4 100644 --- a/src/lte/model/jakes-fading-loss-model.h +++ b/src/lte/model/jakes-fading-loss-model.h @@ -31,6 +31,8 @@ namespace ns3 { class LtePhy; /** + * \ingroup lte + * * \brief JakesFadingLossModel class implements a loss model due to the fast fading. * In particular, the fast fading is modeled using a Jakes Model */ diff --git a/src/lte/model/lte-amc.h b/src/lte/model/lte-amc.h index 48e6f2162..dba6e5dc1 100644 --- a/src/lte/model/lte-amc.h +++ b/src/lte/model/lte-amc.h @@ -30,6 +30,7 @@ namespace ns3 { class SpectrumValue; /** + * \ingroup lte * \brief The LteAmc class implements the Adaptive Modulation And Coding Scheme * as proposed in 3GPP TSG-RAN WG1 - R1-081483 * http://www.3gpp.org/ftp/tsg_ran/WG1_RL1/TSGR1_52b/Docs/R1-081483.zip diff --git a/src/lte/model/lte-enb-net-device.h b/src/lte/model/lte-enb-net-device.h index 33774ff88..85d56ef3d 100644 --- a/src/lte/model/lte-enb-net-device.h +++ b/src/lte/model/lte-enb-net-device.h @@ -44,6 +44,8 @@ class FfMacScheduler; /** + * \ingroup lte + * * The eNodeB device implementation */ class LteEnbNetDevice : public LteNetDevice diff --git a/src/lte/model/lte-enb-phy.h b/src/lte/model/lte-enb-phy.h index e83be1e22..efa141ab6 100644 --- a/src/lte/model/lte-enb-phy.h +++ b/src/lte/model/lte-enb-phy.h @@ -34,6 +34,7 @@ class PacketBurst; class LteNetDevice; /** + * \ingroup lte * LteEnbPhy models the physical layer for the eNodeB */ class LteEnbPhy : public LtePhy diff --git a/src/lte/model/lte-net-device.h b/src/lte/model/lte-net-device.h index 1a176a8f6..74f3de8db 100644 --- a/src/lte/model/lte-net-device.h +++ b/src/lte/model/lte-net-device.h @@ -39,6 +39,13 @@ class PacketBurst; /** + * \defgroup lte LTE Models + * + */ + +/** + * \ingroup lte + * * LteNetDevice provides basic implementation for all LTE network devices */ class LteNetDevice : public NetDevice diff --git a/src/lte/model/lte-phy.h b/src/lte/model/lte-phy.h index e83e45ab8..a2e2b24ac 100644 --- a/src/lte/model/lte-phy.h +++ b/src/lte/model/lte-phy.h @@ -41,6 +41,8 @@ class LteNetDevice; class IdealControlMessage; /** + * \ingroup lte + * * The LtePhy models the physical layer of LTE. It is composed by two * LteSpectrumPhy, one for the downlink and one for the uplink. */ diff --git a/src/lte/model/lte-propagation-loss-model.h b/src/lte/model/lte-propagation-loss-model.h index cecdf4c0d..53609fd25 100644 --- a/src/lte/model/lte-propagation-loss-model.h +++ b/src/lte/model/lte-propagation-loss-model.h @@ -34,6 +34,8 @@ namespace ns3 { class MobilityModel; /** + * \ingroup lte + * * \brief propagation loss model for LTE */ class LtePropagationLossModel : public SpectrumPropagationLossModel diff --git a/src/lte/model/lte-spectrum-phy.h b/src/lte/model/lte-spectrum-phy.h index e767771b5..ccd583b12 100644 --- a/src/lte/model/lte-spectrum-phy.h +++ b/src/lte/model/lte-spectrum-phy.h @@ -42,6 +42,8 @@ namespace ns3 { class LteNetDevice; /** + * \ingroup lte + * * The LteSpectrumPhy models the physical layer of LTE */ class LteSpectrumPhy : public SpectrumPhy diff --git a/src/lte/model/lte-spectrum-value-helper.h b/src/lte/model/lte-spectrum-value-helper.h index fbc7952fd..a15fc834b 100644 --- a/src/lte/model/lte-spectrum-value-helper.h +++ b/src/lte/model/lte-spectrum-value-helper.h @@ -29,6 +29,8 @@ namespace ns3 { /** + * \ingroup lte + * * \brief This class defines all functions to create spectrum model for lte */ class LteSpectrumValueHelper diff --git a/src/lte/model/lte-ue-net-device.h b/src/lte/model/lte-ue-net-device.h index cf3179ecd..80edf1bb9 100644 --- a/src/lte/model/lte-ue-net-device.h +++ b/src/lte/model/lte-ue-net-device.h @@ -44,6 +44,7 @@ class LteUeMac; class LteUeRrc; /** + * \ingroup lte * The LteUeNetDevice class implements the UE net device */ class LteUeNetDevice : public LteNetDevice diff --git a/src/lte/model/lte-ue-phy.h b/src/lte/model/lte-ue-phy.h index 574ed083e..7f1e657fb 100644 --- a/src/lte/model/lte-ue-phy.h +++ b/src/lte/model/lte-ue-phy.h @@ -39,6 +39,8 @@ class LteNetDevice; class LteEnbPhy; /** + * \ingroup lte + * * The LteSpectrumPhy models the physical layer of LTE */ class LteUePhy : public LtePhy diff --git a/src/lte/model/path-loss-model.h b/src/lte/model/path-loss-model.h index c032f051e..be7e1a24b 100644 --- a/src/lte/model/path-loss-model.h +++ b/src/lte/model/path-loss-model.h @@ -30,6 +30,8 @@ namespace ns3 { class MobilityModel; /** + * \ingroup lte + * * \brief This class models the propagation loss model due to the path loss */ class PathLossModel : public DiscreteTimeLossModel diff --git a/src/lte/model/penetration-loss-model.h b/src/lte/model/penetration-loss-model.h index 907d205f2..0bd725e25 100644 --- a/src/lte/model/penetration-loss-model.h +++ b/src/lte/model/penetration-loss-model.h @@ -28,6 +28,8 @@ namespace ns3 { /** + * \ingroup lte + * * \brief This class models the propagation loss model due to the penetration loss */ class PenetrationLossModel : public DiscreteTimeLossModel diff --git a/src/lte/model/shadowing-loss-model.h b/src/lte/model/shadowing-loss-model.h index 42770fbb6..23e7d53b8 100644 --- a/src/lte/model/shadowing-loss-model.h +++ b/src/lte/model/shadowing-loss-model.h @@ -29,6 +29,8 @@ namespace ns3 { /** + * \ingroup lte + * * \brief This class models the propagation loss model due to the shadowing */ class ShadowingLossModel : public DiscreteTimeLossModel diff --git a/src/mesh/doc/mesh.h b/src/mesh/doc/mesh.h index 148e4926b..5bb74757f 100644 --- a/src/mesh/doc/mesh.h +++ b/src/mesh/doc/mesh.h @@ -23,8 +23,7 @@ */ /** - * \ingroup devices - * \defgroup mesh Mesh + * \defgroup mesh Mesh Device * * \brief MAC-layer mobile mesh networking. * \section MeshOverview Overview of Layer-2 Mesh networking protocols diff --git a/doc/manual/source/mesh.rst b/src/mesh/doc/mesh.rst similarity index 100% rename from doc/manual/source/mesh.rst rename to src/mesh/doc/mesh.rst diff --git a/src/mesh/examples/mesh.cc b/src/mesh/examples/mesh.cc index b16e108d3..ee77d69b1 100644 --- a/src/mesh/examples/mesh.cc +++ b/src/mesh/examples/mesh.cc @@ -62,43 +62,43 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("TestMeshScript"); class MeshTest { - public: - /// Init test - MeshTest (); - /// Configure test from command line arguments - void Configure (int argc, char ** argv); - /// Run test - int Run (); - private: - int m_xSize; - int m_ySize; - double m_step; - double m_randomStart; - double m_totalTime; - double m_packetInterval; - uint16_t m_packetSize; - uint32_t m_nIfaces; - bool m_chan; - bool m_pcap; - std::string m_stack; - std::string m_root; - /// List of network nodes - NodeContainer nodes; - /// List of all mesh point devices - NetDeviceContainer meshDevices; - //Addresses of interfaces: - Ipv4InterfaceContainer interfaces; - // MeshHelper. Report is not static methods - MeshHelper mesh; - private: - /// Create nodes and setup their mobility - void CreateNodes (); - /// Install internet m_stack on nodes - void InstallInternetStack (); - /// Install applications - void InstallApplication (); - /// Print mesh devices diagnostics - void Report (); +public: + /// Init test + MeshTest (); + /// Configure test from command line arguments + void Configure (int argc, char ** argv); + /// Run test + int Run (); +private: + int m_xSize; + int m_ySize; + double m_step; + double m_randomStart; + double m_totalTime; + double m_packetInterval; + uint16_t m_packetSize; + uint32_t m_nIfaces; + bool m_chan; + bool m_pcap; + std::string m_stack; + std::string m_root; + /// List of network nodes + NodeContainer nodes; + /// List of all mesh point devices + NetDeviceContainer meshDevices; + //Addresses of interfaces: + Ipv4InterfaceContainer interfaces; + // MeshHelper. Report is not static methods + MeshHelper mesh; +private: + /// Create nodes and setup their mobility + void CreateNodes (); + /// Install internet m_stack on nodes + void InstallInternetStack (); + /// Install applications + void InstallApplication (); + /// Print mesh devices diagnostics + void Report (); }; MeshTest::MeshTest () : m_xSize (3), @@ -135,7 +135,7 @@ MeshTest::Configure (int argc, char *argv[]) cmd.AddValue ("pcap", "Enable PCAP traces on interfaces. [0]", m_pcap); cmd.AddValue ("stack", "Type of protocol stack. ns3::Dot11sStack by default", m_stack); cmd.AddValue ("root", "Mac address of root mesh point in HWMP", m_root); - + cmd.Parse (argc, argv); NS_LOG_DEBUG ("Grid:" << m_xSize << "*" << m_ySize); NS_LOG_DEBUG ("Simulation time: " << m_totalTime << " s"); @@ -224,7 +224,7 @@ MeshTest::Run () CreateNodes (); InstallInternetStack (); InstallApplication (); - Simulator::Schedule (Seconds(m_totalTime), & MeshTest::Report, this); + Simulator::Schedule (Seconds(m_totalTime), &MeshTest::Report, this); Simulator::Stop (Seconds (m_totalTime)); Simulator::Run (); Simulator::Destroy (); @@ -235,20 +235,20 @@ MeshTest::Report () { unsigned n (0); for (NetDeviceContainer::Iterator i = meshDevices.Begin (); i != meshDevices.End (); ++i, ++n) - { - std::ostringstream os; - os << "mp-report-" << n << ".xml"; - std::cerr << "Printing mesh point device #" << n << " diagnostics to " << os.str () << "\n"; - std::ofstream of; - of.open (os.str().c_str()); - if (! of.is_open ()) { - std::cerr << "Error: Can't open file " << os.str() << "\n"; - return; + std::ostringstream os; + os << "mp-report-" << n << ".xml"; + std::cerr << "Printing mesh point device #" << n << " diagnostics to " << os.str () << "\n"; + std::ofstream of; + of.open (os.str().c_str()); + if (!of.is_open ()) + { + std::cerr << "Error: Can't open file " << os.str() << "\n"; + return; + } + mesh.Report (*i, of); + of.close (); } - mesh.Report (*i, of); - of.close (); - } } int main (int argc, char *argv[]) diff --git a/src/mesh/helper/dot11s/dot11s-installer.h b/src/mesh/helper/dot11s/dot11s-installer.h index 3c92eec1e..40ca87552 100644 --- a/src/mesh/helper/dot11s/dot11s-installer.h +++ b/src/mesh/helper/dot11s/dot11s-installer.h @@ -35,7 +35,7 @@ public: * \internal */ static TypeId GetTypeId (); - + /** * Create a Dot11sStack() installer helper. */ diff --git a/src/mesh/helper/flame/flame-installer.h b/src/mesh/helper/flame/flame-installer.h index efeb4d4d4..1cb29731b 100644 --- a/src/mesh/helper/flame/flame-installer.h +++ b/src/mesh/helper/flame/flame-installer.h @@ -55,7 +55,7 @@ public: * Object support. */ void DoDispose (); - + /** * \brief Install a flame stack on the given MeshPointDevice * \param mp The Ptr to use. diff --git a/src/mesh/helper/mesh-helper.cc b/src/mesh/helper/mesh-helper.cc index 2c4aa7a5d..261d2d509 100644 --- a/src/mesh/helper/mesh-helper.cc +++ b/src/mesh/helper/mesh-helper.cc @@ -43,14 +43,14 @@ MeshHelper::SetSpreadInterfaceChannels (enum ChannelPolicy policy) } void MeshHelper::SetStackInstaller (std::string type, - std::string n0, const AttributeValue &v0, - std::string n1, const AttributeValue &v1, - std::string n2, const AttributeValue &v2, - std::string n3, const AttributeValue &v3, - std::string n4, const AttributeValue &v4, - std::string n5, const AttributeValue &v5, - std::string n6, const AttributeValue &v6, - std::string n7, const AttributeValue &v7) + std::string n0, const AttributeValue &v0, + std::string n1, const AttributeValue &v1, + std::string n2, const AttributeValue &v2, + std::string n3, const AttributeValue &v3, + std::string n4, const AttributeValue &v4, + std::string n5, const AttributeValue &v5, + std::string n6, const AttributeValue &v6, + std::string n7, const AttributeValue &v7) { m_stackFactory.SetTypeId (type); m_stackFactory.Set (n0, v0); @@ -120,13 +120,13 @@ MeshHelper::Default (void) void MeshHelper::SetMacType (std::string n0, const AttributeValue &v0, - std::string n1, const AttributeValue &v1, - std::string n2, const AttributeValue &v2, - std::string n3, const AttributeValue &v3, - std::string n4, const AttributeValue &v4, - std::string n5, const AttributeValue &v5, - std::string n6, const AttributeValue &v6, - std::string n7, const AttributeValue &v7) + std::string n1, const AttributeValue &v1, + std::string n2, const AttributeValue &v2, + std::string n3, const AttributeValue &v3, + std::string n4, const AttributeValue &v4, + std::string n5, const AttributeValue &v5, + std::string n6, const AttributeValue &v6, + std::string n7, const AttributeValue &v7) { m_mac.SetTypeId ("ns3::MeshWifiInterfaceMac"); m_mac.Set (n0, v0); @@ -195,7 +195,7 @@ MeshHelper::Report (const ns3::Ptr& device, std::ostream& os) NS_ASSERT (mp != 0); std::vector > ifaces = mp->GetInterfaces (); os << "GetAddress ()) << "\">\n"; + << Mac48Address::ConvertFrom (mp->GetAddress ()) << "\">\n"; m_stack->Report (mp, os); os << "\n"; } diff --git a/src/mesh/helper/mesh-helper.h b/src/mesh/helper/mesh-helper.h index bb9c371b9..ced5ab084 100644 --- a/src/mesh/helper/mesh-helper.h +++ b/src/mesh/helper/mesh-helper.h @@ -52,7 +52,7 @@ public: * \brief Set the helper to the default values for the MAC type, remote * station manager and channel policy. */ - static MeshHelper Default (); + static MeshHelper Default (); /** * \param n0 the name of the attribute to set @@ -76,13 +76,13 @@ public: * in the requested mac. */ void SetMacType (std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), - std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), - std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), - std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), - std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); + std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), + std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), + std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), + std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), + std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), + std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), + std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); /** * \param type the type of ns3::WifiRemoteStationManager to create. * \param n0 the name of the attribute to set @@ -107,14 +107,14 @@ public: */ void SetRemoteStationManager (std::string type, - std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), - std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), - std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), - std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), - std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); + std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), + std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), + std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), + std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), + std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), + std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), + std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), + std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); /** * Set PHY standard */ @@ -141,7 +141,7 @@ public: * \param nInterfaces is the number of interfaces */ void SetNumberOfInterfaces (uint32_t nInterfaces); - + /** * \brief Install 802.11s mesh device & protocols on given node list * @@ -172,14 +172,14 @@ public: * \param v7 the value of the attribute to set */ void SetStackInstaller (std::string type, - std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), - std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), - std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), - std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), - std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); + std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), + std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), + std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), + std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), + std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), + std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), + std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), + std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); /** * \brief Print statistics. @@ -205,7 +205,7 @@ private: ObjectFactory m_mac; ObjectFactory m_stationManager; enum WifiPhyStandard m_standard; - ///\} + ///\} }; } //namespace ns3 diff --git a/src/mesh/helper/mesh-stack-installer.h b/src/mesh/helper/mesh-stack-installer.h index fdd3ea7fc..112067983 100644 --- a/src/mesh/helper/mesh-stack-installer.h +++ b/src/mesh/helper/mesh-stack-installer.h @@ -33,13 +33,13 @@ namespace ns3 { */ class MeshStack : public Object { - public: - ///\brief Installs mesh stack. needed by helper only - virtual bool InstallStack (Ptr mp) = 0; - /// Report statistics of a given mesh point - virtual void Report (const Ptr mp, std::ostream&) = 0; - /// Reset statistics of a given mesh point - virtual void ResetStats (const Ptr mp) = 0; +public: + ///\brief Installs mesh stack. needed by helper only + virtual bool InstallStack (Ptr mp) = 0; + /// Report statistics of a given mesh point + virtual void Report (const Ptr mp, std::ostream&) = 0; + /// Reset statistics of a given mesh point + virtual void ResetStats (const Ptr mp) = 0; }; } #endif diff --git a/src/mesh/model/dot11s/dot11s-mac-header.cc b/src/mesh/model/dot11s/dot11s-mac-header.cc index a87ccac8a..df225bbf2 100644 --- a/src/mesh/model/dot11s/dot11s-mac-header.cc +++ b/src/mesh/model/dot11s/dot11s-mac-header.cc @@ -32,13 +32,13 @@ TypeId MeshHeader::GetTypeId () { static TypeId tid = TypeId ("ns3::Dot11sMacHeader") - .SetParent
() - .AddConstructor (); + .SetParent
() + .AddConstructor (); return tid; } MeshHeader::MeshHeader () : m_meshFlags (0), m_meshTtl (0), m_meshSeqno (0), m_addr4 (Mac48Address ()), m_addr5 (Mac48Address ()), - m_addr6 (Mac48Address ()) + m_addr6 (Mac48Address ()) { } MeshHeader::~MeshHeader () @@ -164,15 +164,15 @@ void MeshHeader::Print (std::ostream &os) const { os << "flags = " << (uint16_t) m_meshFlags << std::endl << "ttl = " << (uint16_t) m_meshTtl - << std::endl << "seqno = " << m_meshSeqno << std::endl<< "addr4 = " << m_addr4 << std::endl - << "addr5 = " << m_addr5 << std::endl << "addr6 = " << m_addr6 << std::endl; + << std::endl << "seqno = " << m_meshSeqno << std::endl<< "addr4 = " << m_addr4 << std::endl + << "addr5 = " << m_addr5 << std::endl << "addr6 = " << m_addr6 << std::endl; } bool operator== (const MeshHeader & a, const MeshHeader & b) { return ((a.m_meshFlags == b.m_meshFlags) && (a.m_meshTtl == b.m_meshTtl) - && (a.m_meshSeqno == b.m_meshSeqno) && (a.m_addr4 == b.m_addr4) && (a.m_addr5 == b.m_addr5) - && (a.m_addr6 == b.m_addr6)); + && (a.m_meshSeqno == b.m_meshSeqno) && (a.m_addr4 == b.m_addr4) && (a.m_addr5 == b.m_addr5) + && (a.m_addr6 == b.m_addr6)); } } //namespace dot11s } // namespace ns3 diff --git a/src/mesh/model/dot11s/dot11s.h b/src/mesh/model/dot11s/dot11s.h index f5ca99d67..33f7e58fc 100644 --- a/src/mesh/model/dot11s/dot11s.h +++ b/src/mesh/model/dot11s/dot11s.h @@ -51,7 +51,7 @@ * and peek all needed information from management frames and information elements from beacons. * - Peer link ns3::dot11s::PeerLink which keeps finite state machine of each peer link, keeps * beacon loss counter and counter of successive transmission failures. - * + * * Procedure of closing peer link is not described detailed in 802.11s draft standard, so in our model * the link may be closed by: * - beacon loss (see an appropriate attribute of ns3::dot11s::PeerLink class) diff --git a/src/mesh/model/dot11s/hwmp-protocol-mac.cc b/src/mesh/model/dot11s/hwmp-protocol-mac.cc index 9e4772ba2..f9e028e59 100644 --- a/src/mesh/model/dot11s/hwmp-protocol-mac.cc +++ b/src/mesh/model/dot11s/hwmp-protocol-mac.cc @@ -70,12 +70,12 @@ HwmpProtocolMac::ReceiveData (Ptr packet, const WifiMacHeader & header) Mac48Address source; switch (meshHdr.GetAddressExt ()) { - case 0: - source = header.GetAddr4 (); - destination = header.GetAddr3 (); - break; - default: - NS_FATAL_ERROR ( + case 0: + source = header.GetAddr4 (); + destination = header.GetAddr3 (); + break; + default: + NS_FATAL_ERROR ( "6-address scheme is not yet supported and 4-address extension is not supposed to be used for data frames."); } tag.SetSeqno (meshHdr.GetMeshSeqno ()); @@ -83,7 +83,7 @@ HwmpProtocolMac::ReceiveData (Ptr packet, const WifiMacHeader & header) packet->AddPacketTag (tag); if ((destination == Mac48Address::GetBroadcast ()) && (m_protocol->DropDataFrame (meshHdr.GetMeshSeqno (), - source))) + source))) { return false; } @@ -104,7 +104,7 @@ HwmpProtocolMac::ReceiveAction (Ptr packet, const WifiMacHeader & header MeshInformationElementVector elements; packet->RemoveHeader (elements); std::vector failedDestinations; - for (MeshInformationElementVector::Iterator i = elements.Begin(); i != elements.End(); i ++) + for (MeshInformationElementVector::Iterator i = elements.Begin(); i != elements.End(); i++) { if ((*i)->ElementId () == IE11S_RANN) { @@ -125,7 +125,7 @@ HwmpProtocolMac::ReceiveAction (Ptr packet, const WifiMacHeader & header } preq->DecrementTtl (); m_protocol->ReceivePreq (*preq, header.GetAddr2 (), m_ifIndex, header.GetAddr3 (), - m_parent->GetLinkMetric (header.GetAddr2 ())); + m_parent->GetLinkMetric (header.GetAddr2 ())); } if ((*i)->ElementId () == IE11S_PREP) { @@ -138,7 +138,7 @@ HwmpProtocolMac::ReceiveAction (Ptr packet, const WifiMacHeader & header } prep->DecrementTtl (); m_protocol->ReceivePrep (*prep, header.GetAddr2 (), m_ifIndex, header.GetAddr3 (), - m_parent->GetLinkMetric (header.GetAddr2 ())); + m_parent->GetLinkMetric (header.GetAddr2 ())); } if ((*i)->ElementId () == IE11S_PERR) { @@ -147,7 +147,7 @@ HwmpProtocolMac::ReceiveAction (Ptr packet, const WifiMacHeader & header m_stats.rxPerr++; std::vector destinations = perr->GetAddressUnitVector (); for (std::vector::const_iterator i = destinations.begin (); i - != destinations.end (); i++) + != destinations.end (); i++) { failedDestinations.push_back (*i); } @@ -182,7 +182,7 @@ HwmpProtocolMac::Receive (Ptr packet, const WifiMacHeader & header) } bool HwmpProtocolMac::UpdateOutcomingFrame (Ptr packet, WifiMacHeader & header, Mac48Address from, - Mac48Address to) + Mac48Address to) { if (!header.IsData ()) { @@ -317,14 +317,14 @@ HwmpProtocolMac::SendPrep (IePrep prep, Mac48Address receiver) } void HwmpProtocolMac::ForwardPerr (std::vector failedDestinations, std::vector< - Mac48Address> receivers) + Mac48Address> receivers) { NS_LOG_FUNCTION_NOARGS (); Ptr packet = Create (); Ptr perr = Create (); MeshInformationElementVector elements; for (std::vector::const_iterator i = failedDestinations.begin (); i - != failedDestinations.end (); i++) + != failedDestinations.end (); i++) { if (!perr->IsFull ()) { @@ -371,48 +371,48 @@ HwmpProtocolMac::ForwardPerr (std::vector faile } void HwmpProtocolMac::InitiatePerr (std::vector failedDestinations, std::vector< - Mac48Address> receivers) + Mac48Address> receivers) { //All duplicates in PERR are checked here, and there is no reason to //check it at any athoer place - { - std::vector::const_iterator end = receivers.end (); - for (std::vector::const_iterator i = receivers.begin (); i != end; i++) - { - bool should_add = true; - for (std::vector::const_iterator j = m_myPerr.receivers.begin (); j - != m_myPerr.receivers.end (); j++) - { - if ((*i) == (*j)) - { - should_add = false; - } - } - if (should_add) - { - m_myPerr.receivers.push_back (*i); - } - } - } - { - std::vector::const_iterator end = failedDestinations.end (); - for (std::vector::const_iterator i = failedDestinations.begin (); i != end; i++) - { - bool should_add = true; - for (std::vector::const_iterator j = m_myPerr.destinations.begin (); j - != m_myPerr.destinations.end (); j++) - { - if (((*i).destination == (*j).destination) && ((*j).seqnum > (*i).seqnum)) - { - should_add = false; - } - } - if (should_add) - { - m_myPerr.destinations.push_back (*i); - } - } - } + { + std::vector::const_iterator end = receivers.end (); + for (std::vector::const_iterator i = receivers.begin (); i != end; i++) + { + bool should_add = true; + for (std::vector::const_iterator j = m_myPerr.receivers.begin (); j + != m_myPerr.receivers.end (); j++) + { + if ((*i) == (*j)) + { + should_add = false; + } + } + if (should_add) + { + m_myPerr.receivers.push_back (*i); + } + } + } + { + std::vector::const_iterator end = failedDestinations.end (); + for (std::vector::const_iterator i = failedDestinations.begin (); i != end; i++) + { + bool should_add = true; + for (std::vector::const_iterator j = m_myPerr.destinations.begin (); j + != m_myPerr.destinations.end (); j++) + { + if (((*i).destination == (*j).destination) && ((*j).seqnum > (*i).seqnum)) + { + should_add = false; + } + } + if (should_add) + { + m_myPerr.destinations.push_back (*i); + } + } + } SendMyPerr (); } void @@ -440,33 +440,33 @@ HwmpProtocolMac::GetChannelId () const } HwmpProtocolMac::Statistics::Statistics () : txPreq (0), rxPreq (0), txPrep (0), rxPrep (0), txPerr (0), rxPerr (0), txMgt (0), txMgtBytes (0), - rxMgt (0), rxMgtBytes (0), txData (0), txDataBytes (0), rxData (0), rxDataBytes (0) + rxMgt (0), rxMgtBytes (0), txData (0), txDataBytes (0), rxData (0), rxDataBytes (0) { } void HwmpProtocolMac::Statistics::Print (std::ostream & os) const { os << "" << std::endl; + "txPreq= \"" << txPreq << "\"" << std::endl << + "txPrep=\"" << txPrep << "\"" << std::endl << + "txPerr=\"" << txPerr << "\"" << std::endl << + "rxPreq=\"" << rxPreq << "\"" << std::endl << + "rxPrep=\"" << rxPrep << "\"" << std::endl << + "rxPerr=\"" << rxPerr << "\"" << std::endl << + "txMgt=\"" << txMgt << "\"" << std::endl << + "txMgtBytes=\"" << txMgtBytes << "\"" << std::endl << + "rxMgt=\"" << rxMgt << "\"" << std::endl << + "rxMgtBytes=\"" << rxMgtBytes << "\"" << std::endl << + "txData=\"" << txData << "\"" << std::endl << + "txDataBytes=\"" << txDataBytes << "\"" << std::endl << + "rxData=\"" << rxData << "\"" << std::endl << + "rxDataBytes=\"" << rxDataBytes << "\"/>" << std::endl; } void HwmpProtocolMac::Report (std::ostream & os) const { os << "GetAddress () << "\">" << std::endl; + "address =\"" << m_parent->GetAddress () << "\">" << std::endl; m_stats.Print (os); os << "" << std::endl; } @@ -477,4 +477,4 @@ HwmpProtocolMac::ResetStats () } } //namespace dot11s -}//namespace ns3 +} //namespace ns3 diff --git a/src/mesh/model/dot11s/hwmp-protocol.cc b/src/mesh/model/dot11s/hwmp-protocol.cc index 9e49f3c20..8aa4c27a1 100644 --- a/src/mesh/model/dot11s/hwmp-protocol.cc +++ b/src/mesh/model/dot11s/hwmp-protocol.cc @@ -52,111 +52,111 @@ HwmpProtocol::GetTypeId () "Random delay at first proactive PREQ", TimeValue (Seconds (0.1)), MakeTimeAccessor ( - &HwmpProtocol::m_randomStart), + &HwmpProtocol::m_randomStart), MakeTimeChecker () - ) + ) .AddAttribute ( "MaxQueueSize", "Maximum number of packets we can store when resolving route", UintegerValue (255), MakeUintegerAccessor ( - &HwmpProtocol::m_maxQueueSize), + &HwmpProtocol::m_maxQueueSize), MakeUintegerChecker (1) - ) + ) .AddAttribute ( "Dot11MeshHWMPmaxPREQretries", "Maximum number of retries before we suppose the destination to be unreachable", UintegerValue (3), MakeUintegerAccessor ( - &HwmpProtocol::m_dot11MeshHWMPmaxPREQretries), + &HwmpProtocol::m_dot11MeshHWMPmaxPREQretries), MakeUintegerChecker (1) - ) + ) .AddAttribute ( "Dot11MeshHWMPnetDiameterTraversalTime", "Time we suppose the packet to go from one edge of the network to another", TimeValue (MicroSeconds (1024*100)), MakeTimeAccessor ( - &HwmpProtocol::m_dot11MeshHWMPnetDiameterTraversalTime), + &HwmpProtocol::m_dot11MeshHWMPnetDiameterTraversalTime), MakeTimeChecker () - ) + ) .AddAttribute ( "Dot11MeshHWMPpreqMinInterval", "Minimal interval between to successive PREQs", TimeValue (MicroSeconds (1024*100)), MakeTimeAccessor ( - &HwmpProtocol::m_dot11MeshHWMPpreqMinInterval), + &HwmpProtocol::m_dot11MeshHWMPpreqMinInterval), MakeTimeChecker () - ) + ) .AddAttribute ( "Dot11MeshHWMPperrMinInterval", "Minimal interval between to successive PREQs", TimeValue (MicroSeconds (1024*100)), MakeTimeAccessor (&HwmpProtocol::m_dot11MeshHWMPperrMinInterval), MakeTimeChecker () - ) + ) .AddAttribute ( "Dot11MeshHWMPactiveRootTimeout", "Lifetime of poractive routing information", TimeValue (MicroSeconds (1024*5000)), MakeTimeAccessor ( - &HwmpProtocol::m_dot11MeshHWMPactiveRootTimeout), + &HwmpProtocol::m_dot11MeshHWMPactiveRootTimeout), MakeTimeChecker () - ) + ) .AddAttribute ( "Dot11MeshHWMPactivePathTimeout", - "Lifetime of reactive routing information", - TimeValue (MicroSeconds (1024*5000)), - MakeTimeAccessor ( - &HwmpProtocol::m_dot11MeshHWMPactivePathTimeout), - MakeTimeChecker () - ) + "Lifetime of reactive routing information", + TimeValue (MicroSeconds (1024*5000)), + MakeTimeAccessor ( + &HwmpProtocol::m_dot11MeshHWMPactivePathTimeout), + MakeTimeChecker () + ) .AddAttribute ( "Dot11MeshHWMPpathToRootInterval", "Interval between two successive proactive PREQs", TimeValue (MicroSeconds (1024*2000)), MakeTimeAccessor ( - &HwmpProtocol::m_dot11MeshHWMPpathToRootInterval), + &HwmpProtocol::m_dot11MeshHWMPpathToRootInterval), MakeTimeChecker () - ) + ) .AddAttribute ( "Dot11MeshHWMPrannInterval", "Lifetime of poractive routing information", TimeValue (MicroSeconds (1024*5000)), MakeTimeAccessor ( - &HwmpProtocol::m_dot11MeshHWMPrannInterval), + &HwmpProtocol::m_dot11MeshHWMPrannInterval), MakeTimeChecker () - ) + ) .AddAttribute ( "MaxTtl", "Initial value of Time To Live field", UintegerValue (32), MakeUintegerAccessor ( - &HwmpProtocol::m_maxTtl), + &HwmpProtocol::m_maxTtl), MakeUintegerChecker (2) - ) + ) .AddAttribute ( "UnicastPerrThreshold", "Maximum number of PERR receivers, when we send a PERR as a chain of unicasts", UintegerValue (32), MakeUintegerAccessor ( - &HwmpProtocol::m_unicastPerrThreshold), + &HwmpProtocol::m_unicastPerrThreshold), MakeUintegerChecker (1) ) .AddAttribute ( "UnicastPreqThreshold", "Maximum number of PREQ receivers, when we send a PREQ as a chain of unicasts", UintegerValue (1), MakeUintegerAccessor ( - &HwmpProtocol::m_unicastPreqThreshold), + &HwmpProtocol::m_unicastPreqThreshold), MakeUintegerChecker (1) ) .AddAttribute ( "UnicastDataThreshold", "Maximum number ofbroadcast receivers, when we send a broadcast as a chain of unicasts", UintegerValue (1), MakeUintegerAccessor ( - &HwmpProtocol::m_unicastDataThreshold), + &HwmpProtocol::m_unicastDataThreshold), MakeUintegerChecker (1) - ) + ) .AddAttribute ( "DoFlag", "Destination only HWMP flag", BooleanValue (false), MakeBooleanAccessor ( - &HwmpProtocol::m_doFlag), + &HwmpProtocol::m_doFlag), MakeBooleanChecker () - ) + ) .AddAttribute ( "RfFlag", "Reply and forward flag", BooleanValue (true), MakeBooleanAccessor ( - &HwmpProtocol::m_rfFlag), + &HwmpProtocol::m_rfFlag), MakeBooleanChecker () ) .AddTraceSource ( "RouteDiscoveryTime", @@ -164,11 +164,11 @@ HwmpProtocol::GetTypeId () MakeTraceSourceAccessor ( &HwmpProtocol::m_routeDiscoveryTimeCallback) ) - ; + ; return tid; } -HwmpProtocol::HwmpProtocol (): +HwmpProtocol::HwmpProtocol () : m_dataSeqno (1), m_hwmpSeqno (1), m_preqId (0), @@ -208,7 +208,7 @@ void HwmpProtocol::DoDispose () { NS_LOG_FUNCTION_NOARGS (); - for (std::map::iterator i = m_preqTimeouts.begin (); i != m_preqTimeouts.end (); i ++) + for (std::map::iterator i = m_preqTimeouts.begin (); i != m_preqTimeouts.end (); i++) { i->second.preqTimeout.Cancel (); } @@ -230,7 +230,7 @@ HwmpProtocol::RequestRoute ( Ptr constPacket, uint16_t protocolType, //ethrnet 'Protocol' field MeshL2RoutingProtocol::RouteReplyCallback routeReply -) + ) { Ptr packet = constPacket->Copy (); HwmpTag tag; @@ -257,20 +257,20 @@ HwmpProtocol::RequestRoute ( tag.DecrementTtl (); if (tag.GetTtl () == 0) { - m_stats.droppedTtl ++; + m_stats.droppedTtl++; return false; } } if (destination == Mac48Address::GetBroadcast ()) { - m_stats.txBroadcast ++; + m_stats.txBroadcast++; m_stats.txBytes += packet->GetSize (); //channel IDs where we have already sent broadcast: std::vector channels; - for (HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) + for (HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin++) { bool shouldSend = true; - for (std::vector::const_iterator chan = channels.begin (); chan != channels.end (); chan ++) + for (std::vector::const_iterator chan = channels.begin (); chan != channels.end (); chan++) { if ((*chan) == plugin->second->GetChannelId ()) { @@ -283,7 +283,7 @@ HwmpProtocol::RequestRoute ( } channels.push_back (plugin->second->GetChannelId ()); std::vector receivers = GetBroadcastReceivers (plugin->first); - for (std::vector::const_iterator i = receivers.begin (); i != receivers.end (); i ++) + for (std::vector::const_iterator i = receivers.begin (); i != receivers.end (); i++) { Ptr packetCopy = packet->Copy(); // @@ -305,7 +305,7 @@ HwmpProtocol::RequestRoute ( } bool HwmpProtocol::RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source, - const Mac48Address destination, Ptr packet, uint16_t& protocolType) + const Mac48Address destination, Ptr packet, uint16_t& protocolType) { HwmpTag tag; if (!packet->RemovePacketTag (tag)) @@ -316,7 +316,7 @@ HwmpProtocol::RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source, } bool HwmpProtocol::ForwardUnicast (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, - Ptr packet, uint16_t protocolType, RouteReplyCallback routeReply, uint32_t ttl) + Ptr packet, uint16_t protocolType, RouteReplyCallback routeReply, uint32_t ttl) { NS_ASSERT(destination != Mac48Address::GetBroadcast ()); HwmpRtable::LookupResult result = m_rtable->LookupReactive (destination); @@ -334,7 +334,7 @@ HwmpProtocol::ForwardUnicast (uint32_t sourceIface, const Mac48Address source, { //reply immediately: routeReply (true, packet, source, destination, protocolType, result.ifIndex); - m_stats.txUnicast ++; + m_stats.txUnicast++; m_stats.txBytes += packet->GetSize (); return true; } @@ -357,7 +357,7 @@ HwmpProtocol::ForwardUnicast (uint32_t sourceIface, const Mac48Address source, std::vector destinations = m_rtable->GetUnreachableDestinations (result.retransmitter); InitiatePathError (MakePathError (destinations)); } - m_stats.totalDropped ++; + m_stats.totalDropped++; return false; } //Request a destination: @@ -370,8 +370,8 @@ HwmpProtocol::ForwardUnicast (uint32_t sourceIface, const Mac48Address source, { dst_seqno = result.seqnum; } - m_stats.initiatedPreq ++; - for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) + m_stats.initiatedPreq++; + for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i++) { i->second->RequestDestination (destination, originator_seqno, dst_seqno); } @@ -385,12 +385,12 @@ HwmpProtocol::ForwardUnicast (uint32_t sourceIface, const Mac48Address source, pkt.inInterface = sourceIface; if (QueuePacket (pkt)) { - m_stats.totalQueued ++; + m_stats.totalQueued++; return true; } else { - m_stats.totalDropped ++; + m_stats.totalDropped++; return false; } } @@ -423,36 +423,36 @@ HwmpProtocol::ReceivePreq (IePreq preq, Mac48Address from, uint32_t interface, M std::vector > destinations = preq.GetDestinationList (); //Add reactive path to originator: if ( - (freshInfo) || - ( - (m_rtable->LookupReactive (preq.GetOriginatorAddress ()).retransmitter == Mac48Address::GetBroadcast ()) || - (m_rtable->LookupReactive (preq.GetOriginatorAddress ()).metric > preq.GetMetric ()) - ) - ) + (freshInfo) || + ( + (m_rtable->LookupReactive (preq.GetOriginatorAddress ()).retransmitter == Mac48Address::GetBroadcast ()) || + (m_rtable->LookupReactive (preq.GetOriginatorAddress ()).metric > preq.GetMetric ()) + ) + ) { m_rtable->AddReactivePath ( - preq.GetOriginatorAddress (), - from, - interface, - preq.GetMetric (), - MicroSeconds (preq.GetLifetime () * 1024), - preq.GetOriginatorSeqNumber () + preq.GetOriginatorAddress (), + from, + interface, + preq.GetMetric (), + MicroSeconds (preq.GetLifetime () * 1024), + preq.GetOriginatorSeqNumber () ); ReactivePathResolved (preq.GetOriginatorAddress ()); } if ( - (m_rtable->LookupReactive (fromMp).retransmitter == Mac48Address::GetBroadcast ()) || - (m_rtable->LookupReactive (fromMp).metric > metric) - ) + (m_rtable->LookupReactive (fromMp).retransmitter == Mac48Address::GetBroadcast ()) || + (m_rtable->LookupReactive (fromMp).metric > metric) + ) { m_rtable->AddReactivePath ( - fromMp, - from, - interface, - metric, - MicroSeconds (preq.GetLifetime () * 1024), - preq.GetOriginatorSeqNumber () - ); + fromMp, + from, + interface, + metric, + MicroSeconds (preq.GetLifetime () * 1024), + preq.GetOriginatorSeqNumber () + ); ReactivePathResolved (fromMp); } for (std::vector >::const_iterator i = destinations.begin (); i != destinations.end (); i++) @@ -468,71 +468,71 @@ HwmpProtocol::ReceivePreq (IePreq preq, Mac48Address from, uint32_t interface, M //Add proactive path only if it is the better then existed //before if ( - ((m_rtable->LookupProactive ()).retransmitter == Mac48Address::GetBroadcast ()) || - ((m_rtable->LookupProactive ()).metric > preq.GetMetric ()) + ((m_rtable->LookupProactive ()).retransmitter == Mac48Address::GetBroadcast ()) || + ((m_rtable->LookupProactive ()).metric > preq.GetMetric ()) ) { m_rtable->AddProactivePath ( - preq.GetMetric (), - preq.GetOriginatorAddress (), - from, - interface, - MicroSeconds (preq.GetLifetime () * 1024), - preq.GetOriginatorSeqNumber () - ); + preq.GetMetric (), + preq.GetOriginatorAddress (), + from, + interface, + MicroSeconds (preq.GetLifetime () * 1024), + preq.GetOriginatorSeqNumber () + ); ProactivePathResolved (); } if (!preq.IsNeedNotPrep ()) { SendPrep ( - GetAddress (), - preq.GetOriginatorAddress (), - from, - (uint32_t)0, - preq.GetOriginatorSeqNumber (), - GetNextHwmpSeqno (), - preq.GetLifetime (), - interface - ); + GetAddress (), + preq.GetOriginatorAddress (), + from, + (uint32_t)0, + preq.GetOriginatorSeqNumber (), + GetNextHwmpSeqno (), + preq.GetLifetime (), + interface + ); } break; } if ((*i)->GetDestinationAddress () == GetAddress ()) { SendPrep ( - GetAddress (), - preq.GetOriginatorAddress (), - from, - (uint32_t)0, - preq.GetOriginatorSeqNumber (), - GetNextHwmpSeqno (), - preq.GetLifetime (), - interface - ); + GetAddress (), + preq.GetOriginatorAddress (), + from, + (uint32_t)0, + preq.GetOriginatorSeqNumber (), + GetNextHwmpSeqno (), + preq.GetLifetime (), + interface + ); NS_ASSERT(m_rtable->LookupReactive (preq.GetOriginatorAddress ()).retransmitter != Mac48Address::GetBroadcast ()); preq.DelDestinationAddressElement ((*i)->GetDestinationAddress ()); continue; } //check if can answer: HwmpRtable::LookupResult result = m_rtable->LookupReactive ((*i)->GetDestinationAddress ()); - if ((! ((*i)->IsDo ())) && (result.retransmitter != Mac48Address::GetBroadcast ())) + if ((!((*i)->IsDo ())) && (result.retransmitter != Mac48Address::GetBroadcast ())) { //have a valid information and can answer uint32_t lifetime = result.lifetime.GetMicroSeconds () / 1024; if ((lifetime > 0) && ((int32_t)(result.seqnum - (*i)->GetDestSeqNumber ()) >= 0)) { SendPrep ( - (*i)->GetDestinationAddress (), - preq.GetOriginatorAddress (), - from, - result.metric, - preq.GetOriginatorSeqNumber (), - result.seqnum, - lifetime, - interface - ); + (*i)->GetDestinationAddress (), + preq.GetOriginatorAddress (), + from, + result.metric, + preq.GetOriginatorSeqNumber (), + result.seqnum, + lifetime, + interface + ); m_rtable->AddPrecursor ((*i)->GetDestinationAddress (), interface, from, - MicroSeconds (preq.GetLifetime () * 1024)); + MicroSeconds (preq.GetLifetime () * 1024)); if ((*i)->IsRf ()) { (*i)->SetFlags (true, false, (*i)->IsUsn ()); //DO = 1, RF = 0 @@ -552,7 +552,7 @@ HwmpProtocol::ReceivePreq (IePreq preq, Mac48Address from, uint32_t interface, M } //Forward PREQ to all interfaces: NS_LOG_DEBUG("I am " << GetAddress () << "retransmitting PREQ:" << preq); - for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) + for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i++) { i->second->SendPreq (preq); } @@ -584,41 +584,41 @@ HwmpProtocol::ReceivePrep (IePrep prep, Mac48Address from, uint32_t interface, M //Add a reactive path only if seqno is fresher or it improves the //metric if ( - (freshInfo) || - ( - ((m_rtable->LookupReactive (prep.GetOriginatorAddress ())).retransmitter == Mac48Address::GetBroadcast ()) || - ((m_rtable->LookupReactive (prep.GetOriginatorAddress ())).metric > prep.GetMetric ()) - ) - ) + (freshInfo) || + ( + ((m_rtable->LookupReactive (prep.GetOriginatorAddress ())).retransmitter == Mac48Address::GetBroadcast ()) || + ((m_rtable->LookupReactive (prep.GetOriginatorAddress ())).metric > prep.GetMetric ()) + ) + ) { m_rtable->AddReactivePath ( - prep.GetOriginatorAddress (), - from, - interface, - prep.GetMetric (), - MicroSeconds (prep.GetLifetime () * 1024), - prep.GetOriginatorSeqNumber ()); + prep.GetOriginatorAddress (), + from, + interface, + prep.GetMetric (), + MicroSeconds (prep.GetLifetime () * 1024), + prep.GetOriginatorSeqNumber ()); m_rtable->AddPrecursor (prep.GetDestinationAddress (), interface, from, - MicroSeconds (prep.GetLifetime () * 1024)); + MicroSeconds (prep.GetLifetime () * 1024)); if (result.retransmitter != Mac48Address::GetBroadcast ()) { m_rtable->AddPrecursor (prep.GetOriginatorAddress (), interface, result.retransmitter, - result.lifetime); + result.lifetime); } ReactivePathResolved (prep.GetOriginatorAddress ()); } if ( - ((m_rtable->LookupReactive (fromMp)).retransmitter == Mac48Address::GetBroadcast ()) || - ((m_rtable->LookupReactive (fromMp)).metric > metric) - ) + ((m_rtable->LookupReactive (fromMp)).retransmitter == Mac48Address::GetBroadcast ()) || + ((m_rtable->LookupReactive (fromMp)).metric > metric) + ) { m_rtable->AddReactivePath ( - fromMp, - from, - interface, - metric, - MicroSeconds(prep.GetLifetime () * 1024), - prep.GetOriginatorSeqNumber ()); + fromMp, + from, + interface, + metric, + MicroSeconds(prep.GetLifetime () * 1024), + prep.GetOriginatorSeqNumber ()); ReactivePathResolved (fromMp); } if (prep.GetDestinationAddress () == GetAddress ()) @@ -642,18 +642,18 @@ HwmpProtocol::ReceivePerr (std::vector destinations, Mac48Add NS_LOG_DEBUG ("I am "< retval; HwmpRtable::LookupResult result; - for (unsigned int i = 0; i < destinations.size (); i ++) - { - result = m_rtable->LookupReactiveExpired (destinations[i].destination); - if (!( - (result.retransmitter != from) || - (result.ifIndex != interface) || - ((int32_t)(result.seqnum - destinations[i].seqnum) > 0) - )) - { - retval.push_back (destinations[i]); - } - } + for (unsigned int i = 0; i < destinations.size (); i++) + { + result = m_rtable->LookupReactiveExpired (destinations[i].destination); + if (!( + (result.retransmitter != from) || + (result.ifIndex != interface) || + ((int32_t)(result.seqnum - destinations[i].seqnum) > 0) + )) + { + retval.push_back (destinations[i]); + } + } if (retval.size () == 0) { return; @@ -662,14 +662,14 @@ HwmpProtocol::ReceivePerr (std::vector destinations, Mac48Add } void HwmpProtocol::SendPrep ( - Mac48Address src, - Mac48Address dst, - Mac48Address retransmitter, - uint32_t initMetric, - uint32_t originatorDsn, - uint32_t destinationSN, - uint32_t lifetime, - uint32_t interface) + Mac48Address src, + Mac48Address dst, + Mac48Address retransmitter, + uint32_t initMetric, + uint32_t originatorDsn, + uint32_t destinationSN, + uint32_t lifetime, + uint32_t interface) { IePrep prep; prep.SetHopcount (0); @@ -683,7 +683,7 @@ HwmpProtocol::SendPrep ( HwmpProtocolMacMap::const_iterator prep_sender = m_interfaces.find (interface); NS_ASSERT(prep_sender != m_interfaces.end ()); prep_sender->second->SendPrep (prep, retransmitter); - m_stats.initiatedPrep ++; + m_stats.initiatedPrep++; } bool HwmpProtocol::Install (Ptr mp) @@ -714,7 +714,7 @@ HwmpProtocol::Install (Ptr mp) mp->SetRoutingProtocol (this); // Mesh point aggregates all installed protocols mp->AggregateObject (this); - m_address = Mac48Address::ConvertFrom (mp->GetAddress ());// address; + m_address = Mac48Address::ConvertFrom (mp->GetAddress ()); // address; return true; } void @@ -745,13 +745,13 @@ HwmpProtocol::DropDataFrame (uint32_t seqno, Mac48Address source) m_lastDataSeqno[source] = seqno; } else - { - if ((int32_t)(i->second - seqno) >= 0) - { - return true; - } - m_lastDataSeqno[source] = seqno; - } + { + if ((int32_t)(i->second - seqno) >= 0) + { + return true; + } + m_lastDataSeqno[source] = seqno; + } return false; } HwmpProtocol::PathError @@ -764,65 +764,65 @@ HwmpProtocol::MakePathError (std::vector destinations) { return retval; } - m_stats.initiatedPerr ++; - for (unsigned int i = 0; i < destinations.size (); i ++) - { - retval.destinations.push_back (destinations[i]); - m_rtable->DeleteReactivePath (destinations[i].destination); - } + m_stats.initiatedPerr++; + for (unsigned int i = 0; i < destinations.size (); i++) + { + retval.destinations.push_back (destinations[i]); + m_rtable->DeleteReactivePath (destinations[i].destination); + } return retval; } void HwmpProtocol::InitiatePathError(PathError perr) { - for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) - { - std::vector receivers_for_interface; - for (unsigned int j = 0; j < perr.receivers.size (); j ++) - { - if (i->first == perr.receivers[j].first) - { - receivers_for_interface.push_back (perr.receivers[j].second); - } - } - i->second->InitiatePerr (perr.destinations, receivers_for_interface); - } + for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i++) + { + std::vector receivers_for_interface; + for (unsigned int j = 0; j < perr.receivers.size (); j++) + { + if (i->first == perr.receivers[j].first) + { + receivers_for_interface.push_back (perr.receivers[j].second); + } + } + i->second->InitiatePerr (perr.destinations, receivers_for_interface); + } } void HwmpProtocol::ForwardPathError(PathError perr) { - for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) - { - std::vector receivers_for_interface; - for (unsigned int j = 0; j < perr.receivers.size (); j ++) - { - if (i->first == perr.receivers[j].first) - { - receivers_for_interface.push_back (perr.receivers[j].second); - } - } - i->second->ForwardPerr (perr.destinations, receivers_for_interface); - } + for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i++) + { + std::vector receivers_for_interface; + for (unsigned int j = 0; j < perr.receivers.size (); j++) + { + if (i->first == perr.receivers[j].first) + { + receivers_for_interface.push_back (perr.receivers[j].second); + } + } + i->second->ForwardPerr (perr.destinations, receivers_for_interface); + } } std::vector > HwmpProtocol::GetPerrReceivers (std::vector failedDest) { HwmpRtable::PrecursorList retval; - for (unsigned int i = 0; i < failedDest.size (); i ++) - { - HwmpRtable::PrecursorList precursors = m_rtable->GetPrecursors (failedDest[i].destination); - m_rtable->DeleteReactivePath (failedDest[i].destination); - m_rtable->DeleteProactivePath (failedDest[i].destination); - for (unsigned int j = 0; j < precursors.size (); j ++) - { - retval.push_back (precursors[j]); - } - } - //Check if we have dublicates in retval and precursors: - for (unsigned int i = 0; i < retval.size (); i ++) + for (unsigned int i = 0; i < failedDest.size (); i++) { - for (unsigned int j = i+1; j < retval.size (); j ++) + HwmpRtable::PrecursorList precursors = m_rtable->GetPrecursors (failedDest[i].destination); + m_rtable->DeleteReactivePath (failedDest[i].destination); + m_rtable->DeleteProactivePath (failedDest[i].destination); + for (unsigned int j = 0; j < precursors.size (); j++) + { + retval.push_back (precursors[j]); + } + } + //Check if we have dublicates in retval and precursors: + for (unsigned int i = 0; i < retval.size (); i++) + { + for (unsigned int j = i+1; j < retval.size (); j++) { if (retval[i].second == retval[j].second) { @@ -841,10 +841,10 @@ HwmpProtocol::GetPreqReceivers (uint32_t interface) retval = m_neighboursCallback (interface); } if ((retval.size () >= m_unicastPreqThreshold) || (retval.size () == 0)) - { - retval.clear (); - retval.push_back (Mac48Address::GetBroadcast ()); - } + { + retval.clear (); + retval.push_back (Mac48Address::GetBroadcast ()); + } return retval; } std::vector @@ -856,10 +856,10 @@ HwmpProtocol::GetBroadcastReceivers (uint32_t interface) retval = m_neighboursCallback (interface); } if ((retval.size () >= m_unicastDataThreshold) || (retval.size () == 0)) - { - retval.clear (); - retval.push_back (Mac48Address::GetBroadcast ()); - } + { + retval.clear (); + retval.push_back (Mac48Address::GetBroadcast ()); + } return retval; } @@ -924,7 +924,7 @@ HwmpProtocol::ReactivePathResolved (Mac48Address dst) packet.pkt->RemovePacketTag (tag); tag.SetAddress (result.retransmitter); packet.pkt->AddPacketTag (tag); - m_stats.txUnicast ++; + m_stats.txUnicast++; m_stats.txBytes += packet.pkt->GetSize (); packet.reply (true, packet.pkt, packet.src, packet.dst, packet.protocol, result.ifIndex); @@ -948,7 +948,7 @@ HwmpProtocol::ProactivePathResolved () } tag.SetAddress (result.retransmitter); packet.pkt->AddPacketTag (tag); - m_stats.txUnicast ++; + m_stats.txUnicast++; m_stats.txBytes += packet.pkt->GetSize (); packet.reply (true, packet.pkt, packet.src, packet.dst, packet.protocol, result.ifIndex); @@ -991,7 +991,7 @@ HwmpProtocol::RetryPathDiscovery (Mac48Address dst, uint8_t numOfRetry) //purge queue and delete entry from retryDatabase while (packet.pkt != 0) { - m_stats.totalDropped ++; + m_stats.totalDropped++; packet.reply (false, packet.pkt, packet.src, packet.dst, packet.protocol, HwmpRtable::MAX_METRIC); packet = DequeueFirstPacketByDst (dst); } @@ -1004,7 +1004,7 @@ HwmpProtocol::RetryPathDiscovery (Mac48Address dst, uint8_t numOfRetry) numOfRetry++; uint32_t originator_seqno = GetNextHwmpSeqno (); uint32_t dst_seqno = m_rtable->LookupReactiveExpired (dst).seqnum; - for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) + for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i++) { i->second->RequestDestination (dst, originator_seqno, dst_seqno); } @@ -1041,7 +1041,7 @@ HwmpProtocol::SendProactivePreq () preq.SetOriginatorAddress (GetAddress ()); preq.SetPreqID (GetNextPreqId ()); preq.SetOriginatorSeqNumber (GetNextHwmpSeqno ()); - for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++) + for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i++) { i->second->SendPreq (preq); } @@ -1075,13 +1075,13 @@ HwmpProtocol::GetMaxTtl () uint32_t HwmpProtocol::GetNextPreqId () { - m_preqId ++; + m_preqId++; return m_preqId; } uint32_t HwmpProtocol::GetNextHwmpSeqno () { - m_hwmpSeqno ++; + m_hwmpSeqno++; return m_hwmpSeqno; } uint32_t @@ -1110,43 +1110,44 @@ HwmpProtocol::Statistics::Statistics () : initiatedPreq (0), initiatedPrep (0), initiatedPerr (0) -{} +{ +} void HwmpProtocol::Statistics::Print (std::ostream & os) const { os << "" << std::endl; + "txUnicast=\"" << txUnicast << "\" " + "txBroadcast=\"" << txBroadcast << "\" " + "txBytes=\"" << txBytes << "\" " + "droppedTtl=\"" << droppedTtl << "\" " + "totalQueued=\"" << totalQueued << "\" " + "totalDropped=\"" << totalDropped << "\" " + "initiatedPreq=\"" << initiatedPreq << "\" " + "initiatedPrep=\"" << initiatedPrep << "\" " + "initiatedPerr=\"" << initiatedPerr << "\"/>" << std::endl; } void HwmpProtocol::Report (std::ostream & os) const { os << "" << std::endl; + "address=\"" << m_address << "\"" << std::endl << + "maxQueueSize=\"" << m_maxQueueSize << "\"" << std::endl << + "Dot11MeshHWMPmaxPREQretries=\"" << (uint16_t)m_dot11MeshHWMPmaxPREQretries << "\"" << std::endl << + "Dot11MeshHWMPnetDiameterTraversalTime=\"" << m_dot11MeshHWMPnetDiameterTraversalTime.GetSeconds () << "\"" << std::endl << + "Dot11MeshHWMPpreqMinInterval=\"" << m_dot11MeshHWMPpreqMinInterval.GetSeconds () << "\"" << std::endl << + "Dot11MeshHWMPperrMinInterval=\"" << m_dot11MeshHWMPperrMinInterval.GetSeconds () << "\"" << std::endl << + "Dot11MeshHWMPactiveRootTimeout=\"" << m_dot11MeshHWMPactiveRootTimeout.GetSeconds () << "\"" << std::endl << + "Dot11MeshHWMPactivePathTimeout=\"" << m_dot11MeshHWMPactivePathTimeout.GetSeconds () << "\"" << std::endl << + "Dot11MeshHWMPpathToRootInterval=\"" << m_dot11MeshHWMPpathToRootInterval.GetSeconds () << "\"" << std::endl << + "Dot11MeshHWMPrannInterval=\"" << m_dot11MeshHWMPrannInterval.GetSeconds () << "\"" << std::endl << + "isRoot=\"" << m_isRoot << "\"" << std::endl << + "maxTtl=\"" << (uint16_t)m_maxTtl << "\"" << std::endl << + "unicastPerrThreshold=\"" << (uint16_t)m_unicastPerrThreshold << "\"" << std::endl << + "unicastPreqThreshold=\"" << (uint16_t)m_unicastPreqThreshold << "\"" << std::endl << + "unicastDataThreshold=\"" << (uint16_t)m_unicastDataThreshold << "\"" << std::endl << + "doFlag=\"" << m_doFlag << "\"" << std::endl << + "rfFlag=\"" << m_rfFlag << "\">" << std::endl; m_stats.Print (os); - for (HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) + for (HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin++) { plugin->second->Report (os); } @@ -1156,7 +1157,7 @@ void HwmpProtocol::ResetStats () { m_stats = Statistics (); - for (HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++) + for (HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin++) { plugin->second->ResetStats (); } @@ -1165,6 +1166,7 @@ HwmpProtocol::QueuedPacket::QueuedPacket () : pkt (0), protocol (0), inInterface (0) -{} +{ +} } //namespace dot11s } //namespace ns3 diff --git a/src/mesh/model/dot11s/hwmp-protocol.h b/src/mesh/model/dot11s/hwmp-protocol.h index 29f3c52e6..4535a1ef2 100644 --- a/src/mesh/model/dot11s/hwmp-protocol.h +++ b/src/mesh/model/dot11s/hwmp-protocol.h @@ -60,10 +60,10 @@ public: } FailedDestination; /// Route request, inherited from MeshL2RoutingProtocol bool RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, - Ptr packet, uint16_t protocolType, RouteReplyCallback routeReply); + Ptr packet, uint16_t protocolType, RouteReplyCallback routeReply); /// Cleanup packet from all tags bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source, - const Mac48Address destination, Ptr packet, uint16_t& protocolType); + const Mac48Address destination, Ptr packet, uint16_t& protocolType); /** * \brief Install HWMP on given mesh point. * @@ -75,7 +75,7 @@ public: bool Install (Ptr); void PeerLinkStatus (Mac48Address meshPontAddress, Mac48Address peerAddress, uint32_t interface,bool status); ///\brief This callback is used to obtain active neighbours on a given interface - ///\param cb is a callback, which returns a list of addresses on given interface (uint32_t) + ///\param cb is a callback, which returns a list of addresses on given interface (uint32_t) void SetNeighboursCallback (Callback, uint32_t> cb); ///\name Proactive PREQ mechanism: ///\{ @@ -115,7 +115,7 @@ private: typedef std::map > HwmpProtocolMacMap; /// Like RequestRoute, but for unicast packets bool ForwardUnicast (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, - Ptr packet, uint16_t protocolType, RouteReplyCallback routeReply, uint32_t ttl); + Ptr packet, uint16_t protocolType, RouteReplyCallback routeReply, uint32_t ttl); ///\name Interaction with HWMP MAC plugin //\{ @@ -123,14 +123,14 @@ private: void ReceivePrep (IePrep prep, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric); void ReceivePerr (std::vector, Mac48Address from, uint32_t interface, Mac48Address fromMp); void SendPrep ( - Mac48Address src, - Mac48Address dst, - Mac48Address retransmitter, - uint32_t initMetric, - uint32_t originatorDsn, - uint32_t destinationSN, - uint32_t lifetime, - uint32_t interface); + Mac48Address src, + Mac48Address dst, + Mac48Address retransmitter, + uint32_t initMetric, + uint32_t originatorDsn, + uint32_t destinationSN, + uint32_t lifetime, + uint32_t interface); /** * \brief forms a path error information element when list of destination fails on a given interface * \attention removes all entries from routing table! diff --git a/src/mesh/model/dot11s/hwmp-rtable.cc b/src/mesh/model/dot11s/hwmp-rtable.cc index 2f236d8d3..a1d8e2cb1 100644 --- a/src/mesh/model/dot11s/hwmp-rtable.cc +++ b/src/mesh/model/dot11s/hwmp-rtable.cc @@ -55,7 +55,7 @@ HwmpRtable::DoDispose () } void HwmpRtable::AddReactivePath (Mac48Address destination, Mac48Address retransmitter, uint32_t interface, - uint32_t metric, Time lifetime, uint32_t seqnum) + uint32_t metric, Time lifetime, uint32_t seqnum) { std::map::iterator i = m_routes.find (destination); if (i == m_routes.end ()) @@ -73,7 +73,7 @@ HwmpRtable::AddReactivePath (Mac48Address destination, Mac48Address retransmitte } void HwmpRtable::AddProactivePath (uint32_t metric, Mac48Address root, Mac48Address retransmitter, - uint32_t interface, Time lifetime, uint32_t seqnum) + uint32_t interface, Time lifetime, uint32_t seqnum) { m_root.root = root; m_root.retransmitter = retransmitter; @@ -84,7 +84,7 @@ HwmpRtable::AddProactivePath (uint32_t metric, Mac48Address root, Mac48Address r } void HwmpRtable::AddPrecursor (Mac48Address destination, uint32_t precursorInterface, - Mac48Address precursorAddress, Time lifetime) + Mac48Address precursorAddress, Time lifetime) { Precursor precursor; precursor.interface = precursorInterface; @@ -162,7 +162,7 @@ HwmpRtable::LookupReactiveExpired (Mac48Address destination) return LookupResult (); } return LookupResult (i->second.retransmitter, i->second.interface, i->second.metric, i->second.seqnum, - i->second.whenExpire - Simulator::Now ()); + i->second.whenExpire - Simulator::Now ()); } HwmpRtable::LookupResult HwmpRtable::LookupProactive () @@ -178,7 +178,7 @@ HwmpRtable::LookupResult HwmpRtable::LookupProactiveExpired () { return LookupResult (m_root.retransmitter, m_root.interface, m_root.metric, m_root.seqnum, - m_root.whenExpire - Simulator::Now ()); + m_root.whenExpire - Simulator::Now ()); } std::vector HwmpRtable::GetUnreachableDestinations (Mac48Address peerAddress) @@ -186,7 +186,7 @@ HwmpRtable::GetUnreachableDestinations (Mac48Address peerAddress) HwmpProtocol::FailedDestination dst; std::vector retval; for (std::map::iterator i = m_routes.begin (); i != m_routes.end (); i++) - { + { if (i->second.retransmitter == peerAddress) { dst.destination = i->first; @@ -194,7 +194,7 @@ HwmpRtable::GetUnreachableDestinations (Mac48Address peerAddress) dst.seqnum = i->second.seqnum; retval.push_back (dst); } - } + } //Lookup a path to root if (m_root.retransmitter == peerAddress) { @@ -213,7 +213,7 @@ HwmpRtable::GetPrecursors (Mac48Address destination) if (route != m_routes.end ()) { for (std::vector::const_iterator i = route->second.precursors.begin (); - i != route->second.precursors.end (); i++) + i != route->second.precursors.end (); i++) { if (i->whenExpire > Simulator::Now ()) { @@ -227,7 +227,7 @@ bool HwmpRtable::LookupResult::operator== (const HwmpRtable::LookupResult & o) const { return (retransmitter == o.retransmitter && ifIndex == o.ifIndex && metric == o.metric && seqnum - == o.seqnum); + == o.seqnum); } HwmpRtable::LookupResult::LookupResult (Mac48Address r, uint32_t i, uint32_t m, uint32_t s, Time l) : retransmitter (r), ifIndex (i), metric (m), seqnum (s), lifetime (l) @@ -237,7 +237,7 @@ bool HwmpRtable::LookupResult::IsValid () const { return !(retransmitter == Mac48Address::GetBroadcast () && ifIndex == INTERFACE_ANY && metric == MAX_METRIC - && seqnum == 0); + && seqnum == 0); } } //namespace dot11s } //namespace ns3 diff --git a/src/mesh/model/dot11s/hwmp-rtable.h b/src/mesh/model/dot11s/hwmp-rtable.h index 6997ea9bc..2e014f02f 100644 --- a/src/mesh/model/dot11s/hwmp-rtable.h +++ b/src/mesh/model/dot11s/hwmp-rtable.h @@ -49,10 +49,10 @@ public: uint32_t seqnum; Time lifetime; LookupResult (Mac48Address r = Mac48Address::GetBroadcast (), - uint32_t i = INTERFACE_ANY, - uint32_t m = MAX_METRIC, - uint32_t s = 0, - Time l = Seconds (0.0)); + uint32_t i = INTERFACE_ANY, + uint32_t m = MAX_METRIC, + uint32_t s = 0, + Time l = Seconds (0.0)); /// True for valid route bool IsValid () const; /// Compare route lookup results, used by tests @@ -76,7 +76,7 @@ public: uint32_t metric, Time lifetime, uint32_t seqnum - ); + ); void AddProactivePath ( uint32_t metric, Mac48Address root, @@ -84,7 +84,7 @@ public: uint32_t interface, Time lifetime, uint32_t seqnum - ); + ); void AddPrecursor (Mac48Address destination, uint32_t precursorInterface, Mac48Address precursorAddress, Time lifetime); PrecursorList GetPrecursors (Mac48Address destination); void DeleteProactivePath (); diff --git a/src/mesh/model/dot11s/hwmp-tag.cc b/src/mesh/model/dot11s/hwmp-tag.cc index f37d90875..737f63fb4 100644 --- a/src/mesh/model/dot11s/hwmp-tag.cc +++ b/src/mesh/model/dot11s/hwmp-tag.cc @@ -85,7 +85,7 @@ HwmpTag::GetSeqno () TypeId HwmpTag::GetTypeId () { - static TypeId tid = TypeId ("ns3::dot11s::HwmpTag") .SetParent () .AddConstructor (); + static TypeId tid = TypeId ("ns3::dot11s::HwmpTag").SetParent ().AddConstructor (); return tid; } @@ -99,9 +99,9 @@ uint32_t HwmpTag::GetSerializedSize () const { return 6 //address - + 1 //ttl - + 4 //metric - + 4; //seqno + + 1 //ttl + + 4 //metric + + 4; //seqno } void diff --git a/src/mesh/model/dot11s/ie-dot11s-beacon-timing.cc b/src/mesh/model/dot11s/ie-dot11s-beacon-timing.cc index 29954660b..fabfb4490 100644 --- a/src/mesh/model/dot11s/ie-dot11s-beacon-timing.cc +++ b/src/mesh/model/dot11s/ie-dot11s-beacon-timing.cc @@ -134,8 +134,8 @@ IeBeaconTiming::Print (std::ostream& os) const os << "Number of units: " << (uint16_t) m_numOfUnits << std::endl; for (NeighboursTimingUnitsList::const_iterator j = m_neighbours.begin (); j != m_neighbours.end (); j++) { - os << "AID=" << (uint16_t) (*j)->GetAid () << ", Last beacon was at " << (*j)->GetLastBeacon () - << ", with beacon interval " << (*j)->GetBeaconInterval () << std::endl; + os << "AID=" << (uint16_t)(*j)->GetAid () << ", Last beacon was at " << (*j)->GetLastBeacon () + << ", with beacon interval " << (*j)->GetBeaconInterval () << std::endl; } os << "" << std::endl; } @@ -168,49 +168,49 @@ IeBeaconTiming::DeserializeInformationField (Buffer::Iterator start, uint8_t len uint16_t IeBeaconTiming::TimestampToU16 (Time t) { - return ((uint16_t) ((t.GetMicroSeconds () >> 8) & 0xffff)); + return ((uint16_t)((t.GetMicroSeconds () >> 8) & 0xffff)); } ; uint16_t IeBeaconTiming::BeaconIntervalToU16 (Time t) { - return ((uint16_t) (t.GetMicroSeconds () >> 10) & 0xffff); + return ((uint16_t)(t.GetMicroSeconds () >> 10) & 0xffff); } uint8_t IeBeaconTiming::AidToU8 (uint16_t x) { - return (uint8_t) (x & 0xff); + return (uint8_t)(x & 0xff); } bool operator== (const IeBeaconTimingUnit & a, const IeBeaconTimingUnit & b) { return ((a.GetAid () == b.GetAid ()) && (a.GetLastBeacon () == b.GetLastBeacon ()) - && (a.GetBeaconInterval () == b.GetBeaconInterval ())); + && (a.GetBeaconInterval () == b.GetBeaconInterval ())); } bool IeBeaconTiming::operator== (WifiInformationElement const & a) { try { - IeBeaconTiming const & aa = dynamic_cast(a); - - if (m_numOfUnits != aa.m_numOfUnits) - { - return false; - } + IeBeaconTiming const & aa = dynamic_cast(a); + + if (m_numOfUnits != aa.m_numOfUnits) + { + return false; + } for (unsigned int i = 0; i < m_neighbours.size (); i++) - { - if (!(*PeekPointer (m_neighbours[i]) == *PeekPointer (aa.m_neighbours[i]))) - { - return false; - } - } + { + if (!(*PeekPointer (m_neighbours[i]) == *PeekPointer (aa.m_neighbours[i]))) + { + return false; + } + } return true; - } + } catch (std::bad_cast) - { - return false; - } + { + return false; + } } std::ostream & operator << (std::ostream &os, const IeBeaconTiming &a) diff --git a/src/mesh/model/dot11s/ie-dot11s-beacon-timing.h b/src/mesh/model/dot11s/ie-dot11s-beacon-timing.h index 5353a4079..43a3f4905 100644 --- a/src/mesh/model/dot11s/ie-dot11s-beacon-timing.h +++ b/src/mesh/model/dot11s/ie-dot11s-beacon-timing.h @@ -76,12 +76,12 @@ public: uint16_t aid, Time last_beacon, Time beacon_interval - ); + ); void DelNeighboursTimingElementUnit ( uint16_t aid, Time last_beacon, Time beacon_interval - ); + ); void ClearTimingElement (); /** * \name Inherited from WifiInformationElement diff --git a/src/mesh/model/dot11s/ie-dot11s-configuration.cc b/src/mesh/model/dot11s/ie-dot11s-configuration.cc index 12143a353..ccb96b0d8 100644 --- a/src/mesh/model/dot11s/ie-dot11s-configuration.cc +++ b/src/mesh/model/dot11s/ie-dot11s-configuration.cc @@ -26,7 +26,7 @@ namespace dot11s { Dot11sMeshCapability::Dot11sMeshCapability () : acceptPeerLinks (true), MCCASupported (false), MCCAEnabled (false), forwarding (true), beaconTimingReport ( - true), TBTTAdjustment (true), powerSaveLevel (false) + true), TBTTAdjustment (true), powerSaveLevel (false) { } uint8_t @@ -101,20 +101,20 @@ IeConfiguration::ElementId () const IeConfiguration::IeConfiguration () : m_APSPId (PROTOCOL_HWMP), m_APSMId (METRIC_AIRTIME), m_CCMId (CONGESTION_NULL), m_SPId ( - SYNC_NEIGHBOUR_OFFSET), m_APId (AUTH_NULL), m_neighbors (0) + SYNC_NEIGHBOUR_OFFSET), m_APId (AUTH_NULL), m_neighbors (0) { } uint8_t IeConfiguration::GetInformationFieldSize () const { return 1 // Version - + 4 // APSPId - + 4 // APSMId - + 4 // CCMId - + 4 // SPId - + 4 // APId - + 1 // Mesh formation info (see 7.3.2.86.6 of 802.11s draft 3.0) - + m_meshCap.GetSerializedSize (); + + 4 // APSPId + + 4 // APSMId + + 4 // CCMId + + 4 // SPId + + 4 // APId + + 1 // Mesh formation info (see 7.3.2.86.6 of 802.11s draft 3.0) + + m_meshCap.GetSerializedSize (); } void IeConfiguration::SerializeInformationField (Buffer::Iterator i) const @@ -160,12 +160,12 @@ IeConfiguration::Print (std::ostream& os) const { os << std::endl << "" << std::endl; os << "Number of neighbors: = " << (uint16_t) m_neighbors - << std::endl << "Active Path Selection Protocol ID: = " << (uint32_t) m_APSPId - << std::endl << "Active Path Selection Metric ID: = " << (uint32_t) m_APSMId - << std::endl << "Congestion Control Mode ID: = " << (uint32_t) m_CCMId - << std::endl << "Synchronize protocol ID: = " << (uint32_t) m_SPId - << std::endl << "Authentication protocol ID: = " << (uint32_t) m_APId - << std::endl << "Capabilities: = " << m_meshCap.GetUint16 () << std::endl; + << std::endl << "Active Path Selection Protocol ID: = " << (uint32_t) m_APSPId + << std::endl << "Active Path Selection Metric ID: = " << (uint32_t) m_APSMId + << std::endl << "Congestion Control Mode ID: = " << (uint32_t) m_CCMId + << std::endl << "Synchronize protocol ID: = " << (uint32_t) m_SPId + << std::endl << "Authentication protocol ID: = " << (uint32_t) m_APId + << std::endl << "Capabilities: = " << m_meshCap.GetUint16 () << std::endl; os << "" << std::endl; } void @@ -207,15 +207,15 @@ bool operator== (const Dot11sMeshCapability & a, const Dot11sMeshCapability & b) { return ((a.acceptPeerLinks == b.acceptPeerLinks) && (a.MCCASupported == b.MCCASupported) && (a.MCCAEnabled - == b.MCCAEnabled) && (a.forwarding == b.forwarding) && (a.beaconTimingReport == b.beaconTimingReport) - && (a.TBTTAdjustment == b.TBTTAdjustment) && (a.powerSaveLevel == b.powerSaveLevel)); + == b.MCCAEnabled) && (a.forwarding == b.forwarding) && (a.beaconTimingReport == b.beaconTimingReport) + && (a.TBTTAdjustment == b.TBTTAdjustment) && (a.powerSaveLevel == b.powerSaveLevel)); } bool operator== (const IeConfiguration & a, const IeConfiguration & b) { return ((a.m_APSPId == b.m_APSPId) && (a.m_APSMId == b.m_APSMId) && (a.m_CCMId == b.m_CCMId) && (a.m_SPId - == b.m_SPId) && (a.m_APId == b.m_APId) && (a.m_neighbors == b.m_neighbors) && (a.m_meshCap - == b.m_meshCap)); + == b.m_SPId) && (a.m_APId == b.m_APId) && (a.m_neighbors == b.m_neighbors) && (a.m_meshCap + == b.m_meshCap)); } std::ostream & operator << (std::ostream &os, const IeConfiguration &a) diff --git a/src/mesh/model/dot11s/ie-dot11s-peer-management.cc b/src/mesh/model/dot11s/ie-dot11s-peer-management.cc index 176761ff2..f7c2b15e7 100644 --- a/src/mesh/model/dot11s/ie-dot11s-peer-management.cc +++ b/src/mesh/model/dot11s/ie-dot11s-peer-management.cc @@ -163,7 +163,7 @@ bool operator== (const IePeerManagement & a, const IePeerManagement & b) { return ((a.m_length == b.m_length) && (a.m_subtype == b.m_subtype) && (a.m_localLinkId == b.m_localLinkId) - && (a.m_peerLinkId == b.m_peerLinkId) && (a.m_reasonCode == b.m_reasonCode)); + && (a.m_peerLinkId == b.m_peerLinkId) && (a.m_reasonCode == b.m_reasonCode)); } std::ostream & operator << (std::ostream &os, const IePeerManagement &a) diff --git a/src/mesh/model/dot11s/ie-dot11s-perr.cc b/src/mesh/model/dot11s/ie-dot11s-perr.cc index 2f5c948dc..4c8933e83 100644 --- a/src/mesh/model/dot11s/ie-dot11s-perr.cc +++ b/src/mesh/model/dot11s/ie-dot11s-perr.cc @@ -42,7 +42,7 @@ IePerr::Print (std::ostream &os) const for (unsigned int j = 0; j < m_addressUnits.size (); j++) { os << "Failed destination address: = " << m_addressUnits[j].destination << ", sequence number = " - << m_addressUnits[j].seqnum; + << m_addressUnits[j].seqnum; } os << std::endl << "" << std::endl; } @@ -84,8 +84,8 @@ uint8_t IePerr::GetInformationFieldSize () const { uint8_t retval = 1 //ModeFlags - + 1 //NumOfDests - + (6 + 4) * m_addressUnits.size (); + + 1 //NumOfDests + + (6 + 4) * m_addressUnits.size (); return retval; } @@ -119,7 +119,7 @@ void IePerr::DeleteAddressUnit (Mac48Address address) { for (std::vector::iterator i = m_addressUnits.begin (); i - != m_addressUnits.end (); i++) + != m_addressUnits.end (); i++) { if (i->destination == address) { diff --git a/src/mesh/model/dot11s/ie-dot11s-perr.h b/src/mesh/model/dot11s/ie-dot11s-perr.h index ed1cff258..063ea956f 100644 --- a/src/mesh/model/dot11s/ie-dot11s-perr.h +++ b/src/mesh/model/dot11s/ie-dot11s-perr.h @@ -56,8 +56,8 @@ private: std::vector m_addressUnits; friend bool operator== (const IePerr & a, const IePerr & b); }; - bool operator== (const IePerr & a, const IePerr & b); - std::ostream &operator << (std::ostream &os, const IePerr &perr); +bool operator== (const IePerr & a, const IePerr & b); +std::ostream &operator << (std::ostream &os, const IePerr &perr); } // namespace dot11s } //namespace ns3 #endif diff --git a/src/mesh/model/dot11s/ie-dot11s-prep.cc b/src/mesh/model/dot11s/ie-dot11s-prep.cc index 87b39b11b..93bed2292 100644 --- a/src/mesh/model/dot11s/ie-dot11s-prep.cc +++ b/src/mesh/model/dot11s/ie-dot11s-prep.cc @@ -32,8 +32,8 @@ IePrep::~IePrep () } IePrep::IePrep () : m_flags (0), m_hopcount (0), m_ttl (0), m_destinationAddress (Mac48Address::GetBroadcast ()), - m_destSeqNumber (0), m_lifetime (0), m_metric (0), m_originatorAddress (Mac48Address::GetBroadcast ()), - m_originatorSeqNumber (0) + m_destSeqNumber (0), m_lifetime (0), m_metric (0), m_originatorAddress (Mac48Address::GetBroadcast ()), + m_originatorSeqNumber (0) { } WifiInformationElementId @@ -135,7 +135,7 @@ void IePrep::DecrementTtl () { m_ttl--; - m_hopcount ++; + m_hopcount++; } void @@ -176,14 +176,14 @@ uint8_t IePrep::GetInformationFieldSize () const { uint32_t retval = 1 //Flags - + 1 //Hopcount - + 1 //Ttl - + 6 //Dest address - + 4 //Dest seqno - + 4 //Lifetime - + 4 //metric - + 6 //Originator address - + 4; //Originator seqno + + 1 //Hopcount + + 1 //Ttl + + 6 //Dest address + + 4 //Dest seqno + + 4 //Lifetime + + 4 //metric + + 6 //Originator address + + 4; //Originator seqno return retval; } void @@ -191,18 +191,18 @@ IePrep::Print (std::ostream& os) const { os << std::endl << "" << std::endl; os << "Flags: = " << m_flags << std::endl << "Hopcount: = " << m_hopcount << std::endl << "TTL: = " << m_ttl - << std::endl<< "Destination: = " << m_destinationAddress << std::endl << "Dest. seqnum: = " << m_destSeqNumber - << std::endl << "Lifetime: = " << m_lifetime << std::endl<< "Metric: = " << m_metric << std::endl << "Originator: = " - << m_originatorAddress << std::endl << "Orig. seqnum: = " << m_originatorSeqNumber << std::endl; + << std::endl<< "Destination: = " << m_destinationAddress << std::endl << "Dest. seqnum: = " << m_destSeqNumber + << std::endl << "Lifetime: = " << m_lifetime << std::endl<< "Metric: = " << m_metric << std::endl << "Originator: = " + << m_originatorAddress << std::endl << "Orig. seqnum: = " << m_originatorSeqNumber << std::endl; os << "" << std::endl; } bool operator== (const IePrep & a, const IePrep & b) { return ((a.m_flags == b.m_flags) && (a.m_hopcount == b.m_hopcount) && (a.m_ttl == b.m_ttl) - && (a.m_destinationAddress == b.m_destinationAddress) && (a.m_destSeqNumber == b.m_destSeqNumber) - && (a.m_lifetime == b.m_lifetime) && (a.m_metric == b.m_metric) && (a.m_originatorAddress - == b.m_originatorAddress) && (a.m_originatorSeqNumber == b.m_originatorSeqNumber)); + && (a.m_destinationAddress == b.m_destinationAddress) && (a.m_destSeqNumber == b.m_destSeqNumber) + && (a.m_lifetime == b.m_lifetime) && (a.m_metric == b.m_metric) && (a.m_originatorAddress + == b.m_originatorAddress) && (a.m_originatorSeqNumber == b.m_originatorSeqNumber)); } std::ostream & operator << (std::ostream &os, const IePrep &a) diff --git a/src/mesh/model/dot11s/ie-dot11s-prep.h b/src/mesh/model/dot11s/ie-dot11s-prep.h index c3116cac0..f11e93d9e 100644 --- a/src/mesh/model/dot11s/ie-dot11s-prep.h +++ b/src/mesh/model/dot11s/ie-dot11s-prep.h @@ -53,7 +53,7 @@ public: uint32_t GetLifetime () const; uint32_t GetMetric () const; Mac48Address GetOriginatorAddress () const; - uint32_t GetOriginatorSeqNumber ()const ; + uint32_t GetOriginatorSeqNumber () const ; void DecrementTtl (); void IncrementMetric (uint32_t metric); diff --git a/src/mesh/model/dot11s/ie-dot11s-preq.cc b/src/mesh/model/dot11s/ie-dot11s-preq.cc index 2e5b8c73e..ea2ae24c2 100644 --- a/src/mesh/model/dot11s/ie-dot11s-preq.cc +++ b/src/mesh/model/dot11s/ie-dot11s-preq.cc @@ -88,8 +88,8 @@ IePreq::~IePreq () } IePreq::IePreq () : m_maxSize (32), m_flags (0), m_hopCount (0), m_ttl (0), m_preqId (0), m_originatorAddress ( - Mac48Address::GetBroadcast ()), m_originatorSeqNumber (0), m_lifetime (0), m_metric (0), - m_destCount (0) + Mac48Address::GetBroadcast ()), m_originatorSeqNumber (0), m_lifetime (0), m_metric (0), + m_destCount (0) { } WifiInformationElementId @@ -224,7 +224,7 @@ IePreq::SerializeInformationField (Buffer::Iterator i) const i.WriteU8 (m_destCount); int written = 0; for (std::vector >::const_iterator j = m_destinations.begin (); j - != m_destinations.end (); j++) + != m_destinations.end (); j++) { uint8_t flags = 0; if ((*j)->IsDo ()) @@ -295,14 +295,14 @@ uint8_t IePreq::GetInformationFieldSize () const { uint8_t retval = 1 //Flags - + 1 //Hopcount - + 1 //TTL - + 4 //PREQ ID - + 6 //Source address (originator) - + 4 //Originator seqno - + 4 //Lifetime - + 4 //metric - + 1; //destination count + + 1 //Hopcount + + 1 //TTL + + 4 //PREQ ID + + 6 //Source address (originator) + + 4 //Originator seqno + + 4 //Lifetime + + 4 //metric + + 1; //destination count if (m_destCount > m_maxSize) { retval += (m_maxSize * 11); @@ -338,10 +338,10 @@ IePreq::GetDestinationList () } void IePreq::AddDestinationAddressElement (bool doFlag, bool rfFlag, Mac48Address dest_address, - uint32_t dest_seq_number) + uint32_t dest_seq_number) { for (std::vector >::const_iterator i = m_destinations.begin (); i - != m_destinations.end (); i++) + != m_destinations.end (); i++) { if ((*i)->GetDestinationAddress () == dest_address) { @@ -360,7 +360,7 @@ void IePreq::DelDestinationAddressElement (Mac48Address dest_address) { for (std::vector >::iterator i = m_destinations.begin (); i - != m_destinations.end (); i++) + != m_destinations.end (); i++) { if ((*i)->GetDestinationAddress () == dest_address) { @@ -374,7 +374,7 @@ void IePreq::ClearDestinationAddressElements () { for (std::vector >::iterator j = m_destinations.begin (); j - != m_destinations.end (); j++) + != m_destinations.end (); j++) { (*j) = 0; } @@ -385,15 +385,15 @@ bool operator== (const DestinationAddressUnit & a, const DestinationAddressUnit & b) { return (a.m_do == b.m_do && a.m_rf == b.m_rf && a.m_usn == b.m_usn && a.m_destinationAddress - == b.m_destinationAddress && a.m_destSeqNumber == b.m_destSeqNumber); + == b.m_destinationAddress && a.m_destSeqNumber == b.m_destSeqNumber); } bool operator== (const IePreq & a, const IePreq & b) { bool ok = (a.m_flags == b.m_flags && a.m_hopCount == b.m_hopCount && a.m_ttl == b.m_ttl && a.m_preqId - == b.m_preqId && a.m_originatorAddress == b.m_originatorAddress && a.m_originatorSeqNumber - == b.m_originatorSeqNumber && a.m_lifetime == b.m_lifetime && a.m_metric == b.m_metric && a.m_destCount - == b.m_destCount); + == b.m_preqId && a.m_originatorAddress == b.m_originatorAddress && a.m_originatorSeqNumber + == b.m_originatorSeqNumber && a.m_lifetime == b.m_lifetime && a.m_metric == b.m_metric && a.m_destCount + == b.m_destCount); if (!ok) { diff --git a/src/mesh/model/dot11s/ie-dot11s-preq.h b/src/mesh/model/dot11s/ie-dot11s-preq.h index 7dec6f9b5..4d76e5c8e 100644 --- a/src/mesh/model/dot11s/ie-dot11s-preq.h +++ b/src/mesh/model/dot11s/ie-dot11s-preq.h @@ -72,7 +72,7 @@ public: bool rfFlag, Mac48Address dest_address, uint32_t dest_seq_number - ); + ); /// Delete a destination address unit by destination void DelDestinationAddressElement (Mac48Address dest_address); /// Clear PREQ: remove all destinations @@ -101,7 +101,7 @@ public: bool IsUnicastPreq () const; bool IsNeedNotPrep () const; uint8_t GetHopCount () const; - uint8_t GetTtl ()const ; + uint8_t GetTtl () const ; uint32_t GetPreqID () const; Mac48Address GetOriginatorAddress () const; uint32_t GetOriginatorSeqNumber () const; diff --git a/src/mesh/model/dot11s/ie-dot11s-rann.cc b/src/mesh/model/dot11s/ie-dot11s-rann.cc index e12e8f121..7da66bb50 100644 --- a/src/mesh/model/dot11s/ie-dot11s-rann.cc +++ b/src/mesh/model/dot11s/ie-dot11s-rann.cc @@ -31,7 +31,7 @@ IeRann::~IeRann () } IeRann::IeRann () : m_flags (0), m_hopcount (0), m_ttl (0), m_originatorAddress (Mac48Address::GetBroadcast ()), - m_destSeqNumber (0), m_metric (0) + m_destSeqNumber (0), m_metric (0) { } WifiInformationElementId @@ -140,11 +140,11 @@ uint8_t IeRann::GetInformationFieldSize () const { uint8_t retval = 1 //Flags - + 1 //Hopcount - + 1 //TTL - + 6 //OriginatorAddress - + 4 //DestSeqNumber - + 4;//Metric + + 1 //Hopcount + + 1 //TTL + + 6 //OriginatorAddress + + 4 //DestSeqNumber + + 4; //Metric return retval; } @@ -165,8 +165,8 @@ bool operator== (const IeRann & a, const IeRann & b) { return (a.m_flags == b.m_flags && a.m_hopcount == b.m_hopcount && a.m_ttl == b.m_ttl - && a.m_originatorAddress == b.m_originatorAddress && a.m_destSeqNumber == b.m_destSeqNumber - && a.m_metric == b.m_metric); + && a.m_originatorAddress == b.m_originatorAddress && a.m_destSeqNumber == b.m_destSeqNumber + && a.m_metric == b.m_metric); } std::ostream & operator << (std::ostream &os, const IeRann &a) diff --git a/src/mesh/model/dot11s/peer-link-frame.cc b/src/mesh/model/dot11s/peer-link-frame.cc index 2b5432247..cf9e70709 100644 --- a/src/mesh/model/dot11s/peer-link-frame.cc +++ b/src/mesh/model/dot11s/peer-link-frame.cc @@ -30,7 +30,7 @@ NS_OBJECT_ENSURE_REGISTERED (PeerLinkFrameStart); PeerLinkFrameStart::PeerLinkFrameStart () : m_subtype (255), m_capability (0), m_aid (0), m_rates (SupportedRates ()), m_meshId (), - m_config (IeConfiguration ()), m_reasonCode ((uint16_t) REASON11S_RESERVED) + m_config (IeConfiguration ()), m_reasonCode ((uint16_t)REASON11S_RESERVED) { } void @@ -43,23 +43,23 @@ PeerLinkFrameStart::SetPlinkFrameStart (PeerLinkFrameStart::PlinkFrameStartField { m_subtype = fields.subtype; m_protocol = fields.protocol; - if (m_subtype != (uint8_t) (WifiActionHeader::PEER_LINK_CLOSE)) + if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE)) { m_capability = fields.capability; } - if (m_subtype == (uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM)) + if (m_subtype == (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM)) { m_aid = fields.aid; } - if (m_subtype != (uint8_t) (WifiActionHeader::PEER_LINK_CLOSE)) + if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE)) { m_rates = fields.rates; } - if (m_subtype != (uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM)) + if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM)) { m_meshId = fields.meshId; } - if (m_subtype != (uint8_t) (WifiActionHeader::PEER_LINK_CLOSE)) + if (m_subtype != (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE)) { m_config = fields.config; } @@ -85,7 +85,7 @@ PeerLinkFrameStart::GetFields () const TypeId PeerLinkFrameStart::GetTypeId () { - static TypeId tid = TypeId ("ns3::dot11s::PeerLinkFrameStart") .SetParent
() .AddConstructor< + static TypeId tid = TypeId ("ns3::dot11s::PeerLinkFrameStart").SetParent
().AddConstructor< PeerLinkFrameStart> (); return tid; } @@ -98,7 +98,7 @@ void PeerLinkFrameStart::Print (std::ostream &os) const { os << "subtype = " << (uint16_t) m_subtype << std::endl << "capability = " << m_capability << std::endl << "laid = " - << (uint16_t) m_aid << std::endl << "rates = " << m_rates << std::endl << "meshId = "; + << (uint16_t) m_aid << std::endl << "rates = " << m_rates << std::endl << "meshId = "; m_meshId.Print (os); os << std::endl << "configuration = "; m_config.Print (os); @@ -109,24 +109,24 @@ PeerLinkFrameStart::GetSerializedSize () const { uint32_t size = 3; //Peering protocol NS_ASSERT (m_subtype < 3); - if ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) { size += 2; //capability } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype) { size += 2; //AID of remote peer } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) { size += m_rates.GetSerializedSize (); size += m_rates.extended.GetSerializedSize (); } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype) { size += m_meshId.GetInformationFieldSize () + 2; } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) { size += m_config.GetInformationFieldSize () + 2; } @@ -142,24 +142,24 @@ PeerLinkFrameStart::Serialize (Buffer::Iterator start) const Buffer::Iterator i = start; NS_ASSERT (m_subtype < 3); i = m_protocol.Serialize (i); - if ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) { i.WriteHtolsbU16 (m_capability); } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype) { i.WriteHtolsbU16 (m_aid); } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) { i = m_rates.Serialize (i); i = m_rates.extended.Serialize (i); } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype) { i = m_meshId.Serialize (i); } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) { i = m_config.Serialize (i); } @@ -174,29 +174,29 @@ PeerLinkFrameStart::Deserialize (Buffer::Iterator start) Buffer::Iterator i = start; NS_ASSERT (m_subtype < 3); { - uint8_t id = i.ReadU8 (); - uint8_t length = i.ReadU8 (); - m_protocol.DeserializeInformationField (i, length); - if ((m_protocol.ElementId () != (WifiInformationElementId) id) || (m_protocol.GetInformationFieldSize () != length)) - { - NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!"); - } - i.Next (m_protocol.GetInformationFieldSize ()); - } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) + uint8_t id = i.ReadU8 (); + uint8_t length = i.ReadU8 (); + m_protocol.DeserializeInformationField (i, length); + if ((m_protocol.ElementId () != (WifiInformationElementId) id) || (m_protocol.GetInformationFieldSize () != length)) + { + NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!"); + } + i.Next (m_protocol.GetInformationFieldSize ()); + } + if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) { m_capability = i.ReadLsbtohU16 (); } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) == m_subtype) { m_aid = i.ReadLsbtohU16 (); } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) { i = m_rates.Deserialize (i); i = m_rates.extended.DeserializeIfPresent (i); } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM) != m_subtype) { uint8_t id = i.ReadU8 (); uint8_t length = i.ReadU8 (); @@ -207,11 +207,11 @@ PeerLinkFrameStart::Deserialize (Buffer::Iterator start) } i.Next (m_meshId.GetInformationFieldSize ()); } - if ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) + if ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE) != m_subtype) { uint8_t id = i.ReadU8 (); uint8_t length = i.ReadU8 (); - m_config. DeserializeInformationField (i, length); + m_config.DeserializeInformationField (i, length); if ((m_config.ElementId () != (WifiInformationElementId) id) || (m_config.GetInformationFieldSize () != length)) { NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!"); @@ -228,8 +228,8 @@ bool operator== (const PeerLinkFrameStart & a, const PeerLinkFrameStart & b) { return ((a.m_subtype == b.m_subtype) && (a.m_capability == b.m_capability) && (a.m_aid == b.m_aid) - && (a.m_meshId.IsEqual (b.m_meshId)) && (a.m_config == b.m_config) - && (a.m_reasonCode == b.m_reasonCode)); + && (a.m_meshId.IsEqual (b.m_meshId)) && (a.m_config == b.m_config) + && (a.m_reasonCode == b.m_reasonCode)); } } // namespace dot11s } //namespace ns3 diff --git a/src/mesh/model/dot11s/peer-link.cc b/src/mesh/model/dot11s/peer-link.cc index 6e38ed46e..6da0b3956 100644 --- a/src/mesh/model/dot11s/peer-link.cc +++ b/src/mesh/model/dot11s/peer-link.cc @@ -43,45 +43,45 @@ PeerLink::GetTypeId () "Retry timeout", TimeValue (TimeValue (MicroSeconds (40 * 1024))), MakeTimeAccessor ( - &PeerLink::m_dot11MeshRetryTimeout), + &PeerLink::m_dot11MeshRetryTimeout), MakeTimeChecker () - ) + ) .AddAttribute ( "HoldingTimeout", "Holding timeout", TimeValue (TimeValue (MicroSeconds (40 * 1024))), MakeTimeAccessor ( - &PeerLink::m_dot11MeshHoldingTimeout), + &PeerLink::m_dot11MeshHoldingTimeout), MakeTimeChecker () - ) + ) .AddAttribute ( "ConfirmTimeout", "Confirm timeout", TimeValue (TimeValue (MicroSeconds (40 * 1024))), MakeTimeAccessor ( - &PeerLink::m_dot11MeshConfirmTimeout), + &PeerLink::m_dot11MeshConfirmTimeout), MakeTimeChecker () - ) + ) .AddAttribute ( "MaxRetries", "Maximum number of retries", UintegerValue (4), MakeUintegerAccessor ( - &PeerLink::m_dot11MeshMaxRetries), + &PeerLink::m_dot11MeshMaxRetries), MakeUintegerChecker () - ) + ) .AddAttribute ( "MaxBeaconLoss", "Maximum number of lost beacons before link will be closed", UintegerValue (2), MakeUintegerAccessor ( - &PeerLink::m_maxBeaconLoss), + &PeerLink::m_maxBeaconLoss), MakeUintegerChecker (1) - ) + ) .AddAttribute ( "MaxPacketFailure", "Maximum number of failed packets before link will be closed", UintegerValue (2), MakeUintegerAccessor ( - &PeerLink::m_maxPacketFail), + &PeerLink::m_maxPacketFail), MakeUintegerChecker (1) - ) - ; + ) + ; return tid; } @@ -169,7 +169,7 @@ PeerLink::TransmissionSuccess () void PeerLink::TransmissionFailure () { - m_packetFail ++; + m_packetFail++; if (m_packetFail == m_maxPacketFail) { StateMachine (CNCL); @@ -283,7 +283,7 @@ PeerLink::OpenReject (uint16_t localLinkId, IeConfiguration conf, Mac48Address p } void PeerLink::ConfirmAccept (uint16_t localLinkId, uint16_t peerLinkId, uint16_t peerAid, IeConfiguration conf, - Mac48Address peerMp) + Mac48Address peerMp) { if (m_localLinkId != peerLinkId) { @@ -314,7 +314,7 @@ PeerLink::ConfirmAccept (uint16_t localLinkId, uint16_t peerLinkId, uint16_t pee } void PeerLink::ConfirmReject (uint16_t localLinkId, uint16_t peerLinkId, IeConfiguration conf, - Mac48Address peerMp, PmpReasonCode reason) + Mac48Address peerMp, PmpReasonCode reason) { if (m_localLinkId != peerLinkId) { @@ -362,245 +362,245 @@ PeerLink::StateMachine (PeerEvent event, PmpReasonCode reasoncode) { switch (m_state) { - case IDLE: - switch (event) - { - case CNCL: - case CLS_ACPT: - m_state = IDLE; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, IDLE, IDLE); + case IDLE: + switch (event) + { + case CNCL: + case CLS_ACPT: + m_state = IDLE; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, IDLE, IDLE); + break; + case REQ_RJCT: + SendPeerLinkClose (reasoncode); + break; + case ACTOPN: + m_state = OPN_SNT; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, IDLE, OPN_SNT); + SendPeerLinkOpen (); + SetRetryTimer (); + break; + case OPN_ACPT: + m_state = OPN_RCVD; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, IDLE, OPN_RCVD); + SendPeerLinkConfirm (); + SendPeerLinkOpen (); + SetRetryTimer (); + break; + default: + //11B.5.3.4 of 802.11s Draft D3.0 + //All other events shall be ignored in this state + break; + } break; - case REQ_RJCT: - SendPeerLinkClose (reasoncode); + case OPN_SNT: + switch (event) + { + case TOR1: + SendPeerLinkOpen (); + m_retryCounter++; + SetRetryTimer (); + break; + case CNF_ACPT: + m_state = CNF_RCVD; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, CNF_RCVD); + ClearRetryTimer (); + SetConfirmTimer (); + break; + case OPN_ACPT: + m_state = OPN_RCVD; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, OPN_RCVD); + SendPeerLinkConfirm (); + break; + case CLS_ACPT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, HOLDING); + ClearRetryTimer (); + SendPeerLinkClose (REASON11S_MESH_CLOSE_RCVD); + SetHoldingTimer (); + break; + case OPN_RJCT: + case CNF_RJCT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, HOLDING); + ClearRetryTimer (); + SendPeerLinkClose (reasoncode); + SetHoldingTimer (); + break; + case TOR2: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, HOLDING); + ClearRetryTimer (); + SendPeerLinkClose (REASON11S_MESH_MAX_RETRIES); + SetHoldingTimer (); + break; + case CNCL: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, HOLDING); + ClearRetryTimer (); + SendPeerLinkClose (REASON11S_PEERING_CANCELLED); + SetHoldingTimer (); + break; + default: + //11B.5.3.5 of 802.11s Draft D3.0 + //All other events shall be ignored in this state + break; + } break; - case ACTOPN: - m_state = OPN_SNT; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, IDLE, OPN_SNT); - SendPeerLinkOpen (); - SetRetryTimer (); + case CNF_RCVD: + switch (event) + { + case CNF_ACPT: + break; + case OPN_ACPT: + m_state = ESTAB; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, ESTAB); + ClearConfirmTimer (); + SendPeerLinkConfirm (); + NS_ASSERT (m_peerMeshPointAddress != Mac48Address::GetBroadcast ()); + break; + case CLS_ACPT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, HOLDING); + ClearConfirmTimer (); + SendPeerLinkClose (REASON11S_MESH_CLOSE_RCVD); + SetHoldingTimer (); + break; + case CNF_RJCT: + case OPN_RJCT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, HOLDING); + ClearConfirmTimer (); + SendPeerLinkClose (reasoncode); + SetHoldingTimer (); + break; + case CNCL: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, HOLDING); + ClearConfirmTimer (); + SendPeerLinkClose (REASON11S_PEERING_CANCELLED); + SetHoldingTimer (); + break; + case TOC: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, HOLDING); + SendPeerLinkClose (REASON11S_MESH_CONFIRM_TIMEOUT); + SetHoldingTimer (); + break; + default: + //11B.5.3.6 of 802.11s Draft D3.0 + //All other events shall be ignored in this state + break; + } break; - case OPN_ACPT: - m_state = OPN_RCVD; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, IDLE, OPN_RCVD); - SendPeerLinkConfirm (); - SendPeerLinkOpen (); - SetRetryTimer (); + case OPN_RCVD: + switch (event) + { + case TOR1: + SendPeerLinkOpen (); + m_retryCounter++; + SetRetryTimer (); + break; + case CNF_ACPT: + m_state = ESTAB; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, ESTAB); + ClearRetryTimer (); + NS_ASSERT (m_peerMeshPointAddress != Mac48Address::GetBroadcast ()); + break; + case CLS_ACPT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, HOLDING); + ClearRetryTimer (); + SendPeerLinkClose (REASON11S_MESH_CLOSE_RCVD); + SetHoldingTimer (); + break; + case OPN_RJCT: + case CNF_RJCT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, HOLDING); + ClearRetryTimer (); + SendPeerLinkClose (reasoncode); + SetHoldingTimer (); + break; + case TOR2: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, HOLDING); + ClearRetryTimer (); + SendPeerLinkClose (REASON11S_MESH_MAX_RETRIES); + SetHoldingTimer (); + break; + case CNCL: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, HOLDING); + ClearRetryTimer (); + SendPeerLinkClose (REASON11S_PEERING_CANCELLED); + SetHoldingTimer (); + break; + default: + //11B.5.3.7 of 802.11s Draft D3.0 + //All other events shall be ignored in this state + break; + } break; - default: - //11B.5.3.4 of 802.11s Draft D3.0 - //All other events shall be ignored in this state + case ESTAB: + switch (event) + { + case OPN_ACPT: + SendPeerLinkConfirm (); + break; + case CLS_ACPT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, ESTAB, HOLDING); + SendPeerLinkClose (REASON11S_MESH_CLOSE_RCVD); + SetHoldingTimer (); + break; + case OPN_RJCT: + case CNF_RJCT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, ESTAB, HOLDING); + ClearRetryTimer (); + SendPeerLinkClose (reasoncode); + SetHoldingTimer (); + break; + case CNCL: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, ESTAB, HOLDING); + SendPeerLinkClose (REASON11S_PEERING_CANCELLED); + SetHoldingTimer (); + break; + default: + //11B.5.3.8 of 802.11s Draft D3.0 + //All other events shall be ignored in this state + break; + } break; - } - break; - case OPN_SNT: - switch (event) - { - case TOR1: - SendPeerLinkOpen (); - m_retryCounter++; - SetRetryTimer (); + case HOLDING: + switch (event) + { + case CLS_ACPT: + ClearHoldingTimer (); + case TOH: + m_state = IDLE; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, HOLDING, IDLE); + break; + case OPN_ACPT: + case CNF_ACPT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, HOLDING, HOLDING); + // reason not spec in D2.0 + SendPeerLinkClose (REASON11S_PEERING_CANCELLED); + break; + case OPN_RJCT: + case CNF_RJCT: + m_state = HOLDING; + m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, HOLDING, HOLDING); + SendPeerLinkClose (reasoncode); + break; + default: + //11B.5.3.9 of 802.11s Draft D3.0 + //All other events shall be ignored in this state + break; + } break; - case CNF_ACPT: - m_state = CNF_RCVD; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, CNF_RCVD); - ClearRetryTimer (); - SetConfirmTimer (); - break; - case OPN_ACPT: - m_state = OPN_RCVD; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, OPN_RCVD); - SendPeerLinkConfirm (); - break; - case CLS_ACPT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, HOLDING); - ClearRetryTimer (); - SendPeerLinkClose (REASON11S_MESH_CLOSE_RCVD); - SetHoldingTimer (); - break; - case OPN_RJCT: - case CNF_RJCT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, HOLDING); - ClearRetryTimer (); - SendPeerLinkClose (reasoncode); - SetHoldingTimer (); - break; - case TOR2: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, HOLDING); - ClearRetryTimer (); - SendPeerLinkClose (REASON11S_MESH_MAX_RETRIES); - SetHoldingTimer (); - break; - case CNCL: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_SNT, HOLDING); - ClearRetryTimer (); - SendPeerLinkClose (REASON11S_PEERING_CANCELLED); - SetHoldingTimer (); - break; - default: - //11B.5.3.5 of 802.11s Draft D3.0 - //All other events shall be ignored in this state - break; - } - break; - case CNF_RCVD: - switch (event) - { - case CNF_ACPT: - break; - case OPN_ACPT: - m_state = ESTAB; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, ESTAB); - ClearConfirmTimer (); - SendPeerLinkConfirm (); - NS_ASSERT (m_peerMeshPointAddress != Mac48Address::GetBroadcast ()); - break; - case CLS_ACPT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, HOLDING); - ClearConfirmTimer (); - SendPeerLinkClose (REASON11S_MESH_CLOSE_RCVD); - SetHoldingTimer (); - break; - case CNF_RJCT: - case OPN_RJCT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, HOLDING); - ClearConfirmTimer (); - SendPeerLinkClose (reasoncode); - SetHoldingTimer (); - break; - case CNCL: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, HOLDING); - ClearConfirmTimer (); - SendPeerLinkClose (REASON11S_PEERING_CANCELLED); - SetHoldingTimer (); - break; - case TOC: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, CNF_RCVD, HOLDING); - SendPeerLinkClose (REASON11S_MESH_CONFIRM_TIMEOUT); - SetHoldingTimer (); - break; - default: - //11B.5.3.6 of 802.11s Draft D3.0 - //All other events shall be ignored in this state - break; - } - break; - case OPN_RCVD: - switch (event) - { - case TOR1: - SendPeerLinkOpen (); - m_retryCounter++; - SetRetryTimer (); - break; - case CNF_ACPT: - m_state = ESTAB; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, ESTAB); - ClearRetryTimer (); - NS_ASSERT (m_peerMeshPointAddress != Mac48Address::GetBroadcast ()); - break; - case CLS_ACPT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, HOLDING); - ClearRetryTimer (); - SendPeerLinkClose (REASON11S_MESH_CLOSE_RCVD); - SetHoldingTimer (); - break; - case OPN_RJCT: - case CNF_RJCT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, HOLDING); - ClearRetryTimer (); - SendPeerLinkClose (reasoncode); - SetHoldingTimer (); - break; - case TOR2: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, HOLDING); - ClearRetryTimer (); - SendPeerLinkClose (REASON11S_MESH_MAX_RETRIES); - SetHoldingTimer (); - break; - case CNCL: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, OPN_RCVD, HOLDING); - ClearRetryTimer (); - SendPeerLinkClose (REASON11S_PEERING_CANCELLED); - SetHoldingTimer (); - break; - default: - //11B.5.3.7 of 802.11s Draft D3.0 - //All other events shall be ignored in this state - break; - } - break; - case ESTAB: - switch (event) - { - case OPN_ACPT: - SendPeerLinkConfirm (); - break; - case CLS_ACPT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, ESTAB, HOLDING); - SendPeerLinkClose (REASON11S_MESH_CLOSE_RCVD); - SetHoldingTimer (); - break; - case OPN_RJCT: - case CNF_RJCT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, ESTAB, HOLDING); - ClearRetryTimer (); - SendPeerLinkClose (reasoncode); - SetHoldingTimer (); - break; - case CNCL: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, ESTAB, HOLDING); - SendPeerLinkClose (REASON11S_PEERING_CANCELLED); - SetHoldingTimer (); - break; - default: - //11B.5.3.8 of 802.11s Draft D3.0 - //All other events shall be ignored in this state - break; - } - break; - case HOLDING: - switch (event) - { - case CLS_ACPT: - ClearHoldingTimer (); - case TOH: - m_state = IDLE; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, HOLDING, IDLE); - break; - case OPN_ACPT: - case CNF_ACPT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, HOLDING, HOLDING); - // reason not spec in D2.0 - SendPeerLinkClose (REASON11S_PEERING_CANCELLED); - break; - case OPN_RJCT: - case CNF_RJCT: - m_state = HOLDING; - m_linkStatusCallback (m_interface, m_peerAddress, m_peerMeshPointAddress, HOLDING, HOLDING); - SendPeerLinkClose (reasoncode); - break; - default: - //11B.5.3.9 of 802.11s Draft D3.0 - //All other events shall be ignored in this state - break; - } - break; } } void @@ -624,7 +624,7 @@ PeerLink::SendPeerLinkClose (PmpReasonCode reasoncode) IePeerManagement peerElement; peerElement.SetPeerClose (m_localLinkId, m_peerLinkId, reasoncode); m_macPlugin->SendPeerLinkManagementFrame (m_peerAddress, m_peerMeshPointAddress, m_assocId, peerElement, - m_configuration); + m_configuration); } void PeerLink::SendPeerLinkOpen () @@ -633,7 +633,7 @@ PeerLink::SendPeerLinkOpen () peerElement.SetPeerOpen (m_localLinkId); NS_ASSERT (m_macPlugin != 0); m_macPlugin->SendPeerLinkManagementFrame (m_peerAddress, m_peerMeshPointAddress, m_assocId, peerElement, - m_configuration); + m_configuration); } void PeerLink::SendPeerLinkConfirm () @@ -641,7 +641,7 @@ PeerLink::SendPeerLinkConfirm () IePeerManagement peerElement; peerElement.SetPeerConfirm (m_localLinkId, m_peerLinkId); m_macPlugin->SendPeerLinkManagementFrame (m_peerAddress, m_peerMeshPointAddress, m_assocId, peerElement, - m_configuration); + m_configuration); } void PeerLink::SetHoldingTimer () @@ -691,15 +691,15 @@ PeerLink::Report (std::ostream & os) const return; } os << "GetAddress () << "\"" << std::endl << - "peerInterfaceAddress=\"" << m_peerAddress << "\"" << std::endl << - "peerMeshPointAddress=\"" << m_peerMeshPointAddress << "\"" << std::endl << - "metric=\"" << m_macPlugin->GetLinkMetric (m_peerAddress) << "\"" << std::endl << - "lastBeacon=\"" << m_lastBeacon.GetSeconds () << "\"" << std::endl << - "localLinkId=\"" << m_localLinkId << "\"" << std::endl << - "peerLinkId=\"" << m_peerLinkId << "\"" << std::endl << - "assocId=\"" << m_assocId << "\"" << std::endl << - "/>" << std::endl; + "localAddress=\"" << m_macPlugin->GetAddress () << "\"" << std::endl << + "peerInterfaceAddress=\"" << m_peerAddress << "\"" << std::endl << + "peerMeshPointAddress=\"" << m_peerMeshPointAddress << "\"" << std::endl << + "metric=\"" << m_macPlugin->GetLinkMetric (m_peerAddress) << "\"" << std::endl << + "lastBeacon=\"" << m_lastBeacon.GetSeconds () << "\"" << std::endl << + "localLinkId=\"" << m_localLinkId << "\"" << std::endl << + "peerLinkId=\"" << m_peerLinkId << "\"" << std::endl << + "assocId=\"" << m_assocId << "\"" << std::endl << + "/>" << std::endl; } } // namespace dot11s } //namespace ns3 diff --git a/src/mesh/model/dot11s/peer-link.h b/src/mesh/model/dot11s/peer-link.h index 2db0afb36..c33267705 100644 --- a/src/mesh/model/dot11s/peer-link.h +++ b/src/mesh/model/dot11s/peer-link.h @@ -81,7 +81,7 @@ public: uint16_t GetLocalAid () const; Time GetLastBeacon () const; Time GetBeaconInterval () const; - IeBeaconTiming GetBeaconTimingElement ()const; + IeBeaconTiming GetBeaconTimingElement () const; //IePeerManagement GetPeerLinkDescriptorElement ()const; //\} @@ -145,7 +145,7 @@ private: uint16_t peerAid, IeConfiguration conf, Mac48Address peerMp - ); + ); /// Confirm reject void ConfirmReject ( uint16_t localLinkId, @@ -153,7 +153,7 @@ private: IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason - ); + ); //\} /// True if link is established bool LinkIsEstab () const; diff --git a/src/mesh/model/dot11s/peer-management-protocol-mac.cc b/src/mesh/model/dot11s/peer-management-protocol-mac.cc index 6924411fb..4d8e20565 100644 --- a/src/mesh/model/dot11s/peer-management-protocol-mac.cc +++ b/src/mesh/model/dot11s/peer-management-protocol-mac.cc @@ -32,7 +32,7 @@ namespace ns3 { namespace dot11s { PeerManagementProtocolMac::PeerManagementProtocolMac (uint32_t interface, - Ptr protocol) + Ptr protocol) { m_ifIndex = interface; m_protocol = protocol; @@ -77,7 +77,7 @@ PeerManagementProtocolMac::Receive (Ptr const_packet, const WifiMacHeade if ((meshId != 0) && (m_protocol->GetMeshId ()->IsEqual (*meshId))) { m_protocol->ReceiveBeacon (m_ifIndex, header.GetAddr2 (), MicroSeconds ( - beacon_hdr.GetBeaconIntervalUs ()), beaconTiming); + beacon_hdr.GetBeaconIntervalUs ()), beaconTiming); } // Beacon shall not be dropped. May be needed to another plugins return true; @@ -97,15 +97,15 @@ PeerManagementProtocolMac::Receive (Ptr const_packet, const WifiMacHeade Mac48Address peerAddress = header.GetAddr2 (); Mac48Address peerMpAddress = header.GetAddr3 (); PeerLinkFrameStart::PlinkFrameStartFields fields; - { - PeerLinkFrameStart peerFrame; - peerFrame.SetPlinkFrameSubtype ((uint8_t) actionValue.peerLink); - packet->RemoveHeader (peerFrame); - fields = peerFrame.GetFields (); - NS_ASSERT (fields.subtype == actionValue.peerLink); - } + { + PeerLinkFrameStart peerFrame; + peerFrame.SetPlinkFrameSubtype ((uint8_t) actionValue.peerLink); + packet->RemoveHeader (peerFrame); + fields = peerFrame.GetFields (); + NS_ASSERT (fields.subtype == actionValue.peerLink); + } if ((actionValue.peerLink != WifiActionHeader::PEER_LINK_CLOSE) && !(m_parent->CheckSupportedRates ( - fields.rates))) + fields.rates))) { m_protocol->ConfigurationMismatch (m_ifIndex, peerAddress); // Broken peer link frame - drop it @@ -113,7 +113,7 @@ PeerManagementProtocolMac::Receive (Ptr const_packet, const WifiMacHeade return false; } if ((actionValue.peerLink != WifiActionHeader::PEER_LINK_CONFIRM) && !fields.meshId.IsEqual ( - *(m_protocol->GetMeshId ()))) + *(m_protocol->GetMeshId ()))) { m_protocol->ConfigurationMismatch (m_ifIndex, peerAddress); // Broken peer link frame - drop it @@ -144,7 +144,7 @@ PeerManagementProtocolMac::Receive (Ptr const_packet, const WifiMacHeade } //Deliver Peer link management frame to protocol: m_protocol->ReceivePeerLinkFrame (m_ifIndex, peerAddress, peerMpAddress, fields.aid, *peerElement, - fields.config); + fields.config); // if we can handle a frame - drop it return false; } @@ -152,7 +152,7 @@ PeerManagementProtocolMac::Receive (Ptr const_packet, const WifiMacHeade } bool PeerManagementProtocolMac::UpdateOutcomingFrame (Ptr packet, WifiMacHeader & header, - Mac48Address from, Mac48Address to) + Mac48Address from, Mac48Address to) { if (header.IsAction ()) { @@ -194,7 +194,7 @@ PeerManagementProtocolMac::UpdateBeacon (MeshWifiBeacon & beacon) const void PeerManagementProtocolMac::SendPeerLinkManagementFrame (Mac48Address peerAddress, Mac48Address peerMpAddress, - uint16_t aid, IePeerManagement peerElement, IeConfiguration meshConfig) + uint16_t aid, IePeerManagement peerElement, IeConfiguration meshConfig) { //Create a packet: meshConfig.SetNeighborCount (m_protocol->GetNumberOfLinks ()); @@ -277,32 +277,32 @@ PeerManagementProtocolMac::SetBeaconShift (Time shift) } PeerManagementProtocolMac::Statistics::Statistics () : txOpen (0), txConfirm (0), txClose (0), rxOpen (0), rxConfirm (0), rxClose (0), dropped (0), brokenMgt (0), - txMgt (0), txMgtBytes (0), rxMgt (0), rxMgtBytes (0), beaconShift (0) + txMgt (0), txMgtBytes (0), rxMgt (0), rxMgtBytes (0), beaconShift (0) { } void PeerManagementProtocolMac::Statistics::Print (std::ostream & os) const { os << "" << std::endl; + "txOpen=\"" << txOpen << "\"" << std::endl << + "txConfirm=\"" << txConfirm << "\"" << std::endl << + "txClose=\"" << txClose << "\"" << std::endl << + "rxOpen=\"" << rxOpen << "\"" << std::endl << + "rxConfirm=\"" << rxConfirm << "\"" << std::endl << + "rxClose=\"" << rxClose << "\"" << std::endl << + "dropped=\"" << dropped << "\"" << std::endl << + "brokenMgt=\"" << brokenMgt << "\"" << std::endl << + "txMgt=\"" << txMgt << "\"" << std::endl << + "txMgtBytes=\"" << txMgtBytes << "\"" << std::endl << + "rxMgt=\"" << rxMgt << "\"" << std::endl << + "rxMgtBytes=\"" << rxMgtBytes << "\"" << std::endl << + "beaconShift=\"" << beaconShift << "\"/>" << std::endl; } void PeerManagementProtocolMac::Report (std::ostream & os) const { os << "GetAddress () << "\">" << std::endl; + "address=\"" << m_parent->GetAddress () << "\">" << std::endl; m_stats.Print (os); os << "" << std::endl; } diff --git a/src/mesh/model/dot11s/peer-management-protocol-mac.h b/src/mesh/model/dot11s/peer-management-protocol-mac.h index 546104b1f..319afe385 100644 --- a/src/mesh/model/dot11s/peer-management-protocol-mac.h +++ b/src/mesh/model/dot11s/peer-management-protocol-mac.h @@ -60,11 +60,11 @@ public: private: PeerManagementProtocolMac& operator= (const PeerManagementProtocolMac &); PeerManagementProtocolMac (const PeerManagementProtocolMac &); - + friend class PeerManagementProtocol; friend class PeerLink; - ///\name Create peer link management frames: - ///\{ + ///\name Create peer link management frames: + ///\{ struct PlinkFrameStart { uint8_t subtype; @@ -90,12 +90,12 @@ private: void SetBeaconShift (Time shift); void SetPeerManagerProtcol (Ptr protocol); void SendPeerLinkManagementFrame ( - Mac48Address peerAddress, - Mac48Address peerMpAddress, - uint16_t aid, - IePeerManagement peerElement, - IeConfiguration meshConfig - ); + Mac48Address peerAddress, + Mac48Address peerMpAddress, + uint16_t aid, + IePeerManagement peerElement, + IeConfiguration meshConfig + ); ///\brief DUBUG only - to print established links Mac48Address GetAddress () const; ///\name Statistics @@ -126,7 +126,7 @@ private: Ptr m_parent; uint32_t m_ifIndex; Ptr m_protocol; - ///\} + ///\} }; } // namespace dot11s diff --git a/src/mesh/model/dot11s/peer-management-protocol.cc b/src/mesh/model/dot11s/peer-management-protocol.cc index 0be167bf1..1860a1343 100644 --- a/src/mesh/model/dot11s/peer-management-protocol.cc +++ b/src/mesh/model/dot11s/peer-management-protocol.cc @@ -45,41 +45,41 @@ TypeId PeerManagementProtocol::GetTypeId (void) { static TypeId tid = TypeId ("ns3::dot11s::PeerManagementProtocol") - .SetParent () - .AddConstructor () - // maximum number of peer links. Now we calculate the total - // number of peer links on all interfaces - .AddAttribute ( "MaxNumberOfPeerLinks", - "Maximum number of peer links", - UintegerValue (32), - MakeUintegerAccessor ( + .SetParent () + .AddConstructor () + // maximum number of peer links. Now we calculate the total + // number of peer links on all interfaces + .AddAttribute ( "MaxNumberOfPeerLinks", + "Maximum number of peer links", + UintegerValue (32), + MakeUintegerAccessor ( &PeerManagementProtocol::m_maxNumberOfPeerLinks), - MakeUintegerChecker () - ) - .AddAttribute ( "MaxBeaconShiftValue", - "Maximum number of TUs for beacon shifting", - UintegerValue (15), - MakeUintegerAccessor ( + MakeUintegerChecker () + ) + .AddAttribute ( "MaxBeaconShiftValue", + "Maximum number of TUs for beacon shifting", + UintegerValue (15), + MakeUintegerAccessor ( &PeerManagementProtocol::m_maxBeaconShift), - MakeUintegerChecker () - ) - .AddAttribute ( "EnableBeaconCollisionAvoidance", - "Enable/Disable Beacon collision avoidance.", - BooleanValue (true), - MakeBooleanAccessor ( - &PeerManagementProtocol::SetBeaconCollisionAvoidance, &PeerManagementProtocol::GetBeaconCollisionAvoidance), + MakeUintegerChecker () + ) + .AddAttribute ( "EnableBeaconCollisionAvoidance", + "Enable/Disable Beacon collision avoidance.", + BooleanValue (true), + MakeBooleanAccessor ( + &PeerManagementProtocol::SetBeaconCollisionAvoidance, &PeerManagementProtocol::GetBeaconCollisionAvoidance), MakeBooleanChecker () - ) - .AddTraceSource ("LinkOpen", - "New peer link opened", - MakeTraceSourceAccessor (&PeerManagementProtocol::m_linkOpenTraceSrc) - ) - .AddTraceSource ("LinkClose", - "New peer link closed", - MakeTraceSourceAccessor (&PeerManagementProtocol::m_linkCloseTraceSrc) - ) - - ; + ) + .AddTraceSource ("LinkOpen", + "New peer link opened", + MakeTraceSourceAccessor (&PeerManagementProtocol::m_linkOpenTraceSrc) + ) + .AddTraceSource ("LinkClose", + "New peer link closed", + MakeTraceSourceAccessor (&PeerManagementProtocol::m_linkCloseTraceSrc) + ) + + ; return tid; } PeerManagementProtocol::PeerManagementProtocol () : @@ -155,7 +155,7 @@ PeerManagementProtocol::GetBeaconTimingElement (uint32_t interface) continue; } retval->AddNeighboursTimingElementUnit ((*i)->GetLocalAid (), (*i)->GetLastBeacon (), - (*i)->GetBeaconInterval ()); + (*i)->GetBeaconInterval ()); } return retval; } @@ -190,8 +190,8 @@ PeerManagementProtocol::ReceiveBeacon (uint32_t interface, Mac48Address peerAddr void PeerManagementProtocol::ReceivePeerLinkFrame (uint32_t interface, Mac48Address peerAddress, - Mac48Address peerMeshPointAddress, uint16_t aid, IePeerManagement peerManagementElement, - IeConfiguration meshConfig) + Mac48Address peerMeshPointAddress, uint16_t aid, IePeerManagement peerManagementElement, + IeConfiguration meshConfig) { Ptr peerLink = FindPeerLink (interface, peerAddress); if (peerManagementElement.SubtypeIsOpen ()) @@ -209,7 +209,7 @@ PeerManagementProtocol::ReceivePeerLinkFrame (uint32_t interface, Mac48Address p else { peerLink->OpenReject (peerManagementElement.GetLocalLinkId (), meshConfig, peerMeshPointAddress, - reasonCode); + reasonCode); } } if (peerLink == 0) @@ -219,12 +219,12 @@ PeerManagementProtocol::ReceivePeerLinkFrame (uint32_t interface, Mac48Address p if (peerManagementElement.SubtypeIsConfirm ()) { peerLink->ConfirmAccept (peerManagementElement.GetLocalLinkId (), - peerManagementElement.GetPeerLinkId (), aid, meshConfig, peerMeshPointAddress); + peerManagementElement.GetPeerLinkId (), aid, meshConfig, peerMeshPointAddress); } if (peerManagementElement.SubtypeIsClose ()) { peerLink->Close (peerManagementElement.GetLocalLinkId (), peerManagementElement.GetPeerLinkId (), - peerManagementElement.GetReasonCode ()); + peerManagementElement.GetReasonCode ()); } } void @@ -258,7 +258,7 @@ PeerManagementProtocol::TransmissionSuccess (uint32_t interface, Mac48Address pe } Ptr PeerManagementProtocol::InitiateLink (uint32_t interface, Mac48Address peerAddress, - Mac48Address peerMeshPointAddress) + Mac48Address peerMeshPointAddress) { Ptr new_link = CreateObject (); //find a peer link - it must not exist @@ -307,7 +307,7 @@ PeerManagementProtocol::FindPeerLink (uint32_t interface, Mac48Address peerAddre } void PeerManagementProtocol::SetPeerLinkStatusCallback ( - Callback cb) + Callback cb) { m_peerStatusCallback = cb; } @@ -336,7 +336,7 @@ PeerManagementProtocol::GetPeerLinks () const for (PeerLinksMap::const_iterator iface = m_peerLinks.begin (); iface != m_peerLinks.end (); ++iface) { for (PeerLinksOnInterface::const_iterator i = iface->second.begin (); - i != iface->second.end (); i++) + i != iface->second.end (); i++) if ((*i)->LinkIsEstab ()) links.push_back (*i); } @@ -360,7 +360,7 @@ PeerManagementProtocol::ShouldSendOpen (uint32_t interface, Mac48Address peerAdd bool PeerManagementProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, - PmpReasonCode & reasonCode) + PmpReasonCode & reasonCode) { if (m_stats.linksTotal > m_maxNumberOfPeerLinks) { @@ -385,6 +385,9 @@ PeerManagementProtocol::DoShiftBeacon (uint32_t interface) NS_ASSERT (iface != m_peerLinks.end ()); PeerManagementProtocolMacMap::const_iterator plugin = m_plugins.find (interface); NS_ASSERT (plugin != m_plugins.end ()); + // cast plugin to void, to suppress 'plugin' set but not used, compiler warning + // in optimized builds + (void) plugin; std::map::const_iterator lastBeacon = m_lastBeacon.find (interface); std::map::const_iterator beaconInterval = m_beaconInterval.find (interface); if ((lastBeacon == m_lastBeacon.end ()) || (beaconInterval == m_beaconInterval.end ())) @@ -402,7 +405,7 @@ PeerManagementProtocol::DoShiftBeacon (uint32_t interface) neighbours = (*i)->GetBeaconTimingElement ().GetNeighboursTimingElementsList (); //Going through all my timing elements and detecting future beacon collisions for (IeBeaconTiming::NeighboursTimingUnitsList::const_iterator j = neighbours.begin (); j - != neighbours.end (); j++) + != neighbours.end (); j++) { if ((*i)->GetPeerAid () == (*j)->GetAid ()) { @@ -415,22 +418,22 @@ PeerManagementProtocol::DoShiftBeacon (uint32_t interface) continue; } //Timing element keeps beacon receiving times in 256us units, TU=1024us - if ((int) ((int)(*j)->GetLastBeacon () / 4 - (int)TimeToTu (lastBeacon->second)) % TimeToTu ( - beaconInterval->second) + if ((int)((int)(*j)->GetLastBeacon () / 4 - (int)TimeToTu (lastBeacon->second)) % TimeToTu ( + beaconInterval->second) != 0) { continue; } - int shift = 0; - do - { - shift = (int) beaconShift.GetValue (); - } - while (shift == 0); - PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface); - NS_ASSERT (plugin != m_plugins.end ()); - plugin->second->SetBeaconShift (TuToTime (shift)); - return; + int shift = 0; + do + { + shift = (int) beaconShift.GetValue (); + } + while (shift == 0); + PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface); + NS_ASSERT (plugin != m_plugins.end ()); + plugin->second->SetBeaconShift (TuToTime (shift)); + return; } } } @@ -442,7 +445,7 @@ PeerManagementProtocol::TuToTime (uint32_t x) uint32_t PeerManagementProtocol::TimeToTu (Time x) { - return (uint32_t) (x.GetMicroSeconds () / 1024); + return (uint32_t)(x.GetMicroSeconds () / 1024); } void @@ -473,13 +476,13 @@ PeerManagementProtocol::NotifyLinkClose (Mac48Address peerMp, Mac48Address peerI void PeerManagementProtocol::PeerLinkStatus (uint32_t interface, Mac48Address peerAddress, - Mac48Address peerMeshPointAddress, PeerLink::PeerState ostate, PeerLink::PeerState nstate) + Mac48Address peerMeshPointAddress, PeerLink::PeerState ostate, PeerLink::PeerState nstate) { PeerManagementProtocolMacMap::iterator plugin = m_plugins.find (interface); NS_ASSERT (plugin != m_plugins.end ()); NS_LOG_DEBUG ("Link between me:" << m_address << " my interface:" << plugin->second->GetAddress () - << " and peer mesh point:" << peerMeshPointAddress << " and its interface:" << peerAddress - << ", at my interface ID:" << interface << ". State movement:" << ostate << " -> " << nstate); + << " and peer mesh point:" << peerMeshPointAddress << " and its interface:" << peerAddress + << ", at my interface ID:" << interface << ". State movement:" << ostate << " -> " << nstate); if ((nstate == PeerLink::ESTAB) && (ostate != PeerLink::ESTAB)) { NotifyLinkOpen (peerMeshPointAddress, peerAddress, plugin->second->GetAddress (), interface); @@ -529,9 +532,9 @@ void PeerManagementProtocol::Statistics::Print (std::ostream & os) const { os << "" << std::endl; + "linksTotal=\"" << linksTotal << "\" " + "linksOpened=\"" << linksOpened << "\" " + "linksClosed=\"" << linksClosed << "\"/>" << std::endl; } void PeerManagementProtocol::Report (std::ostream & os) const diff --git a/src/mesh/model/dot11s/peer-management-protocol.h b/src/mesh/model/dot11s/peer-management-protocol.h index 3efb1e66a..7dd835d63 100644 --- a/src/mesh/model/dot11s/peer-management-protocol.h +++ b/src/mesh/model/dot11s/peer-management-protocol.h @@ -101,13 +101,13 @@ public: * management frame */ void ReceivePeerLinkFrame ( - uint32_t interface, - Mac48Address peerAddress, - Mac48Address peerMeshPointAddress, - uint16_t aid, - IePeerManagement peerManagementElement, - IeConfiguration meshConfig - ); + uint32_t interface, + Mac48Address peerAddress, + Mac48Address peerMeshPointAddress, + uint16_t aid, + IePeerManagement peerManagementElement, + IeConfiguration meshConfig + ); /** * \brief Cancels peer link due to broken configuration (Mesh ID or Supported * rates) @@ -177,10 +177,10 @@ private: PeerManagementProtocol (const PeerManagementProtocol &); Ptr InitiateLink ( - uint32_t interface, - Mac48Address peerAddress, - Mac48Address peerMeshPointAddress - ); + uint32_t interface, + Mac48Address peerAddress, + Mac48Address peerMeshPointAddress + ); /** * \name External peer-chooser * \{ @@ -201,7 +201,7 @@ private: Time TuToTime (uint32_t x); uint32_t TimeToTu (Time x); ///\} - + /// Aux. method to register open links void NotifyLinkOpen (Mac48Address peerMp, Mac48Address peerIface, Mac48Address myIface, uint32_t interface); /// Aux. method to register closed links @@ -210,7 +210,7 @@ private: PeerManagementProtocolMacMap m_plugins; Mac48Address m_address; Ptr m_meshId; - + uint16_t m_lastAssocId; uint16_t m_lastLocalLinkId; uint8_t m_maxNumberOfPeerLinks; @@ -239,14 +239,14 @@ private: * bool is status - true when new link has appeared, false - when link was closed, */ Callback m_peerStatusCallback; - + /// Simple link open/close trace source type. Addresses are: src interface, dst interface typedef TracedCallback LinkEventCallback; /// LinkOpen trace source LinkEventCallback m_linkOpenTraceSrc; /// LinkClose trace source LinkEventCallback m_linkCloseTraceSrc; - + ///\name Statistics: ///\{ struct Statistics { diff --git a/src/mesh/model/flame/flame-header.cc b/src/mesh/model/flame/flame-header.cc index 2665fcf3b..346e18be7 100644 --- a/src/mesh/model/flame/flame-header.cc +++ b/src/mesh/model/flame/flame-header.cc @@ -52,17 +52,17 @@ void FlameHeader::Print (std::ostream &os) const { os << "Cost = " << (uint16_t) m_cost << std::endl << "Sequence number = " << m_seqno - << std::endl << "Orig Destination = " << m_origDst << std::endl << "Orig Source = " << m_origSrc << std::endl; + << std::endl << "Orig Destination = " << m_origDst << std::endl << "Orig Source = " << m_origSrc << std::endl; } uint32_t FlameHeader::GetSerializedSize (void) const { return 1 // Reserved - + 1 // Cost - + 2 // Seqno - + 6 // Orig Dst - + 6 // Orig Src - + 2 // Flame Port + + 1 // Cost + + 2 // Seqno + + 6 // Orig Dst + + 6 // Orig Src + + 2 // Flame Port ; } void @@ -142,7 +142,7 @@ bool operator== (const FlameHeader & a, const FlameHeader & b) { return ((a.m_cost == b.m_cost) && (a.m_seqno == b.m_seqno) && (a.m_origDst == b.m_origDst) && (a.m_origSrc - == b.m_origSrc) && (a.m_protocol == b.m_protocol)); + == b.m_origSrc) && (a.m_protocol == b.m_protocol)); } } //namespace flame diff --git a/src/mesh/model/flame/flame-protocol-mac.cc b/src/mesh/model/flame/flame-protocol-mac.cc index d1a047a4a..009f8c558 100644 --- a/src/mesh/model/flame/flame-protocol-mac.cc +++ b/src/mesh/model/flame/flame-protocol-mac.cc @@ -68,7 +68,7 @@ FlameProtocolMac::Receive (Ptr packet, const WifiMacHeader & header) } bool FlameProtocolMac::UpdateOutcomingFrame (Ptr packet, WifiMacHeader & header, Mac48Address from, - Mac48Address to) + Mac48Address to) { if (!header.IsData ()) { @@ -104,18 +104,18 @@ void FlameProtocolMac::Statistics::Print (std::ostream &os) const { os << "" << std::endl; + "txUnicast=\"" << txUnicast << "\" " + "txBroadcast=\"" << txBroadcast << "\" " + "txBytes=\"" << txBytes << "\" " + "rxUnicast=\"" << rxUnicast << "\" " + "rxBroadcast=\"" << rxBroadcast << "\" " + "rxBytes=\"" << rxBytes << "\"/>" << std::endl; } void FlameProtocolMac::Report (std::ostream & os) const { os << "GetAddress () << "\">" << std::endl; + "address =\"" << m_parent->GetAddress () << "\">" << std::endl; m_stats.Print (os); os << "" << std::endl; diff --git a/src/mesh/model/flame/flame-protocol.cc b/src/mesh/model/flame/flame-protocol.cc index 3a0e4bd86..83f511250 100644 --- a/src/mesh/model/flame/flame-protocol.cc +++ b/src/mesh/model/flame/flame-protocol.cc @@ -45,7 +45,7 @@ NS_OBJECT_ENSURE_REGISTERED (FlameProtocol); TypeId FlameTag::GetTypeId () { - static TypeId tid = TypeId ("ns3::flame::FlameTag") .SetParent () .AddConstructor (); + static TypeId tid = TypeId ("ns3::flame::FlameTag").SetParent ().AddConstructor (); return tid; } @@ -114,22 +114,22 @@ FlameProtocol::GetTypeId () "How often we must send broadcast packets", TimeValue (Seconds (5)), MakeTimeAccessor ( - &FlameProtocol::m_broadcastInterval), + &FlameProtocol::m_broadcastInterval), MakeTimeChecker () ) .AddAttribute ( "MaxCost", "Cost threshold after which packet will be dropped", UintegerValue (32), MakeUintegerAccessor ( - &FlameProtocol::m_maxCost), + &FlameProtocol::m_maxCost), MakeUintegerChecker (3) ) - ; + ; return tid; } FlameProtocol::FlameProtocol () : m_address (Mac48Address ()), m_broadcastInterval (Seconds (5)), m_lastBroadcast (Seconds (0)), - m_maxCost (32), m_myLastSeqno (1), m_rtable (CreateObject ()) + m_maxCost (32), m_myLastSeqno (1), m_rtable (CreateObject ()) { } FlameProtocol::~FlameProtocol () @@ -144,7 +144,7 @@ FlameProtocol::DoDispose () } bool FlameProtocol::RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, - Ptr const_packet, uint16_t protocolType, RouteReplyCallback routeReply) + Ptr const_packet, uint16_t protocolType, RouteReplyCallback routeReply) { Ptr packet = const_packet->Copy (); if (sourceIface == m_mp->GetIfIndex ()) @@ -224,7 +224,7 @@ FlameProtocol::RequestRoute (uint32_t sourceIface, const Mac48Address source, co if (result.retransmitter == Mac48Address::GetBroadcast ()) { NS_LOG_DEBUG ("unicast packet dropped, because no route! I am " << GetAddress () - << ", RA = " << tag.receiver << ", TA = " << tag.transmitter); + << ", RA = " << tag.receiver << ", TA = " << tag.transmitter); m_stats.totalDropped++; return false; } @@ -255,7 +255,7 @@ FlameProtocol::RequestRoute (uint32_t sourceIface, const Mac48Address source, co } bool FlameProtocol::RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source, - const Mac48Address destination, Ptr packet, uint16_t& protocolType) + const Mac48Address destination, Ptr packet, uint16_t& protocolType) { //Filter seqno: if (source == GetAddress ()) @@ -277,7 +277,7 @@ FlameProtocol::RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source // Start PATH_UPDATE procedure if destination is our own address and last broadcast was sent more // than broadcast interval ago or was not sent at all if ((destination == GetAddress ()) && ((m_lastBroadcast + m_broadcastInterval < Simulator::Now ()) - || (m_lastBroadcast == Seconds (0)))) + || (m_lastBroadcast == Seconds (0)))) { Ptr packet = Create (); m_mp->Send (packet, Mac48Address::GetBroadcast (), 0); @@ -314,7 +314,7 @@ FlameProtocol::Install (Ptr mp) mp->SetRoutingProtocol (this); // Mesh point aggregates all installed protocols mp->AggregateObject (this); - m_address = Mac48Address::ConvertFrom (mp->GetAddress ());//* address; + m_address = Mac48Address::ConvertFrom (mp->GetAddress ()); //* address; return true; } Mac48Address @@ -324,7 +324,7 @@ FlameProtocol::GetAddress () } bool FlameProtocol::HandleDataFrame (uint16_t seqno, Mac48Address source, const FlameHeader flameHdr, - Mac48Address receiver, uint32_t fromInterface) + Mac48Address receiver, uint32_t fromInterface) { if (source == GetAddress ()) { @@ -353,19 +353,19 @@ void FlameProtocol::Statistics::Print (std::ostream & os) const { os << "" << std::endl; + "txUnicast=\"" << txUnicast << "\" " + "txBroadcast=\"" << txBroadcast << "\" " + "txBytes=\"" << txBytes << "\" " + "droppedTtl=\"" << droppedTtl << "\" " + "totalDropped=\"" << totalDropped << "\"/>" << std::endl; } void FlameProtocol::Report (std::ostream & os) const { os << "" << std::endl; + "address=\"" << m_address << "\"" << std::endl << + "broadcastInterval=\"" << m_broadcastInterval.GetSeconds () << "\"" << std::endl << + "maxCost=\"" << (uint16_t) m_maxCost << "\">" << std::endl; m_stats.Print (os); for (FlamePluginMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin++) { diff --git a/src/mesh/model/flame/flame-protocol.h b/src/mesh/model/flame/flame-protocol.h index a787fc1b1..cbfacbaf7 100644 --- a/src/mesh/model/flame/flame-protocol.h +++ b/src/mesh/model/flame/flame-protocol.h @@ -87,10 +87,10 @@ public: /// Route request, inherited from MeshL2RoutingProtocol bool RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, - Ptr packet, uint16_t protocolType, RouteReplyCallback routeReply); + Ptr packet, uint16_t protocolType, RouteReplyCallback routeReply); /// Cleanup flame headers! bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source, - const Mac48Address destination, Ptr packet, uint16_t& protocolType); + const Mac48Address destination, Ptr packet, uint16_t& protocolType); /** * \brief Install FLAME on given mesh point. * diff --git a/src/mesh/model/flame/flame-rtable.cc b/src/mesh/model/flame/flame-rtable.cc index 13e1a43df..a4b01c9ad 100644 --- a/src/mesh/model/flame/flame-rtable.cc +++ b/src/mesh/model/flame/flame-rtable.cc @@ -34,15 +34,15 @@ TypeId FlameRtable::GetTypeId () { static TypeId tid = - TypeId ("ns3::flame::FlameRtable") - .SetParent () .AddConstructor () - .AddAttribute ( "Lifetime", - "The lifetime of the routing enrty", - TimeValue (Seconds (120)), MakeTimeAccessor ( - &FlameRtable::m_lifetime), - MakeTimeChecker () - ) - ; + TypeId ("ns3::flame::FlameRtable") + .SetParent ().AddConstructor () + .AddAttribute ( "Lifetime", + "The lifetime of the routing enrty", + TimeValue (Seconds (120)), MakeTimeAccessor ( + &FlameRtable::m_lifetime), + MakeTimeChecker () + ) + ; return tid; } FlameRtable::FlameRtable () : @@ -59,7 +59,7 @@ FlameRtable::DoDispose () } void FlameRtable::AddPath (const Mac48Address destination, const Mac48Address retransmitter, - const uint32_t interface, const uint8_t cost, const uint16_t seqnum) + const uint32_t interface, const uint8_t cost, const uint16_t seqnum) { std::map::iterator i = m_routes.find (destination); if (i == m_routes.end ()) @@ -106,7 +106,7 @@ bool FlameRtable::LookupResult::IsValid () const { return !(retransmitter == Mac48Address::GetBroadcast () && ifIndex == INTERFACE_ANY && cost == MAX_COST - && seqnum == 0); + && seqnum == 0); } } //namespace flame diff --git a/src/mesh/model/flame/flame-rtable.h b/src/mesh/model/flame/flame-rtable.h index 7912ea8c3..d66d17d25 100644 --- a/src/mesh/model/flame/flame-rtable.h +++ b/src/mesh/model/flame/flame-rtable.h @@ -49,9 +49,9 @@ public: uint8_t cost; uint16_t seqnum; LookupResult (Mac48Address r = Mac48Address::GetBroadcast (), - uint32_t i = INTERFACE_ANY, - uint8_t c = MAX_COST, - uint16_t s = 0) + uint32_t i = INTERFACE_ANY, + uint8_t c = MAX_COST, + uint16_t s = 0) : retransmitter (r), ifIndex (i), cost (c), @@ -76,7 +76,7 @@ public: const uint32_t interface, const uint8_t cost, const uint16_t seqnum - ); + ); /** * \brief Lookup path to destination * \return Broadcast if not found diff --git a/src/mesh/model/mesh-information-element-vector.cc b/src/mesh/model/mesh-information-element-vector.cc index 3d52e57df..6a2a04ca6 100644 --- a/src/mesh/model/mesh-information-element-vector.cc +++ b/src/mesh/model/mesh-information-element-vector.cc @@ -45,41 +45,41 @@ MeshInformationElementVector::DeserializeSingleIe(Buffer::Iterator start) Ptr newElement; switch (id) { - case IE11S_MESH_CONFIGURATION: - newElement = Create (); - break; - case IE11S_MESH_ID: - newElement = Create (); - break; - case IE11S_LINK_METRIC_REPORT: - newElement = Create (); - break; - case IE11S_PEERING_MANAGEMENT: - newElement = Create (); - break; - case IE11S_BEACON_TIMING: - newElement = Create (); - break; - case IE11S_RANN: - newElement = Create (); - break; - case IE11S_PREQ: - newElement = Create (); - break; - case IE11S_PREP: - newElement = Create (); - break; - case IE11S_PERR: - newElement = Create (); - break; - case IE11S_MESH_PEERING_PROTOCOL_VERSION: - newElement = Create (); - break; - default: - // We peeked at the ID and length, so we need to back up the - // pointer before deferring to our parent. - i.Prev (2); - return WifiInformationElementVector::DeserializeSingleIe (i); + case IE11S_MESH_CONFIGURATION: + newElement = Create (); + break; + case IE11S_MESH_ID: + newElement = Create (); + break; + case IE11S_LINK_METRIC_REPORT: + newElement = Create (); + break; + case IE11S_PEERING_MANAGEMENT: + newElement = Create (); + break; + case IE11S_BEACON_TIMING: + newElement = Create (); + break; + case IE11S_RANN: + newElement = Create (); + break; + case IE11S_PREQ: + newElement = Create (); + break; + case IE11S_PREP: + newElement = Create (); + break; + case IE11S_PERR: + newElement = Create (); + break; + case IE11S_MESH_PEERING_PROTOCOL_VERSION: + newElement = Create (); + break; + default: + // We peeked at the ID and length, so we need to back up the + // pointer before deferring to our parent. + i.Prev (2); + return WifiInformationElementVector::DeserializeSingleIe (i); } if (GetSize () + length > m_maxSize) { diff --git a/src/mesh/model/mesh-information-element.h b/src/mesh/model/mesh-information-element.h index c8b4c90ad..0031c2695 100644 --- a/src/mesh/model/mesh-information-element.h +++ b/src/mesh/model/mesh-information-element.h @@ -40,17 +40,17 @@ namespace ns3 { #define IE11S_PROXY_UPDATE ((WifiInformationElementId)37) #define IE11S_PROXY_UPDATE_CONFIRMATION ((WifiInformationElementId)38) #define IE11S_ABBREVIATED_HANDSHAKE ((WifiInformationElementId)39) - /* begin of open80211s-compatible IDs */ +/* begin of open80211s-compatible IDs */ #define IE11S_MESH_CONFIGURATION ((WifiInformationElementId)51) #define IE11S_MESH_ID ((WifiInformationElementId)52) #define IE11S_PEERING_MANAGEMENT ((WifiInformationElementId)55) - /* end of open80211s-compatible IDs */ +/* end of open80211s-compatible IDs */ #define IE11S_RANN ((WifiInformationElementId)67) - /* begin of open80211s-compatible IDs */ +/* begin of open80211s-compatible IDs */ #define IE11S_PREQ ((WifiInformationElementId)68) #define IE11S_PREP ((WifiInformationElementId)69) #define IE11S_PERR ((WifiInformationElementId)70) - /* end of open80211s-compatible IDs */ +/* end of open80211s-compatible IDs */ #define IE11S_MESH_PEERING_PROTOCOL_VERSION ((WifiInformationElementId)74) } diff --git a/src/mesh/model/mesh-l2-routing-protocol.h b/src/mesh/model/mesh-l2-routing-protocol.h index dbf81d4b6..1a9a81be4 100644 --- a/src/mesh/model/mesh-l2-routing-protocol.h +++ b/src/mesh/model/mesh-l2-routing-protocol.h @@ -70,14 +70,14 @@ public: * * \param uint32_t outcoming interface to use or 0xffffffff if packet should be sent by ALL interfaces */ - typedef Callback, /* packet */ - Mac48Address,/* src */ - Mac48Address,/* dst */ - uint16_t, /* protocol */ - uint32_t /* out interface ID */ - > RouteReplyCallback; + typedef Callback, /* packet */ + Mac48Address, /* src */ + Mac48Address, /* dst */ + uint16_t, /* protocol */ + uint32_t /* out interface ID */ + > RouteReplyCallback; /** * Request routing information, all packets must go through this request. * @@ -95,7 +95,7 @@ public: * to really send packet using routing information. */ virtual bool RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, Ptr< - const Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply) = 0; + const Packet> packet, uint16_t protocolType, RouteReplyCallback routeReply) = 0; /** * \brief When packet is ready to go to upper layer, protocol must * remove all its information: tags, header, etc. So, @@ -111,7 +111,7 @@ public: * changed */ virtual bool RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< - Packet> packet, uint16_t & protocolType) = 0; + Packet> packet, uint16_t & protocolType) = 0; /// Set host mesh point, analog of SetNode (...) methods for upper layer protocols. void SetMeshPoint (Ptr mp); @@ -122,5 +122,5 @@ protected: /// Host mesh point Ptr m_mp; }; -}//namespace ns3 +} //namespace ns3 #endif diff --git a/src/mesh/model/mesh-point-device.cc b/src/mesh/model/mesh-point-device.cc index bd65901de..d503eabc1 100644 --- a/src/mesh/model/mesh-point-device.cc +++ b/src/mesh/model/mesh-point-device.cc @@ -37,20 +37,20 @@ TypeId MeshPointDevice::GetTypeId () { static TypeId tid = TypeId ("ns3::MeshPointDevice") - .SetParent () - .AddConstructor () - .AddAttribute ("Mtu", "The MAC-level Maximum Transmission Unit", - UintegerValue (0xffff), - MakeUintegerAccessor (&MeshPointDevice::SetMtu, - &MeshPointDevice::GetMtu), - MakeUintegerChecker ()) - .AddAttribute ( "RoutingProtocol", - "The mesh routing protocol used by this mesh point.", - PointerValue (), - MakePointerAccessor ( + .SetParent () + .AddConstructor () + .AddAttribute ("Mtu", "The MAC-level Maximum Transmission Unit", + UintegerValue (0xffff), + MakeUintegerAccessor (&MeshPointDevice::SetMtu, + &MeshPointDevice::GetMtu), + MakeUintegerChecker ()) + .AddAttribute ( "RoutingProtocol", + "The mesh routing protocol used by this mesh point.", + PointerValue (), + MakePointerAccessor ( &MeshPointDevice::GetRoutingProtocol, &MeshPointDevice::SetRoutingProtocol), - MakePointerChecker< - MeshL2RoutingProtocol> ()); + MakePointerChecker< + MeshL2RoutingProtocol> ()); return tid; } @@ -91,7 +91,7 @@ MeshPointDevice::DoDispose () void MeshPointDevice::ReceiveFromDevice (Ptr incomingPort, Ptr packet, uint16_t protocol, - Address const &src, Address const &dst, PacketType packetType) + Address const &src, Address const &dst, PacketType packetType) { NS_LOG_FUNCTION_NOARGS (); NS_LOG_DEBUG ("UID is " << packet->GetUid ()); @@ -133,11 +133,11 @@ MeshPointDevice::ReceiveFromDevice (Ptr incomingPort, Ptr inport, Ptr packet, uint16_t protocol, - const Mac48Address src, const Mac48Address dst) + const Mac48Address src, const Mac48Address dst) { // pass through routing protocol m_routingProtocol->RequestRoute (inport->GetIfIndex (), src, dst, packet, protocol, MakeCallback ( - &MeshPointDevice::DoSend, this)); + &MeshPointDevice::DoSend, this)); } void @@ -251,17 +251,17 @@ MeshPointDevice::Send (Ptr packet, const Address& dest, uint16_t protoco { const Mac48Address dst48 = Mac48Address::ConvertFrom (dest); return m_routingProtocol->RequestRoute (m_ifIndex, m_address, dst48, packet, protocolNumber, MakeCallback ( - &MeshPointDevice::DoSend, this)); + &MeshPointDevice::DoSend, this)); } bool MeshPointDevice::SendFrom (Ptr packet, const Address& src, const Address& dest, - uint16_t protocolNumber) + uint16_t protocolNumber) { const Mac48Address src48 = Mac48Address::ConvertFrom (src); const Mac48Address dst48 = Mac48Address::ConvertFrom (dest); return m_routingProtocol->RequestRoute (m_ifIndex, src48, dst48, packet, protocolNumber, MakeCallback ( - &MeshPointDevice::DoSend, this)); + &MeshPointDevice::DoSend, this)); } Ptr @@ -370,13 +370,13 @@ MeshPointDevice::AddInterface (Ptr iface) if (ifaceMac == 0) { NS_FATAL_ERROR ( - "WiFi device doesn't have correct MAC installed: cannot be used as a mesh point interface."); + "WiFi device doesn't have correct MAC installed: cannot be used as a mesh point interface."); } ifaceMac->SetMeshPointAddress (m_address); // Receive frames from this interface m_node->RegisterProtocolHandler (MakeCallback (&MeshPointDevice::ReceiveFromDevice, this), 0, iface, /*promiscuous = */ - true); + true); m_ifaces.push_back (iface); m_channel->AddChannel (iface->GetChannel ()); } @@ -390,7 +390,7 @@ MeshPointDevice::SetRoutingProtocol (Ptr protocol) { NS_LOG_FUNCTION_NOARGS (); NS_ASSERT_MSG (PeekPointer (protocol->GetMeshPoint ()) == this, - "Routing protocol must be installed on mesh point to be useful."); + "Routing protocol must be installed on mesh point to be useful."); m_routingProtocol = protocol; } @@ -402,7 +402,7 @@ MeshPointDevice::GetRoutingProtocol () const void MeshPointDevice::DoSend (bool success, Ptr packet, Mac48Address src, Mac48Address dst, - uint16_t protocol, uint32_t outIface) + uint16_t protocol, uint32_t outIface) { if (!success) { @@ -433,7 +433,7 @@ MeshPointDevice::DoSend (bool success, Ptr packet, Mac48Address src, Mac { for (std::vector >::iterator i = m_ifaces.begin (); i != m_ifaces.end (); i++) { - (*i) -> SendFrom (packet->Copy (), src, dst, protocol); + (*i)->SendFrom (packet->Copy (), src, dst, protocol); } } } @@ -446,19 +446,19 @@ void MeshPointDevice::Report (std::ostream & os) const { os << "" << std::endl; + "txUnicastData=\"" << m_txStats.unicastData << "\"" << std::endl << + "txUnicastDataBytes=\"" << m_txStats.unicastDataBytes << "\"" << std::endl << + "txBroadcastData=\"" << m_txStats.broadcastData << "\"" << std::endl << + "txBroadcastDataBytes=\"" << m_txStats.broadcastDataBytes << "\"" << std::endl << + "rxUnicastData=\"" << m_rxStats.unicastData << "\"" << std::endl << + "rxUnicastDataBytes=\"" << m_rxStats.unicastDataBytes << "\"" << std::endl << + "rxBroadcastData=\"" << m_rxStats.broadcastData << "\"" << std::endl << + "rxBroadcastDataBytes=\"" << m_rxStats.broadcastDataBytes << "\"" << std::endl << + "fwdUnicastData=\"" << m_fwdStats.unicastData << "\"" << std::endl << + "fwdUnicastDataBytes=\"" << m_fwdStats.unicastDataBytes << "\"" << std::endl << + "fwdBroadcastData=\"" << m_fwdStats.broadcastData << "\"" << std::endl << + "fwdBroadcastDataBytes=\"" << m_fwdStats.broadcastDataBytes << "\"" << std::endl << + "/>" << std::endl; } void diff --git a/src/mesh/model/mesh-point-device.h b/src/mesh/model/mesh-point-device.h index 349b872ed..4509622cf 100644 --- a/src/mesh/model/mesh-point-device.h +++ b/src/mesh/model/mesh-point-device.h @@ -131,7 +131,7 @@ private: /// Forward packet down to interfaces void Forward (Ptr incomingPort, Ptr packet, uint16_t protocol, const Mac48Address src, - const Mac48Address dst); + const Mac48Address dst); /** * \brief Response callback for L2 routing protocol. This will be executed when routing information is ready. * @@ -144,7 +144,7 @@ private: */ void DoSend (bool success, Ptr packet, Mac48Address src, Mac48Address dst, uint16_t protocol, - uint32_t iface); + uint32_t iface); private: /// Receive action diff --git a/src/mesh/model/mesh-wifi-interface-mac-plugin.h b/src/mesh/model/mesh-wifi-interface-mac-plugin.h index 473be36ad..1070e15e6 100644 --- a/src/mesh/model/mesh-wifi-interface-mac-plugin.h +++ b/src/mesh/model/mesh-wifi-interface-mac-plugin.h @@ -30,7 +30,7 @@ namespace ns3 { class MeshWifiInterfaceMac; - + /** * \ingroup mesh * @@ -61,7 +61,7 @@ public: virtual bool UpdateOutcomingFrame (Ptr packet, WifiMacHeader & header, Mac48Address from, Mac48Address to) = 0; /** * \brief Update beacon before it will be formed and sent - * + * * TODO define when MAC call this */ virtual void UpdateBeacon (MeshWifiBeacon & beacon) const = 0; diff --git a/src/mesh/test/dot11s/dot11s-test-suite.cc b/src/mesh/test/dot11s/dot11s-test-suite.cc index e0dce3249..499984ffe 100644 --- a/src/mesh/test/dot11s/dot11s-test-suite.cc +++ b/src/mesh/test/dot11s/dot11s-test-suite.cc @@ -223,7 +223,7 @@ PeerLinkFrameStartTest::DoRun () { PeerLinkFrameStart a; PeerLinkFrameStart::PlinkFrameStartFields fields; - fields.subtype = (uint8_t) (WifiActionHeader::PEER_LINK_OPEN); + fields.subtype = (uint8_t)(WifiActionHeader::PEER_LINK_OPEN); fields.capability = 0; fields.aid = 101; fields.reasonCode = 12; @@ -232,14 +232,14 @@ PeerLinkFrameStartTest::DoRun () Ptr packet = Create (); packet->AddHeader (a); PeerLinkFrameStart b; - b.SetPlinkFrameSubtype ((uint8_t) (WifiActionHeader::PEER_LINK_OPEN)); + b.SetPlinkFrameSubtype ((uint8_t)(WifiActionHeader::PEER_LINK_OPEN)); packet->RemoveHeader (b); NS_TEST_EXPECT_MSG_EQ (a, b, "PEER_LINK_OPEN works"); } { PeerLinkFrameStart a; PeerLinkFrameStart::PlinkFrameStartFields fields; - fields.subtype = (uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM); + fields.subtype = (uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM); fields.capability = 0; fields.aid = 1234; fields.reasonCode = 12; @@ -248,14 +248,14 @@ PeerLinkFrameStartTest::DoRun () Ptr packet = Create (); packet->AddHeader (a); PeerLinkFrameStart b; - b.SetPlinkFrameSubtype ((uint8_t) (WifiActionHeader::PEER_LINK_CONFIRM)); + b.SetPlinkFrameSubtype ((uint8_t)(WifiActionHeader::PEER_LINK_CONFIRM)); packet->RemoveHeader (b); NS_TEST_EXPECT_MSG_EQ (a, b, "PEER_LINK_CONFIRM works"); } { PeerLinkFrameStart a; PeerLinkFrameStart::PlinkFrameStartFields fields; - fields.subtype = (uint8_t) (WifiActionHeader::PEER_LINK_CLOSE); + fields.subtype = (uint8_t)(WifiActionHeader::PEER_LINK_CLOSE); fields.capability = 0; fields.aid = 10; fields.meshId = IeMeshId ("qqq"); @@ -264,7 +264,7 @@ PeerLinkFrameStartTest::DoRun () Ptr packet = Create (); packet->AddHeader (a); PeerLinkFrameStart b; - b.SetPlinkFrameSubtype ((uint8_t) (WifiActionHeader::PEER_LINK_CLOSE)); + b.SetPlinkFrameSubtype ((uint8_t)(WifiActionHeader::PEER_LINK_CLOSE)); packet->RemoveHeader (b); NS_TEST_EXPECT_MSG_EQ (a, b, "PEER_LINK_CLOSE works"); } diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression.cc b/src/mesh/test/dot11s/hwmp-proactive-regression.cc index c50be4e4e..aaf8175e6 100644 --- a/src/mesh/test/dot11s/hwmp-proactive-regression.cc +++ b/src/mesh/test/dot11s/hwmp-proactive-regression.cc @@ -44,8 +44,8 @@ const char * const PREFIX = "hwmp-proactive-regression-test"; HwmpProactiveRegressionTest::HwmpProactiveRegressionTest () : TestCase ("HWMP proactive regression test"), - m_nodes (0), - m_time (Seconds (5)) + m_nodes (0), + m_time (Seconds (5)) { } @@ -64,7 +64,7 @@ HwmpProactiveRegressionTest::DoRun () Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - + if (!WRITE_VECTORS) CheckResults (); delete m_nodes, m_nodes = 0; @@ -76,12 +76,12 @@ HwmpProactiveRegressionTest::CreateNodes () m_nodes->Create (5); MobilityHelper mobility; mobility.SetPositionAllocator ("ns3::GridPositionAllocator", - "MinX", DoubleValue (0.0), - "MinY", DoubleValue (0.0), - "DeltaX", DoubleValue (100), - "DeltaY", DoubleValue (0), - "GridWidth", UintegerValue (5), - "LayoutType", StringValue ("RowFirst")); + "MinX", DoubleValue (0.0), + "MinY", DoubleValue (0.0), + "DeltaX", DoubleValue (100), + "DeltaY", DoubleValue (0), + "GridWidth", UintegerValue (5), + "LayoutType", StringValue ("RowFirst")); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (*m_nodes); } @@ -105,8 +105,8 @@ HwmpProactiveRegressionTest::CreateDevices () { // 1. setup WiFi YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); - // This test suite output was originally based on YansErrorRateModel - wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); + // This test suite output was originally based on YansErrorRateModel + wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); wifiPhy.SetChannel (wifiChannel.Create ()); // 2. setup mesh @@ -114,7 +114,7 @@ HwmpProactiveRegressionTest::CreateDevices () mesh.SetStackInstaller ("ns3::Dot11sStack", "Root", Mac48AddressValue (Mac48Address ("00:00:00:00:00:0d"))); mesh.SetMacType ("RandomStart", TimeValue (Seconds(0.1))); mesh.SetNumberOfInterfaces (1); - NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); + NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); // 3. setup TCP/IP InternetStackHelper internetStack; internetStack.Install (*m_nodes); @@ -125,7 +125,7 @@ HwmpProactiveRegressionTest::CreateDevices () std::string prefix = (WRITE_VECTORS ? NS_TEST_SOURCEDIR : std::string(GetTempDir ())) + PREFIX; wifiPhy.EnablePcapAll (prefix); } - + void HwmpProactiveRegressionTest::CheckResults () { @@ -135,11 +135,11 @@ HwmpProactiveRegressionTest::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << PREFIX << "-" << i << "-1.pcap"; os2 << GetTempDir () << PREFIX << "-" << i << "-1.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); // TODO support default PcapWriter snap length here NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/mesh/test/dot11s/hwmp-proactive-regression.h b/src/mesh/test/dot11s/hwmp-proactive-regression.h index ba4dca9d1..eefebfdcc 100644 --- a/src/mesh/test/dot11s/hwmp-proactive-regression.h +++ b/src/mesh/test/dot11s/hwmp-proactive-regression.h @@ -69,7 +69,7 @@ private: /// Simulation time Time m_time; Ipv4InterfaceContainer m_interfaces; - + void CreateNodes (); void CreateDevices (); void InstallApplications (); diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression.cc b/src/mesh/test/dot11s/hwmp-reactive-regression.cc index d7613cf35..7bd27e2ff 100644 --- a/src/mesh/test/dot11s/hwmp-reactive-regression.cc +++ b/src/mesh/test/dot11s/hwmp-reactive-regression.cc @@ -41,8 +41,8 @@ const bool WRITE_VECTORS = false; const char * const PREFIX = "hwmp-reactive-regression-test"; HwmpReactiveRegressionTest::HwmpReactiveRegressionTest () : TestCase ("HWMP on-demand regression test"), - m_nodes (0), - m_time (Seconds (10)) + m_nodes (0), + m_time (Seconds (10)) { } HwmpReactiveRegressionTest::~HwmpReactiveRegressionTest () @@ -60,7 +60,7 @@ HwmpReactiveRegressionTest::DoRun () Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - + if (!WRITE_VECTORS) CheckResults (); delete m_nodes, m_nodes = 0; } @@ -102,8 +102,8 @@ HwmpReactiveRegressionTest::CreateDevices () { // 1. setup WiFi YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); - // This test suite output was originally based on YansErrorRateModel - wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); + // This test suite output was originally based on YansErrorRateModel + wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); wifiPhy.SetChannel (wifiChannel.Create ()); // 2. setup mesh @@ -111,7 +111,7 @@ HwmpReactiveRegressionTest::CreateDevices () mesh.SetStackInstaller ("ns3::Dot11sStack"); mesh.SetMacType ("RandomStart", TimeValue (Seconds(0.1))); mesh.SetNumberOfInterfaces (1); - NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); + NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); // 3. setup TCP/IP InternetStackHelper internetStack; internetStack.Install (*m_nodes); @@ -123,7 +123,7 @@ HwmpReactiveRegressionTest::CreateDevices () wifiPhy.EnablePcapAll (prefix); } - + void HwmpReactiveRegressionTest::CheckResults () { @@ -133,11 +133,11 @@ HwmpReactiveRegressionTest::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << PREFIX << "-" << i << "-1.pcap"; os2 << GetTempDir () << PREFIX << "-" << i << "-1.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); // TODO support default PcapWriter snap length here NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/mesh/test/dot11s/hwmp-reactive-regression.h b/src/mesh/test/dot11s/hwmp-reactive-regression.h index ee6d55f15..a37776447 100644 --- a/src/mesh/test/dot11s/hwmp-reactive-regression.h +++ b/src/mesh/test/dot11s/hwmp-reactive-regression.h @@ -82,7 +82,7 @@ private: /// Simulation time Time m_time; Ipv4InterfaceContainer m_interfaces; - + void CreateNodes (); void CreateDevices (); void InstallApplications (); diff --git a/src/mesh/test/dot11s/hwmp-simplest-regression.cc b/src/mesh/test/dot11s/hwmp-simplest-regression.cc index cf6d177eb..472e545bc 100644 --- a/src/mesh/test/dot11s/hwmp-simplest-regression.cc +++ b/src/mesh/test/dot11s/hwmp-simplest-regression.cc @@ -43,8 +43,8 @@ const char * const PREFIX = "hwmp-simplest-regression-test"; HwmpSimplestRegressionTest::HwmpSimplestRegressionTest () : TestCase ("Simplest HWMP regression test"), - m_nodes (0), - m_time (Seconds (15)) + m_nodes (0), + m_time (Seconds (15)) { } @@ -63,7 +63,7 @@ HwmpSimplestRegressionTest::DoRun () Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - + if (!WRITE_VECTORS) CheckResults (); delete m_nodes, m_nodes = 0; @@ -75,12 +75,12 @@ HwmpSimplestRegressionTest::CreateNodes () m_nodes->Create (2); MobilityHelper mobility; mobility.SetPositionAllocator ("ns3::GridPositionAllocator", - "MinX", DoubleValue (0.0), - "MinY", DoubleValue (0.0), - "DeltaX", DoubleValue (1 /*meter*/), - "DeltaY", DoubleValue (0), - "GridWidth", UintegerValue (2), - "LayoutType", StringValue ("RowFirst")); + "MinX", DoubleValue (0.0), + "MinY", DoubleValue (0.0), + "DeltaX", DoubleValue (1 /*meter*/), + "DeltaY", DoubleValue (0), + "GridWidth", UintegerValue (2), + "LayoutType", StringValue ("RowFirst")); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (*m_nodes); Simulator::Schedule (Seconds(10.0), &HwmpSimplestRegressionTest::ResetPosition, this); @@ -123,7 +123,7 @@ HwmpSimplestRegressionTest::CreateDevices () mesh.SetStackInstaller ("ns3::Dot11sStack"); mesh.SetMacType ("RandomStart", TimeValue (Seconds(0.1))); mesh.SetNumberOfInterfaces (1); - NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); + NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); // 3. setup TCP/IP InternetStackHelper internetStack; internetStack.Install (*m_nodes); @@ -134,7 +134,7 @@ HwmpSimplestRegressionTest::CreateDevices () std::string prefix = (WRITE_VECTORS ? NS_TEST_SOURCEDIR : std::string(GetTempDir ())) + PREFIX; wifiPhy.EnablePcapAll (prefix); } - + void HwmpSimplestRegressionTest::CheckResults () { @@ -144,11 +144,11 @@ HwmpSimplestRegressionTest::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << PREFIX << "-" << i << "-1.pcap"; os2 << GetTempDir () << PREFIX << "-" << i << "-1.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); // TODO support default PcapWriter snap length here NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/mesh/test/dot11s/hwmp-simplest-regression.h b/src/mesh/test/dot11s/hwmp-simplest-regression.h index 936368fbc..4367c8e31 100644 --- a/src/mesh/test/dot11s/hwmp-simplest-regression.h +++ b/src/mesh/test/dot11s/hwmp-simplest-regression.h @@ -80,7 +80,7 @@ private: /// Simulation time Time m_time; Ipv4InterfaceContainer m_interfaces; - + void CreateNodes (); void CreateDevices (); void InstallApplications (); diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression.cc b/src/mesh/test/dot11s/hwmp-target-flags-regression.cc index f53adc034..3bdf3748e 100644 --- a/src/mesh/test/dot11s/hwmp-target-flags-regression.cc +++ b/src/mesh/test/dot11s/hwmp-target-flags-regression.cc @@ -43,8 +43,8 @@ const char * const PREFIX = "hwmp-target-flags-regression-test"; HwmpDoRfRegressionTest::HwmpDoRfRegressionTest () : TestCase ("HWMP target flags regression test"), - m_nodes (0), - m_time (Seconds (5)) + m_nodes (0), + m_time (Seconds (5)) { } @@ -63,7 +63,7 @@ HwmpDoRfRegressionTest::DoRun () Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - + if (!WRITE_VECTORS) CheckResults (); delete m_nodes, m_nodes = 0; @@ -75,12 +75,12 @@ HwmpDoRfRegressionTest::CreateNodes () m_nodes->Create (4); MobilityHelper mobility; mobility.SetPositionAllocator ("ns3::GridPositionAllocator", - "MinX", DoubleValue (0.0), - "MinY", DoubleValue (0.0), - "DeltaX", DoubleValue (100), - "DeltaY", DoubleValue (0), - "GridWidth", UintegerValue (4), - "LayoutType", StringValue ("RowFirst")); + "MinX", DoubleValue (0.0), + "MinY", DoubleValue (0.0), + "DeltaX", DoubleValue (100), + "DeltaY", DoubleValue (0), + "GridWidth", UintegerValue (4), + "LayoutType", StringValue ("RowFirst")); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (*m_nodes); } @@ -121,8 +121,8 @@ HwmpDoRfRegressionTest::CreateDevices () { // 1. setup WiFi YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); - // This test suite output was originally based on YansErrorRateModel - wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); + // This test suite output was originally based on YansErrorRateModel + wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); wifiPhy.SetChannel (wifiChannel.Create ()); // 2. setup mesh @@ -130,7 +130,7 @@ HwmpDoRfRegressionTest::CreateDevices () mesh.SetStackInstaller ("ns3::Dot11sStack"); mesh.SetMacType ("RandomStart", TimeValue (Seconds(0.1))); mesh.SetNumberOfInterfaces (1); - NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); + NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); // 3. setup TCP/IP InternetStackHelper internetStack; internetStack.Install (*m_nodes); @@ -141,7 +141,7 @@ HwmpDoRfRegressionTest::CreateDevices () std::string prefix = (WRITE_VECTORS ? NS_TEST_SOURCEDIR : std::string(GetTempDir ())) + PREFIX; wifiPhy.EnablePcapAll (prefix); } - + void HwmpDoRfRegressionTest::CheckResults () { @@ -151,11 +151,11 @@ HwmpDoRfRegressionTest::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << PREFIX << "-" << i << "-1.pcap"; os2 << GetTempDir () << PREFIX << "-" << i << "-1.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); // TODO support default PcapWriter snap length here NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/mesh/test/dot11s/hwmp-target-flags-regression.h b/src/mesh/test/dot11s/hwmp-target-flags-regression.h index f514c0fad..441e99799 100644 --- a/src/mesh/test/dot11s/hwmp-target-flags-regression.h +++ b/src/mesh/test/dot11s/hwmp-target-flags-regression.h @@ -79,7 +79,7 @@ private: /// Simulation time Time m_time; Ipv4InterfaceContainer m_interfaces; - + void CreateNodes (); void CreateDevices (); void InstallApplications (); diff --git a/src/mesh/test/dot11s/pmp-regression.cc b/src/mesh/test/dot11s/pmp-regression.cc index 67135a77b..a772dfc10 100644 --- a/src/mesh/test/dot11s/pmp-regression.cc +++ b/src/mesh/test/dot11s/pmp-regression.cc @@ -40,8 +40,8 @@ const bool WRITE_VECTORS = false; const char * const PREFIX = "pmp-regression-test"; PeerManagementProtocolRegressionTest::PeerManagementProtocolRegressionTest () : TestCase ("PMP regression test"), - m_nodes (0), - m_time (Seconds (1)) + m_nodes (0), + m_time (Seconds (1)) { } @@ -60,9 +60,9 @@ PeerManagementProtocolRegressionTest::DoRun () Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - + if (!WRITE_VECTORS) CheckResults (); - + delete m_nodes, m_nodes = 0; } @@ -73,12 +73,12 @@ PeerManagementProtocolRegressionTest::CreateNodes () m_nodes->Create (2); MobilityHelper mobility; mobility.SetPositionAllocator ("ns3::GridPositionAllocator", - "MinX", DoubleValue (0.0), - "MinY", DoubleValue (0.0), - "DeltaX", DoubleValue (1 /*meter*/), - "DeltaY", DoubleValue (0), - "GridWidth", UintegerValue (2), - "LayoutType", StringValue ("RowFirst")); + "MinX", DoubleValue (0.0), + "MinY", DoubleValue (0.0), + "DeltaX", DoubleValue (1 /*meter*/), + "DeltaY", DoubleValue (0), + "GridWidth", UintegerValue (2), + "LayoutType", StringValue ("RowFirst")); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (*m_nodes); } @@ -110,11 +110,11 @@ PeerManagementProtocolRegressionTest::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << PREFIX << "-" << i << "-1.pcap"; os2 << GetTempDir () << PREFIX << "-" << i << "-1.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); // TODO support default PcapWriter snap length here NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/mesh/test/dot11s/pmp-regression.h b/src/mesh/test/dot11s/pmp-regression.h index ae80d2a77..48a4a4504 100644 --- a/src/mesh/test/dot11s/pmp-regression.h +++ b/src/mesh/test/dot11s/pmp-regression.h @@ -46,13 +46,13 @@ class PeerManagementProtocolRegressionTest : public TestCase public: PeerManagementProtocolRegressionTest (); ~PeerManagementProtocolRegressionTest (); - + private: /// XXX It is important to have pointers here NodeContainer * m_nodes; /// Simulation time Time m_time; - + void CreateNodes (); void CreateDevices (); void CheckResults (); diff --git a/src/mesh/test/flame/flame-regression.cc b/src/mesh/test/flame/flame-regression.cc index 670078acd..0e04a73de 100644 --- a/src/mesh/test/flame/flame-regression.cc +++ b/src/mesh/test/flame/flame-regression.cc @@ -43,8 +43,8 @@ const char * const PREFIX = "flame-regression-test"; FlameRegressionTest::FlameRegressionTest () : TestCase ("FLAME regression test"), - m_nodes (0), - m_time (Seconds (10)) + m_nodes (0), + m_time (Seconds (10)) { } @@ -64,7 +64,7 @@ FlameRegressionTest::DoRun () Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - + if (!WRITE_VECTORS) CheckResults (); delete m_nodes, m_nodes = 0; @@ -77,12 +77,12 @@ FlameRegressionTest::CreateNodes () m_nodes->Create (3); MobilityHelper mobility; mobility.SetPositionAllocator ("ns3::GridPositionAllocator", - "MinX", DoubleValue (0.0), - "MinY", DoubleValue (0.0), - "DeltaX", DoubleValue (150), - "DeltaY", DoubleValue (0), - "GridWidth", UintegerValue (3), - "LayoutType", StringValue ("RowFirst")); + "MinX", DoubleValue (0.0), + "MinY", DoubleValue (0.0), + "DeltaX", DoubleValue (150), + "DeltaY", DoubleValue (0), + "GridWidth", UintegerValue (3), + "LayoutType", StringValue ("RowFirst")); mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (*m_nodes); } @@ -92,7 +92,7 @@ FlameRegressionTest::CreateDevices () { // 1. setup WiFi YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); - // This test suite output was originally based on YansErrorRateModel + // This test suite output was originally based on YansErrorRateModel wifiPhy.SetErrorRateModel ("ns3::YansErrorRateModel"); YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); wifiPhy.SetChannel (wifiChannel.Create ()); @@ -101,7 +101,7 @@ FlameRegressionTest::CreateDevices () mesh.SetStackInstaller ("ns3::FlameStack"); mesh.SetMacType ("RandomStart", TimeValue (Seconds(0.1))); mesh.SetNumberOfInterfaces (1); - NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); + NetDeviceContainer meshDevices = mesh.Install (wifiPhy, *m_nodes); // 3. setup TCP/IP InternetStackHelper internetStack; internetStack.Install (*m_nodes); @@ -128,7 +128,7 @@ FlameRegressionTest::InstallApplications () clientApps.Start (Seconds (1.0)); clientApps.Stop (m_time); } - + void FlameRegressionTest::CheckResults () { @@ -138,11 +138,11 @@ FlameRegressionTest::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << PREFIX << "-" << i << "-1.pcap"; os2 << GetTempDir () << PREFIX << "-" << i << "-1.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); // TODO support default PcapWriter snap length here NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/mesh/test/flame/flame-regression.h b/src/mesh/test/flame/flame-regression.h index d79f1193f..ebcc69723 100644 --- a/src/mesh/test/flame/flame-regression.h +++ b/src/mesh/test/flame/flame-regression.h @@ -69,7 +69,7 @@ private: Time m_time; /// Needed to install applications Ipv4InterfaceContainer m_interfaces; - + void CreateNodes (); void CreateDevices (); void InstallApplications (); diff --git a/src/mobility/examples/main-random-topology.cc b/src/mobility/examples/main-random-topology.cc index 52eb3a1dd..8e585c9f4 100644 --- a/src/mobility/examples/main-random-topology.cc +++ b/src/mobility/examples/main-random-topology.cc @@ -31,12 +31,12 @@ int main (int argc, char *argv[]) mobility.Install (c); Config::Connect ("/NodeList/*/$ns3::MobilityModel/CourseChange", - MakeCallback (&CourseChange)); - + MakeCallback (&CourseChange)); + Simulator::Stop (Seconds (100.0)); Simulator::Run (); - + Simulator::Destroy (); return 0; } diff --git a/src/mobility/examples/main-random-walk.cc b/src/mobility/examples/main-random-walk.cc index 3a118b129..2570a3364 100644 --- a/src/mobility/examples/main-random-walk.cc +++ b/src/mobility/examples/main-random-walk.cc @@ -45,7 +45,7 @@ int main (int argc, char *argv[]) Simulator::Stop (Seconds (100.0)); Simulator::Run (); - + Simulator::Destroy (); return 0; } diff --git a/src/mobility/helper/mobility-helper.cc b/src/mobility/helper/mobility-helper.cc index 8cfe13bd4..fd2450905 100644 --- a/src/mobility/helper/mobility-helper.cc +++ b/src/mobility/helper/mobility-helper.cc @@ -35,19 +35,20 @@ NS_LOG_COMPONENT_DEFINE ("MobilityHelper"); MobilityHelper::MobilityHelper () { m_position = CreateObjectWithAttributes - ("X", RandomVariableValue (ConstantVariable (0.0)), - "Y", RandomVariableValue (ConstantVariable (0.0))); + ("X", RandomVariableValue (ConstantVariable (0.0)), + "Y", RandomVariableValue (ConstantVariable (0.0))); m_mobility.SetTypeId ("ns3::ConstantPositionMobilityModel"); } MobilityHelper::~MobilityHelper () -{} -void +{ +} +void MobilityHelper::SetPositionAllocator (Ptr allocator) { m_position = allocator; } -void +void MobilityHelper::SetPositionAllocator (std::string type, std::string n1, const AttributeValue &v1, std::string n2, const AttributeValue &v2, @@ -148,7 +149,7 @@ MobilityHelper::Install (Ptr node) const Ptr parent = m_mobilityStack.back (); Ptr hierarchical = CreateObjectWithAttributes ("Child", PointerValue (model), - "Parent", PointerValue (parent)); + "Parent", PointerValue (parent)); object->AggregateObject (hierarchical); NS_LOG_DEBUG ("node="< Get (uint32_t i) const = 0; }; @@ -109,11 +109,11 @@ Ns2MobilityHelper::Install (T begin, T end) const { class MyObjectStore : public ObjectStore { - public: +public: MyObjectStore (T begin, T end) : m_begin (begin), - m_end (end) - {} + m_end (end) + {} virtual Ptr Get (uint32_t i) const { T iterator = m_begin; iterator += i; @@ -123,7 +123,7 @@ Ns2MobilityHelper::Install (T begin, T end) const } return *iterator; } - private: +private: T m_begin; T m_end; }; diff --git a/src/mobility/model/box.cc b/src/mobility/model/box.cc index 27fff4277..fcb4398fe 100644 --- a/src/mobility/model/box.cc +++ b/src/mobility/model/box.cc @@ -37,7 +37,8 @@ Box::Box (double _xMin, double _xMax, yMax (_yMax), zMin (_zMin), zMax (_zMax) -{} +{ +} Box::Box () : xMin (0.0), @@ -46,18 +47,19 @@ Box::Box () yMax (0.0), zMin (0.0), zMax (0.0) -{} +{ +} -bool +bool Box::IsInside (const Vector &position) const { - return + return position.x <= this->xMax && position.x >= this->xMin && position.y <= this->yMax && position.y >= this->yMin && position.z <= this->zMax && position.z >= this->zMin; } -Box::Side +Box::Side Box::GetClosestSide (const Vector &position) const { double xMinDist = std::abs (position.x - this->xMin); @@ -151,7 +153,7 @@ operator << (std::ostream &os, const Box &box) } std::istream & operator >> (std::istream &is, Box &box) - { +{ char c1, c2, c3, c4, c5; is >> box.xMin >> c1 >> box.xMax >> c2 >> box.yMin >> c3 >> box.yMax >> c4 >> box.zMin >> c5 >> box.zMax; if (c1 != '|' || diff --git a/src/mobility/model/constant-acceleration-mobility-model.cc b/src/mobility/model/constant-acceleration-mobility-model.cc index fb830e5e8..334fd9696 100644 --- a/src/mobility/model/constant-acceleration-mobility-model.cc +++ b/src/mobility/model/constant-acceleration-mobility-model.cc @@ -31,10 +31,12 @@ TypeId ConstantAccelerationMobilityModel::GetTypeId (void) } ConstantAccelerationMobilityModel::ConstantAccelerationMobilityModel () -{} +{ +} ConstantAccelerationMobilityModel::~ConstantAccelerationMobilityModel () -{} +{ +} inline Vector ConstantAccelerationMobilityModel::DoGetVelocity (void) const diff --git a/src/mobility/model/constant-position-mobility-model.cc b/src/mobility/model/constant-position-mobility-model.cc index 1e0526856..7332a0175 100644 --- a/src/mobility/model/constant-position-mobility-model.cc +++ b/src/mobility/model/constant-position-mobility-model.cc @@ -29,21 +29,23 @@ ConstantPositionMobilityModel::GetTypeId (void) static TypeId tid = TypeId ("ns3::ConstantPositionMobilityModel") .SetParent () .AddConstructor () - ; + ; return tid; } - + ConstantPositionMobilityModel::ConstantPositionMobilityModel () -{} +{ +} ConstantPositionMobilityModel::~ConstantPositionMobilityModel () -{} +{ +} Vector ConstantPositionMobilityModel::DoGetPosition (void) const { return m_position; } -void +void ConstantPositionMobilityModel::DoSetPosition (const Vector &position) { m_position = position; diff --git a/src/mobility/model/constant-velocity-helper.cc b/src/mobility/model/constant-velocity-helper.cc index 97a82f442..9b678ed90 100644 --- a/src/mobility/model/constant-velocity-helper.cc +++ b/src/mobility/model/constant-velocity-helper.cc @@ -26,18 +26,21 @@ namespace ns3 { ConstantVelocityHelper::ConstantVelocityHelper () : m_paused (true) -{} +{ +} ConstantVelocityHelper::ConstantVelocityHelper (const Vector &position) : m_position (position), m_paused (true) -{} +{ +} ConstantVelocityHelper::ConstantVelocityHelper (const Vector &position, - const Vector &vel) + const Vector &vel) : m_position (position), m_velocity (vel), m_paused (true) -{} -void +{ +} +void ConstantVelocityHelper::SetPosition (const Vector &position) { m_position = position; @@ -54,7 +57,7 @@ ConstantVelocityHelper::GetCurrentPosition (void) const Vector ConstantVelocityHelper::GetVelocity (void) const { - return m_paused? Vector (0.0, 0.0, 0.0) : m_velocity; + return m_paused ? Vector (0.0, 0.0, 0.0) : m_velocity; } void ConstantVelocityHelper::SetVelocity (const Vector &vel) diff --git a/src/mobility/model/constant-velocity-helper.h b/src/mobility/model/constant-velocity-helper.h index f00c2ae91..e427ebff9 100644 --- a/src/mobility/model/constant-velocity-helper.h +++ b/src/mobility/model/constant-velocity-helper.h @@ -35,11 +35,11 @@ class Rectangle; */ class ConstantVelocityHelper { - public: +public: ConstantVelocityHelper (); ConstantVelocityHelper (const Vector &position); ConstantVelocityHelper (const Vector &position, - const Vector &vel); + const Vector &vel); void SetPosition (const Vector &position); Vector GetCurrentPosition (void) const; @@ -51,7 +51,7 @@ class ConstantVelocityHelper void UpdateWithBounds (const Rectangle &rectangle) const; void UpdateWithBounds (const Box &bounds) const; void Update (void) const; - private: +private: mutable Time m_lastUpdate; mutable Vector m_position; Vector m_velocity; diff --git a/src/mobility/model/constant-velocity-mobility-model.cc b/src/mobility/model/constant-velocity-mobility-model.cc index 224359b15..48faa4dac 100644 --- a/src/mobility/model/constant-velocity-mobility-model.cc +++ b/src/mobility/model/constant-velocity-mobility-model.cc @@ -33,12 +33,14 @@ TypeId ConstantVelocityMobilityModel::GetTypeId (void) } ConstantVelocityMobilityModel::ConstantVelocityMobilityModel () -{} +{ +} ConstantVelocityMobilityModel::~ConstantVelocityMobilityModel () -{} +{ +} -void +void ConstantVelocityMobilityModel::SetVelocity (const Vector &speed) { m_helper.Update (); diff --git a/src/mobility/model/gauss-markov-mobility-model.cc b/src/mobility/model/gauss-markov-mobility-model.cc index 89cd9e7be..8e52d6292 100644 --- a/src/mobility/model/gauss-markov-mobility-model.cc +++ b/src/mobility/model/gauss-markov-mobility-model.cc @@ -53,17 +53,17 @@ GaussMarkovMobilityModel::GetTypeId (void) MakeDoubleChecker ()) .AddAttribute ("MeanVelocity", "A random variable used to assign the average velocity.", - RandomVariableValue (UniformVariable (0.0, 1.0)), + RandomVariableValue (UniformVariable (0.0, 1.0)), MakeRandomVariableAccessor (&GaussMarkovMobilityModel::m_rndMeanVelocity), MakeRandomVariableChecker ()) .AddAttribute ("MeanDirection", "A random variable used to assign the average direction.", - RandomVariableValue (UniformVariable (0.0, 6.283185307)), + RandomVariableValue (UniformVariable (0.0, 6.283185307)), MakeRandomVariableAccessor (&GaussMarkovMobilityModel::m_rndMeanDirection), MakeRandomVariableChecker ()) .AddAttribute ("MeanPitch", "A random variable used to assign the average pitch.", - RandomVariableValue (ConstantVariable (0.0)), + RandomVariableValue (ConstantVariable (0.0)), MakeRandomVariableAccessor (&GaussMarkovMobilityModel::m_rndMeanPitch), MakeRandomVariableChecker ()) .AddAttribute ("NormalVelocity", @@ -81,7 +81,7 @@ GaussMarkovMobilityModel::GetTypeId (void) RandomVariableValue (NormalVariable (0.0, 1.0, 10.0)), MakeRandomVariableAccessor (&GaussMarkovMobilityModel::m_normalPitch), MakeRandomVariableChecker ()); - + return tid; } @@ -122,7 +122,7 @@ GaussMarkovMobilityModel::Start (void) double rp = m_normalPitch.GetValue (); //Calculate the NEW velocity, direction, and pitch values using the Gauss-Markov formula: - //newVal = alpha*oldVal + (1-alpha)*meanVal + sqrt(1-alpha^2)*rv + //newVal = alpha*oldVal + (1-alpha)*meanVal + sqrt(1-alpha^2)*rv //where rv is a random number from a normal (gaussian) distribution double one_minus_alpha = 1 - m_alpha; double sqrt_alpha = std::sqrt (1 - m_alpha*m_alpha); @@ -167,20 +167,20 @@ GaussMarkovMobilityModel::DoWalk (Time delayLeft) { if (nextPosition.x > m_bounds.xMax || nextPosition.x < m_bounds.xMin) { - speed.x = - speed.x; + speed.x = -speed.x; m_meanDirection = 3.14159265 - m_meanDirection; } if (nextPosition.y > m_bounds.yMax || nextPosition.y < m_bounds.yMin) { - speed.y = - speed.y; - m_meanDirection = - m_meanDirection; + speed.y = -speed.y; + m_meanDirection = -m_meanDirection; } if (nextPosition.z > m_bounds.zMax || nextPosition.z < m_bounds.zMin) { - speed.z = - speed.z; - m_meanPitch = - m_meanPitch; + speed.z = -speed.z; + m_meanPitch = -m_meanPitch; } m_Direction = m_meanDirection; diff --git a/src/mobility/model/gauss-markov-mobility-model.h b/src/mobility/model/gauss-markov-mobility-model.h index c13539f01..cafc5a8af 100644 --- a/src/mobility/model/gauss-markov-mobility-model.h +++ b/src/mobility/model/gauss-markov-mobility-model.h @@ -54,7 +54,7 @@ namespace ns3 { * Here is an example of how to implement the model and set the initial node positions: * \code MobilityHelper mobility; - + mobility.SetMobilityModel ("ns3::GaussMarkovMobilityModel", "Bounds", BoxValue (Box (0, 150000, 0, 150000, 0, 10000)), "TimeStep", TimeValue (Seconds (0.5)), @@ -65,7 +65,7 @@ namespace ns3 { "NormalVelocity", RandomVariableValue (NormalVariable (0.0, 0.0, 0.0)), "NormalDirection", RandomVariableValue (NormalVariable (0.0, 0.2, 0.4)), "NormalPitch", RandomVariableValue (NormalVariable (0.0, 0.02, 0.04))); - + mobility.SetPositionAllocator ("ns3::RandomBoxPositionAllocator", "X", RandomVariableValue (UniformVariable (0, 150000)), "Y", RandomVariableValue (UniformVariable (0, 150000)), diff --git a/src/mobility/model/hierarchical-mobility-model.cc b/src/mobility/model/hierarchical-mobility-model.cc index 7896a1f82..7ecc7f19b 100644 --- a/src/mobility/model/hierarchical-mobility-model.cc +++ b/src/mobility/model/hierarchical-mobility-model.cc @@ -40,16 +40,17 @@ HierarchicalMobilityModel::GetTypeId (void) MakePointerAccessor (&HierarchicalMobilityModel::SetParent, &HierarchicalMobilityModel::GetParent), MakePointerChecker ()) - ; + ; return tid; } HierarchicalMobilityModel::HierarchicalMobilityModel () : m_child (0), m_parent (0) -{} +{ +} -void +void HierarchicalMobilityModel::SetChild (Ptr model) { Ptr oldChild = m_child; @@ -117,8 +118,8 @@ HierarchicalMobilityModel::DoGetPosition (void) const Vector parentPosition = m_parent->GetPosition (); Vector childPosition = m_child->GetPosition (); return Vector (parentPosition.x + childPosition.x, - parentPosition.y + childPosition.y, - parentPosition.z + childPosition.z); + parentPosition.y + childPosition.y, + parentPosition.z + childPosition.z); } void HierarchicalMobilityModel::DoSetPosition (const Vector &position) diff --git a/src/mobility/model/hierarchical-mobility-model.h b/src/mobility/model/hierarchical-mobility-model.h index a4fd6453e..7598307a5 100644 --- a/src/mobility/model/hierarchical-mobility-model.h +++ b/src/mobility/model/hierarchical-mobility-model.h @@ -92,7 +92,7 @@ public: * \param model new mobility model parent */ void SetParent (Ptr model); - + private: virtual Vector DoGetPosition (void) const; virtual void DoSetPosition (const Vector &position); diff --git a/src/mobility/model/mobility-model.cc b/src/mobility/model/mobility-model.cc index 12f2d47c8..1a976d41e 100644 --- a/src/mobility/model/mobility-model.cc +++ b/src/mobility/model/mobility-model.cc @@ -36,7 +36,7 @@ MobilityModel::GetTypeId (void) TypeId::ATTR_SET | TypeId::ATTR_GET, VectorValue (Vector (0.0, 0.0, 0.0)), MakeVectorAccessor (&MobilityModel::SetPosition, - &MobilityModel::GetPosition), + &MobilityModel::GetPosition), MakeVectorChecker ()) .AddAttribute ("Velocity", "The current velocity of the mobility model.", TypeId::ATTR_GET, @@ -46,15 +46,17 @@ MobilityModel::GetTypeId (void) .AddTraceSource ("CourseChange", "The value of the position and/or velocity vector changed", MakeTraceSourceAccessor (&MobilityModel::m_courseChangeTrace)) - ; + ; return tid; } MobilityModel::MobilityModel () -{} +{ +} MobilityModel::~MobilityModel () -{} +{ +} Vector MobilityModel::GetPosition (void) const diff --git a/src/mobility/model/position-allocator.cc b/src/mobility/model/position-allocator.cc index 10ab1baaa..9a81fd5fd 100644 --- a/src/mobility/model/position-allocator.cc +++ b/src/mobility/model/position-allocator.cc @@ -44,33 +44,35 @@ PositionAllocator::PositionAllocator () } PositionAllocator::~PositionAllocator () -{} +{ +} NS_OBJECT_ENSURE_REGISTERED (ListPositionAllocator); -TypeId +TypeId ListPositionAllocator::GetTypeId (void) { static TypeId tid = TypeId ("ns3::ListPositionAllocator") .SetParent () .AddConstructor () - ; + ; return tid; } ListPositionAllocator::ListPositionAllocator () -{} -void +{ +} +void ListPositionAllocator::Add (Vector v) { m_positions.push_back (v); m_current = m_positions.begin (); } -Vector +Vector ListPositionAllocator::GetNext (void) const { Vector v = *m_current; m_current++; - if (m_current == m_positions.end()) + if (m_current == m_positions.end()) { m_current = m_positions.begin (); } @@ -111,89 +113,90 @@ GridPositionAllocator::GetTypeId (void) MakeEnumAccessor (&GridPositionAllocator::m_layoutType), MakeEnumChecker (ROW_FIRST, "RowFirst", COLUMN_FIRST, "ColumnFirst")) - ; + ; return tid; } GridPositionAllocator::GridPositionAllocator () : m_current (0) -{} +{ +} -void +void GridPositionAllocator::SetMinX (double xMin) { m_xMin = xMin; } -void +void GridPositionAllocator::SetMinY (double yMin) { m_yMin = yMin; } -void +void GridPositionAllocator::SetDeltaX (double deltaX) { m_deltaX = deltaX; } -void +void GridPositionAllocator::SetDeltaY (double deltaY) { m_deltaY = deltaY; } -void +void GridPositionAllocator::SetN (uint32_t n) { m_n = n; } -void +void GridPositionAllocator::SetLayoutType (enum LayoutType layoutType) { m_layoutType = layoutType; } -double +double GridPositionAllocator::GetMinX (void) const { return m_xMin; } -double +double GridPositionAllocator::GetMinY (void) const { return m_yMin; } -double +double GridPositionAllocator::GetDeltaX (void) const { return m_deltaX; } -double +double GridPositionAllocator::GetDeltaY (void) const { return m_deltaY; } -uint32_t +uint32_t GridPositionAllocator::GetN (void) const { return m_n; } -enum GridPositionAllocator::LayoutType +enum GridPositionAllocator::LayoutType GridPositionAllocator::GetLayoutType (void) const { return m_layoutType; } -Vector +Vector GridPositionAllocator::GetNext (void) const { double x = 0.0, y = 0.0; switch (m_layoutType) { - case ROW_FIRST: - x = m_xMin + m_deltaX * (m_current % m_n); - y = m_yMin + m_deltaY * (m_current / m_n); - break; - case COLUMN_FIRST: - x = m_xMin + m_deltaX * (m_current / m_n); - y = m_yMin + m_deltaY * (m_current % m_n); - break; - } + case ROW_FIRST: + x = m_xMin + m_deltaX * (m_current % m_n); + y = m_yMin + m_deltaY * (m_current / m_n); + break; + case COLUMN_FIRST: + x = m_xMin + m_deltaX * (m_current / m_n); + y = m_yMin + m_deltaY * (m_current % m_n); + break; + } m_current++; return Vector (x, y, 0.0); } @@ -222,16 +225,18 @@ RandomRectanglePositionAllocator::GetTypeId (void) } RandomRectanglePositionAllocator::RandomRectanglePositionAllocator () -{} +{ +} RandomRectanglePositionAllocator::~RandomRectanglePositionAllocator () -{} +{ +} -void +void RandomRectanglePositionAllocator::SetX (RandomVariable x) { m_x = x; } -void +void RandomRectanglePositionAllocator::SetY (RandomVariable y) { m_y = y; @@ -274,21 +279,23 @@ RandomBoxPositionAllocator::GetTypeId (void) } RandomBoxPositionAllocator::RandomBoxPositionAllocator () -{} +{ +} RandomBoxPositionAllocator::~RandomBoxPositionAllocator () -{} +{ +} -void +void RandomBoxPositionAllocator::SetX (RandomVariable x) { m_x = x; } -void +void RandomBoxPositionAllocator::SetY (RandomVariable y) { m_y = y; } -void +void RandomBoxPositionAllocator::SetZ (RandomVariable z) { m_z = z; @@ -334,31 +341,33 @@ RandomDiscPositionAllocator::GetTypeId (void) DoubleValue (0.0), MakeDoubleAccessor (&RandomDiscPositionAllocator::m_y), MakeDoubleChecker ()) - ; + ; return tid; -} +} RandomDiscPositionAllocator::RandomDiscPositionAllocator () -{} +{ +} RandomDiscPositionAllocator::~RandomDiscPositionAllocator () -{} +{ +} -void +void RandomDiscPositionAllocator::SetTheta (RandomVariable theta) { m_theta = theta; } -void +void RandomDiscPositionAllocator::SetRho (RandomVariable rho) { m_rho = rho; } -void +void RandomDiscPositionAllocator::SetX (double x) { m_x = x; } -void +void RandomDiscPositionAllocator::SetY (double y) { m_y = y; @@ -400,26 +409,28 @@ UniformDiscPositionAllocator::GetTypeId (void) DoubleValue (0.0), MakeDoubleAccessor (&UniformDiscPositionAllocator::m_y), MakeDoubleChecker ()) - ; + ; return tid; -} +} UniformDiscPositionAllocator::UniformDiscPositionAllocator () -{} +{ +} UniformDiscPositionAllocator::~UniformDiscPositionAllocator () -{} +{ +} -void +void UniformDiscPositionAllocator::SetRho (double rho) { m_rho = rho; } -void +void UniformDiscPositionAllocator::SetX (double x) { m_x = x; } -void +void UniformDiscPositionAllocator::SetY (double y) { m_y = y; @@ -435,7 +446,7 @@ UniformDiscPositionAllocator::GetNext (void) const y = r.GetValue (); } while (sqrt(x*x + y*y) > m_rho); - + x += m_x; y += m_y; NS_LOG_DEBUG ("Disc position x=" << x << ", y=" << y); diff --git a/src/mobility/model/position-allocator.h b/src/mobility/model/position-allocator.h index 65b8e0c97..4fff3ab83 100644 --- a/src/mobility/model/position-allocator.h +++ b/src/mobility/model/position-allocator.h @@ -148,7 +148,7 @@ public: * \return the currently-selected layout type. */ enum LayoutType GetLayoutType (void) const; - + virtual Vector GetNext (void) const; private: diff --git a/src/mobility/model/random-direction-2d-mobility-model.cc b/src/mobility/model/random-direction-2d-mobility-model.cc index 2a8595f78..c8fc5cf61 100644 --- a/src/mobility/model/random-direction-2d-mobility-model.cc +++ b/src/mobility/model/random-direction-2d-mobility-model.cc @@ -51,7 +51,7 @@ RandomDirection2dMobilityModel::GetTypeId (void) RandomVariableValue (ConstantVariable (2.0)), MakeRandomVariableAccessor (&RandomDirection2dMobilityModel::m_pause), MakeRandomVariableChecker ()) - ; + ; return tid; } @@ -102,14 +102,14 @@ RandomDirection2dMobilityModel::SetDirectionAndSpeed (double direction) Time delay = Seconds (CalculateDistance (position, next) / speed); m_event.Cancel (); m_event = Simulator::Schedule (delay, - &RandomDirection2dMobilityModel::BeginPause, this); + &RandomDirection2dMobilityModel::BeginPause, this); NotifyCourseChange (); } void RandomDirection2dMobilityModel::ResetDirectionAndSpeed (void) { double direction = m_direction.GetValue (0, PI); - + m_helper.UpdateWithBounds (m_bounds); Vector position = m_helper.GetCurrentPosition (); switch (m_bounds.GetClosestSide (position)) @@ -118,7 +118,7 @@ RandomDirection2dMobilityModel::ResetDirectionAndSpeed (void) direction += PI / 2; break; case Rectangle::LEFT: - direction += - PI / 2; + direction += -PI / 2; break; case Rectangle::TOP: direction += PI; diff --git a/src/mobility/model/random-direction-2d-mobility-model.h b/src/mobility/model/random-direction-2d-mobility-model.h index 406b856b6..75a20b249 100644 --- a/src/mobility/model/random-direction-2d-mobility-model.h +++ b/src/mobility/model/random-direction-2d-mobility-model.h @@ -43,10 +43,10 @@ namespace ns3 { */ class RandomDirection2dMobilityModel : public MobilityModel { - public: +public: static TypeId GetTypeId (void); - private: +private: void ResetDirectionAndSpeed (void); void BeginPause (void); void SetDirectionAndSpeed (double direction); diff --git a/src/mobility/model/random-walk-2d-mobility-model.cc b/src/mobility/model/random-walk-2d-mobility-model.cc index 11b5a3a55..9bd44a8aa 100644 --- a/src/mobility/model/random-walk-2d-mobility-model.cc +++ b/src/mobility/model/random-walk-2d-mobility-model.cc @@ -121,8 +121,8 @@ RandomWalk2dMobilityModel::DoWalk (Time delayLeft) nextPosition = m_bounds.CalculateIntersection (position, speed); Time delay = Seconds ((nextPosition.x - position.x) / speed.x); m_event = Simulator::Schedule (delay, &RandomWalk2dMobilityModel::Rebound, this, - delayLeft - delay); - } + delayLeft - delay); + } NotifyCourseChange (); } @@ -136,11 +136,11 @@ RandomWalk2dMobilityModel::Rebound (Time delayLeft) { case Rectangle::RIGHT: case Rectangle::LEFT: - speed.x = - speed.x; + speed.x = -speed.x; break; case Rectangle::TOP: case Rectangle::BOTTOM: - speed.y = - speed.y; + speed.y = -speed.y; break; } m_helper.SetVelocity (speed); diff --git a/src/mobility/model/random-walk-2d-mobility-model.h b/src/mobility/model/random-walk-2d-mobility-model.h index 274518ef0..b6096d068 100644 --- a/src/mobility/model/random-walk-2d-mobility-model.h +++ b/src/mobility/model/random-walk-2d-mobility-model.h @@ -45,7 +45,7 @@ namespace ns3 { */ class RandomWalk2dMobilityModel : public MobilityModel { - public: +public: static TypeId GetTypeId (void); enum Mode { @@ -53,7 +53,7 @@ class RandomWalk2dMobilityModel : public MobilityModel MODE_TIME }; - private: +private: void Rebound (Time timeLeft); void DoWalk (Time timeLeft); void DoStartPrivate (void); diff --git a/src/mobility/model/random-waypoint-mobility-model.cc b/src/mobility/model/random-waypoint-mobility-model.cc index f6f3bc27b..dee36c2b5 100644 --- a/src/mobility/model/random-waypoint-mobility-model.cc +++ b/src/mobility/model/random-waypoint-mobility-model.cc @@ -50,7 +50,7 @@ RandomWaypointMobilityModel::GetTypeId (void) PointerValue (), MakePointerAccessor (&RandomWaypointMobilityModel::m_position), MakePointerChecker ()); - + return tid; } @@ -71,7 +71,7 @@ RandomWaypointMobilityModel::BeginWalk (void) Time travelDelay = Seconds (CalculateDistance (destination, m_current) / speed); m_event.Cancel (); m_event = Simulator::Schedule (travelDelay, - &RandomWaypointMobilityModel::DoStartPrivate, this); + &RandomWaypointMobilityModel::DoStartPrivate, this); NotifyCourseChange (); } diff --git a/src/mobility/model/rectangle.cc b/src/mobility/model/rectangle.cc index ee5e29f0f..d83fcef17 100644 --- a/src/mobility/model/rectangle.cc +++ b/src/mobility/model/rectangle.cc @@ -28,29 +28,31 @@ namespace ns3 { Rectangle::Rectangle (double _xMin, double _xMax, - double _yMin, double _yMax) + double _yMin, double _yMax) : xMin (_xMin), xMax (_xMax), yMin (_yMin), yMax (_yMax) -{} +{ +} Rectangle::Rectangle () : xMin (0.0), xMax (0.0), yMin (0.0), yMax (0.0) -{} +{ +} -bool +bool Rectangle::IsInside (const Vector &position) const { - return + return position.x <= this->xMax && position.x >= this->xMin && position.y <= this->yMax && position.y >= this->yMin; } -Rectangle::Side +Rectangle::Side Rectangle::GetClosestSide (const Vector &position) const { double xMinDist = std::abs (position.x - this->xMin); @@ -130,7 +132,7 @@ operator << (std::ostream &os, const Rectangle &rectangle) } std::istream & operator >> (std::istream &is, Rectangle &rectangle) - { +{ char c1, c2, c3; is >> rectangle.xMin >> c1 >> rectangle.xMax >> c2 >> rectangle.yMin >> c3 >> rectangle.yMax; if (c1 != '|' || diff --git a/src/mobility/model/steady-state-random-waypoint-mobility-model.cc b/src/mobility/model/steady-state-random-waypoint-mobility-model.cc index 946be1112..1d417ed2a 100644 --- a/src/mobility/model/steady-state-random-waypoint-mobility-model.cc +++ b/src/mobility/model/steady-state-random-waypoint-mobility-model.cc @@ -74,11 +74,11 @@ SteadyStateRandomWaypointMobilityModel::GetTypeId (void) DoubleValue (1), MakeDoubleAccessor (&SteadyStateRandomWaypointMobilityModel::m_maxY), MakeDoubleChecker ()); - + return tid; } -SteadyStateRandomWaypointMobilityModel::SteadyStateRandomWaypointMobilityModel (): +SteadyStateRandomWaypointMobilityModel::SteadyStateRandomWaypointMobilityModel () : alreadyStarted (false) { } @@ -104,10 +104,10 @@ SteadyStateRandomWaypointMobilityModel::SteadyStateStart (void) m_position->SetY (UniformVariable (m_minY, m_maxY)); NS_ASSERT (m_minPause <= m_maxPause); m_pause = UniformVariable (m_minPause, m_maxPause); - + m_helper.Update (); m_helper.Pause (); - + // calculate the steady-state probability that a node is initially paused double expectedPauseTime = (m_minPause + m_maxPause)/2; double a = m_maxX - m_minX; @@ -118,7 +118,7 @@ SteadyStateRandomWaypointMobilityModel::SteadyStateStart (void) double log2 = a*a / b*std::log (std::sqrt ((b*b)/(a*a) + 1) + b/a); double expectedTravelTime = 1.0/6.0*(log1 + log2); expectedTravelTime += 1.0/15.0*((a*a*a)/(b*b) + (b*b*b)/(a*a)) - - 1.0/15.0*std::sqrt(a*a + b*b)*((a*a)/(b*b) + (b*b)/(a*a) - 3); + 1.0/15.0*std::sqrt(a*a + b*b)*((a*a)/(b*b) + (b*b)/(a*a) - 3); if (v0 == v1) { expectedTravelTime /= v0; @@ -129,14 +129,14 @@ SteadyStateRandomWaypointMobilityModel::SteadyStateStart (void) } double probabilityPaused = expectedPauseTime/(expectedPauseTime + expectedTravelTime); NS_ASSERT (probabilityPaused >= 0 && probabilityPaused <= 1); - + UniformVariable u_r; double u = u_r.GetValue(0, 1); if (u < probabilityPaused) // node initially paused { m_helper.SetPosition (m_position->GetNext ()); u = u_r.GetValue(0, 1); - Time pause; + Time pause; if (m_minPause != m_maxPause) { if (u < (2*m_minPause/(m_minPause + m_maxPause))) @@ -177,7 +177,7 @@ SteadyStateRandomWaypointMobilityModel::SteadyStateStart (void) m_helper.SetPosition (Vector (m_minX + u2*x1 + (1 - u2)*x2, m_minY + u2*y1 + (1 - u2)*y2, 0)); NS_ASSERT (!m_event.IsRunning()); m_event = Simulator::ScheduleNow (&SteadyStateRandomWaypointMobilityModel::SteadyStateBeginWalk, this, - Vector (m_minX + x2, m_minY + y2, 0)); + Vector (m_minX + x2, m_minY + y2, 0)); } NotifyCourseChange (); } @@ -225,7 +225,7 @@ SteadyStateRandomWaypointMobilityModel::BeginWalk (void) m_helper.Unpause (); Time travelDelay = Seconds (CalculateDistance (destination, m_current) / speed); m_event = Simulator::Schedule (travelDelay, - &SteadyStateRandomWaypointMobilityModel::Start, this); + &SteadyStateRandomWaypointMobilityModel::Start, this); NotifyCourseChange (); } diff --git a/src/mobility/model/waypoint-mobility-model.h b/src/mobility/model/waypoint-mobility-model.h index 1820e3b71..6787cea6e 100644 --- a/src/mobility/model/waypoint-mobility-model.h +++ b/src/mobility/model/waypoint-mobility-model.h @@ -55,7 +55,7 @@ namespace ns3 { * * The model has two attributes with methods that allow clients to get * the next waypoint value (NextWaypoint) and the number of waypoints left - * (WaypointsLeft) beyond (but not including) the next waypoint. + * (WaypointsLeft) beyond (but not including) the next waypoint. * * In addition, there are two attributes that govern model behavior. The * first, LazyNotify, governs how the model calls the CourseChange trace. diff --git a/src/mobility/model/waypoint.cc b/src/mobility/model/waypoint.cc index 32a356746..59f1b2943 100644 --- a/src/mobility/model/waypoint.cc +++ b/src/mobility/model/waypoint.cc @@ -25,12 +25,14 @@ ATTRIBUTE_HELPER_CPP (Waypoint); Waypoint::Waypoint (const Time &waypointTime, const Vector &waypointPosition) : time (waypointTime), - position (waypointPosition) -{} + position (waypointPosition) +{ +} Waypoint::Waypoint () : time (Seconds (0.0)), position (0,0,0) -{} +{ +} std::ostream &operator << (std::ostream &os, const Waypoint &waypoint) { diff --git a/src/mobility/test/steady-state-random-waypoint-mobility-model-test.cc b/src/mobility/test/steady-state-random-waypoint-mobility-model-test.cc index 8c28e9874..d042f2c82 100644 --- a/src/mobility/test/steady-state-random-waypoint-mobility-model-test.cc +++ b/src/mobility/test/steady-state-random-waypoint-mobility-model-test.cc @@ -73,8 +73,8 @@ SteadyStateRandomWaypointTest::DoRun (void) Simulator::Schedule (Seconds (0.0), &Object::Start, model); } - Simulator::Schedule (Seconds (0.001), & SteadyStateRandomWaypointTest::DistribCompare, this); - Simulator::Schedule (Seconds (totalTime), & SteadyStateRandomWaypointTest::DistribCompare, this); + Simulator::Schedule (Seconds (0.001), &SteadyStateRandomWaypointTest::DistribCompare, this); + Simulator::Schedule (Seconds (totalTime), &SteadyStateRandomWaypointTest::DistribCompare, this); Simulator::Stop (Seconds (totalTime)); Simulator::Run (); Simulator::Destroy (); diff --git a/doc/manual/source/distributed.rst b/src/mpi/doc/distributed.rst similarity index 97% rename from doc/manual/source/distributed.rst rename to src/mpi/doc/distributed.rst index a67be570b..08e53e99e 100644 --- a/doc/manual/source/distributed.rst +++ b/src/mpi/doc/distributed.rst @@ -1,7 +1,7 @@ .. include:: replace.txt -Distributed ------------ +MPI for Distributed Simulation +------------------------------ Parallel and distributed discrete event simulation allows the execution of a single simulation program on multiple processors. By splitting up the simulation @@ -149,12 +149,12 @@ alternative way to run distributed examples is shown below::: ./waf shell cd build/debug - mpirun -np 2 examples/mpi/simple-distributed + mpirun -np 2 src/mpi/examples/simple-distributed Creating custom topologies ++++++++++++++++++++++++++ -The example programs in examples/mpi give a good idea of how to create different +The example programs in src/mpi/examples give a good idea of how to create different topologies for distributed simulation. The main points are assigning system ids to individual nodes, creating point-to-point links where the simulation should be divided, and installing applications only on the LP associated with the diff --git a/src/mpi/examples/nms-p2p-nix-distributed.cc b/src/mpi/examples/nms-p2p-nix-distributed.cc index 9509b6312..381dd0f45 100644 --- a/src/mpi/examples/nms-p2p-nix-distributed.cc +++ b/src/mpi/examples/nms-p2p-nix-distributed.cc @@ -134,7 +134,7 @@ main (int argc, char *argv[]) if (nix) { - stack.SetRoutingHelper (list); + stack.SetRoutingHelper (list); // has effect on the next Install () } // Create Campus Networks @@ -429,7 +429,7 @@ main (int argc, char *argv[]) { OnOffHelper client ("ns3::UdpSocketFactory", Address ()); AddressValue remoteAddress - (InetSocketAddress (ifs1[1][0].GetAddress (0), 9999)); + (InetSocketAddress (ifs1[1][0].GetAddress (0), 9999)); cout << "Remote Address is " << ifs1[1][0].GetAddress (0) << endl; client.SetAttribute ("Remote", remoteAddress); @@ -461,8 +461,8 @@ main (int argc, char *argv[]) if (systemCount == 1) { PacketSinkHelper sinkHelper - ("ns3::UdpSocketFactory", - InetSocketAddress (Ipv4Address::GetAny (), 9999)); + ("ns3::UdpSocketFactory", + InetSocketAddress (Ipv4Address::GetAny (), 9999)); ApplicationContainer sinkApp = sinkHelper.Install (nodes_net2LAN[z][i][j].Get (0)); @@ -472,8 +472,8 @@ main (int argc, char *argv[]) else if (systemId == z % systemCount) { PacketSinkHelper sinkHelper - ("ns3::UdpSocketFactory", - InetSocketAddress (Ipv4Address::GetAny (), 9999)); + ("ns3::UdpSocketFactory", + InetSocketAddress (Ipv4Address::GetAny (), 9999)); ApplicationContainer sinkApp = sinkHelper.Install (nodes_net2LAN[z][i][j].Get (0)); @@ -488,7 +488,7 @@ main (int argc, char *argv[]) OnOffHelper client ("ns3::UdpSocketFactory", Address ()); AddressValue remoteAddress - (InetSocketAddress (ifs2LAN[z][i][j].GetAddress (0), 9999)); + (InetSocketAddress (ifs2LAN[z][i][j].GetAddress (0), 9999)); client.SetAttribute ("Remote", remoteAddress); ApplicationContainer clientApp; @@ -502,7 +502,7 @@ main (int argc, char *argv[]) OnOffHelper client ("ns3::UdpSocketFactory", Address ()); AddressValue remoteAddress - (InetSocketAddress (ifs2LAN[z][i][j].GetAddress (0), 9999)); + (InetSocketAddress (ifs2LAN[z][i][j].GetAddress (0), 9999)); client.SetAttribute ("Remote", remoteAddress); ApplicationContainer clientApp; @@ -521,8 +521,8 @@ main (int argc, char *argv[]) if (systemCount == 1) { PacketSinkHelper sinkHelper - ("ns3::UdpSocketFactory", - InetSocketAddress (Ipv4Address::GetAny (), 9999)); + ("ns3::UdpSocketFactory", + InetSocketAddress (Ipv4Address::GetAny (), 9999)); ApplicationContainer sinkApp = sinkHelper.Install (nodes_net3LAN[z][i][j].Get (0)); @@ -532,8 +532,8 @@ main (int argc, char *argv[]) else if (systemId == z % systemCount) { PacketSinkHelper sinkHelper - ("ns3::UdpSocketFactory", - InetSocketAddress (Ipv4Address::GetAny (), 9999)); + ("ns3::UdpSocketFactory", + InetSocketAddress (Ipv4Address::GetAny (), 9999)); ApplicationContainer sinkApp = sinkHelper.Install (nodes_net3LAN[z][i][j].Get (0)); @@ -548,7 +548,7 @@ main (int argc, char *argv[]) OnOffHelper client ("ns3::UdpSocketFactory", Address ()); AddressValue remoteAddress - (InetSocketAddress (ifs3LAN[z][i][j].GetAddress (0), 9999)); + (InetSocketAddress (ifs3LAN[z][i][j].GetAddress (0), 9999)); client.SetAttribute ("Remote", remoteAddress); ApplicationContainer clientApp; @@ -562,7 +562,7 @@ main (int argc, char *argv[]) OnOffHelper client ("ns3::UdpSocketFactory", Address ()); AddressValue remoteAddress - (InetSocketAddress (ifs3LAN[z][i][j].GetAddress (0), 9999)); + (InetSocketAddress (ifs3LAN[z][i][j].GetAddress (0), 9999)); client.SetAttribute ("Remote", remoteAddress); ApplicationContainer clientApp; @@ -601,7 +601,8 @@ main (int argc, char *argv[]) TIMER_NOW (t2); cout << "Simulator finished." << endl; Simulator::Destroy (); - + // Exit the MPI execution environment + MpiInterface::Disable (); double d1 = TIMER_DIFF (t1, t0), d2 = TIMER_DIFF (t2, t1); cout << "-----" << endl << "Runtime Stats:" << endl; cout << "Simulator init time: " << d1 << endl; diff --git a/src/mpi/examples/simple-distributed.cc b/src/mpi/examples/simple-distributed.cc index c92178223..c16fbea1b 100644 --- a/src/mpi/examples/simple-distributed.cc +++ b/src/mpi/examples/simple-distributed.cc @@ -154,7 +154,7 @@ main (int argc, char *argv[]) if (nix) { - stack.SetRoutingHelper (list); + stack.SetRoutingHelper (list); // has effect on the next Install () } stack.InstallAll (); @@ -226,15 +226,15 @@ main (int argc, char *argv[]) { OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ()); clientHelper.SetAttribute - ("OnTime", RandomVariableValue (ConstantVariable (1))); + ("OnTime", RandomVariableValue (ConstantVariable (1))); clientHelper.SetAttribute - ("OffTime", RandomVariableValue (ConstantVariable (0))); + ("OffTime", RandomVariableValue (ConstantVariable (0))); ApplicationContainer clientApps; for (uint32_t i = 0; i < 4; ++i) { AddressValue remoteAddress - (InetSocketAddress (rightLeafInterfaces.GetAddress (i), port)); + (InetSocketAddress (rightLeafInterfaces.GetAddress (i), port)); clientHelper.SetAttribute ("Remote", remoteAddress); clientApps.Add (clientHelper.Install (leftLeafNodes.Get (i))); } @@ -245,6 +245,8 @@ main (int argc, char *argv[]) Simulator::Stop (Seconds (5)); Simulator::Run (); Simulator::Destroy (); + // Exit the MPI execution environment + MpiInterface::Disable (); return 0; #else NS_FATAL_ERROR ("Can't use distributed simulator without MPI compiled in"); diff --git a/src/mpi/examples/third-distributed.cc b/src/mpi/examples/third-distributed.cc index 31c581584..681c08bc3 100644 --- a/src/mpi/examples/third-distributed.cc +++ b/src/mpi/examples/third-distributed.cc @@ -239,6 +239,8 @@ main (int argc, char *argv[]) Simulator::Run (); Simulator::Destroy (); + // Exit the MPI execution environment + MpiInterface::Disable (); return 0; #else diff --git a/src/mpi/model/distributed-simulator-impl.h b/src/mpi/model/distributed-simulator-impl.h index 90457953e..f2801a246 100644 --- a/src/mpi/model/distributed-simulator-impl.h +++ b/src/mpi/model/distributed-simulator-impl.h @@ -29,6 +29,8 @@ namespace ns3 { /** + * \ingroup mpi + * * \brief Structure used for all-reduce LBTS computation */ class LbtsMessage @@ -82,6 +84,8 @@ private: }; /** + * \ingroup mpi + * * \brief distributed simulator implementation using lookahead */ class DistributedSimulatorImpl : public SimulatorImpl diff --git a/src/mpi/model/mpi-interface.cc b/src/mpi/model/mpi-interface.cc index 0b8fba514..4199bc36d 100644 --- a/src/mpi/model/mpi-interface.cc +++ b/src/mpi/model/mpi-interface.cc @@ -284,4 +284,26 @@ MpiInterface::TestSendComplete () #endif } +void +MpiInterface::Disable () +{ +#ifdef NS3_MPI + int flag = 0 ; + MPI_Initialized (&flag); + if (flag) + { + MPI_Finalize (); + m_enabled = false; + m_initialized = false; + } + else + { + NS_FATAL_ERROR ("Cannot disable MPI environment without Initializing it first"); + } +#else + NS_FATAL_ERROR ("Can't use distributed simulator without MPI compiled in"); +#endif +} + + } // namespace ns3 diff --git a/src/mpi/model/mpi-interface.h b/src/mpi/model/mpi-interface.h index c29126758..b4adbe831 100644 --- a/src/mpi/model/mpi-interface.h +++ b/src/mpi/model/mpi-interface.h @@ -33,6 +33,11 @@ typedef struct ompi_request_t* MPI_Request; namespace ns3 { +/** + * \defgroup mpi MPI Distributed Simulation + * + */ + /** * maximum MPI message size for easy * buffer creation @@ -40,6 +45,8 @@ namespace ns3 { const uint32_t MAX_MPI_MSG_SIZE = 2000; /** + * \ingroup mpi + * * Define a class for tracking the non-block sends */ class SentBuffer @@ -69,6 +76,8 @@ private: class Packet; /** + * \ingroup mpi + * * Interface between ns-3 and MPI */ class MpiInterface @@ -97,7 +106,12 @@ public: * Sets up MPI interface */ static void Enable (int* pargc, char*** pargv); - + /** + * Terminates the MPI environment by calling MPI_Finalize + * This function must be called after Destroy () + * It also resets m_initialized, m_enabled + */ + static void Disable (); /** * \param p packet to send * \param rxTime received time at destination node diff --git a/src/mpi/model/mpi-receiver.cc b/src/mpi/model/mpi-receiver.cc index 005773ac3..deac6535c 100644 --- a/src/mpi/model/mpi-receiver.cc +++ b/src/mpi/model/mpi-receiver.cc @@ -42,7 +42,7 @@ MpiReceiver::SetReceiveCallback (Callback > callback) void MpiReceiver::Receive (Ptr p) { - NS_ASSERT (! m_rxCallback.IsNull ()); + NS_ASSERT (!m_rxCallback.IsNull ()); m_rxCallback (p); } diff --git a/src/mpi/model/mpi-receiver.h b/src/mpi/model/mpi-receiver.h index 5b3d0cfec..bed950aae 100644 --- a/src/mpi/model/mpi-receiver.h +++ b/src/mpi/model/mpi-receiver.h @@ -27,6 +27,8 @@ namespace ns3 { /** + * \ingroup mpi + * * Class to aggregate to a NetDevice if it supports MPI capability * * MpiInterface::ReceiveMessages () needs to send packets to a NetDevice diff --git a/doc/manual/figures/animation-dumbbell.pdf b/src/netanim/doc/animation-dumbbell.pdf similarity index 100% rename from doc/manual/figures/animation-dumbbell.pdf rename to src/netanim/doc/animation-dumbbell.pdf diff --git a/doc/manual/figures/animation-dumbbell.png b/src/netanim/doc/animation-dumbbell.png similarity index 100% rename from doc/manual/figures/animation-dumbbell.png rename to src/netanim/doc/animation-dumbbell.png diff --git a/doc/manual/source/animation.rst b/src/netanim/doc/animation.rst similarity index 100% rename from doc/manual/source/animation.rst rename to src/netanim/doc/animation.rst diff --git a/src/netanim/examples/dumbbell-animation.cc b/src/netanim/examples/dumbbell-animation.cc index 79f9d2f48..c948c2d95 100644 --- a/src/netanim/examples/dumbbell-animation.cc +++ b/src/netanim/examples/dumbbell-animation.cc @@ -52,7 +52,7 @@ int main (int argc, char *argv[]) nLeftLeaf = nLeaf; nRightLeaf = nLeaf; } - + // Create the point-to-point link helpers PointToPointHelper pointToPointRouter; pointToPointRouter.SetDeviceAttribute ("DataRate", StringValue ("10Mbps")); @@ -62,8 +62,8 @@ int main (int argc, char *argv[]) pointToPointLeaf.SetChannelAttribute ("Delay", StringValue ("1ms")); PointToPointDumbbellHelper d(nLeftLeaf, pointToPointLeaf, - nRightLeaf, pointToPointLeaf, - pointToPointRouter); + nRightLeaf, pointToPointLeaf, + pointToPointRouter); // Install Stack InternetStackHelper stack; @@ -71,15 +71,15 @@ int main (int argc, char *argv[]) // Assign IP Addresses d.AssignIpv4Addresses (Ipv4AddressHelper ("10.1.1.0", "255.255.255.0"), - Ipv4AddressHelper ("10.2.1.0", "255.255.255.0"), - Ipv4AddressHelper ("10.3.1.0", "255.255.255.0")); - + Ipv4AddressHelper ("10.2.1.0", "255.255.255.0"), + Ipv4AddressHelper ("10.3.1.0", "255.255.255.0")); + // Install on/off app on all right side nodes OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ()); clientHelper.SetAttribute - ("OnTime", RandomVariableValue (UniformVariable (0, 1))); + ("OnTime", RandomVariableValue (UniformVariable (0, 1))); clientHelper.SetAttribute - ("OffTime", RandomVariableValue (UniformVariable (0, 1))); + ("OffTime", RandomVariableValue (UniformVariable (0, 1))); ApplicationContainer clientApps; for (uint32_t i = 0; i < d.RightCount (); ++i) @@ -107,7 +107,7 @@ int main (int argc, char *argv[]) anim.SetOutputFile (animFile); } anim.StartAnimation (); - + // Set up the acutal simulation Ipv4GlobalRoutingHelper::PopulateRoutingTables (); diff --git a/src/netanim/examples/grid-animation.cc b/src/netanim/examples/grid-animation.cc index 13b173ef8..1ad6ad7cc 100644 --- a/src/netanim/examples/grid-animation.cc +++ b/src/netanim/examples/grid-animation.cc @@ -49,7 +49,7 @@ int main (int argc, char *argv[]) { NS_FATAL_ERROR ("Need more nodes for grid."); } - + PointToPointHelper pointToPoint; pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps")); pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms")); @@ -68,9 +68,9 @@ int main (int argc, char *argv[]) OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ()); clientHelper.SetAttribute - ("OnTime", RandomVariableValue (ConstantVariable (1))); + ("OnTime", RandomVariableValue (ConstantVariable (1))); clientHelper.SetAttribute - ("OffTime", RandomVariableValue (ConstantVariable (0))); + ("OffTime", RandomVariableValue (ConstantVariable (0))); ApplicationContainer clientApps; // Create an on/off app sending packets @@ -95,7 +95,7 @@ int main (int argc, char *argv[]) anim.SetOutputFile (animFile); } anim.StartAnimation (); - + // Set up the actual simulation Ipv4GlobalRoutingHelper::PopulateRoutingTables (); diff --git a/src/netanim/examples/star-animation.cc b/src/netanim/examples/star-animation.cc index ac2b6d467..3d73f8ee2 100644 --- a/src/netanim/examples/star-animation.cc +++ b/src/netanim/examples/star-animation.cc @@ -80,7 +80,7 @@ main (int argc, char *argv[]) NS_LOG_INFO ("Create applications."); // - // Create a packet sink on the star "hub" to receive packets. + // Create a packet sink on the star "hub" to receive packets. // uint16_t port = 50000; Address hubLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port)); @@ -103,7 +103,7 @@ main (int argc, char *argv[]) AddressValue remoteAddress (InetSocketAddress (star.GetHubIpv4Address (i), port)); onOffHelper.SetAttribute ("Remote", remoteAddress); spokeApps.Add (onOffHelper.Install (star.GetSpokeNode (i))); - } + } spokeApps.Start (Seconds (1.0)); spokeApps.Stop (Seconds (10.0)); @@ -115,7 +115,7 @@ main (int argc, char *argv[]) // Set the bounding box for animation star.BoundingBox (1, 1, 100, 100); - + // Create the animation object and configure for specified output AnimationInterface anim; if (animPort > 0) diff --git a/src/netanim/model/animation-interface.cc b/src/netanim/model/animation-interface.cc index 997953c70..d55efd9e3 100644 --- a/src/netanim/model/animation-interface.cc +++ b/src/netanim/model/animation-interface.cc @@ -104,7 +104,7 @@ void AnimationInterface::StartAnimation () Vector v = loc->GetPosition (); ostringstream oss; oss << "0.0 N " << n->GetId () - << " " << v.x << " " << v.y << endl; + << " " << v.x << " " << v.y << endl; WriteN (m_fHandle, oss.str ().c_str (), oss.str ().length ()); } } @@ -136,7 +136,7 @@ void AnimationInterface::StartAnimation () ostringstream oss; oss << "0.0 L " << n1Id << " " << n2Id << endl; WriteN (m_fHandle, oss.str ().c_str (), - oss.str ().length ()); + oss.str ().length ()); } } } @@ -146,7 +146,7 @@ void AnimationInterface::StartAnimation () } } } - + // Connect the callback for packet tx events Config::Connect ("/ChannelList/*/TxRxPointToPoint", MakeCallback (&AnimationInterface::DevTxTrace, this)); @@ -181,7 +181,7 @@ int AnimationInterface::WriteN (int h, const char* data, uint32_t count) } return written; } - + void AnimationInterface::DevTxTrace (std::string context, Ptr p, Ptr tx, Ptr rx, Time txTime, Time rxTime) diff --git a/src/netanim/model/animation-interface.h b/src/netanim/model/animation-interface.h index 7ca6751d6..d736d71e1 100644 --- a/src/netanim/model/animation-interface.h +++ b/src/netanim/model/animation-interface.h @@ -31,9 +31,17 @@ namespace ns3 { + +/** + * \defgroup netanim Animation + * + */ + class NetModel; /** + * \ingroup netanim + * * \brief Interface to network animator * * Provides functions that facilitate communications with an @@ -98,8 +106,8 @@ public: private: // Packet tx animation callback void DevTxTrace (std::string context, Ptr p, - Ptr tx, Ptr rx, - Time txTime, Time rxTime); + Ptr tx, Ptr rx, + Time txTime, Time rxTime); // Write specified amount of data to the specified handle int WriteN (int, const char*, uint32_t); private: diff --git a/src/netanim/model/canvas-location.cc b/src/netanim/model/canvas-location.cc index 4fe4fb0de..e2c3d4cdd 100644 --- a/src/netanim/model/canvas-location.cc +++ b/src/netanim/model/canvas-location.cc @@ -33,25 +33,27 @@ CanvasLocation::GetTypeId (void) TypeId::ATTR_SET | TypeId::ATTR_GET, VectorValue (Vector (0.0, 0.0, 0.0)), MakeVectorAccessor (&CanvasLocation::SetLocation, - &CanvasLocation::GetLocation), + &CanvasLocation::GetLocation), MakeVectorChecker ()) - ; + ; return tid; } CanvasLocation::CanvasLocation () -{} +{ +} CanvasLocation::~CanvasLocation () -{} +{ +} -Vector +Vector CanvasLocation::GetLocation (void) const { return m_location; } -void +void CanvasLocation::SetLocation (const Vector &location) { m_location = location; diff --git a/src/netanim/model/canvas-location.h b/src/netanim/model/canvas-location.h index 12dcdfca4..3949dcb8d 100644 --- a/src/netanim/model/canvas-location.h +++ b/src/netanim/model/canvas-location.h @@ -26,7 +26,10 @@ namespace ns3 { + /** + * \ingroup netanim + * * \brief Keep track of the current location of an object * * This can be used anytime a logical node location is needed diff --git a/src/network/bindings/scan-header.h b/src/network/bindings/scan-header.h index 9a049a402..415dba045 100644 --- a/src/network/bindings/scan-header.h +++ b/src/network/bindings/scan-header.h @@ -6,11 +6,11 @@ using namespace ns3; namespace { - void __foo () - { - static SequenceNumber32 a; - static SequenceNumber16 b; - } - +void __foo () +{ + static SequenceNumber32 a; + static SequenceNumber16 b; +} + } diff --git a/doc/manual/figures/buffer.dia b/src/network/doc/buffer.dia similarity index 100% rename from doc/manual/figures/buffer.dia rename to src/network/doc/buffer.dia diff --git a/doc/manual/source/nodes-and-devices-overview.rst b/src/network/doc/network-overview.rst similarity index 100% rename from doc/manual/source/nodes-and-devices-overview.rst rename to src/network/doc/network-overview.rst diff --git a/doc/manual/figures/node.dia b/src/network/doc/node.dia similarity index 100% rename from doc/manual/figures/node.dia rename to src/network/doc/node.dia diff --git a/doc/manual/figures/packet.dia b/src/network/doc/packet.dia similarity index 100% rename from doc/manual/figures/packet.dia rename to src/network/doc/packet.dia diff --git a/doc/manual/source/packets.rst b/src/network/doc/packets.rst similarity index 98% rename from doc/manual/source/packets.rst rename to src/network/doc/packets.rst index db78049f6..b6509fbe6 100644 --- a/doc/manual/source/packets.rst +++ b/src/network/doc/packets.rst @@ -229,7 +229,7 @@ must inherit from class Header, and implement the following methods: * ``Print ()`` To see a simple example of how these are done, look at the UdpHeader class -headers src/internet-stack/udp-header.cc. There are many other examples within +headers src/internet/model/udp-header.cc. There are many other examples within the source code. Once you have a header (or you have a preexisting header), the following @@ -291,7 +291,7 @@ will not cover those bytes. The converse is true for the PacketTag; it covers a packet despite the operations on it. PacketTags are limited in size to 20 bytes. This is a modifiable compile-time -constant in ``src/common/packet-tag-list.h``. ByteTags have no such restriction. +constant in ``src/network/model/packet-tag-list.h``. ByteTags have no such restriction. Each tag type must subclass ``ns3::Tag``, and only one instance of each Tag type may be in each tag list. Here are a few differences in the @@ -421,14 +421,14 @@ The Packet API for packet tags is given below.:: PacketTagIterator GetPacketTagIterator (void) const; Here is a simple example illustrating the use of tags from the -code in ``src/internet-stack/udp-socket-impl.cc``::: +code in ``src/internet/model/udp-socket-impl.cc``::: Ptr p; // pointer to a pre-existing packet SocketIpTtlTag tag tag.SetTtl (m_ipMulticastTtl); // Convey the TTL from UDP layer to IP layer p->AddPacketTag (tag); -This tag is read at the IP layer, then stripped (``src/internet-stack/ipv4-l3-protocol.cc``)::: +This tag is read at the IP layer, then stripped (``src/internet/model/ipv4-l3-protocol.cc``)::: uint8_t ttl = m_defaultTtl; SocketIpTtlTag tag; diff --git a/doc/manual/source/simple.rst b/src/network/doc/simple.rst similarity index 100% rename from doc/manual/source/simple.rst rename to src/network/doc/simple.rst diff --git a/doc/manual/source/sockets-api.rst b/src/network/doc/sockets-api.rst similarity index 99% rename from doc/manual/source/sockets-api.rst rename to src/network/doc/sockets-api.rst index 22fcfab0e..f3493c2b5 100644 --- a/doc/manual/source/sockets-api.rst +++ b/src/network/doc/sockets-api.rst @@ -29,7 +29,7 @@ to understand that the semantics are *not* the exact same as one finds in a real system (for an API which is very much aligned to real systems, see the next section). -:cpp:class:`ns3::Socket` is defined in ``src/node/socket.h``. +:cpp:class:`ns3::Socket` is defined in ``src/network/model/socket.h``. Readers will note that many public member functions are aligned with real sockets function calls, and all other things being equal, we have tried to align with a Posix sockets API. However, note that: diff --git a/doc/manual/figures/sockets-overview.dia b/src/network/doc/sockets-overview.dia similarity index 100% rename from doc/manual/figures/sockets-overview.dia rename to src/network/doc/sockets-overview.dia diff --git a/src/network/examples/main-packet-header.cc b/src/network/examples/main-packet-header.cc index 2c234f061..13f1d28c0 100644 --- a/src/network/examples/main-packet-header.cc +++ b/src/network/examples/main-packet-header.cc @@ -34,24 +34,25 @@ MyHeader::MyHeader () // implicit or explicit, but never private. } MyHeader::~MyHeader () -{} +{ +} -TypeId +TypeId MyHeader::GetTypeId (void) { static TypeId tid = TypeId ("ns3::MyHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } -TypeId +TypeId MyHeader::GetInstanceTypeId (void) const { return GetTypeId (); } -void +void MyHeader::Print (std::ostream &os) const { // This method is invoked by the packet printing @@ -111,7 +112,7 @@ int main (int argc, char *argv[]) // print the content of my packet on the standard output. p->Print (std::cout); - std::cout << std::endl; + std::cout << std::endl; // you can now remove the header from the packet: MyHeader destinationHeader; diff --git a/src/network/examples/main-packet-tag.cc b/src/network/examples/main-packet-tag.cc index 1210a2b66..b0598bf8e 100644 --- a/src/network/examples/main-packet-tag.cc +++ b/src/network/examples/main-packet-tag.cc @@ -34,7 +34,7 @@ public: virtual void Serialize (TagBuffer i) const; virtual void Deserialize (TagBuffer i); virtual void Print (std::ostream &os) const; - + // these are our accessors to our tag structure void SetSimpleValue (uint8_t value); uint8_t GetSimpleValue (void) const; @@ -53,7 +53,7 @@ MyTag::GetTypeId (void) EmptyAttributeValue (), MakeUintegerAccessor (&MyTag::GetSimpleValue), MakeUintegerChecker ()) - ; + ; return tid; } TypeId diff --git a/src/network/helper/application-container.cc b/src/network/helper/application-container.cc index a63eaf105..243eac34d 100644 --- a/src/network/helper/application-container.cc +++ b/src/network/helper/application-container.cc @@ -24,7 +24,8 @@ namespace ns3 { ApplicationContainer::ApplicationContainer () -{} +{ +} ApplicationContainer::ApplicationContainer (Ptr app) { diff --git a/src/network/helper/net-device-container.cc b/src/network/helper/net-device-container.cc index f2cfe23f8..9bb04c74f 100644 --- a/src/network/helper/net-device-container.cc +++ b/src/network/helper/net-device-container.cc @@ -24,7 +24,8 @@ namespace ns3 { NetDeviceContainer::NetDeviceContainer () -{} +{ +} NetDeviceContainer::NetDeviceContainer (Ptr dev) { m_devices.push_back (dev); diff --git a/src/network/helper/node-container.cc b/src/network/helper/node-container.cc index 3469fbe11..6e1d66770 100644 --- a/src/network/helper/node-container.cc +++ b/src/network/helper/node-container.cc @@ -24,7 +24,8 @@ namespace ns3 { NodeContainer::NodeContainer () -{} +{ +} NodeContainer::NodeContainer (Ptr node) { diff --git a/src/network/helper/node-container.h b/src/network/helper/node-container.h index c07734d7b..80e40bf06 100644 --- a/src/network/helper/node-container.h +++ b/src/network/helper/node-container.h @@ -287,7 +287,7 @@ public: */ static NodeContainer GetGlobal (void); - private: +private: std::vector > m_nodes; }; diff --git a/src/network/helper/packet-socket-helper.cc b/src/network/helper/packet-socket-helper.cc index 5bace9ec3..3b75a0ac3 100644 --- a/src/network/helper/packet-socket-helper.cc +++ b/src/network/helper/packet-socket-helper.cc @@ -29,7 +29,7 @@ PacketSocketHelper::Install (NodeContainer c) const { for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i) { - Install (*i); + Install (*i); } } diff --git a/src/network/helper/trace-helper.cc b/src/network/helper/trace-helper.cc index fe6a3b5b9..3343e9927 100644 --- a/src/network/helper/trace-helper.cc +++ b/src/network/helper/trace-helper.cc @@ -446,7 +446,7 @@ PcapHelperForDevice::EnablePcap (std::string prefix, uint32_t nodeid, uint32_t d { continue; } - + NS_ABORT_MSG_IF (deviceid >= node->GetNDevices (), "PcapHelperForDevice::EnablePcap(): Unknown deviceid = " << deviceid); Ptr nd = node->GetDevice (deviceid); @@ -632,7 +632,7 @@ AsciiTraceHelperForDevice::EnableAsciiImpl ( { continue; } - + NS_ABORT_MSG_IF (deviceid >= node->GetNDevices (), "AsciiTraceHelperForDevice::EnableAscii(): Unknown deviceid = " << deviceid); diff --git a/src/network/helper/trace-helper.h b/src/network/helper/trace-helper.h index ede02845d..d359d5b0e 100644 --- a/src/network/helper/trace-helper.h +++ b/src/network/helper/trace-helper.h @@ -81,7 +81,7 @@ public: * @brief Create and initialize a pcap file. */ Ptr CreateFile (std::string filename, std::ios::openmode filemode, - uint32_t dataLinkType, uint32_t snapLen = 65535, int32_t tzCorrection = 0); + uint32_t dataLinkType, uint32_t snapLen = 65535, int32_t tzCorrection = 0); /** * @brief Hook a trace source to the default trace sink */ diff --git a/src/network/model/address.cc b/src/network/model/address.cc index f7e981055..6878fe6a7 100644 --- a/src/network/model/address.cc +++ b/src/network/model/address.cc @@ -30,7 +30,7 @@ Address::Address () : m_type (0), m_len (0) { - // Buffer left uninitialized + // Buffer left uninitialized } Address::Address (uint8_t type, const uint8_t *buffer, uint8_t len) @@ -95,7 +95,7 @@ Address::CopyFrom (const uint8_t *buffer, uint8_t len) m_len = len; return m_len; } - uint32_t +uint32_t Address::CopyAllFrom (const uint8_t *buffer, uint8_t len) { NS_ASSERT (len >= 2); @@ -201,13 +201,13 @@ bool operator < (const Address &a, const Address &b) for (uint8_t i = 0; i < a.GetLength(); i++) { if (a.m_data[i] < b.m_data[i]) - { - return true; - } + { + return true; + } else if (a.m_data[i] > b.m_data[i]) - { - return false; - } + { + return false; + } } return false; } @@ -259,17 +259,17 @@ std::istream& operator>> (std::istream& is, Address & address) std::string::size_type next; next = v.find (":", col); if (next == std::string::npos) - { - tmp = v.substr (col, v.size ()-col); - address.m_data[i] = AsInt (tmp); - break; - } + { + tmp = v.substr (col, v.size ()-col); + address.m_data[i] = AsInt (tmp); + break; + } else - { - tmp = v.substr (col, next-col); - address.m_data[i] = AsInt (tmp); - col = next + 1; - } + { + tmp = v.substr (col, next-col); + address.m_data[i] = AsInt (tmp); + col = next + 1; + } } return is; } diff --git a/src/network/model/address.h b/src/network/model/address.h index c0d69b9fa..7834638b9 100644 --- a/src/network/model/address.h +++ b/src/network/model/address.h @@ -30,7 +30,7 @@ namespace ns3 { /** - * \ingroup node + * \ingroup network * \defgroup address Address */ /** @@ -159,7 +159,7 @@ public: * \param len the length of the buffer * \returns the number of bytes copied. * - * The inverse of CopyAllTo(). + * The inverse of CopyAllTo(). * * \see CopyAllTo */ diff --git a/src/network/model/application.cc b/src/network/model/application.cc index 4ae464bfe..e77f3cb0b 100644 --- a/src/network/model/application.cc +++ b/src/network/model/application.cc @@ -48,24 +48,26 @@ Application::GetTypeId (void) TimeValue (TimeStep (0)), MakeTimeAccessor (&Application::m_stopTime), MakeTimeChecker ()) - ; + ; return tid; } // \brief Application Constructor Application::Application() -{} - +{ +} + // \brief Application Destructor Application::~Application() -{} +{ +} -void +void Application::SetStartTime (Time start) { m_startTime = start; } -void +void Application::SetStopTime (Time stop) { m_stopTime = stop; @@ -79,7 +81,7 @@ Application::DoDispose (void) m_startEvent.Cancel (); m_stopEvent.Cancel (); Object::DoDispose (); -} +} void Application::DoStart (void) @@ -91,7 +93,7 @@ Application::DoStart (void) } Object::DoStart (); } - + Ptr Application::GetNode() const { return m_node; @@ -114,5 +116,5 @@ void Application::StopApplication() } } //namespace ns3 - - + + diff --git a/src/network/model/application.h b/src/network/model/application.h index adaf99879..1eeeb6f08 100644 --- a/src/network/model/application.h +++ b/src/network/model/application.h @@ -50,14 +50,14 @@ class RandomVariable; * the previous blocking call would normally exit. THis is documented * in more detail Socket class in socket.h. * - * The main purpose of the base class application public API is to + * The main purpose of the base class application public API is to * provide a uniform way to start and stop applications. */ - /** - * \brief The base class for all ns3 applications - * - */ +/** +* \brief The base class for all ns3 applications +* +*/ class Application : public Object { public: @@ -77,7 +77,7 @@ public: * time specified, to cause the application to begin. */ void SetStartTime (Time start); - + /** * \brief Specify application stop time * \param stop Stop time for this application, relative to the @@ -90,7 +90,7 @@ public: * time has come. */ void SetStopTime (Time stop); - + /** * \returns the Node to which this Application object is attached. */ @@ -100,7 +100,7 @@ public: * \param node the node to which this Application object is attached. */ void SetNode (Ptr node); - + private: /** * \brief Application specific startup code diff --git a/src/network/model/buffer.h b/src/network/model/buffer.h index 55190db6c..65617fb12 100644 --- a/src/network/model/buffer.h +++ b/src/network/model/buffer.h @@ -574,7 +574,7 @@ private: static struct Buffer::Data *Create (uint32_t size); static struct Buffer::Data *Allocate (uint32_t reqSize); static void Deallocate (struct Buffer::Data *data); - + struct Data *m_data; /* keep track of the maximum value of m_zeroAreaStart across diff --git a/src/network/model/channel-list.cc b/src/network/model/channel-list.cc index ac215dc33..b258f2902 100644 --- a/src/network/model/channel-list.cc +++ b/src/network/model/channel-list.cc @@ -47,7 +47,7 @@ public: uint32_t GetNChannels (void); static Ptr Get (void); - + private: static Ptr *DoGet (void); static void Delete (void); @@ -66,7 +66,7 @@ ChannelListPriv::GetTypeId (void) ObjectVectorValue (), MakeObjectVectorAccessor (&ChannelListPriv::m_channels), MakeObjectVectorChecker ()) - ; + ; return tid; } @@ -74,7 +74,7 @@ Ptr ChannelListPriv::Get (void) { return *DoGet (); -} +} Ptr * ChannelListPriv::DoGet (void) @@ -103,7 +103,8 @@ ChannelListPriv::ChannelListPriv () } ChannelListPriv::~ChannelListPriv () -{} +{ +} void ChannelListPriv::DoDispose (void) { @@ -125,7 +126,7 @@ ChannelListPriv::Add (Ptr channel) uint32_t index = m_channels.size (); m_channels.push_back (channel); return index; - + } ChannelList::Iterator diff --git a/src/network/model/channel-list.h b/src/network/model/channel-list.h index f3b9629ba..ee2893525 100644 --- a/src/network/model/channel-list.h +++ b/src/network/model/channel-list.h @@ -29,7 +29,7 @@ class CallbackBase; /** - * \ingroup node + * \ingroup network * * \brief the list of simulation channels. * @@ -69,6 +69,6 @@ public: static uint32_t GetNChannels (void); }; -}//namespace ns3 +} //namespace ns3 #endif /* CHANNEL_LIST_H */ diff --git a/src/network/model/channel.h b/src/network/model/channel.h index b0c2b6d6b..c22cc7547 100644 --- a/src/network/model/channel.h +++ b/src/network/model/channel.h @@ -27,7 +27,7 @@ namespace ns3 { class NetDevice; /** - * \ingroup node + * \ingroup network * \defgroup channel Channel */ /** diff --git a/src/network/model/chunk.cc b/src/network/model/chunk.cc index 247a5f6a9..6081f0edb 100644 --- a/src/network/model/chunk.cc +++ b/src/network/model/chunk.cc @@ -9,7 +9,7 @@ Chunk::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Chunk") .SetParent () - ; + ; return tid; } diff --git a/src/network/model/chunk.h b/src/network/model/chunk.h index 63d62d283..39fcecc01 100644 --- a/src/network/model/chunk.h +++ b/src/network/model/chunk.h @@ -13,7 +13,7 @@ namespace ns3 { */ class Chunk : public ObjectBase { - public: +public: static TypeId GetTypeId (void); virtual uint32_t Deserialize (Buffer::Iterator start) = 0; diff --git a/src/network/model/header.cc b/src/network/model/header.cc index c31ed5ab0..a7ea6e805 100644 --- a/src/network/model/header.cc +++ b/src/network/model/header.cc @@ -5,14 +5,15 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (Header); Header::~Header () -{} +{ +} -TypeId +TypeId Header::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Header") .SetParent () - ; + ; return tid; } diff --git a/src/network/model/net-device.cc b/src/network/model/net-device.cc index e12b4ca85..909d0b49c 100644 --- a/src/network/model/net-device.cc +++ b/src/network/model/net-device.cc @@ -33,7 +33,7 @@ TypeId NetDevice::GetTypeId (void) { static TypeId tid = TypeId ("ns3::NetDevice") .SetParent () - ; + ; return tid; } diff --git a/src/network/model/net-device.h b/src/network/model/net-device.h index c267ef0af..9e6048e28 100644 --- a/src/network/model/net-device.h +++ b/src/network/model/net-device.h @@ -37,7 +37,7 @@ class Channel; class Packet; /** - * \ingroup node + * \ingroup network * \defgroup netdevice NetDevice */ /** @@ -184,14 +184,14 @@ public: * \see NetDevice::IsMulticast */ virtual Address GetMulticast (Ipv4Address multicastGroup) const = 0; - - /** - * \brief Get the MAC multicast address corresponding - * to the IPv6 address provided. - * \param addr IPv6 address - * \return the MAC multicast address - * \warning Calling this method is invalid if IsMulticast returns not true. - */ + + /** +* \brief Get the MAC multicast address corresponding +* to the IPv6 address provided. +* \param addr IPv6 address +* \return the MAC multicast address +* \warning Calling this method is invalid if IsMulticast returns not true. +*/ virtual Address GetMulticast (Ipv6Address addr) const = 0; /** @@ -268,16 +268,16 @@ public: * which we do here. */ enum PacketType - { - PACKET_HOST = 1, /**< Packet addressed oo us */ - NS3_PACKET_HOST = PACKET_HOST, - PACKET_BROADCAST, /**< Packet addressed to all */ - NS3_PACKET_BROADCAST = PACKET_BROADCAST, - PACKET_MULTICAST, /**< Packet addressed to multicast group */ - NS3_PACKET_MULTICAST = PACKET_MULTICAST, - PACKET_OTHERHOST, /**< Packet addressed to someone else */ - NS3_PACKET_OTHERHOST = PACKET_OTHERHOST, - }; + { + PACKET_HOST = 1, /**< Packet addressed oo us */ + NS3_PACKET_HOST = PACKET_HOST, + PACKET_BROADCAST, /**< Packet addressed to all */ + NS3_PACKET_BROADCAST = PACKET_BROADCAST, + PACKET_MULTICAST, /**< Packet addressed to multicast group */ + NS3_PACKET_MULTICAST = PACKET_MULTICAST, + PACKET_OTHERHOST, /**< Packet addressed to someone else */ + NS3_PACKET_OTHERHOST = PACKET_OTHERHOST, + }; /** * \param device a pointer to the net device which is calling this callback diff --git a/src/network/model/nix-vector.cc b/src/network/model/nix-vector.cc index afaaadabc..0b4882455 100644 --- a/src/network/model/nix-vector.cc +++ b/src/network/model/nix-vector.cc @@ -50,7 +50,8 @@ NixVector::NixVector (const NixVector &o) m_used (o.m_used), m_currentVectorBitSize (o.m_currentVectorBitSize), m_totalBitSize (o.m_totalBitSize) -{} +{ +} NixVector & NixVector::operator = (const NixVector &o) @@ -124,7 +125,7 @@ NixVector::AddNeighborIndex (uint32_t newBits, uint32_t numberOfBits) // there newBits = newBits >> (32 - m_currentVectorBitSize); m_nixVector.push_back (newBits); - + // also reset number of bits in // m_currentVectorBitSize // because we are working with a new @@ -142,7 +143,7 @@ NixVector::AddNeighborIndex (uint32_t newBits, uint32_t numberOfBits) // NixVector newBits = newBits << m_currentVectorBitSize; newBits |= m_nixVector.back (); - + // Now insert the new NixVector and // increment number of bits for // m_currentVectorBitSize and m_totalBitSize @@ -170,7 +171,7 @@ NixVector::ExtractNeighborIndex (uint32_t numberOfBits) if (numberOfBits > totalRemainingBits) { NS_FATAL_ERROR ("You've tried to extract too many bits of the Nix-vector, " << this << ". NumberBits: " - << numberOfBits << " Remaining: " << totalRemainingBits); + << numberOfBits << " Remaining: " << totalRemainingBits); } if (numberOfBits <= 0) @@ -212,7 +213,7 @@ NixVector::GetSerializedSize (void) const { uint32_t totalSizeInBytes = 0; totalSizeInBytes = sizeof (m_used) + sizeof (m_currentVectorBitSize) + - sizeof (m_totalBitSize) + (4 * m_nixVector.size ()); + sizeof (m_totalBitSize) + (4 * m_nixVector.size ()); return totalSizeInBytes; } @@ -323,7 +324,7 @@ NixVector::DumpNixVector (std::ostream &os) const // all this work just to get the nix // vector to print out neat - + // if it's not the first entry in the vector, // we may have to add some zeros and fill // out the vector @@ -365,7 +366,7 @@ NixVector::BitCount (uint32_t numberOfNeighbors) const // Given the numberOfNeighbors, return the number // of bits needed (essentially, log2(numberOfNeighbors-1) uint32_t bitCount = 0; - + if (numberOfNeighbors < 2) { return 1; diff --git a/src/network/model/nix-vector.h b/src/network/model/nix-vector.h index 041e79c10..86a3cdf6a 100644 --- a/src/network/model/nix-vector.h +++ b/src/network/model/nix-vector.h @@ -33,7 +33,7 @@ namespace ns3 { * \brief Neighbor-index data structure for nix-vector routing * * This data structure holds a vector of "neighbor-indexes" for - * a simulation specific routing protocol, nix-vector routing. + * a simulation specific routing protocol, nix-vector routing. * Theses neighbor-indexes correspond to the net-device which a * node should use to route a packet. A nix-vector is built * (or fetched from a cache) on-demand. The nix-vector is @@ -62,126 +62,126 @@ namespace ns3 { class NixVector : public SimpleRefCount { - public: - NixVector (); - ~NixVector (); - /** - * \return a copy of this nix-vector - */ - Ptr Copy (void) const; - /** - * \param o the NixVector to copy to a new NixVector - * using a constructor - */ - NixVector (const NixVector &o); - /** - * \param o the NixVector to copy to a new NixVector using the - * equals operator - */ - NixVector &operator = (const NixVector &o); - /** - * \param newBits the neighbor-index to be added to the vector - * \param numberOfBits the number of bits that newBits contains - * - * Adds the neighbor index to the vector using a fair amount of - * bit manipulation to pack everything in efficiently. - * - * Note: This function assumes that the number of bits to be added - * is always less than or equal to 32, ie., you can only span one - * entry of a nix-vector at a time. This is reasonable, since 32 - * bits gives you 2^32 possible neighbors. - */ - void AddNeighborIndex (uint32_t newBits, uint32_t numberOfBits); - /** - * \return the neighbor index - * - * \param numberOfBits the number of bits to extract from the vector - * - * Extracts the number of bits specified from - * the vector and returns the value extracted - * - * Note: This function assumes that the number of bits to be extracted - * is always less than or equal to 32, ie., you can only span one - * entry of a nix-vector at a time. This is reasonable, since 32 - * bits gives you 2^32 possible neighbors. - */ - uint32_t ExtractNeighborIndex (uint32_t numberOfBits); - /** - * \return number of bits remaining in the - * nix-vector (ie m_total - m_used) - */ - uint32_t GetRemainingBits (void); - /** - * \return the number of bytes required for serialization - */ - uint32_t GetSerializedSize (void) const; - /** - * \return zero if buffer not large enough - * - * \param buffer points to serialization buffer - * - * \param maxSize max number of bytes to write - * - * This nix-vector is serialized into the raw character - * buffer parameter. - */ - uint32_t Serialize (uint32_t* buffer, uint32_t maxSize) const; - /** - * \return zero if a complete nix-vector is not deserialized - * - * \param buffer points to buffer for deserialization - * - * \param size number of bytes to deserialize - * - * The raw character buffer containing all the nix-vector - * information is deserialized into this nix-vector. - */ - uint32_t Deserialize (const uint32_t* buffer, uint32_t size); - /** - * \return number of bits of numberOfNeighbors - * - * \param numberOfNeighbors the total number of neighbors - * - * This function is used to determine the number of bits of - * numberOfNeighbors so that this value can be passed in to - * AddNeighborIndex or ExtractNeighborIndex. - */ - uint32_t BitCount (uint32_t numberOfNeighbors) const; +public: + NixVector (); + ~NixVector (); + /** + * \return a copy of this nix-vector + */ + Ptr Copy (void) const; + /** + * \param o the NixVector to copy to a new NixVector + * using a constructor + */ + NixVector (const NixVector &o); + /** + * \param o the NixVector to copy to a new NixVector using the + * equals operator + */ + NixVector &operator = (const NixVector &o); + /** + * \param newBits the neighbor-index to be added to the vector + * \param numberOfBits the number of bits that newBits contains + * + * Adds the neighbor index to the vector using a fair amount of + * bit manipulation to pack everything in efficiently. + * + * Note: This function assumes that the number of bits to be added + * is always less than or equal to 32, ie., you can only span one + * entry of a nix-vector at a time. This is reasonable, since 32 + * bits gives you 2^32 possible neighbors. + */ + void AddNeighborIndex (uint32_t newBits, uint32_t numberOfBits); + /** + * \return the neighbor index + * + * \param numberOfBits the number of bits to extract from the vector + * + * Extracts the number of bits specified from + * the vector and returns the value extracted + * + * Note: This function assumes that the number of bits to be extracted + * is always less than or equal to 32, ie., you can only span one + * entry of a nix-vector at a time. This is reasonable, since 32 + * bits gives you 2^32 possible neighbors. + */ + uint32_t ExtractNeighborIndex (uint32_t numberOfBits); + /** + * \return number of bits remaining in the + * nix-vector (ie m_total - m_used) + */ + uint32_t GetRemainingBits (void); + /** + * \return the number of bytes required for serialization + */ + uint32_t GetSerializedSize (void) const; + /** + * \return zero if buffer not large enough + * + * \param buffer points to serialization buffer + * + * \param maxSize max number of bytes to write + * + * This nix-vector is serialized into the raw character + * buffer parameter. + */ + uint32_t Serialize (uint32_t* buffer, uint32_t maxSize) const; + /** + * \return zero if a complete nix-vector is not deserialized + * + * \param buffer points to buffer for deserialization + * + * \param size number of bytes to deserialize + * + * The raw character buffer containing all the nix-vector + * information is deserialized into this nix-vector. + */ + uint32_t Deserialize (const uint32_t* buffer, uint32_t size); + /** + * \return number of bits of numberOfNeighbors + * + * \param numberOfNeighbors the total number of neighbors + * + * This function is used to determine the number of bits of + * numberOfNeighbors so that this value can be passed in to + * AddNeighborIndex or ExtractNeighborIndex. + */ + uint32_t BitCount (uint32_t numberOfNeighbors) const; - private: - typedef std::vector NixBits_t; +private: + typedef std::vector NixBits_t; - /* for printing of nix-vector */ - void DumpNixVector (std::ostream &os) const; - /* for printing of nix-vector */ - friend std::ostream & operator <<( std::ostream &outs, const NixVector &nix); + /* for printing of nix-vector */ + void DumpNixVector (std::ostream &os) const; + /* for printing of nix-vector */ + friend std::ostream & operator <<( std::ostream &outs, const NixVector &nix); - /* the actual nix-vector */ - NixBits_t m_nixVector; + /* the actual nix-vector */ + NixBits_t m_nixVector; - /* for tracking where we are - * in the nix-vector - */ - uint32_t m_used; - - /* for tracking how many bits we - * have used in the current vector - * entry. need this in order to - * expand the vector passed 32bits - */ - uint32_t m_currentVectorBitSize; + /* for tracking where we are + * in the nix-vector + */ + uint32_t m_used; - /* a counter of how total bits are in - * the nix-vector - */ - uint32_t m_totalBitSize; + /* for tracking how many bits we + * have used in the current vector + * entry. need this in order to + * expand the vector passed 32bits + */ + uint32_t m_currentVectorBitSize; - /* internal for pretty printing of nix-vector */ - void PrintDec2BinNixFill (uint32_t, uint32_t, std::ostream &os) const; + /* a counter of how total bits are in + * the nix-vector + */ + uint32_t m_totalBitSize; - /* internal for pretty printing of nix-vector */ - void PrintDec2BinNix (uint32_t, uint32_t, std::ostream &os) const; + /* internal for pretty printing of nix-vector */ + void PrintDec2BinNixFill (uint32_t, uint32_t, std::ostream &os) const; + + /* internal for pretty printing of nix-vector */ + void PrintDec2BinNix (uint32_t, uint32_t, std::ostream &os) const; }; } // namespace ns3 diff --git a/src/network/model/node-list.cc b/src/network/model/node-list.cc index cbceb5fb9..59c1e61a6 100644 --- a/src/network/model/node-list.cc +++ b/src/network/model/node-list.cc @@ -48,7 +48,7 @@ public: uint32_t GetNNodes (void); static Ptr Get (void); - + private: virtual void DoDispose (void); static Ptr *DoGet (void); @@ -67,7 +67,7 @@ NodeListPriv::GetTypeId (void) ObjectVectorValue (), MakeObjectVectorAccessor (&NodeListPriv::m_nodes), MakeObjectVectorChecker ()) - ; + ; return tid; } @@ -75,7 +75,7 @@ Ptr NodeListPriv::Get (void) { return *DoGet (); -} +} Ptr * NodeListPriv::DoGet (void) { @@ -102,7 +102,8 @@ NodeListPriv::NodeListPriv () NS_LOG_FUNCTION_NOARGS (); } NodeListPriv::~NodeListPriv () -{} +{ +} void NodeListPriv::DoDispose (void) { @@ -126,7 +127,7 @@ NodeListPriv::Add (Ptr node) m_nodes.push_back (node); Simulator::ScheduleWithContext (index, TimeStep (0), &Node::Start, node); return index; - + } NodeList::Iterator NodeListPriv::Begin (void) const @@ -187,4 +188,4 @@ NodeList::GetNNodes (void) return NodeListPriv::Get ()->GetNNodes (); } -}//namespace ns3 +} //namespace ns3 diff --git a/src/network/model/node-list.h b/src/network/model/node-list.h index 2d74b67df..e457e2c61 100644 --- a/src/network/model/node-list.h +++ b/src/network/model/node-list.h @@ -31,7 +31,7 @@ class CallbackBase; /** - * \ingroup node + * \ingroup network * * \brief the list of simulation nodes. * @@ -71,7 +71,7 @@ public: static uint32_t GetNNodes (void); }; -}//namespace ns3 +} //namespace ns3 #endif /* NODE_LIST_H */ diff --git a/src/network/model/node.cc b/src/network/model/node.cc index d22bca727..ba27f8292 100644 --- a/src/network/model/node.cc +++ b/src/network/model/node.cc @@ -34,7 +34,7 @@ NS_LOG_COMPONENT_DEFINE ("Node"); -namespace ns3{ +namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (Node); @@ -62,7 +62,7 @@ Node::GetTypeId (void) UintegerValue (0), MakeUintegerAccessor (&Node::m_id), MakeUintegerChecker ()) - ; + ; return tid; } @@ -85,23 +85,24 @@ Node::Construct (void) { m_id = NodeList::Add (this); } - -Node::~Node () -{} -uint32_t +Node::~Node () +{ +} + +uint32_t Node::GetId (void) const { return m_id; } -uint32_t +uint32_t Node::GetSystemId (void) const { return m_sid; } -uint32_t +uint32_t Node::AddDevice (Ptr device) { uint32_t index = m_devices.size (); @@ -187,7 +188,7 @@ Node::DoStart (void) Ptr application = *i; application->Start (); } - + Object::DoStart (); } @@ -274,8 +275,8 @@ Node::ReceiveFromDevice (Ptr device, Ptr packet, uint16 "make sure the channels in use are correctly updating events context " << "when transfering events from one node to another."); NS_LOG_DEBUG("Node " << GetId () << " ReceiveFromDevice: dev " - << device->GetIfIndex () << " (type=" << device->GetInstanceTypeId ().GetName () - << ") Packet UID " << packet->GetUid ()); + << device->GetIfIndex () << " (type=" << device->GetInstanceTypeId ().GetName () + << ") Packet UID " << packet->GetUid ()); bool found = false; for (ProtocolHandlerList::iterator i = m_handlers.begin (); @@ -298,4 +299,4 @@ Node::ReceiveFromDevice (Ptr device, Ptr packet, uint16 return found; } -}//namespace ns3 +} //namespace ns3 diff --git a/src/network/model/node.h b/src/network/model/node.h index 1f04c20da..5b3794531 100644 --- a/src/network/model/node.h +++ b/src/network/model/node.h @@ -36,7 +36,7 @@ class Address; /** - * \ingroup node + * \ingroup network * * \brief A network Node. * @@ -145,7 +145,7 @@ public: * \param packetType type of packet received * (broadcast/multicast/unicast/otherhost); Note: * this value is only valid for promiscuous mode - * protocol handlers. + * protocol handlers. */ typedef Callback, Ptr,uint16_t,const Address &, const Address &, NetDevice::PacketType> ProtocolHandler; @@ -174,7 +174,7 @@ public: */ void UnregisterProtocolHandler (ProtocolHandler handler); - + /** * \returns true if checksums are enabled, false otherwise. */ diff --git a/src/network/model/packet.h b/src/network/model/packet.h index ac32373f6..734ed1c79 100644 --- a/src/network/model/packet.h +++ b/src/network/model/packet.h @@ -37,7 +37,7 @@ namespace ns3 { /** - * \ingroup common + * \ingroup network * \defgroup packet Packet */ @@ -572,7 +572,7 @@ private: std::ostream& operator<< (std::ostream& os, const Packet &packet); /** - * \ingroup common + * \ingroup network * \defgroup packetperf Packet Performance * The current implementation of the byte buffers and tag list is based * on COW (Copy On Write. An introduction to COW can be found in Scott diff --git a/src/network/model/socket-factory.cc b/src/network/model/socket-factory.cc index 8cb24401c..f956e2761 100644 --- a/src/network/model/socket-factory.cc +++ b/src/network/model/socket-factory.cc @@ -31,6 +31,7 @@ TypeId SocketFactory::GetTypeId (void) } SocketFactory::SocketFactory () -{} +{ +} } // namespace ns3 diff --git a/src/network/model/socket-factory.h b/src/network/model/socket-factory.h index 9f17bca6e..ae2726cae 100644 --- a/src/network/model/socket-factory.h +++ b/src/network/model/socket-factory.h @@ -33,14 +33,14 @@ class Socket; * \brief Object to create transport layer instances that provide a * socket API to applications. * - * This base class defines the API for creating sockets. + * This base class defines the API for creating sockets. * The socket factory also can hold the global variables used to * initialize newly created sockets, such as values that are * set through the sysctl or proc interfaces in Linux. * If you want to write a new transport protocol accessible through * sockets, you need to subclass this factory class, implement CreateSocket, - * instantiate the object, and aggregate it to the node. + * instantiate the object, and aggregate it to the node. * * \see Udp * \see UdpImpl diff --git a/src/network/model/socket.cc b/src/network/model/socket.cc index c32cb37cb..e0877c3ce 100644 --- a/src/network/model/socket.cc +++ b/src/network/model/socket.cc @@ -289,7 +289,7 @@ Socket::NotifyDataRecv (void) void Socket::DoDispose (void) { - + m_connectionSucceeded = MakeNullCallback > (); m_connectionFailed = MakeNullCallback > (); m_connectionRequest = MakeNullCallback, const Address &> (); @@ -313,7 +313,10 @@ Socket::BindToNetDevice (Ptr netdevice) break; } } - NS_ASSERT_MSG (found, "Socket cannot be bound to a NetDevice not existing on the Node"); + NS_ASSERT_MSG (found, "Socket cannot be bound to a NetDevice not existing on the Node"); + //cast found to void, to suppress 'found' set but not used compiler warning + //in optimized builds + (void) found; } m_boundnetdevice = netdevice; return; @@ -336,7 +339,7 @@ Socket::SetRecvPktInfo (bool flag) * Socket Tags ***************************************************************/ -SocketAddressTag::SocketAddressTag () +SocketAddressTag::SocketAddressTag () { } @@ -360,7 +363,7 @@ SocketAddressTag::GetTypeId (void) static TypeId tid = TypeId ("ns3::SocketAddressTag") .SetParent () .AddConstructor () - ; + ; return tid; } TypeId @@ -389,7 +392,7 @@ SocketAddressTag::Print (std::ostream &os) const os << "address=" << m_address; } -SocketIpTtlTag::SocketIpTtlTag () +SocketIpTtlTag::SocketIpTtlTag () { } @@ -413,7 +416,7 @@ SocketIpTtlTag::GetTypeId (void) static TypeId tid = TypeId ("ns3::SocketIpTtlTag") .SetParent () .AddConstructor () - ; + ; return tid; } TypeId @@ -445,18 +448,19 @@ SocketIpTtlTag::Print (std::ostream &os) const SocketSetDontFragmentTag::SocketSetDontFragmentTag () -{} -void +{ +} +void SocketSetDontFragmentTag::Enable (void) { m_dontFragment = true; } -void +void SocketSetDontFragmentTag::Disable (void) { m_dontFragment = false; } -bool +bool SocketSetDontFragmentTag::IsEnabled (void) const { return m_dontFragment; @@ -470,7 +474,7 @@ SocketSetDontFragmentTag::GetTypeId (void) static TypeId tid = TypeId ("ns3::SocketSetDontFragmentTag") .SetParent () .AddConstructor () - ; + ; return tid; } TypeId @@ -486,17 +490,17 @@ SocketSetDontFragmentTag::GetSerializedSize (void) const void SocketSetDontFragmentTag::Serialize (TagBuffer i) const { - i.WriteU8 (m_dontFragment?1:0); + i.WriteU8 (m_dontFragment ? 1 : 0); } void SocketSetDontFragmentTag::Deserialize (TagBuffer i) { - m_dontFragment = (i.ReadU8 () == 1)?true:false; + m_dontFragment = (i.ReadU8 () == 1) ? true : false; } void SocketSetDontFragmentTag::Print (std::ostream &os) const { - os << (m_dontFragment?"true":"false"); + os << (m_dontFragment ? "true" : "false"); } -}//namespace ns3 +} //namespace ns3 diff --git a/src/network/model/socket.h b/src/network/model/socket.h index f7c7f30a2..b19f9c82c 100644 --- a/src/network/model/socket.h +++ b/src/network/model/socket.h @@ -38,7 +38,7 @@ class Node; class Packet; /** - * \ingroup node + * \ingroup network * \defgroup socket Socket */ @@ -54,11 +54,11 @@ class Packet; * must make use of the callbacks provided. * - It also uses class ns3::Packet as a fancy byte buffer, allowing * data to be passed across the API using an ns-3 Packet instead of - * a raw data pointer. + * a raw data pointer. * - Not all of the full POSIX sockets API is supported * * Other than that, it tries to stick to the BSD API to make it - * easier for those who know the BSD API to use this API. + * easier for those who know the BSD API to use this API. * More details are provided in the ns-3 tutorial. */ class Socket : public Object @@ -130,21 +130,21 @@ public: */ void SetConnectCallback (Callback > connectionSucceeded, Callback > connectionFailed); - /** - * \brief Detect socket recv() events such as graceful shutdown or error. - * - * For connection-oriented sockets, the first callback is used to signal - * that the remote side has gracefully shut down the connection, and the - * second callback denotes an error corresponding to cases in which - * a traditional recv() socket call might return -1 (error), such - * as a connection reset. For datagram sockets, these callbacks may - * never be invoked. - * - * \param normalClose this callback is invoked when the - * peer closes the connection gracefully - * \param errorClose this callback is invoked when the - * connection closes abnormally - */ + /** + * \brief Detect socket recv() events such as graceful shutdown or error. + * + * For connection-oriented sockets, the first callback is used to signal + * that the remote side has gracefully shut down the connection, and the + * second callback denotes an error corresponding to cases in which + * a traditional recv() socket call might return -1 (error), such + * as a connection reset. For datagram sockets, these callbacks may + * never be invoked. + * + * \param normalClose this callback is invoked when the + * peer closes the connection gracefully + * \param errorClose this callback is invoked when the + * connection closes abnormally + */ void SetCloseCallbacks (Callback > normalClose, Callback > errorClose); /** @@ -165,9 +165,9 @@ public: * port number of the connection originator. */ void SetAcceptCallback (Callback, - const Address &> connectionRequest, + const Address &> connectionRequest, Callback, - const Address&> newConnectionCreated); + const Address&> newConnectionCreated); /** * \brief Notify application when a packet has been sent from transport * protocol (non-standard socket call) @@ -176,14 +176,14 @@ public: * pointer to the socket, and the number of bytes sent. */ void SetDataSentCallback (Callback, - uint32_t> dataSent); + uint32_t> dataSent); /** * \brief Notify application when space in transmit buffer is added * * This callback is intended to notify a * socket that would have been blocked in a blocking socket model * that space is available in the transmit buffer and that it - * can call Send() again. + * can call Send() again. * * \param sendCb Callback for the event that the socket transmit buffer * fill level has decreased. This callback is passed a pointer to @@ -245,7 +245,7 @@ public: * \param address Address of remote. */ virtual int Connect (const Address &address) = 0; - + /** * \brief Listen for incoming connections. * \returns 0 on success, -1 on error (in which case errno is set). @@ -282,12 +282,12 @@ public: * I/O model for send(). * * This variant of Send() uses class ns3::Packet to encapsulate - * data, rather than providing a raw pointer and length field. + * data, rather than providing a raw pointer and length field. * This allows an ns-3 application to attach tags if desired (such * as a flow ID) and may allow the simulator to avoid some data * copies. Despite the appearance of sending Packets on a stream * socket, just think of it as a fancy byte buffer with streaming - * semantics. + * semantics. * * If either the message buffer within the Packet is too long to pass * atomically through the underlying protocol (for datagram sockets), @@ -297,10 +297,10 @@ public: * split the Packet (based on information obtained from * GetTxAvailable) and reattempt to send the data. * - * The flags argument is formed by or'ing one or more of the values: + * The flags argument is formed by or'ing one or more of the values: * MSG_OOB process out-of-band data * MSG_DONTROUTE bypass routing, use direct interface - * These flags are _unsupported_ as of ns-3.1. + * These flags are _unsupported_ as of ns-3.1. * * \param p ns3::Packet to send * \param flags Socket control flags @@ -325,7 +325,7 @@ public: * internal buffer and accepted for transmission. */ virtual int SendTo (Ptr p, uint32_t flags, - const Address &toAddress) = 0; + const Address &toAddress) = 0; /** * Return number of bytes which can be returned from one or @@ -346,7 +346,7 @@ public: * * This method is normally used only on a connected socket. * In a typical blocking sockets model, this call would block until - * at least one byte is returned or the connection closes. + * at least one byte is returned or the connection closes. * In ns-3 at this API, the call returns immediately in such a case * and returns 0 if nothing is available to be read. * However, an application can set a callback, ns3::SetRecvCallback, @@ -355,20 +355,20 @@ public: * I/O model for recv(). * * This variant of Recv() uses class ns3::Packet to encapsulate - * data, rather than providing a raw pointer and length field. + * data, rather than providing a raw pointer and length field. * This allows an ns-3 application to attach tags if desired (such * as a flow ID) and may allow the simulator to avoid some data * copies. Despite the appearance of receiving Packets on a stream * socket, just think of it as a fancy byte buffer with streaming - * semantics. + * semantics. * * The semantics depend on the type of socket. For a datagram socket, * each Recv() returns the data from at most one Send(), and order * is not necessarily preserved. For a stream socket, the bytes * are delivered in order, and on-the-wire packet boundaries are - * not preserved. + * not preserved. * - * The flags argument is formed by or'ing one or more of the values: + * The flags argument is formed by or'ing one or more of the values: * MSG_OOB process out-of-band data * MSG_PEEK peek at incoming message * None of these flags are supported for now. @@ -394,8 +394,8 @@ public: * Calls Recv(maxSize, flags) with maxSize * implicitly set to maximum sized integer, and flags set to zero. * - * This method has similar semantics to Recv () but subclasses may - * want to provide checks on socket state, so the implementation is + * This method has similar semantics to Recv () but subclasses may + * want to provide checks on socket state, so the implementation is * pushed to subclasses. * * \param maxSize reader will accept packet up to maxSize @@ -406,8 +406,8 @@ public: * \returns Ptr of the next in-sequence packet. Returns * 0 if the socket cannot return a next in-sequence packet. */ - virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress) = 0; + virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, + Address &fromAddress) = 0; ///////////////////////////////////////////////////////////////////// // The remainder of these public methods are overloaded methods // @@ -429,7 +429,7 @@ public: * \brief Send data (or dummy data) to the remote host * * This method is provided so as to have an API which is closer in - * appearance to that of real network or BSD sockets. + * appearance to that of real network or BSD sockets. * * \param buf A pointer to a raw byte buffer of some data to send. If * this buffer is 0, we send dummy data whose size is specified by the @@ -438,15 +438,15 @@ public: * \param flags Socket control flags */ int Send (const uint8_t* buf, uint32_t size, uint32_t flags); - + /** * \brief Send data to a specified peer. * * This method is provided so as to have an API which is closer in - * appearance to that of real network or BSD sockets. + * appearance to that of real network or BSD sockets. * - * \param buf A pointer to a raw byte buffer of some data to send. + * \param buf A pointer to a raw byte buffer of some data to send. * If this is 0, we send dummy data whose size is specified by the * third parameter * \param size the number of bytes to copy from the buffer @@ -468,13 +468,13 @@ public: * \returns Ptr of the next in-sequence packet. Returns * 0 if the socket cannot return a next in-sequence packet. */ - Ptr Recv (void); + Ptr Recv (void); /** * \brief Recv data (or dummy data) from the remote host * * This method is provided so as to have an API which is closer in - * appearance to that of real network or BSD sockets. + * appearance to that of real network or BSD sockets. * * If the underlying packet was carring null (fake) data, this buffer * will be zeroed up to the length specified by the return value. @@ -506,7 +506,7 @@ public: * address. * * This method is provided so as to have an API which is closer in - * appearance to that of real network or BSD sockets. + * appearance to that of real network or BSD sockets. * * \param buf A pointer to a raw byte buffer to write the data to. * If the underlying packet was carring null (fake) data, this buffer @@ -551,7 +551,7 @@ public: * \brief Returns socket's bound netdevice, if any. * * This method corresponds to using getsockopt() SO_BINDTODEVICE - * of real network or BSD sockets. + * of real network or BSD sockets. * * * \returns Pointer to interface. @@ -630,7 +630,7 @@ public: void SetAddress (Address addr); Address GetAddress (void) const; - static TypeId GetTypeId (void); + static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; virtual uint32_t GetSerializedSize (void) const; virtual void Serialize (TagBuffer i) const; @@ -652,7 +652,7 @@ public: void SetTtl (uint8_t ttl); uint8_t GetTtl (void) const; - static TypeId GetTypeId (void); + static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; virtual uint32_t GetSerializedSize (void) const; virtual void Serialize (TagBuffer i) const; @@ -676,7 +676,7 @@ public: void Disable (void); bool IsEnabled (void) const; - static TypeId GetTypeId (void); + static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; virtual uint32_t GetSerializedSize (void) const; virtual void Serialize (TagBuffer i) const; diff --git a/src/network/model/tag-buffer.cc b/src/network/model/tag-buffer.cc index 8d441e570..baf2af472 100644 --- a/src/network/model/tag-buffer.cc +++ b/src/network/model/tag-buffer.cc @@ -49,7 +49,7 @@ TagBuffer::WriteU32 (uint32_t data) } -uint8_t +uint8_t TagBuffer::ReadU8 (void) { NS_ASSERT (m_current + 1 <= m_end); @@ -169,16 +169,17 @@ TagBuffer::Read (uint8_t *buffer, uint32_t size) TagBuffer::TagBuffer (uint8_t *start, uint8_t *end) : m_current (start), m_end (end) -{} +{ +} -void +void TagBuffer::TrimAtEnd (uint32_t trim) { NS_ASSERT (m_current <= (m_end - trim)); m_end -= trim; } -void +void TagBuffer::CopyFrom (TagBuffer o) { NS_ASSERT (o.m_end >= o.m_current); diff --git a/src/network/model/tag-buffer.h b/src/network/model/tag-buffer.h index 43a488caa..db047ec79 100644 --- a/src/network/model/tag-buffer.h +++ b/src/network/model/tag-buffer.h @@ -139,7 +139,7 @@ public: */ void Read (uint8_t *buffer, uint32_t size); private: - + uint8_t *m_current; uint8_t *m_end; }; @@ -175,7 +175,7 @@ TagBuffer::WriteU32 (uint32_t data) WriteU8 ((data >> 24) & 0xff); } -uint8_t +uint8_t TagBuffer::ReadU8 (void) { NS_ASSERT (m_current + 1 <= m_end); diff --git a/src/network/model/tag.cc b/src/network/model/tag.cc index 01b6a1907..2de97178b 100644 --- a/src/network/model/tag.cc +++ b/src/network/model/tag.cc @@ -28,7 +28,7 @@ Tag::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Tag") .SetParent () - ; + ; return tid; } diff --git a/src/network/model/trailer.cc b/src/network/model/trailer.cc index fbe972945..c508c5028 100644 --- a/src/network/model/trailer.cc +++ b/src/network/model/trailer.cc @@ -5,14 +5,15 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (Trailer); Trailer::~Trailer () -{} +{ +} -TypeId +TypeId Trailer::GetTypeId (void) { static TypeId tid = TypeId ("ns3::Trailer") .SetParent () - ; + ; return tid; } diff --git a/src/network/test/buffer-test.cc b/src/network/test/buffer-test.cc index 655e99d13..cc94cb8b3 100644 --- a/src/network/test/buffer-test.cc +++ b/src/network/test/buffer-test.cc @@ -61,10 +61,10 @@ BufferTest::EnsureWrittenBytes (Buffer b, uint32_t n, uint8_t array[], const cha * available which is the case for gcc. * XXX */ -#define ENSURE_WRITTEN_BYTES(buffer, n, ...) \ - { \ - uint8_t bytes[] = {__VA_ARGS__}; \ - EnsureWrittenBytes (buffer, n, bytes, __FILE__, __LINE__); \ +#define ENSURE_WRITTEN_BYTES(buffer, n, ...) \ + { \ + uint8_t bytes[] = { __VA_ARGS__}; \ + EnsureWrittenBytes (buffer, n, bytes, __FILE__, __LINE__); \ } void diff --git a/src/network/test/drop-tail-queue-test-suite.cc b/src/network/test/drop-tail-queue-test-suite.cc index c626ee53f..14f4cc725 100644 --- a/src/network/test/drop-tail-queue-test-suite.cc +++ b/src/network/test/drop-tail-queue-test-suite.cc @@ -31,14 +31,15 @@ public: DropTailQueueTestCase::DropTailQueueTestCase () : TestCase ("Sanity check on the drop tail queue implementation") -{} -void +{ +} +void DropTailQueueTestCase::DoRun (void) { Ptr queue = CreateObject (); - NS_TEST_EXPECT_MSG_EQ (queue->SetAttributeFailSafe ("MaxPackets", UintegerValue (3)), true, + NS_TEST_EXPECT_MSG_EQ (queue->SetAttributeFailSafe ("MaxPackets", UintegerValue (3)), true, "Verify that we can actually set the attribute"); - + Ptr p1, p2, p3, p4; p1 = Create (); p2 = Create (); diff --git a/src/network/test/packet-metadata-test.cc b/src/network/test/packet-metadata-test.cc index 88c881a66..6acdba0e3 100644 --- a/src/network/test/packet-metadata-test.cc +++ b/src/network/test/packet-metadata-test.cc @@ -47,20 +47,21 @@ HistoryHeaderBase::GetTypeId (void) { static TypeId tid = TypeId ("ns3::HistoryHeaderBase") .SetParent
() - ; + ; return tid; } HistoryHeaderBase::HistoryHeaderBase () : m_ok (true) -{} +{ +} -bool +bool HistoryHeaderBase::IsOk (void) const { return m_ok; } -void +void HistoryHeaderBase::ReportError (void) { m_ok = false; @@ -83,7 +84,8 @@ public: template HistoryHeader::HistoryHeader () : HistoryHeaderBase () -{} +{ +} template TypeId @@ -94,7 +96,7 @@ HistoryHeader::GetTypeId (void) static TypeId tid = TypeId (oss.str ().c_str ()) .SetParent () .AddConstructor > () - ; + ; return tid; } @@ -153,18 +155,19 @@ HistoryTrailerBase::GetTypeId (void) { static TypeId tid = TypeId ("ns3::HistoryTrailerBase") .SetParent () - ; + ; return tid; } HistoryTrailerBase::HistoryTrailerBase () : m_ok (true) -{} -bool +{ +} +bool HistoryTrailerBase::IsOk (void) const { return m_ok; } -void +void HistoryTrailerBase::ReportError (void) { m_ok = false; @@ -189,7 +192,8 @@ private: template HistoryTrailer::HistoryTrailer () -{} +{ +} template TypeId @@ -200,7 +204,7 @@ HistoryTrailer::GetTypeId (void) static TypeId tid = TypeId (oss.str ().c_str ()) .SetParent () .AddConstructor > () - ; + ; return tid; } @@ -260,10 +264,12 @@ private: PacketMetadataTest::PacketMetadataTest () : TestCase ("Packet metadata") -{} +{ +} PacketMetadataTest::~PacketMetadataTest () -{} +{ +} void PacketMetadataTest::CheckHistory (Ptr p, const char *file, int line, uint32_t n, ...) @@ -324,7 +330,7 @@ PacketMetadataTest::CheckHistory (Ptr p, const char *file, int line, uin } for (std::list::iterator i = got.begin (), - j = expected.begin (); + j = expected.begin (); i != got.end (); i++, j++) { NS_ASSERT (j != expected.end ()); @@ -334,7 +340,7 @@ PacketMetadataTest::CheckHistory (Ptr p, const char *file, int line, uin } } return; - error: +error: std::ostringstream failure; failure << "PacketMetadata error. Got:\""; for (std::list::iterator i = got.begin (); @@ -403,7 +409,7 @@ PacketMetadataTest::DoRun (void) ADD_TRAILER (p, 100); CHECK_HISTORY (p, 2, 10, 100); - + p = Create (10); ADD_HEADER (p, 1); ADD_HEADER (p, 2); @@ -598,7 +604,7 @@ PacketMetadataTest::DoRun (void) p = Create (2000); CHECK_HISTORY (p, 1, 2000); - + p = Create (); ADD_TRAILER (p, 10); ADD_HEADER (p, 5); @@ -712,7 +718,7 @@ PacketMetadataTest::DoRun (void) REM_TRAILER (p1, 5); NS_TEST_EXPECT_MSG_EQ (p->GetSize (), 1015, "Correct size"); - + p = Create (1510); ADD_HEADER (p, 8); ADD_HEADER (p, 25); @@ -829,4 +835,4 @@ PacketMetadataTestSuite::PacketMetadataTestSuite () } PacketMetadataTestSuite g_packetMetadataTest; -}//namespace ns3 +} //namespace ns3 diff --git a/src/network/test/packetbb-test-suite.cc b/src/network/test/packetbb-test-suite.cc index e76f1da0c..affd820dc 100644 --- a/src/network/test/packetbb-test-suite.cc +++ b/src/network/test/packetbb-test-suite.cc @@ -33,7 +33,7 @@ class PbbTestCase : public TestCase { public: PbbTestCase (std::string name, Ptr packet, - uint8_t * buffer, uint32_t size); + uint8_t * buffer, uint32_t size); virtual ~PbbTestCase (void); protected: @@ -48,7 +48,7 @@ private: }; PbbTestCase::PbbTestCase (std::string name, Ptr packet, - uint8_t * buffer, uint32_t size) + uint8_t * buffer, uint32_t size) : TestCase (name) { m_refPacket = packet; @@ -66,9 +66,9 @@ void PbbTestCase::DoRun (void) { NS_TEST_ASSERT_MSG_EQ (TestSerialize (), false, - "serialization failed"); + "serialization failed"); NS_TEST_ASSERT_MSG_EQ (TestDeserialize (), false, - "deserialization failed"); + "deserialization failed"); } bool @@ -79,13 +79,13 @@ PbbTestCase::TestSerialize (void) m_refPacket->Serialize (newBuffer.Begin ()); NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (newBuffer.GetSize (), m_refBuffer.GetSize (), - "serialization failed, buffers have different sizes"); + "serialization failed, buffers have different sizes"); int memrv = memcmp (newBuffer.PeekData (), m_refBuffer.PeekData (), - newBuffer.GetSize ()); + newBuffer.GetSize ()); NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (memrv, 0, - "serialization faled, buffers differ"); + "serialization faled, buffers differ"); return GetErrorStatus (); } @@ -97,10 +97,10 @@ PbbTestCase::TestDeserialize (void) uint32_t numbytes = newPacket->Deserialize (m_refBuffer.Begin ()); NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (numbytes, m_refBuffer.GetSize (), - "deserialization failed, did not use all bytes"); + "deserialization failed, did not use all bytes"); NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (*newPacket, *m_refPacket, - "deserialization failed, objects do not match"); + "deserialization failed, objects do not match"); return GetErrorStatus (); } @@ -115,16 +115,16 @@ PbbTestSuite::PbbTestSuite () : TestSuite ("packetbb-test-suite", UNIT) { /* Test 1 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 0 - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 0 + * `------------------ */ { Ptr packet = Create (); - uint8_t buffer[] = {0x00}; + uint8_t buffer[] = { 0x00}; AddTestCase (new PbbTestCase ("1", packet, buffer, sizeof(buffer))); } @@ -140,18 +140,18 @@ PbbTestSuite::PbbTestSuite () { Ptr packet = Create (); packet->SetSequenceNumber (2); - uint8_t buffer[] = {0x08, 0x00, 0x02}; + uint8_t buffer[] = { 0x08, 0x00, 0x02}; AddTestCase (new PbbTestCase ("2", packet, buffer, sizeof(buffer))); } /* Test 3 * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 3 - * `------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 3 + * `------------------ * This test has the phastlv flag set to 1 with no tlvs. * I'll come back to this one later. */ @@ -159,23 +159,23 @@ PbbTestSuite::PbbTestSuite () { Ptr packet = Create (); packet->SetSequenceNumber (3); - uint8_t buffer[] = {0x0c, 0x00, 0x03, 0x00, 0x00}; + uint8_t buffer[] = { 0x0c, 0x00, 0x03, 0x00, 0x00}; AddTestCase (new PbbTestCase ("3", packet, buffer, sizeof(buffer))); } #endif /* Test 4 * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 4 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * `------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 4 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * `------------------ */ { Ptr packet = Create (); @@ -193,20 +193,20 @@ PbbTestSuite::PbbTestSuite () } /* Test 5 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 5 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | | - TLV - * | | Flags = 128 - * | | Type = 2; Type ext. = 100; Value = (warning: parameter is NULL) - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 5 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | | - TLV + * | | Flags = 128 + * | | Type = 2; Type ext. = 100; Value = (warning: parameter is NULL) + * `------------------ */ { Ptr packet = Create (); @@ -230,21 +230,21 @@ PbbTestSuite::PbbTestSuite () } /* Test 6 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 6 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | | - TLV - * | | Flags = 144 - * | | Type = 2; Type ext. = 100; Value = 01 02 03 04 - * | | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 6 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | | - TLV + * | | Flags = 144 + * | | Type = 2; Type ext. = 100; Value = 01 02 03 04 + * | | + * `------------------ */ { Ptr packet = Create (); @@ -258,7 +258,7 @@ PbbTestSuite::PbbTestSuite () tlv2->SetType (2); tlv2->SetTypeExt (100); - uint8_t tlv2val[] = {1, 2, 3, 4}; + uint8_t tlv2val[] = { 1, 2, 3, 4}; tlv2->SetValue(tlv2val, sizeof(tlv2val)); packet->TlvPushBack (tlv2); @@ -273,95 +273,95 @@ PbbTestSuite::PbbTestSuite () } /* Test 7 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 7 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | | - TLV - * | | Flags = 152 - * | | Type = 2; Type ext. = 100; Value = 00 01 02 03 - * | | 04 05 06 07 - * | | 08 09 0a 0b - * | | 0c 0d 0e 0f - * | | 10 11 12 13 - * | | 14 15 16 17 - * | | 18 19 1a 1b - * | | 1c 1d 1e 1f - * | | 20 21 22 23 - * | | 24 25 26 27 - * | | 28 29 2a 2b - * | | 2c 2d 2e 2f - * | | 30 31 32 33 - * | | 34 35 36 37 - * | | 38 39 3a 3b - * | | 3c 3d 3e 3f - * | | 40 41 42 43 - * | | 44 45 46 47 - * | | 48 49 4a 4b - * | | 4c 4d 4e 4f - * | | 50 51 52 53 - * | | 54 55 56 57 - * | | 58 59 5a 5b - * | | 5c 5d 5e 5f - * | | 60 61 62 63 - * | | 64 65 66 67 - * | | 68 69 6a 6b - * | | 6c 6d 6e 6f - * | | 70 71 72 73 - * | | 74 75 76 77 - * | | 78 79 7a 7b - * | | 7c 7d 7e 7f - * | | 80 81 82 83 - * | | 84 85 86 87 - * | | 88 89 8a 8b - * | | 8c 8d 8e 8f - * | | 90 91 92 93 - * | | 94 95 96 97 - * | | 98 99 9a 9b - * | | 9c 9d 9e 9f - * | | a0 a1 a2 a3 - * | | a4 a5 a6 a7 - * | | a8 a9 aa ab - * | | ac ad ae af - * | | b0 b1 b2 b3 - * | | b4 b5 b6 b7 - * | | b8 b9 ba bb - * | | bc bd be bf - * | | c0 c1 c2 c3 - * | | c4 c5 c6 c7 - * | | c8 c9 ca cb - * | | cc cd ce cf - * | | d0 d1 d2 d3 - * | | d4 d5 d6 d7 - * | | d8 d9 da db - * | | dc dd de df - * | | e0 e1 e2 e3 - * | | e4 e5 e6 e7 - * | | e8 e9 ea eb - * | | ec ed ee ef - * | | f0 f1 f2 f3 - * | | f4 f5 f6 f7 - * | | f8 f9 fa fb - * | | fc fd fe 00 - * | | 01 02 03 04 - * | | 05 06 07 08 - * | | 09 0a 0b 0c - * | | 0d 0e 0f 10 - * | | 11 12 13 14 - * | | 15 16 17 18 - * | | 19 1a 1b 1c - * | | 1d 1e 1f 20 - * | | 21 22 23 24 - * | | 25 26 27 28 - * | | 29 2a 2b 2c - * | | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 7 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | | - TLV + * | | Flags = 152 + * | | Type = 2; Type ext. = 100; Value = 00 01 02 03 + * | | 04 05 06 07 + * | | 08 09 0a 0b + * | | 0c 0d 0e 0f + * | | 10 11 12 13 + * | | 14 15 16 17 + * | | 18 19 1a 1b + * | | 1c 1d 1e 1f + * | | 20 21 22 23 + * | | 24 25 26 27 + * | | 28 29 2a 2b + * | | 2c 2d 2e 2f + * | | 30 31 32 33 + * | | 34 35 36 37 + * | | 38 39 3a 3b + * | | 3c 3d 3e 3f + * | | 40 41 42 43 + * | | 44 45 46 47 + * | | 48 49 4a 4b + * | | 4c 4d 4e 4f + * | | 50 51 52 53 + * | | 54 55 56 57 + * | | 58 59 5a 5b + * | | 5c 5d 5e 5f + * | | 60 61 62 63 + * | | 64 65 66 67 + * | | 68 69 6a 6b + * | | 6c 6d 6e 6f + * | | 70 71 72 73 + * | | 74 75 76 77 + * | | 78 79 7a 7b + * | | 7c 7d 7e 7f + * | | 80 81 82 83 + * | | 84 85 86 87 + * | | 88 89 8a 8b + * | | 8c 8d 8e 8f + * | | 90 91 92 93 + * | | 94 95 96 97 + * | | 98 99 9a 9b + * | | 9c 9d 9e 9f + * | | a0 a1 a2 a3 + * | | a4 a5 a6 a7 + * | | a8 a9 aa ab + * | | ac ad ae af + * | | b0 b1 b2 b3 + * | | b4 b5 b6 b7 + * | | b8 b9 ba bb + * | | bc bd be bf + * | | c0 c1 c2 c3 + * | | c4 c5 c6 c7 + * | | c8 c9 ca cb + * | | cc cd ce cf + * | | d0 d1 d2 d3 + * | | d4 d5 d6 d7 + * | | d8 d9 da db + * | | dc dd de df + * | | e0 e1 e2 e3 + * | | e4 e5 e6 e7 + * | | e8 e9 ea eb + * | | ec ed ee ef + * | | f0 f1 f2 f3 + * | | f4 f5 f6 f7 + * | | f8 f9 fa fb + * | | fc fd fe 00 + * | | 01 02 03 04 + * | | 05 06 07 08 + * | | 09 0a 0b 0c + * | | 0d 0e 0f 10 + * | | 11 12 13 14 + * | | 15 16 17 18 + * | | 19 1a 1b 1c + * | | 1d 1e 1f 20 + * | | 21 22 23 24 + * | | 25 26 27 28 + * | | 29 2a 2b 2c + * | | + * `------------------ */ { Ptr packet = Create (); @@ -540,24 +540,24 @@ PbbTestSuite::PbbTestSuite () } /* Test 8 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 8 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 8 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -581,32 +581,32 @@ PbbTestSuite::PbbTestSuite () } /* Test 9 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 9 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 128 - * | | * Originator address: 10.0.0.1 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 9 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 128 + * | | * Originator address: 10.0.0.1 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -637,33 +637,33 @@ PbbTestSuite::PbbTestSuite () } /* Test 10 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 10 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 160 - * | | * Originator address: 10.0.0.1 - * | | * Hop count: 1 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 10 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 160 + * | | * Originator address: 10.0.0.1 + * | | * Hop count: 1 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -695,34 +695,34 @@ PbbTestSuite::PbbTestSuite () } /* Test 11 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 11 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 224 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 11 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 224 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -756,35 +756,35 @@ PbbTestSuite::PbbTestSuite () } /* Test 12 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 12 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 12 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -819,35 +819,35 @@ PbbTestSuite::PbbTestSuite () } /* Test 13 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 13 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 13 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -882,39 +882,39 @@ PbbTestSuite::PbbTestSuite () } /* Test 14 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 14 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 14 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -955,43 +955,43 @@ PbbTestSuite::PbbTestSuite () } /* Test 15 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 15 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (1 addresses) - * | | - 0.0.0.0/32 - * | | - Flags = 0 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 15 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (1 addresses) + * | | - 0.0.0.0/32 + * | | - Flags = 0 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1039,43 +1039,43 @@ PbbTestSuite::PbbTestSuite () } /* Test 16 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 16 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (1 addresses) - * | | - 255.255.255.255/32 - * | | - Flags = 0 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 16 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (1 addresses) + * | | - 255.255.255.255/32 + * | | - Flags = 0 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1123,43 +1123,43 @@ PbbTestSuite::PbbTestSuite () } /* Test 17 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 17 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (1 addresses) - * | | - 0.0.0.1/32 - * | | - Flags = 0 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 17 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (1 addresses) + * | | - 0.0.0.1/32 + * | | - Flags = 0 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1207,43 +1207,43 @@ PbbTestSuite::PbbTestSuite () } /* Test 18 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 18 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (1 addresses) - * | | - 10.0.0.0/32 - * | | - Flags = 0 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 18 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (1 addresses) + * | | - 10.0.0.0/32 + * | | - Flags = 0 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1291,43 +1291,43 @@ PbbTestSuite::PbbTestSuite () } /* Test 19 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 19 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (1 addresses) - * | | - 10.0.0.1/32 - * | | - Flags = 0 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 19 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (1 addresses) + * | | - 10.0.0.1/32 + * | | - Flags = 0 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1375,44 +1375,44 @@ PbbTestSuite::PbbTestSuite () } /* Test 20 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 20 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.1/32 - * | | - 10.0.0.2/32 - * | | - Flags = 128 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 20 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.1/32 + * | | - 10.0.0.2/32 + * | | - Flags = 128 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1461,44 +1461,44 @@ PbbTestSuite::PbbTestSuite () } /* Test 21 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 21 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 21 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1548,49 +1548,49 @@ PbbTestSuite::PbbTestSuite () } /* Test 22 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 22 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (2 addresses) - * | | - 10.0.0.0/32 - * | | - 11.0.0.0/32 - * | | - Flags = 32 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 22 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (2 addresses) + * | | - 10.0.0.0/32 + * | | - 11.0.0.0/32 + * | | - Flags = 32 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1646,51 +1646,51 @@ PbbTestSuite::PbbTestSuite () } /* Test 23 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 23 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10.0.0.0/32 - * | | - 11.0.0.0/32 - * | | - 10.0.0.5/16 - * | | - 10.0.0.6/24 - * | | - Flags = 8 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 23 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10.0.0.0/32 + * | | - 11.0.0.0/32 + * | | - 10.0.0.5/16 + * | | - 10.0.0.6/24 + * | | - Flags = 8 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1759,54 +1759,54 @@ PbbTestSuite::PbbTestSuite () } /* Test 24 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 24 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10.0.0.0/32 - * | | - 11.0.0.0/32 - * | | - 10.0.0.5/16 - * | | - 10.0.0.6/24 - * | | - Flags = 8 - * | | - ADDRESS TLV block (1 TLVs) - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 24 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10.0.0.0/32 + * | | - 11.0.0.0/32 + * | | - 10.0.0.5/16 + * | | - 10.0.0.6/24 + * | | - Flags = 8 + * | | - ADDRESS TLV block (1 TLVs) + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -1879,55 +1879,55 @@ PbbTestSuite::PbbTestSuite () } /* Test 25 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 25 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10.0.0.0/32 - * | | - 11.0.0.0/32 - * | | - 10.0.0.5/16 - * | | - 10.0.0.6/24 - * | | - Flags = 8 - * | | - ADDRESS TLV block (1 TLVs) - * | | - TLV - * | | Flags = 64 - * | | Index-start = 1 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 25 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10.0.0.0/32 + * | | - 11.0.0.0/32 + * | | - 10.0.0.5/16 + * | | - 10.0.0.6/24 + * | | - Flags = 8 + * | | - ADDRESS TLV block (1 TLVs) + * | | - TLV + * | | Flags = 64 + * | | Index-start = 1 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2001,56 +2001,56 @@ PbbTestSuite::PbbTestSuite () } /* Test 26 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 26 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10.0.0.0/32 - * | | - 11.0.0.0/32 - * | | - 10.0.0.5/16 - * | | - 10.0.0.6/24 - * | | - Flags = 8 - * | | - ADDRESS TLV block (1 TLVs) - * | | - TLV - * | | Flags = 32 - * | | Index-start = 1 - * | | Index-stop = 3 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 26 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10.0.0.0/32 + * | | - 11.0.0.0/32 + * | | - 10.0.0.5/16 + * | | - 10.0.0.6/24 + * | | - Flags = 8 + * | | - ADDRESS TLV block (1 TLVs) + * | | - TLV + * | | Flags = 32 + * | | Index-start = 1 + * | | Index-stop = 3 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2126,56 +2126,56 @@ PbbTestSuite::PbbTestSuite () } /* Test 27 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 27 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10.0.0.0/32 - * | | - 11.0.0.0/32 - * | | - 10.0.0.5/16 - * | | - 10.0.0.6/24 - * | | - Flags = 8 - * | | - ADDRESS TLV block (1 TLVs) - * | | - TLV - * | | Flags = 52 - * | | Index-start = 1 - * | | Index-stop = 3 - * | | Type = 1; Value = 01 02 03 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 27 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10.0.0.0/32 + * | | - 11.0.0.0/32 + * | | - 10.0.0.5/16 + * | | - 10.0.0.6/24 + * | | - Flags = 8 + * | | - ADDRESS TLV block (1 TLVs) + * | | - TLV + * | | Flags = 52 + * | | Index-start = 1 + * | | Index-stop = 3 + * | | Type = 1; Value = 01 02 03 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2222,7 +2222,7 @@ PbbTestSuite::PbbTestSuite () msg2a2tlv1->SetIndexStart (1); msg2a2tlv1->SetIndexStop (3); - uint8_t value[] = {1, 2, 3}; + uint8_t value[] = { 1, 2, 3}; msg2a2tlv1->SetValue(value, sizeof (value)); msg2a2tlv1->SetMultivalue (true); @@ -2257,131 +2257,131 @@ PbbTestSuite::PbbTestSuite () } /* Test 28 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 28 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10.0.0.0/32 - * | | - 11.0.0.0/32 - * | | - 10.0.0.5/16 - * | | - 10.0.0.6/24 - * | | - Flags = 8 - * | | - ADDRESS TLV block (1 TLVs) - * | | - TLV - * | | Flags = 56 - * | | Index-start = 1 - * | | Index-stop = 3 - * | | Type = 1; Value = 00 01 02 03 - * | | 04 05 06 07 - * | | 08 09 0a 0b - * | | 0c 0d 0e 0f - * | | 10 11 12 13 - * | | 14 15 16 17 - * | | 18 19 1a 1b - * | | 1c 1d 1e 1f - * | | 20 21 22 23 - * | | 24 25 26 27 - * | | 28 29 2a 2b - * | | 2c 2d 2e 2f - * | | 30 31 32 33 - * | | 34 35 36 37 - * | | 38 39 3a 3b - * | | 3c 3d 3e 3f - * | | 40 41 42 43 - * | | 44 45 46 47 - * | | 48 49 4a 4b - * | | 4c 4d 4e 4f - * | | 50 51 52 53 - * | | 54 55 56 57 - * | | 58 59 5a 5b - * | | 5c 5d 5e 5f - * | | 60 61 62 63 - * | | 64 65 66 67 - * | | 68 69 6a 6b - * | | 6c 6d 6e 6f - * | | 70 71 72 73 - * | | 74 75 76 77 - * | | 78 79 7a 7b - * | | 7c 7d 7e 7f - * | | 80 81 82 83 - * | | 84 85 86 87 - * | | 88 89 8a 8b - * | | 8c 8d 8e 8f - * | | 90 91 92 93 - * | | 94 95 96 97 - * | | 98 99 9a 9b - * | | 9c 9d 9e 9f - * | | a0 a1 a2 a3 - * | | a4 a5 a6 a7 - * | | a8 a9 aa ab - * | | ac ad ae af - * | | b0 b1 b2 b3 - * | | b4 b5 b6 b7 - * | | b8 b9 ba bb - * | | bc bd be bf - * | | c0 c1 c2 c3 - * | | c4 c5 c6 c7 - * | | c8 c9 ca cb - * | | cc cd ce cf - * | | d0 d1 d2 d3 - * | | d4 d5 d6 d7 - * | | d8 d9 da db - * | | dc dd de df - * | | e0 e1 e2 e3 - * | | e4 e5 e6 e7 - * | | e8 e9 ea eb - * | | ec ed ee ef - * | | f0 f1 f2 f3 - * | | f4 f5 f6 f7 - * | | f8 f9 fa fb - * | | fc fd fe 00 - * | | 01 02 03 04 - * | | 05 06 07 08 - * | | 09 0a 0b 0c - * | | 0d 0e 0f 10 - * | | 11 12 13 14 - * | | 15 16 17 18 - * | | 19 1a 1b 1c - * | | 1d 1e 1f 20 - * | | 21 22 23 24 - * | | 25 26 27 28 - * | | 29 2a 2b 2c - * | | - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 28 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10.0.0.0/32 + * | | - 11.0.0.0/32 + * | | - 10.0.0.5/16 + * | | - 10.0.0.6/24 + * | | - Flags = 8 + * | | - ADDRESS TLV block (1 TLVs) + * | | - TLV + * | | Flags = 56 + * | | Index-start = 1 + * | | Index-stop = 3 + * | | Type = 1; Value = 00 01 02 03 + * | | 04 05 06 07 + * | | 08 09 0a 0b + * | | 0c 0d 0e 0f + * | | 10 11 12 13 + * | | 14 15 16 17 + * | | 18 19 1a 1b + * | | 1c 1d 1e 1f + * | | 20 21 22 23 + * | | 24 25 26 27 + * | | 28 29 2a 2b + * | | 2c 2d 2e 2f + * | | 30 31 32 33 + * | | 34 35 36 37 + * | | 38 39 3a 3b + * | | 3c 3d 3e 3f + * | | 40 41 42 43 + * | | 44 45 46 47 + * | | 48 49 4a 4b + * | | 4c 4d 4e 4f + * | | 50 51 52 53 + * | | 54 55 56 57 + * | | 58 59 5a 5b + * | | 5c 5d 5e 5f + * | | 60 61 62 63 + * | | 64 65 66 67 + * | | 68 69 6a 6b + * | | 6c 6d 6e 6f + * | | 70 71 72 73 + * | | 74 75 76 77 + * | | 78 79 7a 7b + * | | 7c 7d 7e 7f + * | | 80 81 82 83 + * | | 84 85 86 87 + * | | 88 89 8a 8b + * | | 8c 8d 8e 8f + * | | 90 91 92 93 + * | | 94 95 96 97 + * | | 98 99 9a 9b + * | | 9c 9d 9e 9f + * | | a0 a1 a2 a3 + * | | a4 a5 a6 a7 + * | | a8 a9 aa ab + * | | ac ad ae af + * | | b0 b1 b2 b3 + * | | b4 b5 b6 b7 + * | | b8 b9 ba bb + * | | bc bd be bf + * | | c0 c1 c2 c3 + * | | c4 c5 c6 c7 + * | | c8 c9 ca cb + * | | cc cd ce cf + * | | d0 d1 d2 d3 + * | | d4 d5 d6 d7 + * | | d8 d9 da db + * | | dc dd de df + * | | e0 e1 e2 e3 + * | | e4 e5 e6 e7 + * | | e8 e9 ea eb + * | | ec ed ee ef + * | | f0 f1 f2 f3 + * | | f4 f5 f6 f7 + * | | f8 f9 fa fb + * | | fc fd fe 00 + * | | 01 02 03 04 + * | | 05 06 07 08 + * | | 09 0a 0b 0c + * | | 0d 0e 0f 10 + * | | 11 12 13 14 + * | | 15 16 17 18 + * | | 19 1a 1b 1c + * | | 1d 1e 1f 20 + * | | 21 22 23 24 + * | | 25 26 27 28 + * | | 29 2a 2b 2c + * | | + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2612,19 +2612,19 @@ PbbTestSuite::PbbTestSuite () } /* Test 29 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 0 - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 1 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 0 + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 1 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2642,20 +2642,20 @@ PbbTestSuite::PbbTestSuite () } /* Test 30 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 0 - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 129 - * | | * Originator address: abcd::1 - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 0 + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 129 + * | | * Originator address: abcd::1 + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2678,24 +2678,24 @@ PbbTestSuite::PbbTestSuite () } /* Test 31 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 0 - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 129 - * | | * Originator address: abcd::1 - * | | - Address block (1 addresses) - * | | - 10::1/128 - * | | - Flags = 0 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 0 + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 129 + * | | * Originator address: abcd::1 + * | | - Address block (1 addresses) + * | | - 10::1/128 + * | | - Flags = 0 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2727,25 +2727,25 @@ PbbTestSuite::PbbTestSuite () } /* Test 32 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 0 - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 129 - * | | * Originator address: abcd::1 - * | | - Address block (2 addresses) - * | | - 10::1/128 - * | | - 10::2/128 - * | | - Flags = 128 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 0 + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 129 + * | | * Originator address: abcd::1 + * | | - Address block (2 addresses) + * | | - 10::1/128 + * | | - 10::2/128 + * | | - Flags = 128 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2779,25 +2779,25 @@ PbbTestSuite::PbbTestSuite () } /* Test 33 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 0 - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 129 - * | | * Originator address: abcd::1 - * | | - Address block (2 addresses) - * | | - 10::2/128 - * | | - 10::11:2/128 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 0 + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 129 + * | | * Originator address: abcd::1 + * | | - Address block (2 addresses) + * | | - 10::2/128 + * | | - 10::11:2/128 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2831,30 +2831,30 @@ PbbTestSuite::PbbTestSuite () } /* Test 34 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 0 - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 129 - * | | * Originator address: abcd::1 - * | | - Address block (2 addresses) - * | | - 10::2/128 - * | | - 10::11:2/128 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (2 addresses) - * | | - 10::/128 - * | | - 11::/128 - * | | - Flags = 160 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 0 + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 129 + * | | * Originator address: abcd::1 + * | | - Address block (2 addresses) + * | | - 10::2/128 + * | | - 10::11:2/128 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (2 addresses) + * | | - 10::/128 + * | | - 11::/128 + * | | - Flags = 160 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2895,32 +2895,32 @@ PbbTestSuite::PbbTestSuite () } /* Test 35 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 0 - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 129 - * | | * Originator address: abcd::1 - * | | - Address block (2 addresses) - * | | - 10::2/128 - * | | - 10::11:2/128 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10::/128 - * | | - 11::/128 - * | | - 10::5/64 - * | | - 10::6/48 - * | | - Flags = 136 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 0 + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 129 + * | | * Originator address: abcd::1 + * | | - Address block (2 addresses) + * | | - 10::2/128 + * | | - 10::11:2/128 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10::/128 + * | | - 11::/128 + * | | - 10::5/64 + * | | - 10::6/48 + * | | - Flags = 136 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -2982,151 +2982,151 @@ PbbTestSuite::PbbTestSuite () } /* Test 36 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 29 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10.0.0.0/32 - * | | - 11.0.0.0/32 - * | | - 10.0.0.5/16 - * | | - 10.0.0.6/24 - * | | - Flags = 8 - * | | - ADDRESS TLV block (1 TLVs) - * | | - TLV - * | | Flags = 56 - * | | Index-start = 1 - * | | Index-stop = 3 - * | | Type = 1; Value = 00 01 02 03 - * | | 04 05 06 07 - * | | 08 09 0a 0b - * | | 0c 0d 0e 0f - * | | 10 11 12 13 - * | | 14 15 16 17 - * | | 18 19 1a 1b - * | | 1c 1d 1e 1f - * | | 20 21 22 23 - * | | 24 25 26 27 - * | | 28 29 2a 2b - * | | 2c 2d 2e 2f - * | | 30 31 32 33 - * | | 34 35 36 37 - * | | 38 39 3a 3b - * | | 3c 3d 3e 3f - * | | 40 41 42 43 - * | | 44 45 46 47 - * | | 48 49 4a 4b - * | | 4c 4d 4e 4f - * | | 50 51 52 53 - * | | 54 55 56 57 - * | | 58 59 5a 5b - * | | 5c 5d 5e 5f - * | | 60 61 62 63 - * | | 64 65 66 67 - * | | 68 69 6a 6b - * | | 6c 6d 6e 6f - * | | 70 71 72 73 - * | | 74 75 76 77 - * | | 78 79 7a 7b - * | | 7c 7d 7e 7f - * | | 80 81 82 83 - * | | 84 85 86 87 - * | | 88 89 8a 8b - * | | 8c 8d 8e 8f - * | | 90 91 92 93 - * | | 94 95 96 97 - * | | 98 99 9a 9b - * | | 9c 9d 9e 9f - * | | a0 a1 a2 a3 - * | | a4 a5 a6 a7 - * | | a8 a9 aa ab - * | | ac ad ae af - * | | b0 b1 b2 b3 - * | | b4 b5 b6 b7 - * | | b8 b9 ba bb - * | | bc bd be bf - * | | c0 c1 c2 c3 - * | | c4 c5 c6 c7 - * | | c8 c9 ca cb - * | | cc cd ce cf - * | | d0 d1 d2 d3 - * | | d4 d5 d6 d7 - * | | d8 d9 da db - * | | dc dd de df - * | | e0 e1 e2 e3 - * | | e4 e5 e6 e7 - * | | e8 e9 ea eb - * | | ec ed ee ef - * | | f0 f1 f2 f3 - * | | f4 f5 f6 f7 - * | | f8 f9 fa fb - * | | fc fd fe 00 - * | | 01 02 03 04 - * | | 05 06 07 08 - * | | 09 0a 0b 0c - * | | 0d 0e 0f 10 - * | | 11 12 13 14 - * | | 15 16 17 18 - * | | 19 1a 1b 1c - * | | 1d 1e 1f 20 - * | | 21 22 23 24 - * | | 25 26 27 28 - * | | 29 2a 2b 2c - * | | - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 129 - * | | * Originator address: abcd::1 - * | | - Address block (2 addresses) - * | | - 10::2/128 - * | | - 10::11:2/128 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10::/128 - * | | - 11::/128 - * | | - 10::5/64 - * | | - 10::6/48 - * | | - Flags = 136 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 29 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10.0.0.0/32 + * | | - 11.0.0.0/32 + * | | - 10.0.0.5/16 + * | | - 10.0.0.6/24 + * | | - Flags = 8 + * | | - ADDRESS TLV block (1 TLVs) + * | | - TLV + * | | Flags = 56 + * | | Index-start = 1 + * | | Index-stop = 3 + * | | Type = 1; Value = 00 01 02 03 + * | | 04 05 06 07 + * | | 08 09 0a 0b + * | | 0c 0d 0e 0f + * | | 10 11 12 13 + * | | 14 15 16 17 + * | | 18 19 1a 1b + * | | 1c 1d 1e 1f + * | | 20 21 22 23 + * | | 24 25 26 27 + * | | 28 29 2a 2b + * | | 2c 2d 2e 2f + * | | 30 31 32 33 + * | | 34 35 36 37 + * | | 38 39 3a 3b + * | | 3c 3d 3e 3f + * | | 40 41 42 43 + * | | 44 45 46 47 + * | | 48 49 4a 4b + * | | 4c 4d 4e 4f + * | | 50 51 52 53 + * | | 54 55 56 57 + * | | 58 59 5a 5b + * | | 5c 5d 5e 5f + * | | 60 61 62 63 + * | | 64 65 66 67 + * | | 68 69 6a 6b + * | | 6c 6d 6e 6f + * | | 70 71 72 73 + * | | 74 75 76 77 + * | | 78 79 7a 7b + * | | 7c 7d 7e 7f + * | | 80 81 82 83 + * | | 84 85 86 87 + * | | 88 89 8a 8b + * | | 8c 8d 8e 8f + * | | 90 91 92 93 + * | | 94 95 96 97 + * | | 98 99 9a 9b + * | | 9c 9d 9e 9f + * | | a0 a1 a2 a3 + * | | a4 a5 a6 a7 + * | | a8 a9 aa ab + * | | ac ad ae af + * | | b0 b1 b2 b3 + * | | b4 b5 b6 b7 + * | | b8 b9 ba bb + * | | bc bd be bf + * | | c0 c1 c2 c3 + * | | c4 c5 c6 c7 + * | | c8 c9 ca cb + * | | cc cd ce cf + * | | d0 d1 d2 d3 + * | | d4 d5 d6 d7 + * | | d8 d9 da db + * | | dc dd de df + * | | e0 e1 e2 e3 + * | | e4 e5 e6 e7 + * | | e8 e9 ea eb + * | | ec ed ee ef + * | | f0 f1 f2 f3 + * | | f4 f5 f6 f7 + * | | f8 f9 fa fb + * | | fc fd fe 00 + * | | 01 02 03 04 + * | | 05 06 07 08 + * | | 09 0a 0b 0c + * | | 0d 0e 0f 10 + * | | 11 12 13 14 + * | | 15 16 17 18 + * | | 19 1a 1b 1c + * | | 1d 1e 1f 20 + * | | 21 22 23 24 + * | | 25 26 27 28 + * | | 29 2a 2b 2c + * | | + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 129 + * | | * Originator address: abcd::1 + * | | - Address block (2 addresses) + * | | - 10::2/128 + * | | - 10::11:2/128 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10::/128 + * | | - 11::/128 + * | | - 10::5/64 + * | | - 10::6/48 + * | | - Flags = 136 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); @@ -3404,151 +3404,151 @@ PbbTestSuite::PbbTestSuite () } /* Test 37 - * ,------------------ - * | PACKET - * |------------------ - * | * Packet version: 0 - * | * Packet flags: 12 - * | * Packet seq number: 30 - * | | * Packet TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 0 - * | | * Message TLV Block - * | | - TLV - * | | Flags = 0 - * | | Type = 1; Value = (warning: parameter is NULL) - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 2 - * | | * Message flags: 240 - * | | * Originator address: 10.0.0.1 - * | | * Hop limit: 255 - * | | * Hop count: 1 - * | | * Message seq number: 12345 - * | | - Address block (2 addresses) - * | | - 10.0.0.2/32 - * | | - 10.1.1.2/32 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10.0.0.0/32 - * | | - 11.0.0.0/32 - * | | - 10.0.0.5/16 - * | | - 10.0.0.6/24 - * | | - Flags = 8 - * | | - ADDRESS TLV block (1 TLVs) - * | | - TLV - * | | Flags = 56 - * | | Index-start = 1 - * | | Index-stop = 3 - * | | Type = 1; Value = 00 01 02 03 - * | | 04 05 06 07 - * | | 08 09 0a 0b - * | | 0c 0d 0e 0f - * | | 10 11 12 13 - * | | 14 15 16 17 - * | | 18 19 1a 1b - * | | 1c 1d 1e 1f - * | | 20 21 22 23 - * | | 24 25 26 27 - * | | 28 29 2a 2b - * | | 2c 2d 2e 2f - * | | 30 31 32 33 - * | | 34 35 36 37 - * | | 38 39 3a 3b - * | | 3c 3d 3e 3f - * | | 40 41 42 43 - * | | 44 45 46 47 - * | | 48 49 4a 4b - * | | 4c 4d 4e 4f - * | | 50 51 52 53 - * | | 54 55 56 57 - * | | 58 59 5a 5b - * | | 5c 5d 5e 5f - * | | 60 61 62 63 - * | | 64 65 66 67 - * | | 68 69 6a 6b - * | | 6c 6d 6e 6f - * | | 70 71 72 73 - * | | 74 75 76 77 - * | | 78 79 7a 7b - * | | 7c 7d 7e 7f - * | | 80 81 82 83 - * | | 84 85 86 87 - * | | 88 89 8a 8b - * | | 8c 8d 8e 8f - * | | 90 91 92 93 - * | | 94 95 96 97 - * | | 98 99 9a 9b - * | | 9c 9d 9e 9f - * | | a0 a1 a2 a3 - * | | a4 a5 a6 a7 - * | | a8 a9 aa ab - * | | ac ad ae af - * | | b0 b1 b2 b3 - * | | b4 b5 b6 b7 - * | | b8 b9 ba bb - * | | bc bd be bf - * | | c0 c1 c2 c3 - * | | c4 c5 c6 c7 - * | | c8 c9 ca cb - * | | cc cd ce cf - * | | d0 d1 d2 d3 - * | | d4 d5 d6 d7 - * | | d8 d9 da db - * | | dc dd de df - * | | e0 e1 e2 e3 - * | | e4 e5 e6 e7 - * | | e8 e9 ea eb - * | | ec ed ee ef - * | | f0 f1 f2 f3 - * | | f4 f5 f6 f7 - * | | f8 f9 fa fb - * | | fc fd fe 00 - * | | 01 02 03 04 - * | | 05 06 07 08 - * | | 09 0a 0b 0c - * | | 0d 0e 0f 10 - * | | 11 12 13 14 - * | | 15 16 17 18 - * | | 19 1a 1b 1c - * | | 1d 1e 1f 20 - * | | 21 22 23 24 - * | | 25 26 27 28 - * | | 29 2a 2b 2c - * | | - * | `------------------- - * | - * | ,------------------- - * | | MESSAGE - * | |------------------- - * | | * Message type: 1 - * | | * Message flags: 129 - * | | * Originator address: abcd::1 - * | | - Address block (2 addresses) - * | | - 10::2/128 - * | | - 10::11:2/128 - * | | - Flags = 192 - * | | - ADDRESS TLV block (0 TLVs) - * | | - Address block (4 addresses) - * | | - 10::/128 - * | | - 11::/128 - * | | - 10::5/64 - * | | - 10::6/48 - * | | - Flags = 136 - * | | - ADDRESS TLV block (0 TLVs) - * | `------------------- - * | - * `------------------ + * ,------------------ + * | PACKET + * |------------------ + * | * Packet version: 0 + * | * Packet flags: 12 + * | * Packet seq number: 30 + * | | * Packet TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 0 + * | | * Message TLV Block + * | | - TLV + * | | Flags = 0 + * | | Type = 1; Value = (warning: parameter is NULL) + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 2 + * | | * Message flags: 240 + * | | * Originator address: 10.0.0.1 + * | | * Hop limit: 255 + * | | * Hop count: 1 + * | | * Message seq number: 12345 + * | | - Address block (2 addresses) + * | | - 10.0.0.2/32 + * | | - 10.1.1.2/32 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10.0.0.0/32 + * | | - 11.0.0.0/32 + * | | - 10.0.0.5/16 + * | | - 10.0.0.6/24 + * | | - Flags = 8 + * | | - ADDRESS TLV block (1 TLVs) + * | | - TLV + * | | Flags = 56 + * | | Index-start = 1 + * | | Index-stop = 3 + * | | Type = 1; Value = 00 01 02 03 + * | | 04 05 06 07 + * | | 08 09 0a 0b + * | | 0c 0d 0e 0f + * | | 10 11 12 13 + * | | 14 15 16 17 + * | | 18 19 1a 1b + * | | 1c 1d 1e 1f + * | | 20 21 22 23 + * | | 24 25 26 27 + * | | 28 29 2a 2b + * | | 2c 2d 2e 2f + * | | 30 31 32 33 + * | | 34 35 36 37 + * | | 38 39 3a 3b + * | | 3c 3d 3e 3f + * | | 40 41 42 43 + * | | 44 45 46 47 + * | | 48 49 4a 4b + * | | 4c 4d 4e 4f + * | | 50 51 52 53 + * | | 54 55 56 57 + * | | 58 59 5a 5b + * | | 5c 5d 5e 5f + * | | 60 61 62 63 + * | | 64 65 66 67 + * | | 68 69 6a 6b + * | | 6c 6d 6e 6f + * | | 70 71 72 73 + * | | 74 75 76 77 + * | | 78 79 7a 7b + * | | 7c 7d 7e 7f + * | | 80 81 82 83 + * | | 84 85 86 87 + * | | 88 89 8a 8b + * | | 8c 8d 8e 8f + * | | 90 91 92 93 + * | | 94 95 96 97 + * | | 98 99 9a 9b + * | | 9c 9d 9e 9f + * | | a0 a1 a2 a3 + * | | a4 a5 a6 a7 + * | | a8 a9 aa ab + * | | ac ad ae af + * | | b0 b1 b2 b3 + * | | b4 b5 b6 b7 + * | | b8 b9 ba bb + * | | bc bd be bf + * | | c0 c1 c2 c3 + * | | c4 c5 c6 c7 + * | | c8 c9 ca cb + * | | cc cd ce cf + * | | d0 d1 d2 d3 + * | | d4 d5 d6 d7 + * | | d8 d9 da db + * | | dc dd de df + * | | e0 e1 e2 e3 + * | | e4 e5 e6 e7 + * | | e8 e9 ea eb + * | | ec ed ee ef + * | | f0 f1 f2 f3 + * | | f4 f5 f6 f7 + * | | f8 f9 fa fb + * | | fc fd fe 00 + * | | 01 02 03 04 + * | | 05 06 07 08 + * | | 09 0a 0b 0c + * | | 0d 0e 0f 10 + * | | 11 12 13 14 + * | | 15 16 17 18 + * | | 19 1a 1b 1c + * | | 1d 1e 1f 20 + * | | 21 22 23 24 + * | | 25 26 27 28 + * | | 29 2a 2b 2c + * | | + * | `------------------- + * | + * | ,------------------- + * | | MESSAGE + * | |------------------- + * | | * Message type: 1 + * | | * Message flags: 129 + * | | * Originator address: abcd::1 + * | | - Address block (2 addresses) + * | | - 10::2/128 + * | | - 10::11:2/128 + * | | - Flags = 192 + * | | - ADDRESS TLV block (0 TLVs) + * | | - Address block (4 addresses) + * | | - 10::/128 + * | | - 11::/128 + * | | - 10::5/64 + * | | - 10::6/48 + * | | - Flags = 136 + * | | - ADDRESS TLV block (0 TLVs) + * | `------------------- + * | + * `------------------ */ { Ptr packet = Create (); diff --git a/src/network/test/pcap-file-test-suite.cc b/src/network/test/pcap-file-test-suite.cc index b483cc6b4..c90ba904f 100644 --- a/src/network/test/pcap-file-test-suite.cc +++ b/src/network/test/pcap-file-test-suite.cc @@ -51,7 +51,7 @@ CheckFileExists (std::string filename) { return false; } - + fclose (p); return true; } @@ -65,7 +65,7 @@ CheckFileLength (std::string filename, uint64_t sizeExpected) { return false; } - + fseek (p, 0, SEEK_END); uint64_t sizeActual = ftell (p); @@ -451,7 +451,7 @@ FileHeaderTestCase::DoRun (void) f.Open (m_testFilename, std::ios::out); NS_TEST_ASSERT_MSG_EQ (f.Fail (), false, "Open (" << m_testFilename << ", \"std::ios::out\") returns error"); - + // // Initialize the pcap file header. // @@ -553,7 +553,7 @@ FileHeaderTestCase::DoRun (void) NS_TEST_ASSERT_MSG_EQ (f.GetSnapLen (), 5678, "Read back snap len incorrectly"); NS_TEST_ASSERT_MSG_EQ (f.GetDataLinkType (), 1234, "Read back data link type incorrectly"); f.Close (); - + // // Re-open the file to erase its contents. // @@ -595,7 +595,7 @@ FileHeaderTestCase::DoRun (void) result = fread (&val32, sizeof(val32), 1, p); NS_TEST_ASSERT_MSG_EQ (result, 1, "Unable to fread() time zone correction"); NS_TEST_ASSERT_MSG_EQ (val32, Swap(uint32_t (7)), "Version minor written incorrectly"); - + result = fread (&val32, sizeof(val32), 1, p); NS_TEST_ASSERT_MSG_EQ (result, 1, "Unable to fread() sig figs"); NS_TEST_ASSERT_MSG_EQ (val32, 0, "Sig figs written incorrectly"); @@ -631,7 +631,7 @@ FileHeaderTestCase::DoRun (void) NS_TEST_ASSERT_MSG_EQ (f.GetSigFigs (), 0, "Read back sig figs incorrectly"); NS_TEST_ASSERT_MSG_EQ (f.GetSnapLen (), 5678, "Read back snap len incorrectly"); NS_TEST_ASSERT_MSG_EQ (f.GetDataLinkType (), 1234, "Read back data link type incorrectly"); - + f.Close (); } @@ -986,18 +986,18 @@ typedef struct PACKET_ENTRY { } PacketEntry; PacketEntry knownPackets[] = { - {2, 3696, 46, 46, {0x0001, 0x0800, 0x0604, 0x0001, 0x0000, 0x0000, 0x0003, 0x0a01, - 0x0201, 0xffff, 0xffff, 0xffff, 0x0a01, 0x0204, 0x0000, 0x0000}}, - {2, 3707, 46, 46, {0x0001, 0x0800, 0x0604, 0x0002, 0x0000, 0x0000, 0x0006, 0x0a01, - 0x0204, 0x0000, 0x0000, 0x0003, 0x0a01, 0x0201, 0x0000, 0x0000}}, - {2, 3801, 1070, 1070, {0x4500, 0x041c, 0x0000, 0x0000, 0x3f11, 0x0000, 0x0a01, 0x0101, - 0x0a01, 0x0204, 0xc001, 0x0009, 0x0408, 0x0000, 0x0000, 0x0000}}, - {2, 3811, 46, 46, {0x0001, 0x0800, 0x0604, 0x0001, 0x0000, 0x0000, 0x0006, 0x0a01, - 0x0204, 0xffff, 0xffff, 0xffff, 0x0a01, 0x0201, 0x0000, 0x0000}}, - {2, 3822, 46, 46, {0x0001, 0x0800, 0x0604, 0x0002, 0x0000, 0x0000, 0x0003, 0x0a01, - 0x0201, 0x0000, 0x0000, 0x0006, 0x0a01, 0x0204, 0x0000, 0x0000}}, - {2, 3915, 1070, 1070, {0x4500, 0x041c, 0x0000, 0x0000, 0x4011, 0x0000, 0x0a01, 0x0204, - 0x0a01, 0x0101, 0x0009, 0xc001, 0x0408, 0x0000, 0x0000, 0x0000}} + { 2, 3696, 46, 46, { 0x0001, 0x0800, 0x0604, 0x0001, 0x0000, 0x0000, 0x0003, 0x0a01, + 0x0201, 0xffff, 0xffff, 0xffff, 0x0a01, 0x0204, 0x0000, 0x0000}}, + { 2, 3707, 46, 46, { 0x0001, 0x0800, 0x0604, 0x0002, 0x0000, 0x0000, 0x0006, 0x0a01, + 0x0204, 0x0000, 0x0000, 0x0003, 0x0a01, 0x0201, 0x0000, 0x0000}}, + { 2, 3801, 1070, 1070, { 0x4500, 0x041c, 0x0000, 0x0000, 0x3f11, 0x0000, 0x0a01, 0x0101, + 0x0a01, 0x0204, 0xc001, 0x0009, 0x0408, 0x0000, 0x0000, 0x0000}}, + { 2, 3811, 46, 46, { 0x0001, 0x0800, 0x0604, 0x0001, 0x0000, 0x0000, 0x0006, 0x0a01, + 0x0204, 0xffff, 0xffff, 0xffff, 0x0a01, 0x0201, 0x0000, 0x0000}}, + { 2, 3822, 46, 46, { 0x0001, 0x0800, 0x0604, 0x0002, 0x0000, 0x0000, 0x0003, 0x0a01, + 0x0201, 0x0000, 0x0000, 0x0006, 0x0a01, 0x0204, 0x0000, 0x0000}}, + { 2, 3915, 1070, 1070, { 0x4500, 0x041c, 0x0000, 0x0000, 0x4011, 0x0000, 0x0a01, 0x0204, + 0x0a01, 0x0101, 0x0009, 0xc001, 0x0408, 0x0000, 0x0000, 0x0000}} }; @@ -1080,16 +1080,16 @@ DiffTestCase::DoRun (void) // std::string filename2 = "different.pcap"; PcapFile f; - + f.Open (filename2, std::ios::out); NS_TEST_ASSERT_MSG_EQ (f.Fail (), false, "Open (" << filename2 << ", \"std::ios::out\") returns error"); f.Init (1, N_PACKET_BYTES); NS_TEST_ASSERT_MSG_EQ (f.Fail (), false, "Init (1, " << N_PACKET_BYTES << ") returns error"); - + for (uint32_t i = 0; i < N_KNOWN_PACKETS; ++i) { PacketEntry const & p = knownPackets[i]; - + f.Write (p.tsSec, p.tsUsec, (uint8_t const *)p.data, p.origLen); NS_TEST_EXPECT_MSG_EQ (f.Fail (), false, "Write must not fail"); } diff --git a/src/network/test/sequence-number-test-suite.cc b/src/network/test/sequence-number-test-suite.cc index 7037b0fdf..601c1c9e5 100644 --- a/src/network/test/sequence-number-test-suite.cc +++ b/src/network/test/sequence-number-test-suite.cc @@ -37,7 +37,7 @@ public: { m_testTracedSequenceNumber = SequenceNumber32 (0); } - + static TypeId GetTypeId (void) { static TypeId tid = TypeId("ns3::SequenceNumberTestObj") @@ -46,10 +46,10 @@ public: "A traceable sequence number", MakeTraceSourceAccessor (&SequenceNumberTestObj::m_testTracedSequenceNumber)) .AddConstructor () - ; + ; return tid; } - + TypeId GetInstanceTypeId (void) const { return GetTypeId (); @@ -59,7 +59,7 @@ public: { m_testTracedSequenceNumber += 1; } - + }; @@ -85,10 +85,11 @@ SequenceNumberTestCase::SequenceNumberTestCase () } SequenceNumberTestCase::~SequenceNumberTestCase () -{} +{ +} void -SequenceNumberTestCase::SequenceNumberTracer (SequenceNumber32 oldval, SequenceNumber32 newval) +SequenceNumberTestCase::SequenceNumberTracer (SequenceNumber32 oldval, SequenceNumber32 newval) { m_oldval = oldval; m_newval = newval; @@ -100,55 +101,55 @@ void SequenceNumberTestCase::DoRun (void) #define NS_TEST_ASSERT(a) NS_TEST_ASSERT_MSG_EQ(bool(a), true, "foo") { - SequenceNumber32 num1 (3), num2 (5); - uint32_t value; + SequenceNumber32 num1 (3), num2 (5); + uint32_t value; - value = (num1 + num2).GetValue (); - NS_TEST_ASSERT_EQUAL (value, 8); + value = (num1 + num2).GetValue (); + NS_TEST_ASSERT_EQUAL (value, 8); - num1 += num2.GetValue (); - NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (8)); - - ++num1; - NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (9)); + num1 += num2.GetValue (); + NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (8)); - --num1; - NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (8)); + ++num1; + NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (9)); - num1++; - NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (9)); + --num1; + NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (8)); + + num1++; + NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (9)); + + num1--; + NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (8)); - num1--; - NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (8)); - } { - SequenceNumber16 num1 (60900), num2 (5), num3 (10000); + SequenceNumber16 num1 (60900), num2 (5), num3 (10000); - NS_TEST_ASSERT (num1 == num1); + NS_TEST_ASSERT (num1 == num1); - NS_TEST_ASSERT (num2 != num1); + NS_TEST_ASSERT (num2 != num1); - NS_TEST_ASSERT (num3 > num2); - NS_TEST_ASSERT (num3 >= num2); - NS_TEST_ASSERT (num1 < num3); - NS_TEST_ASSERT (num1 <= num3); + NS_TEST_ASSERT (num3 > num2); + NS_TEST_ASSERT (num3 >= num2); + NS_TEST_ASSERT (num1 < num3); + NS_TEST_ASSERT (num1 <= num3); - NS_TEST_ASSERT (num1 < num2); - NS_TEST_ASSERT (num1 <= num2); - NS_TEST_ASSERT (num2 > num1); - NS_TEST_ASSERT (num2 >= num1); + NS_TEST_ASSERT (num1 < num2); + NS_TEST_ASSERT (num1 <= num2); + NS_TEST_ASSERT (num2 > num1); + NS_TEST_ASSERT (num2 >= num1); - NS_TEST_ASSERT (num1+num2 > num1); - NS_TEST_ASSERT (num1+num2 >= num1); - NS_TEST_ASSERT (num1 < num1+num2); - NS_TEST_ASSERT (num1 <= num1+num2); + NS_TEST_ASSERT (num1+num2 > num1); + NS_TEST_ASSERT (num1+num2 >= num1); + NS_TEST_ASSERT (num1 < num1+num2); + NS_TEST_ASSERT (num1 <= num1+num2); - NS_TEST_ASSERT (num1 < num1+num3); - NS_TEST_ASSERT (num1 <= num1+num3); - NS_TEST_ASSERT (num1+num3 > num1); - NS_TEST_ASSERT (num1+num3 >= num1); + NS_TEST_ASSERT (num1 < num1+num3); + NS_TEST_ASSERT (num1 <= num1+num3); + NS_TEST_ASSERT (num1+num3 > num1); + NS_TEST_ASSERT (num1+num3 >= num1); } { @@ -157,14 +158,14 @@ void SequenceNumberTestCase::DoRun (void) NS_TEST_ASSERT_EQUAL (SequenceNumber16 (1000) - SequenceNumber16 (6000), -5000); NS_TEST_ASSERT_EQUAL ((SequenceNumber16 (60000) + SequenceNumber16 (1000)) - SequenceNumber16 (65000), -4000); } - + { SequenceNumber32 num1 (3); - + NS_TEST_ASSERT_EQUAL (num1 + 10, SequenceNumber32 (13)); num1 += -1; NS_TEST_ASSERT_EQUAL (num1, SequenceNumber32 (2)); - + NS_TEST_ASSERT_EQUAL (num1 - (num1 - 100), 100); } @@ -176,7 +177,7 @@ void SequenceNumberTestCase::DoRun (void) NS_TEST_ASSERT_EQUAL (m_newval, SequenceNumber32 (1)); obj->Dispose (); } - + } static class SequenceNumberTestSuite : public TestSuite diff --git a/src/network/utils/address-utils.h b/src/network/utils/address-utils.h index e26c5f630..ac136b548 100644 --- a/src/network/utils/address-utils.h +++ b/src/network/utils/address-utils.h @@ -44,7 +44,7 @@ namespace addressUtils { * \brief Address family-independent test for a multicast address */ bool IsMulticast (const Address &ad); -}; +}; }; diff --git a/src/network/utils/data-rate.cc b/src/network/utils/data-rate.cc index 95e845f05..a793292b0 100644 --- a/src/network/utils/data-rate.cc +++ b/src/network/utils/data-rate.cc @@ -28,148 +28,148 @@ DoParse (const std::string s, uint64_t *v) { std::string::size_type n = s.find_first_not_of("0123456789."); if (n != std::string::npos) - { // Found non-numeric - std::istringstream iss; - iss.str (s.substr(0, n)); - double r; - iss >> r; - std::string trailer = s.substr(n, std::string::npos); - if (trailer == "bps") - { - // bit/s - *v = (uint64_t)r; - } - else if (trailer == "b/s") - { - // bit/s - *v = (uint64_t)r; - } - else if (trailer == "Bps") - { - // byte/s - *v = (uint64_t)(r * 8); - } - else if (trailer == "B/s") - { - // byte/s - *v = (uint64_t)(r * 8); - } - else if (trailer == "kbps") - { - // kilobits/s - *v = (uint64_t)(r * 1000); - } - else if (trailer == "kb/s") - { - // kilobits/s - *v = (uint64_t)(r * 1000); - } - else if (trailer == "Kbps") - { - // kilobits/s - *v = (uint64_t)(r * 1000); - } - else if (trailer == "Kb/s") - { - // kilobits/s - *v = (uint64_t)(r * 1000); - } - else if (trailer == "kBps") - { - // kiloByte/s - *v = (uint64_t)(r * 8000); - } - else if (trailer == "kB/s") - { - // KiloByte/s - *v = (uint64_t)(r * 8000); - } - else if (trailer == "KBps") - { - // kiloByte/s - *v = (uint64_t)(r * 8000); - } - else if (trailer == "KB/s") - { - // KiloByte/s - *v = (uint64_t)(r * 8000); - } - else if (trailer == "Kib/s") - { - // kibibit/s - *v = (uint64_t)(r * 1024); - } - else if (trailer == "KiB/s") - { - // kibibyte/s - *v = (uint64_t)(r * 8192); - } - else if (trailer == "Mbps") - { - // MegaBits/s - *v = (uint64_t)(r * 1000000); - } - else if (trailer == "Mb/s") - { - // MegaBits/s - *v = (uint64_t)(r * 1000000); - } - else if (trailer == "MBps") - { - // MegaBytes/s - *v = (uint64_t)(r * 8000000); - } - else if (trailer == "MB/s") - { - // MegaBytes/s - *v = (uint64_t)(r * 8000000); - } - else if (trailer == "Mib/s") - { - // MebiBits/s - *v = (uint64_t)(r * 1048576); - } - else if (trailer == "MiB/s") - { - // MebiByte/s - *v = (uint64_t)(r * 1048576 * 8); - } - else if (trailer == "Gbps") - { - // GigaBit/s - *v = (uint64_t)(r * 1000000000); - } - else if (trailer == "Gb/s") - { - // GigaBit/s - *v = (uint64_t)(r * 1000000000); - } - else if (trailer == "GBps") - { - // GigaByte/s - *v = (uint64_t)(r * 8*1000000000); - } - else if (trailer == "GB/s") - { - // GigaByte/s - *v = (uint64_t)(r * 8*1000000000); - } - else if (trailer == "Gib/s") - { - // GibiBits/s - *v = (uint64_t)(r * 1048576 * 1024); - } - else if (trailer == "GiB/s") - { - // GibiByte/s - *v = (uint64_t)(r * 1048576 * 1024 * 8); - } - else - { - return false; - } - return true; - } + { // Found non-numeric + std::istringstream iss; + iss.str (s.substr(0, n)); + double r; + iss >> r; + std::string trailer = s.substr(n, std::string::npos); + if (trailer == "bps") + { + // bit/s + *v = (uint64_t)r; + } + else if (trailer == "b/s") + { + // bit/s + *v = (uint64_t)r; + } + else if (trailer == "Bps") + { + // byte/s + *v = (uint64_t)(r * 8); + } + else if (trailer == "B/s") + { + // byte/s + *v = (uint64_t)(r * 8); + } + else if (trailer == "kbps") + { + // kilobits/s + *v = (uint64_t)(r * 1000); + } + else if (trailer == "kb/s") + { + // kilobits/s + *v = (uint64_t)(r * 1000); + } + else if (trailer == "Kbps") + { + // kilobits/s + *v = (uint64_t)(r * 1000); + } + else if (trailer == "Kb/s") + { + // kilobits/s + *v = (uint64_t)(r * 1000); + } + else if (trailer == "kBps") + { + // kiloByte/s + *v = (uint64_t)(r * 8000); + } + else if (trailer == "kB/s") + { + // KiloByte/s + *v = (uint64_t)(r * 8000); + } + else if (trailer == "KBps") + { + // kiloByte/s + *v = (uint64_t)(r * 8000); + } + else if (trailer == "KB/s") + { + // KiloByte/s + *v = (uint64_t)(r * 8000); + } + else if (trailer == "Kib/s") + { + // kibibit/s + *v = (uint64_t)(r * 1024); + } + else if (trailer == "KiB/s") + { + // kibibyte/s + *v = (uint64_t)(r * 8192); + } + else if (trailer == "Mbps") + { + // MegaBits/s + *v = (uint64_t)(r * 1000000); + } + else if (trailer == "Mb/s") + { + // MegaBits/s + *v = (uint64_t)(r * 1000000); + } + else if (trailer == "MBps") + { + // MegaBytes/s + *v = (uint64_t)(r * 8000000); + } + else if (trailer == "MB/s") + { + // MegaBytes/s + *v = (uint64_t)(r * 8000000); + } + else if (trailer == "Mib/s") + { + // MebiBits/s + *v = (uint64_t)(r * 1048576); + } + else if (trailer == "MiB/s") + { + // MebiByte/s + *v = (uint64_t)(r * 1048576 * 8); + } + else if (trailer == "Gbps") + { + // GigaBit/s + *v = (uint64_t)(r * 1000000000); + } + else if (trailer == "Gb/s") + { + // GigaBit/s + *v = (uint64_t)(r * 1000000000); + } + else if (trailer == "GBps") + { + // GigaByte/s + *v = (uint64_t)(r * 8*1000000000); + } + else if (trailer == "GB/s") + { + // GigaByte/s + *v = (uint64_t)(r * 8*1000000000); + } + else if (trailer == "Gib/s") + { + // GibiBits/s + *v = (uint64_t)(r * 1048576 * 1024); + } + else if (trailer == "GiB/s") + { + // GibiByte/s + *v = (uint64_t)(r * 1048576 * 1024 * 8); + } + else + { + return false; + } + return true; + } std::istringstream iss; iss.str (s); iss >> *v; @@ -183,40 +183,42 @@ ATTRIBUTE_HELPER_CPP (DataRate); DataRate::DataRate () : m_bps (0) -{} +{ +} DataRate::DataRate(uint64_t bps) - :m_bps(bps) -{} + : m_bps(bps) +{ +} bool DataRate::operator < (const DataRate& rhs) const { - return m_bps (const DataRate& rhs) const { - return m_bps>rhs.m_bps; + return m_bps>rhs.m_bps; } bool DataRate::operator >= (const DataRate& rhs) const { - return m_bps>=rhs.m_bps; + return m_bps>=rhs.m_bps; } bool DataRate::operator == (const DataRate& rhs) const { - return m_bps==rhs.m_bps; + return m_bps==rhs.m_bps; } bool DataRate::operator != (const DataRate& rhs) const { - return m_bps!=rhs.m_bps; + return m_bps!=rhs.m_bps; } double DataRate::CalculateTxTime(uint32_t bytes) const diff --git a/src/network/utils/data-rate.h b/src/network/utils/data-rate.h index 60a804f21..f4777f8b6 100644 --- a/src/network/utils/data-rate.h +++ b/src/network/utils/data-rate.h @@ -31,7 +31,7 @@ namespace ns3 { /** - * \ingroup common + * \ingroup network * \defgroup datarate Data Rate */ /** @@ -82,14 +82,14 @@ public: */ DataRate (uint64_t bps); DataRate (std::string rate); - + bool operator < (const DataRate& rhs) const; bool operator <= (const DataRate& rhs) const; bool operator > (const DataRate& rhs) const; bool operator >= (const DataRate& rhs) const; bool operator == (const DataRate& rhs) const; bool operator != (const DataRate& rhs) const; - + /** * \brief Calculate transmission time * @@ -98,7 +98,7 @@ public: * \return The transmission time in seconds for the number of bytes specified */ double CalculateTxTime(uint32_t bytes) const; - + /** * Get the underlying bitrate * \return The underlying bitrate in bits per second diff --git a/src/network/utils/drop-tail-queue.cc b/src/network/utils/drop-tail-queue.cc index d8efd3b46..73b919689 100644 --- a/src/network/utils/drop-tail-queue.cc +++ b/src/network/utils/drop-tail-queue.cc @@ -48,8 +48,8 @@ TypeId DropTailQueue::GetTypeId (void) UintegerValue (100 * 65535), MakeUintegerAccessor (&DropTailQueue::m_maxBytes), MakeUintegerChecker ()) - ; - + ; + return tid; } @@ -66,20 +66,20 @@ DropTailQueue::~DropTailQueue () NS_LOG_FUNCTION_NOARGS (); } - void +void DropTailQueue::SetMode (enum Mode mode) { NS_LOG_FUNCTION (mode); m_mode = mode; } - DropTailQueue::Mode +DropTailQueue::Mode DropTailQueue::GetMode (void) { NS_LOG_FUNCTION_NOARGS (); return m_mode; } - + bool DropTailQueue::DoEnqueue (Ptr p) { diff --git a/src/network/utils/drop-tail-queue.h b/src/network/utils/drop-tail-queue.h index b534932b7..c9c045088 100644 --- a/src/network/utils/drop-tail-queue.h +++ b/src/network/utils/drop-tail-queue.h @@ -51,7 +51,7 @@ public: enum Mode { ILLEGAL, /**< Mode not set */ PACKETS, /**< Use number of packets for maximum queue size */ - BYTES, /**< Use number of bytes for maximum queue size */ + BYTES, /**< Use number of bytes for maximum queue size */ }; /** diff --git a/src/network/utils/error-model.cc b/src/network/utils/error-model.cc index df5c83e29..3f50690df 100644 --- a/src/network/utils/error-model.cc +++ b/src/network/utils/error-model.cc @@ -45,7 +45,7 @@ TypeId ErrorModel::GetTypeId (void) BooleanValue (true), MakeBooleanAccessor (&ErrorModel::m_enable), MakeBooleanChecker ()) - ; + ; return tid; } @@ -124,7 +124,7 @@ TypeId RateErrorModel::GetTypeId (void) RandomVariableValue (UniformVariable (0.0, 1.0)), MakeRandomVariableAccessor (&RateErrorModel::m_ranvar), MakeRandomVariableChecker ()) - ; + ; return tid; } @@ -180,7 +180,7 @@ RateErrorModel::DoCorrupt (Ptr p) NS_LOG_FUNCTION_NOARGS (); if (!IsEnabled ()) { - return false; + return false; } switch (m_unit) { @@ -240,11 +240,11 @@ TypeId ListErrorModel::GetTypeId (void) static TypeId tid = TypeId ("ns3::ListErrorModel") .SetParent () .AddConstructor () - ; + ; return tid; } -ListErrorModel::ListErrorModel () +ListErrorModel::ListErrorModel () { NS_LOG_FUNCTION_NOARGS (); } @@ -277,16 +277,16 @@ ListErrorModel::DoCorrupt (Ptr p) NS_LOG_FUNCTION_NOARGS (); if (!IsEnabled ()) { - return false; + return false; } uint32_t uid = p->GetUid (); for (PacketListCI i = m_packetList.begin (); - i != m_packetList.end (); i++) + i != m_packetList.end (); i++) { if (uid == *i) - { - return true; - } + { + return true; + } } return false; } @@ -309,7 +309,7 @@ TypeId ReceiveListErrorModel::GetTypeId (void) static TypeId tid = TypeId ("ns3::ReceiveListErrorModel") .SetParent () .AddConstructor () - ; + ; return tid; } @@ -345,16 +345,16 @@ ReceiveListErrorModel::DoCorrupt (Ptr p) NS_LOG_FUNCTION_NOARGS (); if (!IsEnabled ()) { - return false; + return false; } m_timesInvoked += 1; for (PacketListCI i = m_packetList.begin (); - i != m_packetList.end (); i++) + i != m_packetList.end (); i++) { if (m_timesInvoked - 1 == *i) - { - return true; - } + { + return true; + } } return false; } diff --git a/src/network/utils/error-model.h b/src/network/utils/error-model.h index eeab72406..04f532054 100644 --- a/src/network/utils/error-model.h +++ b/src/network/utils/error-model.h @@ -30,7 +30,7 @@ namespace ns3 { class Packet; /** - * \ingroup common + * \ingroup network * \defgroup errormodel Error Model */ /** @@ -47,7 +47,7 @@ class Packet; * data buffer errored or not, or side information may be returned to * the client in the form of a packet tag. (Note: No such error models * that actually error the bits in a packet presently exist). - * The object can have state (resettable by Reset()). + * The object can have state (resettable by Reset()). * The object can also be enabled and disabled via two public member functions. * * Typical code (simplified) to use an ErrorModel may look something like @@ -66,36 +66,36 @@ class Packet; * } * \endcode * - * Two practical error models, a ListErrorModel and a RateErrorModel, + * Two practical error models, a ListErrorModel and a RateErrorModel, * are currently implemented. */ class ErrorModel : public Object { public: static TypeId GetTypeId (void); - + ErrorModel (); virtual ~ErrorModel (); - /** - * Note: Depending on the error model, this function may or may not - * alter the contents of the packet upon returning true. - * - * \returns true if the Packet is to be considered as errored/corrupted - * \param pkt Packet to apply error model to - */ + /** + * Note: Depending on the error model, this function may or may not + * alter the contents of the packet upon returning true. + * + * \returns true if the Packet is to be considered as errored/corrupted + * \param pkt Packet to apply error model to + */ bool IsCorrupt (Ptr pkt); - /** - * Reset any state associated with the error model - */ + /** + * Reset any state associated with the error model + */ void Reset (void); - /** - * Enable the error model - */ + /** + * Enable the error model + */ void Enable (void); - /** - * Disable the error model - */ + /** + * Disable the error model + */ void Disable (void); /** * \return true if error model is enabled; false otherwise @@ -113,11 +113,11 @@ private: }; enum ErrorUnit - { - EU_BIT, - EU_BYTE, - EU_PKT - }; +{ + EU_BIT, + EU_BYTE, + EU_PKT +}; /** * \brief Determine which packets are errored corresponding to an underlying @@ -226,7 +226,7 @@ private: typedef std::list::const_iterator PacketListCI; PacketList m_packetList; - + }; /** @@ -268,7 +268,7 @@ private: PacketList m_packetList; uint32_t m_timesInvoked; - + }; diff --git a/src/network/utils/ethernet-header.cc b/src/network/utils/ethernet-header.cc index f1f46d27f..ba0715d38 100644 --- a/src/network/utils/ethernet-header.cc +++ b/src/network/utils/ethernet-header.cc @@ -35,36 +35,38 @@ NS_OBJECT_ENSURE_REGISTERED (EthernetHeader); EthernetHeader::EthernetHeader (bool hasPreamble) : m_enPreambleSfd (hasPreamble), m_lengthType (0) -{} +{ +} EthernetHeader::EthernetHeader () : m_enPreambleSfd (false), m_lengthType (0) -{} +{ +} -void +void EthernetHeader::SetLengthType (uint16_t lengthType) { m_lengthType = lengthType; } -uint16_t +uint16_t EthernetHeader::GetLengthType (void) const { return m_lengthType; } -void +void EthernetHeader::SetPreambleSfd (uint64_t preambleSfd) { m_preambleSfd = preambleSfd; } -uint64_t +uint64_t EthernetHeader::GetPreambleSfd (void) const { return m_preambleSfd; } -void +void EthernetHeader::SetSource (Mac48Address source) { m_source = source; @@ -105,7 +107,7 @@ EthernetHeader::GetTypeId (void) static TypeId tid = TypeId ("ns3::EthernetHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } TypeId @@ -143,7 +145,7 @@ void EthernetHeader::Serialize (Buffer::Iterator start) const { Buffer::Iterator i = start; - + if (m_enPreambleSfd) { i.WriteU64(m_preambleSfd); diff --git a/src/network/utils/ethernet-header.h b/src/network/utils/ethernet-header.h index 84c2ce27d..c4eb6ad60 100644 --- a/src/network/utils/ethernet-header.h +++ b/src/network/utils/ethernet-header.h @@ -27,18 +27,18 @@ namespace ns3 { - /** - * Types of ethernet packets. Indicates the type of the current - * header. - */ - enum ethernet_header_t { - LENGTH, /**< Basic ethernet packet, no tags, type/length field - indicates packet length or IP/ARP packet */ - VLAN, /**< Single tagged packet. Header includes VLAN tag */ - QINQ /**< Double tagged packet. Header includes two VLAN tags */ - }; /** - * \ingroup node + * Types of ethernet packets. Indicates the type of the current + * header. + */ +enum ethernet_header_t { + LENGTH, /**< Basic ethernet packet, no tags, type/length field + indicates packet length or IP/ARP packet */ + VLAN, /**< Single tagged packet. Header includes VLAN tag */ + QINQ /**< Double tagged packet. Header includes two VLAN tags */ +}; +/** + * \ingroup network * * \brief Packet header for Ethernet * @@ -93,7 +93,7 @@ public: /** * \return The destination address of this packet */ - Mac48Address GetDestination (void) const; + Mac48Address GetDestination (void) const; /** * \return The value of the PreambleSfd field */ diff --git a/src/network/utils/ethernet-trailer.cc b/src/network/utils/ethernet-trailer.cc index bf28fbe60..014347d63 100644 --- a/src/network/utils/ethernet-trailer.cc +++ b/src/network/utils/ethernet-trailer.cc @@ -32,9 +32,10 @@ NS_OBJECT_ENSURE_REGISTERED (EthernetTrailer); EthernetTrailer::EthernetTrailer () : m_calcFcs (false), m_fcs (0) -{} +{ +} -void +void EthernetTrailer::EnableFcs (bool enable) { m_calcFcs = enable; @@ -100,7 +101,7 @@ EthernetTrailer::GetTypeId (void) static TypeId tid = TypeId ("ns3::EthernetTrailer") .SetParent () .AddConstructor () - ; + ; return tid; } TypeId @@ -124,7 +125,7 @@ EthernetTrailer::Serialize (Buffer::Iterator end) const { Buffer::Iterator i = end; i.Prev(GetSerializedSize()); - + i.WriteU32 (m_fcs); } uint32_t @@ -152,8 +153,8 @@ EthernetTrailer::DoCalcFcs (uint8_t const *buffer, size_t len) const crc ^= *buffer++; for (i = 0; i < 8; i++) { - crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0); - } + crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0); + } } return ~crc; } diff --git a/src/network/utils/ethernet-trailer.h b/src/network/utils/ethernet-trailer.h index 69c740df9..22aae5458 100644 --- a/src/network/utils/ethernet-trailer.h +++ b/src/network/utils/ethernet-trailer.h @@ -29,7 +29,7 @@ namespace ns3 { /** - * \ingroup node + * \ingroup network * * \brief Packet trailer for Ethernet * diff --git a/src/network/utils/flow-id-tag.cc b/src/network/utils/flow-id-tag.cc index 70850afa0..6cc6cf1e5 100644 --- a/src/network/utils/flow-id-tag.cc +++ b/src/network/utils/flow-id-tag.cc @@ -29,7 +29,7 @@ FlowIdTag::GetTypeId (void) static TypeId tid = TypeId ("ns3::FlowIdTag") .SetParent () .AddConstructor () - ; + ; return tid; } TypeId @@ -59,12 +59,14 @@ FlowIdTag::Print (std::ostream &os) const } FlowIdTag::FlowIdTag () : Tag () -{} +{ +} FlowIdTag::FlowIdTag (uint32_t id) : Tag (), m_flowId (id) -{} +{ +} void FlowIdTag::SetFlowId (uint32_t id) diff --git a/src/network/utils/inet-socket-address.cc b/src/network/utils/inet-socket-address.cc index 4b0665496..82a8b8f82 100644 --- a/src/network/utils/inet-socket-address.cc +++ b/src/network/utils/inet-socket-address.cc @@ -26,29 +26,34 @@ namespace ns3 { InetSocketAddress::InetSocketAddress (Ipv4Address ipv4, uint16_t port) : m_ipv4 (ipv4), m_port (port) -{} +{ +} InetSocketAddress::InetSocketAddress (Ipv4Address ipv4) : m_ipv4 (ipv4), m_port (0) -{} +{ +} InetSocketAddress::InetSocketAddress (const char *ipv4, uint16_t port) : m_ipv4 (Ipv4Address (ipv4)), m_port (port) -{} +{ +} InetSocketAddress::InetSocketAddress (const char * ipv4) : m_ipv4 (Ipv4Address (ipv4)), m_port (0) -{} +{ +} InetSocketAddress::InetSocketAddress (uint16_t port) : m_ipv4 (Ipv4Address::GetAny ()), m_port (port) -{} -uint16_t +{ +} +uint16_t InetSocketAddress::GetPort (void) const { return m_port; } -Ipv4Address +Ipv4Address InetSocketAddress::GetIpv4 (void) const { return m_ipv4; @@ -59,13 +64,13 @@ InetSocketAddress::SetPort (uint16_t port) { m_port = port; } -void +void InetSocketAddress::SetIpv4 (Ipv4Address address) { m_ipv4 = address; } -bool +bool InetSocketAddress::IsMatchingType (const Address &address) { return address.CheckCompatible (GetType (), 6); diff --git a/src/network/utils/inet6-socket-address.cc b/src/network/utils/inet6-socket-address.cc index 59fdb705e..e26d2a0a2 100644 --- a/src/network/utils/inet6-socket-address.cc +++ b/src/network/utils/inet6-socket-address.cc @@ -27,31 +27,31 @@ namespace ns3 Inet6SocketAddress::Inet6SocketAddress (Ipv6Address ipv6, uint16_t port) : m_ipv6(ipv6), - m_port(port) + m_port(port) { } Inet6SocketAddress::Inet6SocketAddress (Ipv6Address ipv6) : m_ipv6(ipv6), - m_port(0) + m_port(0) { } Inet6SocketAddress::Inet6SocketAddress (const char* ipv6, uint16_t port) : m_ipv6(Ipv6Address(ipv6)), - m_port(port) + m_port(port) { } Inet6SocketAddress::Inet6SocketAddress (const char* ipv6) : m_ipv6(Ipv6Address(ipv6)), - m_port(0) + m_port(0) { } Inet6SocketAddress::Inet6SocketAddress (uint16_t port) : m_ipv6(Ipv6Address::GetAny()), - m_port(port) + m_port(port) { } diff --git a/src/network/utils/ipv4-address.cc b/src/network/utils/ipv4-address.cc index 7689280c2..862bf3ccc 100644 --- a/src/network/utils/ipv4-address.cc +++ b/src/network/utils/ipv4-address.cc @@ -55,18 +55,20 @@ AsciiToIpv4Host (char const *address) return host; } -}//namespace ns3 +} //namespace ns3 namespace ns3 { - + Ipv4Mask::Ipv4Mask () : m_mask (0x66666666) -{} +{ +} Ipv4Mask::Ipv4Mask (uint32_t mask) : m_mask (mask) -{} +{ +} Ipv4Mask::Ipv4Mask (char const *mask) { @@ -93,20 +95,20 @@ bool Ipv4Mask::IsEqual (Ipv4Mask other) const { if (other.m_mask == m_mask) { - return true; - } else { - return false; - } + return true; + } else { + return false; + } } bool Ipv4Mask::IsMatch (Ipv4Address a, Ipv4Address b) const { if ((a.Get () & m_mask) == (b.Get () & m_mask)) { - return true; - } else { - return false; - } + return true; + } else { + return false; + } } uint32_t @@ -160,17 +162,18 @@ Ipv4Mask::GetPrefixLength (void) const uint16_t tmp = 0; uint32_t mask = m_mask; while (mask != 0 ) - { - mask = mask << 1; - tmp++; - } + { + mask = mask << 1; + tmp++; + } return tmp; } Ipv4Address::Ipv4Address () : m_address (0x66666666) -{} +{ +} Ipv4Address::Ipv4Address (uint32_t address) { m_address = address; diff --git a/src/network/utils/ipv6-address.cc b/src/network/utils/ipv6-address.cc index 31e5438f7..b57ff471e 100644 --- a/src/network/utils/ipv6-address.cc +++ b/src/network/utils/ipv6-address.cc @@ -47,15 +47,15 @@ static uint32_t lookuphash (unsigned char* k, uint32_t length, uint32_t level) { #define mix(a, b, c) \ ({ \ - (a) -= (b); (a) -= (c); (a) ^= ((c) >> 13); \ - (b) -= (c); (b) -= (a); (b) ^= ((a) << 8); \ - (c) -= (a); (c) -= (b); (c) ^= ((b) >> 13); \ - (a) -= (b); (a) -= (c); (a) ^= ((c) >> 12); \ - (b) -= (c); (b) -= (a); (b) ^= ((a) << 16); \ - (c) -= (a); (c) -= (b); (c) ^= ((b) >> 5); \ - (a) -= (b); (a) -= (c); (a) ^= ((c) >> 3); \ - (b) -= (c); (b) -= (a); (b) ^= ((a) << 10); \ - (c) -= (a); (c) -= (b); (c) ^= ((b) >> 15); \ + (a) -= (b); (a) -= (c); (a) ^= ((c) >> 13); \ + (b) -= (c); (b) -= (a); (b) ^= ((a) << 8); \ + (c) -= (a); (c) -= (b); (c) ^= ((b) >> 13); \ + (a) -= (b); (a) -= (c); (a) ^= ((c) >> 12); \ + (b) -= (c); (b) -= (a); (b) ^= ((a) << 16); \ + (c) -= (a); (c) -= (b); (c) ^= ((b) >> 5); \ + (a) -= (b); (a) -= (c); (a) ^= ((c) >> 3); \ + (b) -= (c); (b) -= (a); (b) ^= ((a) << 10); \ + (c) -= (a); (c) -= (b); (c) ^= ((b) >> 15); \ }) typedef uint32_t ub4; /* unsigned 4-byte quantities */ @@ -87,16 +87,16 @@ static uint32_t lookuphash (unsigned char* k, uint32_t length, uint32_t level) { case 11: c += ((ub4)k[10] << 24); case 10: c += ((ub4)k[9] << 16); - case 9 : c += ((ub4)k[8] << 8); /* the first byte of c is reserved for the length */ - case 8 : b += ((ub4)k[7] << 24); - case 7 : b += ((ub4)k[6] << 16); - case 6 : b += ((ub4)k[5] << 8); - case 5 : b += k[4]; - case 4 : a += ((ub4)k[3] << 24); - case 3 : a += ((ub4)k[2] << 16); - case 2 : a += ((ub4)k[1] << 8); - case 1 : a += k[0]; - /* case 0: nothing left to add */ + case 9: c += ((ub4)k[8] << 8); /* the first byte of c is reserved for the length */ + case 8: b += ((ub4)k[7] << 24); + case 7: b += ((ub4)k[6] << 16); + case 6: b += ((ub4)k[5] << 8); + case 5: b += k[4]; + case 4: a += ((ub4)k[3] << 24); + case 3: a += ((ub4)k[2] << 16); + case 2: a += ((ub4)k[1] << 8); + case 1: a += k[0]; + /* case 0: nothing left to add */ } mix (a, b, c); @@ -125,7 +125,9 @@ static bool AsciiToIpv6Host (const char *address, uint8_t addr[16]) unsigned char* endp = 0; unsigned char* colonp = 0; const char* xdigits = 0; +#if 0 const char* curtok = 0; +#endif int ch = 0; int seen_xdigits = 0; unsigned int val = 0; @@ -141,8 +143,9 @@ static bool AsciiToIpv6Host (const char *address, uint8_t addr[16]) return (0); } } +#if 0 curtok = address; - +#endif while ((ch = *address++) != '\0') { const char *pch = 0; @@ -165,7 +168,9 @@ static bool AsciiToIpv6Host (const char *address, uint8_t addr[16]) } if (ch == ':') { +#if 0 curtok = address; +#endif if (!seen_xdigits) { @@ -180,7 +185,7 @@ static bool AsciiToIpv6Host (const char *address, uint8_t addr[16]) return (0); } - *tp++ = (unsigned char) (val >> 8) & 0xff; + *tp++ = (unsigned char)(val >> 8) & 0xff; *tp++ = (unsigned char) val & 0xff; seen_xdigits = 0; val = 0; @@ -194,7 +199,7 @@ static bool AsciiToIpv6Host (const char *address, uint8_t addr[16]) { tp += 4 /*NS_INADDRSZ*/; seen_xdigits = 0; - break;/* '\0' was seen by inet_pton4(). */ + break; /* '\0' was seen by inet_pton4(). */ } #endif return (0); @@ -206,7 +211,7 @@ static bool AsciiToIpv6Host (const char *address, uint8_t addr[16]) { return (0); } - *tp++ = (unsigned char) (val >> 8) & 0xff; + *tp++ = (unsigned char)(val >> 8) & 0xff; *tp++ = (unsigned char) val & 0xff; } @@ -226,7 +231,7 @@ static bool AsciiToIpv6Host (const char *address, uint8_t addr[16]) for (i = 1; i <= n; i++) { - endp[- i] = colonp[n - i]; + endp[-i] = colonp[n - i]; colonp[n - i] = 0; } @@ -359,22 +364,22 @@ Ipv6Address Ipv6Address::MakeSolicitedAddress (Ipv6Address addr) void Ipv6Address::Print (std::ostream& os) const { os << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[0] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[1] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[2] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[3] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[4] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[5] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[6] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[7] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[8] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[9] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[10] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[11] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[12] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[13] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[14] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[15] - << std::dec << std::setfill (' '); + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[1] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[2] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[3] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[4] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[5] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[6] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[7] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[8] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[9] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[10] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[11] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[12] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[13] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[14] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_address[15] + << std::dec << std::setfill (' '); } bool Ipv6Address::IsLocalhost () const @@ -590,8 +595,12 @@ Ipv6Prefix::Ipv6Prefix (uint8_t prefix) nb = prefix / 8; mod = prefix % 8; - memset (m_prefix, 0xff, nb); - + // protect memset with 'nb > 0' check to suppress + // __warn_memset_zero_len compiler errors in some gcc>4.5.x + if (nb > 0) + { + memset (m_prefix, 0xff, nb); + } if (mod) { m_prefix[nb] = 0xff << (8-mod); @@ -645,21 +654,21 @@ bool Ipv6Prefix::IsMatch (Ipv6Address a, Ipv6Address b) const void Ipv6Prefix::Print (std::ostream &os) const { os << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[0] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[1] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[2] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[3] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[4] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[5] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[6] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[7] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[8] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[9] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[10] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[11] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[12] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[13] << ":" - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[14] - << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[15]; + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[1] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[2] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[3] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[4] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[5] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[6] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[7] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[8] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[9] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[10] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[11] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[12] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[13] << ":" + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[14] + << std::hex << std::setw (2) << std::setfill ('0') << (unsigned int) m_prefix[15]; } Ipv6Prefix Ipv6Prefix::GetLoopback () diff --git a/src/network/utils/ipv6-address.h b/src/network/utils/ipv6-address.h index 05ca3f96a..116db440d 100644 --- a/src/network/utils/ipv6-address.h +++ b/src/network/utils/ipv6-address.h @@ -42,7 +42,7 @@ class Mac48Address; */ class Ipv6Address { -public : +public: /** * \brief Default constructor. */ diff --git a/src/network/utils/llc-snap-header.cc b/src/network/utils/llc-snap-header.cc index 7cd98729d..3f1012f58 100644 --- a/src/network/utils/llc-snap-header.cc +++ b/src/network/utils/llc-snap-header.cc @@ -27,9 +27,10 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (LlcSnapHeader); LlcSnapHeader::LlcSnapHeader () -{} +{ +} -void +void LlcSnapHeader::SetType (uint16_t type) { m_etherType = type; @@ -52,7 +53,7 @@ LlcSnapHeader::GetTypeId (void) static TypeId tid = TypeId ("ns3::LlcSnapHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } TypeId @@ -73,7 +74,7 @@ void LlcSnapHeader::Serialize (Buffer::Iterator start) const { Buffer::Iterator i = start; - uint8_t buf[] = {0xaa, 0xaa, 0x03, 0, 0, 0}; + uint8_t buf[] = { 0xaa, 0xaa, 0x03, 0, 0, 0}; i.Write (buf, 6); i.WriteHtonU16 (m_etherType); } diff --git a/src/network/utils/llc-snap-header.h b/src/network/utils/llc-snap-header.h index 80fba3541..a2551c053 100644 --- a/src/network/utils/llc-snap-header.h +++ b/src/network/utils/llc-snap-header.h @@ -33,7 +33,7 @@ namespace ns3 { static const uint16_t LLC_SNAP_HEADER_LENGTH = 8; /** - * \ingroup node + * \ingroup network * * \brief Header for the LLC/SNAP encapsulation */ diff --git a/src/network/utils/mac48-address.cc b/src/network/utils/mac48-address.cc index 77ba77046..a3a3e4a86 100644 --- a/src/network/utils/mac48-address.cc +++ b/src/network/utils/mac48-address.cc @@ -39,12 +39,12 @@ static char AsciiToLowCase (char c) { if (c >= ASCII_a && c <= ASCII_z) { - return c; - } else if (c >= ASCII_A && c <= ASCII_Z) { - return c + (ASCII_a - ASCII_A); - } else { - return c; - } + return c; + } else if (c >= ASCII_A && c <= ASCII_Z) { + return c + (ASCII_a - ASCII_A); + } else { + return c; + } } @@ -59,25 +59,25 @@ Mac48Address::Mac48Address (const char *str) { uint8_t byte = 0; while (*str != ASCII_COLON && *str != 0) - { - byte <<= 4; - char low = AsciiToLowCase (*str); - if (low >= ASCII_a) - { - byte |= low - ASCII_a + 10; - } - else - { - byte |= low - ASCII_ZERO; - } - str++; - } + { + byte <<= 4; + char low = AsciiToLowCase (*str); + if (low >= ASCII_a) + { + byte |= low - ASCII_a + 10; + } + else + { + byte |= low - ASCII_ZERO; + } + str++; + } m_address[i] = byte; i++; if (*str == 0) - { - break; - } + { + break; + } str++; } NS_ASSERT (i == 6); @@ -261,17 +261,17 @@ std::istream& operator>> (std::istream& is, Mac48Address & address) std::string::size_type next; next = v.find (":", col); if (next == std::string::npos) - { - tmp = v.substr (col, v.size ()-col); - address.m_address[i] = AsInt (tmp); - break; - } + { + tmp = v.substr (col, v.size ()-col); + address.m_address[i] = AsInt (tmp); + break; + } else - { - tmp = v.substr (col, next-col); - address.m_address[i] = AsInt (tmp); - col = next + 1; - } + { + tmp = v.substr (col, next-col); + address.m_address[i] = AsInt (tmp); + col = next + 1; + } } return is; } diff --git a/src/network/utils/mac48-address.h b/src/network/utils/mac48-address.h index 936cec0e8..a532d0d33 100644 --- a/src/network/utils/mac48-address.h +++ b/src/network/utils/mac48-address.h @@ -91,7 +91,7 @@ public: * \returns true if this is a broadcast address, false otherwise. */ bool IsBroadcast (void) const; - + /** * \returns true if the group bit is set, false otherwise. */ diff --git a/src/network/utils/mac64-address.cc b/src/network/utils/mac64-address.cc index 6f118c00f..10669589d 100644 --- a/src/network/utils/mac64-address.cc +++ b/src/network/utils/mac64-address.cc @@ -37,12 +37,12 @@ static char AsciiToLowCase (char c) { if (c >= ASCII_a && c <= ASCII_z) { - return c; - } else if (c >= ASCII_A && c <= ASCII_Z) { - return c + (ASCII_a - ASCII_A); - } else { - return c; - } + return c; + } else if (c >= ASCII_A && c <= ASCII_Z) { + return c + (ASCII_a - ASCII_A); + } else { + return c; + } } @@ -57,25 +57,25 @@ Mac64Address::Mac64Address (const char *str) { uint8_t byte = 0; while (*str != ASCII_COLON && *str != 0) - { - byte <<= 4; - char low = AsciiToLowCase (*str); - if (low >= ASCII_a) - { - byte |= low - ASCII_a + 10; - } - else - { - byte |= low - ASCII_ZERO; - } - str++; - } + { + byte <<= 4; + char low = AsciiToLowCase (*str); + if (low >= ASCII_a) + { + byte |= low - ASCII_a + 10; + } + else + { + byte |= low - ASCII_ZERO; + } + str++; + } m_address[i] = byte; i++; if (*str == 0) - { - break; - } + { + break; + } str++; } NS_ASSERT (i == 6); @@ -147,7 +147,7 @@ bool operator == (const Mac64Address &a, const Mac64Address &b) } bool operator != (const Mac64Address &a, const Mac64Address &b) { - return ! (a == b); + return !(a == b); } std::ostream& operator<< (std::ostream& os, const Mac64Address & address) diff --git a/src/network/utils/output-stream-wrapper.h b/src/network/utils/output-stream-wrapper.h index 432c70799..eeec58891 100644 --- a/src/network/utils/output-stream-wrapper.h +++ b/src/network/utils/output-stream-wrapper.h @@ -41,7 +41,7 @@ namespace ns3 { * When writing traced information to a file, the tempting ns-3 idiom is to * create a bound callback with an ofstream as the bound object. Unfortunately, * this implies a copy construction in order to get the ofstream object into the - * callback. This operation, as mentioned above, is forbidden by the STL. + * callback. This operation, as mentioned above, is forbidden by the STL. * Using this class in ns-3 APIs is generally preferable to passing global * pointers to ostream objects, or passing a pointer to a stack allocated * ostream (which creates object lifetime issues). @@ -82,7 +82,7 @@ public: * \returns a pointer to the encapsulated std::ostream */ std::ostream *GetStream (void); - + private: std::ostream *m_ostream; bool m_destroyable; diff --git a/src/network/utils/packet-socket-address.cc b/src/network/utils/packet-socket-address.cc index d82cce43b..b27168dbf 100644 --- a/src/network/utils/packet-socket-address.cc +++ b/src/network/utils/packet-socket-address.cc @@ -23,8 +23,9 @@ namespace ns3 { PacketSocketAddress::PacketSocketAddress () -{} -void +{ +} +void PacketSocketAddress::SetProtocol (uint16_t protocol) { m_protocol = protocol; @@ -84,7 +85,7 @@ PacketSocketAddress::ConvertTo (void) const buffer[3] = (m_device >> 16) & 0xff; buffer[4] = (m_device >> 8) & 0xff; buffer[5] = (m_device >> 0) & 0xff; - buffer[6] = m_isSingleDevice?1:0; + buffer[6] = m_isSingleDevice ? 1 : 0; uint32_t copied = m_address.CopyAllTo (buffer + 7, Address::MAX_SIZE - 7); return Address (GetType (), buffer, 7 + copied); } @@ -103,7 +104,7 @@ PacketSocketAddress::ConvertFrom (const Address &address) device |= buffer[4]; device <<= 8; device |= buffer[5]; - bool isSingleDevice = (buffer[6] == 1)?true:false; + bool isSingleDevice = (buffer[6] == 1) ? true : false; Address physical; physical.CopyAllFrom (buffer + 7, Address::MAX_SIZE - 7); PacketSocketAddress ad; diff --git a/src/network/utils/packet-socket-address.h b/src/network/utils/packet-socket-address.h index a227be4e3..3420e52f2 100644 --- a/src/network/utils/packet-socket-address.h +++ b/src/network/utils/packet-socket-address.h @@ -37,7 +37,7 @@ class NetDevice; */ class PacketSocketAddress { - public: +public: PacketSocketAddress (); void SetProtocol (uint16_t protocol); @@ -68,7 +68,7 @@ class PacketSocketAddress * \returns true if the address matches, false otherwise. */ static bool IsMatchingType (const Address &address); - private: +private: static uint8_t GetType (void); Address ConvertTo (void) const; uint16_t m_protocol; diff --git a/src/network/utils/packet-socket-factory.cc b/src/network/utils/packet-socket-factory.cc index dc7fb2958..c7f8f1833 100644 --- a/src/network/utils/packet-socket-factory.cc +++ b/src/network/utils/packet-socket-factory.cc @@ -34,7 +34,8 @@ PacketSocketFactory::GetTypeId (void) } PacketSocketFactory::PacketSocketFactory () -{} +{ +} Ptr PacketSocketFactory::CreateSocket (void) { diff --git a/src/network/utils/packet-socket.cc b/src/network/utils/packet-socket.cc index 1cbeae0f0..e6c14df60 100644 --- a/src/network/utils/packet-socket.cc +++ b/src/network/utils/packet-socket.cc @@ -48,7 +48,7 @@ PacketSocket::GetTypeId (void) UintegerValue (131072), MakeUintegerAccessor (&PacketSocket::m_rcvBufSize), MakeUintegerChecker ()) - ; + ; return tid; } @@ -233,7 +233,7 @@ PacketSocket::Connect(const Address &ad) m_state = STATE_CONNECTED; NotifyConnectionSucceeded (); return 0; - error: +error: NotifyConnectionFailed (); return -1; } @@ -282,7 +282,7 @@ PacketSocket::GetTxAvailable (void) const { if (m_state == STATE_CONNECTED) { - PacketSocketAddress ad = PacketSocketAddress::ConvertFrom (m_destAddr); + PacketSocketAddress ad = PacketSocketAddress::ConvertFrom (m_destAddr); return GetMinMtu (ad); } // If we are not connected, we return a 'safe' value by default. @@ -318,7 +318,7 @@ PacketSocket::SendTo (Ptr p, uint32_t flags, const Address &address) m_errno = ERROR_MSGSIZE; return -1; } - + bool error = false; Address dest = ad.GetPhysicalAddress (); if (ad.IsSingleDevice ()) @@ -441,6 +441,9 @@ PacketSocket::RecvFrom (uint32_t maxSize, uint32_t flags, Address &fromAddress) bool found; found = packet->PeekPacketTag (tag); NS_ASSERT (found); + //cast found to void, to suppress 'found' set but not used compiler warning + //in optimized builds + (void) found; fromAddress = tag.GetAddress (); } return packet; @@ -451,21 +454,21 @@ PacketSocket::GetSockName (Address &address) const { NS_LOG_FUNCTION (this << address); PacketSocketAddress ad = PacketSocketAddress::ConvertFrom(address); - + ad.SetProtocol (m_protocol); if (m_isSingleDevice) { Ptr device = m_node->GetDevice (ad.GetSingleDevice ()); - ad.SetPhysicalAddress(device->GetAddress()); + ad.SetPhysicalAddress(device->GetAddress()); ad.SetSingleDevice (m_device); } else { - ad.SetPhysicalAddress(Address()); + ad.SetPhysicalAddress(Address()); ad.SetAllDevices (); - } + } address = ad; - + return 0; } @@ -485,4 +488,4 @@ PacketSocket::GetAllowBroadcast () const return false; } -}//namespace ns3 +} //namespace ns3 diff --git a/src/network/utils/packet-socket.h b/src/network/utils/packet-socket.h index 905244b03..2c753e41a 100644 --- a/src/network/utils/packet-socket.h +++ b/src/network/utils/packet-socket.h @@ -101,7 +101,7 @@ public: virtual uint32_t GetRxAvailable (void) const; virtual Ptr Recv (uint32_t maxSize, uint32_t flags); virtual Ptr RecvFrom (uint32_t maxSize, uint32_t flags, - Address &fromAddress); + Address &fromAddress); virtual int GetSockName (Address &address) const; virtual bool SetAllowBroadcast (bool allowBroadcast); virtual bool GetAllowBroadcast () const; @@ -132,15 +132,15 @@ private: std::queue > m_deliveryQueue; uint32_t m_rxAvailable; - + TracedCallback > m_dropTrace; - + // Socket options (attributes) uint32_t m_rcvBufSize; }; -}//namespace ns3 +} //namespace ns3 #endif /* PACKET_SOCKET_H */ diff --git a/src/network/utils/packetbb.cc b/src/network/utils/packetbb.cc index 51a9507c5..5c621ad36 100644 --- a/src/network/utils/packetbb.cc +++ b/src/network/utils/packetbb.cc @@ -257,8 +257,8 @@ PbbTlvBlock::operator== (const PbbTlvBlock &other) const ConstIterator ti, oi; for (ti = Begin (), oi = other.Begin (); - ti != End () && oi != other.End (); - ti++, oi++) + ti != End () && oi != other.End (); + ti++, oi++) { if (**ti != **oi) { @@ -429,11 +429,11 @@ PbbAddressTlvBlock::Deserialize (Buffer::Iterator &start) if (size > 0) { while (start.GetDistanceFrom (tlvstart) < size) - { - Ptr newtlv = Create (); - newtlv->Deserialize (start); - PushBack (newtlv); - } + { + Ptr newtlv = Create (); + newtlv->Deserialize (start); + PushBack (newtlv); + } } } @@ -475,8 +475,8 @@ PbbAddressTlvBlock::operator== (const PbbAddressTlvBlock &other) const ConstIterator it, ot; for (it = Begin (), ot = other.Begin (); - it != End () && ot != other.End (); - it++, ot++) + it != End () && ot != other.End (); + it++, ot++) { if (**it != **ot) { @@ -730,7 +730,7 @@ PbbPacket::Erase (PbbPacket::MessageIterator position) PbbPacket::MessageIterator PbbPacket::Erase (PbbPacket::MessageIterator first, - PbbPacket::MessageIterator last) + PbbPacket::MessageIterator last) { return m_messageList.erase (first, last); } @@ -779,8 +779,8 @@ PbbPacket::GetSerializedSize (void) const } for (ConstMessageIterator iter = MessageBegin (); - iter != MessageEnd (); - iter++) + iter != MessageEnd (); + iter++) { size += (*iter)->GetSerializedSize (); } @@ -815,8 +815,8 @@ PbbPacket::Serialize (Buffer::Iterator start) const bufref.WriteU8(flags); for (ConstMessageIterator iter = MessageBegin (); - iter != MessageEnd (); - iter++) + iter != MessageEnd (); + iter++) { (*iter)->Serialize (start); } @@ -870,8 +870,8 @@ PbbPacket::Print (std::ostream &os) const m_tlvList.Print (os, 1); for (ConstMessageIterator iter = MessageBegin (); - iter != MessageEnd (); - iter++) + iter != MessageEnd (); + iter++) { (*iter)->Print (os, 1); } @@ -905,13 +905,13 @@ PbbPacket::operator== (const PbbPacket &other) const if (MessageSize () != other.MessageSize ()) { - return false; + return false; } ConstMessageIterator tmi, omi; for (tmi = MessageBegin (), omi = other.MessageBegin (); - tmi != MessageEnd () && omi != other.MessageEnd (); - tmi++, omi++) + tmi != MessageEnd () && omi != other.MessageEnd (); + tmi++, omi++) { if (**tmi != **omi) { @@ -1240,7 +1240,7 @@ PbbMessage::AddressBlockErase (PbbMessage::AddressBlockIterator position) PbbMessage::AddressBlockIterator PbbMessage::AddressBlockErase (PbbMessage::AddressBlockIterator first, - PbbMessage::AddressBlockIterator last) + PbbMessage::AddressBlockIterator last) { return m_addressBlockList.erase(first, last); } @@ -1249,8 +1249,8 @@ void PbbMessage::AddressBlockClear (void) { for (AddressBlockIterator iter = AddressBlockBegin (); - iter != AddressBlockEnd (); - iter++) + iter != AddressBlockEnd (); + iter++) { *iter = 0; } @@ -1286,8 +1286,8 @@ PbbMessage::GetSerializedSize (void) const size += m_tlvList.GetSerializedSize (); for (ConstAddressBlockIterator iter = AddressBlockBegin (); - iter != AddressBlockEnd (); - iter++) + iter != AddressBlockEnd (); + iter++) { size += (*iter)->GetSerializedSize (); } @@ -1342,8 +1342,8 @@ PbbMessage::Serialize (Buffer::Iterator &start) const m_tlvList.Serialize (start); for (ConstAddressBlockIterator iter = AddressBlockBegin (); - iter != AddressBlockEnd (); - iter++) + iter != AddressBlockEnd (); + iter++) { (*iter)->Serialize (start); } @@ -1368,16 +1368,16 @@ PbbMessage::DeserializeMessage (Buffer::Iterator &start) switch (addrlen) { - case 0: - case IPV4: - newmsg = Create (); - break; - case IPV6: - newmsg = Create (); - break; - default: - return 0; - break; + case 0: + case IPV4: + newmsg = Create (); + break; + case IPV6: + newmsg = Create (); + break; + default: + return 0; + break; } newmsg->Deserialize (start); return newmsg; @@ -1469,8 +1469,8 @@ PbbMessage::Print (std::ostream &os, int level) const m_tlvList.Print (os, level+1); for (ConstAddressBlockIterator iter = AddressBlockBegin (); - iter != AddressBlockEnd (); - iter++) + iter != AddressBlockEnd (); + iter++) { (*iter)->Print (os, level+1); } @@ -1554,8 +1554,8 @@ PbbMessage::operator== (const PbbMessage &other) const ConstAddressBlockIterator tai, oai; for (tai = AddressBlockBegin (), oai = other.AddressBlockBegin (); - tai != AddressBlockEnd () && oai != other.AddressBlockEnd (); - tai++, oai++) + tai != AddressBlockEnd () && oai != other.AddressBlockEnd (); + tai++, oai++) { if (**tai != **oai) { @@ -1666,10 +1666,12 @@ PbbMessageIpv6::AddressBlockDeserialize (Buffer::Iterator &start) const /* End PbbMessageIpv6 Class */ PbbAddressBlock::PbbAddressBlock () -{} +{ +} PbbAddressBlock::~PbbAddressBlock () -{} +{ +} /* Manipulating the address block */ @@ -1753,12 +1755,12 @@ PbbAddressBlock::AddressErase (PbbAddressBlock::AddressIterator position) PbbAddressBlock::AddressIterator PbbAddressBlock::AddressErase (PbbAddressBlock::AddressIterator first, - PbbAddressBlock::AddressIterator last) + PbbAddressBlock::AddressIterator last) { return m_addressList.erase(first, last); } - void +void PbbAddressBlock::AddressClear (void) { return m_addressList.clear(); @@ -1956,7 +1958,7 @@ PbbAddressBlock::TlvErase (PbbAddressBlock::TlvIterator position) PbbAddressBlock::TlvIterator PbbAddressBlock::TlvErase (PbbAddressBlock::TlvIterator first, - PbbAddressBlock::TlvIterator last) + PbbAddressBlock::TlvIterator last) { return m_addressTlvList.Erase(first, last); } @@ -2066,8 +2068,8 @@ PbbAddressBlock::Serialize (Buffer::Iterator &start) const { uint8_t mid[GetAddressLength ()]; for (PbbAddressBlock::ConstAddressIterator iter = AddressBegin (); - iter != AddressEnd (); - iter++) + iter != AddressEnd (); + iter++) { SerializeAddress (mid, iter); start.Write (mid + headlen, GetAddressLength () - headlen - taillen); @@ -2078,13 +2080,13 @@ PbbAddressBlock::Serialize (Buffer::Iterator &start) const bufref.WriteU8 (flags); for (ConstPrefixIterator iter = PrefixBegin (); - iter != PrefixEnd (); - iter++) + iter != PrefixEnd (); + iter++) { start.WriteU8 (*iter); } } - + m_addressTlvList.Serialize (start); } @@ -2110,7 +2112,7 @@ PbbAddressBlock::Deserialize (Buffer::Iterator &start) if ((flags & AHAS_FULL_TAIL) ^ (flags & AHAS_ZERO_TAIL)) { taillen = start.ReadU8 (); - + if (flags & AHAS_FULL_TAIL) { start.Read (addrtmp + GetAddressLength () - taillen, taillen); @@ -2157,8 +2159,8 @@ PbbAddressBlock::Print (std::ostream &os, int level) const os << prefix << "PbbAddressBlock {" << std::endl; os << prefix << "\taddresses = " << std::endl; for (ConstAddressIterator iter = AddressBegin (); - iter != AddressEnd (); - iter++) + iter != AddressEnd (); + iter++) { os << prefix << "\t\t"; PrintAddress(os, iter); @@ -2167,8 +2169,8 @@ PbbAddressBlock::Print (std::ostream &os, int level) const os << prefix << "\tprefixes = " << std::endl; for (ConstPrefixIterator iter = PrefixBegin (); - iter != PrefixEnd (); - iter++) + iter != PrefixEnd (); + iter++) { os << prefix << "\t\t" << (int)(*iter) << std::endl; } @@ -2186,8 +2188,8 @@ PbbAddressBlock::operator== (const PbbAddressBlock &other) const ConstAddressIterator tai, oai; for (tai = AddressBegin (), oai = other.AddressBegin (); - tai != AddressEnd () && oai != other.AddressEnd (); - tai++, oai++) + tai != AddressEnd () && oai != other.AddressEnd (); + tai++, oai++) { if (*tai != *oai) { @@ -2202,8 +2204,8 @@ PbbAddressBlock::operator== (const PbbAddressBlock &other) const ConstPrefixIterator tpi, opi; for (tpi = PrefixBegin (), opi = other.PrefixBegin (); - tpi != PrefixEnd () && opi != other.PrefixEnd (); - tpi++, opi++) + tpi != PrefixEnd () && opi != other.PrefixEnd (); + tpi++, opi++) { if (*tpi != *opi) { @@ -2230,15 +2232,15 @@ PbbAddressBlock::GetPrefixFlags (void) const { switch (PrefixSize ()) { - case 0: - return 0; - break; - case 1: - return AHAS_SINGLE_PRE_LEN; - break; - default: - return AHAS_MULTI_PRE_LEN; - break; + case 0: + return 0; + break; + case 1: + return AHAS_SINGLE_PRE_LEN; + break; + default: + return AHAS_MULTI_PRE_LEN; + break; } /* Quiet compiler */ @@ -2247,7 +2249,7 @@ PbbAddressBlock::GetPrefixFlags (void) const void PbbAddressBlock::GetHeadTail (uint8_t *head, uint8_t &headlen, - uint8_t *tail, uint8_t &taillen) const + uint8_t *tail, uint8_t &taillen) const { headlen = GetAddressLength (); taillen = headlen; @@ -2261,8 +2263,8 @@ PbbAddressBlock::GetHeadTail (uint8_t *head, uint8_t &headlen, /* Skip the first item */ for (PbbAddressBlock::ConstAddressIterator iter = AddressBegin ()++; - iter != AddressEnd (); - iter++) + iter != AddressEnd (); + iter++) { SerializeAddress (bufcur, iter); @@ -2280,8 +2282,8 @@ PbbAddressBlock::GetHeadTail (uint8_t *head, uint8_t &headlen, if (headlen <= GetAddressLength () - 1) { for (i = GetAddressLength () - 1; - GetAddressLength () - 1 - i <= taillen && i > headlen; - i--) + GetAddressLength () - 1 - i <= taillen && i > headlen; + i--) { if (buflast[i] != bufcur[i]) { @@ -2692,7 +2694,7 @@ PbbTlv::Print (std::ostream &os, int level) const if (HasValue ()) { - os << prefix << "\thas value; size = " << GetValue (). GetSize () << std::endl; + os << prefix << "\thas value; size = " << GetValue ().GetSize () << std::endl; } os << prefix << "}" << std::endl; diff --git a/src/network/utils/packetbb.h b/src/network/utils/packetbb.h index 99db2720d..64275b588 100644 --- a/src/network/utils/packetbb.h +++ b/src/network/utils/packetbb.h @@ -946,7 +946,7 @@ public: * \return an iterator pointing to the next address block in the message. */ AddressBlockIterator AddressBlockErase (AddressBlockIterator first, - AddressBlockIterator last); + AddressBlockIterator last); /** * \brief Removes all address blocks from this message. @@ -1173,7 +1173,7 @@ public: * \return An iterator pointing to the newly inserted address. */ AddressIterator AddressInsert (AddressIterator position, - const Address value); + const Address value); /** * \brief Removes the address at the specified position. @@ -1453,7 +1453,7 @@ protected: private: uint8_t GetPrefixFlags (void) const; void GetHeadTail (uint8_t *head, uint8_t &headlen, - uint8_t *tail, uint8_t &taillen) const; + uint8_t *tail, uint8_t &taillen) const; bool HasZeroTail (const uint8_t *tail, uint8_t taillen) const; std::list
m_addressList; diff --git a/src/network/utils/pcap-file-wrapper.cc b/src/network/utils/pcap-file-wrapper.cc index d443221d3..3a989de2e 100644 --- a/src/network/utils/pcap-file-wrapper.cc +++ b/src/network/utils/pcap-file-wrapper.cc @@ -39,7 +39,7 @@ PcapFileWrapper::GetTypeId (void) UintegerValue (PcapFile::SNAPLEN_DEFAULT), MakeUintegerAccessor (&PcapFileWrapper::m_snapLen), MakeUintegerChecker (0, PcapFile::SNAPLEN_DEFAULT)) - ; + ; return tid; } diff --git a/src/network/utils/pcap-file-wrapper.h b/src/network/utils/pcap-file-wrapper.h index e024c006d..7a3b2f771 100644 --- a/src/network/utils/pcap-file-wrapper.h +++ b/src/network/utils/pcap-file-wrapper.h @@ -193,7 +193,7 @@ public: * See http://wiki.wireshark.org/Development/LibpcapFileFormat */ uint32_t GetDataLinkType (void); - + private: PcapFile m_file; uint32_t m_snapLen; diff --git a/src/network/utils/pcap-file.cc b/src/network/utils/pcap-file.cc index f9d1286a8..5d6f8a742 100644 --- a/src/network/utils/pcap-file.cc +++ b/src/network/utils/pcap-file.cc @@ -443,7 +443,7 @@ PcapFile::Read ( // // We don't always want to force the client to keep a maximum length buffer - // around so we allow her to specify a minimum number of bytes to read. + // around so we allow her to specify a minimum number of bytes to read. // Usually 64 bytes is enough information to print all of the headers, so // it isn't typically necessary to read all thousand bytes of an echo packet, // for example, to figure out what is going on. @@ -474,7 +474,7 @@ PcapFile::Diff (std::string const & f1, std::string const & f2, { return true; } - + uint8_t *data1 = new uint8_t [snapLen] (); uint8_t *data2 = new uint8_t [snapLen] (); uint32_t tsSec1, tsSec2; @@ -483,7 +483,7 @@ PcapFile::Diff (std::string const & f1, std::string const & f2, uint32_t origLen1, origLen2; uint32_t readLen1, readLen2; bool diff = false; - + while (!pcap1.Eof () && !pcap2.Eof ()) { pcap1.Read (data1, snapLen, tsSec1, tsUsec1, inclLen1, origLen1, readLen1); @@ -505,19 +505,19 @@ PcapFile::Diff (std::string const & f1, std::string const & f2, diff = true; // Next packet timestamps do not match break; } - + if (readLen1 != readLen2) { diff = true; // Packet lengths do not match break; } - + if (std::memcmp(data1, data2, readLen1) != 0) { diff = true; // Packet data do not match break; } - } + } sec = tsSec1; usec = tsUsec1; diff --git a/src/network/utils/pcap-file.h b/src/network/utils/pcap-file.h index 812c6405a..9edddb8a0 100644 --- a/src/network/utils/pcap-file.h +++ b/src/network/utils/pcap-file.h @@ -242,7 +242,7 @@ public: * See http://wiki.wireshark.org/Development/LibpcapFileFormat */ uint32_t GetDataLinkType (void); - + /** * \brief Compare two PCAP files packet-by-packet * @@ -292,6 +292,6 @@ private: bool m_swapMode; }; -}//namespace ns3 +} //namespace ns3 #endif /* PCAP_FILE_H */ diff --git a/src/network/utils/queue.cc b/src/network/utils/queue.cc index 165ee0655..e32b61931 100644 --- a/src/network/utils/queue.cc +++ b/src/network/utils/queue.cc @@ -37,7 +37,7 @@ Queue::GetTypeId (void) MakeTraceSourceAccessor (&Queue::m_traceDequeue)) .AddTraceSource ("Drop", "Drop a packet stored in the queue.", MakeTraceSourceAccessor (&Queue::m_traceDrop)) - ; + ; return tid; } @@ -75,7 +75,7 @@ Queue::Enqueue (Ptr p) uint32_t size = p->GetSize (); m_nBytes += size; m_nTotalReceivedBytes += size; - + m_nPackets++; m_nTotalReceivedPackets++; } diff --git a/src/network/utils/queue.h b/src/network/utils/queue.h index 0226b4265..753e2c229 100644 --- a/src/network/utils/queue.h +++ b/src/network/utils/queue.h @@ -33,7 +33,7 @@ namespace ns3 { /** - * \ingroup node + * \ingroup network * \defgroup queue Queue */ /** @@ -49,7 +49,7 @@ public: Queue (); virtual ~Queue (); - + /** * \return true if the queue is empty; false otherwise */ diff --git a/src/network/utils/radiotap-header.cc b/src/network/utils/radiotap-header.cc index e3fbb9b81..d9336056b 100644 --- a/src/network/utils/radiotap-header.cc +++ b/src/network/utils/radiotap-header.cc @@ -23,7 +23,7 @@ #include "ns3/log.h" #include "radiotap-header.h" -NS_LOG_COMPONENT_DEFINE ("RadiotapHeader"); +NS_LOG_COMPONENT_DEFINE ("RadiotapHeader"); namespace ns3 { @@ -39,7 +39,7 @@ RadiotapHeader::RadiotapHeader() m_channelFlags(CHANNEL_FLAG_NONE), m_antennaSignal(0), m_antennaNoise(0) -{ +{ NS_LOG_FUNCTION (this); } @@ -48,7 +48,7 @@ TypeId RadiotapHeader::GetTypeId (void) static TypeId tid = TypeId ("ns3::RadiotapHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } @@ -59,14 +59,14 @@ RadiotapHeader::GetInstanceTypeId (void) const return GetTypeId (); } -uint32_t +uint32_t RadiotapHeader::GetSerializedSize (void) const { NS_LOG_FUNCTION (this); return m_length; } -void +void RadiotapHeader::Serialize (Buffer::Iterator start) const { NS_LOG_FUNCTION (this); @@ -75,7 +75,7 @@ RadiotapHeader::Serialize (Buffer::Iterator start) const start.WriteU8 (0); // pad field start.WriteU16 (m_length); // entire length of radiotap data + header start.WriteU32 (m_present); // bits describing which fields follow header - + // // Time Synchronization Function Timer (when the first bit of the MPDU // arrived at the MAC) @@ -129,20 +129,20 @@ RadiotapHeader::Serialize (Buffer::Iterator start) const } } -uint32_t +uint32_t RadiotapHeader::Deserialize (Buffer::Iterator start) { NS_LOG_FUNCTION (this); - + uint8_t __attribute__ ((unused)) tmp = start.ReadU8 (); // major version of radiotap header NS_ASSERT_MSG (tmp == 0x00, "RadiotapHeader::Deserialize(): Unexpected major version"); start.ReadU8 (); // pad field - + m_length = start.ReadU16 (); // entire length of radiotap data + header m_present = start.ReadU32 (); // bits describing which fields follow header - + uint32_t bytesRead = 8; - + // // Time Synchronization Function Timer (when the first bit of the MPDU arrived at the MAC) // @@ -209,12 +209,12 @@ RadiotapHeader::Deserialize (Buffer::Iterator start) m_antennaNoise = start.ReadU8(); ++bytesRead; } - + NS_ASSERT_MSG(m_length == bytesRead, "RadiotapHeader::Deserialize(): expected and actual lengths inconsistent"); return bytesRead; } -void +void RadiotapHeader::Print (std::ostream &os) const { NS_LOG_FUNCTION (this); @@ -227,7 +227,7 @@ RadiotapHeader::Print (std::ostream &os) const << " noise=" << (int16_t) m_antennaNoise; } -void +void RadiotapHeader::SetTsft (uint64_t value) { NS_LOG_FUNCTION (this << value); @@ -242,7 +242,7 @@ RadiotapHeader::SetTsft (uint64_t value) NS_LOG_LOGIC (this << " m_length=" << m_length << " m_present=0x" << std::hex << m_present << std::dec); } -uint64_t +uint64_t RadiotapHeader::GetTsft () const { NS_LOG_FUNCTION (this); @@ -346,16 +346,17 @@ RadiotapHeader::SetAntennaSignalPower (double signal) m_antennaSignal = static_cast (floor(signal + 0.5)); } - NS_LOG_LOGIC (this << " m_length=" << m_length << " m_present=0x" << std::hex << m_present << std::dec);} + NS_LOG_LOGIC (this << " m_length=" << m_length << " m_present=0x" << std::hex << m_present << std::dec); +} -uint8_t +uint8_t RadiotapHeader::GetAntennaSignalPower (void) const { NS_LOG_FUNCTION (this); return m_antennaSignal; } -void +void RadiotapHeader::SetAntennaNoisePower (double noise) { NS_LOG_FUNCTION (this << noise); diff --git a/src/network/utils/radiotap-header.h b/src/network/utils/radiotap-header.h index 6cccde18e..13be11d64 100644 --- a/src/network/utils/radiotap-header.h +++ b/src/network/utils/radiotap-header.h @@ -25,7 +25,7 @@ #include namespace ns3 { - + /** * @brief Radiotap header implementation * @@ -43,7 +43,7 @@ namespace ns3 { * fields will end up aligned without the need of inserting padding space. By * the term "gap" I mean not using a field which would appear between two used * fields. Moral: don't leave gaps, or if you do be careful about how you - * do it. + * do it. */ class RadiotapHeader : public Header { @@ -96,7 +96,7 @@ public: * @param os The output stream */ virtual void Print (std::ostream &os) const; - + /** * @brief Set the Time Synchronization Function Timer (TSFT) value. Valid for * received frames only. @@ -179,7 +179,7 @@ public: * @returns The transmit/receive data rate in units of 500 kbps. */ uint16_t GetChannelFrequency (void) const; - + /** * @brief Get the channel flags of the transmitted or received frame. * @returns The frame flags. @@ -242,18 +242,18 @@ private: RADIOTAP_EXT = 0x10000000 }; - void CheckAddChannelField(); - - uint16_t m_length; - uint32_t m_present; - - uint64_t m_tsft; - uint8_t m_flags; - uint8_t m_rate; - uint16_t m_channelFreq; - uint16_t m_channelFlags; - int8_t m_antennaSignal; - int8_t m_antennaNoise; + void CheckAddChannelField(); + + uint16_t m_length; + uint32_t m_present; + + uint64_t m_tsft; + uint8_t m_flags; + uint8_t m_rate; + uint16_t m_channelFreq; + uint16_t m_channelFlags; + int8_t m_antennaSignal; + int8_t m_antennaNoise; }; } // namespace ns3 diff --git a/src/network/utils/sequence-number.h b/src/network/utils/sequence-number.h index 4a60ca99b..d935ea8fe 100644 --- a/src/network/utils/sequence-number.h +++ b/src/network/utils/sequence-number.h @@ -279,7 +279,7 @@ operator<< (std::ostream& os, const SequenceNumber &v os << val.m_value; return os; } - + template std::istream & operator >> (std::istream &is, const SequenceNumber &val) { diff --git a/src/network/utils/simple-channel.cc b/src/network/utils/simple-channel.cc index c0d3760cf..145b825a7 100644 --- a/src/network/utils/simple-channel.cc +++ b/src/network/utils/simple-channel.cc @@ -36,43 +36,44 @@ SimpleChannel::GetTypeId (void) static TypeId tid = TypeId ("ns3::SimpleChannel") .SetParent () .AddConstructor () - ; + ; return tid; } SimpleChannel::SimpleChannel () -{} +{ +} void -SimpleChannel::Send (Ptr p, uint16_t protocol, - Mac48Address to, Mac48Address from, - Ptr sender) +SimpleChannel::Send (Ptr p, uint16_t protocol, + Mac48Address to, Mac48Address from, + Ptr sender) { NS_LOG_FUNCTION (p << protocol << to << from << sender); for (std::vector >::const_iterator i = m_devices.begin (); i != m_devices.end (); ++i) { Ptr tmp = *i; if (tmp == sender) - { - continue; - } + { + continue; + } Simulator::ScheduleWithContext (tmp->GetNode ()->GetId (), Seconds (0), &SimpleNetDevice::Receive, tmp, p->Copy (), protocol, to, from); } } -void +void SimpleChannel::Add (Ptr device) { m_devices.push_back (device); } -uint32_t +uint32_t SimpleChannel::GetNDevices (void) const { return m_devices.size (); } -Ptr +Ptr SimpleChannel::GetDevice (uint32_t i) const { return m_devices[i]; diff --git a/src/network/utils/simple-channel.h b/src/network/utils/simple-channel.h index e13329b8d..912b6591a 100644 --- a/src/network/utils/simple-channel.h +++ b/src/network/utils/simple-channel.h @@ -40,7 +40,7 @@ public: SimpleChannel (); void Send (Ptr p, uint16_t protocol, Mac48Address to, Mac48Address from, - Ptr sender); + Ptr sender); void Add (Ptr device); diff --git a/src/network/utils/simple-net-device.cc b/src/network/utils/simple-net-device.cc index 6a2208c48..eaf7b53af 100644 --- a/src/network/utils/simple-net-device.cc +++ b/src/network/utils/simple-net-device.cc @@ -46,7 +46,7 @@ SimpleNetDevice::GetTypeId (void) .AddTraceSource ("PhyRxDrop", "Trace source indicating a packet has been dropped by the device during reception", MakeTraceSourceAccessor (&SimpleNetDevice::m_phyRxDropTrace)) - ; + ; return tid; } @@ -55,11 +55,12 @@ SimpleNetDevice::SimpleNetDevice () m_node (0), m_mtu (0xffff), m_ifIndex (0) -{} +{ +} -void -SimpleNetDevice::Receive (Ptr packet, uint16_t protocol, - Mac48Address to, Mac48Address from) +void +SimpleNetDevice::Receive (Ptr packet, uint16_t protocol, + Mac48Address to, Mac48Address from) { NS_LOG_FUNCTION (packet << protocol << to << from); NetDevice::PacketType packetType; diff --git a/src/nix-vector-routing/doc/nix-vector-routing.h b/src/nix-vector-routing/doc/nix-vector-routing.h index d2a67df59..835140b26 100644 --- a/src/nix-vector-routing/doc/nix-vector-routing.h +++ b/src/nix-vector-routing/doc/nix-vector-routing.h @@ -19,8 +19,7 @@ */ /** - * \ingroup routing - * \defgroup nixvectorrouting Nix-vector Routing + * \defgroup nixvectorrouting Nix-Vector Routing * * \section model Model * diff --git a/src/nix-vector-routing/examples/nix-simple.cc b/src/nix-vector-routing/examples/nix-simple.cc index e7ddfb892..7aabc4f89 100644 --- a/src/nix-vector-routing/examples/nix-simple.cc +++ b/src/nix-vector-routing/examples/nix-simple.cc @@ -42,7 +42,7 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("NixSimpleExample"); - int +int main (int argc, char *argv[]) { LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_INFO); @@ -64,7 +64,7 @@ main (int argc, char *argv[]) pointToPoint.SetChannelAttribute ("Delay", StringValue ("2ms")); NodeContainer allNodes = NodeContainer (nodes12, nodes23.Get (1), nodes34.Get (1)); - + // NixHelper to install nix-vector routing // on all nodes Ipv4NixVectorHelper nixRouting; @@ -75,7 +75,7 @@ main (int argc, char *argv[]) list.Add (nixRouting, 10); InternetStackHelper stack; - stack.SetRoutingHelper (list); + stack.SetRoutingHelper (list); // has effect on the next Install () stack.Install (allNodes); NetDeviceContainer devices12; diff --git a/src/nix-vector-routing/examples/nms-p2p-nix.cc b/src/nix-vector-routing/examples/nms-p2p-nix.cc index b51215652..c7834d71d 100644 --- a/src/nix-vector-routing/examples/nms-p2p-nix.cc +++ b/src/nix-vector-routing/examples/nms-p2p-nix.cc @@ -83,7 +83,7 @@ main (int argc, char *argv[]) if (nCN < 2) { cout << "Number of total CNs (" << nCN << ") lower than minimum of 2" - << endl; + << endl; return 1; } @@ -116,7 +116,7 @@ main (int argc, char *argv[]) if (nix) { - stack.SetRoutingHelper (list); + stack.SetRoutingHelper (list); // has effect on the next Install () } // Create Campus Networks @@ -336,7 +336,7 @@ main (int argc, char *argv[]) ifs3[z][i] = address.Assign (ndc3[i]); } } - // Create Ring Links + // Create Ring Links if (nCN > 1) { cout << "Forming Ring Topology..." << endl; @@ -363,11 +363,11 @@ main (int argc, char *argv[]) cout << "Creating TCP Traffic Flows:" << endl; Config::SetDefault ("ns3::OnOffApplication::MaxBytes", UintegerValue (500000)); Config::SetDefault ("ns3::OnOffApplication::OnTime", - RandomVariableValue (ConstantVariable (1))); + RandomVariableValue (ConstantVariable (1))); Config::SetDefault ("ns3::OnOffApplication::OffTime", - RandomVariableValue (ConstantVariable (0))); + RandomVariableValue (ConstantVariable (0))); Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (512)); - + UniformVariable urng; int r1; double r2; @@ -386,7 +386,7 @@ main (int argc, char *argv[]) { // Sinks PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory", - InetSocketAddress (Ipv4Address::GetAny (), 9999)); + InetSocketAddress (Ipv4Address::GetAny (), 9999)); ApplicationContainer sinkApp = sinkHelper.Install ( nodes_net2LAN[z][i][j].Get (0)); sinkApp.Start (Seconds (0.0)); @@ -395,12 +395,12 @@ main (int argc, char *argv[]) r2 = 10 * urng.GetValue (); OnOffHelper client ("ns3::TcpSocketFactory", Address ()); AddressValue remoteAddress(InetSocketAddress ( - ifs2LAN[z][i][j].GetAddress (0), 9999)); - client.SetAttribute ("Remote", remoteAddress); - ApplicationContainer clientApp; - clientApp.Add (client.Install (nodes_net1[x][r1].Get (0))); - clientApp.Start (Seconds (r2)); - } + ifs2LAN[z][i][j].GetAddress (0), 9999)); + client.SetAttribute ("Remote", remoteAddress); + ApplicationContainer clientApp; + clientApp.Add (client.Install (nodes_net1[x][r1].Get (0))); + clientApp.Start (Seconds (r2)); + } } // Subnet 3 LANs cout << "Net3 ]" << endl; @@ -410,7 +410,7 @@ main (int argc, char *argv[]) { // Sinks PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory", - InetSocketAddress (Ipv4Address::GetAny (), 9999)); + InetSocketAddress (Ipv4Address::GetAny (), 9999)); ApplicationContainer sinkApp = sinkHelper.Install ( nodes_net3LAN[z][i][j].Get (0)); sinkApp.Start (Seconds (0.0)); @@ -419,7 +419,7 @@ main (int argc, char *argv[]) r2 = 10 * urng.GetValue (); OnOffHelper client ("ns3::TcpSocketFactory", Address ()); AddressValue remoteAddress (InetSocketAddress ( - ifs3LAN[z][i][j].GetAddress (0), 9999)); + ifs3LAN[z][i][j].GetAddress (0), 9999)); client.SetAttribute ("Remote", remoteAddress); ApplicationContainer clientApp; clientApp.Add (client.Install (nodes_net1[x][r1].Get (0))); diff --git a/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc b/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc index b694bad85..b8b937561 100644 --- a/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc +++ b/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc @@ -40,12 +40,12 @@ Ipv4NixVectorRouting::GetTypeId (void) static TypeId tid = TypeId ("ns3::Ipv4NixVectorRouting") .SetParent () .AddConstructor () - ; + ; return tid; } Ipv4NixVectorRouting::Ipv4NixVectorRouting () -:m_totalNeighbors (0) + : m_totalNeighbors (0) { NS_LOG_FUNCTION_NOARGS (); } @@ -88,20 +88,20 @@ Ipv4NixVectorRouting::SetNode (Ptr node) void Ipv4NixVectorRouting::FlushGlobalNixRoutingCache () { - NS_LOG_FUNCTION_NOARGS (); - NodeList::Iterator listEnd = NodeList::End (); - for (NodeList::Iterator i = NodeList::Begin (); i != listEnd; i++) - { - Ptr node = *i; - Ptr rp = node->GetObject (); - if (!rp) - { - continue; - } - NS_LOG_LOGIC ("Flushing Nix caches."); - rp->FlushNixCache (); - rp->FlushIpv4RouteCache (); - } + NS_LOG_FUNCTION_NOARGS (); + NodeList::Iterator listEnd = NodeList::End (); + for (NodeList::Iterator i = NodeList::Begin (); i != listEnd; i++) + { + Ptr node = *i; + Ptr rp = node->GetObject (); + if (!rp) + { + continue; + } + NS_LOG_LOGIC ("Flushing Nix caches."); + rp->FlushNixCache (); + rp->FlushIpv4RouteCache (); + } } void @@ -214,7 +214,7 @@ Ipv4NixVectorRouting::BuildNixVectorLocal (Ptr nixVector) { NS_LOG_LOGIC ("Adding loopback to nix."); NS_LOG_LOGIC ("Adding Nix: " << i << " with " << nixVector->BitCount (numberOfDevices) - << " bits, for node " << m_node->GetId()); + << " bits, for node " << m_node->GetId()); nixVector->AddNeighborIndex (i, nixVector->BitCount (numberOfDevices)); return true; } @@ -286,7 +286,7 @@ Ipv4NixVectorRouting::BuildNixVector (const std::vector< Ptr > & parentVec totalNeighbors += netDeviceContainer.GetN (); } NS_LOG_LOGIC ("Adding Nix: " << destId << " with " - << nixVector->BitCount (totalNeighbors) << " bits, for node " << parentNode->GetId()); + << nixVector->BitCount (totalNeighbors) << " bits, for node " << parentNode->GetId()); nixVector->AddNeighborIndex (destId, nixVector->BitCount (totalNeighbors)); // recurse through parent vector, grabbing the path @@ -520,7 +520,7 @@ Ipv4NixVectorRouting::RouteOutput (Ptr p, const Ipv4Header &header, Ptr< { m_totalNeighbors = FindTotalNeighbors (); } - + // Get the interface number that we go out of, by extracting // from the nix-vector uint32_t numberOfBits = nixVectorForPacket->BitCount (m_totalNeighbors); @@ -603,8 +603,8 @@ Ipv4NixVectorRouting::RouteOutput (Ptr p, const Ipv4Header &header, Ptr< bool Ipv4NixVectorRouting::RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) { NS_LOG_FUNCTION_NOARGS (); @@ -648,7 +648,7 @@ Ipv4NixVectorRouting::RouteInput (Ptr p, const Ipv4Header &header, } NS_LOG_LOGIC ("At Node " << m_node->GetId() << ", Extracting " << numberOfBits << - " bits from Nix-vector: " << nixVector << " : " << *nixVector); + " bits from Nix-vector: " << nixVector << " : " << *nixVector); // call the unicast callback // local deliver is handled by Ipv4StaticRoutingImpl @@ -827,11 +827,11 @@ Ipv4NixVectorRouting::BFS (uint32_t numberOfNodes, Ptr source, continue; } } - if (!(localNetDevice->IsLinkUp ())) - { - NS_LOG_LOGIC ("Link is down."); - continue; - } + if (!(localNetDevice->IsLinkUp ())) + { + NS_LOG_LOGIC ("Link is down."); + continue; + } Ptr channel = localNetDevice->GetChannel (); if (channel == 0) { @@ -868,7 +868,7 @@ Ipv4NixVectorRouting::BFS (uint32_t numberOfNodes, Ptr source, // It is now black. greyNodeList.pop (); } - + // Didn't find the dest... return false; } diff --git a/src/nix-vector-routing/model/ipv4-nix-vector-routing.h b/src/nix-vector-routing/model/ipv4-nix-vector-routing.h index 4c671d98a..e56696e8e 100644 --- a/src/nix-vector-routing/model/ipv4-nix-vector-routing.h +++ b/src/nix-vector-routing/model/ipv4-nix-vector-routing.h @@ -48,123 +48,123 @@ typedef std::map > Ipv4RouteMap_t; */ class Ipv4NixVectorRouting : public Ipv4RoutingProtocol { - public: - Ipv4NixVectorRouting (); - ~Ipv4NixVectorRouting (); - /** - * @brief The Interface ID of the Global Router interface. - * - * @see Object::GetObject () - */ - static TypeId GetTypeId (void); - /** - * @brief Set the Node pointer of the node for which this - * routing protocol is to be placed - * - * @param node Node pointer - */ - void SetNode (Ptr node); +public: + Ipv4NixVectorRouting (); + ~Ipv4NixVectorRouting (); + /** + * @brief The Interface ID of the Global Router interface. + * + * @see Object::GetObject () + */ + static TypeId GetTypeId (void); + /** + * @brief Set the Node pointer of the node for which this + * routing protocol is to be placed + * + * @param node Node pointer + */ + void SetNode (Ptr node); - /** - * @brief Called when run-time link topology change occurs - * which iterates through the node list and flushes any - * nix vector caches - * - */ - void FlushGlobalNixRoutingCache (void); + /** + * @brief Called when run-time link topology change occurs + * which iterates through the node list and flushes any + * nix vector caches + * + */ + void FlushGlobalNixRoutingCache (void); - private: - /* flushes the cache which stores nix-vector based on - * destination IP */ - void FlushNixCache (void); +private: + /* flushes the cache which stores nix-vector based on + * destination IP */ + void FlushNixCache (void); - /* flushes the cache which stores the Ipv4 route - * based on the destination IP */ - void FlushIpv4RouteCache (void); + /* flushes the cache which stores the Ipv4 route + * based on the destination IP */ + void FlushIpv4RouteCache (void); - /* upon a run-time topology change caches are - * flushed and the total number of neighbors is - * reset to zero */ - void ResetTotalNeighbors (void); + /* upon a run-time topology change caches are + * flushed and the total number of neighbors is + * reset to zero */ + void ResetTotalNeighbors (void); - /* takes in the source node and dest IP and calls GetNodeByIp, - * BFS, accounting for any output interface specified, and finally - * BuildNixVector to return the built nix-vector */ - Ptr GetNixVector (Ptr, Ipv4Address, Ptr); + /* takes in the source node and dest IP and calls GetNodeByIp, + * BFS, accounting for any output interface specified, and finally + * BuildNixVector to return the built nix-vector */ + Ptr GetNixVector (Ptr, Ipv4Address, Ptr); - /* checks the cache based on dest IP for the nix-vector */ - Ptr GetNixVectorInCache (Ipv4Address); + /* checks the cache based on dest IP for the nix-vector */ + Ptr GetNixVectorInCache (Ipv4Address); - /* checks the cache based on dest IP for the Ipv4Route */ - Ptr GetIpv4RouteInCache (Ipv4Address); + /* checks the cache based on dest IP for the Ipv4Route */ + Ptr GetIpv4RouteInCache (Ipv4Address); - /* given a net-device returns all the adjacent net-devices, - * essentially getting the neighbors on that channel */ - void GetAdjacentNetDevices (Ptr, Ptr, NetDeviceContainer &); + /* given a net-device returns all the adjacent net-devices, + * essentially getting the neighbors on that channel */ + void GetAdjacentNetDevices (Ptr, Ptr, NetDeviceContainer &); - /* iterates through the node list and finds the one - * corresponding to the given Ipv4Address */ - Ptr GetNodeByIp (Ipv4Address); + /* iterates through the node list and finds the one + * corresponding to the given Ipv4Address */ + Ptr GetNodeByIp (Ipv4Address); - /* Recurses the parent vector, created by BFS and actually builds the nixvector */ - bool BuildNixVector (const std::vector< Ptr > & parentVector, uint32_t source, uint32_t dest, Ptr nixVector); + /* Recurses the parent vector, created by BFS and actually builds the nixvector */ + bool BuildNixVector (const std::vector< Ptr > & parentVector, uint32_t source, uint32_t dest, Ptr nixVector); - /* special variation of BuildNixVector for when a node is sending to itself */ - bool BuildNixVectorLocal (Ptr nixVector); + /* special variation of BuildNixVector for when a node is sending to itself */ + bool BuildNixVectorLocal (Ptr nixVector); - /* simple iterates through the nodes net-devices and determines - * how many neighbors it has */ - uint32_t FindTotalNeighbors (void); + /* simple iterates through the nodes net-devices and determines + * how many neighbors it has */ + uint32_t FindTotalNeighbors (void); - /* determine if the netdevice is bridged */ - Ptr NetDeviceIsBridged (Ptr nd) const; + /* determine if the netdevice is bridged */ + Ptr NetDeviceIsBridged (Ptr nd) const; - /* Nix index is with respect to the neighbors. The net-device index must be - * derived from this */ - uint32_t FindNetDeviceForNixIndex (uint32_t nodeIndex, Ipv4Address & gatewayIp); + /* Nix index is with respect to the neighbors. The net-device index must be + * derived from this */ + uint32_t FindNetDeviceForNixIndex (uint32_t nodeIndex, Ipv4Address & gatewayIp); - /* Breadth first search algorithm - * Param1: total number of nodes - * Param2: Source Node - * Param3: Dest Node - * Param4: (returned) Parent vector for retracing routes - * Param5: specific output interface to use from source node, if not null - * Returns: false if dest not found, true o.w. - */ - bool BFS (uint32_t numberOfNodes, - Ptr source, - Ptr dest, - std::vector< Ptr > & parentVector, - Ptr oif); + /* Breadth first search algorithm + * Param1: total number of nodes + * Param2: Source Node + * Param3: Dest Node + * Param4: (returned) Parent vector for retracing routes + * Param5: specific output interface to use from source node, if not null + * Returns: false if dest not found, true o.w. + */ + bool BFS (uint32_t numberOfNodes, + Ptr source, + Ptr dest, + std::vector< Ptr > & parentVector, + Ptr oif); - void DoDispose (void); + void DoDispose (void); - /* From Ipv4RoutingProtocol */ - virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); - virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb); - virtual void NotifyInterfaceUp (uint32_t interface); - virtual void NotifyInterfaceDown (uint32_t interface); - virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); - virtual void SetIpv4 (Ptr ipv4); - virtual void PrintRoutingTable (Ptr stream) const; + /* From Ipv4RoutingProtocol */ + virtual Ptr RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr); + virtual bool RouteInput (Ptr p, const Ipv4Header &header, Ptr idev, + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb); + virtual void NotifyInterfaceUp (uint32_t interface); + virtual void NotifyInterfaceDown (uint32_t interface); + virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address); + virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address); + virtual void SetIpv4 (Ptr ipv4); + virtual void PrintRoutingTable (Ptr stream) const; - /* cache stores nix-vectors based on destination ip */ - NixMap_t m_nixCache; + /* cache stores nix-vectors based on destination ip */ + NixMap_t m_nixCache; - /* cache stores Ipv4Routes based on destination ip */ - Ipv4RouteMap_t m_ipv4RouteCache; + /* cache stores Ipv4Routes based on destination ip */ + Ipv4RouteMap_t m_ipv4RouteCache; - Ptr m_ipv4; - Ptr m_node; + Ptr m_ipv4; + Ptr m_node; - /* total neighbors used for nix-vector to determine - * number of bits */ - uint32_t m_totalNeighbors; + /* total neighbors used for nix-vector to determine + * number of bits */ + uint32_t m_totalNeighbors; }; } // namespace ns3 #endif diff --git a/src/olsr/doc/olsr.h b/src/olsr/doc/olsr.h index 0b37c5c22..caf2ce73f 100644 --- a/src/olsr/doc/olsr.h +++ b/src/olsr/doc/olsr.h @@ -22,8 +22,7 @@ #define OLSR_H /** - * \ingroup routing - * \defgroup olsr OLSR + * \defgroup olsr OLSR Routing * * \section model Model * diff --git a/src/olsr/examples/olsr-hna.cc b/src/olsr/examples/olsr-hna.cc index b6c53ef27..709dcca98 100644 --- a/src/olsr/examples/olsr-hna.cc +++ b/src/olsr/examples/olsr-hna.cc @@ -81,7 +81,7 @@ static void GenerateTraffic (Ptr socket, uint32_t pktSize, { socket->Send (Create (pktSize)); Simulator::Schedule (pktInterval, &GenerateTraffic, - socket, pktSize,pktCount-1, pktInterval); + socket, pktSize,pktCount-1, pktInterval); } else { @@ -111,7 +111,7 @@ int main (int argc, char *argv[]) cmd.AddValue ("verbose", "turn on all WifiNetDevice log components", verbose); cmd.AddValue ("assocMethod1", "Use SetRoutingTableAssociation () method", assocMethod1); cmd.AddValue ("assocMethod2", "Use AddHostNetworkAssociation () method", assocMethod2); - + cmd.Parse (argc, argv); // Convert to time object Time interPacketInterval = Seconds (interval); @@ -156,7 +156,7 @@ int main (int argc, char *argv[]) NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode",StringValue(phyMode), - "ControlMode",StringValue(phyMode)); + "ControlMode",StringValue(phyMode)); // Set it to adhoc mode wifiMac.SetType ("ns3::AdhocWifiMac"); NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, olsrNodes); @@ -188,7 +188,7 @@ int main (int argc, char *argv[]) list.Add (olsr, 10); InternetStackHelper internet_olsr; - internet_olsr.SetRoutingHelper (list); + internet_olsr.SetRoutingHelper (list); // has effect on the next Install () internet_olsr.Install (olsrNodes); InternetStackHelper internet_csma; @@ -214,7 +214,7 @@ int main (int argc, char *argv[]) // Obtain olsr::RoutingProtocol instance of gateway node // (namely, node B) and add the required association - Ptr stack = olsrNodes.Get (1) -> GetObject (); + Ptr stack = olsrNodes.Get (1)->GetObject (); Ptr rp_Gw = (stack->GetRoutingProtocol ()); Ptr lrp_Gw = DynamicCast (rp_Gw); diff --git a/src/olsr/examples/simple-point-to-point-olsr.cc b/src/olsr/examples/simple-point-to-point-olsr.cc index d3a691d17..272b36bd3 100644 --- a/src/olsr/examples/simple-point-to-point-olsr.cc +++ b/src/olsr/examples/simple-point-to-point-olsr.cc @@ -67,7 +67,7 @@ main (int argc, char *argv[]) Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210)); Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s")); - //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30); + //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30); // Allow the user to override any of the defaults and the above // DefaultValue::Bind ()s at run-time, via command-line arguments @@ -95,7 +95,7 @@ main (int argc, char *argv[]) list.Add (olsr, 10); InternetStackHelper internet; - internet.SetRoutingHelper (list); + internet.SetRoutingHelper (list); // has effect on the next Install () internet.Install (c); // We create the channels first without any IP addressing information @@ -109,8 +109,8 @@ main (int argc, char *argv[]) p2p.SetChannelAttribute ("Delay", StringValue ("10ms")); NetDeviceContainer nd32 = p2p.Install (n32); NetDeviceContainer nd34 = p2p.Install (n34); - - // Later, we add IP addresses. + + // Later, we add IP addresses. NS_LOG_INFO ("Assign IP Addresses."); Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.0"); @@ -118,7 +118,7 @@ main (int argc, char *argv[]) ipv4.SetBase ("10.1.2.0", "255.255.255.0"); Ipv4InterfaceContainer i12 = ipv4.Assign (nd12); - + ipv4.SetBase ("10.1.3.0", "255.255.255.0"); Ipv4InterfaceContainer i32 = ipv4.Assign (nd32); diff --git a/src/olsr/helper/olsr-helper.cc b/src/olsr/helper/olsr-helper.cc index fc9009d52..447cbd06b 100644 --- a/src/olsr/helper/olsr-helper.cc +++ b/src/olsr/helper/olsr-helper.cc @@ -51,7 +51,7 @@ OlsrHelper::ExcludeInterface (Ptr node, uint32_t interface) { std::set interfaces; interfaces.insert (interface); - + m_interfaceExclusions.insert (std::make_pair (node, std::set (interfaces) )); } else diff --git a/src/olsr/helper/olsr-helper.h b/src/olsr/helper/olsr-helper.h index 18b8687ee..058658fd8 100644 --- a/src/olsr/helper/olsr-helper.h +++ b/src/olsr/helper/olsr-helper.h @@ -59,12 +59,12 @@ public: */ OlsrHelper* Copy (void) const; - /** - * \param node the node for which an exception is to be defined - * \param interface an interface of node on which OLSR is not to be installed - * - * This method allows the user to specify an interface on which OLSR is not to be installed on - */ + /** + * \param node the node for which an exception is to be defined + * \param interface an interface of node on which OLSR is not to be installed + * + * This method allows the user to specify an interface on which OLSR is not to be installed on + */ void ExcludeInterface (Ptr node, uint32_t interface); /** diff --git a/src/olsr/model/olsr-header.cc b/src/olsr/model/olsr-header.cc index d1aaa72a1..42a18a3dd 100644 --- a/src/olsr/model/olsr-header.cc +++ b/src/olsr/model/olsr-header.cc @@ -46,7 +46,7 @@ uint8_t SecondsToEmf (double seconds) { int a, b = 0; - + // find the largest integer 'b' such that: T/C >= 2^b for (b = 0; (seconds/OLSR_C) >= (1 << b); ++b) ; @@ -72,7 +72,7 @@ SecondsToEmf (double seconds) NS_ASSERT (b >= 0 && b < 16); // the field will be a byte holding the value a*16+b - return (uint8_t) ((a << 4) | b); + return (uint8_t)((a << 4) | b); } /// @@ -97,10 +97,12 @@ EmfToSeconds (uint8_t olsrFormat) NS_OBJECT_ENSURE_REGISTERED (PacketHeader); PacketHeader::PacketHeader () -{} +{ +} PacketHeader::~PacketHeader () -{} +{ +} TypeId PacketHeader::GetTypeId (void) @@ -108,7 +110,7 @@ PacketHeader::GetTypeId (void) static TypeId tid = TypeId ("ns3::olsr::PacketHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } TypeId @@ -153,10 +155,12 @@ NS_OBJECT_ENSURE_REGISTERED (MessageHeader); MessageHeader::MessageHeader () : m_messageType (MessageHeader::MessageType (0)) -{} +{ +} MessageHeader::~MessageHeader () -{} +{ +} TypeId MessageHeader::GetTypeId (void) @@ -164,7 +168,7 @@ MessageHeader::GetTypeId (void) static TypeId tid = TypeId ("ns3::olsr::MessageHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } TypeId @@ -304,12 +308,12 @@ MessageHeader::Mid::Deserialize (Buffer::Iterator start, uint32_t messageSize) this->interfaceAddresses.clear (); NS_ASSERT (messageSize % IPV4_ADDRESS_SIZE == 0); - + int numAddresses = messageSize / IPV4_ADDRESS_SIZE; this->interfaceAddresses.erase (this->interfaceAddresses.begin(), this->interfaceAddresses.end ()); for (int n = 0; n < numAddresses; ++n) - this->interfaceAddresses.push_back (Ipv4Address (i.ReadNtohU32 ())); + this->interfaceAddresses.push_back (Ipv4Address (i.ReadNtohU32 ())); return GetSerializedSize (); } @@ -345,7 +349,7 @@ MessageHeader::Hello::Serialize (Buffer::Iterator start) const i.WriteU16 (0); // Reserved i.WriteU8 (this->hTime); i.WriteU8 (this->willingness); - + for (std::vector::const_iterator iter = this->linkMessages.begin (); iter != this->linkMessages.end (); iter++) { @@ -359,7 +363,7 @@ MessageHeader::Hello::Serialize (Buffer::Iterator start) const // next "Link Code" field (or - if there are no more link types // - the end of the message). i.WriteHtonU16 (4 + lm.neighborInterfaceAddresses.size () * IPV4_ADDRESS_SIZE); - + for (std::vector::const_iterator neigh_iter = lm.neighborInterfaceAddresses.begin (); neigh_iter != lm.neighborInterfaceAddresses.end (); neigh_iter++) { @@ -376,13 +380,13 @@ MessageHeader::Hello::Deserialize (Buffer::Iterator start, uint32_t messageSize) NS_ASSERT (messageSize >= 4); this->linkMessages.clear (); - + uint16_t helloSizeLeft = messageSize; - + i.ReadNtohU16 (); // Reserved this->hTime = i.ReadU8 (); this->willingness = i.ReadU8 (); - + helloSizeLeft -= 4; while (helloSizeLeft) @@ -445,7 +449,7 @@ MessageHeader::Tc::Deserialize (Buffer::Iterator start, uint32_t messageSize) this->ansn = i.ReadNtohU16 (); i.ReadNtohU16 (); // Reserved - + NS_ASSERT ((messageSize - 4) % IPV4_ADDRESS_SIZE == 0); int numAddresses = (messageSize - 4) / IPV4_ADDRESS_SIZE; this->neighborAddresses.clear (); @@ -494,10 +498,11 @@ MessageHeader::Hna::Deserialize (Buffer::Iterator start, uint32_t messageSize) { Ipv4Address address (i.ReadNtohU32 ()); Ipv4Mask mask (i.ReadNtohU32 ()); - this->associations.push_back ((Association) {address, mask}); + this->associations.push_back ((Association) { address, mask}); } return messageSize; } -}} // namespace olsr, ns3 +} +} // namespace olsr, ns3 diff --git a/src/olsr/model/olsr-header.h b/src/olsr/model/olsr-header.h index e1579e898..74c726362 100644 --- a/src/olsr/model/olsr-header.h +++ b/src/olsr/model/olsr-header.h @@ -94,7 +94,7 @@ private: uint16_t m_packetLength; uint16_t m_packetSequenceNumber; -public: +public: static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; virtual void Print (std::ostream &os) const; @@ -189,7 +189,7 @@ public: // { // return m_messageSize; // } - + private: MessageType m_messageType; uint8_t m_vTime; @@ -199,7 +199,7 @@ private: uint16_t m_messageSequenceNumber; uint16_t m_messageSize; -public: +public: static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; virtual void Print (std::ostream &os) const; @@ -431,7 +431,7 @@ public: return m_message.hna; } - + }; @@ -464,7 +464,8 @@ static inline std::ostream& operator<< (std::ostream& os, const MessageList & me } -}} // namespace olsr, ns3 +} +} // namespace olsr, ns3 #endif /* OLSR_HEADER_H */ diff --git a/src/olsr/model/olsr-repositories.h b/src/olsr/model/olsr-repositories.h index df80bf884..dba957e51 100644 --- a/src/olsr/model/olsr-repositories.h +++ b/src/olsr/model/olsr-repositories.h @@ -39,266 +39,266 @@ namespace ns3 { namespace olsr { /// An Interface Association Tuple. -struct IfaceAssocTuple -{ - /// Interface address of a node. - Ipv4Address ifaceAddr; - /// Main address of the node. - Ipv4Address mainAddr; - /// Time at which this tuple expires and must be removed. - Time time; -}; + struct IfaceAssocTuple + { + /// Interface address of a node. + Ipv4Address ifaceAddr; + /// Main address of the node. + Ipv4Address mainAddr; + /// Time at which this tuple expires and must be removed. + Time time; + }; -static inline bool -operator == (const IfaceAssocTuple &a, const IfaceAssocTuple &b) -{ - return (a.ifaceAddr == b.ifaceAddr - && a.mainAddr == b.mainAddr); -} + static inline bool + operator == (const IfaceAssocTuple &a, const IfaceAssocTuple &b) + { + return (a.ifaceAddr == b.ifaceAddr + && a.mainAddr == b.mainAddr); + } -static inline std::ostream& -operator << (std::ostream &os, const IfaceAssocTuple &tuple) -{ - os << "IfaceAssocTuple(ifaceAddr=" << tuple.ifaceAddr - << ", mainAddr=" << tuple.mainAddr - << ", time=" << tuple.time << ")"; - return os; -} + static inline std::ostream& + operator << (std::ostream &os, const IfaceAssocTuple &tuple) + { + os << "IfaceAssocTuple(ifaceAddr=" << tuple.ifaceAddr + << ", mainAddr=" << tuple.mainAddr + << ", time=" << tuple.time << ")"; + return os; + } /// A Link Tuple. -struct LinkTuple -{ - /// Interface address of the local node. - Ipv4Address localIfaceAddr; - /// Interface address of the neighbor node. - Ipv4Address neighborIfaceAddr; - /// The link is considered bidirectional until this time. - Time symTime; - /// The link is considered unidirectional until this time. - Time asymTime; - /// Time at which this tuple expires and must be removed. - Time time; -}; + struct LinkTuple + { + /// Interface address of the local node. + Ipv4Address localIfaceAddr; + /// Interface address of the neighbor node. + Ipv4Address neighborIfaceAddr; + /// The link is considered bidirectional until this time. + Time symTime; + /// The link is considered unidirectional until this time. + Time asymTime; + /// Time at which this tuple expires and must be removed. + Time time; + }; -static inline bool -operator == (const LinkTuple &a, const LinkTuple &b) -{ - return (a.localIfaceAddr == b.localIfaceAddr - && a.neighborIfaceAddr == b.neighborIfaceAddr); -} + static inline bool + operator == (const LinkTuple &a, const LinkTuple &b) + { + return (a.localIfaceAddr == b.localIfaceAddr + && a.neighborIfaceAddr == b.neighborIfaceAddr); + } -static inline std::ostream& -operator << (std::ostream &os, const LinkTuple &tuple) -{ - os << "LinkTuple(localIfaceAddr=" << tuple.localIfaceAddr - << ", neighborIfaceAddr=" << tuple.neighborIfaceAddr - << ", symTime=" << tuple.symTime - << ", asymTime=" << tuple.asymTime - << ", expTime=" << tuple.time - << ")"; - return os; -} + static inline std::ostream& + operator << (std::ostream &os, const LinkTuple &tuple) + { + os << "LinkTuple(localIfaceAddr=" << tuple.localIfaceAddr + << ", neighborIfaceAddr=" << tuple.neighborIfaceAddr + << ", symTime=" << tuple.symTime + << ", asymTime=" << tuple.asymTime + << ", expTime=" << tuple.time + << ")"; + return os; + } /// A Neighbor Tuple. -struct NeighborTuple -{ - /// Main address of a neighbor node. - Ipv4Address neighborMainAddr; - /// Neighbor Type and Link Type at the four less significative digits. - enum Status { - STATUS_NOT_SYM = 0, // "not symmetric" - STATUS_SYM = 1, // "symmetric" - } status; - /// A value between 0 and 7 specifying the node's willingness to carry traffic on behalf of other nodes. - uint8_t willingness; -}; + struct NeighborTuple + { + /// Main address of a neighbor node. + Ipv4Address neighborMainAddr; + /// Neighbor Type and Link Type at the four less significative digits. + enum Status { + STATUS_NOT_SYM = 0, // "not symmetric" + STATUS_SYM = 1, // "symmetric" + } status; + /// A value between 0 and 7 specifying the node's willingness to carry traffic on behalf of other nodes. + uint8_t willingness; + }; -static inline bool -operator == (const NeighborTuple &a, const NeighborTuple &b) -{ - return (a.neighborMainAddr == b.neighborMainAddr - && a.status == b.status - && a.willingness == b.willingness); -} + static inline bool + operator == (const NeighborTuple &a, const NeighborTuple &b) + { + return (a.neighborMainAddr == b.neighborMainAddr + && a.status == b.status + && a.willingness == b.willingness); + } -static inline std::ostream& -operator << (std::ostream &os, const NeighborTuple &tuple) -{ - os << "NeighborTuple(neighborMainAddr=" << tuple.neighborMainAddr - << ", status=" << (tuple.status == NeighborTuple::STATUS_SYM? "SYM" : "NOT_SYM") - << ", willingness=" << (int) tuple.willingness << ")"; - return os; -} + static inline std::ostream& + operator << (std::ostream &os, const NeighborTuple &tuple) + { + os << "NeighborTuple(neighborMainAddr=" << tuple.neighborMainAddr + << ", status=" << (tuple.status == NeighborTuple::STATUS_SYM ? "SYM" : "NOT_SYM") + << ", willingness=" << (int) tuple.willingness << ")"; + return os; + } /// A 2-hop Tuple. -struct TwoHopNeighborTuple -{ - /// Main address of a neighbor. - Ipv4Address neighborMainAddr; - /// Main address of a 2-hop neighbor with a symmetric link to nb_main_addr. - Ipv4Address twoHopNeighborAddr; - /// Time at which this tuple expires and must be removed. - Time expirationTime; // previously called 'time_' -}; + struct TwoHopNeighborTuple + { + /// Main address of a neighbor. + Ipv4Address neighborMainAddr; + /// Main address of a 2-hop neighbor with a symmetric link to nb_main_addr. + Ipv4Address twoHopNeighborAddr; + /// Time at which this tuple expires and must be removed. + Time expirationTime; // previously called 'time_' + }; -static inline std::ostream& -operator << (std::ostream &os, const TwoHopNeighborTuple &tuple) -{ - os << "TwoHopNeighborTuple(neighborMainAddr=" << tuple.neighborMainAddr - << ", twoHopNeighborAddr=" << tuple.twoHopNeighborAddr - << ", expirationTime=" << tuple.expirationTime - << ")"; - return os; -} + static inline std::ostream& + operator << (std::ostream &os, const TwoHopNeighborTuple &tuple) + { + os << "TwoHopNeighborTuple(neighborMainAddr=" << tuple.neighborMainAddr + << ", twoHopNeighborAddr=" << tuple.twoHopNeighborAddr + << ", expirationTime=" << tuple.expirationTime + << ")"; + return os; + } -static inline bool -operator == (const TwoHopNeighborTuple &a, const TwoHopNeighborTuple &b) -{ - return (a.neighborMainAddr == b.neighborMainAddr - && a.twoHopNeighborAddr == b.twoHopNeighborAddr); -} + static inline bool + operator == (const TwoHopNeighborTuple &a, const TwoHopNeighborTuple &b) + { + return (a.neighborMainAddr == b.neighborMainAddr + && a.twoHopNeighborAddr == b.twoHopNeighborAddr); + } /// An MPR-Selector Tuple. -struct MprSelectorTuple -{ - /// Main address of a node which have selected this node as a MPR. - Ipv4Address mainAddr; - /// Time at which this tuple expires and must be removed. - Time expirationTime; // previously called 'time_' -}; + struct MprSelectorTuple + { + /// Main address of a node which have selected this node as a MPR. + Ipv4Address mainAddr; + /// Time at which this tuple expires and must be removed. + Time expirationTime; // previously called 'time_' + }; -static inline bool -operator == (const MprSelectorTuple &a, const MprSelectorTuple &b) -{ - return (a.mainAddr == b.mainAddr); -} + static inline bool + operator == (const MprSelectorTuple &a, const MprSelectorTuple &b) + { + return (a.mainAddr == b.mainAddr); + } /// The type "list of interface addresses" //typedef std::vector addr_list_t; /// A Duplicate Tuple -struct DuplicateTuple -{ - /// Originator address of the message. - Ipv4Address address; - /// Message sequence number. - uint16_t sequenceNumber; - /// Indicates whether the message has been retransmitted or not. - bool retransmitted; - /// List of interfaces which the message has been received on. - std::vector ifaceList; - /// Time at which this tuple expires and must be removed. - Time expirationTime; -}; + struct DuplicateTuple + { + /// Originator address of the message. + Ipv4Address address; + /// Message sequence number. + uint16_t sequenceNumber; + /// Indicates whether the message has been retransmitted or not. + bool retransmitted; + /// List of interfaces which the message has been received on. + std::vector ifaceList; + /// Time at which this tuple expires and must be removed. + Time expirationTime; + }; -static inline bool -operator == (const DuplicateTuple &a, const DuplicateTuple &b) -{ - return (a.address == b.address - && a.sequenceNumber == b.sequenceNumber); -} + static inline bool + operator == (const DuplicateTuple &a, const DuplicateTuple &b) + { + return (a.address == b.address + && a.sequenceNumber == b.sequenceNumber); + } /// A Topology Tuple -struct TopologyTuple -{ - /// Main address of the destination. - Ipv4Address destAddr; - /// Main address of a node which is a neighbor of the destination. - Ipv4Address lastAddr; - /// Sequence number. - uint16_t sequenceNumber; - /// Time at which this tuple expires and must be removed. - Time expirationTime; -}; + struct TopologyTuple + { + /// Main address of the destination. + Ipv4Address destAddr; + /// Main address of a node which is a neighbor of the destination. + Ipv4Address lastAddr; + /// Sequence number. + uint16_t sequenceNumber; + /// Time at which this tuple expires and must be removed. + Time expirationTime; + }; -static inline bool -operator == (const TopologyTuple &a, const TopologyTuple &b) -{ - return (a.destAddr == b.destAddr - && a.lastAddr == b.lastAddr - && a.sequenceNumber == b.sequenceNumber); -} + static inline bool + operator == (const TopologyTuple &a, const TopologyTuple &b) + { + return (a.destAddr == b.destAddr + && a.lastAddr == b.lastAddr + && a.sequenceNumber == b.sequenceNumber); + } -static inline std::ostream& -operator << (std::ostream &os, const TopologyTuple &tuple) -{ - os << "TopologyTuple(destAddr=" << tuple.destAddr - << ", lastAddr=" << tuple.lastAddr - << ", sequenceNumber=" << (int) tuple.sequenceNumber - << ", expirationTime=" << tuple.expirationTime - << ")"; - return os; -} + static inline std::ostream& + operator << (std::ostream &os, const TopologyTuple &tuple) + { + os << "TopologyTuple(destAddr=" << tuple.destAddr + << ", lastAddr=" << tuple.lastAddr + << ", sequenceNumber=" << (int) tuple.sequenceNumber + << ", expirationTime=" << tuple.expirationTime + << ")"; + return os; + } /// Association -struct Association -{ - Ipv4Address networkAddr; - Ipv4Mask netmask; -}; + struct Association + { + Ipv4Address networkAddr; + Ipv4Mask netmask; + }; -static inline bool -operator == (const Association &a, const Association &b) -{ - return (a.networkAddr == b.networkAddr - && a.netmask == b.netmask); -} + static inline bool + operator == (const Association &a, const Association &b) + { + return (a.networkAddr == b.networkAddr + && a.netmask == b.netmask); + } -static inline std::ostream& -operator << (std::ostream &os, const Association &tuple) -{ - os << "Association(networkAddr=" << tuple.networkAddr - << ", netmask=" << tuple.netmask - << ")"; - return os; -} + static inline std::ostream& + operator << (std::ostream &os, const Association &tuple) + { + os << "Association(networkAddr=" << tuple.networkAddr + << ", netmask=" << tuple.netmask + << ")"; + return os; + } /// An Association Tuple -struct AssociationTuple -{ - /// Main address of the gateway. - Ipv4Address gatewayAddr; - /// Network Address of network reachable through gatewayAddr - Ipv4Address networkAddr; - /// Netmask of network reachable through gatewayAddr - Ipv4Mask netmask; - /// Time at which this tuple expires and must be removed - Time expirationTime; -}; + struct AssociationTuple + { + /// Main address of the gateway. + Ipv4Address gatewayAddr; + /// Network Address of network reachable through gatewayAddr + Ipv4Address networkAddr; + /// Netmask of network reachable through gatewayAddr + Ipv4Mask netmask; + /// Time at which this tuple expires and must be removed + Time expirationTime; + }; -static inline bool -operator == (const AssociationTuple &a, const AssociationTuple &b) -{ - return (a.gatewayAddr == b.gatewayAddr - && a.networkAddr == b.networkAddr - && a.netmask == b.netmask); -} + static inline bool + operator == (const AssociationTuple &a, const AssociationTuple &b) + { + return (a.gatewayAddr == b.gatewayAddr + && a.networkAddr == b.networkAddr + && a.netmask == b.netmask); + } -static inline std::ostream& -operator << (std::ostream &os, const AssociationTuple &tuple) -{ - os << "AssociationTuple(gatewayAddr=" << tuple.gatewayAddr - << ", networkAddr=" << tuple.networkAddr - << ", netmask=" << tuple.netmask - << ", expirationTime=" << tuple.expirationTime - << ")"; - return os; -} + static inline std::ostream& + operator << (std::ostream &os, const AssociationTuple &tuple) + { + os << "AssociationTuple(gatewayAddr=" << tuple.gatewayAddr + << ", networkAddr=" << tuple.networkAddr + << ", netmask=" << tuple.netmask + << ", expirationTime=" << tuple.expirationTime + << ")"; + return os; + } -typedef std::set MprSet; ///< MPR Set type. -typedef std::vector MprSelectorSet; ///< MPR Selector Set type. -typedef std::vector LinkSet; ///< Link Set type. -typedef std::vector NeighborSet; ///< Neighbor Set type. -typedef std::vector TwoHopNeighborSet; ///< 2-hop Neighbor Set type. -typedef std::vector TopologySet; ///< Topology Set type. -typedef std::vector DuplicateSet; ///< Duplicate Set type. -typedef std::vector IfaceAssocSet; ///< Interface Association Set type. -typedef std::vector AssociationSet; ///< Association Set type. -typedef std::vector Associations; ///< Association Set type. + typedef std::set MprSet; ///< MPR Set type. + typedef std::vector MprSelectorSet; ///< MPR Selector Set type. + typedef std::vector LinkSet; ///< Link Set type. + typedef std::vector NeighborSet; ///< Neighbor Set type. + typedef std::vector TwoHopNeighborSet; ///< 2-hop Neighbor Set type. + typedef std::vector TopologySet; ///< Topology Set type. + typedef std::vector DuplicateSet; ///< Duplicate Set type. + typedef std::vector IfaceAssocSet; ///< Interface Association Set type. + typedef std::vector AssociationSet; ///< Association Set type. + typedef std::vector Associations; ///< Association Set type. -}}; // namespace ns3, olsr + }}; // namespace ns3, olsr #endif /* __OLSR_REPOSITORIES_H__ */ diff --git a/src/olsr/model/olsr-routing-protocol.cc b/src/olsr/model/olsr-routing-protocol.cc index 809afb802..c7f695ebf 100644 --- a/src/olsr/model/olsr-routing-protocol.cc +++ b/src/olsr/model/olsr-routing-protocol.cc @@ -68,76 +68,76 @@ /// /// We only use this value in order to define OLSR_NEIGHB_HOLD_TIME. /// -#define OLSR_REFRESH_INTERVAL Seconds (2) +#define OLSR_REFRESH_INTERVAL Seconds (2) /********** Holding times **********/ /// Neighbor holding time. -#define OLSR_NEIGHB_HOLD_TIME Time (3 * OLSR_REFRESH_INTERVAL) +#define OLSR_NEIGHB_HOLD_TIME Time (3 * OLSR_REFRESH_INTERVAL) /// Top holding time. -#define OLSR_TOP_HOLD_TIME Time (3 * m_tcInterval) +#define OLSR_TOP_HOLD_TIME Time (3 * m_tcInterval) /// Dup holding time. -#define OLSR_DUP_HOLD_TIME Seconds (30) +#define OLSR_DUP_HOLD_TIME Seconds (30) /// MID holding time. -#define OLSR_MID_HOLD_TIME Time (3 * m_midInterval) +#define OLSR_MID_HOLD_TIME Time (3 * m_midInterval) /// HNA holding time. #define OLSR_HNA_HOLD_TIME Time (3 * m_hnaInterval) /********** Link types **********/ /// Unspecified link type. -#define OLSR_UNSPEC_LINK 0 +#define OLSR_UNSPEC_LINK 0 /// Asymmetric link type. -#define OLSR_ASYM_LINK 1 +#define OLSR_ASYM_LINK 1 /// Symmetric link type. -#define OLSR_SYM_LINK 2 +#define OLSR_SYM_LINK 2 /// Lost link type. -#define OLSR_LOST_LINK 3 +#define OLSR_LOST_LINK 3 /********** Neighbor types **********/ /// Not neighbor type. -#define OLSR_NOT_NEIGH 0 +#define OLSR_NOT_NEIGH 0 /// Symmetric neighbor type. -#define OLSR_SYM_NEIGH 1 +#define OLSR_SYM_NEIGH 1 /// Asymmetric neighbor type. -#define OLSR_MPR_NEIGH 2 +#define OLSR_MPR_NEIGH 2 /********** Willingness **********/ /// Willingness for forwarding packets from other nodes: never. -#define OLSR_WILL_NEVER 0 +#define OLSR_WILL_NEVER 0 /// Willingness for forwarding packets from other nodes: low. -#define OLSR_WILL_LOW 1 +#define OLSR_WILL_LOW 1 /// Willingness for forwarding packets from other nodes: medium. -#define OLSR_WILL_DEFAULT 3 +#define OLSR_WILL_DEFAULT 3 /// Willingness for forwarding packets from other nodes: high. -#define OLSR_WILL_HIGH 6 +#define OLSR_WILL_HIGH 6 /// Willingness for forwarding packets from other nodes: always. -#define OLSR_WILL_ALWAYS 7 +#define OLSR_WILL_ALWAYS 7 /********** Miscellaneous constants **********/ /// Maximum allowed jitter. -#define OLSR_MAXJITTER (m_helloInterval.GetSeconds () / 4) +#define OLSR_MAXJITTER (m_helloInterval.GetSeconds () / 4) /// Maximum allowed sequence number. -#define OLSR_MAX_SEQ_NUM 65535 +#define OLSR_MAX_SEQ_NUM 65535 /// Random number between [0-OLSR_MAXJITTER] used to jitter OLSR packet transmission. #define JITTER (Seconds (UniformVariable().GetValue (0, OLSR_MAXJITTER))) #define OLSR_PORT_NUMBER 698 /// Maximum number of messages per packet. -#define OLSR_MAX_MSGS 64 +#define OLSR_MAX_MSGS 64 /// Maximum number of hellos per message (4 possible link types * 3 possible nb types). -#define OLSR_MAX_HELLOS 12 +#define OLSR_MAX_HELLOS 12 /// Maximum number of addresses advertised on a message. -#define OLSR_MAX_ADDRS 64 +#define OLSR_MAX_ADDRS 64 namespace ns3 { @@ -185,8 +185,8 @@ RoutingProtocol::GetTypeId (void) .AddTraceSource ("Tx", "Send OLSR packet.", MakeTraceSourceAccessor (&RoutingProtocol::m_txPacketTrace)) .AddTraceSource ("RoutingTableChanged", "The OLSR routing table has changed.", - MakeTraceSourceAccessor (&RoutingProtocol::m_routingTableChanged)) - ; + MakeTraceSourceAccessor (&RoutingProtocol::m_routingTableChanged)) + ; return tid; } @@ -197,14 +197,15 @@ RoutingProtocol::RoutingProtocol () m_helloTimer (Timer::CANCEL_ON_DESTROY), m_tcTimer (Timer::CANCEL_ON_DESTROY), m_midTimer (Timer::CANCEL_ON_DESTROY), - m_hnaTimer (Timer::CANCEL_ON_DESTROY), + m_hnaTimer (Timer::CANCEL_ON_DESTROY), m_queuedMessagesTimer (Timer::CANCEL_ON_DESTROY) { m_hnaRoutingTable = Create (); } RoutingProtocol::~RoutingProtocol () -{} +{ +} void RoutingProtocol::SetIpv4 (Ptr ipv4) @@ -225,7 +226,7 @@ RoutingProtocol::SetIpv4 (Ptr ipv4) m_linkTupleTimerFirstTime = true; m_ipv4 = ipv4; - + m_hnaRoutingTable->SetIpv4 (ipv4); } @@ -252,24 +253,24 @@ RoutingProtocol::PrintRoutingTable (Ptr stream) const *os << "Destination\t\tNextHop\t\tInterface\tDistance\n"; for (std::map::const_iterator iter = m_table.begin (); - iter != m_table.end (); iter++) + iter != m_table.end (); iter++) { *os << iter->first << "\t\t"; *os << iter->second.nextAddr << "\t\t"; if (Names::FindName (m_ipv4->GetNetDevice (iter->second.interface)) != "") - { - *os << Names::FindName (m_ipv4->GetNetDevice (iter->second.interface)) << "\t\t"; - } - else - { - *os << iter->second.interface << "\t\t"; - } + { + *os << Names::FindName (m_ipv4->GetNetDevice (iter->second.interface)) << "\t\t"; + } + else + { + *os << iter->second.interface << "\t\t"; + } *os << iter->second.distance << "\t"; *os << "\n"; } - // Also print the HNA routing table - *os << " HNA Routing Table:\n"; - m_hnaRoutingTable->PrintRoutingTable (stream); + // Also print the HNA routing table + *os << " HNA Routing Table:\n"; + m_hnaRoutingTable->PrintRoutingTable (stream); } void RoutingProtocol::DoStart () @@ -334,14 +335,14 @@ void RoutingProtocol::DoStart () } if(canRunOlsr) - { + { HelloTimerExpire (); TcTimerExpire (); MidTimerExpire (); - HnaTimerExpire (); + HnaTimerExpire (); NS_LOG_DEBUG ("OLSR on node " << m_mainAddress << " started"); - } + } } void RoutingProtocol::SetMainInterface (uint32_t interface) @@ -368,12 +369,12 @@ RoutingProtocol::RecvOlsr (Ptr socket) Ipv4Address receiverIfaceAddr = m_socketAddresses[socket].GetLocal (); NS_ASSERT (receiverIfaceAddr != Ipv4Address ()); NS_LOG_DEBUG ("OLSR node " << m_mainAddress << " received a OLSR packet from " - << senderIfaceAddr << " to " << receiverIfaceAddr); - + << senderIfaceAddr << " to " << receiverIfaceAddr); + // All routing messages are sent from and to port RT_PORT, // so we check it. NS_ASSERT (inetSourceAddr.GetPort () == OLSR_PORT_NUMBER); - + Ptr packet = receivedPacket; olsr::PacketHeader olsrPacketHeader; @@ -382,13 +383,13 @@ RoutingProtocol::RecvOlsr (Ptr socket) uint32_t sizeLeft = olsrPacketHeader.GetPacketLength () - olsrPacketHeader.GetSerializedSize (); MessageList messages; - + while (sizeLeft) { MessageHeader messageHeader; if (packet->RemoveHeader (messageHeader) == 0) NS_ASSERT (false); - + sizeLeft -= messageHeader.GetSerializedSize (); NS_LOG_DEBUG ("Olsr Msg received with type " @@ -418,8 +419,8 @@ RoutingProtocol::RecvOlsr (Ptr socket) // If the message has been processed it must not be processed again bool do_forwarding = true; DuplicateTuple *duplicated = m_state.FindDuplicateTuple - (messageHeader.GetOriginatorAddress (), - messageHeader.GetMessageSequenceNumber ()); + (messageHeader.GetOriginatorAddress (), + messageHeader.GetMessageSequenceNumber ()); // Get main address of the peer, which may be different from the packet source address // const IfaceAssocTuple *ifaceAssoc = m_state.FindIfaceAssocTuple (inetSourceAddr.GetIpv4 ()); @@ -432,7 +433,7 @@ RoutingProtocol::RecvOlsr (Ptr socket) // { // peerMainAddress = inetSourceAddr.GetIpv4 () ; // } - + if (duplicated == NULL) { switch (messageHeader.GetMessageType ()) @@ -466,14 +467,14 @@ RoutingProtocol::RecvOlsr (Ptr socket) default: NS_LOG_DEBUG ("OLSR message type " << - int (messageHeader.GetMessageType ()) << - " not implemented"); + int (messageHeader.GetMessageType ()) << + " not implemented"); } } else { NS_LOG_DEBUG ("OLSR message is duplicated, not reading it."); - + // If the message has been considered for forwarding, it should // not be retransmitted again for (std::vector::const_iterator it = duplicated->ifaceList.begin (); @@ -486,7 +487,7 @@ RoutingProtocol::RecvOlsr (Ptr socket) } } } - + if (do_forwarding) { // HELLO messages are never forwarded. @@ -539,7 +540,7 @@ CoverTwoHopNeighbors (Ipv4Address neighborMainAddr, TwoHopNeighborSet & N2) { // first gather all 2-hop neighbors to be removed std::set toRemove; - for (TwoHopNeighborSet::iterator twoHopNeigh = N2.begin (); twoHopNeigh != N2.end (); twoHopNeigh ++) + for (TwoHopNeighborSet::iterator twoHopNeigh = N2.begin (); twoHopNeigh != N2.end (); twoHopNeigh++) { if (twoHopNeigh->neighborMainAddr == neighborMainAddr) { @@ -555,7 +556,7 @@ CoverTwoHopNeighbors (Ipv4Address neighborMainAddr, TwoHopNeighborSet & N2) } else { - twoHopNeigh ++; + twoHopNeigh++; } } } @@ -568,12 +569,12 @@ void RoutingProtocol::MprComputation() { NS_LOG_FUNCTION (this); - + // MPR computation should be done for each interface. See section 8.3.1 // (RFC 3626) for details. MprSet mprSet; - + // N is the subset of neighbors of the node, which are // neighbor "of the interface I" NeighborSet N; @@ -604,7 +605,7 @@ RoutingProtocol::MprComputation() } // excluding: - // (i) the nodes only reachable by members of N with willingness WILL_NEVER + // (i) the nodes only reachable by members of N with willingness WILL_NEVER bool ok = false; for (NeighborSet::const_iterator neigh = N.begin (); neigh != N.end (); neigh++) @@ -627,7 +628,7 @@ RoutingProtocol::MprComputation() { continue; } - + // excluding: // (iii) all the symmetric neighbors: the nodes for which there exists a symmetric // link to this node on some interface. @@ -677,7 +678,7 @@ RoutingProtocol::MprComputation() CoverTwoHopNeighbors (neighbor->neighborMainAddr, N2); } } - + // 2. Calculate D(y), where y is a member of N, for all nodes in N. // (we do this later) @@ -700,9 +701,9 @@ RoutingProtocol::MprComputation() if (onlyOne) { NS_LOG_LOGIC ("Neighbor " << twoHopNeigh->neighborMainAddr - << " is the only that can reach 2-hop neigh. " - << twoHopNeigh->twoHopNeighborAddr - << " => select as MPR."); + << " is the only that can reach 2-hop neigh. " + << twoHopNeigh->twoHopNeighborAddr + << " => select as MPR."); mprSet.insert (twoHopNeigh->neighborMainAddr); @@ -777,7 +778,7 @@ RoutingProtocol::MprComputation() rs.insert (r); reachability[r].push_back (&nb_tuple); } - + // 4.2. Select as a MPR the node with highest N_willingness among // the nodes in N with non-zero reachability. In case of // multiple choice select the node which provides @@ -827,7 +828,7 @@ RoutingProtocol::MprComputation() { mprSet.insert (max->neighborMainAddr); CoverTwoHopNeighbors (max->neighborMainAddr, N2); - NS_LOG_LOGIC (N2.size () << " 2-hop neighbors left to cover!"); + NS_LOG_LOGIC (N2.size () << " 2-hop neighbors left to cover!"); } } @@ -863,7 +864,7 @@ RoutingProtocol::GetMainAddress (Ipv4Address iface_addr) const { const IfaceAssocTuple *tuple = m_state.FindIfaceAssocTuple (iface_addr); - + if (tuple != NULL) return tuple->mainAddr; else @@ -877,7 +878,7 @@ void RoutingProtocol::RoutingTableComputation () { NS_LOG_DEBUG (Simulator::Now ().GetSeconds () << " s: Node " << m_mainAddress - << ": RoutingTableComputation begin..."); + << ": RoutingTableComputation begin..."); // 1. All the entries from the routing table are removed. Clear (); @@ -900,12 +901,12 @@ RoutingProtocol::RoutingTableComputation () { LinkTuple const &link_tuple = *it2; NS_LOG_DEBUG ("Looking at link tuple: " << link_tuple - << (link_tuple.time >= Simulator::Now ()? "" : " (expired)")); + << (link_tuple.time >= Simulator::Now () ? "" : " (expired)")); if ((GetMainAddress (link_tuple.neighborIfaceAddr) == nb_tuple.neighborMainAddr) && link_tuple.time >= Simulator::Now ()) { NS_LOG_LOGIC ("Link tuple matches neighbor " << nb_tuple.neighborMainAddr - << " => adding routing table entry to neighbor"); + << " => adding routing table entry to neighbor"); lt = &link_tuple; AddEntry (link_tuple.neighborIfaceAddr, link_tuple.neighborIfaceAddr, @@ -919,9 +920,9 @@ RoutingProtocol::RoutingTableComputation () else { NS_LOG_LOGIC ("Link tuple: linkMainAddress= " << GetMainAddress (link_tuple.neighborIfaceAddr) - << "; neighborMainAddr = " << nb_tuple.neighborMainAddr - << "; expired=" << int (link_tuple.time < Simulator::Now ()) - << " => IGNORE"); + << "; neighborMainAddr = " << nb_tuple.neighborMainAddr + << "; expired=" << int (link_tuple.time < Simulator::Now ()) + << " => IGNORE"); } } @@ -945,7 +946,7 @@ RoutingProtocol::RoutingTableComputation () } } } - + // 3. for each node in N2, i.e., a 2-hop neighbor which is not a // neighbor node or the node itself, and such that there exist at // least one entry in the 2-hop neighbor set where @@ -994,7 +995,7 @@ RoutingProtocol::RoutingTableComputation () << ", which was not found in the Neighbor Set."); continue; } - + // one selects one 2-hop tuple and creates one entry in the routing table with: // R_dest_addr = the main address of the 2-hop neighbor; // R_next_addr = the R_next_addr of the entry in the @@ -1012,9 +1013,9 @@ RoutingProtocol::RoutingTableComputation () { NS_LOG_LOGIC ("Adding routing entry for two-hop neighbor."); AddEntry (nb2hop_tuple.twoHopNeighborAddr, - entry.nextAddr, - entry.interface, - 2); + entry.nextAddr, + entry.interface, + 2); } else { @@ -1023,11 +1024,11 @@ RoutingProtocol::RoutingTableComputation () << " not found in the routing table)"); } } - + for (uint32_t h = 2; ; h++) { bool added = false; - + // 3.1. For each topology entry in the topology table, if its // T_dest_addr does not correspond to R_dest_addr of any // route entry in the routing table AND its T_last_addr @@ -1067,12 +1068,12 @@ RoutingProtocol::RoutingTableComputation () { NS_LOG_LOGIC ("NOT adding routing table entry based on the topology tuple: " "have_destAddrEntry=" << have_destAddrEntry - << " have_lastAddrEntry=" << have_lastAddrEntry - << " lastAddrEntry.distance=" << (int) lastAddrEntry.distance - << " (h=" << h << ")"); + << " have_lastAddrEntry=" << have_lastAddrEntry + << " lastAddrEntry.distance=" << (int) lastAddrEntry.distance + << " (h=" << h << ")"); } } - + if (!added) break; } @@ -1116,35 +1117,35 @@ RoutingProtocol::RoutingTableComputation () { AssociationTuple const &tuple = *it; - // Test if HNA associations received from other gateways - // are also announced by this node. In such a case, no route - // is created for this association tuple (go to the next one). - bool goToNextAssociationTuple = false; - const Associations &localHnaAssociations = m_state.GetAssociations (); - NS_LOG_DEBUG ("Nb local associations: " << localHnaAssociations.size ()); - for (Associations::const_iterator assocIterator = localHnaAssociations.begin (); - assocIterator != localHnaAssociations.end (); assocIterator++) - { - Association const &localHnaAssoc = *assocIterator; - if (localHnaAssoc.networkAddr == tuple.networkAddr && localHnaAssoc.netmask == tuple.netmask) - { - NS_LOG_DEBUG ("HNA association received from another GW is part of local HNA associations: no route added for network " - << tuple.networkAddr << "/" << tuple.netmask); - goToNextAssociationTuple = true; - } - } - if (goToNextAssociationTuple) + // Test if HNA associations received from other gateways + // are also announced by this node. In such a case, no route + // is created for this association tuple (go to the next one). + bool goToNextAssociationTuple = false; + const Associations &localHnaAssociations = m_state.GetAssociations (); + NS_LOG_DEBUG ("Nb local associations: " << localHnaAssociations.size ()); + for (Associations::const_iterator assocIterator = localHnaAssociations.begin (); + assocIterator != localHnaAssociations.end (); assocIterator++) + { + Association const &localHnaAssoc = *assocIterator; + if (localHnaAssoc.networkAddr == tuple.networkAddr && localHnaAssoc.netmask == tuple.netmask) { - continue; + NS_LOG_DEBUG ("HNA association received from another GW is part of local HNA associations: no route added for network " + << tuple.networkAddr << "/" << tuple.netmask); + goToNextAssociationTuple = true; } - + } + if (goToNextAssociationTuple) + { + continue; + } + RoutingTableEntry gatewayEntry; - + bool gatewayEntryExists = Lookup (tuple.gatewayAddr, gatewayEntry); bool addRoute = false; - + uint32_t routeIndex = 0; - + for (routeIndex = 0; routeIndex < m_hnaRoutingTable->GetNRoutes (); routeIndex++) { Ipv4RoutingTableEntry route = m_hnaRoutingTable->GetRoute (routeIndex); @@ -1154,7 +1155,7 @@ RoutingProtocol::RoutingTableComputation () break; } } - + if (routeIndex == m_hnaRoutingTable->GetNRoutes ()) { addRoute = true; @@ -1164,7 +1165,7 @@ RoutingProtocol::RoutingTableComputation () m_hnaRoutingTable->RemoveRoute(routeIndex); addRoute = true; } - + if(addRoute && gatewayEntryExists) { m_hnaRoutingTable->AddNetworkRouteTo (tuple.networkAddr, @@ -1172,7 +1173,7 @@ RoutingProtocol::RoutingTableComputation () gatewayEntry.nextAddr, gatewayEntry.interface, gatewayEntry.distance); - + } } @@ -1193,11 +1194,11 @@ RoutingProtocol::RoutingTableComputation () /// void RoutingProtocol::ProcessHello (const olsr::MessageHeader &msg, - const Ipv4Address &receiverIface, - const Ipv4Address &senderIface) + const Ipv4Address &receiverIface, + const Ipv4Address &senderIface) { NS_LOG_FUNCTION (msg << receiverIface << senderIface); - + const olsr::MessageHeader::Hello &hello = msg.GetHello (); LinkSensing (msg, hello, receiverIface, senderIface); @@ -1256,7 +1257,7 @@ RoutingProtocol::ProcessHello (const olsr::MessageHeader &msg, /// void RoutingProtocol::ProcessTc (const olsr::MessageHeader &msg, - const Ipv4Address &senderIface) + const Ipv4Address &senderIface) { const olsr::MessageHeader::Tc &tc = msg.GetTc (); Time now = Simulator::Now (); @@ -1268,8 +1269,8 @@ RoutingProtocol::ProcessTc (const olsr::MessageHeader &msg, return; // 2. If there exist some tuple in the topology set where: - // T_last_addr == originator address AND - // T_seq > ANSN, + // T_last_addr == originator address AND + // T_seq > ANSN, // then further processing of this TC message MUST NOT be // performed. const TopologyTuple *topologyTuple = @@ -1290,10 +1291,10 @@ RoutingProtocol::ProcessTc (const olsr::MessageHeader &msg, { const Ipv4Address &addr = *i; // 4.1. If there exist some tuple in the topology set where: - // T_dest_addr == advertised neighbor main address, AND - // T_last_addr == originator address, + // T_dest_addr == advertised neighbor main address, AND + // T_last_addr == originator address, // then the holding time of that tuple MUST be set to: - // T_time = current time + validity time. + // T_time = current time + validity time. TopologyTuple *topologyTuple = m_state.FindTopologyTuple (addr, msg.GetOriginatorAddress ()); @@ -1351,11 +1352,11 @@ RoutingProtocol::ProcessTc (const olsr::MessageHeader &msg, /// void RoutingProtocol::ProcessMid (const olsr::MessageHeader &msg, - const Ipv4Address &senderIface) + const Ipv4Address &senderIface) { const olsr::MessageHeader::Mid &mid = msg.GetMid (); Time now = Simulator::Now (); - + NS_LOG_DEBUG ("Node " << m_mainAddress << " ProcessMid from " << senderIface); // 1. If the sender interface of this message is not in the symmetric // 1-hop neighborhood of this node, the message MUST be discarded. @@ -1430,26 +1431,26 @@ RoutingProtocol::ProcessMid (const olsr::MessageHeader &msg, /// void RoutingProtocol::ProcessHna (const olsr::MessageHeader &msg, - const Ipv4Address &senderIface) + const Ipv4Address &senderIface) { const olsr::MessageHeader::Hna &hna = msg.GetHna (); Time now = Simulator::Now (); - + // 1. If the sender interface of this message is not in the symmetric // 1-hop neighborhood of this node, the message MUST be discarded. const LinkTuple *link_tuple = m_state.FindSymLinkTuple (senderIface, now); if (link_tuple == NULL) return; - + // 2. Otherwise, for each (network address, netmask) pair in the // message: - + for (std::vector::const_iterator it = hna.associations.begin(); it != hna.associations.end() ; it++) { AssociationTuple *tuple = m_state.FindAssociationTuple(msg.GetOriginatorAddress(),it->address,it->mask); - + // 2.1 if an entry in the association set already exists, where: // A_gateway_addr == originator address // A_network_addr == network address @@ -1460,7 +1461,7 @@ RoutingProtocol::ProcessHna (const olsr::MessageHeader &msg, { tuple->expirationTime = now + msg.GetVTime (); } - + // 2.2 otherwise, a new tuple MUST be recorded with: // A_gateway_addr = originator address // A_network_addr = network address @@ -1475,13 +1476,13 @@ RoutingProtocol::ProcessHna (const olsr::MessageHeader &msg, now + msg.GetVTime () }; AddAssociationTuple (assocTuple); - + //Schedule Association Tuple deletion Simulator::Schedule (DELAY (assocTuple.expirationTime), &RoutingProtocol::AssociationTupleTimerExpire, this, assocTuple.gatewayAddr,assocTuple.networkAddr,assocTuple.netmask); } - + } } @@ -1498,12 +1499,12 @@ RoutingProtocol::ProcessHna (const olsr::MessageHeader &msg, /// void RoutingProtocol::ForwardDefault (olsr::MessageHeader olsrMessage, - DuplicateTuple *duplicated, - const Ipv4Address &localIface, - const Ipv4Address &senderAddress) + DuplicateTuple *duplicated, + const Ipv4Address &localIface, + const Ipv4Address &senderAddress) { Time now = Simulator::Now (); - + // If the sender interface address is not in the symmetric // 1-hop neighborhood the message must not be forwarded const LinkTuple *linkTuple = m_state.FindSymLinkTuple (senderAddress, now); @@ -1584,7 +1585,7 @@ RoutingProtocol::QueueMessage (const olsr::MessageHeader &message, Time delay) void RoutingProtocol::SendPacket (Ptr packet, - const MessageList &containedMessages) + const MessageList &containedMessages) { NS_LOG_DEBUG ("OLSR node " << m_mainAddress << " sending a OLSR packet"); @@ -1598,8 +1599,8 @@ RoutingProtocol::SendPacket (Ptr packet, m_txPacketTrace (header, containedMessages); // Send it - for (std::map , Ipv4InterfaceAddress>::const_iterator i = - m_socketAddresses.begin (); i != m_socketAddresses.end (); i++) + for (std::map, Ipv4InterfaceAddress>::const_iterator i = + m_socketAddresses.begin (); i != m_socketAddresses.end (); i++) { Ipv4Address bcast = i->second.GetLocal ().GetSubnetDirectedBroadcast (i->second.GetMask ()); i->first->SendTo (packet, 0, InetSocketAddress (bcast, OLSR_PORT_NUMBER)); @@ -1656,7 +1657,7 @@ void RoutingProtocol::SendHello () { NS_LOG_FUNCTION (this); - + olsr::MessageHeader msg; Time now = Simulator::Now (); @@ -1671,7 +1672,7 @@ RoutingProtocol::SendHello () hello.willingness = m_willingness; std::vector - &linkMessages = hello.linkMessages; + &linkMessages = hello.linkMessages; const LinkSet &links = m_state.GetLinks (); for (LinkSet::const_iterator link_tuple = links.begin (); @@ -1684,7 +1685,7 @@ RoutingProtocol::SendHello () } uint8_t link_type, nb_type = 0xff; - + // Establishes link type if (link_tuple->symTime >= now) { @@ -1703,7 +1704,7 @@ RoutingProtocol::SendHello () { nb_type = OLSR_MPR_NEIGH; NS_LOG_DEBUG ("I consider neighbor " << GetMainAddress (link_tuple->neighborIfaceAddr) - << " to be MPR_NEIGH."); + << " to be MPR_NEIGH."); } else { @@ -1717,14 +1718,14 @@ RoutingProtocol::SendHello () if (nb_tuple->status == NeighborTuple::STATUS_SYM) { NS_LOG_DEBUG ("I consider neighbor " << GetMainAddress (link_tuple->neighborIfaceAddr) - << " to be SYM_NEIGH."); + << " to be SYM_NEIGH."); nb_type = OLSR_SYM_NEIGH; } else if (nb_tuple->status == NeighborTuple::STATUS_NOT_SYM) { nb_type = OLSR_NOT_NEIGH; NS_LOG_DEBUG ("I consider neighbor " << GetMainAddress (link_tuple->neighborIfaceAddr) - << " to be NOT_NEIGH."); + << " to be NOT_NEIGH."); } else { @@ -1744,19 +1745,19 @@ RoutingProtocol::SendHello () olsr::MessageHeader::Hello::LinkMessage linkMessage; linkMessage.linkCode = (link_type & 0x03) | ((nb_type << 2) & 0x0f); linkMessage.neighborInterfaceAddresses.push_back - (link_tuple->neighborIfaceAddr); + (link_tuple->neighborIfaceAddr); std::vector interfaces = m_state.FindNeighborInterfaces (link_tuple->neighborIfaceAddr); linkMessage.neighborInterfaceAddresses.insert - (linkMessage.neighborInterfaceAddresses.end (), - interfaces.begin (), interfaces.end ()); + (linkMessage.neighborInterfaceAddresses.end (), + interfaces.begin (), interfaces.end ()); linkMessages.push_back (linkMessage); } NS_LOG_DEBUG ("OLSR HELLO message size: " << int (msg.GetSerializedSize ()) - << " (with " << int (linkMessages.size ()) << " link messages)"); + << " (with " << int (linkMessages.size ()) << " link messages)"); QueueMessage (msg, JITTER); } @@ -1767,7 +1768,7 @@ void RoutingProtocol::SendTc () { NS_LOG_FUNCTION (this); - + olsr::MessageHeader msg; msg.SetVTime (OLSR_TOP_HOLD_TIME); @@ -1775,10 +1776,10 @@ RoutingProtocol::SendTc () msg.SetTimeToLive (255); msg.SetHopCount (0); msg.SetMessageSequenceNumber (GetMessageSequenceNumber ()); - + olsr::MessageHeader::Tc &tc = msg.GetTc (); tc.ansn = m_ansn; - + for (MprSelectorSet::const_iterator mprsel_tuple = m_state.GetMprSelectors ().begin(); mprsel_tuple != m_state.GetMprSelectors ().end(); mprsel_tuple++) { @@ -1821,7 +1822,7 @@ RoutingProtocol::SendMid () } if (mid.interfaceAddresses.size () == 0) return; - + msg.SetVTime (OLSR_MID_HOLD_TIME); msg.SetOriginatorAddress (m_mainAddress); msg.SetTimeToLive (255); @@ -1846,23 +1847,23 @@ RoutingProtocol::SendHna () msg.SetHopCount (0); msg.SetMessageSequenceNumber (GetMessageSequenceNumber ()); olsr::MessageHeader::Hna &hna = msg.GetHna (); - + std::vector &associations = hna.associations; - + // Add all local HNA associations to the HNA message const Associations &localHnaAssociations = m_state.GetAssociations (); for (Associations::const_iterator it = localHnaAssociations.begin (); - it != localHnaAssociations.end (); it++) - { - olsr::MessageHeader::Hna::Association assoc = {it->networkAddr, it->netmask}; - associations.push_back (assoc); + it != localHnaAssociations.end (); it++) + { + olsr::MessageHeader::Hna::Association assoc = { it->networkAddr, it->netmask}; + associations.push_back (assoc); } // If there is no HNA associations to send, return without queuing the message if (associations.size () == 0) { return; } - + // Else, queue the message to be sent later on QueueMessage (msg, JITTER); } @@ -1890,7 +1891,7 @@ RoutingProtocol::AddHostNetworkAssociation (Ipv4Address networkAddr, Ipv4Mask ne } // If the tuple does not already exist, add it to the list of local HNA associations. NS_LOG_INFO ("Adding HNA association for network " << networkAddr << "/" << netmask << "."); - m_state.InsertAssociation ( (Association) {networkAddr, netmask} ); + m_state.InsertAssociation ( (Association) { networkAddr, netmask} ); } /// @@ -1902,7 +1903,7 @@ void RoutingProtocol::RemoveHostNetworkAssociation (Ipv4Address networkAddr, Ipv4Mask netmask) { NS_LOG_INFO ("Removing HNA association for network " << networkAddr << "/" << netmask << "."); - m_state.EraseAssociation ( (Association) {networkAddr, netmask} ); + m_state.EraseAssociation ( (Association) { networkAddr, netmask} ); } /// @@ -1948,7 +1949,7 @@ RoutingProtocol::SetRoutingTableAssociation (Ptr routingTable Ipv4RoutingTableEntry route = m_routingTableAssociation->GetRoute (i); Ipv4Address destNetworkAddress = route.GetDestNetwork (); Ipv4Mask destNetmask = route.GetDestNetworkMask (); - + // If the outgoing interface for this route is a non-olsr interface, if (UsesNonOlsrOutgoingInterface (route)) { @@ -1979,16 +1980,16 @@ RoutingProtocol::UsesNonOlsrOutgoingInterface (const Ipv4RoutingTableEntry &rout /// specification). Neighbor Set is also updated if needed. void RoutingProtocol::LinkSensing (const olsr::MessageHeader &msg, - const olsr::MessageHeader::Hello &hello, - const Ipv4Address &receiverIface, - const Ipv4Address &senderIface) + const olsr::MessageHeader::Hello &hello, + const Ipv4Address &receiverIface, + const Ipv4Address &senderIface) { Time now = Simulator::Now (); bool updated = false; bool created = false; NS_LOG_DEBUG ("@" << now.GetSeconds () << ": Olsr node " << m_mainAddress - << ": LinkSensing(receiverIface=" << receiverIface - << ", senderIface=" << senderIface << ") BEGIN"); + << ": LinkSensing(receiverIface=" << receiverIface + << ", senderIface=" << senderIface << ") BEGIN"); NS_ASSERT (msg.GetVTime () > Seconds (0)); LinkTuple *link_tuple = m_state.FindLinkTuple (senderIface); @@ -2053,7 +2054,7 @@ RoutingProtocol::LinkSensing (const olsr::MessageHeader &msg, NS_LOG_LOGIC ("HELLO link code is invalid => IGNORING"); continue; } - + for (std::vector::const_iterator neighIfaceAddr = linkMessage->neighborInterfaceAddresses.begin (); neighIfaceAddr != linkMessage->neighborInterfaceAddresses.end (); @@ -2085,7 +2086,7 @@ RoutingProtocol::LinkSensing (const olsr::MessageHeader &msg, else { NS_LOG_DEBUG (" \\-> *neighIfaceAddr (" << *neighIfaceAddr - << " != receiverIface (" << receiverIface << ") => IGNORING!"); + << " != receiverIface (" << receiverIface << ") => IGNORING!"); } } NS_LOG_DEBUG ("Link tuple updated: " << int (updated)); @@ -2106,7 +2107,7 @@ RoutingProtocol::LinkSensing (const olsr::MessageHeader &msg, link_tuple->neighborIfaceAddr)); } NS_LOG_DEBUG ("@" << now.GetSeconds () << ": Olsr node " << m_mainAddress - << ": LinkSensing END"); + << ": LinkSensing END"); } /// @@ -2114,7 +2115,7 @@ RoutingProtocol::LinkSensing (const olsr::MessageHeader &msg, /// HELLO message (following RFC 3626). void RoutingProtocol::PopulateNeighborSet (const olsr::MessageHeader &msg, - const olsr::MessageHeader::Hello &hello) + const olsr::MessageHeader::Hello &hello) { NeighborTuple *nb_tuple = m_state.FindNeighborTuple (msg.GetOriginatorAddress ()); if (nb_tuple != NULL) @@ -2129,7 +2130,7 @@ RoutingProtocol::PopulateNeighborSet (const olsr::MessageHeader &msg, /// received HELLO message (following RFC 3626). void RoutingProtocol::PopulateTwoHopNeighborSet (const olsr::MessageHeader &msg, - const olsr::MessageHeader::Hello &hello) + const olsr::MessageHeader::Hello &hello) { Time now = Simulator::Now (); @@ -2144,8 +2145,8 @@ RoutingProtocol::PopulateTwoHopNeighborSet (const olsr::MessageHeader &msg, NS_LOG_LOGIC ("Link tuple ignored: " "GetMainAddress (link_tuple->neighborIfaceAddr) != msg.GetOriginatorAddress ()"); NS_LOG_LOGIC ("(GetMainAddress(" << link_tuple->neighborIfaceAddr << "): " - << GetMainAddress (link_tuple->neighborIfaceAddr) - << "; msg.GetOriginatorAddress (): " << msg.GetOriginatorAddress ()); + << GetMainAddress (link_tuple->neighborIfaceAddr) + << "; msg.GetOriginatorAddress (): " << msg.GetOriginatorAddress ()); continue; } @@ -2162,7 +2163,7 @@ RoutingProtocol::PopulateTwoHopNeighborSet (const olsr::MessageHeader &msg, int neighborType = (linkMessage->linkCode >> 2) & 0x3; #ifdef NS3_LOG_ENABLE const char *neighborTypeNames[3] = { "NOT_NEIGH", "SYM_NEIGH", "MPR_NEIGH" }; - const char *neighborTypeName = ((neighborType < 3)? + const char *neighborTypeName = ((neighborType < 3) ? neighborTypeNames[neighborType] : "(invalid value)"); NS_LOG_DEBUG ("Looking at Link Message from HELLO message: neighborType=" @@ -2193,7 +2194,7 @@ RoutingProtocol::PopulateTwoHopNeighborSet (const olsr::MessageHeader &msg, TwoHopNeighborTuple *nb2hop_tuple = m_state.FindTwoHopNeighborTuple (msg.GetOriginatorAddress (), nb2hop_addr); NS_LOG_LOGIC ("Adding the 2-hop neighbor" - << (nb2hop_tuple? " (refreshing existing entry)" : "")); + << (nb2hop_tuple ? " (refreshing existing entry)" : "")); if (nb2hop_tuple == NULL) { TwoHopNeighborTuple new_nb2hop_tuple; @@ -2241,10 +2242,10 @@ RoutingProtocol::PopulateTwoHopNeighborSet (const olsr::MessageHeader &msg, /// received HELLO message (following RFC 3626). void RoutingProtocol::PopulateMprSelectorSet (const olsr::MessageHeader &msg, - const olsr::MessageHeader::Hello &hello) + const olsr::MessageHeader::Hello &hello) { NS_LOG_FUNCTION (this); - + Time now = Simulator::Now (); typedef std::vector LinkMessageVec; @@ -2256,7 +2257,7 @@ RoutingProtocol::PopulateMprSelectorSet (const olsr::MessageHeader &msg, if (nt == OLSR_MPR_NEIGH) { NS_LOG_DEBUG ("Processing a link message with neighbor type MPR_NEIGH"); - + for (std::vector::const_iterator nb_iface_addr = linkMessage->neighborInterfaceAddresses.begin (); nb_iface_addr != linkMessage->neighborInterfaceAddresses.end (); @@ -2265,7 +2266,7 @@ RoutingProtocol::PopulateMprSelectorSet (const olsr::MessageHeader &msg, if (GetMainAddress (*nb_iface_addr) == m_mainAddress) { NS_LOG_DEBUG ("Adding entry to mpr selector set for neighbor " << *nb_iface_addr); - + // We must create a new entry into the mpr selector set MprSelectorTuple *existing_mprsel_tuple = m_state.FindMprSelectorTuple (msg.GetOriginatorAddress ()); @@ -2279,9 +2280,9 @@ RoutingProtocol::PopulateMprSelectorSet (const olsr::MessageHeader &msg, // Schedules mpr selector tuple deletion m_events.Track (Simulator::Schedule - (DELAY (mprsel_tuple.expirationTime), - &RoutingProtocol::MprSelTupleTimerExpire, this, - mprsel_tuple.mainAddr)); + (DELAY (mprsel_tuple.expirationTime), + &RoutingProtocol::MprSelTupleTimerExpire, this, + mprsel_tuple.mainAddr)); } else { @@ -2305,27 +2306,27 @@ RoutingProtocol::PopulateMprSelectorSet (const olsr::MessageHeader &msg, /// void OLSR::mac_failed(Ptr p) { - double now = Simulator::Now (); - struct hdr_ip* ih = HDR_IP(p); - struct hdr_cmn* ch = HDR_CMN(p); + double now = Simulator::Now (); + struct hdr_ip* ih = HDR_IP(p); + struct hdr_cmn* ch = HDR_CMN(p); - debug("%f: Node %d MAC Layer detects a breakage on link to %d\n", - now, - OLSR::node_id(ra_addr()), - OLSR::node_id(ch->next_hop())); + debug("%f: Node %d MAC Layer detects a breakage on link to %d\n", + now, + OLSR::node_id(ra_addr()), + OLSR::node_id(ch->next_hop())); - if ((u_int32_t)ih->daddr() == IP_BROADCAST) { - drop(p, DROP_RTR_MAC_CALLBACK); - return; - } + if ((u_int32_t)ih->daddr() == IP_BROADCAST) { + drop(p, DROP_RTR_MAC_CALLBACK); + return; + } - OLSR_link_tuple* link_tuple = state_.find_link_tuple(ch->next_hop()); - if (link_tuple != NULL) { - link_tuple->lost_time() = now + OLSR_NEIGHB_HOLD_TIME; - link_tuple->time() = now + OLSR_NEIGHB_HOLD_TIME; - nb_loss(link_tuple); - } - drop(p, DROP_RTR_MAC_CALLBACK); + OLSR_link_tuple* link_tuple = state_.find_link_tuple(ch->next_hop()); + if (link_tuple != NULL) { + link_tuple->lost_time() = now + OLSR_NEIGHB_HOLD_TIME; + link_tuple->time() = now + OLSR_NEIGHB_HOLD_TIME; + nb_loss(link_tuple); + } + drop(p, DROP_RTR_MAC_CALLBACK); } #endif @@ -2348,7 +2349,7 @@ RoutingProtocol::NeighborLoss (const LinkTuple &tuple) LinkTupleUpdated (tuple, OLSR_WILL_DEFAULT); m_state.EraseTwoHopNeighborTuples (GetMainAddress (tuple.neighborIfaceAddr)); m_state.EraseMprSelectorTuples (GetMainAddress (tuple.neighborIfaceAddr)); - + MprComputation (); RoutingTableComputation (); } @@ -2361,11 +2362,11 @@ RoutingProtocol::NeighborLoss (const LinkTuple &tuple) void RoutingProtocol::AddDuplicateTuple (const DuplicateTuple &tuple) { - /*debug("%f: Node %d adds dup tuple: addr = %d seq_num = %d\n", - Simulator::Now (), - OLSR::node_id(ra_addr()), - OLSR::node_id(tuple->addr()), - tuple->seq_num());*/ + /*debug("%f: Node %d adds dup tuple: addr = %d seq_num = %d\n", + Simulator::Now (), + OLSR::node_id(ra_addr()), + OLSR::node_id(tuple->addr()), + tuple->seq_num());*/ m_state.InsertDuplicateTuple (tuple); } @@ -2439,7 +2440,7 @@ RoutingProtocol::LinkTupleUpdated (const LinkTuple &tuple, uint8_t willingness) NeighborTuple *nb_tuple = m_state.FindNeighborTuple (GetMainAddress (tuple.neighborIfaceAddr)); - + if (nb_tuple == NULL) { LinkTupleAdded (tuple, willingness); @@ -2471,13 +2472,13 @@ RoutingProtocol::LinkTupleUpdated (const LinkTuple &tuple, uint8_t willingness) { nb_tuple->status = NeighborTuple::STATUS_SYM; NS_LOG_DEBUG (*nb_tuple << "->status = STATUS_SYM; changed:" - << int (statusBefore != nb_tuple->status)); + << int (statusBefore != nb_tuple->status)); } else { nb_tuple->status = NeighborTuple::STATUS_NOT_SYM; NS_LOG_DEBUG (*nb_tuple << "->status = STATUS_NOT_SYM; changed:" - << int (statusBefore != nb_tuple->status)); + << int (statusBefore != nb_tuple->status)); } } else @@ -2499,7 +2500,7 @@ RoutingProtocol::AddNeighborTuple (const NeighborTuple &tuple) // OLSR::node_id(ra_addr()), // OLSR::node_id(tuple->neighborMainAddr), // ((tuple->status() == OLSR_STATUS_SYM) ? "sym" : "not_sym")); - + m_state.InsertNeighborTuple (tuple); IncrementAnsn (); } @@ -2535,7 +2536,7 @@ RoutingProtocol::AddTwoHopNeighborTuple (const TwoHopNeighborTuple &tuple) // OLSR::node_id(ra_addr()), // OLSR::node_id(tuple->neighborMainAddr), // OLSR::node_id(tuple->twoHopNeighborAddr)); - + m_state.InsertTwoHopNeighborTuple (tuple); } @@ -2576,7 +2577,7 @@ RoutingProtocol::AddMprSelectorTuple (const MprSelectorTuple &tuple) // Simulator::Now (), // OLSR::node_id(ra_addr()), // OLSR::node_id(tuple->main_addr())); - + m_state.InsertMprSelectorTuple (tuple); IncrementAnsn (); } @@ -2595,7 +2596,7 @@ RoutingProtocol::RemoveMprSelectorTuple (const MprSelectorTuple &tuple) // Simulator::Now (), // OLSR::node_id(ra_addr()), // OLSR::node_id(tuple->main_addr())); - + m_state.EraseMprSelectorTuple (tuple); IncrementAnsn (); } @@ -2995,7 +2996,7 @@ RoutingProtocol::RemoveEntry (Ipv4Address const &dest) /// bool RoutingProtocol::Lookup (Ipv4Address const &dest, - RoutingTableEntry &outEntry) const + RoutingTableEntry &outEntry) const { // Get the iterator at "dest" position std::map::const_iterator it = @@ -3025,7 +3026,7 @@ RoutingProtocol::Lookup (Ipv4Address const &dest, /// bool RoutingProtocol::FindSendEntry (RoutingTableEntry const &entry, - RoutingTableEntry &outEntry) const + RoutingTableEntry &outEntry) const { outEntry = entry; while (outEntry.destAddr != outEntry.nextAddr) @@ -3038,12 +3039,12 @@ RoutingProtocol::FindSendEntry (RoutingTableEntry const &entry, Ptr RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, Ptr oif, Socket::SocketErrno &sockerr) -{ +{ NS_LOG_FUNCTION (this << " " << m_ipv4->GetObject ()->GetId() << " " << header.GetDestination () << " " << oif); Ptr rtentry; RoutingTableEntry entry1, entry2; bool found = false; - + if (Lookup (header.GetDestination (), entry1) != 0) { bool foundSendEntry = FindSendEntry (entry1, entry2); @@ -3058,10 +3059,10 @@ RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, PtrGetInterfaceForDevice (oif)); + << ": RouteOutput for dest=" << header.GetDestination () + << " Route interface " << interfaceIdx + << " does not match requested output interface " + << m_ipv4->GetInterfaceForDevice (oif)); sockerr = Socket::ERROR_NOROUTETOHOST; return rtentry; } @@ -3070,54 +3071,54 @@ RoutingProtocol::RouteOutput (Ptr p, const Ipv4Header &header, PtrGetNAddresses (interfaceIdx); NS_ASSERT (numOifAddresses > 0); Ipv4InterfaceAddress ifAddr; if (numOifAddresses == 1) { - ifAddr = m_ipv4->GetAddress (interfaceIdx, 0); - } else { - NS_FATAL_ERROR ("XXX Not implemented yet: IP aliasing and OLSR"); - } + ifAddr = m_ipv4->GetAddress (interfaceIdx, 0); + } else { + NS_FATAL_ERROR ("XXX Not implemented yet: IP aliasing and OLSR"); + } rtentry->SetSource (ifAddr.GetLocal ()); rtentry->SetGateway (entry2.nextAddr); rtentry->SetOutputDevice (m_ipv4->GetNetDevice (interfaceIdx)); sockerr = Socket::ERROR_NOTERROR; NS_LOG_DEBUG ("Olsr node " << m_mainAddress - << ": RouteOutput for dest=" << header.GetDestination () - << " --> nextHop=" << entry2.nextAddr - << " interface=" << entry2.interface); + << ": RouteOutput for dest=" << header.GetDestination () + << " --> nextHop=" << entry2.nextAddr + << " interface=" << entry2.interface); NS_LOG_DEBUG ("Found route to " << rtentry->GetDestination () << " via nh " << rtentry->GetGateway () << " with source addr " << rtentry->GetSource () << " and output dev " << rtentry->GetOutputDevice()); found = true; } else { rtentry = m_hnaRoutingTable->RouteOutput (p, header, oif, sockerr); - + if (rtentry) { found = true; NS_LOG_DEBUG ("Found route to " << rtentry->GetDestination () << " via nh " << rtentry->GetGateway () << " with source addr " << rtentry->GetSource () << " and output dev " << rtentry->GetOutputDevice()); } } - + if (!found) { NS_LOG_DEBUG ("Olsr node " << m_mainAddress - << ": RouteOutput for dest=" << header.GetDestination () - << " No route to host"); + << ": RouteOutput for dest=" << header.GetDestination () + << " No route to host"); sockerr = Socket::ERROR_NOROUTETOHOST; } return rtentry; } bool RoutingProtocol::RouteInput (Ptr p, - const Ipv4Header &header, Ptr idev, - UnicastForwardCallback ucb, MulticastForwardCallback mcb, - LocalDeliverCallback lcb, ErrorCallback ecb) -{ + const Ipv4Header &header, Ptr idev, + UnicastForwardCallback ucb, MulticastForwardCallback mcb, + LocalDeliverCallback lcb, ErrorCallback ecb) +{ NS_LOG_FUNCTION (this << " " << m_ipv4->GetObject ()->GetId() << " " << header.GetDestination ()); - + Ipv4Address dst = header.GetDestination (); Ipv4Address origin = header.GetSource (); @@ -3126,7 +3127,7 @@ bool RoutingProtocol::RouteInput (Ptr p, { return true; } - + // Local delivery NS_ASSERT (m_ipv4->GetInterfaceForDevice (idev) >= 0); uint32_t iif = m_ipv4->GetInterfaceForDevice (idev); @@ -3148,7 +3149,7 @@ bool RoutingProtocol::RouteInput (Ptr p, return false; } } - + // Forwarding Ptr rtentry; RoutingTableEntry entry1, entry2; @@ -3168,19 +3169,19 @@ bool RoutingProtocol::RouteInput (Ptr p, NS_ASSERT (numOifAddresses > 0); Ipv4InterfaceAddress ifAddr; if (numOifAddresses == 1) { - ifAddr = m_ipv4->GetAddress (interfaceIdx, 0); - } else { - NS_FATAL_ERROR ("XXX Not implemented yet: IP aliasing and OLSR"); - } + ifAddr = m_ipv4->GetAddress (interfaceIdx, 0); + } else { + NS_FATAL_ERROR ("XXX Not implemented yet: IP aliasing and OLSR"); + } rtentry->SetSource (ifAddr.GetLocal ()); rtentry->SetGateway (entry2.nextAddr); rtentry->SetOutputDevice (m_ipv4->GetNetDevice (interfaceIdx)); - + NS_LOG_DEBUG ("Olsr node " << m_mainAddress - << ": RouteInput for dest=" << header.GetDestination () - << " --> nextHop=" << entry2.nextAddr - << " interface=" << entry2.interface); - + << ": RouteInput for dest=" << header.GetDestination () + << " --> nextHop=" << entry2.nextAddr + << " interface=" << entry2.interface); + ucb (rtentry, p, header); return true; } @@ -3192,19 +3193,19 @@ bool RoutingProtocol::RouteInput (Ptr p, } else { - + #ifdef NS3_LOG_ENABLE NS_LOG_DEBUG ("Olsr node " << m_mainAddress - << ": RouteInput for dest=" << header.GetDestination () - << " --> NOT FOUND; ** Dumping routing table..."); - + << ": RouteInput for dest=" << header.GetDestination () + << " --> NOT FOUND; ** Dumping routing table..."); + for (std::map::const_iterator iter = m_table.begin (); - iter != m_table.end (); iter++) - { - NS_LOG_DEBUG ("dest=" << iter->first << " --> next=" << iter->second.nextAddr - << " via interface " << iter->second.interface); - } - + iter != m_table.end (); iter++) + { + NS_LOG_DEBUG ("dest=" << iter->first << " --> next=" << iter->second.nextAddr + << " via interface " << iter->second.interface); + } + NS_LOG_DEBUG ("** Routing table dump end."); #endif // NS3_LOG_ENABLE @@ -3238,9 +3239,9 @@ RoutingProtocol::NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress a /// void RoutingProtocol::AddEntry (Ipv4Address const &dest, - Ipv4Address const &next, - uint32_t interface, - uint32_t distance) + Ipv4Address const &next, + uint32_t interface, + uint32_t distance) { NS_LOG_FUNCTION (this << dest << next << interface << distance << m_mainAddress); @@ -3257,9 +3258,9 @@ RoutingProtocol::AddEntry (Ipv4Address const &dest, void RoutingProtocol::AddEntry (Ipv4Address const &dest, - Ipv4Address const &next, - Ipv4Address const &interfaceAddress, - uint32_t distance) + Ipv4Address const &next, + Ipv4Address const &interfaceAddress, + uint32_t distance) { NS_LOG_FUNCTION (this << dest << next << interfaceAddress << distance << m_mainAddress); @@ -3298,8 +3299,8 @@ RoutingProtocol::GetRoutingTableEntries () const bool RoutingProtocol::IsMyOwnAddress (const Ipv4Address & a) const { - for (std::map , Ipv4InterfaceAddress>::const_iterator j = - m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) + for (std::map, Ipv4InterfaceAddress>::const_iterator j = + m_socketAddresses.begin (); j != m_socketAddresses.end (); ++j) { Ipv4InterfaceAddress iface = j->second; if (a == iface.GetLocal ()) @@ -3313,19 +3314,18 @@ RoutingProtocol::IsMyOwnAddress (const Ipv4Address & a) const void RoutingProtocol::Dump (void) { - Time now = Simulator::Now (); - #ifdef NS3_LOG_ENABLE + Time now = Simulator::Now (); NS_LOG_DEBUG ("Dumping for node with main address " << m_mainAddress); NS_LOG_DEBUG (" Neighbor set"); for (NeighborSet::const_iterator iter = m_state.GetNeighbors ().begin (); - iter != m_state.GetNeighbors ().end (); iter++) + iter != m_state.GetNeighbors ().end (); iter++) { NS_LOG_DEBUG (" " << *iter); } NS_LOG_DEBUG (" Two-hop neighbor set"); for (TwoHopNeighborSet::const_iterator iter = m_state.GetTwoHopNeighbors ().begin (); - iter != m_state.GetTwoHopNeighbors ().end (); iter++) + iter != m_state.GetTwoHopNeighbors ().end (); iter++) { if (now < iter->expirationTime) { @@ -3341,6 +3341,7 @@ RoutingProtocol::Dump (void) #endif //NS3_LOG_ENABLE } -}} // namespace olsr, ns3 +} +} // namespace olsr, ns3 diff --git a/src/olsr/model/olsr-routing-protocol.h b/src/olsr/model/olsr-routing-protocol.h index 2517d9453..68f410c83 100644 --- a/src/olsr/model/olsr-routing-protocol.h +++ b/src/olsr/model/olsr-routing-protocol.h @@ -51,14 +51,14 @@ namespace olsr { /// An %OLSR's routing table entry. struct RoutingTableEntry { - Ipv4Address destAddr; ///< Address of the destination node. - Ipv4Address nextAddr; ///< Address of the next hop. + Ipv4Address destAddr; ///< Address of the destination node. + Ipv4Address nextAddr; ///< Address of the next hop. uint32_t interface; ///< Interface index uint32_t distance; ///< Distance in hops to the destination. RoutingTableEntry () : // default values - destAddr (), nextAddr (), - interface (0), distance (0) {}; + destAddr (), nextAddr (), + interface (0), distance (0) {}; }; class RoutingProtocol; @@ -105,9 +105,9 @@ private: public: std::set GetInterfaceExclusions () const - { - return m_interfaceExclusions; - } + { + return m_interfaceExclusions; + } void SetInterfaceExclusions (std::set exceptions); /// Inject Association to be sent in HNA message @@ -133,7 +133,7 @@ private: uint16_t m_messageSequenceNumber; /// Advertised Neighbor Set sequence number. uint16_t m_ansn; - + /// HELLO messages' emission interval. Time m_helloInterval; /// TC messages' emission interval. @@ -299,6 +299,7 @@ private: }; -}} // namespace ns3 +} +} // namespace ns3 #endif diff --git a/src/olsr/model/olsr-state.cc b/src/olsr/model/olsr-state.cc index 06cf7c3ca..4b4f405d8 100644 --- a/src/olsr/model/olsr-state.cc +++ b/src/olsr/model/olsr-state.cc @@ -100,7 +100,7 @@ OlsrState::PrintMprSelectorSet () const os << "]"; return os.str (); } - + /********** Neighbor Set Manipulation **********/ @@ -198,7 +198,7 @@ OlsrState::FindTwoHopNeighborTuple (Ipv4Address const &neighborMainAddr, { return &(*it); } - } + } return NULL; } @@ -493,14 +493,14 @@ AssociationTuple* OlsrState::FindAssociationTuple (const Ipv4Address &gatewayAddr, const Ipv4Address &networkAddr, const Ipv4Mask &netmask) { for (AssociationSet::iterator it = m_associationSet.begin (); - it != m_associationSet.end (); it++) + it != m_associationSet.end (); it++) { if (it->gatewayAddr == gatewayAddr and it->networkAddr == networkAddr and it->netmask == netmask) { return &(*it); } } - return NULL; + return NULL; } void diff --git a/src/olsr/model/olsr-state.h b/src/olsr/model/olsr-state.h index 8d14380a6..f6e147704 100644 --- a/src/olsr/model/olsr-state.h +++ b/src/olsr/model/olsr-state.h @@ -35,24 +35,24 @@ using namespace olsr; class OlsrState { // friend class Olsr; - + protected: - LinkSet m_linkSet; ///< Link Set (RFC 3626, section 4.2.1). - NeighborSet m_neighborSet; ///< Neighbor Set (RFC 3626, section 4.3.1). - TwoHopNeighborSet m_twoHopNeighborSet; ///< 2-hop Neighbor Set (RFC 3626, section 4.3.2). - TopologySet m_topologySet; ///< Topology Set (RFC 3626, section 4.4). - MprSet m_mprSet; ///< MPR Set (RFC 3626, section 4.3.3). - MprSelectorSet m_mprSelectorSet; ///< MPR Selector Set (RFC 3626, section 4.3.4). - DuplicateSet m_duplicateSet; ///< Duplicate Set (RFC 3626, section 3.4). - IfaceAssocSet m_ifaceAssocSet; ///< Interface Association Set (RFC 3626, section 4.1). + LinkSet m_linkSet; ///< Link Set (RFC 3626, section 4.2.1). + NeighborSet m_neighborSet; ///< Neighbor Set (RFC 3626, section 4.3.1). + TwoHopNeighborSet m_twoHopNeighborSet; ///< 2-hop Neighbor Set (RFC 3626, section 4.3.2). + TopologySet m_topologySet; ///< Topology Set (RFC 3626, section 4.4). + MprSet m_mprSet; ///< MPR Set (RFC 3626, section 4.3.3). + MprSelectorSet m_mprSelectorSet; ///< MPR Selector Set (RFC 3626, section 4.3.4). + DuplicateSet m_duplicateSet; ///< Duplicate Set (RFC 3626, section 3.4). + IfaceAssocSet m_ifaceAssocSet; ///< Interface Association Set (RFC 3626, section 4.1). AssociationSet m_associationSet; ///< Association Set (RFC 3626, section12.2). Associations obtained from HNA messages generated by other nodes. - Associations m_associations; ///< The node's local Host Network Associations that will be advertised using HNA messages. + Associations m_associations; ///< The node's local Host Network Associations that will be advertised using HNA messages. public: OlsrState () {} - + // MPR selector const MprSelectorSet & GetMprSelectors () const { @@ -160,9 +160,9 @@ public: return m_associations; } - AssociationTuple* FindAssociationTuple (const Ipv4Address &gatewayAddr,\ - const Ipv4Address &networkAddr,\ - const Ipv4Mask &netmask); + AssociationTuple* FindAssociationTuple (const Ipv4Address &gatewayAddr, \ + const Ipv4Address &networkAddr, \ + const Ipv4Mask &netmask); void EraseAssociationTuple (const AssociationTuple &tuple); void InsertAssociationTuple (const AssociationTuple &tuple); void EraseAssociation (const Association &tuple); diff --git a/src/olsr/test/bug780-test.cc b/src/olsr/test/bug780-test.cc index 54bf21c5d..d0a908de0 100644 --- a/src/olsr/test/bug780-test.cc +++ b/src/olsr/test/bug780-test.cc @@ -44,7 +44,7 @@ /// Set to true to rewrite reference traces, leave false to run regression tests namespace { - const bool WRITE_VECTORS = false; +const bool WRITE_VECTORS = false; } @@ -79,14 +79,14 @@ Bug780Test::DoRun () { SeedManager::SetSeed(123); CreateNodes (); - + Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - + if (!WRITE_VECTORS) { - CheckResults (); + CheckResults (); } } @@ -116,8 +116,8 @@ Bug780Test::CreateNodes (void) NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); wifi.SetStandard (WIFI_PHY_STANDARD_80211b); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", - "DataMode",StringValue(phyMode), - "ControlMode",StringValue(phyMode)); + "DataMode",StringValue(phyMode), + "ControlMode",StringValue(phyMode)); //set the tx range to 300 wifiPhy.Set ("TxPowerStart",DoubleValue (-0.1615)); @@ -143,7 +143,7 @@ Bug780Test::CreateNodes (void) Ptr positionAlloc_Adhoc = CreateObject(); double distance = 0.0; - for (uint32_t i = 0;i <= adhocNodes.GetN();i++) + for (uint32_t i = 0; i <= adhocNodes.GetN(); i++) { positionAlloc_Adhoc->Add(Vector(distance,0.0,0.0)); distance += 250.0; @@ -156,7 +156,7 @@ Bug780Test::CreateNodes (void) //At 50 sec node 3 moves towards node 2 Simulator::Schedule (Seconds (50.0), &SetVelocity, adhocNodes.Get(2),Vector(-5.0,0.0,0.0)); //AT 100 sec set node 3 with zero velocity - Simulator::Schedule (Seconds (100.0), &SetVelocity, adhocNodes.Get(2) ,Vector(0.0,0.0,0.0)); + Simulator::Schedule (Seconds (100.0), &SetVelocity, adhocNodes.Get(2),Vector(0.0,0.0,0.0)); //Move node2 away from node 3 Simulator::Schedule (Seconds (100.0), &SetVelocity, adhocNodes.Get(1),Vector(5.0,0.0,0.0)); //AT 150 sec set node 2 with zero velocity @@ -185,11 +185,11 @@ Bug780Test::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << PREFIX << "-" << i << "-0.pcap"; os2 << GetTempDir () << PREFIX << "-" << i << "-0.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/olsr/test/hello-regression-test.cc b/src/olsr/test/hello-regression-test.cc index 9f8fbca31..e2c352b5d 100644 --- a/src/olsr/test/hello-regression-test.cc +++ b/src/olsr/test/hello-regression-test.cc @@ -56,12 +56,12 @@ HelloRegressionTest::DoRun () { SeedManager::SetSeed(12345); CreateNodes (); - + Simulator::Stop (m_time); Simulator::Run (); Simulator::Destroy (); - - if (!WRITE_VECTORS) CheckResults (); + + if (!WRITE_VECTORS) CheckResults (); } void @@ -98,11 +98,11 @@ HelloRegressionTest::CheckResults () // File naming conventions are hard-coded here. os1 << NS_TEST_SOURCEDIR << PREFIX << "-" << i << "-1.pcap"; os2 << GetTempDir () << PREFIX << "-" << i << "-1.pcap"; - + uint32_t sec(0), usec(0); bool diff = PcapFile::Diff (os1.str(), os2.str(), sec, usec); NS_TEST_EXPECT_MSG_EQ (diff, false, "PCAP traces " << os1.str() << " and " << os2.str() - << " differ starting from " << sec << " s " << usec << " us"); + << " differ starting from " << sec << " s " << usec << " us"); } } diff --git a/src/olsr/test/hello-regression-test.h b/src/olsr/test/hello-regression-test.h index 8db6ebadd..eff24bc3f 100644 --- a/src/olsr/test/hello-regression-test.h +++ b/src/olsr/test/hello-regression-test.h @@ -37,7 +37,7 @@ namespace olsr * * Expected trace (5 seconds): \verbatim - 1 2 + 1 2 |------>| HELLO (empty) src = 10.1.1.1 |<------| HELLO (empty) src = 10.1.1.2 |------>| HELLO (Link type: Asymmetric link, Neighbor address: 10.1.1.2) src = 10.1.1.1 diff --git a/src/olsr/test/olsr-header-test-suite.cc b/src/olsr/test/olsr-header-test-suite.cc index ac375638f..4a1608bf8 100644 --- a/src/olsr/test/olsr-header-test-suite.cc +++ b/src/olsr/test/olsr-header-test-suite.cc @@ -32,7 +32,8 @@ public: OlsrEmfTestCase::OlsrEmfTestCase () : TestCase ("Check Emf olsr time conversion") -{} +{ +} void OlsrEmfTestCase::DoRun (void) { @@ -54,7 +55,8 @@ public: OlsrMidTestCase::OlsrMidTestCase () : TestCase ("Check Mid olsr messages") -{} +{ +} void OlsrMidTestCase::DoRun (void) { @@ -66,7 +68,7 @@ OlsrMidTestCase::DoRun (void) olsr::MessageHeader::Mid &mid1 = msg1.GetMid (); olsr::MessageHeader msg2; olsr::MessageHeader::Mid &mid2 = msg2.GetMid (); - + // MID message #1 { std::vector &addresses = mid1.interfaceAddresses; @@ -97,13 +99,13 @@ OlsrMidTestCase::DoRun (void) // Build an OLSR packet header hdr.SetPacketLength (hdr.GetSerializedSize () + msg1.GetSerializedSize () + msg2.GetSerializedSize ()); hdr.SetPacketSequenceNumber (123); - + // Now add all the headers in the correct order packet.AddHeader (msg2); packet.AddHeader (msg1); packet.AddHeader (hdr); - } + } { olsr::PacketHeader hdr; @@ -112,9 +114,9 @@ OlsrMidTestCase::DoRun (void) uint32_t sizeLeft = hdr.GetPacketLength () - hdr.GetSerializedSize (); { olsr::MessageHeader msg1; - + packet.RemoveHeader (msg1); - + NS_TEST_ASSERT_MSG_EQ (msg1.GetTimeToLive (), 255, "XXX"); NS_TEST_ASSERT_MSG_EQ (msg1.GetOriginatorAddress (), Ipv4Address ("11.22.33.44"), "XXX"); NS_TEST_ASSERT_MSG_EQ (msg1.GetVTime (), Seconds (9), "XXX"); @@ -133,7 +135,7 @@ OlsrMidTestCase::DoRun (void) olsr::MessageHeader msg2; packet.RemoveHeader (msg2); - + NS_TEST_ASSERT_MSG_EQ (msg2.GetTimeToLive (), 254, "XXX"); NS_TEST_ASSERT_MSG_EQ (msg2.GetOriginatorAddress (), Ipv4Address ("12.22.33.44"), "XXX"); NS_TEST_ASSERT_MSG_EQ (msg2.GetVTime (), Seconds (10), "XXX"); @@ -159,7 +161,8 @@ public: OlsrHelloTestCase::OlsrHelloTestCase () : TestCase ("Check Hello olsr messages") -{} +{ +} void OlsrHelloTestCase::DoRun (void) { @@ -176,7 +179,7 @@ OlsrHelloTestCase::DoRun (void) lm1.neighborInterfaceAddresses.push_back (Ipv4Address ("1.2.3.4")); lm1.neighborInterfaceAddresses.push_back (Ipv4Address ("1.2.3.5")); helloIn.linkMessages.push_back (lm1); - + olsr::MessageHeader::Hello::LinkMessage lm2; lm2.linkCode = 3; lm2.neighborInterfaceAddresses.push_back (Ipv4Address ("2.2.3.4")); @@ -189,11 +192,11 @@ OlsrHelloTestCase::DoRun (void) olsr::MessageHeader msgOut; packet.RemoveHeader (msgOut); olsr::MessageHeader::Hello &helloOut = msgOut.GetHello (); - + NS_TEST_ASSERT_MSG_EQ (helloOut.GetHTime (), Seconds (7), "XXX"); NS_TEST_ASSERT_MSG_EQ (helloOut.willingness, 66, "XXX"); NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages.size (), 2, "XXX"); - + NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[0].linkCode, 2, "XXX"); NS_TEST_ASSERT_MSG_EQ (helloOut.linkMessages[0].neighborInterfaceAddresses[0], Ipv4Address ("1.2.3.4"), "XXX"); @@ -218,26 +221,27 @@ public: OlsrTcTestCase::OlsrTcTestCase () : TestCase ("Check Tc olsr messages") -{} +{ +} void OlsrTcTestCase::DoRun (void) { Packet packet; olsr::MessageHeader msgIn; olsr::MessageHeader::Tc &tcIn = msgIn.GetTc (); - + tcIn.ansn = 0x1234; tcIn.neighborAddresses.push_back (Ipv4Address ("1.2.3.4")); tcIn.neighborAddresses.push_back (Ipv4Address ("1.2.3.5")); packet.AddHeader (msgIn); - + olsr::MessageHeader msgOut; packet.RemoveHeader (msgOut); olsr::MessageHeader::Tc &tcOut = msgOut.GetTc (); - + NS_TEST_ASSERT_MSG_EQ (tcOut.ansn, 0x1234, "XXX"); NS_TEST_ASSERT_MSG_EQ (tcOut.neighborAddresses.size (), 2, "XXX"); - + NS_TEST_ASSERT_MSG_EQ (tcOut.neighborAddresses[0], Ipv4Address ("1.2.3.4"), "XXX"); NS_TEST_ASSERT_MSG_EQ (tcOut.neighborAddresses[1], @@ -255,7 +259,8 @@ public: OlsrHnaTestCase::OlsrHnaTestCase () : TestCase ("Check Hna olsr messages") -{} +{ +} void OlsrHnaTestCase::DoRun (void) @@ -263,29 +268,29 @@ OlsrHnaTestCase::DoRun (void) Packet packet; olsr::MessageHeader msgIn; olsr::MessageHeader::Hna &hnaIn = msgIn.GetHna (); - + hnaIn.associations.push_back ((olsr::MessageHeader::Hna::Association) { Ipv4Address ("1.2.3.4"), Ipv4Mask ("255.255.255.0")}); hnaIn.associations.push_back ((olsr::MessageHeader::Hna::Association) - {Ipv4Address ("1.2.3.5"), Ipv4Mask ("255.255.0.0")}); + { Ipv4Address ("1.2.3.5"), Ipv4Mask ("255.255.0.0")}); packet.AddHeader (msgIn); - + olsr::MessageHeader msgOut; packet.RemoveHeader (msgOut); olsr::MessageHeader::Hna &hnaOut = msgOut.GetHna (); - + NS_TEST_ASSERT_MSG_EQ (hnaOut.associations.size (), 2, "XXX"); - + NS_TEST_ASSERT_MSG_EQ (hnaOut.associations[0].address, - Ipv4Address ("1.2.3.4"), "XXX"); + Ipv4Address ("1.2.3.4"), "XXX"); NS_TEST_ASSERT_MSG_EQ (hnaOut.associations[0].mask, - Ipv4Mask ("255.255.255.0"), "XXX"); + Ipv4Mask ("255.255.255.0"), "XXX"); NS_TEST_ASSERT_MSG_EQ (hnaOut.associations[1].address, - Ipv4Address ("1.2.3.5"), "XXX"); + Ipv4Address ("1.2.3.5"), "XXX"); NS_TEST_ASSERT_MSG_EQ (hnaOut.associations[1].mask, - Ipv4Mask ("255.255.0.0"), "XXX"); - + Ipv4Mask ("255.255.0.0"), "XXX"); + NS_TEST_ASSERT_MSG_EQ (packet.GetSize (), 0, "All bytes in packet were not read"); } diff --git a/src/olsr/test/olsr-routing-protocol-test-suite.cc b/src/olsr/test/olsr-routing-protocol-test-suite.cc index 4d0aa8c4a..7fdea2474 100644 --- a/src/olsr/test/olsr-routing-protocol-test-suite.cc +++ b/src/olsr/test/olsr-routing-protocol-test-suite.cc @@ -27,15 +27,15 @@ /********** Willingness **********/ /// Willingness for forwarding packets from other nodes: never. -#define OLSR_WILL_NEVER 0 +#define OLSR_WILL_NEVER 0 /// Willingness for forwarding packets from other nodes: low. -#define OLSR_WILL_LOW 1 +#define OLSR_WILL_LOW 1 /// Willingness for forwarding packets from other nodes: medium. -#define OLSR_WILL_DEFAULT 3 +#define OLSR_WILL_DEFAULT 3 /// Willingness for forwarding packets from other nodes: high. -#define OLSR_WILL_HIGH 6 +#define OLSR_WILL_HIGH 6 /// Willingness for forwarding packets from other nodes: always. -#define OLSR_WILL_ALWAYS 7 +#define OLSR_WILL_ALWAYS 7 namespace ns3 { namespace olsr { @@ -87,9 +87,9 @@ OlsrMprTestCase::DoRun () tuple.neighborMainAddr = Ipv4Address ("10.0.0.3"); tuple.twoHopNeighborAddr = Ipv4Address ("10.0.0.4"); protocol->m_state.InsertTwoHopNeighborTuple (tuple); - + protocol->MprComputation (); - NS_TEST_EXPECT_MSG_EQ (state.GetMprSet ().size (), 1 , "An only address must be chosen."); + NS_TEST_EXPECT_MSG_EQ (state.GetMprSet ().size (), 1, "An only address must be chosen."); /* * 1 -- 2 -- 5 * | | @@ -103,7 +103,7 @@ OlsrMprTestCase::DoRun () protocol->MprComputation (); MprSet mpr = state.GetMprSet (); - NS_TEST_EXPECT_MSG_EQ (mpr.size (), 1 , "An only address must be chosen."); + NS_TEST_EXPECT_MSG_EQ (mpr.size (), 1, "An only address must be chosen."); NS_TEST_EXPECT_MSG_EQ ((mpr.find ("10.0.0.2") != mpr.end ()), true, "Node 1 must select node 2 as MPR"); /* * 1 -- 2 -- 5 @@ -120,7 +120,7 @@ OlsrMprTestCase::DoRun () protocol->MprComputation (); mpr = state.GetMprSet (); - NS_TEST_EXPECT_MSG_EQ (mpr.size (), 2 , "An only address must be chosen."); + NS_TEST_EXPECT_MSG_EQ (mpr.size (), 2, "An only address must be chosen."); NS_TEST_EXPECT_MSG_EQ ((mpr.find ("10.0.0.2") != mpr.end ()), true, "Node 1 must select node 2 as MPR"); NS_TEST_EXPECT_MSG_EQ ((mpr.find ("10.0.0.3") != mpr.end ()), true, "Node 1 must select node 3 as MPR"); /* @@ -140,7 +140,7 @@ OlsrMprTestCase::DoRun () protocol->MprComputation (); mpr = state.GetMprSet (); - NS_TEST_EXPECT_MSG_EQ (mpr.size (), 3 , "An only address must be chosen."); + NS_TEST_EXPECT_MSG_EQ (mpr.size (), 3, "An only address must be chosen."); NS_TEST_EXPECT_MSG_EQ ((mpr.find ("10.0.0.7") != mpr.end ()), true, "Node 1 must select node 7 as MPR"); /* * 7 <- WILL_ALWAYS @@ -163,7 +163,7 @@ OlsrMprTestCase::DoRun () protocol->MprComputation (); mpr = state.GetMprSet (); - NS_TEST_EXPECT_MSG_EQ (mpr.size (), 3 , "An only address must be chosen."); + NS_TEST_EXPECT_MSG_EQ (mpr.size (), 3, "An only address must be chosen."); NS_TEST_EXPECT_MSG_EQ ((mpr.find ("10.0.0.9") == mpr.end ()), true, "Node 1 must NOT select node 8 as MPR"); } @@ -179,6 +179,7 @@ OlsrProtocolTestSuite::OlsrProtocolTestSuite() AddTestCase (new OlsrMprTestCase ()); } -}} // namespace olsr, ns3 +} +} // namespace olsr, ns3 diff --git a/src/olsr/test/tc-regression-test.h b/src/olsr/test/tc-regression-test.h index ccc5c15f4..d9fe2fcf1 100644 --- a/src/olsr/test/tc-regression-test.h +++ b/src/olsr/test/tc-regression-test.h @@ -37,38 +37,38 @@ namespace olsr * * Expected trace (20 seconds, note random b-cast jitter): \verbatim - 1 2 3 + 1 2 3 |<------|------>| HELLO (empty) src = 10.1.1.2 | |<------|------> HELLO (empty) src = 10.1.1.3 <------|------>| | HELLO (empty) src = 10.1.1.1 <------|------>| | HELLO (Link Type: Asymmetric, Neighbor: 10.1.1.2) src = 10.1.1.1 | |<------|------> HELLO (Link Type: Asymmetric, Neighbor: 10.1.1.2) src = 10.1.1.3 |<------|------>| HELLO (Link Type: Asymmetric, Neighbor: 10.1.1.3; Link Type: Asymmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 - |<------|------>| HELLO (Link Type: Asymmetric, Neighbor: 10.1.1.3; Link Type: Asymmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 + |<------|------>| HELLO (Link Type: Asymmetric, Neighbor: 10.1.1.3; Link Type: Asymmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 <------|------>| | HELLO (Link Type: Symmetric, Neighbor: 10.1.1.2) src = 10.1.1.1 | |<------|------> HELLO (Link Type: Symmetric, Neighbor: 10.1.1.2) src = 10.1.1.3 - |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 + |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 <------|------>| | HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.1 | |<------|------> HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.3 - |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 + |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 <------|------>| | HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.1 | |<------|------> HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.3 - |<======|======>| TC (10.1.1.3; 10.1.1.1) + HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 + |<======|======>| TC (10.1.1.3; 10.1.1.1) + HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 | |<------|------> HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.3 <------|------>| | HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.1 - |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 + |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 <------|------>| | HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.1 | |<------|------> HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.3 <------|------>| | HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.1 | |<------|------> HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.3 - |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 - |<======|======>| TC (10.1.1.3; 10.1.1.1) src = 10.1.1.2 + |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 + |<======|======>| TC (10.1.1.3; 10.1.1.1) src = 10.1.1.2 | |<------|------> HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.3 <------|------>| | HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.1 - |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 + |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 <------|------>| | HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.1 | |<------|------> HELLO (Link Type: MPR Link, Neighbor: 10.1.1.2) src = 10.1.1.3 - |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 + |<------|------>| HELLO (Link Type: Symmetric, Neighbor: 10.1.1.3; Link Type: Symmetric, Neighbor: 10.1.1.1) src = 10.1.1.2 \endverbatim */ class TcRegressionTest : public TestCase diff --git a/src/openflow/doc/openflow-switch.h b/src/openflow/doc/openflow-switch.h index 436e66094..97dab7d27 100644 --- a/src/openflow/doc/openflow-switch.h +++ b/src/openflow/doc/openflow-switch.h @@ -21,8 +21,7 @@ */ /** - * \ingroup devices - * \defgroup OpenFlowSwitchModel OpenFlow Switch Model + * \defgroup OpenFlowSwitchModel OpenFlow Switch Device * * \section OpenFlowSwitchModelOverview OpenFlow Switch Model Overview * diff --git a/doc/manual/source/openflow-switch.rst b/src/openflow/doc/openflow-switch.rst similarity index 100% rename from doc/manual/source/openflow-switch.rst rename to src/openflow/doc/openflow-switch.rst diff --git a/src/openflow/examples/openflow-switch.cc b/src/openflow/examples/openflow-switch.cc index dca578f14..3d2fb5bc6 100644 --- a/src/openflow/examples/openflow-switch.cc +++ b/src/openflow/examples/openflow-switch.cc @@ -69,9 +69,9 @@ bool SetTimeout (std::string value) { try { - timeout = ns3::Seconds (atof (value.c_str ())); - return true; - } + timeout = ns3::Seconds (atof (value.c_str ())); + return true; + } catch (...) { return false; } return false; } @@ -91,7 +91,7 @@ main (int argc, char *argv[]) cmd.AddValue ("drop", "Use Drop Controller (Learning if not specified).", MakeCallback (&SetDrop)); cmd.AddValue ("t", "Learning Controller Timeout (has no effect if drop controller is specified).", MakeCallback( &SetTimeout)); cmd.AddValue ("timeout", "Learning Controller Timeout (has no effect if drop controller is specified).", MakeCallback( &SetTimeout)); - + cmd.Parse (argc, argv); if (verbose) @@ -129,18 +129,18 @@ main (int argc, char *argv[]) // Create the switch netdevice, which will do the packet switching Ptr switchNode = csmaSwitch.Get (0); OpenFlowSwitchHelper swtch; - + if (use_drop) - { - Ptr controller = CreateObject (); - swtch.Install (switchNode, switchDevices, controller); - } + { + Ptr controller = CreateObject (); + swtch.Install (switchNode, switchDevices, controller); + } else - { - Ptr controller = CreateObject (); - if (!timeout.IsZero ()) controller->SetAttribute ("ExpirationTime", TimeValue (timeout)); - swtch.Install (switchNode, switchDevices, controller); - } + { + Ptr controller = CreateObject (); + if (!timeout.IsZero ()) controller->SetAttribute ("ExpirationTime", TimeValue (timeout)); + swtch.Install (switchNode, switchDevices, controller); + } // Add internet stack to the terminals InternetStackHelper internet; diff --git a/src/openflow/helper/openflow-switch-helper.h b/src/openflow/helper/openflow-switch-helper.h index 8b10c476c..fc54d32b1 100644 --- a/src/openflow/helper/openflow-switch-helper.h +++ b/src/openflow/helper/openflow-switch-helper.h @@ -43,7 +43,7 @@ public: * Construct a OpenFlowSwitchHelper */ OpenFlowSwitchHelper (); - + /** * Set an attribute on each ns3::OpenFlowSwitchNetDevice created by * OpenFlowSwitchHelper::Install @@ -81,7 +81,7 @@ public: */ NetDeviceContainer Install (Ptr node, NetDeviceContainer c); - + /** * This method creates an ns3::OpenFlowSwitchNetDevice with the attributes * configured by OpenFlowSwitchHelper::SetDeviceAttribute, adds the device @@ -94,7 +94,7 @@ public: */ NetDeviceContainer Install (std::string nodeName, NetDeviceContainer c); - + private: ObjectFactory m_deviceFactory; }; diff --git a/src/openflow/model/openflow-interface.cc b/src/openflow/model/openflow-interface.cc index 649e45154..1ef9601c4 100644 --- a/src/openflow/model/openflow-interface.cc +++ b/src/openflow/model/openflow-interface.cc @@ -25,14 +25,14 @@ namespace ns3 { namespace ofi { NS_LOG_COMPONENT_DEFINE ("OpenFlowInterface"); - + Stats::Stats (ofp_stats_types _type, size_t body_len) { type = _type; size_t min_body = 0, max_body = 0; - + switch (type) - { + { case OFPST_DESC: break; case OFPST_FLOW: @@ -51,13 +51,13 @@ Stats::Stats (ofp_stats_types _type, size_t body_len) break; default: NS_LOG_ERROR ("received stats request of unknown type " << type); - return;// -EINVAL; - } - + return; // -EINVAL; + } + if ((min_body != 0 || max_body != 0) && (body_len < min_body || body_len > max_body)) { NS_LOG_ERROR ("stats request type " << type << " with bad body length " << body_len); - return;// -EINVAL; + return; // -EINVAL; } } @@ -65,7 +65,7 @@ int Stats::DoInit (const void *body, int body_len, void **state) { switch (type) - { + { case OFPST_DESC: return 0; case OFPST_FLOW: @@ -80,8 +80,8 @@ Stats::DoInit (const void *body, int body_len, void **state) return 0; case OFPST_VENDOR: return 0; - } - + } + return 0; } @@ -89,7 +89,7 @@ int Stats::DoDump (Ptr swtch, void *state, ofpbuf *buffer) { switch (type) - { + { case OFPST_DESC: return DescStatsDump (state, buffer); case OFPST_FLOW: @@ -104,8 +104,8 @@ Stats::DoDump (Ptr swtch, void *state, ofpbuf *buffer) return PortTableStatsDump (swtch, state, buffer); case OFPST_VENDOR: return 0; - } - + } + return 0; } @@ -113,7 +113,7 @@ void Stats::DoCleanup (void *state) { switch (type) - { + { case OFPST_DESC: break; case OFPST_FLOW: @@ -132,9 +132,9 @@ Stats::DoCleanup (void *state) break; case OFPST_VENDOR: break; - } + } } - + int Stats::DescStatsDump (void *state, ofpbuf *buffer) { @@ -245,10 +245,10 @@ Stats::AggregateStatsDump (Ptr swtch, ofp_aggregate_sta sw_flow_key match_key; flow_extract_match (&match_key, &rq->match); int table_idx = rq->table_id == 0xff ? 0 : rq->table_id; - + sw_table_position position; memset (&position, 0, sizeof position); - + while (table_idx < swtch->GetChain ()->n_tables && (rq->table_id == 0xff || rq->table_id == table_idx)) { @@ -722,14 +722,14 @@ Controller::StartDump (StatsDumpCallback* cb) { int error = 1; while (error > 0) // Switch's StatsDump returns 1 if the reply isn't complete. - { - error = cb->swtch->StatsDump (cb); - } + { + error = cb->swtch->StatsDump (cb); + } if (error != 0) // When the reply is complete, error will equal zero if there's no errors. - { - NS_LOG_WARN ("Dump Callback Error: " << strerror (-error)); - } + { + NS_LOG_WARN ("Dump Callback Error: " << strerror (-error)); + } // Clean up cb->swtch->StatsDone (cb); @@ -766,13 +766,13 @@ DropController::ReceiveFromSwitch (Ptr swtch, ofpbuf* b TypeId LearningController::GetTypeId (void) { static TypeId tid = TypeId ("ns3::ofi::LearningController") - .SetParent (Controller::GetTypeId()) - .AddConstructor () - .AddAttribute ("ExpirationTime", - "Time it takes for learned MAC state entry/created flow to expire.", - TimeValue (Seconds (0)), - MakeTimeAccessor (&LearningController::m_expirationTime), - MakeTimeChecker ()) + .SetParent (Controller::GetTypeId()) + .AddConstructor () + .AddAttribute ("ExpirationTime", + "Time it takes for learned MAC state entry/created flow to expire.", + TimeValue (Seconds (0)), + MakeTimeAccessor (&LearningController::m_expirationTime), + MakeTimeChecker ()) ; return tid; } @@ -810,7 +810,7 @@ LearningController::ReceiveFromSwitch (Ptr swtch, ofpbu LearnState_t::iterator st = m_learnState.find (dst_addr); if (st != m_learnState.end ()) { - out_port = st->second.port; + out_port = st->second.port; } else { @@ -829,7 +829,7 @@ LearningController::ReceiveFromSwitch (Ptr swtch, ofpbu x[0].port = out_port; // Create a new flow that outputs matched packets to a learned port, OFPP_FLOOD if there's no learned port. - ofp_flow_mod* ofm = BuildFlow (key, opi->buffer_id, OFPFC_ADD, x, sizeof(x), OFP_FLOW_PERMANENT, m_expirationTime.IsZero ()?OFP_FLOW_PERMANENT:m_expirationTime.GetSeconds ()); + ofp_flow_mod* ofm = BuildFlow (key, opi->buffer_id, OFPFC_ADD, x, sizeof(x), OFP_FLOW_PERMANENT, m_expirationTime.IsZero () ? OFP_FLOW_PERMANENT : m_expirationTime.GetSeconds ()); SendToSwitch (swtch, ofm, ofm->header.length); // We can learn a specific port for the source address for future use. @@ -853,7 +853,7 @@ LearningController::ReceiveFromSwitch (Ptr swtch, ofpbu src_addr.CopyTo (key.flow.dl_dst); dst_addr.CopyTo (key.flow.dl_src); key.flow.in_port = out_port; - ofp_flow_mod* ofm2 = BuildFlow (key, -1, OFPFC_MODIFY, x2, sizeof(x2), OFP_FLOW_PERMANENT, m_expirationTime.IsZero ()?OFP_FLOW_PERMANENT:m_expirationTime.GetSeconds ()); + ofp_flow_mod* ofm2 = BuildFlow (key, -1, OFPFC_MODIFY, x2, sizeof(x2), OFP_FLOW_PERMANENT, m_expirationTime.IsZero () ? OFP_FLOW_PERMANENT : m_expirationTime.GetSeconds ()); SendToSwitch (swtch, ofm2, ofm2->header.length); } } diff --git a/src/openflow/model/openflow-interface.h b/src/openflow/model/openflow-interface.h index e0859a533..bac3b5b59 100644 --- a/src/openflow/model/openflow-interface.h +++ b/src/openflow/model/openflow-interface.h @@ -110,7 +110,7 @@ void update_checksums (ofpbuf *buffer, const sw_flow_key *key, uint32_t old_word namespace ns3 { class OpenFlowSwitchNetDevice; - + namespace ofi { /** @@ -146,9 +146,9 @@ struct Port class Stats { - public: +public: Stats (ofp_stats_types _type, size_t body_len); - + /** * \brief Prepares to dump some kind of statistics on the connected OpenFlowSwitchNetDevice. * @@ -158,7 +158,7 @@ class Stats * \return 0 if successful, otherwise a negative error code. */ int DoInit (const void *body, int body_len, void **state); - + /** * \brief Appends statistics for OpenFlowSwitchNetDevice to 'buffer'. * @@ -168,7 +168,7 @@ class Stats * \return 1 if it should be called again later with another buffer, 0 if it is done, or a negative errno value on failure. */ int DoDump (Ptr swtch, void *state, ofpbuf *buffer); - + /** * \brief Cleans any state created by the init or dump functions. * @@ -177,7 +177,7 @@ class Stats * \param state State information to clear. */ void DoCleanup (void *state); - + /** * \brief State of the FlowStats request/reply. */ @@ -190,7 +190,7 @@ class Stats ofpbuf *buffer; }; - + /** * \brief State of the PortStats request/reply. */ @@ -199,9 +199,9 @@ class Stats uint32_t num_ports; ///< Number of ports in host byte order uint32_t *ports; ///< Array of ports in network byte order }; - + ofp_stats_types type; - private: +private: int DescStatsDump (void *state, ofpbuf *buffer); int FlowStatsInit (const void *body, int body_len, void **state); @@ -322,10 +322,10 @@ struct EricssonAction struct StatsDumpCallback { bool done; ///< Whether we are done requesting stats. - ofp_stats_request *rq; ///< Current stats request. - Stats *s; ///< Handler of the stats request. + ofp_stats_request *rq; ///< Current stats request. + Stats *s; ///< Handler of the stats request. void *state; ///< Stats request state data. - Ptr swtch; ///< The switch that we're requesting data from. + Ptr swtch; ///< The switch that we're requesting data from. }; /** @@ -335,7 +335,7 @@ struct SwitchPacketMetadata { Ptr packet; ///< The Packet itself. ofpbuf* buffer; ///< The OpenFlow buffer as created from the Packet, with its data and headers. - uint16_t protocolNumber; ///< Protocol type of the Packet when the Packet is received + uint16_t protocolNumber; ///< Protocol type of the Packet when the Packet is received Address src; ///< Source Address of the Packet when the Packet is received Address dst; ///< Destination Address of the Packet when the Packet is received. }; @@ -351,17 +351,17 @@ public: static TypeId GetTypeId (void) { static TypeId tid = TypeId ("ns3::ofi::Controller") - .SetParent () - .AddConstructor () + .SetParent () + .AddConstructor () ; return tid; } - + virtual ~Controller () { m_switches.clear (); } - + /** * Adds a switch to the controller. * @@ -378,7 +378,7 @@ public: virtual void ReceiveFromSwitch (Ptr swtch, ofpbuf* buffer) { } - + /** * \brief Starts a callback-based, reliable, possibly multi-message reply to a request made by the controller. * @@ -438,7 +438,7 @@ protected: * \return The packet type, as defined in the ofp_type struct. */ uint8_t GetPacketType (ofpbuf* buffer); - + typedef std::set > Switches_t; Switches_t m_switches; ///< The collection of switches registered to this controller. }; @@ -465,12 +465,12 @@ class LearningController : public Controller { public: static TypeId GetTypeId (void); - + virtual ~LearningController () { m_learnState.clear (); } - + void ReceiveFromSwitch (Ptr swtch, ofpbuf* buffer); protected: @@ -478,7 +478,7 @@ protected: { uint32_t port; ///< Learned port. }; - Time m_expirationTime; ///< Time it takes for learned MAC state entry/created flow to expire. + Time m_expirationTime; ///< Time it takes for learned MAC state entry/created flow to expire. typedef std::map LearnState_t; LearnState_t m_learnState; ///< Learned state data. }; diff --git a/src/openflow/model/openflow-switch-net-device.cc b/src/openflow/model/openflow-switch-net-device.cc index 968fccdd6..04b2e7625 100644 --- a/src/openflow/model/openflow-switch-net-device.cc +++ b/src/openflow/model/openflow-switch-net-device.cc @@ -74,15 +74,15 @@ OpenFlowSwitchNetDevice::GetTypeId (void) MakeTimeAccessor (&OpenFlowSwitchNetDevice::m_lookupDelay), MakeTimeChecker ()) .AddAttribute ("Flags", // Note: The Controller can configure this value, overriding the user's setting. - "Flags to turn different functionality on/off, such as whether to inform the controller when a flow expires, or how to handle fragments.", - UintegerValue (0), // Look at the ofp_config_flags enum in openflow/include/openflow.h for options. - MakeUintegerAccessor (&OpenFlowSwitchNetDevice::m_flags), - MakeUintegerChecker ()) + "Flags to turn different functionality on/off, such as whether to inform the controller when a flow expires, or how to handle fragments.", + UintegerValue (0), // Look at the ofp_config_flags enum in openflow/include/openflow.h for options. + MakeUintegerAccessor (&OpenFlowSwitchNetDevice::m_flags), + MakeUintegerChecker ()) .AddAttribute ("FlowTableMissSendLength", // Note: The Controller can configure this value, overriding the user's setting. - "When forwarding a packet the switch didn't match up to the controller, it can be more efficient to forward only the first x bytes.", - UintegerValue (OFP_DEFAULT_MISS_SEND_LEN), // 128 bytes - MakeUintegerAccessor (&OpenFlowSwitchNetDevice::m_missSendLen), - MakeUintegerChecker ()) + "When forwarding a packet the switch didn't match up to the controller, it can be more efficient to forward only the first x bytes.", + UintegerValue (OFP_DEFAULT_MISS_SEND_LEN), // 128 bytes + MakeUintegerAccessor (&OpenFlowSwitchNetDevice::m_missSendLen), + MakeUintegerChecker ()) ; return tid; } @@ -589,7 +589,7 @@ OpenFlowSwitchNetDevice::BufferFromPacket (Ptr packet, Address src, Addr void OpenFlowSwitchNetDevice::ReceiveFromDevice (Ptr netdev, Ptr packet, uint16_t protocol, - const Address& src, const Address& dst, PacketType packetType) + const Address& src, const Address& dst, PacketType packetType) { NS_LOG_FUNCTION_NOARGS (); NS_LOG_INFO ("--------------------------------------------"); @@ -645,7 +645,7 @@ OpenFlowSwitchNetDevice::ReceiveFromDevice (Ptr netdev, Ptr= Seconds (m_lastExecute.GetSeconds () + 1)) // If a second or more has passed from the simulation time, execute. @@ -665,21 +665,21 @@ OpenFlowSwitchNetDevice::ReceiveFromDevice (Ptr netdev, Ptrkey.flow.dl_src[i]/16 << f->key.flow.dl_src[i]%16; - str << " -> "; - for (int i = 0; i < 6; i++) - str << (i!=0?":":"") << std::hex << f->key.flow.dl_dst[i]/16 << f->key.flow.dl_dst[i]%16; - str << "] expired."; + std::ostringstream str; + str << "Flow ["; + for (int i = 0; i < 6; i++) + str << (i!=0 ? ":" : "") << std::hex << f->key.flow.dl_src[i]/16 << f->key.flow.dl_src[i]%16; + str << " -> "; + for (int i = 0; i < 6; i++) + str << (i!=0 ? ":" : "") << std::hex << f->key.flow.dl_dst[i]/16 << f->key.flow.dl_dst[i]%16; + str << "] expired."; - NS_LOG_INFO (str.str ()); + NS_LOG_INFO (str.str ()); SendFlowExpired (f, (ofp_flow_expired_reason)f->reason); list_remove (&f->node); flow_free (f); } - + m_lastExecute = now; } } @@ -845,7 +845,7 @@ OpenFlowSwitchNetDevice::FillPortDesc (ofi::Port p, ofp_phy_port *desc) p.netdev->GetAddress ().CopyTo (desc->hw_addr); desc->config = htonl (p.config); desc->state = htonl (p.state); - + // TODO: This should probably be fixed eventually to specify different available features. desc->curr = 0; // htonl(netdev_get_features(p->netdev, NETDEV_FEAT_CURRENT)); desc->supported = 0; // htonl(netdev_get_features(p->netdev, NETDEV_FEAT_SUPPORTED)); @@ -1099,7 +1099,7 @@ int OpenFlowSwitchNetDevice::ReceiveSetConfig (const void *msg) { const ofp_switch_config *osc = (ofp_switch_config*)msg; - + int n_flags = ntohs (osc->flags) & (OFPC_SEND_FLOW_EXP | OFPC_FRAG_MASK); if ((n_flags & OFPC_FRAG_MASK) != OFPC_FRAG_NORMAL && (n_flags & OFPC_FRAG_MASK) != OFPC_FRAG_DROP) { @@ -1159,7 +1159,7 @@ int OpenFlowSwitchNetDevice::ReceivePortMod (const void *msg) { ofp_port_mod* opm = (ofp_port_mod*)msg; - + int port = opm->port_no; // ntohs(opm->port_no); if (port < DP_MAX_PORTS) { @@ -1185,16 +1185,16 @@ OpenFlowSwitchNetDevice::ReceivePortMod (const void *msg) if ((opm->config & htonl (OFPPC_PORT_DOWN)) && (p.config & OFPPC_PORT_DOWN) == 0) { p.config |= OFPPC_PORT_DOWN; - // TODO: Possibly disable the Port's Net Device via the appropriate interface. + // TODO: Possibly disable the Port's Net Device via the appropriate interface. } else if ((opm->config & htonl (OFPPC_PORT_DOWN)) == 0 && (p.config & OFPPC_PORT_DOWN)) { p.config &= ~OFPPC_PORT_DOWN; - // TODO: Possibly enable the Port's Net Device via the appropriate interface. + // TODO: Possibly enable the Port's Net Device via the appropriate interface. } } } - + return 0; } @@ -1431,7 +1431,7 @@ OpenFlowSwitchNetDevice::ReceiveStatsRequest (const void *oh) int type = ntohs (rq->type); int body_len = rq_len - offsetof (ofp_stats_request, body); ofi::Stats* st = new ofi::Stats ((ofp_stats_types)type, (unsigned)body_len); - + if (st == 0) { return -EINVAL; @@ -1463,7 +1463,7 @@ OpenFlowSwitchNetDevice::ReceiveStatsRequest (const void *oh) { NS_LOG_ERROR ("Switch needs to be registered to a controller in order to start the stats reply."); } - + return 0; } diff --git a/src/openflow/model/openflow-switch-net-device.h b/src/openflow/model/openflow-switch-net-device.h index 875d425dc..63c2492bd 100644 --- a/src/openflow/model/openflow-switch-net-device.h +++ b/src/openflow/model/openflow-switch-net-device.h @@ -47,7 +47,6 @@ namespace ns3 { /** - * \ingroup devices * \defgroup openflow OpenFlow * * \brief A net device that switches multiple LAN segments via an OpenFlow-compatible flow table @@ -101,7 +100,7 @@ public: static const char * GetSoftwareDescription (); static const char * GetSerialNumber (); //\} - + OpenFlowSwitchNetDevice (); virtual ~OpenFlowSwitchNetDevice (); @@ -238,7 +237,7 @@ public: virtual bool SupportsSendFrom () const; virtual Address GetMulticast (Ipv6Address addr) const; //\} - + protected: virtual void DoDispose (void); @@ -292,7 +291,7 @@ private: * \return 0 if everything's ok, otherwise an error number. */ int ModFlow (const ofp_flow_mod *ofm); - + /** * \internal * @@ -444,7 +443,7 @@ private: * \return 0 if everything's ok, otherwise an error number. */ int RunThroughVPortTable (uint32_t packet_uid, int port, uint32_t vport); - + /** * \internal * @@ -514,7 +513,7 @@ private: int ReceiveVPortMod (const void *msg); int ReceiveVPortTableFeaturesRequest (const void *msg); //\} - + /// Callbacks NetDevice::ReceiveCallback m_rxCallback; NetDevice::PromiscReceiveCallback m_promiscRxCallback; @@ -536,7 +535,7 @@ private: uint64_t m_id; ///< Unique identifier for this switch, needed for OpenFlow Time m_lookupDelay; ///< Flow Table Lookup Delay [overhead]. - Time m_lastExecute; ///< Last time the periodic execution occurred. + Time m_lastExecute; ///< Last time the periodic execution occurred. uint16_t m_flags; ///< Flags; configurable by the controller. uint16_t m_missSendLen; ///< Flow Table Miss Send Length; configurable by the controller. diff --git a/src/point-to-point-layout/model/point-to-point-dumbbell.cc b/src/point-to-point-layout/model/point-to-point-dumbbell.cc index 1fcfacf1d..f19407067 100644 --- a/src/point-to-point-layout/model/point-to-point-dumbbell.cc +++ b/src/point-to-point-layout/model/point-to-point-dumbbell.cc @@ -33,12 +33,12 @@ NS_LOG_COMPONENT_DEFINE("PointToPointDumbbellHelper"); namespace ns3 { - + PointToPointDumbbellHelper::PointToPointDumbbellHelper (uint32_t nLeftLeaf, - PointToPointHelper leftHelper, - uint32_t nRightLeaf, - PointToPointHelper rightHelper, - PointToPointHelper bottleneckHelper) + PointToPointHelper leftHelper, + uint32_t nRightLeaf, + PointToPointHelper rightHelper, + PointToPointHelper bottleneckHelper) { // Create the bottleneck routers m_routers.Create (2); @@ -52,7 +52,7 @@ PointToPointDumbbellHelper::PointToPointDumbbellHelper (uint32_t nLeftLeaf, for (uint32_t i = 0; i < nLeftLeaf; ++i) { NetDeviceContainer c = leftHelper.Install (m_routers.Get (0), - m_leftLeaf.Get (i)); + m_leftLeaf.Get (i)); m_leftRouterDevices.Add (c.Get (0)); m_leftLeafDevices.Add (c.Get(1)); } @@ -60,14 +60,15 @@ PointToPointDumbbellHelper::PointToPointDumbbellHelper (uint32_t nLeftLeaf, for (uint32_t i = 0; i < nRightLeaf; ++i) { NetDeviceContainer c = rightHelper.Install (m_routers.Get (1), - m_rightLeaf.Get (i)); + m_rightLeaf.Get (i)); m_rightRouterDevices.Add (c.Get (0)); m_rightLeafDevices.Add (c.Get (1)); } } PointToPointDumbbellHelper::~PointToPointDumbbellHelper () -{} +{ +} Ptr PointToPointDumbbellHelper::GetLeft () const { // Get the left side bottleneck router @@ -117,8 +118,8 @@ void PointToPointDumbbellHelper::InstallStack (InternetStackHelper stack) } void PointToPointDumbbellHelper::AssignIpv4Addresses (Ipv4AddressHelper leftIp, - Ipv4AddressHelper rightIp, - Ipv4AddressHelper routerIp) + Ipv4AddressHelper rightIp, + Ipv4AddressHelper routerIp) { // Assign the router network m_routerInterfaces = routerIp.Assign (m_routerDevices); @@ -148,7 +149,7 @@ void PointToPointDumbbellHelper::AssignIpv4Addresses (Ipv4AddressHelper leftIp, void PointToPointDumbbellHelper::BoundingBox (double ulx, double uly, // Upper left x/y - double lrx, double lry) // Lower right y + double lrx, double lry) // Lower right y { double xDist; double yDist; @@ -183,7 +184,7 @@ void PointToPointDumbbellHelper::BoundingBox (double ulx, double uly, // Upper l } Vector lrl (ulx + xAdder, uly + yDist/2.0, 0); loc->SetPosition (lrl); - + // Place the right router Ptr rr = GetRight (); loc = rr->GetObject (); @@ -216,7 +217,7 @@ void PointToPointDumbbellHelper::BoundingBox (double ulx, double uly, // Upper l ln->AggregateObject (loc); } Vector lnl (lrl.x - cos (theta) * xAdder, - lrl.y + sin (theta) * xAdder, 0); // Left Node Location + lrl.y + sin (theta) * xAdder, 0); // Left Node Location // Insure did not exceed bounding box if (lnl.y < uly) { @@ -249,7 +250,7 @@ void PointToPointDumbbellHelper::BoundingBox (double ulx, double uly, // Upper l rn->AggregateObject (loc); } Vector rnl (rrl.x + cos (theta) * xAdder, // Right node location - rrl.y + sin (theta) * xAdder, 0); + rrl.y + sin (theta) * xAdder, 0); // Insure did not exceed bounding box if (rnl.y < uly) { @@ -263,5 +264,5 @@ void PointToPointDumbbellHelper::BoundingBox (double ulx, double uly, // Upper l theta += thetaR; } } - + } // namespace ns3 diff --git a/src/point-to-point-layout/model/point-to-point-dumbbell.h b/src/point-to-point-layout/model/point-to-point-dumbbell.h index 980c9e8db..3efed5ae5 100644 --- a/src/point-to-point-layout/model/point-to-point-dumbbell.h +++ b/src/point-to-point-layout/model/point-to-point-dumbbell.h @@ -29,8 +29,10 @@ #include "ipv4-interface-container.h" namespace ns3 { - + /** + * \ingroup pointtopointlayout + * * \brief A helper to make it easier to create a dumbbell topology * with p2p links */ @@ -71,7 +73,7 @@ public: * router */ Ptr GetLeft () const; - + /** * \returns pointer to the i'th left side leaf node */ @@ -138,7 +140,7 @@ public: * \param lry lower right y value */ void BoundingBox (double ulx, double uly, double lrx, double lry); - + private: NodeContainer m_leftLeaf; NetDeviceContainer m_leftLeafDevices; diff --git a/src/point-to-point-layout/model/point-to-point-grid.cc b/src/point-to-point-layout/model/point-to-point-grid.cc index 1e24bd28c..321bd54c2 100644 --- a/src/point-to-point-layout/model/point-to-point-grid.cc +++ b/src/point-to-point-layout/model/point-to-point-grid.cc @@ -28,7 +28,7 @@ NS_LOG_COMPONENT_DEFINE("PointToPointGridHelper"); namespace ns3 { - + PointToPointGridHelper::PointToPointGridHelper (uint32_t nRows, uint32_t nCols, PointToPointHelper pointToPoint) @@ -43,40 +43,41 @@ PointToPointGridHelper::PointToPointGridHelper (uint32_t nRows, InternetStackHelper stack; for (uint32_t y = 0; y < nRows; ++y) - { - NodeContainer rowNodes; - NetDeviceContainer rowDevices; - NetDeviceContainer colDevices; - - for (uint32_t x = 0; x < nCols; ++x) { - rowNodes.Create (1); + NodeContainer rowNodes; + NetDeviceContainer rowDevices; + NetDeviceContainer colDevices; - // install p2p links across the row - if (x > 0) - { - rowDevices.Add (pointToPoint. - Install (rowNodes.Get (x-1), rowNodes.Get (x))); - } + for (uint32_t x = 0; x < nCols; ++x) + { + rowNodes.Create (1); + + // install p2p links across the row + if (x > 0) + { + rowDevices.Add (pointToPoint. + Install (rowNodes.Get (x-1), rowNodes.Get (x))); + } + + // install vertical p2p links + if (y > 0) + { + colDevices.Add(pointToPoint. + Install ((m_nodes.at (y-1)).Get (x), rowNodes.Get (x))); + } + } + + m_nodes.push_back (rowNodes); + m_rowDevices.push_back (rowDevices); - // install vertical p2p links if (y > 0) - { - colDevices.Add(pointToPoint. - Install ((m_nodes.at (y-1)).Get (x), rowNodes.Get (x))); - } + m_colDevices.push_back (colDevices); } - - m_nodes.push_back (rowNodes); - m_rowDevices.push_back (rowDevices); - - if (y > 0) - m_colDevices.push_back (colDevices); - } } PointToPointGridHelper::~PointToPointGridHelper () -{} +{ +} void PointToPointGridHelper::InstallStack (InternetStackHelper stack) @@ -131,7 +132,7 @@ PointToPointGridHelper::AssignIpv4Addresses (Ipv4AddressHelper rowIp, Ipv4Addres void PointToPointGridHelper::BoundingBox (double ulx, double uly, - double lrx, double lry) + double lrx, double lry) { double xDist; double yDist; @@ -155,24 +156,24 @@ PointToPointGridHelper::BoundingBox (double ulx, double uly, double yAdder = yDist / m_ySize; double yLoc = yDist / 2; for (uint32_t i = 0; i < m_ySize; ++i) - { - double xLoc = xDist / 2; - for (uint32_t j = 0; j < m_xSize; ++j) { - Ptr node = GetNode (i, j); - Ptr loc = node->GetObject (); - if (loc ==0) - { - loc = CreateObject (); - node->AggregateObject (loc); - } - Vector locVec (xLoc, yLoc, 0); - loc->SetPosition (locVec); + double xLoc = xDist / 2; + for (uint32_t j = 0; j < m_xSize; ++j) + { + Ptr node = GetNode (i, j); + Ptr loc = node->GetObject (); + if (loc ==0) + { + loc = CreateObject (); + node->AggregateObject (loc); + } + Vector locVec (xLoc, yLoc, 0); + loc->SetPosition (locVec); - xLoc += xAdder; + xLoc += xAdder; + } + yLoc += yAdder; } - yLoc += yAdder; - } } Ptr @@ -181,7 +182,7 @@ PointToPointGridHelper::GetNode (uint32_t row, uint32_t col) if (row > m_nodes.size () - 1 || col > m_nodes.at (row).GetN () - 1) { - NS_FATAL_ERROR ("Index out of bounds in PointToPointGridHelper::GetNode."); + NS_FATAL_ERROR ("Index out of bounds in PointToPointGridHelper::GetNode."); } return (m_nodes.at (row)).Get (col); @@ -193,7 +194,7 @@ PointToPointGridHelper::GetIpv4Address (uint32_t row, uint32_t col) if (row > m_nodes.size () - 1 || col > m_nodes.at (row).GetN () - 1) { - NS_FATAL_ERROR ("Index out of bounds in PointToPointGridHelper::GetIpv4Address."); + NS_FATAL_ERROR ("Index out of bounds in PointToPointGridHelper::GetIpv4Address."); } // Right now this just gets one of the addresses of the @@ -204,13 +205,13 @@ PointToPointGridHelper::GetIpv4Address (uint32_t row, uint32_t col) // in which case the right (row) device address is // returned if (col == 0) - { - return (m_rowInterfaces.at (row)).GetAddress (0); - } + { + return (m_rowInterfaces.at (row)).GetAddress (0); + } else - { - return (m_rowInterfaces.at (row)).GetAddress ((2*col)-1); - } + { + return (m_rowInterfaces.at (row)).GetAddress ((2*col)-1); + } } } // namespace ns3 diff --git a/src/point-to-point-layout/model/point-to-point-grid.h b/src/point-to-point-layout/model/point-to-point-grid.h index c5bb07466..11f4ef8fc 100644 --- a/src/point-to-point-layout/model/point-to-point-grid.h +++ b/src/point-to-point-layout/model/point-to-point-grid.h @@ -28,8 +28,10 @@ #include "net-device-container.h" namespace ns3 { - + /** + * \ingroup pointtopointlayout + * * \brief A helper to make it easier to create a grid topology * with p2p links */ @@ -121,5 +123,5 @@ private: }; } // namespace ns3 - + #endif /* POINT_TO_POINT_GRID_HELPER_H */ diff --git a/src/point-to-point-layout/model/point-to-point-star.cc b/src/point-to-point-layout/model/point-to-point-star.cc index 4a74b1857..5d42f7103 100644 --- a/src/point-to-point-layout/model/point-to-point-star.cc +++ b/src/point-to-point-layout/model/point-to-point-star.cc @@ -29,9 +29,9 @@ NS_LOG_COMPONENT_DEFINE("PointToPointStarHelper"); namespace ns3 { - + PointToPointStarHelper::PointToPointStarHelper (uint32_t numSpokes, - PointToPointHelper p2pHelper) + PointToPointHelper p2pHelper) { m_hub.Create (1); m_spokes.Create (numSpokes); @@ -45,33 +45,34 @@ PointToPointStarHelper::PointToPointStarHelper (uint32_t numSpokes, } PointToPointStarHelper::~PointToPointStarHelper () -{} +{ +} -Ptr +Ptr PointToPointStarHelper::GetHub () const { return m_hub.Get (0); } -Ptr +Ptr PointToPointStarHelper::GetSpokeNode (uint32_t i) const { return m_spokes.Get (i); } -Ipv4Address +Ipv4Address PointToPointStarHelper::GetHubIpv4Address (uint32_t i) const { return m_hubInterfaces.GetAddress (i); } -Ipv4Address +Ipv4Address PointToPointStarHelper::GetSpokeIpv4Address (uint32_t i) const { return m_spokeInterfaces.GetAddress (i); } -uint32_t +uint32_t PointToPointStarHelper::SpokeCount () const { return m_spokes.GetN (); @@ -149,10 +150,10 @@ PointToPointStarHelper::BoundingBox (double ulx, double uly, spokeLoc = CreateObject (); spokeNode->AggregateObject (spokeLoc); } - Vector spokeVec (hubVec.x + cos (theta*i) * spokeDist, - hubVec.y + sin (theta*i) * spokeDist, - 0); - spokeLoc->SetPosition (spokeVec); + Vector spokeVec (hubVec.x + cos (theta*i) * spokeDist, + hubVec.y + sin (theta*i) * spokeDist, + 0); + spokeLoc->SetPosition (spokeVec); } } diff --git a/src/point-to-point-layout/model/point-to-point-star.h b/src/point-to-point-layout/model/point-to-point-star.h index b679aee83..2b2ad85c6 100644 --- a/src/point-to-point-layout/model/point-to-point-star.h +++ b/src/point-to-point-layout/model/point-to-point-star.h @@ -27,8 +27,15 @@ #include "ipv4-interface-container.h" namespace ns3 { - + /** + * \defgroup pointtopointlayout Point-to-Point Layout Helpers + * + */ + +/** + * \ingroup pointtopointlayout + * * \brief A helper to make it easier to create a star topology * with PointToPoint links */ diff --git a/src/point-to-point/doc/point-to-point.h b/src/point-to-point/doc/point-to-point.h index 08dbd3ce1..4073b8cce 100644 --- a/src/point-to-point/doc/point-to-point.h +++ b/src/point-to-point/doc/point-to-point.h @@ -1,6 +1,5 @@ /** - * \ingroup devices - * \defgroup PointToPointModel Point-to-Point Model + * \defgroup PointToPointModel Point-to-Point Device * * \section PointToPointPointOverview Point-to-Point Model Overview * diff --git a/doc/manual/source/point-to-point.rst b/src/point-to-point/doc/point-to-point.rst similarity index 100% rename from doc/manual/source/point-to-point.rst rename to src/point-to-point/doc/point-to-point.rst diff --git a/src/point-to-point/examples/main-attribute-value.cc b/src/point-to-point/examples/main-attribute-value.cc index 91bd5311a..2fb0311ac 100644 --- a/src/point-to-point/examples/main-attribute-value.cc +++ b/src/point-to-point/examples/main-attribute-value.cc @@ -106,7 +106,7 @@ main (int argc, char *argv[]) UintegerValue limit; dtq->GetAttribute ("MaxPackets", limit); NS_LOG_INFO ("1. dtq limit: " << limit.Get () << " packets"); - + // Note that the above downcast is not really needed; we could have // done the same using the Ptr even though the attribute // is a member of the subclass @@ -124,7 +124,7 @@ main (int argc, char *argv[]) // 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. + // attribute with a single statement. Config::Set ("/NodeList/0/DeviceList/0/TxQueue/MaxPackets", UintegerValue (25)); txQueue->GetAttribute ("MaxPackets", limit); NS_LOG_INFO ("4. txQueue limit changed through namespace: " << diff --git a/src/point-to-point/helper/point-to-point-helper.cc b/src/point-to-point/helper/point-to-point-helper.cc index c01b68414..450648752 100644 --- a/src/point-to-point/helper/point-to-point-helper.cc +++ b/src/point-to-point/helper/point-to-point-helper.cc @@ -265,7 +265,7 @@ PointToPointHelper::Install (Ptr a, Ptr b) devA->AggregateObject (mpiRecA); devB->AggregateObject (mpiRecB); } - + devA->Attach (channel); devB->Attach (channel); container.Add (devA); diff --git a/src/point-to-point/helper/point-to-point-helper.h b/src/point-to-point/helper/point-to-point-helper.h index 15fa39846..5a7f4adf6 100644 --- a/src/point-to-point/helper/point-to-point-helper.h +++ b/src/point-to-point/helper/point-to-point-helper.h @@ -172,10 +172,10 @@ private: * \param nd Net device for which you want to enable tracing. */ virtual void EnableAsciiInternal ( - Ptr stream, - std::string prefix, - Ptr nd, - bool explicitFilename); + Ptr stream, + std::string prefix, + Ptr nd, + bool explicitFilename); ObjectFactory m_queueFactory; ObjectFactory m_channelFactory; diff --git a/src/point-to-point/model/point-to-point-channel.cc b/src/point-to-point/model/point-to-point-channel.cc index 87ad931ca..38b6b62d4 100644 --- a/src/point-to-point/model/point-to-point-channel.cc +++ b/src/point-to-point/model/point-to-point-channel.cc @@ -42,7 +42,7 @@ PointToPointChannel::GetTypeId (void) .AddTraceSource ("TxRxPointToPoint", "Trace source indicating transmission of packet from the PointToPointChannel, used by the Animation interface.", MakeTraceSourceAccessor (&PointToPointChannel::m_txrxPointToPoint)) - ; + ; return tid; } @@ -50,10 +50,10 @@ PointToPointChannel::GetTypeId (void) // By default, you get a channel that // has an "infitely" fast transmission speed and zero delay. PointToPointChannel::PointToPointChannel() -: - Channel (), - m_delay (Seconds (0.)), - m_nDevices (0) + : + Channel (), + m_delay (Seconds (0.)), + m_nDevices (0) { NS_LOG_FUNCTION_NOARGS (); } diff --git a/src/point-to-point/model/point-to-point-channel.h b/src/point-to-point/model/point-to-point-channel.h index 4834f9fd2..bf7fa5655 100644 --- a/src/point-to-point/model/point-to-point-channel.h +++ b/src/point-to-point/model/point-to-point-channel.h @@ -144,22 +144,22 @@ private: > m_txrxPointToPoint; enum WireState - { - INITIALIZING, - IDLE, - TRANSMITTING, - PROPAGATING - }; + { + INITIALIZING, + IDLE, + TRANSMITTING, + PROPAGATING + }; class Link { - public: +public: Link() : m_state (INITIALIZING), m_src (0), m_dst (0) {} WireState m_state; Ptr m_src; Ptr m_dst; }; - + Link m_link[N_DEVICES]; }; diff --git a/src/point-to-point/model/point-to-point-net-device.cc b/src/point-to-point/model/point-to-point-net-device.cc index 2e6a99ff3..85719b5ec 100644 --- a/src/point-to-point/model/point-to-point-net-device.cc +++ b/src/point-to-point/model/point-to-point-net-device.cc @@ -46,7 +46,7 @@ PointToPointNetDevice::GetTypeId (void) UintegerValue (DEFAULT_MTU), MakeUintegerAccessor (&PointToPointNetDevice::SetMtu, &PointToPointNetDevice::GetMtu), - MakeUintegerChecker ()) + MakeUintegerChecker ()) .AddAttribute ("Address", "The MAC address of this device.", Mac48AddressValue (Mac48Address ("ff:ff:ff:ff:ff:ff")), @@ -139,17 +139,17 @@ PointToPointNetDevice::GetTypeId (void) .AddTraceSource ("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device", MakeTraceSourceAccessor (&PointToPointNetDevice::m_promiscSnifferTrace)) - ; + ; return tid; } PointToPointNetDevice::PointToPointNetDevice () -: - m_txMachineState (READY), - m_channel (0), - m_linkUp (false), - m_currentPkt (0) + : + m_txMachineState (READY), + m_channel (0), + m_linkUp (false), + m_currentPkt (0) { NS_LOG_FUNCTION (this); } @@ -159,7 +159,7 @@ PointToPointNetDevice::~PointToPointNetDevice () NS_LOG_FUNCTION_NOARGS (); } - void +void PointToPointNetDevice::AddHeader(Ptr p, uint16_t protocolNumber) { NS_LOG_FUNCTION_NOARGS (); @@ -168,7 +168,7 @@ PointToPointNetDevice::AddHeader(Ptr p, uint16_t protocolNumber) p->AddHeader (ppp); } - bool +bool PointToPointNetDevice::ProcessHeader(Ptr p, uint16_t& param) { NS_LOG_FUNCTION_NOARGS (); @@ -178,7 +178,7 @@ PointToPointNetDevice::ProcessHeader(Ptr p, uint16_t& param) return true; } - void +void PointToPointNetDevice::DoDispose() { NS_LOG_FUNCTION_NOARGS (); @@ -189,21 +189,21 @@ PointToPointNetDevice::DoDispose() NetDevice::DoDispose (); } - void +void PointToPointNetDevice::SetDataRate(DataRate bps) { NS_LOG_FUNCTION_NOARGS (); m_bps = bps; } - void +void PointToPointNetDevice::SetInterframeGap(Time t) { NS_LOG_FUNCTION_NOARGS (); m_tInterframeGap = t; } - bool +bool PointToPointNetDevice::TransmitStart (Ptr p) { NS_LOG_FUNCTION (this << p); @@ -233,7 +233,7 @@ PointToPointNetDevice::TransmitStart (Ptr p) return result; } - void +void PointToPointNetDevice::TransmitComplete (void) { NS_LOG_FUNCTION_NOARGS (); @@ -269,7 +269,7 @@ PointToPointNetDevice::TransmitComplete (void) TransmitStart(p); } - bool +bool PointToPointNetDevice::Attach (Ptr ch) { NS_LOG_FUNCTION (this << &ch); @@ -287,21 +287,21 @@ PointToPointNetDevice::Attach (Ptr ch) return true; } - void +void PointToPointNetDevice::SetQueue (Ptr q) { NS_LOG_FUNCTION (this << q); m_queue = q; } - void +void PointToPointNetDevice::SetReceiveErrorModel (Ptr em) { NS_LOG_FUNCTION (this << em); m_receiveErrorModel = em; } - void +void PointToPointNetDevice::Receive (Ptr packet) { NS_LOG_FUNCTION (this << packet); @@ -345,33 +345,33 @@ PointToPointNetDevice::Receive (Ptr packet) } } - Ptr +Ptr PointToPointNetDevice::GetQueue(void) const { NS_LOG_FUNCTION_NOARGS (); return m_queue; } - void +void PointToPointNetDevice::NotifyLinkUp (void) { m_linkUp = true; m_linkChangeCallbacks (); } - void +void PointToPointNetDevice::SetIfIndex(const uint32_t index) { m_ifIndex = index; } - uint32_t +uint32_t PointToPointNetDevice::GetIfIndex(void) const { return m_ifIndex; } - Ptr +Ptr PointToPointNetDevice::GetChannel (void) const { return m_channel; @@ -383,25 +383,25 @@ PointToPointNetDevice::GetChannel (void) const // methods to get and set the address. Rather than be rude and assert, we let // clients get and set the address, but simply ignore them. - void +void PointToPointNetDevice::SetAddress (Address address) { m_address = Mac48Address::ConvertFrom (address); } - Address +Address PointToPointNetDevice::GetAddress (void) const { return m_address; } - bool +bool PointToPointNetDevice::IsLinkUp (void) const { return m_linkUp; } - void +void PointToPointNetDevice::AddLinkChangeCallback (Callback callback) { m_linkChangeCallbacks.ConnectWithoutContext (callback); @@ -411,7 +411,7 @@ PointToPointNetDevice::AddLinkChangeCallback (Callback callback) // This is a point-to-point device, so every transmission is a broadcast to // all of the devices on the network. // - bool +bool PointToPointNetDevice::IsBroadcast (void) const { return true; @@ -422,19 +422,19 @@ PointToPointNetDevice::IsBroadcast (void) const // point-to-point device. The base class NetDevice wants us to return a // broadcast address, so we make up something reasonable. // - Address +Address PointToPointNetDevice::GetBroadcast (void) const { return Mac48Address ("ff:ff:ff:ff:ff:ff"); } - bool +bool PointToPointNetDevice::IsMulticast (void) const { return true; } - Address +Address PointToPointNetDevice::GetMulticast (Ipv4Address multicastGroup) const { return Mac48Address ("01:00:5e:00:00:00"); @@ -447,19 +447,19 @@ PointToPointNetDevice::GetMulticast (Ipv6Address addr) const return Mac48Address ("33:33:00:00:00:00"); } - bool +bool PointToPointNetDevice::IsPointToPoint (void) const { return true; } - bool +bool PointToPointNetDevice::IsBridge (void) const { return false; } - bool +bool PointToPointNetDevice::Send( Ptr packet, const Address &dest, @@ -526,25 +526,25 @@ PointToPointNetDevice::SendFrom (Ptr packet, return false; } - Ptr +Ptr PointToPointNetDevice::GetNode (void) const { return m_node; } - void +void PointToPointNetDevice::SetNode (Ptr node) { m_node = node; } - bool +bool PointToPointNetDevice::NeedsArp (void) const { return false; } - void +void PointToPointNetDevice::SetReceiveCallback (NetDevice::ReceiveCallback cb) { m_rxCallback = cb; @@ -556,7 +556,7 @@ PointToPointNetDevice::SetPromiscReceiveCallback (NetDevice::PromiscReceiveCallb m_promiscCallback = cb; } - bool +bool PointToPointNetDevice::SupportsSendFrom (void) const { return false; @@ -585,7 +585,7 @@ PointToPointNetDevice::GetRemote (void) const return Address (); } - bool +bool PointToPointNetDevice::SetMtu (uint16_t mtu) { NS_LOG_FUNCTION (this << mtu); @@ -593,33 +593,33 @@ PointToPointNetDevice::SetMtu (uint16_t mtu) return true; } - uint16_t +uint16_t PointToPointNetDevice::GetMtu (void) const { NS_LOG_FUNCTION_NOARGS (); return m_mtu; } - uint16_t +uint16_t PointToPointNetDevice::PppToEther(uint16_t proto) { switch(proto) { - case 0x0021: return 0x0800; //IPv4 - case 0x0057: return 0x86DD; //IPv6 - default: NS_ASSERT_MSG(false, "PPP Protocol number not defined!"); + case 0x0021: return 0x0800; //IPv4 + case 0x0057: return 0x86DD; //IPv6 + default: NS_ASSERT_MSG(false, "PPP Protocol number not defined!"); } return 0; } - uint16_t +uint16_t PointToPointNetDevice::EtherToPpp(uint16_t proto) { switch(proto) { - case 0x0800: return 0x0021; //IPv4 - case 0x86DD: return 0x0057; //IPv6 - default: NS_ASSERT_MSG(false, "PPP Protocol number not defined!"); + case 0x0800: return 0x0021; //IPv4 + case 0x86DD: return 0x0057; //IPv6 + default: NS_ASSERT_MSG(false, "PPP Protocol number not defined!"); } return 0; } diff --git a/src/point-to-point/model/point-to-point-net-device.h b/src/point-to-point/model/point-to-point-net-device.h index ef2748275..669b7bc67 100644 --- a/src/point-to-point/model/point-to-point-net-device.h +++ b/src/point-to-point/model/point-to-point-net-device.h @@ -44,7 +44,7 @@ class ErrorModel; * This PointToPointNetDevice class specializes the NetDevice abstract * base class. Together with a PointToPointChannel (and a peer * PointToPointNetDevice), the class models, with some level of - * abstraction, a generic point-to-point or serial link. + * abstraction, a generic point-to-point or serial link. * Key parameters or objects that can be specified for this device * include a queue, data rate, and interframe transmission gap (the * propagation delay is set in the PointToPointChannel). @@ -99,7 +99,7 @@ public: * Attach a queue to the PointToPointNetDevice. * * The PointToPointNetDevice "owns" a queue that implements a queueing - * method such as DropTail or RED. + * method such as DropTail or RED. * * @see Queue * @see DropTailQueue @@ -139,7 +139,7 @@ public: void Receive (Ptr p); // The remaining methods are documented in ns3::NetDevice* - + virtual void SetIfIndex(const uint32_t index); virtual uint32_t GetIfIndex(void) const; @@ -246,10 +246,10 @@ private: * Enumeration of the states of the transmit machine of the net device. */ enum TxMachineState - { - READY, /**< The transmitter is ready to begin transmission of a packet */ - BUSY /**< The transmitter is busy transmitting a packet */ - }; + { + READY, /**< The transmitter is ready to begin transmission of a packet */ + BUSY /**< The transmitter is busy transmitting a packet */ + }; /** * The state of the Net Device transmit state machine. * @see TxMachineState @@ -346,7 +346,7 @@ private: /** * The trace source fired when a packet ends the transmission process on - * the medium. + * the medium. * * \see class CallBackTraceSource */ diff --git a/src/point-to-point/model/ppp-header.cc b/src/point-to-point/model/ppp-header.cc index 5a2ec273c..c34abdacd 100644 --- a/src/point-to-point/model/ppp-header.cc +++ b/src/point-to-point/model/ppp-header.cc @@ -37,17 +37,17 @@ PppHeader::~PppHeader () { } - TypeId +TypeId PppHeader::GetTypeId (void) { static TypeId tid = TypeId ("ns3::PppHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } - TypeId +TypeId PppHeader::GetInstanceTypeId (void) const { return GetTypeId (); @@ -57,9 +57,9 @@ void PppHeader::Print (std::ostream &os) const { std::string proto; - + switch(m_protocol) - { + { case 0x0021: /* IPv4 */ proto = "IP (0x0021)"; break; @@ -68,36 +68,36 @@ PppHeader::Print (std::ostream &os) const break; default: NS_ASSERT_MSG(false, "PPP Protocol number not defined!"); - } + } os << "Point-to-Point Protocol: " << proto; } - uint32_t +uint32_t PppHeader::GetSerializedSize (void) const { return 2; } - void +void PppHeader::Serialize (Buffer::Iterator start) const { start.WriteHtonU16 (m_protocol); } - uint32_t +uint32_t PppHeader::Deserialize (Buffer::Iterator start) { m_protocol = start.ReadNtohU16 (); return GetSerializedSize(); } - void +void PppHeader::SetProtocol (uint16_t protocol) { m_protocol=protocol; } - uint16_t +uint16_t PppHeader::GetProtocol (void) { return m_protocol; diff --git a/src/point-to-point/test/point-to-point-test.cc b/src/point-to-point/test/point-to-point-test.cc index cd34d31b8..5dc0892a0 100644 --- a/src/point-to-point/test/point-to-point-test.cc +++ b/src/point-to-point/test/point-to-point-test.cc @@ -19,7 +19,8 @@ private: PointToPointTest::PointToPointTest () : TestCase ("PointToPoint") -{} +{ +} void PointToPointTest::SendOnePacket (Ptr device) diff --git a/src/propagation/doc/propagation.rst b/src/propagation/doc/propagation.rst new file mode 100644 index 000000000..bc3ddf2fd --- /dev/null +++ b/src/propagation/doc/propagation.rst @@ -0,0 +1,32 @@ +.. include:: replace.txt + +Propagation +----------- + +The |ns3| propagation module defines two generic interfaces, namely ``PropagationLossModel`` and ``PropagationDelayModel``, for the modeling of respectively propagation loss and propagation delay. + +The following propagation loss models are implemented: + +* ``JakesPropagationLossModel`` +* ``PropagationLossModel`` +* ``RandomPropagationLossModel`` +* ``FriisPropagationLossModel`` +* ``TwoRayGroundPropagationLossModel`` +* ``LogDistancePropagationLossModel`` +* ``ThreeLogDistancePropagationLossModel`` +* ``NakagamiPropagationLossModel`` +* ``FixedRssLossModel`` +* ``MatrixPropagationLossModel`` +* ``RangePropagationLossModel`` + + +The following propagation delay models are implemented: + +* ``PropagationDelayModel`` +* ``RandomPropagationDelayModel`` +* ``ConstantSpeedPropagationDelayModel`` + +All the above models can be used within any model using the ``PropagationLossModel`` and ``PropagationDelayModel`` interfaces, such as Wifi and Wimax. + + + diff --git a/src/propagation/examples/main-propagation-loss.cc b/src/propagation/examples/main-propagation-loss.cc index 4bf846f1e..05130978e 100644 --- a/src/propagation/examples/main-propagation-loss.cc +++ b/src/propagation/examples/main-propagation-loss.cc @@ -121,7 +121,7 @@ TestProbabilistic (Ptr model, unsigned int samples = 10000 dataset.SetStyle("with linespoints"); dataset.SetExtra("pointtype 3 pointsize 0.5"); - + typedef std::map rxPowerMapType; // Take given number of samples from CalcRxPower() and show probability @@ -141,7 +141,7 @@ TestProbabilistic (Ptr model, unsigned int samples = 10000 double rxPowerDbm = model->CalcRxPower (txPowerDbm, a, b); rxPowerDbm = dround(rxPowerDbm, 1.0); - rxPowerMap[ rxPowerDbm ] ++; + rxPowerMap[ rxPowerDbm ]++; Simulator::Stop (Seconds (0.01)); Simulator::Run (); diff --git a/src/propagation/model/cost231-propagation-loss-model.h b/src/propagation/model/cost231-propagation-loss-model.h index 3ba7cbaec..baf881137 100644 --- a/src/propagation/model/cost231-propagation-loss-model.h +++ b/src/propagation/model/cost231-propagation-loss-model.h @@ -27,8 +27,11 @@ namespace ns3 { -/* +/** + * \ingroup propagation + * * \brief The COST-Hata-Model is the most often cited of the COST 231 models. + * * Also called the Hata Model PCS Extension, it is a radio propagation model * that extends the Hata Model (which in turn is based on the Okumura Model) * to cover a more elaborated range of frequencies. COST (COperation diff --git a/src/propagation/model/jakes-propagation-loss-model.cc b/src/propagation/model/jakes-propagation-loss-model.cc index 6052f65ce..863df503e 100644 --- a/src/propagation/model/jakes-propagation-loss-model.cc +++ b/src/propagation/model/jakes-propagation-loss-model.cc @@ -54,9 +54,9 @@ private: JakesPropagationLossModel::PathCoefficients::PathCoefficients (Ptr jakes, - Ptr receiver, - uint8_t nRays, - uint8_t nOscillators) + Ptr receiver, + uint8_t nRays, + uint8_t nOscillators) : m_receiver (receiver), m_nOscillators (nOscillators), m_nRays (nRays) @@ -99,7 +99,7 @@ JakesPropagationLossModel::PathCoefficients::GetLoss (Ptrm_amp[j].imag * cos (m_phases[i][j]); norm += sqrt(pow (jakes->m_amp[j].real, 2) + pow(jakes->m_amp[j].imag, 2)); } - coef.real += fading.real; - coef.imag += fading.imag; + coef.real += fading.real; + coef.imag += fading.imag; } m_lastUpdate = Simulator::Now (); double k = sqrt (pow (coef.real, 2) + pow (coef.imag, 2)) / norm; @@ -136,27 +136,27 @@ JakesPropagationLossModel::GetTypeId (void) .AddAttribute ("NumberOfRaysPerPath", "The number of rays to use by default for compute the fading coeficent for a given path (default is 1)", UintegerValue (1), - MakeUintegerAccessor (&JakesPropagationLossModel::SetNRays, + MakeUintegerAccessor (&JakesPropagationLossModel::SetNRays, &JakesPropagationLossModel::GetNRays), - MakeUintegerChecker ()) + MakeUintegerChecker ()) .AddAttribute ("NumberOfOscillatorsPerRay", "The number of oscillators to use by default for compute the coeficent for a given ray of a given " "path (default is 4)", UintegerValue (4), - MakeUintegerAccessor (&JakesPropagationLossModel::SetNOscillators, + MakeUintegerAccessor (&JakesPropagationLossModel::SetNOscillators, &JakesPropagationLossModel::GetNOscillators), - MakeUintegerChecker ()) + MakeUintegerChecker ()) .AddAttribute ("DopplerFreq", "The doppler frequency in Hz (f_d = v / lambda = v * f / c), the default is 0)", DoubleValue (0.0), - MakeDoubleAccessor (&JakesPropagationLossModel::m_fd), - MakeDoubleChecker ()) + MakeDoubleAccessor (&JakesPropagationLossModel::m_fd), + MakeDoubleChecker ()) .AddAttribute ("Distribution", "The distribution to choose the initial phases.", RandomVariableValue (ConstantVariable (1.0)), MakeRandomVariableAccessor (&JakesPropagationLossModel::m_variable), MakeRandomVariableChecker ()) - ; + ; return tid; } @@ -164,15 +164,16 @@ JakesPropagationLossModel::JakesPropagationLossModel () : m_amp (0), m_nRays (0), m_nOscillators (0) -{} +{ +} JakesPropagationLossModel::~JakesPropagationLossModel () { delete [] m_amp; - for (PathsList::reverse_iterator i = m_paths.rbegin (); i != m_paths.rend (); i++) + for (PathsList::reverse_iterator i = m_paths.rbegin (); i != m_paths.rend (); i++) { PathsSet *ps = *i; - for (DestinationList::iterator r = ps->receivers.begin (); r != ps->receivers.end (); r++) + for (DestinationList::iterator r = ps->receivers.begin (); r != ps->receivers.end (); r++) { PathCoefficients *pc = *r; delete pc; diff --git a/src/propagation/model/jakes-propagation-loss-model.h b/src/propagation/model/jakes-propagation-loss-model.h index 971e77542..e152469d1 100644 --- a/src/propagation/model/jakes-propagation-loss-model.h +++ b/src/propagation/model/jakes-propagation-loss-model.h @@ -27,6 +27,8 @@ namespace ns3 { /** + * \ingroup propagation + * * \brief a Jakes propagation loss model * * The Jakes propagation loss model implemented here is @@ -120,11 +122,11 @@ private: }; typedef std::vector PathsList; - + static const double PI; ComplexNumber* m_amp; RandomVariable m_variable; - double m_fd; + double m_fd; mutable PathsList m_paths; uint8_t m_nRays; uint8_t m_nOscillators; diff --git a/src/propagation/model/propagation-delay-model.cc b/src/propagation/model/propagation-delay-model.cc index 548651326..25b751332 100644 --- a/src/propagation/model/propagation-delay-model.cc +++ b/src/propagation/model/propagation-delay-model.cc @@ -31,16 +31,17 @@ PropagationDelayModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::PropagationDelayModel") .SetParent () - ; + ; return tid; } PropagationDelayModel::~PropagationDelayModel () -{} +{ +} NS_OBJECT_ENSURE_REGISTERED (RandomPropagationDelayModel); -TypeId +TypeId RandomPropagationDelayModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::RandomPropagationDelayModel") @@ -51,15 +52,17 @@ RandomPropagationDelayModel::GetTypeId (void) RandomVariableValue (UniformVariable (0.0, 1.0)), MakeRandomVariableAccessor (&RandomPropagationDelayModel::m_variable), MakeRandomVariableChecker ()) - ; + ; return tid; } RandomPropagationDelayModel::RandomPropagationDelayModel () -{} +{ +} RandomPropagationDelayModel::~RandomPropagationDelayModel () -{} -Time +{ +} +Time RandomPropagationDelayModel::GetDelay (Ptr a, Ptr b) const { return Seconds (m_variable.GetValue ()); @@ -77,25 +80,26 @@ ConstantSpeedPropagationDelayModel::GetTypeId (void) DoubleValue (300000000.0), MakeDoubleAccessor (&ConstantSpeedPropagationDelayModel::m_speed), MakeDoubleChecker ()) - ; + ; return tid; } ConstantSpeedPropagationDelayModel::ConstantSpeedPropagationDelayModel () -{} -Time +{ +} +Time ConstantSpeedPropagationDelayModel::GetDelay (Ptr a, Ptr b) const { double distance = a->GetDistanceFrom (b); double seconds = distance / m_speed; return Seconds (seconds); } -void +void ConstantSpeedPropagationDelayModel::SetSpeed (double speed) { m_speed = speed; } -double +double ConstantSpeedPropagationDelayModel::GetSpeed (void) const { return m_speed; diff --git a/src/propagation/model/propagation-delay-model.h b/src/propagation/model/propagation-delay-model.h index c912d6d1a..04ff11399 100644 --- a/src/propagation/model/propagation-delay-model.h +++ b/src/propagation/model/propagation-delay-model.h @@ -30,6 +30,8 @@ namespace ns3 { class MobilityModel; /** + * \ingroup propagation + * * \brief calculate a propagation delay. */ class PropagationDelayModel : public Object @@ -49,6 +51,8 @@ public: }; /** + * \ingroup propagation + * * \brief the propagation delay is random */ class RandomPropagationDelayModel : public PropagationDelayModel @@ -67,6 +71,8 @@ private: }; /** + * \ingroup propagation + * * \brief the propagation speed is constant */ class ConstantSpeedPropagationDelayModel : public PropagationDelayModel diff --git a/src/propagation/model/propagation-loss-model.cc b/src/propagation/model/propagation-loss-model.cc index 26a5565e6..06f90b229 100644 --- a/src/propagation/model/propagation-loss-model.cc +++ b/src/propagation/model/propagation-loss-model.cc @@ -41,24 +41,26 @@ PropagationLossModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::PropagationLossModel") .SetParent () - ; + ; return tid; } PropagationLossModel::PropagationLossModel () : m_next (0) -{} +{ +} PropagationLossModel::~PropagationLossModel () -{} +{ +} -void +void PropagationLossModel::SetNext (Ptr next) { m_next = next; } -double +double PropagationLossModel::CalcRxPower (double txPowerDbm, Ptr a, Ptr b) const @@ -85,17 +87,19 @@ RandomPropagationLossModel::GetTypeId (void) RandomVariableValue (ConstantVariable (1.0)), MakeRandomVariableAccessor (&RandomPropagationLossModel::m_variable), MakeRandomVariableChecker ()) - ; + ; return tid; } RandomPropagationLossModel::RandomPropagationLossModel () : PropagationLossModel () -{} +{ +} RandomPropagationLossModel::~RandomPropagationLossModel () -{} +{ +} -double +double RandomPropagationLossModel::DoCalcRxPower (double txPowerDbm, Ptr a, Ptr b) const @@ -132,49 +136,50 @@ FriisPropagationLossModel::GetTypeId (void) MakeDoubleAccessor (&FriisPropagationLossModel::SetMinDistance, &FriisPropagationLossModel::GetMinDistance), MakeDoubleChecker ()) - ; + ; return tid; } FriisPropagationLossModel::FriisPropagationLossModel () -{} -void +{ +} +void FriisPropagationLossModel::SetSystemLoss (double systemLoss) { m_systemLoss = systemLoss; } -double +double FriisPropagationLossModel::GetSystemLoss (void) const { return m_systemLoss; } -void +void FriisPropagationLossModel::SetMinDistance (double minDistance) { m_minDistance = minDistance; } -double +double FriisPropagationLossModel::GetMinDistance (void) const { return m_minDistance; } -void +void FriisPropagationLossModel::SetLambda (double frequency, double speed) { m_lambda = speed / frequency; } -void +void FriisPropagationLossModel::SetLambda (double lambda) { m_lambda = lambda; } -double +double FriisPropagationLossModel::GetLambda (void) const { return m_lambda; } -double +double FriisPropagationLossModel::DbmToW (double dbm) const { double mw = pow(10.0,dbm/10.0); @@ -429,32 +434,33 @@ LogDistancePropagationLossModel::GetTypeId (void) DoubleValue (46.6777), MakeDoubleAccessor (&LogDistancePropagationLossModel::m_referenceLoss), MakeDoubleChecker ()) - ; + ; return tid; - + } LogDistancePropagationLossModel::LogDistancePropagationLossModel () -{} +{ +} -void +void LogDistancePropagationLossModel::SetPathLossExponent (double n) { m_exponent = n; } -void +void LogDistancePropagationLossModel::SetReference (double referenceDistance, double referenceLoss) { m_referenceDistance = referenceDistance; m_referenceLoss = referenceLoss; } -double +double LogDistancePropagationLossModel::GetPathLossExponent (void) const { return m_exponent; } - -double + +double LogDistancePropagationLossModel::DoCalcRxPower (double txPowerDbm, Ptr a, Ptr b) const @@ -480,8 +486,8 @@ LogDistancePropagationLossModel::DoCalcRxPower (double txPowerDbm, */ double pathLossDb = 10 * m_exponent * log10 (distance / m_referenceDistance); double rxc = -m_referenceLoss - pathLossDb; - NS_LOG_DEBUG ("distance="< ()) - ; + ; return tid; - + } ThreeLogDistancePropagationLossModel::ThreeLogDistancePropagationLossModel () @@ -615,15 +621,16 @@ NakagamiPropagationLossModel::GetTypeId (void) DoubleValue (0.75), MakeDoubleAccessor (&NakagamiPropagationLossModel::m_m2), MakeDoubleChecker ()) - ; + ; return tid; - + } NakagamiPropagationLossModel::NakagamiPropagationLossModel () -{} +{ +} -double +double NakagamiPropagationLossModel::DoCalcRxPower (double txPowerDbm, Ptr a, Ptr b) const @@ -646,7 +653,7 @@ NakagamiPropagationLossModel::DoCalcRxPower (double txPowerDbm, { m = m_m2; } - + // the current power unit is dBm, but Watt is put into the Nakagami / // Rayleigh distribution. double powerW = pow(10, (txPowerDbm - 30) / 10); @@ -689,26 +696,28 @@ FixedRssLossModel::GetTypeId (void) DoubleValue (-150.0), MakeDoubleAccessor (&FixedRssLossModel::m_rss), MakeDoubleChecker ()) - ; + ; return tid; } FixedRssLossModel::FixedRssLossModel () : PropagationLossModel () -{} +{ +} FixedRssLossModel::~FixedRssLossModel () -{} +{ +} -void +void FixedRssLossModel::SetRss (double rss) { m_rss = rss; } -double +double FixedRssLossModel::DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const + Ptr a, + Ptr b) const { return m_rss; } @@ -727,7 +736,7 @@ MatrixPropagationLossModel::GetTypeId (void) DoubleValue (std::numeric_limits::max ()), MakeDoubleAccessor (&MatrixPropagationLossModel::m_default), MakeDoubleChecker ()) - ; + ; return tid; } @@ -753,7 +762,7 @@ MatrixPropagationLossModel::SetLoss (Ptr ma, Ptr m MobilityPair p = std::make_pair(ma, mb); std::map::iterator i = m_loss.find (p); - + if (i == m_loss.end ()) { m_loss.insert (std::make_pair (p, loss)); @@ -775,7 +784,7 @@ MatrixPropagationLossModel::DoCalcRxPower (double txPowerDbm, Ptr b) const { std::map::const_iterator i = m_loss.find (std::make_pair (a, b)); - + if (i != m_loss.end ()) { return txPowerDbm - i->second; diff --git a/src/propagation/model/propagation-loss-model.h b/src/propagation/model/propagation-loss-model.h index 1e3b317ba..608236135 100644 --- a/src/propagation/model/propagation-loss-model.h +++ b/src/propagation/model/propagation-loss-model.h @@ -31,9 +31,16 @@ namespace ns3 { +/** + * \defgroup propagation Propagation Models + * + */ + class MobilityModel; /** + * \ingroup propagation + * * \brief Modelize the propagation loss through a transmission medium * * Calculate the receive power (dbm) from a transmit power (dbm) @@ -77,6 +84,8 @@ private: }; /** + * \ingroup propagation + * * \brief The propagation loss follows a random distribution. */ class RandomPropagationLossModel : public PropagationLossModel @@ -97,6 +106,8 @@ private: }; /** + * \ingroup propagation + * * \brief a Friis propagation loss model * * The Friis propagation loss model was first described in @@ -193,7 +204,8 @@ private: double m_minDistance; }; -/* +/** + * \ingroup propagation * * \brief a Two-Ray Ground propagation loss model ported from NS2 * @@ -215,7 +227,6 @@ private: * * \f$ dCross = \frac{(4 * pi * Ht * Hr)}{lambda} \f$ */ - class TwoRayGroundPropagationLossModel : public PropagationLossModel { public: @@ -285,6 +296,8 @@ private: }; /** + * \ingroup propagation + * * \brief a log distance propagation model. * * This model calculates the reception power with a so-called @@ -319,7 +332,7 @@ public: double GetPathLossExponent (void) const; void SetReference (double referenceDistance, double referenceLoss); - + private: LogDistancePropagationLossModel (const LogDistancePropagationLossModel &o); LogDistancePropagationLossModel & operator = (const LogDistancePropagationLossModel &o); @@ -334,6 +347,8 @@ private: }; /** + * \ingroup propagation + * * \brief A log distance path loss propagation model with three distance * fields. This model is the same as ns3::LogDistancePropagationLossModel * except that it has three distance fields: near, middle and far with @@ -371,7 +386,6 @@ L_0 + 10 \cdot n_0 \log_{10}(\frac{d_1}{d_0}) + 10 \cdot n_1 \log_{10}(\frac{d_2 * reference distance defaults to 1m and reference loss defaults to * ns3::FriisPropagationLossModel with 5.15 GHz and is thus \f$ L_0 \f$ = 46.67 dB. */ - class ThreeLogDistancePropagationLossModel : public PropagationLossModel { public: @@ -400,6 +414,8 @@ private: }; /** + * \ingroup propagation + * * \brief Nakagami-m fast fading propagation loss model. * * The Nakagami-m distribution is applied to the power level. The probability @@ -417,7 +433,6 @@ private: * For m = 1 the Nakagami-m distribution equals the Rayleigh distribution. Thus * this model also implements Rayleigh distribution based fast fading. */ - class NakagamiPropagationLossModel : public PropagationLossModel { public: @@ -447,6 +462,8 @@ private: }; /** + * \ingroup propagation + * * \brief Return a constant received power level independent of the transmit * power * @@ -481,6 +498,8 @@ private: }; /** + * \ingroup propagation + * * \brief The propagation loss is fixed for each pair of nodes and doesn't depend on their actual positions. * * This is supposed to be used by synthetic tests. Note that by default propagation loss is assumed to be symmetric. @@ -489,10 +508,10 @@ class MatrixPropagationLossModel : public PropagationLossModel { public: static TypeId GetTypeId (void); - + MatrixPropagationLossModel (); virtual ~MatrixPropagationLossModel (); - + /** * \brief Set loss (in dB, positive) between pair of ns-3 objects * (typically, nodes). @@ -505,21 +524,23 @@ public: void SetLoss (Ptr a, Ptr b, double loss, bool symmetric = true); /// Set default loss (in dB, positive) to be used, infinity if not set void SetDefaultLoss (double); - + private: virtual double DoCalcRxPower (double txPowerDbm, - Ptr a, - Ptr b) const; + Ptr a, + Ptr b) const; private: /// default loss double m_default; - + typedef std::pair< Ptr, Ptr > MobilityPair; /// Fixed loss between pair of nodes std::map m_loss; }; /** + * \ingroup propagation + * * \brief The propagation loss depends only on the distance (range) between transmitter and receiver. * * The single MaxRange attribute (units of meters) determines path loss. diff --git a/src/propagation/test/propagation-loss-model-test-suite.cc b/src/propagation/test/propagation-loss-model-test-suite.cc index 373c6d609..601c17ce6 100644 --- a/src/propagation/test/propagation-loss-model-test-suite.cc +++ b/src/propagation/test/propagation-loss-model-test-suite.cc @@ -136,10 +136,10 @@ class TwoRayGroundPropagationLossModelTestCase : public TestCase public: TwoRayGroundPropagationLossModelTestCase (); virtual ~TwoRayGroundPropagationLossModelTestCase (); - + private: virtual void DoRun (void); - + typedef struct { Vector m_position; @@ -147,13 +147,13 @@ private: double m_pr; // W double m_tolerance; } TestVector; - + TestVectors m_testVectors; }; TwoRayGroundPropagationLossModelTestCase::TwoRayGroundPropagationLossModelTestCase () -: TestCase ("Check to see that the ns-3 TwoRayGround propagation loss model provides correct received power"), -m_testVectors () + : TestCase ("Check to see that the ns-3 TwoRayGround propagation loss model provides correct received power"), + m_testVectors () { } @@ -167,15 +167,15 @@ TwoRayGroundPropagationLossModelTestCase::DoRun (void) // wavelength at 2.4 GHz is 0.125m Config::SetDefault ("ns3::TwoRayGroundPropagationLossModel::Lambda", DoubleValue (0.125)); Config::SetDefault ("ns3::TwoRayGroundPropagationLossModel::SystemLoss", DoubleValue (1.0)); - + // set antenna height to 1.5m above z coordinate Config::SetDefault ("ns3::TwoRayGroundPropagationLossModel::HeightAboveZ", DoubleValue (1.5)); - + // Select a reference transmit power of 17.0206 dBm // Pt = 10^(17.0206/10)/10^3 = .05035702 W double txPowerW = 0.05035702; double txPowerdBm = 10 * log10 (txPowerW) + 30; - + // // As with the Friis tests above, we want to test the propagation loss // model calculations at a few chosen distances and compare the results @@ -183,39 +183,39 @@ TwoRayGroundPropagationLossModelTestCase::DoRun (void) // value for agreement to be within 5e-16, as above. // TestVector testVector; - + // Below the Crossover distance use Friis so this test should be the same as that above // Crossover = (4 * PI * TxAntennaHeight * RxAntennaHeight) / Lamdba // Crossover = (4 * PI * 1.5 * 1.5) / 0.125 = 226.1946m - + testVector.m_position = Vector (100, 0, 0); testVector.m_pt = txPowerdBm; testVector.m_pr = 4.98265e-10; testVector.m_tolerance = 5e-16; m_testVectors.Add (testVector); - + // These values are above the crossover distance and therefore use the Two Ray calculation - + testVector.m_position = Vector (500, 0, 0); testVector.m_pt = txPowerdBm; testVector.m_pr = 4.07891862e-12; testVector.m_tolerance = 5e-16; m_testVectors.Add (testVector); - + testVector.m_position = Vector (1000, 0, 0); testVector.m_pt = txPowerdBm; testVector.m_pr = 2.5493241375e-13; testVector.m_tolerance = 5e-16; m_testVectors.Add (testVector); - + testVector.m_position = Vector (2000, 0, 0); testVector.m_pt = txPowerdBm; testVector.m_pr = 1.593327585938e-14; testVector.m_tolerance = 5e-16; m_testVectors.Add (testVector); - + // Repeat the tests for non-zero z coordinates - + // Pr = (0.05035702 * (1.5*1.5) * (2.5*2.5)) / (500*500*500*500) = 1.13303295e-11 // dCross = (4 * pi * 1.5 * 2.5) / 0.125 = 376.99m testVector.m_position = Vector (500, 0, 1); @@ -223,7 +223,7 @@ TwoRayGroundPropagationLossModelTestCase::DoRun (void) testVector.m_pr = 1.13303295e-11; testVector.m_tolerance = 5e-16; m_testVectors.Add (testVector); - + // Pr = (0.05035702 * (1.5*1.5) * (5.5*5.5)) / (1000*1000*1000*1000) = 3.42742467375e-12 // dCross = (4 * pi * 1.5 * 5.5) / 0.125 = 829.38m testVector.m_position = Vector (1000, 0, 4); @@ -231,7 +231,7 @@ TwoRayGroundPropagationLossModelTestCase::DoRun (void) testVector.m_pr = 3.42742467375e-12; testVector.m_tolerance = 5e-16; m_testVectors.Add (testVector); - + // Pr = (0.05035702 * (1.5*1.5) * (11.5*11.5)) / (2000*2000*2000*2000) = 9.36522547734e-13 // dCross = (4 * pi * 1.5 * 11.5) / 0.125 = 1734.15m testVector.m_position = Vector (2000, 0, 10); @@ -239,23 +239,23 @@ TwoRayGroundPropagationLossModelTestCase::DoRun (void) testVector.m_pr = 9.36522547734e-13; testVector.m_tolerance = 5e-16; m_testVectors.Add (testVector); - - + + // Now, check that the received power values are expected - + Ptr a = CreateObject (); a->SetPosition (Vector (0,0,0)); Ptr b = CreateObject (); - + Ptr lossModel = CreateObject (); for (uint32_t i = 0; i < m_testVectors.GetN (); ++i) - { - testVector = m_testVectors.Get (i); - b->SetPosition (testVector.m_position); - double resultdBm = lossModel->CalcRxPower (testVector.m_pt, a, b); - double resultW = pow (10.0, resultdBm / 10.0) / 1000; - NS_TEST_EXPECT_MSG_EQ_TOL (resultW, testVector.m_pr, testVector.m_tolerance, "Got unexpected rcv power"); - } + { + testVector = m_testVectors.Get (i); + b->SetPosition (testVector.m_position); + double resultdBm = lossModel->CalcRxPower (testVector.m_pt, a, b); + double resultW = pow (10.0, resultdBm / 10.0) / 1000; + NS_TEST_EXPECT_MSG_EQ_TOL (resultW, testVector.m_pr, testVector.m_tolerance, "Got unexpected rcv power"); + } } @@ -373,17 +373,17 @@ MatrixPropagationLossModelTestCase::DoRun (void) { m[i] = CreateObject (); } - + MatrixPropagationLossModel loss; // no loss by default - loss.SetDefaultLoss (0); + loss.SetDefaultLoss (0); // -10 dB for 0 -> 1 and 1 -> 0 loss.SetLoss (m[0], m[1], 10); // -30 dB from 0 to 2 and -100 dB from 2 to 0 - loss.SetLoss (m[0], m[2], 30, /*symmetric = */false); - loss.SetLoss (m[2], m[0], 100, /*symmetric = */false); + loss.SetLoss (m[0], m[2], 30, /*symmetric = */ false); + loss.SetLoss (m[2], m[0], 100, /*symmetric = */ false); // default from 1 to 2 - + NS_TEST_ASSERT_MSG_EQ (loss.CalcRxPower (0, m[0], m[1]), -10, "Loss 0 -> 1 incorrect"); NS_TEST_ASSERT_MSG_EQ (loss.CalcRxPower (0, m[1], m[0]), -10, "Loss 1 -> 0 incorrect"); NS_TEST_ASSERT_MSG_EQ (loss.CalcRxPower (0, m[0], m[2]), -30, "Loss 0 -> 2 incorrect"); diff --git a/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc b/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc index 30a541fcf..0ab9755c9 100644 --- a/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc +++ b/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc @@ -3,7 +3,7 @@ * Copyright (c) 2010 CTTC * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -52,7 +52,7 @@ static bool g_verbose = false; void PhyTxStartTrace (std::string context, Ptr p) -{ +{ if (g_verbose) { std::cout << context << " PHY TX START p: " << p << std::endl; @@ -62,7 +62,7 @@ PhyTxStartTrace (std::string context, Ptr p) void PhyTxEndTrace (std::string context, Ptr p) -{ +{ if (g_verbose) { std::cout << context << " PHY TX END p: " << p << std::endl; @@ -74,7 +74,7 @@ PhyRxStartTrace (std::string context, Ptr p) { if (g_verbose) { - std::cout << context << " PHY RX START p:" << p << std::endl; + std::cout << context << " PHY RX START p:" << p << std::endl; } } @@ -83,7 +83,7 @@ PhyRxEndOkTrace (std::string context, Ptr p) { if (g_verbose) { - std::cout << context << " PHY RX END OK p:" << p << std::endl; + std::cout << context << " PHY RX END OK p:" << p << std::endl; } } @@ -92,7 +92,7 @@ PhyRxEndErrorTrace (std::string context, Ptr p) { if (g_verbose) { - std::cout << context << " PHY RX END ERROR p:" << p << std::endl; + std::cout << context << " PHY RX END ERROR p:" << p << std::endl; } } @@ -108,7 +108,7 @@ ReceivePacket (Ptr socket) } if (g_verbose) { - std::cout << "SOCKET received " << bytes << " bytes" < channel = channelHelper.Create (); @@ -165,18 +165,18 @@ int main (int argc, char** argv) double txPower = 0.1; // Watts uint32_t channelNumber = 2; - Ptr txPsd = sf.CreateTxPowerSpectralDensity (txPower, channelNumber); - + Ptr txPsd = sf.CreateTxPowerSpectralDensity (txPower, channelNumber); + // for the noise, we use the Power Spectral Density of thermal noise - // at room temperature. The value of the PSD will be constant over the band of interest. + // at room temperature. The value of the PSD will be constant over the band of interest. const double k = 1.381e-23; //Boltzmann's constant const double T = 290; // temperature in Kelvin - double noisePsdValue = k*T; // watts per hertz - Ptr noisePsd = sf.CreateConstant (noisePsdValue); - + double noisePsdValue = k * T; // watts per hertz + Ptr noisePsd = sf.CreateConstant (noisePsdValue); + AdhocAlohaNoackIdealPhyHelper adhocAlohaOfdmHelper; - adhocAlohaOfdmHelper.SetChannel(channel); + adhocAlohaOfdmHelper.SetChannel (channel); adhocAlohaOfdmHelper.SetTxPowerSpectralDensity (txPsd); adhocAlohaOfdmHelper.SetNoisePowerSpectralDensity (noisePsd); adhocAlohaOfdmHelper.SetPhyAttribute ("Rate", DataRateValue (DataRate ("1Mbps"))); @@ -186,7 +186,7 @@ int main (int argc, char** argv) packetSocket.Install (ofdmNodes); PacketSocketAddress socket; - socket.SetSingleDevice(ofdmDevices.Get (0)->GetIfIndex ()); + socket.SetSingleDevice (ofdmDevices.Get (0)->GetIfIndex ()); socket.SetPhysicalAddress (ofdmDevices.Get (1)->GetAddress ()); socket.SetProtocol (1); @@ -199,13 +199,13 @@ int main (int argc, char** argv) ApplicationContainer apps = onoff.Install (ofdmNodes.Get (0)); apps.Start (Seconds (0.0)); apps.Stop (Seconds (2)); - + Ptr recvSink = SetupPacketReceive (ofdmNodes.Get (1)); - + ///////////////////////////////// // Configure waveform generator ///////////////////////////////// @@ -214,29 +214,29 @@ int main (int argc, char** argv) NS_LOG_INFO ("mwoPsd : " << *mwoPsd); WaveformGeneratorHelper waveformGeneratorHelper; - waveformGeneratorHelper.SetChannel(channel); + waveformGeneratorHelper.SetChannel (channel); waveformGeneratorHelper.SetTxPowerSpectralDensity (mwoPsd); - waveformGeneratorHelper.SetPhyAttribute ("Period", TimeValue(Seconds(1.0/60))); // corresponds to 60 Hz - waveformGeneratorHelper.SetPhyAttribute ("DutyCycle", DoubleValue(0.5)); + waveformGeneratorHelper.SetPhyAttribute ("Period", TimeValue (Seconds (1.0 / 60))); // corresponds to 60 Hz + waveformGeneratorHelper.SetPhyAttribute ("DutyCycle", DoubleValue (0.5)); NetDeviceContainer waveformGeneratorDevices = waveformGeneratorHelper.Install (waveformGeneratorNodes); - - Simulator::Schedule(Seconds(0.1), &WaveformGenerator::Start, - waveformGeneratorDevices.Get (0)->GetObject ()->GetPhy ()->GetObject ()); + + Simulator::Schedule (Seconds (0.1), &WaveformGenerator::Start, + waveformGeneratorDevices.Get (0)->GetObject ()->GetPhy ()->GetObject ()); + - ///////////////////////////////// // Configure spectrum analyzer ///////////////////////////////// SpectrumAnalyzerHelper spectrumAnalyzerHelper; - spectrumAnalyzerHelper.SetChannel(channel); + spectrumAnalyzerHelper.SetChannel (channel); spectrumAnalyzerHelper.SetRxSpectrumModel (SpectrumModelIsm2400MhzRes1Mhz); - spectrumAnalyzerHelper.SetPhyAttribute ("Resolution", TimeValue(MilliSeconds (2))); + spectrumAnalyzerHelper.SetPhyAttribute ("Resolution", TimeValue (MilliSeconds (2))); spectrumAnalyzerHelper.SetPhyAttribute ("NoisePowerSpectralDensity", DoubleValue (1e-15)); // -120 dBm/Hz - spectrumAnalyzerHelper.EnableAsciiAll ("spectrum-analyzer-output"); + spectrumAnalyzerHelper.EnableAsciiAll ("spectrum-analyzer-output"); NetDeviceContainer spectrumAnalyzerDevices = spectrumAnalyzerHelper.Install (spectrumAnalyzerNodes); @@ -249,15 +249,15 @@ int main (int argc, char** argv) Config::Connect ("/NodeList/*/DeviceList/*/Phy/RxStart", MakeCallback (&PhyRxStartTrace)); Config::Connect ("/NodeList/*/DeviceList/*/Phy/RxEndOk", MakeCallback (&PhyRxEndOkTrace)); Config::Connect ("/NodeList/*/DeviceList/*/Phy/RxEndError", MakeCallback (&PhyRxEndErrorTrace)); - -Simulator::Stop (Seconds (0.3)); -Simulator::Run (); + Simulator::Stop (Seconds (0.3)); -Simulator::Destroy (); + Simulator::Run (); + + Simulator::Destroy (); } diff --git a/src/spectrum/examples/adhoc-aloha-ideal-phy.cc b/src/spectrum/examples/adhoc-aloha-ideal-phy.cc index 5210b58af..98627f07f 100644 --- a/src/spectrum/examples/adhoc-aloha-ideal-phy.cc +++ b/src/spectrum/examples/adhoc-aloha-ideal-phy.cc @@ -3,7 +3,7 @@ * Copyright (c) 2010 CTTC * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -47,7 +47,7 @@ static bool g_verbose = false; void PhyTxStartTrace (std::string context, Ptr p) -{ +{ if (g_verbose) { std::cout << context << " PHY TX START p: " << p << std::endl; @@ -57,7 +57,7 @@ PhyTxStartTrace (std::string context, Ptr p) void PhyTxEndTrace (std::string context, Ptr p) -{ +{ if (g_verbose) { std::cout << context << " PHY TX END p: " << p << std::endl; @@ -69,7 +69,7 @@ PhyRxStartTrace (std::string context, Ptr p) { if (g_verbose) { - std::cout << context << " PHY RX START p:" << p << std::endl; + std::cout << context << " PHY RX START p:" << p << std::endl; } } @@ -78,7 +78,7 @@ PhyRxEndOkTrace (std::string context, Ptr p) { if (g_verbose) { - std::cout << context << " PHY RX END OK p:" << p << std::endl; + std::cout << context << " PHY RX END OK p:" << p << std::endl; } } @@ -87,7 +87,7 @@ PhyRxEndErrorTrace (std::string context, Ptr p) { if (g_verbose) { - std::cout << context << " PHY RX END ERROR p:" << p << std::endl; + std::cout << context << " PHY RX END ERROR p:" << p << std::endl; } } @@ -103,7 +103,7 @@ ReceivePacket (Ptr socket) } if (g_verbose) { - std::cout << "SOCKET received " << bytes << " bytes" < channel = channelHelper.Create (); @@ -143,17 +143,17 @@ int main (int argc, char** argv) double txPower = 0.1; // Watts uint32_t channelNumber = 1; - Ptr txPsd = sf.CreateTxPowerSpectralDensity (txPower, channelNumber); - + Ptr txPsd = sf.CreateTxPowerSpectralDensity (txPower, channelNumber); + // for the noise, we use the Power Spectral Density of thermal noise - // at room temperature. The value of the PSD will be constant over the band of interest. + // at room temperature. The value of the PSD will be constant over the band of interest. const double k = 1.381e-23; //Boltzmann's constant const double T = 290; // temperature in Kelvin - double noisePsdValue = k*T; // watts per hertz - Ptr noisePsd = sf.CreateConstant (noisePsdValue); + double noisePsdValue = k * T; // watts per hertz + Ptr noisePsd = sf.CreateConstant (noisePsdValue); AdhocAlohaNoackIdealPhyHelper deviceHelper; - deviceHelper.SetChannel(channel); + deviceHelper.SetChannel (channel); deviceHelper.SetTxPowerSpectralDensity (txPsd); deviceHelper.SetNoisePowerSpectralDensity (noisePsd); deviceHelper.SetPhyAttribute ("Rate", DataRateValue (DataRate ("1Mbps"))); @@ -163,7 +163,7 @@ int main (int argc, char** argv) packetSocket.Install (c); PacketSocketAddress socket; - socket.SetSingleDevice(devices.Get (0)->GetIfIndex ()); + socket.SetSingleDevice (devices.Get (0)->GetIfIndex ()); socket.SetPhysicalAddress (devices.Get (1)->GetAddress ()); socket.SetProtocol (1); @@ -176,7 +176,7 @@ int main (int argc, char** argv) ApplicationContainer apps = onoff.Install (c.Get (0)); apps.Start (Seconds (0.1)); apps.Stop (Seconds (0.104)); - + Ptr recvSink = SetupPacketReceive (c.Get (1)); Simulator::Stop (Seconds (10.0)); diff --git a/src/spectrum/helper/adhoc-aloha-noack-ideal-phy-helper.h b/src/spectrum/helper/adhoc-aloha-noack-ideal-phy-helper.h index e7ea22aac..bdfa052d1 100644 --- a/src/spectrum/helper/adhoc-aloha-noack-ideal-phy-helper.h +++ b/src/spectrum/helper/adhoc-aloha-noack-ideal-phy-helper.h @@ -36,6 +36,8 @@ class SpectrumValue; class SpectrumChannel; /** + * \ingroup spectrum + * * * create the NetDevice depicted in the figure * @image html HdOfdmAlohaNoAck.png diff --git a/src/spectrum/helper/spectrum-analyzer-helper.cc b/src/spectrum/helper/spectrum-analyzer-helper.cc index 8b3371921..fc1f9db34 100644 --- a/src/spectrum/helper/spectrum-analyzer-helper.cc +++ b/src/spectrum/helper/spectrum-analyzer-helper.cc @@ -39,8 +39,8 @@ NS_LOG_COMPONENT_DEFINE ("SpectrumAnalyzerHelper"); namespace ns3 { -static void -WriteAveragePowerSpectralDensityReport (Ptr streamWrapper, +static void +WriteAveragePowerSpectralDensityReport (Ptr streamWrapper, Ptr avgPowerSpectralDensity) { NS_LOG_FUNCTION (streamWrapper << avgPowerSpectralDensity); @@ -62,7 +62,7 @@ WriteAveragePowerSpectralDensityReport (Ptr streamWrapper, *ostream << std::endl; } } - + SpectrumAnalyzerHelper::SpectrumAnalyzerHelper () @@ -108,7 +108,7 @@ SpectrumAnalyzerHelper::SetDeviceAttribute (std::string name, const AttributeVal m_device.Set (name, v); } - + void SpectrumAnalyzerHelper::SetRxSpectrumModel (Ptr m) { @@ -121,7 +121,7 @@ SpectrumAnalyzerHelper::EnableAsciiAll (std::string prefix) { NS_LOG_FUNCTION (this); m_prefix = prefix; -} +} @@ -135,7 +135,7 @@ SpectrumAnalyzerHelper::Install (NodeContainer c) const Ptr node = *i; Ptr dev = m_device.Create ()->GetObject (); - + Ptr phy = m_phy.Create ()->GetObject (); NS_ASSERT (phy); @@ -158,7 +158,7 @@ SpectrumAnalyzerHelper::Install (NodeContainer c) const uint32_t devId = node->AddDevice (dev); devices.Add (dev); - if (! m_prefix.empty ()) + if (!m_prefix.empty ()) { NS_LOG_LOGIC ("creating new output stream and binding it to the callback"); AsciiTraceHelper asciiTraceHelper; @@ -170,7 +170,7 @@ SpectrumAnalyzerHelper::Install (NodeContainer c) const // the following is inspired from YansWifiPhyHelper::EnableAsciiInternal std::ostringstream oss; - oss.str (""); + oss.str (""); oss << "/NodeList/" << node->GetId () << "/DeviceList/" << devId << "/$ns3::NonCommunicatingNetDevice/Phy/AveragePowerSpectralDensityReport"; Config::ConnectWithoutContext (oss.str (), MakeBoundCallback (&WriteAveragePowerSpectralDensityReport, stream)); diff --git a/src/spectrum/helper/spectrum-analyzer-helper.h b/src/spectrum/helper/spectrum-analyzer-helper.h index 37d37f9a7..fea0e5751 100644 --- a/src/spectrum/helper/spectrum-analyzer-helper.h +++ b/src/spectrum/helper/spectrum-analyzer-helper.h @@ -37,6 +37,10 @@ class SpectrumValue; class SpectrumChannel; class SpectrumModel; +/** + * \ingroup spectrum + * + */ class SpectrumAnalyzerHelper { public: diff --git a/src/spectrum/helper/spectrum-helper.h b/src/spectrum/helper/spectrum-helper.h index 97111b94a..f2cdf344d 100644 --- a/src/spectrum/helper/spectrum-helper.h +++ b/src/spectrum/helper/spectrum-helper.h @@ -35,6 +35,10 @@ class Node; class NetDevice; +/** + * \ingroup spectrum + * + */ class SpectrumChannelHelper { public: @@ -146,6 +150,8 @@ private: /** + * \ingroup spectrum + * * create and configure several SpectrumPhy instances and connect them to a channel. */ class SpectrumPhyHelper diff --git a/src/spectrum/helper/waveform-generator-helper.cc b/src/spectrum/helper/waveform-generator-helper.cc index 1b6b51b96..278e2fdfa 100644 --- a/src/spectrum/helper/waveform-generator-helper.cc +++ b/src/spectrum/helper/waveform-generator-helper.cc @@ -91,7 +91,7 @@ WaveformGeneratorHelper::Install (NodeContainer c) const Ptr node = *i; Ptr dev = m_device.Create ()->GetObject (); - + Ptr phy = m_phy.Create ()->GetObject (); NS_ASSERT (phy); diff --git a/src/spectrum/helper/waveform-generator-helper.h b/src/spectrum/helper/waveform-generator-helper.h index f00491be2..61ae34d0f 100644 --- a/src/spectrum/helper/waveform-generator-helper.h +++ b/src/spectrum/helper/waveform-generator-helper.h @@ -37,6 +37,10 @@ class SpectrumValue; class SpectrumChannel; +/** + * \ingroup spectrum + * + */ class WaveformGeneratorHelper { public: diff --git a/src/spectrum/model/aloha-noack-mac-header.h b/src/spectrum/model/aloha-noack-mac-header.h index ee88c7822..1946a89e6 100644 --- a/src/spectrum/model/aloha-noack-mac-header.h +++ b/src/spectrum/model/aloha-noack-mac-header.h @@ -28,6 +28,10 @@ namespace ns3 { +/** + * \ingroup spectrum + * + */ class AlohaNoackMacHeader : public Header { public: diff --git a/src/spectrum/model/aloha-noack-net-device.cc b/src/spectrum/model/aloha-noack-net-device.cc index b8fdead63..0bc39b14f 100644 --- a/src/spectrum/model/aloha-noack-net-device.cc +++ b/src/spectrum/model/aloha-noack-net-device.cc @@ -106,7 +106,7 @@ AlohaNoackNetDevice::AlohaNoackNetDevice () { NS_LOG_FUNCTION (this); } - + AlohaNoackNetDevice::~AlohaNoackNetDevice () { NS_LOG_FUNCTION (this); diff --git a/src/spectrum/model/aloha-noack-net-device.h b/src/spectrum/model/aloha-noack-net-device.h index f91780015..3be964af8 100644 --- a/src/spectrum/model/aloha-noack-net-device.h +++ b/src/spectrum/model/aloha-noack-net-device.h @@ -44,6 +44,8 @@ class Queue; /** + * \ingroup spectrum + * * This devices implements the following features: * - layer 3 protocol multiplexing * - MAC addressing @@ -57,7 +59,8 @@ class Queue; class AlohaNoackNetDevice : public NetDevice { public: - enum State { + enum State + { IDLE, TX, RX }; diff --git a/src/spectrum/model/friis-spectrum-propagation-loss.h b/src/spectrum/model/friis-spectrum-propagation-loss.h index 343ecdc64..dee5d94ed 100644 --- a/src/spectrum/model/friis-spectrum-propagation-loss.h +++ b/src/spectrum/model/friis-spectrum-propagation-loss.h @@ -30,6 +30,10 @@ namespace ns3 { class MobilityModel; +/** + * \ingroup spectrum + * + */ class FriisSpectrumPropagationLossModel : public SpectrumPropagationLossModel { diff --git a/src/spectrum/model/half-duplex-ideal-phy.cc b/src/spectrum/model/half-duplex-ideal-phy.cc index d0742e5f7..2ae2c427a 100644 --- a/src/spectrum/model/half-duplex-ideal-phy.cc +++ b/src/spectrum/model/half-duplex-ideal-phy.cc @@ -71,7 +71,7 @@ HalfDuplexIdealPhy::DoDispose () std::ostream& operator<< (std::ostream& os, HalfDuplexIdealPhy::State s) { - switch (s) + switch (s) { case HalfDuplexIdealPhy::IDLE: os << "IDLE"; @@ -165,7 +165,7 @@ HalfDuplexIdealPhy::SetChannel (Ptr c) m_channel = c; } -Ptr +Ptr HalfDuplexIdealPhy::GetRxSpectrumModel () const { if (m_txPsd) @@ -249,7 +249,7 @@ HalfDuplexIdealPhy::SetGenericPhyRxEndOkCallback (GenericPhyRxEndOkCallback c) m_phyMacRxEndOkCallback = c; } -void +void HalfDuplexIdealPhy::ChangeState (State newState) { NS_LOG_LOGIC (this << " state: " << m_state << " -> " << newState); @@ -268,7 +268,7 @@ HalfDuplexIdealPhy::StartTx (Ptr p) { case RX: AbortRx (); - // fall through + // fall through case IDLE: { @@ -278,7 +278,7 @@ HalfDuplexIdealPhy::StartTx (Ptr p) Ptr pb = Create (); pb->AddPacket (p); m_channel->StartTx (pb, m_txPsd, GetSpectrumType (), Seconds (txTimeSeconds), GetObject ()); - Simulator::Schedule(Seconds (txTimeSeconds), &HalfDuplexIdealPhy::EndTx, this); + Simulator::Schedule (Seconds (txTimeSeconds), &HalfDuplexIdealPhy::EndTx, this); } break; @@ -341,7 +341,7 @@ HalfDuplexIdealPhy::StartRx (Ptr pb, Ptr rxPs case IDLE: // preamble detection and synchronization is supposed to be always successful. - NS_LOG_LOGIC (this << " receiving " << pb->GetNPackets () << " packet(s)" ); + NS_LOG_LOGIC (this << " receiving " << pb->GetNPackets () << " packet(s)" ); NS_ASSERT (pb->GetNPackets () == 1); // this PHY only supports a single packet per waveform Ptr p = pb->GetPackets ().front (); m_phyRxStartTrace (p); @@ -365,7 +365,7 @@ HalfDuplexIdealPhy::StartRx (Ptr pb, Ptr rxPs } } - + NS_LOG_LOGIC (this << "state: " << m_state); } diff --git a/src/spectrum/model/half-duplex-ideal-phy.h b/src/spectrum/model/half-duplex-ideal-phy.h index f6ce085de..ad2d9291a 100644 --- a/src/spectrum/model/half-duplex-ideal-phy.h +++ b/src/spectrum/model/half-duplex-ideal-phy.h @@ -40,6 +40,8 @@ namespace ns3 { /** + * \ingroup spectrum + * * This PHY layer implementation realizes an ideal OFDM PHY which * transmits half-duplex (i.e., it can either receive or transmit at a * given time). The device is ideal in the sense that: @@ -83,7 +85,8 @@ public: * PHY states * */ - enum State { + enum State + { IDLE, TX, RX }; @@ -97,7 +100,7 @@ public: Ptr GetDevice (); Ptr GetRxSpectrumModel () const; void StartRx (Ptr p, Ptr rxPsd, SpectrumType st, Time duration); - + /** @@ -183,9 +186,8 @@ public: private: - virtual void DoDispose (void); - + void ChangeState (State newState); void EndTx (); void AbortRx (); diff --git a/src/spectrum/model/microwave-oven-spectrum-value-helper.cc b/src/spectrum/model/microwave-oven-spectrum-value-helper.cc index db929ab81..8e3e00ab5 100644 --- a/src/spectrum/model/microwave-oven-spectrum-value-helper.cc +++ b/src/spectrum/model/microwave-oven-spectrum-value-helper.cc @@ -25,7 +25,7 @@ NS_LOG_COMPONENT_DEFINE ("MicrowaveOvenSpectrumValue"); namespace ns3 { - + Ptr g_MicrowaveOvenSpectrumModel5Mhz; Ptr g_MicrowaveOvenSpectrumModel6Mhz; @@ -35,9 +35,9 @@ class MicrowaveOvenSpectrumModel5MhzInitializer public: MicrowaveOvenSpectrumModel5MhzInitializer () { - NS_LOG_FUNCTION(this); + NS_LOG_FUNCTION (this); Bands bands; - for (double fl = 2400e6; fl < 2499e6; fl += 5e6) + for (double fl = 2400e6; fl < 2499e6; fl += 5e6) { BandInfo bi; bi.fl = fl; @@ -45,8 +45,8 @@ public: bi.fh = fl + 10e6; bands.push_back (bi); } - NS_LOG_LOGIC("bands.size () :" << bands.size ()); - g_MicrowaveOvenSpectrumModel5Mhz = Create (bands); + NS_LOG_LOGIC ("bands.size () :" << bands.size ()); + g_MicrowaveOvenSpectrumModel5Mhz = Create (bands); } } g_MicrowaveOvenSpectrumModel5MhzInitializerInstance; @@ -57,7 +57,7 @@ class MicrowaveOvenSpectrumModel6MhzInitializer public: MicrowaveOvenSpectrumModel6MhzInitializer () { - NS_LOG_FUNCTION(this); + NS_LOG_FUNCTION (this); Bands bands; for (double fl = 2360e6; fl < 2479e6; fl += 6e6) { @@ -67,7 +67,7 @@ public: bi.fh = fl + 12e6; bands.push_back (bi); } - NS_LOG_LOGIC("bands.size () :" << bands.size ()); + NS_LOG_LOGIC ("bands.size () :" << bands.size ()); g_MicrowaveOvenSpectrumModel6Mhz = Create (bands); } } g_MicrowaveOvenSpectrumModel6MhzInitializerInstance; @@ -76,13 +76,13 @@ public: -Ptr +Ptr MicrowaveOvenSpectrumValueHelper::CreatePowerSpectralDensityMwo1 () -{ +{ Ptr psd = Create (g_MicrowaveOvenSpectrumModel6Mhz); // values from this paper: - // Tanim M. Taher, Matthew J. Misurac, Joseph L. LoCicero, and Donald R. Ucci, + // Tanim M. Taher, Matthew J. Misurac, Joseph L. LoCicero, and Donald R. Ucci, // "MICROWAVE OVEN SIGNAL MODELING", in Proc. of IEEE WCNC, 2008, // see Figure 3, "Experimental PSD of MWO #1" // the figure has a resolution of 12 MHz per division; we use a @@ -112,18 +112,18 @@ MicrowaveOvenSpectrumValueHelper::CreatePowerSpectralDensityMwo1 () (*psd)[19] = -67.5; // convert to W/Hz - (*psd) = Pow(10.0, ((*psd) - 30)/10.0); + (*psd) = Pow (10.0, ((*psd) - 30) / 10.0); return psd; } -Ptr +Ptr MicrowaveOvenSpectrumValueHelper::CreatePowerSpectralDensityMwo2 () -{ +{ // values from this paper: - // Tanim M. Taher, Matthew J. Misurac, Joseph L. LoCicero, and Donald R. Ucci, + // Tanim M. Taher, Matthew J. Misurac, Joseph L. LoCicero, and Donald R. Ucci, // "MICROWAVE OVEN SIGNAL MODELING", in Proc. of IEEE WCNC, 2008, // see Figure 9, "Experimental PSD of actual MWO #2" // the figure has a resolution of 10 MHz per division; we use a @@ -133,14 +133,14 @@ MicrowaveOvenSpectrumValueHelper::CreatePowerSpectralDensityMwo2 () Ptr psd = Create (g_MicrowaveOvenSpectrumModel5Mhz); - (*psd)[0] = -68; - (*psd)[1] = -68; + (*psd)[0] = -68; + (*psd)[1] = -68; (*psd)[2] = -68; (*psd)[3] = -68; - (*psd)[4] = -65; + (*psd)[4] = -65; (*psd)[5] = -62; - (*psd)[6] = -56; - (*psd)[7] = -55; + (*psd)[6] = -56; + (*psd)[7] = -55; (*psd)[8] = -47; (*psd)[9] = -40; (*psd)[10] = -37; @@ -155,7 +155,7 @@ MicrowaveOvenSpectrumValueHelper::CreatePowerSpectralDensityMwo2 () (*psd)[19] = -68; // convert to W/Hz - (*psd) = Pow(10.0, ((*psd) - 30)/10.0); + (*psd) = Pow (10.0, ((*psd) - 30) / 10.0); return psd; } diff --git a/src/spectrum/model/microwave-oven-spectrum-value-helper.h b/src/spectrum/model/microwave-oven-spectrum-value-helper.h index 39bfa4614..f1beaf7cf 100644 --- a/src/spectrum/model/microwave-oven-spectrum-value-helper.h +++ b/src/spectrum/model/microwave-oven-spectrum-value-helper.h @@ -28,30 +28,31 @@ namespace ns3 { -/** +/** + * \ingroup spectrum + * * This class provides methods for the creation of SpectrumValue * instances that mimic the Power Spectral Density of commercial * microwave ovens based on the measurements reported in the following paper: - * Tanim M. Taher, Matthew J. Misurac, Joseph L. LoCicero, and Donald R. Ucci, + * Tanim M. Taher, Matthew J. Misurac, Joseph L. LoCicero, and Donald R. Ucci, * "MICROWAVE OVEN SIGNAL MODELING", in Proc. of IEEE WCNC, 2008 * */ -class MicrowaveOvenSpectrumValueHelper +class MicrowaveOvenSpectrumValueHelper { public: - - /** - * + /** + * * @return the Power Spectral Density of Micro Wave Oven #1 in the * cited paper */ static Ptr CreatePowerSpectralDensityMwo1 (); - /** - * + /** + * * @return the Power Spectral Density of Micro Wave Oven #2 in the * cited paper - */ + */ static Ptr CreatePowerSpectralDensityMwo2 (); }; @@ -59,7 +60,7 @@ public: - + } //namespace ns3 diff --git a/src/spectrum/model/multi-model-spectrum-channel.cc b/src/spectrum/model/multi-model-spectrum-channel.cc index 33729cf71..cd6a4cf49 100644 --- a/src/spectrum/model/multi-model-spectrum-channel.cc +++ b/src/spectrum/model/multi-model-spectrum-channel.cc @@ -112,7 +112,7 @@ MultiModelSpectrumChannel::AddRx (Ptr phy) NS_ASSERT_MSG ((0 != rxSpectrumModel), "phy->GetRxSpectrumModel () returned 0. Please check that the RxSpectrumModel is already set for the phy before calling MultiModelSpectrumChannel::AddRx (phy)"); SpectrumModelUid_t rxSpectrumModelUid = rxSpectrumModel->GetUid (); - + std::vector >::const_iterator it; // make sure this phy had not been already added @@ -121,18 +121,18 @@ MultiModelSpectrumChannel::AddRx (Ptr phy) NS_ASSERT (*it != phy); } m_phyVector.push_back (phy); - + RxSpectrumModelInfoMap_t::iterator rxInfoIterator = m_rxSpectrumModelInfoMap.find (rxSpectrumModelUid); if (rxInfoIterator == m_rxSpectrumModelInfoMap.end ()) { // spectrum model unknown, add it to the list of RxSpectrumModels std::pair ret; - ret = m_rxSpectrumModelInfoMap.insert (std::make_pair (rxSpectrumModelUid, RxSpectrumModelInfo (rxSpectrumModel))); + ret = m_rxSpectrumModelInfoMap.insert (std::make_pair (rxSpectrumModelUid, RxSpectrumModelInfo (rxSpectrumModel))); NS_ASSERT (ret.second); // also add the phy to the newly created list of SpectrumPhy for this RxSpectrumModel ret.first->second.m_rxPhyList.push_back (phy); - + // and create the necessary converters for all the TX spectrum models that we know of for (TxSpectrumModelInfoMap_t::iterator txInfoIterator = m_txSpectrumModelInfoMap.begin (); txInfoIterator != m_txSpectrumModelInfoMap.end (); @@ -142,7 +142,7 @@ MultiModelSpectrumChannel::AddRx (Ptr phy) NS_LOG_LOGIC ("Creating converters between SpectrumModelUids " << txSpectrumModel->GetUid () << " and " << rxSpectrumModelUid ); SpectrumConverter converter (txSpectrumModel, rxSpectrumModel); std::pair ret2; - ret2 = txInfoIterator->second.m_spectrumConverterMap.insert (std::make_pair (rxSpectrumModelUid, converter)); + ret2 = txInfoIterator->second.m_spectrumConverterMap.insert (std::make_pair (rxSpectrumModelUid, converter)); NS_ASSERT (ret2.second); } } @@ -151,7 +151,7 @@ MultiModelSpectrumChannel::AddRx (Ptr phy) // spectrum model is already known, just add the device to the corresponding list rxInfoIterator->second.m_rxPhyList.push_back (phy); } - + } @@ -161,16 +161,16 @@ MultiModelSpectrumChannel::FindAndEventuallyAddTxSpectrumModel (PtrGetUid (); TxSpectrumModelInfoMap_t::iterator txInfoIterator = m_txSpectrumModelInfoMap.find (txSpectrumModelUid); - + if (txInfoIterator == m_txSpectrumModelInfoMap.end ()) - { + { // first time we see this TX SpectrumModel // we add it to the list std::pair ret; ret = m_txSpectrumModelInfoMap.insert (std::make_pair (txSpectrumModelUid, TxSpectrumModelInfo (txSpectrumModel))); - NS_ASSERT (ret.second); + NS_ASSERT (ret.second); txInfoIterator = ret.first; - + // and we create the converters for all the RX SpectrumModels that we know of for (RxSpectrumModelInfoMap_t::const_iterator rxInfoIterator = m_rxSpectrumModelInfoMap.begin (); rxInfoIterator != m_rxSpectrumModelInfoMap.end (); @@ -185,14 +185,14 @@ MultiModelSpectrumChannel::FindAndEventuallyAddTxSpectrumModel (Ptr ret2; - ret2 = txInfoIterator->second.m_spectrumConverterMap.insert (std::make_pair (rxSpectrumModelUid, converter)); + ret2 = txInfoIterator->second.m_spectrumConverterMap.insert (std::make_pair (rxSpectrumModelUid, converter)); NS_ASSERT (ret2.second); } - } + } } else { - NS_LOG_LOGIC ("SpectrumModelUid " << txSpectrumModelUid << " already present"); + NS_LOG_LOGIC ("SpectrumModelUid " << txSpectrumModelUid << " already present"); } return txInfoIterator; } @@ -205,7 +205,7 @@ MultiModelSpectrumChannel::StartTx (Ptr p, Ptr orig NS_ASSERT (txPhy); NS_ASSERT (originalTxPowerSpectrum); - + Ptr txMobility = txPhy->GetMobility ()->GetObject (); SpectrumModelUid_t txSpectrumModelUid = originalTxPowerSpectrum->GetSpectrumModelUid (); @@ -246,7 +246,7 @@ MultiModelSpectrumChannel::StartTx (Ptr p, Ptr orig { NS_ASSERT_MSG ((*rxPhyIterator)->GetRxSpectrumModel ()->GetUid () == rxSpectrumModelUid, "MultiModelSpectrumChannel only supports devices that use a single RxSpectrumModel that does not change for the whole simulation"); - + if ((*rxPhyIterator) != txPhy) { Ptr rxPowerSpectrum; @@ -296,7 +296,7 @@ MultiModelSpectrumChannel::StartTx (Ptr p, Ptr orig Simulator::Schedule (delay, &MultiModelSpectrumChannel::StartRx, this, pktBurstCopy, rxPowerSpectrum, st, duration, *rxPhyIterator); } - } + } ++rxPhyIterator; } diff --git a/src/spectrum/model/multi-model-spectrum-channel.h b/src/spectrum/model/multi-model-spectrum-channel.h index 10b2c2868..0f5f12e81 100644 --- a/src/spectrum/model/multi-model-spectrum-channel.h +++ b/src/spectrum/model/multi-model-spectrum-channel.h @@ -36,11 +36,15 @@ namespace ns3 { typedef std::map SpectrumConverterMap_t; +/** + * \ingroup spectrum + * + */ class TxSpectrumModelInfo { public: TxSpectrumModelInfo (Ptr txSpectrumModel); - + Ptr m_txSpectrumModel; SpectrumConverterMap_t m_spectrumConverterMap; }; @@ -48,13 +52,17 @@ public: typedef std::map TxSpectrumModelInfoMap_t; +/** + * \ingroup spectrum + * + */ class RxSpectrumModelInfo { public: RxSpectrumModelInfo (Ptr rxSpectrumModel); - + Ptr m_rxSpectrumModel; - std::list > m_rxPhyList; + std::list > m_rxPhyList; }; typedef std::map RxSpectrumModelInfoMap_t; @@ -63,6 +71,8 @@ typedef std::map RxSpectrumModelInfoMap /** + * \ingroup spectrum + * * This SpectrumChannel implementation can handle the presence of * SpectrumPhy instances which can use * different spectrum models, i.e., different SpectrumModel. The only @@ -97,25 +107,23 @@ protected: private: - - - /** + /** * this method checks if m_rxSpectrumModelInfoMap contains an entry * for the given TX SpectrumModel. If such entry exists, it returns * an interator pointing to it. If not, it creates a new entry in * m_txSpectrumMpodelInfoMap, and returns an iterator to it. - * + * * @param txSpectrumModel the TX SpectrumModel being considered - * + * * @return an iterator pointing to the corresponding entry in m_txSpectrumModelInfoMap */ TxSpectrumModelInfoMap_t::const_iterator FindAndEventuallyAddTxSpectrumModel (Ptr txSpectrumModel); - /** + /** * make sure that there are SpectrumConverters from any * SpectrumPhy being used for TX to the given SpectrumModel being used for RX - * + * * @param rxPhy the RXing SpectrumPhy * @param rxSpectrumModel the SpectrumModel used for RX by rxPhy */ @@ -153,8 +161,8 @@ private: /** * data structure holding, for each TX SpectrumModel, all the * converters to any RX SpectrumModel, and all the corresponding - * SpectrumPhy instances. - * + * SpectrumPhy instances. + * */ TxSpectrumModelInfoMap_t m_txSpectrumModelInfoMap; @@ -162,10 +170,10 @@ private: /** * data structure holding, for each RX spectrum model, all the * corresponding SpectrumPhy instances. - * + * */ RxSpectrumModelInfoMap_t m_rxSpectrumModelInfoMap; - + /** * this is only used to provide a straighforward implementation of * GetNDevices() and GetDevice() diff --git a/src/spectrum/model/non-communicating-net-device.cc b/src/spectrum/model/non-communicating-net-device.cc index f256f41c5..1ce3508a8 100644 --- a/src/spectrum/model/non-communicating-net-device.cc +++ b/src/spectrum/model/non-communicating-net-device.cc @@ -43,7 +43,7 @@ NonCommunicatingNetDevice::GetTypeId (void) { static TypeId tid = TypeId ("ns3::NonCommunicatingNetDevice") .SetParent () - .AddConstructor () + .AddConstructor () .AddAttribute ("Phy", "The PHY layer attached to this device.", PointerValue (), MakePointerAccessor (&NonCommunicatingNetDevice::GetPhy, diff --git a/src/spectrum/model/non-communicating-net-device.h b/src/spectrum/model/non-communicating-net-device.h index 83ec6f07a..809f43bfb 100644 --- a/src/spectrum/model/non-communicating-net-device.h +++ b/src/spectrum/model/non-communicating-net-device.h @@ -41,6 +41,8 @@ class Queue; /** + * \ingroup spectrum + * * This class implements a device which does not communicate, in the * sense that it does not interact with the above protocol stack. The * purpose of this NetDevice is to be used for devices such as @@ -52,7 +54,6 @@ class Queue; class NonCommunicatingNetDevice : public NetDevice { public: - static TypeId GetTypeId (void); NonCommunicatingNetDevice (); @@ -120,7 +121,6 @@ public: private: - virtual void DoDispose (void); Ptr m_node; diff --git a/src/spectrum/model/single-model-spectrum-channel.cc b/src/spectrum/model/single-model-spectrum-channel.cc index 1daf52524..025dd8051 100644 --- a/src/spectrum/model/single-model-spectrum-channel.cc +++ b/src/spectrum/model/single-model-spectrum-channel.cc @@ -204,10 +204,10 @@ SingleModelSpectrumChannel::SetPropagationDelayModel (Ptr } -Ptr +Ptr SingleModelSpectrumChannel::GetSpectrumPropagationLossModel (void) { - NS_LOG_FUNCTION (this); + NS_LOG_FUNCTION (this); return m_PropagationLoss; } diff --git a/src/spectrum/model/single-model-spectrum-channel.h b/src/spectrum/model/single-model-spectrum-channel.h index c1e2000ae..25be58dc5 100644 --- a/src/spectrum/model/single-model-spectrum-channel.h +++ b/src/spectrum/model/single-model-spectrum-channel.h @@ -31,6 +31,8 @@ namespace ns3 { /** + * \ingroup spectrum + * * @brief SpectrumChannel implementation which handles a single spectrum model * * All SpectrumPhy layers attached to this SpectrumChannel @@ -48,10 +50,10 @@ public: virtual void AddSpectrumPropagationLossModel (Ptr loss); virtual void SetPropagationDelayModel (Ptr delay); virtual void AddRx (Ptr phy); - virtual void StartTx (Ptr p, - Ptr txPsd, - SpectrumType st, - Time duration, + virtual void StartTx (Ptr p, + Ptr txPsd, + SpectrumType st, + Time duration, Ptr sender); @@ -65,7 +67,6 @@ public: virtual Ptr GetSpectrumPropagationLossModel (void); private: - virtual void DoDispose (); /** diff --git a/src/spectrum/model/spectrum-analyzer.cc b/src/spectrum/model/spectrum-analyzer.cc index 342e8b34e..e51cbe6b3 100644 --- a/src/spectrum/model/spectrum-analyzer.cc +++ b/src/spectrum/model/spectrum-analyzer.cc @@ -36,7 +36,7 @@ SpectrumAnalyzer::SpectrumAnalyzer () m_netDevice (0), m_channel (0), m_spectrumModel (0), - m_sumPowerSpectralDensity (0), + m_sumPowerSpectralDensity (0), m_resolution (MilliSeconds (50)), m_active (false) { @@ -77,7 +77,7 @@ SpectrumAnalyzer::GetTypeId (void) MakeTimeChecker ()) .AddAttribute ("NoisePowerSpectralDensity", "the power spectral density of the measuring instrument noise, in Watt/Hz. Mostly useful to make spectrograms look more similar to those obtained by real devices. Defaults to the value for thermal noise at 300K.", - DoubleValue (1.38e-23*300), + DoubleValue (1.38e-23 * 300), MakeDoubleAccessor (&SpectrumAnalyzer::m_noisePowerSpectralDensity), MakeDoubleChecker ()) .AddTraceSource ("AveragePowerSpectralDensityReport", @@ -103,7 +103,7 @@ SpectrumAnalyzer::GetMobility () } -Ptr +Ptr SpectrumAnalyzer::GetRxSpectrumModel () const { return m_spectrumModel; @@ -136,9 +136,9 @@ SpectrumAnalyzer::SetChannel (Ptr c) void -SpectrumAnalyzer::StartRx (Ptr pb, - Ptr rxPowerSpectralDensity, - SpectrumType st, +SpectrumAnalyzer::StartRx (Ptr pb, + Ptr rxPowerSpectralDensity, + SpectrumType st, Time duration) { NS_LOG_FUNCTION ( this << st << duration << *rxPowerSpectralDensity); @@ -157,7 +157,7 @@ SpectrumAnalyzer::AddSignal (Ptr psd) void SpectrumAnalyzer::SubtractSignal (Ptr psd) -{ +{ NS_LOG_FUNCTION (this << *psd); UpdateEnergyReceivedSoFar (); (*m_sumPowerSpectralDensity) -= (*psd); @@ -185,7 +185,7 @@ SpectrumAnalyzer::GenerateReport () UpdateEnergyReceivedSoFar (); Ptr avgPowerSpectralDensity = Create (m_sumPowerSpectralDensity->GetSpectrumModel ()); - (*avgPowerSpectralDensity) = (*m_energySpectralDensity) / m_resolution.GetSeconds (); + (*avgPowerSpectralDensity) = (*m_energySpectralDensity) / m_resolution.GetSeconds (); (*avgPowerSpectralDensity) += m_noisePowerSpectralDensity; (*m_energySpectralDensity) = 0; diff --git a/src/spectrum/model/spectrum-analyzer.h b/src/spectrum/model/spectrum-analyzer.h index 32b9892d9..d31a6d436 100644 --- a/src/spectrum/model/spectrum-analyzer.h +++ b/src/spectrum/model/spectrum-analyzer.h @@ -36,6 +36,8 @@ namespace ns3 { /** + * \ingroup spectrum + * * Simple SpectrumPhy implemetation that averages the spectrum power * density of incoming transmissions to produce a spectrogram. * @@ -62,11 +64,11 @@ public: /** * Set the spectrum model used by the SpectrumAnalyzer to represent incoming signals * - * @param m + * @param m */ void SetRxSpectrumModel (Ptr m); - + /** * Start the spectrum analyzer * @@ -81,16 +83,13 @@ public: protected: - void DoDispose (); -private: - - +private: Ptr m_mobility; Ptr m_netDevice; Ptr m_channel; - + virtual void GenerateReport (); void AddSignal (Ptr psd); diff --git a/src/spectrum/model/spectrum-channel.h b/src/spectrum/model/spectrum-channel.h index 0f828ad49..247f65a26 100644 --- a/src/spectrum/model/spectrum-channel.h +++ b/src/spectrum/model/spectrum-channel.h @@ -37,13 +37,14 @@ class SpectrumPropagationLossModel; class PropagationDelayModel; /** + * \ingroup spectrum + * * Defines the interface for spectrum-aware channel implementations * */ class SpectrumChannel : public Channel { public: - virtual ~SpectrumChannel (); static TypeId GetTypeId (void); @@ -85,13 +86,13 @@ public: * SpectrumChannel instance, so that the SpectrumPhy can receive * packets sent on that channel. Note that a SpectrumPhy that only * transmits (without receiveing ever) does not need to be added to - * the channel. + * the channel. * * This method is to be implemented by all classes inheriting from - * SpectrumChannel. + * SpectrumChannel. * * @param phy the SpectrumPhy instance to be added to the channel as - * a receiver. + * a receiver. */ virtual void AddRx (Ptr phy) = 0; diff --git a/src/spectrum/model/spectrum-converter.h b/src/spectrum/model/spectrum-converter.h index 82da3fb93..75be37970 100644 --- a/src/spectrum/model/spectrum-converter.h +++ b/src/spectrum/model/spectrum-converter.h @@ -27,6 +27,8 @@ namespace ns3 { /** + * \ingroup spectrum + * * Class which implements a converter between SpectrumValue which are * defined over different SpectrumModel. In more formal terms, this class * allows conversion between different function spaces. In practical @@ -51,7 +53,7 @@ public: SpectrumConverter (Ptr fromSpectrumModel, Ptr toSpectrumModel); SpectrumConverter (); - + /** diff --git a/src/spectrum/model/spectrum-error-model.h b/src/spectrum/model/spectrum-error-model.h index f1b3c8075..3d9ebb6c5 100644 --- a/src/spectrum/model/spectrum-error-model.h +++ b/src/spectrum/model/spectrum-error-model.h @@ -32,6 +32,10 @@ namespace ns3 { +/** + * \ingroup spectrum + * + */ class SpectrumErrorModel : public Object { public: @@ -43,6 +47,8 @@ public: /** + * \ingroup spectrum + * * This class implements the error model described in this paper: * N. Baldo and M. Miozzo, "Spectrum-aware Channel and PHY layer modeling * for ns3", in Proceedings of International Workshop on Network diff --git a/src/spectrum/model/spectrum-interference.cc b/src/spectrum/model/spectrum-interference.cc index 72cc8439e..0f5216d07 100644 --- a/src/spectrum/model/spectrum-interference.cc +++ b/src/spectrum/model/spectrum-interference.cc @@ -53,13 +53,13 @@ SpectrumInterference::DoDispose () m_rxSignal = 0; m_allSignals = 0; m_noise = 0; - m_errorModel = 0; + m_errorModel = 0; Object::DoDispose (); } void SpectrumInterference::StartRx (Ptr p, Ptr rxPsd) -{ +{ NS_LOG_FUNCTION (this << p << *rxPsd); m_rxSignal = rxPsd; m_lastChangeTime = Now (); @@ -89,7 +89,7 @@ SpectrumInterference::AddSignal (Ptr spd, const Time durati void SpectrumInterference::DoAddSignal (Ptr spd) -{ +{ NS_LOG_FUNCTION (this << *spd); ConditionallyEvaluateChunk (); (*m_allSignals) += (*spd); @@ -98,7 +98,7 @@ SpectrumInterference::DoAddSignal (Ptr spd) void SpectrumInterference::DoSubtractSignal (Ptr spd) -{ +{ NS_LOG_FUNCTION (this << *spd); ConditionallyEvaluateChunk (); (*m_allSignals) -= (*spd); diff --git a/src/spectrum/model/spectrum-interference.h b/src/spectrum/model/spectrum-interference.h index 68593f3cd..36c07f526 100644 --- a/src/spectrum/model/spectrum-interference.h +++ b/src/spectrum/model/spectrum-interference.h @@ -37,6 +37,8 @@ class SpectrumErrorModel; /** + * \ingroup spectrum + * * This class implements a gaussian interference model, i.e., all * incoming signals are added to the total interference. * @@ -97,7 +99,6 @@ public: protected: - void DoDispose (); private: diff --git a/src/spectrum/model/spectrum-model.h b/src/spectrum/model/spectrum-model.h index 3f033997d..56188599f 100644 --- a/src/spectrum/model/spectrum-model.h +++ b/src/spectrum/model/spectrum-model.h @@ -26,9 +26,14 @@ namespace ns3 { - +/** + * \defgroup spectrum Spectrum Models + * + */ /** + * \ingroup spectrum + * * The building block of a SpectrumModel. This struct models * a frequency band defined by the frequency interval [fl, fc] and * with center frequency fc. Typically, the center frequency will be diff --git a/src/spectrum/model/spectrum-phy.cc b/src/spectrum/model/spectrum-phy.cc index b146e19ee..644e4b2f8 100644 --- a/src/spectrum/model/spectrum-phy.cc +++ b/src/spectrum/model/spectrum-phy.cc @@ -33,16 +33,16 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (SpectrumPhy); -TypeId +TypeId SpectrumPhy::GetTypeId (void) { static TypeId tid = TypeId ("ns3::SpectrumPhy") .SetParent () - ; + ; return tid; } - + SpectrumPhy::~SpectrumPhy () { NS_LOG_FUNCTION (this); diff --git a/src/spectrum/model/spectrum-phy.h b/src/spectrum/model/spectrum-phy.h index 28f38f32e..c39010bf0 100644 --- a/src/spectrum/model/spectrum-phy.h +++ b/src/spectrum/model/spectrum-phy.h @@ -36,6 +36,8 @@ class SpectrumModel; class NetDevice; /** + * \ingroup spectrum + * * Abstract base class for Spectrum-aware PHY layers * */ @@ -43,11 +45,9 @@ class SpectrumPhy : public Object { public: - - virtual ~SpectrumPhy (); - - static TypeId GetTypeId (void); + + static TypeId GetTypeId (void); /** * set the associated NetDevice instance @@ -85,8 +85,8 @@ public: */ virtual void SetChannel (Ptr c) = 0; - /** - * + /** + * * @return returns the SpectrumModel that this SpectrumPhy expects to be used * for all SpectrumValues that are passed to StartRx. If 0 is * returned, it means that any model will be accepted. @@ -103,7 +103,7 @@ public: * @param duration the duration of the incoming waveform */ virtual void StartRx (Ptr p, Ptr rxPsd, SpectrumType st, Time duration) = 0; - + }; @@ -115,7 +115,7 @@ public: -} // namespace ns3 +} // namespace ns3 diff --git a/src/spectrum/model/spectrum-propagation-loss-model.h b/src/spectrum/model/spectrum-propagation-loss-model.h index 4729a8d9b..e285d5eaa 100644 --- a/src/spectrum/model/spectrum-propagation-loss-model.h +++ b/src/spectrum/model/spectrum-propagation-loss-model.h @@ -32,6 +32,8 @@ namespace ns3 { /** + * \ingroup spectrum + * * \brief spectrum-aware propagation loss model * * Interface for propagation loss models to be adopted when @@ -75,7 +77,7 @@ public: protected: virtual void DoDispose (); - + private: /** diff --git a/src/spectrum/model/spectrum-type.h b/src/spectrum/model/spectrum-type.h index 16130ff37..841676bf7 100644 --- a/src/spectrum/model/spectrum-type.h +++ b/src/spectrum/model/spectrum-type.h @@ -31,6 +31,8 @@ namespace ns3 { /** + * \ingroup spectrum + * * This class represent a type of signal that can be transmitted by * SpectrumPhy instances over a SpectrumChannel. By means of this * class a SpectrumPhy is able to recognize which type of signals it @@ -62,6 +64,10 @@ std::ostream& operator<< (std::ostream& os, const SpectrumType& rhs); +/** + * \ingroup spectrum + * + */ class SpectrumTypeFactory { diff --git a/src/spectrum/model/spectrum-value.cc b/src/spectrum/model/spectrum-value.cc index b388f8729..7273dd1ff 100644 --- a/src/spectrum/model/spectrum-value.cc +++ b/src/spectrum/model/spectrum-value.cc @@ -33,7 +33,7 @@ namespace ns3 { SpectrumValue::SpectrumValue () : m_values (0) -{ +{ } SpectrumValue::SpectrumValue (Ptr sof) diff --git a/src/spectrum/model/spectrum-value.h b/src/spectrum/model/spectrum-value.h index 5c88e8246..9f19bff07 100644 --- a/src/spectrum/model/spectrum-value.h +++ b/src/spectrum/model/spectrum-value.h @@ -33,6 +33,8 @@ namespace ns3 { typedef std::vector Values; /** + * \ingroup spectrum + * * \brief Set of values corresponding to a given SpectrumModel * * This class implements a Function Space which can represent any @@ -76,7 +78,7 @@ public: SpectrumValue (); - + /** * Access value at given frequency index diff --git a/src/spectrum/model/waveform-generator.cc b/src/spectrum/model/waveform-generator.cc index 90eaf16c8..dcc5443c1 100644 --- a/src/spectrum/model/waveform-generator.cc +++ b/src/spectrum/model/waveform-generator.cc @@ -83,7 +83,7 @@ WaveformGenerator::GetTypeId (void) .AddTraceSource ("TxEnd", "Trace fired when a previosuly started transmission is finished", MakeTraceSourceAccessor (&WaveformGenerator::m_phyTxEndTrace)) - ; + ; return tid; } @@ -103,7 +103,7 @@ WaveformGenerator::GetMobility () } -Ptr +Ptr WaveformGenerator::GetRxSpectrumModel () const { // this device is not interested in RX @@ -190,11 +190,11 @@ WaveformGenerator::GenerateWaveform () Ptr pb = Create (); Time duration = Time (m_period * m_dutyCycle); - + NS_LOG_LOGIC ("generating waveform : " << *m_txPowerSpectralDensity); m_phyTxStartTrace (0); m_channel->StartTx (pb, m_txPowerSpectralDensity, GetSpectrumType (), duration, GetObject ()); - + if (m_active) { NS_LOG_LOGIC ("scheduling next waveform"); @@ -220,7 +220,7 @@ WaveformGenerator::Start () void WaveformGenerator::Stop () { - NS_LOG_FUNCTION (this); + NS_LOG_FUNCTION (this); m_active = false; } diff --git a/src/spectrum/model/waveform-generator.h b/src/spectrum/model/waveform-generator.h index b4fb8fc97..3e4f2c73f 100644 --- a/src/spectrum/model/waveform-generator.h +++ b/src/spectrum/model/waveform-generator.h @@ -37,6 +37,8 @@ namespace ns3 { /** + * \ingroup spectrum + * * Simple SpectrumPhy implementation that sends customizable waveform. * The generated waveforms have a given Spectrum Power Density and * duration (set with the SetResolution()) . The generator activates @@ -59,7 +61,7 @@ public: Ptr GetMobility (); Ptr GetDevice (); Ptr GetRxSpectrumModel () const; - void StartRx (Ptr p, Ptr rxPsd, SpectrumType st, Time duration); + void StartRx (Ptr p, Ptr rxPsd, SpectrumType st, Time duration); /** @@ -88,21 +90,21 @@ public: void SetPeriod (Time period); - /** - * + /** + * * @return the value of the period according to which the WaveformGenerator switches * on and off */ Time GetPeriod () const; - - /** - * + + /** + * * @param value the value of the duty cycle */ void SetDutyCycle (double value); - /** + /** * * @return the value of the duty cycle */ @@ -125,7 +127,6 @@ public: private: - virtual void DoDispose (void); Ptr m_mobility; diff --git a/src/spectrum/model/wifi-spectrum-value-helper.cc b/src/spectrum/model/wifi-spectrum-value-helper.cc index 1768b6185..a4e3267f4 100644 --- a/src/spectrum/model/wifi-spectrum-value-helper.cc +++ b/src/spectrum/model/wifi-spectrum-value-helper.cc @@ -23,7 +23,7 @@ namespace ns3 { - + Ptr g_WifiSpectrumModel5Mhz; WifiSpectrumValueHelper::~WifiSpectrumValueHelper () @@ -40,12 +40,12 @@ public: WifiSpectrumModel5MhzInitializer () { Bands bands; - for (int i = -4; i < 13+7; i++) + for (int i = -4; i < 13 + 7; i++) { BandInfo bi; bi.fl = 2407.0e6 + i * 5.0e6; - bi.fh = 2407.0e6 + (i+1) * 5.0e6; - bi.fc = (bi.fl + bi.fh)/2; + bi.fh = 2407.0e6 + (i + 1) * 5.0e6; + bi.fc = (bi.fl + bi.fh) / 2; bands.push_back (bi); } g_WifiSpectrumModel5Mhz = Create (bands); @@ -54,18 +54,18 @@ public: -Ptr +Ptr WifiSpectrumValue5MhzFactory::CreateConstant (double v) -{ +{ Ptr c = Create (g_WifiSpectrumModel5Mhz); (*c) = v; return c; } -Ptr +Ptr WifiSpectrumValue5MhzFactory::CreateTxPowerSpectralDensity (double txPower, uint32_t channel) -{ +{ Ptr txPsd = Create (g_WifiSpectrumModel5Mhz); // since the spectrum model has a resolution of 5 MHz, we model @@ -75,10 +75,10 @@ WifiSpectrumValue5MhzFactory::CreateTxPowerSpectralDensity (double txPower, uint // calculated considering the transmit spectrum mask, see IEEE // Std. 802.11-2007, Annex I - double txPowerDensity = txPower / 20e6; + double txPowerDensity = txPower / 20e6; - NS_ASSERT(channel >= 1); - NS_ASSERT(channel <= 13); + NS_ASSERT (channel >= 1); + NS_ASSERT (channel <= 13); (*txPsd)[channel - 1] = txPowerDensity * 1e-4; // -40dB (*txPsd)[channel] = txPowerDensity * 1e-4; // -40dB @@ -97,13 +97,13 @@ WifiSpectrumValue5MhzFactory::CreateTxPowerSpectralDensity (double txPower, uint } -Ptr +Ptr WifiSpectrumValue5MhzFactory::CreateRfFilter (uint32_t channel) -{ +{ Ptr rf = Create (g_WifiSpectrumModel5Mhz); - NS_ASSERT(channel >= 1); - NS_ASSERT(channel <= 13); + NS_ASSERT (channel >= 1); + NS_ASSERT (channel <= 13); (*rf)[channel - 1] = 1; (*rf)[channel ] = 1; diff --git a/src/spectrum/model/wifi-spectrum-value-helper.h b/src/spectrum/model/wifi-spectrum-value-helper.h index 51cd0e4dd..f7a649ab4 100644 --- a/src/spectrum/model/wifi-spectrum-value-helper.h +++ b/src/spectrum/model/wifi-spectrum-value-helper.h @@ -28,18 +28,20 @@ namespace ns3 { -/** +/** + * \ingroup spectrum + * * this abstract class defines the interface for interacting with all WifiSpectrumValue implementations. * */ -class WifiSpectrumValueHelper +class WifiSpectrumValueHelper { public: virtual ~WifiSpectrumValueHelper (); /* * * @param value the constant value - * + * * @return a Ptr to a newly created SpectrumValue instance which * has a constant value for all frequencies */ @@ -48,8 +50,8 @@ public: /* * * @param txPower the total TX power in W - * @param channel the number of the channel - * + * @param channel the number of the channel + * * @return a Ptr to a newly created SpectrumValue instance which * represents the TX Power Spectral Density of a wifi device * corresponding to the provided parameters @@ -58,19 +60,21 @@ public: /* * - * @param channel the number of the channel - * + * @param channel the number of the channel + * * @return a Ptr to a newly created SpectrumValue instance which * represents the frequency response of the RF filter which is used * by a wifi device to receive signals when tuned to a particular channel */ virtual Ptr CreateRfFilter (uint32_t channel) = 0; - + }; -/** +/** + * \ingroup spectrum + * * Implements WifiSpectrumValue for the 2.4 GHz ISM band only, with a * 5 MHz spectrum resolution. * @@ -87,7 +91,7 @@ public: }; - + } //namespace ns3 diff --git a/src/spectrum/test/spectrum-interference-test.cc b/src/spectrum/test/spectrum-interference-test.cc index b12c6d6ce..7d592c74f 100644 --- a/src/spectrum/test/spectrum-interference-test.cc +++ b/src/spectrum/test/spectrum-interference-test.cc @@ -175,7 +175,7 @@ SpectrumInterferenceTestSuite::SpectrumInterferenceTestSuite () AddTestCase (new SpectrumInterferenceTestCase (s1, static_cast (b * 0.5 + 0.5), true, "sdBm = [-46 -48] tx bytes: b*0.5")); AddTestCase (new SpectrumInterferenceTestCase (s1, static_cast (b * (1 - e) + 0.5), true, "sdBm = [-46 -48] tx bytes: b*(1-e)")); AddTestCase (new SpectrumInterferenceTestCase (s1, static_cast (b * (1 + e) + 0.5), false, "sdBm = [-46 -48] tx bytes: b*(1+e)")); - AddTestCase (new SpectrumInterferenceTestCase (s1, static_cast(b * 1.5 + 0.5), false, "sdBm = [-46 -48] tx bytes: b*1.5")); + AddTestCase (new SpectrumInterferenceTestCase (s1, static_cast (b * 1.5 + 0.5), false, "sdBm = [-46 -48] tx bytes: b*1.5")); AddTestCase (new SpectrumInterferenceTestCase (s1, 0xffffffff, false, "sdBm = [-46 -48] tx bytes: 2^32-1")); // Power Spectral Density of the signal of interest = [-63 -61] dBm; diff --git a/src/spectrum/test/spectrum-test.h b/src/spectrum/test/spectrum-test.h index aab736c0b..d2033b8da 100644 --- a/src/spectrum/test/spectrum-test.h +++ b/src/spectrum/test/spectrum-test.h @@ -17,99 +17,99 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author: Nicola Baldo - * part of the code copied from test.h + * part of the code copied from test.h */ #include #include -/** +/** * \brief Test if two SpectrumModel instances are equal within a given tolerance. * * This test compares component-by-component the two SpectrumModel * instances; if any pair of components differs by more than the given - * tolerance, the test fails. - * + * tolerance, the test fails. + * * \param actual the actual value obtained by the simulator * \param expected the expected value obtained by off-line calculations * \param tol the tolerance * \param msg the message to print if the test fails - * + * */ #define NS_TEST_ASSERT_MSG_SPECTRUM_MODEL_EQ_TOL(actual, expected, tol, msg) \ - NS_TEST_ASSERT_MSG_SPECTRUM_MODEL_EQ_TOL_INTERNAL(actual, expected, tol, msg, __FILE__, __LINE__) + NS_TEST_ASSERT_MSG_SPECTRUM_MODEL_EQ_TOL_INTERNAL (actual, expected, tol, msg, __FILE__, __LINE__) /** * \internal */ #define NS_TEST_ASSERT_MSG_SPECTRUM_MODEL_EQ_TOL_INTERNAL(actual, expected, tol, msg, file, line) \ - do \ - { \ - Bands::const_iterator i = (actual).Begin (); \ - Bands::const_iterator j = (expected).Begin (); \ + do \ + { \ + Bands::const_iterator i = (actual).Begin (); \ + Bands::const_iterator j = (expected).Begin (); \ uint32_t k = 0; \ - while (i != (actual).End () && j != (expected).End ()) \ + while (i != (actual).End () && j != (expected).End ()) \ { \ - if ((i->fl > j->fl + (tol)) || (i->fl < j->fl - (tol)) || \ - (i->fc > j->fc + (tol)) || (i->fc < j->fc - (tol)) || \ - (i->fh > j->fh + (tol)) || (i->fh < j->fh - (tol))) \ + if ((i->fl > j->fl + (tol)) || (i->fl < j->fl - (tol)) \ + || (i->fc > j->fc + (tol)) || (i->fc < j->fc - (tol)) \ + || (i->fh > j->fh + (tol)) || (i->fh < j->fh - (tol))) \ { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream indexStream; \ - indexStream << "[" << k << "]"; \ - std::ostringstream msgStream; \ - msgStream << (msg); \ - std::ostringstream actualStream; \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream indexStream; \ + indexStream << "[" << k << "]"; \ + std::ostringstream msgStream; \ + msgStream << (msg); \ + std::ostringstream actualStream; \ actualStream << i->fl << " <-- " << i->fc << " --> " << i->fh; \ - std::ostringstream expectedStream; \ - expectedStream << j->fl << " <-- " << j->fc << " --> " << j->fh; \ - ReportTestFailure (std::string (#actual) + indexStream.str () + " == " + std::string (#expected) + indexStream.str (), \ + std::ostringstream expectedStream; \ + expectedStream << j->fl << " <-- " << j->fc << " --> " << j->fh; \ + ReportTestFailure (std::string (# actual) + indexStream.str () + " == " + std::string (# expected) + indexStream.str (), \ actualStream.str (), expectedStream.str (), msgStream.str (), (file), (line)); \ - } \ - ++i; \ - ++j; \ - ++k; \ - } \ + } \ + ++i; \ + ++j; \ + ++k; \ + } \ if (i != (actual).End () || j != (expected).End ()) \ - { \ - std::ostringstream msgStream; \ - msgStream << (msg); \ - std::ostringstream actualStream; \ - actualStream << (i != (actual).End ()); \ - std::ostringstream expectedStream; \ - expectedStream << (j != (expected).End ()); \ - ReportTestFailure ("Bands::iterator == End ()" , \ - actualStream.str (), expectedStream.str (), msgStream.str (), (file), (line)); \ - } \ - } \ + { \ + std::ostringstream msgStream; \ + msgStream << (msg); \ + std::ostringstream actualStream; \ + actualStream << (i != (actual).End ()); \ + std::ostringstream expectedStream; \ + expectedStream << (j != (expected).End ()); \ + ReportTestFailure ("Bands::iterator == End ()", \ + actualStream.str (), expectedStream.str (), msgStream.str (), (file), (line)); \ + } \ + } \ while (false); \ -/** +/** * \brief Test if two SpectrumValue instances are equal within a given tolerance. * * This test compares component-by-component the two SpectrumValue * instances; if any pair of components differs by more than the given - * tolerance, the test fails. - * + * tolerance, the test fails. + * * \param actual the actual value obtained by the simulator * \param expected the expected value obtained by off-line calculations * \param tol the tolerance * \param msg the message to print if the test fails - * + * */ #define NS_TEST_ASSERT_MSG_SPECTRUM_VALUE_EQ_TOL(actual, expected, tol, msg) \ - NS_TEST_ASSERT_MSG_SPECTRUM_VALUE_EQ_TOL_INTERNAL(actual, expected, tol, msg, __FILE__, __LINE__) + NS_TEST_ASSERT_MSG_SPECTRUM_VALUE_EQ_TOL_INTERNAL (actual, expected, tol, msg, __FILE__, __LINE__) /** * \internal */ #define NS_TEST_ASSERT_MSG_SPECTRUM_VALUE_EQ_TOL_INTERNAL(actual, expected, tol, msg, file, line) \ - do \ - { \ + do \ + { \ Values::const_iterator i = (actual).ConstValuesBegin (); \ Values::const_iterator j = (expected).ConstValuesBegin (); \ uint32_t k = 0; \ @@ -117,36 +117,36 @@ { \ if ((*i) > (*j) + (tol) || (*i) < (*j) - (tol)) \ { \ - if (gBreakOnFailure) {*(int *)0 = 0;} \ - std::ostringstream indexStream; \ - indexStream << "[" << k << "]"; \ - std::ostringstream msgStream; \ - msgStream << msg; \ - std::ostringstream actualStream; \ - actualStream << actual; \ - std::ostringstream expectedStream; \ - expectedStream << expected; \ - ReportTestFailure (std::string (#actual) + indexStream.str () + " == " + std::string (#expected) + indexStream.str (), \ - actualStream.str (), expectedStream.str (), msgStream.str (), file, line); \ - } \ - ++i; \ - ++j; \ - ++k; \ - } \ + if (gBreakOnFailure) { *(int *)0 = 0;} \ + std::ostringstream indexStream; \ + indexStream << "[" << k << "]"; \ + std::ostringstream msgStream; \ + msgStream << msg; \ + std::ostringstream actualStream; \ + actualStream << actual; \ + std::ostringstream expectedStream; \ + expectedStream << expected; \ + ReportTestFailure (std::string (# actual) + indexStream.str () + " == " + std::string (# expected) + indexStream.str (), \ + actualStream.str (), expectedStream.str (), msgStream.str (), file, line); \ + } \ + ++i; \ + ++j; \ + ++k; \ + } \ if (i != (actual).ConstValuesEnd () || j != (expected).ConstValuesEnd ()) \ - { \ - std::ostringstream msgStream; \ - msgStream << (msg); \ - std::ostringstream actualStream; \ - actualStream << (i != (actual).ConstValuesEnd ()); \ - std::ostringstream expectedStream; \ - expectedStream << (j != (expected).ConstValuesEnd ()); \ - ReportTestFailure ("Values::const_iterator == ConstValuesEnd ()" , \ - actualStream.str (), expectedStream.str (), msgStream.str (), (file), (line)); \ - } \ - } \ + { \ + std::ostringstream msgStream; \ + msgStream << (msg); \ + std::ostringstream actualStream; \ + actualStream << (i != (actual).ConstValuesEnd ()); \ + std::ostringstream expectedStream; \ + expectedStream << (j != (expected).ConstValuesEnd ()); \ + ReportTestFailure ("Values::const_iterator == ConstValuesEnd ()", \ + actualStream.str (), expectedStream.str (), msgStream.str (), (file), (line)); \ + } \ + } \ while (false); \ - + diff --git a/doc/manual/source/statistics.rst b/src/stats/doc/statistics.rst similarity index 90% rename from doc/manual/source/statistics.rst rename to src/stats/doc/statistics.rst index dcfc69cf5..4441cc3f2 100644 --- a/doc/manual/source/statistics.rst +++ b/src/stats/doc/statistics.rst @@ -8,4 +8,4 @@ Statistics This wiki page: `This wiki page `_ contains information about the proposed statistical framework that is located in -``src/contrib`` directory. +``src/stats`` directory. diff --git a/src/stats/model/basic-data-calculators.h b/src/stats/model/basic-data-calculators.h index 4fa8f1b1c..09c2e63a3 100644 --- a/src/stats/model/basic-data-calculators.h +++ b/src/stats/model/basic-data-calculators.h @@ -26,65 +26,70 @@ namespace ns3 { - //------------------------------------------------------------ - //-------------------------------------------- - template - class MinMaxAvgTotalCalculator : public DataCalculator, - public StatisticalSummary { - public: - MinMaxAvgTotalCalculator(); - virtual ~MinMaxAvgTotalCalculator(); +/** + * \defgroup stats Statistics + * + */ - void Update(const T i); +//------------------------------------------------------------ +//-------------------------------------------- +template +class MinMaxAvgTotalCalculator : public DataCalculator, + public StatisticalSummary { +public: + MinMaxAvgTotalCalculator(); + virtual ~MinMaxAvgTotalCalculator(); - virtual void Output(DataOutputCallback &callback) const; + void Update(const T i); - long getCount() const { return m_count; } - double getSum() const { return m_total; } - double getMin() const { return m_min; } - double getMax() const { return m_max; } - double getMean() const { return m_total / (double)m_count; } + virtual void Output(DataOutputCallback &callback) const; + + long getCount() const { return m_count; } + double getSum() const { return m_total; } + double getMin() const { return m_min; } + double getMax() const { return m_max; } + double getMean() const { return m_total / (double)m_count; } double getStddev() const { return sqrt (getVariance ()); } double getVariance() const { return ( m_count * m_totalSquare - m_total * m_total ) / (double) (m_count * (m_count - 1) ); } double getSqrSum() const { return m_totalSquare; } - protected: - virtual void DoDispose(void); +protected: + virtual void DoDispose(void); - uint32_t m_count; + uint32_t m_count; T m_total, m_min, m_max, m_totalSquare; - // end MinMaxAvgTotalCalculator - }; + // end MinMaxAvgTotalCalculator +}; - //---------------------------------------------- - template - MinMaxAvgTotalCalculator::MinMaxAvgTotalCalculator() - { - m_count = 0; - m_total = 0; +//---------------------------------------------- +template +MinMaxAvgTotalCalculator::MinMaxAvgTotalCalculator() +{ + m_count = 0; + m_total = 0; m_totalSquare = 0; - m_min = ~0; - m_max = 0; - } + m_min = ~0; + m_max = 0; +} - template - MinMaxAvgTotalCalculator::~MinMaxAvgTotalCalculator() - { - } - template - void - MinMaxAvgTotalCalculator::DoDispose(void) - { - DataCalculator::DoDispose(); - // MinMaxAvgTotalCalculator::DoDispose - } +template +MinMaxAvgTotalCalculator::~MinMaxAvgTotalCalculator() +{ +} +template +void +MinMaxAvgTotalCalculator::DoDispose(void) +{ + DataCalculator::DoDispose(); + // MinMaxAvgTotalCalculator::DoDispose +} - template - void - MinMaxAvgTotalCalculator::Update(const T i) - { - if (m_enabled) { +template +void +MinMaxAvgTotalCalculator::Update(const T i) +{ + if (m_enabled) { m_total += i; m_totalSquare += i*i; @@ -96,97 +101,101 @@ namespace ns3 { m_count++; } - // end MinMaxAvgTotalCalculator::Update - } + // end MinMaxAvgTotalCalculator::Update +} - template - void - MinMaxAvgTotalCalculator::Output(DataOutputCallback &callback) const - { - callback.OutputStatistic(m_context, m_key, this); - } +template +void +MinMaxAvgTotalCalculator::Output(DataOutputCallback &callback) const +{ + callback.OutputStatistic(m_context, m_key, this); +} - //------------------------------------------------------------ - //-------------------------------------------- - template - class CounterCalculator : public DataCalculator { - public: - CounterCalculator(); - virtual ~CounterCalculator(); +/** + * \ingroup stats + * + */ +//------------------------------------------------------------ +//-------------------------------------------- +template +class CounterCalculator : public DataCalculator { +public: + CounterCalculator(); + virtual ~CounterCalculator(); - void Update(); - void Update(const T i); + void Update(); + void Update(const T i); - T GetCount() const; + T GetCount() const; - virtual void Output(DataOutputCallback &callback) const; + virtual void Output(DataOutputCallback &callback) const; - protected: - virtual void DoDispose(void); +protected: + virtual void DoDispose(void); - T m_count; + T m_count; - // end CounterCalculator - }; + // end CounterCalculator +}; - //-------------------------------------------- - template - CounterCalculator::CounterCalculator() : - m_count(0) - { - } +//-------------------------------------------- +template +CounterCalculator::CounterCalculator() : + m_count(0) +{ +} - template - CounterCalculator::~CounterCalculator() - { - } - template - void - CounterCalculator::DoDispose(void) - { - DataCalculator::DoDispose(); - // CounterCalculator::DoDispose - } +template +CounterCalculator::~CounterCalculator() +{ +} +template +void +CounterCalculator::DoDispose(void) +{ + DataCalculator::DoDispose(); + // CounterCalculator::DoDispose +} - template - void - CounterCalculator::Update() - { - if (m_enabled) { +template +void +CounterCalculator::Update() +{ + if (m_enabled) { m_count++; } - // end CounterCalculator::Update - } + // end CounterCalculator::Update +} - template - void - CounterCalculator::Update(const T i) - { - if (m_enabled) { +template +void +CounterCalculator::Update(const T i) +{ + if (m_enabled) { m_count += i; } - // end CounterCalculator::Update - } + // end CounterCalculator::Update +} - template - T - CounterCalculator::GetCount() const - { - return m_count; - // end CounterCalculator::GetCount - } +template +T +CounterCalculator::GetCount() const +{ + return m_count; + // end CounterCalculator::GetCount +} - template - void - CounterCalculator::Output(DataOutputCallback &callback) const - { - callback.OutputSingleton(m_context, m_key, m_count); - // end CounterCalculator::Output - } +template +void +CounterCalculator::Output(DataOutputCallback &callback) const +{ + callback.OutputSingleton(m_context, m_key, m_count); + // end CounterCalculator::Output +} - // end namespace ns3 +// end namespace ns3 }; diff --git a/src/stats/model/data-calculator.h b/src/stats/model/data-calculator.h index 688832eaf..d064ee095 100644 --- a/src/stats/model/data-calculator.h +++ b/src/stats/model/data-calculator.h @@ -26,101 +26,101 @@ #include "ns3/simulator.h" namespace ns3 { - extern const double NaN; - inline bool isNaN(double x) { return x != x; } +extern const double NaN; +inline bool isNaN(double x) { return x != x; } - class DataOutputCallback; +class DataOutputCallback; - class StatisticalSummary { - public: - /** - * Destructor - */ - virtual ~StatisticalSummary () - { - } - /** - * Returns the number of the observations. - */ - virtual long getCount() const = 0; +class StatisticalSummary { +public: + /** + * Destructor + */ + virtual ~StatisticalSummary () + { + } + /** + * Returns the number of the observations. + */ + virtual long getCount() const = 0; - /** - * Returns the sum of the values. - * @see getWeightedSum() - */ - virtual double getSum() const = 0; + /** + * Returns the sum of the values. + * @see getWeightedSum() + */ + virtual double getSum() const = 0; - /** - * Returns the sum of the squared values. - * @see getWeightedSqrSum() - */ - virtual double getSqrSum() const = 0; + /** + * Returns the sum of the squared values. + * @see getWeightedSqrSum() + */ + virtual double getSqrSum() const = 0; - /** - * Returns the minimum of the values. - */ - virtual double getMin() const = 0; + /** + * Returns the minimum of the values. + */ + virtual double getMin() const = 0; - /** - * Returns the maximum of the values. - */ - virtual double getMax() const = 0; + /** + * Returns the maximum of the values. + */ + virtual double getMax() const = 0; - /** - * Returns the mean of the (weighted) observations. - */ - virtual double getMean() const = 0; + /** + * Returns the mean of the (weighted) observations. + */ + virtual double getMean() const = 0; - /** - * Returns the standard deviation of the (weighted) observations. - */ - virtual double getStddev() const = 0; + /** + * Returns the standard deviation of the (weighted) observations. + */ + virtual double getStddev() const = 0; - /** - * Returns the variance of the (weighted) observations. - */ - virtual double getVariance() const = 0; - }; + /** + * Returns the variance of the (weighted) observations. + */ + virtual double getVariance() const = 0; +}; - //------------------------------------------------------------ - //-------------------------------------------- - class DataCalculator : public Object { - public: - DataCalculator(); - virtual ~DataCalculator(); +//------------------------------------------------------------ +//-------------------------------------------- +class DataCalculator : public Object { +public: + DataCalculator(); + virtual ~DataCalculator(); - bool GetEnabled() const; - void Enable(); - void Disable(); + bool GetEnabled() const; + void Enable(); + void Disable(); - void SetKey(const std::string key); - std::string GetKey() const; + void SetKey(const std::string key); + std::string GetKey() const; - void SetContext(const std::string context); - std::string GetContext() const; + void SetContext(const std::string context); + std::string GetContext() const; - virtual void Start(const Time& startTime); - virtual void Stop(const Time& stopTime); + virtual void Start(const Time& startTime); + virtual void Stop(const Time& stopTime); - virtual void Output(DataOutputCallback &callback) const = 0; + virtual void Output(DataOutputCallback &callback) const = 0; - protected: - bool m_enabled; // Descendant classes *must* check & respect m_enabled! +protected: + bool m_enabled; // Descendant classes *must* check & respect m_enabled! - std::string m_key; - std::string m_context; + std::string m_key; + std::string m_context; - virtual void DoDispose(void); + virtual void DoDispose(void); - private: - EventId m_startEvent; - EventId m_stopEvent; +private: + EventId m_startEvent; + EventId m_stopEvent; - // end class DataCalculator - }; + // end class DataCalculator +}; - // end namespace ns3 +// end namespace ns3 }; diff --git a/src/stats/model/data-collector.h b/src/stats/model/data-collector.h index ec46d02a3..58640e28a 100644 --- a/src/stats/model/data-collector.h +++ b/src/stats/model/data-collector.h @@ -28,57 +28,65 @@ namespace ns3 { - class DataCalculator; +/** + * \ingroup stats + * + */ +class DataCalculator; - //------------------------------------------------------------ - //-------------------------------------------- - typedef std::list > DataCalculatorList; - typedef std::list > MetadataList; +//------------------------------------------------------------ +//-------------------------------------------- +typedef std::list > DataCalculatorList; +typedef std::list > MetadataList; - class DataCollector : public Object { - public: - DataCollector(); - virtual ~DataCollector(); +/** + * \ingroup stats + * + */ +class DataCollector : public Object { +public: + DataCollector(); + virtual ~DataCollector(); - void DescribeRun(std::string experiment, - std::string strategy, - std::string input, - std::string runID, - std::string description = ""); + void DescribeRun(std::string experiment, + std::string strategy, + std::string input, + std::string runID, + std::string description = ""); - std::string GetExperimentLabel() const { return m_experimentLabel; } - std::string GetStrategyLabel() const { return m_strategyLabel; } - std::string GetInputLabel() const { return m_inputLabel; } - std::string GetRunLabel() const { return m_runLabel; } - std::string GetDescription() const { return m_description; } + std::string GetExperimentLabel() const { return m_experimentLabel; } + std::string GetStrategyLabel() const { return m_strategyLabel; } + std::string GetInputLabel() const { return m_inputLabel; } + std::string GetRunLabel() const { return m_runLabel; } + std::string GetDescription() const { return m_description; } - void AddMetadata(std::string key, std::string value); - void AddMetadata(std::string key, double value); - void AddMetadata(std::string key, uint32_t value); - MetadataList::iterator MetadataBegin(); - MetadataList::iterator MetadataEnd(); + void AddMetadata(std::string key, std::string value); + void AddMetadata(std::string key, double value); + void AddMetadata(std::string key, uint32_t value); + MetadataList::iterator MetadataBegin(); + MetadataList::iterator MetadataEnd(); - void AddDataCalculator(Ptr datac); - DataCalculatorList::iterator DataCalculatorBegin(); - DataCalculatorList::iterator DataCalculatorEnd(); + void AddDataCalculator(Ptr datac); + DataCalculatorList::iterator DataCalculatorBegin(); + DataCalculatorList::iterator DataCalculatorEnd(); - protected: - virtual void DoDispose(); +protected: + virtual void DoDispose(); - private: - std::string m_experimentLabel; - std::string m_strategyLabel; - std::string m_inputLabel; - std::string m_runLabel; - std::string m_description; +private: + std::string m_experimentLabel; + std::string m_strategyLabel; + std::string m_inputLabel; + std::string m_runLabel; + std::string m_description; - MetadataList m_metadata; - DataCalculatorList m_calcList; + MetadataList m_metadata; + DataCalculatorList m_calcList; - // end class DataCollector - }; + // end class DataCollector +}; - // end namespace ns3 +// end namespace ns3 }; #endif // __DATA_COLLECTOR_H__ diff --git a/src/stats/model/data-output-interface.h b/src/stats/model/data-output-interface.h index 105c9f4db..109e5c996 100644 --- a/src/stats/model/data-output-interface.h +++ b/src/stats/model/data-output-interface.h @@ -27,59 +27,67 @@ namespace ns3 { - class DataCollector; +class DataCollector; - //------------------------------------------------------------ - //-------------------------------------------- - class DataOutputInterface : public Object { - public: - DataOutputInterface(); - virtual ~DataOutputInterface(); +//------------------------------------------------------------ +//-------------------------------------------- +/** + * \ingroup stats + * + */ +class DataOutputInterface : public Object { +public: + DataOutputInterface(); + virtual ~DataOutputInterface(); - virtual void Output(DataCollector &dc) = 0; + virtual void Output(DataCollector &dc) = 0; - void SetFilePrefix(const std::string prefix); - std::string GetFilePrefix() const; + void SetFilePrefix(const std::string prefix); + std::string GetFilePrefix() const; - protected: - virtual void DoDispose(); +protected: + virtual void DoDispose(); - std::string m_filePrefix; + std::string m_filePrefix; - // end class DataOutputInterface - }; + // end class DataOutputInterface +}; - class DataOutputCallback { - public: - virtual ~DataOutputCallback() {} +/** + * \ingroup stats + * + */ +class DataOutputCallback { +public: + virtual ~DataOutputCallback() {} - virtual void OutputStatistic(std::string key, - std::string variable, - const StatisticalSummary *statSum) = 0; + virtual void OutputStatistic(std::string key, + std::string variable, + const StatisticalSummary *statSum) = 0; - virtual void OutputSingleton(std::string key, - std::string variable, - int val) = 0; + virtual void OutputSingleton(std::string key, + std::string variable, + int val) = 0; - virtual void OutputSingleton(std::string key, - std::string variable, - uint32_t val) = 0; + virtual void OutputSingleton(std::string key, + std::string variable, + uint32_t val) = 0; - virtual void OutputSingleton(std::string key, - std::string variable, - double val) = 0; + virtual void OutputSingleton(std::string key, + std::string variable, + double val) = 0; - virtual void OutputSingleton(std::string key, - std::string variable, - std::string val) = 0; + virtual void OutputSingleton(std::string key, + std::string variable, + std::string val) = 0; - virtual void OutputSingleton(std::string key, - std::string variable, - Time val) = 0; - // end class DataOutputCallback - }; + virtual void OutputSingleton(std::string key, + std::string variable, + Time val) = 0; + // end class DataOutputCallback +}; - // end namespace ns3 +// end namespace ns3 }; diff --git a/src/stats/model/omnet-data-output.cc b/src/stats/model/omnet-data-output.cc index d012d54d7..6b14b52ee 100644 --- a/src/stats/model/omnet-data-output.cc +++ b/src/stats/model/omnet-data-output.cc @@ -57,10 +57,29 @@ OmnetDataOutput::DoDispose() //---------------------------------------------- inline bool isNumeric(const std::string& s) { - char *endp; - double unused = strtod(s.c_str(), &endp); // declared with warn_unused_result - unused = unused; // quiet compiler - return endp == s.c_str() + s.size(); + bool decimalPtSeen = false; + bool exponentSeen = false; + char last = '\0'; + + for (std::string::const_iterator it = s.begin (); it != s.end (); it++) + { + if ((*it == '.') && (decimalPtSeen)) + return false; + else if (*it == '.') + decimalPtSeen = true; + else if ((*it == 'e') && exponentSeen) + return false; + else if (*it == 'e') + { + exponentSeen = true; + decimalPtSeen = false; + } + else if (*it == '-' && it != s.begin () && last != 'e') + return false; + + last = *it; + } + return true; } void @@ -74,40 +93,40 @@ OmnetDataOutput::Output(DataCollector &dc) // TODO add timestamp to the runlevel scalarFile << "run " << dc.GetRunLabel() << std::endl; scalarFile << "attr experiment \"" << dc.GetExperimentLabel() - << "\"" << std::endl; + << "\"" << std::endl; scalarFile << "attr strategy \"" << dc.GetStrategyLabel() - << "\"" << std::endl; + << "\"" << std::endl; scalarFile << "attr measurement \"" << dc.GetInputLabel() - << "\"" << std::endl; + << "\"" << std::endl; scalarFile << "attr description \"" << dc.GetDescription() - << "\"" << std::endl; + << "\"" << std::endl; for (MetadataList::iterator i = dc.MetadataBegin(); i != dc.MetadataEnd(); i++) { - std::pair blob = (*i); - scalarFile << "attr \"" << blob.first << "\" \"" << blob.second << "\"" - << std::endl; - } + std::pair blob = (*i); + scalarFile << "attr \"" << blob.first << "\" \"" << blob.second << "\"" + << std::endl; + } scalarFile << std::endl; if (isNumeric(dc.GetInputLabel())) { - scalarFile << "scalar . measurement \"" << dc.GetInputLabel() - << "\"" << std::endl; - } + scalarFile << "scalar . measurement \"" << dc.GetInputLabel() + << "\"" << std::endl; + } for (MetadataList::iterator i = dc.MetadataBegin(); i != dc.MetadataEnd(); i++) { - std::pair blob = (*i); - if (isNumeric(blob.second)) { - scalarFile << "scalar . \"" << blob.first << "\" \"" << blob.second << "\"" - << std::endl; + std::pair blob = (*i); + if (isNumeric(blob.second)) { + scalarFile << "scalar . \"" << blob.first << "\" \"" << blob.second << "\"" + << std::endl; + } } - } OmnetOutputCallback callback(&scalarFile); for (DataCalculatorList::iterator i = dc.DataCalculatorBegin(); i != dc.DataCalculatorEnd(); i++) { - (*i)->Output(callback); - } + (*i)->Output(callback); + } scalarFile << std::endl << std::endl; scalarFile.close(); @@ -117,7 +136,7 @@ OmnetDataOutput::Output(DataCollector &dc) OmnetDataOutput::OmnetOutputCallback::OmnetOutputCallback - (std::ostream *scalar) : + (std::ostream *scalar) : m_scalar(scalar) { } @@ -127,25 +146,25 @@ OmnetDataOutput::OmnetOutputCallback::OutputStatistic(std::string context, std::string name, const StatisticalSummary *statSum) { - if (context == "") - context = "."; - if (name == "") - name = "\"\""; - (*m_scalar) << "statistic " << context << " " << name << std::endl; - if (!isNaN(statSum->getCount())) - (*m_scalar) << "field count " << statSum->getCount() << std::endl; - if (!isNaN(statSum->getSum())) - (*m_scalar) << "field sum " << statSum->getSum() << std::endl; - if (!isNaN(statSum->getMean())) - (*m_scalar) << "field mean " << statSum->getMean() << std::endl; - if (!isNaN(statSum->getMin())) - (*m_scalar) << "field min " << statSum->getMin() << std::endl; - if (!isNaN(statSum->getMax())) - (*m_scalar) << "field max " << statSum->getMax() << std::endl; - if (!isNaN(statSum->getSqrSum())) - (*m_scalar) << "field sqrsum " << statSum->getSqrSum() << std::endl; - if (!isNaN(statSum->getStddev())) - (*m_scalar) << "field stddev " << statSum->getStddev() << std::endl; + if (context == "") + context = "."; + if (name == "") + name = "\"\""; + (*m_scalar) << "statistic " << context << " " << name << std::endl; + if (!isNaN(statSum->getCount())) + (*m_scalar) << "field count " << statSum->getCount() << std::endl; + if (!isNaN(statSum->getSum())) + (*m_scalar) << "field sum " << statSum->getSum() << std::endl; + if (!isNaN(statSum->getMean())) + (*m_scalar) << "field mean " << statSum->getMean() << std::endl; + if (!isNaN(statSum->getMin())) + (*m_scalar) << "field min " << statSum->getMin() << std::endl; + if (!isNaN(statSum->getMax())) + (*m_scalar) << "field max " << statSum->getMax() << std::endl; + if (!isNaN(statSum->getSqrSum())) + (*m_scalar) << "field sqrsum " << statSum->getSqrSum() << std::endl; + if (!isNaN(statSum->getStddev())) + (*m_scalar) << "field stddev " << statSum->getStddev() << std::endl; } void @@ -153,10 +172,10 @@ OmnetDataOutput::OmnetOutputCallback::OutputSingleton(std::string context, std::string name, int val) { - if (context == "") - context = "."; - if (name == "") - name = "\"\""; + if (context == "") + context = "."; + if (name == "") + name = "\"\""; (*m_scalar) << "scalar " << context << " " << name << " " << val << std::endl; // end OmnetDataOutput::OmnetOutputCallback::OutputSingleton } @@ -166,10 +185,10 @@ OmnetDataOutput::OmnetOutputCallback::OutputSingleton(std::string context, std::string name, uint32_t val) { - if (context == "") - context = "."; - if (name == "") - name = "\"\""; + if (context == "") + context = "."; + if (name == "") + name = "\"\""; (*m_scalar) << "scalar " << context << " " << name << " " << val << std::endl; // end OmnetDataOutput::OmnetOutputCallback::OutputSingleton } @@ -179,11 +198,11 @@ OmnetDataOutput::OmnetOutputCallback::OutputSingleton(std::string context, std::string name, double val) { - if (context == "") - context = "."; - if (name == "") - name = "\"\""; - (*m_scalar) << "scalar " << context << " " << name << " " << val << std::endl; + if (context == "") + context = "."; + if (name == "") + name = "\"\""; + (*m_scalar) << "scalar " << context << " " << name << " " << val << std::endl; // end OmnetDataOutput::OmnetOutputCallback::OutputSingleton } @@ -192,11 +211,11 @@ OmnetDataOutput::OmnetOutputCallback::OutputSingleton(std::string context, std::string name, std::string val) { - if (context == "") - context = "."; - if (name == "") - name = "\"\""; - (*m_scalar) << "scalar " << context << " " << name << " " << val << std::endl; + if (context == "") + context = "."; + if (name == "") + name = "\"\""; + (*m_scalar) << "scalar " << context << " " << name << " " << val << std::endl; // end OmnetDataOutput::OmnetOutputCallback::OutputSingleton } @@ -205,10 +224,10 @@ OmnetDataOutput::OmnetOutputCallback::OutputSingleton(std::string context, std::string name, Time val) { - if (context == "") - context = "."; - if (name == "") - name = "\"\""; - (*m_scalar) << "scalar " << context << " " << name << " " << val.GetTimeStep() << std::endl; + if (context == "") + context = "."; + if (name == "") + name = "\"\""; + (*m_scalar) << "scalar " << context << " " << name << " " << val.GetTimeStep() << std::endl; // end OmnetDataOutput::OmnetOutputCallback::OutputSingleton } diff --git a/src/stats/model/omnet-data-output.h b/src/stats/model/omnet-data-output.h index 2fadf52e9..d3f058b96 100644 --- a/src/stats/model/omnet-data-output.h +++ b/src/stats/model/omnet-data-output.h @@ -28,56 +28,60 @@ namespace ns3 { - //------------------------------------------------------------ - //-------------------------------------------- - class OmnetDataOutput : public DataOutputInterface { - public: - OmnetDataOutput(); - virtual ~OmnetDataOutput(); +//------------------------------------------------------------ +//-------------------------------------------- +/** + * \ingroup stats + * + */ +class OmnetDataOutput : public DataOutputInterface { +public: + OmnetDataOutput(); + virtual ~OmnetDataOutput(); - virtual void Output(DataCollector &dc); + virtual void Output(DataCollector &dc); - protected: - virtual void DoDispose(); +protected: + virtual void DoDispose(); - private: - class OmnetOutputCallback : public DataOutputCallback { - public: - OmnetOutputCallback(std::ostream *scalar); +private: + class OmnetOutputCallback : public DataOutputCallback { +public: + OmnetOutputCallback(std::ostream *scalar); - void OutputStatistic(std::string context, - std::string name, - const StatisticalSummary *statSum); + void OutputStatistic(std::string context, + std::string name, + const StatisticalSummary *statSum); - void OutputSingleton(std::string context, - std::string name, - int val); + void OutputSingleton(std::string context, + std::string name, + int val); - void OutputSingleton(std::string context, - std::string name, - uint32_t val); + void OutputSingleton(std::string context, + std::string name, + uint32_t val); - void OutputSingleton(std::string context, - std::string name, - double val); + void OutputSingleton(std::string context, + std::string name, + double val); - void OutputSingleton(std::string context, - std::string name, - std::string val); + void OutputSingleton(std::string context, + std::string name, + std::string val); - void OutputSingleton(std::string context, - std::string name, - Time val); + void OutputSingleton(std::string context, + std::string name, + Time val); - private: - std::ostream *m_scalar; - // end class OmnetOutputCallback - }; - - // end class OmnetDataOutput +private: + std::ostream *m_scalar; + // end class OmnetOutputCallback }; - // end namespace ns3 + // end class OmnetDataOutput +}; + +// end namespace ns3 }; diff --git a/src/stats/model/packet-data-calculators.cc b/src/stats/model/packet-data-calculators.cc index d776bba46..a13985e85 100644 --- a/src/stats/model/packet-data-calculators.cc +++ b/src/stats/model/packet-data-calculators.cc @@ -97,7 +97,7 @@ PacketSizeMinMaxAvgTotalCalculator::DoDispose(void) void PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, - Ptr packet) + Ptr packet) { NS_LOG_FUNCTION_NOARGS(); @@ -107,8 +107,8 @@ PacketSizeMinMaxAvgTotalCalculator::PacketUpdate(std::string path, } void PacketSizeMinMaxAvgTotalCalculator::FrameUpdate(std::string path, - Ptr packet, - Mac48Address realto) + Ptr packet, + Mac48Address realto) { NS_LOG_FUNCTION_NOARGS(); diff --git a/src/stats/model/packet-data-calculators.h b/src/stats/model/packet-data-calculators.h index e65f85c36..b877440b6 100644 --- a/src/stats/model/packet-data-calculators.h +++ b/src/stats/model/packet-data-calculators.h @@ -28,40 +28,48 @@ namespace ns3 { - class PacketCounterCalculator : public CounterCalculator { - public: - PacketCounterCalculator(); - virtual ~PacketCounterCalculator(); +/** + * \ingroup stats + * + */ +class PacketCounterCalculator : public CounterCalculator { +public: + PacketCounterCalculator(); + virtual ~PacketCounterCalculator(); - void PacketUpdate(std::string path, Ptr packet); - void FrameUpdate(std::string path, Ptr packet, - Mac48Address realto); + void PacketUpdate(std::string path, Ptr packet); + void FrameUpdate(std::string path, Ptr packet, + Mac48Address realto); - protected: - virtual void DoDispose(void); +protected: + virtual void DoDispose(void); - // end class PacketCounterCalculator - }; + // end class PacketCounterCalculator +}; - class PacketSizeMinMaxAvgTotalCalculator : - public MinMaxAvgTotalCalculator { - public: - PacketSizeMinMaxAvgTotalCalculator(); - virtual ~PacketSizeMinMaxAvgTotalCalculator(); +/** + * \ingroup stats + * + */ +class PacketSizeMinMaxAvgTotalCalculator : + public MinMaxAvgTotalCalculator { +public: + PacketSizeMinMaxAvgTotalCalculator(); + virtual ~PacketSizeMinMaxAvgTotalCalculator(); - void PacketUpdate(std::string path, Ptr packet); - void FrameUpdate(std::string path, Ptr packet, - Mac48Address realto); + void PacketUpdate(std::string path, Ptr packet); + void FrameUpdate(std::string path, Ptr packet, + Mac48Address realto); - protected: - virtual void DoDispose(void); +protected: + virtual void DoDispose(void); - // end class PacketSizeMinMaxAvgTotalCalculator - }; + // end class PacketSizeMinMaxAvgTotalCalculator +}; - // end namespace ns3 +// end namespace ns3 }; diff --git a/src/stats/model/sqlite-data-output.cc b/src/stats/model/sqlite-data-output.cc index b809f03f8..d65d43a4d 100644 --- a/src/stats/model/sqlite-data-output.cc +++ b/src/stats/model/sqlite-data-output.cc @@ -68,27 +68,27 @@ SqliteDataOutput::Exec(std::string exe) { &errMsg); if (res != SQLITE_OK) { - NS_LOG_ERROR("sqlite3 error: \"" << errMsg << "\""); - /* - } else { - // std::cout << "nrows " << nrows << " ncols " << ncols << std::endl; + NS_LOG_ERROR("sqlite3 error: \"" << errMsg << "\""); + /* + } else { + // std::cout << "nrows " << nrows << " ncols " << ncols << std::endl; - if (nrows > 0) { - for (int i = 0; i < ncols; i++) { - std::cout << " " << result[i]; - } - std::cout << std::endl; + if (nrows > 0) { + for (int i = 0; i < ncols; i++) { + std::cout << " " << result[i]; + } + std::cout << std::endl; - for (int r = 1; r <= nrows; r++) { - for (int c = 0; c < ncols; c++) { - std::cout << " " << result[(r*ncols)+c]; + for (int r = 1; r <= nrows; r++) { + for (int c = 0; c < ncols; c++) { + std::cout << " " << result[(r*ncols)+c]; + } + std::cout << std::endl; + } + std::cout << std::endl; } - std::cout << std::endl; - } - std::cout << std::endl; + */ } - */ - } sqlite3_free_table(result); return res; @@ -103,12 +103,12 @@ SqliteDataOutput::Output(DataCollector &dc) std::string m_dbFile = m_filePrefix + ".db"; if (sqlite3_open(m_dbFile.c_str(), &m_db)) { - NS_LOG_ERROR("Could not open sqlite3 database \"" << m_dbFile << "\""); - NS_LOG_ERROR("sqlite3 error \"" << sqlite3_errmsg(m_db) << "\""); - sqlite3_close(m_db); - // TODO: Better error reporting, management! - return; - } + NS_LOG_ERROR("Could not open sqlite3 database \"" << m_dbFile << "\""); + NS_LOG_ERROR("sqlite3 error \"" << sqlite3_errmsg(m_db) << "\""); + sqlite3_close(m_db); + // TODO: Better error reporting, management! + return; + } std::string run = dc.GetRunLabel(); @@ -124,19 +124,19 @@ SqliteDataOutput::Output(DataCollector &dc) for (MetadataList::iterator i = dc.MetadataBegin(); i != dc.MetadataEnd(); i++) { - std::pair blob = (*i); - Exec("insert into Metadata (run,key,value) values ('" + - run + "', '" + - blob.first + "', '" + - blob.second + "')"); - } + std::pair blob = (*i); + Exec("insert into Metadata (run,key,value) values ('" + + run + "', '" + + blob.first + "', '" + + blob.second + "')"); + } Exec("BEGIN"); SqliteOutputCallback callback(this, run); for (DataCalculatorList::iterator i = dc.DataCalculatorBegin(); i != dc.DataCalculatorEnd(); i++) { - (*i)->Output(callback); - } + (*i)->Output(callback); + } Exec("COMMIT"); sqlite3_close(m_db); @@ -145,9 +145,9 @@ SqliteDataOutput::Output(DataCollector &dc) } SqliteDataOutput::SqliteOutputCallback::SqliteOutputCallback - (Ptr owner, std::string run) : - m_owner(owner), - m_runLabel(run) + (Ptr owner, std::string run) : + m_owner(owner), + m_runLabel(run) { m_owner->Exec("create table if not exists Singletons ( run text, name text, variable text, value )"); @@ -157,20 +157,20 @@ SqliteDataOutput::SqliteOutputCallback::SqliteOutputCallback void SqliteDataOutput::SqliteOutputCallback::OutputStatistic(std::string key, - std::string variable, - const StatisticalSummary *statSum) + std::string variable, + const StatisticalSummary *statSum) { - OutputSingleton(key,variable+"-count", (double)statSum->getCount()); - if (!isNaN(statSum->getSum())) - OutputSingleton(key,variable+"-total", statSum->getSum()); - if (!isNaN(statSum->getMax())) - OutputSingleton(key,variable+"-max", statSum->getMax()); - if (!isNaN(statSum->getMin())) - OutputSingleton(key,variable+"-min", statSum->getMin()); - if (!isNaN(statSum->getSqrSum())) - OutputSingleton(key,variable+"-sqrsum", statSum->getSqrSum()); - if (!isNaN(statSum->getStddev())) - OutputSingleton(key,variable+"-stddev", statSum->getStddev()); + OutputSingleton(key,variable+"-count", (double)statSum->getCount()); + if (!isNaN(statSum->getSum())) + OutputSingleton(key,variable+"-total", statSum->getSum()); + if (!isNaN(statSum->getMax())) + OutputSingleton(key,variable+"-max", statSum->getMax()); + if (!isNaN(statSum->getMin())) + OutputSingleton(key,variable+"-min", statSum->getMin()); + if (!isNaN(statSum->getSqrSum())) + OutputSingleton(key,variable+"-sqrsum", statSum->getSqrSum()); + if (!isNaN(statSum->getStddev())) + OutputSingleton(key,variable+"-stddev", statSum->getStddev()); } @@ -182,10 +182,10 @@ SqliteDataOutput::SqliteOutputCallback::OutputSingleton(std::string key, std::stringstream sstr; sstr << "insert into Singletons (run,name,variable,value) values ('" << - m_runLabel << "', '" << - key << "', '" << - variable << "', " << - val << ")"; + m_runLabel << "', '" << + key << "', '" << + variable << "', " << + val << ")"; m_owner->Exec(sstr.str()); // end SqliteDataOutput::SqliteOutputCallback::OutputSingleton @@ -197,10 +197,10 @@ SqliteDataOutput::SqliteOutputCallback::OutputSingleton(std::string key, { std::stringstream sstr; sstr << "insert into Singletons (run,name,variable,value) values ('" << - m_runLabel << "', '" << - key << "', '" << - variable << "', " << - val << ")"; + m_runLabel << "', '" << + key << "', '" << + variable << "', " << + val << ")"; m_owner->Exec(sstr.str()); // end SqliteDataOutput::SqliteOutputCallback::OutputSingleton } @@ -211,10 +211,10 @@ SqliteDataOutput::SqliteOutputCallback::OutputSingleton(std::string key, { std::stringstream sstr; sstr << "insert into Singletons (run,name,variable,value) values ('" << - m_runLabel << "', '" << - key << "', '" << - variable << "', " << - val << ")"; + m_runLabel << "', '" << + key << "', '" << + variable << "', " << + val << ")"; m_owner->Exec(sstr.str()); // end SqliteDataOutput::SqliteOutputCallback::OutputSingleton } @@ -225,10 +225,10 @@ SqliteDataOutput::SqliteOutputCallback::OutputSingleton(std::string key, { std::stringstream sstr; sstr << "insert into Singletons (run,name,variable,value) values ('" << - m_runLabel << "', '" << - key << "', '" << - variable << "', '" << - val << "')"; + m_runLabel << "', '" << + key << "', '" << + variable << "', '" << + val << "')"; m_owner->Exec(sstr.str()); // end SqliteDataOutput::SqliteOutputCallback::OutputSingleton } @@ -239,10 +239,10 @@ SqliteDataOutput::SqliteOutputCallback::OutputSingleton(std::string key, { std::stringstream sstr; sstr << "insert into Singletons (run,name,variable,value) values ('" << - m_runLabel << "', '" << - key << "', '" << - variable << "', " << - val.GetTimeStep() << ")"; + m_runLabel << "', '" << + key << "', '" << + variable << "', " << + val.GetTimeStep() << ")"; m_owner->Exec(sstr.str()); // end SqliteDataOutput::SqliteOutputCallback::OutputSingleton } diff --git a/src/stats/model/sqlite-data-output.h b/src/stats/model/sqlite-data-output.h index 4f6660eb2..fb3274170 100644 --- a/src/stats/model/sqlite-data-output.h +++ b/src/stats/model/sqlite-data-output.h @@ -31,62 +31,66 @@ class sqlite3; namespace ns3 { - //------------------------------------------------------------ - //-------------------------------------------- - class SqliteDataOutput : public DataOutputInterface { - public: - SqliteDataOutput(); - virtual ~SqliteDataOutput(); +//------------------------------------------------------------ +//-------------------------------------------- +/** + * \ingroup stats + * + */ +class SqliteDataOutput : public DataOutputInterface { +public: + SqliteDataOutput(); + virtual ~SqliteDataOutput(); - virtual void Output(DataCollector &dc); + virtual void Output(DataCollector &dc); - protected: - virtual void DoDispose(); +protected: + virtual void DoDispose(); - private: - class SqliteOutputCallback : public DataOutputCallback { - public: - SqliteOutputCallback(Ptr owner, std::string run); +private: + class SqliteOutputCallback : public DataOutputCallback { +public: + SqliteOutputCallback(Ptr owner, std::string run); - void OutputStatistic(std::string key, - std::string variable, - const StatisticalSummary *statSum); + void OutputStatistic(std::string key, + std::string variable, + const StatisticalSummary *statSum); - void OutputSingleton(std::string key, - std::string variable, - int val); + void OutputSingleton(std::string key, + std::string variable, + int val); - void OutputSingleton(std::string key, - std::string variable, - uint32_t val); + void OutputSingleton(std::string key, + std::string variable, + uint32_t val); - void OutputSingleton(std::string key, - std::string variable, - double val); + void OutputSingleton(std::string key, + std::string variable, + double val); - void OutputSingleton(std::string key, - std::string variable, - std::string val); + void OutputSingleton(std::string key, + std::string variable, + std::string val); - void OutputSingleton(std::string key, - std::string variable, - Time val); + void OutputSingleton(std::string key, + std::string variable, + Time val); - private: - Ptr m_owner; - std::string m_runLabel; +private: + Ptr m_owner; + std::string m_runLabel; - // end class SqliteOutputCallback - }; - - - sqlite3 *m_db; - int Exec(std::string exe); - - // end class SqliteDataOutput + // end class SqliteOutputCallback }; - // end namespace ns3 + + sqlite3 *m_db; + int Exec(std::string exe); + + // end class SqliteDataOutput +}; + +// end namespace ns3 }; diff --git a/src/stats/model/time-data-calculators.cc b/src/stats/model/time-data-calculators.cc index 41214ead0..eb09d175f 100644 --- a/src/stats/model/time-data-calculators.cc +++ b/src/stats/model/time-data-calculators.cc @@ -48,23 +48,23 @@ void TimeMinMaxAvgTotalCalculator::Update(const Time i) { if (m_enabled) { - if (m_count) { - m_total += i; + if (m_count) { + m_total += i; - if (i < m_min) - m_min = i; + if (i < m_min) + m_min = i; - if (i > m_max) - m_max = i; + if (i > m_max) + m_max = i; + + } else { + m_min = i; + m_max = i; + m_total = i; + } + m_count++; - } else { - m_min = i; - m_max = i; - m_total = i; } - m_count++; - - } // end TimeMinMaxAvgTotalCalculator::Update } void @@ -72,10 +72,10 @@ TimeMinMaxAvgTotalCalculator::Output(DataOutputCallback &callback) const { callback.OutputSingleton(m_context, m_key + "-count", m_count); if (m_count > 0) { - callback.OutputSingleton(m_context, m_key + "-total", m_total); - callback.OutputSingleton(m_context, m_key + "-average", Time (m_total / m_count)); - callback.OutputSingleton(m_context, m_key + "-max", m_max); - callback.OutputSingleton(m_context, m_key + "-min", m_min); - } + callback.OutputSingleton(m_context, m_key + "-total", m_total); + callback.OutputSingleton(m_context, m_key + "-average", Time (m_total / m_count)); + callback.OutputSingleton(m_context, m_key + "-max", m_max); + callback.OutputSingleton(m_context, m_key + "-min", m_min); + } // end TimeMinMaxAvgTotalCalculator::Output } diff --git a/src/stats/model/time-data-calculators.h b/src/stats/model/time-data-calculators.h index b6c56336c..ddccf9d00 100644 --- a/src/stats/model/time-data-calculators.h +++ b/src/stats/model/time-data-calculators.h @@ -28,34 +28,36 @@ namespace ns3 { - //------------------------------------------------------------ - //-------------------------------------------- - /** - * Unfortunately, templating the base MinMaxAvgTotalCalculator to - * operate over Time values isn't straightforward. The main issues - * are setting the maximum value, which can be worked around easily - * as it done here, and dividing to get the average, which is not as - * easily worked around. - */ - class TimeMinMaxAvgTotalCalculator : public DataCalculator { - public: - TimeMinMaxAvgTotalCalculator(); - virtual ~TimeMinMaxAvgTotalCalculator(); +//------------------------------------------------------------ +//-------------------------------------------- +/** + * \ingroup stats + * + * Unfortunately, templating the base MinMaxAvgTotalCalculator to + * operate over Time values isn't straightforward. The main issues + * are setting the maximum value, which can be worked around easily + * as it done here, and dividing to get the average, which is not as + * easily worked around. +*/ +class TimeMinMaxAvgTotalCalculator : public DataCalculator { +public: + TimeMinMaxAvgTotalCalculator(); + virtual ~TimeMinMaxAvgTotalCalculator(); - void Update(const Time i); + void Update(const Time i); - virtual void Output(DataOutputCallback &callback) const; + virtual void Output(DataOutputCallback &callback) const; - protected: - virtual void DoDispose(void); +protected: + virtual void DoDispose(void); - uint32_t m_count; - Time m_total, m_min, m_max; + uint32_t m_count; + Time m_total, m_min, m_max; - // end class TimeMinMaxAvgTotalCalculator - }; + // end class TimeMinMaxAvgTotalCalculator +}; - // end namespace ns3 +// end namespace ns3 }; diff --git a/src/tap-bridge/doc/tap.h b/src/tap-bridge/doc/tap.h index cb180eee4..fa2c3ed21 100644 --- a/src/tap-bridge/doc/tap.h +++ b/src/tap-bridge/doc/tap.h @@ -1,6 +1,5 @@ /** - * \ingroup devices - * \defgroup TapBridgeModel Tap Bridge Model + * \defgroup TapBridgeModel Tap Bridge Device * * \section TapBridgeModelOverview TapBridge Model Overview * diff --git a/doc/manual/source/tap.rst b/src/tap-bridge/doc/tap.rst similarity index 100% rename from doc/manual/source/tap.rst rename to src/tap-bridge/doc/tap.rst diff --git a/src/tap-bridge/examples/tap-csma-virtual-machine.cc b/src/tap-bridge/examples/tap-csma-virtual-machine.cc index 2219cb5c3..b1ea3cf3e 100644 --- a/src/tap-bridge/examples/tap-csma-virtual-machine.cc +++ b/src/tap-bridge/examples/tap-csma-virtual-machine.cc @@ -52,9 +52,9 @@ // +--------+ +--------+ // | CSMA | | CSMA | // +--------+ +--------+ -// | | -// | | -// | | +// | | +// | | +// | | // =============== // CSMA LAN // diff --git a/src/tap-bridge/examples/tap-csma.cc b/src/tap-bridge/examples/tap-csma.cc index 85370245a..111a137de 100644 --- a/src/tap-bridge/examples/tap-csma.cc +++ b/src/tap-bridge/examples/tap-csma.cc @@ -22,13 +22,13 @@ // Packets destined for the CSMA device on node zero will be sent to the // device "thetap" on the linux Host. // -// +----------+ -// | external | -// | Linux | -// | Host | +// +----------+ +// | external | +// | Linux | +// | Host | // | | -// | "thetap" | -// +----------+ +// | "thetap" | +// +----------+ // | n0 n1 n2 n3 // | +--------+ +--------+ +--------+ +--------+ // +-------| tap | | | | | | | diff --git a/src/tap-bridge/examples/tap-wifi-virtual-machine.cc b/src/tap-bridge/examples/tap-wifi-virtual-machine.cc index 4ddd9fee4..e0657f9fd 100644 --- a/src/tap-bridge/examples/tap-wifi-virtual-machine.cc +++ b/src/tap-bridge/examples/tap-wifi-virtual-machine.cc @@ -52,7 +52,7 @@ // +--------+ +--------+ // | wifi | | wifi | // +--------+ +--------+ -// | | +// | | // ((*)) ((*)) // // Wifi LAN diff --git a/src/tap-bridge/helper/tap-bridge-helper.cc b/src/tap-bridge/helper/tap-bridge-helper.cc index 2087df5bd..9f2330768 100644 --- a/src/tap-bridge/helper/tap-bridge-helper.cc +++ b/src/tap-bridge/helper/tap-bridge-helper.cc @@ -57,7 +57,7 @@ TapBridgeHelper::Install (Ptr node, Ptr nd, const AttributeValu return Install (node, nd); } - Ptr +Ptr TapBridgeHelper::Install (Ptr node, Ptr nd) { NS_LOG_FUNCTION (node << nd); diff --git a/src/tap-bridge/model/tap-bridge.cc b/src/tap-bridge/model/tap-bridge.cc index a0d389a86..041643ee4 100644 --- a/src/tap-bridge/model/tap-bridge.cc +++ b/src/tap-bridge/model/tap-bridge.cc @@ -100,7 +100,7 @@ TapBridge::GetTypeId (void) UintegerValue (0), MakeUintegerAccessor (&TapBridge::SetMtu, &TapBridge::GetMtu), - MakeUintegerChecker ()) + MakeUintegerChecker ()) .AddAttribute ("DeviceName", "The name of the tap device to create.", StringValue (""), @@ -146,18 +146,18 @@ TapBridge::GetTypeId (void) MakeEnumChecker (CONFIGURE_LOCAL, "ConfigureLocal", USE_LOCAL, "UseLocal", USE_BRIDGE, "UseBridge")) - ; + ; return tid; } TapBridge::TapBridge () -: m_node (0), - m_ifIndex (0), - m_sock (-1), - m_startEvent (), - m_stopEvent (), - m_fdReader (0), - m_ns3AddressRewritten (false) + : m_node (0), + m_ifIndex (0), + m_sock (-1), + m_startEvent (), + m_stopEvent (), + m_fdReader (0), + m_ns3AddressRewritten (false) { NS_LOG_FUNCTION_NOARGS (); m_packetBuffer = new uint8_t[65536]; @@ -176,7 +176,7 @@ TapBridge::~TapBridge() m_bridgedDevice = 0; } - void +void TapBridge::DoDispose () { NS_LOG_FUNCTION_NOARGS (); @@ -195,7 +195,7 @@ TapBridge::Start (Time tStart) m_startEvent = Simulator::Schedule (tStart, &TapBridge::StartTapDevice, this); } - void +void TapBridge::Stop (Time tStop) { NS_LOG_FUNCTION (tStop); @@ -206,7 +206,7 @@ TapBridge::Stop (Time tStop) m_startEvent = Simulator::Schedule (tStop, &TapBridge::StopTapDevice, this); } - void +void TapBridge::StartTapDevice (void) { NS_LOG_FUNCTION_NOARGS (); @@ -304,7 +304,7 @@ TapBridge::CreateTap (void) // sudo ifconfig tap0 10.1.1.1 netmask 255.255.255.0 up // // The user will then set the "Mode" Attribute of the TapBridge to "UseLocal" - // and the "DeviceName" Attribute to "tap0" in this case. + // and the "DeviceName" Attribute to "tap0" in this case. // // In ConfigureLocal mode, the user is asking the TapBridge to do the // configuration and create a TAP with the provided "DeviceName" with which @@ -420,9 +420,9 @@ TapBridge::CreateTap (void) bool wantIp = (m_mode == CONFIGURE_LOCAL); if (wantIp - && (ipv4 == 0) - && m_tapIp.IsBroadcast () - && m_tapNetmask.IsEqual (Ipv4Mask::GetOnes ())) + && (ipv4 == 0) + && m_tapIp.IsBroadcast () + && m_tapNetmask.IsEqual (Ipv4Mask::GetOnes ())) { NS_FATAL_ERROR ("TapBridge::CreateTap(): Tap device IP configuration requested but neither IP address nor IP netmask is provided"); } @@ -525,15 +525,15 @@ TapBridge::CreateTap (void) // Execute the socket creation process image. // status = ::execlp ("tap-creator", - "tap-creator", // argv[0] (filename) - ossDeviceName.str ().c_str (), // argv[1] (-d) - ossGateway.str ().c_str (), // argv[2] (-g) - ossIp.str ().c_str (), // argv[3] (-i) - ossMac.str ().c_str (), // argv[4] (-m) - ossNetmask.str ().c_str (), // argv[5] (-n) - ossMode.str ().c_str (), // argv[6] (-o) - ossPath.str ().c_str (), // argv[7] (-p) - (char *)NULL); + "tap-creator", // argv[0] (filename) + ossDeviceName.str ().c_str (), // argv[1] (-d) + ossGateway.str ().c_str (), // argv[2] (-g) + ossIp.str ().c_str (), // argv[3] (-i) + ossMac.str ().c_str (), // argv[4] (-m) + ossNetmask.str ().c_str (), // argv[5] (-n) + ossMode.str ().c_str (), // argv[6] (-o) + ossPath.str ().c_str (), // argv[7] (-p) + (char *)NULL); // // If the execlp successfully completes, it never returns. If it returns it failed or the OS is @@ -559,15 +559,15 @@ TapBridge::CreateTap (void) // even exit normally, we bail too. // if (WIFEXITED (st)) - { + { int exitStatus = WEXITSTATUS (st); NS_ABORT_MSG_IF (exitStatus != 0, "TapBridge::CreateTap(): socket creator exited normally with status " << exitStatus); - } + } else - { + { NS_FATAL_ERROR ("TapBridge::CreateTap(): socket creator exited abnormally"); - } + } // // At this point, the socket creator has run successfully and should @@ -603,7 +603,7 @@ TapBridge::CreateTap (void) // // There is a msghdr that is used to minimize the number of parameters - // passed to recvmsg (which we will use to receive our ancillary data). + // passed to recvmsg (which we will use to receive our ancillary data). // This structure uses terminology corresponding to control messages, so // you'll see msg_control, which is the pointer to the ancillary data and // controllen which is the size of the ancillary data array. @@ -634,10 +634,10 @@ TapBridge::CreateTap (void) // struct cmsghdr *cmsg; for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) - { - if (cmsg->cmsg_level == SOL_SOCKET && - cmsg->cmsg_type == SCM_RIGHTS) - { + { + if (cmsg->cmsg_level == SOL_SOCKET && + cmsg->cmsg_type == SCM_RIGHTS) + { // // This is the type of message we want. Check to see if the magic // number is correct and then pull out the socket we care about if @@ -653,10 +653,10 @@ TapBridge::CreateTap (void) } else { - NS_LOG_INFO ("Got SCM_RIGHTS, but with bad magic " << magic); + NS_LOG_INFO ("Got SCM_RIGHTS, but with bad magic " << magic); } - } - } + } + } NS_FATAL_ERROR ("Did not get the raw socket from the socket creator"); } } @@ -857,8 +857,8 @@ TapBridge::Filter (Ptr p, Address *src, Address *dst, uint16_t *type) return 0; } - p->RemoveHeader (llc); - *type = llc.GetType (); + p->RemoveHeader (llc); + *type = llc.GetType (); } else { @@ -890,12 +890,12 @@ TapBridge::SetBridgedNetDevice (Ptr bridgedDevice) NS_ASSERT_MSG (m_node != 0, "TapBridge::SetBridgedDevice: Bridge not installed in a node"); NS_ASSERT_MSG (bridgedDevice != this, "TapBridge::SetBridgedDevice: Cannot bridge to self"); NS_ASSERT_MSG (m_bridgedDevice == 0, "TapBridge::SetBridgedDevice: Already bridged"); - + if (!Mac48Address::IsMatchingType (bridgedDevice->GetAddress ())) { NS_FATAL_ERROR ("TapBridge::SetBridgedDevice: Device does not support eui 48 addresses: cannot be added to bridge."); } - + if (m_mode == USE_BRIDGE && !bridgedDevice->SupportsSendFrom ()) { NS_FATAL_ERROR ("TapBridge::SetBridgedDevice: Device does not support SendFrom: cannot be added to bridge."); @@ -1030,20 +1030,20 @@ TapBridge::GetAddress (void) const return m_address; } - void +void TapBridge::SetMode (enum Mode mode) { NS_LOG_FUNCTION (mode); m_mode = mode; } - TapBridge::Mode +TapBridge::Mode TapBridge::GetMode (void) { NS_LOG_FUNCTION_NOARGS (); return m_mode; } - + bool TapBridge::SetMtu (const uint16_t mtu) { @@ -1097,9 +1097,9 @@ TapBridge::IsMulticast (void) const Address TapBridge::GetMulticast (Ipv4Address multicastGroup) const { - NS_LOG_FUNCTION (this << multicastGroup); - Mac48Address multicast = Mac48Address::GetMulticast (multicastGroup); - return multicast; + NS_LOG_FUNCTION (this << multicastGroup); + Mac48Address multicast = Mac48Address::GetMulticast (multicastGroup); + return multicast; } bool diff --git a/src/tap-bridge/model/tap-bridge.h b/src/tap-bridge/model/tap-bridge.h index 221fd5ea3..1b8d227a5 100644 --- a/src/tap-bridge/model/tap-bridge.h +++ b/src/tap-bridge/model/tap-bridge.h @@ -289,7 +289,7 @@ private: * either the Ethernet header in the case of type interpretation * (DIX framing) or from the 802.2 LLC header in the case of * length interpretation (802.3 framing). - */ + */ Ptr Filter (Ptr packet, Address *src, Address *dst, uint16_t *type); /** @@ -370,7 +370,7 @@ private: /** * \internal - * + * * The operating mode of the bridge. Tells basically who creates and * configures the underlying network tap. */ @@ -425,7 +425,7 @@ private: * \internal * * The MAC address to use as the hardware address on the host; only used - * in UseLocal mode. This value comes from the MAC + * in UseLocal mode. This value comes from the MAC * address assigned to the bridged ns-3 net device and matches the MAC * address of the underlying network TAP which we configured to have the * same value. diff --git a/src/tap-bridge/model/tap-creator.cc b/src/tap-bridge/model/tap-creator.cc index fd18752d2..124326b93 100644 --- a/src/tap-bridge/model/tap-creator.cc +++ b/src/tap-bridge/model/tap-creator.cc @@ -77,12 +77,12 @@ static char AsciiToLowCase (char c) { if (c >= ASCII_a && c <= ASCII_z) { - return c; - } else if (c >= ASCII_A && c <= ASCII_Z) { - return c + (ASCII_a - ASCII_A); - } else { - return c; - } + return c; + } else if (c >= ASCII_A && c <= ASCII_Z) { + return c + (ASCII_a - ASCII_A); + } else { + return c; + } } static uint32_t @@ -90,20 +90,20 @@ AsciiToIpv4 (const char *address) { uint32_t host = 0; while (true) { - uint8_t byte = 0; - while (*address != ASCII_DOT && - *address != 0) { - byte *= 10; - byte += *address - ASCII_ZERO; + uint8_t byte = 0; + while (*address != ASCII_DOT && + *address != 0) { + byte *= 10; + byte += *address - ASCII_ZERO; + address++; + } + host <<= 8; + host |= byte; + if (*address == 0) { + break; + } address++; } - host <<= 8; - host |= byte; - if (*address == 0) { - break; - } - address++; - } return host; } @@ -115,25 +115,25 @@ AsciiToMac48 (const char *str, uint8_t addr[6]) { uint8_t byte = 0; while (*str != ASCII_COLON && *str != 0) - { - byte <<= 4; - char low = AsciiToLowCase (*str); - if (low >= ASCII_a) - { - byte |= low - ASCII_a + 10; - } - else - { - byte |= low - ASCII_ZERO; - } - str++; - } + { + byte <<= 4; + char low = AsciiToLowCase (*str); + if (low >= ASCII_a) + { + byte |= low - ASCII_a + 10; + } + else + { + byte |= low - ASCII_ZERO; + } + str++; + } addr[i] = byte; i++; if (*str == 0) - { - break; - } + { + break; + } str++; } } @@ -151,7 +151,7 @@ CreateInetAddress (uint32_t networkOrder) return s.any_socket; } - static void +static void SendSocket (const char *path, int fd) { // @@ -160,7 +160,7 @@ SendSocket (const char *path, int fd) LOG ("Create Unix socket"); int sock = socket (PF_UNIX, SOCK_DGRAM, 0); ABORT_IF (sock == -1, "Unable to open socket", 1); - + // // We have this string called path, which is really a hex representation // of the endpoint that the tap bridge created. It used a forward encoding @@ -261,7 +261,7 @@ SendSocket (const char *path, int fd) // Finally, we get a pointer to the start of the ancillary data array and // put our file descriptor in. // - int *fdptr = (int*) (CMSG_DATA(cmsg)); + int *fdptr = (int*)(CMSG_DATA(cmsg)); *fdptr = fd; // // @@ -273,7 +273,7 @@ SendSocket (const char *path, int fd) LOG ("sendmsg complete"); } - static int +static int CreateTap (const char *dev, const char *gw, const char *ip, const char *mac, const char *mode, const char *netmask) { // @@ -299,7 +299,7 @@ CreateTap (const char *dev, const char *gw, const char *ip, const char *mac, con LOG ("Allocated TAP device " << tapDeviceName); // - // Operating mode "2" corresponds to USE_LOCAL and "3" to USE_BRIDGE mode. + // Operating mode "2" corresponds to USE_LOCAL and "3" to USE_BRIDGE mode. // This means that we expect that the user will have named, created and // configured a network tap that we are just going to use. So don't mess // up his hard work by changing anything, just return the tap fd. @@ -350,7 +350,7 @@ CreateTap (const char *dev, const char *gw, const char *ip, const char *mac, con return tap; } - int +int main (int argc, char *argv[]) { int c; @@ -431,7 +431,7 @@ main (int argc, char *argv[]) // // We have got to be able to assign a net mask to the tap device we are // allocating. This mask is allocated in the simulation and given to - // the bridged device. + // the bridged device. // ABORT_IF (netmask == NULL, "Net Mask is a required argument", 0); LOG ("Provided Net Mask is \"" << netmask << "\""); diff --git a/src/tap-bridge/model/tap-encode-decode.cc b/src/tap-bridge/model/tap-encode-decode.cc index d6a03588d..0f2529451 100644 --- a/src/tap-bridge/model/tap-encode-decode.cc +++ b/src/tap-bridge/model/tap-encode-decode.cc @@ -33,7 +33,7 @@ namespace ns3 { * \param len The length of the input buffer. * \returns A string containing a hex representation of the data in buffer. */ - std::string +std::string TapBufferToString (uint8_t *buffer, uint32_t len) { std::ostringstream oss; @@ -63,7 +63,7 @@ TapBufferToString (uint8_t *buffer, uint32_t len) * \param len The length of the data that is valid in the buffer. * \returns True indicates a successful conversion. */ - bool +bool TapStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len) { // @@ -94,7 +94,7 @@ TapStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len) { return false; } - + // // And then read in the real bits and convert them. // diff --git a/src/tap-bridge/model/tap-encode-decode.h b/src/tap-bridge/model/tap-encode-decode.h index 28dc59a55..dba82717b 100644 --- a/src/tap-bridge/model/tap-encode-decode.h +++ b/src/tap-bridge/model/tap-encode-decode.h @@ -23,8 +23,8 @@ namespace ns3 { - std::string TapBufferToString (uint8_t *buffer, uint32_t len); - bool TapStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len); +std::string TapBufferToString (uint8_t *buffer, uint32_t len); +bool TapStringToBuffer (std::string s, uint8_t *buffer, uint32_t *len); } // namespace ns3 diff --git a/src/template/examples/wscript b/src/template/examples/wscript new file mode 100644 index 000000000..553eab577 --- /dev/null +++ b/src/template/examples/wscript @@ -0,0 +1,14 @@ +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +def build(bld): + # Don't build any examples unless they are enabled. + if not bld.env['ENABLE_EXAMPLES']: + return; + + # Uncomment these lines to build this C++ example program. + #program = bld.create_ns3_program('sample-example', ['core']) + #program.source = 'sample-example.cc' + + # Uncomment this line to register the dependencies for this Python + # example script. + #bld.register_ns3_script('sample-example.py', ['core']) diff --git a/src/template/test/examples-to-run.py b/src/template/test/examples-to-run.py new file mode 100644 index 000000000..156deb8d6 --- /dev/null +++ b/src/template/test/examples-to-run.py @@ -0,0 +1,18 @@ +#! /usr/bin/env python +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +# A list of C++ examples to run in order to ensure that they remain +# buildable and runnable over time. Each tuple in the list contains +# +# (example_name, do_run, do_valgrind_run). +# +# See test.py for more information. +cpp_examples = [] + +# A list of Python examples to run in order to ensure that they remain +# runnable over time. Each tuple in the list contains +# +# (example_name, do_run). +# +# See test.py for more information. +python_examples = [] diff --git a/src/template/wscript b/src/template/wscript new file mode 100644 index 000000000..00c30d4f5 --- /dev/null +++ b/src/template/wscript @@ -0,0 +1,51 @@ +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +def build(bld): + # Create the module with the appropriate name and the list of + # modules it depends on. + module = bld.create_ns3_module('template', ['core']) + + # Set the C++ source files for this module. + module.source = [ + # Uncomment these lines to compile these model source files. + #'model/sample-model-1.cc', + #'model/sample-model-2.cc', + + # Uncomment these lines to compile these helper source files. + #'helper/sample-helper-1.cc', + #'helper/sample-helper-2.cc', + ] + + # Create the module's test library. + module_test = bld.create_ns3_module_test_library('template') + + # Set the C++ source files for the module's test library. + module_test.source = [ + # Uncomment these lines to compile these test suites. + #'test/sample-test-suite-1.cc', + #'test/sample-test-suite-2.cc', + ] + + # Make headers be installed for this module. + headers = bld.new_task_gen('ns3header') + headers.module = 'template' + + # Set the C++ header files for this module. + headers.source = [ + # Uncomment these lines to install these model header files. + #'model/sample-model-1.h', + #'model/sample-model-2.h', + + # Uncomment these lines to install these helper header files. + #'helper/sample-helper-1.h', + #'helper/sample-helper-2.h', + ] + + # Uncomment these lines if this module needs a library such as the + # real-time (RT) library to be linked in at build time. + #module .uselib = 'RT' + #module_test.uselib = 'RT' + + # Look for examples if they are enabled. + if (bld.env['ENABLE_EXAMPLES']): + bld.add_subdirs('examples') diff --git a/src/test/csma-system-test-suite.cc b/src/test/csma-system-test-suite.cc index 43d4ef647..450dc2567 100644 --- a/src/test/csma-system-test-suite.cc +++ b/src/test/csma-system-test-suite.cc @@ -81,13 +81,13 @@ CsmaBridgeTestCase::SinkRx (Ptr p, const Address &ad) // Network topology // -// n0 n1 +// n0 n1 // | | // ---------- // | Switch | // ---------- // | | -// n2 n3 +// n2 n3 // // - CBR/UDP test flow from n0 to n1; test that packets received on n1 // @@ -207,8 +207,8 @@ CsmaBroadcastTestCase::DropEvent (Ptr p) // Network topology // ============== // | | -// n0 n1 n2 -// | | +// n0 n1 n2 +// | | // ========== // // n0 originates UDP broadcast to 255.255.255.255/discard port, which @@ -249,7 +249,7 @@ CsmaBroadcastTestCase::DoRun (void) // Make packets be sent about every DefaultPacketSize / DataRate = // 4096 bits / (5000 bits/second) = 0.82 second. OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address ("255.255.255.255"), port))); + Address (InetSocketAddress (Ipv4Address ("255.255.255.255"), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff.SetAttribute ("DataRate", DataRateValue (DataRate (5000))); @@ -261,7 +261,7 @@ CsmaBroadcastTestCase::DoRun (void) // Create an optional packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); app = sink.Install (c0.Get (1)); app.Add (sink.Install (c1.Get (1))); app.Start (Seconds (1.0)); @@ -271,7 +271,7 @@ CsmaBroadcastTestCase::DoRun (void) Config::ConnectWithoutContext ("/NodeList/1/ApplicationList/0/$ns3::PacketSink/Rx", MakeCallback (&CsmaBroadcastTestCase::SinkRxNode1, this)); Config::ConnectWithoutContext ("/NodeList/2/ApplicationList/0/$ns3::PacketSink/Rx", MakeCallback (&CsmaBroadcastTestCase::SinkRxNode2, this)); - Simulator::Run (); + Simulator::Run (); Simulator::Destroy (); // We should have sent and received 10 packets @@ -334,17 +334,17 @@ void CsmaMulticastTestCase::DoRun (void) { // - // Set up default values for the simulation. + // Set up default values for the simulation. // // Select DIX/Ethernet II-style encapsulation (no LLC/Snap header) - Config::SetDefault ("ns3::CsmaNetDevice::EncapsulationMode", StringValue ("Dix")); + Config::SetDefault ("ns3::CsmaNetDevice::EncapsulationMode", StringValue ("Dix")); NodeContainer c; c.Create (5); // We will later want two subcontainers of these nodes, for the two LANs NodeContainer c0 = NodeContainer (c.Get (0), c.Get (1), c.Get (2)); NodeContainer c1 = NodeContainer (c.Get (2), c.Get (3), c.Get (4)); - + CsmaHelper csma; csma.SetChannelAttribute ("DataRate", DataRateValue (DataRate (5000000))); csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (2))); @@ -367,7 +367,7 @@ CsmaMulticastTestCase::DoRun (void) // source is at node zero, which we assigned the IP address of 10.1.1.1 // earlier. We need to define a multicast group to send packets to. This // can be any multicast address from 224.0.0.0 through 239.255.255.255 - // (avoiding the reserved routing protocol addresses). + // (avoiding the reserved routing protocol addresses). // Ipv4Address multicastSource ("10.1.1.1"); @@ -387,8 +387,8 @@ CsmaMulticastTestCase::DoRun (void) outputDevices.Add (nd1.Get (0)); // (we only need one NetDevice here) multicast.AddMulticastRoute (multicastRouter, multicastSource, - multicastGroup, inputIf, outputDevices); - + multicastGroup, inputIf, outputDevices); + // 2) Set up a default multicast route on the sender n0 Ptr sender = c.Get (0); Ptr senderIf = nd0.Get(0); @@ -406,7 +406,7 @@ CsmaMulticastTestCase::DoRun (void) // Make packets be sent about every defaultPacketSize / dataRate = // 4096 bits / (5000 bits/second) = 0.82 second. OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (multicastGroup, multicastPort))); + Address (InetSocketAddress (multicastGroup, multicastPort))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff.SetAttribute ("DataRate", DataRateValue (DataRate (5000))); @@ -540,7 +540,7 @@ CsmaOneSubnetTestCase::DoRun (void) // Create an optional packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); app = sink.Install (nodes.Get (1)); app.Start (Seconds (0.0)); @@ -630,8 +630,8 @@ CsmaPacketSocketTestCase::DoRun (void) // create the shared medium used by all csma devices. Ptr channel = CreateObjectWithAttributes ( - "DataRate", DataRateValue (DataRate(5000000)), - "Delay", TimeValue (MilliSeconds(2))); + "DataRate", DataRateValue (DataRate(5000000)), + "Delay", TimeValue (MilliSeconds(2))); // use a helper function to connect our nodes to the shared channel. CsmaHelper csma; @@ -1007,19 +1007,19 @@ CsmaStarTestCase::DoRun (void) // Ipv4AddressHelper address; for(uint32_t i = 0; i < star.SpokeCount (); ++i) - { - std::ostringstream subnet; - subnet << "10.1." << i << ".0"; + { + std::ostringstream subnet; + subnet << "10.1." << i << ".0"; address.SetBase (subnet.str ().c_str (), "255.255.255.0", "0.0.0.3"); - for (uint32_t j = 0; j < nFill; ++j) - { - address.Assign (fillDevices.Get (i * nFill + j)); - } - } + for (uint32_t j = 0; j < nFill; ++j) + { + address.Assign (fillDevices.Get (i * nFill + j)); + } + } // - // Create a packet sink on the star "hub" to receive packets. + // Create a packet sink on the star "hub" to receive packets. // uint16_t port = 50000; Address hubLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port)); diff --git a/src/test/global-routing-test-suite.cc b/src/test/global-routing-test-suite.cc index 5a78fa7ed..d7950cff1 100644 --- a/src/test/global-routing-test-suite.cc +++ b/src/test/global-routing-test-suite.cc @@ -173,8 +173,8 @@ DynamicGlobalRoutingTestCase::DoRun (void) csma.SetChannelAttribute ("DataRate", StringValue ("5Mbps")); csma.SetChannelAttribute ("Delay", StringValue ("2ms")); NetDeviceContainer d2345 = csma.Install (n2345); - - // Later, we add IP addresses. + + // Later, we add IP addresses. Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.0"); ipv4.Assign (d0d2); @@ -212,7 +212,7 @@ DynamicGlobalRoutingTestCase::DoRun (void) // Create a second OnOff application to send UDP datagrams of size // 210 bytes at a rate of 448 Kb/s OnOffHelper onoff2 ("ns3::UdpSocketFactory", - InetSocketAddress (i1i6.GetAddress (1), port)); + InetSocketAddress (i1i6.GetAddress (1), port)); onoff2.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff2.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff2.SetAttribute ("DataRate", StringValue ("2kbps")); @@ -336,7 +336,7 @@ GlobalRoutingSlash32TestCase::DoRun (void) deviceC->SetAddress (Mac48Address::Allocate ()); nC->AddDevice (deviceC); - // Later, we add IP addresses. + // Later, we add IP addresses. Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.252"); Ipv4InterfaceContainer iAiB = ipv4.Assign (dAdB); @@ -368,7 +368,7 @@ GlobalRoutingSlash32TestCase::DoRun (void) // 210 bytes at a rate of 448 Kb/s uint16_t port = 9; // Discard port (RFC 863) OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (ifInAddrC.GetLocal(), port))); + Address (InetSocketAddress (ifInAddrC.GetLocal(), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000))); @@ -378,7 +378,7 @@ GlobalRoutingSlash32TestCase::DoRun (void) // Create a packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (nC); apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); diff --git a/src/test/ns3tcp/ns3tcp-cwnd-test-suite.cc b/src/test/ns3tcp/ns3tcp-cwnd-test-suite.cc index 75a40a8c9..cbef76136 100644 --- a/src/test/ns3tcp/ns3tcp-cwnd-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-cwnd-test-suite.cc @@ -82,7 +82,7 @@ public: void Setup (Ptr socket, Address address, uint32_t packetSize, uint32_t nPackets, DataRate dataRate); private: - virtual void StartApplication (void); + virtual void StartApplication (void); virtual void StopApplication (void); void ScheduleTx (void); @@ -183,8 +183,8 @@ private: virtual void DoRun (void); bool m_writeResults; - class CwndEvent { - public: + class CwndEvent { +public: uint32_t m_oldCwnd; uint32_t m_newCwnd; }; @@ -284,7 +284,7 @@ Ns3TcpCwndTestCase1::DoRun (void) // CongestionWindow attribute on the socket. Normally one would use an on-off // application to generate a flow, but this has a couple of problems. First, // the socket of the on-off application is not created until Application Start - // time, so we wouldn't be able to hook the socket now at configuration time. + // time, so we wouldn't be able to hook the socket now at configuration time. // Second, even if we could arrange a call after start time, the socket is not // public. // @@ -386,8 +386,8 @@ private: virtual void DoRun (void); bool m_writeResults; - class CwndEvent { - public: + class CwndEvent { +public: uint32_t m_oldCwnd; uint32_t m_newCwnd; }; diff --git a/src/test/ns3tcp/ns3tcp-loss-test-suite.cc b/src/test/ns3tcp/ns3tcp-loss-test-suite.cc index 19c510e06..8fd9c33c6 100644 --- a/src/test/ns3tcp/ns3tcp-loss-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-loss-test-suite.cc @@ -115,30 +115,30 @@ Ns3TcpLossTestCase::Ns3TcpLossTestCase (std::string tcpModel, uint32_t testCase) void Ns3TcpLossTestCase::DoSetup (void) { - // - // We expect there to be a file called ns3tcp-state-response-vectors.pcap in - // response-vectors/ of this directory - // - std::ostringstream oss; - oss << "/response-vectors/ns3tcp-loss-" << m_tcpModel << m_testCase << "-response-vectors.pcap"; - m_pcapFilename = NS_TEST_SOURCEDIR + oss.str (); + // + // We expect there to be a file called ns3tcp-state-response-vectors.pcap in + // response-vectors/ of this directory + // + std::ostringstream oss; + oss << "/response-vectors/ns3tcp-loss-" << m_tcpModel << m_testCase << "-response-vectors.pcap"; + m_pcapFilename = NS_TEST_SOURCEDIR + oss.str (); - if (m_writeVectors) - { - m_pcapFile.Open (m_pcapFilename, std::ios::out|std::ios::binary); - m_pcapFile.Init(PCAP_LINK_TYPE, PCAP_SNAPLEN); - } - else - { - m_pcapFile.Open (m_pcapFilename, std::ios::in|std::ios::binary); - NS_ABORT_MSG_UNLESS (m_pcapFile.GetDataLinkType () == PCAP_LINK_TYPE, "Wrong response vectors in directory"); - } + if (m_writeVectors) + { + m_pcapFile.Open (m_pcapFilename, std::ios::out|std::ios::binary); + m_pcapFile.Init(PCAP_LINK_TYPE, PCAP_SNAPLEN); + } + else + { + m_pcapFile.Open (m_pcapFilename, std::ios::in|std::ios::binary); + NS_ABORT_MSG_UNLESS (m_pcapFile.GetDataLinkType () == PCAP_LINK_TYPE, "Wrong response vectors in directory"); + } } void Ns3TcpLossTestCase::DoTeardown (void) { - m_pcapFile.Close (); + m_pcapFile.Close (); } void @@ -164,7 +164,7 @@ Ns3TcpLossTestCase::Ipv4L3Tx (std::string context, Ptr packet, Ptr // Time tNow = Simulator::Now (); int64_t tMicroSeconds = tNow.GetMicroSeconds (); - + uint32_t size = p->GetSize (); uint8_t *buf = new uint8_t[size]; p->CopyData (buf, size); @@ -208,8 +208,8 @@ Ns3TcpLossTestCase::CwndTracer (uint32_t oldval, uint32_t newval) if (m_writeLogging) { *(m_osw->GetStream ()) << "Moving cwnd from " << oldval << " to " << newval - << " at time " << Simulator::Now ().GetSeconds () - << " seconds" << std::endl; + << " at time " << Simulator::Now ().GetSeconds () + << " seconds" << std::endl; } } @@ -233,7 +233,7 @@ Ns3TcpLossTestCase::WriteUntilBufferFull (Ptr localSocket, uint32_t txSp if (m_writeLogging) { std::clog << "Submitting " << toWrite - << " bytes to TCP socket" << std::endl; + << " bytes to TCP socket" << std::endl; } int amountSent = localSocket->Send (0, toWrite, 0); NS_ASSERT (amountSent > 0); // Given GetTxAvailable() non-zero, amountSent should not be zero @@ -244,7 +244,7 @@ Ns3TcpLossTestCase::WriteUntilBufferFull (Ptr localSocket, uint32_t txSp if (m_writeLogging) { std::clog << "Close socket at " - << Simulator::Now ().GetSeconds () << std::endl; + << Simulator::Now ().GetSeconds () << std::endl; } localSocket->Close (); m_needToClose = false; @@ -253,21 +253,21 @@ Ns3TcpLossTestCase::WriteUntilBufferFull (Ptr localSocket, uint32_t txSp void Ns3TcpLossTestCase::StartFlow (Ptr localSocket, - Ipv4Address servAddress, - uint16_t servPort) + Ipv4Address servAddress, + uint16_t servPort) { if (m_writeLogging) { std::clog << "Starting flow at time " - << Simulator::Now ().GetSeconds () << std::endl; + << Simulator::Now ().GetSeconds () << std::endl; } localSocket->Connect (InetSocketAddress (servAddress, servPort)); // connect // tell the tcp implementation to call WriteUntilBufferFull again // if we blocked and new tx buffer space becomes available localSocket->SetSendCallback (MakeCallback - (&Ns3TcpLossTestCase::WriteUntilBufferFull, - this)); + (&Ns3TcpLossTestCase::WriteUntilBufferFull, + this)); WriteUntilBufferFull (localSocket, localSocket->GetTxAvailable ()); } @@ -304,7 +304,7 @@ Ns3TcpLossTestCase::DoRun (void) //////////////////////////////////////////////////////// // Topology construction // - + // Create three nodes: s1, r1, and k1 NodeContainer s1r1; s1r1.Create (2); @@ -363,8 +363,8 @@ Ns3TcpLossTestCase::DoRun (void) MakeCallback (&Ns3TcpLossTestCase::Ipv4L3Tx, this)); Config::ConnectWithoutContext - ("/NodeList/0/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow", - MakeCallback (&Ns3TcpLossTestCase::CwndTracer, this)); + ("/NodeList/0/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow", + MakeCallback (&Ns3TcpLossTestCase::CwndTracer, this)); //////////////////////////////////////////////////////// // Set up loss model at node k1 @@ -425,7 +425,7 @@ Ns3TcpLossTestCase::DoRun (void) *(m_osw->GetStream ()) << std::setprecision (9) << std::fixed; p2p.EnableAsciiAll (m_osw); } - + // Finally, set up the simulator to run. The 1000 second hard limit is a // failsafe in case some change above causes the simulation to never end Simulator::Stop (Seconds (1000)); diff --git a/src/test/ns3tcp/ns3tcp-state-test-suite.cc b/src/test/ns3tcp/ns3tcp-state-test-suite.cc index 83ae936bf..08150c63a 100644 --- a/src/test/ns3tcp/ns3tcp-state-test-suite.cc +++ b/src/test/ns3tcp/ns3tcp-state-test-suite.cc @@ -110,30 +110,30 @@ Ns3TcpStateTestCase::Ns3TcpStateTestCase (uint32_t testCase) void Ns3TcpStateTestCase::DoSetup (void) { - // - // We expect there to be a file called ns3tcp-state-response-vectors.pcap in - // response-vectors/ of this directory - // - std::ostringstream oss; - oss << "/response-vectors/ns3tcp-state" << m_testCase << "-response-vectors.pcap"; - m_pcapFilename = NS_TEST_SOURCEDIR + oss.str (); + // + // We expect there to be a file called ns3tcp-state-response-vectors.pcap in + // response-vectors/ of this directory + // + std::ostringstream oss; + oss << "/response-vectors/ns3tcp-state" << m_testCase << "-response-vectors.pcap"; + m_pcapFilename = NS_TEST_SOURCEDIR + oss.str (); - if (m_writeVectors) - { - m_pcapFile.Open (m_pcapFilename, std::ios::out|std::ios::binary); - m_pcapFile.Init(PCAP_LINK_TYPE, PCAP_SNAPLEN); - } - else - { - m_pcapFile.Open (m_pcapFilename, std::ios::in|std::ios::binary); - NS_ABORT_MSG_UNLESS (m_pcapFile.GetDataLinkType () == PCAP_LINK_TYPE, "Wrong response vectors in directory"); - } + if (m_writeVectors) + { + m_pcapFile.Open (m_pcapFilename, std::ios::out|std::ios::binary); + m_pcapFile.Init(PCAP_LINK_TYPE, PCAP_SNAPLEN); + } + else + { + m_pcapFile.Open (m_pcapFilename, std::ios::in|std::ios::binary); + NS_ABORT_MSG_UNLESS (m_pcapFile.GetDataLinkType () == PCAP_LINK_TYPE, "Wrong response vectors in directory"); + } } void Ns3TcpStateTestCase::DoTeardown (void) { - m_pcapFile.Close (); + m_pcapFile.Close (); } void @@ -159,7 +159,7 @@ Ns3TcpStateTestCase::Ipv4L3Tx (std::string context, Ptr packet, Pt // Time tNow = Simulator::Now (); int64_t tMicroSeconds = tNow.GetMicroSeconds (); - + uint32_t size = p->GetSize (); uint8_t *buf = new uint8_t[size]; p->CopyData (buf, size); @@ -217,7 +217,7 @@ Ns3TcpStateTestCase::WriteUntilBufferFull (Ptr localSocket, uint32_t txS if (m_writeLogging) { std::clog << "Submitting " - << toWrite << " bytes to TCP socket" << std::endl; + << toWrite << " bytes to TCP socket" << std::endl; } int amountSent = localSocket->Send (0, toWrite, 0); NS_ASSERT (amountSent > 0); // Given GetTxAvailable() non-zero, amountSent should not be zero @@ -228,8 +228,8 @@ Ns3TcpStateTestCase::WriteUntilBufferFull (Ptr localSocket, uint32_t txS if (m_writeLogging) { std::clog << "Close socket at " - << Simulator::Now ().GetSeconds () - << std::endl; + << Simulator::Now ().GetSeconds () + << std::endl; } localSocket->Close (); m_needToClose = false; @@ -244,8 +244,8 @@ Ns3TcpStateTestCase::StartFlow (Ptr localSocket, if (m_writeLogging) { std::clog << "Starting flow at time " - << Simulator::Now ().GetSeconds () - << std::endl; + << Simulator::Now ().GetSeconds () + << std::endl; } localSocket->Connect (InetSocketAddress (servAddress, servPort)); // connect @@ -253,8 +253,8 @@ Ns3TcpStateTestCase::StartFlow (Ptr localSocket, // tell the tcp implementation to call WriteUntilBufferFull again // if we blocked and new tx buffer space becomes available localSocket->SetSendCallback (MakeCallback - (&Ns3TcpStateTestCase::WriteUntilBufferFull, - this)); + (&Ns3TcpStateTestCase::WriteUntilBufferFull, + this)); WriteUntilBufferFull (localSocket, localSocket->GetTxAvailable ()); } @@ -288,7 +288,7 @@ Ns3TcpStateTestCase::DoRun (void) //////////////////////////////////////////////////////// // Topology construction // - + // Create three nodes NodeContainer n0n1; n0n1.Create (2); @@ -328,7 +328,7 @@ Ns3TcpStateTestCase::DoRun (void) ApplicationContainer sinkApps = sink.Install (n1n2.Get (1)); sinkApps.Start (Seconds (0.0)); sinkApps.Stop (Seconds (100.0)); - + // Create a data source to send packets on node n0 // Instead of full application, here use the socket directly by // registering callbacks in function StarFlow(). @@ -426,7 +426,7 @@ Ns3TcpStateTestCase::DoRun (void) p2p.EnableAsciiAll (osw); std::clog << std::endl << "Running TCP test-case " << m_testCase << ": " - << caseDescription << std::endl; + << caseDescription << std::endl; } // Finally, set up the simulator to run. The 1000 second hard limit is a diff --git a/src/test/ns3wifi/wifi-interference-test-suite.cc b/src/test/ns3wifi/wifi-interference-test-suite.cc index effea94ed..ef01f5db2 100644 --- a/src/test/ns3wifi/wifi-interference-test-suite.cc +++ b/src/test/ns3wifi/wifi-interference-test-suite.cc @@ -61,7 +61,7 @@ private: static void GenerateTraffic (Ptr socket, uint32_t pktSize, uint32_t pktCount, Time pktInterval); void PrintEndSync (std::string context, uint32_t dataRate, double snr, double per); double WifiSimpleInterference (std::string phyMode, double Prss, double Irss, double delta, uint32_t PpacketSize, - uint32_t IpacketSize, bool verbose, InternetStackHelper internet); + uint32_t IpacketSize, bool verbose, InternetStackHelper internet); double m_PER; double m_SNR; uint32_t m_DataRate; @@ -84,6 +84,9 @@ WifiInterferenceTestCase::ReceivePacket (Ptr socket) socket->GetSockName (addr); InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (addr); NS_LOG_UNCOND ("Received one packet! Socket: " << iaddr.GetIpv4 () << " port: " << iaddr.GetPort ()); + //cast iaddr to void, to suppress 'iaddr' set but not used compiler warning + //in optimized builds + (void) iaddr; } void @@ -112,22 +115,22 @@ WifiInterferenceTestCase::PrintEndSync (std::string context, uint32_t dataRate, double WifiInterferenceTestCase::WifiSimpleInterference (std::string phyMode,double Prss, double Irss, double delta, uint32_t PpacketSize, uint32_t IpacketSize, bool verbose, InternetStackHelper internet) { - + uint32_t numPackets = 1; double interval = 1.0; // seconds double startTime = 10.0; // seconds double distanceToRx = 100.0; // meters - + double offset = 91; // This is a magic number used to set the // transmit power, based on other configuration - + m_PER = 0; m_SNR = 0; m_DataRate = 0; - + // Convert to time object Time interPacketInterval = Seconds (interval); - + // disable fragmentation for frames below 2200 bytes Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200")); // turn off RTS/CTS for frames below 2200 bytes @@ -135,28 +138,28 @@ WifiInterferenceTestCase::WifiSimpleInterference (std::string phyMode,double Prs // Fix non-unicast data rate to be the same as that of unicast Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", StringValue (phyMode)); - + NodeContainer c; c.Create (3); - + // The below set of helpers will help us to put together the wifi NICs we want WifiHelper wifi; wifi.SetStandard (WIFI_PHY_STANDARD_80211b); - + YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); // This is one parameter that matters when using FixedRssLossModel // set it to zero; otherwise, gain will be added wifiPhy.Set ("RxGain", DoubleValue (0) ); wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0) ); - + // ns-3 supports RadioTap and Prism tracing extensions for 802.11b wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO); - + YansWifiChannelHelper wifiChannel ; wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); wifiChannel.AddPropagationLoss ("ns3::LogDistancePropagationLossModel"); wifiPhy.SetChannel (wifiChannel.Create ()); - + // Add a non-QoS upper mac, and disable rate control NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", @@ -172,7 +175,7 @@ WifiInterferenceTestCase::WifiSimpleInterference (std::string phyMode,double Prs devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1))); wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) ); devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (2))); - + // Note that with FixedRssLossModel, the positions below are not // used for received signal strength. MobilityHelper mobility; @@ -184,45 +187,45 @@ WifiInterferenceTestCase::WifiSimpleInterference (std::string phyMode,double Prs mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); mobility.Install (c); - // InternetStackHelper internet; + // InternetStackHelper internet; internet.Install (c); Ipv4AddressHelper ipv4; NS_LOG_INFO ("Assign IP Addresses."); ipv4.SetBase ("10.1.1.0", "255.255.255.0"); Ipv4InterfaceContainer i = ipv4.Assign (devices); - + TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory"); Ptr recvSink = Socket::CreateSocket (c.Get (0), tid); InetSocketAddress local = InetSocketAddress (Ipv4Address("10.1.1.1"), 80); recvSink->Bind (local); recvSink->SetRecvCallback (MakeCallback (&WifiInterferenceTestCase::ReceivePacket, this)); - + Ptr source = Socket::CreateSocket (c.Get (1), tid); InetSocketAddress remote = InetSocketAddress (Ipv4Address ("255.255.255.255"), 80); source->Connect (remote); - + // Interferer will send to a different port; we will not see a // "Received packet" message Ptr interferer = Socket::CreateSocket (c.Get (2), tid); InetSocketAddress interferingAddr = InetSocketAddress (Ipv4Address ("255.255.255.255"), 49000); interferer->Connect (interferingAddr); - + Config::Connect ("/NodeList/0/DeviceList/0/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/EndSync", MakeCallback (&WifiInterferenceTestCase::PrintEndSync, this)); // Tracing // wifiPhy.EnablePcap ("wifi-simple-interference", devices.Get (0)); - + Simulator::ScheduleWithContext (source->GetNode ()->GetId (), - Seconds (startTime), &GenerateTraffic, - source, PpacketSize, numPackets, interPacketInterval); - + Seconds (startTime), &GenerateTraffic, + source, PpacketSize, numPackets, interPacketInterval); + Simulator::ScheduleWithContext (interferer->GetNode ()->GetId (), - Seconds (startTime + delta/1000000.0), &GenerateTraffic, - interferer, IpacketSize, numPackets, interPacketInterval); - + Seconds (startTime + delta/1000000.0), &GenerateTraffic, + interferer, IpacketSize, numPackets, interPacketInterval); + Simulator::Run (); Simulator::Destroy (); - + return m_PER; } @@ -239,28 +242,28 @@ WifiInterferenceTestCase::DoRun (void) bool verbose = false; double PER, PER1, PER2; InternetStackHelper internet; - + // Compute the packet error rate (PER) when delta=0 microseconds. This // means that the interferer arrives at exactly the same time as the // intended packet PER = WifiSimpleInterference (phyMode,Prss,Irss,delta,PpacketSize,IpacketSize,verbose,internet); - + // Now rerun this test case and compute the PER when the delta time between // arrival of the intended frame and interferer is 1 microsecond. delta = 1; PER1 = WifiSimpleInterference (phyMode,Prss,Irss,delta,PpacketSize,IpacketSize,verbose,internet); - + // Now rerun this test case and compute the PER when the delta time between // arrival of the intended frame and interferer is 2 microseconds. delta = 2; PER2 = WifiSimpleInterference (phyMode,Prss,Irss,delta,PpacketSize,IpacketSize,verbose,internet); - + double PERDiff1 = PER - PER1; - + double PERDiff2 = PER1 - PER2; - + NS_TEST_ASSERT_MSG_EQ (PERDiff1, PERDiff2, - "The PER difference due to 1 microsecond difference in arrival shouldn't depend on absolute arrival"); + "The PER difference due to 1 microsecond difference in arrival shouldn't depend on absolute arrival"); } class WifiInterferenceTestSuite : public TestSuite diff --git a/src/test/perf/perf-io.cc b/src/test/perf/perf-io.cc index ec0bb7731..a7a1fe815 100644 --- a/src/test/perf/perf-io.cc +++ b/src/test/perf/perf-io.cc @@ -83,7 +83,7 @@ main (int argc, char *argv[]) cmd.Parse (argc, argv); uint64_t result = std::numeric_limits::max (); - + char buffer[1024]; if (doStream) diff --git a/src/test/static-routing-test-suite.cc b/src/test/static-routing-test-suite.cc index 7c4e05297..94eeee348 100644 --- a/src/test/static-routing-test-suite.cc +++ b/src/test/static-routing-test-suite.cc @@ -89,7 +89,7 @@ StaticRoutingSlash32TestCase::DoRun (void) NetDeviceContainer dAdB = p2p.Install (nAnB); NetDeviceContainer dBdC = p2p.Install (nBnC);; - + Ptr deviceA = CreateObject (); deviceA->SetAddress (Mac48Address::Allocate ()); nA->AddDevice (deviceA); @@ -98,7 +98,7 @@ StaticRoutingSlash32TestCase::DoRun (void) deviceC->SetAddress (Mac48Address::Allocate ()); nC->AddDevice (deviceC); - // Later, we add IP addresses. + // Later, we add IP addresses. Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.252"); Ipv4InterfaceContainer iAiB = ipv4.Assign (dAdB); @@ -109,10 +109,10 @@ StaticRoutingSlash32TestCase::DoRun (void) Ptr ipv4A = nA->GetObject (); Ptr ipv4B = nB->GetObject (); Ptr ipv4C = nC->GetObject (); - + int32_t ifIndexA = ipv4A->AddInterface (deviceA); int32_t ifIndexC = ipv4C->AddInterface (deviceC); - + Ipv4InterfaceAddress ifInAddrA = Ipv4InterfaceAddress (Ipv4Address ("172.16.1.1"), Ipv4Mask ("/32")); ipv4A->AddAddress (ifIndexA, ifInAddrA); ipv4A->SetMetric (ifIndexA, 1); @@ -135,7 +135,7 @@ StaticRoutingSlash32TestCase::DoRun (void) // 210 bytes at a rate of 448 Kb/s uint16_t port = 9; // Discard port (RFC 863) OnOffHelper onoff ("ns3::UdpSocketFactory", - Address (InetSocketAddress (ifInAddrC.GetLocal (), port))); + Address (InetSocketAddress (ifInAddrC.GetLocal (), port))); onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1))); onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0))); onoff.SetAttribute ("DataRate", DataRateValue (DataRate (6000))); @@ -145,7 +145,7 @@ StaticRoutingSlash32TestCase::DoRun (void) // Create a packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (nC); apps.Start (Seconds (1.0)); apps.Stop (Seconds (10.0)); diff --git a/src/test/wscript b/src/test/wscript index 170738351..b5235c5da 100644 --- a/src/test/wscript +++ b/src/test/wscript @@ -12,7 +12,6 @@ def build(bld): test_test.source = [ 'csma-system-test-suite.cc', 'global-routing-test-suite.cc', - 'sample-test-suite.cc', 'static-routing-test-suite.cc', 'error-model-test-suite.cc', 'mobility-test-suite.cc', diff --git a/src/tools/model/average.h b/src/tools/model/average.h index e6b8d4fc6..1bdec4cb3 100644 --- a/src/tools/model/average.h +++ b/src/tools/model/average.h @@ -28,7 +28,18 @@ namespace ns3 { -/// Simple average, min, max and std. deviation calculator +/** + * \defgroup tools Tools + * + */ + +/** + * \ingroup tools + * + * Simple average, min, max and std. deviation calculator + * + */ + template class Average { @@ -75,10 +86,10 @@ public: /// Standard deviation double Stddev () const { return sqrt (Var ());} //\} - + /** * \name Error of the mean estimates - * + * * Note that estimates are valid for * - uncorrelated measurements, * - normal distribution and diff --git a/src/tools/model/delay-jitter-estimation.cc b/src/tools/model/delay-jitter-estimation.cc index b96a3c25d..d6376bf8e 100644 --- a/src/tools/model/delay-jitter-estimation.cc +++ b/src/tools/model/delay-jitter-estimation.cc @@ -25,49 +25,50 @@ private: DelayJitterEstimationTimestampTag::DelayJitterEstimationTimestampTag () : m_creationTime (Simulator::Now ().GetTimeStep ()) -{} +{ +} -TypeId +TypeId DelayJitterEstimationTimestampTag::GetTypeId (void) { static TypeId tid = TypeId ("anon::DelayJitterEstimationTimestampTag") .SetParent () .AddConstructor () .AddAttribute ("CreationTime", - "The time at which the timestamp was created", - StringValue ("0.0s"), - MakeTimeAccessor (&DelayJitterEstimationTimestampTag::GetTxTime), - MakeTimeChecker ()) - ; + "The time at which the timestamp was created", + StringValue ("0.0s"), + MakeTimeAccessor (&DelayJitterEstimationTimestampTag::GetTxTime), + MakeTimeChecker ()) + ; return tid; } -TypeId +TypeId DelayJitterEstimationTimestampTag::GetInstanceTypeId (void) const { return GetTypeId (); } -uint32_t +uint32_t DelayJitterEstimationTimestampTag::GetSerializedSize (void) const { return 8; } -void +void DelayJitterEstimationTimestampTag::Serialize (TagBuffer i) const { i.WriteU64 (m_creationTime); } -void +void DelayJitterEstimationTimestampTag::Deserialize (TagBuffer i) { m_creationTime = i.ReadU64 (); } -void +void DelayJitterEstimationTimestampTag::Print (std::ostream &os) const { os << "CreationTime=" << m_creationTime; } -Time +Time DelayJitterEstimationTimestampTag::GetTxTime (void) const { return TimeStep (m_creationTime); @@ -78,14 +79,15 @@ DelayJitterEstimation::DelayJitterEstimation () m_previousRxTx (Simulator::Now ()), m_jitter (0), m_delay (Seconds (0.0)) -{} -void +{ +} +void DelayJitterEstimation::PrepareTx (Ptr packet) { DelayJitterEstimationTimestampTag tag; packet->AddByteTag (tag); } -void +void DelayJitterEstimation::RecordRx (Ptr packet) { DelayJitterEstimationTimestampTag tag; diff --git a/src/tools/model/delay-jitter-estimation.h b/src/tools/model/delay-jitter-estimation.h index aa6c41e93..25857b6a8 100644 --- a/src/tools/model/delay-jitter-estimation.h +++ b/src/tools/model/delay-jitter-estimation.h @@ -7,6 +7,8 @@ namespace ns3 { /** + * \ingroup tools + * * \brief quick and dirty delay and jitter estimation * */ diff --git a/src/tools/model/event-garbage-collector.cc b/src/tools/model/event-garbage-collector.cc index 7d023f525..eb0c8bc60 100644 --- a/src/tools/model/event-garbage-collector.cc +++ b/src/tools/model/event-garbage-collector.cc @@ -28,7 +28,8 @@ namespace ns3 { EventGarbageCollector::EventGarbageCollector () : m_nextCleanupSize (CLEANUP_CHUNK_MIN_SIZE) -{} +{ +} void EventGarbageCollector::Track (EventId event) @@ -41,7 +42,7 @@ EventGarbageCollector::Track (EventId event) void EventGarbageCollector::Grow () { - m_nextCleanupSize += (m_nextCleanupSize < CLEANUP_CHUNK_MAX_SIZE? + m_nextCleanupSize += (m_nextCleanupSize < CLEANUP_CHUNK_MAX_SIZE ? m_nextCleanupSize : CLEANUP_CHUNK_MAX_SIZE); } diff --git a/src/tools/model/event-garbage-collector.h b/src/tools/model/event-garbage-collector.h index 674de1a42..ca19e74a0 100644 --- a/src/tools/model/event-garbage-collector.h +++ b/src/tools/model/event-garbage-collector.h @@ -27,6 +27,8 @@ namespace ns3 { /** + * \ingroup tools + * * \brief An object that tracks scheduled events and automatically * cancels them when it is destroyed. It is useful in situations * where multiple instances of the same type of event can diff --git a/src/tools/model/gnuplot.cc b/src/tools/model/gnuplot.cc index eb698dab4..4c7c9880b 100644 --- a/src/tools/model/gnuplot.cc +++ b/src/tools/model/gnuplot.cc @@ -55,7 +55,7 @@ struct GnuplotDataset::Data * m_extra in the output. */ virtual void PrintExpression(std::ostream &os) const = 0; - + /** * Print the inline data file contents trailing the plot command. Empty for * functions. @@ -130,7 +130,7 @@ GnuplotDataset::SetExtra (const std::string& extra) struct Gnuplot2dDataset::Data2d : public GnuplotDataset::Data { // *** Data Variables *** - + enum Style m_style; enum ErrorBars m_errorBars; @@ -168,59 +168,59 @@ Gnuplot2dDataset::Data2d::PrintExpression(std::ostream &os) const os << " title '" << m_title << "'"; switch (m_style) { - case LINES: - os << " with lines"; - break; - case POINTS: - switch (m_errorBars) - { - case NONE: - os << " with points"; - break; - case X: - os << " with xerrorbars"; - break; - case Y: - os << " with yerrorbars"; - break; - case XY: - os << " with xyerrorbars"; - break; - } - break; - case LINES_POINTS: - switch (m_errorBars) - { - case NONE: - os << " with linespoints"; - break; - case X: - os << " with errorlines"; - break; - case Y: - os << " with yerrorlines"; - break; - case XY: - os << " with xyerrorlines"; - break; - } - break; - case DOTS: - os << " with dots"; - break; - case IMPULSES: - os << " with impulses"; - break; - case STEPS: - os << " with steps"; - break; - case FSTEPS: - os << " with fsteps"; - break; - case HISTEPS: - os << " with histeps"; - break; - } + case LINES: + os << " with lines"; + break; + case POINTS: + switch (m_errorBars) + { + case NONE: + os << " with points"; + break; + case X: + os << " with xerrorbars"; + break; + case Y: + os << " with yerrorbars"; + break; + case XY: + os << " with xyerrorbars"; + break; + } + break; + case LINES_POINTS: + switch (m_errorBars) + { + case NONE: + os << " with linespoints"; + break; + case X: + os << " with errorlines"; + break; + case Y: + os << " with yerrorlines"; + break; + case XY: + os << " with xyerrorlines"; + break; + } + break; + case DOTS: + os << " with dots"; + break; + case IMPULSES: + os << " with impulses"; + break; + case STEPS: + os << " with steps"; + break; + case FSTEPS: + os << " with fsteps"; + break; + case HISTEPS: + os << " with histeps"; + break; + } if (m_extra.size()) os << " " << m_extra; @@ -233,24 +233,24 @@ Gnuplot2dDataset::Data2d::PrintDatafile(std::ostream &os) const i != m_pointset.end (); ++i) { if (i->empty) { - os << std::endl; - continue; - } + os << std::endl; + continue; + } switch (m_errorBars) { - case NONE: - os << i->x << " " << i->y << std::endl; - break; - case X: - os << i->x << " " << i->y << " " << i->dx << std::endl; - break; - case Y: - os << i->x << " " << i->y << " " << i->dy << std::endl; - break; - case XY: - os << i->x << " " << i->y << " " << i->dx << " " << i->dy << std::endl; - break; - } + case NONE: + os << i->x << " " << i->y << std::endl; + break; + case X: + os << i->x << " " << i->y << " " << i->dx << std::endl; + break; + case Y: + os << i->x << " " << i->y << " " << i->dy << std::endl; + break; + case XY: + os << i->x << " " << i->y << " " << i->dx << " " << i->dy << std::endl; + break; + } } os << "e" << std::endl; } @@ -404,7 +404,7 @@ Gnuplot2dFunction::SetFunction (const std::string& function) struct Gnuplot3dDataset::Data3d : public GnuplotDataset::Data { // *** Data Variables *** - + std::string m_style; PointSet m_pointset; @@ -453,9 +453,9 @@ Gnuplot3dDataset::Data3d::PrintDatafile(std::ostream &os) const i != m_pointset.end (); ++i) { if (i->empty) { - os << std::endl; - continue; - } + os << std::endl; + continue; + } os << i->x << " " << i->y << " " << i->z << std::endl; } @@ -576,11 +576,11 @@ std::string Gnuplot::DetectTerminal (const std::string& filename) if (dotpos == std::string::npos) return ""; if (filename.substr(dotpos) == ".png") { - return "png"; - } + return "png"; + } else if (filename.substr(dotpos) == ".pdf") { - return "pdf"; - } + return "pdf"; + } return ""; } @@ -634,7 +634,7 @@ Gnuplot::GenerateOutput (std::ostream &os) const if (m_title.size()) os << "set title '" << m_title << "'" << std::endl; - + if (m_xLegend.size()) os << "set xlabel '" << m_xLegend << "'" << std::endl; @@ -670,9 +670,9 @@ Gnuplot::GenerateOutput (std::ostream &os) const i++; if (i != m_datasets.end ()) - { - os << ", "; - } + { + os << ", "; + } } os << std::endl; diff --git a/src/tools/model/gnuplot.h b/src/tools/model/gnuplot.h index 5e8329e8e..9328f3ac7 100644 --- a/src/tools/model/gnuplot.h +++ b/src/tools/model/gnuplot.h @@ -28,6 +28,8 @@ namespace ns3 { /** + * \ingroup tools + * * \brief Abstract class to store a plot line to be used by ns3::Gnuplot. * * This class contains a reference counted data object in m_data. The data diff --git a/src/tools/test/event-garbage-collector-test-suite.cc b/src/tools/test/event-garbage-collector-test-suite.cc index 496315c5e..583d3e479 100644 --- a/src/tools/test/event-garbage-collector-test-suite.cc +++ b/src/tools/test/event-garbage-collector-test-suite.cc @@ -39,10 +39,12 @@ public: EventGarbageCollectorTestCase::EventGarbageCollectorTestCase () : TestCase ("EventGarbageCollector"), m_counter (0), m_events (0) -{} +{ +} EventGarbageCollectorTestCase::~EventGarbageCollectorTestCase () -{} +{ +} void EventGarbageCollectorTestCase::EventGarbageCollectorCallback () @@ -63,9 +65,9 @@ void EventGarbageCollectorTestCase::DoRun (void) for (int n = 0; n < 100; n++) { m_events->Track (Simulator::Schedule - (Simulator::Now (), - &EventGarbageCollectorTestCase::EventGarbageCollectorCallback, - this)); + (Simulator::Now (), + &EventGarbageCollectorTestCase::EventGarbageCollectorCallback, + this)); } Simulator::Run (); NS_TEST_EXPECT_MSG_EQ (m_events, 0, ""); @@ -82,6 +84,6 @@ public: AddTestCase (new EventGarbageCollectorTestCase ()); } } g_eventGarbageCollectorTests; - + } diff --git a/src/topology-read/model/topology.h b/src/topology-read/doc/topology.h similarity index 67% rename from src/topology-read/model/topology.h rename to src/topology-read/doc/topology.h index 8b55480d6..a0b74de1d 100644 --- a/src/topology-read/model/topology.h +++ b/src/topology-read/doc/topology.h @@ -1,5 +1,7 @@ /** - * \addtogroup topology Topology Input Readers + * \defgroup topology Topology Input Readers + * + * \section topologyOverview Topology Input Readers Overview * * The topology modules aim at reading a topology file generated by an automatic topology generator. * @@ -9,9 +11,12 @@ * * Hence, model is focused on being able to read correctly the various topology formats. * - * Currently there are two models: - * - Orbis 0.7 - * - Inet 3.0 + * Currently there are three models: + * - ns3::OrbisTopologyReader for Orbis 0.7 traces (http://sysnet.ucsd.edu/~pmahadevan/topo_research/topo.html) + * - ns3::InetTopologyReader for Inet 3.0 traces (http://topology.eecs.umich.edu/inet/) + * - ns3::RocketfuelTopologyReader for Rocketfuel traces (http://www.cs.washington.edu/research/networking/rocketfuel/) + * + * An helper ns3::TopologyReaderHelper is provided to assist on trivial tasks. * * A good source for topology data is also Archipelago (http://www.caida.org/projects/ark/) * @@ -29,4 +34,5 @@ * used create a rescaled version of the topology, thus being the most effective way * (to my best knowledge) to make an internet-like topology. * + * Examples can be found in the directory src/topology-read/examples/ */ diff --git a/src/topology-read/examples/topology-example-sim.cc b/src/topology-read/examples/topology-example-sim.cc index f6280a600..21e9ea6c6 100644 --- a/src/topology-read/examples/topology-example-sim.cc +++ b/src/topology-read/examples/topology-example-sim.cc @@ -80,12 +80,12 @@ int main (int argc, char *argv[]) Ptr inFile = 0; TopologyReaderHelper topoHelp; - + NodeContainer nodes; - - topoHelp.SetFileName(input); - topoHelp.SetFileType(format); - inFile = topoHelp.GetTopologyReader(); + + topoHelp.SetFileName (input); + topoHelp.SetFileType (format); + inFile = topoHelp.GetTopologyReader (); if (inFile != 0) { @@ -112,7 +112,7 @@ int main (int argc, char *argv[]) listRH.Add (staticRouting, 0); listRH.Add (nixRouting, 10); - stack.SetRoutingHelper (listRH); + stack.SetRoutingHelper (listRH); // has effect on the next Install () stack.Install (nodes); NS_LOG_INFO ("creating ip4 addresses"); diff --git a/src/topology-read/helper/topology-reader-helper.h b/src/topology-read/helper/topology-reader-helper.h index 26c993090..fd9d42ad7 100644 --- a/src/topology-read/helper/topology-reader-helper.h +++ b/src/topology-read/helper/topology-reader-helper.h @@ -28,7 +28,6 @@ namespace ns3 { /** - * \ingroup topology * \brief Helper class which makes it easier to configure and use a generic TopologyReader. */ class TopologyReaderHelper diff --git a/src/topology-read/model/inet-topology-reader.h b/src/topology-read/model/inet-topology-reader.h index 39e4200e8..e9c31ed81 100644 --- a/src/topology-read/model/inet-topology-reader.h +++ b/src/topology-read/model/inet-topology-reader.h @@ -32,7 +32,6 @@ namespace ns3 { // ------------------------------------------------------------ // -------------------------------------------- /** - * \ingroup topology * \brief Topology file reader (Inet-format type). * * This class takes an input file in Inet format and extracts all diff --git a/src/topology-read/model/orbis-topology-reader.h b/src/topology-read/model/orbis-topology-reader.h index 7e83afbc4..9afe2a9bc 100644 --- a/src/topology-read/model/orbis-topology-reader.h +++ b/src/topology-read/model/orbis-topology-reader.h @@ -32,7 +32,6 @@ namespace ns3 { // ------------------------------------------------------------ // -------------------------------------------- /** - * \ingroup topology * \brief Topology file reader (Orbis-format type). * * This class takes an input file in Orbis format and extracts all diff --git a/src/topology-read/model/rocketfuel-topology-reader.cc b/src/topology-read/model/rocketfuel-topology-reader.cc index 5cd04af6d..ec7eada25 100644 --- a/src/topology-read/model/rocketfuel-topology-reader.cc +++ b/src/topology-read/model/rocketfuel-topology-reader.cc @@ -96,10 +96,14 @@ RocketfuelTopologyReader::GenerateFromMapsFile (int argc, char *argv[]) loc = argv[1]; if (argv[2]) - dns = true; + { + dns = true; + } if (argv[3]) - bb = true; + { + bb = true; + } num_neigh_s = ::atoi (argv[4]); if (num_neigh_s < 0) @@ -148,9 +152,14 @@ RocketfuelTopologyReader::GenerateFromMapsFile (int argc, char *argv[]) /* uid @loc [+] [bb] (num_neigh) [&ext] -> ... {-euid} ... =name[!] rn */ NS_LOG_INFO ("Load Node[" << uid << "]: location: " << loc << " dns: " << dns - << " bb: " << bb << " neighbors: " << neigh_list.size () - << "(" << "%d" << ") externals: \"%s\"(%d) " - << "name: " << name << " radius: " << radius); + << " bb: " << bb << " neighbors: " << neigh_list.size () + << "(" << "%d" << ") externals: \"%s\"(%d) " + << "name: " << name << " radius: " << radius); + + //cast bb and dns to void, to suppress variable set but not used compiler warning + //in optimized builds + (void) bb; + (void) dns; // Create node and link if (!uid.empty ()) @@ -199,7 +208,9 @@ RocketfuelTopologyReader::GenerateFromWeightsFile (int argc, char *argv[]) sname = argv[0]; tname = argv[1]; - (void) strtod (argv[2], &endptr); // weight + double v = strtod (argv[2], &endptr); // weight + // cast v to void , to suppress 'v' set but not used compiler warning + (void) v; if (*endptr != '\0') { NS_LOG_WARN ("invalid weight: " << argv[2]); @@ -229,8 +240,8 @@ RocketfuelTopologyReader::GenerateFromWeightsFile (int argc, char *argv[]) bool found = false; for (iter = LinksBegin (); iter != LinksEnd (); iter++) { - if ((iter->GetFromNode () == nodeMap[tname]) && - (iter->GetToNode () == nodeMap[sname])) + if ((iter->GetFromNode () == nodeMap[tname]) + && (iter->GetToNode () == nodeMap[sname])) { found = true; break; @@ -256,7 +267,7 @@ RocketfuelTopologyReader::GetFileType (const char *line) char errbuf[512]; // Check whether MAPS file or not - ret = regcomp (®ex, ROCKETFUEL_MAPS_LINE, REG_EXTENDED|REG_NEWLINE); + ret = regcomp (®ex, ROCKETFUEL_MAPS_LINE, REG_EXTENDED | REG_NEWLINE); if (ret != 0) { regerror (ret, ®ex, errbuf, sizeof (errbuf)); @@ -271,7 +282,7 @@ RocketfuelTopologyReader::GetFileType (const char *line) regfree (®ex); // Check whether Weights file or not - ret = regcomp (®ex, ROCKETFUEL_WEIGHTS_LINE, REG_EXTENDED|REG_NEWLINE); + ret = regcomp (®ex, ROCKETFUEL_WEIGHTS_LINE, REG_EXTENDED | REG_NEWLINE); if (ret != 0) { regerror (ret, ®ex, errbuf, sizeof (errbuf)); @@ -337,7 +348,7 @@ RocketfuelTopologyReader::Read (void) if (ftype == RF_MAPS) { - ret = regcomp (®ex, ROCKETFUEL_MAPS_LINE, REG_EXTENDED|REG_NEWLINE); + ret = regcomp (®ex, ROCKETFUEL_MAPS_LINE, REG_EXTENDED | REG_NEWLINE); if (ret != 0) { regerror (ret, ®ex, errbuf, sizeof (errbuf)); @@ -355,7 +366,7 @@ RocketfuelTopologyReader::Read (void) } else if (ftype == RF_WEIGHTS) { - ret = regcomp (®ex, ROCKETFUEL_WEIGHTS_LINE, REG_EXTENDED|REG_NEWLINE); + ret = regcomp (®ex, ROCKETFUEL_WEIGHTS_LINE, REG_EXTENDED | REG_NEWLINE); if (ret != 0) { regerror (ret, ®ex, errbuf, sizeof (errbuf)); @@ -380,12 +391,12 @@ RocketfuelTopologyReader::Read (void) { if (regmatch[i].rm_so == -1) { - argv[i-1] = NULL; + argv[i - 1] = NULL; } else { line[regmatch[i].rm_eo] = '\0'; - argv[i-1] = &line[regmatch[i].rm_so]; + argv[i - 1] = &line[regmatch[i].rm_so]; argc = i; } } diff --git a/src/topology-read/model/rocketfuel-topology-reader.h b/src/topology-read/model/rocketfuel-topology-reader.h index 2d889ce7a..105791db7 100644 --- a/src/topology-read/model/rocketfuel-topology-reader.h +++ b/src/topology-read/model/rocketfuel-topology-reader.h @@ -31,7 +31,6 @@ namespace ns3 { // ------------------------------------------------------------ // -------------------------------------------- /** - * \ingroup topology * \brief Topology file reader (Rocketfuel-format type). * * http://www.cs.washington.edu/research/networking/rocketfuel/ @@ -71,11 +70,11 @@ private: NodeContainer GenerateFromWeightsFile (int argc, char *argv[]); enum RF_FileType - { - RF_MAPS, - RF_WEIGHTS, - RF_UNKNOWN - }; + { + RF_MAPS, + RF_WEIGHTS, + RF_UNKNOWN + }; enum RF_FileType GetFileType (const char *); // end class RocketfuelTopologyReader diff --git a/src/topology-read/model/topology-reader.h b/src/topology-read/model/topology-reader.h index cd9beb23e..a23617e17 100644 --- a/src/topology-read/model/topology-reader.h +++ b/src/topology-read/model/topology-reader.h @@ -33,11 +33,6 @@ namespace ns3 { /** - * \defgroup topology Topology Input Readers - */ - -/** - * \ingroup topology * \brief Interface for input file readers management. * * This interface perform the shared tasks among all possible input file readers. @@ -48,7 +43,6 @@ class TopologyReader : public Object public: /** - * \ingroup topology * \brief Inner class holding the details about a link between two nodes. * * The link is not described in terms of technology. Rather it is only stating @@ -190,7 +184,6 @@ private: void AddLink (Link link); private: - TopologyReader (const TopologyReader&); TopologyReader& operator= (const TopologyReader&); diff --git a/src/topology-read/test/rocketfuel-topology-reader-test-suite.cc b/src/topology-read/test/rocketfuel-topology-reader-test-suite.cc index eda81abf5..c0a960dc7 100644 --- a/src/topology-read/test/rocketfuel-topology-reader-test-suite.cc +++ b/src/topology-read/test/rocketfuel-topology-reader-test-suite.cc @@ -33,7 +33,7 @@ namespace ns3 { -class RocketfuelTopologyReaderTest: public TestCase +class RocketfuelTopologyReaderTest : public TestCase { public: RocketfuelTopologyReaderTest (); @@ -42,8 +42,9 @@ private: }; RocketfuelTopologyReaderTest::RocketfuelTopologyReaderTest () - : TestCase ("RocketfuelTopologyReaderTest") -{} + : TestCase ("RocketfuelTopologyReaderTest") +{ +} void @@ -51,11 +52,11 @@ RocketfuelTopologyReaderTest::DoRun (void) { Ptr inFile; NodeContainer nodes; - + std::string input ("./src/topology-read/examples/RocketFuel_toposample_1239_weights.txt"); inFile = CreateObject (); - inFile->SetFileName(input); + inFile->SetFileName (input); if (inFile != 0) { @@ -76,7 +77,7 @@ class RocketfuelTopologyReaderTestSuite : public TestSuite public: RocketfuelTopologyReaderTestSuite (); private: -}; +}; RocketfuelTopologyReaderTestSuite::RocketfuelTopologyReaderTestSuite () : TestSuite ("rocketfuel-topology-reader", UNIT) diff --git a/src/topology-read/wscript b/src/topology-read/wscript index 0285c806f..d50441e1b 100644 --- a/src/topology-read/wscript +++ b/src/topology-read/wscript @@ -18,7 +18,6 @@ def build(bld): headers = bld.new_task_gen('ns3header') headers.module = 'topology-read' headers.source = [ - 'model/topology.h', 'model/topology-reader.h', 'model/inet-topology-reader.h', 'model/orbis-topology-reader.h', diff --git a/doc/manual/figures/auvmobility-classes.dia b/src/uan/doc/auvmobility-classes.dia similarity index 100% rename from doc/manual/figures/auvmobility-classes.dia rename to src/uan/doc/auvmobility-classes.dia diff --git a/src/uan/doc/uan.h b/src/uan/doc/uan.h index e1918d0fa..f07362a5d 100644 --- a/src/uan/doc/uan.h +++ b/src/uan/doc/uan.h @@ -19,7 +19,6 @@ */ /** - * \ingroup devices * \defgroup UAN UAN Models * * \section UanOverview UAN Framework Overview diff --git a/doc/manual/source/uan.rst b/src/uan/doc/uan.rst similarity index 96% rename from doc/manual/source/uan.rst rename to src/uan/doc/uan.rst index f76c4b213..b2c9ff552 100644 --- a/doc/manual/source/uan.rst +++ b/src/uan/doc/uan.rst @@ -12,7 +12,7 @@ Model Description ***************** The source code for the UAN Framework lives in the directory -``src/devices/uan``, ``src/devices/uan/auv`` and in ``src/contrib/energy`` for the contribution on +``src/uan`` and in ``src/energy`` for the contribution on the li-ion battery model. The UAN Framework is composed of two main parts: @@ -26,7 +26,7 @@ As enabling component for the energy models, a Li-Ion batteries energy source ha Design ====== -The development of the UAN Framework for ns-3 is composed by three consecutive steps. The first one is the development of the AUV simulator, the second one is the development of the UAN energy models and the third one is the integration of such components with the existing modules, UAN module and Energy Model. The module is implemented into the ``/src/contrib/uan`` folder for the part regarding acoustic modem energy model and in ``/src/contrib/uan/auv`` for the part regarding the AUV simulator. +The development of the UAN Framework for ns-3 is composed by three consecutive steps. The first one is the development of the AUV simulator, the second one is the development of the UAN energy models and the third one is the integration of such components with the existing modules, UAN module and Energy Model. The module is implemented into the ``/src/uan`` folder for the part regarding acoustic modem energy model and the part regarding the AUV simulator. AUV mobility models @@ -198,10 +198,10 @@ The main way that users who write simulation scripts will typically interact with the UAN Framework is through the helper API and through the publicly visible attributes of the model. -The helper API is defined in ``src/devices/uan/helper/acoustic-modem-energy-model-helper.{cc,h}`` and in ``/src/devices/uan/auv/helper/...{cc,h}``. +The helper API is defined in ``src/uan/helper/acoustic-modem-energy-model-helper.{cc,h}`` and in ``/src/uan/helper/...{cc,h}``. -The example folder ``src/devices/uan/auv/examples/`` contain some basic code that shows how to set up and use the models. -further examples can be found into the Unit tests in ``src/devices/uan/auv/test/...cc`` +The example folder ``src/uan/examples/`` contain some basic code that shows how to set up and use the models. +further examples can be found into the Unit tests in ``src/uan/test/...cc`` Examples ======== @@ -363,7 +363,7 @@ Auv Energy Model ================ Includes test cases for single packet energy consumption, energy depletion, Glider and REMUS energy consumption. -The unit test can be found in ``src/devices/uan/auv/test/auv-energy-model-test.cc``. +The unit test can be found in ``src/uan/test/auv-energy-model-test.cc``. The single packet energy consumption test do the following: @@ -395,7 +395,7 @@ Auv Mobility ============ Includes test cases for glider and REMUS mobility models. -The unit test can be found in ``src/devices/uan/auv/test/auv-mobility-test.cc``. +The unit test can be found in ``src/uan/test/auv-mobility-test.cc``. * create a node with glider capabilities * set a specified velocity vector and verify if the resulting buoyancy is the one that is supposed to be @@ -415,7 +415,7 @@ Li-Ion Energy Source ==================== Includes test case for Li-Ion energy source. -The unit test can be found in ``src/contrib/energy/test/li-ion-energy-source-test.cc``. +The unit test can be found in ``src/energy/test/li-ion-energy-source-test.cc``. The test case verify that after a well-known discharge time with constant current drain, the cell voltage has followed the datasheet discharge curve [9]. diff --git a/src/uan/examples/uan-cw-example.cc b/src/uan/examples/uan-cw-example.cc index 2f5d1139f..165ddf9e2 100644 --- a/src/uan/examples/uan-cw-example.cc +++ b/src/uan/examples/uan-cw-example.cc @@ -174,7 +174,7 @@ Experiment::Run (UanHelper &uan) mobility.Install (sink); NS_LOG_DEBUG ("Position of sink: " - << sink.Get (0)->GetObject ()->GetPosition ()); + << sink.Get (0)->GetObject ()->GetPosition ()); mobility.Install (nc); PacketSocketAddress socket; @@ -223,7 +223,7 @@ Experiment::Run (UanHelper &uan) if (!ascii.is_open ()) { NS_FATAL_ERROR ("Could not open ascii trace file: " - << m_asciitracefile); + << m_asciitracefile); } uan.EnableAsciiAll (ascii); @@ -239,7 +239,7 @@ Experiment::Run (UanHelper &uan) } for (uint32_t i=0; i < sink.GetN (); i++) { - sink.Get (i) = 0; + sink.Get (i) = 0; } for (uint32_t i=0; i < devices.GetN (); i++) diff --git a/src/uan/examples/uan-rc-example.cc b/src/uan/examples/uan-rc-example.cc index 98a07f76e..4a98d5672 100644 --- a/src/uan/examples/uan-rc-example.cc +++ b/src/uan/examples/uan-rc-example.cc @@ -149,7 +149,7 @@ Experiment::Run (uint32_t param) { UanHelper uan; - + m_bytesTotal=0; uint32_t nNodes; @@ -277,7 +277,7 @@ main(int argc, char *argv[]) exp.CreateDualModes (12000); -; + ; Gnuplot2dDataset ds; for (uint32_t param=exp.m_simMin; param<=exp.m_simMax; param += exp.m_simStep) diff --git a/src/uan/model/uan-channel.cc b/src/uan/model/uan-channel.cc index 0b7852492..7b4060f45 100644 --- a/src/uan/model/uan-channel.cc +++ b/src/uan/model/uan-channel.cc @@ -107,7 +107,7 @@ UanChannel::Clear () m_noise->Clear (); m_noise = 0; } - + } void diff --git a/src/uan/model/uan-mac-cw.cc b/src/uan/model/uan-mac-cw.cc index 6d4e9b549..078de9dac 100644 --- a/src/uan/model/uan-mac-cw.cc +++ b/src/uan/model/uan-mac-cw.cc @@ -64,7 +64,7 @@ UanMacCw::Clear () } m_sendEvent.Cancel (); m_txEndEvent.Cancel (); -} +} void UanMacCw::DoDispose () diff --git a/src/uan/model/uan-mac-rc-gw.cc b/src/uan/model/uan-mac-rc-gw.cc index d886a5d07..396b8c5cf 100644 --- a/src/uan/model/uan-mac-rc-gw.cc +++ b/src/uan/model/uan-mac-rc-gw.cc @@ -372,7 +372,7 @@ UanMacRcGw::StartCycle (void) } else { - m_currentRetryRate = (uint16_t)((thX - m_minRetryRate) / m_retryStep + 0.5) ; + m_currentRetryRate = (uint16_t)((thX - m_minRetryRate) / m_retryStep + 0.5); } double actualX = m_currentRetryRate * m_retryStep + m_minRetryRate; diff --git a/src/uan/model/uan-net-device.h b/src/uan/model/uan-net-device.h index 32f288a7d..21de27ad7 100644 --- a/src/uan/model/uan-net-device.h +++ b/src/uan/model/uan-net-device.h @@ -108,7 +108,7 @@ public: virtual bool IsMulticast (void) const; virtual Address GetMulticast (Ipv4Address multicastGroup) const; virtual Address GetMulticast (Ipv6Address addr) const; - virtual bool IsBridge (void) const ; + virtual bool IsBridge (void) const; virtual bool IsPointToPoint (void) const; virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); virtual bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber); diff --git a/src/uan/model/uan-prop-model.h b/src/uan/model/uan-prop-model.h index 476f00d17..224366400 100644 --- a/src/uan/model/uan-prop-model.h +++ b/src/uan/model/uan-prop-model.h @@ -245,7 +245,7 @@ public: * Clears all pointer references */ virtual void Clear (void); - + virtual void DoDispose (void); }; diff --git a/src/uan/test/uan-test.cc b/src/uan/test/uan-test.cc index e47241b30..302c9df48 100644 --- a/src/uan/test/uan-test.cc +++ b/src/uan/test/uan-test.cc @@ -150,11 +150,11 @@ UanTest::DoPhyTests () // No collision (Get 2 packets) NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (3.001), 50, 50, prop), - 34, "Should have received 34 bytes from 2 disjoint packets"); + 34, "Should have received 34 bytes from 2 disjoint packets"); // Collision (Lose both packets) NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop), - 0, "Expected collision resulting in loss of both packets"); + 0, "Expected collision resulting in loss of both packets"); // Phy Gen / FH-FSK SINR check @@ -172,15 +172,15 @@ UanTest::DoPhyTests () // No collision (Get 2 packets) NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (3.001), 50, 50, prop), - 34, "Should have received 34 bytes from 2 disjoint packets"); + 34, "Should have received 34 bytes from 2 disjoint packets"); // Should correctly receive first arriving packet NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (1.0126), 50, 50, prop), - 17, "Should have recieved 17 bytes from first arriving packet"); + 17, "Should have recieved 17 bytes from first arriving packet"); // Packets should collide and both be lost NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (1.0 + 7.01 * (13.0 / 80.0)), 50, 50, prop), - 0, "Packets should collide, but received data"); + 0, "Packets should collide, but received data"); // Phy Dual UanTxMode mode00 = UanTxModeFactory::CreateMode (UanTxMode::FSK, 80, 80, 10000, 4000, 2, "TestMode00"); @@ -208,19 +208,19 @@ UanTest::DoPhyTests () // No collision (Get 2 packets) NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (3.01), 50, 50, prop), - 34, "Expected no collision"); + 34, "Expected no collision"); NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop, 0, 0), - 0, "Expected collision with both packets lost"); + 0, "Expected collision with both packets lost"); NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop, 0, 2), - 17, "Expected collision with only one packets lost"); + 17, "Expected collision with only one packets lost"); NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop, 0, 5), - 34, "Expected no collision"); + 34, "Expected no collision"); NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop, 2, 3), - 34, "Expected no collision"); + 34, "Expected no collision"); return false; } diff --git a/src/virtual-net-device/examples/virtual-net-device.cc b/src/virtual-net-device/examples/virtual-net-device.cc index d4c83725c..460b9d44a 100644 --- a/src/virtual-net-device/examples/virtual-net-device.cc +++ b/src/virtual-net-device/examples/virtual-net-device.cc @@ -75,8 +75,8 @@ class Tunnel Ptr m_n0Tap; Ptr m_n1Tap; Ptr m_n3Tap; - - + + bool N0VirtualSend (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber) { @@ -137,23 +137,23 @@ class Tunnel } public: - + Tunnel (Ptr n3, Ptr n0, Ptr n1, Ipv4Address n3Addr, Ipv4Address n0Addr, Ipv4Address n1Addr) : m_n3Address (n3Addr), m_n0Address (n0Addr), m_n1Address (n1Addr) { m_n3Socket = Socket::CreateSocket (n3, TypeId::LookupByName ("ns3::UdpSocketFactory")); m_n3Socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), 667)); - m_n3Socket->SetRecvCallback (MakeCallback (&Tunnel::N3SocketRecv, this)); - + m_n3Socket->SetRecvCallback (MakeCallback (&Tunnel::N3SocketRecv, this)); + m_n0Socket = Socket::CreateSocket (n0, TypeId::LookupByName ("ns3::UdpSocketFactory")); m_n0Socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), 667)); - m_n0Socket->SetRecvCallback (MakeCallback (&Tunnel::N0SocketRecv, this)); - + m_n0Socket->SetRecvCallback (MakeCallback (&Tunnel::N0SocketRecv, this)); + m_n1Socket = Socket::CreateSocket (n1, TypeId::LookupByName ("ns3::UdpSocketFactory")); m_n1Socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), 667)); m_n1Socket->SetRecvCallback (MakeCallback (&Tunnel::N1SocketRecv, this)); - + // n0 tap device m_n0Tap = CreateObject (); m_n0Tap->SetAddress (Mac48Address ("11:00:01:02:03:01")); @@ -163,7 +163,7 @@ public: uint32_t i = ipv4->AddInterface (m_n0Tap); ipv4->AddAddress (i, Ipv4InterfaceAddress (Ipv4Address ("11.0.0.1"), Ipv4Mask ("255.255.255.0"))); ipv4->SetUp (i); - + // n1 tap device m_n1Tap = CreateObject (); m_n1Tap->SetAddress (Mac48Address ("11:00:01:02:03:02")); @@ -183,13 +183,13 @@ public: i = ipv4->AddInterface (m_n3Tap); ipv4->AddAddress (i, Ipv4InterfaceAddress (Ipv4Address ("11.0.0.254"), Ipv4Mask ("255.255.255.0"))); ipv4->SetUp (i); - + } - - + + }; - + int main (int argc, char *argv[]) @@ -200,13 +200,13 @@ main (int argc, char *argv[]) LogComponentEnable ("VirtualNetDeviceExample", LOG_LEVEL_INFO); #endif Packet::EnablePrinting (); - + // Set up some default values for the simulation. Use the Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210)); Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s")); - //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30); + //DefaultValue::Bind ("DropTailQueue::m_maxPackets", 30); // Allow the user to override any of the defaults and the above // DefaultValue::Bind ()s at run-time, via command-line arguments @@ -233,12 +233,12 @@ main (int argc, char *argv[]) NetDeviceContainer d0d2 = p2p.Install (n0n2); NetDeviceContainer d1d2 = p2p.Install (n1n2); - + p2p.SetDeviceAttribute ("DataRate", StringValue ("1500kbps")); p2p.SetChannelAttribute ("Delay", StringValue ("10ms")); NetDeviceContainer d3d2 = p2p.Install (n3n2); - - // Later, we add IP addresses. + + // Later, we add IP addresses. NS_LOG_INFO ("Assign IP Addresses."); Ipv4AddressHelper ipv4; ipv4.SetBase ("10.1.1.0", "255.255.255.0"); @@ -246,7 +246,7 @@ main (int argc, char *argv[]) ipv4.SetBase ("10.1.2.0", "255.255.255.0"); Ipv4InterfaceContainer i1i2 = ipv4.Assign (d1d2); - + ipv4.SetBase ("10.1.3.0", "255.255.255.0"); Ipv4InterfaceContainer i3i2 = ipv4.Assign (d3d2); @@ -272,7 +272,7 @@ main (int argc, char *argv[]) // Create a packet sink to receive these packets PacketSinkHelper sink ("ns3::UdpSocketFactory", - Address (InetSocketAddress (Ipv4Address::GetAny (), port))); + Address (InetSocketAddress (Ipv4Address::GetAny (), port))); apps = sink.Install (c.Get (3)); apps.Start (Seconds (1.0)); //apps.Stop (Seconds (10.0)); diff --git a/src/virtual-net-device/model/virtual-net-device.cc b/src/virtual-net-device/model/virtual-net-device.cc index 45727e477..c6f96a555 100644 --- a/src/virtual-net-device/model/virtual-net-device.cc +++ b/src/virtual-net-device/model/virtual-net-device.cc @@ -46,7 +46,7 @@ VirtualNetDevice::GetTypeId (void) UintegerValue (1500), MakeUintegerAccessor (&VirtualNetDevice::SetMtu, &VirtualNetDevice::GetMtu), - MakeUintegerChecker ()) + MakeUintegerChecker ()) .AddTraceSource ("MacTx", "Trace source indicating a packet has arrived for transmission by this device", MakeTraceSourceAccessor (&VirtualNetDevice::m_macTxTrace)) @@ -67,7 +67,7 @@ VirtualNetDevice::GetTypeId (void) .AddTraceSource ("PromiscSniffer", "Trace source simulating a promiscuous packet sniffer attached to the device", MakeTraceSourceAccessor (&VirtualNetDevice::m_promiscSnifferTrace)) - ; + ; return tid; } @@ -228,7 +228,7 @@ Address VirtualNetDevice::GetMulticast (Ipv4Address multicastGroup) const Address VirtualNetDevice::GetMulticast (Ipv6Address addr) const { - return Mac48Address ("ff:ff:ff:ff:ff:ff"); + return Mac48Address ("ff:ff:ff:ff:ff:ff"); } diff --git a/src/virtual-net-device/model/virtual-net-device.h b/src/virtual-net-device/model/virtual-net-device.h index d36d497b1..89c0e3145 100644 --- a/src/virtual-net-device/model/virtual-net-device.h +++ b/src/virtual-net-device/model/virtual-net-device.h @@ -33,6 +33,13 @@ namespace ns3 { /** + * \defgroup virtualdevice Virtual Device + * + */ + +/** + * \ingroup virtualdevice + * * \class VirtualNetDevice * \brief A virtual device, similar to Linux TUN/TAP interfaces. * diff --git a/src/visualizer/model/pyviz.cc b/src/visualizer/model/pyviz.cc index 2e9a4cc81..9279e53f5 100644 --- a/src/visualizer/model/pyviz.cc +++ b/src/visualizer/model/pyviz.cc @@ -85,7 +85,7 @@ PyVizPacketTag::GetTypeId (void) static TypeId tid = TypeId ("ns3::PyVizPacketTag") .SetParent () .AddConstructor () - ; + ; return tid; } TypeId @@ -115,7 +115,8 @@ PyVizPacketTag::Print (std::ostream &os) const } PyVizPacketTag::PyVizPacketTag () : Tag () -{} +{ +} @@ -210,9 +211,9 @@ void PyViz::SetPacketCaptureOptions (uint32_t nodeId, PacketCaptureOptions options) { NS_LOG_DEBUG (" SetPacketCaptureOptions " << nodeId - << " PacketCaptureOptions (headers size = " << options.headers.size () - << " mode = " << options.mode << " numLastPackets = " << options.numLastPackets - << ")"); + << " PacketCaptureOptions (headers size = " << options.headers.size () + << " mode = " << options.mode << " numLastPackets = " << options.numLastPackets + << ")"); m_packetCaptureOptions[nodeId] = options; } @@ -225,7 +226,7 @@ PyViz::RegisterDropTracePath (std::string const &tracePath) PyViz::~PyViz () { NS_LOG_FUNCTION_NOARGS (); - + NS_ASSERT (g_visualizer == this); g_visualizer = NULL; } @@ -235,7 +236,7 @@ void PyViz::DoPause (std::string const &message) m_pauseMessages.push_back (message); m_stop = true; NS_LOG_LOGIC (Simulator::Now ().GetSeconds () << ": Have " - << g_visualizer->m_pauseMessages.size () << " pause messages"); + << g_visualizer->m_pauseMessages.size () << " pause messages"); } void PyViz::Pause (std::string const &message) @@ -248,10 +249,10 @@ std::vector PyViz::GetPauseMessages () const { NS_LOG_LOGIC (Simulator::Now ().GetSeconds () << ": GetPauseMessages: have " - << g_visualizer->m_pauseMessages.size () << " pause messages"); + << g_visualizer->m_pauseMessages.size () << " pause messages"); return m_pauseMessages; } - + void PyViz::CallbackStopSimulation () @@ -336,7 +337,8 @@ bool PyViz::TransmissionSampleKey::operator < (PyViz::TransmissionSampleKey cons } if (this->receiver < other.receiver) { - return true;} + return true; + } if (this->receiver != other.receiver) { return false; @@ -498,7 +500,7 @@ PyViz::TraceIpv4Drop (std::string context, ns3::Ipv4Header const &hdr, Ptr packet, @@ -578,7 +580,7 @@ PyViz::TraceNetDevTxWifi (std::string context, Ptr packet) * 0 1 Destination BSSID Source N/A * 1 0 BSSID Source Destination N/A * 1 1 Receiver Transmitter Destination Source - */ + */ WifiMacHeader hdr; NS_ABORT_IF (packet->PeekHeader (hdr) == 0); Mac48Address destinationAddress; @@ -619,7 +621,7 @@ PyViz::TraceNetDevTxPointToPoint (std::string context, Ptr packet) - // --------- RX device tracing ------------------- +// --------- RX device tracing ------------------- void PyViz::TraceNetDevRxCommon (std::string const &context, Ptr packet, Mac48Address const &from) @@ -684,13 +686,13 @@ PyViz::TraceNetDevRxCommon (std::string const &context, Ptr packet NS_LOG_DEBUG ("RX Packet " << uid << " was not transmitted?!"); return; } - + TxRecordValue &record = recordIter->second; - + if (record.srcNode == node) { NS_LOG_WARN ("Node " << node->GetId () << " receiving back the same packet (UID=" << uid - << ") it had previously transmitted, on the same channel!"); + << ") it had previously transmitted, on the same channel!"); return; } @@ -704,32 +706,32 @@ PyViz::TraceNetDevRxCommon (std::string const &context, Ptr packet = m_transmissionSamples.begin (); iter != m_transmissionSamples.end (); iter++) { NS_LOG_DEBUG(iter->first.transmitter<<"/"<first.transmitter->GetId () << ", " - << iter->first.receiver<<"/"<first.receiver->GetId () - << ", " << iter->first.channel << " => " << iter->second.bytes << " (@ " << &iter->second << ")"); + << iter->first.receiver<<"/"<first.receiver->GetId () + << ", " << iter->first.channel << " => " << iter->second.bytes << " (@ " << &iter->second << ")"); } } NS_LOG_DEBUG("m_transmissionSamples end."); #endif std::map::iterator - iter = m_transmissionSamples.find (key); + iter = m_transmissionSamples.find (key); if (iter == m_transmissionSamples.end ()) { TransmissionSampleValue sample = { packet->GetSize () }; NS_LOG_DEBUG ("RX: from " << key.transmitter<<"/"<GetId() << " to " - << key.receiver<<"/"<GetId() - << " channel " << channel << ": " << packet->GetSize () - << " bytes more. => new sample with " << packet->GetSize () << " bytes."); + << key.receiver<<"/"<GetId() + << " channel " << channel << ": " << packet->GetSize () + << " bytes more. => new sample with " << packet->GetSize () << " bytes."); m_transmissionSamples[key] = sample; } else { TransmissionSampleValue &sample = iter->second; NS_LOG_DEBUG ("RX: from " << key.transmitter<<"/"<GetId() << " to " - << key.receiver<<"/"<GetId() - << " channel " << channel << ": " << packet->GetSize () - << " bytes more. => sample " << &sample << " with bytes " << sample.bytes); + << key.receiver<<"/"<GetId() + << " channel " << channel << ": " << packet->GetSize () + << " bytes more. => sample " << &sample << " with bytes " << sample.bytes); sample.bytes += packet->GetSize (); } @@ -748,7 +750,7 @@ PyViz::TraceNetDevRxWifi (std::string context, Ptr packet) * 0 1 Destination BSSID Source N/A * 1 0 BSSID Source Destination N/A * 1 1 Receiver Transmitter Destination Source - */ + */ WifiMacHeader hdr; NS_ABORT_IF (packet->PeekHeader (hdr) == 0); Mac48Address sourceAddress; @@ -795,7 +797,7 @@ PyViz::TraceNetDevPromiscRxCsma (std::string context, Ptr packet) NS_ABORT_IF (packet->PeekHeader (ethernetHeader) == 0); NetDevice::PacketType packetType = NetDevice::PACKET_OTHERHOST; // FIXME - + // Other packet types are already being received by // TraceNetDevRxCsma; we don't want to receive them twice. if (packetType == NetDevice::PACKET_OTHERHOST) @@ -819,7 +821,7 @@ PyViz::TraceNetDevRxWimax (std::string context, Ptr packet, Mac48A } - // --------------------- +// --------------------- PyViz::TransmissionSampleList PyViz::GetTransmissionSamples () const @@ -827,7 +829,7 @@ PyViz::GetTransmissionSamples () const NS_LOG_DEBUG ("GetTransmissionSamples BEGIN"); TransmissionSampleList list; for (std::map::const_iterator - iter = m_transmissionSamples.begin (); + iter = m_transmissionSamples.begin (); iter != m_transmissionSamples.end (); iter++) { @@ -837,7 +839,7 @@ PyViz::GetTransmissionSamples () const sample.channel = iter->first.channel; sample.bytes = iter->second.bytes; NS_LOG_DEBUG ("from " << sample.transmitter->GetId() << " to " << sample.receiver->GetId() - << ": " << sample.bytes << " bytes."); + << ": " << sample.bytes << " bytes."); list.push_back (sample); } NS_LOG_DEBUG ("GetTransmissionSamples END"); @@ -850,7 +852,7 @@ PyViz::GetPacketDropSamples () const NS_LOG_DEBUG ("GetPacketDropSamples BEGIN"); PacketDropSampleList list; for (std::map, uint32_t>::const_iterator - iter = m_packetDrops.begin (); + iter = m_packetDrops.begin (); iter != m_packetDrops.end (); iter++) { @@ -858,7 +860,7 @@ PyViz::GetPacketDropSamples () const sample.transmitter = iter->first; sample.bytes = iter->second; NS_LOG_DEBUG ("in " << sample.transmitter->GetId() - << ": " << sample.bytes << " bytes dropped."); + << ": " << sample.bytes << " bytes dropped."); list.push_back (sample); } NS_LOG_DEBUG ("GetPacketDropSamples END"); @@ -889,9 +891,9 @@ PyViz::LastPacketsSample PyViz::GetLastPackets (uint32_t nodeId) const { NS_LOG_DEBUG ("GetLastPackets: " << nodeId); - + std::map::const_iterator - iter = m_lastPackets.find(nodeId); + iter = m_lastPackets.find(nodeId); if (iter != m_lastPackets.end ()) { return iter->second; @@ -909,488 +911,488 @@ PyViz::GetLastPackets (uint32_t nodeId) const namespace { - // Adapted from http://en.wikipedia.org/w/index.php?title=Line_clipping&oldid=248609574 - class FastClipping +// Adapted from http://en.wikipedia.org/w/index.php?title=Line_clipping&oldid=248609574 +class FastClipping +{ +public: + struct Vector2 { - public: - struct Vector2 - { - double x; - double y; - }; - - Vector2 m_clipMin, m_clipMax; - - struct Line - { - Vector2 start, end; - double dx, dy; - }; - - private: - - void ClipStartTop (Line &line) - { - line.start.x += line.dx * (m_clipMin.y - line.start.y) / line.dy; - line.start.y = m_clipMin.y; - } - - void ClipStartBottom (Line &line) - { - line.start.x += line.dx * (m_clipMax.y - line.start.y) / line.dy; - line.start.y = m_clipMax.y; - } - - void ClipStartRight (Line &line) - { - line.start.y += line.dy * (m_clipMax.x - line.start.x) / line.dx; - line.start.x = m_clipMax.x; - } - - void ClipStartLeft (Line &line) - { - line.start.y += line.dy * (m_clipMin.x - line.start.x) / line.dx; - line.start.x = m_clipMin.x; - } - - void ClipEndTop (Line &line) - { - line.end.x += line.dx * (m_clipMin.y - line.end.y) / line.dy; - line.end.y = m_clipMin.y; - } - - void ClipEndBottom (Line &line) { - line.end.x += line.dx * (m_clipMax.y - line.end.y) / line.dy; - line.end.y = m_clipMax.y; - } - - void ClipEndRight (Line &line) - { - line.end.y += line.dy * (m_clipMax.x - line.end.x) / line.dx; - line.end.x = m_clipMax.x; - } - - void ClipEndLeft (Line &line) - { - line.end.y += line.dy * (m_clipMin.x - line.end.x) / line.dx; - line.end.x = m_clipMin.x; - } - - public: - FastClipping (Vector2 clipMin, Vector2 clipMax) - : m_clipMin (clipMin), m_clipMax (clipMax) - { - } - - - bool ClipLine (Line &line) - { - uint8_t lineCode = 0; - - if (line.end.y < m_clipMin.y) - lineCode |= 8; - else if (line.end.y > m_clipMax.y) - lineCode |= 4; - - if (line.end.x > m_clipMax.x) - lineCode |= 2; - else if (line.end.x < m_clipMin.x) - lineCode |= 1; - - if (line.start.y < m_clipMin.y) - lineCode |= 128; - else if (line.start.y > m_clipMax.y) - lineCode |= 64; - - if (line.start.x > m_clipMax.x) - lineCode |= 32; - else if (line.start.x < m_clipMin.x) - lineCode |= 16; - - // 9 - 8 - A - // | | | - // 1 - 0 - 2 - // | | | - // 5 - 4 - 6 - switch (lineCode) - { - // center - case 0x00: - return true; - - case 0x01: - ClipEndLeft (line); - return true; - - case 0x02: - ClipEndRight (line); - return true; - - case 0x04: - ClipEndBottom (line); - return true; - - case 0x05: - ClipEndLeft (line); - if (line.end.y > m_clipMax.y) - ClipEndBottom (line); - return true; - - case 0x06: - ClipEndRight (line); - if (line.end.y > m_clipMax.y) - ClipEndBottom (line); - return true; - - case 0x08: - ClipEndTop (line); - return true; - - case 0x09: - ClipEndLeft (line); - if (line.end.y < m_clipMin.y) - ClipEndTop (line); - return true; - - case 0x0A: - ClipEndRight (line); - if (line.end.y < m_clipMin.y) - ClipEndTop (line); - return true; - - // left - case 0x10: - ClipStartLeft (line); - return true; - - case 0x12: - ClipStartLeft (line); - ClipEndRight (line); - return true; - - case 0x14: - ClipStartLeft (line); - if (line.start.y > m_clipMax.y) - return false; - ClipEndBottom (line); - return true; - - case 0x16: - ClipStartLeft (line); - if (line.start.y > m_clipMax.y) - return false; - ClipEndBottom (line); - if (line.end.x > m_clipMax.x) - ClipEndRight (line); - return true; - - case 0x18: - ClipStartLeft (line); - if (line.start.y < m_clipMin.y) - return false; - ClipEndTop (line); - return true; - - case 0x1A: - ClipStartLeft (line); - if (line.start.y < m_clipMin.y) - return false; - ClipEndTop (line); - if (line.end.x > m_clipMax.x) - ClipEndRight (line); - return true; - - // right - case 0x20: - ClipStartRight (line); - return true; - - case 0x21: - ClipStartRight (line); - ClipEndLeft (line); - return true; - - case 0x24: - ClipStartRight (line); - if (line.start.y > m_clipMax.y) - return false; - ClipEndBottom (line); - return true; - - case 0x25: - ClipStartRight (line); - if (line.start.y > m_clipMax.y) - return false; - ClipEndBottom (line); - if (line.end.x < m_clipMin.x) - ClipEndLeft (line); - return true; - - case 0x28: - ClipStartRight (line); - if (line.start.y < m_clipMin.y) - return false; - ClipEndTop (line); - return true; - - case 0x29: - ClipStartRight (line); - if (line.start.y < m_clipMin.y) - return false; - ClipEndTop (line); - if (line.end.x < m_clipMin.x) - ClipEndLeft (line); - return true; - - // bottom - case 0x40: - ClipStartBottom (line); - return true; - - case 0x41: - ClipStartBottom (line); - if (line.start.x < m_clipMin.x) - return false; - ClipEndLeft (line); - if (line.end.y > m_clipMax.y) - ClipEndBottom (line); - return true; - - case 0x42: - ClipStartBottom (line); - if (line.start.x > m_clipMax.x) - return false; - ClipEndRight (line); - return true; - - case 0x48: - ClipStartBottom (line); - ClipEndTop (line); - return true; - - case 0x49: - ClipStartBottom (line); - if (line.start.x < m_clipMin.x) - return false; - ClipEndLeft (line); - if (line.end.y < m_clipMin.y) - ClipEndTop (line); - return true; - - case 0x4A: - ClipStartBottom (line); - if (line.start.x > m_clipMax.x) - return false; - ClipEndRight (line); - if (line.end.y < m_clipMin.y) - ClipEndTop (line); - return true; - - // bottom-left - case 0x50: - ClipStartLeft (line); - if (line.start.y > m_clipMax.y) - ClipStartBottom (line); - return true; - - case 0x52: - ClipEndRight (line); - if (line.end.y > m_clipMax.y) - return false; - ClipStartBottom (line); - if (line.start.x < m_clipMin.x) - ClipStartLeft (line); - return true; - - case 0x58: - ClipEndTop (line); - if (line.end.x < m_clipMin.x) - return false; - ClipStartBottom (line); - if (line.start.x < m_clipMin.x) - ClipStartLeft (line); - return true; - - case 0x5A: - ClipStartLeft (line); - if (line.start.y < m_clipMin.y) - return false; - ClipEndRight (line); - if (line.end.y > m_clipMax.y) - return false; - if (line.start.y > m_clipMax.y) - ClipStartBottom (line); - if (line.end.y < m_clipMin.y) - ClipEndTop (line); - return true; - - // bottom-right - case 0x60: - ClipStartRight (line); - if (line.start.y > m_clipMax.y) - ClipStartBottom (line); - return true; - - case 0x61: - ClipEndLeft (line); - if (line.end.y > m_clipMax.y) - return false; - ClipStartBottom (line); - if (line.start.x > m_clipMax.x) - ClipStartRight (line); - return true; - - case 0x68: - ClipEndTop (line); - if (line.end.x > m_clipMax.x) - return false; - ClipStartRight (line); - if (line.start.y > m_clipMax.y) - ClipStartBottom (line); - return true; - - case 0x69: - ClipEndLeft (line); - if (line.end.y > m_clipMax.y) - return false; - ClipStartRight (line); - if (line.start.y < m_clipMin.y) - return false; - if (line.end.y < m_clipMin.y) - ClipEndTop (line); - if (line.start.y > m_clipMax.y) - ClipStartBottom (line); - return true; - - // top - case 0x80: - ClipStartTop (line); - return true; - - case 0x81: - ClipStartTop (line); - if (line.start.x < m_clipMin.x) - return false; - ClipEndLeft (line); - return true; - - case 0x82: - ClipStartTop (line); - if (line.start.x > m_clipMax.x) - return false; - ClipEndRight (line); - return true; - - case 0x84: - ClipStartTop (line); - ClipEndBottom (line); - return true; - - case 0x85: - ClipStartTop (line); - if (line.start.x < m_clipMin.x) - return false; - ClipEndLeft (line); - if (line.end.y > m_clipMax.y) - ClipEndBottom (line); - return true; - - case 0x86: - ClipStartTop (line); - if (line.start.x > m_clipMax.x) - return false; - ClipEndRight (line); - if (line.end.y > m_clipMax.y) - ClipEndBottom (line); - return true; - - // top-left - case 0x90: - ClipStartLeft (line); - if (line.start.y < m_clipMin.y) - ClipStartTop (line); - return true; - - case 0x92: - ClipEndRight (line); - if (line.end.y < m_clipMin.y) - return false; - ClipStartTop (line); - if (line.start.x < m_clipMin.x) - ClipStartLeft (line); - return true; - - case 0x94: - ClipEndBottom (line); - if (line.end.x < m_clipMin.x) - return false; - ClipStartLeft (line); - if (line.start.y < m_clipMin.y) - ClipStartTop (line); - return true; - - case 0x96: - ClipStartLeft (line); - if (line.start.y > m_clipMax.y) - return false; - ClipEndRight (line); - if (line.end.y < m_clipMin.y) - return false; - if (line.start.y < m_clipMin.y) - ClipStartTop (line); - if (line.end.y > m_clipMax.y) - ClipEndBottom (line); - return true; - - // top-right - case 0xA0: - ClipStartRight (line); - if (line.start.y < m_clipMin.y) - ClipStartTop (line); - return true; - - case 0xA1: - ClipEndLeft (line); - if (line.end.y < m_clipMin.y) - return false; - ClipStartTop (line); - if (line.start.x > m_clipMax.x) - ClipStartRight (line); - return true; - - case 0xA4: - ClipEndBottom (line); - if (line.end.x > m_clipMax.x) - return false; - ClipStartRight (line); - if (line.start.y < m_clipMin.y) - ClipStartTop (line); - return true; - - case 0xA5: - ClipEndLeft (line); - if (line.end.y < m_clipMin.y) - return false; - ClipStartRight (line); - if (line.start.y > m_clipMax.y) - return false; - if (line.end.y > m_clipMax.y) - ClipEndBottom (line); - if (line.start.y < m_clipMin.y) - ClipStartTop (line); - return true; - } - - return false; - } + double x; + double y; }; + + Vector2 m_clipMin, m_clipMax; + + struct Line + { + Vector2 start, end; + double dx, dy; + }; + +private: + + void ClipStartTop (Line &line) + { + line.start.x += line.dx * (m_clipMin.y - line.start.y) / line.dy; + line.start.y = m_clipMin.y; + } + + void ClipStartBottom (Line &line) + { + line.start.x += line.dx * (m_clipMax.y - line.start.y) / line.dy; + line.start.y = m_clipMax.y; + } + + void ClipStartRight (Line &line) + { + line.start.y += line.dy * (m_clipMax.x - line.start.x) / line.dx; + line.start.x = m_clipMax.x; + } + + void ClipStartLeft (Line &line) + { + line.start.y += line.dy * (m_clipMin.x - line.start.x) / line.dx; + line.start.x = m_clipMin.x; + } + + void ClipEndTop (Line &line) + { + line.end.x += line.dx * (m_clipMin.y - line.end.y) / line.dy; + line.end.y = m_clipMin.y; + } + + void ClipEndBottom (Line &line) { + line.end.x += line.dx * (m_clipMax.y - line.end.y) / line.dy; + line.end.y = m_clipMax.y; + } + + void ClipEndRight (Line &line) + { + line.end.y += line.dy * (m_clipMax.x - line.end.x) / line.dx; + line.end.x = m_clipMax.x; + } + + void ClipEndLeft (Line &line) + { + line.end.y += line.dy * (m_clipMin.x - line.end.x) / line.dx; + line.end.x = m_clipMin.x; + } + +public: + FastClipping (Vector2 clipMin, Vector2 clipMax) + : m_clipMin (clipMin), m_clipMax (clipMax) + { + } + + + bool ClipLine (Line &line) + { + uint8_t lineCode = 0; + + if (line.end.y < m_clipMin.y) + lineCode |= 8; + else if (line.end.y > m_clipMax.y) + lineCode |= 4; + + if (line.end.x > m_clipMax.x) + lineCode |= 2; + else if (line.end.x < m_clipMin.x) + lineCode |= 1; + + if (line.start.y < m_clipMin.y) + lineCode |= 128; + else if (line.start.y > m_clipMax.y) + lineCode |= 64; + + if (line.start.x > m_clipMax.x) + lineCode |= 32; + else if (line.start.x < m_clipMin.x) + lineCode |= 16; + + // 9 - 8 - A + // | | | + // 1 - 0 - 2 + // | | | + // 5 - 4 - 6 + switch (lineCode) + { + // center + case 0x00: + return true; + + case 0x01: + ClipEndLeft (line); + return true; + + case 0x02: + ClipEndRight (line); + return true; + + case 0x04: + ClipEndBottom (line); + return true; + + case 0x05: + ClipEndLeft (line); + if (line.end.y > m_clipMax.y) + ClipEndBottom (line); + return true; + + case 0x06: + ClipEndRight (line); + if (line.end.y > m_clipMax.y) + ClipEndBottom (line); + return true; + + case 0x08: + ClipEndTop (line); + return true; + + case 0x09: + ClipEndLeft (line); + if (line.end.y < m_clipMin.y) + ClipEndTop (line); + return true; + + case 0x0A: + ClipEndRight (line); + if (line.end.y < m_clipMin.y) + ClipEndTop (line); + return true; + + // left + case 0x10: + ClipStartLeft (line); + return true; + + case 0x12: + ClipStartLeft (line); + ClipEndRight (line); + return true; + + case 0x14: + ClipStartLeft (line); + if (line.start.y > m_clipMax.y) + return false; + ClipEndBottom (line); + return true; + + case 0x16: + ClipStartLeft (line); + if (line.start.y > m_clipMax.y) + return false; + ClipEndBottom (line); + if (line.end.x > m_clipMax.x) + ClipEndRight (line); + return true; + + case 0x18: + ClipStartLeft (line); + if (line.start.y < m_clipMin.y) + return false; + ClipEndTop (line); + return true; + + case 0x1A: + ClipStartLeft (line); + if (line.start.y < m_clipMin.y) + return false; + ClipEndTop (line); + if (line.end.x > m_clipMax.x) + ClipEndRight (line); + return true; + + // right + case 0x20: + ClipStartRight (line); + return true; + + case 0x21: + ClipStartRight (line); + ClipEndLeft (line); + return true; + + case 0x24: + ClipStartRight (line); + if (line.start.y > m_clipMax.y) + return false; + ClipEndBottom (line); + return true; + + case 0x25: + ClipStartRight (line); + if (line.start.y > m_clipMax.y) + return false; + ClipEndBottom (line); + if (line.end.x < m_clipMin.x) + ClipEndLeft (line); + return true; + + case 0x28: + ClipStartRight (line); + if (line.start.y < m_clipMin.y) + return false; + ClipEndTop (line); + return true; + + case 0x29: + ClipStartRight (line); + if (line.start.y < m_clipMin.y) + return false; + ClipEndTop (line); + if (line.end.x < m_clipMin.x) + ClipEndLeft (line); + return true; + + // bottom + case 0x40: + ClipStartBottom (line); + return true; + + case 0x41: + ClipStartBottom (line); + if (line.start.x < m_clipMin.x) + return false; + ClipEndLeft (line); + if (line.end.y > m_clipMax.y) + ClipEndBottom (line); + return true; + + case 0x42: + ClipStartBottom (line); + if (line.start.x > m_clipMax.x) + return false; + ClipEndRight (line); + return true; + + case 0x48: + ClipStartBottom (line); + ClipEndTop (line); + return true; + + case 0x49: + ClipStartBottom (line); + if (line.start.x < m_clipMin.x) + return false; + ClipEndLeft (line); + if (line.end.y < m_clipMin.y) + ClipEndTop (line); + return true; + + case 0x4A: + ClipStartBottom (line); + if (line.start.x > m_clipMax.x) + return false; + ClipEndRight (line); + if (line.end.y < m_clipMin.y) + ClipEndTop (line); + return true; + + // bottom-left + case 0x50: + ClipStartLeft (line); + if (line.start.y > m_clipMax.y) + ClipStartBottom (line); + return true; + + case 0x52: + ClipEndRight (line); + if (line.end.y > m_clipMax.y) + return false; + ClipStartBottom (line); + if (line.start.x < m_clipMin.x) + ClipStartLeft (line); + return true; + + case 0x58: + ClipEndTop (line); + if (line.end.x < m_clipMin.x) + return false; + ClipStartBottom (line); + if (line.start.x < m_clipMin.x) + ClipStartLeft (line); + return true; + + case 0x5A: + ClipStartLeft (line); + if (line.start.y < m_clipMin.y) + return false; + ClipEndRight (line); + if (line.end.y > m_clipMax.y) + return false; + if (line.start.y > m_clipMax.y) + ClipStartBottom (line); + if (line.end.y < m_clipMin.y) + ClipEndTop (line); + return true; + + // bottom-right + case 0x60: + ClipStartRight (line); + if (line.start.y > m_clipMax.y) + ClipStartBottom (line); + return true; + + case 0x61: + ClipEndLeft (line); + if (line.end.y > m_clipMax.y) + return false; + ClipStartBottom (line); + if (line.start.x > m_clipMax.x) + ClipStartRight (line); + return true; + + case 0x68: + ClipEndTop (line); + if (line.end.x > m_clipMax.x) + return false; + ClipStartRight (line); + if (line.start.y > m_clipMax.y) + ClipStartBottom (line); + return true; + + case 0x69: + ClipEndLeft (line); + if (line.end.y > m_clipMax.y) + return false; + ClipStartRight (line); + if (line.start.y < m_clipMin.y) + return false; + if (line.end.y < m_clipMin.y) + ClipEndTop (line); + if (line.start.y > m_clipMax.y) + ClipStartBottom (line); + return true; + + // top + case 0x80: + ClipStartTop (line); + return true; + + case 0x81: + ClipStartTop (line); + if (line.start.x < m_clipMin.x) + return false; + ClipEndLeft (line); + return true; + + case 0x82: + ClipStartTop (line); + if (line.start.x > m_clipMax.x) + return false; + ClipEndRight (line); + return true; + + case 0x84: + ClipStartTop (line); + ClipEndBottom (line); + return true; + + case 0x85: + ClipStartTop (line); + if (line.start.x < m_clipMin.x) + return false; + ClipEndLeft (line); + if (line.end.y > m_clipMax.y) + ClipEndBottom (line); + return true; + + case 0x86: + ClipStartTop (line); + if (line.start.x > m_clipMax.x) + return false; + ClipEndRight (line); + if (line.end.y > m_clipMax.y) + ClipEndBottom (line); + return true; + + // top-left + case 0x90: + ClipStartLeft (line); + if (line.start.y < m_clipMin.y) + ClipStartTop (line); + return true; + + case 0x92: + ClipEndRight (line); + if (line.end.y < m_clipMin.y) + return false; + ClipStartTop (line); + if (line.start.x < m_clipMin.x) + ClipStartLeft (line); + return true; + + case 0x94: + ClipEndBottom (line); + if (line.end.x < m_clipMin.x) + return false; + ClipStartLeft (line); + if (line.start.y < m_clipMin.y) + ClipStartTop (line); + return true; + + case 0x96: + ClipStartLeft (line); + if (line.start.y > m_clipMax.y) + return false; + ClipEndRight (line); + if (line.end.y < m_clipMin.y) + return false; + if (line.start.y < m_clipMin.y) + ClipStartTop (line); + if (line.end.y > m_clipMax.y) + ClipEndBottom (line); + return true; + + // top-right + case 0xA0: + ClipStartRight (line); + if (line.start.y < m_clipMin.y) + ClipStartTop (line); + return true; + + case 0xA1: + ClipEndLeft (line); + if (line.end.y < m_clipMin.y) + return false; + ClipStartTop (line); + if (line.start.x > m_clipMax.x) + ClipStartRight (line); + return true; + + case 0xA4: + ClipEndBottom (line); + if (line.end.x > m_clipMax.x) + return false; + ClipStartRight (line); + if (line.start.y < m_clipMin.y) + ClipStartTop (line); + return true; + + case 0xA5: + ClipEndLeft (line); + if (line.end.y < m_clipMin.y) + return false; + ClipStartRight (line); + if (line.start.y > m_clipMax.y) + return false; + if (line.end.y > m_clipMax.y) + ClipEndBottom (line); + if (line.start.y < m_clipMin.y) + ClipStartTop (line); + return true; + } + + return false; + } +}; } void PyViz::LineClipping (double boundsX1, double boundsY1, double boundsX2, double boundsY2, double &lineX1, double &lineY1, double &lineX2, double &lineY2) { - FastClipping::Vector2 clipMin = {boundsX1, boundsY1}, clipMax = {boundsX2, boundsY2}; + FastClipping::Vector2 clipMin = { boundsX1, boundsY1}, clipMax = { boundsX2, boundsY2}; FastClipping::Line line = { { lineX1, lineY1 }, { lineX2, lineY2 }, (lineX2-lineX1), (lineY2-lineY1) }; FastClipping clipper (clipMin, clipMax); diff --git a/src/visualizer/model/pyviz.h b/src/visualizer/model/pyviz.h index 5b7bd8f4a..fb65f9032 100644 --- a/src/visualizer/model/pyviz.h +++ b/src/visualizer/model/pyviz.h @@ -38,6 +38,8 @@ namespace ns3 { /** + * \ingroup visualizer + * * \brief helper class to be used by the visualizer * \internal * @@ -61,7 +63,7 @@ public: // Run simulation until a given (simulated, absolute) time is reached void SimulatorRunUntil (Time time); - static void Pause (std::string const &message); + static void Pause (std::string const &message); std::vector GetPauseMessages () const; struct TransmissionSample @@ -124,7 +126,7 @@ public: uint32_t nodeId; std::vector statistics; }; - + std::vector GetNodesStatistics () const; enum PacketCaptureMode { @@ -147,7 +149,7 @@ public: // -#- @lineX1(direction=inout); @lineY1(direction=inout); @lineX2(direction=inout); @lineY2(direction=inout) -#- static void LineClipping (double boundsX1, double boundsY1, double boundsX2, double boundsY2, double &lineX1, double &lineY1, double &lineX2, double &lineY2); // don't break this line or pybindgen will not be able to pick up the above annotation :( - + private: diff --git a/src/visualizer/model/visual-simulator-impl.cc b/src/visualizer/model/visual-simulator-impl.cc index 282bd2659..9a43d8fc3 100644 --- a/src/visualizer/model/visual-simulator-impl.cc +++ b/src/visualizer/model/visual-simulator-impl.cc @@ -31,16 +31,16 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (VisualSimulatorImpl); namespace -{ - ObjectFactory - GetDefaultSimulatorImplFactory () - { - ObjectFactory factory; - factory.SetTypeId (DefaultSimulatorImpl::GetTypeId ()); - return factory; - } +{ +ObjectFactory +GetDefaultSimulatorImplFactory () +{ + ObjectFactory factory; + factory.SetTypeId (DefaultSimulatorImpl::GetTypeId ()); + return factory; } - +} + TypeId VisualSimulatorImpl::GetTypeId (void) @@ -53,7 +53,7 @@ VisualSimulatorImpl::GetTypeId (void) ObjectFactoryValue (GetDefaultSimulatorImplFactory ()), MakeObjectFactoryAccessor (&VisualSimulatorImpl::m_simulatorImplFactory), MakeObjectFactoryChecker ()) - ; + ; return tid; } @@ -63,9 +63,10 @@ VisualSimulatorImpl::VisualSimulatorImpl () } VisualSimulatorImpl::~VisualSimulatorImpl () -{} +{ +} -void +void VisualSimulatorImpl::DoDispose (void) { if (m_simulator) @@ -119,14 +120,14 @@ VisualSimulatorImpl::Run (void) { if (!Py_IsInitialized ()) { - const char *argv[] = {"python", NULL}; + const char *argv[] = { "python", NULL}; Py_Initialize(); PySys_SetArgv(1, (char**) argv); } PyRun_SimpleString( - "import visualizer\n" - "visualizer.start();\n" - ); + "import visualizer\n" + "visualizer.start();\n" + ); } void @@ -171,7 +172,7 @@ VisualSimulatorImpl::ScheduleNow (EventImpl *event) EventId VisualSimulatorImpl::ScheduleDestroy (EventImpl *event) { - return m_simulator->ScheduleDestroy (event); + return m_simulator->ScheduleDestroy (event); } Time diff --git a/src/visualizer/model/visual-simulator-impl.h b/src/visualizer/model/visual-simulator-impl.h index b8d27c3cb..59a6b243d 100644 --- a/src/visualizer/model/visual-simulator-impl.h +++ b/src/visualizer/model/visual-simulator-impl.h @@ -25,8 +25,15 @@ namespace ns3 { - + /** + * \defgroup visualizer Visualizer + * + */ + +/** + * \ingroup visualizer + * * \brief A replacement simulator that starts the visualizer * \internal * @@ -69,7 +76,7 @@ public: protected: void DoDispose (); void NotifyConstructionCompleted (void); - + private: Ptr GetSim (); Ptr m_simulator; diff --git a/src/visualizer/visualizer/core.py b/src/visualizer/visualizer/core.py index 9ab7367cc..63a91444f 100644 --- a/src/visualizer/visualizer/core.py +++ b/src/visualizer/visualizer/core.py @@ -1126,6 +1126,8 @@ class Visualizer(gobject.GObject): __IPYTHON__.runcode = types.MethodType(runcode, __IPYTHON__) def autoscale_view(self): + if not self.nodes: + return self._update_node_positions() positions = [node.get_position() for node in self.nodes.itervalues()] min_x, min_y = min(x for (x,y) in positions), min(y for (x,y) in positions) diff --git a/src/wifi/bindings/modulegen__gcc_ILP32.py b/src/wifi/bindings/modulegen__gcc_ILP32.py index e1674dea3..2ca7aa4f7 100644 --- a/src/wifi/bindings/modulegen__gcc_ILP32.py +++ b/src/wifi/bindings/modulegen__gcc_ILP32.py @@ -1869,11 +1869,6 @@ def register_Ns3InterferenceHelper_methods(root_module, cls): cls.add_method('CalculateSnrPer', 'ns3::InterferenceHelper::SnrPer', [param('ns3::Ptr< ns3::InterferenceHelper::Event >', 'event')]) - ## interference-helper.h (module 'wifi'): static ns3::Time ns3::InterferenceHelper::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] - cls.add_method('CalculateTxDuration', - 'ns3::Time', - [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_static=True) ## interference-helper.h (module 'wifi'): void ns3::InterferenceHelper::EraseEvents() [member function] cls.add_method('EraseEvents', 'void', @@ -1892,26 +1887,6 @@ def register_Ns3InterferenceHelper_methods(root_module, cls): 'double', [], is_const=True) - ## interference-helper.h (module 'wifi'): static uint32_t ns3::InterferenceHelper::GetPayloadDurationMicroSeconds(uint32_t size, ns3::WifiMode payloadMode) [member function] - cls.add_method('GetPayloadDurationMicroSeconds', - 'uint32_t', - [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode')], - is_static=True) - ## interference-helper.h (module 'wifi'): static uint32_t ns3::InterferenceHelper::GetPlcpHeaderDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] - cls.add_method('GetPlcpHeaderDurationMicroSeconds', - 'uint32_t', - [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_static=True) - ## interference-helper.h (module 'wifi'): static ns3::WifiMode ns3::InterferenceHelper::GetPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] - cls.add_method('GetPlcpHeaderMode', - 'ns3::WifiMode', - [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_static=True) - ## interference-helper.h (module 'wifi'): static uint32_t ns3::InterferenceHelper::GetPlcpPreambleDurationMicroSeconds(ns3::WifiMode mode, ns3::WifiPreamble preamble) [member function] - cls.add_method('GetPlcpPreambleDurationMicroSeconds', - 'uint32_t', - [param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble')], - is_static=True) ## interference-helper.h (module 'wifi'): void ns3::InterferenceHelper::NotifyRxEnd() [member function] cls.add_method('NotifyRxEnd', 'void', @@ -6266,11 +6241,11 @@ def register_Ns3WifiPhy_methods(root_module, cls): 'double', [param('ns3::WifiMode', 'txMode'), param('double', 'ber')], is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) const [member function] + ## wifi-phy.h (module 'wifi'): static ns3::Time ns3::WifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] cls.add_method('CalculateTxDuration', 'ns3::Time', [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_pure_virtual=True, is_const=True, is_virtual=True) + is_static=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('ConfigureStandard', 'void', @@ -6491,6 +6466,26 @@ def register_Ns3WifiPhy_methods(root_module, cls): 'ns3::WifiMode', [], is_static=True) + ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPayloadDurationMicroSeconds(uint32_t size, ns3::WifiMode payloadMode) [member function] + cls.add_method('GetPayloadDurationMicroSeconds', + 'uint32_t', + [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode')], + is_static=True) + ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPlcpHeaderDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] + cls.add_method('GetPlcpHeaderDurationMicroSeconds', + 'uint32_t', + [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + is_static=True) + ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] + cls.add_method('GetPlcpHeaderMode', + 'ns3::WifiMode', + [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + is_static=True) + ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPlcpPreambleDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] + cls.add_method('GetPlcpPreambleDurationMicroSeconds', + 'uint32_t', + [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + is_static=True) ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::GetStateDuration() [member function] cls.add_method('GetStateDuration', 'ns3::Time', @@ -7084,11 +7079,6 @@ def register_Ns3YansWifiPhy_methods(root_module, cls): 'ns3::Time', [], is_const=True, is_virtual=True) - ## yans-wifi-phy.h (module 'wifi'): ns3::Time ns3::YansWifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) const [member function] - cls.add_method('CalculateTxDuration', - 'ns3::Time', - [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::GetNModes() const [member function] cls.add_method('GetNModes', 'uint32_t', diff --git a/src/wifi/bindings/modulegen__gcc_LP64.py b/src/wifi/bindings/modulegen__gcc_LP64.py index e1674dea3..2ca7aa4f7 100644 --- a/src/wifi/bindings/modulegen__gcc_LP64.py +++ b/src/wifi/bindings/modulegen__gcc_LP64.py @@ -1869,11 +1869,6 @@ def register_Ns3InterferenceHelper_methods(root_module, cls): cls.add_method('CalculateSnrPer', 'ns3::InterferenceHelper::SnrPer', [param('ns3::Ptr< ns3::InterferenceHelper::Event >', 'event')]) - ## interference-helper.h (module 'wifi'): static ns3::Time ns3::InterferenceHelper::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] - cls.add_method('CalculateTxDuration', - 'ns3::Time', - [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_static=True) ## interference-helper.h (module 'wifi'): void ns3::InterferenceHelper::EraseEvents() [member function] cls.add_method('EraseEvents', 'void', @@ -1892,26 +1887,6 @@ def register_Ns3InterferenceHelper_methods(root_module, cls): 'double', [], is_const=True) - ## interference-helper.h (module 'wifi'): static uint32_t ns3::InterferenceHelper::GetPayloadDurationMicroSeconds(uint32_t size, ns3::WifiMode payloadMode) [member function] - cls.add_method('GetPayloadDurationMicroSeconds', - 'uint32_t', - [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode')], - is_static=True) - ## interference-helper.h (module 'wifi'): static uint32_t ns3::InterferenceHelper::GetPlcpHeaderDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] - cls.add_method('GetPlcpHeaderDurationMicroSeconds', - 'uint32_t', - [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_static=True) - ## interference-helper.h (module 'wifi'): static ns3::WifiMode ns3::InterferenceHelper::GetPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] - cls.add_method('GetPlcpHeaderMode', - 'ns3::WifiMode', - [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_static=True) - ## interference-helper.h (module 'wifi'): static uint32_t ns3::InterferenceHelper::GetPlcpPreambleDurationMicroSeconds(ns3::WifiMode mode, ns3::WifiPreamble preamble) [member function] - cls.add_method('GetPlcpPreambleDurationMicroSeconds', - 'uint32_t', - [param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble')], - is_static=True) ## interference-helper.h (module 'wifi'): void ns3::InterferenceHelper::NotifyRxEnd() [member function] cls.add_method('NotifyRxEnd', 'void', @@ -6266,11 +6241,11 @@ def register_Ns3WifiPhy_methods(root_module, cls): 'double', [param('ns3::WifiMode', 'txMode'), param('double', 'ber')], is_pure_virtual=True, is_const=True, is_virtual=True) - ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) const [member function] + ## wifi-phy.h (module 'wifi'): static ns3::Time ns3::WifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] cls.add_method('CalculateTxDuration', 'ns3::Time', [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_pure_virtual=True, is_const=True, is_virtual=True) + is_static=True) ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::ConfigureStandard(ns3::WifiPhyStandard standard) [member function] cls.add_method('ConfigureStandard', 'void', @@ -6491,6 +6466,26 @@ def register_Ns3WifiPhy_methods(root_module, cls): 'ns3::WifiMode', [], is_static=True) + ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPayloadDurationMicroSeconds(uint32_t size, ns3::WifiMode payloadMode) [member function] + cls.add_method('GetPayloadDurationMicroSeconds', + 'uint32_t', + [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode')], + is_static=True) + ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPlcpHeaderDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] + cls.add_method('GetPlcpHeaderDurationMicroSeconds', + 'uint32_t', + [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + is_static=True) + ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] + cls.add_method('GetPlcpHeaderMode', + 'ns3::WifiMode', + [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + is_static=True) + ## wifi-phy.h (module 'wifi'): static uint32_t ns3::WifiPhy::GetPlcpPreambleDurationMicroSeconds(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] + cls.add_method('GetPlcpPreambleDurationMicroSeconds', + 'uint32_t', + [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + is_static=True) ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::GetStateDuration() [member function] cls.add_method('GetStateDuration', 'ns3::Time', @@ -7084,11 +7079,6 @@ def register_Ns3YansWifiPhy_methods(root_module, cls): 'ns3::Time', [], is_const=True, is_virtual=True) - ## yans-wifi-phy.h (module 'wifi'): ns3::Time ns3::YansWifiPhy::CalculateTxDuration(uint32_t size, ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) const [member function] - cls.add_method('CalculateTxDuration', - 'ns3::Time', - [param('uint32_t', 'size'), param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], - is_const=True, is_virtual=True) ## yans-wifi-phy.h (module 'wifi'): uint32_t ns3::YansWifiPhy::GetNModes() const [member function] cls.add_method('GetNModes', 'uint32_t', diff --git a/doc/WifiArchitecture.dia b/src/wifi/doc/WifiArchitecture.dia similarity index 100% rename from doc/WifiArchitecture.dia rename to src/wifi/doc/WifiArchitecture.dia diff --git a/doc/manual/figures/snir.dia b/src/wifi/doc/snir.dia similarity index 100% rename from doc/manual/figures/snir.dia rename to src/wifi/doc/snir.dia diff --git a/src/wifi/doc/wifi.h b/src/wifi/doc/wifi.h deleted file mode 100644 index 8a570700c..000000000 --- a/src/wifi/doc/wifi.h +++ /dev/null @@ -1,176 +0,0 @@ -/** - * \ingroup devices - * \defgroup Wifi Wifi Models - * - * \section WifiModelOverview Wifi Models Overview - * - * The set of 802.11 models provided in ns-3 attempts to provide - * an accurate MAC-level implementation of the 802.11 specification - * and to provide a not-so-slow PHY-level model of the 802.11a - * and 802.11b specifications. - * - * The current implementation provides roughly 4 levels of models: - * - the PHY layer models - * - the so-called MAC low models: they implement DCF and EDCAF - * - the so-called MAC high models: they implement the MAC-level - * beacon generation, probing, and association state machines. - * - a set of Rate control algorithms used by the MAC low models. - * - * There are presently three MAC high models, corresponding to the - * three primary Wi-Fi topological elements - Access Point (AP) - * (implemented in ns3::ApWifiMac), non-AP Station (STA) (implemented - * in ns3::StaWifiMac), and STA in an Independent Basic Service Set - * (IBSS - also commonly referred to as an ad hoc network. Implemented - * in ns3::AdhocWifiMac). - * - * - * The simplest of these is ns3::AdhocWifiMac, which implements a - * Wi-Fi MAC that does not perform any kind of beacon generation, - * probing, or association. The ns3::StaWifiMac class implements an - * active probing and association state machine that handles automatic - * re-association whenever too many beacons are missed. Finally, - * ns3::ApWifiMac implements an AP that generates periodic beacons, - * and that accepts every attempt to associate. - * - * These three MAC high models share a common parent in - * ns3::RegularWifiMac, which exposes, among other MAC configuration, - * an attribute (QosSupported) that allows configuration of - * 802.11e/WMM-style QoS support. With QoS-enabled MAC models it is - * possible to work with traffic belonging to four different Access - * Categories (ACs): AC_VO for voice traffic, AC_VI for video traffic, - * AC_BE for best-effort traffic and AC_BK for background traffic. In - * order for the MAC to determine the appropriate AC for an MSDU, - * packets forwarded down to these MAC layers should be marked using - * ns3::QosTag in order to set a TID (traffic id) for that packet - * otherwise it will be considered belonging to AC_BE. - * - * How TIDs are mapped to access classes are shown in the table below. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
TID Access Category
7 AC_VO
6 AC_VO
5 AC_VI
4 AC_VI
3 AC_BE
0 AC_BE
2 AC_BK
1 AC_BK
- * - * The MAC low layer is split in 3 components: - * - ns3::MacLow which takes care of RTS/CTS/DATA/ACK transactions. - * - ns3::DcfManager and ns3::DcfState which implements the DCF function. - * - * - ns3::DcaTxop and ns3::EdcaTxopN which handle the packet queue, - * packet fragmentation, and packet retransmissions if they are - * needed. The ns3::DcaTxop object is used by high MACs that are - * not QoS-enabled, and for transmission of frames (e.g., of type - * Management) that the standard says should access the medium - * using the DCF. ns3::EdcaTxopN is used by QoS-enabled high MACs - * and also performs QoS operations like 802.11n-style MSDU - * aggregation. - * - * The PHY layer implements a single 802.11a model in the ns3::WifiPhy class: the - * physical layer model implemented there is described fully in a paper titled - * "Yet Another Network Simulator", available at: http://cutebugs.net/files/wns2-yans.pdf - * and recently extended to cover 802.11b physical layer. - * - * The Wifi Model also provides a set of Rate control algorithms: - * - ns3::ArfWifiManager - * - ns3::AarfWifiManager - * - ns3::IdealWifiManager - * - ns3::CrWifiManager - * - ns3::OnoeWifiManager - * - ns3::AmrrWifiManager - * - ns3::CaraWifiManager - * - ns3::AarfcdWifiManager - * - * \section WifiTracingModel Wifi Tracing Model - * - * Like all ns-3 devices, the Wifi Model provides a number of trace sources. - * These trace sources can be hooked using your own custom trace code, or you - * can use our helper functions to arrange for tracing to be enabled on devices - * you specify. - * - * \subsection WifiTracingModelUpperHooks Upper-Level (MAC) Hooks - * - * From the point of view of tracing in the net device, there are several - * interesting points to insert trace hooks. The first is at the interface - * between the device and higher layers. We provide trace hooks at this point - * in packet flow, which corresponds to a transition from the network to data - * link layer, and call them collectively the device MAC hooks. - * - * The first trace hook is called "Rx" and is fired using the - * ns3::WifiNetDevice::m_rxLogger trace hook. The perspective here is looking - * down into the WifiNetDevice so a receive indicates a packet being sent up - * from the channel to be forwarded up to higher layers. - * - * The second trace hook is called "Tx" and is fired using the - * ns3::WifiNetDevice::m_txLogger trace hook. This trace hook indicates a - * packet has been sent from higher layers down to the net device for - * transmission onto the network. - * - * \subsection WifiTracingModelLowerHooks Low-Level (PHY) Hooks - * - * Another interesting place to insert trace hooks is in the state machine - * that is driving the actual device transmission and reception logic. We - * provide the following hooks to instrument the lower levels of the device. - * - * First, we provide a trace hook to indicate state changes. This trace - * source is called "State" and is fired using the - * ns3::WifiPhyStateHelper::m_stateLogger trace source. - * - * We also provide a trace hook to indicate the successful reception of a - * packet from the channel. This trace source is called "RxOk" and is - * accessed using the ns3::WifiPhyStateHelper::m_rxOkTrace trace source. - * - * There also exists a trace hook to indicate an unsuccessful reception of a - * packet from the channel. This trace source is called "RxError" and is - * accessed using the ns3::WifiPhyStateHelper::m_rxErrorTrace trace source. - * - * There is a trace hook to indicate that transmission of a packet is - * starting onto the channel. This trace source is called "Tx" (don't - * confuse it with the higher layer "Tx" hook) and is - * fired using the ns3::WifiPhyStateHelper::m_txTrace trace source. - * - * \subsection WifiTracingModelRemoteHooks Remote Station Hooks - * - * We provide access to changes in the the per-remote-station RTS counter - * through the "Ssrc" trace source which is fired using the - * ns3::WifiRemoteStation::m_ssrc trace hook. - * - * Finally, we provide access to the per-remote-station SLRC counter that - * indications the number of retransmissions of data. Changes to this - * counter are traced using the ns3::WifiRemoteStation::m_slrc source. - * - * \subsection wifil2stack Layer 2 Stack Overview - * \image html WifiArchitecture.png "Overview of the Wifi L2 sublayers traversed for transmitting and receiving a packet" - */ diff --git a/doc/manual/source/wifi.rst b/src/wifi/doc/wifi.rst similarity index 81% rename from doc/manual/source/wifi.rst rename to src/wifi/doc/wifi.rst index 9bf577066..bf8748737 100644 --- a/doc/manual/source/wifi.rst +++ b/src/wifi/doc/wifi.rst @@ -1,7 +1,7 @@ .. include:: replace.txt -Wifi NetDevice --------------- +Wifi +---- |ns3| nodes can contain a collection of NetDevice objects, much like an actual computer contains separate interface cards for Ethernet, Wifi, Bluetooth, etc. @@ -13,11 +13,11 @@ Overview of the model ********************* The WifiNetDevice models a wireless network interface controller based -on the IEEE 802.11 standard. We will go into more detail below but in brief, +on the IEEE 802.11 standard [ieee80211]_. We will go into more detail below but in brief, |ns3| provides models for these aspects of 802.11: * basic 802.11 DCF with **infrastructure** and **adhoc** modes -* **802.11a** and **802.11b** physical layers +* **802.11a**, **802.11b** and **802.11g** physical layers * QoS-based EDCA and queueing extensions of **802.11e** * various propagation loss models including **Nakagami, Rayleigh, Friis, LogDistance, FixedRss, Random** @@ -46,7 +46,7 @@ non-AP Station (STA) (``ns3::StaWifiMac``), and STA in an Independent Basic Service Set (IBSS - also commonly referred to as an ad hoc network (``ns3::AdhocWifiMac``). -The simplest of these is ``ns3::AdhocWifiMac`, which implements a +The simplest of these is ``ns3::AdhocWifiMac``, which implements a Wi-Fi MAC that does not perform any kind of beacon generation, probing, or association. The ``ns3::StaWifiMac`` class implements an active probing and association state machine that handles automatic @@ -82,12 +82,16 @@ The **MAC low layer** is split into three components: There are also several **rate control algorithms** that can be used by the Mac low layer: -* ``ns3::ArfMacStations`` -* ``ns3::AArfMacStations`` -* ``ns3::IdealMacStations`` -* ``ns3::CrMacStations`` -* ``ns3::OnoeMacStations`` -* ``ns3::AmrrMacStations`` +* ``OnoeWifiManager`` +* ``IdealWifiManager`` +* ``AarfcdWifiManager`` +* ``AarfWifiManager`` +* ``ArfWifiManager`` +* ``AmrrWifiManager`` +* ``ConstantRateWifiManager`` +* ``MinstrelWifiManager`` +* ``CaraWifiManager`` +* ``RraaWifiManager`` The PHY layer implements a single model in the ``ns3::WifiPhy class``: the physical layer model implemented there is described fully in a paper entitled @@ -101,7 +105,7 @@ limitation found in ns-2. Presently, however, there is no model for cross-channel interference or coupling. The source code for the Wifi NetDevice lives in the directory -``src/devices/wifi``. +``src/wifi``. .. _wifi-architecture: @@ -263,16 +267,9 @@ The WifiChannel and WifiPhy models The WifiChannel subclass can be used to connect together a set of ``ns3::WifiNetDevice`` network interfaces. The class ``ns3::WifiPhy`` is the -object within the WifiNetDevice that receives bits from the channel. A -WifiChannel contains a ``ns3::PropagationLossModel`` and a -``ns3::PropagationDelayModel`` which can be overridden by the -WifiChannel::SetPropagationLossModel and the -WifiChannel::SetPropagationDelayModel methods. By default, no propagation models -are set. +object within the WifiNetDevice that receives bits from the channel. +For the channel propagation modeling, the propagation module is used; see section :ref:`propagation` for details. -The WifiPhy models an 802.11a channel, in terms of frequency, modulation, and -bit rates, and interacts with the PropagationLossModel and PropagationDelayModel -found in the channel. This section summarizes the description of the BER calculations found in the yans paper taking into account the Forward Error Correction present in 802.11a @@ -321,30 +318,13 @@ SNIR function. *SNIR function over time.* -From the SNIR function we can derive bit error rates for BPSK and QAM -modulations. Then, for each interval l where BER is constant, we define the -upper bound of a probability that an error is present in the chunk of bits -located in the interval l for packet k. If we assume an AWGN channel, binary -convolutional coding (which is the case in 802.11a) and hard-decision Viterbi -decoding, the error rate is thus derived, and the packet error probability for -packet k can be computed. +From the SNIR function we can derive the Bit Error Rate (BER) and Packet Error Rate (PER) for the modulation and coding scheme being used for the transmission. Please refer to [pei80211validation]_ and [lacage2006yans]_ for a detailed description of the available BER/PER models. + WifiChannel configuration -+++++++++++++++++++++++++ +++++++++++++++++++++++++++ -WifiChannel models include both a PropagationDelayModel and a -PropagationLossModel. The following PropagationDelayModels are available: - -* ConstantSpeedPropagationDelayModel -* RandomPropagationDelayModel - -The following PropagationLossModels are available: - -* RandomPropagationLossModel -* FriisPropagationLossModel -* LogDistancePropagationLossModel -* JakesPropagationLossModel -* CompositePropagationLossModel +The WifiChannel implementation uses the propagation loss and delay models provided within the ns-3 *propagation* module. The MAC model ************* @@ -352,7 +332,7 @@ The MAC model The 802.11 Distributed Coordination Function is used to calculate when to grant access to the transmission medium. While implementing the DCF would have been particularly easy if we had used a recurring timer that expired every slot, we -chose to use the method described in *(missing reference here from Yans paper)* +chose to use the method described in [ji2004sslswn]_ where the backoff timer duration is lazily calculated whenever needed since it is claimed to have much better performance than the simpler recurring timer solution. @@ -372,45 +352,21 @@ deal with: Wifi Attributes *************** -The WifiNetDevice makes heavy use of the |ns3| :ref:`Attributes` subsystem for -configuration and default value management. Presently, approximately 100 values -are stored in this system. - -For instance, class ``ns-3::WifiMac`` exports these attributes: - -* CtsTimeout: When this timeout expires, the RTS/CTS handshake has failed. -* AckTimeout: When this timeout expires, the DATA/ACK handshake has failed. -* Sifs: The value of the SIFS constant. -* EifsNoDifs: The value of EIFS-DIFS -* Slot: The duration of a Slot. -* Pifs: The value of the PIFS constant. -* MaxPropagationDelay: The maximum propagation delay. Unused for now. -* MaxMsduSize: The maximum size of an MSDU accepted by the MAC layer.This value - conforms to the specification. -* Ssid: The ssid we want to belong to. +Should link to the list of attributes exported by Doxygen Wifi Tracing ************ -*This needs revised/updating based on the latest Doxygen* +Should link to the list of traces exported by Doxygen -|ns3| has a sophisticated tracing infrastructure that allows users to hook into -existing trace sources, or to define and export new ones. -Wifi-related trace sources that are available by default include::: +References +********** -* ``ns3::WifiNetDevice`` +.. [ieee80211] IEEE Std 802.11-2007 *Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications* - * Rx: Received payload from the MAC layer. - * Tx: Send payload to the MAC layer. +.. [pei80211validation] \G. Pei and Tom Henderson, `Validation of ns-3 802.11b PHY model* `__ -* ``ns3::WifiPhy`` +.. [lacage2006yans] \M. Lacage and T. Henderson, `Yet another Network Simulator `__ - * State: The WifiPhy state - * RxOk: A packet has been received successfully. - * RxError: A packet has been received unsuccessfully. - * Tx: Packet transmission is starting. - -Briefly, this means, for example, that a user can hook a processing function to -the "State" tracing hook above and be notified whenever the WifiPhy model -changes state. +.. [ji2004sslswn] \Z. Ji, J. Zhou, M. Takai and R. Bagrodia, *Scalable simulation of large-scale wireless networks with bounded inaccuracies*, in Proc. of the Seventh ACM Symposium on Modeling, Analysis and Simulation of Wireless and Mobile Systems, October 2004. diff --git a/src/wifi/helper/athstats-helper.cc b/src/wifi/helper/athstats-helper.cc index 027084f72..96da705a9 100644 --- a/src/wifi/helper/athstats-helper.cc +++ b/src/wifi/helper/athstats-helper.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 CTTC * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -30,7 +30,7 @@ #include -NS_LOG_COMPONENT_DEFINE("Athstats"); +NS_LOG_COMPONENT_DEFINE ("Athstats"); namespace ns3 { @@ -43,10 +43,10 @@ AthstatsHelper::AthstatsHelper () void AthstatsHelper::EnableAthstats (std::string filename, uint32_t nodeid, uint32_t deviceid) { - Ptr athstats = CreateObject (); + Ptr athstats = CreateObject (); std::ostringstream oss; oss << filename - << "_" << std::setfill ('0') << std::setw (3) << std::right << nodeid + << "_" << std::setfill ('0') << std::setw (3) << std::right << nodeid << "_" << std::setfill ('0') << std::setw (3) << std::right << deviceid; athstats->Open (oss.str ()); @@ -75,7 +75,7 @@ AthstatsHelper::EnableAthstats (std::string filename, Ptr nd) } -void +void AthstatsHelper::EnableAthstats (std::string filename, NetDeviceContainer d) { for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i) @@ -107,7 +107,7 @@ AthstatsHelper::EnableAthstats (std::string filename, NodeContainer n) NS_OBJECT_ENSURE_REGISTERED (AthstatsWifiTraceSink); -TypeId +TypeId AthstatsWifiTraceSink::GetTypeId (void) { static TypeId tid = TypeId ("ns3::AthstatsWifiTraceSink") @@ -115,23 +115,23 @@ AthstatsWifiTraceSink::GetTypeId (void) .AddConstructor () .AddAttribute ("Interval", "Time interval between reports", - TimeValue (Seconds(1.0)), + TimeValue (Seconds (1.0)), MakeTimeAccessor (&AthstatsWifiTraceSink::m_interval), MakeTimeChecker ()) - ; + ; return tid; } AthstatsWifiTraceSink::AthstatsWifiTraceSink () : m_txCount (0), - m_rxCount (0), - m_shortRetryCount (0), - m_longRetryCount (0), - m_exceededRetryCount (0), - m_phyRxOkCount (0), - m_phyRxErrorCount (0), - m_phyTxCount (0), - m_writer (0) + m_rxCount (0), + m_shortRetryCount (0), + m_longRetryCount (0), + m_exceededRetryCount (0), + m_phyRxOkCount (0), + m_phyRxErrorCount (0), + m_phyTxCount (0), + m_writer (0) { Simulator::ScheduleNow (&AthstatsWifiTraceSink::WriteStats, this); } @@ -161,7 +161,7 @@ AthstatsWifiTraceSink::~AthstatsWifiTraceSink () } } -void +void AthstatsWifiTraceSink::ResetCounters () { m_txCount = 0; @@ -177,14 +177,14 @@ AthstatsWifiTraceSink::ResetCounters () void AthstatsWifiTraceSink::DevTxTrace (std::string context, Ptr p) { - NS_LOG_FUNCTION (this << context < p) { - NS_LOG_FUNCTION (this << context < packet, double snr, WifiMode mode, enum WifiPreamble preamble) { - NS_LOG_FUNCTION (this << context < +#include #include "ns3/object.h" #include "ns3/attribute.h" #include "ns3/object-factory.h" @@ -40,7 +40,7 @@ class NetDevice; /** * @brief create AthstatsWifiTraceSink instances and connect them to wifi devices * - * + * */ class AthstatsHelper { @@ -50,9 +50,9 @@ public: void EnableAthstats (std::string filename, Ptr nd); void EnableAthstats (std::string filename, NetDeviceContainer d); void EnableAthstats (std::string filename, NodeContainer n); - + private: - Time m_interval; + Time m_interval; }; @@ -67,8 +67,8 @@ private: * driver. In particular, the reproduced behavior is that obtained * when executing athstats without parameters: a report written in * text format is produced every fixed interval, based on the events - * observed by the wifi device. - * + * observed by the wifi device. + * * Differences with the "real" athstats: * * - AthstatsWifiTraceSink is expected to write its output to a file @@ -76,130 +76,129 @@ private: * * - only a subset of the metrics supported by athstats is supported * by AthstatsWifiTraceSink - * + * * - AthstatsWifiTraceSink does never produce a cumulative report. */ class AthstatsWifiTraceSink : public Object { -public: +public: static TypeId GetTypeId (void); AthstatsWifiTraceSink (); virtual ~AthstatsWifiTraceSink (); - - /** + + /** * function to be called when the net device transmits a packet - * - * @param context + * + * @param context * @param p the packet being transmitted */ void DevTxTrace (std::string context, Ptr p); - /** + /** * function to be called when the net device receives a packet - * - * @param context + * + * @param context * @param p the packet being received */ void DevRxTrace (std::string context, Ptr p); - /** + /** * Function to be called when a RTS frame transmission by the considered * device has failed - * - * @param context + * + * @param context * @param address the MAC address of the remote station */ - void TxRtsFailedTrace (std::string context, Mac48Address address); + void TxRtsFailedTrace (std::string context, Mac48Address address); - /** + /** * Function to be called when a data frame transmission by the considered * device has failed - * - * @param context + * + * @param context * @param address the MAC address of the remote station */ - void TxDataFailedTrace (std::string context, Mac48Address address); + void TxDataFailedTrace (std::string context, Mac48Address address); - /** + /** * Function to be called when the transmission of a RTS frame has * exceeded the retry limit - * - * @param context + * + * @param context * @param address the MAC address of the remote station */ - void TxFinalRtsFailedTrace (std::string context, Mac48Address address); + void TxFinalRtsFailedTrace (std::string context, Mac48Address address); - /** + /** * Function to be called when the transmission of a data frame has * exceeded the retry limit - * - * @param context + * + * @param context * @param address the MAC address of the remote station - */ - void TxFinalDataFailedTrace (std::string context, Mac48Address address); + */ + void TxFinalDataFailedTrace (std::string context, Mac48Address address); - /** + /** * Function to be called when the PHY layer of the considered * device receives a frame - * - * @param context - * @param packet - * @param snr - * @param mode - * @param preamble + * + * @param context + * @param packet + * @param snr + * @param mode + * @param preamble */ void PhyRxOkTrace (std::string context, Ptr packet, double snr, WifiMode mode, enum WifiPreamble preamble); - /** + /** * Function to be called when a frame reception by the PHY * layer of the considered device resulted in an error due to a failure in the CRC check of * the frame - * - * @param context - * @param packet - * @param snr + * + * @param context + * @param packet + * @param snr */ void PhyRxErrorTrace (std::string context, Ptr packet, double snr); - /** + /** * Function to be called when a frame is being transmitted by the * PHY layer of the considered device - * - * @param context - * @param packet - * @param mode - * @param preamble - * @param txPower + * + * @param context + * @param packet + * @param mode + * @param preamble + * @param txPower */ void PhyTxTrace (std::string context, Ptr packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower); - /** + /** * Function to be called when the PHY layer of the considered device * changes state - * - * @param context - * @param start - * @param duration - * @param state + * + * @param context + * @param start + * @param duration + * @param state */ void PhyStateTrace (std::string context, Time start, Time duration, enum WifiPhy::State state); - /** + /** * Open a file for output - * + * * @param name the name of the file to be opened. */ void Open (std::string const& name); private: - - /** + /** * @internal */ void WriteStats (); - /** + /** * @internal */ void ResetCounters (); @@ -215,13 +214,13 @@ private: std::ofstream *m_writer; - Time m_interval; + Time m_interval; }; // class AthstatsWifiTraceSink - + } // namespace ns3 diff --git a/src/wifi/helper/nqos-wifi-mac-helper.cc b/src/wifi/helper/nqos-wifi-mac-helper.cc index 1ce706880..2a63e3c19 100644 --- a/src/wifi/helper/nqos-wifi-mac-helper.cc +++ b/src/wifi/helper/nqos-wifi-mac-helper.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, diff --git a/src/wifi/helper/nqos-wifi-mac-helper.h b/src/wifi/helper/nqos-wifi-mac-helper.h index 7bd48398c..a41ee6f91 100644 --- a/src/wifi/helper/nqos-wifi-mac-helper.h +++ b/src/wifi/helper/nqos-wifi-mac-helper.h @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -34,7 +34,7 @@ class NqosWifiMacHelper : public WifiMacHelper { public: /** - * Create a NqosWifiMacHelper to make life easier for people who want to + * Create a NqosWifiMacHelper to make life easier for people who want to * work with non-QOS Wifi MAC layers. */ NqosWifiMacHelper (); diff --git a/src/wifi/helper/qos-wifi-mac-helper.cc b/src/wifi/helper/qos-wifi-mac-helper.cc index 060196249..1000255be 100644 --- a/src/wifi/helper/qos-wifi-mac-helper.cc +++ b/src/wifi/helper/qos-wifi-mac-helper.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -128,11 +128,11 @@ QosWifiMacHelper::Setup (Ptr mac, enum AcIndex ac, std::string dcaAttrN } if (m_bAckThresholds.find (ac) != m_bAckThresholds.end ()) { - edca->SetBlockAckThreshold (m_bAckThresholds.find(ac)->second); + edca->SetBlockAckThreshold (m_bAckThresholds.find (ac)->second); } if (m_bAckInactivityTimeouts.find (ac) != m_bAckInactivityTimeouts.end ()) { - edca->SetBlockAckInactivityTimeout (m_bAckInactivityTimeouts.find(ac)->second); + edca->SetBlockAckInactivityTimeout (m_bAckInactivityTimeouts.find (ac)->second); } } diff --git a/src/wifi/helper/qos-wifi-mac-helper.h b/src/wifi/helper/qos-wifi-mac-helper.h index cef29ae04..5ce3409d0 100644 --- a/src/wifi/helper/qos-wifi-mac-helper.h +++ b/src/wifi/helper/qos-wifi-mac-helper.h @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -125,7 +125,7 @@ public: * block ack agreement is teared down. Timer is reset in an recipient station every time * that a block ack request or a MPDU with ack policy BLOCK ACK is received. * Timer is reset in a originator station every time that a block ack frame is received. - * + * * \param ac access category for which we are setting block ack threshold. Possibilities * are: AC_BK, AC_BE, AC_VI, AC_VO. * \param timeout number of block of 1024 microseconds. @@ -144,7 +144,7 @@ private: ObjectFactory m_mac; std::map m_aggregators; - /* + /* * Next maps contain, for every access category, the values for * block ack threshold and block ack inactivity timeout. */ diff --git a/src/wifi/helper/wifi-helper.cc b/src/wifi/helper/wifi-helper.cc index b47cae38c..67a3b0432 100644 --- a/src/wifi/helper/wifi-helper.cc +++ b/src/wifi/helper/wifi-helper.cc @@ -59,7 +59,7 @@ WifiHelper::Default (void) return helper; } -void +void WifiHelper::SetRemoteStationManager (std::string type, std::string n0, const AttributeValue &v0, std::string n1, const AttributeValue &v1, @@ -82,13 +82,13 @@ WifiHelper::SetRemoteStationManager (std::string type, m_stationManager.Set (n7, v7); } -void +void WifiHelper::SetStandard (enum WifiPhyStandard standard) { m_standard = standard; } -NetDeviceContainer +NetDeviceContainer WifiHelper::Install (const WifiPhyHelper &phyHelper, const WifiMacHelper &macHelper, NodeContainer c) const { @@ -108,19 +108,19 @@ WifiHelper::Install (const WifiPhyHelper &phyHelper, device->SetRemoteStationManager (manager); node->AddDevice (device); devices.Add (device); - NS_LOG_DEBUG ("node="< stream, - std::string context, + Ptr stream, + std::string context, Ptr p, - WifiMode mode, + WifiMode mode, WifiPreamble preamble, uint8_t txLevel) { @@ -51,11 +51,11 @@ AsciiPhyTransmitSinkWithContext ( *stream->GetStream () << "t " << Simulator::Now ().GetSeconds () << " " << context << " " << *p << std::endl; } -static void +static void AsciiPhyTransmitSinkWithoutContext ( - Ptr stream, + Ptr stream, Ptr p, - WifiMode mode, + WifiMode mode, WifiPreamble preamble, uint8_t txLevel) { @@ -63,12 +63,12 @@ AsciiPhyTransmitSinkWithoutContext ( *stream->GetStream () << "t " << Simulator::Now ().GetSeconds () << " " << *p << std::endl; } -static void +static void AsciiPhyReceiveSinkWithContext ( Ptr stream, std::string context, - Ptr p, - double snr, + Ptr p, + double snr, WifiMode mode, enum WifiPreamble preamble) { @@ -76,11 +76,11 @@ AsciiPhyReceiveSinkWithContext ( *stream->GetStream () << "r " << Simulator::Now ().GetSeconds () << " " << context << " " << *p << std::endl; } -static void +static void AsciiPhyReceiveSinkWithoutContext ( Ptr stream, - Ptr p, - double snr, + Ptr p, + double snr, WifiMode mode, enum WifiPreamble preamble) { @@ -89,9 +89,10 @@ AsciiPhyReceiveSinkWithoutContext ( } YansWifiChannelHelper::YansWifiChannelHelper () -{} +{ +} -YansWifiChannelHelper +YansWifiChannelHelper YansWifiChannelHelper::Default (void) { YansWifiChannelHelper helper; @@ -100,16 +101,16 @@ YansWifiChannelHelper::Default (void) return helper; } -void +void YansWifiChannelHelper::AddPropagationLoss (std::string type, - std::string n0, const AttributeValue &v0, - std::string n1, const AttributeValue &v1, - std::string n2, const AttributeValue &v2, - std::string n3, const AttributeValue &v3, - std::string n4, const AttributeValue &v4, - std::string n5, const AttributeValue &v5, - std::string n6, const AttributeValue &v6, - std::string n7, const AttributeValue &v7) + std::string n0, const AttributeValue &v0, + std::string n1, const AttributeValue &v1, + std::string n2, const AttributeValue &v2, + std::string n3, const AttributeValue &v3, + std::string n4, const AttributeValue &v4, + std::string n5, const AttributeValue &v5, + std::string n6, const AttributeValue &v6, + std::string n7, const AttributeValue &v7) { ObjectFactory factory; factory.SetTypeId (type); @@ -124,16 +125,16 @@ YansWifiChannelHelper::AddPropagationLoss (std::string type, m_propagationLoss.push_back (factory); } -void +void YansWifiChannelHelper::SetPropagationDelay (std::string type, - std::string n0, const AttributeValue &v0, - std::string n1, const AttributeValue &v1, - std::string n2, const AttributeValue &v2, - std::string n3, const AttributeValue &v3, - std::string n4, const AttributeValue &v4, - std::string n5, const AttributeValue &v5, - std::string n6, const AttributeValue &v6, - std::string n7, const AttributeValue &v7) + std::string n0, const AttributeValue &v0, + std::string n1, const AttributeValue &v1, + std::string n2, const AttributeValue &v2, + std::string n3, const AttributeValue &v3, + std::string n4, const AttributeValue &v4, + std::string n5, const AttributeValue &v5, + std::string n6, const AttributeValue &v6, + std::string n7, const AttributeValue &v7) { ObjectFactory factory; factory.SetTypeId (type); @@ -148,7 +149,7 @@ YansWifiChannelHelper::SetPropagationDelay (std::string type, m_propagationDelay = factory; } -Ptr +Ptr YansWifiChannelHelper::Create (void) const { Ptr channel = CreateObject (); @@ -157,13 +158,13 @@ YansWifiChannelHelper::Create (void) const { Ptr cur = (*i).Create (); if (prev != 0) - { - prev->SetNext (cur); - } + { + prev->SetNext (cur); + } if (m_propagationLoss.begin () == i) - { - channel->SetPropagationLossModel (cur); - } + { + channel->SetPropagationLossModel (cur); + } prev = cur; } Ptr delay = m_propagationDelay.Create (); @@ -174,12 +175,12 @@ YansWifiChannelHelper::Create (void) const YansWifiPhyHelper::YansWifiPhyHelper () : m_channel (0), - m_pcapDlt(PcapHelper::DLT_IEEE802_11) + m_pcapDlt (PcapHelper::DLT_IEEE802_11) { m_phy.SetTypeId ("ns3::YansWifiPhy"); } -YansWifiPhyHelper +YansWifiPhyHelper YansWifiPhyHelper::Default (void) { YansWifiPhyHelper helper; @@ -187,33 +188,33 @@ YansWifiPhyHelper::Default (void) return helper; } -void +void YansWifiPhyHelper::SetChannel (Ptr channel) { m_channel = channel; } -void +void YansWifiPhyHelper::SetChannel (std::string channelName) { Ptr channel = Names::Find (channelName); m_channel = channel; } -void +void YansWifiPhyHelper::Set (std::string name, const AttributeValue &v) { m_phy.Set (name, v); } -void +void YansWifiPhyHelper::SetErrorRateModel (std::string name, - std::string n0, const AttributeValue &v0, - std::string n1, const AttributeValue &v1, - std::string n2, const AttributeValue &v2, - std::string n3, const AttributeValue &v3, - std::string n4, const AttributeValue &v4, - std::string n5, const AttributeValue &v5, - std::string n6, const AttributeValue &v6, - std::string n7, const AttributeValue &v7) + std::string n0, const AttributeValue &v0, + std::string n1, const AttributeValue &v1, + std::string n2, const AttributeValue &v2, + std::string n3, const AttributeValue &v3, + std::string n4, const AttributeValue &v4, + std::string n5, const AttributeValue &v5, + std::string n6, const AttributeValue &v6, + std::string n7, const AttributeValue &v7) { m_errorRateModel = ObjectFactory (); m_errorRateModel.SetTypeId (name); @@ -227,7 +228,7 @@ YansWifiPhyHelper::SetErrorRateModel (std::string name, m_errorRateModel.Set (n7, v7); } -Ptr +Ptr YansWifiPhyHelper::Create (Ptr node, Ptr device) const { Ptr phy = m_phy.Create (); @@ -239,7 +240,7 @@ YansWifiPhyHelper::Create (Ptr node, Ptr device) const return phy; } -static void +static void PcapSniffTxEvent ( Ptr file, Ptr packet, @@ -279,7 +280,7 @@ PcapSniffTxEvent ( header.SetRate (rate); uint16_t channelFlags = 0; - switch (rate) + switch (rate) { case 2: // 1Mbps case 4: // 2Mbps @@ -287,10 +288,10 @@ PcapSniffTxEvent ( case 22: // 11Mbps channelFlags |= RadiotapHeader::CHANNEL_FLAG_CCK; break; - + default: channelFlags |= RadiotapHeader::CHANNEL_FLAG_OFDM; - break; + break; } if (channelFreqMhz < 2500) @@ -301,7 +302,7 @@ PcapSniffTxEvent ( { channelFlags |= RadiotapHeader::CHANNEL_FLAG_SPECTRUM_5GHZ; } - + header.SetChannelFrequencyAndFlags (channelFreqMhz, channelFlags); p->AddHeader (header); @@ -313,7 +314,7 @@ PcapSniffTxEvent ( } } -static void +static void PcapSniffRxEvent ( Ptr file, Ptr packet, @@ -355,7 +356,7 @@ PcapSniffRxEvent ( header.SetRate (rate); uint16_t channelFlags = 0; - switch (rate) + switch (rate) { case 2: // 1Mbps case 4: // 2Mbps @@ -363,10 +364,10 @@ PcapSniffRxEvent ( case 22: // 11Mbps channelFlags |= RadiotapHeader::CHANNEL_FLAG_CCK; break; - + default: channelFlags |= RadiotapHeader::CHANNEL_FLAG_OFDM; - break; + break; } if (channelFreqMhz < 2500) @@ -377,7 +378,7 @@ PcapSniffRxEvent ( { channelFlags |= RadiotapHeader::CHANNEL_FLAG_SPECTRUM_5GHZ; } - + header.SetChannelFrequencyAndFlags (channelFreqMhz, channelFlags); header.SetAntennaSignalPower (signalDbm); @@ -392,7 +393,7 @@ PcapSniffRxEvent ( } } -void +void YansWifiPhyHelper::SetPcapDataLinkType (enum SupportedPcapDataLinkTypes dlt) { switch (dlt) @@ -411,7 +412,7 @@ YansWifiPhyHelper::SetPcapDataLinkType (enum SupportedPcapDataLinkTypes dlt) } } -void +void YansWifiPhyHelper::EnablePcapInternal (std::string prefix, Ptr nd, bool promiscuous, bool explicitFilename) { // @@ -447,10 +448,10 @@ YansWifiPhyHelper::EnablePcapInternal (std::string prefix, Ptr nd, bo phy->TraceConnectWithoutContext ("PromiscSnifferRx", MakeBoundCallback (&PcapSniffRxEvent, file)); } -void +void YansWifiPhyHelper::EnableAsciiInternal ( - Ptr stream, - std::string prefix, + Ptr stream, + std::string prefix, Ptr nd, bool explicitFilename) { @@ -477,15 +478,15 @@ YansWifiPhyHelper::EnableAsciiInternal ( std::ostringstream oss; // - // If we are not provided an OutputStreamWrapper, we are expected to create - // one using the usual trace filename conventions and write our traces + // If we are not provided an OutputStreamWrapper, we are expected to create + // one using the usual trace filename conventions and write our traces // without a context since there will be one file per context and therefore // the context would be redundant. // if (stream == 0) { // - // Set up an output stream object to deal with private ofstream copy + // Set up an output stream object to deal with private ofstream copy // constructor and lifetime issues. Let the helper decide the actual // name of the file given the prefix. // @@ -503,8 +504,8 @@ YansWifiPhyHelper::EnableAsciiInternal ( Ptr theStream = asciiTraceHelper.CreateFileStream (filename); // - // We could go poking through the phy and the state looking for the - // correct trace source, but we can let Config deal with that with + // We could go poking through the phy and the state looking for the + // correct trace source, but we can let Config deal with that with // some search cost. Since this is presumably happening at topology // creation time, it doesn't seem much of a price to pay. // @@ -522,7 +523,7 @@ YansWifiPhyHelper::EnableAsciiInternal ( // // If we are provided an OutputStreamWrapper, we are expected to use it, and // to provide a context. We are free to come up with our own context if we - // want, and use the AsciiTraceHelper Hook*WithContext functions, but for + // want, and use the AsciiTraceHelper Hook*WithContext functions, but for // compatibility and simplicity, we just use Config::Connect and let it deal // with coming up with a context. // diff --git a/src/wifi/helper/yans-wifi-helper.h b/src/wifi/helper/yans-wifi-helper.h index 7ba513a4d..c11ca3d4b 100644 --- a/src/wifi/helper/yans-wifi-helper.h +++ b/src/wifi/helper/yans-wifi-helper.h @@ -80,14 +80,14 @@ public: * gains) are calculated in the order the models are added. */ void AddPropagationLoss (std::string name, - std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), - std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), - std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), - std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), - std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); + std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), + std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), + std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), + std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), + std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), + std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), + std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), + std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); /** * \param name the name of the model to set * \param n0 the name of the attribute to set @@ -110,14 +110,14 @@ public: * Configure a propagation delay for this channel. */ void SetPropagationDelay (std::string name, - std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), - std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), - std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), - std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), - std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), - std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), - std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), - std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); + std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), + std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), + std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), + std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), + std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (), + std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (), + std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), + std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); /** * \returns a new channel @@ -134,7 +134,7 @@ private: /** * \brief Make it easy to create and manage PHY objects for the yans model. * - * The yans PHY model is described in "Yet Another Network Simulator", + * The yans PHY model is described in "Yet Another Network Simulator", * http://cutebugs.net/files/wns2-yans.pdf * * The Pcap and ascii traces generated by the EnableAscii and EnablePcap methods defined @@ -142,7 +142,8 @@ private: * */ class YansWifiPhyHelper : public WifiPhyHelper, - public PcapHelperForDevice, public AsciiTraceHelperForDevice + public PcapHelperForDevice, + public AsciiTraceHelperForDevice { public: /** @@ -207,26 +208,27 @@ public: std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); /** - * An enumeration of the pcap data link types (DLTs) which this helper + * An enumeration of the pcap data link types (DLTs) which this helper * supports. See http://wiki.wireshark.org/Development/LibpcapFileFormat * for more information on these formats. */ - enum SupportedPcapDataLinkTypes { + enum SupportedPcapDataLinkTypes + { DLT_IEEE802_11 = PcapHelper::DLT_IEEE802_11, /**< IEEE 802.11 Wireless LAN headers on packets */ DLT_PRISM_HEADER = PcapHelper::DLT_PRISM_HEADER, /**< Include Prism monitor mode information */ DLT_IEEE802_11_RADIO = PcapHelper::DLT_IEEE802_11_RADIO /**< Include Radiotap link layer information */ }; - /** + /** * Set the data link type of PCAP traces to be used. This function has to be - * called before EnablePcap(), so that the header of the pcap file can be + * called before EnablePcap(), so that the header of the pcap file can be * written correctly. * * @see SupportedPcapDataLinkTypes * * @param dlt The data link type of the pcap file (and packets) to be used */ - void SetPcapDataLinkType (enum SupportedPcapDataLinkTypes dlt); + void SetPcapDataLinkType (enum SupportedPcapDataLinkTypes dlt); private: /** @@ -249,9 +251,9 @@ private: * @param promiscuous If true capture all possible packets available at the device. * @param explicitFilename Treat the prefix as an explicit filename if true */ - virtual void EnablePcapInternal (std::string prefix, - Ptr nd, - bool promiscuous, + virtual void EnablePcapInternal (std::string prefix, + Ptr nd, + bool promiscuous, bool explicitFilename); /** @@ -265,8 +267,8 @@ private: * \param prefix Filename prefix to use for ascii trace files. * \param nd Net device for which you want to enable tracing. */ - virtual void EnableAsciiInternal (Ptr stream, - std::string prefix, + virtual void EnableAsciiInternal (Ptr stream, + std::string prefix, Ptr nd, bool explicitFilename); diff --git a/src/wifi/model/aarf-wifi-manager.cc b/src/wifi/model/aarf-wifi-manager.cc index eb4154934..a258a3941 100644 --- a/src/wifi/model/aarf-wifi-manager.cc +++ b/src/wifi/model/aarf-wifi-manager.cc @@ -3,7 +3,7 @@ * Copyright (c) 2004,2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -24,8 +24,8 @@ #include "ns3/uinteger.h" #include "ns3/log.h" -#define Min(a,b) ((ab)?a:b) +#define Min(a,b) ((a < b) ? a : b) +#define Max(a,b) ((a > b) ? a : b) NS_LOG_COMPONENT_DEFINE ("AarfWifiManager"); @@ -38,7 +38,7 @@ struct AarfWifiRemoteStation : public WifiRemoteStation uint32_t m_failed; bool m_recovery; uint32_t m_retry; - + uint32_t m_timerTimeout; uint32_t m_successThreshold; @@ -48,7 +48,7 @@ struct AarfWifiRemoteStation : public WifiRemoteStation NS_OBJECT_ENSURE_REGISTERED (AarfWifiManager); -TypeId +TypeId AarfWifiManager::GetTypeId (void) { static TypeId tid = TypeId ("ns3::AarfWifiManager") @@ -78,14 +78,16 @@ AarfWifiManager::GetTypeId (void) UintegerValue (10), MakeUintegerAccessor (&AarfWifiManager::m_minSuccessThreshold), MakeUintegerChecker ()) - ; + ; return tid; } AarfWifiManager::AarfWifiManager () -{} +{ +} AarfWifiManager::~AarfWifiManager () -{} +{ +} WifiRemoteStation * AarfWifiManager::DoCreateStation (void) const @@ -104,9 +106,10 @@ AarfWifiManager::DoCreateStation (void) const return station; } -void +void AarfWifiManager::DoReportRtsFailed (WifiRemoteStation *station) -{} +{ +} /** * It is important to realize that "recovery" mode starts after failure of * the first transmission after a rate increase and ends at the first successful @@ -116,7 +119,7 @@ AarfWifiManager::DoReportRtsFailed (WifiRemoteStation *station) * The fundamental reason for this is that there is a backoff between each data * transmission, be it an initial transmission or a retransmission. */ -void +void AarfWifiManager::DoReportDataFailed (WifiRemoteStation *st) { AarfWifiRemoteStation *station = (AarfWifiRemoteStation *)st; @@ -125,7 +128,7 @@ AarfWifiManager::DoReportDataFailed (WifiRemoteStation *st) station->m_retry++; station->m_success = 0; - if (station->m_recovery) + if (station->m_recovery) { NS_ASSERT (station->m_retry >= 1); if (station->m_retry == 1) @@ -141,8 +144,8 @@ AarfWifiManager::DoReportDataFailed (WifiRemoteStation *st) } } station->m_timer = 0; - } - else + } + else { NS_ASSERT (station->m_retry >= 1); if (((station->m_retry - 1) % 2) == 1) @@ -155,23 +158,24 @@ AarfWifiManager::DoReportDataFailed (WifiRemoteStation *st) station->m_rate--; } } - if (station->m_retry >= 2) + if (station->m_retry >= 2) { station->m_timer = 0; } } } -void +void AarfWifiManager::DoReportRxOk (WifiRemoteStation *station, - double rxSnr, WifiMode txMode) -{} -void + double rxSnr, WifiMode txMode) +{ +} +void AarfWifiManager::DoReportRtsOk (WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr) { NS_LOG_DEBUG ("station=" << station << " rts ok"); } -void +void AarfWifiManager::DoReportDataOk (WifiRemoteStation *st, double ackSnr, WifiMode ackMode, double dataSnr) { @@ -182,23 +186,25 @@ AarfWifiManager::DoReportDataOk (WifiRemoteStation *st, station->m_recovery = false; station->m_retry = 0; NS_LOG_DEBUG ("station=" << station << " data ok success=" << station->m_success << ", timer=" << station->m_timer); - if ((station->m_success == station->m_successThreshold || - station->m_timer == station->m_timerTimeout) && - (station->m_rate < (GetNSupported (station) - 1))) + if ((station->m_success == station->m_successThreshold + || station->m_timer == station->m_timerTimeout) + && (station->m_rate < (GetNSupported (station) - 1))) { - NS_LOG_DEBUG ("station="<m_rate++; station->m_timer = 0; station->m_success = 0; station->m_recovery = true; } } -void +void AarfWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *station) -{} -void +{ +} +void AarfWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station) -{} +{ +} WifiMode AarfWifiManager::DoGetDataMode (WifiRemoteStation *st, uint32_t size) @@ -215,7 +221,7 @@ AarfWifiManager::DoGetRtsMode (WifiRemoteStation *st) return GetSupported (station, 0); } -bool +bool AarfWifiManager::IsLowLatency (void) const { return true; diff --git a/src/wifi/model/aarf-wifi-manager.h b/src/wifi/model/aarf-wifi-manager.h index 476a28073..514b589ae 100644 --- a/src/wifi/model/aarf-wifi-manager.h +++ b/src/wifi/model/aarf-wifi-manager.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -26,13 +26,14 @@ namespace ns3 { /** * \brief AARF Rate control algorithm + * \ingroup wifi * * This class implements the AARF rate control algorithm which * was initially described in IEEE 802.11 Rate Adaptation: - * A Practical Approach, by M. Lacage, M.H. Manshaei, and + * A Practical Approach, by M. Lacage, M.H. Manshaei, and * T. Turletti. */ -class AarfWifiManager : public WifiRemoteStationManager +class AarfWifiManager : public WifiRemoteStationManager { public: static TypeId GetTypeId (void); @@ -40,8 +41,8 @@ public: virtual ~AarfWifiManager (); private: // overriden from base class - virtual WifiRemoteStation *DoCreateStation (void) const; - virtual void DoReportRxOk (WifiRemoteStation *station, + virtual WifiRemoteStation * DoCreateStation (void) const; + virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode); virtual void DoReportRtsFailed (WifiRemoteStation *station); virtual void DoReportDataFailed (WifiRemoteStation *station); diff --git a/src/wifi/model/aarfcd-wifi-manager.cc b/src/wifi/model/aarfcd-wifi-manager.cc index 42b16b662..4b06771ff 100644 --- a/src/wifi/model/aarfcd-wifi-manager.cc +++ b/src/wifi/model/aarfcd-wifi-manager.cc @@ -3,7 +3,7 @@ * Copyright (c) 2004,2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -27,8 +27,8 @@ #include "ns3/uinteger.h" #include -#define Min(a,b) ((ab)?a:b) +#define Min(a,b) ((a < b) ? a : b) +#define Max(a,b) ((a > b) ? a : b) NS_LOG_COMPONENT_DEFINE ("Aarfcd"); @@ -42,7 +42,7 @@ struct AarfcdWifiRemoteStation : public WifiRemoteStation bool m_recovery; bool m_justModifyRate; uint32_t m_retry; - + uint32_t m_successThreshold; uint32_t m_timerTimeout; @@ -53,9 +53,9 @@ struct AarfcdWifiRemoteStation : public WifiRemoteStation bool m_haveASuccess; }; -NS_OBJECT_ENSURE_REGISTERED(AarfcdWifiManager); +NS_OBJECT_ENSURE_REGISTERED (AarfcdWifiManager); -TypeId +TypeId AarfcdWifiManager::GetTypeId (void) { static TypeId tid = TypeId ("ns3::AarfcdWifiManager") @@ -85,12 +85,12 @@ AarfcdWifiManager::GetTypeId (void) UintegerValue (10), MakeUintegerAccessor (&AarfcdWifiManager::m_minSuccessThreshold), MakeUintegerChecker ()) - .AddAttribute ("MinRtsWnd", + .AddAttribute ("MinRtsWnd", "Minimum value for Rts window of Aarf-CD", UintegerValue (1), MakeUintegerAccessor (&AarfcdWifiManager::m_minRtsWnd), MakeUintegerChecker ()) - .AddAttribute ("MaxRtsWnd", + .AddAttribute ("MaxRtsWnd", "Maximum value for Rts window of Aarf-CD", UintegerValue (40), MakeUintegerAccessor (&AarfcdWifiManager::m_maxRtsWnd), @@ -105,14 +105,16 @@ AarfcdWifiManager::GetTypeId (void) BooleanValue (true), MakeBooleanAccessor (&AarfcdWifiManager::m_turnOnRtsAfterRateIncrease), MakeBooleanChecker ()) - ; + ; return tid; } AarfcdWifiManager::AarfcdWifiManager () : WifiRemoteStationManager () -{} +{ +} AarfcdWifiManager::~AarfcdWifiManager () -{} +{ +} WifiRemoteStation * AarfcdWifiManager::DoCreateStation (void) const { @@ -138,9 +140,10 @@ AarfcdWifiManager::DoCreateStation (void) const return station; } -void +void AarfcdWifiManager::DoReportRtsFailed (WifiRemoteStation *station) -{} +{ +} /** * It is important to realize that "recovery" mode starts after failure of * the first transmission after a rate increase and ends at the first successful @@ -150,7 +153,7 @@ AarfcdWifiManager::DoReportRtsFailed (WifiRemoteStation *station) * The fundamental reason for this is that there is a backoff between each data * transmission, be it an initial transmission or a retransmission. */ -void +void AarfcdWifiManager::DoReportDataFailed (WifiRemoteStation *st) { @@ -160,24 +163,24 @@ AarfcdWifiManager::DoReportDataFailed (WifiRemoteStation *st) station->m_retry++; station->m_success = 0; - if (!station->m_rtsOn) + if (!station->m_rtsOn) { TurnOnRts (station); - if (!station->m_justModifyRate && !station->m_haveASuccess) + if (!station->m_justModifyRate && !station->m_haveASuccess) { IncreaseRtsWnd (station); } - else + else { ResetRtsWnd (station); } station->m_rtsCounter = station->m_rtsWnd; - if (station->m_retry >= 2) + if (station->m_retry >= 2) { station->m_timer = 0; } } - else if (station->m_recovery) + else if (station->m_recovery) { NS_ASSERT (station->m_retry >= 1); station->m_justModifyRate = false; @@ -185,7 +188,7 @@ AarfcdWifiManager::DoReportDataFailed (WifiRemoteStation *st) if (station->m_retry == 1) { // need recovery fallback - if (m_turnOffRtsAfterRateDecrease) + if (m_turnOffRtsAfterRateDecrease) { TurnOffRts (station); } @@ -200,8 +203,8 @@ AarfcdWifiManager::DoReportDataFailed (WifiRemoteStation *st) } } station->m_timer = 0; - } - else + } + else { NS_ASSERT (station->m_retry >= 1); station->m_justModifyRate = false; @@ -209,7 +212,7 @@ AarfcdWifiManager::DoReportDataFailed (WifiRemoteStation *st) if (((station->m_retry - 1) % 2) == 1) { // need normal fallback - if (m_turnOffRtsAfterRateDecrease) + if (m_turnOffRtsAfterRateDecrease) { TurnOffRts (station); } @@ -221,28 +224,29 @@ AarfcdWifiManager::DoReportDataFailed (WifiRemoteStation *st) station->m_rate--; } } - if (station->m_retry >= 2) + if (station->m_retry >= 2) { station->m_timer = 0; } } CheckRts (station); } -void +void AarfcdWifiManager::DoReportRxOk (WifiRemoteStation *station, - double rxSnr, WifiMode txMode) -{} -void + double rxSnr, WifiMode txMode) +{ +} +void AarfcdWifiManager::DoReportRtsOk (WifiRemoteStation *st, - double ctsSnr, WifiMode ctsMode, double rtsSnr) + double ctsSnr, WifiMode ctsMode, double rtsSnr) { AarfcdWifiRemoteStation *station = (AarfcdWifiRemoteStation *) st; NS_LOG_DEBUG ("station=" << station << " rts ok"); station->m_rtsCounter--; } -void +void AarfcdWifiManager::DoReportDataOk (WifiRemoteStation *st, - double ackSnr, WifiMode ackMode, double dataSnr) + double ackSnr, WifiMode ackMode, double dataSnr) { AarfcdWifiRemoteStation *station = (AarfcdWifiRemoteStation *) st; station->m_timer++; @@ -253,17 +257,17 @@ AarfcdWifiManager::DoReportDataOk (WifiRemoteStation *st, station->m_justModifyRate = false; station->m_haveASuccess = true; NS_LOG_DEBUG ("station=" << station << " data ok success=" << station->m_success << ", timer=" << station->m_timer); - if ((station->m_success == station->m_successThreshold || - station->m_timer == station->m_timerTimeout) && - (station->m_rate < (GetNSupported (station) - 1))) + if ((station->m_success == station->m_successThreshold + || station->m_timer == station->m_timerTimeout) + && (station->m_rate < (GetNSupported (station) - 1))) { - NS_LOG_DEBUG ("station="<m_rate++; station->m_timer = 0; station->m_success = 0; station->m_recovery = true; station->m_justModifyRate = true; - if (m_turnOnRtsAfterRateIncrease) + if (m_turnOnRtsAfterRateIncrease) { TurnOnRts (station); ResetRtsWnd (station); @@ -272,12 +276,14 @@ AarfcdWifiManager::DoReportDataOk (WifiRemoteStation *st, } CheckRts (station); } -void +void AarfcdWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *station) -{} -void +{ +} +void AarfcdWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station) -{} +{ +} WifiMode AarfcdWifiManager::DoGetDataMode (WifiRemoteStation *st, uint32_t size) @@ -299,12 +305,12 @@ AarfcdWifiManager::DoNeedRts (WifiRemoteStation *st, Ptr packet, bool normally) { AarfcdWifiRemoteStation *station = (AarfcdWifiRemoteStation *) st; - NS_LOG_INFO ("" << station << " rate=" << station->m_rate << " rts=" << (station->m_rtsOn?"RTS":"BASIC") << + NS_LOG_INFO ("" << station << " rate=" << station->m_rate << " rts=" << (station->m_rtsOn ? "RTS" : "BASIC") << " rtsCounter=" << station->m_rtsCounter); return station->m_rtsOn; } -bool +bool AarfcdWifiManager::IsLowLatency (void) const { return true; @@ -313,7 +319,7 @@ AarfcdWifiManager::IsLowLatency (void) const void AarfcdWifiManager::CheckRts (AarfcdWifiRemoteStation *station) { - if (station->m_rtsCounter == 0 && station->m_rtsOn) + if (station->m_rtsCounter == 0 && station->m_rtsOn) { TurnOffRts (station); } diff --git a/src/wifi/model/aarfcd-wifi-manager.h b/src/wifi/model/aarfcd-wifi-manager.h index 4c98d145e..bd3779045 100644 --- a/src/wifi/model/aarfcd-wifi-manager.h +++ b/src/wifi/model/aarfcd-wifi-manager.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -28,13 +28,14 @@ struct AarfcdWifiRemoteStation; /** * \brief an implementation of the AARF-CD algorithm + * \ingroup wifi * * This algorithm was first described in "Efficient Collision Detection for Auto Rate Fallback Algorithm". * The implementation available here was done by Federico Maguolo for a very early development * version of ns-3. Federico died before merging this work in ns-3 itself so his code was ported * to ns-3 later without his supervision. */ -class AarfcdWifiManager : public WifiRemoteStationManager +class AarfcdWifiManager : public WifiRemoteStationManager { public: static TypeId GetTypeId (void); @@ -43,8 +44,8 @@ public: private: // overriden from base class - virtual WifiRemoteStation *DoCreateStation (void) const; - virtual void DoReportRxOk (WifiRemoteStation *station, + virtual WifiRemoteStation * DoCreateStation (void) const; + virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode); virtual void DoReportRtsFailed (WifiRemoteStation *station); virtual void DoReportDataFailed (WifiRemoteStation *station); @@ -56,7 +57,7 @@ private: virtual void DoReportFinalDataFailed (WifiRemoteStation *station); virtual WifiMode DoGetDataMode (WifiRemoteStation *station, uint32_t size); virtual WifiMode DoGetRtsMode (WifiRemoteStation *station); - virtual bool DoNeedRts (WifiRemoteStation *station, + virtual bool DoNeedRts (WifiRemoteStation *station, Ptr packet, bool normally); virtual bool IsLowLatency (void) const; diff --git a/src/wifi/model/adhoc-wifi-mac.cc b/src/wifi/model/adhoc-wifi-mac.cc index b7b32fe7d..27ff71899 100644 --- a/src/wifi/model/adhoc-wifi-mac.cc +++ b/src/wifi/model/adhoc-wifi-mac.cc @@ -172,7 +172,7 @@ AdhocWifiMac::Receive (Ptr packet, const WifiMacHeader *hdr) { if (hdr->IsQosData () && hdr->IsQosAmsdu ()) { - NS_LOG_DEBUG ("Received A-MSDU from"< (0.0, 1.0)) .AddAttribute ("SuccessRatio", "Ratio of maximum erroneous transmissions needed to switch to a higher rate", - DoubleValue (1.0/10.0), + DoubleValue (1.0 / 10.0), MakeDoubleAccessor (&AmrrWifiManager::m_successRatio), MakeDoubleChecker (0.0, 1.0)) .AddAttribute ("MaxSuccessThreshold", @@ -75,12 +75,13 @@ AmrrWifiManager::GetTypeId (void) UintegerValue (1), MakeUintegerAccessor (&AmrrWifiManager::m_minSuccessThreshold), MakeUintegerChecker ()) - ; + ; return tid; } AmrrWifiManager::AmrrWifiManager () -{} +{ +} WifiRemoteStation * AmrrWifiManager::DoCreateStation (void) const @@ -99,37 +100,40 @@ AmrrWifiManager::DoCreateStation (void) const } -void +void AmrrWifiManager::DoReportRxOk (WifiRemoteStation *station, - double rxSnr, WifiMode txMode) -{} -void + double rxSnr, WifiMode txMode) +{ +} +void AmrrWifiManager::DoReportRtsFailed (WifiRemoteStation *station) -{} -void +{ +} +void AmrrWifiManager::DoReportDataFailed (WifiRemoteStation *st) { AmrrWifiRemoteStation *station = (AmrrWifiRemoteStation *)st; station->m_retry++; station->m_tx_retr++; } -void +void AmrrWifiManager::DoReportRtsOk (WifiRemoteStation *st, - double ctsSnr, WifiMode ctsMode, double rtsSnr) + double ctsSnr, WifiMode ctsMode, double rtsSnr) { } -void +void AmrrWifiManager::DoReportDataOk (WifiRemoteStation *st, - double ackSnr, WifiMode ackMode, double dataSnr) + double ackSnr, WifiMode ackMode, double dataSnr) { AmrrWifiRemoteStation *station = (AmrrWifiRemoteStation *)st; station->m_retry = 0; station->m_tx_ok++; } -void +void AmrrWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *station) -{} -void +{ +} +void AmrrWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st) { AmrrWifiRemoteStation *station = (AmrrWifiRemoteStation *)st; @@ -162,20 +166,20 @@ AmrrWifiManager::IsEnough (AmrrWifiRemoteStation *station) const { return (station->m_tx_retr + station->m_tx_err + station->m_tx_ok) > 10; } -void +void AmrrWifiManager::ResetCnt (AmrrWifiRemoteStation *station) { station->m_tx_ok = 0; station->m_tx_err = 0; station->m_tx_retr = 0; } -void +void AmrrWifiManager::IncreaseRate (AmrrWifiRemoteStation *station) { station->m_txrate++; NS_ASSERT (station->m_txrate < GetNSupported (station)); } -void +void AmrrWifiManager::DecreaseRate (AmrrWifiRemoteStation *station) { station->m_txrate--; @@ -193,59 +197,59 @@ AmrrWifiManager::UpdateMode (AmrrWifiRemoteStation *station) bool needChange = false; - if (IsSuccess (station) && IsEnough (station)) + if (IsSuccess (station) && IsEnough (station)) { station->m_success++; - NS_LOG_DEBUG ("++ success="<m_success<<" successThreshold="<m_successThreshold<< - " tx_ok="<m_tx_ok<<" tx_err="<m_tx_err<<" tx_retr="<m_tx_retr<< - " rate="<m_txrate<<" n-supported-rates="<m_success >= station->m_successThreshold && - !IsMaxRate (station)) + NS_LOG_DEBUG ("++ success=" << station->m_success << " successThreshold=" << station->m_successThreshold << + " tx_ok=" << station->m_tx_ok << " tx_err=" << station->m_tx_err << " tx_retr=" << station->m_tx_retr << + " rate=" << station->m_txrate << " n-supported-rates=" << GetNSupported (station)); + if (station->m_success >= station->m_successThreshold + && !IsMaxRate (station)) { station->m_recovery = true; station->m_success = 0; IncreaseRate (station); needChange = true; - } - else + } + else { station->m_recovery = false; } - } - else if (IsFailure (station)) + } + else if (IsFailure (station)) { station->m_success = 0; - NS_LOG_DEBUG ("-- success="<m_success<<" successThreshold="<m_successThreshold<< - " tx_ok="<m_tx_ok<<" tx_err="<m_tx_err<<" tx_retr="<m_tx_retr<< - " rate="<m_txrate<<" n-supported-rates="<IEEE 802.11 Rate Adaptation: - * A Practical Approach, by M. Lacage, M.H. Manshaei, and + * A Practical Approach, by M. Lacage, M.H. Manshaei, and * T. Turletti. */ class AmrrWifiManager : public WifiRemoteStationManager @@ -44,8 +45,8 @@ public: private: // overriden from base class - virtual WifiRemoteStation *DoCreateStation (void) const; - virtual void DoReportRxOk (WifiRemoteStation *station, + virtual WifiRemoteStation * DoCreateStation (void) const; + virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode); virtual void DoReportRtsFailed (WifiRemoteStation *station); virtual void DoReportDataFailed (WifiRemoteStation *station); diff --git a/src/wifi/model/amsdu-subframe-header.cc b/src/wifi/model/amsdu-subframe-header.cc index f71b3973d..442590b15 100644 --- a/src/wifi/model/amsdu-subframe-header.cc +++ b/src/wifi/model/amsdu-subframe-header.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -30,11 +30,11 @@ AmsduSubframeHeader::GetTypeId () static TypeId tid = TypeId ("ns3::AmsduSubframeHeader") .SetParent
() .AddConstructor () - ; - return tid; + ; + return tid; } -TypeId +TypeId AmsduSubframeHeader::GetInstanceTypeId (void) const { return GetTypeId (); @@ -42,10 +42,12 @@ AmsduSubframeHeader::GetInstanceTypeId (void) const AmsduSubframeHeader::AmsduSubframeHeader () : m_length (0) -{} +{ +} AmsduSubframeHeader::~AmsduSubframeHeader () -{} +{ +} uint32_t AmsduSubframeHeader::GetSerializedSize () const @@ -106,7 +108,7 @@ AmsduSubframeHeader::GetSourceAddr (void) const { return m_sa; } - + uint16_t AmsduSubframeHeader::GetLength (void) const { diff --git a/src/wifi/model/amsdu-subframe-header.h b/src/wifi/model/amsdu-subframe-header.h index a19dfcc77..63b41fd7c 100644 --- a/src/wifi/model/amsdu-subframe-header.h +++ b/src/wifi/model/amsdu-subframe-header.h @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -25,13 +25,17 @@ namespace ns3 { +/** + * \ingroup wifi + * + * + */ class AmsduSubframeHeader : public Header { public: - AmsduSubframeHeader (); virtual ~AmsduSubframeHeader (); - + static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; virtual void Print (std::ostream &os) const; diff --git a/src/wifi/model/ap-wifi-mac.cc b/src/wifi/model/ap-wifi-mac.cc index 8374a2da1..2af531eb1 100644 --- a/src/wifi/model/ap-wifi-mac.cc +++ b/src/wifi/model/ap-wifi-mac.cc @@ -68,9 +68,9 @@ ApWifiMac::ApWifiMac () { NS_LOG_FUNCTION (this); m_beaconDca = CreateObject (); - m_beaconDca->SetAifsn(1); - m_beaconDca->SetMinCw(0); - m_beaconDca->SetMaxCw(0); + m_beaconDca->SetAifsn (1); + m_beaconDca->SetMinCw (0); + m_beaconDca->SetMaxCw (0); m_beaconDca->SetLow (m_low); m_beaconDca->SetManager (m_dcfManager); @@ -374,10 +374,10 @@ ApWifiMac::TxOk (const WifiMacHeader &hdr) NS_LOG_FUNCTION (this); RegularWifiMac::TxOk (hdr); - if (hdr.IsAssocResp () && - m_stationManager->IsWaitAssocTxOk (hdr.GetAddr1 ())) + if (hdr.IsAssocResp () + && m_stationManager->IsWaitAssocTxOk (hdr.GetAddr1 ())) { - NS_LOG_DEBUG ("associated with sta="< ()) - ; + ; return tid; } ArfWifiManager::ArfWifiManager () -{} +{ +} ArfWifiManager::~ArfWifiManager () -{} +{ +} WifiRemoteStation * ArfWifiManager::DoCreateStation (void) const { @@ -84,9 +86,10 @@ ArfWifiManager::DoCreateStation (void) const return station; } -void +void ArfWifiManager::DoReportRtsFailed (WifiRemoteStation *station) -{} +{ +} /** * It is important to realize that "recovery" mode starts after failure of * the first transmission after a rate increase and ends at the first successful @@ -96,7 +99,7 @@ ArfWifiManager::DoReportRtsFailed (WifiRemoteStation *station) * The fundamental reason for this is that there is a backoff between each data * transmission, be it an initial transmission or a retransmission. */ -void +void ArfWifiManager::DoReportDataFailed (WifiRemoteStation *st) { ArfWifiRemoteStation *station = (ArfWifiRemoteStation *)st; @@ -105,7 +108,7 @@ ArfWifiManager::DoReportDataFailed (WifiRemoteStation *st) station->m_retry++; station->m_success = 0; - if (station->m_recovery) + if (station->m_recovery) { NS_ASSERT (station->m_retry >= 1); if (station->m_retry == 1) @@ -117,8 +120,8 @@ ArfWifiManager::DoReportDataFailed (WifiRemoteStation *st) } } station->m_timer = 0; - } - else + } + else { NS_ASSERT (station->m_retry >= 1); if (((station->m_retry - 1) % 2) == 1) @@ -129,20 +132,21 @@ ArfWifiManager::DoReportDataFailed (WifiRemoteStation *st) station->m_rate--; } } - if (station->m_retry >= 2) + if (station->m_retry >= 2) { station->m_timer = 0; } } } -void +void ArfWifiManager::DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode) -{} +{ +} void ArfWifiManager::DoReportRtsOk (WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr) { - NS_LOG_DEBUG ("station="<m_recovery = false; station->m_retry = 0; NS_LOG_DEBUG ("station=" << station << " data ok success=" << station->m_success << ", timer=" << station->m_timer); - if ((station->m_success == m_successThreshold || - station->m_timer == m_timerThreshold) && - (station->m_rate < (station->m_state->m_operationalRateSet.size () - 1))) + if ((station->m_success == m_successThreshold + || station->m_timer == m_timerThreshold) + && (station->m_rate < (station->m_state->m_operationalRateSet.size () - 1))) { - NS_LOG_DEBUG ("station="<m_rate++; station->m_timer = 0; station->m_success = 0; station->m_recovery = true; } } -void +void ArfWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *station) -{} -void +{ +} +void ArfWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station) -{} +{ +} WifiMode ArfWifiManager::DoGetDataMode (WifiRemoteStation *st, uint32_t size) @@ -187,7 +193,7 @@ ArfWifiManager::DoGetRtsMode (WifiRemoteStation *st) return GetSupported (station, 0); } -bool +bool ArfWifiManager::IsLowLatency (void) const { return true; diff --git a/src/wifi/model/arf-wifi-manager.h b/src/wifi/model/arf-wifi-manager.h index 5047b9307..50fc3837a 100644 --- a/src/wifi/model/arf-wifi-manager.h +++ b/src/wifi/model/arf-wifi-manager.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -25,17 +25,18 @@ namespace ns3 { /** + * \ingroup wifi * \brief ARF Rate control algorithm * * This class implements the so-called ARF algorithm which was - * initially described in WaveLAN-II: A High-performance wireless + * initially described in WaveLAN-II: A High-performance wireless * LAN for the unlicensed band, by A. Kamerman and L. Monteban. in * Bell Lab Technical Journal, pages 118-133, Summer 1997. * * This implementation differs from the initial description in that it - * uses a packet-based timer rather than a time-based timer as described + * uses a packet-based timer rather than a time-based timer as described * in XXX (I cannot find back the original paper which described how - * the time-based timer could be easily replaced with a packet-based + * the time-based timer could be easily replaced with a packet-based * timer.) */ class ArfWifiManager : public WifiRemoteStationManager @@ -47,8 +48,8 @@ public: private: // overriden from base class - virtual WifiRemoteStation *DoCreateStation (void) const; - virtual void DoReportRxOk (WifiRemoteStation *station, + virtual WifiRemoteStation * DoCreateStation (void) const; + virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode); virtual void DoReportRtsFailed (WifiRemoteStation *station); virtual void DoReportDataFailed (WifiRemoteStation *station); diff --git a/src/wifi/model/block-ack-agreement.cc b/src/wifi/model/block-ack-agreement.cc index 7d27eea96..b264f9896 100644 --- a/src/wifi/model/block-ack-agreement.cc +++ b/src/wifi/model/block-ack-agreement.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -22,15 +22,16 @@ namespace ns3 { BlockAckAgreement::BlockAckAgreement () - : m_amsduSupported (0), - m_blockAckPolicy (1), - m_inactivityEvent () -{} + : m_amsduSupported (0), + m_blockAckPolicy (1), + m_inactivityEvent () +{ +} BlockAckAgreement::BlockAckAgreement (Mac48Address peer, uint8_t tid) - : m_amsduSupported (0), - m_blockAckPolicy (1), - m_inactivityEvent () + : m_amsduSupported (0), + m_blockAckPolicy (1), + m_inactivityEvent () { m_tid = tid; m_peer = peer; @@ -103,7 +104,7 @@ BlockAckAgreement::GetStartingSequence (void) const uint16_t BlockAckAgreement::GetStartingSequenceControl (void) const { - uint16_t seqControl = (m_startingSeq<<4) | 0xfff0; + uint16_t seqControl = (m_startingSeq << 4) | 0xfff0; return seqControl; } bool @@ -114,7 +115,7 @@ BlockAckAgreement::IsImmediateBlockAck (void) const bool BlockAckAgreement::IsAmsduSupported (void) const { - return (m_amsduSupported == 1)?true:false; + return (m_amsduSupported == 1) ? true : false; } } //namespace ns3 diff --git a/src/wifi/model/block-ack-agreement.h b/src/wifi/model/block-ack-agreement.h index 34f4459e4..c0364ea36 100644 --- a/src/wifi/model/block-ack-agreement.h +++ b/src/wifi/model/block-ack-agreement.h @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -26,8 +26,9 @@ namespace ns3 { /** * \brief Maintains information for a block ack agreement. + * \ingroup wifi */ -class BlockAckAgreement +class BlockAckAgreement { friend class MacLow; public: @@ -51,7 +52,6 @@ public: bool IsAmsduSupported (void) const; protected: - Mac48Address m_peer; uint8_t m_amsduSupported; uint8_t m_blockAckPolicy; /* represents type of block ack: immediate or delayed */ @@ -59,7 +59,7 @@ protected: uint16_t m_bufferSize; uint16_t m_timeout; uint16_t m_startingSeq; - + EventId m_inactivityEvent; }; diff --git a/src/wifi/model/block-ack-cache.cc b/src/wifi/model/block-ack-cache.cc index c77e0a5c3..095bf044c 100644 --- a/src/wifi/model/block-ack-cache.cc +++ b/src/wifi/model/block-ack-cache.cc @@ -3,7 +3,7 @@ * Copyright (c) 2010 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -53,7 +53,7 @@ BlockAckCache::UpdateWithMpdu (const WifiMacHeader *hdr) WINSIZE_ASSERT; } - m_bitmap[seqNumber] |= (0x0001<GetFragmentNumber ()); + m_bitmap[seqNumber] |= (0x0001 << hdr->GetFragmentNumber ()); } } @@ -91,7 +91,7 @@ BlockAckCache::ResetPortionOfBitmap (uint16_t start, uint16_t end) uint32_t i = start; for (; i != end; i = (i + 1) % 4096) { - m_bitmap[i] = 0; + m_bitmap[i] = 0; } m_bitmap[i] = 0; } @@ -112,7 +112,7 @@ BlockAckCache::FillBlockAckBitmap (CtrlBAckResponseHeader *blockAckHeader) else if (blockAckHeader->IsCompressed ()) { uint32_t i = blockAckHeader->GetStartingSequence (); - uint32_t end = ((i + m_winSize) % 4096) - 1; + uint32_t end = ((i + m_winSize) % 4096) - 1; for (; i != end; i = (i + 1) % 4096) { if (m_bitmap[i] == 1) diff --git a/src/wifi/model/block-ack-cache.h b/src/wifi/model/block-ack-cache.h index 9cc2108f1..affee0fa3 100644 --- a/src/wifi/model/block-ack-cache.h +++ b/src/wifi/model/block-ack-cache.h @@ -3,7 +3,7 @@ * Copyright (c) 2010 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -27,6 +27,11 @@ namespace ns3 { class WifiMacHeader; class CtrlBAckResponseHeader; +/** + * \ingroup wifi + * + * + */ class BlockAckCache { public: diff --git a/src/wifi/model/block-ack-manager.cc b/src/wifi/model/block-ack-manager.cc index 12f928331..2387002d7 100644 --- a/src/wifi/model/block-ack-manager.cc +++ b/src/wifi/model/block-ack-manager.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009, 2010 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -36,21 +36,31 @@ NS_LOG_COMPONENT_DEFINE ("BlockAckManager"); namespace ns3 { BlockAckManager::Item::Item () -{} +{ +} BlockAckManager::Item::Item (Ptr packet, const WifiMacHeader &hdr, Time tStamp) - : packet (packet), hdr (hdr), timestamp (tStamp) -{} + : packet (packet), + hdr (hdr), + timestamp (tStamp) +{ +} Bar::Bar () -{} +{ +} Bar::Bar (Ptr bar, Mac48Address recipient, uint8_t tid, bool immediate) - : bar (bar), recipient (recipient), tid (tid), immediate (immediate) -{} + : bar (bar), + recipient (recipient), + tid (tid), + immediate (immediate) +{ +} BlockAckManager::BlockAckManager () -{} +{ +} BlockAckManager::~BlockAckManager () { @@ -66,14 +76,15 @@ BlockAckManager::ExistsAgreement (Mac48Address recipient, uint8_t tid) const } bool -BlockAckManager::ExistsAgreementInState (Mac48Address recipient, uint8_t tid, +BlockAckManager::ExistsAgreementInState (Mac48Address recipient, uint8_t tid, enum OriginatorBlockAckAgreement::State state) const { AgreementsCI it; it = m_agreements.find (std::make_pair (recipient, tid)); if (it != m_agreements.end ()) { - switch (state) { + switch (state) + { case OriginatorBlockAckAgreement::INACTIVE: return it->second.first.IsInactive (); case OriginatorBlockAckAgreement::ESTABLISHED: @@ -84,7 +95,7 @@ BlockAckManager::ExistsAgreementInState (Mac48Address recipient, uint8_t tid, return it->second.first.IsUnsuccessful (); default: NS_FATAL_ERROR ("Invalid state for block ack agreement"); - } + } } return false; } @@ -95,7 +106,7 @@ BlockAckManager::CreateAgreement (const MgtAddBaRequestHeader *reqHdr, Mac48Addr pair key (recipient, reqHdr->GetTid ()); OriginatorBlockAckAgreement agreement (recipient, reqHdr->GetTid ()); agreement.SetStartingSequence (reqHdr->GetStartingSequence ()); - /* for now we assume that originator doesn't use this field. Use of this field + /* for now we assume that originator doesn't use this field. Use of this field is mandatory only for recipient */ agreement.SetBufferSize (0); agreement.SetTimeout (reqHdr->GetTimeout ()); @@ -103,13 +114,13 @@ BlockAckManager::CreateAgreement (const MgtAddBaRequestHeader *reqHdr, Mac48Addr if (reqHdr->IsImmediateBlockAck ()) { agreement.SetImmediateBlockAck (); - } + } else { agreement.SetDelayedBlockAck (); } agreement.SetState (OriginatorBlockAckAgreement::PENDING); - PacketQueue queue(0); + PacketQueue queue (0); pair value (agreement, queue); m_agreements.insert (make_pair (key, value)); m_blockPackets (recipient, reqHdr->GetTid ()); @@ -162,7 +173,7 @@ BlockAckManager::UpdateAgreement (const MgtAddBaResponseHeader *respHdr, Mac48Ad if (respHdr->IsImmediateBlockAck ()) { agreement.SetImmediateBlockAck (); - } + } else { agreement.SetDelayedBlockAck (); @@ -171,8 +182,8 @@ BlockAckManager::UpdateAgreement (const MgtAddBaResponseHeader *respHdr, Mac48Ad if (agreement.GetTimeout () != 0) { Time timeout = MicroSeconds (1024 * agreement.GetTimeout ()); - agreement.m_inactivityEvent = Simulator::Schedule (timeout, - &BlockAckManager::InactivityTimeout, + agreement.m_inactivityEvent = Simulator::Schedule (timeout, + &BlockAckManager::InactivityTimeout, this, recipient, tid); } @@ -208,12 +219,12 @@ BlockAckManager::GetNextPacket (WifiMacHeader &hdr) packet = queueIt->packet; hdr = queueIt->hdr; hdr.SetRetry (); - NS_LOG_INFO ("Retry packet seq="< () - .AddConstructor () - .AddAttribute ("ProbeThreshold", - "The number of consecutive transmissions failure to activate the RTS probe.", - UintegerValue (1), - MakeUintegerAccessor (&CaraWifiManager::m_probeThreshold), - MakeUintegerChecker ()) - .AddAttribute ("FailureThreshold", - "The number of consecutive transmissions failure to decrease the rate.", - UintegerValue (2), - MakeUintegerAccessor (&CaraWifiManager::m_failureThreshold), - MakeUintegerChecker ()) - .AddAttribute ("SuccessThreshold", - "The minimum number of sucessfull transmissions to try a new rate.", - UintegerValue (10), - MakeUintegerAccessor (&CaraWifiManager::m_successThreshold), - MakeUintegerChecker ()) - .AddAttribute ("Timeout", - "The 'timer' in the CARA algorithm", - UintegerValue (15), - MakeUintegerAccessor (&CaraWifiManager::m_timerTimeout), - MakeUintegerChecker ()) - ; - return tid; + static TypeId tid = TypeId ("ns3::CaraWifiManager") + .SetParent () + .AddConstructor () + .AddAttribute ("ProbeThreshold", + "The number of consecutive transmissions failure to activate the RTS probe.", + UintegerValue (1), + MakeUintegerAccessor (&CaraWifiManager::m_probeThreshold), + MakeUintegerChecker ()) + .AddAttribute ("FailureThreshold", + "The number of consecutive transmissions failure to decrease the rate.", + UintegerValue (2), + MakeUintegerAccessor (&CaraWifiManager::m_failureThreshold), + MakeUintegerChecker ()) + .AddAttribute ("SuccessThreshold", + "The minimum number of sucessfull transmissions to try a new rate.", + UintegerValue (10), + MakeUintegerAccessor (&CaraWifiManager::m_successThreshold), + MakeUintegerChecker ()) + .AddAttribute ("Timeout", + "The 'timer' in the CARA algorithm", + UintegerValue (15), + MakeUintegerAccessor (&CaraWifiManager::m_timerTimeout), + MakeUintegerChecker ()) + ; + return tid; } CaraWifiManager::CaraWifiManager () : WifiRemoteStationManager () -{} +{ +} CaraWifiManager::~CaraWifiManager () -{} +{ +} WifiRemoteStation * CaraWifiManager::DoCreateStation (void) const @@ -87,11 +89,12 @@ CaraWifiManager::DoCreateStation (void) const return station; } -void +void CaraWifiManager::DoReportRtsFailed (WifiRemoteStation *st) -{} +{ +} -void +void CaraWifiManager::DoReportDataFailed (WifiRemoteStation *st) { CaraWifiRemoteStation *station = (CaraWifiRemoteStation *) st; @@ -99,9 +102,9 @@ CaraWifiManager::DoReportDataFailed (WifiRemoteStation *st) station->m_timer++; station->m_failed++; station->m_success = 0; - if (station->m_failed >= m_failureThreshold) + if (station->m_failed >= m_failureThreshold) { - NS_LOG_DEBUG ("self="<m_rate != 0) { station->m_rate--; @@ -110,47 +113,50 @@ CaraWifiManager::DoReportDataFailed (WifiRemoteStation *st) station->m_timer = 0; } } -void +void CaraWifiManager::DoReportRxOk (WifiRemoteStation *st, - double rxSnr, WifiMode txMode) -{} -void -CaraWifiManager::DoReportRtsOk (WifiRemoteStation *st, - double ctsSnr, WifiMode ctsMode, double rtsSnr) + double rxSnr, WifiMode txMode) { - NS_LOG_DEBUG ("self="<m_timer++; station->m_success++; station->m_failed = 0; - NS_LOG_DEBUG ("self="<> 1) & 0x01) == 1)?true:false; - m_compressed = (((bar >> 2) & 0x01) == 1)?true:false; + m_barAckPolicy = ((bar & 0x01) == 1) ? true : false; + m_multiTid = (((bar >> 1) & 0x01) == 1) ? true : false; + m_compressed = (((bar >> 2) & 0x01) == 1) ? true : false; m_tidInfo = (bar >> 12) & 0x0f; } @@ -178,7 +180,8 @@ CtrlBAckRequestHeader::SetHtImmediateAck (bool immediateAck) void CtrlBAckRequestHeader::SetType (enum BlockAckType type) { - switch (type) { + switch (type) + { case BASIC_BLOCK_ACK: m_multiTid = false; m_compressed = false; @@ -194,7 +197,7 @@ CtrlBAckRequestHeader::SetType (enum BlockAckType type) default: NS_FATAL_ERROR ("Invalid variant type"); break; - } + } } void @@ -231,19 +234,19 @@ CtrlBAckRequestHeader::GetStartingSequence (void) const bool CtrlBAckRequestHeader::IsBasic (void) const { - return (!m_multiTid && !m_compressed)?true:false; + return (!m_multiTid && !m_compressed) ? true : false; } bool CtrlBAckRequestHeader::IsCompressed (void) const { - return (!m_multiTid && m_compressed)?true:false; + return (!m_multiTid && m_compressed) ? true : false; } bool CtrlBAckRequestHeader::IsMultiTid (void) const { - return (m_multiTid && m_compressed)?true:false; + return (m_multiTid && m_compressed) ? true : false; } /*********************************** @@ -261,7 +264,8 @@ CtrlBAckResponseHeader::CtrlBAckResponseHeader () } CtrlBAckResponseHeader::~CtrlBAckResponseHeader () -{} +{ +} TypeId CtrlBAckResponseHeader::GetTypeId (void) @@ -270,7 +274,7 @@ CtrlBAckResponseHeader::GetTypeId (void) .SetParent
() .AddConstructor () ; - return tid; + return tid; } TypeId @@ -371,7 +375,8 @@ CtrlBAckResponseHeader::SetHtImmediateAck (bool immediateAck) void CtrlBAckResponseHeader::SetType (enum BlockAckType type) { - switch (type) { + switch (type) + { case BASIC_BLOCK_ACK: m_multiTid = false; m_compressed = false; @@ -387,7 +392,7 @@ CtrlBAckResponseHeader::SetType (enum BlockAckType type) default: NS_FATAL_ERROR ("Invalid variant type"); break; - } + } } void @@ -405,7 +410,7 @@ CtrlBAckResponseHeader::SetStartingSequence (uint16_t seq) bool CtrlBAckResponseHeader::MustSendHtImmediateAck (void) const { - return (m_baAckPolicy)?true:false; + return (m_baAckPolicy) ? true : false; } uint8_t @@ -424,47 +429,47 @@ CtrlBAckResponseHeader::GetStartingSequence (void) const bool CtrlBAckResponseHeader::IsBasic (void) const { - return (!m_multiTid && !m_compressed)?true:false; + return (!m_multiTid && !m_compressed) ? true : false; } bool CtrlBAckResponseHeader::IsCompressed (void) const { - return (!m_multiTid && m_compressed)?true:false; + return (!m_multiTid && m_compressed) ? true : false; } bool CtrlBAckResponseHeader::IsMultiTid (void) const { - return (m_multiTid && m_compressed)?true:false; + return (m_multiTid && m_compressed) ? true : false; } uint16_t CtrlBAckResponseHeader::GetBaControl (void) const { uint16_t res = 0; - if (m_baAckPolicy) + if (m_baAckPolicy) { res |= 0x1; } if (m_multiTid) { - res |= (0x1<<1); + res |= (0x1 << 1); } if (m_compressed) { - res |= (0x1<<2); + res |= (0x1 << 2); } - res |= (m_tidInfo << 12) & (0xf<<12); + res |= (m_tidInfo << 12) & (0xf << 12); return res; } void CtrlBAckResponseHeader::SetBaControl (uint16_t ba) { - m_baAckPolicy = ((ba & 0x01) == 1)?true:false; - m_multiTid = (((ba >> 1) & 0x01) == 1)?true:false; - m_compressed = (((ba >> 2) & 0x01) == 1)?true:false; + m_baAckPolicy = ((ba & 0x01) == 1) ? true : false; + m_multiTid = (((ba >> 1) & 0x01) == 1) ? true : false; + m_compressed = (((ba >> 2) & 0x01) == 1) ? true : false; m_tidInfo = (ba >> 12) & 0x0f; } @@ -548,7 +553,9 @@ void CtrlBAckResponseHeader::SetReceivedPacket (uint16_t seq) { if (!IsInBitmap (seq)) - return; + { + return; + } if (!m_multiTid) { if (!m_compressed) @@ -559,7 +566,7 @@ CtrlBAckResponseHeader::SetReceivedPacket (uint16_t seq) } else { - bitmap.m_compressedBitmap |= (uint64_t(0x0000000000000001) << IndexInBitmap (seq)); + bitmap.m_compressedBitmap |= (uint64_t (0x0000000000000001) << IndexInBitmap (seq)); } } else @@ -580,12 +587,14 @@ CtrlBAckResponseHeader::SetReceivedFragment (uint16_t seq, uint8_t frag) { NS_ASSERT (frag < 16); if (!IsInBitmap (seq)) - return; + { + return; + } if (!m_multiTid) { if (!m_compressed) { - bitmap.m_bitmap[IndexInBitmap (seq)] |= (0x0001<> IndexInBitmap (seq)) & mask) == 1)?true:false; + uint64_t mask = uint64_t (0x0000000000000001); + return (((bitmap.m_compressedBitmap >> IndexInBitmap (seq)) & mask) == 1) ? true : false; } } else @@ -643,20 +654,22 @@ CtrlBAckResponseHeader::IsFragmentReceived (uint16_t seq, uint8_t frag) const { NS_ASSERT (frag < 16); if (!IsInBitmap (seq)) - return false; + { + return false; + } if (!m_multiTid) { if (!m_compressed) { - return ((bitmap.m_bitmap[IndexInBitmap (seq)] & (0x0001<seq was correctly received, also all of its fragments + equal to seq was correctly received, also all of its fragments were correctly received. */ - uint64_t mask = uint64_t(0x0000000000000001); - return (((bitmap.m_compressedBitmap >> IndexInBitmap (seq)) & mask) == 1)?true:false; + uint64_t mask = uint64_t (0x0000000000000001); + return (((bitmap.m_compressedBitmap >> IndexInBitmap (seq)) & mask) == 1) ? true : false; } } else diff --git a/src/wifi/model/ctrl-headers.h b/src/wifi/model/ctrl-headers.h index 85d62a9e1..8b6e53e2b 100644 --- a/src/wifi/model/ctrl-headers.h +++ b/src/wifi/model/ctrl-headers.h @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -24,15 +24,6 @@ namespace ns3 { -/** Headers for Block ack request and response. - * 802.11n standard includes three types of block ack: - * - Basic block ack (unique type in 802.11e) - * - Compressed block ack - * - Multi-TID block ack - * For now only basic block ack and compressed block ack - * are supported. - * Basic block ack is also default variant. - */ enum BlockAckType { BASIC_BLOCK_ACK, @@ -40,7 +31,20 @@ enum BlockAckType MULTI_TID_BLOCK_ACK }; -class CtrlBAckRequestHeader : public Header { +/** + * \ingroup wifi + * \brief Headers for Block ack request. + * + * 802.11n standard includes three types of block ack: + * - Basic block ack (unique type in 802.11e) + * - Compressed block ack + * - Multi-TID block ack + * For now only basic block ack and compressed block ack + * are supported. + * Basic block ack is also default variant. + */ +class CtrlBAckRequestHeader : public Header +{ public: CtrlBAckRequestHeader (); ~CtrlBAckRequestHeader (); @@ -64,13 +68,12 @@ public: bool IsMultiTid (void) const; uint16_t GetStartingSequenceControl (void) const; - + private: - void SetStartingSequenceControl (uint16_t seqControl); uint16_t GetBarControl (void) const; void SetBarControl (uint16_t bar); - + /** * The lsb bit of the BAR control field is used only for the * HT (High Throughput) delayed block ack configuration. @@ -84,7 +87,20 @@ private: uint16_t m_startingSeq; }; -class CtrlBAckResponseHeader : public Header { +/** + * \ingroup wifi + * \brief Headers for Block ack response. + * + * 802.11n standard includes three types of block ack: + * - Basic block ack (unique type in 802.11e) + * - Compressed block ack + * - Multi-TID block ack + * For now only basic block ack and compressed block ack + * are supported. + * Basic block ack is also default variant. + */ +class CtrlBAckResponseHeader : public Header +{ public: CtrlBAckResponseHeader (); ~CtrlBAckResponseHeader (); @@ -118,29 +134,36 @@ public: uint64_t GetCompressedBitmap (void) const; void ResetBitmap (void); - + private: - uint16_t GetBaControl (void) const; void SetBaControl (uint16_t bar); - + Buffer::Iterator SerializeBitmap (Buffer::Iterator start) const; Buffer::Iterator DeserializeBitmap (Buffer::Iterator start); /** * This function is used to correctly index in both bitmap * and compressed bitmap, one bit or one block of 16 bits respectively. - * If we are using basic block ack, return value represents index of - * block of 16 bits for packet having sequence number equals to seq. - * If we are using compressed block ack, return value represents bit - * to set to 1 in the compressed bitmap to indicate that packet having - * sequence number equals to seq was correctly received. * * for more details see 7.2.1.8 in IEEE 802.11n/D4.00 + * + * \param seq the sequence number + * + * \return If we are using basic block ack, return value represents index of + * block of 16 bits for packet having sequence number equals to seq. + * If we are using compressed block ack, return value represents bit + * to set to 1 in the compressed bitmap to indicate that packet having + * sequence number equals to seq was correctly received. */ uint8_t IndexInBitmap (uint16_t seq) const; + /** * Checks if sequence number seq can be acknowledged in the bitmap. + * + * \param seq the sequence number + * + * \return */ bool IsInBitmap (uint16_t seq) const; @@ -156,7 +179,8 @@ private: uint16_t m_tidInfo; uint16_t m_startingSeq; - union { + union + { uint16_t m_bitmap[64]; uint64_t m_compressedBitmap; } bitmap; diff --git a/src/wifi/model/dca-txop.cc b/src/wifi/model/dca-txop.cc index 4bc442ece..852e54369 100644 --- a/src/wifi/model/dca-txop.cc +++ b/src/wifi/model/dca-txop.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -38,56 +38,69 @@ NS_LOG_COMPONENT_DEFINE ("DcaTxop"); #undef NS_LOG_APPEND_CONTEXT -#define NS_LOG_APPEND_CONTEXT if (m_low != 0) {std::clog << "[mac=" << m_low->GetAddress () << "] ";} +#define NS_LOG_APPEND_CONTEXT if (m_low != 0) { std::clog << "[mac=" << m_low->GetAddress () << "] ";} namespace ns3 { class DcaTxop::Dcf : public DcfState { public: - Dcf (DcaTxop *txop) + Dcf (DcaTxop * txop) : m_txop (txop) - {} + { + } private: - virtual void DoNotifyAccessGranted (void) { + virtual void DoNotifyAccessGranted (void) + { m_txop->NotifyAccessGranted (); } - virtual void DoNotifyInternalCollision (void) { + virtual void DoNotifyInternalCollision (void) + { m_txop->NotifyInternalCollision (); } - virtual void DoNotifyCollision (void) { + virtual void DoNotifyCollision (void) + { m_txop->NotifyCollision (); } - virtual void DoNotifyChannelSwitching (void) { + virtual void DoNotifyChannelSwitching (void) + { m_txop->NotifyChannelSwitching (); } DcaTxop *m_txop; }; -class DcaTxop::TransmissionListener : public MacLowTransmissionListener { +class DcaTxop::TransmissionListener : public MacLowTransmissionListener +{ public: - TransmissionListener (DcaTxop *txop) + TransmissionListener (DcaTxop * txop) : MacLowTransmissionListener (), - m_txop (txop) {} - + m_txop (txop) { + } + virtual ~TransmissionListener () {} - virtual void GotCts (double snr, WifiMode txMode) { + virtual void GotCts (double snr, WifiMode txMode) + { m_txop->GotCts (snr, txMode); } - virtual void MissedCts (void) { + virtual void MissedCts (void) + { m_txop->MissedCts (); } - virtual void GotAck (double snr, WifiMode txMode) { + virtual void GotAck (double snr, WifiMode txMode) + { m_txop->GotAck (snr, txMode); } - virtual void MissedAck (void) { + virtual void MissedAck (void) + { m_txop->MissedAck (); } - virtual void StartNext (void) { + virtual void StartNext (void) + { m_txop->StartNext (); } - virtual void Cancel (void) { + virtual void Cancel (void) + { m_txop->Cancel (); } @@ -97,7 +110,7 @@ private: NS_OBJECT_ENSURE_REGISTERED (DcaTxop); -TypeId +TypeId DcaTxop::GetTypeId (void) { static TypeId tid = TypeId ("ns3::DcaTxop") @@ -107,7 +120,7 @@ DcaTxop::GetTypeId (void) PointerValue (), MakePointerAccessor (&DcaTxop::GetQueue), MakePointerChecker ()) - ; + ; return tid; } @@ -153,24 +166,24 @@ DcaTxop::SetManager (DcfManager *manager) m_manager->Add (m_dcf); } -void +void DcaTxop::SetLow (Ptr low) { NS_LOG_FUNCTION (this << low); m_low = low; } -void +void DcaTxop::SetWifiRemoteStationManager (Ptr remoteManager) { NS_LOG_FUNCTION (this << remoteManager); m_stationManager = remoteManager; } -void +void DcaTxop::SetTxOkCallback (TxOk callback) { m_txOkCallback = callback; } -void +void DcaTxop::SetTxFailedCallback (TxFailed callback) { m_txFailedCallback = callback; @@ -183,41 +196,41 @@ DcaTxop::GetQueue () const return m_queue; } -void +void DcaTxop::SetMinCw (uint32_t minCw) { NS_LOG_FUNCTION (this << minCw); m_dcf->SetCwMin (minCw); } -void +void DcaTxop::SetMaxCw (uint32_t maxCw) { NS_LOG_FUNCTION (this << maxCw); m_dcf->SetCwMax (maxCw); } -void +void DcaTxop::SetAifsn (uint32_t aifsn) { NS_LOG_FUNCTION (this << aifsn); m_dcf->SetAifsn (aifsn); } -uint32_t +uint32_t DcaTxop::GetMinCw (void) const { return m_dcf->GetCwMin (); } -uint32_t +uint32_t DcaTxop::GetMaxCw (void) const { return m_dcf->GetCwMax (); } -uint32_t +uint32_t DcaTxop::GetAifsn (void) const { return m_dcf->GetAifsn (); } -void +void DcaTxop::Queue (Ptr packet, const WifiMacHeader &hdr) { NS_LOG_FUNCTION (this << packet << &hdr); @@ -233,9 +246,9 @@ void DcaTxop::RestartAccessIfNeeded (void) { NS_LOG_FUNCTION (this); - if ((m_currentPacket != 0 || - !m_queue->IsEmpty ()) && - !m_dcf->IsAccessRequested ()) + if ((m_currentPacket != 0 + || !m_queue->IsEmpty ()) + && !m_dcf->IsAccessRequested ()) { m_manager->RequestAccess (m_dcf); } @@ -245,9 +258,9 @@ void DcaTxop::StartAccessIfNeeded (void) { NS_LOG_FUNCTION (this); - if (m_currentPacket == 0 && - !m_queue->IsEmpty () && - !m_dcf->IsAccessRequested ()) + if (m_currentPacket == 0 + && !m_queue->IsEmpty () + && !m_dcf->IsAccessRequested ()) { m_manager->RequestAccess (m_dcf); } @@ -307,21 +320,21 @@ DcaTxop::GetFragmentSize (void) m_currentPacket, m_fragmentNumber); } bool -DcaTxop::IsLastFragment (void) +DcaTxop::IsLastFragment (void) { return m_stationManager->IsLastFragment (m_currentHdr.GetAddr1 (), &m_currentHdr, m_currentPacket, m_fragmentNumber); } uint32_t -DcaTxop::GetNextFragmentSize (void) +DcaTxop::GetNextFragmentSize (void) { return m_stationManager->GetFragmentSize (m_currentHdr.GetAddr1 (), &m_currentHdr, m_currentPacket, m_fragmentNumber + 1); } uint32_t -DcaTxop::GetFragmentOffset (void) +DcaTxop::GetFragmentOffset (void) { return m_stationManager->GetFragmentOffset (m_currentHdr.GetAddr1 (), &m_currentHdr, m_currentPacket, m_fragmentNumber); @@ -334,31 +347,31 @@ DcaTxop::GetFragmentPacket (WifiMacHeader *hdr) hdr->SetFragmentNumber (m_fragmentNumber); uint32_t startOffset = GetFragmentOffset (); Ptr fragment; - if (IsLastFragment ()) + if (IsLastFragment ()) { hdr->SetNoMoreFragments (); - } - else + } + else { hdr->SetMoreFragments (); } - fragment = m_currentPacket->CreateFragment (startOffset, - GetFragmentSize ()); + fragment = m_currentPacket->CreateFragment (startOffset, + GetFragmentSize ()); return fragment; } -bool +bool DcaTxop::NeedsAccess (void) const { return !m_queue->IsEmpty () || m_currentPacket != 0; } -void +void DcaTxop::NotifyAccessGranted (void) { NS_LOG_FUNCTION (this); - if (m_currentPacket == 0) + if (m_currentPacket == 0) { - if (m_queue->IsEmpty ()) + if (m_queue->IsEmpty ()) { NS_LOG_DEBUG ("queue empty"); return; @@ -371,9 +384,9 @@ DcaTxop::NotifyAccessGranted (void) m_currentHdr.SetNoMoreFragments (); m_currentHdr.SetNoRetry (); m_fragmentNumber = 0; - NS_LOG_DEBUG ("dequeued size="<GetSize ()<< - ", to="< fragment = GetFragmentPacket (&hdr); @@ -408,27 +421,27 @@ DcaTxop::NotifyAccessGranted (void) { params.DisableRts (); } - if (IsLastFragment ()) + if (IsLastFragment ()) { - NS_LOG_DEBUG ("fragmenting last fragment size="<GetSize ()); + NS_LOG_DEBUG ("fragmenting last fragment size=" << fragment->GetSize ()); params.DisableNextData (); - } - else + } + else { - NS_LOG_DEBUG ("fragmenting size="<GetSize ()); + NS_LOG_DEBUG ("fragmenting size=" << fragment->GetSize ()); params.EnableNextData (GetNextFragmentSize ()); } - Low ()->StartTransmission (fragment, &hdr, params, + Low ()->StartTransmission (fragment, &hdr, params, m_transmissionListener); - } - else + } + else { - if (NeedRts (m_currentPacket, &m_currentHdr)) + if (NeedRts (m_currentPacket, &m_currentHdr)) { params.EnableRts (); NS_LOG_DEBUG ("tx unicast rts"); - } - else + } + else { params.DisableRts (); NS_LOG_DEBUG ("tx unicast"); @@ -440,13 +453,13 @@ DcaTxop::NotifyAccessGranted (void) } } -void +void DcaTxop::NotifyInternalCollision (void) { NS_LOG_FUNCTION (this); NotifyCollision (); } -void +void DcaTxop::NotifyCollision (void) { NS_LOG_FUNCTION (this); @@ -455,20 +468,20 @@ DcaTxop::NotifyCollision (void) RestartAccessIfNeeded (); } -void +void DcaTxop::NotifyChannelSwitching (void) { - m_queue->Flush(); + m_queue->Flush (); m_currentPacket = 0; } -void +void DcaTxop::GotCts (double snr, WifiMode txMode) { NS_LOG_FUNCTION (this << snr << txMode); NS_LOG_DEBUG ("got cts"); } -void +void DcaTxop::MissedCts (void) { NS_LOG_FUNCTION (this); @@ -477,30 +490,30 @@ DcaTxop::MissedCts (void) { NS_LOG_DEBUG ("Cts Fail"); m_stationManager->ReportFinalRtsFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); - if (!m_txFailedCallback.IsNull ()) + if (!m_txFailedCallback.IsNull ()) { m_txFailedCallback (m_currentHdr); } // to reset the dcf. m_currentPacket = 0; m_dcf->ResetCw (); - } - else + } + else { m_dcf->UpdateFailedCw (); } m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ())); RestartAccessIfNeeded (); } -void +void DcaTxop::GotAck (double snr, WifiMode txMode) { NS_LOG_FUNCTION (this << snr << txMode); - if (!NeedFragmentation () || - IsLastFragment ()) + if (!NeedFragmentation () + || IsLastFragment ()) { NS_LOG_DEBUG ("got ack. tx done."); - if (!m_txOkCallback.IsNull ()) + if (!m_txOkCallback.IsNull ()) { m_txOkCallback (m_currentHdr); } @@ -512,30 +525,30 @@ DcaTxop::GotAck (double snr, WifiMode txMode) m_dcf->ResetCw (); m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ())); RestartAccessIfNeeded (); - } - else + } + else { - NS_LOG_DEBUG ("got ack. tx not done, size="<GetSize ()); + NS_LOG_DEBUG ("got ack. tx not done, size=" << m_currentPacket->GetSize ()); } } -void +void DcaTxop::MissedAck (void) { NS_LOG_FUNCTION (this); NS_LOG_DEBUG ("missed ack"); - if (!NeedDataRetransmission ()) + if (!NeedDataRetransmission ()) { NS_LOG_DEBUG ("Ack Fail"); m_stationManager->ReportFinalDataFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); - if (!m_txFailedCallback.IsNull ()) + if (!m_txFailedCallback.IsNull ()) { m_txFailedCallback (m_currentHdr); } // to reset the dcf. m_currentPacket = 0; m_dcf->ResetCw (); - } - else + } + else { NS_LOG_DEBUG ("Retransmit"); m_currentHdr.SetRetry (); @@ -544,7 +557,7 @@ DcaTxop::MissedAck (void) m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ())); RestartAccessIfNeeded (); } -void +void DcaTxop::StartNext (void) { NS_LOG_FUNCTION (this); @@ -557,11 +570,11 @@ DcaTxop::StartNext (void) params.EnableAck (); params.DisableRts (); params.DisableOverrideDurationId (); - if (IsLastFragment ()) + if (IsLastFragment ()) { params.DisableNextData (); - } - else + } + else { params.EnableNextData (GetNextFragmentSize ()); } @@ -579,18 +592,18 @@ DcaTxop::Cancel (void) * - the other is used for everything else and has a normal * priority. * - * If the normal queue tries to send a unicast data frame, but + * If the normal queue tries to send a unicast data frame, but * if the tx fails (ack timeout), it starts a backoff. If the beacon * queue gets a tx oportunity during this backoff, it will trigger * a call to this Cancel function. * * Since we are already doing a backoff, we will get access to - * the medium when we can, we have nothing to do here. We just - * ignore the cancel event and wait until we are given again a + * the medium when we can, we have nothing to do here. We just + * ignore the cancel event and wait until we are given again a * tx oportunity. * * Note that this is really non-trivial because each of these - * frames is assigned a sequence number from the same sequence + * frames is assigned a sequence number from the same sequence * counter (because this is a non-802.11e device) so, the scheme * described here fails to ensure in-order delivery of frames * at the receiving side. This, however, does not matter in diff --git a/src/wifi/model/dca-txop.h b/src/wifi/model/dca-txop.h index 97739c596..81a1d8a7d 100644 --- a/src/wifi/model/dca-txop.h +++ b/src/wifi/model/dca-txop.h @@ -3,7 +3,7 @@ * Copyright (c) 2005 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -45,10 +45,11 @@ class MacStations; /** * \brief handle packet fragmentation and retransmissions. + * \ingroup wifi * - * This class implements the packet fragmentation and + * This class implements the packet fragmentation and * retransmission policy. It uses the ns3::MacLow and ns3::DcfManager - * helper classes to respectively send packets and decide when + * helper classes to respectively send packets and decide when * to send them. Packets are stored in a ns3::WifiMacQueue until * they can be sent. * @@ -79,17 +80,17 @@ public: void SetWifiRemoteStationManager (Ptr remoteManager); /** - * \param callback the callback to invoke when a + * \param callback the callback to invoke when a * packet transmission was completed successfully. */ void SetTxOkCallback (TxOk callback); /** - * \param callback the callback to invoke when a + * \param callback the callback to invoke when a * packet transmission was completed unsuccessfully. */ void SetTxFailedCallback (TxFailed callback); - Ptr GetQueue () const; + Ptr GetQueue () const; virtual void SetMinCw (uint32_t minCw); virtual void SetMaxCw (uint32_t maxCw); virtual void SetAifsn (uint32_t aifsn); @@ -128,7 +129,7 @@ private: /** * When a channel switching occurs, enqueued packets are removed. */ - void NotifyChannelSwitching (void); + void NotifyChannelSwitching (void); /* event handlers */ void GotCts (double snr, WifiMode txMode); void MissedCts (void); @@ -161,7 +162,7 @@ private: Ptr m_stationManager; TransmissionListener *m_transmissionListener; RandomStream *m_rng; - + bool m_accessOngoing; Ptr m_currentPacket; diff --git a/src/wifi/model/dcf-manager.cc b/src/wifi/model/dcf-manager.cc index fea94038b..2f3b805f9 100644 --- a/src/wifi/model/dcf-manager.cc +++ b/src/wifi/model/dcf-manager.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -46,29 +46,31 @@ DcfState::DcfState () m_cwMax (0), m_cw (0), m_accessRequested (false) -{} +{ +} DcfState::~DcfState () -{} +{ +} -void +void DcfState::SetAifsn (uint32_t aifsn) { m_aifsn = aifsn; } -void +void DcfState::SetCwMin (uint32_t minCw) { m_cwMin = minCw; ResetCw (); } -void +void DcfState::SetCwMax (uint32_t maxCw) { m_cwMax = maxCw; ResetCw (); } -uint32_t +uint32_t DcfState::GetAifsn (void) const { return m_aifsn; @@ -78,36 +80,36 @@ DcfState::GetCwMin (void) const { return m_cwMin; } -uint32_t +uint32_t DcfState::GetCwMax (void) const { return m_cwMax; } -void +void DcfState::ResetCw (void) { m_cw = m_cwMin; } -void +void DcfState::UpdateFailedCw (void) { // see 802.11-2007, section 9.9.1.5 m_cw = std::min ( 2 * (m_cw + 1) - 1, m_cwMax); } -void +void DcfState::UpdateBackoffSlotsNow (uint32_t nSlots, Time backoffUpdateBound) { m_backoffSlots -= nSlots; m_backoffStart = backoffUpdateBound; - MY_DEBUG ("update slots="<NotifyNavStartNow (duration); } - virtual void NavReset (Time duration) { + virtual void NavReset (Time duration) + { m_dcf->NotifyNavResetNow (duration); } - virtual void AckTimeoutStart (Time duration) { + virtual void AckTimeoutStart (Time duration) + { m_dcf->NotifyAckTimeoutStartNow (duration); } - virtual void AckTimeoutReset () { + virtual void AckTimeoutReset () + { m_dcf->NotifyAckTimeoutResetNow (); } - virtual void CtsTimeoutStart (Time duration) { + virtual void CtsTimeoutStart (Time duration) + { m_dcf->NotifyCtsTimeoutStartNow (duration); } - virtual void CtsTimeoutReset () { + virtual void CtsTimeoutReset () + { m_dcf->NotifyCtsTimeoutResetNow (); } private: @@ -196,27 +209,38 @@ private: * Listener for PHY events. Forwards to DcfManager ***************************************************************/ -class PhyListener : public ns3::WifiPhyListener { +class PhyListener : public ns3::WifiPhyListener +{ public: PhyListener (ns3::DcfManager *dcf) - : m_dcf (dcf) {} - virtual ~PhyListener () {} - virtual void NotifyRxStart (Time duration) { + : m_dcf (dcf) + { + } + virtual ~PhyListener () + { + } + virtual void NotifyRxStart (Time duration) + { m_dcf->NotifyRxStartNow (duration); } - virtual void NotifyRxEndOk (void) { + virtual void NotifyRxEndOk (void) + { m_dcf->NotifyRxEndOkNow (); } - virtual void NotifyRxEndError (void) { + virtual void NotifyRxEndError (void) + { m_dcf->NotifyRxEndErrorNow (); } - virtual void NotifyTxStart (Time duration) { + virtual void NotifyTxStart (Time duration) + { m_dcf->NotifyTxStartNow (duration); } - virtual void NotifyMaybeCcaBusyStart (Time duration) { + virtual void NotifyMaybeCcaBusyStart (Time duration) + { m_dcf->NotifyMaybeCcaBusyStartNow (duration); } - virtual void NotifySwitchingStart (Time duration) { + virtual void NotifySwitchingStart (Time duration) + { m_dcf->NotifySwitchingStartNow (duration); } private: @@ -240,14 +264,15 @@ DcfManager::DcfManager () m_lastTxDuration (MicroSeconds (0)), m_lastBusyStart (MicroSeconds (0)), m_lastBusyDuration (MicroSeconds (0)), - m_lastSwitchingStart (MicroSeconds (0)), - m_lastSwitchingDuration (MicroSeconds (0)), + m_lastSwitchingStart (MicroSeconds (0)), + m_lastSwitchingDuration (MicroSeconds (0)), m_rxing (false), m_slotTimeUs (0), m_sifs (Seconds (0.0)), m_phyListener (0), m_lowListener (0) -{} +{ +} DcfManager::~DcfManager () { @@ -257,30 +282,30 @@ DcfManager::~DcfManager () m_lowListener = 0; } -void +void DcfManager::SetupPhyListener (Ptr phy) { m_phyListener = new PhyListener (this); phy->RegisterListener (m_phyListener); } -void +void DcfManager::SetupLowListener (Ptr low) { m_lowListener = new LowDcfListener (this); low->RegisterDcfListener (m_lowListener); } -void +void DcfManager::SetSlot (Time slotTime) { m_slotTimeUs = slotTime.GetMicroSeconds (); } -void +void DcfManager::SetSifs (Time sifs) { m_sifs = sifs; } -void +void DcfManager::SetEifsNoDifs (Time eifsNoDifs) { m_eifsNoDifs = eifsNoDifs; @@ -291,7 +316,7 @@ DcfManager::GetEifsNoDifs () const return m_eifsNoDifs; } -void +void DcfManager::Add (DcfState *dcf) { m_states.push_back (dcf); @@ -341,16 +366,16 @@ DcfManager::MostRecent (Time a, Time b, Time c, Time d, Time e, Time f, Time g) return retval; } -bool +bool DcfManager::IsBusy (void) const { // PHY busy - if (m_rxing) + if (m_rxing) { return true; } Time lastTxEnd = m_lastTxStart + m_lastTxDuration; - if (lastTxEnd > Simulator::Now ()) + if (lastTxEnd > Simulator::Now ()) { return true; } @@ -364,7 +389,7 @@ DcfManager::IsBusy (void) const } -void +void DcfManager::RequestAccess (DcfState *state) { UpdateBackoff (); @@ -374,8 +399,8 @@ DcfManager::RequestAccess (DcfState *state) * If there is a collision, generate a backoff * by notifying the collision to the user. */ - if (state->GetBackoffSlots () == 0 && - IsBusy ()) + if (state->GetBackoffSlots () == 0 + && IsBusy ()) { MY_DEBUG ("medium is busy: collision"); /* someone else has accessed the medium. @@ -384,7 +409,7 @@ DcfManager::RequestAccess (DcfState *state) state->NotifyCollision (); } DoGrantAccess (); - DoRestartAccessTimeoutIfNeeded (); + DoRestartAccessTimeoutIfNeeded (); } void @@ -394,24 +419,24 @@ DcfManager::DoGrantAccess (void) for (States::const_iterator i = m_states.begin (); i != m_states.end (); k++) { DcfState *state = *i; - if (state->IsAccessRequested () && - GetBackoffEndFor (state) <= Simulator::Now () ) + if (state->IsAccessRequested () + && GetBackoffEndFor (state) <= Simulator::Now () ) { /** * This is the first dcf we find with an expired backoff and which * needs access to the medium. i.e., it has data to send. */ - MY_DEBUG ("dcf " << k << " needs access. backoff expired. access granted. slots="<GetBackoffSlots ()); + MY_DEBUG ("dcf " << k << " needs access. backoff expired. access granted. slots=" << state->GetBackoffSlots ()); i++; // go to the next item in the list. k++; std::vector internalCollisionStates; for (States::const_iterator j = i; j != m_states.end (); j++, k++) { DcfState *otherState = *j; - if (otherState->IsAccessRequested () && - GetBackoffEndFor (otherState) <= Simulator::Now ()) + if (otherState->IsAccessRequested () + && GetBackoffEndFor (otherState) <= Simulator::Now ()) { - MY_DEBUG ("dcf " << k << " needs access. backoff expired. internal collision. slots=" << + MY_DEBUG ("dcf " << k << " needs access. backoff expired. internal collision. slots=" << otherState->GetBackoffSlots ()); /** * all other dcfs with a lower priority whose backoff @@ -423,11 +448,11 @@ DcfManager::DoGrantAccess (void) } /** - * Now, we notify all of these changes in one go. It is necessary to + * Now, we notify all of these changes in one go. It is necessary to * perform first the calculations of which states are colliding and then * only apply the changes because applying the changes through notification * could change the global state of the manager, and, thus, could change - * the result of the calculations. + * the result of the calculations. */ state->NotifyAccessGranted (); for (std::vector::const_iterator k = internalCollisionStates.begin (); @@ -453,15 +478,15 @@ Time DcfManager::GetAccessGrantStart (void) const { Time rxAccessStart; - if (!m_rxing) + if (!m_rxing) { rxAccessStart = m_lastRxEnd + m_sifs; if (!m_lastRxReceivedOk) { rxAccessStart += m_eifsNoDifs; } - } - else + } + else { rxAccessStart = m_lastRxStart + m_lastRxDuration + m_sifs; } @@ -470,14 +495,14 @@ DcfManager::GetAccessGrantStart (void) const Time navAccessStart = m_lastNavStart + m_lastNavDuration + m_sifs; Time ackTimeoutAccessStart = m_lastAckTimeoutEnd + m_sifs; Time ctsTimeoutAccessStart = m_lastCtsTimeoutEnd + m_sifs; - Time switchingAccessStart = m_lastSwitchingStart + m_lastSwitchingDuration + m_sifs; - Time accessGrantedStart = MostRecent (rxAccessStart, + Time switchingAccessStart = m_lastSwitchingStart + m_lastSwitchingDuration + m_sifs; + Time accessGrantedStart = MostRecent (rxAccessStart, busyAccessStart, - txAccessStart, + txAccessStart, navAccessStart, ackTimeoutAccessStart, ctsTimeoutAccessStart, - switchingAccessStart + switchingAccessStart ); NS_LOG_INFO ("access grant start=" << accessGrantedStart << ", rx access start=" << rxAccessStart << @@ -492,7 +517,7 @@ DcfManager::GetBackoffStartFor (DcfState *state) { Time mostRecentEvent = MostRecent (state->GetBackoffStart (), GetAccessGrantStart () + MicroSeconds (state->GetAifsn () * m_slotTimeUs)); - + return mostRecentEvent; } @@ -527,7 +552,7 @@ void DcfManager::DoRestartAccessTimeoutIfNeeded (void) { /** - * Is there a DcfState which needs to access the medium, and, + * Is there a DcfState which needs to access the medium, and, * if there is one, how many slots for AIFS+backoff does it require ? */ bool accessTimeoutNeeded = false; @@ -547,10 +572,10 @@ DcfManager::DoRestartAccessTimeoutIfNeeded (void) } if (accessTimeoutNeeded) { - MY_DEBUG ("expected backoff end="<GetBackoffSlots (); - if (remainingSlots > 0) + if (remainingSlots > 0) { state->UpdateBackoffSlotsNow (remainingSlots, now); - NS_ASSERT(state->GetBackoffSlots()==0); + NS_ASSERT (state->GetBackoffSlots () == 0); } - state->ResetCw(); + state->ResetCw (); state->m_accessRequested = false; - state->NotifyChannelSwitching(); - } - - MY_DEBUG ("switching start for "<NotifyChannelSwitching (); + } + + MY_DEBUG ("switching start for " << duration); m_lastSwitchingStart = Simulator::Now (); m_lastSwitchingDuration = duration; } -void +void DcfManager::NotifyNavResetNow (Time duration) { - MY_DEBUG ("nav reset for="< ()) - ; + ; return tid; } diff --git a/src/wifi/model/dcf.h b/src/wifi/model/dcf.h index d4fe39b36..cc09e4e72 100644 --- a/src/wifi/model/dcf.h +++ b/src/wifi/model/dcf.h @@ -3,7 +3,7 @@ * Copyright (c) 2005 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -25,9 +25,13 @@ namespace ns3 { +/** + * \ingroup wifi + * + */ class Dcf : public Object { - public: +public: static TypeId GetTypeId (void); virtual void SetMinCw (uint32_t minCw) = 0; diff --git a/src/wifi/model/dsss-error-rate-model.cc b/src/wifi/model/dsss-error-rate-model.cc index bbc570317..4dbab9fb6 100644 --- a/src/wifi/model/dsss-error-rate-model.cc +++ b/src/wifi/model/dsss-error-rate-model.cc @@ -3,7 +3,7 @@ * Copyright (c) 2010 The Boeing Company * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -26,46 +26,46 @@ NS_LOG_COMPONENT_DEFINE ("DsssErrorRateModel"); namespace ns3 { #ifndef ENABLE_GSL -const double DsssErrorRateModel::WLAN_SIR_PERFECT = 10.0; -const double DsssErrorRateModel::WLAN_SIR_IMPOSSIBLE = 0.1; +const double DsssErrorRateModel::WLAN_SIR_PERFECT = 10.0; +const double DsssErrorRateModel::WLAN_SIR_IMPOSSIBLE = 0.1; #endif -double -DsssErrorRateModel::DqpskFunction (double x) +double +DsssErrorRateModel::DqpskFunction (double x) { - return ((sqrt (2.0) + 1.0) / sqrt (8.0*3.1415926*sqrt (2.0))) - *(1.0/sqrt (x)) - *exp ( -(2.0 - sqrt (2.0)) * x); + return ((sqrt (2.0) + 1.0) / sqrt (8.0 * 3.1415926 * sqrt (2.0))) + * (1.0 / sqrt (x)) + * exp ( -(2.0 - sqrt (2.0)) * x); } -double -DsssErrorRateModel::GetDsssDbpskSuccessRate (double sinr, uint32_t nbits) +double +DsssErrorRateModel::GetDsssDbpskSuccessRate (double sinr, uint32_t nbits) { double EbN0 = sinr * 22000000.0 / 1000000.0; // 1 bit per symbol with 1 MSPS double ber = 0.5 * exp (-EbN0); return pow ((1.0 - ber), nbits); } -double -DsssErrorRateModel::GetDsssDqpskSuccessRate (double sinr,uint32_t nbits) +double +DsssErrorRateModel::GetDsssDqpskSuccessRate (double sinr,uint32_t nbits) { double EbN0 = sinr * 22000000.0 / 1000000.0 / 2.0; // 2 bits per symbol, 1 MSPS double ber = DqpskFunction (EbN0); return pow ((1.0 - ber), nbits); } -double -DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (double sinr,uint32_t nbits) +double +DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (double sinr,uint32_t nbits) { #ifdef ENABLE_GSL // symbol error probability double EbN0 = sinr * 22000000.0 / 1375000.0 / 4.0; - double sep = SymbolErrorProb16Cck (4.0*EbN0/2.0); - return pow (1.0-sep,nbits/4.0); + double sep = SymbolErrorProb16Cck (4.0 * EbN0 / 2.0); + return pow (1.0 - sep,nbits / 4.0); #else - NS_LOG_WARN ("Running a 802.11b CCK Matlab model less accurate than GSL model"); + NS_LOG_WARN ("Running a 802.11b CCK Matlab model less accurate than GSL model"); // The matlab model - double ber; + double ber; if (sinr > WLAN_SIR_PERFECT) { ber = 0.0; @@ -75,29 +75,30 @@ DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate (double sinr,uint32_t nbits) ber = 0.5; } else - { // fitprops.coeff from matlab berfit + { + // fitprops.coeff from matlab berfit double a1 = 5.3681634344056195e-001; double a2 = 3.3092430025608586e-003; double a3 = 4.1654372361004000e-001; double a4 = 1.0288981434358866e+000; - ber = a1 * exp (-(pow ((sinr-a2)/a3,a4))); + ber = a1 * exp (-(pow ((sinr - a2) / a3,a4))); } return pow ((1.0 - ber), nbits); #endif } -double -DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (double sinr,uint32_t nbits) +double +DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (double sinr,uint32_t nbits) { #ifdef ENABLE_GSL // symbol error probability double EbN0 = sinr * 22000000.0 / 1375000.0 / 8.0; - double sep = SymbolErrorProb256Cck (8.0*EbN0/2.0); - return pow (1.0-sep,nbits/8.0); + double sep = SymbolErrorProb256Cck (8.0 * EbN0 / 2.0); + return pow (1.0 - sep,nbits / 8.0); #else - NS_LOG_WARN ("Running a 802.11b CCK Matlab model less accurate than GSL model"); + NS_LOG_WARN ("Running a 802.11b CCK Matlab model less accurate than GSL model"); // The matlab model - double ber; + double ber; if (sinr > WLAN_SIR_PERFECT) { ber = 0.0; @@ -107,49 +108,50 @@ DsssErrorRateModel::GetDsssDqpskCck11SuccessRate (double sinr,uint32_t nbits) ber = 0.5; } else - { // fitprops.coeff from matlab berfit + { + // fitprops.coeff from matlab berfit double a1 = 7.9056742265333456e-003; double a2 = -1.8397449399176360e-001; double a3 = 1.0740689468707241e+000; double a4 = 1.0523316904502553e+000; double a5 = 3.0552298746496687e-001; double a6 = 2.2032715128698435e+000; - ber = (a1*sinr*sinr+a2*sinr+a3)/(sinr*sinr*sinr+a4*sinr*sinr+a5*sinr+a6); + ber = (a1 * sinr * sinr + a2 * sinr + a3) / (sinr * sinr * sinr + a4 * sinr * sinr + a5 * sinr + a6); } return pow ((1.0 - ber), nbits); #endif } #ifdef ENABLE_GSL -double +double IntegralFunction (double x, void *params) { double beta = ((FunctionParameters *) params)->beta; double n = ((FunctionParameters *) params)->n; - double IntegralFunction = pow (2*gsl_cdf_ugaussian_P (x+ beta) - 1, n-1) - * exp (-x*x/2.0) / sqrt (2.0 * M_PI); + double IntegralFunction = pow (2 * gsl_cdf_ugaussian_P (x + beta) - 1, n - 1) + * exp (-x * x / 2.0) / sqrt (2.0 * M_PI); return IntegralFunction; } -double -DsssErrorRateModel::SymbolErrorProb16Cck (double e2) +double +DsssErrorRateModel::SymbolErrorProb16Cck (double e2) { double sep; double error; - + FunctionParameters params; - params.beta = sqrt (2.0*e2); + params.beta = sqrt (2.0 * e2); params.n = 8.0; - gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000); - + gsl_integration_workspace * w = gsl_integration_workspace_alloc (1000); + gsl_function F; F.function = &IntegralFunction; F.params = ¶ms; gsl_integration_qagiu (&F,-params.beta, 0, 1e-7, 1000, w, &sep, &error); gsl_integration_workspace_free (w); - if (error == 0.0) + if (error == 0.0) { sep = 1.0; } @@ -157,9 +159,9 @@ DsssErrorRateModel::SymbolErrorProb16Cck (double e2) return 1.0 - sep; } -double DsssErrorRateModel::SymbolErrorProb256Cck (double e1) +double DsssErrorRateModel::SymbolErrorProb256Cck (double e1) { - return 1.0 - pow (1.0 - SymbolErrorProb16Cck (e1/2.0), 2.0); + return 1.0 - pow (1.0 - SymbolErrorProb16Cck (e1 / 2.0), 2.0); } #endif diff --git a/src/wifi/model/dsss-error-rate-model.h b/src/wifi/model/dsss-error-rate-model.h index 916c06c9a..08a65f846 100644 --- a/src/wifi/model/dsss-error-rate-model.h +++ b/src/wifi/model/dsss-error-rate-model.h @@ -3,7 +3,7 @@ * Copyright (c) 2010 The Boeing Company * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -43,24 +43,25 @@ double IntegralFunction (double x, void *params); /** * \brief an implementation of DSSS error rate model + * \ingroup wifi * * The 802.11b modulations: * - 1 Mbps mode is based on DBPSK. BER is from equation 5.2-69 from John G. Proakis * Digitial Communications, 2001 edition - * - 2 Mbps model is based on DQPSK. Equation 8 from "Tight bounds and accurate - * approximations for dqpsk transmission bit error rate", G. Ferrari and G.E. Corazza + * - 2 Mbps model is based on DQPSK. Equation 8 from "Tight bounds and accurate + * approximations for dqpsk transmission bit error rate", G. Ferrari and G.E. Corazza * ELECTRONICS LETTERS, 40(20):1284-1285, September 2004 - * - 5.5 Mbps and 11 Mbps are based on equations (18) and (17) from "Properties and - * performance of the ieee 802.11b complementarycode-key signal sets", - * Michael B. Pursley and Thomas C. Royster. IEEE TRANSACTIONS ON COMMUNICATIONS, + * - 5.5 Mbps and 11 Mbps are based on equations (18) and (17) from "Properties and + * performance of the ieee 802.11b complementarycode-key signal sets", + * Michael B. Pursley and Thomas C. Royster. IEEE TRANSACTIONS ON COMMUNICATIONS, * 57(2):440-449, February 2009. - * - * This model is designed to run with highest accuracy using the Gnu + * + * This model is designed to run with highest accuracy using the Gnu * Scientific Library (GSL), but if GSL is not installed on the platform, * will fall back to (slightly less accurate) Matlab-derived models for * the CCK modulation types. * - * More detailed description and validation can be found in + * More detailed description and validation can be found in * http://www.nsnam.org/~pei/80211b.pdf */ class DsssErrorRateModel diff --git a/src/wifi/model/edca-txop-n.cc b/src/wifi/model/edca-txop-n.cc index d57d67a34..efd264599 100644 --- a/src/wifi/model/edca-txop-n.cc +++ b/src/wifi/model/edca-txop-n.cc @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -38,27 +38,32 @@ NS_LOG_COMPONENT_DEFINE ("EdcaTxopN"); #undef NS_LOG_APPEND_CONTEXT -#define NS_LOG_APPEND_CONTEXT if (m_low != 0) {std::clog << "[mac=" << m_low->GetAddress () << "] ";} +#define NS_LOG_APPEND_CONTEXT if (m_low != 0) { std::clog << "[mac=" << m_low->GetAddress () << "] ";} namespace ns3 { class EdcaTxopN::Dcf : public DcfState { public: - Dcf (EdcaTxopN *txop) + Dcf (EdcaTxopN * txop) : m_txop (txop) - {} + { + } private: - virtual void DoNotifyAccessGranted (void) { + virtual void DoNotifyAccessGranted (void) + { m_txop->NotifyAccessGranted (); } - virtual void DoNotifyInternalCollision (void) { + virtual void DoNotifyInternalCollision (void) + { m_txop->NotifyInternalCollision (); } - virtual void DoNotifyCollision (void) { + virtual void DoNotifyCollision (void) + { m_txop->NotifyCollision (); } - virtual void DoNotifyChannelSwitching (void) { + virtual void DoNotifyChannelSwitching (void) + { m_txop->NotifyChannelSwitching (); } EdcaTxopN *m_txop; @@ -67,34 +72,43 @@ private: class EdcaTxopN::TransmissionListener : public MacLowTransmissionListener { public: - TransmissionListener (EdcaTxopN *txop) + TransmissionListener (EdcaTxopN * txop) : MacLowTransmissionListener (), - m_txop (txop) {} - + m_txop (txop) { + } + virtual ~TransmissionListener () {} - virtual void GotCts (double snr, WifiMode txMode) { + virtual void GotCts (double snr, WifiMode txMode) + { m_txop->GotCts (snr, txMode); } - virtual void MissedCts (void) { + virtual void MissedCts (void) + { m_txop->MissedCts (); } - virtual void GotAck (double snr, WifiMode txMode) { + virtual void GotAck (double snr, WifiMode txMode) + { m_txop->GotAck (snr, txMode); } - virtual void MissedAck (void) { + virtual void MissedAck (void) + { m_txop->MissedAck (); } - virtual void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address source) { + virtual void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address source) + { m_txop->GotBlockAck (blockAck, source); } - virtual void MissedBlockAck (void) { + virtual void MissedBlockAck (void) + { m_txop->MissedBlockAck (); } - virtual void StartNext (void) { + virtual void StartNext (void) + { m_txop->StartNext (); } - virtual void Cancel (void) { + virtual void Cancel (void) + { m_txop->Cancel (); } @@ -105,12 +119,14 @@ private: class EdcaTxopN::BlockAckEventListener : public MacLowBlockAckEventListener { public: - BlockAckEventListener (EdcaTxopN *txop) + BlockAckEventListener (EdcaTxopN * txop) : MacLowBlockAckEventListener (), - m_txop (txop) {} + m_txop (txop) { + } virtual ~BlockAckEventListener () {} - virtual void BlockAckInactivityTimeout (Mac48Address address, uint8_t tid) { + virtual void BlockAckInactivityTimeout (Mac48Address address, uint8_t tid) + { m_txop->SendDelbaFrame (address, tid, false); } @@ -127,29 +143,29 @@ EdcaTxopN::GetTypeId (void) .SetParent (ns3::Dcf::GetTypeId ()) .AddConstructor () .AddAttribute ("BlockAckThreshold", "If number of packets in this queue reaches this value,\ - block ack mechanism is used. If this value is 0, block ack is never used.", - UintegerValue(0), + block ack mechanism is used. If this value is 0, block ack is never used." , + UintegerValue (0), MakeUintegerAccessor (&EdcaTxopN::SetBlockAckThreshold, &EdcaTxopN::GetBlockAckThreshold), MakeUintegerChecker (0, 64)) .AddAttribute ("BlockAckInactivityTimeout", "Represents max time (blocks of 1024 micro seconds) allowed for block ack\ inactivity. If this value isn't equal to 0 a timer start after that a\ block ack setup is completed and will be reset every time that a block\ - ack frame is received. If this value is 0, block ack inactivity timeout won't be used.", - UintegerValue(0), + ack frame is received. If this value is 0, block ack inactivity timeout won't be used." , + UintegerValue (0), MakeUintegerAccessor (&EdcaTxopN::SetBlockAckInactivityTimeout), MakeUintegerChecker ()) .AddAttribute ("Queue", "The WifiMacQueue object", PointerValue (), MakePointerAccessor (&EdcaTxopN::GetQueue), MakePointerChecker ()) - ; + ; return tid; } EdcaTxopN::EdcaTxopN () : m_manager (0), - m_currentPacket(0), + m_currentPacket (0), m_aggregator (0), m_blockAckType (COMPRESSED_BLOCK_ACK) { @@ -210,7 +226,7 @@ EdcaTxopN::SetTxOkCallback (TxOk callback) m_txOkCallback = callback; } -void +void EdcaTxopN::SetTxFailedCallback (TxFailed callback) { m_txFailedCallback = callback; @@ -242,40 +258,40 @@ EdcaTxopN::GetQueue () const return m_queue; } -void +void EdcaTxopN::SetMinCw (uint32_t minCw) { NS_LOG_FUNCTION (this << minCw); m_dcf->SetCwMin (minCw); } -void +void EdcaTxopN::SetMaxCw (uint32_t maxCw) { NS_LOG_FUNCTION (this << maxCw); m_dcf->SetCwMax (maxCw); } -void +void EdcaTxopN::SetAifsn (uint32_t aifsn) { NS_LOG_FUNCTION (this << aifsn); m_dcf->SetAifsn (aifsn); } -uint32_t +uint32_t EdcaTxopN::GetMinCw (void) const { return m_dcf->GetCwMin (); } -uint32_t +uint32_t EdcaTxopN::GetMaxCw (void) const { return m_dcf->GetCwMax (); } -uint32_t +uint32_t EdcaTxopN::GetAifsn (void) const { return m_dcf->GetAifsn (); @@ -294,7 +310,7 @@ EdcaTxopN::Low (void) } void -EdcaTxopN::SetLow(Ptr low) +EdcaTxopN::SetLow (Ptr low) { NS_LOG_FUNCTION (this << low); m_low = low; @@ -315,7 +331,7 @@ EdcaTxopN::NotifyAccessGranted (void) if (m_queue->IsEmpty () && !m_baManager->HasPackets ()) { NS_LOG_DEBUG ("queue is empty"); - return; + return; } if (m_baManager->HasBar (m_currentBar)) { @@ -331,25 +347,25 @@ EdcaTxopN::NotifyAccessGranted (void) NS_LOG_DEBUG ("no available packets in the queue"); return; } - if (m_currentHdr.IsQosData () && !m_currentHdr.GetAddr1 ().IsBroadcast () && - m_blockAckThreshold > 0 && - !m_baManager->ExistsAgreement (m_currentHdr.GetAddr1 (), m_currentHdr.GetQosTid ()) && - SetupBlockAckIfNeeded ()) + if (m_currentHdr.IsQosData () && !m_currentHdr.GetAddr1 ().IsBroadcast () + && m_blockAckThreshold > 0 + && !m_baManager->ExistsAgreement (m_currentHdr.GetAddr1 (), m_currentHdr.GetQosTid ()) + && SetupBlockAckIfNeeded ()) { return; } m_currentPacket = m_queue->DequeueFirstAvailable (&m_currentHdr, m_currentPacketTimestamp, m_qosBlockedDestinations); NS_ASSERT (m_currentPacket != 0); - + uint16_t sequence = m_txMiddle->GetNextSequenceNumberfor (&m_currentHdr); m_currentHdr.SetSequenceNumber (sequence); m_currentHdr.SetFragmentNumber (0); m_currentHdr.SetNoMoreFragments (); m_currentHdr.SetNoRetry (); m_fragmentNumber = 0; - NS_LOG_DEBUG ("dequeued size="<GetSize ()<< - ", to="< fragment = GetFragmentPacket (&hdr); - if (IsLastFragment ()) + if (IsLastFragment ()) { NS_LOG_DEBUG ("fragmenting last fragment size=" << fragment->GetSize ()); params.DisableNextData (); - } - else + } + else { NS_LOG_DEBUG ("fragmenting size=" << fragment->GetSize ()); params.EnableNextData (GetNextFragmentSize ()); } - m_low->StartTransmission (fragment, &hdr, params, + m_low->StartTransmission (fragment, &hdr, params, m_transmissionListener); } else { WifiMacHeader peekedHdr; - if (m_currentHdr.IsQosData () && - m_queue->PeekByTidAndAddress (&peekedHdr, m_currentHdr.GetQosTid (), - WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ()) && - !m_currentHdr.GetAddr1 ().IsBroadcast () && - m_aggregator != 0 && !m_currentHdr.IsRetry ()) + if (m_currentHdr.IsQosData () + && m_queue->PeekByTidAndAddress (&peekedHdr, m_currentHdr.GetQosTid (), + WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ()) + && !m_currentHdr.GetAddr1 ().IsBroadcast () + && m_aggregator != 0 && !m_currentHdr.IsRetry ()) { /* here is performed aggregation */ Ptr currentAggregatedPacket = Create (); @@ -427,15 +443,15 @@ EdcaTxopN::NotifyAccessGranted (void) MapDestAddressForAggregation (peekedHdr)); bool aggregated = false; bool isAmsdu = false; - Ptr peekedPacket = m_queue->PeekByTidAndAddress (&peekedHdr, m_currentHdr.GetQosTid (), - WifiMacHeader::ADDR1, + Ptr peekedPacket = m_queue->PeekByTidAndAddress (&peekedHdr, m_currentHdr.GetQosTid (), + WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ()); while (peekedPacket != 0) { aggregated = m_aggregator->Aggregate (peekedPacket, currentAggregatedPacket, MapSrcAddressForAggregation (peekedHdr), MapDestAddressForAggregation (peekedHdr)); - if (aggregated) + if (aggregated) { isAmsdu = true; m_queue->Remove (peekedPacket); @@ -444,7 +460,7 @@ EdcaTxopN::NotifyAccessGranted (void) { break; } - peekedPacket = m_queue->PeekByTidAndAddress (&peekedHdr, m_currentHdr.GetQosTid (), + peekedPacket = m_queue->PeekByTidAndAddress (&peekedHdr, m_currentHdr.GetQosTid (), WifiMacHeader::ADDR1, m_currentHdr.GetAddr1 ()); } if (isAmsdu) @@ -460,8 +476,8 @@ EdcaTxopN::NotifyAccessGranted (void) { params.EnableRts (); NS_LOG_DEBUG ("tx unicast rts"); - } - else + } + else { params.DisableRts (); NS_LOG_DEBUG ("tx unicast"); @@ -488,14 +504,14 @@ EdcaTxopN::NotifyCollision (void) RestartAccessIfNeeded (); } -void +void EdcaTxopN::GotCts (double snr, WifiMode txMode) { NS_LOG_FUNCTION (this << snr << txMode); NS_LOG_DEBUG ("got cts"); } -void +void EdcaTxopN::MissedCts (void) { NS_LOG_FUNCTION (this); @@ -504,15 +520,15 @@ EdcaTxopN::MissedCts (void) { NS_LOG_DEBUG ("Cts Fail"); m_stationManager->ReportFinalRtsFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); - if (!m_txFailedCallback.IsNull ()) + if (!m_txFailedCallback.IsNull ()) { m_txFailedCallback (m_currentHdr); } // to reset the dcf. m_currentPacket = 0; m_dcf->ResetCw (); - } - else + } + else { m_dcf->UpdateFailedCw (); } @@ -520,10 +536,10 @@ EdcaTxopN::MissedCts (void) RestartAccessIfNeeded (); } -void +void EdcaTxopN::NotifyChannelSwitching (void) { - m_queue->Flush(); + m_queue->Flush (); m_currentPacket = 0; } @@ -543,23 +559,23 @@ void EdcaTxopN::GotAck (double snr, WifiMode txMode) { NS_LOG_FUNCTION (this << snr << txMode); - if (!NeedFragmentation () || - IsLastFragment () || - m_currentHdr.IsQosAmsdu ()) + if (!NeedFragmentation () + || IsLastFragment () + || m_currentHdr.IsQosAmsdu ()) { NS_LOG_DEBUG ("got ack. tx done."); if (!m_txOkCallback.IsNull ()) { - m_txOkCallback (m_currentHdr); + m_txOkCallback (m_currentHdr); } - + if (m_currentHdr.IsAction ()) { WifiActionHeader actionHdr; Ptr p = m_currentPacket->Copy (); p->RemoveHeader (actionHdr); - if (actionHdr.GetCategory () == WifiActionHeader::BLOCK_ACK && - actionHdr.GetAction ().blockAck == WifiActionHeader::BLOCK_ACK_DELBA) + if (actionHdr.GetCategory () == WifiActionHeader::BLOCK_ACK + && actionHdr.GetAction ().blockAck == WifiActionHeader::BLOCK_ACK_DELBA) { MgtDelBaHeader delBa; p->PeekHeader (delBa); @@ -574,14 +590,14 @@ EdcaTxopN::GotAck (double snr, WifiMode txMode) } } m_currentPacket = 0; - + m_dcf->ResetCw (); m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ())); RestartAccessIfNeeded (); - } - else + } + else { - NS_LOG_DEBUG ("got ack. tx not done, size="<GetSize ()); + NS_LOG_DEBUG ("got ack. tx not done, size=" << m_currentPacket->GetSize ()); } } @@ -590,19 +606,19 @@ EdcaTxopN::MissedAck (void) { NS_LOG_FUNCTION (this); NS_LOG_DEBUG ("missed ack"); - if (!NeedDataRetransmission ()) + if (!NeedDataRetransmission ()) { NS_LOG_DEBUG ("Ack Fail"); m_stationManager->ReportFinalDataFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); - if (!m_txFailedCallback.IsNull ()) + if (!m_txFailedCallback.IsNull ()) { m_txFailedCallback (m_currentHdr); } // to reset the dcf. m_currentPacket = 0; m_dcf->ResetCw (); - } - else + } + else { NS_LOG_DEBUG ("Retransmit"); m_currentHdr.SetRetry (); @@ -621,7 +637,7 @@ EdcaTxopN::MissedBlockAck (void) NS_LOG_DEBUG ("Retransmit block ack request"); m_currentHdr.SetRetry (); m_dcf->UpdateFailedCw (); - + m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ())); RestartAccessIfNeeded (); } @@ -636,9 +652,9 @@ void EdcaTxopN::RestartAccessIfNeeded (void) { NS_LOG_FUNCTION (this); - if ((m_currentPacket != 0 || - !m_queue->IsEmpty () || m_baManager->HasPackets ()) && - !m_dcf->IsAccessRequested ()) + if ((m_currentPacket != 0 + || !m_queue->IsEmpty () || m_baManager->HasPackets ()) + && !m_dcf->IsAccessRequested ()) { m_manager->RequestAccess (m_dcf); } @@ -648,9 +664,9 @@ void EdcaTxopN::StartAccessIfNeeded (void) { NS_LOG_FUNCTION (this); - if (m_currentPacket == 0 && - (!m_queue->IsEmpty () || m_baManager->HasPackets ()) && - !m_dcf->IsAccessRequested ()) + if (m_currentPacket == 0 + && (!m_queue->IsEmpty () || m_baManager->HasPackets ()) + && !m_dcf->IsAccessRequested ()) { m_manager->RequestAccess (m_dcf); } @@ -683,7 +699,7 @@ EdcaTxopN::NextFragment (void) m_fragmentNumber++; } -void +void EdcaTxopN::StartNext (void) { NS_LOG_FUNCTION (this); @@ -696,11 +712,11 @@ EdcaTxopN::StartNext (void) params.EnableAck (); params.DisableRts (); params.DisableOverrideDurationId (); - if (IsLastFragment ()) + if (IsLastFragment ()) { params.DisableNextData (); - } - else + } + else { params.EnableNextData (GetNextFragmentSize ()); } @@ -729,14 +745,14 @@ EdcaTxopN::GetFragmentSize (void) } uint32_t -EdcaTxopN::GetNextFragmentSize (void) +EdcaTxopN::GetNextFragmentSize (void) { return m_stationManager->GetFragmentSize (m_currentHdr.GetAddr1 (), &m_currentHdr, m_currentPacket, m_fragmentNumber + 1); } uint32_t -EdcaTxopN::GetFragmentOffset (void) +EdcaTxopN::GetFragmentOffset (void) { return m_stationManager->GetFragmentOffset (m_currentHdr.GetAddr1 (), &m_currentHdr, m_currentPacket, m_fragmentNumber); @@ -757,15 +773,15 @@ EdcaTxopN::GetFragmentPacket (WifiMacHeader *hdr) hdr->SetFragmentNumber (m_fragmentNumber); uint32_t startOffset = GetFragmentOffset (); Ptr fragment; - if (IsLastFragment ()) + if (IsLastFragment ()) { hdr->SetNoMoreFragments (); - } - else + } + else { hdr->SetMoreFragments (); } - fragment = m_currentPacket->CreateFragment (startOffset, + fragment = m_currentPacket->CreateFragment (startOffset, GetFragmentSize ()); return fragment; } @@ -828,20 +844,20 @@ void EdcaTxopN::GotAddBaResponse (const MgtAddBaResponseHeader *respHdr, Mac48Address recipient) { NS_LOG_FUNCTION (this); - NS_LOG_DEBUG ("received ADDBA response from "<GetTid (); if (m_baManager->ExistsAgreementInState (recipient, tid, OriginatorBlockAckAgreement::PENDING)) - { - if (respHdr->GetStatusCode ().IsSuccess ()) - { - NS_LOG_DEBUG ("block ack agreement established with "<UpdateAgreement (respHdr, recipient); - } - else - { - NS_LOG_DEBUG ("discard ADDBA response"<NotifyAgreementUnsuccessful (recipient, tid); - } + { + if (respHdr->GetStatusCode ().IsSuccess ()) + { + NS_LOG_DEBUG ("block ack agreement established with " << recipient); + m_baManager->UpdateAgreement (respHdr, recipient); + } + else + { + NS_LOG_DEBUG ("discard ADDBA response" << recipient); + m_baManager->NotifyAgreementUnsuccessful (recipient, tid); + } } RestartAccessIfNeeded (); } @@ -850,14 +866,14 @@ void EdcaTxopN::GotDelBaFrame (const MgtDelBaHeader *delBaHdr, Mac48Address recipient) { NS_LOG_FUNCTION (this); - NS_LOG_DEBUG ("received DELBA frame from="<GetAddress ()); hdr.SetDsNotTo (); hdr.SetDsNotFrom (); - + WifiActionHeader actionHdr; WifiActionHeader::ActionValue action; action.blockAck = WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST; @@ -1032,10 +1048,10 @@ EdcaTxopN::SendAddBaRequest (Mac48Address dest, uint8_t tid, uint16_t startSeq, reqHdr.SetStartingSequence (startSeq); m_baManager->CreateAgreement (&reqHdr, dest); - + packet->AddHeader (reqHdr); packet->AddHeader (actionHdr); - + m_currentPacket = packet; m_currentHdr = hdr; @@ -1044,14 +1060,14 @@ EdcaTxopN::SendAddBaRequest (Mac48Address dest, uint8_t tid, uint16_t startSeq, m_currentHdr.SetFragmentNumber (0); m_currentHdr.SetNoMoreFragments (); m_currentHdr.SetNoRetry (); - + MacLowTransmissionParameters params; params.EnableAck (); params.DisableRts (); params.DisableNextData (); params.DisableOverrideDurationId (); - - m_low->StartTransmission (m_currentPacket, &m_currentHdr, params, + + m_low->StartTransmission (m_currentPacket, &m_currentHdr, params, m_transmissionListener); } @@ -1081,7 +1097,7 @@ EdcaTxopN::SendDelbaFrame (Mac48Address addr, uint8_t tid, bool byOriginator) WifiActionHeader::ActionValue action; action.blockAck = WifiActionHeader::BLOCK_ACK_DELBA; actionHdr.SetAction (WifiActionHeader::BLOCK_ACK, action); - + Ptr packet = Create (); packet->AddHeader (delbaHdr); packet->AddHeader (actionHdr); diff --git a/src/wifi/model/edca-txop-n.h b/src/wifi/model/edca-txop-n.h index c269a4b54..8acea5605 100644 --- a/src/wifi/model/edca-txop-n.h +++ b/src/wifi/model/edca-txop-n.h @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -53,17 +53,6 @@ class MgtAddBaResponseHeader; class BlockAckManager; class MgtDelBaHeader; - -/* This queue contains packets for a particular access class. - * possibles access classes are: - * - * -AC_VO : voice, tid = 6,7 ^ - * -AC_VI : video, tid = 4,5 | - * -AC_BE : best-effort, tid = 0,3 | priority - * -AC_BK : background, tid = 1,2 | - * - * For more details see section 9.1.3.1 in 802.11 standard. - */ enum TypeOfStation { STA, @@ -72,10 +61,22 @@ enum TypeOfStation MESH }; + +/** + * \ingroup wifi + * This queue contains packets for a particular access class. + * possibles access classes are: + * + * -AC_VO : voice, tid = 6,7 ^ + * -AC_VI : video, tid = 4,5 | + * -AC_BE : best-effort, tid = 0,3 | priority + * -AC_BK : background, tid = 1,2 | + * + * For more details see section 9.1.3.1 in 802.11 standard. + */ class EdcaTxopN : public Dcf { public: - typedef Callback TxOk; typedef Callback TxFailed; @@ -93,7 +94,7 @@ public: void SetTypeOfStation (enum TypeOfStation type); enum TypeOfStation GetTypeOfStation (void) const; - Ptr GetQueue () const; + Ptr GetQueue () const; virtual void SetMinCw (uint32_t minCw); virtual void SetMaxCw (uint32_t maxCw); virtual void SetAifsn (uint32_t aifsn); diff --git a/src/wifi/model/error-rate-model.cc b/src/wifi/model/error-rate-model.cc index a1d96aad3..0f4214f75 100644 --- a/src/wifi/model/error-rate-model.cc +++ b/src/wifi/model/error-rate-model.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -27,11 +27,11 @@ TypeId ErrorRateModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::ErrorRateModel") .SetParent () - ; + ; return tid; } -double +double ErrorRateModel::CalculateSnr (WifiMode txMode, double ber) const { // This is a very simple binary search. @@ -39,15 +39,15 @@ ErrorRateModel::CalculateSnr (WifiMode txMode, double ber) const low = 1e-25; high = 1e25; precision = 1e-12; - while (high - low > precision) + while (high - low > precision) { NS_ASSERT (high >= low); double middle = low + (high - low) / 2; - if ((1 - GetChunkSuccessRate (txMode, middle, 1)) > ber) + if ((1 - GetChunkSuccessRate (txMode, middle, 1)) > ber) { low = middle; - } - else + } + else { high = middle; } diff --git a/src/wifi/model/error-rate-model.h b/src/wifi/model/error-rate-model.h index f677e0d09..1e328e4c7 100644 --- a/src/wifi/model/error-rate-model.h +++ b/src/wifi/model/error-rate-model.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -25,7 +25,11 @@ #include "ns3/object.h" namespace ns3 { - +/** + * \ingroup wifi + * \brief the interface for Wifi's error models + * + */ class ErrorRateModel : public Object { public: diff --git a/src/wifi/model/ideal-wifi-manager.cc b/src/wifi/model/ideal-wifi-manager.cc index a85154b70..37073eecf 100644 --- a/src/wifi/model/ideal-wifi-manager.cc +++ b/src/wifi/model/ideal-wifi-manager.cc @@ -3,7 +3,7 @@ * Copyright (c) 2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -32,7 +32,7 @@ struct IdealWifiRemoteStation : public WifiRemoteStation NS_OBJECT_ENSURE_REGISTERED (IdealWifiManager); -TypeId +TypeId IdealWifiManager::GetTypeId (void) { static TypeId tid = TypeId ("ns3::IdealWifiManager") @@ -43,32 +43,34 @@ IdealWifiManager::GetTypeId (void) DoubleValue (10e-6), MakeDoubleAccessor (&IdealWifiManager::m_ber), MakeDoubleChecker ()) - ; + ; return tid; } IdealWifiManager::IdealWifiManager () -{} +{ +} IdealWifiManager::~IdealWifiManager () -{} +{ +} -void +void IdealWifiManager::SetupPhy (Ptr phy) { uint32_t nModes = phy->GetNModes (); - for (uint32_t i = 0; i < nModes; i++) + for (uint32_t i = 0; i < nModes; i++) { WifiMode mode = phy->GetMode (i); AddModeSnrThreshold (mode, phy->CalculateSnr (mode, m_ber)); } - + WifiRemoteStationManager::SetupPhy (phy); } -double +double IdealWifiManager::GetSnrThreshold (WifiMode mode) const { - for (Thresholds::const_iterator i = m_thresholds.begin (); i != m_thresholds.end (); i++) + for (Thresholds::const_iterator i = m_thresholds.begin (); i != m_thresholds.end (); i++) { if (mode == i->second) { @@ -79,7 +81,7 @@ IdealWifiManager::GetSnrThreshold (WifiMode mode) const return 0.0; } -void +void IdealWifiManager::AddModeSnrThreshold (WifiMode mode, double snr) { m_thresholds.push_back (std::make_pair (snr,mode)); @@ -94,43 +96,48 @@ IdealWifiManager::DoCreateStation (void) const } -void +void IdealWifiManager::DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode) -{} -void +{ +} +void IdealWifiManager::DoReportRtsFailed (WifiRemoteStation *station) -{} -void +{ +} +void IdealWifiManager::DoReportDataFailed (WifiRemoteStation *station) -{} -void +{ +} +void IdealWifiManager::DoReportRtsOk (WifiRemoteStation *st, double ctsSnr, WifiMode ctsMode, double rtsSnr) { IdealWifiRemoteStation *station = (IdealWifiRemoteStation *)st; station->m_lastSnr = rtsSnr; } -void +void IdealWifiManager::DoReportDataOk (WifiRemoteStation *st, double ackSnr, WifiMode ackMode, double dataSnr) { IdealWifiRemoteStation *station = (IdealWifiRemoteStation *)st; station->m_lastSnr = dataSnr; } -void +void IdealWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *station) -{} -void +{ +} +void IdealWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station) -{} +{ +} WifiMode IdealWifiManager::DoGetDataMode (WifiRemoteStation *st, uint32_t size) { IdealWifiRemoteStation *station = (IdealWifiRemoteStation *)st; - // We search within the Supported rate set the mode with the - // highest snr threshold possible which is smaller than m_lastSnr + // We search within the Supported rate set the mode with the + // highest snr threshold possible which is smaller than m_lastSnr // to ensure correct packet delivery. double maxThreshold = 0.0; WifiMode maxMode = GetDefaultMode (); @@ -138,8 +145,8 @@ IdealWifiManager::DoGetDataMode (WifiRemoteStation *st, uint32_t size) { WifiMode mode = GetSupported (station, i); double threshold = GetSnrThreshold (mode); - if (threshold > maxThreshold && - threshold < station->m_lastSnr) + if (threshold > maxThreshold + && threshold < station->m_lastSnr) { maxThreshold = threshold; maxMode = mode; @@ -151,8 +158,8 @@ WifiMode IdealWifiManager::DoGetRtsMode (WifiRemoteStation *st) { IdealWifiRemoteStation *station = (IdealWifiRemoteStation *)st; - // We search within the Basic rate set the mode with the highest - // snr threshold possible which is smaller than m_lastSnr to + // We search within the Basic rate set the mode with the highest + // snr threshold possible which is smaller than m_lastSnr to // ensure correct packet delivery. double maxThreshold = 0.0; WifiMode maxMode = GetDefaultMode (); @@ -160,8 +167,8 @@ IdealWifiManager::DoGetRtsMode (WifiRemoteStation *st) { WifiMode mode = GetBasicMode (i); double threshold = GetSnrThreshold (mode); - if (threshold > maxThreshold && - threshold < station->m_lastSnr) + if (threshold > maxThreshold + && threshold < station->m_lastSnr) { maxThreshold = threshold; maxMode = mode; @@ -170,7 +177,7 @@ IdealWifiManager::DoGetRtsMode (WifiRemoteStation *st) return maxMode; } -bool +bool IdealWifiManager::IsLowLatency (void) const { return true; diff --git a/src/wifi/model/ideal-wifi-manager.h b/src/wifi/model/ideal-wifi-manager.h index a2aac6faa..838eb26dc 100644 --- a/src/wifi/model/ideal-wifi-manager.h +++ b/src/wifi/model/ideal-wifi-manager.h @@ -3,7 +3,7 @@ * Copyright (c) 2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -29,19 +29,20 @@ namespace ns3 { /** * \brief Ideal rate control algorithm + * \ingroup wifi * * This class implements an 'ideal' rate control algorithm * similar to RBAR in spirit (see A rate-adaptive MAC * protocol for multihop wireless networks by G. Holland, * N. Vaidya, and P. Bahl.): every station keeps track of the * snr of every packet received and sends back this snr to the - * original transmitter by an out-of-band mechanism. Each + * original transmitter by an out-of-band mechanism. Each * transmitter keeps track of the last snr sent back by a receiver * and uses it to pick a transmission mode based on a set - * of snr thresholds built from a target ber and transmission + * of snr thresholds built from a target ber and transmission * mode-specific snr/ber curves. */ -class IdealWifiManager : public WifiRemoteStationManager +class IdealWifiManager : public WifiRemoteStationManager { public: static TypeId GetTypeId (void); @@ -52,8 +53,8 @@ public: private: // overriden from base class - virtual WifiRemoteStation *DoCreateStation (void) const; - virtual void DoReportRxOk (WifiRemoteStation *station, + virtual WifiRemoteStation* DoCreateStation (void) const; + virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode); virtual void DoReportRtsFailed (WifiRemoteStation *station); virtual void DoReportDataFailed (WifiRemoteStation *station); diff --git a/src/wifi/model/interference-helper.cc b/src/wifi/model/interference-helper.cc index 20a91503e..d998e314d 100644 --- a/src/wifi/model/interference-helper.cc +++ b/src/wifi/model/interference-helper.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -32,74 +32,78 @@ namespace ns3 { * Phy event class ****************************************************************/ -InterferenceHelper::Event::Event (uint32_t size, WifiMode payloadMode, - enum WifiPreamble preamble, - Time duration, double rxPower) +InterferenceHelper::Event::Event (uint32_t size, WifiMode payloadMode, + enum WifiPreamble preamble, + Time duration, double rxPower) : m_size (size), m_payloadMode (payloadMode), m_preamble (preamble), m_startTime (Simulator::Now ()), m_endTime (m_startTime + duration), m_rxPowerW (rxPower) -{} +{ +} InterferenceHelper::Event::~Event () -{} - -Time -InterferenceHelper::Event::GetDuration (void) const +{ +} + +Time +InterferenceHelper::Event::GetDuration (void) const { return m_endTime - m_startTime; } -Time +Time InterferenceHelper::Event::GetStartTime (void) const { return m_startTime; } -Time +Time InterferenceHelper::Event::GetEndTime (void) const { return m_endTime; } -double +double InterferenceHelper::Event::GetRxPowerW (void) const { return m_rxPowerW; } -uint32_t +uint32_t InterferenceHelper::Event::GetSize (void) const { return m_size; } -WifiMode +WifiMode InterferenceHelper::Event::GetPayloadMode (void) const { return m_payloadMode; } -enum WifiPreamble +enum WifiPreamble InterferenceHelper::Event::GetPreambleType (void) const { return m_preamble; } /**************************************************************** - * Class which records SNIR change events for a + * Class which records SNIR change events for a * short period of time. ****************************************************************/ InterferenceHelper::NiChange::NiChange (Time time, double delta) - : m_time (time), m_delta (delta) -{} + : m_time (time), + m_delta (delta) +{ +} Time InterferenceHelper::NiChange::GetTime (void) const { return m_time; } -double +double InterferenceHelper::NiChange::GetDelta (void) const { return m_delta; } -bool +bool InterferenceHelper::NiChange::operator < (const InterferenceHelper::NiChange& o) const { return (m_time < o.m_time); @@ -113,56 +117,56 @@ InterferenceHelper::InterferenceHelper () : m_errorRateModel (0), m_firstPower (0.0), m_rxing (false) -{} +{ +} InterferenceHelper::~InterferenceHelper () { EraseEvents (); m_errorRateModel = 0; } -Ptr -InterferenceHelper::Add (uint32_t size, WifiMode payloadMode, - enum WifiPreamble preamble, - Time duration, double rxPowerW) +Ptr +InterferenceHelper::Add (uint32_t size, WifiMode payloadMode, + enum WifiPreamble preamble, + Time duration, double rxPowerW) { Ptr event; - event = Create - (size, - payloadMode, - preamble, - duration, - rxPowerW); + event = Create (size, + payloadMode, + preamble, + duration, + rxPowerW); AppendEvent (event); return event; } -void +void InterferenceHelper::SetNoiseFigure (double value) { m_noiseFigure = value; } -double +double InterferenceHelper::GetNoiseFigure (void) const { return m_noiseFigure; } -void +void InterferenceHelper::SetErrorRateModel (Ptr rate) { m_errorRateModel = rate; } -Ptr +Ptr InterferenceHelper::GetErrorRateModel (void) const { return m_errorRateModel; } -Time +Time InterferenceHelper::GetEnergyDuration (double energyW) { Time now = Simulator::Now (); @@ -178,211 +182,14 @@ InterferenceHelper::GetEnergyDuration (double energyW) continue; } if (noiseInterferenceW < energyW) - { - break; - } + { + break; + } } return end > now ? end - now : MicroSeconds (0); } -WifiMode -InterferenceHelper::GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble) -{ - switch (payloadMode.GetModulationClass ()) - { - case WIFI_MOD_CLASS_OFDM: - { - switch (payloadMode.GetBandwidth ()) { - case 5000000: - return WifiPhy::GetOfdmRate1_5MbpsBW5MHz (); - case 10000000: - return WifiPhy::GetOfdmRate3MbpsBW10MHz (); - default: - // IEEE Std 802.11-2007, 17.3.2 - // actually this is only the first part of the PlcpHeader, - // because the last 16 bits of the PlcpHeader are using the - // same mode of the payload - return WifiPhy::GetOfdmRate6Mbps (); - } - } - - case WIFI_MOD_CLASS_ERP_OFDM: - return WifiPhy::GetErpOfdmRate6Mbps (); - - case WIFI_MOD_CLASS_DSSS: - if (preamble == WIFI_PREAMBLE_LONG) - { - // IEEE Std 802.11-2007, sections 15.2.3 and 18.2.2.1 - return WifiPhy::GetDsssRate1Mbps (); - } - else // WIFI_PREAMBLE_SHORT - { - // IEEE Std 802.11-2007, section 18.2.2.2 - return WifiPhy::GetDsssRate2Mbps (); - } - - default: - NS_FATAL_ERROR("unsupported modulation class"); - return WifiMode (); - } -} - -uint32_t -InterferenceHelper::GetPlcpHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble) -{ - switch (payloadMode.GetModulationClass ()) - { - case WIFI_MOD_CLASS_OFDM: - { - switch (payloadMode.GetBandwidth ()) { - case 20000000: - default: - // IEEE Std 802.11-2007, section 17.3.3 and figure 17-4 - // also section 17.3.2.3, table 17-4 - // We return the duration of the SIGNAL field only, since the - // SERVICE field (which strictly speaking belongs to the PLCP - // header, see section 17.3.2 and figure 17-1) is sent using the - // payload mode. - return 4; - case 10000000: - // IEEE Std 802.11-2007, section 17.3.2.3, table 17-4 - return 8; - case 5000000: - // IEEE Std 802.11-2007, section 17.3.2.3, table 17-4 - return 16; - } - } - - case WIFI_MOD_CLASS_ERP_OFDM: - return 16; - - case WIFI_MOD_CLASS_DSSS: - if (preamble == WIFI_PREAMBLE_SHORT) - { - // IEEE Std 802.11-2007, section 18.2.2.2 and figure 18-2 - return 24; - } - else // WIFI_PREAMBLE_LONG - { - // IEEE Std 802.11-2007, sections 18.2.2.1 and figure 18-1 - return 48; - } - - default: - NS_FATAL_ERROR("unsupported modulation class"); - return 0; - } -} - -uint32_t -InterferenceHelper::GetPlcpPreambleDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble) -{ - switch (payloadMode.GetModulationClass ()) - { - case WIFI_MOD_CLASS_OFDM: - { - switch (payloadMode.GetBandwidth ()) { - case 20000000: - default: - // IEEE Std 802.11-2007, section 17.3.3, figure 17-4 - // also section 17.3.2.3, table 17-4 - return 16; - case 10000000: - // IEEE Std 802.11-2007, section 17.3.3, table 17-4 - // also section 17.3.2.3, table 17-4 - return 32; - case 5000000: - // IEEE Std 802.11-2007, section 17.3.3 - // also section 17.3.2.3, table 17-4 - return 64; - } - } - - case WIFI_MOD_CLASS_ERP_OFDM: - return 4; - - case WIFI_MOD_CLASS_DSSS: - if (preamble == WIFI_PREAMBLE_SHORT) - { - // IEEE Std 802.11-2007, section 18.2.2.2 and figure 18-2 - return 72; - } - else // WIFI_PREAMBLE_LONG - { - // IEEE Std 802.11-2007, sections 18.2.2.1 and figure 18-1 - return 144; - } - - default: - NS_FATAL_ERROR("unsupported modulation class"); - return 0; - } -} - -uint32_t -InterferenceHelper::GetPayloadDurationMicroSeconds (uint32_t size, WifiMode payloadMode) -{ - NS_LOG_FUNCTION(size << payloadMode); - - switch (payloadMode.GetModulationClass ()) - { - case WIFI_MOD_CLASS_OFDM: - case WIFI_MOD_CLASS_ERP_OFDM: - { - // IEEE Std 802.11-2007, section 17.3.2.3, table 17-4 - // corresponds to T_{SYM} in the table - uint32_t symbolDurationUs; - - switch (payloadMode.GetBandwidth ()) { - case 20000000: - default: - symbolDurationUs = 4; - break; - case 10000000: - symbolDurationUs = 8; - break; - case 5000000: - symbolDurationUs = 16; - break; - } - - // IEEE Std 802.11-2007, section 17.3.2.2, table 17-3 - // corresponds to N_{DBPS} in the table - double numDataBitsPerSymbol = payloadMode.GetDataRate () * symbolDurationUs / 1e6; - - // IEEE Std 802.11-2007, section 17.3.5.3, equation (17-11) - uint32_t numSymbols = lrint (ceil ((16 + size * 8.0 + 6.0)/numDataBitsPerSymbol)); - - // Add signal extension for ERP PHY - if (payloadMode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM) - return numSymbols*symbolDurationUs + 6; - else - return numSymbols*symbolDurationUs; - } - - case WIFI_MOD_CLASS_DSSS: - // IEEE Std 802.11-2007, section 18.2.3.5 - NS_LOG_LOGIC(" size=" << size - << " mode=" << payloadMode - << " rate=" << payloadMode.GetDataRate () ); - return lrint(ceil ((size * 8.0) / (payloadMode.GetDataRate () / 1.0e6))); - - default: - NS_FATAL_ERROR("unsupported modulation class"); - return 0; - } -} - -Time -InterferenceHelper::CalculateTxDuration (uint32_t size, WifiMode payloadMode, WifiPreamble preamble) -{ - uint32_t duration = GetPlcpPreambleDurationMicroSeconds (payloadMode, preamble) - + GetPlcpHeaderDurationMicroSeconds (payloadMode, preamble) - + GetPayloadDurationMicroSeconds (size, payloadMode); - return MicroSeconds (duration); -} - -void +void InterferenceHelper::AppendEvent (Ptr event) { Time now = Simulator::Now (); @@ -394,13 +201,13 @@ InterferenceHelper::AppendEvent (Ptr event) m_firstPower += i->GetDelta (); } m_niChanges.erase (m_niChanges.begin (), nowIterator); - m_niChanges.insert (m_niChanges.begin (), NiChange (event->GetStartTime (), event->GetRxPowerW ())); + m_niChanges.insert (m_niChanges.begin (), NiChange (event->GetStartTime (), event->GetRxPowerW ())); } else { AddNiChangeEvent (NiChange (event->GetStartTime (), event->GetRxPowerW ())); } - AddNiChangeEvent(NiChange (event->GetEndTime (), -event->GetRxPowerW ())); + AddNiChangeEvent (NiChange (event->GetEndTime (), -event->GetRxPowerW ())); } @@ -440,88 +247,89 @@ InterferenceHelper::CalculateNoiseInterferenceW (Ptr double InterferenceHelper::CalculateChunkSuccessRate (double snir, Time duration, WifiMode mode) const { - if (duration == NanoSeconds (0)) { - return 1.0; - } + if (duration == NanoSeconds (0)) + { + return 1.0; + } uint32_t rate = mode.GetPhyRate (); uint64_t nbits = (uint64_t)(rate * duration.GetSeconds ()); double csr = m_errorRateModel->GetChunkSuccessRate (mode, snir, (uint32_t)nbits); return csr; } -double +double InterferenceHelper::CalculatePer (Ptr event, NiChanges *ni) const -{ +{ double psr = 1.0; /* Packet Success Rate */ NiChanges::iterator j = ni->begin (); - Time previous = (*j).GetTime (); + Time previous = (*j).GetTime (); WifiMode payloadMode = event->GetPayloadMode (); WifiPreamble preamble = event->GetPreambleType (); - WifiMode headerMode = GetPlcpHeaderMode (payloadMode, preamble); - Time plcpHeaderStart = (*j).GetTime () + MicroSeconds (GetPlcpPreambleDurationMicroSeconds (payloadMode, preamble)); - Time plcpPayloadStart = plcpHeaderStart + MicroSeconds (GetPlcpHeaderDurationMicroSeconds (payloadMode, preamble)); + WifiMode headerMode = WifiPhy::GetPlcpHeaderMode (payloadMode, preamble); + Time plcpHeaderStart = (*j).GetTime () + MicroSeconds (WifiPhy::GetPlcpPreambleDurationMicroSeconds (payloadMode, preamble)); + Time plcpPayloadStart = plcpHeaderStart + MicroSeconds (WifiPhy::GetPlcpHeaderDurationMicroSeconds (payloadMode, preamble)); double noiseInterferenceW = (*j).GetDelta (); double powerW = event->GetRxPowerW (); j++; - while (ni->end () != j) + while (ni->end () != j) { Time current = (*j).GetTime (); NS_ASSERT (current >= previous); - - if (previous >= plcpPayloadStart) + + if (previous >= plcpPayloadStart) { - psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, - noiseInterferenceW, - payloadMode), + psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, + noiseInterferenceW, + payloadMode), current - previous, payloadMode); - } - else if (previous >= plcpHeaderStart) + } + else if (previous >= plcpHeaderStart) { - if (current >= plcpPayloadStart) + if (current >= plcpPayloadStart) { - psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, - noiseInterferenceW, - headerMode), + psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, + noiseInterferenceW, + headerMode), plcpPayloadStart - previous, headerMode); - psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, - noiseInterferenceW, + psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, + noiseInterferenceW, payloadMode), current - plcpPayloadStart, payloadMode); - } - else + } + else { NS_ASSERT (current >= plcpHeaderStart); - psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, - noiseInterferenceW, - headerMode), + psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, + noiseInterferenceW, + headerMode), current - previous, headerMode); } - } - else + } + else { - if (current >= plcpPayloadStart) + if (current >= plcpPayloadStart) { - psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, - noiseInterferenceW, - headerMode), + psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, + noiseInterferenceW, + headerMode), plcpPayloadStart - plcpHeaderStart, headerMode); - psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, - noiseInterferenceW, - payloadMode), + psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, + noiseInterferenceW, + payloadMode), current - plcpPayloadStart, payloadMode); - } - else if (current >= plcpHeaderStart) + } + else if (current >= plcpHeaderStart) { - psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, - noiseInterferenceW, - headerMode), + psr *= CalculateChunkSuccessRate (CalculateSnr (powerW, + noiseInterferenceW, + headerMode), current - plcpHeaderStart, headerMode); } @@ -537,7 +345,7 @@ InterferenceHelper::CalculatePer (Ptr event, Ni } -struct InterferenceHelper::SnrPer +struct InterferenceHelper::SnrPer InterferenceHelper::CalculateSnrPer (Ptr event) { NiChanges ni; @@ -545,7 +353,7 @@ InterferenceHelper::CalculateSnrPer (Ptr event) double snr = CalculateSnr (event->GetRxPowerW (), noiseInterferenceW, event->GetPayloadMode ()); - + /* calculate the SNIR at the start of the packet and accumulate * all SNIR changes in the snir vector. */ @@ -558,8 +366,8 @@ InterferenceHelper::CalculateSnrPer (Ptr event) } void -InterferenceHelper::EraseEvents (void) -{ +InterferenceHelper::EraseEvents (void) +{ m_niChanges.clear (); m_rxing = false; m_firstPower = 0.0; diff --git a/src/wifi/model/interference-helper.h b/src/wifi/model/interference-helper.h index fc401628a..df83090a2 100644 --- a/src/wifi/model/interference-helper.h +++ b/src/wifi/model/interference-helper.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -33,17 +33,21 @@ namespace ns3 { class ErrorRateModel; +/** + * \ingroup wifi + * \brief handles interference calculations + */ class InterferenceHelper { public: class Event : public SimpleRefCount { - public: - Event (uint32_t size, WifiMode payloadMode, - enum WifiPreamble preamble, - Time duration, double rxPower); +public: + Event (uint32_t size, WifiMode payloadMode, + enum WifiPreamble preamble, + Time duration, double rxPower); ~Event (); - + Time GetDuration (void) const; Time GetStartTime (void) const; Time GetEndTime (void) const; @@ -51,7 +55,7 @@ public: uint32_t GetSize (void) const; WifiMode GetPayloadMode (void) const; enum WifiPreamble GetPreambleType (void) const; - private: +private: uint32_t m_size; WifiMode m_payloadMode; enum WifiPreamble m_preamble; @@ -59,7 +63,7 @@ public: Time m_endTime; double m_rxPowerW; }; - struct SnrPer + struct SnrPer { double snr; double per; @@ -77,34 +81,30 @@ public: /** * \param energyW the minimum energy (W) requested - * \returns the expected amount of time the observed + * \returns the expected amount of time the observed * energy on the medium will be higher than * the requested threshold. */ Time GetEnergyDuration (double energyW); - - static WifiMode GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble); - static uint32_t GetPlcpHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble); - static uint32_t GetPlcpPreambleDurationMicroSeconds (WifiMode mode, WifiPreamble preamble); - static uint32_t GetPayloadDurationMicroSeconds (uint32_t size, WifiMode payloadMode); - static Time CalculateTxDuration (uint32_t size, WifiMode payloadMode, WifiPreamble preamble); - Ptr Add (uint32_t size, WifiMode payloadMode, - enum WifiPreamble preamble, - Time duration, double rxPower); + + Ptr Add (uint32_t size, WifiMode payloadMode, + enum WifiPreamble preamble, + Time duration, double rxPower); struct InterferenceHelper::SnrPer CalculateSnrPer (Ptr event); void NotifyRxStart (); void NotifyRxEnd (); - void EraseEvents (void); + void EraseEvents (void); private: - class NiChange { - public: + class NiChange + { +public: NiChange (Time time, double delta); Time GetTime (void) const; double GetDelta (void) const; bool operator < (const NiChange& o) const; - private: +private: Time m_time; double m_delta; }; diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index 8dd5d039a..071a6721a 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -45,7 +45,6 @@ namespace ns3 { class SnrTag : public Tag { public: - static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; @@ -60,7 +59,7 @@ private: double m_snr; }; -TypeId +TypeId SnrTag::GetTypeId (void) { static TypeId tid = TypeId ("ns3::SnrTag") @@ -73,38 +72,38 @@ SnrTag::GetTypeId (void) ; return tid; } -TypeId +TypeId SnrTag::GetInstanceTypeId (void) const { return GetTypeId (); } -uint32_t +uint32_t SnrTag::GetSerializedSize (void) const { return sizeof (double); } -void +void SnrTag::Serialize (TagBuffer i) const { i.WriteDouble (m_snr); } -void +void SnrTag::Deserialize (TagBuffer i) { m_snr = i.ReadDouble (); } -void +void SnrTag::Print (std::ostream &os) const { os << "Snr=" << m_snr; } -void +void SnrTag::Set (double snr) { m_snr = snr; } -double +double SnrTag::Get (void) const { return m_snr; @@ -247,12 +246,12 @@ MacLowTransmissionParameters::MustWaitMultiTidBlockAck (void) const { return (m_waitAck == BLOCK_ACK_MULTI_TID) ? true : false; } -bool +bool MacLowTransmissionParameters::MustSendRts (void) const { return m_sendRts; } -bool +bool MacLowTransmissionParameters::HasDurationId (void) const { return (m_overrideDurationId != Seconds (0)); @@ -263,12 +262,12 @@ MacLowTransmissionParameters::GetDurationId (void) const NS_ASSERT (m_overrideDurationId != Seconds (0)); return m_overrideDurationId; } -bool +bool MacLowTransmissionParameters::HasNextPacket (void) const { return (m_nextSize != 0); } -uint32_t +uint32_t MacLowTransmissionParameters::GetNextPacketSize (void) const { NS_ASSERT (HasNextPacket ()); @@ -277,12 +276,13 @@ MacLowTransmissionParameters::GetNextPacketSize (void) const std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters ¶ms) { - os << "[" - << "send rts=" << params.m_sendRts << ", " - << "next size=" << params.m_nextSize << ", " - << "dur=" << params.m_overrideDurationId << ", " - << "ack="; - switch (params.m_waitAck) { + os << "[" + << "send rts=" << params.m_sendRts << ", " + << "next size=" << params.m_nextSize << ", " + << "dur=" << params.m_overrideDurationId << ", " + << "ack="; + switch (params.m_waitAck) + { case MacLowTransmissionParameters::ACK_NONE: os << "none"; break; @@ -315,17 +315,33 @@ std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters ***************************************************************/ -class PhyMacLowListener : public ns3::WifiPhyListener { +class PhyMacLowListener : public ns3::WifiPhyListener +{ public: PhyMacLowListener (ns3::MacLow *macLow) - : m_macLow (macLow) {} - virtual ~PhyMacLowListener () {} - virtual void NotifyRxStart (Time duration) {} - virtual void NotifyRxEndOk (void) {} - virtual void NotifyRxEndError (void) {} - virtual void NotifyTxStart (Time duration) {} - virtual void NotifyMaybeCcaBusyStart (Time duration) {} - virtual void NotifySwitchingStart (Time duration) { + : m_macLow (macLow) + { + } + virtual ~PhyMacLowListener () + { + } + virtual void NotifyRxStart (Time duration) + { + } + virtual void NotifyRxEndOk (void) + { + } + virtual void NotifyRxEndError (void) + { + } + virtual void NotifyTxStart (Time duration) + { + } + virtual void NotifyMaybeCcaBusyStart (Time duration) + { + } + virtual void NotifySwitchingStart (Time duration) + { m_macLow->NotifySwitchingStartNow (duration); } private: @@ -357,15 +373,15 @@ MacLow::~MacLow () NS_LOG_FUNCTION (this); } -void +void MacLow::SetupPhyMacLowListener (Ptr phy) { - m_phyMacLowListener = new PhyMacLowListener (this); + m_phyMacLowListener = new PhyMacLowListener (this); phy->RegisterListener (m_phyMacLowListener); } -void +void MacLow::DoDispose (void) { NS_LOG_FUNCTION (this); @@ -390,22 +406,22 @@ MacLow::CancelAllEvents (void) { NS_LOG_FUNCTION (this); bool oneRunning = false; - if (m_normalAckTimeoutEvent.IsRunning ()) + if (m_normalAckTimeoutEvent.IsRunning ()) { m_normalAckTimeoutEvent.Cancel (); oneRunning = true; } - if (m_fastAckTimeoutEvent.IsRunning ()) + if (m_fastAckTimeoutEvent.IsRunning ()) { m_fastAckTimeoutEvent.Cancel (); oneRunning = true; } - if (m_superFastAckTimeoutEvent.IsRunning ()) + if (m_superFastAckTimeoutEvent.IsRunning ()) { m_superFastAckTimeoutEvent.Cancel (); oneRunning = true; } - if (m_fastAckFailedTimeoutEvent.IsRunning ()) + if (m_fastAckFailedTimeoutEvent.IsRunning ()) { m_fastAckFailedTimeoutEvent.Cancel (); oneRunning = true; @@ -415,32 +431,32 @@ MacLow::CancelAllEvents (void) m_blockAckTimeoutEvent.Cancel (); oneRunning = true; } - if (m_ctsTimeoutEvent.IsRunning ()) + if (m_ctsTimeoutEvent.IsRunning ()) { m_ctsTimeoutEvent.Cancel (); oneRunning = true; } - if (m_sendCtsEvent.IsRunning ()) + if (m_sendCtsEvent.IsRunning ()) { m_sendCtsEvent.Cancel (); oneRunning = true; } - if (m_sendAckEvent.IsRunning ()) + if (m_sendAckEvent.IsRunning ()) { m_sendAckEvent.Cancel (); oneRunning = true; } - if (m_sendDataEvent.IsRunning ()) + if (m_sendDataEvent.IsRunning ()) { m_sendDataEvent.Cancel (); oneRunning = true; } - if (m_waitSifsEvent.IsRunning ()) + if (m_waitSifsEvent.IsRunning ()) { m_waitSifsEvent.Cancel (); oneRunning = true; } - if (oneRunning && m_listener != 0) + if (oneRunning && m_listener != 0) { m_listener->Cancel (); m_listener = 0; @@ -453,20 +469,20 @@ MacLow::SetPhy (Ptr phy) m_phy = phy; m_phy->SetReceiveOkCallback (MakeCallback (&MacLow::ReceiveOk, this)); m_phy->SetReceiveErrorCallback (MakeCallback (&MacLow::ReceiveError, this)); - SetupPhyMacLowListener(phy); + SetupPhyMacLowListener (phy); } -void +void MacLow::SetWifiRemoteStationManager (Ptr manager) { m_stationManager = manager; } -void +void MacLow::SetAddress (Mac48Address ad) { m_self = ad; } -void +void MacLow::SetAckTimeout (Time ackTimeout) { m_ackTimeout = ackTimeout; @@ -481,7 +497,7 @@ MacLow::SetCompressedBlockAckTimeout (Time blockAckTimeout) { m_compressedBlockAckTimeout = blockAckTimeout; } -void +void MacLow::SetCtsTimeout (Time ctsTimeout) { m_ctsTimeout = ctsTimeout; @@ -491,12 +507,12 @@ MacLow::SetSifs (Time sifs) { m_sifs = sifs; } -void +void MacLow::SetSlotTime (Time slotTime) { m_slotTime = slotTime; } -void +void MacLow::SetPifs (Time pifs) { m_pifs = pifs; @@ -506,12 +522,12 @@ MacLow::SetBssid (Mac48Address bssid) { m_bssid = bssid; } -Mac48Address +Mac48Address MacLow::GetAddress (void) const { return m_self; } -Time +Time MacLow::GetAckTimeout (void) const { return m_ackTimeout; @@ -526,7 +542,7 @@ MacLow::GetCompressedBlockAckTimeout () const { return m_compressedBlockAckTimeout; } -Time +Time MacLow::GetCtsTimeout (void) const { return m_ctsTimeout; @@ -536,37 +552,37 @@ MacLow::GetSifs (void) const { return m_sifs; } -Time +Time MacLow::GetSlotTime (void) const { return m_slotTime; } -Time +Time MacLow::GetPifs (void) const { return m_pifs; } -Mac48Address +Mac48Address MacLow::GetBssid (void) const { return m_bssid; } -void +void MacLow::SetRxCallback (Callback,const WifiMacHeader *> callback) { m_rxCallback = callback; } -void +void MacLow::RegisterDcfListener (MacLowDcfListener *listener) { m_dcfListeners.push_back (listener); } -void -MacLow::StartTransmission (Ptr packet, - const WifiMacHeader* hdr, +void +MacLow::StartTransmission (Ptr packet, + const WifiMacHeader* hdr, MacLowTransmissionParameters params, MacLowTransmissionListener *listener) { @@ -576,12 +592,12 @@ MacLow::StartTransmission (Ptr packet, * - ctsTimeout * - sendDataAfterCTS * expired. This means that one of these timers is still - * running. They are all cancelled below anyway by the + * running. They are all cancelled below anyway by the * call to CancelAllEvents (because of at least one * of these two timer) which will trigger a call to the * previous listener's cancel method. * - * This typically happens because the high-priority + * This typically happens because the high-priority * QapScheduler has taken access to the channel from * one of the Edca of the QAP. */ @@ -593,14 +609,14 @@ MacLow::StartTransmission (Ptr packet, //NS_ASSERT (m_phy->IsStateIdle ()); - NS_LOG_DEBUG ("startTx size="<< GetSize (m_currentPacket, &m_currentHdr) << - ", to=" << m_currentHdr.GetAddr1()<<", listener="<Reset(); - CancelAllEvents(); + NS_LOG_DEBUG ("switching channel. Cancelling MAC pending events"); + m_stationManager->Reset (); + CancelAllEvents (); if (m_navCounterResetCtsMissed.IsRunning ()) { - m_navCounterResetCtsMissed.Cancel(); + m_navCounterResetCtsMissed.Cancel (); } - m_lastNavStart = Simulator::Now (); + m_lastNavStart = Simulator::Now (); m_lastNavDuration = Seconds (0); m_currentPacket = 0; m_listener = 0; } -void +void MacLow::ReceiveOk (Ptr packet, double rxSnr, WifiMode txMode, WifiPreamble preamble) { NS_LOG_FUNCTION (this << packet << rxSnr << txMode << preamble); @@ -654,39 +670,39 @@ MacLow::ReceiveOk (Ptr packet, double rxSnr, WifiMode txMode, WifiPreamb bool isPrevNavZero = IsNavZero (); NS_LOG_DEBUG ("duration/id=" << hdr.GetDuration ()); NotifyNav (hdr, txMode, preamble); - if (hdr.IsRts ()) + if (hdr.IsRts ()) { /* see section 9.2.5.7 802.11-1999 - * A STA that is addressed by an RTS frame shall transmit a CTS frame after a SIFS - * period if the NAV at the STA receiving the RTS frame indicates that the medium is - * idle. If the NAV at the STA receiving the RTS indicates the medium is not idle, + * A STA that is addressed by an RTS frame shall transmit a CTS frame after a SIFS + * period if the NAV at the STA receiving the RTS frame indicates that the medium is + * idle. If the NAV at the STA receiving the RTS indicates the medium is not idle, * that STA shall not respond to the RTS frame. */ - if (isPrevNavZero && - hdr.GetAddr1 () == m_self) + if (isPrevNavZero + && hdr.GetAddr1 () == m_self) { NS_LOG_DEBUG ("rx RTS from=" << hdr.GetAddr2 () << ", schedule CTS"); NS_ASSERT (m_sendCtsEvent.IsExpired ()); - m_stationManager->ReportRxOk (hdr.GetAddr2 (), &hdr, + m_stationManager->ReportRxOk (hdr.GetAddr2 (), &hdr, rxSnr, txMode); m_sendCtsEvent = Simulator::Schedule (GetSifs (), &MacLow::SendCtsAfterRts, this, - hdr.GetAddr2 (), + hdr.GetAddr2 (), hdr.GetDuration (), txMode, rxSnr); - } - else + } + else { NS_LOG_DEBUG ("rx RTS from=" << hdr.GetAddr2 () << ", cannot schedule CTS"); } - } - else if (hdr.IsCts () && - hdr.GetAddr1 () == m_self && - m_ctsTimeoutEvent.IsRunning () && - m_currentPacket != 0) + } + else if (hdr.IsCts () + && hdr.GetAddr1 () == m_self + && m_ctsTimeoutEvent.IsRunning () + && m_currentPacket != 0) { - NS_LOG_DEBUG ("receive cts from="<RemoveHeader (blockAck); m_blockAckTimeoutEvent.Cancel (); @@ -773,11 +789,11 @@ MacLow::ReceiveOk (Ptr packet, double rxSnr, WifiMode txMode, WifiPreamb ResetBlockAckInactivityTimerIfNeeded (it->second.first); if ((*it).second.first.IsImmediateBlockAck ()) { - NS_LOG_DEBUG ("rx blockAckRequest/sendImmediateBlockAck from="<< hdr.GetAddr2 ()); + NS_LOG_DEBUG ("rx blockAckRequest/sendImmediateBlockAck from=" << hdr.GetAddr2 ()); m_sendAckEvent = Simulator::Schedule (GetSifs (), &MacLow::SendBlockAckAfterBlockAckRequest, this, blockAckReq, - hdr.GetAddr2 (), + hdr.GetAddr2 (), hdr.GetDuration (), txMode); } @@ -796,16 +812,16 @@ MacLow::ReceiveOk (Ptr packet, double rxSnr, WifiMode txMode, WifiPreamb NS_FATAL_ERROR ("Multi-tid block ack is not supported."); } } - else if (hdr.IsCtl ()) + else if (hdr.IsCtl ()) { NS_LOG_DEBUG ("rx drop " << hdr.GetTypeString ()); - } - else if (hdr.GetAddr1 () == m_self) + } + else if (hdr.GetAddr1 () == m_self) { m_stationManager->ReportRxOk (hdr.GetAddr2 (), &hdr, rxSnr, txMode); - if (hdr.IsQosData () && StoreMpduIfNeeded (packet, hdr)) + if (hdr.IsQosData () && StoreMpduIfNeeded (packet, hdr)) { /* From section 9.10.4 in IEEE802.11: Upon the receipt of a QoS data frame from the originator for which @@ -821,7 +837,7 @@ MacLow::ReceiveOk (Ptr packet, double rxSnr, WifiMode txMode, WifiPreamb NS_ASSERT (m_sendAckEvent.IsExpired ()); m_sendAckEvent = Simulator::Schedule (GetSifs (), &MacLow::SendAckAfterData, this, - hdr.GetAddr2 (), + hdr.GetAddr2 (), hdr.GetDuration (), txMode, rxSnr); @@ -842,29 +858,29 @@ MacLow::ReceiveOk (Ptr packet, double rxSnr, WifiMode txMode, WifiPreamb From section 11.5.3 in IEEE802.11e: When a recipient does not have an active Block ack for a TID, but receives data MPDUs with the Ack Policy subfield set to Block Ack, it shall discard - them and shall send a DELBA frame using the normal access + them and shall send a DELBA frame using the normal access mechanisms. */ AcIndex ac = QosUtilsMapTidToAc (hdr.GetQosTid ()); m_edcaListeners[ac]->BlockAckInactivityTimeout (hdr.GetAddr2 (), hdr.GetQosTid ()); return; } - else if (hdr.IsQosData () && hdr.IsQosNoAck ()) + else if (hdr.IsQosData () && hdr.IsQosNoAck ()) { - NS_LOG_DEBUG ("rx unicast/noAck from="<CalculateTxDuration (GetCtsSize (), ctsMode, WIFI_PREAMBLE_LONG); } -uint32_t +uint32_t MacLow::GetCtsSize (void) const { WifiMacHeader cts; cts.SetType (WIFI_MAC_CTL_CTS); return cts.GetSize () + 4; } -uint32_t +uint32_t MacLow::GetSize (Ptr packet, const WifiMacHeader *hdr) const { WifiMacTrailer fcs; @@ -992,13 +1008,13 @@ MacLow::GetAckTxModeForData (Mac48Address to, WifiMode dataTxMode) const Time MacLow::CalculateOverallTxTime (Ptr packet, - const WifiMacHeader* hdr, + const WifiMacHeader* hdr, const MacLowTransmissionParameters& params) const { Time txTime = Seconds (0); WifiMode rtsMode = GetRtsTxMode (packet, hdr); WifiMode dataMode = GetDataTxMode (packet, hdr); - if (params.MustSendRts ()) + if (params.MustSendRts ()) { txTime += m_phy->CalculateTxDuration (GetRtsSize (), rtsMode, WIFI_PREAMBLE_LONG); txTime += GetCtsDuration (hdr->GetAddr1 (), rtsMode); @@ -1016,11 +1032,11 @@ MacLow::CalculateOverallTxTime (Ptr packet, Time MacLow::CalculateTransmissionTime (Ptr packet, - const WifiMacHeader* hdr, + const WifiMacHeader* hdr, const MacLowTransmissionParameters& params) const { Time txTime = CalculateOverallTxTime (packet, hdr, params); - if (params.HasNextPacket ()) + if (params.HasNextPacket ()) { WifiMode dataMode = GetDataTxMode (packet, hdr); txTime += GetSifs (); @@ -1035,8 +1051,8 @@ MacLow::NotifyNav (const WifiMacHeader &hdr, WifiMode txMode, WifiPreamble pream NS_ASSERT (m_lastNavStart <= Simulator::Now ()); Time duration = hdr.GetDuration (); - if (hdr.IsCfpoll () && - hdr.GetAddr2 () == m_bssid) + if (hdr.IsCfpoll () + && hdr.GetAddr2 () == m_bssid) { // see section 9.3.2.2 802.11-1999 DoNavResetNow (duration); @@ -1051,16 +1067,16 @@ MacLow::NotifyNav (const WifiMacHeader &hdr, WifiMode txMode, WifiPreamble pream if (hdr.IsRts () && navUpdated) { /** - * A STA that used information from an RTS frame as the most recent basis to update its NAV setting - * is permitted to reset its NAV if no PHY-RXSTART.indication is detected from the PHY during a - * period with a duration of (2 * aSIFSTime) + (CTS_Time) + (2 * aSlotTime) starting at the - * PHY-RXEND.indication corresponding to the detection of the RTS frame. The “CTS_Time” shall - * be calculated using the length of the CTS frame and the data rate at which the RTS frame + * A STA that used information from an RTS frame as the most recent basis to update its NAV setting + * is permitted to reset its NAV if no PHY-RXSTART.indication is detected from the PHY during a + * period with a duration of (2 * aSIFSTime) + (CTS_Time) + (2 * aSlotTime) starting at the + * PHY-RXEND.indication corresponding to the detection of the RTS frame. The “CTS_Time” shall + * be calculated using the length of the CTS frame and the data rate at which the RTS frame * used for the most recent NAV update was received. */ WifiMacHeader cts; cts.SetType (WIFI_MAC_CTL_CTS); - Time navCounterResetCtsMissedDelay = + Time navCounterResetCtsMissedDelay = m_phy->CalculateTxDuration (cts.GetSerializedSize (), txMode, preamble) + Time (2 * GetSifs ()) + Time (2 * GetSlotTime ()); m_navCounterResetCtsMissed = Simulator::Schedule (navCounterResetCtsMissedDelay, @@ -1082,7 +1098,7 @@ MacLow::NavCounterResetCtsMissed (Time rtsEndRxTime) void MacLow::DoNavResetNow (Time duration) { - for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) + for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) { (*i)->NavReset (duration); } @@ -1092,7 +1108,7 @@ MacLow::DoNavResetNow (Time duration) bool MacLow::DoNavStartNow (Time duration) { - for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) + for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) { (*i)->NavStart (duration); } @@ -1109,7 +1125,7 @@ MacLow::DoNavStartNow (Time duration) void MacLow::NotifyAckTimeoutStartNow (Time duration) { - for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) + for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) { (*i)->AckTimeoutStart (duration); } @@ -1117,7 +1133,7 @@ MacLow::NotifyAckTimeoutStartNow (Time duration) void MacLow::NotifyAckTimeoutResetNow () { - for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) + for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) { (*i)->AckTimeoutReset (); } @@ -1125,7 +1141,7 @@ MacLow::NotifyAckTimeoutResetNow () void MacLow::NotifyCtsTimeoutStartNow (Time duration) { - for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) + for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) { (*i)->CtsTimeoutStart (duration); } @@ -1133,14 +1149,14 @@ MacLow::NotifyCtsTimeoutStartNow (Time duration) void MacLow::NotifyCtsTimeoutResetNow () { - for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) + for (DcfListenersCI i = m_dcfListeners.begin (); i != m_dcfListeners.end (); i++) { (*i)->CtsTimeoutReset (); } } void -MacLow::ForwardDown (Ptr packet, const WifiMacHeader* hdr, +MacLow::ForwardDown (Ptr packet, const WifiMacHeader* hdr, WifiMode txMode) { NS_LOG_FUNCTION (this << packet << hdr << txMode); @@ -1149,7 +1165,7 @@ MacLow::ForwardDown (Ptr packet, const WifiMacHeader* hdr, ", size=" << packet->GetSize () << ", mode=" << txMode << ", duration=" << hdr->GetDuration () << - ", seq=0x"<< std::hex << m_currentHdr.GetSequenceControl () << std::dec); + ", seq=0x" << std::hex << m_currentHdr.GetSequenceControl () << std::dec); m_phy->SendPacket (packet, txMode, WIFI_PREAMBLE_LONG, 0); } @@ -1187,7 +1203,7 @@ MacLow::FastAckTimeout (void) m_stationManager->ReportDataFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); MacLowTransmissionListener *listener = m_listener; m_listener = 0; - if (m_phy->IsStateIdle ()) + if (m_phy->IsStateIdle ()) { NS_LOG_DEBUG ("fast Ack idle missed"); listener->MissedAck (); @@ -1215,12 +1231,12 @@ MacLow::SuperFastAckTimeout () m_stationManager->ReportDataFailed (m_currentHdr.GetAddr1 (), &m_currentHdr); MacLowTransmissionListener *listener = m_listener; m_listener = 0; - if (m_phy->IsStateIdle ()) + if (m_phy->IsStateIdle ()) { NS_LOG_DEBUG ("super fast Ack failed"); listener->MissedAck (); - } - else + } + else { NS_LOG_DEBUG ("super fast Ack ok"); listener->GotAck (0.0, WifiMode ()); @@ -1242,17 +1258,17 @@ MacLow::SendRtsForPacket (void) rts.SetAddr2 (m_self); WifiMode rtsTxMode = GetRtsTxMode (m_currentPacket, &m_currentHdr); Time duration = Seconds (0); - if (m_txParams.HasDurationId ()) + if (m_txParams.HasDurationId ()) { duration += m_txParams.GetDurationId (); - } - else + } + else { WifiMode dataTxMode = GetDataTxMode (m_currentPacket, &m_currentHdr); duration += GetSifs (); duration += GetCtsDuration (m_currentHdr.GetAddr1 (), rtsTxMode); duration += GetSifs (); - duration += m_phy->CalculateTxDuration (GetSize (m_currentPacket, &m_currentHdr), + duration += m_phy->CalculateTxDuration (GetSize (m_currentPacket, &m_currentHdr), dataTxMode, WIFI_PREAMBLE_LONG); duration += GetSifs (); duration += GetAckDuration (m_currentHdr.GetAddr1 (), dataTxMode); @@ -1279,26 +1295,26 @@ MacLow::StartDataTxTimers (void) { WifiMode dataTxMode = GetDataTxMode (m_currentPacket, &m_currentHdr); Time txDuration = m_phy->CalculateTxDuration (GetSize (m_currentPacket, &m_currentHdr), dataTxMode, WIFI_PREAMBLE_LONG); - if (m_txParams.MustWaitNormalAck ()) + if (m_txParams.MustWaitNormalAck ()) { Time timerDelay = txDuration + GetAckTimeout (); NS_ASSERT (m_normalAckTimeoutEvent.IsExpired ()); NotifyAckTimeoutStartNow (timerDelay); m_normalAckTimeoutEvent = Simulator::Schedule (timerDelay, &MacLow::NormalAckTimeout, this); - } - else if (m_txParams.MustWaitFastAck ()) + } + else if (m_txParams.MustWaitFastAck ()) { Time timerDelay = txDuration + GetPifs (); NS_ASSERT (m_fastAckTimeoutEvent.IsExpired ()); NotifyAckTimeoutStartNow (timerDelay); m_fastAckTimeoutEvent = Simulator::Schedule (timerDelay, &MacLow::FastAckTimeout, this); - } - else if (m_txParams.MustWaitSuperFastAck ()) + } + else if (m_txParams.MustWaitSuperFastAck ()) { Time timerDelay = txDuration + GetPifs (); NS_ASSERT (m_superFastAckTimeoutEvent.IsExpired ()); NotifyAckTimeoutStartNow (timerDelay); - m_superFastAckTimeoutEvent = Simulator::Schedule (timerDelay, + m_superFastAckTimeoutEvent = Simulator::Schedule (timerDelay, &MacLow::SuperFastAckTimeout, this); } else if (m_txParams.MustWaitBasicBlockAck ()) @@ -1313,13 +1329,13 @@ MacLow::StartDataTxTimers (void) NS_ASSERT (m_blockAckTimeoutEvent.IsExpired ()); m_blockAckTimeoutEvent = Simulator::Schedule (timerDelay, &MacLow::BlockAckTimeout, this); } - else if (m_txParams.HasNextPacket ()) + else if (m_txParams.HasNextPacket ()) { Time delay = txDuration + GetSifs (); NS_ASSERT (m_waitSifsEvent.IsExpired ()); m_waitSifsEvent = Simulator::Schedule (delay, &MacLow::WaitSifsAfterEndTx, this); - } - else + } + else { // since we do not expect any timer to be triggered. m_listener = 0; @@ -1335,11 +1351,11 @@ MacLow::SendDataPacket (void) WifiMode dataTxMode = GetDataTxMode (m_currentPacket, &m_currentHdr); Time duration = Seconds (0.0); - if (m_txParams.HasDurationId ()) + if (m_txParams.HasDurationId ()) { duration += m_txParams.GetDurationId (); - } - else + } + else { if (m_txParams.MustWaitBasicBlockAck ()) { @@ -1351,17 +1367,17 @@ MacLow::SendDataPacket (void) duration += GetSifs (); duration += GetBlockAckDuration (m_currentHdr.GetAddr1 (), dataTxMode, COMPRESSED_BLOCK_ACK); } - else if (m_txParams.MustWaitAck ()) + else if (m_txParams.MustWaitAck ()) { duration += GetSifs (); duration += GetAckDuration (m_currentHdr.GetAddr1 (), dataTxMode); } - if (m_txParams.HasNextPacket ()) + if (m_txParams.HasNextPacket ()) { duration += GetSifs (); - duration += m_phy->CalculateTxDuration (m_txParams.GetNextPacketSize (), + duration += m_phy->CalculateTxDuration (m_txParams.GetNextPacketSize (), dataTxMode, WIFI_PREAMBLE_LONG); - if (m_txParams.MustWaitAck ()) + if (m_txParams.MustWaitAck ()) { duration += GetSifs (); duration += GetAckDuration (m_currentHdr.GetAddr1 (), dataTxMode); @@ -1378,14 +1394,14 @@ MacLow::SendDataPacket (void) m_currentPacket = 0; } -bool +bool MacLow::IsNavZero (void) const { - if (m_lastNavStart + m_lastNavDuration < Simulator::Now ()) + if (m_lastNavStart + m_lastNavDuration < Simulator::Now ()) { return true; - } - else + } + else { return false; } @@ -1395,7 +1411,7 @@ void MacLow::SendCtsAfterRts (Mac48Address source, Time duration, WifiMode rtsTxMode, double rtsSnr) { NS_LOG_FUNCTION (this << source << duration << rtsTxMode << rtsSnr); - /* send a CTS when you receive a RTS + /* send a CTS when you receive a RTS * right after SIFS. */ WifiMode ctsTxMode = GetCtsTxModeForRts (source, rtsTxMode); @@ -1427,8 +1443,8 @@ void MacLow::SendDataAfterCts (Mac48Address source, Time duration, WifiMode txMode) { NS_LOG_FUNCTION (this); - /* send the third step in a - * RTS/CTS/DATA/ACK hanshake + /* send the third step in a + * RTS/CTS/DATA/ACK hanshake */ NS_ASSERT (m_currentPacket != 0); StartDataTxTimers (); @@ -1437,7 +1453,7 @@ MacLow::SendDataAfterCts (Mac48Address source, Time duration, WifiMode txMode) Time newDuration = Seconds (0); newDuration += GetSifs (); newDuration += GetAckDuration (m_currentHdr.GetAddr1 (), dataTxMode); - Time txDuration = m_phy->CalculateTxDuration (GetSize (m_currentPacket, &m_currentHdr), + Time txDuration = m_phy->CalculateTxDuration (GetSize (m_currentPacket, &m_currentHdr), dataTxMode, WIFI_PREAMBLE_LONG); duration -= txDuration; duration -= GetSifs (); @@ -1454,7 +1470,7 @@ MacLow::SendDataAfterCts (Mac48Address source, Time duration, WifiMode txMode) m_currentPacket = 0; } -void +void MacLow::WaitSifsAfterEndTx (void) { m_listener->StartNext (); @@ -1474,8 +1490,8 @@ void MacLow::SendAckAfterData (Mac48Address source, Time duration, WifiMode dataTxMode, double dataSnr) { NS_LOG_FUNCTION (this); - /* send an ACK when you receive - * a packet after SIFS. + /* send an ACK when you receive + * a packet after SIFS. */ WifiMode ackTxMode = GetAckTxModeForData (source, dataTxMode); WifiMacHeader ack; @@ -1516,15 +1532,18 @@ MacLow::StoreMpduIfNeeded (Ptr packet, WifiMacHeader hdr) uint16_t mappedSeqControl = QosUtilsMapSeqControlToUniqueInteger (hdr.GetSequenceControl (), endSequence); BufferedPacketI i = (*it).second.second.begin (); - for (; i != (*it).second.second.end () && - QosUtilsMapSeqControlToUniqueInteger ((*i).second.GetSequenceControl (), endSequence) < mappedSeqControl; i++) ; + for (; i != (*it).second.second.end () + && QosUtilsMapSeqControlToUniqueInteger ((*i).second.GetSequenceControl (), endSequence) < mappedSeqControl; i++) + { + ; + } (*it).second.second.insert (i, bufferedPacket); //Update block ack cache BlockAckCachesI j = m_bAckCaches.find (std::make_pair (hdr.GetAddr2 (), hdr.GetQosTid ())); NS_ASSERT (j != m_bAckCaches.end ()); (*j).second.UpdateWithMpdu (&hdr); - + return true; } return false; @@ -1596,12 +1615,12 @@ MacLow::RxCompleteBufferedPacketsWithSmallerSequence (uint16_t seq, Mac48Address { uint16_t endSequence = ((*it).second.first.GetStartingSequence () + 2047) % 4096; uint16_t mappedStart = QosUtilsMapSeqControlToUniqueInteger (seq, endSequence); - uint16_t guard = (*it).second.second.begin ()->second.GetSequenceControl() & 0xfff0; + uint16_t guard = (*it).second.second.begin ()->second.GetSequenceControl () & 0xfff0; BufferedPacketI last = (*it).second.second.begin (); BufferedPacketI i = (*it).second.second.begin (); - for (; i != (*it).second.second.end () && - QosUtilsMapSeqControlToUniqueInteger ((*i).second.GetSequenceNumber (), endSequence) < mappedStart;) + for (; i != (*it).second.second.end () + && QosUtilsMapSeqControlToUniqueInteger ((*i).second.GetSequenceNumber (), endSequence) < mappedStart;) { if (guard == (*i).second.GetSequenceControl ()) { @@ -1654,12 +1673,12 @@ MacLow::RxCompleteBufferedPacketsUntilFirstLost (Mac48Address originator, uint8_ AgreementsI it = m_bAckAgreements.find (std::make_pair (originator, tid)); if (it != m_bAckAgreements.end ()) { - uint16_t startingSeqCtrl = ((*it).second.first.GetStartingSequence ()<<4) & 0xfff0; + uint16_t startingSeqCtrl = ((*it).second.first.GetStartingSequence () << 4) & 0xfff0; uint16_t guard = startingSeqCtrl; BufferedPacketI lastComplete = (*it).second.second.begin (); BufferedPacketI i = (*it).second.second.begin (); - for (; i != (*it).second.second.end() && guard == (*i).second.GetSequenceControl (); i++) + for (; i != (*it).second.second.end () && guard == (*i).second.GetSequenceControl (); i++) { if (!(*i).second.IsMoreFragments ()) { @@ -1673,8 +1692,8 @@ MacLow::RxCompleteBufferedPacketsUntilFirstLost (Mac48Address originator, uint8_ } guard = (*i).second.IsMoreFragments () ? (guard + 1) : ((guard + 16) & 0xfff0); } - (*it).second.first.SetStartingSequence ((guard>>4)&0x0fff); - /* All packets already forwarded to WifiMac must be removed from buffer: + (*it).second.first.SetStartingSequence ((guard >> 4) & 0x0fff); + /* All packets already forwarded to WifiMac must be removed from buffer: [begin (), lastComplete) */ (*it).second.second.erase ((*it).second.second.begin (), lastComplete); } @@ -1765,7 +1784,7 @@ MacLow::SendBlockAckAfterBlockAckRequest (const CtrlBAckRequestHeader reqHdr, Ma NS_ASSERT (i != m_bAckCaches.end ()); (*i).second.FillBlockAckBitmap (&blockAck); - /* All packets with smaller sequence than starting sequence control must be passed up to Wifimac + /* All packets with smaller sequence than starting sequence control must be passed up to Wifimac * See 9.10.3 in IEEE8022.11e standard. */ RxCompleteBufferedPacketsWithSmallerSequence (reqHdr.GetStartingSequence (), originator, tid); @@ -1773,7 +1792,7 @@ MacLow::SendBlockAckAfterBlockAckRequest (const CtrlBAckRequestHeader reqHdr, Ma } else { - NS_LOG_DEBUG ("there's not a valid block ack agreement with "<::iterator it = m_edcaListeners.find (ac); //NS_ASSERT (it != m_edcaListeners.end ()); - agreement.m_inactivityEvent = Simulator::Schedule (timeout, - &MacLowBlockAckEventListener::BlockAckInactivityTimeout, + agreement.m_inactivityEvent = Simulator::Schedule (timeout, + &MacLowBlockAckEventListener::BlockAckInactivityTimeout, m_edcaListeners[ac], agreement.GetPeer (), agreement.GetTid ()); diff --git a/src/wifi/model/mac-low.h b/src/wifi/model/mac-low.h index 64f4608a2..9aaf9682b 100644 --- a/src/wifi/model/mac-low.h +++ b/src/wifi/model/mac-low.h @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -49,9 +49,11 @@ class WifiMac; class EdcaTxopN; /** + * \ingroup wifi * \brief listen to events coming from ns3::MacLow. */ -class MacLowTransmissionListener { +class MacLowTransmissionListener +{ public: MacLowTransmissionListener (); virtual ~MacLowTransmissionListener (); @@ -75,7 +77,7 @@ public: * * ns3::MacLow received an expected ACL within * AckTimeout. The snr and txMode - * arguments are not valid when SUPER_FAST_ACK is + * arguments are not valid when SUPER_FAST_ACK is * used. */ virtual void GotAck (double snr, WifiMode txMode) = 0; @@ -90,7 +92,7 @@ public: * * Invoked when ns3::MacLow receives a block ack frame. * Block ack frame is received after a block ack request - * and contains information about the correct reception + * and contains information about the correct reception * of a set of packet for which a normal ack wasn't send. * Default implementation for this method is empty. Every * queue that intends to be notified by MacLow of reception @@ -99,7 +101,7 @@ public: virtual void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address source); /** * ns3::MacLow did not receive an expected BLOCK_ACK within - * BlockAckTimeout. This method is used only for immediate + * BlockAckTimeout. This method is used only for immediate * block ack variant. With delayed block ack, the MissedAck method will be * called instead: upon receipt of a block ack request, the rx station will * reply with a normal ack frame. Later, when the rx station gets a txop, it @@ -116,7 +118,7 @@ public: virtual void StartNext (void) = 0; /** - * Invoked if this transmission was canceled + * Invoked if this transmission was canceled * one way or another. When this method is invoked, * you can assume that the packet has not been passed * down the stack to the PHY. @@ -127,12 +129,14 @@ public: /** * \brief listen to NAV events + * \ingroup wifi * * This class is typically connected to an instance of ns3::Dcf * and calls to its methods are forwards to the corresponding * ns3::Dcf methods. */ -class MacLowDcfListener { +class MacLowDcfListener +{ public: MacLowDcfListener (); virtual ~MacLowDcfListener (); @@ -151,16 +155,18 @@ public: }; /** + * \ingroup wifi * \brief listen for block ack events. */ -class MacLowBlockAckEventListener { +class MacLowBlockAckEventListener +{ public: MacLowBlockAckEventListener (); virtual ~MacLowBlockAckEventListener (); /** * Typically is called in order to notify EdcaTxopN that a block ack inactivity * timeout occurs for the block ack agreement identified by the pair originator, tid. - * + * * Rx station maintains an inactivity timer for each block ack * agreement. Timer is reset when a frame with ack policy block ack * or a block ack request are received. When this timer reaches zero @@ -171,12 +177,14 @@ public: /** * \brief control how a packet is transmitted. + * \ingroup wifi * * The ns3::MacLow::StartTransmission method expects * an instance of this class to describe how the packet * should be transmitted. */ -class MacLowTransmissionParameters { +class MacLowTransmissionParameters +{ public: MacLowTransmissionParameters (); @@ -190,9 +198,9 @@ public: * - wait PIFS after end-of-tx. If idle, call * MacLowTransmissionListener::MissedAck. * - if busy at end-of-tx+PIFS, wait end-of-rx - * - if Ack ok at end-of-rx, call + * - if Ack ok at end-of-rx, call * MacLowTransmissionListener::GotAck. - * - if Ack not ok at end-of-rx, report call + * - if Ack not ok at end-of-rx, report call * MacLowTransmissionListener::MissedAck * at end-of-rx+SIFS. * @@ -200,8 +208,8 @@ public: * proper HCCA support. */ void EnableFastAck (void); - /** - * - if busy at end-of-tx+PIFS, call + /** + * - if busy at end-of-tx+PIFS, call * MacLowTransmissionListener::GotAck * - if idle at end-of-tx+PIFS, call * MacLowTransmissionListener::MissedAck @@ -220,7 +228,7 @@ public: */ void EnableMultiTidBlockAck (void); /** - * Send a RTS, and wait CTSTimeout for a CTS. If we get a + * Send a RTS, and wait CTSTimeout for a CTS. If we get a * CTS on time, call MacLowTransmissionListener::GotCts * and send data. Otherwise, call MacLowTransmissionListener::MissedCts * and do not send data. @@ -230,9 +238,9 @@ public: * \param size size of next data to send after current packet is * sent. * - * Add the transmission duration of the next data to the - * durationId of the outgoing packet and call - * MacLowTransmissionListener::StartNext at the end of + * Add the transmission duration of the next data to the + * durationId of the outgoing packet and call + * MacLowTransmissionListener::StartNext at the end of * the current transmission + SIFS. */ void EnableNextData (uint32_t size); @@ -241,7 +249,7 @@ public: * \param durationId the value to set in the duration/Id field of * the outgoing packet. * - * Ignore all other durationId calculation and simply force the + * Ignore all other durationId calculation and simply force the * packet's durationId field to this value. */ void EnableOverrideDurationId (Time durationId); @@ -282,14 +290,14 @@ public: */ bool MustWaitNormalAck (void) const; /** - * \returns true if fast ack protocol should be used, false + * \returns true if fast ack protocol should be used, false * otherwise. * * \sa EnableFastAck */ bool MustWaitFastAck (void) const; /** - * \returns true if super fast ack protocol should be used, false + * \returns true if super fast ack protocol should be used, false * otherwise. * * \sa EnableSuperFastAck @@ -314,12 +322,12 @@ public: */ bool MustWaitMultiTidBlockAck (void) const; /** - * \returns true if RTS should be sent and CTS waited for before + * \returns true if RTS should be sent and CTS waited for before * sending data, false otherwise. */ bool MustSendRts (void) const; /** - * \returns true if a duration/id was forced with + * \returns true if a duration/id was forced with * EnableOverrideDurationId, false otherwise. */ bool HasDurationId (void) const; @@ -339,7 +347,8 @@ public: private: friend std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters ¶ms); uint32_t m_nextSize; - enum { + enum + { ACK_NONE, ACK_NORMAL, ACK_FAST, @@ -356,9 +365,11 @@ std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters /** + * \ingroup wifi * \brief handle RTS/CTS/DATA/ACK transactions. */ -class MacLow : public Object { +class MacLow : public Object +{ public: typedef Callback, const WifiMacHeader*> MacLowRxCallback; @@ -409,7 +420,7 @@ public: * the next packet transmission if one was selected. */ Time CalculateTransmissionTime (Ptr packet, - const WifiMacHeader* hdr, + const WifiMacHeader* hdr, const MacLowTransmissionParameters& parameters) const; /** @@ -421,8 +432,8 @@ public: * Start the transmission of the input packet and notify the listener * of transmission events. */ - void StartTransmission (Ptr packet, - const WifiMacHeader* hdr, + void StartTransmission (Ptr packet, + const WifiMacHeader* hdr, MacLowTransmissionParameters parameters, MacLowTransmissionListener *listener); @@ -451,7 +462,7 @@ public: * the MAC layer that a channel switching occured. When a channel switching * occurs, pending MAC transmissions (RTS, CTS, DATA and ACK) are cancelled. */ - void NotifySwitchingStartNow (Time duration); + void NotifySwitchingStartNow (Time duration); /** * \param respHdr Add block ack response from originator (action * frame). @@ -495,10 +506,10 @@ private: uint32_t GetCtsSize (void) const; uint32_t GetSize (Ptr packet, const WifiMacHeader *hdr) const; Time NowUs (void) const; - void ForwardDown (Ptr packet, const WifiMacHeader *hdr, + void ForwardDown (Ptr packet, const WifiMacHeader *hdr, WifiMode txMode); Time CalculateOverallTxTime (Ptr packet, - const WifiMacHeader* hdr, + const WifiMacHeader* hdr, const MacLowTransmissionParameters ¶ms) const; WifiMode GetRtsTxMode (Ptr packet, const WifiMacHeader *hdr) const; WifiMode GetDataTxMode (Ptr packet, const WifiMacHeader *hdr) const; @@ -557,8 +568,8 @@ private: * See section 9.10.4 in IEEE802.11 standard for more details. */ void RxCompleteBufferedPacketsUntilFirstLost (Mac48Address originator, uint8_t tid); - /* - * This method checks if exists a valid established block ack agreement. + /* + * This method checks if exists a valid established block ack agreement. * If there is, store the packet without pass it up to WifiMac. The packet is buffered * in order of increasing sequence control field. All comparison are performed * circularly modulo 2^12. @@ -583,7 +594,7 @@ private: */ void ResetBlockAckInactivityTimerIfNeeded (BlockAckAgreement &agreement); - void SetupPhyMacLowListener (Ptr phy); + void SetupPhyMacLowListener (Ptr phy); Ptr m_phy; Ptr m_stationManager; @@ -621,8 +632,8 @@ private: Time m_lastNavStart; Time m_lastNavDuration; - // Listerner needed to monitor when a channel switching occurs. - class PhyMacLowListener *m_phyMacLowListener; + // Listerner needed to monitor when a channel switching occurs. + class PhyMacLowListener * m_phyMacLowListener; /* * BlockAck data structures. diff --git a/src/wifi/model/mac-rx-middle.cc b/src/wifi/model/mac-rx-middle.cc index d9670c6ec..24dc3eafd 100644 --- a/src/wifi/model/mac-rx-middle.cc +++ b/src/wifi/model/mac-rx-middle.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -33,7 +33,8 @@ NS_LOG_COMPONENT_DEFINE ("MacRxMiddle"); namespace ns3 { -class OriginatorRxStatus { +class OriginatorRxStatus +{ private: typedef std::list > Fragments; typedef std::list >::const_iterator FragmentsCI; @@ -42,58 +43,65 @@ private: uint16_t m_lastSequenceControl; Fragments m_fragments; public: - OriginatorRxStatus () { + OriginatorRxStatus () + { /* this is a magic value necessary. */ m_lastSequenceControl = 0xffff; m_defragmenting = false; } - ~OriginatorRxStatus () { + ~OriginatorRxStatus () + { m_fragments.clear (); } - bool IsDeFragmenting (void) { + bool IsDeFragmenting (void) + { return m_defragmenting; } - void AccumulateFirstFragment (Ptr packet) { + void AccumulateFirstFragment (Ptr packet) + { NS_ASSERT (!m_defragmenting); m_defragmenting = true; m_fragments.push_back (packet); } - Ptr AccumulateLastFragment (Ptr packet) { + Ptr AccumulateLastFragment (Ptr packet) + { NS_ASSERT (m_defragmenting); m_fragments.push_back (packet); m_defragmenting = false; Ptr full = Create (); - for (FragmentsCI i = m_fragments.begin (); i != m_fragments.end (); i++) + for (FragmentsCI i = m_fragments.begin (); i != m_fragments.end (); i++) { full->AddAtEnd (*i); } m_fragments.erase (m_fragments.begin (), m_fragments.end ()); return full; } - void AccumulateFragment (Ptr packet) { + void AccumulateFragment (Ptr packet) + { NS_ASSERT (m_defragmenting); m_fragments.push_back (packet); } - bool IsNextFragment (uint16_t sequenceControl) { - if ((sequenceControl >> 4) == (m_lastSequenceControl >> 4) && - (sequenceControl & 0x0f) == ((m_lastSequenceControl & 0x0f)+1)) + bool IsNextFragment (uint16_t sequenceControl) + { + if ((sequenceControl >> 4) == (m_lastSequenceControl >> 4) + && (sequenceControl & 0x0f) == ((m_lastSequenceControl & 0x0f) + 1)) { return true; - } - else + } + else { return false; } } - uint16_t GetLastSequenceControl (void) + uint16_t GetLastSequenceControl (void) { return m_lastSequenceControl; } - void SetSequenceControl (uint16_t sequenceControl) + void SetSequenceControl (uint16_t sequenceControl) { m_lastSequenceControl = sequenceControl; } - + }; @@ -106,14 +114,14 @@ MacRxMiddle::~MacRxMiddle () { NS_LOG_FUNCTION_NOARGS (); for (OriginatorsI i = m_originatorStatus.begin (); - i != m_originatorStatus.end (); i++) + i != m_originatorStatus.end (); i++) { delete (*i).second; } m_originatorStatus.erase (m_originatorStatus.begin (), m_originatorStatus.end ()); for (QosOriginatorsI i = m_qosOriginatorStatus.begin (); - i != m_qosOriginatorStatus.end (); i++) + i != m_qosOriginatorStatus.end (); i++) { delete (*i).second; } @@ -121,7 +129,7 @@ MacRxMiddle::~MacRxMiddle () m_qosOriginatorStatus.end ()); } -void +void MacRxMiddle::SetForwardCallback (ForwardUpCallback callback) { NS_LOG_FUNCTION_NOARGS (); @@ -134,17 +142,17 @@ MacRxMiddle::Lookup (const WifiMacHeader *hdr) NS_LOG_FUNCTION (hdr); OriginatorRxStatus *originator; Mac48Address source = hdr->GetAddr2 (); - if (hdr->IsQosData () && - !hdr->GetAddr2 ().IsGroup ()) + if (hdr->IsQosData () + && !hdr->GetAddr2 ().IsGroup ()) { /* only for qos data non-broadcast frames */ - originator = m_qosOriginatorStatus[std::make_pair(source, hdr->GetQosTid ())]; - if (originator == 0) + originator = m_qosOriginatorStatus[std::make_pair (source, hdr->GetQosTid ())]; + if (originator == 0) { originator = new OriginatorRxStatus (); - m_qosOriginatorStatus[std::make_pair(source, hdr->GetQosTid ())] = originator; + m_qosOriginatorStatus[std::make_pair (source, hdr->GetQosTid ())] = originator; } - } + } else { /* - management frames @@ -153,7 +161,7 @@ MacRxMiddle::Lookup (const WifiMacHeader *hdr) * see section 7.1.3.4.1 */ originator = m_originatorStatus[source]; - if (originator == 0) + if (originator == 0) { originator = new OriginatorRxStatus (); m_originatorStatus[source] = originator; @@ -163,12 +171,12 @@ MacRxMiddle::Lookup (const WifiMacHeader *hdr) } bool -MacRxMiddle::IsDuplicate (const WifiMacHeader* hdr, +MacRxMiddle::IsDuplicate (const WifiMacHeader* hdr, OriginatorRxStatus *originator) const { NS_LOG_FUNCTION (hdr << originator); - if (hdr->IsRetry () && - originator->GetLastSequenceControl () == hdr->GetSequenceControl ()) + if (hdr->IsRetry () + && originator->GetLastSequenceControl () == hdr->GetSequenceControl ()) { return true; } @@ -180,54 +188,54 @@ MacRxMiddle::HandleFragments (Ptr packet, const WifiMacHeader *hdr, OriginatorRxStatus *originator) { NS_LOG_FUNCTION (packet << hdr << originator); - if (originator->IsDeFragmenting ()) + if (originator->IsDeFragmenting ()) { - if (hdr->IsMoreFragments ()) + if (hdr->IsMoreFragments ()) { - if (originator->IsNextFragment (hdr->GetSequenceControl ())) + if (originator->IsNextFragment (hdr->GetSequenceControl ())) { - NS_LOG_DEBUG ("accumulate fragment seq="<GetSequenceNumber ()<< - ", frag="<GetFragmentNumber ()<< - ", size="<GetSize ()); + NS_LOG_DEBUG ("accumulate fragment seq=" << hdr->GetSequenceNumber () << + ", frag=" << hdr->GetFragmentNumber () << + ", size=" << packet->GetSize ()); originator->AccumulateFragment (packet); originator->SetSequenceControl (hdr->GetSequenceControl ()); - } - else + } + else { NS_LOG_DEBUG ("non-ordered fragment"); } return 0; - } - else + } + else { - if (originator->IsNextFragment (hdr->GetSequenceControl ())) + if (originator->IsNextFragment (hdr->GetSequenceControl ())) { - NS_LOG_DEBUG ("accumulate last fragment seq="<GetSequenceNumber ()<< - ", frag="<GetFragmentNumber ()<< - ", size="<GetSize ()); + NS_LOG_DEBUG ("accumulate last fragment seq=" << hdr->GetSequenceNumber () << + ", frag=" << hdr->GetFragmentNumber () << + ", size=" << hdr->GetSize ()); Ptr p = originator->AccumulateLastFragment (packet); originator->SetSequenceControl (hdr->GetSequenceControl ()); return p; - } - else + } + else { NS_LOG_DEBUG ("non-ordered fragment"); return 0; } } - } - else + } + else { - if (hdr->IsMoreFragments ()) + if (hdr->IsMoreFragments ()) { - NS_LOG_DEBUG ("accumulate first fragment seq="<GetSequenceNumber ()<< - ", frag="<GetFragmentNumber ()<< - ", size="<GetSize ()); + NS_LOG_DEBUG ("accumulate first fragment seq=" << hdr->GetSequenceNumber () << + ", frag=" << hdr->GetFragmentNumber () << + ", size=" << packet->GetSize ()); originator->AccumulateFirstFragment (packet); originator->SetSequenceControl (hdr->GetSequenceControl ()); return 0; - } - else + } + else { return packet; } @@ -242,34 +250,34 @@ MacRxMiddle::Receive (Ptr packet, const WifiMacHeader *hdr) OriginatorRxStatus *originator = Lookup (hdr); /** * The check below is really uneeded because it can fail in a lot of - * normal cases. Specifically, it is possible for sequence numbers to - * loop back to zero once they reach 0xfff0 and to go up to 0xf7f0 in - * which case the check below will report the two sequence numbers to + * normal cases. Specifically, it is possible for sequence numbers to + * loop back to zero once they reach 0xfff0 and to go up to 0xf7f0 in + * which case the check below will report the two sequence numbers to * not have the correct order relationship. * So, this check cannot be used to discard old duplicate frames. It is * thus here only for documentation purposes. */ if (!(SequenceNumber16 (originator->GetLastSequenceControl ()) < SequenceNumber16 (hdr->GetSequenceControl ()))) { - NS_LOG_DEBUG ("Sequence numbers have looped back. last recorded="<GetLastSequenceControl ()<< - " currently seen="<< hdr->GetSequenceControl ()); + NS_LOG_DEBUG ("Sequence numbers have looped back. last recorded=" << originator->GetLastSequenceControl () << + " currently seen=" << hdr->GetSequenceControl ()); } // filter duplicates. - if (IsDuplicate (hdr, originator)) + if (IsDuplicate (hdr, originator)) { - NS_LOG_DEBUG ("duplicate from="<GetAddr2 ()<< - ", seq="<GetSequenceNumber ()<< - ", frag="<GetFragmentNumber ()); + NS_LOG_DEBUG ("duplicate from=" << hdr->GetAddr2 () << + ", seq=" << hdr->GetSequenceNumber () << + ", frag=" << hdr->GetFragmentNumber ()); return; } Ptr agregate = HandleFragments (packet, hdr, originator); - if (agregate == 0) + if (agregate == 0) { return; } - NS_LOG_DEBUG ("forwarding data from="<GetAddr2 ()<< - ", seq="<GetSequenceNumber ()<< - ", frag="<GetFragmentNumber ()); + NS_LOG_DEBUG ("forwarding data from=" << hdr->GetAddr2 () << + ", seq=" << hdr->GetSequenceNumber () << + ", frag=" << hdr->GetFragmentNumber ()); if (!hdr->GetAddr1 ().IsGroup ()) { originator->SetSequenceControl (hdr->GetSequenceControl ()); diff --git a/src/wifi/model/mac-rx-middle.h b/src/wifi/model/mac-rx-middle.h index 97a4334da..c59cd8a85 100644 --- a/src/wifi/model/mac-rx-middle.h +++ b/src/wifi/model/mac-rx-middle.h @@ -3,7 +3,7 @@ * Copyright (c) 2005 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -32,6 +32,11 @@ namespace ns3 { class WifiMacHeader; class OriginatorRxStatus; +/** + * \ingroup wifi + * + * This class handles duplicate detection and recomposition of fragments. + */ class MacRxMiddle { public: @@ -45,7 +50,7 @@ public: void Receive (Ptr packet, const WifiMacHeader *hdr); private: friend class MacRxMiddleTest; - OriginatorRxStatus *Lookup (const WifiMacHeader* hdr); + OriginatorRxStatus* Lookup (const WifiMacHeader* hdr); bool IsDuplicate (const WifiMacHeader* hdr, OriginatorRxStatus *originator) const; Ptr HandleFragments (Ptr packet, const WifiMacHeader* hdr, OriginatorRxStatus *originator); diff --git a/src/wifi/model/mac-tx-middle.cc b/src/wifi/model/mac-tx-middle.cc index 2b84d7d91..14582dad3 100644 --- a/src/wifi/model/mac-tx-middle.cc +++ b/src/wifi/model/mac-tx-middle.cc @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -29,22 +29,23 @@ namespace ns3 { MacTxMiddle::MacTxMiddle () : m_sequence (0) -{} +{ +} MacTxMiddle::~MacTxMiddle () { - for (std::map::iterator i = m_qosSequences.begin(); i != m_qosSequences.end (); i++) + for (std::map::iterator i = m_qosSequences.begin (); i != m_qosSequences.end (); i++) { delete [] i->second; } } -uint16_t +uint16_t MacTxMiddle::GetNextSequenceNumberfor (const WifiMacHeader *hdr) { uint16_t retval; - if (hdr->IsQosData () && - !hdr->GetAddr1 ().IsGroup ()) + if (hdr->IsQosData () + && !hdr->GetAddr1 ().IsGroup ()) { uint8_t tid = hdr->GetQosTid (); NS_ASSERT (tid < 16); @@ -60,15 +61,15 @@ MacTxMiddle::GetNextSequenceNumberfor (const WifiMacHeader *hdr) retval = 0; std::pair newSeq (hdr->GetAddr1 (), new uint16_t[16]); std::pair ::iterator,bool> newIns = m_qosSequences.insert (newSeq); - NS_ASSERT(newIns.second == true); + NS_ASSERT (newIns.second == true); for (uint8_t i = 0; i < 16; i++) { newIns.first->second[i] = 0; } newIns.first->second[tid]++; } - } - else + } + else { retval = m_sequence; m_sequence++; diff --git a/src/wifi/model/mac-tx-middle.h b/src/wifi/model/mac-tx-middle.h index 9bccfc779..719bf1b3c 100644 --- a/src/wifi/model/mac-tx-middle.h +++ b/src/wifi/model/mac-tx-middle.h @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -31,7 +31,13 @@ namespace ns3 { class WifiMacHeader; -class MacTxMiddle { +/** + * \ingroup wifi + * + * Handles sequence numbering of IEEE 802.11 data frames + */ +class MacTxMiddle +{ public: MacTxMiddle (); ~MacTxMiddle (); diff --git a/src/wifi/model/mgt-headers.cc b/src/wifi/model/mgt-headers.cc index d69c2dc8a..051c291c3 100644 --- a/src/wifi/model/mgt-headers.cc +++ b/src/wifi/model/mgt-headers.cc @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -32,25 +32,26 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (MgtProbeRequestHeader); MgtProbeRequestHeader::~MgtProbeRequestHeader () -{} +{ +} -void +void MgtProbeRequestHeader::SetSsid (Ssid ssid) { m_ssid = ssid; } -Ssid +Ssid MgtProbeRequestHeader::GetSsid (void) const { return m_ssid; } -void +void MgtProbeRequestHeader::SetSupportedRates (SupportedRates rates) { m_rates = rates; } -SupportedRates +SupportedRates MgtProbeRequestHeader::GetSupportedRates (void) const { return m_rates; @@ -64,29 +65,29 @@ MgtProbeRequestHeader::GetSerializedSize (void) const size += m_rates.extended.GetSerializedSize (); return size; } -TypeId +TypeId MgtProbeRequestHeader::GetTypeId (void) { static TypeId tid = TypeId ("ns3::MgtProbeRequestHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } -TypeId +TypeId MgtProbeRequestHeader::GetInstanceTypeId (void) const { return GetTypeId (); } -void +void MgtProbeRequestHeader::Print (std::ostream &os) const { - os << "ssid="< () .AddConstructor () - ; + ; return tid; } -TypeId +TypeId MgtProbeResponseHeader::GetInstanceTypeId (void) const { return GetTypeId (); @@ -177,13 +180,13 @@ MgtProbeResponseHeader::GetSerializedSize (void) const // xxx return size; } -void +void MgtProbeResponseHeader::Print (std::ostream &os) const { - os << "ssid="< () .AddConstructor () - ; + ; return tid; } -TypeId +TypeId MgtAssocRequestHeader::GetInstanceTypeId (void) const { return GetTypeId (); } -uint32_t +uint32_t MgtAssocRequestHeader::GetSerializedSize (void) const { uint32_t size = 0; @@ -288,13 +293,13 @@ MgtAssocRequestHeader::GetSerializedSize (void) const size += m_rates.extended.GetSerializedSize (); return size; } -void +void MgtAssocRequestHeader::Print (std::ostream &os) const { - os << "ssid="< () .AddConstructor () - ; + ; return tid; } -TypeId +TypeId MgtAssocResponseHeader::GetInstanceTypeId (void) const { return GetTypeId (); @@ -375,13 +382,13 @@ MgtAssocResponseHeader::GetSerializedSize (void) const return size; } -void +void MgtAssocResponseHeader::Print (std::ostream &os) const { - os << "status code="< () - .AddConstructor (); + .SetParent
() + .AddConstructor (); return tid; } TypeId @@ -569,10 +576,11 @@ WifiActionHeader::Deserialize (Buffer::Iterator start) NS_OBJECT_ENSURE_REGISTERED (MgtAddBaRequestHeader); MgtAddBaRequestHeader::MgtAddBaRequestHeader () - : m_dialogToken (1), - m_amsduSupport (1), - m_bufferSize (0) -{} + : m_dialogToken (1), + m_amsduSupport (1), + m_bufferSize (0) +{ +} TypeId MgtAddBaRequestHeader::GetTypeId (void) @@ -580,7 +588,6 @@ MgtAddBaRequestHeader::GetTypeId (void) static TypeId tid = TypeId ("ns3::MgtAddBaRequestHeader") .SetParent
() .AddConstructor (); - ; return tid; } @@ -592,7 +599,8 @@ MgtAddBaRequestHeader::GetInstanceTypeId (void) const void MgtAddBaRequestHeader::Print (std::ostream &os) const -{} +{ +} uint32_t MgtAddBaRequestHeader::GetSerializedSize (void) const @@ -637,7 +645,7 @@ MgtAddBaRequestHeader::SetImmediateBlockAck () { m_policy = 1; } - + void MgtAddBaRequestHeader::SetTid (uint8_t tid) { @@ -678,7 +686,7 @@ MgtAddBaRequestHeader::GetTid (void) const bool MgtAddBaRequestHeader::IsImmediateBlockAck (void) const { - return (m_policy == 1)?true:false; + return (m_policy == 1) ? true : false; } uint16_t @@ -696,7 +704,7 @@ MgtAddBaRequestHeader::GetBufferSize (void) const bool MgtAddBaRequestHeader::IsAmsduSupported (void) const { - return (m_amsduSupport == 1)?true:false; + return (m_amsduSupport == 1) ? true : false; } uint16_t @@ -747,7 +755,8 @@ MgtAddBaResponseHeader::MgtAddBaResponseHeader () : m_dialogToken (1), m_amsduSupport (1), m_bufferSize (0) -{} +{ +} TypeId MgtAddBaResponseHeader::GetTypeId () @@ -768,7 +777,7 @@ MgtAddBaResponseHeader::GetInstanceTypeId (void) const void MgtAddBaResponseHeader::Print (std::ostream &os) const { - os <<"status code="< - * - * Some Comments: - * - * 1) Segment Size is declared for completeness but not used because it has + * + * Some Comments: + * + * 1) Segment Size is declared for completeness but not used because it has * to do more with the requirement of the specific hardware. * - * 2) By default, Minstrel applies the multi-rate retry(the core of Minstrel + * 2) By default, Minstrel applies the multi-rate retry(the core of Minstrel * algorithm). Otherwise, please use ConstantRateWifiManager instead. * * http://linuxwireless.org/en/developers/Documentation/mac80211/RateControl/minstrel @@ -55,8 +55,8 @@ struct MinstrelWifiRemoteStation : public WifiRemoteStation * then we wrap back to the row 1 col 1. * note: there are many other ways to do this. */ - uint32_t m_col, m_index; - uint32_t m_maxTpRate; ///< the current throughput rate + uint32_t m_col, m_index; + uint32_t m_maxTpRate; ///< the current throughput rate uint32_t m_maxTpRate2; ///< second highest throughput rate uint32_t m_maxProbRate; ///< rate with highest prob of success @@ -65,7 +65,7 @@ struct MinstrelWifiRemoteStation : public WifiRemoteStation bool m_isSampling; ///< a flag to indicate we are currently sampling uint32_t m_sampleRate; ///< current sample rate - bool m_sampleRateSlower; ///< a flag to indicate sample rate is slower + bool m_sampleRateSlower; ///< a flag to indicate sample rate is slower uint32_t m_currentRate; ///< current rate we are using uint32_t m_shortRetry; ///< short retries such as control packts @@ -90,12 +90,12 @@ MinstrelWifiManager::GetTypeId (void) TimeValue (Seconds (0.1)), MakeTimeAccessor (&MinstrelWifiManager::m_updateStats), MakeTimeChecker ()) - .AddAttribute ("LookAroundRate", + .AddAttribute ("LookAroundRate", "the percentage to try other rates", DoubleValue (10), MakeDoubleAccessor (&MinstrelWifiManager::m_lookAroundRate), MakeDoubleChecker ()) - .AddAttribute ("EWMA", + .AddAttribute ("EWMA", "EWMA level", DoubleValue (75), MakeDoubleAccessor (&MinstrelWifiManager::m_ewmaLevel), @@ -115,7 +115,7 @@ MinstrelWifiManager::GetTypeId (void) DoubleValue (1200), MakeDoubleAccessor (&MinstrelWifiManager::m_pktLen), MakeDoubleChecker ()) - ; + ; return tid; } @@ -125,7 +125,8 @@ MinstrelWifiManager::MinstrelWifiManager () } MinstrelWifiManager::~MinstrelWifiManager () -{} +{ +} void MinstrelWifiManager::SetupPhy (Ptr phy) @@ -157,7 +158,7 @@ MinstrelWifiManager::GetCalcTxTime (WifiMode mode) const void MinstrelWifiManager::AddCalcTxTime (WifiMode mode, Time t) { - m_calcTxTime.push_back (std::make_pair (t, mode)); + m_calcTxTime.push_back (std::make_pair (t, mode)); } WifiRemoteStation * @@ -167,13 +168,13 @@ MinstrelWifiManager::DoCreateStation (void) const station->m_nextStatsUpdate = Simulator::Now () + m_updateStats; station->m_col = 0; - station->m_index = 0; - station->m_maxTpRate = 0; - station->m_maxTpRate2 = 0; + station->m_index = 0; + station->m_maxTpRate = 0; + station->m_maxTpRate2 = 0; station->m_maxProbRate = 0; - station->m_packetCount = 0; - station->m_sampleCount = 0; - station->m_isSampling = false; + station->m_packetCount = 0; + station->m_sampleCount = 0; + station->m_isSampling = false; station->m_sampleRate = 0; station->m_sampleRateSlower = false; station->m_currentRate = 0; @@ -187,17 +188,17 @@ MinstrelWifiManager::DoCreateStation (void) const return station; } -void -MinstrelWifiManager::CheckInit(MinstrelWifiRemoteStation *station) +void +MinstrelWifiManager::CheckInit (MinstrelWifiRemoteStation *station) { if (!station->m_initialized && GetNSupported (station) > 1) { - // Note: we appear to be doing late initialization of the table + // Note: we appear to be doing late initialization of the table // to make sure that the set of supported rates has been initialized // before we perform our own initialization. m_nsupported = GetNSupported (station); - m_minstrelTable = MinstrelRate(m_nsupported); - m_sampleTable = SampleRate(m_nsupported, std::vector (m_sampleCol)); + m_minstrelTable = MinstrelRate (m_nsupported); + m_sampleTable = SampleRate (m_nsupported, std::vector (m_sampleCol)); InitSampleTable (station); RateInit (station); station->m_initialized = true; @@ -208,14 +209,14 @@ void MinstrelWifiManager::DoReportRxOk (WifiRemoteStation *st, double rxSnr, WifiMode txMode) { - NS_LOG_DEBUG("DoReportRxOk m_txrate=" << ((MinstrelWifiRemoteStation *)st)->m_txrate); + NS_LOG_DEBUG ("DoReportRxOk m_txrate=" << ((MinstrelWifiRemoteStation *)st)->m_txrate); } void MinstrelWifiManager::DoReportRtsFailed (WifiRemoteStation *st) { MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *)st; - NS_LOG_DEBUG("DoReportRtsFailed m_txrate=" << station->m_txrate); + NS_LOG_DEBUG ("DoReportRtsFailed m_txrate=" << station->m_txrate); station->m_shortRetry++; } @@ -223,7 +224,7 @@ MinstrelWifiManager::DoReportRtsFailed (WifiRemoteStation *st) void MinstrelWifiManager::DoReportRtsOk (WifiRemoteStation *st, double ctsSnr, WifiMode ctsMode, double rtsSnr) { - NS_LOG_DEBUG ("self="<m_initialized) { return; @@ -274,24 +275,24 @@ MinstrelWifiManager::DoReportDataFailed (WifiRemoteStation *st) } /// use second best throughput rate - else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + + else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + m_minstrelTable[station->m_maxTpRate].adjustedRetryCount)) { station->m_txrate = station->m_maxTpRate2; } /// use best probability rate - else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + - m_minstrelTable[station->m_maxTpRate2].adjustedRetryCount + + else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + + m_minstrelTable[station->m_maxTpRate2].adjustedRetryCount + m_minstrelTable[station->m_maxTpRate].adjustedRetryCount)) { station->m_txrate = station->m_maxProbRate; } - /// use lowest base rate - else if (station->m_longRetry > (m_minstrelTable[station->m_txrate].adjustedRetryCount + - m_minstrelTable[station->m_maxTpRate2].adjustedRetryCount + - m_minstrelTable[station->m_maxTpRate].adjustedRetryCount)) + /// use lowest base rate + else if (station->m_longRetry > (m_minstrelTable[station->m_txrate].adjustedRetryCount + + m_minstrelTable[station->m_maxTpRate2].adjustedRetryCount + + m_minstrelTable[station->m_maxTpRate].adjustedRetryCount)) { station->m_txrate = 0; } @@ -306,65 +307,65 @@ MinstrelWifiManager::DoReportDataFailed (WifiRemoteStation *st) /// use best throughput rate if (station->m_longRetry < m_minstrelTable[station->m_txrate].adjustedRetryCount) { - ; ///< there are a few retries left + ; ///< there are a few retries left } /// use random rate - else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + + else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + m_minstrelTable[station->m_maxTpRate].adjustedRetryCount)) { station->m_txrate = station->m_sampleRate; } /// use max probability rate - else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + - m_minstrelTable[station->m_sampleRate].adjustedRetryCount + + else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + + m_minstrelTable[station->m_sampleRate].adjustedRetryCount + m_minstrelTable[station->m_maxTpRate].adjustedRetryCount )) { station->m_txrate = station->m_maxProbRate; } /// use lowest base rate - else if (station->m_longRetry > (m_minstrelTable[station->m_txrate].adjustedRetryCount + - m_minstrelTable[station->m_sampleRate].adjustedRetryCount + + else if (station->m_longRetry > (m_minstrelTable[station->m_txrate].adjustedRetryCount + + m_minstrelTable[station->m_sampleRate].adjustedRetryCount + m_minstrelTable[station->m_maxTpRate].adjustedRetryCount)) { station->m_txrate = 0; } } - /// current sampling rate is better than current best rate - else - { - /// use random rate - if (station->m_longRetry < m_minstrelTable[station->m_txrate].adjustedRetryCount) - { - ; ///< keep using it - } + /// current sampling rate is better than current best rate + else + { + /// use random rate + if (station->m_longRetry < m_minstrelTable[station->m_txrate].adjustedRetryCount) + { + ; ///< keep using it + } - /// use the best rate - else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + - m_minstrelTable[station->m_sampleRate].adjustedRetryCount)) - { - station->m_txrate = station->m_maxTpRate; - } + /// use the best rate + else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + + m_minstrelTable[station->m_sampleRate].adjustedRetryCount)) + { + station->m_txrate = station->m_maxTpRate; + } - /// use the best probability rate - else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + - m_minstrelTable[station->m_maxTpRate].adjustedRetryCount + - m_minstrelTable[station->m_sampleRate].adjustedRetryCount)) - { - station->m_txrate = station->m_maxProbRate; - } + /// use the best probability rate + else if (station->m_longRetry <= (m_minstrelTable[station->m_txrate].adjustedRetryCount + + m_minstrelTable[station->m_maxTpRate].adjustedRetryCount + + m_minstrelTable[station->m_sampleRate].adjustedRetryCount)) + { + station->m_txrate = station->m_maxProbRate; + } - /// use the lowest base rate - else if (station->m_longRetry > (m_minstrelTable[station->m_txrate].adjustedRetryCount + - m_minstrelTable[station->m_maxTpRate].adjustedRetryCount + - m_minstrelTable[station->m_sampleRate].adjustedRetryCount)) - { - station->m_txrate = 0; - } - } + /// use the lowest base rate + else if (station->m_longRetry > (m_minstrelTable[station->m_txrate].adjustedRetryCount + + m_minstrelTable[station->m_maxTpRate].adjustedRetryCount + + m_minstrelTable[station->m_sampleRate].adjustedRetryCount)) + { + station->m_txrate = 0; + } + } } } @@ -375,7 +376,7 @@ MinstrelWifiManager::DoReportDataOk (WifiRemoteStation *st, MinstrelWifiRemoteStation *station = (MinstrelWifiRemoteStation *) st; station->m_isSampling = false; - station->m_sampleRateSlower=false; + station->m_sampleRateSlower = false; CheckInit (station); if (!station->m_initialized) @@ -385,7 +386,7 @@ MinstrelWifiManager::DoReportDataOk (WifiRemoteStation *st, m_minstrelTable[station->m_txrate].numRateSuccess++; m_minstrelTable[station->m_txrate].numRateAttempt++; - + UpdateRetry (station); m_minstrelTable[station->m_txrate].numRateAttempt += station->m_retry; @@ -404,7 +405,7 @@ MinstrelWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st) NS_LOG_DEBUG ("DoReportFinalDataFailed m_txrate=" << station->m_txrate); station->m_isSampling = false; - station->m_sampleRateSlower=false; + station->m_sampleRateSlower = false; UpdateRetry (station); @@ -450,12 +451,12 @@ MinstrelWifiManager::DoGetRtsMode (WifiRemoteStation *st) return GetSupported (station, 0); } -bool +bool MinstrelWifiManager::IsLowLatency (void) const { return true; } -uint32_t +uint32_t MinstrelWifiManager::GetNextSample (MinstrelWifiRemoteStation *station) { uint32_t bitrate; @@ -463,9 +464,9 @@ MinstrelWifiManager::GetNextSample (MinstrelWifiRemoteStation *station) station->m_index++; /// bookeeping for m_index and m_col variables - if (station->m_index > (m_nsupported - 2)) + if (station->m_index > (m_nsupported - 2)) { - station->m_index =0; + station->m_index = 0; station->m_col++; if (station->m_col >= m_sampleCol) { @@ -488,29 +489,29 @@ MinstrelWifiManager::FindRate (MinstrelWifiRemoteStation *station) uint32_t idx; - /// for determining when to try a sample rate + /// for determining when to try a sample rate UniformVariable coinFlip (0, 100); /** * if we are below the target of look around rate percentage, look around - * note: do it randomly by flipping a coin instead sampling + * note: do it randomly by flipping a coin instead sampling * all at once until it reaches the look around rate */ - if ( (((100* station->m_sampleCount) / (station->m_sampleCount + station->m_packetCount )) < m_lookAroundRate) && - ((int)coinFlip.GetValue ()) % 2 == 1 ) + if ( (((100 * station->m_sampleCount) / (station->m_sampleCount + station->m_packetCount )) < m_lookAroundRate) + && ((int)coinFlip.GetValue ()) % 2 == 1 ) { /// now go through the table and find an index rate - idx = GetNextSample(station); - - + idx = GetNextSample (station); + + /** * This if condition is used to make sure that we don't need to use * the sample rate it is the same as our current rate */ - if (idx != station->m_maxTpRate && idx != station->m_txrate) + if (idx != station->m_maxTpRate && idx != station->m_txrate) { - + /// start sample count station->m_sampleCount++; @@ -518,7 +519,7 @@ MinstrelWifiManager::FindRate (MinstrelWifiRemoteStation *station) station->m_isSampling = true; /// bookeeping for resetting stuff - if (station->m_packetCount >= 10000) + if (station->m_packetCount >= 10000) { station->m_sampleCount = 0; station->m_packetCount = 0; @@ -539,7 +540,7 @@ MinstrelWifiManager::FindRate (MinstrelWifiRemoteStation *station) } /// is this rate slower than the current best rate - station->m_sampleRateSlower = + station->m_sampleRateSlower = (m_minstrelTable[idx].perfectTxTime > m_minstrelTable[station->m_maxTpRate].perfectTxTime); /// using the best rate instead @@ -548,13 +549,13 @@ MinstrelWifiManager::FindRate (MinstrelWifiRemoteStation *station) idx = station->m_maxTpRate; } } - - } + + } /// continue using the best rate else { - idx = station->m_maxTpRate; + idx = station->m_maxTpRate; } @@ -575,18 +576,18 @@ MinstrelWifiManager::UpdateStats (MinstrelWifiRemoteStation *station) { return; } - NS_LOG_DEBUG ("Updating stats="<m_txrate = index_max_tp; } - NS_LOG_DEBUG ("max tp="<< index_max_tp << "\nmax tp2="<< index_max_tp2<< "\nmax prob="<< index_max_prob); + NS_LOG_DEBUG ("max tp=" << index_max_tp << "\nmax tp2=" << index_max_tp2 << "\nmax prob=" << index_max_prob); /// reset it RateInit (station); @@ -706,7 +707,7 @@ MinstrelWifiManager::UpdateStats (MinstrelWifiRemoteStation *station) void MinstrelWifiManager::RateInit (MinstrelWifiRemoteStation *station) { - NS_LOG_DEBUG ("RateInit="< + * + * Author: Duy Nguyen */ @@ -28,13 +28,6 @@ #include "ns3/nstime.h" #include -/** - * \author Duy Nguyen - * \brief Implementation of Minstrel Rate Control Algorithm - * - * Porting Minstrel from Madwifi and Linux Kernel - * http://linuxwireless.org/en/developers/Documentation/mac80211/RateControl/minstrel - */ namespace ns3 { @@ -56,7 +49,7 @@ struct RateInfo uint32_t retryCount; ///< retry limit uint32_t adjustedRetryCount; ///< adjust the retry limit for this rate uint32_t numRateAttempt; ///< how many number of attempts so far - uint32_t numRateSuccess; ///< number of successful pkts + uint32_t numRateSuccess; ///< number of successful pkts uint32_t prob; ///< (# pkts success )/(# total pkts) /** @@ -85,21 +78,28 @@ typedef std::vector MinstrelRate; typedef std::vector > SampleRate; - +/** + * \author Duy Nguyen + * \brief Implementation of Minstrel Rate Control Algorithm + * \ingroup wifi + * + * Porting Minstrel from Madwifi and Linux Kernel + * http://linuxwireless.org/en/developers/Documentation/mac80211/RateControl/minstrel + */ class MinstrelWifiManager : public WifiRemoteStationManager { public: static TypeId GetTypeId (void); MinstrelWifiManager (); - virtual ~MinstrelWifiManager(); + virtual ~MinstrelWifiManager (); virtual void SetupPhy (Ptr phy); private: // overriden from base class - virtual WifiRemoteStation *DoCreateStation (void) const; - virtual void DoReportRxOk (WifiRemoteStation *station, + virtual WifiRemoteStation * DoCreateStation (void) const; + virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode); virtual void DoReportRtsFailed (WifiRemoteStation *station); virtual void DoReportDataFailed (WifiRemoteStation *station); @@ -113,7 +113,7 @@ private: virtual WifiMode DoGetRtsMode (WifiRemoteStation *station); virtual bool IsLowLatency (void) const; - /// for estimating the TxTime of a packet with a given mode + /// for estimating the TxTime of a packet with a given mode Time GetCalcTxTime (WifiMode mode) const; void AddCalcTxTime (WifiMode mode, Time t); @@ -151,14 +151,14 @@ private: TxTime m_calcTxTime; ///< to hold all the calculated TxTime for all modes Time m_updateStats; ///< how frequent do we calculate the stats(1/10 seconds) - double m_lookAroundRate; ///< the % to try other rates than our current rate + double m_lookAroundRate; ///< the % to try other rates than our current rate double m_ewmaLevel; ///< exponential weighted moving average uint32_t m_segmentSize; ///< largest allowable segment size uint32_t m_sampleCol; ///< number of sample columns - uint32_t m_pktLen; ///< packet length used for calculate mode TxTime + uint32_t m_pktLen; ///< packet length used for calculate mode TxTime uint32_t m_nsupported; ///< modes supported }; -}// namespace ns3 +} // namespace ns3 #endif /* MINSTREL_WIFI_MANAGER_H */ diff --git a/src/wifi/model/msdu-aggregator.cc b/src/wifi/model/msdu-aggregator.cc index 889fca23f..20f48a4d3 100644 --- a/src/wifi/model/msdu-aggregator.cc +++ b/src/wifi/model/msdu-aggregator.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -33,7 +33,7 @@ MsduAggregator::GetTypeId (void) { static TypeId tid = TypeId ("ns3::MsduAggregator") .SetParent () - ; + ; return tid; } @@ -42,7 +42,7 @@ MsduAggregator::Deaggregate (Ptr aggregatedPacket) { NS_LOG_FUNCTION_NOARGS (); DeaggregatedMsdus set; - + AmsduSubframeHeader hdr; Ptr extractedMsdu = Create (); uint32_t maxSize = aggregatedPacket->GetSize (); @@ -51,25 +51,25 @@ MsduAggregator::Deaggregate (Ptr aggregatedPacket) uint32_t deserialized = 0; while (deserialized < maxSize) - { - deserialized += aggregatedPacket->RemoveHeader (hdr); - extractedLength = hdr.GetLength (); - extractedMsdu = aggregatedPacket->CreateFragment (0, static_cast(extractedLength)); - aggregatedPacket->RemoveAtStart (extractedLength); - deserialized += extractedLength; - - padding = (4 - ((extractedLength + 14) %4 )) % 4; - - if (padding > 0 && deserialized < maxSize) - { - aggregatedPacket->RemoveAtStart (padding); - deserialized += padding; - } - - std::pair, AmsduSubframeHeader> packetHdr (extractedMsdu, hdr); - set.push_back (packetHdr); - } - NS_LOG_INFO ("Deaggreated A-MSDU: extracted "<< set.size () << " MSDUs"); + { + deserialized += aggregatedPacket->RemoveHeader (hdr); + extractedLength = hdr.GetLength (); + extractedMsdu = aggregatedPacket->CreateFragment (0, static_cast (extractedLength)); + aggregatedPacket->RemoveAtStart (extractedLength); + deserialized += extractedLength; + + padding = (4 - ((extractedLength + 14) % 4 )) % 4; + + if (padding > 0 && deserialized < maxSize) + { + aggregatedPacket->RemoveAtStart (padding); + deserialized += padding; + } + + std::pair, AmsduSubframeHeader> packetHdr (extractedMsdu, hdr); + set.push_back (packetHdr); + } + NS_LOG_INFO ("Deaggreated A-MSDU: extracted " << set.size () << " MSDUs"); return set; } diff --git a/src/wifi/model/msdu-aggregator.h b/src/wifi/model/msdu-aggregator.h index 6afaa8475..709ac8437 100644 --- a/src/wifi/model/msdu-aggregator.h +++ b/src/wifi/model/msdu-aggregator.h @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -29,10 +29,12 @@ #include namespace ns3 { - + class WifiMacHeader; + /** * \brief Abstract class that concrete msdu aggregators have to implement + * \ingroup wifi */ class MsduAggregator : public Object { @@ -41,7 +43,7 @@ public: typedef std::list, AmsduSubframeHeader> >::const_iterator DeaggregatedMsdusCI; static TypeId GetTypeId (void); - /* Adds packet to aggregatedPacket. In concrete aggregator's implementation is + /* Adds packet to aggregatedPacket. In concrete aggregator's implementation is * specified how and if packet can be added to aggregatedPacket. If packet * can be added returns true, false otherwise. */ diff --git a/src/wifi/model/msdu-standard-aggregator.cc b/src/wifi/model/msdu-standard-aggregator.cc index aaac7ca9f..6e6560ccb 100644 --- a/src/wifi/model/msdu-standard-aggregator.cc +++ b/src/wifi/model/msdu-standard-aggregator.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -39,15 +39,17 @@ MsduStandardAggregator::GetTypeId (void) UintegerValue (7935), MakeUintegerAccessor (&MsduStandardAggregator::m_maxAmsduLength), MakeUintegerChecker ()) - ; + ; return tid; } -MsduStandardAggregator::MsduStandardAggregator () -{} +MsduStandardAggregator::MsduStandardAggregator () +{ +} MsduStandardAggregator::~MsduStandardAggregator () -{} +{ +} bool MsduStandardAggregator::Aggregate (Ptr packet, Ptr aggregatedPacket, @@ -59,7 +61,7 @@ MsduStandardAggregator::Aggregate (Ptr packet, Ptr aggrega uint32_t padding = CalculatePadding (aggregatedPacket); uint32_t actualSize = aggregatedPacket->GetSize (); - + if ((14 + packet->GetSize () + actualSize + padding) <= m_maxAmsduLength) { if (padding) @@ -71,7 +73,7 @@ MsduStandardAggregator::Aggregate (Ptr packet, Ptr aggrega currentHdr.SetSourceAddr (src); currentHdr.SetLength (packet->GetSize ()); currentPacket = packet->Copy (); - + currentPacket->AddHeader (currentHdr); aggregatedPacket->AddAtEnd (currentPacket); return true; @@ -82,7 +84,7 @@ MsduStandardAggregator::Aggregate (Ptr packet, Ptr aggrega uint32_t MsduStandardAggregator::CalculatePadding (Ptr packet) { - return (4 - (packet->GetSize() %4 )) % 4; + return (4 - (packet->GetSize () % 4 )) % 4; } } //namespace ns3 diff --git a/src/wifi/model/msdu-standard-aggregator.h b/src/wifi/model/msdu-standard-aggregator.h index fc4969c4f..abba6587f 100644 --- a/src/wifi/model/msdu-standard-aggregator.h +++ b/src/wifi/model/msdu-standard-aggregator.h @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -24,21 +24,25 @@ namespace ns3 { +/** + * \ingroup wifi + * Standard MSDU aggregator + * + */ class MsduStandardAggregator : public MsduAggregator { public: - static TypeId GetTypeId (void); MsduStandardAggregator (); ~MsduStandardAggregator (); /** * \param packet Packet we have to insert into aggregatedPacket. - * \param aggregatedPacket Packet that will contain packet, if aggregation is possible, + * \param aggregatedPacket Packet that will contain packet, if aggregation is possible, * \param src Source address of packet. * \param dest Destination address of packet. - * + * * This method performs an MSDU aggregation. - * Returns true if packet can be aggregated to aggregatedPacket, false otherwise. + * Returns true if packet can be aggregated to aggregatedPacket, false otherwise. */ virtual bool Aggregate (Ptr packet, Ptr aggregatedPacket, Mac48Address src, Mac48Address dest); diff --git a/src/wifi/model/nist-error-rate-model.cc b/src/wifi/model/nist-error-rate-model.cc index a0c6d97ec..362fc9986 100644 --- a/src/wifi/model/nist-error-rate-model.cc +++ b/src/wifi/model/nist-error-rate-model.cc @@ -3,7 +3,7 @@ * Copyright (c) 2010 The Boeing Company * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -27,7 +27,7 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (NistErrorRateModel); -TypeId +TypeId NistErrorRateModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::NistErrorRateModel") @@ -44,41 +44,41 @@ NistErrorRateModel::NistErrorRateModel () double NistErrorRateModel::GetBpskBer (double snr) const { - double z = sqrt(snr); - double ber = 0.5 * erfc(z); - NS_LOG_INFO ("bpsk snr="<m_tx_ok << " err " << station->m_tx_err << " retr " << station->m_tx_retr << " upper " << station->m_tx_upper << " dir " << dir); nrate = station->m_txrate; - switch (dir) { - case 0: - if (enough && station->m_tx_upper > 0) - station->m_tx_upper--; - break; - case -1: - if (nrate > 0) { - nrate--; - } - station->m_tx_upper = 0; - break; - case 1: - /* raise rate if we hit rate_raise_threshold */ - if (++station->m_tx_upper < m_raiseThreshold) + switch (dir) + { + case 0: + if (enough && station->m_tx_upper > 0) + { + station->m_tx_upper--; + } + break; + case - 1: + if (nrate > 0) + { + nrate--; + } + station->m_tx_upper = 0; + break; + case 1: + /* raise rate if we hit rate_raise_threshold */ + if (++station->m_tx_upper < m_raiseThreshold) + { + break; + } + station->m_tx_upper = 0; + if (nrate + 1 < GetNSupported (station)) + { + nrate++; + } break; - station->m_tx_upper = 0; - if (nrate + 1 < GetNSupported (station)) { - nrate++; } - break; - } - if (nrate != station->m_txrate) { - NS_ASSERT (nrate < GetNSupported (station)); - station->m_txrate = nrate; - station->m_tx_ok = station->m_tx_err = station->m_tx_retr = station->m_tx_upper = 0; - } else if (enough) - station->m_tx_ok = station->m_tx_err = station->m_tx_retr = 0; + if (nrate != station->m_txrate) + { + NS_ASSERT (nrate < GetNSupported (station)); + station->m_txrate = nrate; + station->m_tx_ok = station->m_tx_err = station->m_tx_retr = station->m_tx_upper = 0; + } + else if (enough) + { + station->m_tx_ok = station->m_tx_err = station->m_tx_retr = 0; + } } -WifiMode +WifiMode OnoeWifiManager::DoGetDataMode (WifiRemoteStation *st, - uint32_t size) + uint32_t size) { OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; UpdateMode (station); @@ -242,7 +262,7 @@ OnoeWifiManager::DoGetDataMode (WifiRemoteStation *st, } return GetSupported (station, rateIndex); } -WifiMode +WifiMode OnoeWifiManager::DoGetRtsMode (WifiRemoteStation *st) { OnoeWifiRemoteStation *station = (OnoeWifiRemoteStation *)st; @@ -251,7 +271,7 @@ OnoeWifiManager::DoGetRtsMode (WifiRemoteStation *st) return GetSupported (station, 0); } -bool +bool OnoeWifiManager::IsLowLatency (void) const { return false; diff --git a/src/wifi/model/onoe-wifi-manager.h b/src/wifi/model/onoe-wifi-manager.h index cc7a56bfb..2d1e82165 100644 --- a/src/wifi/model/onoe-wifi-manager.h +++ b/src/wifi/model/onoe-wifi-manager.h @@ -3,7 +3,7 @@ * Copyright (c) 2003,2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -28,9 +28,11 @@ namespace ns3 { struct OnoeWifiRemoteStation; /** - * \brief an implementation of rate control algorithm developed + * \brief an implementation of the rate control algorithm developed * by Atsushi Onoe * + * \ingroup wifi + * * This algorithm is well known because it has been used as the default * rate control algorithm for the madwifi driver. I am not aware of * any publication or reference about this algorithm beyond the madwifi @@ -45,8 +47,8 @@ public: private: // overriden from base class - virtual WifiRemoteStation *DoCreateStation (void) const; - virtual void DoReportRxOk (WifiRemoteStation *station, + virtual WifiRemoteStation * DoCreateStation (void) const; + virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode); virtual void DoReportRtsFailed (WifiRemoteStation *station); virtual void DoReportDataFailed (WifiRemoteStation *station); diff --git a/src/wifi/model/originator-block-ack-agreement.cc b/src/wifi/model/originator-block-ack-agreement.cc index 5b2612c9b..fcba89115 100644 --- a/src/wifi/model/originator-block-ack-agreement.cc +++ b/src/wifi/model/originator-block-ack-agreement.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009, 2010 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -27,15 +27,18 @@ OriginatorBlockAckAgreement::OriginatorBlockAckAgreement () m_state (PENDING), m_sentMpdus (0), m_needBlockAckReq (false) -{} +{ +} OriginatorBlockAckAgreement::OriginatorBlockAckAgreement (Mac48Address recipient, uint8_t tid) : BlockAckAgreement (recipient, tid), m_state (PENDING), m_sentMpdus (0), m_needBlockAckReq (false) -{} +{ +} OriginatorBlockAckAgreement::~OriginatorBlockAckAgreement () -{} +{ +} void OriginatorBlockAckAgreement::SetState (enum State state) { @@ -49,22 +52,22 @@ OriginatorBlockAckAgreement::SetState (enum State state) bool OriginatorBlockAckAgreement::IsPending (void) const { - return (m_state == PENDING)?true:false; + return (m_state == PENDING) ? true : false; } bool OriginatorBlockAckAgreement::IsEstablished (void) const { - return (m_state == ESTABLISHED)?true:false; + return (m_state == ESTABLISHED) ? true : false; } bool OriginatorBlockAckAgreement::IsInactive (void) const { - return (m_state == INACTIVE)?true:false; + return (m_state == INACTIVE) ? true : false; } bool OriginatorBlockAckAgreement::IsUnsuccessful (void) const { - return (m_state == UNSUCCESSFUL)?true:false; + return (m_state == UNSUCCESSFUL) ? true : false; } void OriginatorBlockAckAgreement::NotifyMpduTransmission (uint16_t nextSeqNumber) diff --git a/src/wifi/model/originator-block-ack-agreement.h b/src/wifi/model/originator-block-ack-agreement.h index 22799cc23..26da1f5af 100644 --- a/src/wifi/model/originator-block-ack-agreement.h +++ b/src/wifi/model/originator-block-ack-agreement.h @@ -3,7 +3,7 @@ * Copyright (c) 2009, 2010 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -25,8 +25,10 @@ namespace ns3 { -/* \brief Maintains the state and information about transmitted MPDUs with ack policy block ack - * for an originator station. +/** + * \ingroup wifi + * Maintains the state and information about transmitted MPDUs with ack policy block ack + * for an originator station. */ class OriginatorBlockAckAgreement : public BlockAckAgreement { @@ -46,45 +48,46 @@ public: * --------------- blockAckThreshold / | | | blockAckThreshold * | UNSUCCESSFUL | / | | | * --------------- v | ----------| - * -------------- | - * | INACTIVE | | + * -------------- | + * | INACTIVE | | * -------------- | * send a MPDU (Normal Ack) | | * retryPkts + queuePkts | | * >= | | * blockAckThreshold |---------------- - */ - /** - * Represents the state for this agreement. - * - * PENDING: - * If an agreement is in PENDING state it means that an ADDBARequest frame was sent to - * recipient in order to setup the block ack and the originator is waiting for the relative - * ADDBAResponse frame. - * - * ESTABLISHED: - * The block ack is active and all packets relative to this agreement are transmitted - * with ack policy set to block ack. - * - * INACTIVE: - * In our implementation, block ack tear-down happens only if an inactivity timeout occurs - * so we could have an active block ack but a number of packets that doesn't reach the value of - * m_blockAckThreshold (see ns3::BlockAckManager). In these conditions the agreement becomes - * INACTIVE until that the number of packets reaches the value of m_blockAckThreshold again. - * - * UNSUCCESSFUL (not used for now): - * The agreement's state becomes UNSUCCESSFUL if: - * - * - its previous state was PENDING and an ADDBAResponse frame wasn't received from - * recipient station within an interval of time defined by m_bAckSetupTimeout attribute - * in ns3::WifiMac. - * - an ADDBAResponse frame is received from recipient and the Status Code field is set - * to failure. - * - * In both cases for station addressed by BlockAckAgreement::m_peer and for - * TID BlockAckAgreement::m_tid block ack mechanism won't be used. */ - enum State { + /** + * Represents the state for this agreement. + * + * PENDING: + * If an agreement is in PENDING state it means that an ADDBARequest frame was sent to + * recipient in order to setup the block ack and the originator is waiting for the relative + * ADDBAResponse frame. + * + * ESTABLISHED: + * The block ack is active and all packets relative to this agreement are transmitted + * with ack policy set to block ack. + * + * INACTIVE: + * In our implementation, block ack tear-down happens only if an inactivity timeout occurs + * so we could have an active block ack but a number of packets that doesn't reach the value of + * m_blockAckThreshold (see ns3::BlockAckManager). In these conditions the agreement becomes + * INACTIVE until that the number of packets reaches the value of m_blockAckThreshold again. + * + * UNSUCCESSFUL (not used for now): + * The agreement's state becomes UNSUCCESSFUL if: + * + * - its previous state was PENDING and an ADDBAResponse frame wasn't received from + * recipient station within an interval of time defined by m_bAckSetupTimeout attribute + * in ns3::WifiMac. + * - an ADDBAResponse frame is received from recipient and the Status Code field is set + * to failure. + * + * In both cases for station addressed by BlockAckAgreement::m_peer and for + * TID BlockAckAgreement::m_tid block ack mechanism won't be used. + */ + enum State + { PENDING, ESTABLISHED, INACTIVE, diff --git a/src/wifi/model/qos-blocked-destinations.cc b/src/wifi/model/qos-blocked-destinations.cc index 0bc06dac2..7220c57ef 100644 --- a/src/wifi/model/qos-blocked-destinations.cc +++ b/src/wifi/model/qos-blocked-destinations.cc @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -23,10 +23,12 @@ namespace ns3 { QosBlockedDestinations::QosBlockedDestinations () -{} +{ +} QosBlockedDestinations::~QosBlockedDestinations () -{} +{ +} bool QosBlockedDestinations::IsBlocked (Mac48Address dest, uint8_t tid) const diff --git a/src/wifi/model/qos-blocked-destinations.h b/src/wifi/model/qos-blocked-destinations.h index 35b2cf45f..10f60998e 100644 --- a/src/wifi/model/qos-blocked-destinations.h +++ b/src/wifi/model/qos-blocked-destinations.h @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, diff --git a/src/wifi/model/qos-tag.cc b/src/wifi/model/qos-tag.cc index 32d2ccd08..97ab79219 100644 --- a/src/wifi/model/qos-tag.cc +++ b/src/wifi/model/qos-tag.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -25,7 +25,7 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (QosTag); -TypeId +TypeId QosTag::GetTypeId (void) { static TypeId tid = TypeId ("ns3::QosTag") @@ -35,7 +35,7 @@ QosTag::GetTypeId (void) UintegerValue (0), MakeUintegerAccessor (&QosTag::GetTid), MakeUintegerChecker ()) - ; + ; return tid; } @@ -45,13 +45,15 @@ QosTag::GetInstanceTypeId (void) const return GetTypeId (); } -QosTag::QosTag (): - m_tid (0) -{} -QosTag::QosTag (uint8_t tid): - m_tid (tid) -{} - +QosTag::QosTag () + : m_tid (0) +{ +} +QosTag::QosTag (uint8_t tid) + : m_tid (tid) +{ +} + void QosTag::SetTid (uint8_t tid) { @@ -64,7 +66,7 @@ QosTag::SetUserPriority (UserPriority up) m_tid = up; } -uint32_t +uint32_t QosTag::GetSerializedSize (void) const { return 1; diff --git a/src/wifi/model/qos-tag.h b/src/wifi/model/qos-tag.h index 6e70702fa..c53e3e452 100644 --- a/src/wifi/model/qos-tag.h +++ b/src/wifi/model/qos-tag.h @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -36,7 +36,8 @@ class Tag; * case the mapping between UPs and TIDs should be determined by a * TSPEC element as per IEEE Std. 802.11-2007, Section 7.3.2.30 */ -enum UserPriority { +enum UserPriority +{ UP_BK = 1, /**< background */ UP_BE = 0, /**< best effort (default) */ UP_EE = 3, /**< excellent effort */ @@ -45,50 +46,52 @@ enum UserPriority { UP_VO = 6, /**< voice, < 10ms latency and jitter */ UP_NC = 7 /**< network control */ }; - - - /** - * The aim of the QosTag is to provide means for an Application to - * specify the TID which will be used by a QoS-aware WifiMac for a - * given traffic flow. Note that the current QosTag class was - * designed to be completely mac/wifi specific without any attempt - * at being generic. - */ + + +/** + * \ingroup wifi + * + * The aim of the QosTag is to provide means for an Application to + * specify the TID which will be used by a QoS-aware WifiMac for a + * given traffic flow. Note that the current QosTag class was + * designed to be completely mac/wifi specific without any attempt + * at being generic. + */ class QosTag : public Tag { public: static TypeId GetTypeId (void); virtual TypeId GetInstanceTypeId (void) const; - /** - * Create a QosTag with the default TID = 0 (best effort traffic) - */ + /** + * Create a QosTag with the default TID = 0 (best effort traffic) + */ QosTag (); - /** - * Create a QosTag with the given TID - */ + /** + * Create a QosTag with the given TID + */ QosTag (uint8_t tid); - /** + /** * Set the TID to the given value. This assumes that the * application is aware of the QoS support provided by the MAC - * layer, and is therefore able to set the correct TID. - * + * layer, and is therefore able to set the correct TID. + * * @param tid the value of the TID to set */ void SetTid (uint8_t tid); - /** + /** * Set the TID to the value that corresponds to the requested * UserPriority. Note that, since the mapping of UserPriority to TID * is defined for EDCA only, you should call this method only when * EDCA is used. When using HDCA, QosTag(uint8_t tid) should be used * instead. - * + * * @param up the requested UserPriority - * + * */ void SetUserPriority (UserPriority up); diff --git a/src/wifi/model/qos-utils.cc b/src/wifi/model/qos-utils.cc index 5ddb9daee..148be49ab 100644 --- a/src/wifi/model/qos-utils.cc +++ b/src/wifi/model/qos-utils.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -26,32 +26,33 @@ namespace ns3 { AcIndex QosUtilsMapTidToAc (uint8_t tid) { - switch (tid) { - case 0 : - return AC_BE; - break; - case 1 : - return AC_BK; - break; - case 2 : - return AC_BK; - break; - case 3 : - return AC_BE; - break; - case 4 : - return AC_VI; - break; - case 5 : - return AC_VI; - break; - case 6 : - return AC_VO; - break; - case 7 : - return AC_VO; - break; - } + switch (tid) + { + case 0: + return AC_BE; + break; + case 1: + return AC_BK; + break; + case 2: + return AC_BK; + break; + case 3: + return AC_BE; + break; + case 4: + return AC_VI; + break; + case 5: + return AC_VI; + break; + case 6: + return AC_VO; + break; + case 7: + return AC_VO; + break; + } return AC_UNDEF; } @@ -74,11 +75,11 @@ uint32_t QosUtilsMapSeqControlToUniqueInteger (uint16_t seqControl, uint16_t endSequence) { uint32_t integer = 0; - uint16_t numberSeq = (seqControl>>4) & 0x0fff; + uint16_t numberSeq = (seqControl >> 4) & 0x0fff; integer = (4096 - (endSequence + 1) + numberSeq) % 4096; integer *= 16; integer += (seqControl & 0x000f); - return integer; + return integer; } bool diff --git a/src/wifi/model/qos-utils.h b/src/wifi/model/qos-utils.h index a5d78e652..7aa58bdf4 100644 --- a/src/wifi/model/qos-utils.h +++ b/src/wifi/model/qos-utils.h @@ -3,7 +3,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -26,11 +26,14 @@ namespace ns3 { -/* This enumeration defines the Access Categories as an enumeration +/** + * \ingroup wifi + * This enumeration defines the Access Categories as an enumeration * with values corresponding to the AC index (ACI) values specified in * Table 7-36 of IEEE 802.11-2007. */ -enum AcIndex { +enum AcIndex +{ /** Best Effort */ AC_BE = 0, /** Background */ @@ -45,24 +48,30 @@ enum AcIndex { AC_UNDEF }; -/* Maps TID (Traffic ID) to Access classes. +/** + * \ingroup wifi + * Maps TID (Traffic ID) to Access classes. * For more details see table 9-1 of IEEE802.11 standard. */ AcIndex QosUtilsMapTidToAc (uint8_t tid); -/* If a qos tag is attached to the packet, returns a value < 8. - A value >= 8 is returned otherwise. +/** + * \ingroup wifi + * If a qos tag is attached to the packet, returns a value < 8. + * A value >= 8 is returned otherwise. */ uint8_t QosUtilsGetTidForPacket (Ptr packet); -/* +/** + * \ingroup wifi * Next function is useful to correctly sort buffered packets under block ack. * When an BAR is received from originator station, completed "old" * (see section 9.10.3 in IEEE802.11e) packets must be forwarded up before "new" packets. */ uint32_t QosUtilsMapSeqControlToUniqueInteger (uint16_t seqControl, uint16_t endSequence); -/* +/** + * \ingroup wifi * This function checks if packet with sequence number seqNumber is an "old" packet. * The sequence number space is considered divided into two parts, one of which is "old" and * one of which is "new" by means of a boundary created by adding half the sequence number @@ -72,7 +81,7 @@ uint32_t QosUtilsMapSeqControlToUniqueInteger (uint16_t seqControl, uint16_t end * * ----- = old packets * +++++ = new packets - * + * * CASE A: * * 0 4095 @@ -82,7 +91,7 @@ uint32_t QosUtilsMapSeqControlToUniqueInteger (uint16_t seqControl, uint16_t end * * * CASE B: - * + * * 0 4095 * |------|++++++++++++++++|-----| * ^ ^ diff --git a/src/wifi/model/random-stream.cc b/src/wifi/model/random-stream.cc index 3542454cd..34ba66c14 100644 --- a/src/wifi/model/random-stream.cc +++ b/src/wifi/model/random-stream.cc @@ -3,7 +3,7 @@ * Copyright (c) 2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -25,26 +25,28 @@ namespace ns3 { RandomStream::~RandomStream () -{} +{ +} RealRandomStream::RealRandomStream () : m_stream (UniformVariable ()) -{} -uint32_t +{ +} +uint32_t RealRandomStream::GetNext (uint32_t min, uint32_t max) { return m_stream.GetInteger (min, max); } -void +void TestRandomStream::AddNext (uint32_t v) { m_nexts.push_back (v); } -uint32_t +uint32_t TestRandomStream::GetNext (uint32_t min, uint32_t max) { NS_ASSERT (!m_nexts.empty ()); diff --git a/src/wifi/model/random-stream.h b/src/wifi/model/random-stream.h index 2a3335485..b72bfae11 100644 --- a/src/wifi/model/random-stream.h +++ b/src/wifi/model/random-stream.h @@ -3,7 +3,7 @@ * Copyright (c) 2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -27,7 +27,7 @@ namespace ns3 { /** - * A simple wrapper around RngStream to make testing + * A simple wrapper around RngStream to make testing * of the code easier. */ class RandomStream diff --git a/src/wifi/model/regular-wifi-mac.cc b/src/wifi/model/regular-wifi-mac.cc index e059fe31c..2ae2bf0b4 100644 --- a/src/wifi/model/regular-wifi-mac.cc +++ b/src/wifi/model/regular-wifi-mac.cc @@ -153,7 +153,7 @@ RegularWifiMac::SetupEdcaQueue (enum AcIndex ac) edca->SetTxFailedCallback (MakeCallback (&RegularWifiMac::TxFailed, this)); edca->SetAccessCategory (ac); edca->CompleteConfig (); - m_edca.insert (std::make_pair(ac, edca)); + m_edca.insert (std::make_pair (ac, edca)); } void @@ -447,7 +447,7 @@ RegularWifiMac::Receive (Ptr packet, const WifiMacHeader *hdr) { case WifiActionHeader::BLOCK_ACK: - switch (actionHdr.GetAction().blockAck) + switch (actionHdr.GetAction ().blockAck) { case WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST: { @@ -607,22 +607,22 @@ RegularWifiMac::GetTypeId (void) .AddAttribute ("VO_EdcaTxopN", "Queue that manages packets belonging to AC_VO access class", PointerValue (), - MakePointerAccessor(&RegularWifiMac::GetVOQueue), + MakePointerAccessor (&RegularWifiMac::GetVOQueue), MakePointerChecker ()) .AddAttribute ("VI_EdcaTxopN", "Queue that manages packets belonging to AC_VI access class", PointerValue (), - MakePointerAccessor(&RegularWifiMac::GetVIQueue), + MakePointerAccessor (&RegularWifiMac::GetVIQueue), MakePointerChecker ()) .AddAttribute ("BE_EdcaTxopN", "Queue that manages packets belonging to AC_BE access class", PointerValue (), - MakePointerAccessor(&RegularWifiMac::GetBEQueue), + MakePointerAccessor (&RegularWifiMac::GetBEQueue), MakePointerChecker ()) .AddAttribute ("BK_EdcaTxopN", "Queue that manages packets belonging to AC_BK access class", PointerValue (), - MakePointerAccessor(&RegularWifiMac::GetBKQueue), + MakePointerAccessor (&RegularWifiMac::GetBKQueue), MakePointerChecker ()) .AddTraceSource ( "TxOkHeader", "The header of successfully transmitted packet", diff --git a/src/wifi/model/regular-wifi-mac.h b/src/wifi/model/regular-wifi-mac.h index 3de0406ed..81b4323eb 100644 --- a/src/wifi/model/regular-wifi-mac.h +++ b/src/wifi/model/regular-wifi-mac.h @@ -40,6 +40,7 @@ class DcfManager; /** * \brief base class for all MAC-level wifi objects. + * \ingroup wifi * * This class encapsulates all the low-level MAC functionality * DCA, EDCA, etc) and all the high-level MAC functionality diff --git a/src/wifi/model/rraa-wifi-manager.cc b/src/wifi/model/rraa-wifi-manager.cc index f07f270cf..eb8d8947a 100644 --- a/src/wifi/model/rraa-wifi-manager.cc +++ b/src/wifi/model/rraa-wifi-manager.cc @@ -3,7 +3,7 @@ * Copyright (c) 2004,2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -44,9 +44,9 @@ struct RraaWifiRemoteStation : public WifiRemoteStation uint32_t m_rate; }; -NS_OBJECT_ENSURE_REGISTERED(RraaWifiManager); +NS_OBJECT_ENSURE_REGISTERED (RraaWifiManager); -TypeId +TypeId RraaWifiManager::GetTypeId (void) { static TypeId tid = TypeId ("ns3::RraaWifiManager") @@ -172,15 +172,17 @@ RraaWifiManager::GetTypeId (void) DoubleValue (0.3932), MakeDoubleAccessor (&RraaWifiManager::m_pmtlfor9), MakeDoubleChecker ()) - ; + ; return tid; } RraaWifiManager::RraaWifiManager () -{} +{ +} RraaWifiManager::~RraaWifiManager () -{} +{ +} WifiRemoteStation * @@ -220,11 +222,12 @@ RraaWifiManager::GetMinRate (RraaWifiRemoteStation *station) } -void +void RraaWifiManager::DoReportRtsFailed (WifiRemoteStation *st) -{} +{ +} -void +void RraaWifiManager::DoReportDataFailed (WifiRemoteStation *st) { RraaWifiRemoteStation *station = (RraaWifiRemoteStation *) st; @@ -234,17 +237,18 @@ RraaWifiManager::DoReportDataFailed (WifiRemoteStation *st) station->m_failed++; RunBasicAlgorithm (station); } -void +void RraaWifiManager::DoReportRxOk (WifiRemoteStation *st, double rxSnr, WifiMode txMode) -{} -void +{ +} +void RraaWifiManager::DoReportRtsOk (WifiRemoteStation *st, double ctsSnr, WifiMode ctsMode, double rtsSnr) { - NS_LOG_DEBUG ("self="<m_counter--; RunBasicAlgorithm (station); } -void +void RraaWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *st) -{} -void +{ +} +void RraaWifiManager::DoReportFinalDataFailed (WifiRemoteStation *st) -{} +{ +} WifiMode RraaWifiManager::DoGetDataMode (WifiRemoteStation *st, @@ -295,7 +301,7 @@ void RraaWifiManager::CheckTimeout (RraaWifiRemoteStation *station) { Time d = Simulator::Now () - station->m_lastReset; - if (station->m_counter == 0 || d > m_timeout) + if (station->m_counter == 0 || d > m_timeout) { ResetCountersBasic (station); } @@ -306,16 +312,16 @@ RraaWifiManager::RunBasicAlgorithm (RraaWifiRemoteStation *station) { ThresholdsItem thresholds = GetThresholds (station, station->m_rate); double ploss = (double) station->m_failed / (double) thresholds.ewnd; - if (station->m_counter == 0 || - ploss > thresholds.pmtl) + if (station->m_counter == 0 + || ploss > thresholds.pmtl) { - if (station->m_rate > GetMinRate (station) && - ploss > thresholds.pmtl) + if (station->m_rate > GetMinRate (station) + && ploss > thresholds.pmtl) { station->m_rate--; } - else if (station->m_rate < GetMaxRate (station) && - ploss < thresholds.pori) + else if (station->m_rate < GetMaxRate (station) + && ploss < thresholds.pori) { station->m_rate++; } @@ -326,31 +332,31 @@ RraaWifiManager::RunBasicAlgorithm (RraaWifiRemoteStation *station) void RraaWifiManager::ARts (RraaWifiRemoteStation *station) { - if (!station->m_rtsOn && - station->m_lastFrameFail) + if (!station->m_rtsOn + && station->m_lastFrameFail) { station->m_rtsWnd++; station->m_rtsCounter = station->m_rtsWnd; } - else if ((station->m_rtsOn && station->m_lastFrameFail) || - (!station->m_rtsOn && !station->m_lastFrameFail)) + else if ((station->m_rtsOn && station->m_lastFrameFail) + || (!station->m_rtsOn && !station->m_lastFrameFail)) { station->m_rtsWnd = station->m_rtsWnd / 2; station->m_rtsCounter = station->m_rtsWnd; } - if (station->m_rtsCounter > 0) + if (station->m_rtsCounter > 0) { station->m_rtsOn = true; station->m_rtsCounter--; } - else + else { station->m_rtsOn = false; } } struct RraaWifiManager::ThresholdsItem -RraaWifiManager::GetThresholds (RraaWifiRemoteStation *station, +RraaWifiManager::GetThresholds (RraaWifiRemoteStation *station, uint32_t rate) const { WifiMode mode = GetSupported (station, rate); @@ -360,66 +366,90 @@ RraaWifiManager::GetThresholds (RraaWifiRemoteStation *station, struct RraaWifiManager::ThresholdsItem RraaWifiManager::GetThresholds (WifiMode mode) const { - switch (mode.GetDataRate () / 1000000) + switch (mode.GetDataRate () / 1000000) { - case 54: { - ThresholdsItem mode54 = {54000000, - 0.0, - m_pmtlfor54, - m_ewndfor54}; - return mode54; - } break; - case 48: { - ThresholdsItem mode48 = {48000000, - m_porifor48, - m_pmtlfor48, - m_ewndfor48}; - return mode48; - } break; - case 36: { - ThresholdsItem mode36 = {36000000, - m_porifor36, - m_pmtlfor36, - m_ewndfor36}; - return mode36; - } break; - case 24: { - ThresholdsItem mode24 = {24000000, - m_porifor24, - m_pmtlfor24, - m_ewndfor24}; - return mode24; - } break; - case 18: { - ThresholdsItem mode18 = {18000000, - m_porifor18, - m_pmtlfor18, - m_ewndfor18}; - return mode18; - } break; - case 12: { - ThresholdsItem mode12 = {12000000, - m_porifor12, - m_pmtlfor12, - m_ewndfor12}; - return mode12; - } break; - case 9: { - ThresholdsItem mode9 = {9000000, - m_porifor9, - m_pmtlfor9, - m_ewndfor9}; - return mode9; - } break; - case 6: { - ThresholdsItem mode6 = {6000000, - m_porifor6, - 1.0, - m_ewndfor6}; - return mode6; - } break; + case 54: + { + ThresholdsItem mode54 = { + 54000000, + 0.0, + m_pmtlfor54, + m_ewndfor54 + }; + return mode54; + } break; + case 48: + { + ThresholdsItem mode48 = { + 48000000, + m_porifor48, + m_pmtlfor48, + m_ewndfor48 + }; + return mode48; + } break; + case 36: + { + ThresholdsItem mode36 = { + 36000000, + m_porifor36, + m_pmtlfor36, + m_ewndfor36 + }; + return mode36; + } break; + case 24: + { + ThresholdsItem mode24 = { + 24000000, + m_porifor24, + m_pmtlfor24, + m_ewndfor24 + }; + return mode24; + } break; + case 18: + { + ThresholdsItem mode18 = { + 18000000, + m_porifor18, + m_pmtlfor18, + m_ewndfor18 + }; + return mode18; + } break; + case 12: + { + ThresholdsItem mode12 = { + 12000000, + m_porifor12, + m_pmtlfor12, + m_ewndfor12 + }; + return mode12; + } break; + case 9: + { + ThresholdsItem mode9 = { + 9000000, + m_porifor9, + m_pmtlfor9, + m_ewndfor9 + }; + return mode9; + } break; + case 6: + { + ThresholdsItem mode6 = { + 6000000, + m_porifor6, + 1.0, + m_ewndfor6 + }; + return mode6; + } break; } - NS_ASSERT_MSG(false, "Thresholds for an unknown mode are asked (" << mode << ")"); + NS_ASSERT_MSG (false, "Thresholds for an unknown mode are asked (" << mode << ")"); return ThresholdsItem (); } diff --git a/src/wifi/model/rraa-wifi-manager.h b/src/wifi/model/rraa-wifi-manager.h index 47d25c559..a32fdad84 100644 --- a/src/wifi/model/rraa-wifi-manager.h +++ b/src/wifi/model/rraa-wifi-manager.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -29,13 +29,14 @@ struct RraaWifiRemoteStation; /** * \brief Robust Rate Adaptation Algorithm + * \ingroup wifi * * This is an implementation of RRAA as described in * "Robust rate adaptation for 802.11 wireless networks" * by "Starsky H. Y. Wong", "Hao Yang", "Songwu Lu", and, * "Vaduvur Bharghavan" published in Mobicom 06. */ -class RraaWifiManager : public WifiRemoteStationManager +class RraaWifiManager : public WifiRemoteStationManager { public: static TypeId GetTypeId (void); @@ -44,8 +45,7 @@ public: virtual ~RraaWifiManager (); private: - - struct ThresholdsItem + struct ThresholdsItem { uint32_t datarate; double pori; @@ -54,8 +54,8 @@ private: }; // overriden from base class - virtual WifiRemoteStation *DoCreateStation (void) const; - virtual void DoReportRxOk (WifiRemoteStation *station, + virtual WifiRemoteStation * DoCreateStation (void) const; + virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode); virtual void DoReportRtsFailed (WifiRemoteStation *station); virtual void DoReportDataFailed (WifiRemoteStation *station); diff --git a/src/wifi/model/ssid.cc b/src/wifi/model/ssid.cc index 1fefd20d4..ee1ea1414 100644 --- a/src/wifi/model/ssid.cc +++ b/src/wifi/model/ssid.cc @@ -3,7 +3,7 @@ * Copyright (c) 2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -25,7 +25,7 @@ namespace ns3 { Ssid::Ssid () { m_length = 0; - for (uint8_t i = 0; i < 33; i++) + for (uint8_t i = 0; i < 33; i++) { m_ssid[i] = 0; } @@ -35,7 +35,7 @@ Ssid::Ssid (std::string s) NS_ASSERT (s.size () < 32); const char *ssid = s.c_str (); uint8_t len = 0; - while (*ssid != 0 && len < 32) + while (*ssid != 0 && len < 32) { m_ssid[len] = *ssid; ssid++; @@ -43,7 +43,7 @@ Ssid::Ssid (std::string s) } NS_ASSERT (len <= 32); m_length = len; - while (len < 33) + while (len < 33) { m_ssid[len] = 0; len++; @@ -53,38 +53,38 @@ Ssid::Ssid (char const ssid[32], uint8_t length) { NS_ASSERT (length <= 32); uint8_t len = 0; - while (len < length) + while (len < length) { m_ssid[len] = ssid[len]; len++; } m_length = length; - while (len < 33) + while (len < 33) { m_ssid[len] = 0; len++; } } -bool +bool Ssid::IsEqual (const Ssid& o) const { uint8_t i = 0; - while (i < 32 && - m_ssid[i] == o.m_ssid[i] && - m_ssid[i] != 0) + while (i < 32 + && m_ssid[i] == o.m_ssid[i] + && m_ssid[i] != 0) { i++; } - if (m_ssid[i] != o.m_ssid[i]) + if (m_ssid[i] != o.m_ssid[i]) { return false; } return true; } -bool +bool Ssid::IsBroadcast (void) const { - if (m_ssid[0] == 0) + if (m_ssid[0] == 0) { return true; } @@ -119,7 +119,7 @@ Ssid::SerializeInformationField (Buffer::Iterator start) const } uint8_t Ssid::DeserializeInformationField (Buffer::Iterator start, - uint8_t length) + uint8_t length) { m_length = length; NS_ASSERT (m_length <= 32); diff --git a/src/wifi/model/ssid.h b/src/wifi/model/ssid.h index 26a1e7ff2..5647c8195 100644 --- a/src/wifi/model/ssid.h +++ b/src/wifi/model/ssid.h @@ -3,7 +3,7 @@ * Copyright (c) 2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -28,8 +28,9 @@ namespace ns3 { /** - * \brief a IEEE 802.11 SSID + * \ingroup wifi * + * The IEEE 802.11 SSID Information Element */ class Ssid : public WifiInformationElement { @@ -42,13 +43,13 @@ public: bool IsEqual (const Ssid& o) const; bool IsBroadcast (void) const; - char *PeekString (void) const; + char* PeekString (void) const; WifiInformationElementId ElementId () const; uint8_t GetInformationFieldSize () const; void SerializeInformationField (Buffer::Iterator start) const; uint8_t DeserializeInformationField (Buffer::Iterator start, - uint8_t length); + uint8_t length); private: uint8_t m_ssid[33]; diff --git a/src/wifi/model/sta-wifi-mac.cc b/src/wifi/model/sta-wifi-mac.cc index 5ebf85f15..3572c867d 100644 --- a/src/wifi/model/sta-wifi-mac.cc +++ b/src/wifi/model/sta-wifi-mac.cc @@ -211,7 +211,8 @@ void StaWifiMac::TryToEnsureAssociated (void) { NS_LOG_FUNCTION (this); - switch (m_state) { + switch (m_state) + { case ASSOCIATED: return; break; @@ -283,8 +284,8 @@ StaWifiMac::RestartBeaconWatchdog (Time delay) { NS_LOG_FUNCTION (this << delay); m_beaconWatchdogEnd = std::max (Simulator::Now () + delay, m_beaconWatchdogEnd); - if (Simulator::GetDelayLeft (m_beaconWatchdog) < delay && - m_beaconWatchdog.IsExpired ()) + if (Simulator::GetDelayLeft (m_beaconWatchdog) < delay + && m_beaconWatchdog.IsExpired ()) { NS_LOG_DEBUG ("really restart watchdog."); m_beaconWatchdog = Simulator::Schedule (delay, &StaWifiMac::MissedBeacons, this); @@ -379,8 +380,8 @@ StaWifiMac::Receive (Ptr packet, const WifiMacHeader *hdr) NS_LOG_LOGIC ("packet sent by us."); return; } - else if (hdr->GetAddr1 () != GetAddress () && - !hdr->GetAddr1 ().IsGroup ()) + else if (hdr->GetAddr1 () != GetAddress () + && !hdr->GetAddr1 ().IsGroup ()) { NS_LOG_LOGIC ("packet is not for us"); NotifyRxDrop (packet); @@ -426,8 +427,8 @@ StaWifiMac::Receive (Ptr packet, const WifiMacHeader *hdr) } return; } - else if (hdr->IsProbeReq () || - hdr->IsAssocReq ()) + else if (hdr->IsProbeReq () + || hdr->IsAssocReq ()) { // This is a frame aimed at an AP, so we can safely ignore it. NotifyRxDrop (packet); @@ -438,8 +439,8 @@ StaWifiMac::Receive (Ptr packet, const WifiMacHeader *hdr) MgtBeaconHeader beacon; packet->RemoveHeader (beacon); bool goodBeacon = false; - if (GetSsid ().IsBroadcast () || - beacon.GetSsid ().IsEqual (GetSsid ())) + if (GetSsid ().IsBroadcast () + || beacon.GetSsid ().IsEqual (GetSsid ())) { goodBeacon = true; } @@ -545,13 +546,13 @@ StaWifiMac::GetSupportedRates (void) const void StaWifiMac::SetState (MacState value) { - if (value == ASSOCIATED && - m_state != ASSOCIATED) + if (value == ASSOCIATED + && m_state != ASSOCIATED) { m_assocLogger (GetBssid ()); } - else if (value != ASSOCIATED && - m_state == ASSOCIATED) + else if (value != ASSOCIATED + && m_state == ASSOCIATED) { m_deAssocLogger (GetBssid ()); } diff --git a/src/wifi/model/sta-wifi-mac.h b/src/wifi/model/sta-wifi-mac.h index 24b152dd6..510fc8387 100644 --- a/src/wifi/model/sta-wifi-mac.h +++ b/src/wifi/model/sta-wifi-mac.h @@ -35,6 +35,11 @@ namespace ns3 { class MgtAddBaRequestHeader; +/** + * \ingroup wifi + * + * The Wifi MAC high model for a non-AP STA in a BSS. + */ class StaWifiMac : public RegularWifiMac { public: @@ -79,7 +84,8 @@ public: void StartActiveAssociation (void); private: - enum MacState { + enum MacState + { ASSOCIATED, WAIT_PROBE_RESP, WAIT_ASSOC_RESP, diff --git a/src/wifi/model/status-code.cc b/src/wifi/model/status-code.cc index c2ac9f00a..361778f30 100644 --- a/src/wifi/model/status-code.cc +++ b/src/wifi/model/status-code.cc @@ -3,7 +3,7 @@ * Copyright (c) 2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -25,35 +25,36 @@ namespace ns3 { StatusCode::StatusCode () -{} -void +{ +} +void StatusCode::SetSuccess (void) { m_code = 0; } -void +void StatusCode::SetFailure (void) { m_code = 1; } -bool +bool StatusCode::IsSuccess (void) const { return (m_code == 0); } -uint32_t +uint32_t StatusCode::GetSerializedSize (void) const { return 2; } -Buffer::Iterator +Buffer::Iterator StatusCode::Serialize (Buffer::Iterator start) const { start.WriteHtolsbU16 (m_code); return start; } -Buffer::Iterator +Buffer::Iterator StatusCode::Deserialize (Buffer::Iterator start) { m_code = start.ReadLsbtohU16 (); diff --git a/src/wifi/model/status-code.h b/src/wifi/model/status-code.h index cbeffc570..9beb4ac48 100644 --- a/src/wifi/model/status-code.h +++ b/src/wifi/model/status-code.h @@ -3,7 +3,7 @@ * Copyright (c) 2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -26,7 +26,8 @@ namespace ns3 { -class StatusCode { +class StatusCode +{ public: StatusCode (); void SetSuccess (void); diff --git a/src/wifi/model/supported-rates.cc b/src/wifi/model/supported-rates.cc index 2768123f0..8d0756cbf 100644 --- a/src/wifi/model/supported-rates.cc +++ b/src/wifi/model/supported-rates.cc @@ -3,7 +3,7 @@ * Copyright (c) 2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -27,10 +27,12 @@ NS_LOG_COMPONENT_DEFINE ("SupportedRates"); namespace ns3 { SupportedRates::SupportedRates () - : extended (this), m_nRates (0) -{} + : extended (this), + m_nRates (0) +{ +} -void +void SupportedRates::AddSupportedRate (uint32_t bs) { NS_ASSERT (m_nRates < MAX_SUPPORTED_RATES); @@ -38,11 +40,11 @@ SupportedRates::AddSupportedRate (uint32_t bs) { return; } - m_rates[m_nRates] = bs/500000; + m_rates[m_nRates] = bs / 500000; m_nRates++; - NS_LOG_DEBUG ("add rate="< () - ; + ; return tid; } diff --git a/src/wifi/model/wifi-channel.h b/src/wifi/model/wifi-channel.h index 0e1e901bd..51bef9c5f 100644 --- a/src/wifi/model/wifi-channel.h +++ b/src/wifi/model/wifi-channel.h @@ -3,7 +3,7 @@ * Copyright (c) 2006,2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -29,10 +29,11 @@ class WifiNetDevice; class WifiPhy; /** - * \brief A 802.11 Channel + * \brief Wifi Channel interface specification + * \ingroup wifi * * This class works in tandem with the ns3::WifiPhy class. If you want to - * provide a new Wifi PHY layer, you have to subclass both ns3::WifiChannel + * provide a new Wifi PHY layer, you have to subclass both ns3::WifiChannel * and ns3::WifiPhy. * * Typically, MyWifiChannel will define a Send method whose job is to distribute diff --git a/src/wifi/model/wifi-information-element-vector.cc b/src/wifi/model/wifi-information-element-vector.cc index 74af5168b..3547cf77a 100644 --- a/src/wifi/model/wifi-information-element-vector.cc +++ b/src/wifi/model/wifi-information-element-vector.cc @@ -26,8 +26,8 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (WifiInformationElementVector); -WifiInformationElementVector::WifiInformationElementVector () : - m_maxSize (1500) +WifiInformationElementVector::WifiInformationElementVector () + : m_maxSize (1500) { } WifiInformationElementVector::~WifiInformationElementVector () @@ -42,8 +42,8 @@ TypeId WifiInformationElementVector::GetTypeId () { static TypeId tid = TypeId ("ns3::WifiInformationElementVector") - .SetParent
() - .AddConstructor (); + .SetParent
() + .AddConstructor (); return tid; } TypeId @@ -59,7 +59,7 @@ WifiInformationElementVector::GetSerializedSize () const void WifiInformationElementVector::Serialize (Buffer::Iterator start) const { - for(IE_VECTOR::const_iterator i = m_elements.begin (); i != m_elements.end (); i ++) + for (IE_VECTOR::const_iterator i = m_elements.begin (); i != m_elements.end (); i++) { start = (*i)->Serialize (start); } @@ -68,17 +68,17 @@ uint32_t WifiInformationElementVector::Deserialize (Buffer::Iterator start) { Buffer::Iterator i = start; - uint32_t size = start.GetSize(); + uint32_t size = start.GetSize (); while (size > 0) { - uint32_t deserialized = DeserializeSingleIe(i); + uint32_t deserialized = DeserializeSingleIe (i); i.Next (deserialized); size -= deserialized; } - return i.GetDistanceFrom(start); + return i.GetDistanceFrom (start); } uint32_t -WifiInformationElementVector::DeserializeSingleIe(Buffer::Iterator start) +WifiInformationElementVector::DeserializeSingleIe (Buffer::Iterator start) { Buffer::Iterator i = start; uint8_t id = i.ReadU8 (); @@ -97,10 +97,10 @@ WifiInformationElementVector::DeserializeSingleIe(Buffer::Iterator start) newElement->DeserializeInformationField (i, length); i.Next (length); m_elements.push_back (newElement); - return i.GetDistanceFrom(start); + return i.GetDistanceFrom (start); } void -WifiInformationElementVector::Print(std::ostream & os) const +WifiInformationElementVector::Print (std::ostream & os) const { //TODO } @@ -167,7 +167,7 @@ WifiInformationElementVector::operator== (const WifiInformationElementVector & a { if (m_elements.size () != a.m_elements.size ()) { - NS_ASSERT(false); + NS_ASSERT (false); return false; } // In principle we could bypass some of the faffing about (and speed @@ -179,10 +179,12 @@ WifiInformationElementVector::operator== (const WifiInformationElementVector & a // flexible equality operators. WifiInformationElementVector::IE_VECTOR::const_iterator j = a.m_elements.begin (); for (WifiInformationElementVector::IE_VECTOR::const_iterator i = m_elements.begin (); i - != m_elements.end (); i++, j++) + != m_elements.end (); i++, j++) { if (!(*(*i) == *(*j))) - return false; + { + return false; + } } return true; diff --git a/src/wifi/model/wifi-information-element-vector.h b/src/wifi/model/wifi-information-element-vector.h index 079d616d9..ef841ebbf 100644 --- a/src/wifi/model/wifi-information-element-vector.h +++ b/src/wifi/model/wifi-information-element-vector.h @@ -28,23 +28,17 @@ #include "ns3/wifi-information-element.h" -/** - * \ingroup wifi - * - * \subsection wifi_ie_vector Information Element Vectors - * - * Information elements typically come in groups, and the - * WifiInformationElementVector class provides a representation of a - * series of IEs, and the facility for serialisation to and - * deserialisation from the over-the-air format. - */ - namespace ns3 { /** * \brief Information element vector + * \ingroup wifi * - * Implements a vector of WifiInformationElement's + * Implements a vector of WifiInformationElements. + * Information elements typically come in groups, and the + * WifiInformationElementVector class provides a representation of a + * series of IEs, and the facility for serialisation to and + * deserialisation from the over-the-air format. */ class WifiInformationElementVector : public Header { diff --git a/src/wifi/model/wifi-information-element.cc b/src/wifi/model/wifi-information-element.cc index cfda973a2..05a338aeb 100644 --- a/src/wifi/model/wifi-information-element.cc +++ b/src/wifi/model/wifi-information-element.cc @@ -23,18 +23,20 @@ namespace ns3 { WifiInformationElement::~WifiInformationElement () -{} +{ +} void WifiInformationElement::Print (std::ostream &os) const -{} +{ +} uint16_t WifiInformationElement::GetSerializedSize () const { return (2 + GetInformationFieldSize ()); } - + Buffer::Iterator WifiInformationElement::Serialize (Buffer::Iterator i) const { @@ -53,6 +55,9 @@ WifiInformationElement::Deserialize (Buffer::Iterator i) // This IE was not optional, so confirm that we did actually // deserialise something. NS_ASSERT (i.GetDistanceFrom (start) != 0); + // cast start to void, to suppress ‘start’ set but not used + // compiler warning in optimized builds + (void) start; return i; } @@ -82,28 +87,32 @@ WifiInformationElement::DeserializeIfPresent (Buffer::Iterator i) bool WifiInformationElement::operator< (WifiInformationElement const & a) const { - return (ElementId () < a.ElementId ()); + return (ElementId () < a.ElementId ()); } bool WifiInformationElement::operator== (WifiInformationElement const & a) const { - if (ElementId () != a.ElementId ()) - return false; + if (ElementId () != a.ElementId ()) + { + return false; + } - if (GetInformationFieldSize () != a.GetInformationFieldSize ()) - return false; + if (GetInformationFieldSize () != a.GetInformationFieldSize ()) + { + return false; + } - uint32_t ieSize = GetInformationFieldSize (); + uint32_t ieSize = GetInformationFieldSize (); - Buffer myIe, hisIe; - myIe.AddAtEnd (ieSize); - hisIe.AddAtEnd (ieSize); + Buffer myIe, hisIe; + myIe.AddAtEnd (ieSize); + hisIe.AddAtEnd (ieSize); - SerializeInformationField (myIe.Begin ()); - a.SerializeInformationField (hisIe.Begin ()); + SerializeInformationField (myIe.Begin ()); + a.SerializeInformationField (hisIe.Begin ()); - return (memcmp(myIe.PeekData (), hisIe.PeekData (), ieSize) == 0); + return (memcmp (myIe.PeekData (), hisIe.PeekData (), ieSize) == 0); } } diff --git a/src/wifi/model/wifi-information-element.h b/src/wifi/model/wifi-information-element.h index d1ff14c0c..9b67497f0 100644 --- a/src/wifi/model/wifi-information-element.h +++ b/src/wifi/model/wifi-information-element.h @@ -24,35 +24,6 @@ #include "ns3/header.h" #include "ns3/simple-ref-count.h" -/** - * \ingroup wifi - * - * \subsection wifi_ie Information Elements - * - * The IEEE 802.11 standard includes the notion of Information - * Elements, which are encodings of management information to be - * communicated between STAs in the payload of various frames of type - * Management. Information Elements (IEs) have a common format, each - * starting with a single octet - the Element ID, which indicates the - * specific type of IE (a type to represent the options here is - * defined as WifiInformationElementId). The next octet is a length field and - * encodes the number of octets in the third and final field, which is - * the IE Information field. - * - * The class ns3::WifiInformationElement provides a base for classes - * which represent specific Information Elements. This class defines - * pure virtual methods for serialisation - * (ns3::WifiInformationElement::SerializeInformationField) and - * deserialisation - * (ns3::WifiInformationElement::DeserializeInformationField) of IEs, from - * or to data members or other objects that simulation objects use to - * maintain the relevant state. - * - * This class also provides an implementation of the equality - * operator, which operates by comparing the serialised versions of - * the two WifiInformationElement objects concerned. - */ - namespace ns3 { /** @@ -121,6 +92,30 @@ typedef uint8_t WifiInformationElementId; /** * \brief Information element, as defined in 802.11-2007 standard + * \ingroup wifi + * + * The IEEE 802.11 standard includes the notion of Information + * Elements, which are encodings of management information to be + * communicated between STAs in the payload of various frames of type + * Management. Information Elements (IEs) have a common format, each + * starting with a single octet - the Element ID, which indicates the + * specific type of IE (a type to represent the options here is + * defined as WifiInformationElementId). The next octet is a length field and + * encodes the number of octets in the third and final field, which is + * the IE Information field. + * + * The class ns3::WifiInformationElement provides a base for classes + * which represent specific Information Elements. This class defines + * pure virtual methods for serialisation + * (ns3::WifiInformationElement::SerializeInformationField) and + * deserialisation + * (ns3::WifiInformationElement::DeserializeInformationField) of IEs, from + * or to data members or other objects that simulation objects use to + * maintain the relevant state. + * + * This class also provides an implementation of the equality + * operator, which operates by comparing the serialised versions of + * the two WifiInformationElement objects concerned. * * Elements are defined to have a common general format consisting of * a 1 octet Element ID field, a 1 octet length field, and a diff --git a/src/wifi/model/wifi-mac-header.cc b/src/wifi/model/wifi-mac-header.cc index 39a2a0363..9eca0feb1 100644 --- a/src/wifi/model/wifi-mac-header.cc +++ b/src/wifi/model/wifi-mac-header.cc @@ -27,13 +27,15 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (WifiMacHeader); -enum { +enum +{ TYPE_MGT = 0, TYPE_CTL = 1, TYPE_DATA = 2 }; -enum { +enum +{ SUBTYPE_CTL_BACKREQ = 8, SUBTYPE_CTL_BACKRESP = 9, SUBTYPE_CTL_RTS = 11, @@ -47,76 +49,78 @@ WifiMacHeader::WifiMacHeader () m_ctrlWep (0), m_ctrlOrder (1), m_amsduPresent (0) -{} +{ +} WifiMacHeader::~WifiMacHeader () -{} +{ +} -void +void WifiMacHeader::SetDsFrom (void) { m_ctrlFromDs = 1; } -void +void WifiMacHeader::SetDsNotFrom (void) { m_ctrlFromDs = 0; } -void +void WifiMacHeader::SetDsTo (void) { m_ctrlToDs = 1; } -void +void WifiMacHeader::SetDsNotTo (void) { m_ctrlToDs = 0; } -void +void WifiMacHeader::SetAddr1 (Mac48Address address) { m_addr1 = address; } -void +void WifiMacHeader::SetAddr2 (Mac48Address address) { m_addr2 = address; } -void +void WifiMacHeader::SetAddr3 (Mac48Address address) { m_addr3 = address; } -void +void WifiMacHeader::SetAddr4 (Mac48Address address) { m_addr4 = address; } -void +void WifiMacHeader::SetAssocReq (void) { m_ctrlType = TYPE_MGT; m_ctrlSubtype = 0; } -void +void WifiMacHeader::SetAssocResp (void) { m_ctrlType = TYPE_MGT; m_ctrlSubtype = 1; } -void +void WifiMacHeader::SetProbeReq (void) { m_ctrlType = TYPE_MGT; m_ctrlSubtype = 4; } -void +void WifiMacHeader::SetProbeResp (void) { m_ctrlType = TYPE_MGT; m_ctrlSubtype = 5; } -void +void WifiMacHeader::SetBeacon (void) { m_ctrlType = TYPE_MGT; @@ -135,7 +139,7 @@ WifiMacHeader::SetBlockAck (void) m_ctrlSubtype = 9; } -void +void WifiMacHeader::SetTypeData (void) { m_ctrlType = TYPE_DATA; @@ -144,159 +148,160 @@ WifiMacHeader::SetTypeData (void) void WifiMacHeader::SetAction (void) { - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 0x0D; + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 0x0D; } void WifiMacHeader::SetMultihopAction (void) { - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 0x0F; + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 0x0F; } -void +void WifiMacHeader::SetType (enum WifiMacType type) { - switch (type) { - case WIFI_MAC_CTL_BACKREQ: - m_ctrlType = TYPE_CTL; - m_ctrlSubtype = SUBTYPE_CTL_BACKREQ; - break; - case WIFI_MAC_CTL_BACKRESP: - m_ctrlType = TYPE_CTL; - m_ctrlSubtype = SUBTYPE_CTL_BACKRESP; - break; - case WIFI_MAC_CTL_RTS: - m_ctrlType = TYPE_CTL; - m_ctrlSubtype = SUBTYPE_CTL_RTS; - break; - case WIFI_MAC_CTL_CTS: - m_ctrlType = TYPE_CTL; - m_ctrlSubtype = SUBTYPE_CTL_CTS; - break; - case WIFI_MAC_CTL_ACK: - m_ctrlType = TYPE_CTL; - m_ctrlSubtype = SUBTYPE_CTL_ACK; - break; - case WIFI_MAC_MGT_ASSOCIATION_REQUEST: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 0; - break; - case WIFI_MAC_MGT_ASSOCIATION_RESPONSE: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 1; - break; - case WIFI_MAC_MGT_REASSOCIATION_REQUEST: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 2; - break; - case WIFI_MAC_MGT_REASSOCIATION_RESPONSE: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 3; - break; - case WIFI_MAC_MGT_PROBE_REQUEST: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 4; - break; - case WIFI_MAC_MGT_PROBE_RESPONSE: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 5; - break; - case WIFI_MAC_MGT_BEACON: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 8; - break; - case WIFI_MAC_MGT_DISASSOCIATION: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 10; - break; - case WIFI_MAC_MGT_AUTHENTICATION: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 11; - break; - case WIFI_MAC_MGT_DEAUTHENTICATION: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 12; - case WIFI_MAC_MGT_ACTION: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 13; - case WIFI_MAC_MGT_ACTION_NO_ACK: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 14; - case WIFI_MAC_MGT_MULTIHOP_ACTION: - m_ctrlType = TYPE_MGT; - m_ctrlSubtype = 15; - break; + switch (type) + { + case WIFI_MAC_CTL_BACKREQ: + m_ctrlType = TYPE_CTL; + m_ctrlSubtype = SUBTYPE_CTL_BACKREQ; + break; + case WIFI_MAC_CTL_BACKRESP: + m_ctrlType = TYPE_CTL; + m_ctrlSubtype = SUBTYPE_CTL_BACKRESP; + break; + case WIFI_MAC_CTL_RTS: + m_ctrlType = TYPE_CTL; + m_ctrlSubtype = SUBTYPE_CTL_RTS; + break; + case WIFI_MAC_CTL_CTS: + m_ctrlType = TYPE_CTL; + m_ctrlSubtype = SUBTYPE_CTL_CTS; + break; + case WIFI_MAC_CTL_ACK: + m_ctrlType = TYPE_CTL; + m_ctrlSubtype = SUBTYPE_CTL_ACK; + break; + case WIFI_MAC_MGT_ASSOCIATION_REQUEST: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 0; + break; + case WIFI_MAC_MGT_ASSOCIATION_RESPONSE: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 1; + break; + case WIFI_MAC_MGT_REASSOCIATION_REQUEST: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 2; + break; + case WIFI_MAC_MGT_REASSOCIATION_RESPONSE: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 3; + break; + case WIFI_MAC_MGT_PROBE_REQUEST: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 4; + break; + case WIFI_MAC_MGT_PROBE_RESPONSE: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 5; + break; + case WIFI_MAC_MGT_BEACON: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 8; + break; + case WIFI_MAC_MGT_DISASSOCIATION: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 10; + break; + case WIFI_MAC_MGT_AUTHENTICATION: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 11; + break; + case WIFI_MAC_MGT_DEAUTHENTICATION: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 12; + case WIFI_MAC_MGT_ACTION: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 13; + case WIFI_MAC_MGT_ACTION_NO_ACK: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 14; + case WIFI_MAC_MGT_MULTIHOP_ACTION: + m_ctrlType = TYPE_MGT; + m_ctrlSubtype = 15; + break; - case WIFI_MAC_DATA: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 0; - break; - case WIFI_MAC_DATA_CFACK: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 1; - break; - case WIFI_MAC_DATA_CFPOLL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 2; - break; - case WIFI_MAC_DATA_CFACK_CFPOLL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 3; - break; - case WIFI_MAC_DATA_NULL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 4; - break; - case WIFI_MAC_DATA_NULL_CFACK: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 5; - break; - case WIFI_MAC_DATA_NULL_CFPOLL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 6; - break; - case WIFI_MAC_DATA_NULL_CFACK_CFPOLL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 7; - break; - case WIFI_MAC_QOSDATA: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 8; - break; - case WIFI_MAC_QOSDATA_CFACK: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 9; - break; - case WIFI_MAC_QOSDATA_CFPOLL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 10; - break; - case WIFI_MAC_QOSDATA_CFACK_CFPOLL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 11; - break; - case WIFI_MAC_QOSDATA_NULL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 12; - break; - case WIFI_MAC_QOSDATA_NULL_CFPOLL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 14; - break; - case WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL: - m_ctrlType = TYPE_DATA; - m_ctrlSubtype = 15; - break; - } + case WIFI_MAC_DATA: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 0; + break; + case WIFI_MAC_DATA_CFACK: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 1; + break; + case WIFI_MAC_DATA_CFPOLL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 2; + break; + case WIFI_MAC_DATA_CFACK_CFPOLL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 3; + break; + case WIFI_MAC_DATA_NULL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 4; + break; + case WIFI_MAC_DATA_NULL_CFACK: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 5; + break; + case WIFI_MAC_DATA_NULL_CFPOLL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 6; + break; + case WIFI_MAC_DATA_NULL_CFACK_CFPOLL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 7; + break; + case WIFI_MAC_QOSDATA: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 8; + break; + case WIFI_MAC_QOSDATA_CFACK: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 9; + break; + case WIFI_MAC_QOSDATA_CFPOLL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 10; + break; + case WIFI_MAC_QOSDATA_CFACK_CFPOLL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 11; + break; + case WIFI_MAC_QOSDATA_NULL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 12; + break; + case WIFI_MAC_QOSDATA_NULL_CFPOLL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 14; + break; + case WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL: + m_ctrlType = TYPE_DATA; + m_ctrlSubtype = 15; + break; + } m_ctrlToDs = 0; m_ctrlFromDs = 0; } -void +void WifiMacHeader::SetRawDuration (uint16_t duration) { m_duration = duration; } -void +void WifiMacHeader::SetDuration (Time duration) { int64_t duration_us = duration.GetMicroSeconds (); @@ -346,20 +351,21 @@ void WifiMacHeader::SetQosNoEosp () } void WifiMacHeader::SetQosAckPolicy (enum QosAckPolicy policy) { - switch (policy) { - case NORMAL_ACK : - m_qosAckPolicy = 0; - break; - case NO_ACK : - m_qosAckPolicy = 1; - break; - case NO_EXPLICIT_ACK : - m_qosAckPolicy = 2; - break; - case BLOCK_ACK : - m_qosAckPolicy = 3; - break; - } + switch (policy) + { + case NORMAL_ACK: + m_qosAckPolicy = 0; + break; + case NO_ACK: + m_qosAckPolicy = 1; + break; + case NO_EXPLICIT_ACK: + m_qosAckPolicy = 2; + break; + case BLOCK_ACK: + m_qosAckPolicy = 3; + break; + } } void WifiMacHeader::SetQosNormalAck () @@ -389,261 +395,266 @@ void WifiMacHeader::SetQosTxopLimit (uint8_t txop) m_qosStuff = txop; } -Mac48Address +Mac48Address WifiMacHeader::GetAddr1 (void) const { return m_addr1; } -Mac48Address +Mac48Address WifiMacHeader::GetAddr2 (void) const { return m_addr2; } -Mac48Address +Mac48Address WifiMacHeader::GetAddr3 (void) const { return m_addr3; } -Mac48Address +Mac48Address WifiMacHeader::GetAddr4 (void) const { return m_addr4; } -enum WifiMacType +enum WifiMacType WifiMacHeader::GetType (void) const { - switch (m_ctrlType) { - case TYPE_MGT: - switch (m_ctrlSubtype) { - case 0: - return WIFI_MAC_MGT_ASSOCIATION_REQUEST; - break; - case 1: - return WIFI_MAC_MGT_ASSOCIATION_RESPONSE; - break; - case 2: - return WIFI_MAC_MGT_REASSOCIATION_REQUEST; - break; - case 3: - return WIFI_MAC_MGT_REASSOCIATION_RESPONSE; - break; - case 4: - return WIFI_MAC_MGT_PROBE_REQUEST; - break; - case 5: - return WIFI_MAC_MGT_PROBE_RESPONSE; - break; - case 8: - return WIFI_MAC_MGT_BEACON; - break; - case 10: - return WIFI_MAC_MGT_DISASSOCIATION; - break; - case 11: - return WIFI_MAC_MGT_AUTHENTICATION; - break; - case 12: - return WIFI_MAC_MGT_DEAUTHENTICATION; - break; - case 13: - return WIFI_MAC_MGT_ACTION; - break; - case 14: - return WIFI_MAC_MGT_ACTION_NO_ACK; - break; - case 15: - return WIFI_MAC_MGT_MULTIHOP_ACTION; - break; + switch (m_ctrlType) + { + case TYPE_MGT: + switch (m_ctrlSubtype) + { + case 0: + return WIFI_MAC_MGT_ASSOCIATION_REQUEST; + break; + case 1: + return WIFI_MAC_MGT_ASSOCIATION_RESPONSE; + break; + case 2: + return WIFI_MAC_MGT_REASSOCIATION_REQUEST; + break; + case 3: + return WIFI_MAC_MGT_REASSOCIATION_RESPONSE; + break; + case 4: + return WIFI_MAC_MGT_PROBE_REQUEST; + break; + case 5: + return WIFI_MAC_MGT_PROBE_RESPONSE; + break; + case 8: + return WIFI_MAC_MGT_BEACON; + break; + case 10: + return WIFI_MAC_MGT_DISASSOCIATION; + break; + case 11: + return WIFI_MAC_MGT_AUTHENTICATION; + break; + case 12: + return WIFI_MAC_MGT_DEAUTHENTICATION; + break; + case 13: + return WIFI_MAC_MGT_ACTION; + break; + case 14: + return WIFI_MAC_MGT_ACTION_NO_ACK; + break; + case 15: + return WIFI_MAC_MGT_MULTIHOP_ACTION; + break; - } - break; - case TYPE_CTL: - switch (m_ctrlSubtype) { - case SUBTYPE_CTL_BACKREQ: - return WIFI_MAC_CTL_BACKREQ; + } break; - case SUBTYPE_CTL_BACKRESP: - return WIFI_MAC_CTL_BACKRESP; - break; - case SUBTYPE_CTL_RTS: - return WIFI_MAC_CTL_RTS; - break; - case SUBTYPE_CTL_CTS: - return WIFI_MAC_CTL_CTS; - break; - case SUBTYPE_CTL_ACK: - return WIFI_MAC_CTL_ACK; - break; - } - break; - case TYPE_DATA: - switch (m_ctrlSubtype) { - case 0: - return WIFI_MAC_DATA; - break; - case 1: - return WIFI_MAC_DATA_CFACK; - break; - case 2: - return WIFI_MAC_DATA_CFPOLL; - break; - case 3: - return WIFI_MAC_DATA_CFACK_CFPOLL; - break; - case 4: - return WIFI_MAC_DATA_NULL; - break; - case 5: - return WIFI_MAC_DATA_NULL_CFACK; - break; - case 6: - return WIFI_MAC_DATA_NULL_CFPOLL; - break; - case 7: - return WIFI_MAC_DATA_NULL_CFACK_CFPOLL; - break; - case 8: - return WIFI_MAC_QOSDATA; - break; - case 9: - return WIFI_MAC_QOSDATA_CFACK; - break; - case 10: - return WIFI_MAC_QOSDATA_CFPOLL; - break; - case 11: - return WIFI_MAC_QOSDATA_CFACK_CFPOLL; - break; - case 12: - return WIFI_MAC_QOSDATA_NULL; - break; - case 14: - return WIFI_MAC_QOSDATA_NULL_CFPOLL; - break; - case 15: - return WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL; + case TYPE_CTL: + switch (m_ctrlSubtype) + { + case SUBTYPE_CTL_BACKREQ: + return WIFI_MAC_CTL_BACKREQ; + break; + case SUBTYPE_CTL_BACKRESP: + return WIFI_MAC_CTL_BACKRESP; + break; + case SUBTYPE_CTL_RTS: + return WIFI_MAC_CTL_RTS; + break; + case SUBTYPE_CTL_CTS: + return WIFI_MAC_CTL_CTS; + break; + case SUBTYPE_CTL_ACK: + return WIFI_MAC_CTL_ACK; + break; + } break; + case TYPE_DATA: + switch (m_ctrlSubtype) + { + case 0: + return WIFI_MAC_DATA; + break; + case 1: + return WIFI_MAC_DATA_CFACK; + break; + case 2: + return WIFI_MAC_DATA_CFPOLL; + break; + case 3: + return WIFI_MAC_DATA_CFACK_CFPOLL; + break; + case 4: + return WIFI_MAC_DATA_NULL; + break; + case 5: + return WIFI_MAC_DATA_NULL_CFACK; + break; + case 6: + return WIFI_MAC_DATA_NULL_CFPOLL; + break; + case 7: + return WIFI_MAC_DATA_NULL_CFACK_CFPOLL; + break; + case 8: + return WIFI_MAC_QOSDATA; + break; + case 9: + return WIFI_MAC_QOSDATA_CFACK; + break; + case 10: + return WIFI_MAC_QOSDATA_CFPOLL; + break; + case 11: + return WIFI_MAC_QOSDATA_CFACK_CFPOLL; + break; + case 12: + return WIFI_MAC_QOSDATA_NULL; + break; + case 14: + return WIFI_MAC_QOSDATA_NULL_CFPOLL; + break; + case 15: + return WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL; + break; + } + break; } - break; - } // NOTREACHED NS_ASSERT (false); return (enum WifiMacType)-1; } -bool +bool WifiMacHeader::IsFromDs (void) const { return m_ctrlFromDs == 1; } -bool +bool WifiMacHeader::IsToDs (void) const { return m_ctrlToDs == 1; } -bool +bool WifiMacHeader::IsData (void) const { return (m_ctrlType == TYPE_DATA); - + } -bool +bool WifiMacHeader::IsQosData (void) const { return (m_ctrlType == TYPE_DATA && (m_ctrlSubtype & 0x08)); } -bool +bool WifiMacHeader::IsCtl (void) const { return (m_ctrlType == TYPE_CTL); } -bool +bool WifiMacHeader::IsMgt (void) const { return (m_ctrlType == TYPE_MGT); } -bool +bool WifiMacHeader::IsCfpoll (void) const { - switch (GetType ()) { - case WIFI_MAC_DATA_CFPOLL: - case WIFI_MAC_DATA_CFACK_CFPOLL: - case WIFI_MAC_DATA_NULL_CFPOLL: - case WIFI_MAC_DATA_NULL_CFACK_CFPOLL: - case WIFI_MAC_QOSDATA_CFPOLL: - case WIFI_MAC_QOSDATA_CFACK_CFPOLL: - case WIFI_MAC_QOSDATA_NULL_CFPOLL: - case WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL: - return true; - break; - default: - return false; - break; - } + switch (GetType ()) + { + case WIFI_MAC_DATA_CFPOLL: + case WIFI_MAC_DATA_CFACK_CFPOLL: + case WIFI_MAC_DATA_NULL_CFPOLL: + case WIFI_MAC_DATA_NULL_CFACK_CFPOLL: + case WIFI_MAC_QOSDATA_CFPOLL: + case WIFI_MAC_QOSDATA_CFACK_CFPOLL: + case WIFI_MAC_QOSDATA_NULL_CFPOLL: + case WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL: + return true; + break; + default: + return false; + break; + } } -bool +bool WifiMacHeader::IsRts (void) const { return (GetType () == WIFI_MAC_CTL_RTS); } -bool +bool WifiMacHeader::IsCts (void) const { return (GetType () == WIFI_MAC_CTL_CTS); } -bool +bool WifiMacHeader::IsAck (void) const { return (GetType () == WIFI_MAC_CTL_ACK); } -bool +bool WifiMacHeader::IsAssocReq (void) const { return (GetType () == WIFI_MAC_MGT_ASSOCIATION_REQUEST); } -bool +bool WifiMacHeader::IsAssocResp (void) const { return (GetType () == WIFI_MAC_MGT_ASSOCIATION_RESPONSE); } -bool +bool WifiMacHeader::IsReassocReq (void) const { return (GetType () == WIFI_MAC_MGT_REASSOCIATION_REQUEST); } -bool +bool WifiMacHeader::IsReassocResp (void) const { return (GetType () == WIFI_MAC_MGT_REASSOCIATION_RESPONSE); } -bool +bool WifiMacHeader::IsProbeReq (void) const { return (GetType () == WIFI_MAC_MGT_PROBE_REQUEST); } -bool +bool WifiMacHeader::IsProbeResp (void) const { return (GetType () == WIFI_MAC_MGT_PROBE_RESPONSE); } -bool +bool WifiMacHeader::IsBeacon (void) const { return (GetType () == WIFI_MAC_MGT_BEACON); } -bool +bool WifiMacHeader::IsDisassociation (void) const { return (GetType () == WIFI_MAC_MGT_DISASSOCIATION); } -bool +bool WifiMacHeader::IsAuthentication (void) const { return (GetType () == WIFI_MAC_MGT_AUTHENTICATION); } -bool +bool WifiMacHeader::IsDeauthentication (void) const { return (GetType () == WIFI_MAC_MGT_DEAUTHENTICATION); @@ -661,16 +672,16 @@ WifiMacHeader::IsMultihopAction (void) const bool WifiMacHeader::IsBlockAckReq (void) const { - return (GetType () == WIFI_MAC_CTL_BACKREQ)?true:false; + return (GetType () == WIFI_MAC_CTL_BACKREQ) ? true : false; } bool WifiMacHeader::IsBlockAck (void) const { - return (GetType () == WIFI_MAC_CTL_BACKRESP)?true:false; + return (GetType () == WIFI_MAC_CTL_BACKRESP) ? true : false; } -uint16_t +uint16_t WifiMacHeader::GetRawDuration (void) const { return m_duration; @@ -680,7 +691,7 @@ WifiMacHeader::GetDuration (void) const { return MicroSeconds (m_duration); } -uint16_t +uint16_t WifiMacHeader::GetSequenceControl (void) const { return (m_seqSeq << 4) | m_seqFrag; @@ -695,29 +706,29 @@ WifiMacHeader::GetFragmentNumber (void) const { return m_seqFrag; } -bool +bool WifiMacHeader::IsRetry (void) const { return (m_ctrlRetry == 1); } -bool +bool WifiMacHeader::IsMoreFragments (void) const { return (m_ctrlMoreFrag == 1); } -bool +bool WifiMacHeader::IsQosBlockAck (void) const { NS_ASSERT (IsQosData ()); return (m_qosAckPolicy == 3); } -bool +bool WifiMacHeader::IsQosNoAck (void) const { NS_ASSERT (IsQosData ()); return (m_qosAckPolicy == 1); } -bool +bool WifiMacHeader::IsQosAck (void) const { NS_ASSERT (IsQosData ()); @@ -744,26 +755,27 @@ WifiMacHeader::GetQosTid (void) const enum WifiMacHeader::QosAckPolicy WifiMacHeader::GetQosAckPolicy (void) const { - switch (m_qosAckPolicy) { - case 0 : - return NORMAL_ACK; - break; - case 1 : - return NO_ACK; - break; - case 2 : - return NO_EXPLICIT_ACK; - break; - case 3 : - return BLOCK_ACK; - break; - } + switch (m_qosAckPolicy) + { + case 0: + return NORMAL_ACK; + break; + case 1: + return NO_ACK; + break; + case 2: + return NO_EXPLICIT_ACK; + break; + case 3: + return BLOCK_ACK; + break; + } // NOTREACHED NS_ASSERT (false); return (enum QosAckPolicy)-1; } -uint8_t +uint8_t WifiMacHeader::GetQosTxopLimit (void) const { NS_ASSERT (IsQosData ()); @@ -774,15 +786,15 @@ uint16_t WifiMacHeader::GetFrameControl (void) const { uint16_t val = 0; - val |= (m_ctrlType << 2) & (0x3<<2); - val |= (m_ctrlSubtype << 4) & (0xf<<4); - val |= (m_ctrlToDs << 8) & (0x1<<8); - val |= (m_ctrlFromDs << 9) & (0x1<<9); - val |= (m_ctrlMoreFrag << 10) & (0x1<<10); - val |= (m_ctrlRetry << 11) & (0x1<<11); - val |= (m_ctrlMoreData << 13) & (0x1<<13); - val |= (m_ctrlWep << 14) & (0x1<<14); - val |= (m_ctrlOrder << 15) & (0x1<<15); + val |= (m_ctrlType << 2) & (0x3 << 2); + val |= (m_ctrlSubtype << 4) & (0xf << 4); + val |= (m_ctrlToDs << 8) & (0x1 << 8); + val |= (m_ctrlFromDs << 9) & (0x1 << 9); + val |= (m_ctrlMoreFrag << 10) & (0x1 << 10); + val |= (m_ctrlRetry << 11) & (0x1 << 11); + val |= (m_ctrlMoreData << 13) & (0x1 << 13); + val |= (m_ctrlWep << 14) & (0x1 << 14); + val |= (m_ctrlOrder << 15) & (0x1 << 15); return val; } @@ -811,7 +823,7 @@ WifiMacHeader::SetFrameControl (uint16_t ctrl) m_ctrlWep = (ctrl >> 14) & 0x01; m_ctrlOrder = (ctrl >> 15) & 0x01; } -void +void WifiMacHeader::SetSequenceControl (uint16_t seq) { m_seqFrag = seq & 0x0f; @@ -827,39 +839,43 @@ WifiMacHeader::SetQosControl (uint16_t qos) m_qosStuff = (qos >> 8) & 0x00ff; } -uint32_t +uint32_t WifiMacHeader::GetSize (void) const { uint32_t size = 0; - switch (m_ctrlType) { - case TYPE_MGT: - size = 2+2+6+6+6+2; - break; - case TYPE_CTL: - switch (m_ctrlSubtype) { - case SUBTYPE_CTL_RTS: - size = 2+2+6+6; + switch (m_ctrlType) + { + case TYPE_MGT: + size = 2 + 2 + 6 + 6 + 6 + 2; break; - case SUBTYPE_CTL_CTS: - case SUBTYPE_CTL_ACK: - size = 2+2+6; + case TYPE_CTL: + switch (m_ctrlSubtype) + { + case SUBTYPE_CTL_RTS: + size = 2 + 2 + 6 + 6; + break; + case SUBTYPE_CTL_CTS: + case SUBTYPE_CTL_ACK: + size = 2 + 2 + 6; + break; + case SUBTYPE_CTL_BACKREQ: + case SUBTYPE_CTL_BACKRESP: + size = 2 + 2 + 6 + 6; + break; + } break; - case SUBTYPE_CTL_BACKREQ: - case SUBTYPE_CTL_BACKRESP: - size = 2+2+6+6; + case TYPE_DATA: + size = 2 + 2 + 6 + 6 + 6 + 2; + if (m_ctrlToDs && m_ctrlFromDs) + { + size += 6; + } + if (m_ctrlSubtype & 0x08) + { + size += 2; + } break; } - break; - case TYPE_DATA: - size = 2+2+6+6+6+2; - if (m_ctrlToDs && m_ctrlFromDs) { - size += 6; - } - if (m_ctrlSubtype & 0x08) { - size += 2; - } - break; - } return size; } const char * @@ -867,79 +883,80 @@ WifiMacHeader::GetTypeString (void) const { #define FOO(x) \ case WIFI_MAC_ ## x: \ - return #x; \ + return # x; \ break; - switch (GetType ()) { - FOO (CTL_RTS); - FOO (CTL_CTS); - FOO (CTL_ACK); - FOO (CTL_BACKREQ); - FOO (CTL_BACKRESP); + switch (GetType ()) + { + FOO (CTL_RTS); + FOO (CTL_CTS); + FOO (CTL_ACK); + FOO (CTL_BACKREQ); + FOO (CTL_BACKRESP); - FOO (MGT_BEACON); - FOO (MGT_ASSOCIATION_REQUEST); - FOO (MGT_ASSOCIATION_RESPONSE); - FOO (MGT_DISASSOCIATION); - FOO (MGT_REASSOCIATION_REQUEST); - FOO (MGT_REASSOCIATION_RESPONSE); - FOO (MGT_PROBE_REQUEST); - FOO (MGT_PROBE_RESPONSE); - FOO (MGT_AUTHENTICATION); - FOO (MGT_DEAUTHENTICATION); - FOO (MGT_ACTION); - FOO (MGT_ACTION_NO_ACK); - FOO (MGT_MULTIHOP_ACTION); - - FOO (DATA); - FOO (DATA_CFACK); - FOO (DATA_CFPOLL); - FOO (DATA_CFACK_CFPOLL); - FOO (DATA_NULL); - FOO (DATA_NULL_CFACK); - FOO (DATA_NULL_CFPOLL); - FOO (DATA_NULL_CFACK_CFPOLL); - FOO (QOSDATA); - FOO (QOSDATA_CFACK); - FOO (QOSDATA_CFPOLL); - FOO (QOSDATA_CFACK_CFPOLL); - FOO (QOSDATA_NULL); - FOO (QOSDATA_NULL_CFPOLL); - FOO (QOSDATA_NULL_CFACK_CFPOLL); - default: - return "ERROR"; - } + FOO (MGT_BEACON); + FOO (MGT_ASSOCIATION_REQUEST); + FOO (MGT_ASSOCIATION_RESPONSE); + FOO (MGT_DISASSOCIATION); + FOO (MGT_REASSOCIATION_REQUEST); + FOO (MGT_REASSOCIATION_RESPONSE); + FOO (MGT_PROBE_REQUEST); + FOO (MGT_PROBE_RESPONSE); + FOO (MGT_AUTHENTICATION); + FOO (MGT_DEAUTHENTICATION); + FOO (MGT_ACTION); + FOO (MGT_ACTION_NO_ACK); + FOO (MGT_MULTIHOP_ACTION); + + FOO (DATA); + FOO (DATA_CFACK); + FOO (DATA_CFPOLL); + FOO (DATA_CFACK_CFPOLL); + FOO (DATA_NULL); + FOO (DATA_NULL_CFACK); + FOO (DATA_NULL_CFPOLL); + FOO (DATA_NULL_CFACK_CFPOLL); + FOO (QOSDATA); + FOO (QOSDATA_CFACK); + FOO (QOSDATA_CFPOLL); + FOO (QOSDATA_CFACK_CFPOLL); + FOO (QOSDATA_NULL); + FOO (QOSDATA_NULL_CFPOLL); + FOO (QOSDATA_NULL_CFACK_CFPOLL); + default: + return "ERROR"; + } #undef FOO // needed to make gcc 4.0.1 ppc darwin happy. return "BIG_ERROR"; } -TypeId +TypeId WifiMacHeader::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WifiMacHeader") .SetParent
() .AddConstructor () - ; + ; return tid; } -TypeId +TypeId WifiMacHeader::GetInstanceTypeId (void) const { return GetTypeId (); } -void +void WifiMacHeader::PrintFrameControl (std::ostream &os) const { - os << "ToDS=" << std::hex << (int) m_ctrlToDs << ", FromDS=" << std::hex << (int) m_ctrlFromDs - << ", MoreFrag=" << std::hex << (int) m_ctrlMoreFrag << ", Retry=" << std::hex << (int) m_ctrlRetry - << ", MoreData=" << std::hex << (int) m_ctrlMoreData << std::dec - ; + os << "ToDS=" << std::hex << (int) m_ctrlToDs << ", FromDS=" << std::hex << (int) m_ctrlFromDs + << ", MoreFrag=" << std::hex << (int) m_ctrlMoreFrag << ", Retry=" << std::hex << (int) m_ctrlRetry + << ", MoreData=" << std::hex << (int) m_ctrlMoreData << std::dec + ; } -void +void WifiMacHeader::Print (std::ostream &os) const { os << GetTypeString () << " "; @@ -1028,57 +1045,62 @@ WifiMacHeader::Print (std::ostream &os) const break; } } -uint32_t +uint32_t WifiMacHeader::GetSerializedSize (void) const { return GetSize (); } -void +void WifiMacHeader::Serialize (Buffer::Iterator i) const { i.WriteHtolsbU16 (GetFrameControl ()); i.WriteHtolsbU16 (m_duration); WriteTo (i, m_addr1); - switch (m_ctrlType) { - case TYPE_MGT: - WriteTo (i, m_addr2); - WriteTo (i, m_addr3); - i.WriteHtolsbU16 (GetSequenceControl ()); - break; - case TYPE_CTL: - switch (m_ctrlSubtype) { - case SUBTYPE_CTL_RTS: + switch (m_ctrlType) + { + case TYPE_MGT: WriteTo (i, m_addr2); + WriteTo (i, m_addr3); + i.WriteHtolsbU16 (GetSequenceControl ()); break; - case SUBTYPE_CTL_CTS: - case SUBTYPE_CTL_ACK: - break; - case SUBTYPE_CTL_BACKREQ: - case SUBTYPE_CTL_BACKRESP: - WriteTo (i, m_addr2); + case TYPE_CTL: + switch (m_ctrlSubtype) + { + case SUBTYPE_CTL_RTS: + WriteTo (i, m_addr2); + break; + case SUBTYPE_CTL_CTS: + case SUBTYPE_CTL_ACK: + break; + case SUBTYPE_CTL_BACKREQ: + case SUBTYPE_CTL_BACKRESP: + WriteTo (i, m_addr2); + break; + default: + //NOTREACHED + NS_ASSERT (false); + break; + } break; + case TYPE_DATA: + { + WriteTo (i, m_addr2); + WriteTo (i, m_addr3); + i.WriteHtolsbU16 (GetSequenceControl ()); + if (m_ctrlToDs && m_ctrlFromDs) + { + WriteTo (i, m_addr4); + } + if (m_ctrlSubtype & 0x08) + { + i.WriteHtolsbU16 (GetQosControl ()); + } + } break; default: //NOTREACHED NS_ASSERT (false); break; } - break; - case TYPE_DATA: { - WriteTo (i, m_addr2); - WriteTo (i, m_addr3); - i.WriteHtolsbU16 (GetSequenceControl ()); - if (m_ctrlToDs && m_ctrlFromDs) { - WriteTo (i, m_addr4); - } - if (m_ctrlSubtype & 0x08) { - i.WriteHtolsbU16 (GetQosControl ()); - } - } break; - default: - //NOTREACHED - NS_ASSERT (false); - break; - } } uint32_t WifiMacHeader::Deserialize (Buffer::Iterator start) @@ -1088,38 +1110,42 @@ WifiMacHeader::Deserialize (Buffer::Iterator start) SetFrameControl (frame_control); m_duration = i.ReadLsbtohU16 (); ReadFrom (i, m_addr1); - switch (m_ctrlType) { - case TYPE_MGT: - ReadFrom (i, m_addr2); - ReadFrom (i, m_addr3); - SetSequenceControl (i.ReadLsbtohU16 ()); - break; - case TYPE_CTL: - switch (m_ctrlSubtype) { - case SUBTYPE_CTL_RTS: + switch (m_ctrlType) + { + case TYPE_MGT: ReadFrom (i, m_addr2); + ReadFrom (i, m_addr3); + SetSequenceControl (i.ReadLsbtohU16 ()); break; - case SUBTYPE_CTL_CTS: - case SUBTYPE_CTL_ACK: + case TYPE_CTL: + switch (m_ctrlSubtype) + { + case SUBTYPE_CTL_RTS: + ReadFrom (i, m_addr2); + break; + case SUBTYPE_CTL_CTS: + case SUBTYPE_CTL_ACK: + break; + case SUBTYPE_CTL_BACKREQ: + case SUBTYPE_CTL_BACKRESP: + ReadFrom (i, m_addr2); + break; + } break; - case SUBTYPE_CTL_BACKREQ: - case SUBTYPE_CTL_BACKRESP: + case TYPE_DATA: ReadFrom (i, m_addr2); + ReadFrom (i, m_addr3); + SetSequenceControl (i.ReadLsbtohU16 ()); + if (m_ctrlToDs && m_ctrlFromDs) + { + ReadFrom (i, m_addr4); + } + if (m_ctrlSubtype & 0x08) + { + SetQosControl (i.ReadLsbtohU16 ()); + } break; } - break; - case TYPE_DATA: - ReadFrom (i, m_addr2); - ReadFrom (i, m_addr3); - SetSequenceControl (i.ReadLsbtohU16 ()); - if (m_ctrlToDs && m_ctrlFromDs) { - ReadFrom (i, m_addr4); - } - if (m_ctrlSubtype & 0x08) { - SetQosControl (i.ReadLsbtohU16 ()); - } - break; - } return i.GetDistanceFrom (start); } diff --git a/src/wifi/model/wifi-mac-header.h b/src/wifi/model/wifi-mac-header.h index 37ad2cf2c..f16a03f8c 100644 --- a/src/wifi/model/wifi-mac-header.h +++ b/src/wifi/model/wifi-mac-header.h @@ -29,7 +29,8 @@ namespace ns3 { -enum WifiMacType { +enum WifiMacType +{ WIFI_MAC_CTL_RTS = 0, WIFI_MAC_CTL_CTS, WIFI_MAC_CTL_ACK, @@ -67,18 +68,25 @@ enum WifiMacType { WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL, }; -class WifiMacHeader : public Header +/** + * \ingroup wifi + * + * Implements the IEEE 802.11 MAC header + */ +class WifiMacHeader : public Header { public: - enum QosAckPolicy { + enum QosAckPolicy + { NORMAL_ACK = 0, NO_ACK = 1, NO_EXPLICIT_ACK = 2, BLOCK_ACK = 3, }; - - enum AddressType { - ADDR1, + + enum AddressType + { + ADDR1, ADDR2, ADDR3, ADDR4 @@ -104,7 +112,7 @@ public: void SetAction (); void SetBlockAckReq (void); void SetBlockAck (void); - void SetMultihopAction(); + void SetMultihopAction (); void SetDsFrom (void); void SetDsNotFrom (void); void SetDsTo (void); @@ -133,7 +141,7 @@ public: void SetQosAmsdu (void); void SetQosNoAmsdu (void); void SetQosTxopLimit (uint8_t txop); - + Mac48Address GetAddr1 (void) const; Mac48Address GetAddr2 (void) const; @@ -181,7 +189,7 @@ public: uint8_t GetQosTxopLimit (void) const; uint32_t GetSize (void) const; - const char *GetTypeString (void) const; + const char * GetTypeString (void) const; private: diff --git a/src/wifi/model/wifi-mac-queue.cc b/src/wifi/model/wifi-mac-queue.cc index 47d43a0e4..7f4c28d10 100644 --- a/src/wifi/model/wifi-mac-queue.cc +++ b/src/wifi/model/wifi-mac-queue.cc @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -32,13 +32,16 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (WifiMacQueue); -WifiMacQueue::Item::Item (Ptr packet, - const WifiMacHeader &hdr, +WifiMacQueue::Item::Item (Ptr packet, + const WifiMacHeader &hdr, Time tstamp) - : packet (packet), hdr (hdr), tstamp (tstamp) -{} + : packet (packet), + hdr (hdr), + tstamp (tstamp) +{ +} -TypeId +TypeId WifiMacQueue::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WifiMacQueue") @@ -52,20 +55,21 @@ WifiMacQueue::GetTypeId (void) TimeValue (Seconds (10.0)), MakeTimeAccessor (&WifiMacQueue::m_maxDelay), MakeTimeChecker ()) - ; + ; return tid; } WifiMacQueue::WifiMacQueue () : m_size (0) -{} +{ +} WifiMacQueue::~WifiMacQueue () { Flush (); } -void +void WifiMacQueue::SetMaxSize (uint32_t maxSize) { m_maxSize = maxSize; @@ -77,23 +81,23 @@ WifiMacQueue::SetMaxDelay (Time delay) m_maxDelay = delay; } -uint32_t +uint32_t WifiMacQueue::GetMaxSize (void) const { return m_maxSize; } -Time +Time WifiMacQueue::GetMaxDelay (void) const { return m_maxDelay; } -void +void WifiMacQueue::Enqueue (Ptr packet, const WifiMacHeader &hdr) { Cleanup (); - if (m_size == m_maxSize) + if (m_size == m_maxSize) { return; } @@ -105,16 +109,16 @@ WifiMacQueue::Enqueue (Ptr packet, const WifiMacHeader &hdr) void WifiMacQueue::Cleanup (void) { - if (m_queue.empty ()) + if (m_queue.empty ()) { return; } Time now = Simulator::Now (); uint32_t n = 0; - for (PacketQueueI i = m_queue.begin (); i != m_queue.end ();) + for (PacketQueueI i = m_queue.begin (); i != m_queue.end ();) { - if (i->tstamp + m_maxDelay > now) + if (i->tstamp + m_maxDelay > now) { i++; } @@ -131,7 +135,7 @@ Ptr WifiMacQueue::Dequeue (WifiMacHeader *hdr) { Cleanup (); - if (!m_queue.empty ()) + if (!m_queue.empty ()) { Item i = m_queue.front (); m_queue.pop_front (); @@ -146,7 +150,7 @@ Ptr WifiMacQueue::Peek (WifiMacHeader *hdr) { Cleanup (); - if (!m_queue.empty ()) + if (!m_queue.empty ()) { Item i = m_queue.front (); *hdr = i.hdr; @@ -156,7 +160,7 @@ WifiMacQueue::Peek (WifiMacHeader *hdr) } Ptr -WifiMacQueue::DequeueByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, +WifiMacQueue::DequeueByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, WifiMacHeader::AddressType type, Mac48Address dest) { Cleanup (); @@ -169,8 +173,8 @@ WifiMacQueue::DequeueByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, { if (it->hdr.IsQosData ()) { - if (GetAddressForPacket (type, it) == dest && - it->hdr.GetQosTid () == tid) + if (GetAddressForPacket (type, it) == dest + && it->hdr.GetQosTid () == tid) { packet = it->packet; *hdr = it->hdr; @@ -185,7 +189,7 @@ WifiMacQueue::DequeueByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, } Ptr -WifiMacQueue::PeekByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, +WifiMacQueue::PeekByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, WifiMacHeader::AddressType type, Mac48Address dest) { Cleanup (); @@ -197,8 +201,8 @@ WifiMacQueue::PeekByTidAndAddress (WifiMacHeader *hdr, uint8_t tid, { if (it->hdr.IsQosData ()) { - if (GetAddressForPacket (type, it) == dest && - it->hdr.GetQosTid () == tid) + if (GetAddressForPacket (type, it) == dest + && it->hdr.GetQosTid () == tid) { *hdr = it->hdr; return it->packet; @@ -308,8 +312,8 @@ WifiMacQueue::DequeueFirstAvailable (WifiMacHeader *hdr, Time ×tamp, Ptr packet = 0; for (PacketQueueI it = m_queue.begin (); it != m_queue.end (); it++) { - if (!it->hdr.IsQosData () || - !blockedPackets->IsBlocked (it->hdr.GetAddr1 (), it->hdr.GetQosTid ())) + if (!it->hdr.IsQosData () + || !blockedPackets->IsBlocked (it->hdr.GetAddr1 (), it->hdr.GetQosTid ())) { *hdr = it->hdr; timestamp = it->tstamp; @@ -329,8 +333,8 @@ WifiMacQueue::PeekFirstAvailable (WifiMacHeader *hdr, Time ×tamp, Cleanup (); for (PacketQueueI it = m_queue.begin (); it != m_queue.end (); it++) { - if (!it->hdr.IsQosData () || - !blockedPackets->IsBlocked (it->hdr.GetAddr1 (), it->hdr.GetQosTid ())) + if (!it->hdr.IsQosData () + || !blockedPackets->IsBlocked (it->hdr.GetAddr1 (), it->hdr.GetQosTid ())) { *hdr = it->hdr; timestamp = it->tstamp; diff --git a/src/wifi/model/wifi-mac-queue.h b/src/wifi/model/wifi-mac-queue.h index f4cb865dd..5e8e0c885 100644 --- a/src/wifi/model/wifi-mac-queue.h +++ b/src/wifi/model/wifi-mac-queue.h @@ -4,7 +4,7 @@ * Copyright (c) 2009 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -35,16 +35,17 @@ class WifiMacParameters; class QosBlockedDestinations; /** + * \ingroup wifi * * This queue implements the timeout procedure described in IEEE * Std. 802.11-2007, section 9.9.1.6, paragraph 6. * - * When a packet is received by the MAC, to be sent to the PHY, - * it is queued in the internal queue after being tagged by the + * When a packet is received by the MAC, to be sent to the PHY, + * it is queued in the internal queue after being tagged by the * current time. * - * When a packet is dequeued, the queue checks its timestamp - * to verify whether or not it should be dropped. If + * When a packet is dequeued, the queue checks its timestamp + * to verify whether or not it should be dropped. If * dot11EDCATableMSDULifetime has elapsed, it is dropped. * Otherwise, it is returned to the caller. */ @@ -65,19 +66,19 @@ public: Ptr Dequeue (WifiMacHeader *hdr); Ptr Peek (WifiMacHeader *hdr); /** - * Searchs and returns, if is present in this queue, first packet having - * address indicated by type equals to addr, and tid - * equals to tid. This method removes the packet from this queue. - * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU + * Searchs and returns, if is present in this queue, first packet having + * address indicated by type equals to addr, and tid + * equals to tid. This method removes the packet from this queue. + * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU * aggregation (A-MSDU). */ Ptr DequeueByTidAndAddress (WifiMacHeader *hdr, - uint8_t tid, + uint8_t tid, WifiMacHeader::AddressType type, Mac48Address addr); /** * Searchs and returns, if is present in this queue, first packet having - * address indicated by type equals to addr, and tid + * address indicated by type equals to addr, and tid * equals to tid. This method doesn't remove the packet from this queue. * Is typically used by ns3::EdcaTxopN in order to perform correct MSDU * aggregation (A-MSDU). @@ -89,7 +90,7 @@ public: /** * If exists, removes packet from queue and returns true. Otherwise it * takes no effects and return false. Deletion of the packet is - * performed in linear time (O(n)). + * performed in linear time (O(n)). */ bool Remove (Ptr packet); /** @@ -104,7 +105,7 @@ public: * if it's a QoS packet with a tid and an address1 fields equal to tid and addr * respectively that index a pending agreement in the BlockAckManager object. * So that packet must not be transmitted until reception of an ADDBA response frame from station - * addressed by addr. This method removes the packet from queue. + * addressed by addr. This method removes the packet from queue. */ Ptr DequeueFirstAvailable (WifiMacHeader *hdr, Time &tStamp, @@ -121,17 +122,18 @@ public: uint32_t GetSize (void); private: struct Item; - + typedef std::list PacketQueue; typedef std::list::reverse_iterator PacketQueueRI; typedef std::list::iterator PacketQueueI; - + void Cleanup (void); Mac48Address GetAddressForPacket (enum WifiMacHeader::AddressType type, PacketQueueI); - - struct Item { - Item (Ptr packet, - const WifiMacHeader &hdr, + + struct Item + { + Item (Ptr packet, + const WifiMacHeader &hdr, Time tstamp); Ptr packet; WifiMacHeader hdr; diff --git a/src/wifi/model/wifi-mac-trailer.cc b/src/wifi/model/wifi-mac-trailer.cc index 9b535d3c9..7b081070c 100644 --- a/src/wifi/model/wifi-mac-trailer.cc +++ b/src/wifi/model/wifi-mac-trailer.cc @@ -25,35 +25,38 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (WifiMacTrailer); WifiMacTrailer::WifiMacTrailer () -{} +{ +} WifiMacTrailer::~WifiMacTrailer () -{} +{ +} -TypeId +TypeId WifiMacTrailer::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WifiMacTrailer") .SetParent () .AddConstructor () - ; + ; return tid; } -TypeId +TypeId WifiMacTrailer::GetInstanceTypeId (void) const { return GetTypeId (); } -void +void WifiMacTrailer::Print (std::ostream &os) const -{} -uint32_t +{ +} +uint32_t WifiMacTrailer::GetSerializedSize (void) const { return WIFI_MAC_FCS_LENGTH; } -void +void WifiMacTrailer::Serialize (Buffer::Iterator start) const { start.Prev (WIFI_MAC_FCS_LENGTH); diff --git a/src/wifi/model/wifi-mac-trailer.h b/src/wifi/model/wifi-mac-trailer.h index d9071abbf..fb5c34b42 100644 --- a/src/wifi/model/wifi-mac-trailer.h +++ b/src/wifi/model/wifi-mac-trailer.h @@ -25,12 +25,19 @@ namespace ns3 { -/** + + +/** * The length in octects of the IEEE 802.11 MAC FCS field */ static const uint16_t WIFI_MAC_FCS_LENGTH = 4; -class WifiMacTrailer : public Trailer +/** + * \ingroup wifi + * + * Implements the IEEE 802.11 MAC trailer + */ +class WifiMacTrailer : public Trailer { public: WifiMacTrailer (); diff --git a/src/wifi/model/wifi-mac.cc b/src/wifi/model/wifi-mac.cc index 20379961f..61208d65c 100644 --- a/src/wifi/model/wifi-mac.cc +++ b/src/wifi/model/wifi-mac.cc @@ -3,7 +3,7 @@ * Copyright (c) 2008 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -29,7 +29,7 @@ NS_OBJECT_ENSURE_REGISTERED (WifiMac); Time WifiMac::GetDefaultMaxPropagationDelay (void) { - // 1000m + // 1000m return Seconds (1000.0 / 300000000.0); } Time @@ -58,8 +58,8 @@ WifiMac::GetDefaultCtsAckDelay (void) Time WifiMac::GetDefaultCtsAckTimeout (void) { - /* Cts_Timeout and Ack_Timeout are specified in the Annex C - (Formal description of MAC operation, see details on the + /* Cts_Timeout and Ack_Timeout are specified in the Annex C + (Formal description of MAC operation, see details on the Trsp timer setting at page 346) */ Time ctsTimeout = GetDefaultSifs (); @@ -126,7 +126,7 @@ WifiMac::GetCompressedBlockAckTimeout (void) const return MicroSeconds (0); } -TypeId +TypeId WifiMac::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WifiMac") @@ -154,17 +154,17 @@ WifiMac::GetTypeId (void) .AddAttribute ("Sifs", "The value of the SIFS constant.", TimeValue (GetDefaultSifs ()), MakeTimeAccessor (&WifiMac::SetSifs, - &WifiMac::GetSifs), + &WifiMac::GetSifs), MakeTimeChecker ()) .AddAttribute ("EifsNoDifs", "The value of EIFS-DIFS", - TimeValue (GetDefaultEifsNoDifs ()), - MakeTimeAccessor (&WifiMac::SetEifsNoDifs, - &WifiMac::GetEifsNoDifs), - MakeTimeChecker ()) + TimeValue (GetDefaultEifsNoDifs ()), + MakeTimeAccessor (&WifiMac::SetEifsNoDifs, + &WifiMac::GetEifsNoDifs), + MakeTimeChecker ()) .AddAttribute ("Slot", "The duration of a Slot.", TimeValue (GetDefaultSlot ()), MakeTimeAccessor (&WifiMac::SetSlot, - &WifiMac::GetSlot), + &WifiMac::GetSlot), MakeTimeChecker ()) .AddAttribute ("Pifs", "The value of the PIFS constant.", TimeValue (GetDefaultSifs () + GetDefaultSlot ()), @@ -176,41 +176,41 @@ WifiMac::GetTypeId (void) MakeTimeAccessor (&WifiMac::m_maxPropagationDelay), MakeTimeChecker ()) .AddAttribute ("Ssid", "The ssid we want to belong to.", - SsidValue (Ssid ("default")), - MakeSsidAccessor (&WifiMac::GetSsid, - &WifiMac::SetSsid), - MakeSsidChecker ()) - .AddTraceSource ("MacTx", + SsidValue (Ssid ("default")), + MakeSsidAccessor (&WifiMac::GetSsid, + &WifiMac::SetSsid), + MakeSsidChecker ()) + .AddTraceSource ("MacTx", "A packet has been received from higher layers and is being processed in preparation for " "queueing for transmission.", MakeTraceSourceAccessor (&WifiMac::m_macTxTrace)) - .AddTraceSource ("MacTxDrop", + .AddTraceSource ("MacTxDrop", "A packet has been dropped in the MAC layer before being queued for transmission.", MakeTraceSourceAccessor (&WifiMac::m_macTxDropTrace)) - .AddTraceSource ("MacPromiscRx", + .AddTraceSource ("MacPromiscRx", "A packet has been received by this device, has been passed up from the physical layer " "and is being forwarded up the local protocol stack. This is a promiscuous trace,", MakeTraceSourceAccessor (&WifiMac::m_macPromiscRxTrace)) - .AddTraceSource ("MacRx", + .AddTraceSource ("MacRx", "A packet has been received by this device, has been passed up from the physical layer " "and is being forwarded up the local protocol stack. This is a non-promiscuous trace,", MakeTraceSourceAccessor (&WifiMac::m_macRxTrace)) - .AddTraceSource ("MacRxDrop", + .AddTraceSource ("MacRxDrop", "A packet has been dropped in the MAC layer after it has been passed up from the physical " "layer.", MakeTraceSourceAccessor (&WifiMac::m_macRxDropTrace)) #if 0 // Not currently implemented in this device - .AddTraceSource ("Sniffer", + .AddTraceSource ("Sniffer", "Trace source simulating a non-promiscuous packet sniffer attached to the device", MakeTraceSourceAccessor (&WifiMac::m_snifferTrace)) #endif - ; + ; return tid; } -void +void WifiMac::SetMaxPropagationDelay (Time delay) { m_maxPropagationDelay = delay; @@ -227,32 +227,32 @@ WifiMac::GetMaxPropagationDelay (void) const return m_maxPropagationDelay; } -void +void WifiMac::NotifyTx (Ptr packet) { m_macTxTrace (packet); } -void -WifiMac::NotifyTxDrop (Ptr packet) +void +WifiMac::NotifyTxDrop (Ptr packet) { m_macTxDropTrace (packet); } -void -WifiMac::NotifyRx (Ptr packet) +void +WifiMac::NotifyRx (Ptr packet) { m_macRxTrace (packet); } -void -WifiMac::NotifyPromiscRx (Ptr packet) +void +WifiMac::NotifyPromiscRx (Ptr packet) { m_macPromiscRxTrace (packet); } -void -WifiMac::NotifyRxDrop (Ptr packet) +void +WifiMac::NotifyRxDrop (Ptr packet) { m_macRxDropTrace (packet); } @@ -260,185 +260,178 @@ WifiMac::NotifyRxDrop (Ptr packet) void WifiMac::ConfigureStandard (enum WifiPhyStandard standard) { - switch (standard) { - case WIFI_PHY_STANDARD_80211a: - Configure80211a (); - break; - case WIFI_PHY_STANDARD_80211b: - Configure80211b (); - break; - case WIFI_PHY_STANDARD_80211g: - Configure80211g (); - break; - case WIFI_PHY_STANDARD_80211_10Mhz: - Configure80211_10Mhz (); - break; - case WIFI_PHY_STANDARD_80211_5Mhz: - Configure80211_5Mhz (); - break; - case WIFI_PHY_STANDARD_holland: - Configure80211a (); - break; - case WIFI_PHY_STANDARD_80211p_CCH: - Configure80211p_CCH (); - break; - case WIFI_PHY_STANDARD_80211p_SCH: - Configure80211p_SCH (); - break; - default: - NS_ASSERT (false); - break; - } + switch (standard) + { + case WIFI_PHY_STANDARD_80211a: + Configure80211a (); + break; + case WIFI_PHY_STANDARD_80211b: + Configure80211b (); + break; + case WIFI_PHY_STANDARD_80211g: + Configure80211g (); + break; + case WIFI_PHY_STANDARD_80211_10Mhz: + Configure80211_10Mhz (); + break; + case WIFI_PHY_STANDARD_80211_5Mhz: + Configure80211_5Mhz (); + break; + case WIFI_PHY_STANDARD_holland: + Configure80211a (); + break; + case WIFI_PHY_STANDARD_80211p_CCH: + Configure80211p_CCH (); + break; + case WIFI_PHY_STANDARD_80211p_SCH: + Configure80211p_SCH (); + break; + default: + NS_ASSERT (false); + break; + } FinishConfigureStandard (standard); } void WifiMac::Configure80211a (void) { - SetSifs(MicroSeconds(16)); - SetSlot(MicroSeconds(9)); - SetEifsNoDifs(MicroSeconds(16+44)); - SetPifs(MicroSeconds(16+9)); - SetCtsTimeout(MicroSeconds(16+44+9+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); - SetAckTimeout(MicroSeconds(16+44+9+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); + SetSifs (MicroSeconds (16)); + SetSlot (MicroSeconds (9)); + SetEifsNoDifs (MicroSeconds (16 + 44)); + SetPifs (MicroSeconds (16 + 9)); + SetCtsTimeout (MicroSeconds (16 + 44 + 9 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); + SetAckTimeout (MicroSeconds (16 + 44 + 9 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); } void WifiMac::Configure80211b (void) { - SetSifs(MicroSeconds(10)); - SetSlot(MicroSeconds(20)); - SetEifsNoDifs(MicroSeconds(10+304)); - SetPifs(MicroSeconds(10+20)); - SetCtsTimeout(MicroSeconds(10+304+20+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); - SetAckTimeout(MicroSeconds(10+304+20+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); + SetSifs (MicroSeconds (10)); + SetSlot (MicroSeconds (20)); + SetEifsNoDifs (MicroSeconds (10 + 304)); + SetPifs (MicroSeconds (10 + 20)); + SetCtsTimeout (MicroSeconds (10 + 304 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); + SetAckTimeout (MicroSeconds (10 + 304 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); } void WifiMac::Configure80211g (void) { - SetSifs(MicroSeconds(10)); + SetSifs (MicroSeconds (10)); // Note no support for Short Slot Time as yet - SetSlot(MicroSeconds(20)); - SetEifsNoDifs(MicroSeconds(10+304)); - SetPifs(MicroSeconds(10+20)); - SetCtsTimeout(MicroSeconds(10+304+20+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); - SetAckTimeout(MicroSeconds(10+304+20+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); + SetSlot (MicroSeconds (20)); + SetEifsNoDifs (MicroSeconds (10 + 304)); + SetPifs (MicroSeconds (10 + 20)); + SetCtsTimeout (MicroSeconds (10 + 304 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); + SetAckTimeout (MicroSeconds (10 + 304 + 20 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); } void WifiMac::Configure80211_10Mhz (void) { - SetSifs(MicroSeconds(32)); - SetSlot(MicroSeconds(13)); - SetEifsNoDifs(MicroSeconds(32+88)); - SetPifs(MicroSeconds(32+13)); - SetCtsTimeout(MicroSeconds(32+88+13+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); - SetAckTimeout(MicroSeconds(32+88+13+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); + SetSifs (MicroSeconds (32)); + SetSlot (MicroSeconds (13)); + SetEifsNoDifs (MicroSeconds (32 + 88)); + SetPifs (MicroSeconds (32 + 13)); + SetCtsTimeout (MicroSeconds (32 + 88 + 13 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); + SetAckTimeout (MicroSeconds (32 + 88 + 13 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); } void WifiMac::Configure80211_5Mhz (void) { - SetSifs(MicroSeconds(64)); - SetSlot(MicroSeconds(21)); - SetEifsNoDifs(MicroSeconds(64+176)); - SetPifs(MicroSeconds(64+21)); - SetCtsTimeout(MicroSeconds(64+176+21+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); - SetAckTimeout(MicroSeconds(64+176+21+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); + SetSifs (MicroSeconds (64)); + SetSlot (MicroSeconds (21)); + SetEifsNoDifs (MicroSeconds (64 + 176)); + SetPifs (MicroSeconds (64 + 21)); + SetCtsTimeout (MicroSeconds (64 + 176 + 21 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); + SetAckTimeout (MicroSeconds (64 + 176 + 21 + GetDefaultMaxPropagationDelay ().GetMicroSeconds () * 2)); } void WifiMac::Configure80211p_CCH (void) { - SetSifs(MicroSeconds(32)); - SetSlot(MicroSeconds(16)); - SetEifsNoDifs(MicroSeconds(32+88)); - SetPifs(MicroSeconds(32+16)); - SetCtsTimeout(MicroSeconds(32+88+16+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); - SetAckTimeout(MicroSeconds(32+88+16+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); + Configure80211_10Mhz (); } void WifiMac::Configure80211p_SCH (void) { - SetSifs(MicroSeconds(32)); - SetSlot(MicroSeconds(16)); - SetEifsNoDifs(MicroSeconds(32+88)); - SetPifs(MicroSeconds(32+16)); - SetCtsTimeout(MicroSeconds(32+88+16+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); - SetAckTimeout(MicroSeconds(32+88+16+GetDefaultMaxPropagationDelay().GetMicroSeconds ()*2)); + Configure80211_10Mhz (); } void WifiMac::ConfigureDcf (Ptr dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac) { /* see IEE802.11 section 7.3.2.29 */ - switch (ac) { - case AC_VO: - dcf->SetMinCw ((cwmin+1)/4-1); - dcf->SetMaxCw ((cwmin+1)/2-1); - dcf->SetAifsn (2); - break; - case AC_VI: - dcf->SetMinCw ((cwmin+1)/2-1); - dcf->SetMaxCw (cwmin); - dcf->SetAifsn (2); - break; - case AC_BE: - dcf->SetMinCw (cwmin); - dcf->SetMaxCw (cwmax); - dcf->SetAifsn (3); - break; - case AC_BK: - dcf->SetMinCw (cwmin); - dcf->SetMaxCw (cwmax); - dcf->SetAifsn (7); - break; - case AC_BE_NQOS: - dcf->SetMinCw (cwmin); - dcf->SetMaxCw (cwmax); - dcf->SetAifsn (2); - break; - case AC_UNDEF: - NS_FATAL_ERROR ("I don't know what to do with this"); - break; - } + switch (ac) + { + case AC_VO: + dcf->SetMinCw ((cwmin + 1) / 4 - 1); + dcf->SetMaxCw ((cwmin + 1) / 2 - 1); + dcf->SetAifsn (2); + break; + case AC_VI: + dcf->SetMinCw ((cwmin + 1) / 2 - 1); + dcf->SetMaxCw (cwmin); + dcf->SetAifsn (2); + break; + case AC_BE: + dcf->SetMinCw (cwmin); + dcf->SetMaxCw (cwmax); + dcf->SetAifsn (3); + break; + case AC_BK: + dcf->SetMinCw (cwmin); + dcf->SetMaxCw (cwmax); + dcf->SetAifsn (7); + break; + case AC_BE_NQOS: + dcf->SetMinCw (cwmin); + dcf->SetMaxCw (cwmax); + dcf->SetAifsn (2); + break; + case AC_UNDEF: + NS_FATAL_ERROR ("I don't know what to do with this"); + break; + } } void WifiMac::ConfigureCCHDcf (Ptr dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac) { /* see IEEE 1609.4-2006 section 6.3.1, Table 1 */ - switch (ac) { - case AC_VO: - dcf->SetMinCw ((cwmin+1)/4-1); - dcf->SetMaxCw ((cwmin+1)/2-1); - dcf->SetAifsn (2); - break; - case AC_VI: - dcf->SetMinCw ((cwmin+1)/4-1); - dcf->SetMaxCw ((cwmin+1)/2-1); - dcf->SetAifsn (3); - break; - case AC_BE: - dcf->SetMinCw ((cwmin+1)/2-1); - dcf->SetMaxCw (cwmin); - dcf->SetAifsn (6); - break; - case AC_BK: - dcf->SetMinCw (cwmin); - dcf->SetMaxCw (cwmax); - dcf->SetAifsn (9); - break; - case AC_BE_NQOS: - dcf->SetMinCw (cwmin); - dcf->SetMaxCw (cwmax); - dcf->SetAifsn (2); - break; - case AC_UNDEF: - NS_FATAL_ERROR ("I don't know what to do with this"); - break; - } + switch (ac) + { + case AC_VO: + dcf->SetMinCw ((cwmin + 1) / 4 - 1); + dcf->SetMaxCw ((cwmin + 1) / 2 - 1); + dcf->SetAifsn (2); + break; + case AC_VI: + dcf->SetMinCw ((cwmin + 1) / 4 - 1); + dcf->SetMaxCw ((cwmin + 1) / 2 - 1); + dcf->SetAifsn (3); + break; + case AC_BE: + dcf->SetMinCw ((cwmin + 1) / 2 - 1); + dcf->SetMaxCw (cwmin); + dcf->SetAifsn (6); + break; + case AC_BK: + dcf->SetMinCw (cwmin); + dcf->SetMaxCw (cwmax); + dcf->SetAifsn (9); + break; + case AC_BE_NQOS: + dcf->SetMinCw (cwmin); + dcf->SetMaxCw (cwmax); + dcf->SetAifsn (2); + break; + case AC_UNDEF: + NS_FATAL_ERROR ("I don't know what to do with this"); + break; + } } } // namespace ns3 diff --git a/src/wifi/model/wifi-mac.h b/src/wifi/model/wifi-mac.h index 0b3285f16..2a1b91ac0 100644 --- a/src/wifi/model/wifi-mac.h +++ b/src/wifi/model/wifi-mac.h @@ -3,7 +3,7 @@ * Copyright (c) 2008 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -34,6 +34,7 @@ class Dcf; /** * \brief base class for all MAC-level wifi objects. + * \ingroup wifi * * This class encapsulates all the low-level MAC functionality * DCA, EDCA, etc) and all the high-level MAC functionality @@ -44,7 +45,7 @@ class WifiMac : public Object { public: static TypeId GetTypeId (void); - + /** * \param slotTime the slot duration */ @@ -184,31 +185,31 @@ public: virtual Time GetCompressedBlockAckTimeout (void) const; /** - * Public method used to fire a MacTx trace. Implemented for encapsulation + * Public method used to fire a MacTx trace. Implemented for encapsulation * purposes. */ void NotifyTx (Ptr packet); /** - * Public method used to fire a MacTxDrop trace. Implemented for encapsulation + * Public method used to fire a MacTxDrop trace. Implemented for encapsulation * purposes. */ void NotifyTxDrop (Ptr packet); /** - * Public method used to fire a MacRx trace. Implemented for encapsulation + * Public method used to fire a MacRx trace. Implemented for encapsulation * purposes. */ void NotifyRx (Ptr packet); /** - * Public method used to fire a MacPromiscRx trace. Implemented for encapsulation + * Public method used to fire a MacPromiscRx trace. Implemented for encapsulation * purposes. */ void NotifyPromiscRx (Ptr packet); /** - * Public method used to fire a MacRxDrop trace. Implemented for encapsulation + * Public method used to fire a MacRxDrop trace. Implemented for encapsulation * purposes. */ void NotifyRxDrop (Ptr packet); @@ -269,7 +270,7 @@ private: /** * The trace source fired for packets successfully received by the device - * immediately before being forwarded up to higher layers (at the L2/L3 + * immediately before being forwarded up to higher layers (at the L2/L3 * transition). This is a promiscuous trace. * * \see class CallBackTraceSource @@ -278,7 +279,7 @@ private: /** * The trace source fired for packets successfully received by the device - * immediately before being forwarded up to higher layers (at the L2/L3 + * immediately before being forwarded up to higher layers (at the L2/L3 * transition). This is a non- promiscuous trace. * * \see class CallBackTraceSource diff --git a/src/wifi/model/wifi-mode.cc b/src/wifi/model/wifi-mode.cc index fb735cd20..bc2e09948 100644 --- a/src/wifi/model/wifi-mode.cc +++ b/src/wifi/model/wifi-mode.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006,2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -41,37 +41,37 @@ std::istream & operator >> (std::istream &is, WifiMode &mode) return is; } -uint32_t +uint32_t WifiMode::GetBandwidth (void) const { struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); return item->bandwidth; } -uint32_t +uint32_t WifiMode::GetPhyRate (void) const { struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); return item->phyRate; } -uint32_t +uint32_t WifiMode::GetDataRate (void) const { struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); return item->dataRate; } -enum WifiCodeRate +enum WifiCodeRate WifiMode::GetCodeRate (void) const { struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); return item->codingRate; } -uint8_t +uint8_t WifiMode::GetConstellationSize (void) const { struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); return item->constellationSize; } -std::string +std::string WifiMode::GetUniqueName (void) const { // needed for ostream printing of the invalid mode @@ -84,7 +84,7 @@ WifiMode::IsMandatory (void) const struct WifiModeFactory::WifiModeItem *item = WifiModeFactory::GetFactory ()->Get (m_uid); return item->isMandatory; } -uint32_t +uint32_t WifiMode::GetUid (void) const { return m_uid; @@ -97,10 +97,12 @@ WifiMode::GetModulationClass () const } WifiMode::WifiMode () : m_uid (0) -{} +{ +} WifiMode::WifiMode (uint32_t uid) : m_uid (uid) -{} +{ +} WifiMode::WifiMode (std::string name) { *this = WifiModeFactory::GetFactory ()->Search (name); @@ -109,10 +111,11 @@ WifiMode::WifiMode (std::string name) ATTRIBUTE_HELPER_CPP (WifiMode); WifiModeFactory::WifiModeFactory () -{} +{ +} -WifiMode +WifiMode WifiModeFactory::CreateWifiMode (std::string uniqueName, enum WifiModulationClass modClass, bool isMandatory, @@ -134,21 +137,22 @@ WifiModeFactory::CreateWifiMode (std::string uniqueName, item->codingRate = codingRate; - switch (codingRate) { - case WIFI_CODE_RATE_3_4: - item->phyRate = dataRate * 4 / 3; - break; - case WIFI_CODE_RATE_2_3: - item->phyRate = dataRate * 3 / 2; - break; - case WIFI_CODE_RATE_1_2: - item->phyRate = dataRate * 2 / 1; - break; - case WIFI_CODE_RATE_UNDEFINED: - default: - item->phyRate = dataRate; - break; - } + switch (codingRate) + { + case WIFI_CODE_RATE_3_4: + item->phyRate = dataRate * 4 / 3; + break; + case WIFI_CODE_RATE_2_3: + item->phyRate = dataRate * 3 / 2; + break; + case WIFI_CODE_RATE_1_2: + item->phyRate = dataRate * 2 / 1; + break; + case WIFI_CODE_RATE_UNDEFINED: + default: + item->phyRate = dataRate; + break; + } // Check for compatibility between modulation class and coding // rate. If modulation class is DSSS then coding rate must be @@ -159,7 +163,7 @@ WifiModeFactory::CreateWifiMode (std::string uniqueName, if ((codingRate == WIFI_CODE_RATE_UNDEFINED) != (modClass == WIFI_MOD_CLASS_DSSS)) { NS_FATAL_ERROR ("Error in creation of WifiMode named " << uniqueName << std::endl - << "Code rate must be WIFI_CODE_RATE_UNDEFINED iff Modulation Class is WIFI_MOD_CLASS_DSSS"); + << "Code rate must be WIFI_CODE_RATE_UNDEFINED iff Modulation Class is WIFI_MOD_CLASS_DSSS"); } item->constellationSize = constellationSize; @@ -176,9 +180,9 @@ WifiModeFactory::Search (std::string name) for (i = m_itemList.begin (); i != m_itemList.end (); i++) { if (i->uniqueUid == name) - { + { return WifiMode (j); - } + } j++; } @@ -211,9 +215,9 @@ WifiModeFactory::AllocateUid (std::string uniqueUid) i != m_itemList.end (); i++) { if (i->uniqueUid == uniqueUid) - { - return j; - } + { + return j; + } j++; } uint32_t uid = m_itemList.size (); diff --git a/src/wifi/model/wifi-mode.h b/src/wifi/model/wifi-mode.h index 6175ce8c1..5f87e836f 100644 --- a/src/wifi/model/wifi-mode.h +++ b/src/wifi/model/wifi-mode.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006,2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -33,7 +33,8 @@ namespace ns3 { * This enumeration defines the modulation classes per IEEE * 802.11-2007, Section 9.6.1, Table 9-2. */ -enum WifiModulationClass { +enum WifiModulationClass +{ /** Modulation class unknown or unspecified. A WifiMode with this WifiModulationClass has not been properly initialised. */ WIFI_MOD_CLASS_UNKNOWN = 0, @@ -63,7 +64,8 @@ enum WifiModulationClass { * coding stage in their generation should have this parameter set to * WIFI_CODE_RATE_UNDEFINED. */ -enum WifiCodeRate { +enum WifiCodeRate +{ /** No explicit coding (e.g., DSSS rates) */ WIFI_CODE_RATE_UNDEFINED, /** Rate 3/4 */ @@ -76,6 +78,7 @@ enum WifiCodeRate { /** * \brief represent a single transmission mode + * \ingroup wifi * * A WifiMode is implemented by a single integer which is used * to lookup in a global array the characteristics of the @@ -84,7 +87,7 @@ enum WifiCodeRate { */ class WifiMode { - public: +public: /** * \returns the number of Hz used by this signal */ @@ -206,9 +209,9 @@ public: uint8_t constellationSize); private: - friend class WifiMode; + friend class WifiMode; friend std::istream & operator >> (std::istream &is, WifiMode &mode); - static WifiModeFactory *GetFactory (); + static WifiModeFactory* GetFactory (); WifiModeFactory (); /** @@ -216,7 +219,8 @@ private: * The integer stored in a WifiMode is in fact an index * in an array of WifiModeItem objects. */ - struct WifiModeItem { + struct WifiModeItem + { std::string uniqueUid; uint32_t bandwidth; uint32_t dataRate; @@ -229,7 +233,7 @@ private: WifiMode Search (std::string name); uint32_t AllocateUid (std::string uniqueName); - WifiModeItem *Get (uint32_t uid); + WifiModeItem* Get (uint32_t uid); typedef std::vector WifiModeItemList; WifiModeItemList m_itemList; diff --git a/src/wifi/model/wifi-net-device.cc b/src/wifi/model/wifi-net-device.cc index 0026b6d82..8accbbb09 100644 --- a/src/wifi/model/wifi-net-device.cc +++ b/src/wifi/model/wifi-net-device.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -36,7 +36,7 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (WifiNetDevice); -TypeId +TypeId WifiNetDevice::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WifiNetDevice") @@ -66,7 +66,7 @@ WifiNetDevice::GetTypeId (void) MakePointerAccessor (&WifiNetDevice::SetRemoteStationManager, &WifiNetDevice::GetRemoteStationManager), MakePointerChecker ()) - ; + ; return tid; } @@ -107,11 +107,11 @@ WifiNetDevice::DoStart (void) void WifiNetDevice::CompleteConfig (void) { - if (m_mac == 0 || - m_phy == 0 || - m_stationManager == 0 || - m_node == 0 || - m_configComplete) + if (m_mac == 0 + || m_phy == 0 + || m_stationManager == 0 + || m_node == 0 + || m_configComplete) { return; } @@ -123,72 +123,72 @@ WifiNetDevice::CompleteConfig (void) m_stationManager->SetupPhy (m_phy); m_configComplete = true; } - -void + +void WifiNetDevice::SetMac (Ptr mac) { m_mac = mac; CompleteConfig (); } -void +void WifiNetDevice::SetPhy (Ptr phy) { m_phy = phy; CompleteConfig (); } -void +void WifiNetDevice::SetRemoteStationManager (Ptr manager) { m_stationManager = manager; CompleteConfig (); } -Ptr +Ptr WifiNetDevice::GetMac (void) const { return m_mac; } -Ptr +Ptr WifiNetDevice::GetPhy (void) const { return m_phy; } -Ptr +Ptr WifiNetDevice::GetRemoteStationManager (void) const { return m_stationManager; } -void -WifiNetDevice::SetIfIndex(const uint32_t index) +void +WifiNetDevice::SetIfIndex (const uint32_t index) { m_ifIndex = index; } -uint32_t -WifiNetDevice::GetIfIndex(void) const +uint32_t +WifiNetDevice::GetIfIndex (void) const { return m_ifIndex; } -Ptr +Ptr WifiNetDevice::GetChannel (void) const { return m_phy->GetChannel (); } -Ptr +Ptr WifiNetDevice::DoGetChannel (void) const { return m_phy->GetChannel (); } -void +void WifiNetDevice::SetAddress (Address address) { m_mac->SetAddress (Mac48Address::ConvertFrom (address)); } -Address +Address WifiNetDevice::GetAddress (void) const { return m_mac->GetAddress (); } -bool +bool WifiNetDevice::SetMtu (const uint16_t mtu) { if (mtu > MAX_MSDU_SIZE - LLC_SNAP_HEADER_LENGTH) @@ -198,37 +198,37 @@ WifiNetDevice::SetMtu (const uint16_t mtu) m_mtu = mtu; return true; } -uint16_t +uint16_t WifiNetDevice::GetMtu (void) const { return m_mtu; } -bool +bool WifiNetDevice::IsLinkUp (void) const { return m_phy != 0 && m_linkUp; } -void +void WifiNetDevice::AddLinkChangeCallback (Callback callback) { m_linkChanges.ConnectWithoutContext (callback); } -bool +bool WifiNetDevice::IsBroadcast (void) const { return true; } -Address +Address WifiNetDevice::GetBroadcast (void) const { return Mac48Address::GetBroadcast (); } -bool +bool WifiNetDevice::IsMulticast (void) const { return true; } -Address +Address WifiNetDevice::GetMulticast (Ipv4Address multicastGroup) const { return Mac48Address::GetMulticast (multicastGroup); @@ -237,17 +237,17 @@ Address WifiNetDevice::GetMulticast (Ipv6Address addr) const { return Mac48Address::GetMulticast (addr); } -bool +bool WifiNetDevice::IsPointToPoint (void) const { return false; } -bool +bool WifiNetDevice::IsBridge (void) const { return false; } -bool +bool WifiNetDevice::Send (Ptr packet, const Address& dest, uint16_t protocolNumber) { NS_ASSERT (Mac48Address::IsMatchingType (dest)); @@ -262,23 +262,23 @@ WifiNetDevice::Send (Ptr packet, const Address& dest, uint16_t protocolN m_mac->Enqueue (packet, realTo); return true; } -Ptr +Ptr WifiNetDevice::GetNode (void) const { return m_node; } -void +void WifiNetDevice::SetNode (Ptr node) { m_node = node; CompleteConfig (); } -bool +bool WifiNetDevice::NeedsArp (void) const { return true; } -void +void WifiNetDevice::SetReceiveCallback (NetDevice::ReceiveCallback cb) { m_forwardUp = cb; diff --git a/src/wifi/model/wifi-net-device.h b/src/wifi/model/wifi-net-device.h index cf4fe2911..4aaf76a96 100644 --- a/src/wifi/model/wifi-net-device.h +++ b/src/wifi/model/wifi-net-device.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -34,13 +34,21 @@ class WifiChannel; class WifiPhy; class WifiMac; +/** + * \defgroup wifi Wifi Models + * + * This section documents the API of the ns-3 Wifi module. For a generic functional description, please refer to the ns-3 manual. + */ + + /** * \brief Hold together all Wifi-related objects. + * \ingroup wifi * * This class holds together ns3::WifiChannel, ns3::WifiPhy, * ns3::WifiMac, and, ns3::WifiRemoteStationManager. */ -class WifiNetDevice : public NetDevice +class WifiNetDevice : public NetDevice { public: static TypeId GetTypeId (void); @@ -75,8 +83,8 @@ public: // inherited from NetDevice base class. - virtual void SetIfIndex(const uint32_t index); - virtual uint32_t GetIfIndex(void) const; + virtual void SetIfIndex (const uint32_t index); + virtual uint32_t GetIfIndex (void) const; virtual Ptr GetChannel (void) const; virtual void SetAddress (Address address); virtual Address GetAddress (void) const; @@ -90,7 +98,7 @@ public: virtual Address GetMulticast (Ipv4Address multicastGroup) const; virtual bool IsPointToPoint (void) const; virtual bool IsBridge (void) const; - virtual bool Send(Ptr packet, const Address& dest, uint16_t protocolNumber); + virtual bool Send (Ptr packet, const Address& dest, uint16_t protocolNumber); virtual Ptr GetNode (void) const; virtual void SetNode (Ptr node); virtual bool NeedsArp (void) const; @@ -98,12 +106,11 @@ public: virtual Address GetMulticast (Ipv6Address addr) const; - virtual bool SendFrom(Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber); + virtual bool SendFrom (Ptr packet, const Address& source, const Address& dest, uint16_t protocolNumber); virtual void SetPromiscReceiveCallback (PromiscReceiveCallback cb); virtual bool SupportsSendFrom (void) const; private: - // This value conforms to the 802.11 specification static const uint16_t MAX_MSDU_SIZE = 2304; diff --git a/src/wifi/model/wifi-phy-standard.h b/src/wifi/model/wifi-phy-standard.h index 87eb6c302..0f11c2a12 100644 --- a/src/wifi/model/wifi-phy-standard.h +++ b/src/wifi/model/wifi-phy-standard.h @@ -3,7 +3,7 @@ * Copyright (c) 2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -22,7 +22,13 @@ namespace ns3 { -enum WifiPhyStandard { + +/** + * \ingroup wifi + * Identifies the PHY specification that a Wifi device is configured to use. + */ +enum WifiPhyStandard +{ /** OFDM PHY for the 5 GHz band (Clause 17) */ WIFI_PHY_STANDARD_80211a, /** DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18) */ diff --git a/src/wifi/model/wifi-phy-state-helper.cc b/src/wifi/model/wifi-phy-state-helper.cc index 830f723ec..8391dc58c 100644 --- a/src/wifi/model/wifi-phy-state-helper.cc +++ b/src/wifi/model/wifi-phy-state-helper.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -28,7 +28,7 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (WifiPhyStateHelper); -TypeId +TypeId WifiPhyStateHelper::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WifiPhyStateHelper") @@ -45,7 +45,7 @@ WifiPhyStateHelper::GetTypeId (void) MakeTraceSourceAccessor (&WifiPhyStateHelper::m_rxErrorTrace)) .AddTraceSource ("Tx", "Packet transmission is starting.", MakeTraceSourceAccessor (&WifiPhyStateHelper::m_txTrace)) - ; + ; return tid; } @@ -54,58 +54,58 @@ WifiPhyStateHelper::WifiPhyStateHelper () m_endTx (Seconds (0)), m_endRx (Seconds (0)), m_endCcaBusy (Seconds (0)), - m_endSwitching (Seconds (0)), + m_endSwitching (Seconds (0)), m_startTx (Seconds (0)), m_startRx (Seconds (0)), m_startCcaBusy (Seconds (0)), - m_startSwitching (Seconds (0)), + m_startSwitching (Seconds (0)), m_previousStateChangeTime (Seconds (0)) { NS_LOG_FUNCTION (this); } -void +void WifiPhyStateHelper::SetReceiveOkCallback (WifiPhy::RxOkCallback callback) { m_rxOkCallback = callback; } -void +void WifiPhyStateHelper::SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback) { m_rxErrorCallback = callback; } -void +void WifiPhyStateHelper::RegisterListener (WifiPhyListener *listener) { m_listeners.push_back (listener); } -bool +bool WifiPhyStateHelper::IsStateIdle (void) { return (GetState () == WifiPhy::IDLE); } -bool +bool WifiPhyStateHelper::IsStateBusy (void) { return (GetState () != WifiPhy::IDLE); } -bool +bool WifiPhyStateHelper::IsStateCcaBusy (void) { return (GetState () == WifiPhy::CCA_BUSY); } -bool +bool WifiPhyStateHelper::IsStateRx (void) { return (GetState () == WifiPhy::RX); } -bool +bool WifiPhyStateHelper::IsStateTx (void) { return (GetState () == WifiPhy::TX); } -bool +bool WifiPhyStateHelper::IsStateSwitching (void) { return (GetState () == WifiPhy::SWITCHING); @@ -124,104 +124,111 @@ WifiPhyStateHelper::GetDelayUntilIdle (void) { Time retval; - switch (GetState ()) { - case WifiPhy::RX: - retval = m_endRx - Simulator::Now (); - break; - case WifiPhy::TX: - retval = m_endTx - Simulator::Now (); - break; - case WifiPhy::CCA_BUSY: - retval = m_endCcaBusy - Simulator::Now (); - break; - case WifiPhy::SWITCHING: - retval = m_endSwitching - Simulator::Now (); - break; - case WifiPhy::IDLE: - retval = Seconds (0); - break; - default: - NS_FATAL_ERROR ("Invalid WifiPhy state."); - retval = Seconds (0); - break; - } + switch (GetState ()) + { + case WifiPhy::RX: + retval = m_endRx - Simulator::Now (); + break; + case WifiPhy::TX: + retval = m_endTx - Simulator::Now (); + break; + case WifiPhy::CCA_BUSY: + retval = m_endCcaBusy - Simulator::Now (); + break; + case WifiPhy::SWITCHING: + retval = m_endSwitching - Simulator::Now (); + break; + case WifiPhy::IDLE: + retval = Seconds (0); + break; + default: + NS_FATAL_ERROR ("Invalid WifiPhy state."); + retval = Seconds (0); + break; + } retval = Max (retval, Seconds (0)); return retval; } -Time +Time WifiPhyStateHelper::GetLastRxStartTime (void) const { return m_startRx; } -enum WifiPhy::State +enum WifiPhy::State WifiPhyStateHelper::GetState (void) { - if (m_endTx > Simulator::Now ()) + if (m_endTx > Simulator::Now ()) { return WifiPhy::TX; - } - else if (m_rxing) + } + else if (m_rxing) { return WifiPhy::RX; - } - else if (m_endSwitching > Simulator::Now ()) - { + } + else if (m_endSwitching > Simulator::Now ()) + { return WifiPhy::SWITCHING; } - else if (m_endCcaBusy > Simulator::Now ()) + else if (m_endCcaBusy > Simulator::Now ()) { return WifiPhy::CCA_BUSY; - } - else + } + else { return WifiPhy::IDLE; } } -void +void WifiPhyStateHelper::NotifyTxStart (Time duration) { - for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) { - (*i)->NotifyTxStart (duration); - } + for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) + { + (*i)->NotifyTxStart (duration); + } } -void +void WifiPhyStateHelper::NotifyRxStart (Time duration) { - for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) { - (*i)->NotifyRxStart (duration); - } + for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) + { + (*i)->NotifyRxStart (duration); + } } -void +void WifiPhyStateHelper::NotifyRxEndOk (void) { - for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) { - (*i)->NotifyRxEndOk (); - } + for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) + { + (*i)->NotifyRxEndOk (); + } } -void +void WifiPhyStateHelper::NotifyRxEndError (void) { - for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) { - (*i)->NotifyRxEndError (); - } + for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) + { + (*i)->NotifyRxEndError (); + } } -void +void WifiPhyStateHelper::NotifyMaybeCcaBusyStart (Time duration) { - for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) { - (*i)->NotifyMaybeCcaBusyStart (duration); - } + for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) + { + (*i)->NotifyMaybeCcaBusyStart (duration); + } } -void +void WifiPhyStateHelper::NotifySwitchingStart (Time duration) { - for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) { - (*i)->NotifySwitchingStart (duration); - } + for (Listeners::const_iterator i = m_listeners.begin (); i != m_listeners.end (); i++) + { + (*i)->NotifySwitchingStart (duration); + } } void @@ -230,49 +237,52 @@ WifiPhyStateHelper::LogPreviousIdleAndCcaBusyStates (void) Time now = Simulator::Now (); Time idleStart = Max (m_endCcaBusy, m_endRx); idleStart = Max (idleStart, m_endTx); - idleStart = Max (idleStart, m_endSwitching); + idleStart = Max (idleStart, m_endSwitching); NS_ASSERT (idleStart <= now); - if (m_endCcaBusy > m_endRx && - m_endCcaBusy > m_endSwitching && - m_endCcaBusy > m_endTx) { - Time ccaBusyStart = Max (m_endTx, m_endRx); - ccaBusyStart = Max (ccaBusyStart, m_startCcaBusy); - ccaBusyStart = Max (ccaBusyStart, m_endSwitching); - m_stateLogger (ccaBusyStart, idleStart - ccaBusyStart, WifiPhy::CCA_BUSY); - } + if (m_endCcaBusy > m_endRx + && m_endCcaBusy > m_endSwitching + && m_endCcaBusy > m_endTx) + { + Time ccaBusyStart = Max (m_endTx, m_endRx); + ccaBusyStart = Max (ccaBusyStart, m_startCcaBusy); + ccaBusyStart = Max (ccaBusyStart, m_endSwitching); + m_stateLogger (ccaBusyStart, idleStart - ccaBusyStart, WifiPhy::CCA_BUSY); + } m_stateLogger (idleStart, now - idleStart, WifiPhy::IDLE); } void -WifiPhyStateHelper::SwitchToTx (Time txDuration, Ptr packet, WifiMode txMode, - WifiPreamble preamble, uint8_t txPower) +WifiPhyStateHelper::SwitchToTx (Time txDuration, Ptr packet, WifiMode txMode, + WifiPreamble preamble, uint8_t txPower) { m_txTrace (packet, txMode, preamble, txPower); NotifyTxStart (txDuration); Time now = Simulator::Now (); - switch (GetState ()) { - case WifiPhy::RX: - /* The packet which is being received as well - * as its endRx event are cancelled by the caller. - */ - m_rxing = false; - m_stateLogger (m_startRx, now - m_startRx, WifiPhy::RX); - m_endRx = now; - break; - case WifiPhy::CCA_BUSY: { - Time ccaStart = Max (m_endRx, m_endTx); - ccaStart = Max (ccaStart, m_startCcaBusy); - ccaStart = Max (ccaStart, m_endSwitching); - m_stateLogger (ccaStart, now - ccaStart, WifiPhy::CCA_BUSY); - } break; - case WifiPhy::IDLE: - LogPreviousIdleAndCcaBusyStates (); - break; - case WifiPhy::SWITCHING: - default: - NS_FATAL_ERROR ("Invalid WifiPhy state."); - break; - } + switch (GetState ()) + { + case WifiPhy::RX: + /* The packet which is being received as well + * as its endRx event are cancelled by the caller. + */ + m_rxing = false; + m_stateLogger (m_startRx, now - m_startRx, WifiPhy::RX); + m_endRx = now; + break; + case WifiPhy::CCA_BUSY: + { + Time ccaStart = Max (m_endRx, m_endTx); + ccaStart = Max (ccaStart, m_startCcaBusy); + ccaStart = Max (ccaStart, m_endSwitching); + m_stateLogger (ccaStart, now - ccaStart, WifiPhy::CCA_BUSY); + } break; + case WifiPhy::IDLE: + LogPreviousIdleAndCcaBusyStates (); + break; + case WifiPhy::SWITCHING: + default: + NS_FATAL_ERROR ("Invalid WifiPhy state."); + break; + } m_stateLogger (now, txDuration, WifiPhy::TX); m_previousStateChangeTime = now; m_endTx = now + txDuration; @@ -285,22 +295,24 @@ WifiPhyStateHelper::SwitchToRx (Time rxDuration) NS_ASSERT (!m_rxing); NotifyRxStart (rxDuration); Time now = Simulator::Now (); - switch (GetState ()) { - case WifiPhy::IDLE: - LogPreviousIdleAndCcaBusyStates (); - break; - case WifiPhy::CCA_BUSY: { - Time ccaStart = Max (m_endRx, m_endTx); - ccaStart = Max (ccaStart, m_startCcaBusy); - ccaStart = Max (ccaStart, m_endSwitching); - m_stateLogger (ccaStart, now - ccaStart, WifiPhy::CCA_BUSY); - } break; - case WifiPhy::SWITCHING: - case WifiPhy::RX: - case WifiPhy::TX: - NS_FATAL_ERROR ("Invalid WifiPhy state."); - break; - } + switch (GetState ()) + { + case WifiPhy::IDLE: + LogPreviousIdleAndCcaBusyStates (); + break; + case WifiPhy::CCA_BUSY: + { + Time ccaStart = Max (m_endRx, m_endTx); + ccaStart = Max (ccaStart, m_startCcaBusy); + ccaStart = Max (ccaStart, m_endSwitching); + m_stateLogger (ccaStart, now - ccaStart, WifiPhy::CCA_BUSY); + } break; + case WifiPhy::SWITCHING: + case WifiPhy::RX: + case WifiPhy::TX: + NS_FATAL_ERROR ("Invalid WifiPhy state."); + break; + } m_previousStateChangeTime = now; m_rxing = true; m_startRx = now; @@ -308,39 +320,41 @@ WifiPhyStateHelper::SwitchToRx (Time rxDuration) NS_ASSERT (IsStateRx ()); } -void +void WifiPhyStateHelper::SwitchToChannelSwitching (Time switchingDuration) -{ - NotifySwitchingStart (switchingDuration); +{ + NotifySwitchingStart (switchingDuration); Time now = Simulator::Now (); - switch (GetState ()) { - case WifiPhy::RX: - /* The packet which is being received as well - * as its endRx event are cancelled by the caller. - */ - m_rxing = false; - m_stateLogger (m_startRx, now - m_startRx, WifiPhy::RX); - m_endRx = now; - break; - case WifiPhy::CCA_BUSY: { - Time ccaStart = Max (m_endRx, m_endTx); - ccaStart = Max (ccaStart, m_startCcaBusy); - ccaStart = Max (ccaStart, m_endSwitching); - m_stateLogger (ccaStart, now - ccaStart, WifiPhy::CCA_BUSY); - } break; - case WifiPhy::IDLE: - LogPreviousIdleAndCcaBusyStates (); - break; - case WifiPhy::TX: - case WifiPhy::SWITCHING: - default: - NS_FATAL_ERROR ("Invalid WifiPhy state."); - break; - } - + switch (GetState ()) + { + case WifiPhy::RX: + /* The packet which is being received as well + * as its endRx event are cancelled by the caller. + */ + m_rxing = false; + m_stateLogger (m_startRx, now - m_startRx, WifiPhy::RX); + m_endRx = now; + break; + case WifiPhy::CCA_BUSY: + { + Time ccaStart = Max (m_endRx, m_endTx); + ccaStart = Max (ccaStart, m_startCcaBusy); + ccaStart = Max (ccaStart, m_endSwitching); + m_stateLogger (ccaStart, now - ccaStart, WifiPhy::CCA_BUSY); + } break; + case WifiPhy::IDLE: + LogPreviousIdleAndCcaBusyStates (); + break; + case WifiPhy::TX: + case WifiPhy::SWITCHING: + default: + NS_FATAL_ERROR ("Invalid WifiPhy state."); + break; + } + if (now < m_endCcaBusy) { - m_endCcaBusy = now; + m_endCcaBusy = now; } m_stateLogger (now, switchingDuration, WifiPhy::SWITCHING); @@ -350,7 +364,7 @@ WifiPhyStateHelper::SwitchToChannelSwitching (Time switchingDuration) NS_ASSERT (IsStateSwitching ()); } -void +void WifiPhyStateHelper::SwitchFromRxEndOk (Ptr packet, double snr, WifiMode mode, enum WifiPreamble preamble) { m_rxOkTrace (packet, snr, mode, preamble); @@ -362,7 +376,7 @@ WifiPhyStateHelper::SwitchFromRxEndOk (Ptr packet, double snr, WifiMode } } -void +void WifiPhyStateHelper::SwitchFromRxEndError (Ptr packet, double snr) { m_rxErrorTrace (packet, snr); @@ -392,19 +406,20 @@ WifiPhyStateHelper::SwitchMaybeToCcaBusy (Time duration) { NotifyMaybeCcaBusyStart (duration); Time now = Simulator::Now (); - switch (GetState ()) { - case WifiPhy::SWITCHING: - break; - case WifiPhy::IDLE: - LogPreviousIdleAndCcaBusyStates (); - break; - case WifiPhy::CCA_BUSY: - break; - case WifiPhy::RX: - break; - case WifiPhy::TX: - break; - } + switch (GetState ()) + { + case WifiPhy::SWITCHING: + break; + case WifiPhy::IDLE: + LogPreviousIdleAndCcaBusyStates (); + break; + case WifiPhy::CCA_BUSY: + break; + case WifiPhy::RX: + break; + case WifiPhy::TX: + break; + } m_startCcaBusy = now; m_endCcaBusy = std::max (m_endCcaBusy, now + duration); } diff --git a/src/wifi/model/wifi-phy-state-helper.h b/src/wifi/model/wifi-phy-state-helper.h index f01d47ec2..2d497b62b 100644 --- a/src/wifi/model/wifi-phy-state-helper.h +++ b/src/wifi/model/wifi-phy-state-helper.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -27,6 +27,11 @@ namespace ns3 { +/** + * \ingroup wifi + * + * This objects implements the PHY state machine of the Wifi device. + */ class WifiPhyStateHelper : public Object { public: @@ -50,7 +55,7 @@ public: void SwitchToTx (Time txDuration, Ptr packet, WifiMode txMode, WifiPreamble preamble, uint8_t txPower); void SwitchToRx (Time rxDuration); - void SwitchToChannelSwitching (Time switchingDuration); + void SwitchToChannelSwitching (Time switchingDuration); void SwitchFromRxEndOk (Ptr packet, double snr, WifiMode mode, enum WifiPreamble preamble); void SwitchFromRxEndError (Ptr packet, double snr); void SwitchMaybeToCcaBusy (Time duration); @@ -67,18 +72,18 @@ private: void NotifyRxEndOk (void); void NotifyRxEndError (void); void NotifyMaybeCcaBusyStart (Time duration); - void NotifySwitchingStart (Time duration); + void NotifySwitchingStart (Time duration); void DoSwitchFromRx (void); bool m_rxing; Time m_endTx; Time m_endRx; Time m_endCcaBusy; - Time m_endSwitching; + Time m_endSwitching; Time m_startTx; Time m_startRx; Time m_startCcaBusy; - Time m_startSwitching; + Time m_startSwitching; Time m_previousStateChangeTime; Listeners m_listeners; diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 186605b6f..db2c19814 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -42,7 +42,8 @@ namespace ns3 { ****************************************************************/ WifiPhyListener::~WifiPhyListener () -{} +{ +} /**************************************************************** * The actual WifiPhy class @@ -50,36 +51,36 @@ WifiPhyListener::~WifiPhyListener () NS_OBJECT_ENSURE_REGISTERED (WifiPhy); -TypeId +TypeId WifiPhy::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WifiPhy") .SetParent () - .AddTraceSource ("PhyTxBegin", + .AddTraceSource ("PhyTxBegin", "Trace source indicating a packet has begun transmitting over the channel medium", MakeTraceSourceAccessor (&WifiPhy::m_phyTxBeginTrace)) - .AddTraceSource ("PhyTxEnd", + .AddTraceSource ("PhyTxEnd", "Trace source indicating a packet has been completely transmitted over the channel. NOTE: the only official WifiPhy implementation available to this date (YansWifiPhy) never fires this trace source.", MakeTraceSourceAccessor (&WifiPhy::m_phyTxEndTrace)) - .AddTraceSource ("PhyTxDrop", + .AddTraceSource ("PhyTxDrop", "Trace source indicating a packet has been dropped by the device during transmission", MakeTraceSourceAccessor (&WifiPhy::m_phyTxDropTrace)) - .AddTraceSource ("PhyRxBegin", + .AddTraceSource ("PhyRxBegin", "Trace source indicating a packet has begun being received from the channel medium by the device", MakeTraceSourceAccessor (&WifiPhy::m_phyRxBeginTrace)) - .AddTraceSource ("PhyRxEnd", + .AddTraceSource ("PhyRxEnd", "Trace source indicating a packet has been completely received from the channel medium by the device", MakeTraceSourceAccessor (&WifiPhy::m_phyRxEndTrace)) - .AddTraceSource ("PhyRxDrop", + .AddTraceSource ("PhyRxDrop", "Trace source indicating a packet has been dropped by the device during reception", MakeTraceSourceAccessor (&WifiPhy::m_phyRxDropTrace)) - .AddTraceSource ("PromiscSnifferRx", + .AddTraceSource ("PromiscSnifferRx", "Trace source simulating a wifi device in monitor mode sniffing all received frames", MakeTraceSourceAccessor (&WifiPhy::m_phyPromiscSniffRxTrace)) - .AddTraceSource ("PromiscSnifferTx", + .AddTraceSource ("PromiscSnifferTx", "Trace source simulating the capability of a wifi device in monitor mode to sniff all frames being transmitted", MakeTraceSourceAccessor (&WifiPhy::m_phyPromiscSniffTxTrace)) - ; + ; return tid; } @@ -93,49 +94,256 @@ WifiPhy::~WifiPhy () NS_LOG_FUNCTION (this); } -void + +WifiMode +WifiPhy::GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble) +{ + switch (payloadMode.GetModulationClass ()) + { + case WIFI_MOD_CLASS_OFDM: + { + switch (payloadMode.GetBandwidth ()) + { + case 5000000: + return WifiPhy::GetOfdmRate1_5MbpsBW5MHz (); + case 10000000: + return WifiPhy::GetOfdmRate3MbpsBW10MHz (); + default: + // IEEE Std 802.11-2007, 17.3.2 + // actually this is only the first part of the PlcpHeader, + // because the last 16 bits of the PlcpHeader are using the + // same mode of the payload + return WifiPhy::GetOfdmRate6Mbps (); + } + } + + case WIFI_MOD_CLASS_ERP_OFDM: + return WifiPhy::GetErpOfdmRate6Mbps (); + + case WIFI_MOD_CLASS_DSSS: + if (preamble == WIFI_PREAMBLE_LONG) + { + // IEEE Std 802.11-2007, sections 15.2.3 and 18.2.2.1 + return WifiPhy::GetDsssRate1Mbps (); + } + else // WIFI_PREAMBLE_SHORT + { + // IEEE Std 802.11-2007, section 18.2.2.2 + return WifiPhy::GetDsssRate2Mbps (); + } + + default: + NS_FATAL_ERROR ("unsupported modulation class"); + return WifiMode (); + } +} + +uint32_t +WifiPhy::GetPlcpHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble) +{ + switch (payloadMode.GetModulationClass ()) + { + case WIFI_MOD_CLASS_OFDM: + { + switch (payloadMode.GetBandwidth ()) + { + case 20000000: + default: + // IEEE Std 802.11-2007, section 17.3.3 and figure 17-4 + // also section 17.3.2.3, table 17-4 + // We return the duration of the SIGNAL field only, since the + // SERVICE field (which strictly speaking belongs to the PLCP + // header, see section 17.3.2 and figure 17-1) is sent using the + // payload mode. + return 4; + case 10000000: + // IEEE Std 802.11-2007, section 17.3.2.3, table 17-4 + return 8; + case 5000000: + // IEEE Std 802.11-2007, section 17.3.2.3, table 17-4 + return 16; + } + } + + case WIFI_MOD_CLASS_ERP_OFDM: + return 16; + + case WIFI_MOD_CLASS_DSSS: + if (preamble == WIFI_PREAMBLE_SHORT) + { + // IEEE Std 802.11-2007, section 18.2.2.2 and figure 18-2 + return 24; + } + else // WIFI_PREAMBLE_LONG + { + // IEEE Std 802.11-2007, sections 18.2.2.1 and figure 18-1 + return 48; + } + + default: + NS_FATAL_ERROR ("unsupported modulation class"); + return 0; + } +} + +uint32_t +WifiPhy::GetPlcpPreambleDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble) +{ + switch (payloadMode.GetModulationClass ()) + { + case WIFI_MOD_CLASS_OFDM: + { + switch (payloadMode.GetBandwidth ()) + { + case 20000000: + default: + // IEEE Std 802.11-2007, section 17.3.3, figure 17-4 + // also section 17.3.2.3, table 17-4 + return 16; + case 10000000: + // IEEE Std 802.11-2007, section 17.3.3, table 17-4 + // also section 17.3.2.3, table 17-4 + return 32; + case 5000000: + // IEEE Std 802.11-2007, section 17.3.3 + // also section 17.3.2.3, table 17-4 + return 64; + } + } + + case WIFI_MOD_CLASS_ERP_OFDM: + return 4; + + case WIFI_MOD_CLASS_DSSS: + if (preamble == WIFI_PREAMBLE_SHORT) + { + // IEEE Std 802.11-2007, section 18.2.2.2 and figure 18-2 + return 72; + } + else // WIFI_PREAMBLE_LONG + { + // IEEE Std 802.11-2007, sections 18.2.2.1 and figure 18-1 + return 144; + } + + default: + NS_FATAL_ERROR ("unsupported modulation class"); + return 0; + } +} + +uint32_t +WifiPhy::GetPayloadDurationMicroSeconds (uint32_t size, WifiMode payloadMode) +{ + NS_LOG_FUNCTION (size << payloadMode); + + switch (payloadMode.GetModulationClass ()) + { + case WIFI_MOD_CLASS_OFDM: + case WIFI_MOD_CLASS_ERP_OFDM: + { + // IEEE Std 802.11-2007, section 17.3.2.3, table 17-4 + // corresponds to T_{SYM} in the table + uint32_t symbolDurationUs; + + switch (payloadMode.GetBandwidth ()) + { + case 20000000: + default: + symbolDurationUs = 4; + break; + case 10000000: + symbolDurationUs = 8; + break; + case 5000000: + symbolDurationUs = 16; + break; + } + + // IEEE Std 802.11-2007, section 17.3.2.2, table 17-3 + // corresponds to N_{DBPS} in the table + double numDataBitsPerSymbol = payloadMode.GetDataRate () * symbolDurationUs / 1e6; + + // IEEE Std 802.11-2007, section 17.3.5.3, equation (17-11) + uint32_t numSymbols = lrint (ceil ((16 + size * 8.0 + 6.0) / numDataBitsPerSymbol)); + + // Add signal extension for ERP PHY + if (payloadMode.GetModulationClass () == WIFI_MOD_CLASS_ERP_OFDM) + { + return numSymbols * symbolDurationUs + 6; + } + else + { + return numSymbols * symbolDurationUs; + } + } + + case WIFI_MOD_CLASS_DSSS: + // IEEE Std 802.11-2007, section 18.2.3.5 + NS_LOG_LOGIC (" size=" << size + << " mode=" << payloadMode + << " rate=" << payloadMode.GetDataRate () ); + return lrint (ceil ((size * 8.0) / (payloadMode.GetDataRate () / 1.0e6))); + + default: + NS_FATAL_ERROR ("unsupported modulation class"); + return 0; + } +} + +Time +WifiPhy::CalculateTxDuration (uint32_t size, WifiMode payloadMode, WifiPreamble preamble) +{ + uint32_t duration = GetPlcpPreambleDurationMicroSeconds (payloadMode, preamble) + + GetPlcpHeaderDurationMicroSeconds (payloadMode, preamble) + + GetPayloadDurationMicroSeconds (size, payloadMode); + return MicroSeconds (duration); +} + + +void WifiPhy::NotifyTxBegin (Ptr packet) { m_phyTxBeginTrace (packet); } -void +void WifiPhy::NotifyTxEnd (Ptr packet) { m_phyTxEndTrace (packet); } -void -WifiPhy::NotifyTxDrop (Ptr packet) +void +WifiPhy::NotifyTxDrop (Ptr packet) { m_phyTxDropTrace (packet); } -void -WifiPhy::NotifyRxBegin (Ptr packet) +void +WifiPhy::NotifyRxBegin (Ptr packet) { m_phyRxBeginTrace (packet); } -void -WifiPhy::NotifyRxEnd (Ptr packet) +void +WifiPhy::NotifyRxEnd (Ptr packet) { m_phyRxEndTrace (packet); } -void -WifiPhy::NotifyRxDrop (Ptr packet) +void +WifiPhy::NotifyRxDrop (Ptr packet) { m_phyRxDropTrace (packet); } -void +void WifiPhy::NotifyPromiscSniffRx (Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm) { m_phyPromiscSniffRxTrace (packet, channelFreqMhz, channelNumber, rate, isShortPreamble, signalDbm, noiseDbm); } -void +void WifiPhy::NotifyPromiscSniffTx (Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble) { m_phyPromiscSniffTxTrace (packet, channelFreqMhz, channelNumber, rate, isShortPreamble); @@ -630,21 +838,22 @@ WifiPhy::GetOfdmRate13_5MbpsBW5MHz () std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state) { - switch (state) { - case WifiPhy::IDLE: - return (os << "IDLE"); - case WifiPhy::CCA_BUSY: - return (os << "CCA_BUSY"); - case WifiPhy::TX: - return (os << "TX"); - case WifiPhy::RX: - return (os << "RX"); - case WifiPhy::SWITCHING: - return (os << "SWITCHING"); - default: - NS_FATAL_ERROR ("Invalid WifiPhy state"); - return (os << "INVALID"); - } + switch (state) + { + case WifiPhy::IDLE: + return (os << "IDLE"); + case WifiPhy::CCA_BUSY: + return (os << "CCA_BUSY"); + case WifiPhy::TX: + return (os << "TX"); + case WifiPhy::RX: + return (os << "RX"); + case WifiPhy::SWITCHING: + return (os << "SWITCHING"); + default: + NS_FATAL_ERROR ("Invalid WifiPhy state"); + return (os << "INVALID"); + } } } // namespace ns3 @@ -654,7 +863,8 @@ namespace { static class Constructor { public: - Constructor () { + Constructor () + { ns3::WifiPhy::GetDsssRate1Mbps (); ns3::WifiPhy::GetDsssRate2Mbps (); ns3::WifiPhy::GetDsssRate5_5Mbps (); diff --git a/src/wifi/model/wifi-phy.h b/src/wifi/model/wifi-phy.h index 909b2f5fe..8763bfab9 100644 --- a/src/wifi/model/wifi-phy.h +++ b/src/wifi/model/wifi-phy.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -41,7 +41,8 @@ class NetDevice; /** * \brief receive notifications about phy events. */ -class WifiPhyListener { +class WifiPhyListener +{ public: virtual ~WifiPhyListener (); @@ -63,7 +64,7 @@ public: * NotifyRxStart was invoked first and, the packet has * been successfully received. */ - virtual void NotifyRxEndOk (void) = 0; + virtual void NotifyRxEndOk (void) = 0; /** * We have received the last bit of a packet for which * NotifyRxStart was invoked first and, the packet has @@ -74,7 +75,7 @@ public: * \param duration the expected transmission duration. * * We are about to send the first bit of the packet. - * We do not send any event to notify the end of + * We do not send any event to notify the end of * transmission. Listeners should assume that the * channel implicitely reverts to the idle state * unless they have received a cca busy report. @@ -87,8 +88,8 @@ public: * This method does not really report a real state * change as opposed to the other methods in this class. * It merely reports that, unless the medium is reported - * busy through NotifyTxStart or NotifyRxStart/End, - * it will be busy as defined by the currently selected + * busy through NotifyTxStart or NotifyRxStart/End, + * it will be busy as defined by the currently selected * CCA mode. * * Typical client code which wants to have a clear picture @@ -100,16 +101,17 @@ public: /** * \param duration the expected channel switching duration. * - * We do not send any event to notify the end of + * We do not send any event to notify the end of * channel switching. Listeners should assume that the * channel implicitely reverts to the idle or busy states. */ - virtual void NotifySwitchingStart (Time duration) = 0; + virtual void NotifySwitchingStart (Time duration) = 0; }; /** * \brief 802.11 PHY layer model + * \ingroup wifi * */ class WifiPhy : public Object @@ -118,7 +120,8 @@ public: /** * The state of the PHY layer. */ - enum State { + enum State + { /** * The PHY layer is IDLE. */ @@ -236,10 +239,44 @@ public: * \param size the number of bytes in the packet to send * \param payloadMode the transmission mode to use for this packet * \param preamble the type of preamble to use for this packet. - * \returns the total amount of time this PHY will stay busy for + * \return the total amount of time this PHY will stay busy for * the transmission of these bytes. */ - virtual Time CalculateTxDuration (uint32_t size, WifiMode payloadMode, enum WifiPreamble preamble) const = 0; + static Time CalculateTxDuration (uint32_t size, WifiMode payloadMode, enum WifiPreamble preamble); + + /** + * \param payloadMode the WifiMode use for the transmission of the payload + * \param preamble the type of preamble + * + * \return the WifiMode used for the transmission of the PLCP header + */ + static WifiMode GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble); + + /** + * + * + * \param payloadMode the WifiMode use for the transmission of the payload + * \param preamble the type of preamble + * + * \return the duration of the PLCP header in microseconds + */ + static uint32_t GetPlcpHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble); + + /** + * \param payloadMode the WifiMode use for the transmission of the payload + * \param preamble the type of preamble + * + * \return the duration of the PLCP preamble in microseconds + */ + static uint32_t GetPlcpPreambleDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble); + + /** + * \param payloadMode the WifiMode use for the transmission of the payload + * \param preamble the type of preamble + * + * \return the duration of the payload in microseconds + */ + static uint32_t GetPayloadDurationMicroSeconds (uint32_t size, WifiMode payloadMode); /** * The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used @@ -286,20 +323,20 @@ public: */ virtual double CalculateSnr (WifiMode txMode, double ber) const = 0; - /** - * \brief Set channel number. - * + /** + * \brief Set channel number. + * * Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1) * * where Starting channel frequency is standard-dependent, see SetStandard() * as defined in IEEE 802.11-2007 17.3.8.3.2. - */ + */ virtual void SetChannelNumber (uint16_t id) = 0; /// Return current channel number, see SetChannelNumber() virtual uint16_t GetChannelNumber () const = 0; virtual void ConfigureStandard (enum WifiPhyStandard standard) = 0; - + virtual Ptr GetChannel (void) const = 0; static WifiMode GetDsssRate1Mbps (); @@ -341,46 +378,46 @@ public: /** - * Public method used to fire a PhyTxBegin trace. Implemented for encapsulation + * Public method used to fire a PhyTxBegin trace. Implemented for encapsulation * purposes. */ void NotifyTxBegin (Ptr packet); /** - * Public method used to fire a PhyTxEnd trace. Implemented for encapsulation + * Public method used to fire a PhyTxEnd trace. Implemented for encapsulation * purposes. */ void NotifyTxEnd (Ptr packet); /** - * Public method used to fire a PhyTxDrop trace. Implemented for encapsulation + * Public method used to fire a PhyTxDrop trace. Implemented for encapsulation * purposes. */ void NotifyTxDrop (Ptr packet); /** - * Public method used to fire a PhyRxBegin trace. Implemented for encapsulation + * Public method used to fire a PhyRxBegin trace. Implemented for encapsulation * purposes. */ void NotifyRxBegin (Ptr packet); /** - * Public method used to fire a PhyRxEnd trace. Implemented for encapsulation + * Public method used to fire a PhyRxEnd trace. Implemented for encapsulation * purposes. */ void NotifyRxEnd (Ptr packet); /** - * Public method used to fire a PhyRxDrop trace. Implemented for encapsulation + * Public method used to fire a PhyRxDrop trace. Implemented for encapsulation * purposes. */ void NotifyRxDrop (Ptr packet); - /** - * - * Public method used to fire a PromiscSniffer trace for a wifi packet being received. Implemented for encapsulation + /** + * + * Public method used to fire a PromiscSniffer trace for a wifi packet being received. Implemented for encapsulation * purposes. - * + * * @param packet the packet being received * @param channelFreqMhz the frequency in MHz at which the packet is * received. Note that in real devices this is normally the @@ -391,29 +428,29 @@ public: * on a nearby channel. * @param channelNumber the channel on which the packet is received * @param rate the PHY data rate in units of 500kbps (i.e., the same - * units used both for the radiotap and for the prism header) + * units used both for the radiotap and for the prism header) * @param isShortPreamble true if short preamble is used, false otherwise * @param signalDbm signal power in dBm * @param noiseDbm noise power in dBm */ - void NotifyPromiscSniffRx (Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, + void NotifyPromiscSniffRx (Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm); - /** - * - * Public method used to fire a PromiscSniffer trace for a wifi packet being transmitted. Implemented for encapsulation + /** + * + * Public method used to fire a PromiscSniffer trace for a wifi packet being transmitted. Implemented for encapsulation * purposes. - * + * * @param packet the packet being transmitted * @param channelFreqMhz the frequency in MHz at which the packet is - * transmitted. + * transmitted. * @param channelNumber the channel on which the packet is transmitted * @param rate the PHY data rate in units of 500kbps (i.e., the same - * units used both for the radiotap and for the prism header) + * units used both for the radiotap and for the prism header) * @param isShortPreamble true if short preamble is used, false otherwise */ void NotifyPromiscSniffTx (Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble); - + private: /** @@ -465,8 +502,8 @@ private: /** * A trace source that emulates a wifi device in monitor mode - * sniffing a packet being received. - * + * sniffing a packet being received. + * * As a reference with the real world, firing this trace * corresponds in the madwifi driver to calling the function * ieee80211_input_monitor() @@ -477,8 +514,8 @@ private: /** * A trace source that emulates a wifi device in monitor mode - * sniffing a packet being transmitted. - * + * sniffing a packet being transmitted. + * * As a reference with the real world, firing this trace * corresponds in the madwifi driver to calling the function * ieee80211_input_monitor() diff --git a/src/wifi/model/wifi-preamble.h b/src/wifi/model/wifi-preamble.h index 8a3bb68b4..45063def7 100644 --- a/src/wifi/model/wifi-preamble.h +++ b/src/wifi/model/wifi-preamble.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006,2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -22,7 +22,12 @@ namespace ns3 { -enum WifiPreamble { +/** + * \ingroup wifi + * The type of preamble to be used by an IEEE 802.11 transmission + */ +enum WifiPreamble +{ WIFI_PREAMBLE_LONG, WIFI_PREAMBLE_SHORT }; diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index 49e727956..60c430201 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006,2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -36,7 +36,7 @@ NS_LOG_COMPONENT_DEFINE ("WifiRemoteStationManager"); /*************************************************************** * Packet Mode Tagger - ***************************************************************/ + ***************************************************************/ namespace ns3 { @@ -60,63 +60,65 @@ private: }; TxModeTag::TxModeTag () -{} +{ +} TxModeTag::TxModeTag (WifiMode rtsMode, WifiMode dataMode) : m_rtsMode (rtsMode), m_dataMode (dataMode) -{} -WifiMode +{ +} +WifiMode TxModeTag::GetRtsMode (void) const { return m_rtsMode; } -WifiMode +WifiMode TxModeTag::GetDataMode (void) const { return m_dataMode; } -TypeId +TypeId TxModeTag::GetTypeId (void) { static TypeId tid = TypeId ("ns3::TxModeTag") .SetParent () .AddConstructor () - .AddAttribute ("RtsTxMode", + .AddAttribute ("RtsTxMode", "Tx mode of rts to use later", EmptyAttributeValue (), MakeWifiModeAccessor (&TxModeTag::GetRtsMode), MakeWifiModeChecker ()) - .AddAttribute ("DataTxMode", + .AddAttribute ("DataTxMode", "Tx mode of data to use later", EmptyAttributeValue (), MakeWifiModeAccessor (&TxModeTag::GetDataMode), MakeWifiModeChecker ()) - ; + ; return tid; } -TypeId +TypeId TxModeTag::GetInstanceTypeId (void) const { return GetTypeId (); } -uint32_t +uint32_t TxModeTag::GetSerializedSize (void) const { return sizeof (WifiMode) * 2; } -void +void TxModeTag::Serialize (TagBuffer i) const { i.Write ((uint8_t *)&m_rtsMode, sizeof (WifiMode)); i.Write ((uint8_t *)&m_dataMode, sizeof (WifiMode)); } -void +void TxModeTag::Deserialize (TagBuffer i) { i.Read ((uint8_t *)&m_rtsMode, sizeof (WifiMode)); i.Read ((uint8_t *)&m_dataMode, sizeof (WifiMode)); } -void +void TxModeTag::Print (std::ostream &os) const { os << "Rts=" << m_rtsMode << ", Data=" << m_dataMode; @@ -129,7 +131,7 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (WifiRemoteStationManager); -TypeId +TypeId WifiRemoteStationManager::GetTypeId (void) { static TypeId tid = TypeId ("ns3::WifiRemoteStationManager") @@ -169,37 +171,38 @@ WifiRemoteStationManager::GetTypeId (void) WifiModeValue (), MakeWifiModeAccessor (&WifiRemoteStationManager::m_nonUnicastMode), MakeWifiModeChecker ()) - .AddTraceSource ("MacTxRtsFailed", + .AddTraceSource ("MacTxRtsFailed", "The transmission of a RTS by the MAC layer has failed", MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxRtsFailed)) - .AddTraceSource ("MacTxDataFailed", + .AddTraceSource ("MacTxDataFailed", "The transmission of a data packet by the MAC layer has failed", MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxDataFailed)) - .AddTraceSource ("MacTxFinalRtsFailed", + .AddTraceSource ("MacTxFinalRtsFailed", "The transmission of a RTS has exceeded the maximum number of attempts", MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxFinalRtsFailed)) - .AddTraceSource ("MacTxFinalDataFailed", + .AddTraceSource ("MacTxFinalDataFailed", "The transmission of a data packet has exceeded the maximum number of attempts", MakeTraceSourceAccessor (&WifiRemoteStationManager::m_macTxFinalDataFailed)) - ; + ; return tid; } WifiRemoteStationManager::WifiRemoteStationManager () -{} +{ +} WifiRemoteStationManager::~WifiRemoteStationManager () { } -void +void WifiRemoteStationManager::DoDispose (void) { - for (StationStates::const_iterator i = m_states.begin (); i != m_states.end (); i++) + for (StationStates::const_iterator i = m_states.begin (); i != m_states.end (); i++) { delete (*i); } m_states.clear (); - for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) + for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) { delete (*i); } @@ -218,46 +221,46 @@ WifiRemoteStationManager::SetupPhy (Ptr phy) Reset (); } -uint32_t +uint32_t WifiRemoteStationManager::GetMaxSsrc (void) const { return m_maxSsrc; } -uint32_t +uint32_t WifiRemoteStationManager::GetMaxSlrc (void) const { return m_maxSlrc; } -uint32_t +uint32_t WifiRemoteStationManager::GetRtsCtsThreshold (void) const { return m_rtsCtsThreshold; } -uint32_t +uint32_t WifiRemoteStationManager::GetFragmentationThreshold (void) const { return m_fragmentationThreshold; } -void +void WifiRemoteStationManager::SetMaxSsrc (uint32_t maxSsrc) { m_maxSsrc = maxSsrc; } -void +void WifiRemoteStationManager::SetMaxSlrc (uint32_t maxSlrc) { m_maxSlrc = maxSlrc; } -void +void WifiRemoteStationManager::SetRtsCtsThreshold (uint32_t threshold) { m_rtsCtsThreshold = threshold; } -void +void WifiRemoteStationManager::SetFragmentationThreshold (uint32_t threshold) { m_fragmentationThreshold = threshold; -} +} void WifiRemoteStationManager::Reset (Mac48Address address) @@ -365,6 +368,9 @@ WifiRemoteStationManager::GetDataMode (Mac48Address address, const WifiMacHeader bool found; found = ConstCast (packet)->PeekPacketTag (tag); NS_ASSERT (found); + // cast found to void, to suppress 'found' set but not used + // compiler warning + (void) found; return tag.GetDataMode (); } return DoGetDataMode (Lookup (address, header), fullPacketSize); @@ -380,6 +386,9 @@ WifiRemoteStationManager::GetRtsMode (Mac48Address address, const WifiMacHeader bool found; found = ConstCast (packet)->PeekPacketTag (tag); NS_ASSERT (found); + // cast found to void, to suppress 'found' set but not used + // compiler warning + (void) found; return tag.GetRtsMode (); } return DoGetRtsMode (Lookup (address, header)); @@ -638,7 +647,7 @@ WifiRemoteStationManager::GetControlAnswerMode (Mac48Address address, WifiMode r if (!found) { NS_FATAL_ERROR ("Can't find response rate for " << reqMode - << ". Check standard and selected rates match."); + << ". Check standard and selected rates match."); } return mode; @@ -657,7 +666,7 @@ WifiRemoteStationManager::GetAckMode (Mac48Address address, WifiMode dataMode) return GetControlAnswerMode (address, dataMode); } -WifiRemoteStationInfo +WifiRemoteStationInfo WifiRemoteStationManager::GetInfo (Mac48Address address) { WifiRemoteStationState *state = LookupState (address); @@ -667,7 +676,7 @@ WifiRemoteStationManager::GetInfo (Mac48Address address) WifiRemoteStationState * WifiRemoteStationManager::LookupState (Mac48Address address) const { - for (StationStates::const_iterator i = m_states.begin (); i != m_states.end (); i++) + for (StationStates::const_iterator i = m_states.begin (); i != m_states.end (); i++) { if ((*i)->m_address == address) { @@ -698,16 +707,16 @@ WifiRemoteStationManager::Lookup (Mac48Address address, const WifiMacHeader *hea WifiRemoteStation * WifiRemoteStationManager::Lookup (Mac48Address address, uint8_t tid) const { - for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) + for (Stations::const_iterator i = m_stations.begin (); i != m_stations.end (); i++) { - if ((*i)->m_tid == tid && - (*i)->m_state->m_address == address) + if ((*i)->m_tid == tid + && (*i)->m_state->m_address == address) { return (*i); } } WifiRemoteStationState *state = LookupState (address); - + WifiRemoteStation *station = DoCreateStation (); station->m_state = state; station->m_tid = tid; @@ -716,10 +725,10 @@ WifiRemoteStationManager::Lookup (Mac48Address address, uint8_t tid) const // XXX const_cast (this)->m_stations.push_back (station); return station; - + } -WifiMode +WifiMode WifiRemoteStationManager::GetDefaultMode (void) const { return m_defaultTxMode; @@ -736,7 +745,7 @@ WifiRemoteStationManager::Reset (void) m_bssBasicRateSet.push_back (m_defaultTxMode); NS_ASSERT (m_defaultTxMode.IsMandatory ()); } -void +void WifiRemoteStationManager::AddBasicMode (WifiMode mode) { for (uint32_t i = 0; i < GetNBasicModes (); i++) @@ -748,12 +757,12 @@ WifiRemoteStationManager::AddBasicMode (WifiMode mode) } m_bssBasicRateSet.push_back (mode); } -uint32_t +uint32_t WifiRemoteStationManager::GetNBasicModes (void) const { return m_bssBasicRateSet.size (); } -WifiMode +WifiMode WifiRemoteStationManager::GetBasicMode (uint32_t i) const { NS_ASSERT (i < m_bssBasicRateSet.size ()); @@ -764,7 +773,7 @@ WifiRemoteStationManager::GetNonUnicastMode (void) const { if (m_nonUnicastMode == WifiMode ()) { - return GetBasicMode(0); + return GetBasicMode (0); } else { @@ -772,56 +781,56 @@ WifiRemoteStationManager::GetNonUnicastMode (void) const } } -bool -WifiRemoteStationManager::DoNeedRts (WifiRemoteStation *station, +bool +WifiRemoteStationManager::DoNeedRts (WifiRemoteStation *station, Ptr packet, bool normally) { return normally; } -bool -WifiRemoteStationManager::DoNeedRtsRetransmission (WifiRemoteStation *station, +bool +WifiRemoteStationManager::DoNeedRtsRetransmission (WifiRemoteStation *station, Ptr packet, bool normally) { - return normally; + return normally; } bool -WifiRemoteStationManager::DoNeedDataRetransmission (WifiRemoteStation *station, +WifiRemoteStationManager::DoNeedDataRetransmission (WifiRemoteStation *station, Ptr packet, bool normally) { return normally; } bool -WifiRemoteStationManager::DoNeedFragmentation (WifiRemoteStation *station, +WifiRemoteStationManager::DoNeedFragmentation (WifiRemoteStation *station, Ptr packet, bool normally) { return normally; } -WifiMode +WifiMode WifiRemoteStationManager::GetSupported (const WifiRemoteStation *station, uint32_t i) const { NS_ASSERT (i < GetNSupported (station)); return station->m_state->m_operationalRateSet[i]; } -uint32_t +uint32_t WifiRemoteStationManager::GetNSupported (const WifiRemoteStation *station) const { return station->m_state->m_operationalRateSet.size (); } //WifiRemoteStationInfo constructor -WifiRemoteStationInfo::WifiRemoteStationInfo () : - m_memoryTime (Seconds (1.0)), - m_lastUpdate (Seconds (0.0)), - m_failAvg (0.0) -{} +WifiRemoteStationInfo::WifiRemoteStationInfo () + : m_memoryTime (Seconds (1.0)), + m_lastUpdate (Seconds (0.0)), + m_failAvg (0.0) +{ +} double WifiRemoteStationInfo::CalculateAveragingCoefficient () { - double retval = exp((double) - (m_lastUpdate.GetMicroSeconds () - Simulator::Now ().GetMicroSeconds()) / (double)m_memoryTime.GetMicroSeconds () - ); + double retval = exp ((double)(m_lastUpdate.GetMicroSeconds () - Simulator::Now ().GetMicroSeconds ()) + / (double)m_memoryTime.GetMicroSeconds ()); m_lastUpdate = Simulator::Now (); return retval; } diff --git a/src/wifi/model/wifi-remote-station-manager.h b/src/wifi/model/wifi-remote-station-manager.h index fb3f5848c..e78859c61 100644 --- a/src/wifi/model/wifi-remote-station-manager.h +++ b/src/wifi/model/wifi-remote-station-manager.h @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006,2007 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -74,6 +74,7 @@ private: /** * \brief hold a list of per-remote-station state. + * \ingroup wifi * * \sa ns3::WifiRemoteStation. */ @@ -95,12 +96,12 @@ public: void SetMaxSlrc (uint32_t maxSlrc); void SetRtsCtsThreshold (uint32_t threshold); void SetFragmentationThreshold (uint32_t threshold); - + // Invoked in a STA upon dis-association // or in an AP upon reboot void Reset (void); // Invoked in a STA upon association to store - // the set of rates which belong to the + // the set of rates which belong to the // BSSBasicRateSet of the associated AP // and which are supported locally. // Invoked in an AP to configure the BSSBasicRateSet @@ -119,7 +120,7 @@ public: */ void Reset (Mac48Address address); /** - * Invoked in a STA or AP to store the set of + * Invoked in a STA or AP to store the set of * modes supported by a destination which is * also supported locally. * The set of supported modes includes @@ -177,7 +178,7 @@ public: */ void ReportDataFailed (Mac48Address address, const WifiMacHeader *header); /** - * Should be invoked whenever we receive the Cts associated to an RTS + * Should be invoked whenever we receive the Cts associated to an RTS * we just sent. */ void ReportRtsOk (Mac48Address address, const WifiMacHeader *header, @@ -189,12 +190,12 @@ public: void ReportDataOk (Mac48Address address, const WifiMacHeader *header, double ackSnr, WifiMode ackMode, double dataSnr); /** - * Should be invoked after calling ReportRtsFailed if + * Should be invoked after calling ReportRtsFailed if * NeedRtsRetransmission returns false */ void ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header); /** - * Should be invoked after calling ReportDataFailed if + * Should be invoked after calling ReportDataFailed if * NeedDataRetransmission returns false */ void ReportFinalDataFailed (Mac48Address address, const WifiMacHeader *header); @@ -223,7 +224,7 @@ public: * \param address remote address * \param header MAC header * \param packet the packet to send - * \returns true if we want to restart a failed RTS/CTS + * \returns true if we want to restart a failed RTS/CTS * handshake, false otherwise. */ bool NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header, @@ -232,7 +233,7 @@ public: * \param address remote address * \param header MAC header * \param packet the packet to send - * \returns true if we want to resend a packet + * \returns true if we want to resend a packet * after a failed transmission attempt, false otherwise. */ bool NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header, @@ -245,7 +246,7 @@ public: * \returns true if this packet should be fragmented, false otherwise. */ bool NeedFragmentation (Mac48Address address, const WifiMacHeader *header, - Ptr packet); + Ptr packet); /** * \param address remote address * \param header MAC header @@ -306,33 +307,33 @@ private: * * Note: This method is called before a unicast packet is sent on the medium. */ - virtual bool DoNeedRts (WifiRemoteStation *station, + virtual bool DoNeedRts (WifiRemoteStation *station, Ptr packet, bool normally); /** * \param station the station with which we need to communicate * \param packet the packet to send * \param normally indicates whether the normal 802.11 rts enable mechanism would * request that the rts is retransmitted or not. - * \returns true if we want to restart a failed RTS/CTS + * \returns true if we want to restart a failed RTS/CTS * handshake, false otherwise. * * Note: This method is called after an rts/cts handshake has been attempted * and has failed. */ - virtual bool DoNeedRtsRetransmission (WifiRemoteStation *station, + virtual bool DoNeedRtsRetransmission (WifiRemoteStation *station, Ptr packet, bool normally); /** * \param station the station with which we need to communicate * \param packet the packet to send * \param normally indicates whether the normal 802.11 data retransmission mechanism * would request that the data is retransmitted or not. - * \returns true if we want to resend a packet + * \returns true if we want to resend a packet * after a failed transmission attempt, false otherwise. * * Note: This method is called after a unicast packet transmission has been attempted * and has failed. */ - virtual bool DoNeedDataRetransmission (WifiRemoteStation *station, + virtual bool DoNeedDataRetransmission (WifiRemoteStation *station, Ptr packet, bool normally); /** @@ -344,7 +345,7 @@ private: * * Note: This method is called before sending a unicast packet. */ - virtual bool DoNeedFragmentation (WifiRemoteStation *station, + virtual bool DoNeedFragmentation (WifiRemoteStation *station, Ptr packet, bool normally); /** * \returns whether this manager is a manager designed to work in low-latency @@ -357,7 +358,7 @@ private: /** * \return a new station data structure */ - virtual WifiRemoteStation *DoCreateStation (void) const = 0; + virtual WifiRemoteStation* DoCreateStation (void) const = 0; /** * \param station the station with which we need to communicate * \param size size of the packet or fragment we want to send @@ -387,10 +388,10 @@ private: virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode) = 0; - WifiRemoteStationState *LookupState (Mac48Address address) const; - WifiRemoteStation *Lookup (Mac48Address address, uint8_t tid) const; + WifiRemoteStationState* LookupState (Mac48Address address) const; + WifiRemoteStation* Lookup (Mac48Address address, uint8_t tid) const; /// Find a remote station by its remote address and TID taken from MAC header - WifiRemoteStation *Lookup (Mac48Address address, const WifiMacHeader *header) const; + WifiRemoteStation* Lookup (Mac48Address address, const WifiMacHeader *header) const; WifiMode GetControlAnswerMode (Mac48Address address, WifiMode reqMode); uint32_t GetNFragments (Ptr packet); @@ -432,7 +433,7 @@ private: */ TracedCallback m_macTxRtsFailed; /** - * The trace source fired when the transmission of a single data packet has failed + * The trace source fired when the transmission of a single data packet has failed */ TracedCallback m_macTxDataFailed; /** @@ -450,13 +451,13 @@ private: struct WifiRemoteStationState { - enum - { - BRAND_NEW, - DISASSOC, - WAIT_ASSOC_TX_OK, - GOT_ASSOC_TX_OK - } m_state; + enum + { + BRAND_NEW, + DISASSOC, + WAIT_ASSOC_TX_OK, + GOT_ASSOC_TX_OK + } m_state; /** * This member is the list of WifiMode objects that comprise the @@ -490,6 +491,6 @@ struct WifiRemoteStation }; -} // namespace ns3 +} // namespace ns3 #endif /* WIFI_REMOTE_STATION_MANAGER_H */ diff --git a/src/wifi/model/yans-error-rate-model.cc b/src/wifi/model/yans-error-rate-model.cc index 418355f0c..09dfc18db 100644 --- a/src/wifi/model/yans-error-rate-model.cc +++ b/src/wifi/model/yans-error-rate-model.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -27,62 +27,63 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (YansErrorRateModel); -TypeId +TypeId YansErrorRateModel::GetTypeId (void) { static TypeId tid = TypeId ("ns3::YansErrorRateModel") .SetParent () .AddConstructor () - ; + ; return tid; } YansErrorRateModel::YansErrorRateModel () -{} +{ +} -double +double YansErrorRateModel::Log2 (double val) const { - return log(val) / log(2.0); + return log (val) / log (2.0); } -double +double YansErrorRateModel::GetBpskBer (double snr, uint32_t signalSpread, uint32_t phyRate) const { double EbNo = snr * signalSpread / phyRate; - double z = sqrt(EbNo); - double ber = 0.5 * erfc(z); - NS_LOG_INFO ("bpsk snr="< ()) - ; + ; return tid; } YansWifiChannel::YansWifiChannel () -{} +{ +} YansWifiChannel::~YansWifiChannel () { NS_LOG_FUNCTION_NOARGS (); m_phyList.clear (); } -void +void YansWifiChannel::SetPropagationLossModel (Ptr loss) { m_loss = loss; } -void +void YansWifiChannel::SetPropagationDelayModel (Ptr delay) { m_delay = delay; } -void +void YansWifiChannel::Send (Ptr sender, Ptr packet, double txPowerDbm, WifiMode wifiMode, WifiPreamble preamble) const { @@ -81,18 +82,20 @@ YansWifiChannel::Send (Ptr sender, Ptr packet, double NS_ASSERT (senderMobility != 0); uint32_t j = 0; for (PhyList::const_iterator i = m_phyList.begin (); i != m_phyList.end (); i++, j++) - { + { if (sender != (*i)) { // For now don't account for inter channel interference - if ((*i)->GetChannelNumber() != sender->GetChannelNumber()) + if ((*i)->GetChannelNumber () != sender->GetChannelNumber ()) + { continue; - + } + Ptr receiverMobility = (*i)->GetMobility ()->GetObject (); Time delay = m_delay->GetDelay (senderMobility, receiverMobility); double rxPowerDbm = m_loss->CalcRxPower (txPowerDbm, senderMobility, receiverMobility); - NS_LOG_DEBUG ("propagation: txPower="< ()) .AddAttribute ("TxPowerLevels", "Number of transmission power levels available between " - "TxPowerBase and TxPowerEnd included.", + "TxPowerStart and TxPowerEnd included.", UintegerValue (1), MakeUintegerAccessor (&YansWifiPhy::m_nTxPower), MakeUintegerChecker ()) .AddAttribute ("TxPowerEnd", "Maximum available transmission level (dbm).", DoubleValue (16.0206), - MakeDoubleAccessor (&YansWifiPhy::SetTxPowerEnd, + MakeDoubleAccessor (&YansWifiPhy::SetTxPowerEnd, &YansWifiPhy::GetTxPowerEnd), MakeDoubleChecker ()) .AddAttribute ("TxPowerStart", "Minimum available transmission level (dbm).", DoubleValue (16.0206), - MakeDoubleAccessor (&YansWifiPhy::SetTxPowerStart, + MakeDoubleAccessor (&YansWifiPhy::SetTxPowerStart, &YansWifiPhy::GetTxPowerStart), MakeDoubleChecker ()) .AddAttribute ("RxNoiseFigure", @@ -112,24 +112,24 @@ YansWifiPhy::GetTypeId (void) .AddAttribute ("ChannelSwitchDelay", "Delay between two short frames transmitted on different frequencies. NOTE: Unused now.", TimeValue (MicroSeconds (250)), - MakeTimeAccessor (&YansWifiPhy::m_channelSwitchDelay), + MakeTimeAccessor (&YansWifiPhy::m_channelSwitchDelay), MakeTimeChecker ()) .AddAttribute ("ChannelNumber", "Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1)", UintegerValue (1), - MakeUintegerAccessor (&YansWifiPhy::SetChannelNumber, + MakeUintegerAccessor (&YansWifiPhy::SetChannelNumber, &YansWifiPhy::GetChannelNumber), MakeUintegerChecker ()) - ; + ; return tid; } YansWifiPhy::YansWifiPhy () : m_channelNumber (1), - m_endRxEvent (), - m_random (0.0, 1.0), - m_channelStartingFrequency (0) + m_endRxEvent (), + m_random (0.0, 1.0), + m_channelStartingFrequency (0) { NS_LOG_FUNCTION (this); m_state = CreateObject (); @@ -155,212 +155,214 @@ void YansWifiPhy::ConfigureStandard (enum WifiPhyStandard standard) { NS_LOG_FUNCTION (this << standard); - switch (standard) { - case WIFI_PHY_STANDARD_80211a: - Configure80211a (); - break; - case WIFI_PHY_STANDARD_80211b: - Configure80211b (); - break; - case WIFI_PHY_STANDARD_80211g: - Configure80211g (); - break; - case WIFI_PHY_STANDARD_80211_10Mhz: - Configure80211_10Mhz (); - break; - case WIFI_PHY_STANDARD_80211_5Mhz: - Configure80211_5Mhz (); - break; - case WIFI_PHY_STANDARD_holland: - ConfigureHolland (); - break; - case WIFI_PHY_STANDARD_80211p_CCH: - Configure80211p_CCH (); - break; - case WIFI_PHY_STANDARD_80211p_SCH: - Configure80211p_SCH (); - break; - default: - NS_ASSERT (false); - break; - } + switch (standard) + { + case WIFI_PHY_STANDARD_80211a: + Configure80211a (); + break; + case WIFI_PHY_STANDARD_80211b: + Configure80211b (); + break; + case WIFI_PHY_STANDARD_80211g: + Configure80211g (); + break; + case WIFI_PHY_STANDARD_80211_10Mhz: + Configure80211_10Mhz (); + break; + case WIFI_PHY_STANDARD_80211_5Mhz: + Configure80211_5Mhz (); + break; + case WIFI_PHY_STANDARD_holland: + ConfigureHolland (); + break; + case WIFI_PHY_STANDARD_80211p_CCH: + Configure80211p_CCH (); + break; + case WIFI_PHY_STANDARD_80211p_SCH: + Configure80211p_SCH (); + break; + default: + NS_ASSERT (false); + break; + } } -void +void YansWifiPhy::SetRxNoiseFigure (double noiseFigureDb) { NS_LOG_FUNCTION (this << noiseFigureDb); m_interference.SetNoiseFigure (DbToRatio (noiseFigureDb)); } -void +void YansWifiPhy::SetTxPowerStart (double start) { NS_LOG_FUNCTION (this << start); m_txPowerBaseDbm = start; } -void +void YansWifiPhy::SetTxPowerEnd (double end) { NS_LOG_FUNCTION (this << end); m_txPowerEndDbm = end; } -void +void YansWifiPhy::SetNTxPower (uint32_t n) { NS_LOG_FUNCTION (this << n); m_nTxPower = n; } -void +void YansWifiPhy::SetTxGain (double gain) { NS_LOG_FUNCTION (this << gain); m_txGainDb = gain; } -void +void YansWifiPhy::SetRxGain (double gain) { NS_LOG_FUNCTION (this << gain); m_rxGainDb = gain; } -void +void YansWifiPhy::SetEdThreshold (double threshold) { NS_LOG_FUNCTION (this << threshold); m_edThresholdW = DbmToW (threshold); } -void +void YansWifiPhy::SetCcaMode1Threshold (double threshold) { NS_LOG_FUNCTION (this << threshold); m_ccaMode1ThresholdW = DbmToW (threshold); } -void +void YansWifiPhy::SetErrorRateModel (Ptr rate) { m_interference.SetErrorRateModel (rate); } -void +void YansWifiPhy::SetDevice (Ptr device) { m_device = device; } -void +void YansWifiPhy::SetMobility (Ptr mobility) { m_mobility = mobility; } -double +double YansWifiPhy::GetRxNoiseFigure (void) const { return RatioToDb (m_interference.GetNoiseFigure ()); } -double +double YansWifiPhy::GetTxPowerStart (void) const { return m_txPowerBaseDbm; } -double +double YansWifiPhy::GetTxPowerEnd (void) const { return m_txPowerEndDbm; } -double +double YansWifiPhy::GetTxGain (void) const { return m_txGainDb; } -double +double YansWifiPhy::GetRxGain (void) const { return m_rxGainDb; } -double +double YansWifiPhy::GetEdThreshold (void) const { return WToDbm (m_edThresholdW); } -double +double YansWifiPhy::GetCcaMode1Threshold (void) const { return WToDbm (m_ccaMode1ThresholdW); } -Ptr +Ptr YansWifiPhy::GetErrorRateModel (void) const { return m_interference.GetErrorRateModel (); } -Ptr +Ptr YansWifiPhy::GetDevice (void) const { return m_device; } -Ptr +Ptr YansWifiPhy::GetMobility (void) { return m_mobility; } -double +double YansWifiPhy::CalculateSnr (WifiMode txMode, double ber) const { return m_interference.GetErrorRateModel ()->CalculateSnr (txMode, ber); } -Ptr +Ptr YansWifiPhy::GetChannel (void) const { return m_channel; } -void +void YansWifiPhy::SetChannel (Ptr channel) { m_channel = channel; m_channel->Add (this); } -void +void YansWifiPhy::SetChannelNumber (uint16_t nch) { if (Simulator::Now () == Seconds (0)) { - // this is not channel switch, this is initialization - NS_LOG_DEBUG("start at channel " << nch); + // this is not channel switch, this is initialization + NS_LOG_DEBUG ("start at channel " << nch); m_channelNumber = nch; return; } - NS_ASSERT (!IsStateSwitching()); - switch (m_state->GetState ()) { - case YansWifiPhy::RX: - NS_LOG_DEBUG ("drop packet because of channel switching while reception"); - m_endRxEvent.Cancel(); - goto switchChannel; - break; - case YansWifiPhy::TX: + NS_ASSERT (!IsStateSwitching ()); + switch (m_state->GetState ()) + { + case YansWifiPhy::RX: + NS_LOG_DEBUG ("drop packet because of channel switching while reception"); + m_endRxEvent.Cancel (); + goto switchChannel; + break; + case YansWifiPhy::TX: NS_LOG_DEBUG ("channel switching postponed until end of current transmission"); - Simulator::Schedule (GetDelayUntilIdle(), &YansWifiPhy::SetChannelNumber, this, nch); - break; - case YansWifiPhy::CCA_BUSY: - case YansWifiPhy::IDLE: - goto switchChannel; - break; - default: - NS_ASSERT (false); - break; - } + Simulator::Schedule (GetDelayUntilIdle (), &YansWifiPhy::SetChannelNumber, this, nch); + break; + case YansWifiPhy::CCA_BUSY: + case YansWifiPhy::IDLE: + goto switchChannel; + break; + default: + NS_ASSERT (false); + break; + } return; - switchChannel: +switchChannel: - NS_LOG_DEBUG("switching channel " << m_channelNumber << " -> " << nch); - m_state->SwitchToChannelSwitching(m_channelSwitchDelay); - m_interference.EraseEvents(); + NS_LOG_DEBUG ("switching channel " << m_channelNumber << " -> " << nch); + m_state->SwitchToChannelSwitching (m_channelSwitchDelay); + m_interference.EraseEvents (); /* * Needed here to be able to correctly sensed the medium for the first * time after the switching. The actual switching is not performed until @@ -371,30 +373,30 @@ YansWifiPhy::SetChannelNumber (uint16_t nch) m_channelNumber = nch; } -uint16_t -YansWifiPhy::GetChannelNumber() const +uint16_t +YansWifiPhy::GetChannelNumber () const { return m_channelNumber; } double -YansWifiPhy::GetChannelFrequencyMhz() const +YansWifiPhy::GetChannelFrequencyMhz () const { - return m_channelStartingFrequency + 5 * GetChannelNumber(); + return m_channelStartingFrequency + 5 * GetChannelNumber (); } -void +void YansWifiPhy::SetReceiveOkCallback (RxOkCallback callback) { m_state->SetReceiveOkCallback (callback); } -void +void YansWifiPhy::SetReceiveErrorCallback (RxErrorCallback callback) { m_state->SetReceiveErrorCallback (callback); } -void -YansWifiPhy::StartReceivePacket (Ptr packet, +void +YansWifiPhy::StartReceivePacket (Ptr packet, double rxPowerDbm, WifiMode txMode, enum WifiPreamble preamble) @@ -406,80 +408,81 @@ YansWifiPhy::StartReceivePacket (Ptr packet, Time endRx = Simulator::Now () + rxDuration; Ptr event; - event = m_interference.Add (packet->GetSize (), + event = m_interference.Add (packet->GetSize (), txMode, preamble, rxDuration, rxPowerW); - switch (m_state->GetState ()) { - case YansWifiPhy::SWITCHING: - NS_LOG_DEBUG ("drop packet because of channel switching"); - NotifyRxDrop (packet); - /* - * Packets received on the upcoming channel are added to the event list - * during the switching state. This way the medium can be correctly sensed - * when the device listens to the channel for the first time after the - * switching e.g. after channel switching, the channel may be sensed as - * busy due to other devices' tramissions started before the end of - * the switching. - */ - if (endRx > Simulator::Now () + m_state->GetDelayUntilIdle ()) - { - // that packet will be noise _after_ the completion of the - // channel switching. - goto maybeCcaBusy; - } - break; - case YansWifiPhy::RX: - NS_LOG_DEBUG ("drop packet because already in Rx (power="<< - rxPowerW<<"W)"); - NotifyRxDrop (packet); - if (endRx > Simulator::Now () + m_state->GetDelayUntilIdle ()) - { - // that packet will be noise _after_ the reception of the - // currently-received packet. - goto maybeCcaBusy; - } - break; - case YansWifiPhy::TX: - NS_LOG_DEBUG ("drop packet because already in Tx (power="<< - rxPowerW<<"W)"); - NotifyRxDrop (packet); - if (endRx > Simulator::Now () + m_state->GetDelayUntilIdle ()) - { - // that packet will be noise _after_ the transmission of the - // currently-transmitted packet. - goto maybeCcaBusy; - } - break; - case YansWifiPhy::CCA_BUSY: - case YansWifiPhy::IDLE: - if (rxPowerW > m_edThresholdW) - { - NS_LOG_DEBUG ("sync to signal (power="<SwitchToRx (rxDuration); - NS_ASSERT (m_endRxEvent.IsExpired ()); - NotifyRxBegin (packet); - m_interference.NotifyRxStart(); - m_endRxEvent = Simulator::Schedule (rxDuration, &YansWifiPhy::EndReceive, this, - packet, - event); - } - else - { - NS_LOG_DEBUG ("drop packet because signal power too Small ("<< - rxPowerW<<"<"<GetState ()) + { + case YansWifiPhy::SWITCHING: + NS_LOG_DEBUG ("drop packet because of channel switching"); + NotifyRxDrop (packet); + /* + * Packets received on the upcoming channel are added to the event list + * during the switching state. This way the medium can be correctly sensed + * when the device listens to the channel for the first time after the + * switching e.g. after channel switching, the channel may be sensed as + * busy due to other devices' tramissions started before the end of + * the switching. + */ + if (endRx > Simulator::Now () + m_state->GetDelayUntilIdle ()) + { + // that packet will be noise _after_ the completion of the + // channel switching. + goto maybeCcaBusy; + } + break; + case YansWifiPhy::RX: + NS_LOG_DEBUG ("drop packet because already in Rx (power=" << + rxPowerW << "W)"); + NotifyRxDrop (packet); + if (endRx > Simulator::Now () + m_state->GetDelayUntilIdle ()) + { + // that packet will be noise _after_ the reception of the + // currently-received packet. + goto maybeCcaBusy; + } + break; + case YansWifiPhy::TX: + NS_LOG_DEBUG ("drop packet because already in Tx (power=" << + rxPowerW << "W)"); + NotifyRxDrop (packet); + if (endRx > Simulator::Now () + m_state->GetDelayUntilIdle ()) + { + // that packet will be noise _after_ the transmission of the + // currently-transmitted packet. + goto maybeCcaBusy; + } + break; + case YansWifiPhy::CCA_BUSY: + case YansWifiPhy::IDLE: + if (rxPowerW > m_edThresholdW) + { + NS_LOG_DEBUG ("sync to signal (power=" << rxPowerW << "W)"); + // sync to signal + m_state->SwitchToRx (rxDuration); + NS_ASSERT (m_endRxEvent.IsExpired ()); + NotifyRxBegin (packet); + m_interference.NotifyRxStart (); + m_endRxEvent = Simulator::Schedule (rxDuration, &YansWifiPhy::EndReceive, this, + packet, + event); + } + else + { + NS_LOG_DEBUG ("drop packet because signal power too Small (" << + rxPowerW << "<" << m_edThresholdW << ")"); + NotifyRxDrop (packet); + goto maybeCcaBusy; + } + break; + } return; - maybeCcaBusy: +maybeCcaBusy: // We are here because we have received the first bit of a packet and we are // not going to be able to synchronize on it // In this model, CCA becomes busy when the aggregation of all signals as @@ -492,13 +495,13 @@ YansWifiPhy::StartReceivePacket (Ptr packet, } } -void +void YansWifiPhy::SendPacket (Ptr packet, WifiMode txMode, WifiPreamble preamble, uint8_t txPower) { NS_LOG_FUNCTION (this << packet << txMode << preamble << (uint32_t)txPower); /* Transmission can happen if: * - we are syncing on a packet. It is the responsability of the - * MAC layer to avoid doing this but the PHY does nothing to + * MAC layer to avoid doing this but the PHY does nothing to * prevent it. * - we are idle */ @@ -511,24 +514,24 @@ YansWifiPhy::SendPacket (Ptr packet, WifiMode txMode, WifiPreamble m_interference.NotifyRxEnd (); } NotifyTxBegin (packet); - uint32_t dataRate500KbpsUnits = txMode.GetDataRate () / 500000; + uint32_t dataRate500KbpsUnits = txMode.GetDataRate () / 500000; bool isShortPreamble = (WIFI_PREAMBLE_SHORT == preamble); NotifyPromiscSniffTx (packet, (uint16_t)GetChannelFrequencyMhz (), GetChannelNumber (), dataRate500KbpsUnits, isShortPreamble); m_state->SwitchToTx (txDuration, packet, txMode, preamble, txPower); m_channel->Send (this, packet, GetPowerDbm (txPower) + m_txGainDb, txMode, preamble); } -uint32_t +uint32_t YansWifiPhy::GetNModes (void) const { return m_deviceRateSet.size (); } -WifiMode +WifiMode YansWifiPhy::GetMode (uint32_t mode) const { return m_deviceRateSet[mode]; } -uint32_t +uint32_t YansWifiPhy::GetNTxPower (void) const { return m_nTxPower; @@ -538,7 +541,7 @@ void YansWifiPhy::Configure80211a (void) { NS_LOG_FUNCTION (this); - m_channelStartingFrequency = 5e3; // 5.000 GHz + m_channelStartingFrequency = 5e3; // 5.000 GHz m_deviceRateSet.push_back (WifiPhy::GetOfdmRate6Mbps ()); m_deviceRateSet.push_back (WifiPhy::GetOfdmRate9Mbps ()); @@ -555,7 +558,7 @@ void YansWifiPhy::Configure80211b (void) { NS_LOG_FUNCTION (this); - m_channelStartingFrequency = 2407; // 2.407 GHz + m_channelStartingFrequency = 2407; // 2.407 GHz m_deviceRateSet.push_back (WifiPhy::GetDsssRate1Mbps ()); m_deviceRateSet.push_back (WifiPhy::GetDsssRate2Mbps ()); @@ -587,7 +590,7 @@ void YansWifiPhy::Configure80211_10Mhz (void) { NS_LOG_FUNCTION (this); - m_channelStartingFrequency = 5e3; // 5.000 GHz, suppose 802.11a + m_channelStartingFrequency = 5e3; // 5.000 GHz, suppose 802.11a m_deviceRateSet.push_back (WifiPhy::GetOfdmRate3MbpsBW10MHz ()); m_deviceRateSet.push_back (WifiPhy::GetOfdmRate4_5MbpsBW10MHz ()); @@ -602,7 +605,7 @@ YansWifiPhy::Configure80211_10Mhz (void) void YansWifiPhy::Configure80211_5Mhz (void) { - NS_LOG_FUNCTION (this); + NS_LOG_FUNCTION (this); m_channelStartingFrequency = 5e3; // 5.000 GHz, suppose 802.11a m_deviceRateSet.push_back (WifiPhy::GetOfdmRate1_5MbpsBW5MHz ()); @@ -619,7 +622,7 @@ void YansWifiPhy::ConfigureHolland (void) { NS_LOG_FUNCTION (this); - m_channelStartingFrequency = 5e3; // 5.000 GHz + m_channelStartingFrequency = 5e3; // 5.000 GHz m_deviceRateSet.push_back (WifiPhy::GetOfdmRate6Mbps ()); m_deviceRateSet.push_back (WifiPhy::GetOfdmRate12Mbps ()); m_deviceRateSet.push_back (WifiPhy::GetOfdmRate18Mbps ()); @@ -659,39 +662,39 @@ YansWifiPhy::Configure80211p_SCH (void) m_deviceRateSet.push_back (WifiPhy::GetOfdmRate27MbpsBW10MHz ()); } -void +void YansWifiPhy::RegisterListener (WifiPhyListener *listener) { m_state->RegisterListener (listener); } -bool +bool YansWifiPhy::IsStateCcaBusy (void) { return m_state->IsStateCcaBusy (); } -bool +bool YansWifiPhy::IsStateIdle (void) { return m_state->IsStateIdle (); } -bool +bool YansWifiPhy::IsStateBusy (void) { return m_state->IsStateBusy (); } -bool +bool YansWifiPhy::IsStateRx (void) { return m_state->IsStateRx (); } -bool +bool YansWifiPhy::IsStateTx (void) { return m_state->IsStateTx (); } -bool +bool YansWifiPhy::IsStateSwitching (void) { return m_state->IsStateSwitching (); @@ -708,42 +711,36 @@ YansWifiPhy::GetDelayUntilIdle (void) return m_state->GetDelayUntilIdle (); } -Time +Time YansWifiPhy::GetLastRxStartTime (void) const { return m_state->GetLastRxStartTime (); } -Time -YansWifiPhy::CalculateTxDuration (uint32_t size, WifiMode payloadMode, enum WifiPreamble preamble) const -{ - return m_interference.CalculateTxDuration (size, payloadMode, preamble); -} - -double +double YansWifiPhy::DbToRatio (double dB) const { - double ratio = pow(10.0,dB/10.0); + double ratio = pow (10.0,dB / 10.0); return ratio; } -double +double YansWifiPhy::DbmToW (double dBm) const { - double mW = pow(10.0,dBm/10.0); + double mW = pow (10.0,dBm / 10.0); return mW / 1000.0; } double YansWifiPhy::WToDbm (double w) const { - return 10.0 * log10(w * 1000.0); + return 10.0 * log10 (w * 1000.0); } double YansWifiPhy::RatioToDb (double ratio) const { - return 10.0 * log10(ratio); + return 10.0 * log10 (ratio); } double @@ -752,7 +749,7 @@ YansWifiPhy::GetEdThresholdW (void) const return m_edThresholdW; } -double +double YansWifiPhy::GetPowerDbm (uint8_t power) const { NS_ASSERT (m_txPowerBaseDbm <= m_txPowerEndDbm); @@ -762,7 +759,7 @@ YansWifiPhy::GetPowerDbm (uint8_t power) const { dbm = m_txPowerBaseDbm + power * (m_txPowerEndDbm - m_txPowerBaseDbm) / (m_nTxPower - 1); } - else + else { NS_ASSERT_MSG (m_txPowerBaseDbm == m_txPowerEndDbm, "cannot have TxPowerEnd != TxPowerStart with TxPowerLevels == 1"); dbm = m_txPowerBaseDbm; @@ -779,21 +776,21 @@ YansWifiPhy::EndReceive (Ptr packet, Ptr even struct InterferenceHelper::SnrPer snrPer; snrPer = m_interference.CalculateSnrPer (event); - m_interference.NotifyRxEnd(); + m_interference.NotifyRxEnd (); - NS_LOG_DEBUG ("mode="<<(event->GetPayloadMode ().GetDataRate ())<< - ", snr="< channel); - - /** - * \brief Set channel number. - * + + /** + * \brief Set channel number. + * * Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1) * * where Starting channel frequency is standard-dependent, see SetStandard() * as defined in IEEE 802.11-2007 17.3.8.3.2. * - * YansWifiPhy can switch among different channels. Basically, YansWifiPhy - * has a private attribute m_channelNumber that identifies the channel the + * YansWifiPhy can switch among different channels. Basically, YansWifiPhy + * has a private attribute m_channelNumber that identifies the channel the * PHY operates on. Channel switching cannot interrupt an ongoing transmission. * When PHY is in TX state, the channel switching is postponed until the end - * of the current transmission. When the PHY is in RX state, the channel - * switching causes the drop of the synchronized packet. - */ + * of the current transmission. When the PHY is in RX state, the channel + * switching causes the drop of the synchronized packet. + */ void SetChannelNumber (uint16_t id); /// Return current channel number, see SetChannelNumber() uint16_t GetChannelNumber () const; /// Return current center channel frequency in MHz, see SetChannelNumber() - double GetChannelFrequencyMhz() const; - + double GetChannelFrequencyMhz () const; + void StartReceivePacket (Ptr packet, double rxPowerDbm, WifiMode mode, @@ -115,8 +115,8 @@ public: Ptr GetErrorRateModel (void) const; Ptr GetDevice (void) const; Ptr GetMobility (void); - - + + virtual double GetTxPowerStart (void) const; @@ -131,11 +131,10 @@ public: virtual bool IsStateBusy (void); virtual bool IsStateRx (void); virtual bool IsStateTx (void); - virtual bool IsStateSwitching (void); + virtual bool IsStateSwitching (void); virtual Time GetStateDuration (void); virtual Time GetDelayUntilIdle (void); virtual Time GetLastRxStartTime (void) const; - virtual Time CalculateTxDuration (uint32_t size, WifiMode payloadMode, enum WifiPreamble preamble) const; virtual uint32_t GetNModes (void) const; virtual WifiMode GetMode (uint32_t mode) const; virtual double CalculateSnr (WifiMode txMode, double ber) const; @@ -215,7 +214,7 @@ private: EventId m_endRxEvent; UniformVariable m_random; - /// Standard-dependent center frequency of 0-th channel, MHz + /// Standard-dependent center frequency of 0-th channel, MHz double m_channelStartingFrequency; Ptr m_state; InterferenceHelper m_interference; diff --git a/src/wifi/test/block-ack-test-suite.cc b/src/wifi/test/block-ack-test-suite.cc index 51bee4b76..8b5e4c1e6 100644 --- a/src/wifi/test/block-ack-test-suite.cc +++ b/src/wifi/test/block-ack-test-suite.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009, 2010 MIRKO BANCHI * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -39,12 +39,12 @@ NS_LOG_COMPONENT_DEFINE ("BlockAckTest"); /* ----- = old packets * +++++ = new packets - * - * CASE A: startSeq < endSeq + * + * CASE A: startSeq < endSeq * - - + * initial buffer state: 0 16 56000 * - * + * * 0 4095 * |------|++++++++++++++++|-----| * ^ ^ @@ -54,7 +54,7 @@ NS_LOG_COMPONENT_DEFINE ("BlockAckTest"); * second received packet's sequence control = 63984 (seqNum = 3999, fragNum = 0) + * 4001 is older seq number so this packet should be inserted at the buffer's begin. * 3999 is previous element of older of new packets: it should be inserted at the end of buffer. - * + * * expected buffer state: 64016 0 16 56000 63984 * */ @@ -79,7 +79,8 @@ PacketBufferingCaseA::PacketBufferingCaseA () } PacketBufferingCaseA::~PacketBufferingCaseA () -{} +{ +} void PacketBufferingCaseA::DoRun (void) @@ -91,20 +92,26 @@ PacketBufferingCaseA::DoRun (void) m_buffer.push_back (56000); uint16_t endSeq = 4000; - + uint16_t receivedSeq = 4001 * 16; uint32_t mappedSeq = QosUtilsMapSeqControlToUniqueInteger (receivedSeq, endSeq); - for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++); + for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++) { - m_buffer.insert (i, receivedSeq); + ; } - + { + m_buffer.insert (i, receivedSeq); + } + receivedSeq = 3999 * 16; mappedSeq = QosUtilsMapSeqControlToUniqueInteger (receivedSeq, endSeq); - for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++); + for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++) { - m_buffer.insert (i, receivedSeq); + ; } + { + m_buffer.insert (i, receivedSeq); + } for (i = m_buffer.begin (), j = m_expectedBuffer.begin (); i != m_buffer.end (); i++, j++) { @@ -114,7 +121,7 @@ PacketBufferingCaseA::DoRun (void) /* ----- = old packets * +++++ = new packets - * + * * CASE B: startSeq > endSeq * - + + * initial buffer state: 256 64000 16 @@ -131,7 +138,7 @@ PacketBufferingCaseA::DoRun (void) * 240 is an old packet should be inserted at the buffer's begin. * 241 is an old packet: second segment of the above packet. * 4050 is a new packet: it should be inserted between 64000 and 16. - * + * * expected buffer state: 240 241 256 64000 64800 16 * */ @@ -157,7 +164,8 @@ PacketBufferingCaseB::PacketBufferingCaseB () } PacketBufferingCaseB::~PacketBufferingCaseB () -{} +{ +} void PacketBufferingCaseB::DoRun (void) @@ -172,24 +180,33 @@ PacketBufferingCaseB::DoRun (void) uint16_t receivedSeq = 15 * 16; uint32_t mappedSeq = QosUtilsMapSeqControlToUniqueInteger (receivedSeq, endSeq); - for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++); + for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++) { - m_buffer.insert (i, receivedSeq); + ; } + { + m_buffer.insert (i, receivedSeq); + } receivedSeq = 15 * 16 + 1; mappedSeq = QosUtilsMapSeqControlToUniqueInteger (receivedSeq, endSeq); - for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++); + for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++) { - m_buffer.insert (i, receivedSeq); + ; } + { + m_buffer.insert (i, receivedSeq); + } receivedSeq = 4050 * 16; mappedSeq = QosUtilsMapSeqControlToUniqueInteger (receivedSeq, endSeq); - for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++); + for (i = m_buffer.begin (); i != m_buffer.end () && QosUtilsMapSeqControlToUniqueInteger ((*i), endSeq) < mappedSeq; i++) { - m_buffer.insert (i, receivedSeq); + ; } + { + m_buffer.insert (i, receivedSeq); + } for (i = m_buffer.begin (), j = m_expectedBuffer.begin (); i != m_buffer.end (); i++, j++) { @@ -209,13 +226,14 @@ private: CtrlBAckResponseHeaderTest::CtrlBAckResponseHeaderTest () : TestCase ("Check the correctness of block ack compressed bitmap") -{} +{ +} void CtrlBAckResponseHeaderTest::DoRun (void) { m_blockAckHdr.SetType (COMPRESSED_BLOCK_ACK); - + //Case 1: startSeq < endSeq // 179 242 m_blockAckHdr.SetStartingSequence (179); @@ -235,7 +253,7 @@ CtrlBAckResponseHeaderTest::DoRun (void) NS_TEST_EXPECT_MSG_EQ (m_blockAckHdr.IsPacketReceived (1500), false, "error in compressed bitmap"); m_blockAckHdr.ResetBitmap (); - + //Case 2: startSeq > endSeq // 4090 58 m_blockAckHdr.SetStartingSequence (4090); diff --git a/src/wifi/test/dcf-manager-test.cc b/src/wifi/test/dcf-manager-test.cc index 94dd1f330..fc18eb1ec 100644 --- a/src/wifi/test/dcf-manager-test.cc +++ b/src/wifi/test/dcf-manager-test.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -26,7 +26,7 @@ namespace ns3 { class DcfManagerTest; -class DcfStateTest : public DcfState +class DcfStateTest : public DcfState { public: DcfStateTest (DcfManagerTest *test, uint32_t i); @@ -36,11 +36,12 @@ private: virtual void DoNotifyAccessGranted (void); virtual void DoNotifyInternalCollision (void); virtual void DoNotifyCollision (void); - virtual void DoNotifyChannelSwitching (void); + virtual void DoNotifyChannelSwitching (void); typedef std::pair ExpectedGrant; typedef std::list ExpectedGrants; - struct ExpectedCollision { + struct ExpectedCollision + { uint64_t at; uint32_t nSlots; }; @@ -64,7 +65,7 @@ public: void NotifyAccessGranted (uint32_t i); void NotifyInternalCollision (uint32_t i); void NotifyCollision (uint32_t i); - void NotifyChannelSwitching (uint32_t i); + void NotifyChannelSwitching (uint32_t i); private: @@ -80,18 +81,18 @@ private: void AddNavReset (uint64_t at, uint64_t duration); void AddNavStart (uint64_t at, uint64_t duration); void AddAckTimeoutReset (uint64_t at); - void AddAccessRequest (uint64_t at, uint64_t txTime, + void AddAccessRequest (uint64_t at, uint64_t txTime, uint64_t expectedGrantTime, uint32_t from); - void AddAccessRequestWithAckTimeout (uint64_t at, uint64_t txTime, - uint64_t expectedGrantTime, uint32_t from); + void AddAccessRequestWithAckTimeout (uint64_t at, uint64_t txTime, + uint64_t expectedGrantTime, uint32_t from); ///\param ackDelay is delay of the ack after txEnd - void AddAccessRequestWithSuccessfullAck (uint64_t at, uint64_t txTime, - uint64_t expectedGrantTime, uint32_t ackDelay, uint32_t from); + void AddAccessRequestWithSuccessfullAck (uint64_t at, uint64_t txTime, + uint64_t expectedGrantTime, uint32_t ackDelay, uint32_t from); void DoAccessRequest (uint64_t txTime, uint64_t expectedGrantTime, DcfStateTest *state); - void AddCcaBusyEvt (uint64_t at, uint64_t duration); - void AddSwitchingEvt (uint64_t at, uint64_t duration); - void AddRxStartEvt (uint64_t at, uint64_t duration); - + void AddCcaBusyEvt (uint64_t at, uint64_t duration); + void AddSwitchingEvt (uint64_t at, uint64_t duration); + void AddRxStartEvt (uint64_t at, uint64_t duration); + typedef std::vector DcfStates; DcfManager *m_dcfManager; @@ -101,15 +102,17 @@ private: -DcfStateTest::DcfStateTest (DcfManagerTest *test, uint32_t i) - : m_test (test), m_i(i) -{} -void +DcfStateTest::DcfStateTest (DcfManagerTest *test, uint32_t i) + : m_test (test), + m_i (i) +{ +} +void DcfStateTest::QueueTx (uint64_t txTime, uint64_t expectedGrantTime) { m_expectedGrants.push_back (std::make_pair (txTime, expectedGrantTime)); } -void +void DcfStateTest::DoNotifyAccessGranted (void) { m_test->NotifyAccessGranted (m_i); @@ -119,12 +122,12 @@ DcfStateTest::DoNotifyInternalCollision (void) { m_test->NotifyInternalCollision (m_i); } -void +void DcfStateTest::DoNotifyCollision (void) { m_test->NotifyCollision (m_i); } -void +void DcfStateTest::DoNotifyChannelSwitching (void) { m_test->NotifyChannelSwitching (m_i); @@ -133,9 +136,10 @@ DcfStateTest::DoNotifyChannelSwitching (void) DcfManagerTest::DcfManagerTest () : TestCase ("DcfManager") -{} +{ +} -void +void DcfManagerTest::NotifyAccessGranted (uint32_t i) { DcfStateTest *state = m_dcfStates[i]; @@ -149,11 +153,11 @@ DcfManagerTest::NotifyAccessGranted (uint32_t i) void DcfManagerTest::AddTxEvt (uint64_t at, uint64_t duration) { - Simulator::Schedule (MicroSeconds (at) - Now (), - &DcfManager::NotifyTxStartNow, m_dcfManager, + Simulator::Schedule (MicroSeconds (at) - Now (), + &DcfManager::NotifyTxStartNow, m_dcfManager, MicroSeconds (duration)); } -void +void DcfManagerTest::NotifyInternalCollision (uint32_t i) { DcfStateTest *state = m_dcfStates[i]; @@ -163,7 +167,7 @@ DcfManagerTest::NotifyInternalCollision (uint32_t i) NS_TEST_EXPECT_MSG_EQ (Simulator::Now (), MicroSeconds (expected.at), "Expected internal collision time is now"); state->StartBackoffNow (expected.nSlots); } -void +void DcfManagerTest::NotifyCollision (uint32_t i) { DcfStateTest *state = m_dcfStates[i]; @@ -173,7 +177,7 @@ DcfManagerTest::NotifyCollision (uint32_t i) NS_TEST_EXPECT_MSG_EQ (Simulator::Now (), MicroSeconds (expected.at), "Expected collision is now"); state->StartBackoffNow (expected.nSlots); } -void +void DcfManagerTest::NotifyChannelSwitching (uint32_t i) { DcfStateTest *state = m_dcfStates[i]; @@ -185,7 +189,7 @@ DcfManagerTest::NotifyChannelSwitching (uint32_t i) } } -void +void DcfManagerTest::ExpectInternalCollision (uint64_t time, uint32_t nSlots, uint32_t from) { DcfStateTest *state = m_dcfStates[from]; @@ -194,7 +198,7 @@ DcfManagerTest::ExpectInternalCollision (uint64_t time, uint32_t nSlots, uint32_ col.nSlots = nSlots; state->m_expectedInternalCollision.push_back (col); } -void +void DcfManagerTest::ExpectCollision (uint64_t time, uint32_t nSlots, uint32_t from) { DcfStateTest *state = m_dcfStates[from]; @@ -210,7 +214,7 @@ DcfManagerTest::StartTest (uint64_t slotTime, uint64_t sifs, uint64_t eifsNoDifs m_dcfManager = new DcfManager (); m_dcfManager->SetSlot (MicroSeconds (slotTime)); m_dcfManager->SetSifs (MicroSeconds (sifs)); - m_dcfManager->SetEifsNoDifs (MicroSeconds (eifsNoDifsNoSifs+sifs)); + m_dcfManager->SetEifsNoDifs (MicroSeconds (eifsNoDifsNoSifs + sifs)); m_ackTimeoutValue = ackTimeoutValue; } @@ -240,72 +244,72 @@ DcfManagerTest::EndTest (void) delete m_dcfManager; } -void +void DcfManagerTest::AddRxOkEvt (uint64_t at, uint64_t duration) { - Simulator::Schedule (MicroSeconds (at) - Now (), - &DcfManager::NotifyRxStartNow, m_dcfManager, + Simulator::Schedule (MicroSeconds (at) - Now (), + &DcfManager::NotifyRxStartNow, m_dcfManager, MicroSeconds (duration)); - Simulator::Schedule (MicroSeconds (at+duration) - Now (), + Simulator::Schedule (MicroSeconds (at + duration) - Now (), &DcfManager::NotifyRxEndOkNow, m_dcfManager); } void DcfManagerTest::AddRxInsideSifsEvt (uint64_t at, uint64_t duration) { - Simulator::Schedule (MicroSeconds (at) - Now (), - &DcfManager::NotifyRxStartNow, m_dcfManager, + Simulator::Schedule (MicroSeconds (at) - Now (), + &DcfManager::NotifyRxStartNow, m_dcfManager, MicroSeconds (duration)); } -void +void DcfManagerTest::AddRxErrorEvt (uint64_t at, uint64_t duration) { - Simulator::Schedule (MicroSeconds (at) - Now (), - &DcfManager::NotifyRxStartNow, m_dcfManager, + Simulator::Schedule (MicroSeconds (at) - Now (), + &DcfManager::NotifyRxStartNow, m_dcfManager, MicroSeconds (duration)); - Simulator::Schedule (MicroSeconds (at+duration) - Now (), + Simulator::Schedule (MicroSeconds (at + duration) - Now (), &DcfManager::NotifyRxEndErrorNow, m_dcfManager); } -void +void DcfManagerTest::AddNavReset (uint64_t at, uint64_t duration) { - Simulator::Schedule (MicroSeconds (at) - Now (), - &DcfManager::NotifyNavResetNow, m_dcfManager, + Simulator::Schedule (MicroSeconds (at) - Now (), + &DcfManager::NotifyNavResetNow, m_dcfManager, MicroSeconds (duration)); } -void +void DcfManagerTest::AddNavStart (uint64_t at, uint64_t duration) { - Simulator::Schedule (MicroSeconds (at) - Now (), - &DcfManager::NotifyNavStartNow, m_dcfManager, + Simulator::Schedule (MicroSeconds (at) - Now (), + &DcfManager::NotifyNavStartNow, m_dcfManager, MicroSeconds (duration)); } -void +void DcfManagerTest::AddAckTimeoutReset (uint64_t at) { - Simulator::Schedule (MicroSeconds (at) - Now (), + Simulator::Schedule (MicroSeconds (at) - Now (), &DcfManager::NotifyAckTimeoutResetNow, m_dcfManager); } -void -DcfManagerTest::AddAccessRequest (uint64_t at, uint64_t txTime, +void +DcfManagerTest::AddAccessRequest (uint64_t at, uint64_t txTime, uint64_t expectedGrantTime, uint32_t from) { AddAccessRequestWithSuccessfullAck (at, txTime, expectedGrantTime, 0, from); } -void -DcfManagerTest::AddAccessRequestWithAckTimeout (uint64_t at, uint64_t txTime, - uint64_t expectedGrantTime, uint32_t from) +void +DcfManagerTest::AddAccessRequestWithAckTimeout (uint64_t at, uint64_t txTime, + uint64_t expectedGrantTime, uint32_t from) { - Simulator::Schedule (MicroSeconds (at) - Now (), + Simulator::Schedule (MicroSeconds (at) - Now (), &DcfManagerTest::DoAccessRequest, this, txTime, expectedGrantTime, m_dcfStates[from]); } -void -DcfManagerTest::AddAccessRequestWithSuccessfullAck (uint64_t at, uint64_t txTime, - uint64_t expectedGrantTime, uint32_t ackDelay, uint32_t from) +void +DcfManagerTest::AddAccessRequestWithSuccessfullAck (uint64_t at, uint64_t txTime, + uint64_t expectedGrantTime, uint32_t ackDelay, uint32_t from) { - NS_ASSERT(ackDelay < m_ackTimeoutValue); - Simulator::Schedule (MicroSeconds (at) - Now (), + NS_ASSERT (ackDelay < m_ackTimeoutValue); + Simulator::Schedule (MicroSeconds (at) - Now (), &DcfManagerTest::DoAccessRequest, this, txTime, expectedGrantTime, m_dcfStates[from]); AddAckTimeoutReset (expectedGrantTime + txTime + ackDelay); @@ -316,25 +320,25 @@ DcfManagerTest::DoAccessRequest (uint64_t txTime, uint64_t expectedGrantTime, Dc state->QueueTx (txTime, expectedGrantTime); m_dcfManager->RequestAccess (state); } -void +void DcfManagerTest::AddCcaBusyEvt (uint64_t at, uint64_t duration) { - Simulator::Schedule (MicroSeconds (at) - Now (), - &DcfManager::NotifyMaybeCcaBusyStartNow, m_dcfManager, + Simulator::Schedule (MicroSeconds (at) - Now (), + &DcfManager::NotifyMaybeCcaBusyStartNow, m_dcfManager, MicroSeconds (duration)); } void DcfManagerTest::AddSwitchingEvt (uint64_t at, uint64_t duration) { - Simulator::Schedule (MicroSeconds (at) - Now (), - &DcfManager::NotifySwitchingStartNow, m_dcfManager, + Simulator::Schedule (MicroSeconds (at) - Now (), + &DcfManager::NotifySwitchingStartNow, m_dcfManager, MicroSeconds (duration)); } void DcfManagerTest::AddRxStartEvt (uint64_t at, uint64_t duration) { - Simulator::Schedule (MicroSeconds (at) - Now (), - &DcfManager::NotifyRxStartNow, m_dcfManager, + Simulator::Schedule (MicroSeconds (at) - Now (), + &DcfManager::NotifyRxStartNow, m_dcfManager, MicroSeconds (duration)); } @@ -344,7 +348,7 @@ void DcfManagerTest::DoRun (void) { // 0 3 4 5 8 9 10 12 - // | sifs | aifsn | tx | sifs | aifsn | | tx | + // | sifs | aifsn | tx | sifs | aifsn | | tx | // StartTest (1, 3, 10); AddDcfState (1); @@ -353,13 +357,13 @@ DcfManagerTest::DoRun (void) EndTest (); // Check that receiving inside SIFS shall be cancelled properly: // 0 3 4 5 8 9 12 13 14 - // | sifs | aifsn | tx | sifs | ack | sifs | aifsn | |tx | + // | sifs | aifsn | tx | sifs | ack | sifs | aifsn | |tx | // StartTest (1, 3, 10); AddDcfState (1); AddAccessRequest (1, 1, 4, 0); AddRxInsideSifsEvt (6, 10); - AddTxEvt(8, 1); + AddTxEvt (8, 1); AddAccessRequest (14, 2, 14, 0); EndTest (); @@ -384,10 +388,10 @@ DcfManagerTest::DoRun (void) // Test the case where the backoff slots is zero. // // 20 60 66 70 72 - // | rx | sifs | aifsn | tx | + // | rx | sifs | aifsn | tx | // | // 30 request access. backoff slots: 0 - StartTest (4, 6 , 10); + StartTest (4, 6, 10); AddDcfState (1); AddRxOkEvt (20, 40); AddAccessRequest (30, 2, 70, 0); @@ -396,11 +400,11 @@ DcfManagerTest::DoRun (void) // Test shows when two frames are received without interval between // them: // 20 60 100 106 110 112 - // | rx | rx |sifs | aifsn | tx | + // | rx | rx |sifs | aifsn | tx | // | // 30 request access. backoff slots: 0 - StartTest (4, 6 , 10); + StartTest (4, 6, 10); AddDcfState (1); AddRxOkEvt (20, 40); AddRxOkEvt (60, 40); @@ -409,7 +413,7 @@ DcfManagerTest::DoRun (void) EndTest (); - // The test below is subject to some discussion because I am + // The test below is subject to some discussion because I am // not sure I understand the intent of the spec here. // i.e., what happens if you make a request to get access // to the medium during the difs idle time after a busy period ? @@ -422,7 +426,7 @@ DcfManagerTest::DoRun (void) // | // 62 request access. // - StartTest (4, 6 , 10); + StartTest (4, 6, 10); AddDcfState (1); AddRxOkEvt (20, 40); AddAccessRequest (62, 2, 70, 0); @@ -430,7 +434,7 @@ DcfManagerTest::DoRun (void) // Test an EIFS - // + // // 20 60 66 76 86 90 94 98 102 106 // | rx | sifs | acktxttime | sifs + aifsn | bslot0 | bslot1 | bslot2 | bslot3 | tx | // | | <------eifs------>| @@ -439,11 +443,11 @@ DcfManagerTest::DoRun (void) AddDcfState (1); AddRxErrorEvt (20, 40); AddAccessRequest (30, 2, 102, 0); - ExpectCollision (30, 4, 0); // backoff: 4 slots + ExpectCollision (30, 4, 0); // backoff: 4 slots EndTest (); // Test an EIFS which is interupted by a successfull transmission. - // + // // 20 60 66 69 75 81 85 89 93 97 101 103 // | rx | sifs | | rx | sifs | aifsn | bslot0 | bslot1 | bslot2 | bslot3 | tx | // | | <--eifs-->| @@ -452,7 +456,7 @@ DcfManagerTest::DoRun (void) AddDcfState (1); AddRxErrorEvt (20, 40); AddAccessRequest (30, 2, 101, 0); - ExpectCollision (30, 4, 0); // backoff: 4 slots + ExpectCollision (30, 4, 0); // backoff: 4 slots AddRxOkEvt (69, 6); EndTest (); @@ -475,7 +479,7 @@ DcfManagerTest::DoRun (void) ExpectCollision (40, 0, 1); // backoff: 0 slot ExpectInternalCollision (78, 1, 1); // backoff: 1 slot EndTest (); - + // Test of AckTimeout handling: First queue requests access and ack procedure fails, // inside the ack timeout second queue with higher priority requests access. // @@ -490,7 +494,7 @@ DcfManagerTest::DoRun (void) AddAccessRequest (50, 10, 66, 1); EndTest (); - // Test of AckTimeout handling: + // Test of AckTimeout handling: // // First queue requests access and ack is 2 us delayed (got ack interval at the picture), // inside this interval second queue with higher priority requests access. @@ -532,7 +536,7 @@ DcfManagerTest::DoRun (void) // test simple NAV count. This scenario modelizes a simple DATA+ACK handshake // where the data rate used for the ACK is higher than expected by the DATA source // so, the data exchange completes before the end of nav. - // + // StartTest (4, 6, 10); AddDcfState (1); AddRxOkEvt (20, 40); @@ -544,10 +548,10 @@ DcfManagerTest::DoRun (void) EndTest (); // - // test more complex NAV handling by a CF-poll. This scenario modelizes a + // test more complex NAV handling by a CF-poll. This scenario modelizes a // simple DATA+ACK handshake interrupted by a CF-poll which resets the // NAV counter. - // + // StartTest (4, 6, 10); AddDcfState (1); AddRxOkEvt (20, 40); @@ -558,7 +562,7 @@ DcfManagerTest::DoRun (void) ExpectCollision (30, 2, 0); // backoff: 2 slot EndTest (); - + StartTest (4, 6, 10); AddDcfState (2); AddRxOkEvt (20, 40); @@ -577,88 +581,88 @@ DcfManagerTest::DoRun (void) // Channel switching tests - // 0 20 23 24 25 - // | switching | sifs | aifsn | tx | - // | - // 21 access request. + // 0 20 23 24 25 + // | switching | sifs | aifsn | tx | + // | + // 21 access request. StartTest (1, 3, 10); AddDcfState (1); - AddSwitchingEvt(0,20); + AddSwitchingEvt (0,20); AddAccessRequest (21, 1, 24, 0); EndTest (); // 20 40 50 53 54 55 - // | switching | busy | sifs | aifsn | tx | + // | switching | busy | sifs | aifsn | tx | // | | - // 30 busy. 45 access request. + // 30 busy. 45 access request. // StartTest (1, 3, 10); AddDcfState (1); - AddSwitchingEvt(20,20); - AddCcaBusyEvt(30,20); + AddSwitchingEvt (20,20); + AddCcaBusyEvt (30,20); AddAccessRequest (45, 1, 54, 0); EndTest (); // 20 30 50 53 54 55 - // | rx | switching | sifs | aifsn | tx | + // | rx | switching | sifs | aifsn | tx | // | - // 51 access request. + // 51 access request. // StartTest (1, 3, 10); AddDcfState (1); AddRxStartEvt (20,40); - AddSwitchingEvt(30,20); + AddSwitchingEvt (30,20); AddAccessRequest (51, 1, 54, 0); EndTest (); // 20 30 50 53 54 55 - // | busy | switching | sifs | aifsn | tx | + // | busy | switching | sifs | aifsn | tx | // | - // 51 access request. + // 51 access request. // StartTest (1, 3, 10); AddDcfState (1); AddCcaBusyEvt (20,40); - AddSwitchingEvt(30,20); + AddSwitchingEvt (30,20); AddAccessRequest (51, 1, 54, 0); EndTest (); // 20 30 50 53 54 55 - // | nav | switching | sifs | aifsn | tx | + // | nav | switching | sifs | aifsn | tx | // | - // 51 access request. + // 51 access request. // StartTest (1, 3, 10); AddDcfState (1); AddNavStart (20,40); - AddSwitchingEvt(30,20); + AddSwitchingEvt (30,20); AddAccessRequest (51, 1, 54, 0); EndTest (); // 20 40 50 55 58 59 60 - // | tx | ack timeout | switching | sifs | aifsn | tx | + // | tx | ack timeout | switching | sifs | aifsn | tx | // | | - // 45 access request. 56 access request. + // 45 access request. 56 access request. // StartTest (1, 3, 10); AddDcfState (1); AddAccessRequestWithAckTimeout (20, 20, 20, 0); AddAccessRequest (45, 1, 50, 0); - AddSwitchingEvt(50,5); + AddSwitchingEvt (50,5); AddAccessRequest (56, 1, 59, 0); EndTest (); // 20 60 66 70 74 78 80 100 106 110 112 - // | rx | sifs | aifsn | bslot0 | bslot1 | | switching | sifs | aifsn | tx | + // | rx | sifs | aifsn | bslot0 | bslot1 | | switching | sifs | aifsn | tx | // | | - // 30 access request. 101 access request. + // 30 access request. 101 access request. // StartTest (4, 6, 10); AddDcfState (1); - AddRxOkEvt(20,40); - AddAccessRequest (30, 2, 80, 0); - ExpectCollision(30, 4, 0); // backoff: 4 slots - AddSwitchingEvt(80,20); + AddRxOkEvt (20,40); + AddAccessRequest (30, 2, 80, 0); + ExpectCollision (30, 4, 0); // backoff: 4 slots + AddSwitchingEvt (80,20); AddAccessRequest (101, 2, 110, 0); EndTest (); } diff --git a/src/wifi/test/interference-helper-tx-duration-test.cc b/src/wifi/test/tx-duration-test.cc similarity index 83% rename from src/wifi/test/interference-helper-tx-duration-test.cc rename to src/wifi/test/tx-duration-test.cc index 6aaf42035..ff793d81e 100644 --- a/src/wifi/test/interference-helper-tx-duration-test.cc +++ b/src/wifi/test/tx-duration-test.cc @@ -3,7 +3,7 @@ * Copyright (c) 2009 CTTC * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -29,61 +29,60 @@ NS_LOG_COMPONENT_DEFINE ("InterferenceHelperTxDurationTest"); namespace ns3 { -class InterferenceHelperTxDurationTest : public TestCase +class TxDurationTest : public TestCase { public: - InterferenceHelperTxDurationTest (); - virtual ~InterferenceHelperTxDurationTest (); + TxDurationTest (); + virtual ~TxDurationTest (); virtual void DoRun (void); private: - - /** + /** * Check if the payload tx duration returned by InterferenceHelper * corresponds to a known value of the pay - * + * * @param size size of payload in octets (includes everything after the PLCP header) - * @param payloadMode the WifiMode used + * @param payloadMode the WifiMode used * @param knownPlcpLengthFieldValue the known value of the Length field in the PLCP header - * + * * @return true if values correspond, false otherwise */ - bool CheckPayloadDuration(uint32_t size, WifiMode payloadMode, uint32_t knownDurationMicroSeconds); + bool CheckPayloadDuration (uint32_t size, WifiMode payloadMode, uint32_t knownDurationMicroSeconds); - /** + /** * Check if the overall tx duration returned by InterferenceHelper * corresponds to a known value of the pay - * + * * @param size size of payload in octets (includes everything after the PLCP header) - * @param payloadMode the WifiMode used + * @param payloadMode the WifiMode used * @param preamble the WifiPreamble used * @param knownPlcpLengthFieldValue the known value of the Length field in the PLCP header - * + * * @return true if values correspond, false otherwise */ - bool CheckTxDuration(uint32_t size, WifiMode payloadMode, WifiPreamble preamble, uint32_t knownDurationMicroSeconds); - + bool CheckTxDuration (uint32_t size, WifiMode payloadMode, WifiPreamble preamble, uint32_t knownDurationMicroSeconds); + }; -InterferenceHelperTxDurationTest::InterferenceHelperTxDurationTest () - : TestCase ("InterferenceHelper TX Duration") +TxDurationTest::TxDurationTest () + : TestCase ("Wifi TX Duration") { } -InterferenceHelperTxDurationTest::~InterferenceHelperTxDurationTest () +TxDurationTest::~TxDurationTest () { } bool -InterferenceHelperTxDurationTest::CheckPayloadDuration(uint32_t size, WifiMode payloadMode, uint32_t knownDurationMicroSeconds) +TxDurationTest::CheckPayloadDuration (uint32_t size, WifiMode payloadMode, uint32_t knownDurationMicroSeconds) { - uint32_t calculatedDurationMicroSeconds = InterferenceHelper::GetPayloadDurationMicroSeconds (size, payloadMode); + uint32_t calculatedDurationMicroSeconds = WifiPhy::GetPayloadDurationMicroSeconds (size, payloadMode); if (calculatedDurationMicroSeconds != knownDurationMicroSeconds) { std::cerr << " size=" << size - << " mode=" << payloadMode + << " mode=" << payloadMode << " known=" << knownDurationMicroSeconds << " calculated=" << calculatedDurationMicroSeconds << std::endl; @@ -93,13 +92,13 @@ InterferenceHelperTxDurationTest::CheckPayloadDuration(uint32_t size, WifiMode p } bool -InterferenceHelperTxDurationTest::CheckTxDuration(uint32_t size, WifiMode payloadMode, WifiPreamble preamble, uint32_t knownDurationMicroSeconds) +TxDurationTest::CheckTxDuration (uint32_t size, WifiMode payloadMode, WifiPreamble preamble, uint32_t knownDurationMicroSeconds) { - uint32_t calculatedDurationMicroSeconds = InterferenceHelper::CalculateTxDuration (size, payloadMode, preamble).GetMicroSeconds (); + uint32_t calculatedDurationMicroSeconds = WifiPhy::CalculateTxDuration (size, payloadMode, preamble).GetMicroSeconds (); if (calculatedDurationMicroSeconds != knownDurationMicroSeconds) { std::cerr << " size=" << size - << " mode=" << payloadMode + << " mode=" << payloadMode << " preamble=" << preamble << " known=" << knownDurationMicroSeconds << " calculated=" << calculatedDurationMicroSeconds @@ -110,7 +109,7 @@ InterferenceHelperTxDurationTest::CheckTxDuration(uint32_t size, WifiMode payloa } void -InterferenceHelperTxDurationTest::DoRun (void) +TxDurationTest::DoRun (void) { bool retval = true; @@ -125,7 +124,7 @@ InterferenceHelperTxDurationTest::DoRun (void) // Similar, but we add PLCP preamble and header durations // and we test different rates. // The payload durations for modes other than 11mbb have been - // calculated by hand according to IEEE Std 802.11-2007 18.2.3.5 + // calculated by hand according to IEEE Std 802.11-2007 18.2.3.5 retval = retval && CheckTxDuration (1023, WifiPhy::GetDsssRate11Mbps (), WIFI_PREAMBLE_SHORT, 744 + 96) && CheckTxDuration (1024, WifiPhy::GetDsssRate11Mbps (), WIFI_PREAMBLE_SHORT, 745 + 96) @@ -165,7 +164,7 @@ InterferenceHelperTxDurationTest::DoRun (void) // values from // http://www.oreillynet.com/pub/a/wireless/2003/08/08/wireless_throughput.html - retval = retval + retval = retval && CheckTxDuration (1536, WifiPhy::GetDsssRate11Mbps (), WIFI_PREAMBLE_LONG, 1310) && CheckTxDuration (76, WifiPhy::GetDsssRate11Mbps (), WIFI_PREAMBLE_LONG, 248) && CheckTxDuration (14, WifiPhy::GetDsssRate11Mbps (), WIFI_PREAMBLE_LONG, 203) @@ -189,9 +188,9 @@ public: TxDurationTestSuite::TxDurationTestSuite () : TestSuite ("devices-wifi-tx-duration", UNIT) { - AddTestCase (new InterferenceHelperTxDurationTest); + AddTestCase (new TxDurationTest); } static TxDurationTestSuite g_txDurationTestSuite; -} //namespace ns3 +} //namespace ns3 diff --git a/src/wifi/test/wifi-phy-test.cc b/src/wifi/test/wifi-phy-test.cc index 020b386ef..049132036 100644 --- a/src/wifi/test/wifi-phy-test.cc +++ b/src/wifi/test/wifi-phy-test.cc @@ -3,7 +3,7 @@ * Copyright (c) 2005,2006 INRIA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -64,7 +64,7 @@ private: struct Output m_output; }; -void +void PsrExperiment::Send (void) { Ptr p = Create (m_input.packetSize); @@ -72,21 +72,23 @@ PsrExperiment::Send (void) m_tx->SendPacket (p, mode, WIFI_PREAMBLE_SHORT, m_input.txPowerLevel); } -void +void PsrExperiment::Receive (Ptr p, double snr, WifiMode mode, enum WifiPreamble preamble) { m_output.received++; } PsrExperiment::PsrExperiment () -{} +{ +} PsrExperiment::Input::Input () : distance (5.0), txMode ("OfdmRate6Mbps"), txPowerLevel (0), packetSize (2304), nPackets (400) -{} +{ +} struct PsrExperiment::Output PsrExperiment::Run (struct PsrExperiment::Input input) @@ -163,25 +165,25 @@ private: struct Output m_output; }; -void +void CollisionExperiment::SendA (void) const { Ptr p = Create (m_input.packetSizeA); p->AddByteTag (FlowIdTag (m_flowIdA)); - m_txA->SendPacket (p, WifiMode (m_input.txModeA), - WIFI_PREAMBLE_SHORT, m_input.txPowerLevelA); + m_txA->SendPacket (p, WifiMode (m_input.txModeA), + WIFI_PREAMBLE_SHORT, m_input.txPowerLevelA); } -void +void CollisionExperiment::SendB (void) const { Ptr p = Create (m_input.packetSizeB); p->AddByteTag (FlowIdTag (m_flowIdB)); - m_txB->SendPacket (p, WifiMode (m_input.txModeB), - WIFI_PREAMBLE_SHORT, m_input.txPowerLevelB); + m_txB->SendPacket (p, WifiMode (m_input.txModeB), + WIFI_PREAMBLE_SHORT, m_input.txPowerLevelB); } -void +void CollisionExperiment::Receive (Ptr p, double snr, WifiMode mode, enum WifiPreamble preamble) { FlowIdTag tag; @@ -197,7 +199,8 @@ CollisionExperiment::Receive (Ptr p, double snr, WifiMode mode, enum Wif } CollisionExperiment::CollisionExperiment () -{} +{ +} CollisionExperiment::Input::Input () : interval (MicroSeconds (0)), xA (-5), @@ -209,7 +212,8 @@ CollisionExperiment::Input::Input () packetSizeA (2304), packetSizeB (2304), nPackets (400) -{} +{ +} struct CollisionExperiment::Output CollisionExperiment::Run (struct CollisionExperiment::Input input) @@ -284,7 +288,7 @@ static void PrintPsr (int argc, char *argv[]) double psr = output.received; psr /= input.nPackets ; - + std::cout << psr << std::endl; } @@ -299,7 +303,7 @@ static void PrintPsrVsDistance (int argc, char *argv[]) { struct PsrExperiment::Input input; CommandLine cmd; - cmd.AddValue ("TxPowerLevel", "The power level index to use to send each packet", input.txPowerLevel); + cmd.AddValue ("TxPowerLevel", "The power level index to use to send each packet", input.txPowerLevel); cmd.AddValue ("TxMode", "The mode to use to send each packet", input.txMode); cmd.AddValue ("NPackets", "The number of packets to send", input.nPackets); cmd.AddValue ("PacketSize", "The size of each packet sent", input.packetSize); @@ -313,7 +317,7 @@ static void PrintPsrVsDistance (int argc, char *argv[]) input.txMode = "OfdmRate6Mbps"; output = experiment.Run (input); std::cout << " " << CalcPsr (output, input); - + input.txMode = "OfdmRate9Mbps"; output = experiment.Run (input); std::cout << " " << CalcPsr (output, input); @@ -351,7 +355,7 @@ static void PrintSizeVsRange (int argc, char *argv[]) double targetPsr = 0.05; struct PsrExperiment::Input input; CommandLine cmd; - cmd.AddValue ("TxPowerLevel", "The power level index to use to send each packet", input.txPowerLevel); + cmd.AddValue ("TxPowerLevel", "The power level index to use to send each packet", input.txPowerLevel); cmd.AddValue ("TxMode", "The mode to use to send each packet", input.txMode); cmd.AddValue ("NPackets", "The number of packets to send", input.nPackets); cmd.AddValue ("TargetPsr", "The psr needed to assume that we are within range", targetPsr); @@ -362,22 +366,22 @@ static void PrintSizeVsRange (int argc, char *argv[]) double low = 1.0; double high = 200.0; while (high - low > precision) - { - double middle = low + (high - low) / 2; - struct PsrExperiment::Output output; - PsrExperiment experiment; - input.distance = middle; - output = experiment.Run (input); - double psr = CalcPsr (output, input); - if (psr >= targetPsr) - { - low = middle; - } - else - { - high = middle; - } - } + { + double middle = low + (high - low) / 2; + struct PsrExperiment::Output output; + PsrExperiment experiment; + input.distance = middle; + output = experiment.Run (input); + double psr = CalcPsr (output, input); + if (psr >= targetPsr) + { + low = middle; + } + else + { + high = middle; + } + } std::cout << input.packetSize << " " << input.distance << std::endl; } } @@ -396,8 +400,8 @@ static void PrintPsrVsCollisionInterval (int argc, char *argv[]) CollisionExperiment::Output output; input.interval = MicroSeconds (i); output = experiment.Run (input); - double perA = (output.receivedA+0.0) / (input.nPackets+0.0); - double perB = (output.receivedB+0.0) / (input.nPackets+0.0); + double perA = (output.receivedA + 0.0) / (input.nPackets + 0.0); + double perB = (output.receivedB + 0.0) / (input.nPackets + 0.0); std::cout << i << " " << perA << " " << perB << std::endl; } for (uint32_t i = 100; i < 4000; i += 50) @@ -406,8 +410,8 @@ static void PrintPsrVsCollisionInterval (int argc, char *argv[]) CollisionExperiment::Output output; input.interval = MicroSeconds (i); output = experiment.Run (input); - double perA = (output.receivedA+0.0) / (input.nPackets+0.0); - double perB = (output.receivedB+0.0) / (input.nPackets+0.0); + double perA = (output.receivedA + 0.0) / (input.nPackets + 0.0); + double perB = (output.receivedB + 0.0) / (input.nPackets + 0.0); std::cout << i << " " << perA << " " << perB << std::endl; } } @@ -419,11 +423,11 @@ int main (int argc, char *argv[]) if (argc <= 1) { std::cout << "Available experiments: " - << "Psr " - << "SizeVsRange " - << "PsrVsDistance " - << "PsrVsCollisionInterval " - << std::endl; + << "Psr " + << "SizeVsRange " + << "PsrVsDistance " + << "PsrVsCollisionInterval " + << std::endl; return -1; } std::string type = argv[1]; diff --git a/src/wifi/test/wifi-test.cc b/src/wifi/test/wifi-test.cc index 8486e8309..d92c0a713 100644 --- a/src/wifi/test/wifi-test.cc +++ b/src/wifi/test/wifi-test.cc @@ -4,7 +4,7 @@ * 2010 NICTA * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be useful, @@ -153,7 +153,9 @@ WifiTest::DoRun (void) class QosUtilsIsOldPacketTest : public TestCase { public: - QosUtilsIsOldPacketTest () : TestCase ("QosUtilsIsOldPacket") {} + QosUtilsIsOldPacketTest () : TestCase ("QosUtilsIsOldPacket") + { + } virtual void DoRun (void) { // startingSeq=0, seqNum=2047 @@ -257,7 +259,7 @@ InterferenceHelperSequenceTest::DoRun (void) Ptr senderA = CreateOne (Vector (5.0, 0.0, 0.0), channel); Ptr senderB = CreateOne (Vector (-5.0, 0.0, 0.0), channel); - propLoss->SetLoss (senderB->GetObject(), rxOnly->GetObject(), 0, true); + propLoss->SetLoss (senderB->GetObject (), rxOnly->GetObject (), 0, true); propLoss->SetDefaultLoss (999); Simulator::Schedule (Seconds (1.0), diff --git a/src/wifi/wscript b/src/wifi/wscript index cfc7953fa..c1eb70423 100644 --- a/src/wifi/wscript +++ b/src/wifi/wscript @@ -71,7 +71,7 @@ def build(bld): obj_test.source = [ 'test/block-ack-test-suite.cc', 'test/dcf-manager-test.cc', - 'test/interference-helper-tx-duration-test.cc', + 'test/tx-duration-test.cc', 'test/wifi-test.cc', ] diff --git a/doc/WimaxArchitecture.dia b/src/wimax/doc/WimaxArchitecture.dia similarity index 100% rename from doc/WimaxArchitecture.dia rename to src/wimax/doc/WimaxArchitecture.dia diff --git a/src/wimax/doc/wimax.h b/src/wimax/doc/wimax.h index 5c4b15c05..ce2ac6199 100644 --- a/src/wimax/doc/wimax.h +++ b/src/wimax/doc/wimax.h @@ -1,5 +1,4 @@ /** - * \ingroup devices * \defgroup WiMAX WiMAX Models * * \section WiMAXModelOverview WiMAX Model Overview @@ -291,7 +290,5 @@ * SNR_value2 BER Blc_ER STANDARD_DEVIATION CONFIDENCE_INTERVAL1 CONFIDENCE_INTERVAL2 * ... ... ... ... ... ... * ... ... ... ... ... ... - * \subsection wimaxl2stack Module Overview - * \image html WimaxArchitecture.png "Overview of the WiMAX module" */ diff --git a/doc/manual/source/wimax.rst b/src/wimax/doc/wimax.rst similarity index 98% rename from doc/manual/source/wimax.rst rename to src/wimax/doc/wimax.rst index 8a6a013b4..4a6ff7b74 100644 --- a/doc/manual/source/wimax.rst +++ b/src/wimax/doc/wimax.rst @@ -16,7 +16,7 @@ of the |ns3| model are: * packet tracing functionality The source code for the WiMAX models lives in the directory -``src/devices/wimax``. +``src/wimax``. There have been two academic papers published on this model: @@ -75,9 +75,9 @@ The main way that users who write simulation scripts will typically interact with the Wimax models is through the helper API and through the publicly visible attributes of the model. -The helper API is defined in ``src/helper/wimax-helper.{cc,h}``. +The helper API is defined in ``src/wimax/helper/wimax-helper.{cc,h}``. -The example ``examples/wimax/wimax-simple.cc`` contains some basic code that +The example ``src/wimax/examples/wimax-simple.cc`` contains some basic code that shows how to set up the model::: switch (schedType) @@ -116,7 +116,7 @@ created. The helper method ``Install`` allows the user to specify the scheduler type, the physical layer type, and the device type. Different variants of ``Install`` are available; for instance, the example -``examples/wimax/wimax-multicast.cc`` shows how to specify a non-default channel +``src/wimax/examples/wimax-multicast.cc`` shows how to specify a non-default channel or propagation model::: channel = CreateObject (); @@ -133,13 +133,13 @@ or propagation model::: scheduler); Mobility is also supported in the same way as in Wifi models; see the -``examples/wimax/wimax-multicast.cc``. +``src/wimax/examples/wimax-multicast.cc``. Another important concept in WiMAX is that of a service flow. This is a unidirectional flow of packets with a set of QoS parameters such as traffic priority, rate, scheduling type, etc. The base station is responsible for issuing service flow identifiers and mapping them to WiMAX connections. The -following code from ``examples/wimax/wimax-multicast.cc`` shows how this is +following code from ``src/wimax/examples/wimax-multicast.cc`` shows how this is configured from a helper level::: ServiceFlow MulticastServiceFlow = wimax.CreateServiceFlow (ServiceFlow::SF_DIRECTION_DOWN, diff --git a/src/wimax/model/bs-scheduler-simple.cc b/src/wimax/model/bs-scheduler-simple.cc index fafa4b7ac..ab6f0e73e 100644 --- a/src/wimax/model/bs-scheduler-simple.cc +++ b/src/wimax/model/bs-scheduler-simple.cc @@ -267,7 +267,7 @@ bool BSSchedulerSimple::SelectConnection (Ptr &connection) serviceFlowRecord = (*iter2)->GetRecord (); NS_LOG_INFO ("processing UGS: HAS PACKET=" << (*iter2)->HasPackets () << "max Latency = " << MilliSeconds ((*iter2)->GetMaximumLatency ()) << "Delay = " << ((currentTime - - serviceFlowRecord->GetDlTimeStamp ()) + GetBs ()->GetPhy ()->GetFrameDuration ())); + - serviceFlowRecord->GetDlTimeStamp ()) + GetBs ()->GetPhy ()->GetFrameDuration ())); // if latency would exceed in case grant is allocated in next frame then allocate in current frame if ((*iter2)->HasPackets () && ((currentTime - serviceFlowRecord->GetDlTimeStamp ()) + GetBs ()->GetPhy ()->GetFrameDuration ()) > MilliSeconds ((*iter2)->GetMaximumLatency ())) diff --git a/src/wimax/model/bs-uplink-scheduler-mbqos.cc b/src/wimax/model/bs-uplink-scheduler-mbqos.cc index efb8b4c25..bda166057 100644 --- a/src/wimax/model/bs-uplink-scheduler-mbqos.cc +++ b/src/wimax/model/bs-uplink-scheduler-mbqos.cc @@ -307,7 +307,7 @@ UplinkSchedulerMBQoS::Schedule (void) // Recover period interval information for UGS flow Time frame_duration = GetBs ()->GetPhy ()->GetFrameDuration (); Time - timestamp = + timestamp = (*(ssRecord->GetServiceFlows (ServiceFlow::SF_TYPE_UGS).begin ()))->GetRecord ()->GetLastGrantTime () + MilliSeconds ((*(ssRecord->GetServiceFlows (ServiceFlow::SF_TYPE_UGS).begin ()))->GetUnsolicitedGrantInterval ()); diff --git a/src/wimax/model/simple-ofdm-wimax-phy.cc b/src/wimax/model/simple-ofdm-wimax-phy.cc index f98136e7e..f4bbece22 100644 --- a/src/wimax/model/simple-ofdm-wimax-phy.cc +++ b/src/wimax/model/simple-ofdm-wimax-phy.cc @@ -43,7 +43,7 @@ NS_OBJECT_ENSURE_REGISTERED (SimpleOfdmWimaxPhy); TypeId SimpleOfdmWimaxPhy::GetTypeId (void) { static TypeId - tid = + tid = TypeId ("ns3::SimpleOfdmWimaxPhy").SetParent () .AddAttribute ("NoiseFigure", diff --git a/src/wimax/model/ss-net-device.cc b/src/wimax/model/ss-net-device.cc index 3f4b0fd0e..5bd4ca971 100644 --- a/src/wimax/model/ss-net-device.cc +++ b/src/wimax/model/ss-net-device.cc @@ -57,7 +57,7 @@ TypeId SubscriberStationNetDevice::GetTypeId (void) { static TypeId - tid = + tid = TypeId ("ns3::SubscriberStationNetDevice") .SetParent () diff --git a/src/wimax/model/wimax-mac-queue.cc b/src/wimax/model/wimax-mac-queue.cc index b537505e4..4dc14f326 100644 --- a/src/wimax/model/wimax-mac-queue.cc +++ b/src/wimax/model/wimax-mac-queue.cc @@ -275,7 +275,7 @@ WimaxMacQueue::Dequeue (MacHeaderType::HeaderType packetType, uint32_t available "\n\t\t maxFragmentSize=" << maxFragmentSize << "" "\n\t\t fragmentOffset=" << fragmentOffset << "\n\t\t payloadSize=" << packet->GetSize () - << std::endl); + << std::endl); Ptr fragment = packet->CreateFragment (fragmentOffset, maxFragmentSize); m_bytes -= maxFragmentSize; diff --git a/src/wimax/model/wimax-net-device.cc b/src/wimax/model/wimax-net-device.cc index d140e9610..082069b1e 100644 --- a/src/wimax/model/wimax-net-device.cc +++ b/src/wimax/model/wimax-net-device.cc @@ -52,7 +52,7 @@ Time WimaxNetDevice::m_frameStartTime = Seconds (0); TypeId WimaxNetDevice::GetTypeId (void) { static TypeId - tid = + tid = TypeId ("ns3::WimaxNetDevice") .SetParent () diff --git a/src/wimax/test/phy-test.cc b/src/wimax/test/phy-test.cc index 1872355a5..4dcd4f74e 100644 --- a/src/wimax/test/phy-test.cc +++ b/src/wimax/test/phy-test.cc @@ -108,7 +108,7 @@ Ns3WimaxSimpleOFDMTestCase::DoRun (void) { double - frameDuratioTab[7] = { 0.0025, 0.004, 0.005, 0.008, 0.01, 0.0125, 0.02 }; + frameDuratioTab[7] = { 0.0025, 0.004, 0.005, 0.008, 0.01, 0.0125, 0.02 }; for (int i = 0; i < 7; i++) { NS_LOG_DEBUG ("Frame Duration = " << frameDuratioTab[i]); diff --git a/src/wscript b/src/wscript index 32f2e0b12..08a2821d6 100644 --- a/src/wscript +++ b/src/wscript @@ -59,6 +59,7 @@ all_modules = ( 'visualizer', 'point-to-point-layout', 'csma-layout', + 'template', ) def set_options(opt): @@ -87,6 +88,7 @@ def configure(conf): conf.sub_config('test') conf.sub_config('click') conf.sub_config('openflow') + conf.sub_config('stats') blddir = os.path.abspath(os.path.join(conf.blddir, conf.env.variant())) conf.env.append_value('NS3_MODULE_PATH', blddir) diff --git a/test.py b/test.py index b40b3d0ec..25426b9db 100755 --- a/test.py +++ b/test.py @@ -174,7 +174,12 @@ def get_node_text(node): # def translate_to_text(results_file, text_file): f = open(text_file, 'w') - dom = xml.dom.minidom.parse(results_file) + try: + dom = xml.dom.minidom.parse(results_file) + except xml.parsers.expat.error: + print "\nAn error was encountered while parsing the XML file %s." % (results_file) + sys.exit(1) + for suite in dom.getElementsByTagName("TestSuite"): result = get_node_text(suite.getElementsByTagName("SuiteResult")[0]) name = get_node_text(suite.getElementsByTagName("SuiteName")[0]) diff --git a/utils/print-introspected-doxygen.cc b/utils/print-introspected-doxygen.cc index d0db37c6e..be89b7574 100644 --- a/utils/print-introspected-doxygen.cc +++ b/utils/print-introspected-doxygen.cc @@ -351,7 +351,7 @@ int main (int argc, char *argv[]) std::cout << "/*!" << std::endl - << "\\ingroup core" << std::endl + << "\\ingroup constructs" << std::endl << "\\defgroup TraceSourceList The list of all trace sources." << std::endl; for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i) { @@ -373,7 +373,7 @@ int main (int argc, char *argv[]) std::cout << "/*!" << std::endl - << "\\ingroup core" << std::endl + << "\\ingroup constructs" << std::endl << "\\defgroup AttributeList The list of all attributes." << std::endl; for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i) { @@ -396,7 +396,7 @@ int main (int argc, char *argv[]) std::cout << "/*!" << std::endl - << "\\ingroup core" << std::endl + << "\\ingroup constructs" << std::endl << "\\defgroup GlobalValueList The list of all global values." << std::endl << "
    " << std::endl; for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i) diff --git a/utils/test-runner.cc b/utils/test-runner.cc index 094ef6d76..93ad3738e 100644 --- a/utils/test-runner.cc +++ b/utils/test-runner.cc @@ -196,7 +196,6 @@ main (int argc, char *argv[]) bool haveBasedir = false; bool haveTempdir = false; - bool haveOutfile = false; bool haveType = false; std::string suiteName; @@ -250,7 +249,6 @@ main (int argc, char *argv[]) if (arg.find ("--out=") != std::string::npos) { outfileName = arg.substr (arg.find_first_of ("=") + 1, 9999); - haveOutfile = true; } if (arg.find ("--suite=") != std::string::npos) diff --git a/wscript b/wscript index 1b0755f00..46c1593c6 100644 --- a/wscript +++ b/wscript @@ -567,6 +567,12 @@ def add_scratch_programs(bld): def build(bld): + # If --enabled-modules option was given, then print a warning + # message and exit this function. + if Options.options.enable_modules: + Logs.warn("No modules were built. Use waf configure --enable-modules to enable modules.") + return + bld.env['NS3_MODULES_WITH_TEST_LIBRARIES'] = [] bld.env['NS3_ENABLED_MODULE_TEST_LIBRARIES'] = [] bld.env['NS3_SCRIPT_DEPENDENCIES'] = [] @@ -633,16 +639,6 @@ def build(bld): add_examples_programs(bld) add_scratch_programs(bld) - ## if --enabled-modules option was given, we disable building the - ## modules that were not enabled, and programs that depend on - ## disabled modules. - - if Options.options.enable_modules: - Logs.warn("the option --enable-modules is being applied to this build only;" - " to make it permanent it needs to be given to waf configure.") - env['NS3_ENABLED_MODULES'] = ['ns3-'+mod for mod in - Options.options.enable_modules.split(',')] - if env['NS3_ENABLED_MODULES']: modules = env['NS3_ENABLED_MODULES']