Chapter 2. ICL 21
Man Pages
This section contains the Man Page descriptions for the six ICL scripting functions included in the PVCAM
library. These functions are intended for use by application programmers only.
PVCAM Class 101: ICL pl_exp_display_script(101)
NAME pl_exp_display_script – lists the display rectangles.
SYNOPSIS boolean
pl_exp_display_script(int16 hcam, icl_disp_ptr
user_disp_array, void_ptr pixel_stream)
DESCRIPTION This function can only be called after pl_exp_setup_script. It further
processes the script that was loaded during pl_exp_setup_script. Users
must pass in a structure that has at least num_rects elements (num_rects is passed
back from pl_exp_setup_script). This function then fills that structure with
the x and y sizes for every “display” rectangle, as well as that rectangle’s offset
into the pixel stream (which is why the allocated data collection pointer must be
passed in).
RETURN VALUE TRUE for success, FALSE for a failure. Failure sets pl_error_code.
SEE ALSO pl_exp_setup_script(101)
NOTES The script_disp_ptr is defined in pv_icl.h:
typedef struct { /* ONE IMAGE “DISPLAY” FOR SCRIPTING */
uns16 x; /* image width to display, in pixels */
uns16 y; /* image height to display, in pixels */
void_ptr disp_addr; /* starting address for this image */
} icl_disp_type,
PV_PTR_DECL icl_disp_ptr;
The list of rectangles is unrolled from inside the looping constructs, so users are
presented with a simple linear list. disp_addr is the starting address for the
data for this rectangle (based on the fact that all the data is put into the address
pixel_stream
. In other words: the address of the first rectangle is exactly
pixel_stream
. If that rectangle was a 10x10 display, the (starting) address of
the second rectangle would be
pixel_stream
+ 200 (bytes).
Separate rectangle lists are kept for each
hcam
, so multiple cameras (and
multiple users) do not collide. This reports on the state following the most recent
call to pl_exp_setup_script( ) using this value of
hcam
. A new call resets
the list. This function can be called after data collection has finished, provided
that a new call to pl_exp_setup_script( ) is not made in the mean time.
This function does not actually display data. It only provides display
parameters.