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