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

RTPInterfacePacket Class Reference

#include <RTPInterfacePacket.h>

List of all members.


Detailed Description

The class RTPInterfacePacket is used for communication between an RTPApplication and an RTPLayer module. Its offers functionality for starting and stopping of an rtp session, transmission of files and feedback about the success of the operations.


Public Types

enum  RTP_IFP_TYPE {
  RTP_IFP_UNDEF, RTP_IFP_ENTER_SESSION, RTP_IFP_SESSION_ENTERED, RTP_IFP_CREATE_SENDER_MODULE,
  RTP_IFP_SENDER_MODULE_CREATED, RTP_IFP_DELETE_SENDER_MODULE, RTP_IFP_SENDER_MODULE_DELETED, RTP_IFP_SENDER_CONTROL,
  RTP_IFP_SENDER_STATUS, RTP_IFP_LEAVE_SESSION, RTP_IFP_SESSION_LEFT
}

Public Member Functions

 RTPInterfacePacket (const char *name=NULL)
 RTPInterfacePacket (const RTPInterfacePacket &rifp)
virtual ~RTPInterfacePacket ()
RTPInterfacePacketoperator= (const RTPInterfacePacket &rifp)
virtual cObject * dup () const
virtual const char * className () const
virtual std::string info ()
virtual void writeContents (std::ostream &os)
virtual void enterSession (const char *commonName, const char *profileName, int bandwidth, IN_Addr destinationAddress, IN_Port port)
virtual void sessionEntered (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 senderModuleControl (u_int32 ssrc, RTPSenderControlMessage *msg)
virtual void senderModuleStatus (u_int32 ssrc, RTPSenderStatusMessage *msg)
virtual void leaveSession ()
virtual void sessionLeft ()
virtual RTP_IFP_TYPE type ()
virtual const char * commonName ()
virtual const char * profileName ()
virtual int bandwidth ()
virtual IN_Addr destinationAddress ()
virtual IN_Port port ()
virtual u_int32 ssrc ()
virtual int payloadType ()
virtual const char * fileName ()

Private Attributes

RTP_IFP_TYPE _type
const char * _commonName
const char * _profileName
int _bandwidth
IN_Addr _destinationAddress
IN_Port _port
u_int32 _ssrc
int _payloadType
const char * _fileName


Member Enumeration Documentation

enum RTPInterfacePacket::RTP_IFP_TYPE
 

An enumeration to distinguish the different functions of the RTPInterfacePacket.

Enumeration values:
RTP_IFP_UNDEF 
RTP_IFP_ENTER_SESSION 
RTP_IFP_SESSION_ENTERED 
RTP_IFP_CREATE_SENDER_MODULE 
RTP_IFP_SENDER_MODULE_CREATED 
RTP_IFP_DELETE_SENDER_MODULE 
RTP_IFP_SENDER_MODULE_DELETED 
RTP_IFP_SENDER_CONTROL 
RTP_IFP_SENDER_STATUS 
RTP_IFP_LEAVE_SESSION 
RTP_IFP_SESSION_LEFT 


Constructor & Destructor Documentation

RTPInterfacePacket::RTPInterfacePacket const char *  name = NULL  ) 
 

Default constructor.

00027                                                        : cPacket(name) {
00028     _type = RTP_IFP_UNDEF;
00029     _commonName = NULL;
00030     _profileName = NULL;
00031     _bandwidth = 0;
00032     _destinationAddress = IPADDRESS_UNDEF;
00033     _port = IPSuite_PORT_UNDEF;
00034     _ssrc = 0;
00035     _payloadType = 0;
00036     _fileName = NULL;
00037 };

RTPInterfacePacket::RTPInterfacePacket const RTPInterfacePacket rifp  ) 
 

Copy constructor.

00040                                                                      : cPacket() {
00041     setName(rifp.name());
00042     operator=(rifp);
00043 };

