result = GETPARAM(client_data, param_name, /Value)
result = GETPARAM(client_data, param_name, /Positional)
setParam
method on the client.) param_name
NOTE: The param_name parameter cannot be an array when either the Value or Positional keyword is specified.
ClientID
Default
ExpectType
ExpectType =
type_number
SIZE(val, /Type)
. This test fails if the returned parameter does not match the expected type. On failure, the MESSAGE procedure is called.
ExpectNumeric, ExpectString
These tests fail if the returned parameter does not match the expected type. On failure, the MESSAGE procedure is called.
ExpectArray
ExpectArray = [400, 600]
This test fails if the returned parameter is not of the specified dimensions. On failure, the MESSAGE procedure is called.
ExpectScalar
Keyword_Names
,
param_name=
param_ref "
result = GETPARAM(client_data, 'PARAM_NAME', $
Keyword_Name = 'PARAM_KEY')
" ,PARAM_KEY=
param_name_ref "
NOTE: The Keyword_Names keyword cannot be used when either the Value or Positional keyword is specified.
IgnoreUsed
Positional
,
param_ref "
SessionID
Value
WrapperName
Returning Single Values
result = GETPARAM(client_data, 'X', /Value, Default=FINDGEN(100))
X
(which was passed to the JWAVE wrapper from the client application) is stored in result
. The value can then be used in any PV-WAVE routine within the JWAVE wrapper. For example:
PLOT, result
NOTE: If the param_name parameter is not set by the client, then GETPARAM returns either zero (0) or the value specified with the Default keyword.
Returning Positional Parameters
p1 = GETPARAM(client_data, 'X', /Positional)
" , param_ref "
X
. Usually this value is a data reference or function call. The comma (,) is included in the string so you can concatenate strings of this form together to build a command. Such a command string, then, can be used as input to an EXECUTE function. For example:
status = EXECUTE('PLOT' + p1)
NOTE: If the param_name parameter to GETPARAM was not set by the client, GETPARAM returns an empty string.
Returning Keyword Parameters
title = GETPARAM(client_data, 'TITLE')
" , param_name=param_ref "
TITLE
) and param_ref is a symbolic reference to the value of the parameter. The comma (,) is included in the string so you can concatenate strings of this form together to build a command. Such command strings, then, can be used as input to an EXECUTE function. For example:
status = EXECUTE('PLOT' + p1 + title)
" , param_name_1=param_ref_1, param_name_2=param_ref_2, ... "
NOTE: If the param_name parameter to GETPARAM was not set by the client, GETPARAM returns an empty string.
Returning All Keyword Parameters
result = GETPARAM(client_data, /All)
",
param_name_1=param_ref1, param_name_2=param_ref2, ... "
where param_name_* are all parameters sent by the client, and param_ref* are symbolic references to the values of those parameters.
NOTE: Call GETPARAM with the All keyword after you have retrieved all of the positional and value parameters to ensure that you retrieve only the remaining keywords.
TIP: We suggest that you use a param_name array rather than All so that the client cannot accidently send invalid parameters to the JWAVE wrapper function.
Parameters Are Retrieved Once
Notes and Restrictions
temp_file = STRTRIM(getParam(client_data), /SessionID), 2) temp_file = FILEPATH(temp_file, /Tmp)