About SICL Functions

Session Identifiers

SICL uses session identifiers to refer to specific SICL sessions. The iopen function will create a SICL session and return a session identifier to you. A session identifier is needed for most SICL functions. For the C and C++ languages, SICL defines the variable type INST. C and C++ programs should declare session identifiers to be of type INST. For example:

INST id;

Visual Basic programs should declare session identifiers to be of type Integer. For example:

DIM id As Integer

Device, Interface, and Commander Sessions

Some SICL functions are supported on device sessions, some on interface sessions, some on commander sessions, and some on all three. The listing for each function in the help indicates which sessions support that function.

Functions Affected by Locks

In addition, some functions are affected by locks (refer to the ilock function). This means that if the device or interface that the session refers to is locked by another process, this function will block and wait for the device or interface to be unlocked before it will succeed, or it will return immediately with the error I_ERR_LOCKED. Refer to the isetlockwait function.

Functions Affected by Timeouts

Likewise, some functions are affected by timeouts (refer to the itimeout function). This means that if the device or interface that the session refers to is currently busy, this function will wait for the amount of time specified by itimeout to succeed. If it cannot, it will return the error I_ERR_TIMEOUT.

Per-Process Functions

Functions that do not support sessions and are not affected by ilock or itimeout are per-process functions. The SICL function ionerror is an example of this. The function installs an error handler for the process. As such, it handles errors for all sessions in the process regardless of the type of session.