viTerminate

Agilent VISA.NET

viTerminate

Syntax

viTerminate(ViSession vi, ViUInt16 degree, ViJobId jobId);

Description

This function requests a VISA session to terminate normal execution of an operation, as specified by the jobId parameter. The jobId parameter is a unique value generated from each call to an asynchronous operation.

If a user passes VI_NULL as the jobId value to viTerminate, a VISA implementation should abort any calls in the current process executing on the specified vi. Any call that is terminated this way should return VI_ERROR_ABORT. Due to the nature of multi-threaded systems, for example where operations in other threads may complete normally before the operation viTerminate has any effect, the specified return value is not guaranteed.

Parameters

Name

Dir

Type

Description

vi

IN

ViSession

Unique logical identifier to an object.

degree

IN

ViUInt16

VI_NULL

jobId

IN

ViJobId

Specifies an operation identifier.

Return Values 

Type ViStatus

This is the function return status. It returns either a completion code or an error code as follows.

Completion Codes

Description

VI_SUCCESS

Request serviced successfully.

Error Codes

Description

VI_ERROR_INV_DEGREE

Invalid degree specified.

VI_ERROR_INV_JOB_ID

Invalid job identifier specified.

VI_ERROR_INV_SESSION
VI_ERROR_INV_OBJECT

The given session or object reference is invalid (both are the same value).

See Also

viReadAsync, viWriteAsync, viMoveAsync