Specifications
Chapter 4
Design and Architecture
This chapter describes the Input Abstraction Layer’s design and architecture. It connects the
requirements specification (Chapter 3) with the actual implementation discussed in Chapter 5.
Throughout this chapter, possible implementations are referenced and evaluated.
Section §4.1 discusses the generic event data flow which is common for all input events.
The section shows the present problem of unattended input interfaces and points out how this
problem can be solved by the Input Abstraction Layer. The remaining sections of this chapter
outline the Input Abstraction Layer’s structure and its components. Section §4.2 discusses
the daemon as core component of the Input Abstraction Layer. Section §4.3 and Section §4.4
describe the Input Abstraction Layer’s interfaces.
4.1 Event Data Flow
From an abstract point of view, all input events have a common data flow. In the first place,
the user has to press a button on an input device. This user action triggers a hardware event.
If a suitable driver for the input device is loaded, the input event gets processed. At this point,
the hardware event is merged into a software event. The driver makes this software event
accessible to applications either by providing or using a user space interface.
There are two critical paths in this scenario: first, if there is no driver for an input device,
its hardware event does not come through. No software event is triggered. Second, if there is
no user space process reading from the driver’s interface, the software events are dismissed.
Figure 4.1 shows the three possible ways for input events triggered by a user action. The
user space application (shown as “Application”) receives the input event if there is a driver for
the input device and if the application either is reading on the driver’s user space interface or
gets informed by an event handler (Figure 4.1a). If there is no driver available (Figure 4.1b)
or if the user space interface is unattended (Figure 4.1c) the application does not receive the
input event. For these two paths, the interruption of the data flow is indicated by the crosses
as shown in Figure 4.1a and Figure 4.1b.
All unattended interfaces can be made usable with the Input Abstraction Layer. In case of
missing drivers the Input Abstraction layer is futile. Figure 4.2 shows how the Input Abstrac-
tion Layer (“IAL”) fits into the common event data flow. While the Input Abstraction Layer
is reading input events from the input interfaces discussed in Chapter 2, other applications
can receive these events by reading a single interface provided by Input Abstraction Layer.
Applications which do not directly use the Input Abstraction Layer’s event interface can be
21










