diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..935c701 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,39 @@ +check_include_file_cxx(stdint.h HAVE_STDINT_H) +if(HAVE_STDINT_H) + add_definitions(-DHAVE_STDINT_H) +endif() + +set(examples_as_tests_sources) +if(${ENABLE_EXAMPLES}) + set(examples_as_tests_sources + #test/dash-examples-test-suite.cc + ) +endif() + +build_lib( + LIBNAME dash + SOURCE_FILES + model/tcp-stream-client.cc + model/tcp-stream-server.cc + model/tcp-stream-adaptation-algorithm.cc + model/festive.cc + model/panda.cc + model/tobasco2.cc + helper/tcp-stream-helper.cc + HEADER_FILES + model/tcp-stream-client.h + model/tcp-stream-server.h + model/tcp-stream-interface.h + model/tcp-stream-adaptation-algorithm.h + model/festive.h + model/panda.h + model/tobasco2.h + helper/tcp-stream-helper.h + LIBRARIES_TO_LINK + ${libinternet} + ${libconfig-store} + ${libstats} + # TEST_SOURCES test/dash-test-suite.cc + # ${examples_as_tests_sources} +) + diff --git a/doc/dash.rst b/doc/dash.rst new file mode 100644 index 0000000..0545ae9 --- /dev/null +++ b/doc/dash.rst @@ -0,0 +1,98 @@ +Example Module Documentation +---------------------------- + +.. include:: replace.txt +.. highlight:: cpp + +.. heading hierarchy: + ------------- Chapter + ************* Section (#.#) + ============= Subsection (#.#.#) + ############# Paragraph (no number) + +This is a suggested outline for adding new module documentation to |ns3|. +See ``src/click/doc/click.rst`` for an example. + +The introductory paragraph is for describing what this code is trying to +model. + +For consistency (italicized formatting), please use |ns3| to refer to +ns-3 in the documentation (and likewise, |ns2| for ns-2). These macros +are defined in the file ``replace.txt``. + +Model Description +***************** + +The source code for the new module lives in the directory ``src/dash``. + +Add here a basic description of what is being modeled. + +Design +====== + +Briefly describe the software design of the model and how it fits into +the existing ns-3 architecture. + +Scope and Limitations +===================== + +What can the model do? What can it not do? Please use this section to +describe the scope and limitations of the model. + +References +========== + +Add academic citations here, such as if you published a paper on this +model, or if readers should read a particular specification or other work. + +Usage +***** + +This section is principally concerned with the usage of your model, using +the public API. Focus first on most common usage patterns, then go +into more advanced topics. + +Building New Module +=================== + +Include this subsection only if there are special build instructions or +platform limitations. + +Helpers +======= + +What helper API will users typically use? Describe it here. + +Attributes +========== + +What classes hold attributes, and what are the key ones worth mentioning? + +Output +====== + +What kind of data does the model generate? What are the key trace +sources? What kind of logging output can be enabled? + +Advanced Usage +============== + +Go into further details (such as using the API outside of the helpers) +in additional sections, as needed. + +Examples +======== + +What examples using this new code are available? Describe them here. + +Troubleshooting +=============== + +Add any tips for avoiding pitfalls, etc. + +Validation +********** + +Describe how the model has been tested/validated. What tests run in the +test suite? How much API and code is covered by the tests? Again, +references to outside published work may help here. diff --git a/examples/CMakelists.txt b/examples/CMakelists.txt new file mode 100644 index 0000000..34a08d6 --- /dev/null +++ b/examples/CMakelists.txt @@ -0,0 +1,13 @@ + +build_lib_example( + NAME tcp-stream + SOURCE_FILES tcp-stream.cc + LIBRARIES_TO_LINK + ${libdash} + ${libwifi} + ${libinternet} + ${libpoint-to-point} + ${libapplications} + ${libbuildings} +) + diff --git a/examples/tcp-stream.cc b/examples/tcp-stream.cc index 4c6e165..ffb95ed 100644 --- a/examples/tcp-stream.cc +++ b/examples/tcp-stream.cc @@ -87,16 +87,17 @@ main (int argc, char *argv[]) Config::SetDefault("ns3::TcpSocket::RcvBufSize", UintegerValue (524288)); WifiHelper wifiHelper; - wifiHelper.SetStandard (WIFI_PHY_STANDARD_80211n_5GHZ); + // WIFI_PHY_STANDARD_80211n_5GHZ ---->>>> giving error !!! + wifiHelper.SetStandard (WIFI_STANDARD_80211n); wifiHelper.SetRemoteStationManager ("ns3::MinstrelHtWifiManager");// - + /* Set up Legacy Channel */ YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default (); // We do not set an explicit propagation loss model here, we just use the default ones that get applied with the building model. /* Setup Physical Layer */ - YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); + YansWifiPhyHelper wifiPhy = YansWifiPhyHelper (); // CHANGED FROM ::default to () wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO); wifiPhy.Set ("TxPowerStart", DoubleValue (20.0));// wifiPhy.Set ("TxPowerEnd", DoubleValue (20.0));// @@ -256,7 +257,7 @@ main (int argc, char *argv[]) // install all of the nodes that have been added to positionAlloc to the mobility model mobility.Install (networkNodes); BuildingsHelper::Install (networkNodes); // networkNodes contains all nodes, stations and ap - BuildingsHelper::MakeMobilityModelConsistent (); + // BuildingsHelper::MakeMobilityModelConsistent (); // if logging of the packets between AP---Server or AP and the STAs is wanted, these two lines can be activated diff --git a/examples/wscript b/examples/wscript deleted file mode 100644 index eb72538..0000000 --- a/examples/wscript +++ /dev/null @@ -1,5 +0,0 @@ -# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- - -def build(bld): - obj = bld.create_ns3_program('tcp-stream', ['dash', 'internet', 'wifi', 'buildings', 'applications', 'point-to-point']) - obj.source = 'tcp-stream.cc' diff --git a/wscript b/wscript deleted file mode 100644 index 169c75f..0000000 --- a/wscript +++ /dev/null @@ -1,32 +0,0 @@ -## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- - -def build(bld): - module = bld.create_ns3_module('dash', ['internet','config-store','stats']) - module.includes = '.' - module.source = [ - 'model/tcp-stream-client.cc', - 'model/tcp-stream-server.cc', - 'model/tcp-stream-adaptation-algorithm.cc', - 'model/festive.cc', - 'model/panda.cc', - 'model/tobasco2.cc', - 'helper/tcp-stream-helper.cc', - ] - - headers = bld(features='ns3header') - headers.module = 'dash' - headers.source = [ - 'model/tcp-stream-client.h', - 'model/tcp-stream-server.h', - 'model/tcp-stream-interface.h', - 'model/tcp-stream-adaptation-algorithm.h', - 'model/festive.h', - 'model/panda.h', - 'model/tobasco2.h', - 'helper/tcp-stream-helper.h', - ] - - if bld.env['ENABLE_EXAMPLES']: - bld.recurse('examples') - - bld.ns3_python_bindings()