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  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: [EXTERNAL] Phoebus Archive xml config file: Automate generation, using Autosave module of synApps??
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: "Kasemir, Kay" <kasemirk at ornl.gov>, Kuldeep Joshi <kuldeep.joshi at gmail.com>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 29 Jul 2021 08:00:44 -0700
On 7/29/21 6:18 AM, Kasemir, Kay via Tech-talk wrote:
>> I guess if we restrict to only generating the .req file, this way the solution will be quite nifty. Adding the xml generation library to it will make it bulky.
>>  I suggest a two stage solution, the makeArchiveConfigFile will make a .req file. Each line of this .req file will contain all the necessary archive information per PV. This file can subsequently be parsed using a python app for generating a CSS archive compatible xml config file.
>> We can extend the AutosaveFileFromDbInfo function and request the maintainer if this can be a standard feature of autosave.
> 
> The information that you need is
> 1) How to sample: scan or monitor
> 2) How often to do that, i.e. scan period or estimated update period
> 3) PV name, which usually is the record name with implied .VAL, but in rare cases you might for example want the .RBV
> 
> Example:
> 
>   # Request archiving on change
>   info(archive, "Monitor, 00:01:00")
> 
>   # Scan
>   info(archive, "Scan, 01:00:00")
> 
>   # VAL field is the default
>   info(archive, "Monitor, 00:01:00, VAL")
> 
>   # In rare cases, might need to archive other fields
>   info(archive, "Monitor, 00:01:00, RVAL DMOV")
> 
> Why do you want to add this to the autosave/restore code? They're not related.
> Why do you want to create some arbitrary intermediate file format?
> Why not create the XML right away?
> Yes, I would avoid adding an XML library, but "printf" will suffice since you know what you'll write. Just check the PV names for a very limited number of potential characters to escape, which I think is basically '>' and '<'.
> 
> So something like ` makeArchiveConfigFile("/path/to/ioc_xyz_archive.xml")` at the end of st.cmd will create one file per IOC, and you can then use xinclude to merge the per-IOC files into one per archive engine.

FYI. this sort of thing has been accomplished with recsync + channelfinder.

The recsync module allows IOCs to push information about records,
including info() tags, to central server(s) where this can be stored
in the channelfinder database.  Then an archiver configuration
can be (re)generated from a query.

https://github.com/ChannelFinder/recsync

https://github.com/ChannelFinder/ChannelFinderService

https://github.com/ChannelFinder/pyCFClient


One of my ideas with recsync was to limit the amount of service specific
code which needs to be built into every IOC.

References:
Phoebus Archive xml config file: Automate generation. Kuldeep Joshi via Tech-talk
Re: [EXTERNAL] Phoebus Archive xml config file: Automate generation. Kasemir, Kay via Tech-talk
Phoebus Archive xml config file: Automate generation, using Autosave module of synApps?? Kuldeep Joshi via Tech-talk
Re: [EXTERNAL] Phoebus Archive xml config file: Automate generation, using Autosave module of synApps?? Kasemir, Kay via Tech-talk
Re: [EXTERNAL] Phoebus Archive xml config file: Automate generation, using Autosave module of synApps?? Kuldeep Joshi via Tech-talk
Re: [EXTERNAL] Phoebus Archive xml config file: Automate generation, using Autosave module of synApps?? Kasemir, Kay via Tech-talk

Navigate by Date:
Prev: Arbitrary rotation angle with areaDetector Plugin Smith, William via Tech-talk
Next: Re: Arbitrary rotation angle with areaDetector Plugin Michael Davidsaver via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: [EXTERNAL] Phoebus Archive xml config file: Automate generation, using Autosave module of synApps?? Kasemir, Kay via Tech-talk
Next: Mutlibus-II iSBC 386/486 Single Board Computers --- BADLY IN NEED OF ACQUIRE THESE OLD DISCONTINUED MODULES Luchini, Kristi L. via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 29 Jul 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·