viVSScanf

Agilent VISA.NET

viVSScanf

Syntax

viVSScanf(ViSession vi, ViBuf buf, ViString readFmt, ViVAList params);

Description

This function reads, converts, and formats data using the format specifier and then stores the formatted data in params. This operation is similar to viVScanf, except data are read from a user-specified buffer rather than a device.

Parameters

Name

Dir

Type

Description

vi

IN

ViSession

Unique logical identifier to a session.

buf

IN

ViBuf

Buffer from which data are read and formatted.

readFmt

IN

ViString

The format string to apply to parameters in ViVAList.

params

OUT

ViVAList

A list with the variable number of parameters into which data are read and the format string is applied.

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

Data were successfully read and formatted into arg parameter(s).

Error Codes

Description

VI_ERROR_ALLOC

The system could not allocate a formatted I/O buffer because of insufficient resources.

VI_ERROR_INV_FMT

A format specifier in the readFmt string is invalid.

VI_ERROR_INV_SESSION
VI_ERROR_INV_OBJECT

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

VI_ERROR_NSUP_FMT

A format specifier in the readFmt string is not supported.

VI_ERROR_RSRC_LOCKED

Specified operation could not be performed because the resource identified by vi has been locked for this kind of access.

See Also

viSScanf, viVScanf