16 #define epicsExportSharedSymbols 29 pva::Channel::shared_pointer
chan;
30 operation_type::shared_pointer
op;
33 ClientChannel::MonitorCallback *
cb;
36 pva::MonitorElement::Ref
last;
40 Impl(ClientChannel::MonitorCallback* cb)
45 {REFTRACE_INCREMENT(num_instances);}
50 REFTRACE_DECREMENT(num_instances);
55 ClientChannel::MonitorCallback *cb=this->
cb;
65 cb->monitorEvent(event);
67 }
catch(std::exception& e){
69 LOG(
pva::logLevelError,
"Unhandled exception in ClientChannel::MonitorCallback::monitorEvent(): %s", e.what());
73 event.message = e.what();
79 cb->monitorEvent(event);
81 }
catch(std::exception& e){
82 LOG(
pva::logLevelError,
"Unhandled exception following exception in ClientChannel::MonitorCallback::monitorEvent(): %s", e.what());
89 operation_type::shared_pointer temp;
114 return chan ? chan->getRequesterName() :
"<dead>";
124 if(!cb || started || done)
return;
129 event.message.clear();
136 if(sts.isSuccess()) {
154 if(!cb || done)
return;
155 event.message =
"Disconnect";
164 if(!cb || done)
return;
165 event.message.clear();
174 if(!cb || done)
return;
194 return impl ? impl->chan->getChannelName() :
"<NULL>";
199 if(impl) impl->cancel();
204 if(!impl)
return false;
205 Guard G(impl->mutex);
207 if(!impl->done && impl->op && impl->started && impl->last.next()) {
209 changed = *impl->last->changedBitSet;
210 overrun = *impl->last->overrunBitSet;
216 if(!
root || (
void*)
root->getField().get()!=(
void*)ptr->getField().get()) {
224 impl->seenEmpty =
false;
228 impl->seenEmpty =
true;
230 return !impl->seenEmpty;
235 if(!impl)
return true;
236 Guard G(impl->mutex);
237 return impl->done && impl->seenEmpty;
242 epics::pvData::PVStructure::const_shared_pointer pvRequest)
244 if(!impl)
throw std::logic_error(
"Dead Channel");
249 ret->chan = getChannel();
253 ret->op = ret->chan->createMonitor(ret->internal_shared_from_this(),
264 "\"" << op.impl->chan->getChannelName() <<
"\", " 265 "\"" << op.impl->chan->getProvider()->getProviderName() <<
"\", " 266 "connected="<<(op.impl->chan->isConnected()?
"true":
"false")
BitSet & clear(uint32 bitIndex)
virtual void monitorConnect(pvd::Status const &status, pva::MonitorPtr const &operation, pvd::StructureConstPtr const &structure) OVERRIDE FINAL
ClientChannel::MonitorCallback * cb
subscription interrupted due to loss of communication
std::tr1::shared_ptr< const Structure > StructureConstPtr
virtual std::string getRequesterName() OVERRIDE FINAL
pva::Channel::shared_pointer chan
epics::pvData::BitSet overrun
Handle for monitor subscription.
Impl(ClientChannel::MonitorCallback *cb)
const std::string & getMessage() const
PVStructure::shared_pointer createRequest(std::string const &request)
const std::tr1::weak_ptr< Process2PutProxy > operation
void registerRefTrackMonitor()
static std::tr1::shared_ptr< Monitor::Impl > build()
subscription ends in cancellation
void copyUnchecked(const PVStructure &from)
epics::pvData::PVStructure::const_shared_pointer root
#define LOG(level, format,...)
void cancel()
Immediate cancellation.
std::tr1::shared_ptr< Monitor::Impl > internal_shared_from_this()
APIs for the epicsMutex mutual exclusion semaphore.
pva::MonitorElement::Ref last
virtual void channelDisconnect(bool destroy) OVERRIDE FINAL
friend epicsShareFunc::std::ostream & operator<<(::std::ostream &strm, const Monitor &op)
Data interface for a structure,.
void callEvent(CallbackGuard &G, MonitorEvent::event_t evt=MonitorEvent::Fail)
void registerRefCounter(const char *name, const size_t *counter)
APIs for the epicsEvent binary semaphore.
std::tr1::shared_ptr< PVStructure > PVStructurePtr
std::string name() const
Channel name.
Callback implemented by monitor clients.
virtual void monitorEvent(pva::MonitorPtr const &monitor) OVERRIDE FINAL
static size_t num_instances
ChannelPut::shared_pointer op
Data queue not empty. Call Monitor::poll()
Monitor event notification.
epics::pvData::BitSet changed
shared_ptr< T > const_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
C++ and C descriptions for a thread.
virtual void unlisten(pva::MonitorPtr const &monitor) OVERRIDE FINAL
FORCE_INLINE const PVDataCreatePtr & getPVDataCreate()
std::tr1::shared_ptr< Monitor > MonitorPtr
subscription ends in an error
operation_type::shared_pointer op
Monitor monitor(MonitorCallback *cb, epics::pvData::PVStructure::const_shared_pointer pvRequest=epics::pvData::PVStructure::const_shared_pointer())