New API considering comments from Craig: NetDevice->Node uses two callbacks; Node->ProtocolHandlers uses a single API with a promiscuous flag.

This commit is contained in:
Gustavo J. A. M. Carneiro
2008-07-16 16:06:50 +01:00
parent ccb5ec4d4d
commit c33568c079
18 changed files with 299 additions and 88 deletions

View File

@@ -6,6 +6,7 @@ callback_classes = [
['bool', 'ns3::Ptr<ns3::Socket>', 'ns3::Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Packet>', 'ns3::Mac48Address const&', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet>', 'unsigned short', 'ns3::Address const&', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType'],
['void', 'ns3::Ptr<ns3::Packet>', 'double', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Packet>', 'double', 'ns3::WifiMode', 'ns3::WifiPreamble', 'ns3::empty', 'ns3::empty'],

View File

@@ -102,8 +102,12 @@ def register_Ns3BridgeNetDevice_methods(root_module, cls):
cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True)
## bridge-net-device.h: bool ns3::BridgeNetDevice::NeedsArp() const [member function]
cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True)
## bridge-net-device.h: void ns3::BridgeNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'cb')], is_virtual=True)
## bridge-net-device.h: void ns3::BridgeNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::empty, ns3::empty >', 'cb')], is_virtual=True)
## bridge-net-device.h: void ns3::BridgeNetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
cls.add_method('SetPromiscReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'cb')], is_virtual=True)
## bridge-net-device.h: bool ns3::BridgeNetDevice::SupportsPromiscuous() const [member function]
cls.add_method('SupportsPromiscuous', 'bool', [], is_const=True, is_virtual=True)
## bridge-net-device.h: void ns3::BridgeNetDevice::DoDispose() [member function]
cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True)
## bridge-net-device.h: void ns3::BridgeNetDevice::ReceiveFromDevice(ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::Packet> packet, uint16_t protocol, ns3::Address const & source, ns3::Address const & destination, ns3::NetDevice::PacketType packetType) [member function]

View File

