allowunconnect vs. @loose

595 views
Skip to first unread message

hecke

unread,
Feb 3, 2010, 4:31:52 PM2/3/10
to omnetpp
Hi!

I've created a simple client based on inet.networklayer, tcp and
TCPBasicClientApp.
The connection section of my .ned is this:
...
eth0.phys <--> io;
eth0.netwOut --> networkLayer.ifIn++;
networkLayer.ifOut++ --> eth0.netwIn;
networkLayer.TCPOut --> tcp.ipIn;
tcp.ipOut --> networkLayer.tcpIn;
tcp.appOut++ --> tcpBasicClientApp.tcpIn;
tcpBasicClientApp.tcpOut --> tcp.appIn++;
...
I only use tcp, no udp, sctp... when I try to start the simulation, I
got errors about
unconnected gates for udp, sctp... but in the .ned for the
networklayer the connections
for these gates are defined with attribut allowunconnected. I've added
a @loose to
all the gates but if[in|out] - that works for me. Did I miss
something, is this a bug or
a feature? Why using allowunconnected if it can't override/replace a
missing @loose attribute
in the gates section?

Btw: I'm new to Omnetpp, using the inet-fw (20090325) together with
omnet v4.0 build 090310-10709.

thanks for your help in advance, hecke


Life on Dorian

unread,
Feb 3, 2010, 4:46:41 PM2/3/10
to omnetpp
when you run your simulation, does the program pop up a window ask you
to feed any parameters? If it does,
check your "ini" file. Assign **.numUdp = 0 and **.numSctp = 0. <---
disable udp and sctp applications from your simulatoin.

Thomas Tannhaeuser

unread,
Feb 3, 2010, 5:26:04 PM2/3/10
to omn...@googlegroups.com
A msg-box with  Error in module (cCompoundModule) testbed.client (id=2): Gate 'testbed.client.networkLayer.udpIn' is not connected to silbing or parent module.
I looked at the StandardHost module - it uses attributes like numUdpApps, numSctpApps for creating the needed connections betw.  transport and applikation.
I dont need  all the other transport protocols. My client looks like: EthernetInterface->NetworkLayer->tcp->tcpBasisClientApp
Did I missunderstood the concept of @loose and allowunconnected or is the meaning/function of these two attributes redundant but not right interpreted by the
ned-parser?

Andras Varga

unread,
Feb 4, 2010, 2:12:37 AM2/4/10
to omn...@googlegroups.com

"allowunconnected" is used in a compound module, and means that unconnected gates may exist *within* the compound module. I.e. it allows its submodules' gates to be left unconnected (on their outside), and the compound module's gates to be left unconnected *inside*.

 

@loose means that if you use that module as  a submodule somewhere, that gate doesn't need to be connected. I.e. it refers to *outside* connection of the gate.

 

If you wonder about inside and outside, picture the compound module as a large box, and a gate as two sockets, one facing inside and the other facing outside.

 

Andras

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.

Thomas Tannhaeuser

unread,
Feb 4, 2010, 5:20:33 AM2/4/10
to omn...@googlegroups.com
I was misguided by the idea of reusability of (compound)modules - on t he first view it makes no sense defining the NetworkLayer (as it is) without @loose on its gates - so the user has to add all upper layer protocol modules even if he needs them or not. But its okay - the given NetworkLayer is the general model - I have to create my specialised version. (Yeah - proper software design :-))

Thank you for clarifying / force other pov.

Surabhi Sharma

unread,
Jan 31, 2017, 11:54:35 PM1/31/17
to OMNeT++ Users
Good morning guys,can you please tell me from where can i learn omnet++ simulation.I read the manual , but i am still not confident enough to start simulating my problem statement.So worried, have to finish my thesis work.

Rudolf Hornig

unread,
Feb 2, 2017, 5:40:52 AM2/2/17
to OMNeT++ Users
Tictoc tutorial should be your next step.
Reply all
Reply to author
Forward
0 new messages