12 #ifdef epicsExportSharedSymbols 13 # define rpcServiceEpicsExportSharedSymbols 14 # undef epicsExportSharedSymbols 17 #include <pv/sharedPtr.h> 18 #include <pv/status.h> 20 #ifdef rpcServiceEpicsExportSharedSymbols 21 # define epicsExportSharedSymbols 22 # undef rpcServiceEpicsExportSharedSymbols 25 #include <pv/pvAccess.h> 32 class epicsShareClass RPCRequestException :
public std::runtime_error {
35 explicit RPCRequestException(std::string
const & message) :
36 std::runtime_error(message), m_status(epics::pvData::Status::STATUSTYPE_ERROR)
39 RPCRequestException(epics::pvData::Status::StatusType status, std::string
const & message) :
40 std::runtime_error(message), m_status(status)
43 epics::pvData::Status::StatusType getStatus()
const {
47 epics::pvData::Status asStatus()
const {
48 return epics::pvData::Status(m_status, what());
51 epics::pvData::Status::StatusType m_status;
54 class epicsShareClass RPCResponseCallback
57 POINTER_DEFINITIONS(RPCResponseCallback);
59 virtual ~RPCResponseCallback() {};
61 virtual void requestDone(
62 epics::pvData::Status
const & status,
63 epics::pvData::PVStructure::shared_pointer
const & result
67 class epicsShareClass RPCServiceAsync
70 POINTER_DEFINITIONS(RPCServiceAsync);
72 virtual ~RPCServiceAsync() {};
75 epics::pvData::PVStructure::shared_pointer
const & args,
76 RPCResponseCallback::shared_pointer
const & callback
80 class epicsShareClass RPCService :
81 public RPCServiceAsync
84 POINTER_DEFINITIONS(RPCService);
86 virtual ~RPCService() {};
88 virtual epics::pvData::PVStructure::shared_pointer request(
89 epics::pvData::PVStructure::shared_pointer
const & args
94 epics::pvData::PVStructure::shared_pointer
const & args,
95 RPCResponseCallback::shared_pointer
const & callback
#define FINAL
Copyright - See the COPYRIGHT that is included with this distribution.