2 The Communication Subsystems

These libraries provide the system which is currently used to construct programs capable of communicating with each other using the ADAM message protocol. Messages can control the actions of programs or convey information.

SG/4 describes the simple use of the system (which is usually all that is needed for data analysis programs) whilst SUN/134 describes more complicated use in instrumentation control systems.

MSP
This library provides an inter-program communication system based upon a system of message ‘queues’.
SOCK
This library provides a Unix-socket-based message transport system for the MSP system.
AMS
This library implements the ADAM message protocol on top of MSP. AMS is written in C but a Fortran interface, FAMS, is provided. SUN/241 is the programmers manul for AMS.
DTASK
This provides an application program structure which allows the program to be run directly from the shell or to respond to a specified set of control messages from other programs using the ADAM message protocol. The application may consist of multiple ‘actions’ which can be controlled separately. DTASK provides the main routine of the program and applications are written as subroutines which are called by the DTASK layer after the communication and parameter systems have been initialised. This is described for system programmers in SSN/77 The package also includes shell scripts to link such applications with PCS and the other Starlink subroutine libraries required.
TASK
This library provides an interface between the application code and the DTASK layer so that an application can find out some information about its own status. It also enables programs to control other co-operating programs using the ADAM message protocol and includes subroutines for encoding and decoding data values in messages. For more details, see SUN/134.
ATIMER
This library provides a system of millisecond interval timers used by the message system and DTASK. Each timer has an associated handler which is invoked when the timer expires. The library is written in C but a Fortran interface, FATIMER, is provided.