예제 #1
0
void PvaClientMonitor::monitorEvent(MonitorPtr const & monitor)
{
    if(isDestroyed) throw std::runtime_error("pvaClientMonitor was destroyed");
    PvaClientMonitorRequesterPtr req = pvaClientMonitorRequester.lock();
    if(req) req->event(getPtrSelf());
    if(userWait) waitForEvent.signal();
}
예제 #2
0
void PvaClientMonitor::unlisten(MonitorPtr const & monitor)
{
    if(PvaClient::getDebug()) cout << "PvaClientMonitor::unlisten\n";
    PvaClientMonitorRequesterPtr req = pvaClientMonitorRequester.lock();
    if(req) {
        req->unlisten();
        return;
    }
    string channelName("disconnected");
    Channel::shared_pointer chan(channel.lock());
    if(chan) channelName = chan->getChannelName();
    cerr << channelName + "pvaClientMonitor::unlisten called but no PvaClientMonitorRequester\n";
}
예제 #3
0
void PvaClientMonitor::monitorEvent(MonitorPtr const & monitor)
{
    if(PvaClient::getDebug()) {
        string channelName("disconnected");
        Channel::shared_pointer chan(channel.lock());
        if(chan) channelName = chan->getChannelName();
        cout << "PvaClientMonitor::monitorEvent"
           << " channelName " << channelName
           << endl;
    }    
    PvaClientMonitorRequesterPtr req = pvaClientMonitorRequester.lock();
    if(req) req->event(shared_from_this());
    if(userWait) waitForEvent.signal();
}