Initvxilibrary (), Setdevinfo (la, field, fieldvalue), Setdevinfolong (la, field, longvalue) – National Instruments NI-VXI User Manual

Page 42: Initvxilibrary -4 setdevinfo -4 setdevinfolong -4

Advertising
background image

Chapter 3 Software Overview

NI-VXI User Manual

3-4

© National Instruments Corporation

InitVXIlibrary ()

InitVXIlibrary

is the NI-VXI initialization routine. An application

must call

InitVXIlibrary

at application startup.

InitVXIlibrary

performs all necessary installation and initialization procedures to
make the NI-VXI interface functional. This includes copying all of the
RM device information into the data structures in the NI-VXI library.
This function configures all hardware interrupt sources (but leaves
them disabled) and installs the corresponding default handlers. It also
creates and initializes any other data structures required internally by
the NI-VXI interface. When your application completes (or is aborted),
it must call

CloseVXIlibrary

to free data structures and disable all

of the interrupt sources.

SetDevInfo (la, field, fieldvalue)

SetDevInfo

changes information about the specified device in the

NI-VXI RM table. The field parameter specifies the attribute of the
information to change. Possible fields include the device name,
Commander’s logical address, mainframe number, slot, manufacturer
ID number, manufacturer name, model code, model name, device
class, VXI address space/base/size allocated, VXI interrupt
lines/handlers allocated, protocols supported, and so on. A field value
of zero (0) specifies to change the specified entry with the supplied
structure containing all possible information about the specified device.
You should use this function only in very special situations, because it
updates information in the NI-VXI interface and can affect execution.
At the startup of your application,

InitVXIlibrary

completely

initializes the RM table according to how the RM configured the VXI
system. No initial changes are necessary for VXI devices.

SetDevInfoLong (la, field, longvalue)

SetDevInfoLong

changes information about the specified device in

the NI-VXI RM table. The field parameter specifies the attribute of the
information to change.

SetDevInfoLong

is a function layered on top

of

SetDevInfo

for languages (such as BASIC) that cannot typecast

the fieldvalues of

SetDevInfo

.

SetDevInfoLong

returns only the

fields of

SetDevInfo

that are 32-bit integers. Possible fields include

the VXI address base and size allocated to the device by the RM. You
should use this function only in very special situations, because it
updates information in the NI-VXI interface and can affect execution.
At the startup of your application,

InitVXIlibrary

completely

initializes the RM table to how the RM configured the VXI system. No
initial changes are necessary for VXI devices.

Advertising