Wiselib
wiselib.testing/algorithms/tracking/PLTT_spread_metrics.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 ** This file is part of the generic algorithm library Wiselib.           **
00003 ** Copyright (C) 2008,2009 by the Wisebed (www.wisebed.eu) project.      **
00004 **                                                                       **
00005 ** The Wiselib is free software: you can redistribute it and/or modify   **
00006 ** it under the terms of the GNU Lesser General Public License as        **
00007 ** published by the Free Software Foundation, either version 3 of the    **
00008 ** License, or (at your option) any later version.                       **
00009 **                                                                       **
00010 ** The Wiselib is distributed in the hope that it will be useful,        **
00011 ** but WITHOUT ANY WARRANTY; without even the implied warranty of        **
00012 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         **
00013 ** GNU Lesser General Public License for more details.                   **
00014 **                                                                       **
00015 ** You should have received a copy of the GNU Lesser General Public      **
00016 ** License along with the Wiselib.                                       **
00017 ** If not, see <http://www.gnu.org/licenses/>.                           **
00018 ***************************************************************************/
00019 #ifndef __PLTT_SPREAD_METRICS_H__
00020 #define __PLTT_SPREAD_METRICS_H__
00021 
00022 namespace wiselib
00023 {
00024    template< typename Integer_P>
00025    class PLTT_TargetSpreadMetricType
00026    {
00027    public:
00028       typedef Integer_P Integer;
00029       PLTT_TargetSpreadMetricType() :
00030          trace_messages_send ( 0 ),
00031          trace_messages_bytes_send ( 0 )
00032       {}
00033       Integer get_trace_messages_send(){ return trace_messages_send; }
00034       Integer get_trace_messages_bytes_send(){ return trace_messages_bytes_send; }
00035       void inc_trace_messages_send() { trace_messages_send++; }
00036       void inc_trace_messages_bytes_send( Integer _bytes_num ) { trace_messages_bytes_send = trace_messages_bytes_send + _bytes_num; }
00037       void reset()
00038       {
00039          trace_messages_send = 0;
00040          trace_messages_bytes_send = 0;
00041       }
00042    private:
00043       Integer trace_messages_send;
00044       Integer trace_messages_bytes_send;
00045    };
00046 
00047 
00048 
00049    template <  typename node_id_t_P,
00050             typename Integer_P>
00051    class PLTT_PassiveSpreadMetricType
00052    {
00053    public:
00054       typedef node_id_t_P node_id_t;
00055       typedef Integer_P Integer;
00056       PLTT_PassiveSpreadMetricType(){}
00057       PLTT_PassiveSpreadMetricType( node_id_t _target_id )
00058       {
00059          spread_messages_send = 0;
00060          spread_messages_received = 0;
00061          spread_messages_bytes_received = 0;
00062          spread_messages_inhibited = 0;
00063          spread_messages_bytes_send = 0;
00064          spread_messages_bytes_inhibited = 0;
00065          inhibition_messages_send = 0;
00066          inhibition_messages_bytes_send = 0;
00067          inhibition_messages_bytes_inhibited = 0;
00068          inhibition_messages_inhibited = 0;
00069 #ifndef OPT_TARGET_LIST_AGGREGATION
00070          inhibition_messages_received = 0;
00071          inhibition_messages_bytes_received = 0;
00072 #endif
00073          target_id = _target_id;
00074       }
00075       ~PLTT_PassiveSpreadMetricType(){}
00076       void inc_spread_messages_send( void ) { ++spread_messages_send; }
00077       void inc_spread_messages_bytes_send( Integer _bytes_num ) { spread_messages_bytes_send = spread_messages_bytes_send + _bytes_num; }
00078       void inc_spread_messages_inhibited( void ) { ++spread_messages_inhibited; }
00079       void inc_spread_messages_bytes_inhibited( Integer _bytes_num ) { spread_messages_bytes_inhibited = spread_messages_bytes_inhibited + _bytes_num; }
00080       void inc_spread_messages_received( void ) { ++spread_messages_received; }
00081       void inc_spread_messages_bytes_received( Integer _bytes_num ) { spread_messages_bytes_received = spread_messages_bytes_received + _bytes_num; }
00082       void inc_inhibition_messages_send( void ) { ++inhibition_messages_send; }
00083       void inc_inhibition_messages_bytes_send( Integer _bytes_num ) { inhibition_messages_bytes_send = inhibition_messages_bytes_send + _bytes_num; }
00084       void inc_inhibition_messages_inhibited( void ) { ++inhibition_messages_inhibited; }
00085       void inc_inhibition_messages_bytes_inhibited( Integer _bytes_num ) { inhibition_messages_bytes_inhibited = inhibition_messages_bytes_inhibited + _bytes_num; }
00086       Integer get_spread_messages_send( void ) { return spread_messages_send; }
00087       Integer get_spread_messages_bytes_send( void ) { return spread_messages_bytes_send; }
00088       Integer get_spread_messages_received( void ) { return spread_messages_received; }
00089       Integer get_spread_messages_bytes_received( void ) { return spread_messages_bytes_received; }
00090       Integer get_spread_messages_inhibited( void ) { return spread_messages_inhibited; }
00091       Integer get_spread_messages_bytes_inhibited( void ) { return spread_messages_bytes_inhibited; }
00092       Integer get_inhibition_messages_send( void ) { return inhibition_messages_send; }
00093       Integer get_inhibition_messages_bytes_send( void ) { return inhibition_messages_bytes_send; }
00094       Integer get_inhibition_messages_inhibited( void ) { return inhibition_messages_inhibited; }
00095       Integer get_inhibition_messages_bytes_inhibited( void ) { return inhibition_messages_bytes_inhibited; }
00096 #ifndef OPT_TARGET_LIST_AGGREGATION
00097       void inc_inhibition_messages_received( void ) { ++inhibition_messages_received; }
00098       void inc_inhibition_messages_bytes_received( Integer _bytes_num ) { inhibition_messages_bytes_received = inhibition_messages_bytes_received + _bytes_num; }
00099       Integer get_inhibition_messages_received( void ) { return inhibition_messages_received; }
00100       Integer get_inhibition_messages_bytes_received( void ) { return inhibition_messages_bytes_received; }
00101 #endif
00102       node_id_t get_target_id( void )  { return target_id; }
00103       void reset( void )
00104       {
00105          spread_messages_send = 0;
00106          spread_messages_bytes_send = 0;
00107          spread_messages_inhibited = 0;
00108          spread_messages_bytes_inhibited = 0;
00109          spread_messages_received = 0;
00110          spread_messages_bytes_received = 0;
00111          inhibition_messages_send = 0;
00112          inhibition_messages_bytes_send = 0;
00113          inhibition_messages_inhibited = 0;
00114          inhibition_messages_bytes_inhibited = 0;
00115 #ifndef OPT_TARGET_LIST_AGGREGATION
00116          inhibition_messages_received = 0;
00117          inhibition_messages_bytes_received = 0;
00118 #endif
00119       }
00120    private:
00121       node_id_t target_id;
00122       Integer spread_messages_send;
00123       Integer spread_messages_bytes_send;
00124       Integer spread_messages_inhibited;
00125       Integer spread_messages_bytes_inhibited;
00126       Integer spread_messages_received;
00127       Integer spread_messages_bytes_received;
00128       Integer inhibition_messages_send;
00129       Integer inhibition_messages_bytes_send;
00130       Integer inhibition_messages_inhibited;
00131       Integer inhibition_messages_bytes_inhibited;
00132 #ifndef OPT_TARGET_LIST_AGGREGATION
00133       Integer inhibition_messages_received;
00134       Integer inhibition_messages_bytes_received;
00135 
00136 #endif
00137    };
00138 
00139    template <  typename PLTT_PassiveSpreadMetric_P,
00140             typename PLTT_PassiveSpreadMetricList_P>
00141    class PLTT_PassiveSpreadMetricsType
00142    {
00143    public:
00144       typedef PLTT_PassiveSpreadMetric_P PLTT_PassiveSpreadMetric;
00145       typedef typename PLTT_PassiveSpreadMetric::Integer Integer;
00146       typedef typename PLTT_PassiveSpreadMetric::node_id_t node_id_t;
00147       typedef PLTT_PassiveSpreadMetricList_P PLTT_PassiveSpreadMetricList;
00148       typedef typename PLTT_PassiveSpreadMetricList::iterator PLTT_PassiveSpreadMetricListIterator;
00149       PLTT_PassiveSpreadMetricsType()
00150       {
00151 #ifdef OPT_TARGET_LIST_AGGREGATION
00152       inhibition_messages_received = 0;
00153       inhibition_messages_bytes_received = 0;
00154 #endif
00155       }
00156       ~PLTT_PassiveSpreadMetricsType()
00157       {}
00158       //---------------------------------------------------------------------------------------
00159       PLTT_PassiveSpreadMetric* find_metrics_of_target( node_id_t _target_id )
00160       {
00161          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00162          {
00163             if ( i->get_target_id() == _target_id )
00164             {
00165                return &(*i);
00166             }
00167          }
00168          return NULL;
00169       }
00170       //---------------------------------------------------------------------------------------
00171       Integer get_spread_messages_send_of_target( node_id_t _target_id )
00172       {
00173          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00174          if ( p != NULL )
00175          {
00176             return p->get_spread_messages_send();
00177          }
00178       }
00179       //---------------------------------------------------------------------------------------
00180       Integer get_spread_messages_bytes_send_of_target( node_id_t _target_id )
00181       {
00182          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00183          if ( p != NULL )
00184          {
00185             return p->get_spread_messages_bytes_send();
00186          }
00187       }
00188       //---------------------------------------------------------------------------------------
00189       Integer get_spread_messages_inhibited_of_target( node_id_t _target_id )
00190       {
00191          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00192          if ( p != NULL )
00193          {
00194             return p->get_spread_messages_inhibited();
00195          }
00196       }
00197       //---------------------------------------------------------------------------------------
00198       Integer get_spread_messages_bytes_inhibited_of_target( node_id_t _target_id )
00199       {
00200          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00201          if ( p != NULL )
00202          {
00203             return p->get_spread_messages_bytes_inhibited();
00204          }
00205       }
00206       //---------------------------------------------------------------------------------------
00207       Integer get_spread_messages_received_of_target( node_id_t _target_id )
00208       {
00209          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00210          if ( p != NULL )
00211          {
00212             return p->get_spread_messages_received();
00213          }
00214       }
00215       //---------------------------------------------------------------------------------------
00216       Integer get_spread_messages_bytes_received_of_target( node_id_t _target_id )
00217       {
00218          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00219          if ( p != NULL )
00220          {
00221             return p->get_spread_messages_bytes_received();
00222          }
00223       }
00224       //---------------------------------------------------------------------------------------
00225       void inc_spread_messages_send_of_target( node_id_t _target_id )
00226       {
00227          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00228          if ( p != NULL )
00229          {
00230             p->inc_spread_messages_send();
00231          }
00232          else
00233          {
00234             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00235             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00236             i->inc_spread_messages_send();
00237          }
00238       }
00239       //---------------------------------------------------------------------------------------
00240       void inc_spread_messages_bytes_send_of_target( node_id_t _target_id, Integer _bytes_num )
00241       {
00242          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00243          if ( p != NULL )
00244          {
00245             p->inc_spread_messages_bytes_send( _bytes_num );
00246          }
00247          else
00248          {
00249             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00250             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00251             i->inc_spread_messages_bytes_send( _bytes_num );
00252          }
00253       }
00254       //---------------------------------------------------------------------------------------
00255       void inc_spread_messages_inhibited_of_target( node_id_t _target_id )
00256       {
00257          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00258          if ( p != NULL )
00259          {
00260             p->inc_spread_messages_inhibited();
00261          }
00262          else
00263          {
00264             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00265             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00266             i->inc_spread_messages_inhibited();
00267          }
00268       }
00269       //---------------------------------------------------------------------------------------
00270       void inc_spread_messages_bytes_inhibited_of_target( node_id_t _target_id, Integer _bytes_num )
00271       {
00272          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00273          if ( p != NULL )
00274          {
00275             p->inc_spread_messages_bytes_inhibited( _bytes_num );
00276          }
00277          else
00278          {
00279             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00280             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00281             i->inc_spread_messages_bytes_inhibited( _bytes_num );
00282          }
00283       }
00284       //---------------------------------------------------------------------------------------
00285       void inc_spread_messages_received_of_target( node_id_t _target_id )
00286       {
00287          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00288          if ( p != NULL )
00289          {
00290             p->inc_spread_messages_received();
00291          }
00292          else
00293          {
00294             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00295             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00296             i->inc_spread_messages_received();
00297          }
00298       }
00299       //---------------------------------------------------------------------------------------
00300       void inc_spread_messages_bytes_received_of_target( node_id_t _target_id, Integer _bytes_num )
00301       {
00302          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00303          if ( p != NULL )
00304          {
00305             p->inc_spread_messages_bytes_received( _bytes_num );
00306          }
00307          else
00308          {
00309             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00310             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00311             i->inc_spread_messages_bytes_received( _bytes_num );
00312          }
00313       }
00314       //---------------------------------------------------------------------------------------
00315       Integer get_inhibition_messages_inhibited_of_target( node_id_t _target_id )
00316       {
00317          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00318          if ( p != NULL )
00319          {
00320             return p->get_inhibition_messages_inhibited();
00321          }
00322       }
00323       //---------------------------------------------------------------------------------------
00324       Integer get_inhibition_messages_bytes_inhibited_of_target( node_id_t _target_id )
00325       {
00326          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00327          if ( p != NULL )
00328          {
00329             return p->get_inhibition_messages_bytes_inhibited();
00330          }
00331       }
00332       //---------------------------------------------------------------------------------------
00333       Integer get_inhibition_messages_send_of_target( node_id_t _target_id )
00334       {
00335          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00336          if ( p != NULL )
00337          {
00338             return p->get_inhibition_messages_send();
00339          }
00340       }
00341       //---------------------------------------------------------------------------------------
00342       Integer get_inhibition_messages_bytes_send_of_target( node_id_t _target_id )
00343       {
00344          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00345          if ( p != NULL )
00346          {
00347             return p->get_inhibition_messages_bytes_send();
00348          }
00349       }
00350       //---------------------------------------------------------------------------------------
00351       void inc_inhibition_messages_send_of_target( node_id_t _target_id )
00352       {
00353          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00354          if ( p != NULL )
00355          {
00356             p->inc_inhibition_messages_send();
00357          }
00358          else
00359          {
00360             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00361             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00362             i->inc_inhibition_messages_send();
00363          }
00364       }
00365       //---------------------------------------------------------------------------------------
00366       void inc_inhibition_messages_bytes_send_of_target( node_id_t _target_id, Integer _bytes_num )
00367       {
00368          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00369          if ( p != NULL )
00370          {
00371             p->inc_inhibition_messages_bytes_send( _bytes_num );
00372          }
00373          else
00374          {
00375             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00376             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00377             i->inc_inhibition_messages_bytes_send( _bytes_num );
00378          }
00379       }
00380       //---------------------------------------------------------------------------------------
00381       void inc_inhibition_messages_inhibited_of_target( node_id_t _target_id )
00382       {
00383          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00384          if ( p != NULL )
00385          {
00386             p->inc_inhibition_messages_inhibited();
00387          }
00388          else
00389          {
00390             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00391             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00392             i->inc_inhibition_messages_inhibited();
00393          }
00394       }
00395       //---------------------------------------------------------------------------------------
00396       void inc_inhibition_messages_bytes_inhibited_of_target( node_id_t _target_id, Integer _bytes_num )
00397       {
00398          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00399          if ( p != NULL )
00400          {
00401             p->inc_inhibition_messages_bytes_inhibited( _bytes_num );
00402          }
00403          else
00404          {
00405             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00406             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00407             i->inc_inhibition_messages_bytes_inhibited( _bytes_num );
00408          }
00409       }
00410       //---------------------------------------------------------------------------------------
00411 
00412 #ifndef OPT_TARGET_LIST_AGGREGATION
00413       Integer get_inhibition_messages_received_of_target( node_id_t _target_id )
00414       {
00415          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00416          if ( p != NULL )
00417          {
00418             return p->get_inhibition_messages_received();
00419          }
00420       }
00421       //---------------------------------------------------------------------------------------
00422       Integer get_inhibition_messages_bytes_received_of_target( node_id_t _target_id )
00423       {
00424          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00425          if ( p != NULL )
00426          {
00427             return p->get_inhibition_messages_bytes_received();
00428          }
00429       }
00430       void inc_inhibition_messages_received_of_target( node_id_t _target_id )
00431       {
00432          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00433          if ( p != NULL )
00434          {
00435             p->inc_inhibition_messages_received();
00436          }
00437          else
00438          {
00439             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00440             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00441             i->inc_inhibition_messages_received();
00442          }
00443       }
00444       //---------------------------------------------------------------------------------------
00445       void inc_inhibition_messages_bytes_received_of_target( node_id_t _target_id, Integer _bytes_num )
00446       {
00447          PLTT_PassiveSpreadMetric* p = find_metrics_of_target( _target_id );
00448          if ( p != NULL )
00449          {
00450             p->inc_inhibition_messages_bytes_received( _bytes_num );
00451          }
00452          else
00453          {
00454             passive_spread_metric_list.push_back( PLTT_PassiveSpreadMetric( _target_id ) );
00455             PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.end() - 1;
00456             i->inc_inhibition_messages_bytes_received( _bytes_num );
00457          }
00458       }
00459       //---------------------------------------------------------------------------------------
00460 #else
00461       //---------------------------------------------------------------------------------------
00462       void inc_inhibition_messages_received(){ ++inhibition_messages_received; }
00463       //---------------------------------------------------------------------------------------
00464       void inc_inhibition_messages_bytes_received( Integer _bytes_num ) { inhibition_messages_bytes_received = inhibition_messages_bytes_received + _bytes_num; }
00465       //---------------------------------------------------------------------------------------
00466 #endif
00467       //---------------------------------------------------------------------------------------
00468       void reset( void )
00469       {
00470          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00471          {
00472             i->reset();
00473          }
00474       }
00475       //---------------------------------------------------------------------------------------
00476       Integer get_inhibition_messages_send()
00477       {
00478          Integer num = 0;
00479          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00480          {
00481             num = num + i->get_inhibition_messages_send();
00482          }
00483          return num;
00484       }
00485       Integer get_inhibition_messages_bytes_send()
00486       {
00487          Integer num = 0;
00488          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00489          {
00490             num = num + i->get_inhibition_messages_bytes_send();
00491          }
00492          return num;
00493       }
00494       Integer get_inhibition_messages_received()
00495       {
00496          #ifndef OPT_TARGET_LIST_AGGREGATION
00497          Integer num = 0;
00498          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00499          {
00500             num = num + i->get_inhibition_messages_received();
00501          }
00502          return num;
00503          #else
00504          return inhibition_messages_received;
00505          #endif
00506       }
00507       Integer get_inhibition_messages_bytes_received()
00508       {
00509          #ifndef OPT_TARGET_LIST_AGGREGATION
00510          Integer num = 0;
00511          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00512          {
00513             num = num + i->get_inhibition_messages_bytes_received();
00514          }
00515          return num;
00516          #else
00517          return inhibition_messages_bytes_received;
00518          #endif
00519       }
00520       Integer get_inhibition_messages_inhibited()
00521       {
00522          Integer num = 0;
00523          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00524          {
00525             num = num + i->get_inhibition_messages_inhibited();
00526          }
00527          return num;
00528       }
00529       Integer get_inhibition_messages_bytes_inhibited()
00530       {
00531          Integer num = 0;
00532          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00533          {
00534             num = num + i->get_inhibition_messages_bytes_inhibited();
00535          }
00536          return num;
00537       }
00538       Integer get_spread_messages_send()
00539       {
00540          Integer num = 0;
00541          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00542          {
00543             num = num + i->get_spread_messages_send();
00544          }
00545          return num;
00546       }
00547       Integer get_spread_messages_bytes_send()
00548       {
00549          Integer num = 0;
00550          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00551          {
00552             num = num + i->get_spread_messages_bytes_send();
00553          }
00554          return num;
00555       }
00556       Integer get_spread_messages_received()
00557       {
00558          Integer num = 0;
00559          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00560          {
00561             num = num + i->get_spread_messages_received();
00562          }
00563          return num;
00564       }
00565       Integer get_spread_messages_bytes_received()
00566       {
00567          Integer num = 0;
00568          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00569          {
00570             num = num + i->get_spread_messages_bytes_received();
00571          }
00572          return num;
00573       }
00574       Integer get_spread_messages_inhibited()
00575       {
00576          Integer num = 0;
00577          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00578          {
00579             num = num + i->get_spread_messages_inhibited();
00580          }
00581          return num;
00582       }
00583       Integer get_spread_messages_bytes_inhibited()
00584       {
00585          Integer num = 0;
00586          for (PLTT_PassiveSpreadMetricListIterator i = passive_spread_metric_list.begin(); i != passive_spread_metric_list.end(); ++i )
00587          {
00588             num = num + i->get_spread_messages_bytes_inhibited();
00589          }
00590          return num;
00591       }
00592       Integer get_messages_send()
00593       {
00594          return get_spread_messages_send() + get_inhibition_messages_send();
00595       }
00596       Integer get_messages_bytes_send()
00597       {
00598          return get_spread_messages_bytes_send() + get_inhibition_messages_bytes_send();
00599       }
00600       Integer get_messages_received()
00601       {
00602          return get_spread_messages_received() + get_inhibition_messages_received();
00603       }
00604       Integer get_messages_bytes_received()
00605       {
00606          return get_spread_messages_bytes_received() + get_inhibition_messages_bytes_received();
00607       }
00608       Integer get_messages_inhibited()
00609       {
00610          return get_spread_messages_inhibited() + get_inhibition_messages_inhibited();
00611       }
00612       Integer get_messages_bytes_inhibited()
00613       {
00614          return get_spread_messages_bytes_inhibited() + get_inhibition_messages_bytes_inhibited();
00615       }
00616       PLTT_PassiveSpreadMetricList* get_passive_spread_metric_list ()
00617       {
00618          return &passive_spread_metric_list;
00619       }
00620    private:
00621       PLTT_PassiveSpreadMetricList passive_spread_metric_list;
00622 #ifdef OPT_TARGET_LIST_AGGREGATION
00623       Integer inhibition_messages_received;
00624       Integer inhibition_messages_bytes_received;
00625 #endif
00626    };
00627 }
00628 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines