Public Types | Public Member Functions
FlowMeasurement Class Reference

Brief description of class still missing. More...

#include <FlowMeasurement.h>

List of all members.

Public Types

enum  Status { Reset, InitFailed, Receiving, Successful }

Public Member Functions

void addPacket ()
 FlowMeasurement ()
double globalTime () const
int packetCount () const
int receiveByteCount () const
double receiveRate () const
void resetPacketCount ()
int sendByteCount () const
double sendRate () const
void setGlobalTime (double t)
void setReceiveByteCount (int byteCount)
void setReceiveRate (double kbpersec)
void setSendByteCount (int byteCount)
void setSendRate (double kbpersec)
void setStatus (Status s)
Status status () const
void toLog () const

Detailed Description

Brief description of class still missing.

Full description of class still missing


Member Enumeration Documentation

Enumerator:
Reset 
InitFailed 
Receiving 
Successful 

Constructor & Destructor Documentation

Description of constructor still missing

References Reset.

{
  _status=Reset;
  _sendByteCount=0;
  _receiveByteCount=0;
  _packetCount=0;
  _sendRate=0.0;
  _receiveRate=0.0;
  _globalTime=0.0;
}

Member Function Documentation

void FlowMeasurement::addPacket ( ) [inline]

Referenced by Flowmeter::addPacket().

{_packetCount++;}
double FlowMeasurement::globalTime ( ) const [inline]
{return _globalTime;}
int FlowMeasurement::packetCount ( ) const [inline]

Referenced by Flowmeter::addPacket().

{return _packetCount;}
int FlowMeasurement::receiveByteCount ( ) const [inline]

Referenced by Flowmeter::addPacket().

{return _receiveByteCount;}
double FlowMeasurement::receiveRate ( ) const [inline]
{return _receiveRate;}

Referenced by Flowmeter::startGlobal().

{_packetCount=0;}
int FlowMeasurement::sendByteCount ( ) const [inline]

Referenced by Flowmeter::stopSend().

{return _sendByteCount;}
double FlowMeasurement::sendRate ( ) const [inline]
{return _sendRate;}
void FlowMeasurement::setGlobalTime ( double  t) [inline]

Referenced by Flowmeter::stopGlobal().

{_globalTime=t;}
void FlowMeasurement::setReceiveByteCount ( int  byteCount) [inline]

Referenced by Flowmeter::setReceiveByteCount().

{_receiveByteCount=byteCount;}
void FlowMeasurement::setReceiveRate ( double  kbpersec) [inline]

Referenced by Flowmeter::addPacket().

{_receiveRate=kbpersec;}
void FlowMeasurement::setSendByteCount ( int  byteCount) [inline]

Referenced by Flowmeter::setSendByteCount().

{_sendByteCount=byteCount;}
void FlowMeasurement::setSendRate ( double  kbpersec) [inline]

Referenced by Flowmeter::stopSend().

{_sendRate=kbpersec;}
void FlowMeasurement::setStatus ( Status  s) [inline]

Referenced by Flowmeter::addPacket(), and Flowmeter::startGlobal().

{_status=s;}
Status FlowMeasurement::status ( ) const [inline]

Referenced by Flowmeter::addPacket().

{return _status;}
void FlowMeasurement::toLog ( ) const
{
  Log::write(3, "ended with status %i\n", _status);
  Log::write(3, "sent %.2lf kbytes at %.2lf kb/s\n",
                (double)_sendByteCount/1024.0, _sendRate);
  Log::write(3, "received %.2lf kbytes split into %i packets at %.2lf kb/s\n",
                (double)_receiveByteCount/1024.0, _packetCount, _receiveRate);
  Log::write(3, "completed in %.3lf s\n", _globalTime);
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines