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  <20212022  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  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Stream device: Reading values from two almost identical input strings using I/O intr
From: Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Thu, 29 Jul 2021 11:55:37 +0200
Dear Nicklas,

I happen to have discussed this issue with Dirk just last week.

First of all: try 'var streamDebug 1' (for a short while only!) to get a lot of output that shows in more detail what happens.

Then:
When parsing incoming messages, StreamDevice goes strictly left to right. It matches, executes % format converters, continues matching, ...
That means for messages like those from your device: the discriminating character (leading to a format mismatch) happens *after* the format converter has been executed. Tough: too late.

The same happens - that was my discussion with Dirk - for a wrong checksum: the error is detected after all format converters (and redirections) have been executed. StreamDevice is happily writing junk into other records and detects that it was all wrong after the fact.

I think your best bet is to use a single format, write the number and the tag in two separate records, and FLNK a combination of calcout then seq to forward the number to where it belongs.

Cheers,
~Ralph


Replies:
Re: Stream device: Reading values from two almost identical input strings using I/O intr Ralph Lange via Tech-talk
References:
Stream device: Reading values from two almost identical input strings using I/O intr Nicklas Bjärnhall Prytz via Tech-talk

Navigate by Date:
Prev: Stream device: Reading values from two almost identical input strings using I/O intr Nicklas Bjärnhall Prytz via Tech-talk
Next: Re: Stream device: Reading values from two almost identical input strings using I/O intr Ralph Lange 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Stream device: Reading values from two almost identical input strings using I/O intr Nicklas Bjärnhall Prytz via Tech-talk
Next: Re: Stream device: Reading values from two almost identical input strings using I/O intr Ralph Lange 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  <20212022  2023  2024 
ANJ, 29 Jul 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·