14

SUN/134.3

Starlink Project
Starlink User Note 134.3

B D Kelly1
A J Chipperfield

30 March 1992

Copyright © 2000 Council for the Central Laboratory of the Research Councils


ADAM
Guide to Writing Instrumentation Tasks

Programmer’s Manual



Abstract

This guide shows you how to write programs for use as part of instrumentation systems under ADAM Version 2. If you are a programmer experienced with ADAM Version 1, then refer to Appendix C which summarises some of the differences between the new ADAM tasking model and the old one.

Contents

1 Introduction
2 A simple picture of a task
3 Waiting for a command
4 Carrying out a simple command
5 A task with two actions
6 Completion of a timed interval
7 Completion of data input
8 Kicking one action from another
9 Receipt of messages from other tasks
10 Cancelling actions
11 Behaviour of the parameter system
12 Compiling and linking
13 Further reading
A Making tea and coffee
 A.1 Making tea
 A.2 Making coffee
 A.3 Controlling tea and coffee making
B Cancelling in multi-task subsystems
 B.1 Controlling task
 B.2 Controlled task
C For “old” programmers
 C.1 Introduction to the changes
 C.2 Linking old-style tasks
 C.3 NEEDS list checking
 C.4 DTASK_RPON and DTASK_RPOFF
 C.5 DTASK_ASTSIGNAL and DTASK_TSTINTFLG
 C.6 TASK_ASTMSG ( NAME, LENGTH, VALUE, STATUS )
 C.7 Multiple calls to TASK_ASTSIGNAL, TASK_ASTMSG
 C.8 AST enabling and disabling
 C.9 Message reschedules
 C.10 Timeout on AST and message reschedules
 C.11 Closing down the Parameter system – Global associations
D List of TASK routines
E REQUEST constants
F Important STATUS values
G Document changes

1Royal Observatory Edinburgh