nfd::face::FaceCounters Class Reference

Gives access to counters provided by Face. More...

#include <daemon/face/face-counters.hpp>

+ Collaboration diagram for nfd::face::FaceCounters:

Public Member Functions

 FaceCounters (const LinkService::Counters &linkServiceCounters, const Transport::Counters &transportCounters)
 
template<typename T >
std::enable_if_t< std::is_base_of_v< LinkService::Counters, T >, const T & > get () const
 
template<typename T >
std::enable_if_t< std::is_base_of_v< Transport::Counters, T >, const T & > get () const
 

Public Attributes

const ByteCounternInBytes
 
const PacketCounternInData
 
PacketCounter nInHopLimitZero
 Count of incoming Interests dropped due to HopLimit == 0. More...
 
const PacketCounternInInterests
 
const PacketCounternInNacks
 
const PacketCounternInPackets
 
const PacketCounternInterestsExceededRetx
 
const ByteCounternOutBytes
 
const PacketCounternOutData
 
PacketCounter nOutHopLimitZero
 Count of outgoing Interests dropped due to HopLimit == 0 on non-local faces. More...
 
const PacketCounternOutInterests
 
const PacketCounternOutNacks
 
const PacketCounternOutPackets
 

Detailed Description

Gives access to counters provided by Face.

This type is a facade that exposes common counters of a Face.

get<T>() can be used to access extended counters provided by LinkService or Transport of the Face.

Definition at line 41 of file face-counters.hpp.

Constructor & Destructor Documentation

◆ FaceCounters()

nfd::face::FaceCounters::FaceCounters ( const LinkService::Counters linkServiceCounters,
const Transport::Counters transportCounters 
)

Definition at line 30 of file face-counters.cpp.

Member Function Documentation

◆ get() [1/2]

template<typename T >
std::enable_if_t<std::is_base_of_v<LinkService::Counters, T>, const T&> nfd::face::FaceCounters::get ( ) const
inline
Returns
counters provided by LinkService
Template Parameters
TLinkService counters type
Exceptions
std::bad_castcounters type mismatch

Definition at line 53 of file face-counters.hpp.

◆ get() [2/2]

template<typename T >
std::enable_if_t<std::is_base_of_v<Transport::Counters, T>, const T&> nfd::face::FaceCounters::get ( ) const
inline
Returns
counters provided by Transport
Template Parameters
TTransport counters type
Exceptions
std::bad_castcounters type mismatch

Definition at line 64 of file face-counters.hpp.

Member Data Documentation

◆ nInBytes

const ByteCounter& nfd::face::FaceCounters::nInBytes

Definition at line 80 of file face-counters.hpp.

◆ nInData

const PacketCounter& nfd::face::FaceCounters::nInData

Definition at line 73 of file face-counters.hpp.

◆ nInHopLimitZero

PacketCounter nfd::face::FaceCounters::nInHopLimitZero

Count of incoming Interests dropped due to HopLimit == 0.

Definition at line 85 of file face-counters.hpp.

◆ nInInterests

const PacketCounter& nfd::face::FaceCounters::nInInterests

Definition at line 70 of file face-counters.hpp.

◆ nInNacks

const PacketCounter& nfd::face::FaceCounters::nInNacks

Definition at line 75 of file face-counters.hpp.

◆ nInPackets

const PacketCounter& nfd::face::FaceCounters::nInPackets

Definition at line 78 of file face-counters.hpp.

◆ nInterestsExceededRetx

const PacketCounter& nfd::face::FaceCounters::nInterestsExceededRetx

Definition at line 72 of file face-counters.hpp.

◆ nOutBytes

const ByteCounter& nfd::face::FaceCounters::nOutBytes

Definition at line 81 of file face-counters.hpp.

◆ nOutData

const PacketCounter& nfd::face::FaceCounters::nOutData

Definition at line 74 of file face-counters.hpp.

◆ nOutHopLimitZero

PacketCounter nfd::face::FaceCounters::nOutHopLimitZero

Count of outgoing Interests dropped due to HopLimit == 0 on non-local faces.

Definition at line 89 of file face-counters.hpp.

◆ nOutInterests

const PacketCounter& nfd::face::FaceCounters::nOutInterests

Definition at line 71 of file face-counters.hpp.

◆ nOutNacks

const PacketCounter& nfd::face::FaceCounters::nOutNacks

Definition at line 76 of file face-counters.hpp.

◆ nOutPackets

const PacketCounter& nfd::face::FaceCounters::nOutPackets

Definition at line 79 of file face-counters.hpp.