From 3a190cb5721aee2a097ac1f7f10e489956559231 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 8 Jun 2017 20:37:20 +0200 Subject: [PATCH] deprecate RPCClient::sendRequest() Changes to provider factory registery make this very inefficient (build a new client context of each request) --- src/rpcClient/pv/rpcClient.h | 2 +- testApp/remote/rpcClientExample.cpp | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/rpcClient/pv/rpcClient.h b/src/rpcClient/pv/rpcClient.h index 3dcde89..36ac806 100644 --- a/src/rpcClient/pv/rpcClient.h +++ b/src/rpcClient/pv/rpcClient.h @@ -70,7 +70,7 @@ public: * @throws RPCRequestException exception thrown on error on timeout. */ static epics::pvData::PVStructure::shared_pointer sendRequest(const std::string & serviceName, - epics::pvData::PVStructure::shared_pointer const &request, double timeOut = RPCCLIENT_DEFAULT_TIMEOUT); + epics::pvData::PVStructure::shared_pointer const &request, double timeOut = RPCCLIENT_DEFAULT_TIMEOUT) EPICS_DEPRECATED; diff --git a/testApp/remote/rpcClientExample.cpp b/testApp/remote/rpcClientExample.cpp index 2d6c2f4..7d38b21 100644 --- a/testApp/remote/rpcClientExample.cpp +++ b/testApp/remote/rpcClientExample.cpp @@ -24,18 +24,6 @@ int main() request->getSubField("a")->put("3.14"); request->getSubField("b")->put("2.71"); - std::cout<<"simplest way\n"; - try - { - PVStructure::shared_pointer result = RPCClient::sendRequest("sum", request, TIMEOUT); - std::cout << "Error: " << *result << std::endl; - } catch (std::exception &e) - { - std::cout << e.what() << std::endl; - return 1; - } - - std::cout<<"simple sync way, allows multiple RPC calls on the client instance\n"; try {