pvaClientCPP  4.8.1-dev
Public Member Functions | Static Public Member Functions | Friends | List of all members
epics::pvaClient::PvaClientRPC Class Reference

An easy to use alternative to RPC. More...

#include <pv/pvaClient.h>

Inheritance diagram for epics::pvaClient::PvaClientRPC:

Public Member Functions

 POINTER_DEFINITIONS (PvaClientRPC)
 
 ~PvaClientRPC ()
 Destructor. More...
 
void setResponseTimeout (double responseTimeout)
 Set a timeout for a request. More...
 
double getResponseTimeout ()
 Get the responseTimeout. More...
 
void connect ()
 Call issueConnect and then waitConnect. More...
 
void issueConnect ()
 Issue the channelRPC connection to the channel. More...
 
epics::pvData::Status waitConnect ()
 Wait until the channelRPC connection to the channel is complete. More...
 
epics::pvData::PVStructure::shared_pointer request (epics::pvData::PVStructure::shared_pointer const &pvArgument)
 Issue a request and wait for response. More...
 
void request (epics::pvData::PVStructure::shared_pointer const &pvArgument, PvaClientRPCRequesterPtr const &pvaClientRPCRequester)
 issue a request and return immediately. More...
 

Static Public Member Functions

static PvaClientRPCPtr create (PvaClientPtr const &pvaClient, epics::pvAccess::Channel::shared_pointer const &channel)
 Create a PvaClientRPC. More...
 
static PvaClientRPCPtr create (PvaClientPtr const &pvaClient, epics::pvAccess::Channel::shared_pointer const &channel, epics::pvData::PVStructurePtr const &pvRequest)
 Create a PvaClientRPC. More...
 

Friends

class RPCRequesterImpl
 

Detailed Description

An easy to use alternative to RPC.

Definition at line 1685 of file pvaClient.h.

Constructor & Destructor Documentation

◆ ~PvaClientRPC()

epics::pvaClient::PvaClientRPC::~PvaClientRPC ( )

Destructor.

Definition at line 112 of file pvaClientRPC.cpp.

Member Function Documentation

◆ connect()

void epics::pvaClient::PvaClientRPC::connect ( )

Call issueConnect and then waitConnect.

An exception is thrown if connect fails.

Definition at line 216 of file pvaClientRPC.cpp.

◆ create() [1/2]

static PvaClientRPCPtr epics::pvaClient::PvaClientRPC::create ( PvaClientPtr const &  pvaClient,
epics::pvAccess::Channel::shared_pointer const &  channel 
)
static

Create a PvaClientRPC.

Parameters
&pvaClientInterface to PvaClient
channelInterface to Channel
Returns
The interface to the PvaClientRPC.

◆ create() [2/2]

static PvaClientRPCPtr epics::pvaClient::PvaClientRPC::create ( PvaClientPtr const &  pvaClient,
epics::pvAccess::Channel::shared_pointer const &  channel,
epics::pvData::PVStructurePtr const &  pvRequest 
)
static

Create a PvaClientRPC.

Parameters
&pvaClientInterface to PvaClient
channelInterface to Channel
pvRequestThe request structure.
Returns
The interface to the PvaClientRPC.

◆ getResponseTimeout()

double epics::pvaClient::PvaClientRPC::getResponseTimeout ( )
inline

Get the responseTimeout.

Returns
The value.

Definition at line 1724 of file pvaClient.h.

◆ issueConnect()

void epics::pvaClient::PvaClientRPC::issueConnect ( )

Issue the channelRPC connection to the channel.

This can only be called once. An exception is thrown if connect fails.

Exceptions
runtime_errorif failure.

Definition at line 232 of file pvaClientRPC.cpp.

◆ POINTER_DEFINITIONS()

epics::pvaClient::PvaClientRPC::POINTER_DEFINITIONS ( PvaClientRPC  )

◆ request() [1/2]

epics::pvData::PVStructure::shared_pointer epics::pvaClient::PvaClientRPC::request ( epics::pvData::PVStructure::shared_pointer const &  pvArgument)

Issue a request and wait for response.

Note that if responseTimeout is ( lt 0.0, ge 0.0) then this (will, will not) block until response completes or timeout.

Parameters
pvArgumentThe data to send to the service.
Returns
The result
Exceptions
runtime_errorif failure.

◆ request() [2/2]

void epics::pvaClient::PvaClientRPC::request ( epics::pvData::PVStructure::shared_pointer const &  pvArgument,
PvaClientRPCRequesterPtr const &  pvaClientRPCRequester 
)

issue a request and return immediately.

Parameters
pvArgumentThe data to send to the service.
pvaClientRPCRequesterThe requester that is called with the result.
Exceptions
runtime_errorif failure.

◆ setResponseTimeout()

void epics::pvaClient::PvaClientRPC::setResponseTimeout ( double  responseTimeout)
inline

Set a timeout for a request.

Parameters
responseTimeoutThe time in seconds to wait for a request to complete.

Definition at line 1716 of file pvaClient.h.

◆ waitConnect()

Status epics::pvaClient::PvaClientRPC::waitConnect ( )

Wait until the channelRPC connection to the channel is complete.

Returns
status;

Definition at line 252 of file pvaClientRPC.cpp.

Friends And Related Function Documentation

◆ RPCRequesterImpl

friend class RPCRequesterImpl
friend

Definition at line 1800 of file pvaClient.h.


The documentation for this class was generated from the following files: