Compare commits

...
Author SHA1 Message Date
Alexander Afanasyev bb96dc1e3b Avoid c++11 syntax 2015-06-15 14:33:10 -07:00
Alexander Afanasyev 0ff3592dca core: Extend utils/print-introspected-doxygen to print available LogComponents 2015-01-17 20:35:17 -08:00
Alexander Afanasyev ae7e6f1b0d core: Give ability to generate subset of documentation by utils/print-introspected-doxygen 2015-01-17 20:35:09 -08:00
Alexander Afanasyev 977b36c935 build: Avoid deprecated method in src/wscript 2015-01-17 20:34:54 -08:00
Spyridon Mastorakis 2cdce1f5e1 bindings: Update wscript to compile with the new version of pybindgen. 2015-01-17 20:30:04 -08:00
Spyridon Mastorakis 861e001084 python: Fix bug with version detection 2014-09-30 18:01:25 -07:00
Alexander Afanasyev bda0c62de5 bindings: Fixes 2014-09-30 17:39:08 -07:00
Alexander Afanasyev 620e5dcc62 topology-read: Making default constructor for TopologyReader::Link public.
This is necessary for some STL containers operations.
2014-09-30 17:39:07 -07:00
Alexander Afanasyev f438ab14e1 topology-read: TopologyReader and derivatives are no longer Objects
To allow smart pointers, TopologyReader is just inherited from
SimpleRefCount<TopologyReader> class
2014-09-30 17:39:07 -07:00
Alexander Afanasyev bf89dfdff3 topology-read: Several extensions of TopologyReader 2014-09-30 17:39:07 -07:00
Alexander Afanasyev 965856da98 build: Disable -Werror flags 2014-09-30 17:39:07 -07:00
Alexander Afanasyev dba04b9297 build: Update to waf with an upgraded version of python tool
See https://code.google.com/p/waf/issues/detail?id=1346

