1 2 3 4 5 6 ASN 1

  • Slides: 22
Download presentation

목차 1. 2. 3. 4. 5. 6. 개요 ASN. 1 필요성 관련 규범 ASN.

목차 1. 2. 3. 4. 5. 6. 개요 ASN. 1 필요성 관련 규범 ASN. 1 문법 Basic Encoding Rule(BER) Q&A

관련 규범(1/2) • ISO 15784 : Intelligent transport systems (ITS) — Data exchange involving

관련 규범(1/2) • ISO 15784 : Intelligent transport systems (ITS) — Data exchange involving roadside modules communication – ISO 15784 -1 • General principles and documentation framework of application profiles – ISO 15784 -3 • Application profile-data exchange (AP-DATEX) • KS X ISO 14827 : 교통 정보 및 제어 시스템-ITS를 위한 센터 간 데이터 인터페이스 – KS X ISO 14827 -1 • 메시지 정의 요구사항. – KS X ISO 14827 -2 • DATEX-ASN

관련 규범 (2/2) ※ ITU 참고사항 (2009년 1월) : ITU-T ASN. 1 Standards Projects

관련 규범 (2/2) ※ ITU 참고사항 (2009년 1월) : ITU-T ASN. 1 Standards Projects Abstract Syntax Notation One X. 680 – Basic Notation X. 681 – Information Objects X. 682 – General Constraint Notation X. 683 – Parameterization X. 690 – Basic (BER), Cannoical(CER), and Distinguished (DER) Encoding Rules X. 691 – Packed Encoding Rules (PER) Latest X. 692 – Encoding Control Notation (ECN) X. 693 – XML Encoding Rules (XER)

ASN. 1 문법 (2/10) • Module – Type assignment – Value assignment • Built-in

ASN. 1 문법 (2/10) • Module – Type assignment – Value assignment • Built-in Types – Simple Type – Structured Type • Tagged

ASN. 1 문법 (3/10) • Module (x. 680 - 3. 6. 43) – One

ASN. 1 문법 (3/10) • Module (x. 680 - 3. 6. 43) – One or more instances of the use of the ASN. 1 notation for type, value set, information object class, information object, and information object set (as well as the parameterized variant of those), encapsulated using the ASN. 1 module notation • Module definition

ASN. 1 문법 (4/10) • 모듈 분석 Assignment lexical Item Object Identifier (X. 660)

ASN. 1 문법 (4/10) • 모듈 분석 Assignment lexical Item Object Identifier (X. 660) Module definition Format Type Assignment Module Body Comment (one line)

ASN. 1 문법 (5/10) • Assignment – Type – Example Inventory. List {1 2

ASN. 1 문법 (5/10) • Assignment – Type – Example Inventory. List {1 2 0 0 6 1} DEFINITIONS : : = BEGIN { Item. Id : : = SEQUENCE { partnumber IA 5 String, quantity INTEGER, wholesaleprice REAL, saleprice REAL } Store. Location : : = ENUMERATED { Baltimore (0), Philadelphia (1), Washington (2) } } END

ASN. 1 문법 (6/10) • Assignment – Value – Example gadget Item. Id :

ASN. 1 문법 (6/10) • Assignment – Value – Example gadget Item. Id : : = { partnumber quantity wholesaleprice } "7685 B 2", 73, 13. 50, 24. 95

ASN. 1 문법 (7/10) • Built-in Type – Simple type Simple Type Tag Typical

ASN. 1 문법 (7/10) • Built-in Type – Simple type Simple Type Tag Typical use BOOLEAN 1 Model logical, two-state variable values INTEGER 2 Model integer variable values BIT STRING 3 Model binary data of arbitrary length OCTET STRING 4 Model binary data whose length is a multiple of eight NULL 5 OBJECT IDENTIFIER Character Sting Type Tag Typical use Numeric. String 18 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and space Printable. String 19 Upper and lower case letters, digits, space, apostrophe, left/right parenthesis, plus sign, comma, hyphen, full stop, solidus, colon, equal sign, question mark Indicate effective absence of a sequence element Teletex. String (T 61 String) 20 The Teletex character set in CCITT's T 61, space, and delete 6 Name information objects Videotex. String 21 REAL 9 Model real variable values The Videotex character set in CCITT's T. 100 and T. 101, space, and delete ENUMERATE 10 Model values of variables with at least three states Visible. String (ISO 646 String) 26 Printing character sets of international ASCII, and space CHARACTER STRING * Models values that are strings of characters from a specified characterset IA 5 String 22 International Alphabet 5 (International ASCII) Graphic. String 25 All registered G sets, and space Graphic. String 27 All registered C and G sets, space and delete

ASN. 1 문법 (8/10) • Built-in Type – Structured type Structured Type Tag Typical

ASN. 1 문법 (8/10) • Built-in Type – Structured type Structured Type Tag Typical Use SEQUENCE 16 Models an ordered collection of variables of different type SEQUENCE OF 16 Models an ordered collection of variables of the same type SET 17 Model an unordered collection of variables of different types SET OF 17 Model an unordered collection of variables of the same type CHOICE * Specify a collection of distinct types from which to choose one type SELECTION * Select a component type from a specified CHOICE type ANY * Enable an application to specify the type Note: ANY is a deprecated ASN. 1 Structured Type. It has been replaced with X. 680 Open Type.

ASN. 1 문법 (9/10) • Tagged – Example a) seats SET { } b)

