next up previous contents
Next: Abstracting the device Up: How to write Previous: The team

Understanding the device

The first step before writing a device server is to develop an understanding of the hardware to be programmed. The Equipment Responsible should have description of the hardware and its operating modes (manuals, spec sheets etc.). The Equipment Responsible must also provide written specifications of what the device server should do. The Device Server Programmer should demand an exact description of the registers, alarms, interlocks and any timing constraints which have to be kept.

It is often hard to get hold of this essential information. But the Device Server Programmer should not give up. In very difficult cases it might be necessary to apply pressure on the Equipment Responsible (by explaining the situation to his superior for example) to produce the relevant information (i.e. device description and specifications).

It is very important to have a good understanding of the device interfacing before starting designing a new class. Some of the classic interfaces encountered while writing device servers are -

The most efficient interface being the memory mapped ones of course. Serial lines and IEEE interfaces although very common are notorious for being laborious to program and inefficient in their use. Many devices do not require speed and one often finds serial line and IEEE interfaces for devices. Where possible however I advise programmers to use memory mapped interfaced devices instead.



Andy Goetz
Tue Jan 28 13:58:13 MET 1997