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

RTPInnerPacket Class Reference

#include <RTPInnerPacket.h>

List of all members.


Detailed Description

This class is used for communication between submodules of the rtp layer module.


Public Types

enum  RTP_INP_TYPE {
  RTP_INP_UNDEF, RTP_INP_INITIALIZE_PROFILE, RTP_INP_PROFILE_INITIALIZED, RTP_INP_INITIALIZE_RTCP,
  RTP_INP_RTCP_INITIALIZED, RTP_INP_CREATE_SENDER_MODULE, RTP_INP_SENDER_MODULE_CREATED, RTP_INP_DELETE_SENDER_MODULE,
  RTP_INP_SENDER_MODULE_DELETED, RTP_INP_INITIALIZE_SENDER_MODULE, RTP_INP_SENDER_MODULE_INITIALIZED, RTP_INP_SENDER_MODULE_CONTROL,
  RTP_INP_SENDER_MODULE_STATUS, RTP_INP_LEAVE_SESSION, RTP_INP_SESSION_LEFT, RTP_INP_DATA_OUT,
  RTP_INP_DATA_IN
}

Public Member Functions

 RTPInnerPacket (const char *name=NULL)
 RTPInnerPacket (const RTPInnerPacket &rinp)
virtual ~RTPInnerPacket ()
RTPInnerPacketoperator= (const RTPInnerPacket &rinp)
virtual cObject * dup () const
virtual const char * className () const
virtual std::string info ()
virtual void writeContents (std::ostream &os) const
virtual void initializeProfile (int mtu)
virtual void profileInitialized (int rtcpPercentage, IN_Port port)
virtual void initializeRTCP (const char *commonName, int mtu, int bandwidth, int rtcpPercentage, IN_Addr address, IN_Port port)
virtual void rtcpInitialized (u_int32 ssrc)
virtual void createSenderModule (u_int32 ssrc, int payloadType, const char *fileName)
virtual void senderModuleCreated (u_int32 ssrc)
virtual void deleteSenderModule (u_int32 ssrc)
virtual void senderModuleDeleted (u_int32 ssrc)
virtual void initializeSenderModule (u_int32 ssrc, const char *fileName, int mtu)
virtual void senderModuleInitialized (u_int32 ssrc, int payloadType, int clockRate, int timeStampBase, int sequenceNumberBase)
virtual void senderModuleControl (u_int32 ssrc, RTPSenderControlMessage *msg)
virtual void senderModuleStatus (u_int32 ssrc, RTPSenderStatusMessage *msg)
virtual void leaveSession ()
virtual void sessionLeft ()
virtual void dataOut (RTPPacket *packet)
virtual void dataIn (RTPPacket *packet, IN_Addr address, IN_Port port)
virtual RTP_INP_TYPE type ()
virtual const char * commonName ()
virtual int mtu ()
virtual int bandwidth ()
virtual int rtcpPercentage ()
virtual IN_Addr address ()
virtual IN_Port port ()
virtual u_int32 ssrc ()
virtual int payloadType ()
virtual const char * fileName ()
virtual int clockRate ()
virtual int timeStampBase ()
virtual int sequenceNumberBase ()

Private Attributes

RTP_INP_TYPE _type
const char * _commonName
int _mtu
int _bandwidth
int _rtcpPercentage
IN_Addr _address
IN_Port _port
u_int32 _ssrc
int _payloadType
const char * _fileName
int _clockRate
int _timeStampBase
int _sequenceNumberBase


Member Enumeration Documentation

enum RTPInnerPacket::RTP_INP_TYPE
 

This enumeration is a list of all possibly types of an RTPInnerPacket.

Enumeration values:
RTP_INP_UNDEF 
RTP_INP_INITIALIZE_PROFILE 
RTP_INP_PROFILE_INITIALIZED 
RTP_INP_INITIALIZE_RTCP 
RTP_INP_RTCP_INITIALIZED 
RTP_INP_CREATE_SENDER_MODULE 
RTP_INP_SENDER_MODULE_CREATED 
RTP_INP_DELETE_SENDER_MODULE 
RTP_INP_SENDER_MODULE_DELETED 
RTP_INP_INITIALIZE_SENDER_MODULE 
RTP_INP_SENDER_MODULE_INITIALIZED 
RTP_INP_SENDER_MODULE_CONTROL 
RTP_INP_SENDER_MODULE_STATUS 
RTP_INP_LEAVE_SESSION 
RTP_INP_SESSION_LEFT 
RTP_INP_DATA_OUT 
RTP_INP_DATA_IN 


