diff --git a/bindings/python/ns3_module_bridge.py b/bindings/python/ns3_module_bridge.py index e63db6b91..20f9620a8 100644 --- a/bindings/python/ns3_module_bridge.py +++ b/bindings/python/ns3_module_bridge.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_common.py b/bindings/python/ns3_module_common.py index b12fb8e79..4d6ede6db 100644 --- a/bindings/python/ns3_module_common.py +++ b/bindings/python/ns3_module_common.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() @@ -424,11 +424,6 @@ def register_Ns3Packet_methods(root_module, cls): 'void', [], is_static=True) - ## packet.h: static void ns3::Packet::EnableMetadata() [member function] - cls.add_method('EnableMetadata', - 'void', - [], - is_static=True, deprecated=True) ## packet.h: static void ns3::Packet::EnablePrinting() [member function] cls.add_method('EnablePrinting', 'void', diff --git a/bindings/python/ns3_module_contrib.py b/bindings/python/ns3_module_contrib.py index f334a7a30..bc01326b9 100644 --- a/bindings/python/ns3_module_contrib.py +++ b/bindings/python/ns3_module_contrib.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_core.py b/bindings/python/ns3_module_core.py index e108eba13..a55a03694 100644 --- a/bindings/python/ns3_module_core.py +++ b/bindings/python/ns3_module_core.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_csma.py b/bindings/python/ns3_module_csma.py index d7e8e9b4f..08fc60f01 100644 --- a/bindings/python/ns3_module_csma.py +++ b/bindings/python/ns3_module_csma.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_emu.py b/bindings/python/ns3_module_emu.py index 4fa5d12a1..67f067f94 100644 --- a/bindings/python/ns3_module_emu.py +++ b/bindings/python/ns3_module_emu.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_global_routing.py b/bindings/python/ns3_module_global_routing.py index c3e0386d5..9b96b618f 100644 --- a/bindings/python/ns3_module_global_routing.py +++ b/bindings/python/ns3_module_global_routing.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_helper.py b/bindings/python/ns3_module_helper.py index 2b4b7f2f5..d75433a4e 100644 --- a/bindings/python/ns3_module_helper.py +++ b/bindings/python/ns3_module_helper.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() @@ -218,16 +218,6 @@ def register_Ns3CsmaHelper_methods(root_module, cls): cls.add_method('SetChannelAttribute', 'void', [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')]) - ## csma-helper.h: void ns3::CsmaHelper::SetDeviceParameter(std::string n1, ns3::AttributeValue const & v1) [member function] - cls.add_method('SetDeviceParameter', - 'void', - [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')], - deprecated=True) - ## csma-helper.h: void ns3::CsmaHelper::SetChannelParameter(std::string n1, ns3::AttributeValue const & v1) [member function] - cls.add_method('SetChannelParameter', - 'void', - [param('std::string', 'n1'), param('ns3::AttributeValue const &', 'v1')], - deprecated=True) ## csma-helper.h: static void ns3::CsmaHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid, bool promiscuous) [member function] cls.add_method('EnablePcap', 'void', @@ -815,16 +805,6 @@ def register_Ns3PointToPointHelper_methods(root_module, cls): cls.add_method('SetChannelAttribute', 'void', [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## point-to-point-helper.h: void ns3::PointToPointHelper::SetDeviceParameter(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetDeviceParameter', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')], - deprecated=True) - ## point-to-point-helper.h: void ns3::PointToPointHelper::SetChannelParameter(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetChannelParameter', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')], - deprecated=True) ## point-to-point-helper.h: static void ns3::PointToPointHelper::EnablePcap(std::string filename, uint32_t nodeid, uint32_t deviceid) [member function] cls.add_method('EnablePcap', 'void', diff --git a/bindings/python/ns3_module_internet_stack.py b/bindings/python/ns3_module_internet_stack.py index c29a3992a..b063c6a38 100644 --- a/bindings/python/ns3_module_internet_stack.py +++ b/bindings/python/ns3_module_internet_stack.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_mobility.py b/bindings/python/ns3_module_mobility.py index ef884b178..c179a685b 100644 --- a/bindings/python/ns3_module_mobility.py +++ b/bindings/python/ns3_module_mobility.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_node.py b/bindings/python/ns3_module_node.py index 8fa22046a..11781e8ca 100644 --- a/bindings/python/ns3_module_node.py +++ b/bindings/python/ns3_module_node.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_olsr.py b/bindings/python/ns3_module_olsr.py index a4f946822..6d299606a 100644 --- a/bindings/python/ns3_module_olsr.py +++ b/bindings/python/ns3_module_olsr.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() @@ -91,6 +91,15 @@ def register_types_ns3_olsr(module): module.add_class('TwoHopNeighborTuple') module.add_container('std::vector< ns3::olsr::MessageHeader::Hello::LinkMessage >', 'ns3::olsr::MessageHeader::Hello::LinkMessage', container_type='vector') module.add_container('std::vector< ns3::olsr::MessageHeader::Hna::Association >', 'ns3::olsr::MessageHeader::Hna::Association', container_type='vector') + typehandlers.add_type_alias('std::vector< ns3::olsr::DuplicateTuple, std::allocator< ns3::olsr::DuplicateTuple > >', 'ns3::olsr::DuplicateSet') + typehandlers.add_type_alias('std::set< ns3::Ipv4Address, std::less< ns3::Ipv4Address >, std::allocator< ns3::Ipv4Address > >', 'ns3::olsr::MprSet') + typehandlers.add_type_alias('std::vector< ns3::olsr::MprSelectorTuple, std::allocator< ns3::olsr::MprSelectorTuple > >', 'ns3::olsr::MprSelectorSet') + typehandlers.add_type_alias('std::vector< ns3::olsr::MessageHeader, std::allocator< ns3::olsr::MessageHeader > >', 'ns3::olsr::MessageList') + typehandlers.add_type_alias('std::vector< ns3::olsr::IfaceAssocTuple, std::allocator< ns3::olsr::IfaceAssocTuple > >', 'ns3::olsr::IfaceAssocSet') + typehandlers.add_type_alias('std::vector< ns3::olsr::NeighborTuple, std::allocator< ns3::olsr::NeighborTuple > >', 'ns3::olsr::NeighborSet') + typehandlers.add_type_alias('std::vector< ns3::olsr::TwoHopNeighborTuple, std::allocator< ns3::olsr::TwoHopNeighborTuple > >', 'ns3::olsr::TwoHopNeighborSet') + typehandlers.add_type_alias('std::vector< ns3::olsr::TopologyTuple, std::allocator< ns3::olsr::TopologyTuple > >', 'ns3::olsr::TopologySet') + typehandlers.add_type_alias('std::vector< ns3::olsr::LinkTuple, std::allocator< ns3::olsr::LinkTuple > >', 'ns3::olsr::LinkSet') def register_methods(root_module): register_Ns3OlsrState_methods(root_module, root_module['ns3::OlsrState']) diff --git a/bindings/python/ns3_module_onoff.py b/bindings/python/ns3_module_onoff.py index 2d253ec6d..1de43a429 100644 --- a/bindings/python/ns3_module_onoff.py +++ b/bindings/python/ns3_module_onoff.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_packet_sink.py b/bindings/python/ns3_module_packet_sink.py index 8478d79c4..ce901e7a9 100644 --- a/bindings/python/ns3_module_packet_sink.py +++ b/bindings/python/ns3_module_packet_sink.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_point_to_point.py b/bindings/python/ns3_module_point_to_point.py index 2360f1f62..14abbe961 100644 --- a/bindings/python/ns3_module_point_to_point.py +++ b/bindings/python/ns3_module_point_to_point.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_simulator.py b/bindings/python/ns3_module_simulator.py index 78bef44f9..1147dfa79 100644 --- a/bindings/python/ns3_module_simulator.py +++ b/bindings/python/ns3_module_simulator.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() @@ -61,6 +61,10 @@ def register_types(module): module.add_class('RealtimeSimulatorImpl', parent=root_module['ns3::SimulatorImpl']) ## realtime-simulator-impl.h: ns3::RealtimeSimulatorImpl::SynchronizationMode [enumeration] module.add_enum('SynchronizationMode', ['SYNC_BEST_EFFORT', 'SYNC_HARD_LIMIT'], outer_class=root_module['ns3::RealtimeSimulatorImpl']) + typehandlers.add_type_alias('ns3::TimeUnit< 2 >', 'ns3::TimeSquare') + typehandlers.add_type_alias('ns3::TimeUnit< - 1 >', 'ns3::TimeInvert') + typehandlers.add_type_alias('ns3::TimeUnit< 0 >', 'ns3::Scalar') + typehandlers.add_type_alias('ns3::TimeUnit< 1 >', 'ns3::Time') ## Register a nested module for the namespace Config @@ -277,11 +281,6 @@ def register_Ns3Simulator_methods(root_module, cls): 'void', [param('ns3::Ptr< ns3::Scheduler >', 'scheduler')], is_static=True) - ## simulator.h: static void ns3::Simulator::EnableLogTo(char const * filename) [member function] - cls.add_method('EnableLogTo', - 'void', - [param('char const *', 'filename')], - is_static=True, deprecated=True) ## simulator.h: static void ns3::Simulator::Destroy() [member function] cls.add_method('Destroy', 'void', diff --git a/bindings/python/ns3_module_stats.py b/bindings/python/ns3_module_stats.py index 59532ca76..d37a6b328 100644 --- a/bindings/python/ns3_module_stats.py +++ b/bindings/python/ns3_module_stats.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() @@ -25,6 +25,8 @@ def register_types(module): module.add_class('CounterCalculator', template_parameters=['unsigned int'], parent=root_module['ns3::DataCalculator']) ## packet-data-calculators.h: ns3::PacketCounterCalculator [class] module.add_class('PacketCounterCalculator', parent=root_module['ns3::CounterCalculator< unsigned int >']) + typehandlers.add_type_alias('std::list< ns3::Ptr< ns3::DataCalculator >, std::allocator< ns3::Ptr< ns3::DataCalculator > > >', 'ns3::DataCalculatorList') + typehandlers.add_type_alias('std::list< std::pair< std::string, std::string >, std::allocator< std::pair< std::string, std::string > > >', 'ns3::MetadataList') ## Register a nested module for the namespace Config diff --git a/bindings/python/ns3_module_tap_bridge.py b/bindings/python/ns3_module_tap_bridge.py index ba5310e25..85cb35479 100644 --- a/bindings/python/ns3_module_tap_bridge.py +++ b/bindings/python/ns3_module_tap_bridge.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_udp_echo.py b/bindings/python/ns3_module_udp_echo.py index dae92a56e..054694d98 100644 --- a/bindings/python/ns3_module_udp_echo.py +++ b/bindings/python/ns3_module_udp_echo.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_v4ping.py b/bindings/python/ns3_module_v4ping.py index ec2bc2357..3959bc0ee 100644 --- a/bindings/python/ns3_module_v4ping.py +++ b/bindings/python/ns3_module_v4ping.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() diff --git a/bindings/python/ns3_module_wifi.py b/bindings/python/ns3_module_wifi.py index e13cc31ea..432c47665 100644 --- a/bindings/python/ns3_module_wifi.py +++ b/bindings/python/ns3_module_wifi.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() @@ -135,6 +135,7 @@ def register_types(module): module.add_class('YansWifiChannel', parent=root_module['ns3::WifiChannel']) ## aarf-wifi-manager.h: ns3::AarfWifiManager [class] module.add_class('AarfWifiManager', parent=root_module['ns3::ArfWifiManager']) + typehandlers.add_type_alias('std::vector< ns3::ThresholdsItem, std::allocator< ns3::ThresholdsItem > >', 'ns3::Thresholds') ## Register a nested module for the namespace Config diff --git a/bindings/python/ns3modulegen_generated.py b/bindings/python/ns3modulegen_generated.py index 694befa0b..4a898b5d9 100644 --- a/bindings/python/ns3modulegen_generated.py +++ b/bindings/python/ns3modulegen_generated.py @@ -1,4 +1,4 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings