Chapter 17. Designing sensors

Table of Contents

17.1. Introduction
17.2. Sensor requirements and design dimensions
17.3. Designing a sensor using the XmlData sensor
17.4. The SimpleSensor: An example Java-based sensor tool
17.5. The SimpleSensor: Module Definition
17.6. The SimpleSensor: Unit testing
17.7. The SimpleSensor: Integration with HackyInstaller
17.8. The SimpleSensor: DocBook documentation
17.9. The SimpleSensor: Downloading the code
17.10. An example of a non-Java sensor
17.11. Sensors for servers

17.1. Introduction

This chapter provides an introduction to the art of sensor design and implementation. Hackystat sensors are typically small software "plugins" that gather data about the behavior and/or outputs of development environment tools and send them to the Hackystat server. The data is represented in terms of one or more "Sensor Data Types", which provide a structured way to represent different kinds of sensor data.

This chapter begins by overviewing the requirements and design dimensions for Hackystat sensors. It then illustrates the easiest and most common sensor development scenario: using an XSL stylesheet to make the XML data created by a tool available to the Hackystat XmlData sensor. Size tools, testing tools, and quality assurance tools typically have an XML output option and so make good candidates for this approach.

For other situations, such as monitoring the actions of a developer while using an editor, the XML data file approach is not appropriate. In these circumstances, a custom sensor with capabilities specific to the tool will be more effective. Several sections in this chapter are devoted to the incremental development of a sensor called "SimpleSensor", which details the design and implementation issues involved with custom sensors in Hackystat.

The chapter concludes with a discussion of issues that arise in more complicated sensor designs, including sensor design in non-Java languages, and sensors that are attached to servers.