Table of Contents

Name

MatchCtlReadValues - match values for two records in the CONFLIST database

Description

MatchCtlReadValues traverses the CONFLIST array and looks for two matches using FuncC and IndexC for one match and FuncR and IndexR for the other match.

The Group argument is used for both searches. This limits matching values to members of the same group.

If a match is found for both criteria, the CONFLIST record found by FuncR and IndexR is used to formulate a query to dbman for the current value of the parameter. The request is posted to dbman and MatchCtlReadValues waits for an answer and places the answer in the Current field of both CONFLIST records.

The CONFLIST specified by FuncC and IndexC is then updated by posting a requst to dbman.

lclReqParAns(3rmt) is used to communicate with dbman. lclReqParAns(3rmt) waits for an answer from dbman so MatchCtlReadValues should be used on a file descripter where nothing has been subscribed to.

lclParUpdate(3rmt) is used to post the update and CheckDBlimit(3db) is used to verify the validity of the transaction before it is posted.

Usually programs using this function will open two channels to dbman. One channel is used to post subscriptions and process data asyncronously from dbman as it arrives. The other channel is used with functions which will post requests to dbman for information and wait for the answer.

If there is an error when lclReqParAns(3rmt) is called an error message is written to stderr.

This function communicates with dbman in local mode.

This function is part of libmngr.

Syntax

int MatchCtlReadValues (
   int s,

   CONFLIST CFpnt[],

   int Size,

   int Group,

   int FuncC,

   int IndexC,

   int FuncR,

   int IndexR

   );

Arguments

s

database channel

CFpnt

The pointer to the start of the CONFLIST array

Size

the size of the CONFLIST array.

Group

The CONFLIST.Group to search for.

FuncC, IndexC

specify the CONFLIST element to search for and use for the transaction

FuncR, IndexR

specify the CONFLIST element to search for and use for the transaction

Return Value

If there is no match when the CONFLIST array is searched ERRnullp is returned and an error message is written to stderr.

If there is an error when lclReqParAns(3rmt) is called a complaint is written to stderr, the function terminates, and the AccelNET error code from lclReqParAns(3rmt) is returned. ERRlim is ignored, all other errors function as described.

If CheckDBlimit(3db) returns ERRok the value of the queried datapoint is used, else the value of the appropriate limit (PhyMin or PhyMax) is used.

Notes

Using Group in common is ok. It helps when writing a program using libmngr to organize parameters in the CONFLIST database in a logical way. Perhaps the arguments to this function help point the way to such organization.

CONFLIST.Previous isn’t updated by the function, this is a bit strange....

See Also

libmngr(3mngr)

Manual page revision

$Id: MatchCtlReadVals.3,v 1.1 2002/04/07 18:35:52 kitchen Exp $


Table of Contents