pi40iv_GetPath

ViStatus pi40iv_GetPath (ViSession instrumentHandle, ViChar _VI_FAR channel1[], ViChar _VI_FAR channel2[], ViInt32 bufferSize, ViChar _VI_FAR path[]);

Purpose

In some cases there is more than one possible path between two channels. The driver or the instrument selects the path when you connect two channels with the pi40iv_Connect function. Thus, you cannot guarantee that every call to the pi40iv_Connect function establishes exactly the same path when you pass the same channels. This function returns a string that uniquely identifies the path you create with the pi40iv_Connect function. You can pass this string to the pi40iv_SetPath function to establish the exact same path in the future.
Note:
(1) This function returns only those paths that you explicitly
create by calling pi40iv_Connect and pi40iv_SetPath
functions. For example, if you connect channels CH1 and CH3,
and then channels CH2 and CH3, the explicit path between
channels CH1 and Ch2 does not exist and this function
returns an error.

Parameters

Input
Name Type Description
instrumentHandle ViSession

The ViSession handle that you obtain from the pi40iv_init or pi40iv_InitWithOptions function.  The handle identifies a particular instrument session.
Default Value:  None

channel1 ViChar[]

You identify a path with two channels. Pass one of the channel names for which you want to obtain a path. Pass the other channel name as the Channel 2 parameter.
Valid Channel Names:  x1,x2,y1,y2
Default Value:  ""

channel2 ViChar[]

You identify a path with two channels. Pass one of the channel names for which you want to obtain a path. Pass the other channel name as the Channel 1 parameter.
Valid Channel Names:  x1,x2,y1,y2
Default Value:  ""

bufferSize ViInt32

Pass the number of bytes in the ViChar array you specify for the Path List parameter.
If the current value of the attribute, including the terminating NUL byte, contains more bytes that you indicate in this parameter, the function copies Buffer Size - 1 bytes into the buffer, places an ASCII NUL byte at the end of the buffer, and returns the buffer size you must pass to get the entire value.  For example, if the value is "R1->C1" and the Buffer Size is 4, the function places "R1-" into the buffer and returns 7.
If you pass 0, you can pass VI_NULL for the Path parameter. This enables you to find out the path size and to allocate the buffer of the appropriate size before calling this function again.

Output
Name Type Description
path ViChar[]

The comma-separated path between channels you specify in the Channel 1 and Channel 2 parameters.

Return Value

Name Type Description
statusOrRequiredSize ViStatus

Returns the status code of this operation.  The status code  either indicates success or describes an error or warning condition.  You examine the status code from each call to an instrument driver function to determine if an error occurred.
If the current value of the return buffer, including the terminating NUL byte, is larger than the size you indicate in the Buffer Size parameter, the function copies Buffer Size - 1 bytes into the buffer, places an ASCII NUL byte at the end of the buffer, and returns the buffer size you must pass to get the entire value.  For example, if the value is "123456" and the Buffer Size is 4, the function places "123" into the buffer and returns 7.
To obtain a text description of the status code, call the pi40iv_error_message function.  To obtain additional information about the error condition, call the pi40iv_GetErrorInfo function.  To clear the error information from the driver, call the pi40iv_ClearErrorInfo function.
The general meaning of the status code is as follows:
Value                  Meaning
-------------------------------
0                      Success
Positive Values        Warnings
Negative Values        Errors
This driver defines the following status codes:
Status    Description
-------------------------------------------------
WARNINGS:
/*=CHANGE:===================================================*
Insert Instrument-defined warning codes here.
*================================================END=CHANGE=*/
ERRORS:
/*=CHANGE:===================================================*
Insert Instrument-defined error codes here.
*================================================END=CHANGE=*/
This instrument driver also returns errors and warnings defined by other sources.  The following table defines the ranges of additional status codes that this driver can return.  The table lists the different include files that contain the defined constants for the particular status codes:
Numeric Range (in Hex)   Status Code Types
-------------------------------------------------
3FFA2000 to 3FFA3FFF     IviSwtch Warnings
3FFA0000 to 3FFA1FFF     IVI      Warnings
3FFF0000 to 3FFFFFFF     VISA     Warnings
3FFC0000 to 3FFCFFFF     VXIPnP   Driver Warnings
BFFA2000 to BFFA3FFF     IviSwtch Errors
BFFA0000 to BFFA1FFF     IVI      Errors
BFFF0000 to BFFFFFFF     VISA     Errors
BFFC0000 to BFFCFFFF     VXIPnP   Driver Errors

References

Paths
Route
Pickering Interfaces PXI/LXI IVI Switch
Alphabetical Function Index
Hierarchical Function Index