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  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  2025  2026  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  <20222023  2024  2025  2026 
<== Date ==> <== Thread ==>

Subject: RE: Calling the streamReload IOC Shell function within C
From: "Wang, Andrew via Tech-talk" <[email protected]>
To: "Zimoch Dirk (PSI)" <[email protected]>, EPICS tech-talk <[email protected]>
Date: Mon, 24 Jan 2022 16:37:28 +0000
Thank you!

-----Original Message-----
From: Zimoch Dirk (PSI) <[email protected]> 
Sent: Monday, January 24, 2022 1:42 AM
To: Wang, Andrew <[email protected]>; EPICS tech-talk <[email protected]>
Subject: AW: Calling the streamReload IOC Shell function within C

Hi Andy,

I am going to add streamReload into devStream.h. You can simply do that for now.
 I just need to check first which Windows decorations are needed...

Dirk

> -----Ursprüngliche Nachricht-----
> Von: Wang, Andrew <[email protected]>
> Gesendet: Montag, 24. Januar 2022 09:18
> An: Zimoch Dirk (PSI) <[email protected]>; EPICS tech-talk <tech- 
> [email protected]>
> Betreff: RE: Calling the streamReload IOC Shell function within C
> 
> Hi Dirk,
> 
> Since there isn't a function prototype for streamReload, do you 
> recommend that I manually add it into devStream.h? gcc isn't liking 
> the fact that I am calling to streamReload, because there is no prototype.
> 
> Thanks,
> Andy
> 
> -----Original Message-----
> From: Zimoch Dirk (PSI) <[email protected]>
> Sent: Saturday, January 22, 2022 3:04 AM
> To: EPICS tech-talk <[email protected]>; Wang, Andrew 
> <[email protected]>
> Cc: Michael Davidsaver <[email protected]>
> Subject: Re: Calling the streamReload IOC Shell function within C
> 
> Hi Andy
> 
> You can call extern „C“ long streamReload(const char* recordname) 
> directly from C/C++. If NULL is passed for recordname, then all 
> StreamDevice records reload. If a record is in the middle of 
> processing, the running protocol is aborted and the record goes to INVALID alarm until the next processing.
> 
> It seems I have forgotten to put the function prototype into 
> devStream.h. Will be done in the next release.
> 
> Dirk
> 
> > Am 22.01.2022 um 06:08 schrieb Michael Davidsaver via Tech-talk 
> > <tech-
> [email protected]>:
> > On 1/21/22 19:39, Wang, Andrew via Tech-talk wrote:
> >> This is a far-fetched question, but I was wondering whether there 
> >> is a
> possibility of executing streamReload, or a similar functionality, 
> within a C function. The reason why I ask is because I saw within this 
> Github link
> (https://urldefense.us/v3/__https://github.com/epics-
> modules/ioczed/blob/master/zzzApp/Db/streamExample.db__;!!G2kpM7uM-
> TzIFchu!gjnSZo93VcnoDkmziao7QLSXtfmZDUg0hZ5hqdkj-
> M2oKQch9GQRdAvkPjUS4spw6a4$
> <https://urldefense.us/v3/__https://github.com/epics-
> modules/ioczed/blob/master/zzzApp/Db/streamExample.db__;!!G2kpM7uM-
> TzIFchu!gjnSZo93VcnoDkmziao7QLSXtfmZDUg0hZ5hqdkj-
> M2oKQch9GQRdAvkPjUS4spw6a4$ >) that the SUB record calls streamReload.
> However, I couldn’t locate the source code for that, so I am not 
> entirely sure how it is used and what its arguments are. Thoughts?
> >
> > The registrar code adding both the function callable from subRecord 
> > as well as iocsh.
> >
> > https://urldefense.us/v3/__https://github.com/paulscherrerinstitute/
> > St
> >
> reamDevice/blob/dfbd308d4602e7cb99d7f60ddf35909a70f41c4f/src/StreamEpi
> > cs.cc*L297-L307__;Iw!!G2kpM7uM-
> TzIFchu!gjnSZo93VcnoDkmziao7QLSXtfmZDUg
> > 0hZ5hqdkj-M2oKQch9GQRdAvkPjUS5UlYp3c$
> >
> > So you could do something like
> >
> >> iocshCmd("streamReload");
> >
> > cf. iocsh.h from Base.
> >
> > Since it is already callable from a subRecord I assume it is 
> > thread-safe.

References:
Calling the streamReload IOC Shell function within C Wang, Andrew via Tech-talk
Re: Calling the streamReload IOC Shell function within C Michael Davidsaver via Tech-talk
Re: Calling the streamReload IOC Shell function within C Zimoch Dirk (PSI) via Tech-talk
RE: Calling the streamReload IOC Shell function within C Wang, Andrew via Tech-talk
AW: Calling the streamReload IOC Shell function within C Zimoch Dirk (PSI) via Tech-talk

Navigate by Date:
Prev: AW: Calling the streamReload IOC Shell function within C Zimoch Dirk (PSI) via Tech-talk
Next: Interrupt problem. Francisco Ramos via Tech-talk
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  <20222023  2024  2025  2026 
Navigate by Thread:
Prev: AW: Calling the streamReload IOC Shell function within C Zimoch Dirk (PSI) via Tech-talk
Next: New areaDetector releases Mark Rivers via Tech-talk
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  <20222023  2024  2025  2026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·