Wiselib
|
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_TRACKING_METRICS_H__ 00020 #define __PLTT_TRACKING_METRICS_H__ 00021 #include "PLTT_config.h" 00022 namespace wiselib 00023 { 00024 template < typename node_id_t_P, 00025 typename Integer_P> 00026 class PLTT_TrackerTrackingMetricType 00027 { 00028 public: 00029 typedef Integer_P Integer; 00030 typedef node_id_t_P node_id_t; 00031 PLTT_TrackerTrackingMetricType(){} 00032 PLTT_TrackerTrackingMetricType( node_id_t _target_id ) 00033 { 00034 query_messages_send = 0; 00035 query_messages_bytes_send = 0; 00036 report_messages_received = 0; 00037 report_messages_bytes_received = 0; 00038 echo_messages_send = 0; 00039 echo_messages_bytes_send = 0; 00040 echo_messages_received = 0; 00041 echo_messages_bytes_received = 0; 00042 target_id = _target_id; 00043 } 00044 ~PLTT_TrackerTrackingMetricType( void ){} 00045 void inc_query_messages_send( void ) { ++query_messages_send; } 00046 void inc_query_messages_bytes_send( Integer _bytes_num ) { query_messages_bytes_send = query_messages_bytes_send + _bytes_num; } 00047 void inc_report_messages_received( void ) { ++report_messages_received; } 00048 void inc_report_messages_bytes_received( Integer _bytes_num ) { report_messages_bytes_received = report_messages_bytes_received + _bytes_num; } 00049 void inc_echo_messages_send( void ) { ++echo_messages_send; } 00050 void inc_echo_messages_bytes_send( Integer _bytes_num ) { echo_messages_bytes_send = echo_messages_bytes_send + _bytes_num; } 00051 void inc_echo_messages_received( void ) { ++echo_messages_received; } 00052 void inc_echo_messages_bytes_received( Integer _bytes_num ) { echo_messages_bytes_received = echo_messages_bytes_received + _bytes_num; } 00053 Integer get_query_messages_send( void ) { return query_messages_send; } 00054 Integer get_query_messages_bytes_send( void ) { return query_messages_bytes_send; } 00055 Integer get_report_messages_received( void ) { return report_messages_received; } 00056 Integer get_report_messages_bytes_received( void ) { return report_messages_bytes_received; } 00057 Integer get_echo_messages_send( void ) { return echo_messages_send; } 00058 Integer get_echo_messages_bytes_send( void ) { return echo_messages_bytes_send; } 00059 Integer get_echo_messages_received( void ) { return echo_messages_received; } 00060 Integer get_echo_messages_bytes_received( void ) {return echo_messages_bytes_received; } 00061 node_id_t get_target_id( void ) { return target_id; } 00062 void set_target_id( node_id_t _tar_id ){ target_id = _tar_id; } 00063 void reset() 00064 { 00065 query_messages_send = 0; 00066 query_messages_bytes_send = 0; 00067 report_messages_received = 0; 00068 report_messages_bytes_received = 0; 00069 echo_messages_send = 0; 00070 echo_messages_bytes_send = 0; 00071 echo_messages_received = 0; 00072 echo_messages_bytes_received = 0; 00073 } 00074 private: 00075 node_id_t target_id; 00076 Integer report_messages_received; 00077 Integer report_messages_bytes_received; 00078 Integer query_messages_send; 00079 Integer query_messages_bytes_send; 00080 Integer echo_messages_send; 00081 Integer echo_messages_bytes_send; 00082 Integer echo_messages_received; 00083 Integer echo_messages_bytes_received; 00084 }; 00085 00086 template < typename node_id_t_P, 00087 typename Integer_P> 00088 class PLTT_PassiveTrackingMetricType 00089 { 00090 public: 00091 typedef Integer_P Integer; 00092 typedef node_id_t_P node_id_t; 00093 PLTT_PassiveTrackingMetricType(){} 00094 PLTT_PassiveTrackingMetricType( node_id_t _tracker_id ) 00095 { 00096 report_messages_send = 0; 00097 report_messages_bytes_send = 0; 00098 report_messages_received = 0; 00099 report_messages_bytes_received = 0; 00100 query_messages_send = 0; 00101 query_messages_bytes_send = 0; 00102 query_messages_received = 0; 00103 query_messages_bytes_received = 0; 00104 echo_messages_send = 0; 00105 echo_messages_bytes_send = 0; 00106 echo_messages_received = 0; 00107 echo_messages_bytes_received = 0; 00108 tracker_id = _tracker_id; 00109 } 00110 ~PLTT_PassiveTrackingMetricType( void ){} 00111 void inc_report_messages_send( void ) { ++report_messages_send; } 00112 void inc_report_messages_bytes_send( Integer _bytes_num ) { report_messages_bytes_send = report_messages_bytes_send + _bytes_num; } 00113 void inc_report_messages_received( void ) { ++report_messages_received; } 00114 void inc_report_messages_bytes_received( Integer _bytes_num ) { report_messages_bytes_received = report_messages_bytes_received + _bytes_num; } 00115 void inc_query_messages_send( void ) { ++query_messages_send; } 00116 void inc_query_messages_bytes_send( Integer _bytes_num ) { query_messages_bytes_send = query_messages_bytes_send + _bytes_num; } 00117 void inc_query_messages_received( void ) { ++query_messages_received; } 00118 void inc_query_messages_bytes_received( Integer _bytes_num ) { query_messages_bytes_received = query_messages_bytes_received + _bytes_num; } 00119 void inc_echo_messages_send( void ) { ++echo_messages_send; } 00120 void inc_echo_messages_bytes_send( Integer _bytes_num ) { echo_messages_bytes_send = echo_messages_bytes_send + _bytes_num; } 00121 void inc_echo_messages_received( void ) { ++echo_messages_received; } 00122 void inc_echo_messages_bytes_received( Integer _bytes_num ) { echo_messages_bytes_received = echo_messages_bytes_received + _bytes_num; } 00123 Integer get_report_messages_send( void ) { return report_messages_send; } 00124 Integer get_report_messages_bytes_send( void ) { return report_messages_bytes_send; } 00125 Integer get_query_messages_send( void ) { return query_messages_send; } 00126 Integer get_query_messages_bytes_send( void ) { return query_messages_bytes_send; } 00127 Integer get_query_messages_received( void ) { return query_messages_received; } 00128 Integer get_query_messages_bytes_received( void ) { return query_messages_bytes_received; } 00129 Integer get_report_messages_received( void ) { return report_messages_received; } 00130 Integer get_report_messages_bytes_received( void ) { return report_messages_bytes_received; } 00131 Integer get_echo_messages_send( void ) { return echo_messages_send; } 00132 Integer get_echo_messages_bytes_send( void ) { return echo_messages_bytes_send; } 00133 Integer get_echo_messages_received( void ) { return echo_messages_received; } 00134 Integer get_echo_messages_bytes_received( void ) {return echo_messages_bytes_received; } 00135 node_id_t get_tracker_id( void ) { return tracker_id; } 00136 void reset() 00137 { 00138 report_messages_send = 0; 00139 report_messages_bytes_send = 0; 00140 report_messages_received = 0; 00141 report_messages_bytes_received = 0; 00142 query_messages_send = 0; 00143 query_messages_bytes_send = 0; 00144 query_messages_received = 0; 00145 query_messages_bytes_received = 0; 00146 echo_messages_send = 0; 00147 echo_messages_bytes_send = 0; 00148 echo_messages_received = 0; 00149 echo_messages_bytes_received = 0; 00150 } 00151 private: 00152 node_id_t tracker_id; 00153 Integer report_messages_send; 00154 Integer report_messages_bytes_send; 00155 Integer report_messages_received; 00156 Integer report_messages_bytes_received; 00157 Integer query_messages_send; 00158 Integer query_messages_bytes_send; 00159 Integer query_messages_received; 00160 Integer query_messages_bytes_received; 00161 Integer echo_messages_send; 00162 Integer echo_messages_bytes_send; 00163 Integer echo_messages_received; 00164 Integer echo_messages_bytes_received; 00165 }; 00166 00167 template < typename PLTT_PassiveTrackingMetric_P, 00168 typename PLTT_PassiveTrackingMetricList_P> 00169 class PLTT_PassiveTrackingMetricsType 00170 { 00171 public: 00172 typedef PLTT_PassiveTrackingMetric_P PLTT_PassiveTrackingMetric; 00173 typedef typename PLTT_PassiveTrackingMetric::Integer Integer; 00174 typedef typename PLTT_PassiveTrackingMetric::node_id_t node_id_t; 00175 typedef PLTT_PassiveTrackingMetricList_P PLTT_PassiveTrackingMetricList; 00176 typedef typename PLTT_PassiveTrackingMetricList::iterator PLTT_PassiveTrackingMetricListIterator; 00177 PLTT_PassiveTrackingMetricsType() 00178 {} 00179 ~PLTT_PassiveTrackingMetricsType() 00180 {} 00181 //---------------------------------------------------------------------------------------------------- 00182 PLTT_PassiveTrackingMetric* find_metrics_of_agent_for_tracker( node_id_t _tracker_id ) 00183 { 00184 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00185 { 00186 if ( i->get_tracker_id() == _tracker_id ) 00187 { 00188 return &(*i); 00189 } 00190 } 00191 return NULL; 00192 } 00193 //---------------------------------------------------------------------------------------------------- 00194 Integer get_query_messages_send_of_tracker( node_id_t _tracker_id ) 00195 { 00196 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00197 if ( p != NULL ) 00198 { 00199 return p->get_query_messages_send(); 00200 } 00201 } 00202 //---------------------------------------------------------------------------------------------------- 00203 Integer get_query_messages_bytes_send_of_tracker( node_id_t _tracker_id ) 00204 { 00205 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00206 if ( p != NULL ) 00207 { 00208 return p->get_query_messages_bytes_send(); 00209 } 00210 } 00211 //---------------------------------------------------------------------------------------------------- 00212 Integer get_query_messages_received_of_tracker( node_id_t _tracker_id ) 00213 { 00214 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00215 if ( p != NULL ) 00216 { 00217 return p->get_query_messages_received(); 00218 } 00219 } 00220 //---------------------------------------------------------------------------------------------------- 00221 Integer get_query_messages_bytes_received_of_tracker( node_id_t _tracker_id ) 00222 { 00223 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00224 if ( p != NULL ) 00225 { 00226 return p->get_query_messages_bytes_received_send(); 00227 } 00228 } 00229 //---------------------------------------------------------------------------------------------------- 00230 Integer get_report_messages_send_of_tracker( node_id_t _tracker_id ) 00231 { 00232 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00233 if ( p != NULL ) 00234 { 00235 return p->get_report_messages_send(); 00236 } 00237 } 00238 //---------------------------------------------------------------------------------------------------- 00239 Integer get_report_messages_bytes_send_of_tracker( node_id_t _tracker_id ) 00240 { 00241 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00242 if ( p != NULL ) 00243 { 00244 return p->get_report_messages_bytes_send(); 00245 } 00246 } 00247 //---------------------------------------------------------------------------------------------------- 00248 Integer get_report_messages_received_of_tracker( node_id_t _tracker_id ) 00249 { 00250 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00251 if ( p != NULL ) 00252 { 00253 return p->get_report_messages_received(); 00254 } 00255 } 00256 //---------------------------------------------------------------------------------------------------- 00257 Integer get_report_messages_bytes_received_of_tracker( node_id_t _tracker_id ) 00258 { 00259 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00260 if ( p != NULL ) 00261 { 00262 return p->get_report_messages_bytes_received_send(); 00263 } 00264 } 00265 //---------------------------------------------------------------------------------------------------- 00266 Integer get_echo_messages_send_of_tracker( node_id_t _tracker_id ) 00267 { 00268 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00269 if ( p != NULL ) 00270 { 00271 return p->get_echo_messages_send(); 00272 } 00273 } 00274 //---------------------------------------------------------------------------------------------------- 00275 Integer get_echo_messages_bytes_send_of_tracker( node_id_t _tracker_id ) 00276 { 00277 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00278 if ( p != NULL ) 00279 { 00280 return p->get_echo_messages_bytes_send(); 00281 } 00282 } 00283 //---------------------------------------------------------------------------------------------------- 00284 Integer get_echo_messages_received_of_tracker( node_id_t _tracker_id ) 00285 { 00286 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00287 if ( p != NULL ) 00288 { 00289 return p->get_echo_messages_received(); 00290 } 00291 } 00292 //---------------------------------------------------------------------------------------------------- 00293 Integer get_echo_messages_bytes_received_of_tracker( node_id_t _tracker_id ) 00294 { 00295 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00296 if ( p != NULL ) 00297 { 00298 return p->get_echo_messages_bytes_received_send(); 00299 } 00300 } 00301 //---------------------------------------------------------------------------------------------------- 00302 void inc_query_messages_bytes_send_of_tracker( node_id_t _tracker_id, Integer _bytes_num ) 00303 { 00304 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00305 if ( p != NULL ) 00306 { 00307 return p->inc_query_messages_bytes_received( _bytes_num ); 00308 } 00309 else 00310 { 00311 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00312 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00313 i->inc_query_messages_bytes_received( _bytes_num ); 00314 } 00315 } 00316 //---------------------------------------------------------------------------------------------------- 00317 void inc_query_messages_send_of_tracker( node_id_t _tracker_id ) 00318 { 00319 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00320 if ( p != NULL ) 00321 { 00322 return p->inc_query_messages_send(); 00323 } 00324 else 00325 { 00326 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00327 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00328 i->inc_query_messages_send(); 00329 } 00330 } 00331 //---------------------------------------------------------------------------------------------------- 00332 void inc_query_messages_received_of_tracker( node_id_t _tracker_id ) 00333 { 00334 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00335 if ( p != NULL ) 00336 { 00337 return p->inc_query_messages_received(); 00338 } 00339 else 00340 { 00341 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00342 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00343 i->inc_query_messages_received(); 00344 } 00345 } 00346 //---------------------------------------------------------------------------------------------------- 00347 void inc_query_messages_bytes_received_of_tracker( node_id_t _tracker_id, Integer _bytes_num ) 00348 { 00349 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00350 if ( p != NULL ) 00351 { 00352 return p->inc_query_messages_bytes_received( _bytes_num ); 00353 } 00354 else 00355 { 00356 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00357 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00358 i->inc_query_messages_bytes_received( _bytes_num ); 00359 } 00360 } 00361 //---------------------------------------------------------------------------------------------------- 00362 void inc_report_messages_send_of_tracker( node_id_t _tracker_id ) 00363 { 00364 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00365 if ( p != NULL ) 00366 { 00367 return p->inc_report_messages_send(); 00368 } 00369 else 00370 { 00371 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00372 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00373 i->inc_report_messages_send(); 00374 } 00375 } 00376 //---------------------------------------------------------------------------------------------------- 00377 void inc_report_messages_bytes_send_of_tracker( node_id_t _tracker_id, Integer _bytes_num ) 00378 { 00379 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00380 if ( p != NULL ) 00381 { 00382 return p->inc_report_messages_bytes_send( _bytes_num ); 00383 } 00384 else 00385 { 00386 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00387 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00388 i->inc_report_messages_bytes_send( _bytes_num ); 00389 } 00390 } 00391 //---------------------------------------------------------------------------------------------------- 00392 void inc_report_messages_received_of_tracker( node_id_t _tracker_id ) 00393 { 00394 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00395 if ( p != NULL ) 00396 { 00397 return p->inc_report_messages_received(); 00398 } 00399 else 00400 { 00401 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00402 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00403 i->inc_report_messages_received(); 00404 } 00405 } 00406 //---------------------------------------------------------------------------------------------------- 00407 void inc_report_messages_bytes_received_of_tracker( node_id_t _tracker_id, Integer _bytes_num ) 00408 { 00409 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00410 if ( p != NULL ) 00411 { 00412 return p->inc_report_messages_bytes_received( _bytes_num ); 00413 } 00414 else 00415 { 00416 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00417 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00418 i->inc_report_messages_bytes_received( _bytes_num ); 00419 } 00420 } 00421 //---------------------------------------------------------------------------------------------------- 00422 void inc_echo_messages_send_of_tracker( node_id_t _tracker_id ) 00423 { 00424 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00425 if ( p != NULL ) 00426 { 00427 return p->inc_echo_messages_send(); 00428 } 00429 else 00430 { 00431 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00432 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00433 i->inc_echo_messages_send(); 00434 } 00435 } 00436 //---------------------------------------------------------------------------------------------------- 00437 void inc_echo_messages_bytes_send_of_tracker( node_id_t _tracker_id, Integer _bytes_num ) 00438 { 00439 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00440 if ( p != NULL ) 00441 { 00442 return p->inc_echo_messages_bytes_send( _bytes_num ); 00443 } 00444 else 00445 { 00446 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00447 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00448 i->inc_echo_messages_bytes_send( _bytes_num ); 00449 } 00450 } 00451 //---------------------------------------------------------------------------------------------------- 00452 void inc_echo_messages_received_of_tracker( node_id_t _tracker_id ) 00453 { 00454 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00455 if ( p != NULL ) 00456 { 00457 return p->inc_echo_messages_received(); 00458 } 00459 else 00460 { 00461 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00462 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00463 i->inc_echo_messages_received(); 00464 } 00465 } 00466 //---------------------------------------------------------------------------------------------------- 00467 void inc_echo_messages_bytes_received_of_tracker( node_id_t _tracker_id, Integer _bytes_num ) 00468 { 00469 PLTT_PassiveTrackingMetric* p = find_metrics_of_agent_for_tracker( _tracker_id ); 00470 if ( p != NULL ) 00471 { 00472 return p->inc_echo_messages_bytes_received( _bytes_num ); 00473 } 00474 else 00475 { 00476 passive_tracking_metric_list.push_back( PLTT_PassiveTrackingMetric( _tracker_id ) ); 00477 PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.end() - 1; 00478 i->inc_echo_messages_bytes_received( _bytes_num ); 00479 } 00480 } 00481 //---------------------------------------------------------------------------------------------------- 00482 Integer get_echo_messages_send( void ) 00483 { 00484 Integer num = 0; 00485 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00486 { 00487 num = num + i->get_echo_messages_send(); 00488 } 00489 return num; 00490 } 00491 //---------------------------------------------------------------------------------------------------- 00492 Integer get_echo_messages_bytes_send( void ) 00493 { 00494 Integer num = 0; 00495 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00496 { 00497 num = num + i->get_echo_messages_bytes_send(); 00498 } 00499 return num; 00500 } 00501 //---------------------------------------------------------------------------------------------------- 00502 Integer get_echo_messages_received( void ) 00503 { 00504 Integer num = 0; 00505 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00506 { 00507 num = num + i->get_echo_messages_received(); 00508 } 00509 return num; 00510 } 00511 //---------------------------------------------------------------------------------------------------- 00512 Integer get_echo_messages_bytes_received( void ) 00513 { 00514 Integer num = 0; 00515 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00516 { 00517 num = num + i->get_echo_messages_bytes_received(); 00518 } 00519 return num; 00520 } 00521 //---------------------------------------------------------------------------------------------------- 00522 Integer get_query_messages_send( void ) 00523 { 00524 Integer num = 0; 00525 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00526 { 00527 num = num + i->get_query_messages_send(); 00528 } 00529 return num; 00530 } 00531 //---------------------------------------------------------------------------------------------------- 00532 Integer get_query_messages_bytes_send( void ) 00533 { 00534 Integer num = 0; 00535 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00536 { 00537 num = num + i->get_query_messages_bytes_send(); 00538 } 00539 return num; 00540 } 00541 //---------------------------------------------------------------------------------------------------- 00542 Integer get_query_messages_received( void ) 00543 { 00544 Integer num = 0; 00545 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00546 { 00547 num = num + i->get_query_messages_received(); 00548 } 00549 return num; 00550 } 00551 //---------------------------------------------------------------------------------------------------- 00552 Integer get_query_messages_bytes_received( void ) 00553 { 00554 Integer num = 0; 00555 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00556 { 00557 num = num + i->get_query_messages_bytes_received(); 00558 } 00559 return num; 00560 } 00561 //---------------------------------------------------------------------------------------------------- 00562 Integer get_report_messages_send( void ) 00563 { 00564 Integer num = 0; 00565 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00566 { 00567 num = num + i->get_report_messages_send(); 00568 } 00569 return num; 00570 } 00571 //---------------------------------------------------------------------------------------------------- 00572 Integer get_report_messages_bytes_send( void ) 00573 { 00574 Integer num = 0; 00575 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00576 { 00577 num = num + i->get_report_messages_bytes_send(); 00578 } 00579 return num; 00580 } 00581 //---------------------------------------------------------------------------------------------------- 00582 Integer get_report_messages_received( void ) 00583 { 00584 Integer num = 0; 00585 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00586 { 00587 num = num + i->get_report_messages_received(); 00588 } 00589 return num; 00590 } 00591 //---------------------------------------------------------------------------------------------------- 00592 Integer get_report_messages_bytes_received( void ) 00593 { 00594 Integer num = 0; 00595 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00596 { 00597 num = num + i->get_report_messages_bytes_received(); 00598 } 00599 return num; 00600 } 00601 //---------------------------------------------------------------------------------------------------- 00602 Integer get_messages_send( void ) 00603 { 00604 Integer num = 0; 00605 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00606 { 00607 num = i->get_echo_messages_send() + i->get_query_messages_send() + i->get_report_messages_send() + num; 00608 } 00609 return num; 00610 } 00611 //---------------------------------------------------------------------------------------------------- 00612 Integer get_messages_bytes_send( void ) 00613 { 00614 Integer num = 0; 00615 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00616 { 00617 num = i->get_echo_messages_bytes_send() + i->get_query_messages_bytes_send() + i->get_report_messages_bytes_send() + num; 00618 } 00619 return num; 00620 } 00621 //---------------------------------------------------------------------------------------------------- 00622 Integer get_messages_received( void ) 00623 { 00624 Integer num = 0; 00625 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00626 { 00627 num = i->get_echo_messages_received() + i->get_query_messages_received() + i->get_report_messages_received() + num; 00628 } 00629 return num; 00630 } 00631 //---------------------------------------------------------------------------------------------------- 00632 Integer get_messages_bytes_received( void ) 00633 { 00634 Integer num = 0; 00635 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00636 { 00637 num = i->get_echo_messages_bytes_received() + i->get_query_messages_bytes_received() + i->get_report_messages_bytes_received() + num; 00638 } 00639 return num; 00640 } 00641 //---------------------------------------------------------------------------------------------------- 00642 PLTT_PassiveTrackingMetricList* get_passive_tracking_metric_list() 00643 { 00644 return &passive_tracking_metric_list; 00645 } 00646 void reset( void ) 00647 { 00648 for (PLTT_PassiveTrackingMetricListIterator i = passive_tracking_metric_list.begin(); i != passive_tracking_metric_list.end(); ++i ) 00649 { 00650 i->reset(); 00651 } 00652 } 00653 private: 00654 PLTT_PassiveTrackingMetricList passive_tracking_metric_list; 00655 }; 00656 } 00657 00658 #endif