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