--- a/src/mesh/bindings/modulegen__gcc_ILP32.py Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/bindings/modulegen__gcc_ILP32.py Thu Jul 09 23:52:12 2015 +0200
@@ -186,6 +186,10 @@
module.add_class('int64x64_t', import_from_module='ns.core')
## int64x64-double.h (module 'core'): ns3::int64x64_t::impl_type [enumeration]
module.add_enum('impl_type', ['int128_impl', 'cairo_impl', 'ld_impl'], outer_class=root_module['ns3::int64x64_t'], import_from_module='ns.core')
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo [struct]
+ module.add_class('mpduInfo', import_from_module='ns.wifi')
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb [struct]
+ module.add_class('snrDb', import_from_module='ns.wifi')
## chunk.h (module 'network'): ns3::Chunk [class]
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## header.h (module 'network'): ns3::Header [class]
@@ -651,6 +655,8 @@
register_Ns3WifiTxVector_methods(root_module, root_module['ns3::WifiTxVector'])
register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
+ register_Ns3MpduInfo_methods(root_module, root_module['ns3::mpduInfo'])
+ register_Ns3SnrDb_methods(root_module, root_module['ns3::snrDb'])
register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
register_Ns3Header_methods(root_module, root_module['ns3::Header'])
register_Ns3MgtAddBaRequestHeader_methods(root_module, root_module['ns3::MgtAddBaRequestHeader'])
@@ -2820,10 +2826,10 @@
cls.add_method('Close',
'void',
[])
- ## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
+ ## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t & packets, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
cls.add_method('Diff',
'bool',
- [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
+ [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t &', 'packets'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
is_static=True)
## pcap-file.h (module 'network'): bool ns3::PcapFile::Eof() const [member function]
cls.add_method('Eof',
@@ -3611,6 +3617,8 @@
cls.add_constructor([param('ns3::WifiRemoteStationState const &', 'arg0')])
## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_address [variable]
cls.add_instance_attribute('m_address', 'ns3::Mac48Address', is_const=False)
+ ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_aggregation [variable]
+ cls.add_instance_attribute('m_aggregation', 'bool', is_const=False)
## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_greenfield [variable]
cls.add_instance_attribute('m_greenfield', 'bool', is_const=False)
## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_info [variable]
@@ -3637,8 +3645,8 @@
cls.add_constructor([param('ns3::WifiTxVector const &', 'arg0')])
## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector::WifiTxVector() [constructor]
cls.add_constructor([])
- ## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector::WifiTxVector(ns3::WifiMode mode, uint8_t powerLevel, uint8_t retries, bool shortGuardInterval, uint8_t nss, uint8_t ness, bool stbc) [constructor]
- cls.add_constructor([param('ns3::WifiMode', 'mode'), param('uint8_t', 'powerLevel'), param('uint8_t', 'retries'), param('bool', 'shortGuardInterval'), param('uint8_t', 'nss'), param('uint8_t', 'ness'), param('bool', 'stbc')])
+ ## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector::WifiTxVector(ns3::WifiMode mode, uint8_t powerLevel, uint8_t retries, bool shortGuardInterval, uint8_t nss, uint8_t ness, bool aggregation, bool stbc) [constructor]
+ cls.add_constructor([param('ns3::WifiMode', 'mode'), param('uint8_t', 'powerLevel'), param('uint8_t', 'retries'), param('bool', 'shortGuardInterval'), param('uint8_t', 'nss'), param('uint8_t', 'ness'), param('bool', 'aggregation'), param('bool', 'stbc')])
## wifi-tx-vector.h (module 'wifi'): ns3::WifiMode ns3::WifiTxVector::GetMode() const [member function]
cls.add_method('GetMode',
'ns3::WifiMode',
@@ -3664,6 +3672,11 @@
'uint8_t',
[],
is_const=True)
+ ## wifi-tx-vector.h (module 'wifi'): bool ns3::WifiTxVector::IsAggregation() const [member function]
+ cls.add_method('IsAggregation',
+ 'bool',
+ [],
+ is_const=True)
## wifi-tx-vector.h (module 'wifi'): bool ns3::WifiTxVector::IsShortGuardInterval() const [member function]
cls.add_method('IsShortGuardInterval',
'bool',
@@ -3674,6 +3687,10 @@
'bool',
[],
is_const=True)
+ ## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetAggregation(bool aggregation) [member function]
+ cls.add_method('SetAggregation',
+ 'void',
+ [param('bool', 'aggregation')])
## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetMode(ns3::WifiMode mode) [member function]
cls.add_method('SetMode',
'void',
@@ -3778,6 +3795,28 @@
cls.add_static_attribute('implementation', 'ns3::int64x64_t::impl_type const', is_const=True)
return
+def register_Ns3MpduInfo_methods(root_module, cls):
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo::mpduInfo() [constructor]
+ cls.add_constructor([])
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo::mpduInfo(ns3::mpduInfo const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::mpduInfo const &', 'arg0')])
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo::packetType [variable]
+ cls.add_instance_attribute('packetType', 'uint8_t', is_const=False)
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo::referenceNumber [variable]
+ cls.add_instance_attribute('referenceNumber', 'uint32_t', is_const=False)
+ return
+
+def register_Ns3SnrDb_methods(root_module, cls):
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb::snrDb() [constructor]
+ cls.add_constructor([])
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb::snrDb(ns3::snrDb const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::snrDb const &', 'arg0')])
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb::noise [variable]
+ cls.add_instance_attribute('noise', 'double', is_const=False)
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb::signal [variable]
+ cls.add_instance_attribute('signal', 'double', is_const=False)
+ return
+
def register_Ns3Chunk_methods(root_module, cls):
## chunk.h (module 'network'): ns3::Chunk::Chunk() [constructor]
cls.add_constructor([])
@@ -5783,8 +5822,8 @@
'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',
+ ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::CalculatePlcpPreambleAndHeaderDuration(ns3::WifiTxVector txvector, ns3::WifiPreamble preamble) [member function]
+ cls.add_method('CalculatePlcpPreambleAndHeaderDuration',
'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]
@@ -5906,6 +5945,11 @@
'bool',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetHTPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function]
+ cls.add_method('GetHTPlcpHeaderMode',
+ 'ns3::WifiMode',
+ [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')],
+ is_static=True)
## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::GetLastRxStartTime() const [member function]
cls.add_method('GetLastRxStartTime',
'ns3::Time',
@@ -5916,11 +5960,6 @@
'bool',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetMFPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function]
- cls.add_method('GetMFPlcpHeaderMode',
- 'ns3::WifiMode',
- [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')],
- is_static=True)
## wifi-phy.h (module 'wifi'): uint8_t ns3::WifiPhy::GetMcs(uint8_t mcs) const [member function]
cls.add_method('GetMcs',
'uint8_t',
@@ -6345,14 +6384,14 @@
'ns3::WifiMode',
[param('uint8_t', 'mcs')],
is_pure_virtual=True, is_virtual=True)
- ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffRx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm) [member function]
+ ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffRx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, ns3::WifiPreamble preamble, ns3::WifiTxVector txvector, ns3::mpduInfo aMpdu, ns3::snrDb snr) [member function]
cls.add_method('NotifyMonitorSniffRx',
'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('bool', 'isShortPreamble'), param('double', 'signalDbm'), param('double', 'noiseDbm')])
- ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffTx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower) [member function]
+ [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('ns3::WifiPreamble', 'preamble'), param('ns3::WifiTxVector', 'txvector'), param('ns3::mpduInfo', 'aMpdu'), param('ns3::snrDb', 'snr')])
+ ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffTx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, ns3::WifiPreamble preamble, ns3::WifiTxVector txvector, ns3::mpduInfo aMpdu) [member function]
cls.add_method('NotifyMonitorSniffTx',
'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('bool', 'isShortPreamble'), param('uint8_t', 'txPower')])
+ [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('ns3::WifiPreamble', 'preamble'), param('ns3::WifiTxVector', 'txvector'), param('ns3::mpduInfo', 'aMpdu')])
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyRxBegin(ns3::Ptr<ns3::Packet const> packet) [member function]
cls.add_method('NotifyRxBegin',
'void',
@@ -6387,10 +6426,10 @@
'void',
[],
is_pure_virtual=True, is_virtual=True)
- ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiTxVector txvector, ns3::WifiPreamble preamble, uint8_t packetType) [member function]
+ ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiTxVector txvector, ns3::WifiPreamble preamble, uint8_t packetType, uint32_t mpduReferenceNumber) [member function]
cls.add_method('SendPacket',
'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'packetType')],
+ [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'packetType'), param('uint32_t', 'mpduReferenceNumber')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetChannelBonding(bool channelbonding) [member function]
cls.add_method('SetChannelBonding',
@@ -6746,6 +6785,11 @@
'void',
[],
visibility='protected', is_virtual=True)
+ ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::GetAggregation(ns3::WifiRemoteStation const * station) const [member function]
+ cls.add_method('GetAggregation',
+ 'bool',
+ [param('ns3::WifiRemoteStation const *', 'station')],
+ is_const=True, visibility='protected')
## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::GetGreenfield(ns3::WifiRemoteStation const * station) const [member function]
cls.add_method('GetGreenfield',
'bool',
@@ -8389,6 +8433,11 @@
cls.add_constructor([])
## mesh-stack-installer.h (module 'mesh'): ns3::MeshStack::MeshStack(ns3::MeshStack const & arg0) [copy constructor]
cls.add_constructor([param('ns3::MeshStack const &', 'arg0')])
+ ## mesh-stack-installer.h (module 'mesh'): static ns3::TypeId ns3::MeshStack::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
## mesh-stack-installer.h (module 'mesh'): bool ns3::MeshStack::InstallStack(ns3::Ptr<ns3::MeshPointDevice> mp) [member function]
cls.add_method('InstallStack',
'bool',
@@ -8443,6 +8492,11 @@
cls.add_constructor([])
## mgt-headers.h (module 'wifi'): ns3::MgtBeaconHeader::MgtBeaconHeader(ns3::MgtBeaconHeader const & arg0) [copy constructor]
cls.add_constructor([param('ns3::MgtBeaconHeader const &', 'arg0')])
+ ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::MgtBeaconHeader::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
return
def register_Ns3NetDevice_methods(root_module, cls):
--- a/src/mesh/bindings/modulegen__gcc_LP64.py Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/bindings/modulegen__gcc_LP64.py Thu Jul 09 23:52:12 2015 +0200
@@ -186,6 +186,10 @@
module.add_class('int64x64_t', import_from_module='ns.core')
## int64x64-double.h (module 'core'): ns3::int64x64_t::impl_type [enumeration]
module.add_enum('impl_type', ['int128_impl', 'cairo_impl', 'ld_impl'], outer_class=root_module['ns3::int64x64_t'], import_from_module='ns.core')
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo [struct]
+ module.add_class('mpduInfo', import_from_module='ns.wifi')
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb [struct]
+ module.add_class('snrDb', import_from_module='ns.wifi')
## chunk.h (module 'network'): ns3::Chunk [class]
module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase'])
## header.h (module 'network'): ns3::Header [class]
@@ -651,6 +655,8 @@
register_Ns3WifiTxVector_methods(root_module, root_module['ns3::WifiTxVector'])
register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
register_Ns3Int64x64_t_methods(root_module, root_module['ns3::int64x64_t'])
+ register_Ns3MpduInfo_methods(root_module, root_module['ns3::mpduInfo'])
+ register_Ns3SnrDb_methods(root_module, root_module['ns3::snrDb'])
register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk'])
register_Ns3Header_methods(root_module, root_module['ns3::Header'])
register_Ns3MgtAddBaRequestHeader_methods(root_module, root_module['ns3::MgtAddBaRequestHeader'])
@@ -2820,10 +2826,10 @@
cls.add_method('Close',
'void',
[])
- ## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
+ ## pcap-file.h (module 'network'): static bool ns3::PcapFile::Diff(std::string const & f1, std::string const & f2, uint32_t & sec, uint32_t & usec, uint32_t & packets, uint32_t snapLen=ns3::PcapFile::SNAPLEN_DEFAULT) [member function]
cls.add_method('Diff',
'bool',
- [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
+ [param('std::string const &', 'f1'), param('std::string const &', 'f2'), param('uint32_t &', 'sec'), param('uint32_t &', 'usec'), param('uint32_t &', 'packets'), param('uint32_t', 'snapLen', default_value='ns3::PcapFile::SNAPLEN_DEFAULT')],
is_static=True)
## pcap-file.h (module 'network'): bool ns3::PcapFile::Eof() const [member function]
cls.add_method('Eof',
@@ -3611,6 +3617,8 @@
cls.add_constructor([param('ns3::WifiRemoteStationState const &', 'arg0')])
## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_address [variable]
cls.add_instance_attribute('m_address', 'ns3::Mac48Address', is_const=False)
+ ## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_aggregation [variable]
+ cls.add_instance_attribute('m_aggregation', 'bool', is_const=False)
## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_greenfield [variable]
cls.add_instance_attribute('m_greenfield', 'bool', is_const=False)
## wifi-remote-station-manager.h (module 'wifi'): ns3::WifiRemoteStationState::m_info [variable]
@@ -3637,8 +3645,8 @@
cls.add_constructor([param('ns3::WifiTxVector const &', 'arg0')])
## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector::WifiTxVector() [constructor]
cls.add_constructor([])
- ## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector::WifiTxVector(ns3::WifiMode mode, uint8_t powerLevel, uint8_t retries, bool shortGuardInterval, uint8_t nss, uint8_t ness, bool stbc) [constructor]
- cls.add_constructor([param('ns3::WifiMode', 'mode'), param('uint8_t', 'powerLevel'), param('uint8_t', 'retries'), param('bool', 'shortGuardInterval'), param('uint8_t', 'nss'), param('uint8_t', 'ness'), param('bool', 'stbc')])
+ ## wifi-tx-vector.h (module 'wifi'): ns3::WifiTxVector::WifiTxVector(ns3::WifiMode mode, uint8_t powerLevel, uint8_t retries, bool shortGuardInterval, uint8_t nss, uint8_t ness, bool aggregation, bool stbc) [constructor]
+ cls.add_constructor([param('ns3::WifiMode', 'mode'), param('uint8_t', 'powerLevel'), param('uint8_t', 'retries'), param('bool', 'shortGuardInterval'), param('uint8_t', 'nss'), param('uint8_t', 'ness'), param('bool', 'aggregation'), param('bool', 'stbc')])
## wifi-tx-vector.h (module 'wifi'): ns3::WifiMode ns3::WifiTxVector::GetMode() const [member function]
cls.add_method('GetMode',
'ns3::WifiMode',
@@ -3664,6 +3672,11 @@
'uint8_t',
[],
is_const=True)
+ ## wifi-tx-vector.h (module 'wifi'): bool ns3::WifiTxVector::IsAggregation() const [member function]
+ cls.add_method('IsAggregation',
+ 'bool',
+ [],
+ is_const=True)
## wifi-tx-vector.h (module 'wifi'): bool ns3::WifiTxVector::IsShortGuardInterval() const [member function]
cls.add_method('IsShortGuardInterval',
'bool',
@@ -3674,6 +3687,10 @@
'bool',
[],
is_const=True)
+ ## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetAggregation(bool aggregation) [member function]
+ cls.add_method('SetAggregation',
+ 'void',
+ [param('bool', 'aggregation')])
## wifi-tx-vector.h (module 'wifi'): void ns3::WifiTxVector::SetMode(ns3::WifiMode mode) [member function]
cls.add_method('SetMode',
'void',
@@ -3778,6 +3795,28 @@
cls.add_static_attribute('implementation', 'ns3::int64x64_t::impl_type const', is_const=True)
return
+def register_Ns3MpduInfo_methods(root_module, cls):
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo::mpduInfo() [constructor]
+ cls.add_constructor([])
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo::mpduInfo(ns3::mpduInfo const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::mpduInfo const &', 'arg0')])
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo::packetType [variable]
+ cls.add_instance_attribute('packetType', 'uint8_t', is_const=False)
+ ## wifi-phy.h (module 'wifi'): ns3::mpduInfo::referenceNumber [variable]
+ cls.add_instance_attribute('referenceNumber', 'uint32_t', is_const=False)
+ return
+
+def register_Ns3SnrDb_methods(root_module, cls):
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb::snrDb() [constructor]
+ cls.add_constructor([])
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb::snrDb(ns3::snrDb const & arg0) [copy constructor]
+ cls.add_constructor([param('ns3::snrDb const &', 'arg0')])
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb::noise [variable]
+ cls.add_instance_attribute('noise', 'double', is_const=False)
+ ## wifi-phy.h (module 'wifi'): ns3::snrDb::signal [variable]
+ cls.add_instance_attribute('signal', 'double', is_const=False)
+ return
+
def register_Ns3Chunk_methods(root_module, cls):
## chunk.h (module 'network'): ns3::Chunk::Chunk() [constructor]
cls.add_constructor([])
@@ -5783,8 +5822,8 @@
'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',
+ ## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::CalculatePlcpPreambleAndHeaderDuration(ns3::WifiTxVector txvector, ns3::WifiPreamble preamble) [member function]
+ cls.add_method('CalculatePlcpPreambleAndHeaderDuration',
'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]
@@ -5906,6 +5945,11 @@
'bool',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
+ ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetHTPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function]
+ cls.add_method('GetHTPlcpHeaderMode',
+ 'ns3::WifiMode',
+ [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')],
+ is_static=True)
## wifi-phy.h (module 'wifi'): ns3::Time ns3::WifiPhy::GetLastRxStartTime() const [member function]
cls.add_method('GetLastRxStartTime',
'ns3::Time',
@@ -5916,11 +5960,6 @@
'bool',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
- ## wifi-phy.h (module 'wifi'): static ns3::WifiMode ns3::WifiPhy::GetMFPlcpHeaderMode(ns3::WifiMode payloadMode, ns3::WifiPreamble preamble) [member function]
- cls.add_method('GetMFPlcpHeaderMode',
- 'ns3::WifiMode',
- [param('ns3::WifiMode', 'payloadMode'), param('ns3::WifiPreamble', 'preamble')],
- is_static=True)
## wifi-phy.h (module 'wifi'): uint8_t ns3::WifiPhy::GetMcs(uint8_t mcs) const [member function]
cls.add_method('GetMcs',
'uint8_t',
@@ -6345,14 +6384,14 @@
'ns3::WifiMode',
[param('uint8_t', 'mcs')],
is_pure_virtual=True, is_virtual=True)
- ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffRx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, double signalDbm, double noiseDbm) [member function]
+ ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffRx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, ns3::WifiPreamble preamble, ns3::WifiTxVector txvector, ns3::mpduInfo aMpdu, ns3::snrDb snr) [member function]
cls.add_method('NotifyMonitorSniffRx',
'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('bool', 'isShortPreamble'), param('double', 'signalDbm'), param('double', 'noiseDbm')])
- ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffTx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower) [member function]
+ [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('ns3::WifiPreamble', 'preamble'), param('ns3::WifiTxVector', 'txvector'), param('ns3::mpduInfo', 'aMpdu'), param('ns3::snrDb', 'snr')])
+ ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyMonitorSniffTx(ns3::Ptr<ns3::Packet const> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, ns3::WifiPreamble preamble, ns3::WifiTxVector txvector, ns3::mpduInfo aMpdu) [member function]
cls.add_method('NotifyMonitorSniffTx',
'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('bool', 'isShortPreamble'), param('uint8_t', 'txPower')])
+ [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'channelFreqMhz'), param('uint16_t', 'channelNumber'), param('uint32_t', 'rate'), param('ns3::WifiPreamble', 'preamble'), param('ns3::WifiTxVector', 'txvector'), param('ns3::mpduInfo', 'aMpdu')])
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::NotifyRxBegin(ns3::Ptr<ns3::Packet const> packet) [member function]
cls.add_method('NotifyRxBegin',
'void',
@@ -6387,10 +6426,10 @@
'void',
[],
is_pure_virtual=True, is_virtual=True)
- ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiTxVector txvector, ns3::WifiPreamble preamble, uint8_t packetType) [member function]
+ ## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SendPacket(ns3::Ptr<ns3::Packet const> packet, ns3::WifiTxVector txvector, ns3::WifiPreamble preamble, uint8_t packetType, uint32_t mpduReferenceNumber) [member function]
cls.add_method('SendPacket',
'void',
- [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'packetType')],
+ [param('ns3::Ptr< ns3::Packet const >', 'packet'), param('ns3::WifiTxVector', 'txvector'), param('ns3::WifiPreamble', 'preamble'), param('uint8_t', 'packetType'), param('uint32_t', 'mpduReferenceNumber')],
is_pure_virtual=True, is_virtual=True)
## wifi-phy.h (module 'wifi'): void ns3::WifiPhy::SetChannelBonding(bool channelbonding) [member function]
cls.add_method('SetChannelBonding',
@@ -6746,6 +6785,11 @@
'void',
[],
visibility='protected', is_virtual=True)
+ ## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::GetAggregation(ns3::WifiRemoteStation const * station) const [member function]
+ cls.add_method('GetAggregation',
+ 'bool',
+ [param('ns3::WifiRemoteStation const *', 'station')],
+ is_const=True, visibility='protected')
## wifi-remote-station-manager.h (module 'wifi'): bool ns3::WifiRemoteStationManager::GetGreenfield(ns3::WifiRemoteStation const * station) const [member function]
cls.add_method('GetGreenfield',
'bool',
@@ -8389,6 +8433,11 @@
cls.add_constructor([])
## mesh-stack-installer.h (module 'mesh'): ns3::MeshStack::MeshStack(ns3::MeshStack const & arg0) [copy constructor]
cls.add_constructor([param('ns3::MeshStack const &', 'arg0')])
+ ## mesh-stack-installer.h (module 'mesh'): static ns3::TypeId ns3::MeshStack::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
## mesh-stack-installer.h (module 'mesh'): bool ns3::MeshStack::InstallStack(ns3::Ptr<ns3::MeshPointDevice> mp) [member function]
cls.add_method('InstallStack',
'bool',
@@ -8443,6 +8492,11 @@
cls.add_constructor([])
## mgt-headers.h (module 'wifi'): ns3::MgtBeaconHeader::MgtBeaconHeader(ns3::MgtBeaconHeader const & arg0) [copy constructor]
cls.add_constructor([param('ns3::MgtBeaconHeader const &', 'arg0')])
+ ## mgt-headers.h (module 'wifi'): static ns3::TypeId ns3::MgtBeaconHeader::GetTypeId() [member function]
+ cls.add_method('GetTypeId',
+ 'ns3::TypeId',
+ [],
+ is_static=True)
return
def register_Ns3NetDevice_methods(root_module, cls):
--- a/src/mesh/examples/wscript Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/examples/wscript Thu Jul 09 23:52:12 2015 +0200
@@ -1,5 +1,5 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
- obj = bld.create_ns3_program('mesh', ['internet', 'mobility', 'wifi', 'mesh'])
+ obj = bld.create_ns3_program('mesh', ['internet', 'mobility', 'wifi', 'mesh', 'applications'])
obj.source = 'mesh.cc'
--- a/src/mesh/test/dot11s/hwmp-proactive-regression.cc Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/dot11s/hwmp-proactive-regression.cc Thu Jul 09 23:52:12 2015 +0200
@@ -31,7 +31,6 @@
#include "ns3/ipv4-interface-container.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/abort.h"
-#include "ns3/udp-echo-helper.h"
#include "ns3/mobility-model.h"
#include "ns3/pcap-test.h"
#include <sstream>
@@ -45,7 +44,8 @@
HwmpProactiveRegressionTest::HwmpProactiveRegressionTest () : TestCase ("HWMP proactive regression test"),
m_nodes (0),
- m_time (Seconds (5))
+ m_time (Seconds (5)),
+ m_sentPktsCounter (0)
{
}
@@ -89,17 +89,18 @@
void
HwmpProactiveRegressionTest::InstallApplications ()
{
- UdpEchoServerHelper echoServer (9);
- ApplicationContainer serverApps = echoServer.Install (m_nodes->Get (0));
- serverApps.Start (Seconds (0.0));
- serverApps.Stop (m_time);
- UdpEchoClientHelper echoClient (m_interfaces.GetAddress (0), 9);
- echoClient.SetAttribute ("MaxPackets", UintegerValue (300));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (0.5)));
- echoClient.SetAttribute ("PacketSize", UintegerValue (100));
- ApplicationContainer clientApps = echoClient.Install (m_nodes->Get (4));
- clientApps.Start (Seconds (2.5));
- clientApps.Stop (m_time);
+ // client socket
+ m_clientSocket = Socket::CreateSocket (m_nodes->Get (4), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_clientSocket->Bind ();
+ m_clientSocket->Connect (InetSocketAddress (m_interfaces.GetAddress (0), 9));
+ m_clientSocket->SetRecvCallback (MakeCallback (&HwmpProactiveRegressionTest::HandleReadClient, this));
+ Simulator::ScheduleWithContext (m_clientSocket->GetNode ()->GetId (), Seconds (2.5),
+ &HwmpProactiveRegressionTest::SendData, this, m_clientSocket);
+
+ // server socket
+ m_serverSocket = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_serverSocket->Bind (InetSocketAddress (Ipv4Address::GetAny (), 9));
+ m_serverSocket->SetRecvCallback (MakeCallback (&HwmpProactiveRegressionTest::HandleReadServer, this));
}
void
HwmpProactiveRegressionTest::CreateDevices ()
@@ -145,3 +146,38 @@
}
}
+void
+HwmpProactiveRegressionTest::SendData (Ptr<Socket> socket)
+{
+ if ((Simulator::Now () < m_time) && (m_sentPktsCounter < 300))
+ {
+ socket->Send (Create<Packet> (100));
+ m_sentPktsCounter ++;
+ Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (0.5),
+ &HwmpProactiveRegressionTest::SendData, this, socket);
+ }
+}
+
+void
+HwmpProactiveRegressionTest::HandleReadServer (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ packet->RemoveAllPacketTags ();
+ packet->RemoveAllByteTags ();
+
+ socket->SendTo (packet, 0, from);
+ }
+}
+
+void
+HwmpProactiveRegressionTest::HandleReadClient (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ }
+}
--- a/src/mesh/test/dot11s/hwmp-proactive-regression.h Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/dot11s/hwmp-proactive-regression.h Thu Jul 09 23:52:12 2015 +0200
@@ -74,5 +74,37 @@
void CreateDevices ();
void InstallApplications ();
void ResetPosition ();
+
+ /// Server-side socket
+ Ptr<Socket> m_serverSocket;
+ /// Client-side socket
+ Ptr<Socket> m_clientSocket;
+
+ // sent packets counter
+ uint32_t m_sentPktsCounter;
+
+ /**
+ * Send data
+ * \param socket the sending socket
+ */
+ void SendData (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadServer (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadClient (Ptr<Socket> socket);
};
--- a/src/mesh/test/dot11s/hwmp-reactive-regression.cc Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/dot11s/hwmp-reactive-regression.cc Thu Jul 09 23:52:12 2015 +0200
@@ -30,7 +30,6 @@
#include "ns3/internet-stack-helper.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/abort.h"
-#include "ns3/udp-echo-helper.h"
#include "ns3/mobility-model.h"
#include "ns3/pcap-test.h"
#include <sstream>
@@ -42,7 +41,8 @@
HwmpReactiveRegressionTest::HwmpReactiveRegressionTest () : TestCase ("HWMP on-demand regression test"),
m_nodes (0),
- m_time (Seconds (10))
+ m_time (Seconds (10)),
+ m_sentPktsCounter (0)
{
}
HwmpReactiveRegressionTest::~HwmpReactiveRegressionTest ()
@@ -86,17 +86,18 @@
void
HwmpReactiveRegressionTest::InstallApplications ()
{
- UdpEchoServerHelper echoServer (9);
- ApplicationContainer serverApps = echoServer.Install (m_nodes->Get (0));
- serverApps.Start (Seconds (0.0));
- serverApps.Stop (m_time);
- UdpEchoClientHelper echoClient (m_interfaces.GetAddress (0), 9);
- echoClient.SetAttribute ("MaxPackets", UintegerValue (300));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (0.5)));
- echoClient.SetAttribute ("PacketSize", UintegerValue (20));
- ApplicationContainer clientApps = echoClient.Install (m_nodes->Get (5));
- clientApps.Start (Seconds (2.0));
- clientApps.Stop (m_time);
+ // client socket
+ m_clientSocket = Socket::CreateSocket (m_nodes->Get (5), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_clientSocket->Bind ();
+ m_clientSocket->Connect (InetSocketAddress (m_interfaces.GetAddress (0), 9));
+ m_clientSocket->SetRecvCallback (MakeCallback (&HwmpReactiveRegressionTest::HandleReadClient, this));
+ Simulator::ScheduleWithContext (m_clientSocket->GetNode ()->GetId (), Seconds (2.0),
+ &HwmpReactiveRegressionTest::SendData, this, m_clientSocket);
+
+ // server socket
+ m_serverSocket = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_serverSocket->Bind (InetSocketAddress (Ipv4Address::GetAny (), 9));
+ m_serverSocket->SetRecvCallback (MakeCallback (&HwmpReactiveRegressionTest::HandleReadServer, this));
}
void
HwmpReactiveRegressionTest::CreateDevices ()
@@ -152,5 +153,40 @@
return;
}
model->SetPosition (Vector (9000, 0, 0));
+}
+void
+HwmpReactiveRegressionTest::SendData (Ptr<Socket> socket)
+{
+ if ((Simulator::Now () < m_time) && (m_sentPktsCounter < 300))
+ {
+ socket->Send (Create<Packet> (20));
+ m_sentPktsCounter ++;
+ Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (0.5),
+ &HwmpReactiveRegressionTest::SendData, this, socket);
+ }
}
+
+void
+HwmpReactiveRegressionTest::HandleReadServer (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ packet->RemoveAllPacketTags ();
+ packet->RemoveAllByteTags ();
+
+ socket->SendTo (packet, 0, from);
+ }
+}
+
+void
+HwmpReactiveRegressionTest::HandleReadClient (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ }
+}
--- a/src/mesh/test/dot11s/hwmp-reactive-regression.h Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/dot11s/hwmp-reactive-regression.h Thu Jul 09 23:52:12 2015 +0200
@@ -87,5 +87,37 @@
void CreateDevices ();
void InstallApplications ();
void ResetPosition ();
+
+ /// Server-side socket
+ Ptr<Socket> m_serverSocket;
+ /// Client-side socket
+ Ptr<Socket> m_clientSocket;
+
+ // sent packets counter
+ uint32_t m_sentPktsCounter;
+
+ /**
+ * Send data
+ * \param socket the sending socket
+ */
+ void SendData (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadServer (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadClient (Ptr<Socket> socket);
};
--- a/src/mesh/test/dot11s/hwmp-simplest-regression.cc Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/dot11s/hwmp-simplest-regression.cc Thu Jul 09 23:52:12 2015 +0200
@@ -30,7 +30,6 @@
#include "ns3/internet-stack-helper.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/abort.h"
-#include "ns3/udp-echo-helper.h"
#include "ns3/mobility-model.h"
#include "ns3/pcap-test.h"
#include <sstream>
@@ -44,7 +43,8 @@
HwmpSimplestRegressionTest::HwmpSimplestRegressionTest () : TestCase ("Simplest HWMP regression test"),
m_nodes (0),
- m_time (Seconds (15))
+ m_time (Seconds (15)),
+ m_sentPktsCounter (0)
{
}
@@ -100,17 +100,18 @@
void
HwmpSimplestRegressionTest::InstallApplications ()
{
- UdpEchoServerHelper echoServer (9);
- ApplicationContainer serverApps = echoServer.Install (m_nodes->Get (0));
- serverApps.Start (Seconds (0.0));
- serverApps.Stop (m_time);
- UdpEchoClientHelper echoClient (m_interfaces.GetAddress (0), 9);
- echoClient.SetAttribute ("MaxPackets", UintegerValue (300));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (0.05)));
- echoClient.SetAttribute ("PacketSize", UintegerValue (100));
- ApplicationContainer clientApps = echoClient.Install (m_nodes->Get (1));
- clientApps.Start (Seconds (2.0));
- clientApps.Stop (m_time);
+ // client socket
+ m_clientSocket = Socket::CreateSocket (m_nodes->Get (1), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_clientSocket->Bind ();
+ m_clientSocket->Connect (InetSocketAddress (m_interfaces.GetAddress (0), 9));
+ m_clientSocket->SetRecvCallback (MakeCallback (&HwmpSimplestRegressionTest::HandleReadClient, this));
+ Simulator::ScheduleWithContext (m_clientSocket->GetNode ()->GetId (), Seconds (2.0),
+ &HwmpSimplestRegressionTest::SendData, this, m_clientSocket);
+
+ // server socket
+ m_serverSocket = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_serverSocket->Bind (InetSocketAddress (Ipv4Address::GetAny (), 9));
+ m_serverSocket->SetRecvCallback (MakeCallback (&HwmpSimplestRegressionTest::HandleReadServer, this));
}
void
HwmpSimplestRegressionTest::CreateDevices ()
@@ -153,3 +154,38 @@
}
}
+void
+HwmpSimplestRegressionTest::SendData (Ptr<Socket> socket)
+{
+ if ((Simulator::Now () < m_time) && (m_sentPktsCounter < 300))
+ {
+ socket->Send (Create<Packet> (100));
+ m_sentPktsCounter ++;
+ Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (0.05),
+ &HwmpSimplestRegressionTest::SendData, this, socket);
+ }
+}
+
+void
+HwmpSimplestRegressionTest::HandleReadServer (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ packet->RemoveAllPacketTags ();
+ packet->RemoveAllByteTags ();
+
+ socket->SendTo (packet, 0, from);
+ }
+}
+
+void
+HwmpSimplestRegressionTest::HandleReadClient (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ }
+}
--- a/src/mesh/test/dot11s/hwmp-simplest-regression.h Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/dot11s/hwmp-simplest-regression.h Thu Jul 09 23:52:12 2015 +0200
@@ -85,5 +85,37 @@
void CreateDevices ();
void InstallApplications ();
void ResetPosition ();
+
+ /// Server-side socket
+ Ptr<Socket> m_serverSocket;
+ /// Client-side socket
+ Ptr<Socket> m_clientSocket;
+
+ // sent packets counter
+ uint32_t m_sentPktsCounter;
+
+ /**
+ * Send data
+ * \param socket the sending socket
+ */
+ void SendData (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadServer (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadClient (Ptr<Socket> socket);
};
--- a/src/mesh/test/dot11s/hwmp-target-flags-regression.cc Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/dot11s/hwmp-target-flags-regression.cc Thu Jul 09 23:52:12 2015 +0200
@@ -44,7 +44,10 @@
HwmpDoRfRegressionTest::HwmpDoRfRegressionTest () : TestCase ("HWMP target flags regression test"),
m_nodes (0),
- m_time (Seconds (5))
+ m_time (Seconds (5)),
+ m_sentPktsCounterA (0),
+ m_sentPktsCounterB (0),
+ m_sentPktsCounterC (0)
{
}
@@ -52,6 +55,7 @@
{
delete m_nodes;
}
+
void
HwmpDoRfRegressionTest::DoRun ()
{
@@ -69,6 +73,7 @@
delete m_nodes, m_nodes = 0;
}
+
void
HwmpDoRfRegressionTest::CreateNodes ()
{
@@ -85,38 +90,45 @@
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (*m_nodes);
}
+
void
HwmpDoRfRegressionTest::InstallApplications ()
{
- UdpEchoServerHelper echoServer (9);
- ApplicationContainer serverApps = echoServer.Install (m_nodes->Get (0));
- serverApps.Start (Seconds (0.0));
- serverApps.Stop (m_time);
- UdpEchoClientHelper echoClient (m_interfaces.GetAddress (0), 9);
- echoClient.SetAttribute ("MaxPackets", UintegerValue (300));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
- echoClient.SetAttribute ("PacketSize", UintegerValue (100));
- //Install first client
- ApplicationContainer clientApps = echoClient.Install (m_nodes->Get (1));
- clientApps.Start (Seconds (2.2));
- clientApps.Stop (m_time);
- //Install second client
- clientApps = echoClient.Install (m_nodes->Get (2));
- clientApps.Start (Seconds (2.0));
- clientApps.Stop (m_time);
- //Install second server and attach client to it:
- UdpEchoServerHelper echoServer1 (10);
- serverApps = echoServer1.Install (m_nodes->Get (3));
- serverApps.Start (Seconds (0.0));
- serverApps.Stop (m_time);
- UdpEchoClientHelper echoClient1 (m_interfaces.GetAddress (3), 10);
- echoClient1.SetAttribute ("MaxPackets", UintegerValue (300));
- echoClient1.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
- echoClient1.SetAttribute ("PacketSize", UintegerValue (100));
- clientApps = echoClient1.Install (m_nodes->Get (0));
- clientApps.Start (Seconds (2.4));
- clientApps.Stop (m_time);
+ // server socket A
+ m_serverSocketA = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_serverSocketA->Bind (InetSocketAddress (Ipv4Address::GetAny (), 9));
+ m_serverSocketA->SetRecvCallback (MakeCallback (&HwmpDoRfRegressionTest::HandleReadServer, this));
+
+ // server socket B
+ m_serverSocketB = Socket::CreateSocket (m_nodes->Get (3), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_serverSocketB->Bind (InetSocketAddress (Ipv4Address::GetAny (), 10));
+ m_serverSocketB->SetRecvCallback (MakeCallback (&HwmpDoRfRegressionTest::HandleReadServer, this));
+
+ // client socket A
+ m_clientSocketA = Socket::CreateSocket (m_nodes->Get (1), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_clientSocketA->Bind ();
+ m_clientSocketA->Connect (InetSocketAddress (m_interfaces.GetAddress (0), 9));
+ m_clientSocketA->SetRecvCallback (MakeCallback (&HwmpDoRfRegressionTest::HandleReadClient, this));
+ Simulator::ScheduleWithContext (m_clientSocketA->GetNode ()->GetId (), Seconds (2.2),
+ &HwmpDoRfRegressionTest::SendDataA, this, m_clientSocketA);
+
+ // client socket B
+ m_clientSocketB = Socket::CreateSocket (m_nodes->Get (2), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_clientSocketB->Bind ();
+ m_clientSocketB->Connect (InetSocketAddress (m_interfaces.GetAddress (0), 9));
+ m_clientSocketB->SetRecvCallback (MakeCallback (&HwmpDoRfRegressionTest::HandleReadClient, this));
+ Simulator::ScheduleWithContext (m_clientSocketB->GetNode ()->GetId (), Seconds (2.0),
+ &HwmpDoRfRegressionTest::SendDataB, this, m_clientSocketB);
+
+ // client socket C
+ m_clientSocketB = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_clientSocketB->Bind ();
+ m_clientSocketB->Connect (InetSocketAddress (m_interfaces.GetAddress (3), 10));
+ m_clientSocketB->SetRecvCallback (MakeCallback (&HwmpDoRfRegressionTest::HandleReadClient, this));
+ Simulator::ScheduleWithContext (m_clientSocketB->GetNode ()->GetId (), Seconds (2.4),
+ &HwmpDoRfRegressionTest::SendDataC, this, m_clientSocketB);
}
+
void
HwmpDoRfRegressionTest::CreateDevices ()
{
@@ -160,3 +172,62 @@
}
}
+void
+HwmpDoRfRegressionTest::SendDataA (Ptr<Socket> socket)
+{
+ if ((Simulator::Now () < m_time) && (m_sentPktsCounterA < 300))
+ {
+ socket->Send (Create<Packet> (100));
+ m_sentPktsCounterA ++;
+ Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (1.0),
+ &HwmpDoRfRegressionTest::SendDataA, this, socket);
+ }
+}
+
+void
+HwmpDoRfRegressionTest::SendDataB (Ptr<Socket> socket)
+{
+ if ((Simulator::Now () < m_time) && (m_sentPktsCounterA < 300))
+ {
+ socket->Send (Create<Packet> (100));
+ m_sentPktsCounterB ++;
+ Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (1.0),
+ &HwmpDoRfRegressionTest::SendDataB, this, socket);
+ }
+}
+
+void
+HwmpDoRfRegressionTest::SendDataC (Ptr<Socket> socket)
+{
+ if ((Simulator::Now () < m_time) && (m_sentPktsCounterA < 300))
+ {
+ socket->Send (Create<Packet> (100));
+ m_sentPktsCounterC ++;
+ Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (1.0),
+ &HwmpDoRfRegressionTest::SendDataC, this, socket);
+ }
+}
+
+void
+HwmpDoRfRegressionTest::HandleReadServer (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ packet->RemoveAllPacketTags ();
+ packet->RemoveAllByteTags ();
+
+ socket->SendTo (packet, 0, from);
+ }
+}
+
+void
+HwmpDoRfRegressionTest::HandleReadClient (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ }
+}
--- a/src/mesh/test/dot11s/hwmp-target-flags-regression.h Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/dot11s/hwmp-target-flags-regression.h Thu Jul 09 23:52:12 2015 +0200
@@ -84,5 +84,59 @@
void CreateDevices ();
void InstallApplications ();
void ResetPosition ();
+
+ /// Server-side socket
+ Ptr<Socket> m_serverSocketA;
+ /// Server-side socket
+ Ptr<Socket> m_serverSocketB;
+ /// Client-side socket
+ Ptr<Socket> m_clientSocketA;
+ /// Client-side socket
+ Ptr<Socket> m_clientSocketB;
+ /// Client-side socket
+ Ptr<Socket> m_clientSocketC;
+
+ // sent packets counter A
+ uint32_t m_sentPktsCounterA;
+ // sent packets counter B
+ uint32_t m_sentPktsCounterB;
+ // sent packets counter C
+ uint32_t m_sentPktsCounterC;
+
+ /**
+ * Send data A
+ * \param socket the sending socket
+ */
+ void SendDataA (Ptr<Socket> socket);
+
+ /**
+ * Send data B
+ * \param socket the sending socket
+ */
+ void SendDataB (Ptr<Socket> socket);
+
+ /**
+ * Send data C
+ * \param socket the sending socket
+ */
+ void SendDataC (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadServer (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadClient (Ptr<Socket> socket);
};
--- a/src/mesh/test/flame/flame-regression.cc Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/flame/flame-regression.cc Thu Jul 09 23:52:12 2015 +0200
@@ -30,7 +30,6 @@
#include "ns3/ipv4-address-helper.h"
#include "ns3/abort.h"
#include "ns3/pcap-test.h"
-#include "ns3/udp-echo-helper.h"
#include "ns3/mobility-model.h"
#include <sstream>
@@ -44,7 +43,8 @@
FlameRegressionTest::FlameRegressionTest () : TestCase ("FLAME regression test"),
m_nodes (0),
- m_time (Seconds (10))
+ m_time (Seconds (10)),
+ m_sentPktsCounter (0)
{
}
@@ -125,17 +125,18 @@
void
FlameRegressionTest::InstallApplications ()
{
- UdpEchoServerHelper echoServer (9);
- ApplicationContainer serverApps = echoServer.Install (m_nodes->Get (0));
- serverApps.Start (Seconds (0.0));
- serverApps.Stop (m_time);
- UdpEchoClientHelper echoClient (m_interfaces.GetAddress (0), 9);
- echoClient.SetAttribute ("MaxPackets", UintegerValue (300));
- echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.1)));
- echoClient.SetAttribute ("PacketSize", UintegerValue (20));
- ApplicationContainer clientApps = echoClient.Install (m_nodes->Get (2));
- clientApps.Start (Seconds (1.0));
- clientApps.Stop (m_time);
+ // client socket
+ m_clientSocket = Socket::CreateSocket (m_nodes->Get (2), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_clientSocket->Bind ();
+ m_clientSocket->Connect (InetSocketAddress (m_interfaces.GetAddress (0), 9));
+ m_clientSocket->SetRecvCallback (MakeCallback (&FlameRegressionTest::HandleReadClient, this));
+ Simulator::ScheduleWithContext (m_clientSocket->GetNode ()->GetId (), Seconds (1.0),
+ &FlameRegressionTest::SendData, this, m_clientSocket);
+
+ // server socket
+ m_serverSocket = Socket::CreateSocket (m_nodes->Get (0), TypeId::LookupByName ("ns3::UdpSocketFactory"));
+ m_serverSocket->Bind (InetSocketAddress (Ipv4Address::GetAny (), 9));
+ m_serverSocket->SetRecvCallback (MakeCallback (&FlameRegressionTest::HandleReadServer, this));
}
void
@@ -147,3 +148,38 @@
}
}
+void
+FlameRegressionTest::SendData (Ptr<Socket> socket)
+{
+ if ((Simulator::Now () < m_time) && (m_sentPktsCounter < 300))
+ {
+ socket->Send (Create<Packet> (20));
+ m_sentPktsCounter ++;
+ Simulator::ScheduleWithContext (socket->GetNode ()->GetId (), Seconds (1.1),
+ &FlameRegressionTest::SendData, this, socket);
+ }
+}
+
+void
+FlameRegressionTest::HandleReadServer (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ packet->RemoveAllPacketTags ();
+ packet->RemoveAllByteTags ();
+
+ socket->SendTo (packet, 0, from);
+ }
+}
+
+void
+FlameRegressionTest::HandleReadClient (Ptr<Socket> socket)
+{
+ Ptr<Packet> packet;
+ Address from;
+ while ((packet = socket->RecvFrom (from)))
+ {
+ }
+}
--- a/src/mesh/test/flame/flame-regression.h Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/test/flame/flame-regression.h Thu Jul 09 23:52:12 2015 +0200
@@ -73,5 +73,37 @@
void CreateNodes ();
void CreateDevices ();
void InstallApplications ();
+
+ /// Server-side socket
+ Ptr<Socket> m_serverSocket;
+ /// Client-side socket
+ Ptr<Socket> m_clientSocket;
+
+ // sent packets counter
+ uint32_t m_sentPktsCounter;
+
+ /**
+ * Send data
+ * \param socket the sending socket
+ */
+ void SendData (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadServer (Ptr<Socket> socket);
+
+ /**
+ * \brief Handle a packet reception.
+ *
+ * This function is called by lower layers.
+ *
+ * \param socket the socket the packet was received to.
+ */
+ void HandleReadClient (Ptr<Socket> socket);
};
--- a/src/mesh/wscript Fri Jul 03 18:12:25 2015 +0200
+++ b/src/mesh/wscript Thu Jul 09 23:52:12 2015 +0200
@@ -1,7 +1,7 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
- obj = bld.create_ns3_module('mesh', ['internet', 'wifi', 'applications'])
+ obj = bld.create_ns3_module('mesh', ['internet', 'wifi'])
obj.source = [
'model/mesh-information-element-vector.cc',