viSScanf

NI-VISA

viSScanf

Purpose

Reads, converts, and formats data from a user-specified buffer using the format specifier. Stores the formatted data in the parameters (designated by ...).

C Syntax

ViStatus viSScanf(ViSession vi, ViBuf buf, ViString readFmt, ...)

Visual Basic Syntax

N/A

Resource Classes

GPIB INSTR, GPIB INTFC, GPIB-VXI INSTR, Serial INSTR, TCPIP INSTR, TCPIP SOCKET, VXI INSTR, VXI SERVANT

Parameters

Name Direction Description

vi

IN

Unique logical identifier to a session.

buf

IN

Buffer from which data is read and formatted.

readFmt

IN

String describing the format for arguments.

...

OUT

Parameters into which the data is read and the format string is applied.

Return Values

Completion Codes Description

VI_SUCCESS

Data was successfully read and formatted into ... parameter(s).

 

Error Codes Description

VI_ERROR_INV_OBJECT

The given session reference is invalid.

VI_ERROR_RSRC_LOCKED

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

VI_ERROR_INV_FMT

A format specifier in the readFmt string is invalid.

VI_ERROR_NSUP_FMT

A format specifier in the readFmt string is not supported.

VI_ERROR_ALLOC

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

Description

The viSScanf() operation is similar to viScanf(), except that the data is read from a user-specified buffer rather than from a device.

Related Topics

INSTR Resource

INTFC Resource

SERVANT Resource

SOCKET Resource

viScanf

viSPrintf

viVScanf

viVSScanf