bindings/python/ns3_module_tap_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     ## tap-bridge.h: ns3::TapBridge [class]
     7     module.add_class('TapBridge', parent=root_module['ns3::NetDevice'])
     8     ## tap-bridge.h: ns3::TapBridge::Mode [enumeration]
     9     module.add_enum('Mode', ['ILLEGAL', 'CONFIGURE_LOCAL', 'USE_LOCAL', 'USE_BRIDGE'], outer_class=root_module['ns3::TapBridge'])
    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_Ns3TapBridge_methods(root_module, root_module['ns3::TapBridge'])
    63     return
    64 
    65 def register_Ns3TapBridge_methods(root_module, cls):
    66     ## tap-bridge.h: ns3::TapBridge::TapBridge(ns3::TapBridge const & arg0) [copy constructor]
    67     cls.add_constructor([param('ns3::TapBridge const &', 'arg0')])
    68     ## tap-bridge.h: static ns3::TypeId ns3::TapBridge::GetTypeId() [member function]
    69     cls.add_method('GetTypeId', 
    70                    'ns3::TypeId', 
    71                    [], 
    72                    is_static=True)
    73     ## tap-bridge.h: ns3::TapBridge::TapBridge() [constructor]
    74     cls.add_constructor([])
    75     ## tap-bridge.h: ns3::Ptr<ns3::NetDevice> ns3::TapBridge::GetBridgedNetDevice() [member function]
    76     cls.add_method('GetBridgedNetDevice', 
    77                    'ns3::Ptr< ns3::NetDevice >', 
    78                    [])
    79     ## tap-bridge.h: void ns3::TapBridge::SetBridgedNetDevice(ns3::Ptr<ns3::NetDevice> bridgedDevice) [member function]
    80     cls.add_method('SetBridgedNetDevice', 
    81                    'void', 
    82                    [param('ns3::Ptr< ns3::NetDevice >', 'bridgedDevice')])
    83     ## tap-bridge.h: void ns3::TapBridge::Start(ns3::Time tStart) [member function]
    84     cls.add_method('Start', 
    85                    'void', 
    86                    [param('ns3::Time', 'tStart')])
    87     ## tap-bridge.h: void ns3::TapBridge::Stop(ns3::Time tStop) [member function]
    88     cls.add_method('Stop', 
    89                    'void', 
    90                    [param('ns3::Time', 'tStop')])
    91     ## tap-bridge.h: void ns3::TapBridge::SetMode(ns3::TapBridge::Mode mode) [member function]
    92     cls.add_method('SetMode', 
    93                    'void', 
    94                    [param('ns3::TapBridge::Mode', 'mode')])
    95     ## tap-bridge.h: ns3::TapBridge::Mode ns3::TapBridge::GetMode() [member function]
    96     cls.add_method('GetMode', 
    97                    'ns3::TapBridge::Mode', 
    98                    [])
    99     ## tap-bridge.h: void ns3::TapBridge::SetIfIndex(uint32_t const index) [member function]
   100     cls.add_method('SetIfIndex', 
   101                    'void', 
   102                    [param('uint32_t const', 'index')], 
   103                    is_virtual=True)
   104     ## tap-bridge.h: uint32_t ns3::TapBridge::GetIfIndex() const [member function]
   105     cls.add_method('GetIfIndex', 
   106                    'uint32_t', 
   107                    [], 
   108                    is_const=True, is_virtual=True)
   109     ## tap-bridge.h: ns3::Ptr<ns3::Channel> ns3::TapBridge::GetChannel() const [member function]
   110     cls.add_method('GetChannel', 
   111                    'ns3::Ptr< ns3::Channel >', 
   112                    [], 
   113                    is_const=True, is_virtual=True)
   114     ## tap-bridge.h: void ns3::TapBridge::SetAddress(ns3::Address address) [member function]
   115     cls.add_method('SetAddress', 
   116                    'void', 
   117                    [param('ns3::Address', 'address')], 
   118                    is_virtual=True)
   119     ## tap-bridge.h: ns3::Address ns3::TapBridge::GetAddress() const [member function]
   120     cls.add_method('GetAddress', 
   121                    'ns3::Address', 
   122                    [], 
   123                    is_const=True, is_virtual=True)
   124     ## tap-bridge.h: bool ns3::TapBridge::SetMtu(uint16_t const mtu) [member function]
   125     cls.add_method('SetMtu', 
   126                    'bool', 
   127                    [param('uint16_t const', 'mtu')], 
   128                    is_virtual=True)
   129     ## tap-bridge.h: uint16_t ns3::TapBridge::GetMtu() const [member function]
   130     cls.add_method('GetMtu', 
   131                    'uint16_t', 
   132                    [], 
   133                    is_const=True, is_virtual=True)
   134     ## tap-bridge.h: bool ns3::TapBridge::IsLinkUp() const [member function]
   135     cls.add_method('IsLinkUp', 
   136                    'bool', 
   137                    [], 
   138                    is_const=True, is_virtual=True)
   139     ## tap-bridge.h: void ns3::TapBridge::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]
   140     cls.add_method('SetLinkChangeCallback', 
   141                    'void', 
   142                    [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], 
   143                    is_virtual=True)
   144     ## tap-bridge.h: bool ns3::TapBridge::IsBroadcast() const [member function]
   145     cls.add_method('IsBroadcast', 
   146                    'bool', 
   147                    [], 
   148                    is_const=True, is_virtual=True)
   149     ## tap-bridge.h: ns3::Address ns3::TapBridge::GetBroadcast() const [member function]
   150     cls.add_method('GetBroadcast', 
   151                    'ns3::Address', 
   152                    [], 
   153                    is_const=True, is_virtual=True)
   154     ## tap-bridge.h: bool ns3::TapBridge::IsMulticast() const [member function]
   155     cls.add_method('IsMulticast', 
   156                    'bool', 
   157                    [], 
   158                    is_const=True, is_virtual=True)
   159     ## tap-bridge.h: ns3::Address ns3::TapBridge::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
   160     cls.add_method('GetMulticast', 
   161                    'ns3::Address', 
   162                    [param('ns3::Ipv4Address', 'multicastGroup')], 
   163                    is_const=True, is_virtual=True)
   164     ## tap-bridge.h: bool ns3::TapBridge::IsPointToPoint() const [member function]
   165     cls.add_method('IsPointToPoint', 
   166                    'bool', 
   167                    [], 
   168                    is_const=True, is_virtual=True)
   169     ## tap-bridge.h: bool ns3::TapBridge::IsBridge() const [member function]
   170     cls.add_method('IsBridge', 
   171                    'bool', 
   172                    [], 
   173                    is_const=True, is_virtual=True)
   174     ## tap-bridge.h: bool ns3::TapBridge::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
   175     cls.add_method('Send', 
   176                    'bool', 
   177                    [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   178                    is_virtual=True)
   179     ## tap-bridge.h: bool ns3::TapBridge::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function]
   180     cls.add_method('SendFrom', 
   181                    'bool', 
   182                    [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   183                    is_virtual=True)
   184     ## tap-bridge.h: ns3::Ptr<ns3::Node> ns3::TapBridge::GetNode() const [member function]
   185     cls.add_method('GetNode', 
   186                    'ns3::Ptr< ns3::Node >', 
   187                    [], 
   188                    is_const=True, is_virtual=True)
   189     ## tap-bridge.h: void ns3::TapBridge::SetNode(ns3::Ptr<ns3::Node> node) [member function]
   190     cls.add_method('SetNode', 
   191                    'void', 
   192                    [param('ns3::Ptr< ns3::Node >', 'node')], 
   193                    is_virtual=True)
   194     ## tap-bridge.h: bool ns3::TapBridge::NeedsArp() const [member function]
   195     cls.add_method('NeedsArp', 
   196                    'bool', 
   197                    [], 
   198                    is_const=True, is_virtual=True)
   199     ## tap-bridge.h: void ns3::TapBridge::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]
   200     cls.add_method('SetReceiveCallback', 
   201                    'void', 
   202                    [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')], 
   203                    is_virtual=True)
   204     ## tap-bridge.h: void ns3::TapBridge::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]
   205     cls.add_method('SetPromiscReceiveCallback', 
   206                    'void', 
   207                    [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')], 
   208                    is_virtual=True)
   209     ## tap-bridge.h: bool ns3::TapBridge::SupportsSendFrom() const [member function]
   210     cls.add_method('SupportsSendFrom', 
   211                    'bool', 
   212                    [], 
   213                    is_const=True, is_virtual=True)
   214     ## tap-bridge.h: ns3::Address ns3::TapBridge::GetMulticast(ns3::Ipv6Address addr) const [member function]
   215     cls.add_method('GetMulticast', 
   216                    'ns3::Address', 
   217                    [param('ns3::Ipv6Address', 'addr')], 
   218                    is_const=True, is_virtual=True)
   219     ## tap-bridge.h: void ns3::TapBridge::DoDispose() [member function]
   220     cls.add_method('DoDispose', 
   221                    'void', 
   222                    [], 
   223                    visibility='protected', is_virtual=True)
   224     ## tap-bridge.h: bool ns3::TapBridge::ReceiveFromBridgedDevice(ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::Packet const> packet, uint16_t protocol, ns3::Address const & src, ns3::Address const & dst, ns3::NetDevice::PacketType packetType) [member function]
   225     cls.add_method('ReceiveFromBridgedDevice', 
   226                    'bool', 
   227                    [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'src'), param('ns3::Address const &', 'dst'), param('ns3::NetDevice::PacketType', 'packetType')], 
   228                    visibility='protected')
   229     ## tap-bridge.h: bool ns3::TapBridge::DiscardFromBridgedDevice(ns3::Ptr<ns3::NetDevice> device, ns3::Ptr<ns3::Packet const> packet, uint16_t protocol, ns3::Address const & src) [member function]
   230     cls.add_method('DiscardFromBridgedDevice', 
   231                    'bool', 
   232                    [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'packet'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'src')], 
   233                    visibility='protected')
   234     return
   235 
   236 def register_functions(root_module):
   237     module = root_module
   238     register_functions_ns3_Config(module.get_submodule('Config'), root_module)
   239     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
   240     register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
   241     register_functions_ns3_internal(module.get_submodule('internal'), root_module)
   242     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
   243     return
   244 
   245 def register_functions_ns3_Config(module, root_module):
   246     return
   247 
   248 def register_functions_ns3_TimeStepPrecision(module, root_module):
   249     return
   250 
   251 def register_functions_ns3_addressUtils(module, root_module):
   252     return
   253 
   254 def register_functions_ns3_internal(module, root_module):
   255     return
   256 
   257 def register_functions_ns3_olsr(module, root_module):
   258     return
   259