Adding Printers to a System

In addition to the keyboard and the screen, you define other devices for use by your DP4 application. As a minimum, if you wish to print from your application, you need to define a printer. All the information about the devices on a system is stored on the system database. Once you have defined the printers and devices used in your system, your application programs simply select the device that is to be used.

In DP4, an output device is defined in two parts:

In the same way, you can access other devices such as a non standard display devices like customer and operator displays, scientific apparatus, bar code readers and magnetic stripe readers in your application. For some devices, you may need to provide a Device Interface (known as an OSDI). An OSDI consists of specialised code written in C. The DP4 OSDI pack ensures that device specific code is independent of your application programs. Your program can access an output device by name, and send the output in exactly the same way as if the device is a printer. Input devices are also specified by name, and the input is presented to the application in the same way as input from the keyboard.