Experimental Physics and
| |||||||||||||||||||||||
|
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]]
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
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
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
| ||||||||||||||||||||||
ANJ, 16 Dec 2015 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |