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  <20152016  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  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: error on the IOC shell for asyn driver
From: Rod Nussbaumer <[email protected]>
To: [email protected]
Date: Wed, 04 Mar 2015 15:43:26 -0800
Or, you can expose the asynTrace facility to end users and operators using the asyn record and an appropriate operator UI screen. I think asyn comes with one version using MEDM.

   ---   rod.


On 03/03/2015 01:20 PM, Mark Rivers wrote:
Yes, your driver can access the asynTrace facility which is defined in
asynDriver.h as:

typedef struct asynTrace {

/* lock/unlock are only necessary if caller performs I/O other than */

/* by calling asynTrace methods */

asynStatus (*lock)(asynUser *pasynUser);

asynStatus (*unlock)(asynUser *pasynUser);

asynStatus (*setTraceMask)(asynUser *pasynUser,int mask);

int (*getTraceMask)(asynUser *pasynUser);

asynStatus (*setTraceIOMask)(asynUser *pasynUser,int mask);

int (*getTraceIOMask)(asynUser *pasynUser);

asynStatus (*setTraceInfoMask)(asynUser *pasynUser,int mask);

int (*getTraceInfoMask)(asynUser *pasynUser);

asynStatus (*setTraceFile)(asynUser *pasynUser,FILE *fp);

FILE *(*getTraceFile)(asynUser *pasynUser);

asynStatus (*setTraceIOTruncateSize)(asynUser *pasynUser,size_t size);

size_t (*getTraceIOTruncateSize)(asynUser *pasynUser);

#if defined(__GNUC__) && (__GNUC__ < 3)

/* GCC 2.95 does not allow EPICS_PRINTF_STYLE on function pointers */

int (*print)(asynUser *pasynUser,int reason, const char *pformat, ...);

int (*printSource)(asynUser *pasynUser,int reason, const char *fileName,
int line, const char *pformat, ...);

int (*vprint)(asynUser *pasynUser,int reason, const char *pformat,
va_list pvar);

int (*vprintSource)(asynUser *pasynUser,int reason, const char *file,
int line, const char *pformat, va_list pvar);

int (*printIO)(asynUser *pasynUser,int reason,

const char *buffer, size_t len,const char *pformat, ...);

int (*printIOSource)(asynUser *pasynUser,int reason,

const char *buffer, size_t len,const char *file, int line, const char
*pformat, ...);

int (*vprintIO)(asynUser *pasynUser,int reason,

const char *buffer, size_t len,const char *pformat, va_list pvar);

int (*vprintIOSource)(asynUser *pasynUser,int reason,

const char *buffer, size_t len,const char *file, int line, const char
*pformat, va_list pvar);

#else

int (*print)(asynUser *pasynUser,int reason, const char *pformat, ...)
EPICS_PRINTF_STYLE(3,4);

int (*printSource)(asynUser *pasynUser,int reason, const char *fileName,
int line, const char *pformat, ...) EPICS_PRINTF_STYLE(5,6);

int (*vprint)(asynUser *pasynUser,int reason, const char *pformat,
va_list pvar) EPICS_PRINTF_STYLE(3,0);

int (*vprintSource)(asynUser *pasynUser,int reason, const char *file,
int line, const char *pformat, va_list pvar) EPICS_PRINTF_STYLE(5,0);

int (*printIO)(asynUser *pasynUser,int reason,

const char *buffer, size_t len,const char *pformat, ...)
EPICS_PRINTF_STYLE(5,6);

int (*printIOSource)(asynUser *pasynUser,int reason,

const char *buffer, size_t len,const char *file, int line, const char
*pformat, ...) EPICS_PRINTF_STYLE(7,8);

int (*vprintIO)(asynUser *pasynUser,int reason,

const char *buffer, size_t len,const char *pformat, va_list pvar)
EPICS_PRINTF_STYLE(5,0);

int (*vprintIOSource)(asynUser *pasynUser,int reason,

const char *buffer, size_t len,const char *file, int line, const char
*pformat, va_list pvar) EPICS_PRINTF_STYLE(7,0);

#endif

}asynTrace;

epicsShareExtern asynTrace *pasynTrace;

So your driver can just call:

pasynTrace->setTraceMask(pasynUser, mask)

Mark

*From:* [email protected] [mailto:[email protected]]
*Sent:* Tuesday, March 03, 2015 3:09 PM
*To:* Mark Rivers
*Cc:* techtalk
*Subject:* Re: error on the IOC shell for asyn driver

Hi Mark,

Thank you.

One more question.

I am EPICS driver developer. Is there any way in the asynDriver where i
can set this in my driver so that even application developer forget to
set asynSetTraceMask in the application st.cmd, these error message can
be stopped by driver?

Thank you

Vishnu





From: Mark Rivers <[email protected]
<mailto:[email protected]>>
Sent: Wed, 04 Mar 2015 01:56:01
To: 'Vishnu Patel' <[email protected]
<mailto:[email protected]>>, "techtalk "
<[email protected] <mailto:[email protected]>>
Subject: Re: error on the IOC shell for asyn driver

Hi Vishnu,

Type the following command at the iocsh prompt, or include it in your
startup script if you know the port will not be connected:

asynSetTraceMask <port name> 0 0

Mark

*From:* [email protected]
<mailto:[email protected]>
[mailto:[email protected]] *On Behalf Of *Vishnu Patel
*Sent:* Tuesday, March 03, 2015 2:17 PM
*To:* techtalk
*Subject:* error on the IOC shell for asyn driver


Hi,

In my asyn based driver while the port is not connected all the scanning
records are throwing an errors

<PV NAME> devAsynInt32 queueRequest port <port name> not connected

it is same for all asyn interfaces.

How i can stop error messages on the IOC shell while port is not connected?

Thank you

Vishnu


<http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?>

Get your own *FREE* website, *FREE* domain & *FREE* mobile app with
Company email.

	

*Know More >*
<http://www.rediffmail.com/cgi-bin/red.cgi?red=http%3A%2F%2Ftrack%2Erediff%2Ecom%2Fclick%3Furl%3D%5F%5F%5Fhttp%3A%2F%2Fbusinessemail%2Erediff%2Ecom%3Fsc%5Fcid%3Dsign%2D1%2D10%2D13%5F%5F%5F%26amp%3Bcmp%3Dhost%26amp%3Blnk%3Dsign%2D1%2D10%2D13%26amp%3Bnsrv1%3Dhost&isImage=0&BlockImage=0&rediffng=0&rogue=387537254f7eee557c3b17544bd037e8098bd82e>


<http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?>

Get your own *FREE* website, *FREE* domain & *FREE* mobile app with
Company email.

	

*Know More >*
<http://track.rediff.com/click?url=___http://businessemail.rediff.com?sc_cid=sign-1-10-13___&cmp=host&lnk=sign-1-10-13&nsrv1=host>



References:
Re: error on the IOC shell for asyn driver Vishnu Patel
RE: error on the IOC shell for asyn driver Mark Rivers

Navigate by Date:
Prev: RE: Problem with HDF5 plugin for areaDetector Mark Rivers
Next: Re: How to handle out-of-index of MBBO/MBBI? Jeong Han Lee
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: error on the IOC shell for asyn driver Mark Rivers
Next: Re: error on the IOC shell for asyn driver Vishnu Patel
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·