pvAccessCPP
7.1.6
rpcService
pv
rpcServer.h
1
/**
2
* Copyright - See the COPYRIGHT that is included with this distribution.
3
* pvAccessCPP is distributed subject to a Software License Agreement found
4
* in file LICENSE that is included with this distribution.
5
*/
6
7
#
ifndef
RPCSERVER_H
8
#
define
RPCSERVER_H
9
10
#
ifdef
epicsExportSharedSymbols
11
#
define
rpcServerEpicsExportSharedSymbols
12
#
undef
epicsExportSharedSymbols
13
#
endif
14
15
#
include
<
pv
/
sharedPtr
.
h
>
16
17
#
ifdef
rpcServerEpicsExportSharedSymbols
18
#
define
epicsExportSharedSymbols
19
#
undef
rpcServerEpicsExportSharedSymbols
20
#
endif
21
22
#
include
<
pv
/
pvAccess
.
h
>
23
#
include
<
pv
/
rpcService
.
h
>
24
#
include
<
pv
/
serverContext
.
h
>
25
26
#
include
<
shareLib
.
h
>
27
28
namespace
epics {
29
namespace
pvAccess
{
30
31
class
ServerContext;
32
class
RPCChannelProvider;
33
34
//! Serves (only) RPCServiceAsync and RPCService instances.
35
class
epicsShareClass
RPCServer
:
36
public
std
::
tr1
::
enable_shared_from_this
<
RPCServer
>
37
{
38
private
:
39
40
std
::
tr1
::
shared_ptr
<
ServerContext
>
m_serverContext
;
41
std
::
tr1
::
shared_ptr
<
RPCChannelProvider
>
m_channelProviderImpl
;
42
43
public
:
44
POINTER_DEFINITIONS
(
RPCServer
);
45
46
explicit
RPCServer
(
const
Configuration
::
const_shared_pointer
&
conf
=
Configuration
::
const_shared_pointer
());
47
48
virtual
~
RPCServer
();
49
50
void
registerService
(
std
::
string
const
&
serviceName
,
RPCServiceAsync
::
shared_pointer
const
&
service
);
51
52
void
unregisterService
(
std
::
string
const
&
serviceName
);
53
54
void
run
(
int
seconds
= 0);
55
56
/// Method requires usage of std::tr1::shared_ptr<RPCServer>. This instance must be
57
/// owned by a shared_ptr instance.
58
void
runInNewThread
(
int
seconds
= 0);
59
60
void
destroy
();
61
62
/**
63
* Display basic information about the context.
64
*/
65
void
printInfo
();
66
67
const
std
::
tr1
::
shared_ptr
<
ServerContext
>&
getServer
()
const
{
return
m_serverContext
; }
68
};
69
70
epicsShareFunc
Channel
::
shared_pointer
createRPCChannel
(
ChannelProvider
::
shared_pointer
const
&
provider
,
71
std
::
string
const
&
channelName
,
72
ChannelRequester
::
shared_pointer
const
&
channelRequester
,
73
RPCServiceAsync
::
shared_pointer
const
&
rpcService
);
74
75
}
76
}
77
78
#
endif
/* RPCSERVER_H */
epics::pvAccess::RPCServer
Serves (only) RPCServiceAsync and RPCService instances.
Definition:
rpcServer.h:35
epics::pvAccess::Transport::authNZMessage
virtual void authNZMessage(epics::pvData::PVStructure::shared_pointer const &data)=0
Pass data to the active security plug-in session.
Generated on Wed Sep 7 2022 16:11:21 for pvAccessCPP by
1.8.13