diff --git a/src/pv/pvaClient.h b/src/pv/pvaClient.h index 3ef6148..92ce4e4 100644 --- a/src/pv/pvaClient.h +++ b/src/pv/pvaClient.h @@ -1185,7 +1185,7 @@ private: PvaClientChannelPtr const & pvaClientChannel, epics::pvData::PVStructurePtr const &pvRequest); - void checkGetState(); + void checkConnectState(); enum GetConnectState {connectIdle,connectActive,connected}; PvaClient::weak_pointer pvaClient; @@ -1354,7 +1354,7 @@ private : PvaClientChannelPtr const & pvaClientChannel, epics::pvData::PVStructurePtr const &pvRequest); - void checkPutState(); + void checkConnectState(); enum PutConnectState {connectIdle,connectActive,connected}; PvaClient::weak_pointer pvaClient; diff --git a/src/pvaClientChannel.cpp b/src/pvaClientChannel.cpp index e8da448..929c876 100644 --- a/src/pvaClientChannel.cpp +++ b/src/pvaClientChannel.cpp @@ -198,7 +198,6 @@ void PvaClientChannel::channelStateChange( << " " << Channel::ConnectionStateNames[connectionState] << endl; } - bool waitingForConnect = false; if(connectState==connectActive) waitingForConnect = true; if(connectionState!=Channel::CONNECTED) { diff --git a/src/pvaClientGet.cpp b/src/pvaClientGet.cpp index 77c3798..c93fc0f 100644 --- a/src/pvaClientGet.cpp +++ b/src/pvaClientGet.cpp @@ -115,16 +115,16 @@ PvaClientGet::~PvaClientGet() } -void PvaClientGet::checkGetState() +void PvaClientGet::checkConnectState() { if(PvaClient::getDebug()) { - cout << "PvaClientGet::checkGetState" + cout << "PvaClientGet::checkConnectState" << " channelName " << pvaClientChannel->getChannel()->getChannelName() << endl; } if(!pvaClientChannel->getChannel()->isConnected()) { string message = string("channel ") + pvaClientChannel->getChannel()->getChannelName() - + " PvaClientGet::checkGetState channel not connected "; + + " PvaClientGet::checkConnectState channel not connected "; throw std::runtime_error(message); } if(connectState==connectIdle) { @@ -334,7 +334,7 @@ PvaClientGetDataPtr PvaClientGet::getData() << " channelName " << pvaClientChannel->getChannel()->getChannelName() << endl; } - checkGetState(); + checkConnectState(); if(getState==getIdle) get(); return pvaClientData; } diff --git a/src/pvaClientMonitor.cpp b/src/pvaClientMonitor.cpp index 449209a..246f630 100644 --- a/src/pvaClientMonitor.cpp +++ b/src/pvaClientMonitor.cpp @@ -436,16 +436,6 @@ bool PvaClientMonitor::poll() << endl; } checkMonitorState(); - if(!isStarted) { - string message = string("channel ") + pvaClientChannel->getChannel()->getChannelName() - + " PvaClientMonitor::poll illegal state "; - throw std::runtime_error(message); - } - if(userPoll) { - string message = string("channel ") + pvaClientChannel->getChannel()->getChannelName() - + " PvaClientMonitor::poll did not release last"; - throw std::runtime_error(message); - } monitorElement = monitor->poll(); if(!monitorElement) return false; userPoll = true; @@ -483,11 +473,6 @@ void PvaClientMonitor::releaseEvent() << " channelName " << pvaClientChannel->getChannel()->getChannelName() << endl; } - if(!isStarted) { - string message = string("channel ") + pvaClientChannel->getChannel()->getChannelName() - + " PvaClientMonitor::releaseEvent monitor not started "; - throw std::runtime_error(message); - } if(!userPoll) { string message = string("channel ") + pvaClientChannel->getChannel()->getChannelName() + " PvaClientMonitor::releaseEvent did not call poll"; diff --git a/src/pvaClientPut.cpp b/src/pvaClientPut.cpp index b6be8e1..c42ba19 100644 --- a/src/pvaClientPut.cpp +++ b/src/pvaClientPut.cpp @@ -119,10 +119,10 @@ PvaClientPut::~PvaClientPut() } -void PvaClientPut::checkPutState() +void PvaClientPut::checkConnectState() { if(PvaClient::getDebug()) { - cout << "PvaClientPut::checkPutState" + cout << "PvaClientPut::checkConnectState" << " channelName " << pvaClientChannel->getChannel()->getChannelName() << endl; } @@ -385,7 +385,7 @@ void PvaClientPut::issuePut() if(putState==getActive || putState==putActive) { string message = string("channel ") + pvaClientChannel->getChannel()->getChannelName() - + "PvaClientPut::issueGet get or put aleady active "; + + "PvaClientPut::issuePut get or put aleady active "; throw std::runtime_error(message); } putState = putActive; @@ -421,7 +421,7 @@ PvaClientPutDataPtr PvaClientPut::getData() << " channelName " << pvaClientChannel->getChannel()->getChannelName() << endl; } - checkPutState(); + checkConnectState(); if(putState==putIdle) get(); return pvaClientData; }