MSGQ_locateAsync
2-252
C Interface
Syntax
status = MSGQ_locateAsync(queueName, replyQueue, locateAsyncAttrs);
Parameters
String
queueName; /* Name of message queue to locate */
MSGQ_Queue replyQueue;
/* Msgq to send locate message */
MSGQ_LocateAsyncAttrs *locateAsyncAttrs;
/* Locate attributes */
Return Value
Int
status;
/* status */
Reentrant
yes
Description
MSGQ_locateAsync firsts searches the local message queues for a
name match. If one is found, an asynchronous locate message is sent to
the specified message queue (in the replyQueue parameter). If it is not,
all transports are asked to start an asynchronous locate search. After all
transports have been asked to start the search, the API returns.
If a transport locates the message queue, an asynchronous locate
message is sent to the specified replyQueue. If no transport can locate
the message queue, no message is sent.
This function is performed by a writer. The reader must have already
called MSGQ_open for this queueName. An asynchronous locate can be
performed from a SWI or TSK. It cannot be performed in main().
The message ID for an asynchronous locate message is:
/* Asynchronous locate message ID */
#define MSGQ_ASYNCLOCATEMSGID 0xFF00
The MSGQ_LocateAsyncAttrs structure has the following fields:
typedef struct MSGQ_LocateAsyncAttrs {
Uint16 poolId;
Arg arg;
} MSGQ_LocateAttrs;
The default attributes are as follows:
MSGQ_LocateAsyncAttrs MSGQ_LOCATEASYNCATTRS = {0, 0};
The locate message is allocated from the allocator specified by the
locateAsyncAttrs->poolId field.
The locateAsyncAttrs->arg value is included in the asynchronous locate
message. This field allows you to correlate requests with the responses.
MSGQ_locateAsync
Asynchronously find a message queue