14

SUN/241.0

Starlink Project
Starlink User Note 241.0

B D Kelly (ROE)
A J Chipperfield (RAL)

16 August 2001

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


AMS
The Unix ADAM Message System

2.0

Programmer’s Manual



Abstract

The ADAM Message System (AMS) library, which implements the ADAM inter-task communications protocol under Unix, is described, along with its Fortran-callable interface (FAMS).

The description of AMS is distinguished from the current implementation which uses the Message System Primitives (MSP).

Contents

1 Introduction
2 Transactions
3 Task Initialisation
4 Task Exit
5 Opening Communications
6 Sending a Command
7 Getting Expected Replies
8 Receiving a Command
9 Sending Expected Replies
10 Sending Internal Messages
11 Implementation
 11.1 AMS Messages
 11.2 MSP, Sockets and Queues
 11.3 Communications Directory
 11.4 MSP Messages
A Example
B Function Descriptions
AMS_ASTINT – Send an ASTINT message to this task
AMS_ASTMSG – Send an ASTMSG to this task
AMS_EXTINT – Send an EXTINT message to this task
AMS_GETREPLY – Receive a message on a specified path, messid
AMS_INIT – Initialise ams and register an exit handler
AMS_INITEH – Initialise ams and optionally register an exit handler
AMS_KICK – Send a KICK message to this task.
AMS_PATH – Get a communications path to another task
AMS_PLOOKUP – Look up a taskname given a path to it
AMS_RECEIVE – Receive any incoming message
AMS_REPLY – Send a message on a given (path,messid)
AMS_RESMSG – Send a RESCHEDULE message to this task
AMS_SEND – Send a message on a given path