Specifications
Chapter 5
Implementation
This chapter describes the implementation of the Input Abstraction Layer in detail. The actual
process of the implementation was preceded by a comprehensive code review of miscellaneous
open source projects. The review gave informative hints on how the Input Abstraction Layer’s
requirements could b e realized. Resulting from this, several parts of the Input Abstraction
Layer’s implementation are derived from the reviewed source code.
The mentioned path names of the source code discussed in this chapter are relative to
the root of the Input Abstraction Layer’s source tree (Appendix D, §D.2). The three main
components of the Input Abstraction Layer are termed “daemon”, “library” and “module”.
An overview of the components is outlined in Figure 5.1. It shows the three core components
and their static context. The daemon and the modules are both using functions provided
by the library. External libraries used by the components are not indicated. Common data
structures used by the daemon and the modules are part of the library. Among others, the
library implements functions used for the interprocess communication with other processes.
Input Abstraction Layer
IAL
Daemon
IAL
Library
IAL
Modules
Figure 5.1: Input Abstraction Layer Components
Firstly, common static data structures of the Input Abstraction Layer’s components are
discussed. Comparable to a physical engine, it is not possible to achieve a complete under-
standing of the inner op erations simply by observing the engine running. A static view of
the engine’s components and the environment it runs in is the prerequisite for examining
the order of events afterwards. Thus, knowing the data structures is essential for the un-
derstanding of the component’s functions and the dynamic cooperation of the components at
run time. All components are implemented in C. Functions of the GNU C Library (glibc,
http://www.gnu.org/software/libc/) are not discussed in detail. Other libraries used for
the implementation are referred and elaborated in detail where needed.
27