deprecate RPCClient::sendRequest()
Changes to provider factory registery make this very inefficient (build a new client context of each request)
This commit is contained in:
@ -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;
|
||||
|
||||
|
||||
|
||||
|
@ -24,18 +24,6 @@ int main()
|
||||
request->getSubField<PVString>("a")->put("3.14");
|
||||
request->getSubField<PVString>("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
|
||||
{
|
||||
|
Reference in New Issue
Block a user