CONTENTS Title Page Copyright Page Preface Part I Getting Started 1 Overview 1.1 What Is the User-Defined Library? 1.2 Example Icon Files in the Development Kit 2 Concepts 2.1 Overview 2.2 A Software Perspective of Tasks Performed by Users 2.3 A Note on Terminology 2.4 Data Connections Within Icons 2.4.1 Data Connection Flags 2.4.2 Connection Data Types 2.4.3 Data Buffer Allocation 2.4.4 Requirements Array 2.4.5 Dependency Array 2.4.6 Using C Macros to Define Data Connections 2.5 Signal Ports 2.6 Setup Dialog Box and Subdialog Boxes 2.6.1 Constructing a Setup Dialog Box 2.6.2 Accessing Values in the Setup Dialog Box 2.7 Object-Specific Structure for an Icon 2.7.1 Starting and Running Flags 2.7.2 Pointers Needed for Data Structures 2.7.3 Vector Table Part II Developing a New Icon 3 Steps 3.1 Naming an Icon 3.2 List of Tasks to Create an Icon 4 Editing the Main Module Include File 5 Modifying the Modifications File 5.1 Copying the Modifications File 5.2 Declaring Constants 5.3 Declaring Routines 5.4 Declaring Strings 5.5 Declaring Data Connections 5.6 Declaring Requirements Arrays 5.6.1 Initializing Elements in the Requirements Array 5.6.2 Linking a Path Head to the Data Source Dialog Box 5.6.3 Initializing the Requirements Array at Run Time 5.7 Declaring Dependency Arrays 5.7.1 Initializing Elements in the Dependency Array 5.7.2 Initializing the Dependency Array at Run Time 5.8 Declaring Input and Output Signal Ports 5.8.1 Declaring Input Signal Ports 5.8.1.1 Adding a Custom Input Signal 5.8.2 Declaring Output Signal Ports 5.9 Declaring Icon-Specific Structures 5.10 Declaring the Setup Dialog Box 5.10.1 Declaring Setup Constants 5.10.2 Declaring Class Data 5.10.3 Initializing the Class Data 5.10.4 Declaring the Object Data 5.10.5 Initializing the Object Data 5.10.6 Declaring and Initializing Choice Boxes 5.10.6.1 Declaring Class Data for Choice Boxes 5.10.6.2 Initializing Class Data for Choice Boxes 5.10.6.3 Declaring Object Data for Choice Boxes 5.10.6.4 Initializing Object Data for Choice Boxes 5.10.7 Initializing Pointers to the Choice Box and Subdialog Box Data 5.11 Declaring Subdialog Boxes 6 Customizing Routines in the Main Module File 6.1 Overview of an Icon's Routines 6.2 Requirements for the Main Module File 6.3 Pointers Used in the Routines 6.4 Returning Status of the Routines 6.5 Accessing and Setting Parameter Values in Dialog Boxes 6.6 Utility Routines 6.6.1 Checking Connection Lines to Icon Ports 6.6.2 Checking an Icon's Data Type 6.7 Custom Header Files 6.8 Descriptions of Routines ARM CHECK DATA DELETE EVENT INIT SETUP SHUTDOWN START STOP 7 Creating Bitmap Files for an Icon 8 Compiling and Linking an Icon in DEC RT Integrator 8.1 Compiling a New Icon 8.2 Linking an Icon Under ULTRIX 8.3 Linking an Icon Under VMS 9 Creating Help Text for an Icon 9.1 Writing Help Text 9.1.1 Requirements for Help for Your Icon 9.1.2 Example of Help Text for an Icon 9.2 Adding Help Text Under ULTRIX 9.3 Adding Help Text Under VMS Part III Reference Information 10 Macros Used in Developing an Icon MRLD_ALPHA_DESC MRLD_ALPHA_STATE MRLD_DECL_DEP_REQARR MRLD_DECL_REQARR MRLD_DEPBY_CONNS MRLD_DEPREQ MRLD_EVENT_TYPE MRLD_FILE_DESC MRLD_FILE_STATE MRLD_HDR_DESC MRLD_HDR_STATE MRLD_ICON_ERROR MRLD_INIT_DB_REQS MRLD_INIT_WD_CONN_STRUCT MRLD_INIT_WD_DEPREQ_ARRAY MRLD_INIT_WD_REQ_ARRAY MRLD_INT_DESC MRLD_INT_STATE MRLD_LABEL_DESC MRLD_LABEL_STATE MRLD_MDISC_DESC MRLD_MDISC_STATE MRLD_MULTIPLE_DISC_ELEM_DESC MRLD_MULTIPLE_DISC_ELEM_STATE MRLD_REAL_DESC MRLD_REAL_STATE MRLD_REQ MRLD_SET_ONE_WD_CONN MRLD_SIGNAL_TYPE MRLD_SINT_DESC MRLD_SINT_STATE MRLD_SMENU_DESC MRLD_SMENU_STATE MRLD_SREAL_DESC MRLD_SREAL_STATE MRLD_UDISC_DESC MRLD_UDISC_STATE MRLD_UNIQUE_DISC_ELEM_DESC MRLD_UNIQUE_DISC_ELEM_STATE MRLD_WINDOW_MFLAG MRLD_WINDOW_MVAL MRLD_WINDOW_VAL MRLD_WINDOW_VAL_S 11 Utility Routines mrld_ _data_in_is_conn mrld_ _data_out_is_conn mrld_ _event_is_conn mrld_ _get_input_data_con_type mrld_ _get_output_data_con_type mrld_ _rt_data_inproc_deq mrld_ _rt_data_unproc_deq mrld_ _rt_exec_disable_poll mrld_ _rt_exec_enable_poll mrld_ _rt_sig_send mrld_ _set_input_data_con_type mrld_ _set_output_data_con_type mrld_ _sig_is_conn Part IV Advanced Topics 12 Data Flow: How It Works 12.1 Data Queues 12.2 Example of Data Flow 13 Asynchronous Data Handling 13.1 Overview 13.2 Steps in Developing an Asynchronous Icon 13.3 Defining an Asynchronous Connection 13.4 Passing the Connection Pointer to the AST Routine 13.5 Returning Status for an AST Routine 13.6 Writing the AST Routine 14 Processing Data Buffers Outside the Data Routine 14.1 Unscheduling an Icon 14.2 Unscheduling an Individual Connection 14.2.1 Using the MRLD_SET_ONE_WD_CONN Macro 15 Using Polled Data Connections 15.1 Overview 15.2 Initiating Polling in an Icon 15.3 Using a Polling Routine 16 Changing Data Buffer Size Requirements Dynamically 16.1 Overview 16.2 Using the Requirements Array 16.3 Using the Dependency Array A Sample Code for Icons A.1 RS/1 Table Icon A.1.1 Connecting the RS/1 Table Icon A.1.2 Setting Up the RS/1 Table Icon A.1.3 Output of the RS/1 Table Icon A.2 SQL Icon A.2.1 Connecting the SQL Icon A.2.2 Setting Up the SQL Icon B Reserved Mnemonics for Icons EXAMPLES 9-1 Custom Help File to be Modified 9-2 Help Text for the Constant Icon 14-1 Processing Data Buffers in the Event Routine 15-1 Polling Routine FIGURES 1-1 User-Defined Icons 2-1 Data Source Dialog Box 2-2 Setup Dialog Box for Template Icon 2-3 Object-Specific Structure for an Icon 5-1 Template Icon: Data Flow View 5-2 Template Icon: Signal Flow View 5-3 Setup Dialog Box for Template Icon 5-4 Subdialog Box TABLES 2-1 Types of Fields in Setup Dialog Box 2-2 Macros Used to Create Fields in a Dialog Box 5-1 Symbols Used for Data Source Dialog Box Values 5-2 Data Connection Flags 5-3 Data Types and Sizes for Connections 6-1 Macros and Dialog Box Field Types 10-1 Routines Used with MRLD_REQ Macro B-1 Mnemonics Used for Icons