APPENDIX III (to Recommendation Q.932) General description of component encoding rules III.1 General component structure Each data element within a component has the same structure. A data element consists of three fields, which always appear in the following order. The tag distinguishes one type from another and governs the interpretation of the contents. The length specifies the length of the contents. The contents is the substance of the data element, containing the primary information the data element is intended to convey. Figure III-1/Q.932 shows an overview of a component and a data element. a) Component b) Data element FIGURE III-1/Q.932 Structure of Component and data element Each field is coded using one or more octets. Octets are labelled as shown in Figure III-2/Q.932. The first octet is the first transmitted. Bits in an octet are labelled as shown in Figure III-3/Q.932, with bit 1 the least significant and the first transmitted. FIGURE III-2/Q.932 Octet labelling scheme FIGURE III-3/Q.932 Bit labelling scheme The contents of each data element is either one value (primitive) or one or more data elements (constructor), as shown in Figure III-4/Q.932. FIGURE III-4/Q.932 Types of contents III.2 Tag A data element is first interpreted according to its position within the syntax of the message. The tag distinguishes one data element from another and governs the interpretation of the contents. It is one or more octets in length. The tag is composed of "class", "form" and "tag code", as shown in Figure III-5/Q.932. * The Tag code may be extended to the following octet(s) as discussed in section III.2.3. FIGURE III-5/Q.932 Format of tag III.2.1 Tag class All tags use the two most significant bits (8 and 7) to indicate the tag class. These bits are coded as shown in Table III-1/Q.932. TABLE III-1/Q.932 Coding of tag class The universal class is used for tags that are exclusively standardized in Recommendation X.209 and are application independent types. Universal tags may be used anywhere a universal data element type is used. The universal class applies across all CCITT Recommendations, i.e., across Recommendation Q.932 facility information elements, CCITT Signalling System No. 7 ASEs, X.400 MHS, X.500 Directory Services, etc. The application-wide class is used for data elements that are standardized across all applications (ASEs) using CCITT Recommendation Q.932 facility procedures for supplementary services. The context-specific class is used for data elements that are specified within the context of the next higher construction and take into account the sequence of other data elements within the same construction. This class may be used for tags in a construction, and the tags may be re-used in any other construction. The private use class is reserved for data elements specific to a nation, a network or a private user. Such data elements are beyond the scope of Recommendation Q.932. The Tag codes of the application-wide class not assigned in Recommendation Q.932 are reserved for future use. III.2.2 Form of the data element Bit 6 is used to indicate whether the data element is "primitive" or "constructor", as shown in Table III-2/Q.932. A primitive element is one whose structure is atomic (i.e., one value only). A constructor element is one whose content is one or more data elements which may themselves be constructor elements. Both forms of elements are shown in Figure III-4/Q.932. TABLE III-2/Q.932 Coding of element form III.2.3 Tag code Bits 1 to 5 of the first octet of the tag plus any extension octets represent a tag code that distinguishes one element type from another of the same class. Tag codes in the range 00000 to 11110 (0 to 30 decimal) are provided in one octet. The extension mechanism is to code bits 1 to 5 of the first octet as 11111. Bit 8 of the following octet serves as an extension indication. If bit 8 of the extension octet is set to 0, then no further octets for this tag are used. If bit 8 is set to 1, the following octet is also used for extension of the tag code. The resultant tag consists of bits 1 to 7 of each extension octet with bit 7 of the first extension octet being most significant and bit 1 of the last extension octet being least significant. Tag code 31 is encoded as 0011111 in bits 7 to 1 of a single extension octet. Higher tag codes continue from this point using the minimum possible number of extension octets. Figure III-6/Q.932 shows the detailed format of the tag code. a) One octet format b) Extended format FIGURE III-6/Q.932 Format of the tag code III.3 Length of the contents The length of the contents is coded to indicate the number of octets in the contents. The length does not include the tag nor the length of the contents octets. The length of the contents uses the short, long or indefinite form. If the length is less than 128 octets, the short form is used. In the short form, bit 8 is coded 0, and the length is encoded as a binary number using bits 1 to 7. If the length of the contents is greater than 127 octets, then the long form of the length of the contents is used. The long form length is from 2 to 127 octets long. Bit 8 of the first octet is coded 1, and bits 1 to 7 of the first octet encode a number one less than the size of the length in octets as an unsigned binary number whose MSB and LSB are bits 7 and 1, respectively. The length itself is encoded as an unsigned binary number whose MSB and LSB are bit 8 of the second octet and bit 1 of the last octet, respectively. This binary number should be encoded in the fewest possible octets, with no leading octets having the value 0. The indefinite form is one octet long and may (but need not) be used in place of the short or long form, whenever the element is a constructor. It has the value 10000000. When this form is employed, a special end-of-contents (EOC) indicator terminates the contents. There is no notation for the end-of-contents indicator. Although considered part of the contents syntactically, the end-of-contents indicator has no semantic significance. The representation for the end-of-contents indicator is an element whose class is universal, whose form is primitive, whose identifier code has the value 0, and whose contents is unused and absent (see Table III-3/Q.932). TABLE III-3/Q.932 Representation for the end-of-contents indicator ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ EOC Length Contents ³ ³ 00 (hex) 00 (hex) Absent ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Figure III-7/Q.932 shows the formats of the length field described above. The maximum value that may be encoded is constrained by Q.931 information element size limitations. ÚÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ÚÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 0 ³ Length of contents ³ ³1³ (Length of field size)-1 ³ ³ ³MSB LSB³ ³ ³MSB LSB ³ ÀÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÃÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³MSB ÃÄÄÄÄÄÄÄÄÄÄ Length of contents ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ LSB ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ a) Short form b) Long form ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Constructor element tag ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ Length = 10000000 ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ Tag ³ ³ Length* ³ ³ Contents ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ . ³ ³ . ³ ³ ³ ³ . ³ ³ . ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ Tag ³ ³ Length* ³ ³ Contents ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ EOC tag = 00000000 ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ EOC length = 00000000 ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ c) Indefinite form * The length may take any of three forms: short, long and indefinite. FIGURE III-7/Q.932 Format of length field III.4 Contents The contents is the substance of the data element and contains the information the data element is intended to convey. Its length is variable, but always an integral number of octets. The contents is interpreted in a type-dependent manner, i.e., according to the tag value. Acronyms used in Recommendation Q.932 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Acronym ³ ³ ÃÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ´ Meaning ³ ³English ³ French ³ Spanish ³ ³ ÃÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ ³ ³ ³ ³ ³ APDU ³ ³ ³ Application Protocol Data Unit ³ ³ ³ ³ ³ ³ ³ ASN.1 ³ ³ ³ Abstract Syntax Notation One (see ³ ³ ³ ³ ³ Recommendations X.208/X.209) ³ ³ ³ ³ ³ ³ ³ CEI ³ ³ ³ Connection Endpoint Identifier (see ³ ³ ³ ³ ³ Recommendation Q.920) ³ ³ ³ ³ ³ ³ ³ CES ³ ³ ³ Connection Endpoint Suffix (see ³ ³ ³ ³ ³ Recommendation Q.920) ³ ³ ³ ³ ³ ³ ³ IA5 ³ ³ ³ International Alphabet No. 5 ³ ³ ³ ³ ³ ³ ³ ISDN ³ ³ ³ Integrated Services Digital Network ³ ³ ³ ³ ³ ³ ³ LSB ³ ³ ³ Least Significant Bit ³ ³ ³ ³ ³ ³ ³ MSB ³ ³ ³ Most Significant Bit ³ ³ ³ ³ ³ ³ ³ NT2 ³ ³ ³ Network Termination Type Two (see ³ ³ ³ ³ ³ Recommendation I.411) ³ ³ ³ ³ ³ ³ ³ ROSE ³ ³ ³ Remote Operations Service Element (see ³ ³ ³ ³ ³ Recommendations X.219/X.229) ³ ³ ³ ³ ³ ³ ³ SAPI ³ ³ ³ Service Access Point Identifier (see ³ ³ ³ ³ ³ Recommendation Q.920) ³ ³ ³ ³ ³ ³ ³ SPID ³ ³ ³ Service Profile Identifier ³ ³ ³ ³ ³ ³ ³ TEI ³ ³ ³ Terminal Endpoint Identifier (see ³ ³ ³ ³ ³ Recommendation Q.920) ³ ³ ³ ³ ³ ³ ³ TID ³ ³ ³ Terminal Identifier ³ ³ ³ ³ ³ ³ ³ USID ³ ³ ³ User Service Identifier ³ ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ REFERENCES [1] CCITT Recommendation I.430 - Basic user-network interface - Layer 1 specification. [2] CCITT Recommendation I.431 - Primary rate user-network interface - Layer 1 specification. [3] CCITT Recommendation Q.921 - ISDN user-network interface - Data link layer specification. [4] CCITT Recommendation Q.931 - ISDN user-network interface layer 3 specification for basic call control. [5] CCITT Recommendation Q.930 - ISDN user-network interface layer 3 specification. [6] CCITT Recommendation Q.920 - ISDN user-network interface data link layer - General aspects. [7] CCITT Recommendation X.208 - Specification of Abstract Syntax Notation One (ASN.1). [8] CCITT Recommendation X.209 - Specification of Basic Encoding Rules for Abstract Syntax Notation One (ASN.1). [9] CCITT Recommendation X.219 - Remote Operations: Model, Notation and Service Definition. [10] CCITT Recommendation X.229 - Remote operations: Protocol specification.