ASN. 1 문법 (9/10) • Tagged – Example a) seats SET { } b) seats SET { } c) seats SET { } maximum [APPLICATION 0] INTEGER, occupied [APPLICATION 1] INTEGER, vacant [APPLICATION 2] INTEGER maximum [APPLICATION 0] IMPLICIT INTEGER, occupied [APPLICATION 1] IMPLICIT INTEGER, vacant [APPLICATION 2] IMPLICIT INTEGER maximum [0] INTEGER, occupied [1] INTEGER, vacant [2] INTEGER

ASN. 1 문법 (10/10) • Lexical Items – Comment • a "comment" begins with

ASN. 1 문법 (10/10) • Lexical Items – Comment • a "comment" begins with a pair of adjacent hyphens, it shall end with the next pair of adjacent hyphens or at the end of the line. – Ex) // comment one line • a "comment" begins with "/*", it shall end with a corresponding "*/", whether this "*/" is on the same line or not. – Ex) /* comment with several lines */ – Range separator : “. . ” – Assignment lexical item : “: : =“ – bstring : 0, 1로 구성되며 끝에 ‘B를 붙인다. • Ex) ‘ 0100101’B – hstring : 0, 1, 2. . F로 구성되며 끝에 ‘H를 붙인다. • Ex) ‘AB 019’H

Basic Encoding Rule(BER) (1/5) • The encoding of a data value shall consist of

Basic Encoding Rule(BER) (1/5) • The encoding of a data value shall consist of four components which shall appear in the following order a) identifier octets b) length octets c) contents octets d) end-of-contents octets

Basic Encoding Rule(BER) (2/5) • Structure of an encoding Identifier octets Length octets Contents

Basic Encoding Rule(BER) (2/5) • Structure of an encoding Identifier octets Length octets Contents octets End-of-contents octets – end-of-contents은 반드시 존재해야 하는 것 은 아니다.

Basic Encoding Rule(BER) (3/5) • Identifier Octet • Length Octet – Short length •

Basic Encoding Rule(BER) (3/5) • Identifier Octet • Length Octet – Short length • the length octets shall consist of a single octet in which bit 8 is zero and bits 7 to 1 encode the number of octets in the contents octets (which may be zero), as an unsigned binary integer with bit 7 as the most significant bit. • L = 38 can be encoded as 001001102 – Long length • a) bit 8 shall be one; • b) bits 7 to 1 shall encode the number of subsequent octets in the length octets, as an unsigned binary integer with bit 7 as the most significant bit • c) the value 11112 shall not be used. – L = 201 can be encoded as: 100000012 110010012

Basic Encoding Rule(BER) (4/5) • Contents octets – The contents octets shall consist of

Basic Encoding Rule(BER) (4/5) • Contents octets – The contents octets shall consist of zero, one or more octets, and shall encode the data value as specified • End-of-contents octets – The end-of-contents octets shall be present if the length is encoded as specified

Basic Encoding Rule(BER) (5/5) • 예제 Seq : : = SEQUENCE { first INTEGER,

Basic Encoding Rule(BER) (5/5) • 예제 Seq : : = SEQUENCE { first INTEGER, second INTEGER } seq. Va 1 Seq : : = { 10, 20 } Tag Length SEQUENCE V의 길이* Value Tag Length Value INTEGER V의 길이 10 INTEGER V의 길이 20 SEQUENCE의 L 부분은 element 인 First와 Second의 길이 를 모두 나타낸다.

Q&A

Q&A