Specify pvRequest sent when creating ChannelRPC

Add the ability to specify the pvRequest PVStructure sent when creating
a Channel RPC using the pvAccess rpcClient library.

RPCClient::create() is overloaded to allow the pvRequest to be specified
whilst retaining the old default for convenience and backwards
compatibility.
This commit is contained in:
Dave Hickin
2015-12-09 11:39:57 +00:00
parent 9b43a07b47
commit 590a53157f
2 changed files with 33 additions and 11 deletions

View File

@@ -48,6 +48,16 @@ namespace pvAccess
*/
static shared_pointer create(const std::string & serviceName);
/**
* Create a RPCClient.
*
* @param serviceName the service name
* @param pvRequest the pvRequest for the ChannelRPC
* @return the RPCClient interface
*/
static shared_pointer create(const std::string & serviceName,
epics::pvData::PVStructure::shared_pointer const & pvRequest);
/**
* Performs complete blocking RPC call, opening a channel and connecting to the
* service and sending the request.
@@ -129,10 +139,12 @@ namespace pvAccess
virtual ~RPCClient() {}
protected:
RPCClient(const std::string & serviceName);
RPCClient(const std::string & serviceName,
epics::pvData::PVStructure::shared_pointer const & pvRequest);
std::string m_serviceName;
Channel::shared_pointer m_channel;
epics::pvData::PVStructure::shared_pointer m_pvRequest;
};
}