Constructor & Destructor Documentation

RTPInnerPacket::RTPInnerPacket const char *  name = NULL  ) 
 

Default constructor

00032                                                : cPacket(name) {
00033     _type = RTP_INP_UNDEF;
00034     _commonName = NULL;
00035     _mtu = 0;
00036     _bandwidth = 0;
00037     _rtcpPercentage = 0;
00038     _address = IPADDRESS_UNDEF;
00039     _port = IPSuite_PORT_UNDEF;
00040     _ssrc = 0;
00041     _payloadType = 0;
00042     _fileName = NULL;
00043     _clockRate = 0;
00044     _timeStampBase = 0;
00045     _sequenceNumberBase = 0;
00046 };

RTPInnerPacket::RTPInnerPacket const RTPInnerPacket rinp  ) 
 

Copy constructor.

00049                                                          : cPacket() {
00050     setName(rinp.name());
00051     operator=(rinp);
00052 };

RTPInnerPacket::~RTPInnerPacket  )  [virtual]
 

Destructor.

00055                                 {
00056     if (opp_strcmp(_commonName, ""))
00057         delete _commonName;
00058     if (opp_strcmp(_fileName, ""))
00059         delete _fileName;
00060 };


Member Function Documentation

IN_Addr RTPInnerPacket::address  )  [virtual]
 

Returns the address stored in this RTPInnerPacket.

00253                                 {
00254     return _address;
00255 };

int RTPInnerPacket::bandwidth  )  [virtual]
 

Returns the available bandwitdth as stored in this RTPInnerPacket.

00243                               {
00244     return _bandwidth;
00245 };

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

Returns the class name "RTPInnerPacket".

00087                                             {
00088     return "RTPInnerPacket";
00089 };

int RTPInnerPacket::clockRate  )  [virtual]
 

Returns the rtp clock rate stored in this RTPInnerPacket.

00278                               {
00279     return _clockRate;
00280 };

const char * RTPInnerPacket::commonName  )  [virtual]
 

Returns the CNAME stored in this RTPInnerPacket.

00233                                        {
00234     return opp_strdup(_commonName);
00235 };

void RTPInnerPacket::createSenderModule u_int32  ssrc,
int  payloadType,
const char *  fileName
[virtual]
 

00147                                                                                            {
00148     _type = RTP_INP_CREATE_SENDER_MODULE;
00149     _ssrc = ssrc;
00150     _payloadType = payloadType;
00151     _fileName = fileName;
00152 };

void RTPInnerPacket::dataIn RTPPacket packet,
IN_Addr  address,
IN_Port  port
[virtual]
 

Capsultes the incoming RTPPacket into this RTPInnerPacket to transport it within the rtp layer.

00220                                                                             {
00221     _type = RTP_INP_DATA_IN;
00222     _address = address;
00223     _port = port;
00224     encapsulate(packet);
00225 };

void RTPInnerPacket::dataOut RTPPacket packet  )  [virtual]
 

Capsulates the outgoing RTPPacket into this RTPInnerPacket to transport it within the rtp layer.

00214                                               {
00215     _type = RTP_INP_DATA_OUT;
00216     encapsulate(packet);
00217 };

void RTPInnerPacket::deleteSenderModule u_int32  ssrc  )  [virtual]
 

00161                                                     {
00162     _type = RTP_INP_DELETE_SENDER_MODULE;
00163     _ssrc = ssrc;
00164 };

cObject * RTPInnerPacket::dup  )  const [virtual]
 

Duplicates the RTPInnerPacket by calling the copy constructor.

00082                                    {
00083     return new RTPInnerPacket(*this);
00084 };

const char * RTPInnerPacket::fileName  )  [virtual]
 

Returns the file name stored in this RTPInnerPacket.

00268                                      {
00269     return opp_strdup(_fileName);
00270 };

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

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

00092                                {
00093     std::stringstream out;
00094     out << "RTPInnerPacket: type=" << _type;
00095     return out.str();
00096 };

void RTPInnerPacket::initializeProfile int  mtu  )  [virtual]
 

Called by the rtp module after creating the profile module. It informes the profile about the maximum size an rtp packet can have.

00117                                               {
00118     _type = RTP_INP_INITIALIZE_PROFILE;
00119     _mtu = mtu;
00120 };

