When you called
pasynTrace->setTraceMask(pasynUser, 0)
had you connected that pasynUser to your driver with pasynManager->connectDevice()? If so it should have stopped the messages.
I assume that you have set your driver to autoConnect. So each time a record tries to process it will call your connect() routine. You could put some logic there that senses if the port is disconnect and if there have been too many failed attempts and calls pasynTrace->setTraceMask(pasynUser, 0). When there is a successful connection attempt you could call pasynTrace->setTraceMask(pasynUser, 1).
What is your driver talking to? Is it using an underlying asyn driver, like drvAsynIPPort or drvAsynSerialPort?
Mark
________________________________
From: [email protected] [[email protected]]
Sent: Wednesday, March 04, 2015 2:30 AM
To: Mark Rivers
Cc: techtalk
Subject: Re: error on the IOC shell for asyn driver
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
[http://sigads.rediff.com/RealMedia/ads/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle&rogue=1716b54fe387786204c5115fd1c9b84babf33ef6&rogue=cf167694ae576818652135c25f920f9aa1c89d4e]<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%2Fwww%2Erediffmail%2Ecom%2Fcgi%2Dbin%2Fred%2Ecgi%3Fred%3Dhttp%253A%252F%252Ftrack%252Erediff%252Ecom%252Fclick%253Furl%253D%255F%255F%255Fhttp%253A%252F%252Fbusinessemail%252Erediff%252Ecom%253Fsc%255Fcid%253Dsign%252D1%252D10%252D13%255F%255F%255F%2526amp%253Bcmp%253Dhost%2526amp%253Blnk%253Dsign%252D1%252D10%252D13%2526amp%253Bnsrv1%253Dhost%26amp%3BisImage%3D0%26amp%3BBlockImage%3D0%26amp%3Brediffng%3D0%26amp%3Brogue%3D387537254f7eee557c3b17544bd037e8098bd82e&isImage=0&BlockImage=0&rediffng=0&rogue=78c8fa0e40ce929e408b9901835e54d832589501>
[http://sigads.rediff.com/RealMedia/ads/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle&rogue=1716b54fe387786204c5115fd1c9b84babf33ef6]<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/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle]<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>
- Replies:
- RE: error on the IOC shell for asyn driver Mark Rivers
- References:
- Re: error on the IOC shell for asyn driver Vishnu Patel
- Navigate by Date:
- Prev:
RE: Errors while building medm3.1.9 Mark Rivers
- Next:
Re: sseq 2-2-1 issue/bug Matthew D. Moore
- 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:
Re: error on the IOC shell for asyn driver Vishnu Patel
- 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
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|