Get a pointer to a system variable.
Syntax
void * Fct_Variable_Get(
char *name,
int *size=NULL,
unsigned short *type=NULL,
int (**update)(void)=NULL
) ;
Parameters
name
"name" is a pointer to a character string containing the name of the desired variable. Variable names are upper cases and start with "$"
size
If present, the "size" argument will get the number of elements in your variable if it is an array, or 1 otherwise.
type
If present, the "type" argument will get the type type of the variable. The supported types are:
The following modifiers can also be appended to the types:
The "type" of a variable can be an "or" of multiple values from the table. For example, is your variable is an array of unsigned shorts you use:
*type = VARIABLE_ARRAY | VARIABLE_UNSIGNED | VARIABLE_SHORT ;
update
"Update" is a pointer to an update function. When the variable is modified by an external source, this function is called. If changing the value of the variable change something in your module, you can use this function to make the appropriate changes.
Return value
This function return a pointer to the desired variable or NULL if it failed to locate the variable.
Remarks
FLOAT, DOUBLE and LONG variable are only available through the "Fct_Variable_Get" function.
Requirements
Header:
sliceO_include.hpp
Library:
sliceO_Structures.lib
Example
From the edit_image_fct.cpp file
See also