bindings/python/ns3_module_node.py
changeset 3460 99698bc858e8
parent 3457 2ff6f05b9467
child 3468 0bb5275704fc
equal deleted inserted replaced
3459:a67df503c7bc 3460:99698bc858e8
    75     module.add_enum('PacketType', ['PACKET_HOST', 'PACKET_BROADCAST', 'PACKET_MULTICAST', 'PACKET_OTHERHOST'], outer_class=root_module['ns3::NetDevice'])
    75     module.add_enum('PacketType', ['PACKET_HOST', 'PACKET_BROADCAST', 'PACKET_MULTICAST', 'PACKET_OTHERHOST'], outer_class=root_module['ns3::NetDevice'])
    76     ## address.h: ns3::AddressValue [class]
    76     ## address.h: ns3::AddressValue [class]
    77     module.add_class('AddressValue', parent=root_module['ns3::AttributeValue'])
    77     module.add_class('AddressValue', parent=root_module['ns3::AttributeValue'])
    78     ## node.h: ns3::Node [class]
    78     ## node.h: ns3::Node [class]
    79     module.add_class('Node', parent=root_module['ns3::Object'])
    79     module.add_class('Node', parent=root_module['ns3::Object'])
       
    80     ## channel.h: ns3::Channel [class]
       
    81     module.add_class('Channel', parent=root_module['ns3::Object'])
    80     ## tcp-socket.h: ns3::TcpSocket [class]
    82     ## tcp-socket.h: ns3::TcpSocket [class]
    81     module.add_class('TcpSocket', parent=root_module['ns3::Socket'])
    83     module.add_class('TcpSocket', parent=root_module['ns3::Socket'])
    82     ## channel.h: ns3::Channel [class]
       
    83     module.add_class('Channel', parent=root_module['ns3::Object'])
       
    84     ## ethernet-header.h: ns3::EthernetHeader [class]
    84     ## ethernet-header.h: ns3::EthernetHeader [class]
    85     module.add_class('EthernetHeader', parent=root_module['ns3::Header'])
    85     module.add_class('EthernetHeader', parent=root_module['ns3::Header'])
    86     ## socket.h: ns3::SocketIpTtlTag [class]
    86     ## socket.h: ns3::SocketIpTtlTag [class]
    87     module.add_class('SocketIpTtlTag', parent=root_module['ns3::Tag'])
    87     module.add_class('SocketIpTtlTag', parent=root_module['ns3::Tag'])
    88     ## ipv4.h: ns3::Ipv4 [class]
    88     ## ipv4.h: ns3::Ipv4 [class]
   173     register_Ns3Ipv4Header_methods(root_module, root_module['ns3::Ipv4Header'])
   173     register_Ns3Ipv4Header_methods(root_module, root_module['ns3::Ipv4Header'])
   174     register_Ns3UdpSocket_methods(root_module, root_module['ns3::UdpSocket'])
   174     register_Ns3UdpSocket_methods(root_module, root_module['ns3::UdpSocket'])
   175     register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice'])
   175     register_Ns3NetDevice_methods(root_module, root_module['ns3::NetDevice'])
   176     register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
   176     register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
   177     register_Ns3Node_methods(root_module, root_module['ns3::Node'])
   177     register_Ns3Node_methods(root_module, root_module['ns3::Node'])
       
   178     register_Ns3Channel_methods(root_module, root_module['ns3::Channel'])
   178     register_Ns3TcpSocket_methods(root_module, root_module['ns3::TcpSocket'])
   179     register_Ns3TcpSocket_methods(root_module, root_module['ns3::TcpSocket'])
   179     register_Ns3Channel_methods(root_module, root_module['ns3::Channel'])
       
   180     register_Ns3EthernetHeader_methods(root_module, root_module['ns3::EthernetHeader'])
   180     register_Ns3EthernetHeader_methods(root_module, root_module['ns3::EthernetHeader'])
   181     register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
   181     register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
   182     register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4'])
   182     register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4'])
   183     register_Ns3SocketFactory_methods(root_module, root_module['ns3::SocketFactory'])
   183     register_Ns3SocketFactory_methods(root_module, root_module['ns3::SocketFactory'])
   184     register_Ns3DropTailQueue_methods(root_module, root_module['ns3::DropTailQueue'])
   184     register_Ns3DropTailQueue_methods(root_module, root_module['ns3::DropTailQueue'])
   859     cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_pure_virtual=True, is_const=True, is_virtual=True)
   859     cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_pure_virtual=True, is_const=True, is_virtual=True)
   860     ## net-device.h: void ns3::NetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
   860     ## net-device.h: void ns3::NetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
   861     cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_pure_virtual=True, is_virtual=True)
   861     cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_pure_virtual=True, is_virtual=True)
   862     ## net-device.h: bool ns3::NetDevice::NeedsArp() const [member function]
   862     ## net-device.h: bool ns3::NetDevice::NeedsArp() const [member function]
   863     cls.add_method('NeedsArp', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True)
   863     cls.add_method('NeedsArp', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True)
   864     ## 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]
   864     ## 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]
   865     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)
   865     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)
       
   866     ## 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]
       
   867     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)
       
   868     ## net-device.h: bool ns3::NetDevice::SupportsPromiscuous() const [member function]
       
   869     cls.add_method('SupportsPromiscuous', 'bool', [], is_const=True, is_virtual=True)
   866     cls.add_constructor([])
   870     cls.add_constructor([])
   867     return
   871     return
   868 
   872 
   869 def register_Ns3AddressValue_methods(root_module, cls):
   873 def register_Ns3AddressValue_methods(root_module, cls):
   870     ## address.h: ns3::AddressValue::AddressValue() [constructor]
   874     ## address.h: ns3::AddressValue::AddressValue() [constructor]
   906     cls.add_method('GetApplication', 'ns3::Ptr< ns3::Application >', [param('uint32_t', 'index')], is_const=True)
   910     cls.add_method('GetApplication', 'ns3::Ptr< ns3::Application >', [param('uint32_t', 'index')], is_const=True)
   907     ## node.h: ns3::Ptr<ns3::Application> ns3::Node::GetFirstApplication(ns3::TypeId tid) [member function]
   911     ## node.h: ns3::Ptr<ns3::Application> ns3::Node::GetFirstApplication(ns3::TypeId tid) [member function]
   908     cls.add_method('GetFirstApplication', 'ns3::Ptr< ns3::Application >', [param('ns3::TypeId', 'tid')])
   912     cls.add_method('GetFirstApplication', 'ns3::Ptr< ns3::Application >', [param('ns3::TypeId', 'tid')])
   909     ## node.h: uint32_t ns3::Node::GetNApplications() const [member function]
   913     ## node.h: uint32_t ns3::Node::GetNApplications() const [member function]
   910     cls.add_method('GetNApplications', 'uint32_t', [], is_const=True)
   914     cls.add_method('GetNApplications', 'uint32_t', [], is_const=True)
   911     ## 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]
   915     ## 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]
   912     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')])
   916     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')])
   913     ## 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]
   917     ## 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]
   914     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')])
   918     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')])
   915     ## 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]
       
   916     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')])
       
   917     ## 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]
       
   918     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')])
       
   919     ## node.h: void ns3::Node::DoDispose() [member function]
   919     ## node.h: void ns3::Node::DoDispose() [member function]
   920     cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True)
   920     cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True)
   921     ## node.h: void ns3::Node::NotifyDeviceAdded(ns3::Ptr<ns3::NetDevice> device) [member function]
   921     ## node.h: void ns3::Node::NotifyDeviceAdded(ns3::Ptr<ns3::NetDevice> device) [member function]
   922     cls.add_method('NotifyDeviceAdded', 'void', [param('ns3::Ptr< ns3::NetDevice >', 'device')], visibility='private', is_virtual=True)
   922     cls.add_method('NotifyDeviceAdded', 'void', [param('ns3::Ptr< ns3::NetDevice >', 'device')], visibility='private', is_virtual=True)
       
   923     return
       
   924 
       
   925 def register_Ns3Channel_methods(root_module, cls):
       
   926     ## channel.h: static ns3::TypeId ns3::Channel::GetTypeId() [member function]
       
   927     cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True)
       
   928     ## channel.h: ns3::Channel::Channel() [constructor]
       
   929     cls.add_constructor([], visibility='public')
       
   930     ## channel.h: ns3::Channel::Channel(std::string name) [constructor]
       
   931     cls.add_constructor([param('std::string', 'name')], visibility='public')
       
   932     ## channel.h: void ns3::Channel::SetName(std::string arg0) [member function]
       
   933     cls.add_method('SetName', 'void', [param('std::string', 'arg0')])
       
   934     ## channel.h: std::string ns3::Channel::GetName() [member function]
       
   935     cls.add_method('GetName', 'std::string', [])
       
   936     ## channel.h: uint32_t ns3::Channel::GetNDevices() const [member function]
       
   937     cls.add_method('GetNDevices', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True)
       
   938     ## channel.h: ns3::Ptr<ns3::NetDevice> ns3::Channel::GetDevice(uint32_t i) const [member function]
       
   939     cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_pure_virtual=True, is_const=True, is_virtual=True)
   923     return
   940     return
   924 
   941 
   925 def register_Ns3TcpSocket_methods(root_module, cls):
   942 def register_Ns3TcpSocket_methods(root_module, cls):
   926     ## tcp-socket.h: static ns3::TypeId ns3::TcpSocket::GetTypeId() [member function]
   943     ## tcp-socket.h: static ns3::TypeId ns3::TcpSocket::GetTypeId() [member function]
   927     cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True)
   944     cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True)
   965     cls.add_method('GetDelAckTimeout', 'ns3::Time', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
   982     cls.add_method('GetDelAckTimeout', 'ns3::Time', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
   966     ## tcp-socket.h: void ns3::TcpSocket::SetDelAckMaxCount(uint32_t count) [member function]
   983     ## tcp-socket.h: void ns3::TcpSocket::SetDelAckMaxCount(uint32_t count) [member function]
   967     cls.add_method('SetDelAckMaxCount', 'void', [param('uint32_t', 'count')], is_pure_virtual=True, visibility='private', is_virtual=True)
   984     cls.add_method('SetDelAckMaxCount', 'void', [param('uint32_t', 'count')], is_pure_virtual=True, visibility='private', is_virtual=True)
   968     ## tcp-socket.h: uint32_t ns3::TcpSocket::GetDelAckMaxCount() const [member function]
   985     ## tcp-socket.h: uint32_t ns3::TcpSocket::GetDelAckMaxCount() const [member function]
   969     cls.add_method('GetDelAckMaxCount', 'uint32_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
   986     cls.add_method('GetDelAckMaxCount', 'uint32_t', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True)
   970     return
       
   971 
       
   972 def register_Ns3Channel_methods(root_module, cls):
       
   973     ## channel.h: static ns3::TypeId ns3::Channel::GetTypeId() [member function]
       
   974     cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True)
       
   975     ## channel.h: ns3::Channel::Channel() [constructor]
       
   976     cls.add_constructor([], visibility='public')
       
   977     ## channel.h: ns3::Channel::Channel(std::string name) [constructor]
       
   978     cls.add_constructor([param('std::string', 'name')], visibility='public')
       
   979     ## channel.h: void ns3::Channel::SetName(std::string arg0) [member function]
       
   980     cls.add_method('SetName', 'void', [param('std::string', 'arg0')])
       
   981     ## channel.h: std::string ns3::Channel::GetName() [member function]
       
   982     cls.add_method('GetName', 'std::string', [])
       
   983     ## channel.h: uint32_t ns3::Channel::GetNDevices() const [member function]
       
   984     cls.add_method('GetNDevices', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True)
       
   985     ## channel.h: ns3::Ptr<ns3::NetDevice> ns3::Channel::GetDevice(uint32_t i) const [member function]
       
   986     cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_pure_virtual=True, is_const=True, is_virtual=True)
       
   987     return
   987     return
   988 
   988 
   989 def register_Ns3EthernetHeader_methods(root_module, cls):
   989 def register_Ns3EthernetHeader_methods(root_module, cls):
   990     ## ethernet-header.h: ns3::EthernetHeader::EthernetHeader(bool hasPreamble) [constructor]
   990     ## ethernet-header.h: ns3::EthernetHeader::EthernetHeader(bool hasPreamble) [constructor]
   991     cls.add_constructor([param('bool', 'hasPreamble')], visibility='public')
   991     cls.add_constructor([param('bool', 'hasPreamble')], visibility='public')
  1254     cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_const=True, is_virtual=True)
  1254     cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_const=True, is_virtual=True)
  1255     ## simple-net-device.h: void ns3::SimpleNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
  1255     ## simple-net-device.h: void ns3::SimpleNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
  1256     cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True)
  1256     cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True)
  1257     ## simple-net-device.h: bool ns3::SimpleNetDevice::NeedsArp() const [member function]
  1257     ## simple-net-device.h: bool ns3::SimpleNetDevice::NeedsArp() const [member function]
  1258     cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True)
  1258     cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True)
  1259     ## 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]
  1259     ## 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]
  1260     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)
  1260     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)
  1261     ## simple-net-device.h: void ns3::SimpleNetDevice::DoDispose() [member function]
  1261     ## simple-net-device.h: void ns3::SimpleNetDevice::DoDispose() [member function]
  1262     cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True)
  1262     cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True)
  1263     return
  1263     return
  1264 
  1264 
  1265 def register_Ns3SimpleChannel_methods(root_module, cls):
  1265 def register_Ns3SimpleChannel_methods(root_module, cls):