NED File src/inet/applications/ipapp/IpSocketIo.ned¶
Name |
Type |
Description |
|---|---|---|
simple module |
Provides IP socket handling for generic applications. |
Source code¶
//
// Copyright (C) 2020 OpenSim Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
//
package inet.applications.ipapp;
import inet.common.SimpleModule;
//
// Provides IP socket handling for generic applications.
//
simple IpSocketIo extends SimpleModule
{
parameters:
@class(IpSocketIo);
string interfaceTableModule;
string localAddress = default("");
string destAddress = default("");
string protocol = default("");
double stopOperationExtraTime @unit(s) = default(-1s); // Extra time after lifecycle stop operation finishes
double stopOperationTimeout @unit(s) = default(2s); // Timeout value for lifecycle stop operation
@lifecycleSupport();
displayStringTextFormat = default("rcvd: {numReceived} pks\nsent: {numSent} pks");
@display("i=block/socket");
@signal[packetSent](type=inet::Packet);
@signal[packetReceived](type=inet::Packet);
@statistic[packetSent](title="packets sent"; source=packetSent; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
@statistic[packetReceived](title="packets received"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
gates:
input trafficIn;
output trafficOut;
input socketIn;
output socketOut;
}