UdpSink

Package: inet.applications.udpapp

UdpSink

simple module

Consumes and prints packets received from the Udp module.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters

Name Type Default value Description
interfaceTableModule string

The path to the InterfaceTable module

startTime double 0s

application start time

stopTime double -1s

time of finishing receiving

localPort int

local port

receiveBroadcast bool false

if true, makes the socket receive broadcast packets

multicastGroup string ""

if non-empty, makes the socket receive multicast packets sent to that group

multicastSources string ""

if non-empty, than the socket receives multicast packets from those sources only

stopOperationExtraTime double -1s

extra time after lifecycle stop operation finished

stopOperationTimeout double 2s

timeout value for lifecycle stop operation

Properties

Name Value Description
display i=block/sink
lifecycleSupport

Gates

Name Direction Size Description
socketIn input
socketOut output

Signals

Name Type Unit
packetReceived inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetReceived packets received packetReceived count, sum(packetBytes), vector(packetBytes) none
throughput throughput throughput(packetReceived) vector bps
endToEndDelay end-to-end delay dataAge(packetReceived) histogram, vector s none
rcvdPkSeqNo received packet sequence number appPkSeqNo(packetReceived) vector none

Scheduled messages (observed)

msgkindctrltagsmsgnamecontext
omnetpp::cMessage1UDPSinkTimer
omnetpp::cMessage2UDPSinkTimer

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
socketInIndication2 (UdpStatusInd::UDP_I_SOCKET_CLOSED)UdpSocketClosedIndicationUdpSocketInd
socketInPacket0 (UdpStatusInd::UDP_I_DATA)UdpDscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, L4PortInd, NetworkProtocolInd, SocketInd, TosInd, TransportProtocolInd, DirectionTag?, EncapsulationProtocolInd?, ErrorRateInd?, Ieee802SapInd?, MacAddressInd?, SignalPowerInd?, SignalTimeInd?, SnirInd?, UserPriorityInd?, Ieee80211ChannelInd?, Ieee80211ModeInd?

Outgoing messages (observed)

gatemsgkindctrldestModuletags
socketOutRequest1 (UdpCommandCode::UDP_C_BIND)UdpBindCommandUdpDispatchProtocolReq, SocketReq
socketOutRequest3 (UdpCommandCode::UDP_C_SETOPTION)UdpJoinMulticastGroupsCommandUdpDispatchProtocolReq, SocketReq
socketOutRequest3 (UdpCommandCode::UDP_C_SETOPTION)UdpLeaveMulticastGroupsCommandUdpDispatchProtocolReq, SocketReq
socketOutRequest3 (UdpCommandCode::UDP_C_SETOPTION)UdpSetBroadcastCommandUdpDispatchProtocolReq, SocketReq
socketOutRequest4 (UdpCommandCode::UDP_C_CLOSE)UdpCloseCommandUdpDispatchProtocolReq, SocketReq

Packet operations (observed)

chunkTypepacketAction
peekData
ChunkpeekAtFront

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolReqaddTagIfAbsent
SocketIndfindTag
SocketReqaddTagIfAbsent

Region Tagging operations (observed)

tagTypetagAction
CreationTimeTaggetAllTags

Tagging operations (observed)

tagTypetagAction
inet::Ipv4InterfaceDatafindTag

Source code

//
// Consumes and prints packets received from the ~Udp module.
//
simple UdpSink like IApp
{
    parameters:
        string interfaceTableModule;   // The path to the InterfaceTable module
        double startTime @unit(s) = default(0s); // application start time
        double stopTime @unit(s) = default(-1s);  // time of finishing receiving
        int localPort; // local port
        bool receiveBroadcast = default(false); // if true, makes the socket receive broadcast packets
        string multicastGroup = default(""); // if non-empty, makes the socket receive multicast packets sent to that group
        string multicastSources = default(""); // if non-empty, than the socket receives multicast packets from those sources only

        @display("i=block/sink");
        @lifecycleSupport;
        double stopOperationExtraTime @unit(s) = default(-1s);    // extra time after lifecycle stop operation finished
        double stopOperationTimeout @unit(s) = default(2s);    // timeout value for lifecycle stop operation
        @signal[packetReceived](type=inet::Packet);
        @statistic[packetReceived](title="packets received"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
        @statistic[throughput](title="throughput"; unit=bps; source="throughput(packetReceived)"; record=vector);
        @statistic[endToEndDelay](title="end-to-end delay"; source="dataAge(packetReceived)"; unit=s; record=histogram,vector; interpolationmode=none);
        @statistic[rcvdPkSeqNo](title="received packet sequence number"; source="appPkSeqNo(packetReceived)"; record=vector; interpolationmode=none);

    gates:
        input socketIn @labels(UdpControlInfo/up);
        output socketOut @labels(UdpControlInfo/down);
}

File: src/inet/applications/udpapp/UdpSink.ned