Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: RFC: New DBD keyword?
From: Andrew Johnson <anj@aps.anl.gov>
To: <core-talk@aps.anl.gov>
Date: Fri, 6 May 2016 17:59:38 -0500
On 05/02/2016 07:19 PM, Michael Davidsaver wrote:
>>   field(OUTA, "{\"pva\":{\"pv\":\"v4channel\",\"pvRequest\":\"process=true\"}}")
> 
> umm... this looks quite ugly and verbose to me.  I know the present
> situation wrt. parsing needs to be extended, but there has to be
> something more readable.

I agree, if you're writing it by hand at least. What if I teach the
dbStatic parser to understand JSON directly instead of embedding it
inside a string, so the above could become this:

 field(OUTA, {"pva":{"pv":"v4channel", "pvRequest":"process=true"}})

A further step might be to drop the strict-JSON requirement and allow
this as well:

 field(OUTA, {pva: {pv:"v4channel", pvRequest:"process=true"}})

That one might be going a bit far since it would require DCTs to
implement their own parser for our not-quite-JSON format, but if we
wanted the DCTs to help in formatting/validating the field value we're
asking for a major overhaul from them anyway. I would consider going
this far if we decided to also provide some kind of schema for the JSON
object's internals, but TBH I think that would be asking quite a lot.

Note that this doesn't prevent a link/device support layer from doing
its own parsing of a string value:

 field(OUTA, {"pva":"v4channel[field=VAL] PP"})

I do like the flexibility of a JSON-link approach, for instance a link
might combine multiple channels into an array:

 field(INP, {"grp":["BPM1:Left", "BPM1:Right", "BPM1:Up", "BPM1:Down"]})

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

References:
RFC: New DBD keyword? Johnson, Andrew N.
Re: RFC: New DBD keyword? Michael Davidsaver

Navigate by Date:
Prev: Build failed in Jenkins: epics-base-3.16-sol #48 APS Jenkins
Next: Jenkins build became unstable: epics-base-3.15 #262 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019 
Navigate by Thread:
Prev: Re: RFC: New DBD keyword? Michael Davidsaver
Next: Build failed in Jenkins: epics-base-3.16-sol #48 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019 
ANJ, 12 May 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·