Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

RTPInnerPacket.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           RTPInnerPacket.h  -  description
00003                              -------------------
00004     begin                : Sat Oct 20 2001
00005     copyright            : (C) 2001 by Matthias Oppitz
00006     email                : Matthias.Oppitz@gmx.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00022 #ifndef __RTPINNERPACKET_H__
00023 #define __RTPINNERPACKET_H__
00024 
00025 #include "omnetpp.h"
00026 
00027 #include "in_addr.h"
00028 #include "in_port.h"
00029 
00030 #include "types.h"
00031 #include "RTPPacket.h"
00032 #include "RTPSenderControlMessage.h"
00033 #include "RTPSenderStatusMessage.h"
00034 
00035 
00039 class RTPInnerPacket : public cPacket {
00040 
00041         public:
00042                 
00047                 enum RTP_INP_TYPE {
00048                         RTP_INP_UNDEF,
00049                         RTP_INP_INITIALIZE_PROFILE,
00050                         RTP_INP_PROFILE_INITIALIZED,
00051                         RTP_INP_INITIALIZE_RTCP,
00052                         RTP_INP_RTCP_INITIALIZED,
00053                         RTP_INP_CREATE_SENDER_MODULE,
00054                         RTP_INP_SENDER_MODULE_CREATED,
00055                         RTP_INP_DELETE_SENDER_MODULE,
00056                         RTP_INP_SENDER_MODULE_DELETED,
00057                         RTP_INP_INITIALIZE_SENDER_MODULE,
00058                         RTP_INP_SENDER_MODULE_INITIALIZED,
00059                         RTP_INP_SENDER_MODULE_CONTROL,
00060                         RTP_INP_SENDER_MODULE_STATUS,
00061                         RTP_INP_LEAVE_SESSION,
00062                         RTP_INP_SESSION_LEFT,
00063                         RTP_INP_DATA_OUT,
00064                         RTP_INP_DATA_IN
00065                 };
00066                 
00070                 RTPInnerPacket(const char *name = NULL);
00071                 
00075                 RTPInnerPacket(const RTPInnerPacket& rinp);
00076                 
00080                 virtual ~RTPInnerPacket();
00081                 
00085                 RTPInnerPacket& operator=(const RTPInnerPacket& rinp);
00086                 
00090                 virtual cObject *dup() const;
00091                 
00095                 virtual const char *className() const;
00096                 
00100                 virtual void info(char *buf) const;
00101                 
00105                 virtual void writeContents(ostream& os) const;
00106                 
00111                 virtual void initializeProfile(int mtu);
00112                 
00118                 virtual void profileInitialized(int rtcpPercentage, IN_Port port);
00119                 
00124                 virtual void initializeRTCP(const char *commonName, int mtu, int bandwidth, int rtcpPercentage, IN_Addr address, IN_Port port);
00125                 
00132                 virtual void rtcpInitialized(u_int32 ssrc);
00133                 
00134                 
00135                 virtual void createSenderModule(u_int32 ssrc, int payloadType, const char *fileName);
00136                 virtual void senderModuleCreated(u_int32 ssrc);
00137 
00138                 virtual void deleteSenderModule(u_int32 ssrc);
00139                 virtual void senderModuleDeleted(u_int32 ssrc);
00140 
00141                 virtual void initializeSenderModule(u_int32 ssrc, const char *fileName, int mtu);
00142                 virtual void senderModuleInitialized(u_int32 ssrc, int payloadType, int clockRate, int timeStampBase, int sequenceNumberBase);
00143 
00144                 virtual void senderModuleControl(u_int32 ssrc, RTPSenderControlMessage *msg);
00145                 virtual void senderModuleStatus(u_int32 ssrc, RTPSenderStatusMessage *msg);
00146 
00151                 virtual void leaveSession();
00152                 
00157                 virtual void sessionLeft();
00158                 
00163                 virtual void dataOut(RTPPacket *packet);
00164                 
00169                 virtual void dataIn(RTPPacket *packet, IN_Addr address, IN_Port port);
00170                 
00174                 virtual RTP_INP_TYPE type();
00175                 
00179                 virtual const char *commonName();
00180                 
00184                 virtual int mtu();
00185                 
00189                 virtual int bandwidth();
00190                 
00194                 virtual int rtcpPercentage();
00195                 
00199                 virtual IN_Addr address();
00200                 
00204                 virtual IN_Port port();
00205                 
00209                 virtual u_int32 ssrc();
00210                 
00214                 virtual int payloadType();
00215                 
00219                 virtual const char *fileName();
00220                 
00224                 virtual int clockRate();
00225                 
00229                 virtual int timeStampBase();
00230                 
00234                 virtual int sequenceNumberBase();
00235                 
00236                 
00237         private:
00238                 
00242                 RTP_INP_TYPE _type;
00243                 
00247                 const char *_commonName;
00248                 
00252                 int _mtu;
00253                 
00257                 int _bandwidth;
00258                 
00262                 int _rtcpPercentage;
00263                 
00267                 IN_Addr _address;
00268                 
00272                 IN_Port _port;
00273                 
00277                 u_int32 _ssrc;
00278                 
00282                 int _payloadType;
00283                 
00287                 const char *_fileName;
00288                 
00292                 int _clockRate;
00293                 
00297                 int _timeStampBase;
00298                 
00302                 int _sequenceNumberBase;
00303 };
00304 
00305 #endif

Generated on Tue Sep 12 12:20:20 2006 for RTP model for OMNeT++ by  doxygen 1.4.2