bindings/python/ns3_module_bridge.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     ## bridge-channel.h: ns3::BridgeChannel [class]
     7     module.add_class('BridgeChannel', parent=root_module['ns3::Channel'])
     8     ## bridge-net-device.h: ns3::BridgeNetDevice [class]
     9     module.add_class('BridgeNetDevice', parent=root_module['ns3::NetDevice'])
    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_Ns3BridgeChannel_methods(root_module, root_module['ns3::BridgeChannel'])
    63     register_Ns3BridgeNetDevice_methods(root_module, root_module['ns3::BridgeNetDevice'])
    64     return
    65 
    66 def register_Ns3BridgeChannel_methods(root_module, cls):
    67     ## bridge-channel.h: ns3::BridgeChannel::BridgeChannel(ns3::BridgeChannel const & arg0) [copy constructor]
    68     cls.add_constructor([param('ns3::BridgeChannel const &', 'arg0')])
    69     ## bridge-channel.h: static ns3::TypeId ns3::BridgeChannel::GetTypeId() [member function]
    70     cls.add_method('GetTypeId', 
    71                    'ns3::TypeId', 
    72                    [], 
    73                    is_static=True)
    74     ## bridge-channel.h: ns3::BridgeChannel::BridgeChannel() [constructor]
    75     cls.add_constructor([])
    76     ## bridge-channel.h: void ns3::BridgeChannel::AddChannel(ns3::Ptr<ns3::Channel> bridgedChannel) [member function]
    77     cls.add_method('AddChannel', 
    78                    'void', 
    79                    [param('ns3::Ptr< ns3::Channel >', 'bridgedChannel')])
    80     ## bridge-channel.h: uint32_t ns3::BridgeChannel::GetNDevices() const [member function]
    81     cls.add_method('GetNDevices', 
    82                    'uint32_t', 
    83                    [], 
    84                    is_const=True, is_virtual=True)
    85     ## bridge-channel.h: ns3::Ptr<ns3::NetDevice> ns3::BridgeChannel::GetDevice(uint32_t i) const [member function]
    86     cls.add_method('GetDevice', 
    87                    'ns3::Ptr< ns3::NetDevice >', 
    88                    [param('uint32_t', 'i')], 
    89                    is_const=True, is_virtual=True)
    90     return
    91 
    92 def register_Ns3BridgeNetDevice_methods(root_module, cls):
    93     ## bridge-net-device.h: ns3::BridgeNetDevice::BridgeNetDevice(ns3::BridgeNetDevice const & arg0) [copy constructor]
    94     cls.add_constructor([param('ns3::BridgeNetDevice const &', 'arg0')])
    95     ## bridge-net-device.h: static ns3::TypeId ns3::BridgeNetDevice::GetTypeId() [member function]
    96     cls.add_method('GetTypeId', 
    97                    'ns3::TypeId', 
    98                    [], 
    99                    is_static=True)
   100     ## bridge-net-device.h: ns3::BridgeNetDevice::BridgeNetDevice() [constructor]
   101     cls.add_constructor([])
   102     ## bridge-net-device.h: void ns3::BridgeNetDevice::AddBridgePort(ns3::Ptr<ns3::NetDevice> bridgePort) [member function]
   103     cls.add_method('AddBridgePort', 
   104                    'void', 
   105                    [param('ns3::Ptr< ns3::NetDevice >', 'bridgePort')])
   106     ## bridge-net-device.h: uint32_t ns3::BridgeNetDevice::GetNBridgePorts() const [member function]
   107     cls.add_method('GetNBridgePorts', 
   108                    'uint32_t', 
   109                    [], 
   110                    is_const=True)
   111     ## bridge-net-device.h: ns3::Ptr<ns3::NetDevice> ns3::BridgeNetDevice::GetBridgePort(uint32_t n) const [member function]
   112     cls.add_method('GetBridgePort', 
   113                    'ns3::Ptr< ns3::NetDevice >', 
   114                    [param('uint32_t', 'n')], 
   115                    is_const=True)
   116     ## bridge-net-device.h: void ns3::BridgeNetDevice::SetIfIndex(uint32_t const index) [member function]
   117     cls.add_method('SetIfIndex', 
   118                    'void', 
   119                    [param('uint32_t const', 'index')], 
   120                    is_virtual=True)
   121     ## bridge-net-device.h: uint32_t ns3::BridgeNetDevice::GetIfIndex() const [member function]
   122     cls.add_method('GetIfIndex', 
   123                    'uint32_t', 
   124                    [], 
   125                    is_const=True, is_virtual=True)
   126     ## bridge-net-device.h: ns3::Ptr<ns3::Channel> ns3::BridgeNetDevice::GetChannel() const [member function]
   127     cls.add_method('GetChannel', 
   128                    'ns3::Ptr< ns3::Channel >', 
   129                    [], 
   130                    is_const=True, is_virtual=True)
   131     ## bridge-net-device.h: void ns3::BridgeNetDevice::SetAddress(ns3::Address address) [member function]
   132     cls.add_method('SetAddress', 
   133                    'void', 
   134                    [param('ns3::Address', 'address')], 
   135                    is_virtual=True)
   136     ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetAddress() const [member function]
   137     cls.add_method('GetAddress', 
   138                    'ns3::Address', 
   139                    [], 
   140                    is_const=True, is_virtual=True)
   141     ## bridge-net-device.h: bool ns3::BridgeNetDevice::SetMtu(uint16_t const mtu) [member function]
   142     cls.add_method('SetMtu', 
   143                    'bool', 
   144                    [param('uint16_t const', 'mtu')], 
   145                    is_virtual=True)
   146     ## bridge-net-device.h: uint16_t ns3::BridgeNetDevice::GetMtu() const [member function]
   147     cls.add_method('GetMtu', 
   148                    'uint16_t', 
   149                    [], 
   150                    is_const=True, is_virtual=True)
   151     ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsLinkUp() const [member function]
   152     cls.add_method('IsLinkUp', 
   153                    'bool', 
   154                    [], 
   155                    is_const=True, is_virtual=True)
   156     ## bridge-net-device.h: void ns3::BridgeNetDevice::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]
   157     cls.add_method('SetLinkChangeCallback', 
   158                    'void', 
   159                    [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], 
   160                    is_virtual=True)
   161     ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsBroadcast() const [member function]
   162     cls.add_method('IsBroadcast', 
   163                    'bool', 
   164                    [], 
   165                    is_const=True, is_virtual=True)
   166     ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetBroadcast() const [member function]
   167     cls.add_method('GetBroadcast', 
   168                    'ns3::Address', 
   169                    [], 
   170                    is_const=True, is_virtual=True)
   171     ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsMulticast() const [member function]
   172     cls.add_method('IsMulticast', 
   173                    'bool', 
   174                    [], 
   175                    is_const=True, is_virtual=True)
   176     ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
   177     cls.add_method('GetMulticast', 
   178                    'ns3::Address', 
   179                    [param('ns3::Ipv4Address', 'multicastGroup')], 
   180                    is_const=True, is_virtual=True)
   181     ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsPointToPoint() const [member function]
   182     cls.add_method('IsPointToPoint', 
   183                    'bool', 
   184                    [], 
   185                    is_const=True, is_virtual=True)
   186     ## bridge-net-device.h: bool ns3::BridgeNetDevice::IsBridge() const [member function]
   187     cls.add_method('IsBridge', 
   188                    'bool', 
   189                    [], 
   190                    is_const=True, is_virtual=True)
   191     ## bridge-net-device.h: bool ns3::BridgeNetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
   192     cls.add_method('Send', 
   193                    'bool', 
   194                    [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   195                    is_virtual=True)
   196     ## bridge-net-device.h: bool ns3::BridgeNetDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function]
   197     cls.add_method('SendFrom', 
   198                    'bool', 
   199                    [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   200                    is_virtual=True)
   201     ## bridge-net-device.h: ns3::Ptr<ns3::Node> ns3::BridgeNetDevice::GetNode() const [member function]
   202     cls.add_method('GetNode', 
   203                    'ns3::Ptr< ns3::Node >', 
   204                    [], 
   205                    is_const=True, is_virtual=True)
   206     ## bridge-net-device.h: void ns3::BridgeNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
   207     cls.add_method('SetNode', 
   208                    'void', 
   209                    [param('ns3::Ptr< ns3::Node >', 'node')], 
   210                    is_virtual=True)
   211     ## bridge-net-device.h: bool ns3::BridgeNetDevice::NeedsArp() const [member function]
   212     cls.add_method('NeedsArp', 
   213                    'bool', 
   214                    [], 
   215                    is_const=True, is_virtual=True)
   216     ## bridge-net-device.h: void ns3::BridgeNetDevice::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]
   217     cls.add_method('SetReceiveCallback', 
   218                    'void', 
   219                    [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')], 
   220                    is_virtual=True)
   221     ## bridge-net-device.h: void ns3::BridgeNetDevice::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]
   222     cls.add_method('SetPromiscReceiveCallback', 
   223                    'void', 
   224                    [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')], 
   225                    is_virtual=True)
   226     ## bridge-net-device.h: bool ns3::BridgeNetDevice::SupportsSendFrom() const [member function]
   227     cls.add_method('SupportsSendFrom', 
   228                    'bool', 
   229                    [], 
   230                    is_const=True, is_virtual=True)
   231     ## bridge-net-device.h: ns3::Address ns3::BridgeNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
   232     cls.add_method('GetMulticast', 
   233                    'ns3::Address', 
   234                    [param('ns3::Ipv6Address', 'addr')], 
   235                    is_const=True, is_virtual=True)
   236     ## bridge-net-device.h: void ns3::BridgeNetDevice::DoDispose() [member function]
   237     cls.add_method('DoDispose', 
   238                    'void', 
   239                    [], 
   240                    visibility='protected', is_virtual=True)
   241     ## bridge-net-device.h: void ns3::BridgeNetDevice::ReceiveFromDevice(ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::Packet const> packet, uint16_t protocol, ns3::Address const & source, ns3::Address const & destination, ns3::NetDevice::PacketType packetType) [member function]
   242     cls.add_method('ReceiveFromDevice', 
   243                    'void', 
   244                    [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'destination'), param('ns3::NetDevice::PacketType', 'packetType')], 
   245                    visibility='protected')
   246     ## bridge-net-device.h: void ns3::BridgeNetDevice::ForwardUnicast(ns3::Ptr<ns3::NetDevice> incomingPort, ns3::Ptr<ns3::Packet const> packet, uint16_t protocol, ns3::Mac48Address src, ns3::Mac48Address dst) [member function]
   247     cls.add_method('ForwardUnicast', 
   248                    'void', 
   249                    [param('ns3::Ptr< ns3::NetDevice >', 'incomingPort'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'src'), param('ns3::Mac48Address', 'dst')], 
   250                    visibility='protected')
   251     ## bridge-net-device.h: void ns3::BridgeNetDevice::ForwardBroadcast(ns3::Ptr<ns3::NetDevice> incomingPort, ns3::Ptr<ns3::Packet const> packet, uint16_t protocol, ns3::Mac48Address src, ns3::Mac48Address dst) [member function]
   252     cls.add_method('ForwardBroadcast', 
   253                    'void', 
   254                    [param('ns3::Ptr< ns3::NetDevice >', 'incomingPort'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Mac48Address', 'src'), param('ns3::Mac48Address', 'dst')], 
   255                    visibility='protected')
   256     ## bridge-net-device.h: void ns3::BridgeNetDevice::Learn(ns3::Mac48Address source, ns3::Ptr<ns3::NetDevice> port) [member function]
   257     cls.add_method('Learn', 
   258                    'void', 
   259                    [param('ns3::Mac48Address', 'source'), param('ns3::Ptr< ns3::NetDevice >', 'port')], 
   260                    visibility='protected')
   261     ## bridge-net-device.h: ns3::Ptr<ns3::NetDevice> ns3::BridgeNetDevice::GetLearnedState(ns3::Mac48Address source) [member function]
   262     cls.add_method('GetLearnedState', 
   263                    'ns3::Ptr< ns3::NetDevice >', 
   264                    [param('ns3::Mac48Address', 'source')], 
   265                    visibility='protected')
   266     return
   267 
   268 def register_functions(root_module):
   269     module = root_module
   270     register_functions_ns3_Config(module.get_submodule('Config'), root_module)
   271     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
   272     register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
   273     register_functions_ns3_internal(module.get_submodule('internal'), root_module)
   274     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
   275     return
   276 
   277 def register_functions_ns3_Config(module, root_module):
   278     return
   279 
   280 def register_functions_ns3_TimeStepPrecision(module, root_module):
   281     return
   282 
   283 def register_functions_ns3_addressUtils(module, root_module):
   284     return
   285 
   286 def register_functions_ns3_internal(module, root_module):
   287     return
   288 
   289 def register_functions_ns3_olsr(module, root_module):
   290     return
   291