EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 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: [Bug 1783475] Re: const link support can't handle escaped charactors
From: Andrew Johnson via Core-talk <core-talk at aps.anl.gov>
To: core-talk at aps.anl.gov
Date: Sun, 28 Feb 2021 21:34:39 -0000
The 7.0.5 release includes changes to support JSON-5, and the behavior
is now:

woz$ cat ~/db/test.db 
record(stringin, "json") {
  field(INP, {const:"multi\nline"})
}
woz$ softIoc -d ~/db/test.db 
Starting iocInit
############################################################################
## EPICS R7.0.4.2-DEV
## Rev. R7.0.4.1-190-g6734918e6e188b1f846e-dirty
############################################################################
iocRun: All initialization complete
epics> dbgf json
DBF_STRING:         "multi\nline"       
epics> dbpr json 1
APST: On Change     ASG :               BKPT: 00            DESC:               
DISA: 0             DISP: 0             DISS: NO_ALARM      DISV: 1             
DTYP: Soft Channel  EVNT:               FLNK: CONSTANT      
INP : JSON_LINK {const:"multi\nline"}   MPST: On Change     NAME: json          
PACT: 0             PHAS: 0             PINI: NO            PRIO: LOW           
PUTF: 0             RPRO: 0             SCAN: Passive       SDIS: CONSTANT      
SEVR: INVALID       SIML: CONSTANT      SIMM: NO            SIOL: CONSTANT      
SSCN: <nil>         STAT: UDF           SVAL:               TPRO: 0             
TSE : 0             TSEL: CONSTANT      UDF : 0             UDFS: INVALID       
VAL : multi
line    


Has this fixed the bug, or just changed it? Note that dbgf is escaping the string before printing it, whereas dbpr just prints in verbatim.

-- 
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1783475

Title:
  const link support can't handle escaped charactors

Status in EPICS Base:
  Triaged
Status in EPICS Base 3.16 series:
  Won't Fix
Status in EPICS Base 7.0 series:
  Triaged

Bug description:
  I think the following should work, but it doesn't.  The culprit seems
  to be the call to dbTranslateEscape() in dbRecordField() and
  dbRecordInfo().  The escaped newline is handled correctly by dbLex,
  but the later dbJLinkParse() errors on the now unescaped newline.

  > record(stringin, "test") {
  >      field(INP, {const:"multi\nline"})
  > }

  > dbJLinkInit: lexical error: invalid character inside string.
  >                          {"const":"multi line"}
  >                      (right here) ------^

To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1783475/+subscriptions

Navigate by Date:
Prev: [Bug 1899697] Re: PHAS is not always respected when SCAN=Event Andrew Johnson via Core-talk
Next: Build completed: EPICS Base 7 base-7.0-177 AppVeyor via Core-talk
Index: 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: [Bug 1899697] Re: PHAS is not always respected when SCAN=Event Andrew Johnson via Core-talk
Next: [Bug 1783475] Re: const link support can't handle escaped charactors Andrew Johnson via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 03 Jul 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·