add support for channelRPC

This commit is contained in:
mrkraimer
2016-06-22 11:33:39 -04:00
parent a7fb12a16f
commit 5398d67e2a
4 changed files with 449 additions and 1 deletions

View File

@@ -528,6 +528,30 @@ PvaClientMonitorPtr PvaClientChannel::createMonitor(PVStructurePtr const & pvR
return PvaClientMonitor::create(yyy,channel,pvRequest);
}
PVStructurePtr PvaClientChannel::rpc(
PVStructurePtr const & pvRequest,
PVStructurePtr const & pvArgument)
{
PvaClientRPCPtr rpc = createRPC(pvRequest);
return rpc->request(pvArgument);
}
PVStructurePtr PvaClientChannel::rpc(
PVStructurePtr const & pvArgument)
{
return rpc(pvArgument,pvArgument);
}
PvaClientRPCPtr PvaClientChannel::createRPC(PVStructurePtr const & pvRequest)
{
if(connectState!=connected) connect(5.0);
PvaClientPtr yyy = pvaClient.lock();
if(!yyy) throw std::runtime_error("PvaClient was destroyed");
return PvaClientRPC::create(yyy,channel,pvRequest);
}
void PvaClientChannel::showCache()
{
if(pvaClientGetCache->cacheSize()>=1) {