diff --git a/doc/manual/source/attributes.rst b/doc/manual/source/attributes.rst index 5af52d02c..dd4e00d23 100644 --- a/doc/manual/source/attributes.rst +++ b/doc/manual/source/attributes.rst @@ -278,7 +278,7 @@ Default values and command-line arguments +++++++++++++++++++++++++++++++++++++++++ Let's look at how a user script might access these values. -This is based on the script found at ``src/core/examples/main-attribute-value.cc``, +This is based on the script found at ``src/point-to-point/examples/main-attribute-value.cc``, with some details stripped out.:: // diff --git a/src/uan/model/uan-mac.cc b/src/uan/model/uan-mac.cc new file mode 100644 index 000000000..d57add264 --- /dev/null +++ b/src/uan/model/uan-mac.cc @@ -0,0 +1,34 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2011 University of Washington + * + * 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: Mitch Watrous + */ + +#include "uan-mac.h" + +namespace ns3 { + +NS_OBJECT_ENSURE_REGISTERED (UanMac); + +TypeId UanMac::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::UanMac") + .SetParent (); + return tid; +} + +} // namespace ns3 diff --git a/src/uan/model/uan-mac.h b/src/uan/model/uan-mac.h index bca6a4261..a046c41eb 100644 --- a/src/uan/model/uan-mac.h +++ b/src/uan/model/uan-mac.h @@ -47,6 +47,8 @@ class UanAddress; class UanMac : public Object { public: + static TypeId GetTypeId (void); + /** * \returns MAC Address */ diff --git a/src/uan/model/uan-noise-model.cc b/src/uan/model/uan-noise-model.cc index 27ef21920..dc5524a60 100644 --- a/src/uan/model/uan-noise-model.cc +++ b/src/uan/model/uan-noise-model.cc @@ -22,6 +22,15 @@ namespace ns3 { +NS_OBJECT_ENSURE_REGISTERED (UanNoiseModel); + +TypeId UanNoiseModel::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::UanNoiseModel") + .SetParent (); + return tid; +} + void UanNoiseModel::Clear (void) { diff --git a/src/uan/model/uan-noise-model.h b/src/uan/model/uan-noise-model.h index b02948a39..62bb743fc 100644 --- a/src/uan/model/uan-noise-model.h +++ b/src/uan/model/uan-noise-model.h @@ -28,6 +28,8 @@ namespace ns3 { class UanNoiseModel : public Object { public: + static TypeId GetTypeId (void); + /** * \param fKhz Frequency in kHz * \returns Noise power in dB re 1uPa/Hz diff --git a/src/uan/model/uan-phy.cc b/src/uan/model/uan-phy.cc index e7c85dcc3..8668b5cd0 100644 --- a/src/uan/model/uan-phy.cc +++ b/src/uan/model/uan-phy.cc @@ -22,6 +22,15 @@ namespace ns3 { +NS_OBJECT_ENSURE_REGISTERED (UanPhyCalcSinr); + +TypeId UanPhyCalcSinr::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::UanPhyCalcSinr") + .SetParent (); + return tid; +} + void UanPhyCalcSinr::Clear () { @@ -34,6 +43,15 @@ UanPhyCalcSinr::DoDispose () Object::DoDispose (); } +NS_OBJECT_ENSURE_REGISTERED (UanPhyPer); + +TypeId UanPhyPer::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::UanPhyPer") + .SetParent (); + return tid; +} + void UanPhyPer::Clear () { @@ -46,4 +64,13 @@ UanPhyPer::DoDispose () Object::DoDispose (); } +NS_OBJECT_ENSURE_REGISTERED (UanPhy); + +TypeId UanPhy::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::UanPhy") + .SetParent (); + return tid; +} + } // namespace ns3 diff --git a/src/uan/model/uan-phy.h b/src/uan/model/uan-phy.h index 8c51a5d29..380ea0218 100644 --- a/src/uan/model/uan-phy.h +++ b/src/uan/model/uan-phy.h @@ -44,6 +44,8 @@ class UanPhyCalcSinr : public Object { public: + static TypeId GetTypeId (void); + /** * \param pkt Packet to calculate SINR for * \param arrTime Arrival time of pkt @@ -97,6 +99,8 @@ public: class UanPhyPer : public Object { public: + static TypeId GetTypeId (void); + /** * Calculates the prob. of packet error based on * SINR at the receiver and a tx mode. @@ -163,6 +167,8 @@ public: class UanPhy : public Object { public: + static TypeId GetTypeId (void); + // / Enum defining possible Phy states enum State { diff --git a/src/uan/model/uan-prop-model-ideal.cc b/src/uan/model/uan-prop-model-ideal.cc index e4297c9fc..dbd7167a9 100644 --- a/src/uan/model/uan-prop-model-ideal.cc +++ b/src/uan/model/uan-prop-model-ideal.cc @@ -38,7 +38,7 @@ TypeId UanPropModelIdeal::GetTypeId (void) { static TypeId tid = TypeId ("ns3::UanPropModelIdeal") - .SetParent () + .SetParent () .AddConstructor () ; return tid; diff --git a/src/uan/model/uan-prop-model.cc b/src/uan/model/uan-prop-model.cc index 02cd4ffc0..3b0121832 100644 --- a/src/uan/model/uan-prop-model.cc +++ b/src/uan/model/uan-prop-model.cc @@ -336,6 +336,15 @@ UanPdp::CreateImpulsePdp (void) return pdp; } +NS_OBJECT_ENSURE_REGISTERED (UanPropModel); + +TypeId UanPropModel::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::UanPropModel") + .SetParent (); + return tid; +} + void UanPropModel::Clear (void) { diff --git a/src/uan/model/uan-prop-model.h b/src/uan/model/uan-prop-model.h index c811447bd..792cbaafe 100644 --- a/src/uan/model/uan-prop-model.h +++ b/src/uan/model/uan-prop-model.h @@ -216,6 +216,8 @@ std::istream &operator>> (std::ostream &is, UanPdp &pdp); class UanPropModel : public Object { public: + static TypeId GetTypeId (void); + /** * Computes pathloss between nodes a and b. * \returns Pathloss in dB re 1 uPa diff --git a/src/uan/model/uan-transducer.cc b/src/uan/model/uan-transducer.cc new file mode 100644 index 000000000..8b6c4a996 --- /dev/null +++ b/src/uan/model/uan-transducer.cc @@ -0,0 +1,34 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2011 University of Washington + * + * 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: Mitch Watrous + */ + +#include "uan-transducer.h" + +namespace ns3 { + +NS_OBJECT_ENSURE_REGISTERED (UanTransducer); + +TypeId UanTransducer::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::UanTransducer") + .SetParent (); + return tid; +} + +} // namespace ns3 diff --git a/src/uan/model/uan-transducer.h b/src/uan/model/uan-transducer.h index ba69e9cb3..aa7fd1645 100644 --- a/src/uan/model/uan-transducer.h +++ b/src/uan/model/uan-transducer.h @@ -123,6 +123,8 @@ private: class UanTransducer : public Object { public: + static TypeId GetTypeId (void); + /** * \brief Transducer state (receiving or transmitting) */ diff --git a/src/uan/wscript b/src/uan/wscript index 2ae8f189c..d72cabf8d 100644 --- a/src/uan/wscript +++ b/src/uan/wscript @@ -5,6 +5,8 @@ def build(bld): module.source = [ 'model/uan-channel.cc', 'model/uan-phy-gen.cc', + 'model/uan-mac.cc', + 'model/uan-transducer.cc', 'model/uan-transducer-hd.cc', 'model/uan-address.cc', 'model/uan-net-device.cc', diff --git a/src/wimax/model/bandwidth-manager.cc b/src/wimax/model/bandwidth-manager.cc index 376c07ac4..1772233e1 100644 --- a/src/wimax/model/bandwidth-manager.cc +++ b/src/wimax/model/bandwidth-manager.cc @@ -37,6 +37,15 @@ NS_LOG_COMPONENT_DEFINE ("BandwidthManager"); namespace ns3 { +NS_OBJECT_ENSURE_REGISTERED (BandwidthManager); + +TypeId BandwidthManager::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::BandwidthManager") + .SetParent (); + return tid; +} + BandwidthManager::BandwidthManager (Ptr device) : m_device (device), m_nrBwReqsSent (0) diff --git a/src/wimax/model/bandwidth-manager.h b/src/wimax/model/bandwidth-manager.h index 7540ea6d6..8e1c726f9 100644 --- a/src/wimax/model/bandwidth-manager.h +++ b/src/wimax/model/bandwidth-manager.h @@ -54,6 +54,7 @@ class UplinkScheduler; class BandwidthManager : public Object { public: + static TypeId GetTypeId (void); BandwidthManager (Ptr device); ~BandwidthManager (void); void DoDispose (void); diff --git a/src/wimax/model/bs-link-manager.cc b/src/wimax/model/bs-link-manager.cc index 6fd7ca1cb..9dc50231f 100644 --- a/src/wimax/model/bs-link-manager.cc +++ b/src/wimax/model/bs-link-manager.cc @@ -36,7 +36,14 @@ NS_LOG_COMPONENT_DEFINE ("BSLinkManager"); namespace ns3 { -NS_OBJECT_ENSURE_REGISTERED ( BSLinkManager); +NS_OBJECT_ENSURE_REGISTERED (BSLinkManager); + +TypeId BSLinkManager::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::BSLinkManager") + .SetParent (); + return tid; +} BSLinkManager::BSLinkManager (Ptr bs) : m_bs (bs), diff --git a/src/wimax/model/bs-link-manager.h b/src/wimax/model/bs-link-manager.h index 8b63c9014..9c73a6f3d 100644 --- a/src/wimax/model/bs-link-manager.h +++ b/src/wimax/model/bs-link-manager.h @@ -38,6 +38,7 @@ namespace ns3 { class BSLinkManager : public Object { public: + static TypeId GetTypeId (void); BSLinkManager (Ptr bs); ~BSLinkManager (void); /** diff --git a/src/wimax/model/burst-profile-manager.cc b/src/wimax/model/burst-profile-manager.cc index 28fe5db52..4bc4ebaaa 100644 --- a/src/wimax/model/burst-profile-manager.cc +++ b/src/wimax/model/burst-profile-manager.cc @@ -31,6 +31,15 @@ NS_LOG_COMPONENT_DEFINE ("BurstProfileManager"); namespace ns3 { +NS_OBJECT_ENSURE_REGISTERED (BurstProfileManager); + +TypeId BurstProfileManager::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::BurstProfileManager") + .SetParent (); + return tid; +} + BurstProfileManager::BurstProfileManager (Ptr device) : m_device (device) { diff --git a/src/wimax/model/burst-profile-manager.h b/src/wimax/model/burst-profile-manager.h index a915931d3..df0ff6739 100644 --- a/src/wimax/model/burst-profile-manager.h +++ b/src/wimax/model/burst-profile-manager.h @@ -37,6 +37,7 @@ class RngReq; class BurstProfileManager : public Object { public: + static TypeId GetTypeId (void); BurstProfileManager (Ptr device); ~BurstProfileManager (void); void DoDispose (void); diff --git a/src/wimax/model/connection-manager.cc b/src/wimax/model/connection-manager.cc index cf67a8c81..2cca97390 100644 --- a/src/wimax/model/connection-manager.cc +++ b/src/wimax/model/connection-manager.cc @@ -35,6 +35,15 @@ NS_LOG_COMPONENT_DEFINE ("ConnectionManager"); namespace ns3 { +NS_OBJECT_ENSURE_REGISTERED (ConnectionManager); + +TypeId ConnectionManager::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::ConnectionManager") + .SetParent (); + return tid; +} + ConnectionManager::ConnectionManager (void) : m_cidFactory (0) { diff --git a/src/wimax/model/connection-manager.h b/src/wimax/model/connection-manager.h index 9153ff2c8..f0f187e1b 100644 --- a/src/wimax/model/connection-manager.h +++ b/src/wimax/model/connection-manager.h @@ -44,6 +44,7 @@ class SubscriberStationNetDevice; class ConnectionManager : public Object { public: + static TypeId GetTypeId (void); ConnectionManager (void); ~ConnectionManager (void); void DoDispose (void); diff --git a/src/wimax/model/ipcs-classifier.cc b/src/wimax/model/ipcs-classifier.cc index 733c89010..2eae1d756 100644 --- a/src/wimax/model/ipcs-classifier.cc +++ b/src/wimax/model/ipcs-classifier.cc @@ -35,6 +35,15 @@ NS_LOG_COMPONENT_DEFINE ("IpcsClassifier"); namespace ns3 { +NS_OBJECT_ENSURE_REGISTERED (IpcsClassifier); + +TypeId IpcsClassifier::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::IpcsClassifier") + .SetParent (); + return tid; +} + IpcsClassifier::IpcsClassifier (void) { } diff --git a/src/wimax/model/ipcs-classifier.h b/src/wimax/model/ipcs-classifier.h index 37bdf6d2b..4c2c55f31 100644 --- a/src/wimax/model/ipcs-classifier.h +++ b/src/wimax/model/ipcs-classifier.h @@ -37,6 +37,7 @@ class SsServiceFlowManager; class IpcsClassifier : public Object { public: + static TypeId GetTypeId (void); IpcsClassifier (void); ~IpcsClassifier (void); /** diff --git a/src/wimax/model/service-flow-manager.cc b/src/wimax/model/service-flow-manager.cc index 73e87e290..2d3eda046 100644 --- a/src/wimax/model/service-flow-manager.cc +++ b/src/wimax/model/service-flow-manager.cc @@ -43,6 +43,15 @@ NS_LOG_COMPONENT_DEFINE ("ServiceFlowManager"); namespace ns3 { +NS_OBJECT_ENSURE_REGISTERED (ServiceFlowManager); + +TypeId ServiceFlowManager::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::ServiceFlowManager") + .SetParent (); + return tid; +} + ServiceFlowManager::ServiceFlowManager () { m_serviceFlows = new std::vector; diff --git a/src/wimax/model/service-flow-manager.h b/src/wimax/model/service-flow-manager.h index 919296835..8592e95e9 100644 --- a/src/wimax/model/service-flow-manager.h +++ b/src/wimax/model/service-flow-manager.h @@ -47,6 +47,8 @@ public: CONFIRMATION_CODE_SUCCESS, CONFIRMATION_CODE_REJECT }; + static TypeId GetTypeId (void); + ServiceFlowManager (); ~ServiceFlowManager (void); void DoDispose (void); diff --git a/src/wimax/model/ss-link-manager.cc b/src/wimax/model/ss-link-manager.cc index 8b3033fe5..ca71a872e 100644 --- a/src/wimax/model/ss-link-manager.cc +++ b/src/wimax/model/ss-link-manager.cc @@ -35,6 +35,15 @@ NS_LOG_COMPONENT_DEFINE ("SSLinkManager"); namespace ns3 { +NS_OBJECT_ENSURE_REGISTERED (SSLinkManager); + +TypeId SSLinkManager::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::SSLinkManager") + .SetParent (); + return tid; +} + SSLinkManager::SSLinkManager (Ptr ss) : m_ss (ss), m_rangingStatus (WimaxNetDevice::RANGING_STATUS_EXPIRED), diff --git a/src/wimax/model/ss-link-manager.h b/src/wimax/model/ss-link-manager.h index 2c5b7aa5e..d00d04ada 100644 --- a/src/wimax/model/ss-link-manager.h +++ b/src/wimax/model/ss-link-manager.h @@ -41,6 +41,7 @@ namespace ns3 { class SSLinkManager : public Object { public: + static TypeId GetTypeId (void); SSLinkManager (Ptr ss); ~SSLinkManager (void); void DoDispose (void); diff --git a/src/wimax/model/ss-manager.cc b/src/wimax/model/ss-manager.cc index a9760f72b..689957e57 100644 --- a/src/wimax/model/ss-manager.cc +++ b/src/wimax/model/ss-manager.cc @@ -28,7 +28,14 @@ NS_LOG_COMPONENT_DEFINE ("SSManager"); namespace ns3 { -NS_OBJECT_ENSURE_REGISTERED ( SSManager); +NS_OBJECT_ENSURE_REGISTERED (SSManager); + +TypeId SSManager::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::SSManager") + .SetParent (); + return tid; +} SSManager::SSManager (void) { diff --git a/src/wimax/model/ss-manager.h b/src/wimax/model/ss-manager.h index f3f3b050f..1a6410045 100644 --- a/src/wimax/model/ss-manager.h +++ b/src/wimax/model/ss-manager.h @@ -37,6 +37,7 @@ namespace ns3 { class SSManager : public Object { public: + static TypeId GetTypeId (void); SSManager (void); ~SSManager (void); SSRecord* CreateSSRecord (const Mac48Address &macAddress); diff --git a/src/wimax/model/ss-scheduler.cc b/src/wimax/model/ss-scheduler.cc index 8dcee937a..02814229f 100644 --- a/src/wimax/model/ss-scheduler.cc +++ b/src/wimax/model/ss-scheduler.cc @@ -36,6 +36,13 @@ NS_LOG_COMPONENT_DEFINE ("SSScheduler"); namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (SSScheduler); +TypeId SSScheduler::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::SSScheduler") + .SetParent (); + return tid; +} + SSScheduler::SSScheduler (Ptr ss) : m_ss (ss), m_pollMe (false) diff --git a/src/wimax/model/ss-scheduler.h b/src/wimax/model/ss-scheduler.h index 25b23a4ac..d6041d4f3 100644 --- a/src/wimax/model/ss-scheduler.h +++ b/src/wimax/model/ss-scheduler.h @@ -41,6 +41,7 @@ class SSScheduler : public Object { public: + static TypeId GetTypeId (void); SSScheduler (Ptr ss); ~SSScheduler (void); diff --git a/src/wimax/model/wimax-channel.cc b/src/wimax/model/wimax-channel.cc index 28d2242e5..c877d6c3d 100644 --- a/src/wimax/model/wimax-channel.cc +++ b/src/wimax/model/wimax-channel.cc @@ -27,6 +27,15 @@ NS_LOG_COMPONENT_DEFINE ("WimaxChannel"); namespace ns3 { +NS_OBJECT_ENSURE_REGISTERED (WimaxChannel); + +TypeId WimaxChannel::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::WimaxChannel") + .SetParent (); + return tid; +} + WimaxChannel::WimaxChannel (void) { } diff --git a/src/wimax/model/wimax-channel.h b/src/wimax/model/wimax-channel.h index 14e3bcd9f..388c23959 100644 --- a/src/wimax/model/wimax-channel.h +++ b/src/wimax/model/wimax-channel.h @@ -39,6 +39,7 @@ class PacketBurst; class WimaxChannel : public Channel { public: + static TypeId GetTypeId (void); WimaxChannel (void); virtual ~WimaxChannel (void); /**