CONTENTS Title Page Copyright Page Preface 1 Overview of the DDIS Toolkit 1.1 Benefits of Using the DDIS Toolkit 1.1.1 Conformance to International Standards 1.1.2 Encodes and Decodes ASN.1 and DDIS Based Data Syntaxes 1.2 DDIS Toolkit Components 1.2.1 DDIS Compiler 1.2.2 Command Line Interface 1.2.3 DDIS Run-Time Library 1.2.4 DDIS Application 1.3 DDIS Toolkit Features 1.4 Steps in Using the DDIS Toolkit 1.5 Before you Begin 2 Creating DDIS Compiler Input 2.1 DDIS and ASN.1 Compatibility 2.2 Standard Notation 2.2.1 Character String 2.2.2 Hexadecimal String 2.2.3 Binary String 2.2.4 Identifier 2.2.5 Type Reference 2.2.6 Module Reference 2.2.7 Value Reference 2.2.8 Number 2.2.9 Fnumber 2.2.10 Empty String 2.2.11 Keywords 2.2.12 Reserved Characters 2.2.13 Comments 2.2.14 Module Definition 2.2.15 Module Identification 2.2.16 Type Definition 2.2.17 Value Definition 2.2.17.1 Macro Notation 2.2.17.2 Macro Definition 2.2.17.3 Macro Reference 2.2.17.4 Macro Alternative List 2.2.17.5 Macro Alternative 2.2.17.6 Production Reference 2.2.17.7 Local Type Reference 2.2.17.8 Local Value Reference 2.2.17.9 Additional Keyword Items 2.3 Guidelines for Using the Notation 2.3.1 Entry Level Type 2.3.2 Boolean Type 2.3.3 Integer Type 2.3.4 Bit String 2.3.5 Octet String Type 2.3.6 Null Type 2.3.7 Sequence Type 2.3.8 Set Type 2.3.9 Tagged Types 2.3.10 Choice Type 2.3.11 Selection Type 2.3.12 Any Type 2.3.13 External Type 2.3.14 Macro Type 3 Invoking the DDIS Compiler Using a Command Interface 3.1 Invoking the DDIS Compiler 3.2 Reviewing the DDIS Compiler Output 3.2.1 Syntax Table 3.2.1.1 Object Format Syntax Table 3.2.1.2 C Format Syntax Table 3.2.2 Definition File 3.2.2.1 SDL Format Definition File 3.2.2.2 C Format (.h) Definition File 3.2.3 Listing File 3.2.4 Error Messages 4 Building Your Application 4.1 Compiling Your C Format Syntax Table 4.1.1 Compiling Your C Format Syntax Table on VMS Systems 4.1.2 Reviewing Your C Compiler Output 4.2 Linking Your Object Format Syntax Table, Application Object File, and Run-Time Library Routines 4.2.1 VMS Link Command 4.3 Debugging Your Application 5 Using the DDIS Run-Time Library Routines 5.1 Overall Design 5.2 Order of Calls 5.3 Encoding Data 5.3.1 Encoding an Element 5.3.2 Encoding a Data Stream 5.4 Decoding Data 5.4.1 Decoding an Element 5.4.2 Decoding a Data Stream 5.5 Access to Data Streams 5.5.1 Random Access to a Data Stream 5.5.2 Subsequent Access to a Data Stream 5.5.3 Adding Your Grammar During Stream Processing 5.5.4 Processing Multiple Encodings in a Stream 5.6 Sample Calls to the DDIS Run-time Library 6 DDIS Run-Time Library Routines DDIS$ADD_SYNTAX_TABLE DDIS$CLOSE_STREAM DDIS$COPY_STREAM DDIS$CREATE_STREAM DDIS$FLUSH_STREAM DDIS$GET_DDIS_ENCODING DDIS$GET_INTEGER_LENGTH DDIS$GET_PARSE_LOCATION DDIS$GET_STREAM_POSITION DDIS$GET_TAG DDIS$GET_VALUE DDIS$OPEN_STREAM DDIS$PUT DDIS$PUT_DDIS_ENCODING DDIS$PUT_TAG DDIS$PUT_VALUE DDIS$REMOVE_SYNTAX_TABLE DDIS$SET_PARSE_LOCATION DDIS$SET_PATH DDIS$SKIP_TO_EOC A Examples B DDIS Compiler Error Messages EXAMPLES 2-1 ASN.1 Source Code 2-2 Module Definition Syntax Diagram 2-3 Module Identification Syntax Diagram 2-4 Type Assignment Syntax Diagram 2-5 ASN.1 Specific Types 2-6 DDIS Specific Types 2-7 Predefined Types and Value Syntax 2-8 Value Assignment Syntax Diagram 2-9 Sample Type and Value Assignment 2-10 Sample Macro Definition 2-11 Macro Reference 2-12 Macro Alternative List Syntax Diagram 2-13 Macro Alternative Syntax Diagram 2-14 Macro Definition Syntax Diagram 2-15 DEFAULT element 2-16 Sequence CHOICE 5-1 Encoding Library Call to DDIS$CREATE_STREAM 5-2 Encoding Library Call to DDIS$PUT 5-3 Encoding Library Call to DDIS$CLOSE_STREAM 5-4 Encoding Library Call to DDIS$OPEN_STREAM 5-5 Encoding Library Call to DDIS$GET_TAG 5-6 Encoding Library Call to DDIS$GET_VALUE FIGURES 1-1 DDIS Toolkit Components 1-2 Developing an Application with the DDIS Toolkit 3-1 C Format Syntax Table 3-2 SDL Format Definition File 3-3 C Format Definition File TABLES 2-1 Production Symbol Classes 2-2 Keywords Reserved to ASN.1 2-3 Keywords Reserved by DDIS 2-4 Reserved Characters 3-1 VMS /STANDARD Qualifier Options