EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Finding all the PVs on an IOC
From: Tim Mooney <[email protected]>
To: Carl Schumann <[email protected]>
Cc: [email protected]
Date: Thu, 23 Oct 2008 15:51:54 -0500
Carl,  Query from where?  Others have mentioned dbl, which will give you
all the record names, though not the PV's that those records host.
From within an ioc, you can use dbStaticLib calls to get *everything*.
It's not all that much additional effort to get at least the record
names out to a CA client.  Here's some code I was playing around with to
add a function to the sCalcout record that would allow a CA client to
ask for record names.  This code could easily be adapted for use with,
say, the genSub (or asub) record, or as soft device support for, say,
the stringin record.


#include <dbStaticLib.h> /* for DBENTRY, etc. */ #include <dbAccess.h> /* for pdbbase */ void getRecordName(int recordNum, char *recordName) { DBENTRY dbentry; DBENTRY *pdbentry = &dbentry; int i, found; long tStatus, rStatus;

	recordName[0] = '\0';
	dbInitEntry(pdbbase,pdbentry);
	i = 0;
	found = 0;
	tStatus = dbFirstRecordType(pdbentry);
	while (tStatus == 0 && !found) {
		rStatus = dbFirstRecord(pdbentry);
		while (rStatus == 0 && !found) {
			if (i == recordNum) {
				found = 1;
				strcpy(recordName, dbGetRecordName(pdbentry));
			} else {
				rStatus = dbNextRecord(pdbentry);
				i++;
			}
		}
		tStatus = dbNextRecordType(pdbentry);
	}
	dbFinishEntry(pdbentry);
}


Carl Schumann wrote:
Hi,

Is there a mechanism to query an IOC for all the PVs that it serves?

Thanks,
Carl Schumann



-- Tim Mooney ([email protected]) (630)252-5417 Beamline Controls & Data Acquisition Group Advanced Photon Source, Argonne National Lab.

References:
Finding all the PVs on an IOC Carl Schumann

Navigate by Date:
Prev: Re: Installing Sequencer program Janet Anderson
Next: Re: Installing Sequencer program David Dudley
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Finding all the PVs on an IOC J. Lewis Muir
Next: Re: Finding all the PVs on an IOC Ernest L. Williams Jr.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·