Rtp

Package: inet.transportlayer.rtp

Rtp

simple module

The Rtp module is the center of the Rtp layer of an endsystem. It communicates with the application, and sends and receives Rtp data packets.

Much of the work is done by dynamically created Profile, and Payload Sender and Receiver modules (the latter two are created by Profile).

See RtpProfile, RtpAvProfile

Used in compound modules

Name Type Description
RtpHost compound module (no description)

Parameters

Name Type Default value Description
interfaceTableModule string

The path to the InterfaceTable module

routingTableModule string

Properties

Name Value Description
display i=block/buffer

Gates

Name Direction Size Description
appIn input
profileIn input
rtcpIn input
udpIn input
appOut output
profileOut output
rtcpOut output
udpOut output

Signals

Name Type Unit
packetReceived cPacket

Statistics

Name Title Source Record Unit Interpolation Mode
packetReceived packets received packetReceived count, sum(packetBytes), vector(packetBytes) none
endToEndDelay end-to-end delay dataAge(packetReceived) histogram, vector s none

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived
Ipv4RoutingTableinet::Ipv4RoutingTable::getInterfaceForDestAddrgetInterfaceForDestAddr(%u.%u.%u.%u)

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
appInRtpControlMsg0RtpCiCreateSenderModuleRtpApplication
appInRtpControlMsg0RtpCiEnterSessionRtpApplication
appInRtpControlMsg0RtpCiLeaveSessionRtpApplication
appInRtpControlMsg0RtpCiSenderControlRtpApplication
profileInRtpInnerPacket0RtpAvProfile
rtcpInRtpInnerPacket0Rtcp
udpInPacket0 (UdpStatusInd::UDP_I_DATA)UdpDscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, L4PortInd, NetworkProtocolInd, SocketInd, TosInd, TransportProtocolInd

Outgoing messages (observed)

gatemsgkindctrldestModuletags
appOutRtpControlMsg0RtpCiSenderModuleCreatedRtpApplication
appOutRtpControlMsg0RtpCiSenderStatusRtpApplication
appOutRtpControlMsg0RtpCiSessionEnteredRtpApplication
appOutRtpControlMsg0RtpCiSessionLeftRtpApplication
profileOutRtpInnerPacket0RtpAvProfile
rtcpOutRtpInnerPacket0Rtcp
udpOutPacket0 (UdpCommandCode::UDP_C_DATA)UdpDispatchProtocolReq, L3AddressReq, L4PortReq, SocketReq
udpOutRequest1 (UdpCommandCode::UDP_C_BIND)UdpBindCommandUdpDispatchProtocolReq, SocketReq
udpOutRequest3 (UdpCommandCode::UDP_C_SETOPTION)UdpJoinMulticastGroupsCommandUdpDispatchProtocolReq, SocketReq

Packet operations (observed)

chunkTypepacketAction
peekData
RtpHeaderpeekAtFront

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolReqaddTagIfAbsent
L3AddressReqaddTagIfAbsent
L4PortReqaddTagIfAbsent
SocketReqaddTagIfAbsent

Region Tagging operations (observed)

tagTypetagAction
CreationTimeTaggetAllTags

Tagging operations (observed)

tagTypetagAction
inet::Ipv4InterfaceDatafindTag

Source code

//
// The Rtp module is the center of the Rtp layer of an endsystem.
// It communicates with the application, and sends and receives Rtp data
// packets.
//
// Much of the work is done by dynamically created Profile, and Payload
// Sender and Receiver modules (the latter two are created by Profile).
//
// See ~RtpProfile, ~RtpAvProfile
//
//# TODO Translate:
//# Az ~Rtp az appIn gate-en a következő üzeneteket fogadja az application-tól:
//# olyan msg-t, ami ~RtpControlInfo leszármazott controlinfo-t tartalmaz.
//#   - ~RtpCiEnterSession: Enter new session
//#         Create and initialize an ~RtpProfile module for the session.
//#         params: profileName, commonName, bandwidth, destinationAddress, port
//#   - ~RtpCiCreateSenderModule:
//#         Küld a profile-nak egy msg-t, hogy hozzon létre új modult a fileName fájl küldésére.
//#         params: ssrc, payloadType, fileName
//#   - ~RtpCiDeleteSenderModule:
//#         Küld a profile-nak egy msg-t, hogy törölje a küldő modult.
//#         params: ssrc
//#   - ~RtpCiSenderControl:
//#         Küld a profile-nak egy msg-t, hogy a modul hajtsa végre a <command> parancsot.
//#         params: ssrc, command (see ~RtpSenderControlMessageCommands), parameter1, parameter2
//#   - ~RtpCiLeaveSession: Leave session
//#         Delete ~RtpProfile module.
//#         params: ---
//#   -
//# Az ~Rtp az appOut gate-en a következő üzeneteket küldi az application-nek:
//# Olyan ~RtpControlMsg msg-t, ami ~RtpControlInfo leszármazottat tartalmaz:
//#   - ~RtpCiSenderModuleCreated:
//#         Elküldi az App részére a létrehozott modulhoz tartozó ssrc-t
//#         params: ssrc
//#   - ~RtpCiSenderModuleDeleted:
//#         Értesíti az App-ot, hogy a modul törölve lett.
//#         params: ssrc
//#   - ~RtpCiSenderStatus:
//#         Elküldi az App részére a modul állapotát. (PLAYING, FINISHED, STOPPED, PAUSED)
//#         params: ssrc, status (see ~RtpSenderStatus), timeStamp
//#   - ~RtpCiSessionEntered:
//#         Értesíti az App-ot, hogy létrehozott egy új session-t (~RtpProfile-t).
//#         params: ssrc
//#   - ~RtpCiSessionLeft:
//#         Értesíti az App-ot, hogy véget lett a session-nek és törölte az ~RtpProfile-t.
//#         params: ---
simple Rtp
{
    parameters:
        string interfaceTableModule;   // The path to the InterfaceTable module
        string routingTableModule;
        @display("i=block/buffer");
        @signal[packetReceived](type=cPacket);
        @statistic[packetReceived](title="packets received"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
        @statistic[endToEndDelay](title="end-to-end delay"; source="dataAge(packetReceived)"; unit=s; record=histogram,vector; interpolationmode=none);

    gates:
        input appIn @labels(RtpInterfacePacket/down);
        input profileIn @labels(RtpInnerPacket);
        input rtcpIn @labels(RtpInnerPacket);
        input udpIn @labels(UdpControlInfo/up);
        output appOut @labels(RtpInterfacePacket/up);
        output profileOut @labels(RtpInnerPacket);
        output rtcpOut @labels(RtpInnerPacket);
        output udpOut @labels(UdpControlInfo/down);
}

File: src/inet/transportlayer/rtp/Rtp.ned