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 RTCPReceiverReportPacketdup () const
virtual std::string info ()
virtual void dump (std::ostream &os) const
virtual uint32 getSSRC ()
virtual void setSSRC (uint32 ssrc)
virtual void addReceptionReport (ReceptionReport *report)
virtual cArray * getReceptionReports ()

Protected Attributes

uint32 _ssrc
cArray * _receptionReports

Constructor & Destructor Documentation

RTCPReceiverReportPacket::RTCPReceiverReportPacket ( const char *  name = NULL  ) 

Default contructor.

Referenced by dup().

00129                                                                    : RTCPPacket(name) {
00130     _packetType = RTCP_PT_RR;
00131     _ssrc = 0;
00132     _receptionReports = new cArray("ReceptionReports");
00133     // an empty rtcp receiver report packet is 4 bytes
00134     // longer, the ssrc identifier is stored in it
00135     addByteLength(4);
00136 };

RTCPReceiverReportPacket::RTCPReceiverReportPacket ( const RTCPReceiverReportPacket rtcpReceiverReportPacket  ) 

Copy constructor.

00138                                                                                                            : RTCPPacket() {
00139     _receptionReports = NULL;
00140     setName(rtcpReceiverReportPacket.getName());
00141     operator=(rtcpReceiverReportPacket);
00142 };

RTCPReceiverReportPacket::~RTCPReceiverReportPacket (  )  [virtual]

Destructor.

00145                                                     {
00146     delete _receptionReports;
00147 };


Member Function Documentation

RTCPReceiverReportPacket & RTCPReceiverReportPacket::operator= ( const RTCPReceiverReportPacket rtcpReceiverReportPacket  ) 

Assignment operator.

Referenced by RTCPSenderReportPacket::operator=(), and RTCPReceiverReportPacket().

00150                                                                                                                       {
00151     RTCPPacket::operator=(rtcpReceiverReportPacket);
00152     _ssrc = rtcpReceiverReportPacket._ssrc;
00153     _receptionReports = new cArray(*(rtcpReceiverReportPacket._receptionReports));
00154     return *this;
00155 };

RTCPReceiverReportPacket * RTCPReceiverReportPacket::dup (  )  const [virtual]

Duplicates the RTCPReceiverReportPacket by calling the copy constructor.

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

00158                                                               {
00159     return new RTCPReceiverReportPacket(*this);
00160 };

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

Reports a one line info about the RTCPReceiverReportPacket.

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

00163                                          {
00164     std::stringstream out;
00165     out << "RTCPReceiverReportPacket #rr=" << _count;
00166     return out.str();
00167 };

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

Writes a report about the RTCPReceiverReportPacket into the stream.

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

00170                                                         {
00171     os << "RTCPReceiverReportPacket:" << endl;
00172     for (int i = 0; i < _receptionReports->size(); i++) {
00173         if (_receptionReports->exist(i)) {
00174             ReceptionReport *rr = (ReceptionReport *)(_receptionReports->get(i));
00175             rr->dump(os);
00176         };
00177     };
00178 };

uint32 RTCPReceiverReportPacket::getSSRC (  )  [virtual]

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

Referenced by RTCP::processIncomingRTCPPacket().

00181                                          {
00182     return _ssrc;
00183 };

void RTCPReceiverReportPacket::setSSRC ( uint32  ssrc  )  [virtual]

Sets the ssrc identifier for the rtcp receiver report packet.

Referenced by RTCP::createPacket().

00186                                                   {
00187     _ssrc = ssrc;
00188 };

void RTCPReceiverReportPacket::addReceptionReport ( ReceptionReport report  )  [virtual]

Adds a receiver report to this receiver report packet.

Referenced by RTCP::createPacket().

00191                                                                          {
00192     _receptionReports->add(report);
00193     _count++;
00194     // an rtcp receiver report is 24 bytes long
00195     addByteLength(24);
00196 };

cArray * RTCPReceiverReportPacket::getReceptionReports (  )  [virtual]

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

Referenced by RTCP::processIncomingRTCPPacket().

00199                                                       {
00200     return new cArray(*_receptionReports);
00201 };


Member Data Documentation

uint32 RTCPReceiverReportPacket::_ssrc [protected]

The ssrc identifier of the source of this rtcp packet.

Referenced by getSSRC(), RTCPSenderReportPacket::info(), operator=(), RTCPReceiverReportPacket(), and setSSRC().


The documentation for this class was generated from the following files:

Generated on Fri Mar 20 18:51:20 2009 for INET Framework for OMNeT++/OMNEST by  doxygen 1.5.5