Programmer Guide > Creating an OPI Option > wave_assign_list
  

wave_assign_list
Creates a new PV-WAVE LIST variable containing PV-WAVE variables passed in an array of WVH.
C Usage
long wave_assign_list( list_wvh, wvh_array, n_wvh)
WVH list_wvh
WVH *wvh_array
int n_wvh
Input Parameters
list_wvh—The PV-WAVE variable handle for the LIST to create.
wvh_array—The address of an array of the PV-WAVE variable handles to place in the new LIST.
n_wvh—The number of PV-WAVE variables to add to the new LIST.
Returned Status
OPI_SUCCESS—Successful assignment occurred.
OPI_FAILUREwave_assign_list considers the arguments to be invalid or inconsistent.
OPI_DO_NOT_PROCEED—Catastrophic errors occurred and execution should not continue. The calling C-code should do its cleaning up (free malloc’s space, free handles, and so forth) and return to its caller immediately.
Discussion
A PV-WAVE LIST variable is a container for multiple PV-WAVE variables. Like a standard array, the elements of a LIST can be accessed via their index, unlike a standard array, the elements in a LIST do not need to be of the same PV-WAVE data type.
The wave_assign_list routine creates a new list whenever it is called. If an existing list is passed in as the list_wvh parameter, it is replaced by a new list containing the variables in the wvh_array parameter. If you wish to modify an existing list you should use the wvh_list_replace and wvh_list_append routines.
The wvh_array passed in to wave_assign_list must contain handles for PV-WAVE variables that already exist in your PV-WAVE session, either retrieved by your routine or created by your C routine using the standard wave_assign_* routines.
wave_assign_list currently supports only the C language interface.
For more information and example usage, see the example OPI in the wave/demo/interapp/opilist-1_0 directory.
For more general information about creating PV-WAVE variables in your C routine, see the documentation for the wave_assign_* routines.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.