Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RTCPReceiverReportPacket Class Reference

#include <RTCPPacket.h>

Inheritance diagram for RTCPReceiverReportPacket:

RTCPPacket RTCPSenderReportPacket List of all members.

Detailed Description

This class represents rtcp receiver report packets. It can hold 0 to 31 ReceptionReports. Also the header field ssrc is included.
See also:
ReceptionReport


Public Member Functions

 RTCPReceiverReportPacket (const char *name=NULL)
 RTCPReceiverReportPacket (const RTCPReceiverReportPacket &rtcpReceiverReportPacket)
virtual ~RTCPReceiverReportPacket ()
RTCPReceiverReportPacketoperator= (const RTCPReceiverReportPacket &rtcpReceiverReportPacket)
virtual cObject * dup () const
virtual const char * className () const
virtual std::string info ()
virtual void writeContents (std::ostream &os) const
virtual u_int32 ssrc ()
virtual void setSSRC (u_int32 ssrc)
virtual void addReceptionReport (ReceptionReport *report)
virtual cArray * receptionReports ()

Protected Attributes

u_int32 _ssrc
cArray * _receptionReports


Constructor & Destructor Documentation

RTCPReceiverReportPacket::RTCPReceiverReportPacket const char *  name = NULL  ) 
 

Default contructor.

00137                                                                    : RTCPPacket(name) {
00138     _packetType = RTCP_PT_RR;
00139     _ssrc = 0;
00140     _receptionReports = new cArray("ReceptionReports");
00141     // an empty rtcp receiver report packet is 4 bytes
00142     // longer, the ssrc identifier is stored in it
00143     addLength(4);
00144 };

RTCPReceiverReportPacket::RTCPReceiverReportPacket const RTCPReceiverReportPacket rtcpReceiverReportPacket  ) 
 

Copy constructor.

00147                                                                                                            : RTCPPacket() {
00148     setName(rtcpReceiverReportPacket.name());
00149     operator=(rtcpReceiverReportPacket);
00150 };

RTCPReceiverReportPacket::~RTCPReceiverReportPacket  )  [virtual]
 

Destructor.

00153                                                     {
00154     delete _receptionReports;
00155 };


Member Function Documentation

void RTCPReceiverReportPacket::addReceptionReport ReceptionReport report  )  [virtual]
 

Adds a receiver report to this receiver report packet.

00204                                                                          {
00205     _receptionReports->add(report);
00206     _count++;
00207     // an rtcp receiver report is 24 bytes long
00208     addLength(24);
00209 };

const char * RTCPReceiverReportPacket::className  )  const [virtual]
 

Returns the class name "RTCPReceiverReportPacket".

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

00171                                                       {
00172     return "RTCPReceiverReportPacket";
00173 };

cObject * RTCPReceiverReportPacket::dup  )  const [virtual]
 

Duplicates the RTCPReceiverReportPacket by calling the copy constructor.

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

00166                                              {
00167     return new RTCPReceiverReportPacket(*this);
00168 };

std::string RTCPReceiverReportPacket::info  )  [virtual]
 

Reports a one line info about the RTCPReceiverReportPacket.

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

00176                                          {
00177     std::stringstream out;
00178     out << "RTCPReceiverReportPacket #rr=" << _count;
00179     return out.str();
00180 };

RTCPReceiverReportPacket & RTCPReceiverReportPacket::operator= const RTCPReceiverReportPacket rtcpReceiverReportPacket  ) 
 

Assignment operator.

00158                                                                                                                       {
00159     RTCPPacket::operator=(rtcpReceiverReportPacket);
00160     _ssrc = rtcpReceiverReportPacket._ssrc;
00161     _receptionReports = new cArray(*(rtcpReceiverReportPacket._receptionReports));
00162     return *this;
00163 };

cArray * RTCPReceiverReportPacket::receptionReports  )  [virtual]
 

Return a copy of the cArray of receiver reports stored in the object.

00212                                                    {
00213     return new cArray(*_receptionReports);
00214 };

void RTCPReceiverReportPacket::setSSRC u_int32  ssrc  )  [virtual]
 

Sets the ssrc identifier for the rtcp receiver report packet.

00199                                                    {
00200     _ssrc = ssrc;
00201 };

u_int32 RTCPReceiverReportPacket::ssrc  )  [virtual]
 

Returns the ssrc indentifier of the source which has sent this rtcp receiver report packet.

00194                                        {
00195     return _ssrc;
00196 };

void RTCPReceiverReportPacket::writeContents std::ostream &  os  )  const [virtual]
 

Writes a report about the RTCPReceiverReportPacket into the stream.

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

00183                                                                  {
00184     os << "RTCPReceiverReportPacket:" << endl;
00185     for (int i = 0; i < _receptionReports->items(); i++) {
00186         if (_receptionReports->exist(i)) {
00187             ReceptionReport *rr = (ReceptionReport *)(_receptionReports->get(i));
00188             rr->writeContents(os);
00189         };
00190     };
00191 };


Member Data Documentation

cArray* RTCPReceiverReportPacket::_receptionReports [protected]
 

The reception reports in this packet are stored here.

u_int32 RTCPReceiverReportPacket::_ssrc [protected]
 

The ssrc identifier of the source of this rtcp packet.


The documentation for this class was generated from the following files:
Generated on Sat Apr 1 20:52:24 2006 for INET Framework for OMNeT++/OMNEST by  doxygen 1.4.1