Another way to do this is with I/O intr. Since you have a unique identifier and a termination character on that line, you can have a protocol entry that matches that one line of input. Then have a record with a scan of I/O Intr. Whenever the input parser succeeds in matching a line then your record will get called. If not, then you won't get an error. You will still need some other record that sends the out command. Multiple records like this could be used to match other devices on your bus, in response to the same command.
-----Original Message-----
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Gerrit Kühn via Tech-talk
Sent: Friday, October 13, 2023 8:13 AM
To: Zimoch Dirk <dirk.zimoch at psi.ch>
Cc: tech-talk at aps.anl.gov
Subject: [EXTERNAL] Re: process multiple lines with streamdevice
Am Fri, 13 Oct 2023 13:29:17 +0000
schrieb Zimoch Dirk <dirk.zimoch at psi.ch>:
> Two things to keep in mind:
> 1. Once %/regex/ has skipped something, there is no way back. Thus if
> you have multiple of those in one protocol, the order must stay fixed.
Yes, that will be the case. Right now, I just try to get this to work at
all, so I only try to match one of the pairs for starters. Once this works,
the others should hopefully be easy to add.
> 2. Any unread line after the one used will cause an error unless you set
> ExtraInput=ignore in this protocol. (Normally I discourage people to use
> that.)
Right now I do exactly that, just to make it easier to get things working.
Later it should be possible to match for the last setting (which should be
identical for all entries) just to finish in a tidy way.
cu
Gerrit
- References:
- process multiple lines with streamdevice Gerrit Kühn via Tech-talk
- Re: process multiple lines with streamdevice Zimoch Dirk via Tech-talk
- Re: process multiple lines with streamdevice Gerrit Kühn via Tech-talk
- Re: process multiple lines with streamdevice Zimoch Dirk via Tech-talk
- Re: process multiple lines with streamdevice Gerrit Kühn via Tech-talk
- Navigate by Date:
- Prev:
Re: Strange error from pvAccess Mark Rivers via Tech-talk
- Next:
RE: [EXTERNAL] Re: RTEMS BSP for MVME8100 Baily, Scott A 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
2022
<2023>
2024
- Navigate by Thread:
- Prev:
Re: process multiple lines with streamdevice Gerrit Kühn via Tech-talk
- Next:
Re: process multiple lines with streamdevice Gerrit Kühn 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
2022
<2023>
2024
|