INET Framework for OMNeT++/OMNEST
RTCPReceiverReportPacket Class Reference

#include <RTCPPacket.h>

Inheritance diagram for RTCPReceiverReportPacket:
RTCPPacket RTCPSenderReportPacket

List of all members.

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

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

Constructor & Destructor Documentation

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

Default contructor.

Referenced by dup().

                                                                   : RTCPPacket(name) {
    _packetType = RTCP_PT_RR;
    _ssrc = 0;
    _receptionReports = new cArray("ReceptionReports");
    // an empty rtcp receiver report packet is 4 bytes
    // longer, the ssrc identifier is stored in it
    addByteLength(4);
};
RTCPReceiverReportPacket::RTCPReceiverReportPacket ( const RTCPReceiverReportPacket rtcpReceiverReportPacket)

Copy constructor.

                                                                                                           : RTCPPacket() {
    _receptionReports = NULL;
    setName(rtcpReceiverReportPacket.getName());
    operator=(rtcpReceiverReportPacket);
};
RTCPReceiverReportPacket::~RTCPReceiverReportPacket ( ) [virtual]

Destructor.

                                                    {
    delete _receptionReports;
};

Member Function Documentation

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

Adds a receiver report to this receiver report packet.

Referenced by RTCP::createPacket().

                                                                         {
    _receptionReports->add(report);
    _count++;
    // an rtcp receiver report is 24 bytes long
    addByteLength(24);
};
void RTCPReceiverReportPacket::dump ( std::ostream &  os) const [virtual]

Writes a report about the RTCPReceiverReportPacket into the stream.

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

                                                        {
    os << "RTCPReceiverReportPacket:" << endl;
    for (int i = 0; i < _receptionReports->size(); i++) {
        if (_receptionReports->exist(i)) {
            ReceptionReport *rr = (ReceptionReport *)(_receptionReports->get(i));
            rr->dump(os);
        };
    };
};
RTCPReceiverReportPacket * RTCPReceiverReportPacket::dup ( ) const [virtual]

Duplicates the RTCPReceiverReportPacket by calling the copy constructor.

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

                                                              {
    return new RTCPReceiverReportPacket(*this);
};
cArray * RTCPReceiverReportPacket::getReceptionReports ( ) [virtual]

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

Referenced by RTCP::processIncomingRTCPPacket().

                                                      {
    return new cArray(*_receptionReports);
};
uint32 RTCPReceiverReportPacket::getSSRC ( ) [virtual]

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

Referenced by RTCP::processIncomingRTCPPacket().

                                         {
    return _ssrc;
};
std::string RTCPReceiverReportPacket::info ( ) [virtual]

Reports a one line info about the RTCPReceiverReportPacket.

Reimplemented from RTCPPacket.

Reimplemented in RTCPSenderReportPacket.

                                         {
    std::stringstream out;
    out << "RTCPReceiverReportPacket #rr=" << _count;
    return out.str();
};
RTCPReceiverReportPacket & RTCPReceiverReportPacket::operator= ( const RTCPReceiverReportPacket rtcpReceiverReportPacket)

Assignment operator.

Referenced by RTCPReceiverReportPacket().

                                                                                                                      {
    RTCPPacket::operator=(rtcpReceiverReportPacket);
    _ssrc = rtcpReceiverReportPacket._ssrc;
    _receptionReports = new cArray(*(rtcpReceiverReportPacket._receptionReports));
    return *this;
};
void RTCPReceiverReportPacket::setSSRC ( uint32  ssrc) [virtual]

Sets the ssrc identifier for the rtcp receiver report packet.

Referenced by RTCP::createPacket().

                                                  {
    _ssrc = ssrc;
};

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: