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  2008  2009  2010  2011  2012  <20132014  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  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: record info field in which epics version?
From: Andrew Johnson <[email protected]>
To: Emmanuel Mayssat <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 15 Feb 2013 17:16:16 -0600
Hi Emmanuel,

On 2013-02-15 Emmanuel Mayssat wrote:
> I would like to be able to filter PVs from a running IOC based on a tag
> (best candidate may be info record field) Is there a way to do an
> operation equivalent to dbl * where $record.info.my_tag= "foo" > file.pv ?

You could write a command that uses the dbStaticLib API to do that kind of 
thing, but there's nothing built in.  I would start looking at the various 
commands defined in src/db/dbTest.c — dbgrep might be a good place to start.  
You'll also need to read section 14.13 of the AppDevGuide which describes the 
routines that find and access the info items (the rest of chapter 14 should 
also be helpful if you don't know the dbStaticLib API).

Your code will have to scan through the records in the database (which dbgrep 
already does, skipping any record names that don't match the user's pattern) 
and for each record you call dbFindInfo() to look for your tag name.  If that 
tag name exists, you would use dbGetInfoString() to get its value which you 
can then test as you wish.

HTH,

- Andrew
-- 
There is no such thing as a free lunch.  When invited for lunch,
it is best to check if you are there to eat, or to be eaten.
-- Clive Robinson


References:
record info field in which epics version? Emmanuel Mayssat
Re: record info field in which epics version? Andrew Johnson
RE: record info field in which epics version? Emmanuel Mayssat

Navigate by Date:
Prev: Re: record info field in which epics version? Ned Arnold
Next: aSub MAX_ARRAY_SIZE increase Euan.Troup
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: record info field in which epics version? Ned Arnold
Next: AsynInt32 device support and mbbo records Florian Feldbauer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·