ETSI's Bug Tracker - Part 07: Using ASN.1 with TTCN-3
View Issue Details
0006309Part 07: Using ASN.1 with TTCN-3Technicalpublic10-09-2012 21:2719-12-2012 13:47
tepelmann 
Gyorgy Rethy 
normalminorhave not tried
closedfixed 
v4.4.1 (published 2012-04) 
v4.5.1 (published 2013-04)v4.5.1 (published 2013-04) 
9.1
     Testing Technologies - tepelmann
0006309: NamedNumber should be mapped to constant in TTCN-3
In chapter "9.1 Transformation rules for ASN.1 types and values" in transformation rule 12) the handling of named numbers is defined.
Currently the named numbers are ignored.
This is valid for mapping the type itself. However the named numbers are given to provide specific meanings to specific values. This can be used in TTCN-3 as well.
The named numbers shall be mapped to constants in TTCN-3.
A proposal for the name of the constant is as follow: the type name as prefix, followed by an underscore and the name of the named number and a final underscore to avoid name clashes.

To keep the named number in the format of constant is also important as a change of the named number in the ASN.1 module would be transparent for the TTCN-3 module, if the TTCN-3 constant is used inside TTCN-3 rather then a direct number(which may have changed the meaning in ASN.1)
e.g.:
Definition in ASN.1:
  Color ::= INTEGER {red(0),green(1), blue(255) }

Mapped constant in TTCN-3:
  type integer Color;

  const Color Color_green_ := 1;

  const Color Color_red_ := 0;

  const Color Color_blue_ := 255;
No tags attached.
doc CR6309_resolution_v1.doc (120,832) 11-12-2012 13:08
http://oldforge.etsi.org/mantis/file_download.php?file_id=2763&type=bug
Issue History
10-09-2012 21:27tepelmannNew Issue
10-09-2012 21:27tepelmannClause Reference(s) => 9.1
10-09-2012 21:27tepelmannSource (company - Author) => Testing Technologies - tepelmann
10-12-2012 13:23Gyorgy RethyStatusnew => assigned
10-12-2012 13:23Gyorgy RethyAssigned To => Gyorgy Rethy
10-12-2012 16:55Gyorgy RethyTarget Version => Edition 4.5.1
11-12-2012 13:08Gyorgy RethyFile Added: CR6309_resolution_v1.doc
11-12-2012 13:09Gyorgy RethyNote Added: 0011221
11-12-2012 13:09Gyorgy RethyStatusassigned => resolved
11-12-2012 13:09Gyorgy RethyResolutionopen => fixed
11-12-2012 13:09Gyorgy RethyFixed in Version => Edition 4.5.1
19-12-2012 13:47Gyorgy RethyStatusresolved => closed
19-12-2012 13:47Gyorgy RethyNote Added: 0011289

Notes
(0011221)
Gyorgy Rethy   
11-12-2012 13:09   
See proposed resolution in file CR6309_resolution_v1.doc
(0011289)
Gyorgy Rethy   
19-12-2012 13:47   
Implemented in draft V4.4.2