SIST ES 201 873-7 V4.7.1:2019
(Main)The present document defines a normative way of using ASN.1 as defined in Recommendations ITU-T X.680 [2],
X.681 [3], X.682 [4] and X.683 [5] with TTCN-3. The harmonization of other languages with TTCN-3 is not covered
by the present document.
Metode za preskušanje in specificiranje (MTS) - 3. različica zapisa preskušanja in krmiljenja preskusov - 7. del: Uporaba ASN.1 pri TTCN-3
V tem dokumentu je opredeljen normativni način uporabe ASN.1 pri TTCN-3, kot je opredeljeno v priporočilih ITU-T X.680 [2], X.681 [3], X.682 [4] in X.683 [5]. Ta dokument ne zajema uskladitve ostalih jezikov z jezikom TTCN-3.
General Information
Standards Content (sample)
SLOVENSKI STANDARD
SIST ES 201 873-7 V4.7.1:2019
01-januar-2019
0HWRGH]DSUHVNXãDQMHLQVSHFLILFLUDQMH076UD]OLþLFD]DSLVDSUHVNXãDQMDLQ
NUPLOMHQMDSUHVNXVRYGHO8SRUDED$61SUL77&1Methods for Testing and Specification (MTS) - The Testing and Test Control Notation
version 3 - Part 7: Using ASN.1 with TTCN-3Ta slovenski standard je istoveten z: ETSI ES 201 873-7 V4.7.1 (2018-05)
ICS:
33.040.01 Telekomunikacijski sistemi Telecommunication systems
na splošno in general
SIST ES 201 873-7 V4.7.1:2019 en
2003-01.Slovenski inštitut za standardizacijo. Razmnoževanje celote ali delov tega standarda ni dovoljeno.
---------------------- Page: 1 ----------------------SIST ES 201 873-7 V4.7.1:2019
---------------------- Page: 2 ----------------------
SIST ES 201 873-7 V4.7.1:2019
ETSI ES 201 873-7 V4.7.1 (2018-05)
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: 3 ----------------------
SIST ES 201 873-7 V4.7.1:2019
2 ETSI ES 201 873-7 V4.7.1 (2018-05)
Reference
RES/MTS-201873-7ed471
Keywords
ASN.1, language, testing, TTCN, XML
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
The present document can be downloaded from:
http://www.etsi.org/standards-search
The present document may be made available in electronic versions and/or in print. The content of any electronic and/or
print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any
existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the
print of the Portable Document Format (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
https://portal.etsi.org/TB/ETSIDeliverableStatus.aspxIf you find errors in the present document, please send your comment to one of the following services:
https://portal.etsi.org/People/CommiteeSupportStaff.aspxCopyright Notification
No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying
and microfilm except as authorized by written permission of ETSI.The content of the PDF version shall not be modified without the written authorization of ETSI.
The copyright and the foregoing restriction extend to reproduction in all media.© ETSI 2018.
All rights reserved.
TM TM TM
DECT , PLUGTESTS , UMTS and the ETSI logo are trademarks of ETSI registered for the benefit of its Members.
TM TM3GPP and LTE are trademarks of ETSI registered for the benefit of its Members and
of the 3GPP Organizational Partners.oneM2M logo is protected for the benefit of its Members.
GSM and the GSM logo are trademarks registered and owned by the GSM Association.
ETSI
---------------------- Page: 4 ----------------------
SIST ES 201 873-7 V4.7.1:2019
3 ETSI ES 201 873-7 V4.7.1 (2018-05)
Contents
Intellectual Property Rights ................................................................................................................................ 5
Foreword ............................................................................................................................................................. 5
Modal verbs terminology .................................................................................................................................... 5
1 Scope ........................................................................................................................................................ 6
2 References ................................................................................................................................................ 6
2.1 Normative references ......................................................................................................................................... 6
2.2 Informative references ........................................................................................................................................ 7
3 Definitions and abbreviations ................................................................................................................... 8
3.1 Definitions .......................................................................................................................................................... 8
3.2 Abbreviations ..................................................................................................................................................... 9
4 Introduction .............................................................................................................................................. 9
5 General ..................................................................................................................................................... 9
5.1 Approach ............................................................................................................................................................ 9
5.2 Conformance and compatibility ....................................................................................................................... 10
6 Amendments to the core language ......................................................................................................... 10
7 Additional TTCN-3 types ....................................................................................................................... 10
7.1 General ............................................................................................................................................................. 10
7.2 The object identifier type ................................................................................................................................. 10
7.2.0 The objid type ......................................................................................................................................... 10
7.2.1 Sub-typing of the objid type .................................................................................................................... 11
7.2.1.1 Subtrees of the objid type .................................................................................................................. 11
7.2.1.2 List subtypes ......................................................................................................................................... 12
7.2.1.3 Range subtypes ..................................................................................................................................... 12
7.2.1.4 Mixing list and range subtypings .......................................................................................................... 12
7.2.2 Object identifier values ............................................................................................................................... 12
7.2.3 Using objid values to identify modules ................................................................................................... 12
7.2.3.1 Identifying module definitions .............................................................................................................. 12
7.2.3.2 Identifying modules in import statements ............................................................................................. 13
7.2.4 Object identifier templates .......................................................................................................................... 13
7.2.4.0 General .................................................................................................................................................. 13
7.2.4.1 In-line templates .................................................................................................................................... 13
7.2.4.2 Template matching mechanisms ........................................................................................................... 13
7.2.5 Using objid with operators ...................................................................................................................... 14
7.2.5.1 List operator .......................................................................................................................................... 14
7.2.5.2 Relational operators .............................................................................................................................. 14
7.2.6 Using objid with predefined functions .................................................................................................... 15
7.2.6.1 Number of components of an objid value or template....................................................................... 15
7.2.6.2 The Substring function .......................................................................................................................... 15
7.2.6.3 The isvalue function .............................................................................................................................. 15
7.2.7 Supporting objid in TCI .............................................................................................................................. 16
7.2.7.0 General .................................................................................................................................................. 16
7.2.7.1 Adding objid to abstract data types and values ..................................................................................... 16
7.2.7.2 Adding objid to Java language mapping ............................................................................................... 17
7.2.7.3 Adding objid to ANSI C language mapping ......................................................................................... 18
8 ASN.1 and TTCN-3 type equivalents .................................................................................................... 22
8.1 General ............................................................................................................................................................. 22
8.1.a Importing from ASN.1 modules ....................................................................................................................... 23
8.1.a.1 Language specification strings .................................................................................................................... 23
8.1.a.2 Importing definitions from ASN.1 modules ............................................................................................... 23
8.1.a.3 Importing import statements from ASN.1 modules .................................................................................... 24
8.1.a.4 Import Visibility of ASN.1 definitions ....................................................................................................... 24
ETSI---------------------- Page: 5 ----------------------
SIST ES 201 873-7 V4.7.1:2019
4 ETSI ES 201 873-7 V4.7.1 (2018-05)
8.2 Identifiers ......................................................................................................................................................... 24
9 ASN.1 data types and values .................................................................................................................. 25
9.1 Transformation rules for ASN.1 types and values ............................................................................................ 25
9.2 Transformation rules for values ........................................................................................................................ 33
9.3 Scope of ASN.1 identifiers ............................................................................................................................... 33
10 Parameterization in ASN.1 ..................................................................................................................... 33
11 Defining ASN.1 message templates ....................................................................................................... 34
11.1 General ............................................................................................................................................................. 34
11.2 Receiving messages based on ASN.1 types ..................................................................................................... 34
11.3 Ordering of template fields ............................................................................................................................... 35
12 Encoding information ............................................................................................................................. 35
12.1 General ............................................................................................................................................................. 35
12.2 ASN.1 encoding attributes ............................................................................................................................... 35
12.3 ASN.1 variant attributes ................................................................................................................................... 36
Annex A (normative): Additional BNF and static semantics ........................................................... 37
A.0 General rules .......................................................................................................................................... 37
A.1 New productions for ASN.1 support ...................................................................................................... 37
A.2 Amended core language BNF productions and static semantics ............................................................ 37
Annex B (normative): Additional Pre-defined TTCN-3 functions .................................................. 39
Annex C (informative): Additional information on object identifiers ............................................... 40
C.1 The top-level arcs of the OID tree ........................................................................................ .................. 40
C.2 Character patterns to match OID IRI-s ................................................................................................... 42
Annex D (informative): Deprecated features ....................................................................................... 43
Annex E (informative): Example patterns for ASN.1 time types ....................................................... 44
E.0 General rules .......................................................................................................................................... 44
E.1 Patterns corresponding to unconstrained time types .............................................................................. 44
E.2 Constructing patterns corresponding to constrained time types ............................................................. 57
Annex F (informative): Bibliography ................................................................................................... 58
History .............................................................................................................................................................. 59
ETSI---------------------- Page: 6 ----------------------
SIST ES 201 873-7 V4.7.1:2019
5 ETSI ES 201 873-7 V4.7.1 (2018-05)
Intellectual Property Rights
Essential patents
IPRs essential or potentially essential to normative deliverables 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 (https://ipr.etsi.org/).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.Trademarks
The present document may include trademarks and/or tradenames which are asserted and/or registered by their owners.
ETSI claims no ownership of these except for any which are indicated as being the property of ETSI, and conveys no
right to use or reproduce any trademark and/or tradename. Mention of those trademarks in the present document does
not constitute an endorsement by ETSI of products, services or organizations associated with those trademarks.
ForewordThis 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].
Modal verbs terminologyIn the present document "shall", "shall not", "should", "should not", "may", "need not", "will", "will not", "can" and
"cannot" are to be interpreted as described in clause 3.2 of the ETSI Drafting Rules (Verbal forms for the expression of
provisions)."must" and "must not" are NOT allowed in ETSI deliverables except when used in direct citation.
ETSI---------------------- Page: 7 ----------------------
SIST ES 201 873-7 V4.7.1:2019
6 ETSI ES 201 873-7 V4.7.1 (2018-05)
1 Scope
The present document defines a normative way of using ASN.1 as defined in Recommendations ITU-T X.680 [2],
X.681 [3], X.682 [4] and X.683 [5] with TTCN-3. The harmonization of other languages with TTCN-3 is not covered
by the present document.2 References
2.1 Normative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
referenced document (including any amendments) applies.Referenced documents which are not found to be publicly available in the expected location might be found at
https://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.The following referenced documents are necessary for the application of the present document.
[1] ETSI ES 201 873-1: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 1: TTCN-3 Core Language".[2] Recommendation ITU-T X.680 (2008): "Information technology - Abstract Syntax Notation One
(ASN.1): Specification of basic notation".[3] Recommendation ITU-T X.681 (2008): "Information technology - Abstract Syntax Notation One
(ASN.1): Information object specification".[4] Recommendation ITU-T X.682 (2008): "Information technology - Abstract Syntax Notation One
(ASN.1): Constraint specification".[5] Recommendation ITU-T X.683 (2008): "Information technology - Abstract Syntax Notation One
(ASN.1): Parameterization of ASN.1 specifications".[6] Recommendation ITU-T X.690 (2008): "Information technology - ASN.1 encoding rules:
Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) andDistinguished Encoding Rules (DER)".
[7] Recommendation ITU-T X.691 (2008): "Information technology - ASN.1 encoding rules:
Specification of Packed Encoding Rules (PER)".[8] Recommendation ITU-T X.693 (2008): "Information technology - ASN.1 encoding rules: XML
Encoding Rules (XER)".[9] Recommendation ITU-T T.100 (1988): "International information exchange for interactive
Videotex".[10] Recommendation ITU-T T.101 (1994): "International interworking for Videotex services".
[11] Recommendation ITU-T X.660 (2011): "Information technology - Procedures for the operation of
object identifier registration authorities: General procedures and top arcs of the international object
identifier tree".[12] ETSI ES 201 873-6: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 6: TTCN-3 Control Interface (TCI)".[13] Recommendation ITU-T X.696 (2015): "Information technology - ASN.1 encoding rules:
Specification of Octet Encoding Rules (OER)".ETSI
---------------------- Page: 8 ----------------------
SIST ES 201 873-7 V4.7.1:2019
7 ETSI ES 201 873-7 V4.7.1 (2018-05)
2.2 Informative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
referenced document (including any amendments) applies.NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee
their long term validity.The following referenced documents are not necessary for the application of the present document but they assist the
user with regard to a particular subject area.[i.1] ISO 8601 (2004): "Data elements and interchange formats - Information interchange -
Representation of dates and times".[i.2] ETSI ES 201 873-10: "Methods for Testing and Specification (MTS); The Testing and Test
Control Notation version 3; Part 10: TTCN-3 Documentation Comment Specification".
[i.3] ISO 3166-1: "Codes for the representation of names of countries and their subdivisions - Part 1:
Country codes".[i.4] Recommendation ITU-T X.121: "Public data networks - Network aspects - International
numbering plan for public data networks".NOTE: References to Recommendations ITU-T include the Recommendation and all Amendments and
Corrigenda published to the Recommendation except when specified otherwise in other parts of the
present document.[i.5] Recommendation ITU-T X.208: "Specification of Abstract Syntax Notation One (ASN.1)" (Blue
Book).[i.6] Recommendation ITU-T X.680 (1994): "Information technology - Abstract Syntax Notation One
(ASN.1): Specification of basic notation".[i.7] Recommendation ITU-T X.680 (1997): "Information technology - Abstract Syntax Notation One
(ASN.1): Specification of basic notation".[i.8] Recommendation ITU-T X.680 (2002): "Information technology - Abstract Syntax Notation One
(ASN.1): Specification of basic notation".[i.9] Recommendation ITU-T X.681 (1994): "Information technology - Abstract Syntax Notation One
(ASN.1): Information object specification".[i.10] Recommendation ITU-T X.681 (1997): "Information technology - Abstract Syntax Notation One
(ASN.1): Information object specification".[i.11] Recommendation ITU-T X.681 (2002): "Information technology - Abstract Syntax Notation One
(ASN.1): Information object specification".[i.12] Recommendation ITU-T X.682 (1994): "Information technology - Abstract Syntax Notation One
(ASN.1): Constraint specification".[i.13] Recommendation ITU-T X.682 (1997): "Information technology - Abstract Syntax Notation One
(ASN.1): Constraint specification".[i.14] Recommendation ITU-T X.682 (2002): "Information technology - Abstract Syntax Notation One
(ASN.1): Constraint specification".[i.15] Recommendation ITU-T X.683 (1994): "Information technology - Abstract Syntax Notation One
(ASN.1): Parameterization of ASN.1 specifications".[i.16] Recommendation ITU-T X.683 (1997): "Information technology - Abstract Syntax Notation One
(ASN.1): Parameterization of ASN.1 specifications".[i.17] Recommendation ITU-T X.683 (2002): "Information technology - Abstract Syntax Notation One
(ASN.1): Parameterization of ASN.1 specifications".ETSI
---------------------- Page: 9 ----------------------
SIST ES 201 873-7 V4.7.1:2019
8 ETSI ES 201 873-7 V4.7.1 (2018-05)
[i.18] Recommendation ITU-T X.690 (2002): "Information technology - ASN.1 encoding rules:
Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) andDistinguished Encoding Rules (DER)".
[i.19] Recommendation ITU-T X.691 (2002): "Information technology - ASN.1 encoding rules:
Specification of Packed Encoding Rules (PER)".[i.20] ETSI ES 202 781: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Configuration and Deployment Support".
[i.21] ETSI ES 202 782: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: TTCN-3 Performance and Real Time Testing".
[i.22] ETSI ES 202 784: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Advanced Parameterization".[i.23] ETSI ES 202 785: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Behaviour Types".[i.24] ETSI ES 202 786: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Support of interfaces with continuous signals".
[i.25] ETSI ES 202 789: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Extended TRI".[i.26] CCITT Blue Book.
[i.27] ETSI ES 201 873-8: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 8: The IDL to TTCN-3 Mapping".[i.28] ETSI ES 201 873-9: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 9: Using XML schema with TTCN-3".[i.29] ETSI ES 201 873-11: "Methods for Testing and Specification (MTS); The Testing and Test
Control Notation version 3; Part 11: Using JSON with TTCN-3".3 Definitions and abbreviations
3.1 Definitions
For the purposes of the present document, the terms and definitions given in ETSI ES 201 873-1 [1], Recommendation
ITU-T X.660 [11] and the following apply:associated TTCN-3 type: TTCN-3 type equivalent, obtained by transforming of the corresponding ASN.1 type
definition according to clause 9.1 of the present documentNOTE: 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": 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 ETSI 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).
ETSI---------------------- Page: 10 ----------------------
SIST ES 201 873-7 V4.7.1:2019
9 ETSI ES 201 873-7 V4.7.1 (2018-05)
3.2 Abbreviations
For the purposes of the present document, the abbreviations given in ETSI ES 201 873-1 [1] and the following apply:
ASN.1 Abstract Syntax Notation OneBER Basic Encoding Rules of ASN.1
CER Canonical Encoding Rules of ASN.1
OER Octet Encoding Rules of ASN.1
OID Object IDentifier
PER Packed Encoding Rules of ASN.1
XER XML Encoding Rules of ASN.1
4 Introduction
When using ASN.1 with TTCN-3 all features of TTCN-3 and statements given in clause 4 of ETSI ES 201 873-1 [1] do
apply. In addition, when supporting the present document, TTCN-3 becomes fully harmonized with ASN.1 which may
be used with TTCN-3 modules as an alternative data type and value syntax. The present document defines the
capabilities required in addition of those specified in ETSI 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.ETSI ES 201 873-1 [1] specifies the core capabilities of the TTCN-3 language. Other language mappings (see [i.27],
[i.28] and [i.29]) and TTCN-3 language packages as ETSI ES 202 781 [i.20], ETSI ES 202 782 [i.21], ETSI
ES 202 784 [i.22], ETSI ES 202 785 [i.23], ETSI ES 202 786 [i.24], ETSI ES 202 789 [i.25] may specify extensions to
the core language that may define additional rules for the ASN.1 to TTCN-3 mapping. These additional rules are
specified in the relevant other documents and need to be supported only if the implementation claims to support the
other document.Core language format
TTCN-3
Core
ASN.1 Types
Language
& Values
XSD Graphical
definitions format
TTCN-3 User
The shaded boxes are not
Other Types Presentation
& Values format defined in this document
n n
Figure 1: User's view of the core language and the various presentation formats
5 General
5.1 Approach
TTCN-3 provides a clean interface for using ASN.1 definitions (as specified in Recommendations ITU-T X.680 [2],
X.681 [3], X.682 [4] and X.683 [5]) in TTCN-3 modules.In general, there are two approaches to the integration of other languages with TTCN-3, which will be referred to as
implicit and explicit mapping. The implicit mapping makes use of the import mechanism of TTCN-3, denoted by the
keywords language and import, in whic...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.