Table of Contents
setupINTparameter - process a setup parameter
setupINTparameter
examines to see if the
CONFLIST.Label and
CONFLIST.RefName fields are non
null.
If they are null the value of CONFLIST.Preset is checked to see if
it is greater than or equal to min and less than or equal to max. If the
value is in range it is returned else the value of default_value is returned.
If they are non null the CONFLIST.Label and CONLIST.DescPnt fields are checked
to make sure they are non null. If this is the case the current value of
the parameter is obtained from dbman and the parameter is subscribed to.
If the record is not found in the CONFLIST the value of default_value is
returned.
This function communicates with dbman in local mode.
This function
is part of libmngr.
double setupINTparameter(
int DBchan, int DBchan2,
CONFLIST *CF, int CFsize,
int Group,
int Function,
int Index,
double min,
double max,
double default_value,
void *user_data,
int subscribe_mode
);
the main database channel
Subscriptions etc. are posted
here.
the aux database channel
This channel is opened during the
setup phase of the program and possibly closed later.
It is used by this
function to obtain the current value of the parameter from the AccelNET
database.
There should be no subscriptions or write locks posted to it.
A pointer to the beginning of the
CONFLIST record array.
The
size (in records) of the
CONFLIST record array.
The group name of
the CONFLIST parameter to process.
The function name of the CONFLIST
parameter to process.
The index value of the CONFLIST parameter to
process.
The minimum legal value to be used from CONFLIST.Preset
The
maximum legal value to be used from CONFLIST.Preset
The value
to use if the CONFLIST record is not found, if the value supplied by by
CONFLIST.Preset is out of range, or in the case of any configuration error.
A pointer to any kind of data needed by the application.
CONFLIST.UserData
is assigned this pointer value.
If the value is zero the parameter
is subscribed to normally.
If the value is nonzero an indirect subscription is posted.
Check the
log to make sure parameters listed in the config table are valid.
GetCtlReadValues(3mngr)
is used by this function and will complain.
libmngr(3mngr)
$Id: setupINTpar.3,v 1.3 2005/01/13 13:34:36 kitchen Exp $
Table of Contents