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  <20202021  2022  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: getting streamDevice exception handler replyTimeout to write to a record [SEC=UNCLASSIFIED]
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: "Rivers, Mark L." <rivers at cars.uchicago.edu>
Cc: "CORNALL, Terry" <terryc at ansto.gov.au>, tech-talk <tech-talk at aps.anl.gov>
Date: Wed, 1 Apr 2020 15:23:42 +0000
On Mar 31, 2020, at 10:39 PM, Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> wrote:

IMHO this is a cleaner solution that does not involving launching a separate process.


In the protocol file:

commsFail {

 #exec 'echo "comms fail on \$0"'; #Turn this off in production

 exec 'dbpf \$1:\$4 "Comms error"> /dev/null';  #/dev/null makes it silent

}

Strictly speaking an “exec” command in a StreamDevice protocol file isn't actually launching a separate process, it’s just running “dbpf” as an iocShell command, which I assume happens in the context of whatever thread is executing the protocol. You could run an external process if your exec string starts with the iocsh command “system” to launch it, but that isn’t what the above protocol snippet is doing.
</pedantic>

- Andrew

-- 
Complexity comes for free, simplicity you have to work for.


References:
RE: getting streamDevice exception handler replyTimeout to write to a record [SEC=UNCLASSIFIED] CORNALL, Terry via Tech-talk
Re: getting streamDevice exception handler replyTimeout to write to a record [SEC=UNCLASSIFIED] Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: NTNDArray array filter does not work on value Mark Rivers via Tech-talk
Next: CS-STUDIO/BEAST Alarms to logstash? John Dobbins 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: getting streamDevice exception handler replyTimeout to write to a record [SEC=UNCLASSIFIED] Mark Rivers via Tech-talk
Next: CS-STUDIO/BEAST Alarms to logstash? John Dobbins 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  <20202021  2022  2023  2024 
ANJ, 01 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·