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> 2021 2022 2023 2024 2025 | 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> 2021 2022 2023 2024 2025 |
<== 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: | "Johnson, Andrew N." <anj at anl.gov> |
Cc: | EPICS tech-talk <tech-talk at aps.anl.gov> |
Date: | Wed, 19 Aug 2020 12:18:18 +0000 |
Hi Andrew,
Thanks for the suggestion, I made waveform device support:
It seems to work, apart from one issue: escaped quotes appear in the info as unescaped quotes:
When I use dbGetInfo to get the string, it appears the same as dbli shows.$ cat info.db record(waveform, TEST) { info(json, {"this": "has \"quotes\" in"}) }$ softIoc -d info.db
Is this a bug, or is there a different way of escaping quotes?
Thanks,
Tom
From: Johnson, Andrew N. <anj at anl.gov>
Sent: 18 August 2020 16:45 To: Cobb, Tom (DLSLtd,RAL,LSCI) <tom.cobb at diamond.ac.uk> Cc: EPICS tech-talk <tech-talk at aps.anl.gov> Subject: Re: How to write a soft record with a constant long string value Hi Tom,
On Aug 18, 2020, at 4:04 AM, Cobb, Tom (DLSLtd,RAL,LSCI) via Tech-talk <tech-talk at aps.anl.gov> wrote:
You can load arbitrary JSON into a record info tag, but not directly into any other field type at the moment. It should be relatively easy to write device support or an aSub subroutine to copy the contents of an info tag into a long string field
though:
HTH,
- Andrew
--
Complexity comes for free, simplicity you have to work for.
-- 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. |