void RTPInnerPacket::initializeRTCP const char *  commonName,
int  mtu,
int  bandwidth,
int  rtcpPercentage,
IN_Addr  address,
IN_Port  port
[virtual]
 

Called by the rtp module to inform the rtcp module about mandatory information for starting the rtp session.

00130                                                                                                                                      {
00131     _type = RTP_INP_INITIALIZE_RTCP;
00132     _commonName = commonName;
00133     _mtu = mtu;
00134     _bandwidth = bandwidth;
00135     _rtcpPercentage = rtcpPercentage;
00136     _address = address;
00137     _port = port;
00138 };

void RTPInnerPacket::initializeSenderModule u_int32  ssrc,
const char *  fileName,
int  mtu
[virtual]
 

00173                                                                                        {
00174     _type = RTP_INP_INITIALIZE_SENDER_MODULE;
00175     _ssrc = ssrc;
00176     _fileName = fileName;
00177     _mtu = mtu;
00178 };

void RTPInnerPacket::leaveSession  )  [virtual]
 

Called by the rtp module to inform the rtcp module that the session should be left.

00204                                   {
00205     _type = RTP_INP_LEAVE_SESSION;
00206 };

int RTPInnerPacket::mtu  )  [virtual]
 

Returns the maximum transmission unit stored in this RTPInnerPacket.

00238                         {
00239     return _mtu;
00240 };

RTPInnerPacket & RTPInnerPacket::operator= const RTPInnerPacket rinp  ) 
 

Assignment operator.

00063                                                                     {
00064     cPacket::operator=(rinp);
00065     _type = rinp._type;
00066     _commonName = opp_strdup(rinp._commonName);
00067     _mtu = rinp._mtu;
00068     _bandwidth = rinp._bandwidth;
00069     _rtcpPercentage = rinp._rtcpPercentage;
00070     _address = rinp._address;
00071     _port = rinp._port;
00072     _ssrc = rinp._ssrc;
00073     _payloadType = rinp._payloadType;
00074     _fileName = opp_strdup(rinp._fileName);
00075     _clockRate = rinp._clockRate;
00076     _timeStampBase = rinp._timeStampBase;
00077     _sequenceNumberBase = rinp._sequenceNumberBase;
00078     return *this;
00079 };

int RTPInnerPacket::payloadType  )  [virtual]
 

Returns the payload type stored in this RTPInnerPacket.

00273                                 {
00274     return _payloadType;
00275 };

IN_Port RTPInnerPacket::port  )  [virtual]
 

Returns the port stored in this RTPInnerPacket.

00258                              {
00259     return _port;
00260 };

void RTPInnerPacket::profileInitialized int  rtcpPercentage,
IN_Port  port
[virtual]
 

Called by the profile module after it has received the initializeProfile() message. It informs the rtp module about the percentage of the available bandwidth to be used by rtcp and the preferred port for this profile.

00123                                                                         {
00124     _type = RTP_INP_PROFILE_INITIALIZED;
00125     _rtcpPercentage = rtcpPercentage;
00126     _port = port;
00127 };

void RTPInnerPacket::rtcpInitialized u_int32  ssrc  )  [virtual]
 

Called by the rtcp module after it has waited for half an rtcp interval for incoming messages from other session participants. It informs the rtp module which later informs the rtp application about the ssrc identifier

00141                                                  {
00142     _type = RTP_INP_RTCP_INITIALIZED;
00143     _ssrc = ssrc;
00144 };

int RTPInnerPacket::rtcpPercentage  )  [virtual]
 

Returns the percentage of bandwidth for rtcp as stored in this RTPInnerPacket.

00248                                    {
00249     return _rtcpPercentage;
00250 };

void RTPInnerPacket::senderModuleControl u_int32  ssrc,
RTPSenderControlMessage msg
[virtual]
 

00190                                                                                    {
00191     _type = RTP_INP_SENDER_MODULE_CONTROL;
00192     _ssrc = ssrc;
00193     encapsulate(msg);
00194 };

void RTPInnerPacket::senderModuleCreated u_int32  ssrc  )  [virtual]
 

00155                                                      {
00156     _type = RTP_INP_SENDER_MODULE_CREATED;
00157     _ssrc = ssrc;
00158 };

void RTPInnerPacket::senderModuleDeleted u_int32  ssrc  )  [virtual]
 

