g+
g+ Communities
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  <20122013  2014  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
<== Date ==> <== Thread ==>

Subject: RE: iocshCmd, redirection, and function pointers
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "'Eric Norum'" <wenorum@lbl.gov>, "Allison, Stephanie" <saa@slac.stanford.edu>
Cc: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Tue, 13 Mar 2012 22:13:57 +0000
Thanks to Eric for pointing this out, I was not aware of it.

I have just made 2 changes to the asyn module to enable I/O redirection using both the "dbior" and "asynReport" commands.

I tested it with an areaDetector driver and it seems to work fine:

epics> dbior > dbior.out
epics> asynReport > asynReport.out

This is now committed to the Subversion repository, where it can be accessed from the Web, and it will be in the R4-19 release.

The asynTrace command already has a more powerful I/O redirection capability:

asynSetTraceFile portName addr filename

This allows one to redirect the trace (debugging) output at the level of a specific device, i.e. a single motor axis, etc.

Mark


-----Original Message-----
From: tech-talk-bounces@aps.anl.gov [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of Eric Norum
Sent: Tuesday, March 13, 2012 4:23 PM
To: Allison, Stephanie
Cc: EPICS Tech Talk
Subject: Re: iocshCmd, redirection, and function pointers

For I/O redirection to work a source file must include epicsStdioRedirect.h.  
It's likely that lots of support modules and drivers have not yet done so.


On Mar 13, 2012, at 2:11 PM, Allison, Stephanie wrote:

> Hello,
> 
> When using redirection of output to a file in iocshCmd where the command is one that calls report functions via function pointer like dbior:
> 
> iocshCmd("dbior > /dat/dbiorOutput")
> 
> the output file contains only the output (printf) from the dbior routine itself but not output (printf) from each driver (called using a function pointer in drvet).
> 
> Is this a limitation of the iocsh, mixing C and C++, or the non-thread-safeness (as advertised in the app dev guide) of iocshCmd?  Or am I doing something else wrong?  It  happens on linux-x86_64, RTEMS 4.9.4, and vxWorks 5.4.
> 
> Thank you,
> Stephanie Allison
> 


-- 
Eric Norum
wenorum@lbl.gov




References:
iocshCmd, redirection, and function pointers Allison, Stephanie
Re: iocshCmd, redirection, and function pointers Eric Norum

Navigate by Date:
Prev: Re: SmarAct / SmarPod Ernest L. Williams Jr.
Next: Re: MVME2434-1 Bill Lavender
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
Navigate by Thread:
Prev: Re: iocshCmd, redirection, and function pointers Eric Norum
Next: Re: iocshCmd, redirection, and function pointers Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·