112
K
A
DAK
AMX Message Exchange Manager
The task's wait priority is not to be confused with the message queue priority. The
message queue priority determines the priority ordering of messages in the message
exchange when no task is waiting for a message. The task's wait priority determines the
order of tasks in the wait queue when more than one task is waiting for a message to
arrive at an empty message exchange.
The flexibility of a message exchange comes from the fact that any number of consumers
and producers can rendezvous at a message exchange without explicit knowledge of each
other. Each consumer and producer only needs to know which message exchange to use.
No consumer or producer owns the message exchange.
Constraints on the use of message exchanges are self-imposed by the system designer.
You determine which producers and consumers will use each of your message
exchanges. The only restriction imposed by the Message Exchange Manager is that only
tasks are allowed to wait for a message to arrive at an empty message exchange.
The AMX Message Exchange Manager provides the following message exchange
services:
ajmxcre AAMXCRE Create a message exchange
ajmxdel AAMXDEL Delete a message exchange
ajmxsnd AAMXSND Send a message to a message exchange
ajmxsndf
ajmxsndp
ajmxget AAMXGET Get a message from a message exchange (no wait)
ajmxwat AAMXWAT Wait for message to arrive at a message exchange
(optional timeout)
ajmxtag AAMXTAG Find exchange id of a message exchange with a specific tag
Your use of the Message Exchange Manager is optional. If you intend to use it you must
indicate so in your System Configuration Module. You must provide a hardware clock
and include the AMX timing facilities.
Message exchanges can be predefined in your System Configuration Module which is
processed by the Message Exchange Manager at startup. Message exchanges which are
predefined are automatically created by the Message Exchange Manager. The messa ge
exchange id assigned to each predefined message exchange is stored in a variable which
you must provide for that purpose.