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

Chapter 6 Function Descriptions

SetALong

Macro

void SetALong(p,x);

Purpose

Stores an int32 at the address specified by a void pointer. In SPARCstation, this function can retrieve an int32 at any address, even if it is not long word aligned.

Parameters

Name

Type

Description

 

 

 

 

 

 

p

void *

Address at which you want to store an

 

 

int32. Refer to the Pointers as Parameters

 

 

section in Chapter 3, CINs, for more

 

 

information about using this parameter.

 

 

 

x

int32

Value you want to store at the specified

 

 

address.

 

 

 

Using External Code in LabVIEW

6-162

www.ni.com

Chapter 6 Function Descriptions

SetCINArraySize

MgErr SetCINArraySize (Uhandle dataH, int32 paramNum, int32 newNumElmts)

Purpose

Resizes a data handle based on the data structure of an argument that you pass to the CIN. This function does not set the array dimension field.

Parameters

Name

Type

Description

 

 

 

 

 

 

dataH

UHandle

Handle you want to resize.

 

 

 

paramNum

int32

Number for this parameter in the argument

 

 

list to the CIN.

 

 

 

newNumElmts

int32

New number of elements to which the handle

 

 

refers.

 

 

 

Return Value

mgErr, which can contain the following errors:

NoErr

No error.

MFullErr

Not enough memory to perform the operation.

mZoneErr

Handle or pointer not in specified zone.

© National Instruments Corporation

6-163

Using External Code in LabVIEW

Chapter 6 Function Descriptions

StrCat

int32 StrCat(s1, s2);

Purpose

Concatenates a C string, s2, to the end of another C string, s1, returning the result in s1. This function assumes s1 is large enough to contain the resulting string.

Parameters

Name

Type

Description

 

 

 

 

 

 

s1

CStr

Pointer to a C string.

 

 

 

s2

CStr

Pointer to a C string.

 

 

 

Return Value

The length of the resulting string.

Using External Code in LabVIEW

6-164

www.ni.com

Chapter 6 Function Descriptions

StrCmp

int32 StrCmp(s1, s2);

Purpose

Lexically compares two strings to determine whether one is less than, equal to, or greater than the other.

Parameters

Name

Type

Description

 

 

 

 

 

 

s1

CStr

Pointer to a C string.

 

 

 

s2

CStr

Pointer to a C string.

 

 

 

Return Value

<0, 0, or >0 if s1 is less than, equal to, or greater than s2, respectively. Returns <0 if s1 is an initial substring of s2.

© National Instruments Corporation

6-165

Using External Code in LabVIEW

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