@@ -21,12 +21,16 @@ def register_types(module):
module.add_class('SystemWallClockMs')
## callback.h: ns3::CallbackImplBase [class]
module.add_class('CallbackImplBase', incref_method='Ref', allow_subclassing=True, decref_method='Unref', peekref_method='GetReferenceCount')
## system-mutex.h: ns3::CriticalSection [class]
module.add_class('CriticalSection')
## trace-source-accessor.h: ns3::TraceSourceAccessor [class]
module.add_class('TraceSourceAccessor', allow_subclassing=True)
## attribute.h: ns3::AttributeChecker [class]
module.add_class('AttributeChecker', incref_method='Ref', allow_subclassing=False, automatic_type_narrowing=True, decref_method='Unref', parent=root_module['ns3::RefCountBase'])
## random-variable.h: ns3::RandomVariableChecker [class]
module.add_class('RandomVariableChecker', parent=root_module['ns3::AttributeChecker'])
## system-mutex.h: ns3::SystemMutex [class]
module.add_class('SystemMutex')
## random-variable.h: ns3::NormalVariable [class]
module.add_class('NormalVariable', parent=root_module['ns3::RandomVariable'])
## object-factory.h: ns3::ObjectFactory [class]
@@ -37,6 +41,8 @@ def register_types(module):
module.add_class('ParetoVariable', parent=root_module['ns3::RandomVariable'])
## random-variable.h: ns3::ConstantVariable [class]
module.add_class('ConstantVariable', parent=root_module['ns3::RandomVariable'])
## system-thread.h: ns3::SystemThread [class]
module.add_class('SystemThread')
## random-variable.h: ns3::EmpiricalVariable [class]
module.add_class('EmpiricalVariable', parent=root_module['ns3::RandomVariable'])
## enum.h: ns3::EnumChecker [class]
@@ -121,6 +127,8 @@ def register_types(module):
module.add_class('Object', incref_method='Ref', automatic_type_narrowing=True, decref_method='Unref', parent=root_module['ns3::ObjectBase'], peekref_method='GetReferenceCount')
## object.h: ns3::Object::AggregateIterator [class]
module.add_class('AggregateIterator', outer_class=root_module['ns3::Object'])
## system-condition.h: ns3::SystemCondition [class]
module.add_class('SystemCondition')
## random-variable.h: ns3::SequentialVariable [class]
module.add_class('SequentialVariable', parent=root_module['ns3::RandomVariable'])
## object-vector.h: ns3::ObjectVectorChecker [class]
@@ -219,14 +227,17 @@ def register_methods(root_module):
register_Ns3TypeIdAttributeInfo_methods(root_module, root_module['ns3::TypeId::AttributeInfo'])
register_Ns3SystemWallClockMs_methods(root_module, root_module['ns3::SystemWallClockMs'])
register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase'])
register_Ns3CriticalSection_methods(root_module, root_module['ns3::CriticalSection'])
register_Ns3TraceSourceAccessor_methods(root_module, root_module['ns3::TraceSourceAccessor'])
register_Ns3AttributeChecker_methods(root_module, root_module['ns3::AttributeChecker'])
register_Ns3RandomVariableChecker_methods(root_module, root_module['ns3::RandomVariableChecker'])
register_Ns3SystemMutex_methods(root_module, root_module['ns3::SystemMutex'])
register_Ns3NormalVariable_methods(root_module, root_module['ns3::NormalVariable'])
register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor'])
register_Ns3ParetoVariable_methods(root_module, root_module['ns3::ParetoVariable'])
register_Ns3ConstantVariable_methods(root_module, root_module['ns3::ConstantVariable'])
register_Ns3SystemThread_methods(root_module, root_module['ns3::SystemThread'])
register_Ns3EmpiricalVariable_methods(root_module, root_module['ns3::EmpiricalVariable'])
register_Ns3EnumChecker_methods(root_module, root_module['ns3::EnumChecker'])
register_Ns3Empty_methods(root_module, root_module['ns3::empty'])
@@ -262,6 +273,7 @@ def register_methods(root_module):
register_Ns3UniformVariable_methods(root_module, root_module['ns3::UniformVariable'])
register_Ns3Object_methods(root_module, root_module['ns3::Object'])
register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator'])
register_Ns3SystemCondition_methods(root_module, root_module['ns3::SystemCondition'])
register_Ns3SequentialVariable_methods(root_module, root_module['ns3::SequentialVariable'])
register_Ns3ObjectVectorChecker_methods(root_module, root_module['ns3::ObjectVectorChecker'])
register_Ns3StringChecker_methods(root_module, root_module['ns3::StringChecker'])
@@ -449,6 +461,11 @@ def register_Ns3CallbackImplBase_methods(root_module, cls):
cls.add_method('IsEqual', 'bool', [param('ns3::Ptr< ns3::CallbackImplBase const >', 'other')], is_pure_virtual=True, is_const=True, is_virtual=True)
return
def register_Ns3CriticalSection_methods(root_module, cls):
## system-mutex.h: ns3::CriticalSection::CriticalSection(ns3::SystemMutex & mutex) [constructor]
cls.add_constructor([param('ns3::SystemMutex&', 'mutex')], visibility='public')
return
def register_Ns3TraceSourceAccessor_methods(root_module, cls):
## trace-source-accessor.h: ns3::TraceSourceAccessor::TraceSourceAccessor() [constructor]
cls.add_constructor([], visibility='public')
@@ -487,6 +504,15 @@ def register_Ns3RandomVariableChecker_methods(root_module, cls):
cls.add_constructor([])
return
def register_Ns3SystemMutex_methods(root_module, cls):
## system-mutex.h: ns3::SystemMutex::SystemMutex() [constructor]
cls.add_constructor([], visibility='public')
## system-mutex.h: void ns3::SystemMutex::Lock() [member function]
cls.add_method('Lock', 'void', [])
## system-mutex.h: void ns3::SystemMutex::Unlock() [member function]
cls.add_method('Unlock', 'void', [])
return
def register_Ns3NormalVariable_methods(root_module, cls):
## random-variable.h: ns3::NormalVariable::NormalVariable() [constructor]
cls.add_constructor([], visibility='public')
@@ -555,6 +581,19 @@ def register_Ns3ConstantVariable_methods(root_module, cls):
cls.add_method('SetConstant', 'void', [param('double', 'c')])
return
def register_Ns3SystemThread_methods(root_module, cls):
## system-thread.h: ns3::SystemThread::SystemThread(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [constructor]
cls.add_constructor([param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], visibility='public')
## system-thread.h: void ns3::SystemThread::Ref() const [member function]
cls.add_method('Ref', 'void', [], is_const=True)
## system-thread.h: void ns3::SystemThread::Unref() const [member function]
cls.add_method('Unref', 'void', [], is_const=True)
## system-thread.h: void ns3::SystemThread::Start() [member function]
cls.add_method('Start', 'void', [])
## system-thread.h: void ns3::SystemThread::Join() [member function]
cls.add_method('Join', 'void', [])
return
def register_Ns3EmpiricalVariable_methods(root_module, cls):
## random-variable.h: ns3::EmpiricalVariable::EmpiricalVariable() [constructor]
cls.add_constructor([], visibility='public')
@@ -944,6 +983,23 @@ def register_Ns3ObjectAggregateIterator_methods(root_module, cls):
cls.add_method('Next', 'ns3::Ptr< ns3::Object const >', [])
return
def register_Ns3SystemCondition_methods(root_module, cls):
## system-condition.h: ns3::SystemCondition::SystemCondition() [constructor]
cls.add_constructor([], visibility='public')
## system-condition.h: void ns3::SystemCondition::SetCondition(bool condition) [member function]
cls.add_method('SetCondition', 'void', [param('bool', 'condition')])
## system-condition.h: bool ns3::SystemCondition::GetCondition() [member function]
cls.add_method('GetCondition', 'bool', [])
## system-condition.h: void ns3::SystemCondition::Signal() [member function]
cls.add_method('Signal', 'void', [])
## system-condition.h: void ns3::SystemCondition::Broadcast() [member function]
cls.add_method('Broadcast', 'void', [])
## system-condition.h: void ns3::SystemCondition::Wait() [member function]
cls.add_method('Wait', 'void', [])
## system-condition.h: bool ns3::SystemCondition::TimedWait(uint64_t ns) [member function]
cls.add_method('TimedWait', 'bool', [param('uint64_t', 'ns')])
return
def register_Ns3SequentialVariable_methods(root_module, cls):
## random-variable.h: ns3::SequentialVariable::SequentialVariable(double f, double l, double i=1, uint32_t c=1) [constructor]
cls.add_constructor([param('double', 'f'), param('double', 'l'), param('double', 'i', default_value='1'), param('uint32_t', 'c', default_value='1')], visibility='public')

