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 |
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