Files
ns-3-dev/examples/wireless/multirate.cc
T
Lalith Suresh 77439e1c80 Converts csma, emu, tap-bridge, point-to-point, wifi and wimax modules into modular format
--HG--
rename : examples/csma/csma-broadcast.cc => src/devices/csma/examples/csma-broadcast.cc
rename : examples/csma/csma-multicast.cc => src/devices/csma/examples/csma-multicast.cc
rename : examples/csma/csma-one-subnet.cc => src/devices/csma/examples/csma-one-subnet.cc
rename : examples/csma/csma-packet-socket.cc => src/devices/csma/examples/csma-packet-socket.cc
rename : examples/csma/csma-ping.cc => src/devices/csma/examples/csma-ping.cc
rename : examples/csma/csma-raw-ip-socket.cc => src/devices/csma/examples/csma-raw-ip-socket.cc
rename : examples/csma/csma-star.cc => src/devices/csma/examples/csma-star.cc
rename : examples/csma/waf => src/devices/csma/examples/waf
rename : examples/csma/wscript => src/devices/csma/examples/wscript
rename : src/helper/csma-helper.cc => src/devices/csma/helper/csma-helper.cc
rename : src/helper/csma-helper.h => src/devices/csma/helper/csma-helper.h
rename : src/helper/csma-star-helper.cc => src/devices/csma/helper/csma-star-helper.cc
rename : src/helper/csma-star-helper.h => src/devices/csma/helper/csma-star-helper.h
rename : src/devices/csma/backoff.cc => src/devices/csma/model/backoff.cc
rename : src/devices/csma/backoff.h => src/devices/csma/model/backoff.h
rename : src/devices/csma/csma-channel.cc => src/devices/csma/model/csma-channel.cc
rename : src/devices/csma/csma-channel.h => src/devices/csma/model/csma-channel.h
rename : src/devices/csma/csma-net-device.cc => src/devices/csma/model/csma-net-device.cc
rename : src/devices/csma/csma-net-device.h => src/devices/csma/model/csma-net-device.h
rename : src/devices/csma/csma.h => src/devices/csma/model/csma.h
rename : src/devices/emu/emu.h => src/devices/emu/doc/emu.h
rename : examples/emulation/emu-ping.cc => src/devices/emu/examples/emu-ping.cc
rename : examples/emulation/emu-udp-echo.cc => src/devices/emu/examples/emu-udp-echo.cc
rename : examples/emulation/waf => src/devices/emu/examples/waf
rename : examples/emulation/wscript => src/devices/emu/examples/wscript
rename : src/helper/emu-helper.cc => src/devices/emu/helper/emu-helper.cc
rename : src/helper/emu-helper.h => src/devices/emu/helper/emu-helper.h
rename : src/devices/emu/emu-encode-decode.cc => src/devices/emu/model/emu-encode-decode.cc
rename : src/devices/emu/emu-encode-decode.h => src/devices/emu/model/emu-encode-decode.h
rename : src/devices/emu/emu-net-device.cc => src/devices/emu/model/emu-net-device.cc
rename : src/devices/emu/emu-net-device.h => src/devices/emu/model/emu-net-device.h
rename : src/devices/emu/emu-sock-creator.cc => src/devices/emu/model/emu-sock-creator.cc
rename : src/devices/point-to-point/point-to-point.h => src/devices/point-to-point/doc/point-to-point.h
rename : src/helper/point-to-point-dumbbell-helper.cc => src/devices/point-to-point/helper/point-to-point-dumbbell-helper.cc
rename : src/helper/point-to-point-dumbbell-helper.h => src/devices/point-to-point/helper/point-to-point-dumbbell-helper.h
rename : src/helper/point-to-point-grid-helper.cc => src/devices/point-to-point/helper/point-to-point-grid-helper.cc
rename : src/helper/point-to-point-grid-helper.h => src/devices/point-to-point/helper/point-to-point-grid-helper.h
rename : src/helper/point-to-point-helper.cc => src/devices/point-to-point/helper/point-to-point-helper.cc
rename : src/helper/point-to-point-helper.h => src/devices/point-to-point/helper/point-to-point-helper.h
rename : src/helper/point-to-point-star-helper.cc => src/devices/point-to-point/helper/point-to-point-star-helper.cc
rename : src/helper/point-to-point-star-helper.h => src/devices/point-to-point/helper/point-to-point-star-helper.h
rename : src/devices/point-to-point/point-to-point-channel.cc => src/devices/point-to-point/model/point-to-point-channel.cc
rename : src/devices/point-to-point/point-to-point-channel.h => src/devices/point-to-point/model/point-to-point-channel.h
rename : src/devices/point-to-point/point-to-point-net-device.cc => src/devices/point-to-point/model/point-to-point-net-device.cc
rename : src/devices/point-to-point/point-to-point-net-device.h => src/devices/point-to-point/model/point-to-point-net-device.h
rename : src/devices/point-to-point/point-to-point-remote-channel.cc => src/devices/point-to-point/model/point-to-point-remote-channel.cc
rename : src/devices/point-to-point/point-to-point-remote-channel.h => src/devices/point-to-point/model/point-to-point-remote-channel.h
rename : src/devices/point-to-point/point-to-point-test.cc => src/devices/point-to-point/model/point-to-point-test.cc
rename : src/devices/point-to-point/ppp-header.cc => src/devices/point-to-point/model/ppp-header.cc
rename : src/devices/point-to-point/ppp-header.h => src/devices/point-to-point/model/ppp-header.h
rename : src/devices/tap-bridge/tap.h => src/devices/tap-bridge/doc/tap.h
rename : examples/tap/lxc-left.conf => src/devices/tap-bridge/examples/lxc-left.conf
rename : examples/tap/lxc-right.conf => src/devices/tap-bridge/examples/lxc-right.conf
rename : examples/tap/tap-csma-virtual-machine.cc => src/devices/tap-bridge/examples/tap-csma-virtual-machine.cc
rename : examples/tap/tap-csma-virtual-machine.py => src/devices/tap-bridge/examples/tap-csma-virtual-machine.py
rename : examples/tap/tap-csma.cc => src/devices/tap-bridge/examples/tap-csma.cc
rename : examples/tap/tap-wifi-dumbbell.cc => src/devices/tap-bridge/examples/tap-wifi-dumbbell.cc
rename : examples/tap/tap-wifi-virtual-machine.cc => src/devices/tap-bridge/examples/tap-wifi-virtual-machine.cc
rename : examples/tap/tap-wifi-virtual-machine.py => src/devices/tap-bridge/examples/tap-wifi-virtual-machine.py
rename : examples/tap/virtual-network-setup.sh => src/devices/tap-bridge/examples/virtual-network-setup.sh
rename : examples/tap/virtual-network-teardown.sh => src/devices/tap-bridge/examples/virtual-network-teardown.sh
rename : examples/tap/waf => src/devices/tap-bridge/examples/waf
rename : examples/tap/wscript => src/devices/tap-bridge/examples/wscript
rename : src/helper/tap-bridge-helper.cc => src/devices/tap-bridge/helper/tap-bridge-helper.cc
rename : src/helper/tap-bridge-helper.h => src/devices/tap-bridge/helper/tap-bridge-helper.h
rename : src/devices/tap-bridge/tap-bridge.cc => src/devices/tap-bridge/model/tap-bridge.cc
rename : src/devices/tap-bridge/tap-bridge.h => src/devices/tap-bridge/model/tap-bridge.h
rename : src/devices/tap-bridge/tap-creator.cc => src/devices/tap-bridge/model/tap-creator.cc
rename : src/devices/tap-bridge/tap-encode-decode.cc => src/devices/tap-bridge/model/tap-encode-decode.cc
rename : src/devices/tap-bridge/tap-encode-decode.h => src/devices/tap-bridge/model/tap-encode-decode.h
rename : src/devices/wifi/wifi.h => src/devices/wifi/doc/wifi.h
rename : src/helper/nqos-wifi-mac-helper.cc => src/devices/wifi/helper/nqos-wifi-mac-helper.cc
rename : src/helper/nqos-wifi-mac-helper.h => src/devices/wifi/helper/nqos-wifi-mac-helper.h
rename : src/helper/qos-wifi-mac-helper.cc => src/devices/wifi/helper/qos-wifi-mac-helper.cc
rename : src/helper/qos-wifi-mac-helper.h => src/devices/wifi/helper/qos-wifi-mac-helper.h
rename : src/helper/wifi-helper.cc => src/devices/wifi/helper/wifi-helper.cc
rename : src/helper/wifi-helper.h => src/devices/wifi/helper/wifi-helper.h
rename : src/helper/yans-wifi-helper.cc => src/devices/wifi/helper/yans-wifi-helper.cc
rename : src/helper/yans-wifi-helper.h => src/devices/wifi/helper/yans-wifi-helper.h
rename : src/devices/wifi/aarf-wifi-manager.cc => src/devices/wifi/model/aarf-wifi-manager.cc
rename : src/devices/wifi/aarf-wifi-manager.h => src/devices/wifi/model/aarf-wifi-manager.h
rename : src/devices/wifi/aarfcd-wifi-manager.cc => src/devices/wifi/model/aarfcd-wifi-manager.cc
rename : src/devices/wifi/aarfcd-wifi-manager.h => src/devices/wifi/model/aarfcd-wifi-manager.h
rename : src/devices/wifi/adhoc-wifi-mac.cc => src/devices/wifi/model/adhoc-wifi-mac.cc
rename : src/devices/wifi/adhoc-wifi-mac.h => src/devices/wifi/model/adhoc-wifi-mac.h
rename : src/devices/wifi/amrr-wifi-manager.cc => src/devices/wifi/model/amrr-wifi-manager.cc
rename : src/devices/wifi/amrr-wifi-manager.h => src/devices/wifi/model/amrr-wifi-manager.h
rename : src/devices/wifi/amsdu-subframe-header.cc => src/devices/wifi/model/amsdu-subframe-header.cc
rename : src/devices/wifi/amsdu-subframe-header.h => src/devices/wifi/model/amsdu-subframe-header.h
rename : src/devices/wifi/ap-wifi-mac.cc => src/devices/wifi/model/ap-wifi-mac.cc
rename : src/devices/wifi/ap-wifi-mac.h => src/devices/wifi/model/ap-wifi-mac.h
rename : src/devices/wifi/arf-wifi-manager.cc => src/devices/wifi/model/arf-wifi-manager.cc
rename : src/devices/wifi/arf-wifi-manager.h => src/devices/wifi/model/arf-wifi-manager.h
rename : src/devices/wifi/block-ack-agreement.cc => src/devices/wifi/model/block-ack-agreement.cc
rename : src/devices/wifi/block-ack-agreement.h => src/devices/wifi/model/block-ack-agreement.h
rename : src/devices/wifi/block-ack-cache.cc => src/devices/wifi/model/block-ack-cache.cc
rename : src/devices/wifi/block-ack-cache.h => src/devices/wifi/model/block-ack-cache.h
rename : src/devices/wifi/block-ack-manager.cc => src/devices/wifi/model/block-ack-manager.cc
rename : src/devices/wifi/block-ack-manager.h => src/devices/wifi/model/block-ack-manager.h
rename : src/devices/wifi/block-ack-test-suite.cc => src/devices/wifi/model/block-ack-test-suite.cc
rename : src/devices/wifi/capability-information.cc => src/devices/wifi/model/capability-information.cc
rename : src/devices/wifi/capability-information.h => src/devices/wifi/model/capability-information.h
rename : src/devices/wifi/cara-wifi-manager.cc => src/devices/wifi/model/cara-wifi-manager.cc
rename : src/devices/wifi/cara-wifi-manager.h => src/devices/wifi/model/cara-wifi-manager.h
rename : src/devices/wifi/constant-rate-wifi-manager.cc => src/devices/wifi/model/constant-rate-wifi-manager.cc
rename : src/devices/wifi/constant-rate-wifi-manager.h => src/devices/wifi/model/constant-rate-wifi-manager.h
rename : src/devices/wifi/ctrl-headers.cc => src/devices/wifi/model/ctrl-headers.cc
rename : src/devices/wifi/ctrl-headers.h => src/devices/wifi/model/ctrl-headers.h
rename : src/devices/wifi/dca-txop.cc => src/devices/wifi/model/dca-txop.cc
rename : src/devices/wifi/dca-txop.h => src/devices/wifi/model/dca-txop.h
rename : src/devices/wifi/dcf-manager-test.cc => src/devices/wifi/model/dcf-manager-test.cc
rename : src/devices/wifi/dcf-manager.cc => src/devices/wifi/model/dcf-manager.cc
rename : src/devices/wifi/dcf-manager.h => src/devices/wifi/model/dcf-manager.h
rename : src/devices/wifi/dcf.cc => src/devices/wifi/model/dcf.cc
rename : src/devices/wifi/dcf.h => src/devices/wifi/model/dcf.h
rename : src/devices/wifi/dsss-error-rate-model.cc => src/devices/wifi/model/dsss-error-rate-model.cc
rename : src/devices/wifi/dsss-error-rate-model.h => src/devices/wifi/model/dsss-error-rate-model.h
rename : src/devices/wifi/edca-txop-n.cc => src/devices/wifi/model/edca-txop-n.cc
rename : src/devices/wifi/edca-txop-n.h => src/devices/wifi/model/edca-txop-n.h
rename : src/devices/wifi/error-rate-model.cc => src/devices/wifi/model/error-rate-model.cc
rename : src/devices/wifi/error-rate-model.h => src/devices/wifi/model/error-rate-model.h
rename : src/devices/wifi/ideal-wifi-manager.cc => src/devices/wifi/model/ideal-wifi-manager.cc
rename : src/devices/wifi/ideal-wifi-manager.h => src/devices/wifi/model/ideal-wifi-manager.h
rename : src/devices/wifi/interference-helper-tx-duration-test.cc => src/devices/wifi/model/interference-helper-tx-duration-test.cc
rename : src/devices/wifi/interference-helper.cc => src/devices/wifi/model/interference-helper.cc
rename : src/devices/wifi/interference-helper.h => src/devices/wifi/model/interference-helper.h
rename : src/devices/wifi/mac-low.cc => src/devices/wifi/model/mac-low.cc
rename : src/devices/wifi/mac-low.h => src/devices/wifi/model/mac-low.h
rename : src/devices/wifi/mac-rx-middle.cc => src/devices/wifi/model/mac-rx-middle.cc
rename : src/devices/wifi/mac-rx-middle.h => src/devices/wifi/model/mac-rx-middle.h
rename : src/devices/wifi/mac-tx-middle.cc => src/devices/wifi/model/mac-tx-middle.cc
rename : src/devices/wifi/mac-tx-middle.h => src/devices/wifi/model/mac-tx-middle.h
rename : src/devices/wifi/mgt-headers.cc => src/devices/wifi/model/mgt-headers.cc
rename : src/devices/wifi/mgt-headers.h => src/devices/wifi/model/mgt-headers.h
rename : src/devices/wifi/minstrel-wifi-manager.cc => src/devices/wifi/model/minstrel-wifi-manager.cc
rename : src/devices/wifi/minstrel-wifi-manager.h => src/devices/wifi/model/minstrel-wifi-manager.h
rename : src/devices/wifi/msdu-aggregator.cc => src/devices/wifi/model/msdu-aggregator.cc
rename : src/devices/wifi/msdu-aggregator.h => src/devices/wifi/model/msdu-aggregator.h
rename : src/devices/wifi/msdu-standard-aggregator.cc => src/devices/wifi/model/msdu-standard-aggregator.cc
rename : src/devices/wifi/msdu-standard-aggregator.h => src/devices/wifi/model/msdu-standard-aggregator.h
rename : src/devices/wifi/nist-error-rate-model.cc => src/devices/wifi/model/nist-error-rate-model.cc
rename : src/devices/wifi/nist-error-rate-model.h => src/devices/wifi/model/nist-error-rate-model.h
rename : src/devices/wifi/onoe-wifi-manager.cc => src/devices/wifi/model/onoe-wifi-manager.cc
rename : src/devices/wifi/onoe-wifi-manager.h => src/devices/wifi/model/onoe-wifi-manager.h
rename : src/devices/wifi/originator-block-ack-agreement.cc => src/devices/wifi/model/originator-block-ack-agreement.cc
rename : src/devices/wifi/originator-block-ack-agreement.h => src/devices/wifi/model/originator-block-ack-agreement.h
rename : src/devices/wifi/qos-blocked-destinations.cc => src/devices/wifi/model/qos-blocked-destinations.cc
rename : src/devices/wifi/qos-blocked-destinations.h => src/devices/wifi/model/qos-blocked-destinations.h
rename : src/devices/wifi/qos-tag.cc => src/devices/wifi/model/qos-tag.cc
rename : src/devices/wifi/qos-tag.h => src/devices/wifi/model/qos-tag.h
rename : src/devices/wifi/qos-utils.cc => src/devices/wifi/model/qos-utils.cc
rename : src/devices/wifi/qos-utils.h => src/devices/wifi/model/qos-utils.h
rename : src/devices/wifi/random-stream.cc => src/devices/wifi/model/random-stream.cc
rename : src/devices/wifi/random-stream.h => src/devices/wifi/model/random-stream.h
rename : src/devices/wifi/regular-wifi-mac.cc => src/devices/wifi/model/regular-wifi-mac.cc
rename : src/devices/wifi/regular-wifi-mac.h => src/devices/wifi/model/regular-wifi-mac.h
rename : src/devices/wifi/rraa-wifi-manager.cc => src/devices/wifi/model/rraa-wifi-manager.cc
rename : src/devices/wifi/rraa-wifi-manager.h => src/devices/wifi/model/rraa-wifi-manager.h
rename : src/devices/wifi/ssid.cc => src/devices/wifi/model/ssid.cc
rename : src/devices/wifi/ssid.h => src/devices/wifi/model/ssid.h
rename : src/devices/wifi/sta-wifi-mac.cc => src/devices/wifi/model/sta-wifi-mac.cc
rename : src/devices/wifi/sta-wifi-mac.h => src/devices/wifi/model/sta-wifi-mac.h
rename : src/devices/wifi/status-code.cc => src/devices/wifi/model/status-code.cc
rename : src/devices/wifi/status-code.h => src/devices/wifi/model/status-code.h
rename : src/devices/wifi/supported-rates.cc => src/devices/wifi/model/supported-rates.cc
rename : src/devices/wifi/supported-rates.h => src/devices/wifi/model/supported-rates.h
rename : src/devices/wifi/wifi-channel.cc => src/devices/wifi/model/wifi-channel.cc
rename : src/devices/wifi/wifi-channel.h => src/devices/wifi/model/wifi-channel.h
rename : src/devices/wifi/wifi-information-element-vector.cc => src/devices/wifi/model/wifi-information-element-vector.cc
rename : src/devices/wifi/wifi-information-element-vector.h => src/devices/wifi/model/wifi-information-element-vector.h
rename : src/devices/wifi/wifi-information-element.cc => src/devices/wifi/model/wifi-information-element.cc
rename : src/devices/wifi/wifi-information-element.h => src/devices/wifi/model/wifi-information-element.h
rename : src/devices/wifi/wifi-mac-header.cc => src/devices/wifi/model/wifi-mac-header.cc
rename : src/devices/wifi/wifi-mac-header.h => src/devices/wifi/model/wifi-mac-header.h
rename : src/devices/wifi/wifi-mac-queue.cc => src/devices/wifi/model/wifi-mac-queue.cc
rename : src/devices/wifi/wifi-mac-queue.h => src/devices/wifi/model/wifi-mac-queue.h
rename : src/devices/wifi/wifi-mac-trailer.cc => src/devices/wifi/model/wifi-mac-trailer.cc
rename : src/devices/wifi/wifi-mac-trailer.h => src/devices/wifi/model/wifi-mac-trailer.h
rename : src/devices/wifi/wifi-mac.cc => src/devices/wifi/model/wifi-mac.cc
rename : src/devices/wifi/wifi-mac.h => src/devices/wifi/model/wifi-mac.h
rename : src/devices/wifi/wifi-mode.cc => src/devices/wifi/model/wifi-mode.cc
rename : src/devices/wifi/wifi-mode.h => src/devices/wifi/model/wifi-mode.h
rename : src/devices/wifi/wifi-net-device.cc => src/devices/wifi/model/wifi-net-device.cc
rename : src/devices/wifi/wifi-net-device.h => src/devices/wifi/model/wifi-net-device.h
rename : src/devices/wifi/wifi-phy-standard.h => src/devices/wifi/model/wifi-phy-standard.h
rename : src/devices/wifi/wifi-phy-state-helper.cc => src/devices/wifi/model/wifi-phy-state-helper.cc
rename : src/devices/wifi/wifi-phy-state-helper.h => src/devices/wifi/model/wifi-phy-state-helper.h
rename : src/devices/wifi/wifi-phy.cc => src/devices/wifi/model/wifi-phy.cc
rename : src/devices/wifi/wifi-phy.h => src/devices/wifi/model/wifi-phy.h
rename : src/devices/wifi/wifi-preamble.h => src/devices/wifi/model/wifi-preamble.h
rename : src/devices/wifi/wifi-remote-station-manager.cc => src/devices/wifi/model/wifi-remote-station-manager.cc
rename : src/devices/wifi/wifi-remote-station-manager.h => src/devices/wifi/model/wifi-remote-station-manager.h
rename : src/devices/wifi/yans-error-rate-model.cc => src/devices/wifi/model/yans-error-rate-model.cc
rename : src/devices/wifi/yans-error-rate-model.h => src/devices/wifi/model/yans-error-rate-model.h
rename : src/devices/wifi/yans-wifi-channel.cc => src/devices/wifi/model/yans-wifi-channel.cc
rename : src/devices/wifi/yans-wifi-channel.h => src/devices/wifi/model/yans-wifi-channel.h
rename : src/devices/wifi/yans-wifi-phy.cc => src/devices/wifi/model/yans-wifi-phy.cc
rename : src/devices/wifi/yans-wifi-phy.h => src/devices/wifi/model/yans-wifi-phy.h
rename : src/devices/wifi/wifi-phy-test.cc => src/devices/wifi/test/wifi-phy-test.cc
rename : src/devices/wifi/wifi-test.cc => src/devices/wifi/test/wifi-test.cc
rename : src/devices/wimax/wimax.h => src/devices/wimax/doc/wimax.h
rename : examples/wimax/waf => src/devices/wimax/examples/waf
rename : examples/wimax/wimax-ipv4.cc => src/devices/wimax/examples/wimax-ipv4.cc
rename : examples/wimax/wimax-multicast.cc => src/devices/wimax/examples/wimax-multicast.cc
rename : examples/wimax/wimax-simple.cc => src/devices/wimax/examples/wimax-simple.cc
rename : examples/wimax/wscript => src/devices/wimax/examples/wscript
rename : src/helper/wimax-helper.cc => src/devices/wimax/helper/wimax-helper.cc
rename : src/helper/wimax-helper.h => src/devices/wimax/helper/wimax-helper.h
rename : src/devices/wimax/bandwidth-manager.cc => src/devices/wimax/model/bandwidth-manager.cc
rename : src/devices/wimax/bandwidth-manager.h => src/devices/wimax/model/bandwidth-manager.h
rename : src/devices/wimax/bs-link-manager.cc => src/devices/wimax/model/bs-link-manager.cc
rename : src/devices/wimax/bs-link-manager.h => src/devices/wimax/model/bs-link-manager.h
rename : src/devices/wimax/bs-net-device.cc => src/devices/wimax/model/bs-net-device.cc
rename : src/devices/wimax/bs-net-device.h => src/devices/wimax/model/bs-net-device.h
rename : src/devices/wimax/bs-scheduler-rtps.cc => src/devices/wimax/model/bs-scheduler-rtps.cc
rename : src/devices/wimax/bs-scheduler-rtps.h => src/devices/wimax/model/bs-scheduler-rtps.h
rename : src/devices/wimax/bs-scheduler-simple.cc => src/devices/wimax/model/bs-scheduler-simple.cc
rename : src/devices/wimax/bs-scheduler-simple.h => src/devices/wimax/model/bs-scheduler-simple.h
rename : src/devices/wimax/bs-scheduler.cc => src/devices/wimax/model/bs-scheduler.cc
rename : src/devices/wimax/bs-scheduler.h => src/devices/wimax/model/bs-scheduler.h
rename : src/devices/wimax/bs-service-flow-manager.cc => src/devices/wimax/model/bs-service-flow-manager.cc
rename : src/devices/wimax/bs-service-flow-manager.h => src/devices/wimax/model/bs-service-flow-manager.h
rename : src/devices/wimax/bs-uplink-scheduler-mbqos.cc => src/devices/wimax/model/bs-uplink-scheduler-mbqos.cc
rename : src/devices/wimax/bs-uplink-scheduler-mbqos.h => src/devices/wimax/model/bs-uplink-scheduler-mbqos.h
rename : src/devices/wimax/bs-uplink-scheduler-rtps.cc => src/devices/wimax/model/bs-uplink-scheduler-rtps.cc
rename : src/devices/wimax/bs-uplink-scheduler-rtps.h => src/devices/wimax/model/bs-uplink-scheduler-rtps.h
rename : src/devices/wimax/bs-uplink-scheduler-simple.cc => src/devices/wimax/model/bs-uplink-scheduler-simple.cc
rename : src/devices/wimax/bs-uplink-scheduler-simple.h => src/devices/wimax/model/bs-uplink-scheduler-simple.h
rename : src/devices/wimax/bs-uplink-scheduler.cc => src/devices/wimax/model/bs-uplink-scheduler.cc
rename : src/devices/wimax/bs-uplink-scheduler.h => src/devices/wimax/model/bs-uplink-scheduler.h
rename : src/devices/wimax/burst-profile-manager.cc => src/devices/wimax/model/burst-profile-manager.cc
rename : src/devices/wimax/burst-profile-manager.h => src/devices/wimax/model/burst-profile-manager.h
rename : src/devices/wimax/bvec.h => src/devices/wimax/model/bvec.h
rename : src/devices/wimax/cid-factory.cc => src/devices/wimax/model/cid-factory.cc
rename : src/devices/wimax/cid-factory.h => src/devices/wimax/model/cid-factory.h
rename : src/devices/wimax/cid.cc => src/devices/wimax/model/cid.cc
rename : src/devices/wimax/cid.h => src/devices/wimax/model/cid.h
rename : src/devices/wimax/connection-manager.cc => src/devices/wimax/model/connection-manager.cc
rename : src/devices/wimax/connection-manager.h => src/devices/wimax/model/connection-manager.h
rename : src/devices/wimax/crc8.cc => src/devices/wimax/model/crc8.cc
rename : src/devices/wimax/crc8.h => src/devices/wimax/model/crc8.h
rename : src/devices/wimax/cs-parameters.cc => src/devices/wimax/model/cs-parameters.cc
rename : src/devices/wimax/cs-parameters.h => src/devices/wimax/model/cs-parameters.h
rename : src/devices/wimax/default-traces.h => src/devices/wimax/model/default-traces.h
rename : src/devices/wimax/dl-mac-messages.cc => src/devices/wimax/model/dl-mac-messages.cc
rename : src/devices/wimax/dl-mac-messages.h => src/devices/wimax/model/dl-mac-messages.h
rename : src/devices/wimax/ipcs-classifier-record.cc => src/devices/wimax/model/ipcs-classifier-record.cc
rename : src/devices/wimax/ipcs-classifier-record.h => src/devices/wimax/model/ipcs-classifier-record.h
rename : src/devices/wimax/ipcs-classifier.cc => src/devices/wimax/model/ipcs-classifier.cc
rename : src/devices/wimax/ipcs-classifier.h => src/devices/wimax/model/ipcs-classifier.h
rename : src/devices/wimax/mac-messages.cc => src/devices/wimax/model/mac-messages.cc
rename : src/devices/wimax/mac-messages.h => src/devices/wimax/model/mac-messages.h
rename : src/devices/wimax/ofdm-downlink-frame-prefix.cc => src/devices/wimax/model/ofdm-downlink-frame-prefix.cc
rename : src/devices/wimax/ofdm-downlink-frame-prefix.h => src/devices/wimax/model/ofdm-downlink-frame-prefix.h
rename : src/devices/wimax/send-params.cc => src/devices/wimax/model/send-params.cc
rename : src/devices/wimax/send-params.h => src/devices/wimax/model/send-params.h
rename : src/devices/wimax/service-flow-manager.cc => src/devices/wimax/model/service-flow-manager.cc
rename : src/devices/wimax/service-flow-manager.h => src/devices/wimax/model/service-flow-manager.h
rename : src/devices/wimax/service-flow-record.cc => src/devices/wimax/model/service-flow-record.cc
rename : src/devices/wimax/service-flow-record.h => src/devices/wimax/model/service-flow-record.h
rename : src/devices/wimax/service-flow.cc => src/devices/wimax/model/service-flow.cc
rename : src/devices/wimax/service-flow.h => src/devices/wimax/model/service-flow.h
rename : src/devices/wimax/simple-ofdm-send-param.cc => src/devices/wimax/model/simple-ofdm-send-param.cc
rename : src/devices/wimax/simple-ofdm-send-param.h => src/devices/wimax/model/simple-ofdm-send-param.h
rename : src/devices/wimax/simple-ofdm-wimax-channel.cc => src/devices/wimax/model/simple-ofdm-wimax-channel.cc
rename : src/devices/wimax/simple-ofdm-wimax-channel.h => src/devices/wimax/model/simple-ofdm-wimax-channel.h
rename : src/devices/wimax/simple-ofdm-wimax-phy.cc => src/devices/wimax/model/simple-ofdm-wimax-phy.cc
rename : src/devices/wimax/simple-ofdm-wimax-phy.h => src/devices/wimax/model/simple-ofdm-wimax-phy.h
rename : src/devices/wimax/snr-to-block-error-rate-manager.cc => src/devices/wimax/model/snr-to-block-error-rate-manager.cc
rename : src/devices/wimax/snr-to-block-error-rate-manager.h => src/devices/wimax/model/snr-to-block-error-rate-manager.h
rename : src/devices/wimax/snr-to-block-error-rate-record.cc => src/devices/wimax/model/snr-to-block-error-rate-record.cc
rename : src/devices/wimax/snr-to-block-error-rate-record.h => src/devices/wimax/model/snr-to-block-error-rate-record.h
rename : src/devices/wimax/ss-link-manager.cc => src/devices/wimax/model/ss-link-manager.cc
rename : src/devices/wimax/ss-link-manager.h => src/devices/wimax/model/ss-link-manager.h
rename : src/devices/wimax/ss-manager.cc => src/devices/wimax/model/ss-manager.cc
rename : src/devices/wimax/ss-manager.h => src/devices/wimax/model/ss-manager.h
rename : src/devices/wimax/ss-net-device.cc => src/devices/wimax/model/ss-net-device.cc
rename : src/devices/wimax/ss-net-device.h => src/devices/wimax/model/ss-net-device.h
rename : src/devices/wimax/ss-record.cc => src/devices/wimax/model/ss-record.cc
rename : src/devices/wimax/ss-record.h => src/devices/wimax/model/ss-record.h
rename : src/devices/wimax/ss-scheduler.cc => src/devices/wimax/model/ss-scheduler.cc
rename : src/devices/wimax/ss-scheduler.h => src/devices/wimax/model/ss-scheduler.h
rename : src/devices/wimax/ss-service-flow-manager.cc => src/devices/wimax/model/ss-service-flow-manager.cc
rename : src/devices/wimax/ss-service-flow-manager.h => src/devices/wimax/model/ss-service-flow-manager.h
rename : src/devices/wimax/ul-job.cc => src/devices/wimax/model/ul-job.cc
rename : src/devices/wimax/ul-job.h => src/devices/wimax/model/ul-job.h
rename : src/devices/wimax/ul-mac-messages.cc => src/devices/wimax/model/ul-mac-messages.cc
rename : src/devices/wimax/ul-mac-messages.h => src/devices/wimax/model/ul-mac-messages.h
rename : src/devices/wimax/wimax-channel.cc => src/devices/wimax/model/wimax-channel.cc
rename : src/devices/wimax/wimax-channel.h => src/devices/wimax/model/wimax-channel.h
rename : src/devices/wimax/wimax-connection.cc => src/devices/wimax/model/wimax-connection.cc
rename : src/devices/wimax/wimax-connection.h => src/devices/wimax/model/wimax-connection.h
rename : src/devices/wimax/wimax-mac-header.cc => src/devices/wimax/model/wimax-mac-header.cc
rename : src/devices/wimax/wimax-mac-header.h => src/devices/wimax/model/wimax-mac-header.h
rename : src/devices/wimax/wimax-mac-queue.cc => src/devices/wimax/model/wimax-mac-queue.cc
rename : src/devices/wimax/wimax-mac-queue.h => src/devices/wimax/model/wimax-mac-queue.h
rename : src/devices/wimax/wimax-mac-to-mac-header.cc => src/devices/wimax/model/wimax-mac-to-mac-header.cc
rename : src/devices/wimax/wimax-mac-to-mac-header.h => src/devices/wimax/model/wimax-mac-to-mac-header.h
rename : src/devices/wimax/wimax-net-device.cc => src/devices/wimax/model/wimax-net-device.cc
rename : src/devices/wimax/wimax-net-device.h => src/devices/wimax/model/wimax-net-device.h
rename : src/devices/wimax/wimax-phy.cc => src/devices/wimax/model/wimax-phy.cc
rename : src/devices/wimax/wimax-phy.h => src/devices/wimax/model/wimax-phy.h
rename : src/devices/wimax/wimax-tlv.cc => src/devices/wimax/model/wimax-tlv.cc
rename : src/devices/wimax/wimax-tlv.h => src/devices/wimax/model/wimax-tlv.h
rename : src/devices/wimax/mac-messages-test.cc => src/devices/wimax/test/mac-messages-test.cc
rename : src/devices/wimax/phy-test.cc => src/devices/wimax/test/phy-test.cc
rename : src/devices/wimax/qos-test.cc => src/devices/wimax/test/qos-test.cc
rename : src/devices/wimax/ss-mac-test.cc => src/devices/wimax/test/ss-mac-test.cc
rename : src/devices/wimax/wimax-fragmentation-test.cc => src/devices/wimax/test/wimax-fragmentation-test.cc
rename : src/devices/wimax/wimax-service-flow-test.cc => src/devices/wimax/test/wimax-service-flow-test.cc
rename : src/devices/wimax/wimax-tlv-test.cc => src/devices/wimax/test/wimax-tlv-test.cc
2011-03-03 19:54:57 +00:00

