Basic questions about the number of applications and data transfer

57 views
Skip to first unread message

donmo...@googlemail.com

unread,
Aug 29, 2014, 5:26:39 AM8/29/14
to omn...@googlegroups.com
Hello everyone,

I'm very new to Omnet++ / INET and I have some very basic questions.
First of all I want to say that I read a lot of example simulation but wasn't able to give me a clear answer:

My scenario: 2 clients, 1 server. The server assigns the IP addresses to the clients (DHCP). When every client has a IP, client1 should start a data transfer with a specific filesize to client2.

I started to make a small network. 2 DHCP clients and a DHCP server.

IP assignment via DHCP is fine. Every client gets an IP. I implemented the DHCP Appl. with the commands:

**.numUdpApps = 1

**.client1.udpApp[0].typename = "DHCPClient"
**.client1.udpApp[0].startTime = uniform(0s, 1s)

**.client2.udpApp[0].typename = "DHCPClient"
**.client2.udpApp[0].startTime = uniform(0s, 1s

**.server.udpApp[0].typename = "DHCPServer"
**.server.udpApp[0].subnetMask = "255.255.255.0"        # netmask to assign
[...]

1. Question: How does numUdpApps work? It says "no of UDP Apps". I want DHCP + datatransfer = 2 apps. Right? But valid values are only 0 or 1.

2. Question: What does udpApp[0] stands for? Is it the declaration for the used application + settings?
Because when I write f.e.

**.client1.udpApp[1].typename = "UDPBasicBurst"
**.client1.udpApp[1].localPort = 100
[...]

for the second application of client1, it always refering to the DHCP config (udpApp[0]) and says that the parameter is not used.

3. What kind of application is the best one for classic data transfer? f.e. starting Connection - sending data - closing connection, like TCP or just sending data like UDP.
How do I configure this app, that it only starts when every client has an IP? Is there a queue command or something?

I hope someone can help me.
Thanks in advance and sorry for bothering you with that basic stuff. I spend a lot of time but cannot go further.

Michael Kirsche

unread,
Aug 29, 2014, 5:36:08 AM8/29/14
to omn...@googlegroups.com
numUdpApps defines the number of UDP apps. Same goes for numTcpApps, numSctpApps and other variables like this in StandardHost.

A host's application layer can be set-up with multiple application modules.
If you define for example **.numUdpApps = 2, then you would specify to create two independent UDP applications for all nodes.

You could then access each of those UDP apps and their parameters like:
**.udpApp[0].typename (whatever parameter) = ... -> the first UDP app
**.udpApp[1].typename (whatever parameter) = ... -> the second UDP app

Classic data transfer (start, send, stop) will probably be achieved with TCP example applications. There are various examples under the /examples/inet folder.
Configuration of these apps can be seen in the examples or in the specific NED files of each application!

Michael Kirsche

unread,
Aug 29, 2014, 5:37:09 AM8/29/14
to omn...@googlegroups.com
BTW: Did you forget the closing bracket here?

**.client2.udpApp[0].startTime = uniform(0s, 1s

donmo...@googlemail.com

unread,
Aug 29, 2014, 6:01:08 AM8/29/14
to omn...@googlegroups.com
Hello Michael,

thank you for your answer.

So my understanding of multiple apps is right. But however it tells that there are not used parameters. For example I used the UDP burst App
Attached you find my source code for this part:
What am I doing wrong?


I missed the closing bracket while copy paste the code. Sorry.
omnet.jpg

Michael Kirsche

unread,
Aug 29, 2014, 6:51:48 AM8/29/14
to omn...@googlegroups.com
Hmm try to move the udpApp[1] configuration above the udpApp[0] configuration!

I think it is just a small issue with the Eclipse inspector / NED property visualizer.
Even with the warning markings, things should work without problems.

donmo...@googlemail.com

unread,
Sep 1, 2014, 2:25:27 AM9/1/14
to omn...@googlegroups.com
After moving it above the warnings are gone.

Thank you very much for your help
Reply all
Reply to author
Forward
0 new messages