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  <20202021  2022  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: How to write a soft record with a constant long string value
From: "Cobb, Tom \(DLSLtd,RAL,LSCI\) via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Cobb, Tom (DLSLtd,RAL,LSCI)" <tom.cobb at diamond.ac.uk>
Date: Tue, 18 Aug 2020 15:40:28 +0000
This is my best attempt so far:
record(waveform, "TEST") {
  field(NELM, 200)
  field(FTVL, "STRING")
  field(INP, [
    "a line that contains up to 39 chars,",
    "a space will be inserted before the",
    "next line. 'This works too', and so",
    "does {}, but backslash n and",
    "backslash escaped double quotes",
    "don't *seem* to work."
  ])
}

$ caget TEST.VAL
TEST.VAL 200 a line that contains up to 39 chars, a space will be inserted before the next line. \'This works too\', and so does {}, but backslash n and backslash escaped double quotes don\'t *seem* to work. 
The lack of \" makes it a bit difficult to put JSON in it, although I could always use a single quote and convert on the client...

I've tried the const JSON links too, but they also don't accept escaped quotes.

Any other ideas?

Thanks,
Tom

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Cobb, Tom (DLSLtd,RAL,LSCI) via Tech-talk <tech-talk at aps.anl.gov>
Sent: 18 August 2020 10:04
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: How to write a soft record with a constant long string value
 
Hi all,

I would like to write a database file with a single record that holds a constant chunk of JSON (generated by a script at IOC build time). I would prefer to do this by writing the JSON into the database file itself, rather than having to use a separate file, or dbpf.

Does anyone know if this is possible?

Thanks,
Tom

 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 

 

-- 

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
 


References:
How to write a soft record with a constant long string value Cobb, Tom (DLSLtd,RAL,LSCI) via Tech-talk

Navigate by Date:
Prev: redundancy materials saleem khan via Tech-talk
Next: Re: EPICS7 and Python Matt Newville 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: How to write a soft record with a constant long string value Cobb, Tom (DLSLtd,RAL,LSCI) via Tech-talk
Next: Re: How to write a soft record with a constant long string value Johnson, Andrew N. 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  <20202021  2022  2023  2024 
ANJ, 18 Aug 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·