Update bindings
authorGustavo J. A. M. Carneiro <gjc@inescporto.pt>
Mon May 04 13:49:48 2009 +0100 (9 months ago)
changeset 39461b8ebe6139b1
parent 3945 91e35f21dcd0
child 3947 c7912e6fe8b9
Update bindings
bindings/python/ns3_module_flow_monitor.py
src/contrib/flow-monitor/flow-monitor.h
     1.1 --- a/bindings/python/ns3_module_flow_monitor.py	Thu Apr 30 19:25:52 2009 +0100
     1.2 +++ b/bindings/python/ns3_module_flow_monitor.py	Mon May 04 13:49:48 2009 +0100
     1.3 @@ -19,6 +19,8 @@
     1.4      module.add_class('FlowMonitor', parent=root_module['ns3::Object'])
     1.5      ## flow-monitor.h: ns3::FlowMonitor::FlowStats [struct]
     1.6      module.add_class('FlowStats', outer_class=root_module['ns3::FlowMonitor'])
     1.7 +    ## histogram.h: ns3::Histogram [class]
     1.8 +    module.add_class('Histogram', parent=root_module['ns3::Object'])
     1.9      module.add_container('std::map< unsigned int, ns3::FlowProbe::FlowStats >', ('unsigned int', 'ns3::FlowProbe::FlowStats'), container_type='map')
    1.10      module.add_container('std::map< unsigned int, ns3::FlowMonitor::FlowStats >', ('unsigned int', 'ns3::FlowMonitor::FlowStats'), container_type='map')
    1.11      typehandlers.add_type_alias('uint32_t', 'ns3::FlowPacketId')
    1.12 @@ -73,6 +75,7 @@
    1.13      register_Ns3Ipv4FlowProbe_methods(root_module, root_module['ns3::Ipv4FlowProbe'])
    1.14      register_Ns3FlowMonitor_methods(root_module, root_module['ns3::FlowMonitor'])
    1.15      register_Ns3FlowMonitorFlowStats_methods(root_module, root_module['ns3::FlowMonitor::FlowStats'])
    1.16 +    register_Ns3Histogram_methods(root_module, root_module['ns3::Histogram'])
    1.17      return
    1.18  
    1.19  def register_Ns3FlowClassifier_methods(root_module, cls):
    1.20 @@ -260,6 +263,49 @@
    1.21      cls.add_constructor([])
    1.22      return
    1.23  
    1.24 +def register_Ns3Histogram_methods(root_module, cls):
    1.25 +    ## histogram.h: ns3::Histogram::Histogram(ns3::Histogram const & arg0) [copy constructor]
    1.26 +    cls.add_constructor([param('ns3::Histogram const &', 'arg0')])
    1.27 +    ## histogram.h: static ns3::TypeId ns3::Histogram::GetTypeId() [member function]
    1.28 +    cls.add_method('GetTypeId', 
    1.29 +                   'ns3::TypeId', 
    1.30 +                   [], 
    1.31 +                   is_static=True)
    1.32 +    ## histogram.h: ns3::TypeId ns3::Histogram::GetInstanceTypeId() const [member function]
    1.33 +    cls.add_method('GetInstanceTypeId', 
    1.34 +                   'ns3::TypeId', 
    1.35 +                   [], 
    1.36 +                   is_const=True, is_virtual=True)
    1.37 +    ## histogram.h: ns3::Histogram::Histogram() [constructor]
    1.38 +    cls.add_constructor([])
    1.39 +    ## histogram.h: void ns3::Histogram::SetBinWidth(double binWidth) [member function]
    1.40 +    cls.add_method('SetBinWidth', 
    1.41 +                   'void', 
    1.42 +                   [param('double', 'binWidth')])
    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: double ns3::Histogram::GetBinStart(uint32_t index) [member function]
    1.49 +    cls.add_method('GetBinStart', 
    1.50 +                   'double', 
    1.51 +                   [param('uint32_t', 'index')])
    1.52 +    ## histogram.h: double ns3::Histogram::GetBinWidth(uint32_t index) const [member function]
    1.53 +    cls.add_method('GetBinWidth', 
    1.54 +                   'double', 
    1.55 +                   [param('uint32_t', 'index')], 
    1.56 +                   is_const=True)
    1.57 +    ## histogram.h: uint32_t ns3::Histogram::GetBinCount(uint32_t index) [member function]
    1.58 +    cls.add_method('GetBinCount', 
    1.59 +                   'uint32_t', 
    1.60 +                   [param('uint32_t', 'index')])
    1.61 +    ## histogram.h: void ns3::Histogram::AddHistogramValue(double value) [member function]
    1.62 +    cls.add_method('AddHistogramValue', 
    1.63 +                   'void', 
    1.64 +                   [param('double', 'value')])
    1.65 +    return
    1.66 +
    1.67  def register_functions(root_module):
    1.68      module = root_module
    1.69      register_functions_ns3_Config(module.get_submodule('Config'), root_module)
     2.1 --- a/src/contrib/flow-monitor/flow-monitor.h	Thu Apr 30 19:25:52 2009 +0100
     2.2 +++ b/src/contrib/flow-monitor/flow-monitor.h	Mon May 04 13:49:48 2009 +0100
     2.3 @@ -65,11 +65,11 @@
     2.4  
     2.5    // --- methods to be used by the FlowMonitorProbe's only ---
     2.6    void AddProbe (Ptr<FlowProbe> probe);
     2.7 -  void AddDelayVal (double delay);
     2.8    void ReportFirstTx (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
     2.9    void ReportForwarding (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
    2.10    void ReportLastRx (Ptr<FlowProbe> probe, FlowId flowId, FlowPacketId packetId, uint32_t packetSize);
    2.11    
    2.12 +
    2.13    /// Check right now for packets that appear to be lost
    2.14    void CheckForLostPackets ();
    2.15    void CheckForLostPackets (Time maxDelay);