SIST ES 201 873-7 V4.1.1:2009

Methods for Testing and Specification (MTS) - The Testing and Test Control Notation version 3 - Part 7: Using ASN.1 with TTCN-3

SIST ES 201 873-7 V4.1.1:2009

Name:SIST ES 201 873-7 V4.1.1:2009   Standard name:Methods for Testing and Specification (MTS) - The Testing and Test Control Notation version 3 - Part 7: Using ASN.1 with TTCN-3
Standard number:SIST ES 201 873-7 V4.1.1:2009   language:English language
Release Date:16-Aug-2009   technical committee:SPN - Services and Protocols for Networks
Drafting committee:   ICS number:33.040.01 - Telecommunication systems in general
ETSI ES 201 873-7 V4.1.1 (2009-06)
ETSI Standard


Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 7: Using ASN.1 with TTCN-3

---------------------- Page: 1 ----------------------
2 ETSI ES 201 873-7 V4.1.1 (2009-06)



Reference
RES/MTS-00107-7 T3 ed411 asn1
Keywords
ASN.1, MTS, testing, TTCN
ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00  Fax: +33 4 93 65 47 16

Siret N° 348 623 562 00017 - NAF 742 C
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° 7803/88

Important notice
Individual copies of the present document can be downloaded from:
http://www.etsi.org
The present document may be made available in more than one electronic version or in print. In any case of existing or
perceived difference in contents between such versions, the reference version is the Portable Document Format (PDF).
In case of dispute, the reference shall be the printing on ETSI printers of the PDF version kept on a specific network drive
within ETSI Secretariat.
Users of the present document should be aware that the document may be subject to revision or change of status.
Information on the current status of this and other ETSI documents is available at
http://portal.etsi.org/tb/status/status.asp
If you find errors in the present document, please send your comment to one of the following services:
http://portal.etsi.org/chaircor/ETSI_support.asp
Copyright Notification
No part may be reproduced except as authorized by written permission.
The copyright and the foregoing restriction extend to reproduction in all media.

© European Telecommunications Standards Institute 2009.
All rights reserved.

TM TM TM TM
DECT , PLUGTESTS , UMTS , TIPHON , the TIPHON logo and the ETSI logo are Trade Marks of ETSI registered
for the benefit of its Members.
TM
3GPP is a Trade Mark of ETSI registered for the benefit of its Members and of the 3GPP Organizational Partners.
LTE™ is a Trade Mark of ETSI currently being registered
for the benefit of its Members and of the 3GPP Organizational Partners.
GSM and the GSM logo are Trade Marks registered and owned by the GSM Association.
ETSI

---------------------- Page: 2 ----------------------
3 ETSI ES 201 873-7 V4.1.1 (2009-06)
Contents
Intellectual Property Rights.5
Foreword.5
1 Scope.6
2 References.6
2.1 Normative references.6
2.2 Informative references.7
3 Definitions and abbreviations.7
3.1 Definitions.7
3.2 Abbreviations.7
4 Introduction .8
4.1 Conformance .8
5 General.8
6 Amendments to the core language .8
7 Additional TTCN-3 types.8
7.1 General.8
7.2 The object identifier type .9
7.2.1 Sub-typing of the objid type.9
7.2.1.1 Subtrees of the objid type.9
7.2.1.2 List subtypes.10
7.2.1.3 Range subtypes .10
7.2.1.4 Mixing list and range subtypings .10
7.2.2 Object identifier values.10
7.2.3 Using objid values to identify modules.11
7.2.3.1 Identifying module definitions.11
7.2.3.2 Identifying modules in import statements .11
7.2.4 Object identifier templates.11
7.2.4.1 In-line Templates.11
7.2.4.2 Template matching mechanisms .11
7.2.5 Using objid with operators.12
7.2.5.1 List operators.12
7.2.5.2 Relational operators.12
7.2.6 Using objid with predefined functions .13
7.2.6.1 Number of components of an objid value or template.13
7.2.6.2 The Substring function.13
7.2.6.3 The isvalue function.14
7.2.7 Supporting objid in TCI.14
7.2.7.1 objid and TciTypeClass.14
7.2.7.2 objid and TCI type hierarchy .14
8 ASN.1 and TTCN-3 type equivalents .14
8.1 General.14
8.1bis Importing from ASN.1 modules.15
8.2 Identifiers.15
9 ASN.1 data types and values.16
9.1 Transformation rules.16
9.2 Scope of ASN.1 identifiers.22
10 Parameterization in ASN.1.22
11 Defining ASN.1 message templates.22
11.1 General.22
11.2 Receiving messages based on ASN.1 types .23
ETSI

