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  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS V4 question
From: Michael Davidsaver <[email protected]>
To: Mark Rivers <[email protected]>, EPICS Tech-Talk <[email protected]>
Date: Sun, 9 Oct 2016 14:37:51 -0400
Mark,

First, the *Requester classes are somewhat "transient", so it's probably
not a good idea to combine this with ADDriver, which isn't.  You may
also get into trouble should you wish to have one ADDriver associated
with more than on PVA channel (as you have inadvertently done).

Disconnecting is done with Channel::destory(), not the ChannelRequester.
 For various annoying reasons it is *not* sufficient to let a connected
Channel be destroyed (as in c++ destructor).  Calling Channel::destory()
is mandatory.

You may (or not) find the following test code useful in understanding
the Channel/Monitor lifecycle.

https://github.com/mdavidsaver/pva2pva/blob/master/testApp/testtest.cpp

Michael


On 10/09/2016 01:24 PM, Mark Rivers wrote:
> I have some EPICS V4 client code that basically does the following:
> 
>  
> 
> class epicsShareClass pvaDriver : public ADDriver,
> 
>         public virtual epics::pvAccess::ChannelRequester,
> 
>         public virtual epics::pvData::MonitorRequester
> 
>  
> 
> …
> 
>  
> 
>     try
> 
>     {
> 
>         ClientFactory::start();
> 
>         m_provider = getChannelProviderRegistry()->getProvider("pva");
> 
>         m_channel = m_provider->createChannel(m_pvName, m_thisPtr,
> m_priority);
> 
>         m_pvRequest = CreateRequest::create()->createRequest(m_request);
> 
>         m_monitor = m_channel->createMonitor(m_thisPtr, m_pvRequest);
> 
>     }
> 
>     catch (exception &ex)
> 
>     {
> 
> …
> 
>     }
> 
>  
> 
> The monitorConnect() and monitorEvent() methods are being called as
> expected, and everything is working.
> 
>  
> 
> Now I want to extend the code to allow the current channel to be
> disconnected, and call m_provider->createChannel() to a different
> channel.  What do I need to do for this?  I found that if I just call
> m_provider->createChannel with a different p_pvName it does not throw an
> exception, but it appears to simply stay connected to the existing channel.
> 
>  
> 
> Thanks,
> 
> Mark
> 
>  
> 


Replies:
RE: EPICS V4 question Mark Rivers
Re: EPICS V4 question Benjamin Franksen
References:
EPICS V4 question Mark Rivers

Navigate by Date:
Prev: EPICS V4 question Mark Rivers
Next: RE: EPICS V4 question Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: EPICS V4 question Mark Rivers
Next: RE: EPICS V4 question Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 13 Oct 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·