INET Framework for OMNeT++/OMNEST
|
The class RTCP is responsible for creating, receiving and processing of rtcp packets. More...
#include <RTCP.h>
Public Member Functions | |
RTCP () | |
virtual | ~RTCP () |
virtual bool | handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override |
Perform one stage of a lifecycle operation. More... | |
Public Member Functions inherited from inet::ILifecycle | |
virtual | ~ILifecycle () |
Protected Member Functions | |
virtual void | initialize (int stage) override |
Initializes variables. More... | |
virtual int | numInitStages () const override |
virtual void | handleMessage (cMessage *msg) override |
Message handling. More... | |
virtual void | handleMessageFromRTP (cMessage *msg) |
Handles messages from the RTP module. More... | |
virtual void | handleMessageFromUDP (cMessage *msg) |
Handles messages coming from the socket layer. More... | |
virtual void | handleSelfMessage (cMessage *msg) |
Handles self messages. More... | |
virtual void | handleInitializeRTCP (RTPInnerPacket *rinp) |
Initializes the rtcp module when the session is started. More... | |
virtual void | handleSenderModuleInitialized (RTPInnerPacket *rinp) |
Stores information about the new transmission. More... | |
virtual void | handleDataOut (RTPInnerPacket *packet) |
Stores information about an outgoing RTP data packet. More... | |
virtual void | handleDataIn (RTPInnerPacket *rinp) |
Stores information about an outgoing RTP data packet. More... | |
virtual void | handleLeaveSession (RTPInnerPacket *rinp) |
Makes the rtcp module send an RTCPByePacket in the next RTCPCompoundPacket to tell other participants in the RTP session that this end system leaves. More... | |
virtual void | connectRet () |
Called when the socket layer has finished a connect. More... | |
virtual void | readRet (cPacket *sifpIn) |
Called when this rtcp module receives data from the socket layer. More... | |
virtual void | createSocket () |
Request a server socket from the socket layer. More... | |
virtual void | chooseSSRC () |
Chooses the ssrc identifier for this end system. More... | |
virtual void | scheduleInterval () |
Calculates the length of the next rtcp interval an issues a self message to remind itself. More... | |
virtual void | createPacket () |
Creates and sends an RTCPCompoundPacket. More... | |
virtual void | processOutgoingRTPPacket (RTPPacket *packet) |
Extracts information of a sent RTPPacket. More... | |
virtual void | processIncomingRTPPacket (RTPPacket *packet, IPv4Address address, int port) |
Extracts information of a received RTPPacket. More... | |
virtual void | processIncomingRTCPPacket (RTCPCompoundPacket *packet, IPv4Address address, int port) |
Extracts information of a received RTCPCompoundPacket. More... | |
void | processIncomingRTCPSenderReportPacket (RTCPSenderReportPacket *rtcpSenderReportPacket, IPv4Address address, int port) |
void | processIncomingRTCPReceiverReportPacket (RTCPReceiverReportPacket *rtcpReceiverReportPacket, IPv4Address address, int port) |
void | processIncomingRTCPSDESPacket (RTCPSDESPacket *rtcpSDESPacket, IPv4Address address, int port, simtime_t arrivalTime) |
void | processIncomingRTCPByePacket (RTCPByePacket *rtcpByePacket, IPv4Address address, int port) |
virtual RTPParticipantInfo * | findParticipantInfo (uint32 ssrc) |
Returns the RTPParticipantInfo object used for storing information about the RTP end system with this ssrc identifier. More... | |
virtual void | calculateAveragePacketSize (int size) |
Recalculates the average size of an RTCPCompoundPacket when one of this size has been sent or received. More... | |
Protected Attributes | |
int | _mtu = 0 |
The maximum size an RTCPCompundPacket can have. More... | |
int | _bandwidth = 0 |
The bandwidth for this RTP session. More... | |
int | _rtcpPercentage = 0 |
The percentage of bandwidth for rtcp. More... | |
IPv4Address | _destinationAddress |
The destination address. More... | |
int | _port = -1 |
The rtcp port. More... | |
bool | _ssrcChosen = false |
True when this end system has chosen its ssrc identifier. More... | |
bool | _leaveSession = false |
True when this end system is about to leave the session. More... | |
RTPSenderInfo * | _senderInfo = nullptr |
The RTPSenderInfo about this end system. More... | |
cArray | _participantInfos |
Information about all known RTP end system participating in this RTP session. More... | |
UDPSocket | _udpSocket |
The UDP socket for sending/receiving rtcp packets. More... | |
int | _packetsCalculated = 0 |
The number of packets this rtcp module has calculated. More... | |
double | _averagePacketSize = 0 |
The average size of an RTCPCompoundPacket. More... | |
Static Protected Attributes | |
static simsignal_t | rcvdPkSignal = registerSignal("rcvdPk") |
The output vector for statistical data about the behaviour of rtcp. More... | |
The class RTCP is responsible for creating, receiving and processing of rtcp packets.
It also keeps track of this and other RTP end systems.
|
virtual |
|
protectedvirtual |
Recalculates the average size of an RTCPCompoundPacket when one of this size has been sent or received.
Referenced by createPacket(), and processIncomingRTCPPacket().
|
protectedvirtual |
Chooses the ssrc identifier for this end system.
Referenced by handleSelfMessage().
|
protectedvirtual |
Called when the socket layer has finished a connect.
Referenced by createSocket().
|
protectedvirtual |
Creates and sends an RTCPCompoundPacket.
Referenced by handleSelfMessage().
|
protectedvirtual |
Request a server socket from the socket layer.
Referenced by handleInitializeRTCP().
|
protectedvirtual |
Returns the RTPParticipantInfo object used for storing information about the RTP end system with this ssrc identifier.
Returns nullptr if this end system is unknown.
Referenced by chooseSSRC(), processIncomingRTCPByePacket(), processIncomingRTCPReceiverReportPacket(), processIncomingRTCPSDESPacket(), processIncomingRTCPSenderReportPacket(), and processIncomingRTPPacket().
|
protectedvirtual |
Stores information about an outgoing RTP data packet.
Referenced by handleMessageFromRTP().
|
protectedvirtual |
Stores information about an outgoing RTP data packet.
Referenced by handleMessageFromRTP().
|
protectedvirtual |
Initializes the rtcp module when the session is started.
Referenced by handleMessageFromRTP().
|
protectedvirtual |
Makes the rtcp module send an RTCPByePacket in the next RTCPCompoundPacket to tell other participants in the RTP session that this end system leaves.
Referenced by handleMessageFromRTP().
|
overrideprotectedvirtual |
Message handling.
Dispatches messages by arrival gate.
|
protectedvirtual |
Handles messages from the RTP module.
Referenced by handleMessage().
|
protectedvirtual |
Handles messages coming from the socket layer.
Referenced by handleMessage().
|
overridevirtual |
Perform one stage of a lifecycle operation.
Processing may be done entirely within this method, or may be a longer process that involves nonzero simulation time or several events, and is triggered by this method call.
Return value: true = "done"; false = "not yet done, will invoke doneCallback when done"
Implements inet::ILifecycle.
|
protectedvirtual |
Handles self messages.
Referenced by handleMessage().
|
protectedvirtual |
Stores information about the new transmission.
Referenced by handleMessageFromRTP().
|
overrideprotectedvirtual |
Initializes variables.
|
inlineoverrideprotectedvirtual |
|
protected |
Referenced by processIncomingRTCPPacket().
|
protectedvirtual |
Extracts information of a received RTCPCompoundPacket.
Referenced by readRet().
|
protected |
Referenced by processIncomingRTCPPacket().
|
protected |
Referenced by processIncomingRTCPPacket().
|
protected |
Referenced by processIncomingRTCPPacket().
|
protectedvirtual |
Extracts information of a received RTPPacket.
Referenced by handleDataIn().
|
protectedvirtual |
Extracts information of a sent RTPPacket.
Referenced by handleDataOut().
|
protectedvirtual |
Called when this rtcp module receives data from the socket layer.
Referenced by handleMessageFromUDP().
|
protectedvirtual |
Calculates the length of the next rtcp interval an issues a self message to remind itself.
Referenced by handleSelfMessage().
|
protected |
The average size of an RTCPCompoundPacket.
Referenced by calculateAveragePacketSize(), initialize(), and scheduleInterval().
|
protected |
The bandwidth for this RTP session.
Referenced by handleInitializeRTCP(), and scheduleInterval().
|
protected |
The destination address.
Referenced by createPacket(), handleInitializeRTCP(), and readRet().
|
protected |
True when this end system is about to leave the session.
Referenced by createPacket(), handleLeaveSession(), handleSelfMessage(), and initialize().
|
protected |
The maximum size an RTCPCompundPacket can have.
Referenced by handleInitializeRTCP().
|
protected |
The number of packets this rtcp module has calculated.
Referenced by calculateAveragePacketSize(), and initialize().
|
protected |
Information about all known RTP end system participating in this RTP session.
Referenced by chooseSSRC(), createPacket(), findParticipantInfo(), initialize(), processIncomingRTCPByePacket(), processIncomingRTCPReceiverReportPacket(), processIncomingRTCPSDESPacket(), processIncomingRTCPSenderReportPacket(), processIncomingRTPPacket(), and scheduleInterval().
|
protected |
The rtcp port.
Referenced by createPacket(), createSocket(), handleInitializeRTCP(), and readRet().
|
protected |
The percentage of bandwidth for rtcp.
Referenced by handleInitializeRTCP(), and scheduleInterval().
|
protected |
The RTPSenderInfo about this end system.
Referenced by chooseSSRC(), createPacket(), handleInitializeRTCP(), handleSelfMessage(), handleSenderModuleInitialized(), processIncomingRTCPByePacket(), processIncomingRTCPReceiverReportPacket(), processIncomingRTCPSenderReportPacket(), processOutgoingRTPPacket(), scheduleInterval(), and ~RTCP().
|
protected |
True when this end system has chosen its ssrc identifier.
Referenced by chooseSSRC(), handleSelfMessage(), initialize(), and ~RTCP().
|
protected |
The UDP socket for sending/receiving rtcp packets.
Referenced by createPacket(), createSocket(), and initialize().
|
staticprotected |
The output vector for statistical data about the behaviour of rtcp.
Every participant's rtcp module writes its calculated rtcp interval (without variation
Referenced by readRet().