Also, updating help for boost module: separating boost-related
command-line options into an option group and reformatting help
messages.
2014-09-30 17:39:06 -07:00
Alexander Afanasyev 6995e94674 build: no longer require fake `ns3' directory in NS-3's root folder 2014-09-30 17:39:06 -07:00
Alexander Afanasyev a45b54ba70 bindings+network: Packet API extension, allowing creating of packet from string (for python bindings) 2014-09-30 17:39:06 -07:00
Alexander Afanasyev 6deb56527a bindings+network: Adding STL-like iterator wrappers (begin(), end(), size()) for NodeContainer class 2014-09-30 17:39:06 -07:00
Alexander Afanasyev 8e065000f9 visualizer: Modifying the way visualizer is installed
Using ant_glob instead of explicitly listing the installed files
2014-09-30 17:39:06 -07:00
Alexander Afanasyev e50a026e02 visualizer+ndnSIM: Adding ability to visualize items of the content store in real time 2014-09-30 17:39:06 -07:00
Alexander Afanasyev 5c755206fd visualizer: Adding ability to assign position to mobility model is env{NS_VIS_ASSIGN} is set to any value 2014-09-30 17:39:05 -07:00
Alexander Afanasyev 24cb6b5b6a visualizer: output node ID 2014-09-30 17:39:05 -07:00
Alexander Afanasyev 92c9ec38ca visualizer: Update visualizer plugins to reflect refactored ndnSIM code 2014-09-30 17:39:05 -07:00
Alexander Afanasyev 75df5e125a visualizer+ndnSIM: Adding plugin to display ndnSIM PIT status 2014-09-30 17:39:05 -07:00
Alexander Afanasyev ddde1f034e visualizer: Making a periodic topology rescan 2014-09-30 17:39:04 -07:00
Alexander Afanasyev 18aba9a465 visualizer+ndnSIM: Adding plugin to display a ndnSIM FIB state 2014-09-30 17:39:04 -07:00
Alexander Afanasyev 77adeafeed visualizer+mobility: A specialized version of GetObject (GetMobilityModel) is now implemented in MobilityModel class. This method is now used by the visualizer to obtain mobility interface.
This trick is necessary in order to use in python mobility models that
are not explicitly exported (or impossible to export) to python bindings
generation.
2014-09-30 17:39:04 -07:00
Alexander Afanasyev c958f20411 fd-net-device: Add missing include for strerror 2014-09-30 17:39:04 -07:00
Alexander Afanasyev 244f624a59 point-to-point: Extending helper interface to support setting individual queue parameters 2014-09-30 17:39:04 -07:00
Alexander Afanasyev 2dc940f876 point-to-point-layout: Respect absolute values of specified boundaries
Before the change, the values specified in SetBoundaryBox were used only
to calculate relative positions of grid nodes.
2014-09-30 17:39:04 -07:00
Alexander Afanasyev eb7dde0924 point-to-point, netanim: Adding ChannelID to PointToPointChannel trace 2014-09-30 17:38:39 -07:00
Ilya Moiseenko 653802993c point-to-point: Add support of NDN protocol
- Add support of PPP->Ethernet and Ethernet->PPP frame type conversion
  for NDN protocol
- Adding support for NDN payload in PppHeader::Print method
2014-09-30 16:27:31 -07:00
Alexander Afanasyev baa8ccf153 Adding .gitignore and disclaimer note in README 2014-09-30 16:27:31 -07:00
Tom Henderson c994aa10d8 rescan remaining bindings 2014-09-15 20:51:08 -07:00
Tom Henderson 47e3b01c82 silence uninitialized variable warning for unused member 2014-09-15 20:50:43 -07:00
Tom Henderson 55501d239e conditional include of fd-net-device for lte module 2014-09-15 20:49:38 -07:00
Peter D. Barnes, Jr. fdfece661a Bug 1972: documentation to clarify the behavior with repeated argument 2014-09-15 14:35:11 -07:00
Tom Henderson 9f77006419 remove outdated reference to statistics chapter 2014-09-15 13:01:31 -07:00
Tom Henderson 52567ff22b fix formatting for CoDel chapter 2014-09-15 13:00:23 -07:00
Tommaso Pecorella d01fcfd9ab update tutorial to describe Simulator::Stop 2014-09-15 11:29:15 -07:00
Tommaso Pecorella 9b1f7c5b4b Bug 1911 - AODV can not work on nodes with more than one NetDevice 2014-09-13 19:23:39 +02:00
Tom Henderson 4ea5aa6f01 update AUTHORS 2014-09-13 09:00:41 -07:00
Tom Henderson 8e781d4d16 update CHANGES.html 2014-09-13 08:50:02 -07:00
Tom Henderson 1bfd17915d update RELEASE_NOTES 2014-09-13 08:47:05 -07:00
Sébastien Deronne a39ea72650 update WiFi documentation 2014-09-12 20:48:46 -07:00
Tom Henderson 1d0b7ff106 temporarily disable two tests failing for OS X 2014-09-12 20:27:47 -07:00
Tom Henderson 9cfe687e4a prevent TcpHeader::Deserialize() from asserting; fix a few small bugs in option code 2014-09-12 18:29:47 -07:00
Tom Henderson 45b1b3daa1 silence compiler warning 2014-09-12 18:19:47 -07:00
Tom Henderson 4394d1d4ba clarify Header::Deserialize documentation 2014-09-12 17:49:06 -07:00
Alexander Afanasyev 5b1096a52a Bug 1673: Config::Set/Connect does not search for attributes in parent classes 2014-09-12 17:34:43 -07:00
Tom Henderson 161c703a1f test case for config path attribute search on parent classes (bug 1673) 2014-09-12 17:42:12 -07:00
Tom Henderson 6674f95bc1 equation formatting for latex 2014-09-12 14:07:32 -07:00
Tommaso Pecorella 066e14f83f Bug 1824 - aodv fixes 2014-09-12 22:51:20 +02:00
Tom Henderson 3d1daf7c5a chapter included multiple times in manual 2014-09-12 13:36:01 -07:00
Peter D. Barnes, Jr. 070e2da241 Bug 1964: GetInteger overflow 2014-09-12 13:03:06 -07:00
Tom Henderson 3048ebcced regression test for bug 1964 2014-09-12 12:55:00 -07:00
Tommaso Pecorella 077579b060 Bug 1824 - L4 protocol sockets should support BindToNetDevice over IPv6 2014-09-12 20:47:17 +02:00
Tom Henderson 2cafbd6dbd repair wscript 2014-09-12 10:18:55 -07:00
Tom Henderson e2f347c513 make openflow-switch peek transport headers based on IPv4 protocol number information 2014-09-11 21:51:29 -07:00
Tom Henderson 884ad61823 adjust ns3tcp-cwnd-test-suite response vector 2014-09-11 20:08:17 -07:00
Tom Henderson 3a872a1d8c update test vector for test ns3-tcp-interoperability 2014-09-11 17:43:37 -07:00
Tom Henderson cc9e4d787b improve printing of window scale option 2014-09-11 17:29:21 -07:00
Tom Henderson 80c9d1e629 update test vectors for test ns3-tcp-loss 2014-09-11 17:22:58 -07:00
Tom Henderson fb59f7982a update test vectors for test ns3-tcp-state 2014-09-11 15:29:42 -07:00
Tom Henderson bc68d4f0e0 new test vectors for devices-mesh-flame-regression 2014-09-11 14:56:06 -07:00
Tom Henderson 9133c72c96 update mesh flame tests to account for wifi random variables 2014-09-11 14:55:42 -07:00
Tom Henderson cbc91604dd new test vectors for devices-mesh-dot11s-regression 2014-09-11 14:20:28 -07:00
Tom Henderson fafad95f72 update mesh tests to account for wifi random variables 2014-09-11 14:06:19 -07:00
Tom Henderson f17bd8c546 Mesh Wifi uses also RegularWifiMac 2014-09-11 13:45:38 -07:00
Tommaso Pecorella 274fcc293a Update RELEASE_NOTES 2014-09-11 22:47:53 +02:00
Kristian A. Hiorth 8d4db65927 Bug 1981 - PyViz shell not compatible with ipython >= 0.11 2014-09-11 20:08:05 +01:00
Tom Henderson f627ad5df2 update regression traces for OLSR 2014-09-11 11:32:09 -07:00
Tom Henderson 9db13b8df4 fix the stream assignment of some additional random variables in OLSR test suite 2014-09-11 11:23:03 -07:00
Tom Henderson 87c3097be5 update AODV regression traces 2014-09-11 10:28:37 -07:00
Tom Henderson bb457316d4 rescan internet bindings 2014-09-10 21:07:04 -07:00
Tom Henderson d4901ad3b0 move unknown TCP option handling with the base class 2014-09-10 17:31:46 -07:00
Tom Henderson bf9893dbf3 add processing for unknown TCP options 2014-09-10 16:58:31 -07:00
Tom Henderson 15333eaf9a calculate send scale factor when sending the SYN-ACK instead of when reading the SYN options 2014-09-10 15:08:30 -07:00
Tom Henderson a80337baab add some logging 2014-09-10 15:06:10 -07:00
Tom Henderson 8443885e88 restore TCP option padding approach that avoids NOPs 2014-09-10 15:05:57 -07:00
Tom Henderson d559ff6c4c remove unsupported option types from enum 2014-09-09 16:15:49 -07:00
Tommaso Pecorella 0950f7f943 TcpOptions Deserialize should return zero if a deserialization error happens 2014-09-09 09:44:37 +02:00
Natale Patriciello b6d33fd296 TCP Options - Valgrind fixes 2014-09-10 19:09:06 +02:00
Daniel Lertpratchya 1857322c43 Bug 1858 - wireless examples not correctly recording packet reception - reported by Scott Carpenter <scarpen_at_ncsu.edu> 2014-09-10 08:27:26 +02:00
Tommaso Pecorella 208fdf2681 Update RELEASE_NOTE 2014-09-10 06:15:01 +02:00
Tommaso Pecorella 65d1ba667b rescan network bindings 2014-09-10 06:09:55 +02:00
Tommaso Pecorella ae9fbb2eaa rescan applications bindings 2014-09-10 05:58:38 +02:00
Tommaso Pecorella b489a41127 Bug 1811 - Basic traffic generator for network module 2014-09-10 06:09:45 +02:00
Tom Henderson 9d2770100d last TCP option should be END, not NOP 2014-09-06 09:40:18 -07:00
Tommaso Pecorella 287bda5b7e Move some tests from src/test to appropriate places 2014-09-06 07:09:08 +02:00
Tommaso Pecorella 98945439e1 Enhancements to SimpleNetDevice and SimpleChannel 2014-09-06 07:08:49 +02:00
Tommaso Pecorella 3ae1348425 Fix clang "errors" about uninitialized variables. 2014-09-06 06:57:27 +02:00
Tom Henderson a0fefe1074 rescan wifi bindings 2014-09-05 18:50:40 -07:00
Tom Henderson 5072f3a3c6 rescan energy bindings 2014-09-05 18:46:15 -07:00
Tom Henderson 68a33cd7ba rescan lte bindings 2014-09-05 18:19:30 -07:00
Tom Henderson f6fc901227 rescan internet bindings 2014-09-05 18:00:05 -07:00
Piotr Gawlowicz 74f0cf7073 GSoC 2014 FFR algorithms - figures 2014-09-05 01:46:10 +02:00
Piotr Gawlowicz a9ef49d196 GSoC 2014 FFR algorithms 2014-09-05 01:12:55 +02:00
Anh Nguyen a64d69ce19 documentation for CoDel queue 2014-09-04 12:33:50 -07:00
Anh Nguyen 07357e4048 examples for CoDel queue 2014-09-04 12:29:36 -07:00
Anh Nguyen 4c20e1b099 test suite for CoDel queue 2014-09-04 12:27:00 -07:00
Anh Nguyen 153479dac9 changes suggested in original code review, and aditional improvements made during 2014 GSoC project 2014-09-04 12:24:07 -07:00
Tom Henderson 16e4f9b004 move CoDel queue model to internet module 2014-09-04 12:18:19 -07:00
Dave Taht 6b05c585d1 Add Codel alogithm support
---
 src/network/utils/codel-queue.cc |  482 ++++++++++++++++++++++++++++++++++++++
 src/network/utils/codel-queue.h  |  130 ++++++++++
 2 files changed, 612 insertions(+), 0 deletions(-)
 create mode 100644 src/network/utils/codel-queue.cc
 create mode 100644 src/network/utils/codel-queue.h
2014-05-22 14:42:47 -05:00
Natale Patriciello 07364f0e31 Support for basic TCP options, window scale, and timestamps, based on original code proposal by Adrian S.-W. Tam 2014-09-05 16:57:11 -07:00
Natale Patriciello b4a48d02b2 GT_OR_EQ and LT_OR_EQ macros for testing 2014-09-04 15:17:22 -07:00
Stefano Avallone bd8c6c8a32 add support for a Wifi sleep mode 2014-09-05 16:33:57 -07:00
Cristiano Tapparello d3ff87aeb2 Energy harvester model 2014-09-05 15:38:55 -07:00
Tom Henderson 47d531fb41 support disabling of NSC by command-line argument 2014-09-05 15:25:10 -07:00
Budiarto Herman 81820dd14f Updated fix for Bug 1762 - UE stuck in IDLE_CONNECTING because RRC CONN REQ is not transmitted 2014-09-04 23:13:41 +03:00
Nicola Baldo c69d0bfe09 fixed Bug 1893 - issue in DoSchedUlTriggerReq with harq 2014-09-03 13:42:12 +02:00
Tommaso Pecorella 07040f354c Improve IPv6 LL multicast interface selection 2014-08-30 18:20:10 +02:00
Tommaso Pecorella 51aa7c22a4 Improve ICMPv6 NS printing 2014-08-30 18:19:25 +02:00
Tommaso Pecorella dda7b43d44 Bug 1967 - LL Multicast is not compressed in the right way in IPHC 2014-08-30 18:25:22 +02:00
Tommaso Pecorella 6d42b5f6c1 lr-wpan: remove dead code and add Doxygen 2014-08-25 19:15:36 +02:00
Tommaso Pecorella 8225948ffd [Doxygen] NetDevice small fix 2014-08-25 09:34:17 +02:00
Tommaso Pecorella be8cd47fc8 [PyBindGen] rescan internet module 2014-08-24 17:29:26 +02:00
Tommaso Pecorella 6ac283a20b [Doxygen] internet module fixes 2014-08-24 17:16:17 +02:00
Tommaso Pecorella 35f32fe073 Bug 1963 - AODV can tag the same packet twice (and raise an assert). 2014-08-23 17:37:24 +02:00
Tommaso Pecorella 62eaf4f7cb [manual] Packet::EnableMetadata doesn't exist anymore 2014-08-23 17:34:17 +02:00
Tom Henderson af37384cff Suppress binding for EmuEpcHelper if EmuFdNetDevice is not enabled 2014-08-19 14:29:52 -07:00
Peter D. Barnes, Jr. 16af384434 [Sphinx] Attributes manual chapter 2014-08-18 17:43:37 -07:00
Peter D. Barnes, Jr. e34b13367b Show default attribute value in command line example - cleanup 2014-08-18 16:00:42 -07:00
Tommaso Pecorella fb985d0860 Show default attibute value in command line example - fix 2014-08-18 23:45:04 +02:00
Peter D. Barnes, Jr. 97f06df836 Show initial values of arguments; show attribute value. 2014-08-18 12:36:07 -07:00
Peter D. Barnes, Jr. 06fe039cd9 Fix misspelled argument name; refactor to use LookupAttributeByName 2014-08-18 12:35:33 -07:00
Vedran Miletić e22f7b5958 Make ordering of member variables in NSC TCP socket implementation header/source consistent 2014-08-18 11:56:15 +02:00
Tommaso Pecorella 27e7935c6c [PyBindGen] Rescan core module 2014-08-15 14:27:15 +02:00
Peter D. Barnes, Jr. b8b676a8d7 CommandLine Attribute shorthand 2014-08-14 12:46:11 -07:00
Peter D. Barnes, Jr. fa19c3d5e3 [doxygen] CommandLine formatting 2014-08-14 12:41:38 -07:00
Peter D. Barnes, Jr. 60505541ec Sort output of the CommandLine::Print functions 2014-08-14 11:31:12 -07:00
Tommaso Pecorella 894e118a3b [PyBindGen] Rescan internet module 2014-08-14 06:34:47 +02:00
Peter D. Barnes, Jr. 49bf6a544f [Doxygen] Fix errors; fix organization of Callback; organize Time. 2014-08-13 17:17:26 -07:00
Tommaso Pecorella 2d79be2427 Improvements to tcp-variants-comparison example 2014-08-13 22:43:18 +02:00
Tommaso Pecorella fbad78fbb4 Bug 1831 - TcpSocket SlowStartThreshold is not a TraceSource 2014-08-13 23:46:16 +02:00
Alina Quereilhac 10269d0a5b Fix for Bug 1961 - planetlab-tap-creator "variable set but not used" 2014-08-06 11:00:06 +02:00
Tommaso Pecorella fe90df6c23 Bug 1960 - Wrong information on index range, about Node::GetDevice 2014-08-03 15:09:19 +02:00
Tom Henderson 9a8bbca8df rescan LTE bindings 2014-08-03 09:55:53 -07:00
Nicola Baldo d762f84977 refined fix for Bug 1762 2014-08-01 14:30:42 +02:00
Budiarto Herman c53882872b fix Bug 1762 - UE stuck in IDLE_CONNECTING because RRC CONN REQ is not transmitted 2014-07-31 14:00:06 +02:00
Tommaso Pecorella 6af34ad829 Bug 1941 - [cont.] Remove unnecessary dependency on Application module in other modules 2014-07-27 23:02:38 +02:00
Tommaso Pecorella e3729362c9 Avoid checking all Link-Local Multicast cases in IPv6 routing 2014-07-26 13:08:33 +02:00
Lynne Salameh 691b9f892f Bug 1955 - The IPv4 identification field should be unique per (source, destination, protocol) tuple 2014-07-20 11:29:28 +02:00
Roman Naumann f0d6341ddf Bug 1951 - AODV does not update nexthop for 1-hop nodes 2014-07-20 10:13:02 +02:00
Peter D. Barnes, Jr. f8bb25d058 Enable explicit setting of the maximum look ahead in distributed simulation. 2014-07-17 15:38:07 -07:00
Peter D. Barnes, Jr. e4f944939c NS_LOG_CONDITION to control logging based on file-local state. 2014-07-17 15:34:57 -07:00
Dmitrii Shakshin 005ea81ecf NetAnim: Support for system id associated with nodes 2014-07-10 08:19:06 -07:00
Sascha Alexander Jopen 9fd85ad079 Add const double& operator[] to SpectrumValue 2014-07-08 08:27:21 +02:00
Tom Henderson b3a080b633 enable emu-related files based on waf configuration check results 2014-07-05 09:51:04 -07:00
Sascha Alexander Jopen 4078d90539 Bug 1943 - Waveform generator signal duration calc error 2014-07-04 20:22:47 +02:00
Nicola Baldo 19653b4a77 updated LTE user docs and RELEASE_NOTES for EmuEpcHelper 2014-07-03 16:43:58 +02:00
Nicola Baldo 057f56133b merge 2014-07-03 15:39:00 +02:00
Nicola Baldo fe5ee0c29b merge 2014-07-03 10:48:41 +02:00
Tom Henderson 4af772ceaa print error message when test.py list printing fails 2014-06-30 11:09:35 -07:00
John Abraham 7ec65a1816 NetAnim: Valgrind fixes 2014-06-29 20:19:00 -07:00
John Abraham b397d2775e NetAnim: Cleanup and support for more built-in counters 2014-06-28 09:59:03 -07:00
Tommaso Pecorella 31f05a6594 Bug 1941 - [cont.] Remove unnecessary dependency on Application module in other modules 2014-06-28 12:35:08 +02:00
Tommaso Pecorella d7731afca3 Bug 1941 - [partial] Remove unnecessary dependency on Application module in other modules 2014-06-28 08:31:24 +02:00
Tommaso Pecorella 16671aa50d Bug 1937 - FlowMonitor fails to track multiplexed packets 2014-06-27 22:28:07 +02:00
Tom Henderson aa3a17d3e5 improve point-to-point-net-device.cc logging 2014-06-26 13:15:49 -07:00
mmiozzo 7716182610 Bug-fix: Bug 1935 - Bug in all Uplink Schedulers regarding HARQ retx handling 2014-06-26 13:44:03 +02:00
Tom Henderson a0be1da4b5 update pybindgen version 2014-06-23 09:52:33 -07:00
Tommaso Pecorella 6bde2bde12 Bug 1921 - Icmpv6L4Protocol::ForgeEchoRequest returns a malformed packet 2014-06-18 19:03:10 +02:00
Tommaso Pecorella b7a3cff456 Bug 1932 - NdiscCache entry is not failsafe on double neighbor probing 2014-06-17 23:31:52 +02:00
Roman Naumann 69d284bc83 Credit for Bug 1930 finding and patch. 2014-06-17 22:44:08 +02:00
Tommaso Pecorella 5a3b3d38e3 Bug 1930 - Use of invalid reference in OLSR RemoveLinkTuple 2014-06-17 22:40:32 +02:00
Tom Henderson 71d0c0f554 start RELEASE_NOTES and CHANGES.html for next version 2014-06-17 10:59:19 -07:00
Tom Henderson 060d270a04 Added tag ns-3.20 for changeset da0eb48df23f 2014-06-16 21:58:35 -07:00
Alina Quereilhac e6fc8c2ad2 update fd-tap-ping.cc instructions 2014-06-15 08:54:48 -07:00
Tom Henderson 14ee3219ae update RELEASE_NOTES 2014-06-12 12:36:44 -07:00
Sascha Jopen 5a00199a04 bug 1924 - sensing radius and CCA 2014-06-12 12:35:32 -07:00
Tom Henderson eac8c0a104 update RELEASE_NOTES 2014-06-11 20:27:12 -07:00
Unknown b9b6bacc5f bug 1923: Patch for disabling active probe requests 2014-06-11 20:26:02 -07:00
Tom Henderson ba584e1ac1 update CHANGES.html 2014-06-06 12:43:03 -07:00
Tom Henderson 2a1014565d update release notes 2014-06-06 12:32:41 -07:00
Tom Henderson 620d770f3c add author 2014-06-06 12:01:56 -07:00
Tom Henderson 15a9d1bb55 rescan wifi bindings 2014-06-06 12:00:58 -07:00
Scott Carpenter 131381a91a bug 1922- GetSsid() should not be fatal 2014-06-06 10:49:03 -07:00
Tom Henderson 50cb988c49 bug 1920 - remove DSR attribute that was conflicting with config store 2014-06-06 10:47:21 -07:00
Scott Carpenter f80a00ba88 bug 1919 - Strip trailing semicolons from mobility trace files 2014-06-06 10:18:10 -07:00
Sébastien Deronne b5f51f5366 Bug 1907- Add IsMcsSupported() 2014-06-06 10:15:54 -07:00
Tom Henderson 243e8a0645 bug 1868: restrict the compiler version for Wstrict-overflow=5 until gcc-4.9 issues are addressed 2014-06-06 10:11:35 -07:00
Tom Henderson b6a990f767 describe bug 1770 issue and workaround 2014-06-06 10:10:51 -07:00
Tom Henderson 0c9e87a440 update CHANGES.html for release 2014-05-30 21:39:15 -07:00
Tom Henderson c9051e4101 update AUTHORS list 2014-05-30 21:38:48 -07:00
Tom Henderson c9c31cce11 update RELEASE_NOTES 2014-05-30 17:38:31 -07:00
Tom Henderson 70f3450c5e update bindings 2014-05-30 10:07:22 -07:00
Unknown b9c2b3087c bug 1913: avoid crash in BlockAckManager::GetNextPacket 2014-05-29 23:00:30 -07:00
Tom Henderson 0cc9e25227 update traces for bug 1912 fix 2014-05-29 22:52:23 -07:00
Unknown 17ef04d50b bug 1912: avoid multiple MacTxMiddle instances 2014-05-29 22:51:05 -07:00
Tommaso Pecorella d1171adee8 Clarify doxygen for [Tcp,Udp]Socket ForwardUp functions 2014-05-29 21:37:33 +02:00
Tom Henderson fe5b9e2242 bug 1868: enable -Wstrict-overflow only for newer gcc versions 2014-05-28 23:03:23 -07:00
Tom Henderson f5b4f0961e remove extra newline 2014-05-28 13:10:59 -07:00
Tom Henderson f32803f7b9 bug 1900: adjust an AODV test to provide consistent traces and avoid floating point differences 2014-05-28 13:00:15 -07:00
Tommaso Pecorella e77f033498 Update RELEASE_NOTES 2014-05-21 21:03:33 +02:00
Tommaso Pecorella e74cb7f6cd Bug 1916 - RandomWalk2dMobilityMode default "Bounds" attribute is not a rectangle 2014-05-21 21:01:41 +02:00
Chris Hood 23a3e5f751 Bug 1915 - BRITE channel delay is rounded to an integer 2014-05-19 21:34:20 +02:00
Peter D. Barnes, Jr. 1164685c68 [doxygen] Fix generation of Time docs 2014-05-15 16:09:51 -07:00
Tommaso Pecorella cd8eaad8cb lr-wpan - Add Enqueue and Dequeue ASCII trace 2014-05-08 22:25:56 +02:00
Tom Henderson 23a41e0e22 add netanim capability to mixed-wireless.cc 2014-05-04 18:46:44 -07:00
Tom Henderson 7867d64876 make mobility and visualization more reasonable for example 2014-05-04 18:37:17 -07:00
Tom Henderson ddd060a1cc re-align mixed-wireless C++ and Python example 2014-05-04 17:59:01 -07:00
Alexander Afanasyev 894699eccf bug 1857: detect location of installed boost libraries 2014-05-03 15:56:25 -07:00
Tom Henderson 2661df4606 make waf smarter about finding BRITE automatically 2014-05-03 10:12:46 -07:00
Tommaso Pecorella 6fcc641c25 Update RELEASE_NOTE 2014-05-02 23:52:36 +02:00
Biljana Bojovic c4269df612 Bug 1894 - CqaFfMacScheduler needs an update 2014-05-02 17:06:37 +02:00
Nicola Baldo c612a2b43a added missing bugs in RELEASE_NOTES 2014-05-02 16:48:50 +02:00
Yufei Cheng ea04312f27 Bug 1872 and 1895 - DSR model improvements (credits also to Tomasz Seweryn <tomasz.seweryn7@gmail.com>) 2014-05-02 16:38:06 +02:00
Tommaso Pecorella d9e06f64fa fix RELEASE_NOTES 2014-05-02 08:58:51 +02:00
Tommaso Pecorella 8604dad16c lr-wpan ascii trace fix 2014-05-02 08:47:44 +02:00
Brian Swenson 7dbc7f63e4 Bug1791 patch reverted 2014-05-01 16:49:11 -04:00
Tommaso Pecorella d746b4a9d9 Add sixlowpan example using lr-wpan 2014-05-01 15:18:41 +02:00
Peter D. Barnes, Jr. a43d770825 [Bug 1868] Optimized builds are sensitive to -fstrict-overflow 2014-04-30 21:32:57 -07:00
Peter D. Barnes, Jr. 84d277bfa3 Disambiguate std::pow 2014-04-30 20:54:05 -07:00
Tom Henderson 08a075ef1d fix lr-wpan documentation build 2014-04-30 13:40:07 -07:00
Tom Henderson ff1f9f9c5f append list of skipped/failed/crashed/valgrined tests to end of test.py output 2014-04-30 13:06:17 -07:00
Tom Henderson 2c89f96f00 add lr-wpan bindings 2014-04-30 13:05:31 -07:00
Tom Henderson e0bb22b2f2 disable another copy constructor 2014-04-30 13:01:22 -07:00
Tom Henderson 20e713630a some fixes to enable Python bindings scanning 2014-04-30 12:19:33 -07:00
Sascha Jopen 022360d1f3 Reverted lr-wpan-error-model "fix", the differences were due to randomness problems. 2014-04-27 10:48:18 +02:00
Tom Henderson 2d87ec3973 update AUTHORS 2014-04-26 23:29:46 -07:00
Tom Henderson 57889369b1 Apply utils/check-style.py script on lr-wpan source code again 2014-04-26 23:27:34 -07:00
Tom Henderson 2d90b21794 more verbose test name for lr-wpan-energy-detection 2014-04-26 23:11:44 -07:00
Sascha Jopen fa763e41c5 Added firing of missing MAC TX trace sources.
Fixed error model test case after changes to the interference handling.
More code cleanup and documentation.
2014-04-26 22:23:25 +02:00
Sascha Jopen 1e7427bab1 More documentation for the PHY. 2014-04-26 09:06:00 +02:00
Margherita Filippetti 74081e597a Add number of CSMA retries to sent packet trace 2014-04-25 23:46:03 +02:00
Tom Henderson 45884e4786 assign fixed random variable streams to lr-wpan tests 2014-04-26 22:21:13 -07:00
Tom Henderson 95b22341a9 enable assignment of lr-wpan random variable stream indices 2014-04-26 22:21:03 -07:00
Tom Henderson 7059e4d396 add TestCase type specifier 2014-04-26 14:09:57 -07:00
Tom Henderson d53f68be0c multiple inclusion of lr-wpan-collision-test.cc 2014-04-26 05:44:11 -07:00
Tom Henderson ce1c08f9a7 restore Start/DoStart change to Initialize/DoInitialize to LrWpanNetDevice 2014-04-26 05:33:42 -07:00
Sascha Jopen cc1ff6ac3b First Doxygen documentation batch and code cleanups.
Moved to new random variable streams.
Use Time class where times are calculated.
Use std::min/max provided by standard library instead of own macros.
Always return a 0 FCS value for MAC trailers without FCS calculation.
2014-04-25 19:02:57 +02:00
Sascha Jopen 2eda1ac2e6 Removed sixlowpan example from scratch folder. This should go to the respective module. 2014-04-25 18:58:47 +02:00
Sascha Jopen 6ded61e205 Bug fixes and test for energy detection code. 2014-04-25 12:51:56 +02:00
Sascha Jopen bdbf0fd6e7 Changed default receiver sensitivity value. 2014-04-24 12:47:09 +02:00
Sascha Jopen 42ccc4e1dc Added log components. 2014-04-24 12:46:33 +02:00
Tom Henderson b5f0ebcab2 add lr-wpan documentation links to model library Makefile 2014-04-25 14:50:39 -07:00
Sascha Jopen e49d50c75a Updated documentation. Added debugging code. 2014-04-24 12:45:49 +02:00
Tommaso Pecorella 9c76f9ff43 Add Trace to measure the number of packet retires (for Etx metric) 2014-04-18 23:32:55 +02:00
Sascha Jopen a6316eb5a3 Make ED and CCA interference aware.
Fix a bug in interference handling.
2014-04-16 15:32:59 +02:00
Sascha Jopen c6f406fe8a Added test for ACK ordering. 2014-04-15 15:41:12 +02:00
Sascha Jopen f9fedcc59e Added LQI calculation as the PER of the complete packet scaled to 255.
Removed debugging outputs.
2014-04-15 15:40:39 +02:00
Tommaso Pecorella c65a263dbd Collision tests, the bug was a shadow 2014-04-08 21:37:23 +02:00
Tommaso Pecorella f6ad02364e Add back debugging code, seems we have a bug in interference handling. 2014-04-08 15:57:59 +02:00
Tommaso Pecorella 1e75a2cb6b Remove logging cout 2014-04-08 15:06:52 +02:00
Tommaso Pecorella 92b2936c5d Tweaks to the collision tests 2014-04-08 14:58:28 +02:00
Tommaso Pecorella d486f26151 Preliminary Collision tests 2014-04-06 23:01:10 +02:00
Sascha Jopen 6c6dcbaf31 Fixed compile errors in examples. 2014-04-06 16:35:15 +02:00
Tommaso Pecorella e0d8349d71 Possible bug fix and sequence number as SequenceNumber8 2014-04-06 12:36:51 +02:00
Tommaso Pecorella 7b51212b96 Bug in receiving a packet. Assert to highlight the problem. 2014-04-06 10:00:58 +02:00
Tommaso Pecorella 65d236b00a Add example script in scratch 2014-04-04 09:50:08 +02:00
Tommaso Pecorella 29e97984bd Tweaks to Rx values 2014-03-27 23:02:43 +01:00
Sascha Jopen 4507193d46 Removed debug output. 2014-03-27 17:25:12 +01:00
Sascha Jopen 62afc9063e First version with interference handling. 2014-03-27 16:56:15 +01:00
Tommaso Pecorella 29f5bd43f3 Align error model test to actual results after bug fixing 2014-03-25 23:21:02 +01:00
Sascha Jopen a32593c948 Relicense lr-wpan-lqi-tag.{cc,h} to GPLv2. 2014-03-25 14:55:27 +01:00
Erwan Livolant 4737871613 Fixed missing FCS calculation for ACKs. 2014-03-20 14:44:10 +01:00
Tommaso Pecorella 74d8c0d6c7 Helper: associate nodes to a PAN 2014-03-16 22:33:50 +01:00
Tommaso Pecorella ff799f5cbd Fix Hel'er's install and add ping6/6LoWPAN example 2014-03-16 20:46:00 +01:00
Tommaso Pecorella 90dc67f344 Set rx sensitivity to -110 dBm (temporary) 2014-03-16 20:45:13 +01:00
Sascha Jopen f4b5e5e4e2 - Fixed error in MAC state machine when sending an ACK and enqueuing a data packet at the same time.
- Fixed error when switching the PHY transceiver while a switch is already in progress.
2014-02-24 12:51:06 +01:00
Tommaso Pecorella 131f31f56a ACK (Sascha Jopen), NetDevice (Tommaso Pecorella and Margherita Filippetti), FCS changes (Erwan Livolant), and clang compliance 2014-02-23 16:24:11 +01:00
Tom Henderson b5d3e81f81 fix LrWpanNetDevice::GetAddress() 2014-04-26 22:42:10 -07:00
Tom Henderson ba22dba981 update lr-wpan wscript format 2014-04-26 22:41:19 -07:00
Nicola Baldo 5084f6a5af minor fix in LTE RRC logging format 2014-01-21 19:57:53 +01:00
Nicola Baldo c162fcb75b other minor fix in LTE user docs 2014-01-21 19:38:34 +01:00
Nicola Baldo b5735684f1 minor fix in LTE user docs 2014-01-21 19:36:55 +01:00
Nicola Baldo b1c73cc5d5 updated LTE standalone docs generation 2014-01-21 15:46:37 +01:00
Nicola Baldo 5a1d345b0e merge 2013-11-20 19:31:46 +01:00
Nicola Baldo 11f6f2330f improvements in lena-simple-epc-emu 2013-11-15 13:04:27 +01:00
Nicola Baldo 2b751f4a2e fixed eNB IP addresses in EmuEpcHelper 2013-11-15 13:04:01 +01:00
Nicola Baldo fb295e22c9 added EmuEpcHelper 2013-11-14 17:41:18 +01:00
Tom Henderson a4ac0f8915 update figure reference 2013-03-22 16:16:53 -07:00
Tom Henderson 8d895fc3c3 enable pcap on a lr-wpan example 2012-07-04 21:34:18 -07:00
Tom Henderson e9dc5fbd4c remove comparison that is always true due to limited range of data type 2012-07-04 21:29:55 -07:00
Tom Henderson 8f70c1a43f align with SpectrumPhy antenna model changes for ns-3.14 2012-07-04 21:26:40 -07:00
Gary Pei f74b34aac2 align lr-wpan with ns-3.13 spectrum API changes 2012-03-29 19:31:11 -07:00
Tom Henderson 1acbf3eb64 roll-up of many updates to models, tests, examples 2011-11-16 22:01:06 -08:00
Tom Henderson 9a66307754 Initial lr-wpan checkin 2011-05-29 14:38:53 -07:00
Mitch Watrous d7bd267c7e Bug 1717 - Detect unsettable attributes 2014-04-29 22:38:13 +02:00
Christopher Kosecki a15640d10e Bug 1876 - enable OLSR HNA table access 2014-04-29 20:35:34 +02:00
Tommaso Pecorella b314b544e5 [Python bindings] refresh OLSR module 2014-04-29 10:54:16 +02:00
Tommaso Pecorella 1c8972af9d Bug 1817 - IPv4 Identification field should consider protocol as well. 2014-04-29 10:07:25 +02:00
Tommaso Pecorella ae5d2c7131 Bug 1276 - optimize NistErrorRateModel 2014-04-29 10:01:47 +02:00
Konstantinos Katsaros 058c71d944 Bug 1903 - Namespace usage in olsr-state.cc/h 2014-04-29 09:50:21 +02:00
Tommaso Pecorella c75d24d0d3 RIPng - avoid spaces in ConfigStore names 2014-04-28 22:14:15 +02:00
Tom Henderson f30b671683 clarify some points about the ConfigStore 2014-04-28 10:50:25 -07:00
Tom Henderson 3588837aa6 fix typo 2014-04-28 10:38:37 -07:00
Tomasz Seweryn f7e18f35b4 Bug 1873 - Energy source checked to be aggregated to the node 2014-04-26 23:01:09 +02:00
Tom Henderson af31d858d2 add missing include 2014-04-24 17:38:36 -07:00
John Abraham 16187bdb69 NetAnim: Remove obsolete functionalities 2014-04-23 08:30:00 -07:00
Tommaso Pecorella f7769e0ea0 Update RELEASE_NOTES 2014-04-22 21:42:28 +02:00
Tommaso Pecorella 2834944fc2 Bug1829 2014-04-22 14:43:02 -04:00
Brian Swenson 2f07ece0bb Bug 1850 update tests 2014-04-22 14:16:48 -04:00
Unknown 9d815d019d Bug 1850 2014-04-22 13:58:22 -04:00
696 changed files with 74205 additions and 9952 deletions

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
*.pyc
.waf*
src/NDNabstraction
build/
doc/html/
doc/latex/
\.rej$
\.orig$
\.o$
~$
^build-dir
^build
^testpy-output
^doc/html
^doc/latex
.lock-wscript
doc/ns3-object.txt
doc/introspected-doxygen.h
.lock-waf_darwin_build
.lock-waf_linux2_build
.lock-waf_cygwin_build
.lock-waf_freebsd7_build
.lock-waf_freebsd8_build
.lock-waf_freebsd9_build
.waf
^doc/introspected-doxygen\.h$
.*\.py[co]$
\.pcap$
\.mob$
\.routes$
^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
^bindings/python/pybindgen/
ms_print.*
massif.*
\.patch$
\.diff$
\.tr$
\#[^\#/]+\#$
.lock-wscript
.lock-wafbuild
src/ndnSIM
configure
toggle
+1
View File
@@ -67,3 +67,4 @@ ae540de68a2534213342c5e0b12afb47d7518a90 ns-3.14
b4a70b99171ade6e9628a87780994238950a1df1 ns-3.17
cfbc9491d7e7c9d346cc042fd35b8afb8836e81f ns-3.18
322102df792e2be6c74df74f776b3470fb1db795 ns-3.19
da0eb48df23f96335f32a37f047a6bc27e197c8d ns-3.20
+50 -29
View File
@@ -2,6 +2,7 @@ Alexander Afanasyev (alexander.afanasyev@ucla.edu)
Rohit Agarwal (mindprince@gmail.com)
Kirill Andreev (andreev@iitp.ru)
Dean Armstrong (deanarm@gmail.com)
Stefano Avallone (stefano.avallone@unina.it)
Ghada Badawy (gbadawy@gmail.com)
Nicola Baldo (nbaldo@cttc.es)
Mirko Banchi (mk.banchi@gmail.com)
@@ -11,36 +12,42 @@ Mehdi Benamor (mehdi.benamor@telecom-bretagne.eu)
Raj Bhattacharjea (raj.b@gatech.edu)
Timo Bingmann (timo.bingmann@student.kit.edu)
Julien Boite (juboite@gmail.com)
Biljana Bojovic <bbojovic@cttc.es>
Biljana Bojovic (bbojovic@cttc.es)
Elena Borovkova (borokovaes@iitp.ru)
Pavel Boyko (boyko@iitp.ru)
Dan Broyles (muxman@sbcglobal.net)
Jonathan Brugge (j.d.brugge@student.utwente.nl)
Junling Bu <linlinjavaer@gmail.com>
Junling Bu (linlinjavaer@gmail.com)
Elena Buchatskaia (borovkovaes@iitp.ru)
Gustavo Carneiro (gjc@inescporto.pt, gjcarneiro@gmail.com)
Scott Carpenter (scarpen@ncsu.edu)
Egemen K. Cetinkaya (ekc@iitc.ku.edu)
Angelos Chatzipapas (chatzipa@ceid.upatras.gr)
Eugene Chemeritskiy (echemeritskiy@arccn.ru)
Yufei Cheng (yfcheng@ittc.ku.edu)
Andrey Churin (aachurin@gmail.com)
Salva Climent (jocliba@gmail.com)
Luis Cortes (cortes@gatech.edu)
Luca Costantino (luca.costantino@gmail.com)
Alexander D'souza (moijes12@gmail.com)
Sébastien Deronne (sebastien.deronne@gmail.com)
Craig Dowell (craigdo@ee.washington.edu)
Gilaras Drakeson <gilaras@gmail.com>
Christian Facchini <c.facchini@gmail.com>
Gilaras Drakeson (gilaras@gmail.com)
Christian Facchini (c.facchini@gmail.com)
Denis Fakhriev (fakhriev@iitp.ru)
Jahanzeb Farooq (Jahanzeb.Farooq@inria.fr, Jahanzeb.Farooq@gmail.com)
Luca Favatella <slackydeb@gmail.com>
Luca Favatella (slackydeb@gmail.com)
Margherita Filippetti (morag87@gmail.com)
Pedro Fortuna (pedro.fortuna@inescporto.pt)
Juliana Freitag Borin (juliana.freitag@gmail.com)
Piotr Gawlowicz (gawlowicz.p@gmail.com)
Eric Gamess (egamess@gmail.com)
Yida Gao <yidapb@gmail.com>
Yida Gao (yidapb@gmail.com)
Thomas Geithner (thomas.geithner@dai-labor.de)
Ashim Ghosh <ashim.atiit@gmail.com>
Ashim Ghosh (ashim.atiit@gmail.com)
Martin Giachino (martin.giachino@gmail.com,giachino@fing.edu.uy)
Tom Goff (tgoff@tgoff.net)
Juan C. Granda (jcgranda@uniovi.es)
David Gross (gdavid.devel@gmail.com)
Maja Grubišić (maja.grubisic@live.com)
Charline Taibi Guguen (charline.guguen@gmail.com)
@@ -48,9 +55,11 @@ Daniel Halperin (daniel@halper.in)
Bruno Haick (bghaick@hotmail.com)
Frank Helbert (frank@ime.usp.br)
Tom Henderson (tomhend@u.washington.edu)
Budiarto Herman <budiarto.herman@magister.fi>
Tom Hewer <tomhewer@mac.com>
Kim Højgaard-Hansen <kimrhh@gmail.com>
Budiarto Herman (budiarto.herman@magister.fi)
Tom Hewer (tomhewer@mac.com)
Kristian A. Hiorth (kristahi@ifi.uio.no)
Kim Højgaard-Hansen (kimrhh@gmail.com)
Chris Hood (chood8@gatech.edu)
Blake Hurd (naimorai@gmail.com)
ishan (ishan.chhabra@gmail.com)
Mohamed Amine Ismail (amine.ismail@inria.fr, iamine@udcast.com)
@@ -61,43 +70,50 @@ Sam Jansen (sam.jansen@gmail.com)
Liu Jian (liujatp@gmail.com)
Piotr Jurkiewicz (piotr.jerzy.jurkiewicz@gmail.com)
Evgeny Kalishenko (ydginster@gmail.com)
Konstantinos Katsaros <dinos.katsaros@gmail.com>
Joe Kopena (tjkopena@cs.drexel.edu)
Konstantinos Katsaros (dinos.katsaros@gmail.com)
Morteza Kheirkhah (m.kheirkhah@sussex.ac.uk)
Flavio Kobuta (flaviokubota@gmail.com)
Joe Kopena (tjkopena@cs.drexel.edu)
Christopher Kosecki (christopher.l.kosecki.ctr@mail.mil)
Aleksey Kovalenko (kovalenko@iitp.ru)
Mathieu Lacage (mathieu.lacage@inria.fr)
Emmanuelle Laprise (emmmanuelle.laprise@bluekazoo.ca)
Kristijan Lenković <k.lenkovic@me.com>
Kristijan Lenković (k.lenkovic@me.com)
Daniel Lertpratchya (nikkipui@gmail.com)
Björn Lichtblau (lichtbla@informatik.hu-berlin.de)
Timo Lindhorst <tlnd@online.de>
Timo Lindhorst (tlnd@online.de)
Erwan Livolant (erwan.livolant@inria.fr)
Keith Ma (keith.nwsuaf@gmail.com)
Federico Maguolo (maguolof@dei.unipd.it)
Antti Makela (zarhan@cc.hut.fi)
Francesco Malandrino (francesco.malandrino@gmail.com)
Rubén Martínez (rmartinez@deic.uab.cat)
Fabian Mauchle (f1mauchl@hsr.ch)
Andrey Mazo (mazo@iitp.ru)
Jonathan McCrohan (jmccroha@tcd.ie)
Andrew McGregor (andrewmcgr@gmail.com)
Vedran Miletić (rivanvx@gmail.com)
Jens Mittag <jens.mittag@kit.edu>
Jens Mittag (jens.mittag@kit.edu)
Marco Miozzo (mmiozzo@cttc.es)
Faker Moatamri (faker.moatamri@inria.fr)
Edvin Močibob <edvin.mocibob@gmail.com>
Edvin Močibob (edvin.mocibob@gmail.com)
Mike Moreton (mjvm_ns@hotmail.com)
Michele Muccio <michelemuccio@virgilio.it>
Michele Muccio (michelemuccio@virgilio.it)
Sidharth Nabar (snabar@uw.edu)
Hemanth Narra (hemanth@ittc.ku.edu)
Andreas Nilsson <andrnils@gmail.com>
Roman Naumann (naumann@informatik.hu-berlin.de)
Andreas Nilsson (andrnils@gmail.com)
Jaume Nin (jnin@cttc.es)
Michael Nowatkowski (nowatkom@gmail.com)
Anh Nguyen <annguyen@ittc.ku.edu>
Anh Nguyen (annguyen@ittc.ku.edu)
Duy Nguyen (duy@soe.ucsc.edu)
Lluís Parcerisa <parcerisa@gmail.com>
Lluís Parcerisa (parcerisa@gmail.com)
Natale Patriciello (natale.patriciello@gmail.com)
Tommaso Pecorella (tommaso.pecorella@unifi.it)
Vikas Pushkar (vikaskupushkar@gmail.com)
Josh Pelkey (jpelkey@gatech.edu)
Per <per_e_lists@rocketmail.com>
Fernando Pereira <ferdonfeup@gmail.com>
Per (per_e_lists@rocketmail.com)
Fernando Pereira (ferdonfeup@gmail.com)
Colin Perkins (csp@csperkins.org)
Giuseppe Piro (g.piro@poliba.it)
Yana Podkosova (yanapdk@rambler.ru)
@@ -107,28 +123,33 @@ Bruno Ranieri (Yrrsinn@googlemail.com)
Ken Renard (kenneth.renard@arl.army.mil)
Manuel Requena (mrequena@cttc.es)
George F. Riley (riley@ece.gatech.edu)
Juergen Rinas <jrinas@gmx.de>
Juergen Rinas (jrinas@gmx.de)
Sebastian Rohde (sebastian.rohde@tu-dortmund.de)
Karsten Roscher <sfx@rocktale.de>
Karsten Roscher (sfx@rocktale.de)
Bill Roome (wdr@bell-labs.com)
David <david.rua@gmail.com>
David (david.rua@gmail.com)
Andrea Sacco (andrea.sacco85@gmail.com)
Lynne Salameh (l.salameh@cs.ucl.ac.uk)
Providence Salumu Munga (Providence.Salumu@gmail.com, Providence.Salumu_Munga@it-sudparis.eu)
Francisco Javier Sánchez-Roselly <fnavarro@ujaen.es>
Francisco Javier Sánchez-Roselly (fnavarro@ujaen.es)
Florian Schmidt (Florian.Schmidt@cs.rwth-aachen.de)
Guillaume Seguin (guillaume.seguin@inria.fr)
Tomasz Seweryn (tomasz.seweryn7@gmail.com)
Dmitrii Shakshin (d.shakshin@gmail.com)
Kulin Shah (m.kulin@gmail.com)
Guowang Shi <shiguowang2007@gmail.com>
Guowang Shi (shiguowang2007@gmail.com)
Phillip Sitbon (phillip.sitbon@gmail.com)
Anirudh Sivaraman (sk.anirudh@gmail.com)
Steven Smith <smith84@llnl.gov>
Andrew Stanton <acstanton515@gmail.com>
Steven Smith (smith84@llnl.gov)
Andrew Stanton (acstanton515@gmail.com)
Ewgenij Starostin (estar@cs.tu-berlin.de)
YunQiang Su (wzssyqa@gmail.com)
Brian Swenson (bswenson3@gatech.edu)
Lalith Suresh (suresh.lalith@gmail.com)
Dave Taht (dave.taht@bufferbloat.net)
Marcos Talau (talau@users.sourceforge.net)
Adrian S. W. Tam (adrian.sw.tam@gmail.com)
Cristiano Tapparello (cristiano.tapparello@rochester.edu)
Hajime Tazaki (tazaki@sfc.wide.ad.jp)
Wilson Thong (wilsonwk@ee.cityu.edu.hk)
Mauro Tortonesi (mauro.tortonesi@unife.it)
+145
View File
@@ -50,6 +50,147 @@ the cracks, unfortunately. If you, as a user, can suggest improvements
to this file based on your experience, please contribute a patch or drop
us a note on ns-developers mailing list.</p>
<hr>
<h1>Changes from ns-3.20 to ns-3.21</h1>
<h2>New API:</h2>
<ul>
<li> New "const double& SpectrumValue:: operator[] (size_t index) const".
</li>
<li> A new TraceSource has been added to TCP sockets: SlowStartThreshold.
</li>
<li> New method CommmandLine::AddValue (name, attibutePath) to provide a
shorthand argument "name" for the Attribute "path". This also has
the effect of including the help string for the Attribute in the
Usage message.
</li>
<li> The GSoC 2014 project in the LTE module has brought some additional APIs:
<ul>
<li>a new abstract class LteFfrAlgorithm, which every future
implementation of frequency reuse algorithm should inherit from</li>
<li>a new SAPs: one between MAC Scheduler and FrAlgorithm, one between
RRC and FrAlgorithm</li>
<li>new attribute to enable Uplink Power Control in LteUePhy</li>
<li>new LteUePowerControl class, an implementation of Uplink Power Control, which is
configurable by attributes. ReferenceSignalPower is sent by eNB in SIB2.
Uplink Power Control in Closed Loop Accumulative Mode is enabled by default</li>
<li>seven different Frequency Reuse Algorithms (each has its own attributes): </li>
<ul>
<li>LteFrNoOpAlgorithm</li>
<li>LteFrHardAlgorithm</li>
<li>LteFrStrictAlgorithm</li>
<li>LteFrSoftAlgorithm</li>
<li>LteFfrSoftAlgorithm</li>
<li>LteFfrEnhancedAlgorithm</li>
<li>LteFfrDistributedAlgorithm</li>
</ul>
<li>attribute in LteFfrAlgorithm to set FrCellTypeId which is used in automatic
Frequency Reuse algorithm configuration</li>
<li>LteHelper has been updated with new methods related to frequency reuse algorithm:
SetFfrAlgorithmType and SetFfrAlgorithmAttribute</li>
</ul>
</li>
<li> A new SimpleNetDeviceHelper can now be used to install SimpleNetDevices.
</li>
<li> New PacketSocketServer and PacketSocketClient apps, meant to be used in tests.
</li>
<li> Tcp Timestamps and Window Scale options have been added and are enabled by default (controllable by attribute).
</li>
<li> A new CoDel queue model has been added to the 'internet' module.
</li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> "Icmpv6L4Protocol::ForgeEchoRequest" is now returning a packet with the proper IPv6 header.
</li>
<li> The TCP socket Attribute "SlowStartThreshold" has been renamed "InitialSlowStartThreshold" to
clarify that the effect is only on the initial value.
</li>
<li> all schedulers were updated to interact with FR entity via FFR-SAP. Only PF, PSS, CQA,
FD-TBFQ, TD-TBFQ schedulers supports Frequency Reuse functionality. In the beginning
of scheduling process, schedulers ask FR entity for avaiable RBGs and then ask if UE
can be scheduled on RB</li>
<li> eNB RRC interacts with FFR entity via RRC-FFR SAP</li>
<li> new DL-CQI generation approach was implemented. Now DL-CQI is computed from control channel as signal
and data channel (if received) as interference. New attribute in LteHelper was added to specify
DL-CQI generation approach. New approach is default one in LteHelper </li>
<li> RadioEnvironmentMap can be generated for Data or Control channel and for specified RbId;
Data or Control channel and RbId can be configured by new attributes in RadioEnvironmentMapHelper </li>
<li> lte-sinr-chunk-processor refactored to lte-chunk-processor. Removed all lte-xxx-chunk-processor
implementations</li>
<li> BindToNetDevice affects also sockets using IPv6.</li>
<li> BindToNetDevice now calls implicitly Bind (). To bind a socket to a NetDevice and to a specific address,
the correct sequence is Bind (address) - BindToNetDevice (device). The opposite will raise an error.</li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li> None for this release. </li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li> Behavior will be changed due to the list of bugs fixed (listed in RELEASE_NOTES); users are requested to review that list as well.
</ul>
<hr>
<h1>Changes from ns-3.19 to ns-3.20</h1>
<h2>New API:</h2>
<ul>
<li> Models have been added for low-rate, wireless personal area networks
(LR-WPAN) as specified by IEEE standard 802.15.4 (2006). The current
emphasis is on the unslotted mode of 802.15.4 operation for use in Zigbee,
and the scope is limited to enabling a single mode (CSMA/CA) with basic
data transfer capabilities. Association with PAN coordinators is not yet
supported, nor the use of extended addressing. Interference is modeled as
AWGN but this is currently not thoroughly tested. The NetDevice Tx queue
is not limited, i.e., packets are never dropped due to queue becoming full.
They may be dropped due to excessive transmission retries or channel access
failure. </li>
<li> A new IPv6 routing protocol has been added: RIPng. This protocol is
an Interior Gateway Protocol and it is available in the Internet module. </li>
<li> A new LTE MAC downlink scheduling algorithm named Channel and QoS
Aware (CQA) Scheduler is provided by the new "ns3::CqaFfMacScheduler" object.
</li>
<li> Units may be attached to Time objects, to facilitate specific output
formats (see Time::As()) </li>
<li> FlowMonitor "SerializeToXml" functions are now directly available
from the helper. </li>
<li> Access to OLSR's HNA table has been enabled </li>
</ul>
<h2>Changes to existing API:</h2>
<ul>
<li> The SixLowPan model can now use uncompressed IPv6 headers. An option to
define the minimum compressed packet size has been added. </li>
<li> MinDistance wsa replaced by MinLoss in FriisPropagationLossModel, to
better handle conditions outside of the assumed far field region. </li>
<li> In the DSR model, the attribute DsrOptionRerrHeader::ErrorType" has
been removed. </li>
</ul>
<h2>Changes to build system:</h2>
<ul>
<li> Python 3.3 is now supported for Python bindings for ns-3. Python 3.3
support for API scanning is not supported. Python 3.2 is not supported.</li>
<li> Enable selection of high precision int64x64_t implementation
at configure time, for debugging purposes.</li>
<li> Optimized builds are now enabling signed overflow optimization
(-fstrict-overflow) and for gcc 4.8.2 and greater, also warning for cases
where an optimizization may occur due to compiler assumption that
overflow will not occur. </li>
</ul>
<h2>Changed behavior:</h2>
<ul>
<li> The Internet FlowMonitor can now track IPv6 packets. </li>
<li> Ipv6Extension::m_dropTrace has been removed. Ipv6L3Protocol::m_dropTrace
is now fired when appropriate. </li>
<li> IPv4 identification field value is now dependent on the protocol
field. </li>
<li> Point-to-point trace sources now contain PPP headers </li>
</ul>
<hr>
<h1>Changes from ns-3.18.1 to ns-3.19</h1>
@@ -146,6 +287,10 @@ us a note on ns-developers mailing list.</p>
value class that represents simulation time; the largest unit prior to
this addition was Second.
</li>
<li> SimpleNetDevice and SimpleChannel are not so simple anymore. SimpleNetDevice can be now a
Broadcast or PointToPoint NetDevice, it can have a limited bandwidth and it uses an output
queue.
</li>
</ul>
<h2>Changes to build system:</h2>
+6
View File
@@ -1,3 +1,9 @@
Note:
This is a custom and unsupported fork of NS-3 simulator (http://www.nsnam.org/).
**The code in this repository is frequently rebased on top of the latest ns-3-dev branch**
The Network Simulator, Version 3
--------------------------------
+151 -19
View File
@@ -9,8 +9,8 @@ http://www.nsnam.org including tutorials: http://www.nsnam.org/tutorials.html
Consult the file CHANGES.html for more detailed information about changed
API and behavior across ns-3 releases.
Release 3-dev
=============
Release 3.21
============
Availability
------------
@@ -18,40 +18,144 @@ This release is not yet available.
Supported platforms
-------------------
- Fedora Core 20 (32/64 bit) with g++-4.8.2
- Ubuntu 14.04 (32/64 bit) with g++-4.8.2
- Ubuntu 12.04.4 (64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- CentOS/RHEL 6.5 (64-bit) with g++-4.4.7
- OS X Mavericks 10.9 with Xcode 5.1.1 and clang-503.0.40
- FreeBSD 9.2-RELEASE (64 bit) with clang-3.3
New user-visible features
-------------------------
- Simplify output of Times in a specific unit; see Time::As ()
- Enable selection of high precision int64x64_t implementation
at configure time, for debugging purposes.
- A new LTE MAC downlink scheduling algorithm named Channel and QoS
Aware (CQA) Scheduler is provided by the new
``ns3::CqaFfMacScheduler`` object.
- SixLowPan model can now use uncompressed IPv6 headers. An option to
define the minimum compressed packet size has been added.
- FlowMonitor "SerializeToXml" functions are now directly available
from the Helper.
- Ipv6Extension::m_dropTrace has been removed. Ipv6L3Protocol::m_dropTrace
is now fired when appropriate.
- FlowMonitor does not track anymore multicast/broadcast packets, reflecting
its original design.
- The LTE module now supports the transport of the S1-U, X2-U and X2-C
interfaces over emulated links via the new helper class EmuEpcHelper.
- CommandLine can now provide a shorthand argument name for any
Attribute.
- Implemented support for Frequency Reuse algorithms in LTE module, as the
outcome of GSoC 2014 project.
The project also includes several sub-features, such as:
- implementation of Downlink Power Control
- implementation of Uplink Power Control
- new DL-CQI generation approach, which increases throughput if FR algorithms
are used
- seven options of Frequency Reuse algorithms: LteFrNoOpAlgorithm,
LteFrHardAlgorithm, LteFrStrictAlgorithm, LteFrSoftAlgorithm,
LteFfrSoftAlgorithm, LteFfrEnhancedAlgorithm, LteFfrDistributedAlgorithm
- updated RadioEnvironmentMapHelper. Now RadioEnvironmentMap can be generated
for Data or Control channel and for specified RbId, what is helpful when
using FR algorithms
- Added a CoDel queue model. CoDel queues measure and control the queue
traversal delay. The ns-3 implementation is a port of the Linux
implementation.
- Added support for TCP timestamp and window scale options, and added
ability to trace the TCP slow start threshold value.
- SimpleNetDevice and SimpleChannel (used for adding basic link effects
for testing of higher-layer protocols) have been extended to support
the option of broadcast or PointToPoint link semantics. The bandwidth
and link delay can be constrained, and it uses an output queue.
- SimpleNetDevice and SimpleChannel can be installed in a node through
a new helper: SimpleNetDeviceHelper.
- Implemented new PacketSocketServer and PacketSocketClient applications.
The primary use is in tests, to avoid using the ones from the
application module that also bring in a dependency on the internet module.
Bugs fixed
----------
- Bug 1673 - Config::Set/Connect does not search for attributes in parent class
- Bug 1762 - UE stuck in IDLE_CONNECTING because RRC CONN REQ is not transmitted
- Bug 1811 - basic traffic generator for network module
- Bug 1824 - L4 protocol sockets should support BindToNetDevice over IPv6
- Bug 1831 - TcpSocket SlowStartThreshold is not a TraceSource
- Bug 1851 - WifiRadioEnergyModel energy consumption values are taken from a 802.15.4 chip
- Bug 1854 - std::out_of_range Problem
- Bug 1858 - wireless examples not correctly recording packet reception
- Bug 1860 - TCP needs the Window Scale option
- Bug 1893 - issue in DoSchedUlTriggerReq with harq
- Bug 1911 - AODV cannot work on nodes with more than one netdevice
- Bug 1921 - Icmpv6L4Protocol::ForgeEchoRequest returns a malformed packet
- Bug 1930 - Use of invalid reference in OLSR RemoveLinkTuple
- Bug 1932 - NdiscCache entry is not failsafe on double neighbor probing.
- Bug 1937 - FlowMonitor fails to track multiplexed packets
- Bug 1942 - refactoring of lte-sinr-chunk-processor -> lte-chunk-processor
- Bug 1943 - Waveform generator signal duration calc error
- Bug 1951 - AODV does not update nexthop for 1-hop nodes
- Bug 1955 - The IPv4 identification field should be unique per (source, destination, protocol) tuple
- Bug 1960 - Wrong information on index range, about Node::GetDevice
- Bug 1961 - planetlab-tap-creator "variable set but not used"
- Bug 1963 - AODV can tag the same packet twice (and raise an assert)
- Bug 1964 - Integer overflow on UniformRandomVariable::GetInteger()
- Bug 1967 - LL Multicast is not compressed in the right way in IPHC
- Bug 1981 - PyViz shell not compatible with ipython >= 0.11
Known issues
------------
- Bug 1770 - The mesh module will crash if used for g++ version >= 4.8.1
in optimized mode, on a 32-bit Linux machine. Lowering the optimization
level to -O1 in this case can be used as a workaround.
Release 3.20
=============
Availability
------------
This release is available from:
http://www.nsnam.org/release/ns-allinone-3.20.tar.bz2
Supported platforms
-------------------
- Fedora Core 20 (32/64 bit) with g++-4.8.2
- Ubuntu 14.04 (32/64 bit) with g++-4.8.2
- Ubuntu 12.04.4 (64 bit) with g++-4.6.3
- Ubuntu 10.04.4 LTS (64 bit) with g++-4.4.3
- CentOS/RHEL 6.5 (64-bit) with g++-4.4.7
- OS X Mavericks 10.9 with Xcode 5.1.1 and clang-503.0.40
- FreeBSD 9.2-RELEASE (64 bit) with clang-3.3
New user-visible features
-------------------------
- A new LrWpan model, providing initial support for IEEE 802.15.4 networks
- A new IPv6 routing protocol has been added: RIPng. This protocol is
an Interior Gateway Protocol and it is available in the Internet module.
- FlowMonitor can now track IPv6 packets.
- A new LTE MAC downlink scheduling algorithm named Channel and QoS Aware (CQA)
Scheduler is provided by the new ``ns3::CqaFfMacScheduler`` object.
- The Internet FlowMonitor can now track IPv6 packets.
- FlowMonitor no longer tracks multicast/broadcast packets, reflecting
its original design.
- FlowMonitor "SerializeToXml" functions are now directly available
from the helper.
- The SixLowPan model can now use uncompressed IPv6 headers. An option to
define the minimum compressed packet size has been added.
- Simplify output of Times in a specific unit; see Time::As ()
- Ipv6Extension::m_dropTrace has been removed. Ipv6L3Protocol::m_dropTrace
is now fired when appropriate.
- IPv4 identification field value is now dependent on the protocol field.
- Fixes to support Python >= 3.3 in ns3 Python bindings
- Enable selection of high precision int64x64_t implementation
at configure time, for debugging purposes.
Bugs fixed
----------
- Bug 1276 - optimize NistErrorRateModel
- Bug 1294 - New PeekU8 () and Read (Buffer::Iterator start, uint32_t size) methods in Buffer::Iterator
- Bug 1443 - MinDistance replaced by MinLoss in FriisPropagationLossModel, to
better handle conditions outside of the assumed far field region.
- Bug 1653 - Extension of CommandLine interface: restored operator << (CommandLine)
- Bug 1717 - Detect unsettable attributes
- Bug 1730 - no model library documentation for spectrum module
- Bug 1739 - The endpoint is not deallocated for UDP sockets
- Bug 1786 - os << int64x64_t prints un-normalized fractional values
- Bug 1787 - Runtime error when using AnimationInterface::EnablePacketMetadata() to fetch metadata of CSMA packet
- Bug 1792 - Parameter logger constructor
- Bug 1808 - FlowMon relies on IPv4's Identification field to trace packets
- Bug 1817 - IPv4 Identification field should consider protocol as well.
- Bug 1818 - FlowMonitor needs IPv6 support
- Bug 1820 - models library doc: make should not rm -rf figures
- Bug 1821 - Setting an interface to Down state will cause various asserts in IPv6
- Bug 1829 - Multiple TCP socket entries
- Bug 1837 - AODV crashes when using multiple interfaces
- Bug 1838 - FlowMonitorHelper must not be copied.
- Bug 1841 - FlowMonitor fails to install if IPv4 is not installed in the node
@@ -59,19 +163,47 @@ Bugs fixed
- Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
- Bug 1845 - FlowMonitor should discard any broadcast/multicast packet
- Bug 1846 - IPv6 should send Destination Unreachable if no route is available
- Bug 1850 - TCP NewReno loss behavior
- Bug 1852 - cairo-wideint-private.h error cannot find definitions for fixed-width integral types
- Bug 1853 - NS_LOG_FUNCTION broken on OSX 10.9
- Bug 1855 - SixLowPanNetDevice is not correctly indexed
- Bug 1857 - Detect location of installed boost libraries
- Bug 1862 - NS_LOG="Time=*|prefix_time" causes stack overflow
- Bug 1868 - Optimized builds are sensitive to -fstrict-overflow
- Bug 1870 - Remove unnecessary AsInt functions
- Bug 1872 - Inside RREQ processing, in case of IP duplication, packet dropped instead of being forwarded
- Bug 1873 - Energy source checked to be aggregated to the node
- Bug 1874 - Ipv4L3Protocol::ProcessFragment: addressCombination and idProto identifiers not properly computed
- Bug 1876 - enable OLSR HNA table access
- Bug 1877 - constructors missing for PropagationLossModels
- Bug 1882 - int64x64 tests trigger valgrind bug
- Bug 1883 - IPv6 don't consider the prefix and network when choosing output address
- Bug 1885 - WifiSpectrumValue5MhzFactory::CreateRfFilter does not align with the used 5Mhz SpectrumModel
- Bug 1887 - Point-to-point traces should contain PPP headers
- Bug 1888 - COST231 propagation loss model: corrections
- Bug 1889 - PointToPointNetDevive: In some cases MacTxDrop trace is not called
- Bug 1889 - PointToPointNetDevice: In some cases MacTxDrop trace is not called
- Bug 1890 - UdpClientTrace: MPEG frame size is squeezed into (insufficient) 16 bit integer
- Bug 1891 - UdpSocketImpl::GetSockName doesn't return the IPv6 address
- Bug 1894 - CqaFfMacScheduler needs an update
- Bug 1895 - IP header Source Address changed while forwarding RREQ
- Bug 1900 - Avoid floating point differences across platforms in test outputs
- Bug 1903 - Namespace usage in olsr-state.cc/h
- Bug 1907 - Add IsSupportedMcs method in YansWifiPhy
- Bug 1912 - Avoid multiple Wifi MacTxMiddle instances
- Bug 1913 - Avoid crash in Wifi BlockAckManager::GetNextPacket()
- Bug 1915 - BRITE channel delay is rounded to an integer
- Bug 1916 - RandomWalk2dMobilityMode default "Bounds" attribute is not a rectangle
- Bug 1919 - Strip trailing semi-colons from mobility trace files
- Bug 1920 - Remove DSR attributes so file can be re-loaded by config-store
- Bug 1922 - WAVE GetSsid should not be fatal
- Bug 1923 - Setting Active Probing to false in Wifi Sta has no effect
- Bug 1924 - sensing radius and CCA
Known issues
------------
- Bug 1770 - The mesh module will crash if used for g++ version >= 4.8.1
in optimized mode, on a 32-bit Linux machine. Lowering the optimization
level to -O1 in this case can be used as a workaround.
Release 3.19
=============
+5 -4
View File
@@ -13,7 +13,7 @@ from waflib.Errors import WafError
# after = TaskGen.after
## https://launchpad.net/pybindgen/
REQUIRED_PYBINDGEN_VERSION = (0, 17, 0, 868)
REQUIRED_PYBINDGEN_VERSION = (0, 17, 0, 887)
REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
RUN_ME=-3
@@ -255,6 +255,8 @@ int main ()
"import pygccxml; print pygccxml.__version__"],
stdout=subprocess.PIPE).communicate()[0]
pygccxml_version_str = out.strip()
if pygccxml_version_str[0] == 'v':
pygccxml_version_str = pygccxml_version_str[1:]
pygccxml_version = tuple([int(x) for x in pygccxml_version_str.split('.')])
conf.msg('Checking for pygccxml version', pygccxml_version_str)
if not (pygccxml_version >= REQUIRED_PYGCCXML_VERSION):
@@ -265,7 +267,7 @@ int main ()
conf.report_optional_feature("pygccxml", "Python API Scanning Support", False,
"pygccxml too old")
return
## Check gccxml version
try:
@@ -409,7 +411,7 @@ class gen_ns3_compat_pymod_task(Task.Task):
"""Generates a 'ns3.py' compatibility module."""
before = 'cxx'
color = 'BLUE'
def run(self):
assert len(self.outputs) == 1
outfile = file(self.outputs[0].abspath(), "w")
@@ -486,4 +488,3 @@ def build(bld):
# note: the actual build commands for the python bindings are in
# src/wscript, not here.
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -176,7 +176,7 @@ problems. This design is based on elements of the `Component Object Model
binary-level compatibility of replaceable components is not supported and we
have tried to simplify the syntax and impact on model developers.
Exmaples
Examples
********
Aggregation example
+48 -3
View File
@@ -58,6 +58,7 @@ SOURCES = \
$(SRC)/internet/doc/ipv6.rst \
$(SRC)/internet/doc/routing-overview.rst \
$(SRC)/internet/doc/tcp.rst \
$(SRC)/internet/doc/codel.rst \
$(SRC)/mobility/doc/mobility.rst \
$(SRC)/olsr/doc/olsr.rst \
$(SRC)/openflow/doc/openflow-switch.rst \
@@ -75,11 +76,11 @@ SOURCES = \
$(SRC)/stats/doc/data-collection.rst \
$(SRC)/stats/doc/probe.rst \
$(SRC)/stats/doc/scope-and-limitations.rst \
$(SRC)/stats/doc/statistics.rst \
$(SRC)/netanim/doc/animation.rst \
$(SRC)/flow-monitor/doc/flow-monitor.rst \
$(SRC)/wave/doc/wave.rst \
$(SRC)/sixlowpan/doc/sixlowpan.rst \
$(SRC)/lr-wpan/doc/lr-wpan.rst \
# list all model library figure files that need to be copied to
# $SOURCETEMP/figures. For each figure to be included in all
@@ -175,6 +176,32 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/fading_vehicular.png \
$(SRC)/lte/doc/source/figures/fading_urban_3kmph.pdf \
$(SRC)/lte/doc/source/figures/fading_urban_3kmph.png \
$(SRC)/lte/doc/source/figures/fr-enhanced-fractional-frequency-reuse-scheme.png \
$(SRC)/lte/doc/source/figures/fr-enhanced-fractional-frequency-reuse-scheme.pdf \
$(SRC)/lte/doc/source/figures/fr-full-frequency-reuse-scheme.png \
$(SRC)/lte/doc/source/figures/fr-full-frequency-reuse-scheme.pdf \
$(SRC)/lte/doc/source/figures/fr-hard-frequency-reuse-scheme.png \
$(SRC)/lte/doc/source/figures/fr-hard-frequency-reuse-scheme.pdf \
$(SRC)/lte/doc/source/figures/fr-soft-fractional-frequency-reuse-scheme.png \
$(SRC)/lte/doc/source/figures/fr-soft-fractional-frequency-reuse-scheme.pdf \
$(SRC)/lte/doc/source/figures/fr-soft-frequency-reuse-scheme-v1.png \
$(SRC)/lte/doc/source/figures/fr-soft-frequency-reuse-scheme-v1.pdf \
$(SRC)/lte/doc/source/figures/fr-soft-frequency-reuse-scheme-v2.png \
$(SRC)/lte/doc/source/figures/fr-soft-frequency-reuse-scheme-v2.pdf \
$(SRC)/lte/doc/source/figures/fr-strict-frequency-reuse-scheme.png \
$(SRC)/lte/doc/source/figures/fr-strict-frequency-reuse-scheme.pdf \
$(SRC)/lte/doc/source/figures/ffr-distributed-scheme.png \
$(SRC)/lte/doc/source/figures/ffr-distributed-scheme.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-soft-1-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-soft-1-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-ffr-soft-2-spectrum-trace.png \
$(SRC)/lte/doc/source/figures/lte-ffr-soft-2-spectrum-trace.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-hard-1-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-hard-1-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-hard-2-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-hard-2-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-fr-hard-3-rem.png \
$(SRC)/lte/doc/source/figures/lte-fr-hard-3-rem.pdf \
$(SRC)/lte/doc/source/figures/MCS_1_4.pdf \
$(SRC)/lte/doc/source/figures/MCS_1_4.png \
$(SRC)/lte/doc/source/figures/MCS_5_8.pdf \
@@ -199,6 +226,10 @@ SOURCEFIGS = \
$(SRC)/lte/doc/source/figures/MCS_16_test.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.pdf \
$(SRC)/lte/doc/source/figures/miesm_scheme.png \
$(SRC)/lte/doc/source/figures/lte-dl-power-control.png \
$(SRC)/lte/doc/source/figures/lte-dl-power-control.pdf \
$(SRC)/lte/doc/source/figures/lte-ffr-scheduling.png \
$(SRC)/lte/doc/source/figures/lte-ffr-scheduling.pdf \
$(SRC)/lte/doc/source/figures/lte-handover-campaign-rem.pdf \
$(SRC)/lte/doc/source/figures/lte-handover-campaign-rem.png \
$(SRC)/lte/doc/source/figures/lte-legacy-handover-algorithm.pdf \
@@ -229,7 +260,13 @@ SOURCEFIGS = \
$(SRC)/netanim/doc/figures/PacketTimeline.pdf \
$(SRC)/spectrum/doc/spectrum-channel-phy-interface.png \
$(SRC)/spectrum/doc/spectrum-channel-phy-interface.pdf \
$(SRC)/spectrum/doc/spectrum-analyzer-example.eps
$(SRC)/spectrum/doc/spectrum-analyzer-example.eps \
$(SRC)/lr-wpan/doc/lr-wpan-arch.dia \
$(SRC)/lr-wpan/doc/lr-wpan-data-example.dia \
$(SRC)/lr-wpan/doc/lr-wpan-primitives.dia \
$(SRC)/lr-wpan/doc/802-15-4-ber.eps \
$(SRC)/lr-wpan/doc/802-15-4-per-sens.eps \
$(SRC)/lr-wpan/doc/802-15-4-psr-distance.eps
# specify figures from which .png and .pdf figures need to be
# generated (all dia and eps figures)
@@ -298,7 +335,13 @@ IMAGES_EPS = \
$(FIGURES)/lte-epc-x2-entity-saps.eps \
$(FIGURES)/lte-strongest-cell-handover-algorithm.eps \
$(FIGURES)/auvmobility-classes.eps \
$(FIGURES)/spectrum-analyzer-example.eps
$(FIGURES)/spectrum-analyzer-example.eps \
$(FIGURES)/lr-wpan-primitives.eps \
$(FIGURES)/lr-wpan-data-example.eps \
$(FIGURES)/lr-wpan-arch.eps \
$(FIGURES)/802-15-4-ber.eps \
$(FIGURES)/802-15-4-per-sens.eps \
$(FIGURES)/802-15-4-psr-distance.eps
# rescale pdf figures as necessary
$(FIGURES)/testbed.pdf_width = 5in
@@ -336,6 +379,8 @@ $(FIGURES)/mac-random-access-noncontention.pdf_width = 15cm
$(FIGURES)/helpers.pdf_width = 8cm
$(FIGURES)/auvmobility-classes.pdf_width = 10cm
$(FIGURES)/spectrum-analyzer-example.pdf_width = 15cm
$(FIGURES)/lr-wpan-primitives.pdf_width = 3in
$(FIGURES)/lr-wpan-arch.pdf_width = 2in
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf}
+1
View File
@@ -33,6 +33,7 @@ This document is written in `reStructuredText <http://docutils.sourceforge.net/r
energy
flow-monitor
internet-models
lr-wpan
lte
mesh
distributed
+1
View File
@@ -8,3 +8,4 @@ Internet Models
ipv6
routing-overview
tcp
codel
@@ -743,6 +743,69 @@ took care of the hard part for you. The remaining lines of our first
return 0;
}
When the simulator will stop?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|ns3| is a Discrete Event (DE) simulator. In such a simulator, each event is
associated with its execution time, and the simulation proceeds by executing
events in the temporal order of simulation time. Events may cause future
events to be scheduled (for example, a timer may reschedule itself to
expire at the next interval).
The initial events are usually triggered by each object, e.g., IPv6 will
schedule Router Advertisements, Neighbor Solicitations, etc.,
an Application schedule the first packet sending event, etc.
When an event is processed, it may generate zero, one or more events.
As a simulation executes, events are consumed, but more events may (or may
not) be generated.
The simulation will stop automatically when no further events are in the
event queue, or when a special Stop event is found. The Stop event is
created through the
``Simulator::Stop (stopTime);`` function.
There is a typical case where ``Simulator::Stop`` is absolutely necessary
to stop the simulation: when there is a self-sustaining event.
Self-sustaining (or recurring) events are events that always reschedule
themselves. As a consequence, they always keep the event queue non-empty.
There are many protocols and modules containing recurring events, e.g.:
* FlowMonitor - periodic check for lost packets
* RIPng - periodic broadcast of routing tables update
* etc.
In these cases, ``Simulator::Stop`` is necessary to gracefully stop the
simulation. In addition, when |ns3| is in emulation mode, the
``RealtimeSimulator`` is used to keep the simulation clock aligned with
the machine clock, and ``Simulator::Stop`` is necessary to stop the
process.
Many of the simulation programs in the tutorial do not explicitly call
``Simulator::Stop``, since the event queue will automatically run out
of events. However, these programs will also accept a call to
``Simulator::Stop``. For example, the following additional statement
in the first example program will schedule an explicit stop at 11 seconds:
::
+ Simulator::Stop (Seconds (11.0));
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
The above wil not actually change the behavior of this program, since
this particular simulation naturally ends after 10 seconds. But if you
were to change the stop time in the above statement from 11 seconds to 1
second, you would notice that the simulation stops before any output is
printed to the screen (since the output occurs around time 2 seconds of
simulation time).
It is important to call ``Simulator::Stop`` *before* calling
``Simulator::Run``; otherwise, ``Simulator::Run`` may never return control
to the main program to execute the stop!
Building Your Script
++++++++++++++++++++
We have made it trivial to build your simple scripts. All you have to do is
@@ -0,0 +1,337 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014 Wireless Communications and Networking Group (WCNG),
* University of Rochester, Rochester, NY, USA.
*
* 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
*
* Author: Cristiano Tapparello <cristiano.tapparello@rochester.edu>
*/
/**
*
* This example extends the energy model example by connecting a basic energy
* harvester to the nodes.
*
* The example considers a simple communication link between a source and a
* destination node, where the source node sends a packet to the destination
* every 1 second. Each node is powered by a BasiEnergySource, which is recharged
* by a BasicEnergyHarvester, and the WiFi radio consumes energy for the transmission/
* reception of the packets.
*
* For the receiver node, the example prints the energy consumption of the WiFi radio,
* the power harvested by the energy harvester and the residual energy in the
* energy source.
*
* The nodes initial energy is set to 1.0 J, the transmission and reception entail a
* current consumption of 0.0174 A and 0.0197 A, respectively (default values in
* WifiRadioEnergyModel). The energy harvester provides an amount of power that varies
* according to a random variable uniformly distributed in [0 0.1] W, and is updated
* every 1 s. The energy source voltage is 3 V (default value in BasicEnergySource) and
* the residual energy level is updated every 1 second (default value).
*
* The simulation start at time 0 and it is hard stopped at time 10 seconds. Given the
* packet size and the distance between the nodes, each transmission lasts 0.0023s.
* As a result, the destination node receives 10 messages.
*
*/
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/energy-module.h"
#include "ns3/internet-module.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("EnergyWithHarvestingExample");
using namespace ns3;
static inline std::string
PrintReceivedPacket (Address& from)
{
InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (from);
std::ostringstream oss;
oss << "--\nReceived one packet! Socket: " << iaddr.GetIpv4 ()
<< " port: " << iaddr.GetPort ()
<< " at time = " << Simulator::Now ().GetSeconds ()
<< "\n--";
return oss.str ();
}
/**
* \param socket Pointer to socket.
*
* Packet receiving sink.
*/
void
ReceivePacket (Ptr<Socket> socket)
{
Ptr<Packet> packet;
Address from;
while ((packet = socket->RecvFrom (from)))
{
if (packet->GetSize () > 0)
{
NS_LOG_UNCOND (PrintReceivedPacket (from));
}
}
}
/**
* \param socket Pointer to socket.
* \param pktSize Packet size.
* \param n Pointer to node.
* \param pktCount Number of packets to generate.
* \param pktInterval Packet sending interval.
*
* Traffic generator.
*/
static void
GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize, Ptr<Node> n,
uint32_t pktCount, Time pktInterval)
{
if (pktCount > 0)
{
socket->Send (Create<Packet> (pktSize));
Simulator::Schedule (pktInterval, &GenerateTraffic, socket, pktSize, n,
pktCount - 1, pktInterval);
}
else
{
socket->Close ();
}
}
/// Trace function for remaining energy at node.
void
RemainingEnergy (double oldValue, double remainingEnergy)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Current remaining energy = " << remainingEnergy << "J" << std::endl;
}
/// Trace function for total energy consumption at node.
void
TotalEnergy (double oldValue, double totalEnergy)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Total energy consumed by radio = " << totalEnergy << "J" << std::endl;
}
/// Trace function for the power harvested by the energy harvester.
void
HarvestedPower (double oldValue, double harvestedPower)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Current harvested power = " << harvestedPower << " W" << std::endl;
}
/// Trace function for the total energy harvested by the node.
void
TotalEnergyHarvested (double oldValue, double TotalEnergyHarvested)
{
std::cout << Simulator::Now ().GetSeconds ()
<< "s Total energy harvested by harvester = "
<< TotalEnergyHarvested << " J" << std::endl;
}
int
main (int argc, char *argv[])
{
/*
LogComponentEnable ("EnergySource", LOG_LEVEL_DEBUG);
LogComponentEnable ("BasicEnergySource", LOG_LEVEL_DEBUG);
LogComponentEnable ("DeviceEnergyModel", LOG_LEVEL_DEBUG);
LogComponentEnable ("WifiRadioEnergyModel", LOG_LEVEL_DEBUG);
LogComponentEnable ("EnergyHarvester", LOG_LEVEL_DEBUG);
LogComponentEnable ("BasicEnergyHarvester", LOG_LEVEL_DEBUG);
*/
std::string phyMode ("DsssRate1Mbps");
double Prss = -80; // dBm
uint32_t PpacketSize = 200; // bytes
bool verbose = false;
// simulation parameters
uint32_t numPackets = 10000; // number of packets to send
double interval = 1; // seconds
double startTime = 0.0; // seconds
double distanceToRx = 100.0; // meters
/*
* This is a magic number used to set the transmit power, based on other
* configuration.
*/
double offset = 81;
// Energy Harvester variables
double harvestingUpdateInterval = 1; // seconds
CommandLine cmd;
cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
cmd.AddValue ("Prss", "Intended primary RSS (dBm)", Prss);
cmd.AddValue ("PpacketSize", "size of application packet sent", PpacketSize);
cmd.AddValue ("numPackets", "Total number of packets to send", numPackets);
cmd.AddValue ("startTime", "Simulation start time", startTime);
cmd.AddValue ("distanceToRx", "X-Axis distance between nodes", distanceToRx);
cmd.AddValue ("verbose", "Turn on all device log components", verbose);
cmd.Parse (argc, argv);
// 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
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));
NodeContainer c;
c.Create (2); // create 2 nodes
NodeContainer networkNodes;
networkNodes.Add (c.Get (0));
networkNodes.Add (c.Get (1));
// The below set of helpers will help us to put together the wifi NICs we want
WifiHelper wifi;
if (verbose)
{
wifi.EnableLogComponents ();
}
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
/** Wifi PHY **/
/***************************************************************************/
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
wifiPhy.Set ("RxGain", DoubleValue (-10));
wifiPhy.Set ("TxGain", DoubleValue (offset + Prss));
wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0));
/***************************************************************************/
/** wifi channel **/
YansWifiChannelHelper wifiChannel;
wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");
// create wifi channel
Ptr<YansWifiChannel> wifiChannelPtr = wifiChannel.Create ();
wifiPhy.SetChannel (wifiChannelPtr);
/** MAC layer **/
// 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");
/** install PHY + MAC **/
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, networkNodes);
/** mobility **/
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (2 * distanceToRx, 0.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);
/** Energy Model **/
/***************************************************************************/
/* energy source */
BasicEnergySourceHelper basicSourceHelper;
// configure energy source
basicSourceHelper.Set ("BasicEnergySourceInitialEnergyJ", DoubleValue (1.0));
// install source
EnergySourceContainer sources = basicSourceHelper.Install (c);
/* device energy model */
WifiRadioEnergyModelHelper radioEnergyHelper;
// configure radio energy model
radioEnergyHelper.Set ("TxCurrentA", DoubleValue (0.0174));
radioEnergyHelper.Set ("RxCurrentA", DoubleValue (0.0197));
// install device model
DeviceEnergyModelContainer deviceModels = radioEnergyHelper.Install (devices, sources);
/* energy harvester */
BasicEnergyHarvesterHelper basicHarvesterHelper;
// configure energy harvester
basicHarvesterHelper.Set ("PeriodicHarvestedPowerUpdateInterval", TimeValue (Seconds (harvestingUpdateInterval)));
basicHarvesterHelper.Set ("HarvestablePower", StringValue ("ns3::UniformRandomVariable[Min=0.0|Max=0.1]"));
// install harvester on all energy sources
EnergyHarvesterContainer harvesters = basicHarvesterHelper.Install (sources);
/***************************************************************************/
/** Internet stack **/
InternetStackHelper internet;
internet.Install (networkNodes);
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<Socket> recvSink = Socket::CreateSocket (networkNodes.Get (1), tid); // node 1, Destination
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 80);
recvSink->Bind (local);
recvSink->SetRecvCallback (MakeCallback (&ReceivePacket));
Ptr<Socket> source = Socket::CreateSocket (networkNodes.Get (0), tid); // node 0, Source
InetSocketAddress remote = InetSocketAddress (Ipv4Address::GetBroadcast (), 80);
source->SetAllowBroadcast (true);
source->Connect (remote);
/** connect trace sources **/
/***************************************************************************/
// all traces are connected to node 1 (Destination)
// energy source
Ptr<BasicEnergySource> basicSourcePtr = DynamicCast<BasicEnergySource> (sources.Get (1));
basicSourcePtr->TraceConnectWithoutContext ("RemainingEnergy", MakeCallback (&RemainingEnergy));
// device energy model
Ptr<DeviceEnergyModel> basicRadioModelPtr =
basicSourcePtr->FindDeviceEnergyModels ("ns3::WifiRadioEnergyModel").Get (0);
NS_ASSERT (basicRadioModelPtr != 0);
basicRadioModelPtr->TraceConnectWithoutContext ("TotalEnergyConsumption", MakeCallback (&TotalEnergy));
// energy harvester
Ptr<BasicEnergyHarvester> basicHarvesterPtr = DynamicCast<BasicEnergyHarvester> (harvesters.Get (1));
basicHarvesterPtr->TraceConnectWithoutContext ("HarvestedPower", MakeCallback (&HarvestedPower));
basicHarvesterPtr->TraceConnectWithoutContext ("TotalEnergyHarvested", MakeCallback (&TotalEnergyHarvested));
/***************************************************************************/
/** simulation setup **/
// start traffic
Simulator::Schedule (Seconds (startTime), &GenerateTraffic, source, PpacketSize,
networkNodes.Get (0), numPackets, interPacketInterval);
Simulator::Stop (Seconds (10.0));
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
+2
View File
@@ -3,3 +3,5 @@
def build(bld):
obj = bld.create_ns3_program('energy-model-example', ['core', 'mobility', 'wifi', 'energy', 'internet'])
obj.source = 'energy-model-example.cc'
obj = bld.create_ns3_program('energy-model-with-harvesting-example', ['core', 'mobility', 'wifi', 'energy', 'internet'])
obj.source = 'energy-model-with-harvesting-example.cc'
+9 -6
View File
@@ -1,13 +1,13 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('icmpv6-redirect', ['csma', 'internet'])
obj = bld.create_ns3_program('icmpv6-redirect', ['csma', 'internet', 'applications'])
obj.source = 'icmpv6-redirect.cc'
obj = bld.create_ns3_program('ping6', ['csma', 'internet'])
obj = bld.create_ns3_program('ping6', ['csma', 'internet', 'applications'])
obj.source = 'ping6.cc'
obj = bld.create_ns3_program('radvd', ['csma', 'internet'])
obj = bld.create_ns3_program('radvd', ['csma', 'internet', 'applications'])
obj.source = 'radvd.cc'
obj = bld.create_ns3_program('radvd-two-prefix', ['csma', 'internet', 'applications'])
@@ -16,12 +16,15 @@ def build(bld):
obj = bld.create_ns3_program('test-ipv6', ['point-to-point', 'internet'])
obj.source = 'test-ipv6.cc'
obj = bld.create_ns3_program('fragmentation-ipv6', ['csma', 'internet'])
obj = bld.create_ns3_program('fragmentation-ipv6', ['csma', 'internet', 'applications'])
obj.source = 'fragmentation-ipv6.cc'
obj = bld.create_ns3_program('fragmentation-ipv6-two-MTU', ['csma', 'internet'])
obj = bld.create_ns3_program('fragmentation-ipv6-two-MTU', ['csma', 'internet', 'applications'])
obj.source = 'fragmentation-ipv6-two-MTU.cc'
obj = bld.create_ns3_program('loose-routing-ipv6', ['csma', 'internet'])
obj = bld.create_ns3_program('loose-routing-ipv6', ['csma', 'internet', 'applications'])
obj.source = 'loose-routing-ipv6.cc'
obj = bld.create_ns3_program('wsn-ping6', ['lr-wpan', 'internet', 'sixlowpan', 'mobility', 'applications'])
obj.source = 'wsn-ping6.cc'
+141
View File
@@ -0,0 +1,141 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2014 Universita' di Firenze
*
* 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
*
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
*/
// Network topology
//
// n0 n1
// | |
// =================
// WSN (802.15.4)
//
// - ICMPv6 echo request flows from n0 to n1 and back with ICMPv6 echo reply
// - DropTail queues
// - Tracing of queues and packet receptions to file "wsn-ping6.tr"
//
// This example is based on the "ping6.cc" example.
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/sixlowpan-module.h"
#include "ns3/lr-wpan-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("Ping6WsnExample");
int main (int argc, char **argv)
{
bool verbose = false;
CommandLine cmd;
cmd.AddValue ("verbose", "turn on log components", verbose);
cmd.Parse (argc, argv);
if (verbose)
{
LogComponentEnable ("Ping6WsnExample", LOG_LEVEL_INFO);
LogComponentEnable ("Ipv6EndPointDemux", LOG_LEVEL_ALL);
LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL);
LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL);
LogComponentEnable ("Ipv6ListRouting", LOG_LEVEL_ALL);
LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL);
LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL);
LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL);
LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL);
LogComponentEnable ("SixLowPanNetDevice", LOG_LEVEL_ALL);
}
NS_LOG_INFO ("Create nodes.");
NodeContainer nodes;
nodes.Create (2);
// Set seed for random numbers
SeedManager::SetSeed (167);
// Install mobility
MobilityHelper mobility;
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
Ptr<ListPositionAllocator> nodesPositionAlloc = CreateObject<ListPositionAllocator> ();
nodesPositionAlloc->Add (Vector (0.0, 0.0, 0.0));
nodesPositionAlloc->Add (Vector (50.0, 0.0, 0.0));
mobility.SetPositionAllocator (nodesPositionAlloc);
mobility.Install (nodes);
NS_LOG_INFO ("Create channels.");
LrWpanHelper lrWpanHelper;
// Add and install the LrWpanNetDevice for each node
// lrWpanHelper.EnableLogComponents();
NetDeviceContainer devContainer = lrWpanHelper.Install(nodes);
lrWpanHelper.AssociateToPan (devContainer, 10);
std::cout << "Created " << devContainer.GetN() << " devices" << std::endl;
std::cout << "There are " << nodes.GetN() << " nodes" << std::endl;
/* Install IPv4/IPv6 stack */
NS_LOG_INFO ("Install Internet stack.");
InternetStackHelper internetv6;
internetv6.SetIpv4StackInstall (false);
internetv6.Install (nodes);
// Install 6LowPan layer
NS_LOG_INFO ("Install 6LoWPAN.");
SixLowPanHelper sixlowpan;
NetDeviceContainer six1 = sixlowpan.Install (devContainer);
NS_LOG_INFO ("Assign addresses.");
Ipv6AddressHelper ipv6;
ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
Ipv6InterfaceContainer i = ipv6.Assign (six1);
NS_LOG_INFO ("Create Applications.");
/* Create a Ping6 application to send ICMPv6 echo request from node zero to
* all-nodes (ff02::1).
*/
uint32_t packetSize = 10;
uint32_t maxPacketCount = 5;
Time interPacketInterval = Seconds (1.);
Ping6Helper ping6;
ping6.SetLocal (i.GetAddress (0, 1));
ping6.SetRemote (i.GetAddress (1, 1));
// ping6.SetRemote (Ipv6Address::GetAllNodesMulticast ());
ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
ping6.SetAttribute ("Interval", TimeValue (interPacketInterval));
ping6.SetAttribute ("PacketSize", UintegerValue (packetSize));
ApplicationContainer apps = ping6.Install (nodes.Get (0));
apps.Start (Seconds (2.0));
apps.Stop (Seconds (10.0));
AsciiTraceHelper ascii;
lrWpanHelper.EnableAsciiAll (ascii.CreateFileStream ("ping6wsn.tr"));
lrWpanHelper.EnablePcapAll (std::string ("ping6wsn"), true);
NS_LOG_INFO ("Run Simulation.");
Simulator::Run ();
Simulator::Destroy ();
NS_LOG_INFO ("Done.");
}
+1 -1
View File
@@ -1,5 +1,5 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('object-names', ['core', 'csma', 'internet'])
obj = bld.create_ns3_program('object-names', ['core', 'csma', 'internet', 'applications'])
obj.source = 'object-names.cc'
+1 -1
View File
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('realtime-udp-echo', ['csma', 'internet'])
obj = bld.create_ns3_program('realtime-udp-echo', ['csma', 'internet', 'applications'])
obj.source = 'realtime-udp-echo.cc'
bld.register_ns3_script('realtime-udp-echo.py', ['csma', 'internet', 'applications'])
+1 -1
View File
@@ -343,7 +343,7 @@ RoutingExperiment::Run (int nSinks, double txp, std::string CSVfileName)
onoff1.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1.0]"));
onoff1.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]"));
for (int i = 0; i <= nSinks - 1; i++)
for (int i = 0; i < nSinks; i++)
{
Ptr<Socket> sink = SetupPacketReceive (adhocInterfaces.GetAddress (i), adhocNodes.Get (i));
+7 -7
View File
@@ -2,19 +2,19 @@
def build(bld):
obj = bld.create_ns3_program('dynamic-global-routing',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'dynamic-global-routing.cc'
obj = bld.create_ns3_program('static-routing-slash32',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'static-routing-slash32.cc'
obj = bld.create_ns3_program('global-routing-slash32',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'global-routing-slash32.cc'
obj = bld.create_ns3_program('global-injection-slash32',
['point-to-point', 'csma', 'internet'])
['point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'global-injection-slash32.cc'
obj = bld.create_ns3_program('simple-global-routing',
@@ -25,12 +25,12 @@ def build(bld):
['point-to-point', 'internet', 'applications'])
obj.source = 'simple-alternate-routing.cc'
obj = bld.create_ns3_program( 'mixed-global-routing',
['point-to-point', 'internet', 'csma'])
obj = bld.create_ns3_program('mixed-global-routing',
['point-to-point', 'internet', 'csma', 'applications'])
obj.source = 'mixed-global-routing.cc'
obj = bld.create_ns3_program('simple-routing-ping6',
['csma', 'internet'])
['csma', 'internet', 'applications'])
obj.source = 'simple-routing-ping6.cc'
obj = bld.create_ns3_program('manet-routing-compare',
+1 -1
View File
@@ -4,7 +4,7 @@ def build(bld):
obj = bld.create_ns3_program('socket-bound-static-routing', ['network', 'csma', 'point-to-point', 'internet'])
obj.source = 'socket-bound-static-routing.cc'
obj = bld.create_ns3_program('socket-bound-tcp-static-routing', ['network', 'csma', 'point-to-point', 'internet'])
obj = bld.create_ns3_program('socket-bound-tcp-static-routing', ['network', 'csma', 'point-to-point', 'internet', 'applications'])
obj.source = 'socket-bound-tcp-static-routing.cc'
obj = bld.create_ns3_program('socket-options-ipv4', ['network', 'csma', 'point-to-point', 'internet'])
+122 -143
View File
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2013 ResiliNets, ITTC, University of Kansas
* Copyright (c) 2013 ResiliNets, ITTC, University of Kansas
*
* 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
@@ -54,92 +54,63 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TcpVariantsComparison");
double old_time = 0.0;
EventId output;
Time current = Time::FromInteger(3, Time::S); //Only record cwnd and ssthresh values every 3 seconds
bool first = true;
bool firstCwnd = true;
bool firstSshThr = true;
Ptr<OutputStreamWrapper> cWndStream;
Ptr<OutputStreamWrapper> ssThreshStream;
uint32_t cWndValue;
uint32_t ssThreshValue;
static void
OutputTrace ()
CwndTracer (uint32_t oldval, uint32_t newval)
{
// *stream->GetStream() << newtime << " " << newval << std::endl;
// old_time = newval;
}
static void
CwndTracer (Ptr<OutputStreamWrapper>stream, uint32_t oldval, uint32_t newval)
{
double new_time = Simulator::Now().GetSeconds();
if (old_time == 0 && first)
{
double mycurrent = current.GetSeconds();
*stream->GetStream() << new_time << " " << mycurrent << " " << newval << std::endl;
first = false;
output = Simulator::Schedule(current,&OutputTrace);
}
else
{
if (output.IsExpired())
if (firstCwnd)
{
*stream->GetStream() << new_time << " " << newval << std::endl;
output.Cancel();
output = Simulator::Schedule(current,&OutputTrace);
*cWndStream->GetStream () << "0.0 " << oldval << std::endl;
firstCwnd = false;
}
*cWndStream->GetStream () << Simulator::Now ().GetSeconds () << " " << newval << std::endl;
cWndValue = newval;
if (!firstSshThr)
{
*ssThreshStream->GetStream () << Simulator::Now ().GetSeconds () << " " << ssThreshValue << std::endl;
}
}
}
static void
SsThreshTracer (Ptr<OutputStreamWrapper>stream, uint32_t oldval, uint32_t newval)
SsThreshTracer (uint32_t oldval, uint32_t newval)
{
double new_time = Simulator::Now().GetSeconds();
if (old_time == 0 && first)
{
double mycurrent = current.GetSeconds();
*stream->GetStream() << new_time << " " << mycurrent << " " << newval << std::endl;
first = false;
output = Simulator::Schedule(current,&OutputTrace);
}
else
{
if (output.IsExpired())
if (firstSshThr)
{
*stream->GetStream() << new_time << " " << newval << std::endl;
output.Cancel();
output = Simulator::Schedule(current,&OutputTrace);
*ssThreshStream->GetStream () << "0.0 " << oldval << std::endl;
firstSshThr = false;
}
*ssThreshStream->GetStream () << Simulator::Now ().GetSeconds () << " " << newval << std::endl;
ssThreshValue = newval;
if (!firstCwnd)
{
*cWndStream->GetStream () << Simulator::Now ().GetSeconds () << " " << cWndValue << std::endl;
}
}
}
static void
TraceCwnd (std::string cwnd_tr_file_name)
{
AsciiTraceHelper ascii;
if (cwnd_tr_file_name.compare("") == 0)
{
NS_LOG_DEBUG ("No trace file for cwnd provided");
return;
}
else
{
Ptr<OutputStreamWrapper> stream = ascii.CreateFileStream(cwnd_tr_file_name.c_str());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow",MakeBoundCallback (&CwndTracer, stream));
}
cWndStream = ascii.CreateFileStream (cwnd_tr_file_name.c_str ());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/CongestionWindow", MakeCallback (&CwndTracer));
}
static void
TraceSsThresh(std::string ssthresh_tr_file_name)
TraceSsThresh (std::string ssthresh_tr_file_name)
{
AsciiTraceHelper ascii;
if (ssthresh_tr_file_name.compare("") == 0)
{
NS_LOG_DEBUG ("No trace file for ssthresh provided");
return;
}
else
{
Ptr<OutputStreamWrapper> stream = ascii.CreateFileStream(ssthresh_tr_file_name.c_str());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/SlowStartThreshold",MakeBoundCallback (&SsThreshTracer, stream));
}
ssThreshStream = ascii.CreateFileStream (ssthresh_tr_file_name.c_str ());
Config::ConnectWithoutContext ("/NodeList/1/$ns3::TcpL4Protocol/SocketList/0/SlowStartThreshold",MakeCallback (&SsThreshTracer));
}
int main (int argc, char *argv[])
@@ -162,25 +133,25 @@ int main (int argc, char *argv[])
CommandLine cmd;
cmd.AddValue("transport_prot", "Transport protocol to use: TcpTahoe, TcpReno, TcpNewReno, TcpWestwood, TcpWestwoodPlus ", transport_prot);
cmd.AddValue("error_p", "Packet error rate", error_p);
cmd.AddValue("bandwidth", "Bottleneck bandwidth", bandwidth);
cmd.AddValue("access_bandwidth", "Access link bandwidth", access_bandwidth);
cmd.AddValue("delay", "Access link delay", access_delay);
cmd.AddValue("tracing", "Flag to enable/disable tracing", tracing);
cmd.AddValue("tr_name", "Name of output trace file", tr_file_name);
cmd.AddValue("cwnd_tr_name", "Name of output trace file", cwnd_tr_file_name);
cmd.AddValue("ssthresh_tr_name", "Name of output trace file", ssthresh_tr_file_name);
cmd.AddValue("data", "Number of Megabytes of data to transmit", data_mbytes);
cmd.AddValue("mtu", "Size of IP packets to send in bytes", mtu_bytes);
cmd.AddValue("num_flows", "Number of flows", num_flows);
cmd.AddValue("duration", "Time to allow flows to run in seconds", duration);
cmd.AddValue("run", "Run index (for setting repeatable seeds)", run);
cmd.AddValue("flow_monitor", "Enable flow monitor", flow_monitor);
cmd.AddValue ("transport_prot", "Transport protocol to use: TcpTahoe, TcpReno, TcpNewReno, TcpWestwood, TcpWestwoodPlus ", transport_prot);
cmd.AddValue ("error_p", "Packet error rate", error_p);
cmd.AddValue ("bandwidth", "Bottleneck bandwidth", bandwidth);
cmd.AddValue ("access_bandwidth", "Access link bandwidth", access_bandwidth);
cmd.AddValue ("delay", "Access link delay", access_delay);
cmd.AddValue ("tracing", "Flag to enable/disable tracing", tracing);
cmd.AddValue ("tr_name", "Name of output trace file", tr_file_name);
cmd.AddValue ("cwnd_tr_name", "Name of output trace file", cwnd_tr_file_name);
cmd.AddValue ("ssthresh_tr_name", "Name of output trace file", ssthresh_tr_file_name);
cmd.AddValue ("data", "Number of Megabytes of data to transmit", data_mbytes);
cmd.AddValue ("mtu", "Size of IP packets to send in bytes", mtu_bytes);
cmd.AddValue ("num_flows", "Number of flows", num_flows);
cmd.AddValue ("duration", "Time to allow flows to run in seconds", duration);
cmd.AddValue ("run", "Run index (for setting repeatable seeds)", run);
cmd.AddValue ("flow_monitor", "Enable flow monitor", flow_monitor);
cmd.Parse (argc, argv);
SeedManager::SetSeed(1);
SeedManager::SetRun(run);
SeedManager::SetSeed (1);
SeedManager::SetRun (run);
// User may find it convenient to enable logging
//LogComponentEnable("TcpVariantsComparison", LOG_LEVEL_ALL);
@@ -188,12 +159,12 @@ int main (int argc, char *argv[])
//LogComponentEnable("DropTailQueue", LOG_LEVEL_ALL);
// Calculate the ADU size
Header* temp_header = new Ipv4Header();
uint32_t ip_header = temp_header->GetSerializedSize();
Header* temp_header = new Ipv4Header ();
uint32_t ip_header = temp_header->GetSerializedSize ();
NS_LOG_LOGIC ("IP Header size is: " << ip_header);
delete temp_header;
temp_header = new TcpHeader();
uint32_t tcp_header = temp_header->GetSerializedSize();
temp_header = new TcpHeader ();
uint32_t tcp_header = temp_header->GetSerializedSize ();
NS_LOG_LOGIC ("TCP Header size is: " << tcp_header);
delete temp_header;
uint32_t tcp_adu_size = mtu_bytes - (ip_header + tcp_header);
@@ -204,22 +175,28 @@ int main (int argc, char *argv[])
float stop_time = start_time + duration;
// Select TCP variant
if (transport_prot.compare("TcpTahoe") == 0)
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpTahoe::GetTypeId()));
else if (transport_prot.compare("TcpReno") == 0)
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpReno::GetTypeId()));
else if (transport_prot.compare("TcpNewReno") == 0)
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpNewReno::GetTypeId()));
else if (transport_prot.compare("TcpWestwood") == 0)
{// the default protocol type in ns3::TcpWestwood is WESTWOOD
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId()));
Config::SetDefault("ns3::TcpWestwood::FilterType", EnumValue(TcpWestwood::TUSTIN));
}
else if (transport_prot.compare("TcpWestwoodPlus") == 0)
if (transport_prot.compare ("TcpTahoe") == 0)
{
Config::SetDefault("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId()));
Config::SetDefault("ns3::TcpWestwood::ProtocolType", EnumValue(TcpWestwood::WESTWOODPLUS));
Config::SetDefault("ns3::TcpWestwood::FilterType", EnumValue(TcpWestwood::TUSTIN));
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpTahoe::GetTypeId ()));
}
else if (transport_prot.compare ("TcpReno") == 0)
{
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpReno::GetTypeId ()));
}
else if (transport_prot.compare ("TcpNewReno") == 0)
{
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpNewReno::GetTypeId ()));
}
else if (transport_prot.compare ("TcpWestwood") == 0)
{ // the default protocol type in ns3::TcpWestwood is WESTWOOD
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId ()));
Config::SetDefault ("ns3::TcpWestwood::FilterType", EnumValue (TcpWestwood::TUSTIN));
}
else if (transport_prot.compare ("TcpWestwoodPlus") == 0)
{
Config::SetDefault ("ns3::TcpL4Protocol::SocketType", TypeIdValue (TcpWestwood::GetTypeId ()));
Config::SetDefault ("ns3::TcpWestwood::ProtocolType", EnumValue (TcpWestwood::WESTWOODPLUS));
Config::SetDefault ("ns3::TcpWestwood::FilterType", EnumValue (TcpWestwood::TUSTIN));
}
else
{
@@ -231,18 +208,18 @@ int main (int argc, char *argv[])
NodeContainer gateways;
gateways.Create (1);
NodeContainer sources;
sources.Create(num_flows);
sources.Create (num_flows);
NodeContainer sinks;
sinks.Create(num_flows);
sinks.Create (num_flows);
// Configure the error model
// Here we use RateErrorModel with packet error rate
Ptr<UniformRandomVariable> uv = CreateObject<UniformRandomVariable>();
Ptr<UniformRandomVariable> uv = CreateObject<UniformRandomVariable> ();
uv->SetStream (50);
RateErrorModel error_model;
error_model.SetRandomVariable(uv);
error_model.SetUnit(RateErrorModel::ERROR_UNIT_PACKET);
error_model.SetRate(error_p);
error_model.SetRandomVariable (uv);
error_model.SetUnit (RateErrorModel::ERROR_UNIT_PACKET);
error_model.SetRate (error_p);
PointToPointHelper UnReLink;
UnReLink.SetDeviceAttribute ("DataRate", StringValue (bandwidth));
@@ -262,16 +239,16 @@ int main (int argc, char *argv[])
LocalLink.SetDeviceAttribute ("DataRate", StringValue (access_bandwidth));
LocalLink.SetChannelAttribute ("Delay", StringValue (access_delay));
Ipv4InterfaceContainer sink_interfaces;
for (int i=0; i<num_flows; i++)
for (int i = 0; i < num_flows; i++)
{
NetDeviceContainer devices;
devices = LocalLink.Install(sources.Get(i), gateways.Get(0));
address.NewNetwork();
devices = LocalLink.Install (sources.Get (i), gateways.Get (0));
address.NewNetwork ();
Ipv4InterfaceContainer interfaces = address.Assign (devices);
devices = UnReLink.Install(gateways.Get(0), sinks.Get(i));
address.NewNetwork();
devices = UnReLink.Install (gateways.Get (0), sinks.Get (i));
address.NewNetwork ();
interfaces = address.Assign (devices);
sink_interfaces.Add(interfaces.Get(1));
sink_interfaces.Add (interfaces.Get (1));
}
NS_LOG_INFO ("Initialize Global Routing.");
@@ -281,29 +258,29 @@ int main (int argc, char *argv[])
Address sinkLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), port));
PacketSinkHelper sinkHelper ("ns3::TcpSocketFactory", sinkLocalAddress);
for(uint16_t i=0; i<sources.GetN(); i++)
for (uint16_t i = 0; i < sources.GetN (); i++)
{
AddressValue remoteAddress (InetSocketAddress (sink_interfaces.GetAddress(i, 0), port));
AddressValue remoteAddress (InetSocketAddress (sink_interfaces.GetAddress (i, 0), port));
if (transport_prot.compare("TcpTahoe") == 0
|| transport_prot.compare("TcpReno") == 0
|| transport_prot.compare("TcpNewReno") == 0
|| transport_prot.compare("TcpWestwood") == 0
|| transport_prot.compare("TcpWestwoodPlus") == 0)
if (transport_prot.compare ("TcpTahoe") == 0
|| transport_prot.compare ("TcpReno") == 0
|| transport_prot.compare ("TcpNewReno") == 0
|| transport_prot.compare ("TcpWestwood") == 0
|| transport_prot.compare ("TcpWestwoodPlus") == 0)
{
Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (tcp_adu_size));
BulkSendHelper ftp("ns3::TcpSocketFactory", Address());
BulkSendHelper ftp ("ns3::TcpSocketFactory", Address ());
ftp.SetAttribute ("Remote", remoteAddress);
ftp.SetAttribute ("SendSize", UintegerValue (tcp_adu_size));
ftp.SetAttribute ("MaxBytes", UintegerValue (int(data_mbytes*1000000)));
ftp.SetAttribute ("MaxBytes", UintegerValue (int(data_mbytes * 1000000)));
ApplicationContainer sourceApp = ftp.Install (sources.Get(i));
sourceApp.Start (Seconds (start_time*i));
ApplicationContainer sourceApp = ftp.Install (sources.Get (i));
sourceApp.Start (Seconds (start_time * i));
sourceApp.Stop (Seconds (stop_time - 3));
sinkHelper.SetAttribute ("Protocol", TypeIdValue (TcpSocketFactory::GetTypeId ()));
ApplicationContainer sinkApp = sinkHelper.Install (sinks);
sinkApp.Start (Seconds (start_time*i));
sinkApp.Start (Seconds (start_time * i));
sinkApp.Stop (Seconds (stop_time));
}
else
@@ -316,41 +293,43 @@ int main (int argc, char *argv[])
// Set up tracing if enabled
if (tracing)
{
std::ofstream ascii;
Ptr<OutputStreamWrapper> ascii_wrap;
if (tr_file_name.compare("") == 0)
if (tr_file_name.compare ("") != 0)
{
NS_LOG_DEBUG ("No trace file provided");
exit (1);
}
else
{
ascii.open (tr_file_name.c_str());
ascii_wrap = new OutputStreamWrapper(tr_file_name.c_str(), std::ios::out);
std::ofstream ascii;
Ptr<OutputStreamWrapper> ascii_wrap;
ascii.open (tr_file_name.c_str ());
ascii_wrap = new OutputStreamWrapper (tr_file_name.c_str (), std::ios::out);
stack.EnableAsciiIpv4All (ascii_wrap);
}
stack.EnableAsciiIpv4All (ascii_wrap);
if (cwnd_tr_file_name.compare ("") != 0)
{
Simulator::Schedule (Seconds (0.00001), &TraceCwnd, cwnd_tr_file_name);
}
if (ssthresh_tr_file_name.compare ("") != 0)
{
Simulator::Schedule (Seconds (0.00001), &TraceSsThresh, ssthresh_tr_file_name);
}
Simulator::Schedule(Seconds(0.00001), &TraceCwnd, cwnd_tr_file_name);
Simulator::Schedule(Seconds(0.00001), &TraceSsThresh, ssthresh_tr_file_name);
}
UnReLink.EnablePcapAll("TcpVariantsComparison", true);
LocalLink.EnablePcapAll("TcpVariantsComparison", true);
UnReLink.EnablePcapAll ("TcpVariantsComparison", true);
LocalLink.EnablePcapAll ("TcpVariantsComparison", true);
// Flow monitor
FlowMonitorHelper flowHelper;
if (flow_monitor)
{
flowHelper.InstallAll();
flowHelper.InstallAll ();
}
Simulator::Stop (Seconds(stop_time));
Simulator::Stop (Seconds (stop_time));
Simulator::Run ();
if (flow_monitor)
{
flowHelper.SerializeToXmlFile("TcpVariantsComparison.flowmonitor", true, true);
flowHelper.SerializeToXmlFile ("TcpVariantsComparison.flowmonitor", true, true);
}
Simulator::Destroy ();
+1 -1
View File
@@ -12,7 +12,7 @@ def build(bld):
obj = bld.create_ns3_program('second', ['core', 'point-to-point', 'csma', 'internet', 'applications'])
obj.source = 'second.cc'
obj = bld.create_ns3_program('third', ['core', 'point-to-point', 'csma', 'wifi', 'internet'])
obj = bld.create_ns3_program('third', ['core', 'point-to-point', 'csma', 'wifi', 'internet', 'applications'])
obj.source = 'third.cc'
obj = bld.create_ns3_program('fourth', ['core'])
+1 -1
View File
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('udp-client-server', ['csma', 'internet'])
obj = bld.create_ns3_program('udp-client-server', ['csma', 'internet', 'applications'])
obj.source = 'udp-client-server.cc'
obj = bld.create_ns3_program('udp-trace-client-server', ['csma', 'internet', 'applications'])
+1 -1
View File
@@ -1,5 +1,5 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('udp-echo', ['csma', 'internet'])
obj = bld.create_ns3_program('udp-echo', ['csma', 'internet', 'applications'])
obj.source = 'udp-echo.cc'
+58 -59
View File
@@ -69,6 +69,7 @@
#include "ns3/csma-module.h"
#include "ns3/olsr-helper.h"
#include "ns3/internet-module.h"
#include "ns3/netanim-module.h"
using namespace ns3;
@@ -96,18 +97,17 @@ main (int argc, char *argv[])
// simulation parameters.
//
uint32_t backboneNodes = 10;
uint32_t infraNodes = 5;
uint32_t lanNodes = 5;
uint32_t stopTime = 10;
uint32_t infraNodes = 2;
uint32_t lanNodes = 2;
uint32_t stopTime = 20;
bool useCourseChangeCallback = false;
bool enableTracing = false;
//
// Simulation defaults are typically set next, before command line
// arguments are parsed.
//
Config::SetDefault ("ns3::OnOffApplication::PacketSize", StringValue ("210"));
Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("10kb/s"));
Config::SetDefault ("ns3::OnOffApplication::PacketSize", StringValue ("1472"));
Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("100kb/s"));
//
// For convenience, we add the local variables to the command line argument
@@ -120,7 +120,6 @@ main (int argc, char *argv[])
cmd.AddValue ("lanNodes", "number of LAN nodes", lanNodes);
cmd.AddValue ("stopTime", "simulation stop time (seconds)", stopTime);
cmd.AddValue ("useCourseChangeCallback", "whether to enable course change tracing", useCourseChangeCallback);
cmd.AddValue ("enableTracing", "enable tracing", enableTracing);
//
// The system global variables and the local values added to the argument
@@ -128,6 +127,11 @@ main (int argc, char *argv[])
//
cmd.Parse (argc, argv);
if (stopTime < 10)
{
std::cout << "Use a simulation stop time >= 10 seconds" << std::endl;
exit (1);
}
///////////////////////////////////////////////////////////////////////////
// //
// Construct the backbone //
@@ -165,9 +169,6 @@ main (int argc, char *argv[])
internet.SetRoutingHelper (olsr); // has effect on the next Install ()
internet.Install (backbone);
// re-initialize for non-olsr routing.
internet.Reset ();
//
// Assign IPv4 addresses to the device drivers (actually to the associated
// IPv4 interfaces) we just created.
@@ -181,17 +182,15 @@ main (int argc, char *argv[])
// each of the nodes we just finished building.
//
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc =
CreateObject<ListPositionAllocator> ();
double x = 0.0;
for (uint32_t i = 0; i < backboneNodes; ++i)
{
positionAlloc->Add (Vector (x, 0.0, 0.0));
x += 5.0;
}
mobility.SetPositionAllocator (positionAlloc);
mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
"MinX", DoubleValue (20.0),
"MinY", DoubleValue (20.0),
"DeltaX", DoubleValue (20.0),
"DeltaY", DoubleValue (20.0),
"GridWidth", UintegerValue (5),
"LayoutType", StringValue ("RowFirst"));
mobility.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
"Bounds", RectangleValue (Rectangle (0, 20, 0, 20)),
"Bounds", RectangleValue (Rectangle (-500, 500, -500, 500)),
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=2]"),
"Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.2]"));
mobility.Install (backbone);
@@ -242,6 +241,21 @@ main (int argc, char *argv[])
// network mask initialized above
//
ipAddrs.NewNetwork ();
//
// The new LAN nodes need a mobility model so we aggregate one
// to each of the nodes we just finished building.
//
MobilityHelper mobilityLan;
Ptr<ListPositionAllocator> subnetAlloc =
CreateObject<ListPositionAllocator> ();
for (uint32_t j = 0; j < newLanNodes.GetN (); ++j)
{
subnetAlloc->Add (Vector (0.0, j*10 + 10, 0.0));
}
mobilityLan.PushReferenceMobilityModel (backbone.Get (i));
mobilityLan.SetPositionAllocator (subnetAlloc);
mobilityLan.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobilityLan.Install (newLanNodes);
}
///////////////////////////////////////////////////////////////////////////
@@ -286,7 +300,9 @@ main (int argc, char *argv[])
NetDeviceContainer staDevices = wifiInfra.Install (wifiPhy, macInfra, stas);
// setup ap.
macInfra.SetType ("ns3::ApWifiMac",
"Ssid", SsidValue (ssid));
"Ssid", SsidValue (ssid),
"BeaconGeneration", BooleanValue (true),
"BeaconInterval", TimeValue(Seconds(2.5)));
NetDeviceContainer apDevices = wifiInfra.Install (wifiPhy, macInfra, backbone.Get (i));
// Collect all of these new devices
NetDeviceContainer infraDevices (apDevices, staDevices);
@@ -320,19 +336,8 @@ main (int argc, char *argv[])
"Bounds", RectangleValue (Rectangle (-10, 10, -10, 10)),
"Speed", StringValue ("ns3::ConstantRandomVariable[Constant=3]"),
"Pause", StringValue ("ns3::ConstantRandomVariable[Constant=0.4]"));
mobility.Install (infra);
mobility.Install (stas);
}
///////////////////////////////////////////////////////////////////////////
// //
// Routing configuration //
// //
///////////////////////////////////////////////////////////////////////////
// The below global routing does not take into account wireless effects.
// However, it is useful for setting default routes for all of the nodes
// such as the LAN nodes.
NS_LOG_INFO ("Enabling global routing on all nodes");
Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
///////////////////////////////////////////////////////////////////////////
// //
@@ -363,17 +368,16 @@ main (int argc, char *argv[])
OnOffHelper onoff ("ns3::UdpSocketFactory",
Address (InetSocketAddress (remoteAddr, port)));
onoff.SetConstantRate (DataRate ("10kb/s"));
ApplicationContainer apps = onoff.Install (appSource);
apps.Start (Seconds (3.0));
apps.Stop (Seconds (20.0));
apps.Start (Seconds (3));
apps.Stop (Seconds (stopTime - 1));
// Create a packet sink to receive these packets
PacketSinkHelper sink ("ns3::UdpSocketFactory",
InetSocketAddress (Ipv4Address::GetAny (), port));
apps = sink.Install (appSink);
apps.Start (Seconds (3.0));
apps.Start (Seconds (3));
///////////////////////////////////////////////////////////////////////////
// //
@@ -382,36 +386,31 @@ main (int argc, char *argv[])
///////////////////////////////////////////////////////////////////////////
NS_LOG_INFO ("Configure Tracing.");
if (enableTracing == true)
{
CsmaHelper csma;
CsmaHelper csma;
//
// Let's set up some ns-2-like ascii traces, using another helper class
//
AsciiTraceHelper ascii;
Ptr<OutputStreamWrapper> stream = ascii.CreateFileStream ("mixed-wireless.tr");
wifiPhy.EnableAsciiAll (stream);
csma.EnableAsciiAll (stream);
internet.EnableAsciiIpv4All (stream);
//
// Let's set up some ns-2-like ascii traces, using another helper class
//
AsciiTraceHelper ascii;
Ptr<OutputStreamWrapper> stream = ascii.CreateFileStream ("mixed-wireless.tr");
wifiPhy.EnableAsciiAll (stream);
csma.EnableAsciiAll (stream);
internet.EnableAsciiIpv4All (stream);
// Let's do a pcap trace on the application source and sink, ifIndex 0
// Csma captures in non-promiscuous mode
#if 0
csma.EnablePcap ("mixed-wireless", appSource->GetId (), 0, false);
#else
csma.EnablePcapAll ("mixed-wireless", false);
#endif
wifiPhy.EnablePcap ("mixed-wireless", appSink->GetId (), 0);
wifiPhy.EnablePcap ("mixed-wireless", 9, 2);
wifiPhy.EnablePcap ("mixed-wireless", 9, 0);
}
// Csma captures in non-promiscuous mode
csma.EnablePcapAll ("mixed-wireless", false);
// pcap captures on the backbone wifi devices
wifiPhy.EnablePcap ("mixed-wireless", backboneDevices, false);
// pcap trace on the application data sink
wifiPhy.EnablePcap ("mixed-wireless", appSink->GetId (), 0);
if (useCourseChangeCallback == true)
{
Config::Connect ("/NodeList/*/$ns3::MobilityModel/CourseChange", MakeCallback (&CourseChangeCallback));
}
AnimationInterface anim ("mixed-wireless.xml");
///////////////////////////////////////////////////////////////////////////
// //
// Run simulation //
+55 -43
View File
@@ -76,16 +76,16 @@ def main(argv):
# simulation parameters.
#
backboneNodes = 10
infraNodes = 5
lanNodes = 5
stopTime = 10
infraNodes = 2
lanNodes = 2
stopTime = 20
#
# Simulation defaults are typically set next, before command line
# arguments are parsed.
#
ns.core.Config.SetDefault("ns3::OnOffApplication::PacketSize", ns.core.StringValue("210"))
ns.core.Config.SetDefault("ns3::OnOffApplication::DataRate", ns.core.StringValue("448kb/s"))
ns.core.Config.SetDefault("ns3::OnOffApplication::PacketSize", ns.core.StringValue("1472"))
ns.core.Config.SetDefault("ns3::OnOffApplication::DataRate", ns.core.StringValue("100kb/s"))
#
# For convenience, we add the local variables to the command line argument
@@ -93,10 +93,10 @@ def main(argv):
# "--backboneNodes=20"
#
cmd = ns.core.CommandLine()
#cmd.AddValue("backboneNodes", "number of backbone nodes", backboneNodes)
#cmd.AddValue("infraNodes", "number of leaf nodes", infraNodes)
#cmd.AddValue("lanNodes", "number of LAN nodes", lanNodes)
#cmd.AddValue("stopTime", "simulation stop time(seconds)", stopTime)
cmd.AddValue("backboneNodes", "number of backbone nodes", str(backboneNodes))
cmd.AddValue("infraNodes", "number of leaf nodes", str(infraNodes))
cmd.AddValue("lanNodes", "number of LAN nodes", str(lanNodes))
cmd.AddValue("stopTime", "simulation stop time(seconds)", str(stopTime))
#
# The system global variables and the local values added to the argument
@@ -104,6 +104,9 @@ def main(argv):
#
cmd.Parse(argv)
if (stopTime < 10):
print "Use a simulation stop time >= 10 seconds"
exit(1)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /
# #
# Construct the backbone #
@@ -138,7 +141,7 @@ def main(argv):
internet.SetRoutingHelper(olsr); # has effect on the next Install ()
internet.Install(backbone);
# re-initialize for non-olsr routing.
internet.Reset()
# internet.Reset()
#
# Assign IPv4 addresses to the device drivers(actually to the associated
# IPv4 interfaces) we just created.
@@ -152,15 +155,16 @@ def main(argv):
# each of the nodes we just finished building.
#
mobility = ns.mobility.MobilityHelper()
positionAlloc = ns.mobility.ListPositionAllocator()
x = 0.0
for i in range(backboneNodes):
positionAlloc.Add(ns.core.Vector(x, 0.0, 0.0))
x += 5.0
mobility.SetPositionAllocator(positionAlloc)
mobility.SetPositionAllocator("ns3::GridPositionAllocator",
"MinX", ns.core.DoubleValue(20.0),
"MinY", ns.core.DoubleValue(20.0),
"DeltaX", ns.core.DoubleValue(20.0),
"DeltaY", ns.core.DoubleValue(20.0),
"GridWidth", ns.core.UintegerValue(5),
"LayoutType", ns.core.StringValue("RowFirst"))
mobility.SetMobilityModel("ns3::RandomDirection2dMobilityModel",
"Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle(0, 1000, 0, 1000)),
"Speed", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=2000]"),
"Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle(-500, 500, -500, 500)),
"Speed", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=2]"),
"Pause", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=0.2]"))
mobility.Install(backbone)
@@ -207,6 +211,19 @@ def main(argv):
# network mask initialized above
#
ipAddrs.NewNetwork()
#
# The new LAN nodes need a mobility model so we aggregate one
# to each of the nodes we just finished building.
#
mobilityLan = ns.mobility.MobilityHelper()
positionAlloc = ns.mobility.ListPositionAllocator()
for j in range(newLanNodes.GetN()):
positionAlloc.Add(ns.core.Vector(0.0, (j*10 + 10), 0.0))
mobilityLan.SetPositionAllocator(positionAlloc)
mobilityLan.PushReferenceMobilityModel(backbone.Get(i))
mobilityLan.SetMobilityModel("ns3::ConstantPositionMobilityModel")
mobilityLan.Install(newLanNodes);
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /
# #
@@ -276,10 +293,10 @@ def main(argv):
mobility.PushReferenceMobilityModel(backbone.Get(i))
mobility.SetPositionAllocator(subnetAlloc)
mobility.SetMobilityModel("ns3::RandomDirection2dMobilityModel",
"Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle(-25, 25, -25, 25)),
"Speed", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=30]"),
"Bounds", ns.mobility.RectangleValue(ns.mobility.Rectangle(-10, 10, -10, 10)),
"Speed", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=3]"),
"Pause", ns.core.StringValue ("ns3::ConstantRandomVariable[Constant=0.4]"))
mobility.Install(infra)
mobility.Install(stas)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /
# #
@@ -292,25 +309,23 @@ def main(argv):
print "Create Applications."
port = 9 # Discard port(RFC 863)
# Let's make sure that the user does not define too few LAN nodes
# to make this example work. We need lanNodes >= 5
assert(lanNodes >= 5)
appSource = ns.network.NodeList.GetNode(11)
appSink = ns.network.NodeList.GetNode(13)
remoteAddr = ns.network.Ipv4Address("172.16.0.5")
appSource = ns.network.NodeList.GetNode(backboneNodes)
lastNodeIndex = backboneNodes + backboneNodes*(lanNodes - 1) + backboneNodes*(infraNodes - 1) - 1
appSink = ns.network.NodeList.GetNode(lastNodeIndex)
# Let's fetch the IP address of the last node, which is on Ipv4Interface 1
remoteAddr = appSink.GetObject(ns.internet.Ipv4.GetTypeId()).GetAddress(1,0).GetLocal()
onoff = ns.applications.OnOffHelper("ns3::UdpSocketFactory",
ns.network.Address(ns.network.InetSocketAddress(remoteAddr, port)))
onoff.SetConstantRate (ns.network.DataRate ("10kb/s"))
apps = onoff.Install(ns.network.NodeContainer(appSource))
apps.Start(ns.core.Seconds(3.0))
apps.Stop(ns.core.Seconds(20.0))
apps.Start(ns.core.Seconds(3))
apps.Stop(ns.core.Seconds(stopTime - 1))
# Create a packet sink to receive these packets
sink = ns.applications.PacketSinkHelper("ns3::UdpSocketFactory",
ns.network.InetSocketAddress(ns.network.Ipv4Address.GetAny(), port))
apps = sink.Install(ns.network.NodeContainer(appSink))
apps.Start(ns.core.Seconds(3.0))
apps.Start(ns.core.Seconds(3))
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /
# #
@@ -319,24 +334,21 @@ def main(argv):
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # /
print "Configure Tracing."
csma = ns.csma.CsmaHelper()
#
# Let's set up some ns-2-like ascii traces, using another helper class
#
#std.ofstream ascii
#ascii = ns.core.AsciiTraceHelper();
#stream = ascii.CreateFileStream("mixed-wireless.tr");
#wifiPhy.EnableAsciiAll(stream);
#csma.EnableAsciiAll(stream);
print "(tracing not done for Python)"
# Look at nodes 11, 13 only
# WifiHelper.EnableAscii(ascii, 11, 0);
# WifiHelper.EnableAscii(ascii, 13, 0);
ascii = ns.network.AsciiTraceHelper();
stream = ascii.CreateFileStream("mixed-wireless.tr");
wifiPhy.EnableAsciiAll(stream);
csma.EnableAsciiAll(stream);
internet.EnableAsciiIpv4All(stream);
# Csma captures in non-promiscuous mode
csma.EnablePcapAll("mixed-wireless", False)
# Let's do a pcap trace on the backbone devices
wifiPhy.EnablePcap("mixed-wireless", backboneDevices)
# Let's additionally trace the application Sink, ifIndex 0
csma = ns.csma.CsmaHelper()
csma.EnablePcapAll("mixed-wireless", False)
wifiPhy.EnablePcap("mixed-wireless", appSink.GetId(), 0)
# #ifdef ENABLE_FOR_TRACING_EXAMPLE
# Config.Connect("/NodeList/*/$MobilityModel/CourseChange",
+4 -1
View File
@@ -90,7 +90,10 @@ using namespace ns3;
void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_UNCOND ("Received one packet!");
while (socket->Recv ())
{
NS_LOG_UNCOND ("Received one packet!");
}
}
static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
+4 -1
View File
@@ -69,7 +69,10 @@ using namespace ns3;
void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_UNCOND ("Received one packet!");
while (socket->Recv ())
{
NS_LOG_UNCOND ("Received one packet!");
}
}
static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
+4 -1
View File
@@ -70,7 +70,10 @@ using namespace ns3;
void ReceivePacket (Ptr<Socket> socket)
{
NS_LOG_UNCOND ("Received one packet!");
while (socket->Recv ())
{
NS_LOG_UNCOND ("Received one packet!");
}
}
static void GenerateTraffic (Ptr<Socket> socket, uint32_t pktSize,
@@ -99,11 +99,16 @@ using namespace ns3;
static inline std::string PrintReceivedPacket (Ptr<Socket> socket)
{
Address addr;
socket->GetSockName (addr);
InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (addr);
std::ostringstream oss;
oss << "Received one packet! Socket: " << iaddr.GetIpv4 () << " port: " << iaddr.GetPort ();
while (socket->Recv ())
{
socket->GetSockName (addr);
InetSocketAddress iaddr = InetSocketAddress::ConvertFrom (addr);
oss << "Received one packet! Socket: " << iaddr.GetIpv4 () << " port: " << iaddr.GetPort ();
}
return oss.str ();
}
+247
View File
@@ -0,0 +1,247 @@
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 The Boeing Company
* 2014 Universita' degli Studi di Napoli "Federico II"
*
* 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
*
*/
//
// This script configures two nodes on an 802.11b physical layer, with
// 802.11b NICs in adhoc mode. One of the nodes generates on-off traffic
// destined to the other node.
//
// The purpose is to test the energy depletion on the nodes and the
// activation of the callback that puts a node in the sleep state when
// its energy is depleted. Furthermore, this script can be used to test
// the available policies for updating the transmit current based on
// the nominal tx power used to transmit each frame.
//
// There are a number of command-line options available to control
// the default behavior. The list of available command-line options
// can be listed with the following command:
// ./waf --run "wifi-sleep --help"
//
// Note that all ns-3 attributes (not just the ones exposed in the below
// script) can be changed at command line; see the documentation.
//
// This script can also be helpful to put the Wifi layer into verbose
// logging mode; this command will turn on all wifi logging:
//
// ./waf --run "wifi-sleep --verbose=1"
//
// When you are done, you will notice four trace files in your directory:
// two for the remaining energy on each node and two for the state transitions
// of each node.
//
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/config-store-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
#include "ns3/applications-module.h"
#include "ns3/energy-module.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <sstream>
NS_LOG_COMPONENT_DEFINE ("WifiSleep");
using namespace ns3;
template <int node>
void RemainingEnergyTrace (double oldValue, double newValue)
{
std::stringstream ss;
ss << "energy_" << node << ".log";
static std::fstream f (ss.str().c_str(), std::ios::out);
f << Simulator::Now().GetSeconds() << " remaining energy=" << newValue << std::endl;
}
template <int node>
void PhyStateTrace (std::string context, Time start, Time duration, enum WifiPhy::State state)
{
std::stringstream ss;
ss << "state_" << node << ".log";
static std::fstream f (ss.str().c_str(), std::ios::out);
f << Simulator::Now().GetSeconds() << " state=" << state << " start=" << start << " duration=" << duration << std::endl;
}
int main (int argc, char *argv[])
{
std::string dataRate = "1Mbps";
uint32_t packetSize = 1000; // bytes
double duration = 10.0; // seconds
double initialEnergy = 7.5; // joule
double voltage = 3.0; // volts
double txPowerStart = 0.0; // dbm
double txPowerEnd = 15.0; // dbm
uint32_t nTxPowerLevels = 16;
uint32_t txPowerLevel = 0;
double idleCurrent = 0.273; // Ampere
double txCurrent = 0.380; // Ampere
bool verbose = false;
CommandLine cmd;
cmd.AddValue ("dataRate", "Data rate", dataRate);
cmd.AddValue ("packetSize", "size of application packet sent", packetSize);
cmd.AddValue ("duration", "duration (seconds) of the experiment", duration);
cmd.AddValue ("initialEnergy", "Initial Energy (Joule) of each node", initialEnergy);
cmd.AddValue ("voltage", "Supply voltage (Joule)", voltage);
cmd.AddValue ("txPowerStart", "Minimum available transmission level (dbm)", txPowerStart);
cmd.AddValue ("txPowerEnd", "Maximum available transmission level (dbm)", txPowerEnd);
cmd.AddValue ("nTxPowerLevels", "Number of transmission power levels available between txPowerStart and txPowerEnd included", nTxPowerLevels);
cmd.AddValue ("txPowerLevel", "Transmission power level", txPowerLevel);
cmd.AddValue ("idleCurrent", "The radio Idle current in Ampere", idleCurrent);
cmd.AddValue ("txCurrent", "The radio Tx current in Ampere", txCurrent);
cmd.AddValue ("verbose", "turn on all WifiNetDevice log components", verbose);
cmd.Parse (argc, argv);
NodeContainer c;
c.Create (2);
// The below set of helpers will help us to put together the wifi NICs we want
WifiHelper wifi;
if (verbose)
{
wifi.EnableLogComponents (); // Turn on all Wifi logging
}
wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
// ns-3 supports RadioTap and Prism tracing extensions for 802.11b
wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
wifiPhy.Set ("TxPowerStart", DoubleValue (txPowerStart));
wifiPhy.Set ("TxPowerEnd", DoubleValue (txPowerEnd));
wifiPhy.Set ("TxPowerLevels", UintegerValue (nTxPowerLevels));
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
wifiPhy.SetChannel (wifiChannel.Create ());
// Add a non-QoS upper mac, and set the selected tx power level
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ArfWifiManager", "DefaultTxPowerLevel", UintegerValue (txPowerLevel));
// Set it to adhoc mode
wifiMac.SetType ("ns3::AdhocWifiMac");
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c);
MobilityHelper mobility;
Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (10.0, 0.0, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);
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);
ApplicationContainer apps;
std::string transportProto = std::string("ns3::UdpSocketFactory");
OnOffHelper onOff(transportProto, InetSocketAddress (Ipv4Address ("10.1.1.2"), 9000));
onOff.SetAttribute ("DataRate", DataRateValue (DataRate (dataRate)));
onOff.SetAttribute ("PacketSize", UintegerValue (packetSize));
onOff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0.001]"));
apps = onOff.Install (c.Get (0));
apps.Start (Seconds (0.01));
apps.Stop (Seconds (duration));
// Create a packet sink to receive these packets
PacketSinkHelper sink (transportProto, InetSocketAddress (Ipv4Address::GetAny (), 9001));
apps = sink.Install (c.Get (1));
apps.Start (Seconds (0.01));
apps.Stop (Seconds (duration));
// Energy sources
EnergySourceContainer eSources;
BasicEnergySourceHelper basicSourceHelper;
WifiRadioEnergyModelHelper radioEnergyHelper;
basicSourceHelper.Set ("BasicEnergySourceInitialEnergyJ", DoubleValue (initialEnergy));
basicSourceHelper.Set ("BasicEnergySupplyVoltageV", DoubleValue (voltage));
radioEnergyHelper.Set ("IdleCurrentA", DoubleValue (idleCurrent));
radioEnergyHelper.Set ("TxCurrentA", DoubleValue (txCurrent));
// compute the efficiency of the power amplifier (eta) assuming that the provided value for tx current
// corresponds to the minimum tx power level
double eta = WifiTxCurrentModel::DbmToW (txPowerStart) / ((txCurrent - idleCurrent) * voltage);
radioEnergyHelper.SetTxCurrentModel ("ns3::LinearWifiTxCurrentModel",
"Voltage", DoubleValue (voltage),
"IdleCurrent", DoubleValue (idleCurrent),
"Eta", DoubleValue (eta));
// install an energy source on each node
for (NodeContainer::Iterator n = c.Begin(); n != c.End(); n++)
{
eSources.Add (basicSourceHelper.Install (*n));
Ptr<WifiNetDevice> wnd;
for (uint32_t i = 0; i < (*n)->GetNDevices (); ++i)
{
wnd = (*n)->GetDevice (i)->GetObject<WifiNetDevice> ();
// if it is a WifiNetDevice
if (wnd != 0)
{
// this device draws power from the last created energy source
radioEnergyHelper.Install (wnd, eSources.Get (eSources.GetN()-1));
}
}
}
// Tracing
eSources.Get (0)->TraceConnectWithoutContext ("RemainingEnergy", MakeCallback(&RemainingEnergyTrace<0>));
eSources.Get (1)->TraceConnectWithoutContext ("RemainingEnergy", MakeCallback(&RemainingEnergyTrace<1>));
Config::Connect ("/NodeList/0/DeviceList/*/Phy/State/State", MakeCallback (&PhyStateTrace<0>));
Config::Connect ("/NodeList/1/DeviceList/*/Phy/State/State", MakeCallback (&PhyStateTrace<1>));
// wifiPhy.EnablePcap ("wifi-sleep", devices);
Simulator::Stop (Seconds(duration+1));
Simulator::Run ();
Simulator::Destroy ();
return 0;
}
+1 -1
View File
@@ -2,7 +2,7 @@
def build(bld):
obj = bld.create_ns3_program('mixed-wireless', ['core', 'mobility', 'wifi', 'applications', 'point-to-point',
'internet', 'csma', 'olsr'])
'internet', 'csma', 'olsr', 'netanim'])
obj.source = 'mixed-wireless.cc'
bld.register_ns3_script('mixed-wireless.py', ['core', 'mobility', 'wifi', 'applications', 'point-to-point',
-1
View File
@@ -1 +0,0 @@
This is a placeholder file used only to keep the ns3 directory present (needed for the WAF build system).
+3 -4
View File
@@ -16,15 +16,14 @@
#include "ns3/core-module.h"
NS_LOG_COMPONENT_DEFINE ("ScratchSimulator");
// NS_LOG_COMPONENT_DEFINE ("ScratchSimulator");
using namespace ns3;
int
main (int argc, char *argv[])
{
NS_LOG_UNCOND ("Scratch Simulator");
// NS_LOG_UNCOND ("Scratch Simulator");
Simulator::Run ();
Simulator::Destroy ();
LogComponentPrintList();
}
+40 -19
View File
@@ -142,6 +142,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer [class]
module.add_class('Timer', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer::DestroyPolicy [enumeration]
@@ -494,6 +496,7 @@ def register_methods(root_module):
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3Timer_methods(root_module, root_module['ns3::Timer'])
register_Ns3TimerImpl_methods(root_module, root_module['ns3::TimerImpl'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
@@ -2452,6 +2455,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3Timer_methods(root_module, cls):
## timer.h (module 'core'): ns3::Timer::Timer(ns3::Timer const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Timer const &', 'arg0')])
@@ -3987,34 +3998,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -4131,20 +4147,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -5867,6 +5883,11 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
'bool',
[param('uint32_t', 'i')],
is_const=True, is_virtual=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUnicast(ns3::Ipv4Address ad) const [member function]
cls.add_method('IsUnicast',
'bool',
[param('ns3::Ipv4Address', 'ad')],
is_const=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function]
cls.add_method('IsUp',
'bool',
@@ -6854,10 +6875,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
+40 -19
View File
@@ -142,6 +142,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer [class]
module.add_class('Timer', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer::DestroyPolicy [enumeration]
@@ -494,6 +496,7 @@ def register_methods(root_module):
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3Timer_methods(root_module, root_module['ns3::Timer'])
register_Ns3TimerImpl_methods(root_module, root_module['ns3::TimerImpl'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
@@ -2452,6 +2455,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3Timer_methods(root_module, cls):
## timer.h (module 'core'): ns3::Timer::Timer(ns3::Timer const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Timer const &', 'arg0')])
@@ -3987,34 +3998,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -4131,20 +4147,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -5867,6 +5883,11 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
'bool',
[param('uint32_t', 'i')],
is_const=True, is_virtual=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUnicast(ns3::Ipv4Address ad) const [member function]
cls.add_method('IsUnicast',
'bool',
[param('ns3::Ipv4Address', 'ad')],
is_const=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function]
cls.add_method('IsUp',
'bool',
@@ -6854,10 +6875,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
+1 -1
View File
@@ -2,5 +2,5 @@
def build(bld):
obj = bld.create_ns3_program('aodv',
['wifi', 'internet', 'aodv'])
['wifi', 'internet', 'aodv', 'applications'])
obj.source = 'aodv.cc'
+102 -7
View File
@@ -283,6 +283,12 @@ RoutingProtocol::DoDispose ()
iter->first->Close ();
}
m_socketAddresses.clear ();
for (std::map<Ptr<Socket>, Ipv4InterfaceAddress>::iterator iter =
m_socketSubnetBroadcastAddresses.begin (); iter != m_socketSubnetBroadcastAddresses.end (); iter++)
{
iter->first->Close ();
}
m_socketSubnetBroadcastAddresses.clear ();
Ipv4RoutingProtocol::DoDispose ();
}
@@ -613,18 +619,34 @@ RoutingProtocol::NotifyInterfaceUp (uint32_t i)
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketAddresses.insert (std::make_pair (socket, iface));
// create also a subnet broadcast socket
socket = Socket::CreateSocket (GetObject<Node> (),
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
socket->Bind (InetSocketAddress (iface.GetBroadcast (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketSubnetBroadcastAddresses.insert (std::make_pair (socket, iface));
// Add local broadcast record to the routing table
Ptr<NetDevice> 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 ());
m_routingTable.AddRoute (rt);
if (l3->GetInterface (i)->GetArpCache ())
{
m_nb.AddArpCache (l3->GetInterface (i)->GetArpCache ());
}
// Allow neighbor manager use this interface for layer 2 feedback if possible
Ptr<WifiNetDevice> wifi = dev->GetObject<WifiNetDevice> ();
if (wifi == 0)
@@ -634,7 +656,6 @@ RoutingProtocol::NotifyInterfaceUp (uint32_t i)
return;
mac->TraceConnectWithoutContext ("TxErrHeader", m_nb.GetTxErrorCallback ());
m_nb.AddArpCache (l3->GetInterface (i)->GetArpCache ());
}
void
@@ -662,6 +683,13 @@ RoutingProtocol::NotifyInterfaceDown (uint32_t i)
NS_ASSERT (socket);
socket->Close ();
m_socketAddresses.erase (socket);
// Close socket
socket = FindSubnetBroadcastSocketWithInterfaceAddress (m_ipv4->GetAddress (i, 0));
NS_ASSERT (socket);
socket->Close ();
m_socketSubnetBroadcastAddresses.erase (socket);
if (m_socketAddresses.empty ())
{
NS_LOG_LOGIC ("No aodv interfaces");
@@ -693,12 +721,22 @@ RoutingProtocol::NotifyAddAddress (uint32_t i, Ipv4InterfaceAddress address)
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv,this));
socket->Bind (InetSocketAddress (iface.GetLocal (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
// Bind to any IP address so that broadcasts can be received
socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), AODV_PORT));
socket->SetAllowBroadcast (true);
m_socketAddresses.insert (std::make_pair (socket, iface));
// create also a subnet directed broadcast socket
socket = Socket::CreateSocket (GetObject<Node> (),
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
socket->Bind (InetSocketAddress (iface.GetBroadcast (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketSubnetBroadcastAddresses.insert (std::make_pair (socket, iface));
// Add local broadcast record to the routing table
Ptr<NetDevice> dev = m_ipv4->GetNetDevice (
m_ipv4->GetInterfaceForAddress (iface.GetLocal ()));
@@ -722,7 +760,16 @@ RoutingProtocol::NotifyRemoveAddress (uint32_t i, Ipv4InterfaceAddress address)
if (socket)
{
m_routingTable.DeleteAllRoutesFromInterface (address);
socket->Close ();
m_socketAddresses.erase (socket);
Ptr<Socket> unicastSocket = FindSubnetBroadcastSocketWithInterfaceAddress (address);
if (unicastSocket)
{
unicastSocket->Close ();
m_socketAddresses.erase (unicastSocket);
}
Ptr<Ipv4L3Protocol> l3 = m_ipv4->GetObject<Ipv4L3Protocol> ();
if (l3->GetNAddresses (i))
{
@@ -733,10 +780,23 @@ RoutingProtocol::NotifyRemoveAddress (uint32_t i, Ipv4InterfaceAddress address)
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
// Bind to any IP address so that broadcasts can be received
socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), AODV_PORT));
socket->Bind (InetSocketAddress (iface.GetLocal (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketAddresses.insert (std::make_pair (socket, iface));
// create also a unicast socket
socket = Socket::CreateSocket (GetObject<Node> (),
UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvAodv, this));
socket->Bind (InetSocketAddress (iface.GetBroadcast (), AODV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl", UintegerValue (1));
m_socketSubnetBroadcastAddresses.insert (std::make_pair (socket, iface));
// Add local broadcast record to the routing table
Ptr<NetDevice> dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (iface.GetLocal ()));
RoutingTableEntry rt (/*device=*/ dev, /*dst=*/ iface.GetBroadcast (), /*know seqno=*/ true, /*seqno=*/ 0, /*iface=*/ iface,
@@ -937,7 +997,20 @@ RoutingProtocol::RecvAodv (Ptr<Socket> socket)
Ptr<Packet> packet = socket->RecvFrom (sourceAddress);
InetSocketAddress inetSourceAddr = InetSocketAddress::ConvertFrom (sourceAddress);
Ipv4Address sender = inetSourceAddr.GetIpv4 ();
Ipv4Address receiver = m_socketAddresses[socket].GetLocal ();
Ipv4Address receiver;
if (m_socketAddresses.find (socket) != m_socketAddresses.end ())
{
receiver = m_socketAddresses[socket].GetLocal ();
}
else if(m_socketSubnetBroadcastAddresses.find (socket) != m_socketSubnetBroadcastAddresses.end ())
{
receiver = m_socketSubnetBroadcastAddresses[socket].GetLocal ();
}
else
{
NS_ASSERT_MSG (false, "Received a packet from an unknown socket");
}
NS_LOG_DEBUG ("AODV node " << this << " received a AODV packet from " << sender << " to " << receiver);
UpdateRouteToNeighbor (sender, receiver);
@@ -1116,6 +1189,8 @@ RoutingProtocol::RecvRequest (Ptr<Packet> p, Ipv4Address receiver, Ipv4Address s
toNeighbor.SetFlag (VALID);
toNeighbor.SetOutputDevice (m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver)));
toNeighbor.SetInterface (m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0));
toNeighbor.SetHop (1);
toNeighbor.SetNextHop (src);
m_routingTable.Update (toNeighbor);
}
m_nb.Update (src, Time (AllowedHelloLoss * HelloInterval));
@@ -1444,6 +1519,8 @@ RoutingProtocol::ProcessHello (RrepHeader const & rrepHeader, Ipv4Address receiv
toNeighbor.SetFlag (VALID);
toNeighbor.SetOutputDevice (m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (receiver)));
toNeighbor.SetInterface (m_ipv4->GetAddress (m_ipv4->GetInterfaceForAddress (receiver), 0));
toNeighbor.SetHop (1);
toNeighbor.SetNextHop (rrepHeader.GetDst ());
m_routingTable.Update (toNeighbor);
}
if (EnableHello)
@@ -1802,7 +1879,9 @@ RoutingProtocol::SendRerrMessage (Ptr<Packet> packet, std::vector<Ipv4Address> p
Ptr<Socket> socket = FindSocketWithInterfaceAddress (*i);
NS_ASSERT (socket);
NS_LOG_LOGIC ("Broadcast RERR message from interface " << i->GetLocal ());
// std::cout << "Broadcast RERR message from interface " << i->GetLocal () << std::endl;
// Send to all-hosts broadcast if on /32 addr, subnet-directed otherwise
Ptr<Packet> p = packet->Copy ();
Ipv4Address destination;
if (i->GetMask () == Ipv4Mask::GetOnes ())
{
@@ -1812,7 +1891,7 @@ RoutingProtocol::SendRerrMessage (Ptr<Packet> packet, std::vector<Ipv4Address> p
{
destination = i->GetBroadcast ();
}
Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, packet, destination);
Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, p, destination);
}
}
@@ -1832,5 +1911,21 @@ RoutingProtocol::FindSocketWithInterfaceAddress (Ipv4InterfaceAddress addr ) con
return socket;
}
Ptr<Socket>
RoutingProtocol::FindSubnetBroadcastSocketWithInterfaceAddress (Ipv4InterfaceAddress addr ) const
{
NS_LOG_FUNCTION (this << addr);
for (std::map<Ptr<Socket>, Ipv4InterfaceAddress>::const_iterator j =
m_socketSubnetBroadcastAddresses.begin (); j != m_socketSubnetBroadcastAddresses.end (); ++j)
{
Ptr<Socket> socket = j->first;
Ipv4InterfaceAddress iface = j->second;
if (iface == addr)
return socket;
}
Ptr<Socket> socket;
return socket;
}
}
}
+6 -2
View File
@@ -140,8 +140,10 @@ private:
/// IP protocol
Ptr<Ipv4> m_ipv4;
/// Raw socket per each IP interface, map socket -> iface address (IP + mask)
/// Raw unicast socket per each IP interface, map socket -> iface address (IP + mask)
std::map< Ptr<Socket>, Ipv4InterfaceAddress > m_socketAddresses;
/// Raw subnet directed broadcast socket per each IP interface, map socket -> iface address (IP + mask)
std::map< Ptr<Socket>, Ipv4InterfaceAddress > m_socketSubnetBroadcastAddresses;
/// Loopback device used to defer RREQ until packet will be fully formed
Ptr<NetDevice> m_lo;
@@ -191,8 +193,10 @@ private:
void UpdateRouteToNeighbor (Ipv4Address sender, Ipv4Address receiver);
/// Check that packet is send from own interface
bool IsMyOwnAddress (Ipv4Address src);
/// Find socket with local interface address iface
/// Find unicast socket with local interface address iface
Ptr<Socket> FindSocketWithInterfaceAddress (Ipv4InterfaceAddress iface) const;
/// Find subnet directed broadcast socket with local interface address iface
Ptr<Socket> FindSubnetBroadcastSocketWithInterfaceAddress (Ipv4InterfaceAddress iface) const;
/// Process hello message
void ProcessHello (RrepHeader const & rrepHeader, Ipv4Address receiverIfaceAddr);
/// Create loopback route for given header
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -145,7 +145,7 @@ Bug772ChainTest::CreateDevices ()
uint16_t port = 9; // Discard port (RFC 863)
OnOffHelper onoff (m_proto, Address (InetSocketAddress (interfaces.GetAddress (m_size-1), port)));
onoff.SetConstantRate (DataRate (64000));
onoff.SetAttribute ("PacketSize", UintegerValue (1200));
onoff.SetAttribute ("PacketSize", UintegerValue (1000));
ApplicationContainer app = onoff.Install (m_nodes->Get (0));
app.Start (Seconds (1.0));
app.Stop (m_time);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
module = bld.create_ns3_module('aodv', ['internet', 'wifi', 'applications', 'mesh', 'point-to-point', 'virtual-net-device'])
module = bld.create_ns3_module('aodv', ['internet', 'wifi', 'applications'])
module.includes = '.'
module.source = [
'model/aodv-id-cache.cc',
+168 -22
View File
@@ -155,13 +155,15 @@ def register_types(module):
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
module.add_class('PcapHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
## ping6-helper.h (module 'applications'): ns3::Ping6Helper [class]
module.add_class('Ping6Helper')
## radvd-helper.h (module 'applications'): ns3::RadvdHelper [class]
module.add_class('RadvdHelper')
## simple-net-device-helper.h (module 'network'): ns3::SimpleNetDeviceHelper [class]
module.add_class('SimpleNetDeviceHelper', import_from_module='ns.network')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
## simulator.h (module 'core'): ns3::Simulator [class]
@@ -174,6 +176,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -440,8 +444,12 @@ def register_types(module):
module.add_class('PacketSizeMinMaxAvgTotalCalculator', import_from_module='ns.network', parent=root_module['ns3::MinMaxAvgTotalCalculator< unsigned int >'])
## packet-socket.h (module 'network'): ns3::PacketSocket [class]
module.add_class('PacketSocket', import_from_module='ns.network', parent=root_module['ns3::Socket'])
## packet-socket-client.h (module 'network'): ns3::PacketSocketClient [class]
module.add_class('PacketSocketClient', import_from_module='ns.network', parent=root_module['ns3::Application'])
## packet-socket-factory.h (module 'network'): ns3::PacketSocketFactory [class]
module.add_class('PacketSocketFactory', import_from_module='ns.network', parent=root_module['ns3::SocketFactory'])
## packet-socket-server.h (module 'network'): ns3::PacketSocketServer [class]
module.add_class('PacketSocketServer', import_from_module='ns.network', parent=root_module['ns3::Application'])
## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable [class]
module.add_class('ParetoRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream'])
## packetbb.h (module 'network'): ns3::PbbAddressBlock [class]
@@ -533,6 +541,9 @@ def register_types(module):
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', u'ns3::GenericPhyRxStartCallback')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', u'ns3::GenericPhyRxStartCallback*')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', u'ns3::GenericPhyRxStartCallback&')
typehandlers.add_type_alias(u'ns3::SequenceNumber< unsigned char, signed char >', u'ns3::SequenceNumber8')
typehandlers.add_type_alias(u'ns3::SequenceNumber< unsigned char, signed char >*', u'ns3::SequenceNumber8*')
typehandlers.add_type_alias(u'ns3::SequenceNumber< unsigned char, signed char >&', u'ns3::SequenceNumber8&')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', u'ns3::GenericPhyRxEndErrorCallback')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', u'ns3::GenericPhyRxEndErrorCallback*')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', u'ns3::GenericPhyRxEndErrorCallback&')
@@ -667,12 +678,14 @@ def register_methods(root_module):
register_Ns3PcapHelperForDevice_methods(root_module, root_module['ns3::PcapHelperForDevice'])
register_Ns3Ping6Helper_methods(root_module, root_module['ns3::Ping6Helper'])
register_Ns3RadvdHelper_methods(root_module, root_module['ns3::RadvdHelper'])
register_Ns3SimpleNetDeviceHelper_methods(root_module, root_module['ns3::SimpleNetDeviceHelper'])
register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3StatisticalSummary_methods(root_module, root_module['ns3::StatisticalSummary'])
register_Ns3SystemWallClockMs_methods(root_module, root_module['ns3::SystemWallClockMs'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -795,7 +808,9 @@ def register_methods(root_module):
register_Ns3PacketSink_methods(root_module, root_module['ns3::PacketSink'])
register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, root_module['ns3::PacketSizeMinMaxAvgTotalCalculator'])
register_Ns3PacketSocket_methods(root_module, root_module['ns3::PacketSocket'])
register_Ns3PacketSocketClient_methods(root_module, root_module['ns3::PacketSocketClient'])
register_Ns3PacketSocketFactory_methods(root_module, root_module['ns3::PacketSocketFactory'])
register_Ns3PacketSocketServer_methods(root_module, root_module['ns3::PacketSocketServer'])
register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable'])
register_Ns3PbbAddressBlock_methods(root_module, root_module['ns3::PbbAddressBlock'])
register_Ns3PbbAddressBlockIpv4_methods(root_module, root_module['ns3::PbbAddressBlockIpv4'])
@@ -3491,6 +3506,53 @@ def register_Ns3RadvdHelper_methods(root_module, cls):
[param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
return
def register_Ns3SimpleNetDeviceHelper_methods(root_module, cls):
## simple-net-device-helper.h (module 'network'): ns3::SimpleNetDeviceHelper::SimpleNetDeviceHelper(ns3::SimpleNetDeviceHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SimpleNetDeviceHelper const &', 'arg0')])
## simple-net-device-helper.h (module 'network'): ns3::SimpleNetDeviceHelper::SimpleNetDeviceHelper() [constructor]
cls.add_constructor([])
## simple-net-device-helper.h (module 'network'): ns3::NetDeviceContainer ns3::SimpleNetDeviceHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
cls.add_method('Install',
'ns3::NetDeviceContainer',
[param('ns3::Ptr< ns3::Node >', 'node')],
is_const=True)
## simple-net-device-helper.h (module 'network'): ns3::NetDeviceContainer ns3::SimpleNetDeviceHelper::Install(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::SimpleChannel> channel) const [member function]
cls.add_method('Install',
'ns3::NetDeviceContainer',
[param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::SimpleChannel >', 'channel')],
is_const=True)
## simple-net-device-helper.h (module 'network'): ns3::NetDeviceContainer ns3::SimpleNetDeviceHelper::Install(ns3::NodeContainer const & c) const [member function]
cls.add_method('Install',
'ns3::NetDeviceContainer',
[param('ns3::NodeContainer const &', 'c')],
is_const=True)
## simple-net-device-helper.h (module 'network'): ns3::NetDeviceContainer ns3::SimpleNetDeviceHelper::Install(ns3::NodeContainer const & c, ns3::Ptr<ns3::SimpleChannel> channel) const [member function]
cls.add_method('Install',
'ns3::NetDeviceContainer',
[param('ns3::NodeContainer const &', 'c'), param('ns3::Ptr< ns3::SimpleChannel >', 'channel')],
is_const=True)
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetChannel(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
cls.add_method('SetChannel',
'void',
[param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetChannelAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
cls.add_method('SetChannelAttribute',
'void',
[param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
cls.add_method('SetDeviceAttribute',
'void',
[param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetNetDevicePointToPointMode(bool pointToPointMode) [member function]
cls.add_method('SetNetDevicePointToPointMode',
'void',
[param('bool', 'pointToPointMode')])
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
cls.add_method('SetQueue',
'void',
[param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
return
def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls):
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::SimpleRefCount() [constructor]
cls.add_constructor([])
@@ -3755,6 +3817,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
@@ -5860,34 +5930,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -6004,20 +6079,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -7053,10 +7128,10 @@ def register_Ns3ErrorModel_methods(root_module, cls):
cls.add_method('Reset',
'void',
[])
## error-model.h (module 'network'): bool ns3::ErrorModel::DoCorrupt(ns3::Ptr<ns3::Packet> arg0) [member function]
## error-model.h (module 'network'): bool ns3::ErrorModel::DoCorrupt(ns3::Ptr<ns3::Packet> p) [member function]
cls.add_method('DoCorrupt',
'bool',
[param('ns3::Ptr< ns3::Packet >', 'arg0')],
[param('ns3::Ptr< ns3::Packet >', 'p')],
is_pure_virtual=True, visibility='private', is_virtual=True)
## error-model.h (module 'network'): void ns3::ErrorModel::DoReset() [member function]
cls.add_method('DoReset',
@@ -8401,10 +8476,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3PacketSink_methods(root_module, cls):
@@ -8590,6 +8665,37 @@ def register_Ns3PacketSocket_methods(root_module, cls):
visibility='private', is_virtual=True)
return
def register_Ns3PacketSocketClient_methods(root_module, cls):
## packet-socket-client.h (module 'network'): ns3::PacketSocketClient::PacketSocketClient(ns3::PacketSocketClient const & arg0) [copy constructor]
cls.add_constructor([param('ns3::PacketSocketClient const &', 'arg0')])
## packet-socket-client.h (module 'network'): ns3::PacketSocketClient::PacketSocketClient() [constructor]
cls.add_constructor([])
## packet-socket-client.h (module 'network'): static ns3::TypeId ns3::PacketSocketClient::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## packet-socket-client.h (module 'network'): void ns3::PacketSocketClient::SetRemote(ns3::PacketSocketAddress addr) [member function]
cls.add_method('SetRemote',
'void',
[param('ns3::PacketSocketAddress', 'addr')])
## packet-socket-client.h (module 'network'): void ns3::PacketSocketClient::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
[],
visibility='protected', is_virtual=True)
## packet-socket-client.h (module 'network'): void ns3::PacketSocketClient::StartApplication() [member function]
cls.add_method('StartApplication',
'void',
[],
visibility='private', is_virtual=True)
## packet-socket-client.h (module 'network'): void ns3::PacketSocketClient::StopApplication() [member function]
cls.add_method('StopApplication',
'void',
[],
visibility='private', is_virtual=True)
return
def register_Ns3PacketSocketFactory_methods(root_module, cls):
## packet-socket-factory.h (module 'network'): ns3::PacketSocketFactory::PacketSocketFactory(ns3::PacketSocketFactory const & arg0) [copy constructor]
cls.add_constructor([param('ns3::PacketSocketFactory const &', 'arg0')])
@@ -8607,6 +8713,37 @@ def register_Ns3PacketSocketFactory_methods(root_module, cls):
is_static=True)
return
def register_Ns3PacketSocketServer_methods(root_module, cls):
## packet-socket-server.h (module 'network'): ns3::PacketSocketServer::PacketSocketServer(ns3::PacketSocketServer const & arg0) [copy constructor]
cls.add_constructor([param('ns3::PacketSocketServer const &', 'arg0')])
## packet-socket-server.h (module 'network'): ns3::PacketSocketServer::PacketSocketServer() [constructor]
cls.add_constructor([])
## packet-socket-server.h (module 'network'): static ns3::TypeId ns3::PacketSocketServer::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## packet-socket-server.h (module 'network'): void ns3::PacketSocketServer::SetLocal(ns3::PacketSocketAddress addr) [member function]
cls.add_method('SetLocal',
'void',
[param('ns3::PacketSocketAddress', 'addr')])
## packet-socket-server.h (module 'network'): void ns3::PacketSocketServer::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
[],
visibility='protected', is_virtual=True)
## packet-socket-server.h (module 'network'): void ns3::PacketSocketServer::StartApplication() [member function]
cls.add_method('StartApplication',
'void',
[],
visibility='private', is_virtual=True)
## packet-socket-server.h (module 'network'): void ns3::PacketSocketServer::StopApplication() [member function]
cls.add_method('StopApplication',
'void',
[],
visibility='private', is_virtual=True)
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ParetoRandomVariable::GetTypeId() [member function]
cls.add_method('GetTypeId',
@@ -10182,6 +10319,11 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls):
'ns3::Ptr< ns3::Node >',
[],
is_const=True, is_virtual=True)
## simple-net-device.h (module 'network'): ns3::Ptr<ns3::Queue> ns3::SimpleNetDevice::GetQueue() const [member function]
cls.add_method('GetQueue',
'ns3::Ptr< ns3::Queue >',
[],
is_const=True)
## simple-net-device.h (module 'network'): static ns3::TypeId ns3::SimpleNetDevice::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
@@ -10260,6 +10402,10 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls):
'void',
[param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')],
is_virtual=True)
## simple-net-device.h (module 'network'): void ns3::SimpleNetDevice::SetQueue(ns3::Ptr<ns3::Queue> queue) [member function]
cls.add_method('SetQueue',
'void',
[param('ns3::Ptr< ns3::Queue >', 'queue')])
## simple-net-device.h (module 'network'): void ns3::SimpleNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
cls.add_method('SetReceiveCallback',
'void',
+168 -22
View File
@@ -155,13 +155,15 @@ def register_types(module):
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
module.add_class('PcapHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
## ping6-helper.h (module 'applications'): ns3::Ping6Helper [class]
module.add_class('Ping6Helper')
## radvd-helper.h (module 'applications'): ns3::RadvdHelper [class]
module.add_class('RadvdHelper')
## simple-net-device-helper.h (module 'network'): ns3::SimpleNetDeviceHelper [class]
module.add_class('SimpleNetDeviceHelper', import_from_module='ns.network')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
## simulator.h (module 'core'): ns3::Simulator [class]
@@ -174,6 +176,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -440,8 +444,12 @@ def register_types(module):
module.add_class('PacketSizeMinMaxAvgTotalCalculator', import_from_module='ns.network', parent=root_module['ns3::MinMaxAvgTotalCalculator< unsigned int >'])
## packet-socket.h (module 'network'): ns3::PacketSocket [class]
module.add_class('PacketSocket', import_from_module='ns.network', parent=root_module['ns3::Socket'])
## packet-socket-client.h (module 'network'): ns3::PacketSocketClient [class]
module.add_class('PacketSocketClient', import_from_module='ns.network', parent=root_module['ns3::Application'])
## packet-socket-factory.h (module 'network'): ns3::PacketSocketFactory [class]
module.add_class('PacketSocketFactory', import_from_module='ns.network', parent=root_module['ns3::SocketFactory'])
## packet-socket-server.h (module 'network'): ns3::PacketSocketServer [class]
module.add_class('PacketSocketServer', import_from_module='ns.network', parent=root_module['ns3::Application'])
## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable [class]
module.add_class('ParetoRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream'])
## packetbb.h (module 'network'): ns3::PbbAddressBlock [class]
@@ -533,6 +541,9 @@ def register_types(module):
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', u'ns3::GenericPhyRxStartCallback')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', u'ns3::GenericPhyRxStartCallback*')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', u'ns3::GenericPhyRxStartCallback&')
typehandlers.add_type_alias(u'ns3::SequenceNumber< unsigned char, signed char >', u'ns3::SequenceNumber8')
typehandlers.add_type_alias(u'ns3::SequenceNumber< unsigned char, signed char >*', u'ns3::SequenceNumber8*')
typehandlers.add_type_alias(u'ns3::SequenceNumber< unsigned char, signed char >&', u'ns3::SequenceNumber8&')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', u'ns3::GenericPhyRxEndErrorCallback')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >*', u'ns3::GenericPhyRxEndErrorCallback*')
typehandlers.add_type_alias(u'ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >&', u'ns3::GenericPhyRxEndErrorCallback&')
@@ -667,12 +678,14 @@ def register_methods(root_module):
register_Ns3PcapHelperForDevice_methods(root_module, root_module['ns3::PcapHelperForDevice'])
register_Ns3Ping6Helper_methods(root_module, root_module['ns3::Ping6Helper'])
register_Ns3RadvdHelper_methods(root_module, root_module['ns3::RadvdHelper'])
register_Ns3SimpleNetDeviceHelper_methods(root_module, root_module['ns3::SimpleNetDeviceHelper'])
register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3StatisticalSummary_methods(root_module, root_module['ns3::StatisticalSummary'])
register_Ns3SystemWallClockMs_methods(root_module, root_module['ns3::SystemWallClockMs'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -795,7 +808,9 @@ def register_methods(root_module):
register_Ns3PacketSink_methods(root_module, root_module['ns3::PacketSink'])
register_Ns3PacketSizeMinMaxAvgTotalCalculator_methods(root_module, root_module['ns3::PacketSizeMinMaxAvgTotalCalculator'])
register_Ns3PacketSocket_methods(root_module, root_module['ns3::PacketSocket'])
register_Ns3PacketSocketClient_methods(root_module, root_module['ns3::PacketSocketClient'])
register_Ns3PacketSocketFactory_methods(root_module, root_module['ns3::PacketSocketFactory'])
register_Ns3PacketSocketServer_methods(root_module, root_module['ns3::PacketSocketServer'])
register_Ns3ParetoRandomVariable_methods(root_module, root_module['ns3::ParetoRandomVariable'])
register_Ns3PbbAddressBlock_methods(root_module, root_module['ns3::PbbAddressBlock'])
register_Ns3PbbAddressBlockIpv4_methods(root_module, root_module['ns3::PbbAddressBlockIpv4'])
@@ -3491,6 +3506,53 @@ def register_Ns3RadvdHelper_methods(root_module, cls):
[param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')])
return
def register_Ns3SimpleNetDeviceHelper_methods(root_module, cls):
## simple-net-device-helper.h (module 'network'): ns3::SimpleNetDeviceHelper::SimpleNetDeviceHelper(ns3::SimpleNetDeviceHelper const & arg0) [copy constructor]
cls.add_constructor([param('ns3::SimpleNetDeviceHelper const &', 'arg0')])
## simple-net-device-helper.h (module 'network'): ns3::SimpleNetDeviceHelper::SimpleNetDeviceHelper() [constructor]
cls.add_constructor([])
## simple-net-device-helper.h (module 'network'): ns3::NetDeviceContainer ns3::SimpleNetDeviceHelper::Install(ns3::Ptr<ns3::Node> node) const [member function]
cls.add_method('Install',
'ns3::NetDeviceContainer',
[param('ns3::Ptr< ns3::Node >', 'node')],
is_const=True)
## simple-net-device-helper.h (module 'network'): ns3::NetDeviceContainer ns3::SimpleNetDeviceHelper::Install(ns3::Ptr<ns3::Node> node, ns3::Ptr<ns3::SimpleChannel> channel) const [member function]
cls.add_method('Install',
'ns3::NetDeviceContainer',
[param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::Ptr< ns3::SimpleChannel >', 'channel')],
is_const=True)
## simple-net-device-helper.h (module 'network'): ns3::NetDeviceContainer ns3::SimpleNetDeviceHelper::Install(ns3::NodeContainer const & c) const [member function]
cls.add_method('Install',
'ns3::NetDeviceContainer',
[param('ns3::NodeContainer const &', 'c')],
is_const=True)
## simple-net-device-helper.h (module 'network'): ns3::NetDeviceContainer ns3::SimpleNetDeviceHelper::Install(ns3::NodeContainer const & c, ns3::Ptr<ns3::SimpleChannel> channel) const [member function]
cls.add_method('Install',
'ns3::NetDeviceContainer',
[param('ns3::NodeContainer const &', 'c'), param('ns3::Ptr< ns3::SimpleChannel >', 'channel')],
is_const=True)
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetChannel(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
cls.add_method('SetChannel',
'void',
[param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetChannelAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
cls.add_method('SetChannelAttribute',
'void',
[param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetDeviceAttribute(std::string n1, ns3::AttributeValue const & v1) [member function]
cls.add_method('SetDeviceAttribute',
'void',
[param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')])
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetNetDevicePointToPointMode(bool pointToPointMode) [member function]
cls.add_method('SetNetDevicePointToPointMode',
'void',
[param('bool', 'pointToPointMode')])
## simple-net-device-helper.h (module 'network'): void ns3::SimpleNetDeviceHelper::SetQueue(std::string type, std::string n1="", ns3::AttributeValue const & v1=ns3::EmptyAttributeValue(), std::string n2="", ns3::AttributeValue const & v2=ns3::EmptyAttributeValue(), std::string n3="", ns3::AttributeValue const & v3=ns3::EmptyAttributeValue(), std::string n4="", ns3::AttributeValue const & v4=ns3::EmptyAttributeValue()) [member function]
cls.add_method('SetQueue',
'void',
[param('std::string', 'type'), param('std::string', 'n1', default_value='""'), param('ns3::AttributeValue const &', 'v1', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n2', default_value='""'), param('ns3::AttributeValue const &', 'v2', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n3', default_value='""'), param('ns3::AttributeValue const &', 'v3', default_value='ns3::EmptyAttributeValue()'), param('std::string', 'n4', default_value='""'), param('ns3::AttributeValue const &', 'v4', default_value='ns3::EmptyAttributeValue()')])
return
def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls):
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter>::SimpleRefCount() [constructor]
cls.add_constructor([])
@@ -3755,6 +3817,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('!=')
cls.add_binary_comparison_operator('<')
@@ -5860,34 +5930,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -6004,20 +6079,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -7053,10 +7128,10 @@ def register_Ns3ErrorModel_methods(root_module, cls):
cls.add_method('Reset',
'void',
[])
## error-model.h (module 'network'): bool ns3::ErrorModel::DoCorrupt(ns3::Ptr<ns3::Packet> arg0) [member function]
## error-model.h (module 'network'): bool ns3::ErrorModel::DoCorrupt(ns3::Ptr<ns3::Packet> p) [member function]
cls.add_method('DoCorrupt',
'bool',
[param('ns3::Ptr< ns3::Packet >', 'arg0')],
[param('ns3::Ptr< ns3::Packet >', 'p')],
is_pure_virtual=True, visibility='private', is_virtual=True)
## error-model.h (module 'network'): void ns3::ErrorModel::DoReset() [member function]
cls.add_method('DoReset',
@@ -8401,10 +8476,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3PacketSink_methods(root_module, cls):
@@ -8590,6 +8665,37 @@ def register_Ns3PacketSocket_methods(root_module, cls):
visibility='private', is_virtual=True)
return
def register_Ns3PacketSocketClient_methods(root_module, cls):
## packet-socket-client.h (module 'network'): ns3::PacketSocketClient::PacketSocketClient(ns3::PacketSocketClient const & arg0) [copy constructor]
cls.add_constructor([param('ns3::PacketSocketClient const &', 'arg0')])
## packet-socket-client.h (module 'network'): ns3::PacketSocketClient::PacketSocketClient() [constructor]
cls.add_constructor([])
## packet-socket-client.h (module 'network'): static ns3::TypeId ns3::PacketSocketClient::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## packet-socket-client.h (module 'network'): void ns3::PacketSocketClient::SetRemote(ns3::PacketSocketAddress addr) [member function]
cls.add_method('SetRemote',
'void',
[param('ns3::PacketSocketAddress', 'addr')])
## packet-socket-client.h (module 'network'): void ns3::PacketSocketClient::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
[],
visibility='protected', is_virtual=True)
## packet-socket-client.h (module 'network'): void ns3::PacketSocketClient::StartApplication() [member function]
cls.add_method('StartApplication',
'void',
[],
visibility='private', is_virtual=True)
## packet-socket-client.h (module 'network'): void ns3::PacketSocketClient::StopApplication() [member function]
cls.add_method('StopApplication',
'void',
[],
visibility='private', is_virtual=True)
return
def register_Ns3PacketSocketFactory_methods(root_module, cls):
## packet-socket-factory.h (module 'network'): ns3::PacketSocketFactory::PacketSocketFactory(ns3::PacketSocketFactory const & arg0) [copy constructor]
cls.add_constructor([param('ns3::PacketSocketFactory const &', 'arg0')])
@@ -8607,6 +8713,37 @@ def register_Ns3PacketSocketFactory_methods(root_module, cls):
is_static=True)
return
def register_Ns3PacketSocketServer_methods(root_module, cls):
## packet-socket-server.h (module 'network'): ns3::PacketSocketServer::PacketSocketServer(ns3::PacketSocketServer const & arg0) [copy constructor]
cls.add_constructor([param('ns3::PacketSocketServer const &', 'arg0')])
## packet-socket-server.h (module 'network'): ns3::PacketSocketServer::PacketSocketServer() [constructor]
cls.add_constructor([])
## packet-socket-server.h (module 'network'): static ns3::TypeId ns3::PacketSocketServer::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
[],
is_static=True)
## packet-socket-server.h (module 'network'): void ns3::PacketSocketServer::SetLocal(ns3::PacketSocketAddress addr) [member function]
cls.add_method('SetLocal',
'void',
[param('ns3::PacketSocketAddress', 'addr')])
## packet-socket-server.h (module 'network'): void ns3::PacketSocketServer::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
[],
visibility='protected', is_virtual=True)
## packet-socket-server.h (module 'network'): void ns3::PacketSocketServer::StartApplication() [member function]
cls.add_method('StartApplication',
'void',
[],
visibility='private', is_virtual=True)
## packet-socket-server.h (module 'network'): void ns3::PacketSocketServer::StopApplication() [member function]
cls.add_method('StopApplication',
'void',
[],
visibility='private', is_virtual=True)
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ParetoRandomVariable::GetTypeId() [member function]
cls.add_method('GetTypeId',
@@ -10182,6 +10319,11 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls):
'ns3::Ptr< ns3::Node >',
[],
is_const=True, is_virtual=True)
## simple-net-device.h (module 'network'): ns3::Ptr<ns3::Queue> ns3::SimpleNetDevice::GetQueue() const [member function]
cls.add_method('GetQueue',
'ns3::Ptr< ns3::Queue >',
[],
is_const=True)
## simple-net-device.h (module 'network'): static ns3::TypeId ns3::SimpleNetDevice::GetTypeId() [member function]
cls.add_method('GetTypeId',
'ns3::TypeId',
@@ -10260,6 +10402,10 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls):
'void',
[param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')],
is_virtual=True)
## simple-net-device.h (module 'network'): void ns3::SimpleNetDevice::SetQueue(ns3::Ptr<ns3::Queue> queue) [member function]
cls.add_method('SetQueue',
'void',
[param('ns3::Ptr< ns3::Queue >', 'queue')])
## simple-net-device.h (module 'network'): void ns3::SimpleNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
cls.add_method('SetReceiveCallback',
'void',
+33 -17
View File
@@ -62,6 +62,8 @@ def register_types(module):
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -223,6 +225,7 @@ def register_methods(root_module):
register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -1179,6 +1182,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -1612,34 +1623,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -1756,20 +1772,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
+33 -17
View File
@@ -62,6 +62,8 @@ def register_types(module):
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -223,6 +225,7 @@ def register_methods(root_module):
register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -1179,6 +1182,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -1612,34 +1623,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -1756,20 +1772,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
+3 -3
View File
@@ -2,11 +2,11 @@
def build(bld):
obj = bld.create_ns3_program('csma-bridge', ['bridge', 'csma', 'internet'])
obj = bld.create_ns3_program('csma-bridge', ['bridge', 'csma', 'internet', 'applications'])
obj.source = 'csma-bridge.cc'
bld.register_ns3_script('csma-bridge.py', ['bridge', 'csma', 'internet'])
bld.register_ns3_script('csma-bridge.py', ['bridge', 'csma', 'internet', 'applications'])
obj = bld.create_ns3_program('csma-bridge-one-hop', ['bridge', 'csma', 'internet'])
obj = bld.create_ns3_program('csma-bridge-one-hop', ['bridge', 'csma', 'internet', 'applications'])
obj.source = 'csma-bridge-one-hop.cc'
+1 -1
View File
@@ -456,7 +456,7 @@ BriteTopologyHelper::ConstructTopology ()
// Set the link delay
// The brite value for delay is given in milliseconds
m_britePointToPointHelper.SetChannelAttribute ("Delay",
TimeValue (MilliSeconds ((*it).delay)));
TimeValue (Seconds ((*it).delay/1000.0)));
// The brite value for data rate is given in Mbps
m_britePointToPointHelper.SetDeviceAttribute ("DataRate",
+28 -22
View File
@@ -14,33 +14,39 @@ def options(opt):
def configure(conf):
conf.env['ENABLE_BRITE'] = False
lib_to_check = 'libbrite.so'
if Options.options.with_brite:
if os.path.isdir(Options.options.with_brite):
conf.msg("Checking BRITE location", ("%s (given)" % Options.options.with_brite))
conf.msg("Checking BRITE location", ("%s (given)" % Options.options.with_brite))
brite_dir = Options.options.with_brite
if os.path.exists(os.path.join(brite_dir, lib_to_check)):
conf.env['WITH_BRITE'] = os.path.abspath(Options.options.with_brite)
else:
brite_dir = os.path.join('..','BRITE')
if os.path.isdir(brite_dir):
conf.msg("Checking for BRITE location", ("%s (guessed)" % brite_dir))
conf.env['WITH_BRITE'] = os.path.abspath(brite_dir)
del brite_dir
if not conf.env['WITH_BRITE']:
conf.msg("Checking for BRITE location", False)
conf.report_optional_feature("brite", "BRITE Integration", False,
"BRITE not found (see option --with-brite)")
# Add this module to the list of modules that won't be built
# if they are enabled.
conf.env['MODULES_NOT_BUILT'].append('brite')
return
conf.report_optional_feature("brite", "BRITE Integration", False,
"BRITE not found at requested location")
# Add this module to the list of modules that won't be built
# if they are enabled.
conf.env['MODULES_NOT_BUILT'].append('brite')
return
else:
conf.report_optional_feature("brite", "BRITE Integration", False, 'BRITE not enabled (see option --with-brite)')
# No user specified '--with-brite' option, try to guess
# bake.py uses ../../build, while ns-3-dev uses ../click
brite_dir = os.path.join('..','BRITE')
brite_bake_build_dir = os.path.join('..', '..', 'build')
brite_bake_lib_dir = os.path.join(brite_bake_build_dir, 'lib')
if os.path.exists(os.path.join(brite_dir, lib_to_check)):
conf.msg("Checking for BRITE location", ("%s (guessed)" % brite_dir))
conf.env['WITH_BRITE'] = os.path.abspath(brite_dir)
# Below is not yet ready (bake does not install BRITE yet, just builds it)
# elif os.path.exists(os.path.join(brite_bake_lib_dir, lib_to_check)):
# conf.msg("Checking for BRITE location", ("%s (guessed)" % brite_bake_lib_dir))
# conf.env['WITH_BRITE'] = os.path.abspath(brite_bake_lib_dir)
else:
conf.report_optional_feature("brite", "BRITE Integration", False, 'BRITE not enabled (see option --with-brite)')
# Add this module to the list of modules that won't be built
# if they are enabled.
conf.env['MODULES_NOT_BUILT'].append('brite')
return
# Add this module to the list of modules that won't be built
# if they are enabled.
conf.env['MODULES_NOT_BUILT'].append('brite')
return
test_code = '''
#include "Brite.h"
+33 -17
View File
@@ -72,6 +72,8 @@ def register_types(module):
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -350,6 +352,7 @@ def register_methods(root_module):
register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -1482,6 +1485,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -2317,34 +2328,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -2461,20 +2477,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
+33 -17
View File
@@ -72,6 +72,8 @@ def register_types(module):
module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -350,6 +352,7 @@ def register_methods(root_module):
register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -1482,6 +1485,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -2317,34 +2328,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -2461,20 +2477,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
+79 -75
View File
@@ -322,10 +322,10 @@ def register_types(module):
module.add_class('Vector3DChecker', parent=root_module['ns3::AttributeChecker'])
## vector.h (module 'core'): ns3::Vector3DValue [class]
module.add_class('Vector3DValue', parent=root_module['ns3::AttributeValue'])
typehandlers.add_type_alias(u'ns3::Vector3D', u'ns3::Vector')
typehandlers.add_type_alias(u'ns3::Vector3D*', u'ns3::Vector*')
typehandlers.add_type_alias(u'ns3::Vector3D&', u'ns3::Vector&')
module.add_typedef(root_module['ns3::Vector3D'], 'Vector')
typehandlers.add_type_alias(u'ns3::RngSeedManager', u'ns3::SeedManager')
typehandlers.add_type_alias(u'ns3::RngSeedManager*', u'ns3::SeedManager*')
typehandlers.add_type_alias(u'ns3::RngSeedManager&', u'ns3::SeedManager&')
module.add_typedef(root_module['ns3::RngSeedManager'], 'SeedManager')
typehandlers.add_type_alias(u'ns3::ObjectPtrContainerValue', u'ns3::ObjectVectorValue')
typehandlers.add_type_alias(u'ns3::ObjectPtrContainerValue*', u'ns3::ObjectVectorValue*')
typehandlers.add_type_alias(u'ns3::ObjectPtrContainerValue&', u'ns3::ObjectVectorValue&')
@@ -333,13 +333,13 @@ def register_types(module):
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *', u'ns3::LogTimePrinter')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) **', u'ns3::LogTimePrinter*')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *&', u'ns3::LogTimePrinter&')
typehandlers.add_type_alias(u'ns3::RngSeedManager', u'ns3::SeedManager')
typehandlers.add_type_alias(u'ns3::RngSeedManager*', u'ns3::SeedManager*')
typehandlers.add_type_alias(u'ns3::RngSeedManager&', u'ns3::SeedManager&')
module.add_typedef(root_module['ns3::RngSeedManager'], 'SeedManager')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *', u'ns3::LogNodePrinter')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) **', u'ns3::LogNodePrinter*')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *&', u'ns3::LogNodePrinter&')
typehandlers.add_type_alias(u'ns3::Vector3D', u'ns3::Vector')
typehandlers.add_type_alias(u'ns3::Vector3D*', u'ns3::Vector*')
typehandlers.add_type_alias(u'ns3::Vector3D&', u'ns3::Vector&')
module.add_typedef(root_module['ns3::Vector3D'], 'Vector')
typehandlers.add_type_alias(u'ns3::Vector3DValue', u'ns3::VectorValue')
typehandlers.add_type_alias(u'ns3::Vector3DValue*', u'ns3::VectorValue*')
typehandlers.add_type_alias(u'ns3::Vector3DValue&', u'ns3::VectorValue&')
@@ -658,6 +658,10 @@ def register_Ns3CommandLine_methods(root_module, cls):
cls.add_method('AddValue',
'void',
[param('std::string const &', 'name'), param('std::string const &', 'help'), param('ns3::Callback< bool, std::string, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')])
## command-line.h (module 'core'): void ns3::CommandLine::AddValue(std::string const & name, std::string const & attributePath) [member function]
cls.add_method('AddValue',
'void',
[param('std::string const &', 'name'), param('std::string const &', 'attributePath')])
## command-line.h (module 'core'): std::string ns3::CommandLine::GetName() const [member function]
cls.add_method('GetName',
'std::string',
@@ -2485,10 +2489,10 @@ def register_Ns3SystemThread_methods(root_module, cls):
return
def register_Ns3Time_methods(root_module, cls):
cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t const &', u'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t', u'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', u'right'))
cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', u'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t const &', u'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t', u'right'))
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('>')
cls.add_binary_comparison_operator('!=')
@@ -2516,10 +2520,10 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
@@ -2530,25 +2534,25 @@ def register_Ns3Time_methods(root_module, cls):
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -2665,20 +2669,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -3749,8 +3753,8 @@ def register_Ns3IntegerValue_methods(root_module, cls):
cls.add_constructor([])
## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(ns3::IntegerValue const & arg0) [copy constructor]
cls.add_constructor([param('ns3::IntegerValue const &', 'arg0')])
## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(int64_t const & value) [constructor]
cls.add_constructor([param('int64_t const &', 'value')])
## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(int64_t value) [constructor]
cls.add_constructor([param('int64_t', 'value')])
## integer.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::IntegerValue::Copy() const [member function]
cls.add_method('Copy',
'ns3::Ptr< ns3::AttributeValue >',
@@ -3771,10 +3775,10 @@ def register_Ns3IntegerValue_methods(root_module, cls):
'std::string',
[param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
is_const=True, is_virtual=True)
## integer.h (module 'core'): void ns3::IntegerValue::Set(int64_t const & value) [member function]
## integer.h (module 'core'): void ns3::IntegerValue::Set(int64_t value) [member function]
cls.add_method('Set',
'void',
[param('int64_t const &', 'value')])
[param('int64_t', 'value')])
return
def register_Ns3ListScheduler_methods(root_module, cls):
@@ -4464,8 +4468,8 @@ def register_Ns3UintegerValue_methods(root_module, cls):
cls.add_constructor([])
## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(ns3::UintegerValue const & arg0) [copy constructor]
cls.add_constructor([param('ns3::UintegerValue const &', 'arg0')])
## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(uint64_t const & value) [constructor]
cls.add_constructor([param('uint64_t const &', 'value')])
## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(uint64_t value) [constructor]
cls.add_constructor([param('uint64_t', 'value')])
## uinteger.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::UintegerValue::Copy() const [member function]
cls.add_method('Copy',
'ns3::Ptr< ns3::AttributeValue >',
@@ -4486,10 +4490,10 @@ def register_Ns3UintegerValue_methods(root_module, cls):
'std::string',
[param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
is_const=True, is_virtual=True)
## uinteger.h (module 'core'): void ns3::UintegerValue::Set(uint64_t const & value) [member function]
## uinteger.h (module 'core'): void ns3::UintegerValue::Set(uint64_t value) [member function]
cls.add_method('Set',
'void',
[param('uint64_t const &', 'value')])
[param('uint64_t', 'value')])
return
def register_Ns3Vector2DChecker_methods(root_module, cls):
@@ -4768,22 +4772,22 @@ def register_functions(root_module):
'ns3::Ptr< ns3::PointerValue >',
[],
template_parameters=['ns3::PointerValue'])
## nstime.h (module 'core'): ns3::Time ns3::Days(ns3::int64x64_t days) [free function]
## nstime.h (module 'core'): ns3::Time ns3::Days(ns3::int64x64_t value) [free function]
module.add_function('Days',
'ns3::Time',
[param('ns3::int64x64_t', 'days')])
## nstime.h (module 'core'): ns3::Time ns3::Days(double days) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Days(double value) [free function]
module.add_function('Days',
'ns3::Time',
[param('double', 'days')])
## nstime.h (module 'core'): ns3::Time ns3::FemtoSeconds(ns3::int64x64_t fs) [free function]
[param('double', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::FemtoSeconds(ns3::int64x64_t value) [free function]
module.add_function('FemtoSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'fs')])
## nstime.h (module 'core'): ns3::Time ns3::FemtoSeconds(uint64_t fs) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::FemtoSeconds(uint64_t value) [free function]
module.add_function('FemtoSeconds',
'ns3::Time',
[param('uint64_t', 'fs')])
[param('uint64_t', 'value')])
## hash.h (module 'core'): uint32_t ns3::Hash32(std::string const s) [free function]
module.add_function('Hash32',
'uint32_t',
@@ -4800,14 +4804,14 @@ def register_functions(root_module):
module.add_function('Hash64',
'uint64_t',
[param('char const *', 'buffer'), param('size_t const', 'size')])
## nstime.h (module 'core'): ns3::Time ns3::Hours(ns3::int64x64_t hours) [free function]
## nstime.h (module 'core'): ns3::Time ns3::Hours(ns3::int64x64_t value) [free function]
module.add_function('Hours',
'ns3::Time',
[param('ns3::int64x64_t', 'hours')])
## nstime.h (module 'core'): ns3::Time ns3::Hours(double hours) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Hours(double value) [free function]
module.add_function('Hours',
'ns3::Time',
[param('double', 'hours')])
[param('double', 'value')])
## log.h (module 'core'): extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
module.add_function('LogComponentDisable',
'void',
@@ -4908,22 +4912,22 @@ def register_functions(root_module):
module.add_function('Max',
'ns3::int64x64_t',
[param('ns3::int64x64_t const &', 'a'), param('ns3::int64x64_t const &', 'b')])
## nstime.h (module 'core'): ns3::Time ns3::MicroSeconds(ns3::int64x64_t us) [free function]
## nstime.h (module 'core'): ns3::Time ns3::MicroSeconds(ns3::int64x64_t value) [free function]
module.add_function('MicroSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'us')])
## nstime.h (module 'core'): ns3::Time ns3::MicroSeconds(uint64_t us) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::MicroSeconds(uint64_t value) [free function]
module.add_function('MicroSeconds',
'ns3::Time',
[param('uint64_t', 'us')])
## nstime.h (module 'core'): ns3::Time ns3::MilliSeconds(ns3::int64x64_t ms) [free function]
[param('uint64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::MilliSeconds(ns3::int64x64_t value) [free function]
module.add_function('MilliSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'ms')])
## nstime.h (module 'core'): ns3::Time ns3::MilliSeconds(uint64_t ms) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::MilliSeconds(uint64_t value) [free function]
module.add_function('MilliSeconds',
'ns3::Time',
[param('uint64_t', 'ms')])
[param('uint64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Min(ns3::Time const & ta, ns3::Time const & tb) [free function]
module.add_function('Min',
'ns3::Time',
@@ -4932,42 +4936,42 @@ def register_functions(root_module):
module.add_function('Min',
'ns3::int64x64_t',
[param('ns3::int64x64_t const &', 'a'), param('ns3::int64x64_t const &', 'b')])
## nstime.h (module 'core'): ns3::Time ns3::Minutes(ns3::int64x64_t minutes) [free function]
## nstime.h (module 'core'): ns3::Time ns3::Minutes(ns3::int64x64_t value) [free function]
module.add_function('Minutes',
'ns3::Time',
[param('ns3::int64x64_t', 'minutes')])
## nstime.h (module 'core'): ns3::Time ns3::Minutes(double minutes) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Minutes(double value) [free function]
module.add_function('Minutes',
'ns3::Time',
[param('double', 'minutes')])
## nstime.h (module 'core'): ns3::Time ns3::NanoSeconds(ns3::int64x64_t ns) [free function]
[param('double', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::NanoSeconds(ns3::int64x64_t value) [free function]
module.add_function('NanoSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'ns')])
## nstime.h (module 'core'): ns3::Time ns3::NanoSeconds(uint64_t ns) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::NanoSeconds(uint64_t value) [free function]
module.add_function('NanoSeconds',
'ns3::Time',
[param('uint64_t', 'ns')])
[param('uint64_t', 'value')])
## simulator.h (module 'core'): extern ns3::Time ns3::Now() [free function]
module.add_function('Now',
'ns3::Time',
[])
## nstime.h (module 'core'): ns3::Time ns3::PicoSeconds(ns3::int64x64_t ps) [free function]
## nstime.h (module 'core'): ns3::Time ns3::PicoSeconds(ns3::int64x64_t value) [free function]
module.add_function('PicoSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'ps')])
## nstime.h (module 'core'): ns3::Time ns3::PicoSeconds(uint64_t ps) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::PicoSeconds(uint64_t value) [free function]
module.add_function('PicoSeconds',
'ns3::Time',
[param('uint64_t', 'ps')])
## nstime.h (module 'core'): ns3::Time ns3::Seconds(ns3::int64x64_t seconds) [free function]
[param('uint64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Seconds(ns3::int64x64_t value) [free function]
module.add_function('Seconds',
'ns3::Time',
[param('ns3::int64x64_t', 'seconds')])
## nstime.h (module 'core'): ns3::Time ns3::Seconds(double seconds) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Seconds(double value) [free function]
module.add_function('Seconds',
'ns3::Time',
[param('double', 'seconds')])
[param('double', 'value')])
## test.h (module 'core'): extern bool ns3::TestDoubleIsEqual(double const a, double const b, double const epsilon=std::numeric_limits<double>::epsilon()) [free function]
module.add_function('TestDoubleIsEqual',
'bool',
@@ -5026,14 +5030,14 @@ def register_functions(root_module):
'std::string',
[],
template_parameters=['unsigned char'])
## nstime.h (module 'core'): ns3::Time ns3::Years(ns3::int64x64_t years) [free function]
## nstime.h (module 'core'): ns3::Time ns3::Years(ns3::int64x64_t value) [free function]
module.add_function('Years',
'ns3::Time',
[param('ns3::int64x64_t', 'years')])
## nstime.h (module 'core'): ns3::Time ns3::Years(double years) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Years(double value) [free function]
module.add_function('Years',
'ns3::Time',
[param('double', 'years')])
[param('double', 'value')])
register_functions_ns3_CommandLineHelper(module.get_submodule('CommandLineHelper'), root_module)
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module)
+79 -75
View File
@@ -322,10 +322,10 @@ def register_types(module):
module.add_class('Vector3DChecker', parent=root_module['ns3::AttributeChecker'])
## vector.h (module 'core'): ns3::Vector3DValue [class]
module.add_class('Vector3DValue', parent=root_module['ns3::AttributeValue'])
typehandlers.add_type_alias(u'ns3::Vector3D', u'ns3::Vector')
typehandlers.add_type_alias(u'ns3::Vector3D*', u'ns3::Vector*')
typehandlers.add_type_alias(u'ns3::Vector3D&', u'ns3::Vector&')
module.add_typedef(root_module['ns3::Vector3D'], 'Vector')
typehandlers.add_type_alias(u'ns3::RngSeedManager', u'ns3::SeedManager')
typehandlers.add_type_alias(u'ns3::RngSeedManager*', u'ns3::SeedManager*')
typehandlers.add_type_alias(u'ns3::RngSeedManager&', u'ns3::SeedManager&')
module.add_typedef(root_module['ns3::RngSeedManager'], 'SeedManager')
typehandlers.add_type_alias(u'ns3::ObjectPtrContainerValue', u'ns3::ObjectVectorValue')
typehandlers.add_type_alias(u'ns3::ObjectPtrContainerValue*', u'ns3::ObjectVectorValue*')
typehandlers.add_type_alias(u'ns3::ObjectPtrContainerValue&', u'ns3::ObjectVectorValue&')
@@ -333,13 +333,13 @@ def register_types(module):
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *', u'ns3::LogTimePrinter')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) **', u'ns3::LogTimePrinter*')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *&', u'ns3::LogTimePrinter&')
typehandlers.add_type_alias(u'ns3::RngSeedManager', u'ns3::SeedManager')
typehandlers.add_type_alias(u'ns3::RngSeedManager*', u'ns3::SeedManager*')
typehandlers.add_type_alias(u'ns3::RngSeedManager&', u'ns3::SeedManager&')
module.add_typedef(root_module['ns3::RngSeedManager'], 'SeedManager')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *', u'ns3::LogNodePrinter')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) **', u'ns3::LogNodePrinter*')
typehandlers.add_type_alias(u'void ( * ) ( std::ostream & ) *&', u'ns3::LogNodePrinter&')
typehandlers.add_type_alias(u'ns3::Vector3D', u'ns3::Vector')
typehandlers.add_type_alias(u'ns3::Vector3D*', u'ns3::Vector*')
typehandlers.add_type_alias(u'ns3::Vector3D&', u'ns3::Vector&')
module.add_typedef(root_module['ns3::Vector3D'], 'Vector')
typehandlers.add_type_alias(u'ns3::Vector3DValue', u'ns3::VectorValue')
typehandlers.add_type_alias(u'ns3::Vector3DValue*', u'ns3::VectorValue*')
typehandlers.add_type_alias(u'ns3::Vector3DValue&', u'ns3::VectorValue&')
@@ -658,6 +658,10 @@ def register_Ns3CommandLine_methods(root_module, cls):
cls.add_method('AddValue',
'void',
[param('std::string const &', 'name'), param('std::string const &', 'help'), param('ns3::Callback< bool, std::string, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')])
## command-line.h (module 'core'): void ns3::CommandLine::AddValue(std::string const & name, std::string const & attributePath) [member function]
cls.add_method('AddValue',
'void',
[param('std::string const &', 'name'), param('std::string const &', 'attributePath')])
## command-line.h (module 'core'): std::string ns3::CommandLine::GetName() const [member function]
cls.add_method('GetName',
'std::string',
@@ -2485,10 +2489,10 @@ def register_Ns3SystemThread_methods(root_module, cls):
return
def register_Ns3Time_methods(root_module, cls):
cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t const &', u'right'))
cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t', u'right'))
cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', u'right'))
cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', u'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t const &', u'right'))
cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], param('int64_t', u'right'))
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('>')
cls.add_binary_comparison_operator('!=')
@@ -2516,10 +2520,10 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
@@ -2530,25 +2534,25 @@ def register_Ns3Time_methods(root_module, cls):
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -2665,20 +2669,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -3749,8 +3753,8 @@ def register_Ns3IntegerValue_methods(root_module, cls):
cls.add_constructor([])
## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(ns3::IntegerValue const & arg0) [copy constructor]
cls.add_constructor([param('ns3::IntegerValue const &', 'arg0')])
## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(int64_t const & value) [constructor]
cls.add_constructor([param('int64_t const &', 'value')])
## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(int64_t value) [constructor]
cls.add_constructor([param('int64_t', 'value')])
## integer.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::IntegerValue::Copy() const [member function]
cls.add_method('Copy',
'ns3::Ptr< ns3::AttributeValue >',
@@ -3771,10 +3775,10 @@ def register_Ns3IntegerValue_methods(root_module, cls):
'std::string',
[param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
is_const=True, is_virtual=True)
## integer.h (module 'core'): void ns3::IntegerValue::Set(int64_t const & value) [member function]
## integer.h (module 'core'): void ns3::IntegerValue::Set(int64_t value) [member function]
cls.add_method('Set',
'void',
[param('int64_t const &', 'value')])
[param('int64_t', 'value')])
return
def register_Ns3ListScheduler_methods(root_module, cls):
@@ -4464,8 +4468,8 @@ def register_Ns3UintegerValue_methods(root_module, cls):
cls.add_constructor([])
## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(ns3::UintegerValue const & arg0) [copy constructor]
cls.add_constructor([param('ns3::UintegerValue const &', 'arg0')])
## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(uint64_t const & value) [constructor]
cls.add_constructor([param('uint64_t const &', 'value')])
## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(uint64_t value) [constructor]
cls.add_constructor([param('uint64_t', 'value')])
## uinteger.h (module 'core'): ns3::Ptr<ns3::AttributeValue> ns3::UintegerValue::Copy() const [member function]
cls.add_method('Copy',
'ns3::Ptr< ns3::AttributeValue >',
@@ -4486,10 +4490,10 @@ def register_Ns3UintegerValue_methods(root_module, cls):
'std::string',
[param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')],
is_const=True, is_virtual=True)
## uinteger.h (module 'core'): void ns3::UintegerValue::Set(uint64_t const & value) [member function]
## uinteger.h (module 'core'): void ns3::UintegerValue::Set(uint64_t value) [member function]
cls.add_method('Set',
'void',
[param('uint64_t const &', 'value')])
[param('uint64_t', 'value')])
return
def register_Ns3Vector2DChecker_methods(root_module, cls):
@@ -4768,22 +4772,22 @@ def register_functions(root_module):
'ns3::Ptr< ns3::PointerValue >',
[],
template_parameters=['ns3::PointerValue'])
## nstime.h (module 'core'): ns3::Time ns3::Days(ns3::int64x64_t days) [free function]
## nstime.h (module 'core'): ns3::Time ns3::Days(ns3::int64x64_t value) [free function]
module.add_function('Days',
'ns3::Time',
[param('ns3::int64x64_t', 'days')])
## nstime.h (module 'core'): ns3::Time ns3::Days(double days) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Days(double value) [free function]
module.add_function('Days',
'ns3::Time',
[param('double', 'days')])
## nstime.h (module 'core'): ns3::Time ns3::FemtoSeconds(ns3::int64x64_t fs) [free function]
[param('double', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::FemtoSeconds(ns3::int64x64_t value) [free function]
module.add_function('FemtoSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'fs')])
## nstime.h (module 'core'): ns3::Time ns3::FemtoSeconds(uint64_t fs) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::FemtoSeconds(uint64_t value) [free function]
module.add_function('FemtoSeconds',
'ns3::Time',
[param('uint64_t', 'fs')])
[param('uint64_t', 'value')])
## hash.h (module 'core'): uint32_t ns3::Hash32(std::string const s) [free function]
module.add_function('Hash32',
'uint32_t',
@@ -4800,14 +4804,14 @@ def register_functions(root_module):
module.add_function('Hash64',
'uint64_t',
[param('char const *', 'buffer'), param('size_t const', 'size')])
## nstime.h (module 'core'): ns3::Time ns3::Hours(ns3::int64x64_t hours) [free function]
## nstime.h (module 'core'): ns3::Time ns3::Hours(ns3::int64x64_t value) [free function]
module.add_function('Hours',
'ns3::Time',
[param('ns3::int64x64_t', 'hours')])
## nstime.h (module 'core'): ns3::Time ns3::Hours(double hours) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Hours(double value) [free function]
module.add_function('Hours',
'ns3::Time',
[param('double', 'hours')])
[param('double', 'value')])
## log.h (module 'core'): extern void ns3::LogComponentDisable(char const * name, ns3::LogLevel level) [free function]
module.add_function('LogComponentDisable',
'void',
@@ -4908,22 +4912,22 @@ def register_functions(root_module):
module.add_function('Max',
'ns3::int64x64_t',
[param('ns3::int64x64_t const &', 'a'), param('ns3::int64x64_t const &', 'b')])
## nstime.h (module 'core'): ns3::Time ns3::MicroSeconds(ns3::int64x64_t us) [free function]
## nstime.h (module 'core'): ns3::Time ns3::MicroSeconds(ns3::int64x64_t value) [free function]
module.add_function('MicroSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'us')])
## nstime.h (module 'core'): ns3::Time ns3::MicroSeconds(uint64_t us) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::MicroSeconds(uint64_t value) [free function]
module.add_function('MicroSeconds',
'ns3::Time',
[param('uint64_t', 'us')])
## nstime.h (module 'core'): ns3::Time ns3::MilliSeconds(ns3::int64x64_t ms) [free function]
[param('uint64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::MilliSeconds(ns3::int64x64_t value) [free function]
module.add_function('MilliSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'ms')])
## nstime.h (module 'core'): ns3::Time ns3::MilliSeconds(uint64_t ms) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::MilliSeconds(uint64_t value) [free function]
module.add_function('MilliSeconds',
'ns3::Time',
[param('uint64_t', 'ms')])
[param('uint64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Min(ns3::Time const & ta, ns3::Time const & tb) [free function]
module.add_function('Min',
'ns3::Time',
@@ -4932,42 +4936,42 @@ def register_functions(root_module):
module.add_function('Min',
'ns3::int64x64_t',
[param('ns3::int64x64_t const &', 'a'), param('ns3::int64x64_t const &', 'b')])
## nstime.h (module 'core'): ns3::Time ns3::Minutes(ns3::int64x64_t minutes) [free function]
## nstime.h (module 'core'): ns3::Time ns3::Minutes(ns3::int64x64_t value) [free function]
module.add_function('Minutes',
'ns3::Time',
[param('ns3::int64x64_t', 'minutes')])
## nstime.h (module 'core'): ns3::Time ns3::Minutes(double minutes) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Minutes(double value) [free function]
module.add_function('Minutes',
'ns3::Time',
[param('double', 'minutes')])
## nstime.h (module 'core'): ns3::Time ns3::NanoSeconds(ns3::int64x64_t ns) [free function]
[param('double', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::NanoSeconds(ns3::int64x64_t value) [free function]
module.add_function('NanoSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'ns')])
## nstime.h (module 'core'): ns3::Time ns3::NanoSeconds(uint64_t ns) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::NanoSeconds(uint64_t value) [free function]
module.add_function('NanoSeconds',
'ns3::Time',
[param('uint64_t', 'ns')])
[param('uint64_t', 'value')])
## simulator.h (module 'core'): extern ns3::Time ns3::Now() [free function]
module.add_function('Now',
'ns3::Time',
[])
## nstime.h (module 'core'): ns3::Time ns3::PicoSeconds(ns3::int64x64_t ps) [free function]
## nstime.h (module 'core'): ns3::Time ns3::PicoSeconds(ns3::int64x64_t value) [free function]
module.add_function('PicoSeconds',
'ns3::Time',
[param('ns3::int64x64_t', 'ps')])
## nstime.h (module 'core'): ns3::Time ns3::PicoSeconds(uint64_t ps) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::PicoSeconds(uint64_t value) [free function]
module.add_function('PicoSeconds',
'ns3::Time',
[param('uint64_t', 'ps')])
## nstime.h (module 'core'): ns3::Time ns3::Seconds(ns3::int64x64_t seconds) [free function]
[param('uint64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Seconds(ns3::int64x64_t value) [free function]
module.add_function('Seconds',
'ns3::Time',
[param('ns3::int64x64_t', 'seconds')])
## nstime.h (module 'core'): ns3::Time ns3::Seconds(double seconds) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Seconds(double value) [free function]
module.add_function('Seconds',
'ns3::Time',
[param('double', 'seconds')])
[param('double', 'value')])
## test.h (module 'core'): extern bool ns3::TestDoubleIsEqual(double const a, double const b, double const epsilon=std::numeric_limits<double>::epsilon()) [free function]
module.add_function('TestDoubleIsEqual',
'bool',
@@ -5026,14 +5030,14 @@ def register_functions(root_module):
'std::string',
[],
template_parameters=['unsigned char'])
## nstime.h (module 'core'): ns3::Time ns3::Years(ns3::int64x64_t years) [free function]
## nstime.h (module 'core'): ns3::Time ns3::Years(ns3::int64x64_t value) [free function]
module.add_function('Years',
'ns3::Time',
[param('ns3::int64x64_t', 'years')])
## nstime.h (module 'core'): ns3::Time ns3::Years(double years) [free function]
[param('ns3::int64x64_t', 'value')])
## nstime.h (module 'core'): ns3::Time ns3::Years(double value) [free function]
module.add_function('Years',
'ns3::Time',
[param('double', 'years')])
[param('double', 'value')])
register_functions_ns3_CommandLineHelper(module.get_submodule('CommandLineHelper'), root_module)
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module)
+73 -8
View File
@@ -28,7 +28,7 @@
using namespace ns3;
std::string g_cbArg="cbArg default";
std::string g_cbArg = "cbArg default";
bool SetCbArg (std::string val)
{
@@ -43,6 +43,26 @@ int main (int argc, char *argv[])
int intArg = 1;
bool boolArg = false;
std::string strArg = "strArg default";
// Attribute path
const std::string attrClass = "ns3::RandomVariableStream";
const std::string attrName = "Antithetic";
const std::string attrPath = attrClass + "::" + attrName;
// Cache the initial values. Normally one wouldn't do this,
// but we want to demonstrate that CommandLine has changed them.
const int intDef = intArg;
const bool boolDef = boolArg;
const std::string strDef = strArg;
const std::string cbDef = g_cbArg;
// Look up default value for attribute
const TypeId tid = TypeId::LookupByName (attrClass);
std::string attrDef;
{
struct TypeId::AttributeInformation info;
tid.LookupAttributeByName (attrName, &info);
attrDef = info.originalInitialValue->SerializeToString (info.checker);
}
CommandLine cmd;
cmd.Usage ("CommandLine example program.\n"
@@ -51,17 +71,62 @@ int main (int argc, char *argv[])
cmd.AddValue ("intArg", "an int argument", intArg);
cmd.AddValue ("boolArg", "a bool argument", boolArg);
cmd.AddValue ("strArg", "a string argument", strArg);
cmd.AddValue ("anti", attrPath);
cmd.AddValue ("cbArg", "a string via callback", MakeCallback (SetCbArg));
cmd.Parse (argc, argv);
std::cout << std::left
<< std::setw (10) << "intArg:" << intArg << std::endl;
std::cout << std::setw (10) << "boolArg:"
<< std::boolalpha << boolArg
<< std::noboolalpha << std::endl;
// Show initial values:
std::cout << std::endl;
std::cout << cmd.GetName () << ":" << std::endl;
std::cout << "Initial values:" << std::endl;
std::cout << std::setw (10) << "strArg:" << "\"" << strArg << "\"" << std::endl;
std::cout << std::setw (10) << "cbArg:" << "\"" << g_cbArg << "\"" << std::endl;
std::cout << std::left << std::setw (10) << "intArg:"
<< intDef
<< std::endl;
std::cout << std::setw (10) << "boolArg:"
<< std::boolalpha << boolDef << std::noboolalpha
<< std::endl;
std::cout << std::setw (10) << "strArg:"
<< "\"" << strDef << "\""
<< std::endl;
std::cout << std::setw (10) << "anti:"
<< "\"" << attrDef << "\""
<< std::endl;
std::cout << std::setw (10) << "cbArg:"
<< "\"" << cbDef << "\""
<< std::endl;
std::cout << std::endl;
// Show final values
std::cout << "Final values:" << std::endl;
std::cout << std::left << std::setw (10) << "intArg:"
<< intArg
<< std::endl;
std::cout << std::setw (10) << "boolArg:"
<< std::boolalpha << boolArg
<< std::noboolalpha
<< std::endl;
std::cout << std::setw (10) << "strArg:"
<< "\"" << strArg << "\""
<< std::endl;
// Look up new default value for attribute
{
struct TypeId::AttributeInformation info;
tid.LookupAttributeByName (attrName, &info);
std::cout << std::setw (10) << "anti:"
<< "\""
<< info.initialValue->SerializeToString (info.checker)
<< "\""
<< std::endl;
}
std::cout << std::setw (10) << "cbArg:"
<< "\"" << g_cbArg << "\""
<< std::endl;
return 0;
}
+72 -56
View File
@@ -32,6 +32,9 @@
namespace ns3 {
// Define the doxygen subgroups all at once,
// since the implementations are interleaved.
/**
* \ingroup core
* \defgroup callback Callbacks
@@ -42,19 +45,68 @@ namespace ns3 {
*/
/**
* \ingroup callback
* \defgroup callbackimpl Callback Implementation
* Callback implementation classes
*/
/**@{*/
/**
* \ingroup callback
* \defgroup makecallbackmemptr MakeCallback from member function pointer
*
* Build Callbacks for class method members which take varying numbers
* of arguments and potentially returning a value.
*
* Generally the \c MakeCallback functions are invoked with the
* method function address first, followed by the \c this pointer:
* \code
* MakeCallback ( & MyClass::Handler, this);
* \endcode
*
* There is not a version with bound arguments. You may be able to
* get the same result by using \c MakeBoundCallback with a \c static
* member function, as in:
* \code
* MakeBoundCallback ( & MyClass::StaticHandler, this);
* \endcode
* This still leaves two argument slots available for binding.
*/
/**
* \ingroup callback
* \defgroup makecallbackfnptr MakeCallback from function pointers
*
* Build Callbacks for functions which take varying numbers of arguments
* and potentially returning a value.
*/
/**
* \ingroup callback
* \defgroup makenullcallback MakeCallback with no arguments
*
* Define empty (Null) callbacks as placeholders for unset callback variables.
*/
/**
* \ingroup callback
* \defgroup makeboundcallback MakeBoundCallback from functions bound with up to three arguments.
*
* Build bound Callbacks which take varying numbers of arguments,
* and potentially returning a value.
*
* \internal
*
* The following is experimental code. It works but we have
* not yet determined whether or not it is really useful and whether
* or not we really want to use it.
*/
/**
* \ingroup makecallbackmemptr
*
* Trait class to convert a pointer into a reference,
* used by MemPtrCallBackImpl
* @{
*/
template <typename T>
struct CallbackTraits;
/**
* Trait class to convert a pointer into a reference,
* used by MemPtrCallBackImpl
*/
template <typename T>
struct CallbackTraits<T *>
{
@@ -69,11 +121,6 @@ struct CallbackTraits<T *>
};
/**@}*/
/**
* \ingroup callback
* \defgroup callbackimpl Callback Implementation
* Callback implementation classes
*/
/**
* \ingroup callbackimpl
* Abstract base class for CallbackImpl
@@ -103,8 +150,9 @@ class CallbackImpl;
/**
* \ingroup callbackimpl
* CallbackImpl classes with varying numbers of argument types
*
* @{
*/
/**@{*/
/** CallbackImpl class with no arguments. */
template <typename R>
class CallbackImpl<R,empty,empty,empty,empty,empty,empty,empty,empty,empty> : public CallbackImplBase {
@@ -179,7 +227,7 @@ public:
/**
* \ingroup callback
* \ingroup callbackimpl
* CallbackImpl with functors
*/
template <typename T, typename R, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8, typename T9>
@@ -325,7 +373,7 @@ private:
};
/**
* \ingroup callback
* \ingroup makecallbackmemptr
* CallbackImpl for pointer to member functions
*/
template <typename OBJ_PTR, typename MEM_PTR, typename R, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
@@ -474,7 +522,7 @@ private:
};
/**
* \ingroup callback
* \ingroup callbackimpl
* CallbackImpl for functors with first argument bound at construction
*/
template <typename T, typename R, typename TX, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7, typename T8>
@@ -608,7 +656,7 @@ private:
};
/**
* \ingroup callback
* \ingroup callbackimpl
* CallbackImpl for functors with first two arguments bound at construction
*/
template <typename T, typename R, typename TX1, typename TX2, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6, typename T7>
@@ -730,7 +778,7 @@ private:
};
/**
* \ingroup callback
* \ingroup callbackimpl
* CallbackImpl for functors with first three arguments bound at construction
*/
template <typename T, typename R, typename TX1, typename TX2, typename TX3, typename T1, typename T2, typename T3, typename T4,typename T5, typename T6>
@@ -841,7 +889,7 @@ private:
};
/**
* \ingroup callback
* \ingroup callbackimpl
* Base class for Callback class.
* Provides pimpl abstraction.
*/
@@ -1219,13 +1267,6 @@ bool operator != (Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> a, Callback<R,T1,T2,T3,
return !a.IsEqual (b);
}
/**
* \ingroup callback
* \defgroup makecallbackmemptr MakeCallback from member function pointer
*
* Build Callbacks for class method members which take varying numbers of arguments
* and potentially returning a value.
*/
/**
* \ingroup makecallbackmemptr
* @{
@@ -1320,13 +1361,6 @@ Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (T::*memPtr)(T1,T2,T3,T4,
}
/**@}*/
/**
* \ingroup callback
* \defgroup makecallbackfnptr MakeCallback from function pointers
*
* Build Callbacks for functions which take varying numbers of arguments
* and potentially returning a value.
*/
/**
* \ingroup makecallbackfnptr
* @{
@@ -1380,10 +1414,6 @@ Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeCallback (R (*fnPtr)(T1,T2,T3,T4,T5,T
}
/**@}*/
/**
* \ingroup callback
* \defgroup makenullcallback MakeCallback with no arguments
*/
/**
* \ingroup makenullcallback
* @{
@@ -1438,27 +1468,10 @@ Callback<R,T1,T2,T3,T4,T5,T6,T7,T8,T9> MakeNullCallback (void) {
/**@}*/
/**
* \ingroup callback
* \defgroup makeboundcallback MakeBoundCallback from functions bound with up to three arguments.
*/
/**
* \ingroup makeboundcallback
*
* Build bound Callbacks which take varying numbers of arguments,
* and potentially returning a value.
*
* \internal
*
* The following is experimental code. It works but we have
* not yet determined whether or not it is really useful and whether
* or not we really want to use it.
*
* @{
*/
/**
* @{
* Make Callbacks with one bound argument.
* \param fnPtr function pointer
* \param a1 first bound argument
* \return a bound Callback
@@ -1528,11 +1541,13 @@ Callback<R,T1,T2,T3,T4,T5,T6,T7,T8> MakeBoundCallback (R (*fnPtr)(TX,T1,T2,T3,T4
/**@}*/
/**
* \ingroup makeboundcallback
* @{
* Make Callbacks with two bound arguments.
* \param fnPtr function pointer
* \param a1 first bound argument
* \param a2 second bound argument
* \return a bound Callback
* @{
*/
template <typename R, typename TX1, typename TX2, typename ARG1, typename ARG2>
Callback<R> MakeBoundCallback (R (*fnPtr)(TX1,TX2), ARG1 a1, ARG2 a2) {
@@ -1592,12 +1607,14 @@ Callback<R,T1,T2,T3,T4,T5,T6,T7> MakeBoundCallback (R (*fnPtr)(TX1,TX2,T1,T2,T3,
/**@}*/
/**
* \ingroup makeboundcallback
* @{
* Make Callbacks with three bound arguments.
* \param a1 first bound argument
* \param a2 second bound argument
* \param a3 third bound argument
* \param fnPtr function pointer
* \return a bound Callback
* @{
*/
template <typename R, typename TX1, typename TX2, typename TX3, typename ARG1, typename ARG2, typename ARG3>
Callback<R> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3), ARG1 a1, ARG2 a2, ARG3 a3) {
@@ -1649,7 +1666,6 @@ Callback<R,T1,T2,T3,T4,T5,T6> MakeBoundCallback (R (*fnPtr)(TX1,TX2,TX3,T1,T2,T3
}
/**@}*/
/**@}*/
} // namespace ns3
+110 -31
View File
@@ -22,6 +22,8 @@
#include <cctype> // for tolower
#include <cstdlib> // for exit
#include <iomanip> // for setw, boolalpha
#include <set>
#include <sstream>
#include "command-line.h"
#include "log.h"
@@ -204,17 +206,29 @@ CommandLine::PrintGlobals (std::ostream &os) const
NS_LOG_FUNCTION (this);
os << "Global values:" << std::endl;
// Sort output
std::vector<std::string> globals;
for (GlobalValue::Iterator i = GlobalValue::Begin ();
i != GlobalValue::End ();
++i)
{
os << " --" << (*i)->GetName () << "=[";
std::stringstream ss;
ss << " --" << (*i)->GetName () << "=[";
Ptr<const AttributeChecker> checker = (*i)->GetChecker ();
StringValue v;
(*i)->GetValue (v);
os << v.Get () << "]" << std::endl;
os << " " << (*i)->GetHelp () << std::endl;
ss << v.Get () << "]" << std::endl;
ss << " " << (*i)->GetHelp () << std::endl;
globals.push_back (ss.str ());
}
std::sort (globals.begin (), globals.end ());
for (std::vector<std::string>::const_iterator it = globals.begin ();
it < globals.end ();
++it)
{
os << *it;
}
}
@@ -231,13 +245,25 @@ CommandLine::PrintAttributes (std::ostream &os, const std::string &type) const
os << "Attributes for TypeId " << tid.GetName () << std::endl;
// Sort output
std::vector<std::string> attributes;
for (uint32_t i = 0; i < tid.GetAttributeN (); ++i)
{
os << " --" << tid.GetAttributeFullName (i) << "=[";
std::stringstream ss;
ss << " --" << tid.GetAttributeFullName (i) << "=[";
struct TypeId::AttributeInformation info = tid.GetAttribute (i);
os << info.initialValue->SerializeToString (info.checker) << "]"
ss << info.initialValue->SerializeToString (info.checker) << "]"
<< std::endl;
os << " " << info.help << std::endl;
ss << " " << info.help << std::endl;
attributes.push_back (ss.str ());
}
std::sort (attributes.begin (), attributes.end ());
for (std::vector<std::string>::const_iterator it = attributes.begin ();
it < attributes.end ();
++it)
{
os << *it;
}
}
@@ -249,13 +275,25 @@ CommandLine::PrintGroup (std::ostream &os, const std::string &group) const
os << "TypeIds in group " << group << ":" << std::endl;
// Sort output
std::vector<std::string> groupTypes;
for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
{
std::stringstream ss;
TypeId tid = TypeId::GetRegistered (i);
if (tid.GetGroupName () == group)
{
os << " " <<tid.GetName () << std::endl;
ss << " " <<tid.GetName () << std::endl;
}
groupTypes.push_back (ss.str ());
}
std::sort (groupTypes.begin (), groupTypes.end ());
for (std::vector<std::string>::const_iterator it = groupTypes.begin ();
it < groupTypes.end ();
++it)
{
os << *it;
}
}
@@ -264,10 +302,23 @@ CommandLine::PrintTypeIds (std::ostream &os) const
{
NS_LOG_FUNCTION (this);
os << "Registered TypeIds:" << std::endl;
// Sort output
std::vector<std::string> types;
for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
{
std::stringstream ss;
TypeId tid = TypeId::GetRegistered (i);
os << " " << tid.GetName () << std::endl;
ss << " " << tid.GetName () << std::endl;
types.push_back (ss.str ());
}
std::sort (types.begin (), types.end ());
for (std::vector<std::string>::const_iterator it = types.begin ();
it < types.end ();
++it)
{
os << *it;
}
}
@@ -276,35 +327,16 @@ CommandLine::PrintGroups (std::ostream &os) const
{
NS_LOG_FUNCTION (this);
std::list<std::string> groups;
std::set<std::string> groups;
for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
{
TypeId tid = TypeId::GetRegistered (i);
std::string group = tid.GetGroupName ();
if (group == "")
{
continue;
}
bool found = false;
for (std::list<std::string>::const_iterator j = groups.begin ();
j != groups.end ();
++j)
{
if (*j == group)
{
found = true;
break;
}
}
if (!found)
{
groups.push_back (group);
}
groups.insert (tid.GetGroupName ());
}
os << "Registered TypeId groups:" << std::endl;
for (std::list<std::string>::const_iterator k = groups.begin ();
// Sets are already sorted
for (std::set<std::string>::const_iterator k = groups.begin ();
k != groups.end ();
++k)
{
@@ -404,6 +436,53 @@ CommandLine::AddValue (const std::string &name,
m_items.push_back (item);
}
void
CommandLine::AddValue (const std::string &name,
const std::string &attributePath)
{
NS_LOG_FUNCTION (this << name << attributePath);
// Attribute name is last token
size_t colon = attributePath.rfind ("::");
const std::string typeName = attributePath.substr (0, colon);
NS_LOG_DEBUG ("typeName: '" << typeName << "', colon: " << colon);
TypeId tid;
if (!TypeId::LookupByNameFailSafe (typeName, &tid))
{
NS_FATAL_ERROR ("Unknown type=" << typeName);
}
const std::string attrName = attributePath.substr (colon + 2);
struct TypeId::AttributeInformation info;
if (!tid.LookupAttributeByName (attrName, &info))
{
NS_FATAL_ERROR ("Attribute not found: " << attributePath);
}
std::stringstream ss;
ss << info.help
<< " (" << attributePath << ") ["
<< info.initialValue->SerializeToString (info.checker) << "]";
AddValue (name, ss.str (),
MakeBoundCallback (CommandLine::HandleAttribute, attributePath)) ;
}
/* static */
bool
CommandLine::HandleAttribute (const std::string name,
const std::string value)
{
bool success = true;
if (!Config::SetGlobalFailSafe (name, StringValue (value))
&& !Config::SetDefaultFailSafe (name, StringValue (value)))
{
success = false;
}
return success;
}
bool
CommandLine::Item::HasDefault () const
+98 -62
View File
@@ -50,48 +50,66 @@ namespace ns3 {
* can be processed via a Callback.
*
* CommandLine also provides handlers for these standard arguments:
* \code
* --PrintGlobals: Print the list of globals.
* --PrintGroups: Print the list of groups.
* --PrintGroup=[group]: Print all TypeIds of group.
* --PrintTypeIds: Print all TypeIds.
* --PrintAttributes=[typeid]: Print all attributes of typeid.
* --PrintHelp: Print this help message.
* \endcode
* \verbatim
--PrintGlobals: Print the list of globals.
--PrintGroups: Print the list of groups.
--PrintGroup=[group]: Print all TypeIds of group.
--PrintTypeIds: Print all TypeIds.
--PrintAttributes=[typeid]: Print all attributes of typeid.
--PrintHelp: Print this help message. \endverbatim
*
* The more common \c --help is a synonym for \c --PrintHelp; an example
* is given below.
*
* Finally, CommandLine processes Attribute and GlobalValue arguments.
* Default values for chosen attributes can be set using a shorthand
* argument name.
*
* In use, arguments are given in the form
* \code
* --arg=value --toggle
* \endcode
* \verbatim
--arg=value --toggle \endverbatim
* Most arguments expect a value, as in the first form, \c --arg=value.
* Toggles, corresponding to boolean arguments, can be given in any of
* the forms
* \code
* --toggle1 --toggle2=1 --toggle3=t --toggle4=true
* \endcode
* \verbatim
--toggle1 --toggle2=1 --toggle3=t --toggle4=true \endverbatim
* The first form changes the state of toggle1 from its default;
* all the rest set the corresponding boolean variable to true.
* \c 0, \c f and \c false are accepted to set the variable to false.
*
* Arguments can be repeated on the command line; the last value given
* will be the final value used. For example,
* \verbatim
--arg=one --toggle=f --arg=another --toggle \endverbatim
* The variable set by \c --arg will end up with the value \c "another";
* the boolean set by \c --toggle will end up as \c true.
*
* Because arguments can be repeated it can be hard to decipher what
* value each variable ended up with, especially when using boolean toggles.
* Suggested best practice is for scripts to report the values of all items
* settable throught CommandLine, as done by the example below.
*
*
* CommandLine can set the initial value of every attribute in the system
* with the
* \c --TypeIdName::AttributeName=value syntax, for example
* \code
* --Application::StartTime=3s
* \endcode
* \verbatim
--Application::StartTime=3s \endverbatim
* In some cases you may want to highlight the use of a particular
* attribute for a simulation script. For example, you might want
* to make it easy to set the \c Application::StartTime using
* the argument \c --start, and have its help string show as part
* of the help message. This can be done using the
* \link AddValue(const std::string, const std::string)
* AddValue (name, attributePath) \endlink
* method.
*
* CommandLine can also set the value of every GlobalValue
* in the system with the \c --GlobalValueName=value syntax, for example
* \code
* --SchedulerType=HeapScheduler
* \endcode
* \verbatim
--SchedulerType=HeapScheduler \endverbatim
*
* A simple example is in `src/core/example/ command-line-example.cc`
* A simple example is in `src/core/example/``command-line-example.cc`
* The heart of that example is this code:
*
* \code
@@ -99,55 +117,56 @@ namespace ns3 {
* bool boolArg = false;
* std::string strArg = "strArg default";
*
* CommandLine cmd;
* cmd.Usage ("CommandLine example program.\n"
* "\n"
* "This little program demonstrates how to use CommandLine.");
* CommandLine cmd;
* cmd.Usage ("CommandLine example program.\n"
* "\n"
* "This little program demonstrates how to use CommandLine.");
* cmd.AddValue ("intArg", "an int argument", intArg);
* cmd.AddValue ("boolArg", "a bool argument", boolArg);
* cmd.AddValue ("strArg", "a string argument", strArg);
* cmd.AddValue ("anti", "ns3::RandomVariableStream::Antithetic");
* cmd.AddValue ("cbArg", "a string via callback", MakeCallback (SetCbArg));
* cmd.Parse (argc, argv);
* cmd.Parse (argc, argv);
* \endcode
* after which it prints the values of each variable. (The \c SetCbArg function
* is not shown here; see `src/core/example/ command-line-example.cc`)
* is not shown here; see `src/core/example/``command-line-example.cc`)
*
* Here is the output from a few runs of that program:
*
* \code
* $ ./waf --run="command-line-example"
* intArg: 1
* boolArg: false
* strArg: "strArg default"
* cbArg: "cbArg default"
*
* $ ./waf --run="command-line-example --intArg=2 --boolArg --strArg=Hello --cbArg=World"
* intArg: 2
* boolArg: true
* strArg: "Hello"
* cbArg: "World"
*
* $ ./waf --run="command-line-example --help"
* ns3-dev-command-line-example-debug [Program Arguments] [General Arguments]
*
* CommandLine example program.
*
* This little program demonstrates how to use CommandLine.
*
* Program Arguments:
* --intArg: an int argument [1]
* --boolArg: a bool argument [false]
* --strArg: a string argument [strArg default]
* --cbArg: a string via callback
*
* General Arguments:
* --PrintGlobals: Print the list of globals.
* --PrintGroups: Print the list of groups.
* --PrintGroup=[group]: Print all TypeIds of group.
* --PrintTypeIds: Print all TypeIds.
* --PrintAttributes=[typeid]: Print all attributes of typeid.
* --PrintHelp: Print this help message.
* \endcode
* \verbatim
$ ./waf --run="command-line-example"
intArg: 1
boolArg: false
strArg: "strArg default"
cbArg: "cbArg default"
$ ./waf --run="command-line-example --intArg=2 --boolArg --strArg=Hello --cbArg=World"
intArg: 2
boolArg: true
strArg: "Hello"
cbArg: "World"
$ ./waf --run="command-line-example --help"
ns3-dev-command-line-example-debug [Program Arguments] [General Arguments]
CommandLine example program.
This little program demonstrates how to use CommandLine.
Program Arguments:
--intArg: an int argument [1]
--boolArg: a bool argument [false]
--strArg: a string argument [strArg default]
--anti: Set this RNG stream to generate antithetic values (ns3::RandomVariableStream::Antithetic) [false]
--cbArg: a string via callback
General Arguments:
--PrintGlobals: Print the list of globals.
--PrintGroups: Print the list of groups.
--PrintGroup=[group]: Print all TypeIds of group.
--PrintTypeIds: Print all TypeIds.
--PrintAttributes=[typeid]: Print all attributes of typeid.
--PrintHelp: Print this help message. \endverbatim
*
* Having parsed the arguments, some programs will need to perform
* some additional validation of the received values. A common issue at this
@@ -216,7 +235,6 @@ public:
const std::string &help,
T &value);
/**
* Add a program argument, using a Callback to parse the value
*
@@ -232,6 +250,15 @@ public:
const std::string &help,
Callback<bool, std::string> callback);
/**
* Add a program argument as a shorthand for an Attribute.
*
* \param name the name of the program-supplied argument.
* \param attributePath the fully-qualified name of the Attribute
*/
void AddValue (const std::string &name,
const std::string &attributePath);
/**
* Parse the program arguments
*
@@ -348,6 +375,15 @@ private:
* \param value the command line value
*/
void HandleArgument (const std::string &name, const std::string &value) const;
/**
* Callback function to handle attributes.
*
* \param name The full name of the Attribute.
* \param value The value to assign to \p name.
* \return true if the value was set successfully, false otherwise.
*/
static bool HandleAttribute (const std::string name, const std::string value);
/** Handler for \c \-\-PrintGlobals: print all global variables and values */
void PrintGlobals (std::ostream &os) const;
/**
+49 -39
View File
@@ -403,52 +403,62 @@ Resolver::DoResolve (std::string path, Ptr<Object> root)
else
{
// this is a normal attribute.
TypeId tid = root->GetInstanceTypeId ();
TypeId tid;
TypeId nextTid = root->GetInstanceTypeId ();
bool foundMatch = false;
for (uint32_t i = 0; i < tid.GetAttributeN(); i++)
do
{
struct TypeId::AttributeInformation info;
info = tid.GetAttribute(i);
if (info.name != item && item != "*")
tid = nextTid;
for (uint32_t i = 0; i < tid.GetAttributeN(); i++)
{
continue;
}
// attempt to cast to a pointer checker.
const PointerChecker *ptr = dynamic_cast<const PointerChecker *> (PeekPointer (info.checker));
if (ptr != 0)
{
NS_LOG_DEBUG ("GetAttribute(ptr)="<<info.name<<" on path="<<GetResolvedPath ());
PointerValue ptr;
root->GetAttribute (info.name, ptr);
Ptr<Object> object = ptr.Get<Object> ();
if (object == 0)
struct TypeId::AttributeInformation info;
info = tid.GetAttribute(i);
if (info.name != item && item != "*")
{
NS_LOG_ERROR ("Requested object name=\""<<item<<
"\" exists on path=\""<<GetResolvedPath ()<<"\""
" but is null.");
continue;
}
foundMatch = true;
m_workStack.push_back (info.name);
DoResolve (pathLeft, object);
m_workStack.pop_back ();
// attempt to cast to a pointer checker.
const PointerChecker *ptr = dynamic_cast<const PointerChecker *> (PeekPointer (info.checker));
if (ptr != 0)
{
NS_LOG_DEBUG ("GetAttribute(ptr)="<<info.name<<" on path="<<GetResolvedPath ());
PointerValue ptr;
root->GetAttribute (info.name, ptr);
Ptr<Object> object = ptr.Get<Object> ();
if (object == 0)
{
NS_LOG_ERROR ("Requested object name=\""<<item<<
"\" exists on path=\""<<GetResolvedPath ()<<"\""
" but is null.");
continue;
}
foundMatch = true;
m_workStack.push_back (info.name);
DoResolve (pathLeft, object);
m_workStack.pop_back ();
}
// attempt to cast to an object vector.
const ObjectPtrContainerChecker *vectorChecker =
dynamic_cast<const ObjectPtrContainerChecker *> (PeekPointer (info.checker));
if (vectorChecker != 0)
{
NS_LOG_DEBUG ("GetAttribute(vector)="<<info.name<<" on path="<<GetResolvedPath () << pathLeft);
foundMatch = true;
ObjectPtrContainerValue vector;
root->GetAttribute (info.name, vector);
m_workStack.push_back (info.name);
DoArrayResolve (pathLeft, vector);
m_workStack.pop_back ();
}
// this could be anything else and we don't know what to do with it.
// So, we just ignore it.
}
// attempt to cast to an object vector.
const ObjectPtrContainerChecker *vectorChecker =
dynamic_cast<const ObjectPtrContainerChecker *> (PeekPointer (info.checker));
if (vectorChecker != 0)
{
NS_LOG_DEBUG ("GetAttribute(vector)="<<info.name<<" on path="<<GetResolvedPath () << pathLeft);
foundMatch = true;
ObjectPtrContainerValue vector;
root->GetAttribute (info.name, vector);
m_workStack.push_back (info.name);
DoArrayResolve (pathLeft, vector);
m_workStack.pop_back ();
}
// this could be anything else and we don't know what to do with it.
// So, we just ignore it.
}
nextTid = tid.GetParent ();
} while (nextTid != tid);
if (!foundMatch)
{
NS_LOG_DEBUG ("Requested item="<<item<<" does not exist on path="<<GetResolvedPath ());
+1
View File
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <cmath> // pow
#include <utility> // pair
namespace ns3 {
+25 -6
View File
@@ -87,10 +87,11 @@
#ifndef NS_LOG_APPEND_CONTEXT
/**
* \ingroup logging
* Append the node id to a log message.
* Append the node id (or other file-local programatic context, such as
* MPI rank) to a log message.
*
* This is implemented locally in `.cc` files because
* the the relevant variable is only known there.
* the relevant variable is only known there.
*
* Preferred format is something like (assuming the node id is
* accessible from `var`:
@@ -100,15 +101,29 @@
* std::clog << "[node " << var->GetObject<Node> ()->GetId () << "] ";
* }
* \endcode
*
* \internal
* Logging implementation macro; should not be called directly.
*
*/
#define NS_LOG_APPEND_CONTEXT
#endif /* NS_LOG_APPEND_CONTEXT */
#ifndef NS_LOG_CONDITION
/**
* \ingroup logging
* Limit logging output based on some file-local condition,
* such as MPI rank.
*
* This is implemented locally in `.cc` files because
* the relevant condition variable is only known there.
*
* Since this appears immediately before the `do { ... } while false`
* construct of \c NS_LOG(level, msg), it must have the form
* \code
* #define NS_LOG_CONDITION if (condition)
* \endcode
*/
#define NS_LOG_CONDITION
#endif
/**
* \ingroup logging
*
@@ -129,6 +144,7 @@
* Logging implementation macro; should not be called directly.
*/
#define NS_LOG(level, msg) \
NS_LOG_CONDITION \
do \
{ \
if (g_log.IsEnabled (level)) \
@@ -152,6 +168,7 @@
* should instead use NS_LOG_FUNCTION().
*/
#define NS_LOG_FUNCTION_NOARGS() \
NS_LOG_CONDITION \
do \
{ \
if (g_log.IsEnabled (ns3::LOG_FUNCTION)) \
@@ -188,6 +205,7 @@
* \param parameters the parameters to output.
*/
#define NS_LOG_FUNCTION(parameters) \
NS_LOG_CONDITION \
do \
{ \
if (g_log.IsEnabled (ns3::LOG_FUNCTION)) \
@@ -212,6 +230,7 @@
* \param msg the message to log
*/
#define NS_LOG_UNCOND(msg) \
NS_LOG_CONDITION \
do \
{ \
std::clog << msg << std::endl; \
+10 -1
View File
@@ -55,7 +55,16 @@ ComponentList *GetComponentList (void)
return &components;
}
std::vector<std::string>
GetLogComponents()
{
std::vector<std::string> retval;
for (ComponentList::const_iterator i = GetComponentList()->begin(); i != GetComponentList()->end(); ++i)
{
retval.push_back(i->first);
}
return retval;
}
PrintList::PrintList ()
{
+10
View File
@@ -25,6 +25,7 @@
#include <iostream>
#include <stdint.h>
#include <map>
#include <vector>
#include "log-macros-enabled.h"
#include "log-macros-disabled.h"
@@ -245,6 +246,15 @@ namespace ns3 {
*/
void LogComponentPrintList (void);
/**
* \ingroup logging
*
* Get the list of available logging components that can be used with
* the NS_LOG environment variable
*/
std::vector<std::string>
GetLogComponents();
typedef void (*LogTimePrinter)(std::ostream &os);
typedef void (*LogNodePrinter)(std::ostream &os);
+360 -439
View File
File diff suppressed because it is too large. Load diff
+21 -5
View File
@@ -75,13 +75,29 @@ ObjectBase::ConstructSelf (const AttributeConstructionList &attributes)
struct TypeId::AttributeInformation info = tid.GetAttribute(i);
NS_LOG_DEBUG ("try to construct \""<< tid.GetName ()<<"::"<<
info.name <<"\"");
if (!(info.flags & TypeId::ATTR_CONSTRUCT))
{
continue;
}
bool found = false;
// is this attribute stored in this AttributeConstructionList instance ?
Ptr<AttributeValue> value = attributes.Find(info.checker);
// See if this attribute should not be set here in the
// constructor.
if (!(info.flags & TypeId::ATTR_CONSTRUCT))
{
// Handle this attribute if it should not be
// set here.
if (value == 0)
{
// Skip this attribute if it's not in the
// AttributeConstructionList.
continue;
}
else
{
// This is an error because this attribute is not
// settable in its constructor but is present in
// the AttributeConstructionList.
NS_FATAL_ERROR ("Attribute name="<<info.name<<" tid="<<tid.GetName () << ": initial value cannot be set using attributes");
}
}
bool found = false;
if (value != 0)
{
// We have a matching attribute value.
+1 -1
View File
@@ -184,7 +184,7 @@ UniformRandomVariable::GetInteger (uint32_t min, uint32_t max)
{
NS_LOG_FUNCTION (this << min << max);
NS_ASSERT (min <= max);
return static_cast<uint32_t> ( GetValue (min, max + 1) );
return static_cast<uint32_t> ( GetValue ((double) (min), (double) (max) + 1.0) );
}
double
+184
View File
@@ -733,6 +733,31 @@
} \
} while (false)
/**
* \ingroup testing
* \brief Test that an actual value is less than or equal to a limit and report
* and abort if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_LT_OR_EQ_INTERNAL(actual, limit, msg, file, line) \
do { \
if (!((actual) <= (limit))) \
{ \
ASSERT_ON_FAILURE; \
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); \
CONTINUE_ON_FAILURE; \
} \
} while (false)
/**
* \ingroup testing
*
@@ -753,6 +778,26 @@
#define NS_TEST_ASSERT_MSG_LT(actual, limit, msg) \
NS_TEST_ASSERT_MSG_LT_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
* \ingroup testing
*
* \brief Test that an actual value is less than or equal to a limit and
* report and abort if not.
*
* Check to see if the actual value found in a test case is less than or equal
* to the limit value. If the actual value is lesser or equal nothing happens,
* but if the check fails, an error is reported in a consistent way and the
* execution of the current test case is aborted.
*
* The message is interpreted as a stream.
*
* \param actual Expression for the actual value found during the test.
* \param limit Expression for the limit value of the test.
* \param msg Message that is output if the test does not pass.
*/
#define NS_TEST_ASSERT_MSG_LT_OR_EQ(actual, limit, msg) \
NS_TEST_ASSERT_MSG_LT_OR_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
* \ingroup testing
* \brief Test that an actual value is less than a limit and report if not.
@@ -779,6 +824,33 @@
} \
} while (false)
/**
* \ingroup testing
* \brief Test that an actual value is less than or equal to a limit and report
* if not.
*
* Required to avoid use of return statement which allows use in methods
* (callbacks) returning void.
* \internal
*/
#define NS_TEST_EXPECT_MSG_LT_OR_EQ_INTERNAL(actual, limit, msg, file, line) \
do { \
if (!((actual) <= (limit))) \
{ \
ASSERT_ON_FAILURE; \
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)
/**
* \ingroup testing
*
@@ -798,6 +870,26 @@
#define NS_TEST_EXPECT_MSG_LT(actual, limit, msg) \
NS_TEST_EXPECT_MSG_LT_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
* \ingroup testing
*
* \brief Test that an actual value is less than or equal to a limit and report
* if not.
*
* Check to see if the actual value found in a test case is less than or equal to
* the limit value. If the actual value is lesser or equal nothing happens, but
* if the check fails, an error is reported in a consistent way. EXPECT* macros
* do not return if an error is detected.
*
* The message is interpreted as a stream.
*
* \param actual Expression for the actual value found during the test.
* \param limit Expression for the limit value of the test.
* \param msg Message that is output if the test does not pass.
*/
#define NS_TEST_EXPECT_MSG_LT_OR_EQ(actual, limit, msg) \
NS_TEST_EXPECT_MSG_LT_OR_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
// ===========================================================================
// Test for greater than relation
// ===========================================================================
@@ -827,6 +919,31 @@
} \
} while (false)
/**
* \ingroup testing
* \brief Test that an actual value is greater than or equal to a limit and
* report and abort if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_GT_OR_EQ_INTERNAL(actual, limit, msg, file, line) \
do { \
if (!((actual) >= (limit))) \
{ \
ASSERT_ON_FAILURE; \
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); \
CONTINUE_ON_FAILURE; \
} \
} while (false)
/**
* \ingroup testing
*
@@ -847,6 +964,26 @@
#define NS_TEST_ASSERT_MSG_GT(actual, limit, msg) \
NS_TEST_ASSERT_MSG_GT_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
* \ingroup testing
*
* \brief Test that an actual value is greater than or equal to a limit and
* report and abort if not.
*
* Check to see if the actual value found in a test case is greater than or
* equal to the limit value. If the actual value is greater nothing happens, but
* if the check fails, an error is reported in a consistent way and the execution
* of the current test case is aborted.
*
* The message is interpreted as a stream.
*
* \param actual Expression for the actual value found during the test.
* \param limit Expression for the limit value of the test.
* \param msg Message that is output if the test does not pass.
*/
#define NS_TEST_ASSERT_MSG_GT_OR_EQ(actual, limit, msg) \
NS_TEST_ASSERT_MSG_GT_OR_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
* \ingroup testing
* \brief Test that an actual value is greater than a limit and report if not.
@@ -873,6 +1010,33 @@
} \
} while (false)
/**
* \ingroup testing
* \brief Test that an actual value is greater than a or equal to limit and
* report if not.
*
* Required to avoid use of return statement which allows use in methods
* (callbacks) returning void.
* \internal
*/
#define NS_TEST_EXPECT_MSG_GT_OR_EQ_INTERNAL(actual, limit, msg, file, line) \
do { \
if (!((actual) >= (limit))) \
{ \
ASSERT_ON_FAILURE; \
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)
/**
* \ingroup testing
*
@@ -892,6 +1056,26 @@
#define NS_TEST_EXPECT_MSG_GT(actual, limit, msg) \
NS_TEST_EXPECT_MSG_GT_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
* \ingroup testing
*
* \brief Test that an actual value is greater than or equal to limit and report
* if not.
*
* Check to see if the actual value found in a test case is greater than or
* equal to the limit value. If the actual value is greater nothing happens,
* but if the check fails, an error is reported in a consistent way. EXPECT* macros do
* not return if an error is detected.
*
* The message is interpreted as a stream.
*
* \param actual Expression for the actual value found during the test.
* \param limit Expression for the limit value of the test.
* \param msg Message that is output if the test does not pass.
*/
#define NS_TEST_EXPECT_MSG_GT_OR_EQ(actual, limit, msg) \
NS_TEST_EXPECT_MSG_GT_OR_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
namespace ns3 {
/**
+6 -3
View File
@@ -44,6 +44,8 @@ Time::MarkedTimes * Time::g_markingTimes = 0;
* \internal
* Get mutex for critical sections around modification of Time::g_markingTimes
*
* \returns The static mutex to control access to Time::g_markingTimes.
*
* \relates Time
*/
SystemMutex &
@@ -387,8 +389,8 @@ Time::As (const enum Unit unit) const
}
std::ostream&
operator<< (std::ostream& os, const Time & time)
std::ostream &
operator << (std::ostream & os, const Time & time)
{
os << time.As (Time::GetResolution ());
return os;
@@ -427,7 +429,8 @@ operator << (std::ostream & os, const TimeWithUnit & timeU)
}
std::istream& operator>> (std::istream& is, Time & time)
std::istream &
operator >> (std::istream & is, Time & time)
{
std::string value;
is >> value;
+115
View File
@@ -138,6 +138,68 @@ ConfigTestObject::GetB (void) const
return m_b;
}
// Other test objects
//
class DerivedConfigTestObject : public ConfigTestObject
{
public:
static TypeId GetTypeId (void);
DerivedConfigTestObject (void) {}
virtual ~DerivedConfigTestObject (void) {}
};
TypeId
DerivedConfigTestObject::GetTypeId (void)
{
static TypeId tid = TypeId ("DerivedConfigTestObject")
.SetParent<ConfigTestObject> ()
;
return tid;
}
class BaseConfigObject : public Object
{
public:
static TypeId GetTypeId (void);
BaseConfigObject (void) : m_x(15) {}
virtual ~BaseConfigObject (void) {}
private:
int8_t m_x;
void Increment (void) { m_x++; } // silence unused variable warning
};
TypeId
BaseConfigObject::GetTypeId (void)
{
static TypeId tid = TypeId ("BaseConfigObject")
.SetParent<Object> ()
.AddAttribute ("X", "",
IntegerValue (10),
MakeIntegerAccessor (&BaseConfigObject::m_x),
MakeIntegerChecker<int8_t> ())
;
return tid;
}
class DerivedConfigObject : public BaseConfigObject
{
public:
static TypeId GetTypeId (void);
DerivedConfigObject (void) {}
virtual ~DerivedConfigObject (void) {}
};
TypeId
DerivedConfigObject::GetTypeId (void)
{
static TypeId tid = TypeId ("DerivedConfigObject")
.SetParent<BaseConfigObject> ()
;
return tid;
}
// ===========================================================================
// Test for the ability to register and use a root namespace
// ===========================================================================
@@ -606,6 +668,58 @@ ObjectVectorTraceConfigTestCase::DoRun (void)
NS_TEST_ASSERT_MSG_EQ (m_path, "/NodeA/NodeB/NodesB/1/Source", "Trace 1 did not provide expected context");
}
// ===========================================================================
// Test for the ability to search attributes of parent classes
// when Resolver searches for attributes in a derived class object.
// This test passes with the patch found in
// https://www.nsnam.org/bugzilla/show_bug.cgi?id=1673
// (also reported in https://www.nsnam.org/bugzilla/show_bug.cgi?id=1959)
// ===========================================================================
class SearchAttributesOfParentObjectsTestCase : public TestCase
{
public:
SearchAttributesOfParentObjectsTestCase ();
virtual ~SearchAttributesOfParentObjectsTestCase () {}
private:
virtual void DoRun (void);
};
SearchAttributesOfParentObjectsTestCase::SearchAttributesOfParentObjectsTestCase ()
: TestCase ("Check that attributes of base class are searchable from paths including objects of derived class")
{
}
void
SearchAttributesOfParentObjectsTestCase::DoRun (void)
{
IntegerValue iv;
//
// Create a root namespace object that doesn't have attributes but
// whose parent class has 'NodeA' attribute
//
Ptr<DerivedConfigTestObject> root = CreateObject<DerivedConfigTestObject> ();
Config::RegisterRootNamespaceObject (root);
//
// Instantiate /NodeA
//
Ptr<DerivedConfigTestObject> a = CreateObject<DerivedConfigTestObject> ();
root->SetNodeA (a);
//
// BaseConfigObject has attribute X, but we aggregate DerivedConfigObject
// instead
//
Ptr<DerivedConfigObject> derived = CreateObject<DerivedConfigObject> ();
a->AggregateObject (derived);
Config::Set ("/NodeA/$DerivedConfigObject/X", IntegerValue (42));
derived->GetAttribute ("X", iv);
NS_TEST_ASSERT_MSG_EQ (iv.Get (), 42, "Object Attribute \"X\" not settable in derived class");
}
// ===========================================================================
// The Test Suite that glues all of the Test Cases together.
// ===========================================================================
@@ -621,6 +735,7 @@ ConfigTestSuite::ConfigTestSuite ()
AddTestCase (new RootNamespaceConfigTestCase, TestCase::QUICK);
AddTestCase (new UnderRootNamespaceConfigTestCase, TestCase::QUICK);
AddTestCase (new ObjectVectorConfigTestCase, TestCase::QUICK);
AddTestCase (new SearchAttributesOfParentObjectsTestCase, TestCase::QUICK);
}
static ConfigTestSuite configTestSuite;
@@ -162,6 +162,40 @@ RandomVariableStreamUniformTestCase::DoRun (void)
NS_TEST_ASSERT_MSG_LT (value, max, "Value greater than or equal to maximum.");
}
// Boundary checking on GetInteger; should be [min,max]; from bug 1964
static const uint32_t UNIFORM_INTEGER_MIN = 0;
static const uint32_t UNIFORM_INTEGER_MAX = 4294967295U;
// [0,0] should return 0
uint32_t intValue;
intValue = x->GetInteger (UNIFORM_INTEGER_MIN, UNIFORM_INTEGER_MIN);
NS_TEST_ASSERT_MSG_EQ (intValue, UNIFORM_INTEGER_MIN, "Uniform RV GetInteger boundary testing");
// [UNIFORM_INTEGER_MAX, UNIFORM_INTEGER_MAX] should return UNIFORM_INTEGER_MAX
intValue = x->GetInteger (UNIFORM_INTEGER_MAX, UNIFORM_INTEGER_MAX);
NS_TEST_ASSERT_MSG_EQ (intValue, UNIFORM_INTEGER_MAX, "Uniform RV GetInteger boundary testing");
// [0,1] should return mix of 0 or 1
intValue = 0;
for (int i = 0; i < 20; i++)
{
intValue += x->GetInteger (UNIFORM_INTEGER_MIN, UNIFORM_INTEGER_MIN + 1);
}
NS_TEST_ASSERT_MSG_GT (intValue, 0, "Uniform RV GetInteger boundary testing");
NS_TEST_ASSERT_MSG_LT (intValue, 20, "Uniform RV GetInteger boundary testing");
// [MAX-1,MAX] should return mix of MAX-1 or MAX
uint32_t count = 0;
for (int i = 0; i < 20; i++)
{
intValue = x->GetInteger (UNIFORM_INTEGER_MAX - 1, UNIFORM_INTEGER_MAX);
if (intValue == UNIFORM_INTEGER_MAX)
{
count++;
}
}
NS_TEST_ASSERT_MSG_GT (count, 0, "Uniform RV GetInteger boundary testing");
NS_TEST_ASSERT_MSG_LT (count, 20, "Uniform RV GetInteger boundary testing");
// multiple [0,UNIFORM_INTEGER_MAX] should return non-zero
intValue = x->GetInteger (UNIFORM_INTEGER_MIN, UNIFORM_INTEGER_MAX);
uint32_t intValue2 = x->GetInteger (UNIFORM_INTEGER_MIN, UNIFORM_INTEGER_MAX);
NS_TEST_ASSERT_MSG_GT (intValue + intValue2, 0, "Uniform RV GetInteger boundary testing");
}
@@ -137,7 +137,7 @@ def register_types(module):
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
module.add_class('PcapHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
## internet-trace-helper.h (module 'internet'): ns3::PcapHelperForIpv4 [class]
@@ -152,6 +152,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -295,7 +297,7 @@ def register_types(module):
## ipv6-l3-protocol.h (module 'internet'): ns3::Ipv6L3Protocol [class]
module.add_class('Ipv6L3Protocol', import_from_module='ns.internet', parent=root_module['ns3::Ipv6'])
## ipv6-l3-protocol.h (module 'internet'): ns3::Ipv6L3Protocol::DropReason [enumeration]
module.add_enum('DropReason', ['DROP_TTL_EXPIRED', 'DROP_NO_ROUTE', 'DROP_INTERFACE_DOWN', 'DROP_ROUTE_ERROR', 'DROP_UNKNOWN_PROTOCOL'], outer_class=root_module['ns3::Ipv6L3Protocol'], import_from_module='ns.internet')
module.add_enum('DropReason', ['DROP_TTL_EXPIRED', 'DROP_NO_ROUTE', 'DROP_INTERFACE_DOWN', 'DROP_ROUTE_ERROR', 'DROP_UNKNOWN_PROTOCOL', 'DROP_UNKNOWN_OPTION', 'DROP_MALFORMED_HEADER', 'DROP_FRAGMENT_TIMEOUT'], outer_class=root_module['ns3::Ipv6L3Protocol'], import_from_module='ns.internet')
## ipv6-pmtu-cache.h (module 'internet'): ns3::Ipv6PmtuCache [class]
module.add_class('Ipv6PmtuCache', import_from_module='ns.internet', parent=root_module['ns3::Object'])
## ipv6-address.h (module 'network'): ns3::Ipv6PrefixChecker [class]
@@ -432,6 +434,7 @@ def register_methods(root_module):
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -2148,6 +2151,11 @@ def register_Ns3Ipv6InterfaceAddress_methods(root_module, cls):
'ns3::Ipv6InterfaceAddress::State_e',
[],
is_const=True)
## ipv6-interface-address.h (module 'internet'): bool ns3::Ipv6InterfaceAddress::IsInSameSubnet(ns3::Ipv6Address b) const [member function]
cls.add_method('IsInSameSubnet',
'bool',
[param('ns3::Ipv6Address', 'b')],
is_const=True)
## ipv6-interface-address.h (module 'internet'): void ns3::Ipv6InterfaceAddress::SetAddress(ns3::Ipv6Address address) [member function]
cls.add_method('SetAddress',
'void',
@@ -3112,6 +3120,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -4796,34 +4812,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -4940,20 +4961,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -5675,6 +5696,11 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
'bool',
[param('uint32_t', 'i')],
is_const=True, is_virtual=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUnicast(ns3::Ipv4Address ad) const [member function]
cls.add_method('IsUnicast',
'bool',
[param('ns3::Ipv4Address', 'ad')],
is_const=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function]
cls.add_method('IsUp',
'bool',
@@ -6103,6 +6129,11 @@ def register_Ns3Ipv6_methods(root_module, cls):
'void',
[param('uint32_t', 'interface')],
is_pure_virtual=True, is_virtual=True)
## ipv6.h (module 'internet'): ns3::Ipv6Address ns3::Ipv6::SourceAddressSelection(uint32_t interface, ns3::Ipv6Address dest) [member function]
cls.add_method('SourceAddressSelection',
'ns3::Ipv6Address',
[param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'dest')],
is_pure_virtual=True, is_virtual=True)
## ipv6.h (module 'internet'): ns3::Ipv6::IF_ANY [variable]
cls.add_static_attribute('IF_ANY', 'uint32_t const', is_const=True)
## ipv6.h (module 'internet'): bool ns3::Ipv6::GetIpForward() const [member function]
@@ -6328,6 +6359,11 @@ def register_Ns3Ipv6L3Protocol_methods(root_module, cls):
'void',
[param('uint32_t', 'i'), param('bool', 'val')],
is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): ns3::Ipv6Address ns3::Ipv6L3Protocol::SourceAddressSelection(uint32_t interface, ns3::Ipv6Address dest) [member function]
cls.add_method('SourceAddressSelection',
'ns3::Ipv6Address',
[param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'dest')],
is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): ns3::Ptr<ns3::NetDevice> ns3::Ipv6L3Protocol::GetNetDevice(uint32_t i) [member function]
cls.add_method('GetNetDevice',
'ns3::Ptr< ns3::NetDevice >',
@@ -6356,6 +6392,11 @@ def register_Ns3Ipv6L3Protocol_methods(root_module, cls):
'void',
[],
is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): void ns3::Ipv6L3Protocol::ReportDrop(ns3::Ipv6Header ipHeader, ns3::Ptr<ns3::Packet> p, ns3::Ipv6L3Protocol::DropReason dropReason) [member function]
cls.add_method('ReportDrop',
'void',
[param('ns3::Ipv6Header', 'ipHeader'), param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6L3Protocol::DropReason', 'dropReason')],
is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): void ns3::Ipv6L3Protocol::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
@@ -6963,10 +7004,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3TimeValue_methods(root_module, cls):
+62 -21
View File
@@ -137,7 +137,7 @@ def register_types(module):
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
module.add_class('PcapHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
## internet-trace-helper.h (module 'internet'): ns3::PcapHelperForIpv4 [class]
@@ -152,6 +152,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -295,7 +297,7 @@ def register_types(module):
## ipv6-l3-protocol.h (module 'internet'): ns3::Ipv6L3Protocol [class]
module.add_class('Ipv6L3Protocol', import_from_module='ns.internet', parent=root_module['ns3::Ipv6'])
## ipv6-l3-protocol.h (module 'internet'): ns3::Ipv6L3Protocol::DropReason [enumeration]
module.add_enum('DropReason', ['DROP_TTL_EXPIRED', 'DROP_NO_ROUTE', 'DROP_INTERFACE_DOWN', 'DROP_ROUTE_ERROR', 'DROP_UNKNOWN_PROTOCOL'], outer_class=root_module['ns3::Ipv6L3Protocol'], import_from_module='ns.internet')
module.add_enum('DropReason', ['DROP_TTL_EXPIRED', 'DROP_NO_ROUTE', 'DROP_INTERFACE_DOWN', 'DROP_ROUTE_ERROR', 'DROP_UNKNOWN_PROTOCOL', 'DROP_UNKNOWN_OPTION', 'DROP_MALFORMED_HEADER', 'DROP_FRAGMENT_TIMEOUT'], outer_class=root_module['ns3::Ipv6L3Protocol'], import_from_module='ns.internet')
## ipv6-pmtu-cache.h (module 'internet'): ns3::Ipv6PmtuCache [class]
module.add_class('Ipv6PmtuCache', import_from_module='ns.internet', parent=root_module['ns3::Object'])
## ipv6-address.h (module 'network'): ns3::Ipv6PrefixChecker [class]
@@ -432,6 +434,7 @@ def register_methods(root_module):
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -2148,6 +2151,11 @@ def register_Ns3Ipv6InterfaceAddress_methods(root_module, cls):
'ns3::Ipv6InterfaceAddress::State_e',
[],
is_const=True)
## ipv6-interface-address.h (module 'internet'): bool ns3::Ipv6InterfaceAddress::IsInSameSubnet(ns3::Ipv6Address b) const [member function]
cls.add_method('IsInSameSubnet',
'bool',
[param('ns3::Ipv6Address', 'b')],
is_const=True)
## ipv6-interface-address.h (module 'internet'): void ns3::Ipv6InterfaceAddress::SetAddress(ns3::Ipv6Address address) [member function]
cls.add_method('SetAddress',
'void',
@@ -3112,6 +3120,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -4796,34 +4812,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -4940,20 +4961,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -5675,6 +5696,11 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
'bool',
[param('uint32_t', 'i')],
is_const=True, is_virtual=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUnicast(ns3::Ipv4Address ad) const [member function]
cls.add_method('IsUnicast',
'bool',
[param('ns3::Ipv4Address', 'ad')],
is_const=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function]
cls.add_method('IsUp',
'bool',
@@ -6103,6 +6129,11 @@ def register_Ns3Ipv6_methods(root_module, cls):
'void',
[param('uint32_t', 'interface')],
is_pure_virtual=True, is_virtual=True)
## ipv6.h (module 'internet'): ns3::Ipv6Address ns3::Ipv6::SourceAddressSelection(uint32_t interface, ns3::Ipv6Address dest) [member function]
cls.add_method('SourceAddressSelection',
'ns3::Ipv6Address',
[param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'dest')],
is_pure_virtual=True, is_virtual=True)
## ipv6.h (module 'internet'): ns3::Ipv6::IF_ANY [variable]
cls.add_static_attribute('IF_ANY', 'uint32_t const', is_const=True)
## ipv6.h (module 'internet'): bool ns3::Ipv6::GetIpForward() const [member function]
@@ -6328,6 +6359,11 @@ def register_Ns3Ipv6L3Protocol_methods(root_module, cls):
'void',
[param('uint32_t', 'i'), param('bool', 'val')],
is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): ns3::Ipv6Address ns3::Ipv6L3Protocol::SourceAddressSelection(uint32_t interface, ns3::Ipv6Address dest) [member function]
cls.add_method('SourceAddressSelection',
'ns3::Ipv6Address',
[param('uint32_t', 'interface'), param('ns3::Ipv6Address', 'dest')],
is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): ns3::Ptr<ns3::NetDevice> ns3::Ipv6L3Protocol::GetNetDevice(uint32_t i) [member function]
cls.add_method('GetNetDevice',
'ns3::Ptr< ns3::NetDevice >',
@@ -6356,6 +6392,11 @@ def register_Ns3Ipv6L3Protocol_methods(root_module, cls):
'void',
[],
is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): void ns3::Ipv6L3Protocol::ReportDrop(ns3::Ipv6Header ipHeader, ns3::Ptr<ns3::Packet> p, ns3::Ipv6L3Protocol::DropReason dropReason) [member function]
cls.add_method('ReportDrop',
'void',
[param('ns3::Ipv6Header', 'ipHeader'), param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6L3Protocol::DropReason', 'dropReason')],
is_virtual=True)
## ipv6-l3-protocol.h (module 'internet'): void ns3::Ipv6L3Protocol::DoDispose() [member function]
cls.add_method('DoDispose',
'void',
@@ -6963,10 +7004,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3TimeValue_methods(root_module, cls):
+1 -1
View File
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_module('csma-layout', ['csma', 'network', 'applications', 'netanim', 'point-to-point'])
obj = bld.create_ns3_module('csma-layout', ['csma', 'network', 'internet'])
obj.source = [
'model/csma-star-helper.cc',
]
+38 -22
View File
@@ -109,7 +109,7 @@ def register_types(module):
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
module.add_class('PcapHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -120,6 +120,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -389,6 +391,7 @@ def register_methods(root_module):
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -2479,6 +2482,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -3340,34 +3351,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -3484,20 +3500,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -4228,10 +4244,10 @@ def register_Ns3ErrorModel_methods(root_module, cls):
cls.add_method('Reset',
'void',
[])
## error-model.h (module 'network'): bool ns3::ErrorModel::DoCorrupt(ns3::Ptr<ns3::Packet> arg0) [member function]
## error-model.h (module 'network'): bool ns3::ErrorModel::DoCorrupt(ns3::Ptr<ns3::Packet> p) [member function]
cls.add_method('DoCorrupt',
'bool',
[param('ns3::Ptr< ns3::Packet >', 'arg0')],
[param('ns3::Ptr< ns3::Packet >', 'p')],
is_pure_virtual=True, visibility='private', is_virtual=True)
## error-model.h (module 'network'): void ns3::ErrorModel::DoReset() [member function]
cls.add_method('DoReset',
@@ -5145,10 +5161,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
+38 -22
View File
@@ -109,7 +109,7 @@ def register_types(module):
## trace-helper.h (module 'network'): ns3::PcapHelper [class]
module.add_class('PcapHelper', import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelper [enumeration]
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
module.add_enum('', ['DLT_NULL', 'DLT_EN10MB', 'DLT_PPP', 'DLT_RAW', 'DLT_IEEE802_11', 'DLT_PRISM_HEADER', 'DLT_IEEE802_11_RADIO', 'DLT_IEEE802_15_4'], outer_class=root_module['ns3::PcapHelper'], import_from_module='ns.network')
## trace-helper.h (module 'network'): ns3::PcapHelperForDevice [class]
module.add_class('PcapHelperForDevice', allow_subclassing=True, import_from_module='ns.network')
## simple-ref-count.h (module 'core'): ns3::SimpleRefCount<ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter> [class]
@@ -120,6 +120,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId [class]
module.add_class('TypeId', import_from_module='ns.core')
## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration]
@@ -389,6 +391,7 @@ def register_methods(root_module):
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
register_Ns3TypeIdAttributeInformation_methods(root_module, root_module['ns3::TypeId::AttributeInformation'])
register_Ns3TypeIdTraceSourceInformation_methods(root_module, root_module['ns3::TypeId::TraceSourceInformation'])
@@ -2479,6 +2482,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3TypeId_methods(root_module, cls):
cls.add_binary_comparison_operator('<')
cls.add_binary_comparison_operator('!=')
@@ -3340,34 +3351,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -3484,20 +3500,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -4228,10 +4244,10 @@ def register_Ns3ErrorModel_methods(root_module, cls):
cls.add_method('Reset',
'void',
[])
## error-model.h (module 'network'): bool ns3::ErrorModel::DoCorrupt(ns3::Ptr<ns3::Packet> arg0) [member function]
## error-model.h (module 'network'): bool ns3::ErrorModel::DoCorrupt(ns3::Ptr<ns3::Packet> p) [member function]
cls.add_method('DoCorrupt',
'bool',
[param('ns3::Ptr< ns3::Packet >', 'arg0')],
[param('ns3::Ptr< ns3::Packet >', 'p')],
is_pure_virtual=True, visibility='private', is_virtual=True)
## error-model.h (module 'network'): void ns3::ErrorModel::DoReset() [member function]
cls.add_method('DoReset',
@@ -5145,10 +5161,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
+5 -5
View File
@@ -1,19 +1,19 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('csma-one-subnet', ['csma', 'internet'])
obj = bld.create_ns3_program('csma-one-subnet', ['csma', 'internet', 'applications'])
obj.source = 'csma-one-subnet.cc'
obj = bld.create_ns3_program('csma-broadcast', ['csma', 'internet'])
obj = bld.create_ns3_program('csma-broadcast', ['csma', 'internet', 'applications'])
obj.source = 'csma-broadcast.cc'
obj = bld.create_ns3_program('csma-packet-socket', ['csma', 'internet'])
obj = bld.create_ns3_program('csma-packet-socket', ['csma', 'internet', 'applications'])
obj.source = 'csma-packet-socket.cc'
obj = bld.create_ns3_program('csma-multicast', ['csma', 'internet'])
obj = bld.create_ns3_program('csma-multicast', ['csma', 'internet', 'applications'])
obj.source = 'csma-multicast.cc'
obj = bld.create_ns3_program('csma-raw-ip-socket', ['csma', 'internet'])
obj = bld.create_ns3_program('csma-raw-ip-socket', ['csma', 'internet', 'applications'])
obj.source = 'csma-raw-ip-socket.cc'
obj = bld.create_ns3_program('csma-ping', ['csma', 'internet', 'applications'])
+1 -1
View File
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_module('csma', ['network', 'applications'])
obj = bld.create_ns3_module('csma', ['network'])
obj.source = [
'model/backoff.cc',
'model/csma-net-device.cc',
+40 -19
View File
@@ -136,6 +136,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer [class]
module.add_class('Timer', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer::DestroyPolicy [enumeration]
@@ -449,6 +451,7 @@ def register_methods(root_module):
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3Timer_methods(root_module, root_module['ns3::Timer'])
register_Ns3TimerImpl_methods(root_module, root_module['ns3::TimerImpl'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
@@ -2320,6 +2323,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3Timer_methods(root_module, cls):
## timer.h (module 'core'): ns3::Timer::Timer(ns3::Timer const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Timer const &', 'arg0')])
@@ -3851,34 +3862,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -3995,20 +4011,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -5079,6 +5095,11 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
'bool',
[param('uint32_t', 'i')],
is_const=True, is_virtual=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUnicast(ns3::Ipv4Address ad) const [member function]
cls.add_method('IsUnicast',
'bool',
[param('ns3::Ipv4Address', 'ad')],
is_const=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function]
cls.add_method('IsUp',
'bool',
@@ -6026,10 +6047,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
+40 -19
View File
@@ -136,6 +136,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer [class]
module.add_class('Timer', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer::DestroyPolicy [enumeration]
@@ -449,6 +451,7 @@ def register_methods(root_module):
register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3Timer_methods(root_module, root_module['ns3::Timer'])
register_Ns3TimerImpl_methods(root_module, root_module['ns3::TimerImpl'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
@@ -2320,6 +2323,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3Timer_methods(root_module, cls):
## timer.h (module 'core'): ns3::Timer::Timer(ns3::Timer const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Timer const &', 'arg0')])
@@ -3851,34 +3862,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -3995,20 +4011,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -5079,6 +5095,11 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
'bool',
[param('uint32_t', 'i')],
is_const=True, is_virtual=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUnicast(ns3::Ipv4Address ad) const [member function]
cls.add_method('IsUnicast',
'bool',
[param('ns3::Ipv4Address', 'ad')],
is_const=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function]
cls.add_method('IsUp',
'bool',
@@ -6026,10 +6047,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
+1 -1
View File
@@ -1,6 +1,6 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
obj = bld.create_ns3_program('dsdv-manet', ['wifi', 'internet', 'dsdv'])
obj = bld.create_ns3_program('dsdv-manet', ['wifi', 'internet', 'dsdv', 'applications'])
obj.source = 'dsdv-manet.cc'
+2 -2
View File
@@ -956,8 +956,8 @@ RoutingProtocol::NotifyInterfaceUp (uint32_t i)
Ptr<Socket> socket = Socket::CreateSocket (GetObject<Node> (),UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvDsdv,this));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), DSDV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
socket->SetAttribute ("IpTtl",UintegerValue (1));
m_socketAddresses.insert (std::make_pair (socket,iface));
@@ -1013,9 +1013,9 @@ RoutingProtocol::NotifyAddAddress (uint32_t i,
Ptr<Socket> socket = Socket::CreateSocket (GetObject<Node> (),UdpSocketFactory::GetTypeId ());
NS_ASSERT (socket != 0);
socket->SetRecvCallback (MakeCallback (&RoutingProtocol::RecvDsdv,this));
socket->BindToNetDevice (l3->GetNetDevice (i));
// Bind to any IP address so that broadcasts can be received
socket->Bind (InetSocketAddress (Ipv4Address::GetAny (), DSDV_PORT));
socket->BindToNetDevice (l3->GetNetDevice (i));
socket->SetAllowBroadcast (true);
m_socketAddresses.insert (std::make_pair (socket,iface));
Ptr<NetDevice> dev = m_ipv4->GetNetDevice (m_ipv4->GetInterfaceForAddress (iface.GetLocal ()));
+1 -1
View File
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
module = bld.create_ns3_module('dsdv', ['internet', 'wifi', 'mesh', 'applications'])
module = bld.create_ns3_module('dsdv', ['internet'])
module.includes = '.'
module.source = [
'model/dsdv-rtable.cc',
+89 -26
View File
@@ -164,6 +164,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer [class]
module.add_class('Timer', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer::DestroyPolicy [enumeration]
@@ -311,7 +313,7 @@ def register_types(module):
## wifi-phy.h (module 'wifi'): ns3::WifiPhy [class]
module.add_class('WifiPhy', import_from_module='ns.wifi', parent=root_module['ns3::Object'])
## wifi-phy.h (module 'wifi'): ns3::WifiPhy::State [enumeration]
module.add_enum('State', ['IDLE', 'CCA_BUSY', 'TX', 'RX', 'SWITCHING'], outer_class=root_module['ns3::WifiPhy'], import_from_module='ns.wifi')
module.add_enum('State', ['IDLE', 'CCA_BUSY', 'TX', 'RX', 'SWITCHING', 'SLEEP'], outer_class=root_module['ns3::WifiPhy'], import_from_module='ns.wifi')
## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationManager [class]
module.add_class('WifiRemoteStationManager', import_from_module='ns.wifi', parent=root_module['ns3::Object'])
## random-variable-stream.h (module 'core'): ns3::ZetaRandomVariable [class]
@@ -701,6 +703,7 @@ def register_methods(root_module):
register_Ns3SystemWallClockMs_methods(root_module, root_module['ns3::SystemWallClockMs'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3Timer_methods(root_module, root_module['ns3::Timer'])
register_Ns3TimerImpl_methods(root_module, root_module['ns3::TimerImpl'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
@@ -2090,6 +2093,11 @@ def register_Ns3Ipv6InterfaceAddress_methods(root_module, cls):
'ns3::Ipv6InterfaceAddress::State_e',
[],
is_const=True)
## ipv6-interface-address.h (module 'internet'): bool ns3::Ipv6InterfaceAddress::IsInSameSubnet(ns3::Ipv6Address b) const [member function]
cls.add_method('IsInSameSubnet',
'bool',
[param('ns3::Ipv6Address', 'b')],
is_const=True)
## ipv6-interface-address.h (module 'internet'): void ns3::Ipv6InterfaceAddress::SetAddress(ns3::Ipv6Address address) [member function]
cls.add_method('SetAddress',
'void',
@@ -2819,6 +2827,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3Timer_methods(root_module, cls):
## timer.h (module 'core'): ns3::Timer::Timer(ns3::Timer const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Timer const &', 'arg0')])
@@ -3183,15 +3199,25 @@ def register_Ns3WifiPhyListener_methods(root_module, cls):
'void',
[param('ns3::Time', 'duration')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifySleep() [member function]
cls.add_method('NotifySleep',
'void',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifySwitchingStart(ns3::Time duration) [member function]
cls.add_method('NotifySwitchingStart',
'void',
[param('ns3::Time', 'duration')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyTxStart(ns3::Time duration) [member function]
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyTxStart(ns3::Time duration, double txPowerDbm) [member function]
cls.add_method('NotifyTxStart',
'void',
[param('ns3::Time', 'duration')],
[param('ns3::Time', 'duration'), param('double', 'txPowerDbm')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyWakeup() [member function]
cls.add_method('NotifyWakeup',
'void',
[],
is_pure_virtual=True, is_virtual=True)
return
@@ -4924,34 +4950,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -5068,20 +5099,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -6513,6 +6544,11 @@ def register_Ns3WifiPhy_methods(root_module, cls):
'bool',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateSleep() [member function]
cls.add_method('IsStateSleep',
'bool',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateSwitching() [member function]
cls.add_method('IsStateSwitching',
'bool',
@@ -6565,10 +6601,15 @@ def register_Ns3WifiPhy_methods(root_module, cls):
'void',
[param('ns3::WifiPhyListener *', 'listener')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMode mode, ns3::WifiPreamble preamble, ns3::WifiTxVector txvector) [member function]
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::ResumeFromSleep() [member function]
cls.add_method('ResumeFromSleep',
'void',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiTxVector txvector, ns3::WifiPreamble preamble) [member function]
cls.add_method('SendPacket',
'void',
[param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble'), param('ns3::WifiTxVector', 'txvector')],
[param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetChannelBonding(bool channelbonding) [member function]
cls.add_method('SetChannelBonding',
@@ -6620,6 +6661,11 @@ def register_Ns3WifiPhy_methods(root_module, cls):
'void',
[param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetSleepMode() [member function]
cls.add_method('SetSleepMode',
'void',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetStbc(bool stbc) [member function]
cls.add_method('SetStbc',
'void',
@@ -8439,6 +8485,11 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
'bool',
[param('uint32_t', 'i')],
is_const=True, is_virtual=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUnicast(ns3::Ipv4Address ad) const [member function]
cls.add_method('IsUnicast',
'bool',
[param('ns3::Ipv4Address', 'ad')],
is_const=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function]
cls.add_method('IsUp',
'bool',
@@ -9571,10 +9622,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
@@ -10462,6 +10513,14 @@ def register_Ns3DsrDsrNetworkQueue_methods(root_module, cls):
cls.add_method('Enqueue',
'bool',
[param('ns3::dsr::DsrNetworkQueueEntry &', 'entry')])
## dsr-network-queue.h (module 'dsr'): bool ns3::dsr::DsrNetworkQueue::Find(ns3::Ipv4Address nextHop) [member function]
cls.add_method('Find',
'bool',
[param('ns3::Ipv4Address', 'nextHop')])
## dsr-network-queue.h (module 'dsr'): bool ns3::dsr::DsrNetworkQueue::FindPacketWithNexthop(ns3::Ipv4Address nextHop, ns3::dsr::DsrNetworkQueueEntry & entry) [member function]
cls.add_method('FindPacketWithNexthop',
'bool',
[param('ns3::Ipv4Address', 'nextHop'), param('ns3::dsr::DsrNetworkQueueEntry &', 'entry')])
## dsr-network-queue.h (module 'dsr'): void ns3::dsr::DsrNetworkQueue::Flush() [member function]
cls.add_method('Flush',
'void',
@@ -11350,6 +11409,10 @@ def register_Ns3DsrDsrRouting_methods(root_module, cls):
cls.add_method('CancelNetworkPacketTimer',
'void',
[param('ns3::dsr::MaintainBuffEntry &', 'mb')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::CancelPacketAllTimer(ns3::dsr::MaintainBuffEntry & mb) [member function]
cls.add_method('CancelPacketAllTimer',
'void',
[param('ns3::dsr::MaintainBuffEntry &', 'mb')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::CancelPacketTimerNextHop(ns3::Ipv4Address nextHop, uint8_t protocol) [member function]
cls.add_method('CancelPacketTimerNextHop',
'void',
@@ -11608,10 +11671,10 @@ def register_Ns3DsrDsrRouting_methods(root_module, cls):
cls.add_method('SendRequest',
'void',
[param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SendUnreachError(ns3::Ipv4Address errorHop, ns3::Ipv4Address destination, ns3::Ipv4Address originalDst, uint8_t salvage, uint8_t protocol) [member function]
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SendUnreachError(ns3::Ipv4Address unreachNode, ns3::Ipv4Address destination, ns3::Ipv4Address originalDst, uint8_t salvage, uint8_t protocol) [member function]
cls.add_method('SendUnreachError',
'void',
[param('ns3::Ipv4Address', 'errorHop'), param('ns3::Ipv4Address', 'destination'), param('ns3::Ipv4Address', 'originalDst'), param('uint8_t', 'salvage'), param('uint8_t', 'protocol')])
[param('ns3::Ipv4Address', 'unreachNode'), param('ns3::Ipv4Address', 'destination'), param('ns3::Ipv4Address', 'originalDst'), param('uint8_t', 'salvage'), param('uint8_t', 'protocol')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SetDownTarget(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::Ipv4Address, ns3::Ipv4Address, unsigned char, ns3::Ptr<ns3::Ipv4Route>, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
cls.add_method('SetDownTarget',
'void',
+89 -26
View File
@@ -164,6 +164,8 @@ def register_types(module):
module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## tag-buffer.h (module 'network'): ns3::TagBuffer [class]
module.add_class('TagBuffer', import_from_module='ns.network')
## nstime.h (module 'core'): ns3::TimeWithUnit [class]
module.add_class('TimeWithUnit', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer [class]
module.add_class('Timer', import_from_module='ns.core')
## timer.h (module 'core'): ns3::Timer::DestroyPolicy [enumeration]
@@ -311,7 +313,7 @@ def register_types(module):
## wifi-phy.h (module 'wifi'): ns3::WifiPhy [class]
module.add_class('WifiPhy', import_from_module='ns.wifi', parent=root_module['ns3::Object'])
## wifi-phy.h (module 'wifi'): ns3::WifiPhy::State [enumeration]
module.add_enum('State', ['IDLE', 'CCA_BUSY', 'TX', 'RX', 'SWITCHING'], outer_class=root_module['ns3::WifiPhy'], import_from_module='ns.wifi')
module.add_enum('State', ['IDLE', 'CCA_BUSY', 'TX', 'RX', 'SWITCHING', 'SLEEP'], outer_class=root_module['ns3::WifiPhy'], import_from_module='ns.wifi')
## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationManager [class]
module.add_class('WifiRemoteStationManager', import_from_module='ns.wifi', parent=root_module['ns3::Object'])
## random-variable-stream.h (module 'core'): ns3::ZetaRandomVariable [class]
@@ -701,6 +703,7 @@ def register_methods(root_module):
register_Ns3SystemWallClockMs_methods(root_module, root_module['ns3::SystemWallClockMs'])
register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
register_Ns3TimeWithUnit_methods(root_module, root_module['ns3::TimeWithUnit'])
register_Ns3Timer_methods(root_module, root_module['ns3::Timer'])
register_Ns3TimerImpl_methods(root_module, root_module['ns3::TimerImpl'])
register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId'])
@@ -2090,6 +2093,11 @@ def register_Ns3Ipv6InterfaceAddress_methods(root_module, cls):
'ns3::Ipv6InterfaceAddress::State_e',
[],
is_const=True)
## ipv6-interface-address.h (module 'internet'): bool ns3::Ipv6InterfaceAddress::IsInSameSubnet(ns3::Ipv6Address b) const [member function]
cls.add_method('IsInSameSubnet',
'bool',
[param('ns3::Ipv6Address', 'b')],
is_const=True)
## ipv6-interface-address.h (module 'internet'): void ns3::Ipv6InterfaceAddress::SetAddress(ns3::Ipv6Address address) [member function]
cls.add_method('SetAddress',
'void',
@@ -2819,6 +2827,14 @@ def register_Ns3TagBuffer_methods(root_module, cls):
[param('uint8_t', 'v')])
return
def register_Ns3TimeWithUnit_methods(root_module, cls):
cls.add_output_stream_operator()
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::TimeWithUnit const & arg0) [copy constructor]
cls.add_constructor([param('ns3::TimeWithUnit const &', 'arg0')])
## nstime.h (module 'core'): ns3::TimeWithUnit::TimeWithUnit(ns3::Time const time, ns3::Time::Unit const unit) [constructor]
cls.add_constructor([param('ns3::Time const', 'time'), param('ns3::Time::Unit const', 'unit')])
return
def register_Ns3Timer_methods(root_module, cls):
## timer.h (module 'core'): ns3::Timer::Timer(ns3::Timer const & arg0) [copy constructor]
cls.add_constructor([param('ns3::Timer const &', 'arg0')])
@@ -3183,15 +3199,25 @@ def register_Ns3WifiPhyListener_methods(root_module, cls):
'void',
[param('ns3::Time', 'duration')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifySleep() [member function]
cls.add_method('NotifySleep',
'void',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifySwitchingStart(ns3::Time duration) [member function]
cls.add_method('NotifySwitchingStart',
'void',
[param('ns3::Time', 'duration')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyTxStart(ns3::Time duration) [member function]
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyTxStart(ns3::Time duration, double txPowerDbm) [member function]
cls.add_method('NotifyTxStart',
'void',
[param('ns3::Time', 'duration')],
[param('ns3::Time', 'duration'), param('double', 'txPowerDbm')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhyListener::NotifyWakeup() [member function]
cls.add_method('NotifyWakeup',
'void',
[],
is_pure_virtual=True, is_virtual=True)
return
@@ -4924,34 +4950,39 @@ def register_Ns3Time_methods(root_module, cls):
cls.add_constructor([param('long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor]
cls.add_constructor([param('long long unsigned int', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & v) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'v')])
## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor]
cls.add_constructor([param('std::string const &', 's')])
## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor]
cls.add_constructor([param('ns3::int64x64_t const &', 'value')])
## nstime.h (module 'core'): ns3::TimeWithUnit ns3::Time::As(ns3::Time::Unit const unit) const [member function]
cls.add_method('As',
'ns3::TimeWithUnit',
[param('ns3::Time::Unit const', 'unit')],
is_const=True)
## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function]
cls.add_method('Compare',
'int',
[param('ns3::Time const &', 'o')],
is_const=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value, ns3::Time::Unit unit) [member function]
cls.add_method('From',
'ns3::Time',
[param('ns3::int64x64_t const &', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit unit) [member function]
cls.add_method('FromDouble',
'ns3::Time',
[param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('double', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function]
## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit unit) [member function]
cls.add_method('FromInteger',
'ns3::Time',
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')],
[param('uint64_t', 'value'), param('ns3::Time::Unit', 'unit')],
is_static=True)
## nstime.h (module 'core'): double ns3::Time::GetDays() const [member function]
cls.add_method('GetDays',
@@ -5068,20 +5099,20 @@ def register_Ns3Time_methods(root_module, cls):
'bool',
[],
is_static=True)
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit unit) const [member function]
cls.add_method('To',
'ns3::int64x64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit unit) const [member function]
cls.add_method('ToDouble',
'double',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function]
## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit unit) const [member function]
cls.add_method('ToInteger',
'int64_t',
[param('ns3::Time::Unit', 'timeUnit')],
[param('ns3::Time::Unit', 'unit')],
is_const=True)
return
@@ -6513,6 +6544,11 @@ def register_Ns3WifiPhy_methods(root_module, cls):
'bool',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateSleep() [member function]
cls.add_method('IsStateSleep',
'bool',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): bool ns3::WifiPhy::IsStateSwitching() [member function]
cls.add_method('IsStateSwitching',
'bool',
@@ -6565,10 +6601,15 @@ def register_Ns3WifiPhy_methods(root_module, cls):
'void',
[param('ns3::WifiPhyListener *', 'listener')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiMode mode, ns3::WifiPreamble preamble, ns3::WifiTxVector txvector) [member function]
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::ResumeFromSleep() [member function]
cls.add_method('ResumeFromSleep',
'void',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiTxVector txvector, ns3::WifiPreamble preamble) [member function]
cls.add_method('SendPacket',
'void',
[param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMode', 'mode'), param('ns3::WifiPreamble', 'preamble'), param('ns3::WifiTxVector', 'txvector')],
[param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetChannelBonding(bool channelbonding) [member function]
cls.add_method('SetChannelBonding',
@@ -6620,6 +6661,11 @@ def register_Ns3WifiPhy_methods(root_module, cls):
'void',
[param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::WifiMode, ns3::WifiPreamble, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetSleepMode() [member function]
cls.add_method('SetSleepMode',
'void',
[],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetStbc(bool stbc) [member function]
cls.add_method('SetStbc',
'void',
@@ -8439,6 +8485,11 @@ def register_Ns3Ipv4L3Protocol_methods(root_module, cls):
'bool',
[param('uint32_t', 'i')],
is_const=True, is_virtual=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUnicast(ns3::Ipv4Address ad) const [member function]
cls.add_method('IsUnicast',
'bool',
[param('ns3::Ipv4Address', 'ad')],
is_const=True)
## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function]
cls.add_method('IsUp',
'bool',
@@ -9571,10 +9622,10 @@ def register_Ns3Packet_methods(root_module, cls):
'uint32_t',
[param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')],
is_const=True)
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> arg0) [member function]
## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr<ns3::NixVector> nixVector) [member function]
cls.add_method('SetNixVector',
'void',
[param('ns3::Ptr< ns3::NixVector >', 'arg0')])
[param('ns3::Ptr< ns3::NixVector >', 'nixVector')])
return
def register_Ns3ParetoRandomVariable_methods(root_module, cls):
@@ -10462,6 +10513,14 @@ def register_Ns3DsrDsrNetworkQueue_methods(root_module, cls):
cls.add_method('Enqueue',
'bool',
[param('ns3::dsr::DsrNetworkQueueEntry &', 'entry')])
## dsr-network-queue.h (module 'dsr'): bool ns3::dsr::DsrNetworkQueue::Find(ns3::Ipv4Address nextHop) [member function]
cls.add_method('Find',
'bool',
[param('ns3::Ipv4Address', 'nextHop')])
## dsr-network-queue.h (module 'dsr'): bool ns3::dsr::DsrNetworkQueue::FindPacketWithNexthop(ns3::Ipv4Address nextHop, ns3::dsr::DsrNetworkQueueEntry & entry) [member function]
cls.add_method('FindPacketWithNexthop',
'bool',
[param('ns3::Ipv4Address', 'nextHop'), param('ns3::dsr::DsrNetworkQueueEntry &', 'entry')])
## dsr-network-queue.h (module 'dsr'): void ns3::dsr::DsrNetworkQueue::Flush() [member function]
cls.add_method('Flush',
'void',
@@ -11350,6 +11409,10 @@ def register_Ns3DsrDsrRouting_methods(root_module, cls):
cls.add_method('CancelNetworkPacketTimer',
'void',
[param('ns3::dsr::MaintainBuffEntry &', 'mb')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::CancelPacketAllTimer(ns3::dsr::MaintainBuffEntry & mb) [member function]
cls.add_method('CancelPacketAllTimer',
'void',
[param('ns3::dsr::MaintainBuffEntry &', 'mb')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::CancelPacketTimerNextHop(ns3::Ipv4Address nextHop, uint8_t protocol) [member function]
cls.add_method('CancelPacketTimerNextHop',
'void',
@@ -11608,10 +11671,10 @@ def register_Ns3DsrDsrRouting_methods(root_module, cls):
cls.add_method('SendRequest',
'void',
[param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SendUnreachError(ns3::Ipv4Address errorHop, ns3::Ipv4Address destination, ns3::Ipv4Address originalDst, uint8_t salvage, uint8_t protocol) [member function]
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SendUnreachError(ns3::Ipv4Address unreachNode, ns3::Ipv4Address destination, ns3::Ipv4Address originalDst, uint8_t salvage, uint8_t protocol) [member function]
cls.add_method('SendUnreachError',
'void',
[param('ns3::Ipv4Address', 'errorHop'), param('ns3::Ipv4Address', 'destination'), param('ns3::Ipv4Address', 'originalDst'), param('uint8_t', 'salvage'), param('uint8_t', 'protocol')])
[param('ns3::Ipv4Address', 'unreachNode'), param('ns3::Ipv4Address', 'destination'), param('ns3::Ipv4Address', 'originalDst'), param('uint8_t', 'salvage'), param('uint8_t', 'protocol')])
## dsr-routing.h (module 'dsr'): void ns3::dsr::DsrRouting::SetDownTarget(ns3::Callback<void, ns3::Ptr<ns3::Packet>, ns3::Ipv4Address, ns3::Ipv4Address, unsigned char, ns3::Ptr<ns3::Ipv4Route>, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
cls.add_method('SetDownTarget',
'void',
+12 -2
View File
@@ -14,7 +14,8 @@ DSR Routing Overview
********************
This model implements the base specification of the Dynamic Source Routing
(DSR) protocol. Implementation is based on :rfc:`4728`.
(DSR) protocol. Implementation is based on :rfc:`4728`, with some extensions
and modifications to the RFC specifications.
DSR operates on a on-demand behavior. Therefore, our DSR model buffers all
packets while a route request packet (RREQ) is disseminated. We implement
@@ -188,7 +189,16 @@ This model has been tested as follows:
* manet-routing-compare.cc has been used to compare DSR with three of other routing protocols.
A paper was presented on these results at the Workshop on ns-3 in 2011.
Limitations
***********
The model is not fully compliant with :rfc:`4728`. As an example, Dsr fixed size header
has been extended and it is four octects longer then the RFC specification.
As a consequence, the DSR headers can not be correctly decoded by Wireshark.
The model full compliance with the RFC is planned for the future.
References
**********
+1 -1
View File
@@ -116,7 +116,7 @@ ErrorBuffer::Dequeue (Ipv4Address dst, ErrorBuffEntry & entry)
if (i->GetDestination () == dst)
{
entry = *i;
m_errorBuffer.erase (i);
i = m_errorBuffer.erase (i);
NS_LOG_DEBUG ("Packet size while dequeuing " << entry.GetPacket ()->GetSize ());
return true;
}
+5 -5
View File
@@ -97,7 +97,7 @@ MaintainBuffer::Dequeue (Ipv4Address nextHop, MaintainBuffEntry & entry)
if (i->GetNextHop () == nextHop)
{
entry = *i;
m_maintainBuffer.erase (i);
i = m_maintainBuffer.erase (i);
NS_LOG_DEBUG ("Packet size while dequeuing " << entry.GetPacket ()->GetSize ());
return true;
}
@@ -134,7 +134,7 @@ MaintainBuffer::AllEqual (MaintainBuffEntry & entry)
&& (i->GetSrc () == entry.GetSrc ()) && (i->GetDst () == entry.GetDst ())
&& (i->GetAckId () == entry.GetAckId ()) && (i->GetSegsLeft () == entry.GetSegsLeft ()))
{
m_maintainBuffer.erase (i); // Erase the same maintain buffer entry for the received packet
i = m_maintainBuffer.erase (i); // Erase the same maintain buffer entry for the received packet
return true;
}
}
@@ -155,7 +155,7 @@ MaintainBuffer::NetworkEqual (MaintainBuffEntry & entry)
&& (i->GetSrc () == entry.GetSrc ()) && (i->GetDst () == entry.GetDst ())
&& (i->GetAckId () == entry.GetAckId ()))
{
m_maintainBuffer.erase (i); // Erase the same maintain buffer entry for the received packet
i = m_maintainBuffer.erase (i); // Erase the same maintain buffer entry for the received packet
return true;
}
}
@@ -178,7 +178,7 @@ MaintainBuffer::PromiscEqual (MaintainBuffEntry & entry)
&& (i->GetSegsLeft () == entry.GetSegsLeft ()) && (i->GetAckId () == entry.GetAckId ())
)
{
m_maintainBuffer.erase (i); // Erase the same maintain buffer entry for the promisc received packet
i = m_maintainBuffer.erase (i); // Erase the same maintain buffer entry for the promisc received packet
return true;
}
}
@@ -201,7 +201,7 @@ MaintainBuffer::LinkEqual (MaintainBuffEntry & entry)
&& (i->GetNextHop () == entry.GetNextHop ())
)
{
m_maintainBuffer.erase (i); // Erase the same maintain buffer entry for the promisc received packet
i = m_maintainBuffer.erase (i); // Erase the same maintain buffer entry for the promisc received packet
return true;
}
}
+33 -13
View File
@@ -55,12 +55,18 @@ struct LinkKey
* Compare maintain Buffer entries
* \param o
* \return true if equal
*/
bool operator < (LinkKey const & o) const
*/
bool operator < (const LinkKey & o) const
{
return ((m_source < o.m_source) && (m_destination < o.m_destination)
&& (m_ourAdd < o.m_nextHop) && (m_nextHop < o.m_nextHop)
);
if (m_source < o.m_source) return true;
if (o.m_source < m_source) return false;
if (m_destination < o.m_destination) return true;
if (o.m_destination < m_destination) return false;
if (m_ourAdd < o.m_ourAdd) return true;
if (o.m_ourAdd < m_ourAdd) return false;
if (m_nextHop < o.m_nextHop) return true;
if (o.m_nextHop < m_nextHop) return false;
return false;
}
};
@@ -77,11 +83,19 @@ struct NetworkKey
* \param o
* \return true if equal
*/
bool operator < (NetworkKey const & o) const
bool operator < (const NetworkKey & o) const
{
return ((m_ackId < o.m_ackId) && (m_ourAdd < o.m_ourAdd) && (m_nextHop < o.m_nextHop) && (m_source < o.m_source)
&& (m_destination < o.m_destination)
);
if (m_ackId < o.m_ackId) return true;
if (o.m_ackId < m_ackId) return false;
if (m_source < o.m_source) return true;
if (o.m_source < m_source) return false;
if (m_destination < o.m_destination) return true;
if (o.m_destination < m_destination) return false;
if (m_ourAdd < o.m_ourAdd) return true;
if (o.m_ourAdd < m_ourAdd) return false;
if (m_nextHop < o.m_nextHop) return true;
if (o.m_nextHop < m_nextHop) return false;
return false;
}
};
@@ -97,11 +111,17 @@ struct PassiveKey
* \param o
* \return true if equal
*/
bool operator < (PassiveKey const & o) const
bool operator < (const PassiveKey & o) const
{
return ((m_ackId < o.m_ackId) && (m_source < o.m_source)
&& (m_destination < o.m_destination) && (m_segsLeft < o.m_segsLeft)
);
if (m_ackId < o.m_ackId) return true;
if (o.m_ackId < m_ackId) return false;
if (m_source < o.m_source) return true;
if (o.m_source < m_source) return false;
if (m_destination < o.m_destination) return true;
if (o.m_destination < m_destination) return false;
if (m_segsLeft < o.m_segsLeft) return true;
if (o.m_segsLeft < m_segsLeft) return false;
return false;
}
};
Loaded 100 of 696 files, more files were not shown because too many files have changed in this diff. Show more