nlsr::Statistics Class Reference

#include <statistics.hpp>

Public Types

enum class  PacketType {
  SENT_HELLO_INTEREST ,
  SENT_HELLO_DATA ,
  RCV_HELLO_INTEREST ,
  RCV_HELLO_DATA ,
  SENT_LSA_INTEREST ,
  SENT_ADJ_LSA_INTEREST ,
  SENT_COORD_LSA_INTEREST ,
  SENT_NAME_LSA_INTEREST ,
  SENT_LSA_DATA ,
  SENT_ADJ_LSA_DATA ,
  SENT_COORD_LSA_DATA ,
  SENT_NAME_LSA_DATA ,
  RCV_LSA_INTEREST ,
  RCV_ADJ_LSA_INTEREST ,
  RCV_COORD_LSA_INTEREST ,
  RCV_NAME_LSA_INTEREST ,
  RCV_LSA_DATA ,
  RCV_ADJ_LSA_DATA ,
  RCV_COORD_LSA_DATA ,
  RCV_NAME_LSA_DATA
}
 

Public Member Functions

size_t get (PacketType) const
 
const std::map< PacketType, int > & getCounter () const
 
void increment (PacketType)
 
void resetAll ()
 

Detailed Description

Definition at line 30 of file statistics.hpp.

Member Enumeration Documentation

◆ PacketType

Enumerator
SENT_HELLO_INTEREST 
SENT_HELLO_DATA 
RCV_HELLO_INTEREST 
RCV_HELLO_DATA 
SENT_LSA_INTEREST 
SENT_ADJ_LSA_INTEREST 
SENT_COORD_LSA_INTEREST 
SENT_NAME_LSA_INTEREST 
SENT_LSA_DATA 
SENT_ADJ_LSA_DATA 
SENT_COORD_LSA_DATA 
SENT_NAME_LSA_DATA 
RCV_LSA_INTEREST 
RCV_ADJ_LSA_INTEREST 
RCV_COORD_LSA_INTEREST 
RCV_NAME_LSA_INTEREST 
RCV_LSA_DATA 
RCV_ADJ_LSA_DATA 
RCV_COORD_LSA_DATA 
RCV_NAME_LSA_DATA 

Definition at line 33 of file statistics.hpp.

Member Function Documentation

◆ get()

size_t nlsr::Statistics::get ( PacketType  type) const

Definition at line 29 of file statistics.cpp.

◆ getCounter()

const std::map<PacketType,int>& nlsr::Statistics::getCounter ( ) const
inline

Definition at line 66 of file statistics.hpp.

◆ increment()

void nlsr::Statistics::increment ( PacketType  type)

Definition at line 41 of file statistics.cpp.

◆ resetAll()

void nlsr::Statistics::resetAll ( )

Definition at line 47 of file statistics.cpp.