bindings/python/ns3_module_emu.py
changeset 3842 545ddf9398ed
child 3843 ca2159d54d75
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/bindings/python/ns3_module_emu.py	Wed Nov 05 14:49:21 2008 -0800
     1.3 @@ -0,0 +1,232 @@
     1.4 +from pybindgen import Module, FileCodeSink, param, retval, cppclass
     1.5 +
     1.6 +def register_types(module):
     1.7 +    root_module = module.get_root()
     1.8 +    
     1.9 +    ## emu-net-device.h: ns3::EmuNetDevice [class]
    1.10 +    module.add_class('EmuNetDevice', parent=root_module['ns3::NetDevice'])
    1.11 +    
    1.12 +    ## Register a nested module for the namespace internal
    1.13 +    
    1.14 +    nested_module = module.add_cpp_namespace('internal')
    1.15 +    register_types_ns3_internal(nested_module)
    1.16 +    
    1.17 +    
    1.18 +    ## Register a nested module for the namespace TimeStepPrecision
    1.19 +    
    1.20 +    nested_module = module.add_cpp_namespace('TimeStepPrecision')
    1.21 +    register_types_ns3_TimeStepPrecision(nested_module)
    1.22 +    
    1.23 +    
    1.24 +    ## Register a nested module for the namespace Config
    1.25 +    
    1.26 +    nested_module = module.add_cpp_namespace('Config')
    1.27 +    register_types_ns3_Config(nested_module)
    1.28 +    
    1.29 +    
    1.30 +    ## Register a nested module for the namespace olsr
    1.31 +    
    1.32 +    nested_module = module.add_cpp_namespace('olsr')
    1.33 +    register_types_ns3_olsr(nested_module)
    1.34 +    
    1.35 +
    1.36 +def register_types_ns3_internal(module):
    1.37 +    root_module = module.get_root()
    1.38 +    
    1.39 +
    1.40 +def register_types_ns3_TimeStepPrecision(module):
    1.41 +    root_module = module.get_root()
    1.42 +    
    1.43 +
    1.44 +def register_types_ns3_Config(module):
    1.45 +    root_module = module.get_root()
    1.46 +    
    1.47 +
    1.48 +def register_types_ns3_olsr(module):
    1.49 +    root_module = module.get_root()
    1.50 +    
    1.51 +
    1.52 +def register_methods(root_module):
    1.53 +    register_Ns3EmuNetDevice_methods(root_module, root_module['ns3::EmuNetDevice'])
    1.54 +    return
    1.55 +
    1.56 +def register_Ns3EmuNetDevice_methods(root_module, cls):
    1.57 +    ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice(ns3::EmuNetDevice const & arg0) [copy constructor]
    1.58 +    cls.add_constructor([param('ns3::EmuNetDevice const &', 'arg0')])
    1.59 +    ## emu-net-device.h: static ns3::TypeId ns3::EmuNetDevice::GetTypeId() [member function]
    1.60 +    cls.add_method('GetTypeId', 
    1.61 +                   'ns3::TypeId', 
    1.62 +                   [], 
    1.63 +                   is_static=True)
    1.64 +    ## emu-net-device.h: ns3::EmuNetDevice::EmuNetDevice() [constructor]
    1.65 +    cls.add_constructor([])
    1.66 +    ## emu-net-device.h: void ns3::EmuNetDevice::SetDataRate(ns3::DataRate bps) [member function]
    1.67 +    cls.add_method('SetDataRate', 
    1.68 +                   'void', 
    1.69 +                   [param('ns3::DataRate', 'bps')])
    1.70 +    ## emu-net-device.h: void ns3::EmuNetDevice::SetInterframeGap(ns3::Time t) [member function]
    1.71 +    cls.add_method('SetInterframeGap', 
    1.72 +                   'void', 
    1.73 +                   [param('ns3::Time', 't')])
    1.74 +    ## emu-net-device.h: void ns3::EmuNetDevice::Start(ns3::Time tStart) [member function]
    1.75 +    cls.add_method('Start', 
    1.76 +                   'void', 
    1.77 +                   [param('ns3::Time', 'tStart')])
    1.78 +    ## emu-net-device.h: void ns3::EmuNetDevice::Stop(ns3::Time tStop) [member function]
    1.79 +    cls.add_method('Stop', 
    1.80 +                   'void', 
    1.81 +                   [param('ns3::Time', 'tStop')])
    1.82 +    ## emu-net-device.h: void ns3::EmuNetDevice::SetQueue(ns3::Ptr<ns3::Queue> queue) [member function]
    1.83 +    cls.add_method('SetQueue', 
    1.84 +                   'void', 
    1.85 +                   [param('ns3::Ptr< ns3::Queue >', 'queue')])
    1.86 +    ## emu-net-device.h: void ns3::EmuNetDevice::Receive(ns3::Ptr<ns3::Packet> p) [member function]
    1.87 +    cls.add_method('Receive', 
    1.88 +                   'void', 
    1.89 +                   [param('ns3::Ptr< ns3::Packet >', 'p')])
    1.90 +    ## emu-net-device.h: void ns3::EmuNetDevice::SetAddress(ns3::Mac48Address addr) [member function]
    1.91 +    cls.add_method('SetAddress', 
    1.92 +                   'void', 
    1.93 +                   [param('ns3::Mac48Address', 'addr')])
    1.94 +    ## emu-net-device.h: void ns3::EmuNetDevice::SetName(std::string const name) [member function]
    1.95 +    cls.add_method('SetName', 
    1.96 +                   'void', 
    1.97 +                   [param('std::string const', 'name')], 
    1.98 +                   is_virtual=True)
    1.99 +    ## emu-net-device.h: std::string ns3::EmuNetDevice::GetName() const [member function]
   1.100 +    cls.add_method('GetName', 
   1.101 +                   'std::string', 
   1.102 +                   [], 
   1.103 +                   is_const=True, is_virtual=True)
   1.104 +    ## emu-net-device.h: void ns3::EmuNetDevice::SetIfIndex(uint32_t const index) [member function]
   1.105 +    cls.add_method('SetIfIndex', 
   1.106 +                   'void', 
   1.107 +                   [param('uint32_t const', 'index')], 
   1.108 +                   is_virtual=True)
   1.109 +    ## emu-net-device.h: uint32_t ns3::EmuNetDevice::GetIfIndex() const [member function]
   1.110 +    cls.add_method('GetIfIndex', 
   1.111 +                   'uint32_t', 
   1.112 +                   [], 
   1.113 +                   is_const=True, is_virtual=True)
   1.114 +    ## emu-net-device.h: ns3::Ptr<ns3::Channel> ns3::EmuNetDevice::GetChannel() const [member function]
   1.115 +    cls.add_method('GetChannel', 
   1.116 +                   'ns3::Ptr< ns3::Channel >', 
   1.117 +                   [], 
   1.118 +                   is_const=True, is_virtual=True)
   1.119 +    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetAddress() const [member function]
   1.120 +    cls.add_method('GetAddress', 
   1.121 +                   'ns3::Address', 
   1.122 +                   [], 
   1.123 +                   is_const=True, is_virtual=True)
   1.124 +    ## emu-net-device.h: bool ns3::EmuNetDevice::SetMtu(uint16_t const mtu) [member function]
   1.125 +    cls.add_method('SetMtu', 
   1.126 +                   'bool', 
   1.127 +                   [param('uint16_t const', 'mtu')], 
   1.128 +                   is_virtual=True)
   1.129 +    ## emu-net-device.h: uint16_t ns3::EmuNetDevice::GetMtu() const [member function]
   1.130 +    cls.add_method('GetMtu', 
   1.131 +                   'uint16_t', 
   1.132 +                   [], 
   1.133 +                   is_const=True, is_virtual=True)
   1.134 +    ## emu-net-device.h: bool ns3::EmuNetDevice::IsLinkUp() const [member function]
   1.135 +    cls.add_method('IsLinkUp', 
   1.136 +                   'bool', 
   1.137 +                   [], 
   1.138 +                   is_const=True, is_virtual=True)
   1.139 +    ## emu-net-device.h: void ns3::EmuNetDevice::SetLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
   1.140 +    cls.add_method('SetLinkChangeCallback', 
   1.141 +                   'void', 
   1.142 +                   [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], 
   1.143 +                   is_virtual=True)
   1.144 +    ## emu-net-device.h: bool ns3::EmuNetDevice::IsBroadcast() const [member function]
   1.145 +    cls.add_method('IsBroadcast', 
   1.146 +                   'bool', 
   1.147 +                   [], 
   1.148 +                   is_const=True, is_virtual=True)
   1.149 +    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetBroadcast() const [member function]
   1.150 +    cls.add_method('GetBroadcast', 
   1.151 +                   'ns3::Address', 
   1.152 +                   [], 
   1.153 +                   is_const=True, is_virtual=True)
   1.154 +    ## emu-net-device.h: bool ns3::EmuNetDevice::IsMulticast() const [member function]
   1.155 +    cls.add_method('IsMulticast', 
   1.156 +                   'bool', 
   1.157 +                   [], 
   1.158 +                   is_const=True, is_virtual=True)
   1.159 +    ## emu-net-device.h: ns3::Address ns3::EmuNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
   1.160 +    cls.add_method('GetMulticast', 
   1.161 +                   'ns3::Address', 
   1.162 +                   [param('ns3::Ipv4Address', 'multicastGroup')], 
   1.163 +                   is_const=True, is_virtual=True)
   1.164 +    ## emu-net-device.h: bool ns3::EmuNetDevice::IsPointToPoint() const [member function]
   1.165 +    cls.add_method('IsPointToPoint', 
   1.166 +                   'bool', 
   1.167 +                   [], 
   1.168 +                   is_const=True, is_virtual=True)
   1.169 +    ## emu-net-device.h: bool ns3::EmuNetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
   1.170 +    cls.add_method('Send', 
   1.171 +                   'bool', 
   1.172 +                   [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   1.173 +                   is_virtual=True)
   1.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]
   1.175 +    cls.add_method('SendFrom', 
   1.176 +                   'bool', 
   1.177 +                   [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   1.178 +                   is_virtual=True)
   1.179 +    ## emu-net-device.h: ns3::Ptr<ns3::Node> ns3::EmuNetDevice::GetNode() const [member function]
   1.180 +    cls.add_method('GetNode', 
   1.181 +                   'ns3::Ptr< ns3::Node >', 
   1.182 +                   [], 
   1.183 +                   is_const=True, is_virtual=True)
   1.184 +    ## emu-net-device.h: void ns3::EmuNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
   1.185 +    cls.add_method('SetNode', 
   1.186 +                   'void', 
   1.187 +                   [param('ns3::Ptr< ns3::Node >', 'node')], 
   1.188 +                   is_virtual=True)
   1.189 +    ## emu-net-device.h: bool ns3::EmuNetDevice::NeedsArp() const [member function]
   1.190 +    cls.add_method('NeedsArp', 
   1.191 +                   'bool', 
   1.192 +                   [], 
   1.193 +                   is_const=True, is_virtual=True)
   1.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> cb) [member function]
   1.195 +    cls.add_method('SetReceiveCallback', 
   1.196 +                   'void', 
   1.197 +                   [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty >', 'cb')], 
   1.198 +                   is_virtual=True)
   1.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> cb) [member function]
   1.200 +    cls.add_method('SetPromiscReceiveCallback', 
   1.201 +                   'void', 
   1.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 >', 'cb')], 
   1.203 +                   is_virtual=True)
   1.204 +    ## emu-net-device.h: bool ns3::EmuNetDevice::SupportsSendFrom() const [member function]
   1.205 +    cls.add_method('SupportsSendFrom', 
   1.206 +                   'bool', 
   1.207 +                   [], 
   1.208 +                   is_const=True, is_virtual=True)
   1.209 +    ## emu-net-device.h: void ns3::EmuNetDevice::DoDispose() [member function]
   1.210 +    cls.add_method('DoDispose', 
   1.211 +                   'void', 
   1.212 +                   [], 
   1.213 +                   visibility='private', is_virtual=True)
   1.214 +    return
   1.215 +
   1.216 +def register_functions(root_module):
   1.217 +    module = root_module
   1.218 +    register_functions_ns3_internal(module.get_submodule('internal'), root_module)
   1.219 +    register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
   1.220 +    register_functions_ns3_Config(module.get_submodule('Config'), root_module)
   1.221 +    register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
   1.222 +    return
   1.223 +
   1.224 +def register_functions_ns3_internal(module, root_module):
   1.225 +    return
   1.226 +
   1.227 +def register_functions_ns3_TimeStepPrecision(module, root_module):
   1.228 +    return
   1.229 +
   1.230 +def register_functions_ns3_Config(module, root_module):
   1.231 +    return
   1.232 +
   1.233 +def register_functions_ns3_olsr(module, root_module):
   1.234 +    return
   1.235 +