bool PvaClientMonitor::poll() { if(PvaClient::getDebug()) { string channelName("disconnected"); Channel::shared_pointer chan(channel.lock()); if(chan) channelName = chan->getChannelName(); cout << "PvaClientMonitor::poll" << " channelName " << channelName << endl; } checkMonitorState(); if(!isStarted) { string channelName("disconnected"); Channel::shared_pointer chan(channel.lock()); if(chan) channelName = chan->getChannelName(); string message = string("channel ") + channelName + " PvaClientMonitor::poll illegal state "; throw std::runtime_error(message); } if(userPoll) { string channelName("disconnected"); Channel::shared_pointer chan(channel.lock()); if(chan) channelName = chan->getChannelName(); string message = string("channel ") + channelName + " PvaClientMonitor::poll did not release last"; throw std::runtime_error(message); } monitorElement = monitor->poll(); if(!monitorElement) return false; userPoll = true; pvaClientData->setData(monitorElement); return true; }
bool PvaClientMonitor::poll() { checkMonitorState(); if(connectState!=monitorStarted) throw std::runtime_error("PvaClientMonitor::poll illegal state"); if(userPoll) throw std::runtime_error("PvaClientMonitor::poll did not release last"); monitorElement = monitor->poll(); if(!monitorElement) return false; userPoll = true; pvaClientData->setData(monitorElement); return true; }
PvaClientMonitorDataPtr PvaClientMonitor::getData() { if(PvaClient::getDebug()) { string channelName("disconnected"); Channel::shared_pointer chan(channel.lock()); if(chan) channelName = chan->getChannelName(); cout << "PvaClientMonitor::getData" << " channelName " << channelName << endl; } checkMonitorState(); return pvaClientData; }
PvaClientMonitorDataPtr PvaClientMonitor::getData() { checkMonitorState(); return pvaClientData; }