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: Mark Rivers <[email protected]>
To: "'[email protected]'" <[email protected]>
Cc: techtalk <[email protected]>
Date: Tue, 3 Mar 2015 21:20:21 +0000

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]>
Sent: Wed, 04 Mar 2015 01:56:01
To: 'Vishnu Patel' <[email protected]>, "techtalk " <[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]] 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


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

Know More >

 


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

Know More >

 


Replies:
Re: error on the IOC shell for asyn driver Rod Nussbaumer
References:
Re: error on the IOC shell for asyn driver Vishnu Patel

Navigate by Date:
Prev: Re: error on the IOC shell for asyn driver Vishnu Patel
Next: Re: "No conversion between src & dest" warning with pcaspy Jameson Graef Rollins
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 Vishnu Patel
Next: Re: error on the IOC shell for asyn driver Rod Nussbaumer
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 ·