Regarding error when instantiating a compound module(IEEE) within a network(wirelessLAN)...

16 views
Skip to first unread message

Anurag Pandey

unread,
Jul 21, 2014, 10:11:13 AM7/21/14
to omn...@googlegroups.com
network wirelessLAN: IEEE        // error:  syntax error, unexpected ':' expecting '{'
{
       parameters:
       num_station=input(10,"Number of mobile stations");
}
nedcode.docx

Michael Kirsche

unread,
Jul 21, 2014, 10:27:36 AM7/21/14
to omn...@googlegroups.com
What's with the ":"?
Are you trying to inherit from another module?

If so, check the OMNeT manual on NED inheritance

Anurag Pandey

unread,
Jul 21, 2014, 10:49:47 AM7/21/14
to omn...@googlegroups.com
actually i'm trying to inherit a compound module(named:IEEE) in a network(named:wirelessLAN)

Alfonso Ariza Quintana

unread,
Jul 21, 2014, 11:08:55 AM7/21/14
to omn...@googlegroups.com

No, you can inherit a module in the network

 

network wirelessLAN

{

       parameters:

       num_station=input(10,"Number of mobile stations");

    submodules:

        nodes[num_station]: IEEE {  }

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sonia Lamba

unread,
Jul 21, 2014, 10:09:34 PM7/21/14
to omn...@googlegroups.com
help !!! rectify a problem in ned code...

Although the parameter num_station had a default value of 10...but only one station is created from the code given below...Is there exist any problem with the for loop or there is some other problem...please help me in fixing the problem...

.ned file code is given below:

connections:

        for i=0..num_station-1 {

            sta[i].out[i] --> {  datarate = 11000000Mbps; } --> freespace.in[i];

            freespace.out[i] --> sta[i].in[i];

            clk[i].out[i] --> sta[i].Cin[i];

 

        }

 

        ap.out --> {  datarate = 11000000Mbps; } --> freespace.APin;

        freespace.APout --> ap.in;

        freespace.APout --> attacker.in;// @display("m=m,95,63,47,28");

        attacker.out --> {  datarate = 11000000Mbps; } --> freespace

and the whole code is given in the attached document
nedcode.docx
Reply all
Reply to author
Forward
0 new messages