diff --git a/src/devices/uan/uan.h b/src/devices/uan/doc/uan.h similarity index 100% rename from src/devices/uan/uan.h rename to src/devices/uan/doc/uan.h diff --git a/examples/uan/uan-cw-example.cc b/src/devices/uan/examples/uan-cw-example.cc similarity index 99% rename from examples/uan/uan-cw-example.cc rename to src/devices/uan/examples/uan-cw-example.cc index fce93029b..60ada179b 100644 --- a/examples/uan/uan-cw-example.cc +++ b/src/devices/uan/examples/uan-cw-example.cc @@ -39,7 +39,6 @@ #include "uan-cw-example.h" #include "ns3/core-module.h" #include "ns3/common-module.h" -#include "ns3/uan-module.h" #include "ns3/node-module.h" #include "ns3/mobility-module.h" #include "ns3/contrib-module.h" diff --git a/examples/uan/uan-cw-example.h b/src/devices/uan/examples/uan-cw-example.h similarity index 98% rename from examples/uan/uan-cw-example.h rename to src/devices/uan/examples/uan-cw-example.h index 1c7cb7ae1..ef0cfe5f2 100644 --- a/examples/uan/uan-cw-example.h +++ b/src/devices/uan/examples/uan-cw-example.h @@ -24,6 +24,7 @@ #include "ns3/common-module.h" #include "ns3/node-module.h" #include "ns3/contrib-module.h" +#include "ns3/uan-module.h" #include "ns3/helper-module.h" using namespace ns3; diff --git a/examples/uan/uan-rc-example.cc b/src/devices/uan/examples/uan-rc-example.cc similarity index 99% rename from examples/uan/uan-rc-example.cc rename to src/devices/uan/examples/uan-rc-example.cc index 697f25a93..7870804db 100644 --- a/examples/uan/uan-rc-example.cc +++ b/src/devices/uan/examples/uan-rc-example.cc @@ -54,7 +54,6 @@ #include "uan-rc-example.h" #include "ns3/core-module.h" #include "ns3/common-module.h" -#include "ns3/uan-module.h" #include "ns3/helper-module.h" #include "ns3/mobility-module.h" #include "ns3/node-module.h" diff --git a/examples/uan/uan-rc-example.h b/src/devices/uan/examples/uan-rc-example.h similarity index 100% rename from examples/uan/uan-rc-example.h rename to src/devices/uan/examples/uan-rc-example.h diff --git a/examples/uan/wscript b/src/devices/uan/examples/wscript similarity index 99% rename from examples/uan/wscript rename to src/devices/uan/examples/wscript index 3520a5cbe..16d0e23e1 100644 --- a/examples/uan/wscript +++ b/src/devices/uan/examples/wscript @@ -1,4 +1,3 @@ - ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- def build(bld): @@ -7,5 +6,3 @@ def build(bld): obj = bld.create_ns3_program('uan-rc-example', ['core', 'simulator', 'mobility', 'uan']) obj.source = 'uan-rc-example.cc' - - diff --git a/src/helper/uan-helper.cc b/src/devices/uan/helper/uan-helper.cc similarity index 100% rename from src/helper/uan-helper.cc rename to src/devices/uan/helper/uan-helper.cc diff --git a/src/helper/uan-helper.h b/src/devices/uan/helper/uan-helper.h similarity index 100% rename from src/helper/uan-helper.h rename to src/devices/uan/helper/uan-helper.h diff --git a/src/devices/uan/uan-address.cc b/src/devices/uan/model/uan-address.cc similarity index 100% rename from src/devices/uan/uan-address.cc rename to src/devices/uan/model/uan-address.cc diff --git a/src/devices/uan/uan-address.h b/src/devices/uan/model/uan-address.h similarity index 100% rename from src/devices/uan/uan-address.h rename to src/devices/uan/model/uan-address.h diff --git a/src/devices/uan/uan-channel.cc b/src/devices/uan/model/uan-channel.cc similarity index 100% rename from src/devices/uan/uan-channel.cc rename to src/devices/uan/model/uan-channel.cc diff --git a/src/devices/uan/uan-channel.h b/src/devices/uan/model/uan-channel.h similarity index 100% rename from src/devices/uan/uan-channel.h rename to src/devices/uan/model/uan-channel.h diff --git a/src/devices/uan/uan-header-common.cc b/src/devices/uan/model/uan-header-common.cc similarity index 100% rename from src/devices/uan/uan-header-common.cc rename to src/devices/uan/model/uan-header-common.cc diff --git a/src/devices/uan/uan-header-common.h b/src/devices/uan/model/uan-header-common.h similarity index 100% rename from src/devices/uan/uan-header-common.h rename to src/devices/uan/model/uan-header-common.h diff --git a/src/devices/uan/uan-header-rc.cc b/src/devices/uan/model/uan-header-rc.cc similarity index 100% rename from src/devices/uan/uan-header-rc.cc rename to src/devices/uan/model/uan-header-rc.cc diff --git a/src/devices/uan/uan-header-rc.h b/src/devices/uan/model/uan-header-rc.h similarity index 100% rename from src/devices/uan/uan-header-rc.h rename to src/devices/uan/model/uan-header-rc.h diff --git a/src/devices/uan/uan-mac-aloha.cc b/src/devices/uan/model/uan-mac-aloha.cc similarity index 100% rename from src/devices/uan/uan-mac-aloha.cc rename to src/devices/uan/model/uan-mac-aloha.cc diff --git a/src/devices/uan/uan-mac-aloha.h b/src/devices/uan/model/uan-mac-aloha.h similarity index 100% rename from src/devices/uan/uan-mac-aloha.h rename to src/devices/uan/model/uan-mac-aloha.h diff --git a/src/devices/uan/uan-mac-cw.cc b/src/devices/uan/model/uan-mac-cw.cc similarity index 100% rename from src/devices/uan/uan-mac-cw.cc rename to src/devices/uan/model/uan-mac-cw.cc diff --git a/src/devices/uan/uan-mac-cw.h b/src/devices/uan/model/uan-mac-cw.h similarity index 100% rename from src/devices/uan/uan-mac-cw.h rename to src/devices/uan/model/uan-mac-cw.h diff --git a/src/devices/uan/uan-mac-rc-gw.cc b/src/devices/uan/model/uan-mac-rc-gw.cc similarity index 100% rename from src/devices/uan/uan-mac-rc-gw.cc rename to src/devices/uan/model/uan-mac-rc-gw.cc diff --git a/src/devices/uan/uan-mac-rc-gw.h b/src/devices/uan/model/uan-mac-rc-gw.h similarity index 100% rename from src/devices/uan/uan-mac-rc-gw.h rename to src/devices/uan/model/uan-mac-rc-gw.h diff --git a/src/devices/uan/uan-mac-rc.cc b/src/devices/uan/model/uan-mac-rc.cc similarity index 100% rename from src/devices/uan/uan-mac-rc.cc rename to src/devices/uan/model/uan-mac-rc.cc diff --git a/src/devices/uan/uan-mac-rc.h b/src/devices/uan/model/uan-mac-rc.h similarity index 100% rename from src/devices/uan/uan-mac-rc.h rename to src/devices/uan/model/uan-mac-rc.h diff --git a/src/devices/uan/uan-mac.h b/src/devices/uan/model/uan-mac.h similarity index 100% rename from src/devices/uan/uan-mac.h rename to src/devices/uan/model/uan-mac.h diff --git a/src/devices/uan/uan-net-device.cc b/src/devices/uan/model/uan-net-device.cc similarity index 100% rename from src/devices/uan/uan-net-device.cc rename to src/devices/uan/model/uan-net-device.cc diff --git a/src/devices/uan/uan-net-device.h b/src/devices/uan/model/uan-net-device.h similarity index 100% rename from src/devices/uan/uan-net-device.h rename to src/devices/uan/model/uan-net-device.h diff --git a/src/devices/uan/uan-noise-model-default.cc b/src/devices/uan/model/uan-noise-model-default.cc similarity index 100% rename from src/devices/uan/uan-noise-model-default.cc rename to src/devices/uan/model/uan-noise-model-default.cc diff --git a/src/devices/uan/uan-noise-model-default.h b/src/devices/uan/model/uan-noise-model-default.h similarity index 100% rename from src/devices/uan/uan-noise-model-default.h rename to src/devices/uan/model/uan-noise-model-default.h diff --git a/src/devices/uan/uan-noise-model.cc b/src/devices/uan/model/uan-noise-model.cc similarity index 100% rename from src/devices/uan/uan-noise-model.cc rename to src/devices/uan/model/uan-noise-model.cc diff --git a/src/devices/uan/uan-noise-model.h b/src/devices/uan/model/uan-noise-model.h similarity index 100% rename from src/devices/uan/uan-noise-model.h rename to src/devices/uan/model/uan-noise-model.h diff --git a/src/devices/uan/uan-phy-dual.cc b/src/devices/uan/model/uan-phy-dual.cc similarity index 100% rename from src/devices/uan/uan-phy-dual.cc rename to src/devices/uan/model/uan-phy-dual.cc diff --git a/src/devices/uan/uan-phy-dual.h b/src/devices/uan/model/uan-phy-dual.h similarity index 100% rename from src/devices/uan/uan-phy-dual.h rename to src/devices/uan/model/uan-phy-dual.h diff --git a/src/devices/uan/uan-phy-gen.cc b/src/devices/uan/model/uan-phy-gen.cc similarity index 100% rename from src/devices/uan/uan-phy-gen.cc rename to src/devices/uan/model/uan-phy-gen.cc diff --git a/src/devices/uan/uan-phy-gen.h b/src/devices/uan/model/uan-phy-gen.h similarity index 100% rename from src/devices/uan/uan-phy-gen.h rename to src/devices/uan/model/uan-phy-gen.h diff --git a/src/devices/uan/uan-phy.cc b/src/devices/uan/model/uan-phy.cc similarity index 100% rename from src/devices/uan/uan-phy.cc rename to src/devices/uan/model/uan-phy.cc diff --git a/src/devices/uan/uan-phy.h b/src/devices/uan/model/uan-phy.h similarity index 100% rename from src/devices/uan/uan-phy.h rename to src/devices/uan/model/uan-phy.h diff --git a/src/devices/uan/uan-prop-model-ideal.cc b/src/devices/uan/model/uan-prop-model-ideal.cc similarity index 100% rename from src/devices/uan/uan-prop-model-ideal.cc rename to src/devices/uan/model/uan-prop-model-ideal.cc diff --git a/src/devices/uan/uan-prop-model-ideal.h b/src/devices/uan/model/uan-prop-model-ideal.h similarity index 100% rename from src/devices/uan/uan-prop-model-ideal.h rename to src/devices/uan/model/uan-prop-model-ideal.h diff --git a/src/devices/uan/uan-prop-model-thorp.cc b/src/devices/uan/model/uan-prop-model-thorp.cc similarity index 100% rename from src/devices/uan/uan-prop-model-thorp.cc rename to src/devices/uan/model/uan-prop-model-thorp.cc diff --git a/src/devices/uan/uan-prop-model-thorp.h b/src/devices/uan/model/uan-prop-model-thorp.h similarity index 100% rename from src/devices/uan/uan-prop-model-thorp.h rename to src/devices/uan/model/uan-prop-model-thorp.h diff --git a/src/devices/uan/uan-prop-model.cc b/src/devices/uan/model/uan-prop-model.cc similarity index 100% rename from src/devices/uan/uan-prop-model.cc rename to src/devices/uan/model/uan-prop-model.cc diff --git a/src/devices/uan/uan-prop-model.h b/src/devices/uan/model/uan-prop-model.h similarity index 100% rename from src/devices/uan/uan-prop-model.h rename to src/devices/uan/model/uan-prop-model.h diff --git a/src/devices/uan/uan-transducer-hd.cc b/src/devices/uan/model/uan-transducer-hd.cc similarity index 100% rename from src/devices/uan/uan-transducer-hd.cc rename to src/devices/uan/model/uan-transducer-hd.cc diff --git a/src/devices/uan/uan-transducer-hd.h b/src/devices/uan/model/uan-transducer-hd.h similarity index 100% rename from src/devices/uan/uan-transducer-hd.h rename to src/devices/uan/model/uan-transducer-hd.h diff --git a/src/devices/uan/uan-transducer.h b/src/devices/uan/model/uan-transducer.h similarity index 100% rename from src/devices/uan/uan-transducer.h rename to src/devices/uan/model/uan-transducer.h diff --git a/src/devices/uan/uan-tx-mode.cc b/src/devices/uan/model/uan-tx-mode.cc similarity index 100% rename from src/devices/uan/uan-tx-mode.cc rename to src/devices/uan/model/uan-tx-mode.cc diff --git a/src/devices/uan/uan-tx-mode.h b/src/devices/uan/model/uan-tx-mode.h similarity index 100% rename from src/devices/uan/uan-tx-mode.h rename to src/devices/uan/model/uan-tx-mode.h diff --git a/src/devices/uan/uan-test.cc b/src/devices/uan/test/uan-test.cc similarity index 97% rename from src/devices/uan/uan-test.cc rename to src/devices/uan/test/uan-test.cc index 6e6b7d9e6..84349711a 100644 --- a/src/devices/uan/uan-test.cc +++ b/src/devices/uan/test/uan-test.cc @@ -18,12 +18,12 @@ * Author: Leonard Tracy */ -#include "uan-net-device.h" -#include "uan-channel.h" -#include "uan-mac-aloha.h" -#include "uan-phy-gen.h" -#include "uan-transducer-hd.h" -#include "uan-prop-model-ideal.h" +#include "ns3/uan-net-device.h" +#include "ns3/uan-channel.h" +#include "ns3/uan-mac-aloha.h" +#include "ns3/uan-phy-gen.h" +#include "ns3/uan-transducer-hd.h" +#include "ns3/uan-prop-model-ideal.h" #include "ns3/constant-position-mobility-model.h" #include "ns3/simulator.h" #include "ns3/test.h" diff --git a/src/devices/uan/waf b/src/devices/uan/waf deleted file mode 100755 index 4283ec141..000000000 --- a/src/devices/uan/waf +++ /dev/null @@ -1 +0,0 @@ -exec "`dirname "$0"`"/../../../waf "$@" diff --git a/src/devices/uan/wscript b/src/devices/uan/wscript index f632da8ed..79ac827f4 100644 --- a/src/devices/uan/wscript +++ b/src/devices/uan/wscript @@ -1,53 +1,56 @@ - - ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- def build(bld): module = bld.create_ns3_module('uan', ['node']) module.source = [ - 'uan-channel.cc', - 'uan-phy-gen.cc', - 'uan-transducer-hd.cc', - 'uan-address.cc', - 'uan-net-device.cc', - 'uan-tx-mode.cc', - 'uan-prop-model.cc', - 'uan-prop-model-ideal.cc', - 'uan-mac-aloha.cc', - 'uan-header-common.cc', - 'uan-noise-model-default.cc', - 'uan-mac-cw.cc', - 'uan-prop-model-thorp.cc', - 'uan-phy-dual.cc', - 'uan-header-rc.cc', - 'uan-mac-rc.cc', - 'uan-mac-rc-gw.cc', - 'uan-test.cc', - 'uan-phy.cc', - 'uan-noise-model.cc' + 'model/uan-channel.cc', + 'model/uan-phy-gen.cc', + 'model/uan-transducer-hd.cc', + 'model/uan-address.cc', + 'model/uan-net-device.cc', + 'model/uan-tx-mode.cc', + 'model/uan-prop-model.cc', + 'model/uan-prop-model-ideal.cc', + 'model/uan-mac-aloha.cc', + 'model/uan-header-common.cc', + 'model/uan-noise-model-default.cc', + 'model/uan-mac-cw.cc', + 'model/uan-prop-model-thorp.cc', + 'model/uan-phy-dual.cc', + 'model/uan-header-rc.cc', + 'model/uan-mac-rc.cc', + 'model/uan-mac-rc-gw.cc', + 'model/uan-phy.cc', + 'model/uan-noise-model.cc', + 'helper/uan-helper.cc', + 'test/uan-test.cc', ] headers = bld.new_task_gen('ns3header') headers.module = 'uan' headers.source = [ - 'uan-channel.h', - 'uan-phy.h', - 'uan-mac.h', - 'uan-net-device.h', - 'uan-prop-model.h', - 'uan-tx-mode.h', - 'uan-transducer.h', - 'uan-phy-gen.h', - 'uan-transducer-hd.h', - 'uan-address.h', - 'uan-prop-model-ideal.h', - 'uan-mac-aloha.h', - 'uan-header-common.h', - 'uan-noise-model.h', - 'uan-noise-model-default.h', - 'uan-mac-cw.h', - 'uan-prop-model-thorp.h', - 'uan-phy-dual.h', - 'uan-header-rc.h', - 'uan-mac-rc.h', - 'uan-mac-rc-gw.h' + 'model/uan-channel.h', + 'model/uan-phy.h', + 'model/uan-mac.h', + 'model/uan-net-device.h', + 'model/uan-prop-model.h', + 'model/uan-tx-mode.h', + 'model/uan-transducer.h', + 'model/uan-phy-gen.h', + 'model/uan-transducer-hd.h', + 'model/uan-address.h', + 'model/uan-prop-model-ideal.h', + 'model/uan-mac-aloha.h', + 'model/uan-header-common.h', + 'model/uan-noise-model.h', + 'model/uan-noise-model-default.h', + 'model/uan-mac-cw.h', + 'model/uan-prop-model-thorp.h', + 'model/uan-phy-dual.h', + 'model/uan-header-rc.h', + 'model/uan-mac-rc.h', + 'helper/uan-helper.h', + 'model/uan-mac-rc-gw.h', ] + + if (bld.env['ENABLE_EXAMPLES']): + bld.add_subdirs('examples') diff --git a/src/devices/wifi/dca-txop.cc b/src/devices/wifi/dca-txop.cc index 28ff33700..ffc78e9e0 100644 --- a/src/devices/wifi/dca-txop.cc +++ b/src/devices/wifi/dca-txop.cc @@ -60,7 +60,6 @@ private: virtual void DoNotifyChannelSwitching (void) { m_txop->NotifyChannelSwitching (); } - DcaTxop *m_txop; }; @@ -101,7 +100,7 @@ TypeId DcaTxop::GetTypeId (void) { static TypeId tid = TypeId ("ns3::DcaTxop") - .SetParent () + .SetParent (ns3::Dcf::GetTypeId ()) .AddConstructor () ; return tid; diff --git a/src/devices/wifi/dca-txop.h b/src/devices/wifi/dca-txop.h index 6febeaf46..c4d8d5463 100644 --- a/src/devices/wifi/dca-txop.h +++ b/src/devices/wifi/dca-txop.h @@ -26,10 +26,10 @@ #include "ns3/packet.h" #include "ns3/nstime.h" #include "ns3/object.h" -#include "wifi-mac-header.h" -#include "wifi-mode.h" -#include "wifi-remote-station-manager.h" -#include "dcf.h" +#include "ns3/wifi-mac-header.h" +#include "ns3/wifi-mode.h" +#include "ns3/wifi-remote-station-manager.h" +#include "ns3/dcf.h" namespace ns3 { diff --git a/src/devices/wifi/edca-txop-n.cc b/src/devices/wifi/edca-txop-n.cc index 2b7639dee..ebd4bdf92 100644 --- a/src/devices/wifi/edca-txop-n.cc +++ b/src/devices/wifi/edca-txop-n.cc @@ -124,7 +124,7 @@ TypeId EdcaTxopN::GetTypeId (void) { static TypeId tid = TypeId ("ns3::EdcaTxopN") - .SetParent () + .SetParent (ns3::Dcf::GetTypeId ()) .AddConstructor () .AddAttribute ("BlockAckThreshold", "If number of packets in this queue reaches this value,\ block ack mechanism is used. If this value is 0, block ack is never used.", diff --git a/src/helper/wscript b/src/helper/wscript index 616b42140..940cab48a 100644 --- a/src/helper/wscript +++ b/src/helper/wscript @@ -25,7 +25,6 @@ def build(bld): 'spectrum-helper.cc', 'adhoc-aloha-noack-ideal-phy-helper.cc', 'v4ping-helper.cc', - 'uan-helper.cc', 'nqos-wifi-mac-helper.cc', 'qos-wifi-mac-helper.cc', 'ipv4-nix-vector-helper.cc', @@ -83,7 +82,6 @@ def build(bld): 'spectrum-helper.h', 'adhoc-aloha-noack-ideal-phy-helper.h', 'v4ping-helper.h', - 'uan-helper.h', 'nqos-wifi-mac-helper.h', 'qos-wifi-mac-helper.h', 'ipv4-nix-vector-helper.h',