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

RTCPCompoundPacket Class Reference

#include <RTCPPacket.h>

List of all members.


Detailed Description

An rtcp compound packet acts as container for rtcp packets, which are transmitted in an RTCPCompoundPacket. Every RTCPCompoundPacket must consist at least one RTCPSenderReportPacketof RTCPReceiverReportPacket and one RTCPSDESPacket. This class doesn't check if these requirements are met.


Public Member Functions

 RTCPCompoundPacket (const char *name=NULL)
 RTCPCompoundPacket (const RTCPCompoundPacket &rtcpCompoundPacket)
virtual ~RTCPCompoundPacket ()
RTCPCompoundPacketoperator= (const RTCPCompoundPacket &rtcpCompoundPacket)
virtual cObject * dup () const
virtual const char * className () const
virtual std::string info ()
virtual void writeContents (std::ostream &os) const
virtual void addRTCPPacket (RTCPPacket *rtcpPacket)
virtual cArray * rtcpPackets ()

Private Attributes

cArray * _rtcpPackets


Constructor & Destructor Documentation

RTCPCompoundPacket::RTCPCompoundPacket const char *  name = NULL  ) 
 

Default constructor.

00426                                                        : cPacket(name) {
00427     _rtcpPackets = new cArray("RTCPPackets");
00428     // an empty rtcp compound packet has length 0 bytes
00429     setLength(0);
00430 };

RTCPCompoundPacket::RTCPCompoundPacket const RTCPCompoundPacket rtcpCompoundPacket  ) 
 

Copy constructor.

00433                                                                                    : cPacket() {
00434     setName(rtcpCompoundPacket.name());
00435     operator=(rtcpCompoundPacket);
00436 };

RTCPCompoundPacket::~RTCPCompoundPacket  )  [virtual]
 

Destructor.

00439                                         {
00440     delete _rtcpPackets;
00441 };


Member Function Documentation

void RTCPCompoundPacket::addRTCPPacket RTCPPacket rtcpPacket  )  [virtual]
 

Adds an RTCPPacket to this RTCPCompoundPacket.

00479                                                              {
00480     //rtcpPacket->setOwner(_rtcpPackets);
00481     _rtcpPackets->add(rtcpPacket);
00482     // the size of the rtcp compound packet increases
00483     // by the size of the added rtcp packet
00484     addLength(rtcpPacket->length());
00485 };

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

Return the class name "RTCPCompoundPacket".

00457                                                 {
00458     return "RTCPCompoundPacket";
00459 };

cObject * RTCPCompoundPacket::dup  )  const [virtual]
 

Duplicates the RTCPCompoundPacket by calling the copy constructor.

00452                                        {
00453     return new RTCPCompoundPacket(*this);
00454 };

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

Writes a short info about this RTCPCompoundPacket into the given string.

00462                                    {
00463     std::stringstream out;
00464     out << "RTCPCompoundPacket: number of rtcp packets=" << _rtcpPackets->items();
00465     return out.str();
00466 };

RTCPCompoundPacket & RTCPCompoundPacket::operator= const RTCPCompoundPacket rtcpCompoundPacket  ) 
 

Assignment operator.

00444                                                                                               {
00445     cPacket::operator=(rtcpCompoundPacket);
00446     setLength(rtcpCompoundPacket.length());
00447     _rtcpPackets = new cArray(*(rtcpCompoundPacket._rtcpPackets));
00448     return *this;
00449 };

cArray * RTCPCompoundPacket::rtcpPackets  )  [virtual]
 

Returns a copy of the cArray in which the rtcp packets are stored.

00488                                         {
00489     return new cArray(*_rtcpPackets);
00490 }

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

Writes a longer info about this RTCPCompoundPacket into the given stream.

00469                                                            {
00470     os << "RTCPCompoundPacket:" << endl;
00471     for (int i = 0; i < _rtcpPackets->items(); i++) {
00472         if (_rtcpPackets->exist(i)) {
00473             _rtcpPackets->get(i)->writeContents(os);
00474         }
00475     }
00476 };


Member Data Documentation

cArray* RTCPCompoundPacket::_rtcpPackets [private]
 

The cArray in which the rtcp packets are stored.


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 18:22:29 2006 for INET Framework for OMNeT++/OMNEST by  doxygen 1.4.0