Create

When the session is created, the database, cluster, and frame properties are committed to the interface. For this configuration to succeed, the interface must be in the Stopped state. There is one exception: You can create a Frame Stream Input session while the interface is communicating.

When your application calls nxCreateSession, the session is created. To ensure that all sessions for the interface are created prior to start, you typically place all calls to nxCreateSession in sequence prior to the first use of the appropriate nxRead or nxWrite function (for example, prior to the main loop).

Clear

When the session is cleared, it is stopped (no longer communicates), and then all its resources are removed. This clears the session explicitly. To change the properties of database objects that a session uses, you may need to call nxdbSetProperty to change those properties, then recreate the session.

Set Session Property

While the session is Stopped, you can change properties specific to this session. You can set any XNET Session Properties except those in the Interface category (refer to Stopped in Interface States ).

You cannot set properties of a session in the Started or Communicating state. If there is an exception for a specific property, the property help states this.

Start Session

For an input session, you can start the session simply by calling the appropriate nxRead function. To read received frames, the appropriate nxRead function performs an automatic Start of scope Normal, which starts the session and interface.

For an output session, if you leave the Auto Start? property at its default value of true, you can start the session simply by calling the appropriate nxWrite function. The auto-start feature of the appropriate nxWrite function performs a Start of scope Normal, which starts the session and interface.

To start the session prior to calling the appropriate nxRead or nxWrite function, you can call nxStart. The nxStart default scope is Normal, which starts the session and interface. You also can use nxStart with scope of Session Only (this Start Session transition) or Interface Only (the interface Start Interface transition).

Stop Session

You can stop the session by calling nxStop. nxStopprovides the same scope as nxStart, allowing you to stop the session, interface, or both (normal scope).

When the session stops, the underlying queues are not flushed. For example, if an input session receives frames, and then you call nxStop, you still can call the appropriate nxRead function to read the frame values from the queues. To discard session frame queues, call nxFlush.

Interface Communicating

This transition occurs when the session interface enters the Communicating state.

Interface Not Communicating

This transition occurs when the session interface exits the Communicating state.

The session also exits its Communicating state when the session stops due to nxStop.