Search code examples
omnet++

Gate types of the WirelessHost


As we know, AdhocHost is extended from WirelessHost, WirelessHost has three gate types:

Name            | Direction     | Size
--------------------------------------------------------
radioIn [ ]     | input         | numWlanInterfaces     
pppg [ ]        | inout         | numPppInterfaces  
ethg [ ]        | inout         | numEthInterfaces

What seems strange is that the direction of the RadioIn gate is the type of input, not inout, or the Inet developers should have a RadioOut gate for sending radio signal. When a node wants to send data, then how does that node send through a radio interface? What is the process of passing data packets through the WirelessHost components when sending data? Also, what is the process of passing data packets through the WirelessHost components when receiving data? Thanks in advance


Solution

    1. Radio communication in OMNeT++ is usually modeling using sendDirect(). That method does not require neither an output gate nor channel between sender and receiver. Receiver must have an input gate only.

    Reference: OMNeT++ Simulation Manual - Direct Message Sending

    1. In short: when an application in WirelessHost wants to send some data to other host it creates a packet, sends it to transport layer (TCP or UDP), thet the packet is sent to network layer (where a route may be chosen), then packet is send to radio interface. Radio interface calculates propagation conditions and sends the packet to all or selected receivers (depending of assumed model of propagation).