Labwindows/cvi, Type definitions, Input versus output parameters – National Instruments NI-VXI User Manual

Page 23: Labwindows/cvi -4

Advertising
background image

Chapter 2 Introduction to the NI-VXI Functions

NI-VXI User Manual

2-4

© National Instruments Corporation

LabWindows/CVI

You can use the functions described in this manual with
LabWindows/CVI. LabWindows/CVI is an integrated development
environment for building instrumentation applications using the
ANSI C programming language. You can use LabWindows/CVI with
Microsoft Windows on PC-compatible computers or with Solaris on
Sun SPARCstations. The source code you develop is portable across
either platform.

National Instruments offers VXI/VME development systems for these
two platforms that link the NI-VXI driver software into
LabWindows/CVI to control VXI instruments from either embedded
VXI/VME controllers or external computers equipped with a MXI
interface. All of the NI-VXI functions described in this manual are
completely compatible with LabWindows/CVI.

Type Definitions

The following data types are used for all parameters in the NI-VXI
functions and in the actual NI-VXI library function definitions. NI-VXI
uses this list of parameter types as an independent method for
specifying data type sizes among the various operating systems and
target CPUs of the NI-VXI software interface.

C/C++ Example:

typedef

char

INT8;

/* 8-bit signed integer

*/

typedef

unsigned char

UINT8;

/* 8-bit unsigned integer

*/

typedef

short

INT16;

/* 16-bit signed integer

*/

typedef

unsigned short

UINT16;

/* 16-bit unsigned integer */

typedef

long

INT32;

/* 32-bit signed integer

*/

typedef

unsigned long

UINT32;

/* 32-bit unsigned integer */

Input Versus Output Parameters

Because all C/C++ function calls pass function parameters by value
(not by reference), you must specify the address of the parameter when
the parameter is an output parameter. The C/C++ “

&

” operator

accomplishes this task.

For example:

ret = VXIinReg (la, reg, &value);

Advertising