Synopsis
PDX_MSGT map_GetParameter(long option, MAP_MAPPING *mapping, PDX_MSGT param, void *value)
Purpose
Retrieve the value of a mapping parameter.
Description
If param was specified when mapping was enabled, the corresponding value will be returned in value. If the parameter was not specified, and the option @d MAP_USE_DEFAULT was not specfied no change will be made to value and MAP_NO_VALUE will be returned. If the option @d MAP_USE_DEFAULT is specified and no value is found, the default value for the parameter will be used.
When calling map_GetParameter from a mapping function, the mapping argument should be specified as info->mapping (where info is the MAP_INFO pointer passed to the mapping function).
The value argument specifies the address to store the value corresponding to param at. The type of variable at this address must match the type expected for param.
An example of loading the value specified for a parameter named ASYS_TOL (defined as being of type MAP_DOUBLE) would be:
.RS 3 MAP_INFO *info; double tol = default_tol;
map_GetParameter ( MAP_NOOPT, info->mapping, ASYS_TOL, &tol ); .RE
See map_intro for additional information on using mapping parameters.
Input
option
MAP_USE_DEFAULT
Use the default value for the parameter if not specified when the mapping is enabled.
mapping
Mapping to retrieve parameter for
param
Parameter to retrieve value for
Output
value
Value of parameter
Return
MAP_NO_VALUE if param was not specified in mapping
MAP error code
.fi