EpcTools
An event based multi-threaded C++ development framework.
Classes | Public Types | Static Public Member Functions | List of all members
EStatistics Class Reference

#include <estats.h>

Classes

class  DiameterHook
 Hooks into the freeDiameter internals to increment the message statistics. More...
 
class  Interface
 Represents an interface to track peer and message statistics for. More...
 
class  MessageStats
 Contains the statistics for an individual message. More...
 
class  Peer
 Contains the peer information including the statistics for the individual messages. More...
 

Public Types

enum  ProtocolType {
  ProtocolType::diameter, ProtocolType::gtpv2c, ProtocolType::gtpv1u, ProtocolType::pfcp,
  ProtocolType::ikev2
}
 
typedef UInt InterfaceId
 
typedef UInt MessageId
 
typedef std::unordered_map< EStatistics::MessageId, EStatistics::MessageStatsMessageStatsMap
 
typedef std::unordered_map< std::string, EStatistics::PeerPeerMap
 Defines a collection of peers. More...
 
typedef std::unordered_map< EStatistics::InterfaceId, EStatistics::InterfaceInterfaceMap
 

Static Public Member Functions

static InterfacegetInterface (EStatistics::InterfaceId id)
 Retrieves the requested interface object. More...
 
static InterfaceaddInterface (EStatistics::InterfaceId id, ProtocolType protocol, const EString &intfc)
 Adds/updates the interface. More...
 
static Void removeInterface (EStatistics::InterfaceId id)
 Removes the specified interface. More...
 
static InterfaceMapgetInterfaces ()
 Retrieves the interface collection. More...
 
static Void init (ELogger &logger)
 Initializes the statistics class. More...
 
static Void uninit ()
 Uninitializes teh statistics class. More...
 
static Void reset ()
 Sets the message counters to zero for all interfaces, peers and messages. More...
 

Member Typedef Documentation

◆ InterfaceId

◆ InterfaceMap

◆ MessageId

typedef UInt EStatistics::MessageId

◆ MessageStatsMap

◆ PeerMap

typedef std::unordered_map<std::string,EStatistics::Peer> EStatistics::PeerMap

Defines a collection of peers.

Member Enumeration Documentation

◆ ProtocolType

Enumerator
diameter 
gtpv2c 
gtpv1u 
pfcp 
ikev2 

Member Function Documentation

◆ addInterface()

static Interface& EStatistics::addInterface ( EStatistics::InterfaceId  id,
ProtocolType  protocol,
const EString intfc 
)
inlinestatic

Adds/updates the interface.

Parameters
idthe interface ID.
protocolthe interface protocol.
intfcthe interface name.
Returns
the interface object.

◆ getInterface()

static Interface& EStatistics::getInterface ( EStatistics::InterfaceId  id)
inlinestatic

Retrieves the requested interface object.

Parameters
idthe ID of the requested interface object.
Returns
the requested interface object.
Exceptions
EError(interface not found)

◆ getInterfaces()

static InterfaceMap& EStatistics::getInterfaces ( )
inlinestatic

Retrieves the interface collection.

Returns
the interface collection.

◆ init()

Void EStatistics::init ( ELogger logger)
static

Initializes the statistics class.

Parameters
loggerthe log object to write messages to.

◆ removeInterface()

static Void EStatistics::removeInterface ( EStatistics::InterfaceId  id)
inlinestatic

Removes the specified interface.

Parameters
idthe ID of the interface to remove.

◆ reset()

Void EStatistics::reset ( )
static

Sets the message counters to zero for all interfaces, peers and messages.

◆ uninit()

Void EStatistics::uninit ( )
static

Uninitializes teh statistics class.


The documentation for this class was generated from the following files: