Invocation
(void)ams_getreply( timeout, path, messid, message_name_s,
message_value_s, message_status, message_context, message_name,
message_length, message_value, status )
Arguments
timeout = int (given)
timeout time in milliseconds
path = int (given)
pointer to the
path
messid = int (given)
message number of incoming message
message_name_s = int (given)
maximum space for name (bytes)
message_value_s = int (given)
maximum space for value (bytes)
message_status = int * (returned)
message status
message_context = int * (returned)
message context
message_name = char *
(returned)
message name
message_length = int * (returned)
length of value
message_value = char * (returned)
message value
status = int * (given and returned)
global status
Description:
The application has sent a message on path ’path’ as part of transaction ’messid’ and
wishes to obtain the reply within ’timeout’ milliseconds. A timeout value of MESSYS__INFINITE
indicates no time limit.
Any received message is unpacked appropriately and the contents returned to the calling routine.
Only those arguments relevant to the particular message type will be returned.
Note that the received message may be a TIMEOUT message as a result of the timer being set.
Implementation
The function first checks the transaction (messid) is legally identified and that there
exists an acknowledge queue for that transaction.
If ’timeout’ is not MESSYS__INFINITE, it then sets the timer clock going so that we get a timeout if
there is no response within timeout milliseconds. The ATIMER package is used to handle
timers.
The function then looks for a message on either the external interrupt queue, the transaction
acknowledge queue or the timeout queue.
Copyright © 2000 Council for the Central Laboratory of the Research Councils