D List of TASK routines
The “action keyword” is the name by which a task’s action is known in the world outside that task.
The “action name” is the name by which the action is known to the application code inside that task.
These names are defined in the interface file. The action keyword defaults to the action name if it is not
otherwise specified.
There is a similar distinction between parameter keywords and parameter names.
ACTKEY=CHARACTER*(PAR__SZNAM) | action keyword |
ACTNAME=CHARACTER*(PAR__SZNAM) | action name |
CONTEXT=INTEGER | symbol for GET, SET, OBEY |
| or CANCEL |
CONTEXTNAME=CHARACTER*(*) | string for ’GET’, ’SET’ etc. |
DELAY=INTEGER | requested delay time in millisecond |
EVENT=INTEGER | received message status |
INVAL=CHARACTER*(MSG_VAL_LEN) | a received value string |
LENGTH=INTEGER | number of bytes in VALUE |
MAXVALS=INTEGER | maximum number of values |
MESSID=INTEGER | transaction number |
NAMECODE=INTEGER | parameter system code-number for the |
| action |
NVALS=INTEGER | actual number of values |
OUTVAL=CHARACTER*(MSG_VAL_LEN) | a sent value string |
PARKEY=CHARACTER*(PAR__SZNAM) | parameter keyword |
PATH=INTEGER | path identifier to another task |
REASON=INTEGER | symbol giving reason for reschedule |
REQUEST=INTEGER | symbol requesting reschedules |
RESULT=LOGICAL | .TRUE. implies an AST has occurred |
SEQ=INTEGER | sequence number |
STATUS=INTEGER | status |
STRINGS(*)=CHARACTER*(*) | array of character strings |
TASK_NAME=CHARACTER*(PAR__SZNAM) | name of another task |
TIMEOUT=INTEGER | timeout in milliseconds, -1 = infinite |
VALUE=CHARACTER*(MSG_VAL_LEN) | value string |
|
* Add to the list of active subsidiary actions for an action
CALL TASK_ADD_MESSINFO ( PATH, MESSID, STATUS )
Given : PATH, MESSID
Given and returned : STATUS
* Used in application AST routine to signal to main-line code
CALL TASK_ASTMSG ( ACTNAME, LENGTH, VALUE, STATUS )
Given : ACTNAME, LENGTH, VALUE
Given and returned : STATUS
* Used in application AST routine to signal to main-line code
CALL TASK_ASTSIGNAL ( ACTNAME, STATUS )
Given : ACTNAME
Given and returned : STATUS
* Request a task to cancel an action
CALL TASK_CANCEL ( TASK_NAME, ACTKEY, INVAL, OUTVAL, STATUS )
Given : TASK_NAME, ACTKEY, INVAL
Given and returned : STATUS
Returned : OUTVAL
* Concatenate an array of strings into an argument list
CALL TASK_CNCAT ( NVALS, STRINGS, VALUE, STATUS )
Given : NVALS, STRINGS
Given and returned : STATUS
Returned : VALUE
* Wait for final acknowledgement from task
CALL TASK_DONE ( TIMEOUT, PATH, MESSID, OUTVAL, STATUS )
Given : TIMEOUT, PATH, MESSID
Given and returned : STATUS (Returns the status associated with the final
acknowledgement message from the task.)
Returned : OUTVAL
* Get a parameter value from a task
CALL TASK_GET ( TASK_NAME, PARKEY, OUTVAL, STATUS )
Given : TASK_NAME, PARKEY
Given and returned : STATUS
Returned : OUTVAL
* Get current action context
CALL TASK_GET_CONTEXT ( CONTEXT, STATUS)
Given and returned : STATUS
Returned : CONTEXT
* Get current action context name
CALL TASK_GET_CONTEXTNAME ( CONTEXTNAME, STATUS)
Given and returned : STATUS
Returned : CONTEXTNAME
* Get details of message which forced reschedule
CALL TASK_GET_MESSINFO ( PATH, CONTEXT, ACTKEY, VALUE, MESSID, EVENT, STATUS)
Given and returned STATUS
Returned : PATH, CONTEXT, ACTKEY, VALUE, MESSID, EVENT
* Get current action name
CALL TASK_GET_NAME ( ACTNAME, STATUS)
Given and returned : STATUS
Returned : ACTNAME
* Get parameter system code for current action name
CALL TASK_GET_NAMECODE ( NAMECODE, STATUS)
Given and returned : STATUS
Returned : NAMECODE
* Get reason for current reschedule
CALL TASK_GET_REASON ( REASON, STATUS )
Given and returned : STATUS
Returned : REASON
* Get current action sequence number
CALL TASK_GET_SEQ ( SEQ, STATUS)
Given and returned : STATUS
Returned : SEQ
* Get value string for current action
CALL TASK_GET_VALUE ( VALUE, STATUS )
Given and returned : STATUS
Returned : VALUE
* Signal another action to reschedule
CALL TASK_KICK ( ACTNAME, LENGTH, VALUE, STATUS )
Given : ACTNAME, LENGTH, VALUE
Given and returned : STATUS
* Send an OBEY to a task
CALL TASK_OBEY ( TASK_NAME, ACTKEY, INVAL, OUTVAL, PATH, MESSID, STATUS )
Given : TASK_NAME, ACTKEY, INVAL
Given and returned : STATUS (Returns the status associated with the initial
acknowledgement message from the task.)
Returned : OUTVAL, PATH, MESSID
* Set delay before next entry for current action
CALL TASK_PUT_DELAY ( DELAY, STATUS )
Given : DELAY
Given and returned : STATUS
* Request the action to be rescheduled on certain events
CALL TASK_PUT_REQUEST ( REQUEST, STATUS )
Given : REQUEST
Given and returned : STATUS
* Set current action sequence number
CALL TASK_PUT_SEQ ( SEQ, STATUS )
Given : SEQ
Given and returned : STATUS
* Set value string for current action
CALL TASK_PUT_VALUE ( VALUE, STATUS )
Given : VALUE
Given and returned : STATUS
* Set a parameter value in a task
CALL TASK_SET (TASK_NAME, PARKEY, INVAL, STATUS )
Given : TASK_NAME, PARKEY, INVAL
Given and returned : STATUS
* Split an argument list into an array of strings
CALL TASK_SPLIT ( VALUE, MAXVALS, NVALS, STRINGS, STATUS )
Given : VALUE, MAXVALS
Given and returned : STATUS
Returned : NVALS, STRINGS
* Return a triggering message to the controlling task
CALL TASK_TRIGGER ( ACTNAME, VALUE, STATUS )
Given : ACTNAME, VALUE
Given and returned : STATUS
* Test interrupt flag
CALL TASK_TSTINTFLG ( RESULT, STATUS )
Given and returned : STATUS
Returned : RESULT
The following generic string-handling routines are provided to help in building or interpreting VALUE strings. Each
TASK_xxxT
routine represents the set of calls TASK_xxxC, TASK_xxxD, TASK_xxxI, TASK_xxxL, and
TASK_xxxR.
NDIMS=INTEGER | number of dimensions |
DIMS(*)=INTEGER | sizes of dimensions |
NMAXDIMS=INTEGER | maximum number of dimensions |
MAXDIMS(*)=INTEGER | maximum sizes of dimensions |
STRING=CHARACTER*(*) | string being built or interpreted |
TVAL=TYPE | value being converted |
TVALS()=TYPE | array being converted |
STATUS=INTEGER | status |
|
* Decode a character string as a value
CALL TASK_DEC0<T> ( STRING, <T>VAL, STATUS )
Given : STRING
Given and returned : STATUS
Returned : <T>VAL
* Decode a character string as a vector
CALL TASK_DEC1<T> ( STRING, MAXVALS, NVALS, <T>VALS, STATUS )
Given : STRING, MAXVALS
Given and returned : STATUS
Returned : NVALS, <T>VALS
* Decode a character string as an array
CALL TASK_DECN<T> ( STRING, NMAXDIMS, MAXDIMS, NDIMS, DIMS, <T>VALS, STATUS )
Given : STRING, NMAXDIMS, MAXDIMS
Given and returned : STATUS
Returned : NDIMS, DIMS, <T>VALS
* Encode a value as a character string
CALL TASK_ENC0<T> ( <T>VAL, STRING, STATUS )
Given : <T>VAL
Given and returned : STATUS
Returned : STRING
* Encode a vector as a character string
CALL TASK_ENC1<T> ( NVALS, <T>VALS, STRING, STATUS )
Given : NVALS, <T>VALS
Given and returned : STATUS
Returned : STRING
* Encode an array as a character string
CALL TASK_ENCN<T> ( NDIMS, DIMS, <T>VALS, STRING, STATUS )
Given : NDIMS, DIMS, <T>VALS
Given and returned : STATUS
Returned : STRING
The following three generic routines are provided for compatibility with earlier ADAM releases. New
applications should use the TASK_ENC calls instead.
CALL TASK_VAL0<T> ( <T>VAL, STRING, STATUS )
CALL TASK_VAL1<T> ( NVALS, <T>VALS, STRING, STATUS )
CALL TASK_VALN<T> ( NDIMS, DIMS, <T>VALS, STRING, STATUS )
Copyright © 2000 Council for the Central Laboratory of the Research Councils