View File

@@ -213,8 +213,12 @@ def register_Ns3CsmaNetDevice_methods(root_module, cls):
cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True)
## csma-net-device.h: bool ns3::CsmaNetDevice::NeedsArp() const [member function]
cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True)
## csma-net-device.h: void ns3::CsmaNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'cb')], is_virtual=True)
## csma-net-device.h: void ns3::CsmaNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::empty, ns3::empty >', 'cb')], is_virtual=True)
## csma-net-device.h: void ns3::CsmaNetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
cls.add_method('SetPromiscReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'cb')], is_virtual=True)
## csma-net-device.h: bool ns3::CsmaNetDevice::SupportsPromiscuous() const [member function]
cls.add_method('SupportsPromiscuous', 'bool', [], is_const=True, is_virtual=True)
## csma-net-device.h: void ns3::CsmaNetDevice::DoDispose() [member function]
cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True)
## csma-net-device.h: ns3::Ptr<ns3::Queue> ns3::CsmaNetDevice::GetQueue() const [member function]

View File

@@ -77,10 +77,10 @@ def register_types(module):
module.add_class('AddressValue', parent=root_module['ns3::AttributeValue'])
## node.h: ns3::Node [class]
module.add_class('Node', parent=root_module['ns3::Object'])
## tcp-socket.h: ns3::TcpSocket [class]
module.add_class('TcpSocket', parent=root_module['ns3::Socket'])
## channel.h: ns3::Channel [class]
module.add_class('Channel', parent=root_module['ns3::Object'])
## tcp-socket.h: ns3::TcpSocket [class]
module.add_class('TcpSocket', parent=root_module['ns3::Socket'])
## ethernet-header.h: ns3::EthernetHeader [class]
module.add_class('EthernetHeader', parent=root_module['ns3::Header'])
## socket.h: ns3::SocketIpTtlTag [class]
@@ -175,8 +175,8 @@ def register_methods(root_module):
register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice'])
register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
register_Ns3Node_methods(root_module, root_module['ns3::Node'])
register_Ns3TcpSocket_methods(root_module, root_module['ns3::TcpSocket'])
register_Ns3Channel_methods(root_module, root_module['ns3::Channel'])
register_Ns3TcpSocket_methods(root_module, root_module['ns3::TcpSocket'])
register_Ns3EthernetHeader_methods(root_module, root_module['ns3::EthernetHeader'])
register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4'])
@@ -861,8 +861,12 @@ def register_Ns3NetDevice_methods(root_module, cls):
cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_pure_virtual=True, is_virtual=True)
## net-device.h: bool ns3::NetDevice::NeedsArp() const [member function]
cls.add_method('NeedsArp', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True)
## net-device.h: void ns3::NetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'cb')], is_pure_virtual=True, is_virtual=True)
## net-device.h: void ns3::NetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True)
## net-device.h: void ns3::NetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
cls.add_method('SetPromiscReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'cb')], is_virtual=True)
## net-device.h: bool ns3::NetDevice::SupportsPromiscuous() const [member function]
cls.add_method('SupportsPromiscuous', 'bool', [], is_const=True, is_virtual=True)
cls.add_constructor([])
return
@@ -908,20 +912,33 @@ def register_Ns3Node_methods(root_module, cls):
cls.add_method('GetFirstApplication', 'ns3::Ptr< ns3::Application >', [param('ns3::TypeId', 'tid')])
## node.h: uint32_t ns3::Node::GetNApplications() const [member function]
cls.add_method('GetNApplications', 'uint32_t', [], is_const=True)
## node.h: void ns3::Node::RegisterProtocolHandler(ns3::Callback<void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> handler, uint16_t protocolType, ns3::Ptr<ns3::NetDevice> device) [member function]
cls.add_method('RegisterProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'handler'), param('uint16_t', 'protocolType'), param('ns3::Ptr< ns3::NetDevice >', 'device')])
## node.h: void ns3::Node::RegisterProtocolHandler(ns3::Callback<void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> handler, uint16_t protocolType, ns3::Ptr<ns3::NetDevice> device, bool promiscuous=false) [member function]
cls.add_method('RegisterProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'handler'), param('uint16_t', 'protocolType'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('bool', 'promiscuous', default_value='false')])
## node.h: void ns3::Node::UnregisterProtocolHandler(ns3::Callback<void, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> handler) [member function]
cls.add_method('UnregisterProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'handler')])
## node.h: void ns3::Node::RegisterPromiscuousProtocolHandler(ns3::Callback<void,ns3::Ptr<ns3::NetDevice>,ns3::Ptr<ns3::Packet>,short unsigned int,const ns3::Address&,const ns3::Address&,bool> handler, uint16_t protocolType, ns3::Ptr<ns3::NetDevice> device) [member function]
cls.add_method('RegisterPromiscuousProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, short unsigned int, const ns3::Address&, const ns3::Address&, bool >', 'handler'), param('uint16_t', 'protocolType'), param('ns3::Ptr< ns3::NetDevice >', 'device')])
## node.h: void ns3::Node::UnregisterPromiscuousProtocolHandler(ns3::Callback<void,ns3::Ptr<ns3::NetDevice>,ns3::Ptr<ns3::Packet>,short unsigned int,const ns3::Address&,const ns3::Address&,bool> handler) [member function]
cls.add_method('UnregisterPromiscuousProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, short unsigned int, const ns3::Address&, const ns3::Address&, bool >', 'handler')])
## node.h: void ns3::Node::DoDispose() [member function]
cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True)
## node.h: void ns3::Node::NotifyDeviceAdded(ns3::Ptr<ns3::NetDevice> device) [member function]
cls.add_method('NotifyDeviceAdded', 'void', [param('ns3::Ptr< ns3::NetDevice >', 'device')], visibility='private', is_virtual=True)
return
def register_Ns3Channel_methods(root_module, cls):
## channel.h: static ns3::TypeId ns3::Channel::GetTypeId() [member function]
cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True)
## channel.h: ns3::Channel::Channel() [constructor]
cls.add_constructor([], visibility='public')
## channel.h: ns3::Channel::Channel(std::string name) [constructor]
cls.add_constructor([param('std::string', 'name')], visibility='public')
## channel.h: void ns3::Channel::SetName(std::string arg0) [member function]
cls.add_method('SetName', 'void', [param('std::string', 'arg0')])
## channel.h: std::string ns3::Channel::GetName() [member function]
cls.add_method('GetName', 'std::string', [])
## channel.h: uint32_t ns3::Channel::GetNDevices() const [member function]
cls.add_method('GetNDevices', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True)
## channel.h: ns3::Ptr<ns3::NetDevice> ns3::Channel::GetDevice(uint32_t i) const [member function]
cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_pure_virtual=True, is_const=True, is_virtual=True)
return
def register_Ns3TcpSocket_methods(root_module, cls):
## tcp-socket.h: static ns3::TypeId ns3::TcpSocket::GetTypeId() [member function]
cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True)
@@ -969,23 +986,6 @@ def register_Ns3TcpSocket_methods(root_module, cls):
cls.add_method('GetDelAckMaxCount', 'uint32_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
return
def register_Ns3Channel_methods(root_module, cls):
## channel.h: static ns3::TypeId ns3::Channel::GetTypeId() [member function]
cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True)
## channel.h: ns3::Channel::Channel() [constructor]
cls.add_constructor([], visibility='public')
## channel.h: ns3::Channel::Channel(std::string name) [constructor]
cls.add_constructor([param('std::string', 'name')], visibility='public')
## channel.h: void ns3::Channel::SetName(std::string arg0) [member function]
cls.add_method('SetName', 'void', [param('std::string', 'arg0')])
## channel.h: std::string ns3::Channel::GetName() [member function]
cls.add_method('GetName', 'std::string', [])
## channel.h: uint32_t ns3::Channel::GetNDevices() const [member function]
cls.add_method('GetNDevices', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True)
## channel.h: ns3::Ptr<ns3::NetDevice> ns3::Channel::GetDevice(uint32_t i) const [member function]
cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_pure_virtual=True, is_const=True, is_virtual=True)
return
def register_Ns3EthernetHeader_methods(root_module, cls):
## ethernet-header.h: ns3::EthernetHeader::EthernetHeader(bool hasPreamble) [constructor]
cls.add_constructor([param('bool', 'hasPreamble')], visibility='public')
@@ -1256,8 +1256,8 @@ def register_Ns3SimpleNetDevice_methods(root_module, cls):
cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True)
## simple-net-device.h: bool ns3::SimpleNetDevice::NeedsArp() const [member function]
cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True)
## simple-net-device.h: void ns3::SimpleNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'cb')], is_virtual=True)
## simple-net-device.h: void ns3::SimpleNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::empty, ns3::empty >', 'cb')], is_virtual=True)
## simple-net-device.h: void ns3::SimpleNetDevice::DoDispose() [member function]
cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True)
return

View File

@@ -131,8 +131,8 @@ def register_Ns3PointToPointNetDevice_methods(root_module, cls):
cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True)
## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::NeedsArp() const [member function]
cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True)
## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'cb')], is_virtual=True)
## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::empty, ns3::empty >', 'cb')], is_virtual=True)
## point-to-point-net-device.h: void ns3::PointToPointNetDevice::DoDispose() [member function]
cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True)
return

View File

@@ -1075,8 +1075,8 @@ def register_Ns3WifiNetDevice_methods(root_module, cls):
cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True)
## wifi-net-device.h: bool ns3::WifiNetDevice::NeedsArp() const [member function]
cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True)
## wifi-net-device.h: void ns3::WifiNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType >', 'cb')], is_virtual=True)
## wifi-net-device.h: void ns3::WifiNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty> cb) [member function]
cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet >, unsigned short, ns3::Address const&, ns3::empty, ns3::empty >', 'cb')], is_virtual=True)
## wifi-net-device.h: void ns3::WifiNetDevice::DoDispose() [member function]
cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True)
return