Читать книгу Mobile Communications Systems Development - Rajib Taid - Страница 105

4.1.5 ASN.1 Encoding/Decoding: UMTS, LTE, and 5G NR Layer 3 Protocol

Оглавление

The UMTS, LTE, and 5G NR air interface Layer 3 RRC protocol layer PDUs are described using the ASN.1 notation. Apart from these, the LTE/EPS S1‐AP, X2‐AP, 5G Core NG‐AP, Xn‐AP, and UMTS Radio Access Network Application Part (RANAP) protocol PDUs are also described using the ASN.1 notation. The ASN.1 describes the syntax of a message in an abstracted way as well as the method of encoding and decoding of message over a particular logical interface, e.g. air interface. ASN.1 notation is specified in ITU‐T Rec. X.691 [11].

 Message Description and Its Compilation

The abstract description of a protocol layer message using the ASN.1 method is similar to a C‐Language‐like structure having data fields and its lengths. An example of an ASN.1 definition of a protocol message is shown below:

L3ProtocolMessage:: = SEQUENCE{ Header :: =L3Header, Data :: =L3IEs, } L3Header:: =SEQUENCE{ Protocol-Discriminator::= BITS STRING (SIZE(4)), Skip-Indicator::= BITS STRING (SIZE(4)), } L3IEs ::= OCTET STRING(SIZE(255))

Consider that the C‐Language is being used to develop the concerned protocol layer containing the above protocol header. From the above description of the protocol message, an ASN.1 compiler may produce the target C‐Language source code/header file as illustrated below:

typedef struct { unsigned char Protocol-Discriminator:4; unsigned char Skip-Indicator:4; unsigned char L3IEs[255]; } L3ProtocolMessage

Further, the C‐Language compiler will compile the ASN.1‐generated C‐header files along with the other C‐source files to produce an encoding/decoding module.

 Encoding/Decoding Method

An ASN.1 description provides only the syntax of a message to be exchanged between two network elements. It does not define the actual method to be used for encoding and transfer of the concerned message. For encoding/decoding a signaling PDU or message and its transmission, the ASN.1 Packed Encoding Rule (PER) is used, which is specified in ITU‐T Rec. X.691 [11]. This is also known as the Message Transfer Syntax in the ASN.1 paradigm. The encoded bits stream generated by the ASN.1 PER can be of two types as mentioned below:

 Octet Unaligned, e.g. RRC layer protocol PDUs.

 Octet Aligned, e.g. UMTS RANAP messages; LTE/EPS S1‐AP and X2‐AP; 5G NG‐AP; and Xn‐AP messages.

For more information on the aligned and unlighted encoding PER, refer to ITU‐T Rec. X.691 [11]. There are additional protocol layer‐specific encoding rules that are to be followed during the development of the concerned protocol layer. For more information on these additional rules, refer to TS 25.331 [50], TS 36.331 [94], and TS 38.331 [116].

 How Does ASN.1 Notation Result in a Compact Encoding

It was described in Section 4.1.1 that the air interface Layer 3 messages are encoded and decoded on the octet (8 bits) level in TLV format. Depending on the IE type, it may be required to encode the type/IEI (T), length (L), and value (V) of an IE in a message. The overall length of the encoded message becomes larger. However, in the ASN.1 method,

 The type/IEI is never encoded and transmitted, and

 Encoding the length and value is also optional if both sender and receiver already know it.

Because of these encoding rules, the size of the encoded message becomes compact in comparison to the TLV method encoding described above.

As an example, consider an IE with a value = 5 to be encoded and transmitted in TLV format as well as using PER. An illustration is shown in Figure 4.7. Type (T), Length (L), and Value (V) each have a length of 1 octet.

From Figure 4.7, it is observed that the PER encoding method results only in 3 bits of the IE's value to be transmitted, in comparison to 24 bits in its TLV encoding format. This is because in the PER method, the Type is never used, and Length may not be used during encoding of an IE.

Example 4.4 mentions typical LTE and 5G NR RRC layer signaling messages which are defined using the ASN.1 format described above.

Mobile Communications Systems Development

Подняться наверх