Series 3700 System Switch/Multimeter Reference Manual
makegetter
Remarks
Also see
Example
makesetter
Function
Usage
Remarks
Also see
Example
Document Number: 3700S-901-01 Rev. A / August 2007
This function creates a function that when called returns the value of the attribute.
This function is useful for aliasing attributes to improve execution speed. Calling
the getter function will execute faster than accessing the attribute directly.
Creating a getter function is only useful if it is going to be called several times.
Otherwise the overhead of creating the getter function outweighs the overhead of
accessing the attribute directly.
makesetter
(on page 9-131)
To create a getter function called getrange:
getrange = makegetter(dmm, "range")
...
r = getrange()
NOTE When getrange is called, it returns the value of dmm.range.
Creates a function to set the value of an attribute.
setter = makesetter(table, attributename)
table: Read-only table were the attribute is located.
attributename: The string name of the attribute.
setter: Function that sets the value of the given attribute.
This function creates a function that when called sets the value of the attribute. This
function is useful for aliasing attributes to improve execution speed. Calling the
setter function will execute faster than accessing the attribute directly.
Creating a setter function is only useful if it is going to be called several times.
Otherwise the overhead of creating the setter function outweighs the overhead of
accessing the attribute directly.
makegetter
(on page 9-130)
Use setrange to set the value of dmm.range for the currently selected function:
setrange = makesetter(dmm, "range")
setrange(5)
Section 9: Instrument Control Library (ICL)
9-131