bindings/python/ns3_module_point_to_point.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     ## ppp-header.h: ns3::PppHeader [class]
     7     module.add_class('PppHeader', parent=root_module['ns3::Header'])
     8     ## point-to-point-channel.h: ns3::PointToPointChannel [class]
     9     module.add_class('PointToPointChannel', parent=root_module['ns3::Channel'])
    10     ## point-to-point-net-device.h: ns3::PointToPointNetDevice [class]
    11     module.add_class('PointToPointNetDevice', parent=root_module['ns3::NetDevice'])
    12     
    13     ## Register a nested module for the namespace Config
    14     
    15     nested_module = module.add_cpp_namespace('Config')
    16     register_types_ns3_Config(nested_module)
    17     
    18     
    19     ## Register a nested module for the namespace TimeStepPrecision
    20     
    21     nested_module = module.add_cpp_namespace('TimeStepPrecision')
    22     register_types_ns3_TimeStepPrecision(nested_module)
    23     
    24     
    25     ## Register a nested module for the namespace addressUtils
    26     
    27     nested_module = module.add_cpp_namespace('addressUtils')
    28     register_types_ns3_addressUtils(nested_module)
    29     
    30     
    31     ## Register a nested module for the namespace internal
    32     
    33     nested_module = module.add_cpp_namespace('internal')
    34     register_types_ns3_internal(nested_module)
    35     
    36     
    37     ## Register a nested module for the namespace olsr
    38     
    39     nested_module = module.add_cpp_namespace('olsr')
    40     register_types_ns3_olsr(nested_module)
    41     
    42 
    43 def register_types_ns3_Config(module):
    44     root_module = module.get_root()
    45     
    46 
    47 def register_types_ns3_TimeStepPrecision(module):
    48     root_module = module.get_root()
    49     
    50 
    51 def register_types_ns3_addressUtils(module):
    52     root_module = module.get_root()
    53     
    54 
    55 def register_types_ns3_internal(module):
    56     root_module = module.get_root()
    57     
    58 
    59 def register_types_ns3_olsr(module):
    60     root_module = module.get_root()
    61     
    62 
    63 def register_methods(root_module):
    64     register_Ns3PppHeader_methods(root_module, root_module['ns3::PppHeader'])
    65     register_Ns3PointToPointChannel_methods(root_module, root_module['ns3::PointToPointChannel'])
    66     register_Ns3PointToPointNetDevice_methods(root_module, root_module['ns3::PointToPointNetDevice'])
    67     return
    68 
    69 def register_Ns3PppHeader_methods(root_module, cls):
    70     ## ppp-header.h: ns3::PppHeader::PppHeader(ns3::PppHeader const & arg0) [copy constructor]
    71     cls.add_constructor([param('ns3::PppHeader const &', 'arg0')])
    72     ## ppp-header.h: ns3::PppHeader::PppHeader() [constructor]
    73     cls.add_constructor([])
    74     ## ppp-header.h: static ns3::TypeId ns3::PppHeader::GetTypeId() [member function]
    75     cls.add_method('GetTypeId', 
    76                    'ns3::TypeId', 
    77                    [], 
    78                    is_static=True)
    79     ## ppp-header.h: ns3::TypeId ns3::PppHeader::GetInstanceTypeId() const [member function]
    80     cls.add_method('GetInstanceTypeId', 
    81                    'ns3::TypeId', 
    82                    [], 
    83                    is_const=True, is_virtual=True)
    84     ## ppp-header.h: void ns3::PppHeader::Print(std::ostream & os) const [member function]
    85     cls.add_method('Print', 
    86                    'void', 
    87                    [param('std::ostream &', 'os')], 
    88                    is_const=True, is_virtual=True)
    89     ## ppp-header.h: void ns3::PppHeader::Serialize(ns3::Buffer::Iterator start) const [member function]
    90     cls.add_method('Serialize', 
    91                    'void', 
    92                    [param('ns3::Buffer::Iterator', 'start')], 
    93                    is_const=True, is_virtual=True)
    94     ## ppp-header.h: uint32_t ns3::PppHeader::Deserialize(ns3::Buffer::Iterator start) [member function]
    95     cls.add_method('Deserialize', 
    96                    'uint32_t', 
    97                    [param('ns3::Buffer::Iterator', 'start')], 
    98                    is_virtual=True)
    99     ## ppp-header.h: uint32_t ns3::PppHeader::GetSerializedSize() const [member function]
   100     cls.add_method('GetSerializedSize', 
   101                    'uint32_t', 
   102                    [], 
   103                    is_const=True, is_virtual=True)
   104     return
   105 
   106 def register_Ns3PointToPointChannel_methods(root_module, cls):
   107     ## point-to-point-channel.h: ns3::PointToPointChannel::PointToPointChannel(ns3::PointToPointChannel const & arg0) [copy constructor]
   108     cls.add_constructor([param('ns3::PointToPointChannel const &', 'arg0')])
   109     ## point-to-point-channel.h: static ns3::TypeId ns3::PointToPointChannel::GetTypeId() [member function]
   110     cls.add_method('GetTypeId', 
   111                    'ns3::TypeId', 
   112                    [], 
   113                    is_static=True)
   114     ## point-to-point-channel.h: ns3::PointToPointChannel::PointToPointChannel() [constructor]
   115     cls.add_constructor([])
   116     ## point-to-point-channel.h: void ns3::PointToPointChannel::Attach(ns3::Ptr<ns3::PointToPointNetDevice> device) [member function]
   117     cls.add_method('Attach', 
   118                    'void', 
   119                    [param('ns3::Ptr< ns3::PointToPointNetDevice >', 'device')])
   120     ## point-to-point-channel.h: bool ns3::PointToPointChannel::TransmitStart(ns3::Ptr<ns3::Packet> p, ns3::Ptr<ns3::PointToPointNetDevice> src, ns3::Time txTime) [member function]
   121     cls.add_method('TransmitStart', 
   122                    'bool', 
   123                    [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ptr< ns3::PointToPointNetDevice >', 'src'), param('ns3::Time', 'txTime')])
   124     ## point-to-point-channel.h: uint32_t ns3::PointToPointChannel::GetNDevices() const [member function]
   125     cls.add_method('GetNDevices', 
   126                    'uint32_t', 
   127                    [], 
   128                    is_const=True, is_virtual=True)
   129     ## point-to-point-channel.h: ns3::Ptr<ns3::PointToPointNetDevice> ns3::PointToPointChannel::GetPointToPointDevice(uint32_t i) const [member function]
   130     cls.add_method('GetPointToPointDevice', 
   131                    'ns3::Ptr< ns3::PointToPointNetDevice >', 
   132                    [param('uint32_t', 'i')], 
   133                    is_const=True)
   134     ## point-to-point-channel.h: ns3::Ptr<ns3::NetDevice> ns3::PointToPointChannel::GetDevice(uint32_t i) const [member function]
   135     cls.add_method('GetDevice', 
   136                    'ns3::Ptr< ns3::NetDevice >', 
   137                    [param('uint32_t', 'i')], 
   138                    is_const=True, is_virtual=True)
   139     return
   140 
   141 def register_Ns3PointToPointNetDevice_methods(root_module, cls):
   142     ## point-to-point-net-device.h: ns3::PointToPointNetDevice::PointToPointNetDevice(ns3::PointToPointNetDevice const & arg0) [copy constructor]
   143     cls.add_constructor([param('ns3::PointToPointNetDevice const &', 'arg0')])
   144     ## point-to-point-net-device.h: static ns3::TypeId ns3::PointToPointNetDevice::GetTypeId() [member function]
   145     cls.add_method('GetTypeId', 
   146                    'ns3::TypeId', 
   147                    [], 
   148                    is_static=True)
   149     ## point-to-point-net-device.h: ns3::PointToPointNetDevice::PointToPointNetDevice() [constructor]
   150     cls.add_constructor([])
   151     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetDataRate(ns3::DataRate bps) [member function]
   152     cls.add_method('SetDataRate', 
   153                    'void', 
   154                    [param('ns3::DataRate', 'bps')])
   155     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetInterframeGap(ns3::Time t) [member function]
   156     cls.add_method('SetInterframeGap', 
   157                    'void', 
   158                    [param('ns3::Time', 't')])
   159     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::Attach(ns3::Ptr<ns3::PointToPointChannel> ch) [member function]
   160     cls.add_method('Attach', 
   161                    'bool', 
   162                    [param('ns3::Ptr< ns3::PointToPointChannel >', 'ch')])
   163     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetQueue(ns3::Ptr<ns3::Queue> queue) [member function]
   164     cls.add_method('SetQueue', 
   165                    'void', 
   166                    [param('ns3::Ptr< ns3::Queue >', 'queue')])
   167     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetReceiveErrorModel(ns3::Ptr<ns3::ErrorModel> em) [member function]
   168     cls.add_method('SetReceiveErrorModel', 
   169                    'void', 
   170                    [param('ns3::Ptr< ns3::ErrorModel >', 'em')])
   171     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::Receive(ns3::Ptr<ns3::Packet> p) [member function]
   172     cls.add_method('Receive', 
   173                    'void', 
   174                    [param('ns3::Ptr< ns3::Packet >', 'p')])
   175     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetFrameSize(uint16_t frameSize) [member function]
   176     cls.add_method('SetFrameSize', 
   177                    'void', 
   178                    [param('uint16_t', 'frameSize')])
   179     ## point-to-point-net-device.h: uint16_t ns3::PointToPointNetDevice::GetFrameSize() const [member function]
   180     cls.add_method('GetFrameSize', 
   181                    'uint16_t', 
   182                    [], 
   183                    is_const=True)
   184     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetIfIndex(uint32_t const index) [member function]
   185     cls.add_method('SetIfIndex', 
   186                    'void', 
   187                    [param('uint32_t const', 'index')], 
   188                    is_virtual=True)
   189     ## point-to-point-net-device.h: uint32_t ns3::PointToPointNetDevice::GetIfIndex() const [member function]
   190     cls.add_method('GetIfIndex', 
   191                    'uint32_t', 
   192                    [], 
   193                    is_const=True, is_virtual=True)
   194     ## point-to-point-net-device.h: ns3::Ptr<ns3::Channel> ns3::PointToPointNetDevice::GetChannel() const [member function]
   195     cls.add_method('GetChannel', 
   196                    'ns3::Ptr< ns3::Channel >', 
   197                    [], 
   198                    is_const=True, is_virtual=True)
   199     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetAddress(ns3::Address address) [member function]
   200     cls.add_method('SetAddress', 
   201                    'void', 
   202                    [param('ns3::Address', 'address')], 
   203                    is_virtual=True)
   204     ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetAddress() const [member function]
   205     cls.add_method('GetAddress', 
   206                    'ns3::Address', 
   207                    [], 
   208                    is_const=True, is_virtual=True)
   209     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::SetMtu(uint16_t const mtu) [member function]
   210     cls.add_method('SetMtu', 
   211                    'bool', 
   212                    [param('uint16_t const', 'mtu')], 
   213                    is_virtual=True)
   214     ## point-to-point-net-device.h: uint16_t ns3::PointToPointNetDevice::GetMtu() const [member function]
   215     cls.add_method('GetMtu', 
   216                    'uint16_t', 
   217                    [], 
   218                    is_const=True, is_virtual=True)
   219     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsLinkUp() const [member function]
   220     cls.add_method('IsLinkUp', 
   221                    'bool', 
   222                    [], 
   223                    is_const=True, is_virtual=True)
   224     ## 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, ns3::empty, ns3::empty, ns3::empty> callback) [member function]
   225     cls.add_method('SetLinkChangeCallback', 
   226                    'void', 
   227                    [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], 
   228                    is_virtual=True)
   229     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsBroadcast() const [member function]
   230     cls.add_method('IsBroadcast', 
   231                    'bool', 
   232                    [], 
   233                    is_const=True, is_virtual=True)
   234     ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetBroadcast() const [member function]
   235     cls.add_method('GetBroadcast', 
   236                    'ns3::Address', 
   237                    [], 
   238                    is_const=True, is_virtual=True)
   239     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsMulticast() const [member function]
   240     cls.add_method('IsMulticast', 
   241                    'bool', 
   242                    [], 
   243                    is_const=True, is_virtual=True)
   244     ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function]
   245     cls.add_method('GetMulticast', 
   246                    'ns3::Address', 
   247                    [param('ns3::Ipv4Address', 'multicastGroup')], 
   248                    is_const=True, is_virtual=True)
   249     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsPointToPoint() const [member function]
   250     cls.add_method('IsPointToPoint', 
   251                    'bool', 
   252                    [], 
   253                    is_const=True, is_virtual=True)
   254     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::IsBridge() const [member function]
   255     cls.add_method('IsBridge', 
   256                    'bool', 
   257                    [], 
   258                    is_const=True, is_virtual=True)
   259     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::Send(ns3::Ptr<ns3::Packet> packet, ns3::Address const & dest, uint16_t protocolNumber) [member function]
   260     cls.add_method('Send', 
   261                    'bool', 
   262                    [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   263                    is_virtual=True)
   264     ## 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]
   265     cls.add_method('SendFrom', 
   266                    'bool', 
   267                    [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], 
   268                    is_virtual=True)
   269     ## point-to-point-net-device.h: ns3::Ptr<ns3::Node> ns3::PointToPointNetDevice::GetNode() const [member function]
   270     cls.add_method('GetNode', 
   271                    'ns3::Ptr< ns3::Node >', 
   272                    [], 
   273                    is_const=True, is_virtual=True)
   274     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::SetNode(ns3::Ptr<ns3::Node> node) [member function]
   275     cls.add_method('SetNode', 
   276                    'void', 
   277                    [param('ns3::Ptr< ns3::Node >', 'node')], 
   278                    is_virtual=True)
   279     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::NeedsArp() const [member function]
   280     cls.add_method('NeedsArp', 
   281                    'bool', 
   282                    [], 
   283                    is_const=True, is_virtual=True)
   284     ## 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, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
   285     cls.add_method('SetReceiveCallback', 
   286                    'void', 
   287                    [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')], 
   288                    is_virtual=True)
   289     ## point-to-point-net-device.h: ns3::Address ns3::PointToPointNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function]
   290     cls.add_method('GetMulticast', 
   291                    'ns3::Address', 
   292                    [param('ns3::Ipv6Address', 'addr')], 
   293                    is_const=True, is_virtual=True)
   294     ## 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, ns3::empty, ns3::empty, ns3::empty> cb) [member function]
   295     cls.add_method('SetPromiscReceiveCallback', 
   296                    'void', 
   297                    [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')], 
   298                    is_virtual=True)
   299     ## point-to-point-net-device.h: bool ns3::PointToPointNetDevice::SupportsSendFrom() const [member function]
   300     cls.add_method('SupportsSendFrom', 
   301                    'bool', 
   302                    [], 
   303                    is_const=True, is_virtual=True)
   304     ## point-to-point-net-device.h: void ns3::PointToPointNetDevice::DoDispose() [member function]
   305     cls.add_method('DoDispose', 
   306                    'void', 
   307                    [], 
   308                    visibility='private', is_virtual=True)
   309     return
   310 
   311 def register_functions(root_module):
   312     module = root_module
   313     register_functions_ns3_Config(module.get_submodule('Config'), root_module)
   314     register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
   315     register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)
   316     register_functions_ns3_internal(module.get_submodule('internal'), root_module)
   317     register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
   318     return
   319 
   320 def register_functions_ns3_Config(module, root_module):
   321     return
   322 
   323 def register_functions_ns3_TimeStepPrecision(module, root_module):
   324     return
   325 
   326 def register_functions_ns3_addressUtils(module, root_module):
   327     return
   328 
   329 def register_functions_ns3_internal(module, root_module):
   330     return
   331 
   332 def register_functions_ns3_olsr(module, root_module):
   333     return
   334