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  2022  2023  2024  <2025 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
<== Date ==> <== Thread ==>

Subject: StreamDevice : scope of system variables
From: Peter Milne via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech-Talk <tech-talk at aps.anl.gov>
Date: Thu, 13 Mar 2025 08:53:22 +0000
Hello, this question is really for Dirk if you are there:

Our system uses StreamDevice together with Asyn to set and get parameters on local socket connections.
When there is a lot of traffic (eg 50 parameters) on one socket connection, I'd tend to open another socket to the same parameter services, maybe one socket for high priority and one for low priority, this works better, faults are more localized and it's easier to debug.

We have a requirement to increase the System Variable: ReplyTimeout on one command in one protocol file.

So, it's easy of course to add the appropriate ReplyTimeout to the top of that protocol file; now all the commands in the file get that timeout, but it's OK, there are only a few, and in any case, if the scope of the System Variable is limited to the single protocol file, it would be easy to split out the single command response into its own protocol file if necessary. 
That would be absolutely fine and good but does it really work like that?

My question about System Variables, is what is their scope?
is it:
1/ Global across the whole IOC, across all sockets/channels and protocol files.
2/ Local to a given socket/channel, but applying across all protocol files using that socket  or
3/ Local to the protocol file. Other protocol files used on the same socket/channel are unaffected.

I'm hoping it's a 3,  could be indicated by:
"System and user variables can be set in the global context of the protocol file or locally inside protocols".

But I'm not sure, do all the protocol files really have independent context, or is it "the last value setting is the one that sticks"

ie if two protocol files set the same SystemVariable on the same socket, do each get their own setting, or is it undefined which one we end up with.  That would be amazing, but I'm thinking the answer may really be #2 "local to socket".   I'm sure it's not a crude full-program global as per #1


Thanks

Peter


--
Peter Milne, Director of Sales
www.d-tacq.com

Replies:
RE: StreamDevice : scope of system variables Zimoch Dirk via Tech-talk

Navigate by Date:
Prev: Re: areaDetector build system question Ralph Lange via Tech-talk
Next: RE: StreamDevice : scope of system variables Zimoch Dirk 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: areaDetector build system question Jörn Dreyer via Tech-talk
Next: RE: StreamDevice : scope of system variables Zimoch Dirk 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
ANJ, 19 Mar 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·