RTPInterfacePacket::~RTPInterfacePacket  )  [virtual]
 

Destructor.

00046                                         {
00047     if (opp_strcmp(_commonName, ""))
00048         delete _commonName;
00049     if (opp_strcmp(_profileName, ""))
00050         delete _profileName;
00051     if (opp_strcmp(_fileName, ""))
00052         delete _fileName;
00053 };


Member Function Documentation

int RTPInterfacePacket::bandwidth  )  [virtual]
 

Returns the bandidth stored in this RTPInterfacePacket.

00231                                   {
00232     return _bandwidth;
00233 };

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

Returns the class name "RTPInterfacePacket".

00076                                                 {
00077     return "RTPInterfacePacket";
00078 };

const char * RTPInterfacePacket::commonName  )  [virtual]
 

Returns the CNAME stored in this RTPInterfacePacket.

00206                                            {
00207     return opp_strdup(_commonName);
00208 };

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

00118                                                                                                {
00119     _type = RTP_IFP_CREATE_SENDER_MODULE;
00120     _ssrc = ssrc;
00121     _payloadType =payloadType;
00122     _fileName = fileName;
00123 };

void RTPInterfacePacket::deleteSenderModule u_int32  ssrc  )  [virtual]
 

00132                                                         {
00133     _type = RTP_IFP_DELETE_SENDER_MODULE;
00134     _ssrc = ssrc;
00135 };

IN_Addr RTPInterfacePacket::destinationAddress  )  [virtual]
 

Returns the address stored in this RTPInterfacePacket.

00236                                                {
00237     return _destinationAddress;
00238 };

cObject * RTPInterfacePacket::dup  )  const [virtual]
 

Duplicates the RTPInterfacePacket by calling the copy constructor.

00071                                        {
00072     return new RTPInterfacePacket(*this);
00073 };

void RTPInterfacePacket::enterSession const char *  commonName,
const char *  profileName,
int  bandwidth,
IN_Addr  destinationAddress,
IN_Port  port
[virtual]
 

Called by the rtp application to make the rtp layer enter an rtp session with the given parameters.

00102                                                                                                                                               {
00103     _type = RTP_IFP_ENTER_SESSION;
00104     _commonName = commonName;
00105     _profileName = profileName;
00106     _bandwidth = bandwidth;
00107     _destinationAddress = destinationAddress;
00108     _port = port;
00109 };

const char * RTPInterfacePacket::fileName  )  [virtual]
 

Returns the file name stored in this RTPInterfacePacket.

00226                                          {
00227     return opp_strdup(_fileName);
00228 };

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

Writes a one line info about this RTPInterfacePacket into the given string.

00081                                    {
00082     std::stringstream out;
00083     out << "RTPInterfacePacket: type=" << _type;
00084     return out.str();
00085 };

void RTPInterfacePacket::leaveSession  )  [virtual]
 

Called by the application to order the rtp layer to stop participating in this rtp session.

00191                                       {
00192     _type = RTP_IFP_LEAVE_SESSION;
00193 };

RTPInterfacePacket & RTPInterfacePacket::operator= const RTPInterfacePacket rifp  ) 
 

Assignment operator.

00056                                                                                 {
00057     cPacket::operator=(rifp);
00058     _type = rifp._type;
00059     _commonName = opp_strdup(rifp._commonName);
00060     _profileName = opp_strdup(rifp._profileName);
00061     _bandwidth = rifp._bandwidth;
00062     _destinationAddress = rifp._destinationAddress;
00063     _port = rifp._port;
00064     _ssrc = rifp._ssrc;
00065     _payloadType = rifp._payloadType;
00066     _fileName = opp_strdup(rifp._fileName);
00067     return *this;
00068 };

int RTPInterfacePacket::payloadType  )  [virtual]
 

Returns the payload type stored in this RTPInterfacePacket.

00221                                     {
00222     return _payloadType;
00223 };

IN_Port RTPInterfacePacket::port  )  [virtual]
 

