1.1 --- a/bindings/python/ns3_module_flow_monitor.py Tue May 05 18:17:27 2009 +0100
1.2 +++ b/bindings/python/ns3_module_flow_monitor.py Tue May 05 18:21:41 2009 +0100
1.3 @@ -3,6 +3,8 @@
1.4 def register_types(module):
1.5 root_module = module.get_root()
1.6
1.7 + ## histogram.h: ns3::Histogram [class]
1.8 + module.add_class('Histogram')
1.9 ## flow-classifier.h: ns3::FlowClassifier [class]
1.10 module.add_class('FlowClassifier', parent=root_module['ns3::RefCountBase'])
1.11 ## flow-probe.h: ns3::FlowProbe [class]
1.12 @@ -19,8 +21,6 @@
1.13 module.add_class('FlowMonitor', parent=root_module['ns3::Object'])
1.14 ## flow-monitor.h: ns3::FlowMonitor::FlowStats [struct]
1.15 module.add_class('FlowStats', outer_class=root_module['ns3::FlowMonitor'])
1.16 - ## histogram.h: ns3::Histogram [class]
1.17 - module.add_class('Histogram', parent=root_module['ns3::Object'])
1.18 module.add_container('std::map< unsigned int, ns3::FlowProbe::FlowStats >', ('unsigned int', 'ns3::FlowProbe::FlowStats'), container_type='map')
1.19 module.add_container('std::map< unsigned int, ns3::FlowMonitor::FlowStats >', ('unsigned int', 'ns3::FlowMonitor::FlowStats'), container_type='map')
1.20 typehandlers.add_type_alias('uint32_t', 'ns3::FlowPacketId')
1.21 @@ -67,6 +67,7 @@
1.22
1.23
1.24 def register_methods(root_module):
1.25 + register_Ns3Histogram_methods(root_module, root_module['ns3::Histogram'])
1.26 register_Ns3FlowClassifier_methods(root_module, root_module['ns3::FlowClassifier'])
1.27 register_Ns3FlowProbe_methods(root_module, root_module['ns3::FlowProbe'])
1.28 register_Ns3FlowProbeFlowStats_methods(root_module, root_module['ns3::FlowProbe::FlowStats'])
1.29 @@ -75,7 +76,50 @@
1.30 register_Ns3Ipv4FlowProbe_methods(root_module, root_module['ns3::Ipv4FlowProbe'])
1.31 register_Ns3FlowMonitor_methods(root_module, root_module['ns3::FlowMonitor'])
1.32 register_Ns3FlowMonitorFlowStats_methods(root_module, root_module['ns3::FlowMonitor::FlowStats'])
1.33 - register_Ns3Histogram_methods(root_module, root_module['ns3::Histogram'])
1.34 + return
1.35 +
1.36 +def register_Ns3Histogram_methods(root_module, cls):
1.37 + ## histogram.h: ns3::Histogram::Histogram(ns3::Histogram const & arg0) [copy constructor]
1.38 + cls.add_constructor([param('ns3::Histogram const &', 'arg0')])
1.39 + ## histogram.h: ns3::Histogram::Histogram(double binWidth) [constructor]
1.40 + cls.add_constructor([param('double', 'binWidth')])
1.41 + ## histogram.h: ns3::Histogram::Histogram() [constructor]
1.42 + cls.add_constructor([])
1.43 + ## histogram.h: uint32_t ns3::Histogram::GetNBins() const [member function]
1.44 + cls.add_method('GetNBins',
1.45 + 'uint32_t',
1.46 + [],
1.47 + is_const=True)
1.48 + ## histogram.h: uint32_t ns3::Histogram::GetSize() const [member function]
1.49 + cls.add_method('GetSize',
1.50 + 'uint32_t',
1.51 + [],
1.52 + is_const=True)
1.53 + ## histogram.h: double ns3::Histogram::GetBinStart(uint32_t index) [member function]
1.54 + cls.add_method('GetBinStart',
1.55 + 'double',
1.56 + [param('uint32_t', 'index')])
1.57 + ## histogram.h: double ns3::Histogram::GetBinEnd(uint32_t index) [member function]
1.58 + cls.add_method('GetBinEnd',
1.59 + 'double',
1.60 + [param('uint32_t', 'index')])
1.61 + ## histogram.h: double ns3::Histogram::GetBinWidth(uint32_t index) const [member function]
1.62 + cls.add_method('GetBinWidth',
1.63 + 'double',
1.64 + [param('uint32_t', 'index')],
1.65 + is_const=True)
1.66 + ## histogram.h: void ns3::Histogram::SetBinWidth(double binWidth) [member function]
1.67 + cls.add_method('SetBinWidth',
1.68 + 'void',
1.69 + [param('double', 'binWidth')])
1.70 + ## histogram.h: uint32_t ns3::Histogram::GetBinCount(uint32_t index) [member function]
1.71 + cls.add_method('GetBinCount',
1.72 + 'uint32_t',
1.73 + [param('uint32_t', 'index')])
1.74 + ## histogram.h: void ns3::Histogram::AddHistogramValue(double value) [member function]
1.75 + cls.add_method('AddHistogramValue',
1.76 + 'void',
1.77 + [param('double', 'value')])
1.78 return
1.79
1.80 def register_Ns3FlowClassifier_methods(root_module, cls):
1.81 @@ -257,55 +301,18 @@
1.82 cls.add_instance_attribute('lostPackets', 'uint32_t', is_const=False)
1.83 ## flow-monitor.h: ns3::FlowMonitor::FlowStats::timesForwarded [variable]
1.84 cls.add_instance_attribute('timesForwarded', 'uint32_t', is_const=False)
1.85 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::delayHistogram [variable]
1.86 + cls.add_instance_attribute('delayHistogram', 'ns3::Histogram', is_const=False)
1.87 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::jitterHistogram [variable]
1.88 + cls.add_instance_attribute('jitterHistogram', 'ns3::Histogram', is_const=False)
1.89 + ## flow-monitor.h: ns3::FlowMonitor::FlowStats::packetSizeHistogram [variable]
1.90 + cls.add_instance_attribute('packetSizeHistogram', 'ns3::Histogram', is_const=False)
1.91 ## flow-monitor.h: ns3::FlowMonitor::FlowStats::FlowStats(ns3::FlowMonitor::FlowStats const & arg0) [copy constructor]
1.92 cls.add_constructor([param('ns3::FlowMonitor::FlowStats const &', 'arg0')])
1.93 ## flow-monitor.h: ns3::FlowMonitor::FlowStats::FlowStats() [constructor]
1.94 cls.add_constructor([])
1.95 return
1.96
1.97 -def register_Ns3Histogram_methods(root_module, cls):
1.98 - ## histogram.h: ns3::Histogram::Histogram(ns3::Histogram const & arg0) [copy constructor]
1.99 - cls.add_constructor([param('ns3::Histogram const &', 'arg0')])
1.100 - ## histogram.h: static ns3::TypeId ns3::Histogram::GetTypeId() [member function]
1.101 - cls.add_method('GetTypeId',
1.102 - 'ns3::TypeId',
1.103 - [],
1.104 - is_static=True)
1.105 - ## histogram.h: ns3::TypeId ns3::Histogram::GetInstanceTypeId() const [member function]
1.106 - cls.add_method('GetInstanceTypeId',
1.107 - 'ns3::TypeId',
1.108 - [],
1.109 - is_const=True, is_virtual=True)
1.110 - ## histogram.h: ns3::Histogram::Histogram() [constructor]
1.111 - cls.add_constructor([])
1.112 - ## histogram.h: void ns3::Histogram::SetBinWidth(double binWidth) [member function]
1.113 - cls.add_method('SetBinWidth',
1.114 - 'void',
1.115 - [param('double', 'binWidth')])
1.116 - ## histogram.h: uint32_t ns3::Histogram::GetNBins() const [member function]
1.117 - cls.add_method('GetNBins',
1.118 - 'uint32_t',
1.119 - [],
1.120 - is_const=True)
1.121 - ## histogram.h: double ns3::Histogram::GetBinStart(uint32_t index) [member function]
1.122 - cls.add_method('GetBinStart',
1.123 - 'double',
1.124 - [param('uint32_t', 'index')])
1.125 - ## histogram.h: double ns3::Histogram::GetBinWidth(uint32_t index) const [member function]
1.126 - cls.add_method('GetBinWidth',
1.127 - 'double',
1.128 - [param('uint32_t', 'index')],
1.129 - is_const=True)
1.130 - ## histogram.h: uint32_t ns3::Histogram::GetBinCount(uint32_t index) [member function]
1.131 - cls.add_method('GetBinCount',
1.132 - 'uint32_t',
1.133 - [param('uint32_t', 'index')])
1.134 - ## histogram.h: void ns3::Histogram::AddHistogramValue(double value) [member function]
1.135 - cls.add_method('AddHistogramValue',
1.136 - 'void',
1.137 - [param('double', 'value')])
1.138 - return
1.139 -
1.140 def register_functions(root_module):
1.141 module = root_module
1.142 register_functions_ns3_Config(module.get_submodule('Config'), root_module)