From fe7629c55b224edd4131209e1d49841ed887cb70 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Wed, 24 Jun 2009 15:31:53 -0700 Subject: [PATCH] update bindings --- bindings/python/ns3_module_bridge.py | 5 ++++ bindings/python/ns3_module_core.py | 12 +++++++++ bindings/python/ns3_module_csma.py | 9 ++++--- bindings/python/ns3_module_emu.py | 9 ++++--- bindings/python/ns3_module_helper.py | 17 ++++++++++++ bindings/python/ns3_module_internet_stack.py | 5 ++++ bindings/python/ns3_module_node.py | 14 +++++++--- bindings/python/ns3_module_point_to_point.py | 9 ++++--- bindings/python/ns3_module_stats.py | 27 +++++++------------ bindings/python/ns3_module_tap_bridge.py | 14 ++++++++-- bindings/python/ns3_module_udp_echo.py | 21 +++++++++++++++ .../python/ns3_module_virtual_net_device.py | 9 ++++--- bindings/python/ns3_module_wifi.py | 5 ++++ 13 files changed, 116 insertions(+), 40 deletions(-) diff --git a/bindings/python/ns3_module_bridge.py b/bindings/python/ns3_module_bridge.py index 8ed571317..4fdb75917 100644 --- a/bindings/python/ns3_module_bridge.py +++ b/bindings/python/ns3_module_bridge.py @@ -128,6 +128,11 @@ def register_Ns3BridgeNetDevice_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) + ## bridge-net-device.h: void ns3::BridgeNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', diff --git a/bindings/python/ns3_module_core.py b/bindings/python/ns3_module_core.py index 1cbf7aaad..74d36572c 100644 --- a/bindings/python/ns3_module_core.py +++ b/bindings/python/ns3_module_core.py @@ -85,6 +85,8 @@ def register_types(module): module.add_class('UnsafeAttributeList') ## random-variable.h: ns3::WeibullVariable [class] module.add_class('WeibullVariable', parent=root_module['ns3::RandomVariable']) + ## random-variable.h: ns3::ZipfVariable [class] + module.add_class('ZipfVariable', parent=root_module['ns3::RandomVariable']) ## empty.h: ns3::empty [class] module.add_class('empty') ## attribute.h: ns3::AttributeAccessor [class] @@ -260,6 +262,7 @@ def register_methods(root_module): register_Ns3UniformVariable_methods(root_module, root_module['ns3::UniformVariable']) register_Ns3UnsafeAttributeList_methods(root_module, root_module['ns3::UnsafeAttributeList']) register_Ns3WeibullVariable_methods(root_module, root_module['ns3::WeibullVariable']) + register_Ns3ZipfVariable_methods(root_module, root_module['ns3::ZipfVariable']) register_Ns3Empty_methods(root_module, root_module['ns3::empty']) register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor']) register_Ns3AttributeChecker_methods(root_module, root_module['ns3::AttributeChecker']) @@ -1180,6 +1183,15 @@ def register_Ns3WeibullVariable_methods(root_module, cls): cls.add_constructor([param('double', 'm'), param('double', 's'), param('double', 'b')]) return +def register_Ns3ZipfVariable_methods(root_module, cls): + ## random-variable.h: ns3::ZipfVariable::ZipfVariable(ns3::ZipfVariable const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ZipfVariable const &', 'arg0')]) + ## random-variable.h: ns3::ZipfVariable::ZipfVariable(long int n, double alpha) [constructor] + cls.add_constructor([param('long int', 'n'), param('double', 'alpha')]) + ## random-variable.h: ns3::ZipfVariable::ZipfVariable() [constructor] + cls.add_constructor([]) + return + def register_Ns3Empty_methods(root_module, cls): ## empty.h: ns3::empty::empty(ns3::empty const & arg0) [copy constructor] cls.add_constructor([param('ns3::empty const &', 'arg0')]) diff --git a/bindings/python/ns3_module_csma.py b/bindings/python/ns3_module_csma.py index eeceb9b65..4dcae39f4 100644 --- a/bindings/python/ns3_module_csma.py +++ b/bindings/python/ns3_module_csma.py @@ -262,10 +262,6 @@ def register_Ns3CsmaNetDevice_methods(root_module, cls): cls.add_method('SetReceiveEnable', 'void', [param('bool', 'enable')]) - ## csma-net-device.h: void ns3::CsmaNetDevice::SetAddress(ns3::Mac48Address addr) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Mac48Address', 'addr')]) ## csma-net-device.h: void ns3::CsmaNetDevice::SetFrameSize(uint16_t frameSize) [member function] cls.add_method('SetFrameSize', 'void', @@ -308,6 +304,11 @@ def register_Ns3CsmaNetDevice_methods(root_module, cls): 'uint16_t', [], is_const=True, is_virtual=True) + ## csma-net-device.h: void ns3::CsmaNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) ## csma-net-device.h: ns3::Address ns3::CsmaNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', diff --git a/bindings/python/ns3_module_emu.py b/bindings/python/ns3_module_emu.py index f32ed9c94..30c73588d 100644 --- a/bindings/python/ns3_module_emu.py +++ b/bindings/python/ns3_module_emu.py @@ -86,10 +86,6 @@ def register_Ns3EmuNetDevice_methods(root_module, cls): cls.add_method('SetQueue', 'void', [param('ns3::Ptr< ns3::Queue >', 'queue')]) - ## emu-net-device.h: void ns3::EmuNetDevice::SetAddress(ns3::Mac48Address addr) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Mac48Address', 'addr')]) ## emu-net-device.h: void ns3::EmuNetDevice::SetIfIndex(uint32_t const index) [member function] cls.add_method('SetIfIndex', 'void', @@ -105,6 +101,11 @@ def register_Ns3EmuNetDevice_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) + ## emu-net-device.h: void ns3::EmuNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', diff --git a/bindings/python/ns3_module_helper.py b/bindings/python/ns3_module_helper.py index 2b540772d..cb0fa831c 100644 --- a/bindings/python/ns3_module_helper.py +++ b/bindings/python/ns3_module_helper.py @@ -987,6 +987,18 @@ def register_Ns3UdpEchoClientHelper_methods(root_module, cls): cls.add_method('SetAttribute', 'void', [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) + ## udp-echo-helper.h: void ns3::UdpEchoClientHelper::SetFill(ns3::Ptr app, std::string fill) [member function] + cls.add_method('SetFill', + 'void', + [param('ns3::Ptr< ns3::Application >', 'app'), param('std::string', 'fill')]) + ## udp-echo-helper.h: void ns3::UdpEchoClientHelper::SetFill(ns3::Ptr app, uint8_t fill, uint32_t dataLength) [member function] + cls.add_method('SetFill', + 'void', + [param('ns3::Ptr< ns3::Application >', 'app'), param('uint8_t', 'fill'), param('uint32_t', 'dataLength')]) + ## udp-echo-helper.h: void ns3::UdpEchoClientHelper::SetFill(ns3::Ptr app, uint8_t * fill, uint32_t fillLength, uint32_t dataLength) [member function] + cls.add_method('SetFill', + 'void', + [param('ns3::Ptr< ns3::Application >', 'app'), param('uint8_t *', 'fill'), param('uint32_t', 'fillLength'), param('uint32_t', 'dataLength')]) ## udp-echo-helper.h: ns3::ApplicationContainer ns3::UdpEchoClientHelper::Install(ns3::Ptr node) const [member function] cls.add_method('Install', 'ns3::ApplicationContainer', @@ -1085,6 +1097,11 @@ def register_Ns3WifiHelper_methods(root_module, cls): 'ns3::NetDeviceContainer', [param('ns3::WifiPhyHelper const &', 'phy'), param('ns3::WifiMacHelper const &', 'mac'), param('std::string', 'nodeName')], is_const=True) + ## wifi-helper.h: void ns3::WifiHelper::WifiLogComponentEnable() const [member function] + cls.add_method('WifiLogComponentEnable', + 'void', + [], + is_const=True) return def register_Ns3WifiMacHelper_methods(root_module, cls): diff --git a/bindings/python/ns3_module_internet_stack.py b/bindings/python/ns3_module_internet_stack.py index cb4313a37..567a72ac2 100644 --- a/bindings/python/ns3_module_internet_stack.py +++ b/bindings/python/ns3_module_internet_stack.py @@ -172,6 +172,11 @@ def register_Ns3Icmpv4Echo_methods(root_module, cls): 'uint16_t', [], is_const=True) + ## icmpv4.h: uint32_t ns3::Icmpv4Echo::GetDataSize() const [member function] + cls.add_method('GetDataSize', + 'uint32_t', + [], + is_const=True) ## icmpv4.h: uint32_t ns3::Icmpv4Echo::GetData(uint8_t * payload) const [member function] cls.add_method('GetData', 'uint32_t', diff --git a/bindings/python/ns3_module_node.py b/bindings/python/ns3_module_node.py index 4985605de..0e8fec2bf 100644 --- a/bindings/python/ns3_module_node.py +++ b/bindings/python/ns3_module_node.py @@ -2777,6 +2777,11 @@ def register_Ns3NetDevice_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_pure_virtual=True, is_const=True, is_virtual=True) + ## net-device.h: void ns3::NetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_pure_virtual=True, is_virtual=True) ## net-device.h: ns3::Address ns3::NetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', @@ -3019,10 +3024,6 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls): cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::SimpleChannel >', 'channel')]) - ## simple-net-device.h: void ns3::SimpleNetDevice::SetAddress(ns3::Mac48Address address) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Mac48Address', 'address')]) ## simple-net-device.h: void ns3::SimpleNetDevice::SetIfIndex(uint32_t const index) [member function] cls.add_method('SetIfIndex', 'void', @@ -3038,6 +3039,11 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) + ## simple-net-device.h: void ns3::SimpleNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) ## simple-net-device.h: ns3::Address ns3::SimpleNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', diff --git a/bindings/python/ns3_module_point_to_point.py b/bindings/python/ns3_module_point_to_point.py index 5b72f28d0..38e96e166 100644 --- a/bindings/python/ns3_module_point_to_point.py +++ b/bindings/python/ns3_module_point_to_point.py @@ -172,10 +172,6 @@ def register_Ns3PointToPointNetDevice_methods(root_module, cls): cls.add_method('Receive', 'void', [param('ns3::Ptr< ns3::Packet >', 'p')]) - ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetAddress(ns3::Mac48Address addr) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Mac48Address', 'addr')]) ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetFrameSize(uint16_t frameSize) [member function] cls.add_method('SetFrameSize', 'void', @@ -200,6 +196,11 @@ def register_Ns3PointToPointNetDevice_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) + ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', diff --git a/bindings/python/ns3_module_stats.py b/bindings/python/ns3_module_stats.py index 1b455aa87..63b6d9709 100644 --- a/bindings/python/ns3_module_stats.py +++ b/bindings/python/ns3_module_stats.py @@ -256,6 +256,15 @@ def register_Ns3DataOutputInterface_methods(root_module, cls): 'void', [param('ns3::DataCollector &', 'dc')], is_pure_virtual=True, is_virtual=True) + ## data-output-interface.h: void ns3::DataOutputInterface::SetFilePrefix(std::string const prefix) [member function] + cls.add_method('SetFilePrefix', + 'void', + [param('std::string const', 'prefix')]) + ## data-output-interface.h: std::string ns3::DataOutputInterface::GetFilePrefix() const [member function] + cls.add_method('GetFilePrefix', + 'std::string', + [], + is_const=True) ## data-output-interface.h: void ns3::DataOutputInterface::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -294,15 +303,6 @@ def register_Ns3OmnetDataOutput_methods(root_module, cls): 'void', [param('ns3::DataCollector &', 'dc')], is_virtual=True) - ## omnet-data-output.h: void ns3::OmnetDataOutput::SetFilePrefix(std::string const prefix) [member function] - cls.add_method('SetFilePrefix', - 'void', - [param('std::string const', 'prefix')]) - ## omnet-data-output.h: std::string ns3::OmnetDataOutput::GetFilePrefix() const [member function] - cls.add_method('GetFilePrefix', - 'std::string', - [], - is_const=True) ## omnet-data-output.h: void ns3::OmnetDataOutput::DoDispose() [member function] cls.add_method('DoDispose', 'void', @@ -340,15 +340,6 @@ def register_Ns3SqliteDataOutput_methods(root_module, cls): 'void', [param('ns3::DataCollector &', 'dc')], is_virtual=True) - ## sqlite-data-output.h: void ns3::SqliteDataOutput::SetDBFile(std::string const file) [member function] - cls.add_method('SetDBFile', - 'void', - [param('std::string const', 'file')]) - ## sqlite-data-output.h: std::string ns3::SqliteDataOutput::GetDBFile() const [member function] - cls.add_method('GetDBFile', - 'std::string', - [], - is_const=True) ## sqlite-data-output.h: void ns3::SqliteDataOutput::DoDispose() [member function] cls.add_method('DoDispose', 'void', diff --git a/bindings/python/ns3_module_tap_bridge.py b/bindings/python/ns3_module_tap_bridge.py index b78e4ef6b..c3d2526aa 100644 --- a/bindings/python/ns3_module_tap_bridge.py +++ b/bindings/python/ns3_module_tap_bridge.py @@ -111,6 +111,11 @@ def register_Ns3TapBridge_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) + ## tap-bridge.h: void ns3::TapBridge::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) ## tap-bridge.h: ns3::Address ns3::TapBridge::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', @@ -216,11 +221,16 @@ def register_Ns3TapBridge_methods(root_module, cls): 'void', [], visibility='protected', is_virtual=True) - ## tap-bridge.h: void ns3::TapBridge::ReceiveFromBridgedDevice(ns3::Ptr device, ns3::Ptr packet, uint16_t protocol, ns3::Address const & src, ns3::Address const & dst, ns3::NetDevice::PacketType packetType) [member function] + ## tap-bridge.h: bool ns3::TapBridge::ReceiveFromBridgedDevice(ns3::Ptr device, ns3::Ptr packet, uint16_t protocol, ns3::Address const & src, ns3::Address const & dst, ns3::NetDevice::PacketType packetType) [member function] cls.add_method('ReceiveFromBridgedDevice', - 'void', + 'bool', [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'src'), param('ns3::Address const &', 'dst'), param('ns3::NetDevice::PacketType', 'packetType')], visibility='protected') + ## tap-bridge.h: bool ns3::TapBridge::DiscardFromBridgedDevice(ns3::Ptr device, ns3::Ptr packet, uint16_t protocol, ns3::Address const & src) [member function] + cls.add_method('DiscardFromBridgedDevice', + 'bool', + [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'src')], + visibility='protected') return def register_functions(root_module): diff --git a/bindings/python/ns3_module_udp_echo.py b/bindings/python/ns3_module_udp_echo.py index 52f36dac6..bba199157 100644 --- a/bindings/python/ns3_module_udp_echo.py +++ b/bindings/python/ns3_module_udp_echo.py @@ -77,6 +77,27 @@ def register_Ns3UdpEchoClient_methods(root_module, cls): cls.add_method('SetRemote', 'void', [param('ns3::Ipv4Address', 'ip'), param('uint16_t', 'port')]) + ## udp-echo-client.h: void ns3::UdpEchoClient::SetDataSize(uint32_t dataSize) [member function] + cls.add_method('SetDataSize', + 'void', + [param('uint32_t', 'dataSize')]) + ## udp-echo-client.h: uint32_t ns3::UdpEchoClient::GetDataSize() const [member function] + cls.add_method('GetDataSize', + 'uint32_t', + [], + is_const=True) + ## udp-echo-client.h: void ns3::UdpEchoClient::SetFill(std::string fill) [member function] + cls.add_method('SetFill', + 'void', + [param('std::string', 'fill')]) + ## udp-echo-client.h: void ns3::UdpEchoClient::SetFill(uint8_t fill, uint32_t dataSize) [member function] + cls.add_method('SetFill', + 'void', + [param('uint8_t', 'fill'), param('uint32_t', 'dataSize')]) + ## udp-echo-client.h: void ns3::UdpEchoClient::SetFill(uint8_t * fill, uint32_t fillSize, uint32_t dataSize) [member function] + cls.add_method('SetFill', + 'void', + [param('uint8_t *', 'fill'), param('uint32_t', 'fillSize'), param('uint32_t', 'dataSize')]) ## udp-echo-client.h: void ns3::UdpEchoClient::DoDispose() [member function] cls.add_method('DoDispose', 'void', diff --git a/bindings/python/ns3_module_virtual_net_device.py b/bindings/python/ns3_module_virtual_net_device.py index c13e0e6c7..898170312 100644 --- a/bindings/python/ns3_module_virtual_net_device.py +++ b/bindings/python/ns3_module_virtual_net_device.py @@ -95,10 +95,6 @@ def register_Ns3VirtualNetDevice_methods(root_module, cls): cls.add_method('Receive', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'destination'), param('ns3::NetDevice::PacketType', 'packetType')]) - ## virtual-net-device.h: void ns3::VirtualNetDevice::SetAddress(ns3::Address addr) [member function] - cls.add_method('SetAddress', - 'void', - [param('ns3::Address', 'addr')]) ## virtual-net-device.h: void ns3::VirtualNetDevice::SetIfIndex(uint32_t const index) [member function] cls.add_method('SetIfIndex', 'void', @@ -114,6 +110,11 @@ def register_Ns3VirtualNetDevice_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) + ## virtual-net-device.h: void ns3::VirtualNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) ## virtual-net-device.h: ns3::Address ns3::VirtualNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', diff --git a/bindings/python/ns3_module_wifi.py b/bindings/python/ns3_module_wifi.py index d0e3c9537..1555f2e7d 100644 --- a/bindings/python/ns3_module_wifi.py +++ b/bindings/python/ns3_module_wifi.py @@ -4070,6 +4070,11 @@ def register_Ns3WifiNetDevice_methods(root_module, cls): 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) + ## wifi-net-device.h: void ns3::WifiNetDevice::SetAddress(ns3::Address address) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'address')], + is_virtual=True) ## wifi-net-device.h: ns3::Address ns3::WifiNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address',