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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: asynPrint to print asyn port name
From: Mark Rivers <[email protected]>
To: "'Eric Norum'" <[email protected]>
Cc: "'EPICS Tech Talk'" <[email protected]>
Date: Tue, 11 Jun 2013 22:37:00 +0000
Folks,

I've made the changes to asyn to support a new command:

asynSetTraceInfoMask

The mask is defined with these bits:

/* traceInfo mask definitions*/
#define ASYN_TRACEINFO_TIME 0x0001
#define ASYN_TRACEINFO_PORT 0x0002
#define ASYN_TRACEINFO_SOURCE 0x0004

ASYN_TRACEINFO_TIME prints what has always been printed, the date and time of the message.

ASYN_TRACEINFO_PORT prints [port,addr,reason], where port is the port name, addr is the asyn address, and reason is pasynUser->reason.  Those are the 3 pieces of "addressing" information in asyn.

ASYN_TRACEINFO_SOURCE prints [__FILE__,__LINE__] where the asynPrint statement occurs.

Here is an example of an asynPrint output when all 3 bits are set:

2013/06/11 17:23:51.198 [testAPD,-1,14] [../../asyn/devEpics/devAsynFloat64.c,396] testAPD:scope1:MinValue_RBV devAsynFloat64::getCallbackValue from ringBuffer value=-0.037271

I have modified the asynRecord to support the new ASYN_TRACE_WARNING, and all of the new ASYN_TRACEINFO bits.  I've attached a screen shot.

Everything is committed to SVN.

Let me know of any suggestions or problems.

Cheers,
Mark




-----Original Message-----
From: Eric Norum [mailto:[email protected]] 
Sent: Tuesday, June 11, 2013 1:26 PM
To: Mark Rivers
Cc: '[email protected]'; [email protected]
Subject: Re: asynPrint to print asyn port name

On Jun 11, 2013, at 11:10 AM, Mark Rivers <[email protected]> wrote:

> Folks,
> 
> Ulrik, thanks for sending that.
> 
> I've thought about it some more, and I don't think that adding more bits to traceIOMask is the best way to handle this.  traceIOMask is supposed to only apply to asynPrintIO calls, but these bits would also apply to asynPrint calls.  I think we should make a new mask, asynTraceInfo.
> 
> /* traceInfo mask definitions*/
> @@ -185,6 +186,8 @@
> #define ASYN_TRACEINFO_TIME  0x0001
> #define ASYN_TRACEINFO_PORT  0x0002
> #define ASYN_TRACEINFO_LINE  0x0004

Agreed.

> 
> These options would print the time (enabled by default for backwards compatibility), the port name, and the file/line number in the source code.  I think that can only work on platforms that implement the calls as macros, not as function calls, but that is actually most platforms.

You're referring to the varargs macro support, right?  Are there any platforms that are neither _STDC_VERSION__>=199901L nor __GNUC__?   I guess it's just too bad for them.  Perhaps there should be a '#warning' in the asynDriver.h conditional for these platforms so developers are informed of why they're not seeing PORT/FILE/LINE information in their ASYN diagnostic messages.

> 
> I would then add new shell command just like asynSetTraceMask, asynSetTraceIOMask
> 
> asynSetTraceInfoMask port,addr,infoMask
> 
> Thoughts?
> 

The additional functionality is separate from the exiting TRACE and TRACEIO masks so it makes sense to have them broken out as separate masks.

-- 
Eric Norum
[email protected]




Attachment: asynRecord.png
Description: asynRecord.png


References:
asynPrint to print asyn port name ulrik.pedersen
RE: asynPrint to print asyn port name Mark Rivers
Re: asynPrint to print asyn port name Mark Davis
RE: asynPrint to print asyn port name ulrik.pedersen

Navigate by Date:
Prev: RE: StreamDevice protocol file for Televac MM200 VGC Mohan Ramanathan
Next: CSS plugin sources James F Ross
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: asynPrint to print asyn port name Bruce Hill
Next: Help with CAJ installation.. Park, Young Soo
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·