Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Cannot Compile LTE Testsuite with Titan 6.1.0(EncVal/DecValue Compilation error)
Cannot Compile LTE Testsuite with Titan 6.1.0 [message #1764755] Fri, 02 June 2017 06:23 Go to next message
MeGo Sin is currently offline MeGo SinFriend
Messages: 3
Registered: June 2017
Junior Member
Hi All,

While converting LTE TTCN test cases with latest Titan 6.1.0 to generate .cc files, I am getting the below-mentioned error:

EUTRA_RRC_ASN1_Definitions.asn:1786: error: Cannot determine the encoding rules for ASN.1 type `@EUTRA-RRC-ASN1-Definitions.SystemInformationBlockType1-v8h0-IEs'. No encoding external function found
EUTRA_RRC_ASN1_Definitions.asn:69: error: Cannot determine the encoding rules for ASN.1 type `@EUTRA-RRC-ASN1-Definitions.DL-CCCH-Message'. No encoding external function found
EUTRA_RRC_ASN1_Definitions.asn:84: error: Cannot determine the encoding rules for ASN.1 type `@EUTRA-RRC-ASN1-Definitions.DL-DCCH-Message'. No encoding external function found

I am using below command to generate makefile:

makefilegen -f -MRU type *.ttcn */*.ttcn */*/*.ttcn */*/*.asn

With Titan 5.5.0, encoding and decoding functions were written explicitly to avoid this error. I thought with Titan 6.1.0, no separate encval/decval would be needed.

Kindly guide and correct me if my understand is wrong.

Thanks and Regads,
MeGo
Re: Cannot Compile LTE Testsuite with Titan 6.1.0 [message #1764833 is a reply to message #1764755] Fri, 02 June 2017 14:06 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi MeGo,

please read through the earlier post

make error in LTE test of coding by asn1c
https://www.eclipse.org/forums/index.php/t/1086125/

towards the end I explain the reason of these errors

Best regards

Elemer


Re: Cannot Compile LTE Testsuite with Titan 6.1.0 [message #1764956 is a reply to message #1764833] Mon, 05 June 2017 03:27 Go to previous messageGo to next message
MeGo Sin is currently offline MeGo SinFriend
Messages: 3
Registered: June 2017
Junior Member
Thanks for your email Elemer.

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

There is no EUTRA_EncDec.cc generated in my case. (is my makefile gen cmd wrong)
I understood the need to explicitly tell Titan abt the corresponding encode/decode function, but these functions would already be present in Titan and thus need not to be defined again. Is this understanding ok?

Thanks,
MeGo
Re: Cannot Compile LTE Testsuite with Titan 6.1.0 [message #1764960 is a reply to message #1764956] Mon, 05 June 2017 06:23 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi MeGo,

The EUTRA_EncDec.cc is not generated manually, it's handwritten.

The reason for this is that Titan does not support PER encoding, so a 3rd party codec has to be used. The only open source option we could find is asn1c by Lev Walkin
(not to be confused with asn1c by Objective Systems). There's a detailed description in yet another previous post see:

Eclipse Titan and the dilemma of PER-encoding
https://www.eclipse.org/forums/index.php/t/1070344/

with an attached example

Attachment: CAM_CNL_113_xxx.tgz

Coco adapted this example to his/her environment and so should you.

XXX_EncDec.cc will encode messages first in BER , which is natively supported by Titan , then transcodes them to PER with an external codec (asn1c or some other, commercial codec generated by a commercial ASN.1 compiler) .


I hope this helps

Best regards
Elemer
Re: Cannot Compile LTE Testsuite with Titan 6.1.0 [message #1765041 is a reply to message #1764960] Tue, 06 June 2017 03:11 Go to previous messageGo to next message
MeGo Sin is currently offline MeGo SinFriend
Messages: 3
Registered: June 2017
Junior Member
Thanks for your email Elemer.

I went through https://www.eclipse.org/forums/index.php/t/1070344/ and it quite beautifully explains the Titan limitation for PER encoding support (September 2015 post)

Titain 6.1.0 (March 2017 rel) has new feature "encvalue/decvalue for ASN.1 types". Can you share what is added in this encvalue/decvalue functions?
Does this release support PER encoding?

Regards,
MeGo



Re: Cannot Compile LTE Testsuite with Titan 6.1.0 [message #1765047 is a reply to message #1765041] Tue, 06 June 2017 07:04 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 854
Registered: January 2015
Senior Member
Hi MeGo,

I'm afraid it does not add PER ; this is what it does:

-before this change it was not possible to invoke encvalue/decvalue for ASN.1 types at all; this change makes that possible under the following conditions:

An encoder external function must be declared for an ASN.1 type for encvalue to work on its values. This function only serves to identify which codec to use when encoding values of the ASN.1 type.
This encoder function can use any prototype, and uses the regular stream type associated with the codec (octetstring or charstring), even though the resulting encvalue call uses the prototype 'convert' and bitstring as stream.

When encvalue/decvalue/decmatch/@decoded is called for an ASN.1 instance, Titan will call the auto-generated BER encoder or decoder function with the type of coding specified in an external function
declaration for the type. The return value of the encoding and the inout parameter of the decoding function shall be octetstring; e.g.:
ASN.1 definition:
CAM ::= SEQUENCE {
    header ItsPduHeader,
    cam CoopAwareness
}

External function declarations:

external function fx_enc_CAM (in CAM pdu) return octetstring
    with {extension "prototype(convert) encode(BER:BER_ENCODE_DER)"}
external function fx_dec_CAM (inout octetstring stream, out CAM pdu) return integer with {extension "prototype(sliding) decode(BER:BER_ACCEPT_ALL)"}



-In Titan 6.2 (to be released soon, source code already available in github, so one can build from source) the following connected new features have been added:


1) In the external function declarations it is also allowed to use bitstring as return value and inout parameter; this will change the runtime behaviour only, i.e. add implicit octetstring/bitstring conversion if the function is called directly as it is done already in case of encvalue/decvalue .


2) If the encode and decode attribute value of the external function is "PER" for an ASN.1 type, there shall be a manually implemented C++ function for each such external function declaration.
One ASN.1 type shall have at most one external function declaration with an encode and one with a decode attribute. No other attribute values than "BER:..." or "PER" shall be allowed.

Example:
  external function fx_enc_CAM (in CAM pdu) return bitstring
    with {extension "prototype(convert) encode(PER)"}

  external function fx_dec_CAM (inout bitstring stream, out CAM pdu) return integer with {extension "prototype(sliding) decode(PER)"}


When an instance of an ASN.1 type is used in encvalue/decvalue/decmatch/@decoded, and the type has an
external function declaration with the encode/decode attribute PER, the manually implemented external function shall be called implicitly, in the same way it is done for TTCN-3 types with user defined TTCN-3 encode attribute strings.



All these changes will only make easier to use external PER codecs.


I hope this clarifies the issue

Best regards


Elemer




Previous Topic:Collecting test suite from executable
Next Topic:Stacking ports
Goto Forum:
  


Current Time: Mon Nov 19 21:58:41 GMT 2018

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

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

Back to the top