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-talk at aps.anl.gov>:
> 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://github.com/epics-modules/ioczed/blob/master/zzzApp/Db/streamExample.db <https://github.com/epics-modules/ioczed/blob/master/zzzApp/Db/streamExample.db>) 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://github.com/paulscherrerinstitute/StreamDevice/blob/dfbd308d4602e7cb99d7f60ddf35909a70f41c4f/src/StreamEpics.cc#L297-L307
>
> 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.
- Replies:
- RE: Calling the streamReload IOC Shell function within C Wang, Andrew via Tech-talk
- 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
- Navigate by Date:
- Prev:
Re: Calling the streamReload IOC Shell function within C Michael Davidsaver 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
<2022>
2023
2024
2025
- Navigate by Thread:
- Prev:
Re: Calling the streamReload IOC Shell function within C Michael Davidsaver via Tech-talk
- Next:
RE: Calling the streamReload IOC Shell function within C Wang, Andrew 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
<2022>
2023
2024
2025
|