bindings/python/ns3_module_point_to_point.py
author vincent@clarinet.u-strasbg.fr
Wed, 05 Nov 2008 14:49:21 -0800
changeset 3842 545ddf9398ed
parent 3731 317f9dbccc2b
child 3855 7fdcbeea6c4f
permissions -rw-r--r--
apply patch for bug 294 (GetMulticastAddr) + emu device update + rescan
     1 from pybindgen import Module, FileCodeSink, param, retval, cppclass
     2 
     3 def register_types(module):
     4     root_module = module.get_root()
     5     
     6     ## point-to-point-channel.h: ns3::PointToPointChannel [class]
     7     module.add_class('PointToPointChannel', parent=root_module['ns3::Channel'])
     8     ## point-to-point-net-device.h: ns3::PointToPointNetDevice [class]
     9     module.add_class('PointToPointNetDevice', parent=root_module['ns3::NetDevice'])
    10     
    11     ## Register a nested module for the namespace internal
    12     
    13     nested_module = module.add_cpp_namespace('internal')
    14     register_types_ns3_internal(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 Config
    24     
    25     nested_module = module.add_cpp_namespace('Config')
    26     register_types_ns3_Config(nested_module)
    27     
    28     
    29     ## Register a nested module for the namespace olsr
    30     
    31     nested_module = module.add_cpp_namespace('olsr')
    32     register_types_ns3_olsr(nested_module)
    33     
    34 
    35 def register_types_ns3_internal(module):
    36     root_module = module.get_root()
    37     
    38 
    39 def register_types_ns3_TimeStepPrecision(module):
    40     root_module = module.get_root()
    41     
    42 
    43 def register_types_ns3_Config(module):
    44     root_module = module.get_root()
    45     
    46 
    47 def register_types_ns3_olsr(module):
    48     root_module = module.get_root()
    49     
    50 
    51 def register_methods(root_module):
    52     register_Ns3PointToPointChannel_methods(root_module, root_module['ns3::PointToPointChannel'])
    53     register_Ns3PointToPointNetDevice_methods(root_module, root_module['ns3::PointToPointNetDevice'])
    54     return
    55 
    56 def register_Ns3PointToPointChannel_methods(root_module, cls):
    57     ## point-to-point-channel.h: ns3::PointToPointChannel::PointToPointChannel(ns3::PointToPointChannel const & arg0) [copy constructor]
    58     cls.add_constructor([param('ns3::PointToPointChannel const &', 'arg0')])
    59     ## point-to-point-channel.h: static ns3::TypeId ns3::PointToPointChannel::GetTypeId() [member function]
    60     cls.add_method('GetTypeId', 
    61                    'ns3::TypeId', 
    62                    [], 
    63                    is_static=True)
    64     ## point-to-point-channel.h: ns3::PointToPointChannel::PointToPointChannel() [constructor]
    65     cls.add_constructor([])
    66     ## point-to-point-channel.h: void ns3::PointToPointChannel::Attach(ns3::Ptr<ns3::PointToPointNetDevice> device) [member function]
    67     cls.add_method('Attach', 
    68                    'void', 
    69                    [param('ns3::Ptr< ns3::PointToPointNetDevice >', 'device')])
    70     ## point-to-point-channel.h: bool ns3::PointToPointChannel::TransmitStart(ns3::Ptr<ns3::Packet> p, ns3::Ptr<ns3::PointToPointNetDevice> src, ns3::Time txTime) [member function]
    71     cls.add_method('TransmitStart', 
    72                    'bool', 
    73                    [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ptr< ns3::PointToPointNetDevice >', 'src'), param('ns3::Time', 'txTime')])
    74     ## point-to-point-channel.h: uint32_t ns3::PointToPointChannel::GetNDevices() const [member function]
    75     cls.add_method('GetNDevices', 
    76                    'uint32_t', 
    77                    [], 
    78                    is_const=True, is_virtual=True)
    79     ## point-to-point-channel.h: ns3::Ptr<ns3::PointToPointNetDevice> ns3::PointToPointChannel::GetPointToPointDevice(uint32_t i) const [member function]
    80     cls.add_method('GetPointToPointDevice', 
    81                    'ns3::Ptr< ns3::PointToPointNetDevice >', 
    82                    [param('uint32_t', 'i')], 
    83                    is_const=True)
    84     ## point-to-point-channel.h: ns3::Ptr<ns3::NetDevice> ns3::PointToPointChannel::GetDevice(uint32_t i) const [member function]
    85     cls.add_method('GetDevice', 
    86                    'ns3::Ptr< ns3::NetDevice >', 
    87                    [param('uint32_t', 'i')], 
    88                    is_const=True, is_virtual=True)
    89     return
    90 
    91 def register_Ns3PointToPointNetDevice_methods(root_module, cls):
    92     ## point-to-point-net-device.h: ns3::PointToPointNetDevice::PointToPointNetDevice(ns3::PointToPointNetDevice const & arg0) [copy constructor]
    93     cls.add_constructor([param('ns3::PointToPointNetDevice const &', 'arg0')])
    94     ## point-to-point-net-device.h: static ns3::TypeId ns3::PointToPointNetDevice::GetTypeId() [member function]
    95     cls.add_method('GetTypeId', 
    96                    'ns3::TypeId', 
    97                    [], 
    98                    is_static=True)
    99     ## point-to-point-net-device.h: ns3::PointToPointNetDevice::PointToPointNetDevice() [constructor]
   100     cls.add_constructor([])
   101     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetDataRate(ns3::DataRate bps) [member function]
   102     cls.add_method('SetDataRate', 
   103                    'void', 
   104                    [param('ns3::DataRate', 'bps')])
   105     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetInterframeGap(ns3::Time t) [member function]
   106     cls.add_method('SetInterframeGap', 
   107                    'void', 
   108                    [param('ns3::Time', 't')])
   109     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::Attach(ns3::Ptr<ns3::PointToPointChannel> ch) [member function]
   110     cls.add_method('Attach', 
   111                    'bool', 
   112                    [param('ns3::Ptr< ns3::PointToPointChannel >', 'ch')])
   113     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetQueue(ns3::Ptr<ns3::Queue> queue) [member function]
   114     cls.add_method('SetQueue', 
   115                    'void', 
   116                    [param('ns3::Ptr< ns3::Queue >', 'queue')])
   117     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetReceiveErrorModel(ns3::Ptr<ns3::ErrorModel> em) [member function]
   118     cls.add_method('SetReceiveErrorModel', 
   119                    'void', 
   120                    [param('ns3::Ptr< ns3::ErrorModel >', 'em')])
   121     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::Receive(ns3::Ptr<ns3::Packet> p) [member function]
   122     cls.add_method('Receive', 
   123                    'void', 
   124                    [param('ns3::Ptr< ns3::Packet >', 'p')])
   125     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetAddress(ns3::Mac48Address addr) [member function]
   126     cls.add_method('SetAddress', 
   127                    'void', 
   128                    [param('ns3::Mac48Address', 'addr')])
   129     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetFrameSize(uint16_t frameSize) [member function]
   130     cls.add_method('SetFrameSize', 
   131                    'void', 
   132                    [param('uint16_t', 'frameSize')])
   133     ## point-to-point-net-device.h: uint16_t ns3::PointToPointNetDevice::GetFrameSize() const [member function]
   134     cls.add_method('GetFrameSize', 
   135                    'uint16_t', 
   136                    [], 
   137                    is_const=True)
   138     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetName(std::string const name) [member function]
   139     cls.add_method('SetName', 
   140                    'void', 
   141                    [param('std::string const', 'name')], 
   142                    is_virtual=True)
   143     ## point-to-point-net-device.h: std::string ns3::PointToPointNetDevice::GetName() const [member function]
   144     cls.add_method('GetName', 
   145                    'std::string', 
   146                    [], 
   147                    is_const=True, is_virtual=True)
   148     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetIfIndex(uint32_t const index) [member function]
   149     cls.add_method('SetIfIndex', 
   150                    'void', 
   151                    [param('uint32_t const', 'index')], 
   152                    is_virtual=True)
   153     ## point-to-point-net-device.h: uint32_t ns3::PointToPointNetDevice::GetIfIndex() const [member function]
   154     cls.add_method('GetIfIndex', 
   155                    'uint32_t', 
   156                    [], 
   157                    is_const=True, is_virtual=True)
   158     ## point-to-point-net-device.h: ns3::Ptr<ns3::Channel> ns3::PointToPointNetDevice::GetChannel() const [member function]
   159     cls.add_method('GetChannel', 
   160                    'ns3::Ptr< ns3::Channel >', 
   161                    [], 
   162                    is_const=True, is_virtual=True)
   163     ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetAddress() const [member function]
   164     cls.add_method('GetAddress', 
   165                    'ns3::Address', 
   166                    [], 
   167                    is_const=True, is_virtual=True)
   168     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::SetMtu(uint16_t const mtu) [member function]
   169     cls.add_method('SetMtu', 
   170                    'bool', 
   171                    [param('uint16_t const', 'mtu')], 
   172                    is_virtual=True)
   173     ## point-to-point-net-device.h: uint16_t ns3::PointToPointNetDevice::GetMtu() const [member function]
   174     cls.add_method('GetMtu', 
   175                    'uint16_t', 
   176                    [], 
   177                    is_const=True, is_virtual=True)
   178     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsLinkUp() const [member function]
   179     cls.add_method('IsLinkUp', 
   180                    'bool', 
   181                    [], 
   182                    is_const=True, is_virtual=True)
   183     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetLinkChangeCallback(ns3::Callback<void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
   184     cls.add_method('SetLinkChangeCallback', 
   185                    'void', 
   186                    [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], 
   187                    is_virtual=True)
   188     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsBroadcast() const [member function]
   189     cls.add_method('IsBroadcast', 
   190                    'bool', 
   191                    [], 
   192                    is_const=True, is_virtual=True)
   193     ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetBroadcast() const [member function]
   194     cls.add_method('GetBroadcast', 
   195                    'ns3::Address', 
   196                    [], 
   197                    is_const=True, is_virtual=True)
   198     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsMulticast() const [member function]
   199     cls.add_method('IsMulticast', 
   200                    'bool', 
   201                    [], 
   202                    is_const=True, is_virtual=True)
   203     ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
   204     cls.add_method('GetMulticast', 
   205                    'ns3::Address', 
   206                    [param('ns3::Ipv4Address', 'multicastGroup')], 
   207                    is_const=True, is_virtual=True)
   208     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsPointToPoint() const [member function]
   209     cls.add_method('IsPointToPoint', 
   210                    'bool', 
   211                    [], 
   212                    is_const=True, is_virtual=True)
   213     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
   214     cls.add_method('Send', 
   215                    'bool', 
   216                    [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   217                    is_virtual=True)
   218     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::SendFrom(ns3::Ptr<ns3::Packet> packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function]
   219     cls.add_method('SendFrom', 
   220                    'bool', 
   221                    [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   222                    is_virtual=True)
   223     ## point-to-point-net-device.h: ns3::Ptr<ns3::Node> ns3::PointToPointNetDevice::GetNode() const [member function]
   224     cls.add_method('GetNode', 
   225                    'ns3::Ptr< ns3::Node >', 
   226                    [], 
   227                    is_const=True, is_virtual=True)
   228     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
   229     cls.add_method('SetNode', 
   230                    'void', 
   231                    [param('ns3::Ptr< ns3::Node >', 'node')], 
   232                    is_virtual=True)
   233     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::NeedsArp() const [member function]
   234     cls.add_method('NeedsArp', 
   235                    'bool', 
   236                    [], 
   237                    is_const=True, is_virtual=True)
   238     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::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]
   239     cls.add_method('SetReceiveCallback', 
   240                    'void', 
   241                    [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty >', 'cb')], 
   242                    is_virtual=True)
   243     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::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]
   244     cls.add_method('SetPromiscReceiveCallback', 
   245                    'void', 
   246                    [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')], 
   247                    is_virtual=True)
   248     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::SupportsSendFrom() const [member function]
   249     cls.add_method('SupportsSendFrom', 
   250                    'bool', 
   251                    [], 
   252                    is_const=True, is_virtual=True)
   253     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::DoDispose() [member function]
   254     cls.add_method('DoDispose', 
   255                    'void', 
   256                    [], 
   257                    visibility='private', is_virtual=True)
   258     return
   259 
   260 def register_functions(root_module):
   261     module = root_module
   262     register_functions_ns3_internal(module.get_submodule('internal'), root_module)
   263     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
   264     register_functions_ns3_Config(module.get_submodule('Config'), root_module)
   265     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
   266     return
   267 
   268 def register_functions_ns3_internal(module, root_module):
   269     return
   270 
   271 def register_functions_ns3_TimeStepPrecision(module, root_module):
   272     return
   273 
   274 def register_functions_ns3_Config(module, root_module):
   275     return
   276 
   277 def register_functions_ns3_olsr(module, root_module):
   278     return
   279