577 lines
17 KiB
C++

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* 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: Duy Nguyen <duy@soe.ucsc.edu>
*/
/**
* Scenarios: 100 nodes, multiple simultaneous flows, multi-hop ad hoc, routing,
* and mobility
*
* QUICK INSTRUCTIONS:
*
* To optimize build:
* ./waf -d optimized configure
* ./waf
*
* To compile:
* ./waf --run multirate
*
* To compile with command line(useful for varying parameters):
* ./waf --run "multirate --totalTime=0.3s --rateManager=ns3::MinstrelWifiManager"
*
* To turn on NS_LOG:
* export NS_LOG=multirate=level_all
* (can only view log if built with ./waf -d debug configure)
*
* To debug:
* ./waf --shell
* gdb ./build/debug/examples/wireless/multirate
*
* To view pcap files:
* tcpdump -nn -tt -r filename.pcap
*
* To monitor the files:
* tail -f filename.pcap
*
*/
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
#include "ns3/random-variable.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
#include "ns3/flow-monitor-helper.h"
#include "ns3/olsr-helper.h"
#include "ns3/ipv4-static-routing-helper.h"
#include "ns3/ipv4-list-routing-helper.h"
#include <iostream>
#include <fstream>
NS_LOG_COMPONENT_DEFINE ("multirate");
using namespace ns3;
class Experiment
{
public:
Experiment ();
Experiment (std::string name);
Gnuplot2dDataset Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
const NqosWifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel, const MobilityHelper &mobility);
bool CommandSetup (int argc, char **argv);
bool IsRouting () { return (enableRouting == 1) ? 1 : 0; }
bool IsMobility () { return (enableMobility == 1) ? 1 : 0; }
uint32_t GetScenario () { return scenario; }
std::string GetRtsThreshold () { return rtsThreshold; }
std::string GetOutputFileName () { return outputFileName; }
std::string GetRateManager () { return rateManager; }
private:
Vector GetPosition (Ptr<Node> node);
Ptr<Socket> SetupPacketReceive (Ptr<Node> node);
NodeContainer GenerateNeighbors(NodeContainer c, uint32_t senderId);
void ApplicationSetup (Ptr<Node> client, Ptr<Node> server, double start, double stop);
void AssignNeighbors (NodeContainer c);
void SelectSrcDest (NodeContainer c);
void ReceivePacket (Ptr<Socket> socket);
void CheckThroughput ();
void SendMultiDestinations (Ptr<Node> sender, NodeContainer c);
Gnuplot2dDataset m_output;
double totalTime;
double expMean;
uint32_t bytesTotal;
uint32_t packetSize;
uint32_t gridSize;
uint32_t nodeDistance;
uint32_t port;
uint32_t scenario;
bool enablePcap;
bool enableTracing;
bool enableFlowMon;
bool enableRouting;
bool enableMobility;
NodeContainer containerA, containerB, containerC, containerD;
std::string rtsThreshold, rateManager, outputFileName;
};
Experiment::Experiment ()
{
}
Experiment::Experiment (std::string name) :
m_output (name),
totalTime (0.3),
expMean (0.1), //flows being exponentially distributed
bytesTotal(0),
packetSize (2000),
gridSize (10), //10x10 grid for a total of 100 nodes
nodeDistance (30),
port (5000),
scenario (4),
enablePcap (false),
enableTracing (true),
enableFlowMon (false),
enableRouting (false),
enableMobility (false),
rtsThreshold ("2200"), //0 for enabling rts/cts
rateManager ("ns3::MinstrelWifiManager"),
outputFileName ("minstrel")
{
m_output.SetStyle (Gnuplot2dDataset::LINES);
}
Ptr<Socket>
Experiment::SetupPacketReceive (Ptr<Node> node)
{
TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
Ptr<Socket> sink = Socket::CreateSocket (node, tid);
InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), port);
sink->Bind (local);
sink->SetRecvCallback (MakeCallback (&Experiment::ReceivePacket, this));
return sink;
}
void
Experiment::ReceivePacket (Ptr<Socket> socket)
{
Ptr<Packet> packet;
while (packet = socket->Recv ())
{
bytesTotal += packet->GetSize();
}
}
void
Experiment::CheckThroughput()
{
double mbs = ((bytesTotal * 8.0) /1000000);
bytesTotal = 0;
m_output.Add ((Simulator::Now ()).GetSeconds (), mbs);
//check throughput every 1/10 of a second
Simulator::Schedule (Seconds (0.1), &Experiment::CheckThroughput, this);
}
Vector
Experiment::GetPosition (Ptr<Node> node)
{
Ptr<MobilityModel> mobility = node->GetObject<MobilityModel> ();
return mobility->GetPosition ();
}
/**
*
* Take the grid map, divide it into 4 quadrants
* Assign all nodes from each quadrant to a specific container
*
*/
void
Experiment::AssignNeighbors (NodeContainer c)
{
uint32_t totalNodes = c.GetN ();
for (uint32_t i=0; i< totalNodes; i++)
{
if ( (i % gridSize) <= (gridSize/2 - 1))
{
//lower left quadrant
if ( i < totalNodes/2 )
{
containerA.Add(c.Get(i));
}
//upper left quadrant
if ( i >= (uint32_t)(4*totalNodes)/10 )
{
containerC.Add(c.Get(i));
}
}
if ( (i % gridSize) >= (gridSize/2 - 1))
{
//lower right quadrant
if ( i < totalNodes/2 )
{
containerB.Add(c.Get(i));
}
//upper right quadrant
if ( i >= (uint32_t)(4*totalNodes)/10 )
{
containerD.Add(c.Get(i));
}
}
}
}
/**
* Generate 1-hop and 2-hop neighbors of a node in grid topology
*
*/
NodeContainer
Experiment::GenerateNeighbors (NodeContainer c, uint32_t senderId)
{
NodeContainer nc;
uint32_t limit = senderId + 2;
for (uint32_t i= senderId - 2; i <= limit; i++)
{
//must ensure the boundaries for other topologies
nc.Add(c.Get(i));
nc.Add(c.Get(i + 10));
nc.Add(c.Get(i + 20));
nc.Add(c.Get(i - 10));
nc.Add(c.Get(i - 20));
}
return nc;
}
/**
* Sources and destinations are randomly selected such that a node
* may be the source for multiple destinations and a node maybe a destination
* for multiple sources.
*/
void
Experiment::SelectSrcDest (NodeContainer c)
{
uint32_t totalNodes = c.GetN();
UniformVariable uvSrc (0, totalNodes/2 -1);
UniformVariable uvDest (totalNodes/2, totalNodes);
for (uint32_t i=0; i < totalNodes/3; i++)
{
ApplicationSetup (c.Get(uvSrc.RandomVariable::GetInteger()), c.Get(uvDest.RandomVariable::GetInteger()), 0, totalTime);
}
}
/**
*
* A sender node will set up a flow to each of the its neighbors
* in its quadrant randomly. All the flows are exponentially distributed
*
*/
void
Experiment::SendMultiDestinations(Ptr<Node> sender, NodeContainer c)
{
// UniformVariable params: (Xrange, Yrange)
UniformVariable uv(0, c.GetN ());
// ExponentialVariable params: (mean, upperbound)
ExponentialVariable ev(expMean, totalTime);
double start=0.0, stop=totalTime;
uint32_t destIndex;
for (uint32_t i=0; i < c.GetN (); i++)
{
stop = start + ev.GetValue();
NS_LOG_DEBUG("Start=" << start << " Stop=" << stop);
do {
destIndex = (uint32_t) uv.GetValue();
} while ( (c.Get(destIndex))->GetId () == sender->GetId ());
ApplicationSetup (sender, c.Get(destIndex), start, stop);
start = stop;
if(start > totalTime)
{
break;
}
}
}
void
Experiment::ApplicationSetup (Ptr<Node> client, Ptr<Node> server, double start, double stop)
{
Vector serverPos = GetPosition (server);
Vector clientPos = GetPosition (client);
Ptr<Ipv4> ipv4Server = server->GetObject<Ipv4>();
Ptr<Ipv4> ipv4Client = client->GetObject<Ipv4>();
Ipv4InterfaceAddress iaddrServer = ipv4Server->GetAddress(1,0);
Ipv4InterfaceAddress iaddrClient = ipv4Client->GetAddress(1,0);
Ipv4Address ipv4AddrServer = iaddrServer.GetLocal ();
Ipv4Address ipv4AddrClient = iaddrClient.GetLocal ();
NS_LOG_DEBUG("Set up Server Device " << (server->GetDevice(0))->GetAddress ()
<< " with ip " << ipv4AddrServer
<< " position (" << serverPos.x << "," << serverPos.y << "," << serverPos.z << ")");
NS_LOG_DEBUG("Set up Client Device " << (client->GetDevice(0))->GetAddress ()
<< " with ip " << ipv4AddrClient
<< " position (" << clientPos.x << "," << clientPos.y << "," << clientPos.z << ")"
<< "\n");
// Equipping the source node with OnOff Application used for sending
OnOffHelper onoff ("ns3::UdpSocketFactory", Address(InetSocketAddress(Ipv4Address("10.0.0.1"), port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
onoff.SetAttribute ("DataRate", DataRateValue (DataRate (60000000)));
onoff.SetAttribute ("PacketSize", UintegerValue (packetSize));
onoff.SetAttribute ("Remote", AddressValue(InetSocketAddress (ipv4AddrServer, port)));
ApplicationContainer apps = onoff.Install (client);
apps.Start (Seconds (start));
apps.Stop (Seconds (stop));
Ptr<Socket> sink = SetupPacketReceive (server);
}
Gnuplot2dDataset
Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
const NqosWifiMacHelper &wifiMac, const YansWifiChannelHelper &wifiChannel, const MobilityHelper &mobility)
{
uint32_t nodeSize = gridSize*gridSize;
NodeContainer c;
c.Create (nodeSize);
YansWifiPhyHelper phy = wifiPhy;
phy.SetChannel (wifiChannel.Create ());
NqosWifiMacHelper mac = wifiMac;
NetDeviceContainer devices = wifi.Install (phy, mac, c);
OlsrHelper olsr;
Ipv4StaticRoutingHelper staticRouting;
Ipv4ListRoutingHelper list;
if (enableRouting)
{
list.Add (staticRouting, 0);
list.Add (olsr, 10);
}
InternetStackHelper internet;
if (enableRouting)
{
internet.SetRoutingHelper(list);
}
internet.Install (c);
Ipv4AddressHelper address;
address.SetBase ("10.0.0.0", "255.255.255.0");
Ipv4InterfaceContainer ipInterfaces;
ipInterfaces = address.Assign(devices);
MobilityHelper mobil= mobility;
mobil.SetPositionAllocator ("ns3::GridPositionAllocator",
"MinX", DoubleValue (0.0),
"MinY", DoubleValue (0.0),
"DeltaX", DoubleValue (nodeDistance),
"DeltaY", DoubleValue (nodeDistance),
"GridWidth", UintegerValue (gridSize),
"LayoutType", StringValue ("RowFirst"));
mobil.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
if (enableMobility && enableRouting)
{
//Rectangle (xMin, xMax, yMin, yMax)
mobil.SetMobilityModel ("ns3::RandomDirection2dMobilityModel",
"Bounds", RectangleValue (Rectangle (0, 500, 0, 500)),
"Speed", RandomVariableValue (ConstantVariable (10)),
"Pause", RandomVariableValue (ConstantVariable (0.2)));
}
mobil.Install (c);
// NS_LOG_INFO ("Enabling global routing on all nodes");
// Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
if ( scenario == 1 && enableRouting)
{
SelectSrcDest(c);
}
else if ( scenario == 2)
{
//All flows begin at the same time
for (uint32_t i = 0; i < nodeSize - 1; i = i+2)
{
ApplicationSetup (c.Get (i), c.Get (i+1), 0, totalTime);
}
}
else if ( scenario == 3)
{
AssignNeighbors(c);
//Note: these senders are hand-picked in order to ensure good coverage
//for 10x10 grid, basically one sender for each quadrant
//you might have to change these values for other grids
NS_LOG_DEBUG(">>>>>>>>>region A<<<<<<<<<");
SendMultiDestinations(c.Get(22), containerA);
NS_LOG_DEBUG(">>>>>>>>>region B<<<<<<<<<");
SendMultiDestinations(c.Get(26), containerB);
NS_LOG_DEBUG(">>>>>>>>>region C<<<<<<<<<");
SendMultiDestinations(c.Get(72), containerC);
NS_LOG_DEBUG(">>>>>>>>>region D<<<<<<<<<");
SendMultiDestinations(c.Get(76), containerD);
}
else if ( scenario == 4)
{
//GenerateNeighbors(NodeContainer, uint32_t sender)
//Note: these senders are hand-picked in order to ensure good coverage
//you might have to change these values for other grids
NodeContainer c1, c2, c3, c4, c5, c6, c7, c8, c9;
c1 = GenerateNeighbors(c, 22);
c2 = GenerateNeighbors(c, 24);;
c3 = GenerateNeighbors(c, 26);;
c4 = GenerateNeighbors(c, 42);;
c5 = GenerateNeighbors(c, 44);;
c6 = GenerateNeighbors(c, 46);;
c7 = GenerateNeighbors(c, 62);;
c8 = GenerateNeighbors(c, 64);;
c9 = GenerateNeighbors(c, 66);;
SendMultiDestinations(c.Get(22), c1);
SendMultiDestinations(c.Get(24), c2);
SendMultiDestinations(c.Get(26), c3);
SendMultiDestinations(c.Get(42), c4);
SendMultiDestinations(c.Get(44), c5);
SendMultiDestinations(c.Get(46), c6);
SendMultiDestinations(c.Get(62), c7);
SendMultiDestinations(c.Get(64), c8);
SendMultiDestinations(c.Get(66), c9);
}
CheckThroughput ();
if (enablePcap)
{
phy.EnablePcapAll(GetOutputFileName());
}
if (enableTracing)
{
AsciiTraceHelper ascii;
phy.EnableAsciiAll (ascii.CreateFileStream (GetOutputFileName() + ".tr"));
}
Ptr<FlowMonitor> flowmon;
if (enableFlowMon)
{
FlowMonitorHelper flowmonHelper;
flowmon = flowmonHelper.InstallAll ();
}
Simulator::Stop (Seconds (totalTime));
Simulator::Run ();
if (enableFlowMon)
{
flowmon->SerializeToXmlFile ((GetOutputFileName() + ".flomon"), false, false);
}
Simulator::Destroy ();
return m_output;
}
bool
Experiment::CommandSetup (int argc, char **argv)
{
// for commandline input
CommandLine cmd;
cmd.AddValue ("packetSize", "packet size", packetSize);
cmd.AddValue ("totalTime", "simulation time", totalTime);
cmd.AddValue ("rtsThreshold", "rts threshold", rtsThreshold);
cmd.AddValue ("rateManager", "type of rate", rateManager);
cmd.AddValue ("outputFileName", "output filename", outputFileName);
cmd.AddValue ("enableRouting", "enable Routing", enableRouting);
cmd.AddValue ("enableMobility", "enable Mobility", enableMobility);
cmd.AddValue ("scenario", "scenario ", scenario);
cmd.Parse (argc, argv);
return true;
}
int main (int argc, char *argv[])
{
Experiment experiment;
experiment = Experiment ("multirate");
//for commandline input
experiment.CommandSetup(argc, argv);
// set value to 0 for enabling fragmentation
Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("2200"));
Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue (experiment.GetRtsThreshold()));
std::ofstream outfile ((experiment.GetOutputFileName()+ ".plt").c_str());
MobilityHelper mobility;
Gnuplot gnuplot;
Gnuplot2dDataset dataset;
WifiHelper wifi = WifiHelper::Default ();
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
Ssid ssid = Ssid ("Testbed");
wifiMac.SetType ("ns3::AdhocWifiMac",
"Ssid", SsidValue(ssid));
wifi.SetStandard (WIFI_PHY_STANDARD_holland);
wifi.SetRemoteStationManager (experiment.GetRateManager());
NS_LOG_INFO ("Scenario: " << experiment.GetScenario ());
NS_LOG_INFO ("Rts Threshold: " << experiment.GetRtsThreshold());
NS_LOG_INFO ("Name: " << experiment.GetOutputFileName());
NS_LOG_INFO ("Rate: " << experiment.GetRateManager());
NS_LOG_INFO ("Routing: " << experiment.IsRouting());
NS_LOG_INFO ("Mobility: " << experiment.IsMobility());
dataset = experiment.Run (wifi, wifiPhy, wifiMac, wifiChannel, mobility);
gnuplot.AddDataset (dataset);
gnuplot.GenerateOutput (outfile);
return 0;
}