pvAccessCPP
7.1.9
Toggle main menu visibility
Loading...
Searching...
No Matches
rpcClient
pv
rpcClient.h
1
6
7
#ifndef RPCCLIENT_H
8
#define RPCCLIENT_H
9
10
#include <
string
>
11
12
#ifdef epicsExportSharedSymbols
13
# define rpcClientEpicsExportSharedSymbols
14
# undef epicsExportSharedSymbols
15
#endif
16
#include <pv/pvData.h>
17
#include <pv/valueBuilder.h>
18
#ifdef rpcClientEpicsExportSharedSymbols
19
# define epicsExportSharedSymbols
20
# undef rpcClientEpicsExportSharedSymbols
21
#endif
22
23
#include <pv/rpcService.h>
24
25
#include <shareLib.h>
26
27
#define RPCCLIENT_DEFAULT_TIMEOUT 5.0
28
29
namespace
epics
30
{
31
32
namespace
pvAccess
33
{
34
39
class
epicsShareClass RPCClient
40
{
41
public
:
42
POINTER_DEFINITIONS(RPCClient);
43
51
static
shared_pointer
create
(
const
std::string
& serviceName,
52
epics::pvData::PVStructure::shared_pointer
const
& pvRequest = epics::pvData::PVStructure::shared_pointer());
53
54
RPCClient(
const
std::string
& serviceName,
55
epics::pvData::PVStructure::shared_pointer
const
& pvRequest,
56
const
ChannelProvider::shared_pointer& provider = ChannelProvider::shared_pointer(),
57
const
std::string
& address =
std::string
());
58
59
~RPCClient() {
destroy
();}
60
61
62
66
void
destroy
();
67
76
bool
connect
(
double
timeout = RPCCLIENT_DEFAULT_TIMEOUT);
77
82
void
issueConnect
();
83
90
bool
waitConnect
(
double
timeout = RPCCLIENT_DEFAULT_TIMEOUT);
91
102
epics::pvData::PVStructure::shared_pointer
request
(
103
epics::pvData::PVStructure::shared_pointer
const
& pvArgument,
104
double
timeout = RPCCLIENT_DEFAULT_TIMEOUT,
105
bool
lastRequest =
false
);
106
114
void
issueRequest
(
115
epics::pvData::PVStructure::shared_pointer
const
& pvArgument,
116
bool
lastRequest =
false
);
117
124
epics::pvData::PVStructure::shared_pointer
waitResponse
(
double
timeout = RPCCLIENT_DEFAULT_TIMEOUT);
125
126
private
:
127
128
const
std::string
m_serviceName;
129
ChannelProvider::shared_pointer m_provider;
130
Channel::shared_pointer m_channel;
131
ChannelRPC::shared_pointer m_rpc;
132
const
epics::pvData::PVStructure::shared_pointer m_pvRequest;
133
134
struct
RPCRequester;
135
std::tr1::shared_ptr<RPCRequester> m_rpc_requester;
136
137
RPCClient(
const
RPCClient&);
138
RPCClient&
operator=
(
const
RPCClient&);
139
};
140
141
}
142
143
}
144
145
#endif
146
147
string
operator=
constexpr complex< _Tp > & operator=(const _Tp &)
std::string
basic_string< char > string
epics::pvAccess::RPCClient::issueRequest
void issueRequest(epics::pvData::PVStructure::shared_pointer const &pvArgument, bool lastRequest=false)
Issue a channelRPC request and return immediately.
epics::pvAccess::RPCClient::create
static shared_pointer create(const std::string &serviceName, epics::pvData::PVStructure::shared_pointer const &pvRequest=epics::pvData::PVStructure::shared_pointer())
Create a RPCClient.
epics::pvAccess::RPCClient::destroy
void destroy()
Destroy this instance (i.e.
epics::pvAccess::RPCClient::issueConnect
void issueConnect()
Issue a connect request and return immediately.
epics::pvAccess::RPCClient::waitResponse
epics::pvData::PVStructure::shared_pointer waitResponse(double timeout=5.0)
Wait for the request to complete.
epics::pvAccess::RPCClient::connect
bool connect(double timeout=5.0)
Connect to the server.
epics::pvAccess::RPCClient::waitConnect
bool waitConnect(double timeout=5.0)
Wait for the connect request to complete.
epics::pvAccess::RPCClient::request
epics::pvData::PVStructure::shared_pointer request(epics::pvData::PVStructure::shared_pointer const &pvArgument, double timeout=5.0, bool lastRequest=false)
Sends a request and wait for the response or until timeout occurs.
epics::pvAccess
Holds all PVA related.
Definition
monitor.h:37
epics
Copyright - See the COPYRIGHT that is included with this distribution.
Generated on
for pvAccessCPP by
1.17.0