Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Using External Code in LabVIEW.pdf
Скачиваний:
49
Добавлен:
29.05.2015
Размер:
1.85 Mб
Скачать

6

Function Descriptions

This chapter describes the CIN functions you can use with LabVIEW. You can use these functions to perform simple and complex operations. These functions, organized into libraries called managers, range from low-level byte manipulation to routines for sorting data and managing memory. All CIN manager routines are platform-independent, so you can create CINs that work on all platforms supported by LabVIEW.

Refer to the Manager Overview section in Chapter 4, Programming Issues for CINs, for general information about the manager routines.

Memory Manager Functions

The memory manager functions can dynamically allocate, manipulate, and release memory.

To perform the following operations, use the functions listed:

Handle and pointer verification:

AZCheckHandle/DSCheckHandle

AZCheckPtr/DSCheckPtr

Handles, allocating and releasing:

SetCINArraySize

NumericArrayResize

AZDispose Handle/DSDisposeHandle

AZGetHandleSize/DSGetHandleSize

AZNewHandle/DSNewHandle

AZNewHClr/DSNewHClr

AZRecoverHandle/DSRecoverHandle

AZSetHandleSize/DSSetHandleSize

AZSetHSzClr/DSSetHSzClr

Handles, manipulating properties:

AZHLock

AZHPurge

© National Instruments Corporation

6-1

Using External Code in LabVIEW

Chapter 6 Function Descriptions

AZHNoPurge

AZHUnlock

Memory utilities:

AZHandAndHand/DSHandAndHand

AZHandToHand/DSHandToHand

AZPtrAndHand/DSPtrAndHand

AZPtrToHand/DSPtrToHand

AZPtrToXHand/DSPtrToXHand

ClearMem

MoveBlock

SwapBlock

Memory zone utilities:

AZHeapCheck/DSHeapCheck

AZMaxMem/DSMaxMem

AZMemStats/DSMemStats

Pointers, allocating and releasing:

AZDisposePtr/DSDisposePtr

AZNewPClr/DSNewPClr

AZNewPtr/DSNewPtr

File Manager Functions

The file manager functions can create, open, and close files, write data to files, and read data from files. In addition, file manager routines can create directories, determine characteristics of files and directories, and copy files.

The file manager defines the Path data type for use in describing paths to files and directories. The data structure for the Path data type is private. Use file manager routines to create and manipulate the Path data type.

The file manager uses the int32 data type to describe permissions for files and directories. The manager uses only the least significant nine bits of the int32.

In UNIX, the nine bits of permissions correspond exactly to nine UNIX permission bits governing read, write, and execute permissions for user, group, and others. The following illustration shows permission bits in UNIX.

Using External Code in LabVIEW

6-2

www.ni.com

Chapter 6 Function Descriptions

In Windows, permissions are ignored for directories. For files, only bit 7 (the UNIX user write permission bit) is used. If this bit is clear, the file is read-only. Otherwise, you can write to the file.

In Macintosh, all nine bits are used for directories (folders). The bits which control read, write, and execute permissions, respectively, in UNIX are used to control See Files, Make Changes, and See Folders access rights, respectively, in Macintosh.

To perform the following operations, use the functions listed:

Current position mark, positioning:

FMSeek

FMTell

Default access rights information, getting:

FGetDefGroup

Directory contents, creating and determining:

FListDir

FNewDir

End-of-file mark, positioning:

FGetEOF

FSetEOF

File data to disk, flushing:

FFlush

File operations, performing basic:

FCreate

FCreateAlways

FMClose

FMOpen

© National Instruments Corporation

6-3

Using External Code in LabVIEW

Chapter 6 Function Descriptions

FMRead

FMWrite

File range, locking:

– FLockOrUnlockRange

File refnums, manipulating:

FDisposeRefNum

FlsARefNum

FNewRefNum

FRefNumToFD

FRefNumToPath

File, directory, and volume information determination:

FExists

FGetAccessRights

FGetInfo

FGetVolInfo

FSetAccessRights

FSetInfo

Filenames and patterns, matching:

FStrFitsPat

Files and directories, moving and deleting:

FMove

FRemove

Files, copying:

FCopy

Path type, determining:

FGetPathType

FlsAPathOfType

FSetPathType

Path, extracting information:

FDepth

FDirName

FName

FNamePtr

FVolName

Using External Code in LabVIEW

6-4

www.ni.com

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]