Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » ASN.1 PER encoding of EUTRA_RRC_ASN1_Definitions.asn ?(How to compile and run a simple test encoding 4G/5G ASN.1 info)
ASN.1 PER encoding of EUTRA_RRC_ASN1_Definitions.asn ? [message #1799871] Sat, 15 December 2018 20:05 Go to next message
Olaf Bergengruen is currently offline Olaf BergengruenFriend
Messages: 59
Registered: November 2018
Member
Hi ASN.1 - Titan experts,

The Rel 14/15 of the EUTRA_RRC_ASN1_Definitions.asn types increased in complexity and we need to know exactly how many bits encoding is needed for e.g. a particular SIB-Block.

For this purpose, I wrote following test case:

  testcase TC_ASN1Encoding() runs on TestComponent
  {
    var template (value) BCCH_BCH_Message v_BCCHMessage:= cs_508_MasterInformationBlock_Init (n100);
    log(encvalue(v_BCCHMessage));
    setverdict(pass);
  }


The problem: Titan produces huge .cc files (> 200 MBytes!) which can not be compiled in my cheap linux laptop

My questions:
- Is it feasible to compile the test above on small computer
- If yes, how, and how can I link a PER encoder for type BCCH_BCH_Message.

Attached the complete project which, as I already said. can not compile in my Linux laptop.

Any hints are welcome,
Olaf@ETSI-STF160
  • Attachment: ASN1Test.tgz
    (Size: 92.03KB, Downloaded 39 times)
Re: ASN.1 PER encoding of EUTRA_RRC_ASN1_Definitions.asn ? [message #1799876 is a reply to message #1799871] Sun, 16 December 2018 08:16 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1063
Registered: January 2015
Senior Member
Hi Olaf,

there are two issues that have to be addressed here:

-compiling EUTRA_RRC_ASN1_Definitions.asn

for this , see Compilation of big files
https://www.eclipse.org/forums/index.php/t/1085369/

and try the -U 'number' option suggested


-PER codec

that's a more complicated issue,

see Eclipse Titan and the dilemma of PER-encoding(ASN.1 PER-codec for Titan )
https://www.eclipse.org/forums/index.php/t/1070344/

here you will have to add/purchase a 3rd party PER codec ;

with some limited success we have used the open source asn1c

https://github.com/vlm/asn1c


Best regards
Elemer





Re: ASN.1 PER encoding of EUTRA_RRC_ASN1_Definitions.asn ? [message #1799896 is a reply to message #1799876] Mon, 17 December 2018 08:15 Go to previous messageGo to next message
Olaf Bergengruen is currently offline Olaf BergengruenFriend
Messages: 59
Registered: November 2018
Member
Thanks Elemer for your clear reply.

I understand now that running this simple test case

 testcase TC_ASN1Encoding() runs on TestComponent
  {
    var template (value) BCCH_BCH_Message v_BCCHMessage:= cs_508_MasterInformationBlock_Init (n100);
    log(encvalue(v_BCCHMessage));
    setverdict(pass);
  }


is a project by itself :-)

I wish you a nice festive season in case we don't 'talk anymore this year,
Olaf
Re: ASN.1 PER encoding of EUTRA_RRC_ASN1_Definitions.asn ? [message #1799922 is a reply to message #1799896] Mon, 17 December 2018 14:02 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1063
Registered: January 2015
Senior Member
Hi Olaf,

thank you,

happy holidays and a prosperous new year to you too.

BR
Elemer
Re: ASN.1 PER encoding of EUTRA_RRC_ASN1_Definitions.asn ? [message #1802719 is a reply to message #1799922] Thu, 14 February 2019 14:26 Go to previous messageGo to next message
Olaf Bergengruen is currently offline Olaf BergengruenFriend
Messages: 59
Registered: November 2018
Member
Hi Elemer again on this issue,

We would like to compile our ATS using this huge EUTRA_RRC_ASN1_Definitions.asn , but we don't need the codecs which makes the *.cc files explode.

Is its possible to NOT generate the different codecs, or to comment out somewhere the source code of Titan in order to not generate the Codec?

Thanks for any hint,
Olaf
Re: ASN.1 PER encoding of EUTRA_RRC_ASN1_Definitions.asn ? [message #1802730 is a reply to message #1802719] Thu, 14 February 2019 17:59 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1063
Registered: January 2015
Senior Member
Hi Olaf,

yes there is; you should use appropriate compiler flags:


compiler 
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor, version CRL 113 200/6 R5A

usage: compiler [-abcdDeEfgijlLMnNOpqrRsStuwxXyY] [-J file] [-K file] [-z file] [-V verb_level]
	[-o dir] [-U none|type|'number'] [-P modulename.top_level_pdu_name] [-Q number] ...
	[-T] module.ttcn [-A] module.asn ...
	or  compiler -v
	or  compiler --ttcn2json [-jf] ... [-T] module.ttcn [-A] module.asn ... [- schema.json]

OPTIONS:
	-a:		force XER in ASN.1 files
	-b:		disable BER encoder/decoder functions
	-B:		allow selected union field to be unbound (legacy behavior)
	-c:		write out checksums in case of error
	-d:		treat default fields as omit
	-D:		disable user and time information generation in the generated files
	-e:		enforce legacy handling of 'encode' and 'variant' attributes
	-E:		display only warnings for unrecognized encoding variants
	-f:		force overwriting of output files
	-g:		emulate GCC error/warning message format
	-i:		use only line numbers in error/warning messages
	-j:		disable JSON encoder/decoder functions
	-J file:	read input files from file
	-K file:	enable selective code coverage
	-l:		include source line info in C++ code
	-L:		add source line info for logging
	-M:		allow 'omit' in template value lists (legacy behavior)
	-n:		activate debugger (generates extra code for debugging)
	-N:		ignore UNTAGGED encoding instruction on top level unions (legacy behaviour)
	-o dir:		output files will be placed into dir
	-O:		disable OER encoder/decoder functions
	-p:		parse only (no semantic check or code generation)
	-P pduname:	define top-level pdu
	-q:		suppress all messages (quiet mode)
	-Qn:		quit after n errors
	-r:		disable RAW encoder/decoder functions
	-R:		use function test runtime (TITAN_RUNTIME_2)
	-s:		parse and semantic check only (no code generation)
	-S:		suppress context information
	-t:		generate Test Port skeleton
	-u:		duplicate underscores in file names
	-U none|type|'number':	select code splitting mode for the generated C++ code
	-V verb_level:	set verbosity level bitmask (decimal)
	-w:		suppress warnings
	-x:		disable TEXT encoder/decoder functions
	-X:		disable XER encoder/decoder functions
	-y:		disable subtype checking
	-Y:		enforce legacy behaviour for "out" function parameters (see refguide)
	-z file:	enable profiling and code coverage for the TTCN-3 files in the argument
	-T file:	force interpretation of file as TTCN-3 module
	-A file:	force interpretation of file as ASN.1 module
	-v:		show version
	--ttcn2json:	generate JSON schema from input modules
JSON schema generator options:
	-j:		only include types with JSON encoding
	-f:		only generate references to types with JSON encoding/decoding functions



or, to focus on the relevant parts only:

:
	-b:		disable BER encoder/decoder functions
:
	-O:		disable OER encoder/decoder functions
:
	-r:		disable RAW encoder/decoder functions
:
	-x:		disable TEXT encoder/decoder functions
	-X:		disable XER encoder/decoder functions
:




I hope this helps

Best regards
Elemer
Re: ASN.1 PER encoding of EUTRA_RRC_ASN1_Definitions.asn ? [message #1802733 is a reply to message #1802730] Thu, 14 February 2019 18:33 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1063
Registered: January 2015
Senior Member
Hi Olaf,

I'd also recommend you to use code splitting mode (-U flag) to speed up compilation; see details in the reference guide, or look through this forum; I have posted entries about this earlier.

BR
Elemer
Re: ASN.1 PER encoding of EUTRA_RRC_ASN1_Definitions.asn ? [message #1802738 is a reply to message #1802733] Thu, 14 February 2019 22:10 Go to previous message
Olaf Bergengruen is currently offline Olaf BergengruenFriend
Messages: 59
Registered: November 2018
Member
Thanks, Elemer!
There is a whole world of possibilities Titan is offering :-)
Olaf
Previous Topic:TITAN on Cygwin
Next Topic:Bug in titan.ProtocolModules.BSSMAP and/or RAW codec?
Goto Forum:
  


Current Time: Fri Jul 10 13:10:10 GMT 2020

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

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

Back to the top