Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Error in encvalue while compiling TTCN
Error in encvalue while compiling TTCN [message #1714154] Tue, 10 November 2015 10:20 Go to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
While compiling any simple TTCN script, if encvalue is called on any ASN type it throws the following error:

No coding rule specified for type '@Types.Coffee'

I gave the encoding type by using the following syntax:
import from Types language "ASN.1:1997" all with {encode "BER:1997};
and
module Templates {
....
.....
} with { encode "BER:1997" }
Re: Error in encvalue while compiling TTCN [message #1714176 is a reply to message #1714154] Tue, 10 November 2015 13:56 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

unfortunately , encvalue/decvalue for ASN.1 types is not currently supported by Titan.

Instead of encvalue/decvalue, encoding/decoding functions for the specific ASN.1 types have to be created and used.


Best regards

Elemer




Re: Error in encvalue while compiling TTCN [message #1714243 is a reply to message #1714176] Wed, 11 November 2015 03:03 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the info. I've been struggling a lot to make encvalue/decvalue work.
Thanks for pointing me to the correct direction.

One more question. Can Titan generate the encoding/decoding functions for an ASN.1 type or do I've to code them manually only?

Thanks
Re: Error in encvalue while compiling TTCN [message #1714253 is a reply to message #1714243] Wed, 11 November 2015 07:25 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

ASN.1 encoding is associated with one of the following:

-BER and versions (CER , DER)
-PER and versions(Unaligned, aligned)
-XER

-BER is fully supported by Titan; the codec functions are auto-generated , but an external function declaration in TTCNN-3 is needed to connect to them
( see refguide 4.22.4 Automatic Generation of Encoder/decoder Functions for some examples)

-For PER we need external support ,which is available with restrictions, see previous post https://www.eclipse.org/forums/index.php/t/1070344/

-Instead of the ASN.1 XER workflow, we propose a TTCN-3 based workflow, meaning that instead of converting XSD to ASN.1 plus encoding instructions, we convert to TTCN-3 plus encoding instructions.


A large category of ASN.1 protocols fall in the BER-encoded category , so for those we have direct support.

Best regards

Elemer
Re: Error in encvalue while compiling TTCN [message #1714268 is a reply to message #1714253] Wed, 11 November 2015 09:11 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks a lot for the quick response.
I went through the section "refguide 4.22.4" but unable to make my ttcn script work with BER encoding.
Could you please point me to a complete and working TTCN-3 script with BER encoding for ASN types?

Thanks
Re: Error in encvalue while compiling TTCN [message #1714273 is a reply to message #1714268] Wed, 11 November 2015 09:23 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,


please check in github the SNMP protocol module https://github.com/eclipse/titan.ProtocolModules.SNMP

In /src, you have SNMPmsg_Types.asn with the definitons,
and a file SNMP_Functions.ttcn containing the codec declarations (and other stuff):


//SNMP encoder/decoder functions        

       external function enc_SNMPv1_Message(in SNMPv1_Message pdu) return octetstring
         with { extension "prototype(convert) encode(BER:BER_ENCODE_DER)" };
       external function dec_SNMPv1_Message(in octetstring stream) return SNMPv1_Message 
         with { extension "prototype(convert) decode(BER:BER_ACCEPT_ALL)" };
       external function dec_SNMPv1_Message_backtrack(in octetstring stream, out SNMPv1_Message pdu) return integer
         with { extension "prototype(backtrack) decode(BER:BER_ACCEPT_ALL)" };	 
	 
       external function enc_SNMPv2_Message(in SNMPv2_Message pdu) return octetstring
         with { extension "prototype(convert) encode(BER:BER_ENCODE_DER)" };
       external function dec_SNMPv2_Message(in octetstring stream) return SNMPv2_Message 
         with { extension "prototype(convert) decode(BER:BER_ACCEPT_ALL)" };
       external function dec_SNMPv2_Message_backtrack(in octetstring stream, out SNMPv2_Message pdu) return integer
         with { extension "prototype(backtrack) decode(BER:BER_ACCEPT_ALL)" };	 	 
	 
       external function enc_SNMPv3_Message(in SNMPv3_Message pdu) return octetstring
         with { extension "prototype(convert) encode(BER:BER_ENCODE_DER)" };
       external function dec_SNMPv3_Message(in octetstring stream) return SNMPv3_Message 
         with { extension "prototype(convert) decode(BER:BER_ACCEPT_ALL)" };
       external function dec_SNMPv3_Message_backtrack(in octetstring stream, out SNMPv3_Message pdu) return integer
         with { extension "prototype(backtrack) decode(BER:BER_ACCEPT_ALL)" };	 		




I hope this helps

BR Elemer


Re: Error in encvalue while compiling TTCN [message #1714275 is a reply to message #1714268] Wed, 11 November 2015 09:26 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli ,


please check the SNMP protocol module in github https://github.com/eclipse/titan.ProtocolModules.SNMP
in /src, you have a file SNMPmsg_Types.asn with ASN.1 type definitions
and a file SNMP_Functions.ttcn with codec declarations ( and more).


//SNMP encoder/decoder functions        

       external function enc_SNMPv1_Message(in SNMPv1_Message pdu) return octetstring
         with { extension "prototype(convert) encode(BER:BER_ENCODE_DER)" };
       external function dec_SNMPv1_Message(in octetstring stream) return SNMPv1_Message 
         with { extension "prototype(convert) decode(BER:BER_ACCEPT_ALL)" };
       external function dec_SNMPv1_Message_backtrack(in octetstring stream, out SNMPv1_Message pdu) return integer
         with { extension "prototype(backtrack) decode(BER:BER_ACCEPT_ALL)" };	 
	 
       external function enc_SNMPv2_Message(in SNMPv2_Message pdu) return octetstring
         with { extension "prototype(convert) encode(BER:BER_ENCODE_DER)" };
       external function dec_SNMPv2_Message(in octetstring stream) return SNMPv2_Message 
         with { extension "prototype(convert) decode(BER:BER_ACCEPT_ALL)" };
       external function dec_SNMPv2_Message_backtrack(in octetstring stream, out SNMPv2_Message pdu) return integer
         with { extension "prototype(backtrack) decode(BER:BER_ACCEPT_ALL)" };	 	 
	 
       external function enc_SNMPv3_Message(in SNMPv3_Message pdu) return octetstring
         with { extension "prototype(convert) encode(BER:BER_ENCODE_DER)" };
       external function dec_SNMPv3_Message(in octetstring stream) return SNMPv3_Message 
         with { extension "prototype(convert) decode(BER:BER_ACCEPT_ALL)" };
       external function dec_SNMPv3_Message_backtrack(in octetstring stream, out SNMPv3_Message pdu) return integer
         with { extension "prototype(backtrack) decode(BER:BER_ACCEPT_ALL)" };	 		



I hope this helps

Best regards

Elemer
Re: Error in encvalue while compiling TTCN [message #1714288 is a reply to message #1714275] Wed, 11 November 2015 12:04 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the help. Now I can proceed further.
By using the method you said, I could eliminate the error which was coming while converting TTCN to C++ using Titan.
But now the encoding is failing in the function ASN_BER_TLV_t::add_TLV().
I put print statements in the generated C++ code from TTCN from which I came to know that the control is not coming out of this function.
Please help.

Thanks
Re: Error in encvalue while compiling TTCN [message #1714291 is a reply to message #1714288] Wed, 11 November 2015 12:17 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

I can only help if you send me a sample that demonstrates the fault. In general these are too complex issues to try to guess.


Best regards

Elemer
Re: Error in encvalue while compiling TTCN [message #1714351 is a reply to message #1714291] Thu, 12 November 2015 06:10 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for supporting.
I'm attaching a script on which I'm working.
I downloaded a sample script from ttcn-3.org (http://www.ttcn-3.org/index.php/development/devexamples/57-asn-1-example) and extended it.
I've added some new ASN types and created a template to populate it. I'm trying to encode it. Once it gets encoded successfully I'll need to send it to some port.
Please help.

Thanks

[Updated on: Thu, 12 November 2015 06:11]

Report message to a moderator

Re: Error in encvalue while compiling TTCN [message #1714360 is a reply to message #1714351] Thu, 12 November 2015 07:50 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

the first thing I have done is to change file extensions from .asn1 to .asn
and from .ttcn3 to .ttcn.

The compiler accepts them both , but during the workflow somewhere you may get around easier with these.

Then I have generated the Makefile:

makefilegen     *.asn    *.ttcn


and then tried to build:

make


after which I have received the following error:

:
In file included from ASNExample.cc:11:                                                                                                        
ASNExample.hh:111:21: error: myPort.hh: No such file or directory                                                                              
ASNExample.cc:29: error: variable 'ASNExample::myPort ASNExample::mtcType_component_mtcPort' has initializer but incomplete type               
ASNExample.cc:32: error: variable 'ASNExample::myPort ASNExample::systemType_component_systemPort' has initializer but incomplete type         
make: *** [ASNExample.o] Error 1  


The meaning of this error is that in ASNExample.ttcn there is a port declaration

	type port myPort message {
		inout Message;
	}

and the compiler cannot find the corresponding external C++ code.

If I change this to

	type port myPort message {
		inout Message;
	} with { extension "internal"}


then the compiler will believe this port is internal and will not look for the external code, so everything will compile.

Of course, eventually, you will have to add some port to communicate with teh external wolrd, and then you will have to remove this extension.

I have added the code that compiles.

Best regards

Elemer
Re: Error in encvalue while compiling TTCN [message #1714362 is a reply to message #1714360] Thu, 12 November 2015 08:30 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the tips. I'll keep these in mind.
Using titan compiler's -t option I generated the port files (cc and hh files) which the compiler is asking for. Please find the files attached.
This code compiles and generates the executable. But the problem is that the encoding is failing. I came to know this by putting print statements in the generated encoder function in the generated C++ files.

Thanks

[Updated on: Thu, 12 November 2015 08:37]

Report message to a moderator

Re: Error in encvalue while compiling TTCN [message #1714369 is a reply to message #1714362] Thu, 12 November 2015 08:51 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

-the compiler generates only a skeleton for the ports; these are compileable, but to be useful, they need to be completed with code ( see refguide and apiguide)
- to test the codecs, you have to do the following:

-write a template you want to encode t_DL_CCH_Message_template
-encode the value of the template with the encoding function

encode_DL_DCCH_Message(valueof(t_DL_CCH_Message_template))


the resulting octetstring should be decode-able with the decoding pair decode_DL_DCCH_Message


Try to use the codecs from TTCN and not from the test port ; in the beginning this will give you more transparency. Later , if you prefer, you can move them in the test port code.

BR Elemer





Re: Error in encvalue while compiling TTCN [message #1714406 is a reply to message #1714369] Thu, 12 November 2015 12:56 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

I have modified a little your code:

In Templates.ttcn I have added the optional fields that should not be missed:

 template (value) DL_DCCH_Message receiveDcchMsg := {
                integrityCheckInfo:=omit,
		message_ := {
			counterCheck := {
				r3 := { 
					counterCheck_r3 := {
						rrc_TransactionIdentifier := 1,
						rb_COUNT_C_MSB_InformationList := {
							{
								rb_Identity := 5,
								count_C_MSB_UL := 50,
								count_C_MSB_DL := 55
							}
						}
					},
					laterNonCriticalExtensions:=omit
				}
			}
		}
  };



In ASNExample.ttcn :

	control {
	//	execute(nomatch_AcceptTC());


log(encode_DL_DCCH_Message(valueof(receiveDcchMsg)))


	}



if I compile and run it , I can see the result of the encoding in the log:

13:44:17.424555 ASNExample.ttcn:116 Execution of control part in module ASNExample started.
13:44:17.424623 ASNExample.ttcn:120 '3018A116A414A012A010800101A10B3009800105810132820137'O
13:44:17.424912 ASNExample.ttcn:120 Execution of control part in module ASNExample finished.
13:44:17.424966 - Verdict statistics: 0 none, 0 pass, 0 inconc, 0 fail, 0 error.


This is the good news;

bad news is that apparently you are trying to write an RRC protocol module, and , if I remember correctly, RRC has PER encoding; so BER encoding native to Titan is not sufficient.

Again I suggest you look into the previous post about PER-encoding

https://www.eclipse.org/forums/index.php/t/1070344/

Best regards

Elemer

Re: Error in encvalue while compiling TTCN [message #1714514 is a reply to message #1714406] Fri, 13 November 2015 10:39 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for helping so actively.
I could compile the TTCN Script and generate the executable.

Now I'm trying to compile a complete TTCN Script Suit. I downloaded it from
ETSI and modified to replace all calls to encvalue/decvalue for ASN Types
with specific encoder/decoder functions.
Now I'm able to generate the C++ code but getting errors when compiling them.
For some C++ files compiler is crashing with error message similar to:
'cc1plus: out of memory allocating 33619967 bytes after a total of 401539072 bytes'
And for few it is giving Undeclared Symbol error for some variables.

I'm attaching the TTCN script. Please help.

Thanks

[Updated on: Fri, 13 November 2015 11:14]

Report message to a moderator

Re: Error in encvalue while compiling TTCN [message #1714528 is a reply to message #1714514] Fri, 13 November 2015 12:12 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

I have added a -w to the compiler flags
# Flags for the TTCN-3 and ASN.1 compiler:
COMPILER_FLAGS = -L  -w


to suppress warnings; your compilation fails because the compiler detects errors during compilation; you need to fix these errors before proceeding further. At this stage the compiler will not generate C++ files as teh code is not consistent:


:
:
:
  UTRAN/Common/UTRAN34_Sysinfo_Templates.ttcn:271.17-292.5: In template for record field `cellInfo':
   UTRAN/Common/UTRAN34_Sysinfo_Templates.ttcn:272.31-34: In template for record field `cellIndividualOffset':
    UTRAN/Common/UTRAN34_Sysinfo_Templates.ttcn:272.31-34: error: `omit' value is not allowed in this context
Notify: Errors found in the input modules. Code will not be generated.
make: *** [compile] Error 1



Most of the errors seem to be related to the incorrect use of omit in templates; probably those fields are not optional.


Best regards

Elemer
Re: Error in encvalue while compiling TTCN [message #1714531 is a reply to message #1714528] Fri, 13 November 2015 12:24 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

I could resolve this error by passing the -d flag to the Titan Compiler.
Please try with that.

Quote:

# Flags for the TTCN-3 and ASN.1 compiler:
COMPILER_FLAGS = -L -d


Thanks
Re: Error in encvalue while compiling TTCN [message #1714532 is a reply to message #1714531] Fri, 13 November 2015 12:32 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,


yes, that solves most of the errors ( BTW this option has it's own pitfalls), however there are still a few left:



:
:
Notify: Checking modules...
Common/UTRAN/UTRAN_RRC_Templates.ttcn: In TTCN-3 module `UTRAN_RRC_Templates':
 Common/UTRAN/UTRAN_RRC_Templates.ttcn:2521.3-2548.3: In template definition `cr_108_RB_SetUpCmpl':
  Common/UTRAN/UTRAN_RRC_Templates.ttcn:2526.17-2547.5: In template for record field `message_':
   Common/UTRAN/UTRAN_RRC_Templates.ttcn:2527.35-2546.7: In template for union field `radioBearerSetupComplete':
    Common/UTRAN/UTRAN_RRC_Templates.ttcn:2535.39-2545.17: In template for record field `laterNonCriticalExtensions':
     Common/UTRAN/UTRAN_RRC_Templates.ttcn:2535.39-2545.17: In list item 1:
      Common/UTRAN/UTRAN_RRC_Templates.ttcn:2537.44-2543.23: In template for record field `v770NonCriticalExtensions':
       Common/UTRAN/UTRAN_RRC_Templates.ttcn:2537.44-2543.23: In list item 2:
        Common/UTRAN/UTRAN_RRC_Templates.ttcn:2543.19-22: error: `omit' value is not allowed in this context
     Common/UTRAN/UTRAN_RRC_Templates.ttcn:2535.39-2545.17: In list item 2:
      Common/UTRAN/UTRAN_RRC_Templates.ttcn:2545.13-16: error: `omit' value is not allowed in this context
 Common/UTRAN/UTRAN_RRC_Templates.ttcn:2554.3-2578.3: In template definition `cr_PhysicalChannelReconfigurationComplete':
  Common/UTRAN/UTRAN_RRC_Templates.ttcn:2558.17-2577.5: In template for record field `message_':
   Common/UTRAN/UTRAN_RRC_Templates.ttcn:2559.49-2576.7: In template for union field `physicalChannelReconfigurationComplete':
    Common/UTRAN/UTRAN_RRC_Templates.ttcn:2566.42-2575.15: In template for record field `laterNonCriticalExtensions':
     Common/UTRAN/UTRAN_RRC_Templates.ttcn:2566.42-2575.15: In list item 1:
      Common/UTRAN/UTRAN_RRC_Templates.ttcn:2568.40-2573.19: In template for record field `v770NonCriticalExtensions':
       Common/UTRAN/UTRAN_RRC_Templates.ttcn:2568.40-2573.19: In list item 2:
        Common/UTRAN/UTRAN_RRC_Templates.ttcn:2573.15-18: error: `omit' value is not allowed in this context
     Common/UTRAN/UTRAN_RRC_Templates.ttcn:2566.42-2575.15: In list item 2:
      Common/UTRAN/UTRAN_RRC_Templates.ttcn:2575.11-14: error: `omit' value is not allowed in this context
Common/UTRAN/UTRAN_CellInfo.ttcn: In TTCN-3 module `UTRAN_CellInfo':
 Common/UTRAN/UTRAN_CellInfo.ttcn:1361.3-1416.3: In function definition `f_UTRAN_SecurityInfo_Init':
  Common/UTRAN/UTRAN_CellInfo.ttcn:1402.5-126: In variable assignment:
   Common/UTRAN/UTRAN_CellInfo.ttcn:1402.68-126: In actual parameter list of template `@UTRAN_RRC_Templates.cs_IntegrityProtectStart_r99':
    Common/UTRAN/UTRAN_CellInfo.ttcn:1402.79-125: In parameter #2 for `p_Alg':
     Common/UTRAN/UTRAN_CellInfo.ttcn:1363.50-63: note: Referenced template variable is here
Notify: Errors found in the input modules. Code will not be generated.
make: *** [compile] Error 1




Please correct these too.

Best regards

Elemer
Re: Error in encvalue while compiling TTCN [message #1714540 is a reply to message #1714532] Fri, 13 November 2015 13:20 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Using the -d option removed all the 'omit' errors for me.
I'm attaching the `make dep` and `make executable` logs and my Makefile.

Thanks
  • Attachment: log01.zip
    (Size: 20.18KB, Downloaded 171 times)
Re: Error in encvalue while compiling TTCN [message #1714547 is a reply to message #1714540] Fri, 13 November 2015 13:38 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

this is only possible if your source and the one you have sent differs, or the compiler version you and I use differs.

Please do a make archive and send me the created compressed file.

Also , I see a reference to make dep: don't do make dep;

make should be sufficient

you also have some version errors: do you have several versions of the compiler? which version do you use?

Please send me the
compiler -v 
output

To avoid mixing object files compiled with different versions , a make clean should be used. make clean also helps with some weird errors, pls. try it .


Please also be aware that I have upgraded Titan in github to version 5.4.0
Packages should appear soon on the Eclipse download site , but you can build you own from source.


Best regards

Elemer






Re: Error in encvalue while compiling TTCN [message #1714558 is a reply to message #1714547] Fri, 13 November 2015 14:51 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,


from your logfiles it appears that your cygwin environment is running out of memory:
g++  -c -DWIN32 -I/home/sameer.kumar/titan/install/include -Wall   -o UTRAN_ASP_Definitions.o UTRAN_ASP_Definitions.cc

cc1plus: out of memory allocating 1048576 bytes after a total of 403177472 bytes
Makefile:137: recipe for target 'UTRAN_ASP_Definitions.o' failed
make: *** [UTRAN_ASP_Definitions.o] Error 1 


You probably need to increase the Cygwin memory size , see for example

https://cygwin.com/cygwin-ug-net/setup-maxmem.html



Best regards

Elemer
Re: Error in encvalue while compiling TTCN [message #1714700 is a reply to message #1714558] Mon, 16 November 2015 06:25 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

I could reduce the size of the generated files by using the -R option.
But that was not sufficient so I further used the -U type option.
Using these two options reduced the files sizes dramatically (66MB from 350MB).
But even now g++ is not able to compile the 66MB file even on Linux.
Are there any more options to reduce the size of the generated files?

Following is the output of compiler -v
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Product number: CRL 113 200/5 R3A
Build date: Oct 22 2015 16:11:30
Compiled with: GCC 4.9.3

Copyright Ericsson Telecom AB 2000-2014


Also I'm attaching the output of `make archive`

Thanks
Re: Error in encvalue while compiling TTCN [message #1714797 is a reply to message #1714700] Mon, 16 November 2015 18:22 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,


I have done the following:

1. I have changed the platform to Linux as I wanted to compile on Linux

# Your platform: (SOLARIS, SOLARIS8, LINUX, FREEBSD or WIN32)
PLATFORM = LINUX


2. I have added 'with {extension "internal "}' to all 'port type' declarations so Titan would not look for the port code.

(Please remember that you will need to add code for each of these test ports; Titan only generates a skeleton)

3. First I compiled on a VMWare virtual machine with 3GB of allocated memory with Titan 5.3 and indeed I have run out of memory at
the very beginning:

:
:
Notify: File `UpperTesterSystemCmds_union.cc' was generated.
Notify: 679 files were updated.
touch compile
g++  -c -DLINUX -I/home/ntaf/TTCNv3-5.3.pl0-linux64-gcc4.8-ubuntu14.04-foss/include -DTITAN_RUNTIME_2 -Wall   -o SSNITZ_Testsuite.o SSNITZ_Testsuite.cc
virtual memory exhausted: Cannot allocate memory
make: *** [SSNITZ_Testsuite.o] Error 1 



4. So I moved compilation to a server with 32 GB of memory and Titan 5.4.

Here it became apparent that due to some changes in Titan, a -M compiler switch is needed, so I have added that too.
( That is needed for 5.4 only, and this was the reason for the differences we have seen before)

Also , in the module UTRAN_ASN1_ASP_RAB_Templates I had to change the order of some templates:



 // -----------------------------------------------------------------------------
  
  template (value) UlConnectedTrCHList_TDD_Type cs_TrChInfoTrCHListUL_122_AMR_TDD :=
  { /* @status    APPROVED (IMS_IRAT, LTE_A, LTE_IRAT, POS, SSNITZ) */
    cs_UlConnectedTrCH_TDD(tsc_UL_DCH1, cs_DCH_81_TFS_TDD),
    cs_UlConnectedTrCH_TDD(tsc_UL_DCH2, cs_DCH_103_TFS_TDD),
    cs_UlConnectedTrCH_TDD(tsc_UL_DCH3, cs_DCH_60_TFS_TDD),
    cs_UlConnectedTrCH_TDD(tsc_UL_DCH5, cs_DCH_148_TFS_UL_TDD)
  };

  template (value) UlConnectedTrCHList_TDD_Type cs_TrChInfoTrCHListUL_336_148_TDD (TransportChannelIdentity p_PS_TransportChannelIdentity := tsc_UL_DCH1) :=
  { /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, UTRAN) */
    cs_UlConnectedTrCH_TDD(p_PS_TransportChannelIdentity, cs_DCH_336_TFS_TDD),
    cs_UlConnectedTrCH_TDD(tsc_UL_DCH5, cs_DCH_148_TFS_UL_TDD)
  };

  template (value) DlConnectedTrCHList_TDD_Type cs_TrChInfoTrCHListDL_34_StandAlone_TDD :=
  { /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, UTRAN) */
    cs_DlConnectedTrCH_TDD(tsc_DL_DCH5, cs_DCH_148_TFS_DL_TDD)
  };

  template (value) DlConnectedTrCHList_TDD_Type cs_TrChInfoTrCHListDL_122_AMR_TDD :=
  { /* @status    APPROVED (IMS_IRAT, LTE_A, LTE_IRAT, POS, SSNITZ) */
    cs_DlConnectedTrCH_TDD(tsc_DL_DCH1, cs_DCH_81_TFS_DL_TDD),
    cs_DlConnectedTrCH_TDD(tsc_DL_DCH2, cs_DCH_103_TFS_TDD),
    cs_DlConnectedTrCH_TDD(tsc_DL_DCH3, cs_DCH_60_TFS_TDD),
    cs_DlConnectedTrCH_TDD(tsc_DL_DCH5, cs_DCH_148_TFS_DL_TDD)
  };

  template (value) DlConnectedTrCHList_TDD_Type cs_TrChInfoTrCHListDL_336_148_TDD (TransportChannelIdentity p_PS_TransportChannelIdentity := tsc_DL_DCH1) :=
  { /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, UTRAN) */
    cs_DlConnectedTrCH_TDD(p_PS_TransportChannelIdentity, cs_DCH_336_TFS_TDD),    // @sic R5s130447 R5s130704 sic@
    cs_DlConnectedTrCH_TDD(tsc_DL_DCH5, cs_DCH_148_TTI_40_TFS_TDD)
  };



  // -----------------------------------------------------------------------------
  
  template (value) TrCHInfo_TDD cs_TrCHInfo_Common_TDD(template (omit) UlConnectedTrCHList_TDD_Type p_UlconnectedTrCHList_TDD,
                                                       template (omit) TFCS                         p_UlTfcs,
                                                       template (omit) DlConnectedTrCHList_TDD_Type p_DlconnectedTrCHList_TDD,
                                                       template (omit) TFCS                         p_DlTfcs,
                                                       template (omit) HS_DSCHMACdFlows_TDD         p_HsDSCHMacdFlows := omit) :=
  { /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, SSNITZ, UTRAN) */
    ulconnectedTrCHList  := p_UlconnectedTrCHList_TDD,
    ulTFCS               := p_UlTfcs,
    dlconnectedTrCHList  := p_DlconnectedTrCHList_TDD,
    dlTFCS               := p_DlTfcs,
    hsDSCHMacdFlows      := p_HsDSCHMacdFlows,
    ehs_DSCH_Flows := omit,
    ehs_DSCH_CommonFlows := omit,
    ehs_DSCH_Flows_r9 := omit,
    relAspTypeExtension := omit
  };
  
  template (value) TrCHInfo_TDD cs_TrCHInfo_UL_TrCh_TDD(template (omit) UlConnectedTrCHList_TDD_Type p_UlconnectedTrCHList,
                                                        template (omit) TFCS                         p_UlTfcs) :=
  /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, SSNITZ, UTRAN) */
    cs_TrCHInfo_Common_TDD(p_UlconnectedTrCHList, p_UlTfcs, omit, omit);
                                                   
  template (value) TrCHInfo_TDD cs_TrCHInfo_DL_TrCh_TDD(template (omit) DlConnectedTrCHList_TDD_Type p_DlconnectedTrCHList,
                                                        template (omit) TFCS                         p_DlTfcs) :=
  /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, SSNITZ, UTRAN) */
    cs_TrCHInfo_Common_TDD(omit, omit, p_DlconnectedTrCHList, p_DlTfcs);

  template (value) TrCHInfo_TDD cs_TrCHInfo_HS_DSCHMacdFlows_TDD(template (value) HS_DSCHMACdFlows_TDD p_HsDSCHMacdFlows) :=
  /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, UTRAN) */
    cs_TrCHInfo_Common_TDD(omit, omit, omit, omit, p_HsDSCHMacdFlows);

  template (value) TrCHInfo_TDD cs_TrChInfoUL_122_AMR_TDD := cs_TrCHInfo_UL_TrCh_TDD(cs_TrChInfoTrCHListUL_122_AMR_TDD, cs_TFCS_Cmpl0_1_11_12_13_23_Rx);  /* @status    APPROVED (IMS_IRAT, LTE_A, LTE_IRAT, POS, SSNITZ) */
  template (value) TrCHInfo_TDD cs_TrChInfoDL_122_AMR_TDD := cs_TrCHInfo_DL_TrCh_TDD(cs_TrChInfoTrCHListDL_122_AMR_TDD, cs_TFCS_Cmpl0_1_11_12_13_23_Tx(cs_PowerOffsetInfo_TDD));   /* @status    APPROVED (IMS_IRAT, LTE_A, LTE_IRAT, POS, SSNITZ) */
  template (value) TrCHInfo_TDD cs_TrChInfoUL_336_148_TDD := cs_TrCHInfo_UL_TrCh_TDD(cs_TrChInfoTrCHListUL_336_148_TDD, cs_TFCS_Cmpl0_1_2_3_4_5_6_7_8_9_Rx);    /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, UTRAN) */
  template (value) TrCHInfo_TDD cs_TrChInfoDL_336_148_TDD := cs_TrCHInfo_DL_TrCh_TDD(cs_TrChInfoTrCHListDL_336_148_TDD, cs_TFCS_Cmpl0_1_2_3_4_5_6_7_8_9_Tx(cs_PowerOffsetInfo_TDD));  /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, UTRAN) */





Titan should not care about template precedence, that is, the order in which templats are defined, so this is a fault in Titan, which we will investigate , but for the moment it was easier to circumvent.

Also , in

UTRAN34_RAB_Templates_r10

I had to change this template:

   template (value) UL_LogicalChannelMappings_r8 cs_UL_LogicalChannelMappings_E_DCH_flexibleSize_r8 (LogicalChannelIdentity  p_LogicalChannelIdUL := tsc_UL_DTCH1,
                                                                                                   E_DCH_MAC_d_FlowIdentity p_E_DCH_MAC_d_FlowIdentity := tsc_E_DCH_MAC_d_FlowId_DTCH1,
                                                                                                   boolean p_IncludeInSchedulingInfo := true,
                                                                                                   MAC_LogicalChannelPriority p_LogicalChannelPriority := 8) :=
  { /* @status    APPROVED (UTRAN) */
    oneLogicalChannel := {
      ul_TrCH_Type := {
        e_dch := {
          logicalChannelIdentity := p_LogicalChannelIdUL,
          e_DCH_MAC_d_FlowIdentity := p_E_DCH_MAC_d_FlowIdentity,
          rlc_PDU_Size := {
            flexibleSize := {
              lengthIndicatorSize := size15,
              // the actual values are (IE value * 8) + 16
              minRLC_PDU_Size := 0, //16
              largestRLC_PDU_Size := 302 //2432
            }
          },
          includeInSchedulingInfo := p_IncludeInSchedulingInfo
        }
      },
      mac_LogicalChannelPriority := p_LogicalChannelPriority
    }
  };


to the equivalent:


    template (value) UL_LogicalChannelMappings_r8 cs_UL_LogicalChannelMappings_E_DCH_flexibleSize_r8 /*(LogicalChannelIdentity  p_LogicalChannelIdUL := tsc_UL_DTCH1,
                                                                                                   E_DCH_MAC_d_FlowIdentity p_E_DCH_MAC_d_FlowIdentity := tsc_E_DCH_MAC_d_FlowId_DTCH1,
                                                                                                   boolean p_IncludeInSchedulingInfo := true,
                                                                                                   MAC_LogicalChannelPriority p_LogicalChannelPriority := 8)*/ :=
  { /* @status    APPROVED (UTRAN) */
    oneLogicalChannel := {
      ul_TrCH_Type := {
        e_dch := {
          logicalChannelIdentity := tsc_UL_DTCH1,//p_LogicalChannelIdUL,
          e_DCH_MAC_d_FlowIdentity := tsc_E_DCH_MAC_d_FlowId_DTCH1,//p_E_DCH_MAC_d_FlowIdentity,
          rlc_PDU_Size := {
            flexibleSize := {
              lengthIndicatorSize := size15,
              // the actual values are (IE value * 8) + 16
              minRLC_PDU_Size := 0, //16
              largestRLC_PDU_Size := 302 //2432
            }
          },
          includeInSchedulingInfo := true//p_IncludeInSchedulingInfo
        }
      },
      mac_LogicalChannelPriority := 8//p_LogicalChannelPriority
    }
  };

  
  






With these modifcations, your code compiles (see attached comp0.txt). It's a long initial compilation, it takes long hours to finish.
(Of course, incremental compilations - compilations afer you change something in a file- are much faster).
Memory consumption remained below 10%, but all I can say for sure you need more that 3 GB and less than 32 GB.
The linking fails though due to the missing external functions. If you comment those out it shoudl be OK.




I general , I think there is a confusion here between memory occupation during compilation, and generated file size.
They are not directly related: reducing one does not automatically and linearly reduce the other, the relation is more complex.
So I don't think all your switches are necessarry or even helping. I will retry compilation without them as well, and let you know.



In conclusion, you need a powerful server with a lot of memory to compile this code.



Best regards

Elemer



  • Attachment: comp0.txt
    (Size: 85.66KB, Downloaded 232 times)
Re: Error in encvalue while compiling TTCN [message #1714862 is a reply to message #1714797] Tue, 17 November 2015 11:13 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks a lot for the dedicated help.
I've come a lot further with your help.
I'm curious about the Linux distro and version
you were able to compile this script on. Can
you please share this info?

Thanks
Re: Error in encvalue while compiling TTCN [message #1714866 is a reply to message #1714862] Tue, 17 November 2015 11:36 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

it is a SLED 11:

cat /etc/SuSE-release
SUSE Linux Enterprise Desktop 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1


but I don't think it should matter much.

Best regards
Elemer
Re: Error in encvalue while compiling TTCN [message #1714878 is a reply to message #1714866] Tue, 17 November 2015 12:42 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

on a multicore ,

make -j4 


or
make -j8


will start 4, 8 etc. parallel compilation threads,

so it may speed up compilation by a factor of 4, 8 etc.

Of course , this will eat up 4, 8 etc. time more memory.

So for a concrete system, it takes a bit of an experimentation to find the right compromise.


BR
Elemer

Re: Error in encvalue while compiling TTCN [message #1715097 is a reply to message #1714878] Thu, 19 November 2015 08:27 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the tips. These will be helpful for me. I've moved to the new version of Titan and made
the changes suggested by you. I could remove the compilation errors in one file but still getting
errors in UTRAN34_RAB_Templates_r10.cc. I can see you faced no such error in the log you shared.
Can you please share the complete TTCN folder after your modifications so that I can compare it
with mine and see what have I missed?

Thanks
Re: Error in encvalue while compiling TTCN [message #1715157 is a reply to message #1715097] Thu, 19 November 2015 16:34 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

please find attached.

If it still does not work, please send me the displayed error message.

BR

Elemer
Re: Error in encvalue while compiling TTCN [message #1715217 is a reply to message #1715157] Fri, 20 November 2015 10:34 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the help. I could compile the script.
And after defining the few missing functions, I
am able to link and produce the executable too.

Now I'm trying to run it using mctr_cli. When I
connect the Test Executable generated from TTCN
to mctr_cli and then give the command `cmtc`, I
get the following error:
Common/IRAT/NAS_24008Templates_IRAT.ttcn:2380: Dynamic test case error: Copying an
uninitialized/unsupported record/set template.


Do you have some idea as to why this error might
be coming. I'm attaching the run log of mctr_cli.

Also can you suggest some ways to debug the Test-
Executable generated from TTCN?

Thanks
Re: Error in encvalue while compiling TTCN [message #1715259 is a reply to message #1715217] Fri, 20 November 2015 15:49 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

great job, congratulations!


first , a couple of general observations:

-if you look in the log, you will see a lot of uninitialized module parameters:

Module Parameters has the following parameters: { px_AccessPointName := <unbound>, px_AttachTypeTested := EPS_ATTACH_ONLY (0), px_AuthAMF := <unbound>, px_AuthK := '00000000000000010000001000000011000001000000010100000110000001110000100000001001000010100000101100001100000011010000111000001111'B, px_ETWS_DigitalSignature := <unbound>, px_EllipsoidPointWithAltitude := <unbound>, px_EmergencyCallNumber := "112", px_FDD_OperationBand := <unbound>, px_HorizontalVelocity := <unbound>, px_IMEISV_Def := <unbound>, px_IMEI_Def := <unbound>, px_IMSI_Def := '001010123456063'H, px_IP_MTU_Size := 65535, px_IPv4_Address2a_UE := <unbound>, px_IPv4_Address_HomeAgent := <unbound>, px_IPv6_Address2a_UE := <unbound>, px_IPv6_Address_HomeAgent := <unbound>, px_MFBI_UTRAN_FrequencyBand := <unbound>, px_PTMSI_Def := 'C2345678'O, px_PTMSI_SigDef := 'AB1234'O, px_PWS_CB_DataCodingScheme := <unbound>, px_PWS_CB_DataPage1 := <unbound>, px_PWS_CB_DataPage2 := <unbound>, px_PWS_CB_DataPage3 := <unbound>, ....etc.



Wherever you see <unbound>, that is a module parameter that has not been initialized.

The variables, templates etc. in the code depend on these values; if these are unbound, that the depending values will be incompletely initialized as well. Exactly the symptom that is indicated in the log:

 Common/IRAT/NAS_24008Templates_IRAT.ttcn:2380: Dynamic test case error: Copying an uninitialized/unsupported record/set template.


So the first thing I would do is to assign values to these module parameters.

-if you change the value of a module parameter in the code , than you will have to recompile, which takes time. A far more elegant solution is to use an appropriate config file , where all module parameters can be listed and assigned new values, without the need to recompile.

I suggest you check the projects I have uploaded in one of the previous posts, and assemble your project config file; this will be useful , even indispensable, for other reasons as well: port parameters will be taken from the config file too.



- Also in the config file one can set the logging parameters ( see refguide for possible values); if you set DEBUG as logging parameter, you will hopefully see more information in the log regarding the exact fault


Best regards

Elemer






Re: Error in encvalue while compiling TTCN [message #1715529 is a reply to message #1715259] Tue, 24 November 2015 09:35 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

I've created the config file as per the directions in the refguide and provided its name to makefilegen.
But after compilation when I run the executable same errors come. It seems the executable is not
reading the config file. Do I need to specify the config file some where else too?

I'm attaching the config file and the makefile.
Re: Error in encvalue while compiling TTCN [message #1715539 is a reply to message #1715529] Tue, 24 November 2015 10:20 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

there are two ways to execute a parallel test suite:

Method I. This requires two terminals

-enter on terminal A

mctr_cli    config_file_name.cfg



this will display something like:
:
:
MC@esekilxxen1842: Unix server socket created successfully.
MC@esekilxxen1842: Listening on TCP port 7298.


then enter on the same terminal :

cmtc



-then enter on terminal B:

executable_name IPaddr  port 


where executable_name is the name of your executable
IPaddr is the IP where teh MTC executes (localhost if on the same machine)
TCP port is the port displayed on terminal A

(alternatively, the port can be fixed in the config file:

[MAIN_CONTROLLER]
TCPPort := 7298


)

-then enter on terminal A

smtc



and execution will start etc.


Method II.
One can use the ttcn3_start script

ttcn3_start executable_name config_file_name.cfg





In both cases , the config file is read and processed by the executor. Adding it to Makefile is not sufficicient.


Best regards

Elemer





Re: Error in encvalue while compiling TTCN [message #1715574 is a reply to message #1715539] Tue, 24 November 2015 12:29 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the help. I'll try these methods for using the config file.
For now I've hard-coded the values in TTCN Files.

1. I am getting below error for some of the module parameters:

PicsPixit/Parameters.ttcn:34.69-114: error: Octetstring value contains odd number of hexadecimal digits
PicsPixit/Parameters.ttcn:44.66-71: error: Octetstring value contains odd number of hexadecimal digits


In file Parameters.ttcn corresponding changes are as below:
  modulepar O43_Type                    px_ETWS_DigitalSignature	:=	'1234567012345670123456701234567012345670123'O;                       // @desc  ETWS Digital Signature
  modulepar O3_Type                     px_HorizontalVelocity	:=	'777'O;                          // @desc  Horizontal Velocity to be provided in Update UE location information (see 36.509 cl 6.12)


Build log and modified files are @FileGenErrorWithFewModuleParam.zip

2. These parameters are not used in scripts so I have commented these and build was successful.
Now unbound fields are not there. But initializtion is failing at the same point.
Log is attached @SSNITZ_Testsuite.test-desktop-hc.log

3. Regarding this initialization failure I doubt below function is cauing the problem:
  template (present) MS_RadioAccessCap cr_MSRadioAccessCapSingle(template (present) SingleAccessCap p_SingleAccessCap := cr_SingleAccessCapAny) :=
  { /* @status    APPROVED (IMS, IMS_IRAT, LTE_A, LTE_IRAT, POS, SSNITZ, UTRAN) */
    accessTechType := complement('1111'B),
    singleAccess   := p_SingleAccessCap,  // only present if accessTechType != 1111
    addLength      := omit,  // only present if accessTechType = 1111
    addAccess      := omit,
    sparebits      := *
  };

Can this line be the reason for failure?
sparebits      := *

Are '?' and '*' syntax supported by TITAN?

Thanks

Re: Error in encvalue while compiling TTCN [message #1715576 is a reply to message #1715574] Tue, 24 November 2015 12:47 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

for 1. the answer is pretty straightforward: octetstrings have to have even nr. of characters by definition:

'777'O is not a valid octetstring, while '0777'O is


for 2. , Titan does support wildcards "?' and '*' , so certainly that is not the reason for failure.

What I can suggest is to comment out the template and see what happens;
also if you upload the complete project, including external functions , I can take a look myself.


Best regards

Elemer





Re: Error in encvalue while compiling TTCN [message #1715673 is a reply to message #1715576] Wed, 25 November 2015 08:17 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

I've corrected the octet values. Still I'm facing the same error on running the Test Executable.
I'm attaching the output of make archive. Please have a look.

Thanks
Re: Error in encvalue while compiling TTCN [message #1715815 is a reply to message #1715673] Thu, 26 November 2015 12:20 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

please bear with us, we are investigating this issue, and hopefully we will have soon a solution that we'll make available for you, but it takes some time,
not unrelated to long compilation turnover.

As soon as I'll have a result, I'll let you know.


Best regards

Elemer
Re: Error in encvalue while compiling TTCN [message #1715934 is a reply to message #1715815] Sat, 28 November 2015 05:20 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks a lot for the help.
Re: Error in encvalue while compiling TTCN [message #1716115 is a reply to message #1715934] Tue, 01 December 2015 11:58 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

I've found the following observation which you may have already noticed. I feel this may be the cause of the dynamic error I'm getting.
For copying a template to other template, following method in file "core/Template.cc" of Titan is being called in the assignment operator of the template.
Record_Template::copy_template(const Record_Template& other_value)

In this method, the field `other_value.template_selection` is checked in a switch.
switch (other_value.template_selection) {
...
}


This method is called from assignment operators of template classes in the generated *.cc code.
In code generated for assignment of basic type (INTEGER, enum) to template the method `set_selection` is called to set the value of the field `template_selection`.
But for template to template assignment, a call to `set_selection` is not generated.

Following is the expert of the generated code which throws the dynamic error.
UTRAN__ASP__Definitions::CphyTrchConfigReq_dlconnectedTrCHList_0_template cs__CphyDlConnectedTrCH__FDD__DCH(const INTEGER& p__TransportChannelIdentity, const UTRAN__ASP__Definitions::CommonOrDedicatedTFS_template& p__CommonOrDedicatedTFS)
{
    TTCN_Location current_location("Common/UTRAN/UTRAN_ASN1_ASP_Templates.ttcn", 1309, TTCN_Location::LOCATION_TEMPLATE, "cs_CphyDlConnectedTrCH_FDD_DCH");
    UTRAN__ASP__Definitions::CphyTrchConfigReq_dlconnectedTrCHList_0_template ret_val;
    ret_val.trchid() = p__TransportChannelIdentity;
    ret_val.dl__TransportChannelType() = UTRAN__ASP__Definitions::~S__DL__TransportChannelType:dch;
    ret_val.transportChannelInfo() = p__CommonOrDedicatedTFS;  //This line is throwing that dynamic error we're facing.
    return ret_val;
}


Thanks
Re: Error in encvalue while compiling TTCN [message #1716123 is a reply to message #1716115] Tue, 01 December 2015 14:02 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

thank you for your help; we have found the reason for the initialization problem and working on a solution now.

All is caused by templates referring to templates which are not defined yet; situation gets more complicated with importation, when code generation has to jump back and forth between several modules.

I hope by the end of the week we will have a tested solution which I will make available via github.


Thank you for your patience

and best regards

Elemer



Re: Error in encvalue while compiling TTCN [message #1716578 is a reply to message #1716123] Sat, 05 December 2015 10:53 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

I have update the source code in github; the new revision is 5.4pl1 (R 4B).
Pls. try to build a Titan from scratch for your platform.

With this the initialization is successful, see attached logfiles.

Two hints:
- in the config file remove the line:

#LogFile := "run.log"

this does not work well in multi-component mode;let Titan figure out the names of logfiles (there will be separate logfiles generated for components)

- in the Makefile add the linker flag:

# Flags for the linker:
LDFLAGS = -fuse-ld=gold

The linking will use the gold linker which is a lot faster; in incremental compilation this will matter.


Pls. let me know how it goes.

Best regards

Elemer

Re: Error in encvalue while compiling TTCN [message #1716633 is a reply to message #1716578] Mon, 07 December 2015 03:53 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for supporting so actively. I'll build with the new version.

Thanks
Re: Error in encvalue while compiling TTCN [message #1716636 is a reply to message #1716633] Mon, 07 December 2015 04:58 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

On the home page of Titan, there are Titan binaries to download for various Linux systems.
Can you please upload binaries of Titan version 5.4.1 for Redhat5 - 64bit?

Thanks
Re: Error in encvalue while compiling TTCN [message #1716641 is a reply to message #1716636] Mon, 07 December 2015 06:03 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,

That will take some time; meanwhile pls try to build Titan from source code , see Readme.Linux on github.

Best regards
Elemer
Re: Error in encvalue while compiling TTCN [message #1716814 is a reply to message #1716641] Tue, 08 December 2015 11:39 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

I could successfully build the latest version of Titan on my Ubuntu PC but building of TTCN on my PC is too slow.
To speed up the process I've access to a server running RHEL5 64bit but I can't build Titan on it due to lack of libraries required by Titan.
It'd be very helpful if the binaries are uploaded early.

Thanks
Re: Error in encvalue while compiling TTCN [message #1716826 is a reply to message #1716814] Tue, 08 December 2015 12:23 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Murli,


pls download Tiatn for RedHat 5 64 bit from:


https://www.eclipse.org/downloads/download.php?file=/titan/ttcn3-5.4.pl1-linux64-gcc4.1.2-rhel5.tgz
https://www.eclipse.org/downloads/download.php?file=/titan/ttcn3-5.4.pl1-linux64-gcc4.1.2-rhel5.tgz.sha512


Best regards

Elemer


Re: Error in encvalue while compiling TTCN [message #1716947 is a reply to message #1716826] Wed, 09 December 2015 08:31 Go to previous message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks a lot.
Previous Topic:Dual-faced IPL4 test port in UDP mode
Next Topic:<ProjectSpecificRulesGenerator>
Goto Forum:
  


Current Time: Sat Apr 20 03:44:35 GMT 2024

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

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

Back to the top