---------------------- Page: 3 ----------------------
4 ETSI ES 201 873-7 V4.1.1 (2009-06)
11.3 Ordering of template fields.23
12 Encoding information.23
12.1 General.23
12.2 ASN.1 encoding attributes .24
12.3 ASN.1 variant attributes .24
Annex A (normative): Additional BNF and static semantics.26
A.1 New productions for ASN.1 support.26
A.2 Amended core language BNF productions and static semantics.26
Annex B (normative): Additional Pre-defined TTCN-3 functions .28
Annex C (informative): Predefined object identifier components .29
Annex D (informative): Deprecated features.30
D.1 Using sizeof for objid values and templates .30
D.2 The decompose function .30
Annex E (informative): Bibliography.31
History .32

ETSI

---------------------- Page: 4 ----------------------
5 ETSI ES 201 873-7 V4.1.1 (2009-06)
Intellectual Property Rights
IPRs essential or potentially essential to the present document may have been declared to ETSI. The information
pertaining to these essential IPRs, if any, is publicly available for ETSI members and non-members, and can be found
in ETSI SR 000 314: "Intellectual Property Rights (IPRs); Essential, or potentially Essential, IPRs notified to ETSI in
respect of ETSI standards", which is available from the ETSI Secretariat. Latest updates are available on the ETSI Web
server (http://webapp.etsi.org/IPR/home.asp).
Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been carried out by ETSI. No guarantee
can be given as to the existence of other IPRs not referenced in ETSI SR 000 314 (or the updates on the ETSI Web
server) which are, or may be, or may become, essential to the present document.
Foreword
This ETSI Standard (ES) has been produced by ETSI Technical Committee Methods for Testing and Specification
(MTS).
The present document is part 7 of a multi-part deliverable. Full details of the entire series can be found in part 1 [1].
ETSI

---------------------- Page: 5 ----------------------
6 ETSI ES 201 873-7 V4.1.1 (2009-06)
1 Scope
The present document defines a normative way of using ASN.1 as defined in the ITU-T Recommendation X.680 [2],
ITU-T Recommendation X.681 [3], ITU-T Recommendation X.682 [4] and ITU-T Recommendation X.683 [5] with
TTCN-3. The harmonization of other languages with TTCN-3 is not covered by the present document.
2 References
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific.
• For a specific reference, subsequent revisions do not apply.
• Non-specific reference may be made only to a complete document or a part thereof and only in the following
cases:
- if it is accepted that it will be possible to use all future changes of the referenced document for the
purposes of the referring document;
- for informative references.
Referenced documents which are not found to be publicly available in the expected location might be found at
http://docbox.etsi.org/Reference.
NOTE: While any hyperlinks included in this clause were valid at the time of publication ETSI cannot guarantee
their long term validity.
2.1 Normative references
The following referenced documents are indispensable for the application of the present document. For dated
references, only the edition cited applies. For non-specific references, the latest edition of the referenced document
(including any amendments) applies.
[1] ETSI ES 201 873-1 (V4.1.1): "Methods for Testing and Specification (MTS); The Testing and
Test Control Notation version 3; Part 1: TTCN-3 Core Language".
[2] ITU-T Recommendation X.680 (2002): "Information technology - Abstract Syntax Notation One
(ASN.1): Specification of basic notation".
[3] ITU-T Recommendation X.681 (2002): "Information technology - Abstract Syntax Notation One
(ASN.1): Information object specification".
[4] ITU-T Recommendation X.682 (2002): "Information technology - Abstract Syntax Notation One
(ASN.1): Constraint specification".
[5] ITU-T Recommendation X.683 (2002): "Information technology - Abstract Syntax Notation One
(ASN.1): Parameterization of ASN.1 specifications".
[6] ITU-T Recommendation X.690 (2002): "Information technology - ASN.1 encoding rules:
Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and
Distinguished Encoding Rules (DER)".
[7] ITU-T Recommendation X.691 (2002): "Information technology - ASN.1 encoding rules:
Specification of Packed Encoding Rules (PER)".
[8] ITU-T Recommendation X.693 (2001): "Information technology - ASN.1 encoding rules: XML
Encoding Rules (XER)".
[9] ITU-T Recommendation T.100 (1988): "International information exchange for interactive
videotex".
ETSI

---------------------- Page: 6 ----------------------
7 ETSI ES 201 873-7 V4.1.1 (2009-06)
[10] ITU-T Recommendation T.101 (1994): "International interworking for Videotex services".
[11] ITU-T Recommendation X.660 (2004): "Information technology - Open systems interconnection -
Procedures for the operation of OSI Registration Authorities: General procedures and top arcs of
the ASN.1 Object Identifier tree".
[12] ETSI ES 201 873-6 (V4.1.1): "Methods for Testing and Specification (MTS); The Testing and
Test Control Notation version 3; Part 6: TTCN-3 Control Interface (TCI)".
NOTE: References to ITU-T Recommendations include the Recommendation and all Amendments and
Corrigenda published to the Recommendation.
2.2 Informative references
The following referenced documents are not essential to the use of the present document but they assist the user with
regard to a particular subject area. For non-specific references, the latest version of the referenced document (including
any amendments) applies.
[i.1] ITU-T Recommendation X.208: "Specification of Abstract Syntax Notation One (ASN.1)".
[i.2] ITU-T Recommendation T.61 (1988): "Character repertoire and coded character sets for the
international teletex service".
3 Definitions and abbreviations
3.1 Definitions
For the purposes of the present document, the terms and definitions given in ES 201 873-1 [1], ITU-T Recommendation
X.660 [11] and the following apply:
associated TTCN-3 type: TTCN-3 type definition resulted from the transformation of an ASN.1 type definition by
applying the transformation rules in clause 9.1
NOTE: Associated TTCN-3 types and values may not exist in a visible way; this term is used to identify the part
of the abstract information carried by the related ASN.1 type or value, which have significance from the
point of view of TTCN-3 (also called the TTCN-3 view).
metatype "OPEN TYPE": term used to explain the ASN.1 to TTCN-3 conversion process
NOTE: It does not exist in the input ASN.1 module or the output TTCN-3 module.
root type: Definition in ES 201 873-1 [1] applies with the following addition: in case of types based on imported
ASN.1 types, the root type is determined from the associated TTCN-3 type (see clause 8).
3.2 Abbreviations
For the purposes of the present document, the abbreviations given in ES 201 873-1 [1] and the following apply:
ASN.1 Abstract Syntax Notation One
OID Object IDentifier
TTCN-3 Tree and Tabular Combined Notation version 3
ETSI

---------------------- Page: 7 ----------------------
8 ETSI ES 201 873-7 V4.1.1 (2009-06)
4 Introduction
When using ASN.1 with TTCN-3 all features of TTCN-3 and statements given in clause 4 of ES 201 873-1 [1] do
apply. In addition, when supporting this part of the standard, TTCN-3 becomes fully harmonized with ASN.1 which
may be used with TTCN-3 modules as an alternative data type and value syntax. This part of the standard defines the
capabilities required in addition of those specified in ES 201 873-1 [1] when ASN.1 is supported. The approach used to
combine ASN.1 and TTCN-3 could be applied to support the use of other type and value systems with TTCN-3.
However, the details of this are not defined in the present document.

TTCN-3
Core
ASN.1 Types Tabula r
Language

& Values format

Other
Other Types Graphipresentatical on
& Values formformatats as
2
TTCN-3 User
defined in
other parts of
the standard
The shaded boxes are not
Other Types

& Values defined in this document
n

Figure 1: User's view of the core language and the various presentation formats
4.1 Conformance
For an implementation claiming to support the use of ASN.1 with TTCN-3, all features specified in the present
document shall be implemented consistently with the requirements given in the present document and in
ES 201 873-1 [1].
5 General
TTCN-3 provides a clean interface for using ASN.1 definitions (as specified in ITU-T Recommendation X.680 [2],
ITU-T Recommendation X.681 [3], ITU-T Recommendation X.682 [4] and ITU-T Recommendation X.683 [5]) in
TTCN-3 modules.
6 Amendments to the core language
Void.
7 Additional TTCN-3 types
7.1 General
TheTTCN-3 types summarized in table 1 shall be supported in addition to those specified in clause 6 of
ES 201 873-1 [1].
Table 1: Overview of TTCN-3 types
Class of type Keyword Sub-type
objid
Simple basic types list, range

ETSI

---------------------- Page: 8 ----------------------
9 ETSI ES 201 873-7 V4.1.1 (2009-06)
7.2 The object identifier type
The object identifier type shall be supported as follows:
• objid: a type whose distinguished values are the set of all syntactically correct object identifier values. The
value notations for the objid type shall conform to clause 31 of ITU-T Recommendation X.680 [2] with the
exception that hyphens are replaced with underscores.
NOTE 1: This definition also allows object identifier values outside the collection of values defined in ITU-T
Recommendation X.660 [11] (e.g. with a node beneath the root not defined in ITU-T
Recommendation X.660 [11]).
The name form of object identifier components shall be used only for components defined in ITU-T Recommendation
X.660 [11]. These predefined object identifier components are given in annex C for information. In case of any conflict
between ITU-T Recommendation X.660 [11] and annex C of the present document, the former shall take precedence.
In cases when the identifier of a value referenced within an object identifier value notation is identical to any of the
predefined component names, i.e. independently of the position of the predefined component or the referenced value
inside the notation (considering name conversion rules in clause 8.2), the name of the referenced value shall be prefixed
with the name of the module in which it is defined (see definition of ASN.1 modules in clause 12 of ITU-T
Recommendation X.680 [2] and TTCN-3 modules in clause 8.1 of the core language standard ES 201 873-1 [1]). The
prefix and the identifier shall be separated by a dot (.). Predefined object identifier component names may also be
prefixed with the name "X660".
NOTE 2: To increase readability it is recommended to use the "X660" prefix also in object identifier values
referring to a value identifier that is clashing with any of the predefined component names.
NOTE 3: Rules to resolve name clashes caused by imports are defined in clause 8.2.3.1 of the core language
standard ES 201 873-1 [1].
EXAMPLE:
objid{itu_t(0) identified_organization(4) etsi(0)}
// or alternatively
objid {itu_t identified_organization etsi(0)}
// or alternatively
objid { 0 4 0}

// or alternatively
const integer etsi := 0;
const objid itu_idOrg := objid{ itu_t identified_organization }
objid{ itu_idOrg etsi } // note, that both names are referencing value definitions

const integer x := 162;
objid{ itu_t recommendation x A.x }  // it is mandatory to use the module name ('A')
      // to prefix the ambiguous identifier
      // or alternatively
objid{ itu_t recommendation X660.x A.x } // the module name shall be present even if
      // the "X660" prefix is used

7.2.1 Sub-typing of the objid type
7.2.1.1 Subtrees of the objid type
The object identifier type is a collection of principally infinite set of unique identifier values, each containing a
sequence of components; each given sequence of arbitrary length compose an object identifier node as shown on
figure 2 (see also annex C). Thus, each node of the object identifier tree - except being a unique identifier itself - is the
root of a subtree, containing a potentially infinite number of unique identifiers. The first n components of all the
identifiers in the subtree are identical to the components of the node, being the root of the subtree, where n is the
number of components of that node. Hence, each object identifier node distinguishes also a unique subset (subtype) of
the objid type. Each member of this subtype (the subtree) is longer than the node identifying the subtree.
ETSI

---------------------- Page: 9 ----------------------
10 ETSI ES 201 873-7 V4.1.1 (2009-06)
Root
itu-t (0) joint-iso-itu-t (2)
iso (1)
(0) (1)   .   (i)          (0) (1)  …    (j)         (0) (1)   …  (k)
(0)  .  (m)

Figure 2: The object identifier tree
Note that object identifiers may also be relative identifiers, i.e. when the given objid value contains only the additional
components related to a defined base node. However, the above remains true for relative object identifiers as well, as
they also do denote a unique node in the object identifier tree (the node defined by the base node + the relative
identifier). If a node is identified by a relative object identifier, all nodes in its subtree will have relative identifiers too.
7.2.1.2 List subtypes
In addition to the types listed in clause 6.1.2.1 of ES 201 873-1 [1], value list subtyping of the objid type shall be
supported. For value lists of the objid type the rules in this clause apply. The objid nodes in the list shall be of
objid type and shall be a true subset of the values defined by the objid type or the base type being restricted.
Clause 7.2.1.1 shall govern in determining if the nodes are a true subset. The subtype defined by this list restricts the
allowed values to the concrete nodes on the list and the subtrees identified by them.
EXAMPLE:
//identifies the nodes {0 4 0 0}, {0 4 0 1} and all other nodes beneath them
type objid MyObjids (objid{0 4 0 0}, objid{0 4 0 1});

//Further restricting the base type MyObjids
type MyObjids MyNarrowerObjids (objid{0 4 0 0 1 0}, objid{0 4 1 1}, objid{0 4 1 3});

//invalid definition as the node {0 4 2} is not member of the type MyObjids
type MyObjids MyNarrowestObjids (objid{0 4 2 1});

7.2.1.3 Range subtypes
In addition to the types listed in clause 6.1.2.2 of ES 201 873-1 [1], value list subtyping of the objid type shall be
supported. For range subtyping of the objid type the rules in this clause apply. The objid nodes determining the
lower and the upper bounds of the subtype shall be of objid type of equal length and shall be a true subset of the
values defined by the objid type or the base type being restricted. Clause 7.2.1.1 shall govern in determining if the
nodes are a true subset. The subtype defined by the range restricts the allowed values to the nodes between the lower
and the upper bounds inclusive and the subtrees identified by them.
EXAMPLE:
//identifies the nodes {0 4 0 0}, {0 4 0 1} … {0 4 0 5} and all other nodes beneath them
type objid MyObjidRange (objid{0 4 0 0} . objid{0 4 0 5});

7.2.1.4 Mixing list and range subtypings
It is allowed to mix the list and the range subtyping mechanisms for objid types. The nodes identified by the different
subtyping mechanisms shall not overlap.
7.2.2 Object identifier values
When defining objid values, rules in clauses 5.4.1.1, 8.2.1, 10 and 11.1 of ES 201 873-1 [1] and in this clause shall
apply. In case of inconsistency the present document takes precedence.
Each object identifier node is an object identifier value. In this case the value identifies the concrete node (i.e. with a
definite number of components) and does not denote the objid subtree beneath it (see clause 7.2.1.1).
ETSI

---------------------- Page: 10 ----------------------
11 ETSI ES 201 873-7 V4.1.1 (2009-06)
7.2.3 Using objid values to identify modules
7.2.3.1 Identifying module definitions
When ASN.1 is supported, module names (of the form of a TTCN-3 identifier) may optionally be followed by an object
identifier, which shall be a valid value as defined in ITU-T Recommendation X.660 [11].
NOTE: Module names in a test suite may differ in the object identifier part only. However, in this case, due
precaution has to be exercised at import to avoid name clash, as prefixing of TTCN-3 identifiers
(see clause 8.2.3.1 of ES 201 873-1 [1]) is unable to resolve such kind of clashes.
7.2.3.2 Identifying modules in import statements
When ASN.1 is supported, in addition to the module names, their object identifiers may also be provided in TTCN-3
import statements. If an object identifier is used as part of the module identifier, this object identifier shall be used by
TTCN-3 test systems to identify the correct module.
7.2.4 Object identifier templates
When defining templates of objid types, rules in clause 15 and annex B of ES 201 873-1 [1] and in this clause shall
apply. In case of inconsistency the present document takes precedence.
7.2.4.1 In-line Templates
The type of objid values can be identified from the value notation alone, hence in addition to the types listed in note 2
of clause 15.4 in ES 201 873-1 [1], the type specification may also be omitted in case of objid values.
7.2.4.2 Template matching mechanisms
Applicability of matching mechanisms to templates of objid types is defined in table 2.
Table 2: TTCN-3 Matching Mechanisms
Used with values Value Instead of values Inside values Attributes
of

S O C V A A R S S P A A P L I
p m o a n n a u u a n n e e f
e i m l y y n p b t y y r n P
c t p u V V g e t t E E m g r
i V l e a a e r y e l l u t e
f a e L l l s p r e e t h s
i l m i u u e e n m m a R e
c u e s e e t e e t e n
V e n t (?) O n n i s t
a t r t t o t
l e N (?) s n r
u d o O i
e L n r c
I e N t
s (*) o i
t n o
e n
(*)
objid
Yes Yes Yes Yes Yes Yes Yes  Yes Yes Yes Yes
(see (see
note note
1) 2)
NOTE 1: When used, shall be applied to o
...

  • Relates Information
  • ISO 8130-9:1992

    ISO 8130-9:1992 - Coating powders
    09-28
  • EN 352-2:2020/FprA1

    EN 352-2:2021/oprA1:2023
    09-28
  • IEC TS 61158-4:1999

    IEC TS 61158-4:1999 - Digital data communications for measurement and control - Fieldbus for use in industrial control systems - Part 4: Data Link protocol specification Released:3/24/1999 Isbn:2831847656
    09-28
  • HD 566 S1:1990

    HD 566 S1:1998
    09-28
  • ISO 5131:1982/Amd 1:1992

    ISO 5131:1982/Amd 1:1992
    09-28
  • EN 60598-2-22:1990

    EN 60598-2-22:1996
    09-27
  • ISO 8504-2:1992

    ISO 8504-2:1992 - Preparation of steel substrates before application of paints and related products -- Surface preparation methods
    09-27
  • EN 12165:2024

    prEN 12165:2022
    09-27
  • IEC TS 61158-6:1999

    IEC TS 61158-6:1999 - Digital data communications for measurement and control - Fieldbus for use in industrial control systems - Part 6: Application Layer protocol specification Released:3/24/1999 Isbn:2831847613
    09-27
  • ISO 4252:1992

    ISO 4252:1992 - Agricultural tractors -- Operator's workplace, access and exit -- Dimensions
    09-27