Returns the port stored in this RTPInterfacePacket.

00241                                  {
00242     return _port;
00243 };

const char * RTPInterfacePacket::profileName  )  [virtual]
 

Returns the profile name stored in this RTPInterfacePacket.

00211                                             {
00212     return opp_strdup(_profileName);
00213 };

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

00144                                                                                        {
00145     _type = RTP_IFP_SENDER_CONTROL;
00146     _ssrc = ssrc;
00147     encapsulate(msg);
00148 };

void RTPInterfacePacket::senderModuleCreated u_int32  ssrc  )  [virtual]
 

00126                                                          {
00127     _type = RTP_IFP_SENDER_MODULE_CREATED;
00128     _ssrc = ssrc;
00129 };

void RTPInterfacePacket::senderModuleDeleted u_int32  ssrc  )  [virtual]
 

00138                                                          {
00139     _type = RTP_IFP_SENDER_MODULE_DELETED;
00140     _ssrc = ssrc;
00141 };

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

00151                                                                                      {
00152     _type = RTP_IFP_SENDER_STATUS;
00153     _ssrc = ssrc;
00154     encapsulate(msg);
00155 };

void RTPInterfacePacket::sessionEntered u_int32  ssrc  )  [virtual]
 

Called by the rtp module to inform the application that the rtp session has been entered.

00112                                                     {
00113     _type = RTP_IFP_SESSION_ENTERED;
00114     _ssrc = ssrc;
00115 };

void RTPInterfacePacket::sessionLeft  )  [virtual]
 

Called by the rtp module to inform the application that this end system stop participating in this rtp session.

00196                                      {
00197     _type = RTP_IFP_SESSION_LEFT;
00198 };

u_int32 RTPInterfacePacket::ssrc  )  [virtual]
 

Returns the ssrc identifier stored in this RTPInterfacePacket.

00216                                  {
00217     return _ssrc;
00218 };

RTPInterfacePacket::RTP_IFP_TYPE RTPInterfacePacket::type  )  [virtual]
 

Returns the type of this RTPInterfacePacket.

00201                                                         {
00202     return _type;
00203 };

void RTPInterfacePacket::writeContents std::ostream &  os  )  [virtual]
 

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

00088                                                      {
00089     os << "RTPInterfacePacket:" << endl;
00090     os << "  type = " << _type << endl;
00091     os << "  commonName = " << _commonName << endl;
00092     os << "  profileName = " << _profileName << endl;
00093     os << "  bandwidth = " << _bandwidth << endl;
00094     os << "  destinationAddress = " << _destinationAddress << endl;
00095     os << "  port = " << _port << endl;
00096     os << "  ssrc = " << _ssrc << endl;
00097     os << "  payloadType = " << _payloadType << endl;
00098     os << "  fileName = " << _fileName << endl;
00099 };


Member Data Documentation

int RTPInterfacePacket::_bandwidth [private]
 

The bandwidth stored in this RTPInterfacePacket.

const char* RTPInterfacePacket::_commonName [private]
 

The CNAME stored in this RTPInterfacePacket.

IN_Addr RTPInterfacePacket::_destinationAddress [private]
 

The address stored in this RTPInterfacePacket.

const char* RTPInterfacePacket::_fileName [private]
 

The file name stored in this RTPInterfacePacket.

int RTPInterfacePacket::_payloadType [private]
 

The payload type stored in this RTPInterfacePacket.

IN_Port RTPInterfacePacket::_port [private]
 

The port stored in this RTPInterfacePacket.

const char* RTPInterfacePacket::_profileName [private]
 

The profile name stored in this RTPInterfacePacket.

u_int32 RTPInterfacePacket::_ssrc [private]
 

The ssrc identifier stored in this RTPInterfacePacket.

RTP_IFP_TYPE RTPInterfacePacket::_type [private]
 

The type of the RTPInterfacePacket.


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