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

RTPPayloadSender.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           RTPPayloadSender.h  -  description
00003                              -------------------
00004     begin                : Wed Nov 28 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 
00018 
00023 #ifndef __RTPPAYLOADSENDER_H__
00024 #define __RTPPAYLOADSENDER_H__
00025 
00026 #include <fstream.h>
00027 #include "omnetpp.h"
00028 #include "types.h"
00029 #include "RTPInnerPacket.h"
00030 
00031 
00038 class RTPPayloadSender : public cSimpleModule {
00039         
00040         Module_Class_Members(RTPPayloadSender, cSimpleModule, 8192);
00041 
00045         virtual ~RTPPayloadSender();
00046 
00047         public:
00048         
00053                 virtual void initialize();
00054 
00055                 virtual void activity();
00056 
00060                 enum SenderStatus {
00061                         STOPPED, 
00062                         PLAYING 
00063                 };
00064         
00065         protected:
00066         
00070                 ifstream  _inputFileStream;
00071                 
00075                 int _mtu;
00076                 
00080                 u_int32 _ssrc;
00081                 
00085                 int _payloadType;
00086                 
00090                 int _clockRate;
00091                 
00096                 u_int32 _timeStampBase;
00097                 
00101                 u_int32 _timeStamp;
00102                 
00107                 u_int16 _sequenceNumberBase;
00108                 
00112                 u_int16 _sequenceNumber;
00113                 
00117                 SenderStatus _status;
00118 
00124                 cMessage *_reminderMessage;
00125                 
00132                 virtual void initializeSenderModule(RTPInnerPacket *);
00133 
00142                 virtual void openSourceFile(const char *fileName);
00143 
00147                 virtual void closeSourceFile();
00148 
00153                 virtual void play();
00154 
00160                 virtual void playUntilTime(simtime_t moment);
00161 
00167                 virtual void playUntilByte(int position);
00168 
00174                 virtual void pause();
00175 
00181                 virtual void seekTime(simtime_t moment);
00182 
00188                 virtual void seekByte(int position);
00189 
00196                 virtual void stop();
00197 
00202                 virtual void endOfFile();
00203 
00210                 virtual bool sendPacket();
00211 };
00212 
00213 #endif

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