Simple Module UDPEchoApp

Package: inet.applications.udpapp
File: src/applications/udpapp/UDPEchoApp.ned

C++ definition

Similar to UDPBasicApp, but it sends back the packet after reception.

UDPEchoApp

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

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

Parameters:

Name Type Default value Description
localPort int
destPort int
messageLength int

length of messages to generate, int bytes

messageFreq double

should usually be a random value, e.g. exponential(1)

destAddresses string ""

list of IP addresses, separated by spaces

Properties:

Name Value Description
display i=block/app

Gates:

Name Direction Size Description
udpIn input
udpOut output

Source code:

//
// Similar to UDPBasicApp, but it sends back the packet after reception.
//
simple UDPEchoApp like UDPApp
{
    parameters:
        int localPort;
        int destPort;
        volatile int messageLength @unit("B"); // length of messages to generate, int bytes
        volatile double messageFreq @unit("s"); // should usually be a random value, e.g. exponential(1)
        string destAddresses = default(""); // list of \IP addresses, separated by spaces
        @display("i=block/app");
    gates:
        input udpIn @labels(UDPControlInfo/up);
        output udpOut @labels(UDPControlInfo/down);
}