Table of Contents

Name

rmt_GetCtlReadValues - get current value from dbman

Description

rmt_GetCtlReadValues requests the current value of the parameter specified by the CONFLIST array member.

rmt_GetCtlReadValues traverses the CONFLIST array looking for a Group, Func and Index match. If a match is found the information from the CONFLIST record is used to formulate a query to dbman for the current value of the parameter. The request is posted to dbman and rmt_GetCtlReadValues waits for an answer and places the answer in the CONFLIST record’s Current field.

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

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 rmtReqParAns(3rmt) is called an error message is written to stderr.

This function communicates with dbman in remote mode.

This function is part of libmngr.

Syntax

int rmt_GetCtlReadValues (
   int s,

   CONFLIST CFpnt[],

   int Size,

   int Group,

   int Func,

   int Index

   );

Arguments

s

database channel

CFpnt

The pointer to the start of the CONFLIST array

Size

the size of the CONFLIST array.

Group, Func, Index

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

Return Value

If there is a match when the CONFLIST array is searched then the AccelNET error code from rmtReqParAns(3rmt) is returned.

If there is no match 0 is returned.

Notes

Returning 0 for no match is strange....
CONFLIST.Previous isn’t updated by the function, also a bit strange....

See Also

libmngr(3mngr)

Manual page revision

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


Table of Contents