Admin Production ni-theme
Current Publication

CNVGetConnectionAttribute

LabWindows/CVI

CNVGetConnectionAttribute

int CNVGetConnectionAttribute (void *handle, CNVConnectionAttribute attribute, void *value);

Purpose

Obtains the value of a connection attribute for subscriber, reader, writer, and other network variable connections.

Note Note  To avoid deadlocks, do not call this function in a network variable callback function.

Parameters

Input
Name Type Description
handle void * The handle that identifies the network variable connection.
attribute CNVConnectionAttribute The connection attribute value you want to obtain.
Output
Name Type Description
value void * The value of the specified connection attribute.

The data type for this parameter depends on the data type of the attribute you specify for the attribute parameter. Pass the address of a variable of the same data type of the attribute you pass to attribute.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. One indicates that a next item was found, zero indicates that a next item was not found, and a negative number indicates that an error occurred.

You can call CNVGetErrorDescription to obtain a string that describes the error.

Additional Information

Library: Network Variable Library

Include file: cvinetv.h

LabWindows/CVI compatibility: LabWindows/CVI 8.1 and later

Examples

Refer to the following examples that use the CNVGetConnectionAttribute function:

  • apps\chess\chess.cws

    Open example
  • networkvariable\3DSim\NV3DSim.cws

    Open example
  • networkvariable\Buffering\NVBuffering.cws

    Open example
  • networkvariable\Quality\NVQuality.cws

    Open example