NetInterfaceTrafficStats Class Reference

#include <NetInterface.hh>


Public Member Functions

 NetInterfaceTrafficStats ()
void countPacket (unsigned packetSize)
float totNumPackets () const
float totNumBytes () const
Boolean haveSeenTraffic () const

Private Attributes

float fTotNumPackets
float fTotNumBytes


Detailed Description

Definition at line 132 of file NetInterface.hh.


Constructor & Destructor Documentation

NetInterfaceTrafficStats::NetInterfaceTrafficStats (  ) 

Definition at line 153 of file NetInterface.cpp.

References fTotNumBytes, and fTotNumPackets.

00153                                                    {
00154   fTotNumPackets = fTotNumBytes = 0.0;
00155 }


Member Function Documentation

void NetInterfaceTrafficStats::countPacket ( unsigned  packetSize  ) 

Definition at line 157 of file NetInterface.cpp.

References fTotNumBytes, and fTotNumPackets.

Referenced by Groupsock::handleRead(), and Groupsock::output().

00157                                                               {
00158   fTotNumPackets += 1.0;
00159   fTotNumBytes += packetSize;
00160 }

float NetInterfaceTrafficStats::totNumPackets (  )  const [inline]

Definition at line 138 of file NetInterface.hh.

References fTotNumPackets.

00138 {return fTotNumPackets;}

float NetInterfaceTrafficStats::totNumBytes (  )  const [inline]

Definition at line 139 of file NetInterface.hh.

References fTotNumBytes.

00139 {return fTotNumBytes;}

Boolean NetInterfaceTrafficStats::haveSeenTraffic (  )  const

Definition at line 162 of file NetInterface.cpp.

References fTotNumPackets.

00162                                                         {
00163   return fTotNumPackets != 0.0;
00164 }


Field Documentation

float NetInterfaceTrafficStats::fTotNumPackets [private]

Definition at line 144 of file NetInterface.hh.

Referenced by countPacket(), haveSeenTraffic(), NetInterfaceTrafficStats(), and totNumPackets().

float NetInterfaceTrafficStats::fTotNumBytes [private]

Definition at line 145 of file NetInterface.hh.

Referenced by countPacket(), NetInterfaceTrafficStats(), and totNumBytes().


The documentation for this class was generated from the following files:
Generated on Mon Apr 29 13:32:12 2013 for live by  doxygen 1.5.2