INET Framework for OMNeT++/OMNEST
TG Namespace Reference

Classes

class  PktRec
class  RcvFlowRecord
class  SntFlowRecord
class  FlowRecord

Typedefs

typedef std::vector
< RcvFlowRecord
RcvStats
typedef std::vector
< SntFlowRecord
SntStats
typedef std::vector< FlowRecordFlows

Functions

std::ostream & operator<< (std::ostream &ostr, SntFlowRecord &rec)
std::ostream & operator<< (std::ostream &ostr, RcvFlowRecord &rec)

Typedef Documentation

typedef std::vector<FlowRecord> TG::Flows

Definition at line 195 of file TrafGen.h.

typedef std::vector<RcvFlowRecord> TG::RcvStats

Definition at line 95 of file TrafGen.h.

typedef std::vector<SntFlowRecord> TG::SntStats

Definition at line 122 of file TrafGen.h.


Function Documentation

std::ostream& TG::operator<< ( std::ostream &  ostr,
SntFlowRecord &  rec 
) [inline]

Definition at line 201 of file TrafGen.h.

{
    double time = simTime().dbl() - rec.getStartTime();
    ostr << "Flow " << rec.getId() << " : " ;
    if(rec.getTotalSentPkts() > 0)
    {
      ostr << "Pkts sent: " << rec.getTotalSentPkts() << ", ";
      ostr << "Bytes sent: " << rec.getTotalBytes() << ", ";
      ostr << "Avg bitrate: " << (rec.getTotalBytes() * 8)/(time * 1000) << " Kbit/s, ";
      ostr << "Avg pkts: " << rec.getTotalSentPkts()/time << " pkt/s";
    }
    else
      ostr << "no sent data yet";
       
    return ostr;
}
std::ostream& TG::operator<< ( std::ostream &  ostr,
RcvFlowRecord &  rec 
) [inline]

Definition at line 222 of file TrafGen.h.

{
    double time = simTime().dbl() - rec.getStartTime();
    ostr << "Flow " << rec.getId() << " : " ;
    if(rec.getTotalRcvPkts() > 0)
    {
      ostr << "Pkts rcv: " << rec.getTotalRcvPkts() << ", ";
      ostr << "Bytes rcv: " << rec.getTotalBytes() << ", ";
      ostr << "Avg bitrate: " << (rec.getTotalBytes() * 8)/(time * 1000) << " Kbit/s, ";
      ostr << "Avg pkts: " << rec.getTotalRcvPkts()/time << " pkt/s, ";
      ostr << "Min delay: " << rec.getMinDelay() << " s, ";
      ostr << "Max delay: " << rec.getMaxDelay() << " s, ";
      ostr << "Avg delay: " << rec.getTotalDelay() / rec.getTotalRcvPkts() << " s, ";
      ostr << "Avg jitter: " << rec.getTotalJitter() / rec.getTotalRcvPkts() << " s, ";
    }
    else
      ostr << "no received data yet";
     
    return ostr;
}