Experimental Physics and Industrial Control System
Hi Dirk,
StreamDevice is primarily (exclusively?) used as device support for asyn drivers with EPICS. As such, however, it does not follow the asyn "rules" for device support. This is from the asynDriver Manual at http://www.aps.anl.gov/epics/modules/soft/asyn/R4-21/asynDriver.html
*******************************************************
In order for the trace facility to perform properly; device support and all drivers must use the trace facility. Device and driver support can directly call the asynTrace methods. The asynPrint and asynPrintIO macros are provided so that it is easier for device/driver support. Support can have calls like:
asynPrint(pasynUser,ASYN_TRACE_FLOW,"%s Calling queueRequest\n",
someName);
*******************************************************
StreamDevice does not use the asynTrace facility for error messages. This has unfortunate consequences. This is the output from an EPICS IOC that talks to a TCP/IP device with StreamDevice. In this case the device happens to not be connected to the network.
2013/06/18 20:57:01.529 PACE5000 13PACE5000:PC1:Effort_RBV: Protocol aborted
2013/06/18 20:57:07.541 PACE5000 13PACE5000:PC1:Error_RBV: pasynCommon->connect() failed: Can't connect to 164.54.160.26:5025: No route to host
2013/06/18 20:57:07.541 PACE5000 13PACE5000:PC1:Error_RBV: Protocol aborted
2013/06/18 20:57:10.547 PACE5000 13PACE5000:PC1:Effort_RBV: pasynCommon->connect() failed: Can't connect to 164.54.160.26:5025: No route to host
2013/06/18 20:57:10.547 PACE5000 13PACE5000:PC1:Effort_RBV: Protocol aborted
2013/06/18 20:57:13.553 PACE5000 13PACE5000:PC1:Vent_RBV: pasynCommon->connect() failed: Can't connect to 164.54.160.26:5025: No route to host
2013/06/18 20:57:13.553 PACE5000 13PACE5000:PC1:Vent_RBV: Protocol aborted
2013/06/18 20:57:16.559 PACE5000 13PACE5000:PC1:Slew_RBV: pasynCommon->connect() failed: Can't connect to 164.54.160.26:5025: No route to host
2013/06/18 20:57:16.559 PACE5000 13PACE5000:PC1:Slew_RBV: Protocol aborted
2013/06/18 20:57:19.565 PACE5000 13PACE5000:PC1:Error_RBV: pasynCommon->connect() failed: Can't connect to 164.54.160.26:5025: No route to host
2013/06/18 20:57:19.565 PACE5000 13PACE5000:PC1:Error_RBV: Protocol aborted
2013/06/18 20:57:22.571 PACE5000 13PACE5000:PC1:Vent_RBV: pasynCommon->connect() failed: Can't connect to 164.54.160.26:5025: No route to host
So there is a constant stream of error messages.
If StreamDevice used the asynTrace facility I could very easily turn these messages off with the following command:
asynSetTraceMask PACE5000 0 0
I could also turn them off with an EPICS GUI like medm by setting the ASYN_TRACE_ERROR bit for that port 0 with an asynRecord.
However, I've looked at the documentation for StreamDevice, and also the source code for StreamError.h and StreamError.cc, and there does not appear to beany way to turn off the error messages in StreamDevice. There is a global variable StreamDebugFile which should allow one to route all StreamDevice error messages to afile. But that is not what I want, I want to route just the messages for this disconnected device PACE5000. Furthermore StreamDebugFile appears not to be availble in the iocsh shell?
I looked to see if it would be easy to convert the StreamError class to use asynTrace, and it is not as easy as I hoped because the required pasynUser handle is not available outside the AsynDriverInterface class.
Is there a way to make StreamDevice use the asynTrace facility, so we can get its advantages like enabling/disabling error messages on a per-port basis, routing debug output to a file on a per-port basis, etc.?
If not, then the changes I am considering to asyn to automatically turn off error messages on a disconnected port won't affect StreamDevice messages.
Thanks,
Mark
- Replies:
- Re: Error message control in StreamDevice Dirk Zimoch
- Navigate by Date:
- Prev:
Re: analog output record - constant DOL Benjamin Franksen
- Next:
Re: Error message control in StreamDevice Dirk Zimoch
- 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:
configuring RDB archiver from xml files James F Ross
- Next:
Re: Error message control in StreamDevice Dirk Zimoch
- 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