How to connect out gate with radioIn gate?

364 views
Skip to first unread message

shahzad...@gmail.com

unread,
Jul 24, 2017, 5:30:14 AM7/24/17
to OMNeT++ Users
Hi everyone,
i want to create a wireless compound module. i have created a simple module App. which will be creating and sending messages. Now i want to create a compound module which connects this simple module but i cannot connect the gates as it says radioIn is an input gate. Picture of problem is attached.
i want to connect the gates.

Untitled.png

Michael Kirsche

unread,
Jul 24, 2017, 6:26:27 AM7/24/17
to OMNeT++ Users
The @radioIn Gate is normally meant to receive the messages sent on the wireless channel.
Why should it connect to the application???
Also, it is annotated with @directIn, so the radioIn gate can only receive messages via sendDirect(), which is necessary for wireless hosts, since they do not have a cable connection between radio interfaces.

If you check the NED files of wireless hosts in INET, you can see that the application layer is often connected to transport and network layers, which in turn are connected to the lower layers and/or the Network Interface Card (NIC).
I'd advise you to study the sources and examples of INET and build your simulation on-top of INET to use the manifold wireless models available in INET.

If you want to continue without INET, you would first need to define which connections you want to model. Where should your application connect to? To the radio module? Then introduce it as another submodule with its according gates. Then you can connect these in- and out-gates with each other.

Also, study the simulation manual part on gates: https://omnetpp.org/doc/omnetpp/manual/#sec:ned-lang:gates

shahzad...@gmail.com

unread,
Jul 24, 2017, 11:35:51 PM7/24/17
to OMNeT++ Users
Thank you very much sir, i am studying INET model. it is a bit complex so i tried to create a simple model. However, as you suggested INET is a great framework. i will spend more time on it. 

shahzad...@gmail.com

unread,
Jul 24, 2017, 11:40:56 PM7/24/17
to OMNeT++ Users
Actually i want to simulate a simple tdma model. i tried a lot of things but could not succeed. can you suggest me how to model it? any documentation? thanks sir

Michael Kirsche

unread,
Jul 25, 2017, 4:19:58 AM7/25/17
to OMNeT++ Users
There is a very nice and extensive tutorial for INET and its wireless models: https://omnetpp.org/doc/inet/api-current/tutorials/wireless/
The CSMA part could be used as a basis for your TDMA model.

Also, INET includes an LMAC model (on the link layer), which you could analyze. LMAC uses a TDMA approach as far as I remember.
Reply all
Reply to author
Forward
0 new messages