www.mamboteam.com
Cyberhome of Shaniur I'm watching you...
Home
Monday, 06 February 2012
 
 
Shaniur.Com
Home
About Shaniur
Music
Fun House
Code Library
Guestbook
Links
Search
Contact Me
To Do List...
Login
Who's Online
We have 28 guests online
Archive
Get Thunderbird!
---
Get Firefox!
---
Get Firefox 3 
---
Lastest Comments
Bangla Music Video from YouTub...
null
i am very good ;) :upset :) ;)
31/12/11 08:00 More...
By arun robin manna

Bangla Music Video from YouTub...
null
i am very good
31/12/11 07:57 More...
By arun robin manna

April '08 Top 10
[B]null[/B][*]maruf
26/11/11 15:58 More...
By mahmud hasan Maruf

Registration is Open
Need Srooth Album
Hi, Shaniur, please you can upload band album (Srooth) by p...
22/10/11 12:56 More...
By Md. Kamrul Hasan

Bangla Music Video from YouTub...
mollick
[I]null[/I][U][/U] :x
17/09/11 17:40 More...
By abdul mannan mollick

Most favoured
Ab Workouts
Error LEFT_ARROW RIGHT_ARROW Print
Written by Shaniur T I M Nabi   
Tuesday, 22 November 2005

Error Message:

Error loading <filename.ned>: Error: syntax error, unexpected '.',
expecting LEFT_ARROW or RIGHT_ARROW in line <line number>
Possible Reason of error:

This can happen when you are trying to import a module and it has other simple modules in there and you are trying to access the gate of a simple module by calling it like:
moduleName.simpleModuleName.gateName --> anotherModule.gate;
Here is an example of what I'm trying to say:

Lets say, I have a client and base station scenario. My client has 2 connections to the base station. One for voice and the other for data. So I will have 2 gates from the client. An out gate for voice and another out gate for data. Lets say my client module is called subscriber and there is a queue associated with every output gate (voiceQueue and dataQueue). The queues are simple modules with an 'in' and 'out' gate respectively. Packets from subscriber goes to the appropriate queue and from the queue it gets connected to the base station.

Ideally (I'm taking Java object oriented style) the connection should look like:
subscriber.voiceQueue.out --> baseStation.inGateForSubscriber;
But this will cause the particular error we are dealing here. 'subscriber.voiceQueue.out' is not acceptable. It is expecting something like 'subscriber.voiceQueue -->' (because it has found a '.' after voiceQueue it is saying syntax error and expecting a right or left arrow, that is --> or <-- ). But as the gate from the subscriber module (from the packet generator or handler) is connected to voiceQueue that will not work either. So how do we fix it?

Solution:

You need to create an array of in and out gates (in[] and out[]) for subscriber and in subscriber.ned file, under 'connections:' have something like:
voiceQueue.out --> out[0];
(voiceQueue.out --> out++ will also work, so long you can keep track of the gates). Now in the network.ned file (I'm assuming the file that defines the network is called network.ned) you'll have to connect it as:
subscriber.out[0] --> baseStation.VoiceInGateForSubscriber;
OR
subscriber.out++ --> baseStation.VoiceInGateForSubscriber;

Just make sure, if you are using ++, you connect them in proper order, or you are in for a nasty surprise.

I will try and upload a short example code sometime in the future to make this even clearer.





Add as favourites (7) | Quote this article on your site | Views: 992

Comments (1)
RSS comments
1. 10-05-2007 22:14
 
gaan khuje ase learnt abt ur research.interesting project and cool site.also found the song which i was lookin 4 :zzz
Guest
 
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Personal verbal attacks will be deleted.
  • Please don't use comments to plug your web site. Such material will be removed.
  • Just ensure to *Refresh* your browser for a new security code to be displayed prior to clicking on the 'Send' button.
  • Keep in mind that the above process only applies if you simply entered the wrong security code.
Name:
E-mail
Homepage
Title:
BBCode:Web AddressEmail AddressBold TextItalic TextUnderlined TextQuoteCodeOpen ListList ItemClose List
Comment:



Code:* Code
I wish to be contacted by email regarding additional comments

Powered by AkoComment Tweaked Special Edition v.1.4.6
AkoComment © Copyright 2004 by Arthur Konze - www.mamboportal.com
All right reserved

Last Updated ( Tuesday, 22 November 2005 )
 
< Prev   Next >
 
Top! Top!