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 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
<== Date ==> <== Thread ==>

Subject: RE: Time interval for Asyn auto reconnect
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "'J. Lewis Muir'" <jlmuir@imca-cat.org>
Cc: "Tech-talk@aps.anl.gov" <Tech-talk@aps.anl.gov>
Date: Wed, 19 Jul 2017 16:58:55 +0000
It's not that easy.  In order to use the asynTrace interface in asyn one needs to pass it the pasynUser that is connected to the current asyn port and address.  However, that is hidden as a private member variable of the AsynDriverInterface class in StreamDevice.  Each record has a different AsynDriverInterface object.  The StreamError function which is used to print StreamDevice error messages has no knowledge of the AsynDriverInterface object.  It is not clear to me that this information could be made available to the StreamError function without a lot of refactoring.

Mark

-----Original Message-----
From: J. Lewis Muir [mailto:jlmuir@imca-cat.org] 
Sent: Wednesday, July 19, 2017 10:52 AM
To: Mark Rivers
Cc: Paduan Donadio, Marcio; Tech-talk@aps.anl.gov
Subject: Re: Time interval for Asyn auto reconnect

On 07/19, Mark Rivers wrote:
> streamDevice uses asyn for I/O but it does not use asyn for printing
> error messages. That is unfortunate because if it did you would have
> the ability to turn off the messages using asynTrace control.  I have
> suggested this to Dirk but it would introduce asyn dependencies into
> parts of streamDevice code that are currently independent of asyn,
> which he is reluctant to do.

Sounds like a good candidate for the Bridge design pattern.  Create
an interface for the logging, and provide two implementations: the
StreamDevice built-in implementation and the Asyn implementation.  Those
parts of StreamDevice that know nothing about Asyn will continue to know
nothing about Asyn, yet the Asyn implementation could be used.

Lewis

References:
Time interval for Asyn auto reconnect Paduan Donadio, Marcio
RE: Time interval for Asyn auto reconnect Mark Rivers
Re: Time interval for Asyn auto reconnect Paduan Donadio, Marcio
Re: Time interval for Asyn auto reconnect Mark Rivers
Re: Time interval for Asyn auto reconnect J. Lewis Muir

Navigate by Date:
Prev: Re: Time interval for Asyn auto reconnect J. Lewis Muir
Next: Changing AI INP field bob dalesio
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
Navigate by Thread:
Prev: Re: Time interval for Asyn auto reconnect J. Lewis Muir
Next: Re: Time interval for Asyn auto reconnect Paduan Donadio, Marcio
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
ANJ, 19 Jul 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·