bindings/python/ns3_module_emu.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
vincent@3842
     2
vincent@3842
     3
def register_types(module):
vincent@3842
     4
    root_module = module.get_root()
vincent@3842
     5
    
vincent@3842
     6
    ## emu-net-device.h: ns3::EmuNetDevice [class]
vincent@3842
     7
    module.add_class('EmuNetDevice', parent=root_module['ns3::NetDevice'])
vincent@3842
     8
    
gjc@3855
     9
    ## Register a nested module for the namespace Config
vincent@3842
    10
    
gjc@3855
    11
    nested_module = module.add_cpp_namespace('Config')
gjc@3855
    12
    register_types_ns3_Config(nested_module)
vincent@3842
    13
    
vincent@3842
    14
    
vincent@3842
    15
    ## Register a nested module for the namespace TimeStepPrecision
vincent@3842
    16
    
vincent@3842
    17
    nested_module = module.add_cpp_namespace('TimeStepPrecision')
vincent@3842
    18
    register_types_ns3_TimeStepPrecision(nested_module)
vincent@3842
    19
    
vincent@3842
    20
    
tomh@4474
    21
    ## Register a nested module for the namespace addressUtils
tomh@4474
    22
    
tomh@4474
    23
    nested_module = module.add_cpp_namespace('addressUtils')
tomh@4474
    24
    register_types_ns3_addressUtils(nested_module)
tomh@4474
    25
    
tomh@4474
    26
    
gjc@3855
    27
    ## Register a nested module for the namespace internal
vincent@3842
    28
    
gjc@3855
    29
    nested_module = module.add_cpp_namespace('internal')
gjc@3855
    30
    register_types_ns3_internal(nested_module)
vincent@3842
    31
    
vincent@3842
    32
    
vincent@3842
    33
    ## Register a nested module for the namespace olsr
vincent@3842
    34
    
vincent@3842
    35
    nested_module = module.add_cpp_namespace('olsr')
vincent@3842
    36
    register_types_ns3_olsr(nested_module)
vincent@3842
    37
    
vincent@3842
    38
gjc@3855
    39
def register_types_ns3_Config(module):
vincent@3842
    40
    root_module = module.get_root()
vincent@3842
    41
    
vincent@3842
    42
vincent@3842
    43
def register_types_ns3_TimeStepPrecision(module):
vincent@3842
    44
    root_module = module.get_root()
vincent@3842
    45
    
vincent@3842
    46
tomh@4474
    47
def register_types_ns3_addressUtils(module):
tomh@4474
    48
    root_module = module.get_root()
tomh@4474
    49
    
tomh@4474
    50
gjc@3855
    51
def register_types_ns3_internal(module):
vincent@3842
    52
    root_module = module.get_root()
vincent@3842
    53
    
vincent@3842
    54
vincent@3842
    55
def register_types_ns3_olsr(module):
vincent@3842
    56
    root_module = module.get_root()
vincent@3842
    57
    
vincent@3842
    58
vincent@3842
    59
def register_methods(root_module):
vincent@3842
    60
    register_Ns3EmuNetDevice_methods(root_module, root_module['ns3::EmuNetDevice'])
vincent@3842
    61
    return
vincent@3842
    62
vincent@3842
    63
def register_Ns3EmuNetDevice_methods(root_module, cls):
mathieu@4241
    64
    ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice(ns3::EmuNetDevice const & arg0) [copy constructor]
mathieu@4241
    65
    cls.add_constructor([param('ns3::EmuNetDevice const &', 'arg0')])
vincent@3842
    66
    ## emu-net-device.h: static ns3::TypeId ns3::EmuNetDevice::GetTypeId() [member function]
vincent@3842
    67
    cls.add_method('GetTypeId', 
vincent@3842
    68
                   'ns3::TypeId', 
vincent@3842
    69
                   [], 
vincent@3842
    70
                   is_static=True)
vincent@3842
    71
    ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice() [constructor]
vincent@3842
    72
    cls.add_constructor([])
vincent@3842
    73
    ## emu-net-device.h: void ns3::EmuNetDevice::SetDataRate(ns3::DataRate bps) [member function]
vincent@3842
    74
    cls.add_method('SetDataRate', 
vincent@3842
    75
                   'void', 
vincent@3842
    76
                   [param('ns3::DataRate', 'bps')])
vincent@3842
    77
    ## emu-net-device.h: void ns3::EmuNetDevice::Start(ns3::Time tStart) [member function]
vincent@3842
    78
    cls.add_method('Start', 
vincent@3842
    79
                   'void', 
vincent@3842
    80
                   [param('ns3::Time', 'tStart')])
vincent@3842
    81
    ## emu-net-device.h: void ns3::EmuNetDevice::Stop(ns3::Time tStop) [member function]
vincent@3842
    82
    cls.add_method('Stop', 
vincent@3842
    83
                   'void', 
vincent@3842
    84
                   [param('ns3::Time', 'tStop')])
vincent@3842
    85
    ## emu-net-device.h: void ns3::EmuNetDevice::SetQueue(ns3::Ptr<ns3::Queue> queue) [member function]
