viPeek8, viPeek16, viPeek32, and viPeek64

Agilent VISA.NET

viPeek8, viPeek16, viPeek32, and viPeek64

Syntax

viPeek8(ViSession vi, ViAddr addr, ViPUInt8 val8);

viPeek16(ViSession vi, ViAddr addr, ViPUInt16 val16);

viPeek32(ViSession vi, ViAddr addr, ViPUInt32 val32);

viPeek64(ViSession vi, ViAddr addr, ViPUInt64 val64);  [VISA 4.0 and later]

Description

This function reads an 8-bit, 16-bit, 32-bit, or 64-bit value from the address location specified in addr. The address must be a valid memory address in the current process mapped by a previous viMapAddress call.

Note: ViAddr is defined as a void *. To do pointer arithmetic, you must cast this to an appropriate type (ViUInt8, ViUInt16, ViUInt32, or ViUInt64). Then, be sure the offset is correct for the type of pointer you are using. For example, (ViUInt8 *)addr + 4 points to the same location as (ViUInt16 *)addr + 2.

Parameters

Name

Dir

Type

Description

vi

IN

ViSession

Unique logical identifier to a session.

addr

IN

ViAddr

Specifies the source address to read the value.

val8, val16, val32, or val64

OUT

ViPUInt8, ViPUInt16, ViPUInt32,
ViPUInt64

Data read from bus (8 bits for viPeek8, 16 bits for viPeek16, 32 bits for viPeek32, and 64 bits for viPeek64).

Return Values

None

See Also

viPoke8, viPoke16, viPoke32viPoke64, viMapAddress, viIn8, viIn16, viIn32 and viIn64