User`s guide
Programming with VISA 3
Agilent VISA User’s Guide 29
VISA Attributes
Attributes are associated with resources or sessions. You can use
attributes to determine the state of a resource or session, or to set a
resource or session to a specified state.
For example, you can use the viGetAttribute function to read the state
of an attribute for a specified session, event context, or find list. There
are read only (RO) and read/write (RW) attributes. Use the
viSetAttribute function to modify the state of a read/write attribute for
a specified session, event context, or find list.
The pointer passed to viGetAttribute must point to the exact type
required for that attribute (ViUInt16, ViInt32, etc.). For example, when
reading an attribute state that returns a ViUInt16, declare a variable of
that type and use it for the returned data. If ViString is returned, allocate
an array and pass a pointer to that array for returned data.
Example: Reading a VISA Attribute This example reads the state
of the VI_ATTR_TERMCHAR_EN attribute and changes it if it is false.
ViBoolean state, newstate;
newstate=VI_TRUE;
viGetAttribute(vi, VI_ATTR_TERMCHAR_EN, &state);
if (state err !=VI_TRUE) viSetAttribute(vi,
VI_ATTR_TERMCHAR_EN, newstate);
Memory Access
(MEMACC)
Generic, GPIB-VXI,
VXI
Address space of a
memory-mapped bus such as
the VXIbus.
VXI Mainframe
Backplane
(BACKPLANE)
Generic, GPIB-VXI,
VXI (GPIB-VXI
BACKPLANE not
supported)
VXI-defined operations and
properties of each backplane
in a VXIbus system.
TCPIP Socket
(SOCKET)
Generic, TCPIP Operations and properties of
a raw network socket
connection using TCPIP.
Table 4 Resource Classes Supported by Agilent VISA (continued)