Package: inet.applications.udpapp
UdpSink
simple moduleConsumes 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)
msg | kind | ctrl | tags | msgname | context |
---|---|---|---|---|---|
omnetpp::cMessage | 1 | UDPSinkTimer | |||
omnetpp::cMessage | 2 | UDPSinkTimer |
Direct method calls (observed)
call to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
socketIn | Indication | 2 (UdpStatusInd::UDP_I_SOCKET_CLOSED) | UdpSocketClosedIndication | Udp | SocketInd |
socketIn | Packet | 0 (UdpStatusInd::UDP_I_DATA) | Udp | DscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, L4PortInd, NetworkProtocolInd, SocketInd, TosInd, TransportProtocolInd, DirectionTag?, EncapsulationProtocolInd?, ErrorRateInd?, Ieee802SapInd?, MacAddressInd?, SignalPowerInd?, SignalTimeInd?, SnirInd?, UserPriorityInd?, Ieee80211ChannelInd?, Ieee80211ModeInd? |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
socketOut | Request | 1 (UdpCommandCode::UDP_C_BIND) | UdpBindCommand | Udp | DispatchProtocolReq, SocketReq |
socketOut | Request | 3 (UdpCommandCode::UDP_C_SETOPTION) | UdpJoinMulticastGroupsCommand | Udp | DispatchProtocolReq, SocketReq |
socketOut | Request | 3 (UdpCommandCode::UDP_C_SETOPTION) | UdpLeaveMulticastGroupsCommand | Udp | DispatchProtocolReq, SocketReq |
socketOut | Request | 3 (UdpCommandCode::UDP_C_SETOPTION) | UdpSetBroadcastCommand | Udp | DispatchProtocolReq, SocketReq |
socketOut | Request | 4 (UdpCommandCode::UDP_C_CLOSE) | UdpCloseCommand | Udp | DispatchProtocolReq, SocketReq |
Packet operations (observed)
chunkType | packetAction |
---|---|
peekData | |
Chunk | peekAtFront |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolReq | addTagIfAbsent |
SocketInd | findTag |
SocketReq | addTagIfAbsent |
Region Tagging operations (observed)
tagType | tagAction |
---|---|
CreationTimeTag | getAllTags |
Tagging operations (observed)
tagType | tagAction |
---|---|
inet::Ipv4InterfaceData | findTag |
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