remove a create method from monitor; remove unused channelStateChange methods
This commit is contained in:
@@ -118,24 +118,6 @@ PvaClientPut::~PvaClientPut()
|
||||
}
|
||||
}
|
||||
|
||||
void PvaClientPut::channelStateChange(PvaClientChannelPtr const & pvaClientChannel, bool isConnected)
|
||||
{
|
||||
if(PvaClient::getDebug()) {
|
||||
cout<< "PvaClientPut::channelStateChange"
|
||||
<< " channelName " << pvaClientChannel->getChannel()->getChannelName()
|
||||
<< " isConnected " << (isConnected ? "true" : "false")
|
||||
<< endl;
|
||||
}
|
||||
if(isConnected&&!channelPut)
|
||||
{
|
||||
connectState = connectActive;
|
||||
channelPut = pvaClientChannel->getChannel()->createChannelPut(channelPutRequester,pvRequest);
|
||||
}
|
||||
PvaClientChannelStateChangeRequesterPtr req(pvaClientChannelStateChangeRequester.lock());
|
||||
if(req) {
|
||||
req->channelStateChange(pvaClientChannel,isConnected);
|
||||
}
|
||||
}
|
||||
|
||||
void PvaClientPut::checkPutState()
|
||||
{
|
||||
@@ -217,13 +199,17 @@ void PvaClientPut::getDone(
|
||||
<< " status.isOK " << (status.isOK() ? "true" : "false")
|
||||
<< endl;
|
||||
}
|
||||
channelGetPutStatus = status;
|
||||
if(status.isOK()) {
|
||||
PVStructurePtr pvs = pvaClientData->getPVStructure();
|
||||
pvs->copyUnchecked(*pvStructure,*bitSet);
|
||||
BitSetPtr bs = pvaClientData->getChangedBitSet();
|
||||
bs->clear();
|
||||
*bs |= *bitSet;
|
||||
{
|
||||
Lock xx(mutex);
|
||||
channelGetPutStatus = status;
|
||||
if(status.isOK()) {
|
||||
PVStructurePtr pvs = pvaClientData->getPVStructure();
|
||||
pvs->copyUnchecked(*pvStructure,*bitSet);
|
||||
BitSetPtr bs = pvaClientData->getChangedBitSet();
|
||||
bs->clear();
|
||||
*bs |= *bitSet;
|
||||
putState = putComplete;
|
||||
}
|
||||
}
|
||||
PvaClientPutRequesterPtr req(pvaClientPutRequester.lock());
|
||||
if(req) {
|
||||
@@ -242,7 +228,11 @@ void PvaClientPut::putDone(
|
||||
<< " status.isOK " << (status.isOK() ? "true" : "false")
|
||||
<< endl;
|
||||
}
|
||||
channelGetPutStatus = status;
|
||||
{
|
||||
Lock xx(mutex);
|
||||
channelGetPutStatus = status;
|
||||
putState = putComplete;
|
||||
}
|
||||
PvaClientPutRequesterPtr req(pvaClientPutRequester.lock());
|
||||
if(req) {
|
||||
req->putDone(status,shared_from_this());
|
||||
@@ -351,14 +341,17 @@ Status PvaClientPut::waitGet()
|
||||
<< " channelName " << pvaClientChannel->getChannel()->getChannelName()
|
||||
<< endl;
|
||||
}
|
||||
if(putState!=getActive){
|
||||
string message = string("channel ")
|
||||
+ pvaClientChannel->getChannel()->getChannelName()
|
||||
+ " PvaClientPut::waitGet illegal put state";
|
||||
throw std::runtime_error(message);
|
||||
{
|
||||
Lock xx(mutex);
|
||||
if(putState==putComplete) return channelGetPutStatus;
|
||||
if(putState!=getActive){
|
||||
string message = string("channel ")
|
||||
+ pvaClientChannel->getChannel()->getChannelName()
|
||||
+ " PvaClientPut::waitGet illegal put state";
|
||||
throw std::runtime_error(message);
|
||||
}
|
||||
}
|
||||
waitForGetPut.wait();
|
||||
putState = putComplete;
|
||||
return channelGetPutStatus;
|
||||
}
|
||||
|
||||
@@ -406,14 +399,17 @@ Status PvaClientPut::waitPut()
|
||||
<< " channelName " << pvaClientChannel->getChannel()->getChannelName()
|
||||
<< endl;
|
||||
}
|
||||
if(putState!=putActive){
|
||||
string message = string("channel ")
|
||||
+ pvaClientChannel->getChannel()->getChannelName()
|
||||
+ " PvaClientPut::waitPut illegal put state";
|
||||
throw std::runtime_error(message);
|
||||
{
|
||||
Lock xx(mutex);
|
||||
if(putState==putComplete) return channelGetPutStatus;
|
||||
if(putState!=putActive){
|
||||
string message = string("channel ")
|
||||
+ pvaClientChannel->getChannel()->getChannelName()
|
||||
+ " PvaClientPut::waitPut illegal put state";
|
||||
throw std::runtime_error(message);
|
||||
}
|
||||
}
|
||||
waitForGetPut.wait();
|
||||
putState = putComplete;
|
||||
if(channelGetPutStatus.isOK()) pvaClientData->getChangedBitSet()->clear();
|
||||
return channelGetPutStatus;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user