DAQmxSwitchFindPath

NI-DAQmx C Functions

DAQmxSwitchFindPath

int32 DAQmxSwitchFindPath (const char switchChannel1[], const char switchChannel2[], char path[], uInt32 pathBufferSize, int32 *pathStatus);

Purpose

Returns information about the path between switchChannel1 and switchChannel2. If the channels are connected, this function returns the path by which they are connected. If the channels are not connected, the function returns a path by which they could be connected, if one is available.

Parameters

Input
Name Type Description
switchChannel1 const char [] The first channel to connect.
switchChannel2 const char [] The second channel to connect.
pathBufferSize uInt32 The size of path. If you pass 0, this function returns the size of the buffer needed to allocate.
Output
Name Type Description
path char [] The existing path or an available path between switchChannel1 and switchChannel2. This path uses the same syntax as a connection or disconnection list. If you pass NULL, this function returns the size of the buffer needed to allocate.
pathStatus int32 * The status of the requested path. The following values can be returned:
Value Description
DAQmx_Val_PathStatus_Available path returns the available path between the channels.
DAQmx_Val_PathStatus_AlreadyExists The channels are already connected by path.
DAQmx_Val_PathStatus_Unsupported No path is available between the channels. You might need to reserve more channels for routing to create an available path.
DAQmx_Val_PathStatus_ChannelInUse Path between the two endpoints is not available because another connection is already using a channel needed for routing.
DAQmx_Val_PathStatus_SourceChannelConflict No path is available between the two channels because connecting the channels would directly or indirectly connect two source channels.
DAQmx_Val_PathStatus_ChannelReservedForRouting One of the endpoint channels is reserved for routing.

Return Value

Name Type Description
status int32 The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error.
For this function, if you pass NULL for the buffer or 0 for the buffer size, this function returns the number of bytes needed to allocate.