Definition at line 762 of file channelLocal.cpp.
epics::pvDatabase::ChannelRPCLocal::ChannelRPCLocal |
( |
ChannelLocalPtr const & |
channelLocal, |
|
|
ChannelRPCRequester::shared_pointer const & |
channelRPCRequester, |
|
|
RPCServiceAsync::shared_pointer const & |
service, |
|
|
PVRecordPtr const & |
pvRecord |
|
) |
| |
|
inline |
Definition at line 776 of file channelLocal.cpp.
781 channelLocal(channelLocal),
782 channelRPCRequester(channelRPCRequester),
epics::pvDatabase::ChannelRPCLocal::~ChannelRPCLocal |
( |
| ) |
|
|
virtual |
virtual void epics::pvDatabase::ChannelRPCLocal::cancel |
( |
| ) |
|
|
inlinevirtual |
Cancel any pending request. Completion will be reported via request's response callback:
-
if cancel() request is issued after the request was already complete, request success/failure completion will be reported and cancel() request ignored.
-
if the request was actually canceled, cancellation completion is reported.
Implements epics::pvAccess::ChannelRequest.
Definition at line 805 of file channelLocal.cpp.
Definition at line 820 of file channelLocal.cpp.
826 RPCServiceAsync::shared_pointer service = pvRecord->getService(pvRequest);
830 "ChannelRPC not supported");
835 if (!channelRPCRequester)
836 throw std::invalid_argument(
"channelRPCRequester == null");
840 new ChannelRPCLocal(channelLocal, channelRPCRequester, service, pvRecord)
842 channelRPCRequester->channelRPCConnect(Status::Ok, rpc);
843 if(pvRecord->getTraceLevel()>0)
845 cout <<
"ChannelRPCLocal::create";
846 cout <<
" recordName " << pvRecord->getRecordName() << endl;
std::tr1::shared_ptr< ChannelRPCLocal > ChannelRPCLocalPtr
ChannelRPCLocal(ChannelLocalPtr const &channelLocal, ChannelRPCRequester::shared_pointer const &channelRPCRequester, RPCServiceAsync::shared_pointer const &service, PVRecordPtr const &pvRecord)
virtual void epics::pvDatabase::ChannelRPCLocal::destroy |
( |
| ) |
|
|
inlinevirtual |
std::tr1::shared_ptr< Channel > epics::pvDatabase::ChannelRPCLocal::getChannel |
( |
| ) |
|
|
virtual |
virtual void epics::pvDatabase::ChannelRPCLocal::lastRequest |
( |
| ) |
|
|
inlinevirtual |
Announce next request as last request. When last request will be completed (regardless of completion status) the remote and local instance will be destroyed.
Implements epics::pvAccess::ChannelRequest.
Definition at line 808 of file channelLocal.cpp.
virtual void epics::pvDatabase::ChannelRPCLocal::lock |
( |
| ) |
|
|
inlinevirtual |
epics::pvDatabase::ChannelRPCLocal::POINTER_DEFINITIONS |
( |
ChannelRPCLocal |
| ) |
|
void epics::pvDatabase::ChannelRPCLocal::processRequest |
( |
RPCService::shared_pointer const & |
service, |
|
|
PVStructurePtr const & |
pvArgument |
|
) |
| |
Definition at line 863 of file channelLocal.cpp.
872 result = service->request(pvArgument);
879 catch (std::exception& ex)
881 status =
Status(Status::STATUSTYPE_FATAL, ex.what());
887 status =
Status(Status::STATUSTYPE_FATAL,
"Unexpected exception caught while calling RPCService.request(PVStructure).");
894 status =
Status(Status::STATUSTYPE_FATAL,
"RPCService.request(PVStructure) returned null.");
896 ChannelRPCRequester::shared_pointer
requester = channelRPCRequester.lock();
897 if(requester) requester->requestDone(status, getPtrSelf(), result);
const ChannelProcessRequester::weak_pointer requester
std::tr1::shared_ptr< PVStructure > PVStructurePtr
epics::pvData::Status::StatusType getStatus() const
void epics::pvDatabase::ChannelRPCLocal::processRequest |
( |
RPCServiceAsync::shared_pointer const & |
service, |
|
|
PVStructurePtr const & |
pvArgument |
|
) |
| |
Definition at line 900 of file channelLocal.cpp.
906 service->request(pvArgument, getPtrSelf());
908 catch (std::exception& ex)
911 Status errorStatus(Status::STATUSTYPE_FATAL, ex.what());
912 ChannelRPCRequester::shared_pointer
requester = channelRPCRequester.lock();
913 if(requester) requester->requestDone(errorStatus, getPtrSelf(),
PVStructurePtr());
918 Status errorStatus(Status::STATUSTYPE_FATAL,
919 "Unexpected exception caught while calling RPCServiceAsync.request(PVStructure, RPCResponseCallback).");
920 ChannelRPCRequester::shared_pointer requester = channelRPCRequester.lock();
921 if(requester) requester->requestDone(errorStatus, shared_from_this(),
PVStructurePtr());
const ChannelProcessRequester::weak_pointer requester
std::tr1::shared_ptr< PVStructure > PVStructurePtr
void epics::pvDatabase::ChannelRPCLocal::request |
( |
PVStructurePtr const & |
pvArgument | ) |
|
|
virtual |
Definition at line 928 of file channelLocal.cpp.
931 if(pvr && pvr->getTraceLevel()>0) {
932 cout <<
"ChannelRPCLocal::request " << pvr->getRecordName() << endl;
934 RPCService::shared_pointer rpcService =
942 RPCServiceAsync::shared_pointer rpcServiceAsync =
void processRequest(RPCService::shared_pointer const &service, PVStructurePtr const &pvArgument)
std::tr1::shared_ptr< PVRecord > PVRecordPtr
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
virtual void epics::pvDatabase::ChannelRPCLocal::requestDone |
( |
Status const & |
status, |
|
|
PVStructurePtr const & |
result |
|
) |
| |
|
inlinevirtual |
Definition at line 792 of file channelLocal.cpp.
795 ChannelRPCRequester::shared_pointer
requester = channelRPCRequester.lock();
796 if(!requester)
return;
const ChannelProcessRequester::weak_pointer requester
virtual void epics::pvDatabase::ChannelRPCLocal::unlock |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: