Interrupt Service Procedures
K
A
DAK
59
Task Triggering
An Interrupt Handler can communicate with a task by invoking the task's execution.
When an interrupt occurs, the Interrupt Handler issues the ajtrig call to AMX
identifying the task which it wishes to have executed.
This technique can be very useful for handling slowly occurring events. For example, a
device generates an interrupt and the Interrupt Handler responds by acquiring a block of
data from the device. The data is stored in memory by the Interrupt Handler for
subsequent use by a task. The Interrupt Handler then starts the task with the ajtrig call.
It is assumed that timing is such that the task will be able to completely process the data
prior to the next occurrence of a similar event. This constraint is typical in many real-
time system implementations.
Message Transmission
An Interrupt Handler can also start a task and send it a message. For example, a control
panel might be used by an operator to initiate actions within a system. An interrupt is
generated when the operator depresses a pushbutton requesting a specific function. In
response to the interrupt, the Interrupt Handler reads a command register at the control
panel to determine the action to be taken. Data, such as set-point settings, would also be
read by the Interrupt Handler.
The Interrupt Handler interprets the command, determines the task in the system
responsible for performing the requested function, and issues an ajsend call to AMX
requesting execution of that task. The data retrieved from the control panel is transmitted
to that task as parameters in the message.
Chapter 3.9 provides a complete description of the parameter passing process.