%description: Test for basic TCP application lifecycle handling. Sequence of operations: - at 0 client initializes to up - at 0 server initializes to down - at 1 server executes startup operation - at 2 client executes shutdown operation - simulation stops at 3 %inifile: omnetpp.ini [General] network = Test tkenv-plugin-path = ../../../etc/plugins ned-path = .;../../../../src;../../lib cmdenv-express-mode = false sim-time-limit = 3s record-eventlog = true #omnetpp 5.0 - 5.1 compatibility: eventlog-file = "${resultdir}/${configname}-${runnumber}.elog" output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca" output-vector-file = "${resultdir}/${configname}-${runnumber}.vec" snapshot-file = "${resultdir}/${configname}-${runnumber}.sna" **.hasStatus = true **.client.status.initialStatus = "up" **.server.status.initialStatus = "down" **.scenarioManager.script = xmldoc("scenario.xml") **.arp.retryCount = 0 **.arp.retryTimeout = 100ms # tcp apps **.numTcpApps = 1 **.client.tcpApp[0].typename = "TCPBasicClientApp" **.client.tcpApp[0].startTime = 0s **.client.tcpApp[0].localPort = -1 **.client.tcpApp[0].connectAddress = "server" **.client.tcpApp[0].connectPort = 1000 **.client.tcpApp[0].numRequestsPerSession = 1000 **.client.tcpApp[0].requestLength = 100B **.client.tcpApp[0].idleInterval = 1000000s **.client.tcpApp[0].thinkTime = 100ms **.server.tcpApp[0].typename = "TCPEchoApp" **.server.tcpApp[0].localPort = 1000 **.tcpApp[0].dataTransferMode = "bytecount" %file: test.ned import inet.node.ethernet.Eth10M; import inet.node.inet.StandardHost; import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator; import inet.common.lifecycle.LifecycleController; import inet.common.scenario.ScenarioManager; network Test { submodules: scenarioManager: ScenarioManager; lifecycleController: LifecycleController; configurator: IPv4NetworkConfigurator; client: StandardHost; server: StandardHost; connections: client.ethg++ <--> Eth10M <--> server.ethg++; } %file: scenario.xml %contains-regex: stdout .* Test.server starting up .* Test.server started .* Test.client shutting down .* Test.client shut down .* Test.client.tcpApp\[0\]: received 0 bytes in 0 packets .* %#-------------------------------------------------------------------------------------------------------------- %not-contains: stdout undisposed object: %not-contains: stdout -- check module destructor %#--------------------------------------------------------------------------------------------------------------