NI Switch Executive

Table of Contents

niSE_Connect

  • Updated2023-02-21
  • 2 minute(s) read

Connects the routes specified by the connection specification. When connecting, it may allow for multiconnection based on the multiconnection mode.

Function Prototype

Function niSE_Connect( sessionHandle As NISESession,
connectSpec As String,
multiconnectMode As NISEMulticonnectMode,
waitForDebounce As NISEBoolean) As NISEStatus

Parameters

Input

NameTypeDescription
sessionHandle NISESession The session referencing this NI Switch Executive virtual device session.
connectSpec String The string describing the connections to be made. The route specification strings are best summarized as a series of routes delimited by ampersands. The specified routes can be route names, route group names, or fully specified route paths delimited by square brackets. Refer to Route Specification Strings for more information.
multiconnectMode NISEMulticonnectMode This value sets the connection mode for the function. The mode may be one of the following:
  • NISE_VAL_USE_DEFAULT_MODE (-1)—uses the mode selected as the default for the route in the NI Switch Executive virtual device configuration. If a mode has not been selected for the route in the NI Switch Executive virtual device, this parameter defaults to NISE_VAL_MULTICONNECT_ROUTES.
  • NISE_VAL_NO_MULTICONNECT (0)—routes specified in the connection specification must be disconnected before they can be reconnected. Calling Connect on a route that was connected using No Multiconnect mode results in an error condition.
  • NISE_VAL_MULTICONNECT_ROUTES (1)—routes specified in the connection specification can be connected multiple times. The first call to Connect performs the physical hardware connection. Successive calls to Connect increase a connection reference count. Similarly, calls to Disconnect decrease the reference count. When it reaches 0, the hardware is physically disconnected. Multiconnecting routes applies to entire routes and not to route segments.
waitForDebounce NISEBoolean Waits (if true) for switches to debounce between its connect and disconnect operations. If false, it immediately begins the second operation after completing the first. The order of connect and disconnect operation is set by the Operation Order input.

niSE_Connect Details

In the event of an error, the call to niSE_Connect attempts to undo any connections made so that the system is left in the same state that it was in before the call was made. Some errors can be caught before manipulating hardware, although it is feasible that a hardware call could fail causing some connections to be momentarily closed and then reopened.

If the wait for debounce parameter is set, the function does not return until the switch system has debounced.

Log in to get a better experience