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: "Vishnu Patel" <[email protected]>
To: "Mark Rivers " <[email protected]>
Cc: techtalk <[email protected]>
Date: 4 Mar 2015 08:30:57 -0000
Dear Mark,
   I tried to use 

pasynTrace->setTraceMask(pasynUser, 0)


in the static asynStatus connect(void *pvt, asynUser *pasynUser) and in the In32 interface function.


but still the messages are continuously loaded on the IOC shell.


(1) where in the driver i have to use  pasynTrace->setTraceMask(pasynUser, 0)

 or asynSetTraceMask()

(2) and want to know is these message are displaying because of the port is not connected and record support is trying to access the port?


I checked that if i put asynSetTraceMask() after iocInit, it is stopping the displaying messages. But if i put before iocInit it is continuously displaying the messages.


So in my asyn based driver, where i should use this function so it execute after iocInit?


Thank you


Vishnu




From: Mark Rivers <[email protected]>
Sent: Wed, 04 Mar 2015 02:50:33
To: "'[email protected]'" <[email protected]>
Cc: techtalk <[email protected]>
Subject: Re: error on the IOC shell for asyn driver

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 >

 


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 Mark Rivers

Navigate by Date:
Prev: How to handle out-of-index of MBBO/MBBI? Jeong Han Lee
Next: Errors while building medm3.1.9 GONG Yu
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 Rod Nussbaumer
Next: RE: error on the IOC shell for asyn driver Mark Rivers
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 ·