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  2021  <20222023  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  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Regex support in StreamDevice.
From: "Li, Ji via Tech-talk" <tech-talk at aps.anl.gov>
To: "Zimoch Dirk (PSI)" <dirk.zimoch at psi.ch>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 13 May 2022 14:13:15 +0000
I don't see it in the IOC built with StreamDevice package, and I see it in the modified IOC (with manual compiled StreamDevice). 

Best,
-Ji


From: Zimoch Dirk (PSI) <dirk.zimoch at psi.ch>
Sent: Friday, May 13, 2022 10:04
To: Li, Ji <liji at bnl.gov>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: AW: Regex support in StreamDevice.
 

Do you see %/ in dbior?

 

epics> dbior stream,1

Driver: stream

  StreamDevice 2.8.22 2021-11-11 11:49:32 +0100

  commit: 94721c2b0e2ae118778d5783bd35cc642f573f60

  (C) 1999 Dirk Zimoch (dirk.zimoch at psi.ch)

  Use interest level 100 for license information

  registered bus interfaces:

    AsynDriverInterface

    DebugInterface

    DummyInterface

  registered converters:

    %/ RegexpConverter

    %< ChecksumConverter

    %B BinaryConverter

    %D BCDConverter

    %E StdDoubleConverter

    %G StdDoubleConverter

    %R RawFloatConverter

    %T TimestampConverter

    %X StdLongConverter

    %[ StdCharsetConverter

    %b BinaryConverter

    %c StdCharsConverter

    %d StdLongConverter

    %e StdDoubleConverter

    %f StdDoubleConverter

    %g StdDoubleConverter

    %i StdLongConverter

    %m MantissaExponentConverter

    %o StdLongConverter

    %r RawConverter

    %s StdStringConverter

    %u StdLongConverter

    %x StdLongConverter

    %{ EnumConverter

  connected records:

 

Von: Li, Ji <liji at bnl.gov>
Gesendet: Freitag, 13. Mai 2022 15:55
An: Zimoch Dirk (PSI) <dirk.zimoch at psi.ch>; tech-talk at aps.anl.gov
Betreff: Re: Regex support in StreamDevice.

 

Hi Dirk,

 

Thanks for the suggestion. The StreamDevice was installed from a prebuilt package and it seems to have PCRE linked:

 

----------------------------------------------------------------------

liji@xf04bm-maia:/epics/iocs/maia$ ldd bin/linux-x86_64/maia |grep stream

libstream.so => /usr/lib/epics/lib/linux-x86_64/libstream.so (0x00007f0139e55000)

liji@xf04bm-maia:/epics/iocs/maia$ ldd /usr/lib/epics/lib/linux-x86_64/libstream.so |grep pcre

libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fecb0427000)

----------------------------------------------------------------------

 

Something must have broken. I compiled a seperate StreamDevice instance and rebuilt the IOC. Errors are gone. We will double check the StreamDevice package. Thanks.

 

Best,

-Ji

 

 


From: Zimoch Dirk (PSI) <dirk.zimoch at psi.ch>
Sent: Friday, May 13, 2022 2:28
To: Li, Ji <liji at bnl.gov>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: AW: Regex support in StreamDevice.

 

Hi Ji

 

It looks like PCRE (perl regular expressions) is not linked into StreamDevice.

Check your PCRE settings in RELEASE.

Be aware that from StreamDevice 2.7 to 2.8 I made some modifications to the Makefiles when searching for the configure directory to be more "standard EPICS compatible". In particular I look into the local configure first instead of an upper level configure. So maybe you need to copy some settings over?

 

Dirk

 

Von: Tech-talk <tech-talk-bounces at aps.anl.gov> Im Auftrag von Li, Ji via Tech-talk
Gesendet: Donnerstag, 12. Mai 2022 23:47
An: tech-talk at aps.anl.gov
Betreff: Regex support in StreamDevice.

 

Hi,

 

We have an IOC based on streamdevice which had been work well until it was recently updated to base 7.0.5 and StreamDevice 2.8.10. The IOC reported erros on startup:

 

----------------------------------------------------------------------

2022/05/12 17:20:06.024569 _main_ No converter registered for format '%/'

2022/05/12 17:20:06.024610 _main_ var.p line 398: in format string: "%/^(?|\"([^\"]*)\"|([^\"][^ ]*))/"

2022/05/12 17:20:06.024616 _main_ var.p line 398: in command 'in'

2022/05/12 17:20:06.024620 _main_ var.p line 395: in protocol 'var_g_string'

2022/05/12 17:20:06.024627 _main_ while compiling protocol 'var_g_string(position.dim[0].name,XFM:MAIA)' for 'XFM:MAIA:X_POS_DIM_NAME'

2022/05/12 17:20:06.024633 _main_ XFM:MAIA:X_POS_DIM_NAME: Protocol parse error

2022/05/12 17:20:06.024639 _main_ XFM:MAIA:X_POS_DIM_NAME: Record initialization failed

----------------------------------------------------------------------

 

It seems "%/^(?|\"([^\"]*)\"|([^\"][^ ]*))/" in protocol var_g_string could not be recognized as a regular _expression_.

 

The StreamDevice was built against PCRE package, and:

 

----------------------------------------------------------------------

liji@xf04bm-maia:/epics/iocs/maia$ ldd bin/linux-x86_64/maia | grep pcre

libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fcd23fdb000)

----------------------------------------------------------------------

 

What could be preventing streamdevice from parsing protocols with regular expressions?

 

Best,

-Ji

 


References:
Regex support in StreamDevice. Li, Ji via Tech-talk
AW: Regex support in StreamDevice. Zimoch Dirk (PSI) via Tech-talk
Re: Regex support in StreamDevice. Li, Ji via Tech-talk
AW: Regex support in StreamDevice. Zimoch Dirk (PSI) via Tech-talk

Navigate by Date:
Prev: AW: Regex support in StreamDevice. Zimoch Dirk (PSI) via Tech-talk
Next: Re:AW: pv invalid using stream 网易邮件中心 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  2021  <20222023  2024 
Navigate by Thread:
Prev: AW: Regex support in StreamDevice. Zimoch Dirk (PSI) via Tech-talk
Next: Conversion error when using (pvapy served) PVA input link in a "bi" record Nicklas Holmberg 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  2021  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·