next up previous 68
Next: CANCEL
Up: OBEY and CANCEL Context
Previous: OBEY and CANCEL Context

OBEY

The new action is added to the active list and the list of subsidiary tasks for it is cleared. AMS_REPLY() is called with message status DTASK__ACTSTART to send an initial acknowledgement of the OBEY message .

If that fails the action and/or transaction are closed (DTASK_ACTSHUT() or DTASK_COMSHUT()); if it is OK, DTASK_OBEY() is called.

DTASK_OBEY() calls DTASK_APPLIC() with context OBEY and that in turn calls the user's top-level routine.

On return from DTASK_APPLIC() if STATUS is not SAI__OK, the message status, MESSTATUS, for the final acknowledgement message is set to the bad status value; if STATUS is SAI__OK, the REQUEST returned from the application is checked (DTASK_ACT_SCHED()) to see whether the action is to be terminated or is to be rescheduled. If the user's code has not changed it, the REQUEST will be ACT__END.

If a reschedule is requested, DTASK_ACT_SCHED() will set it up; otherwise the action is ended and the communications transaction closed by sending a reply to the task which initiated the OBEY. MESSTATUS for the reply depends on the STATUS and REQUEST returned from DTASK_APPLIC().

If a reschedule was not requested, MESSTATUS will depend upon the value of REQUEST as follows:

REQUEST MESSTATUS
ACT__END DTASK__ACTCOMPLETE
ACT__UNIMP DTASK__UNIMP
ACT__INFORM DTASK__ACTINFORM
SAI__OK DTASK__IVACTSTAT
DTASK__SYSNORM DTASK__IVACTSTAT
ACT__CANCEL DTASK__IVACTSTAT
Other REQUEST
Error messages may also be reported.



next up previous 68
Next: CANCEL
Up: OBEY and CANCEL Context
Previous: OBEY and CANCEL Context

ADAM The Control Subsystem
Starlink System Note 77
A.J. Chipperfield
16 August 2001
E-mail:ussc@star.rl.ac.uk

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