Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » make error in LTE test of coding by asn1c
make error in LTE test of coding by asn1c [message #1761375] Wed, 10 May 2017 09:47 Go to next message
Coco Wang is currently offline Coco WangFriend
Messages: 6
Registered: February 2017
Junior Member
Hello:
I'm new of TTCN-3 and TITAN. I'm trying to make a Test for LTE. Now I have two problems.
First:
I have made .c/.h for EUTRA_RRC_ASN1_Definitions.asn by asn1c. And I have made a test of it just like the example in the forum about CAM.
I add these .c/.h of this .asn and the EncDec.cc in the LTE folder, generate a Makefile by makefilegen by a .tpd. What's more, I add the 'external clause' in the EUTRA_CommonDefs.ttcn.
When I do 'make', some error happened. As the picture shows, these error just the same as the one without these .c/.h or EncDec.cc.
Now I just write a EncDec of DL-CCCH-Message. But it still tell me "Cannot determine the encoding rules for type `@EUTRA-RRC-ASN1-Definitions.DL-CCCH-Message'. No encoding external functions found".

Second:
I notice the asn1c generate the .c/.h with names in the .asn. However, two different 'DL-CCCH-Message' are in EUTRA_RRC_ASN1_Definitions.asn and UTRAN_RRC_ASN1_Definitions.asn. I can't use asn1c to make these two .asn at the same time. How can I differ them in my LTE test project?

Looking forword to your reply. Thank you.


Re: make error in LTE test of coding by asn1c [message #1763322 is a reply to message #1761375] Fri, 12 May 2017 15:33 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi Coco,

Now, here's the thing:
I suppose you have downloaded the code from ETSI or 3GPP; the code published there is abstract meaning that
test ports, codecs etc. are not included as these are not standardized.
It is assumed that the implementation that will compile and execute this code will add these.
Implementations will solve the problem of encoding/decoding differently: Titan expects that encoding is invoked explicitly , either from the TTCN-3 code , or
from the C++ code of the test ports or other appropriate part of the code; other implementations will do this implicitly , for instance
when a message of a certain type is sent to a port, the implementation implies, based on the indications from the code ( 'with {encode "XXXX" }' instructions )
that the message has to be encoded a certain way.

This means that you will have to identify the points in the code where encoding/decoding has to be performed and invoke your codecs explicitly by calling the appropriate encoding/decoding functions.
(Remember, all your ASN.1 types will have to be encoded with BER , and the transcoded to PER whenever PER is implied- that's the whole idea of EnDec.cc )

If you send me your code I can assemble an example for one of the types described in ASN.1 , example that you can then propagate through your code.

Also please read through this post
Error in encvalue while compiling TTCN
https://www.eclipse.org/forums/index.php/t/1072021/
and maybe other posts by murli sharma, as he was working on something similar, and we discussed similar problems.


The answer to your second question is simpler:

you need to refer to types with the same name but originating from different modules by prefixing them with the module name:

EUTRA_RRC_ASN1_Definitions.DL-CCCH-Message
and
UTRAN_RRC_ASN1_Definitions.DL-CCCH-Message

respectively.

I hope this helps

Best regards


Elemer
Re: make error in LTE test of coding by asn1c [message #1763365 is a reply to message #1763322] Sun, 14 May 2017 09:48 Go to previous messageGo to next message
Coco Wang is currently offline Coco WangFriend
Messages: 6
Registered: February 2017
Junior Member
Hi Elemer,
Thank you for your reply.

This is my project of LTE tests. I modified the Testcases and deleted some "X_X" test files to streamline the system .This is not the latest version of 3GPP LTE tests. For some reason I use the R-10 version.

I have read one post by murli sharma.
https://www.eclipse.org/forums/index.php/t/1073931/
I think your discussion will help me a lot.
Re: make error in LTE test of coding by asn1c [message #1763368 is a reply to message #1763365] Sun, 14 May 2017 12:06 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi Coco,

OK, let's proceed step by step.

First , I have verified if the source and header files generated by asn1c compile on their own.

For this, I have generated a Makefile (in EUTRA EncDec) that contains only these:

makefilegen -f *.c *.h 

I have also added -I. to the CPPFLAGS to include the local directory in search:

# Flags for the C++ preprocessor (and makedepend as well):
CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include    -I.



Compilation ends in an error:

AbsoluteTimeInfo-r10.c:123:4: error: 'APC_UNCONSTRAINED' was not declared in this scope
  { APC_UNCONSTRAINED, -1, -1,  0,  0 },
    ^
AbsoluteTimeInfo-r10.c:124:4: error: 'APC_CONSTRAINED' was not declared in this scope
  { APC_CONSTRAINED,  0,  0,  48,  48 } /* (SIZE(48..48)) */,
    ^
make: *** [AbsoluteTimeInfo-r10.o] Error 1




The reason for error is that you did not consider the changes that are explained in
https://www.eclipse.org/forums/index.php/t/1070344/
to make the code generated by asn1c C++ compatible (see toward the end of the post).



Please make the necessary changes and make sure that the code generated by asn1c and modified according to the above compiles.


We'll continue from here.


Best regards

Elemer
Re: make error in LTE test of coding by asn1c [message #1763393 is a reply to message #1763368] Mon, 15 May 2017 07:57 Go to previous messageGo to next message
Coco Wang is currently offline Coco WangFriend
Messages: 6
Registered: February 2017
Junior Member
Hi Elemer:
Thank you for your reply.

I have noticed that the asn1c generates code not entirely compatible with g++. When I read the userguide of asn1c, I noticed it has its own 'Makefile.am.sample'. I tried to use it to generate *.c/*.h of the asn files. And it did work during I tested my DL_CCCH_Message EncDec. Here is my project.
Since the whole project is too big, I 'make clean' the /bin. The .o files in /bin were generated by asn1c and copied in this file.
cd bin
make
./testcodec testcodec.cfg


The test suite can run and show 'pass'. Of course, to simplify my test, I have made little change for the EUTRA_RRC_ASN1.ttcn. I changed the 'messageExtension' to an INTEGER.
DL-CCCH-MessageType ::= CHOICE {
	c1						CHOICE {
		rrcConnectionReestablishment			RRCConnectionReestablishment,
		rrcConnectionReestablishmentReject		RRCConnectionReestablishmentReject,
		rrcConnectionReject						RRCConnectionReject,
		rrcConnectionSetup						RRCConnectionSetup
	},

	[b]-- messageClassExtension	SEQUENCE {}[/b]

	[b]pVersion   INTEGER(0..512)[/b]
}


For this reason, I doubt if I can 'make' the LTE_suite of 3GPP without change the *.c/*.h made by asn1c.
Re: make error in LTE test of coding by asn1c [message #1763453 is a reply to message #1763393] Tue, 16 May 2017 10:55 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi Coco,

that's a smart move;

however , the result might be inconvenient as a "make clean' will erase the *.o files which have to be copied again and again.

So I propose to create a library instead of object files.

This is how to create a static library from the asn1c generated sources:

Edit the generated Makefile.am.sample, add the following lines:

LIBNAME = librrc.a
lib: ${OBJS}
      ar -rcs ${LIBNAME} $^

The
make -f Makefile.am.sample lib 

command will create the librrc.a static library.

now create two directories /include and /lib:
the /lib will contain the librrc.a static archive
and the /include all the header files generated by asn1c

Now edit the Titan Makefile and remove all asn1c generated source files from the USER_SOURCES and USER_HEADERS variable.

Next, modify the following rule:

$(EXECUTABLE): $(OBJECTS)
                if $(CXX) $(LDFLAGS) -o $@ $(OBJECTS) \
                -L$(TTCN3_DIR)/lib -l$(TTCN3_LIB) \
                -L$(OPENSSL_DIR)/lib -lcrypto \
                -L$(XMLDIR)/lib $($(PLATFORM)_LIBS) \
                -lrrc -L../lib; \
                then : ; else $(TTCN3_DIR)/bin/titanver $(OBJECTS); exit 1; fi 




and add the /include directory to CPPFLAGS:

# Flags for the C++ preprocessor (and makedepend as well):
CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)/include -I../include 



and one more thing:

to make the project more transportable, either use relative symlinks or
(as I have done) create a file that creates the symlinks.


See the attached compressed file. After unpacking,
you need first to edit file2 to adapt it to your directory structure,

then


cd bin
#create symlinks
../file2 
#compile
make 
#execute
./testcodec testcodec.cfg


should work.


Next , I will look into your question regarding errors about encoding/decoding.




Best regards
Elemer


[Updated on: Wed, 17 May 2017 07:02]

Report message to a moderator

Re: make error in LTE test of coding by asn1c [message #1763458 is a reply to message #1763453] Tue, 16 May 2017 11:50 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi Coco,

the reason for errors like below:

UTRAN_RRC_ASN1_Definitions.asn:1839: error: Cannot determine the encoding rules for type `@UTRAN-RRC-ASN1-Definitions.HandoverToUTRANCommand'. No encoding external functions found                                                                                                                                                         
UTRAN_RRC_ASN1_Definitions.asn:2859: error: Cannot determine the decoding rules for type `@UTRAN-RRC-ASN1-Definitions.InterRATHandoverInfo'. No decoding external functions found                                                                                                                                                           
NAS_24008TypeDefs.ttcn:775.6-778.1: error: Cannot determine the decoding rules for type `@NAS_24008TypeDefs.MS_RadioAccessCap_V'. No decoding external functions found
IMS_ASP_TypeDefs.ttcn:30.8-44.3: error: Cannot determine the decoding rules for type `@IMS_ASP_TypeDefs.IMS_Request_Type'. No decoding external functions found       
LibSip_SIPTypesAndValues.ttcn:1795.12-1801.7: error: Cannot determine the decoding rules for type `@LibSip_SIPTypesAndValues.Response'. No decoding external functions found                                                                                                                                                                
LibSip_SIPTypesAndValues.ttcn:1795.12-1801.7: error: Cannot determine the encoding rules for type `@LibSip_SIPTypesAndValues.Response'. No encoding external functions found      


is that somewhere in the code encvalue() or decvalue() is invoked for a TTCN-3 or ASN.1 type and Titan cannot find the appropriate codec.

This can made visible for instance for NAS_CommonTypeDefs.ttcn:

originally this error is present:

NAS_CommonTypeDefs.ttcn:287.6-310.1: error: Cannot determine the decoding rules for type `@NAS_CommonTypeDefs.MS_Clsmk2'. No decoding external functions found        
NAS_CommonTypeDefs.ttcn:318.6-408.1: error: Cannot determine the decoding rules for type `@NAS_CommonTypeDefs.MS_Clsmk3'. No decoding external functions found  


NAS_CommonTypeDefs.ttcn has a final encoding instruction:

module NAS_CommonTypeDefs {
:

}  with { encode "NAS Types" }


that tells Titan it should look for an external function that can encode/decode NAS_Types, something like:

   external function enc_NAS_Types ( in NAS_Types pdu) return octetstring
  with { extension "prototype(convert) encode(NAS_Types)" };
  external function dec_NAS_Types ( inout octetstring stream, out NAS_Types pdu ) return integer
  with { extension "prototype(sliding) decode(NAS_Types)" };


but no such function exists.

If we remove the final encoding instruction
module NAS_CommonTypeDefs {
:

}  //with { encode "NAS Types" }



then a new error appears , revealing the root cause :

GERAN_CapabilityFunctions.ttcn:108.30-95: In the parameters of decvalue():                                                                                         
    NAS_CommonTypeDefs.ttcn:287.6-310.1: error: No coding rule specified for type '@NAS_CommonTypeDefs.MS_Clsmk2'     



As solutions are a bit different for ASN.1 and TTCN-3 , I will treat them separately.


In case of ASN.1 , the only natively supported codec is BER; if your protocol is BER -encoded (which is not the case here, I just mention this for completeness) than you need to declare external functions for BER as below:


       external function enc_SomeType(in SomeType pdu) return octetstring
         with { extension "prototype(convert) encode(BER:BER_ENCODE_DER)" };
       external function dec_SomeType(in octetstring stream) return SomeType 
         with { extension "prototype(convert) decode(BER:BER_ACCEPT_ALL)" };



Titan will automatically generate the BER codecs, so there is nothing further to be done.


In our case we need PER codecs, so you will have to declare a PER codec pair (encode/decoder) for each type that appears in the error log:

For example:

module EUTRA_Types
{
  import from EUTRA_RRC_ASN1_Definitions language "ASN.1:1997" all;
  
  external function enc_DCC_PDU( in DL_CCCH_Message pdu) return bitstring
   with { extension "prototype(convert) encode(PER)" };
  external function dec_DCC_PDU (inout bitstring stream, out DL_CCCH_Message pdu) return integer
  with { extension "prototype(sliding) decode(PER)" };


  external function enc_DL_DCCH( in DL_DCCH_Message pdu) return bitstring
   with { extension "prototype(convert) encode(PER)" };
  external function dec_DL_DCCH( inout bitstring stream, out DL_DCCH_Message pdu ) return integer
  with { extension "prototype(sliding) decode(PER)" };


   external function enc_UE_EUTRA_Capability( in UE_EUTRA_Capability pdu) return bitstring
  with { extension "prototype(convert) encode(PER)" };
  external function dec_UE_EUTRA_Capability( inout bitstring stream, out UE_EUTRA_Capability pdu ) return integer
  with { extension "prototype(sliding) decode(PER)" };

:
:
//and so on  
}



and of course each of these functions will have to have a corresponding entry in EUTRA_EncDec.cc.


If you want to avoid writing all these functions , you can create a union of all types , a CHOICE in ASN.1 , and then one function needs to be written only ; however the downside of this is that encvalue/decvalue references will have to be modified throughout the code as they refer to "Type" and not "ChoiceType.Type".



OK, now for TTCN-3 types I recommend first you remove all encoding instructions such as 'with {encode "SomeString"}' .
Next you need to understand what kind of encoding is needed for each module; I'm guessing it will be either RAW or XML. Subsequently, each module will have to have an appropriate final
'with {encode "RAW"}'
or
'with {encode "XER"}'

encoding instruction.

(see earlier posts about XML and RAW encoding)


Next , these external functions will have to be declared.
When these are declared, the afore-mentioned errors will disappear,


but new errors will appear when linking, as Titan may not find the code that corresponds to these declarations.


Good news is , Titan will auto-generate the codec functions ; bad news is , for this the RAW -encoded types will have to be decorated with appropriate instructions; For XML , it's simpler , as the instructions can be generated from the Schema (XSD file) from which the types originate.


OK, this is quite a lot to digest , so I'll stop here; please ask me if you have further questions or anything is unclear.


Best regards

Elemer

[Updated on: Tue, 16 May 2017 11:57]

Report message to a moderator

Re: make error in LTE test of coding by asn1c [message #1764042 is a reply to message #1763458] Wed, 24 May 2017 09:13 Go to previous messageGo to next message
Coco Wang is currently offline Coco WangFriend
Messages: 6
Registered: February 2017
Junior Member
Hi Elemer:
Thanks for your help, I have solved almost all my errors. There lost the last error. I have worte an external function of DL_DCCH_Message like this:
   external function f_enc_DL_CCCH_Message(in DL_CCCH_Message pdu) return bitstring
    with { extension "prototype(convert) encode(PER)" }


And I change the 'encvalue' in *.ttcn to ' f_enc_DL_CCCH_Message' like this:
  function f_RRC_DL_CCCH_Encvalue(template (value) DL_CCCH_Message p_CCCH_Message) return octetstring
  {
    var bitstring v_Bitstring := f_enc_DL_CCCH_Message(p_CCCH_Message);


But an error happened like this:
  EUTRA_ConfigurationSteps.ttcn:475.55-70: In actual parameter list of external function `@EUTRA_ConfigurationSteps.f_enc_DL_CCCH_Message':
    EUTRA_ConfigurationSteps.ttcn:475.56-69: In parameter #1 for `pdu':
      EUTRA_ConfigurationSteps.ttcn:475.56-69: error: Reference to a value was expected instead of template parameter `p_CCCH_Message'


However, if I reserve the 'encvalue', no error will happen and I can make skeleton of TestPorts by 'make port'.
I think the (value) in "(template (value) DL_CCCH_Message p_CCCH_Message)" might cause this error. I rememeber the encvalue is not supported in TITAN. How can I solve this error?

What's more, there is another problem. I will wirte code of TestPorts to complate the TestSuite. I noticed Murli wrote his own transport.cc to implement his TCP port. And in the SNMP example, you used "titan.TestPorts.UDPasp" to implement UDP port. To me, I want to connect the TestSuite with PDCP layer of SS by UDP protocol.
Could you please give some advise about how to implement my TestPort. I'm a little confused about how to continue my work. Thank you.

Re: make error in LTE test of coding by asn1c [message #1764051 is a reply to message #1764042] Wed, 24 May 2017 11:08 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi Coco,

the answer to your first question is simple:

change

var bitstring v_Bitstring := f_enc_DL_CCCH_Message(p_CCCH_Message);


to

var bitstring v_Bitstring := f_enc_DL_CCCH_Message(valueof(p_CCCH_Message));



For the test port , please look into chapter 2 of the Titan API guide ,
and also into the code of already published test ports in github.

If your communication is based on UDP you can probably re-use the UDP test port either as code or e.g. in a translation port /dual-faced port setup (see forum for posts on these topics).


Best regards
Elemer

Re: make error in LTE test of coding by asn1c [message #1764163 is a reply to message #1764051] Fri, 26 May 2017 08:40 Go to previous messageGo to next message
Coco Wang is currently offline Coco WangFriend
Messages: 6
Registered: February 2017
Junior Member
Hi Elemer:
I have a small question to disturb you. When I run the SNMP Testsuite in UDP mode. I can only run it once. From the second time, the result will be "timeout". If I restart my virtual machine of ubuntu, it can work another once. How can I solve this problem without restart?
The log of error is as follows.
Re: make error in LTE test of coding by asn1c [message #1764164 is a reply to message #1764163] Fri, 26 May 2017 08:42 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi Coco,
exactly which testsuite is this? As there are a number of them...


Where did you get the source code from?
Which Ubuntu is running in your VM?

BR

Elemer

Re: make error in LTE test of coding by asn1c [message #1764165 is a reply to message #1764163] Fri, 26 May 2017 08:43 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi Coco,
exactly which testsuite is this? As there are a number of them...


Where did you get the source code from?
Which Ubuntu is running in your VM?

BR

Elemer

Re: make error in LTE test of coding by asn1c [message #1764234 is a reply to message #1764165] Sat, 27 May 2017 01:06 Go to previous messageGo to next message
Coco Wang is currently offline Coco WangFriend
Messages: 6
Registered: February 2017
Junior Member
Hi Elemer,
Sorry for my unclear question.

This testsuite is from "Example of SNMP over UDP [message #1700830]" which you uploaded in July 2015. All the source code is from the "SNMP.tgz".
I have a Ubuntu 14.04LTS on my VMware Workstation with Bridged Networking mode.
Re: make error in LTE test of coding by asn1c [message #1764239 is a reply to message #1764234] Sat, 27 May 2017 05:48 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi Coco,

yes, we noticed this problem before:

what happens is that MTC starts a new PTC here:

v_echo_CT.start(f_echo()) 


f_echo itself contains a map operation:

function f_echo() runs on Echo_SNMP_CT
{  

   

   var ASP_UDP         v_ASP_UDP_r, v_ASP_UDP 
   
   map(self:UDP_PCO, system:UDP_PCO);
:
:


and this part (starting a parallel component, starting the function on it, mapping) executes slower on virtual machines than on physical machines;

so what happens is that MTC sends the SNMP message to the PTC before the PTC is ready to receive, and in consequence receives no answer.
Again this seems to happen on virtual machines only.

The simple remedy is to add a short delay(1 sec should be sufficient):

:
v_echo_CT.start(f_echo())
  
  timer T1 := 1.0; 
  T1.start;T1.timeout; 
   
  map(self:UDP_PCO_DF, system:UDP_PCO_DF);
  var integer v_Id := f_Test_openConnection(tsp_connectionParams,-1);  

//SNMP V1
  UDP_PCO_DF.send(t_snmp_v1_getrequest_msg(5,{}));
:




but the problem itself is more complex and comes back to synchronization between asynchronous events.
I think I'll write a separate post about it.

BTW, You'll notice that in the translation port example published recently we have added this delay.


I hope this helps

BR

Elemer
Re: make error in LTE test of coding by asn1c [message #1769027 is a reply to message #1763393] Tue, 25 July 2017 23:06 Go to previous messageGo to next message
taqi raza is currently offline taqi razaFriend
Messages: 3
Registered: July 2017
Junior Member
Dear Coco,
I am also new TTCN and TITAN and thought to use your example to compile.
I have downloaded your code, file named "LTE_Small.zip" [ as your source code file RRC_ASN_Test.tar.gz has broken links in /bin]. Unzipped it, and made following changes to Makefile.am.sample" within EUTRA_EncDec folder.
CFLAGS += -I.
..
$(TARGET): ${OBJS}
$(CC) $(CFLAGS) -DPDU=DL-CCCH-Message -o $(TARGET) ${OBJS} $(LDFLAGS) $(LIBS)
..
.c.o:
$(CC) $(CFLAGS) -DPDU=DL-CCCH-Message -o $@ -c $<

and then run "make -f Makefile.am.sample" within EUTRA_EncDec folder. The code compiled successfully (no errors).

But when I run "make" within /bin folder, i get following errors:

error: Cannot recognize file `RRC_ConnEst.ttcn' as an ASN.1 or TTCN-3 module. Use the command-line switch `-A' or `-T' to set its type.

error: Cannot recognize file `RRC_ConnRel_C2K.ttcn' as an ASN.1 or TTCN-3 module. Use the command-line switch `-A' or `-T' to set its type.
... and so on.

can you please let me know where did I make mistake.

thank you.
taqi

[Updated on: Thu, 27 July 2017 23:47]

Report message to a moderator

Re: make error in LTE test of coding by asn1c [message #1776872 is a reply to message #1763453] Wed, 22 November 2017 12:09 Go to previous messageGo to next message
JC YangFriend
Messages: 8
Registered: June 2017
Junior Member
Hi Elemer,

I tried to make the tgz you attached in the Vmware + Ubuntu 16.04 + gcc 6.0, and will stuck in the below compiling line:

======
EUTRA_RRC_ASN1_Definitions.cc: In member function 'void EUTRA__RRC__ASN1__Definitions::RRCConnectionReject_criticalExtensions_criticalExtensionsFuture::decode(const TTCN_Typedescriptor_t&, TTCN_Buffer&, TTCN_EncDec::coding_t, ...)':
EUTRA_RRC_ASN1_Definitions.cc:483887:0: note: -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
OER_struct p_oer;
======

Would you help which environment do you compile? Or how do I fix the compiling issue?

Thanks

JC
Re: make error in LTE test of coding by asn1c [message #1776876 is a reply to message #1776872] Wed, 22 November 2017 12:50 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi JC,

sorry, it's not clear which .tgz you are referring to.

Is it the above RRC_ASN_mod.tgz ?

(https://www.eclipse.org/forums/index.php?t=getfile&id=29358&) ?

Which Titan version you are using? You have downloaded the binary or built it for your self?

It appears that it has problems with the newly introduced OER codec;

try to switch OER codec generation off by using -O in the Makefile by using -O;

also, use the -e flag in the Makefile to switch off multiple encoding:



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


and let me know the result.

BR

Elemer

Re: make error in LTE test of coding by asn1c [message #1776877 is a reply to message #1776872] Wed, 22 November 2017 12:50 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi JC,

sorry, it's not clear which .tgz you are referring to.

Is it the above RRC_ASN_mod.tgz ?

(https://www.eclipse.org/forums/index.php?t=getfile&id=29358&) ?

Which Titan version you are using? You have downloaded the binary or built it for your self?

It appears that it has problems with the newly introduced OER codec;

try to switch OER codec generation off by using -O in the Makefile by using -O;

also, use the -e flag in the Makefile to switch off multiple encoding:



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


and let me know the result.

BR

Elemer

Re: make error in LTE test of coding by asn1c [message #1776889 is a reply to message #1776877] Wed, 22 November 2017 14:43 Go to previous messageGo to next message
JC YangFriend
Messages: 8
Registered: June 2017
Junior Member
Hi Elemer,

1.
I use the RRC_ASN_mod.tgz downloaded from (https://www.eclipse.org/forums/index.php?t=getfile&id=29358&).

2.
Titan env. is as below, and source make & install.

TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Product number: CRL 113 200/6 R3A
Compiled with: GCC 6.3.0
Using OpenSSL 1.0.2g 1 Mar 2016

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

Using your suggestion compiling flag can pass above code line number, and with new error stuck as below:
Compiling stuck in

======
EUTRA_RRC_ASN1_Definitions.cc: In member function 'boolean EUTRA__RRC__ASN1__Definitions::CSFBParametersResponseCDMA2000_criticalExtensions_template::match(const EUTRA__RRC__ASN1__Definitions::CSFBParametersResponseCDMA2000_criticalExtensions&, boolean) const':
EUTRA_RRC_ASN1_Definitions.cc:494712:0: note: -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
switch (template_selection) {
======

boolean CSFBParametersResponseCDMA2000_criticalExtensions_template::match(const CSFBParametersResponseCDMA2000_criticalExtensions& other_value, boolean legacy) const
{
if (!other_value.is_bound()) return FALSE;
switch (template_selection) {              /*  <== EUTRA_RRC_ASN1_Definitions.cc:494712  */
case ANY_VALUE:
case ANY_OR_OMIT:
return TRUE;
case OMIT_VALUE:
return FALSE;
case SPECIFIC_VALUE:
{
CSFBParametersResponseCDMA2000_criticalExtensions::union_selection_type value_selection = other_value.get_selection();
if (value_selection == CSFBParametersResponseCDMA2000_criticalExtensions::UNBOUND_VALUE) return FALSE;
if (value_selection != single_value.union_selection) return FALSE;
switch (value_selection) {
case CSFBParametersResponseCDMA2000_criticalExtensions::ALT_csfbParametersResponseCDMA2000__r8:
return single_value.field_csfbParametersResponseCDMA2000__r8->match(other_value.csfbParametersResponseCDMA2000__r8(), legacy);
case CSFBParametersResponseCDMA2000_criticalExtensions::ALT_criticalExtensionsFuture:
return single_value.field_criticalExtensionsFuture->match(other_value.criticalExtensionsFuture(), legacy);
default:
TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @EUTRA-RRC-ASN1-Definitions.CSFBParametersResponseCDMA2000.criticalExtensions.");
}
}
case VALUE_LIST:
case COMPLEMENTED_LIST:
for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++)
if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST;
return template_selection == COMPLEMENTED_LIST;
default:
TTCN_error ("Matching an uninitialized template of union type @EUTRA-RRC-ASN1-Definitions.CSFBParametersResponseCDMA2000.criticalExtensions.");
}
return FALSE;
}


If you can give more suggestion, I can try to compile if succeed or not.

Thanks
JC

Re: make error in LTE test of coding by asn1c [message #1776943 is a reply to message #1776889] Thu, 23 November 2017 06:21 Go to previous messageGo to next message
JC YangFriend
Messages: 8
Registered: June 2017
Junior Member
Hi Elemer,

I change Titan, and gcc version as below:

Product number: CRL 113 200/6 R2A
Compiled with: GCC 7.2.0
Using OpenSSL 1.0.2g 1 Mar 2016

Titan is from git source 6.2.0.

Run ./testcodec testcodec.cfg, and test ok.

For your reference.

Thanks
JC
Re: make error in LTE test of coding by asn1c [message #1776964 is a reply to message #1776943] Thu, 23 November 2017 09:49 Go to previous messageGo to next message
Bence Janos Szabo is currently offline Bence Janos SzaboFriend
Messages: 9
Registered: April 2017
Junior Member
Hello JC,

I could not reproduce your compilation error.

To investigate your issue I need you to send me (attach in reply) your project with your makefile, and your EUTRA_RRC_ASN1_Definitions.cc and EUTRA_RRC_ASN1_Definitions.hh when the error occurs.
The full console log of the compilation is needed too for the quickest diagnosis of the issue.

Thanks
Bence
Re: make error in LTE test of coding by asn1c [message #1777002 is a reply to message #1776964] Thu, 23 November 2017 14:24 Go to previous messageGo to next message
JC YangFriend
Messages: 8
Registered: June 2017
Junior Member
Hi Bence

Here the attached.

Thanks
JC
Re: make error in LTE test of coding by asn1c [message #1777057 is a reply to message #1777002] Fri, 24 November 2017 08:05 Go to previous messageGo to next message
Bence Janos Szabo is currently offline Bence Janos SzaboFriend
Messages: 9
Registered: April 2017
Junior Member
Hello

Thank you for the logs.
In an earlier post you said that it was an issue with TITAN CRL 113 200/6 R3A.
But the logs you send me indicates that the issue is present with TITAN CRL 113 200/6 R2A too, however you said it was ok with R2A.

I still cannot reproduce the problem.

In your log there is only note and not an error.
I was that you use the make's parallel compile feature. You can try to disable that to see if that helps.

Also be sure that your computer has enough memory, because the compilation of the EUTRA_RRC_ASN1_Definitions.cc requires a lot of memory. If you run out of memory the compilation will simply stop.

Thanks,
Bence
Re: make error in LTE test of coding by asn1c [message #1777111 is a reply to message #1777057] Fri, 24 November 2017 14:51 Go to previous message
JC YangFriend
Messages: 8
Registered: June 2017
Junior Member
Hi Bence

I use CRL 113 200/6 R3A, and CRL 113 200/6 R2A compiled with gcc 6.xx will the same result. But with gcc 7.x can make successfully.

I think gcc 7.x may solve my VM environment with memory limited.

Thanks anyway.

JC
Previous Topic:Titan's presence on 2017 fall conferences
Next Topic:Titan in Docker
Goto Forum:
  


Current Time: Thu Nov 15 10:35:05 GMT 2018

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

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

Back to the top