From bfdb6ef10a5fae2dbb36bcb4caa36119196db18d Mon Sep 17 00:00:00 2001 From: "Peter D. Barnes, Jr." Date: Fri, 26 Sep 2014 15:51:00 -0700 Subject: [PATCH] [Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace? --- doc/manual/source/logging.rst | 6 ++--- examples/energy/energy-model-example.cc | 4 ++-- .../energy-model-with-harvesting-example.cc | 4 ++-- examples/ipv6/fragmentation-ipv6.cc | 1 - examples/ipv6/loose-routing-ipv6.cc | 1 + examples/ipv6/test-ipv6.cc | 4 ++-- examples/stats/wifi-example-sim.cc | 3 --- examples/tcp/tcp-large-transfer.cc | 1 - examples/tutorial/hello-simulator.cc | 4 ++-- examples/wireless/multirate.cc | 4 ++-- examples/wireless/wifi-adhoc.cc | 4 ++-- examples/wireless/wifi-clear-channel-cmu.cc | 4 ++-- examples/wireless/wifi-simple-adhoc-grid.cc | 4 ++-- examples/wireless/wifi-simple-adhoc.cc | 4 ++-- examples/wireless/wifi-simple-infra.cc | 4 ++-- examples/wireless/wifi-simple-interference.cc | 4 ++-- examples/wireless/wifi-sleep.cc | 4 ++-- scratch/scratch-simulator.cc | 4 ++-- scratch/subdir/scratch-simulator-subdir.cc | 4 ++-- src/antenna/model/angles.cc | 3 +-- src/antenna/model/antenna-model.cc | 4 ++-- src/antenna/model/cosine-antenna-model.cc | 4 ++-- src/antenna/model/isotropic-antenna-model.cc | 4 ++-- src/antenna/model/parabolic-antenna-model.cc | 4 ++-- src/antenna/test/test-cosine-antenna.cc | 4 ++-- src/antenna/test/test-parabolic-antenna.cc | 4 ++-- src/aodv/model/aodv-neighbor.cc | 4 +++- src/aodv/model/aodv-routing-protocol.cc | 5 ++-- src/aodv/model/aodv-rqueue.cc | 5 ++-- src/aodv/model/aodv-rtable.cc | 5 ++-- src/applications/helper/radvd-helper.cc | 4 ++-- .../model/application-packet-probe.cc | 4 ++-- .../model/bulk-send-application.cc | 4 ++-- src/applications/model/onoff-application.cc | 4 ++-- src/applications/model/packet-loss-counter.cc | 3 +-- src/applications/model/packet-sink.cc | 4 ++-- src/applications/model/ping6.cc | 4 ++-- src/applications/model/radvd-interface.cc | 4 ++-- src/applications/model/radvd-prefix.cc | 4 ++-- src/applications/model/radvd.cc | 4 ++-- src/applications/model/seq-ts-header.cc | 4 ++-- src/applications/model/udp-client.cc | 4 ++-- src/applications/model/udp-echo-client.cc | 4 ++-- src/applications/model/udp-echo-server.cc | 4 ++-- src/applications/model/udp-server.cc | 4 ++-- src/applications/model/udp-trace-client.cc | 4 ++-- src/applications/model/v4ping.cc | 4 ++-- src/bridge/helper/bridge-helper.cc | 4 ++-- src/bridge/model/bridge-channel.cc | 4 ++-- src/bridge/model/bridge-net-device.cc | 4 ++-- src/brite/helper/brite-topology-helper.cc | 4 ++-- src/buildings/helper/building-allocator.cc | 4 ++-- src/buildings/helper/buildings-helper.cc | 3 +-- src/buildings/model/building-list.cc | 4 ++-- src/buildings/model/building.cc | 3 +-- .../model/buildings-propagation-loss-model.cc | 4 ++-- ...hybrid-buildings-propagation-loss-model.cc | 4 ++-- .../itu-r-1238-propagation-loss-model.cc | 4 ++-- src/buildings/model/mobility-building-info.cc | 4 ++-- .../oh-buildings-propagation-loss-model.cc | 4 ++-- .../test/building-position-allocator-test.cc | 3 +-- src/buildings/test/buildings-helper-test.cc | 3 +-- src/buildings/test/buildings-pathloss-test.cc | 3 +-- .../test/buildings-shadowing-test.cc | 4 +--- .../helper/click-internet-stack-helper.cc | 4 ++-- src/click/model/ipv4-click-routing.cc | 4 ++-- src/click/model/ipv4-l3-click-protocol.cc | 4 ++-- src/config-store/model/attribute-iterator.cc | 3 +-- src/config-store/model/config-store.cc | 3 +-- src/config-store/model/gtk-config-store.cc | 3 +-- src/config-store/model/raw-text-config.cc | 4 ++-- src/config-store/model/xml-config.cc | 4 ++-- src/core/examples/hash-example.cc | 5 ++-- .../helper/random-variable-stream-helper.cc | 4 ++-- src/core/model/attribute-construction-list.cc | 4 ++-- src/core/model/attribute.cc | 4 ++-- src/core/model/boolean.cc | 4 ++-- src/core/model/breakpoint.cc | 4 ++-- src/core/model/calendar-scheduler.cc | 4 ++-- src/core/model/callback.cc | 24 +++++++++++++++++-- src/core/model/command-line.cc | 4 ++-- src/core/model/config.cc | 4 ++-- src/core/model/default-simulator-impl.cc | 6 ++--- src/core/model/double.cc | 4 ++-- src/core/model/enum.cc | 4 ++-- src/core/model/event-id.cc | 4 ++-- src/core/model/event-impl.cc | 4 ++-- src/core/model/fatal-impl.cc | 5 ++-- src/core/model/global-value.cc | 4 ++-- src/core/model/hash-fnv.cc | 4 ++-- src/core/model/hash-function.cc | 4 ++-- src/core/model/hash-murmur3.cc | 4 ++-- src/core/model/hash.cc | 4 ++-- src/core/model/heap-scheduler.cc | 4 ++-- src/core/model/int64x64-128.cc | 5 ++-- src/core/model/int64x64-cairo.cc | 12 ++++------ src/core/model/int64x64.cc | 6 ++--- src/core/model/integer.cc | 4 ++-- src/core/model/list-scheduler.cc | 3 +-- src/core/model/make-event.cc | 4 ++-- src/core/model/map-scheduler.cc | 4 ++-- src/core/model/names.cc | 4 ++-- src/core/model/object-base.cc | 4 ++-- src/core/model/object-factory.cc | 4 ++-- src/core/model/object-ptr-container.cc | 4 ++-- src/core/model/object.cc | 4 ++-- src/core/model/pointer.cc | 4 ++-- src/core/model/random-variable-stream.cc | 4 ++-- src/core/model/random-variable.cc | 4 ++-- src/core/model/realtime-simulator-impl.cc | 6 ++--- src/core/model/ref-count-base.cc | 4 ++-- src/core/model/rng-seed-manager.cc | 4 ++-- src/core/model/rng-stream.cc | 6 ++++- src/core/model/scheduler.cc | 4 ++-- src/core/model/simulator-impl.cc | 4 ++-- src/core/model/simulator.cc | 5 ++-- src/core/model/synchronizer.cc | 4 ++-- src/core/model/system-path.cc | 4 ++-- src/core/model/system-thread.cc | 4 ++-- src/core/model/test.cc | 4 ++-- src/core/model/time.cc | 4 ++-- src/core/model/timer.cc | 4 ++-- src/core/model/trace-source-accessor.cc | 4 ++-- src/core/model/type-id.cc | 4 ++-- src/core/model/uinteger.cc | 4 ++-- src/core/model/unix-fd-reader.cc | 4 ++-- src/core/model/unix-system-condition.cc | 4 ++-- src/core/model/unix-system-mutex.cc | 4 ++-- src/core/model/unix-system-wall-clock-ms.cc | 4 ++-- src/core/model/vector.cc | 4 ++-- src/core/model/wall-clock-synchronizer.cc | 4 ++-- src/core/model/watchdog.cc | 4 ++-- src/csma-layout/model/csma-star-helper.cc | 4 ++-- src/csma/helper/csma-helper.cc | 4 ++-- src/csma/model/backoff.cc | 4 ++-- src/csma/model/csma-channel.cc | 4 ++-- src/csma/model/csma-net-device.cc | 4 ++-- src/dsdv/model/dsdv-packet-queue.cc | 5 ++-- src/dsdv/model/dsdv-routing-protocol.cc | 5 ++-- src/dsdv/model/dsdv-rtable.cc | 5 ++-- src/dsr/examples/dsr.cc | 1 + src/dsr/helper/dsr-helper.cc | 4 ++-- src/dsr/helper/dsr-main-helper.cc | 4 ++-- src/dsr/model/dsr-errorbuff.cc | 5 ++-- src/dsr/model/dsr-fs-header.cc | 3 ++- src/dsr/model/dsr-gratuitous-reply-table.cc | 5 ++-- src/dsr/model/dsr-maintain-buff.cc | 5 ++-- src/dsr/model/dsr-network-queue.cc | 5 ++-- src/dsr/model/dsr-option-header.cc | 4 +++- src/dsr/model/dsr-options.cc | 5 ++-- src/dsr/model/dsr-passive-buff.cc | 5 ++-- src/dsr/model/dsr-rcache.cc | 5 ++-- src/dsr/model/dsr-routing.cc | 5 ++-- src/dsr/model/dsr-rreq-table.cc | 5 ++-- src/dsr/model/dsr-rsendbuff.cc | 5 ++-- src/emu/helper/emu-helper.cc | 4 ++-- src/emu/model/emu-net-device.cc | 4 ++-- .../helper/energy-harvester-container.cc | 4 ++-- src/energy/model/basic-energy-harvester.cc | 4 ++-- src/energy/model/basic-energy-source.cc | 4 ++-- .../model/device-energy-model-container.cc | 4 ++-- src/energy/model/device-energy-model.cc | 4 ++-- src/energy/model/energy-harvester.cc | 4 ++-- src/energy/model/energy-source.cc | 4 ++-- src/energy/model/li-ion-energy-source.cc | 4 ++-- src/energy/model/rv-battery-model.cc | 4 ++-- .../model/simple-device-energy-model.cc | 4 ++-- src/energy/model/wifi-radio-energy-model.cc | 4 ++-- src/energy/model/wifi-tx-current-model.cc | 4 ++-- .../helper/emu-fd-net-device-helper.cc | 4 ++-- .../helper/fd-net-device-helper.cc | 4 ++-- .../helper/planetlab-fd-net-device-helper.cc | 4 ++-- .../helper/tap-fd-net-device-helper.cc | 4 ++-- src/fd-net-device/model/fd-net-device.cc | 4 ++-- src/flow-monitor/model/flow-monitor.cc | 4 ++-- src/flow-monitor/model/histogram.cc | 4 ++-- src/flow-monitor/model/ipv4-flow-probe.cc | 4 ++-- src/flow-monitor/model/ipv6-flow-probe.cc | 4 ++-- src/internet/helper/internet-stack-helper.cc | 4 ++-- src/internet/helper/internet-trace-helper.cc | 4 ++-- src/internet/helper/ipv4-address-helper.cc | 4 ++-- .../helper/ipv4-global-routing-helper.cc | 4 ++-- .../helper/ipv4-static-routing-helper.cc | 4 ++-- .../helper/ipv6-static-routing-helper.cc | 4 ++-- src/internet/model/arp-cache.cc | 4 ++-- src/internet/model/arp-header.cc | 4 ++-- src/internet/model/arp-l3-protocol.cc | 4 ++-- src/internet/model/candidate-queue.cc | 4 ++-- src/internet/model/codel-queue.cc | 4 ++-- .../model/global-route-manager-impl.cc | 4 ++-- src/internet/model/global-route-manager.cc | 4 ++-- src/internet/model/global-router-interface.cc | 4 ++-- src/internet/model/icmpv4-l4-protocol.cc | 4 ++-- src/internet/model/icmpv4.cc | 4 ++-- src/internet/model/icmpv6-header.cc | 4 ++-- src/internet/model/icmpv6-l4-protocol.cc | 6 ++--- src/internet/model/ip-l4-protocol.cc | 4 ++-- src/internet/model/ipv4-address-generator.cc | 4 ++-- src/internet/model/ipv4-end-point-demux.cc | 4 ++-- src/internet/model/ipv4-end-point.cc | 4 ++-- src/internet/model/ipv4-global-routing.cc | 4 ++-- src/internet/model/ipv4-header.cc | 4 ++-- src/internet/model/ipv4-interface-address.cc | 4 ++-- src/internet/model/ipv4-interface.cc | 4 ++-- src/internet/model/ipv4-l3-protocol.cc | 4 ++-- src/internet/model/ipv4-list-routing.cc | 4 ++-- src/internet/model/ipv4-packet-info-tag.cc | 4 ++-- src/internet/model/ipv4-packet-probe.cc | 4 ++-- .../model/ipv4-raw-socket-factory-impl.cc | 4 ++-- src/internet/model/ipv4-raw-socket-factory.cc | 4 ++-- src/internet/model/ipv4-raw-socket-impl.cc | 4 ++-- src/internet/model/ipv4-route.cc | 4 ++-- src/internet/model/ipv4-routing-protocol.cc | 4 ++-- .../model/ipv4-routing-table-entry.cc | 4 ++-- src/internet/model/ipv4-static-routing.cc | 4 ++-- src/internet/model/ipv4.cc | 4 ++-- src/internet/model/ipv6-address-generator.cc | 4 ++-- .../model/ipv6-autoconfigured-prefix.cc | 4 ++-- src/internet/model/ipv6-end-point-demux.cc | 4 ++-- src/internet/model/ipv6-extension.cc | 4 ++-- src/internet/model/ipv6-header.cc | 4 ++-- src/internet/model/ipv6-l3-protocol.cc | 4 ++-- src/internet/model/ipv6-list-routing.cc | 4 ++-- src/internet/model/ipv6-option.cc | 4 ++-- src/internet/model/ipv6-packet-probe.cc | 4 ++-- src/internet/model/ipv6-pmtu-cache.cc | 4 ++-- src/internet/model/ipv6-raw-socket-impl.cc | 1 - src/internet/model/ipv6-static-routing.cc | 4 ++-- src/internet/model/loopback-net-device.cc | 4 ++-- src/internet/model/nsc-tcp-l4-protocol.cc | 4 ++-- src/internet/model/nsc-tcp-socket-impl.cc | 4 ++-- src/internet/model/pending-data.cc | 4 ++-- src/internet/model/ripng.cc | 8 +++---- src/internet/model/rtt-estimator.cc | 4 ++-- src/internet/model/tcp-header.cc | 4 ++-- src/internet/model/tcp-l4-protocol.cc | 4 ++-- src/internet/model/tcp-newreno.cc | 4 ++-- src/internet/model/tcp-option-rfc793.cc | 4 ++-- src/internet/model/tcp-option-ts.cc | 3 ++- src/internet/model/tcp-option-winscale.cc | 3 ++- src/internet/model/tcp-option.cc | 4 ++-- src/internet/model/tcp-reno.cc | 4 ++-- src/internet/model/tcp-rfc793.cc | 4 ++-- src/internet/model/tcp-rx-buffer.cc | 4 ++-- src/internet/model/tcp-socket-base.cc | 4 ++-- src/internet/model/tcp-socket.cc | 4 ++-- src/internet/model/tcp-tahoe.cc | 4 ++-- src/internet/model/tcp-tx-buffer.cc | 4 ++-- src/internet/model/tcp-westwood.cc | 4 ++-- src/internet/model/udp-l4-protocol.cc | 4 ++-- src/internet/model/udp-socket-impl.cc | 4 ++-- src/internet/model/udp-socket.cc | 4 ++-- src/internet/test/error-channel.cc | 4 ++-- .../test/ipv6-dual-stack-test-suite.cc | 4 ++-- src/internet/test/rtt-test.cc | 4 ++-- src/internet/test/tcp-test.cc | 4 ++-- src/internet/test/tcp-timestamp-test.cc | 4 ++-- src/internet/test/tcp-wscaling-test.cc | 4 ++-- src/lr-wpan/helper/lr-wpan-helper.cc | 4 ++-- src/lr-wpan/model/lr-wpan-csmaca.cc | 4 ++-- src/lr-wpan/model/lr-wpan-error-model.cc | 4 ++-- .../model/lr-wpan-interference-helper.cc | 4 ++-- src/lr-wpan/model/lr-wpan-mac.cc | 4 ++-- src/lr-wpan/model/lr-wpan-net-device.cc | 4 ++-- src/lr-wpan/model/lr-wpan-phy.cc | 4 ++-- .../lr-wpan-spectrum-signal-parameters.cc | 4 ++-- .../model/lr-wpan-spectrum-value-helper.cc | 4 ++-- src/lr-wpan/test/lr-wpan-ack-test.cc | 4 ++-- src/lr-wpan/test/lr-wpan-cca-test.cc | 4 ++-- src/lr-wpan/test/lr-wpan-collision-test.cc | 4 ++-- src/lr-wpan/test/lr-wpan-ed-test.cc | 4 ++-- src/lr-wpan/test/lr-wpan-error-model-test.cc | 4 ++-- src/lr-wpan/test/lr-wpan-packet-test.cc | 4 ++-- src/lte/examples/lena-dual-stripe.cc | 2 -- src/lte/examples/lena-pathloss-traces.cc | 2 -- src/lte/examples/lena-simple-epc-emu.cc | 4 +--- src/lte/examples/lena-simple-epc.cc | 2 ++ src/lte/helper/emu-epc-helper.cc | 4 ++-- src/lte/helper/epc-helper.cc | 4 ++-- .../helper/lte-global-pathloss-database.cc | 4 ++-- src/lte/helper/lte-helper.cc | 4 ++-- .../lte-hex-grid-enb-topology-helper.cc | 4 ++-- src/lte/helper/lte-stats-calculator.cc | 4 ++-- src/lte/helper/mac-stats-calculator.cc | 4 ++-- src/lte/helper/phy-rx-stats-calculator.cc | 4 ++-- src/lte/helper/phy-stats-calculator.cc | 4 ++-- src/lte/helper/phy-tx-stats-calculator.cc | 4 ++-- src/lte/helper/point-to-point-epc-helper.cc | 4 ++-- .../helper/radio-bearer-stats-connector.cc | 4 +--- .../helper/radio-environment-map-helper.cc | 4 +--- .../model/a2-a4-rsrq-handover-algorithm.cc | 5 ++-- src/lte/model/a3-rsrp-handover-algorithm.cc | 4 ++-- src/lte/model/cqa-ff-mac-scheduler.cc | 4 ++-- src/lte/model/epc-enb-application.cc | 4 ++-- src/lte/model/epc-gtpu-header.cc | 4 ++-- src/lte/model/epc-mme.cc | 5 +--- src/lte/model/epc-sgw-pgw-application.cc | 3 +-- src/lte/model/epc-tft-classifier.cc | 4 ++-- src/lte/model/epc-tft.cc | 4 ++-- src/lte/model/epc-ue-nas.cc | 3 +-- src/lte/model/epc-x2-header.cc | 3 +-- src/lte/model/epc-x2.cc | 3 +-- src/lte/model/fdbet-ff-mac-scheduler.cc | 4 ++-- src/lte/model/fdmt-ff-mac-scheduler.cc | 4 ++-- src/lte/model/fdtbfq-ff-mac-scheduler.cc | 4 ++-- src/lte/model/ff-mac-scheduler.cc | 4 ++-- src/lte/model/lte-amc.cc | 4 ++-- src/lte/model/lte-anr.cc | 4 ++-- src/lte/model/lte-asn1-header.cc | 4 ++-- src/lte/model/lte-chunk-processor.cc | 4 ++-- src/lte/model/lte-common.cc | 3 +-- src/lte/model/lte-control-messages.cc | 5 ++-- src/lte/model/lte-enb-mac.cc | 3 +-- src/lte/model/lte-enb-net-device.cc | 4 ++-- src/lte/model/lte-enb-phy.cc | 4 ++-- src/lte/model/lte-enb-rrc.cc | 4 +--- src/lte/model/lte-ffr-algorithm.cc | 4 ++-- .../model/lte-ffr-distributed-algorithm.cc | 4 ++-- src/lte/model/lte-ffr-enhanced-algorithm.cc | 4 ++-- src/lte/model/lte-ffr-soft-algorithm.cc | 4 ++-- src/lte/model/lte-fr-hard-algorithm.cc | 4 ++-- src/lte/model/lte-fr-no-op-algorithm.cc | 4 ++-- src/lte/model/lte-fr-soft-algorithm.cc | 4 ++-- src/lte/model/lte-fr-strict-algorithm.cc | 4 ++-- src/lte/model/lte-handover-algorithm.cc | 4 ++-- src/lte/model/lte-harq-phy.cc | 4 ++-- src/lte/model/lte-interference.cc | 3 +-- src/lte/model/lte-mi-error-model.cc | 4 ++-- src/lte/model/lte-net-device.cc | 4 ++-- src/lte/model/lte-pdcp-header.cc | 4 ++-- src/lte/model/lte-pdcp.cc | 3 +-- src/lte/model/lte-phy.cc | 3 +-- src/lte/model/lte-rlc-am-header.cc | 4 ++-- src/lte/model/lte-rlc-am.cc | 4 ++-- src/lte/model/lte-rlc-header.cc | 4 ++-- src/lte/model/lte-rlc-tm.cc | 4 ++-- src/lte/model/lte-rlc-um.cc | 4 ++-- src/lte/model/lte-rlc.cc | 3 +-- src/lte/model/lte-rrc-header.cc | 4 ++-- src/lte/model/lte-rrc-protocol-ideal.cc | 4 +--- src/lte/model/lte-rrc-protocol-real.cc | 4 +--- src/lte/model/lte-spectrum-phy.cc | 3 +-- .../model/lte-spectrum-signal-parameters.cc | 4 ++-- src/lte/model/lte-spectrum-value-helper.cc | 4 ++-- src/lte/model/lte-ue-mac.cc | 4 ++-- src/lte/model/lte-ue-net-device.cc | 4 ++-- src/lte/model/lte-ue-phy.cc | 3 +-- src/lte/model/lte-ue-power-control.cc | 4 ++-- src/lte/model/lte-ue-rrc.cc | 3 +-- .../model/lte-vendor-specific-parameters.cc | 4 ++-- src/lte/model/no-op-handover-algorithm.cc | 4 ++-- src/lte/model/pf-ff-mac-scheduler.cc | 4 ++-- src/lte/model/pss-ff-mac-scheduler.cc | 4 ++-- src/lte/model/rem-spectrum-phy.cc | 4 ++-- src/lte/model/rr-ff-mac-scheduler.cc | 4 ++-- src/lte/model/tdbet-ff-mac-scheduler.cc | 4 ++-- src/lte/model/tdmt-ff-mac-scheduler.cc | 4 ++-- src/lte/model/tdtbfq-ff-mac-scheduler.cc | 4 ++-- src/lte/model/trace-fading-loss-model.cc | 4 ++-- src/lte/model/tta-ff-mac-scheduler.cc | 4 ++-- src/lte/test/epc-test-gtpu.cc | 3 +-- src/lte/test/epc-test-s1u-downlink.cc | 2 -- src/lte/test/epc-test-s1u-uplink.cc | 2 -- src/lte/test/lte-ffr-simple.cc | 4 ++-- src/lte/test/lte-simple-helper.cc | 3 +-- src/lte/test/lte-simple-net-device.cc | 3 +-- src/lte/test/lte-simple-spectrum-phy.cc | 4 ++-- src/lte/test/lte-test-cell-selection.cc | 3 +-- src/lte/test/lte-test-cqa-ff-mac-scheduler.cc | 4 ++-- src/lte/test/lte-test-cqi-generation.cc | 4 ++-- .../test/lte-test-downlink-power-control.cc | 4 ++-- src/lte/test/lte-test-downlink-sinr.cc | 4 ++-- src/lte/test/lte-test-earfcn.cc | 4 ++-- src/lte/test/lte-test-entities.cc | 3 +-- src/lte/test/lte-test-fading.cc | 3 +-- .../test/lte-test-fdbet-ff-mac-scheduler.cc | 4 ++-- .../test/lte-test-fdmt-ff-mac-scheduler.cc | 4 ++-- .../test/lte-test-fdtbfq-ff-mac-scheduler.cc | 4 ++-- src/lte/test/lte-test-frequency-reuse.cc | 4 ++-- src/lte/test/lte-test-harq.cc | 3 +-- src/lte/test/lte-test-interference-fr.cc | 4 ++-- src/lte/test/lte-test-interference.cc | 3 +-- src/lte/test/lte-test-link-adaptation.cc | 3 +-- src/lte/test/lte-test-mimo.cc | 3 +-- src/lte/test/lte-test-pathloss-model.cc | 3 +-- src/lte/test/lte-test-pf-ff-mac-scheduler.cc | 4 ++-- src/lte/test/lte-test-phy-error-model.cc | 3 +-- src/lte/test/lte-test-pss-ff-mac-scheduler.cc | 4 ++-- src/lte/test/lte-test-rlc-am-e2e.cc | 3 +-- src/lte/test/lte-test-rlc-am-transmitter.cc | 3 +-- src/lte/test/lte-test-rlc-um-e2e.cc | 3 +-- src/lte/test/lte-test-rlc-um-transmitter.cc | 3 +-- src/lte/test/lte-test-rr-ff-mac-scheduler.cc | 3 +-- src/lte/test/lte-test-sinr-chunk-processor.cc | 3 +-- .../test/lte-test-spectrum-value-helper.cc | 4 ++-- .../test/lte-test-tdbet-ff-mac-scheduler.cc | 4 ++-- .../test/lte-test-tdmt-ff-mac-scheduler.cc | 4 ++-- .../test/lte-test-tdtbfq-ff-mac-scheduler.cc | 4 ++-- src/lte/test/lte-test-tta-ff-mac-scheduler.cc | 4 ++-- src/lte/test/lte-test-ue-measurements.cc | 3 +-- src/lte/test/lte-test-ue-phy.cc | 3 +-- src/lte/test/lte-test-uplink-power-control.cc | 4 ++-- src/lte/test/lte-test-uplink-sinr.cc | 3 +-- src/lte/test/test-asn1-encoding.cc | 4 ++-- src/lte/test/test-epc-tft-classifier.cc | 4 ++-- src/lte/test/test-lte-antenna.cc | 3 +-- src/lte/test/test-lte-epc-e2e-data.cc | 2 -- src/lte/test/test-lte-handover-delay.cc | 3 +-- src/lte/test/test-lte-handover-target.cc | 3 +-- src/lte/test/test-lte-rrc.cc | 4 ++-- src/lte/test/test-lte-x2-handover-measures.cc | 3 +-- src/lte/test/test-lte-x2-handover.cc | 4 ++-- src/mesh/examples/mesh.cc | 1 + src/mesh/model/dot11s/hwmp-protocol-mac.cc | 4 +++- src/mesh/model/dot11s/hwmp-protocol.cc | 5 ++-- src/mesh/model/dot11s/hwmp-rtable.cc | 3 ++- src/mesh/model/dot11s/peer-link.cc | 5 ++-- .../model/dot11s/peer-management-protocol.cc | 5 +++- src/mesh/model/flame/flame-protocol-mac.cc | 6 ++++- src/mesh/model/flame/flame-protocol.cc | 6 +++-- src/mesh/model/flame/flame-rtable.cc | 4 +++- src/mesh/model/mesh-l2-routing-protocol.cc | 4 ++-- src/mesh/model/mesh-point-device.cc | 4 ++-- src/mesh/model/mesh-wifi-interface-mac.cc | 4 ++-- src/mobility/helper/mobility-helper.cc | 4 ++-- src/mobility/helper/ns2-mobility-helper.cc | 4 ++-- .../model/constant-velocity-helper.cc | 4 ++-- src/mobility/model/position-allocator.cc | 4 ++-- .../random-direction-2d-mobility-model.cc | 4 ++-- .../model/random-walk-2d-mobility-model.cc | 4 ++-- src/mobility/model/waypoint-mobility-model.cc | 4 ++-- .../test/ns2-mobility-helper-test-suite.cc | 4 ++-- src/mpi/model/distributed-simulator-impl.cc | 4 ++-- .../granted-time-window-mpi-interface.cc | 3 +-- src/mpi/model/mpi-interface.cc | 4 ++-- src/mpi/model/null-message-mpi-interface.cc | 4 ++-- src/mpi/model/null-message-simulator-impl.cc | 4 ++-- src/netanim/model/animation-interface.cc | 4 ++-- .../helper/simple-net-device-helper.cc | 4 ++-- src/network/helper/trace-helper.cc | 4 ++-- src/network/model/address.cc | 4 ++-- src/network/model/application.cc | 4 ++-- src/network/model/buffer.cc | 4 ++-- src/network/model/byte-tag-list.cc | 4 ++-- src/network/model/channel-list.cc | 4 ++-- src/network/model/channel.cc | 4 ++-- src/network/model/header.cc | 4 ++-- src/network/model/net-device.cc | 4 ++-- src/network/model/nix-vector.cc | 4 ++-- src/network/model/node-list.cc | 4 ++-- src/network/model/node.cc | 4 ++-- src/network/model/packet-metadata.cc | 4 ++-- src/network/model/packet-tag-list.cc | 4 ++-- src/network/model/packet.cc | 4 ++-- src/network/model/socket-factory.cc | 4 ++-- src/network/model/socket.cc | 4 ++-- src/network/model/tag-buffer.cc | 4 ++-- src/network/model/trailer.cc | 4 ++-- src/network/utils/address-utils.cc | 4 ++-- src/network/utils/data-rate.cc | 16 ++++++------- src/network/utils/data-rate.h | 20 ++++++++++++++++ src/network/utils/drop-tail-queue.cc | 4 ++-- src/network/utils/error-model.cc | 4 ++-- src/network/utils/ethernet-header.cc | 4 ++-- src/network/utils/ethernet-trailer.cc | 4 ++-- src/network/utils/flow-id-tag.cc | 4 ++-- src/network/utils/inet-socket-address.cc | 4 ++-- src/network/utils/inet6-socket-address.cc | 4 ++-- src/network/utils/ipv4-address.cc | 4 ++-- src/network/utils/ipv6-address.cc | 4 ++-- src/network/utils/llc-snap-header.cc | 4 ++-- src/network/utils/mac16-address.cc | 4 ++-- src/network/utils/mac48-address.cc | 4 ++-- src/network/utils/mac64-address.cc | 4 ++-- src/network/utils/output-stream-wrapper.cc | 4 ++-- src/network/utils/packet-burst.cc | 4 ++-- src/network/utils/packet-data-calculators.cc | 1 - src/network/utils/packet-probe.cc | 4 ++-- src/network/utils/packet-socket-address.cc | 4 ++-- src/network/utils/packet-socket-client.cc | 4 ++-- src/network/utils/packet-socket-factory.cc | 4 ++-- src/network/utils/packet-socket-server.cc | 4 ++-- src/network/utils/packet-socket.cc | 4 ++-- src/network/utils/packetbb.cc | 4 ++-- src/network/utils/pcap-file-wrapper.cc | 4 ++-- src/network/utils/pcap-file.cc | 4 ++-- src/network/utils/queue.cc | 4 ++-- src/network/utils/radiotap-header.cc | 4 ++-- src/network/utils/red-queue.cc | 4 ++-- src/network/utils/simple-channel.cc | 4 ++-- src/network/utils/simple-net-device.cc | 4 ++-- .../model/ipv4-nix-vector-routing.cc | 4 ++-- src/olsr/examples/olsr-hna.cc | 4 ++-- src/olsr/model/olsr-header.cc | 5 ++-- src/olsr/model/olsr-routing-protocol.cc | 4 ++-- src/openflow/helper/openflow-switch-helper.cc | 4 ++-- src/openflow/model/openflow-interface.cc | 4 ++-- .../model/openflow-switch-net-device.cc | 4 ++-- .../model/point-to-point-dumbbell.cc | 4 ++-- .../model/point-to-point-grid.cc | 4 ++-- .../model/point-to-point-star.cc | 4 ++-- .../helper/point-to-point-helper.cc | 4 ++-- .../model/point-to-point-channel.cc | 4 ++-- .../model/point-to-point-net-device.cc | 4 ++-- .../model/point-to-point-remote-channel.cc | 4 ++-- src/point-to-point/model/ppp-header.cc | 4 ++-- .../model/cost231-propagation-loss-model.cc | 4 ++-- .../itu-r-1411-los-propagation-loss-model.cc | 4 ++-- ...los-over-rooftop-propagation-loss-model.cc | 4 ++-- src/propagation/model/jakes-process.cc | 4 ++-- .../model/jakes-propagation-loss-model.cc | 5 ++-- .../kun-2600-mhz-propagation-loss-model.cc | 4 ++-- .../okumura-hata-propagation-loss-model.cc | 4 ++-- .../model/propagation-loss-model.cc | 4 ++-- .../test/itu-r-1411-los-test-suite.cc | 1 - ...itu-r-1411-nlos-over-rooftop-test-suite.cc | 1 - .../test/kun-2600-mhz-test-suite.cc | 1 - .../test/okumura-hata-test-suite.cc | 1 - src/sixlowpan/helper/sixlowpan-helper.cc | 4 ++-- src/sixlowpan/model/sixlowpan-net-device.cc | 4 ++-- src/sixlowpan/test/error-channel-sixlow.cc | 4 ++-- ...ideal-phy-matrix-propagation-loss-model.cc | 4 ++-- ...hoc-aloha-ideal-phy-with-microwave-oven.cc | 4 ++-- .../examples/adhoc-aloha-ideal-phy.cc | 4 ++-- .../adhoc-aloha-noack-ideal-phy-helper.cc | 3 +-- .../helper/spectrum-analyzer-helper.cc | 3 +-- .../helper/waveform-generator-helper.cc | 3 +-- src/spectrum/model/aloha-noack-mac-header.cc | 4 ++-- src/spectrum/model/aloha-noack-net-device.cc | 4 +--- .../constant-spectrum-propagation-loss.cc | 3 +-- ...half-duplex-ideal-phy-signal-parameters.cc | 4 ++-- src/spectrum/model/half-duplex-ideal-phy.cc | 4 ++-- .../microwave-oven-spectrum-value-helper.cc | 3 +-- .../model/multi-model-spectrum-channel.cc | 4 +--- .../model/non-communicating-net-device.cc | 5 +--- .../model/single-model-spectrum-channel.cc | 4 +--- src/spectrum/model/spectrum-analyzer.cc | 4 ++-- src/spectrum/model/spectrum-converter.cc | 4 ++-- src/spectrum/model/spectrum-error-model.cc | 4 ++-- src/spectrum/model/spectrum-interference.cc | 3 +-- src/spectrum/model/spectrum-model.cc | 5 +--- src/spectrum/model/spectrum-phy.cc | 5 ++-- .../model/spectrum-propagation-loss-model.cc | 4 ++-- .../model/spectrum-signal-parameters.cc | 4 ++-- src/spectrum/model/spectrum-value.cc | 4 +--- src/spectrum/model/waveform-generator.cc | 4 ++-- src/spectrum/test/spectrum-ideal-phy-test.cc | 3 +-- .../test/spectrum-interference-test.cc | 3 +-- src/spectrum/test/spectrum-value-test.cc | 3 +-- src/stats/helper/file-helper.cc | 4 ++-- src/stats/helper/gnuplot-helper.cc | 4 ++-- src/stats/model/boolean-probe.cc | 4 ++-- src/stats/model/data-collection-object.cc | 4 ++-- src/stats/model/data-output-interface.cc | 1 - src/stats/model/double-probe.cc | 4 ++-- src/stats/model/file-aggregator.cc | 4 ++-- src/stats/model/gnuplot-aggregator.cc | 4 ++-- src/stats/model/omnet-data-output.cc | 1 - src/stats/model/probe.cc | 4 ++-- src/stats/model/time-data-calculators.cc | 1 - src/stats/model/time-series-adaptor.cc | 4 ++-- src/stats/model/uinteger-16-probe.cc | 4 ++-- src/stats/model/uinteger-32-probe.cc | 4 ++-- src/stats/model/uinteger-8-probe.cc | 4 ++-- src/tap-bridge/helper/tap-bridge-helper.cc | 4 ++-- src/tap-bridge/model/tap-bridge.cc | 4 ++-- .../ns3wifi/wifi-interference-test-suite.cc | 4 ++-- .../wifi-msdu-aggregator-test-suite.cc | 4 ++-- .../examples/topology-example-sim.cc | 1 - .../helper/topology-reader-helper.cc | 4 ++-- .../model/inet-topology-reader.cc | 4 ++-- .../model/orbis-topology-reader.cc | 4 ++-- .../model/rocketfuel-topology-reader.cc | 4 ++-- src/topology-read/model/topology-reader.cc | 4 ++-- src/uan/examples/uan-rc-example.cc | 1 - src/uan/helper/uan-helper.cc | 3 ++- src/uan/model/acoustic-modem-energy-model.cc | 4 ++-- src/uan/model/uan-channel.cc | 3 ++- src/uan/model/uan-mac-aloha.cc | 4 ++-- src/uan/model/uan-mac-cw.cc | 4 ++-- src/uan/model/uan-mac-rc-gw.cc | 4 ++-- src/uan/model/uan-mac-rc.cc | 3 ++- src/uan/model/uan-net-device.cc | 4 ++-- src/uan/model/uan-phy-dual.cc | 4 ++-- src/uan/model/uan-phy-gen.cc | 4 ++-- src/uan/model/uan-prop-model-thorp.cc | 4 ++-- src/uan/model/uan-transducer-hd.cc | 4 ++-- src/uan/model/uan-tx-mode.cc | 4 ++-- .../model/virtual-net-device.cc | 4 ++-- src/visualizer/model/pyviz.cc | 1 + src/visualizer/model/visual-simulator-impl.cc | 4 +--- src/wave/examples/wave-simple-80211p.cc | 3 ++- src/wave/model/higher-tx-tag.cc | 4 ++-- src/wave/model/ocb-wifi-mac.cc | 4 ++-- src/wave/model/vendor-specific-action.cc | 4 ++-- src/wave/model/wave-mac-low.cc | 4 ++-- src/wifi/helper/athstats-helper.cc | 3 +-- src/wifi/helper/wifi-helper.cc | 4 ++-- src/wifi/helper/yans-wifi-helper.cc | 4 ++-- src/wifi/model/aarf-wifi-manager.cc | 4 ++-- src/wifi/model/aarfcd-wifi-manager.cc | 4 ++-- src/wifi/model/adhoc-wifi-mac.cc | 4 ++-- src/wifi/model/amrr-wifi-manager.cc | 4 ++-- src/wifi/model/amsdu-subframe-header.cc | 4 ++-- src/wifi/model/ap-wifi-mac.cc | 4 ++-- src/wifi/model/arf-wifi-manager.cc | 5 ++-- src/wifi/model/block-ack-agreement.cc | 4 ++-- src/wifi/model/block-ack-cache.cc | 4 ++-- src/wifi/model/block-ack-manager.cc | 4 ++-- src/wifi/model/capability-information.cc | 4 ++-- src/wifi/model/cara-wifi-manager.cc | 5 ++-- src/wifi/model/constant-rate-wifi-manager.cc | 4 ++-- src/wifi/model/ctrl-headers.cc | 4 ++-- src/wifi/model/dca-txop.cc | 4 ++-- src/wifi/model/dcf-manager.cc | 4 ++-- src/wifi/model/dcf.cc | 4 ++-- src/wifi/model/dsss-error-rate-model.cc | 4 ++-- src/wifi/model/edca-txop-n.cc | 4 ++-- src/wifi/model/ht-capabilities.cc | 3 +-- src/wifi/model/interference-helper.cc | 4 ++-- src/wifi/model/mac-low.cc | 4 ++-- src/wifi/model/mac-rx-middle.cc | 3 +-- src/wifi/model/minstrel-wifi-manager.cc | 5 ++-- src/wifi/model/msdu-aggregator.cc | 4 ++-- src/wifi/model/msdu-standard-aggregator.cc | 4 ++-- src/wifi/model/nist-error-rate-model.cc | 4 ++-- src/wifi/model/onoe-wifi-manager.cc | 4 ++-- src/wifi/model/regular-wifi-mac.cc | 4 ++-- src/wifi/model/rraa-wifi-manager.cc | 4 ++-- src/wifi/model/sta-wifi-mac.cc | 5 ++-- src/wifi/model/supported-rates.cc | 4 ++-- src/wifi/model/wifi-channel.cc | 4 ++-- src/wifi/model/wifi-net-device.cc | 4 ++-- src/wifi/model/wifi-phy-state-helper.cc | 4 ++-- src/wifi/model/wifi-phy.cc | 4 ++-- src/wifi/model/wifi-remote-station-manager.cc | 5 ++-- src/wifi/model/yans-error-rate-model.cc | 4 ++-- src/wifi/model/yans-wifi-channel.cc | 4 ++-- src/wifi/model/yans-wifi-phy.cc | 4 ++-- src/wifi/test/block-ack-test-suite.cc | 1 + src/wifi/test/tx-duration-test.cc | 4 ++-- src/wimax/examples/wimax-ipv4.cc | 4 ++-- src/wimax/examples/wimax-multicast.cc | 3 ++- src/wimax/examples/wimax-simple.cc | 4 ++-- src/wimax/helper/wimax-helper.cc | 4 ++-- src/wimax/model/bandwidth-manager.cc | 4 ++-- src/wimax/model/bs-link-manager.cc | 4 ++-- src/wimax/model/bs-net-device.cc | 4 ++-- src/wimax/model/bs-scheduler-rtps.cc | 4 ++-- src/wimax/model/bs-scheduler-simple.cc | 4 ++-- src/wimax/model/bs-scheduler.cc | 5 ++-- src/wimax/model/bs-service-flow-manager.cc | 3 ++- src/wimax/model/bs-uplink-scheduler-mbqos.cc | 4 ++-- src/wimax/model/bs-uplink-scheduler-rtps.cc | 5 ++-- src/wimax/model/bs-uplink-scheduler-simple.cc | 5 ++-- src/wimax/model/bs-uplink-scheduler.cc | 4 ++-- src/wimax/model/burst-profile-manager.cc | 4 ++-- src/wimax/model/connection-manager.cc | 4 ++-- src/wimax/model/ipcs-classifier-record.cc | 3 ++- src/wimax/model/ipcs-classifier.cc | 4 ++-- src/wimax/model/mac-messages.cc | 4 ++-- src/wimax/model/service-flow-manager.cc | 3 ++- src/wimax/model/simple-ofdm-wimax-channel.cc | 8 +++---- src/wimax/model/simple-ofdm-wimax-phy.cc | 3 ++- .../model/snr-to-block-error-rate-manager.cc | 4 ++-- src/wimax/model/ss-link-manager.cc | 4 ++-- src/wimax/model/ss-manager.cc | 5 ++-- src/wimax/model/ss-net-device.cc | 4 ++-- src/wimax/model/ss-scheduler.cc | 5 ++-- src/wimax/model/ss-service-flow-manager.cc | 3 ++- src/wimax/model/wimax-channel.cc | 4 ++-- src/wimax/model/wimax-mac-queue.cc | 4 ++-- src/wimax/model/wimax-net-device.cc | 4 ++-- src/wimax/model/wimax-phy.cc | 4 ++-- src/wimax/model/wimax-tlv.cc | 8 +++---- 675 files changed, 1328 insertions(+), 1354 deletions(-) diff --git a/doc/manual/source/logging.rst b/doc/manual/source/logging.rst index 97ac19754..7c00e5024 100644 --- a/doc/manual/source/logging.rst +++ b/doc/manual/source/logging.rst @@ -320,7 +320,7 @@ How to add logging to your code Adding logging to your code is very simple: 1. Invoke the ``NS_LOG_COMPONENT_DEFINE (...);`` macro - outside of ``namespace ns3``. + inside of ``namespace ns3``. Create a unique string identifier (usually based on the name of the file and/or class defined within the file) and register it with a macro call @@ -328,9 +328,9 @@ Adding logging to your code is very simple: :: - NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol"); - namespace ns3 { + + NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol"); ... This registers ``Ipv4L3Protocol`` as a log component. diff --git a/examples/energy/energy-model-example.cc b/examples/energy/energy-model-example.cc index a86e4c2c5..0fc180b15 100644 --- a/examples/energy/energy-model-example.cc +++ b/examples/energy/energy-model-example.cc @@ -31,10 +31,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("EnergyExample"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("EnergyExample"); + static inline std::string PrintReceivedPacket (Address& from) { diff --git a/examples/energy/energy-model-with-harvesting-example.cc b/examples/energy/energy-model-with-harvesting-example.cc index 117d69326..03c0ba697 100644 --- a/examples/energy/energy-model-with-harvesting-example.cc +++ b/examples/energy/energy-model-with-harvesting-example.cc @@ -60,10 +60,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("EnergyWithHarvestingExample"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("EnergyWithHarvestingExample"); + static inline std::string PrintReceivedPacket (Address& from) { diff --git a/examples/ipv6/fragmentation-ipv6.cc b/examples/ipv6/fragmentation-ipv6.cc index 240d49a17..f40e8a5e2 100644 --- a/examples/ipv6/fragmentation-ipv6.cc +++ b/examples/ipv6/fragmentation-ipv6.cc @@ -41,7 +41,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("FragmentationIpv6Example"); - int main (int argc, char** argv) { bool verbose = false; diff --git a/examples/ipv6/loose-routing-ipv6.cc b/examples/ipv6/loose-routing-ipv6.cc index 2597ca38d..1298962ee 100644 --- a/examples/ipv6/loose-routing-ipv6.cc +++ b/examples/ipv6/loose-routing-ipv6.cc @@ -44,6 +44,7 @@ #include "ns3/csma-module.h" #include "ns3/applications-module.h" #include "ns3/ipv6-header.h" + using namespace ns3; NS_LOG_COMPONENT_DEFINE ("LooseRoutingIpv6Example"); diff --git a/examples/ipv6/test-ipv6.cc b/examples/ipv6/test-ipv6.cc index ea9d00ad2..84f0e9ac6 100644 --- a/examples/ipv6/test-ipv6.cc +++ b/examples/ipv6/test-ipv6.cc @@ -24,10 +24,10 @@ #include "ns3/node.h" #include "ns3/mac48-address.h" -NS_LOG_COMPONENT_DEFINE ("TestIpv6"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("TestIpv6"); + int main (int argc, char *argv[]) { diff --git a/examples/stats/wifi-example-sim.cc b/examples/stats/wifi-example-sim.cc index f9f48a10f..3b724b404 100644 --- a/examples/stats/wifi-example-sim.cc +++ b/examples/stats/wifi-example-sim.cc @@ -49,9 +49,6 @@ using namespace std; NS_LOG_COMPONENT_DEFINE ("WiFiDistanceExperiment"); - - - void TxCallback (Ptr > datac, std::string path, Ptr packet) { NS_LOG_INFO ("Sent frame counted in " << diff --git a/examples/tcp/tcp-large-transfer.cc b/examples/tcp/tcp-large-transfer.cc index 5d0c7add0..27deb300f 100644 --- a/examples/tcp/tcp-large-transfer.cc +++ b/examples/tcp/tcp-large-transfer.cc @@ -44,7 +44,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("TcpLargeTransfer"); - // The number of bytes to send in this simulation. static const uint32_t totalTxBytes = 2000000; static uint32_t currentTxBytes = 0; diff --git a/examples/tutorial/hello-simulator.cc b/examples/tutorial/hello-simulator.cc index 70a43a62f..1863617de 100644 --- a/examples/tutorial/hello-simulator.cc +++ b/examples/tutorial/hello-simulator.cc @@ -16,10 +16,10 @@ #include "ns3/core-module.h" -NS_LOG_COMPONENT_DEFINE ("HelloSimulator"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("HelloSimulator"); + int main (int argc, char *argv[]) { diff --git a/examples/wireless/multirate.cc b/examples/wireless/multirate.cc index 9e4d1a373..97e44b368 100644 --- a/examples/wireless/multirate.cc +++ b/examples/wireless/multirate.cc @@ -64,10 +64,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("multirate"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("multirate"); + class Experiment { public: diff --git a/examples/wireless/wifi-adhoc.cc b/examples/wireless/wifi-adhoc.cc index 549465c7a..7e5535732 100644 --- a/examples/wireless/wifi-adhoc.cc +++ b/examples/wireless/wifi-adhoc.cc @@ -27,10 +27,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("Main"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("Main"); + class Experiment { public: diff --git a/examples/wireless/wifi-clear-channel-cmu.cc b/examples/wireless/wifi-clear-channel-cmu.cc index ddba2b648..ae6443a8c 100644 --- a/examples/wireless/wifi-clear-channel-cmu.cc +++ b/examples/wireless/wifi-clear-channel-cmu.cc @@ -30,10 +30,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Main"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("Main"); + class Experiment { public: diff --git a/examples/wireless/wifi-simple-adhoc-grid.cc b/examples/wireless/wifi-simple-adhoc-grid.cc index 909e380c3..7dbcb3024 100644 --- a/examples/wireless/wifi-simple-adhoc-grid.cc +++ b/examples/wireless/wifi-simple-adhoc-grid.cc @@ -84,10 +84,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhocGrid"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhocGrid"); + void ReceivePacket (Ptr socket) { while (socket->Recv ()) diff --git a/examples/wireless/wifi-simple-adhoc.cc b/examples/wireless/wifi-simple-adhoc.cc index 86213e0c8..6f7e208b6 100644 --- a/examples/wireless/wifi-simple-adhoc.cc +++ b/examples/wireless/wifi-simple-adhoc.cc @@ -63,10 +63,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc"); + void ReceivePacket (Ptr socket) { while (socket->Recv ()) diff --git a/examples/wireless/wifi-simple-infra.cc b/examples/wireless/wifi-simple-infra.cc index 649e522a1..601db4801 100644 --- a/examples/wireless/wifi-simple-infra.cc +++ b/examples/wireless/wifi-simple-infra.cc @@ -64,10 +64,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("WifiSimpleInfra"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("WifiSimpleInfra"); + void ReceivePacket (Ptr socket) { while (socket->Recv ()) diff --git a/examples/wireless/wifi-simple-interference.cc b/examples/wireless/wifi-simple-interference.cc index 54531bc54..86aab9576 100644 --- a/examples/wireless/wifi-simple-interference.cc +++ b/examples/wireless/wifi-simple-interference.cc @@ -92,10 +92,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("WifiSimpleInterference"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("WifiSimpleInterference"); + static inline std::string PrintReceivedPacket (Ptr socket) { Address addr; diff --git a/examples/wireless/wifi-sleep.cc b/examples/wireless/wifi-sleep.cc index 560a5b5a5..55cb2dff4 100644 --- a/examples/wireless/wifi-sleep.cc +++ b/examples/wireless/wifi-sleep.cc @@ -62,10 +62,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("WifiSleep"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("WifiSleep"); + template void RemainingEnergyTrace (double oldValue, double newValue) { diff --git a/scratch/scratch-simulator.cc b/scratch/scratch-simulator.cc index c4c039f56..aa7cc6fa4 100644 --- a/scratch/scratch-simulator.cc +++ b/scratch/scratch-simulator.cc @@ -16,10 +16,10 @@ #include "ns3/core-module.h" -NS_LOG_COMPONENT_DEFINE ("ScratchSimulator"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("ScratchSimulator"); + int main (int argc, char *argv[]) { diff --git a/scratch/subdir/scratch-simulator-subdir.cc b/scratch/subdir/scratch-simulator-subdir.cc index f11de3ccd..c23a18b6f 100644 --- a/scratch/subdir/scratch-simulator-subdir.cc +++ b/scratch/subdir/scratch-simulator-subdir.cc @@ -16,10 +16,10 @@ #include "ns3/core-module.h" -NS_LOG_COMPONENT_DEFINE ("ScratchSimulator"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("ScratchSimulator"); + int main (int argc, char *argv[]) { diff --git a/src/antenna/model/angles.cc b/src/antenna/model/angles.cc index a36ef24b4..8387e8976 100644 --- a/src/antenna/model/angles.cc +++ b/src/antenna/model/angles.cc @@ -24,10 +24,9 @@ #include "angles.h" -NS_LOG_COMPONENT_DEFINE ("Angles"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Angles"); double DegreesToRadians (double degrees) { diff --git a/src/antenna/model/antenna-model.cc b/src/antenna/model/antenna-model.cc index 1648dbfd0..9f5aaa901 100644 --- a/src/antenna/model/antenna-model.cc +++ b/src/antenna/model/antenna-model.cc @@ -24,10 +24,10 @@ #include "antenna-model.h" -NS_LOG_COMPONENT_DEFINE ("AntennaModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AntennaModel"); + NS_OBJECT_ENSURE_REGISTERED (AntennaModel); diff --git a/src/antenna/model/cosine-antenna-model.cc b/src/antenna/model/cosine-antenna-model.cc index a283091c0..09ca6a58c 100644 --- a/src/antenna/model/cosine-antenna-model.cc +++ b/src/antenna/model/cosine-antenna-model.cc @@ -27,10 +27,10 @@ #include "cosine-antenna-model.h" -NS_LOG_COMPONENT_DEFINE ("CosineAntennaModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CosineAntennaModel"); + NS_OBJECT_ENSURE_REGISTERED (CosineAntennaModel); diff --git a/src/antenna/model/isotropic-antenna-model.cc b/src/antenna/model/isotropic-antenna-model.cc index e06ab3dd9..a0eafd89e 100644 --- a/src/antenna/model/isotropic-antenna-model.cc +++ b/src/antenna/model/isotropic-antenna-model.cc @@ -25,10 +25,10 @@ #include "isotropic-antenna-model.h" -NS_LOG_COMPONENT_DEFINE ("IsotropicAntennaModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("IsotropicAntennaModel"); + NS_OBJECT_ENSURE_REGISTERED (IsotropicAntennaModel); diff --git a/src/antenna/model/parabolic-antenna-model.cc b/src/antenna/model/parabolic-antenna-model.cc index 92c3af275..b5b071c88 100644 --- a/src/antenna/model/parabolic-antenna-model.cc +++ b/src/antenna/model/parabolic-antenna-model.cc @@ -27,10 +27,10 @@ #include "parabolic-antenna-model.h" -NS_LOG_COMPONENT_DEFINE ("ParabolicAntennaModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ParabolicAntennaModel"); + NS_OBJECT_ENSURE_REGISTERED (ParabolicAntennaModel); diff --git a/src/antenna/test/test-cosine-antenna.cc b/src/antenna/test/test-cosine-antenna.cc index f53fbc286..80de162fb 100644 --- a/src/antenna/test/test-cosine-antenna.cc +++ b/src/antenna/test/test-cosine-antenna.cc @@ -29,10 +29,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("TestCosineAntennaModel"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("TestCosineAntennaModel"); + enum CosineAntennaModelGainTestCondition { EQUAL = 0, LESSTHAN = 1 diff --git a/src/antenna/test/test-parabolic-antenna.cc b/src/antenna/test/test-parabolic-antenna.cc index 46644093a..b86e0656a 100644 --- a/src/antenna/test/test-parabolic-antenna.cc +++ b/src/antenna/test/test-parabolic-antenna.cc @@ -29,10 +29,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("TestParabolicAntennaModel"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("TestParabolicAntennaModel"); + enum ParabolicAntennaModelGainTestCondition { EQUAL = 0, LESSTHAN = 1 diff --git a/src/aodv/model/aodv-neighbor.cc b/src/aodv/model/aodv-neighbor.cc index 4c94ec957..4599a0cfb 100644 --- a/src/aodv/model/aodv-neighbor.cc +++ b/src/aodv/model/aodv-neighbor.cc @@ -30,10 +30,12 @@ #include "ns3/log.h" #include -NS_LOG_COMPONENT_DEFINE ("AodvNeighbors"); namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("AodvNeighbors"); + namespace aodv { Neighbors::Neighbors (Time delay) : diff --git a/src/aodv/model/aodv-routing-protocol.cc b/src/aodv/model/aodv-routing-protocol.cc index 05f3b01d9..422e15f67 100644 --- a/src/aodv/model/aodv-routing-protocol.cc +++ b/src/aodv/model/aodv-routing-protocol.cc @@ -42,10 +42,11 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("AodvRoutingProtocol"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("AodvRoutingProtocol"); + namespace aodv { NS_OBJECT_ENSURE_REGISTERED (RoutingProtocol); diff --git a/src/aodv/model/aodv-rqueue.cc b/src/aodv/model/aodv-rqueue.cc index dd8b1ae25..e9e3b7dc4 100644 --- a/src/aodv/model/aodv-rqueue.cc +++ b/src/aodv/model/aodv-rqueue.cc @@ -32,10 +32,11 @@ #include "ns3/socket.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("AodvRequestQueue"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("AodvRequestQueue"); + namespace aodv { uint32_t diff --git a/src/aodv/model/aodv-rtable.cc b/src/aodv/model/aodv-rtable.cc index 0105a05ff..c0545c249 100644 --- a/src/aodv/model/aodv-rtable.cc +++ b/src/aodv/model/aodv-rtable.cc @@ -32,10 +32,11 @@ #include "ns3/simulator.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("AodvRoutingTable"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("AodvRoutingTable"); + namespace aodv { diff --git a/src/applications/helper/radvd-helper.cc b/src/applications/helper/radvd-helper.cc index e6a06eb84..8dbc1030a 100644 --- a/src/applications/helper/radvd-helper.cc +++ b/src/applications/helper/radvd-helper.cc @@ -26,11 +26,11 @@ #include "radvd-helper.h" -NS_LOG_COMPONENT_DEFINE ("RadvdHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RadvdHelper"); + RadvdHelper::RadvdHelper () { m_factory.SetTypeId (Radvd::GetTypeId ()); diff --git a/src/applications/model/application-packet-probe.cc b/src/applications/model/application-packet-probe.cc index 6e1613799..378a20e87 100644 --- a/src/applications/model/application-packet-probe.cc +++ b/src/applications/model/application-packet-probe.cc @@ -28,10 +28,10 @@ #include "ns3/config.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("ApplicationPacketProbe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ApplicationPacketProbe"); + NS_OBJECT_ENSURE_REGISTERED (ApplicationPacketProbe); TypeId diff --git a/src/applications/model/bulk-send-application.cc b/src/applications/model/bulk-send-application.cc index 03637c531..a623d3fd0 100644 --- a/src/applications/model/bulk-send-application.cc +++ b/src/applications/model/bulk-send-application.cc @@ -31,10 +31,10 @@ #include "ns3/tcp-socket-factory.h" #include "bulk-send-application.h" -NS_LOG_COMPONENT_DEFINE ("BulkSendApplication"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BulkSendApplication"); + NS_OBJECT_ENSURE_REGISTERED (BulkSendApplication); TypeId diff --git a/src/applications/model/onoff-application.cc b/src/applications/model/onoff-application.cc index 8bf157729..dc1a38764 100644 --- a/src/applications/model/onoff-application.cc +++ b/src/applications/model/onoff-application.cc @@ -42,10 +42,10 @@ #include "ns3/string.h" #include "ns3/pointer.h" -NS_LOG_COMPONENT_DEFINE ("OnOffApplication"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("OnOffApplication"); + NS_OBJECT_ENSURE_REGISTERED (OnOffApplication); TypeId diff --git a/src/applications/model/packet-loss-counter.cc b/src/applications/model/packet-loss-counter.cc index 36d892d10..4b09a41ef 100644 --- a/src/applications/model/packet-loss-counter.cc +++ b/src/applications/model/packet-loss-counter.cc @@ -24,10 +24,9 @@ #include "ns3/uinteger.h" #include "packet-loss-counter.h" -NS_LOG_COMPONENT_DEFINE ("PacketLossCounter"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketLossCounter"); PacketLossCounter::PacketLossCounter (uint8_t bitmapSize) : m_lost (0), diff --git a/src/applications/model/packet-sink.cc b/src/applications/model/packet-sink.cc index 283a92785..eb0487680 100644 --- a/src/applications/model/packet-sink.cc +++ b/src/applications/model/packet-sink.cc @@ -32,10 +32,10 @@ #include "ns3/udp-socket-factory.h" #include "packet-sink.h" -NS_LOG_COMPONENT_DEFINE ("PacketSink"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketSink"); + NS_OBJECT_ENSURE_REGISTERED (PacketSink); TypeId diff --git a/src/applications/model/ping6.cc b/src/applications/model/ping6.cc index 485ea7fc1..bee27069b 100644 --- a/src/applications/model/ping6.cc +++ b/src/applications/model/ping6.cc @@ -35,11 +35,11 @@ #include "ping6.h" -NS_LOG_COMPONENT_DEFINE ("Ping6Application"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ping6Application"); + NS_OBJECT_ENSURE_REGISTERED (Ping6); TypeId Ping6::GetTypeId () diff --git a/src/applications/model/radvd-interface.cc b/src/applications/model/radvd-interface.cc index 6c4a85e21..b555b036b 100644 --- a/src/applications/model/radvd-interface.cc +++ b/src/applications/model/radvd-interface.cc @@ -21,11 +21,11 @@ #include "radvd-interface.h" #include -NS_LOG_COMPONENT_DEFINE ("RadvdInterface"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RadvdInterface"); + RadvdInterface::RadvdInterface (uint32_t interface) : m_interface (interface) { diff --git a/src/applications/model/radvd-prefix.cc b/src/applications/model/radvd-prefix.cc index c3753c4cb..c025a9dfd 100644 --- a/src/applications/model/radvd-prefix.cc +++ b/src/applications/model/radvd-prefix.cc @@ -21,11 +21,11 @@ #include "radvd-prefix.h" #include -NS_LOG_COMPONENT_DEFINE ("RadvdPrefix"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RadvdPrefix"); + RadvdPrefix::RadvdPrefix (Ipv6Address network, uint8_t prefixLength, uint32_t preferredLifeTime, uint32_t validLifeTime, bool onLinkFlag, bool autonomousFlag, bool routerAddrFlag) : m_network (network), m_prefixLength (prefixLength), diff --git a/src/applications/model/radvd.cc b/src/applications/model/radvd.cc index 4b1c64385..c7eee39bf 100644 --- a/src/applications/model/radvd.cc +++ b/src/applications/model/radvd.cc @@ -37,11 +37,11 @@ #include "radvd.h" -NS_LOG_COMPONENT_DEFINE ("RadvdApplication"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RadvdApplication"); + NS_OBJECT_ENSURE_REGISTERED (Radvd); TypeId Radvd::GetTypeId () diff --git a/src/applications/model/seq-ts-header.cc b/src/applications/model/seq-ts-header.cc index 437dfbd7e..ed6e8617a 100644 --- a/src/applications/model/seq-ts-header.cc +++ b/src/applications/model/seq-ts-header.cc @@ -24,10 +24,10 @@ #include "ns3/simulator.h" #include "seq-ts-header.h" -NS_LOG_COMPONENT_DEFINE ("SeqTsHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SeqTsHeader"); + NS_OBJECT_ENSURE_REGISTERED (SeqTsHeader); SeqTsHeader::SeqTsHeader () diff --git a/src/applications/model/udp-client.cc b/src/applications/model/udp-client.cc index 536048507..4d5c657db 100644 --- a/src/applications/model/udp-client.cc +++ b/src/applications/model/udp-client.cc @@ -33,10 +33,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("UdpClient"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UdpClient"); + NS_OBJECT_ENSURE_REGISTERED (UdpClient); TypeId diff --git a/src/applications/model/udp-echo-client.cc b/src/applications/model/udp-echo-client.cc index c7e770f5c..b95218eb8 100644 --- a/src/applications/model/udp-echo-client.cc +++ b/src/applications/model/udp-echo-client.cc @@ -29,10 +29,10 @@ #include "ns3/trace-source-accessor.h" #include "udp-echo-client.h" -NS_LOG_COMPONENT_DEFINE ("UdpEchoClientApplication"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UdpEchoClientApplication"); + NS_OBJECT_ENSURE_REGISTERED (UdpEchoClient); TypeId diff --git a/src/applications/model/udp-echo-server.cc b/src/applications/model/udp-echo-server.cc index 73a323b75..21be86f6b 100644 --- a/src/applications/model/udp-echo-server.cc +++ b/src/applications/model/udp-echo-server.cc @@ -32,10 +32,10 @@ #include "udp-echo-server.h" -NS_LOG_COMPONENT_DEFINE ("UdpEchoServerApplication"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UdpEchoServerApplication"); + NS_OBJECT_ENSURE_REGISTERED (UdpEchoServer); TypeId diff --git a/src/applications/model/udp-server.cc b/src/applications/model/udp-server.cc index 4ef74c006..eafd51198 100644 --- a/src/applications/model/udp-server.cc +++ b/src/applications/model/udp-server.cc @@ -34,10 +34,10 @@ #include "seq-ts-header.h" #include "udp-server.h" -NS_LOG_COMPONENT_DEFINE ("UdpServer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UdpServer"); + NS_OBJECT_ENSURE_REGISTERED (UdpServer); diff --git a/src/applications/model/udp-trace-client.cc b/src/applications/model/udp-trace-client.cc index 693b946b8..770fbbf9d 100644 --- a/src/applications/model/udp-trace-client.cc +++ b/src/applications/model/udp-trace-client.cc @@ -35,10 +35,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("UdpTraceClient"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UdpTraceClient"); + NS_OBJECT_ENSURE_REGISTERED (UdpTraceClient); /** diff --git a/src/applications/model/v4ping.cc b/src/applications/model/v4ping.cc index 968a3a791..1693eb6ef 100644 --- a/src/applications/model/v4ping.cc +++ b/src/applications/model/v4ping.cc @@ -26,10 +26,10 @@ #include "ns3/packet.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("V4Ping"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("V4Ping"); + NS_OBJECT_ENSURE_REGISTERED (V4Ping); TypeId diff --git a/src/bridge/helper/bridge-helper.cc b/src/bridge/helper/bridge-helper.cc index 01f12c0a7..0bc0a5ca4 100644 --- a/src/bridge/helper/bridge-helper.cc +++ b/src/bridge/helper/bridge-helper.cc @@ -22,10 +22,10 @@ #include "ns3/node.h" #include "ns3/names.h" -NS_LOG_COMPONENT_DEFINE ("BridgeHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BridgeHelper"); + BridgeHelper::BridgeHelper () { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/bridge/model/bridge-channel.cc b/src/bridge/model/bridge-channel.cc index a1a1b97a5..b327816eb 100644 --- a/src/bridge/model/bridge-channel.cc +++ b/src/bridge/model/bridge-channel.cc @@ -19,10 +19,10 @@ #include "ns3/log.h" #include "bridge-channel.h" -NS_LOG_COMPONENT_DEFINE ("BridgeChannel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BridgeChannel"); + NS_OBJECT_ENSURE_REGISTERED (BridgeChannel); TypeId diff --git a/src/bridge/model/bridge-net-device.cc b/src/bridge/model/bridge-net-device.cc index 47de15667..3e2df0b01 100644 --- a/src/bridge/model/bridge-net-device.cc +++ b/src/bridge/model/bridge-net-device.cc @@ -24,10 +24,10 @@ #include "ns3/simulator.h" #include "ns3/uinteger.h" -NS_LOG_COMPONENT_DEFINE ("BridgeNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BridgeNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (BridgeNetDevice); diff --git a/src/brite/helper/brite-topology-helper.cc b/src/brite/helper/brite-topology-helper.cc index 96c588d4f..0b2182b94 100644 --- a/src/brite/helper/brite-topology-helper.cc +++ b/src/brite/helper/brite-topology-helper.cc @@ -30,10 +30,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("BriteTopologyHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BriteTopologyHelper"); + BriteTopologyHelper::BriteTopologyHelper (std::string confFile, std::string seedFile, std::string newseedFile) diff --git a/src/buildings/helper/building-allocator.cc b/src/buildings/helper/building-allocator.cc index 8d02c0c78..eda20a556 100644 --- a/src/buildings/helper/building-allocator.cc +++ b/src/buildings/helper/building-allocator.cc @@ -27,10 +27,10 @@ #include "ns3/log.h" #include -NS_LOG_COMPONENT_DEFINE ("BuildingAllocator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BuildingAllocator"); + NS_OBJECT_ENSURE_REGISTERED (GridBuildingAllocator); GridBuildingAllocator::GridBuildingAllocator () diff --git a/src/buildings/helper/buildings-helper.cc b/src/buildings/helper/buildings-helper.cc index 78561123b..ca6dfdf80 100644 --- a/src/buildings/helper/buildings-helper.cc +++ b/src/buildings/helper/buildings-helper.cc @@ -29,10 +29,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("BuildingsHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BuildingsHelper"); void BuildingsHelper::Install (NodeContainer c) diff --git a/src/buildings/model/building-list.cc b/src/buildings/model/building-list.cc index 9db71f7be..063870de3 100644 --- a/src/buildings/model/building-list.cc +++ b/src/buildings/model/building-list.cc @@ -28,10 +28,10 @@ #include "building-list.h" #include "building.h" -NS_LOG_COMPONENT_DEFINE ("BuildingList"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BuildingList"); + /** * \brief private implementation detail of the BuildingList API. */ diff --git a/src/buildings/model/building.cc b/src/buildings/model/building.cc index 3200ccc75..1457b4385 100644 --- a/src/buildings/model/building.cc +++ b/src/buildings/model/building.cc @@ -29,10 +29,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Building"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Building"); NS_OBJECT_ENSURE_REGISTERED (Building); diff --git a/src/buildings/model/buildings-propagation-loss-model.cc b/src/buildings/model/buildings-propagation-loss-model.cc index b5c78ec05..0a396d099 100644 --- a/src/buildings/model/buildings-propagation-loss-model.cc +++ b/src/buildings/model/buildings-propagation-loss-model.cc @@ -31,10 +31,10 @@ #include "ns3/enum.h" -NS_LOG_COMPONENT_DEFINE ("BuildingsPropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BuildingsPropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (BuildingsPropagationLossModel); BuildingsPropagationLossModel::ShadowingLoss::ShadowingLoss () diff --git a/src/buildings/model/hybrid-buildings-propagation-loss-model.cc b/src/buildings/model/hybrid-buildings-propagation-loss-model.cc index 0d441c08b..a8a883b14 100644 --- a/src/buildings/model/hybrid-buildings-propagation-loss-model.cc +++ b/src/buildings/model/hybrid-buildings-propagation-loss-model.cc @@ -37,10 +37,10 @@ #include "hybrid-buildings-propagation-loss-model.h" -NS_LOG_COMPONENT_DEFINE ("HybridBuildingsPropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("HybridBuildingsPropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (HybridBuildingsPropagationLossModel); diff --git a/src/buildings/model/itu-r-1238-propagation-loss-model.cc b/src/buildings/model/itu-r-1238-propagation-loss-model.cc index fcc739c66..a5aeaaccf 100644 --- a/src/buildings/model/itu-r-1238-propagation-loss-model.cc +++ b/src/buildings/model/itu-r-1238-propagation-loss-model.cc @@ -28,10 +28,10 @@ #include "itu-r-1238-propagation-loss-model.h" #include -NS_LOG_COMPONENT_DEFINE ("ItuR1238PropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ItuR1238PropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (ItuR1238PropagationLossModel); diff --git a/src/buildings/model/mobility-building-info.cc b/src/buildings/model/mobility-building-info.cc index 001c83c5a..344dbe318 100644 --- a/src/buildings/model/mobility-building-info.cc +++ b/src/buildings/model/mobility-building-info.cc @@ -26,10 +26,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("MobilityBuildingInfo"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MobilityBuildingInfo"); + NS_OBJECT_ENSURE_REGISTERED (MobilityBuildingInfo); TypeId diff --git a/src/buildings/model/oh-buildings-propagation-loss-model.cc b/src/buildings/model/oh-buildings-propagation-loss-model.cc index 85eb8daf1..b90a6a57d 100644 --- a/src/buildings/model/oh-buildings-propagation-loss-model.cc +++ b/src/buildings/model/oh-buildings-propagation-loss-model.cc @@ -31,10 +31,10 @@ #include "ns3/enum.h" -NS_LOG_COMPONENT_DEFINE ("OhBuildingsPropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("OhBuildingsPropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (OhBuildingsPropagationLossModel); diff --git a/src/buildings/test/building-position-allocator-test.cc b/src/buildings/test/building-position-allocator-test.cc index 5d2f681ff..cc941ad21 100644 --- a/src/buildings/test/building-position-allocator-test.cc +++ b/src/buildings/test/building-position-allocator-test.cc @@ -32,10 +32,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("BuildingPositionAllocatorTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("BuildingPositionAllocatorTest"); struct Room { diff --git a/src/buildings/test/buildings-helper-test.cc b/src/buildings/test/buildings-helper-test.cc index e86efb29d..31373aa9c 100644 --- a/src/buildings/test/buildings-helper-test.cc +++ b/src/buildings/test/buildings-helper-test.cc @@ -29,10 +29,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("BuildingsHelperTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("BuildingsHelperTest"); struct PositionInBuilding { diff --git a/src/buildings/test/buildings-pathloss-test.cc b/src/buildings/test/buildings-pathloss-test.cc index d0379e8db..dda5eed51 100644 --- a/src/buildings/test/buildings-pathloss-test.cc +++ b/src/buildings/test/buildings-pathloss-test.cc @@ -34,10 +34,9 @@ -NS_LOG_COMPONENT_DEFINE ("BuildingsPathlossTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("BuildingsPathlossTest"); /** * Test 1.1 BuildingsPathlossModel Pathloss compound test diff --git a/src/buildings/test/buildings-shadowing-test.cc b/src/buildings/test/buildings-shadowing-test.cc index f77d6b18f..61d04d56b 100644 --- a/src/buildings/test/buildings-shadowing-test.cc +++ b/src/buildings/test/buildings-shadowing-test.cc @@ -33,11 +33,9 @@ #include "buildings-shadowing-test.h" -NS_LOG_COMPONENT_DEFINE ("BuildingsShadowingTest"); - - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("BuildingsShadowingTest"); /** diff --git a/src/click/helper/click-internet-stack-helper.cc b/src/click/helper/click-internet-stack-helper.cc index 7de4d7498..50376fc8f 100644 --- a/src/click/helper/click-internet-stack-helper.cc +++ b/src/click/helper/click-internet-stack-helper.cc @@ -43,10 +43,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("ClickInternetStackHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ClickInternetStackHelper"); + #define INTERFACE_CONTEXT typedef std::pair, uint32_t> InterfacePairIpv4; diff --git a/src/click/model/ipv4-click-routing.cc b/src/click/model/ipv4-click-routing.cc index 5608fff81..25bce99f1 100644 --- a/src/click/model/ipv4-click-routing.cc +++ b/src/click/model/ipv4-click-routing.cc @@ -36,10 +36,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Ipv4ClickRouting"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4ClickRouting"); + // Values from nsclick ExtRouter implementation #define INTERFACE_ID_KERNELTAP 0 #define INTERFACE_ID_FIRST 1 diff --git a/src/click/model/ipv4-l3-click-protocol.cc b/src/click/model/ipv4-l3-click-protocol.cc index 5c5a7e5de..7c1dfdf82 100644 --- a/src/click/model/ipv4-l3-click-protocol.cc +++ b/src/click/model/ipv4-l3-click-protocol.cc @@ -37,10 +37,10 @@ #include "ns3/icmpv4-l4-protocol.h" #include "ns3/loopback-net-device.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4L3ClickProtocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4L3ClickProtocol"); + const uint16_t Ipv4L3ClickProtocol::PROT_NUMBER = 0x0800; diff --git a/src/config-store/model/attribute-iterator.cc b/src/config-store/model/attribute-iterator.cc index 7ee3dfda9..1641e68b7 100644 --- a/src/config-store/model/attribute-iterator.cc +++ b/src/config-store/model/attribute-iterator.cc @@ -25,10 +25,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("AttributeIterator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AttributeIterator"); AttributeIterator::AttributeIterator () { diff --git a/src/config-store/model/config-store.cc b/src/config-store/model/config-store.cc index 79821b1d3..3c9f46232 100644 --- a/src/config-store/model/config-store.cc +++ b/src/config-store/model/config-store.cc @@ -18,10 +18,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("ConfigStore"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ConfigStore"); NS_OBJECT_ENSURE_REGISTERED (ConfigStore); diff --git a/src/config-store/model/gtk-config-store.cc b/src/config-store/model/gtk-config-store.cc index f2576d70b..e054d7c64 100644 --- a/src/config-store/model/gtk-config-store.cc +++ b/src/config-store/model/gtk-config-store.cc @@ -24,10 +24,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("GtkconfigStore"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GtkconfigStore"); GtkConfigStore::GtkConfigStore () { diff --git a/src/config-store/model/raw-text-config.cc b/src/config-store/model/raw-text-config.cc index dd078ee6c..d96591767 100644 --- a/src/config-store/model/raw-text-config.cc +++ b/src/config-store/model/raw-text-config.cc @@ -6,10 +6,10 @@ #include "ns3/log.h" #include "ns3/config.h" -NS_LOG_COMPONENT_DEFINE ("RawTextConfig"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RawTextConfig"); + RawTextConfigSave::RawTextConfigSave () : m_os (0) { diff --git a/src/config-store/model/xml-config.cc b/src/config-store/model/xml-config.cc index 098ccc49c..5dc67c95c 100644 --- a/src/config-store/model/xml-config.cc +++ b/src/config-store/model/xml-config.cc @@ -9,10 +9,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("XmlConfig"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("XmlConfig"); + XmlConfigSave::XmlConfigSave () : m_writer (0) { diff --git a/src/core/examples/hash-example.cc b/src/core/examples/hash-example.cc index cf19912b6..1b1f70e32 100644 --- a/src/core/examples/hash-example.cc +++ b/src/core/examples/hash-example.cc @@ -25,10 +25,11 @@ #include "ns3/core-module.h" #include "ns3/hash.h" -NS_LOG_COMPONENT_DEFINE ("Hasher"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("Hasher"); + namespace Hash { diff --git a/src/core/helper/random-variable-stream-helper.cc b/src/core/helper/random-variable-stream-helper.cc index 947e36782..b6f70091a 100644 --- a/src/core/helper/random-variable-stream-helper.cc +++ b/src/core/helper/random-variable-stream-helper.cc @@ -23,10 +23,10 @@ #include "ns3/assert.h" #include "random-variable-stream-helper.h" -NS_LOG_COMPONENT_DEFINE ("RandomVariableStreamHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RandomVariableStreamHelper"); + int64_t RandomVariableStreamHelper::AssignStreams (std::string path, int64_t stream) { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/core/model/attribute-construction-list.cc b/src/core/model/attribute-construction-list.cc index 864abb5c3..e54246483 100644 --- a/src/core/model/attribute-construction-list.cc +++ b/src/core/model/attribute-construction-list.cc @@ -20,10 +20,10 @@ #include "attribute-construction-list.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE("AttributeConstructionList"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE("AttributeConstructionList"); + AttributeConstructionList::AttributeConstructionList () { NS_LOG_FUNCTION (this); diff --git a/src/core/model/attribute.cc b/src/core/model/attribute.cc index 43988ffb1..1a2e5ad30 100644 --- a/src/core/model/attribute.cc +++ b/src/core/model/attribute.cc @@ -23,10 +23,10 @@ #include "string.h" #include -NS_LOG_COMPONENT_DEFINE ("AttributeValue"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AttributeValue"); + AttributeValue::AttributeValue () { } diff --git a/src/core/model/boolean.cc b/src/core/model/boolean.cc index 49e0717ef..42957b9eb 100644 --- a/src/core/model/boolean.cc +++ b/src/core/model/boolean.cc @@ -21,10 +21,10 @@ #include "fatal-error.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("Boolean"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Boolean"); + BooleanValue::BooleanValue () : m_value (false) { diff --git a/src/core/model/breakpoint.cc b/src/core/model/breakpoint.cc index 103475cf6..93e91d76f 100644 --- a/src/core/model/breakpoint.cc +++ b/src/core/model/breakpoint.cc @@ -26,10 +26,10 @@ # include #endif -NS_LOG_COMPONENT_DEFINE ("Breakpoint"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Breakpoint"); + #if defined (HAVE_SIGNAL_H) && defined (SIGTRAP) void diff --git a/src/core/model/calendar-scheduler.cc b/src/core/model/calendar-scheduler.cc index 65f672570..ccfe59ce8 100644 --- a/src/core/model/calendar-scheduler.cc +++ b/src/core/model/calendar-scheduler.cc @@ -26,10 +26,10 @@ #include "assert.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("CalendarScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CalendarScheduler"); + NS_OBJECT_ENSURE_REGISTERED (CalendarScheduler); TypeId diff --git a/src/core/model/callback.cc b/src/core/model/callback.cc index 0381e4902..88df2a383 100644 --- a/src/core/model/callback.cc +++ b/src/core/model/callback.cc @@ -1,10 +1,30 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2005,2006 INRIA + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * 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: Mathieu Lacage + */ + #include "callback.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("Callback"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Callback"); + CallbackValue::CallbackValue () : m_value () { diff --git a/src/core/model/command-line.cc b/src/core/model/command-line.cc index 1213a5d14..c39b45c6c 100644 --- a/src/core/model/command-line.cc +++ b/src/core/model/command-line.cc @@ -34,10 +34,10 @@ #include "string.h" -NS_LOG_COMPONENT_DEFINE ("CommandLine"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CommandLine"); + CommandLine::CommandLine () { NS_LOG_FUNCTION (this); diff --git a/src/core/model/config.cc b/src/core/model/config.cc index 8beff4436..f98b8b015 100644 --- a/src/core/model/config.cc +++ b/src/core/model/config.cc @@ -28,10 +28,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("Config"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Config"); + namespace Config { MatchContainer::MatchContainer () diff --git a/src/core/model/default-simulator-impl.cc b/src/core/model/default-simulator-impl.cc index bada92fa2..eeeb7bb31 100644 --- a/src/core/model/default-simulator-impl.cc +++ b/src/core/model/default-simulator-impl.cc @@ -30,14 +30,14 @@ #include + +namespace ns3 { + // Note: Logging in this file is largely avoided due to the // number of calls that are made to these functions and the possibility // of causing recursions leading to stack overflow - NS_LOG_COMPONENT_DEFINE ("DefaultSimulatorImpl"); -namespace ns3 { - NS_OBJECT_ENSURE_REGISTERED (DefaultSimulatorImpl); TypeId diff --git a/src/core/model/double.cc b/src/core/model/double.cc index 7c3b3d8c5..585f031ea 100644 --- a/src/core/model/double.cc +++ b/src/core/model/double.cc @@ -22,10 +22,10 @@ #include "log.h" #include -NS_LOG_COMPONENT_DEFINE ("Double"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Double"); + ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (double, Double); namespace internal { diff --git a/src/core/model/enum.cc b/src/core/model/enum.cc index 91274a7cd..882f4e919 100644 --- a/src/core/model/enum.cc +++ b/src/core/model/enum.cc @@ -22,10 +22,10 @@ #include "log.h" #include -NS_LOG_COMPONENT_DEFINE ("Enum"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Enum"); + EnumValue::EnumValue () : m_v () { diff --git a/src/core/model/event-id.cc b/src/core/model/event-id.cc index 65b66a918..324b8ad03 100644 --- a/src/core/model/event-id.cc +++ b/src/core/model/event-id.cc @@ -22,10 +22,10 @@ #include "event-impl.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("EventId"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EventId"); + EventId::EventId () : m_eventImpl (0), m_ts (0), diff --git a/src/core/model/event-impl.cc b/src/core/model/event-impl.cc index b759ad05c..ac6de04f9 100644 --- a/src/core/model/event-impl.cc +++ b/src/core/model/event-impl.cc @@ -21,10 +21,10 @@ #include "event-impl.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("EventImpl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EventImpl"); + EventImpl::~EventImpl () { NS_LOG_FUNCTION (this); diff --git a/src/core/model/fatal-impl.cc b/src/core/model/fatal-impl.cc index 6aebe696f..3b2d87cb8 100644 --- a/src/core/model/fatal-impl.cc +++ b/src/core/model/fatal-impl.cc @@ -28,9 +28,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("FatalImpl"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("FatalImpl"); + namespace FatalImpl { /** diff --git a/src/core/model/global-value.cc b/src/core/model/global-value.cc index 4fec3c4da..4bd97ea38 100644 --- a/src/core/model/global-value.cc +++ b/src/core/model/global-value.cc @@ -29,10 +29,10 @@ #include #endif -NS_LOG_COMPONENT_DEFINE ("GlobalValue"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GlobalValue"); + GlobalValue::GlobalValue (std::string name, std::string help, const AttributeValue &initialValue, Ptr checker) diff --git a/src/core/model/hash-fnv.cc b/src/core/model/hash-fnv.cc index 0e3eaf634..cffe60800 100644 --- a/src/core/model/hash-fnv.cc +++ b/src/core/model/hash-fnv.cc @@ -36,10 +36,10 @@ #include "hash-fnv.h" -NS_LOG_COMPONENT_DEFINE ("Hash-Fnv"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Hash-Fnv"); + namespace Hash { namespace Function { diff --git a/src/core/model/hash-function.cc b/src/core/model/hash-function.cc index fcb871e14..37a331c3f 100644 --- a/src/core/model/hash-function.cc +++ b/src/core/model/hash-function.cc @@ -22,10 +22,10 @@ #include "hash-function.h" -NS_LOG_COMPONENT_DEFINE ("HashFunction"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("HashFunction"); + namespace Hash { uint64_t diff --git a/src/core/model/hash-murmur3.cc b/src/core/model/hash-murmur3.cc index 82f543c1e..a3440528b 100644 --- a/src/core/model/hash-murmur3.cc +++ b/src/core/model/hash-murmur3.cc @@ -34,10 +34,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("Hash-Murmur3"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Hash-Murmur3"); + namespace Hash { namespace Function { diff --git a/src/core/model/hash.cc b/src/core/model/hash.cc index 9d173a0a7..78765ea0f 100644 --- a/src/core/model/hash.cc +++ b/src/core/model/hash.cc @@ -22,10 +22,10 @@ #include "hash.h" -NS_LOG_COMPONENT_DEFINE ("Hash"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Hash"); + Hasher::Hasher () { m_impl = Create (); diff --git a/src/core/model/heap-scheduler.cc b/src/core/model/heap-scheduler.cc index ac946c920..71b000f9a 100644 --- a/src/core/model/heap-scheduler.cc +++ b/src/core/model/heap-scheduler.cc @@ -25,10 +25,10 @@ #include "assert.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("HeapScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("HeapScheduler"); + NS_OBJECT_ENSURE_REGISTERED (HeapScheduler); TypeId diff --git a/src/core/model/int64x64-128.cc b/src/core/model/int64x64-128.cc index a0854f2b9..b17c3b157 100644 --- a/src/core/model/int64x64-128.cc +++ b/src/core/model/int64x64-128.cc @@ -3,14 +3,13 @@ #include "assert.h" #include "log.h" +namespace ns3 { + // Note: Logging in this file is largely avoided due to the // number of calls that are made to these functions and the possibility // of causing recursions leading to stack overflow - NS_LOG_COMPONENT_DEFINE ("int64x64-128"); -namespace ns3 { - static inline bool output_sign (const int128_t sa, diff --git a/src/core/model/int64x64-cairo.cc b/src/core/model/int64x64-cairo.cc index e6c07332e..d80f1f3df 100644 --- a/src/core/model/int64x64-cairo.cc +++ b/src/core/model/int64x64-cairo.cc @@ -25,20 +25,18 @@ #include #include "int64x64-cairo.h" -// Note: Logging in this file is largely avoided due to the -// number of calls that are made to these functions and the possibility -// of causing recursions leading to stack overflow - -NS_LOG_COMPONENT_DEFINE ("int64x64-cairo"); - // Include directly to allow optimizations within this compilation unit. extern "C" { #include "cairo-wideint.c" } - namespace ns3 { +// Note: Logging in this file is largely avoided due to the +// number of calls that are made to these functions and the possibility +// of causing recursions leading to stack overflow +NS_LOG_COMPONENT_DEFINE ("int64x64-cairo"); + static inline bool output_sign (const cairo_int128_t sa, diff --git a/src/core/model/int64x64.cc b/src/core/model/int64x64.cc index 04dc353d2..0ae874748 100644 --- a/src/core/model/int64x64.cc +++ b/src/core/model/int64x64.cc @@ -6,14 +6,14 @@ #include "assert.h" #include "log.h" + +namespace ns3 { + // Note: Logging in this file is largely avoided due to the // number of calls that are made to these functions and the possibility // of causing recursions leading to stack overflow - NS_LOG_COMPONENT_DEFINE ("int64x64"); -namespace ns3 { - /** * \internal * This algorithm is exact to the precision requested, up to the full diff --git a/src/core/model/integer.cc b/src/core/model/integer.cc index 1bc24fb68..324123585 100644 --- a/src/core/model/integer.cc +++ b/src/core/model/integer.cc @@ -22,10 +22,10 @@ #include "log.h" #include -NS_LOG_COMPONENT_DEFINE ("Integer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Integer"); + ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (int64_t, Integer); namespace internal { diff --git a/src/core/model/list-scheduler.cc b/src/core/model/list-scheduler.cc index f4a9d2bf0..2fb2302ca 100644 --- a/src/core/model/list-scheduler.cc +++ b/src/core/model/list-scheduler.cc @@ -25,10 +25,9 @@ #include #include "assert.h" -NS_LOG_COMPONENT_DEFINE ("ListScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ListScheduler"); NS_OBJECT_ENSURE_REGISTERED (ListScheduler); diff --git a/src/core/model/make-event.cc b/src/core/model/make-event.cc index 7fd31ef43..479b30457 100644 --- a/src/core/model/make-event.cc +++ b/src/core/model/make-event.cc @@ -1,10 +1,10 @@ #include "make-event.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("MakeEvent"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MakeEvent"); + EventImpl * MakeEvent (void (*f)(void)) { NS_LOG_FUNCTION (f); diff --git a/src/core/model/map-scheduler.cc b/src/core/model/map-scheduler.cc index 2df704524..2e3302a9d 100644 --- a/src/core/model/map-scheduler.cc +++ b/src/core/model/map-scheduler.cc @@ -25,10 +25,10 @@ #include "log.h" #include -NS_LOG_COMPONENT_DEFINE ("MapScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MapScheduler"); + NS_OBJECT_ENSURE_REGISTERED (MapScheduler); TypeId diff --git a/src/core/model/names.cc b/src/core/model/names.cc index 58fc2e33f..306141a6f 100644 --- a/src/core/model/names.cc +++ b/src/core/model/names.cc @@ -23,10 +23,10 @@ #include "abort.h" #include "names.h" -NS_LOG_COMPONENT_DEFINE ("Names"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Names"); + class NameNode { public: diff --git a/src/core/model/object-base.cc b/src/core/model/object-base.cc index db2182131..c7f80f20b 100644 --- a/src/core/model/object-base.cc +++ b/src/core/model/object-base.cc @@ -27,10 +27,10 @@ #include #endif -NS_LOG_COMPONENT_DEFINE ("ObjectBase"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ObjectBase"); + NS_OBJECT_ENSURE_REGISTERED (ObjectBase); static TypeId diff --git a/src/core/model/object-factory.cc b/src/core/model/object-factory.cc index 992056f03..9fae501e4 100644 --- a/src/core/model/object-factory.cc +++ b/src/core/model/object-factory.cc @@ -21,10 +21,10 @@ #include "log.h" #include -NS_LOG_COMPONENT_DEFINE("ObjectFactory"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE("ObjectFactory"); + ObjectFactory::ObjectFactory () { NS_LOG_FUNCTION (this); diff --git a/src/core/model/object-ptr-container.cc b/src/core/model/object-ptr-container.cc index 6b3de458d..65f3bef66 100644 --- a/src/core/model/object-ptr-container.cc +++ b/src/core/model/object-ptr-container.cc @@ -20,10 +20,10 @@ #include "object-ptr-container.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("ObjectPtrContainer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ObjectPtrContainer"); + ObjectPtrContainerValue::ObjectPtrContainerValue () { NS_LOG_FUNCTION (this); diff --git a/src/core/model/object.cc b/src/core/model/object.cc index fcd633242..d6e045a2c 100644 --- a/src/core/model/object.cc +++ b/src/core/model/object.cc @@ -33,10 +33,10 @@ -NS_LOG_COMPONENT_DEFINE ("Object"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Object"); + /********************************************************************* * The Object implementation *********************************************************************/ diff --git a/src/core/model/pointer.cc b/src/core/model/pointer.cc index ac7d7ba34..d7652bbd5 100644 --- a/src/core/model/pointer.cc +++ b/src/core/model/pointer.cc @@ -22,10 +22,10 @@ #include "log.h" #include -NS_LOG_COMPONENT_DEFINE ("Pointer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Pointer"); + PointerValue::PointerValue () : m_value () { diff --git a/src/core/model/random-variable-stream.cc b/src/core/model/random-variable-stream.cc index 92d92d623..22c9bcf68 100644 --- a/src/core/model/random-variable-stream.cc +++ b/src/core/model/random-variable-stream.cc @@ -36,10 +36,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("RandomVariableStream"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RandomVariableStream"); + NS_OBJECT_ENSURE_REGISTERED (RandomVariableStream); TypeId diff --git a/src/core/model/random-variable.cc b/src/core/model/random-variable.cc index 098b9d00b..ee35ad573 100644 --- a/src/core/model/random-variable.cc +++ b/src/core/model/random-variable.cc @@ -38,10 +38,10 @@ #include "fatal-error.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("RandomVariable"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RandomVariable"); + // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // RandomVariableBase methods diff --git a/src/core/model/realtime-simulator-impl.cc b/src/core/model/realtime-simulator-impl.cc index abce3fd0a..d5121754a 100644 --- a/src/core/model/realtime-simulator-impl.cc +++ b/src/core/model/realtime-simulator-impl.cc @@ -35,14 +35,14 @@ #include + +namespace ns3 { + // Note: Logging in this file is largely avoided due to the // number of calls that are made to these functions and the possibility // of causing recursions leading to stack overflow - NS_LOG_COMPONENT_DEFINE ("RealtimeSimulatorImpl"); -namespace ns3 { - NS_OBJECT_ENSURE_REGISTERED (RealtimeSimulatorImpl); TypeId diff --git a/src/core/model/ref-count-base.cc b/src/core/model/ref-count-base.cc index 52836a101..38c77dff6 100644 --- a/src/core/model/ref-count-base.cc +++ b/src/core/model/ref-count-base.cc @@ -1,10 +1,10 @@ #include "ref-count-base.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("RefCountBase"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RefCountBase"); + RefCountBase::~RefCountBase () { NS_LOG_FUNCTION (this); diff --git a/src/core/model/rng-seed-manager.cc b/src/core/model/rng-seed-manager.cc index 1c98f1e83..04153ede5 100644 --- a/src/core/model/rng-seed-manager.cc +++ b/src/core/model/rng-seed-manager.cc @@ -5,10 +5,10 @@ #include "config.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("RngSeedManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RngSeedManager"); + static uint64_t g_nextStreamIndex = 0; static ns3::GlobalValue g_rngSeed ("RngSeed", "The global seed of all rng streams", diff --git a/src/core/model/rng-stream.cc b/src/core/model/rng-stream.cc index 274d57bfb..0ca3d5f8e 100644 --- a/src/core/model/rng-stream.cc +++ b/src/core/model/rng-stream.cc @@ -26,12 +26,16 @@ #include "fatal-error.h" #include "log.h" +namespace ns3 { + // Note: Logging in this file is largely avoided due to the // number of calls that are made to these functions and the possibility // of causing recursions leading to stack overflow - NS_LOG_COMPONENT_DEFINE ("RngStream"); +} // namespace ns3 + + namespace { typedef double Matrix[3][3]; diff --git a/src/core/model/scheduler.cc b/src/core/model/scheduler.cc index ca4f1234c..5c27e60fa 100644 --- a/src/core/model/scheduler.cc +++ b/src/core/model/scheduler.cc @@ -22,10 +22,10 @@ #include "assert.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("Scheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Scheduler"); + NS_OBJECT_ENSURE_REGISTERED (Scheduler); Scheduler::~Scheduler () diff --git a/src/core/model/simulator-impl.cc b/src/core/model/simulator-impl.cc index 86ba4b493..975bd21f5 100644 --- a/src/core/model/simulator-impl.cc +++ b/src/core/model/simulator-impl.cc @@ -1,10 +1,10 @@ #include "simulator-impl.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("SimulatorImpl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SimulatorImpl"); + TypeId SimulatorImpl::GetTypeId (void) { diff --git a/src/core/model/simulator.cc b/src/core/model/simulator.cc index 376a49479..1d249baa6 100644 --- a/src/core/model/simulator.cc +++ b/src/core/model/simulator.cc @@ -37,14 +37,13 @@ #include #include +namespace ns3 { + // Note: Logging in this file is largely avoided due to the // number of calls that are made to these functions and the possibility // of causing recursions leading to stack overflow - NS_LOG_COMPONENT_DEFINE ("Simulator"); -namespace ns3 { - static GlobalValue g_simTypeImpl = GlobalValue ("SimulatorImplementationType", "The object class to use as the simulator implementation", StringValue ("ns3::DefaultSimulatorImpl"), diff --git a/src/core/model/synchronizer.cc b/src/core/model/synchronizer.cc index 5f808d6d1..4a6b20a7b 100644 --- a/src/core/model/synchronizer.cc +++ b/src/core/model/synchronizer.cc @@ -19,10 +19,10 @@ #include "synchronizer.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("Synchronizer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Synchronizer"); + NS_OBJECT_ENSURE_REGISTERED (Synchronizer); TypeId diff --git a/src/core/model/system-path.cc b/src/core/model/system-path.cc index 69fce5e76..168bb34e0 100644 --- a/src/core/model/system-path.cc +++ b/src/core/model/system-path.cc @@ -55,10 +55,10 @@ #define SYSTEM_PATH_SEP "/" #endif -NS_LOG_COMPONENT_DEFINE ("SystemPath"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SystemPath"); + namespace SystemPath { std::string Dirname (std::string path) diff --git a/src/core/model/system-thread.cc b/src/core/model/system-thread.cc index a51bf08ba..afe84eca4 100644 --- a/src/core/model/system-thread.cc +++ b/src/core/model/system-thread.cc @@ -23,10 +23,10 @@ #include "log.h" #include -NS_LOG_COMPONENT_DEFINE ("SystemThread"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SystemThread"); + #ifdef HAVE_PTHREAD_H SystemThread::SystemThread (Callback callback) diff --git a/src/core/model/test.cc b/src/core/model/test.cc index 04debfb56..77c54a65f 100644 --- a/src/core/model/test.cc +++ b/src/core/model/test.cc @@ -28,10 +28,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("Test"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Test"); + bool TestDoubleIsEqual (const double x1, const double x2, const double epsilon) { diff --git a/src/core/model/time.cc b/src/core/model/time.cc index 4e050aab0..9e8201b33 100644 --- a/src/core/model/time.cc +++ b/src/core/model/time.cc @@ -32,10 +32,10 @@ #include // showpos #include -NS_LOG_COMPONENT_DEFINE_MASK ("Time", ns3::LOG_PREFIX_TIME); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE_MASK ("Time", ns3::LOG_PREFIX_TIME); + // The set of marked times // static Time::MarkedTimes * Time::g_markingTimes = 0; diff --git a/src/core/model/timer.cc b/src/core/model/timer.cc index 1417f7c66..704035e79 100644 --- a/src/core/model/timer.cc +++ b/src/core/model/timer.cc @@ -22,10 +22,10 @@ #include "simulation-singleton.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("Timer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Timer"); + Timer::Timer () : m_flags (CHECK_ON_DESTROY), m_delay (FemtoSeconds (0)), diff --git a/src/core/model/trace-source-accessor.cc b/src/core/model/trace-source-accessor.cc index 059c59f14..781988d85 100644 --- a/src/core/model/trace-source-accessor.cc +++ b/src/core/model/trace-source-accessor.cc @@ -20,10 +20,10 @@ #include "trace-source-accessor.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("TraceSourceAccessor"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TraceSourceAccessor"); + TraceSourceAccessor::TraceSourceAccessor () { } diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc index 245ea2e7a..079cf6c7a 100644 --- a/src/core/model/type-id.cc +++ b/src/core/model/type-id.cc @@ -32,10 +32,10 @@ * Helper code *********************************************************************/ -NS_LOG_COMPONENT_DEFINE ("TypeId"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TypeId"); + // IidManager needs to be in ns3 namespace for NS_ASSERT and NS_LOG // to find g_log diff --git a/src/core/model/uinteger.cc b/src/core/model/uinteger.cc index cb981575e..fc9589642 100644 --- a/src/core/model/uinteger.cc +++ b/src/core/model/uinteger.cc @@ -22,10 +22,10 @@ #include "log.h" #include -NS_LOG_COMPONENT_DEFINE ("Uinteger"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Uinteger"); + ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME (uint64_t,Uinteger); namespace internal { diff --git a/src/core/model/unix-fd-reader.cc b/src/core/model/unix-fd-reader.cc index 9fb4af8d9..b39a8ff2e 100644 --- a/src/core/model/unix-fd-reader.cc +++ b/src/core/model/unix-fd-reader.cc @@ -32,10 +32,10 @@ #include "unix-fd-reader.h" -NS_LOG_COMPONENT_DEFINE ("FdReader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FdReader"); + FdReader::FdReader () : m_fd (-1), m_readCallback (0), m_readThread (0), m_stop (false), m_destroyEvent () diff --git a/src/core/model/unix-system-condition.cc b/src/core/model/unix-system-condition.cc index b80be899b..48b32a9a4 100644 --- a/src/core/model/unix-system-condition.cc +++ b/src/core/model/unix-system-condition.cc @@ -25,10 +25,10 @@ #include "log.h" -NS_LOG_COMPONENT_DEFINE ("SystemCondition"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SystemCondition"); + class SystemConditionPrivate { public: /// Conversion from ns to s. diff --git a/src/core/model/unix-system-mutex.cc b/src/core/model/unix-system-mutex.cc index 2d9a7f5bc..308849a4b 100644 --- a/src/core/model/unix-system-mutex.cc +++ b/src/core/model/unix-system-mutex.cc @@ -27,10 +27,10 @@ #include "log.h" -NS_LOG_COMPONENT_DEFINE_MASK ("SystemMutex", ns3::LOG_PREFIX_TIME); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE_MASK ("SystemMutex", ns3::LOG_PREFIX_TIME); + class SystemMutexPrivate { public: SystemMutexPrivate (); diff --git a/src/core/model/unix-system-wall-clock-ms.cc b/src/core/model/unix-system-wall-clock-ms.cc index a7d1a9a8f..a0269eff8 100644 --- a/src/core/model/unix-system-wall-clock-ms.cc +++ b/src/core/model/unix-system-wall-clock-ms.cc @@ -24,10 +24,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("SystemWallClockMsPrivate"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SystemWallClockMsPrivate"); + class SystemWallClockMsPrivate { public: void Start (void); diff --git a/src/core/model/vector.cc b/src/core/model/vector.cc index 84ec2bb72..12d37adb4 100644 --- a/src/core/model/vector.cc +++ b/src/core/model/vector.cc @@ -23,10 +23,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Vector"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Vector"); + ATTRIBUTE_HELPER_CPP (Vector3D); ATTRIBUTE_HELPER_CPP (Vector2D); // compatibility for mobility code diff --git a/src/core/model/wall-clock-synchronizer.cc b/src/core/model/wall-clock-synchronizer.cc index 9c9baf759..ddf1071cc 100644 --- a/src/core/model/wall-clock-synchronizer.cc +++ b/src/core/model/wall-clock-synchronizer.cc @@ -24,10 +24,10 @@ #include "wall-clock-synchronizer.h" -NS_LOG_COMPONENT_DEFINE ("WallClockSynchronizer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WallClockSynchronizer"); + WallClockSynchronizer::WallClockSynchronizer () { NS_LOG_FUNCTION (this); diff --git a/src/core/model/watchdog.cc b/src/core/model/watchdog.cc index 315e22605..2b9640259 100644 --- a/src/core/model/watchdog.cc +++ b/src/core/model/watchdog.cc @@ -20,10 +20,10 @@ #include "watchdog.h" #include "log.h" -NS_LOG_COMPONENT_DEFINE ("Watchdog"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Watchdog"); + Watchdog::Watchdog () : m_impl (0), m_event (), diff --git a/src/csma-layout/model/csma-star-helper.cc b/src/csma-layout/model/csma-star-helper.cc index f2faaf7c5..341e1f831 100644 --- a/src/csma-layout/model/csma-star-helper.cc +++ b/src/csma-layout/model/csma-star-helper.cc @@ -24,10 +24,10 @@ #include "ns3/vector.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("CsmaStarHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CsmaStarHelper"); + CsmaStarHelper::CsmaStarHelper (uint32_t numSpokes, CsmaHelper csmaHelper) { diff --git a/src/csma/helper/csma-helper.cc b/src/csma/helper/csma-helper.cc index d48c99a40..e4f5a4b50 100644 --- a/src/csma/helper/csma-helper.cc +++ b/src/csma/helper/csma-helper.cc @@ -34,10 +34,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("CsmaHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CsmaHelper"); + CsmaHelper::CsmaHelper () { m_queueFactory.SetTypeId ("ns3::DropTailQueue"); diff --git a/src/csma/model/backoff.cc b/src/csma/model/backoff.cc index 37c4e0fb5..26fc064d4 100644 --- a/src/csma/model/backoff.cc +++ b/src/csma/model/backoff.cc @@ -21,10 +21,10 @@ #include "backoff.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Backoff"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Backoff"); + Backoff::Backoff () { m_slotTime = MicroSeconds (1); diff --git a/src/csma/model/csma-channel.cc b/src/csma/model/csma-channel.cc index a95fbe436..815977976 100644 --- a/src/csma/model/csma-channel.cc +++ b/src/csma/model/csma-channel.cc @@ -24,10 +24,10 @@ #include "ns3/simulator.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("CsmaChannel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CsmaChannel"); + NS_OBJECT_ENSURE_REGISTERED (CsmaChannel); TypeId diff --git a/src/csma/model/csma-net-device.cc b/src/csma/model/csma-net-device.cc index fcd5cc114..2a665f0e0 100644 --- a/src/csma/model/csma-net-device.cc +++ b/src/csma/model/csma-net-device.cc @@ -33,10 +33,10 @@ #include "csma-net-device.h" #include "csma-channel.h" -NS_LOG_COMPONENT_DEFINE ("CsmaNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CsmaNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (CsmaNetDevice); TypeId diff --git a/src/dsdv/model/dsdv-packet-queue.cc b/src/dsdv/model/dsdv-packet-queue.cc index 33ff44f22..ae2b9462c 100644 --- a/src/dsdv/model/dsdv-packet-queue.cc +++ b/src/dsdv/model/dsdv-packet-queue.cc @@ -35,9 +35,10 @@ #include "ns3/socket.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("DsdvPacketQueue"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsdvPacketQueue"); + namespace dsdv { uint32_t PacketQueue::GetSize () diff --git a/src/dsdv/model/dsdv-routing-protocol.cc b/src/dsdv/model/dsdv-routing-protocol.cc index 046dfa1e8..0dd836119 100644 --- a/src/dsdv/model/dsdv-routing-protocol.cc +++ b/src/dsdv/model/dsdv-routing-protocol.cc @@ -40,9 +40,10 @@ #include "ns3/double.h" #include "ns3/uinteger.h" -NS_LOG_COMPONENT_DEFINE ("DsdvRoutingProtocol"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsdvRoutingProtocol"); + namespace dsdv { NS_OBJECT_ENSURE_REGISTERED (RoutingProtocol); diff --git a/src/dsdv/model/dsdv-rtable.cc b/src/dsdv/model/dsdv-rtable.cc index 7b2653f83..fd92aacc2 100644 --- a/src/dsdv/model/dsdv-rtable.cc +++ b/src/dsdv/model/dsdv-rtable.cc @@ -33,9 +33,10 @@ #include #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("DsdvRoutingTable"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsdvRoutingTable"); + namespace dsdv { RoutingTableEntry::RoutingTableEntry (Ptr dev, Ipv4Address dst, diff --git a/src/dsr/examples/dsr.cc b/src/dsr/examples/dsr.cc index ee1c5b756..c32e85841 100644 --- a/src/dsr/examples/dsr.cc +++ b/src/dsr/examples/dsr.cc @@ -40,6 +40,7 @@ #include using namespace ns3; + NS_LOG_COMPONENT_DEFINE ("DsrTest"); int diff --git a/src/dsr/helper/dsr-helper.cc b/src/dsr/helper/dsr-helper.cc index ca6c46481..769a541b9 100644 --- a/src/dsr/helper/dsr-helper.cc +++ b/src/dsr/helper/dsr-helper.cc @@ -43,10 +43,10 @@ #include "ns3/node-list.h" #include "ns3/names.h" -NS_LOG_COMPONENT_DEFINE ("DsrHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DsrHelper"); + DsrHelper::DsrHelper () { NS_LOG_FUNCTION (this); diff --git a/src/dsr/helper/dsr-main-helper.cc b/src/dsr/helper/dsr-main-helper.cc index 562ffb6f3..b783327da 100644 --- a/src/dsr/helper/dsr-main-helper.cc +++ b/src/dsr/helper/dsr-main-helper.cc @@ -40,10 +40,10 @@ #include "ns3/ptr.h" #include "ns3/node.h" -NS_LOG_COMPONENT_DEFINE ("DsrMainHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DsrMainHelper"); + DsrMainHelper::DsrMainHelper () : m_dsrHelper (0) { diff --git a/src/dsr/model/dsr-errorbuff.cc b/src/dsr/model/dsr-errorbuff.cc index c43b80531..3d3cbb3b6 100644 --- a/src/dsr/model/dsr-errorbuff.cc +++ b/src/dsr/model/dsr-errorbuff.cc @@ -36,9 +36,10 @@ #include "ns3/socket.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("DsrErrorBuffer"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsrErrorBuffer"); + namespace dsr { uint32_t diff --git a/src/dsr/model/dsr-fs-header.cc b/src/dsr/model/dsr-fs-header.cc index 73de37669..6fceb73cd 100644 --- a/src/dsr/model/dsr-fs-header.cc +++ b/src/dsr/model/dsr-fs-header.cc @@ -35,10 +35,11 @@ #include "dsr-fs-header.h" namespace ns3 { -namespace dsr { NS_LOG_COMPONENT_DEFINE ("DsrFsHeader"); +namespace dsr { + NS_OBJECT_ENSURE_REGISTERED (DsrFsHeader); TypeId DsrFsHeader::GetTypeId () diff --git a/src/dsr/model/dsr-gratuitous-reply-table.cc b/src/dsr/model/dsr-gratuitous-reply-table.cc index 572cfbcf5..ecba4a6a7 100644 --- a/src/dsr/model/dsr-gratuitous-reply-table.cc +++ b/src/dsr/model/dsr-gratuitous-reply-table.cc @@ -33,9 +33,10 @@ #include "ns3/log.h" #include -NS_LOG_COMPONENT_DEFINE ("DsrGraReplyTable"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsrGraReplyTable"); + namespace dsr { NS_OBJECT_ENSURE_REGISTERED (GraReply); diff --git a/src/dsr/model/dsr-maintain-buff.cc b/src/dsr/model/dsr-maintain-buff.cc index 2393b10da..da1536ffb 100644 --- a/src/dsr/model/dsr-maintain-buff.cc +++ b/src/dsr/model/dsr-maintain-buff.cc @@ -36,9 +36,10 @@ #include "ns3/socket.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("DsrMaintainBuffer"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsrMaintainBuffer"); + namespace dsr { uint32_t diff --git a/src/dsr/model/dsr-network-queue.cc b/src/dsr/model/dsr-network-queue.cc index 1639c4efe..a6bb95798 100644 --- a/src/dsr/model/dsr-network-queue.cc +++ b/src/dsr/model/dsr-network-queue.cc @@ -38,9 +38,10 @@ #include "ns3/ipv4-route.h" #include "ns3/socket.h" -NS_LOG_COMPONENT_DEFINE ("DsrNetworkQueue"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsrNetworkQueue"); + namespace dsr { NS_OBJECT_ENSURE_REGISTERED (DsrNetworkQueue); diff --git a/src/dsr/model/dsr-option-header.cc b/src/dsr/model/dsr-option-header.cc index 5a412d151..b540e6d12 100644 --- a/src/dsr/model/dsr-option-header.cc +++ b/src/dsr/model/dsr-option-header.cc @@ -39,9 +39,11 @@ #include "ns3/enum.h" namespace ns3 { -namespace dsr { + NS_LOG_COMPONENT_DEFINE ("DsrOptionHeader"); +namespace dsr { + NS_OBJECT_ENSURE_REGISTERED (DsrOptionHeader); TypeId DsrOptionHeader::GetTypeId () diff --git a/src/dsr/model/dsr-options.cc b/src/dsr/model/dsr-options.cc index ba1006e6d..04064af3e 100644 --- a/src/dsr/model/dsr-options.cc +++ b/src/dsr/model/dsr-options.cc @@ -60,9 +60,10 @@ #include "dsr-options.h" #include "dsr-rcache.h" -NS_LOG_COMPONENT_DEFINE ("DsrOptions"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsrOptions"); + namespace dsr { NS_OBJECT_ENSURE_REGISTERED (DsrOptions); diff --git a/src/dsr/model/dsr-passive-buff.cc b/src/dsr/model/dsr-passive-buff.cc index e55e74cd1..32634cc1e 100644 --- a/src/dsr/model/dsr-passive-buff.cc +++ b/src/dsr/model/dsr-passive-buff.cc @@ -36,9 +36,10 @@ #include "ns3/socket.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("PassiveBuffer"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("PassiveBuffer"); + namespace dsr { NS_OBJECT_ENSURE_REGISTERED (PassiveBuffer); diff --git a/src/dsr/model/dsr-rcache.cc b/src/dsr/model/dsr-rcache.cc index 1cc77cdc1..3c0abc2f0 100644 --- a/src/dsr/model/dsr-rcache.cc +++ b/src/dsr/model/dsr-rcache.cc @@ -47,9 +47,10 @@ #include "ns3/address-utils.h" #include "ns3/packet.h" -NS_LOG_COMPONENT_DEFINE ("RouteCache"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("RouteCache"); + namespace dsr { bool CompareRoutesBoth (const RouteCacheEntry &a, const RouteCacheEntry &b) diff --git a/src/dsr/model/dsr-routing.cc b/src/dsr/model/dsr-routing.cc index 13c92ac73..0d3837e70 100644 --- a/src/dsr/model/dsr-routing.cc +++ b/src/dsr/model/dsr-routing.cc @@ -75,9 +75,10 @@ #include "dsr-fs-header.h" #include "dsr-options.h" -NS_LOG_COMPONENT_DEFINE ("DsrRouting"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsrRouting"); + namespace dsr { NS_OBJECT_ENSURE_REGISTERED (DsrRouting); diff --git a/src/dsr/model/dsr-rreq-table.cc b/src/dsr/model/dsr-rreq-table.cc index 362292639..1e46215d4 100644 --- a/src/dsr/model/dsr-rreq-table.cc +++ b/src/dsr/model/dsr-rreq-table.cc @@ -34,9 +34,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("RreqTable"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("RreqTable"); + namespace dsr { NS_OBJECT_ENSURE_REGISTERED (RreqTable); diff --git a/src/dsr/model/dsr-rsendbuff.cc b/src/dsr/model/dsr-rsendbuff.cc index 95fcd7959..96f620ff5 100644 --- a/src/dsr/model/dsr-rsendbuff.cc +++ b/src/dsr/model/dsr-rsendbuff.cc @@ -36,9 +36,10 @@ #include "ns3/socket.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("DsrSendBuffer"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("DsrSendBuffer"); + namespace dsr { uint32_t diff --git a/src/emu/helper/emu-helper.cc b/src/emu/helper/emu-helper.cc index 7cc979e9b..9aafcaa65 100644 --- a/src/emu/helper/emu-helper.cc +++ b/src/emu/helper/emu-helper.cc @@ -30,10 +30,10 @@ #include "ns3/trace-helper.h" #include "emu-helper.h" -NS_LOG_COMPONENT_DEFINE ("EmuHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EmuHelper"); + EmuHelper::EmuHelper () { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/emu/model/emu-net-device.cc b/src/emu/model/emu-net-device.cc index b82051f55..413124802 100644 --- a/src/emu/model/emu-net-device.cc +++ b/src/emu/model/emu-net-device.cc @@ -51,10 +51,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("EmuNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EmuNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (EmuNetDevice); #define EMU_MAGIC 65867 diff --git a/src/energy/helper/energy-harvester-container.cc b/src/energy/helper/energy-harvester-container.cc index ac45c3b22..b81533fe2 100644 --- a/src/energy/helper/energy-harvester-container.cc +++ b/src/energy/helper/energy-harvester-container.cc @@ -24,9 +24,9 @@ #include "ns3/names.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("EnergyHarvesterContainer"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("EnergyHarvesterContainer"); TypeId EnergyHarvesterContainer::GetTypeId (void) diff --git a/src/energy/model/basic-energy-harvester.cc b/src/energy/model/basic-energy-harvester.cc index 6ca9b5432..0873db2b3 100644 --- a/src/energy/model/basic-energy-harvester.cc +++ b/src/energy/model/basic-energy-harvester.cc @@ -28,9 +28,9 @@ #include "ns3/trace-source-accessor.h" #include "ns3/simulator.h" -NS_LOG_COMPONENT_DEFINE ("BasicEnergyHarvester"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("BasicEnergyHarvester"); NS_OBJECT_ENSURE_REGISTERED (BasicEnergyHarvester); diff --git a/src/energy/model/basic-energy-source.cc b/src/energy/model/basic-energy-source.cc index f31e98814..8a5896c71 100644 --- a/src/energy/model/basic-energy-source.cc +++ b/src/energy/model/basic-energy-source.cc @@ -25,10 +25,10 @@ #include "ns3/trace-source-accessor.h" #include "ns3/simulator.h" -NS_LOG_COMPONENT_DEFINE ("BasicEnergySource"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BasicEnergySource"); + NS_OBJECT_ENSURE_REGISTERED (BasicEnergySource); TypeId diff --git a/src/energy/model/device-energy-model-container.cc b/src/energy/model/device-energy-model-container.cc index e609f11ba..36e7db486 100644 --- a/src/energy/model/device-energy-model-container.cc +++ b/src/energy/model/device-energy-model-container.cc @@ -24,10 +24,10 @@ #include "ns3/names.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("DeviceEnergyModelContainer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DeviceEnergyModelContainer"); + DeviceEnergyModelContainer::DeviceEnergyModelContainer () { NS_LOG_FUNCTION (this); diff --git a/src/energy/model/device-energy-model.cc b/src/energy/model/device-energy-model.cc index 5b8d4a81e..b7b79ef1d 100644 --- a/src/energy/model/device-energy-model.cc +++ b/src/energy/model/device-energy-model.cc @@ -21,10 +21,10 @@ #include "device-energy-model.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("DeviceEnergyModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DeviceEnergyModel"); + NS_OBJECT_ENSURE_REGISTERED (DeviceEnergyModel); TypeId diff --git a/src/energy/model/energy-harvester.cc b/src/energy/model/energy-harvester.cc index a120d9e88..c9cca3f0a 100644 --- a/src/energy/model/energy-harvester.cc +++ b/src/energy/model/energy-harvester.cc @@ -22,9 +22,9 @@ #include "energy-harvester.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("EnergyHarvester"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("EnergyHarvester"); NS_OBJECT_ENSURE_REGISTERED (EnergyHarvester); diff --git a/src/energy/model/energy-source.cc b/src/energy/model/energy-source.cc index cf6676b9a..ad5e86098 100644 --- a/src/energy/model/energy-source.cc +++ b/src/energy/model/energy-source.cc @@ -26,10 +26,10 @@ #include "energy-source.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("EnergySource"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EnergySource"); + NS_OBJECT_ENSURE_REGISTERED (EnergySource); TypeId diff --git a/src/energy/model/li-ion-energy-source.cc b/src/energy/model/li-ion-energy-source.cc index 589856f63..7b93a7e90 100644 --- a/src/energy/model/li-ion-energy-source.cc +++ b/src/energy/model/li-ion-energy-source.cc @@ -27,10 +27,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("LiIonEnergySource"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LiIonEnergySource"); + NS_OBJECT_ENSURE_REGISTERED (LiIonEnergySource); TypeId diff --git a/src/energy/model/rv-battery-model.cc b/src/energy/model/rv-battery-model.cc index 3c17188fd..291f51d0b 100644 --- a/src/energy/model/rv-battery-model.cc +++ b/src/energy/model/rv-battery-model.cc @@ -26,10 +26,10 @@ #include "ns3/simulator.h" #include -NS_LOG_COMPONENT_DEFINE ("RvBatteryModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RvBatteryModel"); + NS_OBJECT_ENSURE_REGISTERED (RvBatteryModel); TypeId diff --git a/src/energy/model/simple-device-energy-model.cc b/src/energy/model/simple-device-energy-model.cc index edefb05ae..ec76e1bab 100644 --- a/src/energy/model/simple-device-energy-model.cc +++ b/src/energy/model/simple-device-energy-model.cc @@ -24,10 +24,10 @@ #include "simple-device-energy-model.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("SimpleDeviceEnergyModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SimpleDeviceEnergyModel"); + NS_OBJECT_ENSURE_REGISTERED (SimpleDeviceEnergyModel); TypeId diff --git a/src/energy/model/wifi-radio-energy-model.cc b/src/energy/model/wifi-radio-energy-model.cc index 0227079c3..8d48f8cc4 100644 --- a/src/energy/model/wifi-radio-energy-model.cc +++ b/src/energy/model/wifi-radio-energy-model.cc @@ -27,10 +27,10 @@ #include "wifi-radio-energy-model.h" #include "wifi-tx-current-model.h" -NS_LOG_COMPONENT_DEFINE ("WifiRadioEnergyModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WifiRadioEnergyModel"); + NS_OBJECT_ENSURE_REGISTERED (WifiRadioEnergyModel); TypeId diff --git a/src/energy/model/wifi-tx-current-model.cc b/src/energy/model/wifi-tx-current-model.cc index 7142b53e6..a76f899ec 100644 --- a/src/energy/model/wifi-tx-current-model.cc +++ b/src/energy/model/wifi-tx-current-model.cc @@ -26,10 +26,10 @@ #include "ns3/pointer.h" #include -NS_LOG_COMPONENT_DEFINE ("WifiTxCurrentModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WifiTxCurrentModel"); + // ------------------------------------------------------------------------- // NS_OBJECT_ENSURE_REGISTERED (WifiTxCurrentModel); diff --git a/src/fd-net-device/helper/emu-fd-net-device-helper.cc b/src/fd-net-device/helper/emu-fd-net-device-helper.cc index 7f499ac14..a402d00cb 100644 --- a/src/fd-net-device/helper/emu-fd-net-device-helper.cc +++ b/src/fd-net-device/helper/emu-fd-net-device-helper.cc @@ -53,10 +53,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("EmuFdNetDeviceHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EmuFdNetDeviceHelper"); + #define EMU_MAGIC 65867 EmuFdNetDeviceHelper::EmuFdNetDeviceHelper () diff --git a/src/fd-net-device/helper/fd-net-device-helper.cc b/src/fd-net-device/helper/fd-net-device-helper.cc index 704bc44f4..444bf73ca 100644 --- a/src/fd-net-device/helper/fd-net-device-helper.cc +++ b/src/fd-net-device/helper/fd-net-device-helper.cc @@ -33,10 +33,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("FdNetDeviceHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FdNetDeviceHelper"); + FdNetDeviceHelper::FdNetDeviceHelper () { m_deviceFactory.SetTypeId ("ns3::FdNetDevice"); diff --git a/src/fd-net-device/helper/planetlab-fd-net-device-helper.cc b/src/fd-net-device/helper/planetlab-fd-net-device-helper.cc index e7368fd1b..9df3d6b7d 100644 --- a/src/fd-net-device/helper/planetlab-fd-net-device-helper.cc +++ b/src/fd-net-device/helper/planetlab-fd-net-device-helper.cc @@ -58,10 +58,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("PlanetLabFdNetDeviceHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PlanetLabFdNetDeviceHelper"); + #define PLANETLAB_MAGIC 75867 PlanetLabFdNetDeviceHelper::PlanetLabFdNetDeviceHelper () diff --git a/src/fd-net-device/helper/tap-fd-net-device-helper.cc b/src/fd-net-device/helper/tap-fd-net-device-helper.cc index 2fb1a4ca4..5a0749fb9 100644 --- a/src/fd-net-device/helper/tap-fd-net-device-helper.cc +++ b/src/fd-net-device/helper/tap-fd-net-device-helper.cc @@ -54,10 +54,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("TapFdNetDeviceHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TapFdNetDeviceHelper"); + #define TAP_MAGIC 95549 TapFdNetDeviceHelper::TapFdNetDeviceHelper () diff --git a/src/fd-net-device/model/fd-net-device.cc b/src/fd-net-device/model/fd-net-device.cc index acf47ab21..ce78593fd 100644 --- a/src/fd-net-device/model/fd-net-device.cc +++ b/src/fd-net-device/model/fd-net-device.cc @@ -40,10 +40,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("FdNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FdNetDevice"); + FdNetDeviceFdReader::FdNetDeviceFdReader () : m_bufferSize (65536) // Defaults to maximum TCP window size { diff --git a/src/flow-monitor/model/flow-monitor.cc b/src/flow-monitor/model/flow-monitor.cc index ecbc10571..6d364d5d0 100644 --- a/src/flow-monitor/model/flow-monitor.cc +++ b/src/flow-monitor/model/flow-monitor.cc @@ -29,10 +29,10 @@ #define PERIODIC_CHECK_INTERVAL (Seconds (1)) -NS_LOG_COMPONENT_DEFINE ("FlowMonitor"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FlowMonitor"); + NS_OBJECT_ENSURE_REGISTERED (FlowMonitor); diff --git a/src/flow-monitor/model/histogram.cc b/src/flow-monitor/model/histogram.cc index 831438078..9cc2d76c1 100644 --- a/src/flow-monitor/model/histogram.cc +++ b/src/flow-monitor/model/histogram.cc @@ -28,10 +28,10 @@ // #define RESERVED_BINS_INC 10 -NS_LOG_COMPONENT_DEFINE ("Histogram"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Histogram"); + // uint32_t // Histogram::GetSize () const // { diff --git a/src/flow-monitor/model/ipv4-flow-probe.cc b/src/flow-monitor/model/ipv4-flow-probe.cc index ccab4b3ab..41917932e 100644 --- a/src/flow-monitor/model/ipv4-flow-probe.cc +++ b/src/flow-monitor/model/ipv4-flow-probe.cc @@ -28,10 +28,10 @@ #include "ns3/config.h" #include "ns3/flow-id-tag.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4FlowProbe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4FlowProbe"); + ////////////////////////////////////// // Ipv4FlowProbeTag class implementation // ////////////////////////////////////// diff --git a/src/flow-monitor/model/ipv6-flow-probe.cc b/src/flow-monitor/model/ipv6-flow-probe.cc index 1f832d99c..148233e4d 100644 --- a/src/flow-monitor/model/ipv6-flow-probe.cc +++ b/src/flow-monitor/model/ipv6-flow-probe.cc @@ -29,10 +29,10 @@ #include "ns3/config.h" #include "ns3/flow-id-tag.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6FlowProbe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6FlowProbe"); + ////////////////////////////////////// // Ipv6FlowProbeTag class implementation // ////////////////////////////////////// diff --git a/src/internet/helper/internet-stack-helper.cc b/src/internet/helper/internet-stack-helper.cc index bf1552521..299d62eb6 100644 --- a/src/internet/helper/internet-stack-helper.cc +++ b/src/internet/helper/internet-stack-helper.cc @@ -179,10 +179,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("InternetStackHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("InternetStackHelper"); + // // Historically, the only context written to ascii traces was the protocol. // Traces from the protocols include the interface, though. It is not diff --git a/src/internet/helper/internet-trace-helper.cc b/src/internet/helper/internet-trace-helper.cc index f56d6a7a0..c0373a200 100644 --- a/src/internet/helper/internet-trace-helper.cc +++ b/src/internet/helper/internet-trace-helper.cc @@ -31,10 +31,10 @@ #include "internet-trace-helper.h" -NS_LOG_COMPONENT_DEFINE ("InternetTraceHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("InternetTraceHelper"); + void PcapHelperForIpv4::EnablePcapIpv4 (std::string prefix, Ptr ipv4, uint32_t interface, bool explicitFilename) { diff --git a/src/internet/helper/ipv4-address-helper.cc b/src/internet/helper/ipv4-address-helper.cc index 19056a0cb..314fec127 100644 --- a/src/internet/helper/ipv4-address-helper.cc +++ b/src/internet/helper/ipv4-address-helper.cc @@ -26,10 +26,10 @@ #include "ns3/simulator.h" #include "ipv4-address-helper.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4AddressHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4AddressHelper"); + Ipv4AddressHelper::Ipv4AddressHelper () { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/internet/helper/ipv4-global-routing-helper.cc b/src/internet/helper/ipv4-global-routing-helper.cc index bb95737d5..78f42f847 100644 --- a/src/internet/helper/ipv4-global-routing-helper.cc +++ b/src/internet/helper/ipv4-global-routing-helper.cc @@ -23,10 +23,10 @@ #include "ns3/ipv4-list-routing.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("GlobalRoutingHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GlobalRoutingHelper"); + Ipv4GlobalRoutingHelper::Ipv4GlobalRoutingHelper () { } diff --git a/src/internet/helper/ipv4-static-routing-helper.cc b/src/internet/helper/ipv4-static-routing-helper.cc index d8be29548..7f8b69ee4 100644 --- a/src/internet/helper/ipv4-static-routing-helper.cc +++ b/src/internet/helper/ipv4-static-routing-helper.cc @@ -29,10 +29,10 @@ #include "ns3/ipv4-routing-protocol.h" #include "ipv4-static-routing-helper.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4StaticRoutingHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4StaticRoutingHelper"); + Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper() { } diff --git a/src/internet/helper/ipv6-static-routing-helper.cc b/src/internet/helper/ipv6-static-routing-helper.cc index a094db19e..b4fca6edd 100644 --- a/src/internet/helper/ipv6-static-routing-helper.cc +++ b/src/internet/helper/ipv6-static-routing-helper.cc @@ -31,10 +31,10 @@ #include "ipv6-static-routing-helper.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6StaticRoutingHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6StaticRoutingHelper"); + Ipv6StaticRoutingHelper::Ipv6StaticRoutingHelper () { } diff --git a/src/internet/model/arp-cache.cc b/src/internet/model/arp-cache.cc index fe9610dcb..47c66068d 100644 --- a/src/internet/model/arp-cache.cc +++ b/src/internet/model/arp-cache.cc @@ -30,10 +30,10 @@ #include "arp-header.h" #include "ipv4-interface.h" -NS_LOG_COMPONENT_DEFINE ("ArpCache"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ArpCache"); + NS_OBJECT_ENSURE_REGISTERED (ArpCache); TypeId diff --git a/src/internet/model/arp-header.cc b/src/internet/model/arp-header.cc index 21ca72f20..759561020 100644 --- a/src/internet/model/arp-header.cc +++ b/src/internet/model/arp-header.cc @@ -23,10 +23,10 @@ #include "arp-header.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("ArpHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ArpHeader"); + NS_OBJECT_ENSURE_REGISTERED (ArpHeader); void diff --git a/src/internet/model/arp-l3-protocol.cc b/src/internet/model/arp-l3-protocol.cc index 715e6a193..592b21c33 100644 --- a/src/internet/model/arp-l3-protocol.cc +++ b/src/internet/model/arp-l3-protocol.cc @@ -32,10 +32,10 @@ #include "arp-cache.h" #include "ipv4-interface.h" -NS_LOG_COMPONENT_DEFINE ("ArpL3Protocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ArpL3Protocol"); + const uint16_t ArpL3Protocol::PROT_NUMBER = 0x0806; NS_OBJECT_ENSURE_REGISTERED (ArpL3Protocol); diff --git a/src/internet/model/candidate-queue.cc b/src/internet/model/candidate-queue.cc index 55c8b4ff0..354e967bf 100644 --- a/src/internet/model/candidate-queue.cc +++ b/src/internet/model/candidate-queue.cc @@ -23,10 +23,10 @@ #include "candidate-queue.h" #include "global-route-manager-impl.h" -NS_LOG_COMPONENT_DEFINE ("CandidateQueue"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CandidateQueue"); + /** * \brief Stream insertion operator. * diff --git a/src/internet/model/codel-queue.cc b/src/internet/model/codel-queue.cc index 218362018..b50fab546 100644 --- a/src/internet/model/codel-queue.cc +++ b/src/internet/model/codel-queue.cc @@ -31,10 +31,10 @@ #include "ns3/abort.h" #include "codel-queue.h" -NS_LOG_COMPONENT_DEFINE ("CoDelQueue"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CoDelQueue"); + /* borrowed from the linux kernel */ static inline uint32_t ReciprocalDivide (uint32_t A, uint32_t R) { diff --git a/src/internet/model/global-route-manager-impl.cc b/src/internet/model/global-route-manager-impl.cc index fa551ed37..e9a44b74f 100644 --- a/src/internet/model/global-route-manager-impl.cc +++ b/src/internet/model/global-route-manager-impl.cc @@ -40,10 +40,10 @@ #include "candidate-queue.h" #include "ipv4-global-routing.h" -NS_LOG_COMPONENT_DEFINE ("GlobalRouteManagerImpl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GlobalRouteManagerImpl"); + /** * \brief Stream insertion operator. * diff --git a/src/internet/model/global-route-manager.cc b/src/internet/model/global-route-manager.cc index 751124d5d..5a6164ff7 100644 --- a/src/internet/model/global-route-manager.cc +++ b/src/internet/model/global-route-manager.cc @@ -24,10 +24,10 @@ #include "global-route-manager.h" #include "global-route-manager-impl.h" -NS_LOG_COMPONENT_DEFINE ("GlobalRouteManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GlobalRouteManager"); + // --------------------------------------------------------------------------- // // GlobalRouteManager Implementation diff --git a/src/internet/model/global-router-interface.cc b/src/internet/model/global-router-interface.cc index 7fc245016..a083fb078 100644 --- a/src/internet/model/global-router-interface.cc +++ b/src/internet/model/global-router-interface.cc @@ -31,10 +31,10 @@ #include "global-router-interface.h" #include -NS_LOG_COMPONENT_DEFINE ("GlobalRouter"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GlobalRouter"); + // --------------------------------------------------------------------------- // // GlobalRoutingLinkRecord Implementation diff --git a/src/internet/model/icmpv4-l4-protocol.cc b/src/internet/model/icmpv4-l4-protocol.cc index 36fe3bd0c..c2989e889 100644 --- a/src/internet/model/icmpv4-l4-protocol.cc +++ b/src/internet/model/icmpv4-l4-protocol.cc @@ -9,10 +9,10 @@ #include "ns3/boolean.h" #include "ns3/ipv4-route.h" -NS_LOG_COMPONENT_DEFINE ("Icmpv4L4Protocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Icmpv4L4Protocol"); + NS_OBJECT_ENSURE_REGISTERED (Icmpv4L4Protocol); // see rfc 792 diff --git a/src/internet/model/icmpv4.cc b/src/internet/model/icmpv4.cc index c157535a5..0682b7e27 100644 --- a/src/internet/model/icmpv4.cc +++ b/src/internet/model/icmpv4.cc @@ -22,10 +22,10 @@ #include "ns3/packet.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Icmpv4Header"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Icmpv4Header"); + /******************************************************** * Icmpv4Header ********************************************************/ diff --git a/src/internet/model/icmpv6-header.cc b/src/internet/model/icmpv6-header.cc index 5c44c9475..0441d2253 100644 --- a/src/internet/model/icmpv6-header.cc +++ b/src/internet/model/icmpv6-header.cc @@ -26,11 +26,11 @@ #include "icmpv6-header.h" -NS_LOG_COMPONENT_DEFINE ("Icmpv6Header"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Icmpv6Header"); + NS_OBJECT_ENSURE_REGISTERED (Icmpv6Header); TypeId Icmpv6Header::GetTypeId () diff --git a/src/internet/model/icmpv6-l4-protocol.cc b/src/internet/model/icmpv6-l4-protocol.cc index 2f444aa9e..bd29f53df 100644 --- a/src/internet/model/icmpv6-l4-protocol.cc +++ b/src/internet/model/icmpv6-l4-protocol.cc @@ -1,4 +1,4 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ + /* * Copyright (c) 2007-2009 Strasbourg University * @@ -39,10 +39,10 @@ namespace ns3 { -NS_OBJECT_ENSURE_REGISTERED (Icmpv6L4Protocol); - NS_LOG_COMPONENT_DEFINE ("Icmpv6L4Protocol"); +NS_OBJECT_ENSURE_REGISTERED (Icmpv6L4Protocol); + const uint8_t Icmpv6L4Protocol::PROT_NUMBER = 58; const uint8_t Icmpv6L4Protocol::MAX_INITIAL_RTR_ADVERT_INTERVAL = 16; diff --git a/src/internet/model/ip-l4-protocol.cc b/src/internet/model/ip-l4-protocol.cc index 252406ed8..bd8a5317b 100644 --- a/src/internet/model/ip-l4-protocol.cc +++ b/src/internet/model/ip-l4-protocol.cc @@ -25,10 +25,10 @@ #include "ns3/uinteger.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("IpL4Protocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("IpL4Protocol"); + NS_OBJECT_ENSURE_REGISTERED (IpL4Protocol); TypeId diff --git a/src/internet/model/ipv4-address-generator.cc b/src/internet/model/ipv4-address-generator.cc index 1bf317a36..ff18b6dbf 100644 --- a/src/internet/model/ipv4-address-generator.cc +++ b/src/internet/model/ipv4-address-generator.cc @@ -23,10 +23,10 @@ #include "ns3/simulation-singleton.h" #include "ipv4-address-generator.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4AddressGenerator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4AddressGenerator"); + /** * \internal * \ingroup address diff --git a/src/internet/model/ipv4-end-point-demux.cc b/src/internet/model/ipv4-end-point-demux.cc index 1ce84983c..7e06770eb 100644 --- a/src/internet/model/ipv4-end-point-demux.cc +++ b/src/internet/model/ipv4-end-point-demux.cc @@ -22,10 +22,10 @@ #include "ipv4-end-point.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4EndPointDemux"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4EndPointDemux"); + Ipv4EndPointDemux::Ipv4EndPointDemux () : m_ephemeral (49152), m_portLast (65535), m_portFirst (49152) { diff --git a/src/internet/model/ipv4-end-point.cc b/src/internet/model/ipv4-end-point.cc index 4ffdcfa3d..3967e5f9b 100644 --- a/src/internet/model/ipv4-end-point.cc +++ b/src/internet/model/ipv4-end-point.cc @@ -23,10 +23,10 @@ #include "ns3/log.h" #include "ns3/simulator.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4EndPoint"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4EndPoint"); + Ipv4EndPoint::Ipv4EndPoint (Ipv4Address address, uint16_t port) : m_localAddr (address), m_localPort (port), diff --git a/src/internet/model/ipv4-global-routing.cc b/src/internet/model/ipv4-global-routing.cc index e7d7b80c7..424e076e6 100644 --- a/src/internet/model/ipv4-global-routing.cc +++ b/src/internet/model/ipv4-global-routing.cc @@ -30,10 +30,10 @@ #include "ipv4-global-routing.h" #include "global-route-manager.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4GlobalRouting"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4GlobalRouting"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4GlobalRouting); TypeId diff --git a/src/internet/model/ipv4-header.cc b/src/internet/model/ipv4-header.cc index c6ea7d283..befec4b2b 100644 --- a/src/internet/model/ipv4-header.cc +++ b/src/internet/model/ipv4-header.cc @@ -24,10 +24,10 @@ #include "ns3/header.h" #include "ipv4-header.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4Header"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4Header"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4Header); Ipv4Header::Ipv4Header () diff --git a/src/internet/model/ipv4-interface-address.cc b/src/internet/model/ipv4-interface-address.cc index 0e69acb97..e2a444446 100644 --- a/src/internet/model/ipv4-interface-address.cc +++ b/src/internet/model/ipv4-interface-address.cc @@ -22,10 +22,10 @@ #include "ns3/assert.h" #include "ipv4-interface-address.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4InterfaceAddress"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4InterfaceAddress"); + Ipv4InterfaceAddress::Ipv4InterfaceAddress () : m_scope (GLOBAL), m_secondary (false) diff --git a/src/internet/model/ipv4-interface.cc b/src/internet/model/ipv4-interface.cc index c924707e7..0d99bf46a 100644 --- a/src/internet/model/ipv4-interface.cc +++ b/src/internet/model/ipv4-interface.cc @@ -30,10 +30,10 @@ #include "ns3/node.h" #include "ns3/pointer.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4Interface"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4Interface"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4Interface); TypeId diff --git a/src/internet/model/ipv4-l3-protocol.cc b/src/internet/model/ipv4-l3-protocol.cc index f70ec23b8..210c742fb 100644 --- a/src/internet/model/ipv4-l3-protocol.cc +++ b/src/internet/model/ipv4-l3-protocol.cc @@ -40,10 +40,10 @@ #include "ipv4-interface.h" #include "ipv4-raw-socket-impl.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4L3Protocol"); + const uint16_t Ipv4L3Protocol::PROT_NUMBER = 0x0800; NS_OBJECT_ENSURE_REGISTERED (Ipv4L3Protocol); diff --git a/src/internet/model/ipv4-list-routing.cc b/src/internet/model/ipv4-list-routing.cc index 7ada35f27..4c91654a5 100644 --- a/src/internet/model/ipv4-list-routing.cc +++ b/src/internet/model/ipv4-list-routing.cc @@ -24,10 +24,10 @@ #include "ns3/ipv4-static-routing.h" #include "ipv4-list-routing.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4ListRouting"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4ListRouting"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4ListRouting); TypeId diff --git a/src/internet/model/ipv4-packet-info-tag.cc b/src/internet/model/ipv4-packet-info-tag.cc index d22515431..f669a4aed 100644 --- a/src/internet/model/ipv4-packet-info-tag.cc +++ b/src/internet/model/ipv4-packet-info-tag.cc @@ -24,10 +24,10 @@ #include "ipv4-packet-info-tag.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4PacketInfoTag"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4PacketInfoTag"); + Ipv4PacketInfoTag::Ipv4PacketInfoTag () : m_addr (Ipv4Address ()), m_spec_dst (Ipv4Address ()), diff --git a/src/internet/model/ipv4-packet-probe.cc b/src/internet/model/ipv4-packet-probe.cc index d59f55a47..38e022848 100644 --- a/src/internet/model/ipv4-packet-probe.cc +++ b/src/internet/model/ipv4-packet-probe.cc @@ -28,10 +28,10 @@ #include "ns3/config.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4PacketProbe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4PacketProbe"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4PacketProbe); TypeId diff --git a/src/internet/model/ipv4-raw-socket-factory-impl.cc b/src/internet/model/ipv4-raw-socket-factory-impl.cc index efc412799..8e8588bfb 100644 --- a/src/internet/model/ipv4-raw-socket-factory-impl.cc +++ b/src/internet/model/ipv4-raw-socket-factory-impl.cc @@ -23,10 +23,10 @@ #include "ns3/socket.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4RawSocketFactoryImpl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4RawSocketFactoryImpl"); + Ptr Ipv4RawSocketFactoryImpl::CreateSocket (void) { diff --git a/src/internet/model/ipv4-raw-socket-factory.cc b/src/internet/model/ipv4-raw-socket-factory.cc index 02bfc8a5a..02ffa1f05 100644 --- a/src/internet/model/ipv4-raw-socket-factory.cc +++ b/src/internet/model/ipv4-raw-socket-factory.cc @@ -21,10 +21,10 @@ #include "ns3/uinteger.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4RawSocketFactory"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4RawSocketFactory"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4RawSocketFactory); TypeId Ipv4RawSocketFactory::GetTypeId (void) diff --git a/src/internet/model/ipv4-raw-socket-impl.cc b/src/internet/model/ipv4-raw-socket-impl.cc index 397a1276b..b5f1a248c 100644 --- a/src/internet/model/ipv4-raw-socket-impl.cc +++ b/src/internet/model/ipv4-raw-socket-impl.cc @@ -13,10 +13,10 @@ #include "ns3/boolean.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4RawSocketImpl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4RawSocketImpl"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4RawSocketImpl); TypeId diff --git a/src/internet/model/ipv4-route.cc b/src/internet/model/ipv4-route.cc index 7a3762b46..97efaf460 100644 --- a/src/internet/model/ipv4-route.cc +++ b/src/internet/model/ipv4-route.cc @@ -22,10 +22,10 @@ #include "ns3/assert.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4Route"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4Route"); + Ipv4Route::Ipv4Route () { NS_LOG_FUNCTION (this); diff --git a/src/internet/model/ipv4-routing-protocol.cc b/src/internet/model/ipv4-routing-protocol.cc index 4a9a542f7..dcbc5ea3f 100644 --- a/src/internet/model/ipv4-routing-protocol.cc +++ b/src/internet/model/ipv4-routing-protocol.cc @@ -21,10 +21,10 @@ #include "ipv4-routing-protocol.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4RoutingProtocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4RoutingProtocol"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4RoutingProtocol); TypeId Ipv4RoutingProtocol::GetTypeId (void) diff --git a/src/internet/model/ipv4-routing-table-entry.cc b/src/internet/model/ipv4-routing-table-entry.cc index ade5bf749..d46a0df17 100644 --- a/src/internet/model/ipv4-routing-table-entry.cc +++ b/src/internet/model/ipv4-routing-table-entry.cc @@ -22,10 +22,10 @@ #include "ns3/assert.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4RoutingTableEntry"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4RoutingTableEntry"); + /***************************************************** * Network Ipv4RoutingTableEntry *****************************************************/ diff --git a/src/internet/model/ipv4-static-routing.cc b/src/internet/model/ipv4-static-routing.cc index 53196d2df..bcb3a90e6 100644 --- a/src/internet/model/ipv4-static-routing.cc +++ b/src/internet/model/ipv4-static-routing.cc @@ -34,12 +34,12 @@ #include "ipv4-static-routing.h" #include "ipv4-routing-table-entry.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4StaticRouting"); - using std::make_pair; namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4StaticRouting"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4StaticRouting); TypeId diff --git a/src/internet/model/ipv4.cc b/src/internet/model/ipv4.cc index f0e03e2fa..456b9c39f 100644 --- a/src/internet/model/ipv4.cc +++ b/src/internet/model/ipv4.cc @@ -24,10 +24,10 @@ #include "ipv4.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4); TypeId diff --git a/src/internet/model/ipv6-address-generator.cc b/src/internet/model/ipv6-address-generator.cc index f25da3326..77dfa8279 100644 --- a/src/internet/model/ipv6-address-generator.cc +++ b/src/internet/model/ipv6-address-generator.cc @@ -24,10 +24,10 @@ #include "ns3/simulation-singleton.h" #include "ipv6-address-generator.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6AddressGenerator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6AddressGenerator"); + /** * \internal * \ingroup address diff --git a/src/internet/model/ipv6-autoconfigured-prefix.cc b/src/internet/model/ipv6-autoconfigured-prefix.cc index 90bf58fe1..c29bd274b 100644 --- a/src/internet/model/ipv6-autoconfigured-prefix.cc +++ b/src/internet/model/ipv6-autoconfigured-prefix.cc @@ -24,11 +24,11 @@ #include "ipv6-l3-protocol.h" #include "ipv6-autoconfigured-prefix.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6AutoconfiguredPrefix"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6AutoconfiguredPrefix"); + uint32_t Ipv6AutoconfiguredPrefix::m_prefixId = 0; Ipv6AutoconfiguredPrefix::Ipv6AutoconfiguredPrefix (Ptr node, uint32_t interface, Ipv6Address prefix, Ipv6Prefix mask, uint32_t preferredLifeTime, uint32_t validLifeTime, Ipv6Address router) diff --git a/src/internet/model/ipv6-end-point-demux.cc b/src/internet/model/ipv6-end-point-demux.cc index 908679fb5..9bd886759 100644 --- a/src/internet/model/ipv6-end-point-demux.cc +++ b/src/internet/model/ipv6-end-point-demux.cc @@ -22,10 +22,10 @@ #include "ipv6-end-point.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6EndPointDemux"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6EndPointDemux"); + Ipv6EndPointDemux::Ipv6EndPointDemux () : m_ephemeral (49152), m_portFirst (49152), diff --git a/src/internet/model/ipv6-extension.cc b/src/internet/model/ipv6-extension.cc index f0c3294eb..b9f3237ce 100755 --- a/src/internet/model/ipv6-extension.cc +++ b/src/internet/model/ipv6-extension.cc @@ -40,10 +40,10 @@ #include "ipv6-option.h" #include "udp-header.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6Extension"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6Extension"); + NS_OBJECT_ENSURE_REGISTERED (Ipv6Extension); TypeId Ipv6Extension::GetTypeId () diff --git a/src/internet/model/ipv6-header.cc b/src/internet/model/ipv6-header.cc index a7ea7a1a2..6e9b55023 100644 --- a/src/internet/model/ipv6-header.cc +++ b/src/internet/model/ipv6-header.cc @@ -25,10 +25,10 @@ #include "ns3/address-utils.h" #include "ipv6-header.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6Header"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6Header"); + NS_OBJECT_ENSURE_REGISTERED (Ipv6Header); Ipv6Header::Ipv6Header () diff --git a/src/internet/model/ipv6-l3-protocol.cc b/src/internet/model/ipv6-l3-protocol.cc index 8f7d51c5d..e5a44d3ff 100644 --- a/src/internet/model/ipv6-l3-protocol.cc +++ b/src/internet/model/ipv6-l3-protocol.cc @@ -49,10 +49,10 @@ namespace ns3 { -NS_OBJECT_ENSURE_REGISTERED (Ipv6L3Protocol); - NS_LOG_COMPONENT_DEFINE ("Ipv6L3Protocol"); +NS_OBJECT_ENSURE_REGISTERED (Ipv6L3Protocol); + const uint16_t Ipv6L3Protocol::PROT_NUMBER = 0x86DD; TypeId Ipv6L3Protocol::GetTypeId () diff --git a/src/internet/model/ipv6-list-routing.cc b/src/internet/model/ipv6-list-routing.cc index e55f05787..d9784b0b0 100644 --- a/src/internet/model/ipv6-list-routing.cc +++ b/src/internet/model/ipv6-list-routing.cc @@ -25,10 +25,10 @@ #include "ipv6-list-routing.h" #include "ns3/simulator.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6ListRouting"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6ListRouting"); + NS_OBJECT_ENSURE_REGISTERED (Ipv6ListRouting); TypeId diff --git a/src/internet/model/ipv6-option.cc b/src/internet/model/ipv6-option.cc index 9a530d384..9418ab4fd 100644 --- a/src/internet/model/ipv6-option.cc +++ b/src/internet/model/ipv6-option.cc @@ -24,11 +24,11 @@ #include "ipv6-option.h" #include "ipv6-option-header.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6Option"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6Option"); + NS_OBJECT_ENSURE_REGISTERED (Ipv6Option); TypeId Ipv6Option::GetTypeId () diff --git a/src/internet/model/ipv6-packet-probe.cc b/src/internet/model/ipv6-packet-probe.cc index bd301c94a..9f1e57756 100644 --- a/src/internet/model/ipv6-packet-probe.cc +++ b/src/internet/model/ipv6-packet-probe.cc @@ -29,10 +29,10 @@ #include "ns3/config.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6PacketProbe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6PacketProbe"); + NS_OBJECT_ENSURE_REGISTERED (Ipv6PacketProbe); TypeId diff --git a/src/internet/model/ipv6-pmtu-cache.cc b/src/internet/model/ipv6-pmtu-cache.cc index aba06ba9d..4e4c652ed 100644 --- a/src/internet/model/ipv6-pmtu-cache.cc +++ b/src/internet/model/ipv6-pmtu-cache.cc @@ -22,10 +22,10 @@ #include "ns3/log.h" #include "ns3/simulator.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6PmtuCache"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6PmtuCache"); + NS_OBJECT_ENSURE_REGISTERED (Ipv6PmtuCache); TypeId Ipv6PmtuCache::GetTypeId () diff --git a/src/internet/model/ipv6-raw-socket-impl.cc b/src/internet/model/ipv6-raw-socket-impl.cc index 482dd7ebc..81e5cfd4a 100644 --- a/src/internet/model/ipv6-raw-socket-impl.cc +++ b/src/internet/model/ipv6-raw-socket-impl.cc @@ -40,7 +40,6 @@ namespace ns3 NS_LOG_COMPONENT_DEFINE ("Ipv6RawSocketImpl"); - NS_OBJECT_ENSURE_REGISTERED (Ipv6RawSocketImpl); TypeId Ipv6RawSocketImpl::GetTypeId () diff --git a/src/internet/model/ipv6-static-routing.cc b/src/internet/model/ipv6-static-routing.cc index 26e3d3b07..4b9863a5a 100644 --- a/src/internet/model/ipv6-static-routing.cc +++ b/src/internet/model/ipv6-static-routing.cc @@ -30,10 +30,10 @@ #include "ipv6-static-routing.h" #include "ipv6-routing-table-entry.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6StaticRouting"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6StaticRouting"); + NS_OBJECT_ENSURE_REGISTERED (Ipv6StaticRouting); TypeId Ipv6StaticRouting::GetTypeId () diff --git a/src/internet/model/loopback-net-device.cc b/src/internet/model/loopback-net-device.cc index 69fde8fef..28cc43fa2 100644 --- a/src/internet/model/loopback-net-device.cc +++ b/src/internet/model/loopback-net-device.cc @@ -24,10 +24,10 @@ #include "ns3/node.h" #include "ns3/packet.h" -NS_LOG_COMPONENT_DEFINE ("LoopbackNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LoopbackNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (LoopbackNetDevice); TypeId diff --git a/src/internet/model/nsc-tcp-l4-protocol.cc b/src/internet/model/nsc-tcp-l4-protocol.cc index 30ddda209..ca554f720 100644 --- a/src/internet/model/nsc-tcp-l4-protocol.cc +++ b/src/internet/model/nsc-tcp-l4-protocol.cc @@ -45,10 +45,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("NscTcpL4Protocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("NscTcpL4Protocol"); + NS_OBJECT_ENSURE_REGISTERED (NscTcpL4Protocol); /* see http://www.iana.org/assignments/protocol-numbers */ diff --git a/src/internet/model/nsc-tcp-socket-impl.cc b/src/internet/model/nsc-tcp-socket-impl.cc index f552bf00b..779c149a4 100644 --- a/src/internet/model/nsc-tcp-socket-impl.cc +++ b/src/internet/model/nsc-tcp-socket-impl.cc @@ -43,10 +43,10 @@ #include "sim_errno.h" -NS_LOG_COMPONENT_DEFINE ("NscTcpSocketImpl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("NscTcpSocketImpl"); + NS_OBJECT_ENSURE_REGISTERED (NscTcpSocketImpl); TypeId diff --git a/src/internet/model/pending-data.cc b/src/internet/model/pending-data.cc index d4d344f3c..2e6213f39 100644 --- a/src/internet/model/pending-data.cc +++ b/src/internet/model/pending-data.cc @@ -34,11 +34,11 @@ #include "pending-data.h" -NS_LOG_COMPONENT_DEFINE ("PendingData"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PendingData"); + PendingData::PendingData () : size (0), data (0), msgSize (0), responseSize (0) { diff --git a/src/internet/model/ripng.cc b/src/internet/model/ripng.cc index 861d7492a..52ba212b7 100644 --- a/src/internet/model/ripng.cc +++ b/src/internet/model/ripng.cc @@ -36,13 +36,11 @@ #define RIPNG_ALL_NODE "ff02::9" #define RIPNG_PORT 521 -NS_LOG_COMPONENT_DEFINE ("RipNg") - ; - namespace ns3 { -NS_OBJECT_ENSURE_REGISTERED (RipNg) - ; +NS_LOG_COMPONENT_DEFINE ("RipNg"); + +NS_OBJECT_ENSURE_REGISTERED (RipNg); RipNg::RipNg () : m_ipv6 (0), m_splitHorizonStrategy (RipNg::POISON_REVERSE), m_initialized (false) diff --git a/src/internet/model/rtt-estimator.cc b/src/internet/model/rtt-estimator.cc index 16f7885e4..b95fcbb36 100644 --- a/src/internet/model/rtt-estimator.cc +++ b/src/internet/model/rtt-estimator.cc @@ -34,10 +34,10 @@ #include "ns3/uinteger.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("RttEstimator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RttEstimator"); + NS_OBJECT_ENSURE_REGISTERED (RttEstimator); TypeId diff --git a/src/internet/model/tcp-header.cc b/src/internet/model/tcp-header.cc index e9ba31963..a7757a541 100644 --- a/src/internet/model/tcp-header.cc +++ b/src/internet/model/tcp-header.cc @@ -26,10 +26,10 @@ #include "ns3/address-utils.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("TcpHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpHeader"); + NS_OBJECT_ENSURE_REGISTERED (TcpHeader); TcpHeader::TcpHeader () diff --git a/src/internet/model/tcp-l4-protocol.cc b/src/internet/model/tcp-l4-protocol.cc index 0c423b5cc..68f91f9ae 100644 --- a/src/internet/model/tcp-l4-protocol.cc +++ b/src/internet/model/tcp-l4-protocol.cc @@ -47,10 +47,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("TcpL4Protocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpL4Protocol"); + NS_OBJECT_ENSURE_REGISTERED (TcpL4Protocol); //TcpL4Protocol stuff---------------------------------------------------------- diff --git a/src/internet/model/tcp-newreno.cc b/src/internet/model/tcp-newreno.cc index ba7e91b0d..56e73efaa 100644 --- a/src/internet/model/tcp-newreno.cc +++ b/src/internet/model/tcp-newreno.cc @@ -28,10 +28,10 @@ #include "ns3/abort.h" #include "ns3/node.h" -NS_LOG_COMPONENT_DEFINE ("TcpNewReno"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpNewReno"); + NS_OBJECT_ENSURE_REGISTERED (TcpNewReno); TypeId diff --git a/src/internet/model/tcp-option-rfc793.cc b/src/internet/model/tcp-option-rfc793.cc index c7dba540d..3991ddadb 100644 --- a/src/internet/model/tcp-option-rfc793.cc +++ b/src/internet/model/tcp-option-rfc793.cc @@ -24,10 +24,10 @@ #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("TcpOptionRfc793"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpOptionRfc793"); + NS_OBJECT_ENSURE_REGISTERED (TcpOptionEnd); TcpOptionEnd::TcpOptionEnd () : TcpOption () diff --git a/src/internet/model/tcp-option-ts.cc b/src/internet/model/tcp-option-ts.cc index 4dad1e8ac..2e6d508a4 100644 --- a/src/internet/model/tcp-option-ts.cc +++ b/src/internet/model/tcp-option-ts.cc @@ -21,9 +21,10 @@ #include "tcp-option-ts.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("TcpOptionTS"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpOptionTS"); + NS_OBJECT_ENSURE_REGISTERED (TcpOptionTS); TcpOptionTS::TcpOptionTS () diff --git a/src/internet/model/tcp-option-winscale.cc b/src/internet/model/tcp-option-winscale.cc index 3667488c5..c3d47bdac 100644 --- a/src/internet/model/tcp-option-winscale.cc +++ b/src/internet/model/tcp-option-winscale.cc @@ -22,9 +22,10 @@ #include "tcp-option-winscale.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("TcpOptionWinScale"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpOptionWinScale"); + NS_OBJECT_ENSURE_REGISTERED (TcpOptionWinScale); TcpOptionWinScale::TcpOptionWinScale () diff --git a/src/internet/model/tcp-option.cc b/src/internet/model/tcp-option.cc index 72711ae24..f5758dba6 100644 --- a/src/internet/model/tcp-option.cc +++ b/src/internet/model/tcp-option.cc @@ -28,10 +28,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("TcpOption"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpOption"); + NS_OBJECT_ENSURE_REGISTERED (TcpOption); diff --git a/src/internet/model/tcp-reno.cc b/src/internet/model/tcp-reno.cc index eecab4f42..88b6f110c 100644 --- a/src/internet/model/tcp-reno.cc +++ b/src/internet/model/tcp-reno.cc @@ -28,10 +28,10 @@ #include "ns3/abort.h" #include "ns3/node.h" -NS_LOG_COMPONENT_DEFINE ("TcpReno"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpReno"); + NS_OBJECT_ENSURE_REGISTERED (TcpReno); TypeId diff --git a/src/internet/model/tcp-rfc793.cc b/src/internet/model/tcp-rfc793.cc index 7224ee46d..de8cb3a61 100644 --- a/src/internet/model/tcp-rfc793.cc +++ b/src/internet/model/tcp-rfc793.cc @@ -21,10 +21,10 @@ #include "tcp-rfc793.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("TcpRfc793"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpRfc793"); + NS_OBJECT_ENSURE_REGISTERED (TcpRfc793); TypeId diff --git a/src/internet/model/tcp-rx-buffer.cc b/src/internet/model/tcp-rx-buffer.cc index 703d0b811..90a960ad9 100644 --- a/src/internet/model/tcp-rx-buffer.cc +++ b/src/internet/model/tcp-rx-buffer.cc @@ -23,10 +23,10 @@ #include "ns3/log.h" #include "tcp-rx-buffer.h" -NS_LOG_COMPONENT_DEFINE ("TcpRxBuffer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpRxBuffer"); + TypeId TcpRxBuffer::GetTypeId (void) { diff --git a/src/internet/model/tcp-socket-base.cc b/src/internet/model/tcp-socket-base.cc index 19d44b5bb..906da1934 100644 --- a/src/internet/model/tcp-socket-base.cc +++ b/src/internet/model/tcp-socket-base.cc @@ -53,10 +53,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("TcpSocketBase"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpSocketBase"); + NS_OBJECT_ENSURE_REGISTERED (TcpSocketBase); TypeId diff --git a/src/internet/model/tcp-socket.cc b/src/internet/model/tcp-socket.cc index 78994646d..3ebae6db0 100644 --- a/src/internet/model/tcp-socket.cc +++ b/src/internet/model/tcp-socket.cc @@ -27,10 +27,10 @@ #include "ns3/nstime.h" #include "tcp-socket.h" -NS_LOG_COMPONENT_DEFINE ("TcpSocket"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpSocket"); + NS_OBJECT_ENSURE_REGISTERED (TcpSocket); const char* const TcpSocket::TcpStateName[LAST_STATE] = { "CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD", "ESTABLISHED", "CLOSE_WAIT", "LAST_ACK", "FIN_WAIT_1", "FIN_WAIT_2", "CLOSING", "TIME_WAIT" }; diff --git a/src/internet/model/tcp-tahoe.cc b/src/internet/model/tcp-tahoe.cc index 8bb52d7ab..e6b4df659 100644 --- a/src/internet/model/tcp-tahoe.cc +++ b/src/internet/model/tcp-tahoe.cc @@ -28,10 +28,10 @@ #include "ns3/abort.h" #include "ns3/node.h" -NS_LOG_COMPONENT_DEFINE ("TcpTahoe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpTahoe"); + NS_OBJECT_ENSURE_REGISTERED (TcpTahoe); TypeId diff --git a/src/internet/model/tcp-tx-buffer.cc b/src/internet/model/tcp-tx-buffer.cc index f3d6c0b19..f59c30b8f 100644 --- a/src/internet/model/tcp-tx-buffer.cc +++ b/src/internet/model/tcp-tx-buffer.cc @@ -28,10 +28,10 @@ #include "tcp-tx-buffer.h" -NS_LOG_COMPONENT_DEFINE ("TcpTxBuffer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TcpTxBuffer"); + TypeId TcpTxBuffer::GetTypeId (void) { diff --git a/src/internet/model/tcp-westwood.cc b/src/internet/model/tcp-westwood.cc index cd993a9ef..2971f4454 100644 --- a/src/internet/model/tcp-westwood.cc +++ b/src/internet/model/tcp-westwood.cc @@ -42,10 +42,10 @@ #include "ns3/sequence-number.h" #include "rtt-estimator.h" -NS_LOG_COMPONENT_DEFINE("TcpWestwood"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE("TcpWestwood"); + NS_OBJECT_ENSURE_REGISTERED(TcpWestwood); TypeId diff --git a/src/internet/model/udp-l4-protocol.cc b/src/internet/model/udp-l4-protocol.cc index ad126a6ea..1c050d0da 100644 --- a/src/internet/model/udp-l4-protocol.cc +++ b/src/internet/model/udp-l4-protocol.cc @@ -40,10 +40,10 @@ #include "ipv6-l3-protocol.h" #include "udp-socket-impl.h" -NS_LOG_COMPONENT_DEFINE ("UdpL4Protocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UdpL4Protocol"); + NS_OBJECT_ENSURE_REGISTERED (UdpL4Protocol); /* see http://www.iana.org/assignments/protocol-numbers */ diff --git a/src/internet/model/udp-socket-impl.cc b/src/internet/model/udp-socket-impl.cc index 69859dc02..c0e230fbe 100644 --- a/src/internet/model/udp-socket-impl.cc +++ b/src/internet/model/udp-socket-impl.cc @@ -39,10 +39,10 @@ #include "ipv6-end-point.h" #include -NS_LOG_COMPONENT_DEFINE ("UdpSocketImpl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UdpSocketImpl"); + NS_OBJECT_ENSURE_REGISTERED (UdpSocketImpl); // The correct maximum UDP message size is 65507, as determined by the following formula: diff --git a/src/internet/model/udp-socket.cc b/src/internet/model/udp-socket.cc index a544151b9..3e4f60349 100644 --- a/src/internet/model/udp-socket.cc +++ b/src/internet/model/udp-socket.cc @@ -26,10 +26,10 @@ #include "ns3/trace-source-accessor.h" #include "udp-socket.h" -NS_LOG_COMPONENT_DEFINE ("UdpSocket"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UdpSocket"); + NS_OBJECT_ENSURE_REGISTERED (UdpSocket); TypeId diff --git a/src/internet/test/error-channel.cc b/src/internet/test/error-channel.cc index 562160ad1..b3c74737a 100644 --- a/src/internet/test/error-channel.cc +++ b/src/internet/test/error-channel.cc @@ -24,10 +24,10 @@ #include "ns3/node.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("ErrorChannel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ErrorChannel"); + NS_OBJECT_ENSURE_REGISTERED (ErrorChannel); TypeId diff --git a/src/internet/test/ipv6-dual-stack-test-suite.cc b/src/internet/test/ipv6-dual-stack-test-suite.cc index 41c77231b..6445a5230 100644 --- a/src/internet/test/ipv6-dual-stack-test-suite.cc +++ b/src/internet/test/ipv6-dual-stack-test-suite.cc @@ -48,10 +48,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("Ipv6DualStackTestSuite"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("Ipv6DualStackTestSuite"); + class DualStackTestCase : public TestCase { public: diff --git a/src/internet/test/rtt-test.cc b/src/internet/test/rtt-test.cc index 432017289..4a804a28d 100644 --- a/src/internet/test/rtt-test.cc +++ b/src/internet/test/rtt-test.cc @@ -21,10 +21,10 @@ #include "ns3/rtt-estimator.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("RttTestSuite"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("RttTestSuite"); + class RttTestCase : public TestCase { public: diff --git a/src/internet/test/tcp-test.cc b/src/internet/test/tcp-test.cc index 6ae99b61c..a80f8ef79 100644 --- a/src/internet/test/tcp-test.cc +++ b/src/internet/test/tcp-test.cc @@ -49,10 +49,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("TcpTestSuite"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("TcpTestSuite"); + class TcpTestCase : public TestCase { public: diff --git a/src/internet/test/tcp-timestamp-test.cc b/src/internet/test/tcp-timestamp-test.cc index f0dab1808..28ea1691a 100644 --- a/src/internet/test/tcp-timestamp-test.cc +++ b/src/internet/test/tcp-timestamp-test.cc @@ -47,10 +47,10 @@ #include "../src/internet/model/tcp-option-ts.h" -NS_LOG_COMPONENT_DEFINE ("TimestampTestSuite"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TimestampTestSuite"); + class TimestampTestCase : public TestCase { public: diff --git a/src/internet/test/tcp-wscaling-test.cc b/src/internet/test/tcp-wscaling-test.cc index fd415f82d..3ed99ee82 100644 --- a/src/internet/test/tcp-wscaling-test.cc +++ b/src/internet/test/tcp-wscaling-test.cc @@ -50,10 +50,10 @@ #include "ns3/tcp-socket-base.h" -NS_LOG_COMPONENT_DEFINE ("WScalingTestSuite"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WScalingTestSuite"); + class WScalingTestCase : public TestCase { public: diff --git a/src/lr-wpan/helper/lr-wpan-helper.cc b/src/lr-wpan/helper/lr-wpan-helper.cc index 0b3f271d9..f7f539cd7 100644 --- a/src/lr-wpan/helper/lr-wpan-helper.cc +++ b/src/lr-wpan/helper/lr-wpan-helper.cc @@ -28,10 +28,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LrWpanHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LrWpanHelper"); + /** * @brief Output an ascii line representing the Transmit event (with context) * @param stream the output stream diff --git a/src/lr-wpan/model/lr-wpan-csmaca.cc b/src/lr-wpan/model/lr-wpan-csmaca.cc index 9611bd6ee..ebe6eabdb 100644 --- a/src/lr-wpan/model/lr-wpan-csmaca.cc +++ b/src/lr-wpan/model/lr-wpan-csmaca.cc @@ -26,10 +26,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LrWpanCsmaCa"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LrWpanCsmaCa"); + NS_OBJECT_ENSURE_REGISTERED (LrWpanCsmaCa); TypeId diff --git a/src/lr-wpan/model/lr-wpan-error-model.cc b/src/lr-wpan/model/lr-wpan-error-model.cc index 796168d0e..1eb266cec 100644 --- a/src/lr-wpan/model/lr-wpan-error-model.cc +++ b/src/lr-wpan/model/lr-wpan-error-model.cc @@ -22,10 +22,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("LrWpanErrorModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LrWpanErrorModel"); + NS_OBJECT_ENSURE_REGISTERED (LrWpanErrorModel); TypeId diff --git a/src/lr-wpan/model/lr-wpan-interference-helper.cc b/src/lr-wpan/model/lr-wpan-interference-helper.cc index 8b721be7d..05dad5242 100644 --- a/src/lr-wpan/model/lr-wpan-interference-helper.cc +++ b/src/lr-wpan/model/lr-wpan-interference-helper.cc @@ -23,10 +23,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LrWpanInterferenceHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LrWpanInterferenceHelper"); + LrWpanInterferenceHelper::LrWpanInterferenceHelper (Ptr spectrumModel) : m_spectrumModel (spectrumModel), m_dirty (false) diff --git a/src/lr-wpan/model/lr-wpan-mac.cc b/src/lr-wpan/model/lr-wpan-mac.cc index d2951f631..574951dec 100644 --- a/src/lr-wpan/model/lr-wpan-mac.cc +++ b/src/lr-wpan/model/lr-wpan-mac.cc @@ -34,14 +34,14 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LrWpanMac"); - #undef NS_LOG_APPEND_CONTEXT #define NS_LOG_APPEND_CONTEXT \ std::clog << "[address " << m_shortAddress << "] "; namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LrWpanMac"); + NS_OBJECT_ENSURE_REGISTERED (LrWpanMac); const uint32_t LrWpanMac::aMinMPDUOverhead = 9; // Table 85 diff --git a/src/lr-wpan/model/lr-wpan-net-device.cc b/src/lr-wpan/model/lr-wpan-net-device.cc index 7e6bb8cea..d1fd98ab3 100644 --- a/src/lr-wpan/model/lr-wpan-net-device.cc +++ b/src/lr-wpan/model/lr-wpan-net-device.cc @@ -34,10 +34,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("LrWpanNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LrWpanNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (LrWpanNetDevice); TypeId diff --git a/src/lr-wpan/model/lr-wpan-phy.cc b/src/lr-wpan/model/lr-wpan-phy.cc index e16dd3ef0..9c18202dc 100644 --- a/src/lr-wpan/model/lr-wpan-phy.cc +++ b/src/lr-wpan/model/lr-wpan-phy.cc @@ -38,10 +38,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LrWpanPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LrWpanPhy"); + NS_OBJECT_ENSURE_REGISTERED (LrWpanPhy); // Table 22 in section 6.4.1 of ieee802.15.4 diff --git a/src/lr-wpan/model/lr-wpan-spectrum-signal-parameters.cc b/src/lr-wpan/model/lr-wpan-spectrum-signal-parameters.cc index 941f00dae..8777fbc07 100644 --- a/src/lr-wpan/model/lr-wpan-spectrum-signal-parameters.cc +++ b/src/lr-wpan/model/lr-wpan-spectrum-signal-parameters.cc @@ -22,10 +22,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("LrWpanSpectrumSignalParameters"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LrWpanSpectrumSignalParameters"); + LrWpanSpectrumSignalParameters::LrWpanSpectrumSignalParameters (void) { NS_LOG_FUNCTION (this); diff --git a/src/lr-wpan/model/lr-wpan-spectrum-value-helper.cc b/src/lr-wpan/model/lr-wpan-spectrum-value-helper.cc index 89f1d9628..808293ec0 100644 --- a/src/lr-wpan/model/lr-wpan-spectrum-value-helper.cc +++ b/src/lr-wpan/model/lr-wpan-spectrum-value-helper.cc @@ -23,10 +23,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("LrWpanSpectrumValueHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LrWpanSpectrumValueHelper"); + Ptr g_LrWpanSpectrumModel; //!< Global object used to initialize the LrWpan Spectrum Model /** diff --git a/src/lr-wpan/test/lr-wpan-ack-test.cc b/src/lr-wpan/test/lr-wpan-ack-test.cc index 5346c9906..79f972301 100644 --- a/src/lr-wpan/test/lr-wpan-ack-test.cc +++ b/src/lr-wpan/test/lr-wpan-ack-test.cc @@ -34,10 +34,10 @@ using namespace ns3; -NS_LOG_COMPONENT_DEFINE ("lr-wpan-ack-test"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("lr-wpan-ack-test"); + class LrWpanAckTestCase : public TestCase { public: diff --git a/src/lr-wpan/test/lr-wpan-cca-test.cc b/src/lr-wpan/test/lr-wpan-cca-test.cc index e61235188..0ef73656c 100644 --- a/src/lr-wpan/test/lr-wpan-cca-test.cc +++ b/src/lr-wpan/test/lr-wpan-cca-test.cc @@ -35,10 +35,10 @@ using namespace ns3; -NS_LOG_COMPONENT_DEFINE ("lr-wpan-clear-channel-assessment-test"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("lr-wpan-clear-channel-assessment-test"); + class LrWpanCcaTestCase : public TestCase { public: diff --git a/src/lr-wpan/test/lr-wpan-collision-test.cc b/src/lr-wpan/test/lr-wpan-collision-test.cc index 550d51633..659aff502 100644 --- a/src/lr-wpan/test/lr-wpan-collision-test.cc +++ b/src/lr-wpan/test/lr-wpan-collision-test.cc @@ -29,10 +29,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("lr-wpan-collision-test"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("lr-wpan-collision-test"); + // This is an example TestCase. class LrWpanCollisionTestCase : public TestCase { diff --git a/src/lr-wpan/test/lr-wpan-ed-test.cc b/src/lr-wpan/test/lr-wpan-ed-test.cc index d3bbd7499..18cdbfb9c 100644 --- a/src/lr-wpan/test/lr-wpan-ed-test.cc +++ b/src/lr-wpan/test/lr-wpan-ed-test.cc @@ -34,10 +34,10 @@ using namespace ns3; -NS_LOG_COMPONENT_DEFINE ("lr-wpan-energy-detection-test"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("lr-wpan-energy-detection-test"); + class LrWpanEdTestCase : public TestCase { public: diff --git a/src/lr-wpan/test/lr-wpan-error-model-test.cc b/src/lr-wpan/test/lr-wpan-error-model-test.cc index d4562f4e8..c25ea1db3 100644 --- a/src/lr-wpan/test/lr-wpan-error-model-test.cc +++ b/src/lr-wpan/test/lr-wpan-error-model-test.cc @@ -33,10 +33,10 @@ #include #include "ns3/rng-seed-manager.h" -NS_LOG_COMPONENT_DEFINE ("lr-wpan-error-model-test"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("lr-wpan-error-model-test"); + class LrWpanErrorDistanceTestCase : public TestCase { public: diff --git a/src/lr-wpan/test/lr-wpan-packet-test.cc b/src/lr-wpan/test/lr-wpan-packet-test.cc index 33cfceb57..825bada29 100644 --- a/src/lr-wpan/test/lr-wpan-packet-test.cc +++ b/src/lr-wpan/test/lr-wpan-packet-test.cc @@ -26,10 +26,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("lr-wpan-packet-test"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("lr-wpan-packet-test"); + // This is an example TestCase. class LrWpanPacketTestCase : public TestCase { diff --git a/src/lte/examples/lena-dual-stripe.cc b/src/lte/examples/lena-dual-stripe.cc index 7e76ece10..8977088d5 100644 --- a/src/lte/examples/lena-dual-stripe.cc +++ b/src/lte/examples/lena-dual-stripe.cc @@ -40,10 +40,8 @@ using namespace ns3; - NS_LOG_COMPONENT_DEFINE ("LenaDualStripe"); - bool AreOverlapping (Box a, Box b) { return !((a.xMin > b.xMax) || (b.xMin > a.xMax) || (a.yMin > b.yMax) || (b.yMin > a.yMax)); diff --git a/src/lte/examples/lena-pathloss-traces.cc b/src/lte/examples/lena-pathloss-traces.cc index 7866be2a3..f9f9199bf 100644 --- a/src/lte/examples/lena-pathloss-traces.cc +++ b/src/lte/examples/lena-pathloss-traces.cc @@ -35,11 +35,9 @@ using namespace ns3; - NS_LOG_COMPONENT_DEFINE ("LenaPathlossTraces"); - int main (int argc, char *argv[]) { double enbDist = 20.0; diff --git a/src/lte/examples/lena-simple-epc-emu.cc b/src/lte/examples/lena-simple-epc-emu.cc index 841c4047b..02be324e2 100644 --- a/src/lte/examples/lena-simple-epc-emu.cc +++ b/src/lte/examples/lena-simple-epc-emu.cc @@ -42,10 +42,8 @@ using namespace ns3; * via a real link. */ - - - NS_LOG_COMPONENT_DEFINE ("EpcFirstExample"); + int main (int argc, char *argv[]) { diff --git a/src/lte/examples/lena-simple-epc.cc b/src/lte/examples/lena-simple-epc.cc index 1bd7a1233..b901bf6a6 100644 --- a/src/lte/examples/lena-simple-epc.cc +++ b/src/lte/examples/lena-simple-epc.cc @@ -38,7 +38,9 @@ using namespace ns3; * attaches one UE per eNodeB starts a flow for each UE to and from a remote host. * It also starts yet another flow between each UE pair. */ + NS_LOG_COMPONENT_DEFINE ("EpcFirstExample"); + int main (int argc, char *argv[]) { diff --git a/src/lte/helper/emu-epc-helper.cc b/src/lte/helper/emu-epc-helper.cc index 8ae35c4fc..ce5ef0f98 100644 --- a/src/lte/helper/emu-epc-helper.cc +++ b/src/lte/helper/emu-epc-helper.cc @@ -45,10 +45,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("EmuEpcHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EmuEpcHelper"); + NS_OBJECT_ENSURE_REGISTERED (EmuEpcHelper); diff --git a/src/lte/helper/epc-helper.cc b/src/lte/helper/epc-helper.cc index a872f3403..f4b0d96ab 100644 --- a/src/lte/helper/epc-helper.cc +++ b/src/lte/helper/epc-helper.cc @@ -25,10 +25,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("EpcHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EpcHelper"); + NS_OBJECT_ENSURE_REGISTERED (EpcHelper); diff --git a/src/lte/helper/lte-global-pathloss-database.cc b/src/lte/helper/lte-global-pathloss-database.cc index e69c03885..e90f5627b 100644 --- a/src/lte/helper/lte-global-pathloss-database.cc +++ b/src/lte/helper/lte-global-pathloss-database.cc @@ -26,10 +26,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("LteGlobalPathlossDatabase"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteGlobalPathlossDatabase"); + LteGlobalPathlossDatabase::~LteGlobalPathlossDatabase (void) { } diff --git a/src/lte/helper/lte-helper.cc b/src/lte/helper/lte-helper.cc index 42d0bf628..22db49ac8 100644 --- a/src/lte/helper/lte-helper.cc +++ b/src/lte/helper/lte-helper.cc @@ -62,10 +62,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteHelper"); + NS_OBJECT_ENSURE_REGISTERED (LteHelper); LteHelper::LteHelper (void) diff --git a/src/lte/helper/lte-hex-grid-enb-topology-helper.cc b/src/lte/helper/lte-hex-grid-enb-topology-helper.cc index b96c4c274..a8b731fdc 100644 --- a/src/lte/helper/lte-hex-grid-enb-topology-helper.cc +++ b/src/lte/helper/lte-hex-grid-enb-topology-helper.cc @@ -28,10 +28,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("LteHexGridEnbTopologyHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteHexGridEnbTopologyHelper"); + NS_OBJECT_ENSURE_REGISTERED (LteHexGridEnbTopologyHelper); LteHexGridEnbTopologyHelper::LteHexGridEnbTopologyHelper () diff --git a/src/lte/helper/lte-stats-calculator.cc b/src/lte/helper/lte-stats-calculator.cc index 590a56451..3a4e48c52 100644 --- a/src/lte/helper/lte-stats-calculator.cc +++ b/src/lte/helper/lte-stats-calculator.cc @@ -27,10 +27,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteStatsCalculator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteStatsCalculator"); + LteStatsCalculator::LteStatsCalculator () : m_dlOutputFilename (""), m_ulOutputFilename ("") diff --git a/src/lte/helper/mac-stats-calculator.cc b/src/lte/helper/mac-stats-calculator.cc index 52a721c9e..46d6357e6 100644 --- a/src/lte/helper/mac-stats-calculator.cc +++ b/src/lte/helper/mac-stats-calculator.cc @@ -23,10 +23,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("MacStatsCalculator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MacStatsCalculator"); + NS_OBJECT_ENSURE_REGISTERED (MacStatsCalculator); MacStatsCalculator::MacStatsCalculator () diff --git a/src/lte/helper/phy-rx-stats-calculator.cc b/src/lte/helper/phy-rx-stats-calculator.cc index 839aa7b19..908b7b5ab 100644 --- a/src/lte/helper/phy-rx-stats-calculator.cc +++ b/src/lte/helper/phy-rx-stats-calculator.cc @@ -25,10 +25,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("PhyRxStatsCalculator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PhyRxStatsCalculator"); + NS_OBJECT_ENSURE_REGISTERED (PhyRxStatsCalculator); PhyRxStatsCalculator::PhyRxStatsCalculator () diff --git a/src/lte/helper/phy-stats-calculator.cc b/src/lte/helper/phy-stats-calculator.cc index 8dddf5e4d..15fdf32a6 100644 --- a/src/lte/helper/phy-stats-calculator.cc +++ b/src/lte/helper/phy-stats-calculator.cc @@ -23,10 +23,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("PhyStatsCalculator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PhyStatsCalculator"); + NS_OBJECT_ENSURE_REGISTERED (PhyStatsCalculator); PhyStatsCalculator::PhyStatsCalculator () diff --git a/src/lte/helper/phy-tx-stats-calculator.cc b/src/lte/helper/phy-tx-stats-calculator.cc index f1cc5329c..4c7c43c8c 100644 --- a/src/lte/helper/phy-tx-stats-calculator.cc +++ b/src/lte/helper/phy-tx-stats-calculator.cc @@ -25,10 +25,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("PhyTxStatsCalculator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PhyTxStatsCalculator"); + NS_OBJECT_ENSURE_REGISTERED (PhyTxStatsCalculator); PhyTxStatsCalculator::PhyTxStatsCalculator () diff --git a/src/lte/helper/point-to-point-epc-helper.cc b/src/lte/helper/point-to-point-epc-helper.cc index 65057835f..7933bf526 100644 --- a/src/lte/helper/point-to-point-epc-helper.cc +++ b/src/lte/helper/point-to-point-epc-helper.cc @@ -40,10 +40,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("PointToPointEpcHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PointToPointEpcHelper"); + NS_OBJECT_ENSURE_REGISTERED (PointToPointEpcHelper); diff --git a/src/lte/helper/radio-bearer-stats-connector.cc b/src/lte/helper/radio-bearer-stats-connector.cc index 2c44b3dd0..e4bb02fa4 100644 --- a/src/lte/helper/radio-bearer-stats-connector.cc +++ b/src/lte/helper/radio-bearer-stats-connector.cc @@ -29,11 +29,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("RadioBearerStatsConnector"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RadioBearerStatsConnector"); bool diff --git a/src/lte/helper/radio-environment-map-helper.cc b/src/lte/helper/radio-environment-map-helper.cc index 0acff2423..9240124dd 100644 --- a/src/lte/helper/radio-environment-map-helper.cc +++ b/src/lte/helper/radio-environment-map-helper.cc @@ -41,11 +41,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("RadioEnvironmentMapHelper"); - namespace ns3 { - +NS_LOG_COMPONENT_DEFINE ("RadioEnvironmentMapHelper"); NS_OBJECT_ENSURE_REGISTERED (RadioEnvironmentMapHelper); diff --git a/src/lte/model/a2-a4-rsrq-handover-algorithm.cc b/src/lte/model/a2-a4-rsrq-handover-algorithm.cc index b6b3455af..bdf8fc25c 100644 --- a/src/lte/model/a2-a4-rsrq-handover-algorithm.cc +++ b/src/lte/model/a2-a4-rsrq-handover-algorithm.cc @@ -29,11 +29,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("A2A4RsrqHandoverAlgorithm"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("A2A4RsrqHandoverAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (A2A4RsrqHandoverAlgorithm); diff --git a/src/lte/model/a3-rsrp-handover-algorithm.cc b/src/lte/model/a3-rsrp-handover-algorithm.cc index 6c81fc855..9d5db8105 100644 --- a/src/lte/model/a3-rsrp-handover-algorithm.cc +++ b/src/lte/model/a3-rsrp-handover-algorithm.cc @@ -25,10 +25,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("A3RsrpHandoverAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("A3RsrpHandoverAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (A3RsrpHandoverAlgorithm); diff --git a/src/lte/model/cqa-ff-mac-scheduler.cc b/src/lte/model/cqa-ff-mac-scheduler.cc index 6787d5798..cc2d4334f 100644 --- a/src/lte/model/cqa-ff-mac-scheduler.cc +++ b/src/lte/model/cqa-ff-mac-scheduler.cc @@ -39,10 +39,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("CqaFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CqaFfMacScheduler"); + static const int CqaType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/epc-enb-application.cc b/src/lte/model/epc-enb-application.cc index 02ca7bfc6..c027e8268 100644 --- a/src/lte/model/epc-enb-application.cc +++ b/src/lte/model/epc-enb-application.cc @@ -31,10 +31,10 @@ #include "eps-bearer-tag.h" -NS_LOG_COMPONENT_DEFINE ("EpcEnbApplication"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EpcEnbApplication"); + EpcEnbApplication::EpsFlowId_t::EpsFlowId_t () { } diff --git a/src/lte/model/epc-gtpu-header.cc b/src/lte/model/epc-gtpu-header.cc index 5f8e496bf..e05db6d41 100644 --- a/src/lte/model/epc-gtpu-header.cc +++ b/src/lte/model/epc-gtpu-header.cc @@ -22,10 +22,10 @@ #include "ns3/log.h" #include "ns3/packet.h" -NS_LOG_COMPONENT_DEFINE ("GtpuHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GtpuHeader"); + /******************************************************** * GTP-U-v1 Header ********************************************************/ diff --git a/src/lte/model/epc-mme.cc b/src/lte/model/epc-mme.cc index e6da9f4b4..d49f9812d 100644 --- a/src/lte/model/epc-mme.cc +++ b/src/lte/model/epc-mme.cc @@ -26,12 +26,9 @@ #include "epc-mme.h" -NS_LOG_COMPONENT_DEFINE ("EpcMme"); - namespace ns3 { - - +NS_LOG_COMPONENT_DEFINE ("EpcMme"); NS_OBJECT_ENSURE_REGISTERED (EpcMme); diff --git a/src/lte/model/epc-sgw-pgw-application.cc b/src/lte/model/epc-sgw-pgw-application.cc index a24fc7872..c5d29d352 100644 --- a/src/lte/model/epc-sgw-pgw-application.cc +++ b/src/lte/model/epc-sgw-pgw-application.cc @@ -28,10 +28,9 @@ #include "ns3/epc-gtpu-header.h" #include "ns3/abort.h" -NS_LOG_COMPONENT_DEFINE ("EpcSgwPgwApplication"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EpcSgwPgwApplication"); ///////////////////////// // UeInfo diff --git a/src/lte/model/epc-tft-classifier.cc b/src/lte/model/epc-tft-classifier.cc index cdc4b9476..8b77bf3d0 100644 --- a/src/lte/model/epc-tft-classifier.cc +++ b/src/lte/model/epc-tft-classifier.cc @@ -36,10 +36,10 @@ #include "ns3/udp-l4-protocol.h" #include "ns3/tcp-l4-protocol.h" -NS_LOG_COMPONENT_DEFINE ("EpcTftClassifier"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EpcTftClassifier"); + EpcTftClassifier::EpcTftClassifier () { NS_LOG_FUNCTION (this); diff --git a/src/lte/model/epc-tft.cc b/src/lte/model/epc-tft.cc index 506a2d82d..bc6ff37a4 100644 --- a/src/lte/model/epc-tft.cc +++ b/src/lte/model/epc-tft.cc @@ -26,10 +26,10 @@ #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("EpcTft"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EpcTft"); + std::ostream& operator<< (std::ostream& os, EpcTft::Direction& d) { switch (d) diff --git a/src/lte/model/epc-ue-nas.cc b/src/lte/model/epc-ue-nas.cc index 918dece34..386a8c280 100644 --- a/src/lte/model/epc-ue-nas.cc +++ b/src/lte/model/epc-ue-nas.cc @@ -27,10 +27,9 @@ #include "epc-ue-nas.h" #include "lte-as-sap.h" -NS_LOG_COMPONENT_DEFINE ("EpcUeNas"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EpcUeNas"); diff --git a/src/lte/model/epc-x2-header.cc b/src/lte/model/epc-x2-header.cc index 5a4b60820..e4bd0983e 100644 --- a/src/lte/model/epc-x2-header.cc +++ b/src/lte/model/epc-x2-header.cc @@ -22,10 +22,9 @@ #include "ns3/epc-x2-header.h" -NS_LOG_COMPONENT_DEFINE ("EpcX2Header"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EpcX2Header"); NS_OBJECT_ENSURE_REGISTERED (EpcX2Header); diff --git a/src/lte/model/epc-x2.cc b/src/lte/model/epc-x2.cc index 1790d9de8..603453f9e 100644 --- a/src/lte/model/epc-x2.cc +++ b/src/lte/model/epc-x2.cc @@ -27,10 +27,9 @@ #include "ns3/epc-x2-header.h" #include "ns3/epc-x2.h" -NS_LOG_COMPONENT_DEFINE ("EpcX2"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EpcX2"); X2IfaceInfo::X2IfaceInfo (Ipv4Address remoteIpAddr, Ptr localCtrlPlaneSocket, Ptr localUserPlaneSocket) { diff --git a/src/lte/model/fdbet-ff-mac-scheduler.cc b/src/lte/model/fdbet-ff-mac-scheduler.cc index 14b104b5c..397c07014 100644 --- a/src/lte/model/fdbet-ff-mac-scheduler.cc +++ b/src/lte/model/fdbet-ff-mac-scheduler.cc @@ -31,10 +31,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("FdBetFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FdBetFfMacScheduler"); + static const int FdBetType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/fdmt-ff-mac-scheduler.cc b/src/lte/model/fdmt-ff-mac-scheduler.cc index bbc4ffcda..0f45cf249 100644 --- a/src/lte/model/fdmt-ff-mac-scheduler.cc +++ b/src/lte/model/fdmt-ff-mac-scheduler.cc @@ -31,10 +31,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("FdMtFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FdMtFfMacScheduler"); + static const int FdMtType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/fdtbfq-ff-mac-scheduler.cc b/src/lte/model/fdtbfq-ff-mac-scheduler.cc index c4ca916ad..d72ceb201 100644 --- a/src/lte/model/fdtbfq-ff-mac-scheduler.cc +++ b/src/lte/model/fdtbfq-ff-mac-scheduler.cc @@ -32,10 +32,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("FdTbfqFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FdTbfqFfMacScheduler"); + static const int FdTbfqType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/ff-mac-scheduler.cc b/src/lte/model/ff-mac-scheduler.cc index d03988772..fc620be43 100644 --- a/src/lte/model/ff-mac-scheduler.cc +++ b/src/lte/model/ff-mac-scheduler.cc @@ -24,10 +24,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("FfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FfMacScheduler"); + NS_OBJECT_ENSURE_REGISTERED (FfMacScheduler); diff --git a/src/lte/model/lte-amc.cc b/src/lte/model/lte-amc.cc index 9c5cfd266..0a93918ac 100644 --- a/src/lte/model/lte-amc.cc +++ b/src/lte/model/lte-amc.cc @@ -32,10 +32,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("LteAmc"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteAmc"); + NS_OBJECT_ENSURE_REGISTERED (LteAmc); // from 3GPP R1-081483 "Conveying MCS and TB size via PDCCH" diff --git a/src/lte/model/lte-anr.cc b/src/lte/model/lte-anr.cc index a7ae940cf..1450a2d40 100644 --- a/src/lte/model/lte-anr.cc +++ b/src/lte/model/lte-anr.cc @@ -29,10 +29,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteAnr"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteAnr"); + NS_OBJECT_ENSURE_REGISTERED (LteAnr); diff --git a/src/lte/model/lte-asn1-header.cc b/src/lte/model/lte-asn1-header.cc index 1b6eafc21..58c49df6f 100644 --- a/src/lte/model/lte-asn1-header.cc +++ b/src/lte/model/lte-asn1-header.cc @@ -25,10 +25,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Asn1Header"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Asn1Header"); + NS_OBJECT_ENSURE_REGISTERED (Asn1Header); TypeId diff --git a/src/lte/model/lte-chunk-processor.cc b/src/lte/model/lte-chunk-processor.cc index f8265eb97..95ee46a05 100644 --- a/src/lte/model/lte-chunk-processor.cc +++ b/src/lte/model/lte-chunk-processor.cc @@ -25,10 +25,10 @@ #include #include "lte-chunk-processor.h" -NS_LOG_COMPONENT_DEFINE ("LteChunkProcessor"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteChunkProcessor"); + LteChunkProcessor::LteChunkProcessor () { NS_LOG_FUNCTION (this); diff --git a/src/lte/model/lte-common.cc b/src/lte/model/lte-common.cc index 0156289b1..764b9f331 100644 --- a/src/lte/model/lte-common.cc +++ b/src/lte/model/lte-common.cc @@ -23,10 +23,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteCommon"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteCommon"); LteFlowId_t::LteFlowId_t () { diff --git a/src/lte/model/lte-control-messages.cc b/src/lte/model/lte-control-messages.cc index b2f60a3a0..d01e51575 100644 --- a/src/lte/model/lte-control-messages.cc +++ b/src/lte/model/lte-control-messages.cc @@ -26,11 +26,10 @@ #include "lte-net-device.h" #include "lte-ue-net-device.h" -NS_LOG_COMPONENT_DEFINE ("LteControlMessage"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteControlMessage"); + LteControlMessage::LteControlMessage (void) { } diff --git a/src/lte/model/lte-enb-mac.cc b/src/lte/model/lte-enb-mac.cc index 4529df243..794194525 100644 --- a/src/lte/model/lte-enb-mac.cc +++ b/src/lte/model/lte-enb-mac.cc @@ -38,10 +38,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("LteEnbMac"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteEnbMac"); NS_OBJECT_ENSURE_REGISTERED (LteEnbMac); diff --git a/src/lte/model/lte-enb-net-device.cc b/src/lte/model/lte-enb-net-device.cc index e85dad6fc..d0eced56f 100644 --- a/src/lte/model/lte-enb-net-device.cc +++ b/src/lte/model/lte-enb-net-device.cc @@ -45,10 +45,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteEnbNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteEnbNetDevice"); + NS_OBJECT_ENSURE_REGISTERED ( LteEnbNetDevice); TypeId LteEnbNetDevice::GetTypeId (void) diff --git a/src/lte/model/lte-enb-phy.cc b/src/lte/model/lte-enb-phy.cc index ee86d5f8c..ef195c888 100644 --- a/src/lte/model/lte-enb-phy.cc +++ b/src/lte/model/lte-enb-phy.cc @@ -45,10 +45,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteEnbPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteEnbPhy"); + NS_OBJECT_ENSURE_REGISTERED (LteEnbPhy); // duration of the data part of a subframe in DL diff --git a/src/lte/model/lte-enb-rrc.cc b/src/lte/model/lte-enb-rrc.cc index c2cc20fa6..577e43ce5 100644 --- a/src/lte/model/lte-enb-rrc.cc +++ b/src/lte/model/lte-enb-rrc.cc @@ -44,11 +44,9 @@ -NS_LOG_COMPONENT_DEFINE ("LteEnbRrc"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteEnbRrc"); /////////////////////////////////////////// // CMAC SAP forwarder diff --git a/src/lte/model/lte-ffr-algorithm.cc b/src/lte/model/lte-ffr-algorithm.cc index c7e4114ba..7bb1a5bd1 100644 --- a/src/lte/model/lte-ffr-algorithm.cc +++ b/src/lte/model/lte-ffr-algorithm.cc @@ -24,10 +24,10 @@ #include "ns3/boolean.h" #include -NS_LOG_COMPONENT_DEFINE ("LteFfrAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteFfrAlgorithm"); + static const int Type0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/lte-ffr-distributed-algorithm.cc b/src/lte/model/lte-ffr-distributed-algorithm.cc index bc6a49dfe..b39de3617 100644 --- a/src/lte/model/lte-ffr-distributed-algorithm.cc +++ b/src/lte/model/lte-ffr-distributed-algorithm.cc @@ -22,10 +22,10 @@ #include "lte-ffr-distributed-algorithm.h" #include -NS_LOG_COMPONENT_DEFINE ("LteFfrDistributedAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteFfrDistributedAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (LteFfrDistributedAlgorithm); diff --git a/src/lte/model/lte-ffr-enhanced-algorithm.cc b/src/lte/model/lte-ffr-enhanced-algorithm.cc index 740f5f58e..666e52170 100644 --- a/src/lte/model/lte-ffr-enhanced-algorithm.cc +++ b/src/lte/model/lte-ffr-enhanced-algorithm.cc @@ -28,10 +28,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteFfrEnhancedAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteFfrEnhancedAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (LteFfrEnhancedAlgorithm); static const double SpectralEfficiencyForCqi[16] = { diff --git a/src/lte/model/lte-ffr-soft-algorithm.cc b/src/lte/model/lte-ffr-soft-algorithm.cc index b85c97b94..343812ee8 100644 --- a/src/lte/model/lte-ffr-soft-algorithm.cc +++ b/src/lte/model/lte-ffr-soft-algorithm.cc @@ -23,10 +23,10 @@ #include #include "ns3/boolean.h" -NS_LOG_COMPONENT_DEFINE ("LteFfrSoftAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteFfrSoftAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (LteFfrSoftAlgorithm); static const struct FfrSoftDownlinkDefaultConfiguration diff --git a/src/lte/model/lte-fr-hard-algorithm.cc b/src/lte/model/lte-fr-hard-algorithm.cc index 2941aeedf..e3e8a8d84 100644 --- a/src/lte/model/lte-fr-hard-algorithm.cc +++ b/src/lte/model/lte-fr-hard-algorithm.cc @@ -22,10 +22,10 @@ #include "lte-fr-hard-algorithm.h" #include -NS_LOG_COMPONENT_DEFINE ("LteFrHardAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteFrHardAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (LteFrHardAlgorithm); static const struct FrHardDownlinkDefaultConfiguration diff --git a/src/lte/model/lte-fr-no-op-algorithm.cc b/src/lte/model/lte-fr-no-op-algorithm.cc index 9442c9ccb..8185bb180 100644 --- a/src/lte/model/lte-fr-no-op-algorithm.cc +++ b/src/lte/model/lte-fr-no-op-algorithm.cc @@ -22,10 +22,10 @@ #include "lte-fr-no-op-algorithm.h" #include -NS_LOG_COMPONENT_DEFINE ("LteFrNoOpAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteFrNoOpAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (LteFrNoOpAlgorithm); diff --git a/src/lte/model/lte-fr-soft-algorithm.cc b/src/lte/model/lte-fr-soft-algorithm.cc index 36264d750..18d5095a4 100644 --- a/src/lte/model/lte-fr-soft-algorithm.cc +++ b/src/lte/model/lte-fr-soft-algorithm.cc @@ -23,10 +23,10 @@ #include #include "ns3/boolean.h" -NS_LOG_COMPONENT_DEFINE ("LteFrSoftAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteFrSoftAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (LteFrSoftAlgorithm); static const struct FrSoftDownlinkDefaultConfiguration diff --git a/src/lte/model/lte-fr-strict-algorithm.cc b/src/lte/model/lte-fr-strict-algorithm.cc index 552461fa7..30eef9539 100644 --- a/src/lte/model/lte-fr-strict-algorithm.cc +++ b/src/lte/model/lte-fr-strict-algorithm.cc @@ -23,10 +23,10 @@ #include #include "ns3/boolean.h" -NS_LOG_COMPONENT_DEFINE ("LteFrStrictAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteFrStrictAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (LteFrStrictAlgorithm); static const struct FrStrictDownlinkDefaultConfiguration diff --git a/src/lte/model/lte-handover-algorithm.cc b/src/lte/model/lte-handover-algorithm.cc index 6e0224a37..ba386c2b5 100644 --- a/src/lte/model/lte-handover-algorithm.cc +++ b/src/lte/model/lte-handover-algorithm.cc @@ -22,10 +22,10 @@ #include "lte-handover-algorithm.h" #include -NS_LOG_COMPONENT_DEFINE ("LteHandoverAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteHandoverAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (LteHandoverAlgorithm); diff --git a/src/lte/model/lte-harq-phy.cc b/src/lte/model/lte-harq-phy.cc index ddb0575c9..f727c0aa0 100644 --- a/src/lte/model/lte-harq-phy.cc +++ b/src/lte/model/lte-harq-phy.cc @@ -23,10 +23,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteHarqPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteHarqPhy"); + //NS_OBJECT_ENSURE_REGISTERED (LteHarqPhy) // ; diff --git a/src/lte/model/lte-interference.cc b/src/lte/model/lte-interference.cc index ef649fcc4..12b0639b6 100644 --- a/src/lte/model/lte-interference.cc +++ b/src/lte/model/lte-interference.cc @@ -26,10 +26,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("LteInterference"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteInterference"); LteInterference::LteInterference () : m_receiving (false), diff --git a/src/lte/model/lte-mi-error-model.cc b/src/lte/model/lte-mi-error-model.cc index 05f4a3c11..5896203cf 100644 --- a/src/lte/model/lte-mi-error-model.cc +++ b/src/lte/model/lte-mi-error-model.cc @@ -42,10 +42,10 @@ -NS_LOG_COMPONENT_DEFINE ("LteMiErrorModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteMiErrorModel"); + // global table of the effective code rates (ECR)s that have BLER performance curves static const double BlerCurvesEcrMap[38] = { // QPSK (M=2) diff --git a/src/lte/model/lte-net-device.cc b/src/lte/model/lte-net-device.cc index 095a34b69..3d9fbd93b 100644 --- a/src/lte/model/lte-net-device.cc +++ b/src/lte/model/lte-net-device.cc @@ -36,10 +36,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteNetDevice"); + NS_OBJECT_ENSURE_REGISTERED ( LteNetDevice); //////////////////////////////// diff --git a/src/lte/model/lte-pdcp-header.cc b/src/lte/model/lte-pdcp-header.cc index f8e3190e2..3e42b924f 100644 --- a/src/lte/model/lte-pdcp-header.cc +++ b/src/lte/model/lte-pdcp-header.cc @@ -22,10 +22,10 @@ #include "ns3/lte-pdcp-header.h" -NS_LOG_COMPONENT_DEFINE ("LtePdcpHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LtePdcpHeader"); + NS_OBJECT_ENSURE_REGISTERED (LtePdcpHeader); LtePdcpHeader::LtePdcpHeader () diff --git a/src/lte/model/lte-pdcp.cc b/src/lte/model/lte-pdcp.cc index 7087d9968..62eb5acc5 100644 --- a/src/lte/model/lte-pdcp.cc +++ b/src/lte/model/lte-pdcp.cc @@ -26,10 +26,9 @@ #include "ns3/lte-pdcp-sap.h" #include "ns3/lte-pdcp-tag.h" -NS_LOG_COMPONENT_DEFINE ("LtePdcp"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LtePdcp"); class LtePdcpSpecificLteRlcSapUser : public LteRlcSapUser { diff --git a/src/lte/model/lte-phy.cc b/src/lte/model/lte-phy.cc index 10fb5be2c..72de1cf62 100644 --- a/src/lte/model/lte-phy.cc +++ b/src/lte/model/lte-phy.cc @@ -28,10 +28,9 @@ #include "lte-phy.h" #include "lte-net-device.h" -NS_LOG_COMPONENT_DEFINE ("LtePhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LtePhy"); NS_OBJECT_ENSURE_REGISTERED (LtePhy); diff --git a/src/lte/model/lte-rlc-am-header.cc b/src/lte/model/lte-rlc-am-header.cc index e382a3f8a..6e95df520 100644 --- a/src/lte/model/lte-rlc-am-header.cc +++ b/src/lte/model/lte-rlc-am-header.cc @@ -22,10 +22,10 @@ #include "ns3/lte-rlc-am-header.h" -NS_LOG_COMPONENT_DEFINE ("LteRlcAmHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteRlcAmHeader"); + NS_OBJECT_ENSURE_REGISTERED (LteRlcAmHeader); LteRlcAmHeader::LteRlcAmHeader () diff --git a/src/lte/model/lte-rlc-am.cc b/src/lte/model/lte-rlc-am.cc index 5d05e49ae..1e39e986d 100644 --- a/src/lte/model/lte-rlc-am.cc +++ b/src/lte/model/lte-rlc-am.cc @@ -26,10 +26,10 @@ #include "ns3/lte-rlc-sdu-status-tag.h" #include "ns3/lte-rlc-tag.h" -NS_LOG_COMPONENT_DEFINE ("LteRlcAm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteRlcAm"); + NS_OBJECT_ENSURE_REGISTERED (LteRlcAm); LteRlcAm::LteRlcAm () diff --git a/src/lte/model/lte-rlc-header.cc b/src/lte/model/lte-rlc-header.cc index d34729c5a..f436b0157 100644 --- a/src/lte/model/lte-rlc-header.cc +++ b/src/lte/model/lte-rlc-header.cc @@ -22,10 +22,10 @@ #include "ns3/lte-rlc-header.h" -NS_LOG_COMPONENT_DEFINE ("LteRlcHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteRlcHeader"); + NS_OBJECT_ENSURE_REGISTERED (LteRlcHeader); LteRlcHeader::LteRlcHeader () diff --git a/src/lte/model/lte-rlc-tm.cc b/src/lte/model/lte-rlc-tm.cc index c8eb6ac28..02bbcc94c 100644 --- a/src/lte/model/lte-rlc-tm.cc +++ b/src/lte/model/lte-rlc-tm.cc @@ -25,10 +25,10 @@ #include "ns3/lte-rlc-tm.h" #include "ns3/lte-rlc-tag.h" -NS_LOG_COMPONENT_DEFINE ("LteRlcTm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteRlcTm"); + NS_OBJECT_ENSURE_REGISTERED (LteRlcTm); LteRlcTm::LteRlcTm () diff --git a/src/lte/model/lte-rlc-um.cc b/src/lte/model/lte-rlc-um.cc index 97adde8de..c4962004e 100644 --- a/src/lte/model/lte-rlc-um.cc +++ b/src/lte/model/lte-rlc-um.cc @@ -26,10 +26,10 @@ #include "ns3/lte-rlc-sdu-status-tag.h" #include "ns3/lte-rlc-tag.h" -NS_LOG_COMPONENT_DEFINE ("LteRlcUm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteRlcUm"); + NS_OBJECT_ENSURE_REGISTERED (LteRlcUm); LteRlcUm::LteRlcUm () diff --git a/src/lte/model/lte-rlc.cc b/src/lte/model/lte-rlc.cc index e87180f41..010ada40f 100644 --- a/src/lte/model/lte-rlc.cc +++ b/src/lte/model/lte-rlc.cc @@ -28,10 +28,9 @@ #include "ns3/lte-rlc-sap.h" // #include "ff-mac-sched-sap.h" -NS_LOG_COMPONENT_DEFINE ("LteRlc"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteRlc"); /////////////////////////////////////// diff --git a/src/lte/model/lte-rrc-header.cc b/src/lte/model/lte-rrc-header.cc index f3aaeb24c..a3188c6ae 100644 --- a/src/lte/model/lte-rrc-header.cc +++ b/src/lte/model/lte-rrc-header.cc @@ -36,10 +36,10 @@ #define MAX_CELL_MEAS 32 #define MAX_CELL_REPORT 8 -NS_LOG_COMPONENT_DEFINE ("RrcHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RrcHeader"); + //////////////////// RrcAsn1Header class /////////////////////////////// RrcAsn1Header::RrcAsn1Header () { diff --git a/src/lte/model/lte-rrc-protocol-ideal.cc b/src/lte/model/lte-rrc-protocol-ideal.cc index 5fa56d504..6bc9a6ed6 100644 --- a/src/lte/model/lte-rrc-protocol-ideal.cc +++ b/src/lte/model/lte-rrc-protocol-ideal.cc @@ -31,11 +31,9 @@ #include "lte-enb-net-device.h" #include "lte-ue-net-device.h" -NS_LOG_COMPONENT_DEFINE ("LteRrcProtocolIdeal"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteRrcProtocolIdeal"); static const Time RRC_IDEAL_MSG_DELAY = MilliSeconds (0); diff --git a/src/lte/model/lte-rrc-protocol-real.cc b/src/lte/model/lte-rrc-protocol-real.cc index f623984d9..0938598a3 100644 --- a/src/lte/model/lte-rrc-protocol-real.cc +++ b/src/lte/model/lte-rrc-protocol-real.cc @@ -32,11 +32,9 @@ #include "lte-enb-net-device.h" #include "lte-ue-net-device.h" -NS_LOG_COMPONENT_DEFINE ("LteRrcProtocolReal"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteRrcProtocolReal"); const Time RRC_REAL_MSG_DELAY = MilliSeconds (0); diff --git a/src/lte/model/lte-spectrum-phy.cc b/src/lte/model/lte-spectrum-phy.cc index 41b61dc89..6d1a59b17 100644 --- a/src/lte/model/lte-spectrum-phy.cc +++ b/src/lte/model/lte-spectrum-phy.cc @@ -39,10 +39,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteSpectrumPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteSpectrumPhy"); // duration of SRS portion of UL subframe diff --git a/src/lte/model/lte-spectrum-signal-parameters.cc b/src/lte/model/lte-spectrum-signal-parameters.cc index 30456b4d6..225ec3dc0 100644 --- a/src/lte/model/lte-spectrum-signal-parameters.cc +++ b/src/lte/model/lte-spectrum-signal-parameters.cc @@ -26,10 +26,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("LteSpectrumSignalParameters"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteSpectrumSignalParameters"); + LteSpectrumSignalParameters::LteSpectrumSignalParameters () { NS_LOG_FUNCTION (this); diff --git a/src/lte/model/lte-spectrum-value-helper.cc b/src/lte/model/lte-spectrum-value-helper.cc index 00a3231f6..8cbe7940d 100644 --- a/src/lte/model/lte-spectrum-value-helper.cc +++ b/src/lte/model/lte-spectrum-value-helper.cc @@ -45,10 +45,10 @@ operator << (ostream& os, const vector& v) } -NS_LOG_COMPONENT_DEFINE ("LteSpectrumValueHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteSpectrumValueHelper"); + /** * Table 5.7.3-1 "E-UTRA channel numbers" from 3GPP TS 36.101 * The table was converted to C syntax doing a cut & paste from TS 36.101 and running the following filter: diff --git a/src/lte/model/lte-ue-mac.cc b/src/lte/model/lte-ue-mac.cc index 9cb8d3d5e..1878240bc 100644 --- a/src/lte/model/lte-ue-mac.cc +++ b/src/lte/model/lte-ue-mac.cc @@ -37,10 +37,10 @@ -NS_LOG_COMPONENT_DEFINE ("LteUeMac"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteUeMac"); + NS_OBJECT_ENSURE_REGISTERED (LteUeMac); diff --git a/src/lte/model/lte-ue-net-device.cc b/src/lte/model/lte-ue-net-device.cc index 351dd90e4..e4da3d584 100644 --- a/src/lte/model/lte-ue-net-device.cc +++ b/src/lte/model/lte-ue-net-device.cc @@ -44,10 +44,10 @@ #include #include "epc-tft.h" -NS_LOG_COMPONENT_DEFINE ("LteUeNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteUeNetDevice"); + NS_OBJECT_ENSURE_REGISTERED ( LteUeNetDevice); diff --git a/src/lte/model/lte-ue-phy.cc b/src/lte/model/lte-ue-phy.cc index 202fb59e7..f024e65bb 100644 --- a/src/lte/model/lte-ue-phy.cc +++ b/src/lte/model/lte-ue-phy.cc @@ -41,10 +41,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteUePhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteUePhy"); diff --git a/src/lte/model/lte-ue-power-control.cc b/src/lte/model/lte-ue-power-control.cc index a32e2d3df..d7dff7548 100644 --- a/src/lte/model/lte-ue-power-control.cc +++ b/src/lte/model/lte-ue-power-control.cc @@ -26,10 +26,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteUePowerControl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteUePowerControl"); + NS_OBJECT_ENSURE_REGISTERED (LteUePowerControl); LteUePowerControl::LteUePowerControl () diff --git a/src/lte/model/lte-ue-rrc.cc b/src/lte/model/lte-ue-rrc.cc index 026b2e2b4..7a73f61c1 100644 --- a/src/lte/model/lte-ue-rrc.cc +++ b/src/lte/model/lte-ue-rrc.cc @@ -36,10 +36,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("LteUeRrc"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteUeRrc"); ///////////////////////////// // CMAC SAP forwarder diff --git a/src/lte/model/lte-vendor-specific-parameters.cc b/src/lte/model/lte-vendor-specific-parameters.cc index 8a135fecc..4ae241d5d 100644 --- a/src/lte/model/lte-vendor-specific-parameters.cc +++ b/src/lte/model/lte-vendor-specific-parameters.cc @@ -21,9 +21,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteVendorSpecificParameters"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("LteVendorSpecificParameters"); SrsCqiRntiVsp::SrsCqiRntiVsp (uint16_t rnti) : m_rnti (rnti) diff --git a/src/lte/model/no-op-handover-algorithm.cc b/src/lte/model/no-op-handover-algorithm.cc index 41b629639..3a231f2d0 100644 --- a/src/lte/model/no-op-handover-algorithm.cc +++ b/src/lte/model/no-op-handover-algorithm.cc @@ -22,10 +22,10 @@ #include "no-op-handover-algorithm.h" #include -NS_LOG_COMPONENT_DEFINE ("NoOpHandoverAlgorithm"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("NoOpHandoverAlgorithm"); + NS_OBJECT_ENSURE_REGISTERED (NoOpHandoverAlgorithm); diff --git a/src/lte/model/pf-ff-mac-scheduler.cc b/src/lte/model/pf-ff-mac-scheduler.cc index 74c4eebf7..f2a296e20 100644 --- a/src/lte/model/pf-ff-mac-scheduler.cc +++ b/src/lte/model/pf-ff-mac-scheduler.cc @@ -31,10 +31,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("PfFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PfFfMacScheduler"); + static const int PfType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/pss-ff-mac-scheduler.cc b/src/lte/model/pss-ff-mac-scheduler.cc index 90d6ddbe6..b7ba6abc6 100644 --- a/src/lte/model/pss-ff-mac-scheduler.cc +++ b/src/lte/model/pss-ff-mac-scheduler.cc @@ -34,10 +34,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("PssFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PssFfMacScheduler"); + static const int PssType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/rem-spectrum-phy.cc b/src/lte/model/rem-spectrum-phy.cc index c67b81e08..16eb8912a 100644 --- a/src/lte/model/rem-spectrum-phy.cc +++ b/src/lte/model/rem-spectrum-phy.cc @@ -31,10 +31,10 @@ #include "rem-spectrum-phy.h" -NS_LOG_COMPONENT_DEFINE ("RemSpectrumPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RemSpectrumPhy"); + NS_OBJECT_ENSURE_REGISTERED (RemSpectrumPhy); RemSpectrumPhy::RemSpectrumPhy () diff --git a/src/lte/model/rr-ff-mac-scheduler.cc b/src/lte/model/rr-ff-mac-scheduler.cc index 9293a357f..81964f9bf 100644 --- a/src/lte/model/rr-ff-mac-scheduler.cc +++ b/src/lte/model/rr-ff-mac-scheduler.cc @@ -32,10 +32,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("RrFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RrFfMacScheduler"); + static const int Type0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/tdbet-ff-mac-scheduler.cc b/src/lte/model/tdbet-ff-mac-scheduler.cc index e64df6094..b4a4d6cd3 100644 --- a/src/lte/model/tdbet-ff-mac-scheduler.cc +++ b/src/lte/model/tdbet-ff-mac-scheduler.cc @@ -31,10 +31,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("TdBetFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TdBetFfMacScheduler"); + static const int TdBetType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/tdmt-ff-mac-scheduler.cc b/src/lte/model/tdmt-ff-mac-scheduler.cc index b345f0b2b..7fa6ed374 100644 --- a/src/lte/model/tdmt-ff-mac-scheduler.cc +++ b/src/lte/model/tdmt-ff-mac-scheduler.cc @@ -31,10 +31,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("TdMtFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TdMtFfMacScheduler"); + static const int TdMtType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/tdtbfq-ff-mac-scheduler.cc b/src/lte/model/tdtbfq-ff-mac-scheduler.cc index f4785987a..ef5f369a1 100644 --- a/src/lte/model/tdtbfq-ff-mac-scheduler.cc +++ b/src/lte/model/tdtbfq-ff-mac-scheduler.cc @@ -32,10 +32,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("TdTbfqFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TdTbfqFfMacScheduler"); + static const int TdTbfqType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/model/trace-fading-loss-model.cc b/src/lte/model/trace-fading-loss-model.cc index 6d6cdbb88..483355f42 100644 --- a/src/lte/model/trace-fading-loss-model.cc +++ b/src/lte/model/trace-fading-loss-model.cc @@ -30,10 +30,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("TraceFadingLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TraceFadingLossModel"); + NS_OBJECT_ENSURE_REGISTERED (TraceFadingLossModel); diff --git a/src/lte/model/tta-ff-mac-scheduler.cc b/src/lte/model/tta-ff-mac-scheduler.cc index 89f1f3e15..63ababde0 100644 --- a/src/lte/model/tta-ff-mac-scheduler.cc +++ b/src/lte/model/tta-ff-mac-scheduler.cc @@ -31,10 +31,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("TtaFfMacScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TtaFfMacScheduler"); + static const int TtaType0AllocationRbg[4] = { 10, // RGB size 1 26, // RGB size 2 diff --git a/src/lte/test/epc-test-gtpu.cc b/src/lte/test/epc-test-gtpu.cc index 32c4b484b..620ce8c3d 100644 --- a/src/lte/test/epc-test-gtpu.cc +++ b/src/lte/test/epc-test-gtpu.cc @@ -26,10 +26,9 @@ #include "epc-test-gtpu.h" -NS_LOG_COMPONENT_DEFINE ("EpcGtpuTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("EpcGtpuTest"); /** * TestSuite diff --git a/src/lte/test/epc-test-s1u-downlink.cc b/src/lte/test/epc-test-s1u-downlink.cc index 31c0858ef..ead00f238 100644 --- a/src/lte/test/epc-test-s1u-downlink.cc +++ b/src/lte/test/epc-test-s1u-downlink.cc @@ -43,11 +43,9 @@ using namespace ns3; - NS_LOG_COMPONENT_DEFINE ("EpcTestS1uDownlink"); - struct UeDlTestData { UeDlTestData (uint32_t n, uint32_t s); diff --git a/src/lte/test/epc-test-s1u-uplink.cc b/src/lte/test/epc-test-s1u-uplink.cc index 2932f2fec..8499eb357 100644 --- a/src/lte/test/epc-test-s1u-uplink.cc +++ b/src/lte/test/epc-test-s1u-uplink.cc @@ -50,8 +50,6 @@ using namespace ns3; - - NS_LOG_COMPONENT_DEFINE ("EpcTestS1uUplink"); /* diff --git a/src/lte/test/lte-ffr-simple.cc b/src/lte/test/lte-ffr-simple.cc index 558c7386f..f1be98d97 100644 --- a/src/lte/test/lte-ffr-simple.cc +++ b/src/lte/test/lte-ffr-simple.cc @@ -23,10 +23,10 @@ #include #include "ns3/lte-rrc-sap.h" -NS_LOG_COMPONENT_DEFINE ("LteFfrSimple"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteFfrSimple"); + NS_OBJECT_ENSURE_REGISTERED (LteFfrSimple); diff --git a/src/lte/test/lte-simple-helper.cc b/src/lte/test/lte-simple-helper.cc index 1fc3786e2..6095e0d21 100644 --- a/src/lte/test/lte-simple-helper.cc +++ b/src/lte/test/lte-simple-helper.cc @@ -30,10 +30,9 @@ #include "lte-test-entities.h" -NS_LOG_COMPONENT_DEFINE ("LteSimpleHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteSimpleHelper"); NS_OBJECT_ENSURE_REGISTERED (LteSimpleHelper); diff --git a/src/lte/test/lte-simple-net-device.cc b/src/lte/test/lte-simple-net-device.cc index b9b69fc58..e88bd8303 100644 --- a/src/lte/test/lte-simple-net-device.cc +++ b/src/lte/test/lte-simple-net-device.cc @@ -23,10 +23,9 @@ #include "ns3/log.h" #include "lte-simple-net-device.h" -NS_LOG_COMPONENT_DEFINE ("LteSimpleNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteSimpleNetDevice"); NS_OBJECT_ENSURE_REGISTERED (LteSimpleNetDevice); diff --git a/src/lte/test/lte-simple-spectrum-phy.cc b/src/lte/test/lte-simple-spectrum-phy.cc index 999281978..8374839ad 100644 --- a/src/lte/test/lte-simple-spectrum-phy.cc +++ b/src/lte/test/lte-simple-spectrum-phy.cc @@ -30,10 +30,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteSimpleSpectrumPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteSimpleSpectrumPhy"); + NS_OBJECT_ENSURE_REGISTERED (LteSimpleSpectrumPhy); LteSimpleSpectrumPhy::LteSimpleSpectrumPhy () diff --git a/src/lte/test/lte-test-cell-selection.cc b/src/lte/test/lte-test-cell-selection.cc index 04818a744..a2924f78e 100644 --- a/src/lte/test/lte-test-cell-selection.cc +++ b/src/lte/test/lte-test-cell-selection.cc @@ -43,10 +43,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteCellSelectionTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteCellSelectionTest"); /* * Test Suite diff --git a/src/lte/test/lte-test-cqa-ff-mac-scheduler.cc b/src/lte/test/lte-test-cqa-ff-mac-scheduler.cc index 506ae7587..c90b6d6f1 100644 --- a/src/lte/test/lte-test-cqa-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-cqa-ff-mac-scheduler.cc @@ -60,10 +60,10 @@ #include "lte-test-cqa-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestCqaFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestCqaFfMacScheduler"); + LenaTestCqaFfMacSchedulerSuite::LenaTestCqaFfMacSchedulerSuite () : TestSuite ("lte-cqa-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-cqi-generation.cc b/src/lte/test/lte-test-cqi-generation.cc index 951b5788f..63ba92778 100644 --- a/src/lte/test/lte-test-cqi-generation.cc +++ b/src/lte/test/lte-test-cqi-generation.cc @@ -34,10 +34,10 @@ #include "lte-test-cqi-generation.h" -NS_LOG_COMPONENT_DEFINE ("LteCqiGenerationTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteCqiGenerationTest"); + void LteTestDlSchedulingCallback (LteCqiGenerationTestCase *testcase, std::string path, uint32_t frameNo, uint32_t subframeNo, uint16_t rnti, diff --git a/src/lte/test/lte-test-downlink-power-control.cc b/src/lte/test/lte-test-downlink-power-control.cc index aecdf4be3..36e9e52cc 100644 --- a/src/lte/test/lte-test-downlink-power-control.cc +++ b/src/lte/test/lte-test-downlink-power-control.cc @@ -47,10 +47,10 @@ #include "lte-test-downlink-power-control.h" #include -NS_LOG_COMPONENT_DEFINE ("LteDownlinkPowerControlTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteDownlinkPowerControlTest"); + /** * TestSuite */ diff --git a/src/lte/test/lte-test-downlink-sinr.cc b/src/lte/test/lte-test-downlink-sinr.cc index 37f4bdd78..51b65c07f 100644 --- a/src/lte/test/lte-test-downlink-sinr.cc +++ b/src/lte/test/lte-test-downlink-sinr.cc @@ -35,10 +35,10 @@ #include #include "ns3/lte-helper.h" -NS_LOG_COMPONENT_DEFINE ("LteDownlinkSinrTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteDownlinkSinrTest"); + /** * Test 1.1 SINR calculation in downlink */ diff --git a/src/lte/test/lte-test-earfcn.cc b/src/lte/test/lte-test-earfcn.cc index c298ca546..8bea6bcf1 100644 --- a/src/lte/test/lte-test-earfcn.cc +++ b/src/lte/test/lte-test-earfcn.cc @@ -25,10 +25,10 @@ #include "ns3/lte-spectrum-value-helper.h" -NS_LOG_COMPONENT_DEFINE ("LteTestEarfcn"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteTestEarfcn"); + class LteEarfcnTestCase : public TestCase { public: diff --git a/src/lte/test/lte-test-entities.cc b/src/lte/test/lte-test-entities.cc index 69b827ff1..0308fd93b 100644 --- a/src/lte/test/lte-test-entities.cc +++ b/src/lte/test/lte-test-entities.cc @@ -27,10 +27,9 @@ #include "lte-test-entities.h" -NS_LOG_COMPONENT_DEFINE ("LteTestEntities"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteTestEntities"); ///////////////////////////////////////////////////////////////////// diff --git a/src/lte/test/lte-test-fading.cc b/src/lte/test/lte-test-fading.cc index 320aa8f18..5e675a648 100644 --- a/src/lte/test/lte-test-fading.cc +++ b/src/lte/test/lte-test-fading.cc @@ -50,10 +50,9 @@ // #include // #include -NS_LOG_COMPONENT_DEFINE ("LteFadingTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteFadingTest"); /** * Test 1.1 Fading compound test diff --git a/src/lte/test/lte-test-fdbet-ff-mac-scheduler.cc b/src/lte/test/lte-test-fdbet-ff-mac-scheduler.cc index 057142939..0aba8fe71 100644 --- a/src/lte/test/lte-test-fdbet-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-fdbet-ff-mac-scheduler.cc @@ -51,10 +51,10 @@ #include "lte-test-fdbet-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestFdBetFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestFdBetFfMacScheduler"); + LenaTestFdBetFfMacSchedulerSuite::LenaTestFdBetFfMacSchedulerSuite () : TestSuite ("lte-fdbet-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-fdmt-ff-mac-scheduler.cc b/src/lte/test/lte-test-fdmt-ff-mac-scheduler.cc index 790bbeff1..5e535ed02 100644 --- a/src/lte/test/lte-test-fdmt-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-fdmt-ff-mac-scheduler.cc @@ -53,10 +53,10 @@ #include "lte-test-fdmt-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestFdMtFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestFdMtFfMacScheduler"); + LenaTestFdMtFfMacSchedulerSuite::LenaTestFdMtFfMacSchedulerSuite () : TestSuite ("lte-fdmt-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.cc b/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.cc index 942ba2f06..81cbe521f 100644 --- a/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.cc @@ -58,10 +58,10 @@ #include "lte-test-fdtbfq-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestFdTbfqFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestFdTbfqFfMacScheduler"); + LenaTestFdTbfqFfMacSchedulerSuite::LenaTestFdTbfqFfMacSchedulerSuite () : TestSuite ("lte-fdtbfq-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-frequency-reuse.cc b/src/lte/test/lte-test-frequency-reuse.cc index c6295b47d..2087b7280 100644 --- a/src/lte/test/lte-test-frequency-reuse.cc +++ b/src/lte/test/lte-test-frequency-reuse.cc @@ -52,10 +52,10 @@ #include "lte-test-frequency-reuse.h" -NS_LOG_COMPONENT_DEFINE ("LteFrequencyReuseTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteFrequencyReuseTest"); + /** * TestSuite */ diff --git a/src/lte/test/lte-test-harq.cc b/src/lte/test/lte-test-harq.cc index f8794ce77..abd809337 100644 --- a/src/lte/test/lte-test-harq.cc +++ b/src/lte/test/lte-test-harq.cc @@ -52,10 +52,9 @@ #include "lte-test-harq.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestHarq"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestHarq"); LenaTestHarqSuite::LenaTestHarqSuite () : TestSuite ("lte-harq", SYSTEM) diff --git a/src/lte/test/lte-test-interference-fr.cc b/src/lte/test/lte-test-interference-fr.cc index f0cc2fbc0..254544fe7 100644 --- a/src/lte/test/lte-test-interference-fr.cc +++ b/src/lte/test/lte-test-interference-fr.cc @@ -46,10 +46,10 @@ #include "ns3/lte-spectrum-value-helper.h" -NS_LOG_COMPONENT_DEFINE ("LteInterferenceFrTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteInterferenceFrTest"); + /** * TestSuite */ diff --git a/src/lte/test/lte-test-interference.cc b/src/lte/test/lte-test-interference.cc index 30f2c45a9..cf5ec0b1b 100644 --- a/src/lte/test/lte-test-interference.cc +++ b/src/lte/test/lte-test-interference.cc @@ -39,10 +39,9 @@ #include "lte-test-sinr-chunk-processor.h" -NS_LOG_COMPONENT_DEFINE ("LteInterferenceTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteInterferenceTest"); void LteTestDlSchedulingCallback (LteInterferenceTestCase *testcase, std::string path, diff --git a/src/lte/test/lte-test-link-adaptation.cc b/src/lte/test/lte-test-link-adaptation.cc index 6b9290ca4..ef8273b04 100644 --- a/src/lte/test/lte-test-link-adaptation.cc +++ b/src/lte/test/lte-test-link-adaptation.cc @@ -35,10 +35,9 @@ #include "lte-test-sinr-chunk-processor.h" -NS_LOG_COMPONENT_DEFINE ("LteLinkAdaptationTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteLinkAdaptationTest"); /** * Test 1.3 Link Adaptation diff --git a/src/lte/test/lte-test-mimo.cc b/src/lte/test/lte-test-mimo.cc index d79e5922e..5354c6929 100644 --- a/src/lte/test/lte-test-mimo.cc +++ b/src/lte/test/lte-test-mimo.cc @@ -56,10 +56,9 @@ #include "lte-test-mimo.h" -NS_LOG_COMPONENT_DEFINE ("LteTestMimo"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteTestMimo"); LenaTestMimoSuite::LenaTestMimoSuite () : TestSuite ("lte-mimo", SYSTEM) diff --git a/src/lte/test/lte-test-pathloss-model.cc b/src/lte/test/lte-test-pathloss-model.cc index 62de9e69d..c50a426f8 100644 --- a/src/lte/test/lte-test-pathloss-model.cc +++ b/src/lte/test/lte-test-pathloss-model.cc @@ -51,10 +51,9 @@ #include "lte-test-ue-phy.h" #include "lte-test-pathloss-model.h" -NS_LOG_COMPONENT_DEFINE ("LtePathlossModelTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LtePathlossModelTest"); /** * Test 1.1 Pathloss compound test diff --git a/src/lte/test/lte-test-pf-ff-mac-scheduler.cc b/src/lte/test/lte-test-pf-ff-mac-scheduler.cc index 96c5e6a9d..d42c64126 100644 --- a/src/lte/test/lte-test-pf-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-pf-ff-mac-scheduler.cc @@ -50,10 +50,10 @@ #include "lte-test-pf-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestPfFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestPfFfMacScheduler"); + LenaTestPfFfMacSchedulerSuite::LenaTestPfFfMacSchedulerSuite () : TestSuite ("lte-pf-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-phy-error-model.cc b/src/lte/test/lte-test-phy-error-model.cc index 1f3f0f1ce..26f95fb9d 100644 --- a/src/lte/test/lte-test-phy-error-model.cc +++ b/src/lte/test/lte-test-phy-error-model.cc @@ -53,10 +53,9 @@ #include "lte-test-phy-error-model.h" -NS_LOG_COMPONENT_DEFINE ("LteTestPhyErrorModel"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteTestPhyErrorModel"); LenaTestPhyErrorModelSuite::LenaTestPhyErrorModelSuite () : TestSuite ("lte-phy-error-model", SYSTEM) diff --git a/src/lte/test/lte-test-pss-ff-mac-scheduler.cc b/src/lte/test/lte-test-pss-ff-mac-scheduler.cc index ed0d14545..7c05f0dac 100644 --- a/src/lte/test/lte-test-pss-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-pss-ff-mac-scheduler.cc @@ -58,10 +58,10 @@ #include "lte-test-pss-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestPssFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestPssFfMacScheduler"); + LenaTestPssFfMacSchedulerSuite::LenaTestPssFfMacSchedulerSuite () : TestSuite ("lte-pss-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-rlc-am-e2e.cc b/src/lte/test/lte-test-rlc-am-e2e.cc index 9ec1baa89..bb82cda4f 100644 --- a/src/lte/test/lte-test-rlc-am-e2e.cc +++ b/src/lte/test/lte-test-rlc-am-e2e.cc @@ -37,10 +37,9 @@ #include "lte-test-entities.h" -NS_LOG_COMPONENT_DEFINE ("LteRlcAmE2eTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteRlcAmE2eTest"); /** * Test x.x.x RLC AM: End-to-end flow diff --git a/src/lte/test/lte-test-rlc-am-transmitter.cc b/src/lte/test/lte-test-rlc-am-transmitter.cc index a6f13e219..85cc9450b 100644 --- a/src/lte/test/lte-test-rlc-am-transmitter.cc +++ b/src/lte/test/lte-test-rlc-am-transmitter.cc @@ -27,10 +27,9 @@ #include "lte-test-rlc-am-transmitter.h" #include "lte-test-entities.h" -NS_LOG_COMPONENT_DEFINE ("LteRlcAmTransmitterTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteRlcAmTransmitterTest"); /** * TestSuite 4.1.1 RLC AM: Only transmitter diff --git a/src/lte/test/lte-test-rlc-um-e2e.cc b/src/lte/test/lte-test-rlc-um-e2e.cc index 8d82359ba..f5465a8cf 100644 --- a/src/lte/test/lte-test-rlc-um-e2e.cc +++ b/src/lte/test/lte-test-rlc-um-e2e.cc @@ -36,10 +36,9 @@ #include "lte-test-rlc-um-e2e.h" -NS_LOG_COMPONENT_DEFINE ("LteRlcUmE2eTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteRlcUmE2eTest"); /** * Test x.x.x RLC UM: End-to-end flow diff --git a/src/lte/test/lte-test-rlc-um-transmitter.cc b/src/lte/test/lte-test-rlc-um-transmitter.cc index 9ef38a26d..f15a9dd00 100644 --- a/src/lte/test/lte-test-rlc-um-transmitter.cc +++ b/src/lte/test/lte-test-rlc-um-transmitter.cc @@ -27,10 +27,9 @@ #include "lte-test-rlc-um-transmitter.h" #include "lte-test-entities.h" -NS_LOG_COMPONENT_DEFINE ("LteRlcUmTransmitterTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteRlcUmTransmitterTest"); /** * TestSuite 4.1.1 RLC UM: Only transmitter diff --git a/src/lte/test/lte-test-rr-ff-mac-scheduler.cc b/src/lte/test/lte-test-rr-ff-mac-scheduler.cc index 61beea96d..5733c9e2c 100644 --- a/src/lte/test/lte-test-rr-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-rr-ff-mac-scheduler.cc @@ -48,10 +48,9 @@ #include "lte-test-rr-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestRrFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestRrFfMacScheduler"); LenaTestRrFfMacSchedulerSuite::LenaTestRrFfMacSchedulerSuite () : TestSuite ("lte-rr-ff-mac-scheduler", SYSTEM) diff --git a/src/lte/test/lte-test-sinr-chunk-processor.cc b/src/lte/test/lte-test-sinr-chunk-processor.cc index 288fbb784..0abf44f02 100644 --- a/src/lte/test/lte-test-sinr-chunk-processor.cc +++ b/src/lte/test/lte-test-sinr-chunk-processor.cc @@ -23,10 +23,9 @@ #include #include "lte-test-sinr-chunk-processor.h" -NS_LOG_COMPONENT_DEFINE ("LteTestSinrChunkProcessor"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteTestSinrChunkProcessor"); LteTestSinrChunkProcessor::LteTestSinrChunkProcessor () { diff --git a/src/lte/test/lte-test-spectrum-value-helper.cc b/src/lte/test/lte-test-spectrum-value-helper.cc index fe125ba69..86f44ac09 100644 --- a/src/lte/test/lte-test-spectrum-value-helper.cc +++ b/src/lte/test/lte-test-spectrum-value-helper.cc @@ -26,10 +26,10 @@ #include "ns3/spectrum-test.h" #include "ns3/lte-spectrum-value-helper.h" -NS_LOG_COMPONENT_DEFINE ("LteTestSpectrumValueHelper"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteTestSpectrumValueHelper"); + class LteSpectrumModelTestCase : public TestCase { public: diff --git a/src/lte/test/lte-test-tdbet-ff-mac-scheduler.cc b/src/lte/test/lte-test-tdbet-ff-mac-scheduler.cc index c00e4a851..862dadfc3 100644 --- a/src/lte/test/lte-test-tdbet-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-tdbet-ff-mac-scheduler.cc @@ -51,10 +51,10 @@ #include "lte-test-tdbet-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestTdBetFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestTdBetFfMacScheduler"); + LenaTestTdBetFfMacSchedulerSuite::LenaTestTdBetFfMacSchedulerSuite () : TestSuite ("lte-tdbet-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-tdmt-ff-mac-scheduler.cc b/src/lte/test/lte-test-tdmt-ff-mac-scheduler.cc index 4205c475c..b022eddf4 100644 --- a/src/lte/test/lte-test-tdmt-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-tdmt-ff-mac-scheduler.cc @@ -53,10 +53,10 @@ #include "lte-test-tdmt-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestTdMtFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestTdMtFfMacScheduler"); + LenaTestTdMtFfMacSchedulerSuite::LenaTestTdMtFfMacSchedulerSuite () : TestSuite ("lte-tdmt-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.cc b/src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.cc index d35c4d871..a0c7f3bf4 100644 --- a/src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.cc @@ -58,10 +58,10 @@ #include "lte-test-tdtbfq-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestTdTbfqFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestTdTbfqFfMacScheduler"); + LenaTestTdTbfqFfMacSchedulerSuite::LenaTestTdTbfqFfMacSchedulerSuite () : TestSuite ("lte-tdtbfq-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-tta-ff-mac-scheduler.cc b/src/lte/test/lte-test-tta-ff-mac-scheduler.cc index b49918e9b..8e9ad2f9a 100644 --- a/src/lte/test/lte-test-tta-ff-mac-scheduler.cc +++ b/src/lte/test/lte-test-tta-ff-mac-scheduler.cc @@ -53,10 +53,10 @@ #include "lte-test-tta-ff-mac-scheduler.h" -NS_LOG_COMPONENT_DEFINE ("LenaTestTtaFfMacScheduler"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LenaTestTtaFfMacScheduler"); + LenaTestTtaFfMacSchedulerSuite::LenaTestTtaFfMacSchedulerSuite () : TestSuite ("lte-tta-ff-mac-scheduler", SYSTEM) { diff --git a/src/lte/test/lte-test-ue-measurements.cc b/src/lte/test/lte-test-ue-measurements.cc index 1b64415af..aa9f1d931 100644 --- a/src/lte/test/lte-test-ue-measurements.cc +++ b/src/lte/test/lte-test-ue-measurements.cc @@ -54,10 +54,9 @@ #include "lte-test-sinr-chunk-processor.h" #include -NS_LOG_COMPONENT_DEFINE ("LteUeMeasurementsTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteUeMeasurementsTest"); // ===== LTE-UE-MEASUREMENTS TEST SUITE ==================================== // diff --git a/src/lte/test/lte-test-ue-phy.cc b/src/lte/test/lte-test-ue-phy.cc index 1194c635d..093bf7d2e 100644 --- a/src/lte/test/lte-test-ue-phy.cc +++ b/src/lte/test/lte-test-ue-phy.cc @@ -21,10 +21,9 @@ #include "ns3/log.h" #include "lte-test-ue-phy.h" -NS_LOG_COMPONENT_DEFINE ("LteTestUePhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LteTestUePhy"); NS_OBJECT_ENSURE_REGISTERED (LteTestUePhy); diff --git a/src/lte/test/lte-test-uplink-power-control.cc b/src/lte/test/lte-test-uplink-power-control.cc index c3e78a1ea..c0b9df8ca 100644 --- a/src/lte/test/lte-test-uplink-power-control.cc +++ b/src/lte/test/lte-test-uplink-power-control.cc @@ -48,10 +48,10 @@ #include "lte-test-uplink-power-control.h" #include -NS_LOG_COMPONENT_DEFINE ("LteUplinkPowerControlTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteUplinkPowerControlTest"); + /** * TestSuite */ diff --git a/src/lte/test/lte-test-uplink-sinr.cc b/src/lte/test/lte-test-uplink-sinr.cc index deef7e9ab..1ad3992fa 100644 --- a/src/lte/test/lte-test-uplink-sinr.cc +++ b/src/lte/test/lte-test-uplink-sinr.cc @@ -35,10 +35,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("LteUplinkSinrTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteUplinkSinrTest"); /** * Test 1.2 SINR calculation in uplink diff --git a/src/lte/test/test-asn1-encoding.cc b/src/lte/test/test-asn1-encoding.cc index a008de977..6ffbc955d 100644 --- a/src/lte/test/test-asn1-encoding.cc +++ b/src/lte/test/test-asn1-encoding.cc @@ -30,10 +30,10 @@ #include "ns3/lte-rrc-header.h" #include "ns3/lte-rrc-sap.h" -NS_LOG_COMPONENT_DEFINE ("Asn1EncodingTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("Asn1EncodingTest"); + class TestUtils { public: diff --git a/src/lte/test/test-epc-tft-classifier.cc b/src/lte/test/test-epc-tft-classifier.cc index c150b611c..678d3498f 100644 --- a/src/lte/test/test-epc-tft-classifier.cc +++ b/src/lte/test/test-epc-tft-classifier.cc @@ -33,10 +33,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("TestEpcTftClassifier"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("TestEpcTftClassifier"); + class EpcTftClassifierTestCase : public TestCase { public: diff --git a/src/lte/test/test-lte-antenna.cc b/src/lte/test/test-lte-antenna.cc index 8be5404d7..3e91a3f30 100644 --- a/src/lte/test/test-lte-antenna.cc +++ b/src/lte/test/test-lte-antenna.cc @@ -39,10 +39,9 @@ #include "lte-test-sinr-chunk-processor.h" -NS_LOG_COMPONENT_DEFINE ("LteAntennaTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteAntennaTest"); class LteEnbAntennaTestCase : public TestCase diff --git a/src/lte/test/test-lte-epc-e2e-data.cc b/src/lte/test/test-lte-epc-e2e-data.cc index 694ff1852..29694090c 100644 --- a/src/lte/test/test-lte-epc-e2e-data.cc +++ b/src/lte/test/test-lte-epc-e2e-data.cc @@ -46,11 +46,9 @@ using namespace ns3; - NS_LOG_COMPONENT_DEFINE ("LteEpcE2eData"); - struct BearerTestData { BearerTestData (uint32_t n, uint32_t s, double i); diff --git a/src/lte/test/test-lte-handover-delay.cc b/src/lte/test/test-lte-handover-delay.cc index 6b964e7c1..d21527cdd 100644 --- a/src/lte/test/test-lte-handover-delay.cc +++ b/src/lte/test/test-lte-handover-delay.cc @@ -44,10 +44,9 @@ #include -NS_LOG_COMPONENT_DEFINE("LteHandoverDelayTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE("LteHandoverDelayTest"); /* * HANDOVER DELAY TEST CASE diff --git a/src/lte/test/test-lte-handover-target.cc b/src/lte/test/test-lte-handover-target.cc index 33ed9e17c..0fa04a784 100644 --- a/src/lte/test/test-lte-handover-target.cc +++ b/src/lte/test/test-lte-handover-target.cc @@ -48,10 +48,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteHandoverTargetTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteHandoverTargetTest"); /** * \brief Testing a handover algorithm, verifying that it selects the right diff --git a/src/lte/test/test-lte-rrc.cc b/src/lte/test/test-lte-rrc.cc index e560b3ee2..81202f6e5 100644 --- a/src/lte/test/test-lte-rrc.cc +++ b/src/lte/test/test-lte-rrc.cc @@ -26,10 +26,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteRrcTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteRrcTest"); + class LteRrcConnectionEstablishmentTestCase : public TestCase { public: diff --git a/src/lte/test/test-lte-x2-handover-measures.cc b/src/lte/test/test-lte-x2-handover-measures.cc index 481e27259..ac62fe985 100644 --- a/src/lte/test/test-lte-x2-handover-measures.cc +++ b/src/lte/test/test-lte-x2-handover-measures.cc @@ -27,10 +27,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteX2HandoverMeasuresTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteX2HandoverMeasuresTest"); struct CheckPointEvent { diff --git a/src/lte/test/test-lte-x2-handover.cc b/src/lte/test/test-lte-x2-handover.cc index 2a637884a..fe6212302 100644 --- a/src/lte/test/test-lte-x2-handover.cc +++ b/src/lte/test/test-lte-x2-handover.cc @@ -27,10 +27,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("LteX2HandoverTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("LteX2HandoverTest"); + struct HandoverEvent { Time startTime; diff --git a/src/mesh/examples/mesh.cc b/src/mesh/examples/mesh.cc index 993ae330c..5fdfb4f62 100644 --- a/src/mesh/examples/mesh.cc +++ b/src/mesh/examples/mesh.cc @@ -60,6 +60,7 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("TestMeshScript"); + class MeshTest { public: diff --git a/src/mesh/model/dot11s/hwmp-protocol-mac.cc b/src/mesh/model/dot11s/hwmp-protocol-mac.cc index d345440fb..c63941dc1 100644 --- a/src/mesh/model/dot11s/hwmp-protocol-mac.cc +++ b/src/mesh/model/dot11s/hwmp-protocol-mac.cc @@ -33,9 +33,11 @@ #include "ie-dot11s-perr.h" namespace ns3 { -namespace dot11s { NS_LOG_COMPONENT_DEFINE ("HwmpProtocolMac"); + +namespace dot11s { + HwmpProtocolMac::HwmpProtocolMac (uint32_t ifIndex, Ptr protocol) : m_ifIndex (ifIndex), m_protocol (protocol) { diff --git a/src/mesh/model/dot11s/hwmp-protocol.cc b/src/mesh/model/dot11s/hwmp-protocol.cc index e14bbd678..14215e4e3 100644 --- a/src/mesh/model/dot11s/hwmp-protocol.cc +++ b/src/mesh/model/dot11s/hwmp-protocol.cc @@ -36,9 +36,10 @@ #include "ns3/trace-source-accessor.h" #include "ie-dot11s-perr.h" -NS_LOG_COMPONENT_DEFINE ("HwmpProtocol"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("HwmpProtocol"); + namespace dot11s { NS_OBJECT_ENSURE_REGISTERED (HwmpProtocol); diff --git a/src/mesh/model/dot11s/hwmp-rtable.cc b/src/mesh/model/dot11s/hwmp-rtable.cc index e02cfda0b..392070a04 100644 --- a/src/mesh/model/dot11s/hwmp-rtable.cc +++ b/src/mesh/model/dot11s/hwmp-rtable.cc @@ -27,10 +27,11 @@ #include "hwmp-rtable.h" namespace ns3 { -namespace dot11s { NS_LOG_COMPONENT_DEFINE ("HwmpRtable"); +namespace dot11s { + NS_OBJECT_ENSURE_REGISTERED (HwmpRtable); TypeId diff --git a/src/mesh/model/dot11s/peer-link.cc b/src/mesh/model/dot11s/peer-link.cc index e6eeec17f..630903fc0 100644 --- a/src/mesh/model/dot11s/peer-link.cc +++ b/src/mesh/model/dot11s/peer-link.cc @@ -26,9 +26,10 @@ #include "ns3/simulator.h" #include "ns3/traced-value.h" -NS_LOG_COMPONENT_DEFINE ("Dot11sPeerManagementProtocol"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("Dot11sPeerManagementProtocol"); + namespace dot11s { NS_OBJECT_ENSURE_REGISTERED ( PeerLink); diff --git a/src/mesh/model/dot11s/peer-management-protocol.cc b/src/mesh/model/dot11s/peer-management-protocol.cc index 9ae96b3a0..9824a918e 100644 --- a/src/mesh/model/dot11s/peer-management-protocol.cc +++ b/src/mesh/model/dot11s/peer-management-protocol.cc @@ -33,9 +33,12 @@ #include "ns3/wifi-net-device.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("PeerManagementProtocol"); namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("PeerManagementProtocol"); + namespace dot11s { + /*************************************************** * PeerManager ***************************************************/ diff --git a/src/mesh/model/flame/flame-protocol-mac.cc b/src/mesh/model/flame/flame-protocol-mac.cc index 02510bb23..77098e4b1 100644 --- a/src/mesh/model/flame/flame-protocol-mac.cc +++ b/src/mesh/model/flame/flame-protocol-mac.cc @@ -22,9 +22,13 @@ #include "flame-protocol.h" #include "flame-header.h" #include "ns3/log.h" + namespace ns3 { -namespace flame { + NS_LOG_COMPONENT_DEFINE ("FlameProtocolMac"); + +namespace flame { + FlameProtocolMac::FlameProtocolMac (Ptr protocol) : m_protocol (protocol) { diff --git a/src/mesh/model/flame/flame-protocol.cc b/src/mesh/model/flame/flame-protocol.cc index b1f821041..fc2eaba96 100644 --- a/src/mesh/model/flame/flame-protocol.cc +++ b/src/mesh/model/flame/flame-protocol.cc @@ -31,10 +31,12 @@ #include "ns3/mesh-point-device.h" #include "ns3/mesh-wifi-interface-mac.h" -NS_LOG_COMPONENT_DEFINE ("FlameProtocol"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("FlameProtocol"); + namespace flame { + //----------------------------------------------------------------------------- // FlameTag //----------------------------------------------------------------------------- diff --git a/src/mesh/model/flame/flame-rtable.cc b/src/mesh/model/flame/flame-rtable.cc index 92d585d92..3b3ce2372 100644 --- a/src/mesh/model/flame/flame-rtable.cc +++ b/src/mesh/model/flame/flame-rtable.cc @@ -23,11 +23,13 @@ #include "ns3/log.h" #include "flame-rtable.h" + namespace ns3 { -namespace flame { NS_LOG_COMPONENT_DEFINE ("FlameRtable"); +namespace flame { + NS_OBJECT_ENSURE_REGISTERED (FlameRtable); TypeId diff --git a/src/mesh/model/mesh-l2-routing-protocol.cc b/src/mesh/model/mesh-l2-routing-protocol.cc index 953a49c3a..836e765fd 100644 --- a/src/mesh/model/mesh-l2-routing-protocol.cc +++ b/src/mesh/model/mesh-l2-routing-protocol.cc @@ -23,10 +23,10 @@ #include "ns3/mesh-l2-routing-protocol.h" #include "ns3/mesh-point-device.h" -NS_LOG_COMPONENT_DEFINE ("MeshL2RoutingProtocol"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MeshL2RoutingProtocol"); + NS_OBJECT_ENSURE_REGISTERED (MeshL2RoutingProtocol); TypeId diff --git a/src/mesh/model/mesh-point-device.cc b/src/mesh/model/mesh-point-device.cc index 2628d2725..bdcbfe483 100644 --- a/src/mesh/model/mesh-point-device.cc +++ b/src/mesh/model/mesh-point-device.cc @@ -27,10 +27,10 @@ #include "ns3/wifi-net-device.h" #include "ns3/mesh-wifi-interface-mac.h" -NS_LOG_COMPONENT_DEFINE ("MeshPointDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MeshPointDevice"); + NS_OBJECT_ENSURE_REGISTERED (MeshPointDevice); TypeId diff --git a/src/mesh/model/mesh-wifi-interface-mac.cc b/src/mesh/model/mesh-wifi-interface-mac.cc index 6109410d6..91dc9588a 100644 --- a/src/mesh/model/mesh-wifi-interface-mac.cc +++ b/src/mesh/model/mesh-wifi-interface-mac.cc @@ -36,10 +36,10 @@ #include "ns3/trace-source-accessor.h" #include "ns3/qos-tag.h" -NS_LOG_COMPONENT_DEFINE ("MeshWifiInterfaceMac"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MeshWifiInterfaceMac"); + NS_OBJECT_ENSURE_REGISTERED (MeshWifiInterfaceMac); TypeId diff --git a/src/mobility/helper/mobility-helper.cc b/src/mobility/helper/mobility-helper.cc index 83a780adf..82b832967 100644 --- a/src/mobility/helper/mobility-helper.cc +++ b/src/mobility/helper/mobility-helper.cc @@ -29,10 +29,10 @@ #include "ns3/string.h" #include -NS_LOG_COMPONENT_DEFINE ("MobilityHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MobilityHelper"); + MobilityHelper::MobilityHelper () { m_position = CreateObjectWithAttributes diff --git a/src/mobility/helper/ns2-mobility-helper.cc b/src/mobility/helper/ns2-mobility-helper.cc index 0478eed52..ce8aa666d 100644 --- a/src/mobility/helper/ns2-mobility-helper.cc +++ b/src/mobility/helper/ns2-mobility-helper.cc @@ -49,10 +49,10 @@ #include "ns3/constant-velocity-mobility-model.h" #include "ns2-mobility-helper.h" -NS_LOG_COMPONENT_DEFINE ("Ns2MobilityHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ns2MobilityHelper"); + // Constants definitions #define NS2_AT "at" #define NS2_X_COORD "X_" diff --git a/src/mobility/model/constant-velocity-helper.cc b/src/mobility/model/constant-velocity-helper.cc index 229f73433..42c6f9467 100644 --- a/src/mobility/model/constant-velocity-helper.cc +++ b/src/mobility/model/constant-velocity-helper.cc @@ -23,10 +23,10 @@ #include "ns3/log.h" #include "constant-velocity-helper.h" -NS_LOG_COMPONENT_DEFINE ("ConstantVelocityHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ConstantVelocityHelper"); + ConstantVelocityHelper::ConstantVelocityHelper () : m_paused (true) { diff --git a/src/mobility/model/position-allocator.cc b/src/mobility/model/position-allocator.cc index 9582b6b6d..b5fb89543 100644 --- a/src/mobility/model/position-allocator.cc +++ b/src/mobility/model/position-allocator.cc @@ -26,10 +26,10 @@ #include "ns3/log.h" #include -NS_LOG_COMPONENT_DEFINE ("PositionAllocator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PositionAllocator"); + NS_OBJECT_ENSURE_REGISTERED (PositionAllocator); TypeId diff --git a/src/mobility/model/random-direction-2d-mobility-model.cc b/src/mobility/model/random-direction-2d-mobility-model.cc index 43d11b670..66b5a4183 100644 --- a/src/mobility/model/random-direction-2d-mobility-model.cc +++ b/src/mobility/model/random-direction-2d-mobility-model.cc @@ -25,10 +25,10 @@ #include "ns3/pointer.h" #include "random-direction-2d-mobility-model.h" -NS_LOG_COMPONENT_DEFINE ("RandomDirection2dMobilityModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RandomDirection2dMobilityModel"); + const double RandomDirection2dMobilityModel::PI = 3.14159265358979323846; NS_OBJECT_ENSURE_REGISTERED (RandomDirection2dMobilityModel); diff --git a/src/mobility/model/random-walk-2d-mobility-model.cc b/src/mobility/model/random-walk-2d-mobility-model.cc index dcadb3a95..babc5a071 100644 --- a/src/mobility/model/random-walk-2d-mobility-model.cc +++ b/src/mobility/model/random-walk-2d-mobility-model.cc @@ -26,10 +26,10 @@ #include "ns3/log.h" #include -NS_LOG_COMPONENT_DEFINE ("RandomWalk2d"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RandomWalk2d"); + NS_OBJECT_ENSURE_REGISTERED (RandomWalk2dMobilityModel); TypeId diff --git a/src/mobility/model/waypoint-mobility-model.cc b/src/mobility/model/waypoint-mobility-model.cc index 58f734ac2..9f1e9c7f2 100644 --- a/src/mobility/model/waypoint-mobility-model.cc +++ b/src/mobility/model/waypoint-mobility-model.cc @@ -27,10 +27,10 @@ #include "ns3/config.h" #include "ns3/test.h" -NS_LOG_COMPONENT_DEFINE ("WaypointMobilityModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WaypointMobilityModel"); + NS_OBJECT_ENSURE_REGISTERED (WaypointMobilityModel); diff --git a/src/mobility/test/ns2-mobility-helper-test-suite.cc b/src/mobility/test/ns2-mobility-helper-test-suite.cc index 6205ada5e..defec80ca 100644 --- a/src/mobility/test/ns2-mobility-helper-test-suite.cc +++ b/src/mobility/test/ns2-mobility-helper-test-suite.cc @@ -49,10 +49,10 @@ #include "ns3/config.h" #include "ns3/ns2-mobility-helper.h" -NS_LOG_COMPONENT_DEFINE ("ns2-mobility-helper-test-suite"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("ns2-mobility-helper-test-suite"); + // ----------------------------------------------------------------------------- // Testing // ----------------------------------------------------------------------------- diff --git a/src/mpi/model/distributed-simulator-impl.cc b/src/mpi/model/distributed-simulator-impl.cc index 1d8d9a908..2dbb79e28 100644 --- a/src/mpi/model/distributed-simulator-impl.cc +++ b/src/mpi/model/distributed-simulator-impl.cc @@ -37,10 +37,10 @@ #include #endif -NS_LOG_COMPONENT_DEFINE ("DistributedSimulatorImpl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DistributedSimulatorImpl"); + NS_OBJECT_ENSURE_REGISTERED (DistributedSimulatorImpl); LbtsMessage::~LbtsMessage () diff --git a/src/mpi/model/granted-time-window-mpi-interface.cc b/src/mpi/model/granted-time-window-mpi-interface.cc index 897c69b15..f425ea089 100644 --- a/src/mpi/model/granted-time-window-mpi-interface.cc +++ b/src/mpi/model/granted-time-window-mpi-interface.cc @@ -40,10 +40,9 @@ #include #endif -NS_LOG_COMPONENT_DEFINE ("GrantedTimeWindowMpiInterface"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GrantedTimeWindowMpiInterface"); SentBuffer::SentBuffer () { diff --git a/src/mpi/model/mpi-interface.cc b/src/mpi/model/mpi-interface.cc index 98c025c35..a501e2c24 100644 --- a/src/mpi/model/mpi-interface.cc +++ b/src/mpi/model/mpi-interface.cc @@ -28,10 +28,10 @@ #include "null-message-mpi-interface.h" #include "granted-time-window-mpi-interface.h" -NS_LOG_COMPONENT_DEFINE ("MpiInterface"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MpiInterface"); + ParallelCommunicationInterface* MpiInterface::g_parallelCommunicationInterface = 0; void diff --git a/src/mpi/model/null-message-mpi-interface.cc b/src/mpi/model/null-message-mpi-interface.cc index b14efa05b..e720aec3e 100644 --- a/src/mpi/model/null-message-mpi-interface.cc +++ b/src/mpi/model/null-message-mpi-interface.cc @@ -41,10 +41,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("NullMessageMpiInterface"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("NullMessageMpiInterface"); + /** * maximum MPI message size for easy * buffer creation diff --git a/src/mpi/model/null-message-simulator-impl.cc b/src/mpi/model/null-message-simulator-impl.cc index dfb01ab0e..c038634fc 100644 --- a/src/mpi/model/null-message-simulator-impl.cc +++ b/src/mpi/model/null-message-simulator-impl.cc @@ -42,10 +42,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("NullMessageSimulatorImpl"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("NullMessageSimulatorImpl"); + NS_OBJECT_ENSURE_REGISTERED (NullMessageSimulatorImpl); NullMessageSimulatorImpl* NullMessageSimulatorImpl::g_instance = 0; diff --git a/src/netanim/model/animation-interface.cc b/src/netanim/model/animation-interface.cc index 8b055283f..dd1cec4de 100644 --- a/src/netanim/model/animation-interface.cc +++ b/src/netanim/model/animation-interface.cc @@ -51,10 +51,10 @@ #include "ns3/ipv4-routing-protocol.h" #include "ns3/energy-source-container.h" -NS_LOG_COMPONENT_DEFINE ("AnimationInterface"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AnimationInterface"); + // Globals static bool initialized = false; diff --git a/src/network/helper/simple-net-device-helper.cc b/src/network/helper/simple-net-device-helper.cc index bcef97535..397ff7ed9 100644 --- a/src/network/helper/simple-net-device-helper.cc +++ b/src/network/helper/simple-net-device-helper.cc @@ -34,10 +34,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("SimpleNetDeviceHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SimpleNetDeviceHelper"); + SimpleNetDeviceHelper::SimpleNetDeviceHelper () { m_queueFactory.SetTypeId ("ns3::DropTailQueue"); diff --git a/src/network/helper/trace-helper.cc b/src/network/helper/trace-helper.cc index db52a9270..b0febe18d 100644 --- a/src/network/helper/trace-helper.cc +++ b/src/network/helper/trace-helper.cc @@ -31,10 +31,10 @@ #include "trace-helper.h" -NS_LOG_COMPONENT_DEFINE ("TraceHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TraceHelper"); + PcapHelper::PcapHelper () { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/network/model/address.cc b/src/network/model/address.cc index dd0720ced..efc900399 100644 --- a/src/network/model/address.cc +++ b/src/network/model/address.cc @@ -25,10 +25,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Address"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Address"); + Address::Address () : m_type (0), m_len (0) diff --git a/src/network/model/application.cc b/src/network/model/application.cc index 98719e6ec..8a44fb6fa 100644 --- a/src/network/model/application.cc +++ b/src/network/model/application.cc @@ -27,10 +27,10 @@ #include "ns3/nstime.h" #include "ns3/simulator.h" -NS_LOG_COMPONENT_DEFINE ("Application"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Application"); + NS_OBJECT_ENSURE_REGISTERED (Application); // Application Methods diff --git a/src/network/model/buffer.cc b/src/network/model/buffer.cc index d2e6ae1c8..6f4c8d37f 100644 --- a/src/network/model/buffer.cc +++ b/src/network/model/buffer.cc @@ -21,8 +21,6 @@ #include "ns3/assert.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Buffer"); - #define LOG_INTERNAL_STATE(y) \ NS_LOG_LOGIC (y << "start="< #include -NS_LOG_COMPONENT_DEFINE ("ByteTagList"); - #define USE_FREE_LIST 1 #define FREE_LIST_SIZE 1000 #define OFFSET_MAX (2147483647) namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ByteTagList"); + /** * \ingroup packet * diff --git a/src/network/model/channel-list.cc b/src/network/model/channel-list.cc index 0fb2246d7..a3af97291 100644 --- a/src/network/model/channel-list.cc +++ b/src/network/model/channel-list.cc @@ -24,10 +24,10 @@ #include "channel-list.h" #include "channel.h" -NS_LOG_COMPONENT_DEFINE ("ChannelList"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ChannelList"); + /** * \ingroup network * diff --git a/src/network/model/channel.cc b/src/network/model/channel.cc index 15f7c716b..f8cb25393 100644 --- a/src/network/model/channel.cc +++ b/src/network/model/channel.cc @@ -23,10 +23,10 @@ #include "ns3/log.h" #include "ns3/uinteger.h" -NS_LOG_COMPONENT_DEFINE ("Channel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Channel"); + NS_OBJECT_ENSURE_REGISTERED (Channel); TypeId diff --git a/src/network/model/header.cc b/src/network/model/header.cc index 39840a736..0ec2e3a62 100644 --- a/src/network/model/header.cc +++ b/src/network/model/header.cc @@ -1,10 +1,10 @@ #include "header.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Header"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Header"); + NS_OBJECT_ENSURE_REGISTERED (Header); Header::~Header () diff --git a/src/network/model/net-device.cc b/src/network/model/net-device.cc index 7fdca4123..e94bd3afc 100644 --- a/src/network/model/net-device.cc +++ b/src/network/model/net-device.cc @@ -23,10 +23,10 @@ #include "ns3/uinteger.h" #include "net-device.h" -NS_LOG_COMPONENT_DEFINE ("NetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("NetDevice"); + NS_OBJECT_ENSURE_REGISTERED (NetDevice); TypeId NetDevice::GetTypeId (void) diff --git a/src/network/model/nix-vector.cc b/src/network/model/nix-vector.cc index 3d022cb53..586cab50e 100644 --- a/src/network/model/nix-vector.cc +++ b/src/network/model/nix-vector.cc @@ -23,10 +23,10 @@ #include "nix-vector.h" -NS_LOG_COMPONENT_DEFINE ("NixVector"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("NixVector"); + typedef std::vector NixBits_t; //!< typedef for the nixVector NixVector::NixVector () diff --git a/src/network/model/node-list.cc b/src/network/model/node-list.cc index 71276f586..01f9f4642 100644 --- a/src/network/model/node-list.cc +++ b/src/network/model/node-list.cc @@ -27,10 +27,10 @@ #include "node-list.h" #include "node.h" -NS_LOG_COMPONENT_DEFINE ("NodeList"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("NodeList"); + /** * \ingroup network * \brief private implementation detail of the NodeList API. diff --git a/src/network/model/node.cc b/src/network/model/node.cc index aac28b915..082bcfb04 100644 --- a/src/network/model/node.cc +++ b/src/network/model/node.cc @@ -32,10 +32,10 @@ #include "ns3/boolean.h" #include "ns3/simulator.h" -NS_LOG_COMPONENT_DEFINE ("Node"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Node"); + NS_OBJECT_ENSURE_REGISTERED (Node); /** diff --git a/src/network/model/packet-metadata.cc b/src/network/model/packet-metadata.cc index 6185d5aeb..595a92f44 100644 --- a/src/network/model/packet-metadata.cc +++ b/src/network/model/packet-metadata.cc @@ -27,10 +27,10 @@ #include "header.h" #include "trailer.h" -NS_LOG_COMPONENT_DEFINE ("PacketMetadata"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketMetadata"); + bool PacketMetadata::m_enable = false; bool PacketMetadata::m_enableChecking = false; bool PacketMetadata::m_metadataSkipped = false; diff --git a/src/network/model/packet-tag-list.cc b/src/network/model/packet-tag-list.cc index aff200f63..3d27ff598 100644 --- a/src/network/model/packet-tag-list.cc +++ b/src/network/model/packet-tag-list.cc @@ -30,10 +30,10 @@ #include "ns3/log.h" #include -NS_LOG_COMPONENT_DEFINE ("PacketTagList"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketTagList"); + bool PacketTagList::COWTraverse (Tag & tag, PacketTagList::COWWriter Writer) { diff --git a/src/network/model/packet.cc b/src/network/model/packet.cc index 94a5150ff..c9b05331f 100644 --- a/src/network/model/packet.cc +++ b/src/network/model/packet.cc @@ -24,10 +24,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Packet"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Packet"); + uint32_t Packet::m_globalUid = 0; TypeId diff --git a/src/network/model/socket-factory.cc b/src/network/model/socket-factory.cc index 9c234e7ea..facec938c 100644 --- a/src/network/model/socket-factory.cc +++ b/src/network/model/socket-factory.cc @@ -20,10 +20,10 @@ #include "socket-factory.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("SocketFactory"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SocketFactory"); + NS_OBJECT_ENSURE_REGISTERED (SocketFactory); TypeId SocketFactory::GetTypeId (void) diff --git a/src/network/model/socket.cc b/src/network/model/socket.cc index 41503d5b8..cebe61034 100644 --- a/src/network/model/socket.cc +++ b/src/network/model/socket.cc @@ -27,10 +27,10 @@ #include "socket-factory.h" #include -NS_LOG_COMPONENT_DEFINE ("Socket"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Socket"); + NS_OBJECT_ENSURE_REGISTERED (Socket); TypeId diff --git a/src/network/model/tag-buffer.cc b/src/network/model/tag-buffer.cc index d8921e571..566d25669 100644 --- a/src/network/model/tag-buffer.cc +++ b/src/network/model/tag-buffer.cc @@ -22,10 +22,10 @@ #include "ns3/log.h" #include -NS_LOG_COMPONENT_DEFINE ("TagBuffer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TagBuffer"); + #ifndef TAG_BUFFER_USE_INLINE void diff --git a/src/network/model/trailer.cc b/src/network/model/trailer.cc index e66486e45..a6c18eacf 100644 --- a/src/network/model/trailer.cc +++ b/src/network/model/trailer.cc @@ -1,10 +1,10 @@ #include "trailer.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Trailer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Trailer"); + NS_OBJECT_ENSURE_REGISTERED (Trailer); Trailer::~Trailer () diff --git a/src/network/utils/address-utils.cc b/src/network/utils/address-utils.cc index c9c244395..d1ed713e1 100644 --- a/src/network/utils/address-utils.cc +++ b/src/network/utils/address-utils.cc @@ -21,10 +21,10 @@ #include "inet-socket-address.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("AddressUtils"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AddressUtils"); + void WriteTo (Buffer::Iterator &i, Ipv4Address ad) { NS_LOG_FUNCTION (&i << &ad); diff --git a/src/network/utils/data-rate.cc b/src/network/utils/data-rate.cc index 5423cab0c..6dda6d7af 100644 --- a/src/network/utils/data-rate.cc +++ b/src/network/utils/data-rate.cc @@ -23,10 +23,15 @@ #include "ns3/fatal-error.h" #include "ns3/log.h" +namespace ns3 { + NS_LOG_COMPONENT_DEFINE ("DataRate"); -static bool -DoParse (const std::string s, uint64_t *v) +ATTRIBUTE_HELPER_CPP (DataRate); //!< Macro to make help make data-rate an ns-3 attribute + +/* static */ +bool +DataRate::DoParse (const std::string s, uint64_t *v) { NS_LOG_FUNCTION (s << v); std::string::size_type n = s.find_first_not_of ("0123456789."); @@ -179,11 +184,6 @@ DoParse (const std::string s, uint64_t *v) return true; } - -namespace ns3 { - -ATTRIBUTE_HELPER_CPP (DataRate); //!< Macro to make help make data-rate an ns-3 attribute - DataRate::DataRate () : m_bps (0) { @@ -260,7 +260,7 @@ std::istream &operator >> (std::istream &is, DataRate &rate) std::string value; is >> value; uint64_t v; - bool ok = DoParse (value, &v); + bool ok = DataRate::DoParse (value, &v); if (!ok) { is.setstate (std::ios_base::failbit); diff --git a/src/network/utils/data-rate.h b/src/network/utils/data-rate.h index 32b837dd0..00313d3d2 100644 --- a/src/network/utils/data-rate.h +++ b/src/network/utils/data-rate.h @@ -159,6 +159,26 @@ public: uint64_t GetBitRate () const; private: + + /** + * \brief Parse a string representing a DataRate into an uint64_t + * + * Allowed unit representations include all combinations of + * + * * An SI prefix: k, K, M, G + * * Decimal or kibibit (as in "Kibps", meaning 1024 bps) + * * Bits or bytes (8 bits) + * * "bps" or "/s" + * + * \param [in] s The string representation, including unit + * \param [in,out] v The location to put the value, in bits/sec. + * \return true if parsing was successful. + */ + static bool DoParse (const std::string s, uint64_t *v); + + // Uses DoParse + friend std::istream &operator >> (std::istream &is, DataRate &rate); + uint64_t m_bps; //!< data rate [bps] }; diff --git a/src/network/utils/drop-tail-queue.cc b/src/network/utils/drop-tail-queue.cc index 95218c500..fe801e3fc 100644 --- a/src/network/utils/drop-tail-queue.cc +++ b/src/network/utils/drop-tail-queue.cc @@ -21,10 +21,10 @@ #include "ns3/uinteger.h" #include "drop-tail-queue.h" -NS_LOG_COMPONENT_DEFINE ("DropTailQueue"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DropTailQueue"); + NS_OBJECT_ENSURE_REGISTERED (DropTailQueue); TypeId DropTailQueue::GetTypeId (void) diff --git a/src/network/utils/error-model.cc b/src/network/utils/error-model.cc index 86010e6ed..0247a12ec 100644 --- a/src/network/utils/error-model.cc +++ b/src/network/utils/error-model.cc @@ -73,10 +73,10 @@ #include "ns3/string.h" #include "ns3/pointer.h" -NS_LOG_COMPONENT_DEFINE ("ErrorModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ErrorModel"); + NS_OBJECT_ENSURE_REGISTERED (ErrorModel); TypeId ErrorModel::GetTypeId (void) diff --git a/src/network/utils/ethernet-header.cc b/src/network/utils/ethernet-header.cc index 783baf06c..1af323e78 100644 --- a/src/network/utils/ethernet-header.cc +++ b/src/network/utils/ethernet-header.cc @@ -26,10 +26,10 @@ #include "ethernet-header.h" #include "address-utils.h" -NS_LOG_COMPONENT_DEFINE ("EthernetHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EthernetHeader"); + NS_OBJECT_ENSURE_REGISTERED (EthernetHeader); EthernetHeader::EthernetHeader (bool hasPreamble) diff --git a/src/network/utils/ethernet-trailer.cc b/src/network/utils/ethernet-trailer.cc index 8ab1fb31d..778417811 100644 --- a/src/network/utils/ethernet-trailer.cc +++ b/src/network/utils/ethernet-trailer.cc @@ -24,10 +24,10 @@ #include "ethernet-trailer.h" #include "crc32.h" -NS_LOG_COMPONENT_DEFINE ("EthernetTrailer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EthernetTrailer"); + NS_OBJECT_ENSURE_REGISTERED (EthernetTrailer); EthernetTrailer::EthernetTrailer () diff --git a/src/network/utils/flow-id-tag.cc b/src/network/utils/flow-id-tag.cc index 04dfb8b81..041453917 100644 --- a/src/network/utils/flow-id-tag.cc +++ b/src/network/utils/flow-id-tag.cc @@ -20,10 +20,10 @@ #include "flow-id-tag.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("FlowIdTag"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FlowIdTag"); + NS_OBJECT_ENSURE_REGISTERED (FlowIdTag); TypeId diff --git a/src/network/utils/inet-socket-address.cc b/src/network/utils/inet-socket-address.cc index ce1c08960..f678c455a 100644 --- a/src/network/utils/inet-socket-address.cc +++ b/src/network/utils/inet-socket-address.cc @@ -22,10 +22,10 @@ #include "ns3/assert.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("InetSocketAddress"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("InetSocketAddress"); + InetSocketAddress::InetSocketAddress (Ipv4Address ipv4, uint16_t port) : m_ipv4 (ipv4), m_port (port) diff --git a/src/network/utils/inet6-socket-address.cc b/src/network/utils/inet6-socket-address.cc index 988aaa858..80ec85e1f 100644 --- a/src/network/utils/inet6-socket-address.cc +++ b/src/network/utils/inet6-socket-address.cc @@ -22,11 +22,11 @@ #include "inet6-socket-address.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Inet6SocketAddress"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Inet6SocketAddress"); + Inet6SocketAddress::Inet6SocketAddress (Ipv6Address ipv6, uint16_t port) : m_ipv6 (ipv6), m_port (port) diff --git a/src/network/utils/ipv4-address.cc b/src/network/utils/ipv4-address.cc index fbb21a587..233a8e99a 100644 --- a/src/network/utils/ipv4-address.cc +++ b/src/network/utils/ipv4-address.cc @@ -23,10 +23,10 @@ #include "ipv4-address.h" #include "ns3/assert.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4Address"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4Address"); + #define ASCII_DOT (0x2e) #define ASCII_ZERO (0x30) #define ASCII_SLASH (0x2f) diff --git a/src/network/utils/ipv6-address.cc b/src/network/utils/ipv6-address.cc index be1b6fb28..d885aaf41 100644 --- a/src/network/utils/ipv6-address.cc +++ b/src/network/utils/ipv6-address.cc @@ -52,10 +52,10 @@ #include "mac64-address.h" #include "ipv6-address.h" -NS_LOG_COMPONENT_DEFINE ("Ipv6Address"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv6Address"); + #ifdef __cplusplus extern "C" { /* } */ diff --git a/src/network/utils/llc-snap-header.cc b/src/network/utils/llc-snap-header.cc index 1638b4b6d..43c349900 100644 --- a/src/network/utils/llc-snap-header.cc +++ b/src/network/utils/llc-snap-header.cc @@ -23,10 +23,10 @@ #include "ns3/log.h" #include -NS_LOG_COMPONENT_DEFINE ("LlcSnalHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("LlcSnalHeader"); + NS_OBJECT_ENSURE_REGISTERED (LlcSnapHeader); LlcSnapHeader::LlcSnapHeader () diff --git a/src/network/utils/mac16-address.cc b/src/network/utils/mac16-address.cc index 6b54ead3f..e4da6543a 100644 --- a/src/network/utils/mac16-address.cc +++ b/src/network/utils/mac16-address.cc @@ -26,10 +26,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Mac16Address"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Mac16Address"); + ATTRIBUTE_HELPER_CPP (Mac16Address); //!< Macro to make help make class an ns-3 attribute #define ASCII_a (0x41) diff --git a/src/network/utils/mac48-address.cc b/src/network/utils/mac48-address.cc index 50c12aeda..1bf339141 100644 --- a/src/network/utils/mac48-address.cc +++ b/src/network/utils/mac48-address.cc @@ -25,10 +25,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Mac48Address"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Mac48Address"); + ATTRIBUTE_HELPER_CPP (Mac48Address); //!< Macro to make help make class an ns-3 attribute #define ASCII_a (0x41) diff --git a/src/network/utils/mac64-address.cc b/src/network/utils/mac64-address.cc index 40f1ab5cd..98aea75e9 100644 --- a/src/network/utils/mac64-address.cc +++ b/src/network/utils/mac64-address.cc @@ -25,10 +25,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("Mac64Address"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Mac64Address"); + ATTRIBUTE_HELPER_CPP (Mac64Address); //!< Macro to make help make class an ns-3 attribute #define ASCII_a (0x41) diff --git a/src/network/utils/output-stream-wrapper.cc b/src/network/utils/output-stream-wrapper.cc index f6b8bccc1..4a9075ac1 100644 --- a/src/network/utils/output-stream-wrapper.cc +++ b/src/network/utils/output-stream-wrapper.cc @@ -22,10 +22,10 @@ #include "ns3/abort.h" #include -NS_LOG_COMPONENT_DEFINE ("OutputStreamWrapper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("OutputStreamWrapper"); + OutputStreamWrapper::OutputStreamWrapper (std::string filename, std::ios::openmode filemode) : m_destroyable (true) { diff --git a/src/network/utils/packet-burst.cc b/src/network/utils/packet-burst.cc index 4785fd913..43a09599c 100644 --- a/src/network/utils/packet-burst.cc +++ b/src/network/utils/packet-burst.cc @@ -24,10 +24,10 @@ #include "packet-burst.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("PacketBurst"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketBurst"); + NS_OBJECT_ENSURE_REGISTERED (PacketBurst); TypeId diff --git a/src/network/utils/packet-data-calculators.cc b/src/network/utils/packet-data-calculators.cc index 1b936d686..fd0f55be2 100644 --- a/src/network/utils/packet-data-calculators.cc +++ b/src/network/utils/packet-data-calculators.cc @@ -29,7 +29,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("PacketDataCalculators"); - //-------------------------------------------------------------- //---------------------------------------------- PacketCounterCalculator::PacketCounterCalculator() diff --git a/src/network/utils/packet-probe.cc b/src/network/utils/packet-probe.cc index 2d6de134d..e1e14bc9d 100644 --- a/src/network/utils/packet-probe.cc +++ b/src/network/utils/packet-probe.cc @@ -28,10 +28,10 @@ #include "ns3/config.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("PacketProbe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketProbe"); + NS_OBJECT_ENSURE_REGISTERED (PacketProbe); TypeId diff --git a/src/network/utils/packet-socket-address.cc b/src/network/utils/packet-socket-address.cc index 98d4a197b..6be4eeff4 100644 --- a/src/network/utils/packet-socket-address.cc +++ b/src/network/utils/packet-socket-address.cc @@ -21,10 +21,10 @@ #include "ns3/net-device.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("PacketSocketAddress"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketSocketAddress"); + PacketSocketAddress::PacketSocketAddress () { NS_LOG_FUNCTION (this); diff --git a/src/network/utils/packet-socket-client.cc b/src/network/utils/packet-socket-client.cc index 73c47bcfc..da17860b2 100644 --- a/src/network/utils/packet-socket-client.cc +++ b/src/network/utils/packet-socket-client.cc @@ -33,10 +33,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("PacketSocketClient"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketSocketClient"); + NS_OBJECT_ENSURE_REGISTERED (PacketSocketClient); TypeId diff --git a/src/network/utils/packet-socket-factory.cc b/src/network/utils/packet-socket-factory.cc index 908e69da9..d139e77bc 100644 --- a/src/network/utils/packet-socket-factory.cc +++ b/src/network/utils/packet-socket-factory.cc @@ -22,10 +22,10 @@ #include "ns3/log.h" #include "packet-socket.h" -NS_LOG_COMPONENT_DEFINE ("PacketSocketFactory"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketSocketFactory"); + NS_OBJECT_ENSURE_REGISTERED (PacketSocketFactory); TypeId diff --git a/src/network/utils/packet-socket-server.cc b/src/network/utils/packet-socket-server.cc index 729c50cc4..12c610517 100644 --- a/src/network/utils/packet-socket-server.cc +++ b/src/network/utils/packet-socket-server.cc @@ -33,10 +33,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("PacketSocketServer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketSocketServer"); + NS_OBJECT_ENSURE_REGISTERED (PacketSocketServer); TypeId diff --git a/src/network/utils/packet-socket.cc b/src/network/utils/packet-socket.cc index b8d81edc8..e086b18d5 100644 --- a/src/network/utils/packet-socket.cc +++ b/src/network/utils/packet-socket.cc @@ -29,10 +29,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("PacketSocket"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketSocket"); + NS_OBJECT_ENSURE_REGISTERED (PacketSocket); TypeId diff --git a/src/network/utils/packetbb.cc b/src/network/utils/packetbb.cc index b228b2c08..0a0dca720 100644 --- a/src/network/utils/packetbb.cc +++ b/src/network/utils/packetbb.cc @@ -28,8 +28,6 @@ #include "ns3/log.h" #include "packetbb.h" -NS_LOG_COMPONENT_DEFINE ("PacketBB"); - static const uint8_t VERSION = 0; /* Packet flags */ static const uint8_t PHAS_SEQ_NUM = 0x8; @@ -58,6 +56,8 @@ static const uint8_t TIS_MULTIVALUE = 0x04; namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PacketBB"); + NS_OBJECT_ENSURE_REGISTERED (PbbPacket); PbbTlvBlock::PbbTlvBlock (void) diff --git a/src/network/utils/pcap-file-wrapper.cc b/src/network/utils/pcap-file-wrapper.cc index 542287c61..5ffe5056e 100644 --- a/src/network/utils/pcap-file-wrapper.cc +++ b/src/network/utils/pcap-file-wrapper.cc @@ -22,10 +22,10 @@ #include "ns3/header.h" #include "pcap-file-wrapper.h" -NS_LOG_COMPONENT_DEFINE ("PcapFileWrapper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PcapFileWrapper"); + NS_OBJECT_ENSURE_REGISTERED (PcapFileWrapper); TypeId diff --git a/src/network/utils/pcap-file.cc b/src/network/utils/pcap-file.cc index 9ae13a1e7..f14784c85 100644 --- a/src/network/utils/pcap-file.cc +++ b/src/network/utils/pcap-file.cc @@ -33,10 +33,10 @@ // adding any ns-3 specific constructs such as Packet to this file. // -NS_LOG_COMPONENT_DEFINE ("PcapFile"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PcapFile"); + const uint32_t MAGIC = 0xa1b2c3d4; /**< Magic number identifying standard pcap file format */ const uint32_t SWAPPED_MAGIC = 0xd4c3b2a1; /**< Looks this way if byte swapping is required */ diff --git a/src/network/utils/queue.cc b/src/network/utils/queue.cc index 26711f37d..292addaae 100644 --- a/src/network/utils/queue.cc +++ b/src/network/utils/queue.cc @@ -20,10 +20,10 @@ #include "ns3/trace-source-accessor.h" #include "queue.h" -NS_LOG_COMPONENT_DEFINE ("Queue"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Queue"); + NS_OBJECT_ENSURE_REGISTERED (Queue); TypeId diff --git a/src/network/utils/radiotap-header.cc b/src/network/utils/radiotap-header.cc index 839bf6d56..ad55a9e50 100644 --- a/src/network/utils/radiotap-header.cc +++ b/src/network/utils/radiotap-header.cc @@ -23,10 +23,10 @@ #include "ns3/log.h" #include "radiotap-header.h" -NS_LOG_COMPONENT_DEFINE ("RadiotapHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RadiotapHeader"); + NS_OBJECT_ENSURE_REGISTERED (RadiotapHeader); RadiotapHeader::RadiotapHeader() diff --git a/src/network/utils/red-queue.cc b/src/network/utils/red-queue.cc index 4e7774223..f57d76ebd 100644 --- a/src/network/utils/red-queue.cc +++ b/src/network/utils/red-queue.cc @@ -65,10 +65,10 @@ #include "ns3/random-variable-stream.h" #include "red-queue.h" -NS_LOG_COMPONENT_DEFINE ("RedQueue"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RedQueue"); + NS_OBJECT_ENSURE_REGISTERED (RedQueue); TypeId RedQueue::GetTypeId (void) diff --git a/src/network/utils/simple-channel.cc b/src/network/utils/simple-channel.cc index cd94d3476..b2aa2eb61 100644 --- a/src/network/utils/simple-channel.cc +++ b/src/network/utils/simple-channel.cc @@ -24,10 +24,10 @@ #include "ns3/node.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("SimpleChannel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SimpleChannel"); + NS_OBJECT_ENSURE_REGISTERED (SimpleChannel); TypeId diff --git a/src/network/utils/simple-net-device.cc b/src/network/utils/simple-net-device.cc index 6f9e43220..fe54b8472 100644 --- a/src/network/utils/simple-net-device.cc +++ b/src/network/utils/simple-net-device.cc @@ -30,10 +30,10 @@ #include "ns3/simulator.h" #include "ns3/drop-tail-queue.h" -NS_LOG_COMPONENT_DEFINE ("SimpleNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SimpleNetDevice"); + /** * \brief Internal tag to store source, destination and protocol of each packet. */ diff --git a/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc b/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc index 8706c51a0..e64c4a9da 100644 --- a/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc +++ b/src/nix-vector-routing/model/ipv4-nix-vector-routing.cc @@ -28,10 +28,10 @@ #include "ipv4-nix-vector-routing.h" -NS_LOG_COMPONENT_DEFINE ("Ipv4NixVectorRouting"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Ipv4NixVectorRouting"); + NS_OBJECT_ENSURE_REGISTERED (Ipv4NixVectorRouting); TypeId diff --git a/src/olsr/examples/olsr-hna.cc b/src/olsr/examples/olsr-hna.cc index c2fc2a229..0de926cb2 100644 --- a/src/olsr/examples/olsr-hna.cc +++ b/src/olsr/examples/olsr-hna.cc @@ -65,10 +65,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("OlsrHna"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("OlsrHna"); + void ReceivePacket (Ptr socket) { NS_LOG_UNCOND ("Received one packet!"); diff --git a/src/olsr/model/olsr-header.cc b/src/olsr/model/olsr-header.cc index fa5db6eff..21fe3b6f2 100644 --- a/src/olsr/model/olsr-header.cc +++ b/src/olsr/model/olsr-header.cc @@ -30,11 +30,12 @@ #define OLSR_PKT_HEADER_SIZE 4 namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("OlsrHeader"); + namespace olsr { -NS_LOG_COMPONENT_DEFINE ("OlsrHeader"); - /// Scaling factor used in RFC 3626. #define OLSR_C 0.0625 diff --git a/src/olsr/model/olsr-routing-protocol.cc b/src/olsr/model/olsr-routing-protocol.cc index 6e694e34f..c0d6b2c0c 100644 --- a/src/olsr/model/olsr-routing-protocol.cc +++ b/src/olsr/model/olsr-routing-protocol.cc @@ -139,10 +139,10 @@ namespace ns3 { -namespace olsr { NS_LOG_COMPONENT_DEFINE ("OlsrRoutingProtocol"); - + +namespace olsr { /********** OLSR class **********/ diff --git a/src/openflow/helper/openflow-switch-helper.cc b/src/openflow/helper/openflow-switch-helper.cc index f78c34006..21b9b7ee3 100644 --- a/src/openflow/helper/openflow-switch-helper.cc +++ b/src/openflow/helper/openflow-switch-helper.cc @@ -26,10 +26,10 @@ #include "ns3/node.h" #include "ns3/names.h" -NS_LOG_COMPONENT_DEFINE ("OpenFlowSwitchHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("OpenFlowSwitchHelper"); + OpenFlowSwitchHelper::OpenFlowSwitchHelper () { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/openflow/model/openflow-interface.cc b/src/openflow/model/openflow-interface.cc index 1becf76bd..834ae9d27 100644 --- a/src/openflow/model/openflow-interface.cc +++ b/src/openflow/model/openflow-interface.cc @@ -22,10 +22,10 @@ namespace ns3 { -namespace ofi { - NS_LOG_COMPONENT_DEFINE ("OpenFlowInterface"); +namespace ofi { + Stats::Stats (ofp_stats_types _type, size_t body_len) { type = _type; diff --git a/src/openflow/model/openflow-switch-net-device.cc b/src/openflow/model/openflow-switch-net-device.cc index b21a52447..e6067bcc3 100644 --- a/src/openflow/model/openflow-switch-net-device.cc +++ b/src/openflow/model/openflow-switch-net-device.cc @@ -21,10 +21,10 @@ #include "ns3/udp-l4-protocol.h" #include "ns3/tcp-l4-protocol.h" -NS_LOG_COMPONENT_DEFINE ("OpenFlowSwitchNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("OpenFlowSwitchNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (OpenFlowSwitchNetDevice); const char * diff --git a/src/point-to-point-layout/model/point-to-point-dumbbell.cc b/src/point-to-point-layout/model/point-to-point-dumbbell.cc index 88c7f46e1..e88facd27 100644 --- a/src/point-to-point-layout/model/point-to-point-dumbbell.cc +++ b/src/point-to-point-layout/model/point-to-point-dumbbell.cc @@ -32,10 +32,10 @@ #include "ns3/vector.h" #include "ns3/ipv6-address-generator.h" -NS_LOG_COMPONENT_DEFINE ("PointToPointDumbbellHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PointToPointDumbbellHelper"); + PointToPointDumbbellHelper::PointToPointDumbbellHelper (uint32_t nLeftLeaf, PointToPointHelper leftHelper, uint32_t nRightLeaf, diff --git a/src/point-to-point-layout/model/point-to-point-grid.cc b/src/point-to-point-layout/model/point-to-point-grid.cc index 19549861a..88a48400b 100644 --- a/src/point-to-point-layout/model/point-to-point-grid.cc +++ b/src/point-to-point-layout/model/point-to-point-grid.cc @@ -25,10 +25,10 @@ #include "ns3/log.h" #include "ns3/ipv6-address-generator.h" -NS_LOG_COMPONENT_DEFINE ("PointToPointGridHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PointToPointGridHelper"); + PointToPointGridHelper::PointToPointGridHelper (uint32_t nRows, uint32_t nCols, PointToPointHelper pointToPoint) diff --git a/src/point-to-point-layout/model/point-to-point-star.cc b/src/point-to-point-layout/model/point-to-point-star.cc index a696f29ff..7b040d202 100644 --- a/src/point-to-point-layout/model/point-to-point-star.cc +++ b/src/point-to-point-layout/model/point-to-point-star.cc @@ -28,10 +28,10 @@ #include "ns3/vector.h" #include "ns3/ipv6-address-generator.h" -NS_LOG_COMPONENT_DEFINE ("PointToPointStarHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PointToPointStarHelper"); + PointToPointStarHelper::PointToPointStarHelper (uint32_t numSpokes, PointToPointHelper p2pHelper) { diff --git a/src/point-to-point/helper/point-to-point-helper.cc b/src/point-to-point/helper/point-to-point-helper.cc index 1bd25ccd2..4b9b54263 100644 --- a/src/point-to-point/helper/point-to-point-helper.cc +++ b/src/point-to-point/helper/point-to-point-helper.cc @@ -34,10 +34,10 @@ #include "ns3/trace-helper.h" #include "point-to-point-helper.h" -NS_LOG_COMPONENT_DEFINE ("PointToPointHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PointToPointHelper"); + PointToPointHelper::PointToPointHelper () { m_queueFactory.SetTypeId ("ns3::DropTailQueue"); diff --git a/src/point-to-point/model/point-to-point-channel.cc b/src/point-to-point/model/point-to-point-channel.cc index d6a69386a..502002688 100644 --- a/src/point-to-point/model/point-to-point-channel.cc +++ b/src/point-to-point/model/point-to-point-channel.cc @@ -23,10 +23,10 @@ #include "ns3/simulator.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("PointToPointChannel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PointToPointChannel"); + NS_OBJECT_ENSURE_REGISTERED (PointToPointChannel); TypeId diff --git a/src/point-to-point/model/point-to-point-net-device.cc b/src/point-to-point/model/point-to-point-net-device.cc index f689ba3da..f7afeb5ef 100644 --- a/src/point-to-point/model/point-to-point-net-device.cc +++ b/src/point-to-point/model/point-to-point-net-device.cc @@ -29,10 +29,10 @@ #include "point-to-point-channel.h" #include "ppp-header.h" -NS_LOG_COMPONENT_DEFINE ("PointToPointNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PointToPointNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (PointToPointNetDevice); TypeId diff --git a/src/point-to-point/model/point-to-point-remote-channel.cc b/src/point-to-point/model/point-to-point-remote-channel.cc index 4c982ac67..316e3a2a5 100644 --- a/src/point-to-point/model/point-to-point-remote-channel.cc +++ b/src/point-to-point/model/point-to-point-remote-channel.cc @@ -27,10 +27,10 @@ #include "ns3/log.h" #include "ns3/mpi-interface.h" -NS_LOG_COMPONENT_DEFINE ("PointToPointRemoteChannel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PointToPointRemoteChannel"); + NS_OBJECT_ENSURE_REGISTERED (PointToPointRemoteChannel); TypeId diff --git a/src/point-to-point/model/ppp-header.cc b/src/point-to-point/model/ppp-header.cc index 4650fb069..ed6c20537 100644 --- a/src/point-to-point/model/ppp-header.cc +++ b/src/point-to-point/model/ppp-header.cc @@ -23,10 +23,10 @@ #include "ns3/header.h" #include "ppp-header.h" -NS_LOG_COMPONENT_DEFINE ("PppHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PppHeader"); + NS_OBJECT_ENSURE_REGISTERED (PppHeader); PppHeader::PppHeader () diff --git a/src/propagation/model/cost231-propagation-loss-model.cc b/src/propagation/model/cost231-propagation-loss-model.cc index 00001b629..f60500c77 100644 --- a/src/propagation/model/cost231-propagation-loss-model.cc +++ b/src/propagation/model/cost231-propagation-loss-model.cc @@ -27,10 +27,10 @@ #include #include "cost231-propagation-loss-model.h" -NS_LOG_COMPONENT_DEFINE ("Cost231PropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Cost231PropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (Cost231PropagationLossModel); TypeId diff --git a/src/propagation/model/itu-r-1411-los-propagation-loss-model.cc b/src/propagation/model/itu-r-1411-los-propagation-loss-model.cc index 04670728c..42fd508b8 100644 --- a/src/propagation/model/itu-r-1411-los-propagation-loss-model.cc +++ b/src/propagation/model/itu-r-1411-los-propagation-loss-model.cc @@ -27,10 +27,10 @@ #include "itu-r-1411-los-propagation-loss-model.h" -NS_LOG_COMPONENT_DEFINE ("ItuR1411LosPropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ItuR1411LosPropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (ItuR1411LosPropagationLossModel); TypeId diff --git a/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc b/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc index ca6093894..8dd9d54af 100644 --- a/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc +++ b/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc @@ -27,10 +27,10 @@ #include "itu-r-1411-nlos-over-rooftop-propagation-loss-model.h" -NS_LOG_COMPONENT_DEFINE ("ItuR1411NlosOverRooftopPropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ItuR1411NlosOverRooftopPropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (ItuR1411NlosOverRooftopPropagationLossModel); diff --git a/src/propagation/model/jakes-process.cc b/src/propagation/model/jakes-process.cc index 3012df5a7..65ebe7e2f 100644 --- a/src/propagation/model/jakes-process.cc +++ b/src/propagation/model/jakes-process.cc @@ -26,10 +26,10 @@ #include "propagation-loss-model.h" #include "jakes-propagation-loss-model.h" -NS_LOG_COMPONENT_DEFINE ("JakesProcess"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("JakesProcess"); + /// Represents a single oscillator JakesProcess::Oscillator::Oscillator (std::complex amplitude, double initialPhase, double omega) : m_amplitude (amplitude), diff --git a/src/propagation/model/jakes-propagation-loss-model.cc b/src/propagation/model/jakes-propagation-loss-model.cc index eba42c84a..93820da4f 100644 --- a/src/propagation/model/jakes-propagation-loss-model.cc +++ b/src/propagation/model/jakes-propagation-loss-model.cc @@ -22,10 +22,11 @@ #include "ns3/double.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Jakes"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("Jakes"); + NS_OBJECT_ENSURE_REGISTERED (JakesPropagationLossModel); diff --git a/src/propagation/model/kun-2600-mhz-propagation-loss-model.cc b/src/propagation/model/kun-2600-mhz-propagation-loss-model.cc index 376fc2088..02d0ea1c1 100644 --- a/src/propagation/model/kun-2600-mhz-propagation-loss-model.cc +++ b/src/propagation/model/kun-2600-mhz-propagation-loss-model.cc @@ -27,10 +27,10 @@ #include "kun-2600-mhz-propagation-loss-model.h" -NS_LOG_COMPONENT_DEFINE ("Kun2600MhzPropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Kun2600MhzPropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (Kun2600MhzPropagationLossModel); diff --git a/src/propagation/model/okumura-hata-propagation-loss-model.cc b/src/propagation/model/okumura-hata-propagation-loss-model.cc index 87db11ccd..ff4aaebef 100644 --- a/src/propagation/model/okumura-hata-propagation-loss-model.cc +++ b/src/propagation/model/okumura-hata-propagation-loss-model.cc @@ -27,10 +27,10 @@ #include "okumura-hata-propagation-loss-model.h" -NS_LOG_COMPONENT_DEFINE ("OkumuraHataPropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("OkumuraHataPropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (OkumuraHataPropagationLossModel); diff --git a/src/propagation/model/propagation-loss-model.cc b/src/propagation/model/propagation-loss-model.cc index dc56736f0..80a03ac52 100644 --- a/src/propagation/model/propagation-loss-model.cc +++ b/src/propagation/model/propagation-loss-model.cc @@ -30,10 +30,10 @@ #include "ns3/pointer.h" #include -NS_LOG_COMPONENT_DEFINE ("PropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("PropagationLossModel"); + // ------------------------------------------------------------------------- // NS_OBJECT_ENSURE_REGISTERED (PropagationLossModel); diff --git a/src/propagation/test/itu-r-1411-los-test-suite.cc b/src/propagation/test/itu-r-1411-los-test-suite.cc index 5601ce255..ea082ba3d 100644 --- a/src/propagation/test/itu-r-1411-los-test-suite.cc +++ b/src/propagation/test/itu-r-1411-los-test-suite.cc @@ -33,7 +33,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("ItuR1411LosPropagationLossModelTest"); - class ItuR1411LosPropagationLossModelTestCase : public TestCase { public: diff --git a/src/propagation/test/itu-r-1411-nlos-over-rooftop-test-suite.cc b/src/propagation/test/itu-r-1411-nlos-over-rooftop-test-suite.cc index 8e79f9eab..dec744b7f 100644 --- a/src/propagation/test/itu-r-1411-nlos-over-rooftop-test-suite.cc +++ b/src/propagation/test/itu-r-1411-nlos-over-rooftop-test-suite.cc @@ -33,7 +33,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("ItuR1411NlosOverRooftopPropagationLossModelTest"); - class ItuR1411NlosOverRooftopPropagationLossModelTestCase : public TestCase { public: diff --git a/src/propagation/test/kun-2600-mhz-test-suite.cc b/src/propagation/test/kun-2600-mhz-test-suite.cc index ddc2209eb..9f5b47c3d 100644 --- a/src/propagation/test/kun-2600-mhz-test-suite.cc +++ b/src/propagation/test/kun-2600-mhz-test-suite.cc @@ -33,7 +33,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("Kun2600MhzPropagationLossModelTest"); - class Kun2600MhzPropagationLossModelTestCase : public TestCase { public: diff --git a/src/propagation/test/okumura-hata-test-suite.cc b/src/propagation/test/okumura-hata-test-suite.cc index b4f5a0ed9..5714796be 100644 --- a/src/propagation/test/okumura-hata-test-suite.cc +++ b/src/propagation/test/okumura-hata-test-suite.cc @@ -33,7 +33,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("OkumuraHataPropagationLossModelTest"); - class OkumuraHataPropagationLossModelTestCase : public TestCase { public: diff --git a/src/sixlowpan/helper/sixlowpan-helper.cc b/src/sixlowpan/helper/sixlowpan-helper.cc index eebc0fa1b..2666eb9c0 100644 --- a/src/sixlowpan/helper/sixlowpan-helper.cc +++ b/src/sixlowpan/helper/sixlowpan-helper.cc @@ -24,10 +24,10 @@ #include "ns3/node.h" #include "ns3/names.h" -NS_LOG_COMPONENT_DEFINE ("SixLowPanHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SixLowPanHelper"); + SixLowPanHelper::SixLowPanHelper () { NS_LOG_FUNCTION (this); diff --git a/src/sixlowpan/model/sixlowpan-net-device.cc b/src/sixlowpan/model/sixlowpan-net-device.cc index c2b2bf3a3..4abbf4f41 100644 --- a/src/sixlowpan/model/sixlowpan-net-device.cc +++ b/src/sixlowpan/model/sixlowpan-net-device.cc @@ -41,10 +41,10 @@ #include "sixlowpan-net-device.h" #include "sixlowpan-header.h" -NS_LOG_COMPONENT_DEFINE ("SixLowPanNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SixLowPanNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (SixLowPanNetDevice); TypeId SixLowPanNetDevice::GetTypeId (void) diff --git a/src/sixlowpan/test/error-channel-sixlow.cc b/src/sixlowpan/test/error-channel-sixlow.cc index 4839d1bda..70207354b 100644 --- a/src/sixlowpan/test/error-channel-sixlow.cc +++ b/src/sixlowpan/test/error-channel-sixlow.cc @@ -24,10 +24,10 @@ #include "ns3/node.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("ErrorChannelSixlow"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ErrorChannelSixlow"); + NS_OBJECT_ENSURE_REGISTERED (ErrorChannelSixlow); TypeId diff --git a/src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model.cc b/src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model.cc index e2c3d7b5f..01b0a732e 100644 --- a/src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model.cc +++ b/src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model.cc @@ -41,10 +41,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("TestAdhocOfdmAloha"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("TestAdhocOfdmAloha"); + static bool g_verbose = false; static uint64_t g_rxBytes; diff --git a/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc b/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc index dea96975a..9e89f1e13 100644 --- a/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc +++ b/src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven.cc @@ -43,10 +43,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("OfdmWithWaveformGenerator"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("OfdmWithWaveformGenerator"); + static bool g_verbose = false; diff --git a/src/spectrum/examples/adhoc-aloha-ideal-phy.cc b/src/spectrum/examples/adhoc-aloha-ideal-phy.cc index ead0b4685..839b13dce 100644 --- a/src/spectrum/examples/adhoc-aloha-ideal-phy.cc +++ b/src/spectrum/examples/adhoc-aloha-ideal-phy.cc @@ -39,10 +39,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("TestAdhocOfdmAloha"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("TestAdhocOfdmAloha"); + static bool g_verbose = false; void diff --git a/src/spectrum/helper/adhoc-aloha-noack-ideal-phy-helper.cc b/src/spectrum/helper/adhoc-aloha-noack-ideal-phy-helper.cc index 4111d8bda..196a16c01 100644 --- a/src/spectrum/helper/adhoc-aloha-noack-ideal-phy-helper.cc +++ b/src/spectrum/helper/adhoc-aloha-noack-ideal-phy-helper.cc @@ -34,10 +34,9 @@ -NS_LOG_COMPONENT_DEFINE ("AdhocAlohaNoackIdealPhyHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AdhocAlohaNoackIdealPhyHelper"); AdhocAlohaNoackIdealPhyHelper::AdhocAlohaNoackIdealPhyHelper () { diff --git a/src/spectrum/helper/spectrum-analyzer-helper.cc b/src/spectrum/helper/spectrum-analyzer-helper.cc index aea386fdc..449bb046b 100644 --- a/src/spectrum/helper/spectrum-analyzer-helper.cc +++ b/src/spectrum/helper/spectrum-analyzer-helper.cc @@ -35,10 +35,9 @@ -NS_LOG_COMPONENT_DEFINE ("SpectrumAnalyzerHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SpectrumAnalyzerHelper"); static void WriteAveragePowerSpectralDensityReport (Ptr streamWrapper, diff --git a/src/spectrum/helper/waveform-generator-helper.cc b/src/spectrum/helper/waveform-generator-helper.cc index 7fe6e44a3..11fc48c0d 100644 --- a/src/spectrum/helper/waveform-generator-helper.cc +++ b/src/spectrum/helper/waveform-generator-helper.cc @@ -33,10 +33,9 @@ -NS_LOG_COMPONENT_DEFINE ("WaveformGeneratorHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WaveformGeneratorHelper"); WaveformGeneratorHelper::WaveformGeneratorHelper () { diff --git a/src/spectrum/model/aloha-noack-mac-header.cc b/src/spectrum/model/aloha-noack-mac-header.cc index 0fa11df62..406d0ff53 100644 --- a/src/spectrum/model/aloha-noack-mac-header.cc +++ b/src/spectrum/model/aloha-noack-mac-header.cc @@ -22,10 +22,10 @@ #include "aloha-noack-mac-header.h" -NS_LOG_COMPONENT_DEFINE ("AlohaNoackMacHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AlohaNoackMacHeader"); + NS_OBJECT_ENSURE_REGISTERED (AlohaNoackMacHeader); TypeId diff --git a/src/spectrum/model/aloha-noack-net-device.cc b/src/spectrum/model/aloha-noack-net-device.cc index c7ecbcc28..1bf787837 100644 --- a/src/spectrum/model/aloha-noack-net-device.cc +++ b/src/spectrum/model/aloha-noack-net-device.cc @@ -31,11 +31,9 @@ #include "aloha-noack-net-device.h" #include "ns3/llc-snap-header.h" -NS_LOG_COMPONENT_DEFINE ("AlohaNoackNetDevice"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AlohaNoackNetDevice"); std::ostream& operator<< (std::ostream& os, AlohaNoackNetDevice::State state) { diff --git a/src/spectrum/model/constant-spectrum-propagation-loss.cc b/src/spectrum/model/constant-spectrum-propagation-loss.cc index f100bd0ab..2c51aedb3 100644 --- a/src/spectrum/model/constant-spectrum-propagation-loss.cc +++ b/src/spectrum/model/constant-spectrum-propagation-loss.cc @@ -26,10 +26,9 @@ #include "ns3/double.h" -NS_LOG_COMPONENT_DEFINE ("ConstantSpectrumPropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ConstantSpectrumPropagationLossModel"); NS_OBJECT_ENSURE_REGISTERED (ConstantSpectrumPropagationLossModel); diff --git a/src/spectrum/model/half-duplex-ideal-phy-signal-parameters.cc b/src/spectrum/model/half-duplex-ideal-phy-signal-parameters.cc index 92be9a801..4d64187c8 100644 --- a/src/spectrum/model/half-duplex-ideal-phy-signal-parameters.cc +++ b/src/spectrum/model/half-duplex-ideal-phy-signal-parameters.cc @@ -23,10 +23,10 @@ #include "half-duplex-ideal-phy-signal-parameters.h" -NS_LOG_COMPONENT_DEFINE ("HalfDuplexIdealPhySignalParameters"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("HalfDuplexIdealPhySignalParameters"); + HalfDuplexIdealPhySignalParameters::HalfDuplexIdealPhySignalParameters () { NS_LOG_FUNCTION (this); diff --git a/src/spectrum/model/half-duplex-ideal-phy.cc b/src/spectrum/model/half-duplex-ideal-phy.cc index d377b8794..5b2dbae1f 100644 --- a/src/spectrum/model/half-duplex-ideal-phy.cc +++ b/src/spectrum/model/half-duplex-ideal-phy.cc @@ -32,10 +32,10 @@ #include "spectrum-error-model.h" -NS_LOG_COMPONENT_DEFINE ("HalfDuplexIdealPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("HalfDuplexIdealPhy"); + NS_OBJECT_ENSURE_REGISTERED (HalfDuplexIdealPhy); HalfDuplexIdealPhy::HalfDuplexIdealPhy () diff --git a/src/spectrum/model/microwave-oven-spectrum-value-helper.cc b/src/spectrum/model/microwave-oven-spectrum-value-helper.cc index f5abd665a..e8d7e1219 100644 --- a/src/spectrum/model/microwave-oven-spectrum-value-helper.cc +++ b/src/spectrum/model/microwave-oven-spectrum-value-helper.cc @@ -21,10 +21,9 @@ #include "ns3/log.h" #include "microwave-oven-spectrum-value-helper.h" -NS_LOG_COMPONENT_DEFINE ("MicrowaveOvenSpectrumValue"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MicrowaveOvenSpectrumValue"); static Ptr g_MicrowaveOvenSpectrumModel5Mhz; static Ptr g_MicrowaveOvenSpectrumModel6Mhz; diff --git a/src/spectrum/model/multi-model-spectrum-channel.cc b/src/spectrum/model/multi-model-spectrum-channel.cc index da4125ad5..cee569b3b 100644 --- a/src/spectrum/model/multi-model-spectrum-channel.cc +++ b/src/spectrum/model/multi-model-spectrum-channel.cc @@ -39,11 +39,9 @@ #include "multi-model-spectrum-channel.h" -NS_LOG_COMPONENT_DEFINE ("MultiModelSpectrumChannel"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MultiModelSpectrumChannel"); NS_OBJECT_ENSURE_REGISTERED (MultiModelSpectrumChannel); diff --git a/src/spectrum/model/non-communicating-net-device.cc b/src/spectrum/model/non-communicating-net-device.cc index 1ce3508a8..ada251db5 100644 --- a/src/spectrum/model/non-communicating-net-device.cc +++ b/src/spectrum/model/non-communicating-net-device.cc @@ -29,12 +29,9 @@ #include "non-communicating-net-device.h" -NS_LOG_COMPONENT_DEFINE ("NonCommunicatingNetDevice"); - - namespace ns3 { - +NS_LOG_COMPONENT_DEFINE ("NonCommunicatingNetDevice"); NS_OBJECT_ENSURE_REGISTERED (NonCommunicatingNetDevice); diff --git a/src/spectrum/model/single-model-spectrum-channel.cc b/src/spectrum/model/single-model-spectrum-channel.cc index 0c6141154..416ab7566 100644 --- a/src/spectrum/model/single-model-spectrum-channel.cc +++ b/src/spectrum/model/single-model-spectrum-channel.cc @@ -38,11 +38,9 @@ #include "single-model-spectrum-channel.h" -NS_LOG_COMPONENT_DEFINE ("SingleModelSpectrumChannel"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SingleModelSpectrumChannel"); NS_OBJECT_ENSURE_REGISTERED (SingleModelSpectrumChannel); diff --git a/src/spectrum/model/spectrum-analyzer.cc b/src/spectrum/model/spectrum-analyzer.cc index 661f046fc..3306fe57b 100644 --- a/src/spectrum/model/spectrum-analyzer.cc +++ b/src/spectrum/model/spectrum-analyzer.cc @@ -28,10 +28,10 @@ #include "spectrum-analyzer.h" -NS_LOG_COMPONENT_DEFINE ("SpectrumAnalyzer"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SpectrumAnalyzer"); + NS_OBJECT_ENSURE_REGISTERED (SpectrumAnalyzer); SpectrumAnalyzer::SpectrumAnalyzer () diff --git a/src/spectrum/model/spectrum-converter.cc b/src/spectrum/model/spectrum-converter.cc index 9c9e390c3..03c691e25 100644 --- a/src/spectrum/model/spectrum-converter.cc +++ b/src/spectrum/model/spectrum-converter.cc @@ -25,10 +25,10 @@ -NS_LOG_COMPONENT_DEFINE ("SpectrumConverter"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SpectrumConverter"); + SpectrumConverter::SpectrumConverter () { } diff --git a/src/spectrum/model/spectrum-error-model.cc b/src/spectrum/model/spectrum-error-model.cc index 41e730d38..c52c58d8a 100644 --- a/src/spectrum/model/spectrum-error-model.cc +++ b/src/spectrum/model/spectrum-error-model.cc @@ -23,10 +23,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("ShannonSpectrumErrorModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ShannonSpectrumErrorModel"); + NS_OBJECT_ENSURE_REGISTERED (SpectrumErrorModel); TypeId diff --git a/src/spectrum/model/spectrum-interference.cc b/src/spectrum/model/spectrum-interference.cc index 3a87e4f2d..dba65e5d1 100644 --- a/src/spectrum/model/spectrum-interference.cc +++ b/src/spectrum/model/spectrum-interference.cc @@ -26,10 +26,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("SpectrumInterference"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SpectrumInterference"); SpectrumInterference::SpectrumInterference () : m_receiving (false), diff --git a/src/spectrum/model/spectrum-model.cc b/src/spectrum/model/spectrum-model.cc index 2c5cf3aa7..29ab93c5b 100644 --- a/src/spectrum/model/spectrum-model.cc +++ b/src/spectrum/model/spectrum-model.cc @@ -27,12 +27,9 @@ -NS_LOG_COMPONENT_DEFINE ("SpectrumModel"); - - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SpectrumModel"); bool operator== (const SpectrumModel& lhs, const SpectrumModel& rhs) { diff --git a/src/spectrum/model/spectrum-phy.cc b/src/spectrum/model/spectrum-phy.cc index 1f8f473d8..b95ebef97 100644 --- a/src/spectrum/model/spectrum-phy.cc +++ b/src/spectrum/model/spectrum-phy.cc @@ -25,11 +25,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("SpectrumPhy"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SpectrumPhy"); + NS_OBJECT_ENSURE_REGISTERED (SpectrumPhy); diff --git a/src/spectrum/model/spectrum-propagation-loss-model.cc b/src/spectrum/model/spectrum-propagation-loss-model.cc index 3bbb371de..126dcec3f 100644 --- a/src/spectrum/model/spectrum-propagation-loss-model.cc +++ b/src/spectrum/model/spectrum-propagation-loss-model.cc @@ -22,10 +22,10 @@ #include "spectrum-propagation-loss-model.h" #include -NS_LOG_COMPONENT_DEFINE ("SpectrumPropagationLossModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SpectrumPropagationLossModel"); + NS_OBJECT_ENSURE_REGISTERED (SpectrumPropagationLossModel); SpectrumPropagationLossModel::SpectrumPropagationLossModel () diff --git a/src/spectrum/model/spectrum-signal-parameters.cc b/src/spectrum/model/spectrum-signal-parameters.cc index 2dec28d7d..4cee6ec04 100644 --- a/src/spectrum/model/spectrum-signal-parameters.cc +++ b/src/spectrum/model/spectrum-signal-parameters.cc @@ -26,10 +26,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("SpectrumSignalParameters"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SpectrumSignalParameters"); + SpectrumSignalParameters::SpectrumSignalParameters () { NS_LOG_FUNCTION (this); diff --git a/src/spectrum/model/spectrum-value.cc b/src/spectrum/model/spectrum-value.cc index 7303aee45..edc4f7770 100644 --- a/src/spectrum/model/spectrum-value.cc +++ b/src/spectrum/model/spectrum-value.cc @@ -23,11 +23,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("SpectrumValue"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SpectrumValue"); SpectrumValue::SpectrumValue () { diff --git a/src/spectrum/model/waveform-generator.cc b/src/spectrum/model/waveform-generator.cc index 7b779b11a..14d1be757 100644 --- a/src/spectrum/model/waveform-generator.cc +++ b/src/spectrum/model/waveform-generator.cc @@ -28,10 +28,10 @@ #include "waveform-generator.h" -NS_LOG_COMPONENT_DEFINE ("WaveformGenerator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WaveformGenerator"); + NS_OBJECT_ENSURE_REGISTERED (WaveformGenerator); WaveformGenerator::WaveformGenerator () diff --git a/src/spectrum/test/spectrum-ideal-phy-test.cc b/src/spectrum/test/spectrum-ideal-phy-test.cc index e08aecf08..2b9185acd 100644 --- a/src/spectrum/test/spectrum-ideal-phy-test.cc +++ b/src/spectrum/test/spectrum-ideal-phy-test.cc @@ -50,10 +50,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("SpectrumIdealPhyTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("SpectrumIdealPhyTest"); static uint64_t g_rxBytes; static double g_bandwidth = 20e6; // Hz diff --git a/src/spectrum/test/spectrum-interference-test.cc b/src/spectrum/test/spectrum-interference-test.cc index 3d60f6259..e60c041aa 100644 --- a/src/spectrum/test/spectrum-interference-test.cc +++ b/src/spectrum/test/spectrum-interference-test.cc @@ -28,10 +28,9 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("SpectrumInterferenceTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("SpectrumInterferenceTest"); diff --git a/src/spectrum/test/spectrum-value-test.cc b/src/spectrum/test/spectrum-value-test.cc index 24f6c2659..3a5efd2d2 100644 --- a/src/spectrum/test/spectrum-value-test.cc +++ b/src/spectrum/test/spectrum-value-test.cc @@ -28,10 +28,9 @@ #include "spectrum-test.h" -// NS_LOG_COMPONENT_DEFINE ("SpectrumValueTest"); - using namespace ns3; +// NS_LOG_COMPONENT_DEFINE ("SpectrumValueTest"); #define TOLERANCE 1e-6 diff --git a/src/stats/helper/file-helper.cc b/src/stats/helper/file-helper.cc index 3b485c2f1..2eb6e01c7 100644 --- a/src/stats/helper/file-helper.cc +++ b/src/stats/helper/file-helper.cc @@ -28,10 +28,10 @@ #include "ns3/config.h" #include "ns3/get-wildcard-matches.h" -NS_LOG_COMPONENT_DEFINE ("FileHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FileHelper"); + FileHelper::FileHelper () : m_aggregator (0), m_fileProbeCount (0), diff --git a/src/stats/helper/gnuplot-helper.cc b/src/stats/helper/gnuplot-helper.cc index 7c3a19426..9ee82bcc5 100644 --- a/src/stats/helper/gnuplot-helper.cc +++ b/src/stats/helper/gnuplot-helper.cc @@ -30,10 +30,10 @@ #include "ns3/log.h" #include "ns3/get-wildcard-matches.h" -NS_LOG_COMPONENT_DEFINE ("GnuplotHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GnuplotHelper"); + GnuplotHelper::GnuplotHelper () : m_aggregator (0), m_plotProbeCount (0), diff --git a/src/stats/model/boolean-probe.cc b/src/stats/model/boolean-probe.cc index d27b50271..5cf66471d 100644 --- a/src/stats/model/boolean-probe.cc +++ b/src/stats/model/boolean-probe.cc @@ -28,10 +28,10 @@ #include "ns3/config.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("BooleanProbe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BooleanProbe"); + NS_OBJECT_ENSURE_REGISTERED (BooleanProbe); TypeId diff --git a/src/stats/model/data-collection-object.cc b/src/stats/model/data-collection-object.cc index 3c26492fc..669197685 100644 --- a/src/stats/model/data-collection-object.cc +++ b/src/stats/model/data-collection-object.cc @@ -24,10 +24,10 @@ #include "data-collection-object.h" -NS_LOG_COMPONENT_DEFINE ("DataCollectionObject"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DataCollectionObject"); + NS_OBJECT_ENSURE_REGISTERED (DataCollectionObject); TypeId diff --git a/src/stats/model/data-output-interface.cc b/src/stats/model/data-output-interface.cc index 08c6367d2..067ca300f 100644 --- a/src/stats/model/data-output-interface.cc +++ b/src/stats/model/data-output-interface.cc @@ -26,7 +26,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("DataOutputInterface"); - //-------------------------------------------------------------- //---------------------------------------------- DataOutputInterface::DataOutputInterface() diff --git a/src/stats/model/double-probe.cc b/src/stats/model/double-probe.cc index b3ff59191..deabf2a5f 100644 --- a/src/stats/model/double-probe.cc +++ b/src/stats/model/double-probe.cc @@ -28,10 +28,10 @@ #include "ns3/config.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("DoubleProbe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DoubleProbe"); + NS_OBJECT_ENSURE_REGISTERED (DoubleProbe); TypeId diff --git a/src/stats/model/file-aggregator.cc b/src/stats/model/file-aggregator.cc index 58c44189a..4a3743560 100644 --- a/src/stats/model/file-aggregator.cc +++ b/src/stats/model/file-aggregator.cc @@ -26,10 +26,10 @@ #include "ns3/abort.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("FileAggregator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("FileAggregator"); + NS_OBJECT_ENSURE_REGISTERED (FileAggregator); TypeId diff --git a/src/stats/model/gnuplot-aggregator.cc b/src/stats/model/gnuplot-aggregator.cc index fcd09c91c..0bf872a42 100644 --- a/src/stats/model/gnuplot-aggregator.cc +++ b/src/stats/model/gnuplot-aggregator.cc @@ -26,10 +26,10 @@ #include "ns3/abort.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("GnuplotAggregator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("GnuplotAggregator"); + NS_OBJECT_ENSURE_REGISTERED (GnuplotAggregator); TypeId diff --git a/src/stats/model/omnet-data-output.cc b/src/stats/model/omnet-data-output.cc index 9efe68618..00f545bea 100644 --- a/src/stats/model/omnet-data-output.cc +++ b/src/stats/model/omnet-data-output.cc @@ -32,7 +32,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("OmnetDataOutput"); - //-------------------------------------------------------------- //---------------------------------------------- OmnetDataOutput::OmnetDataOutput() diff --git a/src/stats/model/probe.cc b/src/stats/model/probe.cc index 260ca0314..849b27651 100644 --- a/src/stats/model/probe.cc +++ b/src/stats/model/probe.cc @@ -24,10 +24,10 @@ #include "ns3/simulator.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Probe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Probe"); + NS_OBJECT_ENSURE_REGISTERED (Probe); TypeId diff --git a/src/stats/model/time-data-calculators.cc b/src/stats/model/time-data-calculators.cc index 299b6cd55..c1c00bd1e 100644 --- a/src/stats/model/time-data-calculators.cc +++ b/src/stats/model/time-data-calculators.cc @@ -27,7 +27,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("TimeDataCalculators"); - //-------------------------------------------------------------- //---------------------------------------------- TimeMinMaxAvgTotalCalculator::TimeMinMaxAvgTotalCalculator() diff --git a/src/stats/model/time-series-adaptor.cc b/src/stats/model/time-series-adaptor.cc index a1d787bfa..4cdd1eea2 100644 --- a/src/stats/model/time-series-adaptor.cc +++ b/src/stats/model/time-series-adaptor.cc @@ -27,10 +27,10 @@ #include "ns3/log.h" #include "ns3/simulator.h" -NS_LOG_COMPONENT_DEFINE ("TimeSeriesAdaptor"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TimeSeriesAdaptor"); + NS_OBJECT_ENSURE_REGISTERED (TimeSeriesAdaptor); TypeId diff --git a/src/stats/model/uinteger-16-probe.cc b/src/stats/model/uinteger-16-probe.cc index 6e70e5ac3..ed0dd4fc3 100644 --- a/src/stats/model/uinteger-16-probe.cc +++ b/src/stats/model/uinteger-16-probe.cc @@ -27,10 +27,10 @@ #include "ns3/config.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("Uinteger16Probe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Uinteger16Probe"); + NS_OBJECT_ENSURE_REGISTERED (Uinteger16Probe); TypeId diff --git a/src/stats/model/uinteger-32-probe.cc b/src/stats/model/uinteger-32-probe.cc index 28f9fdcff..5605e5d29 100644 --- a/src/stats/model/uinteger-32-probe.cc +++ b/src/stats/model/uinteger-32-probe.cc @@ -27,10 +27,10 @@ #include "ns3/config.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("Uinteger32Probe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Uinteger32Probe"); + NS_OBJECT_ENSURE_REGISTERED (Uinteger32Probe); TypeId diff --git a/src/stats/model/uinteger-8-probe.cc b/src/stats/model/uinteger-8-probe.cc index 823af2847..77d5c0f58 100644 --- a/src/stats/model/uinteger-8-probe.cc +++ b/src/stats/model/uinteger-8-probe.cc @@ -27,10 +27,10 @@ #include "ns3/config.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("Uinteger8Probe"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Uinteger8Probe"); + NS_OBJECT_ENSURE_REGISTERED (Uinteger8Probe); TypeId diff --git a/src/tap-bridge/helper/tap-bridge-helper.cc b/src/tap-bridge/helper/tap-bridge-helper.cc index 3e27dde77..e409ece18 100644 --- a/src/tap-bridge/helper/tap-bridge-helper.cc +++ b/src/tap-bridge/helper/tap-bridge-helper.cc @@ -23,10 +23,10 @@ #include "ns3/names.h" #include "tap-bridge-helper.h" -NS_LOG_COMPONENT_DEFINE ("TapBridgeHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TapBridgeHelper"); + TapBridgeHelper::TapBridgeHelper () { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/tap-bridge/model/tap-bridge.cc b/src/tap-bridge/model/tap-bridge.cc index 87984282f..be2679048 100644 --- a/src/tap-bridge/model/tap-bridge.cc +++ b/src/tap-bridge/model/tap-bridge.cc @@ -46,10 +46,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("TapBridge"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TapBridge"); + FdReader::Data TapBridgeFdReader::DoRead (void) { NS_LOG_FUNCTION_NOARGS (); diff --git a/src/test/ns3wifi/wifi-interference-test-suite.cc b/src/test/ns3wifi/wifi-interference-test-suite.cc index 75e0c33be..47f5472e0 100644 --- a/src/test/ns3wifi/wifi-interference-test-suite.cc +++ b/src/test/ns3wifi/wifi-interference-test-suite.cc @@ -45,10 +45,10 @@ #include "ns3/nqos-wifi-mac-helper.h" #include "ns3/simulator.h" -NS_LOG_COMPONENT_DEFINE ("WifiInterferenceTestSuite"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("WifiInterferenceTestSuite"); + class WifiInterferenceTestCase : public TestCase { public: diff --git a/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc b/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc index 6eb6e73ec..cfd1e5898 100644 --- a/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc +++ b/src/test/ns3wifi/wifi-msdu-aggregator-test-suite.cc @@ -39,10 +39,10 @@ #include "ns3/packet-sink-helper.h" #include "ns3/on-off-helper.h" -NS_LOG_COMPONENT_DEFINE ("WifiMsduAggregatorThroughputTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("WifiMsduAggregatorThroughputTest"); + class WifiMsduAggregatorThroughputTest : public TestCase { public: diff --git a/src/topology-read/examples/topology-example-sim.cc b/src/topology-read/examples/topology-example-sim.cc index 0a1b063a1..8938168e6 100644 --- a/src/topology-read/examples/topology-example-sim.cc +++ b/src/topology-read/examples/topology-example-sim.cc @@ -42,7 +42,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("TopologyCreationExperiment"); - static std::list data; static void SinkRx (Ptr p, const Address &ad) diff --git a/src/topology-read/helper/topology-reader-helper.cc b/src/topology-read/helper/topology-reader-helper.cc index 9b6c77b47..fdfd60681 100644 --- a/src/topology-read/helper/topology-reader-helper.cc +++ b/src/topology-read/helper/topology-reader-helper.cc @@ -26,10 +26,10 @@ #include "ns3/rocketfuel-topology-reader.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("TopologyReaderHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TopologyReaderHelper"); + TopologyReaderHelper::TopologyReaderHelper () { m_inputModel = 0; diff --git a/src/topology-read/model/inet-topology-reader.cc b/src/topology-read/model/inet-topology-reader.cc index 345774daa..2f2e5bb69 100644 --- a/src/topology-read/model/inet-topology-reader.cc +++ b/src/topology-read/model/inet-topology-reader.cc @@ -28,10 +28,10 @@ #include "inet-topology-reader.h" -NS_LOG_COMPONENT_DEFINE ("InetTopologyReader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("InetTopologyReader"); + NS_OBJECT_ENSURE_REGISTERED (InetTopologyReader); TypeId InetTopologyReader::GetTypeId (void) diff --git a/src/topology-read/model/orbis-topology-reader.cc b/src/topology-read/model/orbis-topology-reader.cc index 890ec20de..49fa60727 100644 --- a/src/topology-read/model/orbis-topology-reader.cc +++ b/src/topology-read/model/orbis-topology-reader.cc @@ -28,10 +28,10 @@ #include "orbis-topology-reader.h" -NS_LOG_COMPONENT_DEFINE ("OrbisTopologyReader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("OrbisTopologyReader"); + NS_OBJECT_ENSURE_REGISTERED (OrbisTopologyReader); TypeId OrbisTopologyReader::GetTypeId (void) diff --git a/src/topology-read/model/rocketfuel-topology-reader.cc b/src/topology-read/model/rocketfuel-topology-reader.cc index c98b2f1e7..1988908c1 100644 --- a/src/topology-read/model/rocketfuel-topology-reader.cc +++ b/src/topology-read/model/rocketfuel-topology-reader.cc @@ -28,10 +28,10 @@ #include "ns3/unused.h" #include "rocketfuel-topology-reader.h" -NS_LOG_COMPONENT_DEFINE ("RocketfuelTopologyReader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RocketfuelTopologyReader"); + NS_OBJECT_ENSURE_REGISTERED (RocketfuelTopologyReader); TypeId RocketfuelTopologyReader::GetTypeId (void) diff --git a/src/topology-read/model/topology-reader.cc b/src/topology-read/model/topology-reader.cc index 17fb2c701..b531a6d98 100644 --- a/src/topology-read/model/topology-reader.cc +++ b/src/topology-read/model/topology-reader.cc @@ -24,10 +24,10 @@ #include "topology-reader.h" -NS_LOG_COMPONENT_DEFINE ("TopologyReader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("TopologyReader"); + NS_OBJECT_ENSURE_REGISTERED (TopologyReader); TypeId TopologyReader::GetTypeId (void) diff --git a/src/uan/examples/uan-rc-example.cc b/src/uan/examples/uan-rc-example.cc index ac9f38ad6..030221704 100644 --- a/src/uan/examples/uan-rc-example.cc +++ b/src/uan/examples/uan-rc-example.cc @@ -67,7 +67,6 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("UanRcExample"); - Experiment::Experiment () : m_simMin (1), m_simMax (1), diff --git a/src/uan/helper/uan-helper.cc b/src/uan/helper/uan-helper.cc index 7e5bc5666..939c6fb2a 100644 --- a/src/uan/helper/uan-helper.cc +++ b/src/uan/helper/uan-helper.cc @@ -40,9 +40,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("UanHelper"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanHelper"); + /** * Ascii trace callback on Phy transmit events. * diff --git a/src/uan/model/acoustic-modem-energy-model.cc b/src/uan/model/acoustic-modem-energy-model.cc index da226c847..3c2ac5f2e 100644 --- a/src/uan/model/acoustic-modem-energy-model.cc +++ b/src/uan/model/acoustic-modem-energy-model.cc @@ -27,10 +27,10 @@ #include "ns3/uan-net-device.h" #include "acoustic-modem-energy-model.h" -NS_LOG_COMPONENT_DEFINE ("AcousticModemEnergyModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AcousticModemEnergyModel"); + NS_OBJECT_ENSURE_REGISTERED (AcousticModemEnergyModel); TypeId diff --git a/src/uan/model/uan-channel.cc b/src/uan/model/uan-channel.cc index f737313da..85bcdcc5e 100644 --- a/src/uan/model/uan-channel.cc +++ b/src/uan/model/uan-channel.cc @@ -37,9 +37,10 @@ #include "uan-noise-model-default.h" #include "uan-prop-model-ideal.h" -NS_LOG_COMPONENT_DEFINE ("UanChannel"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanChannel"); + NS_OBJECT_ENSURE_REGISTERED (UanChannel); TypeId diff --git a/src/uan/model/uan-mac-aloha.cc b/src/uan/model/uan-mac-aloha.cc index ff0a677be..7316eeca1 100644 --- a/src/uan/model/uan-mac-aloha.cc +++ b/src/uan/model/uan-mac-aloha.cc @@ -26,12 +26,12 @@ #include "uan-header-common.h" #include -NS_LOG_COMPONENT_DEFINE ("UanMacAloha"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanMacAloha"); + NS_OBJECT_ENSURE_REGISTERED (UanMacAloha); UanMacAloha::UanMacAloha () diff --git a/src/uan/model/uan-mac-cw.cc b/src/uan/model/uan-mac-cw.cc index c9d80ec1d..5d40a3cf4 100644 --- a/src/uan/model/uan-mac-cw.cc +++ b/src/uan/model/uan-mac-cw.cc @@ -27,10 +27,10 @@ #include "ns3/trace-source-accessor.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("UanMacCw"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanMacCw"); + NS_OBJECT_ENSURE_REGISTERED (UanMacCw); UanMacCw::UanMacCw () diff --git a/src/uan/model/uan-mac-rc-gw.cc b/src/uan/model/uan-mac-rc-gw.cc index 47a7357d2..c1c547f83 100644 --- a/src/uan/model/uan-mac-rc-gw.cc +++ b/src/uan/model/uan-mac-rc-gw.cc @@ -39,10 +39,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("UanMacRcGw"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanMacRcGw"); + NS_OBJECT_ENSURE_REGISTERED (UanMacRcGw); UanMacRcGw::UanMacRcGw () diff --git a/src/uan/model/uan-mac-rc.cc b/src/uan/model/uan-mac-rc.cc index 6a37e6a2c..edbf80cb3 100644 --- a/src/uan/model/uan-mac-rc.cc +++ b/src/uan/model/uan-mac-rc.cc @@ -37,9 +37,10 @@ -NS_LOG_COMPONENT_DEFINE ("UanMacRc"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanMacRc"); + NS_OBJECT_ENSURE_REGISTERED (UanMacRc); Reservation::Reservation () diff --git a/src/uan/model/uan-net-device.cc b/src/uan/model/uan-net-device.cc index 79fe6f2ef..10bec3e0f 100644 --- a/src/uan/model/uan-net-device.cc +++ b/src/uan/model/uan-net-device.cc @@ -30,10 +30,10 @@ #include "uan-transducer.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("UanNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (UanNetDevice); UanNetDevice::UanNetDevice () diff --git a/src/uan/model/uan-phy-dual.cc b/src/uan/model/uan-phy-dual.cc index bd0a1763f..f108dbf99 100644 --- a/src/uan/model/uan-phy-dual.cc +++ b/src/uan/model/uan-phy-dual.cc @@ -37,10 +37,10 @@ #include -NS_LOG_COMPONENT_DEFINE ("UanPhyDual"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanPhyDual"); + NS_OBJECT_ENSURE_REGISTERED (UanPhyDual); NS_OBJECT_ENSURE_REGISTERED (UanPhyCalcSinrDual); diff --git a/src/uan/model/uan-phy-gen.cc b/src/uan/model/uan-phy-gen.cc index e830926d0..86d925e63 100644 --- a/src/uan/model/uan-phy-gen.cc +++ b/src/uan/model/uan-phy-gen.cc @@ -36,10 +36,10 @@ #include "ns3/acoustic-modem-energy-model.h" -NS_LOG_COMPONENT_DEFINE ("UanPhyGen"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanPhyGen"); + NS_OBJECT_ENSURE_REGISTERED (UanPhyGen); NS_OBJECT_ENSURE_REGISTERED (UanPhyPerGenDefault); NS_OBJECT_ENSURE_REGISTERED (UanPhyCalcSinrDefault); diff --git a/src/uan/model/uan-prop-model-thorp.cc b/src/uan/model/uan-prop-model-thorp.cc index a6b3a6288..d6b8bd401 100644 --- a/src/uan/model/uan-prop-model-thorp.cc +++ b/src/uan/model/uan-prop-model-thorp.cc @@ -22,10 +22,10 @@ #include "ns3/double.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("UanPropModelThorp"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanPropModelThorp"); + NS_OBJECT_ENSURE_REGISTERED (UanPropModelThorp); UanPropModelThorp::UanPropModelThorp () diff --git a/src/uan/model/uan-transducer-hd.cc b/src/uan/model/uan-transducer-hd.cc index 239214c3c..f87064dd2 100644 --- a/src/uan/model/uan-transducer-hd.cc +++ b/src/uan/model/uan-transducer-hd.cc @@ -27,10 +27,10 @@ #include "ns3/pointer.h" -NS_LOG_COMPONENT_DEFINE ("UanTransducerHd"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanTransducerHd"); + NS_OBJECT_ENSURE_REGISTERED (UanTransducerHd); UanTransducerHd::UanTransducerHd () diff --git a/src/uan/model/uan-tx-mode.cc b/src/uan/model/uan-tx-mode.cc index ea0dea3a5..5b3d7e10a 100644 --- a/src/uan/model/uan-tx-mode.cc +++ b/src/uan/model/uan-tx-mode.cc @@ -22,10 +22,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("UanTxMode"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UanTxMode"); + UanTxMode::UanTxMode () { } diff --git a/src/virtual-net-device/model/virtual-net-device.cc b/src/virtual-net-device/model/virtual-net-device.cc index bbbc35515..67d39222f 100644 --- a/src/virtual-net-device/model/virtual-net-device.cc +++ b/src/virtual-net-device/model/virtual-net-device.cc @@ -30,10 +30,10 @@ #include "ns3/uinteger.h" -NS_LOG_COMPONENT_DEFINE ("VirtualNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("VirtualNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (VirtualNetDevice); TypeId diff --git a/src/visualizer/model/pyviz.cc b/src/visualizer/model/pyviz.cc index 7e4c98fbc..bbe4877d8 100644 --- a/src/visualizer/model/pyviz.cc +++ b/src/visualizer/model/pyviz.cc @@ -35,6 +35,7 @@ #include NS_LOG_COMPONENT_DEFINE ("PyViz"); + #define NUM_LAST_PACKETS 10 static diff --git a/src/visualizer/model/visual-simulator-impl.cc b/src/visualizer/model/visual-simulator-impl.cc index 3d501b356..fc7bdbbe1 100644 --- a/src/visualizer/model/visual-simulator-impl.cc +++ b/src/visualizer/model/visual-simulator-impl.cc @@ -22,11 +22,9 @@ #include "ns3/default-simulator-impl.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("VisualSimulatorImpl"); - namespace ns3 { - +NS_LOG_COMPONENT_DEFINE ("VisualSimulatorImpl"); NS_OBJECT_ENSURE_REGISTERED (VisualSimulatorImpl); diff --git a/src/wave/examples/wave-simple-80211p.cc b/src/wave/examples/wave-simple-80211p.cc index 79bb57116..a0db353d0 100644 --- a/src/wave/examples/wave-simple-80211p.cc +++ b/src/wave/examples/wave-simple-80211p.cc @@ -49,9 +49,10 @@ #include "ns3/wifi-80211p-helper.h" #include "ns3/wave-mac-helper.h" -NS_LOG_COMPONENT_DEFINE ("WifiSimpleOcb"); using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("WifiSimpleOcb"); + /* * In WAVE module, there is no net device class named like "Wifi80211pNetDevice", * instead, we need to use Wifi80211pHelper to create an object of diff --git a/src/wave/model/higher-tx-tag.cc b/src/wave/model/higher-tx-tag.cc index 53d556660..d1bec5d1e 100644 --- a/src/wave/model/higher-tx-tag.cc +++ b/src/wave/model/higher-tx-tag.cc @@ -24,10 +24,10 @@ #include "ns3/log.h" #include "ns3/uinteger.h" -NS_LOG_COMPONENT_DEFINE ("HigherDataTxVectorTag"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("HigherDataTxVectorTag"); + NS_OBJECT_ENSURE_REGISTERED (HigherDataTxVectorTag); TypeId diff --git a/src/wave/model/ocb-wifi-mac.cc b/src/wave/model/ocb-wifi-mac.cc index 7065cb521..f22fc8732 100644 --- a/src/wave/model/ocb-wifi-mac.cc +++ b/src/wave/model/ocb-wifi-mac.cc @@ -32,10 +32,10 @@ #include "vendor-specific-action.h" #include "higher-tx-tag.h" -NS_LOG_COMPONENT_DEFINE ("OcbWifiMac"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("OcbWifiMac"); + NS_OBJECT_ENSURE_REGISTERED (OcbWifiMac); const static Mac48Address WILDCARD_BSSID = Mac48Address::GetBroadcast (); diff --git a/src/wave/model/vendor-specific-action.cc b/src/wave/model/vendor-specific-action.cc index 2844ff4cf..ebd09e36c 100644 --- a/src/wave/model/vendor-specific-action.cc +++ b/src/wave/model/vendor-specific-action.cc @@ -23,10 +23,10 @@ #include "ns3/assert.h" #include "vendor-specific-action.h" -NS_LOG_COMPONENT_DEFINE ("VendorSpecificAction"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("VendorSpecificAction"); + /*********** OrganizationIdentifier *******/ ATTRIBUTE_HELPER_CPP (OrganizationIdentifier); diff --git a/src/wave/model/wave-mac-low.cc b/src/wave/model/wave-mac-low.cc index 55295c168..222afce51 100644 --- a/src/wave/model/wave-mac-low.cc +++ b/src/wave/model/wave-mac-low.cc @@ -23,10 +23,10 @@ #include "wave-mac-low.h" #include "higher-tx-tag.h" -NS_LOG_COMPONENT_DEFINE ("WaveMacLow"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WaveMacLow"); + NS_OBJECT_ENSURE_REGISTERED (WaveMacLow); TypeId diff --git a/src/wifi/helper/athstats-helper.cc b/src/wifi/helper/athstats-helper.cc index 4b1afe5a2..6b833676a 100644 --- a/src/wifi/helper/athstats-helper.cc +++ b/src/wifi/helper/athstats-helper.cc @@ -30,10 +30,9 @@ #include -NS_LOG_COMPONENT_DEFINE ("Athstats"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Athstats"); AthstatsHelper::AthstatsHelper () : m_interval (Seconds (1.0)) diff --git a/src/wifi/helper/wifi-helper.cc b/src/wifi/helper/wifi-helper.cc index 7812aa377..9a3ffbc5c 100644 --- a/src/wifi/helper/wifi-helper.cc +++ b/src/wifi/helper/wifi-helper.cc @@ -40,10 +40,10 @@ #include "ns3/simulator.h" #include "ns3/names.h" -NS_LOG_COMPONENT_DEFINE ("WifiHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WifiHelper"); + WifiPhyHelper::~WifiPhyHelper () { } diff --git a/src/wifi/helper/yans-wifi-helper.cc b/src/wifi/helper/yans-wifi-helper.cc index a30f7d41e..58af771cf 100644 --- a/src/wifi/helper/yans-wifi-helper.cc +++ b/src/wifi/helper/yans-wifi-helper.cc @@ -34,10 +34,10 @@ #include "ns3/abort.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("YansWifiHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("YansWifiHelper"); + static void AsciiPhyTransmitSinkWithContext ( Ptr stream, diff --git a/src/wifi/model/aarf-wifi-manager.cc b/src/wifi/model/aarf-wifi-manager.cc index 1abbdacdc..838ffefd9 100644 --- a/src/wifi/model/aarf-wifi-manager.cc +++ b/src/wifi/model/aarf-wifi-manager.cc @@ -27,10 +27,10 @@ #define Min(a,b) ((a < b) ? a : b) #define Max(a,b) ((a > b) ? a : b) -NS_LOG_COMPONENT_DEFINE ("AarfWifiManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AarfWifiManager"); + /** * \brief hold per-remote-station state for AARF Wifi manager. * diff --git a/src/wifi/model/aarfcd-wifi-manager.cc b/src/wifi/model/aarfcd-wifi-manager.cc index 0936dcd4a..976772e7b 100644 --- a/src/wifi/model/aarfcd-wifi-manager.cc +++ b/src/wifi/model/aarfcd-wifi-manager.cc @@ -30,10 +30,10 @@ #define Min(a,b) ((a < b) ? a : b) #define Max(a,b) ((a > b) ? a : b) -NS_LOG_COMPONENT_DEFINE ("Aarfcd"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Aarfcd"); + /** * \brief hold per-remote-station state for AARF-CD Wifi manager. * diff --git a/src/wifi/model/adhoc-wifi-mac.cc b/src/wifi/model/adhoc-wifi-mac.cc index 6b66c0a33..cb669ede5 100644 --- a/src/wifi/model/adhoc-wifi-mac.cc +++ b/src/wifi/model/adhoc-wifi-mac.cc @@ -36,10 +36,10 @@ #include "amsdu-subframe-header.h" #include "mgt-headers.h" -NS_LOG_COMPONENT_DEFINE ("AdhocWifiMac"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AdhocWifiMac"); + NS_OBJECT_ENSURE_REGISTERED (AdhocWifiMac); TypeId diff --git a/src/wifi/model/amrr-wifi-manager.cc b/src/wifi/model/amrr-wifi-manager.cc index fb9c0ae68..0f2517192 100644 --- a/src/wifi/model/amrr-wifi-manager.cc +++ b/src/wifi/model/amrr-wifi-manager.cc @@ -26,10 +26,10 @@ #define Min(a,b) ((a < b) ? a : b) -NS_LOG_COMPONENT_DEFINE ("AmrrWifiRemoteStation"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AmrrWifiRemoteStation"); + /** * \brief hold per-remote-station state for AMRR Wifi manager. * diff --git a/src/wifi/model/amsdu-subframe-header.cc b/src/wifi/model/amsdu-subframe-header.cc index 62c9776e4..6714f2607 100644 --- a/src/wifi/model/amsdu-subframe-header.cc +++ b/src/wifi/model/amsdu-subframe-header.cc @@ -21,10 +21,10 @@ #include "ns3/address-utils.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("AmsduSubframeHeader"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("AmsduSubframeHeader"); + NS_OBJECT_ENSURE_REGISTERED (AmsduSubframeHeader); TypeId diff --git a/src/wifi/model/ap-wifi-mac.cc b/src/wifi/model/ap-wifi-mac.cc index 41276c151..dc9469aa4 100644 --- a/src/wifi/model/ap-wifi-mac.cc +++ b/src/wifi/model/ap-wifi-mac.cc @@ -38,10 +38,10 @@ #include "amsdu-subframe-header.h" #include "msdu-aggregator.h" -NS_LOG_COMPONENT_DEFINE ("ApWifiMac"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ApWifiMac"); + NS_OBJECT_ENSURE_REGISTERED (ApWifiMac); TypeId diff --git a/src/wifi/model/arf-wifi-manager.cc b/src/wifi/model/arf-wifi-manager.cc index fd344fe62..12e601d16 100644 --- a/src/wifi/model/arf-wifi-manager.cc +++ b/src/wifi/model/arf-wifi-manager.cc @@ -25,11 +25,10 @@ #define Min(a,b) ((a < b) ? a : b) -NS_LOG_COMPONENT_DEFINE ("ns3::ArfWifiManager"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ns3::ArfWifiManager"); + /** * \brief hold per-remote-station state for ARF Wifi manager. * diff --git a/src/wifi/model/block-ack-agreement.cc b/src/wifi/model/block-ack-agreement.cc index d704eae90..ff624f11f 100644 --- a/src/wifi/model/block-ack-agreement.cc +++ b/src/wifi/model/block-ack-agreement.cc @@ -20,10 +20,10 @@ #include "block-ack-agreement.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("BlockAckAgreement"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BlockAckAgreement"); + BlockAckAgreement::BlockAckAgreement () : m_amsduSupported (0), m_blockAckPolicy (1), diff --git a/src/wifi/model/block-ack-cache.cc b/src/wifi/model/block-ack-cache.cc index 500ab5505..d580652b7 100644 --- a/src/wifi/model/block-ack-cache.cc +++ b/src/wifi/model/block-ack-cache.cc @@ -25,10 +25,10 @@ #define WINSIZE_ASSERT NS_ASSERT ((m_winEnd - m_winStart + 4096) % 4096 == m_winSize - 1) -NS_LOG_COMPONENT_DEFINE ("BlockAckCache"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BlockAckCache"); + void BlockAckCache::Init (uint16_t winStart, uint16_t winSize) { diff --git a/src/wifi/model/block-ack-manager.cc b/src/wifi/model/block-ack-manager.cc index 1e3c29942..cd3a9b932 100644 --- a/src/wifi/model/block-ack-manager.cc +++ b/src/wifi/model/block-ack-manager.cc @@ -31,10 +31,10 @@ #include "wifi-mac-queue.h" #include "mac-tx-middle.h" -NS_LOG_COMPONENT_DEFINE ("BlockAckManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BlockAckManager"); + BlockAckManager::Item::Item () { NS_LOG_FUNCTION (this); diff --git a/src/wifi/model/capability-information.cc b/src/wifi/model/capability-information.cc index bf6a892cf..32e2fc2ce 100644 --- a/src/wifi/model/capability-information.cc +++ b/src/wifi/model/capability-information.cc @@ -20,10 +20,10 @@ #include "capability-information.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("CapabilityInformation"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CapabilityInformation"); + CapabilityInformation::CapabilityInformation () : m_capability (0) { diff --git a/src/wifi/model/cara-wifi-manager.cc b/src/wifi/model/cara-wifi-manager.cc index efdd460e9..db757223c 100644 --- a/src/wifi/model/cara-wifi-manager.cc +++ b/src/wifi/model/cara-wifi-manager.cc @@ -27,11 +27,10 @@ #define Min(a,b) ((a < b) ? a : b) -NS_LOG_COMPONENT_DEFINE ("Cara"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Cara"); + /** * \brief hold per-remote-station state for CARA Wifi manager. * diff --git a/src/wifi/model/constant-rate-wifi-manager.cc b/src/wifi/model/constant-rate-wifi-manager.cc index 7075ea779..e53c53636 100644 --- a/src/wifi/model/constant-rate-wifi-manager.cc +++ b/src/wifi/model/constant-rate-wifi-manager.cc @@ -24,12 +24,12 @@ #include "ns3/assert.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("ConstantRateWifiManager"); - #define Min(a,b) ((a < b) ? a : b) namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ConstantRateWifiManager"); + NS_OBJECT_ENSURE_REGISTERED (ConstantRateWifiManager); TypeId diff --git a/src/wifi/model/ctrl-headers.cc b/src/wifi/model/ctrl-headers.cc index bd37fc699..024e398bf 100644 --- a/src/wifi/model/ctrl-headers.cc +++ b/src/wifi/model/ctrl-headers.cc @@ -22,10 +22,10 @@ #include "ctrl-headers.h" -NS_LOG_COMPONENT_DEFINE ("CtrlHeaders"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("CtrlHeaders"); + /*********************************** * Block ack request ***********************************/ diff --git a/src/wifi/model/dca-txop.cc b/src/wifi/model/dca-txop.cc index e26f0b8c6..21af5ed14 100644 --- a/src/wifi/model/dca-txop.cc +++ b/src/wifi/model/dca-txop.cc @@ -35,13 +35,13 @@ #include "wifi-mac.h" #include "random-stream.h" -NS_LOG_COMPONENT_DEFINE ("DcaTxop"); - #undef NS_LOG_APPEND_CONTEXT #define NS_LOG_APPEND_CONTEXT if (m_low != 0) { std::clog << "[mac=" << m_low->GetAddress () << "] "; } namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DcaTxop"); + class DcaTxop::Dcf : public DcfState { public: diff --git a/src/wifi/model/dcf-manager.cc b/src/wifi/model/dcf-manager.cc index cf903cf7e..4cf1805ee 100644 --- a/src/wifi/model/dcf-manager.cc +++ b/src/wifi/model/dcf-manager.cc @@ -28,13 +28,13 @@ #include "wifi-mac.h" #include "mac-low.h" -NS_LOG_COMPONENT_DEFINE ("DcfManager"); - #define MY_DEBUG(x) \ NS_LOG_DEBUG (Simulator::Now () << " " << this << " " << x) namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DcfManager"); + /**************************************************************** * Implement the DCF state holder ****************************************************************/ diff --git a/src/wifi/model/dcf.cc b/src/wifi/model/dcf.cc index bfacb36c9..5736603c9 100644 --- a/src/wifi/model/dcf.cc +++ b/src/wifi/model/dcf.cc @@ -21,10 +21,10 @@ #include "ns3/uinteger.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("Dcf"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("Dcf"); + NS_OBJECT_ENSURE_REGISTERED (Dcf); TypeId diff --git a/src/wifi/model/dsss-error-rate-model.cc b/src/wifi/model/dsss-error-rate-model.cc index 9263f279f..353c91bad 100644 --- a/src/wifi/model/dsss-error-rate-model.cc +++ b/src/wifi/model/dsss-error-rate-model.cc @@ -22,10 +22,10 @@ #include "dsss-error-rate-model.h" #include -NS_LOG_COMPONENT_DEFINE ("DsssErrorRateModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("DsssErrorRateModel"); + #ifndef ENABLE_GSL const double DsssErrorRateModel::WLAN_SIR_PERFECT = 10.0; const double DsssErrorRateModel::WLAN_SIR_IMPOSSIBLE = 0.1; diff --git a/src/wifi/model/edca-txop-n.cc b/src/wifi/model/edca-txop-n.cc index c03bb40b8..45543621b 100644 --- a/src/wifi/model/edca-txop-n.cc +++ b/src/wifi/model/edca-txop-n.cc @@ -35,13 +35,13 @@ #include "mgt-headers.h" #include "qos-blocked-destinations.h" -NS_LOG_COMPONENT_DEFINE ("EdcaTxopN"); - #undef NS_LOG_APPEND_CONTEXT #define NS_LOG_APPEND_CONTEXT if (m_low != 0) { std::clog << "[mac=" << m_low->GetAddress () << "] "; } namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("EdcaTxopN"); + class EdcaTxopN::Dcf : public DcfState { public: diff --git a/src/wifi/model/ht-capabilities.cc b/src/wifi/model/ht-capabilities.cc index caa3166a7..f1bf03e6d 100644 --- a/src/wifi/model/ht-capabilities.cc +++ b/src/wifi/model/ht-capabilities.cc @@ -23,10 +23,9 @@ #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("HtCapabilities"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("HtCapabilities"); HtCapabilities::HtCapabilities () : m_ldpc(0), diff --git a/src/wifi/model/interference-helper.cc b/src/wifi/model/interference-helper.cc index e7a4271ee..52b1563ca 100644 --- a/src/wifi/model/interference-helper.cc +++ b/src/wifi/model/interference-helper.cc @@ -24,10 +24,10 @@ #include "ns3/log.h" #include -NS_LOG_COMPONENT_DEFINE ("InterferenceHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("InterferenceHelper"); + /**************************************************************** * Phy event class ****************************************************************/ diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index 419ee703d..6e37f5549 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -35,14 +35,14 @@ #include "edca-txop-n.h" #include "snr-tag.h" -NS_LOG_COMPONENT_DEFINE ("MacLow"); - #undef NS_LOG_APPEND_CONTEXT #define NS_LOG_APPEND_CONTEXT std::clog << "[mac=" << m_self << "] " namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MacLow"); + MacLowTransmissionListener::MacLowTransmissionListener () { } diff --git a/src/wifi/model/mac-rx-middle.cc b/src/wifi/model/mac-rx-middle.cc index f13586363..25b3cdc9a 100644 --- a/src/wifi/model/mac-rx-middle.cc +++ b/src/wifi/model/mac-rx-middle.cc @@ -28,10 +28,9 @@ #include "ns3/sequence-number.h" #include -NS_LOG_COMPONENT_DEFINE ("MacRxMiddle"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MacRxMiddle"); /** * A class to keep track of the packet originator status. diff --git a/src/wifi/model/minstrel-wifi-manager.cc b/src/wifi/model/minstrel-wifi-manager.cc index a249e4a2b..51a631476 100644 --- a/src/wifi/model/minstrel-wifi-manager.cc +++ b/src/wifi/model/minstrel-wifi-manager.cc @@ -40,11 +40,10 @@ #define Min(a,b) ((a < b) ? a : b) -NS_LOG_COMPONENT_DEFINE ("MinstrelWifiManager"); - - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MinstrelWifiManager"); + /** * \brief hold per-remote-station state for Minstrel Wifi manager. * diff --git a/src/wifi/model/msdu-aggregator.cc b/src/wifi/model/msdu-aggregator.cc index fb5eb2446..102979918 100644 --- a/src/wifi/model/msdu-aggregator.cc +++ b/src/wifi/model/msdu-aggregator.cc @@ -22,10 +22,10 @@ #include "msdu-aggregator.h" #include "wifi-mac-header.h" -NS_LOG_COMPONENT_DEFINE ("MsduAggregator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MsduAggregator"); + NS_OBJECT_ENSURE_REGISTERED (MsduAggregator); TypeId diff --git a/src/wifi/model/msdu-standard-aggregator.cc b/src/wifi/model/msdu-standard-aggregator.cc index c77516506..37afbde5b 100644 --- a/src/wifi/model/msdu-standard-aggregator.cc +++ b/src/wifi/model/msdu-standard-aggregator.cc @@ -23,10 +23,10 @@ #include "amsdu-subframe-header.h" #include "msdu-standard-aggregator.h" -NS_LOG_COMPONENT_DEFINE ("MsduStandardAggregator"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MsduStandardAggregator"); + NS_OBJECT_ENSURE_REGISTERED (MsduStandardAggregator); TypeId diff --git a/src/wifi/model/nist-error-rate-model.cc b/src/wifi/model/nist-error-rate-model.cc index 17a20dfc7..31a796bc1 100644 --- a/src/wifi/model/nist-error-rate-model.cc +++ b/src/wifi/model/nist-error-rate-model.cc @@ -23,10 +23,10 @@ #include "wifi-phy.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("NistErrorRateModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("NistErrorRateModel"); + NS_OBJECT_ENSURE_REGISTERED (NistErrorRateModel); TypeId diff --git a/src/wifi/model/onoe-wifi-manager.cc b/src/wifi/model/onoe-wifi-manager.cc index 279a01059..725abaa03 100644 --- a/src/wifi/model/onoe-wifi-manager.cc +++ b/src/wifi/model/onoe-wifi-manager.cc @@ -25,10 +25,10 @@ #define Min(a,b) ((a < b) ? a : b) -NS_LOG_COMPONENT_DEFINE ("OnoeWifiRemoteStation"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("OnoeWifiRemoteStation"); + /** * \brief hold per-remote-station state for ONOE Wifi manager. * diff --git a/src/wifi/model/regular-wifi-mac.cc b/src/wifi/model/regular-wifi-mac.cc index 715886483..0e71db57f 100644 --- a/src/wifi/model/regular-wifi-mac.cc +++ b/src/wifi/model/regular-wifi-mac.cc @@ -34,10 +34,10 @@ #include "msdu-aggregator.h" -NS_LOG_COMPONENT_DEFINE ("RegularWifiMac"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RegularWifiMac"); + NS_OBJECT_ENSURE_REGISTERED (RegularWifiMac); RegularWifiMac::RegularWifiMac () diff --git a/src/wifi/model/rraa-wifi-manager.cc b/src/wifi/model/rraa-wifi-manager.cc index de69c8e10..c417e4c63 100644 --- a/src/wifi/model/rraa-wifi-manager.cc +++ b/src/wifi/model/rraa-wifi-manager.cc @@ -28,10 +28,10 @@ #define Min(a,b) ((a < b) ? a : b) -NS_LOG_COMPONENT_DEFINE ("RraaWifiManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("RraaWifiManager"); + /** * \brief hold per-remote-station state for RRAA Wifi manager. * diff --git a/src/wifi/model/sta-wifi-mac.cc b/src/wifi/model/sta-wifi-mac.cc index b5d3b4ba7..258550e9e 100644 --- a/src/wifi/model/sta-wifi-mac.cc +++ b/src/wifi/model/sta-wifi-mac.cc @@ -39,9 +39,6 @@ #include "mgt-headers.h" #include "ht-capabilities.h" -NS_LOG_COMPONENT_DEFINE ("StaWifiMac"); - - /* * The state machine for this STA is: -------------- ----------- @@ -60,6 +57,8 @@ NS_LOG_COMPONENT_DEFINE ("StaWifiMac"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("StaWifiMac"); + NS_OBJECT_ENSURE_REGISTERED (StaWifiMac); TypeId diff --git a/src/wifi/model/supported-rates.cc b/src/wifi/model/supported-rates.cc index a7363004d..cb6d92701 100644 --- a/src/wifi/model/supported-rates.cc +++ b/src/wifi/model/supported-rates.cc @@ -22,10 +22,10 @@ #include "ns3/assert.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("SupportedRates"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SupportedRates"); + SupportedRates::SupportedRates () : extended (this), m_nRates (0) diff --git a/src/wifi/model/wifi-channel.cc b/src/wifi/model/wifi-channel.cc index 59295d842..750c0ba13 100644 --- a/src/wifi/model/wifi-channel.cc +++ b/src/wifi/model/wifi-channel.cc @@ -31,10 +31,10 @@ #include "ns3/propagation-loss-model.h" #include "ns3/propagation-delay-model.h" -NS_LOG_COMPONENT_DEFINE ("WifiChannel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WifiChannel"); + NS_OBJECT_ENSURE_REGISTERED (WifiChannel); TypeId diff --git a/src/wifi/model/wifi-net-device.cc b/src/wifi/model/wifi-net-device.cc index 6e6dee136..19f003fe7 100644 --- a/src/wifi/model/wifi-net-device.cc +++ b/src/wifi/model/wifi-net-device.cc @@ -30,10 +30,10 @@ #include "ns3/trace-source-accessor.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("WifiNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WifiNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (WifiNetDevice); TypeId diff --git a/src/wifi/model/wifi-phy-state-helper.cc b/src/wifi/model/wifi-phy-state-helper.cc index f83029608..e9e75c066 100644 --- a/src/wifi/model/wifi-phy-state-helper.cc +++ b/src/wifi/model/wifi-phy-state-helper.cc @@ -22,10 +22,10 @@ #include "ns3/simulator.h" #include "ns3/trace-source-accessor.h" -NS_LOG_COMPONENT_DEFINE ("WifiPhyStateHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WifiPhyStateHelper"); + NS_OBJECT_ENSURE_REGISTERED (WifiPhyStateHelper); TypeId diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 27bbde841..177df8d8d 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -32,10 +32,10 @@ #include "ns3/trace-source-accessor.h" #include -NS_LOG_COMPONENT_DEFINE ("WifiPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WifiPhy"); + /**************************************************************** * This destructor is needed. ****************************************************************/ diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index 15bb3fef6..7d5a67d84 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -31,15 +31,14 @@ #include "wifi-mac-header.h" #include "wifi-mac-trailer.h" -NS_LOG_COMPONENT_DEFINE ("WifiRemoteStationManager"); - - /*************************************************************** * Packet Mode Tagger ***************************************************************/ namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WifiRemoteStationManager"); + class HighLatencyDataTxVectorTag : public Tag { public: diff --git a/src/wifi/model/yans-error-rate-model.cc b/src/wifi/model/yans-error-rate-model.cc index 41fd74f0d..333037cf5 100644 --- a/src/wifi/model/yans-error-rate-model.cc +++ b/src/wifi/model/yans-error-rate-model.cc @@ -24,10 +24,10 @@ #include "wifi-phy.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("YansErrorRateModel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("YansErrorRateModel"); + NS_OBJECT_ENSURE_REGISTERED (YansErrorRateModel); TypeId diff --git a/src/wifi/model/yans-wifi-channel.cc b/src/wifi/model/yans-wifi-channel.cc index 01842901d..a7ab6acd0 100644 --- a/src/wifi/model/yans-wifi-channel.cc +++ b/src/wifi/model/yans-wifi-channel.cc @@ -30,10 +30,10 @@ #include "ns3/propagation-loss-model.h" #include "ns3/propagation-delay-model.h" -NS_LOG_COMPONENT_DEFINE ("YansWifiChannel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("YansWifiChannel"); + NS_OBJECT_ENSURE_REGISTERED (YansWifiChannel); TypeId diff --git a/src/wifi/model/yans-wifi-phy.cc b/src/wifi/model/yans-wifi-phy.cc index 948065068..f2aeb6079 100644 --- a/src/wifi/model/yans-wifi-phy.cc +++ b/src/wifi/model/yans-wifi-phy.cc @@ -38,10 +38,10 @@ #include "ns3/boolean.h" #include -NS_LOG_COMPONENT_DEFINE ("YansWifiPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("YansWifiPhy"); + NS_OBJECT_ENSURE_REGISTERED (YansWifiPhy); TypeId diff --git a/src/wifi/test/block-ack-test-suite.cc b/src/wifi/test/block-ack-test-suite.cc index 5e52629f8..35d594eb5 100644 --- a/src/wifi/test/block-ack-test-suite.cc +++ b/src/wifi/test/block-ack-test-suite.cc @@ -26,6 +26,7 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("BlockAckTest"); + /** * This simple test verifies the correctness of buffering for packets received * under block ack. In order to completely understand this example is important to cite diff --git a/src/wifi/test/tx-duration-test.cc b/src/wifi/test/tx-duration-test.cc index 1396a8997..fa443475a 100644 --- a/src/wifi/test/tx-duration-test.cc +++ b/src/wifi/test/tx-duration-test.cc @@ -25,10 +25,10 @@ #include "ns3/interference-helper.h" #include "ns3/wifi-phy.h" -NS_LOG_COMPONENT_DEFINE ("InterferenceHelperTxDurationTest"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("InterferenceHelperTxDurationTest"); + class TxDurationTest : public TestCase { public: diff --git a/src/wimax/examples/wimax-ipv4.cc b/src/wimax/examples/wimax-ipv4.cc index 807a9cb36..66754b25b 100644 --- a/src/wimax/examples/wimax-ipv4.cc +++ b/src/wimax/examples/wimax-ipv4.cc @@ -60,10 +60,10 @@ #include "ns3/global-route-manager.h" #include -NS_LOG_COMPONENT_DEFINE ("wimaxIpV4Simulation"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("wimaxIpV4Simulation"); + int main (int argc, char *argv[]) { // default values diff --git a/src/wimax/examples/wimax-multicast.cc b/src/wimax/examples/wimax-multicast.cc index dc8c3e319..2d2958a48 100644 --- a/src/wimax/examples/wimax-multicast.cc +++ b/src/wimax/examples/wimax-multicast.cc @@ -63,11 +63,12 @@ #include "ns3/internet-module.h" #include "ns3/vector.h" +using namespace ns3; + NS_LOG_COMPONENT_DEFINE ("WimaxMulticastSimulation"); #define MAXSS 1000 #define MAXDIST 10 // km -using namespace ns3; int main (int argc, char *argv[]) { diff --git a/src/wimax/examples/wimax-simple.cc b/src/wimax/examples/wimax-simple.cc index 79f66ae8e..7f05be300 100644 --- a/src/wimax/examples/wimax-simple.cc +++ b/src/wimax/examples/wimax-simple.cc @@ -54,10 +54,10 @@ #include "ns3/service-flow.h" #include -NS_LOG_COMPONENT_DEFINE ("WimaxSimpleExample"); - using namespace ns3; +NS_LOG_COMPONENT_DEFINE ("WimaxSimpleExample"); + int main (int argc, char *argv[]) { bool verbose = false; diff --git a/src/wimax/helper/wimax-helper.cc b/src/wimax/helper/wimax-helper.cc index 2e2e48174..341844bfb 100644 --- a/src/wimax/helper/wimax-helper.cc +++ b/src/wimax/helper/wimax-helper.cc @@ -36,10 +36,10 @@ #include "ns3/wimax-mac-to-mac-header.h" -NS_LOG_COMPONENT_DEFINE ("WimaxHelper"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WimaxHelper"); + WimaxHelper::WimaxHelper (void) : m_channel (0) { diff --git a/src/wimax/model/bandwidth-manager.cc b/src/wimax/model/bandwidth-manager.cc index 1772233e1..7a9a9ceaf 100644 --- a/src/wimax/model/bandwidth-manager.cc +++ b/src/wimax/model/bandwidth-manager.cc @@ -33,10 +33,10 @@ #include "service-flow-manager.h" #include "connection-manager.h" -NS_LOG_COMPONENT_DEFINE ("BandwidthManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BandwidthManager"); + NS_OBJECT_ENSURE_REGISTERED (BandwidthManager); TypeId BandwidthManager::GetTypeId (void) diff --git a/src/wimax/model/bs-link-manager.cc b/src/wimax/model/bs-link-manager.cc index 9dc50231f..4c5ab4b74 100644 --- a/src/wimax/model/bs-link-manager.cc +++ b/src/wimax/model/bs-link-manager.cc @@ -32,10 +32,10 @@ #include "bs-uplink-scheduler.h" #include "connection-manager.h" -NS_LOG_COMPONENT_DEFINE ("BSLinkManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BSLinkManager"); + NS_OBJECT_ENSURE_REGISTERED (BSLinkManager); TypeId BSLinkManager::GetTypeId (void) diff --git a/src/wimax/model/bs-net-device.cc b/src/wimax/model/bs-net-device.cc index 5d2ae5471..cc4605e04 100644 --- a/src/wimax/model/bs-net-device.cc +++ b/src/wimax/model/bs-net-device.cc @@ -46,10 +46,10 @@ #include "ns3/ipv4-address.h" #include "ns3/llc-snap-header.h" -NS_LOG_COMPONENT_DEFINE ("BaseStationNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BaseStationNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (BaseStationNetDevice); TypeId BaseStationNetDevice::GetTypeId (void) diff --git a/src/wimax/model/bs-scheduler-rtps.cc b/src/wimax/model/bs-scheduler-rtps.cc index d3c6031e7..95b7b3574 100644 --- a/src/wimax/model/bs-scheduler-rtps.cc +++ b/src/wimax/model/bs-scheduler-rtps.cc @@ -37,10 +37,10 @@ #include "service-flow-manager.h" #include "wimax-mac-queue.h" -NS_LOG_COMPONENT_DEFINE ("BSSchedulerRtps"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BSSchedulerRtps"); + NS_OBJECT_ENSURE_REGISTERED (BSSchedulerRtps); TypeId diff --git a/src/wimax/model/bs-scheduler-simple.cc b/src/wimax/model/bs-scheduler-simple.cc index 56c89e5df..41772345f 100644 --- a/src/wimax/model/bs-scheduler-simple.cc +++ b/src/wimax/model/bs-scheduler-simple.cc @@ -35,10 +35,10 @@ #include "service-flow-record.h" #include "service-flow-manager.h" -NS_LOG_COMPONENT_DEFINE ("BSSchedulerSimple"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BSSchedulerSimple"); + NS_OBJECT_ENSURE_REGISTERED (BSSchedulerSimple); TypeId BSSchedulerSimple::GetTypeId (void) diff --git a/src/wimax/model/bs-scheduler.cc b/src/wimax/model/bs-scheduler.cc index 9d4dd4302..51b208813 100644 --- a/src/wimax/model/bs-scheduler.cc +++ b/src/wimax/model/bs-scheduler.cc @@ -35,9 +35,10 @@ #include "service-flow-record.h" #include "service-flow-manager.h" -NS_LOG_COMPONENT_DEFINE ("BSScheduler"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("BSScheduler"); + NS_OBJECT_ENSURE_REGISTERED (BSScheduler); TypeId diff --git a/src/wimax/model/bs-service-flow-manager.cc b/src/wimax/model/bs-service-flow-manager.cc index 95199005f..85f92f2d5 100644 --- a/src/wimax/model/bs-service-flow-manager.cc +++ b/src/wimax/model/bs-service-flow-manager.cc @@ -37,10 +37,11 @@ #include "ss-scheduler.h" #include "ns3/buffer.h" #include "service-flow-record.h" -NS_LOG_COMPONENT_DEFINE ("BsServiceFlowManager"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BsServiceFlowManager"); + BsServiceFlowManager::BsServiceFlowManager (Ptr device) : m_device (device), m_sfidIndex (100), diff --git a/src/wimax/model/bs-uplink-scheduler-mbqos.cc b/src/wimax/model/bs-uplink-scheduler-mbqos.cc index 8b2155cb7..fd886b268 100644 --- a/src/wimax/model/bs-uplink-scheduler-mbqos.cc +++ b/src/wimax/model/bs-uplink-scheduler-mbqos.cc @@ -29,10 +29,10 @@ #include "bandwidth-manager.h" #include "connection-manager.h" -NS_LOG_COMPONENT_DEFINE ("UplinkSchedulerMBQoS"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UplinkSchedulerMBQoS"); + NS_OBJECT_ENSURE_REGISTERED (UplinkSchedulerMBQoS); UplinkSchedulerMBQoS::UplinkSchedulerMBQoS () diff --git a/src/wimax/model/bs-uplink-scheduler-rtps.cc b/src/wimax/model/bs-uplink-scheduler-rtps.cc index a474ebf65..c90ae183e 100644 --- a/src/wimax/model/bs-uplink-scheduler-rtps.cc +++ b/src/wimax/model/bs-uplink-scheduler-rtps.cc @@ -33,9 +33,10 @@ #include "bs-link-manager.h" #include "bandwidth-manager.h" -NS_LOG_COMPONENT_DEFINE ("UplinkSchedulerRtps"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("UplinkSchedulerRtps"); + NS_OBJECT_ENSURE_REGISTERED (UplinkSchedulerRtps); diff --git a/src/wimax/model/bs-uplink-scheduler-simple.cc b/src/wimax/model/bs-uplink-scheduler-simple.cc index 22e44292c..892dfdec7 100644 --- a/src/wimax/model/bs-uplink-scheduler-simple.cc +++ b/src/wimax/model/bs-uplink-scheduler-simple.cc @@ -32,9 +32,10 @@ #include "bs-link-manager.h" #include "bandwidth-manager.h" -NS_LOG_COMPONENT_DEFINE ("UplinkSchedulerSimple"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("UplinkSchedulerSimple"); + NS_OBJECT_ENSURE_REGISTERED (UplinkSchedulerSimple); UplinkSchedulerSimple::UplinkSchedulerSimple (void) diff --git a/src/wimax/model/bs-uplink-scheduler.cc b/src/wimax/model/bs-uplink-scheduler.cc index 855509b9c..95eff3625 100644 --- a/src/wimax/model/bs-uplink-scheduler.cc +++ b/src/wimax/model/bs-uplink-scheduler.cc @@ -32,10 +32,10 @@ #include "bs-link-manager.h" #include "bandwidth-manager.h" -NS_LOG_COMPONENT_DEFINE ("UplinkScheduler"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("UplinkScheduler"); + NS_OBJECT_ENSURE_REGISTERED (UplinkScheduler); UplinkScheduler::UplinkScheduler (void) diff --git a/src/wimax/model/burst-profile-manager.cc b/src/wimax/model/burst-profile-manager.cc index 4bc4ebaaa..24db54bcb 100644 --- a/src/wimax/model/burst-profile-manager.cc +++ b/src/wimax/model/burst-profile-manager.cc @@ -27,10 +27,10 @@ #include "ns3/log.h" #include "mac-messages.h" -NS_LOG_COMPONENT_DEFINE ("BurstProfileManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("BurstProfileManager"); + NS_OBJECT_ENSURE_REGISTERED (BurstProfileManager); TypeId BurstProfileManager::GetTypeId (void) diff --git a/src/wimax/model/connection-manager.cc b/src/wimax/model/connection-manager.cc index 2cca97390..66169140f 100644 --- a/src/wimax/model/connection-manager.cc +++ b/src/wimax/model/connection-manager.cc @@ -31,10 +31,10 @@ #include "ss-net-device.h" #include "bs-net-device.h" -NS_LOG_COMPONENT_DEFINE ("ConnectionManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ConnectionManager"); + NS_OBJECT_ENSURE_REGISTERED (ConnectionManager); TypeId ConnectionManager::GetTypeId (void) diff --git a/src/wimax/model/ipcs-classifier-record.cc b/src/wimax/model/ipcs-classifier-record.cc index d4a7e0148..478bb4bc0 100644 --- a/src/wimax/model/ipcs-classifier-record.cc +++ b/src/wimax/model/ipcs-classifier-record.cc @@ -21,10 +21,11 @@ #include #include "ns3/ipv4-address.h" #include "wimax-tlv.h" -NS_LOG_COMPONENT_DEFINE ("IpcsClassifierRecord"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("IpcsClassifierRecord"); + IpcsClassifierRecord::IpcsClassifierRecord (void) { m_priority = 255; diff --git a/src/wimax/model/ipcs-classifier.cc b/src/wimax/model/ipcs-classifier.cc index 2eae1d756..d7198343a 100644 --- a/src/wimax/model/ipcs-classifier.cc +++ b/src/wimax/model/ipcs-classifier.cc @@ -31,10 +31,10 @@ #include "ns3/udp-l4-protocol.h" #include "ns3/tcp-l4-protocol.h" -NS_LOG_COMPONENT_DEFINE ("IpcsClassifier"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("IpcsClassifier"); + NS_OBJECT_ENSURE_REGISTERED (IpcsClassifier); TypeId IpcsClassifier::GetTypeId (void) diff --git a/src/wimax/model/mac-messages.cc b/src/wimax/model/mac-messages.cc index 9717f7e5d..712dc5428 100644 --- a/src/wimax/model/mac-messages.cc +++ b/src/wimax/model/mac-messages.cc @@ -26,10 +26,10 @@ #include "ns3/log.h" #include "wimax-tlv.h" -NS_LOG_COMPONENT_DEFINE ("MACMESSAGES"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("MACMESSAGES"); + NS_OBJECT_ENSURE_REGISTERED (ManagementMessageType); ManagementMessageType::ManagementMessageType (void) diff --git a/src/wimax/model/service-flow-manager.cc b/src/wimax/model/service-flow-manager.cc index 2d3eda046..6a39be2b9 100644 --- a/src/wimax/model/service-flow-manager.cc +++ b/src/wimax/model/service-flow-manager.cc @@ -39,10 +39,11 @@ #include "ss-scheduler.h" #include "ns3/buffer.h" #include "service-flow-record.h" -NS_LOG_COMPONENT_DEFINE ("ServiceFlowManager"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("ServiceFlowManager"); + NS_OBJECT_ENSURE_REGISTERED (ServiceFlowManager); TypeId ServiceFlowManager::GetTypeId (void) diff --git a/src/wimax/model/simple-ofdm-wimax-channel.cc b/src/wimax/model/simple-ofdm-wimax-channel.cc index b51f81033..c645ae00f 100644 --- a/src/wimax/model/simple-ofdm-wimax-channel.cc +++ b/src/wimax/model/simple-ofdm-wimax-channel.cc @@ -33,11 +33,11 @@ #include "ns3/cost231-propagation-loss-model.h" #include "simple-ofdm-send-param.h" -NS_LOG_COMPONENT_DEFINE ("simpleOfdmWimaxChannel"); - namespace ns3 { -// NS_OBJECT_ENSURE_REGISTERED (simpleOfdmWimaxChannel) -// ; + +NS_LOG_COMPONENT_DEFINE ("simpleOfdmWimaxChannel"); + +// NS_OBJECT_ENSURE_REGISTERED (simpleOfdmWimaxChannel); SimpleOfdmWimaxChannel::SimpleOfdmWimaxChannel (void) diff --git a/src/wimax/model/simple-ofdm-wimax-phy.cc b/src/wimax/model/simple-ofdm-wimax-phy.cc index 0e65e4199..008030f23 100644 --- a/src/wimax/model/simple-ofdm-wimax-phy.cc +++ b/src/wimax/model/simple-ofdm-wimax-phy.cc @@ -35,9 +35,10 @@ #include #include -NS_LOG_COMPONENT_DEFINE ("SimpleOfdmWimaxPhy"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SimpleOfdmWimaxPhy"); + NS_OBJECT_ENSURE_REGISTERED (SimpleOfdmWimaxPhy); TypeId SimpleOfdmWimaxPhy::GetTypeId (void) diff --git a/src/wimax/model/snr-to-block-error-rate-manager.cc b/src/wimax/model/snr-to-block-error-rate-manager.cc index ec340211e..58534e7aa 100644 --- a/src/wimax/model/snr-to-block-error-rate-manager.cc +++ b/src/wimax/model/snr-to-block-error-rate-manager.cc @@ -27,10 +27,10 @@ #include "ns3/assert.h" #include -NS_LOG_COMPONENT_DEFINE ("SNRToBlockErrorRateManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SNRToBlockErrorRateManager"); + SNRToBlockErrorRateManager::SNRToBlockErrorRateManager (void) { diff --git a/src/wimax/model/ss-link-manager.cc b/src/wimax/model/ss-link-manager.cc index ba99cf55b..94845e82b 100644 --- a/src/wimax/model/ss-link-manager.cc +++ b/src/wimax/model/ss-link-manager.cc @@ -31,10 +31,10 @@ #include "burst-profile-manager.h" #include "service-flow-manager.h" -NS_LOG_COMPONENT_DEFINE ("SSLinkManager"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SSLinkManager"); + NS_OBJECT_ENSURE_REGISTERED (SSLinkManager); TypeId SSLinkManager::GetTypeId (void) diff --git a/src/wimax/model/ss-manager.cc b/src/wimax/model/ss-manager.cc index 689957e57..23279e892 100644 --- a/src/wimax/model/ss-manager.cc +++ b/src/wimax/model/ss-manager.cc @@ -25,9 +25,10 @@ #include "ns3/log.h" #include "service-flow.h" -NS_LOG_COMPONENT_DEFINE ("SSManager"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("SSManager"); + NS_OBJECT_ENSURE_REGISTERED (SSManager); TypeId SSManager::GetTypeId (void) diff --git a/src/wimax/model/ss-net-device.cc b/src/wimax/model/ss-net-device.cc index 19a0a225c..8b0203773 100644 --- a/src/wimax/model/ss-net-device.cc +++ b/src/wimax/model/ss-net-device.cc @@ -42,10 +42,10 @@ #include "ss-link-manager.h" #include "bandwidth-manager.h" -NS_LOG_COMPONENT_DEFINE ("SubscriberStationNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SubscriberStationNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (SubscriberStationNetDevice); Time SubscriberStationNetDevice::GetDefaultLostDlMapInterval () diff --git a/src/wimax/model/ss-scheduler.cc b/src/wimax/model/ss-scheduler.cc index 02814229f..1ee58b438 100644 --- a/src/wimax/model/ss-scheduler.cc +++ b/src/wimax/model/ss-scheduler.cc @@ -31,9 +31,10 @@ #include "service-flow-record.h" #include "service-flow-manager.h" -NS_LOG_COMPONENT_DEFINE ("SSScheduler"); - namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("SSScheduler"); + NS_OBJECT_ENSURE_REGISTERED (SSScheduler); TypeId SSScheduler::GetTypeId (void) diff --git a/src/wimax/model/ss-service-flow-manager.cc b/src/wimax/model/ss-service-flow-manager.cc index 69c72a000..fed5e9ac3 100644 --- a/src/wimax/model/ss-service-flow-manager.cc +++ b/src/wimax/model/ss-service-flow-manager.cc @@ -38,10 +38,11 @@ #include "ss-scheduler.h" #include "ns3/buffer.h" #include "service-flow-record.h" -NS_LOG_COMPONENT_DEFINE ("SsServiceFlowManager"); namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("SsServiceFlowManager"); + SsServiceFlowManager::SsServiceFlowManager (Ptr device) : m_device (device), m_maxDsaReqRetries (100), diff --git a/src/wimax/model/wimax-channel.cc b/src/wimax/model/wimax-channel.cc index c877d6c3d..1f9f10490 100644 --- a/src/wimax/model/wimax-channel.cc +++ b/src/wimax/model/wimax-channel.cc @@ -23,10 +23,10 @@ #include "wimax-channel.h" #include "wimax-phy.h" -NS_LOG_COMPONENT_DEFINE ("WimaxChannel"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WimaxChannel"); + NS_OBJECT_ENSURE_REGISTERED (WimaxChannel); TypeId WimaxChannel::GetTypeId (void) diff --git a/src/wimax/model/wimax-mac-queue.cc b/src/wimax/model/wimax-mac-queue.cc index b537505e4..e23e38ae5 100644 --- a/src/wimax/model/wimax-mac-queue.cc +++ b/src/wimax/model/wimax-mac-queue.cc @@ -27,10 +27,10 @@ #include "ns3/simulator.h" #include "ns3/log.h" -NS_LOG_COMPONENT_DEFINE ("WimaxMacQueue"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WimaxMacQueue"); + NS_OBJECT_ENSURE_REGISTERED (WimaxMacQueue); WimaxMacQueue::QueueElement::QueueElement (void) diff --git a/src/wimax/model/wimax-net-device.cc b/src/wimax/model/wimax-net-device.cc index 46c8836cb..2a1414b8f 100644 --- a/src/wimax/model/wimax-net-device.cc +++ b/src/wimax/model/wimax-net-device.cc @@ -39,10 +39,10 @@ #include "connection-manager.h" #include "bandwidth-manager.h" -NS_LOG_COMPONENT_DEFINE ("WimaxNetDevice"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WimaxNetDevice"); + NS_OBJECT_ENSURE_REGISTERED (WimaxNetDevice); uint32_t WimaxNetDevice::m_nrFrames = 0; diff --git a/src/wimax/model/wimax-phy.cc b/src/wimax/model/wimax-phy.cc index 23093f0a6..1cc12d5c2 100644 --- a/src/wimax/model/wimax-phy.cc +++ b/src/wimax/model/wimax-phy.cc @@ -30,10 +30,10 @@ #include "ns3/uinteger.h" #include "ns3/double.h" -NS_LOG_COMPONENT_DEFINE ("WimaxPhy"); - namespace ns3 { +NS_LOG_COMPONENT_DEFINE ("WimaxPhy"); + NS_OBJECT_ENSURE_REGISTERED (WimaxPhy); TypeId WimaxPhy::GetTypeId (void) diff --git a/src/wimax/model/wimax-tlv.cc b/src/wimax/model/wimax-tlv.cc index bf7e79aaf..3ab28a269 100644 --- a/src/wimax/model/wimax-tlv.cc +++ b/src/wimax/model/wimax-tlv.cc @@ -21,11 +21,11 @@ #include "wimax-tlv.h" -NS_LOG_COMPONENT_DEFINE ("Tlv"); - namespace ns3 { -// NS_OBJECT_ENSURE_REGISTERED ("Tlv") -// ; + +NS_LOG_COMPONENT_DEFINE ("Tlv"); + +// NS_OBJECT_ENSURE_REGISTERED ("Tlv"); TypeId Tlv::GetInstanceTypeId (void) const {