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