bindings/python/ns3_module_udp_echo.py
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Sat, 04 Jul 2009 08:15:48 +0200
changeset 4654 2eaebe77d66b
parent 4474 19e2b7ff3482
permissions -rw-r--r--
Added tag ns-3.5 for changeset c975274c9707
     1 from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
     2 
     3 def register_types(module):
     4     root_module = module.get_root()
     5     
     6     ## udp-echo-client.h: ns3::UdpEchoClient [class]
     7     module.add_class('UdpEchoClient', parent=root_module['ns3::Application'])
     8     ## udp-echo-server.h: ns3::UdpEchoServer [class]
     9     module.add_class('UdpEchoServer', parent=root_module['ns3::Application'])
    10     
    11     ## Register a nested module for the namespace Config
    12     
    13     nested_module = module.add_cpp_namespace('Config')
    14     register_types_ns3_Config(nested_module)
    15     
    16     
    17     ## Register a nested module for the namespace TimeStepPrecision
    18     
    19     nested_module = module.add_cpp_namespace('TimeStepPrecision')
    20     register_types_ns3_TimeStepPrecision(nested_module)
    21     
    22     
    23     ## Register a nested module for the namespace addressUtils
    24     
    25     nested_module = module.add_cpp_namespace('addressUtils')
    26     register_types_ns3_addressUtils(nested_module)
    27     
    28     
    29     ## Register a nested module for the namespace internal
    30     
    31     nested_module = module.add_cpp_namespace('internal')
    32     register_types_ns3_internal(nested_module)
    33     
    34     
    35     ## Register a nested module for the namespace olsr
    36     
    37     nested_module = module.add_cpp_namespace('olsr')
    38     register_types_ns3_olsr(nested_module)
    39     
    40 
    41 def register_types_ns3_Config(module):
    42     root_module = module.get_root()
    43     
    44 
    45 def register_types_ns3_TimeStepPrecision(module):
    46     root_module = module.get_root()
    47     
    48 
    49 def register_types_ns3_addressUtils(module):
    50     root_module = module.get_root()
    51     
    52 
    53 def register_types_ns3_internal(module):
    54     root_module = module.get_root()
    55     
    56 
    57 def register_types_ns3_olsr(module):
    58     root_module = module.get_root()
    59     
    60 
    61 def register_methods(root_module):
    62     register_Ns3UdpEchoClient_methods(root_module, root_module['ns3::UdpEchoClient'])
    63     register_Ns3UdpEchoServer_methods(root_module, root_module['ns3::UdpEchoServer'])
    64     return
    65 
    66 def register_Ns3UdpEchoClient_methods(root_module, cls):
    67     ## udp-echo-client.h: ns3::UdpEchoClient::UdpEchoClient(ns3::UdpEchoClient const & arg0) [copy constructor]
    68     cls.add_constructor([param('ns3::UdpEchoClient const &', 'arg0')])
    69     ## udp-echo-client.h: static ns3::TypeId ns3::UdpEchoClient::GetTypeId() [member function]
    70     cls.add_method('GetTypeId', 
    71                    'ns3::TypeId', 
    72                    [], 
    73                    is_static=True)
    74     ## udp-echo-client.h: ns3::UdpEchoClient::UdpEchoClient() [constructor]
    75     cls.add_constructor([])
    76     ## udp-echo-client.h: void ns3::UdpEchoClient::SetRemote(ns3::Ipv4Address ip, uint16_t port) [member function]
    77     cls.add_method('SetRemote', 
    78                    'void', 
    79                    [param('ns3::Ipv4Address', 'ip'), param('uint16_t', 'port')])
    80     ## udp-echo-client.h: void ns3::UdpEchoClient::SetDataSize(uint32_t dataSize) [member function]
    81     cls.add_method('SetDataSize', 
    82                    'void', 
    83                    [param('uint32_t', 'dataSize')])
    84     ## udp-echo-client.h: uint32_t ns3::UdpEchoClient::GetDataSize() const [member function]
    85     cls.add_method('GetDataSize', 
    86                    'uint32_t', 
    87                    [], 
    88                    is_const=True)
    89     ## udp-echo-client.h: void ns3::UdpEchoClient::SetFill(std::string fill) [member function]
    90     cls.add_method('SetFill', 
    91                    'void', 
    92                    [param('std::string', 'fill')])
    93     ## udp-echo-client.h: void ns3::UdpEchoClient::SetFill(uint8_t fill, uint32_t dataSize) [member function]
    94     cls.add_method('SetFill', 
    95                    'void', 
    96                    [param('uint8_t', 'fill'), param('uint32_t', 'dataSize')])
    97     ## udp-echo-client.h: void ns3::UdpEchoClient::SetFill(uint8_t * fill, uint32_t fillSize, uint32_t dataSize) [member function]
    98     cls.add_method('SetFill', 
    99                    'void', 
   100                    [param('uint8_t *', 'fill'), param('uint32_t', 'fillSize'), param('uint32_t', 'dataSize')])
   101     ## udp-echo-client.h: void ns3::UdpEchoClient::DoDispose() [member function]
   102     cls.add_method('DoDispose', 
   103                    'void', 
   104                    [], 
   105                    visibility='protected', is_virtual=True)
   106     ## udp-echo-client.h: void ns3::UdpEchoClient::StartApplication() [member function]
   107     cls.add_method('StartApplication', 
   108                    'void', 
   109                    [], 
   110                    visibility='private', is_virtual=True)
   111     ## udp-echo-client.h: void ns3::UdpEchoClient::StopApplication() [member function]
   112     cls.add_method('StopApplication', 
   113                    'void', 
   114                    [], 
   115                    visibility='private', is_virtual=True)
   116     return
   117 
   118 def register_Ns3UdpEchoServer_methods(root_module, cls):
   119     ## udp-echo-server.h: ns3::UdpEchoServer::UdpEchoServer(ns3::UdpEchoServer const & arg0) [copy constructor]
   120     cls.add_constructor([param('ns3::UdpEchoServer const &', 'arg0')])
   121     ## udp-echo-server.h: static ns3::TypeId ns3::UdpEchoServer::GetTypeId() [member function]
   122     cls.add_method('GetTypeId', 
   123                    'ns3::TypeId', 
   124                    [], 
   125                    is_static=True)
   126     ## udp-echo-server.h: ns3::UdpEchoServer::UdpEchoServer() [constructor]
   127     cls.add_constructor([])
   128     ## udp-echo-server.h: void ns3::UdpEchoServer::DoDispose() [member function]
   129     cls.add_method('DoDispose', 
   130                    'void', 
   131                    [], 
   132                    visibility='protected', is_virtual=True)
   133     ## udp-echo-server.h: void ns3::UdpEchoServer::StartApplication() [member function]
   134     cls.add_method('StartApplication', 
   135                    'void', 
   136                    [], 
   137                    visibility='private', is_virtual=True)
   138     ## udp-echo-server.h: void ns3::UdpEchoServer::StopApplication() [member function]
   139     cls.add_method('StopApplication', 
   140                    'void', 
   141                    [], 
   142                    visibility='private', is_virtual=True)
   143     return
   144 
   145 def register_functions(root_module):
   146     module = root_module
   147     register_functions_ns3_Config(module.get_submodule('Config'), root_module)
   148     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
   149     register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
   150     register_functions_ns3_internal(module.get_submodule('internal'), root_module)
   151     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
   152     return
   153 
   154 def register_functions_ns3_Config(module, root_module):
   155     return
   156 
   157 def register_functions_ns3_TimeStepPrecision(module, root_module):
   158     return
   159 
   160 def register_functions_ns3_addressUtils(module, root_module):
   161     return
   162 
   163 def register_functions_ns3_internal(module, root_module):
   164     return
   165 
   166 def register_functions_ns3_olsr(module, root_module):
   167     return
   168