viSScanf

Agilent VISA.NET

viSScanf

Syntax

viSScanf(ViSession vi, ViBuf buf, ViString readFmt, arg1, arg2, ...);

Description

This operation receives data from a user-specified buffer, formats it by using the format string, and stores the data in the arg parameter list. The format string can have format specifier sequences, white space characters, and ordinary characters. This function is the same as viScanf, except data are read from a user-specified buffer instead of 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.

arg1, arg2

OUT

N/A

 

A list with the variable number of parameters into which the 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 system 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

viScanf