bindings/python/ns3_module_node.py
changeset 3474 dac9146297c8
parent 3468 0bb5275704fc
child 3480 a920df6b9f02
equal deleted inserted replaced
3473:6bce86ea4778 3474:dac9146297c8
    71     module.add_class('UdpSocket', parent=root_module['ns3::Socket'])
    71     module.add_class('UdpSocket', parent=root_module['ns3::Socket'])
    72     ## net-device.h: ns3::NetDevice [class]
    72     ## net-device.h: ns3::NetDevice [class]
    73     module.add_class('NetDevice', parent=root_module['ns3::Object'])
    73     module.add_class('NetDevice', parent=root_module['ns3::Object'])
    74     ## net-device.h: ns3::NetDevice::PacketType [enumeration]
    74     ## net-device.h: ns3::NetDevice::PacketType [enumeration]
    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     ## drop-tail-queue.h: ns3::DropTailQueue [class]
       
    77     module.add_class('DropTailQueue', parent=root_module['ns3::Queue'])
    76     ## address.h: ns3::AddressValue [class]
    78     ## address.h: ns3::AddressValue [class]
    77     module.add_class('AddressValue', parent=root_module['ns3::AttributeValue'])
    79     module.add_class('AddressValue', parent=root_module['ns3::AttributeValue'])
    78     ## node.h: ns3::Node [class]
    80     ## node.h: ns3::Node [class]
    79     module.add_class('Node', parent=root_module['ns3::Object'])
    81     module.add_class('Node', parent=root_module['ns3::Object'])
    80     ## channel.h: ns3::Channel [class]
    82     ## channel.h: ns3::Channel [class]
    87     module.add_class('SocketIpTtlTag', parent=root_module['ns3::Tag'])
    89     module.add_class('SocketIpTtlTag', parent=root_module['ns3::Tag'])
    88     ## ipv4.h: ns3::Ipv4 [class]
    90     ## ipv4.h: ns3::Ipv4 [class]
    89     module.add_class('Ipv4', parent=root_module['ns3::Object'])
    91     module.add_class('Ipv4', parent=root_module['ns3::Object'])
    90     ## socket-factory.h: ns3::SocketFactory [class]
    92     ## socket-factory.h: ns3::SocketFactory [class]
    91     module.add_class('SocketFactory', parent=root_module['ns3::Object'])
    93     module.add_class('SocketFactory', parent=root_module['ns3::Object'])
    92     ## drop-tail-queue.h: ns3::DropTailQueue [class]
       
    93     module.add_class('DropTailQueue', parent=root_module['ns3::Queue'])
       
    94     ## ethernet-trailer.h: ns3::EthernetTrailer [class]
    94     ## ethernet-trailer.h: ns3::EthernetTrailer [class]
    95     module.add_class('EthernetTrailer', parent=root_module['ns3::Trailer'])
    95     module.add_class('EthernetTrailer', parent=root_module['ns3::Trailer'])
       
    96     ## simple-channel.h: ns3::SimpleChannel [class]
       
    97     module.add_class('SimpleChannel', parent=root_module['ns3::Channel'])
    96     ## llc-snap-header.h: ns3::LlcSnapHeader [class]
    98     ## llc-snap-header.h: ns3::LlcSnapHeader [class]
    97     module.add_class('LlcSnapHeader', parent=root_module['ns3::Header'])
    99     module.add_class('LlcSnapHeader', parent=root_module['ns3::Header'])
    98     ## udp-socket-factory.h: ns3::UdpSocketFactory [class]
   100     ## udp-socket-factory.h: ns3::UdpSocketFactory [class]
    99     module.add_class('UdpSocketFactory', parent=root_module['ns3::SocketFactory'])
   101     module.add_class('UdpSocketFactory', parent=root_module['ns3::SocketFactory'])
   100     ## simple-net-device.h: ns3::SimpleNetDevice [class]
   102     ## simple-net-device.h: ns3::SimpleNetDevice [class]
   101     module.add_class('SimpleNetDevice', parent=root_module['ns3::NetDevice'])
   103     module.add_class('SimpleNetDevice', parent=root_module['ns3::NetDevice'])
   102     ## simple-channel.h: ns3::SimpleChannel [class]
       
   103     module.add_class('SimpleChannel', parent=root_module['ns3::Channel'])
       
   104     ## tcp-socket-factory.h: ns3::TcpSocketFactory [class]
   104     ## tcp-socket-factory.h: ns3::TcpSocketFactory [class]
   105     module.add_class('TcpSocketFactory', parent=root_module['ns3::SocketFactory'])
   105     module.add_class('TcpSocketFactory', parent=root_module['ns3::SocketFactory'])
   106     ## packet-socket-factory.h: ns3::PacketSocketFactory [class]
   106     ## packet-socket-factory.h: ns3::PacketSocketFactory [class]
   107     module.add_class('PacketSocketFactory', parent=root_module['ns3::SocketFactory'])
   107     module.add_class('PacketSocketFactory', parent=root_module['ns3::SocketFactory'])
   108     
   108     
   171     register_Ns3Queue_methods(root_module, root_module['ns3::Queue'])
   171     register_Ns3Queue_methods(root_module, root_module['ns3::Queue'])
   172     register_Ns3Socket_methods(root_module, root_module['ns3::Socket'])
   172     register_Ns3Socket_methods(root_module, root_module['ns3::Socket'])
   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_Ns3DropTailQueue_methods(root_module, root_module['ns3::DropTailQueue'])
   176     register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
   177     register_Ns3AddressValue_methods(root_module, root_module['ns3::AddressValue'])
   177     register_Ns3Node_methods(root_module, root_module['ns3::Node'])
   178     register_Ns3Node_methods(root_module, root_module['ns3::Node'])
   178     register_Ns3Channel_methods(root_module, root_module['ns3::Channel'])
   179     register_Ns3Channel_methods(root_module, root_module['ns3::Channel'])
   179     register_Ns3TcpSocket_methods(root_module, root_module['ns3::TcpSocket'])
   180     register_Ns3TcpSocket_methods(root_module, root_module['ns3::TcpSocket'])
   180     register_Ns3EthernetHeader_methods(root_module, root_module['ns3::EthernetHeader'])
   181     register_Ns3EthernetHeader_methods(root_module, root_module['ns3::EthernetHeader'])
   181     register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
   182     register_Ns3SocketIpTtlTag_methods(root_module, root_module['ns3::SocketIpTtlTag'])
   182     register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4'])
   183     register_Ns3Ipv4_methods(root_module, root_module['ns3::Ipv4'])
   183     register_Ns3SocketFactory_methods(root_module, root_module['ns3::SocketFactory'])
   184     register_Ns3SocketFactory_methods(root_module, root_module['ns3::SocketFactory'])
   184     register_Ns3DropTailQueue_methods(root_module, root_module['ns3::DropTailQueue'])
       
   185     register_Ns3EthernetTrailer_methods(root_module, root_module['ns3::EthernetTrailer'])
   185     register_Ns3EthernetTrailer_methods(root_module, root_module['ns3::EthernetTrailer'])
       
   186     register_Ns3SimpleChannel_methods(root_module, root_module['ns3::SimpleChannel'])
   186     register_Ns3LlcSnapHeader_methods(root_module, root_module['ns3::LlcSnapHeader'])
   187     register_Ns3LlcSnapHeader_methods(root_module, root_module['ns3::LlcSnapHeader'])
   187     register_Ns3UdpSocketFactory_methods(root_module, root_module['ns3::UdpSocketFactory'])
   188     register_Ns3UdpSocketFactory_methods(root_module, root_module['ns3::UdpSocketFactory'])
   188     register_Ns3SimpleNetDevice_methods(root_module, root_module['ns3::SimpleNetDevice'])
   189     register_Ns3SimpleNetDevice_methods(root_module, root_module['ns3::SimpleNetDevice'])
   189     register_Ns3SimpleChannel_methods(root_module, root_module['ns3::SimpleChannel'])
       
   190     register_Ns3TcpSocketFactory_methods(root_module, root_module['ns3::TcpSocketFactory'])
   190     register_Ns3TcpSocketFactory_methods(root_module, root_module['ns3::TcpSocketFactory'])
   191     register_Ns3PacketSocketFactory_methods(root_module, root_module['ns3::PacketSocketFactory'])
   191     register_Ns3PacketSocketFactory_methods(root_module, root_module['ns3::PacketSocketFactory'])
   192     return
   192     return
   193 
   193 
   194 def register_Ns3NodeList_methods(root_module, cls):
   194 def register_Ns3NodeList_methods(root_module, cls):
  1570                    [], 
  1570                    [], 
  1571                    is_const=True, is_virtual=True)
  1571                    is_const=True, is_virtual=True)
  1572     cls.add_constructor([])
  1572     cls.add_constructor([])
  1573     return
  1573     return
  1574 
  1574 
       
  1575 def register_Ns3DropTailQueue_methods(root_module, cls):
       
  1576     ## drop-tail-queue.h: static ns3::TypeId ns3::DropTailQueue::GetTypeId() [member function]
       
  1577     cls.add_method('GetTypeId', 
       
  1578                    'ns3::TypeId', 
       
  1579                    [], 
       
  1580                    is_static=True)
       
  1581     ## drop-tail-queue.h: ns3::DropTailQueue::DropTailQueue() [constructor]
       
  1582     cls.add_constructor([])
       
  1583     ## drop-tail-queue.h: bool ns3::DropTailQueue::DoEnqueue(ns3::Ptr<ns3::Packet> p) [member function]
       
  1584     cls.add_method('DoEnqueue', 
       
  1585                    'bool', 
       
  1586                    [param('ns3::Ptr< ns3::Packet >', 'p')], 
       
  1587                    visibility='private', is_virtual=True)
       
  1588     ## drop-tail-queue.h: ns3::Ptr<ns3::Packet> ns3::DropTailQueue::DoDequeue() [member function]
       
  1589     cls.add_method('DoDequeue', 
       
  1590                    'ns3::Ptr< ns3::Packet >', 
       
  1591                    [], 
       
  1592                    visibility='private', is_virtual=True)
       
  1593     ## drop-tail-queue.h: ns3::Ptr<ns3::Packet> ns3::DropTailQueue::DoPeek() const [member function]
       
  1594     cls.add_method('DoPeek', 
       
  1595                    'ns3::Ptr< ns3::Packet >', 
       
  1596                    [], 
       
  1597                    is_const=True, visibility='private', is_virtual=True)
       
  1598     return
       
  1599 
  1575 def register_Ns3AddressValue_methods(root_module, cls):
  1600 def register_Ns3AddressValue_methods(root_module, cls):
  1576     ## address.h: ns3::AddressValue::AddressValue() [constructor]
  1601     ## address.h: ns3::AddressValue::AddressValue() [constructor]
  1577     cls.add_constructor([])
  1602     cls.add_constructor([])
  1578     ## address.h: ns3::AddressValue::AddressValue(ns3::Address const & value) [constructor]
  1603     ## address.h: ns3::AddressValue::AddressValue(ns3::Address const & value) [constructor]
  1579     cls.add_constructor([param('ns3::Address&', 'value', is_const=True)])
  1604     cls.add_constructor([param('ns3::Address&', 'value', is_const=True)])
  2145                    'ns3::Ptr< ns3::Socket >', 
  2170                    'ns3::Ptr< ns3::Socket >', 
  2146                    [], 
  2171                    [], 
  2147                    is_pure_virtual=True, is_virtual=True)
  2172                    is_pure_virtual=True, is_virtual=True)
  2148     return
  2173     return
  2149 
  2174 
  2150 def register_Ns3DropTailQueue_methods(root_module, cls):
       
  2151     ## drop-tail-queue.h: static ns3::TypeId ns3::DropTailQueue::GetTypeId() [member function]
       
  2152     cls.add_method('GetTypeId', 
       
  2153                    'ns3::TypeId', 
       
  2154                    [], 
       
  2155                    is_static=True)
       
  2156     ## drop-tail-queue.h: ns3::DropTailQueue::DropTailQueue() [constructor]
       
  2157     cls.add_constructor([])
       
  2158     ## drop-tail-queue.h: bool ns3::DropTailQueue::DoEnqueue(ns3::Ptr<ns3::Packet> p) [member function]
       
  2159     cls.add_method('DoEnqueue', 
       
  2160                    'bool', 
       
  2161                    [param('ns3::Ptr< ns3::Packet >', 'p')], 
       
  2162                    visibility='private', is_virtual=True)
       
  2163     ## drop-tail-queue.h: ns3::Ptr<ns3::Packet> ns3::DropTailQueue::DoDequeue() [member function]
       
  2164     cls.add_method('DoDequeue', 
       
  2165                    'ns3::Ptr< ns3::Packet >', 
       
  2166                    [], 
       
  2167                    visibility='private', is_virtual=True)
       
  2168     ## drop-tail-queue.h: ns3::Ptr<ns3::Packet> ns3::DropTailQueue::DoPeek() const [member function]
       
  2169     cls.add_method('DoPeek', 
       
  2170                    'ns3::Ptr< ns3::Packet >', 
       
  2171                    [], 
       
  2172                    is_const=True, visibility='private', is_virtual=True)
       
  2173     return
       
  2174 
       
  2175 def register_Ns3EthernetTrailer_methods(root_module, cls):
  2175 def register_Ns3EthernetTrailer_methods(root_module, cls):
  2176     ## ethernet-trailer.h: ns3::EthernetTrailer::EthernetTrailer() [constructor]
  2176     ## ethernet-trailer.h: ns3::EthernetTrailer::EthernetTrailer() [constructor]
  2177     cls.add_constructor([])
  2177     cls.add_constructor([])
  2178     ## ethernet-trailer.h: static void ns3::EthernetTrailer::EnableFcs(bool enable) [member function]
  2178     ## ethernet-trailer.h: static void ns3::EthernetTrailer::EnableFcs(bool enable) [member function]
  2179     cls.add_method('EnableFcs', 
  2179     cls.add_method('EnableFcs', 
  2230     ## ethernet-trailer.h: uint32_t ns3::EthernetTrailer::Deserialize(ns3::Buffer::Iterator end) [member function]
  2230     ## ethernet-trailer.h: uint32_t ns3::EthernetTrailer::Deserialize(ns3::Buffer::Iterator end) [member function]
  2231     cls.add_method('Deserialize', 
  2231     cls.add_method('Deserialize', 
  2232                    'uint32_t', 
  2232                    'uint32_t', 
  2233                    [param('ns3::Buffer::Iterator', 'end')], 
  2233                    [param('ns3::Buffer::Iterator', 'end')], 
  2234                    is_virtual=True)
  2234                    is_virtual=True)
       
  2235     return
       
  2236 
       
  2237 def register_Ns3SimpleChannel_methods(root_module, cls):
       
  2238     ## simple-channel.h: static ns3::TypeId ns3::SimpleChannel::GetTypeId() [member function]
       
  2239     cls.add_method('GetTypeId', 
       
  2240                    'ns3::TypeId', 
       
  2241                    [], 
       
  2242                    is_static=True)
       
  2243     ## simple-channel.h: ns3::SimpleChannel::SimpleChannel() [constructor]
       
  2244     cls.add_constructor([])
       
  2245     ## simple-channel.h: void ns3::SimpleChannel::Send(ns3::Ptr<ns3::Packet> p, uint16_t protocol, ns3::Mac48Address to, ns3::Mac48Address from, ns3::Ptr<ns3::SimpleNetDevice> sender) [member function]
       
  2246     cls.add_method('Send', 
       
  2247                    'void', 
       
  2248                    [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'sender')])
       
  2249     ## simple-channel.h: void ns3::SimpleChannel::Add(ns3::Ptr<ns3::SimpleNetDevice> device) [member function]
       
  2250     cls.add_method('Add', 
       
  2251                    'void', 
       
  2252                    [param('ns3::Ptr< ns3::SimpleNetDevice >', 'device')])
       
  2253     ## simple-channel.h: uint32_t ns3::SimpleChannel::GetNDevices() const [member function]
       
  2254     cls.add_method('GetNDevices', 
       
  2255                    'uint32_t', 
       
  2256                    [], 
       
  2257                    is_const=True, is_virtual=True)
       
  2258     ## simple-channel.h: ns3::Ptr<ns3::NetDevice> ns3::SimpleChannel::GetDevice(uint32_t i) const [member function]
       
  2259     cls.add_method('GetDevice', 
       
  2260                    'ns3::Ptr< ns3::NetDevice >', 
       
  2261                    [param('uint32_t', 'i')], 
       
  2262                    is_const=True, is_virtual=True)
  2235     return
  2263     return
  2236 
  2264 
  2237 def register_Ns3LlcSnapHeader_methods(root_module, cls):
  2265 def register_Ns3LlcSnapHeader_methods(root_module, cls):
  2238     ## llc-snap-header.h: ns3::LlcSnapHeader::LlcSnapHeader() [constructor]
  2266     ## llc-snap-header.h: ns3::LlcSnapHeader::LlcSnapHeader() [constructor]
  2239     cls.add_constructor([])
  2267     cls.add_constructor([])
  2419     ## simple-net-device.h: void ns3::SimpleNetDevice::DoDispose() [member function]
  2447     ## simple-net-device.h: void ns3::SimpleNetDevice::DoDispose() [member function]
  2420     cls.add_method('DoDispose', 
  2448     cls.add_method('DoDispose', 
  2421                    'void', 
  2449                    'void', 
  2422                    [], 
  2450                    [], 
  2423                    visibility='protected', is_virtual=True)
  2451                    visibility='protected', is_virtual=True)
  2424     return
       
  2425 
       
  2426 def register_Ns3SimpleChannel_methods(root_module, cls):
       
  2427     ## simple-channel.h: static ns3::TypeId ns3::SimpleChannel::GetTypeId() [member function]
       
  2428     cls.add_method('GetTypeId', 
       
  2429                    'ns3::TypeId', 
       
  2430                    [], 
       
  2431                    is_static=True)
       
  2432     ## simple-channel.h: ns3::SimpleChannel::SimpleChannel() [constructor]
       
  2433     cls.add_constructor([])
       
  2434     ## simple-channel.h: void ns3::SimpleChannel::Send(ns3::Ptr<ns3::Packet> p, uint16_t protocol, ns3::Mac48Address to, ns3::Mac48Address from, ns3::Ptr<ns3::SimpleNetDevice> sender) [member function]
       
  2435     cls.add_method('Send', 
       
  2436                    'void', 
       
  2437                    [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'to'), param('ns3::Mac48Address', 'from'), param('ns3::Ptr< ns3::SimpleNetDevice >', 'sender')])
       
  2438     ## simple-channel.h: void ns3::SimpleChannel::Add(ns3::Ptr<ns3::SimpleNetDevice> device) [member function]
       
  2439     cls.add_method('Add', 
       
  2440                    'void', 
       
  2441                    [param('ns3::Ptr< ns3::SimpleNetDevice >', 'device')])
       
  2442     ## simple-channel.h: uint32_t ns3::SimpleChannel::GetNDevices() const [member function]
       
  2443     cls.add_method('GetNDevices', 
       
  2444                    'uint32_t', 
       
  2445                    [], 
       
  2446                    is_const=True, is_virtual=True)
       
  2447     ## simple-channel.h: ns3::Ptr<ns3::NetDevice> ns3::SimpleChannel::GetDevice(uint32_t i) const [member function]
       
  2448     cls.add_method('GetDevice', 
       
  2449                    'ns3::Ptr< ns3::NetDevice >', 
       
  2450                    [param('uint32_t', 'i')], 
       
  2451                    is_const=True, is_virtual=True)
       
  2452     return
  2452     return
  2453 
  2453 
  2454 def register_Ns3TcpSocketFactory_methods(root_module, cls):
  2454 def register_Ns3TcpSocketFactory_methods(root_module, cls):
  2455     ## tcp-socket-factory.h: static ns3::TypeId ns3::TcpSocketFactory::GetTypeId() [member function]
  2455     ## tcp-socket-factory.h: static ns3::TypeId ns3::TcpSocketFactory::GetTypeId() [member function]
  2456     cls.add_method('GetTypeId', 
  2456     cls.add_method('GetTypeId',