Table Of Contents

Open Session (G Dataflow)

Last Modified: September 26, 2018

Creates and returns a session to a specified Switch Executive virtual device that is used in all subsequent Switch Executive calls. Opens communications with all of the IVI switches associated with the specified virtual device.

Programming Patterns

Each call to Open Session must be matched with a subsequent call to Close Session.

connector_pane_image
datatype_icon

virtual device name

Name to give to the Switch Executive virtual device. The name must be unique to the virtual device, no other Switch Executive virtual device can have the same name.

The following characters are not allowed in virtual device names: ; , & : ! ~ . < > [ ] / {space} {tab}

datatype_icon

option string

Initial values of certain session properties, like simulation or range checking, that can be used to pass information to each of the IVI switches.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

session out

Reference to your virtual device session to wire to the next node.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Management Behavior of Multiple Open Sessions

Switch Executive uses a reference counting scheme to manage open sessions to a Switch Executive virtual device.

Multiple calls to Open Session with the same virtual device name input always return the same session out output. Switch Executive disconnects its communication with the IVI switches only after all session out outputs are closed to a given virtual device. The session out outputs can be used in multiple threads of an application.

Sessions can only be opened to a given virtual device from a single process at a time.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics