# HG changeset patch # User Sébastien Deronne # Date 1430776532 -7200 # Node ID a1f6f647d516834a925bf4f8747716787a9f0b2d # Parent 52c7ce21a0ca14a1dc0f18b442ea9be24d8bd33c add two-level aggregation diff -r 52c7ce21a0ca -r a1f6f647d516 examples/wireless/simple-two-level-aggregation.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/wireless/simple-two-level-aggregation.cc Mon May 04 23:55:32 2015 +0200 @@ -0,0 +1,214 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2015 Sébastien Deronne + * + * 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: Sébastien Deronne + */ + +#include "ns3/core-module.h" +#include "ns3/network-module.h" +#include "ns3/applications-module.h" +#include "ns3/wifi-module.h" +#include "ns3/mobility-module.h" +#include "ns3/ipv4-global-routing-helper.h" +#include "ns3/internet-module.h" + +// This is a simple example in order to show how 802.11n two-level aggregation feature works. +// Two-level aggregation is the simultaneous use of MSDU and MPDU aggregation schemes (known as one-level aggregation techniques). +// +// The throughput is obtained for a given number of aggregated MSDUs and MPDUs. +// The number of aggregated MSDUs and MPDUs can be chosen by the user through the nMsdus and nMpdus attibutes, respectively. +// +// Example: ./waf --run "simple-two-level-aggregation --nMsdus=3 --nMpdus=8" +// +// Network topology: +// +// Wifi 192.168.1.0 +// +// AP +// * * +// | | +// n1 n2 +// +// Packets in this simulation aren't marked with a QosTag so they are considered +// belonging to BestEffort Access Class (AC_BE). +// +// Throughput gets higher as either nMsdus or nMpdus is increased (one-level aggregation), +// or when both nMsdus and nMpdus are increases (two-level aggregation). +// MSDU aggregation offers a better header reduction compare to MPDU aggregation, +// while MPDU aggregation is more robust against transmission errors than MSDU aggregation. +// The good setting of nMsdu and nMpdus will depends on various factors (payload size, channel conditions, ...). +// Since this example considers an ideal channel, the highest throughput is obtained with the largest values for nMsdus and nMpdus parameters. +// Users should nevertheless take care that the standard rules limit the maximum MSDU size to 7935 bytes and the MPDU size to 65535 bytes. +// Consequently, more packets should be aggregated if their payload is small with standard-compliant parameters. +// Users should also note that the maximum duration of the frame is limited by the standard. +// As a result, higher values for nMsdus and nMpdus may not always provide throughput improvements. + +using namespace ns3; + +NS_LOG_COMPONENT_DEFINE ("SimpleTwoLevelAggregation"); + +int main (int argc, char *argv[]) +{ + uint32_t payloadSize = 1472; //bytes + uint64_t simulationTime = 10; //seconds + uint32_t nMsdus = 1; + uint32_t nMpdus = 1; + bool enableRts = 0; + + CommandLine cmd; + cmd.AddValue ("nMsdus", "Number of aggregated MSDUs", nMsdus); //number of aggregated MSDUs specified by the user + cmd.AddValue ("nMpdus", "Number of aggregated MPDUs", nMpdus); //number of aggregated MPDUs specified by the user + cmd.AddValue ("payloadSize", "Payload size in bytes", payloadSize); + cmd.AddValue ("enableRts", "Enable RTS/CTS", enableRts); + cmd.AddValue ("simulationTime", "Simulation time in seconds", simulationTime); + cmd.Parse (argc, argv); + + if (!enableRts) + { + Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("999999")); + } + else + { + Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue ("0")); + } + + Config::SetDefault ("ns3::WifiRemoteStationManager::FragmentationThreshold", StringValue ("990000")); + + NodeContainer wifiStaNode; + wifiStaNode.Create (1); + NodeContainer wifiApNode; + wifiApNode.Create (1); + + YansWifiChannelHelper channel = YansWifiChannelHelper::Default (); + YansWifiPhyHelper phy = YansWifiPhyHelper::Default (); + phy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO); + phy.SetChannel (channel.Create ()); + + WifiHelper wifi = WifiHelper::Default (); + wifi.SetStandard (WIFI_PHY_STANDARD_80211n_5GHZ); + //We consider a constant bitrate since HT rate adaptation algorithms are not supported yet in the simulator + wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", + "DataMode", StringValue ("OfdmRate65MbpsBW20MHz"), + "ControlMode", StringValue ("OfdmRate6_5MbpsBW20MHz")); + HtWifiMacHelper mac = HtWifiMacHelper::Default (); + + Ssid ssid = Ssid ("simple-two-level-aggregation"); + mac.SetType ("ns3::StaWifiMac", + "Ssid", SsidValue (ssid), + "ActiveProbing", BooleanValue (false)); + + + //Enable aggregation at the station side + if (nMpdus > 1) + { + mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable BlockAck when A-MPDU is used + } + if (nMsdus > 0) + { + mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator", + "MaxAmpduSize", UintegerValue (nMpdus * (nMsdus * (payloadSize + 100)))); //Set the maximum size for A-MPDU with regards to the payload size and the number of MSDUs expected in each MPDU. + } + else //MPDU aggregation only (one-level aggregation) + { + mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator", + "MaxAmpduSize", UintegerValue (nMpdus * (payloadSize + 200))); //Set the maximum size for A-MPDU with regards to the payload size + } + mac.SetMsduAggregatorForAc (AC_BE,"ns3::MsduStandardAggregator", + "MaxAmsduSize", UintegerValue (nMsdus * (payloadSize + 100))); //Set the maximum size for A-MSDU with regards to the payload size + + + NetDeviceContainer staDevice; + staDevice = wifi.Install (phy, mac, wifiStaNode); + + mac.SetType ("ns3::ApWifiMac", + "Ssid", SsidValue (ssid), + "BeaconInterval", TimeValue (MicroSeconds (102400)), + "BeaconGeneration", BooleanValue (true)); + + //Enable aggregation at the AP side + if (nMpdus > 1) + { + mac.SetBlockAckThresholdForAc (AC_BE, 2); //enable BlockAck when A-MPDU is used + } + if (nMsdus > 0) + { + mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator", + "MaxAmpduSize", UintegerValue (nMpdus * (nMsdus * (payloadSize + 100)))); //Set the maximum size for A-MPDU according to the payload size and the number of MSDUs expected in each MPDU. + } + else //MPDU aggregation only (one-level aggregation) + { + mac.SetMpduAggregatorForAc (AC_BE,"ns3::MpduStandardAggregator", + "MaxAmpduSize", UintegerValue (nMpdus * (payloadSize + 200))); //Set the maximum size for A-MPDU with regards to the payload size + } + mac.SetMsduAggregatorForAc (AC_BE,"ns3::MsduStandardAggregator", + "MaxAmsduSize", UintegerValue (nMsdus * (payloadSize + 100))); //Set the maximum size for A-MSDU with regards to the payload size + + NetDeviceContainer apDevice; + apDevice = wifi.Install (phy, mac, wifiApNode); + + /* Setting mobility model */ + MobilityHelper mobility; + Ptr positionAlloc = CreateObject (); + + positionAlloc->Add (Vector (0.0, 0.0, 0.0)); + positionAlloc->Add (Vector (1.0, 0.0, 0.0)); + mobility.SetPositionAllocator (positionAlloc); + + mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); + + mobility.Install (wifiApNode); + mobility.Install (wifiStaNode); + + /* Internet stack*/ + InternetStackHelper stack; + stack.Install (wifiApNode); + stack.Install (wifiStaNode); + + Ipv4AddressHelper address; + + address.SetBase ("192.168.1.0", "255.255.255.0"); + Ipv4InterfaceContainer StaInterface; + StaInterface = address.Assign (staDevice); + Ipv4InterfaceContainer ApInterface; + ApInterface = address.Assign (apDevice); + + /* Setting applications */ + UdpServerHelper myServer (9); + ApplicationContainer serverApp = myServer.Install (wifiStaNode.Get (0)); + serverApp.Start (Seconds (0.0)); + serverApp.Stop (Seconds (simulationTime + 1)); + + UdpClientHelper myClient (StaInterface.GetAddress (0), 9); + myClient.SetAttribute ("MaxPackets", UintegerValue (4294967295)); + myClient.SetAttribute ("Interval", TimeValue (Time ("0.00002"))); //packets/s + myClient.SetAttribute ("PacketSize", UintegerValue (payloadSize)); + + ApplicationContainer clientApp = myClient.Install (wifiApNode.Get (0)); + clientApp.Start (Seconds (1.0)); + clientApp.Stop (Seconds (simulationTime + 1)); + + Simulator::Stop (Seconds (simulationTime + 1)); + + Simulator::Run (); + Simulator::Destroy (); + + uint32_t totalPacketsThrough = DynamicCast (serverApp.Get (0))->GetReceived (); + double throughput = totalPacketsThrough * payloadSize * 8 / (simulationTime * 1000000.0); + std::cout << "Throughput: " << throughput << " Mbit/s" << '\n'; + + return 0; +} diff -r 52c7ce21a0ca -r a1f6f647d516 examples/wireless/wscript --- a/examples/wireless/wscript Sun May 03 17:34:44 2015 +0200 +++ b/examples/wireless/wscript Mon May 04 23:55:32 2015 +0200 @@ -71,4 +71,7 @@ obj.source = 'rate-adaptation-distance.cc' obj = bld.create_ns3_program('simple-mpdu-aggregation', ['internet', 'mobility', 'wifi', 'applications']) - obj.source = 'simple-mpdu-aggregation.cc' \ No newline at end of file + obj.source = 'simple-mpdu-aggregation.cc' + + obj = bld.create_ns3_program('simple-two-level-aggregation', ['internet', 'mobility', 'wifi', 'applications']) + obj.source = 'simple-two-level-aggregation.cc' diff -r 52c7ce21a0ca -r a1f6f647d516 src/wave/bindings/modulegen__gcc_ILP32.py --- a/src/wave/bindings/modulegen__gcc_ILP32.py Sun May 03 17:34:44 2015 +0200 +++ b/src/wave/bindings/modulegen__gcc_ILP32.py Mon May 04 23:55:32 2015 +0200 @@ -28,6 +28,8 @@ module.add_enum('WifiModulationClass', ['WIFI_MOD_CLASS_UNKNOWN', 'WIFI_MOD_CLASS_IR', 'WIFI_MOD_CLASS_FHSS', 'WIFI_MOD_CLASS_DSSS', 'WIFI_MOD_CLASS_ERP_PBCC', 'WIFI_MOD_CLASS_DSSS_OFDM', 'WIFI_MOD_CLASS_ERP_OFDM', 'WIFI_MOD_CLASS_OFDM', 'WIFI_MOD_CLASS_HT'], import_from_module='ns.wifi') ## wifi-phy-standard.h (module 'wifi'): ns3::WifiPhyStandard [enumeration] module.add_enum('WifiPhyStandard', ['WIFI_PHY_STANDARD_80211a', 'WIFI_PHY_STANDARD_80211b', 'WIFI_PHY_STANDARD_80211g', 'WIFI_PHY_STANDARD_80211_10MHZ', 'WIFI_PHY_STANDARD_80211_5MHZ', 'WIFI_PHY_STANDARD_holland', 'WIFI_PHY_STANDARD_80211n_2_4GHZ', 'WIFI_PHY_STANDARD_80211n_5GHZ'], import_from_module='ns.wifi') + ## wifi-mode.h (module 'wifi'): ns3::WifiCodeRate [enumeration] + module.add_enum('WifiCodeRate', ['WIFI_CODE_RATE_UNDEFINED', 'WIFI_CODE_RATE_3_4', 'WIFI_CODE_RATE_2_3', 'WIFI_CODE_RATE_1_2', 'WIFI_CODE_RATE_5_6'], import_from_module='ns.wifi') ## qos-utils.h (module 'wifi'): ns3::AcIndex [enumeration] module.add_enum('AcIndex', ['AC_BE', 'AC_BK', 'AC_VI', 'AC_VO', 'AC_BE_NQOS', 'AC_UNDEF'], import_from_module='ns.wifi') ## channel-scheduler.h (module 'wave'): ns3::ChannelAccess [enumeration] @@ -38,8 +40,6 @@ module.add_enum('BlockAckType', ['BASIC_BLOCK_ACK', 'COMPRESSED_BLOCK_ACK', 'MULTI_TID_BLOCK_ACK'], import_from_module='ns.wifi') ## vsa-manager.h (module 'wave'): ns3::VsaTransmitInterval [enumeration] module.add_enum('VsaTransmitInterval', ['VSA_TRANSMIT_IN_CCHI', 'VSA_TRANSMIT_IN_SCHI', 'VSA_TRANSMIT_IN_BOTHI']) - ## wifi-mode.h (module 'wifi'): ns3::WifiCodeRate [enumeration] - module.add_enum('WifiCodeRate', ['WIFI_CODE_RATE_UNDEFINED', 'WIFI_CODE_RATE_3_4', 'WIFI_CODE_RATE_2_3', 'WIFI_CODE_RATE_1_2', 'WIFI_CODE_RATE_5_6'], import_from_module='ns.wifi') ## address.h (module 'network'): ns3::Address [class] module.add_class('Address', import_from_module='ns.network') ## address.h (module 'network'): ns3::Address::MaxSize_e [enumeration] @@ -128,8 +128,8 @@ module.add_class('Mac48Address', import_from_module='ns.network') ## mac48-address.h (module 'network'): ns3::Mac48Address [class] root_module['ns3::Mac48Address'].implicitly_converts_to(root_module['ns3::Address']) - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener [class] - module.add_class('MacLowBlockAckEventListener', allow_subclassing=True, import_from_module='ns.wifi') + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener [class] + module.add_class('MacLowAggregationCapableTransmissionListener', allow_subclassing=True, import_from_module='ns.wifi') ## mac-low.h (module 'wifi'): ns3::MacLowDcfListener [class] module.add_class('MacLowDcfListener', allow_subclassing=True, import_from_module='ns.wifi') ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionListener [class] @@ -416,6 +416,8 @@ module.add_class('ZipfRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## ampdu-subframe-header.h (module 'wifi'): ns3::AmpduSubframeHeader [class] module.add_class('AmpduSubframeHeader', import_from_module='ns.wifi', parent=root_module['ns3::Header']) + ## amsdu-subframe-header.h (module 'wifi'): ns3::AmsduSubframeHeader [class] + module.add_class('AmsduSubframeHeader', import_from_module='ns.wifi', parent=root_module['ns3::Header']) ## application.h (module 'network'): ns3::Application [class] module.add_class('Application', import_from_module='ns.network', parent=root_module['ns3::Object']) ## attribute.h (module 'core'): ns3::AttributeAccessor [class] @@ -526,6 +528,8 @@ module.add_class('MobilityModel', import_from_module='ns.mobility', parent=root_module['ns3::Object']) ## mpdu-aggregator.h (module 'wifi'): ns3::MpduAggregator [class] module.add_class('MpduAggregator', import_from_module='ns.wifi', parent=root_module['ns3::Object']) + ## msdu-aggregator.h (module 'wifi'): ns3::MsduAggregator [class] + module.add_class('MsduAggregator', import_from_module='ns.wifi', parent=root_module['ns3::Object']) ## net-device.h (module 'network'): ns3::NetDevice [class] module.add_class('NetDevice', import_from_module='ns.network', parent=root_module['ns3::Object']) ## net-device.h (module 'network'): ns3::NetDevice::PacketType [enumeration] @@ -612,6 +616,7 @@ module.add_container('ns3::WifiMcsList', 'unsigned char', container_type=u'vector') module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type=u'map') module.add_container('std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmpduSubframeHeader > >', 'std::pair< ns3::Ptr< ns3::Packet >, ns3::AmpduSubframeHeader >', container_type=u'list') + module.add_container('std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader > >', 'std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader >', container_type=u'list') module.add_container('std::map< unsigned int, ns3::Ptr< ns3::OcbWifiMac > >', ('unsigned int', 'ns3::Ptr< ns3::OcbWifiMac >'), container_type=u'map') module.add_container('std::vector< ns3::Ptr< ns3::WifiPhy > >', 'ns3::Ptr< ns3::WifiPhy >', container_type=u'vector') typehandlers.add_type_alias(u'std::vector< unsigned char, std::allocator< unsigned char > >', u'ns3::WifiMcsList') @@ -743,7 +748,7 @@ register_Ns3Ipv6InterfaceContainer_methods(root_module, root_module['ns3::Ipv6InterfaceContainer']) register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix']) register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address']) - register_Ns3MacLowBlockAckEventListener_methods(root_module, root_module['ns3::MacLowBlockAckEventListener']) + register_Ns3MacLowAggregationCapableTransmissionListener_methods(root_module, root_module['ns3::MacLowAggregationCapableTransmissionListener']) register_Ns3MacLowDcfListener_methods(root_module, root_module['ns3::MacLowDcfListener']) register_Ns3MacLowTransmissionListener_methods(root_module, root_module['ns3::MacLowTransmissionListener']) register_Ns3MacLowTransmissionParameters_methods(root_module, root_module['ns3::MacLowTransmissionParameters']) @@ -861,6 +866,7 @@ register_Ns3ZetaRandomVariable_methods(root_module, root_module['ns3::ZetaRandomVariable']) register_Ns3ZipfRandomVariable_methods(root_module, root_module['ns3::ZipfRandomVariable']) register_Ns3AmpduSubframeHeader_methods(root_module, root_module['ns3::AmpduSubframeHeader']) + register_Ns3AmsduSubframeHeader_methods(root_module, root_module['ns3::AmsduSubframeHeader']) register_Ns3Application_methods(root_module, root_module['ns3::Application']) register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor']) register_Ns3AttributeChecker_methods(root_module, root_module['ns3::AttributeChecker']) @@ -914,6 +920,7 @@ register_Ns3MgtBeaconHeader_methods(root_module, root_module['ns3::MgtBeaconHeader']) register_Ns3MobilityModel_methods(root_module, root_module['ns3::MobilityModel']) register_Ns3MpduAggregator_methods(root_module, root_module['ns3::MpduAggregator']) + register_Ns3MsduAggregator_methods(root_module, root_module['ns3::MsduAggregator']) register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector']) register_Ns3Node_methods(root_module, root_module['ns3::Node']) @@ -2984,67 +2991,82 @@ is_static=True) return -def register_Ns3MacLowBlockAckEventListener_methods(root_module, cls): - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener(ns3::MacLowBlockAckEventListener const & arg0) [copy constructor] - cls.add_constructor([param('ns3::MacLowBlockAckEventListener const &', 'arg0')]) - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener() [constructor] - cls.add_constructor([]) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::BlockAckInactivityTimeout(ns3::Mac48Address originator, uint8_t tid) [member function] +def register_Ns3MacLowAggregationCapableTransmissionListener_methods(root_module, cls): + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener::MacLowAggregationCapableTransmissionListener(ns3::MacLowAggregationCapableTransmissionListener const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MacLowAggregationCapableTransmissionListener const &', 'arg0')]) + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener::MacLowAggregationCapableTransmissionListener() [constructor] + cls.add_constructor([]) + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::BlockAckInactivityTimeout(ns3::Mac48Address originator, uint8_t tid) [member function] cls.add_method('BlockAckInactivityTimeout', 'void', [param('ns3::Mac48Address', 'originator'), param('uint8_t', 'tid')], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::CompleteMpduTx(ns3::Ptr packet, ns3::WifiMacHeader hdr, ns3::Time tstamp) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::CompleteMpduTx(ns3::Ptr packet, ns3::WifiMacHeader hdr, ns3::Time tstamp) [member function] cls.add_method('CompleteMpduTx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader', 'hdr'), param('ns3::Time', 'tstamp')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::CompleteTransfer(ns3::Mac48Address address, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::CompleteTransfer(ns3::Mac48Address address, uint8_t tid) [member function] cls.add_method('CompleteTransfer', 'void', [param('ns3::Mac48Address', 'address'), param('uint8_t', 'tid')], is_virtual=True) - ## mac-low.h (module 'wifi'): bool ns3::MacLowBlockAckEventListener::GetBlockAckAgreementExists(ns3::Mac48Address address, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): bool ns3::MacLowAggregationCapableTransmissionListener::GetBlockAckAgreementExists(ns3::Mac48Address address, uint8_t tid) [member function] cls.add_method('GetBlockAckAgreementExists', 'bool', [param('ns3::Mac48Address', 'address'), param('uint8_t', 'tid')], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowBlockAckEventListener::GetNOutstandingPackets(ns3::Mac48Address recipient, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLowAggregationCapableTransmissionListener::GetDestAddressForAggregation(ns3::WifiMacHeader const & hdr) [member function] + cls.add_method('GetDestAddressForAggregation', + 'ns3::Mac48Address', + [param('ns3::WifiMacHeader const &', 'hdr')], + is_virtual=True) + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::GetMsduAggregator() const [member function] + cls.add_method('GetMsduAggregator', + 'ns3::Ptr< ns3::MsduAggregator >', + [], + is_const=True, is_virtual=True) + ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowAggregationCapableTransmissionListener::GetNOutstandingPackets(ns3::Mac48Address recipient, uint8_t tid) [member function] cls.add_method('GetNOutstandingPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_virtual=True) - ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowBlockAckEventListener::GetNRetryNeededPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] + ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowAggregationCapableTransmissionListener::GetNRetryNeededPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] cls.add_method('GetNRetryNeededPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_const=True, is_virtual=True) - ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowBlockAckEventListener::GetNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] + ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowAggregationCapableTransmissionListener::GetNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] cls.add_method('GetNextSequenceNumberfor', 'uint16_t', [param('ns3::WifiMacHeader *', 'hdr')], is_virtual=True) - ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowBlockAckEventListener::GetQueue() [member function] + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::GetQueue() [member function] cls.add_method('GetQueue', 'ns3::Ptr< ns3::WifiMacQueue >', [], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowBlockAckEventListener::PeekNextPacketInBaQueue(ns3::WifiMacHeader & header, ns3::Mac48Address recipient, uint8_t tid, ns3::Time * timestamp) [member function] + ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLowAggregationCapableTransmissionListener::GetSrcAddressForAggregation(ns3::WifiMacHeader const & hdr) [member function] + cls.add_method('GetSrcAddressForAggregation', + 'ns3::Mac48Address', + [param('ns3::WifiMacHeader const &', 'hdr')], + is_virtual=True) + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::PeekNextPacketInBaQueue(ns3::WifiMacHeader & header, ns3::Mac48Address recipient, uint8_t tid, ns3::Time * timestamp) [member function] cls.add_method('PeekNextPacketInBaQueue', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader &', 'header'), param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid'), param('ns3::Time *', 'timestamp')], is_virtual=True) - ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowBlockAckEventListener::PeekNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] + ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowAggregationCapableTransmissionListener::PeekNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] cls.add_method('PeekNextSequenceNumberfor', 'uint16_t', [param('ns3::WifiMacHeader *', 'hdr')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::RemoveFromBaQueue(uint8_t tid, ns3::Mac48Address recipient, uint16_t seqnumber) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::RemoveFromBaQueue(uint8_t tid, ns3::Mac48Address recipient, uint16_t seqnumber) [member function] cls.add_method('RemoveFromBaQueue', 'void', [param('uint8_t', 'tid'), param('ns3::Mac48Address', 'recipient'), param('uint16_t', 'seqnumber')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::SetAmpdu(bool ampdu) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::SetAmpdu(bool ampdu) [member function] cls.add_method('SetAmpdu', 'void', [param('bool', 'ampdu')], @@ -8625,6 +8647,10 @@ 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, is_virtual=True) + ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::CalculatePlcpDuration(ns3::WifiTxVector txvector, ns3::WifiPreamble preamble) [member function] + cls.add_method('CalculatePlcpDuration', + 'ns3::Time', + [param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble')]) ## wifi-phy.h (module 'wifi'): double ns3::WifiPhy::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] cls.add_method('CalculateSnr', 'double', @@ -9098,10 +9124,10 @@ 'ns3::WifiMode', [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], is_static=True) - ## wifi-phy.h (module 'wifi'): static ns3::Time ns3::WifiPhy::GetPlcpHtSigHeaderDuration(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] + ## wifi-phy.h (module 'wifi'): static ns3::Time ns3::WifiPhy::GetPlcpHtSigHeaderDuration(ns3::WifiPreamble preamble) [member function] cls.add_method('GetPlcpHtSigHeaderDuration', 'ns3::Time', - [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + [param('ns3::WifiPreamble', 'preamble')], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::Time ns3::WifiPhy::GetPlcpHtTrainingSymbolDuration(ns3::WifiPreamble preamble, ns3::WifiTxVector txvector) [member function] cls.add_method('GetPlcpHtTrainingSymbolDuration', @@ -9963,6 +9989,70 @@ []) return +def register_Ns3AmsduSubframeHeader_methods(root_module, cls): + ## amsdu-subframe-header.h (module 'wifi'): ns3::AmsduSubframeHeader::AmsduSubframeHeader(ns3::AmsduSubframeHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::AmsduSubframeHeader const &', 'arg0')]) + ## amsdu-subframe-header.h (module 'wifi'): ns3::AmsduSubframeHeader::AmsduSubframeHeader() [constructor] + cls.add_constructor([]) + ## amsdu-subframe-header.h (module 'wifi'): uint32_t ns3::AmsduSubframeHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): ns3::Mac48Address ns3::AmsduSubframeHeader::GetDestinationAddr() const [member function] + cls.add_method('GetDestinationAddr', + 'ns3::Mac48Address', + [], + is_const=True) + ## amsdu-subframe-header.h (module 'wifi'): ns3::TypeId ns3::AmsduSubframeHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): uint16_t ns3::AmsduSubframeHeader::GetLength() const [member function] + cls.add_method('GetLength', + 'uint16_t', + [], + is_const=True) + ## amsdu-subframe-header.h (module 'wifi'): uint32_t ns3::AmsduSubframeHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): ns3::Mac48Address ns3::AmsduSubframeHeader::GetSourceAddr() const [member function] + cls.add_method('GetSourceAddr', + 'ns3::Mac48Address', + [], + is_const=True) + ## amsdu-subframe-header.h (module 'wifi'): static ns3::TypeId ns3::AmsduSubframeHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::SetDestinationAddr(ns3::Mac48Address to) [member function] + cls.add_method('SetDestinationAddr', + 'void', + [param('ns3::Mac48Address', 'to')]) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::SetLength(uint16_t arg0) [member function] + cls.add_method('SetLength', + 'void', + [param('uint16_t', 'arg0')]) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::SetSourceAddr(ns3::Mac48Address to) [member function] + cls.add_method('SetSourceAddr', + 'void', + [param('ns3::Mac48Address', 'to')]) + return + def register_Ns3Application_methods(root_module, cls): ## application.h (module 'network'): ns3::Application::Application(ns3::Application const & arg0) [copy constructor] cls.add_constructor([param('ns3::Application const &', 'arg0')]) @@ -12945,10 +13035,10 @@ cls.add_method('ReceiveOk', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode'), param('ns3::WifiPreamble', 'preamble'), param('bool', 'ampduSubframe')]) - ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterBlockAckListenerForAc(ns3::AcIndex ac, ns3::MacLowBlockAckEventListener * listener) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterBlockAckListenerForAc(ns3::AcIndex ac, ns3::MacLowAggregationCapableTransmissionListener * listener) [member function] cls.add_method('RegisterBlockAckListenerForAc', 'void', - [param('ns3::AcIndex', 'ac'), param('ns3::MacLowBlockAckEventListener *', 'listener')]) + [param('ns3::AcIndex', 'ac'), param('ns3::MacLowAggregationCapableTransmissionListener *', 'listener')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterDcfListener(ns3::MacLowDcfListener * listener) [member function] cls.add_method('RegisterDcfListener', 'void', @@ -13026,8 +13116,8 @@ 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters', 'parameters'), param('ns3::MacLowTransmissionListener *', 'listener')], is_virtual=True) - ## mac-low.h (module 'wifi'): bool ns3::MacLow::StopAggregation(ns3::Ptr peekedPacket, ns3::WifiMacHeader peekedHdr, ns3::Ptr aggregatedPacket, uint16_t size) const [member function] - cls.add_method('StopAggregation', + ## mac-low.h (module 'wifi'): bool ns3::MacLow::StopMpduAggregation(ns3::Ptr peekedPacket, ns3::WifiMacHeader peekedHdr, ns3::Ptr aggregatedPacket, uint16_t size) const [member function] + cls.add_method('StopMpduAggregation', 'bool', [param('ns3::Ptr< ns3::Packet const >', 'peekedPacket'), param('ns3::WifiMacHeader', 'peekedHdr'), param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket'), param('uint16_t', 'size')], is_const=True) @@ -13152,6 +13242,28 @@ is_static=True) return +def register_Ns3MsduAggregator_methods(root_module, cls): + ## msdu-aggregator.h (module 'wifi'): ns3::MsduAggregator::MsduAggregator() [constructor] + cls.add_constructor([]) + ## msdu-aggregator.h (module 'wifi'): ns3::MsduAggregator::MsduAggregator(ns3::MsduAggregator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MsduAggregator const &', 'arg0')]) + ## msdu-aggregator.h (module 'wifi'): bool ns3::MsduAggregator::Aggregate(ns3::Ptr packet, ns3::Ptr aggregatedPacket, ns3::Mac48Address src, ns3::Mac48Address dest) [member function] + cls.add_method('Aggregate', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket'), param('ns3::Mac48Address', 'src'), param('ns3::Mac48Address', 'dest')], + is_pure_virtual=True, is_virtual=True) + ## msdu-aggregator.h (module 'wifi'): static std::list, ns3::AmsduSubframeHeader>, std::allocator, ns3::AmsduSubframeHeader> > > ns3::MsduAggregator::Deaggregate(ns3::Ptr aggregatedPacket) [member function] + cls.add_method('Deaggregate', + 'std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader > >', + [param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket')], + is_static=True) + ## msdu-aggregator.h (module 'wifi'): static ns3::TypeId ns3::MsduAggregator::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + return + def register_Ns3NetDevice_methods(root_module, cls): ## net-device.h (module 'network'): ns3::NetDevice::NetDevice() [constructor] cls.add_constructor([]) diff -r 52c7ce21a0ca -r a1f6f647d516 src/wave/bindings/modulegen__gcc_LP64.py --- a/src/wave/bindings/modulegen__gcc_LP64.py Sun May 03 17:34:44 2015 +0200 +++ b/src/wave/bindings/modulegen__gcc_LP64.py Mon May 04 23:55:32 2015 +0200 @@ -28,6 +28,8 @@ module.add_enum('WifiModulationClass', ['WIFI_MOD_CLASS_UNKNOWN', 'WIFI_MOD_CLASS_IR', 'WIFI_MOD_CLASS_FHSS', 'WIFI_MOD_CLASS_DSSS', 'WIFI_MOD_CLASS_ERP_PBCC', 'WIFI_MOD_CLASS_DSSS_OFDM', 'WIFI_MOD_CLASS_ERP_OFDM', 'WIFI_MOD_CLASS_OFDM', 'WIFI_MOD_CLASS_HT'], import_from_module='ns.wifi') ## wifi-phy-standard.h (module 'wifi'): ns3::WifiPhyStandard [enumeration] module.add_enum('WifiPhyStandard', ['WIFI_PHY_STANDARD_80211a', 'WIFI_PHY_STANDARD_80211b', 'WIFI_PHY_STANDARD_80211g', 'WIFI_PHY_STANDARD_80211_10MHZ', 'WIFI_PHY_STANDARD_80211_5MHZ', 'WIFI_PHY_STANDARD_holland', 'WIFI_PHY_STANDARD_80211n_2_4GHZ', 'WIFI_PHY_STANDARD_80211n_5GHZ'], import_from_module='ns.wifi') + ## wifi-mode.h (module 'wifi'): ns3::WifiCodeRate [enumeration] + module.add_enum('WifiCodeRate', ['WIFI_CODE_RATE_UNDEFINED', 'WIFI_CODE_RATE_3_4', 'WIFI_CODE_RATE_2_3', 'WIFI_CODE_RATE_1_2', 'WIFI_CODE_RATE_5_6'], import_from_module='ns.wifi') ## qos-utils.h (module 'wifi'): ns3::AcIndex [enumeration] module.add_enum('AcIndex', ['AC_BE', 'AC_BK', 'AC_VI', 'AC_VO', 'AC_BE_NQOS', 'AC_UNDEF'], import_from_module='ns.wifi') ## channel-scheduler.h (module 'wave'): ns3::ChannelAccess [enumeration] @@ -38,8 +40,6 @@ module.add_enum('BlockAckType', ['BASIC_BLOCK_ACK', 'COMPRESSED_BLOCK_ACK', 'MULTI_TID_BLOCK_ACK'], import_from_module='ns.wifi') ## vsa-manager.h (module 'wave'): ns3::VsaTransmitInterval [enumeration] module.add_enum('VsaTransmitInterval', ['VSA_TRANSMIT_IN_CCHI', 'VSA_TRANSMIT_IN_SCHI', 'VSA_TRANSMIT_IN_BOTHI']) - ## wifi-mode.h (module 'wifi'): ns3::WifiCodeRate [enumeration] - module.add_enum('WifiCodeRate', ['WIFI_CODE_RATE_UNDEFINED', 'WIFI_CODE_RATE_3_4', 'WIFI_CODE_RATE_2_3', 'WIFI_CODE_RATE_1_2', 'WIFI_CODE_RATE_5_6'], import_from_module='ns.wifi') ## address.h (module 'network'): ns3::Address [class] module.add_class('Address', import_from_module='ns.network') ## address.h (module 'network'): ns3::Address::MaxSize_e [enumeration] @@ -128,8 +128,8 @@ module.add_class('Mac48Address', import_from_module='ns.network') ## mac48-address.h (module 'network'): ns3::Mac48Address [class] root_module['ns3::Mac48Address'].implicitly_converts_to(root_module['ns3::Address']) - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener [class] - module.add_class('MacLowBlockAckEventListener', allow_subclassing=True, import_from_module='ns.wifi') + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener [class] + module.add_class('MacLowAggregationCapableTransmissionListener', allow_subclassing=True, import_from_module='ns.wifi') ## mac-low.h (module 'wifi'): ns3::MacLowDcfListener [class] module.add_class('MacLowDcfListener', allow_subclassing=True, import_from_module='ns.wifi') ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionListener [class] @@ -416,6 +416,8 @@ module.add_class('ZipfRandomVariable', import_from_module='ns.core', parent=root_module['ns3::RandomVariableStream']) ## ampdu-subframe-header.h (module 'wifi'): ns3::AmpduSubframeHeader [class] module.add_class('AmpduSubframeHeader', import_from_module='ns.wifi', parent=root_module['ns3::Header']) + ## amsdu-subframe-header.h (module 'wifi'): ns3::AmsduSubframeHeader [class] + module.add_class('AmsduSubframeHeader', import_from_module='ns.wifi', parent=root_module['ns3::Header']) ## application.h (module 'network'): ns3::Application [class] module.add_class('Application', import_from_module='ns.network', parent=root_module['ns3::Object']) ## attribute.h (module 'core'): ns3::AttributeAccessor [class] @@ -526,6 +528,8 @@ module.add_class('MobilityModel', import_from_module='ns.mobility', parent=root_module['ns3::Object']) ## mpdu-aggregator.h (module 'wifi'): ns3::MpduAggregator [class] module.add_class('MpduAggregator', import_from_module='ns.wifi', parent=root_module['ns3::Object']) + ## msdu-aggregator.h (module 'wifi'): ns3::MsduAggregator [class] + module.add_class('MsduAggregator', import_from_module='ns.wifi', parent=root_module['ns3::Object']) ## net-device.h (module 'network'): ns3::NetDevice [class] module.add_class('NetDevice', import_from_module='ns.network', parent=root_module['ns3::Object']) ## net-device.h (module 'network'): ns3::NetDevice::PacketType [enumeration] @@ -612,6 +616,7 @@ module.add_container('ns3::WifiMcsList', 'unsigned char', container_type=u'vector') module.add_container('std::map< unsigned int, unsigned int >', ('unsigned int', 'unsigned int'), container_type=u'map') module.add_container('std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmpduSubframeHeader > >', 'std::pair< ns3::Ptr< ns3::Packet >, ns3::AmpduSubframeHeader >', container_type=u'list') + module.add_container('std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader > >', 'std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader >', container_type=u'list') module.add_container('std::map< unsigned int, ns3::Ptr< ns3::OcbWifiMac > >', ('unsigned int', 'ns3::Ptr< ns3::OcbWifiMac >'), container_type=u'map') module.add_container('std::vector< ns3::Ptr< ns3::WifiPhy > >', 'ns3::Ptr< ns3::WifiPhy >', container_type=u'vector') typehandlers.add_type_alias(u'std::vector< unsigned char, std::allocator< unsigned char > >', u'ns3::WifiMcsList') @@ -743,7 +748,7 @@ register_Ns3Ipv6InterfaceContainer_methods(root_module, root_module['ns3::Ipv6InterfaceContainer']) register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix']) register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address']) - register_Ns3MacLowBlockAckEventListener_methods(root_module, root_module['ns3::MacLowBlockAckEventListener']) + register_Ns3MacLowAggregationCapableTransmissionListener_methods(root_module, root_module['ns3::MacLowAggregationCapableTransmissionListener']) register_Ns3MacLowDcfListener_methods(root_module, root_module['ns3::MacLowDcfListener']) register_Ns3MacLowTransmissionListener_methods(root_module, root_module['ns3::MacLowTransmissionListener']) register_Ns3MacLowTransmissionParameters_methods(root_module, root_module['ns3::MacLowTransmissionParameters']) @@ -861,6 +866,7 @@ register_Ns3ZetaRandomVariable_methods(root_module, root_module['ns3::ZetaRandomVariable']) register_Ns3ZipfRandomVariable_methods(root_module, root_module['ns3::ZipfRandomVariable']) register_Ns3AmpduSubframeHeader_methods(root_module, root_module['ns3::AmpduSubframeHeader']) + register_Ns3AmsduSubframeHeader_methods(root_module, root_module['ns3::AmsduSubframeHeader']) register_Ns3Application_methods(root_module, root_module['ns3::Application']) register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor']) register_Ns3AttributeChecker_methods(root_module, root_module['ns3::AttributeChecker']) @@ -914,6 +920,7 @@ register_Ns3MgtBeaconHeader_methods(root_module, root_module['ns3::MgtBeaconHeader']) register_Ns3MobilityModel_methods(root_module, root_module['ns3::MobilityModel']) register_Ns3MpduAggregator_methods(root_module, root_module['ns3::MpduAggregator']) + register_Ns3MsduAggregator_methods(root_module, root_module['ns3::MsduAggregator']) register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice']) register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector']) register_Ns3Node_methods(root_module, root_module['ns3::Node']) @@ -2984,67 +2991,82 @@ is_static=True) return -def register_Ns3MacLowBlockAckEventListener_methods(root_module, cls): - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener(ns3::MacLowBlockAckEventListener const & arg0) [copy constructor] - cls.add_constructor([param('ns3::MacLowBlockAckEventListener const &', 'arg0')]) - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener() [constructor] - cls.add_constructor([]) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::BlockAckInactivityTimeout(ns3::Mac48Address originator, uint8_t tid) [member function] +def register_Ns3MacLowAggregationCapableTransmissionListener_methods(root_module, cls): + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener::MacLowAggregationCapableTransmissionListener(ns3::MacLowAggregationCapableTransmissionListener const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MacLowAggregationCapableTransmissionListener const &', 'arg0')]) + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener::MacLowAggregationCapableTransmissionListener() [constructor] + cls.add_constructor([]) + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::BlockAckInactivityTimeout(ns3::Mac48Address originator, uint8_t tid) [member function] cls.add_method('BlockAckInactivityTimeout', 'void', [param('ns3::Mac48Address', 'originator'), param('uint8_t', 'tid')], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::CompleteMpduTx(ns3::Ptr packet, ns3::WifiMacHeader hdr, ns3::Time tstamp) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::CompleteMpduTx(ns3::Ptr packet, ns3::WifiMacHeader hdr, ns3::Time tstamp) [member function] cls.add_method('CompleteMpduTx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader', 'hdr'), param('ns3::Time', 'tstamp')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::CompleteTransfer(ns3::Mac48Address address, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::CompleteTransfer(ns3::Mac48Address address, uint8_t tid) [member function] cls.add_method('CompleteTransfer', 'void', [param('ns3::Mac48Address', 'address'), param('uint8_t', 'tid')], is_virtual=True) - ## mac-low.h (module 'wifi'): bool ns3::MacLowBlockAckEventListener::GetBlockAckAgreementExists(ns3::Mac48Address address, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): bool ns3::MacLowAggregationCapableTransmissionListener::GetBlockAckAgreementExists(ns3::Mac48Address address, uint8_t tid) [member function] cls.add_method('GetBlockAckAgreementExists', 'bool', [param('ns3::Mac48Address', 'address'), param('uint8_t', 'tid')], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowBlockAckEventListener::GetNOutstandingPackets(ns3::Mac48Address recipient, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLowAggregationCapableTransmissionListener::GetDestAddressForAggregation(ns3::WifiMacHeader const & hdr) [member function] + cls.add_method('GetDestAddressForAggregation', + 'ns3::Mac48Address', + [param('ns3::WifiMacHeader const &', 'hdr')], + is_virtual=True) + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::GetMsduAggregator() const [member function] + cls.add_method('GetMsduAggregator', + 'ns3::Ptr< ns3::MsduAggregator >', + [], + is_const=True, is_virtual=True) + ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowAggregationCapableTransmissionListener::GetNOutstandingPackets(ns3::Mac48Address recipient, uint8_t tid) [member function] cls.add_method('GetNOutstandingPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_virtual=True) - ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowBlockAckEventListener::GetNRetryNeededPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] + ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowAggregationCapableTransmissionListener::GetNRetryNeededPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] cls.add_method('GetNRetryNeededPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_const=True, is_virtual=True) - ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowBlockAckEventListener::GetNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] + ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowAggregationCapableTransmissionListener::GetNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] cls.add_method('GetNextSequenceNumberfor', 'uint16_t', [param('ns3::WifiMacHeader *', 'hdr')], is_virtual=True) - ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowBlockAckEventListener::GetQueue() [member function] + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::GetQueue() [member function] cls.add_method('GetQueue', 'ns3::Ptr< ns3::WifiMacQueue >', [], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowBlockAckEventListener::PeekNextPacketInBaQueue(ns3::WifiMacHeader & header, ns3::Mac48Address recipient, uint8_t tid, ns3::Time * timestamp) [member function] + ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLowAggregationCapableTransmissionListener::GetSrcAddressForAggregation(ns3::WifiMacHeader const & hdr) [member function] + cls.add_method('GetSrcAddressForAggregation', + 'ns3::Mac48Address', + [param('ns3::WifiMacHeader const &', 'hdr')], + is_virtual=True) + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::PeekNextPacketInBaQueue(ns3::WifiMacHeader & header, ns3::Mac48Address recipient, uint8_t tid, ns3::Time * timestamp) [member function] cls.add_method('PeekNextPacketInBaQueue', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader &', 'header'), param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid'), param('ns3::Time *', 'timestamp')], is_virtual=True) - ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowBlockAckEventListener::PeekNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] + ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowAggregationCapableTransmissionListener::PeekNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] cls.add_method('PeekNextSequenceNumberfor', 'uint16_t', [param('ns3::WifiMacHeader *', 'hdr')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::RemoveFromBaQueue(uint8_t tid, ns3::Mac48Address recipient, uint16_t seqnumber) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::RemoveFromBaQueue(uint8_t tid, ns3::Mac48Address recipient, uint16_t seqnumber) [member function] cls.add_method('RemoveFromBaQueue', 'void', [param('uint8_t', 'tid'), param('ns3::Mac48Address', 'recipient'), param('uint16_t', 'seqnumber')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::SetAmpdu(bool ampdu) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::SetAmpdu(bool ampdu) [member function] cls.add_method('SetAmpdu', 'void', [param('bool', 'ampdu')], @@ -8625,6 +8647,10 @@ 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, is_virtual=True) + ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::CalculatePlcpDuration(ns3::WifiTxVector txvector, ns3::WifiPreamble preamble) [member function] + cls.add_method('CalculatePlcpDuration', + 'ns3::Time', + [param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble')]) ## wifi-phy.h (module 'wifi'): double ns3::WifiPhy::CalculateSnr(ns3::WifiMode txMode, double ber) const [member function] cls.add_method('CalculateSnr', 'double', @@ -9098,10 +9124,10 @@ 'ns3::WifiMode', [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], is_static=True) - ## wifi-phy.h (module 'wifi'): static ns3::Time ns3::WifiPhy::GetPlcpHtSigHeaderDuration(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function] + ## wifi-phy.h (module 'wifi'): static ns3::Time ns3::WifiPhy::GetPlcpHtSigHeaderDuration(ns3::WifiPreamble preamble) [member function] cls.add_method('GetPlcpHtSigHeaderDuration', 'ns3::Time', - [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')], + [param('ns3::WifiPreamble', 'preamble')], is_static=True) ## wifi-phy.h (module 'wifi'): static ns3::Time ns3::WifiPhy::GetPlcpHtTrainingSymbolDuration(ns3::WifiPreamble preamble, ns3::WifiTxVector txvector) [member function] cls.add_method('GetPlcpHtTrainingSymbolDuration', @@ -9963,6 +9989,70 @@ []) return +def register_Ns3AmsduSubframeHeader_methods(root_module, cls): + ## amsdu-subframe-header.h (module 'wifi'): ns3::AmsduSubframeHeader::AmsduSubframeHeader(ns3::AmsduSubframeHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::AmsduSubframeHeader const &', 'arg0')]) + ## amsdu-subframe-header.h (module 'wifi'): ns3::AmsduSubframeHeader::AmsduSubframeHeader() [constructor] + cls.add_constructor([]) + ## amsdu-subframe-header.h (module 'wifi'): uint32_t ns3::AmsduSubframeHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): ns3::Mac48Address ns3::AmsduSubframeHeader::GetDestinationAddr() const [member function] + cls.add_method('GetDestinationAddr', + 'ns3::Mac48Address', + [], + is_const=True) + ## amsdu-subframe-header.h (module 'wifi'): ns3::TypeId ns3::AmsduSubframeHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): uint16_t ns3::AmsduSubframeHeader::GetLength() const [member function] + cls.add_method('GetLength', + 'uint16_t', + [], + is_const=True) + ## amsdu-subframe-header.h (module 'wifi'): uint32_t ns3::AmsduSubframeHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): ns3::Mac48Address ns3::AmsduSubframeHeader::GetSourceAddr() const [member function] + cls.add_method('GetSourceAddr', + 'ns3::Mac48Address', + [], + is_const=True) + ## amsdu-subframe-header.h (module 'wifi'): static ns3::TypeId ns3::AmsduSubframeHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::SetDestinationAddr(ns3::Mac48Address to) [member function] + cls.add_method('SetDestinationAddr', + 'void', + [param('ns3::Mac48Address', 'to')]) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::SetLength(uint16_t arg0) [member function] + cls.add_method('SetLength', + 'void', + [param('uint16_t', 'arg0')]) + ## amsdu-subframe-header.h (module 'wifi'): void ns3::AmsduSubframeHeader::SetSourceAddr(ns3::Mac48Address to) [member function] + cls.add_method('SetSourceAddr', + 'void', + [param('ns3::Mac48Address', 'to')]) + return + def register_Ns3Application_methods(root_module, cls): ## application.h (module 'network'): ns3::Application::Application(ns3::Application const & arg0) [copy constructor] cls.add_constructor([param('ns3::Application const &', 'arg0')]) @@ -12945,10 +13035,10 @@ cls.add_method('ReceiveOk', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode'), param('ns3::WifiPreamble', 'preamble'), param('bool', 'ampduSubframe')]) - ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterBlockAckListenerForAc(ns3::AcIndex ac, ns3::MacLowBlockAckEventListener * listener) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterBlockAckListenerForAc(ns3::AcIndex ac, ns3::MacLowAggregationCapableTransmissionListener * listener) [member function] cls.add_method('RegisterBlockAckListenerForAc', 'void', - [param('ns3::AcIndex', 'ac'), param('ns3::MacLowBlockAckEventListener *', 'listener')]) + [param('ns3::AcIndex', 'ac'), param('ns3::MacLowAggregationCapableTransmissionListener *', 'listener')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterDcfListener(ns3::MacLowDcfListener * listener) [member function] cls.add_method('RegisterDcfListener', 'void', @@ -13026,8 +13116,8 @@ 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters', 'parameters'), param('ns3::MacLowTransmissionListener *', 'listener')], is_virtual=True) - ## mac-low.h (module 'wifi'): bool ns3::MacLow::StopAggregation(ns3::Ptr peekedPacket, ns3::WifiMacHeader peekedHdr, ns3::Ptr aggregatedPacket, uint16_t size) const [member function] - cls.add_method('StopAggregation', + ## mac-low.h (module 'wifi'): bool ns3::MacLow::StopMpduAggregation(ns3::Ptr peekedPacket, ns3::WifiMacHeader peekedHdr, ns3::Ptr aggregatedPacket, uint16_t size) const [member function] + cls.add_method('StopMpduAggregation', 'bool', [param('ns3::Ptr< ns3::Packet const >', 'peekedPacket'), param('ns3::WifiMacHeader', 'peekedHdr'), param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket'), param('uint16_t', 'size')], is_const=True) @@ -13152,6 +13242,28 @@ is_static=True) return +def register_Ns3MsduAggregator_methods(root_module, cls): + ## msdu-aggregator.h (module 'wifi'): ns3::MsduAggregator::MsduAggregator() [constructor] + cls.add_constructor([]) + ## msdu-aggregator.h (module 'wifi'): ns3::MsduAggregator::MsduAggregator(ns3::MsduAggregator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MsduAggregator const &', 'arg0')]) + ## msdu-aggregator.h (module 'wifi'): bool ns3::MsduAggregator::Aggregate(ns3::Ptr packet, ns3::Ptr aggregatedPacket, ns3::Mac48Address src, ns3::Mac48Address dest) [member function] + cls.add_method('Aggregate', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket'), param('ns3::Mac48Address', 'src'), param('ns3::Mac48Address', 'dest')], + is_pure_virtual=True, is_virtual=True) + ## msdu-aggregator.h (module 'wifi'): static std::list, ns3::AmsduSubframeHeader>, std::allocator, ns3::AmsduSubframeHeader> > > ns3::MsduAggregator::Deaggregate(ns3::Ptr aggregatedPacket) [member function] + cls.add_method('Deaggregate', + 'std::list< std::pair< ns3::Ptr< ns3::Packet >, ns3::AmsduSubframeHeader > >', + [param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket')], + is_static=True) + ## msdu-aggregator.h (module 'wifi'): static ns3::TypeId ns3::MsduAggregator::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + return + def register_Ns3NetDevice_methods(root_module, cls): ## net-device.h (module 'network'): ns3::NetDevice::NetDevice() [constructor] cls.add_constructor([]) diff -r 52c7ce21a0ca -r a1f6f647d516 src/wifi/bindings/modulegen__gcc_ILP32.py --- a/src/wifi/bindings/modulegen__gcc_ILP32.py Sun May 03 17:34:44 2015 +0200 +++ b/src/wifi/bindings/modulegen__gcc_ILP32.py Mon May 04 23:55:32 2015 +0200 @@ -112,8 +112,8 @@ module.add_class('Mac48Address', import_from_module='ns.network') ## mac48-address.h (module 'network'): ns3::Mac48Address [class] root_module['ns3::Mac48Address'].implicitly_converts_to(root_module['ns3::Address']) - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener [class] - module.add_class('MacLowBlockAckEventListener', allow_subclassing=True) + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener [class] + module.add_class('MacLowAggregationCapableTransmissionListener', allow_subclassing=True) ## mac-low.h (module 'wifi'): ns3::MacLowDcfListener [class] module.add_class('MacLowDcfListener', allow_subclassing=True) ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionListener [class] @@ -706,7 +706,7 @@ register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix']) register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address']) - register_Ns3MacLowBlockAckEventListener_methods(root_module, root_module['ns3::MacLowBlockAckEventListener']) + register_Ns3MacLowAggregationCapableTransmissionListener_methods(root_module, root_module['ns3::MacLowAggregationCapableTransmissionListener']) register_Ns3MacLowDcfListener_methods(root_module, root_module['ns3::MacLowDcfListener']) register_Ns3MacLowTransmissionListener_methods(root_module, root_module['ns3::MacLowTransmissionListener']) register_Ns3MacLowTransmissionParameters_methods(root_module, root_module['ns3::MacLowTransmissionParameters']) @@ -2740,67 +2740,82 @@ is_static=True) return -def register_Ns3MacLowBlockAckEventListener_methods(root_module, cls): - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener(ns3::MacLowBlockAckEventListener const & arg0) [copy constructor] - cls.add_constructor([param('ns3::MacLowBlockAckEventListener const &', 'arg0')]) - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener() [constructor] - cls.add_constructor([]) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::BlockAckInactivityTimeout(ns3::Mac48Address originator, uint8_t tid) [member function] +def register_Ns3MacLowAggregationCapableTransmissionListener_methods(root_module, cls): + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener::MacLowAggregationCapableTransmissionListener(ns3::MacLowAggregationCapableTransmissionListener const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MacLowAggregationCapableTransmissionListener const &', 'arg0')]) + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener::MacLowAggregationCapableTransmissionListener() [constructor] + cls.add_constructor([]) + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::BlockAckInactivityTimeout(ns3::Mac48Address originator, uint8_t tid) [member function] cls.add_method('BlockAckInactivityTimeout', 'void', [param('ns3::Mac48Address', 'originator'), param('uint8_t', 'tid')], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::CompleteMpduTx(ns3::Ptr packet, ns3::WifiMacHeader hdr, ns3::Time tstamp) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::CompleteMpduTx(ns3::Ptr packet, ns3::WifiMacHeader hdr, ns3::Time tstamp) [member function] cls.add_method('CompleteMpduTx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader', 'hdr'), param('ns3::Time', 'tstamp')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::CompleteTransfer(ns3::Mac48Address address, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::CompleteTransfer(ns3::Mac48Address address, uint8_t tid) [member function] cls.add_method('CompleteTransfer', 'void', [param('ns3::Mac48Address', 'address'), param('uint8_t', 'tid')], is_virtual=True) - ## mac-low.h (module 'wifi'): bool ns3::MacLowBlockAckEventListener::GetBlockAckAgreementExists(ns3::Mac48Address address, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): bool ns3::MacLowAggregationCapableTransmissionListener::GetBlockAckAgreementExists(ns3::Mac48Address address, uint8_t tid) [member function] cls.add_method('GetBlockAckAgreementExists', 'bool', [param('ns3::Mac48Address', 'address'), param('uint8_t', 'tid')], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowBlockAckEventListener::GetNOutstandingPackets(ns3::Mac48Address recipient, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLowAggregationCapableTransmissionListener::GetDestAddressForAggregation(ns3::WifiMacHeader const & hdr) [member function] + cls.add_method('GetDestAddressForAggregation', + 'ns3::Mac48Address', + [param('ns3::WifiMacHeader const &', 'hdr')], + is_virtual=True) + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::GetMsduAggregator() const [member function] + cls.add_method('GetMsduAggregator', + 'ns3::Ptr< ns3::MsduAggregator >', + [], + is_const=True, is_virtual=True) + ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowAggregationCapableTransmissionListener::GetNOutstandingPackets(ns3::Mac48Address recipient, uint8_t tid) [member function] cls.add_method('GetNOutstandingPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_virtual=True) - ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowBlockAckEventListener::GetNRetryNeededPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] + ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowAggregationCapableTransmissionListener::GetNRetryNeededPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] cls.add_method('GetNRetryNeededPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_const=True, is_virtual=True) - ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowBlockAckEventListener::GetNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] + ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowAggregationCapableTransmissionListener::GetNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] cls.add_method('GetNextSequenceNumberfor', 'uint16_t', [param('ns3::WifiMacHeader *', 'hdr')], is_virtual=True) - ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowBlockAckEventListener::GetQueue() [member function] + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::GetQueue() [member function] cls.add_method('GetQueue', 'ns3::Ptr< ns3::WifiMacQueue >', [], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowBlockAckEventListener::PeekNextPacketInBaQueue(ns3::WifiMacHeader & header, ns3::Mac48Address recipient, uint8_t tid, ns3::Time * timestamp) [member function] + ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLowAggregationCapableTransmissionListener::GetSrcAddressForAggregation(ns3::WifiMacHeader const & hdr) [member function] + cls.add_method('GetSrcAddressForAggregation', + 'ns3::Mac48Address', + [param('ns3::WifiMacHeader const &', 'hdr')], + is_virtual=True) + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::PeekNextPacketInBaQueue(ns3::WifiMacHeader & header, ns3::Mac48Address recipient, uint8_t tid, ns3::Time * timestamp) [member function] cls.add_method('PeekNextPacketInBaQueue', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader &', 'header'), param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid'), param('ns3::Time *', 'timestamp')], is_virtual=True) - ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowBlockAckEventListener::PeekNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] + ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowAggregationCapableTransmissionListener::PeekNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] cls.add_method('PeekNextSequenceNumberfor', 'uint16_t', [param('ns3::WifiMacHeader *', 'hdr')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::RemoveFromBaQueue(uint8_t tid, ns3::Mac48Address recipient, uint16_t seqnumber) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::RemoveFromBaQueue(uint8_t tid, ns3::Mac48Address recipient, uint16_t seqnumber) [member function] cls.add_method('RemoveFromBaQueue', 'void', [param('uint8_t', 'tid'), param('ns3::Mac48Address', 'recipient'), param('uint16_t', 'seqnumber')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::SetAmpdu(bool ampdu) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::SetAmpdu(bool ampdu) [member function] cls.add_method('SetAmpdu', 'void', [param('bool', 'ampdu')], @@ -11782,10 +11797,10 @@ cls.add_method('ReceiveOk', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode'), param('ns3::WifiPreamble', 'preamble'), param('bool', 'ampduSubframe')]) - ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterBlockAckListenerForAc(ns3::AcIndex ac, ns3::MacLowBlockAckEventListener * listener) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterBlockAckListenerForAc(ns3::AcIndex ac, ns3::MacLowAggregationCapableTransmissionListener * listener) [member function] cls.add_method('RegisterBlockAckListenerForAc', 'void', - [param('ns3::AcIndex', 'ac'), param('ns3::MacLowBlockAckEventListener *', 'listener')]) + [param('ns3::AcIndex', 'ac'), param('ns3::MacLowAggregationCapableTransmissionListener *', 'listener')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterDcfListener(ns3::MacLowDcfListener * listener) [member function] cls.add_method('RegisterDcfListener', 'void', @@ -11863,8 +11878,8 @@ 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters', 'parameters'), param('ns3::MacLowTransmissionListener *', 'listener')], is_virtual=True) - ## mac-low.h (module 'wifi'): bool ns3::MacLow::StopAggregation(ns3::Ptr peekedPacket, ns3::WifiMacHeader peekedHdr, ns3::Ptr aggregatedPacket, uint16_t size) const [member function] - cls.add_method('StopAggregation', + ## mac-low.h (module 'wifi'): bool ns3::MacLow::StopMpduAggregation(ns3::Ptr peekedPacket, ns3::WifiMacHeader peekedHdr, ns3::Ptr aggregatedPacket, uint16_t size) const [member function] + cls.add_method('StopMpduAggregation', 'bool', [param('ns3::Ptr< ns3::Packet const >', 'peekedPacket'), param('ns3::WifiMacHeader', 'peekedHdr'), param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket'), param('uint16_t', 'size')], is_const=True) diff -r 52c7ce21a0ca -r a1f6f647d516 src/wifi/bindings/modulegen__gcc_LP64.py --- a/src/wifi/bindings/modulegen__gcc_LP64.py Sun May 03 17:34:44 2015 +0200 +++ b/src/wifi/bindings/modulegen__gcc_LP64.py Mon May 04 23:55:32 2015 +0200 @@ -112,8 +112,8 @@ module.add_class('Mac48Address', import_from_module='ns.network') ## mac48-address.h (module 'network'): ns3::Mac48Address [class] root_module['ns3::Mac48Address'].implicitly_converts_to(root_module['ns3::Address']) - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener [class] - module.add_class('MacLowBlockAckEventListener', allow_subclassing=True) + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener [class] + module.add_class('MacLowAggregationCapableTransmissionListener', allow_subclassing=True) ## mac-low.h (module 'wifi'): ns3::MacLowDcfListener [class] module.add_class('MacLowDcfListener', allow_subclassing=True) ## mac-low.h (module 'wifi'): ns3::MacLowTransmissionListener [class] @@ -706,7 +706,7 @@ register_Ns3Ipv6Address_methods(root_module, root_module['ns3::Ipv6Address']) register_Ns3Ipv6Prefix_methods(root_module, root_module['ns3::Ipv6Prefix']) register_Ns3Mac48Address_methods(root_module, root_module['ns3::Mac48Address']) - register_Ns3MacLowBlockAckEventListener_methods(root_module, root_module['ns3::MacLowBlockAckEventListener']) + register_Ns3MacLowAggregationCapableTransmissionListener_methods(root_module, root_module['ns3::MacLowAggregationCapableTransmissionListener']) register_Ns3MacLowDcfListener_methods(root_module, root_module['ns3::MacLowDcfListener']) register_Ns3MacLowTransmissionListener_methods(root_module, root_module['ns3::MacLowTransmissionListener']) register_Ns3MacLowTransmissionParameters_methods(root_module, root_module['ns3::MacLowTransmissionParameters']) @@ -2740,67 +2740,82 @@ is_static=True) return -def register_Ns3MacLowBlockAckEventListener_methods(root_module, cls): - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener(ns3::MacLowBlockAckEventListener const & arg0) [copy constructor] - cls.add_constructor([param('ns3::MacLowBlockAckEventListener const &', 'arg0')]) - ## mac-low.h (module 'wifi'): ns3::MacLowBlockAckEventListener::MacLowBlockAckEventListener() [constructor] - cls.add_constructor([]) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::BlockAckInactivityTimeout(ns3::Mac48Address originator, uint8_t tid) [member function] +def register_Ns3MacLowAggregationCapableTransmissionListener_methods(root_module, cls): + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener::MacLowAggregationCapableTransmissionListener(ns3::MacLowAggregationCapableTransmissionListener const & arg0) [copy constructor] + cls.add_constructor([param('ns3::MacLowAggregationCapableTransmissionListener const &', 'arg0')]) + ## mac-low.h (module 'wifi'): ns3::MacLowAggregationCapableTransmissionListener::MacLowAggregationCapableTransmissionListener() [constructor] + cls.add_constructor([]) + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::BlockAckInactivityTimeout(ns3::Mac48Address originator, uint8_t tid) [member function] cls.add_method('BlockAckInactivityTimeout', 'void', [param('ns3::Mac48Address', 'originator'), param('uint8_t', 'tid')], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::CompleteMpduTx(ns3::Ptr packet, ns3::WifiMacHeader hdr, ns3::Time tstamp) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::CompleteMpduTx(ns3::Ptr packet, ns3::WifiMacHeader hdr, ns3::Time tstamp) [member function] cls.add_method('CompleteMpduTx', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader', 'hdr'), param('ns3::Time', 'tstamp')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::CompleteTransfer(ns3::Mac48Address address, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::CompleteTransfer(ns3::Mac48Address address, uint8_t tid) [member function] cls.add_method('CompleteTransfer', 'void', [param('ns3::Mac48Address', 'address'), param('uint8_t', 'tid')], is_virtual=True) - ## mac-low.h (module 'wifi'): bool ns3::MacLowBlockAckEventListener::GetBlockAckAgreementExists(ns3::Mac48Address address, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): bool ns3::MacLowAggregationCapableTransmissionListener::GetBlockAckAgreementExists(ns3::Mac48Address address, uint8_t tid) [member function] cls.add_method('GetBlockAckAgreementExists', 'bool', [param('ns3::Mac48Address', 'address'), param('uint8_t', 'tid')], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowBlockAckEventListener::GetNOutstandingPackets(ns3::Mac48Address recipient, uint8_t tid) [member function] + ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLowAggregationCapableTransmissionListener::GetDestAddressForAggregation(ns3::WifiMacHeader const & hdr) [member function] + cls.add_method('GetDestAddressForAggregation', + 'ns3::Mac48Address', + [param('ns3::WifiMacHeader const &', 'hdr')], + is_virtual=True) + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::GetMsduAggregator() const [member function] + cls.add_method('GetMsduAggregator', + 'ns3::Ptr< ns3::MsduAggregator >', + [], + is_const=True, is_virtual=True) + ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowAggregationCapableTransmissionListener::GetNOutstandingPackets(ns3::Mac48Address recipient, uint8_t tid) [member function] cls.add_method('GetNOutstandingPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_virtual=True) - ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowBlockAckEventListener::GetNRetryNeededPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] + ## mac-low.h (module 'wifi'): uint32_t ns3::MacLowAggregationCapableTransmissionListener::GetNRetryNeededPackets(ns3::Mac48Address recipient, uint8_t tid) const [member function] cls.add_method('GetNRetryNeededPackets', 'uint32_t', [param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid')], is_const=True, is_virtual=True) - ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowBlockAckEventListener::GetNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] + ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowAggregationCapableTransmissionListener::GetNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] cls.add_method('GetNextSequenceNumberfor', 'uint16_t', [param('ns3::WifiMacHeader *', 'hdr')], is_virtual=True) - ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowBlockAckEventListener::GetQueue() [member function] + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::GetQueue() [member function] cls.add_method('GetQueue', 'ns3::Ptr< ns3::WifiMacQueue >', [], is_pure_virtual=True, is_virtual=True) - ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowBlockAckEventListener::PeekNextPacketInBaQueue(ns3::WifiMacHeader & header, ns3::Mac48Address recipient, uint8_t tid, ns3::Time * timestamp) [member function] + ## mac-low.h (module 'wifi'): ns3::Mac48Address ns3::MacLowAggregationCapableTransmissionListener::GetSrcAddressForAggregation(ns3::WifiMacHeader const & hdr) [member function] + cls.add_method('GetSrcAddressForAggregation', + 'ns3::Mac48Address', + [param('ns3::WifiMacHeader const &', 'hdr')], + is_virtual=True) + ## mac-low.h (module 'wifi'): ns3::Ptr ns3::MacLowAggregationCapableTransmissionListener::PeekNextPacketInBaQueue(ns3::WifiMacHeader & header, ns3::Mac48Address recipient, uint8_t tid, ns3::Time * timestamp) [member function] cls.add_method('PeekNextPacketInBaQueue', 'ns3::Ptr< ns3::Packet const >', [param('ns3::WifiMacHeader &', 'header'), param('ns3::Mac48Address', 'recipient'), param('uint8_t', 'tid'), param('ns3::Time *', 'timestamp')], is_virtual=True) - ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowBlockAckEventListener::PeekNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] + ## mac-low.h (module 'wifi'): uint16_t ns3::MacLowAggregationCapableTransmissionListener::PeekNextSequenceNumberfor(ns3::WifiMacHeader * hdr) [member function] cls.add_method('PeekNextSequenceNumberfor', 'uint16_t', [param('ns3::WifiMacHeader *', 'hdr')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::RemoveFromBaQueue(uint8_t tid, ns3::Mac48Address recipient, uint16_t seqnumber) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::RemoveFromBaQueue(uint8_t tid, ns3::Mac48Address recipient, uint16_t seqnumber) [member function] cls.add_method('RemoveFromBaQueue', 'void', [param('uint8_t', 'tid'), param('ns3::Mac48Address', 'recipient'), param('uint16_t', 'seqnumber')], is_virtual=True) - ## mac-low.h (module 'wifi'): void ns3::MacLowBlockAckEventListener::SetAmpdu(bool ampdu) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLowAggregationCapableTransmissionListener::SetAmpdu(bool ampdu) [member function] cls.add_method('SetAmpdu', 'void', [param('bool', 'ampdu')], @@ -11782,10 +11797,10 @@ cls.add_method('ReceiveOk', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxSnr'), param('ns3::WifiMode', 'txMode'), param('ns3::WifiPreamble', 'preamble'), param('bool', 'ampduSubframe')]) - ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterBlockAckListenerForAc(ns3::AcIndex ac, ns3::MacLowBlockAckEventListener * listener) [member function] + ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterBlockAckListenerForAc(ns3::AcIndex ac, ns3::MacLowAggregationCapableTransmissionListener * listener) [member function] cls.add_method('RegisterBlockAckListenerForAc', 'void', - [param('ns3::AcIndex', 'ac'), param('ns3::MacLowBlockAckEventListener *', 'listener')]) + [param('ns3::AcIndex', 'ac'), param('ns3::MacLowAggregationCapableTransmissionListener *', 'listener')]) ## mac-low.h (module 'wifi'): void ns3::MacLow::RegisterDcfListener(ns3::MacLowDcfListener * listener) [member function] cls.add_method('RegisterDcfListener', 'void', @@ -11863,8 +11878,8 @@ 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiMacHeader const *', 'hdr'), param('ns3::MacLowTransmissionParameters', 'parameters'), param('ns3::MacLowTransmissionListener *', 'listener')], is_virtual=True) - ## mac-low.h (module 'wifi'): bool ns3::MacLow::StopAggregation(ns3::Ptr peekedPacket, ns3::WifiMacHeader peekedHdr, ns3::Ptr aggregatedPacket, uint16_t size) const [member function] - cls.add_method('StopAggregation', + ## mac-low.h (module 'wifi'): bool ns3::MacLow::StopMpduAggregation(ns3::Ptr peekedPacket, ns3::WifiMacHeader peekedHdr, ns3::Ptr aggregatedPacket, uint16_t size) const [member function] + cls.add_method('StopMpduAggregation', 'bool', [param('ns3::Ptr< ns3::Packet const >', 'peekedPacket'), param('ns3::WifiMacHeader', 'peekedHdr'), param('ns3::Ptr< ns3::Packet >', 'aggregatedPacket'), param('uint16_t', 'size')], is_const=True) diff -r 52c7ce21a0ca -r a1f6f647d516 src/wifi/model/edca-txop-n.cc --- a/src/wifi/model/edca-txop-n.cc Sun May 03 17:34:44 2015 +0200 +++ b/src/wifi/model/edca-txop-n.cc Mon May 04 23:55:32 2015 +0200 @@ -132,14 +132,14 @@ EdcaTxopN *m_txop; }; -class EdcaTxopN::BlockAckEventListener : public MacLowBlockAckEventListener +class EdcaTxopN::AggregationCapableTransmissionListener : public MacLowAggregationCapableTransmissionListener { public: - BlockAckEventListener (EdcaTxopN * txop) - : MacLowBlockAckEventListener (), + AggregationCapableTransmissionListener (EdcaTxopN * txop) + : MacLowAggregationCapableTransmissionListener (), m_txop (txop) { } - virtual ~BlockAckEventListener () {} + virtual ~AggregationCapableTransmissionListener () {} virtual void BlockAckInactivityTimeout (Mac48Address address, uint8_t tid) { @@ -189,6 +189,18 @@ { return m_txop->GetNRetryNeededPackets (recipient, tid); } + virtual Ptr GetMsduAggregator (void) const + { + return m_txop->GetMsduAggregator (); + } + virtual Mac48Address GetSrcAddressForAggregation (const WifiMacHeader &hdr) + { + return m_txop->MapSrcAddressForAggregation (hdr); + } + virtual Mac48Address GetDestAddressForAggregation (const WifiMacHeader &hdr) + { + return m_txop->MapDestAddressForAggregation (hdr); + } private: EdcaTxopN *m_txop; @@ -233,7 +245,7 @@ { NS_LOG_FUNCTION (this); m_transmissionListener = new EdcaTxopN::TransmissionListener (this); - m_blockAckListener = new EdcaTxopN::BlockAckEventListener (this); + m_blockAckListener = new EdcaTxopN::AggregationCapableTransmissionListener (this); m_dcf = new EdcaTxopN::Dcf (this); m_queue = CreateObject (); m_rng = new RealRandomStream (); diff -r 52c7ce21a0ca -r a1f6f647d516 src/wifi/model/edca-txop-n.h --- a/src/wifi/model/edca-txop-n.h Sun May 03 17:34:44 2015 +0200 +++ b/src/wifi/model/edca-txop-n.h Mon May 04 23:55:32 2015 +0200 @@ -507,7 +507,7 @@ AcIndex m_ac; class Dcf; class TransmissionListener; - class BlockAckEventListener; + class AggregationCapableTransmissionListener; friend class Dcf; friend class TransmissionListener; Dcf *m_dcf; @@ -518,7 +518,7 @@ Ptr m_low; MacTxMiddle *m_txMiddle; TransmissionListener *m_transmissionListener; - BlockAckEventListener *m_blockAckListener; + AggregationCapableTransmissionListener *m_blockAckListener; RandomStream *m_rng; Ptr m_stationManager; uint8_t m_fragmentNumber; diff -r 52c7ce21a0ca -r a1f6f647d516 src/wifi/model/mac-low.cc --- a/src/wifi/model/mac-low.cc Sun May 03 17:34:44 2015 +0200 +++ b/src/wifi/model/mac-low.cc Mon May 04 23:55:32 2015 +0200 @@ -61,6 +61,7 @@ MacLowTransmissionListener::MissedBlockAck (void) { } + MacLowDcfListener::MacLowDcfListener () { } @@ -68,49 +69,64 @@ { } -MacLowBlockAckEventListener::MacLowBlockAckEventListener () +MacLowAggregationCapableTransmissionListener::MacLowAggregationCapableTransmissionListener () { } -MacLowBlockAckEventListener::~MacLowBlockAckEventListener () +MacLowAggregationCapableTransmissionListener::~MacLowAggregationCapableTransmissionListener () { } -void MacLowBlockAckEventListener::SetAmpdu (bool ampdu) +void MacLowAggregationCapableTransmissionListener::SetAmpdu (bool ampdu) { } -void MacLowBlockAckEventListener::CompleteTransfer(Mac48Address address, uint8_t tid) +void MacLowAggregationCapableTransmissionListener::CompleteTransfer(Mac48Address address, uint8_t tid) { } void -MacLowBlockAckEventListener::CompleteMpduTx (Ptr packet, WifiMacHeader hdr, Time tstamp) +MacLowAggregationCapableTransmissionListener::CompleteMpduTx (Ptr packet, WifiMacHeader hdr, Time tstamp) { } uint16_t -MacLowBlockAckEventListener::GetNextSequenceNumberfor (WifiMacHeader *hdr) +MacLowAggregationCapableTransmissionListener::GetNextSequenceNumberfor (WifiMacHeader *hdr) { return 0; } uint16_t -MacLowBlockAckEventListener::PeekNextSequenceNumberfor (WifiMacHeader *hdr) +MacLowAggregationCapableTransmissionListener::PeekNextSequenceNumberfor (WifiMacHeader *hdr) { return 0; } Ptr -MacLowBlockAckEventListener::PeekNextPacketInBaQueue (WifiMacHeader &header, Mac48Address recipient, uint8_t tid, Time *timestamp) +MacLowAggregationCapableTransmissionListener::PeekNextPacketInBaQueue (WifiMacHeader &header, Mac48Address recipient, uint8_t tid, Time *timestamp) { return 0; } void -MacLowBlockAckEventListener::RemoveFromBaQueue (uint8_t tid, Mac48Address recipient, uint16_t seqnumber) +MacLowAggregationCapableTransmissionListener::RemoveFromBaQueue (uint8_t tid, Mac48Address recipient, uint16_t seqnumber) { } uint32_t -MacLowBlockAckEventListener::GetNOutstandingPackets (Mac48Address recipient, uint8_t tid) +MacLowAggregationCapableTransmissionListener::GetNOutstandingPackets (Mac48Address recipient, uint8_t tid) { return 0; } uint32_t -MacLowBlockAckEventListener::GetNRetryNeededPackets (Mac48Address recipient, uint8_t tid) const +MacLowAggregationCapableTransmissionListener::GetNRetryNeededPackets (Mac48Address recipient, uint8_t tid) const +{ + return 0; +} +Ptr +MacLowAggregationCapableTransmissionListener::GetMsduAggregator (void) const +{ + return 0; +} +Mac48Address +MacLowAggregationCapableTransmissionListener::GetSrcAddressForAggregation (const WifiMacHeader &hdr) +{ + return 0; +} +Mac48Address +MacLowAggregationCapableTransmissionListener::GetDestAddressForAggregation (const WifiMacHeader &hdr) { return 0; } @@ -2215,7 +2231,7 @@ AcIndex ac = QosUtilsMapTidToAc (agreement.GetTid ()); it->second.first.m_inactivityEvent = Simulator::Schedule (timeout, - &MacLowBlockAckEventListener::BlockAckInactivityTimeout, + &MacLowAggregationCapableTransmissionListener::BlockAckInactivityTimeout, m_edcaListeners[ac], originator, tid); } @@ -2494,7 +2510,7 @@ //NS_ASSERT (it != m_edcaListeners.end ()); agreement.m_inactivityEvent = Simulator::Schedule (timeout, - &MacLowBlockAckEventListener::BlockAckInactivityTimeout, + &MacLowAggregationCapableTransmissionListener::BlockAckInactivityTimeout, m_edcaListeners[ac], agreement.GetPeer (), agreement.GetTid ()); @@ -2502,7 +2518,7 @@ } void -MacLow::RegisterBlockAckListenerForAc (enum AcIndex ac, MacLowBlockAckEventListener *listener) +MacLow::RegisterBlockAckListenerForAc (enum AcIndex ac, MacLowAggregationCapableTransmissionListener *listener) { m_edcaListeners.insert (std::make_pair (ac, listener)); } @@ -2585,7 +2601,7 @@ } bool -MacLow::StopAggregation(Ptr peekedPacket, WifiMacHeader peekedHdr, Ptr aggregatedPacket, uint16_t size) const +MacLow::StopMpduAggregation(Ptr peekedPacket, WifiMacHeader peekedHdr, Ptr aggregatedPacket, uint16_t size) const { WifiPreamble preamble; WifiTxVector dataTxVector = GetDataTxVector (m_currentPacket, &m_currentHdr); @@ -2612,7 +2628,7 @@ { NS_ASSERT (m_aggregateQueue->GetSize () == 0); bool isAmpdu = false; - Ptr newPacket; + Ptr newPacket, tempPacket; WifiMacHeader peekedHdr; newPacket = packet->Copy(); //missing hdr.IsAck() since we have no means of knowing the Tid of the Ack yet @@ -2623,7 +2639,7 @@ Ptr queue; AcIndex ac = QosUtilsMapTidToAc (tid); //since a blockack agreement always preceeds mpdu aggregation there should always exist blockAck listener - std::map::const_iterator listenerIt= m_edcaListeners.find(ac); + std::map::const_iterator listenerIt= m_edcaListeners.find(ac); NS_ASSERT (listenerIt != m_edcaListeners.end ()); queue = listenerIt->second->GetQueue(); @@ -2660,7 +2676,7 @@ if (aggregated) { - NS_LOG_DEBUG ("Adding packet with Sequence number " << peekedHdr.GetSequenceNumber()<<" to A-MPDU"); + NS_LOG_DEBUG ("Adding packet with Sequence number " << peekedHdr.GetSequenceNumber()<<" to A-MPDU, packet size = " << newPacket->GetSize ()<< ", A-MPDU size = " << currentAggregatedPacket->GetSize ()); i++; m_sentMpdus++; m_aggregateQueue->Enqueue (aggPacket, peekedHdr); @@ -2678,12 +2694,20 @@ bool retry = false; //looks for other packets to the same destination with the same Tid need to extend that to include MSDUs Ptr peekedPacket = listenerIt->second->PeekNextPacketInBaQueue (peekedHdr, peekedHdr.GetAddr1 (), tid, &tstamp); - if (peekedPacket == 0) + if (peekedPacket == 0) { peekedPacket = queue->PeekByTidAndAddress (&peekedHdr, tid, WifiMacHeader::ADDR1, hdr.GetAddr1 (), &tstamp); currentSequenceNumber = listenerIt->second->PeekNextSequenceNumberfor (&peekedHdr); + + /* here is performed MSDU aggregation (two-level aggregation) */ + if (peekedPacket != 0 && listenerIt->second->GetMsduAggregator () != 0) + { + tempPacket = PerformMsduAggregation(peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, blockAckSize); + if (tempPacket != 0) //MSDU aggregation + peekedPacket = tempPacket->Copy(); + } } else { @@ -2691,7 +2715,7 @@ currentSequenceNumber = peekedHdr.GetSequenceNumber(); } - while (IsInWindow (currentSequenceNumber, startingSequenceNumber, 64) && !StopAggregation (peekedPacket, peekedHdr, currentAggregatedPacket, blockAckSize)) + while (IsInWindow (currentSequenceNumber, startingSequenceNumber, 64) && !StopMpduAggregation (peekedPacket, peekedHdr, currentAggregatedPacket, blockAckSize)) { //for now always send AMPDU with normal ACK if (retry == false) @@ -2721,7 +2745,7 @@ { listenerIt->second->CompleteMpduTx (packet, hdr, tstamp); } - NS_LOG_DEBUG ("Adding packet with Sequence number " << peekedHdr.GetSequenceNumber()<<" to A-MPDU"); + NS_LOG_DEBUG ("Adding packet with Sequence number " << peekedHdr.GetSequenceNumber()<<" to A-MPDU, packet size = " << newPacket->GetSize ()<< ", A-MPDU size = " << currentAggregatedPacket->GetSize ()); i++; isAmpdu = true; m_sentMpdus++; @@ -2747,6 +2771,13 @@ { //find what will the sequence number be so that we don't send more than 64 packets apart currentSequenceNumber = listenerIt->second->PeekNextSequenceNumberfor (&peekedHdr); + + if (listenerIt->second->GetMsduAggregator () != 0) + { + tempPacket = PerformMsduAggregation(peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, blockAckSize); + if (tempPacket != 0) //MSDU aggregation + peekedPacket = tempPacket->Copy(); + } } } else @@ -2760,6 +2791,13 @@ { //find what will the sequence number be so that we don't send more than 64 packets apart currentSequenceNumber = listenerIt->second->PeekNextSequenceNumberfor (&peekedHdr); + + if (listenerIt->second->GetMsduAggregator () != 0 && IsInWindow (currentSequenceNumber, startingSequenceNumber, 64)) + { + tempPacket = PerformMsduAggregation(peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, blockAckSize); + if (tempPacket != 0) //MSDU aggregation + peekedPacket = tempPacket->Copy(); + } } } } @@ -2813,4 +2851,58 @@ m_aggregateQueue->Flush (); } +Ptr +MacLow::PerformMsduAggregation(Ptr packet, WifiMacHeader *hdr, Time *tstamp, Ptr currentAmpduPacket, uint16_t blockAckSize) +{ + bool msduAggregation = false; + bool isAmsdu = false; + Ptr currentAmsduPacket = Create (); + Ptr tempPacket = Create (); + + Ptr queue; + AcIndex ac = QosUtilsMapTidToAc (GetTid (packet, *hdr)); + std::map::const_iterator listenerIt= m_edcaListeners.find(ac); + NS_ASSERT (listenerIt != m_edcaListeners.end ()); + queue = listenerIt->second->GetQueue(); + + listenerIt->second->GetMsduAggregator ()->Aggregate (packet, currentAmsduPacket, + listenerIt->second->GetSrcAddressForAggregation (*hdr), + listenerIt->second->GetDestAddressForAggregation (*hdr)); + + Ptr peekedPacket = queue->PeekByTidAndAddress (hdr, hdr->GetQosTid (), + WifiMacHeader::ADDR1, hdr->GetAddr1 (), tstamp); + while (peekedPacket != 0) + { + tempPacket = currentAmsduPacket; + + msduAggregation = listenerIt->second->GetMsduAggregator ()->Aggregate (peekedPacket, tempPacket, + listenerIt->second->GetSrcAddressForAggregation (*hdr), + listenerIt->second->GetDestAddressForAggregation (*hdr)); + + if (msduAggregation && !StopMpduAggregation (tempPacket, *hdr, currentAmpduPacket, blockAckSize)) + { + isAmsdu = true; + currentAmsduPacket = tempPacket; + queue->Remove (peekedPacket); + } + else + { + break; + } + peekedPacket = queue->PeekByTidAndAddress (hdr, hdr->GetQosTid (), WifiMacHeader::ADDR1, hdr->GetAddr1 (), tstamp); + } + + if (isAmsdu) + { + NS_LOG_DEBUG ("A-MSDU with size = " << currentAmsduPacket->GetSize ()); + hdr->SetQosAmsdu (); + hdr->SetAddr3 (GetBssid ()); + return currentAmsduPacket; + } + else + { + return 0; + } +} + } // namespace ns3 diff -r 52c7ce21a0ca -r a1f6f647d516 src/wifi/model/mac-low.h --- a/src/wifi/model/mac-low.h Sun May 03 17:34:44 2015 +0200 +++ b/src/wifi/model/mac-low.h Mon May 04 23:55:32 2015 +0200 @@ -43,6 +43,9 @@ #include "block-ack-cache.h" #include "wifi-tx-vector.h" #include "mpdu-aggregator.h" +#include "msdu-aggregator.h" + +class TwoLevelAggregationTest; namespace ns3 { @@ -133,7 +136,6 @@ * */ virtual void EndTxNoAck (void) = 0; - }; @@ -188,11 +190,11 @@ * \ingroup wifi * \brief listen for block ack events. */ -class MacLowBlockAckEventListener +class MacLowAggregationCapableTransmissionListener { public: - MacLowBlockAckEventListener (); - virtual ~MacLowBlockAckEventListener (); + MacLowAggregationCapableTransmissionListener (); + virtual ~MacLowAggregationCapableTransmissionListener (); /** * Typically is called in order to notify EdcaTxopN that a block ack inactivity * timeout occurs for the block ack agreement identified by the pair originator, tid. @@ -272,6 +274,15 @@ * Returns number of packets for a specific agreement that need retransmission. */ virtual uint32_t GetNRetryNeededPackets (Mac48Address recipient, uint8_t tid) const; + /** + */ + virtual Ptr GetMsduAggregator (void) const; + /** + */ + virtual Mac48Address GetSrcAddressForAggregation (const WifiMacHeader &hdr); + /** + */ + virtual Mac48Address GetDestAddressForAggregation (const WifiMacHeader &hdr); }; /** @@ -475,6 +486,8 @@ class MacLow : public Object { public: + // Allow test cases to access private members + friend class ::TwoLevelAggregationTest; /** * typedef for a callback for MacLowRx */ @@ -762,7 +775,7 @@ * The lifetime of the registered listener is typically equal to the lifetime of the queue * associated to this AC. */ - void RegisterBlockAckListenerForAc (enum AcIndex ac, MacLowBlockAckEventListener *listener); + void RegisterBlockAckListenerForAc (enum AcIndex ac, MacLowAggregationCapableTransmissionListener *listener); /** * \param packet the packet to be aggregated. If the aggregation is succesfull, it corresponds either to the first data packet that will be aggregated or to the BAR that will be piggybacked at the end of the A-MPDU. * \param hdr the WifiMacHeader for the packet. @@ -792,7 +805,7 @@ * This function decides if a given packet can be added to an A-MPDU or not * */ - bool StopAggregation (Ptr peekedPacket, WifiMacHeader peekedHdr, Ptr aggregatedPacket, uint16_t size) const; + bool StopMpduAggregation (Ptr peekedPacket, WifiMacHeader peekedHdr, Ptr aggregatedPacket, uint16_t size) const; /** * * This function is called to flush the aggregate queue, which is used for A-MPDU @@ -1242,6 +1255,19 @@ * */ bool IsAmpdu (Ptr packet, const WifiMacHeader hdr); + /** + * Perform MSDU aggregation for a given MPDU in an A-MPDU + * + * \param packet packet picked for aggregation + * \param hdr 802.11 header for packet picked for aggregation + * \param tstamp timestamp + * \param currentAmpduPacket current A-MPDU packet + * \param blockAckSize size of the piggybacked block ack request + * + * \return the aggregate if MSDU aggregation succeeded, 0 otherwise + */ + Ptr PerformMsduAggregation(Ptr packet, WifiMacHeader *hdr, Time *tstamp, Ptr currentAmpduPacket, uint16_t blockAckSize); + Ptr m_phy; //!< Pointer to WifiPhy (actually send/receives frames) Ptr m_stationManager; //!< Pointer to WifiRemoteStationManager (rate control) @@ -1313,7 +1339,7 @@ Agreements m_bAckAgreements; BlockAckCaches m_bAckCaches; - typedef std::map QueueListeners; + typedef std::map QueueListeners; QueueListeners m_edcaListeners; bool m_ctsToSelfSupported; //!< Flag whether CTS-to-self is supported uint8_t m_sentMpdus; //!< Number of transmitted MPDUs in an A-MPDU that have not been acknowledged yet diff -r 52c7ce21a0ca -r a1f6f647d516 src/wifi/test/wifi-aggregation-test.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/wifi/test/wifi-aggregation-test.cc Mon May 04 23:55:32 2015 +0200 @@ -0,0 +1,189 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2015 + * + * 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: Sébastien Deronne + */ + +#include "ns3/string.h" +#include "ns3/test.h" +#include "ns3/object-factory.h" +#include "ns3/wifi-mac-queue.h" +#include "ns3/mac-low.h" +#include "ns3/edca-txop-n.h" +#include "ns3/yans-wifi-phy.h" + +using namespace ns3; + +class TwoLevelAggregationTest : public TestCase +{ +public: + TwoLevelAggregationTest (); + +private: + virtual void DoRun (void); + Ptr m_low; + Ptr m_phy; + Ptr m_edca; + Ptr m_manager; + ObjectFactory m_factory; + Ptr m_mpduAggregator; + Ptr m_msduAggregator; +}; + +TwoLevelAggregationTest::TwoLevelAggregationTest () + : TestCase ("Check the correctness of two-level aggregation operations") +{ +} + +void +TwoLevelAggregationTest::DoRun (void) +{ + /* + * Create and configure phy layer. + */ + m_phy = CreateObject (); + m_phy->ConfigureStandard (WIFI_PHY_STANDARD_80211n_5GHZ); + + /* + * Create and configure manager. + */ + m_factory = ObjectFactory (); + m_factory.SetTypeId ("ns3::ConstantRateWifiManager"); + m_factory.Set ("DataMode", StringValue ("OfdmRate65MbpsBW20MHz")); + m_manager = m_factory.Create (); + m_manager->SetupPhy(m_phy); + + /* + * Create and configure maclayer. + */ + m_low = CreateObject (); + m_low->SetPhy(m_phy); + m_low->SetWifiRemoteStationManager (m_manager); + + m_edca = CreateObject (); + m_edca->SetLow (m_low); + m_edca->SetAccessCategory (AC_BE); + m_edca->SetWifiRemoteStationManager (m_manager); + m_edca->CompleteConfig (); + + /* + * Configure aggregation. + */ + m_factory = ObjectFactory (); + m_factory.SetTypeId ("ns3::MsduStandardAggregator"); + m_factory.Set ("MaxAmsduSize", UintegerValue(4095)); + m_msduAggregator = m_factory.Create (); + m_edca->SetMsduAggregator (m_msduAggregator); + + m_factory = ObjectFactory (); + m_factory.SetTypeId ("ns3::MpduStandardAggregator"); + m_factory.Set ("MaxAmpduSize", UintegerValue(65535)); + m_mpduAggregator = m_factory.Create (); + m_low->SetMpduAggregator (m_mpduAggregator); + + /* + * Create dummy packets of 1500 bytes and fill mac header fields that will be used for the tests. + */ + Ptr pkt = Create (1500); + Ptr currentAggregatedPacket = Create (); + WifiMacHeader hdr, peekedHdr; + hdr.SetAddr1 (Mac48Address ("00:00:00:00:00:01")); + hdr.SetAddr2 (Mac48Address ("00:00:00:00:00:02")); + hdr.SetType (WIFI_MAC_QOSDATA); + hdr.SetQosTid (0); + Time tstamp; + + //----------------------------------------------------------------------------------------------------- + + /* + * Test MSDU aggregation of two packets using MacLow::PerformMsduAggregation. + * It checks whether aggregation succeeded: + * - returned packet should be different from 0; + * - A-MSDU frame size should be 3030 bytes (= 2 packets + headers + padding); + * - one packet should be removed from the queue (the other packet is removed later in MacLow::AggregateToAmpdu) . + */ + m_edca->GetEdcaQueue()->Enqueue(pkt, hdr); + m_edca->GetEdcaQueue()->Enqueue(pkt, hdr); + + Ptr peekedPacket = m_edca->GetEdcaQueue()->PeekByTidAndAddress (&peekedHdr, 0, + WifiMacHeader::ADDR1, + hdr.GetAddr1 (), + &tstamp); + m_low->m_currentPacket = peekedPacket->Copy (); + m_low->m_currentHdr = peekedHdr; + + Ptr packet = m_low->PerformMsduAggregation(peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, 0); + + bool result = (packet != 0); + NS_TEST_EXPECT_MSG_EQ (result, true, "aggregation failed"); + NS_TEST_EXPECT_MSG_EQ (packet->GetSize(), 3030, "wrong packet size"); + NS_TEST_EXPECT_MSG_EQ (m_edca->GetEdcaQueue()->GetSize(), 1, "removing packet from EDCA queue failed"); + + //----------------------------------------------------------------------------------------------------- + + /* + * Aggregation is refused when the maximum size is reached. + * It checks whether MSDU aggregation has been rejected because the maximum MPDU size is set to 0 (returned packet should be equal to 0). + * This test is needed to ensure that no packets are removed from the queue in MacLow::PerformMsduAggregation, since aggregation will no occur in MacLow::AggregateToAmpdu. + */ + m_factory = ObjectFactory (); + m_factory.SetTypeId ("ns3::MpduStandardAggregator"); + m_factory.Set ("MaxAmpduSize", UintegerValue(0)); + m_mpduAggregator = m_factory.Create (); + m_low->SetMpduAggregator (m_mpduAggregator); + + m_edca->GetEdcaQueue()->Enqueue(pkt, hdr); + packet = m_low->PerformMsduAggregation(peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, 0); + + result = (packet != 0); + NS_TEST_EXPECT_MSG_EQ (result, false, "maximum aggregated frame size check failed"); + + //----------------------------------------------------------------------------------------------------- + + /* + * Aggregation does not occur zhen there is no more packets in the queue. + * It checks whether MSDU aggregation has been rejected because there is no packets ready in the queue (returned packet should be equal to 0). + * This test is needed to ensure that there is no issue when the queue is empty. + */ + m_factory = ObjectFactory (); + m_factory.SetTypeId ("ns3::MpduStandardAggregator"); + m_factory.Set ("MaxAmpduSize", UintegerValue(4095)); + m_mpduAggregator = m_factory.Create (); + m_low->SetMpduAggregator (m_mpduAggregator); + + m_edca->GetEdcaQueue()->Remove(pkt); + m_edca->GetEdcaQueue()->Remove(pkt); + packet = m_low->PerformMsduAggregation(peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, 0); + + result = (packet != 0); + NS_TEST_EXPECT_MSG_EQ (result, false, "aggregation failed to stop as queue is empty"); +} + +//----------------------------------------------------------------------------- +class WifiAggregationTestSuite : public TestSuite +{ +public: + WifiAggregationTestSuite (); +}; + +WifiAggregationTestSuite::WifiAggregationTestSuite () + : TestSuite ("aggregation-wifi", UNIT) +{ + AddTestCase (new TwoLevelAggregationTest, TestCase::QUICK); +} + +static WifiAggregationTestSuite g_wifiAggregationTestSuite; diff -r 52c7ce21a0ca -r a1f6f647d516 src/wifi/wscript --- a/src/wifi/wscript Sun May 03 17:34:44 2015 +0200 +++ b/src/wifi/wscript Mon May 04 23:55:32 2015 +0200 @@ -84,6 +84,7 @@ 'test/tx-duration-test.cc', 'test/power-rate-adaptation-test.cc', 'test/wifi-test.cc', + 'test/wifi-aggregation-test.cc', ] headers = bld(features='ns3header')