00167                                                      {
00168     _type = RTP_INP_SENDER_MODULE_DELETED;
00169     _ssrc = ssrc;
00170 };

void RTPInnerPacket::senderModuleInitialized u_int32  ssrc,
int  payloadType,
int  clockRate,
int  timeStampBase,
int  sequenceNumberBase
[virtual]
 

00181                                                                                                                                     {
00182     _type = RTP_INP_SENDER_MODULE_INITIALIZED;
00183     _ssrc = ssrc;
00184     _payloadType = payloadType;
00185     _clockRate = clockRate;
00186     _timeStampBase = timeStampBase;
00187     _sequenceNumberBase = sequenceNumberBase;
00188 };

void RTPInnerPacket::senderModuleStatus u_int32  ssrc,
RTPSenderStatusMessage msg
[virtual]
 

00197                                                                                  {
00198     _type = RTP_INP_SENDER_MODULE_STATUS;
00199     _ssrc = ssrc;
00200     encapsulate(msg);
00201 };

int RTPInnerPacket::sequenceNumberBase  )  [virtual]
 

Returns the rtp sequence number base stored in this RTPInnerPacket.

00288                                        {
00289     return _sequenceNumberBase;
00290 };

void RTPInnerPacket::sessionLeft  )  [virtual]
 

Called by the rtcp module when the rtcp bye packet has been sent to the network.

00209                                  {
00210     _type = RTP_INP_SESSION_LEFT;
00211 };

u_int32 RTPInnerPacket::ssrc  )  [virtual]
 

Returns the ssrc identifier stored in this RTPInnerPacket.

00263                              {
00264     return _ssrc;
00265 };

int RTPInnerPacket::timeStampBase  )  [virtual]
 

Returns the rtp time stamp base stored in this RTPInnerPacket.

00283                                   {
00284     return _timeStampBase;
00285 };

RTPInnerPacket::RTP_INP_TYPE RTPInnerPacket::type  )  [virtual]
 

Returns the type of this RTPInnerPacket.

00228                                                 {
00229     return _type;
00230 };

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

Writes a longer info about this RTPInnerPacket into the given output stream.

00099                                                        {
00100     os << "RTPInnerPacket:" << endl;
00101     os << "  type = " << _type << endl;
00102     os << "  commonName = " << _commonName << endl;
00103     os << "  mtu = " << _mtu << endl;
00104     os << "  bandwidth = " << _bandwidth << endl;
00105     os << "  rtcpPercentage = " << _rtcpPercentage << endl;
00106     os << "  address = " << _address << endl;
00107     os << "  port = " << _port << endl;
00108     os << "  ssrc = " << _ssrc << endl;
00109     os << "  payloadType = " << _payloadType << endl;
00110     os << "  fileName = " << _fileName << endl;
00111     os << "  clockRate = " << _clockRate << endl;
00112     os << "  timeStampBase = " << _timeStampBase << endl;
00113     os << "  sequenceNumberBase = " << _sequenceNumberBase << endl;
00114 };


Member Data Documentation

IN_Addr RTPInnerPacket::_address [private]
 

The address stored this RTPInnerPacket.

int RTPInnerPacket::_bandwidth [private]
 

The bandwidth stored in this RTPInnerPacket.

int RTPInnerPacket::_clockRate [private]
 

The clock rate stored in this RTPInnerPacket.

const char* RTPInnerPacket::_commonName [private]
 

The CNAME stored in this RTPInnerPacket.

const char* RTPInnerPacket::_fileName [private]
 

The file name stored in this RTPInnerPacket.

int RTPInnerPacket::_mtu [private]
 

The mtu stored in this RTPInnerPacket.

int RTPInnerPacket::_payloadType [private]
 

The payload type stored in this RTPInnerPacket.

IN_Port RTPInnerPacket::_port [private]
 

The port stored this RTPInnerPacket.

int RTPInnerPacket::_rtcpPercentage [private]
 

The rtcp percentage stored in this RTPInnerPacket.

int RTPInnerPacket::_sequenceNumberBase [private]
 

The rtp sequence number base stored in this RTPInnerPacket.

u_int32 RTPInnerPacket::_ssrc [private]
 

The ssrc identifier stored in this RTPInnerPacket.

int RTPInnerPacket::_timeStampBase [private]
 

The rtp time stamp base stored in this RTPInnerPacket.

RTP_INP_TYPE RTPInnerPacket::_type [private]
 

The type of this RTPInnerPacket.


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