Using modules from INET in Veins

310 views
Skip to first unread message

wx1...@my.bristol.ac.uk

unread,
Oct 5, 2016, 11:42:59 AM10/5/16
to OMNeT++ Users
Hi dear all,

1. Have any of you tried to implement upper layer( Transport Layer and Network Layer) for veins? Would you please share some experience with me?

2. Currently I'm using modules like IUDP, INetworkLayer from INET in Veins,  After I imported modules like shown in the following code, when I run the simulation, Error in module(omnetpp:: CModule) Scenario.node[0] (id=7) at event =11,t=1: Gate ' Scenario.node[0]. networkLayer. igmpIn' is not connected to sibling or parent module.  I checked all the gates of networkLayer, there is no igmpIn gate!!  How can I find this gate and connect it with other parts?

3. The other problem: When I run the simulation, a window pops up called ‘’Unassgned Parameter‘’, asking me to Enter parameter 'Scenario.node[0].udp.interfaceTableModule':   I'm so confused. What should I enter here??  How can I assign this parameter in the file?

4. I deleted some module gates in .ned files without modifying the C++ code when I adopted them. Is this a problem?

Could any one please kindly help me out here?  Thank you soooo much!

Any response will be appreciated!

BR,
Wanru

Follows is my car.ned file:



package org.car2x.veins.nodes;

import org.car2x.veins.base.modules.*;
import org.car2x.veins.modules.nic.Nic80211p;
import inet.transportlayer.contract.IUDP;
import inet.applications.contract.IUDPApp;

import inet.networklayer.contract.IRoutingTable;
import inet.networklayer.common.InterfaceTable;
import inet.networklayer.contract.INetworkLayer;

module Car
{
    parameters:
        string applType; //type of the application layer
        string nicType = default("Nic80211p"); // type of network interface card
        string udpType = default(firstAvailableOrEmpty("UDP"));
        string networkLayerType = default("IPv4NetworkLayer");
        string routingTableType = default("IPv4RoutingTable");
         routingTable.forwarding = forwarding;
          *.interfaceTableModule = default(absPath(".interfaceTable"));
        *.routingTableModule = default(routingTableType != "" ? absPath(".routingTable") : "");
          bool forwarding = true;
         
        int numUdpApps = default(1);  // no of UDP apps. Specify the app types in INI file with udpApp[0..1].typename="UDPVideoStreamCli" syntax
        bool hasUdp = default(numUdpApps > 0);
        string veinsmobilityType; //type of the mobility module
        @display("bgb=577,422");
    gates:
        input veinsradioIn; // gate for sendDirect
    submodules:
        appl[numUdpApps]: <applType> like org.car2x.veins.base.modules.IBaseApplLayer {
            parameters:
                @display("p=60,50");

        }
        //TransportLayer
        udp: <udpType> like IUDP if hasUdp {
            parameters:
                @display("p=60,130");
        }

        //networkLayer
        networkLayer: <networkLayerType> like INetworkLayer {
            parameters:
                @display("p=60,210;q=queue");
        }
        // routing table
        routingTable: <routingTableType> like IRoutingTable if routingTableType != "" {
            parameters:
                @display("p=200,210;is=s");
        }
        // linklayer
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=200,270;is=s");
        }




        nic: <nicType> like org.car2x.veins.modules.nic.INic80211p {
            parameters:
                @display("p=60,290");
        }


        veinsmobility: <veinsmobilityType> like org.car2x.veins.base.modules.IMobility {
            parameters:
                @display("p=130,172;i=block/cogwheel");
        }
    


    connections:


        for i=0..numUdpApps-1 {
            appl[i].udpOut --> udp.appIn++;
            appl[i].udpIn <-- udp.appOut++;
        }
       
        udp.ipOut --> networkLayer.transportIn++;
        udp.ipIn <-- networkLayer.transportOut++;
       
        networkLayer.ifIn++ <-- nic.upperLayerOut;
        networkLayer.ifOut++ --> nic.upperLayerIn;
       
        veinsradioIn --> nic.radioIn;


       
      
}

Melek Çiftçibaşı

unread,
Dec 5, 2016, 11:53:11 AM12/5/16
to OMNeT++ Users
hi did you find answer 3. question?

Wanru Xie

unread,
Dec 6, 2016, 5:29:03 AM12/6/16
to omn...@googlegroups.com
Unfortunately, no..

On Mon, Dec 5, 2016 at 4:53 PM, Melek Çiftçibaşı <melek.ci...@gmail.com> wrote:
hi did you find answer 3. question?

--
You received this message because you are subscribed to a topic in the Google Groups "OMNeT++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/H7F-I9R1v_M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages