bindings/python/ns3_module_common.py
changeset 3755 c73866625b44
parent 3743 d0cf214d050c
child 3773 dab0c18b39a0
equal deleted inserted replaced
3754:ee45d2d71f01 3755:c73866625b44
    11     module.add_class('Iterator', outer_class=root_module['ns3::Buffer'])
    11     module.add_class('Iterator', outer_class=root_module['ns3::Buffer'])
    12     ## data-rate.h: ns3::DataRate [class]
    12     ## data-rate.h: ns3::DataRate [class]
    13     module.add_class('DataRate')
    13     module.add_class('DataRate')
    14     ## packet.h: ns3::Packet [class]
    14     ## packet.h: ns3::Packet [class]
    15     module.add_class('Packet', memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
    15     module.add_class('Packet', memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount'))
       
    16     ## packet-metadata.h: ns3::PacketMetadata [class]
       
    17     module.add_class('PacketMetadata')
       
    18     ## packet-metadata.h: ns3::PacketMetadata::Item [struct]
       
    19     module.add_class('Item', outer_class=root_module['ns3::PacketMetadata'])
       
    20     ## packet-metadata.h: ns3::PacketMetadata::Item [enumeration]
       
    21     module.add_enum('', ['PAYLOAD', 'HEADER', 'TRAILER'], outer_class=root_module['ns3::PacketMetadata::Item'])
       
    22     ## packet-metadata.h: ns3::PacketMetadata::ItemIterator [class]
       
    23     module.add_class('ItemIterator', outer_class=root_module['ns3::PacketMetadata'])
    16     ## tag.h: ns3::Tag [class]
    24     ## tag.h: ns3::Tag [class]
    17     module.add_class('Tag', parent=root_module['ns3::ObjectBase'])
    25     module.add_class('Tag', parent=root_module['ns3::ObjectBase'])
    18     ## tag-buffer.h: ns3::TagBuffer [class]
    26     ## tag-buffer.h: ns3::TagBuffer [class]
    19     module.add_class('TagBuffer')
    27     module.add_class('TagBuffer')
    20     ## packet.h: ns3::TagIterator [class]
    28     ## packet.h: ns3::TagIterator [class]
    89 def register_methods(root_module):
    97 def register_methods(root_module):
    90     register_Ns3Buffer_methods(root_module, root_module['ns3::Buffer'])
    98     register_Ns3Buffer_methods(root_module, root_module['ns3::Buffer'])
    91     register_Ns3BufferIterator_methods(root_module, root_module['ns3::Buffer::Iterator'])
    99     register_Ns3BufferIterator_methods(root_module, root_module['ns3::Buffer::Iterator'])
    92     register_Ns3DataRate_methods(root_module, root_module['ns3::DataRate'])
   100     register_Ns3DataRate_methods(root_module, root_module['ns3::DataRate'])
    93     register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
   101     register_Ns3Packet_methods(root_module, root_module['ns3::Packet'])
       
   102     register_Ns3PacketMetadata_methods(root_module, root_module['ns3::PacketMetadata'])
       
   103     register_Ns3PacketMetadataItem_methods(root_module, root_module['ns3::PacketMetadata::Item'])
       
   104     register_Ns3PacketMetadataItemIterator_methods(root_module, root_module['ns3::PacketMetadata::ItemIterator'])
    94     register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
   105     register_Ns3Tag_methods(root_module, root_module['ns3::Tag'])
    95     register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
   106     register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer'])
    96     register_Ns3TagIterator_methods(root_module, root_module['ns3::TagIterator'])
   107     register_Ns3TagIterator_methods(root_module, root_module['ns3::TagIterator'])
    97     register_Ns3TagIteratorItem_methods(root_module, root_module['ns3::TagIterator::Item'])
   108     register_Ns3TagIteratorItem_methods(root_module, root_module['ns3::TagIterator::Item'])
    98     register_Ns3TagList_methods(root_module, root_module['ns3::TagList'])
   109     register_Ns3TagList_methods(root_module, root_module['ns3::TagList'])
   487                    'ns3::Buffer', 
   498                    'ns3::Buffer', 
   488                    [], 
   499                    [], 
   489                    is_const=True)
   500                    is_const=True)
   490     return
   501     return
   491 
   502 
       
   503 def register_Ns3PacketMetadata_methods(root_module, cls):
       
   504     ## packet-metadata.h: static void ns3::PacketMetadata::Enable() [member function]
       
   505     cls.add_method('Enable', 
       
   506                    'void', 
       
   507                    [], 
       
   508                    is_static=True)
       
   509     ## packet-metadata.h: static void ns3::PacketMetadata::EnableChecking() [member function]
       
   510     cls.add_method('EnableChecking', 
       
   511                    'void', 
       
   512                    [], 
       
   513                    is_static=True)
       
   514     ## packet-metadata.h: ns3::PacketMetadata::PacketMetadata(uint32_t uid, uint32_t size) [constructor]
       
   515     cls.add_constructor([param('uint32_t', 'uid'), param('uint32_t', 'size')])
       
   516     ## packet-metadata.h: ns3::PacketMetadata::PacketMetadata(ns3::PacketMetadata const & o) [copy constructor]
       
   517     cls.add_constructor([param('ns3::PacketMetadata const &', 'o')])
       
   518     ## packet-metadata.h: void ns3::PacketMetadata::AddHeader(ns3::Header const & header, uint32_t size) [member function]
       
   519     cls.add_method('AddHeader', 
       
   520                    'void', 
       
   521                    [param('ns3::Header const &', 'header'), param('uint32_t', 'size')])
       
   522     ## packet-metadata.h: void ns3::PacketMetadata::RemoveHeader(ns3::Header const & header, uint32_t size) [member function]
       
   523     cls.add_method('RemoveHeader', 
       
   524                    'void', 
       
   525                    [param('ns3::Header const &', 'header'), param('uint32_t', 'size')])
       
   526     ## packet-metadata.h: void ns3::PacketMetadata::AddTrailer(ns3::Trailer const & trailer, uint32_t size) [member function]
       
   527     cls.add_method('AddTrailer', 
       
   528                    'void', 
       
   529                    [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')])
       
   530     ## packet-metadata.h: void ns3::PacketMetadata::RemoveTrailer(ns3::Trailer const & trailer, uint32_t size) [member function]
       
   531     cls.add_method('RemoveTrailer', 
       
   532                    'void', 
       
   533                    [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')])
       
   534     ## packet-metadata.h: ns3::PacketMetadata ns3::PacketMetadata::CreateFragment(uint32_t start, uint32_t end) const [member function]
       
   535     cls.add_method('CreateFragment', 
       
   536                    'ns3::PacketMetadata', 
       
   537                    [param('uint32_t', 'start'), param('uint32_t', 'end')], 
       
   538                    is_const=True)
       
   539     ## packet-metadata.h: void ns3::PacketMetadata::AddAtEnd(ns3::PacketMetadata const & o) [member function]
       
   540     cls.add_method('AddAtEnd', 
       
   541                    'void', 
       
   542                    [param('ns3::PacketMetadata const &', 'o')])
       
   543     ## packet-metadata.h: void ns3::PacketMetadata::AddPaddingAtEnd(uint32_t end) [member function]
       
   544     cls.add_method('AddPaddingAtEnd', 
       
   545                    'void', 
       
   546                    [param('uint32_t', 'end')])
       
   547     ## packet-metadata.h: void ns3::PacketMetadata::RemoveAtStart(uint32_t start) [member function]
       
   548     cls.add_method('RemoveAtStart', 
       
   549                    'void', 
       
   550                    [param('uint32_t', 'start')])
       
   551     ## packet-metadata.h: void ns3::PacketMetadata::RemoveAtEnd(uint32_t end) [member function]
       
   552     cls.add_method('RemoveAtEnd', 
       
   553                    'void', 
       
   554                    [param('uint32_t', 'end')])
       
   555     ## packet-metadata.h: uint32_t ns3::PacketMetadata::GetUid() const [member function]
       
   556     cls.add_method('GetUid', 
       
   557                    'uint32_t', 
       
   558                    [], 
       
   559                    is_const=True)
       
   560     ## packet-metadata.h: uint32_t ns3::PacketMetadata::GetSerializedSize() const [member function]
       
   561     cls.add_method('GetSerializedSize', 
       
   562                    'uint32_t', 
       
   563                    [], 
       
   564                    is_const=True)
       
   565     ## packet-metadata.h: void ns3::PacketMetadata::Serialize(ns3::Buffer::Iterator i, uint32_t size) const [member function]
       
   566     cls.add_method('Serialize', 
       
   567                    'void', 
       
   568                    [param('ns3::Buffer::Iterator', 'i'), param('uint32_t', 'size')], 
       
   569                    is_const=True)
       
   570     ## packet-metadata.h: uint32_t ns3::PacketMetadata::Deserialize(ns3::Buffer::Iterator i) [member function]
       
   571     cls.add_method('Deserialize', 
       
   572                    'uint32_t', 
       
   573                    [param('ns3::Buffer::Iterator', 'i')])
       
   574     ## packet-metadata.h: ns3::PacketMetadata::ItemIterator ns3::PacketMetadata::BeginItem(ns3::Buffer buffer) const [member function]
       
   575     cls.add_method('BeginItem', 
       
   576                    'ns3::PacketMetadata::ItemIterator', 
       
   577                    [param('ns3::Buffer', 'buffer')], 
       
   578                    is_const=True)
       
   579     return
       
   580 
       
   581 def register_Ns3PacketMetadataItem_methods(root_module, cls):
       
   582     ## packet-metadata.h: ns3::PacketMetadata::Item::isFragment [variable]
       
   583     cls.add_instance_attribute('isFragment', 'bool', is_const=False)
       
   584     ## packet-metadata.h: ns3::PacketMetadata::Item::tid [variable]
       
   585     cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False)
       
   586     ## packet-metadata.h: ns3::PacketMetadata::Item::currentSize [variable]
       
   587     cls.add_instance_attribute('currentSize', 'uint32_t', is_const=False)
       
   588     ## packet-metadata.h: ns3::PacketMetadata::Item::currentTrimedFromStart [variable]
       
   589     cls.add_instance_attribute('currentTrimedFromStart', 'uint32_t', is_const=False)
       
   590     ## packet-metadata.h: ns3::PacketMetadata::Item::currentTrimedFromEnd [variable]
       
   591     cls.add_instance_attribute('currentTrimedFromEnd', 'uint32_t', is_const=False)
       
   592     ## packet-metadata.h: ns3::PacketMetadata::Item::current [variable]
       
   593     cls.add_instance_attribute('current', 'ns3::Buffer::Iterator', is_const=False)
       
   594     ## packet-metadata.h: ns3::PacketMetadata::Item::Item(ns3::PacketMetadata::Item const & arg0) [copy constructor]
       
   595     cls.add_constructor([param('ns3::PacketMetadata::Item const &', 'arg0')])
       
   596     ## packet-metadata.h: ns3::PacketMetadata::Item::Item() [constructor]
       
   597     cls.add_constructor([])
       
   598     return
       
   599 
       
   600 def register_Ns3PacketMetadataItemIterator_methods(root_module, cls):
       
   601     ## packet-metadata.h: ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata::ItemIterator const & arg0) [copy constructor]
       
   602     cls.add_constructor([param('ns3::PacketMetadata::ItemIterator const &', 'arg0')])
       
   603     ## packet-metadata.h: ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata const * metadata, ns3::Buffer buffer) [constructor]
       
   604     cls.add_constructor([param('ns3::PacketMetadata const *', 'metadata'), param('ns3::Buffer', 'buffer')])
       
   605     ## packet-metadata.h: bool ns3::PacketMetadata::ItemIterator::HasNext() const [member function]
       
   606     cls.add_method('HasNext', 
       
   607                    'bool', 
       
   608                    [], 
       
   609                    is_const=True)
       
   610     ## packet-metadata.h: ns3::PacketMetadata::Item ns3::PacketMetadata::ItemIterator::Next() [member function]
       
   611     cls.add_method('Next', 
       
   612                    'ns3::PacketMetadata::Item', 
       
   613                    [])
       
   614     return
       
   615 
   492 def register_Ns3Tag_methods(root_module, cls):
   616 def register_Ns3Tag_methods(root_module, cls):
   493     ## tag.h: ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor]
   617     ## tag.h: ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor]
   494     cls.add_constructor([param('ns3::Tag const &', 'arg0')])
   618     cls.add_constructor([param('ns3::Tag const &', 'arg0')])
   495     ## tag.h: ns3::Tag::Tag() [constructor]
   619     ## tag.h: ns3::Tag::Tag() [constructor]
   496     cls.add_constructor([])
   620     cls.add_constructor([])