EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: dynamically remove PV's from excas?
From: "Jeff Hill" <[email protected]>
To: "'Benjamin Sailer'" <[email protected]>, "'EPICS Tech-Talk'" <[email protected]>
Date: Mon, 4 Aug 2003 12:07:20 -0600
The server library maintains a count of the number of clients that are using a
particular casPV. When the number of clients goes from one to zero the server
library calls casPV::destroy(). This is a virtual method which can be overridden
in the derived class. The base implementation does a "delete this", but you may
have overridden this function to be a noop so that you are in control of the
life time management of the PV.

Destroying the PV while clients are using it is generally considered to be
unfriendly, but probably still necessary in certain circumstances.

PS:

You are using R3.14beta2. Bugs have been fixed in the portable server library
since that release. In particular R3.14.2 includes fixes that resulted from
robustness testing the CA gateway with R3.14.1. Additional CA gateway testing
driven portable server robustness fixes will also show up in R3.14.3.

Note however that the preceding paragraph refers to the portable server library
which is not (yet) used in iocCore and therefore does not (yet) impact the
reliability of IOCs.

Jeff

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Benjamin
> Sailer
> Sent: Friday, August 01, 2003 11:22 AM
> To: EPICS Tech-Talk
> Subject: dynamically remove PV's from excas?
> 
> Hello all,
> 
> using R3.14beta2 cas library I was trying to create a Server that
> dynamically creates PVs (serving as a parameters that the server
> itself can get from another source).  Up to now, every time when
> I received the query for a new PV, the cas checks whether it conforms
> to a naming convention and - if so - creates a PV that can be used
> to transfer the parameters.  But as those are allocated dynamically,
> the memory consumption of the server would grow to infinate if the
> server is running all the time, so I was wondering whether I could
> remove PVs once used.  I tried this and failed, but I'm not sure
> whether this was due to wrong programming on my side.  Is there some
> caching of parameters that could fail if I give a pointer to my
> parameter as a return value of
> 
> pvAttachReturn pvAttach(const casCtx &ctx, const char *pPVName);
> 
> and after some time calling a 'delete' for this pointer.  I was thinking
> of something like
> 
> <snip>
> while (aitTrue) {
> 	fileDescriptorManager.process(SCAN_INTERVAL);
> 	cas->expireParams(EXPIRE_INTERVAL);
> }
> </snip>
> 
> in main() where cas->expireParams() looks for parameters unused
> and removes them from the parameter list that is checked on every
> 
> pvExistReturn pvExistTest(const casCtx &ctx, const char *pPVName);
> 
> (I really don't state this is not working due to the cas library,
> I just want to rule out that this can be the source of my problem).
> 
> Thanks
> 
> Benjamin
> 
> --
> *****************************************************************
> Benjamin Sailer
> eMail: [email protected]
> *****************************************************************
> Disclaimer:  This signature has been generated automatically and
> does not reflect my opinion at all.
>                 -- Benjamin Sailer
> 
> Graduate students and most professors are no smarter than undergrads.
> They're just older.



References:
dynamically remove PV's from excas? Benjamin Sailer

Navigate by Date:
Prev: RE: multiple identical names from casr 2 Jeff Hill
Next: about building caTCL zhaozhuo
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: dynamically remove PV's from excas? Benjamin Sailer
Next: Problem with static build on Linux solved Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·