vincent@3842
    86
    cls.add_method('SetQueue', 
vincent@3842
    87
                   'void', 
vincent@3842
    88
                   [param('ns3::Ptr< ns3::Queue >', 'queue')])
vincent@3842
    89
    ## emu-net-device.h: void ns3::EmuNetDevice::SetIfIndex(uint32_t const index) [member function]
vincent@3842
    90
    cls.add_method('SetIfIndex', 
vincent@3842
    91
                   'void', 
vincent@3842
    92
                   [param('uint32_t const', 'index')], 
vincent@3842
    93
                   is_virtual=True)
vincent@3842
    94
    ## emu-net-device.h: uint32_t ns3::EmuNetDevice::GetIfIndex() const [member function]
vincent@3842
    95
    cls.add_method('GetIfIndex', 
vincent@3842
    96
                   'uint32_t', 
vincent@3842
    97
                   [], 
vincent@3842
    98
                   is_const=True, is_virtual=True)
vincent@3842
    99
    ## emu-net-device.h: ns3::Ptr<ns3::Channel> ns3::EmuNetDevice::GetChannel() const [member function]
vincent@3842
   100
    cls.add_method('GetChannel', 
vincent@3842
   101
                   'ns3::Ptr< ns3::Channel >', 
vincent@3842
   102
                   [], 
vincent@3842
   103
                   is_const=True, is_virtual=True)
tomh@4589
   104
    ## emu-net-device.h: void ns3::EmuNetDevice::SetAddress(ns3::Address address) [member function]
tomh@4589
   105
    cls.add_method('SetAddress', 
tomh@4589
   106
                   'void', 
tomh@4589
   107
                   [param('ns3::Address', 'address')], 
tomh@4589
   108
                   is_virtual=True)
vincent@3842
   109
    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetAddress() const [member function]
vincent@3842
   110
    cls.add_method('GetAddress', 
vincent@3842
   111
                   'ns3::Address', 
vincent@3842
   112
                   [], 
vincent@3842
   113
                   is_const=True, is_virtual=True)
vincent@3842
   114
    ## emu-net-device.h: bool ns3::EmuNetDevice::SetMtu(uint16_t const mtu) [member function]
vincent@3842
   115
    cls.add_method('SetMtu', 
vincent@3842
   116
                   'bool', 
vincent@3842
   117
                   [param('uint16_t const', 'mtu')], 
vincent@3842
   118
                   is_virtual=True)
vincent@3842
   119
    ## emu-net-device.h: uint16_t ns3::EmuNetDevice::GetMtu() const [member function]
vincent@3842
   120
    cls.add_method('GetMtu', 
vincent@3842
   121
                   'uint16_t', 
vincent@3842
   122
                   [], 
vincent@3842
   123
                   is_const=True, is_virtual=True)
vincent@3842
   124
    ## emu-net-device.h: bool ns3::EmuNetDevice::IsLinkUp() const [member function]
vincent@3842
   125
    cls.add_method('IsLinkUp', 
vincent@3842
   126
                   'bool', 
vincent@3842
   127
                   [], 
vincent@3842
   128
                   is_const=True, is_virtual=True)
mathieu@4073
   129
    ## emu-net-device.h: void ns3::EmuNetDevice::SetLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
vincent@3842
   130
    cls.add_method('SetLinkChangeCallback', 
vincent@3842
   131
                   'void', 
mathieu@4073
   132
                   [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], 
vincent@3842
   133
                   is_virtual=True)
vincent@3842
   134
    ## emu-net-device.h: bool ns3::EmuNetDevice::IsBroadcast() const [member function]
vincent@3842
   135
    cls.add_method('IsBroadcast', 
vincent@3842
   136
                   'bool', 
vincent@3842
   137
                   [], 
vincent@3842
   138
                   is_const=True, is_virtual=True)
vincent@3842
   139
    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetBroadcast() const [member function]
vincent@3842
   140
    cls.add_method('GetBroadcast', 
vincent@3842
   141
                   'ns3::Address', 
vincent@3842
   142
                   [], 
vincent@3842
   143
                   is_const=True, is_virtual=True)
vincent@3842
   144
    ## emu-net-device.h: bool ns3::EmuNetDevice::IsMulticast() const [member function]
vincent@3842
   145
    cls.add_method('IsMulticast', 
vincent@3842
   146
                   'bool', 
vincent@3842
   147
                   [], 
vincent@3842
   148
                   is_const=True, is_virtual=True)
vincent@3842
   149
    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
vincent@3842
   150
    cls.add_method('GetMulticast', 
vincent@3842
   151
                   'ns3::Address', 
vincent@3842
   152
                   [param('ns3::Ipv4Address', 'multicastGroup')], 
vincent@3842
   153
                   is_const=True, is_virtual=True)
gjc@3855
   154
    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
gjc@3855
   155
    cls.add_method('GetMulticast', 
gjc@3855
   156
                   'ns3::Address', 
gjc@3855
   157
                   [param('ns3::Ipv6Address', 'addr')], 
gjc@3855
   158
                   is_const=True, is_virtual=True)
