National Instruments NI-VXI User Manual

Page 82

Advertising
background image

Chapter 3 Software Overview

NI-VXI User Manual

3-44

© National Instruments Corporation

specifies which types of signals are handled by signal handlers, and
which are queued onto the global signal queue for each VXI logical
address. A separate handler can be installed for each VXI logical
address present (refer to the description for

SetSignalHandler

). A

default handler,

DefaultSignalHandler

, is automatically installed

when

InitVXIlibrary

is called from the application for every VXI

logical address. If signals are queued, the application can use the

SignalDeq

function to selectively return a signal off a global signal

queue by VXI logical address and/or type of signal.

Another method for handling signals (and VXI/VME interrupts routed
to signals) can be used instead of the two previous methods, and
involves using the

WaitForSignal

function.

WaitForSignal

can be

used to suspend a process/function until a particular signal (or one of a
set of signals) arrives. In a multitasking operating system, any number
of

WaitForSignal

calls can be pending. In a nonmultitasking

operating system, only one

WaitForSignal

call can be pending.

If the

RouteVXIint

has specified that a status/ID value should be

handled by the VXI/VME interrupt handler and not by the signal
handler, the specified callback handler is invoked. The VXI/VME
interrupt handler for a particular level is called with the VXI interrupt
level and the status/ID without any interpretation of the status/ID value.
The callback handler can do whatever is necessary with the status/ID
value. The

SetVXIintHandler

function can be called to change the

current callback handler for a particular level. A default handler,

DefaultVXIintHandler

is automatically installed with a call to

InitVXIlibrary

at the start of the application.

EnableVXIint

and

DisableVXIint

are used to sensitize and desensitize the application

to VXI/VME interrupts routed to the VXI/VME interrupt handlers.

EnableVXItoSignalInt

and

DisableVXItoSignalInt

are used to

sensitize and desensitize the application to VXI/VME interrupts routed
to be processed as VXI signals.

When you are testing VXI/VME interrupt handlers or creating a
message-based interrupter, you must assert a VXI/VMEbus interrupt
line and present a valid status/ID value. The

AssertVXIint

function

asserts an interrupt on the local CPU or on the specified extended
controller.

DeAssertVXIint

can be used to unassert a VXI/VME

interrupt that was asserted using the

AssertVXIint

function.

AcknowledgeVXIint

can be used to acknowledge VXI/VME

interrupts that the local CPU is not enabled to automatically handle
via

EnableVXIint

or

EnableVXItoSignalInt

. Both

Advertising