Device definitions are held in the system database. You define them using the DP4 utility DFSETUP. Devices are always described in terms of a general Device Group. A Device Group maps to a real-world physical device. Such devices are defined in terms of lower-level input and output components. It is often the case that physical devices do consist of input and output components - a till is a typical example. The Device Group is therefore defined as owning one or more output devices (for example printers, customer displays, cash drawers) and one or more input devices (keyboard, scanner, magnetic stripe readers).
A more detailed description of all this can be found in Device Definition Hierarchy.