EasyManua.ls Logo

LI-COR LI-6400 - Opens Hooks

LI-COR LI-6400
846 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Customizing Open
OpenÕs Hooks
Using the LI-6400 26-7
OpenÕs Hooks
OPEN provides extended control to users via a series of hooks. What is a
hook? Suppose that you want the LI-6400 to print a CO
2
value to the RS-232
port (or any other task) every 1 second while in New Measurements mode.
Happily, there are some things that OPEN has to do every second, and so
there is a function that is called with that frequency. Happier still, you can
substitute your own function for it. This ability to substitute at strategic points
is what hooks provide.
There are two approaches to take to make use of a hook.
1 Add a function with a ÒspecialÓ name to a ComputeList.
The safest way to take advantage of OPENÕs hooks is put one or more
:include fileName
directive(s) into your ComputeList file that will link module(s) containing
functions to do the activities that you want. The names of these functions are
very important, and Table 26-5 lists the required name along with what the
default actions are.
Before a ComputeList is processed, all of these hooks are reset to default val-
ues (thatÕs what makes this safe). Once a ComputeList is implemented,
OPEN looks for functions in the ComputeList module whose names match
the hook names. Each one found is substituted for the default function.
2 Direct pointer manipulation
A second method of using these hooks is to manipulate the hook directly, by
reassigning the pointer associated with the hook. The relevant pointer names
are also shown in Table 26-5.

Table of Contents