Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Reference to an (evaluatable) constant value was expected instead of module parameter
Reference to an (evaluatable) constant value was expected instead of module parameter [message #1715404] Mon, 23 November 2015 11:32 Go to next message
Muhammad Uzair is currently offline Muhammad UzairFriend
Messages: 35
Registered: November 2015
Member
Hi,

I am having an error while compiling lte test cases. The scenario is as follows:

In module Common, there is following definition
modulepar charstring      px_IMS_HomeDomainName       := "3gpp.org";  


In another module (in which above module is imported using import all), there is a definition:

const charstring tsc_DNS_DomainName := px_IMS_HomeDomainName; 


When I am compiling this code, I am getting this error "Reference to an (evaluatable) constant value was expected instead of module parameter"

Apparently the the string is not being assigned to tsc_DNS_DomainName.

Is there anything wrong with the above code? Any help would be highly appreciated.

Thanks,
Muhammad Uzair

[Updated on: Mon, 23 November 2015 11:33]

Report message to a moderator

Re: Reference to an (evaluatable) constant value was expected instead of module parameter [message #1715424 is a reply to message #1715404] Mon, 23 November 2015 13:52 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Muhammad,

this is a peculiarity of Titan:

-it is assumed that constants can be be initialized only with values and references that are known during compilation time
-module parameters are assumed to be unknown during compilation time as they can be overridden during runtime from values read from the config file (this permits changing module parameters without the need
to recompile)

this is the reason why constants cannot be initialized from module parameters in Titan, in slight opposition to the standard

The solution to this is some tweaking:

-either you change the constant to a (component) variable , bearing in mind that constants are global, while variables are local ( component -wide) in scope
-or change the constant to a module parameter , which can be initialized from another module parameter , but only in the config file, for the above reasons

Probably the first alternative is simpler

Best regards

Elemer









Re: Reference to an (evaluatable) constant value was expected instead of module parameter [message #1715545 is a reply to message #1715424] Tue, 24 November 2015 10:40 Go to previous message
Muhammad Uzair is currently offline Muhammad UzairFriend
Messages: 35
Registered: November 2015
Member
Hi Elemer,

Thanks a lot for your valuable input.

Best Regards,
Muhammad Uzair
Previous Topic:Build remotely
Next Topic:Definition visibility problem
Goto Forum:
  


Current Time: Fri Apr 26 22:02:01 GMT 2024

Powered by FUDForum. Page generated in 0.03138 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top