vincent@3842
   159
    ## emu-net-device.h: bool ns3::EmuNetDevice::IsPointToPoint() const [member function]
vincent@3842
   160
    cls.add_method('IsPointToPoint', 
vincent@3842
   161
                   'bool', 
vincent@3842
   162
                   [], 
vincent@3842
   163
                   is_const=True, is_virtual=True)
gjc@3951
   164
    ## emu-net-device.h: bool ns3::EmuNetDevice::IsBridge() const [member function]
gjc@3951
   165
    cls.add_method('IsBridge', 
gjc@3951
   166
                   'bool', 
gjc@3951
   167
                   [], 
gjc@3951
   168
                   is_const=True, is_virtual=True)
vincent@3842
   169
    ## emu-net-device.h: bool ns3::EmuNetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
vincent@3842
   170
    cls.add_method('Send', 
vincent@3842
   171
                   'bool', 
vincent@3842
   172
                   [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
vincent@3842
   173
                   is_virtual=True)
vincent@3842
   174
    ## emu-net-device.h: bool ns3::EmuNetDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function]
vincent@3842
   175
    cls.add_method('SendFrom', 
vincent@3842
   176
                   'bool', 
vincent@3842
   177
                   [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
vincent@3842
   178
                   is_virtual=True)
vincent@3842
   179
    ## emu-net-device.h: ns3::Ptr<ns3::Node> ns3::EmuNetDevice::GetNode() const [member function]
vincent@3842
   180
    cls.add_method('GetNode', 
vincent@3842
   181
                   'ns3::Ptr< ns3::Node >', 
vincent@3842
   182
                   [], 
vincent@3842
   183
                   is_const=True, is_virtual=True)
vincent@3842
   184
    ## emu-net-device.h: void ns3::EmuNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
vincent@3842
   185
    cls.add_method('SetNode', 
vincent@3842
   186
                   'void', 
vincent@3842
   187
                   [param('ns3::Ptr< ns3::Node >', 'node')], 
vincent@3842
   188
                   is_virtual=True)
vincent@3842
   189
    ## emu-net-device.h: bool ns3::EmuNetDevice::NeedsArp() const [member function]
vincent@3842
   190
    cls.add_method('NeedsArp', 
vincent@3842
   191
                   'bool', 
vincent@3842
   192
                   [], 
vincent@3842
   193
                   is_const=True, is_virtual=True)
mathieu@4073
   194
    ## emu-net-device.h: void ns3::EmuNetDevice::SetReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
vincent@3842
   195
    cls.add_method('SetReceiveCallback', 
vincent@3842
   196
                   'void', 
mathieu@4073
   197
                   [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], 
vincent@3842
   198
                   is_virtual=True)
mathieu@4073
   199
    ## emu-net-device.h: void ns3::EmuNetDevice::SetPromiscReceiveCallback(ns3::Callback<bool, ns3::Ptr<ns3::NetDevice>, ns3::Ptr<ns3::Packet const>, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
vincent@3842
   200
    cls.add_method('SetPromiscReceiveCallback', 
vincent@3842
   201
                   'void', 
mathieu@4073
   202
                   [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')], 
vincent@3842
   203
                   is_virtual=True)
vincent@3842
   204
    ## emu-net-device.h: bool ns3::EmuNetDevice::SupportsSendFrom() const [member function]
vincent@3842
   205
    cls.add_method('SupportsSendFrom', 
vincent@3842
   206
                   'bool', 
vincent@3842
   207
                   [], 
vincent@3842
   208
                   is_const=True, is_virtual=True)
vincent@3842
   209
    ## emu-net-device.h: void ns3::EmuNetDevice::DoDispose() [member function]
vincent@3842
   210
    cls.add_method('DoDispose', 
vincent@3842
   211
                   'void', 
vincent@3842
   212
                   [], 
vincent@3842
   213
                   visibility='private', is_virtual=True)
vincent@3842
   214
    return
vincent@3842
   215
vincent@3842
   216
def register_functions(root_module):
vincent@3842
   217
    module = root_module
gjc@3855
   218
    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
gjc@3855
   219
    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
tomh@4474
   220
    register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
vincent@3842
   221
    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
vincent@3842
   222
    register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
vincent@3842
   223
    return
vincent@3842
   224
gjc@3855
   225
def register_functions_ns3_Config(module, root_module):
gjc@3855
   226
    return
gjc@3855
   227
gjc@3855
   228
def register_functions_ns3_TimeStepPrecision(module, root_module):
gjc@3855
   229
    return
gjc@3855
   230
tomh@4474
   231
def register_functions_ns3_addressUtils(module, root_module):
tomh@4474
   232
    return
tomh@4474
   233
vincent@3842
   234
def register_functions_ns3_internal(module, root_module):
vincent@3842
   235
    return
vincent@3842
   236
vincent@3842
   237
def register_functions_ns3_olsr(module, root_module):
vincent@3842
   238
    return
vincent@3842
   239